"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const utils_1 = require("../utils");
const schema_1 = require("../schema");
const action = {
    title: 'Code',
    description: 'Track when a user enters a discount code at checkout.',
    defaultSubscription: 'type = "track" and event = "Coupon Entered"',
    fields: {
        code: {
            label: 'Code',
            description: 'The coupon or discount code applied',
            type: 'string',
            default: { '@path': '$.properties.coupon_id' },
            required: true
        },
        type: {
            label: 'Type',
            description: 'The type of coupon or discount code used',
            type: 'string',
            default: 'promo',
            required: true
        },
        ...schema_1.clientFields
    },
    perform: (0, utils_1.buildPerformer)('code')
};
exports.default = action;
//# sourceMappingURL=index.js.map