"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const sendMessage_1 = __importDefault(require("./sendMessage"));
const destination = {
    name: 'Twilio Messaging',
    slug: 'actions-twilio-messaging',
    mode: 'cloud',
    description: 'Send SMS, MMS, Whatsapp and Messenger messages with Twilio',
    authentication: {
        scheme: 'basic',
        fields: {
            accountSID: {
                label: 'Twilio Account SID',
                description: 'Twilio Account SID',
                type: 'string',
                required: true
            },
            apiKeySID: {
                label: 'Twilio API Key SID',
                description: 'Twilio API Key SID',
                type: 'string',
                required: true
            },
            apiKeySecret: {
                label: 'Twilio API Key Secret',
                description: 'Twilio API Key Secret',
                type: 'password',
                required: true
            }
        },
        testAuthentication: (request) => {
            return request(`https://api.twilio.com/2010-04-01`);
        }
    },
    extendRequest: ({ settings }) => {
        return {
            'Content-Type': 'application/x-www-form-urlencoded',
            username: settings.apiKeySID,
            password: settings.apiKeySecret
        };
    },
    actions: {
        sendMessage: sendMessage_1.default
    }
};
exports.default = destination;
//# sourceMappingURL=index.js.map