@seamapi/http 2.23.7 → 2.24.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 (194) hide show
  1. package/README.md +5 -0
  2. package/lib/request-parameters.d.ts +1 -1
  3. package/lib/request-parameters.js +3 -3
  4. package/lib/request-parameters.js.map +1 -1
  5. package/lib/resolve-action-attempt.d.ts +2 -0
  6. package/lib/resolve-action-attempt.js +25 -27
  7. package/lib/resolve-action-attempt.js.map +1 -1
  8. package/lib/routes/access-codes/access-codes.d.ts +5 -5
  9. package/lib/routes/access-codes/access-codes.js +20 -1
  10. package/lib/routes/access-codes/access-codes.js.map +1 -1
  11. package/lib/routes/access-codes/simulate/simulate.d.ts +2 -2
  12. package/lib/routes/access-codes/simulate/simulate.js +2 -1
  13. package/lib/routes/access-codes/simulate/simulate.js.map +1 -1
  14. package/lib/routes/access-codes/unmanaged/unmanaged.d.ts +4 -4
  15. package/lib/routes/access-codes/unmanaged/unmanaged.js +6 -1
  16. package/lib/routes/access-codes/unmanaged/unmanaged.js.map +1 -1
  17. package/lib/routes/access-grants/access-grants.d.ts +6 -6
  18. package/lib/routes/access-grants/access-grants.js +19 -1
  19. package/lib/routes/access-grants/access-grants.js.map +1 -1
  20. package/lib/routes/access-grants/unmanaged/unmanaged.d.ts +3 -3
  21. package/lib/routes/access-grants/unmanaged/unmanaged.js +4 -1
  22. package/lib/routes/access-grants/unmanaged/unmanaged.js.map +1 -1
  23. package/lib/routes/access-methods/access-methods.d.ts +5 -5
  24. package/lib/routes/access-methods/access-methods.js +19 -1
  25. package/lib/routes/access-methods/access-methods.js.map +1 -1
  26. package/lib/routes/access-methods/unmanaged/unmanaged.d.ts +2 -2
  27. package/lib/routes/access-methods/unmanaged/unmanaged.js +3 -1
  28. package/lib/routes/access-methods/unmanaged/unmanaged.js.map +1 -1
  29. package/lib/routes/acs/access-groups/access-groups.d.ts +2 -2
  30. package/lib/routes/acs/access-groups/access-groups.js +8 -1
  31. package/lib/routes/acs/access-groups/access-groups.js.map +1 -1
  32. package/lib/routes/acs/acs.d.ts +2 -2
  33. package/lib/routes/acs/acs.js.map +1 -1
  34. package/lib/routes/acs/credentials/credentials.d.ts +3 -3
  35. package/lib/routes/acs/credentials/credentials.js +9 -1
  36. package/lib/routes/acs/credentials/credentials.js.map +1 -1
  37. package/lib/routes/acs/encoders/encoders.d.ts +3 -3
  38. package/lib/routes/acs/encoders/encoders.js +6 -1
  39. package/lib/routes/acs/encoders/encoders.js.map +1 -1
  40. package/lib/routes/acs/encoders/simulate/simulate.d.ts +2 -2
  41. package/lib/routes/acs/encoders/simulate/simulate.js +5 -1
  42. package/lib/routes/acs/encoders/simulate/simulate.js.map +1 -1
  43. package/lib/routes/acs/entrances/entrances.d.ts +3 -3
  44. package/lib/routes/acs/entrances/entrances.js +6 -1
  45. package/lib/routes/acs/entrances/entrances.js.map +1 -1
  46. package/lib/routes/acs/systems/systems.d.ts +2 -2
  47. package/lib/routes/acs/systems/systems.js +5 -1
  48. package/lib/routes/acs/systems/systems.js.map +1 -1
  49. package/lib/routes/acs/users/users.d.ts +10 -10
  50. package/lib/routes/acs/users/users.js +46 -1
  51. package/lib/routes/acs/users/users.js.map +1 -1
  52. package/lib/routes/action-attempts/action-attempts.d.ts +3 -3
  53. package/lib/routes/action-attempts/action-attempts.js +3 -1
  54. package/lib/routes/action-attempts/action-attempts.js.map +1 -1
  55. package/lib/routes/client-sessions/client-sessions.d.ts +3 -3
  56. package/lib/routes/client-sessions/client-sessions.js +15 -1
  57. package/lib/routes/client-sessions/client-sessions.js.map +1 -1
  58. package/lib/routes/connect-webviews/connect-webviews.d.ts +3 -3
  59. package/lib/routes/connect-webviews/connect-webviews.js +5 -1
  60. package/lib/routes/connect-webviews/connect-webviews.js.map +1 -1
  61. package/lib/routes/connected-accounts/connected-accounts.d.ts +4 -4
  62. package/lib/routes/connected-accounts/connected-accounts.js +6 -1
  63. package/lib/routes/connected-accounts/connected-accounts.js.map +1 -1
  64. package/lib/routes/connected-accounts/simulate/simulate.d.ts +2 -2
  65. package/lib/routes/connected-accounts/simulate/simulate.js +2 -1
  66. package/lib/routes/connected-accounts/simulate/simulate.js.map +1 -1
  67. package/lib/routes/customers/customers.d.ts +2 -2
  68. package/lib/routes/customers/customers.js +4 -1
  69. package/lib/routes/customers/customers.js.map +1 -1
  70. package/lib/routes/devices/devices.d.ts +4 -4
  71. package/lib/routes/devices/devices.js +6 -1
  72. package/lib/routes/devices/devices.js.map +1 -1
  73. package/lib/routes/devices/simulate/simulate.d.ts +2 -2
  74. package/lib/routes/devices/simulate/simulate.js +7 -1
  75. package/lib/routes/devices/simulate/simulate.js.map +1 -1
  76. package/lib/routes/devices/unmanaged/unmanaged.d.ts +4 -4
  77. package/lib/routes/devices/unmanaged/unmanaged.js +4 -1
  78. package/lib/routes/devices/unmanaged/unmanaged.js.map +1 -1
  79. package/lib/routes/events/events.d.ts +4 -4
  80. package/lib/routes/events/events.js +31 -1
  81. package/lib/routes/events/events.js.map +1 -1
  82. package/lib/routes/instant-keys/instant-keys.d.ts +3 -3
  83. package/lib/routes/instant-keys/instant-keys.js +4 -1
  84. package/lib/routes/instant-keys/instant-keys.js.map +1 -1
  85. package/lib/routes/locks/locks.d.ts +3 -3
  86. package/lib/routes/locks/locks.js +6 -1
  87. package/lib/routes/locks/locks.js.map +1 -1
  88. package/lib/routes/locks/simulate/simulate.d.ts +2 -2
  89. package/lib/routes/locks/simulate/simulate.js +3 -1
  90. package/lib/routes/locks/simulate/simulate.js.map +1 -1
  91. package/lib/routes/noise-sensors/noise-sensors.d.ts +2 -2
  92. package/lib/routes/noise-sensors/noise-sensors.js +2 -1
  93. package/lib/routes/noise-sensors/noise-sensors.js.map +1 -1
  94. package/lib/routes/noise-sensors/noise-thresholds/noise-thresholds.d.ts +2 -2
  95. package/lib/routes/noise-sensors/noise-thresholds/noise-thresholds.js +6 -1
  96. package/lib/routes/noise-sensors/noise-thresholds/noise-thresholds.js.map +1 -1
  97. package/lib/routes/noise-sensors/simulate/simulate.d.ts +2 -2
  98. package/lib/routes/noise-sensors/simulate/simulate.js +2 -1
  99. package/lib/routes/noise-sensors/simulate/simulate.js.map +1 -1
  100. package/lib/routes/phones/phones.d.ts +2 -2
  101. package/lib/routes/phones/phones.js +4 -1
  102. package/lib/routes/phones/phones.js.map +1 -1
  103. package/lib/routes/phones/simulate/simulate.d.ts +2 -2
  104. package/lib/routes/phones/simulate/simulate.js +2 -1
  105. package/lib/routes/phones/simulate/simulate.js.map +1 -1
  106. package/lib/routes/seam-http-endpoints.d.ts +2 -2
  107. package/lib/routes/seam-http-endpoints.js.map +1 -1
  108. package/lib/routes/seam-http.d.ts +2 -2
  109. package/lib/routes/seam-http.js.map +1 -1
  110. package/lib/routes/spaces/spaces.d.ts +5 -5
  111. package/lib/routes/spaces/spaces.js +18 -1
  112. package/lib/routes/spaces/spaces.js.map +1 -1
  113. package/lib/routes/thermostats/daily-programs/daily-programs.d.ts +2 -2
  114. package/lib/routes/thermostats/daily-programs/daily-programs.js +4 -1
  115. package/lib/routes/thermostats/daily-programs/daily-programs.js.map +1 -1
  116. package/lib/routes/thermostats/schedules/schedules.d.ts +2 -2
  117. package/lib/routes/thermostats/schedules/schedules.js +6 -1
  118. package/lib/routes/thermostats/schedules/schedules.js.map +1 -1
  119. package/lib/routes/thermostats/simulate/simulate.d.ts +2 -2
  120. package/lib/routes/thermostats/simulate/simulate.js +3 -1
  121. package/lib/routes/thermostats/simulate/simulate.js.map +1 -1
  122. package/lib/routes/thermostats/thermostats.d.ts +2 -2
  123. package/lib/routes/thermostats/thermostats.js +15 -1
  124. package/lib/routes/thermostats/thermostats.js.map +1 -1
  125. package/lib/routes/user-identities/unmanaged/unmanaged.d.ts +3 -3
  126. package/lib/routes/user-identities/unmanaged/unmanaged.js +4 -1
  127. package/lib/routes/user-identities/unmanaged/unmanaged.js.map +1 -1
  128. package/lib/routes/user-identities/user-identities.d.ts +5 -5
  129. package/lib/routes/user-identities/user-identities.js +21 -1
  130. package/lib/routes/user-identities/user-identities.js.map +1 -1
  131. package/lib/routes/webhooks/webhooks.d.ts +2 -2
  132. package/lib/routes/webhooks/webhooks.js +6 -1
  133. package/lib/routes/webhooks/webhooks.js.map +1 -1
  134. package/lib/routes/workspaces/workspaces.d.ts +2 -2
  135. package/lib/routes/workspaces/workspaces.js +6 -1
  136. package/lib/routes/workspaces/workspaces.js.map +1 -1
  137. package/lib/seam-http-request.d.ts +7 -2
  138. package/lib/seam-http-request.js +11 -5
  139. package/lib/seam-http-request.js.map +1 -1
  140. package/lib/seam-paginator.d.ts +2 -2
  141. package/lib/seam-paginator.js +12 -8
  142. package/lib/seam-paginator.js.map +1 -1
  143. package/lib/version.d.ts +1 -1
  144. package/lib/version.js +1 -1
  145. package/package.json +1 -1
  146. package/src/lib/request-parameters.ts +5 -2
  147. package/src/lib/resolve-action-attempt.ts +34 -37
  148. package/src/lib/routes/access-codes/access-codes.ts +94 -59
  149. package/src/lib/routes/access-codes/simulate/simulate.ts +6 -2
  150. package/src/lib/routes/access-codes/unmanaged/unmanaged.ts +28 -17
  151. package/src/lib/routes/access-grants/access-grants.ts +101 -71
  152. package/src/lib/routes/access-grants/unmanaged/unmanaged.ts +9 -3
  153. package/src/lib/routes/access-methods/access-methods.ts +83 -51
  154. package/src/lib/routes/access-methods/unmanaged/unmanaged.ts +7 -2
  155. package/src/lib/routes/acs/access-groups/access-groups.ts +12 -2
  156. package/src/lib/routes/acs/acs.ts +2 -2
  157. package/src/lib/routes/acs/credentials/credentials.ts +14 -3
  158. package/src/lib/routes/acs/encoders/encoders.ts +11 -3
  159. package/src/lib/routes/acs/encoders/simulate/simulate.ts +9 -2
  160. package/src/lib/routes/acs/entrances/entrances.ts +11 -3
  161. package/src/lib/routes/acs/systems/systems.ts +9 -2
  162. package/src/lib/routes/acs/users/users.ts +214 -137
  163. package/src/lib/routes/action-attempts/action-attempts.ts +8 -3
  164. package/src/lib/routes/client-sessions/client-sessions.ts +54 -29
  165. package/src/lib/routes/connect-webviews/connect-webviews.ts +10 -3
  166. package/src/lib/routes/connected-accounts/connected-accounts.ts +24 -13
  167. package/src/lib/routes/connected-accounts/simulate/simulate.ts +6 -2
  168. package/src/lib/routes/customers/customers.ts +8 -2
  169. package/src/lib/routes/devices/devices.ts +27 -13
  170. package/src/lib/routes/devices/simulate/simulate.ts +11 -2
  171. package/src/lib/routes/devices/unmanaged/unmanaged.ts +22 -13
  172. package/src/lib/routes/events/events.ts +427 -362
  173. package/src/lib/routes/instant-keys/instant-keys.ts +21 -12
  174. package/src/lib/routes/locks/locks.ts +23 -12
  175. package/src/lib/routes/locks/simulate/simulate.ts +7 -2
  176. package/src/lib/routes/noise-sensors/noise-sensors.ts +6 -2
  177. package/src/lib/routes/noise-sensors/noise-thresholds/noise-thresholds.ts +10 -2
  178. package/src/lib/routes/noise-sensors/simulate/simulate.ts +6 -2
  179. package/src/lib/routes/phones/phones.ts +8 -2
  180. package/src/lib/routes/phones/simulate/simulate.ts +6 -2
  181. package/src/lib/routes/seam-http-endpoints.ts +2 -2
  182. package/src/lib/routes/seam-http.ts +2 -2
  183. package/src/lib/routes/spaces/spaces.ts +73 -44
  184. package/src/lib/routes/thermostats/daily-programs/daily-programs.ts +8 -2
  185. package/src/lib/routes/thermostats/schedules/schedules.ts +10 -2
  186. package/src/lib/routes/thermostats/simulate/simulate.ts +7 -2
  187. package/src/lib/routes/thermostats/thermostats.ts +19 -2
  188. package/src/lib/routes/user-identities/unmanaged/unmanaged.ts +9 -3
  189. package/src/lib/routes/user-identities/user-identities.ts +60 -28
  190. package/src/lib/routes/webhooks/webhooks.ts +10 -2
  191. package/src/lib/routes/workspaces/workspaces.ts +10 -2
  192. package/src/lib/seam-http-request.ts +24 -6
  193. package/src/lib/seam-paginator.ts +22 -12
  194. package/src/lib/version.ts +1 -1
