Calendar events support multiple reminder offsets with presets and per-user defaults. Lists index adds inline task entry and list property editing. Generic entity comments on list detail. New bangs.stats dashboard widget. Closes Gitea #28, #29, #30, #31. Migrations 0022 and 0023.
33 lines
1.1 KiB
TypeScript
33 lines
1.1 KiB
TypeScript
import { z } from "zod";
|
|
|
|
export const listInput = z.object({
|
|
type: z.string().trim().min(1).max(80),
|
|
name: z.string().trim().min(1).max(120),
|
|
});
|
|
|
|
export const listUpdateInput = z.object({
|
|
name: listInput.shape.name.optional(),
|
|
type: listInput.shape.type.optional(),
|
|
archived: z.boolean().optional(),
|
|
});
|
|
|
|
export const itemInput = z.object({
|
|
listId: z.string().uuid(),
|
|
text: z.string().trim().min(1).max(300),
|
|
qty: z.string().trim().max(80).nullable().optional(),
|
|
notes: z.string().trim().max(2000).nullable().optional(),
|
|
dueAt: z.coerce.date().nullable().optional(),
|
|
assigneeId: z.string().uuid().nullable().optional(),
|
|
metadata: z.record(z.string(), z.unknown()).nullable().optional(),
|
|
});
|
|
|
|
export const updateItemInput = z.object({
|
|
id: z.string().uuid(),
|
|
text: z.string().trim().min(1).max(300).optional(),
|
|
qty: z.string().trim().max(80).nullable().optional(),
|
|
notes: z.string().trim().max(2000).nullable().optional(),
|
|
dueAt: z.coerce.date().nullable().optional(),
|
|
assigneeId: z.string().uuid().nullable().optional(),
|
|
done: z.boolean().optional(),
|
|
});
|