@seamapi/http 1.6.0 → 1.7.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/dist/connect.cjs +107 -10
- package/dist/connect.cjs.map +1 -1
- package/dist/connect.d.cts +99 -6
- package/lib/seam/connect/resolve-action-attempt.d.ts +96 -0
- package/lib/seam/connect/routes/acs-credentials.d.ts +0 -4
- package/lib/seam/connect/routes/acs-credentials.js +0 -9
- package/lib/seam/connect/routes/acs-credentials.js.map +1 -1
- package/lib/seam/connect/routes/acs-encoders.d.ts +29 -0
- package/lib/seam/connect/routes/acs-encoders.js +106 -0
- package/lib/seam/connect/routes/acs-encoders.js.map +1 -0
- package/lib/seam/connect/routes/index.d.ts +1 -0
- package/lib/seam/connect/routes/index.js +1 -0
- package/lib/seam/connect/routes/index.js.map +1 -1
- package/lib/seam/connect/routes/thermostats.d.ts +1 -1
- package/lib/seam/connect/routes/thermostats.js +1 -1
- package/lib/seam/connect/routes/thermostats.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/seam/connect/routes/acs-credentials.ts +0 -25
- package/src/lib/seam/connect/routes/acs-encoders.ts +225 -0
- package/src/lib/seam/connect/routes/index.ts +1 -0
- package/src/lib/seam/connect/routes/thermostats.ts +2 -2
- package/src/lib/version.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"thermostats.js","sourceRoot":"","sources":["../../../../src/lib/seam/connect/routes/thermostats.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EACL,mCAAmC,EACnC,+BAA+B,GAChC,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAe,YAAY,EAAE,MAAM,4BAA4B,CAAA;AACtE,OAAO,EACL,2BAA2B,EAC3B,2BAA2B,EAC3B,uCAAuC,EACvC,wCAAwC,EACxC,wCAAwC,EAExC,2BAA2B,GAQ5B,MAAM,6BAA6B,CAAA;AACp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MAAM;YACd,IAAI;YACJ,WAAW,EAAE,gBAAgB;YAC7B,OAAO;SACR,CAAC,CAAA;IACJ,CAAC;IAED,wBAAwB,CACtB,IAA8C;QAE9C,OAAO,IAAI,eAAe,CAAC,IAAI,EAAE;YAC/B,IAAI,EAAE,0CAA0C;YAChD,MAAM,EAAE,MAAM;YACd,IAAI;YACJ,WAAW,EAAE,SAAS;SACvB,CAAC,CAAA;IACJ,CAAC;IAED,UAAU,CACR,IAAgC,EAChC,UAAgE,EAAE;QAElE,OAAO,IAAI,eAAe,CAAC,IAAI,EAAE;YAC/B,IAAI,EAAE,2BAA2B;YACjC,MAAM,EAAE,MAAM;YACd,IAAI;YACJ,WAAW,EAAE,gBAAgB;YAC7B,OAAO;SACR,CAAC,CAAA;IACJ,CAAC;IAED,mBAAmB,CACjB,IAAyC;QAEzC,OAAO,IAAI,eAAe,CAAC,IAAI,EAAE;YAC/B,IAAI,EAAE,oCAAoC;YAC1C,MAAM,EAAE,MAAM;YACd,IAAI;YACJ,WAAW,EAAE,SAAS;SACvB,CAAC,CAAA;IACJ,CAAC;CACF"}
|
package/lib/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const seamapiJavascriptHttpVersion = "1.
|
|
1
|
+
declare const seamapiJavascriptHttpVersion = "1.7.0";
|
|
2
2
|
export default seamapiJavascriptHttpVersion;
|
package/lib/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seamapi/http",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"description": "JavaScript HTTP client for the Seam API written in TypeScript.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"npm": ">= 9.0.0"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|
|
87
|
-
"@seamapi/types": "^1.
|
|
87
|
+
"@seamapi/types": "^1.258.1"
|
|
88
88
|
},
|
|
89
89
|
"peerDependenciesMeta": {
|
|
90
90
|
"@seamapi/types": {
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
},
|
|
100
100
|
"devDependencies": {
|
|
101
101
|
"@seamapi/fake-seam-connect": "1.71.0",
|
|
102
|
-
"@seamapi/types": "1.
|
|
102
|
+
"@seamapi/types": "1.258.1",
|
|
103
103
|
"@types/eslint": "^8.44.2",
|
|
104
104
|
"@types/node": "^20.8.10",
|
|
105
105
|
"ava": "^5.0.1",
|
|
@@ -227,19 +227,6 @@ export class SeamHttpAcsCredentials {
|
|
|
227
227
|
})
|
|
228
228
|
}
|
|
229
229
|
|
|
230
|
-
readCard(
|
|
231
|
-
body?: AcsCredentialsReadCardBody,
|
|
232
|
-
options: Pick<SeamHttpRequestOptions, 'waitForActionAttempt'> = {},
|
|
233
|
-
): SeamHttpRequest<AcsCredentialsReadCardResponse, 'action_attempt'> {
|
|
234
|
-
return new SeamHttpRequest(this, {
|
|
235
|
-
path: '/acs/credentials/read_card',
|
|
236
|
-
method: 'post',
|
|
237
|
-
body,
|
|
238
|
-
responseKey: 'action_attempt',
|
|
239
|
-
options,
|
|
240
|
-
})
|
|
241
|
-
}
|
|
242
|
-
|
|
243
230
|
unassign(
|
|
244
231
|
body?: AcsCredentialsUnassignBody,
|
|
245
232
|
): SeamHttpRequest<void, undefined> {
|
|
@@ -313,18 +300,6 @@ export type AcsCredentialsListAccessibleEntrancesResponse = SetNonNullable<
|
|
|
313
300
|
|
|
314
301
|
export type AcsCredentialsListAccessibleEntrancesOptions = never
|
|
315
302
|
|
|
316
|
-
export type AcsCredentialsReadCardBody =
|
|
317
|
-
RouteRequestBody<'/acs/credentials/read_card'>
|
|
318
|
-
|
|
319
|
-
export type AcsCredentialsReadCardResponse = SetNonNullable<
|
|
320
|
-
Required<RouteResponse<'/acs/credentials/read_card'>>
|
|
321
|
-
>
|
|
322
|
-
|
|
323
|
-
export type AcsCredentialsReadCardOptions = Pick<
|
|
324
|
-
SeamHttpRequestOptions,
|
|
325
|
-
'waitForActionAttempt'
|
|
326
|
-
>
|
|
327
|
-
|
|
328
303
|
export type AcsCredentialsUnassignBody =
|
|
329
304
|
RouteRequestBody<'/acs/credentials/unassign'>
|
|
330
305
|
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Automatically generated by generate-routes.ts.
|
|
3
|
+
* Do not edit this file or add other files to this directory.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { RouteRequestBody, RouteResponse } from '@seamapi/types/connect'
|
|
7
|
+
|
|
8
|
+
import {
|
|
9
|
+
getAuthHeadersForClientSessionToken,
|
|
10
|
+
warnOnInsecureuserIdentifierKey,
|
|
11
|
+
} from 'lib/seam/connect/auth.js'
|
|
12
|
+
import { type Client, createClient } from 'lib/seam/connect/client.js'
|
|
13
|
+
import {
|
|
14
|
+
isSeamHttpOptionsWithApiKey,
|
|
15
|
+
isSeamHttpOptionsWithClient,
|
|
16
|
+
isSeamHttpOptionsWithClientSessionToken,
|
|
17
|
+
isSeamHttpOptionsWithConsoleSessionToken,
|
|
18
|
+
isSeamHttpOptionsWithPersonalAccessToken,
|
|
19
|
+
type SeamHttpFromPublishableKeyOptions,
|
|
20
|
+
SeamHttpInvalidOptionsError,
|
|
21
|
+
type SeamHttpOptions,
|
|
22
|
+
type SeamHttpOptionsWithApiKey,
|
|
23
|
+
type SeamHttpOptionsWithClient,
|
|
24
|
+
type SeamHttpOptionsWithClientSessionToken,
|
|
25
|
+
type SeamHttpOptionsWithConsoleSessionToken,
|
|
26
|
+
type SeamHttpOptionsWithPersonalAccessToken,
|
|
27
|
+
type SeamHttpRequestOptions,
|
|
28
|
+
} from 'lib/seam/connect/options.js'
|
|
29
|
+
import {
|
|
30
|
+
limitToSeamHttpRequestOptions,
|
|
31
|
+
parseOptions,
|
|
32
|
+
} from 'lib/seam/connect/parse-options.js'
|
|
33
|
+
import { SeamHttpRequest } from 'lib/seam/connect/seam-http-request.js'
|
|
34
|
+
import type { SetNonNullable } from 'lib/types.js'
|
|
35
|
+
|
|
36
|
+
import { SeamHttpClientSessions } from './client-sessions.js'
|
|
37
|
+
|
|
38
|
+
export class SeamHttpAcsEncoders {
|
|
39
|
+
client: Client
|
|
40
|
+
readonly defaults: Required<SeamHttpRequestOptions>
|
|
41
|
+
|
|
42
|
+
constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) {
|
|
43
|
+
const options = parseOptions(apiKeyOrOptions)
|
|
44
|
+
this.client = 'client' in options ? options.client : createClient(options)
|
|
45
|
+
this.defaults = limitToSeamHttpRequestOptions(options)
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
static fromClient(
|
|
49
|
+
client: SeamHttpOptionsWithClient['client'],
|
|
50
|
+
options: Omit<SeamHttpOptionsWithClient, 'client'> = {},
|
|
51
|
+
): SeamHttpAcsEncoders {
|
|
52
|
+
const constructorOptions = { ...options, client }
|
|
53
|
+
if (!isSeamHttpOptionsWithClient(constructorOptions)) {
|
|
54
|
+
throw new SeamHttpInvalidOptionsError('Missing client')
|
|
55
|
+
}
|
|
56
|
+
return new SeamHttpAcsEncoders(constructorOptions)
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
static fromApiKey(
|
|
60
|
+
apiKey: SeamHttpOptionsWithApiKey['apiKey'],
|
|
61
|
+
options: Omit<SeamHttpOptionsWithApiKey, 'apiKey'> = {},
|
|
62
|
+
): SeamHttpAcsEncoders {
|
|
63
|
+
const constructorOptions = { ...options, apiKey }
|
|
64
|
+
if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
|
|
65
|
+
throw new SeamHttpInvalidOptionsError('Missing apiKey')
|
|
66
|
+
}
|
|
67
|
+
return new SeamHttpAcsEncoders(constructorOptions)
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
static fromClientSessionToken(
|
|
71
|
+
clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'],
|
|
72
|
+
options: Omit<
|
|
73
|
+
SeamHttpOptionsWithClientSessionToken,
|
|
74
|
+
'clientSessionToken'
|
|
75
|
+
> = {},
|
|
76
|
+
): SeamHttpAcsEncoders {
|
|
77
|
+
const constructorOptions = { ...options, clientSessionToken }
|
|
78
|
+
if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
|
|
79
|
+
throw new SeamHttpInvalidOptionsError('Missing clientSessionToken')
|
|
80
|
+
}
|
|
81
|
+
return new SeamHttpAcsEncoders(constructorOptions)
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
static async fromPublishableKey(
|
|
85
|
+
publishableKey: string,
|
|
86
|
+
userIdentifierKey: string,
|
|
87
|
+
options: SeamHttpFromPublishableKeyOptions = {},
|
|
88
|
+
): Promise<SeamHttpAcsEncoders> {
|
|
89
|
+
warnOnInsecureuserIdentifierKey(userIdentifierKey)
|
|
90
|
+
const clientOptions = parseOptions({ ...options, publishableKey })
|
|
91
|
+
if (isSeamHttpOptionsWithClient(clientOptions)) {
|
|
92
|
+
throw new SeamHttpInvalidOptionsError(
|
|
93
|
+
'The client option cannot be used with SeamHttp.fromPublishableKey',
|
|
94
|
+
)
|
|
95
|
+
}
|
|
96
|
+
const client = createClient(clientOptions)
|
|
97
|
+
const clientSessions = SeamHttpClientSessions.fromClient(client)
|
|
98
|
+
const { token } = await clientSessions.getOrCreate({
|
|
99
|
+
user_identifier_key: userIdentifierKey,
|
|
100
|
+
})
|
|
101
|
+
return SeamHttpAcsEncoders.fromClientSessionToken(token, options)
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
static fromConsoleSessionToken(
|
|
105
|
+
consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'],
|
|
106
|
+
workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'],
|
|
107
|
+
options: Omit<
|
|
108
|
+
SeamHttpOptionsWithConsoleSessionToken,
|
|
109
|
+
'consoleSessionToken' | 'workspaceId'
|
|
110
|
+
> = {},
|
|
111
|
+
): SeamHttpAcsEncoders {
|
|
112
|
+
const constructorOptions = { ...options, consoleSessionToken, workspaceId }
|
|
113
|
+
if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
|
|
114
|
+
throw new SeamHttpInvalidOptionsError(
|
|
115
|
+
'Missing consoleSessionToken or workspaceId',
|
|
116
|
+
)
|
|
117
|
+
}
|
|
118
|
+
return new SeamHttpAcsEncoders(constructorOptions)
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
static fromPersonalAccessToken(
|
|
122
|
+
personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'],
|
|
123
|
+
workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'],
|
|
124
|
+
options: Omit<
|
|
125
|
+
SeamHttpOptionsWithPersonalAccessToken,
|
|
126
|
+
'personalAccessToken' | 'workspaceId'
|
|
127
|
+
> = {},
|
|
128
|
+
): SeamHttpAcsEncoders {
|
|
129
|
+
const constructorOptions = { ...options, personalAccessToken, workspaceId }
|
|
130
|
+
if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
|
|
131
|
+
throw new SeamHttpInvalidOptionsError(
|
|
132
|
+
'Missing personalAccessToken or workspaceId',
|
|
133
|
+
)
|
|
134
|
+
}
|
|
135
|
+
return new SeamHttpAcsEncoders(constructorOptions)
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
async updateClientSessionToken(
|
|
139
|
+
clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'],
|
|
140
|
+
): Promise<void> {
|
|
141
|
+
const { headers } = this.client.defaults
|
|
142
|
+
const authHeaders = getAuthHeadersForClientSessionToken({
|
|
143
|
+
clientSessionToken,
|
|
144
|
+
})
|
|
145
|
+
for (const key of Object.keys(authHeaders)) {
|
|
146
|
+
if (headers[key] == null) {
|
|
147
|
+
throw new Error(
|
|
148
|
+
'Cannot update a clientSessionToken on a client created without a clientSessionToken',
|
|
149
|
+
)
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
this.client.defaults.headers = { ...headers, ...authHeaders }
|
|
153
|
+
const clientSessions = SeamHttpClientSessions.fromClient(this.client)
|
|
154
|
+
await clientSessions.get()
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
encodeCard(
|
|
158
|
+
body?: AcsEncodersEncodeCardBody,
|
|
159
|
+
options: Pick<SeamHttpRequestOptions, 'waitForActionAttempt'> = {},
|
|
160
|
+
): SeamHttpRequest<AcsEncodersEncodeCardResponse, 'action_attempt'> {
|
|
161
|
+
return new SeamHttpRequest(this, {
|
|
162
|
+
path: '/acs/encoders/encode_card',
|
|
163
|
+
method: 'post',
|
|
164
|
+
body,
|
|
165
|
+
responseKey: 'action_attempt',
|
|
166
|
+
options,
|
|
167
|
+
})
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
list(
|
|
171
|
+
body?: AcsEncodersListParams,
|
|
172
|
+
): SeamHttpRequest<AcsEncodersListResponse, 'devices'> {
|
|
173
|
+
return new SeamHttpRequest(this, {
|
|
174
|
+
path: '/acs/encoders/list',
|
|
175
|
+
method: 'post',
|
|
176
|
+
body,
|
|
177
|
+
responseKey: 'devices',
|
|
178
|
+
})
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
readCard(
|
|
182
|
+
body?: AcsEncodersReadCardBody,
|
|
183
|
+
options: Pick<SeamHttpRequestOptions, 'waitForActionAttempt'> = {},
|
|
184
|
+
): SeamHttpRequest<AcsEncodersReadCardResponse, 'action_attempt'> {
|
|
185
|
+
return new SeamHttpRequest(this, {
|
|
186
|
+
path: '/acs/encoders/read_card',
|
|
187
|
+
method: 'post',
|
|
188
|
+
body,
|
|
189
|
+
responseKey: 'action_attempt',
|
|
190
|
+
options,
|
|
191
|
+
})
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
export type AcsEncodersEncodeCardBody =
|
|
196
|
+
RouteRequestBody<'/acs/encoders/encode_card'>
|
|
197
|
+
|
|
198
|
+
export type AcsEncodersEncodeCardResponse = SetNonNullable<
|
|
199
|
+
Required<RouteResponse<'/acs/encoders/encode_card'>>
|
|
200
|
+
>
|
|
201
|
+
|
|
202
|
+
export type AcsEncodersEncodeCardOptions = Pick<
|
|
203
|
+
SeamHttpRequestOptions,
|
|
204
|
+
'waitForActionAttempt'
|
|
205
|
+
>
|
|
206
|
+
|
|
207
|
+
export type AcsEncodersListParams = RouteRequestBody<'/acs/encoders/list'>
|
|
208
|
+
|
|
209
|
+
export type AcsEncodersListResponse = SetNonNullable<
|
|
210
|
+
Required<RouteResponse<'/acs/encoders/list'>>
|
|
211
|
+
>
|
|
212
|
+
|
|
213
|
+
export type AcsEncodersListOptions = never
|
|
214
|
+
|
|
215
|
+
export type AcsEncodersReadCardBody =
|
|
216
|
+
RouteRequestBody<'/acs/encoders/read_card'>
|
|
217
|
+
|
|
218
|
+
export type AcsEncodersReadCardResponse = SetNonNullable<
|
|
219
|
+
Required<RouteResponse<'/acs/encoders/read_card'>>
|
|
220
|
+
>
|
|
221
|
+
|
|
222
|
+
export type AcsEncodersReadCardOptions = Pick<
|
|
223
|
+
SeamHttpRequestOptions,
|
|
224
|
+
'waitForActionAttempt'
|
|
225
|
+
>
|
|
@@ -8,6 +8,7 @@ export * from './acs-credential-pools.js'
|
|
|
8
8
|
export * from './acs-credential-provisioning-automations.js'
|
|
9
9
|
export * from './acs-credentials.js'
|
|
10
10
|
export * from './acs-credentials-unmanaged.js'
|
|
11
|
+
export * from './acs-encoders.js'
|
|
11
12
|
export * from './acs-entrances.js'
|
|
12
13
|
export * from './acs-systems.js'
|
|
13
14
|
export * from './acs-users.js'
|
|
@@ -190,12 +190,12 @@ export class SeamHttpThermostats {
|
|
|
190
190
|
|
|
191
191
|
createClimatePreset(
|
|
192
192
|
body?: ThermostatsCreateClimatePresetBody,
|
|
193
|
-
): SeamHttpRequest<
|
|
193
|
+
): SeamHttpRequest<void, undefined> {
|
|
194
194
|
return new SeamHttpRequest(this, {
|
|
195
195
|
path: '/thermostats/create_climate_preset',
|
|
196
196
|
method: 'post',
|
|
197
197
|
body,
|
|
198
|
-
responseKey:
|
|
198
|
+
responseKey: undefined,
|
|
199
199
|
})
|
|
200
200
|
}
|
|
201
201
|
|
package/src/lib/version.ts
CHANGED