export type JSONValue = null | string | number | boolean | { [value: string]: JSONValue; } | Array; export type FinishReason = 'stop' | 'length' | 'content-filter' | 'tool-calls' | 'error' | 'other' | 'unknown'; export type Source = { sourceType: 'url'; id: string; url: string; title?: string; providerMetadata?: Record>; }; export interface ToolCall { toolCallId: string; toolName: NAME; args: ARGS; } export interface ToolResult { toolCallId: string; toolName: NAME; args: ARGS; result: RESULT; } export type ToolInvocation = ({ state: 'partial-call'; step?: number; } & ToolCall) | ({ state: 'call'; step?: number; } & ToolCall) | ({ state: 'result'; step?: number; } & ToolResult); export interface Attachment { name?: string; contentType?: string; url: string; } export type TextUIPart = { type: 'text'; text: string; }; export type ReasoningUIPart = { type: 'reasoning'; reasoning: string; details: Array<{ type: 'text'; text: string; signature?: string; } | { type: 'redacted'; data: string; }>; }; export type ToolInvocationUIPart = { type: 'tool-invocation'; toolInvocation: ToolInvocation; }; export type SourceUIPart = { type: 'source'; source: Source; }; export type FileUIPart = { type: 'file'; mimeType: string; data: string; }; export type StepStartUIPart = { type: 'step-start'; }; export interface Message { id: string; createdAt?: Date; content: string; /** @deprecated Use `parts` instead. */ reasoning?: string; experimental_attachments?: Attachment[]; role: 'system' | 'user' | 'assistant' | 'data'; /** @deprecated Data messages will be removed. */ data?: JSONValue; annotations?: JSONValue[] | undefined; /** @deprecated Use `parts` instead. */ toolInvocations?: Array; parts?: Array; } export type UIMessage = Message & { parts: Array; }; export type UseChatOptions = { onToolCall?: ({ toolCall }: { toolCall: ToolCall; }) => void | Promise | unknown; }; //# sourceMappingURL=types.d.ts.map