@@ -31,7 +31,10 @@ import {
31
31
  import type { RequireAtLeastOne } from 'lib/request-parameters.js'
32
32
  import type { AccessCode } from 'lib/resources/access-code.js'
33
33
  import { SeamHttpClientSessions } from 'lib/routes/client-sessions/index.js'
34
- import { SeamHttpRequest } from 'lib/seam-http-request.js'
34
+ import {
35
+ SeamHttpRequest,
36
+ type SeamPaginatedRequest,
37
+ } from 'lib/seam-http-request.js'
35
38
  import { SeamPaginator } from 'lib/seam-paginator.js'
36
39
 
37
40
  import { SeamHttpAccessCodesSimulate } from './simulate/index.js'
@@ -138,7 +141,7 @@ export class SeamHttpAccessCodes {
138
141
  }
139
142
 
140
143
  createPaginator<const TResponse, const TResponseKey extends keyof TResponse>(
141
- request: SeamHttpRequest<TResponse, TResponseKey>,
144
+ request: SeamPaginatedRequest<TResponse, TResponseKey>,
142
145
  ): SeamPaginator<TResponse, TResponseKey> {
143
146
  return new SeamPaginator<TResponse, TResponseKey>(this, request)
144
147
  }
@@ -184,6 +187,7 @@ export class SeamHttpAccessCodes {
184
187
  parameters,
185
188
  hasRequiredParameters: true,
186
189
  requiredParameterNames: ['device_id'],
190
+ atLeastOneParameterNames: [],
187
191
  responseKey: 'access_code',
188
192
  options,
189
193
  })
