import * as bedrock from '@aws-sdk/client-bedrock-runtime';
import * as jsonSchemaToTypeScript from 'json-schema-to-ts';
export type JSONSchema = jsonSchemaToTypeScript.JSONSchema;
export type FromJSONSchema<TJSONSchema extends JSONSchema> = jsonSchemaToTypeScript.FromSchema<TJSONSchema>;
export type ToolInputSchema<TJSONSchema extends JSONSchema> = {
    json: TJSONSchema;
};
export type ToolResultContentBlock = bedrock.ToolResultContentBlock;
export type ConversationMessage = {
    role: 'user' | 'assistant';
    content: Array<ConversationMessageContentBlock>;
};
export type ConversationMessageContentBlock = bedrock.ContentBlock | {
    image: Omit<bedrock.ImageBlock, 'source'> & {
        source: {
            bytes: string;
        };
    };
    text?: never;
    document?: never;
    toolUse?: never;
    toolResult?: never;
    guardContent?: never;
    $unknown?: never;
};
export type ToolDefinition<TJSONSchema extends JSONSchema = JSONSchema> = {
    name: string;
    description: string;
    inputSchema: ToolInputSchema<TJSONSchema>;
};
export type ConversationTurnEvent = {
    conversationId: string;
    currentMessageId: string;
    streamResponse?: boolean;
    responseMutation: {
        name: string;
        inputTypeName: string;
        selectionSet: string;
    };
    graphqlApiEndpoint: string;
    modelConfiguration: {
        modelId: string;
        systemPrompt: string;
        region?: string;
        inferenceConfiguration?: {
            maxTokens?: number;
            temperature?: number;
            topP?: number;
        };
    };
    request: {
        headers: Record<string, string>;
    };
    /**
     * @deprecated This field is going to be removed in upcoming releases.
     */
    messages?: Array<ConversationMessage>;
    messageHistoryQuery: {
        getQueryName: string;
        getQueryInputTypeName: string;
        listQueryName: string;
        listQueryInputTypeName: string;
        listQueryLimit?: number;
    };
    toolsConfiguration?: {
        dataTools?: Array<ToolDefinition & {
            graphqlRequestInputDescriptor: {
                queryName: string;
                selectionSet: string;
                propertyTypes: Record<string, string>;
            };
        }>;
        clientTools?: Array<ToolDefinition>;
    };
};
export type ExecutableTool<TJSONSchema extends JSONSchema = JSONSchema, TToolInput = FromJSONSchema<TJSONSchema>> = ToolDefinition<TJSONSchema> & {
    execute: (input: TToolInput) => Promise<ToolResultContentBlock>;
};
export type StreamingResponseChunk = {
    conversationId: string;
    associatedUserMessageId: string;
    contentBlockIndex: number;
} & ({
    contentBlockText: string;
    contentBlockDeltaIndex: number;
} | {
    contentBlockDoneAtIndex: number;
} | {
    contentBlockToolUse: string;
} | {
    stopReason: string;
});
//# sourceMappingURL=types.d.ts.map