"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const track_1 = __importDefault(require("./track"));
const identifyUser_1 = __importDefault(require("./identifyUser"));
const utils_1 = require("./utils");
const destination = {
    name: 'Dawn AI',
    slug: 'actions-dawn',
    mode: 'cloud',
    authentication: {
        scheme: 'custom',
        fields: {
            writeKey: {
                label: 'Dawn Write Key',
                description: 'Get your key at app.dawnai.com',
                type: 'password',
                required: true
            }
        },
        testAuthentication: (request, { settings }) => {
            return request(`${utils_1.DAWN_API_ENDPOINT}/auth`, {
                method: 'post',
                headers: {
                    'Content-Type': 'application/json',
                    Authorization: `Bearer ${settings.writeKey}`
                },
                body: null
            });
        }
    },
    actions: {
        track: track_1.default,
        identifyUser: identifyUser_1.default
    }
};
exports.default = destination;
//# sourceMappingURL=index.js.map