@seamapi/http 0.25.1 → 0.25.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/README.md CHANGED
@@ -74,13 +74,29 @@ $ npm install -D @seamapi/types@latest
74
74
 
75
75
  ## Usage
76
76
 
77
+ ### Examples
78
+
79
+ _These examples assume `SEAM_API_KEY` is set in your environment._
80
+
81
+ #### List devices
82
+
77
83
  ```ts
78
84
  import { SeamHttp } from '@seamapi/http/connect'
79
85
 
80
- const seam = new SeamHttp('your-api-key')
86
+ const seam = new SeamHttp()
81
87
  const devices = await seam.devices.list()
82
88
  ```
83
89
 
90
+ #### Unlock a door
91
+
92
+ ```ts
93
+ import { SeamHttp } from '@seamapi/http/connect'
94
+
95
+ const seam = new SeamHttp()
96
+ const lock = await seam.locks.get({ name: 'Front Door' })
97
+ await seam.locks.unlockDoor({ device_id: lock.device_id })
98
+ ```
99
+
84
100
  ### Authentication Methods
85
101
 
86
102
  The SDK supports several authentication mechanisms.
@@ -124,7 +140,7 @@ const seam = SeamHttp.fromClientSessionToken('some-client-session-token')
124
140
 
125
141
  The client session token may be updated using
126
142
 
127
- ```
143
+ ```ts
128
144
  const seam = SeamHttp.fromClientSessionToken('some-client-session-token')
129
145
 
130
146
  await seam.updateClientSessionToken('some-new-client-session-token')
package/lib/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- declare const seamapiJavascriptHttpVersion = "0.25.1";
1
+ declare const seamapiJavascriptHttpVersion = "0.25.2";
2
2
  export default seamapiJavascriptHttpVersion;
package/lib/version.js CHANGED
@@ -1,3 +1,3 @@
1
- const seamapiJavascriptHttpVersion = '0.25.1';
1
+ const seamapiJavascriptHttpVersion = '0.25.2';
2
2
  export default seamapiJavascriptHttpVersion;
3
3
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seamapi/http",
3
- "version": "0.25.1",
3
+ "version": "0.25.2",
4
4
  "description": "JavaScript HTTP client for the Seam API written in TypeScript.",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -1,3 +1,3 @@
1
- const seamapiJavascriptHttpVersion = '0.25.1'
1
+ const seamapiJavascriptHttpVersion = '0.25.2'
2
2
 
3
3
  export default seamapiJavascriptHttpVersion