"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.checkEligibility = void 0;
const extensions_core_1 = require("@awell-health/extensions-core");
const extensions_core_2 = require("@awell-health/extensions-core");
const settings_1 = require("../../settings");
const config_1 = require("./config");
const zod_1 = require("zod");
exports.checkEligibility = {
    key: 'checkEligibility',
    category: extensions_core_2.Category.BILLING,
    title: 'Check eligibility',
    description: 'This is a dummy action that checks eligibility for a given request.',
    fields: config_1.fields,
    previewable: false,
    dataPoints: config_1.dataPoints,
    onEvent: async ({ payload, onComplete }) => {
        const { fields } = (0, extensions_core_1.validate)({
            schema: zod_1.z.object({
                fields: config_1.FieldsValidationSchema,
                settings: settings_1.SettingsValidationSchema,
            }),
            payload,
        });
        await onComplete({
            data_points: {
                data: fields.data,
            },
        });
    },
};
//# sourceMappingURL=checkEligibility.js.map