import * as z from "zod/v3";
import { ClosedEnum } from "../../types/enums.js";
import { Result as SafeParseResult } from "../../types/fp.js";
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
import { Telemetry } from "./telemetry.js";
/**
 * The reason why the agent stopped generating
 */
export declare const ResponseDoneEventFinishReason: {
    readonly Stop: "stop";
    readonly Length: "length";
    readonly ToolCalls: "tool_calls";
    readonly ContentFilter: "content_filter";
    readonly FunctionCall: "function_call";
    readonly MaxIterations: "max_iterations";
    readonly MaxTime: "max_time";
};
/**
 * The reason why the agent stopped generating
 */
export type ResponseDoneEventFinishReason = ClosedEnum<typeof ResponseDoneEventFinishReason>;
export type ResponseDoneEventPromptTokensDetails = {
    cachedTokens?: number | null | undefined;
    cacheCreationTokens?: number | null | undefined;
    /**
     * The number of audio input tokens consumed by the request.
     */
    audioTokens?: number | null | undefined;
};
export type ResponseDoneEventCompletionTokensDetails = {
    reasoningTokens?: number | null | undefined;
    acceptedPredictionTokens?: number | null | undefined;
    rejectedPredictionTokens?: number | null | undefined;
    /**
     * The number of audio output tokens produced by the response.
     */
    audioTokens?: number | null | undefined;
};
/**
 * Token usage statistics for the complete response
 */
export type ResponseDoneEventUsage = {
    /**
     * Number of tokens in the generated completion.
     */
    completionTokens?: number | undefined;
    /**
     * Number of tokens in the prompt.
     */
    promptTokens?: number | undefined;
    /**
     * Total number of tokens used in the request (prompt + completion).
     */
    totalTokens?: number | undefined;
    promptTokensDetails?: ResponseDoneEventPromptTokensDetails | null | undefined;
    completionTokensDetails?: ResponseDoneEventCompletionTokensDetails | null | undefined;
};
export declare const ResponseDoneEventDataType: {
    readonly Function: "function";
};
export type ResponseDoneEventDataType = ClosedEnum<typeof ResponseDoneEventDataType>;
export type ResponseDoneEventFunction = {
    /**
     * The name of the function to call
     */
    name?: string | undefined;
    /**
     * The arguments to pass to the function as JSON string
     */
    arguments?: string | undefined;
};
export type ResponseDoneEventPendingToolCalls = {
    /**
     * Unique identifier for the tool call
     */
    id: string;
    type: ResponseDoneEventDataType;
    function: ResponseDoneEventFunction;
};
export type ResponseDoneEventData = {
    /**
     * The reason why the agent stopped generating
     */
    finishReason: ResponseDoneEventFinishReason;
    /**
     * Token usage statistics for the complete response
     */
    usage?: ResponseDoneEventUsage | undefined;
    /**
     * Tool calls awaiting user response (when finishReason is function_call)
     */
    pendingToolCalls?: Array<ResponseDoneEventPendingToolCalls> | undefined;
    /**
     * Telemetry information for correlating the response with traces
     */
    telemetry?: Telemetry | undefined;
};
/**
 * Emitted when the agent completes processing. Contains the finish reason and usage statistics.
 */
export type ResponseDoneEvent = {
    type: "response.done";
    /**
     * ISO timestamp of when the event occurred
     */
    timestamp: string;
    data: ResponseDoneEventData;
};
/** @internal */
export declare const ResponseDoneEventFinishReason$inboundSchema: z.ZodNativeEnum<typeof ResponseDoneEventFinishReason>;
/** @internal */
export declare const ResponseDoneEventPromptTokensDetails$inboundSchema: z.ZodType<ResponseDoneEventPromptTokensDetails, z.ZodTypeDef, unknown>;
export declare function responseDoneEventPromptTokensDetailsFromJSON(jsonString: string): SafeParseResult<ResponseDoneEventPromptTokensDetails, SDKValidationError>;
/** @internal */
export declare const ResponseDoneEventCompletionTokensDetails$inboundSchema: z.ZodType<ResponseDoneEventCompletionTokensDetails, z.ZodTypeDef, unknown>;
export declare function responseDoneEventCompletionTokensDetailsFromJSON(jsonString: string): SafeParseResult<ResponseDoneEventCompletionTokensDetails, SDKValidationError>;
/** @internal */
export declare const ResponseDoneEventUsage$inboundSchema: z.ZodType<ResponseDoneEventUsage, z.ZodTypeDef, unknown>;
export declare function responseDoneEventUsageFromJSON(jsonString: string): SafeParseResult<ResponseDoneEventUsage, SDKValidationError>;
/** @internal */
export declare const ResponseDoneEventDataType$inboundSchema: z.ZodNativeEnum<typeof ResponseDoneEventDataType>;
/** @internal */
export declare const ResponseDoneEventFunction$inboundSchema: z.ZodType<ResponseDoneEventFunction, z.ZodTypeDef, unknown>;
export declare function responseDoneEventFunctionFromJSON(jsonString: string): SafeParseResult<ResponseDoneEventFunction, SDKValidationError>;
/** @internal */
export declare const ResponseDoneEventPendingToolCalls$inboundSchema: z.ZodType<ResponseDoneEventPendingToolCalls, z.ZodTypeDef, unknown>;
export declare function responseDoneEventPendingToolCallsFromJSON(jsonString: string): SafeParseResult<ResponseDoneEventPendingToolCalls, SDKValidationError>;
/** @internal */
export declare const ResponseDoneEventData$inboundSchema: z.ZodType<ResponseDoneEventData, z.ZodTypeDef, unknown>;
export declare function responseDoneEventDataFromJSON(jsonString: string): SafeParseResult<ResponseDoneEventData, SDKValidationError>;
/** @internal */
export declare const ResponseDoneEvent$inboundSchema: z.ZodType<ResponseDoneEvent, z.ZodTypeDef, unknown>;
export declare function responseDoneEventFromJSON(jsonString: string): SafeParseResult<ResponseDoneEvent, SDKValidationError>;
//# sourceMappingURL=responsedoneevent.d.ts.map