@seamapi/http 2.37.0 → 2.39.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 (46) hide show
  1. package/lib/resources/access-grant.d.ts +17 -2
  2. package/lib/resources/access-method.d.ts +31 -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 +396 -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 +17 -1
  9. package/lib/resources/device.d.ts +112 -1
  10. package/lib/resources/phone.d.ts +702 -10
  11. package/lib/resources/unmanaged-access-grant.d.ts +17 -2
  12. package/lib/resources/unmanaged-access-method.d.ts +31 -1
  13. package/lib/resources/unmanaged-device.d.ts +17 -1
  14. package/lib/routes/connect-webviews/connect-webviews.d.ts +2 -2
  15. package/lib/routes/connected-accounts/connected-accounts.d.ts +1 -1
  16. package/lib/routes/customers/customers.d.ts +13 -0
  17. package/lib/routes/customers/customers.js +1 -0
  18. package/lib/routes/customers/customers.js.map +1 -1
  19. package/lib/routes/devices/devices.d.ts +3 -3
  20. package/lib/routes/devices/unmanaged/unmanaged.d.ts +3 -3
  21. package/lib/routes/seam-http-endpoints.d.ts +1 -0
  22. package/lib/routes/seam-http-endpoints.js +1 -0
  23. package/lib/routes/seam-http-endpoints.js.map +1 -1
  24. package/lib/version.d.ts +1 -1
  25. package/lib/version.js +1 -1
  26. package/package.json +2 -2
  27. package/src/lib/resources/access-grant.ts +41 -23
  28. package/src/lib/resources/access-method.ts +53 -17
  29. package/src/lib/resources/acs-entrance.ts +17 -12
  30. package/src/lib/resources/acs-system.ts +18 -0
  31. package/src/lib/resources/action-attempt.ts +503 -25
  32. package/src/lib/resources/connect-webview.ts +6 -1
  33. package/src/lib/resources/connected-account.ts +6 -1
  34. package/src/lib/resources/device-provider.ts +17 -0
  35. package/src/lib/resources/device.ts +127 -0
  36. package/src/lib/resources/phone.ts +855 -22
  37. package/src/lib/resources/unmanaged-access-grant.ts +41 -23
  38. package/src/lib/resources/unmanaged-access-method.ts +53 -17
  39. package/src/lib/resources/unmanaged-device.ts +17 -0
  40. package/src/lib/routes/connect-webviews/connect-webviews.ts +7 -1
  41. package/src/lib/routes/connected-accounts/connected-accounts.ts +6 -1
  42. package/src/lib/routes/customers/customers.ts +13 -0
  43. package/src/lib/routes/devices/devices.ts +3 -0
  44. package/src/lib/routes/devices/unmanaged/unmanaged.ts +3 -0
  45. package/src/lib/routes/seam-http-endpoints.ts +1 -0
  46. package/src/lib/version.ts +1 -1
