@seamapi/http 2.4.0 → 2.4.2
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.
- package/lib/error-interceptor.js +1 -1
- package/lib/request-parameters.d.ts +2 -0
- package/lib/request-parameters.js +17 -0
- package/lib/request-parameters.js.map +1 -0
- package/lib/resources/access-code.d.ts +13 -9
- package/lib/resources/acs-credential.d.ts +33 -1
- package/lib/resources/acs-entrance.d.ts +1 -1
- package/lib/resources/acs-system.d.ts +30 -0
- package/lib/resources/action-attempt.d.ts +82 -11
- package/lib/resources/device-provider.d.ts +1 -1
- package/lib/resources/device.d.ts +63 -18
- package/lib/resources/event.d.ts +0 -76
- package/lib/resources/unmanaged-access-code.d.ts +13 -9
- package/lib/resources/unmanaged-device.d.ts +28 -16
- package/lib/routes/access-codes/access-codes.d.ts +8 -35
- package/lib/routes/access-codes/access-codes.js +17 -6
- package/lib/routes/access-codes/access-codes.js.map +1 -1
- package/lib/routes/access-codes/simulate/simulate.js +2 -0
- package/lib/routes/access-codes/simulate/simulate.js.map +1 -1
- package/lib/routes/access-codes/unmanaged/unmanaged.d.ts +5 -4
- package/lib/routes/access-codes/unmanaged/unmanaged.js +12 -6
- package/lib/routes/access-codes/unmanaged/unmanaged.js.map +1 -1
- package/lib/routes/access-grants/access-grants.d.ts +20 -19
- package/lib/routes/access-grants/access-grants.js +10 -2
- package/lib/routes/access-grants/access-grants.js.map +1 -1
- package/lib/routes/access-grants/unmanaged/unmanaged.d.ts +1 -1
- package/lib/routes/access-grants/unmanaged/unmanaged.js +8 -4
- package/lib/routes/access-grants/unmanaged/unmanaged.js.map +1 -1
- package/lib/routes/access-methods/access-methods.d.ts +8 -7
- package/lib/routes/access-methods/access-methods.js +12 -4
- package/lib/routes/access-methods/access-methods.js.map +1 -1
- package/lib/routes/access-methods/unmanaged/unmanaged.js +7 -4
- package/lib/routes/access-methods/unmanaged/unmanaged.js.map +1 -1
- package/lib/routes/acs/access-groups/access-groups.js +20 -12
- package/lib/routes/acs/access-groups/access-groups.js.map +1 -1
- package/lib/routes/acs/credentials/credentials.d.ts +1 -1
- package/lib/routes/acs/credentials/credentials.js +15 -6
- package/lib/routes/acs/credentials/credentials.js.map +1 -1
- package/lib/routes/acs/encoders/encoders.d.ts +1 -1
- package/lib/routes/acs/encoders/encoders.js +10 -4
- package/lib/routes/acs/encoders/encoders.js.map +1 -1
- package/lib/routes/acs/encoders/simulate/simulate.js +5 -0
- package/lib/routes/acs/encoders/simulate/simulate.js.map +1 -1
- package/lib/routes/acs/entrances/entrances.d.ts +2 -2
- package/lib/routes/acs/entrances/entrances.js +8 -2
- package/lib/routes/acs/entrances/entrances.js.map +1 -1
- package/lib/routes/acs/systems/systems.js +11 -6
- package/lib/routes/acs/systems/systems.js.map +1 -1
- package/lib/routes/acs/users/users.d.ts +25 -24
- package/lib/routes/acs/users/users.js +22 -10
- package/lib/routes/acs/users/users.js.map +1 -1
- package/lib/routes/action-attempts/action-attempts.d.ts +1 -1
- package/lib/routes/action-attempts/action-attempts.js +5 -2
- package/lib/routes/action-attempts/action-attempts.js.map +1 -1
- package/lib/routes/client-sessions/client-sessions.d.ts +4 -3
- package/lib/routes/client-sessions/client-sessions.js +14 -6
- package/lib/routes/client-sessions/client-sessions.js.map +1 -1
- package/lib/routes/connect-webviews/connect-webviews.d.ts +2 -2
- package/lib/routes/connect-webviews/connect-webviews.js +9 -4
- package/lib/routes/connect-webviews/connect-webviews.js.map +1 -1
- package/lib/routes/connected-accounts/connected-accounts.d.ts +5 -4
- package/lib/routes/connected-accounts/connected-accounts.js +8 -2
- package/lib/routes/connected-accounts/connected-accounts.js.map +1 -1
- package/lib/routes/connected-accounts/simulate/simulate.js +2 -0
- package/lib/routes/connected-accounts/simulate/simulate.js.map +1 -1
- package/lib/routes/customers/customers.d.ts +9 -9
- package/lib/routes/customers/customers.js +4 -0
- package/lib/routes/customers/customers.js.map +1 -1
- package/lib/routes/devices/devices.d.ts +11 -10
- package/lib/routes/devices/devices.js +10 -4
- package/lib/routes/devices/devices.js.map +1 -1
- package/lib/routes/devices/simulate/simulate.js +7 -0
- package/lib/routes/devices/simulate/simulate.js.map +1 -1
- package/lib/routes/devices/unmanaged/unmanaged.d.ts +8 -23
- package/lib/routes/devices/unmanaged/unmanaged.js +6 -2
- package/lib/routes/devices/unmanaged/unmanaged.js.map +1 -1
- package/lib/routes/events/events.d.ts +8 -7
- package/lib/routes/events/events.js +5 -2
- package/lib/routes/events/events.js.map +1 -1
- package/lib/routes/instant-keys/instant-keys.d.ts +4 -3
- package/lib/routes/instant-keys/instant-keys.js +10 -6
- package/lib/routes/instant-keys/instant-keys.js.map +1 -1
- package/lib/routes/locks/locks.d.ts +7 -46
- package/lib/routes/locks/locks.js +8 -2
- package/lib/routes/locks/locks.js.map +1 -1
- package/lib/routes/locks/simulate/simulate.js +3 -0
- package/lib/routes/locks/simulate/simulate.js.map +1 -1
- package/lib/routes/noise-sensors/noise-sensors.d.ts +0 -40
- package/lib/routes/noise-sensors/noise-sensors.js +2 -0
- package/lib/routes/noise-sensors/noise-sensors.js.map +1 -1
- package/lib/routes/noise-sensors/noise-thresholds/noise-thresholds.js +12 -6
- package/lib/routes/noise-sensors/noise-thresholds/noise-thresholds.js.map +1 -1
- package/lib/routes/noise-sensors/simulate/simulate.js +2 -0
- package/lib/routes/noise-sensors/simulate/simulate.js.map +1 -1
- package/lib/routes/phones/phones.js +10 -6
- package/lib/routes/phones/phones.js.map +1 -1
- package/lib/routes/phones/simulate/simulate.js +2 -0
- package/lib/routes/phones/simulate/simulate.js.map +1 -1
- package/lib/routes/seam-http-endpoints.d.ts +26 -26
- package/lib/routes/spaces/spaces.d.ts +16 -15
- package/lib/routes/spaces/spaces.js +19 -6
- package/lib/routes/spaces/spaces.js.map +1 -1
- package/lib/routes/thermostats/daily-programs/daily-programs.js +6 -2
- package/lib/routes/thermostats/daily-programs/daily-programs.js.map +1 -1
- package/lib/routes/thermostats/schedules/schedules.d.ts +2 -2
- package/lib/routes/thermostats/schedules/schedules.js +12 -6
- package/lib/routes/thermostats/schedules/schedules.js.map +1 -1
- package/lib/routes/thermostats/simulate/simulate.js +3 -0
- package/lib/routes/thermostats/simulate/simulate.js.map +1 -1
- package/lib/routes/thermostats/thermostats.d.ts +13 -53
- package/lib/routes/thermostats/thermostats.js +17 -2
- package/lib/routes/thermostats/thermostats.js.map +1 -1
- package/lib/routes/user-identities/unmanaged/unmanaged.d.ts +1 -1
- package/lib/routes/user-identities/unmanaged/unmanaged.js +8 -4
- package/lib/routes/user-identities/unmanaged/unmanaged.js.map +1 -1
- package/lib/routes/user-identities/user-identities.d.ts +13 -12
- package/lib/routes/user-identities/user-identities.js +29 -14
- package/lib/routes/user-identities/user-identities.js.map +1 -1
- package/lib/routes/webhooks/webhooks.js +10 -4
- package/lib/routes/webhooks/webhooks.js.map +1 -1
- package/lib/routes/workspaces/workspaces.d.ts +9 -9
- package/lib/routes/workspaces/workspaces.js +6 -0
- package/lib/routes/workspaces/workspaces.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +3 -3
- package/src/lib/error-interceptor.ts +1 -1
- package/src/lib/request-parameters.ts +33 -0
- package/src/lib/resources/access-code.ts +15 -9
- package/src/lib/resources/acs-credential.ts +40 -0
- package/src/lib/resources/acs-entrance.ts +1 -1
- package/src/lib/resources/acs-system.ts +36 -0
- package/src/lib/resources/action-attempt.ts +91 -6
- package/src/lib/resources/device-provider.ts +1 -0
- package/src/lib/resources/device.ts +70 -20
- package/src/lib/resources/event.ts +0 -76
- package/src/lib/resources/unmanaged-access-code.ts +15 -9
- package/src/lib/resources/unmanaged-device.ts +33 -18
- package/src/lib/routes/access-codes/access-codes.ts +57 -41
- package/src/lib/routes/access-codes/simulate/simulate.ts +7 -0
- package/src/lib/routes/access-codes/unmanaged/unmanaged.ts +44 -10
- package/src/lib/routes/access-grants/access-grants.ts +43 -21
- package/src/lib/routes/access-grants/unmanaged/unmanaged.ts +24 -5
- package/src/lib/routes/access-methods/access-methods.ts +41 -11
- package/src/lib/routes/access-methods/unmanaged/unmanaged.ts +17 -4
- package/src/lib/routes/acs/access-groups/access-groups.ts +43 -12
- package/src/lib/routes/acs/credentials/credentials.ts +28 -7
- package/src/lib/routes/acs/encoders/encoders.ts +28 -5
- package/src/lib/routes/acs/encoders/simulate/simulate.ts +25 -0
- package/src/lib/routes/acs/entrances/entrances.ts +23 -4
- package/src/lib/routes/acs/systems/systems.ts +23 -6
- package/src/lib/routes/acs/users/users.ts +76 -33
- package/src/lib/routes/action-attempts/action-attempts.ts +8 -3
- package/src/lib/routes/client-sessions/client-sessions.ts +35 -9
- package/src/lib/routes/connect-webviews/connect-webviews.ts +15 -5
- package/src/lib/routes/connected-accounts/connected-accounts.ts +20 -6
- package/src/lib/routes/connected-accounts/simulate/simulate.ts +7 -0
- package/src/lib/routes/customers/customers.ts +16 -9
- package/src/lib/routes/devices/devices.ts +36 -11
- package/src/lib/routes/devices/simulate/simulate.ts +29 -0
- package/src/lib/routes/devices/unmanaged/unmanaged.ts +19 -22
- package/src/lib/routes/events/events.ts +17 -9
- package/src/lib/routes/instant-keys/instant-keys.ts +19 -9
- package/src/lib/routes/locks/locks.ts +22 -45
- package/src/lib/routes/locks/simulate/simulate.ts +13 -0
- package/src/lib/routes/noise-sensors/noise-sensors.ts +3 -40
- package/src/lib/routes/noise-sensors/noise-thresholds/noise-thresholds.ts +37 -6
- package/src/lib/routes/noise-sensors/simulate/simulate.ts +7 -0
- package/src/lib/routes/phones/phones.ts +13 -6
- package/src/lib/routes/phones/simulate/simulate.ts +7 -0
- package/src/lib/routes/seam-http-endpoints.ts +26 -26
- package/src/lib/routes/spaces/spaces.ts +61 -21
- package/src/lib/routes/thermostats/daily-programs/daily-programs.ts +21 -2
- package/src/lib/routes/thermostats/schedules/schedules.ts +35 -8
- package/src/lib/routes/thermostats/simulate/simulate.ts +13 -0
- package/src/lib/routes/thermostats/thermostats.ts +72 -55
- package/src/lib/routes/user-identities/unmanaged/unmanaged.ts +24 -5
- package/src/lib/routes/user-identities/user-identities.ts +94 -26
- package/src/lib/routes/webhooks/webhooks.ts +15 -4
- package/src/lib/routes/workspaces/workspaces.ts +20 -9
- package/src/lib/version.ts +1 -1
|
@@ -28,6 +28,10 @@ import {
|
|
|
28
28
|
limitToSeamHttpRequestOptions,
|
|
29
29
|
parseOptions,
|
|
30
30
|
} from 'lib/parse-options.js'
|
|
31
|
+
import {
|
|
32
|
+
assertValidRequestParameters,
|
|
33
|
+
type RequireAtLeastOne,
|
|
34
|
+
} from 'lib/request-parameters.js'
|
|
31
35
|
import type { ActionAttempt } from 'lib/resources/action-attempt.js'
|
|
32
36
|
import type { Device } from 'lib/resources/device.js'
|
|
33
37
|
import { SeamHttpActionAttempts } from 'lib/routes/action-attempts/index.js'
|
|
@@ -173,6 +177,8 @@ export class SeamHttpLocks {
|
|
|
173
177
|
parameters: LocksConfigureAutoLockParameters,
|
|
174
178
|
options: LocksConfigureAutoLockOptions = {},
|
|
175
179
|
): LocksConfigureAutoLockRequest {
|
|
180
|
+
assertValidRequestParameters(parameters, '/locks/configure_auto_lock', true)
|
|
181
|
+
|
|
176
182
|
return new SeamHttpRequest(this, {
|
|
177
183
|
pathname: '/locks/configure_auto_lock',
|
|
178
184
|
method: 'POST',
|
|
@@ -191,13 +197,15 @@ export class SeamHttpLocks {
|
|
|
191
197
|
* @deprecated Use `/devices/get` instead.
|
|
192
198
|
*/
|
|
193
199
|
get(
|
|
194
|
-
parameters
|
|
200
|
+
parameters: LocksGetParameters,
|
|
195
201
|
options: LocksGetOptions = {},
|
|
196
202
|
): LocksGetRequest {
|
|
203
|
+
assertValidRequestParameters(parameters, '/locks/get', true)
|
|
204
|
+
|
|
197
205
|
return new SeamHttpRequest(this, {
|
|
198
206
|
pathname: '/locks/get',
|
|
199
|
-
method: '
|
|
200
|
-
|
|
207
|
+
method: 'GET',
|
|
208
|
+
params: parameters,
|
|
201
209
|
responseKey: 'device',
|
|
202
210
|
options,
|
|
203
211
|
})
|
|
@@ -210,6 +218,8 @@ export class SeamHttpLocks {
|
|
|
210
218
|
parameters?: LocksListParameters,
|
|
211
219
|
options: LocksListOptions = {},
|
|
212
220
|
): LocksListRequest {
|
|
221
|
+
assertValidRequestParameters(parameters, '/locks/list', false)
|
|
222
|
+
|
|
213
223
|
return new SeamHttpRequest(this, {
|
|
214
224
|
pathname: '/locks/list',
|
|
215
225
|
method: 'POST',
|
|
@@ -226,6 +236,8 @@ export class SeamHttpLocks {
|
|
|
226
236
|
parameters: LocksLockDoorParameters,
|
|
227
237
|
options: LocksLockDoorOptions = {},
|
|
228
238
|
): LocksLockDoorRequest {
|
|
239
|
+
assertValidRequestParameters(parameters, '/locks/lock_door', true)
|
|
240
|
+
|
|
229
241
|
return new SeamHttpRequest(this, {
|
|
230
242
|
pathname: '/locks/lock_door',
|
|
231
243
|
method: 'POST',
|
|
@@ -246,6 +258,8 @@ export class SeamHttpLocks {
|
|
|
246
258
|
parameters: LocksUnlockDoorParameters,
|
|
247
259
|
options: LocksUnlockDoorOptions = {},
|
|
248
260
|
): LocksUnlockDoorRequest {
|
|
261
|
+
assertValidRequestParameters(parameters, '/locks/unlock_door', true)
|
|
262
|
+
|
|
249
263
|
return new SeamHttpRequest(this, {
|
|
250
264
|
pathname: '/locks/unlock_door',
|
|
251
265
|
method: 'POST',
|
|
@@ -291,7 +305,7 @@ export type LocksConfigureAutoLockOptions = Pick<
|
|
|
291
305
|
'waitForActionAttempt'
|
|
292
306
|
>
|
|
293
307
|
|
|
294
|
-
export type LocksGetParameters = {
|
|
308
|
+
export type LocksGetParameters = RequireAtLeastOne<{
|
|
295
309
|
/**
|
|
296
310
|
* ID of the lock that you want to get.
|
|
297
311
|
*/
|
|
@@ -300,7 +314,7 @@ export type LocksGetParameters = {
|
|
|
300
314
|
* Name of the lock that you want to get.
|
|
301
315
|
*/
|
|
302
316
|
name?: string | undefined
|
|
303
|
-
}
|
|
317
|
+
}>
|
|
304
318
|
|
|
305
319
|
/**
|
|
306
320
|
* @deprecated Use LocksGetRequest instead.
|
|
@@ -320,26 +334,10 @@ export type LocksListParameters = {
|
|
|
320
334
|
* ID of the connected account for which you want to list devices.
|
|
321
335
|
*/
|
|
322
336
|
connected_account_id?: string | undefined
|
|
323
|
-
/**
|
|
324
|
-
* Array of IDs of the connected accounts for which you want to list devices.
|
|
325
|
-
*/
|
|
326
|
-
connected_account_ids?: Array<string> | undefined
|
|
327
|
-
/**
|
|
328
|
-
* Timestamp by which to limit returned devices. Returns devices created before this timestamp.
|
|
329
|
-
*/
|
|
330
|
-
created_before?: string | undefined
|
|
331
|
-
/**
|
|
332
|
-
* Set of key:value [custom metadata](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device) pairs for which you want to list devices.
|
|
333
|
-
*/
|
|
334
|
-
custom_metadata_has?: Record<string, unknown> | undefined
|
|
335
337
|
/**
|
|
336
338
|
* Customer key for which you want to list devices.
|
|
337
339
|
*/
|
|
338
340
|
customer_key?: string | undefined
|
|
339
|
-
/**
|
|
340
|
-
* Array of device IDs for which you want to list devices.
|
|
341
|
-
*/
|
|
342
|
-
device_ids?: Array<string> | undefined
|
|
343
341
|
/**
|
|
344
342
|
* Device type of the locks that you want to list.
|
|
345
343
|
*/
|
|
@@ -370,6 +368,7 @@ export type LocksListParameters = {
|
|
|
370
368
|
| 'tedee_lock'
|
|
371
369
|
| 'akiles_lock'
|
|
372
370
|
| 'ultraloq_lock'
|
|
371
|
+
| 'yacan_lock'
|
|
373
372
|
| 'keyincode_lock'
|
|
374
373
|
| 'omnitec_lock'
|
|
375
374
|
| 'kisi_lock'
|
|
@@ -406,16 +405,13 @@ export type LocksListParameters = {
|
|
|
406
405
|
| 'tedee_lock'
|
|
407
406
|
| 'akiles_lock'
|
|
408
407
|
| 'ultraloq_lock'
|
|
408
|
+
| 'yacan_lock'
|
|
409
409
|
| 'keyincode_lock'
|
|
410
410
|
| 'omnitec_lock'
|
|
411
411
|
| 'kisi_lock'
|
|
412
412
|
| 'aqara_lock'
|
|
413
413
|
>
|
|
414
414
|
| undefined
|
|
415
|
-
/**
|
|
416
|
-
* Numerical limit on the number of devices to return.
|
|
417
|
-
*/
|
|
418
|
-
limit?: number | undefined
|
|
419
415
|
/**
|
|
420
416
|
* Manufacturer of the locks that you want to list.
|
|
421
417
|
*/
|
|
@@ -452,27 +448,8 @@ export type LocksListParameters = {
|
|
|
452
448
|
| 'ultraloq'
|
|
453
449
|
| 'omnitec'
|
|
454
450
|
| 'kisi'
|
|
451
|
+
| 'yacan'
|
|
455
452
|
| undefined
|
|
456
|
-
/**
|
|
457
|
-
* Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`.
|
|
458
|
-
*/
|
|
459
|
-
page_cursor?: string | undefined
|
|
460
|
-
/**
|
|
461
|
-
* String for which to search. Filters returned devices to include all records that satisfy a partial match using `device_id` (full or partial UUID prefix, minimum 4 characters), `connected_account_id`, `display_name`, `custom_metadata` or `location.location_name`.
|
|
462
|
-
*/
|
|
463
|
-
search?: string | undefined
|
|
464
|
-
/**
|
|
465
|
-
* ID of the space for which you want to list devices.
|
|
466
|
-
*/
|
|
467
|
-
space_id?: string | undefined
|
|
468
|
-
/**
|
|
469
|
-
* @deprecated Use `space_id`.
|
|
470
|
-
*/
|
|
471
|
-
unstable_location_id?: string | undefined
|
|
472
|
-
/**
|
|
473
|
-
* Your own internal user ID for the user for which you want to list devices.
|
|
474
|
-
*/
|
|
475
|
-
user_identifier_key?: string | undefined
|
|
476
453
|
}
|
|
477
454
|
|
|
478
455
|
/**
|
|
@@ -28,6 +28,7 @@ import {
|
|
|
28
28
|
limitToSeamHttpRequestOptions,
|
|
29
29
|
parseOptions,
|
|
30
30
|
} from 'lib/parse-options.js'
|
|
31
|
+
import { assertValidRequestParameters } from 'lib/request-parameters.js'
|
|
31
32
|
import type { ActionAttempt } from 'lib/resources/action-attempt.js'
|
|
32
33
|
import { SeamHttpActionAttempts } from 'lib/routes/action-attempts/index.js'
|
|
33
34
|
import { SeamHttpClientSessions } from 'lib/routes/client-sessions/index.js'
|
|
@@ -166,6 +167,12 @@ export class SeamHttpLocksSimulate {
|
|
|
166
167
|
parameters: LocksSimulateKeypadCodeEntryParameters,
|
|
167
168
|
options: LocksSimulateKeypadCodeEntryOptions = {},
|
|
168
169
|
): LocksSimulateKeypadCodeEntryRequest {
|
|
170
|
+
assertValidRequestParameters(
|
|
171
|
+
parameters,
|
|
172
|
+
'/locks/simulate/keypad_code_entry',
|
|
173
|
+
true,
|
|
174
|
+
)
|
|
175
|
+
|
|
169
176
|
return new SeamHttpRequest(this, {
|
|
170
177
|
pathname: '/locks/simulate/keypad_code_entry',
|
|
171
178
|
method: 'POST',
|
|
@@ -186,6 +193,12 @@ export class SeamHttpLocksSimulate {
|
|
|
186
193
|
parameters: LocksSimulateManualLockViaKeypadParameters,
|
|
187
194
|
options: LocksSimulateManualLockViaKeypadOptions = {},
|
|
188
195
|
): LocksSimulateManualLockViaKeypadRequest {
|
|
196
|
+
assertValidRequestParameters(
|
|
197
|
+
parameters,
|
|
198
|
+
'/locks/simulate/manual_lock_via_keypad',
|
|
199
|
+
true,
|
|
200
|
+
)
|
|
201
|
+
|
|
189
202
|
return new SeamHttpRequest(this, {
|
|
190
203
|
pathname: '/locks/simulate/manual_lock_via_keypad',
|
|
191
204
|
method: 'POST',
|
|
@@ -28,6 +28,7 @@ import {
|
|
|
28
28
|
limitToSeamHttpRequestOptions,
|
|
29
29
|
parseOptions,
|
|
30
30
|
} from 'lib/parse-options.js'
|
|
31
|
+
import { assertValidRequestParameters } from 'lib/request-parameters.js'
|
|
31
32
|
import type { Device } from 'lib/resources/device.js'
|
|
32
33
|
import { SeamHttpClientSessions } from 'lib/routes/client-sessions/index.js'
|
|
33
34
|
import { SeamHttpRequest } from 'lib/seam-http-request.js'
|
|
@@ -179,6 +180,8 @@ export class SeamHttpNoiseSensors {
|
|
|
179
180
|
parameters?: NoiseSensorsListParameters,
|
|
180
181
|
options: NoiseSensorsListOptions = {},
|
|
181
182
|
): NoiseSensorsListRequest {
|
|
183
|
+
assertValidRequestParameters(parameters, '/noise_sensors/list', false)
|
|
184
|
+
|
|
182
185
|
return new SeamHttpRequest(this, {
|
|
183
186
|
pathname: '/noise_sensors/list',
|
|
184
187
|
method: 'POST',
|
|
@@ -198,26 +201,10 @@ export type NoiseSensorsListParameters = {
|
|
|
198
201
|
* ID of the connected account for which you want to list devices.
|
|
199
202
|
*/
|
|
200
203
|
connected_account_id?: string | undefined
|
|
201
|
-
/**
|
|
202
|
-
* Array of IDs of the connected accounts for which you want to list devices.
|
|
203
|
-
*/
|
|
204
|
-
connected_account_ids?: Array<string> | undefined
|
|
205
|
-
/**
|
|
206
|
-
* Timestamp by which to limit returned devices. Returns devices created before this timestamp.
|
|
207
|
-
*/
|
|
208
|
-
created_before?: string | undefined
|
|
209
|
-
/**
|
|
210
|
-
* Set of key:value [custom metadata](https://docs.seam.co/core-concepts/devices/adding-custom-metadata-to-a-device) pairs for which you want to list devices.
|
|
211
|
-
*/
|
|
212
|
-
custom_metadata_has?: Record<string, unknown> | undefined
|
|
213
204
|
/**
|
|
214
205
|
* Customer key for which you want to list devices.
|
|
215
206
|
*/
|
|
216
207
|
customer_key?: string | undefined
|
|
217
|
-
/**
|
|
218
|
-
* Array of device IDs for which you want to list devices.
|
|
219
|
-
*/
|
|
220
|
-
device_ids?: Array<string> | undefined
|
|
221
208
|
/**
|
|
222
209
|
* Device type of the noise sensors that you want to list.
|
|
223
210
|
*/
|
|
@@ -226,34 +213,10 @@ export type NoiseSensorsListParameters = {
|
|
|
226
213
|
* Device types of the noise sensors that you want to list.
|
|
227
214
|
*/
|
|
228
215
|
device_types?: Array<'noiseaware_activity_zone' | 'minut_sensor'> | undefined
|
|
229
|
-
/**
|
|
230
|
-
* Numerical limit on the number of devices to return.
|
|
231
|
-
*/
|
|
232
|
-
limit?: number | undefined
|
|
233
216
|
/**
|
|
234
217
|
* Manufacturers of the noise sensors that you want to list.
|
|
235
218
|
*/
|
|
236
219
|
manufacturer?: 'minut' | 'noiseaware' | undefined
|
|
237
|
-
/**
|
|
238
|
-
* Identifies the specific page of results to return, obtained from the previous page's `next_page_cursor`.
|
|
239
|
-
*/
|
|
240
|
-
page_cursor?: string | undefined
|
|
241
|
-
/**
|
|
242
|
-
* String for which to search. Filters returned devices to include all records that satisfy a partial match using `device_id` (full or partial UUID prefix, minimum 4 characters), `connected_account_id`, `display_name`, `custom_metadata` or `location.location_name`.
|
|
243
|
-
*/
|
|
244
|
-
search?: string | undefined
|
|
245
|
-
/**
|
|
246
|
-
* ID of the space for which you want to list devices.
|
|
247
|
-
*/
|
|
248
|
-
space_id?: string | undefined
|
|
249
|
-
/**
|
|
250
|
-
* @deprecated Use `space_id`.
|
|
251
|
-
*/
|
|
252
|
-
unstable_location_id?: string | undefined
|
|
253
|
-
/**
|
|
254
|
-
* Your own internal user ID for the user for which you want to list devices.
|
|
255
|
-
*/
|
|
256
|
-
user_identifier_key?: string | undefined
|
|
257
220
|
}
|
|
258
221
|
|
|
259
222
|
/**
|
|
@@ -28,6 +28,7 @@ import {
|
|
|
28
28
|
limitToSeamHttpRequestOptions,
|
|
29
29
|
parseOptions,
|
|
30
30
|
} from 'lib/parse-options.js'
|
|
31
|
+
import { assertValidRequestParameters } from 'lib/request-parameters.js'
|
|
31
32
|
import type { NoiseThreshold } from 'lib/resources/noise-threshold.js'
|
|
32
33
|
import { SeamHttpClientSessions } from 'lib/routes/client-sessions/index.js'
|
|
33
34
|
import { SeamHttpRequest } from 'lib/seam-http-request.js'
|
|
@@ -168,6 +169,12 @@ export class SeamHttpNoiseSensorsNoiseThresholds {
|
|
|
168
169
|
parameters: NoiseSensorsNoiseThresholdsCreateParameters,
|
|
169
170
|
options: NoiseSensorsNoiseThresholdsCreateOptions = {},
|
|
170
171
|
): NoiseSensorsNoiseThresholdsCreateRequest {
|
|
172
|
+
assertValidRequestParameters(
|
|
173
|
+
parameters,
|
|
174
|
+
'/noise_sensors/noise_thresholds/create',
|
|
175
|
+
true,
|
|
176
|
+
)
|
|
177
|
+
|
|
171
178
|
return new SeamHttpRequest(this, {
|
|
172
179
|
pathname: '/noise_sensors/noise_thresholds/create',
|
|
173
180
|
method: 'POST',
|
|
@@ -184,10 +191,16 @@ export class SeamHttpNoiseSensorsNoiseThresholds {
|
|
|
184
191
|
parameters: NoiseSensorsNoiseThresholdsDeleteParameters,
|
|
185
192
|
options: NoiseSensorsNoiseThresholdsDeleteOptions = {},
|
|
186
193
|
): NoiseSensorsNoiseThresholdsDeleteRequest {
|
|
194
|
+
assertValidRequestParameters(
|
|
195
|
+
parameters,
|
|
196
|
+
'/noise_sensors/noise_thresholds/delete',
|
|
197
|
+
true,
|
|
198
|
+
)
|
|
199
|
+
|
|
187
200
|
return new SeamHttpRequest(this, {
|
|
188
201
|
pathname: '/noise_sensors/noise_thresholds/delete',
|
|
189
|
-
method: '
|
|
190
|
-
|
|
202
|
+
method: 'DELETE',
|
|
203
|
+
params: parameters,
|
|
191
204
|
responseKey: undefined,
|
|
192
205
|
options,
|
|
193
206
|
})
|
|
@@ -200,10 +213,16 @@ export class SeamHttpNoiseSensorsNoiseThresholds {
|
|
|
200
213
|
parameters: NoiseSensorsNoiseThresholdsGetParameters,
|
|
201
214
|
options: NoiseSensorsNoiseThresholdsGetOptions = {},
|
|
202
215
|
): NoiseSensorsNoiseThresholdsGetRequest {
|
|
216
|
+
assertValidRequestParameters(
|
|
217
|
+
parameters,
|
|
218
|
+
'/noise_sensors/noise_thresholds/get',
|
|
219
|
+
true,
|
|
220
|
+
)
|
|
221
|
+
|
|
203
222
|
return new SeamHttpRequest(this, {
|
|
204
223
|
pathname: '/noise_sensors/noise_thresholds/get',
|
|
205
|
-
method: '
|
|
206
|
-
|
|
224
|
+
method: 'GET',
|
|
225
|
+
params: parameters,
|
|
207
226
|
responseKey: 'noise_threshold',
|
|
208
227
|
options,
|
|
209
228
|
})
|
|
@@ -216,10 +235,16 @@ export class SeamHttpNoiseSensorsNoiseThresholds {
|
|
|
216
235
|
parameters: NoiseSensorsNoiseThresholdsListParameters,
|
|
217
236
|
options: NoiseSensorsNoiseThresholdsListOptions = {},
|
|
218
237
|
): NoiseSensorsNoiseThresholdsListRequest {
|
|
238
|
+
assertValidRequestParameters(
|
|
239
|
+
parameters,
|
|
240
|
+
'/noise_sensors/noise_thresholds/list',
|
|
241
|
+
true,
|
|
242
|
+
)
|
|
243
|
+
|
|
219
244
|
return new SeamHttpRequest(this, {
|
|
220
245
|
pathname: '/noise_sensors/noise_thresholds/list',
|
|
221
|
-
method: '
|
|
222
|
-
|
|
246
|
+
method: 'GET',
|
|
247
|
+
params: parameters,
|
|
223
248
|
responseKey: 'noise_thresholds',
|
|
224
249
|
options,
|
|
225
250
|
})
|
|
@@ -232,6 +257,12 @@ export class SeamHttpNoiseSensorsNoiseThresholds {
|
|
|
232
257
|
parameters: NoiseSensorsNoiseThresholdsUpdateParameters,
|
|
233
258
|
options: NoiseSensorsNoiseThresholdsUpdateOptions = {},
|
|
234
259
|
): NoiseSensorsNoiseThresholdsUpdateRequest {
|
|
260
|
+
assertValidRequestParameters(
|
|
261
|
+
parameters,
|
|
262
|
+
'/noise_sensors/noise_thresholds/update',
|
|
263
|
+
true,
|
|
264
|
+
)
|
|
265
|
+
|
|
235
266
|
return new SeamHttpRequest(this, {
|
|
236
267
|
pathname: '/noise_sensors/noise_thresholds/update',
|
|
237
268
|
method: 'PUT',
|
|
@@ -28,6 +28,7 @@ import {
|
|
|
28
28
|
limitToSeamHttpRequestOptions,
|
|
29
29
|
parseOptions,
|
|
30
30
|
} from 'lib/parse-options.js'
|
|
31
|
+
import { assertValidRequestParameters } from 'lib/request-parameters.js'
|
|
31
32
|
import { SeamHttpClientSessions } from 'lib/routes/client-sessions/index.js'
|
|
32
33
|
import { SeamHttpRequest } from 'lib/seam-http-request.js'
|
|
33
34
|
import { SeamPaginator } from 'lib/seam-paginator.js'
|
|
@@ -164,6 +165,12 @@ export class SeamHttpNoiseSensorsSimulate {
|
|
|
164
165
|
parameters: NoiseSensorsSimulateTriggerNoiseThresholdParameters,
|
|
165
166
|
options: NoiseSensorsSimulateTriggerNoiseThresholdOptions = {},
|
|
166
167
|
): NoiseSensorsSimulateTriggerNoiseThresholdRequest {
|
|
168
|
+
assertValidRequestParameters(
|
|
169
|
+
parameters,
|
|
170
|
+
'/noise_sensors/simulate/trigger_noise_threshold',
|
|
171
|
+
true,
|
|
172
|
+
)
|
|
173
|
+
|
|
167
174
|
return new SeamHttpRequest(this, {
|
|
168
175
|
pathname: '/noise_sensors/simulate/trigger_noise_threshold',
|
|
169
176
|
method: 'POST',
|
|
@@ -28,6 +28,7 @@ import {
|
|
|
28
28
|
limitToSeamHttpRequestOptions,
|
|
29
29
|
parseOptions,
|
|
30
30
|
} from 'lib/parse-options.js'
|
|
31
|
+
import { assertValidRequestParameters } from 'lib/request-parameters.js'
|
|
31
32
|
import type { Phone } from 'lib/resources/phone.js'
|
|
32
33
|
import { SeamHttpClientSessions } from 'lib/routes/client-sessions/index.js'
|
|
33
34
|
import { SeamHttpRequest } from 'lib/seam-http-request.js'
|
|
@@ -171,10 +172,12 @@ export class SeamHttpPhones {
|
|
|
171
172
|
parameters: PhonesDeactivateParameters,
|
|
172
173
|
options: PhonesDeactivateOptions = {},
|
|
173
174
|
): PhonesDeactivateRequest {
|
|
175
|
+
assertValidRequestParameters(parameters, '/phones/deactivate', true)
|
|
176
|
+
|
|
174
177
|
return new SeamHttpRequest(this, {
|
|
175
178
|
pathname: '/phones/deactivate',
|
|
176
|
-
method: '
|
|
177
|
-
|
|
179
|
+
method: 'DELETE',
|
|
180
|
+
params: parameters,
|
|
178
181
|
responseKey: undefined,
|
|
179
182
|
options,
|
|
180
183
|
})
|
|
@@ -187,10 +190,12 @@ export class SeamHttpPhones {
|
|
|
187
190
|
parameters: PhonesGetParameters,
|
|
188
191
|
options: PhonesGetOptions = {},
|
|
189
192
|
): PhonesGetRequest {
|
|
193
|
+
assertValidRequestParameters(parameters, '/phones/get', true)
|
|
194
|
+
|
|
190
195
|
return new SeamHttpRequest(this, {
|
|
191
196
|
pathname: '/phones/get',
|
|
192
|
-
method: '
|
|
193
|
-
|
|
197
|
+
method: 'GET',
|
|
198
|
+
params: parameters,
|
|
194
199
|
responseKey: 'phone',
|
|
195
200
|
options,
|
|
196
201
|
})
|
|
@@ -203,10 +208,12 @@ export class SeamHttpPhones {
|
|
|
203
208
|
parameters?: PhonesListParameters,
|
|
204
209
|
options: PhonesListOptions = {},
|
|
205
210
|
): PhonesListRequest {
|
|
211
|
+
assertValidRequestParameters(parameters, '/phones/list', false)
|
|
212
|
+
|
|
206
213
|
return new SeamHttpRequest(this, {
|
|
207
214
|
pathname: '/phones/list',
|
|
208
|
-
method: '
|
|
209
|
-
|
|
215
|
+
method: 'GET',
|
|
216
|
+
params: parameters,
|
|
210
217
|
responseKey: 'phones',
|
|
211
218
|
options,
|
|
212
219
|
})
|
|
@@ -28,6 +28,7 @@ import {
|
|
|
28
28
|
limitToSeamHttpRequestOptions,
|
|
29
29
|
parseOptions,
|
|
30
30
|
} from 'lib/parse-options.js'
|
|
31
|
+
import { assertValidRequestParameters } from 'lib/request-parameters.js'
|
|
31
32
|
import type { Phone } from 'lib/resources/phone.js'
|
|
32
33
|
import { SeamHttpClientSessions } from 'lib/routes/client-sessions/index.js'
|
|
33
34
|
import { SeamHttpRequest } from 'lib/seam-http-request.js'
|
|
@@ -165,6 +166,12 @@ export class SeamHttpPhonesSimulate {
|
|
|
165
166
|
parameters: PhonesSimulateCreateSandboxPhoneParameters,
|
|
166
167
|
options: PhonesSimulateCreateSandboxPhoneOptions = {},
|
|
167
168
|
): PhonesSimulateCreateSandboxPhoneRequest {
|
|
169
|
+
assertValidRequestParameters(
|
|
170
|
+
parameters,
|
|
171
|
+
'/phones/simulate/create_sandbox_phone',
|
|
172
|
+
true,
|
|
173
|
+
)
|
|
174
|
+
|
|
168
175
|
return new SeamHttpRequest(this, {
|
|
169
176
|
pathname: '/phones/simulate/create_sandbox_phone',
|
|
170
177
|
method: 'POST',
|