@seamapi/http 1.19.0 → 1.21.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 +187 -0
- package/dist/connect.cjs.map +1 -1
- package/dist/connect.d.cts +40 -1
- package/lib/seam/connect/routes/bridges.d.ts +21 -0
- package/lib/seam/connect/routes/bridges.js +88 -0
- package/lib/seam/connect/routes/bridges.js.map +1 -0
- package/lib/seam/connect/routes/index.d.ts +2 -0
- package/lib/seam/connect/routes/index.js +2 -0
- package/lib/seam/connect/routes/index.js.map +1 -1
- package/lib/seam/connect/routes/thermostats-simulate.d.ts +25 -0
- package/lib/seam/connect/routes/thermostats-simulate.js +96 -0
- package/lib/seam/connect/routes/thermostats-simulate.js.map +1 -0
- package/lib/seam/connect/routes/thermostats.d.ts +2 -0
- package/lib/seam/connect/routes/thermostats.js +4 -0
- 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/bridges.ts +173 -0
- package/src/lib/seam/connect/routes/index.ts +2 -0
- package/src/lib/seam/connect/routes/thermostats-simulate.ts +196 -0
- package/src/lib/seam/connect/routes/thermostats.ts +5 -0
- package/src/lib/version.ts +1 -1
|
@@ -0,0 +1,173 @@
|
|
|
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 SeamHttpBridges {
|
|
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
|
+
): SeamHttpBridges {
|
|
52
|
+
const constructorOptions = { ...options, client }
|
|
53
|
+
if (!isSeamHttpOptionsWithClient(constructorOptions)) {
|
|
54
|
+
throw new SeamHttpInvalidOptionsError('Missing client')
|
|
55
|
+
}
|
|
56
|
+
return new SeamHttpBridges(constructorOptions)
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
static fromApiKey(
|
|
60
|
+
apiKey: SeamHttpOptionsWithApiKey['apiKey'],
|
|
61
|
+
options: Omit<SeamHttpOptionsWithApiKey, 'apiKey'> = {},
|
|
62
|
+
): SeamHttpBridges {
|
|
63
|
+
const constructorOptions = { ...options, apiKey }
|
|
64
|
+
if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
|
|
65
|
+
throw new SeamHttpInvalidOptionsError('Missing apiKey')
|
|
66
|
+
}
|
|
67
|
+
return new SeamHttpBridges(constructorOptions)
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
static fromClientSessionToken(
|
|
71
|
+
clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'],
|
|
72
|
+
options: Omit<
|
|
73
|
+
SeamHttpOptionsWithClientSessionToken,
|
|
74
|
+
'clientSessionToken'
|
|
75
|
+
> = {},
|
|
76
|
+
): SeamHttpBridges {
|
|
77
|
+
const constructorOptions = { ...options, clientSessionToken }
|
|
78
|
+
if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
|
|
79
|
+
throw new SeamHttpInvalidOptionsError('Missing clientSessionToken')
|
|
80
|
+
}
|
|
81
|
+
return new SeamHttpBridges(constructorOptions)
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
static async fromPublishableKey(
|
|
85
|
+
publishableKey: string,
|
|
86
|
+
userIdentifierKey: string,
|
|
87
|
+
options: SeamHttpFromPublishableKeyOptions = {},
|
|
88
|
+
): Promise<SeamHttpBridges> {
|
|
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 SeamHttpBridges.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
|
+
): SeamHttpBridges {
|
|
112
|
+
const constructorOptions = { ...options, consoleSessionToken, workspaceId }
|
|
113
|
+
if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
|
|
114
|
+
throw new SeamHttpInvalidOptionsError(
|
|
115
|
+
'Missing consoleSessionToken or workspaceId',
|
|
116
|
+
)
|
|
117
|
+
}
|
|
118
|
+
return new SeamHttpBridges(constructorOptions)
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
static fromPersonalAccessToken(
|
|
122
|
+
personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'],
|
|
123
|
+
workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'],
|
|
124
|
+
options: Omit<
|
|
125
|
+
SeamHttpOptionsWithPersonalAccessToken,
|
|
126
|
+
'personalAccessToken' | 'workspaceId'
|
|
127
|
+
> = {},
|
|
128
|
+
): SeamHttpBridges {
|
|
129
|
+
const constructorOptions = { ...options, personalAccessToken, workspaceId }
|
|
130
|
+
if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
|
|
131
|
+
throw new SeamHttpInvalidOptionsError(
|
|
132
|
+
'Missing personalAccessToken or workspaceId',
|
|
133
|
+
)
|
|
134
|
+
}
|
|
135
|
+
return new SeamHttpBridges(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
|
+
get(body?: BridgesGetParams): SeamHttpRequest<BridgesGetResponse, 'bridge'> {
|
|
158
|
+
return new SeamHttpRequest(this, {
|
|
159
|
+
path: '/bridges/get',
|
|
160
|
+
method: 'post',
|
|
161
|
+
body,
|
|
162
|
+
responseKey: 'bridge',
|
|
163
|
+
})
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
export type BridgesGetParams = RouteRequestBody<'/bridges/get'>
|
|
168
|
+
|
|
169
|
+
export type BridgesGetResponse = SetNonNullable<
|
|
170
|
+
Required<RouteResponse<'/bridges/get'>>
|
|
171
|
+
>
|
|
172
|
+
|
|
173
|
+
export type BridgesGetOptions = never
|
|
@@ -15,6 +15,7 @@ export * from './acs-systems.js'
|
|
|
15
15
|
export * from './acs-users.js'
|
|
16
16
|
export * from './acs-users-unmanaged.js'
|
|
17
17
|
export * from './action-attempts.js'
|
|
18
|
+
export * from './bridges.js'
|
|
18
19
|
export * from './client-sessions.js'
|
|
19
20
|
export * from './connect-webviews.js'
|
|
20
21
|
export * from './connected-accounts.js'
|
|
@@ -31,6 +32,7 @@ export * from './phones.js'
|
|
|
31
32
|
export * from './phones-simulate.js'
|
|
32
33
|
export * from './thermostats.js'
|
|
33
34
|
export * from './thermostats-schedules.js'
|
|
35
|
+
export * from './thermostats-simulate.js'
|
|
34
36
|
export * from './user-identities.js'
|
|
35
37
|
export * from './user-identities-enrollment-automations.js'
|
|
36
38
|
export * from './webhooks.js'
|
|
@@ -0,0 +1,196 @@
|
|
|
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 SeamHttpThermostatsSimulate {
|
|
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
|
+
): SeamHttpThermostatsSimulate {
|
|
52
|
+
const constructorOptions = { ...options, client }
|
|
53
|
+
if (!isSeamHttpOptionsWithClient(constructorOptions)) {
|
|
54
|
+
throw new SeamHttpInvalidOptionsError('Missing client')
|
|
55
|
+
}
|
|
56
|
+
return new SeamHttpThermostatsSimulate(constructorOptions)
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
static fromApiKey(
|
|
60
|
+
apiKey: SeamHttpOptionsWithApiKey['apiKey'],
|
|
61
|
+
options: Omit<SeamHttpOptionsWithApiKey, 'apiKey'> = {},
|
|
62
|
+
): SeamHttpThermostatsSimulate {
|
|
63
|
+
const constructorOptions = { ...options, apiKey }
|
|
64
|
+
if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
|
|
65
|
+
throw new SeamHttpInvalidOptionsError('Missing apiKey')
|
|
66
|
+
}
|
|
67
|
+
return new SeamHttpThermostatsSimulate(constructorOptions)
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
static fromClientSessionToken(
|
|
71
|
+
clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'],
|
|
72
|
+
options: Omit<
|
|
73
|
+
SeamHttpOptionsWithClientSessionToken,
|
|
74
|
+
'clientSessionToken'
|
|
75
|
+
> = {},
|
|
76
|
+
): SeamHttpThermostatsSimulate {
|
|
77
|
+
const constructorOptions = { ...options, clientSessionToken }
|
|
78
|
+
if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
|
|
79
|
+
throw new SeamHttpInvalidOptionsError('Missing clientSessionToken')
|
|
80
|
+
}
|
|
81
|
+
return new SeamHttpThermostatsSimulate(constructorOptions)
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
static async fromPublishableKey(
|
|
85
|
+
publishableKey: string,
|
|
86
|
+
userIdentifierKey: string,
|
|
87
|
+
options: SeamHttpFromPublishableKeyOptions = {},
|
|
88
|
+
): Promise<SeamHttpThermostatsSimulate> {
|
|
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 SeamHttpThermostatsSimulate.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
|
+
): SeamHttpThermostatsSimulate {
|
|
112
|
+
const constructorOptions = { ...options, consoleSessionToken, workspaceId }
|
|
113
|
+
if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
|
|
114
|
+
throw new SeamHttpInvalidOptionsError(
|
|
115
|
+
'Missing consoleSessionToken or workspaceId',
|
|
116
|
+
)
|
|
117
|
+
}
|
|
118
|
+
return new SeamHttpThermostatsSimulate(constructorOptions)
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
static fromPersonalAccessToken(
|
|
122
|
+
personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'],
|
|
123
|
+
workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'],
|
|
124
|
+
options: Omit<
|
|
125
|
+
SeamHttpOptionsWithPersonalAccessToken,
|
|
126
|
+
'personalAccessToken' | 'workspaceId'
|
|
127
|
+
> = {},
|
|
128
|
+
): SeamHttpThermostatsSimulate {
|
|
129
|
+
const constructorOptions = { ...options, personalAccessToken, workspaceId }
|
|
130
|
+
if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
|
|
131
|
+
throw new SeamHttpInvalidOptionsError(
|
|
132
|
+
'Missing personalAccessToken or workspaceId',
|
|
133
|
+
)
|
|
134
|
+
}
|
|
135
|
+
return new SeamHttpThermostatsSimulate(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
|
+
hvacModeAdjusted(
|
|
158
|
+
body?: ThermostatsSimulateHvacModeAdjustedBody,
|
|
159
|
+
): SeamHttpRequest<void, undefined> {
|
|
160
|
+
return new SeamHttpRequest(this, {
|
|
161
|
+
path: '/thermostats/simulate/hvac_mode_adjusted',
|
|
162
|
+
method: 'post',
|
|
163
|
+
body,
|
|
164
|
+
responseKey: undefined,
|
|
165
|
+
})
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
temperatureReached(
|
|
169
|
+
body?: ThermostatsSimulateTemperatureReachedBody,
|
|
170
|
+
): SeamHttpRequest<void, undefined> {
|
|
171
|
+
return new SeamHttpRequest(this, {
|
|
172
|
+
path: '/thermostats/simulate/temperature_reached',
|
|
173
|
+
method: 'post',
|
|
174
|
+
body,
|
|
175
|
+
responseKey: undefined,
|
|
176
|
+
})
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
export type ThermostatsSimulateHvacModeAdjustedBody =
|
|
181
|
+
RouteRequestBody<'/thermostats/simulate/hvac_mode_adjusted'>
|
|
182
|
+
|
|
183
|
+
export type ThermostatsSimulateHvacModeAdjustedResponse = SetNonNullable<
|
|
184
|
+
Required<RouteResponse<'/thermostats/simulate/hvac_mode_adjusted'>>
|
|
185
|
+
>
|
|
186
|
+
|
|
187
|
+
export type ThermostatsSimulateHvacModeAdjustedOptions = never
|
|
188
|
+
|
|
189
|
+
export type ThermostatsSimulateTemperatureReachedBody =
|
|
190
|
+
RouteRequestBody<'/thermostats/simulate/temperature_reached'>
|
|
191
|
+
|
|
192
|
+
export type ThermostatsSimulateTemperatureReachedResponse = SetNonNullable<
|
|
193
|
+
Required<RouteResponse<'/thermostats/simulate/temperature_reached'>>
|
|
194
|
+
>
|
|
195
|
+
|
|
196
|
+
export type ThermostatsSimulateTemperatureReachedOptions = never
|
|
@@ -35,6 +35,7 @@ import type { SetNonNullable } from 'lib/types.js'
|
|
|
35
35
|
|
|
36
36
|
import { SeamHttpClientSessions } from './client-sessions.js'
|
|
37
37
|
import { SeamHttpThermostatsSchedules } from './thermostats-schedules.js'
|
|
38
|
+
import { SeamHttpThermostatsSimulate } from './thermostats-simulate.js'
|
|
38
39
|
|
|
39
40
|
export class SeamHttpThermostats {
|
|
40
41
|
client: Client
|
|
@@ -159,6 +160,10 @@ export class SeamHttpThermostats {
|
|
|
159
160
|
return SeamHttpThermostatsSchedules.fromClient(this.client, this.defaults)
|
|
160
161
|
}
|
|
161
162
|
|
|
163
|
+
get simulate(): SeamHttpThermostatsSimulate {
|
|
164
|
+
return SeamHttpThermostatsSimulate.fromClient(this.client, this.defaults)
|
|
165
|
+
}
|
|
166
|
+
|
|
162
167
|
activateClimatePreset(
|
|
163
168
|
body?: ThermostatsActivateClimatePresetBody,
|
|
164
169
|
options: Pick<SeamHttpRequestOptions, 'waitForActionAttempt'> = {},
|
package/src/lib/version.ts
CHANGED