@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
|
|
|
@@ -153,84 +154,79 @@ export class SeamHttpAcsCredentials {
|
|
|
153
154
|
await clientSessions.get()
|
|
154
155
|
}
|
|
155
156
|
|
|
156
|
-
|
|
157
|
+
assign(
|
|
157
158
|
body?: AcsCredentialsAssignBody,
|
|
158
|
-
):
|
|
159
|
-
|
|
160
|
-
|
|
159
|
+
): SeamHttpRequest<AcsCredentialsAssignResponse, 'acs_credential'> {
|
|
160
|
+
return new SeamHttpRequest(this, {
|
|
161
|
+
path: '/acs/credentials/assign',
|
|
161
162
|
method: 'post',
|
|
162
|
-
|
|
163
|
+
body,
|
|
164
|
+
responseKey: 'acs_credential',
|
|
163
165
|
})
|
|
164
|
-
|
|
165
|
-
return data.acs_credential
|
|
166
166
|
}
|
|
167
167
|
|
|
168
|
-
|
|
168
|
+
create(
|
|
169
169
|
body?: AcsCredentialsCreateBody,
|
|
170
|
-
):
|
|
171
|
-
|
|
172
|
-
|
|
170
|
+
): SeamHttpRequest<AcsCredentialsCreateResponse, 'acs_credential'> {
|
|
171
|
+
return new SeamHttpRequest(this, {
|
|
172
|
+
path: '/acs/credentials/create',
|
|
173
173
|
method: 'post',
|
|
174
|
-
|
|
174
|
+
body,
|
|
175
|
+
responseKey: 'acs_credential',
|
|
175
176
|
})
|
|
176
|
-
|
|
177
|
-
return data.acs_credential
|
|
178
177
|
}
|
|
179
178
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
179
|
+
delete(body?: AcsCredentialsDeleteBody): SeamHttpRequest<void, undefined> {
|
|
180
|
+
return new SeamHttpRequest(this, {
|
|
181
|
+
path: '/acs/credentials/delete',
|
|
183
182
|
method: 'post',
|
|
184
|
-
|
|
183
|
+
body,
|
|
184
|
+
responseKey: undefined,
|
|
185
185
|
})
|
|
186
186
|
}
|
|
187
187
|
|
|
188
|
-
|
|
188
|
+
get(
|
|
189
189
|
body?: AcsCredentialsGetParams,
|
|
190
|
-
):
|
|
191
|
-
|
|
192
|
-
|
|
190
|
+
): SeamHttpRequest<AcsCredentialsGetResponse, 'acs_credential'> {
|
|
191
|
+
return new SeamHttpRequest(this, {
|
|
192
|
+
path: '/acs/credentials/get',
|
|
193
193
|
method: 'post',
|
|
194
|
-
|
|
194
|
+
body,
|
|
195
|
+
responseKey: 'acs_credential',
|
|
195
196
|
})
|
|
196
|
-
|
|
197
|
-
return data.acs_credential
|
|
198
197
|
}
|
|
199
198
|
|
|
200
|
-
|
|
199
|
+
list(
|
|
201
200
|
body?: AcsCredentialsListParams,
|
|
202
|
-
):
|
|
203
|
-
|
|
204
|
-
|
|
201
|
+
): SeamHttpRequest<AcsCredentialsListResponse, 'acs_credentials'> {
|
|
202
|
+
return new SeamHttpRequest(this, {
|
|
203
|
+
path: '/acs/credentials/list',
|
|
205
204
|
method: 'post',
|
|
206
|
-
|
|
205
|
+
body,
|
|
206
|
+
responseKey: 'acs_credentials',
|
|
207
207
|
})
|
|
208
|
-
|
|
209
|
-
return data.acs_credentials
|
|
210
208
|
}
|
|
211
209
|
|
|
212
|
-
|
|
210
|
+
unassign(
|
|
213
211
|
body?: AcsCredentialsUnassignBody,
|
|
214
|
-
):
|
|
215
|
-
|
|
216
|
-
|
|
212
|
+
): SeamHttpRequest<AcsCredentialsUnassignResponse, 'acs_credential'> {
|
|
213
|
+
return new SeamHttpRequest(this, {
|
|
214
|
+
path: '/acs/credentials/unassign',
|
|
217
215
|
method: 'post',
|
|
218
|
-
|
|
216
|
+
body,
|
|
217
|
+
responseKey: 'acs_credential',
|
|
219
218
|
})
|
|
220
|
-
|
|
221
|
-
return data.acs_credential
|
|
222
219
|
}
|
|
223
220
|
|
|
224
|
-
|
|
221
|
+
update(
|
|
225
222
|
body?: AcsCredentialsUpdateBody,
|
|
226
|
-
):
|
|
227
|
-
|
|
228
|
-
|
|
223
|
+
): SeamHttpRequest<AcsCredentialsUpdateResponse, 'acs_credential'> {
|
|
224
|
+
return new SeamHttpRequest(this, {
|
|
225
|
+
path: '/acs/credentials/update',
|
|
229
226
|
method: 'post',
|
|
230
|
-
|
|
227
|
+
body,
|
|
228
|
+
responseKey: 'acs_credential',
|
|
231
229
|
})
|
|
232
|
-
|
|
233
|
-
return data.acs_credential
|
|
234
230
|
}
|
|
235
231
|
}
|
|
236
232
|
|
|
@@ -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,49 +154,51 @@ export class SeamHttpAcsEntrances {
|
|
|
153
154
|
await clientSessions.get()
|
|
154
155
|
}
|
|
155
156
|
|
|
156
|
-
|
|
157
|
+
get(
|
|
157
158
|
body?: AcsEntrancesGetParams,
|
|
158
|
-
):
|
|
159
|
-
|
|
160
|
-
|
|
159
|
+
): SeamHttpRequest<AcsEntrancesGetResponse, 'acs_entrance'> {
|
|
160
|
+
return new SeamHttpRequest(this, {
|
|
161
|
+
path: '/acs/entrances/get',
|
|
161
162
|
method: 'post',
|
|
162
|
-
|
|
163
|
+
body,
|
|
164
|
+
responseKey: 'acs_entrance',
|
|
163
165
|
})
|
|
164
|
-
|
|
165
|
-
return data.acs_entrance
|
|
166
166
|
}
|
|
167
167
|
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
168
|
+
grantAccess(
|
|
169
|
+
body?: AcsEntrancesGrantAccessBody,
|
|
170
|
+
): SeamHttpRequest<void, undefined> {
|
|
171
|
+
return new SeamHttpRequest(this, {
|
|
172
|
+
path: '/acs/entrances/grant_access',
|
|
171
173
|
method: 'post',
|
|
172
|
-
|
|
174
|
+
body,
|
|
175
|
+
responseKey: undefined,
|
|
173
176
|
})
|
|
174
177
|
}
|
|
175
178
|
|
|
176
|
-
|
|
179
|
+
list(
|
|
177
180
|
body?: AcsEntrancesListParams,
|
|
178
|
-
):
|
|
179
|
-
|
|
180
|
-
|
|
181
|
+
): SeamHttpRequest<AcsEntrancesListResponse, 'acs_entrances'> {
|
|
182
|
+
return new SeamHttpRequest(this, {
|
|
183
|
+
path: '/acs/entrances/list',
|
|
181
184
|
method: 'post',
|
|
182
|
-
|
|
185
|
+
body,
|
|
186
|
+
responseKey: 'acs_entrances',
|
|
183
187
|
})
|
|
184
|
-
|
|
185
|
-
return data.acs_entrances
|
|
186
188
|
}
|
|
187
189
|
|
|
188
|
-
|
|
190
|
+
listCredentialsWithAccess(
|
|
189
191
|
body?: AcsEntrancesListCredentialsWithAccessParams,
|
|
190
|
-
):
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
192
|
+
): SeamHttpRequest<
|
|
193
|
+
AcsEntrancesListCredentialsWithAccessResponse,
|
|
194
|
+
'acs_credentials'
|
|
195
|
+
> {
|
|
196
|
+
return new SeamHttpRequest(this, {
|
|
197
|
+
path: '/acs/entrances/list_credentials_with_access',
|
|
198
|
+
method: 'post',
|
|
199
|
+
body,
|
|
200
|
+
responseKey: 'acs_credentials',
|
|
201
|
+
})
|
|
199
202
|
}
|
|
200
203
|
}
|
|
201
204
|
|
|
@@ -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,28 +154,26 @@ export class SeamHttpAcsSystems {
|
|
|
153
154
|
await clientSessions.get()
|
|
154
155
|
}
|
|
155
156
|
|
|
156
|
-
|
|
157
|
+
get(
|
|
157
158
|
body?: AcsSystemsGetParams,
|
|
158
|
-
):
|
|
159
|
-
|
|
160
|
-
|
|
159
|
+
): SeamHttpRequest<AcsSystemsGetResponse, 'acs_system'> {
|
|
160
|
+
return new SeamHttpRequest(this, {
|
|
161
|
+
path: '/acs/systems/get',
|
|
161
162
|
method: 'post',
|
|
162
|
-
|
|
163
|
+
body,
|
|
164
|
+
responseKey: 'acs_system',
|
|
163
165
|
})
|
|
164
|
-
|
|
165
|
-
return data.acs_system
|
|
166
166
|
}
|
|
167
167
|
|
|
168
|
-
|
|
168
|
+
list(
|
|
169
169
|
body?: AcsSystemsListParams,
|
|
170
|
-
):
|
|
171
|
-
|
|
172
|
-
|
|
170
|
+
): SeamHttpRequest<AcsSystemsListResponse, 'acs_systems'> {
|
|
171
|
+
return new SeamHttpRequest(this, {
|
|
172
|
+
path: '/acs/systems/list',
|
|
173
173
|
method: 'post',
|
|
174
|
-
|
|
174
|
+
body,
|
|
175
|
+
responseKey: 'acs_systems',
|
|
175
176
|
})
|
|
176
|
-
|
|
177
|
-
return data.acs_systems
|
|
178
177
|
}
|
|
179
178
|
}
|
|
180
179
|
|
|
@@ -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,112 +154,116 @@ export class SeamHttpAcsUsers {
|
|
|
153
154
|
await clientSessions.get()
|
|
154
155
|
}
|
|
155
156
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
157
|
+
addToAccessGroup(
|
|
158
|
+
body?: AcsUsersAddToAccessGroupBody,
|
|
159
|
+
): SeamHttpRequest<void, undefined> {
|
|
160
|
+
return new SeamHttpRequest(this, {
|
|
161
|
+
path: '/acs/users/add_to_access_group',
|
|
159
162
|
method: 'post',
|
|
160
|
-
|
|
163
|
+
body,
|
|
164
|
+
responseKey: undefined,
|
|
161
165
|
})
|
|
162
166
|
}
|
|
163
167
|
|
|
164
|
-
|
|
168
|
+
create(
|
|
165
169
|
body?: AcsUsersCreateBody,
|
|
166
|
-
):
|
|
167
|
-
|
|
168
|
-
|
|
170
|
+
): SeamHttpRequest<AcsUsersCreateResponse, 'acs_user'> {
|
|
171
|
+
return new SeamHttpRequest(this, {
|
|
172
|
+
path: '/acs/users/create',
|
|
169
173
|
method: 'post',
|
|
170
|
-
|
|
174
|
+
body,
|
|
175
|
+
responseKey: 'acs_user',
|
|
171
176
|
})
|
|
172
|
-
|
|
173
|
-
return data.acs_user
|
|
174
177
|
}
|
|
175
178
|
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
+
delete(body?: AcsUsersDeleteBody): SeamHttpRequest<void, undefined> {
|
|
180
|
+
return new SeamHttpRequest(this, {
|
|
181
|
+
path: '/acs/users/delete',
|
|
179
182
|
method: 'post',
|
|
180
|
-
|
|
183
|
+
body,
|
|
184
|
+
responseKey: undefined,
|
|
181
185
|
})
|
|
182
186
|
}
|
|
183
187
|
|
|
184
|
-
|
|
188
|
+
get(
|
|
185
189
|
body?: AcsUsersGetParams,
|
|
186
|
-
):
|
|
187
|
-
|
|
188
|
-
|
|
190
|
+
): SeamHttpRequest<AcsUsersGetResponse, 'acs_user'> {
|
|
191
|
+
return new SeamHttpRequest(this, {
|
|
192
|
+
path: '/acs/users/get',
|
|
189
193
|
method: 'post',
|
|
190
|
-
|
|
194
|
+
body,
|
|
195
|
+
responseKey: 'acs_user',
|
|
191
196
|
})
|
|
192
|
-
|
|
193
|
-
return data.acs_user
|
|
194
197
|
}
|
|
195
198
|
|
|
196
|
-
|
|
199
|
+
list(
|
|
197
200
|
body?: AcsUsersListParams,
|
|
198
|
-
):
|
|
199
|
-
|
|
200
|
-
|
|
201
|
+
): SeamHttpRequest<AcsUsersListResponse, 'acs_users'> {
|
|
202
|
+
return new SeamHttpRequest(this, {
|
|
203
|
+
path: '/acs/users/list',
|
|
201
204
|
method: 'post',
|
|
202
|
-
|
|
205
|
+
body,
|
|
206
|
+
responseKey: 'acs_users',
|
|
203
207
|
})
|
|
204
|
-
|
|
205
|
-
return data.acs_users
|
|
206
208
|
}
|
|
207
209
|
|
|
208
|
-
|
|
210
|
+
listAccessibleEntrances(
|
|
209
211
|
body?: AcsUsersListAccessibleEntrancesParams,
|
|
210
|
-
):
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
return data.acs_entrances
|
|
212
|
+
): SeamHttpRequest<AcsUsersListAccessibleEntrancesResponse, 'acs_entrances'> {
|
|
213
|
+
return new SeamHttpRequest(this, {
|
|
214
|
+
path: '/acs/users/list_accessible_entrances',
|
|
215
|
+
method: 'post',
|
|
216
|
+
body,
|
|
217
|
+
responseKey: 'acs_entrances',
|
|
218
|
+
})
|
|
219
219
|
}
|
|
220
220
|
|
|
221
|
-
|
|
221
|
+
removeFromAccessGroup(
|
|
222
222
|
body?: AcsUsersRemoveFromAccessGroupBody,
|
|
223
|
-
):
|
|
224
|
-
|
|
225
|
-
|
|
223
|
+
): SeamHttpRequest<void, undefined> {
|
|
224
|
+
return new SeamHttpRequest(this, {
|
|
225
|
+
path: '/acs/users/remove_from_access_group',
|
|
226
226
|
method: 'post',
|
|
227
|
-
|
|
227
|
+
body,
|
|
228
|
+
responseKey: undefined,
|
|
228
229
|
})
|
|
229
230
|
}
|
|
230
231
|
|
|
231
|
-
|
|
232
|
+
revokeAccessToAllEntrances(
|
|
232
233
|
body?: AcsUsersRevokeAccessToAllEntrancesBody,
|
|
233
|
-
):
|
|
234
|
-
|
|
235
|
-
|
|
234
|
+
): SeamHttpRequest<void, undefined> {
|
|
235
|
+
return new SeamHttpRequest(this, {
|
|
236
|
+
path: '/acs/users/revoke_access_to_all_entrances',
|
|
236
237
|
method: 'post',
|
|
237
|
-
|
|
238
|
+
body,
|
|
239
|
+
responseKey: undefined,
|
|
238
240
|
})
|
|
239
241
|
}
|
|
240
242
|
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
243
|
+
suspend(body?: AcsUsersSuspendBody): SeamHttpRequest<void, undefined> {
|
|
244
|
+
return new SeamHttpRequest(this, {
|
|
245
|
+
path: '/acs/users/suspend',
|
|
244
246
|
method: 'post',
|
|
245
|
-
|
|
247
|
+
body,
|
|
248
|
+
responseKey: undefined,
|
|
246
249
|
})
|
|
247
250
|
}
|
|
248
251
|
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
+
unsuspend(body?: AcsUsersUnsuspendBody): SeamHttpRequest<void, undefined> {
|
|
253
|
+
return new SeamHttpRequest(this, {
|
|
254
|
+
path: '/acs/users/unsuspend',
|
|
252
255
|
method: 'post',
|
|
253
|
-
|
|
256
|
+
body,
|
|
257
|
+
responseKey: undefined,
|
|
254
258
|
})
|
|
255
259
|
}
|
|
256
260
|
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
261
|
+
update(body?: AcsUsersUpdateBody): SeamHttpRequest<void, undefined> {
|
|
262
|
+
return new SeamHttpRequest(this, {
|
|
263
|
+
path: '/acs/users/update',
|
|
260
264
|
method: 'post',
|
|
261
|
-
|
|
265
|
+
body,
|
|
266
|
+
responseKey: undefined,
|
|
262
267
|
})
|
|
263
268
|
}
|
|
264
269
|
}
|
|
@@ -31,7 +31,7 @@ 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
36
|
import { SeamHttpClientSessions } from './client-sessions.js'
|
|
37
37
|
|
|
@@ -154,40 +154,28 @@ export class SeamHttpActionAttempts {
|
|
|
154
154
|
await clientSessions.get()
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
-
|
|
157
|
+
get(
|
|
158
158
|
body?: ActionAttemptsGetParams,
|
|
159
159
|
options: Pick<SeamHttpRequestOptions, 'waitForActionAttempt'> = {},
|
|
160
|
-
):
|
|
161
|
-
|
|
162
|
-
|
|
160
|
+
): SeamHttpRequest<ActionAttemptsGetResponse, 'action_attempt'> {
|
|
161
|
+
return new SeamHttpRequest(this, {
|
|
162
|
+
path: '/action_attempts/get',
|
|
163
163
|
method: 'post',
|
|
164
|
-
|
|
164
|
+
body,
|
|
165
|
+
responseKey: 'action_attempt',
|
|
166
|
+
options,
|
|
165
167
|
})
|
|
166
|
-
const waitForActionAttempt =
|
|
167
|
-
options.waitForActionAttempt ?? this.defaults.waitForActionAttempt
|
|
168
|
-
if (waitForActionAttempt !== false) {
|
|
169
|
-
return await resolveActionAttempt(
|
|
170
|
-
data.action_attempt,
|
|
171
|
-
SeamHttpActionAttempts.fromClient(this.client, {
|
|
172
|
-
...this.defaults,
|
|
173
|
-
waitForActionAttempt: false,
|
|
174
|
-
}),
|
|
175
|
-
typeof waitForActionAttempt === 'boolean' ? {} : waitForActionAttempt,
|
|
176
|
-
)
|
|
177
|
-
}
|
|
178
|
-
return data.action_attempt
|
|
179
168
|
}
|
|
180
169
|
|
|
181
|
-
|
|
170
|
+
list(
|
|
182
171
|
body?: ActionAttemptsListParams,
|
|
183
|
-
):
|
|
184
|
-
|
|
185
|
-
|
|
172
|
+
): SeamHttpRequest<ActionAttemptsListResponse, 'action_attempts'> {
|
|
173
|
+
return new SeamHttpRequest(this, {
|
|
174
|
+
path: '/action_attempts/list',
|
|
186
175
|
method: 'post',
|
|
187
|
-
|
|
176
|
+
body,
|
|
177
|
+
responseKey: 'action_attempts',
|
|
188
178
|
})
|
|
189
|
-
|
|
190
|
-
return data.action_attempts
|
|
191
179
|
}
|
|
192
180
|
}
|
|
193
181
|
|
|
@@ -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
|
export class SeamHttpClientSessions {
|
|
36
37
|
client: Client
|
|
@@ -151,81 +152,76 @@ export class SeamHttpClientSessions {
|
|
|
151
152
|
await clientSessions.get()
|
|
152
153
|
}
|
|
153
154
|
|
|
154
|
-
|
|
155
|
+
create(
|
|
155
156
|
body?: ClientSessionsCreateBody,
|
|
156
|
-
):
|
|
157
|
-
|
|
158
|
-
|
|
157
|
+
): SeamHttpRequest<ClientSessionsCreateResponse, 'client_session'> {
|
|
158
|
+
return new SeamHttpRequest(this, {
|
|
159
|
+
path: '/client_sessions/create',
|
|
159
160
|
method: 'post',
|
|
160
|
-
|
|
161
|
+
body,
|
|
162
|
+
responseKey: 'client_session',
|
|
161
163
|
})
|
|
162
|
-
|
|
163
|
-
return data.client_session
|
|
164
164
|
}
|
|
165
165
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
166
|
+
delete(body?: ClientSessionsDeleteBody): SeamHttpRequest<void, undefined> {
|
|
167
|
+
return new SeamHttpRequest(this, {
|
|
168
|
+
path: '/client_sessions/delete',
|
|
169
169
|
method: 'post',
|
|
170
|
-
|
|
170
|
+
body,
|
|
171
|
+
responseKey: undefined,
|
|
171
172
|
})
|
|
172
173
|
}
|
|
173
174
|
|
|
174
|
-
|
|
175
|
+
get(
|
|
175
176
|
body?: ClientSessionsGetParams,
|
|
176
|
-
):
|
|
177
|
-
|
|
178
|
-
|
|
177
|
+
): SeamHttpRequest<ClientSessionsGetResponse, 'client_session'> {
|
|
178
|
+
return new SeamHttpRequest(this, {
|
|
179
|
+
path: '/client_sessions/get',
|
|
179
180
|
method: 'post',
|
|
180
|
-
|
|
181
|
+
body,
|
|
182
|
+
responseKey: 'client_session',
|
|
181
183
|
})
|
|
182
|
-
|
|
183
|
-
return data.client_session
|
|
184
184
|
}
|
|
185
185
|
|
|
186
|
-
|
|
186
|
+
getOrCreate(
|
|
187
187
|
body?: ClientSessionsGetOrCreateBody,
|
|
188
|
-
):
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
return data.client_session
|
|
188
|
+
): SeamHttpRequest<ClientSessionsGetOrCreateResponse, 'client_session'> {
|
|
189
|
+
return new SeamHttpRequest(this, {
|
|
190
|
+
path: '/client_sessions/get_or_create',
|
|
191
|
+
method: 'post',
|
|
192
|
+
body,
|
|
193
|
+
responseKey: 'client_session',
|
|
194
|
+
})
|
|
197
195
|
}
|
|
198
196
|
|
|
199
|
-
|
|
197
|
+
grantAccess(
|
|
200
198
|
body?: ClientSessionsGrantAccessBody,
|
|
201
|
-
):
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
return data.client_session
|
|
199
|
+
): SeamHttpRequest<ClientSessionsGrantAccessResponse, 'client_session'> {
|
|
200
|
+
return new SeamHttpRequest(this, {
|
|
201
|
+
path: '/client_sessions/grant_access',
|
|
202
|
+
method: 'post',
|
|
203
|
+
body,
|
|
204
|
+
responseKey: 'client_session',
|
|
205
|
+
})
|
|
210
206
|
}
|
|
211
207
|
|
|
212
|
-
|
|
208
|
+
list(
|
|
213
209
|
body?: ClientSessionsListParams,
|
|
214
|
-
):
|
|
215
|
-
|
|
216
|
-
|
|
210
|
+
): SeamHttpRequest<ClientSessionsListResponse, 'client_sessions'> {
|
|
211
|
+
return new SeamHttpRequest(this, {
|
|
212
|
+
path: '/client_sessions/list',
|
|
217
213
|
method: 'post',
|
|
218
|
-
|
|
214
|
+
body,
|
|
215
|
+
responseKey: 'client_sessions',
|
|
219
216
|
})
|
|
220
|
-
|
|
221
|
-
return data.client_sessions
|
|
222
217
|
}
|
|
223
218
|
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
219
|
+
revoke(body?: ClientSessionsRevokeBody): SeamHttpRequest<void, undefined> {
|
|
220
|
+
return new SeamHttpRequest(this, {
|
|
221
|
+
path: '/client_sessions/revoke',
|
|
227
222
|
method: 'post',
|
|
228
|
-
|
|
223
|
+
body,
|
|
224
|
+
responseKey: undefined,
|
|
229
225
|
})
|
|
230
226
|
}
|
|
231
227
|
}
|