"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const exposure_1 = require("../exposure");
const timestamp_1 = require("../timestamp");
const fields = { ...exposure_1.defaultExposureFields };
const action = {
    title: 'Track Exposure',
    description: 'Send an experiment exposure event to ABsmartly',
    fields: fields,
    defaultSubscription: 'type = "track" and event = "Experiment Viewed"',
    perform: (request, data) => {
        const requestData = data;
        const timestamp = (0, timestamp_1.unixTimestampOf)(requestData.rawData.timestamp);
        const payload = requestData.payload;
        const settings = requestData.settings;
        return (0, exposure_1.sendExposure)(request, timestamp, payload, settings);
    }
};
exports.default = action;
//# sourceMappingURL=index.js.map