@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 { InstantKey } from 'lib/resources/instant-key.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 SeamHttpInstantKeys {
@@ -135,7 +138,7 @@ export class SeamHttpInstantKeys {
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
  }
@@ -173,6 +176,7 @@ export class SeamHttpInstantKeys {
173
176
  parameters,
174
177
  hasRequiredParameters: true,
175
178
  requiredParameterNames: ['instant_key_id'],
179
+ atLeastOneParameterNames: [],
176
180
  responseKey: undefined,
177
181
  options,
178
182
  })
@@ -192,6 +196,7 @@ export class SeamHttpInstantKeys {
192
196
  parameters,
193
197
  hasRequiredParameters: true,
194
198
  requiredParameterNames: [],
199
+ atLeastOneParameterNames: ['instant_key_id', 'instant_key_url'],
195
200
  responseKey: 'instant_key',
196
201
  options,
197
202
  })
@@ -211,6 +216,7 @@ export class SeamHttpInstantKeys {
211
216
  parameters,
212
217
  hasRequiredParameters: false,
213
218
  requiredParameterNames: [],
219
+ atLeastOneParameterNames: [],
214
220
  responseKey: 'instant_keys',
215
221
  options,
216
222
  })
@@ -233,16 +239,19 @@ export type InstantKeysDeleteRequest = SeamHttpRequest<void, undefined>
233
239
 
234
240
  export interface InstantKeysDeleteOptions {}
235
241
 
236
- export type InstantKeysGetParameters = RequireAtLeastOne<{
237
- /**
238
- * ID of the instant key to get.
239
- */
240
- instant_key_id?: string | undefined
241
- /**
242
- * URL of the instant key to get.
243
- */
244
- instant_key_url?: string | undefined
245
- }>
242
+ export type InstantKeysGetParameters = RequireAtLeastOne<
243
+ {
244
+ /**
245
+ * ID of the instant key to get.
246
+ */
247
+ instant_key_id?: string | undefined
248
+ /**
249
+ * URL of the instant key to get.
250
+ */
251
+ instant_key_url?: string | undefined
252
+ },
253
+ 'instant_key_id' | 'instant_key_url'
254
+ >
246
255
 
247
256
  /**
248
257
  * @deprecated Use InstantKeysGetRequest instead.
@@ -33,7 +33,10 @@ import type { ActionAttempt } from 'lib/resources/action-attempt.js'
33
33
  import type { Device } from 'lib/resources/device.js'
34
34
  import { SeamHttpActionAttempts } from 'lib/routes/action-attempts/index.js'
35
35
  import { SeamHttpClientSessions } from 'lib/routes/client-sessions/index.js'
36
- import { SeamHttpRequest } from 'lib/seam-http-request.js'
36
+ import {
37
+ SeamHttpRequest,
38
+ type SeamPaginatedRequest,
39
+ } from 'lib/seam-http-request.js'
37
40
  import { SeamPaginator } from 'lib/seam-paginator.js'
38
41
 
39
42
  import { SeamHttpLocksSimulate } from './simulate/index.js'
@@ -139,7 +142,7 @@ export class SeamHttpLocks {
139
142
  }
140
143
 
141
144
  createPaginator<const TResponse, const TResponseKey extends keyof TResponse>(
142
- request: SeamHttpRequest<TResponse, TResponseKey>,
145
+ request: SeamPaginatedRequest<TResponse, TResponseKey>,
143
146
  ): SeamPaginator<TResponse, TResponseKey> {
144
147
  return new SeamPaginator<TResponse, TResponseKey>(this, request)
145
148
  }
@@ -181,6 +184,7 @@ export class SeamHttpLocks {
181
184
  parameters,
182
185
  hasRequiredParameters: true,
183
186
  requiredParameterNames: ['auto_lock_enabled', 'device_id'],
187
+ atLeastOneParameterNames: [],
184
188
  responseKey: 'action_attempt',
185
189
  options,
186
190
  actionAttempts: () =>
@@ -206,6 +210,7 @@ export class SeamHttpLocks {
206
210
  parameters,
207
211
  hasRequiredParameters: true,
208
212
  requiredParameterNames: [],
213
+ atLeastOneParameterNames: ['device_id', 'name'],
209
214
  responseKey: 'device',
210
215
  options,
211
216
  })
@@ -225,6 +230,7 @@ export class SeamHttpLocks {
225
230
  parameters,
226
231
  hasRequiredParameters: false,
227
232
  requiredParameterNames: [],
233
+ atLeastOneParameterNames: [],
228
234
  responseKey: 'devices',
229
235
  options,
230
236
  })
@@ -244,6 +250,7 @@ export class SeamHttpLocks {
244
250
  parameters,
245
251
  hasRequiredParameters: true,
246
252
  requiredParameterNames: ['device_id'],
253
+ atLeastOneParameterNames: [],
247
254
  responseKey: 'action_attempt',
248
255
  options,
249
256
  actionAttempts: () =>
@@ -268,6 +275,7 @@ export class SeamHttpLocks {
268
275
  parameters,
269
276
  hasRequiredParameters: true,
270
277
  requiredParameterNames: ['device_id'],
278
+ atLeastOneParameterNames: [],
271
279
  responseKey: 'action_attempt',
272
280
  options,
273
281
  actionAttempts: () =>
@@ -310,16 +318,19 @@ export type LocksConfigureAutoLockOptions = Pick<
310
318
  'waitForActionAttempt'
311
319
  >
312
320
 
313
- export type LocksGetParameters = RequireAtLeastOne<{
314
- /**
315
- * ID of the lock that you want to get.
316
- */
317
- device_id?: string | undefined
318
- /**
319
- * Name of the lock that you want to get.
320
- */
321
- name?: string | undefined
322
- }>
321
+ export type LocksGetParameters = RequireAtLeastOne<
322
+ {
323
+ /**
324
+ * ID of the lock that you want to get.
325
+ */
326
+ device_id?: string | undefined
327
+ /**
328
+ * Name of the lock that you want to get.
329
+ */
330
+ name?: string | undefined
331
+ },
332
+ 'device_id' | 'name'
333
+ >
323
334
 