@@ -213,6 +217,7 @@ export class SeamHttpAccessCodes {
213
217
  parameters,
214
218
  hasRequiredParameters: true,
215
219
  requiredParameterNames: ['device_ids'],
220
+ atLeastOneParameterNames: [],
216
221
  responseKey: 'access_codes',
217
222
  options,
218
223
  })
@@ -232,6 +237,7 @@ export class SeamHttpAccessCodes {
232
237
  parameters,
233
238
  hasRequiredParameters: true,
234
239
  requiredParameterNames: ['access_code_id'],
240
+ atLeastOneParameterNames: [],
235
241
  responseKey: undefined,
236
242
  options,
237
243
  })
@@ -251,6 +257,7 @@ export class SeamHttpAccessCodes {
251
257
  parameters,
252
258
  hasRequiredParameters: true,
253
259
  requiredParameterNames: ['device_id'],
260
+ atLeastOneParameterNames: [],
254
261
  responseKey: 'generated_code',
255
262
  options,
256
263
  })
@@ -272,6 +279,7 @@ export class SeamHttpAccessCodes {
272
279
  parameters,
273
280
  hasRequiredParameters: true,
274
281
  requiredParameterNames: [],
282
+ atLeastOneParameterNames: ['access_code_id', 'code', 'device_id'],
275
283
  responseKey: 'access_code',
276
284
  options,
277
285
  })
