/**
 * Generated by orval v8.9.1 🍺
 * Do not edit manually.
 * Api
 * API specification
 * OpenAPI spec version: 0.1.0
 */
import * as zod from 'zod';

/**
 * Returns server health status
 * @summary Health check
 */
export const HealthCheckResponse = zod.object({
  "status": zod.string()
})


/**
 * @summary List all conversations
 */
export const ListConversationsResponseItem = zod.object({
  "id": zod.number(),
  "title": zod.string(),
  "model": zod.string(),
  "projectId": zod.number().nullish(),
  "messageCount": zod.number(),
  "createdAt": zod.coerce.date(),
  "updatedAt": zod.coerce.date()
})
export const ListConversationsResponse = zod.array(ListConversationsResponseItem)


/**
 * @summary Create a conversation
 */
export const CreateConversationBody = zod.object({
  "title": zod.string(),
  "projectId": zod.number().nullish(),
  "model": zod.string().optional()
})


/**
 * @summary Get conversation by ID
 */
export const GetConversationParams = zod.object({
  "id": zod.coerce.number()
})

export const GetConversationResponse = zod.object({
  "id": zod.number(),
  "title": zod.string(),
  "model": zod.string(),
  "projectId": zod.number().nullish(),
  "messageCount": zod.number(),
  "createdAt": zod.coerce.date(),
  "updatedAt": zod.coerce.date()
}).and(zod.object({
  "messages": zod.array(zod.object({
  "id": zod.number(),
  "conversationId": zod.number(),
  "role": zod.enum(['user', 'assistant', 'system']),
  "content": zod.string(),
  "createdAt": zod.coerce.date()
}))
}))


/**
 * @summary Delete a conversation
 */
export const DeleteConversationParams = zod.object({
  "id": zod.coerce.number()
})


/**
 * @summary List messages in a conversation
 */
export const ListMessagesParams = zod.object({
  "id": zod.coerce.number()
})

export const ListMessagesResponseItem = zod.object({
  "id": zod.number(),
  "conversationId": zod.number(),
  "role": zod.enum(['user', 'assistant', 'system']),
  "content": zod.string(),
  "createdAt": zod.coerce.date()
})
export const ListMessagesResponse = zod.array(ListMessagesResponseItem)


/**
 * @summary Send a message (streams SSE)
 */
export const SendMessageParams = zod.object({
  "id": zod.coerce.number()
})

export const SendMessageBody = zod.object({
  "content": zod.string(),
  "model": zod.string().optional()
})


/**
 * @summary Get aggregate project statistics
 */
export const GetProjectStatsResponse = zod.object({
  "totalProjects": zod.number(),
  "activeProjects": zod.number(),
  "totalConversations": zod.number(),
  "totalMessages": zod.number()
})


/**
 * @summary List all projects
 */
export const ListProjectsResponseItem = zod.object({
  "id": zod.number(),
  "name": zod.string(),
  "description": zod.string().nullish(),
  "status": zod.string(),
  "conversationCount": zod.number(),
  "createdAt": zod.coerce.date(),
  "updatedAt": zod.coerce.date()
})
export const ListProjectsResponse = zod.array(ListProjectsResponseItem)


/**
 * @summary Create a project
 */
export const CreateProjectBody = zod.object({
  "name": zod.string(),
  "description": zod.string().optional()
})


/**
 * @summary Get project by ID
 */
export const GetProjectParams = zod.object({
  "id": zod.coerce.number()
})

export const GetProjectResponse = zod.object({
  "id": zod.number(),
  "name": zod.string(),
  "description": zod.string().nullish(),
  "status": zod.string(),
  "conversationCount": zod.number(),
  "createdAt": zod.coerce.date(),
  "updatedAt": zod.coerce.date()
})


/**
 * @summary Update a project
 */
export const UpdateProjectParams = zod.object({
  "id": zod.coerce.number()
})

export const UpdateProjectBody = zod.object({
  "name": zod.string().optional(),
  "description": zod.string().optional(),
  "status": zod.string().optional()
})

export const UpdateProjectResponse = zod.object({
  "id": zod.number(),
  "name": zod.string(),
  "description": zod.string().nullish(),
  "status": zod.string(),
  "conversationCount": zod.number(),
  "createdAt": zod.coerce.date(),
  "updatedAt": zod.coerce.date()
})


/**
 * @summary Delete a project
 */
export const DeleteProjectParams = zod.object({
  "id": zod.coerce.number()
})
