@seamapi/types 1.278.0 → 1.280.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 +678 -147
- package/dist/connect.cjs.map +1 -1
- package/dist/connect.d.cts +1813 -0
- package/lib/seam/connect/models/acs/acs-credential.js +81 -22
- package/lib/seam/connect/models/acs/acs-credential.js.map +1 -1
- package/lib/seam/connect/openapi.d.ts +169 -0
- package/lib/seam/connect/openapi.js +619 -114
- package/lib/seam/connect/openapi.js.map +1 -1
- package/lib/seam/connect/route-types.d.ts +1644 -0
- package/package.json +1 -1
- package/src/lib/seam/connect/models/acs/acs-credential.ts +107 -28
- package/src/lib/seam/connect/openapi.ts +765 -114
- package/src/lib/seam/connect/route-types.ts +1644 -0
package/package.json
CHANGED
|
@@ -22,23 +22,70 @@ export type AcsCredentialExternalType = z.infer<
|
|
|
22
22
|
>
|
|
23
23
|
|
|
24
24
|
const common_acs_credential = z.object({
|
|
25
|
-
acs_credential_id: z.string().uuid(),
|
|
26
|
-
acs_user_id: z
|
|
25
|
+
acs_credential_id: z.string().uuid().describe('ID of the credential.'),
|
|
26
|
+
acs_user_id: z
|
|
27
|
+
.string()
|
|
28
|
+
.uuid()
|
|
29
|
+
.optional()
|
|
30
|
+
.describe('ID of the ACS user to whom the credential belongs.'),
|
|
27
31
|
acs_credential_pool_id: z.string().uuid().optional(),
|
|
28
|
-
acs_system_id: z
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
+
acs_system_id: z
|
|
33
|
+
.string()
|
|
34
|
+
.uuid()
|
|
35
|
+
.describe('ID of the access control system that contains the credential.'),
|
|
36
|
+
parent_acs_credential_id: z
|
|
37
|
+
.string()
|
|
38
|
+
.uuid()
|
|
39
|
+
.optional()
|
|
40
|
+
.describe('ID of the parent credential.'),
|
|
41
|
+
display_name: z
|
|
42
|
+
.string()
|
|
43
|
+
.min(1)
|
|
44
|
+
.describe('Display name that corresponds to the credential type.'),
|
|
45
|
+
code: z
|
|
46
|
+
.string()
|
|
47
|
+
.optional()
|
|
48
|
+
.nullable()
|
|
49
|
+
.describe('Access (PIN) code for the credential.'),
|
|
32
50
|
card_number: z.string().optional().nullable(),
|
|
33
51
|
is_issued: z.boolean().optional(),
|
|
34
52
|
issued_at: z.string().datetime().optional().nullable(),
|
|
35
|
-
access_method: acs_credential_access_method_type
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
53
|
+
access_method: acs_credential_access_method_type.describe(
|
|
54
|
+
'Access method for the credential. Supported values: `code`, `card`, `mobile_key`.',
|
|
55
|
+
),
|
|
56
|
+
external_type: acs_credential_external_type
|
|
57
|
+
.optional()
|
|
58
|
+
.describe(
|
|
59
|
+
'Brand-specific terminology for the credential type. Supported values: `pti_card`, `brivo_credential`, `hid_credential`, `visionline_card`.',
|
|
60
|
+
),
|
|
61
|
+
external_type_display_name: z
|
|
62
|
+
.string()
|
|
63
|
+
.optional()
|
|
64
|
+
.describe(
|
|
65
|
+
'Display name that corresponds to the brand-specific terminology for the credential type.',
|
|
66
|
+
),
|
|
67
|
+
created_at: z
|
|
68
|
+
.string()
|
|
69
|
+
.datetime()
|
|
70
|
+
.describe('Date and time at which the credential was created.'),
|
|
71
|
+
workspace_id: z
|
|
72
|
+
.string()
|
|
73
|
+
.uuid()
|
|
74
|
+
.describe(
|
|
75
|
+
'ID of the [workspace](https://docs.seam.co/latest/core-concepts/workspaces) that contains the credential.',
|
|
76
|
+
),
|
|
77
|
+
starts_at: z
|
|
78
|
+
.string()
|
|
79
|
+
.optional()
|
|
80
|
+
.describe(
|
|
81
|
+
'Date and time at which the credential validity starts, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format.',
|
|
82
|
+
),
|
|
83
|
+
ends_at: z
|
|
84
|
+
.string()
|
|
85
|
+
.optional()
|
|
86
|
+
.describe(
|
|
87
|
+
'Date and time at which the credential validity ends, in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. Must be a time in the future and after `starts_at`.',
|
|
88
|
+
),
|
|
42
89
|
errors: z.array(
|
|
43
90
|
z.object({
|
|
44
91
|
error_code: z.string(),
|
|
@@ -51,26 +98,57 @@ const common_acs_credential = z.object({
|
|
|
51
98
|
message: z.string(),
|
|
52
99
|
}),
|
|
53
100
|
),
|
|
54
|
-
is_multi_phone_sync_credential: z
|
|
55
|
-
|
|
101
|
+
is_multi_phone_sync_credential: z
|
|
102
|
+
.boolean()
|
|
103
|
+
.optional()
|
|
104
|
+
.describe(
|
|
105
|
+
'Indicates whether the credential is a [multi-phone sync credential](https://docs.seam.co/latest/capability-guides/mobile-access-in-development/issuing-mobile-credentials-from-an-access-control-system#what-are-multi-phone-sync-credentials).',
|
|
106
|
+
),
|
|
107
|
+
is_latest_desired_state_synced_with_provider: z
|
|
108
|
+
.boolean()
|
|
109
|
+
.optional()
|
|
110
|
+
.describe(
|
|
111
|
+
'Indicates whether the latest state of the credential has been synced from Seam to the provider.',
|
|
112
|
+
),
|
|
56
113
|
latest_desired_state_synced_with_provider_at: z
|
|
57
114
|
.string()
|
|
58
115
|
.datetime()
|
|
59
|
-
.optional()
|
|
60
|
-
|
|
116
|
+
.optional()
|
|
117
|
+
.describe(
|
|
118
|
+
'Date and time at which the state of the credential was most recently synced from Seam to the provider.',
|
|
119
|
+
),
|
|
120
|
+
visionline_metadata: acs_credential_visionline_metadata
|
|
121
|
+
.optional()
|
|
122
|
+
.describe('Visionline-specific metadata for the credential.'),
|
|
61
123
|
})
|
|
62
124
|
|
|
63
|
-
export const acs_credential = common_acs_credential
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
)
|
|
125
|
+
export const acs_credential = common_acs_credential
|
|
126
|
+
.merge(
|
|
127
|
+
z.object({
|
|
128
|
+
is_managed: z.literal(true),
|
|
129
|
+
}),
|
|
130
|
+
)
|
|
131
|
+
.describe(getAcsCredentialDescription())
|
|
132
|
+
|
|
133
|
+
export const unmanaged_acs_credential = common_acs_credential
|
|
134
|
+
.merge(
|
|
135
|
+
z.object({
|
|
136
|
+
is_managed: z.literal(false),
|
|
137
|
+
}),
|
|
138
|
+
)
|
|
139
|
+
.describe(getAcsCredentialDescription(false))
|
|
140
|
+
|
|
141
|
+
function getAcsCredentialDescription(is_managed = true): string {
|
|
142
|
+
const resource_name = is_managed
|
|
143
|
+
? 'acs_credential'
|
|
144
|
+
: 'unmanaged_acs_credential'
|
|
145
|
+
const management_clause = is_managed ? '' : ', which is not managed by Seam,'
|
|
146
|
+
|
|
147
|
+
return `
|
|
148
|
+
Means by which a user gains access at an entrance.
|
|
68
149
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
is_managed: z.literal(false),
|
|
72
|
-
}),
|
|
73
|
-
)
|
|
150
|
+
The \`${resource_name}\` object${management_clause} represents a credential that provides an ACS user access within an access control system. For each acs_credential object, you define the access method. You can also specify additional properties, such as a code.`.trim()
|
|
151
|
+
}
|
|
74
152
|
|
|
75
153
|
export const acs_credential_on_encoder = z.object({
|
|
76
154
|
created_at: z
|
|
@@ -117,7 +195,8 @@ export const acs_credential_on_encoder = z.object({
|
|
|
117
195
|
guest_acs_entrance_ids: z.array(z.string().uuid()).optional(),
|
|
118
196
|
common_acs_entrance_ids: z.array(z.string().uuid()).optional(),
|
|
119
197
|
})
|
|
120
|
-
.optional()
|
|
198
|
+
.optional()
|
|
199
|
+
.describe('Visionline-specific metadata for the credential.'),
|
|
121
200
|
})
|
|
122
201
|
|
|
123
202
|
export type AcsCredential = z.output<typeof acs_credential>
|