import * as z from "zod/v3";
import { EventStream } from "../../lib/event-streams.js";
import { ClosedEnum } from "../../types/enums.js";
import { Result as SafeParseResult } from "../../types/fp.js";
import * as components from "../components/index.js";
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
/**
 * Message containing tool execution results
 */
export declare const RoleToolMessage: {
    readonly Tool: "tool";
};
/**
 * Message containing tool execution results
 */
export type RoleToolMessage = ClosedEnum<typeof RoleToolMessage>;
/**
 * Message from the end user
 */
export declare const RoleUserMessage: {
    readonly User: "user";
};
/**
 * Message from the end user
 */
export type RoleUserMessage = ClosedEnum<typeof RoleUserMessage>;
/**
 * Message role (user or tool for continuing executions)
 */
export type CreateAgentResponseRequestRole = RoleUserMessage | RoleToolMessage;
/**
 * Message part that can be provided by users. Use "text" for regular messages, "file" for attachments, or "tool_result" when responding to tool call requests.
 */
export type PublicMessagePart = components.TextPart | components.FilePart | components.ToolResultPart | components.ErrorPart;
/**
 * The A2A message to send to the agent (user input or tool results)
 */
export type A2AMessage = {
    /**
     * Optional A2A message ID in ULID format
     */
    messageId?: string | undefined;
    /**
     * Message role (user or tool for continuing executions)
     */
    role: RoleUserMessage | RoleToolMessage;
    /**
     * A2A message parts (text, file, or tool_result only). Note: Tool role messages must only contain tool_result parts.
     */
    parts: Array<components.TextPart | components.FilePart | components.ToolResultPart | components.ErrorPart>;
};
/**
 * Information about the identity making the request. If the identity does not exist, it will be created automatically.
 */
export type Identity = {
    /**
     * Unique identifier for the contact
     */
    id: string;
    /**
     * Display name of the contact
     */
    displayName?: string | undefined;
    /**
     * Email address of the contact
     */
    email?: string | undefined;
    /**
     * A hash of key/value pairs containing any other data about the contact
     */
    metadata?: Array<{
        [k: string]: any;
    }> | undefined;
    /**
     * URL to the contact's avatar or logo
     */
    logoUrl?: string | undefined;
    /**
     * A list of tags associated with the contact
     */
    tags?: Array<string> | undefined;
};
/**
 * @deprecated Use identity instead. Information about the contact making the request.
 *
 * @deprecated class: This will be removed in a future release, please migrate away from it as soon as possible.
 */
export type Contact = {
    /**
     * Unique identifier for the contact
     */
    id: string;
    /**
     * Display name of the contact
     */
    displayName?: string | undefined;
    /**
     * Email address of the contact
     */
    email?: string | undefined;
    /**
     * A hash of key/value pairs containing any other data about the contact
     */
    metadata?: Array<{
        [k: string]: any;
    }> | undefined;
    /**
     * URL to the contact's avatar or logo
     */
    logoUrl?: string | undefined;
    /**
     * A list of tags associated with the contact
     */
    tags?: Array<string> | undefined;
};
/**
 * Thread information to group related requests
 */
export type CreateAgentResponseRequestThread = {
    /**
     * Unique thread identifier to group related invocations.
     */
    id: string;
    /**
     * Optional tags to differentiate or categorize threads
     */
    tags?: Array<string> | undefined;
};
/**
 * Memory configuration for the agent execution. Used to associate memory stores with specific entities like users or sessions.
 */
export type Memory = {
    /**
     * An entity ID used to link memory stores to a specific user, session, or conversation. This ID is used to isolate and retrieve memories specific to the entity across agent executions.
     */
    entityId: string;
};
/**
 * Override template engine for this invocation. If not provided, uses the agent default.
 */
export declare const CreateAgentResponseRequestEngine: {
    readonly Text: "text";
    readonly Jinja: "jinja";
    readonly Mustache: "mustache";
};
/**
 * Override template engine for this invocation. If not provided, uses the agent default.
 */
export type CreateAgentResponseRequestEngine = ClosedEnum<typeof CreateAgentResponseRequestEngine>;
/**
 * Configuration options for the agent invocation
 */
export type Configuration = {
    /**
     * Whether to block until the agent task completes. When true, the response will include the full task with messages. When false (default), returns immediately with task ID and status.
     */
    blocking?: boolean | undefined;
};
/**
 * Conversation context for chat studio integration
 */
