"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const sfmc_properties_1 = require("../sfmc-properties");
const action = {
    title: 'Send API Event',
    description: 'Send events into an existing Event Definition in Salesforce Marketing Cloud.',
    fields: {
        eventDefinitionKey: sfmc_properties_1.eventDefinitionKey,
        contactKey: sfmc_properties_1.contactKeyAPIEvent,
        data: sfmc_properties_1.eventData
    },
    perform: (request, { settings, payload }) => {
        return request(`https://${settings.subdomain}.rest.marketingcloudapis.com/interaction/v1/events`, {
            method: 'POST',
            json: payload
        });
    }
};
exports.default = action;
//# sourceMappingURL=index.js.map