TypeScript SDKTypeScript signatures
CerealChatTransport
Public TypeScript declaration from @trycereal/sdk/browser.
Import from @trycereal/sdk/browser. Generated from the repository SDK declarations (package version 0.0.0); not from HTTP request schemas.
export declare class CerealChatTransport<CHUNK = AiSdkStreamChunk> {
constructor(options: {
readonly tokenSource: () => Promise<StreamToken>;
readonly sendUrl: string;
readonly fetch?: typeof globalThis.fetch;
readonly headers?: Readonly<Record<string, string>>;
readonly onError?: (error: unknown) => void;
});
sendMessages(input: {
readonly messages: ReadonlyArray<unknown>;
readonly abortSignal?: AbortSignal;
readonly trigger?: string;
readonly chatId?: string;
readonly messageId?: string;
}): Promise<ReadableStream<CHUNK>>;
reconnectToStream(_input?: {
readonly chatId?: string;
}): Promise<ReadableStream<CHUNK>>;
}See SDK setup, authoring, client behavior, and the API/SDK map for usage. Domain types are described in schema reference.
Related SDK types: StreamToken, AiSdkStreamChunk.