"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const insider_properties_1 = require("../insider-properties");
const insider_helpers_1 = require("../insider-helpers");
const action = {
    title: 'User Registered Event',
    description: 'Record User Registered Event to Insider',
    defaultSubscription: 'type = "track" and event = "User Registered"',
    fields: {
        email_as_identifier: { ...insider_properties_1.email_as_identifier },
        phone_number_as_identifier: { ...insider_properties_1.phone_number_as_identifier },
        append_arrays: { ...insider_properties_1.append_arrays },
        uuid: { ...insider_properties_1.uuid },
        segment_anonymous_id: { ...insider_properties_1.segment_anonymous_id },
        custom_identifiers: { ...insider_properties_1.custom_identifiers },
        timestamp: { ...insider_properties_1.timestamp },
        attributes: { ...insider_properties_1.user_attributes }
    },
    perform: (request, data) => {
        return request(`${insider_helpers_1.API_BASE}${insider_helpers_1.UPSERT_ENDPOINT}`, {
            method: 'post',
            json: (0, insider_helpers_1.sendTrackEvent)(data.payload, 'sign_up_confirmation')
        });
    },
    performBatch: (request, data) => {
        return request(`${insider_helpers_1.API_BASE}${insider_helpers_1.UPSERT_ENDPOINT}`, {
            method: 'post',
            json: (0, insider_helpers_1.sendBulkTrackEvents)(data.payload, 'sign_up_confirmation')
        });
    }
};
exports.default = action;
//# sourceMappingURL=index.js.map