"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 sendEntireEvent_1 = __importDefault(require("./sendEntireEvent"));
const destination = {
    name: 'Movable Ink',
    slug: 'actions-movable-ink',
    mode: 'cloud',
    description: 'Send Segment analytics events to Movable Ink',
    authentication: {
        scheme: 'basic',
        fields: {
            username: {
                label: 'Username',
                description: 'Your Movable Ink username',
                type: 'string',
                required: true
            },
            password: {
                label: 'Access Secret',
                description: 'Your Movable Ink Access Secret.',
                type: 'password',
                required: true
            },
            movable_ink_url: {
                label: 'Movable Ink URL',
                description: 'The Movable Ink URL to send data to.',
                type: 'string',
                required: true
            }
        }
    },
    extendRequest({ settings }) {
        return {
            username: settings.username,
            password: settings.password
        };
    },
    presets: [
        {
            name: 'Send Entire Event',
            partnerAction: 'sendEntireEvent',
            subscribe: 'type = "identify" or type = "track" or type = "page" or type = "screen" or type = "group"',
            mapping: (0, actions_core_1.defaultValues)(sendEntireEvent_1.default.fields),
            type: 'automatic'
        }
    ],
    actions: {
        sendEntireEvent: sendEntireEvent_1.default
    }
};
exports.default = destination;
//# sourceMappingURL=index.js.map