import { Logger } from "@databricks/sdk-core/logger"; import { HttpClient, HttpRequest } from "@databricks/sdk-core/http"; import { z } from "zod"; import { CallOptions } from "@databricks/sdk-options/call"; import { LroOptions } from "@databricks/sdk-options/lro"; //#region src/v2/utils.d.ts interface HttpCallOptions { readonly request: HttpRequest; readonly httpClient: HttpClient; readonly logger: Logger; } /** * Translates public CallOptions to the internal Options shape accepted by * execute(). Even though the shapes match today, this isolates the public * API from the executor's internal type so they can diverge. */ declare function executeCall(call: (signal?: AbortSignal) => Promise, options?: CallOptions): Promise; /** * Sentinel thrown by a polling call to signal that the operation has not * yet reached a terminal state. {@link executeWait} treats this error as * retriable; any other error aborts the wait. */ declare class StillRunningError extends Error {} /** * Polls until the call returns without throwing {@link StillRunningError}. * Abort and overall-deadline behavior come from the supplied LroOptions. */ declare function executeWait(call: (signal?: AbortSignal) => Promise, options?: LroOptions): Promise; declare function executeHttpCall(opts: HttpCallOptions): Promise; declare function buildHttpRequest(method: string, url: string, headers: Headers, signal?: AbortSignal, body?: string | ReadableStream): HttpRequest; declare function parseResponse(body: Uint8Array, schema: z.ZodType): T; declare function marshalRequest(data: unknown, schema: z.ZodType): string; declare function flattenQueryParams(prefix: string, value: unknown, params: URLSearchParams): void; //#endregion export { HttpCallOptions, StillRunningError, buildHttpRequest, executeCall, executeHttpCall, executeWait, flattenQueryParams, marshalRequest, parseResponse }; //# sourceMappingURL=utils.d.ts.map