"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const sfmc_properties_1 = require("../sfmc-properties");
const versioning_info_1 = require("../versioning-info");
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/${versioning_info_1.SALESFORCE_MARKETING_CLOUD_DATA_API_VERSION}/events`, {
            method: 'POST',
            json: payload
        });
    }
};
exports.default = action;
//# sourceMappingURL=index.js.map