@seamapi/http 2.24.0 → 2.25.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 (164) hide show
  1. package/README.md +37 -0
  2. package/lib/error-interceptor.js +2 -2
  3. package/lib/error-interceptor.js.map +1 -1
  4. package/lib/resources/access-grant.d.ts +1 -1
  5. package/lib/resources/event.d.ts +9 -4
  6. package/lib/routes/access-codes/access-codes.js +2 -2
  7. package/lib/routes/access-codes/access-codes.js.map +1 -1
  8. package/lib/routes/access-codes/simulate/simulate.js +1 -1
  9. package/lib/routes/access-codes/simulate/simulate.js.map +1 -1
  10. package/lib/routes/access-codes/unmanaged/unmanaged.js +1 -1
  11. package/lib/routes/access-codes/unmanaged/unmanaged.js.map +1 -1
  12. package/lib/routes/access-grants/access-grants.d.ts +25 -25
  13. package/lib/routes/access-grants/access-grants.js +1 -1
  14. package/lib/routes/access-grants/access-grants.js.map +1 -1
  15. package/lib/routes/access-grants/unmanaged/unmanaged.js +1 -1
  16. package/lib/routes/access-grants/unmanaged/unmanaged.js.map +1 -1
  17. package/lib/routes/access-methods/access-methods.d.ts +5 -5
  18. package/lib/routes/access-methods/access-methods.js +2 -2
  19. package/lib/routes/access-methods/access-methods.js.map +1 -1
  20. package/lib/routes/access-methods/unmanaged/unmanaged.js +1 -1
  21. package/lib/routes/access-methods/unmanaged/unmanaged.js.map +1 -1
  22. package/lib/routes/acs/access-groups/access-groups.js +1 -1
  23. package/lib/routes/acs/access-groups/access-groups.js.map +1 -1
  24. package/lib/routes/acs/acs.js +1 -1
  25. package/lib/routes/acs/acs.js.map +1 -1
  26. package/lib/routes/acs/credentials/credentials.js +1 -1
  27. package/lib/routes/acs/credentials/credentials.js.map +1 -1
  28. package/lib/routes/acs/encoders/encoders.js +1 -1
  29. package/lib/routes/acs/encoders/encoders.js.map +1 -1
  30. package/lib/routes/acs/encoders/simulate/simulate.d.ts +5 -5
  31. package/lib/routes/acs/encoders/simulate/simulate.js +1 -1
  32. package/lib/routes/acs/encoders/simulate/simulate.js.map +1 -1
  33. package/lib/routes/acs/entrances/entrances.js +1 -1
  34. package/lib/routes/acs/entrances/entrances.js.map +1 -1
  35. package/lib/routes/acs/systems/systems.js +1 -1
  36. package/lib/routes/acs/systems/systems.js.map +1 -1
  37. package/lib/routes/acs/users/users.js +1 -1
  38. package/lib/routes/acs/users/users.js.map +1 -1
  39. package/lib/routes/action-attempts/action-attempts.js +1 -1
  40. package/lib/routes/action-attempts/action-attempts.js.map +1 -1
  41. package/lib/routes/client-sessions/client-sessions.js +1 -1
  42. package/lib/routes/client-sessions/client-sessions.js.map +1 -1
  43. package/lib/routes/connect-webviews/connect-webviews.js +1 -1
  44. package/lib/routes/connect-webviews/connect-webviews.js.map +1 -1
  45. package/lib/routes/connected-accounts/connected-accounts.js +1 -1
  46. package/lib/routes/connected-accounts/connected-accounts.js.map +1 -1
  47. package/lib/routes/connected-accounts/simulate/simulate.js +1 -1
  48. package/lib/routes/connected-accounts/simulate/simulate.js.map +1 -1
  49. package/lib/routes/customers/customers.d.ts +185 -185
  50. package/lib/routes/customers/customers.js +1 -1
  51. package/lib/routes/customers/customers.js.map +1 -1
  52. package/lib/routes/devices/devices.js +1 -1
  53. package/lib/routes/devices/devices.js.map +1 -1
  54. package/lib/routes/devices/simulate/simulate.js +1 -1
  55. package/lib/routes/devices/simulate/simulate.js.map +1 -1
  56. package/lib/routes/devices/unmanaged/unmanaged.js +1 -1
  57. package/lib/routes/devices/unmanaged/unmanaged.js.map +1 -1
  58. package/lib/routes/events/events.js +1 -1
  59. package/lib/routes/events/events.js.map +1 -1
  60. package/lib/routes/instant-keys/instant-keys.js +1 -1
  61. package/lib/routes/instant-keys/instant-keys.js.map +1 -1
  62. package/lib/routes/locks/locks.js +1 -1
  63. package/lib/routes/locks/locks.js.map +1 -1
  64. package/lib/routes/locks/simulate/simulate.js +1 -1
  65. package/lib/routes/locks/simulate/simulate.js.map +1 -1
  66. package/lib/routes/noise-sensors/noise-sensors.js +1 -1
  67. package/lib/routes/noise-sensors/noise-sensors.js.map +1 -1
  68. package/lib/routes/noise-sensors/noise-thresholds/noise-thresholds.js +2 -2
  69. package/lib/routes/noise-sensors/noise-thresholds/noise-thresholds.js.map +1 -1
  70. package/lib/routes/noise-sensors/simulate/simulate.js +1 -1
  71. package/lib/routes/noise-sensors/simulate/simulate.js.map +1 -1
  72. package/lib/routes/phones/phones.js +1 -1
  73. package/lib/routes/phones/phones.js.map +1 -1
  74. package/lib/routes/phones/simulate/simulate.js +1 -1
  75. package/lib/routes/phones/simulate/simulate.js.map +1 -1
  76. package/lib/routes/seam-http-endpoints.js +1 -1
  77. package/lib/routes/seam-http-endpoints.js.map +1 -1
  78. package/lib/routes/seam-http.js +1 -1
  79. package/lib/routes/seam-http.js.map +1 -1
  80. package/lib/routes/spaces/spaces.js +1 -1
  81. package/lib/routes/spaces/spaces.js.map +1 -1
  82. package/lib/routes/thermostats/daily-programs/daily-programs.js +1 -1
  83. package/lib/routes/thermostats/daily-programs/daily-programs.js.map +1 -1
  84. package/lib/routes/thermostats/schedules/schedules.js +1 -1
  85. package/lib/routes/thermostats/schedules/schedules.js.map +1 -1
  86. package/lib/routes/thermostats/simulate/simulate.d.ts +8 -8
  87. package/lib/routes/thermostats/simulate/simulate.js +1 -1
  88. package/lib/routes/thermostats/simulate/simulate.js.map +1 -1
  89. package/lib/routes/thermostats/thermostats.d.ts +5 -5
  90. package/lib/routes/thermostats/thermostats.js +1 -1
  91. package/lib/routes/thermostats/thermostats.js.map +1 -1
  92. package/lib/routes/user-identities/unmanaged/unmanaged.js +1 -1
  93. package/lib/routes/user-identities/unmanaged/unmanaged.js.map +1 -1
  94. package/lib/routes/user-identities/user-identities.d.ts +5 -5
  95. package/lib/routes/user-identities/user-identities.js +2 -2
  96. package/lib/routes/user-identities/user-identities.js.map +1 -1
  97. package/lib/routes/webhooks/webhooks.js +1 -1
  98. package/lib/routes/webhooks/webhooks.js.map +1 -1
  99. package/lib/routes/workspaces/workspaces.d.ts +1 -1
  100. package/lib/routes/workspaces/workspaces.js +1 -1
  101. package/lib/routes/workspaces/workspaces.js.map +1 -1
  102. package/lib/seam-http-error.d.ts +16 -3
  103. package/lib/seam-http-error.js +18 -6
  104. package/lib/seam-http-error.js.map +1 -1
  105. package/lib/seam-http-request.d.ts +4 -0
  106. package/lib/seam-http-request.js +18 -0
  107. package/lib/seam-http-request.js.map +1 -1
  108. package/lib/seam-paginator.d.ts +1 -7
  109. package/lib/seam-paginator.js +3 -19
  110. package/lib/seam-paginator.js.map +1 -1
  111. package/lib/version.d.ts +1 -1
  112. package/lib/version.js +1 -1
  113. package/package.json +3 -3
  114. package/src/lib/error-interceptor.ts +6 -2
  115. package/src/lib/resources/access-grant.ts +1 -1
  116. package/src/lib/resources/event.ts +10 -5
  117. package/src/lib/routes/access-codes/access-codes.ts +2 -2
  118. package/src/lib/routes/access-codes/simulate/simulate.ts +1 -1
  119. package/src/lib/routes/access-codes/unmanaged/unmanaged.ts +1 -1
  120. package/src/lib/routes/access-grants/access-grants.ts +28 -28
  121. package/src/lib/routes/access-grants/unmanaged/unmanaged.ts +1 -1
  122. package/src/lib/routes/access-methods/access-methods.ts +7 -7
  123. package/src/lib/routes/access-methods/unmanaged/unmanaged.ts +1 -1
  124. package/src/lib/routes/acs/access-groups/access-groups.ts +1 -1
  125. package/src/lib/routes/acs/acs.ts +1 -1
  126. package/src/lib/routes/acs/credentials/credentials.ts +1 -1
  127. package/src/lib/routes/acs/encoders/encoders.ts +1 -1
  128. package/src/lib/routes/acs/encoders/simulate/simulate.ts +6 -7
  129. package/src/lib/routes/acs/entrances/entrances.ts +1 -1
  130. package/src/lib/routes/acs/systems/systems.ts +1 -1
  131. package/src/lib/routes/acs/users/users.ts +1 -1
  132. package/src/lib/routes/action-attempts/action-attempts.ts +1 -1
  133. package/src/lib/routes/client-sessions/client-sessions.ts +1 -1
  134. package/src/lib/routes/connect-webviews/connect-webviews.ts +1 -1
  135. package/src/lib/routes/connected-accounts/connected-accounts.ts +1 -1
  136. package/src/lib/routes/connected-accounts/simulate/simulate.ts +1 -1
  137. package/src/lib/routes/customers/customers.ts +236 -237
  138. package/src/lib/routes/devices/devices.ts +1 -1
  139. package/src/lib/routes/devices/simulate/simulate.ts +1 -1
  140. package/src/lib/routes/devices/unmanaged/unmanaged.ts +1 -1
  141. package/src/lib/routes/events/events.ts +1 -1
  142. package/src/lib/routes/instant-keys/instant-keys.ts +1 -1
  143. package/src/lib/routes/locks/locks.ts +1 -1
  144. package/src/lib/routes/locks/simulate/simulate.ts +1 -1
  145. package/src/lib/routes/noise-sensors/noise-sensors.ts +1 -1
  146. package/src/lib/routes/noise-sensors/noise-thresholds/noise-thresholds.ts +2 -2
  147. package/src/lib/routes/noise-sensors/simulate/simulate.ts +1 -1
  148. package/src/lib/routes/phones/phones.ts +1 -1
  149. package/src/lib/routes/phones/simulate/simulate.ts +1 -1
  150. package/src/lib/routes/seam-http-endpoints.ts +1 -1
  151. package/src/lib/routes/seam-http.ts +1 -1
  152. package/src/lib/routes/spaces/spaces.ts +1 -1
  153. package/src/lib/routes/thermostats/daily-programs/daily-programs.ts +1 -1
  154. package/src/lib/routes/thermostats/schedules/schedules.ts +1 -1
  155. package/src/lib/routes/thermostats/simulate/simulate.ts +10 -11
  156. package/src/lib/routes/thermostats/thermostats.ts +8 -8
  157. package/src/lib/routes/user-identities/unmanaged/unmanaged.ts +1 -1
  158. package/src/lib/routes/user-identities/user-identities.ts +7 -7
  159. package/src/lib/routes/webhooks/webhooks.ts +1 -1
  160. package/src/lib/routes/workspaces/workspaces.ts +2 -2
  161. package/src/lib/seam-http-error.ts +43 -6
  162. package/src/lib/seam-http-request.ts +23 -0
  163. package/src/lib/seam-paginator.ts +2 -33
  164. package/src/lib/version.ts +1 -1
