Skip to content

Commit 7ad34e6

Browse files
seambotrazor-x
andauthored
feat: Document user_identity (#1261)
Co-authored-by: Evan Sosenko <[email protected]>
1 parent 76f215b commit 7ad34e6

File tree

4 files changed

+413
-60
lines changed

4 files changed

+413
-60
lines changed

src/lib/seam/connect/models/acs/acs-credential-provisioning-automation.ts

Lines changed: 32 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,39 @@ export const acs_credential_provisioning_automation = z.object({
88
workspace_id: z.string().uuid(),
99
})
1010

11-
export const enrollment_automation = acs_credential_provisioning_automation
12-
.omit({
13-
acs_credential_provisioning_automation_id: true,
11+
export const enrollment_automation = z
12+
.object({
13+
enrollment_automation_id: z
14+
.string()
15+
.uuid()
16+
.describe('ID of the enrollment automation.'),
17+
credential_manager_acs_system_id: z
18+
.string()
19+
.uuid()
20+
.describe(
21+
'ID of the associated [ACS system](https://docs.seam.co/latest/capability-guides/access-systems) that serves as the credential manager.',
22+
),
23+
user_identity_id: z
24+
.string()
25+
.uuid()
26+
.describe(
27+
'ID of the associated [user identity](https://docs.seam.co/latest/capability-guides/mobile-access-in-development/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity).',
28+
),
29+
created_at: z
30+
.string()
31+
.datetime()
32+
.describe(
33+
'Date and time at which the enrollment automation was created.',
34+
),
35+
workspace_id: z
36+
.string()
37+
.uuid()
38+
.describe(
39+
'ID of the [workspace](https://docs.seam.co/latest/core-concepts/workspaces) that contains the enrollment automation.',
40+
),
1441
})
15-
.merge(
16-
z.object({
17-
enrollment_automation_id: z.string().uuid(),
18-
}),
42+
.describe(
43+
'Represents an [enrollment automation](https://docs.seam.co/latest/capability-guides/mobile-access-in-development/issuing-mobile-credentials-from-an-access-control-system) within the [Seam mobile access solution](https://docs.seam.co/latest/capability-guides/mobile-access-in-development).',
1944
)
2045

2146
export type EnrollmentAutomation = z.output<typeof enrollment_automation>

src/lib/seam/connect/models/user-identities/user-identity.ts

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,39 @@ import { z } from 'zod'
22

33
import { phone_number } from '../phone-number.js'
44

5-
export const user_identity = z.object({
6-
user_identity_id: z.string().uuid(),
7-
user_identity_key: z.string().min(1).nullable(),
8-
email_address: z.string().email().nullable(),
9-
phone_number: phone_number.nullable(),
10-
display_name: z.string().min(1),
11-
full_name: z.string().min(1).nullable(),
12-
created_at: z.string().datetime(),
13-
workspace_id: z.string().uuid(),
14-
})
5+
export const user_identity = z
6+
.object({
7+
user_identity_id: z.string().uuid().describe('ID of the user identity.'),
8+
user_identity_key: z
9+
.string()
10+
.min(1)
11+
.nullable()
12+
.describe('Unique key for the user identity.'),
13+
email_address: z
14+
.string()
15+
.email()
16+
.nullable()
17+
.describe('Unique email address for the user identity.'),
18+
phone_number: phone_number
19+
.nullable()
20+
.describe(
21+
'Unique phone number for the user identity in [E.164 format](https://www.itu.int/rec/T-REC-E.164/en) (for example, +15555550100).',
22+
),
23+
display_name: z.string().min(1),
24+
full_name: z.string().min(1).nullable(),
25+
created_at: z
26+
.string()
27+
.datetime()
28+
.describe('Date and time at which the user identity was created.'),
29+
workspace_id: z
30+
.string()
31+
.uuid()
32+
.describe(
33+
'ID of the [workspace](https://docs.seam.co/latest/core-concepts/workspaces) that contains the user identity.',
34+
),
35+
})
36+
.describe(
37+
'Represents a [user identity](https://docs.seam.co/latest/capability-guides/mobile-access-in-development/managing-mobile-app-user-accounts-with-user-identities#what-is-a-user-identity) associated with an application user account.',
38+
)
1539

1640
export type UserIdentity = z.output<typeof user_identity>

0 commit comments

Comments
 (0)