@seamapi/http 0.0.2 → 0.1.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.
Files changed (115) hide show
  1. package/dist/connect.cjs +1386 -61
  2. package/dist/connect.cjs.map +1 -1
  3. package/dist/connect.d.cts +420 -7
  4. package/lib/seam/connect/auth.d.ts +1 -1
  5. package/lib/seam/connect/auth.js +7 -7
  6. package/lib/seam/connect/auth.js.map +1 -1
  7. package/lib/seam/connect/axios.js +3 -1
  8. package/lib/seam/connect/axios.js.map +1 -1
  9. package/lib/seam/connect/client-options.d.ts +7 -3
  10. package/lib/seam/connect/client-options.js +18 -3
  11. package/lib/seam/connect/client-options.js.map +1 -1
  12. package/lib/seam/connect/client.d.ts +16 -4
  13. package/lib/seam/connect/client.js +55 -28
  14. package/lib/seam/connect/client.js.map +1 -1
  15. package/lib/seam/connect/parse-options.d.ts +1 -1
  16. package/lib/seam/connect/parse-options.js +8 -1
  17. package/lib/seam/connect/parse-options.js.map +1 -1
  18. package/lib/seam/connect/routes/access-codes-unmanaged.d.ts +26 -0
  19. package/lib/seam/connect/routes/access-codes-unmanaged.js +72 -0
  20. package/lib/seam/connect/routes/access-codes-unmanaged.js.map +1 -0
  21. package/lib/seam/connect/routes/access-codes.d.ts +37 -0
  22. package/lib/seam/connect/routes/access-codes.js +101 -0
  23. package/lib/seam/connect/routes/access-codes.js.map +1 -0
  24. package/lib/seam/connect/routes/acs-access-groups.d.ts +35 -0
  25. package/lib/seam/connect/routes/acs-access-groups.js +95 -0
  26. package/lib/seam/connect/routes/acs-access-groups.js.map +1 -0
  27. package/lib/seam/connect/routes/acs-credentials.d.ts +23 -0
  28. package/lib/seam/connect/routes/acs-credentials.js +66 -0
  29. package/lib/seam/connect/routes/acs-credentials.js.map +1 -0
  30. package/lib/seam/connect/routes/acs-systems.d.ts +17 -0
  31. package/lib/seam/connect/routes/acs-systems.js +51 -0
  32. package/lib/seam/connect/routes/acs-systems.js.map +1 -0
  33. package/lib/seam/connect/routes/acs-users.d.ts +32 -0
  34. package/lib/seam/connect/routes/acs-users.js +87 -0
  35. package/lib/seam/connect/routes/acs-users.js.map +1 -0
  36. package/lib/seam/connect/routes/acs.d.ts +17 -0
  37. package/lib/seam/connect/routes/acs.js +51 -0
  38. package/lib/seam/connect/routes/acs.js.map +1 -0
  39. package/lib/seam/connect/routes/action-attempts.d.ts +17 -0
  40. package/lib/seam/connect/routes/action-attempts.js +51 -0
  41. package/lib/seam/connect/routes/action-attempts.js.map +1 -0
  42. package/lib/seam/connect/routes/client-sessions.d.ts +26 -0
  43. package/lib/seam/connect/routes/client-sessions.js +74 -0
  44. package/lib/seam/connect/routes/client-sessions.js.map +1 -0
  45. package/lib/seam/connect/routes/connect-webviews.d.ts +26 -0
  46. package/lib/seam/connect/routes/connect-webviews.js +73 -0
  47. package/lib/seam/connect/routes/connect-webviews.js.map +1 -0
  48. package/lib/seam/connect/routes/connected-accounts.d.ts +20 -0
  49. package/lib/seam/connect/routes/connected-accounts.js +58 -0
  50. package/lib/seam/connect/routes/connected-accounts.js.map +1 -0
  51. package/lib/seam/connect/routes/devices-unmanaged.d.ts +20 -0
  52. package/lib/seam/connect/routes/devices-unmanaged.js +58 -0
  53. package/lib/seam/connect/routes/devices-unmanaged.js.map +1 -0
  54. package/lib/seam/connect/routes/devices.d.ts +28 -0
  55. package/lib/seam/connect/routes/devices.js +77 -0
  56. package/lib/seam/connect/routes/devices.js.map +1 -0
  57. package/lib/seam/connect/routes/events.d.ts +17 -0
  58. package/lib/seam/connect/routes/events.js +51 -0
  59. package/lib/seam/connect/routes/events.js.map +1 -0
  60. package/lib/seam/connect/routes/index.d.ts +21 -0
  61. package/lib/seam/connect/routes/index.js +22 -0
  62. package/lib/seam/connect/routes/index.js.map +1 -0
  63. package/lib/seam/connect/routes/locks.d.ts +23 -0
  64. package/lib/seam/connect/routes/locks.js +67 -0
  65. package/lib/seam/connect/routes/locks.js.map +1 -0
  66. package/lib/seam/connect/routes/noise-sensors-noise-thresholds.d.ts +26 -0
  67. package/lib/seam/connect/routes/noise-sensors-noise-thresholds.js +72 -0
  68. package/lib/seam/connect/routes/noise-sensors-noise-thresholds.js.map +1 -0
  69. package/lib/seam/connect/routes/noise-sensors.d.ts +11 -0
  70. package/lib/seam/connect/routes/noise-sensors.js +39 -0
  71. package/lib/seam/connect/routes/noise-sensors.js.map +1 -0
  72. package/lib/seam/connect/routes/thermostats-climate-setting-schedules.d.ts +26 -0
  73. package/lib/seam/connect/routes/thermostats-climate-setting-schedules.js +73 -0
  74. package/lib/seam/connect/routes/thermostats-climate-setting-schedules.js.map +1 -0
  75. package/lib/seam/connect/routes/thermostats.d.ts +37 -0
  76. package/lib/seam/connect/routes/thermostats.js +97 -0
  77. package/lib/seam/connect/routes/thermostats.js.map +1 -0
  78. package/lib/seam/connect/routes/webhooks.d.ts +23 -0
  79. package/lib/seam/connect/routes/webhooks.js +66 -0
  80. package/lib/seam/connect/routes/webhooks.js.map +1 -0
  81. package/lib/seam/connect/routes/workspaces.d.ts +14 -5
  82. package/lib/seam/connect/routes/workspaces.js +48 -10
  83. package/lib/seam/connect/routes/workspaces.js.map +1 -1
  84. package/package.json +4 -1
  85. package/src/lib/seam/connect/auth.ts +7 -7
  86. package/src/lib/seam/connect/axios.ts +2 -0
  87. package/src/lib/seam/connect/client-options.ts +32 -4
  88. package/src/lib/seam/connect/client.ts +88 -15
  89. package/src/lib/seam/connect/parse-options.ts +16 -2
  90. package/src/lib/seam/connect/routes/access-codes-unmanaged.ts +157 -0
  91. package/src/lib/seam/connect/routes/access-codes.ts +226 -0
  92. package/src/lib/seam/connect/routes/acs-access-groups.ts +207 -0
  93. package/src/lib/seam/connect/routes/acs-credentials.ts +139 -0
  94. package/src/lib/seam/connect/routes/acs-systems.ts +108 -0
  95. package/src/lib/seam/connect/routes/acs-users.ts +187 -0
  96. package/src/lib/seam/connect/routes/acs.ts +85 -0
  97. package/src/lib/seam/connect/routes/action-attempts.ts +104 -0
  98. package/src/lib/seam/connect/routes/client-sessions.ts +159 -0
  99. package/src/lib/seam/connect/routes/connect-webviews.ts +159 -0
  100. package/src/lib/seam/connect/routes/connected-accounts.ts +124 -0
  101. package/src/lib/seam/connect/routes/devices-unmanaged.ts +120 -0
  102. package/src/lib/seam/connect/routes/devices.ts +158 -0
  103. package/src/lib/seam/connect/routes/events.ts +100 -0
  104. package/src/lib/seam/connect/routes/index.ts +21 -0
  105. package/src/lib/seam/connect/routes/locks.ts +138 -0
  106. package/src/lib/seam/connect/routes/noise-sensors-noise-thresholds.ts +154 -0
  107. package/src/lib/seam/connect/routes/noise-sensors.ts +70 -0
  108. package/src/lib/seam/connect/routes/thermostats-climate-setting-schedules.ts +176 -0
  109. package/src/lib/seam/connect/routes/thermostats.ts +206 -0
  110. package/src/lib/seam/connect/routes/webhooks.ts +141 -0
  111. package/src/lib/seam/connect/routes/workspaces.ts +100 -17
  112. package/lib/seam/connect/legacy/workspaces.d.ts +0 -8
  113. package/lib/seam/connect/legacy/workspaces.js +0 -10
  114. package/lib/seam/connect/legacy/workspaces.js.map +0 -1
  115. package/src/lib/seam/connect/legacy/workspaces.ts +0 -26
