"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const subscribeUserToCampaign_1 = __importDefault(require("./subscribeUserToCampaign"));
const destination = {
    name: 'Ambee (Actions)',
    slug: 'actions-ambee',
    mode: 'cloud',
    authentication: {
        scheme: 'custom',
        fields: {
            companyName: {
                label: 'Company Name',
                description: 'Enter your company’s name',
                type: 'string',
                required: true
            },
            apiKey: {
                label: 'API Key',
                description: 'The API Key is available via Ambee’s API Dashboard: https://api-dashboard.getambee.com. Paste the API key generated on the homepage. For bulk use, subscribe to enterprise plan on the dashboard',
                type: 'password',
                required: true
            },
            email: {
                label: 'Email',
                description: 'Enter the email address you used to sign up for Ambee’s API Key.',
                type: 'string',
                required: true
            },
            segmentRegion: {
                label: 'Segment Region For Notifications',
                description: 'Your Segment Workspace is hosted in either the US or EU Region. Select which Segment Region Ambee should send notifications to. The default is US',
                type: 'string',
                choices: [
                    { label: 'US', value: 'US' },
                    { label: 'EU', value: 'EU' }
                ],
                default: 'US',
                required: false
            },
            segmentWriteKey: {
                label: 'Segment WriteKey For Notifications',
                description: 'This is your Segment Source WriteKey. Use this WriteKey to send data from Ambee to your destination',
                type: 'string',
                required: true
            }
        },
        testAuthentication: (request, { settings }) => {
            return request('https://segment-api.ambeedata.com/v1/company-info', {
                method: 'post',
                json: settings
            });
        }
    },
    actions: {
        subscribeUserToCampaign: subscribeUserToCampaign_1.default
    }
};
exports.default = destination;
//# sourceMappingURL=index.js.map