export type Conversation = {
    /**
     * Unique ULID identifier for the conversation, prefixed with "conv_". Used to link agent executions to a specific conversation thread.
     */
    id: string;
};
export type CreateAgentResponseRequestRequestBody = {
    /**
     * Optional task ID to continue an existing agent execution. When provided, the agent will continue the conversation from the existing task state. The task must be in an inactive state to continue.
     */
    taskId?: string | undefined;
    /**
     * The A2A message to send to the agent (user input or tool results)
     */
    message: A2AMessage;
    /**
     * Optional variables for template replacement in system prompt, instructions, and messages
     */
    variables?: {
        [k: string]: any;
    } | undefined;
    /**
     * Information about the identity making the request. If the identity does not exist, it will be created automatically.
     */
    identity?: Identity | undefined;
    /**
     * @deprecated Use identity instead. Information about the contact making the request.
     *
     * @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
     */
    contact?: Contact | undefined;
    /**
     * Thread information to group related requests
     */
    thread?: CreateAgentResponseRequestThread | undefined;
    /**
     * Memory configuration for the agent execution. Used to associate memory stores with specific entities like users or sessions.
     */
    memory?: Memory | undefined;
    /**
     * Optional metadata for the agent invocation as key-value pairs that will be included in traces
     */
    metadata?: {
        [k: string]: any;
    } | undefined;
    /**
     * Override template engine for this invocation. If not provided, uses the agent default.
     */
    engine?: CreateAgentResponseRequestEngine | undefined;
    /**
     * Configuration options for the agent invocation
     */
    configuration?: Configuration | undefined;
    /**
     * If true, returns immediately without waiting for completion. If false (default), waits until the agent becomes inactive or errors.
     */
    background?: boolean | undefined;
    /**
     * If true, returns Server-Sent Events (SSE) streaming response with real-time events. If false (default), returns standard JSON response.
     */
    stream?: boolean | undefined;
    /**
     * Conversation context for chat studio integration
     */
    conversation?: Conversation | undefined;
};
export type CreateAgentResponseRequestRequest = {
    /**
     * The unique key of identifier of the agent to invoke
     */
    agentKey: string;
    requestBody: CreateAgentResponseRequestRequestBody;
};
/**
 * Agent response successfully created and completed. Returns the full conversation including all messages, tool interactions, model used, and token usage statistics. In background mode, returns immediately with initial task details. In streaming mode, returns Server-Sent Events (SSE) with real-time events.
 */
