//#region ../infra/src/http/types.d.ts type RequestConfig = { method?: string; url: string; headers?: Record; query?: Record; params?: Record; body?: unknown; signal?: AbortSignal; timeout?: number; parse?: 'json' | 'text' | 'blob' | 'arrayBuffer' | 'response'; onUploadProgress?: (progress: number) => void; keepalive?: boolean; /** * Transport-internal flag: the request body has already been inline- * encrypted by C++ `SessionEncryptor` (used only by the on-device face- * results path). When true, `createWasmApi` attaches the SHA-256 OAEP * scheme header so the server can unwrap the embedded AES key, and * forwards the flag to the WASM WebClient so it does not double-encrypt. * Ignored by non-WASM transports. */ ie?: boolean; }; type HttpResponse = { ok: boolean; status: number; statusText: string; url: string; headers: Record; data: T; }; type HttpClient = { defaults: { baseURL: string; headers: Record; }; request(config: RequestConfig): Promise>; get(url: string, config?: Omit): Promise>; post(url: string, body?: unknown, config?: Omit): Promise>; put(url: string, body?: unknown, config?: Omit): Promise>; patch(url: string, body?: unknown, config?: Omit): Promise>; delete(url: string, config?: Omit): Promise>; head(url: string, config?: Omit): Promise>; options(url: string, config?: Omit): Promise>; setHeader(name: string, value: string): void; }; //#endregion //#region src/internal/http/api.d.ts type MethodConfig = { headers?: Record; signal?: AbortSignal; timeout?: number; query?: Record; onUploadProgress?: (progress: number) => void; keepalive?: boolean; parse?: 'json' | 'text' | 'blob' | 'arrayBuffer' | 'response'; }; type ApiClient = { get(url: string, config?: MethodConfig): Promise>; post(url: string, data?: unknown, config?: MethodConfig): Promise>; put(url: string, data?: unknown, config?: MethodConfig): Promise>; patch(url: string, data?: unknown, config?: MethodConfig): Promise>; delete(url: string, config?: MethodConfig): Promise>; }; declare function getApi(): HttpClient; declare const api: ApiClient; //#endregion export { api, getApi };