@seamapi/http 1.24.0 → 1.25.1
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 +87 -0
- package/dist/connect.cjs +391 -171
- package/dist/connect.cjs.map +1 -1
- package/dist/connect.d.cts +74 -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 +2 -0
- package/lib/seam/connect/routes/phones.js +7 -3
- 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 +3 -3
- 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 +10 -3
- 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'
|
|
@@ -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,7 +168,7 @@ 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,
|
|
@@ -170,7 +177,7 @@ export class SeamHttpPhones {
|
|
|
170
177
|
|
|
171
178
|
get(body?: PhonesGetParams): SeamHttpRequest<PhonesGetResponse, 'phone'> {
|
|
172
179
|
return new SeamHttpRequest(this, {
|
|
173
|
-
|
|
180
|
+
pathname: '/phones/get',
|
|
174
181
|
method: 'post',
|
|
175
182
|
body,
|
|
176
183
|
responseKey: 'phone',
|
|
@@ -179,7 +186,7 @@ export class SeamHttpPhones {
|
|
|
179
186
|
|
|
180
187
|
list(body?: PhonesListParams): SeamHttpRequest<PhonesListResponse, 'phones'> {
|
|
181
188
|
return new SeamHttpRequest(this, {
|
|
182
|
-
|
|
189
|
+
pathname: '/phones/list',
|
|
183
190
|
method: 'post',
|
|
184
191
|
body,
|
|
185
192
|
responseKey: 'phones',
|
|
@@ -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',
|
|
@@ -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 SeamHttpUserIdentities {
|
|
|
136
137
|
return new SeamHttpUserIdentities(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> {
|
|
@@ -166,7 +173,7 @@ export class SeamHttpUserIdentities {
|
|
|
166
173
|
body?: UserIdentitiesAddAcsUserBody,
|
|
167
174
|
): SeamHttpRequest<void, undefined> {
|
|
168
175
|
return new SeamHttpRequest(this, {
|
|
169
|
-
|
|
176
|
+
pathname: '/user_identities/add_acs_user',
|
|
170
177
|
method: 'post',
|
|
171
178
|
body,
|
|
172
179
|
responseKey: undefined,
|
|
@@ -177,7 +184,7 @@ export class SeamHttpUserIdentities {
|
|
|
177
184
|
body?: UserIdentitiesCreateBody,
|
|
178
185
|
): SeamHttpRequest<UserIdentitiesCreateResponse, 'user_identity'> {
|
|
179
186
|
return new SeamHttpRequest(this, {
|
|
180
|
-
|
|
187
|
+
pathname: '/user_identities/create',
|
|
181
188
|
method: 'post',
|
|
182
189
|
body,
|
|
183
190
|
responseKey: 'user_identity',
|
|
@@ -186,7 +193,7 @@ export class SeamHttpUserIdentities {
|
|
|
186
193
|
|
|
187
194
|
delete(body?: UserIdentitiesDeleteParams): SeamHttpRequest<void, undefined> {
|
|
188
195
|
return new SeamHttpRequest(this, {
|
|
189
|
-
|
|
196
|
+
pathname: '/user_identities/delete',
|
|
190
197
|
method: 'post',
|
|
191
198
|
body,
|
|
192
199
|
responseKey: undefined,
|
|
@@ -197,7 +204,7 @@ export class SeamHttpUserIdentities {
|
|
|
197
204
|
body?: UserIdentitiesGetParams,
|
|
198
205
|
): SeamHttpRequest<UserIdentitiesGetResponse, 'user_identity'> {
|
|
199
206
|
return new SeamHttpRequest(this, {
|
|
200
|
-
|
|
207
|
+
pathname: '/user_identities/get',
|
|
201
208
|
method: 'post',
|
|
202
209
|
body,
|
|
203
210
|
responseKey: 'user_identity',
|
|
@@ -208,7 +215,7 @@ export class SeamHttpUserIdentities {
|
|
|
208
215
|
body?: UserIdentitiesGrantAccessToDeviceBody,
|
|
209
216
|
): SeamHttpRequest<void, undefined> {
|
|
210
217
|
return new SeamHttpRequest(this, {
|
|
211
|
-
|
|
218
|
+
pathname: '/user_identities/grant_access_to_device',
|
|
212
219
|
method: 'post',
|
|
213
220
|
body,
|
|
214
221
|
responseKey: undefined,
|
|
@@ -219,7 +226,7 @@ export class SeamHttpUserIdentities {
|
|
|
219
226
|
body?: UserIdentitiesListParams,
|
|
220
227
|
): SeamHttpRequest<UserIdentitiesListResponse, 'user_identities'> {
|
|
221
228
|
return new SeamHttpRequest(this, {
|
|
222
|
-
|
|
229
|
+
pathname: '/user_identities/list',
|
|
223
230
|
method: 'post',
|
|
224
231
|
body,
|
|
225
232
|
responseKey: 'user_identities',
|
|
@@ -230,7 +237,7 @@ export class SeamHttpUserIdentities {
|
|
|
230
237
|
body?: UserIdentitiesListAccessibleDevicesParams,
|
|
231
238
|
): SeamHttpRequest<UserIdentitiesListAccessibleDevicesResponse, 'devices'> {
|
|
232
239
|
return new SeamHttpRequest(this, {
|
|
233
|
-
|
|
240
|
+
pathname: '/user_identities/list_accessible_devices',
|
|
234
241
|
method: 'post',
|
|
235
242
|
body,
|
|
236
243
|
responseKey: 'devices',
|
|
@@ -241,7 +248,7 @@ export class SeamHttpUserIdentities {
|
|
|
241
248
|
body?: UserIdentitiesListAcsSystemsParams,
|
|
242
249
|
): SeamHttpRequest<UserIdentitiesListAcsSystemsResponse, 'acs_systems'> {
|
|
243
250
|
return new SeamHttpRequest(this, {
|
|
244
|
-
|
|
251
|
+
pathname: '/user_identities/list_acs_systems',
|
|
245
252
|
method: 'post',
|
|
246
253
|
body,
|
|
247
254
|
responseKey: 'acs_systems',
|
|
@@ -252,7 +259,7 @@ export class SeamHttpUserIdentities {
|
|
|
252
259
|
body?: UserIdentitiesListAcsUsersParams,
|
|
253
260
|
): SeamHttpRequest<UserIdentitiesListAcsUsersResponse, 'acs_users'> {
|
|
254
261
|
return new SeamHttpRequest(this, {
|
|
255
|
-
|
|
262
|
+
pathname: '/user_identities/list_acs_users',
|
|
256
263
|
method: 'post',
|
|
257
264
|
body,
|
|
258
265
|
responseKey: 'acs_users',
|
|
@@ -263,7 +270,7 @@ export class SeamHttpUserIdentities {
|
|
|
263
270
|
body?: UserIdentitiesRemoveAcsUserParams,
|
|
264
271
|
): SeamHttpRequest<void, undefined> {
|
|
265
272
|
return new SeamHttpRequest(this, {
|
|
266
|
-
|
|
273
|
+
pathname: '/user_identities/remove_acs_user',
|
|
267
274
|
method: 'post',
|
|
268
275
|
body,
|
|
269
276
|
responseKey: undefined,
|
|
@@ -274,7 +281,7 @@ export class SeamHttpUserIdentities {
|
|
|
274
281
|
body?: UserIdentitiesRevokeAccessToDeviceParams,
|
|
275
282
|
): SeamHttpRequest<void, undefined> {
|
|
276
283
|
return new SeamHttpRequest(this, {
|
|
277
|
-
|
|
284
|
+
pathname: '/user_identities/revoke_access_to_device',
|
|
278
285
|
method: 'post',
|
|
279
286
|
body,
|
|
280
287
|
responseKey: undefined,
|
|
@@ -283,7 +290,7 @@ export class SeamHttpUserIdentities {
|
|
|
283
290
|
|
|
284
291
|
update(body?: UserIdentitiesUpdateBody): SeamHttpRequest<void, undefined> {
|
|
285
292
|
return new SeamHttpRequest(this, {
|
|
286
|
-
|
|
293
|
+
pathname: '/user_identities/update',
|
|
287
294
|
method: 'post',
|
|
288
295
|
body,
|
|
289
296
|
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 SeamHttpWebhooks {
|
|
|
135
136
|
return new SeamHttpWebhooks(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 SeamHttpWebhooks {
|
|
|
158
165
|
body?: WebhooksCreateBody,
|
|
159
166
|
): SeamHttpRequest<WebhooksCreateResponse, 'webhook'> {
|
|
160
167
|
return new SeamHttpRequest(this, {
|
|
161
|
-
|
|
168
|
+
pathname: '/webhooks/create',
|
|
162
169
|
method: 'post',
|
|
163
170
|
body,
|
|
164
171
|
responseKey: 'webhook',
|
|
@@ -167,7 +174,7 @@ export class SeamHttpWebhooks {
|
|
|
167
174
|
|
|
168
175
|
delete(body?: WebhooksDeleteParams): SeamHttpRequest<void, undefined> {
|
|
169
176
|
return new SeamHttpRequest(this, {
|
|
170
|
-
|
|
177
|
+
pathname: '/webhooks/delete',
|
|
171
178
|
method: 'post',
|
|
172
179
|
body,
|
|
173
180
|
responseKey: undefined,
|
|
@@ -178,7 +185,7 @@ export class SeamHttpWebhooks {
|
|
|
178
185
|
body?: WebhooksGetParams,
|
|
179
186
|
): SeamHttpRequest<WebhooksGetResponse, 'webhook'> {
|
|
180
187
|
return new SeamHttpRequest(this, {
|
|
181
|
-
|
|
188
|
+
pathname: '/webhooks/get',
|
|
182
189
|
method: 'post',
|
|
183
190
|
body,
|
|
184
191
|
responseKey: 'webhook',
|
|
@@ -189,7 +196,7 @@ export class SeamHttpWebhooks {
|
|
|
189
196
|
body?: WebhooksListParams,
|
|
190
197
|
): SeamHttpRequest<WebhooksListResponse, 'webhooks'> {
|
|
191
198
|
return new SeamHttpRequest(this, {
|
|
192
|
-
|
|
199
|
+
pathname: '/webhooks/list',
|
|
193
200
|
method: 'post',
|
|
194
201
|
body,
|
|
195
202
|
responseKey: 'webhooks',
|
|
@@ -198,7 +205,7 @@ export class SeamHttpWebhooks {
|
|
|
198
205
|
|
|
199
206
|
update(body?: WebhooksUpdateBody): SeamHttpRequest<void, undefined> {
|
|
200
207
|
return new SeamHttpRequest(this, {
|
|
201
|
-
|
|
208
|
+
pathname: '/webhooks/update',
|
|
202
209
|
method: 'post',
|
|
203
210
|
body,
|
|
204
211
|
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 SeamHttpWorkspaces {
|
|
|
135
136
|
return new SeamHttpWorkspaces(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 SeamHttpWorkspaces {
|
|
|
158
165
|
body?: WorkspacesCreateBody,
|
|
159
166
|
): SeamHttpRequest<WorkspacesCreateResponse, 'workspace'> {
|
|
160
167
|
return new SeamHttpRequest(this, {
|
|
161
|
-
|
|
168
|
+
pathname: '/workspaces/create',
|
|
162
169
|
method: 'post',
|
|
163
170
|
body,
|
|
164
171
|
responseKey: 'workspace',
|
|
@@ -169,7 +176,7 @@ export class SeamHttpWorkspaces {
|
|
|
169
176
|
body?: WorkspacesGetParams,
|
|
170
177
|
): SeamHttpRequest<WorkspacesGetResponse, 'workspace'> {
|
|
171
178
|
return new SeamHttpRequest(this, {
|
|
172
|
-
|
|
179
|
+
pathname: '/workspaces/get',
|
|
173
180
|
method: 'post',
|
|
174
181
|
body,
|
|
175
182
|
responseKey: 'workspace',
|
|
@@ -180,7 +187,7 @@ export class SeamHttpWorkspaces {
|
|
|
180
187
|
body?: WorkspacesListParams,
|
|
181
188
|
): SeamHttpRequest<WorkspacesListResponse, 'workspaces'> {
|
|
182
189
|
return new SeamHttpRequest(this, {
|
|
183
|
-
|
|
190
|
+
pathname: '/workspaces/list',
|
|
184
191
|
method: 'post',
|
|
185
192
|
body,
|
|
186
193
|
responseKey: 'workspaces',
|
|
@@ -192,7 +199,7 @@ export class SeamHttpWorkspaces {
|
|
|
192
199
|
options: Pick<SeamHttpRequestOptions, 'waitForActionAttempt'> = {},
|
|
193
200
|
): SeamHttpRequest<WorkspacesResetSandboxResponse, 'action_attempt'> {
|
|
194
201
|
return new SeamHttpRequest(this, {
|
|
195
|
-
|
|
202
|
+
pathname: '/workspaces/reset_sandbox',
|
|
196
203
|
method: 'post',
|
|
197
204
|
body,
|
|
198
205
|
responseKey: 'action_attempt',
|