@seamapi/types 1.723.0 → 1.725.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/dist/connect.cjs +8098 -2279
- package/dist/connect.cjs.map +1 -1
- package/dist/connect.d.cts +21305 -5507
- package/dist/index.cjs +8098 -2279
- package/dist/index.cjs.map +1 -1
- package/lib/seam/connect/models/access-codes/managed-access-code.d.ts +205 -142
- package/lib/seam/connect/models/access-codes/managed-access-code.js +57 -22
- 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 +95 -52
- package/lib/seam/connect/models/access-codes/unmanaged-access-code.js +5 -2
- package/lib/seam/connect/models/access-codes/unmanaged-access-code.js.map +1 -1
- package/lib/seam/connect/models/access-grants/access-grant.d.ts +721 -12
- package/lib/seam/connect/models/access-grants/access-grant.js +75 -1
- package/lib/seam/connect/models/access-grants/access-grant.js.map +1 -1
- package/lib/seam/connect/models/access-grants/access-method.d.ts +825 -8
- package/lib/seam/connect/models/access-grants/access-method.js +123 -1
- package/lib/seam/connect/models/access-grants/access-method.js.map +1 -1
- package/lib/seam/connect/models/access-grants/index.d.ts +1 -0
- package/lib/seam/connect/models/access-grants/index.js +1 -0
- package/lib/seam/connect/models/access-grants/index.js.map +1 -1
- package/lib/seam/connect/models/access-grants/pending-mutations.d.ts +255 -0
- package/lib/seam/connect/models/access-grants/pending-mutations.js +78 -0
- package/lib/seam/connect/models/access-grants/pending-mutations.js.map +1 -0
- package/lib/seam/connect/models/access-grants/requested-access-method.d.ts +3 -0
- package/lib/seam/connect/models/access-grants/requested-access-method.js +6 -0
- package/lib/seam/connect/models/access-grants/requested-access-method.js.map +1 -1
- package/lib/seam/connect/models/acs/acs-entrance.d.ts +0 -5
- package/lib/seam/connect/models/acs/acs-users/acs-user.d.ts +80 -80
- package/lib/seam/connect/models/acs/metadata/salto-space.d.ts +0 -3
- package/lib/seam/connect/models/acs/metadata/salto-space.js +0 -5
- package/lib/seam/connect/models/acs/metadata/salto-space.js.map +1 -1
- package/lib/seam/connect/models/action-attempts/action-attempt.d.ts +36 -16
- package/lib/seam/connect/models/action-attempts/encode-credential.d.ts +5 -5
- package/lib/seam/connect/models/action-attempts/encode-credential.js +5 -5
- package/lib/seam/connect/models/action-attempts/encode-credential.js.map +1 -1
- package/lib/seam/connect/models/action-attempts/lock-door.d.ts +13 -3
- package/lib/seam/connect/models/action-attempts/lock-door.js +8 -1
- package/lib/seam/connect/models/action-attempts/lock-door.js.map +1 -1
- package/lib/seam/connect/models/action-attempts/scan-credential.d.ts +5 -5
- package/lib/seam/connect/models/action-attempts/scan-credential.js +5 -5
- package/lib/seam/connect/models/action-attempts/scan-credential.js.map +1 -1
- package/lib/seam/connect/models/action-attempts/unlock-door.d.ts +13 -3
- package/lib/seam/connect/models/action-attempts/unlock-door.js +8 -1
- package/lib/seam/connect/models/action-attempts/unlock-door.js.map +1 -1
- package/lib/seam/connect/models/batch.d.ts +3952 -752
- package/lib/seam/connect/models/connected-accounts/connected-account.d.ts +58 -0
- package/lib/seam/connect/models/connected-accounts/connected-account.js +7 -0
- package/lib/seam/connect/models/connected-accounts/connected-account.js.map +1 -1
- package/lib/seam/connect/models/customer/access-grant-resources.d.ts +6 -0
- package/lib/seam/connect/models/customer/access-grant-resources.js +4 -0
- package/lib/seam/connect/models/customer/access-grant-resources.js.map +1 -1
- package/lib/seam/connect/models/customer/customer-data.d.ts +5 -0
- package/lib/seam/connect/models/customer/customer-portal.d.ts +169 -10
- package/lib/seam/connect/models/customer/customer-portal.js +46 -4
- package/lib/seam/connect/models/customer/customer-portal.js.map +1 -1
- package/lib/seam/connect/models/devices/device-metadata.d.ts +45 -38
- package/lib/seam/connect/models/devices/device-metadata.js +26 -9
- package/lib/seam/connect/models/devices/device-metadata.js.map +1 -1
- package/lib/seam/connect/models/devices/device-provider.d.ts +2 -5
- package/lib/seam/connect/models/devices/device-provider.js +2 -3
- package/lib/seam/connect/models/devices/device-provider.js.map +1 -1
- package/lib/seam/connect/models/devices/device-type.d.ts +0 -2
- package/lib/seam/connect/models/devices/device-type.js +0 -2
- package/lib/seam/connect/models/devices/device-type.js.map +1 -1
- package/lib/seam/connect/models/devices/device.d.ts +203 -52
- package/lib/seam/connect/models/devices/device.js +31 -0
- package/lib/seam/connect/models/devices/device.js.map +1 -1
- package/lib/seam/connect/models/devices/unmanaged-device.d.ts +97 -38
- package/lib/seam/connect/models/events/access-codes.d.ts +1390 -0
- package/lib/seam/connect/models/events/access-codes.js +41 -11
- package/lib/seam/connect/models/events/access-codes.js.map +1 -1
- package/lib/seam/connect/models/events/access-methods.d.ts +60 -0
- package/lib/seam/connect/models/events/access-methods.js +9 -0
- package/lib/seam/connect/models/events/access-methods.js.map +1 -1
- package/lib/seam/connect/models/events/acs/index.d.ts +93 -0
- package/lib/seam/connect/models/events/acs/systems.d.ts +186 -0
- package/lib/seam/connect/models/events/acs/systems.js +19 -2
- package/lib/seam/connect/models/events/acs/systems.js.map +1 -1
- package/lib/seam/connect/models/events/action-attempts.d.ts +332 -0
- package/lib/seam/connect/models/events/action-attempts.js +46 -0
- package/lib/seam/connect/models/events/action-attempts.js.map +1 -1
- package/lib/seam/connect/models/events/common.d.ts +26 -0
- package/lib/seam/connect/models/events/common.js +22 -0
- package/lib/seam/connect/models/events/common.js.map +1 -1
- package/lib/seam/connect/models/events/connected-accounts.d.ts +140 -272
- package/lib/seam/connect/models/events/connected-accounts.js +17 -9
- package/lib/seam/connect/models/events/connected-accounts.js.map +1 -1
- package/lib/seam/connect/models/events/devices.d.ts +1128 -0
- package/lib/seam/connect/models/events/devices.js +39 -11
- package/lib/seam/connect/models/events/devices.js.map +1 -1
- package/lib/seam/connect/models/events/seam-event.d.ts +1675 -196
- package/lib/seam/connect/models/events/spaces.d.ts +12 -12
- package/lib/seam/connect/models/phones/phone-session.d.ts +0 -20
- package/lib/seam/connect/openapi.d.ts +6484 -2215
- package/lib/seam/connect/openapi.js +8922 -3442
- package/lib/seam/connect/openapi.js.map +1 -1
- package/lib/seam/connect/route-types.d.ts +7211 -1139
- package/package.json +1 -1
- package/src/lib/seam/connect/internal/model-types.ts +1 -0
- package/src/lib/seam/connect/models/access-codes/managed-access-code.ts +76 -24
- package/src/lib/seam/connect/models/access-codes/unmanaged-access-code.ts +10 -2
- package/src/lib/seam/connect/models/access-grants/access-grant.ts +92 -1
- package/src/lib/seam/connect/models/access-grants/access-method.ts +162 -1
- package/src/lib/seam/connect/models/access-grants/index.ts +1 -0
- package/src/lib/seam/connect/models/access-grants/pending-mutations.ts +101 -0
- package/src/lib/seam/connect/models/access-grants/requested-access-method.ts +8 -0
- package/src/lib/seam/connect/models/acs/metadata/salto-space.ts +0 -5
- package/src/lib/seam/connect/models/action-attempts/encode-credential.ts +5 -5
- package/src/lib/seam/connect/models/action-attempts/lock-door.ts +10 -1
- package/src/lib/seam/connect/models/action-attempts/scan-credential.ts +5 -5
- package/src/lib/seam/connect/models/action-attempts/unlock-door.ts +10 -1
- package/src/lib/seam/connect/models/connected-accounts/connected-account.ts +10 -0
- package/src/lib/seam/connect/models/customer/access-grant-resources.ts +7 -0
- package/src/lib/seam/connect/models/customer/customer-portal.ts +66 -6
- package/src/lib/seam/connect/models/devices/device-metadata.ts +36 -10
- package/src/lib/seam/connect/models/devices/device-provider.ts +2 -3
- package/src/lib/seam/connect/models/devices/device-type.ts +0 -2
- package/src/lib/seam/connect/models/devices/device.ts +37 -0
- package/src/lib/seam/connect/models/events/access-codes.ts +49 -16
- package/src/lib/seam/connect/models/events/access-methods.ts +14 -0
- package/src/lib/seam/connect/models/events/acs/systems.ts +21 -3
- package/src/lib/seam/connect/models/events/action-attempts.ts +64 -0
- package/src/lib/seam/connect/models/events/common.ts +31 -0
- package/src/lib/seam/connect/models/events/connected-accounts.ts +23 -11
- package/src/lib/seam/connect/models/events/devices.ts +51 -18
- package/src/lib/seam/connect/openapi.ts +8974 -2885
- package/src/lib/seam/connect/route-types.ts +8121 -1686
package/package.json
CHANGED
|
@@ -156,22 +156,6 @@ const salto_ks_user_not_subscribed = common_access_code_error
|
|
|
156
156
|
})
|
|
157
157
|
.describe('Salto site user is not subscribed.')
|
|
158
158
|
|
|
159
|
-
const hubitat_device_programming_delay = common_access_code_error
|
|
160
|
-
.extend({
|
|
161
|
-
error_code: z
|
|
162
|
-
.literal('hubitat_device_programming_delay')
|
|
163
|
-
.describe(error_code_description),
|
|
164
|
-
})
|
|
165
|
-
.describe('Access code has not yet been fully moved to the device.')
|
|
166
|
-
|
|
167
|
-
const hubitat_no_free_positions_available = common_access_code_error
|
|
168
|
-
.extend({
|
|
169
|
-
error_code: z
|
|
170
|
-
.literal('hubitat_no_free_positions_available')
|
|
171
|
-
.describe(error_code_description),
|
|
172
|
-
})
|
|
173
|
-
.describe('No free positions available on the device.')
|
|
174
|
-
|
|
175
159
|
const smartthings_no_free_slots_available = common_access_code_error
|
|
176
160
|
.extend({
|
|
177
161
|
error_code: z
|
|
@@ -214,6 +198,16 @@ const keynest_unsupported_third_party_locker = common_access_code_error
|
|
|
214
198
|
})
|
|
215
199
|
.describe('KeyNest locker is not supported.')
|
|
216
200
|
|
|
201
|
+
const replaced_by_newer_access_code = common_access_code_error
|
|
202
|
+
.extend({
|
|
203
|
+
error_code: z
|
|
204
|
+
.literal('replaced_by_newer_access_code')
|
|
205
|
+
.describe(error_code_description),
|
|
206
|
+
})
|
|
207
|
+
.describe(
|
|
208
|
+
'This access code was overridden on the device by a newer access code programmed to the same slot.',
|
|
209
|
+
)
|
|
210
|
+
|
|
217
211
|
const access_code_error = z
|
|
218
212
|
.discriminatedUnion('error_code', [
|
|
219
213
|
smartthings_failed_to_set_access_code_error,
|
|
@@ -233,13 +227,12 @@ const access_code_error = z
|
|
|
233
227
|
august_lock_missing_keypad,
|
|
234
228
|
august_lock_temporarily_offline_error,
|
|
235
229
|
salto_ks_user_not_subscribed,
|
|
236
|
-
hubitat_device_programming_delay,
|
|
237
|
-
hubitat_no_free_positions_available,
|
|
238
230
|
wyze_duplicate_code_name,
|
|
239
231
|
wyze_potential_duplicate_code,
|
|
240
232
|
dormakaba_oracode_invalid_time_range,
|
|
241
233
|
kwikset_insufficient_permissions,
|
|
242
234
|
keynest_unsupported_third_party_locker,
|
|
235
|
+
replaced_by_newer_access_code,
|
|
243
236
|
])
|
|
244
237
|
.describe(
|
|
245
238
|
'Errors associated with the [access code](https://docs.seam.co/latest/capability-guides/smart-locks/access-codes).',
|
|
@@ -291,12 +284,6 @@ const _access_code_error_map = z.object({
|
|
|
291
284
|
salto_ks_user_not_subscribed: salto_ks_user_not_subscribed
|
|
292
285
|
.optional()
|
|
293
286
|
.nullable(),
|
|
294
|
-
hubitat_device_programming_delay: hubitat_device_programming_delay
|
|
295
|
-
.optional()
|
|
296
|
-
.nullable(),
|
|
297
|
-
hubitat_no_free_positions_available: hubitat_no_free_positions_available
|
|
298
|
-
.optional()
|
|
299
|
-
.nullable(),
|
|
300
287
|
wyze_duplicate_code_name: wyze_duplicate_code_name.optional().nullable(),
|
|
301
288
|
wyze_potential_duplicate_code: wyze_potential_duplicate_code
|
|
302
289
|
.optional()
|
|
@@ -307,6 +294,9 @@ const _access_code_error_map = z.object({
|
|
|
307
294
|
keynest_unsupported_third_party_locker: keynest_unsupported_third_party_locker
|
|
308
295
|
.optional()
|
|
309
296
|
.nullable(),
|
|
297
|
+
replaced_by_newer_access_code: replaced_by_newer_access_code
|
|
298
|
+
.optional()
|
|
299
|
+
.nullable(),
|
|
310
300
|
})
|
|
311
301
|
|
|
312
302
|
export type AccessCodeErrorMap = z.infer<typeof _access_code_error_map>
|
|
@@ -437,6 +427,12 @@ const ultraloq_access_code_disabled = common_access_code_warning
|
|
|
437
427
|
'Access code is disabled on Ultraloq device. Re-enable through the Ultraloq mobile app.',
|
|
438
428
|
)
|
|
439
429
|
|
|
430
|
+
const being_deleted = common_access_code_warning
|
|
431
|
+
.extend({
|
|
432
|
+
warning_code: z.literal('being_deleted').describe(warning_code_description),
|
|
433
|
+
})
|
|
434
|
+
.describe('Access code is being deleted.')
|
|
435
|
+
|
|
440
436
|
const access_code_warning = z
|
|
441
437
|
.discriminatedUnion('warning_code', [
|
|
442
438
|
smartthings_failed_to_set_access_code_warning,
|
|
@@ -452,6 +448,7 @@ const access_code_warning = z
|
|
|
452
448
|
management_transferred,
|
|
453
449
|
kwikset_unable_to_confirm_code_warning,
|
|
454
450
|
ultraloq_access_code_disabled,
|
|
451
|
+
being_deleted,
|
|
455
452
|
])
|
|
456
453
|
.describe(
|
|
457
454
|
'Warnings associated with the [access code](https://docs.seam.co/latest/capability-guides/smart-locks/access-codes).',
|
|
@@ -489,10 +486,59 @@ const _access_code_warning_map = z.object({
|
|
|
489
486
|
ultraloq_access_code_disabled: ultraloq_access_code_disabled
|
|
490
487
|
.optional()
|
|
491
488
|
.nullable(),
|
|
489
|
+
being_deleted: being_deleted.optional().nullable(),
|
|
492
490
|
})
|
|
493
491
|
|
|
494
492
|
export type AccessCodeWarningMap = z.infer<typeof _access_code_warning_map>
|
|
495
493
|
|
|
494
|
+
export const dormakaba_oracode_access_code_metadata = z
|
|
495
|
+
.object({
|
|
496
|
+
stay_id: z
|
|
497
|
+
.number()
|
|
498
|
+
.describe('Dormakaba Oracode stay ID associated with this access code.'),
|
|
499
|
+
user_level_id: z
|
|
500
|
+
.string()
|
|
501
|
+
.optional()
|
|
502
|
+
.describe(
|
|
503
|
+
'Dormakaba Oracode user level ID associated with this access code.',
|
|
504
|
+
),
|
|
505
|
+
user_level_name: z
|
|
506
|
+
.string()
|
|
507
|
+
.nullable()
|
|
508
|
+
.describe(
|
|
509
|
+
'Dormakaba Oracode user level name associated with this access code.',
|
|
510
|
+
),
|
|
511
|
+
site_name: z
|
|
512
|
+
.string()
|
|
513
|
+
.optional()
|
|
514
|
+
.describe(
|
|
515
|
+
'Dormakaba Oracode site name associated with this access code.',
|
|
516
|
+
),
|
|
517
|
+
is_cancellable: z
|
|
518
|
+
.boolean()
|
|
519
|
+
.optional()
|
|
520
|
+
.describe(
|
|
521
|
+
'Indicates whether the stay can be cancelled via the Dormakaba Oracode API.',
|
|
522
|
+
),
|
|
523
|
+
is_extendable: z
|
|
524
|
+
.boolean()
|
|
525
|
+
.optional()
|
|
526
|
+
.describe(
|
|
527
|
+
'Indicates whether the stay can be extended via the Dormakaba Oracode API.',
|
|
528
|
+
),
|
|
529
|
+
is_early_checkin_able: z
|
|
530
|
+
.boolean()
|
|
531
|
+
.optional()
|
|
532
|
+
.describe('Indicates whether early check-in is available for this stay.'),
|
|
533
|
+
is_overridable: z
|
|
534
|
+
.boolean()
|
|
535
|
+
.optional()
|
|
536
|
+
.describe(
|
|
537
|
+
'Indicates whether the access code can be overridden. When false, the maximum number of overrides has been reached.',
|
|
538
|
+
),
|
|
539
|
+
})
|
|
540
|
+
.describe('Metadata for a dormakaba Oracode access code.')
|
|
541
|
+
|
|
496
542
|
export const access_code = z.object({
|
|
497
543
|
workspace_id: z
|
|
498
544
|
.string()
|
|
@@ -650,6 +696,12 @@ export const access_code = z.object({
|
|
|
650
696
|
.describe(
|
|
651
697
|
'Indicates whether the access code is intended for use in offline scenarios. If `true`, this code can be created on a device without a network connection.',
|
|
652
698
|
),
|
|
699
|
+
dormakaba_oracode_metadata: dormakaba_oracode_access_code_metadata
|
|
700
|
+
.nullable()
|
|
701
|
+
.optional()
|
|
702
|
+
.describe(
|
|
703
|
+
'Metadata for a dormakaba Oracode managed access code. Only present for access codes from dormakaba Oracode devices.',
|
|
704
|
+
),
|
|
653
705
|
}).describe(`
|
|
654
706
|
---
|
|
655
707
|
route_path: /access_codes
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod'
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
access_code,
|
|
5
|
+
dormakaba_oracode_access_code_metadata,
|
|
6
|
+
} from './managed-access-code.js'
|
|
4
7
|
|
|
5
8
|
export const unmanaged_access_code = access_code
|
|
6
9
|
.pick({
|
|
@@ -26,6 +29,11 @@ export const unmanaged_access_code = access_code
|
|
|
26
29
|
.describe(
|
|
27
30
|
'Current status of the access code within the operational lifecycle. `set` indicates that the code is active and operational.',
|
|
28
31
|
),
|
|
32
|
+
dormakaba_oracode_metadata: dormakaba_oracode_access_code_metadata
|
|
33
|
+
.nullable()
|
|
34
|
+
.describe(
|
|
35
|
+
'Metadata for a dormakaba Oracode unmanaged access code. Only present for unmanaged access codes from dormakaba Oracode devices.',
|
|
36
|
+
),
|
|
29
37
|
}).describe(`
|
|
30
38
|
---
|
|
31
39
|
route_path: /access_codes/unmanaged
|
|
@@ -39,7 +47,7 @@ export const unmanaged_access_code = access_code
|
|
|
39
47
|
Prior to using Seam to manage your devices, you may have used another lock management system to manage the access codes on your devices. Where possible, we help you keep any existing access codes on devices and transition those codes to ones managed by your Seam workspace.
|
|
40
48
|
|
|
41
49
|
Not all providers support unmanaged access codes. The following providers do not support unmanaged access codes:
|
|
42
|
-
|
|
50
|
+
|
|
43
51
|
- [Kwikset](https://docs.seam.co/latest/device-and-system-integration-guides/kwikset-locks)
|
|
44
52
|
`)
|
|
45
53
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod'
|
|
2
2
|
|
|
3
|
+
import { access_grant_pending_mutations } from './pending-mutations.js'
|
|
3
4
|
import { requested_access_method } from './requested-access-method.js'
|
|
4
5
|
|
|
5
6
|
const common_access_grant_error = z.object({
|
|
@@ -60,14 +61,99 @@ const being_deleted = common_access_grant_warning
|
|
|
60
61
|
'Indicates that the [access grant](https://docs.seam.co/latest/capability-guides/access-grants) is being deleted.',
|
|
61
62
|
)
|
|
62
63
|
|
|
64
|
+
const underprovisioned_access = common_access_grant_warning
|
|
65
|
+
.extend({
|
|
66
|
+
warning_code: z
|
|
67
|
+
.literal('underprovisioned_access')
|
|
68
|
+
.describe(warning_code_description),
|
|
69
|
+
})
|
|
70
|
+
.describe(
|
|
71
|
+
'Indicates that the access grant should have access to more locations than it currently does. Access methods are being created for the missing locations.',
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
const overprovisioned_access = common_access_grant_warning
|
|
75
|
+
.extend({
|
|
76
|
+
warning_code: z
|
|
77
|
+
.literal('overprovisioned_access')
|
|
78
|
+
.describe(warning_code_description),
|
|
79
|
+
})
|
|
80
|
+
.describe(
|
|
81
|
+
'Indicates that the access grant has access to locations it should not have. Access methods are being removed from the extra locations.',
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
const updating_access_times = common_access_grant_warning
|
|
85
|
+
.extend({
|
|
86
|
+
warning_code: z
|
|
87
|
+
.literal('updating_access_times')
|
|
88
|
+
.describe(warning_code_description),
|
|
89
|
+
access_method_ids: z
|
|
90
|
+
.array(z.string().uuid())
|
|
91
|
+
.describe('IDs of the access methods being updated.'),
|
|
92
|
+
})
|
|
93
|
+
.describe(
|
|
94
|
+
'Indicates that the access times for this [access grant](https://docs.seam.co/latest/capability-guides/access-grants) are being updated.',
|
|
95
|
+
)
|
|
96
|
+
|
|
97
|
+
const requested_code_unavailable = common_access_grant_warning
|
|
98
|
+
.extend({
|
|
99
|
+
warning_code: z
|
|
100
|
+
.literal('requested_code_unavailable')
|
|
101
|
+
.describe(warning_code_description),
|
|
102
|
+
device_id: z
|
|
103
|
+
.string()
|
|
104
|
+
.uuid()
|
|
105
|
+
.describe('ID of the device where the requested code was unavailable.'),
|
|
106
|
+
original_code: z
|
|
107
|
+
.string()
|
|
108
|
+
.describe('The originally requested PIN code that was unavailable.'),
|
|
109
|
+
new_code: z
|
|
110
|
+
.string()
|
|
111
|
+
.describe('The new PIN code that was assigned instead.'),
|
|
112
|
+
})
|
|
113
|
+
.describe(
|
|
114
|
+
'Indicates that the requested PIN code was already in use on a device, so a different code was assigned.',
|
|
115
|
+
)
|
|
116
|
+
|
|
117
|
+
const device_does_not_support_access_codes = common_access_grant_warning
|
|
118
|
+
.extend({
|
|
119
|
+
warning_code: z
|
|
120
|
+
.literal('device_does_not_support_access_codes')
|
|
121
|
+
.describe(warning_code_description),
|
|
122
|
+
device_id: z
|
|
123
|
+
.string()
|
|
124
|
+
.uuid()
|
|
125
|
+
.describe('ID of the device that does not support access codes.'),
|
|
126
|
+
})
|
|
127
|
+
.describe(
|
|
128
|
+
'Indicates that a device in the access grant does not support access codes and was excluded from code materialization.',
|
|
129
|
+
)
|
|
130
|
+
|
|
63
131
|
const access_grant_warning = z
|
|
64
|
-
.discriminatedUnion('warning_code', [
|
|
132
|
+
.discriminatedUnion('warning_code', [
|
|
133
|
+
being_deleted,
|
|
134
|
+
underprovisioned_access,
|
|
135
|
+
overprovisioned_access,
|
|
136
|
+
updating_access_times,
|
|
137
|
+
requested_code_unavailable,
|
|
138
|
+
device_does_not_support_access_codes,
|
|
139
|
+
])
|
|
65
140
|
.describe(
|
|
66
141
|
'Warning associated with the [access grant](https://docs.seam.co/latest/capability-guides/access-grants).',
|
|
67
142
|
)
|
|
68
143
|
|
|
69
144
|
const _access_grant_warning_map = z.object({
|
|
70
145
|
being_deleted: being_deleted.optional().nullable(),
|
|
146
|
+
underprovisioned_access: underprovisioned_access.optional().nullable(),
|
|
147
|
+
overprovisioned_access: overprovisioned_access.optional().nullable(),
|
|
148
|
+
updating_access_times: updating_access_times.optional().nullable(),
|
|
149
|
+
requested_code_unavailable_by_device: z
|
|
150
|
+
.record(z.string().uuid(), requested_code_unavailable)
|
|
151
|
+
.optional()
|
|
152
|
+
.nullable(),
|
|
153
|
+
device_does_not_support_access_codes: z
|
|
154
|
+
.record(z.string().uuid(), device_does_not_support_access_codes)
|
|
155
|
+
.optional()
|
|
156
|
+
.nullable(),
|
|
71
157
|
})
|
|
72
158
|
|
|
73
159
|
export type AccessGrantWarningMap = z.infer<typeof _access_grant_warning_map>
|
|
@@ -154,6 +240,11 @@ export const access_grant = z.object({
|
|
|
154
240
|
.describe(
|
|
155
241
|
'ID of the customization profile associated with the Access Grant.',
|
|
156
242
|
),
|
|
243
|
+
pending_mutations: z
|
|
244
|
+
.array(access_grant_pending_mutations)
|
|
245
|
+
.describe(
|
|
246
|
+
'List of pending mutations for the access grant. This shows updates that are in progress.',
|
|
247
|
+
),
|
|
157
248
|
}).describe(`
|
|
158
249
|
---
|
|
159
250
|
draft: Early access.
|
|
@@ -23,18 +23,174 @@ const being_deleted = common_access_method_warning
|
|
|
23
23
|
'Indicates that the [access method](https://docs.seam.co/latest/capability-guides/access-grants/delivering-access-methods) is being deleted.',
|
|
24
24
|
)
|
|
25
25
|
|
|
26
|
+
const updating_access_times_warning = common_access_method_warning
|
|
27
|
+
.extend({
|
|
28
|
+
warning_code: z
|
|
29
|
+
.literal('updating_access_times')
|
|
30
|
+
.describe(warning_code_description),
|
|
31
|
+
})
|
|
32
|
+
.describe(
|
|
33
|
+
'Indicates that the access times for this [access method](https://docs.seam.co/latest/capability-guides/access-grants/delivering-access-methods) are being updated.',
|
|
34
|
+
)
|
|
35
|
+
|
|
26
36
|
const access_method_warning = z
|
|
27
|
-
.discriminatedUnion('warning_code', [
|
|
37
|
+
.discriminatedUnion('warning_code', [
|
|
38
|
+
being_deleted,
|
|
39
|
+
updating_access_times_warning,
|
|
40
|
+
])
|
|
28
41
|
.describe(
|
|
29
42
|
'Warning associated with the [access method](https://docs.seam.co/latest/capability-guides/access-grants/delivering-access-methods).',
|
|
30
43
|
)
|
|
31
44
|
|
|
32
45
|
const _access_method_warning_map = z.object({
|
|
33
46
|
being_deleted: being_deleted.optional().nullable(),
|
|
47
|
+
updating_access_times: updating_access_times_warning.optional().nullable(),
|
|
34
48
|
})
|
|
35
49
|
|
|
36
50
|
export type AccessMethodWarningMap = z.infer<typeof _access_method_warning_map>
|
|
37
51
|
|
|
52
|
+
// Pending mutations for access methods
|
|
53
|
+
const common_pending_mutation = z.object({
|
|
54
|
+
created_at: z
|
|
55
|
+
.string()
|
|
56
|
+
.datetime()
|
|
57
|
+
.describe('Date and time at which the mutation was created.'),
|
|
58
|
+
message: z.string().describe('Detailed description of the mutation.'),
|
|
59
|
+
})
|
|
60
|
+
|
|
61
|
+
const provisioning_access_mutation = common_pending_mutation
|
|
62
|
+
.extend({
|
|
63
|
+
mutation_code: z
|
|
64
|
+
.literal('provisioning_access')
|
|
65
|
+
.describe(
|
|
66
|
+
'Mutation code to indicate that Seam is in the process of provisioning access for this access method on new devices.',
|
|
67
|
+
),
|
|
68
|
+
from: z
|
|
69
|
+
.object({
|
|
70
|
+
device_ids: z
|
|
71
|
+
.array(z.string().uuid())
|
|
72
|
+
.describe('Previous device IDs where access was provisioned.'),
|
|
73
|
+
})
|
|
74
|
+
.describe('Previous device configuration.'),
|
|
75
|
+
to: z
|
|
76
|
+
.object({
|
|
77
|
+
device_ids: z
|
|
78
|
+
.array(z.string().uuid())
|
|
79
|
+
.describe('New device IDs where access is being provisioned.'),
|
|
80
|
+
})
|
|
81
|
+
.describe('New device configuration.'),
|
|
82
|
+
})
|
|
83
|
+
.describe(
|
|
84
|
+
'Seam is in the process of provisioning access for this access method on new devices.',
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
const revoking_access_mutation = common_pending_mutation
|
|
88
|
+
.extend({
|
|
89
|
+
mutation_code: z
|
|
90
|
+
.literal('revoking_access')
|
|
91
|
+
.describe(
|
|
92
|
+
'Mutation code to indicate that Seam is in the process of revoking access for this access method from devices.',
|
|
93
|
+
),
|
|
94
|
+
from: z
|
|
95
|
+
.object({
|
|
96
|
+
device_ids: z
|
|
97
|
+
.array(z.string().uuid())
|
|
98
|
+
.describe('Previous device IDs where access existed.'),
|
|
99
|
+
})
|
|
100
|
+
.describe('Previous device configuration.'),
|
|
101
|
+
to: z
|
|
102
|
+
.object({
|
|
103
|
+
device_ids: z
|
|
104
|
+
.array(z.string().uuid())
|
|
105
|
+
.describe('New device IDs where access should remain.'),
|
|
106
|
+
})
|
|
107
|
+
.describe('New device configuration.'),
|
|
108
|
+
})
|
|
109
|
+
.describe(
|
|
110
|
+
'Seam is in the process of revoking access for this access method from devices.',
|
|
111
|
+
)
|
|
112
|
+
|
|
113
|
+
const updating_access_times_mutation = common_pending_mutation
|
|
114
|
+
.extend({
|
|
115
|
+
mutation_code: z
|
|
116
|
+
.literal('updating_access_times')
|
|
117
|
+
.describe(
|
|
118
|
+
'Mutation code to indicate that Seam is in the process of updating the access times for this access method.',
|
|
119
|
+
),
|
|
120
|
+
from: z
|
|
121
|
+
.object({
|
|
122
|
+
starts_at: z
|
|
123
|
+
.string()
|
|
124
|
+
.datetime()
|
|
125
|
+
.nullable()
|
|
126
|
+
.describe('Previous start time for access.'),
|
|
127
|
+
ends_at: z
|
|
128
|
+
.string()
|
|
129
|
+
.datetime()
|
|
130
|
+
.nullable()
|
|
131
|
+
.describe('Previous end time for access.'),
|
|
132
|
+
})
|
|
133
|
+
.describe('Previous access time configuration.'),
|
|
134
|
+
to: z
|
|
135
|
+
.object({
|
|
136
|
+
starts_at: z
|
|
137
|
+
.string()
|
|
138
|
+
.datetime()
|
|
139
|
+
.nullable()
|
|
140
|
+
.describe('New start time for access.'),
|
|
141
|
+
ends_at: z
|
|
142
|
+
.string()
|
|
143
|
+
.datetime()
|
|
144
|
+
.nullable()
|
|
145
|
+
.describe('New end time for access.'),
|
|
146
|
+
})
|
|
147
|
+
.describe('New access time configuration.'),
|
|
148
|
+
})
|
|
149
|
+
.describe(
|
|
150
|
+
'Seam is in the process of updating the access times for this access method.',
|
|
151
|
+
)
|
|
152
|
+
|
|
153
|
+
const notifying_connector_mutation = common_pending_mutation
|
|
154
|
+
.extend({
|
|
155
|
+
mutation_code: z
|
|
156
|
+
.literal('notifying_connector')
|
|
157
|
+
.describe(
|
|
158
|
+
"Mutation code to indicate that Seam is in the process of notifying the connector about this access method's issuance.",
|
|
159
|
+
),
|
|
160
|
+
// Intentionally generic — each connector type has its own provider_data shape
|
|
161
|
+
// (e.g., Cloudbeds uses { keyId: string, keyType: string })
|
|
162
|
+
provider_data: z
|
|
163
|
+
.record(z.any())
|
|
164
|
+
.describe('Provider-specific data needed to notify the connector.'),
|
|
165
|
+
})
|
|
166
|
+
.describe(
|
|
167
|
+
"Seam is in the process of notifying the connector about this access method's issuance.",
|
|
168
|
+
)
|
|
169
|
+
|
|
170
|
+
export const access_method_pending_mutations = z.discriminatedUnion(
|
|
171
|
+
'mutation_code',
|
|
172
|
+
[
|
|
173
|
+
provisioning_access_mutation,
|
|
174
|
+
revoking_access_mutation,
|
|
175
|
+
updating_access_times_mutation,
|
|
176
|
+
],
|
|
177
|
+
)
|
|
178
|
+
|
|
179
|
+
export type AccessMethodPendingMutation = z.infer<
|
|
180
|
+
typeof access_method_pending_mutations
|
|
181
|
+
>
|
|
182
|
+
|
|
183
|
+
const _access_method_pending_mutations_map = z.object({
|
|
184
|
+
provisioning_access: provisioning_access_mutation.optional().nullable(),
|
|
185
|
+
revoking_access: revoking_access_mutation.optional().nullable(),
|
|
186
|
+
updating_access_times: updating_access_times_mutation.optional().nullable(),
|
|
187
|
+
notifying_connector: notifying_connector_mutation.optional().nullable(),
|
|
188
|
+
})
|
|
189
|
+
|
|
190
|
+
export type AccessMethodPendingMutationsMap = z.infer<
|
|
191
|
+
typeof _access_method_pending_mutations_map
|
|
192
|
+
>
|
|
193
|
+
|
|
38
194
|
export const access_method = z.object({
|
|
39
195
|
workspace_id: z
|
|
40
196
|
.string()
|
|
@@ -84,6 +240,11 @@ export const access_method = z.object({
|
|
|
84
240
|
.describe(
|
|
85
241
|
'Warnings associated with the [access method](https://docs.seam.co/latest/capability-guides/access-grants/delivering-access-methods).',
|
|
86
242
|
),
|
|
243
|
+
pending_mutations: z
|
|
244
|
+
.array(access_method_pending_mutations)
|
|
245
|
+
.describe(
|
|
246
|
+
'Pending mutations for the [access method](https://docs.seam.co/latest/capability-guides/access-grants/delivering-access-methods). Indicates operations that are in progress.',
|
|
247
|
+
),
|
|
87
248
|
customization_profile_id: z
|
|
88
249
|
.string()
|
|
89
250
|
.uuid()
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { z } from 'zod'
|
|
2
|
+
|
|
3
|
+
const common_pending_mutation = z.object({
|
|
4
|
+
created_at: z
|
|
5
|
+
.string()
|
|
6
|
+
.datetime()
|
|
7
|
+
.describe('Date and time at which the mutation was created.'),
|
|
8
|
+
message: z.string().describe('Detailed description of the mutation.'),
|
|
9
|
+
})
|
|
10
|
+
|
|
11
|
+
const updating_spaces_mutation = common_pending_mutation
|
|
12
|
+
.extend({
|
|
13
|
+
mutation_code: z
|
|
14
|
+
.literal('updating_spaces')
|
|
15
|
+
.describe(
|
|
16
|
+
'Mutation code to indicate that Seam is in the process of updating the spaces (devices) associated with this access grant.',
|
|
17
|
+
),
|
|
18
|
+
from: z
|
|
19
|
+
.object({
|
|
20
|
+
device_ids: z
|
|
21
|
+
.array(z.string().uuid())
|
|
22
|
+
.describe('Previous device IDs where access codes existed.'),
|
|
23
|
+
})
|
|
24
|
+
.describe('Previous location configuration.'),
|
|
25
|
+
to: z
|
|
26
|
+
.object({
|
|
27
|
+
device_ids: z
|
|
28
|
+
.array(z.string().uuid())
|
|
29
|
+
.describe('New device IDs where access codes should be created.'),
|
|
30
|
+
common_code_key: z
|
|
31
|
+
.string()
|
|
32
|
+
.nullable()
|
|
33
|
+
.optional()
|
|
34
|
+
.describe('Common code key to ensure PIN code reuse across devices.'),
|
|
35
|
+
})
|
|
36
|
+
.describe('New location configuration.'),
|
|
37
|
+
})
|
|
38
|
+
.describe(
|
|
39
|
+
'Seam is in the process of updating the devices/spaces associated with this access grant.',
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
const updating_access_times_mutation = common_pending_mutation
|
|
43
|
+
.extend({
|
|
44
|
+
mutation_code: z
|
|
45
|
+
.literal('updating_access_times')
|
|
46
|
+
.describe(
|
|
47
|
+
'Mutation code to indicate that Seam is in the process of updating the access times for this access grant.',
|
|
48
|
+
),
|
|
49
|
+
access_method_ids: z
|
|
50
|
+
.array(z.string().uuid())
|
|
51
|
+
.describe('IDs of the access methods being updated.'),
|
|
52
|
+
from: z
|
|
53
|
+
.object({
|
|
54
|
+
starts_at: z
|
|
55
|
+
.string()
|
|
56
|
+
.datetime()
|
|
57
|
+
.nullable()
|
|
58
|
+
.describe('Previous start time for access.'),
|
|
59
|
+
ends_at: z
|
|
60
|
+
.string()
|
|
61
|
+
.datetime()
|
|
62
|
+
.nullable()
|
|
63
|
+
.describe('Previous end time for access.'),
|
|
64
|
+
})
|
|
65
|
+
.describe('Previous access time configuration.'),
|
|
66
|
+
to: z
|
|
67
|
+
.object({
|
|
68
|
+
starts_at: z
|
|
69
|
+
.string()
|
|
70
|
+
.datetime()
|
|
71
|
+
.nullable()
|
|
72
|
+
.describe('New start time for access.'),
|
|
73
|
+
ends_at: z
|
|
74
|
+
.string()
|
|
75
|
+
.datetime()
|
|
76
|
+
.nullable()
|
|
77
|
+
.describe('New end time for access.'),
|
|
78
|
+
})
|
|
79
|
+
.describe('New access time configuration.'),
|
|
80
|
+
})
|
|
81
|
+
.describe(
|
|
82
|
+
'Seam is in the process of updating the access times for this access grant.',
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
export const access_grant_pending_mutations = z.discriminatedUnion(
|
|
86
|
+
'mutation_code',
|
|
87
|
+
[updating_spaces_mutation, updating_access_times_mutation],
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
export type AccessGrantPendingMutation = z.infer<
|
|
91
|
+
typeof access_grant_pending_mutations
|
|
92
|
+
>
|
|
93
|
+
|
|
94
|
+
const _access_grant_pending_mutations_map = z.object({
|
|
95
|
+
updating_spaces: updating_spaces_mutation.optional().nullable(),
|
|
96
|
+
updating_access_times: updating_access_times_mutation.optional().nullable(),
|
|
97
|
+
})
|
|
98
|
+
|
|
99
|
+
export type AccessGrantPendingMutationsMap = z.infer<
|
|
100
|
+
typeof _access_grant_pending_mutations_map
|
|
101
|
+
>
|
|
@@ -16,6 +16,14 @@ export const requested_access_method = z.object({
|
|
|
16
16
|
.describe(
|
|
17
17
|
"Specific PIN code to use for this access method. Only applicable when mode is 'code'.",
|
|
18
18
|
),
|
|
19
|
+
instant_key_max_use_count: z
|
|
20
|
+
.number()
|
|
21
|
+
.int()
|
|
22
|
+
.min(1)
|
|
23
|
+
.optional()
|
|
24
|
+
.describe(
|
|
25
|
+
"Maximum number of times the instant key can be used. Only applicable when mode is 'mobile_key'. Defaults to 1 if not specified.",
|
|
26
|
+
),
|
|
19
27
|
created_at: z
|
|
20
28
|
.string()
|
|
21
29
|
.datetime()
|
|
@@ -2,11 +2,6 @@ import { z } from 'zod'
|
|
|
2
2
|
|
|
3
3
|
export const acs_entrance_salto_space_metadata = z
|
|
4
4
|
.object({
|
|
5
|
-
ext_door_id: z.string().describe(`
|
|
6
|
-
---
|
|
7
|
-
deprecated: use door_id.
|
|
8
|
-
---
|
|
9
|
-
`),
|
|
10
5
|
door_id: z.string().describe('Door ID in the Salto Space access system.'),
|
|
11
6
|
door_name: z
|
|
12
7
|
.string()
|
|
@@ -62,25 +62,25 @@ const credential_cannot_be_reissued = z
|
|
|
62
62
|
'Error to indicate that the affected credential cannot be reissued.',
|
|
63
63
|
)
|
|
64
64
|
|
|
65
|
-
const
|
|
65
|
+
const encoder_not_online_error = z
|
|
66
66
|
.object({
|
|
67
67
|
type: z
|
|
68
|
-
.literal('
|
|
69
|
-
.describe('Error type to indicate that
|
|
68
|
+
.literal('encoder_not_online')
|
|
69
|
+
.describe('Error type to indicate that the encoder is not online.'),
|
|
70
70
|
message: z
|
|
71
71
|
.string()
|
|
72
72
|
.describe(
|
|
73
73
|
'Detailed description of the error. Provides insights into the issue and potentially how to rectify it.',
|
|
74
74
|
),
|
|
75
75
|
})
|
|
76
|
-
.describe('Error to indicate that
|
|
76
|
+
.describe('Error to indicate that the encoder is not online.')
|
|
77
77
|
|
|
78
78
|
const error = z.union([
|
|
79
79
|
...common_action_attempt_errors,
|
|
80
80
|
no_credential_on_encoder_error,
|
|
81
81
|
incompatible_card_format_error,
|
|
82
82
|
credential_cannot_be_reissued,
|
|
83
|
-
|
|
83
|
+
encoder_not_online_error,
|
|
84
84
|
])
|
|
85
85
|
|
|
86
86
|
const result = acs_credential
|