diff --git a/.eslintrc.json b/.eslintrc.json index 3fe05c3a..7d437ef6 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -28,7 +28,7 @@ ["^\\u0000"], ["^node:"], ["^@?\\w"], - ["@seamapi/http/connect"], + ["@seamapi/http", "@seamapi/http/connect"], ["^lib/"], ["^"], ["^\\."] diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 77faab94..67b60324 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -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 }} diff --git a/README.md b/README.md index 040ca225..da3281b5 100644 --- a/README.md +++ b/README.md @@ -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() @@ -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' }) @@ -277,7 +277,7 @@ import { SeamHttp, isSeamActionAttemptFailedError, isSeamActionAttemptTimeoutError, -} from '@seamapi/http/connect' +} from '@seamapi/http' const seam = new SeamHttp('your-api-key', { waitForActionAttempt: { @@ -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() @@ -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']() @@ -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 }) ``` diff --git a/examples/index.ts b/examples/index.ts index f9687603..3a54d36f 100755 --- a/examples/index.ts +++ b/examples/index.ts @@ -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' diff --git a/examples/unlock.ts b/examples/unlock.ts index 0ebefe6e..38064c41 100644 --- a/examples/unlock.ts +++ b/examples/unlock.ts @@ -4,7 +4,7 @@ import { isSeamActionAttemptFailedError, isSeamActionAttemptTimeoutError, type LocksUnlockDoorResponse, -} from '@seamapi/http/connect' +} from '@seamapi/http' import type { Handler } from './index.js' diff --git a/src/index.ts b/src/index.ts index 7b859548..4224366c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1 +1 @@ -export default null +export * from './connect.js'