"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("../utils");
const customerio_properties_1 = require("../customerio-properties");
const action = {
    title: 'Unsuppress Person',
    description: `Unsuppress a person in Customer.io. This will allow the person to receive messages again.`,
    defaultSubscription: 'event = "User Unsuppressed"',
    fields: {
        person_id: {
            label: 'Person ID',
            description: 'The ID of the person that this mobile device belongs to.',
            type: 'string',
            required: true,
            default: {
                '@path': '$.userId'
            }
        },
        ...customerio_properties_1.eventProperties
    },
    performBatch: (request, { payload: payloads, settings }) => {
        return (0, utils_1.sendBatch)(request, payloads.map((payload) => ({
            action: 'unsuppress',
            payload,
            settings,
            type: 'person'
        })));
    },
    perform: (request, { payload, settings }) => {
        return (0, utils_1.sendSingle)(request, {
            action: 'unsuppress',
            payload,
            settings,
            type: 'person'
        });
    }
};
exports.default = action;
//# sourceMappingURL=index.js.map