/** * OpenResponses API Zod Schemas * * Zod schemas for the OpenResponses `/v1/responses` endpoint. * This module is isolated from gateway imports to enable future codegen and prevent drift. * * @see https://www.open-responses.com/ */ import { z } from "zod"; export declare const InputTextContentPartSchema: z.ZodObject<{ type: z.ZodLiteral<"input_text">; text: z.ZodString; }, z.core.$strict>; export declare const OutputTextContentPartSchema: z.ZodObject<{ type: z.ZodLiteral<"output_text">; text: z.ZodString; }, z.core.$strict>; export declare const InputImageSourceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{ type: z.ZodLiteral<"url">; url: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"base64">; media_type: z.ZodEnum<{ "image/jpeg": "image/jpeg"; "image/png": "image/png"; "image/webp": "image/webp"; "image/gif": "image/gif"; }>; data: z.ZodString; }, z.core.$strip>], "type">; export declare const InputImageContentPartSchema: z.ZodObject<{ type: z.ZodLiteral<"input_image">; source: z.ZodDiscriminatedUnion<[z.ZodObject<{ type: z.ZodLiteral<"url">; url: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"base64">; media_type: z.ZodEnum<{ "image/jpeg": "image/jpeg"; "image/png": "image/png"; "image/webp": "image/webp"; "image/gif": "image/gif"; }>; data: z.ZodString; }, z.core.$strip>], "type">; }, z.core.$strict>; export declare const InputFileSourceSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{ type: z.ZodLiteral<"url">; url: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"base64">; media_type: z.ZodString; data: z.ZodString; filename: z.ZodOptional; }, z.core.$strip>], "type">; export declare const InputFileContentPartSchema: z.ZodObject<{ type: z.ZodLiteral<"input_file">; source: z.ZodDiscriminatedUnion<[z.ZodObject<{ type: z.ZodLiteral<"url">; url: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"base64">; media_type: z.ZodString; data: z.ZodString; filename: z.ZodOptional; }, z.core.$strip>], "type">; }, z.core.$strict>; export declare const ContentPartSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{ type: z.ZodLiteral<"input_text">; text: z.ZodString; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"output_text">; text: z.ZodString; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"input_image">; source: z.ZodDiscriminatedUnion<[z.ZodObject<{ type: z.ZodLiteral<"url">; url: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"base64">; media_type: z.ZodEnum<{ "image/jpeg": "image/jpeg"; "image/png": "image/png"; "image/webp": "image/webp"; "image/gif": "image/gif"; }>; data: z.ZodString; }, z.core.$strip>], "type">; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"input_file">; source: z.ZodDiscriminatedUnion<[z.ZodObject<{ type: z.ZodLiteral<"url">; url: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"base64">; media_type: z.ZodString; data: z.ZodString; filename: z.ZodOptional; }, z.core.$strip>], "type">; }, z.core.$strict>], "type">; export type ContentPart = z.infer; export declare const MessageItemRoleSchema: z.ZodEnum<{ user: "user"; assistant: "assistant"; system: "system"; developer: "developer"; }>; export type MessageItemRole = z.infer; export declare const MessageItemSchema: z.ZodObject<{ type: z.ZodLiteral<"message">; role: z.ZodEnum<{ user: "user"; assistant: "assistant"; system: "system"; developer: "developer"; }>; content: z.ZodUnion; text: z.ZodString; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"output_text">; text: z.ZodString; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"input_image">; source: z.ZodDiscriminatedUnion<[z.ZodObject<{ type: z.ZodLiteral<"url">; url: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"base64">; media_type: z.ZodEnum<{ "image/jpeg": "image/jpeg"; "image/png": "image/png"; "image/webp": "image/webp"; "image/gif": "image/gif"; }>; data: z.ZodString; }, z.core.$strip>], "type">; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"input_file">; source: z.ZodDiscriminatedUnion<[z.ZodObject<{ type: z.ZodLiteral<"url">; url: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"base64">; media_type: z.ZodString; data: z.ZodString; filename: z.ZodOptional; }, z.core.$strip>], "type">; }, z.core.$strict>], "type">>]>; }, z.core.$strict>; export declare const FunctionCallItemSchema: z.ZodObject<{ type: z.ZodLiteral<"function_call">; id: z.ZodOptional; call_id: z.ZodOptional; name: z.ZodString; arguments: z.ZodString; }, z.core.$strict>; export declare const FunctionCallOutputItemSchema: z.ZodObject<{ type: z.ZodLiteral<"function_call_output">; call_id: z.ZodString; output: z.ZodString; }, z.core.$strict>; export declare const ReasoningItemSchema: z.ZodObject<{ type: z.ZodLiteral<"reasoning">; content: z.ZodOptional; encrypted_content: z.ZodOptional; summary: z.ZodOptional; }, z.core.$strict>; export declare const ItemReferenceItemSchema: z.ZodObject<{ type: z.ZodLiteral<"item_reference">; id: z.ZodString; }, z.core.$strict>; export declare const ItemParamSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{ type: z.ZodLiteral<"message">; role: z.ZodEnum<{ user: "user"; assistant: "assistant"; system: "system"; developer: "developer"; }>; content: z.ZodUnion; text: z.ZodString; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"output_text">; text: z.ZodString; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"input_image">; source: z.ZodDiscriminatedUnion<[z.ZodObject<{ type: z.ZodLiteral<"url">; url: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"base64">; media_type: z.ZodEnum<{ "image/jpeg": "image/jpeg"; "image/png": "image/png"; "image/webp": "image/webp"; "image/gif": "image/gif"; }>; data: z.ZodString; }, z.core.$strip>], "type">; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"input_file">; source: z.ZodDiscriminatedUnion<[z.ZodObject<{ type: z.ZodLiteral<"url">; url: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"base64">; media_type: z.ZodString; data: z.ZodString; filename: z.ZodOptional; }, z.core.$strip>], "type">; }, z.core.$strict>], "type">>]>; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"function_call">; id: z.ZodOptional; call_id: z.ZodOptional; name: z.ZodString; arguments: z.ZodString; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"function_call_output">; call_id: z.ZodString; output: z.ZodString; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"reasoning">; content: z.ZodOptional; encrypted_content: z.ZodOptional; summary: z.ZodOptional; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"item_reference">; id: z.ZodString; }, z.core.$strict>], "type">; export type ItemParam = z.infer; export declare const FunctionToolDefinitionSchema: z.ZodObject<{ type: z.ZodLiteral<"function">; function: z.ZodObject<{ name: z.ZodString; description: z.ZodOptional; parameters: z.ZodOptional>; }, z.core.$strip>; }, z.core.$strict>; export declare const ToolDefinitionSchema: z.ZodObject<{ type: z.ZodLiteral<"function">; function: z.ZodObject<{ name: z.ZodString; description: z.ZodOptional; parameters: z.ZodOptional>; }, z.core.$strip>; }, z.core.$strict>; export type ToolDefinition = z.infer; export declare const ToolChoiceSchema: z.ZodUnion, z.ZodLiteral<"none">, z.ZodLiteral<"required">, z.ZodObject<{ type: z.ZodLiteral<"function">; function: z.ZodObject<{ name: z.ZodString; }, z.core.$strip>; }, z.core.$strip>]>; export declare const CreateResponseBodySchema: z.ZodObject<{ model: z.ZodString; input: z.ZodUnion; role: z.ZodEnum<{ user: "user"; assistant: "assistant"; system: "system"; developer: "developer"; }>; content: z.ZodUnion; text: z.ZodString; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"output_text">; text: z.ZodString; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"input_image">; source: z.ZodDiscriminatedUnion<[z.ZodObject<{ type: z.ZodLiteral<"url">; url: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"base64">; media_type: z.ZodEnum<{ "image/jpeg": "image/jpeg"; "image/png": "image/png"; "image/webp": "image/webp"; "image/gif": "image/gif"; }>; data: z.ZodString; }, z.core.$strip>], "type">; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"input_file">; source: z.ZodDiscriminatedUnion<[z.ZodObject<{ type: z.ZodLiteral<"url">; url: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"base64">; media_type: z.ZodString; data: z.ZodString; filename: z.ZodOptional; }, z.core.$strip>], "type">; }, z.core.$strict>], "type">>]>; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"function_call">; id: z.ZodOptional; call_id: z.ZodOptional; name: z.ZodString; arguments: z.ZodString; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"function_call_output">; call_id: z.ZodString; output: z.ZodString; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"reasoning">; content: z.ZodOptional; encrypted_content: z.ZodOptional; summary: z.ZodOptional; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"item_reference">; id: z.ZodString; }, z.core.$strict>], "type">>]>; instructions: z.ZodOptional; tools: z.ZodOptional; function: z.ZodObject<{ name: z.ZodString; description: z.ZodOptional; parameters: z.ZodOptional>; }, z.core.$strip>; }, z.core.$strict>>>; tool_choice: z.ZodOptional, z.ZodLiteral<"none">, z.ZodLiteral<"required">, z.ZodObject<{ type: z.ZodLiteral<"function">; function: z.ZodObject<{ name: z.ZodString; }, z.core.$strip>; }, z.core.$strip>]>>; stream: z.ZodOptional; max_output_tokens: z.ZodOptional; max_tool_calls: z.ZodOptional; user: z.ZodOptional; temperature: z.ZodOptional; top_p: z.ZodOptional; metadata: z.ZodOptional>; store: z.ZodOptional; previous_response_id: z.ZodOptional; reasoning: z.ZodOptional>; summary: z.ZodOptional>; }, z.core.$strip>>; truncation: z.ZodOptional>; }, z.core.$strict>; export type CreateResponseBody = z.infer; export declare const ResponseStatusSchema: z.ZodEnum<{ failed: "failed"; completed: "completed"; cancelled: "cancelled"; in_progress: "in_progress"; incomplete: "incomplete"; }>; export type ResponseStatus = z.infer; export declare const OutputItemSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{ type: z.ZodLiteral<"message">; id: z.ZodString; role: z.ZodLiteral<"assistant">; content: z.ZodArray; text: z.ZodString; }, z.core.$strict>>; status: z.ZodOptional>; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"function_call">; id: z.ZodString; call_id: z.ZodString; name: z.ZodString; arguments: z.ZodString; status: z.ZodOptional>; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"reasoning">; id: z.ZodString; content: z.ZodOptional; summary: z.ZodOptional; }, z.core.$strict>], "type">; export type OutputItem = z.infer; export declare const UsageSchema: z.ZodObject<{ input_tokens: z.ZodNumber; output_tokens: z.ZodNumber; total_tokens: z.ZodNumber; }, z.core.$strip>; export type Usage = z.infer; export declare const ResponseResourceSchema: z.ZodObject<{ id: z.ZodString; object: z.ZodLiteral<"response">; created_at: z.ZodNumber; status: z.ZodEnum<{ failed: "failed"; completed: "completed"; cancelled: "cancelled"; in_progress: "in_progress"; incomplete: "incomplete"; }>; model: z.ZodString; output: z.ZodArray; id: z.ZodString; role: z.ZodLiteral<"assistant">; content: z.ZodArray; text: z.ZodString; }, z.core.$strict>>; status: z.ZodOptional>; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"function_call">; id: z.ZodString; call_id: z.ZodString; name: z.ZodString; arguments: z.ZodString; status: z.ZodOptional>; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"reasoning">; id: z.ZodString; content: z.ZodOptional; summary: z.ZodOptional; }, z.core.$strict>], "type">>; usage: z.ZodObject<{ input_tokens: z.ZodNumber; output_tokens: z.ZodNumber; total_tokens: z.ZodNumber; }, z.core.$strip>; error: z.ZodOptional>; }, z.core.$strip>; export type ResponseResource = z.infer; export declare const ResponseCreatedEventSchema: z.ZodObject<{ type: z.ZodLiteral<"response.created">; response: z.ZodObject<{ id: z.ZodString; object: z.ZodLiteral<"response">; created_at: z.ZodNumber; status: z.ZodEnum<{ failed: "failed"; completed: "completed"; cancelled: "cancelled"; in_progress: "in_progress"; incomplete: "incomplete"; }>; model: z.ZodString; output: z.ZodArray; id: z.ZodString; role: z.ZodLiteral<"assistant">; content: z.ZodArray; text: z.ZodString; }, z.core.$strict>>; status: z.ZodOptional>; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"function_call">; id: z.ZodString; call_id: z.ZodString; name: z.ZodString; arguments: z.ZodString; status: z.ZodOptional>; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"reasoning">; id: z.ZodString; content: z.ZodOptional; summary: z.ZodOptional; }, z.core.$strict>], "type">>; usage: z.ZodObject<{ input_tokens: z.ZodNumber; output_tokens: z.ZodNumber; total_tokens: z.ZodNumber; }, z.core.$strip>; error: z.ZodOptional>; }, z.core.$strip>; }, z.core.$strip>; export declare const ResponseInProgressEventSchema: z.ZodObject<{ type: z.ZodLiteral<"response.in_progress">; response: z.ZodObject<{ id: z.ZodString; object: z.ZodLiteral<"response">; created_at: z.ZodNumber; status: z.ZodEnum<{ failed: "failed"; completed: "completed"; cancelled: "cancelled"; in_progress: "in_progress"; incomplete: "incomplete"; }>; model: z.ZodString; output: z.ZodArray; id: z.ZodString; role: z.ZodLiteral<"assistant">; content: z.ZodArray; text: z.ZodString; }, z.core.$strict>>; status: z.ZodOptional>; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"function_call">; id: z.ZodString; call_id: z.ZodString; name: z.ZodString; arguments: z.ZodString; status: z.ZodOptional>; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"reasoning">; id: z.ZodString; content: z.ZodOptional; summary: z.ZodOptional; }, z.core.$strict>], "type">>; usage: z.ZodObject<{ input_tokens: z.ZodNumber; output_tokens: z.ZodNumber; total_tokens: z.ZodNumber; }, z.core.$strip>; error: z.ZodOptional>; }, z.core.$strip>; }, z.core.$strip>; export declare const ResponseCompletedEventSchema: z.ZodObject<{ type: z.ZodLiteral<"response.completed">; response: z.ZodObject<{ id: z.ZodString; object: z.ZodLiteral<"response">; created_at: z.ZodNumber; status: z.ZodEnum<{ failed: "failed"; completed: "completed"; cancelled: "cancelled"; in_progress: "in_progress"; incomplete: "incomplete"; }>; model: z.ZodString; output: z.ZodArray; id: z.ZodString; role: z.ZodLiteral<"assistant">; content: z.ZodArray; text: z.ZodString; }, z.core.$strict>>; status: z.ZodOptional>; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"function_call">; id: z.ZodString; call_id: z.ZodString; name: z.ZodString; arguments: z.ZodString; status: z.ZodOptional>; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"reasoning">; id: z.ZodString; content: z.ZodOptional; summary: z.ZodOptional; }, z.core.$strict>], "type">>; usage: z.ZodObject<{ input_tokens: z.ZodNumber; output_tokens: z.ZodNumber; total_tokens: z.ZodNumber; }, z.core.$strip>; error: z.ZodOptional>; }, z.core.$strip>; }, z.core.$strip>; export declare const ResponseFailedEventSchema: z.ZodObject<{ type: z.ZodLiteral<"response.failed">; response: z.ZodObject<{ id: z.ZodString; object: z.ZodLiteral<"response">; created_at: z.ZodNumber; status: z.ZodEnum<{ failed: "failed"; completed: "completed"; cancelled: "cancelled"; in_progress: "in_progress"; incomplete: "incomplete"; }>; model: z.ZodString; output: z.ZodArray; id: z.ZodString; role: z.ZodLiteral<"assistant">; content: z.ZodArray; text: z.ZodString; }, z.core.$strict>>; status: z.ZodOptional>; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"function_call">; id: z.ZodString; call_id: z.ZodString; name: z.ZodString; arguments: z.ZodString; status: z.ZodOptional>; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"reasoning">; id: z.ZodString; content: z.ZodOptional; summary: z.ZodOptional; }, z.core.$strict>], "type">>; usage: z.ZodObject<{ input_tokens: z.ZodNumber; output_tokens: z.ZodNumber; total_tokens: z.ZodNumber; }, z.core.$strip>; error: z.ZodOptional>; }, z.core.$strip>; }, z.core.$strip>; export declare const OutputItemAddedEventSchema: z.ZodObject<{ type: z.ZodLiteral<"response.output_item.added">; output_index: z.ZodNumber; item: z.ZodDiscriminatedUnion<[z.ZodObject<{ type: z.ZodLiteral<"message">; id: z.ZodString; role: z.ZodLiteral<"assistant">; content: z.ZodArray; text: z.ZodString; }, z.core.$strict>>; status: z.ZodOptional>; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"function_call">; id: z.ZodString; call_id: z.ZodString; name: z.ZodString; arguments: z.ZodString; status: z.ZodOptional>; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"reasoning">; id: z.ZodString; content: z.ZodOptional; summary: z.ZodOptional; }, z.core.$strict>], "type">; }, z.core.$strip>; export declare const OutputItemDoneEventSchema: z.ZodObject<{ type: z.ZodLiteral<"response.output_item.done">; output_index: z.ZodNumber; item: z.ZodDiscriminatedUnion<[z.ZodObject<{ type: z.ZodLiteral<"message">; id: z.ZodString; role: z.ZodLiteral<"assistant">; content: z.ZodArray; text: z.ZodString; }, z.core.$strict>>; status: z.ZodOptional>; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"function_call">; id: z.ZodString; call_id: z.ZodString; name: z.ZodString; arguments: z.ZodString; status: z.ZodOptional>; }, z.core.$strict>, z.ZodObject<{ type: z.ZodLiteral<"reasoning">; id: z.ZodString; content: z.ZodOptional; summary: z.ZodOptional; }, z.core.$strict>], "type">; }, z.core.$strip>; export declare const ContentPartAddedEventSchema: z.ZodObject<{ type: z.ZodLiteral<"response.content_part.added">; item_id: z.ZodString; output_index: z.ZodNumber; content_index: z.ZodNumber; part: z.ZodObject<{ type: z.ZodLiteral<"output_text">; text: z.ZodString; }, z.core.$strict>; }, z.core.$strip>; export declare const ContentPartDoneEventSchema: z.ZodObject<{ type: z.ZodLiteral<"response.content_part.done">; item_id: z.ZodString; output_index: z.ZodNumber; content_index: z.ZodNumber; part: z.ZodObject<{ type: z.ZodLiteral<"output_text">; text: z.ZodString; }, z.core.$strict>; }, z.core.$strip>; export declare const OutputTextDeltaEventSchema: z.ZodObject<{ type: z.ZodLiteral<"response.output_text.delta">; item_id: z.ZodString; output_index: z.ZodNumber; content_index: z.ZodNumber; delta: z.ZodString; }, z.core.$strip>; export declare const OutputTextDoneEventSchema: z.ZodObject<{ type: z.ZodLiteral<"response.output_text.done">; item_id: z.ZodString; output_index: z.ZodNumber; content_index: z.ZodNumber; text: z.ZodString; }, z.core.$strip>; export type StreamingEvent = z.infer | z.infer | z.infer | z.infer | z.infer | z.infer | z.infer | z.infer | z.infer | z.infer;