"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Client = void 0;
const properties_1 = require("../properties");
class Client {
    constructor(request) {
        this.request = request;
    }
    async getEventDefinition(eventName) {
        return await this.request(`${properties_1.HUBSPOT_BASE_URL}/events/v3/event-definitions/${eventName}/?includeProperties=true`, {
            method: 'GET',
            skipResponseCloning: true,
            throwHttpErrors: false
        });
    }
    async send(json) {
        return this.request(`${properties_1.HUBSPOT_BASE_URL}/events/v3/send`, {
            method: 'POST',
            json
        });
    }
    async createEventDefinition(json) {
        return await this.request(`${properties_1.HUBSPOT_BASE_URL}/events/v3/event-definitions`, {
            method: 'POST',
            json,
            skipResponseCloning: true,
            throwHttpErrors: false
        });
    }
    async createPropertyDefinition(json, eventName) {
        return this.request(`${properties_1.HUBSPOT_BASE_URL}/events/v3/event-definitions/${eventName}/property`, {
            method: 'POST',
            json,
            throwHttpErrors: false
        });
    }
}
exports.Client = Client;
//# sourceMappingURL=client.js.map