UNPKG

watchtower-node-sdk

Version:

A TypeScript Node.js SDK for the Watchtower API, providing API key management, connection string generation, and more

27 lines 934 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.BaseEndpoint = void 0; class BaseEndpoint { constructor(client, basePath) { this.client = client; this.basePath = basePath; } async get(path, config) { const response = await this.client.get(`${this.basePath}${path}`, config); return response.data; } async post(path, data, config) { const response = await this.client.post(`${this.basePath}${path}`, data, config); return response.data; } async put(path, data, config) { const response = await this.client.put(`${this.basePath}${path}`, data, config); return response.data; } async delete(path, config) { const response = await this.client.delete(`${this.basePath}${path}`, config); return response.data; } } exports.BaseEndpoint = BaseEndpoint; //# sourceMappingURL=base.js.map