"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const upsertContact_1 = __importDefault(require("./upsertContact"));
const trackEvent_1 = __importDefault(require("./trackEvent"));
const trackPageView_1 = __importDefault(require("./trackPageView"));
const destination = {
    name: 'Yonoma',
    slug: 'actions-yonoma',
    mode: 'cloud',
    authentication: {
        scheme: 'custom',
        fields: {
            apiKey: {
                label: 'API Key',
                description: 'Your Yonoma API key.',
                type: 'password',
                required: true
            }
        },
        testAuthentication: (request) => {
            return request('https://api.yonoma.io/integration/authenticate', {
                method: 'GET'
            });
        }
    },
    extendRequest: ({ settings }) => {
        return {
            headers: {
                'User-Agent': 'Segment',
                'Content-Type': 'application/json',
                Authorization: `Bearer ${settings.apiKey}`
            }
        };
    },
    actions: {
        upsertContact: upsertContact_1.default,
        trackEvent: trackEvent_1.default,
        trackPageView: trackPageView_1.default
    }
};
exports.default = destination;
//# sourceMappingURL=index.js.map