import { PaginatedData } from '../types/paginatedData'; export declare const fetchAll: (reqFunction: (reqParams: any) => Promise>, reqParams?: any, maxLimit?: number) => Promise; export declare const fetchAllWithOffset: (reqFunction: (reqParams: any) => Promise<{ pagination: { limit: number; offset: number; total: number; }; data: T[]; }>, reqParams?: any, maxLimit?: number) => Promise; export declare function fetchFirstChunkAndRemainingAsync(reqFunction: (reqParams: any) => Promise>, reqParams?: any): Promise<[T[], Promise]>; export declare function urlSafeFetchInChunks(ids: (string | number)[], fetchFunction: (chunk: (string | number)[]) => Promise<{ results: T[]; } | T[]>, options?: { chunkSize: number; }): Promise; export declare function derivePatchRequestFields(current: T, updated: Partial, fieldsString?: string): { updatedFields: string[]; payload: Partial; }; export declare function requestStream(url: string, body: Record, token: string, onStreamedChunk?: (chunk: string, response: string) => void, signal?: AbortSignal): Promise; /** * Split a raw SSE buffer on the `\n\n` event boundary. When `done`, the trailing * fragment is flushed as a final event; otherwise it is returned in `rest` to be * prepended to the next chunk. */ export declare function splitSseBuffer(buffer: string, done: boolean): { events: string[]; rest: string; }; /** Parse one SSE event block into its JSON payload; null for `[DONE]`, keep-alives, or non-JSON. */ export declare function parseSseEvent(event: string): Record | null; /** * Consume the Bedrock SSE stream from `/core/api/protected/ai/ai-generation/stream` * and accumulate text. The endpoint emits `data: {"type":"content_delta","delta":"…"}` * frames, a `data: {"type":"error","error":"…"}` on failure, and a `data: [DONE]` * terminator (PIT-7145). Calls `onText(delta, fullText)` per content chunk and * returns the full text; throws on error frames / network failures. Replaces the * legacy Replicate NDJSON parsing now that platform AI surfaces run on the * `routine` tier (Bedrock). */ export declare function requestAiStream(url: string, body: Record, token: string, onText?: (delta: string, fullText: string) => void, signal?: AbortSignal): Promise;