@@ -1 +1 @@
1
- {"version":3,"file":"client-options.js","sourceRoot":"","sources":["../../../src/lib/seam/connect/client-options.ts"],"names":[],"mappings":"AAgBA,MAAM,CAAC,MAAM,2BAA2B,GAAG,CACzC,OAAwB,EACc,EAAE;IACxC,IAAI,CAAC,CAAC,QAAQ,IAAI,OAAO,CAAC;QAAE,OAAO,KAAK,CAAA;IAExC,IAAI,oBAAoB,IAAI,OAAO,IAAI,OAAO,CAAC,kBAAkB,IAAI,IAAI,EAAE;QACzE,MAAM,IAAI,2BAA2B,CACnC,sEAAsE,CACvE,CAAA;KACF;IAED,OAAO,IAAI,CAAA;AACb,CAAC,CAAA;AAOD,MAAM,CAAC,MAAM,uCAAuC,GAAG,CACrD,OAAwB,EAC0B,EAAE;IACpD,IAAI,CAAC,CAAC,oBAAoB,IAAI,OAAO,CAAC;QAAE,OAAO,KAAK,CAAA;IAEpD,IAAI,QAAQ,IAAI,OAAO,IAAI,OAAO,CAAC,MAAM,IAAI,IAAI,EAAE;QACjD,MAAM,IAAI,2BAA2B,CACnC,sEAAsE,CACvE,CAAA;KACF;IAED,OAAO,IAAI,CAAA;AACb,CAAC,CAAA;AAED,MAAM,OAAO,2BAA4B,SAAQ,KAAK;IACpD,YAAY,OAAe;QACzB,KAAK,CAAC,sCAAsC,OAAO,EAAE,CAAC,CAAA;QACtD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAA;QACjC,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,CAAA;IACjD,CAAC;CACF;AAED,kFAAkF;AAClF,mFAAmF;AACnF,wBAAwB;AACxB,mBAAmB;AACnB,IAAI"}
1
+ {"version":3,"file":"client-options.js","sourceRoot":"","sources":["../../../src/lib/seam/connect/client-options.ts"],"names":[],"mappings":"AAkBA,MAAM,CAAC,MAAM,2BAA2B,GAAG,CACzC,OAAwB,EACc,EAAE;IACxC,IAAI,CAAC,CAAC,QAAQ,IAAI,OAAO,CAAC;QAAE,OAAO,KAAK,CAAA;IACxC,IAAI,OAAO,CAAC,MAAM,IAAI,IAAI;QAAE,OAAO,KAAK,CAAA;IAExC,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,MAAM,CACtC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE,4BAA4B,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAC7D,CAAA;IACD,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE;QACnB,MAAM,IAAI,2BAA2B,CACnC,2GAA2G,IAAI,CAAC,IAAI,CAClH,IAAI,CACL,EAAE,CACJ,CAAA;KACF;IAED,OAAO,IAAI,CAAA;AACb,CAAC,CAAA;AAMD,MAAM,CAAC,MAAM,2BAA2B,GAAG,CACzC,OAAwB,EACc,EAAE;IACxC,IAAI,CAAC,CAAC,QAAQ,IAAI,OAAO,CAAC;QAAE,OAAO,KAAK,CAAA;IACxC,IAAI,OAAO,CAAC,MAAM,IAAI,IAAI;QAAE,OAAO,KAAK,CAAA;IAExC,IAAI,oBAAoB,IAAI,OAAO,IAAI,OAAO,CAAC,kBAAkB,IAAI,IAAI,EAAE;QACzE,MAAM,IAAI,2BAA2B,CACnC,sEAAsE,CACvE,CAAA;KACF;IAED,OAAO,IAAI,CAAA;AACb,CAAC,CAAA;AAOD,MAAM,CAAC,MAAM,uCAAuC,GAAG,CACrD,OAAwB,EAC0B,EAAE;IACpD,IAAI,CAAC,CAAC,oBAAoB,IAAI,OAAO,CAAC;QAAE,OAAO,KAAK,CAAA;IACpD,IAAI,OAAO,CAAC,kBAAkB,IAAI,IAAI;QAAE,OAAO,KAAK,CAAA;IAEpD,IAAI,QAAQ,IAAI,OAAO,IAAI,OAAO,CAAC,MAAM,IAAI,IAAI,EAAE;QACjD,MAAM,IAAI,2BAA2B,CACnC,sEAAsE,CACvE,CAAA;KACF;IAED,OAAO,IAAI,CAAA;AACb,CAAC,CAAA;AAED,MAAM,OAAO,2BAA4B,SAAQ,KAAK;IACpD,YAAY,OAAe;QACzB,KAAK,CAAC,sCAAsC,OAAO,EAAE,CAAC,CAAA;QACtD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAA;QACjC,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,CAAA;IACjD,CAAC;CACF;AAED,kFAAkF;AAClF,mFAAmF;AACnF,wBAAwB;AACxB,mBAAmB;AACnB,IAAI"}
@@ -1,11 +1,23 @@
1
1
  import type { Axios } from 'axios';