@@ -293,6 +301,16 @@ export class SeamHttpAccessCodes {
293
301
  parameters,
294
302
  hasRequiredParameters: true,
295
303
  requiredParameterNames: [],
304
+ atLeastOneParameterNames: [
305
+ 'access_code_ids',
306
+ 'access_grant_id',
307
+ 'access_grant_key',
308
+ 'access_method_id',
309
+ 'customer_key',
310
+ 'device_id',
311
+ 'search',
312
+ 'user_identifier_key',
313
+ ],
296
314
  responseKey: 'access_codes',
297
315
  hasPagination: true,
298
316
  options,
@@ -321,6 +339,7 @@ export class SeamHttpAccessCodes {
321
339
  parameters,
322
340
  hasRequiredParameters: true,
323
341
  requiredParameterNames: ['access_code_id'],
342
+ atLeastOneParameterNames: [],
324
343
  responseKey: 'access_code',
325
344
  options,
326
345
  })
@@ -342,6 +361,7 @@ export class SeamHttpAccessCodes {
342
361
  parameters,
343
362
  hasRequiredParameters: true,
344
363
  requiredParameterNames: ['device_id'],
364
+ atLeastOneParameterNames: [],
345
365
  responseKey: undefined,
346
366
  options,
347
367
  })
@@ -363,6 +383,7 @@ export class SeamHttpAccessCodes {
363
383
  parameters,
364
384
  hasRequiredParameters: true,
365
385
  requiredParameterNames: ['access_code_id'],
386
+ atLeastOneParameterNames: [],
366
387
  responseKey: undefined,
367
388
  options,
368
389
  })
@@ -386,6 +407,7 @@ export class SeamHttpAccessCodes {
386
407
  parameters,
387
408
  hasRequiredParameters: true,
388
409
  requiredParameterNames: ['common_code_key'],
410
+ atLeastOneParameterNames: [],
389
411
  responseKey: undefined,
390
412
  options,
391
413
  })
@@ -587,20 +609,23 @@ export type AccessCodesGenerateCodeRequest = SeamHttpRequest<
587
609
 
588
610
  export interface AccessCodesGenerateCodeOptions {}
589
611
 
590
- export type AccessCodesGetParameters = RequireAtLeastOne<{
591
- /**
592
- * ID of the access code that you want to get. You must specify either `access_code_id` or both `device_id` and `code`.
593
- */
594
- access_code_id?: string | undefined
595
- /**
596
- * Code of the access code that you want to get. You must specify either `access_code_id` or both `device_id` and `code`.
597
- */
598
- code?: string | undefined
599
- /**
600
- * ID of the device containing the access code that you want to get. You must specify either `access_code_id` or both `device_id` and `code`.
601
- */
602
- device_id?: string | undefined
603
- }>
612
+ export type AccessCodesGetParameters = RequireAtLeastOne<
613
+ {
614
+ /**
615
+ * ID of the access code that you want to get. You must specify either `access_code_id` or both `device_id` and `code`.
616
+ */
617
+ access_code_id?: string | undefined
618
+ /**
619
+ * Code of the access code that you want to get. You must specify either `access_code_id` or both `device_id` and `code`.
620
+ */
621
+ code?: string | undefined
622
+ /**
623
+ * ID of the device containing the access code that you want to get. You must specify either `access_code_id` or both `device_id` and `code`.
624
+ */
625
+ device_id?: string | undefined
626
+ },
627
+ 'access_code_id' | 'code' | 'device_id'
628
+ >
604
629
 
