"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.myHistoricalListQuerySchema = exports.historicalListQuerySchema = exports.liveVolunteersQuerySchema = exports.linkCanvassSchema = exports.submitPointsSchema = exports.startTrackingSchema = void 0;
const zod_1 = require("zod");
const client_1 = require("@prisma/client");
exports.startTrackingSchema = zod_1.z.object({
    canvassSessionId: zod_1.z.string().optional(),
    latitude: zod_1.z.number().min(-90).max(90).optional(),
    longitude: zod_1.z.number().min(-180).max(180).optional(),
});
exports.submitPointsSchema = zod_1.z.object({
    points: zod_1.z
        .array(zod_1.z.object({
        latitude: zod_1.z.number().min(-90).max(90),
        longitude: zod_1.z.number().min(-180).max(180),
        accuracy: zod_1.z.number().positive().optional(),
        recordedAt: zod_1.z.string().datetime(),
        eventType: zod_1.z.nativeEnum(client_1.TrackPointEvent).optional(),
    }))
        .min(1)
        .max(100),
});
exports.linkCanvassSchema = zod_1.z.object({
    canvassSessionId: zod_1.z.string().min(1),
});
exports.liveVolunteersQuerySchema = zod_1.z.object({
    staleCutoffMinutes: zod_1.z.coerce.number().int().positive().default(10),
});
exports.historicalListQuerySchema = zod_1.z.object({
    userId: zod_1.z.string().optional(),
    from: zod_1.z.string().datetime().optional(),
    to: zod_1.z.string().datetime().optional(),
    page: zod_1.z.coerce.number().int().positive().default(1),
    limit: zod_1.z.coerce.number().int().positive().max(100).default(20),
});
exports.myHistoricalListQuerySchema = zod_1.z.object({
    from: zod_1.z.string().datetime().optional(),
    to: zod_1.z.string().datetime().optional(),
    page: zod_1.z.coerce.number().int().positive().default(1),
    limit: zod_1.z.coerce.number().int().positive().max(100).default(15),
});
//# sourceMappingURL=tracking.schemas.js.map