"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.perform = perform;
exports.performBatch = performBatch;
const api_1 = require("./api");
function perform(eventType) {
    return (request, data) => {
        return request((0, api_1.submitEventUrl)(data.settings.environment, eventType), {
            method: 'post',
            json: data.payload,
            headers: { Authorization: `Bearer ${data.settings.apiKey}` }
        });
    };
}
function performBatch(eventType) {
    return (request, data) => {
        return request((0, api_1.submitEventBatchUrl)(data.settings.environment, eventType), {
            method: 'post',
            json: data.payload,
            headers: { Authorization: `Bearer ${data.settings.apiKey}` }
        });
    };
}
//# sourceMappingURL=common.js.map