"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const pushEvent_1 = __importDefault(require("./pushEvent"));
const identify_1 = __importDefault(require("./identify"));
const config_1 = require("./config");
const destination = {
    name: 'Mantle (Actions)',
    description: 'Track important revenue metrics for your Shopify apps. Manage plans and pricing. Improve customer relationships. Focus on growing your business.',
    slug: 'actions-mantle',
    mode: 'cloud',
    authentication: {
        scheme: 'custom',
        fields: {
            appId: {
                label: 'App ID',
                description: 'The unique identifier for the app in Mantle. Get this from the API Keys section for your app in Mantle.',
                type: 'string',
                required: true
            },
            apiKey: {
                label: 'API Key',
                description: 'The API key for the app in Mantle. Get this from the API Keys section for your app in Mantle.',
                type: 'password',
                required: true
            }
        },
        testAuthentication: (request) => {
            return request(`${config_1.API_URL}/app`, {
                method: 'GET'
            });
        }
    },
    extendRequest: ({ settings }) => {
        return {
            headers: {
                'x-mantle-app-id': settings.appId,
                'x-mantle-app-api-key': settings.apiKey
            }
        };
    },
    actions: {
        pushEvent: pushEvent_1.default,
        identify: identify_1.default
    }
};
exports.default = destination;
//# sourceMappingURL=index.js.map