@seamapi/types 1.1027.0 → 1.1028.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/lib/seam/connect/models/access-codes/managed-access-code.d.ts +329 -0
- package/lib/seam/connect/models/access-codes/managed-access-code.js +61 -0
- package/lib/seam/connect/models/access-codes/managed-access-code.js.map +1 -1
- package/lib/seam/connect/models/access-codes/unmanaged-access-code.d.ts +120 -0
- package/lib/seam/connect/models/access-grants/access-method.d.ts +10 -10
- package/lib/seam/connect/models/events/access-codes.d.ts +2327 -463
- package/lib/seam/connect/models/events/access-codes.js +71 -0
- package/lib/seam/connect/models/events/access-codes.js.map +1 -1
- package/lib/seam/connect/models/events/seam-event.d.ts +927 -1
- package/lib/seam/connect/openapi.js +1517 -11
- package/lib/seam/connect/openapi.js.map +1 -1
- package/lib/seam/connect/route-types.d.ts +2195 -32
- package/package.json +1 -1
- package/src/lib/seam/connect/models/access-codes/managed-access-code.ts +66 -0
- package/src/lib/seam/connect/models/events/access-codes.ts +99 -0
- package/src/lib/seam/connect/openapi.ts +1720 -12
- package/src/lib/seam/connect/route-types.ts +2493 -131
package/package.json
CHANGED
|
@@ -124,6 +124,38 @@ const no_space_for_access_code_on_device = common_access_code_error.extend({
|
|
|
124
124
|
No space for access code on device.
|
|
125
125
|
`)
|
|
126
126
|
|
|
127
|
+
const failed_to_issue = common_access_code_error.extend({
|
|
128
|
+
error_code: z.literal('failed_to_issue').describe(error_code_description),
|
|
129
|
+
}).describe(`
|
|
130
|
+
---
|
|
131
|
+
resource_type: access_code
|
|
132
|
+
undocumented: Unreleased.
|
|
133
|
+
---
|
|
134
|
+
Seam was unable to issue this access code before its start time, so the recipient may be unable to unlock the device. This usually points to a problem that needs attention, such as an offline or disconnected device. Seam keeps retrying, and this error clears automatically if the access code is eventually issued.
|
|
135
|
+
`)
|
|
136
|
+
|
|
137
|
+
const failed_to_apply_mutations = common_access_code_error.extend({
|
|
138
|
+
error_code: z
|
|
139
|
+
.literal('failed_to_apply_mutations')
|
|
140
|
+
.describe(error_code_description),
|
|
141
|
+
}).describe(`
|
|
142
|
+
---
|
|
143
|
+
resource_type: access_code
|
|
144
|
+
undocumented: Unreleased.
|
|
145
|
+
---
|
|
146
|
+
Seam was unable to apply this access code's pending mutations to the device, so the code on the device does not match its requested state. Seam keeps retrying, and this error clears automatically once the mutations are applied.
|
|
147
|
+
`)
|
|
148
|
+
|
|
149
|
+
const failed_to_expire = common_access_code_error.extend({
|
|
150
|
+
error_code: z.literal('failed_to_expire').describe(error_code_description),
|
|
151
|
+
}).describe(`
|
|
152
|
+
---
|
|
153
|
+
resource_type: access_code
|
|
154
|
+
undocumented: Unreleased.
|
|
155
|
+
---
|
|
156
|
+
This access code is still active on the device even though its \`ends_at\` has passed, so the recipient may still be able to unlock the device after their access window ended. Seam is attempting to remove it, and this error clears automatically once the access code is no longer active.
|
|
157
|
+
`)
|
|
158
|
+
|
|
127
159
|
const access_code_inactive_error = common_access_code_error.extend({
|
|
128
160
|
error_code: z
|
|
129
161
|
.literal('access_code_inactive')
|
|
@@ -156,6 +188,9 @@ const access_code_error = z
|
|
|
156
188
|
conflicting_external_modification_error,
|
|
157
189
|
access_code_inactive_error,
|
|
158
190
|
code_constraints_violated,
|
|
191
|
+
failed_to_issue,
|
|
192
|
+
failed_to_apply_mutations,
|
|
193
|
+
failed_to_expire,
|
|
159
194
|
])
|
|
160
195
|
.describe(
|
|
161
196
|
'Errors associated with the [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes).',
|
|
@@ -178,6 +213,9 @@ const _access_code_error_map = z.object({
|
|
|
178
213
|
.nullable(),
|
|
179
214
|
access_code_inactive: access_code_inactive_error.optional().nullable(),
|
|
180
215
|
code_constraints_violated: code_constraints_violated.optional().nullable(),
|
|
216
|
+
failed_to_issue: failed_to_issue.optional().nullable(),
|
|
217
|
+
failed_to_apply_mutations: failed_to_apply_mutations.optional().nullable(),
|
|
218
|
+
failed_to_expire: failed_to_expire.optional().nullable(),
|
|
181
219
|
})
|
|
182
220
|
|
|
183
221
|
export type AccessCodeErrorMap = z.infer<typeof _access_code_error_map>
|
|
@@ -260,6 +298,28 @@ const delay_in_removing_from_device = common_access_code_warning.extend({
|
|
|
260
298
|
Delay in removing code from device.
|
|
261
299
|
`)
|
|
262
300
|
|
|
301
|
+
const delay_in_issuing = common_access_code_warning.extend({
|
|
302
|
+
warning_code: z
|
|
303
|
+
.literal('delay_in_issuing')
|
|
304
|
+
.describe(warning_code_description),
|
|
305
|
+
}).describe(`
|
|
306
|
+
---
|
|
307
|
+
undocumented: Unreleased.
|
|
308
|
+
---
|
|
309
|
+
Seam has not yet issued this access code, even though its start time is approaching, so access may not be ready when the recipient arrives. Seam is still attempting to issue it, and this warning clears automatically once issuance succeeds.
|
|
310
|
+
`)
|
|
311
|
+
|
|
312
|
+
const delay_in_applying_mutations = common_access_code_warning.extend({
|
|
313
|
+
warning_code: z
|
|
314
|
+
.literal('delay_in_applying_mutations')
|
|
315
|
+
.describe(warning_code_description),
|
|
316
|
+
}).describe(`
|
|
317
|
+
---
|
|
318
|
+
undocumented: Unreleased.
|
|
319
|
+
---
|
|
320
|
+
Seam has not yet applied this access code's pending mutations to the device, so the code on the device does not yet match its requested state. Seam is still attempting to apply them, and this warning clears automatically once the mutations are applied.
|
|
321
|
+
`)
|
|
322
|
+
|
|
263
323
|
const third_party_integration_detected = common_access_code_warning
|
|
264
324
|
.extend({
|
|
265
325
|
warning_code: z
|
|
@@ -317,6 +377,8 @@ const access_code_warning = z
|
|
|
317
377
|
external_modification_in_effect_warning,
|
|
318
378
|
delay_in_setting_on_device,
|
|
319
379
|
delay_in_removing_from_device,
|
|
380
|
+
delay_in_issuing,
|
|
381
|
+
delay_in_applying_mutations,
|
|
320
382
|
third_party_integration_detected,
|
|
321
383
|
igloo_algopin_must_be_used_within_24_hours,
|
|
322
384
|
management_transferred,
|
|
@@ -341,6 +403,10 @@ const _access_code_warning_map = z.object({
|
|
|
341
403
|
delay_in_removing_from_device: delay_in_removing_from_device
|
|
342
404
|
.optional()
|
|
343
405
|
.nullable(),
|
|
406
|
+
delay_in_issuing: delay_in_issuing.optional().nullable(),
|
|
407
|
+
delay_in_applying_mutations: delay_in_applying_mutations
|
|
408
|
+
.optional()
|
|
409
|
+
.nullable(),
|
|
344
410
|
third_party_integration_detected: third_party_integration_detected
|
|
345
411
|
.optional()
|
|
346
412
|
.nullable(),
|
|
@@ -300,6 +300,99 @@ export type AccessCodeFailedToSetOnDeviceEvent = z.infer<
|
|
|
300
300
|
typeof access_code_failed_to_set_on_device_event
|
|
301
301
|
>
|
|
302
302
|
|
|
303
|
+
export const access_code_issued_event = access_code_event.extend({
|
|
304
|
+
event_type: z.literal('access_code.issued'),
|
|
305
|
+
code,
|
|
306
|
+
}).describe(`
|
|
307
|
+
---
|
|
308
|
+
route_path: /access_codes
|
|
309
|
+
undocumented: Unreleased.
|
|
310
|
+
---
|
|
311
|
+
An [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes) was issued.
|
|
312
|
+
`)
|
|
313
|
+
|
|
314
|
+
export type AccessCodeIssuedEvent = z.infer<typeof access_code_issued_event>
|
|
315
|
+
|
|
316
|
+
export const access_code_delay_in_issuing_event = access_code_event
|
|
317
|
+
.extend({
|
|
318
|
+
event_type: z.literal('access_code.delay_in_issuing'),
|
|
319
|
+
})
|
|
320
|
+
.extend(access_code_event_issue_properties).describe(`
|
|
321
|
+
---
|
|
322
|
+
route_path: /access_codes
|
|
323
|
+
undocumented: Unreleased.
|
|
324
|
+
---
|
|
325
|
+
Seam has not yet issued this [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes), even though its start time is approaching, so access may not be ready when the recipient arrives. Seam is still attempting to issue it, and the accompanying \`delay_in_issuing\` warning clears automatically once issuance succeeds.
|
|
326
|
+
`)
|
|
327
|
+
|
|
328
|
+
export type AccessCodeDelayInIssuingEvent = z.infer<
|
|
329
|
+
typeof access_code_delay_in_issuing_event
|
|
330
|
+
>
|
|
331
|
+
|
|
332
|
+
export const access_code_failed_to_issue_event = access_code_event
|
|
333
|
+
.extend({
|
|
334
|
+
event_type: z.literal('access_code.failed_to_issue'),
|
|
335
|
+
})
|
|
336
|
+
.extend(access_code_event_issue_properties).describe(`
|
|
337
|
+
---
|
|
338
|
+
route_path: /access_codes
|
|
339
|
+
undocumented: Unreleased.
|
|
340
|
+
---
|
|
341
|
+
Seam was unable to issue this [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes) before its start time, so the recipient may be unable to unlock the device. This usually points to a problem that needs attention, such as an offline or disconnected device. Seam keeps retrying, and the accompanying \`failed_to_issue\` error clears automatically if the access code is eventually issued.
|
|
342
|
+
`)
|
|
343
|
+
|
|
344
|
+
export type AccessCodeFailedToIssueEvent = z.infer<
|
|
345
|
+
typeof access_code_failed_to_issue_event
|
|
346
|
+
>
|
|
347
|
+
|
|
348
|
+
export const access_code_delay_in_applying_mutations_event = access_code_event
|
|
349
|
+
.extend({
|
|
350
|
+
event_type: z.literal('access_code.delay_in_applying_mutations'),
|
|
351
|
+
})
|
|
352
|
+
.extend(access_code_event_issue_properties).describe(`
|
|
353
|
+
---
|
|
354
|
+
route_path: /access_codes
|
|
355
|
+
undocumented: Unreleased.
|
|
356
|
+
---
|
|
357
|
+
Seam has not yet applied this [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes)'s pending mutations to the device, so the code on the device does not yet match its requested state. Seam is still attempting to apply them, and the accompanying \`delay_in_applying_mutations\` warning clears automatically once the mutations are applied.
|
|
358
|
+
`)
|
|
359
|
+
|
|
360
|
+
export type AccessCodeDelayInApplyingMutationsEvent = z.infer<
|
|
361
|
+
typeof access_code_delay_in_applying_mutations_event
|
|
362
|
+
>
|
|
363
|
+
|
|
364
|
+
export const access_code_failed_to_apply_mutations_event = access_code_event
|
|
365
|
+
.extend({
|
|
366
|
+
event_type: z.literal('access_code.failed_to_apply_mutations'),
|
|
367
|
+
})
|
|
368
|
+
.extend(access_code_event_issue_properties).describe(`
|
|
369
|
+
---
|
|
370
|
+
route_path: /access_codes
|
|
371
|
+
undocumented: Unreleased.
|
|
372
|
+
---
|
|
373
|
+
Seam was unable to apply this [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes)'s pending mutations to the device, so the code on the device does not match its requested state. Seam keeps retrying, and the accompanying \`failed_to_apply_mutations\` error clears automatically once the mutations are applied.
|
|
374
|
+
`)
|
|
375
|
+
|
|
376
|
+
export type AccessCodeFailedToApplyMutationsEvent = z.infer<
|
|
377
|
+
typeof access_code_failed_to_apply_mutations_event
|
|
378
|
+
>
|
|
379
|
+
|
|
380
|
+
export const access_code_failed_to_expire_event = access_code_event
|
|
381
|
+
.extend({
|
|
382
|
+
event_type: z.literal('access_code.failed_to_expire'),
|
|
383
|
+
})
|
|
384
|
+
.extend(access_code_event_issue_properties).describe(`
|
|
385
|
+
---
|
|
386
|
+
route_path: /access_codes
|
|
387
|
+
undocumented: Unreleased.
|
|
388
|
+
---
|
|
389
|
+
An [access code](https://docs.seam.co/low-level-apis/smart-locks/access-codes) is still active on the device even though its \`ends_at\` has passed, so the recipient may still be able to unlock the device after their access window ended. Seam is attempting to remove it, and the accompanying \`failed_to_expire\` error clears automatically once the access code is no longer active.
|
|
390
|
+
`)
|
|
391
|
+
|
|
392
|
+
export type AccessCodeFailedToExpireEvent = z.infer<
|
|
393
|
+
typeof access_code_failed_to_expire_event
|
|
394
|
+
>
|
|
395
|
+
|
|
303
396
|
export const access_code_deleted_event = access_code_event.extend({
|
|
304
397
|
event_type: z.literal('access_code.deleted'),
|
|
305
398
|
code: code.nullable(),
|
|
@@ -460,6 +553,12 @@ export const access_code_events = [
|
|
|
460
553
|
access_code_removed_from_device_event,
|
|
461
554
|
access_code_delay_in_setting_on_device_event,
|
|
462
555
|
access_code_failed_to_set_on_device_event,
|
|
556
|
+
access_code_issued_event,
|
|
557
|
+
access_code_delay_in_issuing_event,
|
|
558
|
+
access_code_failed_to_issue_event,
|
|
559
|
+
access_code_delay_in_applying_mutations_event,
|
|
560
|
+
access_code_failed_to_apply_mutations_event,
|
|
561
|
+
access_code_failed_to_expire_event,
|
|
463
562
|
access_code_deleted_event,
|
|
464
563
|
access_code_delay_in_removing_from_device_event,
|
|
465
564
|
access_code_failed_to_remove_from_device_event,
|