seam 1.80.0 → 1.82.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 CHANGED
@@ -49,7 +49,7 @@ Instead, it re-exports from a core set of Seam modules:
49
49
  - [Iterate over all pages](#iterate-over-all-pages)
50
50
  - [Iterate over all resources](#iterate-over-all-resources)
51
51
  - [Return all resources across all pages as an array](#return-all-resources-across-all-pages-as-an-array)
52
- - [Interacting with Multiple Workspaces](#interacting-with-multiple-workspaces)
52
+ - [Requests without a Workspace in scope](#requests-without-a-workspace-in-scope)
53
53
  - [Personal Access Token](#personal-access-token-1)
54
54
  - [Console Session Token](#console-session-token-1)
55
55
  - [Advanced Usage](#advanced-usage)
@@ -58,6 +58,8 @@ Instead, it re-exports from a core set of Seam modules:
58
58
  - [Configuring the Axios Client](#configuring-the-axios-client)
59
59
  - [Using the Axios Client](#using-the-axios-client)
60
60
  - [Overriding the Client](#overriding-the-client)
61
+ - [Alternative endpoint path interface](#alternative-endpoint-path-interface)
62
+ - [Enable undocumented API](#enable-undocumented-api)
61
63
  - [Inspecting the Request](#inspecting-the-request)
62
64
  - [Receiving Webhooks](#receiving-webhooks)
63
65
  - [Development and Testing](#development-and-testing)
@@ -408,10 +410,10 @@ const pages = seam.createPaginator(
408
410
  const devices = await pages.flattenToArray()
409
411
  ```
410
412
 
411
- ### Interacting with Multiple Workspaces
413
+ ### Requests without a Workspace in scope
412
414
 
413
- Some Seam API endpoints interact with multiple workspaces.
414
- The `SeamMultiWorkspace` client is not bound to a specific workspace
415
+ Some Seam API endpoints do not require a workspace in scope.
416
+ The `SeamWithoutWorkspace` client is not bound to a specific workspace
415
417
  and may use those endpoints with an appropriate authentication method.
416
418
 
417
419
  #### Personal Access Token
@@ -421,15 +423,15 @@ Obtain one from the Seam Console.
421
423
 
422
424
  ```ts
423
425
  // Set the `SEAM_PERSONAL_ACCESS_TOKEN` environment variable
424
- const seam = new SeamMultiWorkspace()
426
+ const seam = new SeamWithoutWorkspace()
425
427
 
426
428
  // Pass as an option to the constructor
427
- const seam = new SeamMultiWorkspace({
429
+ const seam = new SeamWithoutWorkspace({
428
430
  personalAccessToken: 'your-personal-access-token',
429
431
  })
430
432
 
431
433
  // Use the factory method
432
- const seam = SeamMultiWorkspace.fromPersonalAccessToken(
434
+ const seam = SeamWithoutWorkspace.fromPersonalAccessToken(
433
435
  'some-console-session-token',
434
436
  )
435
437
 
@@ -444,12 +446,12 @@ This authentication method is only used by internal Seam applications.
444
446
 
445
447
  ```ts
446
448
  // Pass as an option to the constructor
447
- const seam = new SeamMultiWorkspace({
449
+ const seam = new SeamWithoutWorkspace({
448
450
  consoleSessionToken: 'some-console-session-token',
449
451
  })
450
452
 
451
453
  // Use the factory method
452
- const seam = SeamMultiWorkspace.fromConsoleSessionToken(
454
+ const seam = SeamWithoutWorkspace.fromConsoleSessionToken(
453
455
  'some-console-session-token',
454
456
  )
455
457
 
@@ -523,6 +525,31 @@ const devices = await seam.client.get<DevicesListResponse>('/devices/list')
523
525
  An Axios compatible client may be provided to create a `Seam` instance.
524
526
  This API is used internally and is not directly supported.
525
527
 
528
+ #### Alternative endpoint path interface
529
+
530
+ The `SeamEndpoints` class offers an alternative path-based interface to every API endpoint.
531
+ Each endpoint is exposed as simple property that returns the corresponding method from `Seam`.
532
+
533
+ ```ts
534
+ import { SeamEndpoints } from 'seam'
535
+
536
+ const seam = new SeamEndpoints()
537
+ const devices = await seam['/devices/list']()
538
+ ```
539
+
540
+ #### Enable undocumented API
541
+
542
+ Pass the `isUndocumentedApiEnabled` option to allow using the undocumented API.
543
+ This API is used internally and is not directly supported.
544
+ Do not use the undocumented API in production environments.
545
+ Seam is not responsible for any issues you may encounter with the undocumented API.
546
+
547
+ ```ts
548
+ import { Seam } from 'seam'
549
+
550
+ const seam = new Seam({ isUndocumentedApiEnabled: true })
551
+ ```
552
+
526
553
  #### Inspecting the Request
527
554
 
528
555
  All client methods return an instance of `SeamHttpRequest`.
package/dist/index.cjs CHANGED
@@ -1,22 +1,30 @@
1
1
  'use strict';
2
2
 
3
- var connect = require('@seamapi/http/connect');
3
+ var http = require('@seamapi/http');
4
4
  var webhook = require('@seamapi/webhook');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "Seam", {
9
9
  enumerable: true,
10
- get: function () { return connect.SeamHttp; }
10
+ get: function () { return http.SeamHttp; }
11
+ });
12
+ Object.defineProperty(exports, "SeamEndpoints", {
13
+ enumerable: true,
14
+ get: function () { return http.SeamHttpEndpoints; }
11
15
  });
12
16
  Object.defineProperty(exports, "SeamMultiWorkspace", {
13
17
  enumerable: true,
14
- get: function () { return connect.SeamHttpMultiWorkspace; }
18
+ get: function () { return http.SeamHttpMultiWorkspace; }
19
+ });
20
+ Object.defineProperty(exports, "SeamWithoutWorkspace", {
21
+ enumerable: true,
22
+ get: function () { return http.SeamHttpWithoutWorkspace; }
15
23
  });
16
- Object.keys(connect).forEach(function (k) {
24
+ Object.keys(http).forEach(function (k) {
17
25
  if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
18
26
  enumerable: true,
19
- get: function () { return connect[k]; }
27
+ get: function () { return http[k]; }
20
28
  });
21
29
  });
22
30
  Object.keys(webhook).forEach(function (k) {
package/dist/index.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- export * from '@seamapi/http/connect';
2
- export { SeamHttp as Seam, SeamHttpMultiWorkspace as SeamMultiWorkspace, SeamHttpMultiWorkspaceOptions as SeamMultiWorkspaceOptions, SeamHttpOptions as SeamOptions } from '@seamapi/http/connect';
3
- export * from '@seamapi/types/connect';
1
+ export * from '@seamapi/http';
2
+ export { SeamHttp as Seam, SeamHttpEndpoints as SeamEndpoints, SeamHttpMultiWorkspace as SeamMultiWorkspace, SeamHttpWithoutWorkspaceOptions as SeamMultiWorkspaceOptions, SeamHttpOptions as SeamOptions, SeamHttpWithoutWorkspace as SeamWithoutWorkspace, SeamHttpWithoutWorkspace as SeamWithoutWorkspaceOptions } from '@seamapi/http';
3
+ export * from '@seamapi/types';
4
4
  export * from '@seamapi/webhook';
package/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { SeamHttp as Seam, SeamHttpMultiWorkspace as SeamMultiWorkspace, type SeamHttpMultiWorkspaceOptions as SeamMultiWorkspaceOptions, type SeamHttpOptions as SeamOptions } from '@seamapi/http/connect';
2
- export * from '@seamapi/http/connect';
3
- export type * from '@seamapi/types/connect';
1
+ import { SeamHttp as Seam, SeamHttpEndpoints as SeamEndpoints, SeamHttpMultiWorkspace as SeamMultiWorkspace, type SeamHttpOptions as SeamOptions, SeamHttpWithoutWorkspace as SeamWithoutWorkspace, type SeamHttpWithoutWorkspace as SeamWithoutWorkspaceOptions, type SeamHttpWithoutWorkspaceOptions as SeamMultiWorkspaceOptions } from '@seamapi/http';
2
+ export * from '@seamapi/http';
3
+ export type * from '@seamapi/types';
4
4
  export * from '@seamapi/webhook';
5
- export { Seam, SeamMultiWorkspace };
6
- export type { SeamMultiWorkspaceOptions, SeamOptions };
5
+ export { Seam, SeamEndpoints, SeamMultiWorkspace, SeamWithoutWorkspace };
6
+ export type { SeamMultiWorkspaceOptions, SeamOptions, SeamWithoutWorkspaceOptions, };
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { SeamHttp as Seam, SeamHttpMultiWorkspace as SeamMultiWorkspace, } from '@seamapi/http/connect';
2
- export * from '@seamapi/http/connect';
1
+ import { SeamHttp as Seam, SeamHttpEndpoints as SeamEndpoints, SeamHttpMultiWorkspace as SeamMultiWorkspace, SeamHttpWithoutWorkspace as SeamWithoutWorkspace, } from '@seamapi/http';
2
+ export * from '@seamapi/http';
3
3
  export * from '@seamapi/webhook';
4
- export { Seam, SeamMultiWorkspace };
4
+ export { Seam, SeamEndpoints, SeamMultiWorkspace, SeamWithoutWorkspace };
5
5
  //# sourceMappingURL=index.js.map
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,IAAI,IAAI,EAChB,sBAAsB,IAAI,kBAAkB,GAG7C,MAAM,uBAAuB,CAAA;AAE9B,cAAc,uBAAuB,CAAA;AAErC,cAAc,kBAAkB,CAAA;AAChC,OAAO,EAAE,IAAI,EAAE,kBAAkB,EAAE,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,IAAI,IAAI,EAChB,iBAAiB,IAAI,aAAa,EAClC,sBAAsB,IAAI,kBAAkB,EAE5C,wBAAwB,IAAI,oBAAoB,GAGjD,MAAM,eAAe,CAAA;AAEtB,cAAc,eAAe,CAAA;AAE7B,cAAc,kBAAkB,CAAA;AAChC,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "seam",
3
- "version": "1.80.0",
3
+ "version": "1.82.0",
4
4
  "description": "JavaScript SDK for the Seam API written in TypeScript.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -65,8 +65,8 @@
65
65
  "npm": ">= 9.0.0"
66
66
  },
67
67
  "dependencies": {
68
- "@seamapi/http": "1.35.1",
69
- "@seamapi/types": "1.420.2",
68
+ "@seamapi/http": "1.45.0",
69
+ "@seamapi/types": "1.441.1",
70
70
  "@seamapi/webhook": "1.1.1",
71
71
  "zod": "^3.21.4"
72
72
  },
package/src/index.ts CHANGED
@@ -1,12 +1,19 @@
1
1
  import {
2
2
  SeamHttp as Seam,
3
+ SeamHttpEndpoints as SeamEndpoints,
3
4
  SeamHttpMultiWorkspace as SeamMultiWorkspace,
4
- type SeamHttpMultiWorkspaceOptions as SeamMultiWorkspaceOptions,
5
5
  type SeamHttpOptions as SeamOptions,
6
- } from '@seamapi/http/connect'
6
+ SeamHttpWithoutWorkspace as SeamWithoutWorkspace,
7
+ type SeamHttpWithoutWorkspace as SeamWithoutWorkspaceOptions,
8
+ type SeamHttpWithoutWorkspaceOptions as SeamMultiWorkspaceOptions,
9
+ } from '@seamapi/http'
7
10
 
8
- export * from '@seamapi/http/connect'
9
- export type * from '@seamapi/types/connect'
11
+ export * from '@seamapi/http'
12
+ export type * from '@seamapi/types'
10
13
  export * from '@seamapi/webhook'
11
- export { Seam, SeamMultiWorkspace }
12
- export type { SeamMultiWorkspaceOptions, SeamOptions }
14
+ export { Seam, SeamEndpoints, SeamMultiWorkspace, SeamWithoutWorkspace }
15
+ export type {
16
+ SeamMultiWorkspaceOptions,
17
+ SeamOptions,
18
+ SeamWithoutWorkspaceOptions,
19
+ }