@seamapi/http 2.33.0 → 2.35.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 (80) hide show
  1. package/lib/resources/access-code.d.ts +2 -2
  2. package/lib/resources/action-attempt.d.ts +63 -0
  3. package/lib/resources/camera-live-view-answer.d.ts +9 -0
  4. package/lib/resources/camera-live-view-answer.js +6 -0
  5. package/lib/resources/camera-live-view-answer.js.map +1 -0
  6. package/lib/resources/camera-live-view-session.d.ts +21 -0
  7. package/lib/resources/camera-live-view-session.js +6 -0
  8. package/lib/resources/camera-live-view-session.js.map +1 -0
  9. package/lib/resources/device-provider.d.ts +9 -1
  10. package/lib/resources/device.d.ts +34 -1
  11. package/lib/resources/event.d.ts +8 -0
  12. package/lib/resources/index.d.ts +3 -0
  13. package/lib/resources/media.d.ts +45 -0
  14. package/lib/resources/media.js +6 -0
  15. package/lib/resources/media.js.map +1 -0
  16. package/lib/resources/unmanaged-access-code.d.ts +2 -2
  17. package/lib/resources/unmanaged-device.d.ts +9 -1
  18. package/lib/routes/cameras/cameras.d.ts +19 -0
  19. package/lib/routes/cameras/cameras.js +89 -0
  20. package/lib/routes/cameras/cameras.js.map +1 -0
  21. package/lib/routes/cameras/index.d.ts +2 -0
  22. package/lib/routes/cameras/index.js +7 -0
  23. package/lib/routes/cameras/index.js.map +1 -0
  24. package/lib/routes/cameras/live-views/index.d.ts +1 -0
  25. package/lib/routes/cameras/live-views/index.js +6 -0
  26. package/lib/routes/cameras/live-views/index.js.map +1 -0
  27. package/lib/routes/cameras/live-views/live-views.d.ts +100 -0
  28. package/lib/routes/cameras/live-views/live-views.js +144 -0
  29. package/lib/routes/cameras/live-views/live-views.js.map +1 -0
  30. package/lib/routes/connect-webviews/connect-webviews.d.ts +1 -1
  31. package/lib/routes/devices/devices.d.ts +3 -3
  32. package/lib/routes/devices/unmanaged/unmanaged.d.ts +3 -3
  33. package/lib/routes/events/events.d.ts +2 -2
  34. package/lib/routes/index.d.ts +2 -0
  35. package/lib/routes/index.js +2 -0
  36. package/lib/routes/index.js.map +1 -1
  37. package/lib/routes/media/index.d.ts +1 -0
  38. package/lib/routes/media/index.js +6 -0
  39. package/lib/routes/media/index.js.map +1 -0
  40. package/lib/routes/media/media.d.ts +41 -0
  41. package/lib/routes/media/media.js +102 -0
  42. package/lib/routes/media/media.js.map +1 -0
  43. package/lib/routes/seam-http-endpoints.d.ts +31 -3
  44. package/lib/routes/seam-http-endpoints.js +58 -0
  45. package/lib/routes/seam-http-endpoints.js.map +1 -1
  46. package/lib/routes/seam-http.d.ts +4 -0
  47. package/lib/routes/seam-http.js +8 -0
  48. package/lib/routes/seam-http.js.map +1 -1
  49. package/lib/routes/thermostats/thermostats.d.ts +18 -0
  50. package/lib/routes/thermostats/thermostats.js +20 -0
  51. package/lib/routes/thermostats/thermostats.js.map +1 -1
  52. package/lib/version.d.ts +1 -1
  53. package/lib/version.js +1 -1
  54. package/package.json +2 -2
  55. package/src/lib/resources/access-code.ts +2 -2
  56. package/src/lib/resources/action-attempt.ts +77 -0
  57. package/src/lib/resources/camera-live-view-answer.ts +14 -0
  58. package/src/lib/resources/camera-live-view-session.ts +29 -0
  59. package/src/lib/resources/device-provider.ts +9 -0
  60. package/src/lib/resources/device.ts +36 -0
  61. package/src/lib/resources/event.ts +8 -0
  62. package/src/lib/resources/index.ts +3 -0
  63. package/src/lib/resources/media.ts +54 -0
  64. package/src/lib/resources/unmanaged-access-code.ts +2 -2
  65. package/src/lib/resources/unmanaged-device.ts +9 -0
  66. package/src/lib/routes/cameras/cameras.ts +165 -0
  67. package/src/lib/routes/cameras/index.ts +7 -0
  68. package/src/lib/routes/cameras/live-views/index.ts +6 -0
  69. package/src/lib/routes/cameras/live-views/live-views.ts +316 -0
  70. package/src/lib/routes/connect-webviews/connect-webviews.ts +1 -0
  71. package/src/lib/routes/devices/devices.ts +3 -0
  72. package/src/lib/routes/devices/unmanaged/unmanaged.ts +3 -0
  73. package/src/lib/routes/events/events.ts +2 -2
  74. package/src/lib/routes/index.ts +2 -0
  75. package/src/lib/routes/media/index.ts +6 -0
  76. package/src/lib/routes/media/media.ts +203 -0
  77. package/src/lib/routes/seam-http-endpoints.ts +112 -0
  78. package/src/lib/routes/seam-http.ts +10 -0
  79. package/src/lib/routes/thermostats/thermostats.ts +49 -0
  80. package/src/lib/version.ts +1 -1