export type CreateAgentResponseRequestResponseBody = {
    /**
     * Union of all possible streaming events. Each event has a type field for discrimination.
     */
    data?: components.ResponseStreamingEvent | undefined;
};
export type CreateAgentResponseRequestResponse = components.CreateAgentResponse | EventStream<CreateAgentResponseRequestResponseBody>;
/** @internal */
export declare const RoleToolMessage$outboundSchema: z.ZodNativeEnum<typeof RoleToolMessage>;
/** @internal */
export declare const RoleUserMessage$outboundSchema: z.ZodNativeEnum<typeof RoleUserMessage>;
/** @internal */
export type CreateAgentResponseRequestRole$Outbound = string | string;
/** @internal */
export declare const CreateAgentResponseRequestRole$outboundSchema: z.ZodType<CreateAgentResponseRequestRole$Outbound, z.ZodTypeDef, CreateAgentResponseRequestRole>;
export declare function createAgentResponseRequestRoleToJSON(createAgentResponseRequestRole: CreateAgentResponseRequestRole): string;
/** @internal */
export type PublicMessagePart$Outbound = components.TextPart$Outbound | components.FilePart$Outbound | components.ToolResultPart$Outbound | components.ErrorPart$Outbound;
/** @internal */
export declare const PublicMessagePart$outboundSchema: z.ZodType<PublicMessagePart$Outbound, z.ZodTypeDef, PublicMessagePart>;
export declare function publicMessagePartToJSON(publicMessagePart: PublicMessagePart): string;
/** @internal */
export type A2AMessage$Outbound = {
    messageId?: string | undefined;
    role: string | string;
    parts: Array<components.TextPart$Outbound | components.FilePart$Outbound | components.ToolResultPart$Outbound | components.ErrorPart$Outbound>;
};
/** @internal */
export declare const A2AMessage$outboundSchema: z.ZodType<A2AMessage$Outbound, z.ZodTypeDef, A2AMessage>;
export declare function a2AMessageToJSON(a2AMessage: A2AMessage): string;
/** @internal */
export type Identity$Outbound = {
    id: string;
    display_name?: string | undefined;
    email?: string | undefined;
    metadata?: Array<{
        [k: string]: any;
    }> | undefined;
    logo_url?: string | undefined;
    tags?: Array<string> | undefined;
};
/** @internal */
export declare const Identity$outboundSchema: z.ZodType<Identity$Outbound, z.ZodTypeDef, Identity>;
export declare function identityToJSON(identity: Identity): string;
/** @internal */
export type Contact$Outbound = {
    id: string;
    display_name?: string | undefined;
    email?: string | undefined;
    metadata?: Array<{
        [k: string]: any;
    }> | undefined;
    logo_url?: string | undefined;
    tags?: Array<string> | undefined;
};
/** @internal */
export declare const Contact$outboundSchema: z.ZodType<Contact$Outbound, z.ZodTypeDef, Contact>;
export declare function contactToJSON(contact: Contact): string;
/** @internal */
export type CreateAgentResponseRequestThread$Outbound = {
    id: string;
    tags?: Array<string> | undefined;
};
/** @internal */
export declare const CreateAgentResponseRequestThread$outboundSchema: z.ZodType<CreateAgentResponseRequestThread$Outbound, z.ZodTypeDef, CreateAgentResponseRequestThread>;
export declare function createAgentResponseRequestThreadToJSON(createAgentResponseRequestThread: CreateAgentResponseRequestThread): string;
/** @internal */
export type Memory$Outbound = {
    entity_id: string;
};
/** @internal */
export declare const Memory$outboundSchema: z.ZodType<Memory$Outbound, z.ZodTypeDef, Memory>;
export declare function memoryToJSON(memory: Memory): string;
/** @internal */
export declare const CreateAgentResponseRequestEngine$outboundSchema: z.ZodNativeEnum<typeof CreateAgentResponseRequestEngine>;
/** @internal */
export type Configuration$Outbound = {
    blocking: boolean;
};
/** @internal */
export declare const Configuration$outboundSchema: z.ZodType<Configuration$Outbound, z.ZodTypeDef, Configuration>;
export declare function configurationToJSON(configuration: Configuration): string;
/** @internal */
export type Conversation$Outbound = {
    _id: string;
};
/** @internal */
export declare const Conversation$outboundSchema: z.ZodType<Conversation$Outbound, z.ZodTypeDef, Conversation>;
export declare function conversationToJSON(conversation: Conversation): string;
/** @internal */
export type CreateAgentResponseRequestRequestBody$Outbound = {
    task_id?: string | undefined;
    message: A2AMessage$Outbound;
    variables?: {
        [k: string]: any;
    } | undefined;
    identity?: Identity$Outbound | undefined;
    contact?: Contact$Outbound | undefined;
    thread?: CreateAgentResponseRequestThread$Outbound | undefined;
    memory?: Memory$Outbound | undefined;
    metadata?: {
        [k: string]: any;
    } | undefined;
    engine?: string | undefined;
    configuration?: Configuration$Outbound | undefined;
    background: boolean;
    stream: boolean;
    conversation?: Conversation$Outbound | undefined;
};
/** @internal */
export declare const CreateAgentResponseRequestRequestBody$outboundSchema: z.ZodType<CreateAgentResponseRequestRequestBody$Outbound, z.ZodTypeDef, CreateAgentResponseRequestRequestBody>;
export declare function createAgentResponseRequestRequestBodyToJSON(createAgentResponseRequestRequestBody: CreateAgentResponseRequestRequestBody): string;
/** @internal */
export type CreateAgentResponseRequestRequest$Outbound = {
    agent_key: string;
    RequestBody: CreateAgentResponseRequestRequestBody$Outbound;
};
/** @internal */
export declare const CreateAgentResponseRequestRequest$outboundSchema: z.ZodType<CreateAgentResponseRequestRequest$Outbound, z.ZodTypeDef, CreateAgentResponseRequestRequest>;
export declare function createAgentResponseRequestRequestToJSON(createAgentResponseRequestRequest: CreateAgentResponseRequestRequest): string;
/** @internal */
export declare const CreateAgentResponseRequestResponseBody$inboundSchema: z.ZodType<CreateAgentResponseRequestResponseBody, z.ZodTypeDef, unknown>;
export declare function createAgentResponseRequestResponseBodyFromJSON(jsonString: string): SafeParseResult<CreateAgentResponseRequestResponseBody, SDKValidationError>;
/** @internal */
export declare const CreateAgentResponseRequestResponse$inboundSchema: z.ZodType<CreateAgentResponseRequestResponse, z.ZodTypeDef, unknown>;
export declare function createAgentResponseRequestResponseFromJSON(jsonString: string): SafeParseResult<CreateAgentResponseRequestResponse, SDKValidationError>;
//# sourceMappingURL=createagentresponserequest.d.ts.map