import { z } from 'zod';
import { ProfileRoleNames } from './user-role-mappings.js';
export const ZCollaborator = z.object({
    email: z.string(),
    firstName: z.string(),
    lastName: z.string(),
    legacyId: z.number(),
    roles: z.array(z.object({
        createdAt: z.string().datetime(),
        name: z.nativeEnum(ProfileRoleNames)
    })),
    userId: z.string().uuid()
});
export const ZPendingCollaboratorRow = z.object({
    collaboratorId: z.string().uuid(),
    createdAt: z.string().datetime(),
    email: z.string(),
    profileId: z.string().uuid(),
    roleName: z.nativeEnum(ProfileRoleNames)
});
export const ZActiveCollaboratorRow = z.object({
    createdAt: z.string().datetime(),
    email: z.string(),
    firstName: z.string(),
    lastName: z.string(),
    legacyId: z.number().int(),
    roleName: z.nativeEnum(ProfileRoleNames),
    userId: z.string().uuid()
});
export const ZEditCollaboratorBody = z.object({
    email: z.string(),
    roleName: z.nativeEnum(ProfileRoleNames)
});
export const ZNewPendingCollaborator = z.object({
    email: z.string(),
    incomingLegacyId: z.number().optional(),
    profileId: z.string().uuid(),
    roleName: z.nativeEnum(ProfileRoleNames)
});
export const ZPendingCollaborator = ZNewPendingCollaborator.extend({
    collaboratorId: z.string().uuid(),
    createdAt: z.string().datetime()
});
export const ZAllCollaborators = z.object({
    active: z.array(ZCollaborator),
    pending: z.array(ZPendingCollaborator)
});
export const ZLegacyEmailIdMapping = z.object({
    email: z.string(),
    legacy_email_id: z.number()
});
