"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.PharmacySchema = void 0;
const zod_1 = require("zod");
const elationMobilePhoneToE164_1 = require("../utils/elationMobilePhoneToE164");
const lodash_1 = require("lodash");
const toTitleCase = (str) => str.trim().split(' ').map(lodash_1.capitalize).join(' ');
exports.PharmacySchema = zod_1.z.object({
    ncpdpid: zod_1.z.string().max(21),
    store_name: zod_1.z.string().max(105).transform(toTitleCase),
    address_line1: zod_1.z.string().max(105).transform(toTitleCase),
    address_line2: zod_1.z.string().max(105).transform(toTitleCase),
    city: zod_1.z.string().max(105).transform(toTitleCase),
    state: zod_1.z.string().max(2).transform(lodash_1.upperCase),
    zip: zod_1.z.string().max(10).transform(toTitleCase),
    phone_primary: zod_1.z.string().transform(elationMobilePhoneToE164_1.elationMobilePhoneToE164),
    fax: zod_1.z.string().max(10),
    npi: zod_1.z.string().max(10),
    active_start_time: zod_1.z.coerce.date(),
    active_end_time: zod_1.z.coerce.date(),
    specialty_types: zod_1.z.string().max(300),
});
//# sourceMappingURL=pharmacy.js.map