"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const action = {
    title: 'Send',
    description: 'Send any Segment event to Zapier',
    fields: {
        data: {
            label: 'Payload',
            description: 'The payload to send to Zapier',
            type: 'object',
            required: true,
            default: { '@path': '$.' }
        },
        zapSubscriptionUrl: {
            label: 'Zapier Webhook URL',
            description: 'The Zapier webhook URL Segment will send data to. This URL is generated by Zapier when you create a Zap.',
            type: 'string',
            format: 'password',
            readOnly: false,
            required: true
        },
        zapIdentifier: {
            label: 'Zapier Zap Identifier',
            description: 'The Zapier Zap identifier. This is generated by Zapier when you create a Zap.',
            type: 'string',
            readOnly: false,
            required: false
        },
        fql: {
            label: 'Segment FQL Query',
            description: 'The initial Segment FQL query for the Action mapping. This is generated by Zapier when you create a Zap.',
            type: 'string',
            readOnly: false,
            required: false
        }
    },
    perform: (request, { payload }) => {
        const { zapSubscriptionUrl, data } = payload;
        return request(zapSubscriptionUrl, {
            method: 'post',
            json: data
        });
    }
};
exports.default = action;
//# sourceMappingURL=index.js.map