"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.crudSchema = exports.objectIdSchema = void 0;
const zod_1 = require("zod");
const types_1 = require("../types");
exports.objectIdSchema = zod_1.z.string();
const crudSchema = (baseSchema) => {
    const create = baseSchema;
    const get = types_1.paginatedRequestSchema.extend({
        _id: exports.objectIdSchema.optional(),
    });
    const update = baseSchema.extend({
        _id: exports.objectIdSchema,
    });
    const deleteSchema = zod_1.z.object({
        _id: exports.objectIdSchema,
    });
    return {
        create,
        get,
        update,
        delete: deleteSchema,
    };
};
exports.crudSchema = crudSchema;
//# sourceMappingURL=crud-schema.js.map