@seamapi/http 1.31.0 → 1.33.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 +247 -207
- package/dist/connect.cjs.map +1 -1
- package/dist/connect.d.cts +428 -85
- package/lib/seam/connect/client.js +1 -2
- package/lib/seam/connect/client.js.map +1 -1
- package/lib/seam/connect/parse-options.js +4 -5
- package/lib/seam/connect/parse-options.js.map +1 -1
- package/lib/seam/connect/resolve-action-attempt.d.ts +488 -52
- package/lib/seam/connect/routes/access-codes.d.ts +4 -0
- package/lib/seam/connect/routes/access-codes.js +8 -0
- package/lib/seam/connect/routes/access-codes.js.map +1 -1
- package/lib/seam/connect/routes/acs-encoders.d.ts +4 -0
- package/lib/seam/connect/routes/acs-encoders.js +9 -0
- package/lib/seam/connect/routes/acs-encoders.js.map +1 -1
- package/lib/seam/connect/routes/connected-accounts.d.ts +4 -0
- package/lib/seam/connect/routes/connected-accounts.js +8 -0
- package/lib/seam/connect/routes/connected-accounts.js.map +1 -1
- package/lib/seam/connect/routes/index.d.ts +2 -2
- package/lib/seam/connect/routes/index.js +2 -2
- package/lib/seam/connect/routes/index.js.map +1 -1
- package/lib/seam/connect/routes/{networks.d.ts → thermostats-daily-programs.d.ts} +19 -15
- package/lib/seam/connect/routes/{networks.js → thermostats-daily-programs.js} +23 -14
- package/lib/seam/connect/routes/thermostats-daily-programs.js.map +1 -0
- package/lib/seam/connect/routes/thermostats.d.ts +6 -0
- package/lib/seam/connect/routes/thermostats.js +13 -0
- package/lib/seam/connect/routes/thermostats.js.map +1 -1
- package/lib/seam/connect/routes/{bridges.d.ts → unstable-partner.d.ts} +8 -18
- package/lib/seam/connect/routes/{bridges.js → unstable-partner.js} +8 -25
- package/lib/seam/connect/routes/unstable-partner.js.map +1 -0
- package/lib/seam/connect/routes/workspaces.d.ts +4 -0
- package/lib/seam/connect/routes/workspaces.js +8 -0
- package/lib/seam/connect/routes/workspaces.js.map +1 -1
- package/lib/seam/connect/seam-http.d.ts +1 -2
- package/lib/seam/connect/seam-http.js +1 -4
- package/lib/seam/connect/seam-http.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +7 -8
- package/src/lib/seam/connect/client.ts +1 -3
- package/src/lib/seam/connect/env.d.ts +2 -0
- package/src/lib/seam/connect/parse-options.ts +4 -5
- package/src/lib/seam/connect/routes/access-codes.ts +20 -0
- package/src/lib/seam/connect/routes/acs-encoders.ts +25 -0
- package/src/lib/seam/connect/routes/connected-accounts.ts +18 -0
- package/src/lib/seam/connect/routes/index.ts +2 -2
- package/src/lib/seam/connect/routes/{networks.ts → thermostats-daily-programs.ts} +64 -31
- package/src/lib/seam/connect/routes/thermostats.ts +33 -0
- package/src/lib/seam/connect/routes/{bridges.ts → unstable-partner.ts} +14 -53
- package/src/lib/seam/connect/routes/workspaces.ts +17 -0
- package/src/lib/seam/connect/seam-http.ts +0 -5
- package/src/lib/version.ts +1 -1
- package/lib/seam/connect/routes/bridges.js.map +0 -1
- package/lib/seam/connect/routes/networks.js.map +0 -1
|
@@ -36,7 +36,7 @@ import type { SetNonNullable } from 'lib/types.js'
|
|
|
36
36
|
|
|
37
37
|
import { SeamHttpClientSessions } from './client-sessions.js'
|
|
38
38
|
|
|
39
|
-
export class
|
|
39
|
+
export class SeamHttpThermostatsDailyPrograms {
|
|
40
40
|
client: Client
|
|
41
41
|
readonly defaults: Required<SeamHttpRequestOptions>
|
|
42
42
|
|
|
@@ -49,23 +49,23 @@ export class SeamHttpNetworks {
|
|
|
49
49
|
static fromClient(
|
|
50
50
|
client: SeamHttpOptionsWithClient['client'],
|
|
51
51
|
options: Omit<SeamHttpOptionsWithClient, 'client'> = {},
|
|
52
|
-
):
|
|
52
|
+
): SeamHttpThermostatsDailyPrograms {
|
|
53
53
|
const constructorOptions = { ...options, client }
|
|
54
54
|
if (!isSeamHttpOptionsWithClient(constructorOptions)) {
|
|
55
55
|
throw new SeamHttpInvalidOptionsError('Missing client')
|
|
56
56
|
}
|
|
57
|
-
return new
|
|
57
|
+
return new SeamHttpThermostatsDailyPrograms(constructorOptions)
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
static fromApiKey(
|
|
61
61
|
apiKey: SeamHttpOptionsWithApiKey['apiKey'],
|
|
62
62
|
options: Omit<SeamHttpOptionsWithApiKey, 'apiKey'> = {},
|
|
63
|
-
):
|
|
63
|
+
): SeamHttpThermostatsDailyPrograms {
|
|
64
64
|
const constructorOptions = { ...options, apiKey }
|
|
65
65
|
if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
|
|
66
66
|
throw new SeamHttpInvalidOptionsError('Missing apiKey')
|
|
67
67
|
}
|
|
68
|
-
return new
|
|
68
|
+
return new SeamHttpThermostatsDailyPrograms(constructorOptions)
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
static fromClientSessionToken(
|
|
@@ -74,19 +74,19 @@ export class SeamHttpNetworks {
|
|
|
74
74
|
SeamHttpOptionsWithClientSessionToken,
|
|
75
75
|
'clientSessionToken'
|
|
76
76
|
> = {},
|
|
77
|
-
):
|
|
77
|
+
): SeamHttpThermostatsDailyPrograms {
|
|
78
78
|
const constructorOptions = { ...options, clientSessionToken }
|
|
79
79
|
if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
|
|
80
80
|
throw new SeamHttpInvalidOptionsError('Missing clientSessionToken')
|
|
81
81
|
}
|
|
82
|
-
return new
|
|
82
|
+
return new SeamHttpThermostatsDailyPrograms(constructorOptions)
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
static async fromPublishableKey(
|
|
86
86
|
publishableKey: string,
|
|
87
87
|
userIdentifierKey: string,
|
|
88
88
|
options: SeamHttpFromPublishableKeyOptions = {},
|
|
89
|
-
): Promise<
|
|
89
|
+
): Promise<SeamHttpThermostatsDailyPrograms> {
|
|
90
90
|
warnOnInsecureuserIdentifierKey(userIdentifierKey)
|
|
91
91
|
const clientOptions = parseOptions({ ...options, publishableKey })
|
|
92
92
|
if (isSeamHttpOptionsWithClient(clientOptions)) {
|
|
@@ -99,7 +99,10 @@ export class SeamHttpNetworks {
|
|
|
99
99
|
const { token } = await clientSessions.getOrCreate({
|
|
100
100
|
user_identifier_key: userIdentifierKey,
|
|
101
101
|
})
|
|
102
|
-
return
|
|
102
|
+
return SeamHttpThermostatsDailyPrograms.fromClientSessionToken(
|
|
103
|
+
token,
|
|
104
|
+
options,
|
|
105
|
+
)
|
|
103
106
|
}
|
|
104
107
|
|
|
105
108
|
static fromConsoleSessionToken(
|
|
@@ -109,14 +112,14 @@ export class SeamHttpNetworks {
|
|
|
109
112
|
SeamHttpOptionsWithConsoleSessionToken,
|
|
110
113
|
'consoleSessionToken' | 'workspaceId'
|
|
111
114
|
> = {},
|
|
112
|
-
):
|
|
115
|
+
): SeamHttpThermostatsDailyPrograms {
|
|
113
116
|
const constructorOptions = { ...options, consoleSessionToken, workspaceId }
|
|
114
117
|
if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
|
|
115
118
|
throw new SeamHttpInvalidOptionsError(
|
|
116
119
|
'Missing consoleSessionToken or workspaceId',
|
|
117
120
|
)
|
|
118
121
|
}
|
|
119
|
-
return new
|
|
122
|
+
return new SeamHttpThermostatsDailyPrograms(constructorOptions)
|
|
120
123
|
}
|
|
121
124
|
|
|
122
125
|
static fromPersonalAccessToken(
|
|
@@ -126,14 +129,14 @@ export class SeamHttpNetworks {
|
|
|
126
129
|
SeamHttpOptionsWithPersonalAccessToken,
|
|
127
130
|
'personalAccessToken' | 'workspaceId'
|
|
128
131
|
> = {},
|
|
129
|
-
):
|
|
132
|
+
): SeamHttpThermostatsDailyPrograms {
|
|
130
133
|
const constructorOptions = { ...options, personalAccessToken, workspaceId }
|
|
131
134
|
if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
|
|
132
135
|
throw new SeamHttpInvalidOptionsError(
|
|
133
136
|
'Missing personalAccessToken or workspaceId',
|
|
134
137
|
)
|
|
135
138
|
}
|
|
136
|
-
return new
|
|
139
|
+
return new SeamHttpThermostatsDailyPrograms(constructorOptions)
|
|
137
140
|
}
|
|
138
141
|
|
|
139
142
|
createPaginator<const TResponse, const TResponseKey extends keyof TResponse>(
|
|
@@ -161,41 +164,71 @@ export class SeamHttpNetworks {
|
|
|
161
164
|
await clientSessions.get()
|
|
162
165
|
}
|
|
163
166
|
|
|
164
|
-
|
|
165
|
-
body?:
|
|
166
|
-
): SeamHttpRequest<
|
|
167
|
+
create(
|
|
168
|
+
body?: ThermostatsDailyProgramsCreateBody,
|
|
169
|
+
): SeamHttpRequest<
|
|
170
|
+
ThermostatsDailyProgramsCreateResponse,
|
|
171
|
+
'thermostat_daily_program'
|
|
172
|
+
> {
|
|
167
173
|
return new SeamHttpRequest(this, {
|
|
168
|
-
pathname: '/
|
|
174
|
+
pathname: '/thermostats/daily_programs/create',
|
|
169
175
|
method: 'post',
|
|
170
176
|
body,
|
|
171
|
-
responseKey: '
|
|
177
|
+
responseKey: 'thermostat_daily_program',
|
|
172
178
|
})
|
|
173
179
|
}
|
|
174
180
|
|
|
175
|
-
|
|
176
|
-
body?:
|
|
177
|
-
): SeamHttpRequest<
|
|
181
|
+
delete(
|
|
182
|
+
body?: ThermostatsDailyProgramsDeleteParams,
|
|
183
|
+
): SeamHttpRequest<void, undefined> {
|
|
178
184
|
return new SeamHttpRequest(this, {
|
|
179
|
-
pathname: '/
|
|
185
|
+
pathname: '/thermostats/daily_programs/delete',
|
|
180
186
|
method: 'post',
|
|
181
187
|
body,
|
|
182
|
-
responseKey:
|
|
188
|
+
responseKey: undefined,
|
|
189
|
+
})
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
update(
|
|
193
|
+
body?: ThermostatsDailyProgramsUpdateBody,
|
|
194
|
+
options: Pick<SeamHttpRequestOptions, 'waitForActionAttempt'> = {},
|
|
195
|
+
): SeamHttpRequest<ThermostatsDailyProgramsUpdateResponse, 'action_attempt'> {
|
|
196
|
+
return new SeamHttpRequest(this, {
|
|
197
|
+
pathname: '/thermostats/daily_programs/update',
|
|
198
|
+
method: 'post',
|
|
199
|
+
body,
|
|
200
|
+
responseKey: 'action_attempt',
|
|
201
|
+
options,
|
|
183
202
|
})
|
|
184
203
|
}
|
|
185
204
|
}
|
|
186
205
|
|
|
187
|
-
export type
|
|
206
|
+
export type ThermostatsDailyProgramsCreateBody =
|
|
207
|
+
RouteRequestBody<'/thermostats/daily_programs/create'>
|
|
188
208
|
|
|
189
|
-
export type
|
|
190
|
-
Required<RouteResponse<'/
|
|
209
|
+
export type ThermostatsDailyProgramsCreateResponse = SetNonNullable<
|
|
210
|
+
Required<RouteResponse<'/thermostats/daily_programs/create'>>
|
|
191
211
|
>
|
|
192
212
|
|
|
193
|
-
export type
|
|
213
|
+
export type ThermostatsDailyProgramsCreateOptions = never
|
|
194
214
|
|
|
195
|
-
export type
|
|
215
|
+
export type ThermostatsDailyProgramsDeleteParams =
|
|
216
|
+
RouteRequestBody<'/thermostats/daily_programs/delete'>
|
|
196
217
|
|
|
197
|
-
export type
|
|
198
|
-
Required<RouteResponse<'/
|
|
218
|
+
export type ThermostatsDailyProgramsDeleteResponse = SetNonNullable<
|
|
219
|
+
Required<RouteResponse<'/thermostats/daily_programs/delete'>>
|
|
199
220
|
>
|
|
200
221
|
|
|
201
|
-
export type
|
|
222
|
+
export type ThermostatsDailyProgramsDeleteOptions = never
|
|
223
|
+
|
|
224
|
+
export type ThermostatsDailyProgramsUpdateBody =
|
|
225
|
+
RouteRequestBody<'/thermostats/daily_programs/update'>
|
|
226
|
+
|
|
227
|
+
export type ThermostatsDailyProgramsUpdateResponse = SetNonNullable<
|
|
228
|
+
Required<RouteResponse<'/thermostats/daily_programs/update'>>
|
|
229
|
+
>
|
|
230
|
+
|
|
231
|
+
export type ThermostatsDailyProgramsUpdateOptions = Pick<
|
|
232
|
+
SeamHttpRequestOptions,
|
|
233
|
+
'waitForActionAttempt'
|
|
234
|
+
>
|
|
@@ -35,6 +35,7 @@ import { SeamPaginator } from 'lib/seam/connect/seam-paginator.js'
|
|
|
35
35
|
import type { SetNonNullable } from 'lib/types.js'
|
|
36
36
|
|
|
37
37
|
import { SeamHttpClientSessions } from './client-sessions.js'
|
|
38
|
+
import { SeamHttpThermostatsDailyPrograms } from './thermostats-daily-programs.js'
|
|
38
39
|
import { SeamHttpThermostatsSchedules } from './thermostats-schedules.js'
|
|
39
40
|
import { SeamHttpThermostatsSimulate } from './thermostats-simulate.js'
|
|
40
41
|
|
|
@@ -171,6 +172,13 @@ export class SeamHttpThermostats {
|
|
|
171
172
|
return SeamHttpThermostatsSimulate.fromClient(this.client, this.defaults)
|
|
172
173
|
}
|
|
173
174
|
|
|
175
|
+
get dailyPrograms(): SeamHttpThermostatsDailyPrograms {
|
|
176
|
+
return SeamHttpThermostatsDailyPrograms.fromClient(
|
|
177
|
+
this.client,
|
|
178
|
+
this.defaults,
|
|
179
|
+
)
|
|
180
|
+
}
|
|
181
|
+
|
|
174
182
|
activateClimatePreset(
|
|
175
183
|
body?: ThermostatsActivateClimatePresetBody,
|
|
176
184
|
options: Pick<SeamHttpRequestOptions, 'waitForActionAttempt'> = {},
|
|
@@ -330,6 +338,19 @@ export class SeamHttpThermostats {
|
|
|
330
338
|
responseKey: undefined,
|
|
331
339
|
})
|
|
332
340
|
}
|
|
341
|
+
|
|
342
|
+
updateWeeklyProgram(
|
|
343
|
+
body?: ThermostatsUpdateWeeklyProgramBody,
|
|
344
|
+
options: Pick<SeamHttpRequestOptions, 'waitForActionAttempt'> = {},
|
|
345
|
+
): SeamHttpRequest<ThermostatsUpdateWeeklyProgramResponse, 'action_attempt'> {
|
|
346
|
+
return new SeamHttpRequest(this, {
|
|
347
|
+
pathname: '/thermostats/update_weekly_program',
|
|
348
|
+
method: 'post',
|
|
349
|
+
body,
|
|
350
|
+
responseKey: 'action_attempt',
|
|
351
|
+
options,
|
|
352
|
+
})
|
|
353
|
+
}
|
|
333
354
|
}
|
|
334
355
|
|
|
335
356
|
export type ThermostatsActivateClimatePresetBody =
|
|
@@ -464,3 +485,15 @@ export type ThermostatsUpdateClimatePresetResponse = SetNonNullable<
|
|
|
464
485
|
>
|
|
465
486
|
|
|
466
487
|
export type ThermostatsUpdateClimatePresetOptions = never
|
|
488
|
+
|
|
489
|
+
export type ThermostatsUpdateWeeklyProgramBody =
|
|
490
|
+
RouteRequestBody<'/thermostats/update_weekly_program'>
|
|
491
|
+
|
|
492
|
+
export type ThermostatsUpdateWeeklyProgramResponse = SetNonNullable<
|
|
493
|
+
Required<RouteResponse<'/thermostats/update_weekly_program'>>
|
|
494
|
+
>
|
|
495
|
+
|
|
496
|
+
export type ThermostatsUpdateWeeklyProgramOptions = Pick<
|
|
497
|
+
SeamHttpRequestOptions,
|
|
498
|
+
'waitForActionAttempt'
|
|
499
|
+
>
|
|
@@ -3,8 +3,6 @@
|
|
|
3
3
|
* Do not edit this file or add other files to this directory.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import type { RouteRequestBody, RouteResponse } from '@seamapi/types/connect'
|
|
7
|
-
|
|
8
6
|
import {
|
|
9
7
|
getAuthHeadersForClientSessionToken,
|
|
10
8
|
warnOnInsecureuserIdentifierKey,
|
|
@@ -30,13 +28,12 @@ import {
|
|
|
30
28
|
limitToSeamHttpRequestOptions,
|
|
31
29
|
parseOptions,
|
|
32
30
|
} from 'lib/seam/connect/parse-options.js'
|
|
33
|
-
import { SeamHttpRequest } from 'lib/seam/connect/seam-http-request.js'
|
|
31
|
+
import type { SeamHttpRequest } from 'lib/seam/connect/seam-http-request.js'
|
|
34
32
|
import { SeamPaginator } from 'lib/seam/connect/seam-paginator.js'
|
|
35
|
-
import type { SetNonNullable } from 'lib/types.js'
|
|
36
33
|
|
|
37
34
|
import { SeamHttpClientSessions } from './client-sessions.js'
|
|
38
35
|
|
|
39
|
-
export class
|
|
36
|
+
export class SeamHttpUnstablePartner {
|
|
40
37
|
client: Client
|
|
41
38
|
readonly defaults: Required<SeamHttpRequestOptions>
|
|
42
39
|
|
|
@@ -49,23 +46,23 @@ export class SeamHttpBridges {
|
|
|
49
46
|
static fromClient(
|
|
50
47
|
client: SeamHttpOptionsWithClient['client'],
|
|
51
48
|
options: Omit<SeamHttpOptionsWithClient, 'client'> = {},
|
|
52
|
-
):
|
|
49
|
+
): SeamHttpUnstablePartner {
|
|
53
50
|
const constructorOptions = { ...options, client }
|
|
54
51
|
if (!isSeamHttpOptionsWithClient(constructorOptions)) {
|
|
55
52
|
throw new SeamHttpInvalidOptionsError('Missing client')
|
|
56
53
|
}
|
|
57
|
-
return new
|
|
54
|
+
return new SeamHttpUnstablePartner(constructorOptions)
|
|
58
55
|
}
|
|
59
56
|
|
|
60
57
|
static fromApiKey(
|
|
61
58
|
apiKey: SeamHttpOptionsWithApiKey['apiKey'],
|
|
62
59
|
options: Omit<SeamHttpOptionsWithApiKey, 'apiKey'> = {},
|
|
63
|
-
):
|
|
60
|
+
): SeamHttpUnstablePartner {
|
|
64
61
|
const constructorOptions = { ...options, apiKey }
|
|
65
62
|
if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
|
|
66
63
|
throw new SeamHttpInvalidOptionsError('Missing apiKey')
|
|
67
64
|
}
|
|
68
|
-
return new
|
|
65
|
+
return new SeamHttpUnstablePartner(constructorOptions)
|
|
69
66
|
}
|
|
70
67
|
|
|
71
68
|
static fromClientSessionToken(
|
|
@@ -74,19 +71,19 @@ export class SeamHttpBridges {
|
|
|
74
71
|
SeamHttpOptionsWithClientSessionToken,
|
|
75
72
|
'clientSessionToken'
|
|
76
73
|
> = {},
|
|
77
|
-
):
|
|
74
|
+
): SeamHttpUnstablePartner {
|
|
78
75
|
const constructorOptions = { ...options, clientSessionToken }
|
|
79
76
|
if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
|
|
80
77
|
throw new SeamHttpInvalidOptionsError('Missing clientSessionToken')
|
|
81
78
|
}
|
|
82
|
-
return new
|
|
79
|
+
return new SeamHttpUnstablePartner(constructorOptions)
|
|
83
80
|
}
|
|
84
81
|
|
|
85
82
|
static async fromPublishableKey(
|
|
86
83
|
publishableKey: string,
|
|
87
84
|
userIdentifierKey: string,
|
|
88
85
|
options: SeamHttpFromPublishableKeyOptions = {},
|
|
89
|
-
): Promise<
|
|
86
|
+
): Promise<SeamHttpUnstablePartner> {
|
|
90
87
|
warnOnInsecureuserIdentifierKey(userIdentifierKey)
|
|
91
88
|
const clientOptions = parseOptions({ ...options, publishableKey })
|
|
92
89
|
if (isSeamHttpOptionsWithClient(clientOptions)) {
|
|
@@ -99,7 +96,7 @@ export class SeamHttpBridges {
|
|
|
99
96
|
const { token } = await clientSessions.getOrCreate({
|
|
100
97
|
user_identifier_key: userIdentifierKey,
|
|
101
98
|
})
|
|
102
|
-
return
|
|
99
|
+
return SeamHttpUnstablePartner.fromClientSessionToken(token, options)
|
|
103
100
|
}
|
|
104
101
|
|
|
105
102
|
static fromConsoleSessionToken(
|
|
@@ -109,14 +106,14 @@ export class SeamHttpBridges {
|
|
|
109
106
|
SeamHttpOptionsWithConsoleSessionToken,
|
|
110
107
|
'consoleSessionToken' | 'workspaceId'
|
|
111
108
|
> = {},
|
|
112
|
-
):
|
|
109
|
+
): SeamHttpUnstablePartner {
|
|
113
110
|
const constructorOptions = { ...options, consoleSessionToken, workspaceId }
|
|
114
111
|
if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
|
|
115
112
|
throw new SeamHttpInvalidOptionsError(
|
|
116
113
|
'Missing consoleSessionToken or workspaceId',
|
|
117
114
|
)
|
|
118
115
|
}
|
|
119
|
-
return new
|
|
116
|
+
return new SeamHttpUnstablePartner(constructorOptions)
|
|
120
117
|
}
|
|
121
118
|
|
|
122
119
|
static fromPersonalAccessToken(
|
|
@@ -126,14 +123,14 @@ export class SeamHttpBridges {
|
|
|
126
123
|
SeamHttpOptionsWithPersonalAccessToken,
|
|
127
124
|
'personalAccessToken' | 'workspaceId'
|
|
128
125
|
> = {},
|
|
129
|
-
):
|
|
126
|
+
): SeamHttpUnstablePartner {
|
|
130
127
|
const constructorOptions = { ...options, personalAccessToken, workspaceId }
|
|
131
128
|
if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
|
|
132
129
|
throw new SeamHttpInvalidOptionsError(
|
|
133
130
|
'Missing personalAccessToken or workspaceId',
|
|
134
131
|
)
|
|
135
132
|
}
|
|
136
|
-
return new
|
|
133
|
+
return new SeamHttpUnstablePartner(constructorOptions)
|
|
137
134
|
}
|
|
138
135
|
|
|
139
136
|
createPaginator<const TResponse, const TResponseKey extends keyof TResponse>(
|
|
@@ -160,40 +157,4 @@ export class SeamHttpBridges {
|
|
|
160
157
|
const clientSessions = SeamHttpClientSessions.fromClient(this.client)
|
|
161
158
|
await clientSessions.get()
|
|
162
159
|
}
|
|
163
|
-
|
|
164
|
-
get(body?: BridgesGetParams): SeamHttpRequest<BridgesGetResponse, 'bridge'> {
|
|
165
|
-
return new SeamHttpRequest(this, {
|
|
166
|
-
pathname: '/bridges/get',
|
|
167
|
-
method: 'post',
|
|
168
|
-
body,
|
|
169
|
-
responseKey: 'bridge',
|
|
170
|
-
})
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
list(
|
|
174
|
-
body?: BridgesListParams,
|
|
175
|
-
): SeamHttpRequest<BridgesListResponse, 'bridges'> {
|
|
176
|
-
return new SeamHttpRequest(this, {
|
|
177
|
-
pathname: '/bridges/list',
|
|
178
|
-
method: 'post',
|
|
179
|
-
body,
|
|
180
|
-
responseKey: 'bridges',
|
|
181
|
-
})
|
|
182
|
-
}
|
|
183
160
|
}
|
|
184
|
-
|
|
185
|
-
export type BridgesGetParams = RouteRequestBody<'/bridges/get'>
|
|
186
|
-
|
|
187
|
-
export type BridgesGetResponse = SetNonNullable<
|
|
188
|
-
Required<RouteResponse<'/bridges/get'>>
|
|
189
|
-
>
|
|
190
|
-
|
|
191
|
-
export type BridgesGetOptions = never
|
|
192
|
-
|
|
193
|
-
export type BridgesListParams = RouteRequestBody<'/bridges/list'>
|
|
194
|
-
|
|
195
|
-
export type BridgesListResponse = SetNonNullable<
|
|
196
|
-
Required<RouteResponse<'/bridges/list'>>
|
|
197
|
-
>
|
|
198
|
-
|
|
199
|
-
export type BridgesListOptions = never
|
|
@@ -206,6 +206,15 @@ export class SeamHttpWorkspaces {
|
|
|
206
206
|
options,
|
|
207
207
|
})
|
|
208
208
|
}
|
|
209
|
+
|
|
210
|
+
update(body?: WorkspacesUpdateBody): SeamHttpRequest<void, undefined> {
|
|
211
|
+
return new SeamHttpRequest(this, {
|
|
212
|
+
pathname: '/workspaces/update',
|
|
213
|
+
method: 'post',
|
|
214
|
+
body,
|
|
215
|
+
responseKey: undefined,
|
|
216
|
+
})
|
|
217
|
+
}
|
|
209
218
|
}
|
|
210
219
|
|
|
211
220
|
export type WorkspacesCreateBody = RouteRequestBody<'/workspaces/create'>
|
|
@@ -243,3 +252,11 @@ export type WorkspacesResetSandboxOptions = Pick<
|
|
|
243
252
|
SeamHttpRequestOptions,
|
|
244
253
|
'waitForActionAttempt'
|
|
245
254
|
>
|
|
255
|
+
|
|
256
|
+
export type WorkspacesUpdateBody = RouteRequestBody<'/workspaces/update'>
|
|
257
|
+
|
|
258
|
+
export type WorkspacesUpdateResponse = SetNonNullable<
|
|
259
|
+
Required<RouteResponse<'/workspaces/update'>>
|
|
260
|
+
>
|
|
261
|
+
|
|
262
|
+
export type WorkspacesUpdateOptions = never
|
|
@@ -32,7 +32,6 @@ import {
|
|
|
32
32
|
SeamHttpDevices,
|
|
33
33
|
SeamHttpEvents,
|
|
34
34
|
SeamHttpLocks,
|
|
35
|
-
SeamHttpNetworks,
|
|
36
35
|
SeamHttpNoiseSensors,
|
|
37
36
|
SeamHttpPhones,
|
|
38
37
|
SeamHttpThermostats,
|
|
@@ -206,10 +205,6 @@ export class SeamHttp {
|
|
|
206
205
|
return SeamHttpLocks.fromClient(this.client, this.defaults)
|
|
207
206
|
}
|
|
208
207
|
|
|
209
|
-
get networks(): SeamHttpNetworks {
|
|
210
|
-
return SeamHttpNetworks.fromClient(this.client, this.defaults)
|
|
211
|
-
}
|
|
212
|
-
|
|
213
208
|
get noiseSensors(): SeamHttpNoiseSensors {
|
|
214
209
|
return SeamHttpNoiseSensors.fromClient(this.client, this.defaults)
|
|
215
210
|
}
|
package/src/lib/version.ts
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bridges.js","sourceRoot":"","sources":["../../../../src/lib/seam/connect/routes/bridges.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;AACpC,OAAO,EACL,6BAA6B,EAC7B,YAAY,GACb,MAAM,mCAAmC,CAAA;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAA;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAA;AAGlE,OAAO,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;AAE7D,MAAM,OAAO,eAAe;IAI1B,YAAY,kBAA4C,EAAE;QACxD,MAAM,OAAO,GAAG,YAAY,CAAC,eAAe,CAAC,CAAA;QAC7C,IAAI,CAAC,MAAM,GAAG,QAAQ,IAAI,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,OAAO,CAAC,CAAA;QAC1E,IAAI,CAAC,QAAQ,GAAG,6BAA6B,CAAC,OAAO,CAAC,CAAA;IACxD,CAAC;IAED,MAAM,CAAC,UAAU,CACf,MAA2C,EAC3C,UAAqD,EAAE;QAEvD,MAAM,kBAAkB,GAAG,EAAE,GAAG,OAAO,EAAE,MAAM,EAAE,CAAA;QACjD,IAAI,C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