@seamapi/http 2.38.0 → 2.40.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 (48) hide show
  1. package/lib/resources/access-grant.d.ts +9 -5
  2. package/lib/resources/access-method.d.ts +39 -1
  3. package/lib/resources/acs-entrance.d.ts +6 -2
  4. package/lib/resources/acs-system.d.ts +15 -0
  5. package/lib/resources/action-attempt.d.ts +341 -8
  6. package/lib/resources/connect-webview.d.ts +1 -1
  7. package/lib/resources/connected-account.d.ts +1 -1
  8. package/lib/resources/device-provider.d.ts +25 -1
  9. package/lib/resources/device.d.ts +121 -2
  10. package/lib/resources/event.d.ts +1 -1
  11. package/lib/resources/phone.d.ts +702 -10
  12. package/lib/resources/unmanaged-access-grant.d.ts +9 -5
  13. package/lib/resources/unmanaged-access-method.d.ts +39 -1
  14. package/lib/resources/unmanaged-device.d.ts +25 -1
  15. package/lib/routes/connect-webviews/connect-webviews.d.ts +2 -2
  16. package/lib/routes/connected-accounts/connected-accounts.d.ts +1 -1
  17. package/lib/routes/customers/customers.d.ts +21 -0
  18. package/lib/routes/customers/customers.js +1 -0
  19. package/lib/routes/customers/customers.js.map +1 -1
  20. package/lib/routes/devices/devices.d.ts +3 -3
  21. package/lib/routes/devices/unmanaged/unmanaged.d.ts +3 -3
  22. package/lib/routes/seam-http-endpoints.d.ts +1 -0
  23. package/lib/routes/seam-http-endpoints.js +1 -0
  24. package/lib/routes/seam-http-endpoints.js.map +1 -1
  25. package/lib/version.d.ts +1 -1
  26. package/lib/version.js +1 -1
  27. package/package.json +2 -2
  28. package/src/lib/resources/access-grant.ts +9 -6
  29. package/src/lib/resources/access-method.ts +47 -1
  30. package/src/lib/resources/acs-entrance.ts +17 -12
  31. package/src/lib/resources/acs-system.ts +18 -0
  32. package/src/lib/resources/action-attempt.ts +434 -24
  33. package/src/lib/resources/connect-webview.ts +6 -1
  34. package/src/lib/resources/connected-account.ts +6 -1
  35. package/src/lib/resources/device-provider.ts +25 -0
  36. package/src/lib/resources/device.ts +136 -1
  37. package/src/lib/resources/event.ts +1 -0
  38. package/src/lib/resources/phone.ts +855 -22
  39. package/src/lib/resources/unmanaged-access-grant.ts +9 -6
  40. package/src/lib/resources/unmanaged-access-method.ts +47 -1
  41. package/src/lib/resources/unmanaged-device.ts +25 -0
  42. package/src/lib/routes/connect-webviews/connect-webviews.ts +7 -1
  43. package/src/lib/routes/connected-accounts/connected-accounts.ts +6 -1
  44. package/src/lib/routes/customers/customers.ts +21 -0
  45. package/src/lib/routes/devices/devices.ts +3 -0
  46. package/src/lib/routes/devices/unmanaged/unmanaged.ts +3 -0
  47. package/src/lib/routes/seam-http-endpoints.ts +1 -0
  48. package/src/lib/version.ts +1 -1
@@ -299,9 +299,9 @@ export type UnmanagedAccessGrant = {
299
299
  device_id: string
300
300
 
301
301
  /**
302
- * Reason the access code could not be revoked (e.g. `offline_access_code_not_revocable`).
302
+ * Reason the access code could not be revoked.
303
303
  */
304
- error_code: string
304
+ error_code: 'offline_access_code_not_revocable'
305
305
 
306
306
  /**
307
307
  * Human-readable description of why revocation failed.
@@ -342,19 +342,22 @@ export type UnmanagedAccessGrant = {
342
342
  */
343
343
  warning_code: 'updating_access_times'
344
344
  } /**
345
- * Indicates that the requested PIN code was already in use on a device, so a different code was assigned.
345
+ * Indicates that the requested PIN code could not be used, so a different code was assigned. For example, the code was already in use on a device, or the access system rejected it because it did not meet its PIN rules.
346
346
  */
