UNPKG

eve

Version:

Filesystem-first framework for durable backend AI agents that run anywhere.

39 lines (38 loc) 1.13 kB
import { RequestOptions } from "./with-retry.js"; import { Options } from "../_async-retry.js"; import "#compiled/zod/index.js"; //#region src/api-client/base-client.d.ts interface RequestParams extends RequestInit { headers?: Record<string, string>; method?: string; onRetry?(error: any, options: RequestOptions): void; query?: Record<string, number | string | null | undefined | string[]>; retry?: Partial<Options>; } /** * A base API client that provides a convenience wrapper for fetching where * we can pass query parameters as an object, support retries, debugging * and automatic authorization. */ declare class BaseClient { protected token?: string; private fetch; private debug; private baseUrl; private agent; constructor(params: { debug?: boolean; baseUrl: string; token?: string; fetch?: typeof globalThis.fetch; }); protected request(path: string, opts?: RequestParams): Promise<Response>; } interface Parsed<Data> { response: Response; text: string; json: Data; } //#endregion export { BaseClient, Parsed, RequestParams }; //# sourceMappingURL=base-client.d.ts.map