UNPKG

buildx-connect

Version:

Official JavaScript/TypeScript SDK for Buildx low-code platform

37 lines (36 loc) 938 B
import { ApiKey, ErrorResponse, BuildxConfig } from "../types/index"; /** * API Keys service for Buildx * Handles API key management * * @example * ```typescript * const apiKeys = buildx.apiKeys(); * * // List API keys * const keys = await apiKeys.list(); * * // Get API key by ID * const key = await apiKeys.get('key-id'); * * // Get API key secret * const secret = await apiKeys.getSecret('key-id'); * ``` */ export declare class ApiKeys { private baseService; constructor(config: BuildxConfig); updateConfig(config: BuildxConfig): void; /** * List all API keys */ list(organizationId?: string): Promise<ApiKey[] | ErrorResponse>; /** * Get API key by ID */ get(apiKeyId: string, organizationId?: string): Promise<ApiKey | ErrorResponse>; /** * Get API key secret */ getSecret(apiKeyId: string, organizationId?: string): Promise<any | ErrorResponse>; }