"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TopsortAPIClient = void 0;
class TopsortAPIClient {
    constructor(request, settings) {
        this.apiKey = settings.api_key;
        this.request = request;
        this.url = this.getEndpoint();
    }
    getEndpoint() {
        return `https://api.topsort.com/v2/events`;
    }
    async sendEvent(body) {
        const headers = {
            Authorization: `Bearer ${this.apiKey}`,
            'Content-Type': 'application/json'
        };
        return await this.request(this.url, {
            method: 'POST',
            headers,
            json: body
        });
    }
}
exports.TopsortAPIClient = TopsortAPIClient;
//# sourceMappingURL=client.js.map