seam 0.97.0 → 0.98.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -10
- package/package.json +3 -4
package/README.md
CHANGED
|
@@ -127,7 +127,7 @@ const seam = new Seam()
|
|
|
127
127
|
// Pass as the first argument to the constructor
|
|
128
128
|
const seam = new Seam('your-api-key')
|
|
129
129
|
|
|
130
|
-
// Pass as an option the constructor
|
|
130
|
+
// Pass as an option to the constructor
|
|
131
131
|
const seam = new Seam({ apiKey: 'your-api-key' })
|
|
132
132
|
|
|
133
133
|
// Use the factory method
|
|
@@ -139,7 +139,7 @@ const seam = Seam.fromApiKey('your-api-key')
|
|
|
139
139
|
A Client Session Token is scoped to a client session and should only be used on the client.
|
|
140
140
|
|
|
141
141
|
```ts
|
|
142
|
-
// Pass as an option the constructor
|
|
142
|
+
// Pass as an option to the constructor
|
|
143
143
|
const seam = new Seam({ clientSessionToken: 'some-client-session-token' })
|
|
144
144
|
|
|
145
145
|
// Use the factory method
|
|
@@ -179,7 +179,7 @@ A workspace ID must be provided when using this method
|
|
|
179
179
|
and all requests will be scoped to that workspace.
|
|
180
180
|
|
|
181
181
|
```ts
|
|
182
|
-
// Pass as an option the constructor
|
|
182
|
+
// Pass as an option to the constructor
|
|
183
183
|
|
|
184
184
|
const seam = new Seam({
|
|
185
185
|
personalAccessToken: 'your-personal-access-token',
|
|
@@ -201,7 +201,7 @@ A workspace ID must be provided when using this method
|
|
|
201
201
|
and all requests will be scoped to that workspace.
|
|
202
202
|
|
|
203
203
|
```ts
|
|
204
|
-
// Pass as an option the constructor
|
|
204
|
+
// Pass as an option to the constructor
|
|
205
205
|
const seam = new Seam({
|
|
206
206
|
consoleSessionToken: 'some-console-session-token',
|
|
207
207
|
workspaceId: 'your-workspace-id',
|
|
@@ -239,7 +239,7 @@ and want to wait for it to resolve, simply use
|
|
|
239
239
|
await seam.actionAttempts.get({ action_attempt_id })
|
|
240
240
|
```
|
|
241
241
|
|
|
242
|
-
Or, to get the current state of an action attempt by ID without waiting
|
|
242
|
+
Or, to get the current state of an action attempt by ID without waiting:
|
|
243
243
|
|
|
244
244
|
```ts
|
|
245
245
|
await seam.actionAttempts.get(
|
|
@@ -250,7 +250,7 @@ await seam.actionAttempts.get(
|
|
|
250
250
|
)
|
|
251
251
|
```
|
|
252
252
|
|
|
253
|
-
To disable this behavior, set the default option for the client
|
|
253
|
+
To disable this behavior, set the default option for the client:
|
|
254
254
|
|
|
255
255
|
```ts
|
|
256
256
|
const seam = new Seam({
|
|
@@ -261,7 +261,7 @@ const seam = new Seam({
|
|
|
261
261
|
await seam.locks.unlockDoor({ device_id })
|
|
262
262
|
```
|
|
263
263
|
|
|
264
|
-
or the behavior may be configured per-request
|
|
264
|
+
or the behavior may be configured per-request:
|
|
265
265
|
|
|
266
266
|
```ts
|
|
267
267
|
await seam.locks.unlockDoor(
|
|
@@ -272,7 +272,8 @@ await seam.locks.unlockDoor(
|
|
|
272
272
|
)
|
|
273
273
|
```
|
|
274
274
|
|
|
275
|
-
The `pollingInterval` and `timeout` may be configured for the client or per-request
|
|
275
|
+
The `pollingInterval` and `timeout` may be configured for the client or per-request.
|
|
276
|
+
For example:
|
|
276
277
|
|
|
277
278
|
```ts
|
|
278
279
|
import {
|
|
@@ -324,7 +325,7 @@ A Personal Access Token is scoped to a Seam Console user.
|
|
|
324
325
|
Obtain one from the Seam Console.
|
|
325
326
|
|
|
326
327
|
```ts
|
|
327
|
-
// Pass as an option the constructor
|
|
328
|
+
// Pass as an option to the constructor
|
|
328
329
|
const seam = new SeamMultiWorkspace({
|
|
329
330
|
personalAccessToken: 'your-personal-access-token',
|
|
330
331
|
})
|
|
@@ -344,7 +345,7 @@ A Console Session Token is used by the Seam Console.
|
|
|
344
345
|
This authentication method is only used by internal Seam applications.
|
|
345
346
|
|
|
346
347
|
```ts
|
|
347
|
-
// Pass as an option the constructor
|
|
348
|
+
// Pass as an option to the constructor
|
|
348
349
|
const seam = new SeamMultiWorkspace({
|
|
349
350
|
consoleSessionToken: 'some-console-session-token',
|
|
350
351
|
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "seam",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.98.0",
|
|
4
4
|
"description": "JavaScript SDK for the Seam API written in TypeScript.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -65,10 +65,9 @@
|
|
|
65
65
|
"npm": ">= 9.0.0"
|
|
66
66
|
},
|
|
67
67
|
"dependencies": {
|
|
68
|
-
"@seamapi/http": "1.0.0
|
|
69
|
-
"@seamapi/types": "1.
|
|
68
|
+
"@seamapi/http": "1.0.0",
|
|
69
|
+
"@seamapi/types": "1.205.0",
|
|
70
70
|
"@seamapi/webhook": "1.1.0",
|
|
71
|
-
"seamapi-types": "1.42.0",
|
|
72
71
|
"zod": "^3.21.4"
|
|
73
72
|
},
|
|
74
73
|
"devDependencies": {
|