"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.coverageWithIdSchema = exports.coverageSchema = void 0;
const extensions_core_1 = require("@awell-health/extensions-core");
const zod_1 = require("zod");
const reference_zod_1 = require("./reference.zod");
exports.coverageSchema = zod_1.z.object({
    resourceType: zod_1.z.literal('Coverage'),
    order: zod_1.z.number(),
    status: zod_1.z.string(),
    type: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).optional(),
    subscriber: zod_1.z.object({
        reference: (0, reference_zod_1.createReferenceSchema)('Patient'),
    }),
    subscriberId: zod_1.z.string().optional(),
    beneficiary: zod_1.z.object({
        reference: (0, reference_zod_1.createReferenceSchema)('Patient'),
    }),
    relationship: zod_1.z.record(zod_1.z.string(), zod_1.z.any()),
    period: zod_1.z.object({
        start: extensions_core_1.DateOnlySchema,
        end: extensions_core_1.DateOnlySchema.optional(),
    }),
    payor: zod_1.z.array(zod_1.z.record(zod_1.z.string(), zod_1.z.any())),
    class: zod_1.z.array(zod_1.z.record(zod_1.z.string(), zod_1.z.any())).optional(),
});
exports.coverageWithIdSchema = exports.coverageSchema.extend({
    id: zod_1.z.string(),
});
//# sourceMappingURL=coverage.zod.js.map