@seamapi/types 1.872.0 → 1.874.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 +133 -24
- package/dist/connect.cjs.map +1 -1
- package/dist/connect.d.cts +1446 -38602
- package/dist/index.cjs +133 -24
- package/dist/index.cjs.map +1 -1
- package/lib/seam/connect/models/access-codes/managed-access-code.d.ts +24 -24
- package/lib/seam/connect/models/access-codes/managed-access-code.js +5 -12
- 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 +5 -5
- package/lib/seam/connect/models/acs/acs-entrance.d.ts +48 -0
- package/lib/seam/connect/models/acs/acs-entrance.js +13 -0
- package/lib/seam/connect/models/acs/acs-entrance.js.map +1 -1
- package/lib/seam/connect/models/batch.d.ts +5 -37478
- package/lib/seam/connect/models/batch.js.map +1 -1
- package/lib/seam/connect/models/devices/device.d.ts +58 -0
- package/lib/seam/connect/models/devices/device.js +12 -0
- package/lib/seam/connect/models/devices/device.js.map +1 -1
- package/lib/seam/connect/models/devices/unmanaged-device.d.ts +21 -0
- package/lib/seam/connect/models/phones/phone-session.d.ts +98 -0
- package/lib/seam/connect/openapi.js +102 -8
- package/lib/seam/connect/openapi.js.map +1 -1
- package/lib/seam/connect/route-types.d.ts +250 -11
- package/package.json +1 -1
- package/src/lib/seam/connect/models/access-codes/managed-access-code.ts +5 -12
- package/src/lib/seam/connect/models/acs/acs-entrance.ts +18 -0
- package/src/lib/seam/connect/models/batch.ts +38 -2
- package/src/lib/seam/connect/models/devices/device.ts +13 -0
- package/src/lib/seam/connect/openapi.ts +120 -8
- package/src/lib/seam/connect/route-types.ts +281 -11
|
@@ -187,19 +187,14 @@ const kwikset_unable_to_confirm_deletion = common_access_code_error
|
|
|
187
187
|
`,
|
|
188
188
|
)
|
|
189
189
|
|
|
190
|
-
const
|
|
190
|
+
const insufficient_permissions = common_access_code_error
|
|
191
191
|
.extend({
|
|
192
192
|
error_code: z
|
|
193
|
-
.literal('
|
|
193
|
+
.literal('insufficient_permissions')
|
|
194
194
|
.describe(error_code_description),
|
|
195
195
|
})
|
|
196
196
|
.describe(
|
|
197
|
-
|
|
198
|
-
---
|
|
199
|
-
deprecated: Use \`provider_issue\` instead.
|
|
200
|
-
---
|
|
201
|
-
Admin role required—insufficient permissions to manage PINs on this Kwikset device. Please have a Home Admin update your role in the Kwikset app, or ask them to set the PIN.
|
|
202
|
-
`,
|
|
197
|
+
'Admin role required—insufficient permissions to manage PINs on this device. Please have an admin update your role, or ask them to set the PIN.',
|
|
203
198
|
)
|
|
204
199
|
|
|
205
200
|
const august_lock_invalid_code_length = common_access_code_error
|
|
@@ -365,7 +360,7 @@ const access_code_error = z
|
|
|
365
360
|
wyze_duplicate_code_name,
|
|
366
361
|
wyze_potential_duplicate_code,
|
|
367
362
|
dormakaba_oracode_invalid_time_range,
|
|
368
|
-
|
|
363
|
+
insufficient_permissions,
|
|
369
364
|
keynest_unsupported_third_party_locker,
|
|
370
365
|
replaced_by_newer_access_code,
|
|
371
366
|
])
|
|
@@ -401,9 +396,7 @@ const _access_code_error_map = z.object({
|
|
|
401
396
|
kwikset_unable_to_confirm_deletion: kwikset_unable_to_confirm_deletion
|
|
402
397
|
.optional()
|
|
403
398
|
.nullable(),
|
|
404
|
-
|
|
405
|
-
.optional()
|
|
406
|
-
.nullable(),
|
|
399
|
+
insufficient_permissions: insufficient_permissions.optional().nullable(),
|
|
407
400
|
code_modified_external_to_seam_error: code_modified_external_to_seam_error
|
|
408
401
|
.optional()
|
|
409
402
|
.nullable(),
|
|
@@ -59,11 +59,22 @@ const entrance_setup_required = common_acs_entrance_warning
|
|
|
59
59
|
'Indicates that this entrance requires additional configuration in the access control system before Seam can fully manage it.',
|
|
60
60
|
)
|
|
61
61
|
|
|
62
|
+
const salto_ks_privacy_mode = common_acs_entrance_warning
|
|
63
|
+
.extend({
|
|
64
|
+
warning_code: z
|
|
65
|
+
.literal('salto_ks_privacy_mode')
|
|
66
|
+
.describe(warning_code_description),
|
|
67
|
+
})
|
|
68
|
+
.describe(
|
|
69
|
+
'Indicates that this entrance is in privacy mode. When privacy mode is enabled, access codes, mobile keys, and remote unlocks will not work unless the user has admin access.',
|
|
70
|
+
)
|
|
71
|
+
|
|
62
72
|
const acs_entrance_warning = z
|
|
63
73
|
.discriminatedUnion('warning_code', [
|
|
64
74
|
salto_ks_entrance_access_code_support_removed,
|
|
65
75
|
entrance_shares_zone,
|
|
66
76
|
entrance_setup_required,
|
|
77
|
+
salto_ks_privacy_mode,
|
|
67
78
|
])
|
|
68
79
|
.describe(
|
|
69
80
|
'Warning associated with the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details).',
|
|
@@ -74,6 +85,7 @@ const _acs_entrance_warning_map = z.object({
|
|
|
74
85
|
salto_ks_entrance_access_code_support_removed.optional().nullable(),
|
|
75
86
|
entrance_shares_zone: entrance_shares_zone.optional().nullable(),
|
|
76
87
|
entrance_setup_required: entrance_setup_required.optional().nullable(),
|
|
88
|
+
salto_ks_privacy_mode: salto_ks_privacy_mode.optional().nullable(),
|
|
77
89
|
})
|
|
78
90
|
|
|
79
91
|
export type AcsEntranceWarningMap = z.infer<typeof _acs_entrance_warning_map>
|
|
@@ -218,6 +230,12 @@ export const acs_entrance = z
|
|
|
218
230
|
.describe(
|
|
219
231
|
'Avigilon Alta-specific metadata associated with the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details).',
|
|
220
232
|
),
|
|
233
|
+
is_locked: z
|
|
234
|
+
.boolean()
|
|
235
|
+
.optional()
|
|
236
|
+
.describe(
|
|
237
|
+
'Indicates whether the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details) is currently locked.',
|
|
238
|
+
),
|
|
221
239
|
})
|
|
222
240
|
.merge(acs_entrance_capability_flags).describe(`
|
|
223
241
|
---
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { z } from 'zod'
|
|
1
|
+
import { z, type ZodTypeAny } from 'zod'
|
|
2
2
|
|
|
3
3
|
import { access_code, unmanaged_access_code } from './access-codes/index.js'
|
|
4
4
|
import { access_grant } from './access-grants/access-grant.js'
|
|
@@ -32,7 +32,43 @@ import {
|
|
|
32
32
|
import { user_identity } from './user-identities/index.js'
|
|
33
33
|
import { workspace } from './workspaces/index.js'
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
type BatchKey =
|
|
36
|
+
| 'user_identities'
|
|
37
|
+
| 'workspaces'
|
|
38
|
+
| 'spaces'
|
|
39
|
+
| 'devices'
|
|
40
|
+
| 'connected_accounts'
|
|
41
|
+
| 'acs_entrances'
|
|
42
|
+
| 'acs_systems'
|
|
43
|
+
| 'acs_users'
|
|
44
|
+
| 'acs_access_groups'
|
|
45
|
+
| 'acs_encoders'
|
|
46
|
+
| 'acs_credentials'
|
|
47
|
+
| 'unmanaged_acs_credentials'
|
|
48
|
+
| 'action_attempts'
|
|
49
|
+
| 'client_sessions'
|
|
50
|
+
| 'unmanaged_acs_users'
|
|
51
|
+
| 'unmanaged_acs_access_groups'
|
|
52
|
+
| 'unmanaged_devices'
|
|
53
|
+
| 'connect_webviews'
|
|
54
|
+
| 'access_methods'
|
|
55
|
+
| 'access_grants'
|
|
56
|
+
| 'events'
|
|
57
|
+
| 'instant_keys'
|
|
58
|
+
| 'access_codes'
|
|
59
|
+
| 'unmanaged_access_codes'
|
|
60
|
+
| 'thermostat_daily_programs'
|
|
61
|
+
| 'thermostat_schedules'
|
|
62
|
+
| 'noise_thresholds'
|
|
63
|
+
| 'customization_profiles'
|
|
64
|
+
|
|
65
|
+
// Explicit annotation prevents tsgo TS7056 — the device/access-code
|
|
66
|
+
// discriminated unions push the inferred literal past the serialization cap.
|
|
67
|
+
type BatchShape = z.ZodObject<
|
|
68
|
+
Record<BatchKey, z.ZodOptional<z.ZodArray<ZodTypeAny>>>
|
|
69
|
+
>
|
|
70
|
+
|
|
71
|
+
export const batch: BatchShape = z.object({
|
|
36
72
|
user_identities: user_identity.array().optional(),
|
|
37
73
|
workspaces: workspace.array().optional(),
|
|
38
74
|
spaces: space.array().optional(),
|
|
@@ -524,6 +524,17 @@ const max_access_codes_reached = common_device_warning.extend({
|
|
|
524
524
|
Indicates that the device has reached its maximum number of active access codes. Delete existing codes before creating new ones.
|
|
525
525
|
`)
|
|
526
526
|
|
|
527
|
+
const insufficient_permissions = common_device_warning.extend({
|
|
528
|
+
warning_code: z
|
|
529
|
+
.literal('insufficient_permissions')
|
|
530
|
+
.describe(warning_code_description),
|
|
531
|
+
}).describe(`
|
|
532
|
+
---
|
|
533
|
+
variant_group_key: locks
|
|
534
|
+
---
|
|
535
|
+
Indicates that the connected Kwikset account has member-level access to this lock's home. Admin or owner access is required to manage access codes and control the lock remotely.
|
|
536
|
+
`)
|
|
537
|
+
|
|
527
538
|
const device_warning = z.discriminatedUnion('warning_code', [
|
|
528
539
|
partial_backup_access_code_pool,
|
|
529
540
|
many_active_backup_codes,
|
|
@@ -549,6 +560,7 @@ const device_warning = z.discriminatedUnion('warning_code', [
|
|
|
549
560
|
accessory_keypad_setup_required,
|
|
550
561
|
unreliable_online_status,
|
|
551
562
|
max_access_codes_reached,
|
|
563
|
+
insufficient_permissions,
|
|
552
564
|
])
|
|
553
565
|
|
|
554
566
|
export type DeviceWarning = z.infer<typeof device_warning>
|
|
@@ -606,6 +618,7 @@ export const device_warning_map = z.object({
|
|
|
606
618
|
.nullable(),
|
|
607
619
|
unreliable_online_status: unreliable_online_status.optional().nullable(),
|
|
608
620
|
max_access_codes_reached: max_access_codes_reached.optional().nullable(),
|
|
621
|
+
insufficient_permissions: insufficient_permissions.optional().nullable(),
|
|
609
622
|
})
|
|
610
623
|
|
|
611
624
|
export type DeviceWarningMap = z.infer<typeof device_warning_map>
|
|
@@ -785,9 +785,8 @@ const openapi: OpenAPISpec = {
|
|
|
785
785
|
'x-deprecated': 'Use `provider_issue` instead.',
|
|
786
786
|
},
|
|
787
787
|
{
|
|
788
|
-
deprecated: true,
|
|
789
788
|
description:
|
|
790
|
-
'Admin role required—insufficient permissions to manage PINs on this
|
|
789
|
+
'Admin role required—insufficient permissions to manage PINs on this device. Please have an admin update your role, or ask them to set the PIN.',
|
|
791
790
|
properties: {
|
|
792
791
|
created_at: {
|
|
793
792
|
description:
|
|
@@ -798,7 +797,7 @@ const openapi: OpenAPISpec = {
|
|
|
798
797
|
error_code: {
|
|
799
798
|
description:
|
|
800
799
|
'Unique identifier of the type of error. Enables quick recognition and categorization of the issue.',
|
|
801
|
-
enum: ['
|
|
800
|
+
enum: ['insufficient_permissions'],
|
|
802
801
|
type: 'string',
|
|
803
802
|
},
|
|
804
803
|
is_access_code_error: {
|
|
@@ -815,7 +814,6 @@ const openapi: OpenAPISpec = {
|
|
|
815
814
|
},
|
|
816
815
|
required: ['message', 'is_access_code_error', 'error_code'],
|
|
817
816
|
type: 'object',
|
|
818
|
-
'x-deprecated': 'Use `provider_issue` instead.',
|
|
819
817
|
},
|
|
820
818
|
{
|
|
821
819
|
deprecated: true,
|
|
@@ -4650,6 +4648,11 @@ const openapi: OpenAPISpec = {
|
|
|
4650
4648
|
},
|
|
4651
4649
|
type: 'object',
|
|
4652
4650
|
},
|
|
4651
|
+
is_locked: {
|
|
4652
|
+
description:
|
|
4653
|
+
'Indicates whether the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details) is currently locked.',
|
|
4654
|
+
type: 'boolean',
|
|
4655
|
+
},
|
|
4653
4656
|
latch_metadata: {
|
|
4654
4657
|
description:
|
|
4655
4658
|
'Latch-specific metadata associated with the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details).',
|
|
@@ -4902,6 +4905,31 @@ const openapi: OpenAPISpec = {
|
|
|
4902
4905
|
required: ['created_at', 'message', 'warning_code'],
|
|
4903
4906
|
type: 'object',
|
|
4904
4907
|
},
|
|
4908
|
+
{
|
|
4909
|
+
description:
|
|
4910
|
+
'Indicates that this entrance is in privacy mode. When privacy mode is enabled, access codes, mobile keys, and remote unlocks will not work unless the user has admin access.',
|
|
4911
|
+
properties: {
|
|
4912
|
+
created_at: {
|
|
4913
|
+
description:
|
|
4914
|
+
'Date and time at which Seam created the warning.',
|
|
4915
|
+
format: 'date-time',
|
|
4916
|
+
type: 'string',
|
|
4917
|
+
},
|
|
4918
|
+
message: {
|
|
4919
|
+
description:
|
|
4920
|
+
'Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.',
|
|
4921
|
+
type: 'string',
|
|
4922
|
+
},
|
|
4923
|
+
warning_code: {
|
|
4924
|
+
description:
|
|
4925
|
+
'Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.',
|
|
4926
|
+
enum: ['salto_ks_privacy_mode'],
|
|
4927
|
+
type: 'string',
|
|
4928
|
+
},
|
|
4929
|
+
},
|
|
4930
|
+
required: ['created_at', 'message', 'warning_code'],
|
|
4931
|
+
type: 'object',
|
|
4932
|
+
},
|
|
4905
4933
|
],
|
|
4906
4934
|
},
|
|
4907
4935
|
type: 'array',
|
|
@@ -16624,6 +16652,32 @@ const openapi: OpenAPISpec = {
|
|
|
16624
16652
|
type: 'object',
|
|
16625
16653
|
'x-variant-group-key': 'access_codes',
|
|
16626
16654
|
},
|
|
16655
|
+
{
|
|
16656
|
+
description:
|
|
16657
|
+
"Indicates that the connected Kwikset account has member-level access to this lock's home. Admin or owner access is required to manage access codes and control the lock remotely.",
|
|
16658
|
+
properties: {
|
|
16659
|
+
created_at: {
|
|
16660
|
+
description:
|
|
16661
|
+
'Date and time at which Seam created the warning.',
|
|
16662
|
+
format: 'date-time',
|
|
16663
|
+
type: 'string',
|
|
16664
|
+
},
|
|
16665
|
+
message: {
|
|
16666
|
+
description:
|
|
16667
|
+
'Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.',
|
|
16668
|
+
type: 'string',
|
|
16669
|
+
},
|
|
16670
|
+
warning_code: {
|
|
16671
|
+
description:
|
|
16672
|
+
'Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.',
|
|
16673
|
+
enum: ['insufficient_permissions'],
|
|
16674
|
+
type: 'string',
|
|
16675
|
+
},
|
|
16676
|
+
},
|
|
16677
|
+
required: ['message', 'created_at', 'warning_code'],
|
|
16678
|
+
type: 'object',
|
|
16679
|
+
'x-variant-group-key': 'locks',
|
|
16680
|
+
},
|
|
16627
16681
|
],
|
|
16628
16682
|
},
|
|
16629
16683
|
type: 'array',
|
|
@@ -26178,6 +26232,11 @@ const openapi: OpenAPISpec = {
|
|
|
26178
26232
|
},
|
|
26179
26233
|
type: 'object',
|
|
26180
26234
|
},
|
|
26235
|
+
is_locked: {
|
|
26236
|
+
description:
|
|
26237
|
+
'Indicates whether the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details) is currently locked.',
|
|
26238
|
+
type: 'boolean',
|
|
26239
|
+
},
|
|
26181
26240
|
latch_metadata: {
|
|
26182
26241
|
description:
|
|
26183
26242
|
'Latch-specific metadata associated with the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details).',
|
|
@@ -26454,6 +26513,35 @@ const openapi: OpenAPISpec = {
|
|
|
26454
26513
|
],
|
|
26455
26514
|
type: 'object',
|
|
26456
26515
|
},
|
|
26516
|
+
{
|
|
26517
|
+
description:
|
|
26518
|
+
'Indicates that this entrance is in privacy mode. When privacy mode is enabled, access codes, mobile keys, and remote unlocks will not work unless the user has admin access.',
|
|
26519
|
+
properties: {
|
|
26520
|
+
created_at: {
|
|
26521
|
+
description:
|
|
26522
|
+
'Date and time at which Seam created the warning.',
|
|
26523
|
+
format: 'date-time',
|
|
26524
|
+
type: 'string',
|
|
26525
|
+
},
|
|
26526
|
+
message: {
|
|
26527
|
+
description:
|
|
26528
|
+
'Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.',
|
|
26529
|
+
type: 'string',
|
|
26530
|
+
},
|
|
26531
|
+
warning_code: {
|
|
26532
|
+
description:
|
|
26533
|
+
'Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.',
|
|
26534
|
+
enum: ['salto_ks_privacy_mode'],
|
|
26535
|
+
type: 'string',
|
|
26536
|
+
},
|
|
26537
|
+
},
|
|
26538
|
+
required: [
|
|
26539
|
+
'created_at',
|
|
26540
|
+
'message',
|
|
26541
|
+
'warning_code',
|
|
26542
|
+
],
|
|
26543
|
+
type: 'object',
|
|
26544
|
+
},
|
|
26457
26545
|
],
|
|
26458
26546
|
},
|
|
26459
26547
|
type: 'array',
|
|
@@ -28267,9 +28355,8 @@ const openapi: OpenAPISpec = {
|
|
|
28267
28355
|
'x-deprecated': 'Use `provider_issue` instead.',
|
|
28268
28356
|
},
|
|
28269
28357
|
{
|
|
28270
|
-
deprecated: true,
|
|
28271
28358
|
description:
|
|
28272
|
-
'Admin role required—insufficient permissions to manage PINs on this
|
|
28359
|
+
'Admin role required—insufficient permissions to manage PINs on this device. Please have an admin update your role, or ask them to set the PIN.',
|
|
28273
28360
|
properties: {
|
|
28274
28361
|
created_at: {
|
|
28275
28362
|
description:
|
|
@@ -28280,7 +28367,7 @@ const openapi: OpenAPISpec = {
|
|
|
28280
28367
|
error_code: {
|
|
28281
28368
|
description:
|
|
28282
28369
|
'Unique identifier of the type of error. Enables quick recognition and categorization of the issue.',
|
|
28283
|
-
enum: ['
|
|
28370
|
+
enum: ['insufficient_permissions'],
|
|
28284
28371
|
type: 'string',
|
|
28285
28372
|
},
|
|
28286
28373
|
is_access_code_error: {
|
|
@@ -28297,7 +28384,6 @@ const openapi: OpenAPISpec = {
|
|
|
28297
28384
|
},
|
|
28298
28385
|
required: ['message', 'is_access_code_error', 'error_code'],
|
|
28299
28386
|
type: 'object',
|
|
28300
|
-
'x-deprecated': 'Use `provider_issue` instead.',
|
|
28301
28387
|
},
|
|
28302
28388
|
{
|
|
28303
28389
|
deprecated: true,
|
|
@@ -32854,6 +32940,32 @@ const openapi: OpenAPISpec = {
|
|
|
32854
32940
|
type: 'object',
|
|
32855
32941
|
'x-variant-group-key': 'access_codes',
|
|
32856
32942
|
},
|
|
32943
|
+
{
|
|
32944
|
+
description:
|
|
32945
|
+
"Indicates that the connected Kwikset account has member-level access to this lock's home. Admin or owner access is required to manage access codes and control the lock remotely.",
|
|
32946
|
+
properties: {
|
|
32947
|
+
created_at: {
|
|
32948
|
+
description:
|
|
32949
|
+
'Date and time at which Seam created the warning.',
|
|
32950
|
+
format: 'date-time',
|
|
32951
|
+
type: 'string',
|
|
32952
|
+
},
|
|
32953
|
+
message: {
|
|
32954
|
+
description:
|
|
32955
|
+
'Detailed description of the warning. Provides insights into the issue and potentially how to rectify it.',
|
|
32956
|
+
type: 'string',
|
|
32957
|
+
},
|
|
32958
|
+
warning_code: {
|
|
32959
|
+
description:
|
|
32960
|
+
'Unique identifier of the type of warning. Enables quick recognition and categorization of the issue.',
|
|
32961
|
+
enum: ['insufficient_permissions'],
|
|
32962
|
+
type: 'string',
|
|
32963
|
+
},
|
|
32964
|
+
},
|
|
32965
|
+
required: ['message', 'created_at', 'warning_code'],
|
|
32966
|
+
type: 'object',
|
|
32967
|
+
'x-variant-group-key': 'locks',
|
|
32968
|
+
},
|
|
32857
32969
|
],
|
|
32858
32970
|
},
|
|
32859
32971
|
type: 'array',
|