@seamapi/http 1.23.0 → 1.25.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/README.md +61 -0
- package/dist/connect.cjs +398 -170
- package/dist/connect.cjs.map +1 -1
- package/dist/connect.d.cts +78 -4
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/lib/seam/connect/index.d.ts +2 -0
- package/lib/seam/connect/index.js +2 -0
- package/lib/seam/connect/index.js.map +1 -1
- package/lib/seam/connect/routes/access-codes-simulate.d.ts +2 -0
- package/lib/seam/connect/routes/access-codes-simulate.js +5 -1
- package/lib/seam/connect/routes/access-codes-simulate.js.map +1 -1
- package/lib/seam/connect/routes/access-codes-unmanaged.d.ts +2 -0
- package/lib/seam/connect/routes/access-codes-unmanaged.js +9 -5
- package/lib/seam/connect/routes/access-codes-unmanaged.js.map +1 -1
- package/lib/seam/connect/routes/access-codes.d.ts +2 -0
- package/lib/seam/connect/routes/access-codes.js +13 -9
- package/lib/seam/connect/routes/access-codes.js.map +1 -1
- package/lib/seam/connect/routes/acs-access-groups-unmanaged.d.ts +2 -0
- package/lib/seam/connect/routes/acs-access-groups-unmanaged.js +6 -2
- package/lib/seam/connect/routes/acs-access-groups-unmanaged.js.map +1 -1
- package/lib/seam/connect/routes/acs-access-groups.d.ts +2 -0
- package/lib/seam/connect/routes/acs-access-groups.js +10 -6
- package/lib/seam/connect/routes/acs-access-groups.js.map +1 -1
- package/lib/seam/connect/routes/acs-credential-pools.d.ts +2 -0
- package/lib/seam/connect/routes/acs-credential-pools.js +5 -1
- package/lib/seam/connect/routes/acs-credential-pools.js.map +1 -1
- package/lib/seam/connect/routes/acs-credential-provisioning-automations.d.ts +2 -0
- package/lib/seam/connect/routes/acs-credential-provisioning-automations.js +5 -1
- package/lib/seam/connect/routes/acs-credential-provisioning-automations.js.map +1 -1
- package/lib/seam/connect/routes/acs-credentials-unmanaged.d.ts +2 -0
- package/lib/seam/connect/routes/acs-credentials-unmanaged.js +6 -2
- package/lib/seam/connect/routes/acs-credentials-unmanaged.js.map +1 -1
- package/lib/seam/connect/routes/acs-credentials.d.ts +2 -0
- package/lib/seam/connect/routes/acs-credentials.js +13 -9
- package/lib/seam/connect/routes/acs-credentials.js.map +1 -1
- package/lib/seam/connect/routes/acs-encoders-simulate.d.ts +2 -0
- package/lib/seam/connect/routes/acs-encoders-simulate.js +8 -4
- package/lib/seam/connect/routes/acs-encoders-simulate.js.map +1 -1
- package/lib/seam/connect/routes/acs-encoders.d.ts +2 -0
- package/lib/seam/connect/routes/acs-encoders.js +7 -3
- package/lib/seam/connect/routes/acs-encoders.js.map +1 -1
- package/lib/seam/connect/routes/acs-entrances.d.ts +2 -0
- package/lib/seam/connect/routes/acs-entrances.js +8 -4
- package/lib/seam/connect/routes/acs-entrances.js.map +1 -1
- package/lib/seam/connect/routes/acs-systems.d.ts +2 -0
- package/lib/seam/connect/routes/acs-systems.js +7 -3
- package/lib/seam/connect/routes/acs-systems.js.map +1 -1
- package/lib/seam/connect/routes/acs-users-unmanaged.d.ts +2 -0
- package/lib/seam/connect/routes/acs-users-unmanaged.js +6 -2
- package/lib/seam/connect/routes/acs-users-unmanaged.js.map +1 -1
- package/lib/seam/connect/routes/acs-users.d.ts +2 -0
- package/lib/seam/connect/routes/acs-users.js +15 -11
- package/lib/seam/connect/routes/acs-users.js.map +1 -1
- package/lib/seam/connect/routes/acs.d.ts +3 -0
- package/lib/seam/connect/routes/acs.js +4 -0
- package/lib/seam/connect/routes/acs.js.map +1 -1
- package/lib/seam/connect/routes/action-attempts.d.ts +2 -0
- package/lib/seam/connect/routes/action-attempts.js +6 -2
- package/lib/seam/connect/routes/action-attempts.js.map +1 -1
- package/lib/seam/connect/routes/bridges.d.ts +2 -0
- package/lib/seam/connect/routes/bridges.js +6 -2
- package/lib/seam/connect/routes/bridges.js.map +1 -1
- package/lib/seam/connect/routes/client-sessions.d.ts +2 -0
- package/lib/seam/connect/routes/client-sessions.js +11 -7
- package/lib/seam/connect/routes/client-sessions.js.map +1 -1
- package/lib/seam/connect/routes/connect-webviews.d.ts +2 -0
- package/lib/seam/connect/routes/connect-webviews.js +8 -4
- package/lib/seam/connect/routes/connect-webviews.js.map +1 -1
- package/lib/seam/connect/routes/connected-accounts.d.ts +2 -0
- package/lib/seam/connect/routes/connected-accounts.js +8 -4
- package/lib/seam/connect/routes/connected-accounts.js.map +1 -1
- package/lib/seam/connect/routes/devices-simulate.d.ts +2 -0
- package/lib/seam/connect/routes/devices-simulate.js +7 -3
- package/lib/seam/connect/routes/devices-simulate.js.map +1 -1
- package/lib/seam/connect/routes/devices-unmanaged.d.ts +2 -0
- package/lib/seam/connect/routes/devices-unmanaged.js +7 -3
- package/lib/seam/connect/routes/devices-unmanaged.js.map +1 -1
- package/lib/seam/connect/routes/devices.d.ts +2 -0
- package/lib/seam/connect/routes/devices.js +9 -5
- package/lib/seam/connect/routes/devices.js.map +1 -1
- package/lib/seam/connect/routes/events.d.ts +2 -0
- package/lib/seam/connect/routes/events.js +6 -2
- package/lib/seam/connect/routes/events.js.map +1 -1
- package/lib/seam/connect/routes/locks.d.ts +2 -0
- package/lib/seam/connect/routes/locks.js +8 -4
- package/lib/seam/connect/routes/locks.js.map +1 -1
- package/lib/seam/connect/routes/networks.d.ts +2 -0
- package/lib/seam/connect/routes/networks.js +6 -2
- package/lib/seam/connect/routes/networks.js.map +1 -1
- package/lib/seam/connect/routes/noise-sensors-noise-thresholds.d.ts +2 -0
- package/lib/seam/connect/routes/noise-sensors-noise-thresholds.js +9 -5
- package/lib/seam/connect/routes/noise-sensors-noise-thresholds.js.map +1 -1
- package/lib/seam/connect/routes/noise-sensors-simulate.d.ts +2 -0
- package/lib/seam/connect/routes/noise-sensors-simulate.js +5 -1
- package/lib/seam/connect/routes/noise-sensors-simulate.js.map +1 -1
- package/lib/seam/connect/routes/noise-sensors.d.ts +2 -0
- package/lib/seam/connect/routes/noise-sensors.js +5 -1
- package/lib/seam/connect/routes/noise-sensors.js.map +1 -1
- package/lib/seam/connect/routes/phones-simulate.d.ts +2 -0
- package/lib/seam/connect/routes/phones-simulate.js +5 -1
- package/lib/seam/connect/routes/phones-simulate.js.map +1 -1
- package/lib/seam/connect/routes/phones.d.ts +6 -0
- package/lib/seam/connect/routes/phones.js +14 -2
- package/lib/seam/connect/routes/phones.js.map +1 -1
- package/lib/seam/connect/routes/thermostats-schedules.d.ts +2 -0
- package/lib/seam/connect/routes/thermostats-schedules.js +9 -5
- package/lib/seam/connect/routes/thermostats-schedules.js.map +1 -1
- package/lib/seam/connect/routes/thermostats-simulate.d.ts +2 -0
- package/lib/seam/connect/routes/thermostats-simulate.js +6 -2
- package/lib/seam/connect/routes/thermostats-simulate.js.map +1 -1
- package/lib/seam/connect/routes/thermostats.d.ts +2 -0
- package/lib/seam/connect/routes/thermostats.js +18 -14
- package/lib/seam/connect/routes/thermostats.js.map +1 -1
- package/lib/seam/connect/routes/user-identities-enrollment-automations.d.ts +2 -0
- package/lib/seam/connect/routes/user-identities-enrollment-automations.js +8 -4
- package/lib/seam/connect/routes/user-identities-enrollment-automations.js.map +1 -1
- package/lib/seam/connect/routes/user-identities.d.ts +2 -0
- package/lib/seam/connect/routes/user-identities.js +16 -12
- package/lib/seam/connect/routes/user-identities.js.map +1 -1
- package/lib/seam/connect/routes/webhooks.d.ts +2 -0
- package/lib/seam/connect/routes/webhooks.js +9 -5
- package/lib/seam/connect/routes/webhooks.js.map +1 -1
- package/lib/seam/connect/routes/workspaces.d.ts +2 -0
- package/lib/seam/connect/routes/workspaces.js +8 -4
- package/lib/seam/connect/routes/workspaces.js.map +1 -1
- package/lib/seam/connect/seam-http-request.d.ts +6 -3
- package/lib/seam/connect/seam-http-request.js +25 -14
- package/lib/seam/connect/seam-http-request.js.map +1 -1
- package/lib/seam/connect/seam-http.d.ts +3 -0
- package/lib/seam/connect/seam-http.js +4 -0
- package/lib/seam/connect/seam-http.js.map +1 -1
- package/lib/seam/connect/seam-paginator.d.ts +30 -0
- package/lib/seam/connect/seam-paginator.js +103 -0
- package/lib/seam/connect/seam-paginator.js.map +1 -0
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +4 -4
- package/src/lib/seam/connect/index.ts +2 -0
- package/src/lib/seam/connect/routes/access-codes-simulate.ts +8 -1
- package/src/lib/seam/connect/routes/access-codes-unmanaged.ts +12 -5
- package/src/lib/seam/connect/routes/access-codes.ts +16 -9
- package/src/lib/seam/connect/routes/acs-access-groups-unmanaged.ts +9 -2
- package/src/lib/seam/connect/routes/acs-access-groups.ts +13 -6
- package/src/lib/seam/connect/routes/acs-credential-pools.ts +8 -1
- package/src/lib/seam/connect/routes/acs-credential-provisioning-automations.ts +8 -1
- package/src/lib/seam/connect/routes/acs-credentials-unmanaged.ts +9 -2
- package/src/lib/seam/connect/routes/acs-credentials.ts +16 -9
- package/src/lib/seam/connect/routes/acs-encoders-simulate.ts +11 -4
- package/src/lib/seam/connect/routes/acs-encoders.ts +10 -3
- package/src/lib/seam/connect/routes/acs-entrances.ts +11 -4
- package/src/lib/seam/connect/routes/acs-systems.ts +10 -3
- package/src/lib/seam/connect/routes/acs-users-unmanaged.ts +9 -2
- package/src/lib/seam/connect/routes/acs-users.ts +18 -11
- package/src/lib/seam/connect/routes/acs.ts +8 -0
- package/src/lib/seam/connect/routes/action-attempts.ts +9 -2
- package/src/lib/seam/connect/routes/bridges.ts +9 -2
- package/src/lib/seam/connect/routes/client-sessions.ts +14 -7
- package/src/lib/seam/connect/routes/connect-webviews.ts +11 -4
- package/src/lib/seam/connect/routes/connected-accounts.ts +11 -4
- package/src/lib/seam/connect/routes/devices-simulate.ts +10 -3
- package/src/lib/seam/connect/routes/devices-unmanaged.ts +10 -3
- package/src/lib/seam/connect/routes/devices.ts +12 -5
- package/src/lib/seam/connect/routes/events.ts +9 -2
- package/src/lib/seam/connect/routes/locks.ts +11 -4
- package/src/lib/seam/connect/routes/networks.ts +9 -2
- package/src/lib/seam/connect/routes/noise-sensors-noise-thresholds.ts +12 -5
- package/src/lib/seam/connect/routes/noise-sensors-simulate.ts +8 -1
- package/src/lib/seam/connect/routes/noise-sensors.ts +8 -1
- package/src/lib/seam/connect/routes/phones-simulate.ts +8 -1
- package/src/lib/seam/connect/routes/phones.ts +26 -2
- package/src/lib/seam/connect/routes/thermostats-schedules.ts +12 -5
- package/src/lib/seam/connect/routes/thermostats-simulate.ts +9 -2
- package/src/lib/seam/connect/routes/thermostats.ts +21 -14
- package/src/lib/seam/connect/routes/user-identities-enrollment-automations.ts +11 -4
- package/src/lib/seam/connect/routes/user-identities.ts +19 -12
- package/src/lib/seam/connect/routes/webhooks.ts +12 -5
- package/src/lib/seam/connect/routes/workspaces.ts +11 -4
- package/src/lib/seam/connect/seam-http-request.ts +45 -23
- package/src/lib/seam/connect/seam-http.ts +8 -0
- package/src/lib/seam/connect/seam-paginator.ts +155 -0
- package/src/lib/version.ts +1 -1
|
@@ -31,6 +31,7 @@ import {
|
|
|
31
31
|
parseOptions,
|
|
32
32
|
} from 'lib/seam/connect/parse-options.js'
|
|
33
33
|
import { SeamHttpRequest } from 'lib/seam/connect/seam-http-request.js'
|
|
34
|
+
import { SeamPaginator } from 'lib/seam/connect/seam-paginator.js'
|
|
34
35
|
import type { SetNonNullable } from 'lib/types.js'
|
|
35
36
|
|
|
36
37
|
import { SeamHttpClientSessions } from './client-sessions.js'
|
|
@@ -135,6 +136,12 @@ export class SeamHttpNetworks {
|
|
|
135
136
|
return new SeamHttpNetworks(constructorOptions)
|
|
136
137
|
}
|
|
137
138
|
|
|
139
|
+
createPaginator<const TResponse, const TResponseKey extends keyof TResponse>(
|
|
140
|
+
request: SeamHttpRequest<TResponse, TResponseKey>,
|
|
141
|
+
): SeamPaginator<TResponse, TResponseKey> {
|
|
142
|
+
return new SeamPaginator<TResponse, TResponseKey>(this, request)
|
|
143
|
+
}
|
|
144
|
+
|
|
138
145
|
async updateClientSessionToken(
|
|
139
146
|
clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'],
|
|
140
147
|
): Promise<void> {
|
|
@@ -158,7 +165,7 @@ export class SeamHttpNetworks {
|
|
|
158
165
|
body?: NetworksGetParams,
|
|
159
166
|
): SeamHttpRequest<NetworksGetResponse, 'network'> {
|
|
160
167
|
return new SeamHttpRequest(this, {
|
|
161
|
-
|
|
168
|
+
pathname: '/networks/get',
|
|
162
169
|
method: 'post',
|
|
163
170
|
body,
|
|
164
171
|
responseKey: 'network',
|
|
@@ -169,7 +176,7 @@ export class SeamHttpNetworks {
|
|
|
169
176
|
body?: NetworksListParams,
|
|
170
177
|
): SeamHttpRequest<NetworksListResponse, 'networks'> {
|
|
171
178
|
return new SeamHttpRequest(this, {
|
|
172
|
-
|
|
179
|
+
pathname: '/networks/list',
|
|
173
180
|
method: 'post',
|
|
174
181
|
body,
|
|
175
182
|
responseKey: 'networks',
|
|
@@ -31,6 +31,7 @@ import {
|
|
|
31
31
|
parseOptions,
|
|
32
32
|
} from 'lib/seam/connect/parse-options.js'
|
|
33
33
|
import { SeamHttpRequest } from 'lib/seam/connect/seam-http-request.js'
|
|
34
|
+
import { SeamPaginator } from 'lib/seam/connect/seam-paginator.js'
|
|
34
35
|
import type { SetNonNullable } from 'lib/types.js'
|
|
35
36
|
|
|
36
37
|
import { SeamHttpClientSessions } from './client-sessions.js'
|
|
@@ -138,6 +139,12 @@ export class SeamHttpNoiseSensorsNoiseThresholds {
|
|
|
138
139
|
return new SeamHttpNoiseSensorsNoiseThresholds(constructorOptions)
|
|
139
140
|
}
|
|
140
141
|
|
|
142
|
+
createPaginator<const TResponse, const TResponseKey extends keyof TResponse>(
|
|
143
|
+
request: SeamHttpRequest<TResponse, TResponseKey>,
|
|
144
|
+
): SeamPaginator<TResponse, TResponseKey> {
|
|
145
|
+
return new SeamPaginator<TResponse, TResponseKey>(this, request)
|
|
146
|
+
}
|
|
147
|
+
|
|
141
148
|
async updateClientSessionToken(
|
|
142
149
|
clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'],
|
|
143
150
|
): Promise<void> {
|
|
@@ -164,7 +171,7 @@ export class SeamHttpNoiseSensorsNoiseThresholds {
|
|
|
164
171
|
'noise_threshold'
|
|
165
172
|
> {
|
|
166
173
|
return new SeamHttpRequest(this, {
|
|
167
|
-
|
|
174
|
+
pathname: '/noise_sensors/noise_thresholds/create',
|
|
168
175
|
method: 'post',
|
|
169
176
|
body,
|
|
170
177
|
responseKey: 'noise_threshold',
|
|
@@ -175,7 +182,7 @@ export class SeamHttpNoiseSensorsNoiseThresholds {
|
|
|
175
182
|
body?: NoiseSensorsNoiseThresholdsDeleteParams,
|
|
176
183
|
): SeamHttpRequest<void, undefined> {
|
|
177
184
|
return new SeamHttpRequest(this, {
|
|
178
|
-
|
|
185
|
+
pathname: '/noise_sensors/noise_thresholds/delete',
|
|
179
186
|
method: 'post',
|
|
180
187
|
body,
|
|
181
188
|
responseKey: undefined,
|
|
@@ -189,7 +196,7 @@ export class SeamHttpNoiseSensorsNoiseThresholds {
|
|
|
189
196
|
'noise_threshold'
|
|
190
197
|
> {
|
|
191
198
|
return new SeamHttpRequest(this, {
|
|
192
|
-
|
|
199
|
+
pathname: '/noise_sensors/noise_thresholds/get',
|
|
193
200
|
method: 'post',
|
|
194
201
|
body,
|
|
195
202
|
responseKey: 'noise_threshold',
|
|
@@ -203,7 +210,7 @@ export class SeamHttpNoiseSensorsNoiseThresholds {
|
|
|
203
210
|
'noise_thresholds'
|
|
204
211
|
> {
|
|
205
212
|
return new SeamHttpRequest(this, {
|
|
206
|
-
|
|
213
|
+
pathname: '/noise_sensors/noise_thresholds/list',
|
|
207
214
|
method: 'post',
|
|
208
215
|
body,
|
|
209
216
|
responseKey: 'noise_thresholds',
|
|
@@ -214,7 +221,7 @@ export class SeamHttpNoiseSensorsNoiseThresholds {
|
|
|
214
221
|
body?: NoiseSensorsNoiseThresholdsUpdateBody,
|
|
215
222
|
): SeamHttpRequest<void, undefined> {
|
|
216
223
|
return new SeamHttpRequest(this, {
|
|
217
|
-
|
|
224
|
+
pathname: '/noise_sensors/noise_thresholds/update',
|
|
218
225
|
method: 'post',
|
|
219
226
|
body,
|
|
220
227
|
responseKey: undefined,
|
|
@@ -31,6 +31,7 @@ import {
|
|
|
31
31
|
parseOptions,
|
|
32
32
|
} from 'lib/seam/connect/parse-options.js'
|
|
33
33
|
import { SeamHttpRequest } from 'lib/seam/connect/seam-http-request.js'
|
|
34
|
+
import { SeamPaginator } from 'lib/seam/connect/seam-paginator.js'
|
|
34
35
|
import type { SetNonNullable } from 'lib/types.js'
|
|
35
36
|
|
|
36
37
|
import { SeamHttpClientSessions } from './client-sessions.js'
|
|
@@ -135,6 +136,12 @@ export class SeamHttpNoiseSensorsSimulate {
|
|
|
135
136
|
return new SeamHttpNoiseSensorsSimulate(constructorOptions)
|
|
136
137
|
}
|
|
137
138
|
|
|
139
|
+
createPaginator<const TResponse, const TResponseKey extends keyof TResponse>(
|
|
140
|
+
request: SeamHttpRequest<TResponse, TResponseKey>,
|
|
141
|
+
): SeamPaginator<TResponse, TResponseKey> {
|
|
142
|
+
return new SeamPaginator<TResponse, TResponseKey>(this, request)
|
|
143
|
+
}
|
|
144
|
+
|
|
138
145
|
async updateClientSessionToken(
|
|
139
146
|
clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'],
|
|
140
147
|
): Promise<void> {
|
|
@@ -158,7 +165,7 @@ export class SeamHttpNoiseSensorsSimulate {
|
|
|
158
165
|
body?: NoiseSensorsSimulateTriggerNoiseThresholdBody,
|
|
159
166
|
): SeamHttpRequest<void, undefined> {
|
|
160
167
|
return new SeamHttpRequest(this, {
|
|
161
|
-
|
|
168
|
+
pathname: '/noise_sensors/simulate/trigger_noise_threshold',
|
|
162
169
|
method: 'post',
|
|
163
170
|
body,
|
|
164
171
|
responseKey: undefined,
|
|
@@ -31,6 +31,7 @@ import {
|
|
|
31
31
|
parseOptions,
|
|
32
32
|
} from 'lib/seam/connect/parse-options.js'
|
|
33
33
|
import { SeamHttpRequest } from 'lib/seam/connect/seam-http-request.js'
|
|
34
|
+
import { SeamPaginator } from 'lib/seam/connect/seam-paginator.js'
|
|
34
35
|
import type { SetNonNullable } from 'lib/types.js'
|
|
35
36
|
|
|
36
37
|
import { SeamHttpClientSessions } from './client-sessions.js'
|
|
@@ -137,6 +138,12 @@ export class SeamHttpNoiseSensors {
|
|
|
137
138
|
return new SeamHttpNoiseSensors(constructorOptions)
|
|
138
139
|
}
|
|
139
140
|
|
|
141
|
+
createPaginator<const TResponse, const TResponseKey extends keyof TResponse>(
|
|
142
|
+
request: SeamHttpRequest<TResponse, TResponseKey>,
|
|
143
|
+
): SeamPaginator<TResponse, TResponseKey> {
|
|
144
|
+
return new SeamPaginator<TResponse, TResponseKey>(this, request)
|
|
145
|
+
}
|
|
146
|
+
|
|
140
147
|
async updateClientSessionToken(
|
|
141
148
|
clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'],
|
|
142
149
|
): Promise<void> {
|
|
@@ -171,7 +178,7 @@ export class SeamHttpNoiseSensors {
|
|
|
171
178
|
body?: NoiseSensorsListParams,
|
|
172
179
|
): SeamHttpRequest<NoiseSensorsListResponse, 'devices'> {
|
|
173
180
|
return new SeamHttpRequest(this, {
|
|
174
|
-
|
|
181
|
+
pathname: '/noise_sensors/list',
|
|
175
182
|
method: 'post',
|
|
176
183
|
body,
|
|
177
184
|
responseKey: 'devices',
|
|
@@ -31,6 +31,7 @@ import {
|
|
|
31
31
|
parseOptions,
|
|
32
32
|
} from 'lib/seam/connect/parse-options.js'
|
|
33
33
|
import { SeamHttpRequest } from 'lib/seam/connect/seam-http-request.js'
|
|
34
|
+
import { SeamPaginator } from 'lib/seam/connect/seam-paginator.js'
|
|
34
35
|
import type { SetNonNullable } from 'lib/types.js'
|
|
35
36
|
|
|
36
37
|
import { SeamHttpClientSessions } from './client-sessions.js'
|
|
@@ -135,6 +136,12 @@ export class SeamHttpPhonesSimulate {
|
|
|
135
136
|
return new SeamHttpPhonesSimulate(constructorOptions)
|
|
136
137
|
}
|
|
137
138
|
|
|
139
|
+
createPaginator<const TResponse, const TResponseKey extends keyof TResponse>(
|
|
140
|
+
request: SeamHttpRequest<TResponse, TResponseKey>,
|
|
141
|
+
): SeamPaginator<TResponse, TResponseKey> {
|
|
142
|
+
return new SeamPaginator<TResponse, TResponseKey>(this, request)
|
|
143
|
+
}
|
|
144
|
+
|
|
138
145
|
async updateClientSessionToken(
|
|
139
146
|
clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'],
|
|
140
147
|
): Promise<void> {
|
|
@@ -158,7 +165,7 @@ export class SeamHttpPhonesSimulate {
|
|
|
158
165
|
body?: PhonesSimulateCreateSandboxPhoneBody,
|
|
159
166
|
): SeamHttpRequest<PhonesSimulateCreateSandboxPhoneResponse, 'phone'> {
|
|
160
167
|
return new SeamHttpRequest(this, {
|
|
161
|
-
|
|
168
|
+
pathname: '/phones/simulate/create_sandbox_phone',
|
|
162
169
|
method: 'post',
|
|
163
170
|
body,
|
|
164
171
|
responseKey: 'phone',
|
|
@@ -31,6 +31,7 @@ import {
|
|
|
31
31
|
parseOptions,
|
|
32
32
|
} from 'lib/seam/connect/parse-options.js'
|
|
33
33
|
import { SeamHttpRequest } from 'lib/seam/connect/seam-http-request.js'
|
|
34
|
+
import { SeamPaginator } from 'lib/seam/connect/seam-paginator.js'
|
|
34
35
|
import type { SetNonNullable } from 'lib/types.js'
|
|
35
36
|
|
|
36
37
|
import { SeamHttpClientSessions } from './client-sessions.js'
|
|
@@ -136,6 +137,12 @@ export class SeamHttpPhones {
|
|
|
136
137
|
return new SeamHttpPhones(constructorOptions)
|
|
137
138
|
}
|
|
138
139
|
|
|
140
|
+
createPaginator<const TResponse, const TResponseKey extends keyof TResponse>(
|
|
141
|
+
request: SeamHttpRequest<TResponse, TResponseKey>,
|
|
142
|
+
): SeamPaginator<TResponse, TResponseKey> {
|
|
143
|
+
return new SeamPaginator<TResponse, TResponseKey>(this, request)
|
|
144
|
+
}
|
|
145
|
+
|
|
139
146
|
async updateClientSessionToken(
|
|
140
147
|
clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'],
|
|
141
148
|
): Promise<void> {
|
|
@@ -161,16 +168,25 @@ export class SeamHttpPhones {
|
|
|
161
168
|
|
|
162
169
|
deactivate(body?: PhonesDeactivateParams): SeamHttpRequest<void, undefined> {
|
|
163
170
|
return new SeamHttpRequest(this, {
|
|
164
|
-
|
|
171
|
+
pathname: '/phones/deactivate',
|
|
165
172
|
method: 'post',
|
|
166
173
|
body,
|
|
167
174
|
responseKey: undefined,
|
|
168
175
|
})
|
|
169
176
|
}
|
|
170
177
|
|
|
178
|
+
get(body?: PhonesGetParams): SeamHttpRequest<PhonesGetResponse, 'phone'> {
|
|
179
|
+
return new SeamHttpRequest(this, {
|
|
180
|
+
pathname: '/phones/get',
|
|
181
|
+
method: 'post',
|
|
182
|
+
body,
|
|
183
|
+
responseKey: 'phone',
|
|
184
|
+
})
|
|
185
|
+
}
|
|
186
|
+
|
|
171
187
|
list(body?: PhonesListParams): SeamHttpRequest<PhonesListResponse, 'phones'> {
|
|
172
188
|
return new SeamHttpRequest(this, {
|
|
173
|
-
|
|
189
|
+
pathname: '/phones/list',
|
|
174
190
|
method: 'post',
|
|
175
191
|
body,
|
|
176
192
|
responseKey: 'phones',
|
|
@@ -186,6 +202,14 @@ export type PhonesDeactivateResponse = SetNonNullable<
|
|
|
186
202
|
|
|
187
203
|
export type PhonesDeactivateOptions = never
|
|
188
204
|
|
|
205
|
+
export type PhonesGetParams = RouteRequestBody<'/phones/get'>
|
|
206
|
+
|
|
207
|
+
export type PhonesGetResponse = SetNonNullable<
|
|
208
|
+
Required<RouteResponse<'/phones/get'>>
|
|
209
|
+
>
|
|
210
|
+
|
|
211
|
+
export type PhonesGetOptions = never
|
|
212
|
+
|
|
189
213
|
export type PhonesListParams = RouteRequestBody<'/phones/list'>
|
|
190
214
|
|
|
191
215
|
export type PhonesListResponse = SetNonNullable<
|
|
@@ -31,6 +31,7 @@ import {
|
|
|
31
31
|
parseOptions,
|
|
32
32
|
} from 'lib/seam/connect/parse-options.js'
|
|
33
33
|
import { SeamHttpRequest } from 'lib/seam/connect/seam-http-request.js'
|
|
34
|
+
import { SeamPaginator } from 'lib/seam/connect/seam-paginator.js'
|
|
34
35
|
import type { SetNonNullable } from 'lib/types.js'
|
|
35
36
|
|
|
36
37
|
import { SeamHttpClientSessions } from './client-sessions.js'
|
|
@@ -135,6 +136,12 @@ export class SeamHttpThermostatsSchedules {
|
|
|
135
136
|
return new SeamHttpThermostatsSchedules(constructorOptions)
|
|
136
137
|
}
|
|
137
138
|
|
|
139
|
+
createPaginator<const TResponse, const TResponseKey extends keyof TResponse>(
|
|
140
|
+
request: SeamHttpRequest<TResponse, TResponseKey>,
|
|
141
|
+
): SeamPaginator<TResponse, TResponseKey> {
|
|
142
|
+
return new SeamPaginator<TResponse, TResponseKey>(this, request)
|
|
143
|
+
}
|
|
144
|
+
|
|
138
145
|
async updateClientSessionToken(
|
|
139
146
|
clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'],
|
|
140
147
|
): Promise<void> {
|
|
@@ -161,7 +168,7 @@ export class SeamHttpThermostatsSchedules {
|
|
|
161
168
|
'thermostat_schedule'
|
|
162
169
|
> {
|
|
163
170
|
return new SeamHttpRequest(this, {
|
|
164
|
-
|
|
171
|
+
pathname: '/thermostats/schedules/create',
|
|
165
172
|
method: 'post',
|
|
166
173
|
body,
|
|
167
174
|
responseKey: 'thermostat_schedule',
|
|
@@ -172,7 +179,7 @@ export class SeamHttpThermostatsSchedules {
|
|
|
172
179
|
body?: ThermostatsSchedulesDeleteParams,
|
|
173
180
|
): SeamHttpRequest<void, undefined> {
|
|
174
181
|
return new SeamHttpRequest(this, {
|
|
175
|
-
|
|
182
|
+
pathname: '/thermostats/schedules/delete',
|
|
176
183
|
method: 'post',
|
|
177
184
|
body,
|
|
178
185
|
responseKey: undefined,
|
|
@@ -183,7 +190,7 @@ export class SeamHttpThermostatsSchedules {
|
|
|
183
190
|
body?: ThermostatsSchedulesGetParams,
|
|
184
191
|
): SeamHttpRequest<ThermostatsSchedulesGetResponse, 'thermostat_schedule'> {
|
|
185
192
|
return new SeamHttpRequest(this, {
|
|
186
|
-
|
|
193
|
+
pathname: '/thermostats/schedules/get',
|
|
187
194
|
method: 'post',
|
|
188
195
|
body,
|
|
189
196
|
responseKey: 'thermostat_schedule',
|
|
@@ -194,7 +201,7 @@ export class SeamHttpThermostatsSchedules {
|
|
|
194
201
|
body?: ThermostatsSchedulesListParams,
|
|
195
202
|
): SeamHttpRequest<ThermostatsSchedulesListResponse, 'thermostat_schedules'> {
|
|
196
203
|
return new SeamHttpRequest(this, {
|
|
197
|
-
|
|
204
|
+
pathname: '/thermostats/schedules/list',
|
|
198
205
|
method: 'post',
|
|
199
206
|
body,
|
|
200
207
|
responseKey: 'thermostat_schedules',
|
|
@@ -205,7 +212,7 @@ export class SeamHttpThermostatsSchedules {
|
|
|
205
212
|
body?: ThermostatsSchedulesUpdateBody,
|
|
206
213
|
): SeamHttpRequest<void, undefined> {
|
|
207
214
|
return new SeamHttpRequest(this, {
|
|
208
|
-
|
|
215
|
+
pathname: '/thermostats/schedules/update',
|
|
209
216
|
method: 'post',
|
|
210
217
|
body,
|
|
211
218
|
responseKey: undefined,
|
|
@@ -31,6 +31,7 @@ import {
|
|
|
31
31
|
parseOptions,
|
|
32
32
|
} from 'lib/seam/connect/parse-options.js'
|
|
33
33
|
import { SeamHttpRequest } from 'lib/seam/connect/seam-http-request.js'
|
|
34
|
+
import { SeamPaginator } from 'lib/seam/connect/seam-paginator.js'
|
|
34
35
|
import type { SetNonNullable } from 'lib/types.js'
|
|
35
36
|
|
|
36
37
|
import { SeamHttpClientSessions } from './client-sessions.js'
|
|
@@ -135,6 +136,12 @@ export class SeamHttpThermostatsSimulate {
|
|
|
135
136
|
return new SeamHttpThermostatsSimulate(constructorOptions)
|
|
136
137
|
}
|
|
137
138
|
|
|
139
|
+
createPaginator<const TResponse, const TResponseKey extends keyof TResponse>(
|
|
140
|
+
request: SeamHttpRequest<TResponse, TResponseKey>,
|
|
141
|
+
): SeamPaginator<TResponse, TResponseKey> {
|
|
142
|
+
return new SeamPaginator<TResponse, TResponseKey>(this, request)
|
|
143
|
+
}
|
|
144
|
+
|
|
138
145
|
async updateClientSessionToken(
|
|
139
146
|
clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'],
|
|
140
147
|
): Promise<void> {
|
|
@@ -158,7 +165,7 @@ export class SeamHttpThermostatsSimulate {
|
|
|
158
165
|
body?: ThermostatsSimulateHvacModeAdjustedBody,
|
|
159
166
|
): SeamHttpRequest<void, undefined> {
|
|
160
167
|
return new SeamHttpRequest(this, {
|
|
161
|
-
|
|
168
|
+
pathname: '/thermostats/simulate/hvac_mode_adjusted',
|
|
162
169
|
method: 'post',
|
|
163
170
|
body,
|
|
164
171
|
responseKey: undefined,
|
|
@@ -169,7 +176,7 @@ export class SeamHttpThermostatsSimulate {
|
|
|
169
176
|
body?: ThermostatsSimulateTemperatureReachedBody,
|
|
170
177
|
): SeamHttpRequest<void, undefined> {
|
|
171
178
|
return new SeamHttpRequest(this, {
|
|
172
|
-
|
|
179
|
+
pathname: '/thermostats/simulate/temperature_reached',
|
|
173
180
|
method: 'post',
|
|
174
181
|
body,
|
|
175
182
|
responseKey: undefined,
|
|
@@ -31,6 +31,7 @@ import {
|
|
|
31
31
|
parseOptions,
|
|
32
32
|
} from 'lib/seam/connect/parse-options.js'
|
|
33
33
|
import { SeamHttpRequest } from 'lib/seam/connect/seam-http-request.js'
|
|
34
|
+
import { SeamPaginator } from 'lib/seam/connect/seam-paginator.js'
|
|
34
35
|
import type { SetNonNullable } from 'lib/types.js'
|
|
35
36
|
|
|
36
37
|
import { SeamHttpClientSessions } from './client-sessions.js'
|
|
@@ -137,6 +138,12 @@ export class SeamHttpThermostats {
|
|
|
137
138
|
return new SeamHttpThermostats(constructorOptions)
|
|
138
139
|
}
|
|
139
140
|
|
|
141
|
+
createPaginator<const TResponse, const TResponseKey extends keyof TResponse>(
|
|
142
|
+
request: SeamHttpRequest<TResponse, TResponseKey>,
|
|
143
|
+
): SeamPaginator<TResponse, TResponseKey> {
|
|
144
|
+
return new SeamPaginator<TResponse, TResponseKey>(this, request)
|
|
145
|
+
}
|
|
146
|
+
|
|
140
147
|
async updateClientSessionToken(
|
|
141
148
|
clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'],
|
|
142
149
|
): Promise<void> {
|
|
@@ -172,7 +179,7 @@ export class SeamHttpThermostats {
|
|
|
172
179
|
'action_attempt'
|
|
173
180
|
> {
|
|
174
181
|
return new SeamHttpRequest(this, {
|
|
175
|
-
|
|
182
|
+
pathname: '/thermostats/activate_climate_preset',
|
|
176
183
|
method: 'post',
|
|
177
184
|
body,
|
|
178
185
|
responseKey: 'action_attempt',
|
|
@@ -185,7 +192,7 @@ export class SeamHttpThermostats {
|
|
|
185
192
|
options: Pick<SeamHttpRequestOptions, 'waitForActionAttempt'> = {},
|
|
186
193
|
): SeamHttpRequest<ThermostatsCoolResponse, 'action_attempt'> {
|
|
187
194
|
return new SeamHttpRequest(this, {
|
|
188
|
-
|
|
195
|
+
pathname: '/thermostats/cool',
|
|
189
196
|
method: 'post',
|
|
190
197
|
body,
|
|
191
198
|
responseKey: 'action_attempt',
|
|
@@ -197,7 +204,7 @@ export class SeamHttpThermostats {
|
|
|
197
204
|
body?: ThermostatsCreateClimatePresetBody,
|
|
198
205
|
): SeamHttpRequest<void, undefined> {
|
|
199
206
|
return new SeamHttpRequest(this, {
|
|
200
|
-
|
|
207
|
+
pathname: '/thermostats/create_climate_preset',
|
|
201
208
|
method: 'post',
|
|
202
209
|
body,
|
|
203
210
|
responseKey: undefined,
|
|
@@ -208,7 +215,7 @@ export class SeamHttpThermostats {
|
|
|
208
215
|
body?: ThermostatsDeleteClimatePresetBody,
|
|
209
216
|
): SeamHttpRequest<void, undefined> {
|
|
210
217
|
return new SeamHttpRequest(this, {
|
|
211
|
-
|
|
218
|
+
pathname: '/thermostats/delete_climate_preset',
|
|
212
219
|
method: 'post',
|
|
213
220
|
body,
|
|
214
221
|
responseKey: undefined,
|
|
@@ -219,7 +226,7 @@ export class SeamHttpThermostats {
|
|
|
219
226
|
body?: ThermostatsGetParams,
|
|
220
227
|
): SeamHttpRequest<ThermostatsGetResponse, 'thermostat'> {
|
|
221
228
|
return new SeamHttpRequest(this, {
|
|
222
|
-
|
|
229
|
+
pathname: '/thermostats/get',
|
|
223
230
|
method: 'post',
|
|
224
231
|
body,
|
|
225
232
|
responseKey: 'thermostat',
|
|
@@ -231,7 +238,7 @@ export class SeamHttpThermostats {
|
|
|
231
238
|
options: Pick<SeamHttpRequestOptions, 'waitForActionAttempt'> = {},
|
|
232
239
|
): SeamHttpRequest<ThermostatsHeatResponse, 'action_attempt'> {
|
|
233
240
|
return new SeamHttpRequest(this, {
|
|
234
|
-
|
|
241
|
+
pathname: '/thermostats/heat',
|
|
235
242
|
method: 'post',
|
|
236
243
|
body,
|
|
237
244
|
responseKey: 'action_attempt',
|
|
@@ -244,7 +251,7 @@ export class SeamHttpThermostats {
|
|
|
244
251
|
options: Pick<SeamHttpRequestOptions, 'waitForActionAttempt'> = {},
|
|
245
252
|
): SeamHttpRequest<ThermostatsHeatCoolResponse, 'action_attempt'> {
|
|
246
253
|
return new SeamHttpRequest(this, {
|
|
247
|
-
|
|
254
|
+
pathname: '/thermostats/heat_cool',
|
|
248
255
|
method: 'post',
|
|
249
256
|
body,
|
|
250
257
|
responseKey: 'action_attempt',
|
|
@@ -256,7 +263,7 @@ export class SeamHttpThermostats {
|
|
|
256
263
|
body?: ThermostatsListParams,
|
|
257
264
|
): SeamHttpRequest<ThermostatsListResponse, 'devices'> {
|
|
258
265
|
return new SeamHttpRequest(this, {
|
|
259
|
-
|
|
266
|
+
pathname: '/thermostats/list',
|
|
260
267
|
method: 'post',
|
|
261
268
|
body,
|
|
262
269
|
responseKey: 'devices',
|
|
@@ -268,7 +275,7 @@ export class SeamHttpThermostats {
|
|
|
268
275
|
options: Pick<SeamHttpRequestOptions, 'waitForActionAttempt'> = {},
|
|
269
276
|
): SeamHttpRequest<ThermostatsOffResponse, 'action_attempt'> {
|
|
270
277
|
return new SeamHttpRequest(this, {
|
|
271
|
-
|
|
278
|
+
pathname: '/thermostats/off',
|
|
272
279
|
method: 'post',
|
|
273
280
|
body,
|
|
274
281
|
responseKey: 'action_attempt',
|
|
@@ -280,7 +287,7 @@ export class SeamHttpThermostats {
|
|
|
280
287
|
body?: ThermostatsSetFallbackClimatePresetBody,
|
|
281
288
|
): SeamHttpRequest<void, undefined> {
|
|
282
289
|
return new SeamHttpRequest(this, {
|
|
283
|
-
|
|
290
|
+
pathname: '/thermostats/set_fallback_climate_preset',
|
|
284
291
|
method: 'post',
|
|
285
292
|
body,
|
|
286
293
|
responseKey: undefined,
|
|
@@ -292,7 +299,7 @@ export class SeamHttpThermostats {
|
|
|
292
299
|
options: Pick<SeamHttpRequestOptions, 'waitForActionAttempt'> = {},
|
|
293
300
|
): SeamHttpRequest<ThermostatsSetFanModeResponse, 'action_attempt'> {
|
|
294
301
|
return new SeamHttpRequest(this, {
|
|
295
|
-
|
|
302
|
+
pathname: '/thermostats/set_fan_mode',
|
|
296
303
|
method: 'post',
|
|
297
304
|
body,
|
|
298
305
|
responseKey: 'action_attempt',
|
|
@@ -305,7 +312,7 @@ export class SeamHttpThermostats {
|
|
|
305
312
|
options: Pick<SeamHttpRequestOptions, 'waitForActionAttempt'> = {},
|
|
306
313
|
): SeamHttpRequest<ThermostatsSetHvacModeResponse, 'action_attempt'> {
|
|
307
314
|
return new SeamHttpRequest(this, {
|
|
308
|
-
|
|
315
|
+
pathname: '/thermostats/set_hvac_mode',
|
|
309
316
|
method: 'post',
|
|
310
317
|
body,
|
|
311
318
|
responseKey: 'action_attempt',
|
|
@@ -317,7 +324,7 @@ export class SeamHttpThermostats {
|
|
|
317
324
|
body?: ThermostatsSetTemperatureThresholdBody,
|
|
318
325
|
): SeamHttpRequest<void, undefined> {
|
|
319
326
|
return new SeamHttpRequest(this, {
|
|
320
|
-
|
|
327
|
+
pathname: '/thermostats/set_temperature_threshold',
|
|
321
328
|
method: 'post',
|
|
322
329
|
body,
|
|
323
330
|
responseKey: undefined,
|
|
@@ -328,7 +335,7 @@ export class SeamHttpThermostats {
|
|
|
328
335
|
body?: ThermostatsUpdateClimatePresetBody,
|
|
329
336
|
): SeamHttpRequest<void, undefined> {
|
|
330
337
|
return new SeamHttpRequest(this, {
|
|
331
|
-
|
|
338
|
+
pathname: '/thermostats/update_climate_preset',
|
|
332
339
|
method: 'post',
|
|
333
340
|
body,
|
|
334
341
|
responseKey: undefined,
|
|
@@ -31,6 +31,7 @@ import {
|
|
|
31
31
|
parseOptions,
|
|
32
32
|
} from 'lib/seam/connect/parse-options.js'
|
|
33
33
|
import { SeamHttpRequest } from 'lib/seam/connect/seam-http-request.js'
|
|
34
|
+
import { SeamPaginator } from 'lib/seam/connect/seam-paginator.js'
|
|
34
35
|
import type { SetNonNullable } from 'lib/types.js'
|
|
35
36
|
|
|
36
37
|
import { SeamHttpClientSessions } from './client-sessions.js'
|
|
@@ -138,6 +139,12 @@ export class SeamHttpUserIdentitiesEnrollmentAutomations {
|
|
|
138
139
|
return new SeamHttpUserIdentitiesEnrollmentAutomations(constructorOptions)
|
|
139
140
|
}
|
|
140
141
|
|
|
142
|
+
createPaginator<const TResponse, const TResponseKey extends keyof TResponse>(
|
|
143
|
+
request: SeamHttpRequest<TResponse, TResponseKey>,
|
|
144
|
+
): SeamPaginator<TResponse, TResponseKey> {
|
|
145
|
+
return new SeamPaginator<TResponse, TResponseKey>(this, request)
|
|
146
|
+
}
|
|
147
|
+
|
|
141
148
|
async updateClientSessionToken(
|
|
142
149
|
clientSessionToken: SeamHttpOptionsWithClientSessionToken['clientSessionToken'],
|
|
143
150
|
): Promise<void> {
|
|
@@ -161,7 +168,7 @@ export class SeamHttpUserIdentitiesEnrollmentAutomations {
|
|
|
161
168
|
body?: UserIdentitiesEnrollmentAutomationsDeleteParams,
|
|
162
169
|
): SeamHttpRequest<void, undefined> {
|
|
163
170
|
return new SeamHttpRequest(this, {
|
|
164
|
-
|
|
171
|
+
pathname: '/user_identities/enrollment_automations/delete',
|
|
165
172
|
method: 'post',
|
|
166
173
|
body,
|
|
167
174
|
responseKey: undefined,
|
|
@@ -175,7 +182,7 @@ export class SeamHttpUserIdentitiesEnrollmentAutomations {
|
|
|
175
182
|
'enrollment_automation'
|
|
176
183
|
> {
|
|
177
184
|
return new SeamHttpRequest(this, {
|
|
178
|
-
|
|
185
|
+
pathname: '/user_identities/enrollment_automations/get',
|
|
179
186
|
method: 'post',
|
|
180
187
|
body,
|
|
181
188
|
responseKey: 'enrollment_automation',
|
|
@@ -189,7 +196,7 @@ export class SeamHttpUserIdentitiesEnrollmentAutomations {
|
|
|
189
196
|
'enrollment_automation'
|
|
190
197
|
> {
|
|
191
198
|
return new SeamHttpRequest(this, {
|
|
192
|
-
|
|
199
|
+
pathname: '/user_identities/enrollment_automations/launch',
|
|
193
200
|
method: 'post',
|
|
194
201
|
body,
|
|
195
202
|
responseKey: 'enrollment_automation',
|
|
@@ -203,7 +210,7 @@ export class SeamHttpUserIdentitiesEnrollmentAutomations {
|
|
|
203
210
|
'enrollment_automations'
|
|
204
211
|
> {
|
|
205
212
|
return new SeamHttpRequest(this, {
|
|
206
|
-
|
|
213
|
+
pathname: '/user_identities/enrollment_automations/list',
|
|
207
214
|
method: 'post',
|
|
208
215
|
body,
|
|
209
216
|
responseKey: 'enrollment_automations',
|