324
335
  /**
325
336
  * @deprecated Use LocksGetRequest instead.
@@ -31,7 +31,10 @@ import {
31
31
  import type { ActionAttempt } from 'lib/resources/action-attempt.js'
32
32
  import { SeamHttpActionAttempts } from 'lib/routes/action-attempts/index.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 SeamHttpLocksSimulate {
@@ -135,7 +138,7 @@ export class SeamHttpLocksSimulate {
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
  }
@@ -173,6 +176,7 @@ export class SeamHttpLocksSimulate {
173
176
  parameters,
174
177
  hasRequiredParameters: true,
175
178
  requiredParameterNames: ['code', 'device_id'],
179
+ atLeastOneParameterNames: [],
176
180
  responseKey: 'action_attempt',
177
181
  options,
178
182
  actionAttempts: () =>
@@ -197,6 +201,7 @@ export class SeamHttpLocksSimulate {
197
201
  parameters,
198
202
  hasRequiredParameters: true,
199
203
  requiredParameterNames: ['device_id'],
204
+ atLeastOneParameterNames: [],
200
205
  responseKey: 'action_attempt',
201
206
  options,
202
207
  actionAttempts: () =>
@@ -30,7 +30,10 @@ import {
30
30
  } from 'lib/parse-options.js'
31
31
  import type { Device } from 'lib/resources/device.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
  import { SeamHttpNoiseSensorsNoiseThresholds } from './noise-thresholds/index.js'
@@ -137,7 +140,7 @@ export class SeamHttpNoiseSensors {
137
140
  }
138
141
 
139
142
  createPaginator<const TResponse, const TResponseKey extends keyof TResponse>(
140
- request: SeamHttpRequest<TResponse, TResponseKey>,
143
+ request: SeamPaginatedRequest<TResponse, TResponseKey>,
141
144
  ): SeamPaginator<TResponse, TResponseKey> {
142
145
  return new SeamPaginator<TResponse, TResponseKey>(this, request)
143
146
  }
@@ -186,6 +189,7 @@ export class SeamHttpNoiseSensors {
186
189
  parameters,
187
190
  hasRequiredParameters: false,
188
191
  requiredParameterNames: [],
192
+ atLeastOneParameterNames: [],
189
193
  responseKey: 'devices',
190
194
  options,
191
195
  })
@@ -30,7 +30,10 @@ import {
30
30
  } from 'lib/parse-options.js'
31
31
  import type { NoiseThreshold } from 'lib/resources/noise-threshold.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 SeamHttpNoiseSensorsNoiseThresholds {
@@ -137,7 +140,7 @@ export class SeamHttpNoiseSensorsNoiseThresholds {
137
140
  }
138
141
 
139
142
  createPaginator<const TResponse, const TResponseKey extends keyof TResponse>(
140
- request: SeamHttpRequest<TResponse, TResponseKey>,
143
+ request: SeamPaginatedRequest<TResponse, TResponseKey>,
141
144
  ): SeamPaginator<TResponse, TResponseKey> {
142
145
  return new SeamPaginator<TResponse, TResponseKey>(this, request)
143
146
  }
@@ -175,6 +178,7 @@ export class SeamHttpNoiseSensorsNoiseThresholds {
175
178
  parameters,
176
179
  hasRequiredParameters: true,
177
180
  requiredParameterNames: ['device_id', 'ends_daily_at', 'starts_daily_at'],
181
+ atLeastOneParameterNames: [],
178
182
  responseKey: 'noise_threshold',
179
183
  options,
180
184
  })
@@ -194,6 +198,7 @@ export class SeamHttpNoiseSensorsNoiseThresholds {
194
198
  parameters,
195
199
  hasRequiredParameters: true,
196
200
  requiredParameterNames: ['device_id', 'noise_threshold_id'],
201
+ atLeastOneParameterNames: [],
197
202
  responseKey: undefined,
198
203
  options,
199
204
  })
@@ -213,6 +218,7 @@ export class SeamHttpNoiseSensorsNoiseThresholds {
213
218
  parameters,
214
219
  hasRequiredParameters: true,
215
220
  requiredParameterNames: ['noise_threshold_id'],
221
+ atLeastOneParameterNames: [],
216
222
  responseKey: 'noise_threshold',
217
223
  options,
218
224
  })
@@ -232,6 +238,7 @@ export class SeamHttpNoiseSensorsNoiseThresholds {
232
238
  parameters,
233
239
  hasRequiredParameters: true,
234
240
  requiredParameterNames: ['device_id'],
241
+ atLeastOneParameterNames: [],
235
242
  responseKey: 'noise_thresholds',
236
243
  options,
237
244
  })
@@ -251,6 +258,7 @@ export class SeamHttpNoiseSensorsNoiseThresholds {
251
258
  parameters,
252
259
  hasRequiredParameters: true,
253
260
  requiredParameterNames: ['device_id', 'noise_threshold_id'],
261
+ atLeastOneParameterNames: [],
254
262
  responseKey: undefined,
255
263
  options,
256
264
  })
@@ -29,7 +29,10 @@ import {
29
29
  parseOptions,
30
30
  } from 'lib/parse-options.js'
31
31
  import { SeamHttpClientSessions } from 'lib/routes/client-sessions/index.js'
32
- import { SeamHttpRequest } from 'lib/seam-http-request.js'
32
+ import {
33
+ SeamHttpRequest,
34
+ type SeamPaginatedRequest,
35
+ } from 'lib/seam-http-request.js'
33
36
  import { SeamPaginator } from 'lib/seam-paginator.js'
34
37
 
35
38
  export class SeamHttpNoiseSensorsSimulate {
@@ -133,7 +136,7 @@ export class SeamHttpNoiseSensorsSimulate {
133
136
  }
134
137
 
135
138
  createPaginator<const TResponse, const TResponseKey extends keyof TResponse>(
136
- request: SeamHttpRequest<TResponse, TResponseKey>,
139
+ request: SeamPaginatedRequest<TResponse, TResponseKey>,
137
140
  ): SeamPaginator<TResponse, TResponseKey> {
138
141
  return new SeamPaginator<TResponse, TResponseKey>(this, request)
139
142
  }
@@ -171,6 +174,7 @@ export class SeamHttpNoiseSensorsSimulate {
171
174
  parameters,
172
175
  hasRequiredParameters: true,
173
176
  requiredParameterNames: ['device_id'],
177
+ atLeastOneParameterNames: [],
174
178
  responseKey: undefined,
175
179
  options,
176
180
  })
@@ -30,7 +30,10 @@ import {
30
30
  } from 'lib/parse-options.js'
31
31
  import type { Phone } from 'lib/resources/phone.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
  import { SeamHttpPhonesSimulate } from './simulate/index.js'
@@ -136,7 +139,7 @@ export class SeamHttpPhones {
136
139
  }
137
140
 
138
141
  createPaginator<const TResponse, const TResponseKey extends keyof TResponse>(
139
- request: SeamHttpRequest<TResponse, TResponseKey>,
142
+ request: SeamPaginatedRequest<TResponse, TResponseKey>,
140
143
  ): SeamPaginator<TResponse, TResponseKey> {
141
144
  return new SeamPaginator<TResponse, TResponseKey>(this, request)
142
145
  }
@@ -178,6 +181,7 @@ export class SeamHttpPhones {
178
181
  parameters,
179
182
  hasRequiredParameters: true,
180
183
  requiredParameterNames: ['device_id'],
184
+ atLeastOneParameterNames: [],
181
185
  responseKey: undefined,
182
186
  options,
183
187
  })
@@ -197,6 +201,7 @@ export class SeamHttpPhones {
197
201
  parameters,
198
202
  hasRequiredParameters: true,
199
203
  requiredParameterNames: ['device_id'],
204
+ atLeastOneParameterNames: [],
200
205
  responseKey: 'phone',
201
206
  options,
202
207
  })
@@ -216,6 +221,7 @@ export class SeamHttpPhones {
216
221
  parameters,
217
222
  hasRequiredParameters: false,
218
223
  requiredParameterNames: [],
224
+ atLeastOneParameterNames: [],
219
225
  responseKey: 'phones',
220
226
  options,
221
227
  })
@@ -30,7 +30,10 @@ import {
30
30
  } from 'lib/parse-options.js'
31
31
  import type { Phone } from 'lib/resources/phone.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 SeamHttpPhonesSimulate {
@@ -134,7 +137,7 @@ export class SeamHttpPhonesSimulate {
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 SeamHttpPhonesSimulate {
172
175
  parameters,
173
176
  hasRequiredParameters: true,
174
177
  requiredParameterNames: ['user_identity_id'],
178
+ atLeastOneParameterNames: [],
175
179
  responseKey: 'phone',
176
180
  options,
177
181
  })
@@ -28,7 +28,7 @@ import {
28
28
  limitToSeamHttpRequestOptions,
29
29
  parseOptions,
30
30
  } from 'lib/parse-options.js'
31
- import type { SeamHttpRequest } from 'lib/seam-http-request.js'
31
+ import type { SeamPaginatedRequest } from 'lib/seam-http-request.js'
32
32
  import { SeamPaginator } from 'lib/seam-paginator.js'
33
33
 
34
34
  import {
@@ -862,7 +862,7 @@ export class SeamHttpEndpoints {
862
862
  }
863
863
 
864
864
  createPaginator<const TResponse, const TResponseKey extends keyof TResponse>(
865
- request: SeamHttpRequest<TResponse, TResponseKey>,
865
+ request: SeamPaginatedRequest<TResponse, TResponseKey>,
866
866
  ): SeamPaginator<TResponse, TResponseKey> {
867
867
  return new SeamPaginator<TResponse, TResponseKey>(this, request)
868
868
  }
@@ -28,7 +28,7 @@ import {
28
28
  limitToSeamHttpRequestOptions,
29
29
  parseOptions,
30
30
  } from 'lib/parse-options.js'
31
- import type { SeamHttpRequest } from 'lib/seam-http-request.js'
31
+ import type { SeamPaginatedRequest } from 'lib/seam-http-request.js'
32
32
  import { SeamPaginator } from 'lib/seam-paginator.js'
33
33
 
34
34
  import { SeamHttpAccessCodes } from './access-codes/index.js'
@@ -153,7 +153,7 @@ export class SeamHttp {
153
153
  }
154
154
 
155
155
  createPaginator<const TResponse, const TResponseKey extends keyof TResponse>(
156
- request: SeamHttpRequest<TResponse, TResponseKey>,
156
+ request: SeamPaginatedRequest<TResponse, TResponseKey>,
157
157
  ): SeamPaginator<TResponse, TResponseKey> {
158
158
  return new SeamPaginator<TResponse, TResponseKey>(this, request)
159
159
  }
@@ -32,7 +32,10 @@ import type { RequireAtLeastOne } from 'lib/request-parameters.js'
32
32
  import type { Batch } from 'lib/resources/batch.js'
33
33
  import type { Space } from 'lib/resources/space.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
  export class SeamHttpSpaces {
@@ -136,7 +139,7 @@ export class SeamHttpSpaces {
136
139
  }
137
140
 
138
141
  createPaginator<const TResponse, const TResponseKey extends keyof TResponse>(
139
- request: SeamHttpRequest<TResponse, TResponseKey>,
142
+ request: SeamPaginatedRequest<TResponse, TResponseKey>,
140
143
  ): SeamPaginator<TResponse, TResponseKey> {
141
144
  return new SeamPaginator<TResponse, TResponseKey>(this, request)
142
145
  }
@@ -174,6 +177,7 @@ export class SeamHttpSpaces {
174
177
  parameters,
175
178
  hasRequiredParameters: true,
176
179
  requiredParameterNames: ['acs_entrance_ids', 'space_id'],
180
+ atLeastOneParameterNames: [],
177
181
  responseKey: undefined,
178
182
  options,
179
183
  })
@@ -193,6 +197,7 @@ export class SeamHttpSpaces {
193
197
  parameters,
194
198
  hasRequiredParameters: true,
195
199
  requiredParameterNames: ['connected_account_id', 'space_id'],
200
+ atLeastOneParameterNames: [],
196
201
  responseKey: undefined,
197
202
  options,
198
203
  })
@@ -212,6 +217,7 @@ export class SeamHttpSpaces {
212
217
  parameters,
213
218
  hasRequiredParameters: true,
214
219
  requiredParameterNames: ['device_ids', 'space_id'],
220
+ atLeastOneParameterNames: [],
215
221
  responseKey: undefined,
216
222
  options,
217
223
  })
@@ -231,6 +237,7 @@ export class SeamHttpSpaces {
231
237
  parameters,
232
238
  hasRequiredParameters: true,
233
239
  requiredParameterNames: ['name'],
240
+ atLeastOneParameterNames: [],
234
241
  responseKey: 'space',
235
242
  options,
236
243
  })
@@ -250,6 +257,7 @@ export class SeamHttpSpaces {
250
257
  parameters,
251
258
  hasRequiredParameters: true,
252
259
  requiredParameterNames: ['space_id'],
260
+ atLeastOneParameterNames: [],
253
261
  responseKey: undefined,
254
262
  options,
255
263
  })
@@ -269,6 +277,7 @@ export class SeamHttpSpaces {
269
277
  parameters,
270
278
  hasRequiredParameters: true,
271
279
  requiredParameterNames: [],
280
+ atLeastOneParameterNames: ['space_id', 'space_key'],
272
281
  responseKey: 'space',
273
282
  options,
274
283
  })
@@ -288,6 +297,12 @@ export class SeamHttpSpaces {
288
297
  parameters,
289
298
  hasRequiredParameters: true,
290
299
  requiredParameterNames: [],
300
+ atLeastOneParameterNames: [
301
+ 'exclude',
302
+ 'include',
303
+ 'space_ids',
304
+ 'space_keys',
305
+ ],
291
306
  responseKey: 'batch',
292
307
  options,
293
308
  })
@@ -307,6 +322,7 @@ export class SeamHttpSpaces {
307
322
  parameters,
308
323
  hasRequiredParameters: false,
309
324
  requiredParameterNames: [],
325
+ atLeastOneParameterNames: [],
310
326
  responseKey: 'spaces',
311
327
  hasPagination: true,
312
328
  options,
@@ -327,6 +343,7 @@ export class SeamHttpSpaces {
327
343
  parameters,
328
344
  hasRequiredParameters: true,
329
345
  requiredParameterNames: ['acs_entrance_ids', 'space_id'],
346
+ atLeastOneParameterNames: [],
330
347
  responseKey: undefined,
331
348
  options,
332
349
  })
@@ -346,6 +363,7 @@ export class SeamHttpSpaces {
346
363
  parameters,
347
364
  hasRequiredParameters: true,
348
365
  requiredParameterNames: ['connected_account_id', 'space_id'],
366
+ atLeastOneParameterNames: [],
349
367
  responseKey: undefined,
350
368
  options,
351
369
  })
@@ -365,6 +383,7 @@ export class SeamHttpSpaces {
365
383
  parameters,
366
384
  hasRequiredParameters: true,
367
385
  requiredParameterNames: ['device_ids', 'space_id'],
386
+ atLeastOneParameterNames: [],
368
387
  responseKey: undefined,
369
388
  options,
370
389
  })
@@ -384,6 +403,7 @@ export class SeamHttpSpaces {
384
403
  parameters,
385
404
  hasRequiredParameters: false,
386
405
  requiredParameterNames: [],
406
+ atLeastOneParameterNames: [],
387
407
  responseKey: 'space',
388
408
  options,
389
409
  })
@@ -529,16 +549,19 @@ export type SpacesDeleteRequest = SeamHttpRequest<void, undefined>
529
549
 
530
550
  export interface SpacesDeleteOptions {}
531
551
 
532
- export type SpacesGetParameters = RequireAtLeastOne<{
533
- /**
534
- * ID of the space that you want to get.
535
- */
536
- space_id?: string | undefined
537
- /**
538
- * Unique key of the space that you want to get.
539
- */
540
- space_key?: string | undefined
541
- }>
552
+ export type SpacesGetParameters = RequireAtLeastOne<
553
+ {
554
+ /**
555
+ * ID of the space that you want to get.
556
+ */
557
+ space_id?: string | undefined
558
+ /**
559
+ * Unique key of the space that you want to get.
560
+ */
561
+ space_key?: string | undefined
562
+ },
563
+ 'space_id' | 'space_key'
564
+ >
542
565
 