2
- import { type SeamHttpOptions, type SeamHttpOptionsWithApiKey, type SeamHttpOptionsWithClientSessionToken } from './client-options.js';
3
- import { WorkspacesHttp } from './routes/workspaces.js';
2
+ import { type SeamHttpOptions, type SeamHttpOptionsWithApiKey, type SeamHttpOptionsWithClient, type SeamHttpOptionsWithClientSessionToken } from './client-options.js';
3
+ import { SeamHttpAccessCodes, SeamHttpAcs, SeamHttpActionAttempts, SeamHttpClientSessions, SeamHttpConnectedAccounts, SeamHttpConnectWebviews, SeamHttpDevices, SeamHttpEvents, SeamHttpLocks, SeamHttpNoiseSensors, SeamHttpThermostats, SeamHttpWebhooks, SeamHttpWorkspaces } from './routes/index.js';
4
4
  export declare class SeamHttp {
5
- #private;
6
5
  client: Axios;
7
6
  constructor(apiKeyOrOptions: string | SeamHttpOptions);
7
+ static fromClient(client: SeamHttpOptionsWithClient['client'], options?: Omit<SeamHttpOptionsWithClient, 'client'>): SeamHttp;
8
8
  static fromApiKey(apiKey: SeamHttpOptionsWithApiKey['apiKey'], options?: Omit<SeamHttpOptionsWithApiKey, 'apiKey'>): SeamHttp;
9
9
  static fromClientSessionToken(clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options?: Omit<SeamHttpOptionsWithClientSessionToken, 'clientSessionToken'>): SeamHttp;
10
- get workspaces(): WorkspacesHttp;
10
+ get accessCodes(): SeamHttpAccessCodes;
11
+ get acs(): SeamHttpAcs;
12
+ get actionAttempts(): SeamHttpActionAttempts;
13
+ get clientSessions(): SeamHttpClientSessions;
14
+ get connectedAccounts(): SeamHttpConnectedAccounts;
15
+ get connectWebviews(): SeamHttpConnectWebviews;
16
+ get devices(): SeamHttpDevices;
17
+ get events(): SeamHttpEvents;
18
+ get locks(): SeamHttpLocks;
19
+ get noiseSensors(): SeamHttpNoiseSensors;
20
+ get thermostats(): SeamHttpThermostats;
21
+ get webhooks(): SeamHttpWebhooks;
22
+ get workspaces(): SeamHttpWorkspaces;
11
23
  }
@@ -1,51 +1,78 @@
1
- var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
2
- if (kind === "m") throw new TypeError("Private method is not writable");
3
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
4
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
5
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
6
- };
7
- var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
8
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
9
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
10
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
11
- };
12
- var _SeamHttp_legacy;
13
1
  import { createAxiosClient } from './axios.js';
14
- import { InvalidSeamHttpOptionsError, isSeamHttpOptionsWithApiKey, isSeamHttpOptionsWithClientSessionToken, } from './client-options.js';
15
- import { LegacyWorkspacesHttp } from './legacy/workspaces.js';
2
+ import { isSeamHttpOptionsWithApiKey, isSeamHttpOptionsWithClient, isSeamHttpOptionsWithClientSessionToken, SeamHttpInvalidOptionsError, } from './client-options.js';
16
3
  import { parseOptions } from './parse-options.js';
17
- import { WorkspacesHttp } from './routes/workspaces.js';
4
+ import { SeamHttpAccessCodes, SeamHttpAcs, SeamHttpActionAttempts, SeamHttpClientSessions, SeamHttpConnectedAccounts, SeamHttpConnectWebviews, SeamHttpDevices, SeamHttpEvents, SeamHttpLocks, SeamHttpNoiseSensors, SeamHttpThermostats, SeamHttpWebhooks, SeamHttpWorkspaces, } from './routes/index.js';
18
5
  export class SeamHttp {
6
+ // #legacy: boolean
19
7
  constructor(apiKeyOrOptions) {
20
- _SeamHttp_legacy.set(this, void 0);
21
8
  const options = parseOptions(apiKeyOrOptions);
22
- __classPrivateFieldSet(this, _SeamHttp_legacy, options.enableLegacyMethodBehaivor, "f");
9
+ // this.#legacy = options.enableLegacyMethodBehaivor
23
10
  this.client = createAxiosClient(options);
24
11
  }
12
+ static fromClient(client, options = {}) {
13
+ const opts = { ...options, client };
14
+ if (!isSeamHttpOptionsWithClient(opts)) {
15
+ throw new SeamHttpInvalidOptionsError('Missing client');
16
+ }
17
+ return new SeamHttp(opts);
18
+ }
25
19
  static fromApiKey(apiKey, options = {}) {
26
20
  const opts = { ...options, apiKey };
27
21
  if (!isSeamHttpOptionsWithApiKey(opts)) {
28
- throw new InvalidSeamHttpOptionsError('Missing apiKey');
22
+ throw new SeamHttpInvalidOptionsError('Missing apiKey');
29
23
  }
30
24
  return new SeamHttp(opts);
31
25
  }
32
26
  static fromClientSessionToken(clientSessionToken, options = {}) {
33
27
  const opts = { ...options, clientSessionToken };
34
28
  if (!isSeamHttpOptionsWithClientSessionToken(opts)) {
35
- throw new InvalidSeamHttpOptionsError('Missing clientSessionToken');
29
+ throw new SeamHttpInvalidOptionsError('Missing clientSessionToken');
36
30
  }
37
31
  return new SeamHttp(opts);
38
32
  }
39
- // TODO
40
- // static fromPublishableKey and deprecate getClientSessionToken
41
- // TODO: Should we keep makeRequest?
42
- // Better to implement error handling and wrapping in an error handler.
43
- // makeRequest
33
+ get accessCodes() {
34
+ return SeamHttpAccessCodes.fromClient(this.client);
35
+ }
36
+ get acs() {
37
+ return SeamHttpAcs.fromClient(this.client);
38
+ }
39
+ get actionAttempts() {
40
+ return SeamHttpActionAttempts.fromClient(this.client);
41
+ }
42
+ get clientSessions() {
43
+ return SeamHttpClientSessions.fromClient(this.client);
44
+ }
45
+ get connectedAccounts() {
46
+ return SeamHttpConnectedAccounts.fromClient(this.client);
47
+ }
48
+ get connectWebviews() {
49
+ return SeamHttpConnectWebviews.fromClient(this.client);
50
+ }
51
+ get devices() {
52
+ return SeamHttpDevices.fromClient(this.client);
53
+ }
54
+ get events() {
55
+ return SeamHttpEvents.fromClient(this.client);
56
+ }
57
+ get locks() {
58
+ return SeamHttpLocks.fromClient(this.client);
59
+ }
60
+ get noiseSensors() {
61
+ return SeamHttpNoiseSensors.fromClient(this.client);
62
+ }
63
+ get thermostats() {
64
+ return SeamHttpThermostats.fromClient(this.client);
65
+ }
66
+ get webhooks() {
67
+ return SeamHttpWebhooks.fromClient(this.client);
68
+ }
44
69
  get workspaces() {
45
- if (__classPrivateFieldGet(this, _SeamHttp_legacy, "f"))
46
- return new LegacyWorkspacesHttp(this.client);
47
- return new WorkspacesHttp(this.client);
70
+ return SeamHttpWorkspaces.fromClient(this.client);
48
71
  }
49
72
  }
