@seamapi/http 0.24.0 → 0.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 +15 -0
- package/dist/connect.cjs +762 -732
- package/dist/connect.cjs.map +1 -1
- package/dist/connect.d.cts +149 -126
- package/lib/seam/connect/routes/access-codes-unmanaged.d.ts +6 -5
- package/lib/seam/connect/routes/access-codes-unmanaged.js +26 -22
- package/lib/seam/connect/routes/access-codes-unmanaged.js.map +1 -1
- package/lib/seam/connect/routes/access-codes.d.ts +9 -8
- package/lib/seam/connect/routes/access-codes.js +41 -38
- package/lib/seam/connect/routes/access-codes.js.map +1 -1
- package/lib/seam/connect/routes/acs-access-groups.d.ts +6 -5
- package/lib/seam/connect/routes/acs-access-groups.js +26 -23
- package/lib/seam/connect/routes/acs-access-groups.js.map +1 -1
- package/lib/seam/connect/routes/acs-credential-pools.d.ts +2 -1
- package/lib/seam/connect/routes/acs-credential-pools.js +6 -5
- package/lib/seam/connect/routes/acs-credential-pools.js.map +1 -1
- package/lib/seam/connect/routes/acs-credential-provisioning-automations.d.ts +2 -1
- package/lib/seam/connect/routes/acs-credential-provisioning-automations.js +6 -5
- package/lib/seam/connect/routes/acs-credential-provisioning-automations.js.map +1 -1
- package/lib/seam/connect/routes/acs-credentials.d.ts +8 -7
- package/lib/seam/connect/routes/acs-credentials.js +36 -34
- package/lib/seam/connect/routes/acs-credentials.js.map +1 -1
- package/lib/seam/connect/routes/acs-entrances.d.ts +5 -4
- package/lib/seam/connect/routes/acs-entrances.js +21 -19
- package/lib/seam/connect/routes/acs-entrances.js.map +1 -1
- package/lib/seam/connect/routes/acs-systems.d.ts +3 -2
- package/lib/seam/connect/routes/acs-systems.js +11 -10
- package/lib/seam/connect/routes/acs-systems.js.map +1 -1
- package/lib/seam/connect/routes/acs-users.d.ts +12 -11
- package/lib/seam/connect/routes/acs-users.js +56 -48
- package/lib/seam/connect/routes/acs-users.js.map +1 -1
- package/lib/seam/connect/routes/action-attempts.d.ts +3 -2
- package/lib/seam/connect/routes/action-attempts.js +12 -18
- package/lib/seam/connect/routes/action-attempts.js.map +1 -1
- package/lib/seam/connect/routes/client-sessions.d.ts +8 -7
- package/lib/seam/connect/routes/client-sessions.js +36 -33
- package/lib/seam/connect/routes/client-sessions.js.map +1 -1
- package/lib/seam/connect/routes/connect-webviews.d.ts +6 -5
- package/lib/seam/connect/routes/connect-webviews.js +25 -22
- package/lib/seam/connect/routes/connect-webviews.js.map +1 -1
- package/lib/seam/connect/routes/connected-accounts.d.ts +5 -4
- package/lib/seam/connect/routes/connected-accounts.js +21 -19
- package/lib/seam/connect/routes/connected-accounts.js.map +1 -1
- package/lib/seam/connect/routes/devices-simulate.d.ts +2 -1
- package/lib/seam/connect/routes/devices-simulate.js +6 -4
- package/lib/seam/connect/routes/devices-simulate.js.map +1 -1
- package/lib/seam/connect/routes/devices-unmanaged.d.ts +4 -3
- package/lib/seam/connect/routes/devices-unmanaged.js +16 -14
- package/lib/seam/connect/routes/devices-unmanaged.js.map +1 -1
- package/lib/seam/connect/routes/devices.d.ts +6 -5
- package/lib/seam/connect/routes/devices.js +26 -23
- package/lib/seam/connect/routes/devices.js.map +1 -1
- package/lib/seam/connect/routes/events.d.ts +3 -2
- package/lib/seam/connect/routes/events.js +11 -10
- package/lib/seam/connect/routes/events.js.map +1 -1
- package/lib/seam/connect/routes/locks.d.ts +5 -4
- package/lib/seam/connect/routes/locks.js +23 -36
- package/lib/seam/connect/routes/locks.js.map +1 -1
- package/lib/seam/connect/routes/networks.d.ts +3 -2
- package/lib/seam/connect/routes/networks.js +11 -10
- package/lib/seam/connect/routes/networks.js.map +1 -1
- package/lib/seam/connect/routes/noise-sensors-noise-thresholds.d.ts +6 -5
- package/lib/seam/connect/routes/noise-sensors-noise-thresholds.js +26 -23
- package/lib/seam/connect/routes/noise-sensors-noise-thresholds.js.map +1 -1
- package/lib/seam/connect/routes/phones-simulate.d.ts +2 -1
- package/lib/seam/connect/routes/phones-simulate.js +6 -5
- package/lib/seam/connect/routes/phones-simulate.js.map +1 -1
- package/lib/seam/connect/routes/phones.d.ts +3 -2
- package/lib/seam/connect/routes/phones.js +11 -9
- package/lib/seam/connect/routes/phones.js.map +1 -1
- package/lib/seam/connect/routes/thermostats-climate-setting-schedules.d.ts +6 -5
- package/lib/seam/connect/routes/thermostats-climate-setting-schedules.js +26 -23
- package/lib/seam/connect/routes/thermostats-climate-setting-schedules.js.map +1 -1
- package/lib/seam/connect/routes/thermostats.d.ts +9 -8
- package/lib/seam/connect/routes/thermostats.js +46 -76
- package/lib/seam/connect/routes/thermostats.js.map +1 -1
- package/lib/seam/connect/routes/user-identities-enrollment-automations.d.ts +5 -4
- package/lib/seam/connect/routes/user-identities-enrollment-automations.js +21 -19
- package/lib/seam/connect/routes/user-identities-enrollment-automations.js.map +1 -1
- package/lib/seam/connect/routes/user-identities.d.ts +13 -12
- package/lib/seam/connect/routes/user-identities.js +61 -54
- package/lib/seam/connect/routes/user-identities.js.map +1 -1
- package/lib/seam/connect/routes/webhooks.d.ts +6 -5
- package/lib/seam/connect/routes/webhooks.js +26 -23
- package/lib/seam/connect/routes/webhooks.js.map +1 -1
- package/lib/seam/connect/routes/workspaces.d.ts +5 -4
- package/lib/seam/connect/routes/workspaces.js +21 -19
- package/lib/seam/connect/routes/workspaces.js.map +1 -1
- package/lib/seam/connect/seam-http-request.d.ts +26 -0
- package/lib/seam/connect/seam-http-request.js +87 -0
- package/lib/seam/connect/seam-http-request.js.map +1 -0
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +2 -2
- package/src/lib/seam/connect/routes/access-codes-unmanaged.ts +37 -34
- package/src/lib/seam/connect/routes/access-codes.ts +56 -60
- package/src/lib/seam/connect/routes/acs-access-groups.ts +33 -32
- package/src/lib/seam/connect/routes/acs-credential-pools.ts +7 -7
- package/src/lib/seam/connect/routes/acs-credential-provisioning-automations.ts +11 -13
- package/src/lib/seam/connect/routes/acs-credentials.ts +42 -46
- package/src/lib/seam/connect/routes/acs-entrances.ts +31 -28
- package/src/lib/seam/connect/routes/acs-systems.ts +13 -14
- package/src/lib/seam/connect/routes/acs-users.ts +66 -61
- package/src/lib/seam/connect/routes/action-attempts.ts +14 -26
- package/src/lib/seam/connect/routes/client-sessions.ts +45 -49
- package/src/lib/seam/connect/routes/connect-webviews.ts +28 -28
- package/src/lib/seam/connect/routes/connected-accounts.ts +26 -29
- package/src/lib/seam/connect/routes/devices-simulate.ts +6 -4
- package/src/lib/seam/connect/routes/devices-unmanaged.ts +18 -18
- package/src/lib/seam/connect/routes/devices.ts +30 -31
- package/src/lib/seam/connect/routes/events.ts +11 -12
- package/src/lib/seam/connect/routes/locks.ts +25 -50
- package/src/lib/seam/connect/routes/networks.ts +14 -13
- package/src/lib/seam/connect/routes/noise-sensors-noise-thresholds.ts +48 -38
- package/src/lib/seam/connect/routes/phones-simulate.ts +9 -10
- package/src/lib/seam/connect/routes/phones.ts +11 -10
- package/src/lib/seam/connect/routes/thermostats-climate-setting-schedules.ts +47 -55
- package/src/lib/seam/connect/routes/thermostats.ts +53 -110
- package/src/lib/seam/connect/routes/user-identities-enrollment-automations.ts +39 -48
- package/src/lib/seam/connect/routes/user-identities.ts +81 -78
- package/src/lib/seam/connect/routes/webhooks.ts +30 -28
- package/src/lib/seam/connect/routes/workspaces.ts +26 -25
- package/src/lib/seam/connect/seam-http-request.ts +144 -0
- package/src/lib/version.ts +1 -1
|
@@ -31,6 +31,7 @@ import {
|
|
|
31
31
|
limitToSeamHttpRequestOptions,
|
|
32
32
|
parseOptions,
|
|
33
33
|
} from 'lib/seam/connect/parse-options.js'
|
|
34
|
+
import { SeamHttpRequest } from 'lib/seam/connect/seam-http-request.js'
|
|
34
35
|
|
|
35
36
|
import { SeamHttpClientSessions } from './client-sessions.js'
|
|
36
37
|
|
|
@@ -156,58 +157,67 @@ export class SeamHttpNoiseSensorsNoiseThresholds {
|
|
|
156
157
|
await clientSessions.get()
|
|
157
158
|
}
|
|
158
159
|
|
|
159
|
-
|
|
160
|
+
create(
|
|
160
161
|
body?: NoiseSensorsNoiseThresholdsCreateBody,
|
|
161
|
-
):
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
162
|
+
): SeamHttpRequest<
|
|
163
|
+
NoiseSensorsNoiseThresholdsCreateResponse,
|
|
164
|
+
'noise_threshold'
|
|
165
|
+
> {
|
|
166
|
+
return new SeamHttpRequest(this, {
|
|
167
|
+
path: '/noise_sensors/noise_thresholds/create',
|
|
168
|
+
method: 'post',
|
|
169
|
+
body,
|
|
170
|
+
responseKey: 'noise_threshold',
|
|
171
|
+
})
|
|
170
172
|
}
|
|
171
173
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
174
|
+
delete(
|
|
175
|
+
body?: NoiseSensorsNoiseThresholdsDeleteBody,
|
|
176
|
+
): SeamHttpRequest<void, undefined> {
|
|
177
|
+
return new SeamHttpRequest(this, {
|
|
178
|
+
path: '/noise_sensors/noise_thresholds/delete',
|
|
175
179
|
method: 'post',
|
|
176
|
-
|
|
180
|
+
body,
|
|
181
|
+
responseKey: undefined,
|
|
177
182
|
})
|
|
178
183
|
}
|
|
179
184
|
|
|
180
|
-
|
|
185
|
+
get(
|
|
181
186
|
body?: NoiseSensorsNoiseThresholdsGetParams,
|
|
182
|
-
):
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
187
|
+
): SeamHttpRequest<
|
|
188
|
+
NoiseSensorsNoiseThresholdsGetResponse,
|
|
189
|
+
'noise_threshold'
|
|
190
|
+
> {
|
|
191
|
+
return new SeamHttpRequest(this, {
|
|
192
|
+
path: '/noise_sensors/noise_thresholds/get',
|
|
193
|
+
method: 'post',
|
|
194
|
+
body,
|
|
195
|
+
responseKey: 'noise_threshold',
|
|
196
|
+
})
|
|
191
197
|
}
|
|
192
198
|
|
|
193
|
-
|
|
199
|
+
list(
|
|
194
200
|
body?: NoiseSensorsNoiseThresholdsListParams,
|
|
195
|
-
):
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
201
|
+
): SeamHttpRequest<
|
|
202
|
+
NoiseSensorsNoiseThresholdsListResponse,
|
|
203
|
+
'noise_thresholds'
|
|
204
|
+
> {
|
|
205
|
+
return new SeamHttpRequest(this, {
|
|
206
|
+
path: '/noise_sensors/noise_thresholds/list',
|
|
207
|
+
method: 'post',
|
|
208
|
+
body,
|
|
209
|
+
responseKey: 'noise_thresholds',
|
|
210
|
+
})
|
|
204
211
|
}
|
|
205
212
|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
213
|
+
update(
|
|
214
|
+
body?: NoiseSensorsNoiseThresholdsUpdateBody,
|
|
215
|
+
): SeamHttpRequest<void, undefined> {
|
|
216
|
+
return new SeamHttpRequest(this, {
|
|
217
|
+
path: '/noise_sensors/noise_thresholds/update',
|
|
209
218
|
method: 'post',
|
|
210
|
-
|
|
219
|
+
body,
|
|
220
|
+
responseKey: undefined,
|
|
211
221
|
})
|
|
212
222
|
}
|
|
213
223
|
}
|
|
@@ -31,6 +31,7 @@ import {
|
|
|
31
31
|
limitToSeamHttpRequestOptions,
|
|
32
32
|
parseOptions,
|
|
33
33
|
} from 'lib/seam/connect/parse-options.js'
|
|
34
|
+
import { SeamHttpRequest } from 'lib/seam/connect/seam-http-request.js'
|
|
34
35
|
|
|
35
36
|
import { SeamHttpClientSessions } from './client-sessions.js'
|
|
36
37
|
|
|
@@ -153,17 +154,15 @@ export class SeamHttpPhonesSimulate {
|
|
|
153
154
|
await clientSessions.get()
|
|
154
155
|
}
|
|
155
156
|
|
|
156
|
-
|
|
157
|
+
createSandboxPhone(
|
|
157
158
|
body?: PhonesSimulateCreateSandboxPhoneBody,
|
|
158
|
-
):
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
return data.phone
|
|
159
|
+
): SeamHttpRequest<PhonesSimulateCreateSandboxPhoneResponse, 'phone'> {
|
|
160
|
+
return new SeamHttpRequest(this, {
|
|
161
|
+
path: '/phones/simulate/create_sandbox_phone',
|
|
162
|
+
method: 'post',
|
|
163
|
+
body,
|
|
164
|
+
responseKey: 'phone',
|
|
165
|
+
})
|
|
167
166
|
}
|
|
168
167
|
}
|
|
169
168
|
|
|
@@ -31,6 +31,7 @@ import {
|
|
|
31
31
|
limitToSeamHttpRequestOptions,
|
|
32
32
|
parseOptions,
|
|
33
33
|
} from 'lib/seam/connect/parse-options.js'
|
|
34
|
+
import { SeamHttpRequest } from 'lib/seam/connect/seam-http-request.js'
|
|
34
35
|
|
|
35
36
|
import { SeamHttpClientSessions } from './client-sessions.js'
|
|
36
37
|
import { SeamHttpPhonesSimulate } from './phones-simulate.js'
|
|
@@ -158,22 +159,22 @@ export class SeamHttpPhones {
|
|
|
158
159
|
return SeamHttpPhonesSimulate.fromClient(this.client, this.defaults)
|
|
159
160
|
}
|
|
160
161
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
162
|
+
deactivate(body?: PhonesDeactivateBody): SeamHttpRequest<void, undefined> {
|
|
163
|
+
return new SeamHttpRequest(this, {
|
|
164
|
+
path: '/phones/deactivate',
|
|
164
165
|
method: 'post',
|
|
165
|
-
|
|
166
|
+
body,
|
|
167
|
+
responseKey: undefined,
|
|
166
168
|
})
|
|
167
169
|
}
|
|
168
170
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
171
|
+
list(body?: PhonesListParams): SeamHttpRequest<PhonesListResponse, 'phones'> {
|
|
172
|
+
return new SeamHttpRequest(this, {
|
|
173
|
+
path: '/phones/list',
|
|
172
174
|
method: 'post',
|
|
173
|
-
|
|
175
|
+
body,
|
|
176
|
+
responseKey: 'phones',
|
|
174
177
|
})
|
|
175
|
-
|
|
176
|
-
return data.phones
|
|
177
178
|
}
|
|
178
179
|
}
|
|
179
180
|
|
|
@@ -31,6 +31,7 @@ import {
|
|
|
31
31
|
limitToSeamHttpRequestOptions,
|
|
32
32
|
parseOptions,
|
|
33
33
|
} from 'lib/seam/connect/parse-options.js'
|
|
34
|
+
import { SeamHttpRequest } from 'lib/seam/connect/seam-http-request.js'
|
|
34
35
|
|
|
35
36
|
import { SeamHttpClientSessions } from './client-sessions.js'
|
|
36
37
|
|
|
@@ -156,77 +157,68 @@ export class SeamHttpThermostatsClimateSettingSchedules {
|
|
|
156
157
|
await clientSessions.get()
|
|
157
158
|
}
|
|
158
159
|
|
|
159
|
-
|
|
160
|
+
create(
|
|
160
161
|
body?: ThermostatsClimateSettingSchedulesCreateBody,
|
|
161
|
-
):
|
|
162
|
-
ThermostatsClimateSettingSchedulesCreateResponse
|
|
162
|
+
): SeamHttpRequest<
|
|
163
|
+
ThermostatsClimateSettingSchedulesCreateResponse,
|
|
164
|
+
'climate_setting_schedule'
|
|
163
165
|
> {
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
},
|
|
171
|
-
)
|
|
172
|
-
|
|
173
|
-
return data.climate_setting_schedule
|
|
166
|
+
return new SeamHttpRequest(this, {
|
|
167
|
+
path: '/thermostats/climate_setting_schedules/create',
|
|
168
|
+
method: 'post',
|
|
169
|
+
body,
|
|
170
|
+
responseKey: 'climate_setting_schedule',
|
|
171
|
+
})
|
|
174
172
|
}
|
|
175
173
|
|
|
176
|
-
|
|
174
|
+
delete(
|
|
177
175
|
body?: ThermostatsClimateSettingSchedulesDeleteBody,
|
|
178
|
-
):
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
)
|
|
176
|
+
): SeamHttpRequest<void, undefined> {
|
|
177
|
+
return new SeamHttpRequest(this, {
|
|
178
|
+
path: '/thermostats/climate_setting_schedules/delete',
|
|
179
|
+
method: 'post',
|
|
180
|
+
body,
|
|
181
|
+
responseKey: undefined,
|
|
182
|
+
})
|
|
186
183
|
}
|
|
187
184
|
|
|
188
|
-
|
|
185
|
+
get(
|
|
189
186
|
body?: ThermostatsClimateSettingSchedulesGetParams,
|
|
190
|
-
):
|
|
191
|
-
ThermostatsClimateSettingSchedulesGetResponse
|
|
187
|
+
): SeamHttpRequest<
|
|
188
|
+
ThermostatsClimateSettingSchedulesGetResponse,
|
|
189
|
+
'climate_setting_schedule'
|
|
192
190
|
> {
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
return data.climate_setting_schedule
|
|
191
|
+
return new SeamHttpRequest(this, {
|
|
192
|
+
path: '/thermostats/climate_setting_schedules/get',
|
|
193
|
+
method: 'post',
|
|
194
|
+
body,
|
|
195
|
+
responseKey: 'climate_setting_schedule',
|
|
196
|
+
})
|
|
201
197
|
}
|
|
202
198
|
|
|
203
|
-
|
|
199
|
+
list(
|
|
204
200
|
body?: ThermostatsClimateSettingSchedulesListParams,
|
|
205
|
-
):
|
|
206
|
-
ThermostatsClimateSettingSchedulesListResponse
|
|
201
|
+
): SeamHttpRequest<
|
|
202
|
+
ThermostatsClimateSettingSchedulesListResponse,
|
|
203
|
+
'climate_setting_schedules'
|
|
207
204
|
> {
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
},
|
|
215
|
-
)
|
|
216
|
-
|
|
217
|
-
return data.climate_setting_schedules
|
|
205
|
+
return new SeamHttpRequest(this, {
|
|
206
|
+
path: '/thermostats/climate_setting_schedules/list',
|
|
207
|
+
method: 'post',
|
|
208
|
+
body,
|
|
209
|
+
responseKey: 'climate_setting_schedules',
|
|
210
|
+
})
|
|
218
211
|
}
|
|
219
212
|
|
|
220
|
-
|
|
213
|
+
update(
|
|
221
214
|
body?: ThermostatsClimateSettingSchedulesUpdateBody,
|
|
222
|
-
):
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
)
|
|
215
|
+
): SeamHttpRequest<void, undefined> {
|
|
216
|
+
return new SeamHttpRequest(this, {
|
|
217
|
+
path: '/thermostats/climate_setting_schedules/update',
|
|
218
|
+
method: 'post',
|
|
219
|
+
body,
|
|
220
|
+
responseKey: undefined,
|
|
221
|
+
})
|
|
230
222
|
}
|
|
231
223
|
}
|
|
232
224
|
|
|
@@ -31,9 +31,8 @@ import {
|
|
|
31
31
|
limitToSeamHttpRequestOptions,
|
|
32
32
|
parseOptions,
|
|
33
33
|
} from 'lib/seam/connect/parse-options.js'
|
|
34
|
-
import {
|
|
34
|
+
import { SeamHttpRequest } from 'lib/seam/connect/seam-http-request.js'
|
|
35
35
|
|
|
36
|
-
import { SeamHttpActionAttempts } from './action-attempts.js'
|
|
37
36
|
import { SeamHttpClientSessions } from './client-sessions.js'
|
|
38
37
|
import { SeamHttpThermostatsClimateSettingSchedules } from './thermostats-climate-setting-schedules.js'
|
|
39
38
|
|
|
@@ -163,155 +162,99 @@ export class SeamHttpThermostats {
|
|
|
163
162
|
)
|
|
164
163
|
}
|
|
165
164
|
|
|
166
|
-
|
|
165
|
+
cool(
|
|
167
166
|
body?: ThermostatsCoolBody,
|
|
168
167
|
options: Pick<SeamHttpRequestOptions, 'waitForActionAttempt'> = {},
|
|
169
|
-
):
|
|
170
|
-
|
|
171
|
-
|
|
168
|
+
): SeamHttpRequest<ThermostatsCoolResponse, 'action_attempt'> {
|
|
169
|
+
return new SeamHttpRequest(this, {
|
|
170
|
+
path: '/thermostats/cool',
|
|
172
171
|
method: 'post',
|
|
173
|
-
|
|
172
|
+
body,
|
|
173
|
+
responseKey: 'action_attempt',
|
|
174
|
+
options,
|
|
174
175
|
})
|
|
175
|
-
const waitForActionAttempt =
|
|
176
|
-
options.waitForActionAttempt ?? this.defaults.waitForActionAttempt
|
|
177
|
-
if (waitForActionAttempt !== false) {
|
|
178
|
-
return await resolveActionAttempt(
|
|
179
|
-
data.action_attempt,
|
|
180
|
-
SeamHttpActionAttempts.fromClient(this.client, {
|
|
181
|
-
...this.defaults,
|
|
182
|
-
waitForActionAttempt: false,
|
|
183
|
-
}),
|
|
184
|
-
typeof waitForActionAttempt === 'boolean' ? {} : waitForActionAttempt,
|
|
185
|
-
)
|
|
186
|
-
}
|
|
187
|
-
return data.action_attempt
|
|
188
176
|
}
|
|
189
177
|
|
|
190
|
-
|
|
178
|
+
get(
|
|
191
179
|
body?: ThermostatsGetParams,
|
|
192
|
-
):
|
|
193
|
-
|
|
194
|
-
|
|
180
|
+
): SeamHttpRequest<ThermostatsGetResponse, 'thermostat'> {
|
|
181
|
+
return new SeamHttpRequest(this, {
|
|
182
|
+
path: '/thermostats/get',
|
|
195
183
|
method: 'post',
|
|
196
|
-
|
|
184
|
+
body,
|
|
185
|
+
responseKey: 'thermostat',
|
|
197
186
|
})
|
|
198
|
-
|
|
199
|
-
return data.thermostat
|
|
200
187
|
}
|
|
201
188
|
|
|
202
|
-
|
|
189
|
+
heat(
|
|
203
190
|
body?: ThermostatsHeatBody,
|
|
204
191
|
options: Pick<SeamHttpRequestOptions, 'waitForActionAttempt'> = {},
|
|
205
|
-
):
|
|
206
|
-
|
|
207
|
-
|
|
192
|
+
): SeamHttpRequest<ThermostatsHeatResponse, 'action_attempt'> {
|
|
193
|
+
return new SeamHttpRequest(this, {
|
|
194
|
+
path: '/thermostats/heat',
|
|
208
195
|
method: 'post',
|
|
209
|
-
|
|
196
|
+
body,
|
|
197
|
+
responseKey: 'action_attempt',
|
|
198
|
+
options,
|
|
210
199
|
})
|
|
211
|
-
const waitForActionAttempt =
|
|
212
|
-
options.waitForActionAttempt ?? this.defaults.waitForActionAttempt
|
|
213
|
-
if (waitForActionAttempt !== false) {
|
|
214
|
-
return await resolveActionAttempt(
|
|
215
|
-
data.action_attempt,
|
|
216
|
-
SeamHttpActionAttempts.fromClient(this.client, {
|
|
217
|
-
...this.defaults,
|
|
218
|
-
waitForActionAttempt: false,
|
|
219
|
-
}),
|
|
220
|
-
typeof waitForActionAttempt === 'boolean' ? {} : waitForActionAttempt,
|
|
221
|
-
)
|
|
222
|
-
}
|
|
223
|
-
return data.action_attempt
|
|
224
200
|
}
|
|
225
201
|
|
|
226
|
-
|
|
202
|
+
heatCool(
|
|
227
203
|
body?: ThermostatsHeatCoolBody,
|
|
228
204
|
options: Pick<SeamHttpRequestOptions, 'waitForActionAttempt'> = {},
|
|
229
|
-
):
|
|
230
|
-
|
|
231
|
-
|
|
205
|
+
): SeamHttpRequest<ThermostatsHeatCoolResponse, 'action_attempt'> {
|
|
206
|
+
return new SeamHttpRequest(this, {
|
|
207
|
+
path: '/thermostats/heat_cool',
|
|
232
208
|
method: 'post',
|
|
233
|
-
|
|
209
|
+
body,
|
|
210
|
+
responseKey: 'action_attempt',
|
|
211
|
+
options,
|
|
234
212
|
})
|
|
235
|
-
const waitForActionAttempt =
|
|
236
|
-
options.waitForActionAttempt ?? this.defaults.waitForActionAttempt
|
|
237
|
-
if (waitForActionAttempt !== false) {
|
|
238
|
-
return await resolveActionAttempt(
|
|
239
|
-
data.action_attempt,
|
|
240
|
-
SeamHttpActionAttempts.fromClient(this.client, {
|
|
241
|
-
...this.defaults,
|
|
242
|
-
waitForActionAttempt: false,
|
|
243
|
-
}),
|
|
244
|
-
typeof waitForActionAttempt === 'boolean' ? {} : waitForActionAttempt,
|
|
245
|
-
)
|
|
246
|
-
}
|
|
247
|
-
return data.action_attempt
|
|
248
213
|
}
|
|
249
214
|
|
|
250
|
-
|
|
215
|
+
list(
|
|
251
216
|
body?: ThermostatsListParams,
|
|
252
|
-
):
|
|
253
|
-
|
|
254
|
-
|
|
217
|
+
): SeamHttpRequest<ThermostatsListResponse, 'thermostats'> {
|
|
218
|
+
return new SeamHttpRequest(this, {
|
|
219
|
+
path: '/thermostats/list',
|
|
255
220
|
method: 'post',
|
|
256
|
-
|
|
221
|
+
body,
|
|
222
|
+
responseKey: 'thermostats',
|
|
257
223
|
})
|
|
258
|
-
|
|
259
|
-
return data.thermostats
|
|
260
224
|
}
|
|
261
225
|
|
|
262
|
-
|
|
226
|
+
off(
|
|
263
227
|
body?: ThermostatsOffBody,
|
|
264
228
|
options: Pick<SeamHttpRequestOptions, 'waitForActionAttempt'> = {},
|
|
265
|
-
):
|
|
266
|
-
|
|
267
|
-
|
|
229
|
+
): SeamHttpRequest<ThermostatsOffResponse, 'action_attempt'> {
|
|
230
|
+
return new SeamHttpRequest(this, {
|
|
231
|
+
path: '/thermostats/off',
|
|
268
232
|
method: 'post',
|
|
269
|
-
|
|
233
|
+
body,
|
|
234
|
+
responseKey: 'action_attempt',
|
|
235
|
+
options,
|
|
270
236
|
})
|
|
271
|
-
const waitForActionAttempt =
|
|
272
|
-
options.waitForActionAttempt ?? this.defaults.waitForActionAttempt
|
|
273
|
-
if (waitForActionAttempt !== false) {
|
|
274
|
-
return await resolveActionAttempt(
|
|
275
|
-
data.action_attempt,
|
|
276
|
-
SeamHttpActionAttempts.fromClient(this.client, {
|
|
277
|
-
...this.defaults,
|
|
278
|
-
waitForActionAttempt: false,
|
|
279
|
-
}),
|
|
280
|
-
typeof waitForActionAttempt === 'boolean' ? {} : waitForActionAttempt,
|
|
281
|
-
)
|
|
282
|
-
}
|
|
283
|
-
return data.action_attempt
|
|
284
237
|
}
|
|
285
238
|
|
|
286
|
-
|
|
239
|
+
setFanMode(
|
|
287
240
|
body?: ThermostatsSetFanModeBody,
|
|
288
241
|
options: Pick<SeamHttpRequestOptions, 'waitForActionAttempt'> = {},
|
|
289
|
-
):
|
|
290
|
-
|
|
291
|
-
|
|
242
|
+
): SeamHttpRequest<ThermostatsSetFanModeResponse, 'action_attempt'> {
|
|
243
|
+
return new SeamHttpRequest(this, {
|
|
244
|
+
path: '/thermostats/set_fan_mode',
|
|
292
245
|
method: 'post',
|
|
293
|
-
|
|
246
|
+
body,
|
|
247
|
+
responseKey: 'action_attempt',
|
|
248
|
+
options,
|
|
294
249
|
})
|
|
295
|
-
const waitForActionAttempt =
|
|
296
|
-
options.waitForActionAttempt ?? this.defaults.waitForActionAttempt
|
|
297
|
-
if (waitForActionAttempt !== false) {
|
|
298
|
-
return await resolveActionAttempt(
|
|
299
|
-
data.action_attempt,
|
|
300
|
-
SeamHttpActionAttempts.fromClient(this.client, {
|
|
301
|
-
...this.defaults,
|
|
302
|
-
waitForActionAttempt: false,
|
|
303
|
-
}),
|
|
304
|
-
typeof waitForActionAttempt === 'boolean' ? {} : waitForActionAttempt,
|
|
305
|
-
)
|
|
306
|
-
}
|
|
307
|
-
return data.action_attempt
|
|
308
250
|
}
|
|
309
251
|
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
252
|
+
update(body?: ThermostatsUpdateBody): SeamHttpRequest<void, undefined> {
|
|
253
|
+
return new SeamHttpRequest(this, {
|
|
254
|
+
path: '/thermostats/update',
|
|
313
255
|
method: 'post',
|
|
314
|
-
|
|
256
|
+
body,
|
|
257
|
+
responseKey: undefined,
|
|
315
258
|
})
|
|
316
259
|
}
|
|
317
260
|
}
|
|
@@ -31,6 +31,7 @@ import {
|
|
|
31
31
|
limitToSeamHttpRequestOptions,
|
|
32
32
|
parseOptions,
|
|
33
33
|
} from 'lib/seam/connect/parse-options.js'
|
|
34
|
+
import { SeamHttpRequest } from 'lib/seam/connect/seam-http-request.js'
|
|
34
35
|
|
|
35
36
|
import { SeamHttpClientSessions } from './client-sessions.js'
|
|
36
37
|
|
|
@@ -156,67 +157,57 @@ export class SeamHttpUserIdentitiesEnrollmentAutomations {
|
|
|
156
157
|
await clientSessions.get()
|
|
157
158
|
}
|
|
158
159
|
|
|
159
|
-
|
|
160
|
+
delete(
|
|
160
161
|
body?: UserIdentitiesEnrollmentAutomationsDeleteBody,
|
|
161
|
-
):
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
)
|
|
162
|
+
): SeamHttpRequest<void, undefined> {
|
|
163
|
+
return new SeamHttpRequest(this, {
|
|
164
|
+
path: '/user_identities/enrollment_automations/delete',
|
|
165
|
+
method: 'post',
|
|
166
|
+
body,
|
|
167
|
+
responseKey: undefined,
|
|
168
|
+
})
|
|
169
169
|
}
|
|
170
170
|
|
|
171
|
-
|
|
171
|
+
get(
|
|
172
172
|
body?: UserIdentitiesEnrollmentAutomationsGetParams,
|
|
173
|
-
):
|
|
174
|
-
UserIdentitiesEnrollmentAutomationsGetResponse
|
|
173
|
+
): SeamHttpRequest<
|
|
174
|
+
UserIdentitiesEnrollmentAutomationsGetResponse,
|
|
175
|
+
'enrollment_automation'
|
|
175
176
|
> {
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
},
|
|
183
|
-
)
|
|
184
|
-
|
|
185
|
-
return data.enrollment_automation
|
|
177
|
+
return new SeamHttpRequest(this, {
|
|
178
|
+
path: '/user_identities/enrollment_automations/get',
|
|
179
|
+
method: 'post',
|
|
180
|
+
body,
|
|
181
|
+
responseKey: 'enrollment_automation',
|
|
182
|
+
})
|
|
186
183
|
}
|
|
187
184
|
|
|
188
|
-
|
|
185
|
+
launch(
|
|
189
186
|
body?: UserIdentitiesEnrollmentAutomationsLaunchBody,
|
|
190
|
-
):
|
|
191
|
-
UserIdentitiesEnrollmentAutomationsLaunchResponse
|
|
187
|
+
): SeamHttpRequest<
|
|
188
|
+
UserIdentitiesEnrollmentAutomationsLaunchResponse,
|
|
189
|
+
'enrollment_automation'
|
|
192
190
|
> {
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
},
|
|
200
|
-
)
|
|
201
|
-
|
|
202
|
-
return data.enrollment_automation
|
|
191
|
+
return new SeamHttpRequest(this, {
|
|
192
|
+
path: '/user_identities/enrollment_automations/launch',
|
|
193
|
+
method: 'post',
|
|
194
|
+
body,
|
|
195
|
+
responseKey: 'enrollment_automation',
|
|
196
|
+
})
|
|
203
197
|
}
|
|
204
198
|
|
|
205
|
-
|
|
199
|
+
list(
|
|
206
200
|
body?: UserIdentitiesEnrollmentAutomationsListParams,
|
|
207
|
-
):
|
|
208
|
-
UserIdentitiesEnrollmentAutomationsListResponse
|
|
201
|
+
): SeamHttpRequest<
|
|
202
|
+
UserIdentitiesEnrollmentAutomationsListResponse,
|
|
203
|
+
'enrollment_automations'
|
|
209
204
|
> {
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
},
|
|
217
|
-
)
|
|
218
|
-
|
|
219
|
-
return data.enrollment_automations
|
|
205
|
+
return new SeamHttpRequest(this, {
|
|
206
|
+
path: '/user_identities/enrollment_automations/list',
|
|
207
|
+
method: 'post',
|
|
208
|
+
body,
|
|
209
|
+
responseKey: 'enrollment_automations',
|
|
210
|
+
})
|
|
220
211
|
}
|
|
221
212
|
}
|
|
222
213
|
|