"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.GetTasksResponseSchema = exports.TaskSchema = exports.GetTasksInputSchema = exports.TaskStatusSchema = void 0;
const zod_1 = require("zod");
const User_schema_1 = require("./User.schema");
const Pagination_schema_1 = require("./Pagination.schema");
exports.TaskStatusSchema = zod_1.z.enum([
    'pending',
    'in_progress',
    'completed',
    'cancelled',
    'stuck',
]);
/**
 * Input schema
 */
exports.GetTasksInputSchema = zod_1.z.object({
    status: exports.TaskStatusSchema.optional(),
    patient_id: zod_1.z.string().optional(),
    activity_object_type: zod_1.z
        .string()
        .optional()
        .describe('Comma-separated list of activity object types'),
    careflow_definition_id: zod_1.z
        .string()
        .optional()
        .describe('Comma-separated list of careflow definition IDs'),
    careflow_id: zod_1.z
        .string()
        .optional()
        .describe('Comma-separated list of careflow definition IDs'),
    sort_by: zod_1.z.enum(['completed_at', 'created_at', 'due_at']).optional(),
    direction: zod_1.z.enum(['asc', 'desc']).optional(),
    limit: zod_1.z.number().optional(),
    offset: zod_1.z.number().optional(),
});
/**
 * Output schema
 */
exports.TaskSchema = zod_1.z.object({
    id: zod_1.z.string(),
    title: zod_1.z.string(),
    description: zod_1.z.string(),
    due_at: zod_1.z.string().datetime(),
    status: exports.TaskStatusSchema,
    task_type: zod_1.z.string(),
    task_data: zod_1.z.object({
        task: zod_1.z.unknown(), // TODO: Add task schema
        pathway: zod_1.z.unknown(), // TODO: Add pathway schema
        activity: zod_1.z.unknown(), // TODO: Add activity schema
    }),
    completed_at: zod_1.z.string().datetime().nullable(),
    created_at: zod_1.z.string().datetime(),
    updated_at: zod_1.z.string().datetime(),
    patient_id: zod_1.z.string(),
    performer: User_schema_1.UserSchema.nullable().optional(),
    patient: zod_1.z.unknown(), // TODO: Add patient schema
});
exports.GetTasksResponseSchema = zod_1.z.object({
    tasks: zod_1.z.array(exports.TaskSchema),
    pagination: Pagination_schema_1.PaginationSchema,
});
//# sourceMappingURL=GetTasks.schema.js.map