@seamapi/http 1.0.0-rc.0 → 1.0.0-rc.2
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/LICENSE.txt +1 -1
- package/README.md +40 -34
- package/dist/connect.cjs +49 -67
- package/dist/connect.cjs.map +1 -1
- package/dist/connect.d.cts +1003 -59
- package/lib/seam/connect/parse-options.js +1 -1
- package/lib/seam/connect/parse-options.js.map +1 -1
- package/lib/seam/connect/resolve-action-attempt.d.ts +1273 -5
- package/lib/seam/connect/resolve-action-attempt.js.map +1 -1
- package/lib/seam/connect/routes/access-codes-unmanaged.d.ts +2 -2
- package/lib/seam/connect/routes/access-codes-unmanaged.js.map +1 -1
- package/lib/seam/connect/routes/access-codes.d.ts +2 -2
- package/lib/seam/connect/routes/access-codes.js.map +1 -1
- package/lib/seam/connect/routes/acs-access-groups.d.ts +2 -2
- package/lib/seam/connect/routes/acs-access-groups.js.map +1 -1
- package/lib/seam/connect/routes/acs-credentials.d.ts +6 -2
- package/lib/seam/connect/routes/acs-credentials.js +8 -0
- package/lib/seam/connect/routes/acs-credentials.js.map +1 -1
- package/lib/seam/connect/routes/acs-systems.d.ts +4 -0
- package/lib/seam/connect/routes/acs-systems.js +8 -0
- package/lib/seam/connect/routes/acs-systems.js.map +1 -1
- package/lib/seam/connect/routes/acs-users.d.ts +6 -6
- package/lib/seam/connect/routes/acs-users.js.map +1 -1
- package/lib/seam/connect/routes/client-sessions.d.ts +4 -4
- package/lib/seam/connect/routes/client-sessions.js.map +1 -1
- package/lib/seam/connect/routes/connect-webviews.d.ts +2 -2
- package/lib/seam/connect/routes/connect-webviews.js.map +1 -1
- package/lib/seam/connect/routes/connected-accounts.d.ts +2 -2
- package/lib/seam/connect/routes/connected-accounts.js.map +1 -1
- package/lib/seam/connect/routes/devices-simulate.d.ts +2 -2
- package/lib/seam/connect/routes/devices-simulate.js.map +1 -1
- package/lib/seam/connect/routes/devices.d.ts +2 -2
- package/lib/seam/connect/routes/devices.js.map +1 -1
- package/lib/seam/connect/routes/noise-sensors-noise-thresholds.d.ts +2 -2
- package/lib/seam/connect/routes/noise-sensors-noise-thresholds.js.map +1 -1
- package/lib/seam/connect/routes/phones.d.ts +2 -2
- package/lib/seam/connect/routes/phones.js.map +1 -1
- package/lib/seam/connect/routes/thermostats-climate-setting-schedules.d.ts +2 -2
- package/lib/seam/connect/routes/thermostats-climate-setting-schedules.js.map +1 -1
- package/lib/seam/connect/routes/user-identities-enrollment-automations.d.ts +2 -2
- package/lib/seam/connect/routes/user-identities-enrollment-automations.js.map +1 -1
- package/lib/seam/connect/routes/user-identities.d.ts +6 -6
- package/lib/seam/connect/routes/user-identities.js.map +1 -1
- package/lib/seam/connect/routes/webhooks.d.ts +2 -2
- package/lib/seam/connect/routes/webhooks.js.map +1 -1
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +6 -6
- package/src/lib/seam/connect/parse-options.ts +1 -1
- package/src/lib/seam/connect/resolve-action-attempt.ts +16 -9
- package/src/lib/seam/connect/routes/access-codes-unmanaged.ts +2 -2
- package/src/lib/seam/connect/routes/access-codes.ts +2 -2
- package/src/lib/seam/connect/routes/acs-access-groups.ts +2 -2
- package/src/lib/seam/connect/routes/acs-credentials.ts +25 -2
- package/src/lib/seam/connect/routes/acs-systems.ts +26 -0
- package/src/lib/seam/connect/routes/acs-users.ts +6 -6
- package/src/lib/seam/connect/routes/client-sessions.ts +4 -4
- package/src/lib/seam/connect/routes/connect-webviews.ts +2 -2
- package/src/lib/seam/connect/routes/connected-accounts.ts +4 -2
- package/src/lib/seam/connect/routes/devices-simulate.ts +2 -2
- package/src/lib/seam/connect/routes/devices.ts +2 -2
- package/src/lib/seam/connect/routes/noise-sensors-noise-thresholds.ts +2 -2
- package/src/lib/seam/connect/routes/phones.ts +2 -2
- package/src/lib/seam/connect/routes/thermostats-climate-setting-schedules.ts +2 -2
- package/src/lib/seam/connect/routes/user-identities-enrollment-automations.ts +2 -2
- package/src/lib/seam/connect/routes/user-identities.ts +6 -6
- package/src/lib/seam/connect/routes/webhooks.ts +2 -2
- package/src/lib/version.ts +1 -1
- package/lib/seam/connect/action-attempt-types.d.ts +0 -17
- package/lib/seam/connect/action-attempt-types.js +0 -3
- package/lib/seam/connect/action-attempt-types.js.map +0 -1
- package/src/lib/seam/connect/action-attempt-types.ts +0 -22
|
@@ -165,7 +165,7 @@ export class SeamHttpConnectWebviews {
|
|
|
165
165
|
})
|
|
166
166
|
}
|
|
167
167
|
|
|
168
|
-
delete(body?:
|
|
168
|
+
delete(body?: ConnectWebviewsDeleteParams): SeamHttpRequest<void, undefined> {
|
|
169
169
|
return new SeamHttpRequest(this, {
|
|
170
170
|
path: '/connect_webviews/delete',
|
|
171
171
|
method: 'post',
|
|
@@ -206,7 +206,7 @@ export type ConnectWebviewsCreateResponse = SetNonNullable<
|
|
|
206
206
|
|
|
207
207
|
export type ConnectWebviewsCreateOptions = never
|
|
208
208
|
|
|
209
|
-
export type
|
|
209
|
+
export type ConnectWebviewsDeleteParams =
|
|
210
210
|
RouteRequestBody<'/connect_webviews/delete'>
|
|
211
211
|
|
|
212
212
|
export type ConnectWebviewsDeleteResponse = SetNonNullable<
|
|
@@ -154,7 +154,9 @@ export class SeamHttpConnectedAccounts {
|
|
|
154
154
|
await clientSessions.get()
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
-
delete(
|
|
157
|
+
delete(
|
|
158
|
+
body?: ConnectedAccountsDeleteParams,
|
|
159
|
+
): SeamHttpRequest<void, undefined> {
|
|
158
160
|
return new SeamHttpRequest(this, {
|
|
159
161
|
path: '/connected_accounts/delete',
|
|
160
162
|
method: 'post',
|
|
@@ -197,7 +199,7 @@ export class SeamHttpConnectedAccounts {
|
|
|
197
199
|
}
|
|
198
200
|
}
|
|
199
201
|
|
|
200
|
-
export type
|
|
202
|
+
export type ConnectedAccountsDeleteParams =
|
|
201
203
|
RouteRequestBody<'/connected_accounts/delete'>
|
|
202
204
|
|
|
203
205
|
export type ConnectedAccountsDeleteResponse = SetNonNullable<
|
|
@@ -154,7 +154,7 @@ export class SeamHttpDevicesSimulate {
|
|
|
154
154
|
await clientSessions.get()
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
-
remove(body?:
|
|
157
|
+
remove(body?: DevicesSimulateRemoveParams): SeamHttpRequest<void, undefined> {
|
|
158
158
|
return new SeamHttpRequest(this, {
|
|
159
159
|
path: '/devices/simulate/remove',
|
|
160
160
|
method: 'post',
|
|
@@ -164,7 +164,7 @@ export class SeamHttpDevicesSimulate {
|
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
166
|
|
|
167
|
-
export type
|
|
167
|
+
export type DevicesSimulateRemoveParams =
|
|
168
168
|
RouteRequestBody<'/devices/simulate/remove'>
|
|
169
169
|
|
|
170
170
|
export type DevicesSimulateRemoveResponse = SetNonNullable<
|
|
@@ -164,7 +164,7 @@ export class SeamHttpDevices {
|
|
|
164
164
|
return SeamHttpDevicesSimulate.fromClient(this.client, this.defaults)
|
|
165
165
|
}
|
|
166
166
|
|
|
167
|
-
delete(body?:
|
|
167
|
+
delete(body?: DevicesDeleteParams): SeamHttpRequest<void, undefined> {
|
|
168
168
|
return new SeamHttpRequest(this, {
|
|
169
169
|
path: '/devices/delete',
|
|
170
170
|
method: 'post',
|
|
@@ -214,7 +214,7 @@ export class SeamHttpDevices {
|
|
|
214
214
|
}
|
|
215
215
|
}
|
|
216
216
|
|
|
217
|
-
export type
|
|
217
|
+
export type DevicesDeleteParams = RouteRequestBody<'/devices/delete'>
|
|
218
218
|
|
|
219
219
|
export type DevicesDeleteResponse = SetNonNullable<
|
|
220
220
|
Required<RouteResponse<'/devices/delete'>>
|
|
@@ -172,7 +172,7 @@ export class SeamHttpNoiseSensorsNoiseThresholds {
|
|
|
172
172
|
}
|
|
173
173
|
|
|
174
174
|
delete(
|
|
175
|
-
body?:
|
|
175
|
+
body?: NoiseSensorsNoiseThresholdsDeleteParams,
|
|
176
176
|
): SeamHttpRequest<void, undefined> {
|
|
177
177
|
return new SeamHttpRequest(this, {
|
|
178
178
|
path: '/noise_sensors/noise_thresholds/delete',
|
|
@@ -231,7 +231,7 @@ export type NoiseSensorsNoiseThresholdsCreateResponse = SetNonNullable<
|
|
|
231
231
|
|
|
232
232
|
export type NoiseSensorsNoiseThresholdsCreateOptions = never
|
|
233
233
|
|
|
234
|
-
export type
|
|
234
|
+
export type NoiseSensorsNoiseThresholdsDeleteParams =
|
|
235
235
|
RouteRequestBody<'/noise_sensors/noise_thresholds/delete'>
|
|
236
236
|
|
|
237
237
|
export type NoiseSensorsNoiseThresholdsDeleteResponse = SetNonNullable<
|
|
@@ -159,7 +159,7 @@ export class SeamHttpPhones {
|
|
|
159
159
|
return SeamHttpPhonesSimulate.fromClient(this.client, this.defaults)
|
|
160
160
|
}
|
|
161
161
|
|
|
162
|
-
deactivate(body?:
|
|
162
|
+
deactivate(body?: PhonesDeactivateParams): SeamHttpRequest<void, undefined> {
|
|
163
163
|
return new SeamHttpRequest(this, {
|
|
164
164
|
path: '/phones/deactivate',
|
|
165
165
|
method: 'post',
|
|
@@ -178,7 +178,7 @@ export class SeamHttpPhones {
|
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
180
|
|
|
181
|
-
export type
|
|
181
|
+
export type PhonesDeactivateParams = RouteRequestBody<'/phones/deactivate'>
|
|
182
182
|
|
|
183
183
|
export type PhonesDeactivateResponse = SetNonNullable<
|
|
184
184
|
Required<RouteResponse<'/phones/deactivate'>>
|
|
@@ -172,7 +172,7 @@ export class SeamHttpThermostatsClimateSettingSchedules {
|
|
|
172
172
|
}
|
|
173
173
|
|
|
174
174
|
delete(
|
|
175
|
-
body?:
|
|
175
|
+
body?: ThermostatsClimateSettingSchedulesDeleteParams,
|
|
176
176
|
): SeamHttpRequest<void, undefined> {
|
|
177
177
|
return new SeamHttpRequest(this, {
|
|
178
178
|
path: '/thermostats/climate_setting_schedules/delete',
|
|
@@ -231,7 +231,7 @@ export type ThermostatsClimateSettingSchedulesCreateResponse = SetNonNullable<
|
|
|
231
231
|
|
|
232
232
|
export type ThermostatsClimateSettingSchedulesCreateOptions = never
|
|
233
233
|
|
|
234
|
-
export type
|
|
234
|
+
export type ThermostatsClimateSettingSchedulesDeleteParams =
|
|
235
235
|
RouteRequestBody<'/thermostats/climate_setting_schedules/delete'>
|
|
236
236
|
|
|
237
237
|
export type ThermostatsClimateSettingSchedulesDeleteResponse = SetNonNullable<
|
|
@@ -158,7 +158,7 @@ export class SeamHttpUserIdentitiesEnrollmentAutomations {
|
|
|
158
158
|
}
|
|
159
159
|
|
|
160
160
|
delete(
|
|
161
|
-
body?:
|
|
161
|
+
body?: UserIdentitiesEnrollmentAutomationsDeleteParams,
|
|
162
162
|
): SeamHttpRequest<void, undefined> {
|
|
163
163
|
return new SeamHttpRequest(this, {
|
|
164
164
|
path: '/user_identities/enrollment_automations/delete',
|
|
@@ -211,7 +211,7 @@ export class SeamHttpUserIdentitiesEnrollmentAutomations {
|
|
|
211
211
|
}
|
|
212
212
|
}
|
|
213
213
|
|
|
214
|
-
export type
|
|
214
|
+
export type UserIdentitiesEnrollmentAutomationsDeleteParams =
|
|
215
215
|
RouteRequestBody<'/user_identities/enrollment_automations/delete'>
|
|
216
216
|
|
|
217
217
|
export type UserIdentitiesEnrollmentAutomationsDeleteResponse = SetNonNullable<
|
|
@@ -184,7 +184,7 @@ export class SeamHttpUserIdentities {
|
|
|
184
184
|
})
|
|
185
185
|
}
|
|
186
186
|
|
|
187
|
-
delete(body?:
|
|
187
|
+
delete(body?: UserIdentitiesDeleteParams): SeamHttpRequest<void, undefined> {
|
|
188
188
|
return new SeamHttpRequest(this, {
|
|
189
189
|
path: '/user_identities/delete',
|
|
190
190
|
method: 'post',
|
|
@@ -260,7 +260,7 @@ export class SeamHttpUserIdentities {
|
|
|
260
260
|
}
|
|
261
261
|
|
|
262
262
|
removeAcsUser(
|
|
263
|
-
body?:
|
|
263
|
+
body?: UserIdentitiesRemoveAcsUserParams,
|
|
264
264
|
): SeamHttpRequest<void, undefined> {
|
|
265
265
|
return new SeamHttpRequest(this, {
|
|
266
266
|
path: '/user_identities/remove_acs_user',
|
|
@@ -271,7 +271,7 @@ export class SeamHttpUserIdentities {
|
|
|
271
271
|
}
|
|
272
272
|
|
|
273
273
|
revokeAccessToDevice(
|
|
274
|
-
body?:
|
|
274
|
+
body?: UserIdentitiesRevokeAccessToDeviceParams,
|
|
275
275
|
): SeamHttpRequest<void, undefined> {
|
|
276
276
|
return new SeamHttpRequest(this, {
|
|
277
277
|
path: '/user_identities/revoke_access_to_device',
|
|
@@ -309,7 +309,7 @@ export type UserIdentitiesCreateResponse = SetNonNullable<
|
|
|
309
309
|
|
|
310
310
|
export type UserIdentitiesCreateOptions = never
|
|
311
311
|
|
|
312
|
-
export type
|
|
312
|
+
export type UserIdentitiesDeleteParams =
|
|
313
313
|
RouteRequestBody<'/user_identities/delete'>
|
|
314
314
|
|
|
315
315
|
export type UserIdentitiesDeleteResponse = SetNonNullable<
|
|
@@ -370,7 +370,7 @@ export type UserIdentitiesListAcsUsersResponse = SetNonNullable<
|
|
|
370
370
|
|
|
371
371
|
export type UserIdentitiesListAcsUsersOptions = never
|
|
372
372
|
|
|
373
|
-
export type
|
|
373
|
+
export type UserIdentitiesRemoveAcsUserParams =
|
|
374
374
|
RouteRequestBody<'/user_identities/remove_acs_user'>
|
|
375
375
|
|
|
376
376
|
export type UserIdentitiesRemoveAcsUserResponse = SetNonNullable<
|
|
@@ -379,7 +379,7 @@ export type UserIdentitiesRemoveAcsUserResponse = SetNonNullable<
|
|
|
379
379
|
|
|
380
380
|
export type UserIdentitiesRemoveAcsUserOptions = never
|
|
381
381
|
|
|
382
|
-
export type
|
|
382
|
+
export type UserIdentitiesRevokeAccessToDeviceParams =
|
|
383
383
|
RouteRequestBody<'/user_identities/revoke_access_to_device'>
|
|
384
384
|
|
|
385
385
|
export type UserIdentitiesRevokeAccessToDeviceResponse = SetNonNullable<
|
|
@@ -165,7 +165,7 @@ export class SeamHttpWebhooks {
|
|
|
165
165
|
})
|
|
166
166
|
}
|
|
167
167
|
|
|
168
|
-
delete(body?:
|
|
168
|
+
delete(body?: WebhooksDeleteParams): SeamHttpRequest<void, undefined> {
|
|
169
169
|
return new SeamHttpRequest(this, {
|
|
170
170
|
path: '/webhooks/delete',
|
|
171
171
|
method: 'post',
|
|
@@ -214,7 +214,7 @@ export type WebhooksCreateResponse = SetNonNullable<
|
|
|
214
214
|
|
|
215
215
|
export type WebhooksCreateOptions = never
|
|
216
216
|
|
|
217
|
-
export type
|
|
217
|
+
export type WebhooksDeleteParams = RouteRequestBody<'/webhooks/delete'>
|
|
218
218
|
|
|
219
219
|
export type WebhooksDeleteResponse = SetNonNullable<
|
|
220
220
|
Required<RouteResponse<'/webhooks/delete'>>
|
package/src/lib/version.ts
CHANGED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export interface ActionAttempt {
|
|
2
|
-
action_attempt_id: string;
|
|
3
|
-
status: 'pending' | 'error' | 'success';
|
|
4
|
-
}
|
|
5
|
-
export type SuccessfulActionAttempt<T extends ActionAttempt> = T & {
|
|
6
|
-
status: 'success';
|
|
7
|
-
};
|
|
8
|
-
export type PendingActionAttempt<T extends ActionAttempt> = T & {
|
|
9
|
-
status: 'pending';
|
|
10
|
-
};
|
|
11
|
-
export type FailedActionAttempt<T extends ActionAttempt> = T & {
|
|
12
|
-
status: 'error';
|
|
13
|
-
error: {
|
|
14
|
-
type: string;
|
|
15
|
-
message: string;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"action-attempt-types.js","sourceRoot":"","sources":["../../../src/lib/seam/connect/action-attempt-types.ts"],"names":[],"mappings":"AAAA,sEAAsE"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
// UPSTREAM: These types should be provided by @seamapi/types/connect.
|
|
2
|
-
|
|
3
|
-
export interface ActionAttempt {
|
|
4
|
-
action_attempt_id: string
|
|
5
|
-
status: 'pending' | 'error' | 'success'
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export type SuccessfulActionAttempt<T extends ActionAttempt> = T & {
|
|
9
|
-
status: 'success'
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export type PendingActionAttempt<T extends ActionAttempt> = T & {
|
|
13
|
-
status: 'pending'
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export type FailedActionAttempt<T extends ActionAttempt> = T & {
|
|
17
|
-
status: 'error'
|
|
18
|
-
error: {
|
|
19
|
-
type: string
|
|
20
|
-
message: string
|
|
21
|
-
}
|
|
22
|
-
}
|