@@ -38,27 +38,45 @@ export type UnmanagedAccessGrant = {
38
38
  /**
39
39
  * Indicates that Seam could not create one or more of the requested access methods for the access grant.
40
40
  */
41
- {
42
- /**
43
- * Date and time at which Seam created the error.
44
- */
45
- created_at: string
46
-
47
- /**
48
- * Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
49
- */
50
- error_code: 'cannot_create_requested_access_methods'
51
-
52
- /**
53
- * Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
54
- */
55
- message: string
56
-
57
- /**
58
- * IDs of the devices that did not receive an access code at grant creation. Use these to identify which specific devices failed when the message reports a partial failure.
59
- */
60
- missing_device_ids?: Array<string> | undefined
61
- }
41
+ | {
42
+ /**
43
+ * Date and time at which Seam created the error.
44
+ */
45
+ created_at: string
46
+
47
+ /**
48
+ * Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
49
+ */
50
+ error_code: 'cannot_create_requested_access_methods'
51
+
52
+ /**
53
+ * Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
54
+ */
55
+ message: string
56
+
57
+ /**
58
+ * IDs of the devices that did not receive an access code at grant creation. Use these to identify which specific devices failed when the message reports a partial failure.
59
+ */
60
+ missing_device_ids?: Array<string> | undefined
61
+ } /**
62
+ * Indicates that the access system rejected the access that Seam tried to set up for this access grant, so its credentials cannot open the affected entrances. For example, a hotel room may already be reserved or checked in for another guest. The message contains the reason that the access system gave. Seam keeps retrying, and this error clears automatically once the access system accepts the access.
63
+ */
64
+ | {
65
+ /**
66
+ * Date and time at which Seam created the error.
67
+ */
68
+ created_at: string
69
+
70
+ /**
71
+ * Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
72
+ */
73
+ error_code: 'access_not_provisioned'
74
+
75
+ /**
76
+ * Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
77
+ */
78
+ message: string
79
+ }
62
80
  >
63
81
 
64
82
  /**
@@ -281,9 +299,9 @@ export type UnmanagedAccessGrant = {
281
299
  device_id: string
282
300
 
283
301
  /**
284
- * Reason the access code could not be revoked (e.g. `offline_access_code_not_revocable`).
302
+ * Reason the access code could not be revoked.
285
303
  */
286
- error_code: string
304
+ error_code: 'offline_access_code_not_revocable'
287
305
 
288
306
  /**
289
307
  * Human-readable description of why revocation failed.
@@ -38,22 +38,40 @@ export type UnmanagedAccessMethod = {
38
38
  /**
39
39
  * Indicates that Seam was unable to issue this [access method](https://www.seam.co/docs/use-cases/granting-access/creating-an-access-grant) before its access grant started, so the recipient may be unable to access the space. This usually points to a problem that needs attention, such as an offline or disconnected device. Seam keeps retrying, and this error clears automatically if the access method is eventually issued.
40
40
  */
41
- {
42
- /**
43
- * Date and time at which Seam created the error.
44
- */
45
- created_at: string
46
-
47
- /**
48
- * Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
49
- */
50
- error_code: 'failed_to_issue'
51
-
52
- /**
53
- * Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
54
- */
55
- message: string
56
- }
41
+ | {
42
+ /**
43
+ * Date and time at which Seam created the error.
44
+ */
45
+ created_at: string
46
+
47
+ /**
48
+ * Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
49
+ */
50
+ error_code: 'failed_to_issue'
51
+
52
+ /**
53
+ * Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
54
+ */
55
+ message: string
56
+ } /**
57
+ * Indicates that the access system rejected the access that Seam tried to set up for this access method, so its credential cannot open the affected entrances, even after it is issued. For example, a hotel room may already be reserved or checked in for another guest. The message contains the reason that the access system gave. Seam keeps retrying, and this error clears automatically once the access system accepts the access.
58
+ */
59
+ | {
60
+ /**
61
+ * Date and time at which Seam created the error.
62
+ */
63
+ created_at: string
64
+
65
+ /**
66
+ * Unique identifier of the type of error. Enables quick recognition and categorization of the issue.
67
+ */
68
+ error_code: 'access_not_provisioned'
69
+
70
+ /**
71
+ * Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
72
+ */
73
+ message: string
74
+ }
57
75
  >
58
76
 
59
77
  /**
@@ -74,7 +92,7 @@ export type UnmanagedAccessMethod = {
74
92
  */
75
93
  is_ready_for_assignment?: boolean | undefined
76
94
  /**
77
- * 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`.
78
96
  */
79
97
  is_ready_for_encoding?: boolean | undefined
80
98
  /**
@@ -212,6 +230,24 @@ export type UnmanagedAccessMethod = {
212
230
  */
213
231
  starts_at: string | null
214
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'
215
251
  }
216
252
  >
217
253
 
@@ -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 and unmuting.
32
+ */
33
+ can_mute_speaker?: boolean | undefined
34
+ /**
35
+ * Indicates whether the speaker supports pausing and resuming 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
  */
@@ -59,6 +71,10 @@ export type UnmanagedDevice = {
59
71
  * Indicates whether the thermostat supports running climate programs.
60
72
  */
61
73
  can_run_thermostat_programs?: boolean | undefined
74
+ /**
75
+ * Indicates whether the speaker supports setting its volume.
76
+ */
77
+ can_set_speaker_volume?: boolean | undefined
62
78
  /**
63
79
  * Indicates whether the device supports simulating connection in a sandbox.
64
80
  */
@@ -177,6 +193,7 @@ export type UnmanagedDevice = {
177
193
  | 'tapo_camera'
178
194
  | 'arlo_camera'
179
195
  | 'reolink_camera'
196
+ | 'sonos_speaker'
180
197
 
181
198
  /**
182
199
  * 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,10 @@ 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
930
939
  /**
931
940
  * Whether to exclude this feature from the portal.
932
941
  */
@@ -1460,6 +1469,10 @@ export type CustomersPushDataParameters = {
1460
1469
  name?: string | undefined
1461
1470
  }>
1462
1471
  | undefined
1472
+ /**
1473
+ * 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.
1474
+ */
1475
+ low_battery_alert_threshold?: number | null | undefined
1463
1476
  /**
1464
1477
  * List of short-term rental properties.
1465
1478
  */
@@ -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.37.0'
1
+ const seamapiJavascriptHttpVersion = '2.39.0'
2
2
 
3
3
  export default seamapiJavascriptHttpVersion