"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: 'Create Contact',
    description: 'Create contacts in Salesforce Marketing Cloud.',
    defaultSubscription: 'type = "identify"',
    fields: {
        contactKey: { ...sfmc_properties_1.contactKey, required: true }
    },
    perform: (request, { settings, payload }) => {
        return request(`https://${settings.subdomain}.rest.marketingcloudapis.com/contacts/${versioning_info_1.SALESFORCE_MARKETING_CLOUD_DATA_API_VERSION}/contacts`, {
            method: 'POST',
            json: {
                contactKey: payload.contactKey,
                attributeSets: []
            }
        });
    }
};
exports.default = action;
//# sourceMappingURL=index.js.map