@seamapi/http 2.4.1 → 2.4.3

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 (179) hide show
  1. package/lib/request-parameters.d.ts +4 -0
  2. package/lib/request-parameters.js +18 -0
  3. package/lib/request-parameters.js.map +1 -0
  4. package/lib/resources/access-code.d.ts +13 -9
  5. package/lib/resources/acs-credential.d.ts +33 -1
  6. package/lib/resources/acs-entrance.d.ts +1 -1
  7. package/lib/resources/acs-system.d.ts +30 -0
  8. package/lib/resources/action-attempt.d.ts +82 -11
  9. package/lib/resources/device-provider.d.ts +1 -1
  10. package/lib/resources/device.d.ts +63 -18
  11. package/lib/resources/event.d.ts +0 -76
  12. package/lib/resources/unmanaged-access-code.d.ts +13 -9
  13. package/lib/resources/unmanaged-device.d.ts +28 -16
  14. package/lib/routes/access-codes/access-codes.d.ts +8 -35
  15. package/lib/routes/access-codes/access-codes.js +17 -6
  16. package/lib/routes/access-codes/access-codes.js.map +1 -1
  17. package/lib/routes/access-codes/simulate/simulate.js +2 -0
  18. package/lib/routes/access-codes/simulate/simulate.js.map +1 -1
  19. package/lib/routes/access-codes/unmanaged/unmanaged.d.ts +5 -4
  20. package/lib/routes/access-codes/unmanaged/unmanaged.js +12 -6
  21. package/lib/routes/access-codes/unmanaged/unmanaged.js.map +1 -1
  22. package/lib/routes/access-grants/access-grants.d.ts +20 -19
  23. package/lib/routes/access-grants/access-grants.js +10 -2
  24. package/lib/routes/access-grants/access-grants.js.map +1 -1
  25. package/lib/routes/access-grants/unmanaged/unmanaged.d.ts +1 -1
  26. package/lib/routes/access-grants/unmanaged/unmanaged.js +8 -4
  27. package/lib/routes/access-grants/unmanaged/unmanaged.js.map +1 -1
  28. package/lib/routes/access-methods/access-methods.d.ts +8 -7
  29. package/lib/routes/access-methods/access-methods.js +12 -4
  30. package/lib/routes/access-methods/access-methods.js.map +1 -1
  31. package/lib/routes/access-methods/unmanaged/unmanaged.js +7 -4
  32. package/lib/routes/access-methods/unmanaged/unmanaged.js.map +1 -1
  33. package/lib/routes/acs/access-groups/access-groups.js +20 -12
  34. package/lib/routes/acs/access-groups/access-groups.js.map +1 -1
  35. package/lib/routes/acs/credentials/credentials.d.ts +1 -1
  36. package/lib/routes/acs/credentials/credentials.js +15 -6
  37. package/lib/routes/acs/credentials/credentials.js.map +1 -1
  38. package/lib/routes/acs/encoders/encoders.d.ts +1 -1
  39. package/lib/routes/acs/encoders/encoders.js +10 -4
  40. package/lib/routes/acs/encoders/encoders.js.map +1 -1
  41. package/lib/routes/acs/encoders/simulate/simulate.js +5 -0
  42. package/lib/routes/acs/encoders/simulate/simulate.js.map +1 -1
  43. package/lib/routes/acs/entrances/entrances.d.ts +2 -2
  44. package/lib/routes/acs/entrances/entrances.js +8 -2
  45. package/lib/routes/acs/entrances/entrances.js.map +1 -1
  46. package/lib/routes/acs/systems/systems.js +11 -6
  47. package/lib/routes/acs/systems/systems.js.map +1 -1
  48. package/lib/routes/acs/users/users.d.ts +25 -24
  49. package/lib/routes/acs/users/users.js +22 -10
  50. package/lib/routes/acs/users/users.js.map +1 -1
  51. package/lib/routes/action-attempts/action-attempts.d.ts +1 -1
  52. package/lib/routes/action-attempts/action-attempts.js +5 -2
  53. package/lib/routes/action-attempts/action-attempts.js.map +1 -1
  54. package/lib/routes/client-sessions/client-sessions.d.ts +4 -3
  55. package/lib/routes/client-sessions/client-sessions.js +14 -6
  56. package/lib/routes/client-sessions/client-sessions.js.map +1 -1
  57. package/lib/routes/connect-webviews/connect-webviews.d.ts +2 -2
  58. package/lib/routes/connect-webviews/connect-webviews.js +9 -4
  59. package/lib/routes/connect-webviews/connect-webviews.js.map +1 -1
  60. package/lib/routes/connected-accounts/connected-accounts.d.ts +5 -4
  61. package/lib/routes/connected-accounts/connected-accounts.js +8 -2
  62. package/lib/routes/connected-accounts/connected-accounts.js.map +1 -1
  63. package/lib/routes/connected-accounts/simulate/simulate.js +2 -0
  64. package/lib/routes/connected-accounts/simulate/simulate.js.map +1 -1
  65. package/lib/routes/customers/customers.d.ts +9 -9
  66. package/lib/routes/customers/customers.js +4 -0
  67. package/lib/routes/customers/customers.js.map +1 -1
  68. package/lib/routes/devices/devices.d.ts +11 -10
  69. package/lib/routes/devices/devices.js +10 -4
  70. package/lib/routes/devices/devices.js.map +1 -1
  71. package/lib/routes/devices/simulate/simulate.js +7 -0
  72. package/lib/routes/devices/simulate/simulate.js.map +1 -1
  73. package/lib/routes/devices/unmanaged/unmanaged.d.ts +8 -23
  74. package/lib/routes/devices/unmanaged/unmanaged.js +6 -2
  75. package/lib/routes/devices/unmanaged/unmanaged.js.map +1 -1
  76. package/lib/routes/events/events.d.ts +8 -7
  77. package/lib/routes/events/events.js +5 -2
  78. package/lib/routes/events/events.js.map +1 -1
  79. package/lib/routes/instant-keys/instant-keys.d.ts +4 -3
  80. package/lib/routes/instant-keys/instant-keys.js +10 -6
  81. package/lib/routes/instant-keys/instant-keys.js.map +1 -1
  82. package/lib/routes/locks/locks.d.ts +7 -46
  83. package/lib/routes/locks/locks.js +8 -2
  84. package/lib/routes/locks/locks.js.map +1 -1
  85. package/lib/routes/locks/simulate/simulate.js +3 -0
  86. package/lib/routes/locks/simulate/simulate.js.map +1 -1
  87. package/lib/routes/noise-sensors/noise-sensors.d.ts +0 -40
  88. package/lib/routes/noise-sensors/noise-sensors.js +2 -0
  89. package/lib/routes/noise-sensors/noise-sensors.js.map +1 -1
  90. package/lib/routes/noise-sensors/noise-thresholds/noise-thresholds.js +12 -6
  91. package/lib/routes/noise-sensors/noise-thresholds/noise-thresholds.js.map +1 -1
  92. package/lib/routes/noise-sensors/simulate/simulate.js +2 -0
  93. package/lib/routes/noise-sensors/simulate/simulate.js.map +1 -1
  94. package/lib/routes/phones/phones.js +10 -6
  95. package/lib/routes/phones/phones.js.map +1 -1
  96. package/lib/routes/phones/simulate/simulate.js +2 -0
  97. package/lib/routes/phones/simulate/simulate.js.map +1 -1
  98. package/lib/routes/seam-http-endpoints.d.ts +26 -26
  99. package/lib/routes/spaces/spaces.d.ts +16 -15
  100. package/lib/routes/spaces/spaces.js +19 -6
  101. package/lib/routes/spaces/spaces.js.map +1 -1
  102. package/lib/routes/thermostats/daily-programs/daily-programs.js +6 -2
  103. package/lib/routes/thermostats/daily-programs/daily-programs.js.map +1 -1
  104. package/lib/routes/thermostats/schedules/schedules.d.ts +2 -2
  105. package/lib/routes/thermostats/schedules/schedules.js +12 -6
  106. package/lib/routes/thermostats/schedules/schedules.js.map +1 -1
  107. package/lib/routes/thermostats/simulate/simulate.js +3 -0
  108. package/lib/routes/thermostats/simulate/simulate.js.map +1 -1
  109. package/lib/routes/thermostats/thermostats.d.ts +13 -53
  110. package/lib/routes/thermostats/thermostats.js +17 -2
  111. package/lib/routes/thermostats/thermostats.js.map +1 -1
  112. package/lib/routes/user-identities/unmanaged/unmanaged.d.ts +1 -1
  113. package/lib/routes/user-identities/unmanaged/unmanaged.js +8 -4
  114. package/lib/routes/user-identities/unmanaged/unmanaged.js.map +1 -1
  115. package/lib/routes/user-identities/user-identities.d.ts +13 -12
  116. package/lib/routes/user-identities/user-identities.js +29 -14
  117. package/lib/routes/user-identities/user-identities.js.map +1 -1
  118. package/lib/routes/webhooks/webhooks.js +10 -4
  119. package/lib/routes/webhooks/webhooks.js.map +1 -1
  120. package/lib/routes/workspaces/workspaces.d.ts +9 -9
  121. package/lib/routes/workspaces/workspaces.js +6 -0
  122. package/lib/routes/workspaces/workspaces.js.map +1 -1
  123. package/lib/version.d.ts +1 -1
  124. package/lib/version.js +1 -1
  125. package/package.json +3 -3
  126. package/src/lib/request-parameters.ts +34 -0
  127. package/src/lib/resources/access-code.ts +15 -9
  128. package/src/lib/resources/acs-credential.ts +40 -0
  129. package/src/lib/resources/acs-entrance.ts +1 -1
  130. package/src/lib/resources/acs-system.ts +36 -0
  131. package/src/lib/resources/action-attempt.ts +91 -6
  132. package/src/lib/resources/device-provider.ts +1 -0
  133. package/src/lib/resources/device.ts +70 -20
  134. package/src/lib/resources/event.ts +0 -76
  135. package/src/lib/resources/unmanaged-access-code.ts +15 -9
  136. package/src/lib/resources/unmanaged-device.ts +33 -18
  137. package/src/lib/routes/access-codes/access-codes.ts +57 -41
  138. package/src/lib/routes/access-codes/simulate/simulate.ts +7 -0
  139. package/src/lib/routes/access-codes/unmanaged/unmanaged.ts +44 -10
  140. package/src/lib/routes/access-grants/access-grants.ts +43 -21
  141. package/src/lib/routes/access-grants/unmanaged/unmanaged.ts +24 -5
  142. package/src/lib/routes/access-methods/access-methods.ts +41 -11
  143. package/src/lib/routes/access-methods/unmanaged/unmanaged.ts +17 -4
  144. package/src/lib/routes/acs/access-groups/access-groups.ts +43 -12
  145. package/src/lib/routes/acs/credentials/credentials.ts +28 -7
  146. package/src/lib/routes/acs/encoders/encoders.ts +28 -5
  147. package/src/lib/routes/acs/encoders/simulate/simulate.ts +25 -0
  148. package/src/lib/routes/acs/entrances/entrances.ts +23 -4
  149. package/src/lib/routes/acs/systems/systems.ts +23 -6
  150. package/src/lib/routes/acs/users/users.ts +76 -33
  151. package/src/lib/routes/action-attempts/action-attempts.ts +8 -3
  152. package/src/lib/routes/client-sessions/client-sessions.ts +35 -9
  153. package/src/lib/routes/connect-webviews/connect-webviews.ts +15 -5
  154. package/src/lib/routes/connected-accounts/connected-accounts.ts +20 -6
  155. package/src/lib/routes/connected-accounts/simulate/simulate.ts +7 -0
  156. package/src/lib/routes/customers/customers.ts +16 -9
  157. package/src/lib/routes/devices/devices.ts +36 -11
  158. package/src/lib/routes/devices/simulate/simulate.ts +29 -0
  159. package/src/lib/routes/devices/unmanaged/unmanaged.ts +19 -22
  160. package/src/lib/routes/events/events.ts +17 -9
  161. package/src/lib/routes/instant-keys/instant-keys.ts +19 -9
  162. package/src/lib/routes/locks/locks.ts +22 -45
  163. package/src/lib/routes/locks/simulate/simulate.ts +13 -0
  164. package/src/lib/routes/noise-sensors/noise-sensors.ts +3 -40
  165. package/src/lib/routes/noise-sensors/noise-thresholds/noise-thresholds.ts +37 -6
  166. package/src/lib/routes/noise-sensors/simulate/simulate.ts +7 -0
  167. package/src/lib/routes/phones/phones.ts +13 -6
  168. package/src/lib/routes/phones/simulate/simulate.ts +7 -0
  169. package/src/lib/routes/seam-http-endpoints.ts +26 -26
  170. package/src/lib/routes/spaces/spaces.ts +61 -21
  171. package/src/lib/routes/thermostats/daily-programs/daily-programs.ts +21 -2
  172. package/src/lib/routes/thermostats/schedules/schedules.ts +35 -8
  173. package/src/lib/routes/thermostats/simulate/simulate.ts +13 -0
  174. package/src/lib/routes/thermostats/thermostats.ts +72 -55
  175. package/src/lib/routes/user-identities/unmanaged/unmanaged.ts +24 -5
  176. package/src/lib/routes/user-identities/user-identities.ts +94 -26
  177. package/src/lib/routes/webhooks/webhooks.ts +15 -4
  178. package/src/lib/routes/workspaces/workspaces.ts +20 -9
  179. package/src/lib/version.ts +1 -1
