Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
["^\\u0000"],
["^node:"],
["^@?\\w"],
["@seamapi/http/connect"],
["@seamapi/http", "@seamapi/http/connect"],
["^lib/"],
["^"],
["^\\."]
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ jobs:
write-mode: overwrite
path: index.js
contents: |
import '@seamapi/http'
import '@seamapi/http/connect'
- name: Install
run: npm install --save ${{ steps.packages.outputs.paths }}
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ $ npm install -D @seamapi/types@latest
#### List devices

```ts
import { SeamHttp } from '@seamapi/http/connect'
import { SeamHttp } from '@seamapi/http'

const seam = new SeamHttp()
const devices = await seam.devices.list()
Expand All @@ -92,7 +92,7 @@ const devices = await seam.devices.list()
#### Unlock a door

```ts
import { SeamHttp } from '@seamapi/http/connect'
import { SeamHttp } from '@seamapi/http'

const seam = new SeamHttp()
const lock = await seam.locks.get({ name: 'Front Door' })
Expand Down Expand Up @@ -277,7 +277,7 @@ import {
SeamHttp,
isSeamActionAttemptFailedError,
isSeamActionAttemptTimeoutError,
} from '@seamapi/http/connect'
} from '@seamapi/http'

const seam = new SeamHttp('your-api-key', {
waitForActionAttempt: {
Expand Down Expand Up @@ -495,7 +495,7 @@ Options are deep merged with the default options.
The Axios client is exposed and may be used or configured directly:

```ts
import { SeamHttp, DevicesListResponse } from '@seamapi/http/connect'
import { SeamHttp, DevicesListResponse } from '@seamapi/http'

const seam = new SeamHttp()

Expand All @@ -518,7 +518,7 @@ The `SeamHttpEndpoints` class offers an alternative path-based interface to ever
Each endpoint is exposed as simple property that returns the corresponding method from `SeamHttp`.

```ts
import { SeamHttpEndpoints } from '@seamapi/http/connect'
import { SeamHttpEndpoints } from '@seamapi/http'

const seam = new SeamHttpEndpoints()
const devices = await seam['/devices/list']()
Expand All @@ -532,7 +532,7 @@ Do not use the undocumented API in production environments.
Seam is not responsible for any issues you may encounter with the undocumented API.

```ts
import { SeamHttp } from '@seamapi/http/connect'
import { SeamHttp } from '@seamapi/http'

const seam = new SeamHttp({ isUndocumentedApiEnabled: true })
```
Expand Down
2 changes: 1 addition & 1 deletion examples/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import landlubber, {
type MiddlewareFunction,
} from 'landlubber'

import { SeamHttp } from '@seamapi/http/connect'
import { SeamHttp } from '@seamapi/http'

import * as locks from './locks.js'
import * as unlock from './unlock.js'
Expand Down
2 changes: 1 addition & 1 deletion examples/unlock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
isSeamActionAttemptFailedError,
isSeamActionAttemptTimeoutError,
type LocksUnlockDoorResponse,
} from '@seamapi/http/connect'
} from '@seamapi/http'

import type { Handler } from './index.js'

Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export default null
export * from './connect.js'