UNPKG

helix-ts

Version:

TypeScript Library for working with HelixDB

25 lines 928 B
export interface HelixDBClient { url: string; apiKey: string | null; /** * Query the HelixDB API * @param endpoint - The endpoint to query * @param data - The data to send to the endpoint * @returns The response from the endpoint */ query: (endpoint: string, data: HelixDBInput) => Promise<HelixDBResponse>; } export type HelixDBResponse = Record<string, any>; export type HelixDBInput = Record<string, any>; export declare class HelixDB implements HelixDBClient { url: string; apiKey: string | null; /** * Create a new HelixDB client * @param url - The url of the HelixDB server (default: `http://localhost:6969`) * @param apiKey - The api key of the HelixDB server (default: `null`) */ constructor(url?: string, apiKey?: string | null); query(endpoint: string, data: HelixDBInput): Promise<HelixDBResponse>; } //# sourceMappingURL=index.d.ts.map