605
630
  /**
606
631
  * @deprecated Use AccessCodesGetRequest instead.
@@ -614,55 +639,65 @@ export type AccessCodesGetRequest = SeamHttpRequest<
614
639
 
615
640
  export interface AccessCodesGetOptions {}
616
641
 
617
- export type AccessCodesListParameters = RequireAtLeastOne<{
618
- /**
619
- * IDs of the access codes that you want to retrieve. Specify `device_id`, `access_code_ids`, `access_method_id`, `access_grant_id`, or `access_grant_key`.
620
- */
621
- access_code_ids?: Array<string> | undefined
622
- /**
623
- * ID of the access grant for which you want to list access codes. Specify `device_id`, `access_code_ids`, `access_method_id`, `access_grant_id`, or `access_grant_key`.
624
- */
625
- access_grant_id?: string | undefined
626
- /**
627
- * Key of the access grant for which you want to list access codes. Specify `device_id`, `access_code_ids`, `access_method_id`, `access_grant_id`, or `access_grant_key`.
628
- */
629
- access_grant_key?: string | undefined
630
- /**
631
- * ID of the access method for which you want to list access codes. Specify `device_id`, `access_code_ids`, `access_method_id`, `access_grant_id`, or `access_grant_key`.
632
- */
633
- access_method_id?: string | undefined
634
- /**
635
- * Customer key for which you want to list access codes.
636
- */
637
- customer_key?: string | undefined
638
- /**
639
- * ID of the device for which you want to list access codes. Specify `device_id`, `access_code_ids`, `access_method_id`, `access_grant_id`, or `access_grant_key`.
640
- */
641
- device_id?: string | undefined
642
- /**
643
- * Numerical limit on the number of access codes to return.
644
- */
645
- limit?: number | undefined
646
- /**
647
- * Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`.
648
- */
649
- page_cursor?: string | null | undefined
650
- /**
651
- * String for which to search. Filters returned access codes to include all records that satisfy a partial match using `name`, `code` or `access_code_id`.
652
- */
653
- search?: string | undefined
654
- /**
655
- * Your user ID for the user by which to filter access codes.
656
- */
657
- user_identifier_key?: string | undefined
658
- }>
642
+ export type AccessCodesListParameters = RequireAtLeastOne<
643
+ {
644
+ /**
645
+ * IDs of the access codes that you want to retrieve. Specify `device_id`, `access_code_ids`, `access_method_id`, `access_grant_id`, or `access_grant_key`.
646
+ */
647
+ access_code_ids?: Array<string> | undefined
648
+ /**
649
+ * ID of the access grant for which you want to list access codes. Specify `device_id`, `access_code_ids`, `access_method_id`, `access_grant_id`, or `access_grant_key`.
650
+ */
651
+ access_grant_id?: string | undefined
652
+ /**
653
+ * Key of the access grant for which you want to list access codes. Specify `device_id`, `access_code_ids`, `access_method_id`, `access_grant_id`, or `access_grant_key`.
654
+ */
655
+ access_grant_key?: string | undefined
656
+ /**
657
+ * ID of the access method for which you want to list access codes. Specify `device_id`, `access_code_ids`, `access_method_id`, `access_grant_id`, or `access_grant_key`.
658
+ */
659
+ access_method_id?: string | undefined
660
+ /**
661
+ * Customer key for which you want to list access codes.
662
+ */
663
+ customer_key?: string | undefined
664
+ /**
665
+ * ID of the device for which you want to list access codes. Specify `device_id`, `access_code_ids`, `access_method_id`, `access_grant_id`, or `access_grant_key`.
666
+ */
667
+ device_id?: string | undefined
668
+ /**
669
+ * Numerical limit on the number of access codes to return.
670
+ */
671
+ limit?: number | undefined
672
+ /**
673
+ * Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`.
674
+ */
675
+ page_cursor?: string | null | undefined
676
+ /**
677
+ * String for which to search. Filters returned access codes to include all records that satisfy a partial match using `name`, `code` or `access_code_id`.
678
+ */
679
+ search?: string | undefined
680
+ /**
681
+ * Your user ID for the user by which to filter access codes.
682
+ */
683
+ user_identifier_key?: string | undefined
684
+ },
685
+ | 'access_code_ids'
686
+ | 'access_grant_id'
687
+ | 'access_grant_key'
688
+ | 'access_method_id'
689
+ | 'customer_key'
690
+ | 'device_id'
691
+ | 'search'
692
+ | 'user_identifier_key'
693
+ >
659
694
 
660
695
  /**
661
696
  * @deprecated Use AccessCodesListRequest instead.
662
697
  */
663
698
  export type AccessCodesListResponse = { access_codes: Array<AccessCode> }
664
699
 
665
- export type AccessCodesListRequest = SeamHttpRequest<
700
+ export type AccessCodesListRequest = SeamPaginatedRequest<
666
701
  AccessCodesListResponse,
667
702
  'access_codes'
668
703
  >
@@ -30,7 +30,10 @@ import {
30
30
  } from 'lib/parse-options.js'
31
31
  import type { UnmanagedAccessCode } from 'lib/resources/unmanaged-access-code.js'
32
32
  import { SeamHttpClientSessions } from 'lib/routes/client-sessions/index.js'
33
- import { SeamHttpRequest } from 'lib/seam-http-request.js'
33
+ import {
34
+ SeamHttpRequest,
35
+ type SeamPaginatedRequest,
36
+ } from 'lib/seam-http-request.js'
34
37
  import { SeamPaginator } from 'lib/seam-paginator.js'
35
38
 
