| 1 | import z from 'zod' |
| 2 | |
| 3 | export const createMilestoneSchema = |
| 4 | projectId: z.string |
| 5 | name: z.string |
| 6 | description: z.string |
| 7 | dueDate: z.date |
| 8 | budgetMinutes: z.number |
| 9 | budgetAmountCents: z.number |
| 10 | currency: z.string |
| 11 | }) |
| 12 | |
| 13 | export const updateMilestoneSchema = |
| 14 | milestoneId: z.string |
| 15 | name: z.string |
| 16 | description: z.string |
| 17 | dueDate: z.date |
| 18 | status: z.enum |
| 19 | blockReason: z.string |
| 20 | budgetMinutes: z |
| 21 | .number() |
| 22 | .int() |
| 23 | .positive() |
| 24 | .max(2_147_483_647) |
| 25 | .nullable() |
| 26 | .optional(), |
| 27 | budgetAmountCents: z |
| 28 | .number() |
| 29 | .int() |
| 30 | .positive() |
| 31 | .max(2_147_483_647) |
| 32 | .nullable() |
| 33 | .optional(), |
| 34 | currency: z.string |
| 35 | }) |
| 36 | |
| 37 | export const deleteMilestoneSchema = |
| 38 | milestoneId: z.string |
| 39 | }) |
| 40 | |
| 41 | export const completeMilestoneSchema = |
| 42 | milestoneId: z.string |
| 43 | }) |
| 44 | |
| 45 | export const reorderMilestonesSchema = |
| 46 | projectId: z.string |
| 47 | orderedIds: z.array |
| 48 | }) |
| 49 | |
| 50 | export const linkRequirementSchema = |
| 51 | milestoneId: z.string |
| 52 | requirementId: z.string |
| 53 | }) |
| 54 | |
| 55 | export const unlinkRequirementSchema = |
| 56 | milestoneId: z.string |
| 57 | requirementId: z.string |
| 58 | }) |