Fresh history cut from cynarAI/evoo antigravity-handoff/project-timeline (Voice First + project timeline). Brand docs/titles as evOo; keep @rakazo/* packages as tech debt. Excludes node_modules, caches, secrets, voice blobs.
34 lines
1.0 KiB
TypeScript
34 lines
1.0 KiB
TypeScript
import * as z from "zod";
|
|
import { Id } from "./ids.js";
|
|
|
|
export const ProjectGoalStatusSchema = z.enum(["open", "doing", "done"]);
|
|
export type ProjectGoalStatus = z.infer<typeof ProjectGoalStatusSchema>;
|
|
|
|
export const ProjectGoalSchema = z.object({
|
|
id: Id,
|
|
sectionId: Id,
|
|
groupId: Id.nullable(),
|
|
title: z.string(),
|
|
description: z.string().nullable(),
|
|
status: ProjectGoalStatusSchema,
|
|
createdAt: z.string(),
|
|
updatedAt: z.string(),
|
|
});
|
|
export type ProjectGoal = z.infer<typeof ProjectGoalSchema>;
|
|
|
|
export const CreateProjectGoalInput = z.object({
|
|
sectionId: Id,
|
|
title: z.string().trim().min(1).max(200),
|
|
description: z.string().trim().max(4_000).optional(),
|
|
status: ProjectGoalStatusSchema.default("open"),
|
|
groupId: Id.optional(),
|
|
});
|
|
|
|
export const UpdateProjectGoalInput = z.object({
|
|
goalId: Id,
|
|
title: z.string().trim().min(1).max(200).optional(),
|
|
description: z.string().trim().max(4_000).nullable().optional(),
|
|
status: ProjectGoalStatusSchema.optional(),
|
|
groupId: Id.nullable().optional(),
|
|
});
|