"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const actions_core_1 = require("@segment/actions-core");
const sync_1 = __importDefault(require("./sync"));
const destination = {
    name: 'Youappi Audiences',
    slug: 'actions-youappi-audience',
    mode: 'cloud',
    description: 'Sync Segment Engage Audiences to Youappi',
    authentication: {
        scheme: 'custom',
        fields: {
            api_key: {
                type: 'password',
                label: 'API Key',
                description: 'Your Youappi API key.',
                required: true
            }
        }
    },
    extendRequest() {
        return {
            headers: {
                'Content-Type': 'application/json'
            }
        };
    },
    actions: {
        sync: sync_1.default
    },
    presets: [
        {
            name: 'Sync Engage Audience',
            subscribe: 'type = "identify" or type = "track"',
            partnerAction: 'sync',
            mapping: (0, actions_core_1.defaultValues)(sync_1.default.fields),
            type: 'automatic'
        }
    ]
};
exports.default = destination;
//# sourceMappingURL=index.js.map