50
- _SeamHttp_legacy = new WeakMap();
73
+ // TODO
74
+ // static fromPublishableKey and deprecate getClientSessionToken
75
+ // TODO: Should we keep makeRequest?
76
+ // Better to implement error handling and wrapping in an error handler.
77
+ // makeRequest
51
78
  //# sourceMappingURL=client.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/lib/seam/connect/client.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAC9C,OAAO,EACL,2BAA2B,EAC3B,2BAA2B,EAC3B,uCAAuC,GAIxC,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAEvD,MAAM,OAAO,QAAQ;IAKnB,YAAY,eAAyC;QAFrD,mCAAgB;QAGd,MAAM,OAAO,GAAG,YAAY,CAAC,eAAe,CAAC,CAAA;QAC7C,uBAAA,IAAI,oBAAW,OAAO,CAAC,0BAA0B,MAAA,CAAA;QACjD,IAAI,CAAC,MAAM,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAA;IAC1C,CAAC;IAED,MAAM,CAAC,UAAU,CACf,MAA2C,EAC3C,UAAqD,EAAE;QAEvD,MAAM,IAAI,GAAG,EAAE,GAAG,OAAO,EAAE,MAAM,EAAE,CAAA;QACnC,IAAI,CAAC,2BAA2B,CAAC,IAAI,CAAC,EAAE;YACtC,MAAM,IAAI,2BAA2B,C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B,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IACvD,CAAC;IAED,IAAI,cAAc;QAChB,OAAO,sBAAsB,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IACvD,CAAC;IAED,IAAI,iBAAiB;QACnB,OAAO,yBAAyB,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IAC1D,CAAC;IAED,IAAI,eAAe;QACjB,OAAO,uBAAuB,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IACxD,CAAC;IAED,IAAI,OAAO;QACT,OAAO,eAAe,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IAChD,CAAC;IAED,IAAI,MAAM;QACR,OAAO,cAAc,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IAC/C,CAAC;IAED,IAAI,KAAK;QACP,OAAO,aAAa,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IAC9C,CAAC;IAED,IAAI,YAAY;QACd,OAAO,oBAAoB,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IACrD,CAAC;IAED,IAAI,WAAW;QACb,OAAO,mBAAmB,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IACpD,CAAC;IAED,IAAI,QAAQ;QACV,OAAO,gBAAgB,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IACjD,CAAC;IAED,IAAI,UAAU;QACZ,OAAO,kBAAkB,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IACnD,CAAC;CACF;AAED,OAAO;AACP,gEAAgE;AAEhE,oCAAoC;AACpC,uEAAuE;AACvE,cAAc"}
@@ -1,2 +1,2 @@
1
- import type { SeamHttpOptions } from './client-options.js';
1
+ import { type SeamHttpOptions } from './client-options.js';
2
2
  export declare const parseOptions: (apiKeyOrOptions: string | SeamHttpOptions) => Required<SeamHttpOptions>;
@@ -1,7 +1,14 @@
1
+ import { isSeamHttpOptionsWithClient, } from './client-options.js';
2
+ const enableLegacyMethodBehaivorDefault = true;
1
3
  export const parseOptions = (apiKeyOrOptions) => {
2
4
  const options = typeof apiKeyOrOptions === 'string'
3
5
  ? { apiKey: apiKeyOrOptions }
4
6
  : apiKeyOrOptions;
7
+ if (isSeamHttpOptionsWithClient(options))
8
+ return {
9
+ ...options,
10
+ enableLegacyMethodBehaivor: options.enableLegacyMethodBehaivor ?? enableLegacyMethodBehaivorDefault,
11
+ };
5
12
  const endpoint = options.endpoint ??
6
13
  globalThis.process?.env?.['SEAM_ENDPOINT'] ??
7
14
  globalThis.process?.env?.['SEAM_API_URL'] ??
@@ -14,7 +21,7 @@ export const parseOptions = (apiKeyOrOptions) => {
14
21
  ...(apiKey != null ? { apiKey } : {}),
15
22
  endpoint,
16
23
  axiosOptions: options.axiosOptions ?? {},
17
- enableLegacyMethodBehaivor: false,
24
+ enableLegacyMethodBehaivor: options.enableLegacyMethodBehaivor ?? enableLegacyMethodBehaivorDefault,
18
25
  };
19
26
  };
20
27
  //# sourceMappingURL=parse-options.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"parse-options.js","sourceRoot":"","sources":["../../../src/lib/seam/connect/parse-options.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,YAAY,GAAG,CAC1B,eAAyC,EACd,EAAE;IAC7B,MAAM,OAAO,GACX,OAAO,eAAe,KAAK,QAAQ;QACjC,CAAC,CAAC,EAAE,MAAM,EAAE,eAAe,EAAE;QAC7B,CAAC,CAAC,eAAe,CAAA;IAErB,MAAM,QAAQ,GACZ,OAAO,CAAC,QAAQ;QAChB,UAAU,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,eAAe,CAAC;QAC1C,UAAU,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,cAAc,CAAC;QACzC,6BAA6B,CAAA;IAE/B,MAAM,MAAM,GACV,QAAQ,IAAI,OAAO;Q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AAO;QACV,GAAG,CAAC,MAAM,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACrC,QAAQ;QACR,YAAY,EAAE,OAAO,CAAC,YAAY,IAAI,EAAE;QACxC,0BAA0B,EACxB,OAAO,CAAC,0BAA0B,IAAI,iCAAiC;KAC1E,CAAA;AACH,CAAC,CAAA"}
