@seamapi/types 1.423.4 → 1.425.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 +225 -24
- package/dist/connect.cjs.map +1 -1
- package/dist/connect.d.cts +602 -12
- package/lib/seam/connect/internal/schemas.d.ts +1 -1
- package/lib/seam/connect/internal/schemas.js +1 -1
- package/lib/seam/connect/internal/schemas.js.map +1 -1
- package/lib/seam/connect/models/acs/acs-credential.d.ts +6 -0
- package/lib/seam/connect/models/acs/acs-credential.js +4 -0
- package/lib/seam/connect/models/acs/acs-credential.js.map +1 -1
- package/lib/seam/connect/models/acs/acs-entrance.d.ts +25 -2
- package/lib/seam/connect/models/acs/acs-entrance.js +18 -2
- package/lib/seam/connect/models/acs/acs-entrance.js.map +1 -1
- package/lib/seam/connect/models/acs/acs-system.js +4 -1
- package/lib/seam/connect/models/acs/acs-system.js.map +1 -1
- package/lib/seam/connect/models/action-attempts/action-attempt.d.ts +24 -0
- package/lib/seam/connect/models/action-attempts/encode-credential.d.ts +10 -0
- package/lib/seam/connect/models/action-attempts/scan-credential.d.ts +14 -0
- package/lib/seam/connect/models/connect-webviews/connect-webview.d.ts +2 -4
- package/lib/seam/connect/models/connect-webviews/connect-webview.js +3 -9
- package/lib/seam/connect/models/connect-webviews/connect-webview.js.map +1 -1
- package/lib/seam/connect/models/connected-accounts/connected-account.d.ts +3 -0
- package/lib/seam/connect/models/connected-accounts/connected-account.js +4 -0
- package/lib/seam/connect/models/connected-accounts/connected-account.js.map +1 -1
- package/lib/seam/connect/models/devices/device-provider.d.ts +2 -2
- package/lib/seam/connect/models/index.d.ts +1 -0
- package/lib/seam/connect/models/index.js +1 -0
- package/lib/seam/connect/models/index.js.map +1 -1
- package/lib/seam/connect/models/phones/phone-session.d.ts +66 -4
- package/lib/seam/connect/models/provider-capability.d.ts +3 -0
- package/lib/seam/connect/models/provider-capability.js +11 -0
- package/lib/seam/connect/models/provider-capability.js.map +1 -0
- package/lib/seam/connect/openapi.d.ts +263 -5
- package/lib/seam/connect/openapi.js +190 -11
- package/lib/seam/connect/openapi.js.map +1 -1
- package/lib/seam/connect/route-types.d.ts +292 -3
- package/package.json +1 -1
- package/src/lib/seam/connect/internal/schemas.ts +2 -0
- package/src/lib/seam/connect/models/acs/acs-credential.ts +6 -0
- package/src/lib/seam/connect/models/acs/acs-entrance.ts +93 -70
- package/src/lib/seam/connect/models/acs/acs-system.ts +4 -1
- package/src/lib/seam/connect/models/connect-webviews/connect-webview.ts +3 -16
- package/src/lib/seam/connect/models/connected-accounts/connected-account.ts +6 -0
- package/src/lib/seam/connect/models/devices/device-provider.ts +2 -2
- package/src/lib/seam/connect/models/index.ts +1 -0
- package/src/lib/seam/connect/models/provider-capability.ts +13 -0
- package/src/lib/seam/connect/openapi.ts +217 -11
- package/src/lib/seam/connect/route-types.ts +298 -3
package/package.json
CHANGED
|
@@ -14,6 +14,7 @@ export {
|
|
|
14
14
|
acs_credential_pool_external_type,
|
|
15
15
|
acs_credential_provisioning_automation,
|
|
16
16
|
acs_entrance,
|
|
17
|
+
acs_entrance_capability_flags,
|
|
17
18
|
acs_system,
|
|
18
19
|
acs_system_capability_flags,
|
|
19
20
|
acs_system_external_type,
|
|
@@ -65,6 +66,7 @@ export {
|
|
|
65
66
|
phone_session,
|
|
66
67
|
portal_configuration,
|
|
67
68
|
property_resource,
|
|
69
|
+
provider_capability,
|
|
68
70
|
reservation_resource,
|
|
69
71
|
resident_resource,
|
|
70
72
|
room_resource,
|
|
@@ -142,6 +142,12 @@ const common_acs_credential = z.object({
|
|
|
142
142
|
.describe(
|
|
143
143
|
'ID of the [ACS user](https://docs.seam.co/latest/capability-guides/access-systems/user-management) to whom the [credential](https://docs.seam.co/latest/capability-guides/access-systems/managing-credentials) belongs.',
|
|
144
144
|
),
|
|
145
|
+
connected_account_id: z
|
|
146
|
+
.string()
|
|
147
|
+
.uuid()
|
|
148
|
+
.describe(
|
|
149
|
+
'ID of the [connected account](https://docs.seam.co/latest/capability-guides/access-systems/managing-credentials#connected-accounts) to which the [credential](https://docs.seam.co/latest/capability-guides/access-systems/managing-credentials) belongs.',
|
|
150
|
+
),
|
|
145
151
|
acs_credential_pool_id: z.string().uuid().optional(),
|
|
146
152
|
acs_system_id: z
|
|
147
153
|
.string()
|
|
@@ -9,85 +9,108 @@ import {
|
|
|
9
9
|
} from './metadata/index.js'
|
|
10
10
|
import { acs_entrance_salto_space_metadata } from './metadata/salto-space.js'
|
|
11
11
|
|
|
12
|
-
export const
|
|
13
|
-
|
|
14
|
-
.
|
|
15
|
-
.uuid()
|
|
16
|
-
.describe(
|
|
17
|
-
'ID of the [access control system](https://docs.seam.co/latest/capability-guides/access-systems) that contains the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details).',
|
|
18
|
-
),
|
|
19
|
-
acs_entrance_id: z
|
|
20
|
-
.string()
|
|
21
|
-
.uuid()
|
|
22
|
-
.describe(
|
|
23
|
-
'ID of the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details).',
|
|
24
|
-
),
|
|
25
|
-
created_at: z
|
|
26
|
-
.string()
|
|
27
|
-
.datetime()
|
|
28
|
-
.describe(
|
|
29
|
-
'Date and time at which the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details) was created.',
|
|
30
|
-
),
|
|
31
|
-
display_name: z
|
|
32
|
-
.string()
|
|
33
|
-
.describe(
|
|
34
|
-
'Display name for the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details).',
|
|
35
|
-
),
|
|
36
|
-
connected_account_id: z
|
|
37
|
-
.string()
|
|
38
|
-
.uuid()
|
|
39
|
-
.describe(
|
|
40
|
-
'ID of the [connected account](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details) associated with the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details).',
|
|
41
|
-
),
|
|
42
|
-
errors: z
|
|
43
|
-
.array(
|
|
44
|
-
z.object({
|
|
45
|
-
error_code: z
|
|
46
|
-
.string()
|
|
47
|
-
.describe(
|
|
48
|
-
'Unique identifier of the type of error. Enables quick recognition and categorization of the issue.',
|
|
49
|
-
),
|
|
50
|
-
message: z
|
|
51
|
-
.string()
|
|
52
|
-
.describe(
|
|
53
|
-
'Detailed description of the error. Provides insights into the issue and potentially how to rectify it.',
|
|
54
|
-
),
|
|
55
|
-
}),
|
|
56
|
-
)
|
|
57
|
-
.describe(
|
|
58
|
-
'Errors associated with the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details).',
|
|
59
|
-
),
|
|
60
|
-
latch_metadata: acs_entrance_latch_metadata
|
|
61
|
-
.optional()
|
|
62
|
-
.describe(
|
|
63
|
-
'Latch-specific metadata associated with the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details).',
|
|
64
|
-
),
|
|
65
|
-
visionline_metadata: acs_entrance_visionline_metadata
|
|
12
|
+
export const acs_entrance_capability_flags = z.object({
|
|
13
|
+
can_unlock_with_mobile_key: z
|
|
14
|
+
.boolean()
|
|
66
15
|
.optional()
|
|
67
16
|
.describe(
|
|
68
|
-
'
|
|
17
|
+
'Indicates whether the ACS entrance can be unlocked with mobile key credentials.',
|
|
69
18
|
),
|
|
70
|
-
|
|
19
|
+
can_unlock_with_card: z
|
|
20
|
+
.boolean()
|
|
71
21
|
.optional()
|
|
72
22
|
.describe(
|
|
73
|
-
'
|
|
23
|
+
'Indicates whether the ACS entrance can be unlocked with card credentials.',
|
|
74
24
|
),
|
|
75
|
-
|
|
25
|
+
can_unlock_with_code: z
|
|
26
|
+
.boolean()
|
|
76
27
|
.optional()
|
|
77
28
|
.describe(
|
|
78
|
-
'
|
|
29
|
+
'Indicates whether the ACS entrance can be unlocked with pin codes.',
|
|
79
30
|
),
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
31
|
+
})
|
|
32
|
+
|
|
33
|
+
export const acs_entrance = z
|
|
34
|
+
.object({
|
|
35
|
+
acs_system_id: z
|
|
36
|
+
.string()
|
|
37
|
+
.uuid()
|
|
38
|
+
.describe(
|
|
39
|
+
'ID of the [access control system](https://docs.seam.co/latest/capability-guides/access-systems) that contains the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details).',
|
|
40
|
+
),
|
|
41
|
+
acs_entrance_id: z
|
|
42
|
+
.string()
|
|
43
|
+
.uuid()
|
|
44
|
+
.describe(
|
|
45
|
+
'ID of the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details).',
|
|
46
|
+
),
|
|
47
|
+
created_at: z
|
|
48
|
+
.string()
|
|
49
|
+
.datetime()
|
|
50
|
+
.describe(
|
|
51
|
+
'Date and time at which the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details) was created.',
|
|
52
|
+
),
|
|
53
|
+
display_name: z
|
|
54
|
+
.string()
|
|
55
|
+
.describe(
|
|
56
|
+
'Display name for the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details).',
|
|
57
|
+
),
|
|
58
|
+
connected_account_id: z
|
|
59
|
+
.string()
|
|
60
|
+
.uuid()
|
|
61
|
+
.describe(
|
|
62
|
+
'ID of the [connected account](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details) associated with the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details).',
|
|
63
|
+
),
|
|
64
|
+
errors: z
|
|
65
|
+
.array(
|
|
66
|
+
z.object({
|
|
67
|
+
error_code: z
|
|
68
|
+
.string()
|
|
69
|
+
.describe(
|
|
70
|
+
'Unique identifier of the type of error. Enables quick recognition and categorization of the issue.',
|
|
71
|
+
),
|
|
72
|
+
message: z
|
|
73
|
+
.string()
|
|
74
|
+
.describe(
|
|
75
|
+
'Detailed description of the error. Provides insights into the issue and potentially how to rectify it.',
|
|
76
|
+
),
|
|
77
|
+
}),
|
|
78
|
+
)
|
|
79
|
+
.describe(
|
|
80
|
+
'Errors associated with the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details).',
|
|
81
|
+
),
|
|
82
|
+
latch_metadata: acs_entrance_latch_metadata
|
|
83
|
+
.optional()
|
|
84
|
+
.describe(
|
|
85
|
+
'Latch-specific metadata associated with the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details).',
|
|
86
|
+
),
|
|
87
|
+
visionline_metadata: acs_entrance_visionline_metadata
|
|
88
|
+
.optional()
|
|
89
|
+
.describe(
|
|
90
|
+
'Visionline-specific metadata associated with the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details).',
|
|
91
|
+
),
|
|
92
|
+
salto_ks_metadata: acs_entrance_salto_ks_metadata
|
|
93
|
+
.optional()
|
|
94
|
+
.describe(
|
|
95
|
+
'Salto KS-specific metadata associated with the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details).',
|
|
96
|
+
),
|
|
97
|
+
dormakaba_community_metadata: acs_entrance_dormakaba_community_metadata
|
|
98
|
+
.optional()
|
|
99
|
+
.describe(
|
|
100
|
+
'dormakaba Community-specific metadata associated with the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details).',
|
|
101
|
+
),
|
|
102
|
+
assa_abloy_vostio_metadata: acs_entrance_assa_abloy_vostio_metadata
|
|
103
|
+
.optional()
|
|
104
|
+
.describe(
|
|
105
|
+
'ASSA ABLOY Vostio-specific metadata associated with the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details).',
|
|
106
|
+
),
|
|
107
|
+
salto_space_metadata: acs_entrance_salto_space_metadata
|
|
108
|
+
.optional()
|
|
109
|
+
.describe(
|
|
110
|
+
'Salto Space-specific metadata associated with the [entrance](https://docs.seam.co/latest/capability-guides/access-systems/retrieving-entrance-details).',
|
|
111
|
+
),
|
|
112
|
+
})
|
|
113
|
+
.merge(acs_entrance_capability_flags).describe(`
|
|
91
114
|
---
|
|
92
115
|
route_path: /acs/entrances
|
|
93
116
|
---
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod'
|
|
2
2
|
|
|
3
|
-
export const acs_system_capability_flags = z.object({
|
|
3
|
+
export const acs_system_capability_flags = z.object({
|
|
4
|
+
// Access method type capability flags are not publicly exposed for ACS systems
|
|
5
|
+
// They are only available for ACS entrances
|
|
6
|
+
})
|
|
4
7
|
|
|
5
8
|
export const acs_location = z.object({
|
|
6
9
|
time_zone: z
|
|
@@ -1,26 +1,13 @@
|
|
|
1
1
|
import { z } from 'zod'
|
|
2
2
|
|
|
3
3
|
import { custom_metadata } from '../custom-metadata.js'
|
|
4
|
+
import { provider_capability } from '../provider-capability.js'
|
|
4
5
|
|
|
5
6
|
export const connect_webview_device_selection_mode = z.enum([
|
|
6
7
|
'none',
|
|
7
8
|
'single',
|
|
8
9
|
'multiple',
|
|
9
|
-
])
|
|
10
|
-
---
|
|
11
|
-
undocumented: Not implemented.
|
|
12
|
-
---
|
|
13
|
-
`)
|
|
14
|
-
|
|
15
|
-
export const connect_webview_accepted_capabilities = z
|
|
16
|
-
.enum(['lock', 'thermostat', 'noise_sensor', 'access_control'])
|
|
17
|
-
.describe(
|
|
18
|
-
'High-level device capabilities that the Connect Webview can accept.',
|
|
19
|
-
)
|
|
20
|
-
|
|
21
|
-
export type ConnectWebviewAcceptedCapabilities = z.infer<
|
|
22
|
-
typeof connect_webview_accepted_capabilities
|
|
23
|
-
>
|
|
10
|
+
])
|
|
24
11
|
|
|
25
12
|
export const connect_webview = z.object({
|
|
26
13
|
connect_webview_id: z.string().uuid().describe('ID of the Connect Webview.'),
|
|
@@ -57,7 +44,7 @@ export const connect_webview = z.object({
|
|
|
57
44
|
),
|
|
58
45
|
|
|
59
46
|
accepted_capabilities: z
|
|
60
|
-
.array(
|
|
47
|
+
.array(provider_capability)
|
|
61
48
|
.describe(
|
|
62
49
|
'High-level device capabilities that the Connect Webview can accept. When creating a Connect Webview, you can specify the types of devices that it can connect to Seam. If you do not set custom `accepted_capabilities`, Seam uses a default set of `accepted_capabilities` for each provider. For example, if you create a Connect Webview that accepts SmartThing devices, without specifying `accepted_capabilities`, Seam accepts only SmartThings locks. To connect SmartThings thermostats and locks to Seam, create a Connect Webview and include both `thermostat` and `lock` in the `accepted_capabilities`.',
|
|
63
50
|
),
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod'
|
|
2
2
|
|
|
3
3
|
import { custom_metadata } from '../custom-metadata.js'
|
|
4
|
+
import { provider_capability } from '../provider-capability.js'
|
|
4
5
|
|
|
5
6
|
const common_connected_account_error = z.object({
|
|
6
7
|
created_at: z
|
|
@@ -312,6 +313,11 @@ export const connected_account = z.object({
|
|
|
312
313
|
.describe(
|
|
313
314
|
'Your unique key for the customer associated with this connected account.',
|
|
314
315
|
),
|
|
316
|
+
accepted_capabilities: z
|
|
317
|
+
.array(provider_capability)
|
|
318
|
+
.describe(
|
|
319
|
+
'List of capabilities that were accepted during the account connection process.',
|
|
320
|
+
),
|
|
315
321
|
}).describe(`
|
|
316
322
|
---
|
|
317
323
|
route_path: /connected_accounts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod'
|
|
2
2
|
|
|
3
|
-
import type {
|
|
3
|
+
import type { ProviderCapability } from '../provider-capability.js'
|
|
4
4
|
import { device_capability_flags } from './device.js'
|
|
5
5
|
|
|
6
6
|
export const DEVICE_PROVIDERS = {
|
|
@@ -149,7 +149,7 @@ export type DeviceProvider = z.infer<typeof device_provider>
|
|
|
149
149
|
|
|
150
150
|
export const PROVIDER_CATEGORY_CAPABILITY_MAP: Record<
|
|
151
151
|
ProviderCategory,
|
|
152
|
-
|
|
152
|
+
ProviderCapability[]
|
|
153
153
|
> = {
|
|
154
154
|
stable: ['lock', 'thermostat', 'noise_sensor', 'access_control'],
|
|
155
155
|
consumer_smartlocks: ['lock'],
|
|
@@ -21,6 +21,7 @@ export * from './pagination.js'
|
|
|
21
21
|
export * from './partner/index.js'
|
|
22
22
|
export * from './phone-number.js'
|
|
23
23
|
export * from './phones/index.js'
|
|
24
|
+
export * from './provider-capability.js'
|
|
24
25
|
export * from './spaces/index.js'
|
|
25
26
|
export * from './thermostats/index.js'
|
|
26
27
|
export * from './user-identities/index.js'
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from 'zod'
|
|
2
|
+
|
|
3
|
+
export const provider_capability = z.enum([
|
|
4
|
+
'lock',
|
|
5
|
+
'thermostat',
|
|
6
|
+
'noise_sensor',
|
|
7
|
+
'access_control',
|
|
8
|
+
]).describe(`
|
|
9
|
+
High-level device capabilities that can be restricted in connect webviews.
|
|
10
|
+
These represent the main device categories that customers can opt into.
|
|
11
|
+
`)
|
|
12
|
+
|
|
13
|
+
export type ProviderCapability = z.infer<typeof provider_capability>
|