@@ -1,10 +1,4 @@
1
- import type { Client } from './client.js';
2
- import type { SeamHttpRequestOptions } from './options.js';
3
1
  import { type SeamPaginatedRequest } from './seam-http-request.js';
4
- interface SeamPaginatorParent {
5
- readonly client: Client;
6
- readonly defaults: Required<SeamHttpRequestOptions>;
7
- }
8
2
  declare const $brand: unique symbol;
9
3
  /**
10
4
  * Opaque cursor identifying a page of results returned by the Seam API.
@@ -28,7 +22,7 @@ interface Pagination {
28
22
  */
29
23
  export declare class SeamPaginator<const TResponse, const TResponseKey extends keyof TResponse> implements AsyncIterable<EnsureReadonlyArray<TResponse[TResponseKey]>> {
30
24
  #private;
31
- constructor(parent: SeamPaginatorParent, request: SeamPaginatedRequest<TResponse, TResponseKey>);
25
+ constructor(request: SeamPaginatedRequest<TResponse, TResponseKey>);
32
26
  /**
33
27
  * Fetches the first page of results along with the pagination state.
34
28
  */
@@ -1,5 +1,5 @@
1
1
  import { SeamHttpInvalidResponseError } from './seam-http-error.js';
2
- import { readResponseData, SeamHttpRequest, } from './seam-http-request.js';
2
+ import { readResponseData, } from './seam-http-request.js';
3
3
  /**
4
4
  * Iterates over paginated results from Seam API list endpoints.
5
5
  *
@@ -11,12 +11,10 @@ import { readResponseData, SeamHttpRequest, } from './seam-http-request.js';
11
11
  */
12
12
  export class SeamPaginator {
13
13
  #request;
14
- #parent;
15
- constructor(parent, request) {
14
+ constructor(request) {
16
15
  if (!request.hasPagination) {
17
16
  throw new Error(`The ${request.pathname} endpoint does not support pagination`);
18
17
  }
19
- this.#parent = parent;
20
18
  this.#request = request;
21
19
  }
22
20
  /**
@@ -40,20 +38,7 @@ export class SeamPaginator {
40
38
  if (responseKey == null) {
41
39
  throw new Error('Cannot paginate a response without a responseKey');
42
40
  }
43
- const method = this.#request.method;
44
- const requestData = {
45
- ...(usesParams(method)
46
- ? (this.#request.params ?? {})
47
- : (this.#request.body ?? {})),
48
- page_cursor: nextPageCursor,
49
- };
50
- const request = new SeamHttpRequest(this.#parent, {
51
- pathname: this.#request.pathname,
52
- method,
53
- responseKey,
54
- params: usesParams(method) ? requestData : undefined,
55
- body: usesParams(method) ? undefined : requestData,
56
- });
41
+ const request = this.#request.withPageCursor(nextPageCursor ?? undefined);
57
42
  const response = await request.fetchResponse();
58
43
  const data = readResponseData(response, responseKey, request.pathname);
59
44
  if (!Array.isArray(data)) {
@@ -116,5 +101,4 @@ export class SeamPaginator {
116
101
  }
117
102
  }
118
103
  }
119
- const usesParams = (method) => ['GET', 'DELETE'].includes(method.toUpperCase());
120
104
  //# sourceMappingURL=seam-paginator.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"seam-paginator.js","sourceRoot":"","sources":["../src/lib/seam-paginator.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAA;AACnE,OAAO,EACL,gBAAgB,EAChB,eAAe,GAEhB,MAAM,wBAAwB,CAAA;AAoB/B;;;;;;;;GAQG;AACH,MAAM,OAAO,aAAa;IAIf,QAAQ,CAA+C;IACvD,OAAO,CAAqB;IAErC,YACE,MAA2B,EAC3B,OAAsD;QAEtD,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,CAAC;YAC3B,MAAM,IAAI,KAAK,CACb,OAAO,OAAO,CAAC,QAAQ,uCAAuC,CAC/D,CAAA;QACH,CAAC;QACD,IAAI,CAAC,OAAO,GAAG,MAAM,CAAA;QACrB,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAA;IACzB,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,SAAS;QAGb,OAAO,MAAM,IAAI,CAAC,MAAM,EAAE,CAAA;IAC5B,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,QAAQ,CACZ,cAA4C;QAE5C,IAAI,cAAc,IAAI,IAAI,EAAE,CAAC;YAC3B,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAA;QACxE,CAAC;QAED,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,cAAc,CAAC,CAAA;IAC1C,CAAC;IAED,KAAK,CAAC,MAAM,CACV,cAA6C;QAE7C,MAAM,WAAW,GAAG,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAA;QAE7C,IAAI,WAAW,IAAI,IAAI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AAC,SAAS,EAAE,CAAA;QACjC,MAAM,IAAI,CAAA;QACV,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;YAC3B,MAAM,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,cAAc,CAAA;YACrC,IAAI,MAAM,IAAI,IAAI,IAAI,WAAW,CAAC,GAAG,CAAC,MAAM,CAAC;gBAAE,OAAM;YACrD,WAAW,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;YACvB,IAAI,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAA;YAClC,MAAM,IAAI,CAAA;QACZ,CAAC;IACH,CAAC;CACF"}
package/lib/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- declare const seamapiJavascriptHttpVersion = "2.24.0";
1
+ declare const seamapiJavascriptHttpVersion = "2.25.0";
2
2
  export default seamapiJavascriptHttpVersion;
package/lib/version.js CHANGED
@@ -1,3 +1,3 @@
1
- const seamapiJavascriptHttpVersion = '2.24.0';
1
+ const seamapiJavascriptHttpVersion = '2.25.0';
2
2
  export default seamapiJavascriptHttpVersion;
3
3
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seamapi/http",
3
- "version": "2.24.0",
3
+ "version": "2.25.0",
4
4
  "description": "JavaScript HTTP client for the Seam API written in TypeScript.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -85,10 +85,10 @@
85
85
  "axios-retry": "^4.4.2"
86
86
  },
87
87
  "devDependencies": {
88
- "@seamapi/blueprint": "^1.8.0",
88
+ "@seamapi/blueprint": "^1.9.1",
89
89
  "@seamapi/fake-seam-connect": "^2.0.4",
90
90
  "@seamapi/smith": "^1.1.0",
91
- "@seamapi/types": "1.1037.0",
91
+ "@seamapi/types": "1.1047.0",
92
92
  "@types/jsonwebtoken": "^9.0.6",
93
93
  "@types/node": "^24.10.9",
94
94
  "ava": "^8.0.1",
@@ -18,14 +18,18 @@ export const errorInterceptor = async (err: unknown): Promise<void> => {
18
18
  if (status == null) throw err
19
19
 
20
20
  if (status === 401) {
21
- throw new SeamHttpUnauthorizedError(requestId)
21
+ throw new SeamHttpUnauthorizedError(
22
+ requestId,
23
+ isApiErrorResponse(response) ? response.data.error : undefined,
24
+ { cause: err },
25
+ )
22
26
  }
23
27
 
24
28
  if (!isApiErrorResponse(response)) throw err
25
29
 
26
30
  const { type } = response.data.error
27
31
 
28
- const args = [response.data.error, status, requestId] as const
32
+ const args = [response.data.error, status, requestId, { cause: err }] as const
29
33
 
30
34
  if (type === 'invalid_input') throw new SeamHttpInvalidInputError(...args)
31
35
  throw new SeamHttpApiError(...args)
@@ -40,7 +40,7 @@ export type AccessGrant = {
40
40
  display_name: string
41
41
 
42
42
  /**
43
- * Human-readable sentence answering whether the user can currently get in, for example `Awaiting encoding` on an access method or `Upcoming` here. For display only. The wording is not stable and is not an enumeration — it may change at any time, so never compare against or branch on it. To make decisions, read `starts_at`, `ends_at`, `errors`, and the access methods' own fields.
43
+ * Human-readable sentence answering whether the user can currently get in, for example `Active`, `Awaiting issuance`, or `Upcoming`. For display only. The wording is not stable and is not an enumeration — it may change at any time, so never compare against or branch on it. To make decisions, read `starts_at`, `ends_at`, `errors`, and the access methods' own fields.
44
44
  */
45
45
  display_status: string
46
46
 
@@ -4549,14 +4549,15 @@ export type SeamEvent =
4549
4549
  }
4550
4550
  | {
4551
4551
  /**
4552
- * Number in the range 0 to 1.0 indicating the amount of battery in the affected device, as reported by the device.
4552
+ * Number in the range 0 to 1.0 indicating the battery level of the affected device's paired accessory keypad, when the device has one and its level is known.
4553
4553
  */
4554
- battery_level: number
4555
-
4554
+ accessory_keypad_battery_level?: number | undefined
4556
4555
  /**
4557
- * Battery that dropped below the low threshold. `lock`: the lock's own battery. `accessory_keypad`: a paired accessory keypad's battery. Omitted for events emitted before this field existed, which always refer to the lock's own battery.
4556
+ * Number in the range 0 to 1.0 indicating the level of the battery whose drop triggered this event.
4557
+ * @deprecated Use device_battery_level and accessory_keypad_battery_level, which distinguish the device's own battery from a paired accessory keypad's battery.
4558
4558
  */
4559
- battery_source?: 'lock' | 'accessory_keypad' | undefined
4559
+ battery_level: number
4560
+
4560
4561
  /**
4561
4562
  * Custom metadata of the connected account, present when connected_account_id is provided.
4562
4563
  */
@@ -4576,6 +4577,10 @@ export type SeamEvent =
4576
4577
  * The customer key associated with the device, if any.
4577
4578
  */
4578
4579
  customer_key?: string | undefined
4580
+ /**
4581
+ * Number in the range 0 to 1.0 indicating the affected device's own battery level, when known.
4582
+ */
4583
+ device_battery_level?: number | undefined
4579
4584
  /**
4580
4585
  * Custom metadata of the device, present when device_id is provided.
4581
4586
  */
@@ -143,7 +143,7 @@ export class SeamHttpAccessCodes {
143
143
  createPaginator<const TResponse, const TResponseKey extends keyof TResponse>(
144
144
  request: SeamPaginatedRequest<TResponse, TResponseKey>,
145
145
  ): SeamPaginator<TResponse, TResponseKey> {
146
- return new SeamPaginator<TResponse, TResponseKey>(this, request)
146
+ return new SeamPaginator<TResponse, TResponseKey>(request)
147
147
  }
148
148
 
149
149
  async updateClientSessionToken(
@@ -378,7 +378,7 @@ export class SeamHttpAccessCodes {
378
378
  ): AccessCodesUpdateRequest {
379
379
  return new SeamHttpRequest(this, {
380
380
  pathname: '/access_codes/update',
381
- method: 'PUT',
381
+ method: 'PATCH',
382
382
  body: parameters,
383
383
  parameters,
384
384
  hasRequiredParameters: true,
@@ -139,7 +139,7 @@ export class SeamHttpAccessCodesSimulate {
139
139
  createPaginator<const TResponse, const TResponseKey extends keyof TResponse>(
140
140
  request: SeamPaginatedRequest<TResponse, TResponseKey>,
141
141
  ): SeamPaginator<TResponse, TResponseKey> {
142
- return new SeamPaginator<TResponse, TResponseKey>(this, request)
142
+ return new SeamPaginator<TResponse, TResponseKey>(request)
143
143
  }
144
144
 
145
145
  async updateClientSessionToken(
@@ -140,7 +140,7 @@ export class SeamHttpAccessCodesUnmanaged {
140
140
  createPaginator<const TResponse, const TResponseKey extends keyof TResponse>(
141
141
  request: SeamPaginatedRequest<TResponse, TResponseKey>,
142
142
  ): SeamPaginator<TResponse, TResponseKey> {
143
- return new SeamPaginator<TResponse, TResponseKey>(this, request)
143
+ return new SeamPaginator<TResponse, TResponseKey>(request)
144
144
  }
145
145
 
146
146
  async updateClientSessionToken(
@@ -143,7 +143,7 @@ export class SeamHttpAccessGrants {
143
143
  createPaginator<const TResponse, const TResponseKey extends keyof TResponse>(
144
144
  request: SeamPaginatedRequest<TResponse, TResponseKey>,
145
145
  ): SeamPaginator<TResponse, TResponseKey> {
146
- return new SeamPaginator<TResponse, TResponseKey>(this, request)
146
+ return new SeamPaginator<TResponse, TResponseKey>(request)
147
147
  }
148
148
 
149
149
  async updateClientSessionToken(
@@ -323,33 +323,6 @@ export class SeamHttpAccessGrants {
323
323
  }
324
324
 
325
325
  export type AccessGrantsCreateParameters = {
326
- /**
327
- * ID of user identity for whom access is being granted.
328
- */
329
- user_identity_id?: string | undefined
330
- /**
331
- * When used, creates a new user identity with the given details, and grants them access.
332
- */
333
- user_identity?:
334
- | {
335
- /**
336
- * Unique email address for the user identity.
337
- */
338
- email_address?: string | null | undefined
339
- /**
340
- * Full name of the user associated with the user identity.
341
- */
342
- full_name?: string | null | undefined
343
- /**
344
- * Unique phone number for the user identity in [E.164 format](https://www.itu.int/rec/T-REC-E.164/en) (for example, +15555550100).
345
- */
346
- phone_number?: string | null | undefined
347
- /**
348
- * Unique key for the user identity.
349
- */
350
- user_identity_key?: string | null | undefined
351
- }
352
- | undefined
353
326
  /**
354
327
  * Unique key for the access grant within the workspace.
355
328
  */
@@ -429,6 +402,33 @@ export type AccessGrantsCreateParameters = {
429
402
  * Date and time at which the validity of the new grant starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.
430
403
  */
431
404
  starts_at?: string | undefined
405
+ /**
406
+ * When used, creates a new user identity with the given details, and grants them access.
407
+ */
408
+ user_identity?:
409
+ | {
410
+ /**
411
+ * Unique email address for the user identity.
412
+ */
413
+ email_address?: string | null | undefined
414
+ /**
415
+ * Full name of the user associated with the user identity.
416
+ */
417
+ full_name?: string | null | undefined
418
+ /**
419
+ * Unique phone number for the user identity in [E.164 format](https://www.itu.int/rec/T-REC-E.164/en) (for example, +15555550100).
420
+ */
421
+ phone_number?: string | null | undefined
422
+ /**
423
+ * Unique key for the user identity.
424
+ */
425
+ user_identity_key?: string | null | undefined
426
+ }
427
+ | undefined
428
+ /**
429
+ * ID of user identity for whom access is being granted.
430
+ */
431
+ user_identity_id?: string | undefined
432
432
  }
433
433
 
434
434
  /**
@@ -139,7 +139,7 @@ export class SeamHttpAccessGrantsUnmanaged {
139
139
  createPaginator<const TResponse, const TResponseKey extends keyof TResponse>(
140
140
  request: SeamPaginatedRequest<TResponse, TResponseKey>,
141
141
  ): SeamPaginator<TResponse, TResponseKey> {
142
- return new SeamPaginator<TResponse, TResponseKey>(this, request)
142
+ return new SeamPaginator<TResponse, TResponseKey>(request)
143
143
  }
144
144
 
145
145
  async updateClientSessionToken(
@@ -145,7 +145,7 @@ export class SeamHttpAccessMethods {
145
145
  createPaginator<const TResponse, const TResponseKey extends keyof TResponse>(
146
146
  request: SeamPaginatedRequest<TResponse, TResponseKey>,
147
147
  ): SeamPaginator<TResponse, TResponseKey> {
148
- return new SeamPaginator<TResponse, TResponseKey>(this, request)
148
+ return new SeamPaginator<TResponse, TResponseKey>(request)
149
149
  }
150
150
 
151
151
  async updateClientSessionToken(
@@ -211,8 +211,8 @@ export class SeamHttpAccessMethods {
211
211
  hasRequiredParameters: true,
212
212
  requiredParameterNames: [],
213
213
  atLeastOneParameterNames: [
214
- 'access_method_id',
215
214
  'access_grant_id',
215
+ 'access_method_id',
216
216
  'reservation_key',
217
217
  ],
218
218
  responseKey: undefined,
@@ -368,20 +368,20 @@ export type AccessMethodsAssignCardOptions = Pick<
368
368
 
369
369
  export type AccessMethodsDeleteParameters = RequireAtLeastOne<
370
370
  {
371
- /**
372
- * ID of access method to delete.
373
- */
374
- access_method_id?: string | undefined
375
371
  /**
376
372
  * ID of access grant whose access methods should be deleted.
377
373
  */
378
374
  access_grant_id?: string | undefined
375
+ /**
376
+ * ID of access method to delete.
377
+ */
378
+ access_method_id?: string | undefined
379
379
  /**
380
380
  * Reservation key of the access grant whose access methods should be deleted.
381
381
  */
382
382
  reservation_key?: string | undefined
383
383
  },
384
- 'access_method_id' | 'access_grant_id' | 'reservation_key'
384
+ 'access_grant_id' | 'access_method_id' | 'reservation_key'
385
385
  >
386
386
 
387
387
  /**
@@ -139,7 +139,7 @@ export class SeamHttpAccessMethodsUnmanaged {
139
139
  createPaginator<const TResponse, const TResponseKey extends keyof TResponse>(
140
140
  request: SeamPaginatedRequest<TResponse, TResponseKey>,
141
141
  ): SeamPaginator<TResponse, TResponseKey> {
142
- return new SeamPaginator<TResponse, TResponseKey>(this, request)
142
+ return new SeamPaginator<TResponse, TResponseKey>(request)
143
143
  }
144
144
 
145
145
  async updateClientSessionToken(
@@ -141,7 +141,7 @@ export class SeamHttpAcsAccessGroups {
141
141
  createPaginator<const TResponse, const TResponseKey extends keyof TResponse>(
142
142
  request: SeamPaginatedRequest<TResponse, TResponseKey>,
143
143
  ): SeamPaginator<TResponse, TResponseKey> {
144
- return new SeamPaginator<TResponse, TResponseKey>(this, request)
144
+ return new SeamPaginator<TResponse, TResponseKey>(request)
145
145
  }
146
146
 
147
147
  async updateClientSessionToken(
@@ -142,7 +142,7 @@ export class SeamHttpAcs {
142
142
  createPaginator<const TResponse, const TResponseKey extends keyof TResponse>(
143
143
  request: SeamPaginatedRequest<TResponse, TResponseKey>,
144
144
  ): SeamPaginator<TResponse, TResponseKey> {
145
- return new SeamPaginator<TResponse, TResponseKey>(this, request)
145
+ return new SeamPaginator<TResponse, TResponseKey>(request)
146
146
  }
147
147
 
148
148
  async updateClientSessionToken(
@@ -140,7 +140,7 @@ export class SeamHttpAcsCredentials {
140
140
  createPaginator<const TResponse, const TResponseKey extends keyof TResponse>(
141
141
  request: SeamPaginatedRequest<TResponse, TResponseKey>,
142
142
  ): SeamPaginator<TResponse, TResponseKey> {
143
- return new SeamPaginator<TResponse, TResponseKey>(this, request)
143
+ return new SeamPaginator<TResponse, TResponseKey>(request)
144
144
  }
145
145
 
146
146
  async updateClientSessionToken(
@@ -143,7 +143,7 @@ export class SeamHttpAcsEncoders {
143
143
  createPaginator<const TResponse, const TResponseKey extends keyof TResponse>(
144
144
  request: SeamPaginatedRequest<TResponse, TResponseKey>,
145
145
  ): SeamPaginator<TResponse, TResponseKey> {
146
- return new SeamPaginator<TResponse, TResponseKey>(this, request)
146
+ return new SeamPaginator<TResponse, TResponseKey>(request)
147
147
  }
148
148
 
149
149
  async updateClientSessionToken(
@@ -138,7 +138,7 @@ export class SeamHttpAcsEncodersSimulate {
138
138
  createPaginator<const TResponse, const TResponseKey extends keyof TResponse>(
139
139
  request: SeamPaginatedRequest<TResponse, TResponseKey>,
140
140
  ): SeamPaginator<TResponse, TResponseKey> {
141
- return new SeamPaginator<TResponse, TResponseKey>(this, request)
141
+ return new SeamPaginator<TResponse, TResponseKey>(request)
142
142
  }
143
143
 
144
144
  async updateClientSessionToken(
@@ -242,6 +242,10 @@ export class SeamHttpAcsEncodersSimulate {
242
242
  }
243
243
 
244
244
  export type AcsEncodersSimulateNextCredentialEncodeWillFailParameters = {
245
+ /**
246
+ * ID of the `acs_credential` that will fail to be encoded onto a card in the next request.
247
+ */
248
+ acs_credential_id?: string | undefined
245
249
  /**
246
250
  * ID of the `acs_encoder` that will be used in the next request to encode the `acs_credential`.
247
251
  */
@@ -256,10 +260,6 @@ export type AcsEncodersSimulateNextCredentialEncodeWillFailParameters = {
256
260
  | 'uncategorized_error'
257
261
  | 'action_attempt_expired'
258
262
  | undefined
259
- /**
260
- * ID of the `acs_credential` that will fail to be encoded onto a card in the next request.
261
- */
262
- acs_credential_id?: string | undefined
263
263
  }
264
264
 
265
265
  /**
@@ -295,6 +295,7 @@ export type AcsEncodersSimulateNextCredentialEncodeWillSucceedRequest =
295
295
  export interface AcsEncodersSimulateNextCredentialEncodeWillSucceedOptions {}
296
296
 
297
297
  export type AcsEncodersSimulateNextCredentialScanWillFailParameters = {
298
+ acs_credential_id_on_seam?: string | undefined
298
299
  /**
299
300
  * ID of the `acs_encoder` that will fail to scan the `acs_credential` in the next request.
300
301
  */
@@ -305,8 +306,6 @@ export type AcsEncodersSimulateNextCredentialScanWillFailParameters = {
305
306
  | 'uncategorized_error'
306
307
  | 'action_attempt_expired'
307
308
  | undefined
308
-
309
- acs_credential_id_on_seam?: string | undefined
310
309
  }
311
310
 
312
311
  /**
@@ -142,7 +142,7 @@ export class SeamHttpAcsEntrances {
142
142
  createPaginator<const TResponse, const TResponseKey extends keyof TResponse>(
143
143
  request: SeamPaginatedRequest<TResponse, TResponseKey>,
144
144
  ): SeamPaginator<TResponse, TResponseKey> {
145
- return new SeamPaginator<TResponse, TResponseKey>(this, request)
145
+ return new SeamPaginator<TResponse, TResponseKey>(request)
146
146
  }
147
147
 
148
148
  async updateClientSessionToken(
@@ -139,7 +139,7 @@ export class SeamHttpAcsSystems {
139
139
  createPaginator<const TResponse, const TResponseKey extends keyof TResponse>(
140
140
  request: SeamPaginatedRequest<TResponse, TResponseKey>,
141
141
  ): SeamPaginator<TResponse, TResponseKey> {
142
- return new SeamPaginator<TResponse, TResponseKey>(this, request)
142
+ return new SeamPaginator<TResponse, TResponseKey>(request)
143
143
  }
144
144
 
145
145
  async updateClientSessionToken(
@@ -141,7 +141,7 @@ export class SeamHttpAcsUsers {
141
141
  createPaginator<const TResponse, const TResponseKey extends keyof TResponse>(
142
142
  request: SeamPaginatedRequest<TResponse, TResponseKey>,
143
143
  ): SeamPaginator<TResponse, TResponseKey> {
144
- return new SeamPaginator<TResponse, TResponseKey>(this, request)
144
+ return new SeamPaginator<TResponse, TResponseKey>(request)
145
145
  }
146
146
 
147
147
  async updateClientSessionToken(
@@ -139,7 +139,7 @@ export class SeamHttpActionAttempts {
139
139
  createPaginator<const TResponse, const TResponseKey extends keyof TResponse>(
140
140
  request: SeamPaginatedRequest<TResponse, TResponseKey>,
141
141
  ): SeamPaginator<TResponse, TResponseKey> {
142
- return new SeamPaginator<TResponse, TResponseKey>(this, request)
142
+ return new SeamPaginator<TResponse, TResponseKey>(request)
143
143
  }
144
144
 
145
145
  async updateClientSessionToken(
@@ -139,7 +139,7 @@ export class SeamHttpClientSessions {
139
139
  createPaginator<const TResponse, const TResponseKey extends keyof TResponse>(
140
140
  request: SeamPaginatedRequest<TResponse, TResponseKey>,
141
141
  ): SeamPaginator<TResponse, TResponseKey> {
142
- return new SeamPaginator<TResponse, TResponseKey>(this, request)
142
+ return new SeamPaginator<TResponse, TResponseKey>(request)
143
143
  }
144
144
 
145
145
  async updateClientSessionToken(
@@ -139,7 +139,7 @@ export class SeamHttpConnectWebviews {
139
139
  createPaginator<const TResponse, const TResponseKey extends keyof TResponse>(
140
140
  request: SeamPaginatedRequest<TResponse, TResponseKey>,
141
141
  ): SeamPaginator<TResponse, TResponseKey> {
142
- return new SeamPaginator<TResponse, TResponseKey>(this, request)
142
+ return new SeamPaginator<TResponse, TResponseKey>(request)
143
143
  }
144
144
 
145
145
  async updateClientSessionToken(
@@ -142,7 +142,7 @@ export class SeamHttpConnectedAccounts {
142
142
  createPaginator<const TResponse, const TResponseKey extends keyof TResponse>(
143
143
  request: SeamPaginatedRequest<TResponse, TResponseKey>,
144
144
  ): SeamPaginator<TResponse, TResponseKey> {
145
- return new SeamPaginator<TResponse, TResponseKey>(this, request)
145
+ return new SeamPaginator<TResponse, TResponseKey>(request)
146
146
  }
147
147
 
148
148
  async updateClientSessionToken(
@@ -141,7 +141,7 @@ export class SeamHttpConnectedAccountsSimulate {
141
141
  createPaginator<const TResponse, const TResponseKey extends keyof TResponse>(
142
142
  request: SeamPaginatedRequest<TResponse, TResponseKey>,
143
143
  ): SeamPaginator<TResponse, TResponseKey> {
144
- return new SeamPaginator<TResponse, TResponseKey>(this, request)
144
+ return new SeamPaginator<TResponse, TResponseKey>(request)
145
145
  }
146
146
 
147
147
  async updateClientSessionToken(