"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const trackEvent_1 = __importDefault(require("./trackEvent"));
const actions_core_1 = require("@segment/actions-core");
const identifyUser_1 = __importDefault(require("./identifyUser"));
const presets = [
    {
        name: 'Track Calls',
        subscribe: 'type = "track" or type = "page" or type = "screen"',
        partnerAction: 'trackEvent',
        mapping: (0, actions_core_1.defaultValues)(trackEvent_1.default.fields),
        type: 'automatic'
    },
    {
        name: 'Identify Calls',
        subscribe: 'type = "identify"',
        partnerAction: 'identifyUser',
        mapping: (0, actions_core_1.defaultValues)(identifyUser_1.default.fields),
        type: 'automatic'
    }
];
const destination = {
    name: 'Heap Cloud (Actions)',
    slug: 'actions-heap-cloud',
    mode: 'cloud',
    authentication: {
        scheme: 'custom',
        fields: {
            appId: {
                label: 'App ID',
                description: 'The app_id corresponding to one of your projects.',
                type: 'string',
                required: true
            }
        }
    },
    presets,
    actions: {
        trackEvent: trackEvent_1.default,
        identifyUser: identifyUser_1.default
    }
};
exports.default = destination;
//# sourceMappingURL=index.js.map