@seamapi/http 2.34.0 → 2.36.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 (84) hide show
  1. package/lib/resources/access-code.d.ts +1 -1
  2. package/lib/resources/acs-system.d.ts +1 -1
  3. package/lib/resources/action-attempt.d.ts +63 -0
  4. package/lib/resources/camera-live-view-answer.d.ts +9 -0
  5. package/lib/resources/camera-live-view-answer.js +6 -0
  6. package/lib/resources/camera-live-view-answer.js.map +1 -0
  7. package/lib/resources/camera-live-view-session.d.ts +21 -0
  8. package/lib/resources/camera-live-view-session.js +6 -0
  9. package/lib/resources/camera-live-view-session.js.map +1 -0
  10. package/lib/resources/device-provider.d.ts +9 -1
  11. package/lib/resources/device.d.ts +27 -2
  12. package/lib/resources/event.d.ts +8 -0
  13. package/lib/resources/index.d.ts +3 -0
  14. package/lib/resources/media.d.ts +49 -0
  15. package/lib/resources/media.js +6 -0
  16. package/lib/resources/media.js.map +1 -0
  17. package/lib/resources/unmanaged-access-code.d.ts +1 -1
  18. package/lib/resources/unmanaged-device.d.ts +10 -2
  19. package/lib/routes/cameras/cameras.d.ts +19 -0
  20. package/lib/routes/cameras/cameras.js +89 -0
  21. package/lib/routes/cameras/cameras.js.map +1 -0
  22. package/lib/routes/cameras/index.d.ts +2 -0
  23. package/lib/routes/cameras/index.js +7 -0
  24. package/lib/routes/cameras/index.js.map +1 -0
  25. package/lib/routes/cameras/live-views/index.d.ts +1 -0
  26. package/lib/routes/cameras/live-views/index.js +6 -0
  27. package/lib/routes/cameras/live-views/index.js.map +1 -0
  28. package/lib/routes/cameras/live-views/live-views.d.ts +100 -0
  29. package/lib/routes/cameras/live-views/live-views.js +144 -0
  30. package/lib/routes/cameras/live-views/live-views.js.map +1 -0
  31. package/lib/routes/client-sessions/client-sessions.d.ts +2 -2
  32. package/lib/routes/connect-webviews/connect-webviews.d.ts +1 -1
  33. package/lib/routes/customers/customers.d.ts +20 -12
  34. package/lib/routes/devices/devices.d.ts +3 -3
  35. package/lib/routes/devices/unmanaged/unmanaged.d.ts +3 -3
  36. package/lib/routes/index.d.ts +2 -0
  37. package/lib/routes/index.js +2 -0
  38. package/lib/routes/index.js.map +1 -1
  39. package/lib/routes/media/index.d.ts +1 -0
  40. package/lib/routes/media/index.js +6 -0
  41. package/lib/routes/media/index.js.map +1 -0
  42. package/lib/routes/media/media.d.ts +41 -0
  43. package/lib/routes/media/media.js +102 -0
  44. package/lib/routes/media/media.js.map +1 -0
  45. package/lib/routes/seam-http-endpoints.d.ts +31 -3
  46. package/lib/routes/seam-http-endpoints.js +58 -0
  47. package/lib/routes/seam-http-endpoints.js.map +1 -1
  48. package/lib/routes/seam-http.d.ts +4 -0
  49. package/lib/routes/seam-http.js +8 -0
  50. package/lib/routes/seam-http.js.map +1 -1
  51. package/lib/routes/thermostats/thermostats.d.ts +18 -0
  52. package/lib/routes/thermostats/thermostats.js +20 -0
  53. package/lib/routes/thermostats/thermostats.js.map +1 -1
  54. package/lib/version.d.ts +1 -1
  55. package/lib/version.js +1 -1
  56. package/package.json +2 -2
  57. package/src/lib/resources/access-code.ts +1 -1
  58. package/src/lib/resources/acs-system.ts +1 -1
  59. package/src/lib/resources/action-attempt.ts +77 -0
  60. package/src/lib/resources/camera-live-view-answer.ts +14 -0
  61. package/src/lib/resources/camera-live-view-session.ts +29 -0
  62. package/src/lib/resources/device-provider.ts +9 -0
  63. package/src/lib/resources/device.ts +29 -1
  64. package/src/lib/resources/event.ts +8 -0
  65. package/src/lib/resources/index.ts +3 -0
  66. package/src/lib/resources/media.ts +58 -0
  67. package/src/lib/resources/unmanaged-access-code.ts +1 -1
  68. package/src/lib/resources/unmanaged-device.ts +10 -1
  69. package/src/lib/routes/cameras/cameras.ts +165 -0
  70. package/src/lib/routes/cameras/index.ts +7 -0
  71. package/src/lib/routes/cameras/live-views/index.ts +6 -0
  72. package/src/lib/routes/cameras/live-views/live-views.ts +316 -0
  73. package/src/lib/routes/client-sessions/client-sessions.ts +2 -2
  74. package/src/lib/routes/connect-webviews/connect-webviews.ts +1 -0
  75. package/src/lib/routes/customers/customers.ts +20 -12
  76. package/src/lib/routes/devices/devices.ts +3 -0
  77. package/src/lib/routes/devices/unmanaged/unmanaged.ts +3 -0
  78. package/src/lib/routes/index.ts +2 -0
  79. package/src/lib/routes/media/index.ts +6 -0
  80. package/src/lib/routes/media/media.ts +203 -0
  81. package/src/lib/routes/seam-http-endpoints.ts +112 -0
  82. package/src/lib/routes/seam-http.ts +10 -0
  83. package/src/lib/routes/thermostats/thermostats.ts +49 -0
  84. package/src/lib/version.ts +1 -1
