Initial commit: Port Nimara CRM (Layers 0-4)
Full CRM rebuild with Next.js 15, TypeScript, Tailwind, Drizzle ORM, PostgreSQL, Redis, BullMQ, MinIO, and Socket.io. Includes 461 source files covering clients, berths, interests/pipeline, documents/EOI, expenses/invoices, email, notifications, dashboard, admin, and client portal. CI/CD via Gitea Actions with Docker builds. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
22
src/lib/validators/reports.ts
Normal file
22
src/lib/validators/reports.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { z } from 'zod';
|
||||
|
||||
export const requestReportSchema = z.object({
|
||||
reportType: z.enum(['pipeline', 'revenue', 'activity', 'occupancy']),
|
||||
name: z.string().min(1).max(200),
|
||||
parameters: z
|
||||
.object({
|
||||
dateFrom: z.string().optional(),
|
||||
dateTo: z.string().optional(),
|
||||
})
|
||||
.optional()
|
||||
.default({}),
|
||||
});
|
||||
|
||||
export const listReportsSchema = z.object({
|
||||
page: z.coerce.number().int().positive().default(1),
|
||||
limit: z.coerce.number().int().positive().max(100).default(20),
|
||||
status: z.enum(['queued', 'processing', 'ready', 'failed']).optional(),
|
||||
});
|
||||
|
||||
export type RequestReportInput = z.infer<typeof requestReportSchema>;
|
||||
export type ListReportsInput = z.infer<typeof listReportsSchema>;
|
||||
Reference in New Issue
Block a user