Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | 284x 43x 284x | import { z } from "zod";
import { attachmentArraySchema, attachmentArraySchemaOptional } from "../attachments";
import { sharedSchema } from "./base-schema";
export const baseSchema = z.object({
event: z.literal("new-chip-details-submission").default("new-chip-details-submission"),
chipSubmissionType: z.array(z.string()).optional().default([]),
additionalInformation: z.string().max(4000).nullable().default(null).optional(),
attachments: z.object({
chipEligibility: z.object({
files: attachmentArraySchema(),
label: z.string().default("CHIP Eligibility Template"),
}),
coverLetter: z.object({
files: attachmentArraySchema(),
label: z.string().default("Cover Letter"),
}),
currentStatePlan: z.object({
files: attachmentArraySchemaOptional(),
label: z.string().default("Current State Plan"),
}),
amendedLanguage: z.object({
files: attachmentArraySchemaOptional(),
label: z.string().default("Amended State Plan Language"),
}),
budgetDocuments: z.object({
files: attachmentArraySchemaOptional(),
label: z.string().default("Budget Documents"),
}),
publicNotice: z.object({
files: attachmentArraySchemaOptional(),
label: z.string().default("Public Notice"),
}),
tribalConsultation: z.object({
files: attachmentArraySchemaOptional(),
label: z.string().default("Tribal Consultation"),
}),
other: z.object({
files: attachmentArraySchemaOptional(),
label: z.string().default("Other"),
}),
}),
authority: z.string().default("CHIP SPA"),
proposedEffectiveDate: z.number(),
actionType: z.string().default("Amend"),
id: z
.string()
.min(1, { message: "Required" })
.refine((id) => /^[A-Z]{2}-\d{2}-\d{4}(-[A-Z0-9]{1,4})?$/.test(id), {
message: "ID doesn't match format SS-YY-NNNN or SS-YY-NNNN-XXXX",
}),
});
export const schema = baseSchema.merge(sharedSchema);
|