"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("../utils");
const customerio_properties_1 = require("../customerio-properties");
const action = {
    title: 'Suppress Person',
    description: `Suppress a person in Customer.io. This will prevent the person from receiving any messages.`,
    defaultSubscription: 'event = "User Suppressed"',
    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: 'suppress',
            payload,
            settings,
            type: 'person'
        })));
    },
    perform: (request, { payload, settings }) => {
        return (0, utils_1.sendSingle)(request, {
            action: 'suppress',
            payload,
            settings,
            type: 'person'
        });
    }
};
exports.default = action;
//# sourceMappingURL=index.js.map