543
566
  /**
544
567
  * @deprecated Use SpacesGetRequest instead.
@@ -549,37 +572,40 @@ export type SpacesGetRequest = SeamHttpRequest<SpacesGetResponse, 'space'>
549
572
 
550
573
  export interface SpacesGetOptions {}
551
574
 
552
- export type SpacesGetRelatedParameters = RequireAtLeastOne<{
553
- exclude?:
554
- | Array<
555
- | 'spaces'
556
- | 'devices'
557
- | 'acs_entrances'
558
- | 'connected_accounts'
559
- | 'acs_systems'
560
- | 'access_methods'
561
- >
562
- | undefined
563
-
564
- include?:
565
- | Array<
566
- | 'spaces'
567
- | 'devices'
568
- | 'acs_entrances'
569
- | 'connected_accounts'
570
- | 'acs_systems'
571
- | 'access_methods'
572
- >
573
- | undefined
574
- /**
575
- * IDs of the spaces that you want to get along with their related resources.
576
- */
577
- space_ids?: Array<string> | undefined
578
- /**
579
- * Keys of the spaces that you want to get along with their related resources.
580
- */
581
- space_keys?: Array<string> | undefined
582
- }>
575
+ export type SpacesGetRelatedParameters = RequireAtLeastOne<
576
+ {
577
+ exclude?:
578
+ | Array<
579
+ | 'spaces'
580
+ | 'devices'
581
+ | 'acs_entrances'
582
+ | 'connected_accounts'
583
+ | 'acs_systems'
584
+ | 'access_methods'
585
+ >
586
+ | undefined
587
+
588
+ include?:
589
+ | Array<
590
+ | 'spaces'
591
+ | 'devices'
592
+ | 'acs_entrances'
593
+ | 'connected_accounts'
594
+ | 'acs_systems'
595
+ | 'access_methods'
596
+ >
597
+ | undefined
598
+ /**
599
+ * IDs of the spaces that you want to get along with their related resources.
600
+ */
601
+ space_ids?: Array<string> | undefined
602
+ /**
603
+ * Keys of the spaces that you want to get along with their related resources.
604
+ */
605
+ space_keys?: Array<string> | undefined
606
+ },
607
+ 'exclude' | 'include' | 'space_ids' | 'space_keys'
608
+ >
583
609
 
584
610
  /**
585
611
  * @deprecated Use SpacesGetRelatedRequest instead.
@@ -630,7 +656,10 @@ export type SpacesListParameters = {
630
656
  */
631
657
  export type SpacesListResponse = { spaces: Array<Space> }
632
658
 
633
- export type SpacesListRequest = SeamHttpRequest<SpacesListResponse, 'spaces'>
659
+ export type SpacesListRequest = SeamPaginatedRequest<
660
+ SpacesListResponse,
661
+ 'spaces'
662
+ >
634
663
 
635
664
  export interface SpacesListOptions {}
636
665