Files

47 lines
1.3 KiB
TypeScript

export const CITIZENSHIP_APPLICATION_STATUSES = ["PENDING", "APPROVED", "REJECTED"] as const;
export type CitizenshipApplicationStatus = typeof CITIZENSHIP_APPLICATION_STATUSES[number];
export const APPLICATION_TYPES = ["PREVIOUS_CITIZENSHIP", "NATURALIZATION"] as const;
export type ApplicationType = typeof APPLICATION_TYPES[number];
export const EYE_COLORS = [
"Blue",
"Green",
"Brown",
"Hazel",
"Gray",
"Amber",
] as const;
export type EyeColor = typeof EYE_COLORS[number];
export type CitizenshipApplication = {
id: string;
userId: string;
surname: string;
givenNames: string;
sex: "MALE" | "FEMALE";
birthDate: Date;
applicationType: ApplicationType;
previousCountry: string | null;
previousRegion: string | null;
naturalizationReason: string | null;
address: string;
height: number;
eyeColor: EyeColor;
status: CitizenshipApplicationStatus;
rejectionReason: string | null;
reviewedAt: Date | null;
reviewedBy: string | null;
createdAt: Date;
updatedAt: Date;
profileKey: string;
signatureKey: string;
};
export type CitizenshipApplicationWithWarning = CitizenshipApplication & {
nameMismatch: boolean;
previousCitizenship: boolean;
profileUrl: string;
signatureUrl: string;
reviewer: { firstName: string; secondName: string } | null;
};