@@ -365,7 +365,7 @@ export type AccessCode = {
365
365
  */
366
366
  message: string;
367
367
  } /**
368
- * Indicates that Seam's integration user does not have sufficient permissions on the provider's system to which this device belongs, so Seam cannot manage access codes or unlock the device. See the error message for specifics, then either reauthorize the connected account in Seam or grant the integration user the required permissions in the provider's system.
368
+ * Indicates that the provider's system to which this device belongs is not letting Seam act on it, so Seam cannot manage access codes or unlock the device. The error message says which of three causes applies. Seam's integration user may not have sufficient permissions on the provider's system, or may have been suspended there: grant the integration user the required permissions in the provider's system, or reauthorize the connected account in Seam. The provider account or site may not have a valid subscription with the provider: set up or renew that subscription with the provider. Or the provider may have rejected the credential Seam uses to operate the device's hub: contact Seam support to re-activate it.
369
369
  */ | {
370
370
  /**
371
371
  * Date and time at which Seam created the error.
@@ -110,7 +110,7 @@ export type AcsSystem = {
110
110
  */
111
111
  message: string;
112
112
  } /**
113
- * Indicates that Seam's integration user does not have sufficient permissions on the provider's system backing this [access control system](https://www.seam.co/docs/low-level-apis/access-systems). Access cannot be managed until permissions are restored. See the error message for specifics, then either reauthorize the connected account in Seam or grant the integration user the required permissions in the provider's system.
113
+ * Indicates that the provider's system backing this [access control system](https://www.seam.co/docs/low-level-apis/access-systems) is not letting Seam act on it, so access cannot be managed until this is resolved. The error message says which of two causes applies. Either Seam's integration user does not have sufficient permissions on the provider's system, or has been suspended there: grant the integration user the required permissions in the provider's system, or reauthorize the connected account in Seam. Or the provider account or site does not have a valid subscription with the provider: set up or renew that subscription with the provider.
114
114
  */ | {
115
115
  /**
116
116
  * Date and time at which Seam created the error.
@@ -1465,6 +1465,69 @@ export type ActionAttempt = {
1465
1465
  */
1466
1466
  result: null;
1467
1467
  status: 'error';
1468
+ } | {
1469
+ /**
1470
+ * ID of the action attempt.
1471
+ */
1472
+ action_attempt_id: string;
1473
+ /**
1474
+ * Action attempt to track the status of returning a thermostat to its weekly program.
1475
+ */
1476
+ action_type: 'ACTIVATE_WEEKLY_PROGRAM';
1477
+ /**
1478
+ * Error associated with the action.
1479
+ */
1480
+ error: null;
1481
+ /**
1482
+ * Result of the action.
1483
+ */
1484
+ result: {};
1485
+ status: 'success';
1486
+ } | {
1487
+ /**
1488
+ * ID of the action attempt.
1489
+ */
1490
+ action_attempt_id: string;
1491
+ /**
1492
+ * Action attempt to track the status of returning a thermostat to its weekly program.
1493
+ */
1494
+ action_type: 'ACTIVATE_WEEKLY_PROGRAM';
1495
+ /**
1496
+ * Error associated with the action.
1497
+ */
1498
+ error: null;
1499
+ /**
1500
+ * Result of the action.
1501
+ */
1502
+ result: null;
1503
+ status: 'pending';
1504
+ } | {
1505
+ /**
1506
+ * ID of the action attempt.
1507
+ */
1508
+ action_attempt_id: string;
1509
+ /**
1510
+ * Action attempt to track the status of returning a thermostat to its weekly program.
1511
+ */
1512
+ action_type: 'ACTIVATE_WEEKLY_PROGRAM';
1513
+ /**
1514
+ * Error associated with the action.
1515
+ */
1516
+ error: {
1517
+ /**
1518
+ * Detailed description of the error. Provides insights into the issue and potentially how to rectify it.
1519
+ */
1520
+ message: string;
1521
+ /**
1522
+ * Type of the error.
1523
+ */
1524
+ type: string;
1525
+ };
1526
+ /**
1527
+ * Result of the action.
1528
+ */
1529
+ result: null;
1530
+ status: 'error';
1468
1531
  } | {
1469
1532
  /**
1470
1533
  * ID of the action attempt.
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Represents the WebRTC SDP answer that starts streaming video from a camera for a live view session.
3
+ */
4
+ export type CameraLiveViewAnswer = {
5
+ /**
6
+ * WebRTC SDP answer for the offer, limited to 64 KiB of UTF-8 data.
7
+ */
8
+ sdp_answer: string;
9
+ };
@@ -0,0 +1,6 @@
1
+ /*
2
+ * Automatically generated by codegen/smith.ts.
3
+ * Do not edit this file.
4
+ */
5
+ export {};
6
+ //# sourceMappingURL=camera-live-view-answer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"camera-live-view-answer.js","sourceRoot":"","sources":["../../src/lib/resources/camera-live-view-answer.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Represents a short-lived live view session for a single camera. Use the session ID and token to start a WebRTC stream and to stop the session.
3
+ */
4
+ export type CameraLiveViewSession = {
5
+ /**
6
+ * ID of the camera live view session.
7
+ */
8
+ camera_live_view_session_id: string;
9
+ /**
10
+ * ID of the camera.
11
+ */
12
+ device_id: string;
13
+ /**
14
+ * Date and time at which the live view session expires.
15
+ */
16
+ expires_at: string;
17
+ /**
18
+ * Token that authorizes the offer and stop requests for this session.
19
+ */
20
+ token: string;
21
+ };
@@ -0,0 +1,6 @@
1
+ /*
2
+ * Automatically generated by codegen/smith.ts.
3
+ * Do not edit this file.
4
+ */
5
+ export {};
6
+ //# sourceMappingURL=camera-live-view-session.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"camera-live-view-session.js","sourceRoot":"","sources":["../../src/lib/resources/camera-live-view-session.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
@@ -1,4 +1,8 @@
1
1
  export type DeviceProvider = {
2
+ /**
3
+ * Indicates whether the thermostat can be returned to its weekly program, the schedule that is configured on the device itself, releasing any hold that Seam has set.
4
+ */
5
+ can_activate_weekly_program?: boolean | undefined;
2
6
  /**
3
7
  * Indicates whether the lock supports configuring automatic locking.
4
8
  */
@@ -71,6 +75,10 @@ export type DeviceProvider = {
71
75
  * Indicates whether the device supports simulating removal in a sandbox.
72
76
  */
73
77
  can_simulate_removal?: boolean | undefined;
78
+ /**
79
+ * Indicates whether the camera supports streaming live video through a camera live view session.
80
+ */
81
+ can_stream_live_video?: boolean | undefined;
74
82
  /**
75
83
  * Indicates whether the thermostat can be turned off.
76
84
  */
@@ -82,7 +90,7 @@ export type DeviceProvider = {
82
90
  /**
83
91
  * Name of the device provider.
84
92
  */
85
- device_provider_name: 'hotek' | 'dormakaba_community' | 'legic_connect' | 'akuvox' | 'august' | 'avigilon_alta' | 'brivo' | 'butterflymx' | 'schlage' | 'smartthings' | 'yale' | 'genie' | 'doorking' | 'salto' | 'salto_ks' | 'salto_ks_accept' | 'lockly' | 'ttlock' | 'linear' | 'noiseaware' | 'nuki' | 'igloo' | 'kwikset' | 'minut' | 'my_2n' | 'controlbyweb' | 'nest' | 'igloohome' | 'ecobee' | 'four_suites' | 'dormakaba_oracode' | 'dormakaba_oracode_iho' | 'pti' | 'wyze' | 'seam_passport' | 'visionline' | 'assa_abloy_credential_service' | 'tedee' | 'honeywell_resideo' | 'first_alert' | 'latch' | 'akiles' | 'assa_abloy_vostio' | 'assa_abloy_vostio_credential_service' | 'tado' | 'salto_space' | 'sensi' | 'keynest' | 'korelock' | 'keyincode' | 'dormakaba_ambiance' | 'ultraloq' | 'yacan' | 'dusaw' | 'sifely' | 'thirty_three_lock' | 'ring' | 'tapo' | 'arlo' | 'ical' | 'lodgify' | 'hostaway' | 'guesty' | 'acuity_scheduling' | 'omnitec' | 'kisi' | 'aqara';
93
+ device_provider_name: 'hotek' | 'dormakaba_community' | 'legic_connect' | 'akuvox' | 'august' | 'avigilon_alta' | 'brivo' | 'butterflymx' | 'schlage' | 'smartthings' | 'yale' | 'genie' | 'doorking' | 'salto' | 'salto_ks' | 'salto_ks_accept' | 'lockly' | 'ttlock' | 'linear' | 'noiseaware' | 'nuki' | 'igloo' | 'kwikset' | 'minut' | 'my_2n' | 'controlbyweb' | 'nest' | 'igloohome' | 'ecobee' | 'four_suites' | 'dormakaba_oracode' | 'dormakaba_oracode_iho' | 'pti' | 'wyze' | 'seam_passport' | 'visionline' | 'assa_abloy_credential_service' | 'tedee' | 'honeywell_resideo' | 'first_alert' | 'latch' | 'akiles' | 'assa_abloy_vostio' | 'assa_abloy_vostio_credential_service' | 'tado' | 'salto_space' | 'sensi' | 'keynest' | 'korelock' | 'keyincode' | 'dormakaba_ambiance' | 'ultraloq' | 'yacan' | 'dusaw' | 'sifely' | 'thirty_three_lock' | 'ring' | 'tapo' | 'arlo' | 'reolink' | 'ical' | 'lodgify' | 'hostaway' | 'guesty' | 'acuity_scheduling' | 'omnitec' | 'kisi' | 'aqara';
86
94
  /**
87
95
  * Display name for the device provider.
88
96
  */
@@ -2,6 +2,10 @@
2
2
  * Represents a [device](https://www.seam.co/docs/core-concepts/devices) that has been connected to Seam.
3
3
  */
4
4
  export type Device = {
5
+ /**
6
+ * Indicates whether the thermostat can be returned to its weekly program, the schedule that is configured on the device itself, releasing any hold that Seam has set.
7
+ */
8
+ can_activate_weekly_program?: boolean | undefined;
5
9
  /**
6
10
  * Indicates whether the lock supports configuring automatic locking.
7
11
  */
@@ -74,6 +78,10 @@ export type Device = {
74
78
  * Indicates whether the device supports simulating removal in a sandbox.
75
79
  */
76
80
  can_simulate_removal?: boolean | undefined;
81
+ /**
82
+ * Indicates whether the camera supports streaming live video through a camera live view session.
83
+ */
84
+ can_stream_live_video?: boolean | undefined;
77
85
  /**
78
86
  * Indicates whether the thermostat can be turned off.
79
87
  */
@@ -143,7 +151,7 @@ export type Device = {
143
151
  /**
144
152
  * Type of the device.
145
153
  */
146
- device_type: 'akuvox_lock' | 'august_lock' | 'brivo_access_point' | 'butterflymx_panel' | 'avigilon_alta_entry' | 'doorking_lock' | 'genie_door' | 'igloo_lock' | 'linear_lock' | 'lockly_lock' | 'kwikset_lock' | 'nuki_lock' | 'salto_lock' | 'schlage_lock' | 'smartthings_lock' | 'wyze_lock' | 'yale_lock' | 'two_n_intercom' | 'controlbyweb_device' | 'ttlock_lock' | 'igloohome_lock' | 'four_suites_door' | 'dormakaba_oracode_door' | 'tedee_lock' | 'akiles_lock' | 'ultraloq_lock' | 'yacan_lock' | 'keyincode_lock' | 'omnitec_lock' | 'kisi_lock' | 'aqara_lock' | 'keynest_key' | 'noiseaware_activity_zone' | 'minut_sensor' | 'ecobee_thermostat' | 'nest_thermostat' | 'honeywell_resideo_thermostat' | 'tado_thermostat' | 'sensi_thermostat' | 'smartthings_thermostat' | 'ios_phone' | 'android_phone' | 'ring_camera' | 'tapo_camera' | 'arlo_camera';
154
+ device_type: 'akuvox_lock' | 'august_lock' | 'brivo_access_point' | 'butterflymx_panel' | 'avigilon_alta_entry' | 'doorking_lock' | 'genie_door' | 'igloo_lock' | 'linear_lock' | 'lockly_lock' | 'kwikset_lock' | 'nuki_lock' | 'salto_lock' | 'schlage_lock' | 'smartthings_lock' | 'wyze_lock' | 'yale_lock' | 'two_n_intercom' | 'controlbyweb_device' | 'ttlock_lock' | 'igloohome_lock' | 'four_suites_door' | 'dormakaba_oracode_door' | 'tedee_lock' | 'akiles_lock' | 'ultraloq_lock' | 'yacan_lock' | 'keyincode_lock' | 'omnitec_lock' | 'kisi_lock' | 'aqara_lock' | 'keynest_key' | 'noiseaware_activity_zone' | 'minut_sensor' | 'ecobee_thermostat' | 'nest_thermostat' | 'honeywell_resideo_thermostat' | 'tado_thermostat' | 'sensi_thermostat' | 'smartthings_thermostat' | 'ios_phone' | 'android_phone' | 'ring_camera' | 'tapo_camera' | 'arlo_camera' | 'reolink_camera';
147
155
  /**
148
156
  * 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.
149
157
  */
@@ -200,7 +208,7 @@ export type Device = {
200
208
  */
201
209
  message: string;
202
210
  } /**
203
- * Indicates that Seam's integration user does not have sufficient permissions on the provider's system to which this device belongs, so Seam cannot manage access codes or unlock the device. See the error message for specifics, then either reauthorize the connected account in Seam or grant the integration user the required permissions in the provider's system.
211
+ * Indicates that the provider's system to which this device belongs is not letting Seam act on it, so Seam cannot manage access codes or unlock the device. The error message says which of three causes applies. Seam's integration user may not have sufficient permissions on the provider's system, or may have been suspended there: grant the integration user the required permissions in the provider's system, or reauthorize the connected account in Seam. The provider account or site may not have a valid subscription with the provider: set up or renew that subscription with the provider. Or the provider may have rejected the credential Seam uses to operate the device's hub: contact Seam support to re-activate it.
204
212
  */ | {
205
213
  /**
206
214
  * Date and time at which Seam created the error.
@@ -1398,6 +1406,23 @@ export type Device = {
1398
1406
  */
1399
1407
  timezone_raw_offset_ms?: number | undefined;
1400
1408
  } | undefined;
1409
+ /**
1410
+ * Metadata for a Reolink camera.
1411
+ */
1412
+ reolink_metadata?: {
1413
+ /**
1414
+ * Firmware version reported by the camera.
1415
+ */
1416
+ firmware_version?: string | undefined;
1417
+ /**
1418
+ * Hardware version reported by the camera.
1419
+ */
1420
+ hardware_version?: string | undefined;
1421
+ /**
1422
+ * Model reported by the Reolink camera.
1423
+ */
1424
+ model?: string | undefined;
1425
+ } | undefined;
1401
1426
  /**
1402
1427
  * Metadata for a Ring device.
1403
1428
  */
@@ -5319,6 +5319,10 @@ export type SeamEvent = {
5319
5319
  * URL to a thumbnail image captured at the time of activation.
5320
5320
  */
5321
5321
  image_url?: string | undefined;
5322
+ /**
5323
+ * IDs of the media, such as a video clip and a thumbnail image, captured for this activation. Use `/media/get` to retrieve each one.
5324
+ */
5325
+ media_ids?: Array<string> | undefined;
5322
5326
  /**
5323
5327
  * Sub-type of motion detected, if available.
5324
5328
  */
@@ -5373,6 +5377,10 @@ export type SeamEvent = {
5373
5377
  * URL to a thumbnail image captured at the time the doorbell was pressed.
5374
5378
  */
5375
5379
  image_url?: string | undefined;
5380
+ /**
5381
+ * IDs of the media, such as a video clip and a thumbnail image, captured when the doorbell was pressed. Use `/media/get` to retrieve each one.
5382
+ */
5383
+ media_ids?: Array<string> | undefined;
5376
5384
  /**
5377
5385
  * Date and time at which the event occurred.
5378
5386
  */
@@ -9,6 +9,8 @@ export type { AcsSystem } from './acs-system.js';
9
9
  export type { AcsUser } from './acs-user.js';
10
10
  export type { ActionAttempt } from './action-attempt.js';
11
11
  export type { Batch } from './batch.js';
12
+ export type { CameraLiveViewAnswer } from './camera-live-view-answer.js';
13
+ export type { CameraLiveViewSession } from './camera-live-view-session.js';
12
14
  export type { ClientSession } from './client-session.js';
13
15
  export type { ConnectWebview } from './connect-webview.js';
14
16
  export type { ConnectedAccount } from './connected-account.js';
@@ -17,6 +19,7 @@ export type { Device } from './device.js';
17
19
  export type { DeviceProvider } from './device-provider.js';
18
20
  export type { SeamEvent } from './event.js';
19
21
  export type { InstantKey } from './instant-key.js';
22
+ export type { Media } from './media.js';
20
23
  export type { NoiseThreshold } from './noise-threshold.js';
21
24
  export type { Phone } from './phone.js';
22
25
  export type { Space } from './space.js';
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Represents a piece of media, such as a video clip or a thumbnail image, that a device captured for an event. Media is in beta.
3
+ */
4
+ export type Media = {
5
+ /**
6
+ * MIME type of the media, such as `video/mp4` or `image/jpeg`.
7
+ */
8
+ content_type: string | null;
9
+ /**
10
+ * Date and time at which the media was created.
11
+ */
12
+ created_at: string;
13
+ /**
14
+ * ID of the device that captured the media.
15
+ */
16
+ device_id: string | null;
17
+ /**
18
+ * ID of the event that the media belongs to.
19
+ */
20
+ event_id: string | null;
21
+ /**
22
+ * Date and time at which the media stops being available. Null when Seam does not know when the media expires.
23
+ */
24
+ expires_at: string | null;
25
+ /**
26
+ * ID of the media.
27
+ */
28
+ media_id: string;
29
+ /**
30
+ * Type of the media: a video clip or a still image.
31
+ */
32
+ media_type: 'video' | 'image';
33
+ /**
34
+ * Status of the media. `pending` means that Seam is still retrieving the media. `available` means that `url` can be used to download it. `unavailable` means that no media exists for the event, and `failed` means that Seam could not retrieve it.
35
+ */
36
+ status: 'pending' | 'available' | 'unavailable' | 'failed';
37
+ /**
38
+ * Short-lived URL from which you can download the media. Null unless `status` is `available`. The URL expires after about five minutes. Call `/media/get` again for a new URL.
39
+ */
40
+ url: string | null;
41
+ /**
42
+ * Video codec used to encode the media. Only present for video media. `hevc` (H.265) playback support varies by browser and device, so check compatibility before assuming a clip plays inline.
43
+ */
44
+ video_codec?: 'h264' | 'hevc' | undefined;
45
+ /**
46
+ * ID of the workspace that contains the media.
47
+ */
48
+ workspace_id: string;
49
+ };
@@ -0,0 +1,6 @@
1
+ /*
2
+ * Automatically generated by codegen/smith.ts.
3
+ * Do not edit this file.
4
+ */
5
+ export {};
6
+ //# sourceMappingURL=media.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"media.js","sourceRoot":"","sources":["../../src/lib/resources/media.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
@@ -371,7 +371,7 @@ export type UnmanagedAccessCode = {
371
371
  */
372
372
  message: string;
373
373
  } /**
374
- * Indicates that Seam's integration user does not have sufficient permissions on the provider's system to which this device belongs, so Seam cannot manage access codes or unlock the device. See the error message for specifics, then either reauthorize the connected account in Seam or grant the integration user the required permissions in the provider's system.
374
+ * Indicates that the provider's system to which this device belongs is not letting Seam act on it, so Seam cannot manage access codes or unlock the device. The error message says which of three causes applies. Seam's integration user may not have sufficient permissions on the provider's system, or may have been suspended there: grant the integration user the required permissions in the provider's system, or reauthorize the connected account in Seam. The provider account or site may not have a valid subscription with the provider: set up or renew that subscription with the provider. Or the provider may have rejected the credential Seam uses to operate the device's hub: contact Seam support to re-activate it.
375
375
  */ | {
376
376
  /**
377
377
  * Date and time at which Seam created the error.
@@ -2,6 +2,10 @@
2
2
  * Represents an [unmanaged device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). An unmanaged device has a limited set of visible properties and a subset of supported events. You cannot control an unmanaged device. Any [access codes](https://www.seam.co/docs/low-level-apis/smart-locks/access-codes/migrating-existing-access-codes) on an unmanaged device are unmanaged. To control an unmanaged device with Seam, [convert it to a managed device](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices#convert-an-unmanaged-device-to-managed).
3
3
  */
4
4
  export type UnmanagedDevice = {
5
+ /**
6
+ * Indicates whether the thermostat can be returned to its weekly program, the schedule that is configured on the device itself, releasing any hold that Seam has set.
7
+ */
8
+ can_activate_weekly_program?: boolean | undefined;
5
9
  /**
6
10
  * Indicates whether the lock supports configuring automatic locking.
7
11
  */
@@ -74,6 +78,10 @@ export type UnmanagedDevice = {
74
78
  * Indicates whether the device supports simulating removal in a sandbox.
75
79
  */
76
80
  can_simulate_removal?: boolean | undefined;
81
+ /**
82
+ * Indicates whether the camera supports streaming live video through a camera live view session.
83
+ */
84
+ can_stream_live_video?: boolean | undefined;
77
85
  /**
78
86
  * Indicates whether the thermostat can be turned off.
79
87
  */
@@ -105,7 +113,7 @@ export type UnmanagedDevice = {
105
113
  /**
106
114
  * Type of the device.
107
115
  */
108
- device_type: 'akuvox_lock' | 'august_lock' | 'brivo_access_point' | 'butterflymx_panel' | 'avigilon_alta_entry' | 'doorking_lock' | 'genie_door' | 'igloo_lock' | 'linear_lock' | 'lockly_lock' | 'kwikset_lock' | 'nuki_lock' | 'salto_lock' | 'schlage_lock' | 'smartthings_lock' | 'wyze_lock' | 'yale_lock' | 'two_n_intercom' | 'controlbyweb_device' | 'ttlock_lock' | 'igloohome_lock' | 'four_suites_door' | 'dormakaba_oracode_door' | 'tedee_lock' | 'akiles_lock' | 'ultraloq_lock' | 'yacan_lock' | 'keyincode_lock' | 'omnitec_lock' | 'kisi_lock' | 'aqara_lock' | 'keynest_key' | 'noiseaware_activity_zone' | 'minut_sensor' | 'ecobee_thermostat' | 'nest_thermostat' | 'honeywell_resideo_thermostat' | 'tado_thermostat' | 'sensi_thermostat' | 'smartthings_thermostat' | 'ios_phone' | 'android_phone' | 'ring_camera' | 'tapo_camera' | 'arlo_camera';
116
+ device_type: 'akuvox_lock' | 'august_lock' | 'brivo_access_point' | 'butterflymx_panel' | 'avigilon_alta_entry' | 'doorking_lock' | 'genie_door' | 'igloo_lock' | 'linear_lock' | 'lockly_lock' | 'kwikset_lock' | 'nuki_lock' | 'salto_lock' | 'schlage_lock' | 'smartthings_lock' | 'wyze_lock' | 'yale_lock' | 'two_n_intercom' | 'controlbyweb_device' | 'ttlock_lock' | 'igloohome_lock' | 'four_suites_door' | 'dormakaba_oracode_door' | 'tedee_lock' | 'akiles_lock' | 'ultraloq_lock' | 'yacan_lock' | 'keyincode_lock' | 'omnitec_lock' | 'kisi_lock' | 'aqara_lock' | 'keynest_key' | 'noiseaware_activity_zone' | 'minut_sensor' | 'ecobee_thermostat' | 'nest_thermostat' | 'honeywell_resideo_thermostat' | 'tado_thermostat' | 'sensi_thermostat' | 'smartthings_thermostat' | 'ios_phone' | 'android_phone' | 'ring_camera' | 'tapo_camera' | 'arlo_camera' | 'reolink_camera';
109
117
  /**
110
118
  * 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.
111
119
  */
@@ -162,7 +170,7 @@ export type UnmanagedDevice = {
162
170
  */
163
171
  message: string;
164
172
  } /**
165
- * Indicates that Seam's integration user does not have sufficient permissions on the provider's system to which this device belongs, so Seam cannot manage access codes or unlock the device. See the error message for specifics, then either reauthorize the connected account in Seam or grant the integration user the required permissions in the provider's system.
173
+ * Indicates that the provider's system to which this device belongs is not letting Seam act on it, so Seam cannot manage access codes or unlock the device. The error message says which of three causes applies. Seam's integration user may not have sufficient permissions on the provider's system, or may have been suspended there: grant the integration user the required permissions in the provider's system, or reauthorize the connected account in Seam. The provider account or site may not have a valid subscription with the provider: set up or renew that subscription with the provider. Or the provider may have rejected the credential Seam uses to operate the device's hub: contact Seam support to re-activate it.
166
174
  */ | {
167
175
  /**
168
176
  * Date and time at which Seam created the error.
@@ -0,0 +1,19 @@
1
+ import { type Client } from '../../client.js';
2
+ import { type SeamHttpFromPublishableKeyOptions, type SeamHttpOptions, type SeamHttpOptionsWithApiKey, type SeamHttpOptionsWithClient, type SeamHttpOptionsWithClientSessionToken, type SeamHttpOptionsWithConsoleSessionToken, type SeamHttpOptionsWithPersonalAccessToken, type SeamHttpRequestOptions } from '../../options.js';
3
+ import type { SeamPaginatedRequest } from '../../seam-http-request.js';
4
+ import { SeamPaginator } from '../../seam-paginator.js';
5
+ import { SeamHttpCamerasLiveViews } from './live-views/index.js';
6
+ export declare class SeamHttpCameras {
7
+ client: Client;
8
+ readonly defaults: Required<SeamHttpRequestOptions>;
9
+ constructor(apiKeyOrOptions?: string | SeamHttpOptions);
10
+ static fromClient(client: SeamHttpOptionsWithClient['client'], options?: Omit<SeamHttpOptionsWithClient, 'client'>): SeamHttpCameras;
11
+ static fromApiKey(apiKey: SeamHttpOptionsWithApiKey['apiKey'], options?: Omit<SeamHttpOptionsWithApiKey, 'apiKey'>): SeamHttpCameras;
12
+ static fromClientSessionToken(clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options?: Omit<SeamHttpOptionsWithClientSessionToken, 'clientSessionToken'>): SeamHttpCameras;
13
+ static fromPublishableKey(publishableKey: string, userIdentifierKey: string, options?: SeamHttpFromPublishableKeyOptions): Promise<SeamHttpCameras>;
14
+ static fromConsoleSessionToken(consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], options?: Omit<SeamHttpOptionsWithConsoleSessionToken, 'consoleSessionToken' | 'workspaceId'>): SeamHttpCameras;
15
+ static fromPersonalAccessToken(personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], options?: Omit<SeamHttpOptionsWithPersonalAccessToken, 'personalAccessToken' | 'workspaceId'>): SeamHttpCameras;
16
+ createPaginator<const TResponse, const TResponseKey extends keyof TResponse>(request: SeamPaginatedRequest<TResponse, TResponseKey>): SeamPaginator<TResponse, TResponseKey>;
17
+ updateClientSessionToken(clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken']): Promise<void>;
18
+ get liveViews(): SeamHttpCamerasLiveViews;
19
+ }
@@ -0,0 +1,89 @@
1
+ /*
2
+ * Automatically generated by codegen/smith.ts.
3
+ * Do not edit this file or add other files to this directory.
4
+ */
5
+ import { getAuthHeadersForClientSessionToken, warnOnInsecureuserIdentifierKey, } from '../../auth.js';
6
+ import { createClient } from '../../client.js';
7
+ import { isSeamHttpOptionsWithApiKey, isSeamHttpOptionsWithClient, isSeamHttpOptionsWithClientSessionToken, isSeamHttpOptionsWithConsoleSessionToken, isSeamHttpOptionsWithPersonalAccessToken, SeamHttpInvalidOptionsError, } from '../../options.js';
8
+ import { limitToSeamHttpRequestOptions, parseOptions, } from '../../parse-options.js';
9
+ import { SeamHttpClientSessions } from '../../routes/client-sessions/index.js';
10
+ import { SeamPaginator } from '../../seam-paginator.js';
11
+ import { SeamHttpCamerasLiveViews } from './live-views/index.js';
12
+ export class SeamHttpCameras {
13
+ client;
14
+ defaults;
15
+ constructor(apiKeyOrOptions = {}) {
16
+ const options = parseOptions(apiKeyOrOptions);
17
+ this.client = 'client' in options ? options.client : createClient(options);
18
+ this.defaults = limitToSeamHttpRequestOptions(options);
19
+ }
20
+ static fromClient(client, options = {}) {
21
+ const constructorOptions = { ...options, client };
22
+ if (!isSeamHttpOptionsWithClient(constructorOptions)) {
23
+ throw new SeamHttpInvalidOptionsError('Missing client');
24
+ }
25
+ return new SeamHttpCameras(constructorOptions);
26
+ }
27
+ static fromApiKey(apiKey, options = {}) {
28
+ const constructorOptions = { ...options, apiKey };
29
+ if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
30
+ throw new SeamHttpInvalidOptionsError('Missing apiKey');
31
+ }
32
+ return new SeamHttpCameras(constructorOptions);
33
+ }
34
+ static fromClientSessionToken(clientSessionToken, options = {}) {
35
+ const constructorOptions = { ...options, clientSessionToken };
36
+ if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
37
+ throw new SeamHttpInvalidOptionsError('Missing clientSessionToken');
38
+ }
39
+ return new SeamHttpCameras(constructorOptions);
40
+ }
41
+ static async fromPublishableKey(publishableKey, userIdentifierKey, options = {}) {
42
+ warnOnInsecureuserIdentifierKey(userIdentifierKey);
43
+ const clientOptions = parseOptions({ ...options, publishableKey });
44
+ if (isSeamHttpOptionsWithClient(clientOptions)) {
45
+ throw new SeamHttpInvalidOptionsError('The client option cannot be used with SeamHttpCameras.fromPublishableKey');
46
+ }
47
+ const client = createClient(clientOptions);
48
+ const clientSessions = SeamHttpClientSessions.fromClient(client);
49
+ const { token } = await clientSessions.getOrCreate({
50
+ user_identifier_key: userIdentifierKey,
51
+ });
52
+ return SeamHttpCameras.fromClientSessionToken(token, options);
53
+ }
54
+ static fromConsoleSessionToken(consoleSessionToken, workspaceId, options = {}) {
55
+ const constructorOptions = { ...options, consoleSessionToken, workspaceId };
56
+ if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
57
+ throw new SeamHttpInvalidOptionsError('Missing consoleSessionToken or workspaceId');
58
+ }
59
+ return new SeamHttpCameras(constructorOptions);
60
+ }
61
+ static fromPersonalAccessToken(personalAccessToken, workspaceId, options = {}) {
62
+ const constructorOptions = { ...options, personalAccessToken, workspaceId };
63
+ if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
64
+ throw new SeamHttpInvalidOptionsError('Missing personalAccessToken or workspaceId');
65
+ }
66
+ return new SeamHttpCameras(constructorOptions);
67
+ }
68
+ createPaginator(request) {
69
+ return new SeamPaginator(request);
70
+ }
71
+ async updateClientSessionToken(clientSessionToken) {
72
+ const { headers } = this.client.defaults;
73
+ const authHeaders = getAuthHeadersForClientSessionToken({
74
+ clientSessionToken,
75
+ });
76
+ for (const key of Object.keys(authHeaders)) {
77
+ if (headers[key] == null) {
78
+ throw new Error('Cannot update a clientSessionToken on a client created without a clientSessionToken');
79
+ }
80
+ }
81
+ this.client.defaults.headers = { ...headers, ...authHeaders };
82
+ const clientSessions = SeamHttpClientSessions.fromClient(this.client);
83
+ await clientSessions.get();
84
+ }
85
+ get liveViews() {
86
+ return SeamHttpCamerasLiveViews.fromClient(this.client, this.defaults);
87
+ }
88
+ }
89
+ //# sourceMappingURL=cameras.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cameras.js","sourceRoot":"","sources":["../../../src/lib/routes/cameras/cameras.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,mCAAmC,EACnC,+BAA+B,GAChC,MAAM,aAAa,CAAA;AACpB,OAAO,EAAe,YAAY,EAAE,MAAM,eAAe,CAAA;AACzD,OAAO,EACL,2BAA2B,EAC3B,2BAA2B,EAC3B,uCAAuC,EACvC,wCAAwC,EACxC,wCAAwC,EAExC,2BAA2B,GAQ5B,MAAM,gBAAgB,CAAA;AACvB,OAAO,EACL,6BAA6B,EAC7B,YAAY,GACb,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAA;AAE5E,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AAErD,OAAO,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAA;AAEhE,MAAM,OAAO,eAAe;IAC1B,MAAM,CAAQ;IACL,QAAQ,CAAkC;IAEnD,YAAY,kBAA4C,EAAE;QACxD,MAAM,OAAO,GAAG,YAAY,CAAC,eAAe,CAAC,CAAA;QAC7C,IAAI,CAAC,MAAM,GAAG,QAAQ,IAAI,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,OAAO,CAAC,CAAA;QAC1E,IAAI,CAAC,QAAQ,GAAG,6BAA6B,CAAC,OAAO,CAAC,CAAA;IACxD,CAAC;IAED,MAAM,CAAC,UAAU,CACf,MAA2C,EAC3C,UAAqD,EAAE;QAEvD,MAAM,kBAAkB,GAAG,EAAE,GAAG,OAAO,EAAE,MAAM,EAAE,CAAA;QACjD,IAAI,CAAC,2BAA2B,CAAC,kBAAkB,CAAC,EAAE,CAAC;YACrD,MAAM,IAAI,2BAA2B,CAAC,gBAAgB,C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,IAAI,KAAK,CACb,qFAAqF,CACtF,CAAA;YACH,CAAC;QACH,CAAC;QACD,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,GAAG,EAAE,GAAG,OAAO,EAAE,GAAG,WAAW,EAAE,CAAA;QAC7D,MAAM,cAAc,GAAG,sBAAsB,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QACrE,MAAM,cAAc,CAAC,GAAG,EAAE,CAAA;IAC5B,CAAC;IAED,IAAI,SAAS;QACX,OAAO,wBAAwB,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAA;IACxE,CAAC;CACF"}
@@ -0,0 +1,2 @@
1
+ export * from './cameras.js';
2
+ export * from './live-views/index.js';
@@ -0,0 +1,7 @@
1
+ /*
2
+ * Automatically generated by codegen/smith.ts.
3
+ * Do not edit this file or add other files to this directory.
4
+ */
5
+ export * from './cameras.js';
6
+ export * from './live-views/index.js';
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/routes/cameras/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,cAAc,CAAA;AAC5B,cAAc,uBAAuB,CAAA"}
@@ -0,0 +1 @@
1
+ export * from './live-views.js';
@@ -0,0 +1,6 @@
1
+ /*
2
+ * Automatically generated by codegen/smith.ts.
3
+ * Do not edit this file or add other files to this directory.
4
+ */
5
+ export * from './live-views.js';
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/routes/cameras/live-views/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,iBAAiB,CAAA"}