Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
seambot committed Jan 6, 2025
1 parent 7af7701 commit e238932
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions src/lib/seam/connect/models/acs/acs-user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,41 @@ export const acs_users_warnings = z

export type AcsUsersWarningMap = z.infer<typeof acs_users_warning_map>

const common_acs_user_modification = z.object({
created_at: z
.string()
.datetime()
.describe('Date and time at which this modification was requested.'),
message: z.string().describe('Detailed description of the modification.'),
})

const acs_user_suspension_state_modification = common_acs_user_modification
.extend({
modification_code: z.literal('suspension_state'),
})
.describe(
"Indicates that the acs_user's is_suspended state was updated on Seam and will soon be applied on the user on the ACS System",
)

const acs_user_profile_modification = common_acs_user_modification
.extend({
modification_code: z.literal('profile'),
})
.describe(
"Indicates that the acs_user's profile details (name, email, phone) were updated on Seam and will soon be applied on the user on the ACS System",
)

export const acs_user_unapplied_modification_map = z.object({
suspension_state: acs_user_suspension_state_modification
.optional()
.nullable(),
profile: acs_user_profile_modification.optional().nullable(),
})

export type AcsUserUnappliedModificationMap = z.infer<
typeof acs_user_unapplied_modification_map
>

const user_fields = z.object({
full_name: z.string().optional().describe('Full name of the `acs_user`.'),
email: z.string().email().optional().describe(`
Expand Down

0 comments on commit e238932

Please sign in to comment.