36
39
  export class SeamHttpAccessCodesSimulate {
@@ -134,7 +137,7 @@ export class SeamHttpAccessCodesSimulate {
134
137
  }
135
138
 
136
139
  createPaginator<const TResponse, const TResponseKey extends keyof TResponse>(
137
- request: SeamHttpRequest<TResponse, TResponseKey>,
140
+ request: SeamPaginatedRequest<TResponse, TResponseKey>,
138
141
  ): SeamPaginator<TResponse, TResponseKey> {
139
142
  return new SeamPaginator<TResponse, TResponseKey>(this, request)
140
143
  }
@@ -172,6 +175,7 @@ export class SeamHttpAccessCodesSimulate {
172
175
  parameters,
173
176
  hasRequiredParameters: true,
174
177
  requiredParameterNames: ['code', 'device_id', 'name'],
178
+ atLeastOneParameterNames: [],
175
179
  responseKey: 'access_code',
176
180
  options,
177
181
  })
@@ -31,7 +31,10 @@ import {
31
31
  import type { RequireAtLeastOne } from 'lib/request-parameters.js'
32
32
  import type { UnmanagedAccessCode } from 'lib/resources/unmanaged-access-code.js'
33
33
  import { SeamHttpClientSessions } from 'lib/routes/client-sessions/index.js'
34
- import { SeamHttpRequest } from 'lib/seam-http-request.js'
34
+ import {
35
+ SeamHttpRequest,
36
+ type SeamPaginatedRequest,
37
+ } from 'lib/seam-http-request.js'
35
38
  import { SeamPaginator } from 'lib/seam-paginator.js'
36
39
 
37
40
  export class SeamHttpAccessCodesUnmanaged {
@@ -135,7 +138,7 @@ export class SeamHttpAccessCodesUnmanaged {
135
138
  }
136
139
 
137
140
  createPaginator<const TResponse, const TResponseKey extends keyof TResponse>(
138
- request: SeamHttpRequest<TResponse, TResponseKey>,
141
+ request: SeamPaginatedRequest<TResponse, TResponseKey>,
139
142
  ): SeamPaginator<TResponse, TResponseKey> {
140
143
  return new SeamPaginator<TResponse, TResponseKey>(this, request)
141
144
  }
@@ -177,6 +180,7 @@ export class SeamHttpAccessCodesUnmanaged {
177
180
  parameters,
178
181
  hasRequiredParameters: true,
179
182
  requiredParameterNames: ['access_code_id'],
183
+ atLeastOneParameterNames: [],
180
184
  responseKey: undefined,
181
185
  options,
182
186
  })
@@ -196,6 +200,7 @@ export class SeamHttpAccessCodesUnmanaged {
196
200
  parameters,
197
201
  hasRequiredParameters: true,
198
202
  requiredParameterNames: ['access_code_id'],
203
+ atLeastOneParameterNames: [],
199
204
  responseKey: undefined,
200
205
  options,
201
206
  })
@@ -217,6 +222,7 @@ export class SeamHttpAccessCodesUnmanaged {
217
222
  parameters,
218
223
  hasRequiredParameters: true,
219
224
  requiredParameterNames: [],
225
+ atLeastOneParameterNames: ['access_code_id', 'code', 'device_id'],
220
226
  responseKey: 'access_code',
221
227
  options,
222
228
  })
@@ -236,6 +242,7 @@ export class SeamHttpAccessCodesUnmanaged {
236
242
  parameters,
237
243
  hasRequiredParameters: true,
238
244
  requiredParameterNames: ['device_id'],
245
+ atLeastOneParameterNames: [],
239
246
  responseKey: 'access_codes',
240
247
  hasPagination: true,
241
248
  options,
@@ -256,6 +263,7 @@ export class SeamHttpAccessCodesUnmanaged {
256
263
  parameters,
257
264
  hasRequiredParameters: true,
258
265
  requiredParameterNames: ['access_code_id', 'is_managed'],
266
+ atLeastOneParameterNames: [],
259
267
  responseKey: undefined,
260
268
  options,
261
269
  })
@@ -310,20 +318,23 @@ export type AccessCodesUnmanagedDeleteRequest = SeamHttpRequest<void, undefined>
310
318
 
311
319
  export interface AccessCodesUnmanagedDeleteOptions {}
312
320
 
313
- export type AccessCodesUnmanagedGetParameters = RequireAtLeastOne<{
314
- /**
315
- * ID of the unmanaged access code that you want to get. You must specify either `access_code_id` or both `device_id` and `code`.
316
- */
317
- access_code_id?: string | undefined
318
- /**
319
- * Code of the unmanaged access code that you want to get. You must specify either `access_code_id` or both `device_id` and `code`.
320
- */
321
- code?: string | undefined
322
- /**
323
- * ID of the device containing the unmanaged access code that you want to get. You must specify either `access_code_id` or both `device_id` and `code`.
324
- */
325
- device_id?: string | undefined
326
- }>
321
+ export type AccessCodesUnmanagedGetParameters = RequireAtLeastOne<
322
+ {
323
+ /**
324
+ * ID of the unmanaged access code that you want to get. You must specify either `access_code_id` or both `device_id` and `code`.
325
+ */
326
+ access_code_id?: string | undefined
327
+ /**
328
+ * Code of the unmanaged access code that you want to get. You must specify either `access_code_id` or both `device_id` and `code`.
329
+ */
330
+ code?: string | undefined
331
+ /**
332
+ * ID of the device containing the unmanaged access code that you want to get. You must specify either `access_code_id` or both `device_id` and `code`.
333
+ */
334
+ device_id?: string | undefined
335
+ },
336
+ 'access_code_id' | 'code' | 'device_id'
337
+ >
327
338
 
