Add missing schemas, member model fields, and import endpoint
Adds memberInviteSchema and bulkMemberImportSchema needed by the invite and CSV import endpoints. Adds inviteEmailSent/inviteEmailSentAt fields to member model. Adds the bulk import API route.
This commit is contained in:
parent
5b4ca1b41d
commit
2705d171bd
3 changed files with 70 additions and 0 deletions
|
|
@ -330,3 +330,17 @@ export const adminMemberCreateSchema = z.object({
|
|||
export const adminRoleUpdateSchema = z.object({
|
||||
role: z.enum(['admin', 'member'])
|
||||
})
|
||||
|
||||
export const bulkMemberImportSchema = z.object({
|
||||
members: z.array(z.object({
|
||||
name: z.string().min(1).max(200),
|
||||
email: z.string().trim().toLowerCase().email(),
|
||||
circle: z.enum(['community', 'founder', 'practitioner']),
|
||||
contributionTier: z.enum(['0', '5', '15', '30', '50'])
|
||||
})).min(1).max(100)
|
||||
})
|
||||
|
||||
export const memberInviteSchema = z.object({
|
||||
memberIds: z.array(z.string().min(1)).min(1).max(100),
|
||||
emailTemplate: z.string().min(1).max(10000)
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue