@seamapi/http 1.54.0 → 1.56.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 +146 -45
- package/dist/connect.cjs.map +1 -1
- package/dist/connect.d.cts +47 -2
- package/dist/index.cjs +148 -45
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/lib/seam/connect/routes/seam/customer/v1/events/events.d.ts +34 -0
- package/lib/seam/connect/routes/seam/customer/v1/events/events.js +102 -0
- package/lib/seam/connect/routes/seam/customer/v1/events/events.js.map +1 -0
- package/lib/seam/connect/routes/seam/customer/v1/events/index.d.ts +1 -0
- package/lib/seam/connect/routes/seam/customer/v1/events/index.js +6 -0
- package/lib/seam/connect/routes/seam/customer/v1/events/index.js.map +1 -0
- package/lib/seam/connect/routes/seam/customer/v1/index.d.ts +1 -0
- package/lib/seam/connect/routes/seam/customer/v1/index.js +1 -0
- package/lib/seam/connect/routes/seam/customer/v1/index.js.map +1 -1
- package/lib/seam/connect/routes/seam/customer/v1/settings/settings.d.ts +14 -1
- package/lib/seam/connect/routes/seam/customer/v1/settings/settings.js +12 -0
- package/lib/seam/connect/routes/seam/customer/v1/settings/settings.js.map +1 -1
- package/lib/seam/connect/routes/seam/customer/v1/v1.d.ts +2 -0
- package/lib/seam/connect/routes/seam/customer/v1/v1.js +4 -0
- package/lib/seam/connect/routes/seam/customer/v1/v1.js.map +1 -1
- package/lib/seam/connect/routes/seam-http-endpoints.d.ts +5 -2
- package/lib/seam/connect/routes/seam-http-endpoints.js +21 -12
- package/lib/seam/connect/routes/seam-http-endpoints.js.map +1 -1
- package/lib/seam/connect/routes/thermostats/daily-programs/daily-programs.js +0 -12
- package/lib/seam/connect/routes/thermostats/daily-programs/daily-programs.js.map +1 -1
- package/lib/seam/connect/routes/thermostats/thermostats.js +0 -3
- package/lib/seam/connect/routes/thermostats/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/seam/customer/v1/events/events.ts +211 -0
- package/src/lib/seam/connect/routes/seam/customer/v1/events/index.ts +6 -0
- package/src/lib/seam/connect/routes/seam/customer/v1/index.ts +1 -0
- package/src/lib/seam/connect/routes/seam/customer/v1/settings/settings.ts +47 -1
- package/src/lib/seam/connect/routes/seam/customer/v1/v1.ts +5 -0
- package/src/lib/seam/connect/routes/seam-http-endpoints.ts +47 -20
- package/src/lib/seam/connect/routes/thermostats/daily-programs/daily-programs.ts +0 -20
- package/src/lib/seam/connect/routes/thermostats/thermostats.ts +0 -5
- package/src/lib/version.ts +1 -1
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Automatically generated by codegen/smith.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 { seamApiLtsVersion } from 'lib/lts-version.js'
|
|
9
|
+
import {
|
|
10
|
+
getAuthHeadersForClientSessionToken,
|
|
11
|
+
warnOnInsecureuserIdentifierKey,
|
|
12
|
+
} from 'lib/seam/connect/auth.js'
|
|
13
|
+
import { type Client, createClient } from 'lib/seam/connect/client.js'
|
|
14
|
+
import {
|
|
15
|
+
isSeamHttpOptionsWithApiKey,
|
|
16
|
+
isSeamHttpOptionsWithClient,
|
|
17
|
+
isSeamHttpOptionsWithClientSessionToken,
|
|
18
|
+
isSeamHttpOptionsWithConsoleSessionToken,
|
|
19
|
+
isSeamHttpOptionsWithPersonalAccessToken,
|
|
20
|
+
type SeamHttpFromPublishableKeyOptions,
|
|
21
|
+
SeamHttpInvalidOptionsError,
|
|
22
|
+
type SeamHttpOptions,
|
|
23
|
+
type SeamHttpOptionsWithApiKey,
|
|
24
|
+
type SeamHttpOptionsWithClient,
|
|
25
|
+
type SeamHttpOptionsWithClientSessionToken,
|
|
26
|
+
type SeamHttpOptionsWithConsoleSessionToken,
|
|
27
|
+
type SeamHttpOptionsWithPersonalAccessToken,
|
|
28
|
+
type SeamHttpRequestOptions,
|
|
29
|
+
} from 'lib/seam/connect/options.js'
|
|
30
|
+
import {
|
|
31
|
+
limitToSeamHttpRequestOptions,
|
|
32
|
+
parseOptions,
|
|
33
|
+
} from 'lib/seam/connect/parse-options.js'
|
|
34
|
+
import { SeamHttpClientSessions } from 'lib/seam/connect/routes/client-sessions/index.js'
|
|
35
|
+
import { SeamHttpRequest } from 'lib/seam/connect/seam-http-request.js'
|
|
36
|
+
import { SeamPaginator } from 'lib/seam/connect/seam-paginator.js'
|
|
37
|
+
import type { SetNonNullable } from 'lib/types.js'
|
|
38
|
+
|
|
39
|
+
export class SeamHttpSeamCustomerV1Events {
|
|
40
|
+
client: Client
|
|
41
|
+
readonly defaults: Required<SeamHttpRequestOptions>
|
|
42
|
+
readonly ltsVersion = seamApiLtsVersion
|
|
43
|
+
static ltsVersion = seamApiLtsVersion
|
|
44
|
+
|
|
45
|
+
constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) {
|
|
46
|
+
const options = parseOptions(apiKeyOrOptions)
|
|
47
|
+
if (!options.isUndocumentedApiEnabled) {
|
|
48
|
+
throw new Error(
|
|
49
|
+
'Cannot use undocumented API without isUndocumentedApiEnabled',
|
|
50
|
+
)
|
|
51
|
+
}
|
|
52
|
+
this.client = 'client' in options ? options.client : createClient(options)
|
|
53
|
+
this.defaults = limitToSeamHttpRequestOptions(options)
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
static fromClient(
|
|
57
|
+
client: SeamHttpOptionsWithClient['client'],
|
|
58
|
+
options: Omit<SeamHttpOptionsWithClient, 'client'> = {},
|
|
59
|
+
): SeamHttpSeamCustomerV1Events {
|
|
60
|
+
const constructorOptions = { ...options, client }
|
|
61
|
+
if (!isSeamHttpOptionsWithClient(constructorOptions)) {
|
|
62
|
+
throw new SeamHttpInvalidOptionsError('Missing client')
|
|
63
|
+
}
|
|
64
|
+
return new SeamHttpSeamCustomerV1Events(constructorOptions)
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
static fromApiKey(
|
|
68
|
+
apiKey: SeamHttpOptionsWithApiKey['apiKey'],
|
|
69
|
+
options: Omit<SeamHttpOptionsWithApiKey, 'apiKey'> = {},
|
|
70
|
+
): SeamHttpSeamCustomerV1Events {
|
|
71
|
+
const constructorOptions = { ...options, apiKey }
|
|
72
|
+
if (!isSeamHttpOptionsWithApiKey(constructorOptions)) {
|
|
73
|
+
throw new SeamHttpInvalidOptionsError('Missing apiKey')
|
|
74
|
+
}
|
|
75
|
+
return new SeamHttpSeamCustomerV1Events(constructorOptions)
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
static fromClientSessionToken(
|
|
79
|
+
clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'],
|
|
80
|
+
options: Omit<
|
|
81
|
+
SeamHttpOptionsWithClientSessionToken,
|
|
82
|
+
'clientSessionToken'
|
|
83
|
+
> = {},
|
|
84
|
+
): SeamHttpSeamCustomerV1Events {
|
|
85
|
+
const constructorOptions = { ...options, clientSessionToken }
|
|
86
|
+
if (!isSeamHttpOptionsWithClientSessionToken(constructorOptions)) {
|
|
87
|
+
throw new SeamHttpInvalidOptionsError('Missing clientSessionToken')
|
|
88
|
+
}
|
|
89
|
+
return new SeamHttpSeamCustomerV1Events(constructorOptions)
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
static async fromPublishableKey(
|
|
93
|
+
publishableKey: string,
|
|
94
|
+
userIdentifierKey: string,
|
|
95
|
+
options: SeamHttpFromPublishableKeyOptions = {},
|
|
96
|
+
): Promise<SeamHttpSeamCustomerV1Events> {
|
|
97
|
+
warnOnInsecureuserIdentifierKey(userIdentifierKey)
|
|
98
|
+
const clientOptions = parseOptions({ ...options, publishableKey })
|
|
99
|
+
if (isSeamHttpOptionsWithClient(clientOptions)) {
|
|
100
|
+
throw new SeamHttpInvalidOptionsError(
|
|
101
|
+
'The client option cannot be used with SeamHttpSeamCustomerV1Events.fromPublishableKey',
|
|
102
|
+
)
|
|
103
|
+
}
|
|
104
|
+
const client = createClient(clientOptions)
|
|
105
|
+
const clientSessions = SeamHttpClientSessions.fromClient(client)
|
|
106
|
+
const { token } = await clientSessions.getOrCreate({
|
|
107
|
+
user_identifier_key: userIdentifierKey,
|
|
108
|
+
})
|
|
109
|
+
return SeamHttpSeamCustomerV1Events.fromClientSessionToken(token, options)
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
static fromConsoleSessionToken(
|
|
113
|
+
consoleSessionToken: SeamHttpOptionsWithConsoleSessionToken['consoleSessionToken'],
|
|
114
|
+
workspaceId: SeamHttpOptionsWithConsoleSessionToken['workspaceId'],
|
|
115
|
+
options: Omit<
|
|
116
|
+
SeamHttpOptionsWithConsoleSessionToken,
|
|
117
|
+
'consoleSessionToken' | 'workspaceId'
|
|
118
|
+
> = {},
|
|
119
|
+
): SeamHttpSeamCustomerV1Events {
|
|
120
|
+
const constructorOptions = { ...options, consoleSessionToken, workspaceId }
|
|
121
|
+
if (!isSeamHttpOptionsWithConsoleSessionToken(constructorOptions)) {
|
|
122
|
+
throw new SeamHttpInvalidOptionsError(
|
|
123
|
+
'Missing consoleSessionToken or workspaceId',
|
|
124
|
+
)
|
|
125
|
+
}
|
|
126
|
+
return new SeamHttpSeamCustomerV1Events(constructorOptions)
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
static fromPersonalAccessToken(
|
|
130
|
+
personalAccessToken: SeamHttpOptionsWithPersonalAccessToken['personalAccessToken'],
|
|
131
|
+
workspaceId: SeamHttpOptionsWithPersonalAccessToken['workspaceId'],
|
|
132
|
+
options: Omit<
|
|
133
|
+
SeamHttpOptionsWithPersonalAccessToken,
|
|
134
|
+
'personalAccessToken' | 'workspaceId'
|
|
135
|
+
> = {},
|
|
136
|
+
): SeamHttpSeamCustomerV1Events {
|
|
137
|
+
const constructorOptions = { ...options, personalAccessToken, workspaceId }
|
|
138
|
+
if (!isSeamHttpOptionsWithPersonalAccessToken(constructorOptions)) {
|
|
139
|
+
throw new SeamHttpInvalidOptionsError(
|
|
140
|
+
'Missing personalAccessToken or workspaceId',
|
|
141
|
+
)
|
|
142
|
+
}
|
|
143
|
+
return new SeamHttpSeamCustomerV1Events(constructorOptions)
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
createPaginator<const TResponse, const TResponseKey extends keyof TResponse>(
|
|
147
|
+
request: SeamHttpRequest<TResponse, TResponseKey>,
|
|
148
|
+
): SeamPaginator<TResponse, TResponseKey> {
|
|
149
|
+
return new SeamPaginator<TResponse, TResponseKey>(this, request)
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
async updateClientSessionToken(
|
|
153
|
+
clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'],
|
|
154
|
+
): Promise<void> {
|
|
155
|
+
const { headers } = this.client.defaults
|
|
156
|
+
const authHeaders = getAuthHeadersForClientSessionToken({
|
|
157
|
+
clientSessionToken,
|
|
158
|
+
})
|
|
159
|
+
for (const key of Object.keys(authHeaders)) {
|
|
160
|
+
if (headers[key] == null) {
|
|
161
|
+
throw new Error(
|
|
162
|
+
'Cannot update a clientSessionToken on a client created without a clientSessionToken',
|
|
163
|
+
)
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
this.client.defaults.headers = { ...headers, ...authHeaders }
|
|
167
|
+
const clientSessions = SeamHttpClientSessions.fromClient(this.client)
|
|
168
|
+
await clientSessions.get()
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
list(
|
|
172
|
+
parameters?: SeamCustomerV1EventsListParameters,
|
|
173
|
+
options: SeamCustomerV1EventsListOptions = {},
|
|
174
|
+
): SeamCustomerV1EventsListRequest {
|
|
175
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
176
|
+
throw new Error(
|
|
177
|
+
'Cannot use undocumented API without isUndocumentedApiEnabled',
|
|
178
|
+
)
|
|
179
|
+
}
|
|
180
|
+
return new SeamHttpRequest(this, {
|
|
181
|
+
pathname: '/seam/customer/v1/events/list',
|
|
182
|
+
method: 'POST',
|
|
183
|
+
body: parameters,
|
|
184
|
+
responseKey: 'events',
|
|
185
|
+
options,
|
|
186
|
+
})
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
export type SeamCustomerV1EventsListParameters =
|
|
191
|
+
RouteRequestBody<'/seam/customer/v1/events/list'>
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* @deprecated Use SeamCustomerV1EventsListParameters instead.
|
|
195
|
+
*/
|
|
196
|
+
export type SeamCustomerV1EventsListParams = SeamCustomerV1EventsListParameters
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* @deprecated Use SeamCustomerV1EventsListRequest instead.
|
|
200
|
+
*/
|
|
201
|
+
export type SeamCustomerV1EventsListResponse = SetNonNullable<
|
|
202
|
+
Required<RouteResponse<'/seam/customer/v1/events/list'>>
|
|
203
|
+
>
|
|
204
|
+
|
|
205
|
+
export type SeamCustomerV1EventsListRequest = SeamHttpRequest<
|
|
206
|
+
SeamCustomerV1EventsListResponse,
|
|
207
|
+
'events'
|
|
208
|
+
>
|
|
209
|
+
|
|
210
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
211
|
+
export interface SeamCustomerV1EventsListOptions {}
|
|
@@ -3,7 +3,11 @@
|
|
|
3
3
|
* Do not edit this file or add other files to this directory.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import type {
|
|
6
|
+
import type {
|
|
7
|
+
RouteRequestBody,
|
|
8
|
+
RouteRequestParams,
|
|
9
|
+
RouteResponse,
|
|
10
|
+
} from '@seamapi/types/connect'
|
|
7
11
|
|
|
8
12
|
import { seamApiLtsVersion } from 'lib/lts-version.js'
|
|
9
13
|
import {
|
|
@@ -168,6 +172,24 @@ export class SeamHttpSeamCustomerV1Settings {
|
|
|
168
172
|
await clientSessions.get()
|
|
169
173
|
}
|
|
170
174
|
|
|
175
|
+
get(
|
|
176
|
+
parameters?: SeamCustomerV1SettingsGetParameters,
|
|
177
|
+
options: SeamCustomerV1SettingsGetOptions = {},
|
|
178
|
+
): SeamCustomerV1SettingsGetRequest {
|
|
179
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
180
|
+
throw new Error(
|
|
181
|
+
'Cannot use undocumented API without isUndocumentedApiEnabled',
|
|
182
|
+
)
|
|
183
|
+
}
|
|
184
|
+
return new SeamHttpRequest(this, {
|
|
185
|
+
pathname: '/seam/customer/v1/settings/get',
|
|
186
|
+
method: 'GET',
|
|
187
|
+
params: parameters,
|
|
188
|
+
responseKey: 'business_vertical',
|
|
189
|
+
options,
|
|
190
|
+
})
|
|
191
|
+
}
|
|
192
|
+
|
|
171
193
|
update(
|
|
172
194
|
parameters?: SeamCustomerV1SettingsUpdateParameters,
|
|
173
195
|
options: SeamCustomerV1SettingsUpdateOptions = {},
|
|
@@ -187,6 +209,30 @@ export class SeamHttpSeamCustomerV1Settings {
|
|
|
187
209
|
}
|
|
188
210
|
}
|
|
189
211
|
|
|
212
|
+
export type SeamCustomerV1SettingsGetParameters =
|
|
213
|
+
RouteRequestParams<'/seam/customer/v1/settings/get'>
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* @deprecated Use SeamCustomerV1SettingsGetParameters instead.
|
|
217
|
+
*/
|
|
218
|
+
export type SeamCustomerV1SettingsGetParams =
|
|
219
|
+
SeamCustomerV1SettingsGetParameters
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* @deprecated Use SeamCustomerV1SettingsGetRequest instead.
|
|
223
|
+
*/
|
|
224
|
+
export type SeamCustomerV1SettingsGetResponse = SetNonNullable<
|
|
225
|
+
Required<RouteResponse<'/seam/customer/v1/settings/get'>>
|
|
226
|
+
>
|
|
227
|
+
|
|
228
|
+
export type SeamCustomerV1SettingsGetRequest = SeamHttpRequest<
|
|
229
|
+
SeamCustomerV1SettingsGetResponse,
|
|
230
|
+
'business_vertical'
|
|
231
|
+
>
|
|
232
|
+
|
|
233
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-interface
|
|
234
|
+
export interface SeamCustomerV1SettingsGetOptions {}
|
|
235
|
+
|
|
190
236
|
export type SeamCustomerV1SettingsUpdateParameters =
|
|
191
237
|
RouteRequestBody<'/seam/customer/v1/settings/update'>
|
|
192
238
|
|
|
@@ -35,6 +35,7 @@ import { SeamPaginator } from 'lib/seam/connect/seam-paginator.js'
|
|
|
35
35
|
|
|
36
36
|
import { SeamHttpSeamCustomerV1AutomationRuns } from './automation-runs/index.js'
|
|
37
37
|
import { SeamHttpSeamCustomerV1Automations } from './automations/index.js'
|
|
38
|
+
import { SeamHttpSeamCustomerV1Events } from './events/index.js'
|
|
38
39
|
import { SeamHttpSeamCustomerV1Portals } from './portals/index.js'
|
|
39
40
|
import { SeamHttpSeamCustomerV1Settings } from './settings/index.js'
|
|
40
41
|
|
|
@@ -184,6 +185,10 @@ export class SeamHttpSeamCustomerV1 {
|
|
|
184
185
|
)
|
|
185
186
|
}
|
|
186
187
|
|
|
188
|
+
get events(): SeamHttpSeamCustomerV1Events {
|
|
189
|
+
return SeamHttpSeamCustomerV1Events.fromClient(this.client, this.defaults)
|
|
190
|
+
}
|
|
191
|
+
|
|
187
192
|
get portals(): SeamHttpSeamCustomerV1Portals {
|
|
188
193
|
return SeamHttpSeamCustomerV1Portals.fromClient(this.client, this.defaults)
|
|
189
194
|
}
|
|
@@ -560,6 +560,12 @@ import {
|
|
|
560
560
|
type SeamCustomerV1AutomationsUpdateRequest,
|
|
561
561
|
SeamHttpSeamCustomerV1Automations,
|
|
562
562
|
} from './seam/customer/v1/automations/index.js'
|
|
563
|
+
import {
|
|
564
|
+
type SeamCustomerV1EventsListOptions,
|
|
565
|
+
type SeamCustomerV1EventsListParameters,
|
|
566
|
+
type SeamCustomerV1EventsListRequest,
|
|
567
|
+
SeamHttpSeamCustomerV1Events,
|
|
568
|
+
} from './seam/customer/v1/events/index.js'
|
|
563
569
|
import {
|
|
564
570
|
type SeamCustomerV1PortalsGetOptions,
|
|
565
571
|
type SeamCustomerV1PortalsGetParameters,
|
|
@@ -567,6 +573,9 @@ import {
|
|
|
567
573
|
SeamHttpSeamCustomerV1Portals,
|
|
568
574
|
} from './seam/customer/v1/portals/index.js'
|
|
569
575
|
import {
|
|
576
|
+
type SeamCustomerV1SettingsGetOptions,
|
|
577
|
+
type SeamCustomerV1SettingsGetParameters,
|
|
578
|
+
type SeamCustomerV1SettingsGetRequest,
|
|
570
579
|
type SeamCustomerV1SettingsUpdateOptions,
|
|
571
580
|
type SeamCustomerV1SettingsUpdateParameters,
|
|
572
581
|
type SeamCustomerV1SettingsUpdateRequest,
|
|
@@ -2923,6 +2932,24 @@ export class SeamHttpEndpoints {
|
|
|
2923
2932
|
}
|
|
2924
2933
|
}
|
|
2925
2934
|
|
|
2935
|
+
get ['/seam/customer/v1/events/list'](): (
|
|
2936
|
+
parameters?: SeamCustomerV1EventsListParameters,
|
|
2937
|
+
options?: SeamCustomerV1EventsListOptions,
|
|
2938
|
+
) => SeamCustomerV1EventsListRequest {
|
|
2939
|
+
const { client, defaults } = this
|
|
2940
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
2941
|
+
throw new Error(
|
|
2942
|
+
'Cannot use undocumented API without isUndocumentedApiEnabled',
|
|
2943
|
+
)
|
|
2944
|
+
}
|
|
2945
|
+
return function seamCustomerV1EventsList(
|
|
2946
|
+
...args: Parameters<SeamHttpSeamCustomerV1Events['list']>
|
|
2947
|
+
): ReturnType<SeamHttpSeamCustomerV1Events['list']> {
|
|
2948
|
+
const seam = SeamHttpSeamCustomerV1Events.fromClient(client, defaults)
|
|
2949
|
+
return seam.list(...args)
|
|
2950
|
+
}
|
|
2951
|
+
}
|
|
2952
|
+
|
|
2926
2953
|
get ['/seam/customer/v1/portals/get'](): (
|
|
2927
2954
|
parameters?: SeamCustomerV1PortalsGetParameters,
|
|
2928
2955
|
options?: SeamCustomerV1PortalsGetOptions,
|
|
@@ -2941,6 +2968,24 @@ export class SeamHttpEndpoints {
|
|
|
2941
2968
|
}
|
|
2942
2969
|
}
|
|
2943
2970
|
|
|
2971
|
+
get ['/seam/customer/v1/settings/get'](): (
|
|
2972
|
+
parameters?: SeamCustomerV1SettingsGetParameters,
|
|
2973
|
+
options?: SeamCustomerV1SettingsGetOptions,
|
|
2974
|
+
) => SeamCustomerV1SettingsGetRequest {
|
|
2975
|
+
const { client, defaults } = this
|
|
2976
|
+
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
2977
|
+
throw new Error(
|
|
2978
|
+
'Cannot use undocumented API without isUndocumentedApiEnabled',
|
|
2979
|
+
)
|
|
2980
|
+
}
|
|
2981
|
+
return function seamCustomerV1SettingsGet(
|
|
2982
|
+
...args: Parameters<SeamHttpSeamCustomerV1Settings['get']>
|
|
2983
|
+
): ReturnType<SeamHttpSeamCustomerV1Settings['get']> {
|
|
2984
|
+
const seam = SeamHttpSeamCustomerV1Settings.fromClient(client, defaults)
|
|
2985
|
+
return seam.get(...args)
|
|
2986
|
+
}
|
|
2987
|
+
}
|
|
2988
|
+
|
|
2944
2989
|
get ['/seam/customer/v1/settings/update'](): (
|
|
2945
2990
|
parameters?: SeamCustomerV1SettingsUpdateParameters,
|
|
2946
2991
|
options?: SeamCustomerV1SettingsUpdateOptions,
|
|
@@ -3302,11 +3347,6 @@ export class SeamHttpEndpoints {
|
|
|
3302
3347
|
options?: ThermostatsUpdateWeeklyProgramOptions,
|
|
3303
3348
|
) => ThermostatsUpdateWeeklyProgramRequest {
|
|
3304
3349
|
const { client, defaults } = this
|
|
3305
|
-
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
3306
|
-
throw new Error(
|
|
3307
|
-
'Cannot use undocumented API without isUndocumentedApiEnabled',
|
|
3308
|
-
)
|
|
3309
|
-
}
|
|
3310
3350
|
return function thermostatsUpdateWeeklyProgram(
|
|
3311
3351
|
...args: Parameters<SeamHttpThermostats['updateWeeklyProgram']>
|
|
3312
3352
|
): ReturnType<SeamHttpThermostats['updateWeeklyProgram']> {
|
|
@@ -3320,11 +3360,6 @@ export class SeamHttpEndpoints {
|
|
|
3320
3360
|
options?: ThermostatsDailyProgramsCreateOptions,
|
|
3321
3361
|
) => ThermostatsDailyProgramsCreateRequest {
|
|
3322
3362
|
const { client, defaults } = this
|
|
3323
|
-
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
3324
|
-
throw new Error(
|
|
3325
|
-
'Cannot use undocumented API without isUndocumentedApiEnabled',
|
|
3326
|
-
)
|
|
3327
|
-
}
|
|
3328
3363
|
return function thermostatsDailyProgramsCreate(
|
|
3329
3364
|
...args: Parameters<SeamHttpThermostatsDailyPrograms['create']>
|
|
3330
3365
|
): ReturnType<SeamHttpThermostatsDailyPrograms['create']> {
|
|
@@ -3338,11 +3373,6 @@ export class SeamHttpEndpoints {
|
|
|
3338
3373
|
options?: ThermostatsDailyProgramsDeleteOptions,
|
|
3339
3374
|
) => ThermostatsDailyProgramsDeleteRequest {
|
|
3340
3375
|
const { client, defaults } = this
|
|
3341
|
-
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
3342
|
-
throw new Error(
|
|
3343
|
-
'Cannot use undocumented API without isUndocumentedApiEnabled',
|
|
3344
|
-
)
|
|
3345
|
-
}
|
|
3346
3376
|
return function thermostatsDailyProgramsDelete(
|
|
3347
3377
|
...args: Parameters<SeamHttpThermostatsDailyPrograms['delete']>
|
|
3348
3378
|
): ReturnType<SeamHttpThermostatsDailyPrograms['delete']> {
|
|
@@ -3356,11 +3386,6 @@ export class SeamHttpEndpoints {
|
|
|
3356
3386
|
options?: ThermostatsDailyProgramsUpdateOptions,
|
|
3357
3387
|
) => ThermostatsDailyProgramsUpdateRequest {
|
|
3358
3388
|
const { client, defaults } = this
|
|
3359
|
-
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
3360
|
-
throw new Error(
|
|
3361
|
-
'Cannot use undocumented API without isUndocumentedApiEnabled',
|
|
3362
|
-
)
|
|
3363
|
-
}
|
|
3364
3389
|
return function thermostatsDailyProgramsUpdate(
|
|
3365
3390
|
...args: Parameters<SeamHttpThermostatsDailyPrograms['update']>
|
|
3366
3391
|
): ReturnType<SeamHttpThermostatsDailyPrograms['update']> {
|
|
@@ -4308,7 +4333,9 @@ export type SeamHttpEndpointQueryPaths =
|
|
|
4308
4333
|
| '/seam/console/v1/get_resource_locator'
|
|
4309
4334
|
| '/seam/customer/v1/automation_runs/list'
|
|
4310
4335
|
| '/seam/customer/v1/automations/get'
|
|
4336
|
+
| '/seam/customer/v1/events/list'
|
|
4311
4337
|
| '/seam/customer/v1/portals/get'
|
|
4338
|
+
| '/seam/customer/v1/settings/get'
|
|
4312
4339
|
| '/seam/partner/v1/building_blocks/spaces/auto_map'
|
|
4313
4340
|
| '/spaces/get'
|
|
4314
4341
|
| '/spaces/get_related'
|
|
@@ -44,11 +44,6 @@ export class SeamHttpThermostatsDailyPrograms {
|
|
|
44
44
|
|
|
45
45
|
constructor(apiKeyOrOptions: string | SeamHttpOptions = {}) {
|
|
46
46
|
const options = parseOptions(apiKeyOrOptions)
|
|
47
|
-
if (!options.isUndocumentedApiEnabled) {
|
|
48
|
-
throw new Error(
|
|
49
|
-
'Cannot use undocumented API without isUndocumentedApiEnabled',
|
|
50
|
-
)
|
|
51
|
-
}
|
|
52
47
|
this.client = 'client' in options ? options.client : createClient(options)
|
|
53
48
|
this.defaults = limitToSeamHttpRequestOptions(options)
|
|
54
49
|
}
|
|
@@ -175,11 +170,6 @@ export class SeamHttpThermostatsDailyPrograms {
|
|
|
175
170
|
parameters?: ThermostatsDailyProgramsCreateParameters,
|
|
176
171
|
options: ThermostatsDailyProgramsCreateOptions = {},
|
|
177
172
|
): ThermostatsDailyProgramsCreateRequest {
|
|
178
|
-
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
179
|
-
throw new Error(
|
|
180
|
-
'Cannot use undocumented API without isUndocumentedApiEnabled',
|
|
181
|
-
)
|
|
182
|
-
}
|
|
183
173
|
return new SeamHttpRequest(this, {
|
|
184
174
|
pathname: '/thermostats/daily_programs/create',
|
|
185
175
|
method: 'POST',
|
|
@@ -193,11 +183,6 @@ export class SeamHttpThermostatsDailyPrograms {
|
|
|
193
183
|
parameters?: ThermostatsDailyProgramsDeleteParameters,
|
|
194
184
|
options: ThermostatsDailyProgramsDeleteOptions = {},
|
|
195
185
|
): ThermostatsDailyProgramsDeleteRequest {
|
|
196
|
-
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
197
|
-
throw new Error(
|
|
198
|
-
'Cannot use undocumented API without isUndocumentedApiEnabled',
|
|
199
|
-
)
|
|
200
|
-
}
|
|
201
186
|
return new SeamHttpRequest(this, {
|
|
202
187
|
pathname: '/thermostats/daily_programs/delete',
|
|
203
188
|
method: 'POST',
|
|
@@ -211,11 +196,6 @@ export class SeamHttpThermostatsDailyPrograms {
|
|
|
211
196
|
parameters?: ThermostatsDailyProgramsUpdateParameters,
|
|
212
197
|
options: ThermostatsDailyProgramsUpdateOptions = {},
|
|
213
198
|
): ThermostatsDailyProgramsUpdateRequest {
|
|
214
|
-
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
215
|
-
throw new Error(
|
|
216
|
-
'Cannot use undocumented API without isUndocumentedApiEnabled',
|
|
217
|
-
)
|
|
218
|
-
}
|
|
219
199
|
return new SeamHttpRequest(this, {
|
|
220
200
|
pathname: '/thermostats/daily_programs/update',
|
|
221
201
|
method: 'PATCH',
|
|
@@ -373,11 +373,6 @@ export class SeamHttpThermostats {
|
|
|
373
373
|
parameters?: ThermostatsUpdateWeeklyProgramParameters,
|
|
374
374
|
options: ThermostatsUpdateWeeklyProgramOptions = {},
|
|
375
375
|
): ThermostatsUpdateWeeklyProgramRequest {
|
|
376
|
-
if (!this.defaults.isUndocumentedApiEnabled) {
|
|
377
|
-
throw new Error(
|
|
378
|
-
'Cannot use undocumented API without isUndocumentedApiEnabled',
|
|
379
|
-
)
|
|
380
|
-
}
|
|
381
376
|
return new SeamHttpRequest(this, {
|
|
382
377
|
pathname: '/thermostats/update_weekly_program',
|
|
383
378
|
method: 'POST',
|
package/src/lib/version.ts
CHANGED