Spaces:
Runtime error
Runtime error
| /** | |
| * Generated by orval v8.9.1 🍺 | |
| * Do not edit manually. | |
| * Api | |
| * Design Studio OS API | |
| * OpenAPI spec version: 0.1.0 | |
| */ | |
| import * as zod from 'zod'; | |
| /** | |
| * @summary Health check | |
| */ | |
| export const HealthCheckResponse = zod.object({ | |
| "status": zod.string() | |
| }) | |
| /** | |
| * @summary List all projects | |
| */ | |
| export const ListProjectsQueryParams = zod.object({ | |
| "status": zod.enum(['briefing', 'concept', 'design', 'review', 'delivered', 'archived']).optional(), | |
| "clientId": zod.coerce.number().optional() | |
| }) | |
| export const ListProjectsResponseItem = zod.object({ | |
| "id": zod.number(), | |
| "title": zod.string(), | |
| "description": zod.string().nullish(), | |
| "clientId": zod.number().nullish(), | |
| "clientName": zod.string().nullish(), | |
| "status": zod.enum(['briefing', 'concept', 'design', 'review', 'delivered', 'archived']), | |
| "priority": zod.enum(['low', 'medium', 'high']), | |
| "budget": zod.number().nullish(), | |
| "deadline": zod.string().nullish(), | |
| "driveUrl": zod.string().nullish(), | |
| "planUrl": zod.string().nullish(), | |
| "totalHours": zod.number().nullish(), | |
| "createdAt": zod.string(), | |
| "updatedAt": zod.string() | |
| }) | |
| export const ListProjectsResponse = zod.array(ListProjectsResponseItem) | |
| /** | |
| * @summary Create a new project | |
| */ | |
| export const createProjectBodyStatusDefault = `briefing`; | |
| export const createProjectBodyPriorityDefault = `medium`; | |
| export const CreateProjectBody = zod.object({ | |
| "title": zod.string(), | |
| "description": zod.string().nullish(), | |
| "clientId": zod.number().nullish(), | |
| "status": zod.enum(['briefing', 'concept', 'design', 'review', 'delivered', 'archived']).default(createProjectBodyStatusDefault), | |
| "priority": zod.enum(['low', 'medium', 'high']).default(createProjectBodyPriorityDefault), | |
| "budget": zod.number().nullish(), | |
| "deadline": zod.string().nullish(), | |
| "driveUrl": zod.string().nullish(), | |
| "planUrl": zod.string().nullish() | |
| }) | |
| /** | |
| * @summary Get a project by ID | |
| */ | |
| export const GetProjectParams = zod.object({ | |
| "id": zod.coerce.number() | |
| }) | |
| export const GetProjectResponse = zod.object({ | |
| "id": zod.number(), | |
| "title": zod.string(), | |
| "description": zod.string().nullish(), | |
| "clientId": zod.number().nullish(), | |
| "clientName": zod.string().nullish(), | |
| "status": zod.enum(['briefing', 'concept', 'design', 'review', 'delivered', 'archived']), | |
| "priority": zod.enum(['low', 'medium', 'high']), | |
| "budget": zod.number().nullish(), | |
| "deadline": zod.string().nullish(), | |
| "driveUrl": zod.string().nullish(), | |
| "planUrl": zod.string().nullish(), | |
| "totalHours": zod.number().nullish(), | |
| "createdAt": zod.string(), | |
| "updatedAt": zod.string() | |
| }) | |
| /** | |
| * @summary Update a project | |
| */ | |
| export const UpdateProjectParams = zod.object({ | |
| "id": zod.coerce.number() | |
| }) | |
| export const UpdateProjectBody = zod.object({ | |
| "title": zod.string().optional(), | |
| "description": zod.string().nullish(), | |
| "clientId": zod.number().nullish(), | |
| "status": zod.enum(['briefing', 'concept', 'design', 'review', 'delivered', 'archived']).optional(), | |
| "priority": zod.enum(['low', 'medium', 'high']).optional(), | |
| "budget": zod.number().nullish(), | |
| "deadline": zod.string().nullish(), | |
| "driveUrl": zod.string().nullish(), | |
| "planUrl": zod.string().nullish() | |
| }) | |
| export const UpdateProjectResponse = zod.object({ | |
| "id": zod.number(), | |
| "title": zod.string(), | |
| "description": zod.string().nullish(), | |
| "clientId": zod.number().nullish(), | |
| "clientName": zod.string().nullish(), | |
| "status": zod.enum(['briefing', 'concept', 'design', 'review', 'delivered', 'archived']), | |
| "priority": zod.enum(['low', 'medium', 'high']), | |
| "budget": zod.number().nullish(), | |
| "deadline": zod.string().nullish(), | |
| "driveUrl": zod.string().nullish(), | |
| "planUrl": zod.string().nullish(), | |
| "totalHours": zod.number().nullish(), | |
| "createdAt": zod.string(), | |
| "updatedAt": zod.string() | |
| }) | |
| /** | |
| * @summary Delete a project | |
| */ | |
| export const DeleteProjectParams = zod.object({ | |
| "id": zod.coerce.number() | |
| }) | |
| /** | |
| * @summary List all clients | |
| */ | |
| export const ListClientsResponseItem = zod.object({ | |
| "id": zod.number(), | |
| "name": zod.string(), | |
| "email": zod.string().nullish(), | |
| "phone": zod.string().nullish(), | |
| "company": zod.string().nullish(), | |
| "notes": zod.string().nullish(), | |
| "projectCount": zod.number().nullish(), | |
| "createdAt": zod.string() | |
| }) | |
| export const ListClientsResponse = zod.array(ListClientsResponseItem) | |
| /** | |
| * @summary Create a client | |
| */ | |
| export const CreateClientBody = zod.object({ | |
| "name": zod.string(), | |
| "email": zod.string().nullish(), | |
| "phone": zod.string().nullish(), | |
| "company": zod.string().nullish(), | |
| "notes": zod.string().nullish() | |
| }) | |
| /** | |
| * @summary Get a client by ID | |
| */ | |
| export const GetClientParams = zod.object({ | |
| "id": zod.coerce.number() | |
| }) | |
| export const GetClientResponse = zod.object({ | |
| "id": zod.number(), | |
| "name": zod.string(), | |
| "email": zod.string().nullish(), | |
| "phone": zod.string().nullish(), | |
| "company": zod.string().nullish(), | |
| "notes": zod.string().nullish(), | |
| "projectCount": zod.number().nullish(), | |
| "createdAt": zod.string() | |
| }) | |
| /** | |
| * @summary Update a client | |
| */ | |
| export const UpdateClientParams = zod.object({ | |
| "id": zod.coerce.number() | |
| }) | |
| export const UpdateClientBody = zod.object({ | |
| "name": zod.string().optional(), | |
| "email": zod.string().nullish(), | |
| "phone": zod.string().nullish(), | |
| "company": zod.string().nullish(), | |
| "notes": zod.string().nullish() | |
| }) | |
| export const UpdateClientResponse = zod.object({ | |
| "id": zod.number(), | |
| "name": zod.string(), | |
| "email": zod.string().nullish(), | |
| "phone": zod.string().nullish(), | |
| "company": zod.string().nullish(), | |
| "notes": zod.string().nullish(), | |
| "projectCount": zod.number().nullish(), | |
| "createdAt": zod.string() | |
| }) | |
| /** | |
| * @summary Delete a client | |
| */ | |
| export const DeleteClientParams = zod.object({ | |
| "id": zod.coerce.number() | |
| }) | |
| /** | |
| * @summary List tasks | |
| */ | |
| export const ListTasksQueryParams = zod.object({ | |
| "projectId": zod.coerce.number().optional(), | |
| "done": zod.coerce.boolean().optional() | |
| }) | |
| export const ListTasksResponseItem = zod.object({ | |
| "id": zod.number(), | |
| "projectId": zod.number(), | |
| "title": zod.string(), | |
| "done": zod.boolean(), | |
| "dueDate": zod.string().nullish(), | |
| "createdAt": zod.string() | |
| }) | |
| export const ListTasksResponse = zod.array(ListTasksResponseItem) | |
| /** | |
| * @summary Create a task | |
| */ | |
| export const CreateTaskBody = zod.object({ | |
| "projectId": zod.number(), | |
| "title": zod.string(), | |
| "dueDate": zod.string().nullish() | |
| }) | |
| /** | |
| * @summary Update a task | |
| */ | |
| export const UpdateTaskParams = zod.object({ | |
| "id": zod.coerce.number() | |
| }) | |
| export const UpdateTaskBody = zod.object({ | |
| "title": zod.string().optional(), | |
| "done": zod.boolean().optional(), | |
| "dueDate": zod.string().nullish() | |
| }) | |
| export const UpdateTaskResponse = zod.object({ | |
| "id": zod.number(), | |
| "projectId": zod.number(), | |
| "title": zod.string(), | |
| "done": zod.boolean(), | |
| "dueDate": zod.string().nullish(), | |
| "createdAt": zod.string() | |
| }) | |
| /** | |
| * @summary Delete a task | |
| */ | |
| export const DeleteTaskParams = zod.object({ | |
| "id": zod.coerce.number() | |
| }) | |
| /** | |
| * @summary List time entries | |
| */ | |
| export const ListTimeEntriesQueryParams = zod.object({ | |
| "projectId": zod.coerce.number().optional() | |
| }) | |
| export const ListTimeEntriesResponseItem = zod.object({ | |
| "id": zod.number(), | |
| "projectId": zod.number(), | |
| "description": zod.string().nullish(), | |
| "hours": zod.number(), | |
| "date": zod.string(), | |
| "createdAt": zod.string() | |
| }) | |
| export const ListTimeEntriesResponse = zod.array(ListTimeEntriesResponseItem) | |
| /** | |
| * @summary Log time entry | |
| */ | |
| export const CreateTimeEntryBody = zod.object({ | |
| "projectId": zod.number(), | |
| "description": zod.string().nullish(), | |
| "hours": zod.number(), | |
| "date": zod.string() | |
| }) | |
| /** | |
| * @summary Delete a time entry | |
| */ | |
| export const DeleteTimeEntryParams = zod.object({ | |
| "id": zod.coerce.number() | |
| }) | |
| /** | |
| * @summary List brief templates | |
| */ | |
| export const ListBriefsResponseItem = zod.object({ | |
| "id": zod.number(), | |
| "title": zod.string(), | |
| "category": zod.string().nullish(), | |
| "content": zod.string(), | |
| "createdAt": zod.string(), | |
| "updatedAt": zod.string() | |
| }) | |
| export const ListBriefsResponse = zod.array(ListBriefsResponseItem) | |
| /** | |
| * @summary Create a brief template | |
| */ | |
| export const CreateBriefBody = zod.object({ | |
| "title": zod.string(), | |
| "category": zod.string().nullish(), | |
| "content": zod.string() | |
| }) | |
| /** | |
| * @summary Update a brief | |
| */ | |
| export const UpdateBriefParams = zod.object({ | |
| "id": zod.coerce.number() | |
| }) | |
| export const UpdateBriefBody = zod.object({ | |
| "title": zod.string().optional(), | |
| "category": zod.string().nullish(), | |
| "content": zod.string().optional() | |
| }) | |
| export const UpdateBriefResponse = zod.object({ | |
| "id": zod.number(), | |
| "title": zod.string(), | |
| "category": zod.string().nullish(), | |
| "content": zod.string(), | |
| "createdAt": zod.string(), | |
| "updatedAt": zod.string() | |
| }) | |
| /** | |
| * @summary Delete a brief | |
| */ | |
| export const DeleteBriefParams = zod.object({ | |
| "id": zod.coerce.number() | |
| }) | |
| /** | |
| * @summary Get dashboard statistics | |
| */ | |
| export const GetDashboardStatsResponse = zod.object({ | |
| "activeProjects": zod.number(), | |
| "totalClients": zod.number(), | |
| "hoursThisMonth": zod.number(), | |
| "pendingTasks": zod.number(), | |
| "projectsByStatus": zod.array(zod.object({ | |
| "status": zod.string(), | |
| "count": zod.number() | |
| })), | |
| "revenueThisMonth": zod.number() | |
| }) | |
| /** | |
| * @summary Get recent activity feed | |
| */ | |
| export const getRecentActivityQueryLimitDefault = 10; | |
| export const GetRecentActivityQueryParams = zod.object({ | |
| "limit": zod.coerce.number().default(getRecentActivityQueryLimitDefault) | |
| }) | |
| export const GetRecentActivityResponseItem = zod.object({ | |
| "id": zod.string(), | |
| "type": zod.enum(['project_created', 'project_updated', 'task_completed', 'time_logged', 'client_added']), | |
| "description": zod.string(), | |
| "entityId": zod.number().nullish(), | |
| "createdAt": zod.string() | |
| }) | |
| export const GetRecentActivityResponse = zod.array(GetRecentActivityResponseItem) | |
| /** | |
| * @summary Get upcoming deadlines | |
| */ | |
| export const GetUpcomingDeadlinesResponseItem = zod.object({ | |
| "id": zod.number(), | |
| "title": zod.string(), | |
| "description": zod.string().nullish(), | |
| "clientId": zod.number().nullish(), | |
| "clientName": zod.string().nullish(), | |
| "status": zod.enum(['briefing', 'concept', 'design', 'review', 'delivered', 'archived']), | |
| "priority": zod.enum(['low', 'medium', 'high']), | |
| "budget": zod.number().nullish(), | |
| "deadline": zod.string().nullish(), | |
| "driveUrl": zod.string().nullish(), | |
| "planUrl": zod.string().nullish(), | |
| "totalHours": zod.number().nullish(), | |
| "createdAt": zod.string(), | |
| "updatedAt": zod.string() | |
| }) | |
| export const GetUpcomingDeadlinesResponse = zod.array(GetUpcomingDeadlinesResponseItem) | |