Skip to content

Commit 9a67140

Browse files
committed
feat: Re-export connect from root
1 parent 80a56da commit 9a67140

File tree

7 files changed

+12
-10
lines changed

7 files changed

+12
-10
lines changed

.eslintrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
["^\\u0000"],
2929
["^node:"],
3030
["^@?\\w"],
31-
["@seamapi/http/connect"],
31+
["@seamapi/http", "@seamapi/http/connect"],
3232
["^lib/"],
3333
["^"],
3434
["^\\."]

.github/workflows/check.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ jobs:
100100
write-mode: overwrite
101101
path: index.js
102102
contents: |
103+
import '@seamapi/http'
103104
import '@seamapi/http/connect'
104105
- name: Install
105106
run: npm install --save ${{ steps.packages.outputs.paths }}

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ $ npm install -D @seamapi/types@latest
8383
#### List devices
8484

8585
```ts
86-
import { SeamHttp } from '@seamapi/http/connect'
86+
import { SeamHttp } from '@seamapi/http'
8787

8888
const seam = new SeamHttp()
8989
const devices = await seam.devices.list()
@@ -92,7 +92,7 @@ const devices = await seam.devices.list()
9292
#### Unlock a door
9393

9494
```ts
95-
import { SeamHttp } from '@seamapi/http/connect'
95+
import { SeamHttp } from '@seamapi/http'
9696

9797
const seam = new SeamHttp()
9898
const lock = await seam.locks.get({ name: 'Front Door' })
@@ -277,7 +277,7 @@ import {
277277
SeamHttp,
278278
isSeamActionAttemptFailedError,
279279
isSeamActionAttemptTimeoutError,
280-
} from '@seamapi/http/connect'
280+
} from '@seamapi/http'
281281

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

497497
```ts
498-
import { SeamHttp, DevicesListResponse } from '@seamapi/http/connect'
498+
import { SeamHttp, DevicesListResponse } from '@seamapi/http'
499499

500500
const seam = new SeamHttp()
501501

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

520520
```ts
521-
import { SeamHttpEndpoints } from '@seamapi/http/connect'
521+
import { SeamHttpEndpoints } from '@seamapi/http'
522522

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

534534
```ts
535-
import { SeamHttp } from '@seamapi/http/connect'
535+
import { SeamHttp } from '@seamapi/http'
536536

537537
const seam = new SeamHttp({ isUndocumentedApiEnabled: true })
538538
```

examples/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import landlubber, {
1010
type MiddlewareFunction,
1111
} from 'landlubber'
1212

13-
import { SeamHttp } from '@seamapi/http/connect'
13+
import { SeamHttp } from '@seamapi/http'
1414

1515
import * as locks from './locks.js'
1616
import * as unlock from './unlock.js'

examples/unlock.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {
44
isSeamActionAttemptFailedError,
55
isSeamActionAttemptTimeoutError,
66
type LocksUnlockDoorResponse,
7-
} from '@seamapi/http/connect'
7+
} from '@seamapi/http'
88

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

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export default null
1+
export * from 'lib/index.js'

src/lib/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from 'lib/seam/connect/index.js'

0 commit comments

Comments
 (0)