"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.FieldsValidationSchema = exports.fields = void 0;
const extensions_core_1 = require("@awell-health/extensions-core");
const emailValidation_1 = require("../../../../../src/utils/emailValidation");
const zod_1 = require("zod");
exports.fields = {
    first_name: {
        id: 'first_name',
        label: 'First name',
        description: 'The first name of the patient.',
        type: extensions_core_1.FieldType.STRING,
        required: true,
    },
    last_name: {
        id: 'last_name',
        label: 'Last name',
        description: 'The last name of the patient.',
        type: extensions_core_1.FieldType.STRING,
        required: true,
    },
    legal_name: {
        id: 'legal_name',
        label: 'Legal name',
        description: "The patient's legal name which will be used in CMS 1500 Claims, Invoices, and Superbills.",
        type: extensions_core_1.FieldType.STRING,
    },
    dob: {
        id: 'dob',
        label: 'Date of birth',
        description: 'Date of birth of the patient',
        type: extensions_core_1.FieldType.DATE,
        required: false,
    },
    email: {
        id: 'email',
        label: 'Email',
        description: 'The email address of the patient. If email is NOT provided, we will still create the patient in Healthie but without the email.',
        type: extensions_core_1.FieldType.STRING,
        required: false,
    },
    phone_number: {
        id: 'phone_number',
        label: 'Phone number',
        description: 'The phone number of the patient.',
        type: extensions_core_1.FieldType.STRING,
        stringType: extensions_core_1.StringType.PHONE,
    },
    send_invite: {
        id: 'send_invite',
        label: 'Send invite email',
        description: 'Whether an invite email should be sent to the newly created patient.',
        type: extensions_core_1.FieldType.BOOLEAN,
    },
    provider_id: {
        id: 'provider_id',
        label: 'Provider ID',
        description: 'This is the ID of the provider and defaults to the user the API key is associated with. Also known as the `dietitian_id`.',
        type: extensions_core_1.FieldType.STRING,
    },
};
exports.FieldsValidationSchema = zod_1.z.object({
    first_name: zod_1.z.string().min(1),
    last_name: zod_1.z.string().min(1),
    legal_name: zod_1.z.string().optional(),
    email: emailValidation_1.optionalEmailSchema,
    dob: zod_1.z.string().optional(),
    phone_number: zod_1.z.string().optional(),
    send_invite: zod_1.z.boolean().optional(),
    provider_id: zod_1.z.string().optional(),
});
//# sourceMappingURL=fields.js.map