"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const fields_1 = require("./fields");
const dynamic_fields_1 = require("./dynamic-fields");
const utils_1 = require("./utils");
const action = {
    title: 'Send message',
    description: "Send messages with Twilio's REST API.",
    fields: fields_1.fields,
    dynamicFields: {
        channel: async (_, { features }) => {
            return await (0, dynamic_fields_1.dynamicChannel)(features);
        },
        senderType: async (_, { payload }) => {
            return await (0, dynamic_fields_1.dynamicSenderType)(payload);
        },
        fromPhoneNumber: async (request, { payload, settings }) => {
            return await (0, dynamic_fields_1.dynamicFromPhoneNumber)(request, payload, settings);
        },
        messagingServiceSid: async (request, { settings }) => {
            return await (0, dynamic_fields_1.dynamicMessagingServiceSid)(request, settings);
        },
        contentTemplateType: async (_, { payload }) => {
            return await (0, dynamic_fields_1.dynamicContentTemplateType)(payload);
        },
        contentSid: async (request, { payload }) => {
            return await (0, dynamic_fields_1.dynamicContentSid)(request, payload);
        },
        contentVariables: {
            __keys__: async (request, { payload }) => {
                return await (0, dynamic_fields_1.dynamicContentVariables)(request, payload);
            }
        }
    },
    perform: async (request, { payload, settings }) => {
        return await (0, utils_1.send)(request, payload, settings);
    }
};
exports.default = action;
//# sourceMappingURL=index.js.map