"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const fields_1 = require("../fields");
const functions_1 = require("../functions");
const action = {
    title: 'Sync Events',
    description: 'Sync Segment events to SFTP. Includes predefined mappings for common Segment event fields. Additional column mappings may be added.',
    defaultSubscription: 'type = "identify" or type = "track" or type = "page" or type = "screen" or type = "group"',
    fields: fields_1.commonFields,
    perform: async (_, data) => {
        const { payload, settings, signal, logger } = data;
        const rawMapping = data.rawMapping;
        return (0, functions_1.send)([payload], settings, rawMapping, logger, signal);
    },
    performBatch: async (_, data) => {
        const { payload, settings, signal, logger } = data;
        const rawMapping = data.rawMapping;
        return (0, functions_1.send)(payload, settings, rawMapping, logger, signal);
    }
};
exports.default = action;
//# sourceMappingURL=index.js.map