347
347
  | {
348
+ /**
349
+ * ID of the access method whose requested code was unavailable. Present when an access system, such as Salto KS, assigned a different code.
350
+ */
351
+ access_method_id?: string | undefined
348
352
  /**
349
353
  * Date and time at which Seam created the warning.
350
354
  */
351
355
  created_at: string
352
356
 
353
357
  /**
354
- * ID of the device where the requested code was unavailable.
358
+ * ID of the device where the requested code was unavailable. Present when the code was set directly on a device.
355
359
  */
356
- device_id: string
357
-
360
+ device_id?: string | undefined
358
361
  /**
359
362
  * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
360
363
  */
@@ -92,7 +92,7 @@ export type UnmanagedAccessMethod = {
92
92
  */
93
93
  is_ready_for_assignment?: boolean | undefined
94
94
  /**
95
- * Indicates whether the access method is ready to be encoded. This is true when the credential has been created and the card has not yet been issued.
95
+ * Indicates whether the access method is ready to be encoded. This is true when the card has not yet been issued and the access system has received all the access the card needs. While it is false, `pending_mutations` contains `waiting_for_access_on_acs_system`.
96
96
  */
97
97
  is_ready_for_encoding?: boolean | undefined
98
98
  /**
@@ -230,6 +230,24 @@ export type UnmanagedAccessMethod = {
230
230
  */
231
231
  starts_at: string | null
232
232
  }
233
+ } /**
234
+ * The access system has not yet received all the access this card needs. A card encoded now would carry only the access the system already has, so wait until this clears before encoding.
235
+ */
236
+ | {
237
+ /**
238
+ * Date and time at which the mutation was created.
239
+ */
240
+ created_at: string
241
+
242
+ /**
243
+ * Detailed description of the mutation.
244
+ */
245
+ message: string
246
+
247
+ /**
248
+ * Mutation code to indicate that the access system has not yet received all the access this card needs, so the card is not ready to be encoded.
249
+ */
250
+ mutation_code: 'waiting_for_access_on_acs_system'
233
251
  }
234
252
  >
235
253
 
@@ -349,6 +367,34 @@ export type UnmanagedAccessMethod = {
349
367
  * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
350
368
  */
351
369
  warning_code: 'user_identity_missing_phone_number'
370
+ } /**
371
+ * Indicates that the access system could not use the PIN code requested for this [access method](https://www.seam.co/docs/use-cases/granting-access/creating-an-access-grant), for example because it did not meet the access system's PIN rules, so the access system assigned a different code. Give the recipient the assigned code.
372
+ */
373
+ | {
374
+ /**
375
+ * Date and time at which Seam created the warning.
376
+ */
377
+ created_at: string
378
+
379
+ /**
380
+ * Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.
381
+ */
382
+ message: string
383
+
384
+ /**
385
+ * The PIN code that was assigned instead.
386
+ */
387
+ new_code: string
388
+
389
+ /**
390
+ * The originally requested PIN code that could not be used.
391
+ */
392
+ original_code: string
393
+
394
+ /**
395
+ * Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.
396
+ */
397
+ warning_code: 'requested_code_unavailable'
352
398
  }
353
399
  >
354
400
 
