refactor(contracts): split schemas-misc into per-domain files

Break the 281-line kitchen-sink schemas-misc.ts into 12 domain modules
(badges, automation, budget, wakeup, config-revisions, run-events,
agent-permissions, heartbeat, runtime-state, threads, participants,
subscriptions). schemas-misc.ts now re-exports the domain barrel so
existing imports keep working. Adds direct exports to contracts.ts for
new code to pull from the narrower modules.
This commit is contained in:
ZacharyZhang-NY committed 2026-04-16 23:28:00 -04:00
1 parent 3edb2fc6c1
commit 24ea9cff69
13 files changed
+305 -281

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
import { z } from "zod";
export const deleteEntitySchema = z.object({
id: z.string().uuid(),
companyId: z.string().uuid(),
});
export const sidebarBadgesSchema = z.object({
pendingApprovals: z.number(),
activeRuns: z.number(),
failedRuns: z.number(),
todoTasks: z.number(),
budgetWarnings: z.number(),
unreadMessages: z.number(),
});
export type SidebarBadges = z.infer<typeof sidebarBadgesSchema>;
export const entityGetterSchema = z.object({
companyId: z.string().uuid(),
id: z.string().uuid(),
});
export const metricsQuerySchema = z.object({
companyId: z.string().uuid(),
agentId: z.string().uuid().optional(),
days: z.number().int().min(1).max(90).default(30),
});