import { InferServingChunk, InferServingRequest, ServingAlias } from "./types.js"; //#region src/react/hooks/use-serving-stream.d.ts interface UseServingStreamOptions> { /** Endpoint alias for named mode. Omit for default mode. */ alias?: K; /** If true, starts streaming automatically on mount. Default: false */ autoStart?: boolean; /** Called with accumulated chunks when the stream completes successfully. */ onComplete?: (chunks: T[]) => void; } interface UseServingStreamResult> { /** Trigger the streaming invocation. Pass an optional body override for this invocation. */ stream: (overrideBody?: TBody) => void; /** Accumulated chunks received so far. */ chunks: T[]; /** Whether streaming is in progress. */ streaming: boolean; /** Error message, if any. */ error: string | null; /** Reset chunks and abort any active stream. */ reset: () => void; } /** * Hook for streaming invocation of a serving endpoint via SSE. * Calls `POST /api/serving/stream` (default) or `POST /api/serving/{alias}/stream` (named). * Accumulates parsed chunks in state. * * When the type generator has populated `ServingEndpointRegistry`, the chunk type * is automatically inferred from the endpoint's OpenAPI schema. */ declare function useServingStream(body: InferServingRequest, options?: UseServingStreamOptions): UseServingStreamResult, InferServingRequest>; //#endregion export { UseServingStreamOptions, UseServingStreamResult, useServingStream }; //# sourceMappingURL=use-serving-stream.d.ts.map