328
339
  /**
329
340
  * @deprecated Use AccessCodesUnmanagedGetRequest instead.
@@ -370,7 +381,7 @@ export type AccessCodesUnmanagedListResponse = {
370
381
  access_codes: Array<UnmanagedAccessCode>
371
382
  }
372
383
 
373
- export type AccessCodesUnmanagedListRequest = SeamHttpRequest<
384
+ export type AccessCodesUnmanagedListRequest = SeamPaginatedRequest<
374
385
  AccessCodesUnmanagedListResponse,
375
386
  'access_codes'
376
387
  >
@@ -32,7 +32,10 @@ import type { RequireAtLeastOne } from 'lib/request-parameters.js'
32
32
  import type { AccessGrant } from 'lib/resources/access-grant.js'
33
33
  import type { Batch } from 'lib/resources/batch.js'
34
34
  import { SeamHttpClientSessions } from 'lib/routes/client-sessions/index.js'
35
- import { SeamHttpRequest } from 'lib/seam-http-request.js'
35
+ import {
36
+ SeamHttpRequest,
37
+ type SeamPaginatedRequest,
38
+ } from 'lib/seam-http-request.js'
36
39
  import { SeamPaginator } from 'lib/seam-paginator.js'
37
40
 
38
41
  import { SeamHttpAccessGrantsUnmanaged } from './unmanaged/index.js'
@@ -138,7 +141,7 @@ export class SeamHttpAccessGrants {
138
141
  }
139
142
 
140
143
  createPaginator<const TResponse, const TResponseKey extends keyof TResponse>(
141
- request: SeamHttpRequest<TResponse, TResponseKey>,
144
+ request: SeamPaginatedRequest<TResponse, TResponseKey>,
142
145
  ): SeamPaginator<TResponse, TResponseKey> {
143
146
  return new SeamPaginator<TResponse, TResponseKey>(this, request)
144
147
  }
@@ -180,6 +183,7 @@ export class SeamHttpAccessGrants {
180
183
  parameters,
181
184
  hasRequiredParameters: true,
182
185
  requiredParameterNames: ['requested_access_methods'],
186
+ atLeastOneParameterNames: [],
183
187
  responseKey: 'access_grant',
184
188
  options,
185
189
  })
@@ -199,6 +203,7 @@ export class SeamHttpAccessGrants {
199
203
  parameters,
200
204
  hasRequiredParameters: true,
201
205
  requiredParameterNames: ['access_grant_id'],
206
+ atLeastOneParameterNames: [],
202
207
  responseKey: undefined,
203
208
  options,
204
209
  })
@@ -218,6 +223,7 @@ export class SeamHttpAccessGrants {
218
223
  parameters,
219
224
  hasRequiredParameters: true,
220
225
  requiredParameterNames: [],
226
+ atLeastOneParameterNames: ['access_grant_id', 'access_grant_key'],
221
227
  responseKey: 'access_grant',
222
228
  options,
223
229
  })
@@ -237,6 +243,12 @@ export class SeamHttpAccessGrants {
237
243
  parameters,
238
244
  hasRequiredParameters: true,
239
245
  requiredParameterNames: [],
246
+ atLeastOneParameterNames: [
247
+ 'access_grant_ids',
248
+ 'access_grant_keys',
249
+ 'exclude',
250
+ 'include',
251
+ ],
240
252
  responseKey: 'batch',
241
253
  options,
242
254
  })
@@ -256,6 +268,7 @@ export class SeamHttpAccessGrants {
256
268
  parameters,
257
269
  hasRequiredParameters: false,
258
270
  requiredParameterNames: [],
271
+ atLeastOneParameterNames: [],
259
272
  responseKey: 'access_grants',
260
273
  hasPagination: true,
261
274
  options,
@@ -276,6 +289,7 @@ export class SeamHttpAccessGrants {
276
289
  parameters,
277
290
  hasRequiredParameters: true,
278
291
  requiredParameterNames: ['access_grant_id', 'requested_access_methods'],
292
+ atLeastOneParameterNames: [],
279
293
  responseKey: 'access_grant',
280
294
  options,
281
295
  })
@@ -295,6 +309,13 @@ export class SeamHttpAccessGrants {
295
309
  parameters,
296
310
  hasRequiredParameters: true,
297
311
  requiredParameterNames: [],
312
+ atLeastOneParameterNames: [
313
+ 'access_grant_id',
314
+ 'access_grant_key',
315
+ 'ends_at',
316
+ 'name',
317
+ 'starts_at',
318
+ ],
298
319
  responseKey: undefined,
299
320
  options,
300
321
  })
@@ -438,16 +459,19 @@ export type AccessGrantsDeleteRequest = SeamHttpRequest<void, undefined>
438
459
 
439
460
  export interface AccessGrantsDeleteOptions {}
440
461
 
441
- export type AccessGrantsGetParameters = RequireAtLeastOne<{
442
- /**
443
- * ID of Access Grant to get.
444
- */
445
- access_grant_id?: string | undefined
446
- /**
447
- * Unique key of Access Grant to get.
448
- */
449
- access_grant_key?: string | undefined
450
- }>
462
+ export type AccessGrantsGetParameters = RequireAtLeastOne<
463
+ {
464
+ /**
465
+ * ID of Access Grant to get.
466
+ */
467
+ access_grant_id?: string | undefined
468
+ /**
469
+ * Unique key of Access Grant to get.
470
+ */
471
+ access_grant_key?: string | undefined
472
+ },
473
+ 'access_grant_id' | 'access_grant_key'
474
+ >
451
475
 