@@ -27,6 +27,18 @@ export type UnmanagedDevice = {
27
27
  * Indicates whether the thermostat supports simultaneous heating and cooling.
28
28
  */
29
29
  can_hvac_heat_cool?: boolean | undefined
30
+ /**
31
+ * Indicates whether the speaker supports muting.
32
+ */
33
+ can_mute_speaker?: boolean | undefined
34
+ /**
35
+ * Indicates whether the speaker supports pausing playback.
36
+ */
37
+ can_pause_speaker_playback?: boolean | undefined
38
+ /**
39
+ * Indicates whether the speaker supports playing a chime.
40
+ */
41
+ can_play_speaker_chime?: boolean | undefined
30
42
  /**
31
43
  * Indicates whether the device supports programming offline access codes.
32
44
  */
@@ -55,10 +67,18 @@ export type UnmanagedDevice = {
55
67
  * Indicates whether the device supports remote unlocking.
56
68
  */
57
69
  can_remotely_unlock?: boolean | undefined
70
+ /**
71
+ * Indicates whether the speaker supports resuming playback.
72
+ */
73
+ can_resume_speaker_playback?: boolean | undefined
58
74
  /**
59
75
  * Indicates whether the thermostat supports running climate programs.
60
76
  */
61
77
  can_run_thermostat_programs?: boolean | undefined
78
+ /**
79
+ * Indicates whether the speaker supports setting its volume.
80
+ */
81
+ can_set_speaker_volume?: boolean | undefined
62
82
  /**
63
83
  * Indicates whether the device supports simulating connection in a sandbox.
64
84
  */
@@ -95,6 +115,10 @@ export type UnmanagedDevice = {
95
115
  * Indicates whether the lock supports unlocking with an access code.
96
116
  */
97
117
  can_unlock_with_code?: boolean | undefined
118
+ /**
119
+ * Indicates whether the speaker supports unmuting.
120
+ */
121
+ can_unmute_speaker?: boolean | undefined
98
122
  /**
99
123
  * Collection of capabilities that the device supports when connected to Seam. Values are `access_code`, which indicates that the device can manage and utilize digital PIN codes for secure access; `lock`, which indicates that the device controls a door locking mechanism, enabling the remote opening and closing of doors and other entry points; `noise_detection`, which indicates that the device supports monitoring and responding to ambient noise levels; `thermostat`, which indicates that the device can regulate and adjust indoor temperatures; `battery`, which indicates that the device can manage battery life and health; and `phone`, which indicates that the device is a mobile device, such as a smartphone. **Important:** Superseded by [capability flags](https://www.seam.co/docs/capability-guides/device-and-system-capabilities#capability-flags).
100
124
  */
@@ -177,6 +201,7 @@ export type UnmanagedDevice = {
177
201
  | 'tapo_camera'
178
202
  | 'arlo_camera'
179
203
  | 'reolink_camera'
204
+ | 'sonos_speaker'
180
205
 
181
206
  /**
182
207
  * Display name of the device, defaults to nickname (if it is set) or `properties.appearance.name`, otherwise. Enables administrators and users to identify the device easily, especially when there are numerous devices.
@@ -259,7 +259,12 @@ export type ConnectWebviewsCreateParameters = {
259
259
  */
260
260
  accepted_capabilities?:
261
261
  | Array<
262
- 'lock' | 'thermostat' | 'noise_sensor' | 'access_control' | 'camera'
262
+ | 'lock'
263
+ | 'thermostat'
264
+ | 'noise_sensor'
265
+ | 'access_control'
266
+ | 'camera'
267
+ | 'speaker'
263
268
  >
264
269
  | undefined
265
270
  /**
@@ -335,6 +340,7 @@ export type ConnectWebviewsCreateParameters = {
335
340
  | 'omnitec'
336
341
  | 'kisi'
337
342
  | 'aqara'
343
+ | 'sonos'
338
344
  | 'yale_access'
339
345
  | 'hid_cm'
340
346
  | 'google_nest'
@@ -388,7 +388,12 @@ export type ConnectedAccountsUpdateParameters = {
388
388
  */
389
389
  accepted_capabilities?:
390
390
  | Array<
391
- 'lock' | 'thermostat' | 'noise_sensor' | 'access_control' | 'camera'
391
+ | 'lock'
392
+ | 'thermostat'
393
+ | 'noise_sensor'
394
+ | 'access_control'
395
+ | 'camera'
396
+ | 'speaker'
392
397
  >
393
398
  | undefined
394
399
  /**
@@ -184,6 +184,7 @@ export class SeamHttpCustomers {
184
184
  /**
185
185
  * Deletes customer data including resources like spaces, properties, rooms, users, etc.
186
186
  * This will delete the partner resources and any related Seam resources (user identities, access grants, spaces).
187
+ * Space keys also match spaces created directly with a `space_key` (for example, through `/spaces/create`).
187
188
  */
188
189
  deleteData(
189
190
  parameters?: CustomersDeleteDataParameters,
@@ -479,6 +480,10 @@ export type CustomersCreatePortalParameters = {
479
480
  name?: string | undefined
480
481
  }>
481
482
  | undefined
483
+ /**
484
+ * Battery level, from 0 to 1, at or below which `device.low_battery` events fire for this customer's devices. Overrides the workspace and device defaults. Pass `null` to remove the customer's override.
485
+ */
486
+ low_battery_alert_threshold?: number | null | undefined
482
487
  /**
483
488
  * List of short-term rental properties.
484
489
  */
@@ -927,6 +932,14 @@ export type CustomersCreatePortalParameters = {
927
932
  * Indicates whether the customer can customize the Instant Key profile for their properties.
928
933
  */
929
934
  allow_instant_key_customization?: boolean | undefined
935
+ /**
936
+ * Indicates whether the customer can customize their notification settings, such as the low-battery alert threshold.
937
+ */
938
+ allow_notification_customization?: boolean | undefined
939
+ /**
940
+ * Indicates whether the customer can customize the sound automation rules for their properties.
941
+ */
942
+ allow_sound_automation_rule_customization?: boolean | undefined
930
943
  /**
931
944
  * Whether to exclude this feature from the portal.
932
945
  */
@@ -999,6 +1012,10 @@ export type CustomersCreatePortalParameters = {
999
1012
  * Whether to exclude this feature from the portal.
1000
1013
  */
1001
1014
  exclude?: boolean | undefined
1015
+ /**
1016
+ * Indicates whether to prevent the customer from converting their devices between managed and unmanaged. Managed devices are billed.
1017
+ */
1018
+ exclude_device_management?: boolean | undefined
1002
1019
  /**
1003
1020
  * Indicates whether the customer can manage reservations for their properties.
1004
1021
  */
@@ -1460,6 +1477,10 @@ export type CustomersPushDataParameters = {
1460
1477
  name?: string | undefined
1461
1478
  }>
1462
1479
  | undefined
1480
+ /**
1481
+ * Battery level, from 0 to 1, at or below which `device.low_battery` events fire for this customer's devices. Overrides the workspace and device defaults. Pass `null` to remove the customer's override.
1482
+ */
1483
+ low_battery_alert_threshold?: number | null | undefined
1463
1484
  /**
1464
1485
  * List of short-term rental properties.
1465
1486
  */
@@ -386,6 +386,7 @@ export type DevicesListParameters = {
386
386
  | 'tapo_camera'
387
387
  | 'arlo_camera'
388
388
  | 'reolink_camera'
389
+ | 'sonos_speaker'
389
390
  | undefined
390
391
  /**
391
392
  * Array of device types for which you want to list devices.
@@ -438,6 +439,7 @@ export type DevicesListParameters = {
438
439
  | 'tapo_camera'
439
440
  | 'arlo_camera'
440
441
  | 'reolink_camera'
442
+ | 'sonos_speaker'
441
443
  >
442
444
  | undefined
443
445
  /**
@@ -505,6 +507,7 @@ export type DevicesListParameters = {
505
507
  | 'kisi'
506
508
  | 'slack'
507
509
  | 'yacan'
510
+ | 'sonos'
508
511
  | undefined
509
512
  /**
510
513
  * Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`.
@@ -333,6 +333,7 @@ export type DevicesUnmanagedListParameters = {
333
333
  | 'tapo_camera'
334
334
  | 'arlo_camera'
335
335
  | 'reolink_camera'
336
+ | 'sonos_speaker'
336
337
  | undefined
337
338
  /**
338
339
  * Array of device types for which you want to list devices.
@@ -385,6 +386,7 @@ export type DevicesUnmanagedListParameters = {
385
386
  | 'tapo_camera'
386
387
  | 'arlo_camera'
387
388
  | 'reolink_camera'
389
+ | 'sonos_speaker'
388
390
  >
389
391
  | undefined
390
392
  /**
@@ -452,6 +454,7 @@ export type DevicesUnmanagedListParameters = {
452
454
  | 'kisi'
453
455
  | 'slack'
454
456
  | 'yacan'
457
+ | 'sonos'
455
458
  | undefined
456
459
  /**
457
460
  * Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`.
@@ -2629,6 +2629,7 @@ export class SeamHttpEndpoints {
2629
2629
  /**
2630
2630
  * Deletes customer data including resources like spaces, properties, rooms, users, etc.
2631
2631
  * This will delete the partner resources and any related Seam resources (user identities, access grants, spaces).
2632
+ * Space keys also match spaces created directly with a `space_key` (for example, through `/spaces/create`).
2632
2633
  */
2633
2634
  get '/customers/delete_data'(): (
2634
2635
  parameters?: CustomersDeleteDataParameters,
@@ -1,3 +1,3 @@
1
- const seamapiJavascriptHttpVersion = '2.38.0'
1
+ const seamapiJavascriptHttpVersion = '2.40.0'
2
2
 
3
3
  export default seamapiJavascriptHttpVersion