export class ResponsePromise { constructor(url: URL | string, request: { method: string; headers: Record; data?: any; timeout?: number; retries?: number; retryDelay?: number; retryTimeout?: boolean; fetchFn?: FetchFunction; }, cacheMap?: Map>); url: string | URL; request: { method: string; headers: Record; data?: any; timeout?: number; retries?: number; retryDelay?: number; retryTimeout?: boolean; fetchFn?: FetchFunction; }; decoder: TextDecoder; fetchPromise: Promise; streamPromise: Promise; cacheMap: Map>; getRequest(params?: { method?: string; headers?: Record; data?: any; timeout?: number; retries?: number; retryDelay?: number; retryTimeout?: boolean; fetchFn?: FetchFunction; abortSignal?: AbortSignal; }): Promise; getFetchPromise(): Promise; getStreamPromise(params?: { abortSignal?: AbortSignal; }): Promise; then(onSuccess?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onFail?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): Promise; catch(fn?: ((reason: any) => TResult | PromiseLike) | undefined | null): Promise; finally(fn?: (() => void) | undefined | null): Promise; stream(params?: { abortSignal?: AbortSignal; }): AsyncGenerator; cache(key?: string): Promise; get [Symbol.toStringTag](): string; } export class ChatBotKitClient { constructor(options: ChatBotKitClientOptions); extend(extensionOptions: Partial): this; clientFetch(path: string, options?: { method?: string; headers?: Record; query?: Record; record?: Record; buffer?: ArrayBuffer; file?: { name?: string; type?: string; data: string | ArrayBuffer; }; external?: boolean; endpoint?: string; timeout?: number; retries?: number; retryDelay?: number; retryTimeout?: boolean; fetchFn?: FetchFunction; }): ResponsePromise; #private; } export type FetchFunction = import("@chatbotkit/fetch").FetchFn; export type ChatBotKitClientOptions = { secret: string; baseUrl?: string | URL; host?: string; protocol?: "http:" | "https:"; endpoints?: Record; runAsUserId?: string; runAsChildUserEmail?: string; timezone?: string; headers?: Record; timeout?: number; retries?: number; retryDelay?: number; retryTimeout?: boolean; fetchFn?: FetchFunction; };