import type { ClientExtensions } from '@aws-amplify/data-schema/runtime'; export type ConversationRoute = ClientExtensions['conversations'][string]; export type Conversation = NonNullable>['data']>; export type ConversationStreamEvent = Parameters[0]['next']>[0]; export type ConversationMessage = NonNullable>['data']> & { isLoading?: boolean; }; export type ConversationMessageContent = ConversationMessage['content'][number]; export type TextContentBlock = NonNullable; export type ImageContentBlock = NonNullable; export type DocumentContentBlock = NonNullable; export type ToolUseContent = NonNullable; export type ToolResultContent = NonNullable; export type InputContent = Exclude[0], string>['content'][number]; export type SendMessageContent = Exclude[0], string>['content']; export type SendMessageContext = Exclude[0], string>['aiContext']; export type ToolConfiguration = NonNullable[0], string>['toolConfiguration']>; export interface SendMesageParameters { content: SendMessageContent; aiContext?: SendMessageContext; toolConfiguration?: ToolConfiguration; } export type SendMessage = (input: SendMesageParameters) => void; type AIClient> = Pick, 'generations' | 'conversations'>; export type getSchema = T extends AIClient ? Schema : never; export interface GraphQLFormattedError { readonly message: string; readonly errorType: string; readonly errorInfo?: null | { [key: string]: unknown; }; } type JSONType = 'string' | 'number' | 'integer' | 'boolean' | 'object' | 'array' | 'null' | 'any'; interface ResponseComponentProp { type: JSONType; enum?: string[]; description?: string; required?: boolean; } interface ResponseComponentPropMap { [key: string]: ResponseComponentProp; } export interface ResponseComponent { component: React.ComponentType; description?: string; props: ResponseComponentPropMap; } export interface ResponseComponents { [key: string]: ResponseComponent; } export {};