@@ -28,6 +28,7 @@ import {
28
28
  limitToSeamHttpRequestOptions,
29
29
  parseOptions,
30
30
  } from 'lib/parse-options.js'
31
+ import { assertValidRequestParameters } from 'lib/request-parameters.js'
31
32
  import type { CustomerPortal } from 'lib/resources/customer-portal.js'
32
33
  import { SeamHttpClientSessions } from 'lib/routes/client-sessions/index.js'
33
34
  import { SeamHttpRequest } from 'lib/seam-http-request.js'
@@ -165,6 +166,8 @@ export class SeamHttpCustomers {
165
166
  parameters?: CustomersCreatePortalParameters,
166
167
  options: CustomersCreatePortalOptions = {},
167
168
  ): CustomersCreatePortalRequest {
169
+ assertValidRequestParameters(parameters, '/customers/create_portal', false)
170
+
168
171
  return new SeamHttpRequest(this, {
169
172
  pathname: '/customers/create_portal',
170
173
  method: 'POST',
@@ -182,6 +185,8 @@ export class SeamHttpCustomers {
182
185
  parameters?: CustomersDeleteDataParameters,
183
186
  options: CustomersDeleteDataOptions = {},
184
187
  ): CustomersDeleteDataRequest {
188
+ assertValidRequestParameters(parameters, '/customers/delete_data', false)
189
+
185
190
  return new SeamHttpRequest(this, {
186
191
  pathname: '/customers/delete_data',
187
192
  method: 'POST',
@@ -198,6 +203,8 @@ export class SeamHttpCustomers {
198
203
  parameters: CustomersPushDataParameters,
199
204
  options: CustomersPushDataOptions = {},
200
205
  ): CustomersPushDataRequest {
206
+ assertValidRequestParameters(parameters, '/customers/push_data', true)
207
+
201
208
  return new SeamHttpRequest(this, {
202
209
  pathname: '/customers/push_data',
203
210
  method: 'POST',
@@ -225,7 +232,7 @@ export type CustomersCreatePortalParameters = {
225
232
  /**
226
233
  * The value to compare against.
227
234
  */
228
- value?: {} | undefined
235
+ value?: string | undefined
229
236
  }>
230
237
  | undefined
231
238
  /**
@@ -883,19 +890,19 @@ export type CustomersCreatePortalParameters = {
883
890
  /**
884
891
  * Postal address for the space.
885
892
  */
886
- address?: string | undefined
893
+ address?: string | null | undefined
887
894
  /**
888
895
  * Default check-in time for reservations at the space, as HH:mm or HH:mm:ss.
889
896
  */
890
- default_checkin_time?: string | undefined
897
+ default_checkin_time?: string | null | undefined
891
898
  /**
892
899
  * Default check-out time for reservations at the space, as HH:mm or HH:mm:ss.
893
900
  */
894
- default_checkout_time?: string | undefined
901
+ default_checkout_time?: string | null | undefined
895
902
  /**
896
903
  * IANA time zone for the space, e.g. America/Los_Angeles.
897
904
  */
898
- time_zone?: string | undefined
905
+ time_zone?: string | null | undefined
899
906
  }
900
907
  | undefined
901
908
  /**
@@ -1624,19 +1631,19 @@ export type CustomersPushDataParameters = {
1624
1631
  /**
1625
1632
  * Postal address for the space.
1626
1633
  */
1627
- address?: string | undefined
1634
+ address?: string | null | undefined
1628
1635
  /**
1629
1636
  * Default check-in time for reservations at the space, as HH:mm or HH:mm:ss.
1630
1637
  */
1631
- default_checkin_time?: string | undefined
1638
+ default_checkin_time?: string | null | undefined
1632
1639
  /**
1633
1640
  * Default check-out time for reservations at the space, as HH:mm or HH:mm:ss.
1634
1641
  */
1635
- default_checkout_time?: string | undefined
1642
+ default_checkout_time?: string | null | undefined
1636
1643
  /**
1637
1644
  * IANA time zone for the space, e.g. America/Los_Angeles.
1638
1645
  */
1639
- time_zone?: string | undefined
1646
+ time_zone?: string | null | undefined
1640
1647
  }
1641
1648
  | undefined
1642
1649
  /**
@@ -28,6 +28,10 @@ import {
28
28
  limitToSeamHttpRequestOptions,
29
29
  parseOptions,
30
30
  } from 'lib/parse-options.js'
31
+ import {
32
+ assertValidRequestParameters,
33
+ type RequireAtLeastOne,
34
+ } from 'lib/request-parameters.js'
31
35
  import type { Device } from 'lib/resources/device.js'
32
36
  import type { DeviceProvider } from 'lib/resources/device-provider.js'
33
37
  import { SeamHttpClientSessions } from 'lib/routes/client-sessions/index.js'
@@ -176,13 +180,15 @@ export class SeamHttpDevices {
176
180
  * You must specify either `device_id` or `name`.
177
181
  */
178
182
  get(
179
- parameters?: DevicesGetParameters,
183
+ parameters: DevicesGetParameters,
180
184
  options: DevicesGetOptions = {},
181
185
  ): DevicesGetRequest {
186
+ assertValidRequestParameters(parameters, '/devices/get', true)
187
+
182
188
  return new SeamHttpRequest(this, {
183
189
  pathname: '/devices/get',
184
- method: 'POST',
185
- body: parameters,
190
+ method: 'GET',
191
+ params: parameters,
186
192
  responseKey: 'device',
187
193
  options,
188
194
  })
@@ -195,6 +201,8 @@ export class SeamHttpDevices {
195
201
  parameters?: DevicesListParameters,
196
202
  options: DevicesListOptions = {},
197
203
  ): DevicesListRequest {
204
+ assertValidRequestParameters(parameters, '/devices/list', false)
205
+
198
206
  return new SeamHttpRequest(this, {
199
207
  pathname: '/devices/list',
200
208
  method: 'POST',
@@ -215,10 +223,16 @@ export class SeamHttpDevices {
215
223
  parameters?: DevicesListDeviceProvidersParameters,
216
224
  options: DevicesListDeviceProvidersOptions = {},
217
225
  ): DevicesListDeviceProvidersRequest {
226
+ assertValidRequestParameters(
227
+ parameters,
228
+ '/devices/list_device_providers',
229
+ false,
230
+ )
231
+
218
232
  return new SeamHttpRequest(this, {
219
233
  pathname: '/devices/list_device_providers',
220
- method: 'POST',
221
- body: parameters,
234
+ method: 'GET',
235
+ params: parameters,
222
236
  responseKey: 'device_providers',
223
237
  options,
224
238
  })
@@ -231,6 +245,12 @@ export class SeamHttpDevices {
231
245
  parameters: DevicesReportProviderMetadataParameters,
232
246
  options: DevicesReportProviderMetadataOptions = {},
233
247
  ): DevicesReportProviderMetadataRequest {
248
+ assertValidRequestParameters(
249
+ parameters,
250
+ '/devices/report_provider_metadata',
251
+ true,
252
+ )
253
+
234
254
  return new SeamHttpRequest(this, {
235
255
  pathname: '/devices/report_provider_metadata',
236
256
  method: 'POST',
@@ -249,6 +269,8 @@ export class SeamHttpDevices {
249
269
  parameters: DevicesUpdateParameters,
250
270
  options: DevicesUpdateOptions = {},
251
271
  ): DevicesUpdateRequest {
272
+ assertValidRequestParameters(parameters, '/devices/update', true)
273
+
252
274
  return new SeamHttpRequest(this, {
253
275
  pathname: '/devices/update',
254
276
  method: 'PATCH',
@@ -259,7 +281,7 @@ export class SeamHttpDevices {
259
281
  }
260
282
  }
261
283
 
262
- export type DevicesGetParameters = {
284
+ export type DevicesGetParameters = RequireAtLeastOne<{
263
285
  /**
264
286
  * ID of the device that you want to get.
265
287
  */
@@ -268,7 +290,7 @@ export type DevicesGetParameters = {
268
290
  * Name of the device that you want to get.
269
291
  */
270
292
  name?: string | undefined
271
- }
293
+ }>
272
294
 
273
295
  /**
274
296
  * @deprecated Use DevicesGetRequest instead.
@@ -338,6 +360,7 @@ export type DevicesListParameters = {
338
360
  | 'tedee_lock'
339
361
  | 'akiles_lock'
340
362
  | 'ultraloq_lock'
363
+ | 'yacan_lock'
341
364
  | 'keyincode_lock'
342
365
  | 'omnitec_lock'
343
366
  | 'kisi_lock'
@@ -386,6 +409,7 @@ export type DevicesListParameters = {
386
409
  | 'tedee_lock'
387
410
  | 'akiles_lock'
388
411
  | 'ultraloq_lock'
412
+ | 'yacan_lock'
389
413
  | 'keyincode_lock'
390
414
  | 'omnitec_lock'
391
415
  | 'kisi_lock'
@@ -463,11 +487,12 @@ export type DevicesListParameters = {
463
487
  | 'omnitec'
464
488
  | 'kisi'
465
489
  | 'slack'
490
+ | 'yacan'
466
491
  | undefined
467
492
  /**
468
493
  * Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`.
469
494
  */
470
- page_cursor?: string | undefined
495
+ page_cursor?: string | null | undefined
471
496
  /**
472
497
  * String for which to search. Filters returned devices to include all records that satisfy a partial match using `device_id` (full or partial UUID prefix, minimum 4 characters), `connected_account_id`, `display_name`, `custom_metadata` or `location.location_name`.
473
498
  */
@@ -479,7 +504,7 @@ export type DevicesListParameters = {
479
504
  /**
480
505
  * @deprecated Use `space_id`.
481
506
  */
482
- unstable_location_id?: string | undefined
507
+ unstable_location_id?: string | null | undefined
483
508
  /**
484
509
  * Your own internal user ID for the user for which you want to list devices.
485
510
  */
@@ -1893,14 +1918,14 @@ export type DevicesUpdateParameters = {
1893
1918
  /**
1894
1919
  * Name for the device.
1895
1920
  */
1896
- name?: string | undefined
1921
+ name?: string | null | undefined
1897
1922
 
1898
1923
  properties?:
1899
1924
  | {
1900
1925
  /**
1901
1926
  * Name for the device.
1902
1927
  */
1903
- name?: string | undefined
1928
+ name?: string | null | undefined
1904
1929
  }
1905
1930
  | undefined
1906
1931
  }
@@ -28,6 +28,7 @@ import {
28
28
  limitToSeamHttpRequestOptions,
29
29
  parseOptions,
30
30
  } from 'lib/parse-options.js'
31
+ import { assertValidRequestParameters } from 'lib/request-parameters.js'
31
32
  import { SeamHttpClientSessions } from 'lib/routes/client-sessions/index.js'
32
33
  import { SeamHttpRequest } from 'lib/seam-http-request.js'
33
34
  import { SeamPaginator } from 'lib/seam-paginator.js'
@@ -164,6 +165,8 @@ export class SeamHttpDevicesSimulate {
164
165
  parameters: DevicesSimulateConnectParameters,
165
166
  options: DevicesSimulateConnectOptions = {},
166
167
  ): DevicesSimulateConnectRequest {
168
+ assertValidRequestParameters(parameters, '/devices/simulate/connect', true)
169
+
167
170
  return new SeamHttpRequest(this, {
168
171
  pathname: '/devices/simulate/connect',
169
172
  method: 'POST',
@@ -183,6 +186,12 @@ export class SeamHttpDevicesSimulate {
183
186
  parameters: DevicesSimulateConnectToHubParameters,
184
187
  options: DevicesSimulateConnectToHubOptions = {},
185
188
  ): DevicesSimulateConnectToHubRequest {
189
+ assertValidRequestParameters(
190
+ parameters,
191
+ '/devices/simulate/connect_to_hub',
192
+ true,
193
+ )
194
+
186
195
  return new SeamHttpRequest(this, {
187
196
  pathname: '/devices/simulate/connect_to_hub',
188
197
  method: 'POST',
@@ -199,6 +208,12 @@ export class SeamHttpDevicesSimulate {
199
208
  parameters: DevicesSimulateDisconnectParameters,
200
209
  options: DevicesSimulateDisconnectOptions = {},
201
210
  ): DevicesSimulateDisconnectRequest {
211
+ assertValidRequestParameters(
212
+ parameters,
213
+ '/devices/simulate/disconnect',
214
+ true,
215
+ )
216
+
202
217
  return new SeamHttpRequest(this, {
203
218
  pathname: '/devices/simulate/disconnect',
204
219
  method: 'POST',
@@ -219,6 +234,12 @@ export class SeamHttpDevicesSimulate {
219
234
  parameters: DevicesSimulateDisconnectFromHubParameters,
220
235
  options: DevicesSimulateDisconnectFromHubOptions = {},
221
236
  ): DevicesSimulateDisconnectFromHubRequest {
237
+ assertValidRequestParameters(
238
+ parameters,
239
+ '/devices/simulate/disconnect_from_hub',
240
+ true,
241
+ )
242
+
222
243
  return new SeamHttpRequest(this, {
223
244
  pathname: '/devices/simulate/disconnect_from_hub',
224
245
  method: 'POST',
@@ -237,6 +258,12 @@ export class SeamHttpDevicesSimulate {
237
258
  parameters: DevicesSimulatePaidSubscriptionParameters,
238
259
  options: DevicesSimulatePaidSubscriptionOptions = {},
239
260
  ): DevicesSimulatePaidSubscriptionRequest {
261
+ assertValidRequestParameters(
262
+ parameters,
263
+ '/devices/simulate/paid_subscription',
264
+ true,
265
+ )
266
+
240
267
  return new SeamHttpRequest(this, {
241
268
  pathname: '/devices/simulate/paid_subscription',
242
269
  method: 'POST',
@@ -253,6 +280,8 @@ export class SeamHttpDevicesSimulate {
253
280
  parameters: DevicesSimulateRemoveParameters,
254
281
  options: DevicesSimulateRemoveOptions = {},
255
282
  ): DevicesSimulateRemoveRequest {
283
+ assertValidRequestParameters(parameters, '/devices/simulate/remove', true)
284
+
256
285
  return new SeamHttpRequest(this, {
257
286
  pathname: '/devices/simulate/remove',
258
287
  method: 'POST',
@@ -28,6 +28,10 @@ import {
28
28
  limitToSeamHttpRequestOptions,
29
29
  parseOptions,
30
30
  } from 'lib/parse-options.js'
31
+ import {
32
+ assertValidRequestParameters,
33
+ type RequireAtLeastOne,
34
+ } from 'lib/request-parameters.js'
31
35
  import type { UnmanagedDevice } from 'lib/resources/unmanaged-device.js'
32
36
  import { SeamHttpClientSessions } from 'lib/routes/client-sessions/index.js'
33
37
  import { SeamHttpRequest } from 'lib/seam-http-request.js'
@@ -166,13 +170,15 @@ export class SeamHttpDevicesUnmanaged {
166
170
  * You must specify either `device_id` or `name`.
167
171
  */
168
172
  get(
169
- parameters?: DevicesUnmanagedGetParameters,
173
+ parameters: DevicesUnmanagedGetParameters,
170
174
  options: DevicesUnmanagedGetOptions = {},
171
175
  ): DevicesUnmanagedGetRequest {
176
+ assertValidRequestParameters(parameters, '/devices/unmanaged/get', true)
177
+
172
178
  return new SeamHttpRequest(this, {
173
179
  pathname: '/devices/unmanaged/get',
174
- method: 'POST',
175
- body: parameters,
180
+ method: 'GET',
181
+ params: parameters,
176
182
  responseKey: 'device',
177
183
  options,
178
184
  })
@@ -187,6 +193,8 @@ export class SeamHttpDevicesUnmanaged {
187
193
  parameters?: DevicesUnmanagedListParameters,
188
194
  options: DevicesUnmanagedListOptions = {},
189
195
  ): DevicesUnmanagedListRequest {
196
+ assertValidRequestParameters(parameters, '/devices/unmanaged/list', false)
197
+
190
198
  return new SeamHttpRequest(this, {
191
199
  pathname: '/devices/unmanaged/list',
192
200
  method: 'POST',
@@ -205,6 +213,8 @@ export class SeamHttpDevicesUnmanaged {
205
213
  parameters: DevicesUnmanagedUpdateParameters,
206
214
  options: DevicesUnmanagedUpdateOptions = {},
207
215
  ): DevicesUnmanagedUpdateRequest {
216
+ assertValidRequestParameters(parameters, '/devices/unmanaged/update', true)
217
+
208
218
  return new SeamHttpRequest(this, {
209
219
  pathname: '/devices/unmanaged/update',
210
220
  method: 'PATCH',
@@ -215,7 +225,7 @@ export class SeamHttpDevicesUnmanaged {
215
225
  }
216
226
  }
217
227
 
218
- export type DevicesUnmanagedGetParameters = {
228
+ export type DevicesUnmanagedGetParameters = RequireAtLeastOne<{
219
229
  /**
220
230
  * ID of the unmanaged device that you want to get.
221
231
  */
@@ -224,7 +234,7 @@ export type DevicesUnmanagedGetParameters = {
224
234
  * Name of the unmanaged device that you want to get.
225
235
  */
226
236
  name?: string | undefined
227
- }
237
+ }>
228
238
 
229
239
  /**
230
240
  * @deprecated Use DevicesUnmanagedGetRequest instead.
@@ -255,10 +265,6 @@ export type DevicesUnmanagedListParameters = {
255
265
  * Timestamp by which to limit returned devices. Returns devices created before this timestamp.
256
266
  */
257
267
  created_before?: string | undefined
258
- /**
259
- * Set of key:value [custom metadata](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device) pairs for which you want to list devices.
260
- */
261
- custom_metadata_has?: Record<string, unknown> | undefined
262
268
  /**
263
269
  * Customer key for which you want to list devices.
264
270
  */
@@ -297,6 +303,7 @@ export type DevicesUnmanagedListParameters = {
297
303
  | 'tedee_lock'
298
304
  | 'akiles_lock'
299
305
  | 'ultraloq_lock'
306
+ | 'yacan_lock'
300
307
  | 'keyincode_lock'
301
308
  | 'omnitec_lock'
302
309
  | 'kisi_lock'
@@ -345,6 +352,7 @@ export type DevicesUnmanagedListParameters = {
345
352
  | 'tedee_lock'
346
353
  | 'akiles_lock'
347
354
  | 'ultraloq_lock'
355
+ | 'yacan_lock'
348
356
  | 'keyincode_lock'
349
357
  | 'omnitec_lock'
350
358
  | 'kisi_lock'
@@ -422,27 +430,16 @@ export type DevicesUnmanagedListParameters = {
422
430
  | 'omnitec'
423
431
  | 'kisi'
424
432
  | 'slack'
433
+ | 'yacan'
425
434
  | undefined
426
435
  /**
427
436
  * Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`.
428
437
  */
429
- page_cursor?: string | undefined
438
+ page_cursor?: string | null | undefined
430
439
  /**
431
440
  * String for which to search. Filters returned devices to include all records that satisfy a partial match using `device_id` (full or partial UUID prefix, minimum 4 characters), `connected_account_id`, `display_name`, `custom_metadata` or `location.location_name`.
432
441
  */
433
442
  search?: string | undefined
434
- /**
435
- * ID of the space for which you want to list devices.
436
- */
437
- space_id?: string | undefined
438
- /**
439
- * @deprecated Use `space_id`.
440
- */
441
- unstable_location_id?: string | undefined
442
- /**
443
- * Your own internal user ID for the user for which you want to list devices.
444
- */
445
- user_identifier_key?: string | undefined
446
443
  }
447
444
 
448
445
  /**
@@ -28,6 +28,10 @@ import {
28
28
  limitToSeamHttpRequestOptions,
29
29
  parseOptions,
30
30
  } from 'lib/parse-options.js'
31
+ import {
32
+ assertValidRequestParameters,
33
+ type RequireAtLeastOne,
34
+ } from 'lib/request-parameters.js'
31
35
  import type { SeamEvent } from 'lib/resources/event.js'
32
36
  import { SeamHttpClientSessions } from 'lib/routes/client-sessions/index.js'
33
37
  import { SeamHttpRequest } from 'lib/seam-http-request.js'
@@ -162,13 +166,15 @@ export class SeamHttpEvents {
162
166
  * Returns a specified event. This endpoint returns the same event that would be sent to a [webhook](https://docs.seam.co/developer-tools/webhooks), but it enables you to retrieve an event that already took place.
163
167
  */
164
168
  get(
165
- parameters?: EventsGetParameters,
169
+ parameters: EventsGetParameters,
166
170
  options: EventsGetOptions = {},
167
171
  ): EventsGetRequest {
172
+ assertValidRequestParameters(parameters, '/events/get', true)
173
+
168
174
  return new SeamHttpRequest(this, {
169
175
  pathname: '/events/get',
170
- method: 'POST',
171
- body: parameters,
176
+ method: 'GET',
177
+ params: parameters,
172
178
  responseKey: 'event',
173
179
  options,
174
180
  })
@@ -178,9 +184,11 @@ export class SeamHttpEvents {
178
184
  * Returns a list of all events. This endpoint returns the same events that would be sent to a [webhook](https://docs.seam.co/developer-tools/webhooks), but it enables you to filter or see events that already took place.
179
185
  */
180
186
  list(
181
- parameters?: EventsListParameters,
187
+ parameters: EventsListParameters,
182
188
  options: EventsListOptions = {},
183
189
  ): EventsListRequest {
190
+ assertValidRequestParameters(parameters, '/events/list', true)
191
+
184
192
  return new SeamHttpRequest(this, {
185
193
  pathname: '/events/list',
186
194
  method: 'POST',
@@ -191,7 +199,7 @@ export class SeamHttpEvents {
191
199
  }
192
200
  }
193
201
 
194
- export type EventsGetParameters = {
202
+ export type EventsGetParameters = RequireAtLeastOne<{
195
203
  /**
196
204
  * Unique identifier for the device that triggered the event that you want to get.
197
205
  */
@@ -204,7 +212,7 @@ export type EventsGetParameters = {
204
212
  * Type of the event that you want to get.
205
213
  */
206
214
  event_type?: string | undefined
207
- }
215
+ }>
208
216
 
209
217
  /**
210
218
  * @deprecated Use EventsGetRequest instead.
@@ -215,7 +223,7 @@ export type EventsGetRequest = SeamHttpRequest<EventsGetResponse, 'event'>
215
223
 
216
224
  export interface EventsGetOptions {}
217
225
 
218
- export type EventsListParameters = {
226
+ export type EventsListParameters = RequireAtLeastOne<{
219
227
  /**
220
228
  * ID of the access code for which you want to list events.
221
229
  */
@@ -271,7 +279,7 @@ export type EventsListParameters = {
271
279
  /**
272
280
  * Lower and upper timestamps to define an exclusive interval containing the events that you want to list. You must include `since` or `between`.
273
281
  */
274
- between?: Array<{}> | undefined
282
+ between?: Array<string> | undefined
275
283
  /**
276
284
  * ID of the Connect Webview for which you want to list events.
277
285
  */
@@ -550,7 +558,7 @@ export type EventsListParameters = {
550
558
  * ID of the user identity for which you want to list events.
551
559
  */
552
560
  user_identity_id?: string | undefined
553
- }
561
+ }>
554
562
 
555
563
  /**
556
564
  * @deprecated Use EventsListRequest instead.
@@ -28,6 +28,10 @@ import {
28
28
  limitToSeamHttpRequestOptions,
29
29
  parseOptions,
30
30
  } from 'lib/parse-options.js'
31
+ import {
32
+ assertValidRequestParameters,
33
+ type RequireAtLeastOne,
34
+ } from 'lib/request-parameters.js'
31
35
  import type { InstantKey } from 'lib/resources/instant-key.js'
32
36
  import { SeamHttpClientSessions } from 'lib/routes/client-sessions/index.js'
33
37
  import { SeamHttpRequest } from 'lib/seam-http-request.js'
@@ -165,10 +169,12 @@ export class SeamHttpInstantKeys {
165
169
  parameters: InstantKeysDeleteParameters,
166
170
  options: InstantKeysDeleteOptions = {},
167
171
  ): InstantKeysDeleteRequest {
172
+ assertValidRequestParameters(parameters, '/instant_keys/delete', true)
173
+
168
174
  return new SeamHttpRequest(this, {
169
175
  pathname: '/instant_keys/delete',
170
- method: 'POST',
171
- body: parameters,
176
+ method: 'DELETE',
177
+ params: parameters,
172
178
  responseKey: undefined,
173
179
  options,
174
180
  })
@@ -178,13 +184,15 @@ export class SeamHttpInstantKeys {
178
184
  * Gets an [instant key](https://docs.seam.co/capability-guides/instant-keys).
179
185
  */
180
186
  get(
181
- parameters?: InstantKeysGetParameters,
187
+ parameters: InstantKeysGetParameters,
182
188
  options: InstantKeysGetOptions = {},
183
189
  ): InstantKeysGetRequest {
190
+ assertValidRequestParameters(parameters, '/instant_keys/get', true)
191
+
184
192
  return new SeamHttpRequest(this, {
185
193
  pathname: '/instant_keys/get',
186
- method: 'POST',
187
- body: parameters,
194
+ method: 'GET',
195
+ params: parameters,
188
196
  responseKey: 'instant_key',
189
197
  options,
190
198
  })
@@ -197,10 +205,12 @@ export class SeamHttpInstantKeys {
197
205
  parameters?: InstantKeysListParameters,
198
206
  options: InstantKeysListOptions = {},
199
207
  ): InstantKeysListRequest {
208
+ assertValidRequestParameters(parameters, '/instant_keys/list', false)
209
+
200
210
  return new SeamHttpRequest(this, {
201
211
  pathname: '/instant_keys/list',
202
- method: 'POST',
203
- body: parameters,
212
+ method: 'GET',
213
+ params: parameters,
204
214
  responseKey: 'instant_keys',
205
215
  options,
206
216
  })
@@ -223,7 +233,7 @@ export type InstantKeysDeleteRequest = SeamHttpRequest<void, undefined>
223
233
 
224
234
  export interface InstantKeysDeleteOptions {}
225
235
 
226
- export type InstantKeysGetParameters = {
236
+ export type InstantKeysGetParameters = RequireAtLeastOne<{
227
237
  /**
228
238
  * ID of the instant key to get.
229
239
  */
@@ -232,7 +242,7 @@ export type InstantKeysGetParameters = {
232
242
  * URL of the instant key to get.
233
243
  */
234
244
  instant_key_url?: string | undefined
235
- }
245
+ }>
236
246
 
237
247
  /**
238
248
  * @deprecated Use InstantKeysGetRequest instead.