fix(build): use zod v3 two-arg form for z.record across all shared schemas

Same fix as the agent schema commit — zod 3.25 (resolved by ^3.25.0)
requires z.record() to take both key and value schemas. The single-arg
form is v4 syntax.

Fixed 15 remaining call sites across canvas, project, report, common,
webhook, habit, task, note, and milestone schemas. Pure type-only fix —
runtime behavior identical.
This commit is contained in:
Hermes
2026-07-30 23:59:11 +00:00
parent f7e0915044
commit 304267199e
9 changed files with 15 additions and 15 deletions
+2 -2
View File
@@ -6,7 +6,7 @@ export const webhookDeliverySchema = z.object({
id: z.string(),
webhook_id: z.string(),
event: z.string(),
payload: z.record(z.unknown()),
payload: z.record(z.string(), z.unknown()),
status: z.enum(['success', 'failed', 'pending']).default('pending'),
status_code: z.number().int().optional(),
response_body: z.string().optional(),
@@ -30,7 +30,7 @@ export const webhookSchema = z.object({
headers: z.record(z.string()).optional(),
retry_count: z.number().int().nonnegative().default(3),
last_triggered_at: z.string().datetime().optional(),
custom_fields: z.record(z.unknown()).optional(),
custom_fields: z.record(z.string(), z.unknown()).optional(),
created: z.string().datetime(),
updated: z.string().datetime(),
});