UNPKG

watchtower-node-sdk

Version:

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

17 lines (15 loc) 519 B
import { BaseEndpoint } from '../base'; import { RollAPIKeyRequest, RolledAPIKey } from './types'; export class APIKeyEndpoint extends BaseEndpoint { constructor(client: any) { super(client, '/api/apikey'); } /** * Roll an API key (organization, app, or tenant) * @param data - The roll API key request * @returns Promise with the new rolled API key */ async rollAPIKey(data: RollAPIKeyRequest): Promise<RolledAPIKey> { return this.post<RolledAPIKey>('/roll', data); } }