452
476
  /**
453
477
  * @deprecated Use AccessGrantsGetRequest instead.
@@ -461,42 +485,45 @@ export type AccessGrantsGetRequest = SeamHttpRequest<
461
485
 
462
486
  export interface AccessGrantsGetOptions {}
463
487
 
464
- export type AccessGrantsGetRelatedParameters = RequireAtLeastOne<{
465
- /**
466
- * IDs of the access grants that you want to get along with their related resources.
467
- */
468
- access_grant_ids?: Array<string> | undefined
469
- /**
470
- * Keys of the access grants that you want to get along with their related resources.
471
- */
472
- access_grant_keys?: Array<string> | undefined
473
-
474
- exclude?:
475
- | Array<
476
- | 'spaces'
477
- | 'devices'
478
- | 'acs_entrances'
479
- | 'connected_accounts'
480
- | 'acs_systems'
481
- | 'user_identities'
482
- | 'acs_access_groups'
483
- | 'access_methods'
484
- >
485
- | undefined
486
-
487
- include?:
488
- | Array<
489
- | 'spaces'
490
- | 'devices'
491
- | 'acs_entrances'
492
- | 'connected_accounts'
493
- | 'acs_systems'
494
- | 'user_identities'
495
- | 'acs_access_groups'
496
- | 'access_methods'
497
- >
498
- | undefined
499
- }>
488
+ export type AccessGrantsGetRelatedParameters = RequireAtLeastOne<
489
+ {
490
+ /**
491
+ * IDs of the access grants that you want to get along with their related resources.
492
+ */
493
+ access_grant_ids?: Array<string> | undefined
494
+ /**
495
+ * Keys of the access grants that you want to get along with their related resources.
496
+ */
497
+ access_grant_keys?: Array<string> | undefined
498
+
499
+ exclude?:
500
+ | Array<
501
+ | 'spaces'
502
+ | 'devices'
503
+ | 'acs_entrances'
504
+ | 'connected_accounts'
505
+ | 'acs_systems'
506
+ | 'user_identities'
507
+ | 'acs_access_groups'
508
+ | 'access_methods'
509
+ >
510
+ | undefined
511
+
512
+ include?:
513
+ | Array<
514
+ | 'spaces'
515
+ | 'devices'
516
+ | 'acs_entrances'
517
+ | 'connected_accounts'
518
+ | 'acs_systems'
519
+ | 'user_identities'
520
+ | 'acs_access_groups'
521
+ | 'access_methods'
522
+ >
523
+ | undefined
524
+ },
525
+ 'access_grant_ids' | 'access_grant_keys' | 'exclude' | 'include'
526
+ >
500
527
 
501
528
  /**
502
529
  * @deprecated Use AccessGrantsGetRelatedRequest instead.
@@ -581,7 +608,7 @@ export type AccessGrantsListParameters = {
581
608
  */
582
609
  export type AccessGrantsListResponse = { access_grants: Array<AccessGrant> }
583
610
 
584
- export type AccessGrantsListRequest = SeamHttpRequest<
611
+ export type AccessGrantsListRequest = SeamPaginatedRequest<
585
612
  AccessGrantsListResponse,
586
613
  'access_grants'
587
614
  >
@@ -627,28 +654,31 @@ export type AccessGrantsRequestAccessMethodsRequest = SeamHttpRequest<
627
654
 
628
655
  export interface AccessGrantsRequestAccessMethodsOptions {}
629
656
 
630
- export type AccessGrantsUpdateParameters = RequireAtLeastOne<{
631
- /**
632
- * ID of the Access Grant to update. Provide either `access_grant_id` or `access_grant_key`.
633
- */
634
- access_grant_id?: string | undefined
635
- /**
636
- * Key of the Access Grant to update. Provide either `access_grant_id` or `access_grant_key`.
637
- */
638
- access_grant_key?: string | undefined
639
- /**
640
- * Date and time at which the validity of the grant ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after `starts_at`.
641
- */
642
- ends_at?: string | Date | Temporal.Instant | null | undefined
643
- /**
644
- * Display name for the access grant.
645
- */
646
- name?: string | null | undefined
647
- /**
648
- * Date and time at which the validity of the grant starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.
649
- */
650
- starts_at?: string | Date | Temporal.Instant | undefined
651
- }>
657
+ export type AccessGrantsUpdateParameters = RequireAtLeastOne<
658
+ {
659
+ /**
660
+ * ID of the Access Grant to update. Provide either `access_grant_id` or `access_grant_key`.
661
+ */
662
+ access_grant_id?: string | undefined
663
+ /**
664
+ * Key of the Access Grant to update. Provide either `access_grant_id` or `access_grant_key`.
665
+ */
666
+ access_grant_key?: string | undefined
667
+ /**
668
+ * Date and time at which the validity of the grant ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after `starts_at`.
669
+ */
670
+ ends_at?: string | Date | Temporal.Instant | null | undefined
671
+ /**
672
+ * Display name for the access grant.
673
+ */
674
+ name?: string | null | undefined
675
+ /**
676
+ * Date and time at which the validity of the grant starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.
677
+ */
678
+ starts_at?: string | Date | Temporal.Instant | undefined
679
+ },
680
+ 'access_grant_id' | 'access_grant_key' | 'ends_at' | 'name' | 'starts_at'
681
+ >
652
682
 
653
683
  /**
654
684
  * @deprecated Use AccessGrantsUpdateRequest instead.