UNPKG

watchtower-node-sdk

Version:

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

29 lines 1.12 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ConnectionStringEndpoint = void 0; const base_1 = require("../base"); class ConnectionStringEndpoint extends base_1.BaseEndpoint { constructor(client) { super(client, '/api/connectionstring'); } /** * Creates an encrypted connection string from API keys * @param params - The request parameters for generating the connection string * @returns Promise with the generated connection string and expiration details */ async generateConnectionString(params) { return this.post('', params); } /** * Decrypts and parses a connection string to extract API keys * @param connectionString - The encrypted connection string to parse * @returns Promise with the parsed connection string details */ async parseConnectionString(connectionString) { return this.get('/parse', { params: { connection_string: connectionString }, }); } } exports.ConnectionStringEndpoint = ConnectionStringEndpoint; //# sourceMappingURL=handler.js.map