@seamapi/http 0.10.1 → 0.10.2
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 +49 -1
- package/dist/connect.cjs.map +1 -1
- package/dist/connect.d.cts +2 -2
- package/lib/seam/connect/seam-http-multi-workspace.d.ts +1 -1
- package/lib/seam/connect/seam-http.d.ts +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
- package/src/lib/seam/connect/seam-http-multi-workspace.ts +1 -1
- package/src/lib/seam/connect/seam-http.ts +1 -1
- package/src/lib/version.ts +1 -1
package/README.md
CHANGED
|
@@ -261,10 +261,58 @@ try {
|
|
|
261
261
|
|
|
262
262
|
[action attempt]: https://docs.seam.co/latest/core-concepts/action-attempts
|
|
263
263
|
|
|
264
|
+
### Interacting with Multiple Workspaces
|
|
265
|
+
|
|
266
|
+
Some Seam API endpoints interact with multiple workspaces.
|
|
267
|
+
The `SeamHttpMultiWorkspace` client is not bound to a specific workspace
|
|
268
|
+
and may use those endpoints with an appropriate authentication method.
|
|
269
|
+
|
|
270
|
+
#### Personal Access Token
|
|
271
|
+
|
|
272
|
+
A Personal Access Token is scoped to a Seam Console user.
|
|
273
|
+
Obtain one from the Seam Console.
|
|
274
|
+
|
|
275
|
+
```ts
|
|
276
|
+
// Pass as an option the constructor
|
|
277
|
+
const seam = new SeamHttpMultiWorkspace({
|
|
278
|
+
personalAccessToken: 'your-personal-access-token',
|
|
279
|
+
})
|
|
280
|
+
|
|
281
|
+
// Use the factory method
|
|
282
|
+
const seam = SeamHttpMultiWorkspace.fromPersonalAccessToken(
|
|
283
|
+
'some-console-session-token',
|
|
284
|
+
)
|
|
285
|
+
|
|
286
|
+
// List workspaces authorized for this Personal Access Token
|
|
287
|
+
const workspaces = await seam.workspaces.list()
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
#### Console Session Token
|
|
291
|
+
|
|
292
|
+
A Console Session Token is used by the Seam Console.
|
|
293
|
+
This authentication method is only used by internal Seam applications.
|
|
294
|
+
|
|
295
|
+
```ts
|
|
296
|
+
// Pass as an option the constructor
|
|
297
|
+
const seam = new SeamHttpMultiWorkspace({
|
|
298
|
+
consoleSessionToken: 'some-console-session-token',
|
|
299
|
+
})
|
|
300
|
+
|
|
301
|
+
// Use the factory method
|
|
302
|
+
const seam = SeamHttpMultiWorkspace.fromConsoleSessionToken(
|
|
303
|
+
'some-console-session-token',
|
|
304
|
+
)
|
|
305
|
+
|
|
306
|
+
// List workspaces authorized for this Seam Console user
|
|
307
|
+
const workspaces = await seam.workspaces.list()
|
|
308
|
+
```
|
|
309
|
+
|
|
264
310
|
### Advanced Usage
|
|
265
311
|
|
|
312
|
+
#### Additional Options
|
|
313
|
+
|
|
266
314
|
In addition the various authentication options,
|
|
267
|
-
the constructor takes some
|
|
315
|
+
the constructor takes some advanced options that affect behavior.
|
|
268
316
|
|
|
269
317
|
```ts
|
|
270
318
|
const seam = new SeamHttp({
|