@@ -0,0 +1,100 @@
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 { CameraLiveViewAnswer } from '../../../resources/camera-live-view-answer.js';
4
+ import type { CameraLiveViewSession } from '../../../resources/camera-live-view-session.js';
5
+ import { SeamHttpRequest, type SeamPaginatedRequest } from '../../../seam-http-request.js';
6
+ import { SeamPaginator } from '../../../seam-paginator.js';
7
+ export declare class SeamHttpCamerasLiveViews {
8
+ client: Client;
9
+ readonly defaults: Required<SeamHttpRequestOptions>;
10
+ constructor(apiKeyOrOptions?: string | SeamHttpOptions);
11
+ static fromClient(client: SeamHttpOptionsWithClient['client'], options?: Omit<SeamHttpOptionsWithClient, 'client'>): SeamHttpCamerasLiveViews;
12
+ static fromApiKey(apiKey: SeamHttpOptionsWithApiKey['apiKey'], options?: Omit<SeamHttpOptionsWithApiKey, 'apiKey'>): SeamHttpCamerasLiveViews;
13
+ static fromClientSessionToken(clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options?: Omit<SeamHttpOptionsWithClientSessionToken, 'clientSessionToken'>): SeamHttpCamerasLiveViews;
14
+ static fromPublishableKey(publishableKey: string, userIdentifierKey: string, options?: SeamHttpFromPublishableKeyOptions): Promise<SeamHttpCamerasLiveViews>;
15
+ static fromConsoleSessionToken(consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], options?: Omit<SeamHttpOptionsWithConsoleSessionToken, 'consoleSessionToken' | 'workspaceId'>): SeamHttpCamerasLiveViews;
16
+ static fromPersonalAccessToken(personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], options?: Omit<SeamHttpOptionsWithPersonalAccessToken, 'personalAccessToken' | 'workspaceId'>): SeamHttpCamerasLiveViews;
17
+ createPaginator<const TResponse, const TResponseKey extends keyof TResponse>(request: SeamPaginatedRequest<TResponse, TResponseKey>): SeamPaginator<TResponse, TResponseKey>;
18
+ updateClientSessionToken(clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken']): Promise<void>;
19
+ /**
20
+ * Creates a short-lived live view session for a single camera. Pass the returned session ID and token to `/cameras/live_views/offer` to start a WebRTC stream, and to `/cameras/live_views/stop` to end the session.
21
+ *
22
+ * Camera live view is in beta. To enable it for your workspace, contact Seam support. To check whether a camera supports live view, use `device.can_stream_live_video`.
23
+ */
24
+ create(parameters: CamerasLiveViewsCreateParameters, options?: CamerasLiveViewsCreateOptions): CamerasLiveViewsCreateRequest;
25
+ /**
26
+ * Exchanges a WebRTC SDP offer for an SDP answer that starts streaming video from the camera, for a live view session that you created using `/cameras/live_views/create`.
27
+ *
28
+ * Camera live view is in beta. To enable it for your workspace, contact Seam support.
29
+ */
30
+ offer(parameters: CamerasLiveViewsOfferParameters, options?: CamerasLiveViewsOfferOptions): CamerasLiveViewsOfferRequest;
31
+ /**
32
+ * Stops a camera live view session that the current client session owns.
33
+ *
34
+ * Camera live view is in beta. To enable it for your workspace, contact Seam support.
35
+ */
36
+ stop(parameters: CamerasLiveViewsStopParameters, options?: CamerasLiveViewsStopOptions): CamerasLiveViewsStopRequest;
37
+ }
38
+ export type CamerasLiveViewsCreateParameters = {
39
+ /**
40
+ * ID of the camera to view.
41
+ */
42
+ device_id: string;
43
+ /**
44
+ * Number of seconds for which the live view session is valid, up to 600.
45
+ */
46
+ duration_seconds?: number | undefined;
47
+ /**
48
+ * Indicates whether to include the camera's audio.
49
+ */
50
+ include_audio?: boolean | undefined;
51
+ };
52
+ /**
53
+ * @deprecated Use CamerasLiveViewsCreateRequest instead.
54
+ */
55
+ export type CamerasLiveViewsCreateResponse = {
56
+ camera_live_view_session: CameraLiveViewSession;
57
+ };
58
+ export type CamerasLiveViewsCreateRequest = SeamHttpRequest<CamerasLiveViewsCreateResponse, 'camera_live_view_session'>;
59
+ export interface CamerasLiveViewsCreateOptions {
60
+ }
61
+ export type CamerasLiveViewsOfferParameters = {
62
+ /**
63
+ * ID of the camera live view session.
64
+ */
65
+ camera_live_view_session_id: string;
66
+ /**
67
+ * WebRTC SDP offer from the viewer, limited to 64 KiB of UTF-8 data.
68
+ */
69
+ sdp_offer: string;
70
+ /**
71
+ * Token returned when the camera live view session was created.
72
+ */
73
+ token: string;
74
+ };
75
+ /**
76
+ * @deprecated Use CamerasLiveViewsOfferRequest instead.
77
+ */
78
+ export type CamerasLiveViewsOfferResponse = {
79
+ camera_live_view_answer: CameraLiveViewAnswer;
80
+ };
81
+ export type CamerasLiveViewsOfferRequest = SeamHttpRequest<CamerasLiveViewsOfferResponse, 'camera_live_view_answer'>;
82
+ export interface CamerasLiveViewsOfferOptions {
83
+ }
84
+ export type CamerasLiveViewsStopParameters = {
85
+ /**
86
+ * ID of the camera live view session.
87
+ */
88
+ camera_live_view_session_id: string;
89
+ /**
90
+ * Token returned when the camera live view session was created.
91
+ */
92
+ token: string;
93
+ };
94
+ /**
95
+ * @deprecated Use CamerasLiveViewsStopRequest instead.
96
+ */
97
+ export type CamerasLiveViewsStopResponse = void;
98
+ export type CamerasLiveViewsStopRequest = SeamHttpRequest<void, undefined>;
99
+ export interface CamerasLiveViewsStopOptions {
100
+ }
@@ -0,0 +1,144 @@
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 { SeamHttpRequest, } from '../../../seam-http-request.js';
11
+ import { SeamPaginator } from '../../../seam-paginator.js';
12
+ export class SeamHttpCamerasLiveViews {
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 SeamHttpCamerasLiveViews(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 SeamHttpCamerasLiveViews(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 SeamHttpCamerasLiveViews(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 SeamHttpCamerasLiveViews.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 SeamHttpCamerasLiveViews.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 SeamHttpCamerasLiveViews(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 SeamHttpCamerasLiveViews(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
+ /**
86
+ * Creates a short-lived live view session for a single camera. Pass the returned session ID and token to `/cameras/live_views/offer` to start a WebRTC stream, and to `/cameras/live_views/stop` to end the session.
87
+ *
88
+ * Camera live view is in beta. To enable it for your workspace, contact Seam support. To check whether a camera supports live view, use `device.can_stream_live_video`.
89
+ */
90
+ create(parameters, options = {}) {
91
+ return new SeamHttpRequest(this, {
92
+ pathname: '/cameras/live_views/create',
93
+ method: 'POST',
94
+ body: parameters,
95
+ parameters,
96
+ hasRequiredParameters: true,
97
+ requiredParameterNames: ['device_id'],
98
+ atLeastOneParameterNames: [],
99
+ responseKey: 'camera_live_view_session',
100
+ options,
101
+ });
102
+ }
103
+ /**
104
+ * Exchanges a WebRTC SDP offer for an SDP answer that starts streaming video from the camera, for a live view session that you created using `/cameras/live_views/create`.
105
+ *
106
+ * Camera live view is in beta. To enable it for your workspace, contact Seam support.
107
+ */
108
+ offer(parameters, options = {}) {
109
+ return new SeamHttpRequest(this, {
110
+ pathname: '/cameras/live_views/offer',
111
+ method: 'POST',
112
+ body: parameters,
113
+ parameters,
114
+ hasRequiredParameters: true,
115
+ requiredParameterNames: [
116
+ 'camera_live_view_session_id',
117
+ 'sdp_offer',
118
+ 'token',
119
+ ],
120
+ atLeastOneParameterNames: [],
121
+ responseKey: 'camera_live_view_answer',
122
+ options,
123
+ });
124
+ }
125
+ /**
126
+ * Stops a camera live view session that the current client session owns.
127
+ *
128
+ * Camera live view is in beta. To enable it for your workspace, contact Seam support.
129
+ */
130
+ stop(parameters, options = {}) {
131
+ return new SeamHttpRequest(this, {
132
+ pathname: '/cameras/live_views/stop',
133
+ method: 'POST',
134
+ body: parameters,
135
+ parameters,
136
+ hasRequiredParameters: true,
137
+ requiredParameterNames: ['camera_live_view_session_id', 'token'],
138
+ atLeastOneParameterNames: [],
139
+ responseKey: undefined,
140
+ options,
141
+ });
142
+ }
143
+ }
144
+ //# sourceMappingURL=live-views.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"live-views.js","sourceRoot":"","sources":["../../../../src/lib/routes/cameras/live-views/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CAAA;IACJ,CAAC;CACF"}
@@ -50,7 +50,7 @@ export type ConnectWebviewsCreateParameters = {
50
50
  /**
51
51
  * Accepted device provider keys as an alternative to `provider_category`. Use this parameter to specify accepted providers explicitly. See [Customize the Brands to Display in Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-brands-to-display-in-your-connect-webviews). To list all provider keys, use [`/devices/list_device_providers`](https://www.seam.co/docs/api/devices/list_device_providers) with no filters.
52
52
  */
53
- accepted_providers?: Array<'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' | 'ical' | 'lodgify' | 'hostaway' | 'guesty' | 'acuity_scheduling' | 'omnitec' | 'kisi' | 'aqara' | 'yale_access' | 'hid_cm' | 'google_nest' | 'slack'> | undefined;
53
+ accepted_providers?: Array<'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' | 'yale_access' | 'hid_cm' | 'google_nest' | 'slack'> | undefined;
54
54
  /**
55
55
  * Indicates whether newly-added devices should appear as [managed devices](https://www.seam.co/docs/core-concepts/devices/managed-and-unmanaged-devices). See also: [Customize the Behavior Settings of Your Connect Webviews](https://www.seam.co/docs/core-concepts/connect-webviews/customizing-connect-webviews#customize-the-behavior-settings-of-your-connect-webviews).
56
56
  */
@@ -101,11 +101,11 @@ export type DevicesListParameters = {
101
101
  /**
102
102
  * Device type for which you want to list devices.
103
103
  */
104
- 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' | undefined;
104
+ 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' | undefined;
105
105
  /**
106
106
  * Array of device types for which you want to list devices.
107
107
  */
108
- device_types?: Array<'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'> | undefined;
108
+ device_types?: Array<'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'> | undefined;
109
109
  /**
110
110
  * Numerical limit on the number of devices to return.
111
111
  */
@@ -113,7 +113,7 @@ export type DevicesListParameters = {
113
113
  /**
114
114
  * Manufacturer for which you want to list devices.
115
115
  */
116
- manufacturer?: 'akuvox' | 'august' | 'avigilon_alta' | 'brivo' | 'butterflymx' | 'doorking' | 'four_suites' | 'genie' | 'igloo' | 'keywe' | 'kwikset' | 'linear' | 'nuki' | 'philia' | 'salto' | 'samsung' | 'schlage' | 'seam' | 'unknown' | 'wyze' | 'yale' | 'two_n' | 'ttlock' | 'igloohome' | 'controlbyweb' | 'tedee' | 'keyincode' | 'akiles' | 'aqara' | 'ecobee' | 'eufy' | 'dormakaba_oracode' | 'dormakaba_oracode_iho' | 'honeywell_resideo' | 'keynest' | 'korelock' | 'lockly' | 'minut' | 'nest' | 'noiseaware' | 'sensi' | 'smartthings' | 'tado' | 'ultraloq' | 'ring' | 'tapo' | 'ical' | 'lodgify' | 'hostaway' | 'guesty' | 'acuity_scheduling' | 'omnitec' | 'kisi' | 'slack' | 'yacan' | undefined;
116
+ manufacturer?: 'akuvox' | 'august' | 'avigilon_alta' | 'brivo' | 'butterflymx' | 'doorking' | 'four_suites' | 'genie' | 'igloo' | 'keywe' | 'kwikset' | 'linear' | 'nuki' | 'philia' | 'salto' | 'samsung' | 'schlage' | 'seam' | 'unknown' | 'wyze' | 'yale' | 'two_n' | 'ttlock' | 'igloohome' | 'controlbyweb' | 'tedee' | 'keyincode' | 'akiles' | 'aqara' | 'ecobee' | 'eufy' | 'dormakaba_oracode' | 'dormakaba_oracode_iho' | 'honeywell_resideo' | 'keynest' | 'korelock' | 'lockly' | 'minut' | 'nest' | 'noiseaware' | 'sensi' | 'smartthings' | 'tado' | 'ultraloq' | 'ring' | 'tapo' | 'arlo' | 'ical' | 'lodgify' | 'hostaway' | 'guesty' | 'acuity_scheduling' | 'omnitec' | 'kisi' | 'slack' | 'yacan' | undefined;
117
117
  /**
118
118
  * Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`.
119
119
  */
@@ -84,11 +84,11 @@ export type DevicesUnmanagedListParameters = {
84
84
  /**
85
85
  * Device type for which you want to list devices.
86
86
  */
87
- 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' | undefined;
87
+ 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' | undefined;
88
88
  /**
89
89
  * Array of device types for which you want to list devices.
90
90
  */
91
- device_types?: Array<'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'> | undefined;
91
+ device_types?: Array<'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'> | undefined;
92
92
  /**
93
93
  * Numerical limit on the number of devices to return.
94
94
  */
@@ -96,7 +96,7 @@ export type DevicesUnmanagedListParameters = {
96
96
  /**
97
97
  * Manufacturer for which you want to list devices.
98
98
  */
99
- manufacturer?: 'akuvox' | 'august' | 'avigilon_alta' | 'brivo' | 'butterflymx' | 'doorking' | 'four_suites' | 'genie' | 'igloo' | 'keywe' | 'kwikset' | 'linear' | 'nuki' | 'philia' | 'salto' | 'samsung' | 'schlage' | 'seam' | 'unknown' | 'wyze' | 'yale' | 'two_n' | 'ttlock' | 'igloohome' | 'controlbyweb' | 'tedee' | 'keyincode' | 'akiles' | 'aqara' | 'ecobee' | 'eufy' | 'dormakaba_oracode' | 'dormakaba_oracode_iho' | 'honeywell_resideo' | 'keynest' | 'korelock' | 'lockly' | 'minut' | 'nest' | 'noiseaware' | 'sensi' | 'smartthings' | 'tado' | 'ultraloq' | 'ring' | 'tapo' | 'ical' | 'lodgify' | 'hostaway' | 'guesty' | 'acuity_scheduling' | 'omnitec' | 'kisi' | 'slack' | 'yacan' | undefined;
99
+ manufacturer?: 'akuvox' | 'august' | 'avigilon_alta' | 'brivo' | 'butterflymx' | 'doorking' | 'four_suites' | 'genie' | 'igloo' | 'keywe' | 'kwikset' | 'linear' | 'nuki' | 'philia' | 'salto' | 'samsung' | 'schlage' | 'seam' | 'unknown' | 'wyze' | 'yale' | 'two_n' | 'ttlock' | 'igloohome' | 'controlbyweb' | 'tedee' | 'keyincode' | 'akiles' | 'aqara' | 'ecobee' | 'eufy' | 'dormakaba_oracode' | 'dormakaba_oracode_iho' | 'honeywell_resideo' | 'keynest' | 'korelock' | 'lockly' | 'minut' | 'nest' | 'noiseaware' | 'sensi' | 'smartthings' | 'tado' | 'ultraloq' | 'ring' | 'tapo' | 'arlo' | 'ical' | 'lodgify' | 'hostaway' | 'guesty' | 'acuity_scheduling' | 'omnitec' | 'kisi' | 'slack' | 'yacan' | undefined;
100
100
  /**
101
101
  * Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`.
102
102
  */
@@ -132,11 +132,11 @@ export type EventsListParameters = RequireAtLeastOne<{
132
132
  /**
133
133
  * Type of the events that you want to list.
134
134
  */
135
- event_type?: 'access_code.created' | 'access_code.changed' | 'access_code.name_changed' | 'access_code.code_changed' | 'access_code.time_frame_changed' | 'access_code.mutations_requested' | 'access_code.scheduled_on_device' | 'access_code.set_on_device' | 'access_code.removed_from_device' | 'access_code.delay_in_setting_on_device' | 'access_code.failed_to_set_on_device' | 'access_code.issued' | 'access_code.delay_in_issuing' | 'access_code.failed_to_issue' | 'access_code.failed_to_update' | 'access_code.failed_to_remove' | 'access_code.deleted' | 'access_code.delay_in_removing_from_device' | 'access_code.failed_to_remove_from_device' | 'access_code.modified_external_to_seam' | 'access_code.deleted_external_to_seam' | 'access_code.backup_access_code_pulled' | 'access_code.unmanaged.converted_to_managed' | 'access_code.unmanaged.failed_to_convert_to_managed' | 'access_code.unmanaged.created' | 'access_code.unmanaged.removed' | 'access_grant.created' | 'access_grant.deleted' | 'access_grant.access_granted_to_all_doors' | 'access_grant.access_granted_to_door' | 'access_grant.access_to_door_lost' | 'access_grant.access_times_changed' | 'access_grant.could_not_create_requested_access_methods' | 'access_method.issued' | 'access_method.revoked' | 'access_method.card_encoding_required' | 'access_method.deleted' | 'access_method.reissued' | 'access_method.created' | 'access_method.delay_in_issuing' | 'access_method.failed_to_issue' | 'acs_system.connected' | 'acs_system.added' | 'acs_system.disconnected' | 'acs_credential.deleted' | 'acs_credential.issued' | 'acs_credential.reissued' | 'acs_credential.invalidated' | 'acs_user.created' | 'acs_user.deleted' | 'acs_encoder.added' | 'acs_encoder.removed' | 'acs_access_group.deleted' | 'acs_entrance.added' | 'acs_entrance.removed' | 'client_session.deleted' | 'connected_account.connected' | 'connected_account.created' | 'connected_account.successful_login' | 'connected_account.disconnected' | 'connected_account.completed_first_sync' | 'connected_account.deleted' | 'connected_account.completed_first_sync_after_reconnection' | 'connected_account.reauthorization_requested' | 'action_attempt.lock_door.succeeded' | 'action_attempt.lock_door.failed' | 'action_attempt.unlock_door.succeeded' | 'action_attempt.unlock_door.failed' | 'action_attempt.simulate_keypad_code_entry.succeeded' | 'action_attempt.simulate_keypad_code_entry.failed' | 'action_attempt.simulate_manual_lock_via_keypad.succeeded' | 'action_attempt.simulate_manual_lock_via_keypad.failed' | 'connect_webview.login_succeeded' | 'connect_webview.login_failed' | 'device.connected' | 'device.added' | 'device.converted_to_unmanaged' | 'device.unmanaged.converted_to_managed' | 'device.unmanaged.connected' | 'device.disconnected' | 'device.unmanaged.disconnected' | 'device.tampered' | 'device.low_battery' | 'device.battery_status_changed' | 'device.removed' | 'device.deleted' | 'device.third_party_integration_detected' | 'device.third_party_integration_no_longer_detected' | 'device.salto.privacy_mode_activated' | 'device.salto.privacy_mode_deactivated' | 'device.connection_became_flaky' | 'device.connection_stabilized' | 'device.error.subscription_required' | 'device.error.subscription_required.resolved' | 'device.accessory_keypad_connected' | 'device.accessory_keypad_disconnected' | 'noise_sensor.noise_threshold_triggered' | 'lock.locked' | 'lock.unlocked' | 'lock.access_denied' | 'thermostat.climate_preset_activated' | 'thermostat.manually_adjusted' | 'thermostat.temperature_threshold_exceeded' | 'thermostat.temperature_threshold_no_longer_exceeded' | 'thermostat.temperature_reached_set_point' | 'thermostat.temperature_changed' | 'device.name_changed' | 'camera.activated' | 'device.doorbell_rang' | 'enrollment_automation.deleted' | 'phone.deactivated' | 'space.device_membership_changed' | 'space.created' | 'space.deleted' | undefined;
135
+ event_type?: 'access_code.created' | 'access_code.changed' | 'access_code.name_changed' | 'access_code.code_changed' | 'access_code.time_frame_changed' | 'access_code.mutations_requested' | 'access_code.scheduled_on_device' | 'access_code.set_on_device' | 'access_code.removed_from_device' | 'access_code.delay_in_setting_on_device' | 'access_code.failed_to_set_on_device' | 'access_code.issued' | 'access_code.delay_in_issuing' | 'access_code.failed_to_issue' | 'access_code.failed_to_update' | 'access_code.failed_to_delete' | 'access_code.deleted' | 'access_code.delay_in_removing_from_device' | 'access_code.failed_to_remove_from_device' | 'access_code.modified_external_to_seam' | 'access_code.deleted_external_to_seam' | 'access_code.backup_access_code_pulled' | 'access_code.unmanaged.converted_to_managed' | 'access_code.unmanaged.failed_to_convert_to_managed' | 'access_code.unmanaged.created' | 'access_code.unmanaged.removed' | 'access_grant.created' | 'access_grant.deleted' | 'access_grant.access_granted_to_all_doors' | 'access_grant.access_granted_to_door' | 'access_grant.access_to_door_lost' | 'access_grant.access_times_changed' | 'access_grant.could_not_create_requested_access_methods' | 'access_method.issued' | 'access_method.revoked' | 'access_method.card_encoding_required' | 'access_method.deleted' | 'access_method.reissued' | 'access_method.created' | 'access_method.delay_in_issuing' | 'access_method.failed_to_issue' | 'acs_system.connected' | 'acs_system.added' | 'acs_system.disconnected' | 'acs_credential.deleted' | 'acs_credential.issued' | 'acs_credential.reissued' | 'acs_credential.invalidated' | 'acs_user.created' | 'acs_user.deleted' | 'acs_encoder.added' | 'acs_encoder.removed' | 'acs_access_group.deleted' | 'acs_entrance.added' | 'acs_entrance.removed' | 'client_session.deleted' | 'connected_account.connected' | 'connected_account.created' | 'connected_account.successful_login' | 'connected_account.disconnected' | 'connected_account.completed_first_sync' | 'connected_account.deleted' | 'connected_account.completed_first_sync_after_reconnection' | 'connected_account.reauthorization_requested' | 'action_attempt.lock_door.succeeded' | 'action_attempt.lock_door.failed' | 'action_attempt.unlock_door.succeeded' | 'action_attempt.unlock_door.failed' | 'action_attempt.simulate_keypad_code_entry.succeeded' | 'action_attempt.simulate_keypad_code_entry.failed' | 'action_attempt.simulate_manual_lock_via_keypad.succeeded' | 'action_attempt.simulate_manual_lock_via_keypad.failed' | 'connect_webview.login_succeeded' | 'connect_webview.login_failed' | 'device.connected' | 'device.added' | 'device.converted_to_unmanaged' | 'device.unmanaged.converted_to_managed' | 'device.unmanaged.connected' | 'device.disconnected' | 'device.unmanaged.disconnected' | 'device.tampered' | 'device.low_battery' | 'device.battery_status_changed' | 'device.removed' | 'device.deleted' | 'device.third_party_integration_detected' | 'device.third_party_integration_no_longer_detected' | 'device.salto.privacy_mode_activated' | 'device.salto.privacy_mode_deactivated' | 'device.connection_became_flaky' | 'device.connection_stabilized' | 'device.error.subscription_required' | 'device.error.subscription_required.resolved' | 'device.accessory_keypad_connected' | 'device.accessory_keypad_disconnected' | 'noise_sensor.noise_threshold_triggered' | 'lock.locked' | 'lock.unlocked' | 'lock.access_denied' | 'thermostat.climate_preset_activated' | 'thermostat.manually_adjusted' | 'thermostat.temperature_threshold_exceeded' | 'thermostat.temperature_threshold_no_longer_exceeded' | 'thermostat.temperature_reached_set_point' | 'thermostat.temperature_changed' | 'device.name_changed' | 'camera.activated' | 'device.doorbell_rang' | 'enrollment_automation.deleted' | 'phone.deactivated' | 'space.device_membership_changed' | 'space.created' | 'space.deleted' | undefined;
136
136
  /**
137
137
  * Types of the events that you want to list.
138
138
  */
139
- event_types?: Array<'access_code.created' | 'access_code.changed' | 'access_code.name_changed' | 'access_code.code_changed' | 'access_code.time_frame_changed' | 'access_code.mutations_requested' | 'access_code.scheduled_on_device' | 'access_code.set_on_device' | 'access_code.removed_from_device' | 'access_code.delay_in_setting_on_device' | 'access_code.failed_to_set_on_device' | 'access_code.issued' | 'access_code.delay_in_issuing' | 'access_code.failed_to_issue' | 'access_code.failed_to_update' | 'access_code.failed_to_remove' | 'access_code.deleted' | 'access_code.delay_in_removing_from_device' | 'access_code.failed_to_remove_from_device' | 'access_code.modified_external_to_seam' | 'access_code.deleted_external_to_seam' | 'access_code.backup_access_code_pulled' | 'access_code.unmanaged.converted_to_managed' | 'access_code.unmanaged.failed_to_convert_to_managed' | 'access_code.unmanaged.created' | 'access_code.unmanaged.removed' | 'access_grant.created' | 'access_grant.deleted' | 'access_grant.access_granted_to_all_doors' | 'access_grant.access_granted_to_door' | 'access_grant.access_to_door_lost' | 'access_grant.access_times_changed' | 'access_grant.could_not_create_requested_access_methods' | 'access_method.issued' | 'access_method.revoked' | 'access_method.card_encoding_required' | 'access_method.deleted' | 'access_method.reissued' | 'access_method.created' | 'access_method.delay_in_issuing' | 'access_method.failed_to_issue' | 'acs_system.connected' | 'acs_system.added' | 'acs_system.disconnected' | 'acs_credential.deleted' | 'acs_credential.issued' | 'acs_credential.reissued' | 'acs_credential.invalidated' | 'acs_user.created' | 'acs_user.deleted' | 'acs_encoder.added' | 'acs_encoder.removed' | 'acs_access_group.deleted' | 'acs_entrance.added' | 'acs_entrance.removed' | 'client_session.deleted' | 'connected_account.connected' | 'connected_account.created' | 'connected_account.successful_login' | 'connected_account.disconnected' | 'connected_account.completed_first_sync' | 'connected_account.deleted' | 'connected_account.completed_first_sync_after_reconnection' | 'connected_account.reauthorization_requested' | 'action_attempt.lock_door.succeeded' | 'action_attempt.lock_door.failed' | 'action_attempt.unlock_door.succeeded' | 'action_attempt.unlock_door.failed' | 'action_attempt.simulate_keypad_code_entry.succeeded' | 'action_attempt.simulate_keypad_code_entry.failed' | 'action_attempt.simulate_manual_lock_via_keypad.succeeded' | 'action_attempt.simulate_manual_lock_via_keypad.failed' | 'connect_webview.login_succeeded' | 'connect_webview.login_failed' | 'device.connected' | 'device.added' | 'device.converted_to_unmanaged' | 'device.unmanaged.converted_to_managed' | 'device.unmanaged.connected' | 'device.disconnected' | 'device.unmanaged.disconnected' | 'device.tampered' | 'device.low_battery' | 'device.battery_status_changed' | 'device.removed' | 'device.deleted' | 'device.third_party_integration_detected' | 'device.third_party_integration_no_longer_detected' | 'device.salto.privacy_mode_activated' | 'device.salto.privacy_mode_deactivated' | 'device.connection_became_flaky' | 'device.connection_stabilized' | 'device.error.subscription_required' | 'device.error.subscription_required.resolved' | 'device.accessory_keypad_connected' | 'device.accessory_keypad_disconnected' | 'noise_sensor.noise_threshold_triggered' | 'lock.locked' | 'lock.unlocked' | 'lock.access_denied' | 'thermostat.climate_preset_activated' | 'thermostat.manually_adjusted' | 'thermostat.temperature_threshold_exceeded' | 'thermostat.temperature_threshold_no_longer_exceeded' | 'thermostat.temperature_reached_set_point' | 'thermostat.temperature_changed' | 'device.name_changed' | 'camera.activated' | 'device.doorbell_rang' | 'enrollment_automation.deleted' | 'phone.deactivated' | 'space.device_membership_changed' | 'space.created' | 'space.deleted'> | undefined;
139
+ event_types?: Array<'access_code.created' | 'access_code.changed' | 'access_code.name_changed' | 'access_code.code_changed' | 'access_code.time_frame_changed' | 'access_code.mutations_requested' | 'access_code.scheduled_on_device' | 'access_code.set_on_device' | 'access_code.removed_from_device' | 'access_code.delay_in_setting_on_device' | 'access_code.failed_to_set_on_device' | 'access_code.issued' | 'access_code.delay_in_issuing' | 'access_code.failed_to_issue' | 'access_code.failed_to_update' | 'access_code.failed_to_delete' | 'access_code.deleted' | 'access_code.delay_in_removing_from_device' | 'access_code.failed_to_remove_from_device' | 'access_code.modified_external_to_seam' | 'access_code.deleted_external_to_seam' | 'access_code.backup_access_code_pulled' | 'access_code.unmanaged.converted_to_managed' | 'access_code.unmanaged.failed_to_convert_to_managed' | 'access_code.unmanaged.created' | 'access_code.unmanaged.removed' | 'access_grant.created' | 'access_grant.deleted' | 'access_grant.access_granted_to_all_doors' | 'access_grant.access_granted_to_door' | 'access_grant.access_to_door_lost' | 'access_grant.access_times_changed' | 'access_grant.could_not_create_requested_access_methods' | 'access_method.issued' | 'access_method.revoked' | 'access_method.card_encoding_required' | 'access_method.deleted' | 'access_method.reissued' | 'access_method.created' | 'access_method.delay_in_issuing' | 'access_method.failed_to_issue' | 'acs_system.connected' | 'acs_system.added' | 'acs_system.disconnected' | 'acs_credential.deleted' | 'acs_credential.issued' | 'acs_credential.reissued' | 'acs_credential.invalidated' | 'acs_user.created' | 'acs_user.deleted' | 'acs_encoder.added' | 'acs_encoder.removed' | 'acs_access_group.deleted' | 'acs_entrance.added' | 'acs_entrance.removed' | 'client_session.deleted' | 'connected_account.connected' | 'connected_account.created' | 'connected_account.successful_login' | 'connected_account.disconnected' | 'connected_account.completed_first_sync' | 'connected_account.deleted' | 'connected_account.completed_first_sync_after_reconnection' | 'connected_account.reauthorization_requested' | 'action_attempt.lock_door.succeeded' | 'action_attempt.lock_door.failed' | 'action_attempt.unlock_door.succeeded' | 'action_attempt.unlock_door.failed' | 'action_attempt.simulate_keypad_code_entry.succeeded' | 'action_attempt.simulate_keypad_code_entry.failed' | 'action_attempt.simulate_manual_lock_via_keypad.succeeded' | 'action_attempt.simulate_manual_lock_via_keypad.failed' | 'connect_webview.login_succeeded' | 'connect_webview.login_failed' | 'device.connected' | 'device.added' | 'device.converted_to_unmanaged' | 'device.unmanaged.converted_to_managed' | 'device.unmanaged.connected' | 'device.disconnected' | 'device.unmanaged.disconnected' | 'device.tampered' | 'device.low_battery' | 'device.battery_status_changed' | 'device.removed' | 'device.deleted' | 'device.third_party_integration_detected' | 'device.third_party_integration_no_longer_detected' | 'device.salto.privacy_mode_activated' | 'device.salto.privacy_mode_deactivated' | 'device.connection_became_flaky' | 'device.connection_stabilized' | 'device.error.subscription_required' | 'device.error.subscription_required.resolved' | 'device.accessory_keypad_connected' | 'device.accessory_keypad_disconnected' | 'noise_sensor.noise_threshold_triggered' | 'lock.locked' | 'lock.unlocked' | 'lock.access_denied' | 'thermostat.climate_preset_activated' | 'thermostat.manually_adjusted' | 'thermostat.temperature_threshold_exceeded' | 'thermostat.temperature_threshold_no_longer_exceeded' | 'thermostat.temperature_reached_set_point' | 'thermostat.temperature_changed' | 'device.name_changed' | 'camera.activated' | 'device.doorbell_rang' | 'enrollment_automation.deleted' | 'phone.deactivated' | 'space.device_membership_changed' | 'space.created' | 'space.deleted'> | undefined;
140
140
  /**
141
141
  * Numerical limit on the number of events to return.
142
142
  */
@@ -3,6 +3,7 @@ export * from './access-grants/index.js';
3
3
  export * from './access-methods/index.js';
4
4
  export * from './acs/index.js';
5
5
  export * from './action-attempts/index.js';
6
+ export * from './cameras/index.js';
6
7
  export * from './client-sessions/index.js';
7
8
  export * from './connect-webviews/index.js';
8
9
  export * from './connected-accounts/index.js';
@@ -11,6 +12,7 @@ export * from './devices/index.js';
11
12
  export * from './events/index.js';
12
13
  export * from './instant-keys/index.js';
13
14
  export * from './locks/index.js';
15
+ export * from './media/index.js';
14
16
  export * from './noise-sensors/index.js';
15
17
  export * from './phones/index.js';
16
18
  export * from './seam-http.js';
@@ -7,6 +7,7 @@ export * from './access-grants/index.js';
7
7
  export * from './access-methods/index.js';
8
8
  export * from './acs/index.js';
9
9
  export * from './action-attempts/index.js';
10
+ export * from './cameras/index.js';
10
11
  export * from './client-sessions/index.js';
11
12
  export * from './connect-webviews/index.js';
12
13
  export * from './connected-accounts/index.js';
@@ -15,6 +16,7 @@ export * from './devices/index.js';
15
16
  export * from './events/index.js';
16
17
  export * from './instant-keys/index.js';
17
18
  export * from './locks/index.js';
19
+ export * from './media/index.js';
18
20
  export * from './noise-sensors/index.js';
19
21
  export * from './phones/index.js';
20
22
  export * from './seam-http.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/lib/routes/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,yBAAyB,CAAA;AACvC,cAAc,0BAA0B,CAAA;AACxC,cAAc,2BAA2B,CAAA;AACzC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,4BAA4B,CAAA;AAC1C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,sBAAsB,CAAA;AACpC,cAAc,oBAAoB,CAAA;AAClC,cAAc,mBAAmB,CAAA;AACjC,cAAc,yBAAyB,CAAA;AACvC,cAAc,kBAAkB,CAAA;AAChC,cAAc,0BAA0B,CAAA;AACxC,cAAc,mBAAmB,CAAA;AACjC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,0BAA0B,CAAA;AACxC,cAAc,4CAA4C,CAAA;AAC1D,cAAc,kCAAkC,CAAA;AAChD,cAAc,mBAAmB,CAAA;AACjC,cAAc,wBAAwB,CAAA;AACtC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,qBAAqB,CAAA;AACnC,cAAc,uBAAuB,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/lib/routes/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,yBAAyB,CAAA;AACvC,cAAc,0BAA0B,CAAA;AACxC,cAAc,2BAA2B,CAAA;AACzC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,4BAA4B,CAAA;AAC1C,cAAc,oBAAoB,CAAA;AAClC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,sBAAsB,CAAA;AACpC,cAAc,oBAAoB,CAAA;AAClC,cAAc,mBAAmB,CAAA;AACjC,cAAc,yBAAyB,CAAA;AACvC,cAAc,kBAAkB,CAAA;AAChC,cAAc,kBAAkB,CAAA;AAChC,cAAc,0BAA0B,CAAA;AACxC,cAAc,mBAAmB,CAAA;AACjC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,0BAA0B,CAAA;AACxC,cAAc,4CAA4C,CAAA;AAC1D,cAAc,kCAAkC,CAAA;AAChD,cAAc,mBAAmB,CAAA;AACjC,cAAc,wBAAwB,CAAA;AACtC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,qBAAqB,CAAA;AACnC,cAAc,uBAAuB,CAAA"}
@@ -0,0 +1 @@
1
+ export * from './media.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 './media.js';
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/routes/media/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,cAAc,YAAY,CAAA"}
@@ -0,0 +1,41 @@
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 { Media } from '../../resources/media.js';
4
+ import { SeamHttpRequest, type SeamPaginatedRequest } from '../../seam-http-request.js';
5
+ import { SeamPaginator } from '../../seam-paginator.js';
6
+ export declare class SeamHttpMedia {
7
+ client: Client;
8
+ readonly defaults: Required<SeamHttpRequestOptions>;
9
+ constructor(apiKeyOrOptions?: string | SeamHttpOptions);
10
+ static fromClient(client: SeamHttpOptionsWithClient['client'], options?: Omit<SeamHttpOptionsWithClient, 'client'>): SeamHttpMedia;
11
+ static fromApiKey(apiKey: SeamHttpOptionsWithApiKey['apiKey'], options?: Omit<SeamHttpOptionsWithApiKey, 'apiKey'>): SeamHttpMedia;
12
+ static fromClientSessionToken(clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'], options?: Omit<SeamHttpOptionsWithClientSessionToken, 'clientSessionToken'>): SeamHttpMedia;
13
+ static fromPublishableKey(publishableKey: string, userIdentifierKey: string, options?: SeamHttpFromPublishableKeyOptions): Promise<SeamHttpMedia>;
14
+ static fromConsoleSessionToken(consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'], workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'], options?: Omit<SeamHttpOptionsWithConsoleSessionToken, 'consoleSessionToken' | 'workspaceId'>): SeamHttpMedia;
15
+ static fromPersonalAccessToken(personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'], workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'], options?: Omit<SeamHttpOptionsWithPersonalAccessToken, 'personalAccessToken' | 'workspaceId'>): SeamHttpMedia;
16
+ createPaginator<const TResponse, const TResponseKey extends keyof TResponse>(request: SeamPaginatedRequest<TResponse, TResponseKey>): SeamPaginator<TResponse, TResponseKey>;
17
+ updateClientSessionToken(clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken']): Promise<void>;
18
+ /**
19
+ * Returns a specified piece of media, such as a video clip or thumbnail image captured for a camera event, with a short-lived URL from which you can download it. Camera events list their media in `media_ids`. This endpoint is in beta.
20
+ */
21
+ get(parameters: MediaGetParameters, options?: MediaGetOptions): MediaGetRequest;
22
+ }
23
+ export type MediaGetParameters = {
24
+ /**
25
+ * Response format. `json` returns the media object. `redirect` responds with a `302` redirect to the media's download URL, so you can use this endpoint directly as the source of an image or video.
26
+ */
27
+ format?: 'json' | 'redirect' | undefined;
28
+ /**
29
+ * ID of the media that you want to get.
30
+ */
31
+ media_id: string;
32
+ };
33
+ /**
34
+ * @deprecated Use MediaGetRequest instead.
35
+ */
36
+ export type MediaGetResponse = {
37
+ media: Media;
38
+ };
39
+ export type MediaGetRequest = SeamHttpRequest<MediaGetResponse, 'media'>;
40
+ export interface MediaGetOptions {
41
+ }
@@ -0,0 +1,102 @@
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 { SeamHttpRequest, } from '../../seam-http-request.js';
11
+ import { SeamPaginator } from '../../seam-paginator.js';
12
+ export class SeamHttpMedia {
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 SeamHttpMedia(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 SeamHttpMedia(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 SeamHttpMedia(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 SeamHttpMedia.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 SeamHttpMedia.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 SeamHttpMedia(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 SeamHttpMedia(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
+ /**
86
+ * Returns a specified piece of media, such as a video clip or thumbnail image captured for a camera event, with a short-lived URL from which you can download it. Camera events list their media in `media_ids`. This endpoint is in beta.
87
+ */
88
+ get(parameters, options = {}) {
89
+ return new SeamHttpRequest(this, {
90
+ pathname: '/media/get',
91
+ method: 'GET',
92
+ params: parameters,
93
+ parameters,
94
+ hasRequiredParameters: true,
95
+ requiredParameterNames: ['media_id'],
96
+ atLeastOneParameterNames: [],
97
+ responseKey: 'media',
98
+ options,
99
+ });
100
+ }
101
+ }
102
+ //# sourceMappingURL=media.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"media.js","sourceRoot":"","sources":["../../../src/lib/routes/media/media.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;AAE7B,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAA;AAC5E,OAAO,EACL,eAAe,GAEhB,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAA;AAErD,MAAM,OAAO,aAAa;IACxB,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,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