@seamapi/http 1.42.0 → 1.44.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.
@@ -176,6 +176,19 @@ export class SeamHttpDevicesSimulate {
176
176
  })
177
177
  }
178
178
 
179
+ connectToHub(
180
+ parameters?: DevicesSimulateConnectToHubParameters,
181
+ options: DevicesSimulateConnectToHubOptions = {},
182
+ ): DevicesSimulateConnectToHubRequest {
183
+ return new SeamHttpRequest(this, {
184
+ pathname: '/devices/simulate/connect_to_hub',
185
+ method: 'POST',
186
+ body: parameters,
187
+ responseKey: undefined,
188
+ options,
189
+ })
190
+ }
191
+
179
192
  disconnect(
180
193
  parameters?: DevicesSimulateDisconnectParameters,
181
194
  options: DevicesSimulateDisconnectOptions = {},
@@ -189,6 +202,19 @@ export class SeamHttpDevicesSimulate {
189
202
  })
190
203
  }
191
204
 
205
+ disconnectFromHub(
206
+ parameters?: DevicesSimulateDisconnectFromHubParameters,
207
+ options: DevicesSimulateDisconnectFromHubOptions = {},
208
+ ): DevicesSimulateDisconnectFromHubRequest {
209
+ return new SeamHttpRequest(this, {
210
+ pathname: '/devices/simulate/disconnect_from_hub',
211
+ method: 'POST',
212
+ body: parameters,
213
+ responseKey: undefined,
214
+ options,
215
+ })
216
+ }
217
+
192
218
  remove(
193
219
  parameters?: DevicesSimulateRemoveParameters,
194
220
  options: DevicesSimulateRemoveOptions = {},
@@ -223,6 +249,30 @@ export type DevicesSimulateConnectRequest = SeamHttpRequest<void, undefined>
223
249
  // eslint-disable-next-line @typescript-eslint/no-empty-interface
224
250
  export interface DevicesSimulateConnectOptions {}
225
251
 
252
+ export type DevicesSimulateConnectToHubParameters =
253
+ RouteRequestBody<'/devices/simulate/connect_to_hub'>
254
+
255
+ /**
256
+ * @deprecated Use DevicesSimulateConnectToHubParameters instead.
257
+ */
258
+ export type DevicesSimulateConnectToHubBody =
259
+ DevicesSimulateConnectToHubParameters
260
+
261
+ /**
262
+ * @deprecated Use DevicesSimulateConnectToHubRequest instead.
263
+ */
264
+ export type DevicesSimulateConnectToHubResponse = SetNonNullable<
265
+ Required<RouteResponse<'/devices/simulate/connect_to_hub'>>
266
+ >
267
+
268
+ export type DevicesSimulateConnectToHubRequest = SeamHttpRequest<
269
+ void,
270
+ undefined
271
+ >
272
+
273
+ // eslint-disable-next-line @typescript-eslint/no-empty-interface
274
+ export interface DevicesSimulateConnectToHubOptions {}
275
+
226
276
  export type DevicesSimulateDisconnectParameters =
227
277
  RouteRequestBody<'/devices/simulate/disconnect'>
228
278
 
@@ -243,6 +293,30 @@ export type DevicesSimulateDisconnectRequest = SeamHttpRequest<void, undefined>
243
293
  // eslint-disable-next-line @typescript-eslint/no-empty-interface
244
294
  export interface DevicesSimulateDisconnectOptions {}
245
295
 
296
+ export type DevicesSimulateDisconnectFromHubParameters =
297
+ RouteRequestBody<'/devices/simulate/disconnect_from_hub'>
298
+
299
+ /**
300
+ * @deprecated Use DevicesSimulateDisconnectFromHubParameters instead.
301
+ */
302
+ export type DevicesSimulateDisconnectFromHubBody =
303
+ DevicesSimulateDisconnectFromHubParameters
304
+
305
+ /**
306
+ * @deprecated Use DevicesSimulateDisconnectFromHubRequest instead.
307
+ */
308
+ export type DevicesSimulateDisconnectFromHubResponse = SetNonNullable<
309
+ Required<RouteResponse<'/devices/simulate/disconnect_from_hub'>>
310
+ >
311
+
312
+ export type DevicesSimulateDisconnectFromHubRequest = SeamHttpRequest<
313
+ void,
314
+ undefined
315
+ >
316
+
317
+ // eslint-disable-next-line @typescript-eslint/no-empty-interface
318
+ export interface DevicesSimulateDisconnectFromHubOptions {}
319
+
246
320
  export type DevicesSimulateRemoveParameters =
247
321
  RouteRequestBody<'/devices/simulate/remove'>
248
322
 
@@ -44,11 +44,6 @@ export class SeamHttpLocksSimulate {
44
44
 
45
45
  constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) {
46
46
  const options = parseOptions(apiKeyOrOptions)
47
- if (!options.isUndocumentedApiEnabled) {
48
- throw new Error(
49
- 'Cannot use undocumented API without isUndocumentedApiEnabled',
50
- )
51
- }
52
47
  this.client = 'client' in options ? options.client : createClient(options)
53
48
  this.defaults = limitToSeamHttpRequestOptions(options)
54
49
  }
@@ -172,11 +167,6 @@ export class SeamHttpLocksSimulate {
172
167
  parameters?: LocksSimulateKeypadCodeEntryParameters,
173
168
  options: LocksSimulateKeypadCodeEntryOptions = {},
174
169
  ): LocksSimulateKeypadCodeEntryRequest {
175
- if (!this.defaults.isUndocumentedApiEnabled) {
176
- throw new Error(
177
- 'Cannot use undocumented API without isUndocumentedApiEnabled',
178
- )
179
- }
180
170
  return new SeamHttpRequest(this, {
181
171
  pathname: '/locks/simulate/keypad_code_entry',
182
172
  method: 'POST',
@@ -190,11 +180,6 @@ export class SeamHttpLocksSimulate {
190
180
  parameters?: LocksSimulateManualLockViaKeypadParameters,
191
181
  options: LocksSimulateManualLockViaKeypadOptions = {},
192
182
  ): LocksSimulateManualLockViaKeypadRequest {
193
- if (!this.defaults.isUndocumentedApiEnabled) {
194
- throw new Error(
195
- 'Cannot use undocumented API without isUndocumentedApiEnabled',
196
- )
197
- }
198
183
  return new SeamHttpRequest(this, {
199
184
  pathname: '/locks/simulate/manual_lock_via_keypad',
200
185
  method: 'POST',
@@ -411,6 +411,12 @@ import {
411
411
  type DevicesSimulateConnectOptions,
412
412
  type DevicesSimulateConnectParameters,
413
413
  type DevicesSimulateConnectRequest,
414
+ type DevicesSimulateConnectToHubOptions,
415
+ type DevicesSimulateConnectToHubParameters,
416
+ type DevicesSimulateConnectToHubRequest,
417
+ type DevicesSimulateDisconnectFromHubOptions,
418
+ type DevicesSimulateDisconnectFromHubParameters,
419
+ type DevicesSimulateDisconnectFromHubRequest,
414
420
  type DevicesSimulateDisconnectOptions,
415
421
  type DevicesSimulateDisconnectParameters,
416
422
  type DevicesSimulateDisconnectRequest,
@@ -573,6 +579,9 @@ import {
573
579
  type SpacesDeleteRequest,
574
580
  type SpacesGetOptions,
575
581
  type SpacesGetParameters,
582
+ type SpacesGetRelatedOptions,
583
+ type SpacesGetRelatedParameters,
584
+ type SpacesGetRelatedRequest,
576
585
  type SpacesGetRequest,
577
586
  type SpacesListOptions,
578
587
  type SpacesListParameters,
@@ -2376,6 +2385,19 @@ export class SeamHttpEndpoints {
2376
2385
  }
2377
2386
  }
2378
2387
 
2388
+ get ['/devices/simulate/connect_to_hub'](): (
2389
+ parameters?: DevicesSimulateConnectToHubParameters,
2390
+ options?: DevicesSimulateConnectToHubOptions,
2391
+ ) => DevicesSimulateConnectToHubRequest {
2392
+ const { client, defaults } = this
2393
+ return function devicesSimulateConnectToHub(
2394
+ ...args: Parameters<SeamHttpDevicesSimulate['connectToHub']>
2395
+ ): ReturnType<SeamHttpDevicesSimulate['connectToHub']> {
2396
+ const seam = SeamHttpDevicesSimulate.fromClient(client, defaults)
2397
+ return seam.connectToHub(...args)
2398
+ }
2399
+ }
2400
+
2379
2401
  get ['/devices/simulate/disconnect'](): (
2380
2402
  parameters?: DevicesSimulateDisconnectParameters,
2381
2403
  options?: DevicesSimulateDisconnectOptions,
@@ -2389,6 +2411,19 @@ export class SeamHttpEndpoints {
2389
2411
  }
2390
2412
  }
2391
2413
 
2414
+ get ['/devices/simulate/disconnect_from_hub'](): (
2415
+ parameters?: DevicesSimulateDisconnectFromHubParameters,
2416
+ options?: DevicesSimulateDisconnectFromHubOptions,
2417
+ ) => DevicesSimulateDisconnectFromHubRequest {
2418
+ const { client, defaults } = this
2419
+ return function devicesSimulateDisconnectFromHub(
2420
+ ...args: Parameters<SeamHttpDevicesSimulate['disconnectFromHub']>
2421
+ ): ReturnType<SeamHttpDevicesSimulate['disconnectFromHub']> {
2422
+ const seam = SeamHttpDevicesSimulate.fromClient(client, defaults)
2423
+ return seam.disconnectFromHub(...args)
2424
+ }
2425
+ }
2426
+
2392
2427
  get ['/devices/simulate/remove'](): (
2393
2428
  parameters?: DevicesSimulateRemoveParameters,
2394
2429
  options?: DevicesSimulateRemoveOptions,
@@ -2524,11 +2559,6 @@ export class SeamHttpEndpoints {
2524
2559
  options?: LocksSimulateKeypadCodeEntryOptions,
2525
2560
  ) => LocksSimulateKeypadCodeEntryRequest {
2526
2561
  const { client, defaults } = this
2527
- if (!this.defaults.isUndocumentedApiEnabled) {
2528
- throw new Error(
2529
- 'Cannot use undocumented API without isUndocumentedApiEnabled',
2530
- )
2531
- }
2532
2562
  return function locksSimulateKeypadCodeEntry(
2533
2563
  ...args: Parameters<SeamHttpLocksSimulate['keypadCodeEntry']>
2534
2564
  ): ReturnType<SeamHttpLocksSimulate['keypadCodeEntry']> {
@@ -2542,11 +2572,6 @@ export class SeamHttpEndpoints {
2542
2572
  options?: LocksSimulateManualLockViaKeypadOptions,
2543
2573
  ) => LocksSimulateManualLockViaKeypadRequest {
2544
2574
  const { client, defaults } = this
2545
- if (!this.defaults.isUndocumentedApiEnabled) {
2546
- throw new Error(
2547
- 'Cannot use undocumented API without isUndocumentedApiEnabled',
2548
- )
2549
- }
2550
2575
  return function locksSimulateManualLockViaKeypad(
2551
2576
  ...args: Parameters<SeamHttpLocksSimulate['manualLockViaKeypad']>
2552
2577
  ): ReturnType<SeamHttpLocksSimulate['manualLockViaKeypad']> {
@@ -2955,6 +2980,19 @@ export class SeamHttpEndpoints {
2955
2980
  }
2956
2981
  }
2957
2982
 
2983
+ get ['/spaces/get_related'](): (
2984
+ parameters?: SpacesGetRelatedParameters,
2985
+ options?: SpacesGetRelatedOptions,
2986
+ ) => SpacesGetRelatedRequest {
2987
+ const { client, defaults } = this
2988
+ return function spacesGetRelated(
2989
+ ...args: Parameters<SeamHttpSpaces['getRelated']>
2990
+ ): ReturnType<SeamHttpSpaces['getRelated']> {
2991
+ const seam = SeamHttpSpaces.fromClient(client, defaults)
2992
+ return seam.getRelated(...args)
2993
+ }
2994
+ }
2995
+
2958
2996
  get ['/spaces/list'](): (
2959
2997
  parameters?: SpacesListParameters,
2960
2998
  options?: SpacesListOptions,
@@ -4147,6 +4185,7 @@ export type SeamHttpEndpointQueryPaths =
4147
4185
  | '/seam/customer/v1/portals/get'
4148
4186
  | '/seam/partner/v1/building_blocks/spaces/auto_map'
4149
4187
  | '/spaces/get'
4188
+ | '/spaces/get_related'
4150
4189
  | '/spaces/list'
4151
4190
  | '/thermostats/get'
4152
4191
  | '/thermostats/list'
@@ -4235,7 +4274,9 @@ export type SeamHttpEndpointMutationPaths =
4235
4274
  | '/devices/delete'
4236
4275
  | '/devices/update'
4237
4276
  | '/devices/simulate/connect'
4277
+ | '/devices/simulate/connect_to_hub'
4238
4278
  | '/devices/simulate/disconnect'
4279
+ | '/devices/simulate/disconnect_from_hub'
4239
4280
  | '/devices/simulate/remove'
4240
4281
  | '/devices/unmanaged/update'
4241
4282
  | '/locks/lock_door'
@@ -232,6 +232,19 @@ export class SeamHttpSpaces {
232
232
  })
233
233
  }
234
234
 
235
+ getRelated(
236
+ parameters?: SpacesGetRelatedParameters,
237
+ options: SpacesGetRelatedOptions = {},
238
+ ): SpacesGetRelatedRequest {
239
+ return new SeamHttpRequest(this, {
240
+ pathname: '/spaces/get_related',
241
+ method: 'POST',
242
+ body: parameters,
243
+ responseKey: 'batch',
244
+ options,
245
+ })
246
+ }
247
+
235
248
  list(
236
249
  parameters?: SpacesListParameters,
237
250
  options: SpacesListOptions = {},
@@ -381,6 +394,28 @@ export type SpacesGetRequest = SeamHttpRequest<SpacesGetResponse, 'space'>
381
394
  // eslint-disable-next-line @typescript-eslint/no-empty-interface
382
395
  export interface SpacesGetOptions {}
383
396
 
397
+ export type SpacesGetRelatedParameters = RouteRequestBody<'/spaces/get_related'>
398
+
399
+ /**
400
+ * @deprecated Use SpacesGetRelatedParameters instead.
401
+ */
402
+ export type SpacesGetRelatedParams = SpacesGetRelatedParameters
403
+
404
+ /**
405
+ * @deprecated Use SpacesGetRelatedRequest instead.
406
+ */
407
+ export type SpacesGetRelatedResponse = SetNonNullable<
408
+ Required<RouteResponse<'/spaces/get_related'>>
409
+ >
410
+
411
+ export type SpacesGetRelatedRequest = SeamHttpRequest<
412
+ SpacesGetRelatedResponse,
413
+ 'batch'
414
+ >
415
+
416
+ // eslint-disable-next-line @typescript-eslint/no-empty-interface
417
+ export interface SpacesGetRelatedOptions {}
418
+
384
419
  export type SpacesListParameters = RouteRequestParams<'/spaces/list'>
385
420
 
386
421
  /**
@@ -1,3 +1,3 @@
1
- const seamapiJavascriptHttpVersion = '1.42.0'
1
+ const seamapiJavascriptHttpVersion = '1.44.0'
2
2
 
3
3
  export default seamapiJavascriptHttpVersion