import type { PathSpec } from '../../types.ts'; export declare class LangfuseApiError extends Error { readonly errors: readonly unknown[]; readonly status: number | null; constructor(message: string, errors?: readonly unknown[], status?: number | null); } /** * Await a Langfuse fetch, translating a 404 into ENOENT. * * Every other status stays a LangfuseApiError: only "this resource does not * exist" is a filesystem-level missing file. */ export declare function fetchOrEnoent(pending: Promise, path: PathSpec): Promise; export interface LangfuseTransport { request(path: string, query?: Record): Promise; } export interface HttpLangfuseTransportOptions { publicKey: string; secretKey: string; host?: string; } export declare class HttpLangfuseTransport implements LangfuseTransport { protected readonly fetch: typeof fetch; private readonly host; private readonly auth; constructor(opts: HttpLangfuseTransportOptions); request(path: string, query?: Record): Promise; } export interface FetchTracesOptions { limit?: number; name?: string | null; userId?: string | null; sessionId?: string | null; orderBy?: string | null; fromTimestamp?: string | null; toTimestamp?: string | null; } export declare function fetchTraces(transport: LangfuseTransport, opts?: FetchTracesOptions): Promise[]>; export declare function fetchTrace(transport: LangfuseTransport, traceId: string): Promise>; export declare function fetchSessions(transport: LangfuseTransport, opts?: { limit?: number; }): Promise[]>; export declare function fetchPrompts(transport: LangfuseTransport): Promise[]>; export declare function fetchPrompt(transport: LangfuseTransport, name: string, version?: number | null): Promise>; export declare function fetchDatasets(transport: LangfuseTransport): Promise[]>; export declare function fetchDatasetItems(transport: LangfuseTransport, datasetName: string, opts?: { limit?: number; }): Promise[]>; export declare function fetchDatasetRuns(transport: LangfuseTransport, datasetName: string, opts?: { limit?: number; }): Promise[]>; //# sourceMappingURL=client.d.ts.map