@seamapi/http 1.43.0 → 1.45.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.
package/README.md CHANGED
@@ -83,7 +83,7 @@ $ npm install -D @seamapi/types@latest
83
83
  #### List devices
84
84
 
85
85
  ```ts
86
- import { SeamHttp } from '@seamapi/http/connect'
86
+ import { SeamHttp } from '@seamapi/http'
87
87
 
88
88
  const seam = new SeamHttp()
89
89
  const devices = await seam.devices.list()
@@ -92,7 +92,7 @@ const devices = await seam.devices.list()
92
92
  #### Unlock a door
93
93
 
94
94
  ```ts
95
- import { SeamHttp } from '@seamapi/http/connect'
95
+ import { SeamHttp } from '@seamapi/http'
96
96
 
97
97
  const seam = new SeamHttp()
98
98
  const lock = await seam.locks.get({ name: 'Front Door' })
@@ -277,7 +277,7 @@ import {
277
277
  SeamHttp,
278
278
  isSeamActionAttemptFailedError,
279
279
  isSeamActionAttemptTimeoutError,
280
- } from '@seamapi/http/connect'
280
+ } from '@seamapi/http'
281
281
 
282
282
  const seam = new SeamHttp('your-api-key', {
283
283
  waitForActionAttempt: {
@@ -495,7 +495,7 @@ Options are deep merged with the default options.
495
495
  The Axios client is exposed and may be used or configured directly:
496
496
 
497
497
  ```ts
498
- import { SeamHttp, DevicesListResponse } from '@seamapi/http/connect'
498
+ import { SeamHttp, DevicesListResponse } from '@seamapi/http'
499
499
 
500
500
  const seam = new SeamHttp()
501
501
 
@@ -518,7 +518,7 @@ The `SeamHttpEndpoints` class offers an alternative path-based interface to ever
518
518
  Each endpoint is exposed as simple property that returns the corresponding method from `SeamHttp`.
519
519
 
520
520
  ```ts
521
- import { SeamHttpEndpoints } from '@seamapi/http/connect'
521
+ import { SeamHttpEndpoints } from '@seamapi/http'
522
522
 
523
523
  const seam = new SeamHttpEndpoints()
524
524
  const devices = await seam['/devices/list']()
@@ -532,7 +532,7 @@ Do not use the undocumented API in production environments.
532
532
  Seam is not responsible for any issues you may encounter with the undocumented API.
533
533
 
534
534
  ```ts
535
- import { SeamHttp } from '@seamapi/http/connect'
535
+ import { SeamHttp } from '@seamapi/http'
536
536
 
537
537
  const seam = new SeamHttp({ isUndocumentedApiEnabled: true })
538
538
  ```
package/dist/connect.cjs CHANGED
@@ -3985,6 +3985,15 @@ var _SeamHttpDevicesSimulate = class _SeamHttpDevicesSimulate {
3985
3985
  options
3986
3986
  });
3987
3987
  }
3988
+ connectToHub(parameters, options = {}) {
3989
+ return new SeamHttpRequest(this, {
3990
+ pathname: "/devices/simulate/connect_to_hub",
3991
+ method: "POST",
3992
+ body: parameters,
3993
+ responseKey: void 0,
3994
+ options
3995
+ });
3996
+ }
3988
3997
  disconnect(parameters, options = {}) {
3989
3998
  return new SeamHttpRequest(this, {
3990
3999
  pathname: "/devices/simulate/disconnect",
@@ -3994,6 +4003,15 @@ var _SeamHttpDevicesSimulate = class _SeamHttpDevicesSimulate {
3994
4003
  options
3995
4004
  });
3996
4005
  }
4006
+ disconnectFromHub(parameters, options = {}) {
4007
+ return new SeamHttpRequest(this, {
4008
+ pathname: "/devices/simulate/disconnect_from_hub",
4009
+ method: "POST",
4010
+ body: parameters,
4011
+ responseKey: void 0,
4012
+ options
4013
+ });
4014
+ }
3997
4015
  remove(parameters, options = {}) {
3998
4016
  return new SeamHttpRequest(this, {
3999
4017
  pathname: "/devices/simulate/remove",
@@ -6137,6 +6155,15 @@ var _SeamHttpSpaces = class _SeamHttpSpaces {
6137
6155
  options
6138
6156
  });
6139
6157
  }
6158
+ getRelated(parameters, options = {}) {
6159
+ return new SeamHttpRequest(this, {
6160
+ pathname: "/spaces/get_related",
6161
+ method: "POST",
6162
+ body: parameters,
6163
+ responseKey: "batch",
6164
+ options
6165
+ });
6166
+ }
6140
6167
  list(parameters, options = {}) {
6141
6168
  return new SeamHttpRequest(this, {
6142
6169
  pathname: "/spaces/list",
@@ -9111,6 +9138,13 @@ var _SeamHttpEndpoints = class _SeamHttpEndpoints {
9111
9138
  return seam.connect(...args);
9112
9139
  };
9113
9140
  }
9141
+ get ["/devices/simulate/connect_to_hub"]() {
9142
+ const { client, defaults } = this;
9143
+ return function devicesSimulateConnectToHub(...args) {
9144
+ const seam = SeamHttpDevicesSimulate.fromClient(client, defaults);
9145
+ return seam.connectToHub(...args);
9146
+ };
9147
+ }
9114
9148
  get ["/devices/simulate/disconnect"]() {
9115
9149
  const { client, defaults } = this;
9116
9150
  return function devicesSimulateDisconnect(...args) {
@@ -9118,6 +9152,13 @@ var _SeamHttpEndpoints = class _SeamHttpEndpoints {
9118
9152
  return seam.disconnect(...args);
9119
9153
  };
9120
9154
  }
9155
+ get ["/devices/simulate/disconnect_from_hub"]() {
9156
+ const { client, defaults } = this;
9157
+ return function devicesSimulateDisconnectFromHub(...args) {
9158
+ const seam = SeamHttpDevicesSimulate.fromClient(client, defaults);
9159
+ return seam.disconnectFromHub(...args);
9160
+ };
9161
+ }
9121
9162
  get ["/devices/simulate/remove"]() {
9122
9163
  const { client, defaults } = this;
9123
9164
  return function devicesSimulateRemove(...args) {
@@ -9452,6 +9493,13 @@ var _SeamHttpEndpoints = class _SeamHttpEndpoints {
9452
9493
  return seam.get(...args);
9453
9494
  };
9454
9495
  }
9496
+ get ["/spaces/get_related"]() {
9497
+ const { client, defaults } = this;
9498
+ return function spacesGetRelated(...args) {
9499
+ const seam = SeamHttpSpaces.fromClient(client, defaults);
9500
+ return seam.getRelated(...args);
9501
+ };
9502
+ }
9455
9503
  get ["/spaces/list"]() {
9456
9504
  const { client, defaults } = this;
9457
9505
  return function spacesList(...args) {