@@ -0,0 +1,26 @@
1
+ import type { RouteRequestBody, RouteResponse } from '@seamapi/types/connect';
2
+ import type { Axios } from 'axios';
3
+ import type { SetNonNullable } from 'type-fest';
4
+ import { type SeamHttpOptions, type SeamHttpOptionsWithApiKey, type SeamHttpOptionsWithClient, type SeamHttpOptionsWithClientSessionToken } from '../../../../lib/seam/connect/client-options.js';
5
+ export declare class SeamHttpAccessCodesUnmanaged {
6
+ client: Axios;
7
+ constructor(apiKeyOrOptions: string | SeamHttpOptions);
8
+ static fromClient(client: SeamHttpOptionsWithClient['client'], options?: Omit<SeamHttpOptionsWithClient, 'client'>): SeamHttpAccessCodesUnmanaged;
9
+ static fromApiKey(apiKey: SeamHttpOptionsWithApiKey['apiKey'], options?: Omit<SeamHttpOptionsWithApiKey, 'apiKey'>): SeamHttpAccessCodesUnmanaged;
10
+ static fromClientSessionToken(clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options?: Omit<SeamHttpOptionsWithClientSessionToken, 'clientSessionToken'>): SeamHttpAccessCodesUnmanaged;
11
+ convertToManaged(body: AccessCodesUnmanagedConvertToManagedBody): Promise<void>;
12
+ delete(body: AccessCodesUnmanagedDeleteBody): Promise<void>;
13
+ get(body: AccessCodesUnmanagedGetBody): Promise<AccessCodesUnmanagedGetResponse['access_code']>;
14
+ list(body: AccessCodesUnmanagedListBody): Promise<AccessCodesUnmanagedListResponse['access_codes']>;
15
+ update(body: AccessCodesUnmanagedUpdateBody): Promise<void>;
16
+ }
17
+ export type AccessCodesUnmanagedConvertToManagedBody = SetNonNullable<Required<RouteRequestBody<'/access_codes/unmanaged/convert_to_managed'>>>;
18
+ export type AccessCodesUnmanagedConvertToManagedResponse = SetNonNullable<Required<RouteResponse<'/access_codes/unmanaged/convert_to_managed'>>>;
19
+ export type AccessCodesUnmanagedDeleteBody = SetNonNullable<Required<RouteRequestBody<'/access_codes/unmanaged/delete'>>>;
20
+ export type AccessCodesUnmanagedDeleteResponse = SetNonNullable<Required<RouteResponse<'/access_codes/unmanaged/delete'>>>;
21
+ export type AccessCodesUnmanagedGetBody = SetNonNullable<Required<RouteRequestBody<'/access_codes/unmanaged/get'>>>;
22
+ export type AccessCodesUnmanagedGetResponse = SetNonNullable<Required<RouteResponse<'/access_codes/unmanaged/get'>>>;
23
+ export type AccessCodesUnmanagedListBody = SetNonNullable<Required<RouteRequestBody<'/access_codes/unmanaged/list'>>>;
24
+ export type AccessCodesUnmanagedListResponse = SetNonNullable<Required<RouteResponse<'/access_codes/unmanaged/list'>>>;
25
+ export type AccessCodesUnmanagedUpdateBody = SetNonNullable<Required<RouteRequestBody<'/access_codes/unmanaged/update'>>>;
26
+ export type AccessCodesUnmanagedUpdateResponse = SetNonNullable<Required<RouteResponse<'/access_codes/unmanaged/update'>>>;
@@ -0,0 +1,72 @@
1
+ /*
2
+ * Automatically generated by generate-routes.ts.
3
+ * Do not edit this file or add other files to this directory.
4
+ */
5
+ import { createAxiosClient } from '../../../../lib/seam/connect/axios.js';
6
+ import { isSeamHttpOptionsWithApiKey, isSeamHttpOptionsWithClient, isSeamHttpOptionsWithClientSessionToken, SeamHttpInvalidOptionsError, } from '../../../../lib/seam/connect/client-options.js';
7
+ import { parseOptions } from '../../../../lib/seam/connect/parse-options.js';
8
+ export class SeamHttpAccessCodesUnmanaged {
9
+ constructor(apiKeyOrOptions) {
10
+ const options = parseOptions(apiKeyOrOptions);
11
+ this.client = createAxiosClient(options);
12
+ }
13
+ static fromClient(client, options = {}) {
14
+ const opts = { ...options, client };
15
+ if (!isSeamHttpOptionsWithClient(opts)) {
16
+ throw new SeamHttpInvalidOptionsError('Missing client');
17
+ }
18
+ return new SeamHttpAccessCodesUnmanaged(opts);
19
+ }
20
+ static fromApiKey(apiKey, options = {}) {
21
+ const opts = { ...options, apiKey };
22
+ if (!isSeamHttpOptionsWithApiKey(opts)) {
23
+ throw new SeamHttpInvalidOptionsError('Missing apiKey');
24
+ }
25
+ return new SeamHttpAccessCodesUnmanaged(opts);
26
+ }
27
+ static fromClientSessionToken(clientSessionToken, options = {}) {
28
+ const opts = { ...options, clientSessionToken };
29
+ if (!isSeamHttpOptionsWithClientSessionToken(opts)) {
30
+ throw new SeamHttpInvalidOptionsError('Missing clientSessionToken');
31
+ }
32
+ return new SeamHttpAccessCodesUnmanaged(opts);
33
+ }
34
+ async convertToManaged(body) {
35
+ await this.client.request({
36
+ url: '/access_codes/unmanaged/convert_to_managed',
37
+ method: 'post',
38
+ data: body,
39
+ });
40
+ }
41
+ async delete(body) {
42
+ await this.client.request({
43
+ url: '/access_codes/unmanaged/delete',
44
+ method: 'post',
45
+ data: body,
46
+ });
47
+ }
48
+ async get(body) {
49
+ const { data } = await this.client.request({
50
+ url: '/access_codes/unmanaged/get',
51
+ method: 'post',
52
+ data: body,
53
+ });
54
+ return data.access_code;
55
+ }
56
+ async list(body) {
57
+ const { data } = await this.client.request({
58
+ url: '/access_codes/unmanaged/list',
59
+ method: 'post',
60
+ data: body,
61
+ });
62
+ return data.access_codes;
63
+ }
64
+ async update(body) {
65
+ await this.client.request({
66
+ url: '/access_codes/unmanaged/update',
67
+ method: 'post',
68
+ data: body,
69
+ });
70
+ }
71
+ }
72
+ //# sourceMappingURL=access-codes-unmanaged.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"access-codes-unmanaged.js","sourceRoot":"","sources":["../../../../src/lib/seam/connect/routes/access-codes-unmanaged.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,EACL,2BAA2B,EAC3B,2BA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AAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAA+C;YACtE,GAAG,EAAE,4CAA4C;YACjD,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI;SACX,CAAC,CAAA;IACJ,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,IAAoC;QAC/C,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAqC;YAC5D,GAAG,EAAE,gCAAgC;YACrC,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI;SACX,CAAC,CAAA;IACJ,CAAC;IAED,KAAK,CAAC,GAAG,CACP,IAAiC;QAEjC,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CACxC;YACE,GAAG,EAAE,6BAA6B;YAClC,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI;SACX,CACF,CAAA;QACD,OAAO,IAAI,CAAC,WAAW,CAAA;IACzB,CAAC;IAED,KAAK,CAAC,IAAI,CACR,IAAkC;QAElC,MAAM,EAAE,IAAI,EAAE,GACZ,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAmC;YAC1D,GAAG,EAAE,8BAA8B;YACnC,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI;SACX,CAAC,CAAA;QACJ,OAAO,IAAI,CAAC,YAAY,CAAA;IAC1B,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,IAAoC;QAC/C,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAqC;YAC5D,GAAG,EAAE,gCAAgC;YACrC,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI;SACX,CAAC,CAAA;IACJ,CAAC;CACF"}
@@ -0,0 +1,37 @@
1
+ import type { RouteRequestBody, RouteRequestParams, RouteResponse } from '@seamapi/types/connect';
2
+ import type { Axios } from 'axios';
3
+ import type { SetNonNullable } from 'type-fest';
4
+ import { type SeamHttpOptions, type SeamHttpOptionsWithApiKey, type SeamHttpOptionsWithClient, type SeamHttpOptionsWithClientSessionToken } from '../../../../lib/seam/connect/client-options.js';
5
+ import { SeamHttpAccessCodesUnmanaged } from './access-codes-unmanaged.js';
6
+ export declare class SeamHttpAccessCodes {
7
+ client: Axios;
8
+ constructor(apiKeyOrOptions: string | SeamHttpOptions);
9
+ static fromClient(client: SeamHttpOptionsWithClient['client'], options?: Omit<SeamHttpOptionsWithClient, 'client'>): SeamHttpAccessCodes;
10
+ static fromApiKey(apiKey: SeamHttpOptionsWithApiKey['apiKey'], options?: Omit<SeamHttpOptionsWithApiKey, 'apiKey'>): SeamHttpAccessCodes;
11
+ static fromClientSessionToken(clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options?: Omit<SeamHttpOptionsWithClientSessionToken, 'clientSessionToken'>): SeamHttpAccessCodes;
12
+ get unmanaged(): SeamHttpAccessCodesUnmanaged;
13
+ create(body: AccessCodesCreateBody): Promise<AccessCodesCreateResponse['access_code']>;
14
+ createMultiple(body: AccessCodesCreateMultipleBody): Promise<AccessCodesCreateMultipleResponse['access_codes']>;
15
+ delete(body: AccessCodesDeleteBody): Promise<void>;
16
+ generateCode(params?: AccessCodesGenerateCodeParams): Promise<AccessCodesGenerateCodeResponse['generated_code']>;
17
+ get(body: AccessCodesGetBody): Promise<AccessCodesGetResponse['access_code']>;
18
+ list(body: AccessCodesListBody): Promise<AccessCodesListResponse['access_codes']>;
19
+ pullBackupAccessCode(body: AccessCodesPullBackupAccessCodeBody): Promise<AccessCodesPullBackupAccessCodeResponse['backup_access_code']>;
20
+ update(body: AccessCodesUpdateBody): Promise<void>;
21
+ }
22
+ export type AccessCodesCreateBody = SetNonNullable<Required<RouteRequestBody<'/access_codes/create'>>>;
23
+ export type AccessCodesCreateResponse = SetNonNullable<Required<RouteResponse<'/access_codes/create'>>>;
24
+ export type AccessCodesCreateMultipleBody = SetNonNullable<Required<RouteRequestBody<'/access_codes/create_multiple'>>>;
25
+ export type AccessCodesCreateMultipleResponse = SetNonNullable<Required<RouteResponse<'/access_codes/create_multiple'>>>;
26
+ export type AccessCodesDeleteBody = SetNonNullable<Required<RouteRequestBody<'/access_codes/delete'>>>;
27
+ export type AccessCodesDeleteResponse = SetNonNullable<Required<RouteResponse<'/access_codes/delete'>>>;
28
+ export type AccessCodesGenerateCodeParams = SetNonNullable<Required<RouteRequestParams<'/access_codes/generate_code'>>>;
29
+ export type AccessCodesGenerateCodeResponse = SetNonNullable<Required<RouteResponse<'/access_codes/generate_code'>>>;
30
+ export type AccessCodesGetBody = SetNonNullable<Required<RouteRequestBody<'/access_codes/get'>>>;
31
+ export type AccessCodesGetResponse = SetNonNullable<Required<RouteResponse<'/access_codes/get'>>>;
32
+ export type AccessCodesListBody = SetNonNullable<Required<RouteRequestBody<'/access_codes/list'>>>;
33
+ export type AccessCodesListResponse = SetNonNullable<Required<RouteResponse<'/access_codes/list'>>>;
34
+ export type AccessCodesPullBackupAccessCodeBody = SetNonNullable<Required<RouteRequestBody<'/access_codes/pull_backup_access_code'>>>;
35
+ export type AccessCodesPullBackupAccessCodeResponse = SetNonNullable<Required<RouteResponse<'/access_codes/pull_backup_access_code'>>>;
36
+ export type AccessCodesUpdateBody = SetNonNullable<Required<RouteRequestBody<'/access_codes/update'>>>;
37
+ export type AccessCodesUpdateResponse = SetNonNullable<Required<RouteResponse<'/access_codes/update'>>>;
@@ -0,0 +1,101 @@
1
+ /*
2
+ * Automatically generated by generate-routes.ts.
3
+ * Do not edit this file or add other files to this directory.
4
+ */
5
+ import { createAxiosClient } from '../../../../lib/seam/connect/axios.js';
6
+ import { isSeamHttpOptionsWithApiKey, isSeamHttpOptionsWithClient, isSeamHttpOptionsWithClientSessionToken, SeamHttpInvalidOptionsError, } from '../../../../lib/seam/connect/client-options.js';
7
+ import { parseOptions } from '../../../../lib/seam/connect/parse-options.js';
8
+ import { SeamHttpAccessCodesUnmanaged } from './access-codes-unmanaged.js';
9
+ export class SeamHttpAccessCodes {
10
+ constructor(apiKeyOrOptions) {
11
+ const options = parseOptions(apiKeyOrOptions);
12
+ this.client = createAxiosClient(options);
13
+ }
14
+ static fromClient(client, options = {}) {
15
+ const opts = { ...options, client };
16
+ if (!isSeamHttpOptionsWithClient(opts)) {
17
+ throw new SeamHttpInvalidOptionsError('Missing client');
18
+ }
19
+ return new SeamHttpAccessCodes(opts);
20
+ }
21
+ static fromApiKey(apiKey, options = {}) {
22
+ const opts = { ...options, apiKey };
23
+ if (!isSeamHttpOptionsWithApiKey(opts)) {
24
+ throw new SeamHttpInvalidOptionsError('Missing apiKey');
25
+ }
26
+ return new SeamHttpAccessCodes(opts);
27
+ }
28
+ static fromClientSessionToken(clientSessionToken, options = {}) {
29
+ const opts = { ...options, clientSessionToken };
30
+ if (!isSeamHttpOptionsWithClientSessionToken(opts)) {
31
+ throw new SeamHttpInvalidOptionsError('Missing clientSessionToken');
32
+ }
33
+ return new SeamHttpAccessCodes(opts);
34
+ }
35
+ get unmanaged() {
36
+ return SeamHttpAccessCodesUnmanaged.fromClient(this.client);
37
+ }
38
+ async create(body) {
39
+ const { data } = await this.client.request({
40
+ url: '/access_codes/create',
41
+ method: 'post',
42
+ data: body,
43
+ });
44
+ return data.access_code;
45
+ }
46
+ async createMultiple(body) {
47
+ const { data } = await this.client.request({
48
+ url: '/access_codes/create_multiple',
49
+ method: 'post',
50
+ data: body,
51
+ });
52
+ return data.access_codes;
53
+ }
54
+ async delete(body) {
55
+ await this.client.request({
56
+ url: '/access_codes/delete',
57
+ method: 'post',
58
+ data: body,
59
+ });
60
+ }
61
+ async generateCode(params) {
62
+ const { data } = await this.client.request({
63
+ url: '/access_codes/generate_code',
64
+ method: 'get',
65
+ params,
66
+ });
67
+ return data.generated_code;
68
+ }
69
+ async get(body) {
70
+ const { data } = await this.client.request({
71
+ url: '/access_codes/get',
72
+ method: 'post',
73
+ data: body,
74
+ });
75
+ return data.access_code;
76
+ }
77
+ async list(body) {
78
+ const { data } = await this.client.request({
79
+ url: '/access_codes/list',
80
+ method: 'post',
81
+ data: body,
82
+ });
83
+ return data.access_codes;
84
+ }
85
+ async pullBackupAccessCode(body) {
86
+ const { data } = await this.client.request({
87
+ url: '/access_codes/pull_backup_access_code',
88
+ method: 'post',
89
+ data: body,
90
+ });
91
+ return data.backup_access_code;
92
+ }
93
+ async update(body) {
94
+ await this.client.request({
95
+ url: '/access_codes/update',
96
+ method: 'post',
97
+ data: body,
98
+ });
99
+ }
100
+ }
101
+ //# sourceMappingURL=access-codes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"access-codes.js","sourceRoot":"","sources":["../../../../src/lib/seam/connect/routes/access-codes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAUH,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,EACL,2BAA2B,EAC3B,2BAA2B,EAC3B,uCAAuC,EACvC,2BAA2B,GAK5B,MAAM,oCAAoC,CAAA;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAA;AAEhE,OAAO,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAA;AAE1E,MAAM,OAAO,mBAAmB;IAG9B,YAAY,eAAyC;QACnD,MAAM,OAAO,GAAG,YAAY,CAAC,eAAe,CAAC,CAAA;QAC7C,IAAI,CAAC,MAAM,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAA;IAC1C,CAAC;IAED,MAAM,CAAC,UAAU,CACf,MAA2C,EAC3C,UAAqD,EAAE;QAEvD,MAAM,IAAI,GAAG,EAAE,GAAG,OAAO,EAAE,MAAM,EAAE,CAAA;QACnC,IAAI,CAAC,2BAA2B,CAAC,IAAI,CAAC,EAAE;YACtC,MAAM,IAAI,2BAA2B,CAAC,gBAAgB,CAAC,CAAA;SACxD;QACD,OAAO,IAAI,mBAAmB,CAAC,IAAI,CAAC,CAAA;IACtC,CAAC;IAED,MAAM,CAAC,UAAU,CACf,MAA2C,EAC3C,UAAqD,EAAE;QAEvD,MAAM,IAAI,GAAG,EAAE,GAAG,OAAO,EAAE,MAAM,EAAE,CA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AC;CACF"}
@@ -0,0 +1,35 @@
1
+ import type { RouteRequestBody, RouteResponse } from '@seamapi/types/connect';
2
+ import type { Axios } from 'axios';
3
+ import type { SetNonNullable } from 'type-fest';
4
+ import { type SeamHttpOptions, type SeamHttpOptionsWithApiKey, type SeamHttpOptionsWithClient, type SeamHttpOptionsWithClientSessionToken } from '../../../../lib/seam/connect/client-options.js';
5
+ export declare class SeamHttpAcsAccessGroups {
6
+ client: Axios;
7
+ constructor(apiKeyOrOptions: string | SeamHttpOptions);
8
+ static fromClient(client: SeamHttpOptionsWithClient['client'], options?: Omit<SeamHttpOptionsWithClient, 'client'>): SeamHttpAcsAccessGroups;
9
+ static fromApiKey(apiKey: SeamHttpOptionsWithApiKey['apiKey'], options?: Omit<SeamHttpOptionsWithApiKey, 'apiKey'>): SeamHttpAcsAccessGroups;
10
+ static fromClientSessionToken(clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options?: Omit<SeamHttpOptionsWithClientSessionToken, 'clientSessionToken'>): SeamHttpAcsAccessGroups;
11
+ addUser(body: AcsAccessGroupsAddUserBody): Promise<void>;
12
+ create(body: AcsAccessGroupsCreateBody): Promise<AcsAccessGroupsCreateResponse['acs_access_group']>;
13
+ delete(body: AcsAccessGroupsDeleteBody): Promise<void>;
14
+ get(body: AcsAccessGroupsGetBody): Promise<AcsAccessGroupsGetResponse['acs_access_group']>;
15
+ list(body: AcsAccessGroupsListBody): Promise<AcsAccessGroupsListResponse['acs_access_groups']>;
16
+ listUsers(body: AcsAccessGroupsListUsersBody): Promise<AcsAccessGroupsListUsersResponse['acs_users']>;
17
+ removeUser(body: AcsAccessGroupsRemoveUserBody): Promise<void>;
18
+ update(body: AcsAccessGroupsUpdateBody): Promise<void>;
19
+ }
20
+ export type AcsAccessGroupsAddUserBody = SetNonNullable<Required<RouteRequestBody<'/acs/access_groups/add_user'>>>;
21
+ export type AcsAccessGroupsAddUserResponse = SetNonNullable<Required<RouteResponse<'/acs/access_groups/add_user'>>>;
22
+ export type AcsAccessGroupsCreateBody = SetNonNullable<Required<RouteRequestBody<'/acs/access_groups/create'>>>;
23
+ export type AcsAccessGroupsCreateResponse = SetNonNullable<Required<RouteResponse<'/acs/access_groups/create'>>>;
24
+ export type AcsAccessGroupsDeleteBody = SetNonNullable<Required<RouteRequestBody<'/acs/access_groups/delete'>>>;
25
+ export type AcsAccessGroupsDeleteResponse = SetNonNullable<Required<RouteResponse<'/acs/access_groups/delete'>>>;
26
+ export type AcsAccessGroupsGetBody = SetNonNullable<Required<RouteRequestBody<'/acs/access_groups/get'>>>;
27
+ export type AcsAccessGroupsGetResponse = SetNonNullable<Required<RouteResponse<'/acs/access_groups/get'>>>;
28
+ export type AcsAccessGroupsListBody = SetNonNullable<Required<RouteRequestBody<'/acs/access_groups/list'>>>;
29
+ export type AcsAccessGroupsListResponse = SetNonNullable<Required<RouteResponse<'/acs/access_groups/list'>>>;
30
+ export type AcsAccessGroupsListUsersBody = SetNonNullable<Required<RouteRequestBody<'/acs/access_groups/list_users'>>>;
31
+ export type AcsAccessGroupsListUsersResponse = SetNonNullable<Required<RouteResponse<'/acs/access_groups/list_users'>>>;
32
+ export type AcsAccessGroupsRemoveUserBody = SetNonNullable<Required<RouteRequestBody<'/acs/access_groups/remove_user'>>>;
33
+ export type AcsAccessGroupsRemoveUserResponse = SetNonNullable<Required<RouteResponse<'/acs/access_groups/remove_user'>>>;
34
+ export type AcsAccessGroupsUpdateBody = SetNonNullable<Required<RouteRequestBody<'/acs/access_groups/update'>>>;
35
+ export type AcsAccessGroupsUpdateResponse = SetNonNullable<Required<RouteResponse<'/acs/access_groups/update'>>>;
@@ -0,0 +1,95 @@
1
+ /*
2
+ * Automatically generated by generate-routes.ts.
3
+ * Do not edit this file or add other files to this directory.
4
+ */
5
+ import { createAxiosClient } from '../../../../lib/seam/connect/axios.js';
6
+ import { isSeamHttpOptionsWithApiKey, isSeamHttpOptionsWithClient, isSeamHttpOptionsWithClientSessionToken, SeamHttpInvalidOptionsError, } from '../../../../lib/seam/connect/client-options.js';
7
+ import { parseOptions } from '../../../../lib/seam/connect/parse-options.js';
8
+ export class SeamHttpAcsAccessGroups {
9
+ constructor(apiKeyOrOptions) {
10
+ const options = parseOptions(apiKeyOrOptions);
11
+ this.client = createAxiosClient(options);
12
+ }
13
+ static fromClient(client, options = {}) {
14
+ const opts = { ...options, client };
15
+ if (!isSeamHttpOptionsWithClient(opts)) {
16
+ throw new SeamHttpInvalidOptionsError('Missing client');
17
+ }
18
+ return new SeamHttpAcsAccessGroups(opts);
19
+ }
20
+ static fromApiKey(apiKey, options = {}) {
21
+ const opts = { ...options, apiKey };
22
+ if (!isSeamHttpOptionsWithApiKey(opts)) {
23
+ throw new SeamHttpInvalidOptionsError('Missing apiKey');
24
+ }
25
+ return new SeamHttpAcsAccessGroups(opts);
26
+ }
27
+ static fromClientSessionToken(clientSessionToken, options = {}) {
28
+ const opts = { ...options, clientSessionToken };
29
+ if (!isSeamHttpOptionsWithClientSessionToken(opts)) {
30
+ throw new SeamHttpInvalidOptionsError('Missing clientSessionToken');
31
+ }
32
+ return new SeamHttpAcsAccessGroups(opts);
33
+ }
34
+ async addUser(body) {
35
+ await this.client.request({
36
+ url: '/acs/access_groups/add_user',
37
+ method: 'post',
38
+ data: body,
39
+ });
40
+ }
41
+ async create(body) {
42
+ const { data } = await this.client.request({
43
+ url: '/acs/access_groups/create',
44
+ method: 'post',
45
+ data: body,
46
+ });
47
+ return data.acs_access_group;
48
+ }
49
+ async delete(body) {
50
+ await this.client.request({
51
+ url: '/acs/access_groups/delete',
52
+ method: 'post',
53
+ data: body,
54
+ });
55
+ }
56
+ async get(body) {
57
+ const { data } = await this.client.request({
58
+ url: '/acs/access_groups/get',
59
+ method: 'post',
60
+ data: body,
61
+ });
62
+ return data.acs_access_group;
63
+ }
64
+ async list(body) {
65
+ const { data } = await this.client.request({
66
+ url: '/acs/access_groups/list',
67
+ method: 'post',
68
+ data: body,
69
+ });
70
+ return data.acs_access_groups;
71
+ }
72
+ async listUsers(body) {
73
+ const { data } = await this.client.request({
74
+ url: '/acs/access_groups/list_users',
75
+ method: 'post',
76
+ data: body,
77
+ });
78
+ return data.acs_users;
79
+ }
80
+ async removeUser(body) {
81
+ await this.client.request({
82
+ url: '/acs/access_groups/remove_user',
83
+ method: 'post',
84
+ data: body,
85
+ });
86
+ }
87
+ async update(body) {
88
+ await this.client.request({
89
+ url: '/acs/access_groups/update',
90
+ method: 'post',
91
+ data: body,
92
+ });
93
+ }
94
+ }
95
+ //# sourceMappingURL=acs-access-groups.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acs-access-groups.js","sourceRoot":"","sources":["../../../../src/lib/seam/connect/routes/acs-access-groups.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAA;AAC7D,OAAO,EACL,2BAA2B,EAC3B,2BAA2B,EAC3B,uCAAuC,EACvC,2BAA2B,GAK5B,MAAM,oCAAoC,CAAA;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAA;AAEhE,MAAM,OAAO,uBAAuB;IAGlC,YAAY,eAAyC;QACnD,MAAM,OAAO,GAAG,YAAY,CAAC,eAAe,CAAC,CAAA;QAC7C,IAAI,CAAC,MAAM,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAA;IAC1C,CAAC;IAED,MAAM,CAAC,UAAU,CACf,MAA2C,EAC3C,UAAqD,EAAE;QAEvD,MAAM,IAAI,GAAG,EAAE,GAAG,OAAO,EAAE,MAAM,EAAE,CAAA;QACnC,IAAI,CAAC,2BAA2B,CAAC,IAAI,CAAC,EAAE;YACtC,MAAM,IAAI,2BAA2B,CAAC,gBAAgB,CAAC,CAAA;SACxD;QACD,OAAO,IAAI,uBAAuB,CAAC,IAAI,CAAC,CAAA;IAC1C,CAAC;IAED,MAAM,CAAC,UAAU,CACf,MAA2C,EAC3C,UAAqD,EAAE;QAEvD,MAAM,IAAI,GAAG,EAAE,G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,MAAM,CAAC,OAAO,CAA6B;YACrE,GAAG,EAAE,wBAAwB;YAC7B,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI;SACX,CAAC,CAAA;QACF,OAAO,IAAI,CAAC,gBAAgB,CAAA;IAC9B,CAAC;IAED,KAAK,CAAC,IAAI,CACR,IAA6B;QAE7B,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAA8B;YACtE,GAAG,EAAE,yBAAyB;YAC9B,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI;SACX,CAAC,CAAA;QACF,OAAO,IAAI,CAAC,iBAAiB,CAAA;IAC/B,CAAC;IAED,KAAK,CAAC,SAAS,CACb,IAAkC;QAElC,MAAM,EAAE,IAAI,EAAE,GACZ,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAmC;YAC1D,GAAG,EAAE,+BAA+B;YACpC,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI;SACX,CAAC,CAAA;QACJ,OAAO,IAAI,CAAC,SAAS,CAAA;IACvB,CAAC;IAED,KAAK,CAAC,UAAU,CAAC,IAAmC;QAClD,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAoC;YAC3D,GAAG,EAAE,gCAAgC;YACrC,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI;SACX,CAAC,CAAA;IACJ,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,IAA+B;QAC1C,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAgC;YACvD,GAAG,EAAE,2BAA2B;YAChC,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI;SACX,CAAC,CAAA;IACJ,CAAC;CACF"}
@@ -0,0 +1,23 @@
1
+ import type { RouteRequestBody, RouteResponse } from '@seamapi/types/connect';
2
+ import type { Axios } from 'axios';
3
+ import type { SetNonNullable } from 'type-fest';
4
+ import { type SeamHttpOptions, type SeamHttpOptionsWithApiKey, type SeamHttpOptionsWithClient, type SeamHttpOptionsWithClientSessionToken } from '../../../../lib/seam/connect/client-options.js';
5
+ export declare class SeamHttpAcsCredentials {
6
+ client: Axios;
7
+ constructor(apiKeyOrOptions: string | SeamHttpOptions);
8
+ static fromClient(client: SeamHttpOptionsWithClient['client'], options?: Omit<SeamHttpOptionsWithClient, 'client'>): SeamHttpAcsCredentials;
9
+ static fromApiKey(apiKey: SeamHttpOptionsWithApiKey['apiKey'], options?: Omit<SeamHttpOptionsWithApiKey, 'apiKey'>): SeamHttpAcsCredentials;
10
+ static fromClientSessionToken(clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options?: Omit<SeamHttpOptionsWithClientSessionToken, 'clientSessionToken'>): SeamHttpAcsCredentials;
11
+ create(body: AcsCredentialsCreateBody): Promise<AcsCredentialsCreateResponse['acs_credential']>;
12
+ delete(body: AcsCredentialsDeleteBody): Promise<void>;
13
+ get(body: AcsCredentialsGetBody): Promise<AcsCredentialsGetResponse['acs_credential']>;
14
+ list(body: AcsCredentialsListBody): Promise<AcsCredentialsListResponse['acs_credentials']>;
15
+ }
16
+ export type AcsCredentialsCreateBody = SetNonNullable<Required<RouteRequestBody<'/acs/credentials/create'>>>;
17
+ export type AcsCredentialsCreateResponse = SetNonNullable<Required<RouteResponse<'/acs/credentials/create'>>>;
18
+ export type AcsCredentialsDeleteBody = SetNonNullable<Required<RouteRequestBody<'/acs/credentials/delete'>>>;
19
+ export type AcsCredentialsDeleteResponse = SetNonNullable<Required<RouteResponse<'/acs/credentials/delete'>>>;
20
+ export type AcsCredentialsGetBody = SetNonNullable<Required<RouteRequestBody<'/acs/credentials/get'>>>;
21
+ export type AcsCredentialsGetResponse = SetNonNullable<Required<RouteResponse<'/acs/credentials/get'>>>;
22
+ export type AcsCredentialsListBody = SetNonNullable<Required<RouteRequestBody<'/acs/credentials/list'>>>;
23
+ export type AcsCredentialsListResponse = SetNonNullable<Required<RouteResponse<'/acs/credentials/list'>>>;