diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 7838e1c4..80c63ae1 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,12 +1,12 @@ lockVersion: 2.0.0 id: 8b6cd71c-ea04-44da-af45-e43968b5928d management: - docChecksum: 21d34ad219f16d5944497a609bd0c936 + docChecksum: 49621e9bf67482e01c2be5fffeb0c319 docVersion: 1.0.0 - speakeasyVersion: 1.649.0 - generationVersion: 2.739.1 - releaseVersion: 0.1.2 - configChecksum: 657f662a39f93f0a04d95b548cf124fe + speakeasyVersion: 1.650.0 + generationVersion: 2.743.2 + releaseVersion: 0.1.3 + configChecksum: 63545a2e0664767bc4706b01fd016538 repoURL: https://github.com/OpenRouterTeam/typescript-sdk.git installationURL: https://github.com/OpenRouterTeam/typescript-sdk published: true @@ -15,7 +15,7 @@ features: acceptHeaders: 2.81.2 additionalDependencies: 0.1.0 constsAndDefaults: 0.1.12 - core: 3.26.0 + core: 3.26.3 customCodeRegions: 0.1.0 defaultEnabledRetries: 0.1.0 deprecations: 2.81.1 @@ -73,6 +73,7 @@ generatedFiles: - docs/models/chatmessagecontentitemimage.md - docs/models/chatmessagecontentitemimagedetail.md - docs/models/chatmessagecontentitemtext.md + - docs/models/chatmessagecontentitemvideo.md - docs/models/chatmessagetokenlogprob.md - docs/models/chatmessagetokenlogprobs.md - docs/models/chatmessagetoolcall.md @@ -475,9 +476,9 @@ generatedFiles: - docs/models/systemmessage.md - docs/models/systemmessagecontent.md - docs/models/tokenizer.md - - docs/models/tool.md - docs/models/toolcallstatus.md - - docs/models/toolfunction.md + - docs/models/tooldefinitionjson.md + - docs/models/tooldefinitionjsonfunction.md - docs/models/toolresponsemessage.md - docs/models/toolresponsemessagecontent.md - docs/models/toomanyrequestsresponseerrordata.md @@ -509,6 +510,7 @@ generatedFiles: - docs/models/usermessage.md - docs/models/usermessagecontent.md - docs/models/variables.md + - docs/models/videourl.md - docs/models/websearchpreviewtooluserlocation.md - docs/models/websearchpreviewtooluserlocationtype.md - docs/models/websearchstatus.md @@ -551,6 +553,7 @@ generatedFiles: - src/funcs/generationsGetGeneration.ts - src/funcs/modelsCount.ts - src/funcs/modelsList.ts + - src/funcs/modelsListEmbeddings.ts - src/funcs/modelsListForUser.ts - src/funcs/oAuthCreateAuthCode.ts - src/funcs/oAuthExchangeAuthCodeForAPIKey.ts @@ -589,6 +592,7 @@ generatedFiles: - src/models/chatmessagecontentitemaudio.ts - src/models/chatmessagecontentitemimage.ts - src/models/chatmessagecontentitemtext.ts + - src/models/chatmessagecontentitemvideo.ts - src/models/chatmessagetokenlogprob.ts - src/models/chatmessagetokenlogprobs.ts - src/models/chatmessagetoolcall.ts @@ -750,8 +754,8 @@ generatedFiles: - src/models/security.ts - src/models/serviceunavailableresponseerrordata.ts - src/models/systemmessage.ts - - src/models/tool.ts - src/models/toolcallstatus.ts + - src/models/tooldefinitionjson.ts - src/models/toolresponsemessage.ts - src/models/toomanyrequestsresponseerrordata.ts - src/models/topproviderinfo.ts @@ -782,6 +786,7 @@ generatedFiles: - src/react-query/index.ts - src/react-query/modelsCount.ts - src/react-query/modelsList.ts + - src/react-query/modelsListEmbeddings.ts - src/react-query/modelsListForUser.ts - src/react-query/oAuthCreateAuthCode.ts - src/react-query/oAuthExchangeAuthCodeForAPIKey.ts @@ -1523,7 +1528,7 @@ examples: id: "" responses: "200": - application/json: {"data": {"id": "gen-3bhGkxlo4XFrqiabUM7NDtwDzWwG", "upstream_id": "chatcmpl-791bcf62-080e-4568-87d0-94c72e3b4946", "total_cost": 0.0015, "cache_discount": 0.0002, "upstream_inference_cost": 0.0012, "created_at": "2024-07-15T23:33:19.433273+00:00", "model": "sao10k/l3-stheno-8b", "app_id": 12345, "streamed": true, "cancelled": false, "provider_name": "Infermatic", "latency": 1250, "moderation_latency": 50, "generation_time": 1200, "finish_reason": "stop", "tokens_prompt": 10, "tokens_completion": 25, "native_tokens_prompt": 10, "native_tokens_completion": 25, "native_tokens_completion_images": 0, "native_tokens_reasoning": 5, "native_tokens_cached": 3, "num_media_prompt": 1, "num_input_audio_prompt": 0, "num_video_prompt": 0, "num_media_completion": 0, "num_search_results": 5, "origin": "https://openrouter.ai/", "usage": 0.0015, "is_byok": false, "native_finish_reason": "stop", "external_user": "user-123", "api_type": "completions"}} + application/json: {"data": {"id": "gen-3bhGkxlo4XFrqiabUM7NDtwDzWwG", "upstream_id": "chatcmpl-791bcf62-080e-4568-87d0-94c72e3b4946", "total_cost": 0.0015, "cache_discount": 0.0002, "upstream_inference_cost": 0.0012, "created_at": "2024-07-15T23:33:19.433273+00:00", "model": "sao10k/l3-stheno-8b", "app_id": 12345, "streamed": true, "cancelled": false, "provider_name": "Infermatic", "latency": 1250, "moderation_latency": 50, "generation_time": 1200, "finish_reason": "stop", "tokens_prompt": 10, "tokens_completion": 25, "native_tokens_prompt": 10, "native_tokens_completion": 25, "native_tokens_completion_images": 0, "native_tokens_reasoning": 5, "native_tokens_cached": 3, "num_media_prompt": 1, "num_input_audio_prompt": 0, "num_media_completion": 0, "num_search_results": 5, "origin": "https://openrouter.ai/", "usage": 0.0015, "is_byok": false, "native_finish_reason": "stop", "external_user": "user-123", "api_type": "completions"}} default: application/json: {"error": {"code": 400, "message": "Invalid request parameters", "metadata": {"field": "temperature", "reason": "Must be between 0 and 2"}}, "user_id": "user-abc123"} 4XX: @@ -1790,4 +1795,13 @@ examples: application/json: {"error": {"code": 524, "message": "Request timed out. Please try again later."}} "529": application/json: {"error": {"code": 529, "message": "Provider returned error"}} + listModelsEmbeddings: + speakeasy-default-list-models-embeddings: + responses: + "200": + application/json: {"data": [{"id": "openai/gpt-4", "canonical_slug": "openai/gpt-4", "name": "GPT-4", "created": 1692901234, "pricing": {"prompt": "0.00003", "completion": "0.00006"}, "context_length": 8192, "architecture": {"modality": "text->text", "input_modalities": ["text"], "output_modalities": ["text"]}, "top_provider": {"is_moderated": true}, "per_request_limits": null, "supported_parameters": ["temperature", "top_p", "max_tokens", "frequency_penalty", "presence_penalty"], "default_parameters": null}]} + "400": + application/json: {"error": {"code": 400, "message": "Invalid request parameters"}} + "500": + application/json: {"error": {"code": 500, "message": "Internal Server Error"}} examplesVersion: 1.0.2 diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index a13296af..41509096 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -24,12 +24,13 @@ generation: sdkHooksConfigAccess: true schemas: allOfMergeStrategy: shallowMerge + requestBodyFieldName: "" tests: generateTests: false generateNewTests: true skipResponseBodyAssertions: false typescript: - version: 0.1.2 + version: 0.1.3 acceptHeaderEnum: false additionalDependencies: dependencies: {} @@ -40,6 +41,7 @@ typescript: peerDependencies: {} additionalPackageJSON: {} additionalScripts: {} + alwaysIncludeInboundAndOutbound: false author: OpenRouter baseErrorName: OpenRouterError clientServerStatusCodesAsErrors: true @@ -50,6 +52,7 @@ typescript: enableReactQuery: true enumFormat: union envVarPrefix: OPENROUTER + exportZodModelNamespace: false flattenGlobalSecurity: true flatteningOrder: parameters-first generateExamples: true diff --git a/.speakeasy/in.openapi.yaml b/.speakeasy/in.openapi.yaml index 92d03ac2..b141c31d 100644 --- a/.speakeasy/in.openapi.yaml +++ b/.speakeasy/in.openapi.yaml @@ -4798,16 +4798,26 @@ components: total_tokens: type: number completion_tokens_details: - type: object - properties: - reasoning_tokens: - type: number - audio_tokens: - type: number - accepted_prediction_tokens: - type: number - rejected_prediction_tokens: - type: number + anyOf: + - type: object + properties: + reasoning_tokens: + anyOf: + - type: number + - type: 'null' + audio_tokens: + anyOf: + - type: number + - type: 'null' + accepted_prediction_tokens: + anyOf: + - type: number + - type: 'null' + rejected_prediction_tokens: + anyOf: + - type: number + - type: 'null' + - type: 'null' prompt_tokens_details: anyOf: - type: object diff --git a/.speakeasy/out.openapi.yaml b/.speakeasy/out.openapi.yaml index c879271c..2897e797 100644 --- a/.speakeasy/out.openapi.yaml +++ b/.speakeasy/out.openapi.yaml @@ -4705,11 +4705,28 @@ components: required: - type - input_audio + ChatMessageContentItemVideo: + type: object + properties: + type: + type: string + const: input_video + video_url: + type: object + properties: + url: + type: string + required: + - url + required: + - type + - video_url ChatMessageContentItem: oneOf: - $ref: '#/components/schemas/ChatMessageContentItemText' - $ref: '#/components/schemas/ChatMessageContentItemImage' - $ref: '#/components/schemas/ChatMessageContentItemAudio' + - $ref: '#/components/schemas/ChatMessageContentItemVideo' type: object discriminator: propertyName: type @@ -4717,6 +4734,7 @@ components: text: '#/components/schemas/ChatMessageContentItemText' image_url: '#/components/schemas/ChatMessageContentItemImage' input_audio: '#/components/schemas/ChatMessageContentItemAudio' + input_video: '#/components/schemas/ChatMessageContentItemVideo' ChatMessageToolCall: type: object properties: @@ -4804,16 +4822,26 @@ components: total_tokens: type: number completion_tokens_details: - type: object - properties: - reasoning_tokens: - type: number - audio_tokens: - type: number - accepted_prediction_tokens: - type: number - rejected_prediction_tokens: - type: number + anyOf: + - type: object + properties: + reasoning_tokens: + anyOf: + - type: number + - type: 'null' + audio_tokens: + anyOf: + - type: number + - type: 'null' + accepted_prediction_tokens: + anyOf: + - type: number + - type: 'null' + rejected_prediction_tokens: + anyOf: + - type: number + - type: 'null' + - type: 'null' prompt_tokens_details: anyOf: - type: object @@ -4982,7 +5010,7 @@ components: - $ref: '#/components/schemas/AssistantMessage' - $ref: '#/components/schemas/ToolResponseMessage' type: object - Tool: + ToolDefinitionJson: type: object properties: type: @@ -5177,7 +5205,7 @@ components: tools: type: array items: - $ref: '#/components/schemas/Tool' + $ref: '#/components/schemas/ToolDefinitionJson' top_p: default: 1 anyOf: @@ -6370,11 +6398,6 @@ paths: nullable: true description: Number of audio inputs in the prompt example: 0 - num_video_prompt: - type: number - nullable: true - description: Number of video inputs in the prompt - example: 0 num_media_completion: type: number nullable: true @@ -6440,7 +6463,6 @@ paths: - native_tokens_cached - num_media_prompt - num_input_audio_prompt - - num_video_prompt - num_media_completion - num_search_results - origin @@ -6559,6 +6581,33 @@ paths: schema: $ref: '#/components/schemas/InternalServerResponse' operationId: getModels + /models/embeddings: + get: + tags: + - Models + x-speakeasy-name-override: listEmbeddings + summary: List all embeddings models + description: Returns a list of all available embeddings models and their properties + responses: + '200': + description: Returns a list of embeddings models + content: + application/json: + schema: + $ref: '#/components/schemas/ModelsListResponse' + '400': + description: Bad Request - Invalid request parameters + content: + application/json: + schema: + $ref: '#/components/schemas/BadRequestResponse' + '500': + description: Internal Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/InternalServerResponse' + operationId: listModelsEmbeddings /models/user: get: tags: diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index aef310d6..3a34c340 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,21 +1,21 @@ -speakeasyVersion: 1.649.0 +speakeasyVersion: 1.650.0 sources: OpenRouter API: sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:64795ed6576394aed3f6017e7251cbbba10dbea815eed59704d3f181636acf83 - sourceBlobDigest: sha256:8b649cac738303293760c8dc40d56c068cd3d7d3a1a02ec193701759dc723b79 + sourceRevisionDigest: sha256:602ebe32972d3a9f71ad7818b56e0fac7186a4e9daae697f9089ed2e6ddad8b5 + sourceBlobDigest: sha256:bef8a7311b8c8cd0a18ffff29b615130fbc50b538d7214727d72f188c6882daf tags: - latest - - speakeasy-sdk-regen-1762302715 + - staging - 1.0.0 targets: openrouter: source: OpenRouter API sourceNamespace: open-router-chat-completions-api - sourceRevisionDigest: sha256:64795ed6576394aed3f6017e7251cbbba10dbea815eed59704d3f181636acf83 - sourceBlobDigest: sha256:8b649cac738303293760c8dc40d56c068cd3d7d3a1a02ec193701759dc723b79 + sourceRevisionDigest: sha256:602ebe32972d3a9f71ad7818b56e0fac7186a4e9daae697f9089ed2e6ddad8b5 + sourceBlobDigest: sha256:bef8a7311b8c8cd0a18ffff29b615130fbc50b538d7214727d72f188c6882daf codeSamplesNamespace: open-router-chat-completions-api-typescript-code-samples - codeSamplesRevisionDigest: sha256:fc787535052e58546c4c1072c8041d631afc15b532f221dd989dea203fe85454 + codeSamplesRevisionDigest: sha256:c28a52583bcb017b39fb134f0515aba9475dd31ba61c230ddd3b512b237b1e8f workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/docs/models/chatgenerationparams.md b/docs/models/chatgenerationparams.md index 12e24b3b..c5ec4b35 100644 --- a/docs/models/chatgenerationparams.md +++ b/docs/models/chatgenerationparams.md @@ -17,27 +17,27 @@ let value: ChatGenerationParams = { ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | -| `messages` | *models.Message*[] | :heavy_check_mark: | N/A | -| `model` | *string* | :heavy_minus_sign: | N/A | -| `models` | *string*[] | :heavy_minus_sign: | N/A | -| `frequencyPenalty` | *number* | :heavy_minus_sign: | N/A | -| `logitBias` | Record | :heavy_minus_sign: | N/A | -| `logprobs` | *boolean* | :heavy_minus_sign: | N/A | -| `topLogprobs` | *number* | :heavy_minus_sign: | N/A | -| `maxCompletionTokens` | *number* | :heavy_minus_sign: | N/A | -| `maxTokens` | *number* | :heavy_minus_sign: | N/A | -| `metadata` | Record | :heavy_minus_sign: | N/A | -| `presencePenalty` | *number* | :heavy_minus_sign: | N/A | -| `reasoning` | [models.Reasoning](../models/reasoning.md) | :heavy_minus_sign: | N/A | -| `responseFormat` | *models.ChatGenerationParamsResponseFormatUnion* | :heavy_minus_sign: | N/A | -| `seed` | *number* | :heavy_minus_sign: | N/A | -| `stop` | *models.ChatGenerationParamsStop* | :heavy_minus_sign: | N/A | -| `stream` | *boolean* | :heavy_minus_sign: | N/A | -| `streamOptions` | [models.ChatStreamOptions](../models/chatstreamoptions.md) | :heavy_minus_sign: | N/A | -| `temperature` | *number* | :heavy_minus_sign: | N/A | -| `toolChoice` | *any* | :heavy_minus_sign: | N/A | -| `tools` | [models.Tool](../models/tool.md)[] | :heavy_minus_sign: | N/A | -| `topP` | *number* | :heavy_minus_sign: | N/A | -| `user` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | +| `messages` | *models.Message*[] | :heavy_check_mark: | N/A | +| `model` | *string* | :heavy_minus_sign: | N/A | +| `models` | *string*[] | :heavy_minus_sign: | N/A | +| `frequencyPenalty` | *number* | :heavy_minus_sign: | N/A | +| `logitBias` | Record | :heavy_minus_sign: | N/A | +| `logprobs` | *boolean* | :heavy_minus_sign: | N/A | +| `topLogprobs` | *number* | :heavy_minus_sign: | N/A | +| `maxCompletionTokens` | *number* | :heavy_minus_sign: | N/A | +| `maxTokens` | *number* | :heavy_minus_sign: | N/A | +| `metadata` | Record | :heavy_minus_sign: | N/A | +| `presencePenalty` | *number* | :heavy_minus_sign: | N/A | +| `reasoning` | [models.Reasoning](../models/reasoning.md) | :heavy_minus_sign: | N/A | +| `responseFormat` | *models.ChatGenerationParamsResponseFormatUnion* | :heavy_minus_sign: | N/A | +| `seed` | *number* | :heavy_minus_sign: | N/A | +| `stop` | *models.ChatGenerationParamsStop* | :heavy_minus_sign: | N/A | +| `stream` | *boolean* | :heavy_minus_sign: | N/A | +| `streamOptions` | [models.ChatStreamOptions](../models/chatstreamoptions.md) | :heavy_minus_sign: | N/A | +| `temperature` | *number* | :heavy_minus_sign: | N/A | +| `toolChoice` | *any* | :heavy_minus_sign: | N/A | +| `tools` | [models.ToolDefinitionJson](../models/tooldefinitionjson.md)[] | :heavy_minus_sign: | N/A | +| `topP` | *number* | :heavy_minus_sign: | N/A | +| `user` | *string* | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/chatmessagecontentitem.md b/docs/models/chatmessagecontentitem.md index 5e04a604..273f186d 100644 --- a/docs/models/chatmessagecontentitem.md +++ b/docs/models/chatmessagecontentitem.md @@ -35,3 +35,14 @@ const value: models.ChatMessageContentItemAudio = { }; ``` +### `models.ChatMessageContentItemVideo` + +```typescript +const value: models.ChatMessageContentItemVideo = { + type: "input_video", + videoUrl: { + url: "https://imaginative-mousse.org", + }, +}; +``` + diff --git a/docs/models/chatmessagecontentitemvideo.md b/docs/models/chatmessagecontentitemvideo.md new file mode 100644 index 00000000..96ac2105 --- /dev/null +++ b/docs/models/chatmessagecontentitemvideo.md @@ -0,0 +1,21 @@ +# ChatMessageContentItemVideo + +## Example Usage + +```typescript +import { ChatMessageContentItemVideo } from "@openrouter/sdk/models"; + +let value: ChatMessageContentItemVideo = { + type: "input_video", + videoUrl: { + url: "https://imaginative-mousse.org", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | ---------------------------------------- | +| `type` | *string* | :heavy_check_mark: | N/A | +| `videoUrl` | [models.VideoUrl](../models/videourl.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/getgenerationdata.md b/docs/models/operations/getgenerationdata.md index 7b452b23..83bd5d01 100644 --- a/docs/models/operations/getgenerationdata.md +++ b/docs/models/operations/getgenerationdata.md @@ -32,7 +32,6 @@ let value: GetGenerationData = { nativeTokensCached: 3, numMediaPrompt: 1, numInputAudioPrompt: 0, - numVideoPrompt: 0, numMediaCompletion: 0, numSearchResults: 5, origin: "https://openrouter.ai/", @@ -72,7 +71,6 @@ let value: GetGenerationData = { | `nativeTokensCached` | *number* | :heavy_check_mark: | Native cached tokens as reported by provider | 3 | | `numMediaPrompt` | *number* | :heavy_check_mark: | Number of media items in the prompt | 1 | | `numInputAudioPrompt` | *number* | :heavy_check_mark: | Number of audio inputs in the prompt | 0 | -| `numVideoPrompt` | *number* | :heavy_check_mark: | Number of video inputs in the prompt | 0 | | `numMediaCompletion` | *number* | :heavy_check_mark: | Number of media items in the completion | 0 | | `numSearchResults` | *number* | :heavy_check_mark: | Number of search results included | 5 | | `origin` | *string* | :heavy_check_mark: | Origin URL of the request | https://openrouter.ai/ | diff --git a/docs/models/operations/getgenerationresponse.md b/docs/models/operations/getgenerationresponse.md index d91e310f..5a382037 100644 --- a/docs/models/operations/getgenerationresponse.md +++ b/docs/models/operations/getgenerationresponse.md @@ -33,7 +33,6 @@ let value: GetGenerationResponse = { nativeTokensCached: 3, numMediaPrompt: 1, numInputAudioPrompt: 0, - numVideoPrompt: 0, numMediaCompletion: 0, numSearchResults: 5, origin: "https://openrouter.ai/", diff --git a/docs/models/tool.md b/docs/models/tool.md deleted file mode 100644 index 8cce2b1c..00000000 --- a/docs/models/tool.md +++ /dev/null @@ -1,21 +0,0 @@ -# Tool - -## Example Usage - -```typescript -import { Tool } from "@openrouter/sdk/models"; - -let value: Tool = { - type: "function", - function: { - name: "", - }, -}; -``` - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | -| `type` | *string* | :heavy_check_mark: | N/A | -| `function` | [models.ToolFunction](../models/toolfunction.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/tooldefinitionjson.md b/docs/models/tooldefinitionjson.md new file mode 100644 index 00000000..7a0360f0 --- /dev/null +++ b/docs/models/tooldefinitionjson.md @@ -0,0 +1,21 @@ +# ToolDefinitionJson + +## Example Usage + +```typescript +import { ToolDefinitionJson } from "@openrouter/sdk/models"; + +let value: ToolDefinitionJson = { + type: "function", + function: { + name: "", + }, +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `type` | *string* | :heavy_check_mark: | N/A | +| `function` | [models.ToolDefinitionJsonFunction](../models/tooldefinitionjsonfunction.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/toolfunction.md b/docs/models/tooldefinitionjsonfunction.md similarity index 82% rename from docs/models/toolfunction.md rename to docs/models/tooldefinitionjsonfunction.md index e336f196..645a829d 100644 --- a/docs/models/toolfunction.md +++ b/docs/models/tooldefinitionjsonfunction.md @@ -1,11 +1,11 @@ -# ToolFunction +# ToolDefinitionJsonFunction ## Example Usage ```typescript -import { ToolFunction } from "@openrouter/sdk/models"; +import { ToolDefinitionJsonFunction } from "@openrouter/sdk/models"; -let value: ToolFunction = { +let value: ToolDefinitionJsonFunction = { name: "", }; ``` diff --git a/docs/models/videourl.md b/docs/models/videourl.md new file mode 100644 index 00000000..99f2f67d --- /dev/null +++ b/docs/models/videourl.md @@ -0,0 +1,17 @@ +# VideoUrl + +## Example Usage + +```typescript +import { VideoUrl } from "@openrouter/sdk/models"; + +let value: VideoUrl = { + url: "https://tangible-extent.net/", +}; +``` + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `url` | *string* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdks/models/README.md b/docs/sdks/models/README.md index 39fe2982..ff887557 100644 --- a/docs/sdks/models/README.md +++ b/docs/sdks/models/README.md @@ -9,6 +9,7 @@ Model information endpoints * [count](#count) - Get total count of available models * [list](#list) - List all models and their properties +* [listEmbeddings](#listembeddings) - List all embeddings models * [listForUser](#listforuser) - List models filtered by user provider preferences ## count @@ -206,6 +207,103 @@ import { | errors.InternalServerResponseError | 500 | application/json | | errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* | +## listEmbeddings + +Returns a list of all available embeddings models and their properties + +### Example Usage + + +```typescript +import { OpenRouter } from "@openrouter/sdk"; + +const openRouter = new OpenRouter({ + apiKey: process.env["OPENROUTER_API_KEY"] ?? "", +}); + +async function run() { + const result = await openRouter.models.listEmbeddings(); + + console.log(result); +} + +run(); +``` + +### Standalone function + +The standalone function version of this method: + +```typescript +import { OpenRouterCore } from "@openrouter/sdk/core.js"; +import { modelsListEmbeddings } from "@openrouter/sdk/funcs/modelsListEmbeddings.js"; + +// Use `OpenRouterCore` for best tree-shaking performance. +// You can create one instance of it to use across an application. +const openRouter = new OpenRouterCore({ + apiKey: process.env["OPENROUTER_API_KEY"] ?? "", +}); + +async function run() { + const res = await modelsListEmbeddings(openRouter); + if (res.ok) { + const { value: result } = res; + console.log(result); + } else { + console.log("modelsListEmbeddings failed:", res.error); + } +} + +run(); +``` + +### React hooks and utilities + +This method can be used in React components through the following hooks and +associated utilities. + +> Check out [this guide][hook-guide] for information about each of the utilities +> below and how to get started using React hooks. + +[hook-guide]: ../../../REACT_QUERY.md + +```tsx +import { + // Query hooks for fetching data. + useModelsListEmbeddings, + useModelsListEmbeddingsSuspense, + + // Utility for prefetching data during server-side rendering and in React + // Server Components that will be immediately available to client components + // using the hooks. + prefetchModelsListEmbeddings, + + // Utility to invalidate the query cache for this query in response to + // mutations and other user actions. + invalidateAllModelsListEmbeddings, +} from "@openrouter/sdk/react-query/modelsListEmbeddings.js"; +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. | +| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. | +| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. | + +### Response + +**Promise\<[models.ModelsListResponse](../../models/modelslistresponse.md)\>** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | +| errors.BadRequestResponseError | 400 | application/json | +| errors.InternalServerResponseError | 500 | application/json | +| errors.OpenRouterDefaultError | 4XX, 5XX | \*/\* | + ## listForUser List models filtered by user provider preferences diff --git a/examples/nextjs-example/package-lock.json b/examples/nextjs-example/package-lock.json index 99b6b50f..045e0aad 100644 --- a/examples/nextjs-example/package-lock.json +++ b/examples/nextjs-example/package-lock.json @@ -36,7 +36,7 @@ }, "../..": { "name": "@openrouter/sdk", - "version": "0.1.1", + "version": "0.1.3", "dependencies": { "zod": "^3.25.0 || ^4.0.0" }, diff --git a/jsr.json b/jsr.json index 40ba0ffe..6b40889e 100644 --- a/jsr.json +++ b/jsr.json @@ -2,7 +2,7 @@ { "name": "@openrouter/sdk", - "version": "0.1.2", + "version": "0.1.3", "exports": { ".": "./src/index.ts", "./models/errors": "./src/models/errors/index.ts", diff --git a/package-lock.json b/package-lock.json index bad3739a..4c336f98 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@openrouter/sdk", - "version": "0.1.2", + "version": "0.1.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@openrouter/sdk", - "version": "0.1.2", + "version": "0.1.3", "dependencies": { "zod": "^3.25.0 || ^4.0.0" }, diff --git a/package.json b/package.json index c478f897..89b753cb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@openrouter/sdk", - "version": "0.1.2", + "version": "0.1.3", "author": "OpenRouter", "type": "module", "main": "./esm/index.js", diff --git a/src/funcs/modelsListEmbeddings.ts b/src/funcs/modelsListEmbeddings.ts new file mode 100644 index 00000000..67475ee8 --- /dev/null +++ b/src/funcs/modelsListEmbeddings.ts @@ -0,0 +1,155 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { OpenRouterCore } from "../core.js"; +import * as M from "../lib/matchers.js"; +import { compactMap } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js"; +import { pathToFunc } from "../lib/url.js"; +import { + ConnectionError, + InvalidRequestError, + RequestAbortedError, + RequestTimeoutError, + UnexpectedClientError, +} from "../models/errors/httpclienterrors.js"; +import * as errors from "../models/errors/index.js"; +import { OpenRouterError } from "../models/errors/openroutererror.js"; +import { ResponseValidationError } from "../models/errors/responsevalidationerror.js"; +import { SDKValidationError } from "../models/errors/sdkvalidationerror.js"; +import * as models from "../models/index.js"; +import { APICall, APIPromise } from "../types/async.js"; +import { Result } from "../types/fp.js"; + +/** + * List all embeddings models + * + * @remarks + * Returns a list of all available embeddings models and their properties + */ +export function modelsListEmbeddings( + client: OpenRouterCore, + options?: RequestOptions, +): APIPromise< + Result< + models.ModelsListResponse, + | errors.BadRequestResponseError + | errors.InternalServerResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + > +> { + return new APIPromise($do( + client, + options, + )); +} + +async function $do( + client: OpenRouterCore, + options?: RequestOptions, +): Promise< + [ + Result< + models.ModelsListResponse, + | errors.BadRequestResponseError + | errors.InternalServerResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >, + APICall, + ] +> { + const path = pathToFunc("/models/embeddings")(); + + const headers = new Headers(compactMap({ + Accept: "application/json", + })); + + const secConfig = await extractSecurity(client._options.apiKey); + const securityInput = secConfig == null ? {} : { apiKey: secConfig }; + const requestSecurity = resolveGlobalSecurity(securityInput); + + const context = { + options: client._options, + baseURL: options?.serverURL ?? client._baseURL ?? "", + operationID: "listModelsEmbeddings", + oAuth2Scopes: null, + + resolvedSecurity: requestSecurity, + + securitySource: client._options.apiKey, + retryConfig: options?.retries + || client._options.retryConfig + || { strategy: "none" }, + retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"], + }; + + const requestRes = client._createRequest(context, { + security: requestSecurity, + method: "GET", + baseURL: options?.serverURL, + path: path, + headers: headers, + userAgent: client._options.userAgent, + timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1, + }, options); + if (!requestRes.ok) { + return [requestRes, { status: "invalid" }]; + } + const req = requestRes.value; + + const doResult = await client._do(req, { + context, + errorCodes: ["400", "4XX", "500", "5XX"], + retryConfig: context.retryConfig, + retryCodes: context.retryCodes, + }); + if (!doResult.ok) { + return [doResult, { status: "request-error", request: req }]; + } + const response = doResult.value; + + const responseFields = { + HttpMeta: { Response: response, Request: req }, + }; + + const [result] = await M.match< + models.ModelsListResponse, + | errors.BadRequestResponseError + | errors.InternalServerResponseError + | OpenRouterError + | ResponseValidationError + | ConnectionError + | RequestAbortedError + | RequestTimeoutError + | InvalidRequestError + | UnexpectedClientError + | SDKValidationError + >( + M.json(200, models.ModelsListResponse$inboundSchema), + M.jsonErr(400, errors.BadRequestResponseError$inboundSchema), + M.jsonErr(500, errors.InternalServerResponseError$inboundSchema), + M.fail("4XX"), + M.fail("5XX"), + )(response, req, { extraFields: responseFields }); + if (!result.ok) { + return [result, { status: "complete", request: req, response }]; + } + + return [result, { status: "complete", request: req, response }]; +} diff --git a/src/lib/config.ts b/src/lib/config.ts index 3ccf21d6..b7743b50 100644 --- a/src/lib/config.ts +++ b/src/lib/config.ts @@ -59,7 +59,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null { export const SDK_METADATA = { language: "typescript", openapiDocVersion: "1.0.0", - sdkVersion: "0.1.2", - genVersion: "2.739.1", - userAgent: "speakeasy-sdk/typescript 0.1.2 2.739.1 1.0.0 @openrouter/sdk", + sdkVersion: "0.1.3", + genVersion: "2.743.2", + userAgent: "speakeasy-sdk/typescript 0.1.3 2.743.2 1.0.0 @openrouter/sdk", } as const; diff --git a/src/models/activityitem.ts b/src/models/activityitem.ts index f55ff9aa..435bfdf1 100644 --- a/src/models/activityitem.ts +++ b/src/models/activityitem.ts @@ -81,66 +81,6 @@ export const ActivityItem$inboundSchema: z.ZodType = z }); }); -/** @internal */ -export type ActivityItem$Outbound = { - date: string; - model: string; - model_permaslug: string; - endpoint_id: string; - provider_name: string; - usage: number; - byok_usage_inference: number; - requests: number; - prompt_tokens: number; - completion_tokens: number; - reasoning_tokens: number; -}; - -/** @internal */ -export const ActivityItem$outboundSchema: z.ZodType< - ActivityItem$Outbound, - ActivityItem -> = z.object({ - date: z.string(), - model: z.string(), - modelPermaslug: z.string(), - endpointId: z.string(), - providerName: z.string(), - usage: z.number(), - byokUsageInference: z.number(), - requests: z.number(), - promptTokens: z.number(), - completionTokens: z.number(), - reasoningTokens: z.number(), -}).transform((v) => { - return remap$(v, { - modelPermaslug: "model_permaslug", - endpointId: "endpoint_id", - providerName: "provider_name", - byokUsageInference: "byok_usage_inference", - promptTokens: "prompt_tokens", - completionTokens: "completion_tokens", - reasoningTokens: "reasoning_tokens", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ActivityItem$ { - /** @deprecated use `ActivityItem$inboundSchema` instead. */ - export const inboundSchema = ActivityItem$inboundSchema; - /** @deprecated use `ActivityItem$outboundSchema` instead. */ - export const outboundSchema = ActivityItem$outboundSchema; - /** @deprecated use `ActivityItem$Outbound` instead. */ - export type Outbound = ActivityItem$Outbound; -} - -export function activityItemToJSON(activityItem: ActivityItem): string { - return JSON.stringify(ActivityItem$outboundSchema.parse(activityItem)); -} - export function activityItemFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/assistantmessage.ts b/src/models/assistantmessage.ts index ddcf8c71..568292c4 100644 --- a/src/models/assistantmessage.ts +++ b/src/models/assistantmessage.ts @@ -36,7 +36,6 @@ export const AssistantMessageContent$inboundSchema: z.ZodType< AssistantMessageContent, unknown > = z.union([z.string(), z.array(ChatMessageContentItem$inboundSchema)]); - /** @internal */ export type AssistantMessageContent$Outbound = | string @@ -48,19 +47,6 @@ export const AssistantMessageContent$outboundSchema: z.ZodType< AssistantMessageContent > = z.union([z.string(), z.array(ChatMessageContentItem$outboundSchema)]); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace AssistantMessageContent$ { - /** @deprecated use `AssistantMessageContent$inboundSchema` instead. */ - export const inboundSchema = AssistantMessageContent$inboundSchema; - /** @deprecated use `AssistantMessageContent$outboundSchema` instead. */ - export const outboundSchema = AssistantMessageContent$outboundSchema; - /** @deprecated use `AssistantMessageContent$Outbound` instead. */ - export type Outbound = AssistantMessageContent$Outbound; -} - export function assistantMessageContentToJSON( assistantMessageContent: AssistantMessageContent, ): string { @@ -68,7 +54,6 @@ export function assistantMessageContentToJSON( AssistantMessageContent$outboundSchema.parse(assistantMessageContent), ); } - export function assistantMessageContentFromJSON( jsonString: string, ): SafeParseResult { @@ -97,7 +82,6 @@ export const AssistantMessage$inboundSchema: z.ZodType< "tool_calls": "toolCalls", }); }); - /** @internal */ export type AssistantMessage$Outbound = { role: "assistant"; @@ -127,19 +111,6 @@ export const AssistantMessage$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace AssistantMessage$ { - /** @deprecated use `AssistantMessage$inboundSchema` instead. */ - export const inboundSchema = AssistantMessage$inboundSchema; - /** @deprecated use `AssistantMessage$outboundSchema` instead. */ - export const outboundSchema = AssistantMessage$outboundSchema; - /** @deprecated use `AssistantMessage$Outbound` instead. */ - export type Outbound = AssistantMessage$Outbound; -} - export function assistantMessageToJSON( assistantMessage: AssistantMessage, ): string { @@ -147,7 +118,6 @@ export function assistantMessageToJSON( AssistantMessage$outboundSchema.parse(assistantMessage), ); } - export function assistantMessageFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/badgatewayresponseerrordata.ts b/src/models/badgatewayresponseerrordata.ts index af8026d2..6d80e155 100644 --- a/src/models/badgatewayresponseerrordata.ts +++ b/src/models/badgatewayresponseerrordata.ts @@ -26,46 +26,6 @@ export const BadGatewayResponseErrorData$inboundSchema: z.ZodType< metadata: z.nullable(z.record(z.string(), z.nullable(z.any()))).optional(), }); -/** @internal */ -export type BadGatewayResponseErrorData$Outbound = { - code: number; - message: string; - metadata?: { [k: string]: any | null } | null | undefined; -}; - -/** @internal */ -export const BadGatewayResponseErrorData$outboundSchema: z.ZodType< - BadGatewayResponseErrorData$Outbound, - BadGatewayResponseErrorData -> = z.object({ - code: z.number().int(), - message: z.string(), - metadata: z.nullable(z.record(z.string(), z.nullable(z.any()))).optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace BadGatewayResponseErrorData$ { - /** @deprecated use `BadGatewayResponseErrorData$inboundSchema` instead. */ - export const inboundSchema = BadGatewayResponseErrorData$inboundSchema; - /** @deprecated use `BadGatewayResponseErrorData$outboundSchema` instead. */ - export const outboundSchema = BadGatewayResponseErrorData$outboundSchema; - /** @deprecated use `BadGatewayResponseErrorData$Outbound` instead. */ - export type Outbound = BadGatewayResponseErrorData$Outbound; -} - -export function badGatewayResponseErrorDataToJSON( - badGatewayResponseErrorData: BadGatewayResponseErrorData, -): string { - return JSON.stringify( - BadGatewayResponseErrorData$outboundSchema.parse( - badGatewayResponseErrorData, - ), - ); -} - export function badGatewayResponseErrorDataFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/badrequestresponseerrordata.ts b/src/models/badrequestresponseerrordata.ts index 9aa93031..cf4e8628 100644 --- a/src/models/badrequestresponseerrordata.ts +++ b/src/models/badrequestresponseerrordata.ts @@ -26,46 +26,6 @@ export const BadRequestResponseErrorData$inboundSchema: z.ZodType< metadata: z.nullable(z.record(z.string(), z.nullable(z.any()))).optional(), }); -/** @internal */ -export type BadRequestResponseErrorData$Outbound = { - code: number; - message: string; - metadata?: { [k: string]: any | null } | null | undefined; -}; - -/** @internal */ -export const BadRequestResponseErrorData$outboundSchema: z.ZodType< - BadRequestResponseErrorData$Outbound, - BadRequestResponseErrorData -> = z.object({ - code: z.number().int(), - message: z.string(), - metadata: z.nullable(z.record(z.string(), z.nullable(z.any()))).optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace BadRequestResponseErrorData$ { - /** @deprecated use `BadRequestResponseErrorData$inboundSchema` instead. */ - export const inboundSchema = BadRequestResponseErrorData$inboundSchema; - /** @deprecated use `BadRequestResponseErrorData$outboundSchema` instead. */ - export const outboundSchema = BadRequestResponseErrorData$outboundSchema; - /** @deprecated use `BadRequestResponseErrorData$Outbound` instead. */ - export type Outbound = BadRequestResponseErrorData$Outbound; -} - -export function badRequestResponseErrorDataToJSON( - badRequestResponseErrorData: BadRequestResponseErrorData, -): string { - return JSON.stringify( - BadRequestResponseErrorData$outboundSchema.parse( - badRequestResponseErrorData, - ), - ); -} - export function badRequestResponseErrorDataFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/chatcompletionfinishreason.ts b/src/models/chatcompletionfinishreason.ts index 7ae148ba..1ce53c45 100644 --- a/src/models/chatcompletionfinishreason.ts +++ b/src/models/chatcompletionfinishreason.ts @@ -3,11 +3,7 @@ */ import * as z from "zod/v4"; -import { - catchUnrecognizedEnum, - OpenEnum, - Unrecognized, -} from "../types/enums.js"; +import { catchUnrecognizedEnum, OpenEnum } from "../types/enums.js"; export const ChatCompletionFinishReason = { ToolCalls: "tool_calls", @@ -29,23 +25,3 @@ export const ChatCompletionFinishReason$inboundSchema: z.ZodType< z.enum(ChatCompletionFinishReason), z.string().transform(catchUnrecognizedEnum), ]); - -/** @internal */ -export const ChatCompletionFinishReason$outboundSchema: z.ZodType< - ChatCompletionFinishReason, - ChatCompletionFinishReason -> = z.union([ - z.enum(ChatCompletionFinishReason), - z.string().and(z.custom>()), -]); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ChatCompletionFinishReason$ { - /** @deprecated use `ChatCompletionFinishReason$inboundSchema` instead. */ - export const inboundSchema = ChatCompletionFinishReason$inboundSchema; - /** @deprecated use `ChatCompletionFinishReason$outboundSchema` instead. */ - export const outboundSchema = ChatCompletionFinishReason$outboundSchema; -} diff --git a/src/models/chaterror.ts b/src/models/chaterror.ts index 3394d1f3..62185e7a 100644 --- a/src/models/chaterror.ts +++ b/src/models/chaterror.ts @@ -22,32 +22,6 @@ export const Code$inboundSchema: z.ZodType = z.union([ z.number(), ]); -/** @internal */ -export type Code$Outbound = string | number; - -/** @internal */ -export const Code$outboundSchema: z.ZodType = z.union([ - z.string(), - z.number(), -]); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Code$ { - /** @deprecated use `Code$inboundSchema` instead. */ - export const inboundSchema = Code$inboundSchema; - /** @deprecated use `Code$outboundSchema` instead. */ - export const outboundSchema = Code$outboundSchema; - /** @deprecated use `Code$Outbound` instead. */ - export type Outbound = Code$Outbound; -} - -export function codeToJSON(code: Code): string { - return JSON.stringify(Code$outboundSchema.parse(code)); -} - export function codeFromJSON( jsonString: string, ): SafeParseResult { @@ -67,42 +41,6 @@ export const ChatErrorError$inboundSchema: z.ZodType = type: z.nullable(z.string()).optional(), }); -/** @internal */ -export type ChatErrorError$Outbound = { - code: string | number | null; - message: string; - param?: string | null | undefined; - type?: string | null | undefined; -}; - -/** @internal */ -export const ChatErrorError$outboundSchema: z.ZodType< - ChatErrorError$Outbound, - ChatErrorError -> = z.object({ - code: z.nullable(z.union([z.string(), z.number()])), - message: z.string(), - param: z.nullable(z.string()).optional(), - type: z.nullable(z.string()).optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ChatErrorError$ { - /** @deprecated use `ChatErrorError$inboundSchema` instead. */ - export const inboundSchema = ChatErrorError$inboundSchema; - /** @deprecated use `ChatErrorError$outboundSchema` instead. */ - export const outboundSchema = ChatErrorError$outboundSchema; - /** @deprecated use `ChatErrorError$Outbound` instead. */ - export type Outbound = ChatErrorError$Outbound; -} - -export function chatErrorErrorToJSON(chatErrorError: ChatErrorError): string { - return JSON.stringify(ChatErrorError$outboundSchema.parse(chatErrorError)); -} - export function chatErrorErrorFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/chatgenerationparams.ts b/src/models/chatgenerationparams.ts index ffd3abb8..08567d54 100644 --- a/src/models/chatgenerationparams.ts +++ b/src/models/chatgenerationparams.ts @@ -4,49 +4,36 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { - catchUnrecognizedEnum, - OpenEnum, - Unrecognized, -} from "../types/enums.js"; -import { Result as SafeParseResult } from "../types/fp.js"; +import { OpenEnum, Unrecognized } from "../types/enums.js"; import { ChatStreamOptions, - ChatStreamOptions$inboundSchema, ChatStreamOptions$Outbound, ChatStreamOptions$outboundSchema, } from "./chatstreamoptions.js"; -import { SDKValidationError } from "./errors/sdkvalidationerror.js"; import { Message, - Message$inboundSchema, Message$Outbound, Message$outboundSchema, } from "./message.js"; import { ReasoningSummaryVerbosity, - ReasoningSummaryVerbosity$inboundSchema, ReasoningSummaryVerbosity$outboundSchema, } from "./reasoningsummaryverbosity.js"; import { ResponseFormatJSONSchema, - ResponseFormatJSONSchema$inboundSchema, ResponseFormatJSONSchema$Outbound, ResponseFormatJSONSchema$outboundSchema, } from "./responseformatjsonschema.js"; import { ResponseFormatTextGrammar, - ResponseFormatTextGrammar$inboundSchema, ResponseFormatTextGrammar$Outbound, ResponseFormatTextGrammar$outboundSchema, } from "./responseformattextgrammar.js"; import { - Tool, - Tool$inboundSchema, - Tool$Outbound, - Tool$outboundSchema, -} from "./tool.js"; + ToolDefinitionJson, + ToolDefinitionJson$Outbound, + ToolDefinitionJson$outboundSchema, +} from "./tooldefinitionjson.js"; export const Effort = { Minimal: "minimal", @@ -108,41 +95,17 @@ export type ChatGenerationParams = { streamOptions?: ChatStreamOptions | null | undefined; temperature?: number | null | undefined; toolChoice?: any | undefined; - tools?: Array | undefined; + tools?: Array | undefined; topP?: number | null | undefined; user?: string | undefined; }; -/** @internal */ -export const Effort$inboundSchema: z.ZodType = z - .union([ - z.enum(Effort), - z.string().transform(catchUnrecognizedEnum), - ]); - /** @internal */ export const Effort$outboundSchema: z.ZodType = z.union([ z.enum(Effort), z.string().and(z.custom>()), ]); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Effort$ { - /** @deprecated use `Effort$inboundSchema` instead. */ - export const inboundSchema = Effort$inboundSchema; - /** @deprecated use `Effort$outboundSchema` instead. */ - export const outboundSchema = Effort$outboundSchema; -} - -/** @internal */ -export const Reasoning$inboundSchema: z.ZodType = z.object({ - effort: z.nullable(Effort$inboundSchema).optional(), - summary: z.nullable(ReasoningSummaryVerbosity$inboundSchema).optional(), -}); - /** @internal */ export type Reasoning$Outbound = { effort?: string | null | undefined; @@ -158,41 +121,10 @@ export const Reasoning$outboundSchema: z.ZodType< summary: z.nullable(ReasoningSummaryVerbosity$outboundSchema).optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Reasoning$ { - /** @deprecated use `Reasoning$inboundSchema` instead. */ - export const inboundSchema = Reasoning$inboundSchema; - /** @deprecated use `Reasoning$outboundSchema` instead. */ - export const outboundSchema = Reasoning$outboundSchema; - /** @deprecated use `Reasoning$Outbound` instead. */ - export type Outbound = Reasoning$Outbound; -} - export function reasoningToJSON(reasoning: Reasoning): string { return JSON.stringify(Reasoning$outboundSchema.parse(reasoning)); } -export function reasoningFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Reasoning$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Reasoning' from JSON`, - ); -} - -/** @internal */ -export const ChatGenerationParamsResponseFormatPython$inboundSchema: z.ZodType< - ChatGenerationParamsResponseFormatPython, - unknown -> = z.object({ - type: z.literal("python"), -}); - /** @internal */ export type ChatGenerationParamsResponseFormatPython$Outbound = { type: "python"; @@ -206,21 +138,6 @@ export const ChatGenerationParamsResponseFormatPython$outboundSchema: z.ZodType< type: z.literal("python"), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ChatGenerationParamsResponseFormatPython$ { - /** @deprecated use `ChatGenerationParamsResponseFormatPython$inboundSchema` instead. */ - export const inboundSchema = - ChatGenerationParamsResponseFormatPython$inboundSchema; - /** @deprecated use `ChatGenerationParamsResponseFormatPython$outboundSchema` instead. */ - export const outboundSchema = - ChatGenerationParamsResponseFormatPython$outboundSchema; - /** @deprecated use `ChatGenerationParamsResponseFormatPython$Outbound` instead. */ - export type Outbound = ChatGenerationParamsResponseFormatPython$Outbound; -} - export function chatGenerationParamsResponseFormatPythonToJSON( chatGenerationParamsResponseFormatPython: ChatGenerationParamsResponseFormatPython, @@ -232,28 +149,6 @@ export function chatGenerationParamsResponseFormatPythonToJSON( ); } -export function chatGenerationParamsResponseFormatPythonFromJSON( - jsonString: string, -): SafeParseResult< - ChatGenerationParamsResponseFormatPython, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - ChatGenerationParamsResponseFormatPython$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'ChatGenerationParamsResponseFormatPython' from JSON`, - ); -} - -/** @internal */ -export const ChatGenerationParamsResponseFormatJSONObject$inboundSchema: - z.ZodType = z.object({ - type: z.literal("json_object"), - }); - /** @internal */ export type ChatGenerationParamsResponseFormatJSONObject$Outbound = { type: "json_object"; @@ -268,21 +163,6 @@ export const ChatGenerationParamsResponseFormatJSONObject$outboundSchema: type: z.literal("json_object"), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ChatGenerationParamsResponseFormatJSONObject$ { - /** @deprecated use `ChatGenerationParamsResponseFormatJSONObject$inboundSchema` instead. */ - export const inboundSchema = - ChatGenerationParamsResponseFormatJSONObject$inboundSchema; - /** @deprecated use `ChatGenerationParamsResponseFormatJSONObject$outboundSchema` instead. */ - export const outboundSchema = - ChatGenerationParamsResponseFormatJSONObject$outboundSchema; - /** @deprecated use `ChatGenerationParamsResponseFormatJSONObject$Outbound` instead. */ - export type Outbound = ChatGenerationParamsResponseFormatJSONObject$Outbound; -} - export function chatGenerationParamsResponseFormatJSONObjectToJSON( chatGenerationParamsResponseFormatJSONObject: ChatGenerationParamsResponseFormatJSONObject, @@ -294,30 +174,6 @@ export function chatGenerationParamsResponseFormatJSONObjectToJSON( ); } -export function chatGenerationParamsResponseFormatJSONObjectFromJSON( - jsonString: string, -): SafeParseResult< - ChatGenerationParamsResponseFormatJSONObject, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - ChatGenerationParamsResponseFormatJSONObject$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'ChatGenerationParamsResponseFormatJSONObject' from JSON`, - ); -} - -/** @internal */ -export const ChatGenerationParamsResponseFormatText$inboundSchema: z.ZodType< - ChatGenerationParamsResponseFormatText, - unknown -> = z.object({ - type: z.literal("text"), -}); - /** @internal */ export type ChatGenerationParamsResponseFormatText$Outbound = { type: "text"; @@ -331,21 +187,6 @@ export const ChatGenerationParamsResponseFormatText$outboundSchema: z.ZodType< type: z.literal("text"), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ChatGenerationParamsResponseFormatText$ { - /** @deprecated use `ChatGenerationParamsResponseFormatText$inboundSchema` instead. */ - export const inboundSchema = - ChatGenerationParamsResponseFormatText$inboundSchema; - /** @deprecated use `ChatGenerationParamsResponseFormatText$outboundSchema` instead. */ - export const outboundSchema = - ChatGenerationParamsResponseFormatText$outboundSchema; - /** @deprecated use `ChatGenerationParamsResponseFormatText$Outbound` instead. */ - export type Outbound = ChatGenerationParamsResponseFormatText$Outbound; -} - export function chatGenerationParamsResponseFormatTextToJSON( chatGenerationParamsResponseFormatText: ChatGenerationParamsResponseFormatText, @@ -357,29 +198,6 @@ export function chatGenerationParamsResponseFormatTextToJSON( ); } -export function chatGenerationParamsResponseFormatTextFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - ChatGenerationParamsResponseFormatText$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ChatGenerationParamsResponseFormatText' from JSON`, - ); -} - -/** @internal */ -export const ChatGenerationParamsResponseFormatUnion$inboundSchema: z.ZodType< - ChatGenerationParamsResponseFormatUnion, - unknown -> = z.union([ - ResponseFormatJSONSchema$inboundSchema, - ResponseFormatTextGrammar$inboundSchema, - z.lazy(() => ChatGenerationParamsResponseFormatText$inboundSchema), - z.lazy(() => ChatGenerationParamsResponseFormatJSONObject$inboundSchema), - z.lazy(() => ChatGenerationParamsResponseFormatPython$inboundSchema), -]); - /** @internal */ export type ChatGenerationParamsResponseFormatUnion$Outbound = | ResponseFormatJSONSchema$Outbound @@ -400,21 +218,6 @@ export const ChatGenerationParamsResponseFormatUnion$outboundSchema: z.ZodType< z.lazy(() => ChatGenerationParamsResponseFormatPython$outboundSchema), ]); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ChatGenerationParamsResponseFormatUnion$ { - /** @deprecated use `ChatGenerationParamsResponseFormatUnion$inboundSchema` instead. */ - export const inboundSchema = - ChatGenerationParamsResponseFormatUnion$inboundSchema; - /** @deprecated use `ChatGenerationParamsResponseFormatUnion$outboundSchema` instead. */ - export const outboundSchema = - ChatGenerationParamsResponseFormatUnion$outboundSchema; - /** @deprecated use `ChatGenerationParamsResponseFormatUnion$Outbound` instead. */ - export type Outbound = ChatGenerationParamsResponseFormatUnion$Outbound; -} - export function chatGenerationParamsResponseFormatUnionToJSON( chatGenerationParamsResponseFormatUnion: ChatGenerationParamsResponseFormatUnion, @@ -426,28 +229,6 @@ export function chatGenerationParamsResponseFormatUnionToJSON( ); } -export function chatGenerationParamsResponseFormatUnionFromJSON( - jsonString: string, -): SafeParseResult< - ChatGenerationParamsResponseFormatUnion, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - ChatGenerationParamsResponseFormatUnion$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'ChatGenerationParamsResponseFormatUnion' from JSON`, - ); -} - -/** @internal */ -export const ChatGenerationParamsStop$inboundSchema: z.ZodType< - ChatGenerationParamsStop, - unknown -> = z.union([z.string(), z.array(z.string())]); - /** @internal */ export type ChatGenerationParamsStop$Outbound = string | Array; @@ -457,19 +238,6 @@ export const ChatGenerationParamsStop$outboundSchema: z.ZodType< ChatGenerationParamsStop > = z.union([z.string(), z.array(z.string())]); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ChatGenerationParamsStop$ { - /** @deprecated use `ChatGenerationParamsStop$inboundSchema` instead. */ - export const inboundSchema = ChatGenerationParamsStop$inboundSchema; - /** @deprecated use `ChatGenerationParamsStop$outboundSchema` instead. */ - export const outboundSchema = ChatGenerationParamsStop$outboundSchema; - /** @deprecated use `ChatGenerationParamsStop$Outbound` instead. */ - export type Outbound = ChatGenerationParamsStop$Outbound; -} - export function chatGenerationParamsStopToJSON( chatGenerationParamsStop: ChatGenerationParamsStop, ): string { @@ -478,64 +246,6 @@ export function chatGenerationParamsStopToJSON( ); } -export function chatGenerationParamsStopFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ChatGenerationParamsStop$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ChatGenerationParamsStop' from JSON`, - ); -} - -/** @internal */ -export const ChatGenerationParams$inboundSchema: z.ZodType< - ChatGenerationParams, - unknown -> = z.object({ - messages: z.array(Message$inboundSchema), - model: z.string().optional(), - models: z.array(z.string()).optional(), - frequency_penalty: z.nullable(z.number()).optional(), - logit_bias: z.nullable(z.record(z.string(), z.number())).optional(), - logprobs: z.nullable(z.boolean()).optional(), - top_logprobs: z.nullable(z.number()).optional(), - max_completion_tokens: z.nullable(z.number()).optional(), - max_tokens: z.nullable(z.number()).optional(), - metadata: z.record(z.string(), z.string()).optional(), - presence_penalty: z.nullable(z.number()).optional(), - reasoning: z.lazy(() => Reasoning$inboundSchema).optional(), - response_format: z.union([ - ResponseFormatJSONSchema$inboundSchema, - ResponseFormatTextGrammar$inboundSchema, - z.lazy(() => ChatGenerationParamsResponseFormatText$inboundSchema), - z.lazy(() => ChatGenerationParamsResponseFormatJSONObject$inboundSchema), - z.lazy(() => ChatGenerationParamsResponseFormatPython$inboundSchema), - ]).optional(), - seed: z.nullable(z.number().int()).optional(), - stop: z.nullable(z.union([z.string(), z.array(z.string())])).optional(), - stream: z.boolean().default(false), - stream_options: z.nullable(ChatStreamOptions$inboundSchema).optional(), - temperature: z.nullable(z.number()).optional(), - tool_choice: z.any().optional(), - tools: z.array(Tool$inboundSchema).optional(), - top_p: z.nullable(z.number()).optional(), - user: z.string().optional(), -}).transform((v) => { - return remap$(v, { - "frequency_penalty": "frequencyPenalty", - "logit_bias": "logitBias", - "top_logprobs": "topLogprobs", - "max_completion_tokens": "maxCompletionTokens", - "max_tokens": "maxTokens", - "presence_penalty": "presencePenalty", - "response_format": "responseFormat", - "stream_options": "streamOptions", - "tool_choice": "toolChoice", - "top_p": "topP", - }); -}); - /** @internal */ export type ChatGenerationParams$Outbound = { messages: Array; @@ -563,7 +273,7 @@ export type ChatGenerationParams$Outbound = { stream_options?: ChatStreamOptions$Outbound | null | undefined; temperature?: number | null | undefined; tool_choice?: any | undefined; - tools?: Array | undefined; + tools?: Array | undefined; top_p?: number | null | undefined; user?: string | undefined; }; @@ -598,7 +308,7 @@ export const ChatGenerationParams$outboundSchema: z.ZodType< streamOptions: z.nullable(ChatStreamOptions$outboundSchema).optional(), temperature: z.nullable(z.number()).optional(), toolChoice: z.any().optional(), - tools: z.array(Tool$outboundSchema).optional(), + tools: z.array(ToolDefinitionJson$outboundSchema).optional(), topP: z.nullable(z.number()).optional(), user: z.string().optional(), }).transform((v) => { @@ -616,19 +326,6 @@ export const ChatGenerationParams$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ChatGenerationParams$ { - /** @deprecated use `ChatGenerationParams$inboundSchema` instead. */ - export const inboundSchema = ChatGenerationParams$inboundSchema; - /** @deprecated use `ChatGenerationParams$outboundSchema` instead. */ - export const outboundSchema = ChatGenerationParams$outboundSchema; - /** @deprecated use `ChatGenerationParams$Outbound` instead. */ - export type Outbound = ChatGenerationParams$Outbound; -} - export function chatGenerationParamsToJSON( chatGenerationParams: ChatGenerationParams, ): string { @@ -636,13 +333,3 @@ export function chatGenerationParamsToJSON( ChatGenerationParams$outboundSchema.parse(chatGenerationParams), ); } - -export function chatGenerationParamsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ChatGenerationParams$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ChatGenerationParams' from JSON`, - ); -} diff --git a/src/models/chatgenerationtokenusage.ts b/src/models/chatgenerationtokenusage.ts index 6e99b192..dd9b275a 100644 --- a/src/models/chatgenerationtokenusage.ts +++ b/src/models/chatgenerationtokenusage.ts @@ -9,10 +9,10 @@ import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; export type CompletionTokensDetails = { - reasoningTokens?: number | undefined; - audioTokens?: number | undefined; - acceptedPredictionTokens?: number | undefined; - rejectedPredictionTokens?: number | undefined; + reasoningTokens?: number | null | undefined; + audioTokens?: number | null | undefined; + acceptedPredictionTokens?: number | null | undefined; + rejectedPredictionTokens?: number | null | undefined; }; export type PromptTokensDetails = { @@ -24,7 +24,7 @@ export type ChatGenerationTokenUsage = { completionTokens: number; promptTokens: number; totalTokens: number; - completionTokensDetails?: CompletionTokensDetails | undefined; + completionTokensDetails?: CompletionTokensDetails | null | undefined; promptTokensDetails?: PromptTokensDetails | null | undefined; }; @@ -33,10 +33,10 @@ export const CompletionTokensDetails$inboundSchema: z.ZodType< CompletionTokensDetails, unknown > = z.object({ - reasoning_tokens: z.number().optional(), - audio_tokens: z.number().optional(), - accepted_prediction_tokens: z.number().optional(), - rejected_prediction_tokens: z.number().optional(), + reasoning_tokens: z.nullable(z.number()).optional(), + audio_tokens: z.nullable(z.number()).optional(), + accepted_prediction_tokens: z.nullable(z.number()).optional(), + rejected_prediction_tokens: z.nullable(z.number()).optional(), }).transform((v) => { return remap$(v, { "reasoning_tokens": "reasoningTokens", @@ -46,53 +46,6 @@ export const CompletionTokensDetails$inboundSchema: z.ZodType< }); }); -/** @internal */ -export type CompletionTokensDetails$Outbound = { - reasoning_tokens?: number | undefined; - audio_tokens?: number | undefined; - accepted_prediction_tokens?: number | undefined; - rejected_prediction_tokens?: number | undefined; -}; - -/** @internal */ -export const CompletionTokensDetails$outboundSchema: z.ZodType< - CompletionTokensDetails$Outbound, - CompletionTokensDetails -> = z.object({ - reasoningTokens: z.number().optional(), - audioTokens: z.number().optional(), - acceptedPredictionTokens: z.number().optional(), - rejectedPredictionTokens: z.number().optional(), -}).transform((v) => { - return remap$(v, { - reasoningTokens: "reasoning_tokens", - audioTokens: "audio_tokens", - acceptedPredictionTokens: "accepted_prediction_tokens", - rejectedPredictionTokens: "rejected_prediction_tokens", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CompletionTokensDetails$ { - /** @deprecated use `CompletionTokensDetails$inboundSchema` instead. */ - export const inboundSchema = CompletionTokensDetails$inboundSchema; - /** @deprecated use `CompletionTokensDetails$outboundSchema` instead. */ - export const outboundSchema = CompletionTokensDetails$outboundSchema; - /** @deprecated use `CompletionTokensDetails$Outbound` instead. */ - export type Outbound = CompletionTokensDetails$Outbound; -} - -export function completionTokensDetailsToJSON( - completionTokensDetails: CompletionTokensDetails, -): string { - return JSON.stringify( - CompletionTokensDetails$outboundSchema.parse(completionTokensDetails), - ); -} - export function completionTokensDetailsFromJSON( jsonString: string, ): SafeParseResult { @@ -117,47 +70,6 @@ export const PromptTokensDetails$inboundSchema: z.ZodType< }); }); -/** @internal */ -export type PromptTokensDetails$Outbound = { - cached_tokens?: number | undefined; - audio_tokens?: number | undefined; -}; - -/** @internal */ -export const PromptTokensDetails$outboundSchema: z.ZodType< - PromptTokensDetails$Outbound, - PromptTokensDetails -> = z.object({ - cachedTokens: z.number().optional(), - audioTokens: z.number().optional(), -}).transform((v) => { - return remap$(v, { - cachedTokens: "cached_tokens", - audioTokens: "audio_tokens", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PromptTokensDetails$ { - /** @deprecated use `PromptTokensDetails$inboundSchema` instead. */ - export const inboundSchema = PromptTokensDetails$inboundSchema; - /** @deprecated use `PromptTokensDetails$outboundSchema` instead. */ - export const outboundSchema = PromptTokensDetails$outboundSchema; - /** @deprecated use `PromptTokensDetails$Outbound` instead. */ - export type Outbound = PromptTokensDetails$Outbound; -} - -export function promptTokensDetailsToJSON( - promptTokensDetails: PromptTokensDetails, -): string { - return JSON.stringify( - PromptTokensDetails$outboundSchema.parse(promptTokensDetails), - ); -} - export function promptTokensDetailsFromJSON( jsonString: string, ): SafeParseResult { @@ -176,8 +88,9 @@ export const ChatGenerationTokenUsage$inboundSchema: z.ZodType< completion_tokens: z.number(), prompt_tokens: z.number(), total_tokens: z.number(), - completion_tokens_details: z.lazy(() => CompletionTokensDetails$inboundSchema) - .optional(), + completion_tokens_details: z.nullable( + z.lazy(() => CompletionTokensDetails$inboundSchema), + ).optional(), prompt_tokens_details: z.nullable( z.lazy(() => PromptTokensDetails$inboundSchema), ).optional(), @@ -191,59 +104,6 @@ export const ChatGenerationTokenUsage$inboundSchema: z.ZodType< }); }); -/** @internal */ -export type ChatGenerationTokenUsage$Outbound = { - completion_tokens: number; - prompt_tokens: number; - total_tokens: number; - completion_tokens_details?: CompletionTokensDetails$Outbound | undefined; - prompt_tokens_details?: PromptTokensDetails$Outbound | null | undefined; -}; - -/** @internal */ -export const ChatGenerationTokenUsage$outboundSchema: z.ZodType< - ChatGenerationTokenUsage$Outbound, - ChatGenerationTokenUsage -> = z.object({ - completionTokens: z.number(), - promptTokens: z.number(), - totalTokens: z.number(), - completionTokensDetails: z.lazy(() => CompletionTokensDetails$outboundSchema) - .optional(), - promptTokensDetails: z.nullable( - z.lazy(() => PromptTokensDetails$outboundSchema), - ).optional(), -}).transform((v) => { - return remap$(v, { - completionTokens: "completion_tokens", - promptTokens: "prompt_tokens", - totalTokens: "total_tokens", - completionTokensDetails: "completion_tokens_details", - promptTokensDetails: "prompt_tokens_details", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ChatGenerationTokenUsage$ { - /** @deprecated use `ChatGenerationTokenUsage$inboundSchema` instead. */ - export const inboundSchema = ChatGenerationTokenUsage$inboundSchema; - /** @deprecated use `ChatGenerationTokenUsage$outboundSchema` instead. */ - export const outboundSchema = ChatGenerationTokenUsage$outboundSchema; - /** @deprecated use `ChatGenerationTokenUsage$Outbound` instead. */ - export type Outbound = ChatGenerationTokenUsage$Outbound; -} - -export function chatGenerationTokenUsageToJSON( - chatGenerationTokenUsage: ChatGenerationTokenUsage, -): string { - return JSON.stringify( - ChatGenerationTokenUsage$outboundSchema.parse(chatGenerationTokenUsage), - ); -} - export function chatGenerationTokenUsageFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/chatmessagecontentitem.ts b/src/models/chatmessagecontentitem.ts index 872f2a55..66b11de9 100644 --- a/src/models/chatmessagecontentitem.ts +++ b/src/models/chatmessagecontentitem.ts @@ -23,12 +23,19 @@ import { ChatMessageContentItemText$Outbound, ChatMessageContentItemText$outboundSchema, } from "./chatmessagecontentitemtext.js"; +import { + ChatMessageContentItemVideo, + ChatMessageContentItemVideo$inboundSchema, + ChatMessageContentItemVideo$Outbound, + ChatMessageContentItemVideo$outboundSchema, +} from "./chatmessagecontentitemvideo.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; export type ChatMessageContentItem = | (ChatMessageContentItemText & { type: "text" }) | (ChatMessageContentItemImage & { type: "image_url" }) - | (ChatMessageContentItemAudio & { type: "input_audio" }); + | (ChatMessageContentItemAudio & { type: "input_audio" }) + | (ChatMessageContentItemVideo & { type: "input_video" }); /** @internal */ export const ChatMessageContentItem$inboundSchema: z.ZodType< @@ -48,13 +55,18 @@ export const ChatMessageContentItem$inboundSchema: z.ZodType< type: v.type, })), ), + ChatMessageContentItemVideo$inboundSchema.and( + z.object({ type: z.literal("input_video") }).transform((v) => ({ + type: v.type, + })), + ), ]); - /** @internal */ export type ChatMessageContentItem$Outbound = | (ChatMessageContentItemText$Outbound & { type: "text" }) | (ChatMessageContentItemImage$Outbound & { type: "image_url" }) - | (ChatMessageContentItemAudio$Outbound & { type: "input_audio" }); + | (ChatMessageContentItemAudio$Outbound & { type: "input_audio" }) + | (ChatMessageContentItemVideo$Outbound & { type: "input_video" }); /** @internal */ export const ChatMessageContentItem$outboundSchema: z.ZodType< @@ -74,21 +86,13 @@ export const ChatMessageContentItem$outboundSchema: z.ZodType< type: v.type, })), ), + ChatMessageContentItemVideo$outboundSchema.and( + z.object({ type: z.literal("input_video") }).transform((v) => ({ + type: v.type, + })), + ), ]); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ChatMessageContentItem$ { - /** @deprecated use `ChatMessageContentItem$inboundSchema` instead. */ - export const inboundSchema = ChatMessageContentItem$inboundSchema; - /** @deprecated use `ChatMessageContentItem$outboundSchema` instead. */ - export const outboundSchema = ChatMessageContentItem$outboundSchema; - /** @deprecated use `ChatMessageContentItem$Outbound` instead. */ - export type Outbound = ChatMessageContentItem$Outbound; -} - export function chatMessageContentItemToJSON( chatMessageContentItem: ChatMessageContentItem, ): string { @@ -96,7 +100,6 @@ export function chatMessageContentItemToJSON( ChatMessageContentItem$outboundSchema.parse(chatMessageContentItem), ); } - export function chatMessageContentItemFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/chatmessagecontentitemaudio.ts b/src/models/chatmessagecontentitemaudio.ts index de2a5c20..e69638ca 100644 --- a/src/models/chatmessagecontentitemaudio.ts +++ b/src/models/chatmessagecontentitemaudio.ts @@ -45,7 +45,6 @@ export const ChatMessageContentItemAudioFormat$inboundSchema: z.ZodType< z.enum(ChatMessageContentItemAudioFormat), z.string().transform(catchUnrecognizedEnum), ]); - /** @internal */ export const ChatMessageContentItemAudioFormat$outboundSchema: z.ZodType< ChatMessageContentItemAudioFormat, @@ -55,18 +54,6 @@ export const ChatMessageContentItemAudioFormat$outboundSchema: z.ZodType< z.string().and(z.custom>()), ]); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ChatMessageContentItemAudioFormat$ { - /** @deprecated use `ChatMessageContentItemAudioFormat$inboundSchema` instead. */ - export const inboundSchema = ChatMessageContentItemAudioFormat$inboundSchema; - /** @deprecated use `ChatMessageContentItemAudioFormat$outboundSchema` instead. */ - export const outboundSchema = - ChatMessageContentItemAudioFormat$outboundSchema; -} - /** @internal */ export const ChatMessageContentItemAudioInputAudio$inboundSchema: z.ZodType< ChatMessageContentItemAudioInputAudio, @@ -75,7 +62,6 @@ export const ChatMessageContentItemAudioInputAudio$inboundSchema: z.ZodType< data: z.string(), format: ChatMessageContentItemAudioFormat$inboundSchema, }); - /** @internal */ export type ChatMessageContentItemAudioInputAudio$Outbound = { data: string; @@ -91,21 +77,6 @@ export const ChatMessageContentItemAudioInputAudio$outboundSchema: z.ZodType< format: ChatMessageContentItemAudioFormat$outboundSchema, }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ChatMessageContentItemAudioInputAudio$ { - /** @deprecated use `ChatMessageContentItemAudioInputAudio$inboundSchema` instead. */ - export const inboundSchema = - ChatMessageContentItemAudioInputAudio$inboundSchema; - /** @deprecated use `ChatMessageContentItemAudioInputAudio$outboundSchema` instead. */ - export const outboundSchema = - ChatMessageContentItemAudioInputAudio$outboundSchema; - /** @deprecated use `ChatMessageContentItemAudioInputAudio$Outbound` instead. */ - export type Outbound = ChatMessageContentItemAudioInputAudio$Outbound; -} - export function chatMessageContentItemAudioInputAudioToJSON( chatMessageContentItemAudioInputAudio: ChatMessageContentItemAudioInputAudio, ): string { @@ -115,7 +86,6 @@ export function chatMessageContentItemAudioInputAudioToJSON( ), ); } - export function chatMessageContentItemAudioInputAudioFromJSON( jsonString: string, ): SafeParseResult { @@ -141,7 +111,6 @@ export const ChatMessageContentItemAudio$inboundSchema: z.ZodType< "input_audio": "inputAudio", }); }); - /** @internal */ export type ChatMessageContentItemAudio$Outbound = { type: "input_audio"; @@ -163,19 +132,6 @@ export const ChatMessageContentItemAudio$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ChatMessageContentItemAudio$ { - /** @deprecated use `ChatMessageContentItemAudio$inboundSchema` instead. */ - export const inboundSchema = ChatMessageContentItemAudio$inboundSchema; - /** @deprecated use `ChatMessageContentItemAudio$outboundSchema` instead. */ - export const outboundSchema = ChatMessageContentItemAudio$outboundSchema; - /** @deprecated use `ChatMessageContentItemAudio$Outbound` instead. */ - export type Outbound = ChatMessageContentItemAudio$Outbound; -} - export function chatMessageContentItemAudioToJSON( chatMessageContentItemAudio: ChatMessageContentItemAudio, ): string { @@ -185,7 +141,6 @@ export function chatMessageContentItemAudioToJSON( ), ); } - export function chatMessageContentItemAudioFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/chatmessagecontentitemimage.ts b/src/models/chatmessagecontentitemimage.ts index 109907e8..d3003ac1 100644 --- a/src/models/chatmessagecontentitemimage.ts +++ b/src/models/chatmessagecontentitemimage.ts @@ -41,7 +41,6 @@ export const ChatMessageContentItemImageDetail$inboundSchema: z.ZodType< z.enum(ChatMessageContentItemImageDetail), z.string().transform(catchUnrecognizedEnum), ]); - /** @internal */ export const ChatMessageContentItemImageDetail$outboundSchema: z.ZodType< ChatMessageContentItemImageDetail, @@ -51,24 +50,11 @@ export const ChatMessageContentItemImageDetail$outboundSchema: z.ZodType< z.string().and(z.custom>()), ]); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ChatMessageContentItemImageDetail$ { - /** @deprecated use `ChatMessageContentItemImageDetail$inboundSchema` instead. */ - export const inboundSchema = ChatMessageContentItemImageDetail$inboundSchema; - /** @deprecated use `ChatMessageContentItemImageDetail$outboundSchema` instead. */ - export const outboundSchema = - ChatMessageContentItemImageDetail$outboundSchema; -} - /** @internal */ export const ImageUrl$inboundSchema: z.ZodType = z.object({ url: z.string(), detail: ChatMessageContentItemImageDetail$inboundSchema.optional(), }); - /** @internal */ export type ImageUrl$Outbound = { url: string; @@ -82,23 +68,9 @@ export const ImageUrl$outboundSchema: z.ZodType = z detail: ChatMessageContentItemImageDetail$outboundSchema.optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ImageUrl$ { - /** @deprecated use `ImageUrl$inboundSchema` instead. */ - export const inboundSchema = ImageUrl$inboundSchema; - /** @deprecated use `ImageUrl$outboundSchema` instead. */ - export const outboundSchema = ImageUrl$outboundSchema; - /** @deprecated use `ImageUrl$Outbound` instead. */ - export type Outbound = ImageUrl$Outbound; -} - export function imageUrlToJSON(imageUrl: ImageUrl): string { return JSON.stringify(ImageUrl$outboundSchema.parse(imageUrl)); } - export function imageUrlFromJSON( jsonString: string, ): SafeParseResult { @@ -121,7 +93,6 @@ export const ChatMessageContentItemImage$inboundSchema: z.ZodType< "image_url": "imageUrl", }); }); - /** @internal */ export type ChatMessageContentItemImage$Outbound = { type: "image_url"; @@ -141,19 +112,6 @@ export const ChatMessageContentItemImage$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ChatMessageContentItemImage$ { - /** @deprecated use `ChatMessageContentItemImage$inboundSchema` instead. */ - export const inboundSchema = ChatMessageContentItemImage$inboundSchema; - /** @deprecated use `ChatMessageContentItemImage$outboundSchema` instead. */ - export const outboundSchema = ChatMessageContentItemImage$outboundSchema; - /** @deprecated use `ChatMessageContentItemImage$Outbound` instead. */ - export type Outbound = ChatMessageContentItemImage$Outbound; -} - export function chatMessageContentItemImageToJSON( chatMessageContentItemImage: ChatMessageContentItemImage, ): string { @@ -163,7 +121,6 @@ export function chatMessageContentItemImageToJSON( ), ); } - export function chatMessageContentItemImageFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/chatmessagecontentitemtext.ts b/src/models/chatmessagecontentitemtext.ts index 82371992..327eb8fe 100644 --- a/src/models/chatmessagecontentitemtext.ts +++ b/src/models/chatmessagecontentitemtext.ts @@ -20,7 +20,6 @@ export const ChatMessageContentItemText$inboundSchema: z.ZodType< type: z.literal("text"), text: z.string(), }); - /** @internal */ export type ChatMessageContentItemText$Outbound = { type: "text"; @@ -36,19 +35,6 @@ export const ChatMessageContentItemText$outboundSchema: z.ZodType< text: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ChatMessageContentItemText$ { - /** @deprecated use `ChatMessageContentItemText$inboundSchema` instead. */ - export const inboundSchema = ChatMessageContentItemText$inboundSchema; - /** @deprecated use `ChatMessageContentItemText$outboundSchema` instead. */ - export const outboundSchema = ChatMessageContentItemText$outboundSchema; - /** @deprecated use `ChatMessageContentItemText$Outbound` instead. */ - export type Outbound = ChatMessageContentItemText$Outbound; -} - export function chatMessageContentItemTextToJSON( chatMessageContentItemText: ChatMessageContentItemText, ): string { @@ -56,7 +42,6 @@ export function chatMessageContentItemTextToJSON( ChatMessageContentItemText$outboundSchema.parse(chatMessageContentItemText), ); } - export function chatMessageContentItemTextFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/chatmessagecontentitemvideo.ts b/src/models/chatmessagecontentitemvideo.ts new file mode 100644 index 00000000..f1d8316e --- /dev/null +++ b/src/models/chatmessagecontentitemvideo.ts @@ -0,0 +1,96 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v4"; +import { remap as remap$ } from "../lib/primitives.js"; +import { safeParse } from "../lib/schemas.js"; +import { Result as SafeParseResult } from "../types/fp.js"; +import { SDKValidationError } from "./errors/sdkvalidationerror.js"; + +export type VideoUrl = { + url: string; +}; + +export type ChatMessageContentItemVideo = { + type: "input_video"; + videoUrl: VideoUrl; +}; + +/** @internal */ +export const VideoUrl$inboundSchema: z.ZodType = z.object({ + url: z.string(), +}); +/** @internal */ +export type VideoUrl$Outbound = { + url: string; +}; + +/** @internal */ +export const VideoUrl$outboundSchema: z.ZodType = z + .object({ + url: z.string(), + }); + +export function videoUrlToJSON(videoUrl: VideoUrl): string { + return JSON.stringify(VideoUrl$outboundSchema.parse(videoUrl)); +} +export function videoUrlFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => VideoUrl$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'VideoUrl' from JSON`, + ); +} + +/** @internal */ +export const ChatMessageContentItemVideo$inboundSchema: z.ZodType< + ChatMessageContentItemVideo, + unknown +> = z.object({ + type: z.literal("input_video"), + video_url: z.lazy(() => VideoUrl$inboundSchema), +}).transform((v) => { + return remap$(v, { + "video_url": "videoUrl", + }); +}); +/** @internal */ +export type ChatMessageContentItemVideo$Outbound = { + type: "input_video"; + video_url: VideoUrl$Outbound; +}; + +/** @internal */ +export const ChatMessageContentItemVideo$outboundSchema: z.ZodType< + ChatMessageContentItemVideo$Outbound, + ChatMessageContentItemVideo +> = z.object({ + type: z.literal("input_video"), + videoUrl: z.lazy(() => VideoUrl$outboundSchema), +}).transform((v) => { + return remap$(v, { + videoUrl: "video_url", + }); +}); + +export function chatMessageContentItemVideoToJSON( + chatMessageContentItemVideo: ChatMessageContentItemVideo, +): string { + return JSON.stringify( + ChatMessageContentItemVideo$outboundSchema.parse( + chatMessageContentItemVideo, + ), + ); +} +export function chatMessageContentItemVideoFromJSON( + jsonString: string, +): SafeParseResult { + return safeParse( + jsonString, + (x) => ChatMessageContentItemVideo$inboundSchema.parse(JSON.parse(x)), + `Failed to parse 'ChatMessageContentItemVideo' from JSON`, + ); +} diff --git a/src/models/chatmessagetokenlogprob.ts b/src/models/chatmessagetokenlogprob.ts index b34374b1..c9364bfd 100644 --- a/src/models/chatmessagetokenlogprob.ts +++ b/src/models/chatmessagetokenlogprob.ts @@ -29,40 +29,6 @@ export const TopLogprob$inboundSchema: z.ZodType = z bytes: z.nullable(z.array(z.number())), }); -/** @internal */ -export type TopLogprob$Outbound = { - token: string; - logprob: number; - bytes: Array | null; -}; - -/** @internal */ -export const TopLogprob$outboundSchema: z.ZodType< - TopLogprob$Outbound, - TopLogprob -> = z.object({ - token: z.string(), - logprob: z.number(), - bytes: z.nullable(z.array(z.number())), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace TopLogprob$ { - /** @deprecated use `TopLogprob$inboundSchema` instead. */ - export const inboundSchema = TopLogprob$inboundSchema; - /** @deprecated use `TopLogprob$outboundSchema` instead. */ - export const outboundSchema = TopLogprob$outboundSchema; - /** @deprecated use `TopLogprob$Outbound` instead. */ - export type Outbound = TopLogprob$Outbound; -} - -export function topLogprobToJSON(topLogprob: TopLogprob): string { - return JSON.stringify(TopLogprob$outboundSchema.parse(topLogprob)); -} - export function topLogprobFromJSON( jsonString: string, ): SafeParseResult { @@ -88,50 +54,6 @@ export const ChatMessageTokenLogprob$inboundSchema: z.ZodType< }); }); -/** @internal */ -export type ChatMessageTokenLogprob$Outbound = { - token: string; - logprob: number; - bytes: Array | null; - top_logprobs: Array; -}; - -/** @internal */ -export const ChatMessageTokenLogprob$outboundSchema: z.ZodType< - ChatMessageTokenLogprob$Outbound, - ChatMessageTokenLogprob -> = z.object({ - token: z.string(), - logprob: z.number(), - bytes: z.nullable(z.array(z.number())), - topLogprobs: z.array(z.lazy(() => TopLogprob$outboundSchema)), -}).transform((v) => { - return remap$(v, { - topLogprobs: "top_logprobs", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ChatMessageTokenLogprob$ { - /** @deprecated use `ChatMessageTokenLogprob$inboundSchema` instead. */ - export const inboundSchema = ChatMessageTokenLogprob$inboundSchema; - /** @deprecated use `ChatMessageTokenLogprob$outboundSchema` instead. */ - export const outboundSchema = ChatMessageTokenLogprob$outboundSchema; - /** @deprecated use `ChatMessageTokenLogprob$Outbound` instead. */ - export type Outbound = ChatMessageTokenLogprob$Outbound; -} - -export function chatMessageTokenLogprobToJSON( - chatMessageTokenLogprob: ChatMessageTokenLogprob, -): string { - return JSON.stringify( - ChatMessageTokenLogprob$outboundSchema.parse(chatMessageTokenLogprob), - ); -} - export function chatMessageTokenLogprobFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/chatmessagetokenlogprobs.ts b/src/models/chatmessagetokenlogprobs.ts index 5d0b72a9..cd2e58bf 100644 --- a/src/models/chatmessagetokenlogprobs.ts +++ b/src/models/chatmessagetokenlogprobs.ts @@ -8,8 +8,6 @@ import { Result as SafeParseResult } from "../types/fp.js"; import { ChatMessageTokenLogprob, ChatMessageTokenLogprob$inboundSchema, - ChatMessageTokenLogprob$Outbound, - ChatMessageTokenLogprob$outboundSchema, } from "./chatmessagetokenlogprob.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; @@ -27,42 +25,6 @@ export const ChatMessageTokenLogprobs$inboundSchema: z.ZodType< refusal: z.nullable(z.array(ChatMessageTokenLogprob$inboundSchema)), }); -/** @internal */ -export type ChatMessageTokenLogprobs$Outbound = { - content: Array | null; - refusal: Array | null; -}; - -/** @internal */ -export const ChatMessageTokenLogprobs$outboundSchema: z.ZodType< - ChatMessageTokenLogprobs$Outbound, - ChatMessageTokenLogprobs -> = z.object({ - content: z.nullable(z.array(ChatMessageTokenLogprob$outboundSchema)), - refusal: z.nullable(z.array(ChatMessageTokenLogprob$outboundSchema)), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ChatMessageTokenLogprobs$ { - /** @deprecated use `ChatMessageTokenLogprobs$inboundSchema` instead. */ - export const inboundSchema = ChatMessageTokenLogprobs$inboundSchema; - /** @deprecated use `ChatMessageTokenLogprobs$outboundSchema` instead. */ - export const outboundSchema = ChatMessageTokenLogprobs$outboundSchema; - /** @deprecated use `ChatMessageTokenLogprobs$Outbound` instead. */ - export type Outbound = ChatMessageTokenLogprobs$Outbound; -} - -export function chatMessageTokenLogprobsToJSON( - chatMessageTokenLogprobs: ChatMessageTokenLogprobs, -): string { - return JSON.stringify( - ChatMessageTokenLogprobs$outboundSchema.parse(chatMessageTokenLogprobs), - ); -} - export function chatMessageTokenLogprobsFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/chatmessagetoolcall.ts b/src/models/chatmessagetoolcall.ts index 5dcb67e0..3e9a3fe0 100644 --- a/src/models/chatmessagetoolcall.ts +++ b/src/models/chatmessagetoolcall.ts @@ -26,7 +26,6 @@ export const ChatMessageToolCallFunction$inboundSchema: z.ZodType< name: z.string(), arguments: z.string(), }); - /** @internal */ export type ChatMessageToolCallFunction$Outbound = { name: string; @@ -42,19 +41,6 @@ export const ChatMessageToolCallFunction$outboundSchema: z.ZodType< arguments: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ChatMessageToolCallFunction$ { - /** @deprecated use `ChatMessageToolCallFunction$inboundSchema` instead. */ - export const inboundSchema = ChatMessageToolCallFunction$inboundSchema; - /** @deprecated use `ChatMessageToolCallFunction$outboundSchema` instead. */ - export const outboundSchema = ChatMessageToolCallFunction$outboundSchema; - /** @deprecated use `ChatMessageToolCallFunction$Outbound` instead. */ - export type Outbound = ChatMessageToolCallFunction$Outbound; -} - export function chatMessageToolCallFunctionToJSON( chatMessageToolCallFunction: ChatMessageToolCallFunction, ): string { @@ -64,7 +50,6 @@ export function chatMessageToolCallFunctionToJSON( ), ); } - export function chatMessageToolCallFunctionFromJSON( jsonString: string, ): SafeParseResult { @@ -84,7 +69,6 @@ export const ChatMessageToolCall$inboundSchema: z.ZodType< type: z.literal("function"), function: z.lazy(() => ChatMessageToolCallFunction$inboundSchema), }); - /** @internal */ export type ChatMessageToolCall$Outbound = { id: string; @@ -102,19 +86,6 @@ export const ChatMessageToolCall$outboundSchema: z.ZodType< function: z.lazy(() => ChatMessageToolCallFunction$outboundSchema), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ChatMessageToolCall$ { - /** @deprecated use `ChatMessageToolCall$inboundSchema` instead. */ - export const inboundSchema = ChatMessageToolCall$inboundSchema; - /** @deprecated use `ChatMessageToolCall$outboundSchema` instead. */ - export const outboundSchema = ChatMessageToolCall$outboundSchema; - /** @deprecated use `ChatMessageToolCall$Outbound` instead. */ - export type Outbound = ChatMessageToolCall$Outbound; -} - export function chatMessageToolCallToJSON( chatMessageToolCall: ChatMessageToolCall, ): string { @@ -122,7 +93,6 @@ export function chatMessageToolCallToJSON( ChatMessageToolCall$outboundSchema.parse(chatMessageToolCall), ); } - export function chatMessageToolCallFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/chatresponse.ts b/src/models/chatresponse.ts index dece5c4f..81003fe9 100644 --- a/src/models/chatresponse.ts +++ b/src/models/chatresponse.ts @@ -9,14 +9,10 @@ import { Result as SafeParseResult } from "../types/fp.js"; import { ChatGenerationTokenUsage, ChatGenerationTokenUsage$inboundSchema, - ChatGenerationTokenUsage$Outbound, - ChatGenerationTokenUsage$outboundSchema, } from "./chatgenerationtokenusage.js"; import { ChatResponseChoice, ChatResponseChoice$inboundSchema, - ChatResponseChoice$Outbound, - ChatResponseChoice$outboundSchema, } from "./chatresponsechoice.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; @@ -46,52 +42,6 @@ export const ChatResponse$inboundSchema: z.ZodType = z }); }); -/** @internal */ -export type ChatResponse$Outbound = { - id: string; - choices: Array; - created: number; - model: string; - object: "chat.completion"; - system_fingerprint?: string | null | undefined; - usage?: ChatGenerationTokenUsage$Outbound | undefined; -}; - -/** @internal */ -export const ChatResponse$outboundSchema: z.ZodType< - ChatResponse$Outbound, - ChatResponse -> = z.object({ - id: z.string(), - choices: z.array(ChatResponseChoice$outboundSchema), - created: z.number(), - model: z.string(), - object: z.literal("chat.completion"), - systemFingerprint: z.nullable(z.string()).optional(), - usage: ChatGenerationTokenUsage$outboundSchema.optional(), -}).transform((v) => { - return remap$(v, { - systemFingerprint: "system_fingerprint", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ChatResponse$ { - /** @deprecated use `ChatResponse$inboundSchema` instead. */ - export const inboundSchema = ChatResponse$inboundSchema; - /** @deprecated use `ChatResponse$outboundSchema` instead. */ - export const outboundSchema = ChatResponse$outboundSchema; - /** @deprecated use `ChatResponse$Outbound` instead. */ - export type Outbound = ChatResponse$Outbound; -} - -export function chatResponseToJSON(chatResponse: ChatResponse): string { - return JSON.stringify(ChatResponse$outboundSchema.parse(chatResponse)); -} - export function chatResponseFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/chatresponsechoice.ts b/src/models/chatresponsechoice.ts index 0f77a5ce..d48b6d72 100644 --- a/src/models/chatresponsechoice.ts +++ b/src/models/chatresponsechoice.ts @@ -9,19 +9,14 @@ import { Result as SafeParseResult } from "../types/fp.js"; import { AssistantMessage, AssistantMessage$inboundSchema, - AssistantMessage$Outbound, - AssistantMessage$outboundSchema, } from "./assistantmessage.js"; import { ChatCompletionFinishReason, ChatCompletionFinishReason$inboundSchema, - ChatCompletionFinishReason$outboundSchema, } from "./chatcompletionfinishreason.js"; import { ChatMessageTokenLogprobs, ChatMessageTokenLogprobs$inboundSchema, - ChatMessageTokenLogprobs$Outbound, - ChatMessageTokenLogprobs$outboundSchema, } from "./chatmessagetokenlogprobs.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; @@ -47,50 +42,6 @@ export const ChatResponseChoice$inboundSchema: z.ZodType< }); }); -/** @internal */ -export type ChatResponseChoice$Outbound = { - finish_reason: string | null; - index: number; - message: AssistantMessage$Outbound; - logprobs?: ChatMessageTokenLogprobs$Outbound | null | undefined; -}; - -/** @internal */ -export const ChatResponseChoice$outboundSchema: z.ZodType< - ChatResponseChoice$Outbound, - ChatResponseChoice -> = z.object({ - finishReason: z.nullable(ChatCompletionFinishReason$outboundSchema), - index: z.number(), - message: AssistantMessage$outboundSchema, - logprobs: z.nullable(ChatMessageTokenLogprobs$outboundSchema).optional(), -}).transform((v) => { - return remap$(v, { - finishReason: "finish_reason", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ChatResponseChoice$ { - /** @deprecated use `ChatResponseChoice$inboundSchema` instead. */ - export const inboundSchema = ChatResponseChoice$inboundSchema; - /** @deprecated use `ChatResponseChoice$outboundSchema` instead. */ - export const outboundSchema = ChatResponseChoice$outboundSchema; - /** @deprecated use `ChatResponseChoice$Outbound` instead. */ - export type Outbound = ChatResponseChoice$Outbound; -} - -export function chatResponseChoiceToJSON( - chatResponseChoice: ChatResponseChoice, -): string { - return JSON.stringify( - ChatResponseChoice$outboundSchema.parse(chatResponseChoice), - ); -} - export function chatResponseChoiceFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/chatstreamingchoice.ts b/src/models/chatstreamingchoice.ts index ea0ae5b6..c1a817ce 100644 --- a/src/models/chatstreamingchoice.ts +++ b/src/models/chatstreamingchoice.ts @@ -9,19 +9,14 @@ import { Result as SafeParseResult } from "../types/fp.js"; import { ChatCompletionFinishReason, ChatCompletionFinishReason$inboundSchema, - ChatCompletionFinishReason$outboundSchema, } from "./chatcompletionfinishreason.js"; import { ChatMessageTokenLogprobs, ChatMessageTokenLogprobs$inboundSchema, - ChatMessageTokenLogprobs$Outbound, - ChatMessageTokenLogprobs$outboundSchema, } from "./chatmessagetokenlogprobs.js"; import { ChatStreamingMessageChunk, ChatStreamingMessageChunk$inboundSchema, - ChatStreamingMessageChunk$Outbound, - ChatStreamingMessageChunk$outboundSchema, } from "./chatstreamingmessagechunk.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; @@ -47,50 +42,6 @@ export const ChatStreamingChoice$inboundSchema: z.ZodType< }); }); -/** @internal */ -export type ChatStreamingChoice$Outbound = { - delta: ChatStreamingMessageChunk$Outbound; - finish_reason: string | null; - index: number; - logprobs?: ChatMessageTokenLogprobs$Outbound | null | undefined; -}; - -/** @internal */ -export const ChatStreamingChoice$outboundSchema: z.ZodType< - ChatStreamingChoice$Outbound, - ChatStreamingChoice -> = z.object({ - delta: ChatStreamingMessageChunk$outboundSchema, - finishReason: z.nullable(ChatCompletionFinishReason$outboundSchema), - index: z.number(), - logprobs: z.nullable(ChatMessageTokenLogprobs$outboundSchema).optional(), -}).transform((v) => { - return remap$(v, { - finishReason: "finish_reason", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ChatStreamingChoice$ { - /** @deprecated use `ChatStreamingChoice$inboundSchema` instead. */ - export const inboundSchema = ChatStreamingChoice$inboundSchema; - /** @deprecated use `ChatStreamingChoice$outboundSchema` instead. */ - export const outboundSchema = ChatStreamingChoice$outboundSchema; - /** @deprecated use `ChatStreamingChoice$Outbound` instead. */ - export type Outbound = ChatStreamingChoice$Outbound; -} - -export function chatStreamingChoiceToJSON( - chatStreamingChoice: ChatStreamingChoice, -): string { - return JSON.stringify( - ChatStreamingChoice$outboundSchema.parse(chatStreamingChoice), - ); -} - export function chatStreamingChoiceFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/chatstreamingmessagechunk.ts b/src/models/chatstreamingmessagechunk.ts index 05b2a096..8956b9d4 100644 --- a/src/models/chatstreamingmessagechunk.ts +++ b/src/models/chatstreamingmessagechunk.ts @@ -10,8 +10,6 @@ import { Result as SafeParseResult } from "../types/fp.js"; import { ChatStreamingMessageToolCall, ChatStreamingMessageToolCall$inboundSchema, - ChatStreamingMessageToolCall$Outbound, - ChatStreamingMessageToolCall$outboundSchema, } from "./chatstreamingmessagetoolcall.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; @@ -35,22 +33,6 @@ export const ChatStreamingMessageChunkRole$inboundSchema: z.ZodEnum< typeof ChatStreamingMessageChunkRole > = z.enum(ChatStreamingMessageChunkRole); -/** @internal */ -export const ChatStreamingMessageChunkRole$outboundSchema: z.ZodEnum< - typeof ChatStreamingMessageChunkRole -> = ChatStreamingMessageChunkRole$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ChatStreamingMessageChunkRole$ { - /** @deprecated use `ChatStreamingMessageChunkRole$inboundSchema` instead. */ - export const inboundSchema = ChatStreamingMessageChunkRole$inboundSchema; - /** @deprecated use `ChatStreamingMessageChunkRole$outboundSchema` instead. */ - export const outboundSchema = ChatStreamingMessageChunkRole$outboundSchema; -} - /** @internal */ export const ChatStreamingMessageChunk$inboundSchema: z.ZodType< ChatStreamingMessageChunk, @@ -67,52 +49,6 @@ export const ChatStreamingMessageChunk$inboundSchema: z.ZodType< }); }); -/** @internal */ -export type ChatStreamingMessageChunk$Outbound = { - role?: string | undefined; - content?: string | null | undefined; - reasoning?: string | null | undefined; - refusal?: string | null | undefined; - tool_calls?: Array | undefined; -}; - -/** @internal */ -export const ChatStreamingMessageChunk$outboundSchema: z.ZodType< - ChatStreamingMessageChunk$Outbound, - ChatStreamingMessageChunk -> = z.object({ - role: ChatStreamingMessageChunkRole$outboundSchema.optional(), - content: z.nullable(z.string()).optional(), - reasoning: z.nullable(z.string()).optional(), - refusal: z.nullable(z.string()).optional(), - toolCalls: z.array(ChatStreamingMessageToolCall$outboundSchema).optional(), -}).transform((v) => { - return remap$(v, { - toolCalls: "tool_calls", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ChatStreamingMessageChunk$ { - /** @deprecated use `ChatStreamingMessageChunk$inboundSchema` instead. */ - export const inboundSchema = ChatStreamingMessageChunk$inboundSchema; - /** @deprecated use `ChatStreamingMessageChunk$outboundSchema` instead. */ - export const outboundSchema = ChatStreamingMessageChunk$outboundSchema; - /** @deprecated use `ChatStreamingMessageChunk$Outbound` instead. */ - export type Outbound = ChatStreamingMessageChunk$Outbound; -} - -export function chatStreamingMessageChunkToJSON( - chatStreamingMessageChunk: ChatStreamingMessageChunk, -): string { - return JSON.stringify( - ChatStreamingMessageChunk$outboundSchema.parse(chatStreamingMessageChunk), - ); -} - export function chatStreamingMessageChunkFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/chatstreamingmessagetoolcall.ts b/src/models/chatstreamingmessagetoolcall.ts index 28adab08..45835d9e 100644 --- a/src/models/chatstreamingmessagetoolcall.ts +++ b/src/models/chatstreamingmessagetoolcall.ts @@ -28,46 +28,6 @@ export const ChatStreamingMessageToolCallFunction$inboundSchema: z.ZodType< arguments: z.string().optional(), }); -/** @internal */ -export type ChatStreamingMessageToolCallFunction$Outbound = { - name?: string | undefined; - arguments?: string | undefined; -}; - -/** @internal */ -export const ChatStreamingMessageToolCallFunction$outboundSchema: z.ZodType< - ChatStreamingMessageToolCallFunction$Outbound, - ChatStreamingMessageToolCallFunction -> = z.object({ - name: z.string().optional(), - arguments: z.string().optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ChatStreamingMessageToolCallFunction$ { - /** @deprecated use `ChatStreamingMessageToolCallFunction$inboundSchema` instead. */ - export const inboundSchema = - ChatStreamingMessageToolCallFunction$inboundSchema; - /** @deprecated use `ChatStreamingMessageToolCallFunction$outboundSchema` instead. */ - export const outboundSchema = - ChatStreamingMessageToolCallFunction$outboundSchema; - /** @deprecated use `ChatStreamingMessageToolCallFunction$Outbound` instead. */ - export type Outbound = ChatStreamingMessageToolCallFunction$Outbound; -} - -export function chatStreamingMessageToolCallFunctionToJSON( - chatStreamingMessageToolCallFunction: ChatStreamingMessageToolCallFunction, -): string { - return JSON.stringify( - ChatStreamingMessageToolCallFunction$outboundSchema.parse( - chatStreamingMessageToolCallFunction, - ), - ); -} - export function chatStreamingMessageToolCallFunctionFromJSON( jsonString: string, ): SafeParseResult { @@ -91,49 +51,6 @@ export const ChatStreamingMessageToolCall$inboundSchema: z.ZodType< .optional(), }); -/** @internal */ -export type ChatStreamingMessageToolCall$Outbound = { - index: number; - id?: string | undefined; - type?: "function" | undefined; - function?: ChatStreamingMessageToolCallFunction$Outbound | undefined; -}; - -/** @internal */ -export const ChatStreamingMessageToolCall$outboundSchema: z.ZodType< - ChatStreamingMessageToolCall$Outbound, - ChatStreamingMessageToolCall -> = z.object({ - index: z.number(), - id: z.string().optional(), - type: z.literal("function").optional(), - function: z.lazy(() => ChatStreamingMessageToolCallFunction$outboundSchema) - .optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ChatStreamingMessageToolCall$ { - /** @deprecated use `ChatStreamingMessageToolCall$inboundSchema` instead. */ - export const inboundSchema = ChatStreamingMessageToolCall$inboundSchema; - /** @deprecated use `ChatStreamingMessageToolCall$outboundSchema` instead. */ - export const outboundSchema = ChatStreamingMessageToolCall$outboundSchema; - /** @deprecated use `ChatStreamingMessageToolCall$Outbound` instead. */ - export type Outbound = ChatStreamingMessageToolCall$Outbound; -} - -export function chatStreamingMessageToolCallToJSON( - chatStreamingMessageToolCall: ChatStreamingMessageToolCall, -): string { - return JSON.stringify( - ChatStreamingMessageToolCall$outboundSchema.parse( - chatStreamingMessageToolCall, - ), - ); -} - export function chatStreamingMessageToolCallFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/chatstreamingresponsechunk.ts b/src/models/chatstreamingresponsechunk.ts index 95c7d687..80030608 100644 --- a/src/models/chatstreamingresponsechunk.ts +++ b/src/models/chatstreamingresponsechunk.ts @@ -9,14 +9,10 @@ import { Result as SafeParseResult } from "../types/fp.js"; import { ChatGenerationTokenUsage, ChatGenerationTokenUsage$inboundSchema, - ChatGenerationTokenUsage$Outbound, - ChatGenerationTokenUsage$outboundSchema, } from "./chatgenerationtokenusage.js"; import { ChatStreamingChoice, ChatStreamingChoice$inboundSchema, - ChatStreamingChoice$Outbound, - ChatStreamingChoice$outboundSchema, } from "./chatstreamingchoice.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; @@ -49,44 +45,6 @@ export const ChatStreamingResponseChunkError$inboundSchema: z.ZodType< code: z.number(), }); -/** @internal */ -export type ChatStreamingResponseChunkError$Outbound = { - message: string; - code: number; -}; - -/** @internal */ -export const ChatStreamingResponseChunkError$outboundSchema: z.ZodType< - ChatStreamingResponseChunkError$Outbound, - ChatStreamingResponseChunkError -> = z.object({ - message: z.string(), - code: z.number(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ChatStreamingResponseChunkError$ { - /** @deprecated use `ChatStreamingResponseChunkError$inboundSchema` instead. */ - export const inboundSchema = ChatStreamingResponseChunkError$inboundSchema; - /** @deprecated use `ChatStreamingResponseChunkError$outboundSchema` instead. */ - export const outboundSchema = ChatStreamingResponseChunkError$outboundSchema; - /** @deprecated use `ChatStreamingResponseChunkError$Outbound` instead. */ - export type Outbound = ChatStreamingResponseChunkError$Outbound; -} - -export function chatStreamingResponseChunkErrorToJSON( - chatStreamingResponseChunkError: ChatStreamingResponseChunkError, -): string { - return JSON.stringify( - ChatStreamingResponseChunkError$outboundSchema.parse( - chatStreamingResponseChunkError, - ), - ); -} - export function chatStreamingResponseChunkErrorFromJSON( jsonString: string, ): SafeParseResult { @@ -116,61 +74,6 @@ export const ChatStreamingResponseChunkData$inboundSchema: z.ZodType< }); }); -/** @internal */ -export type ChatStreamingResponseChunkData$Outbound = { - id: string; - choices: Array; - created: number; - model: string; - object: "chat.completion.chunk"; - system_fingerprint?: string | null | undefined; - error?: ChatStreamingResponseChunkError$Outbound | undefined; - usage?: ChatGenerationTokenUsage$Outbound | undefined; -}; - -/** @internal */ -export const ChatStreamingResponseChunkData$outboundSchema: z.ZodType< - ChatStreamingResponseChunkData$Outbound, - ChatStreamingResponseChunkData -> = z.object({ - id: z.string(), - choices: z.array(ChatStreamingChoice$outboundSchema), - created: z.number(), - model: z.string(), - object: z.literal("chat.completion.chunk"), - systemFingerprint: z.nullable(z.string()).optional(), - error: z.lazy(() => ChatStreamingResponseChunkError$outboundSchema) - .optional(), - usage: ChatGenerationTokenUsage$outboundSchema.optional(), -}).transform((v) => { - return remap$(v, { - systemFingerprint: "system_fingerprint", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ChatStreamingResponseChunkData$ { - /** @deprecated use `ChatStreamingResponseChunkData$inboundSchema` instead. */ - export const inboundSchema = ChatStreamingResponseChunkData$inboundSchema; - /** @deprecated use `ChatStreamingResponseChunkData$outboundSchema` instead. */ - export const outboundSchema = ChatStreamingResponseChunkData$outboundSchema; - /** @deprecated use `ChatStreamingResponseChunkData$Outbound` instead. */ - export type Outbound = ChatStreamingResponseChunkData$Outbound; -} - -export function chatStreamingResponseChunkDataToJSON( - chatStreamingResponseChunkData: ChatStreamingResponseChunkData, -): string { - return JSON.stringify( - ChatStreamingResponseChunkData$outboundSchema.parse( - chatStreamingResponseChunkData, - ), - ); -} - export function chatStreamingResponseChunkDataFromJSON( jsonString: string, ): SafeParseResult { @@ -199,40 +102,6 @@ export const ChatStreamingResponseChunk$inboundSchema: z.ZodType< }).pipe(z.lazy(() => ChatStreamingResponseChunkData$inboundSchema)), }); -/** @internal */ -export type ChatStreamingResponseChunk$Outbound = { - data: ChatStreamingResponseChunkData$Outbound; -}; - -/** @internal */ -export const ChatStreamingResponseChunk$outboundSchema: z.ZodType< - ChatStreamingResponseChunk$Outbound, - ChatStreamingResponseChunk -> = z.object({ - data: z.lazy(() => ChatStreamingResponseChunkData$outboundSchema), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ChatStreamingResponseChunk$ { - /** @deprecated use `ChatStreamingResponseChunk$inboundSchema` instead. */ - export const inboundSchema = ChatStreamingResponseChunk$inboundSchema; - /** @deprecated use `ChatStreamingResponseChunk$outboundSchema` instead. */ - export const outboundSchema = ChatStreamingResponseChunk$outboundSchema; - /** @deprecated use `ChatStreamingResponseChunk$Outbound` instead. */ - export type Outbound = ChatStreamingResponseChunk$Outbound; -} - -export function chatStreamingResponseChunkToJSON( - chatStreamingResponseChunk: ChatStreamingResponseChunk, -): string { - return JSON.stringify( - ChatStreamingResponseChunk$outboundSchema.parse(chatStreamingResponseChunk), - ); -} - export function chatStreamingResponseChunkFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/chatstreamoptions.ts b/src/models/chatstreamoptions.ts index 68f5fa03..6a987f76 100644 --- a/src/models/chatstreamoptions.ts +++ b/src/models/chatstreamoptions.ts @@ -4,26 +4,11 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { Result as SafeParseResult } from "../types/fp.js"; -import { SDKValidationError } from "./errors/sdkvalidationerror.js"; export type ChatStreamOptions = { includeUsage?: boolean | undefined; }; -/** @internal */ -export const ChatStreamOptions$inboundSchema: z.ZodType< - ChatStreamOptions, - unknown -> = z.object({ - include_usage: z.boolean().optional(), -}).transform((v) => { - return remap$(v, { - "include_usage": "includeUsage", - }); -}); - /** @internal */ export type ChatStreamOptions$Outbound = { include_usage?: boolean | undefined; @@ -41,19 +26,6 @@ export const ChatStreamOptions$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ChatStreamOptions$ { - /** @deprecated use `ChatStreamOptions$inboundSchema` instead. */ - export const inboundSchema = ChatStreamOptions$inboundSchema; - /** @deprecated use `ChatStreamOptions$outboundSchema` instead. */ - export const outboundSchema = ChatStreamOptions$outboundSchema; - /** @deprecated use `ChatStreamOptions$Outbound` instead. */ - export type Outbound = ChatStreamOptions$Outbound; -} - export function chatStreamOptionsToJSON( chatStreamOptions: ChatStreamOptions, ): string { @@ -61,13 +33,3 @@ export function chatStreamOptionsToJSON( ChatStreamOptions$outboundSchema.parse(chatStreamOptions), ); } - -export function chatStreamOptionsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ChatStreamOptions$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ChatStreamOptions' from JSON`, - ); -} diff --git a/src/models/completionchoice.ts b/src/models/completionchoice.ts index 7685aa00..e9bc616e 100644 --- a/src/models/completionchoice.ts +++ b/src/models/completionchoice.ts @@ -5,17 +5,11 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; -import { - catchUnrecognizedEnum, - OpenEnum, - Unrecognized, -} from "../types/enums.js"; +import { catchUnrecognizedEnum, OpenEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { CompletionLogprobs, CompletionLogprobs$inboundSchema, - CompletionLogprobs$Outbound, - CompletionLogprobs$outboundSchema, } from "./completionlogprobs.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; @@ -43,26 +37,6 @@ export const CompletionFinishReason$inboundSchema: z.ZodType< z.string().transform(catchUnrecognizedEnum), ]); -/** @internal */ -export const CompletionFinishReason$outboundSchema: z.ZodType< - CompletionFinishReason, - CompletionFinishReason -> = z.union([ - z.enum(CompletionFinishReason), - z.string().and(z.custom>()), -]); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CompletionFinishReason$ { - /** @deprecated use `CompletionFinishReason$inboundSchema` instead. */ - export const inboundSchema = CompletionFinishReason$inboundSchema; - /** @deprecated use `CompletionFinishReason$outboundSchema` instead. */ - export const outboundSchema = CompletionFinishReason$outboundSchema; -} - /** @internal */ export const CompletionChoice$inboundSchema: z.ZodType< CompletionChoice, @@ -78,50 +52,6 @@ export const CompletionChoice$inboundSchema: z.ZodType< }); }); -/** @internal */ -export type CompletionChoice$Outbound = { - text: string; - index: number; - logprobs: CompletionLogprobs$Outbound | null; - finish_reason: string | null; -}; - -/** @internal */ -export const CompletionChoice$outboundSchema: z.ZodType< - CompletionChoice$Outbound, - CompletionChoice -> = z.object({ - text: z.string(), - index: z.number(), - logprobs: z.nullable(CompletionLogprobs$outboundSchema), - finishReason: z.nullable(CompletionFinishReason$outboundSchema), -}).transform((v) => { - return remap$(v, { - finishReason: "finish_reason", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CompletionChoice$ { - /** @deprecated use `CompletionChoice$inboundSchema` instead. */ - export const inboundSchema = CompletionChoice$inboundSchema; - /** @deprecated use `CompletionChoice$outboundSchema` instead. */ - export const outboundSchema = CompletionChoice$outboundSchema; - /** @deprecated use `CompletionChoice$Outbound` instead. */ - export type Outbound = CompletionChoice$Outbound; -} - -export function completionChoiceToJSON( - completionChoice: CompletionChoice, -): string { - return JSON.stringify( - CompletionChoice$outboundSchema.parse(completionChoice), - ); -} - export function completionChoiceFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/completioncreateparams.ts b/src/models/completioncreateparams.ts index 9d1f48b0..1c5258eb 100644 --- a/src/models/completioncreateparams.ts +++ b/src/models/completioncreateparams.ts @@ -4,18 +4,13 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { Result as SafeParseResult } from "../types/fp.js"; -import { SDKValidationError } from "./errors/sdkvalidationerror.js"; import { ResponseFormatJSONSchema, - ResponseFormatJSONSchema$inboundSchema, ResponseFormatJSONSchema$Outbound, ResponseFormatJSONSchema$outboundSchema, } from "./responseformatjsonschema.js"; import { ResponseFormatTextGrammar, - ResponseFormatTextGrammar$inboundSchema, ResponseFormatTextGrammar$Outbound, ResponseFormatTextGrammar$outboundSchema, } from "./responseformattextgrammar.js"; @@ -82,14 +77,6 @@ export type CompletionCreateParams = { | undefined; }; -/** @internal */ -export const Prompt$inboundSchema: z.ZodType = z.union([ - z.string(), - z.array(z.string()), - z.array(z.number()), - z.array(z.array(z.number())), -]); - /** @internal */ export type Prompt$Outbound = | string @@ -106,39 +93,10 @@ export const Prompt$outboundSchema: z.ZodType = z z.array(z.array(z.number())), ]); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Prompt$ { - /** @deprecated use `Prompt$inboundSchema` instead. */ - export const inboundSchema = Prompt$inboundSchema; - /** @deprecated use `Prompt$outboundSchema` instead. */ - export const outboundSchema = Prompt$outboundSchema; - /** @deprecated use `Prompt$Outbound` instead. */ - export type Outbound = Prompt$Outbound; -} - export function promptToJSON(prompt: Prompt): string { return JSON.stringify(Prompt$outboundSchema.parse(prompt)); } -export function promptFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Prompt$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Prompt' from JSON`, - ); -} - -/** @internal */ -export const CompletionCreateParamsStop$inboundSchema: z.ZodType< - CompletionCreateParamsStop, - unknown -> = z.union([z.string(), z.array(z.string())]); - /** @internal */ export type CompletionCreateParamsStop$Outbound = string | Array; @@ -148,19 +106,6 @@ export const CompletionCreateParamsStop$outboundSchema: z.ZodType< CompletionCreateParamsStop > = z.union([z.string(), z.array(z.string())]); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CompletionCreateParamsStop$ { - /** @deprecated use `CompletionCreateParamsStop$inboundSchema` instead. */ - export const inboundSchema = CompletionCreateParamsStop$inboundSchema; - /** @deprecated use `CompletionCreateParamsStop$outboundSchema` instead. */ - export const outboundSchema = CompletionCreateParamsStop$outboundSchema; - /** @deprecated use `CompletionCreateParamsStop$Outbound` instead. */ - export type Outbound = CompletionCreateParamsStop$Outbound; -} - export function completionCreateParamsStopToJSON( completionCreateParamsStop: CompletionCreateParamsStop, ): string { @@ -169,26 +114,6 @@ export function completionCreateParamsStopToJSON( ); } -export function completionCreateParamsStopFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CompletionCreateParamsStop$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CompletionCreateParamsStop' from JSON`, - ); -} - -/** @internal */ -export const StreamOptions$inboundSchema: z.ZodType = z - .object({ - include_usage: z.nullable(z.boolean()).optional(), - }).transform((v) => { - return remap$(v, { - "include_usage": "includeUsage", - }); - }); - /** @internal */ export type StreamOptions$Outbound = { include_usage?: boolean | null | undefined; @@ -206,39 +131,10 @@ export const StreamOptions$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace StreamOptions$ { - /** @deprecated use `StreamOptions$inboundSchema` instead. */ - export const inboundSchema = StreamOptions$inboundSchema; - /** @deprecated use `StreamOptions$outboundSchema` instead. */ - export const outboundSchema = StreamOptions$outboundSchema; - /** @deprecated use `StreamOptions$Outbound` instead. */ - export type Outbound = StreamOptions$Outbound; -} - export function streamOptionsToJSON(streamOptions: StreamOptions): string { return JSON.stringify(StreamOptions$outboundSchema.parse(streamOptions)); } -export function streamOptionsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => StreamOptions$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'StreamOptions' from JSON`, - ); -} - -/** @internal */ -export const CompletionCreateParamsResponseFormatPython$inboundSchema: - z.ZodType = z.object({ - type: z.literal("python"), - }); - /** @internal */ export type CompletionCreateParamsResponseFormatPython$Outbound = { type: "python"; @@ -253,21 +149,6 @@ export const CompletionCreateParamsResponseFormatPython$outboundSchema: type: z.literal("python"), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CompletionCreateParamsResponseFormatPython$ { - /** @deprecated use `CompletionCreateParamsResponseFormatPython$inboundSchema` instead. */ - export const inboundSchema = - CompletionCreateParamsResponseFormatPython$inboundSchema; - /** @deprecated use `CompletionCreateParamsResponseFormatPython$outboundSchema` instead. */ - export const outboundSchema = - CompletionCreateParamsResponseFormatPython$outboundSchema; - /** @deprecated use `CompletionCreateParamsResponseFormatPython$Outbound` instead. */ - export type Outbound = CompletionCreateParamsResponseFormatPython$Outbound; -} - export function completionCreateParamsResponseFormatPythonToJSON( completionCreateParamsResponseFormatPython: CompletionCreateParamsResponseFormatPython, @@ -279,30 +160,6 @@ export function completionCreateParamsResponseFormatPythonToJSON( ); } -export function completionCreateParamsResponseFormatPythonFromJSON( - jsonString: string, -): SafeParseResult< - CompletionCreateParamsResponseFormatPython, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - CompletionCreateParamsResponseFormatPython$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'CompletionCreateParamsResponseFormatPython' from JSON`, - ); -} - -/** @internal */ -export const CompletionCreateParamsResponseFormatJSONObject$inboundSchema: - z.ZodType = z.object( - { - type: z.literal("json_object"), - }, - ); - /** @internal */ export type CompletionCreateParamsResponseFormatJSONObject$Outbound = { type: "json_object"; @@ -317,22 +174,6 @@ export const CompletionCreateParamsResponseFormatJSONObject$outboundSchema: type: z.literal("json_object"), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CompletionCreateParamsResponseFormatJSONObject$ { - /** @deprecated use `CompletionCreateParamsResponseFormatJSONObject$inboundSchema` instead. */ - export const inboundSchema = - CompletionCreateParamsResponseFormatJSONObject$inboundSchema; - /** @deprecated use `CompletionCreateParamsResponseFormatJSONObject$outboundSchema` instead. */ - export const outboundSchema = - CompletionCreateParamsResponseFormatJSONObject$outboundSchema; - /** @deprecated use `CompletionCreateParamsResponseFormatJSONObject$Outbound` instead. */ - export type Outbound = - CompletionCreateParamsResponseFormatJSONObject$Outbound; -} - export function completionCreateParamsResponseFormatJSONObjectToJSON( completionCreateParamsResponseFormatJSONObject: CompletionCreateParamsResponseFormatJSONObject, @@ -344,30 +185,6 @@ export function completionCreateParamsResponseFormatJSONObjectToJSON( ); } -export function completionCreateParamsResponseFormatJSONObjectFromJSON( - jsonString: string, -): SafeParseResult< - CompletionCreateParamsResponseFormatJSONObject, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - CompletionCreateParamsResponseFormatJSONObject$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'CompletionCreateParamsResponseFormatJSONObject' from JSON`, - ); -} - -/** @internal */ -export const CompletionCreateParamsResponseFormatText$inboundSchema: z.ZodType< - CompletionCreateParamsResponseFormatText, - unknown -> = z.object({ - type: z.literal("text"), -}); - /** @internal */ export type CompletionCreateParamsResponseFormatText$Outbound = { type: "text"; @@ -381,21 +198,6 @@ export const CompletionCreateParamsResponseFormatText$outboundSchema: z.ZodType< type: z.literal("text"), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CompletionCreateParamsResponseFormatText$ { - /** @deprecated use `CompletionCreateParamsResponseFormatText$inboundSchema` instead. */ - export const inboundSchema = - CompletionCreateParamsResponseFormatText$inboundSchema; - /** @deprecated use `CompletionCreateParamsResponseFormatText$outboundSchema` instead. */ - export const outboundSchema = - CompletionCreateParamsResponseFormatText$outboundSchema; - /** @deprecated use `CompletionCreateParamsResponseFormatText$Outbound` instead. */ - export type Outbound = CompletionCreateParamsResponseFormatText$Outbound; -} - export function completionCreateParamsResponseFormatTextToJSON( completionCreateParamsResponseFormatText: CompletionCreateParamsResponseFormatText, @@ -407,34 +209,6 @@ export function completionCreateParamsResponseFormatTextToJSON( ); } -export function completionCreateParamsResponseFormatTextFromJSON( - jsonString: string, -): SafeParseResult< - CompletionCreateParamsResponseFormatText, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - CompletionCreateParamsResponseFormatText$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'CompletionCreateParamsResponseFormatText' from JSON`, - ); -} - -/** @internal */ -export const CompletionCreateParamsResponseFormatUnion$inboundSchema: z.ZodType< - CompletionCreateParamsResponseFormatUnion, - unknown -> = z.union([ - ResponseFormatJSONSchema$inboundSchema, - ResponseFormatTextGrammar$inboundSchema, - z.lazy(() => CompletionCreateParamsResponseFormatText$inboundSchema), - z.lazy(() => CompletionCreateParamsResponseFormatJSONObject$inboundSchema), - z.lazy(() => CompletionCreateParamsResponseFormatPython$inboundSchema), -]); - /** @internal */ export type CompletionCreateParamsResponseFormatUnion$Outbound = | ResponseFormatJSONSchema$Outbound @@ -456,21 +230,6 @@ export const CompletionCreateParamsResponseFormatUnion$outboundSchema: z.lazy(() => CompletionCreateParamsResponseFormatPython$outboundSchema), ]); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CompletionCreateParamsResponseFormatUnion$ { - /** @deprecated use `CompletionCreateParamsResponseFormatUnion$inboundSchema` instead. */ - export const inboundSchema = - CompletionCreateParamsResponseFormatUnion$inboundSchema; - /** @deprecated use `CompletionCreateParamsResponseFormatUnion$outboundSchema` instead. */ - export const outboundSchema = - CompletionCreateParamsResponseFormatUnion$outboundSchema; - /** @deprecated use `CompletionCreateParamsResponseFormatUnion$Outbound` instead. */ - export type Outbound = CompletionCreateParamsResponseFormatUnion$Outbound; -} - export function completionCreateParamsResponseFormatUnionToJSON( completionCreateParamsResponseFormatUnion: CompletionCreateParamsResponseFormatUnion, @@ -482,77 +241,6 @@ export function completionCreateParamsResponseFormatUnionToJSON( ); } -export function completionCreateParamsResponseFormatUnionFromJSON( - jsonString: string, -): SafeParseResult< - CompletionCreateParamsResponseFormatUnion, - SDKValidationError -> { - return safeParse( - jsonString, - (x) => - CompletionCreateParamsResponseFormatUnion$inboundSchema.parse( - JSON.parse(x), - ), - `Failed to parse 'CompletionCreateParamsResponseFormatUnion' from JSON`, - ); -} - -/** @internal */ -export const CompletionCreateParams$inboundSchema: z.ZodType< - CompletionCreateParams, - unknown -> = z.object({ - model: z.string().optional(), - models: z.array(z.string()).optional(), - prompt: z.union([ - z.string(), - z.array(z.string()), - z.array(z.number()), - z.array(z.array(z.number())), - ]), - best_of: z.nullable(z.number().int()).optional(), - echo: z.nullable(z.boolean()).optional(), - frequency_penalty: z.nullable(z.number()).optional(), - logit_bias: z.nullable(z.record(z.string(), z.number())).optional(), - logprobs: z.nullable(z.number().int()).optional(), - max_tokens: z.nullable(z.number().int()).optional(), - n: z.nullable(z.number().int()).optional(), - presence_penalty: z.nullable(z.number()).optional(), - seed: z.nullable(z.number().int()).optional(), - stop: z.nullable(z.union([z.string(), z.array(z.string())])).optional(), - stream: z.boolean().default(false), - stream_options: z.nullable(z.lazy(() => StreamOptions$inboundSchema)) - .optional(), - suffix: z.nullable(z.string()).optional(), - temperature: z.nullable(z.number()).optional(), - top_p: z.nullable(z.number()).optional(), - user: z.string().optional(), - metadata: z.nullable(z.record(z.string(), z.string())).optional(), - response_format: z.nullable( - z.union([ - ResponseFormatJSONSchema$inboundSchema, - ResponseFormatTextGrammar$inboundSchema, - z.lazy(() => CompletionCreateParamsResponseFormatText$inboundSchema), - z.lazy(() => - CompletionCreateParamsResponseFormatJSONObject$inboundSchema - ), - z.lazy(() => CompletionCreateParamsResponseFormatPython$inboundSchema), - ]), - ).optional(), -}).transform((v) => { - return remap$(v, { - "best_of": "bestOf", - "frequency_penalty": "frequencyPenalty", - "logit_bias": "logitBias", - "max_tokens": "maxTokens", - "presence_penalty": "presencePenalty", - "stream_options": "streamOptions", - "top_p": "topP", - "response_format": "responseFormat", - }); -}); - /** @internal */ export type CompletionCreateParams$Outbound = { model?: string | undefined; @@ -640,19 +328,6 @@ export const CompletionCreateParams$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CompletionCreateParams$ { - /** @deprecated use `CompletionCreateParams$inboundSchema` instead. */ - export const inboundSchema = CompletionCreateParams$inboundSchema; - /** @deprecated use `CompletionCreateParams$outboundSchema` instead. */ - export const outboundSchema = CompletionCreateParams$outboundSchema; - /** @deprecated use `CompletionCreateParams$Outbound` instead. */ - export type Outbound = CompletionCreateParams$Outbound; -} - export function completionCreateParamsToJSON( completionCreateParams: CompletionCreateParams, ): string { @@ -660,13 +335,3 @@ export function completionCreateParamsToJSON( CompletionCreateParams$outboundSchema.parse(completionCreateParams), ); } - -export function completionCreateParamsFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CompletionCreateParams$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CompletionCreateParams' from JSON`, - ); -} diff --git a/src/models/completionlogprobs.ts b/src/models/completionlogprobs.ts index 86bc7873..929d5286 100644 --- a/src/models/completionlogprobs.ts +++ b/src/models/completionlogprobs.ts @@ -32,52 +32,6 @@ export const CompletionLogprobs$inboundSchema: z.ZodType< }); }); -/** @internal */ -export type CompletionLogprobs$Outbound = { - tokens: Array; - token_logprobs: Array; - top_logprobs: Array<{ [k: string]: number }> | null; - text_offset: Array; -}; - -/** @internal */ -export const CompletionLogprobs$outboundSchema: z.ZodType< - CompletionLogprobs$Outbound, - CompletionLogprobs -> = z.object({ - tokens: z.array(z.string()), - tokenLogprobs: z.array(z.number()), - topLogprobs: z.nullable(z.array(z.record(z.string(), z.number()))), - textOffset: z.array(z.number()), -}).transform((v) => { - return remap$(v, { - tokenLogprobs: "token_logprobs", - topLogprobs: "top_logprobs", - textOffset: "text_offset", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CompletionLogprobs$ { - /** @deprecated use `CompletionLogprobs$inboundSchema` instead. */ - export const inboundSchema = CompletionLogprobs$inboundSchema; - /** @deprecated use `CompletionLogprobs$outboundSchema` instead. */ - export const outboundSchema = CompletionLogprobs$outboundSchema; - /** @deprecated use `CompletionLogprobs$Outbound` instead. */ - export type Outbound = CompletionLogprobs$Outbound; -} - -export function completionLogprobsToJSON( - completionLogprobs: CompletionLogprobs, -): string { - return JSON.stringify( - CompletionLogprobs$outboundSchema.parse(completionLogprobs), - ); -} - export function completionLogprobsFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/completionresponse.ts b/src/models/completionresponse.ts index 2567343c..c866e9da 100644 --- a/src/models/completionresponse.ts +++ b/src/models/completionresponse.ts @@ -9,14 +9,10 @@ import { Result as SafeParseResult } from "../types/fp.js"; import { CompletionChoice, CompletionChoice$inboundSchema, - CompletionChoice$Outbound, - CompletionChoice$outboundSchema, } from "./completionchoice.js"; import { CompletionUsage, CompletionUsage$inboundSchema, - CompletionUsage$Outbound, - CompletionUsage$outboundSchema, } from "./completionusage.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; @@ -48,56 +44,6 @@ export const CompletionResponse$inboundSchema: z.ZodType< }); }); -/** @internal */ -export type CompletionResponse$Outbound = { - id: string; - object: "text_completion"; - created: number; - model: string; - system_fingerprint?: string | undefined; - choices: Array; - usage?: CompletionUsage$Outbound | undefined; -}; - -/** @internal */ -export const CompletionResponse$outboundSchema: z.ZodType< - CompletionResponse$Outbound, - CompletionResponse -> = z.object({ - id: z.string(), - object: z.literal("text_completion"), - created: z.number(), - model: z.string(), - systemFingerprint: z.string().optional(), - choices: z.array(CompletionChoice$outboundSchema), - usage: CompletionUsage$outboundSchema.optional(), -}).transform((v) => { - return remap$(v, { - systemFingerprint: "system_fingerprint", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CompletionResponse$ { - /** @deprecated use `CompletionResponse$inboundSchema` instead. */ - export const inboundSchema = CompletionResponse$inboundSchema; - /** @deprecated use `CompletionResponse$outboundSchema` instead. */ - export const outboundSchema = CompletionResponse$outboundSchema; - /** @deprecated use `CompletionResponse$Outbound` instead. */ - export type Outbound = CompletionResponse$Outbound; -} - -export function completionResponseToJSON( - completionResponse: CompletionResponse, -): string { - return JSON.stringify( - CompletionResponse$outboundSchema.parse(completionResponse), - ); -} - export function completionResponseFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/completionusage.ts b/src/models/completionusage.ts index 1475dc45..c5cf5a17 100644 --- a/src/models/completionusage.ts +++ b/src/models/completionusage.ts @@ -30,48 +30,6 @@ export const CompletionUsage$inboundSchema: z.ZodType< }); }); -/** @internal */ -export type CompletionUsage$Outbound = { - prompt_tokens: number; - completion_tokens: number; - total_tokens: number; -}; - -/** @internal */ -export const CompletionUsage$outboundSchema: z.ZodType< - CompletionUsage$Outbound, - CompletionUsage -> = z.object({ - promptTokens: z.number(), - completionTokens: z.number(), - totalTokens: z.number(), -}).transform((v) => { - return remap$(v, { - promptTokens: "prompt_tokens", - completionTokens: "completion_tokens", - totalTokens: "total_tokens", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CompletionUsage$ { - /** @deprecated use `CompletionUsage$inboundSchema` instead. */ - export const inboundSchema = CompletionUsage$inboundSchema; - /** @deprecated use `CompletionUsage$outboundSchema` instead. */ - export const outboundSchema = CompletionUsage$outboundSchema; - /** @deprecated use `CompletionUsage$Outbound` instead. */ - export type Outbound = CompletionUsage$Outbound; -} - -export function completionUsageToJSON( - completionUsage: CompletionUsage, -): string { - return JSON.stringify(CompletionUsage$outboundSchema.parse(completionUsage)); -} - export function completionUsageFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/createchargerequest.ts b/src/models/createchargerequest.ts index bc8f078e..260df15d 100644 --- a/src/models/createchargerequest.ts +++ b/src/models/createchargerequest.ts @@ -4,14 +4,7 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { - catchUnrecognizedEnum, - OpenEnum, - Unrecognized, -} from "../types/enums.js"; -import { Result as SafeParseResult } from "../types/fp.js"; -import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { OpenEnum, Unrecognized } from "../types/enums.js"; export const ChainId = { One: 1, @@ -29,44 +22,12 @@ export type CreateChargeRequest = { chainId: ChainId; }; -/** @internal */ -export const ChainId$inboundSchema: z.ZodType = z - .union([ - z.enum(ChainId), - z.number().transform(catchUnrecognizedEnum), - ]); - /** @internal */ export const ChainId$outboundSchema: z.ZodType = z.union([ z.enum(ChainId), z.number().and(z.custom>()), ]); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ChainId$ { - /** @deprecated use `ChainId$inboundSchema` instead. */ - export const inboundSchema = ChainId$inboundSchema; - /** @deprecated use `ChainId$outboundSchema` instead. */ - export const outboundSchema = ChainId$outboundSchema; -} - -/** @internal */ -export const CreateChargeRequest$inboundSchema: z.ZodType< - CreateChargeRequest, - unknown -> = z.object({ - amount: z.number(), - sender: z.string(), - chain_id: ChainId$inboundSchema, -}).transform((v) => { - return remap$(v, { - "chain_id": "chainId", - }); -}); - /** @internal */ export type CreateChargeRequest$Outbound = { amount: number; @@ -88,19 +49,6 @@ export const CreateChargeRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateChargeRequest$ { - /** @deprecated use `CreateChargeRequest$inboundSchema` instead. */ - export const inboundSchema = CreateChargeRequest$inboundSchema; - /** @deprecated use `CreateChargeRequest$outboundSchema` instead. */ - export const outboundSchema = CreateChargeRequest$outboundSchema; - /** @deprecated use `CreateChargeRequest$Outbound` instead. */ - export type Outbound = CreateChargeRequest$Outbound; -} - export function createChargeRequestToJSON( createChargeRequest: CreateChargeRequest, ): string { @@ -108,13 +56,3 @@ export function createChargeRequestToJSON( CreateChargeRequest$outboundSchema.parse(createChargeRequest), ); } - -export function createChargeRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CreateChargeRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CreateChargeRequest' from JSON`, - ); -} diff --git a/src/models/defaultparameters.ts b/src/models/defaultparameters.ts index bbbf1ad6..a9161e79 100644 --- a/src/models/defaultparameters.ts +++ b/src/models/defaultparameters.ts @@ -32,49 +32,6 @@ export const DefaultParameters$inboundSchema: z.ZodType< }); }); -/** @internal */ -export type DefaultParameters$Outbound = { - temperature?: number | null | undefined; - top_p?: number | null | undefined; - frequency_penalty?: number | null | undefined; -}; - -/** @internal */ -export const DefaultParameters$outboundSchema: z.ZodType< - DefaultParameters$Outbound, - DefaultParameters -> = z.object({ - temperature: z.nullable(z.number()).optional(), - topP: z.nullable(z.number()).optional(), - frequencyPenalty: z.nullable(z.number()).optional(), -}).transform((v) => { - return remap$(v, { - topP: "top_p", - frequencyPenalty: "frequency_penalty", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace DefaultParameters$ { - /** @deprecated use `DefaultParameters$inboundSchema` instead. */ - export const inboundSchema = DefaultParameters$inboundSchema; - /** @deprecated use `DefaultParameters$outboundSchema` instead. */ - export const outboundSchema = DefaultParameters$outboundSchema; - /** @deprecated use `DefaultParameters$Outbound` instead. */ - export type Outbound = DefaultParameters$Outbound; -} - -export function defaultParametersToJSON( - defaultParameters: DefaultParameters, -): string { - return JSON.stringify( - DefaultParameters$outboundSchema.parse(defaultParameters), - ); -} - export function defaultParametersFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/edgenetworktimeoutresponseerrordata.ts b/src/models/edgenetworktimeoutresponseerrordata.ts index b21ff340..0bad8f5e 100644 --- a/src/models/edgenetworktimeoutresponseerrordata.ts +++ b/src/models/edgenetworktimeoutresponseerrordata.ts @@ -26,48 +26,6 @@ export const EdgeNetworkTimeoutResponseErrorData$inboundSchema: z.ZodType< metadata: z.nullable(z.record(z.string(), z.nullable(z.any()))).optional(), }); -/** @internal */ -export type EdgeNetworkTimeoutResponseErrorData$Outbound = { - code: number; - message: string; - metadata?: { [k: string]: any | null } | null | undefined; -}; - -/** @internal */ -export const EdgeNetworkTimeoutResponseErrorData$outboundSchema: z.ZodType< - EdgeNetworkTimeoutResponseErrorData$Outbound, - EdgeNetworkTimeoutResponseErrorData -> = z.object({ - code: z.number().int(), - message: z.string(), - metadata: z.nullable(z.record(z.string(), z.nullable(z.any()))).optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace EdgeNetworkTimeoutResponseErrorData$ { - /** @deprecated use `EdgeNetworkTimeoutResponseErrorData$inboundSchema` instead. */ - export const inboundSchema = - EdgeNetworkTimeoutResponseErrorData$inboundSchema; - /** @deprecated use `EdgeNetworkTimeoutResponseErrorData$outboundSchema` instead. */ - export const outboundSchema = - EdgeNetworkTimeoutResponseErrorData$outboundSchema; - /** @deprecated use `EdgeNetworkTimeoutResponseErrorData$Outbound` instead. */ - export type Outbound = EdgeNetworkTimeoutResponseErrorData$Outbound; -} - -export function edgeNetworkTimeoutResponseErrorDataToJSON( - edgeNetworkTimeoutResponseErrorData: EdgeNetworkTimeoutResponseErrorData, -): string { - return JSON.stringify( - EdgeNetworkTimeoutResponseErrorData$outboundSchema.parse( - edgeNetworkTimeoutResponseErrorData, - ), - ); -} - export function edgeNetworkTimeoutResponseErrorDataFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/endpointstatus.ts b/src/models/endpointstatus.ts index 73733287..10a8408e 100644 --- a/src/models/endpointstatus.ts +++ b/src/models/endpointstatus.ts @@ -3,11 +3,7 @@ */ import * as z from "zod/v4"; -import { - catchUnrecognizedEnum, - OpenEnum, - Unrecognized, -} from "../types/enums.js"; +import { catchUnrecognizedEnum, OpenEnum } from "../types/enums.js"; export const EndpointStatus = { Zero: 0, @@ -26,23 +22,3 @@ export const EndpointStatus$inboundSchema: z.ZodType = z.enum(EndpointStatus), z.number().transform(catchUnrecognizedEnum), ]); - -/** @internal */ -export const EndpointStatus$outboundSchema: z.ZodType< - EndpointStatus, - EndpointStatus -> = z.union([ - z.enum(EndpointStatus), - z.number().and(z.custom>()), -]); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace EndpointStatus$ { - /** @deprecated use `EndpointStatus$inboundSchema` instead. */ - export const inboundSchema = EndpointStatus$inboundSchema; - /** @deprecated use `EndpointStatus$outboundSchema` instead. */ - export const outboundSchema = EndpointStatus$outboundSchema; -} diff --git a/src/models/errors/badgatewayresponseerror.ts b/src/models/errors/badgatewayresponseerror.ts index fa673a2b..e7882291 100644 --- a/src/models/errors/badgatewayresponseerror.ts +++ b/src/models/errors/badgatewayresponseerror.ts @@ -68,39 +68,3 @@ export const BadGatewayResponseError$inboundSchema: z.ZodType< body: v.body$, }); }); - -/** @internal */ -export type BadGatewayResponseError$Outbound = { - error: models.BadGatewayResponseErrorData$Outbound; - user_id?: string | null | undefined; -}; - -/** @internal */ -export const BadGatewayResponseError$outboundSchema: z.ZodType< - BadGatewayResponseError$Outbound, - BadGatewayResponseError -> = z.custom(x => x instanceof BadGatewayResponseError) - .transform(v => v.data$) - .pipe( - z.object({ - error: models.BadGatewayResponseErrorData$outboundSchema, - userId: z.nullable(z.string()).optional(), - }).transform((v) => { - return remap$(v, { - userId: "user_id", - }); - }), - ); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace BadGatewayResponseError$ { - /** @deprecated use `BadGatewayResponseError$inboundSchema` instead. */ - export const inboundSchema = BadGatewayResponseError$inboundSchema; - /** @deprecated use `BadGatewayResponseError$outboundSchema` instead. */ - export const outboundSchema = BadGatewayResponseError$outboundSchema; - /** @deprecated use `BadGatewayResponseError$Outbound` instead. */ - export type Outbound = BadGatewayResponseError$Outbound; -} diff --git a/src/models/errors/badrequestresponseerror.ts b/src/models/errors/badrequestresponseerror.ts index 07fedbc0..78ee4b48 100644 --- a/src/models/errors/badrequestresponseerror.ts +++ b/src/models/errors/badrequestresponseerror.ts @@ -68,39 +68,3 @@ export const BadRequestResponseError$inboundSchema: z.ZodType< body: v.body$, }); }); - -/** @internal */ -export type BadRequestResponseError$Outbound = { - error: models.BadRequestResponseErrorData$Outbound; - user_id?: string | null | undefined; -}; - -/** @internal */ -export const BadRequestResponseError$outboundSchema: z.ZodType< - BadRequestResponseError$Outbound, - BadRequestResponseError -> = z.custom(x => x instanceof BadRequestResponseError) - .transform(v => v.data$) - .pipe( - z.object({ - error: models.BadRequestResponseErrorData$outboundSchema, - userId: z.nullable(z.string()).optional(), - }).transform((v) => { - return remap$(v, { - userId: "user_id", - }); - }), - ); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace BadRequestResponseError$ { - /** @deprecated use `BadRequestResponseError$inboundSchema` instead. */ - export const inboundSchema = BadRequestResponseError$inboundSchema; - /** @deprecated use `BadRequestResponseError$outboundSchema` instead. */ - export const outboundSchema = BadRequestResponseError$outboundSchema; - /** @deprecated use `BadRequestResponseError$Outbound` instead. */ - export type Outbound = BadRequestResponseError$Outbound; -} diff --git a/src/models/errors/chaterror.ts b/src/models/errors/chaterror.ts index cced515c..6b59af29 100644 --- a/src/models/errors/chaterror.ts +++ b/src/models/errors/chaterror.ts @@ -44,31 +44,3 @@ export const ChatError$inboundSchema: z.ZodType = z.object({ body: v.body$, }); }); - -/** @internal */ -export type ChatError$Outbound = { - error: models.ChatErrorError$Outbound; -}; - -/** @internal */ -export const ChatError$outboundSchema: z.ZodType< - ChatError$Outbound, - ChatError -> = z.custom(x => x instanceof ChatError) - .transform(v => v.data$) - .pipe(z.object({ - error: z.lazy(() => models.ChatErrorError$outboundSchema), - })); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ChatError$ { - /** @deprecated use `ChatError$inboundSchema` instead. */ - export const inboundSchema = ChatError$inboundSchema; - /** @deprecated use `ChatError$outboundSchema` instead. */ - export const outboundSchema = ChatError$outboundSchema; - /** @deprecated use `ChatError$Outbound` instead. */ - export type Outbound = ChatError$Outbound; -} diff --git a/src/models/errors/edgenetworktimeoutresponseerror.ts b/src/models/errors/edgenetworktimeoutresponseerror.ts index 89004676..6e76cb1b 100644 --- a/src/models/errors/edgenetworktimeoutresponseerror.ts +++ b/src/models/errors/edgenetworktimeoutresponseerror.ts @@ -68,41 +68,3 @@ export const EdgeNetworkTimeoutResponseError$inboundSchema: z.ZodType< body: v.body$, }); }); - -/** @internal */ -export type EdgeNetworkTimeoutResponseError$Outbound = { - error: models.EdgeNetworkTimeoutResponseErrorData$Outbound; - user_id?: string | null | undefined; -}; - -/** @internal */ -export const EdgeNetworkTimeoutResponseError$outboundSchema: z.ZodType< - EdgeNetworkTimeoutResponseError$Outbound, - EdgeNetworkTimeoutResponseError -> = z.custom(x => - x instanceof EdgeNetworkTimeoutResponseError -) - .transform(v => v.data$) - .pipe( - z.object({ - error: models.EdgeNetworkTimeoutResponseErrorData$outboundSchema, - userId: z.nullable(z.string()).optional(), - }).transform((v) => { - return remap$(v, { - userId: "user_id", - }); - }), - ); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace EdgeNetworkTimeoutResponseError$ { - /** @deprecated use `EdgeNetworkTimeoutResponseError$inboundSchema` instead. */ - export const inboundSchema = EdgeNetworkTimeoutResponseError$inboundSchema; - /** @deprecated use `EdgeNetworkTimeoutResponseError$outboundSchema` instead. */ - export const outboundSchema = EdgeNetworkTimeoutResponseError$outboundSchema; - /** @deprecated use `EdgeNetworkTimeoutResponseError$Outbound` instead. */ - export type Outbound = EdgeNetworkTimeoutResponseError$Outbound; -} diff --git a/src/models/errors/forbiddenresponseerror.ts b/src/models/errors/forbiddenresponseerror.ts index a704a7fc..efc9de83 100644 --- a/src/models/errors/forbiddenresponseerror.ts +++ b/src/models/errors/forbiddenresponseerror.ts @@ -68,39 +68,3 @@ export const ForbiddenResponseError$inboundSchema: z.ZodType< body: v.body$, }); }); - -/** @internal */ -export type ForbiddenResponseError$Outbound = { - error: models.ForbiddenResponseErrorData$Outbound; - user_id?: string | null | undefined; -}; - -/** @internal */ -export const ForbiddenResponseError$outboundSchema: z.ZodType< - ForbiddenResponseError$Outbound, - ForbiddenResponseError -> = z.custom(x => x instanceof ForbiddenResponseError) - .transform(v => v.data$) - .pipe( - z.object({ - error: models.ForbiddenResponseErrorData$outboundSchema, - userId: z.nullable(z.string()).optional(), - }).transform((v) => { - return remap$(v, { - userId: "user_id", - }); - }), - ); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ForbiddenResponseError$ { - /** @deprecated use `ForbiddenResponseError$inboundSchema` instead. */ - export const inboundSchema = ForbiddenResponseError$inboundSchema; - /** @deprecated use `ForbiddenResponseError$outboundSchema` instead. */ - export const outboundSchema = ForbiddenResponseError$outboundSchema; - /** @deprecated use `ForbiddenResponseError$Outbound` instead. */ - export type Outbound = ForbiddenResponseError$Outbound; -} diff --git a/src/models/errors/internalserverresponseerror.ts b/src/models/errors/internalserverresponseerror.ts index 3010b18c..bde8483e 100644 --- a/src/models/errors/internalserverresponseerror.ts +++ b/src/models/errors/internalserverresponseerror.ts @@ -68,41 +68,3 @@ export const InternalServerResponseError$inboundSchema: z.ZodType< body: v.body$, }); }); - -/** @internal */ -export type InternalServerResponseError$Outbound = { - error: models.InternalServerResponseErrorData$Outbound; - user_id?: string | null | undefined; -}; - -/** @internal */ -export const InternalServerResponseError$outboundSchema: z.ZodType< - InternalServerResponseError$Outbound, - InternalServerResponseError -> = z.custom(x => - x instanceof InternalServerResponseError -) - .transform(v => v.data$) - .pipe( - z.object({ - error: models.InternalServerResponseErrorData$outboundSchema, - userId: z.nullable(z.string()).optional(), - }).transform((v) => { - return remap$(v, { - userId: "user_id", - }); - }), - ); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace InternalServerResponseError$ { - /** @deprecated use `InternalServerResponseError$inboundSchema` instead. */ - export const inboundSchema = InternalServerResponseError$inboundSchema; - /** @deprecated use `InternalServerResponseError$outboundSchema` instead. */ - export const outboundSchema = InternalServerResponseError$outboundSchema; - /** @deprecated use `InternalServerResponseError$Outbound` instead. */ - export type Outbound = InternalServerResponseError$Outbound; -} diff --git a/src/models/errors/notfoundresponseerror.ts b/src/models/errors/notfoundresponseerror.ts index cb27432d..e3e8f126 100644 --- a/src/models/errors/notfoundresponseerror.ts +++ b/src/models/errors/notfoundresponseerror.ts @@ -68,39 +68,3 @@ export const NotFoundResponseError$inboundSchema: z.ZodType< body: v.body$, }); }); - -/** @internal */ -export type NotFoundResponseError$Outbound = { - error: models.NotFoundResponseErrorData$Outbound; - user_id?: string | null | undefined; -}; - -/** @internal */ -export const NotFoundResponseError$outboundSchema: z.ZodType< - NotFoundResponseError$Outbound, - NotFoundResponseError -> = z.custom(x => x instanceof NotFoundResponseError) - .transform(v => v.data$) - .pipe( - z.object({ - error: models.NotFoundResponseErrorData$outboundSchema, - userId: z.nullable(z.string()).optional(), - }).transform((v) => { - return remap$(v, { - userId: "user_id", - }); - }), - ); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace NotFoundResponseError$ { - /** @deprecated use `NotFoundResponseError$inboundSchema` instead. */ - export const inboundSchema = NotFoundResponseError$inboundSchema; - /** @deprecated use `NotFoundResponseError$outboundSchema` instead. */ - export const outboundSchema = NotFoundResponseError$outboundSchema; - /** @deprecated use `NotFoundResponseError$Outbound` instead. */ - export type Outbound = NotFoundResponseError$Outbound; -} diff --git a/src/models/errors/payloadtoolargeresponseerror.ts b/src/models/errors/payloadtoolargeresponseerror.ts index 8bcbe6db..ff30548b 100644 --- a/src/models/errors/payloadtoolargeresponseerror.ts +++ b/src/models/errors/payloadtoolargeresponseerror.ts @@ -68,41 +68,3 @@ export const PayloadTooLargeResponseError$inboundSchema: z.ZodType< body: v.body$, }); }); - -/** @internal */ -export type PayloadTooLargeResponseError$Outbound = { - error: models.PayloadTooLargeResponseErrorData$Outbound; - user_id?: string | null | undefined; -}; - -/** @internal */ -export const PayloadTooLargeResponseError$outboundSchema: z.ZodType< - PayloadTooLargeResponseError$Outbound, - PayloadTooLargeResponseError -> = z.custom(x => - x instanceof PayloadTooLargeResponseError -) - .transform(v => v.data$) - .pipe( - z.object({ - error: models.PayloadTooLargeResponseErrorData$outboundSchema, - userId: z.nullable(z.string()).optional(), - }).transform((v) => { - return remap$(v, { - userId: "user_id", - }); - }), - ); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PayloadTooLargeResponseError$ { - /** @deprecated use `PayloadTooLargeResponseError$inboundSchema` instead. */ - export const inboundSchema = PayloadTooLargeResponseError$inboundSchema; - /** @deprecated use `PayloadTooLargeResponseError$outboundSchema` instead. */ - export const outboundSchema = PayloadTooLargeResponseError$outboundSchema; - /** @deprecated use `PayloadTooLargeResponseError$Outbound` instead. */ - export type Outbound = PayloadTooLargeResponseError$Outbound; -} diff --git a/src/models/errors/paymentrequiredresponseerror.ts b/src/models/errors/paymentrequiredresponseerror.ts index 68937403..7943bcd5 100644 --- a/src/models/errors/paymentrequiredresponseerror.ts +++ b/src/models/errors/paymentrequiredresponseerror.ts @@ -68,41 +68,3 @@ export const PaymentRequiredResponseError$inboundSchema: z.ZodType< body: v.body$, }); }); - -/** @internal */ -export type PaymentRequiredResponseError$Outbound = { - error: models.PaymentRequiredResponseErrorData$Outbound; - user_id?: string | null | undefined; -}; - -/** @internal */ -export const PaymentRequiredResponseError$outboundSchema: z.ZodType< - PaymentRequiredResponseError$Outbound, - PaymentRequiredResponseError -> = z.custom(x => - x instanceof PaymentRequiredResponseError -) - .transform(v => v.data$) - .pipe( - z.object({ - error: models.PaymentRequiredResponseErrorData$outboundSchema, - userId: z.nullable(z.string()).optional(), - }).transform((v) => { - return remap$(v, { - userId: "user_id", - }); - }), - ); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PaymentRequiredResponseError$ { - /** @deprecated use `PaymentRequiredResponseError$inboundSchema` instead. */ - export const inboundSchema = PaymentRequiredResponseError$inboundSchema; - /** @deprecated use `PaymentRequiredResponseError$outboundSchema` instead. */ - export const outboundSchema = PaymentRequiredResponseError$outboundSchema; - /** @deprecated use `PaymentRequiredResponseError$Outbound` instead. */ - export type Outbound = PaymentRequiredResponseError$Outbound; -} diff --git a/src/models/errors/provideroverloadedresponseerror.ts b/src/models/errors/provideroverloadedresponseerror.ts index 0b58f65d..977f9f3e 100644 --- a/src/models/errors/provideroverloadedresponseerror.ts +++ b/src/models/errors/provideroverloadedresponseerror.ts @@ -68,41 +68,3 @@ export const ProviderOverloadedResponseError$inboundSchema: z.ZodType< body: v.body$, }); }); - -/** @internal */ -export type ProviderOverloadedResponseError$Outbound = { - error: models.ProviderOverloadedResponseErrorData$Outbound; - user_id?: string | null | undefined; -}; - -/** @internal */ -export const ProviderOverloadedResponseError$outboundSchema: z.ZodType< - ProviderOverloadedResponseError$Outbound, - ProviderOverloadedResponseError -> = z.custom(x => - x instanceof ProviderOverloadedResponseError -) - .transform(v => v.data$) - .pipe( - z.object({ - error: models.ProviderOverloadedResponseErrorData$outboundSchema, - userId: z.nullable(z.string()).optional(), - }).transform((v) => { - return remap$(v, { - userId: "user_id", - }); - }), - ); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ProviderOverloadedResponseError$ { - /** @deprecated use `ProviderOverloadedResponseError$inboundSchema` instead. */ - export const inboundSchema = ProviderOverloadedResponseError$inboundSchema; - /** @deprecated use `ProviderOverloadedResponseError$outboundSchema` instead. */ - export const outboundSchema = ProviderOverloadedResponseError$outboundSchema; - /** @deprecated use `ProviderOverloadedResponseError$Outbound` instead. */ - export type Outbound = ProviderOverloadedResponseError$Outbound; -} diff --git a/src/models/errors/requesttimeoutresponseerror.ts b/src/models/errors/requesttimeoutresponseerror.ts index 5459e994..0a4dbca1 100644 --- a/src/models/errors/requesttimeoutresponseerror.ts +++ b/src/models/errors/requesttimeoutresponseerror.ts @@ -68,41 +68,3 @@ export const RequestTimeoutResponseError$inboundSchema: z.ZodType< body: v.body$, }); }); - -/** @internal */ -export type RequestTimeoutResponseError$Outbound = { - error: models.RequestTimeoutResponseErrorData$Outbound; - user_id?: string | null | undefined; -}; - -/** @internal */ -export const RequestTimeoutResponseError$outboundSchema: z.ZodType< - RequestTimeoutResponseError$Outbound, - RequestTimeoutResponseError -> = z.custom(x => - x instanceof RequestTimeoutResponseError -) - .transform(v => v.data$) - .pipe( - z.object({ - error: models.RequestTimeoutResponseErrorData$outboundSchema, - userId: z.nullable(z.string()).optional(), - }).transform((v) => { - return remap$(v, { - userId: "user_id", - }); - }), - ); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace RequestTimeoutResponseError$ { - /** @deprecated use `RequestTimeoutResponseError$inboundSchema` instead. */ - export const inboundSchema = RequestTimeoutResponseError$inboundSchema; - /** @deprecated use `RequestTimeoutResponseError$outboundSchema` instead. */ - export const outboundSchema = RequestTimeoutResponseError$outboundSchema; - /** @deprecated use `RequestTimeoutResponseError$Outbound` instead. */ - export type Outbound = RequestTimeoutResponseError$Outbound; -} diff --git a/src/models/errors/serviceunavailableresponseerror.ts b/src/models/errors/serviceunavailableresponseerror.ts index 1d3f81db..2398a2d4 100644 --- a/src/models/errors/serviceunavailableresponseerror.ts +++ b/src/models/errors/serviceunavailableresponseerror.ts @@ -68,41 +68,3 @@ export const ServiceUnavailableResponseError$inboundSchema: z.ZodType< body: v.body$, }); }); - -/** @internal */ -export type ServiceUnavailableResponseError$Outbound = { - error: models.ServiceUnavailableResponseErrorData$Outbound; - user_id?: string | null | undefined; -}; - -/** @internal */ -export const ServiceUnavailableResponseError$outboundSchema: z.ZodType< - ServiceUnavailableResponseError$Outbound, - ServiceUnavailableResponseError -> = z.custom(x => - x instanceof ServiceUnavailableResponseError -) - .transform(v => v.data$) - .pipe( - z.object({ - error: models.ServiceUnavailableResponseErrorData$outboundSchema, - userId: z.nullable(z.string()).optional(), - }).transform((v) => { - return remap$(v, { - userId: "user_id", - }); - }), - ); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ServiceUnavailableResponseError$ { - /** @deprecated use `ServiceUnavailableResponseError$inboundSchema` instead. */ - export const inboundSchema = ServiceUnavailableResponseError$inboundSchema; - /** @deprecated use `ServiceUnavailableResponseError$outboundSchema` instead. */ - export const outboundSchema = ServiceUnavailableResponseError$outboundSchema; - /** @deprecated use `ServiceUnavailableResponseError$Outbound` instead. */ - export type Outbound = ServiceUnavailableResponseError$Outbound; -} diff --git a/src/models/errors/toomanyrequestsresponseerror.ts b/src/models/errors/toomanyrequestsresponseerror.ts index e534eefe..72f952e6 100644 --- a/src/models/errors/toomanyrequestsresponseerror.ts +++ b/src/models/errors/toomanyrequestsresponseerror.ts @@ -68,41 +68,3 @@ export const TooManyRequestsResponseError$inboundSchema: z.ZodType< body: v.body$, }); }); - -/** @internal */ -export type TooManyRequestsResponseError$Outbound = { - error: models.TooManyRequestsResponseErrorData$Outbound; - user_id?: string | null | undefined; -}; - -/** @internal */ -export const TooManyRequestsResponseError$outboundSchema: z.ZodType< - TooManyRequestsResponseError$Outbound, - TooManyRequestsResponseError -> = z.custom(x => - x instanceof TooManyRequestsResponseError -) - .transform(v => v.data$) - .pipe( - z.object({ - error: models.TooManyRequestsResponseErrorData$outboundSchema, - userId: z.nullable(z.string()).optional(), - }).transform((v) => { - return remap$(v, { - userId: "user_id", - }); - }), - ); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace TooManyRequestsResponseError$ { - /** @deprecated use `TooManyRequestsResponseError$inboundSchema` instead. */ - export const inboundSchema = TooManyRequestsResponseError$inboundSchema; - /** @deprecated use `TooManyRequestsResponseError$outboundSchema` instead. */ - export const outboundSchema = TooManyRequestsResponseError$outboundSchema; - /** @deprecated use `TooManyRequestsResponseError$Outbound` instead. */ - export type Outbound = TooManyRequestsResponseError$Outbound; -} diff --git a/src/models/errors/unauthorizedresponseerror.ts b/src/models/errors/unauthorizedresponseerror.ts index b7410dbc..714c269f 100644 --- a/src/models/errors/unauthorizedresponseerror.ts +++ b/src/models/errors/unauthorizedresponseerror.ts @@ -68,41 +68,3 @@ export const UnauthorizedResponseError$inboundSchema: z.ZodType< body: v.body$, }); }); - -/** @internal */ -export type UnauthorizedResponseError$Outbound = { - error: models.UnauthorizedResponseErrorData$Outbound; - user_id?: string | null | undefined; -}; - -/** @internal */ -export const UnauthorizedResponseError$outboundSchema: z.ZodType< - UnauthorizedResponseError$Outbound, - UnauthorizedResponseError -> = z.custom(x => - x instanceof UnauthorizedResponseError -) - .transform(v => v.data$) - .pipe( - z.object({ - error: models.UnauthorizedResponseErrorData$outboundSchema, - userId: z.nullable(z.string()).optional(), - }).transform((v) => { - return remap$(v, { - userId: "user_id", - }); - }), - ); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UnauthorizedResponseError$ { - /** @deprecated use `UnauthorizedResponseError$inboundSchema` instead. */ - export const inboundSchema = UnauthorizedResponseError$inboundSchema; - /** @deprecated use `UnauthorizedResponseError$outboundSchema` instead. */ - export const outboundSchema = UnauthorizedResponseError$outboundSchema; - /** @deprecated use `UnauthorizedResponseError$Outbound` instead. */ - export type Outbound = UnauthorizedResponseError$Outbound; -} diff --git a/src/models/errors/unprocessableentityresponseerror.ts b/src/models/errors/unprocessableentityresponseerror.ts index b803c0e2..2c35cd2c 100644 --- a/src/models/errors/unprocessableentityresponseerror.ts +++ b/src/models/errors/unprocessableentityresponseerror.ts @@ -68,41 +68,3 @@ export const UnprocessableEntityResponseError$inboundSchema: z.ZodType< body: v.body$, }); }); - -/** @internal */ -export type UnprocessableEntityResponseError$Outbound = { - error: models.UnprocessableEntityResponseErrorData$Outbound; - user_id?: string | null | undefined; -}; - -/** @internal */ -export const UnprocessableEntityResponseError$outboundSchema: z.ZodType< - UnprocessableEntityResponseError$Outbound, - UnprocessableEntityResponseError -> = z.custom(x => - x instanceof UnprocessableEntityResponseError -) - .transform(v => v.data$) - .pipe( - z.object({ - error: models.UnprocessableEntityResponseErrorData$outboundSchema, - userId: z.nullable(z.string()).optional(), - }).transform((v) => { - return remap$(v, { - userId: "user_id", - }); - }), - ); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UnprocessableEntityResponseError$ { - /** @deprecated use `UnprocessableEntityResponseError$inboundSchema` instead. */ - export const inboundSchema = UnprocessableEntityResponseError$inboundSchema; - /** @deprecated use `UnprocessableEntityResponseError$outboundSchema` instead. */ - export const outboundSchema = UnprocessableEntityResponseError$outboundSchema; - /** @deprecated use `UnprocessableEntityResponseError$Outbound` instead. */ - export type Outbound = UnprocessableEntityResponseError$Outbound; -} diff --git a/src/models/filecitation.ts b/src/models/filecitation.ts index 9188f1a5..cd3723da 100644 --- a/src/models/filecitation.ts +++ b/src/models/filecitation.ts @@ -25,23 +25,11 @@ export type FileCitation = { export const FileCitationType$inboundSchema: z.ZodEnum< typeof FileCitationType > = z.enum(FileCitationType); - /** @internal */ export const FileCitationType$outboundSchema: z.ZodEnum< typeof FileCitationType > = FileCitationType$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace FileCitationType$ { - /** @deprecated use `FileCitationType$inboundSchema` instead. */ - export const inboundSchema = FileCitationType$inboundSchema; - /** @deprecated use `FileCitationType$outboundSchema` instead. */ - export const outboundSchema = FileCitationType$outboundSchema; -} - /** @internal */ export const FileCitation$inboundSchema: z.ZodType = z .object({ @@ -54,7 +42,6 @@ export const FileCitation$inboundSchema: z.ZodType = z "file_id": "fileId", }); }); - /** @internal */ export type FileCitation$Outbound = { type: string; @@ -78,23 +65,9 @@ export const FileCitation$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace FileCitation$ { - /** @deprecated use `FileCitation$inboundSchema` instead. */ - export const inboundSchema = FileCitation$inboundSchema; - /** @deprecated use `FileCitation$outboundSchema` instead. */ - export const outboundSchema = FileCitation$outboundSchema; - /** @deprecated use `FileCitation$Outbound` instead. */ - export type Outbound = FileCitation$Outbound; -} - export function fileCitationToJSON(fileCitation: FileCitation): string { return JSON.stringify(FileCitation$outboundSchema.parse(fileCitation)); } - export function fileCitationFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/filepath.ts b/src/models/filepath.ts index 30d5997d..32b84dd3 100644 --- a/src/models/filepath.ts +++ b/src/models/filepath.ts @@ -23,22 +23,10 @@ export type FilePath = { /** @internal */ export const FilePathType$inboundSchema: z.ZodEnum = z .enum(FilePathType); - /** @internal */ export const FilePathType$outboundSchema: z.ZodEnum = FilePathType$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace FilePathType$ { - /** @deprecated use `FilePathType$inboundSchema` instead. */ - export const inboundSchema = FilePathType$inboundSchema; - /** @deprecated use `FilePathType$outboundSchema` instead. */ - export const outboundSchema = FilePathType$outboundSchema; -} - /** @internal */ export const FilePath$inboundSchema: z.ZodType = z.object({ type: FilePathType$inboundSchema, @@ -49,7 +37,6 @@ export const FilePath$inboundSchema: z.ZodType = z.object({ "file_id": "fileId", }); }); - /** @internal */ export type FilePath$Outbound = { type: string; @@ -69,23 +56,9 @@ export const FilePath$outboundSchema: z.ZodType = z }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace FilePath$ { - /** @deprecated use `FilePath$inboundSchema` instead. */ - export const inboundSchema = FilePath$inboundSchema; - /** @deprecated use `FilePath$outboundSchema` instead. */ - export const outboundSchema = FilePath$outboundSchema; - /** @deprecated use `FilePath$Outbound` instead. */ - export type Outbound = FilePath$Outbound; -} - export function filePathToJSON(filePath: FilePath): string { return JSON.stringify(FilePath$outboundSchema.parse(filePath)); } - export function filePathFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/forbiddenresponseerrordata.ts b/src/models/forbiddenresponseerrordata.ts index 0016eba4..f5f300ab 100644 --- a/src/models/forbiddenresponseerrordata.ts +++ b/src/models/forbiddenresponseerrordata.ts @@ -26,44 +26,6 @@ export const ForbiddenResponseErrorData$inboundSchema: z.ZodType< metadata: z.nullable(z.record(z.string(), z.nullable(z.any()))).optional(), }); -/** @internal */ -export type ForbiddenResponseErrorData$Outbound = { - code: number; - message: string; - metadata?: { [k: string]: any | null } | null | undefined; -}; - -/** @internal */ -export const ForbiddenResponseErrorData$outboundSchema: z.ZodType< - ForbiddenResponseErrorData$Outbound, - ForbiddenResponseErrorData -> = z.object({ - code: z.number().int(), - message: z.string(), - metadata: z.nullable(z.record(z.string(), z.nullable(z.any()))).optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ForbiddenResponseErrorData$ { - /** @deprecated use `ForbiddenResponseErrorData$inboundSchema` instead. */ - export const inboundSchema = ForbiddenResponseErrorData$inboundSchema; - /** @deprecated use `ForbiddenResponseErrorData$outboundSchema` instead. */ - export const outboundSchema = ForbiddenResponseErrorData$outboundSchema; - /** @deprecated use `ForbiddenResponseErrorData$Outbound` instead. */ - export type Outbound = ForbiddenResponseErrorData$Outbound; -} - -export function forbiddenResponseErrorDataToJSON( - forbiddenResponseErrorData: ForbiddenResponseErrorData, -): string { - return JSON.stringify( - ForbiddenResponseErrorData$outboundSchema.parse(forbiddenResponseErrorData), - ); -} - export function forbiddenResponseErrorDataFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/imagegenerationstatus.ts b/src/models/imagegenerationstatus.ts index a55540c0..38760f2a 100644 --- a/src/models/imagegenerationstatus.ts +++ b/src/models/imagegenerationstatus.ts @@ -26,7 +26,6 @@ export const ImageGenerationStatus$inboundSchema: z.ZodType< z.enum(ImageGenerationStatus), z.string().transform(catchUnrecognizedEnum), ]); - /** @internal */ export const ImageGenerationStatus$outboundSchema: z.ZodType< ImageGenerationStatus, @@ -35,14 +34,3 @@ export const ImageGenerationStatus$outboundSchema: z.ZodType< z.enum(ImageGenerationStatus), z.string().and(z.custom>()), ]); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ImageGenerationStatus$ { - /** @deprecated use `ImageGenerationStatus$inboundSchema` instead. */ - export const inboundSchema = ImageGenerationStatus$inboundSchema; - /** @deprecated use `ImageGenerationStatus$outboundSchema` instead. */ - export const outboundSchema = ImageGenerationStatus$outboundSchema; -} diff --git a/src/models/index.ts b/src/models/index.ts index 476e47d1..0eb2e7af 100644 --- a/src/models/index.ts +++ b/src/models/index.ts @@ -14,6 +14,7 @@ export * from "./chatmessagecontentitem.js"; export * from "./chatmessagecontentitemaudio.js"; export * from "./chatmessagecontentitemimage.js"; export * from "./chatmessagecontentitemtext.js"; +export * from "./chatmessagecontentitemvideo.js"; export * from "./chatmessagetokenlogprob.js"; export * from "./chatmessagetokenlogprobs.js"; export * from "./chatmessagetoolcall.js"; @@ -131,8 +132,8 @@ export * from "./responsetextconfig.js"; export * from "./security.js"; export * from "./serviceunavailableresponseerrordata.js"; export * from "./systemmessage.js"; -export * from "./tool.js"; export * from "./toolcallstatus.js"; +export * from "./tooldefinitionjson.js"; export * from "./toolresponsemessage.js"; export * from "./toomanyrequestsresponseerrordata.js"; export * from "./topproviderinfo.js"; diff --git a/src/models/inputmodality.ts b/src/models/inputmodality.ts index 7cc13095..4bb827cf 100644 --- a/src/models/inputmodality.ts +++ b/src/models/inputmodality.ts @@ -3,11 +3,7 @@ */ import * as z from "zod/v4"; -import { - catchUnrecognizedEnum, - OpenEnum, - Unrecognized, -} from "../types/enums.js"; +import { catchUnrecognizedEnum, OpenEnum } from "../types/enums.js"; export const InputModality = { Text: "text", @@ -24,23 +20,3 @@ export const InputModality$inboundSchema: z.ZodType = z z.enum(InputModality), z.string().transform(catchUnrecognizedEnum), ]); - -/** @internal */ -export const InputModality$outboundSchema: z.ZodType< - InputModality, - InputModality -> = z.union([ - z.enum(InputModality), - z.string().and(z.custom>()), -]); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace InputModality$ { - /** @deprecated use `InputModality$inboundSchema` instead. */ - export const inboundSchema = InputModality$inboundSchema; - /** @deprecated use `InputModality$outboundSchema` instead. */ - export const outboundSchema = InputModality$outboundSchema; -} diff --git a/src/models/instructtype.ts b/src/models/instructtype.ts index c7529375..04f1a2a3 100644 --- a/src/models/instructtype.ts +++ b/src/models/instructtype.ts @@ -3,11 +3,7 @@ */ import * as z from "zod/v4"; -import { - catchUnrecognizedEnum, - OpenEnum, - Unrecognized, -} from "../types/enums.js"; +import { catchUnrecognizedEnum, OpenEnum } from "../types/enums.js"; /** * Instruction format type @@ -47,23 +43,3 @@ export const InstructType$inboundSchema: z.ZodType = z z.enum(InstructType), z.string().transform(catchUnrecognizedEnum), ]); - -/** @internal */ -export const InstructType$outboundSchema: z.ZodType< - InstructType, - InstructType -> = z.union([ - z.enum(InstructType), - z.string().and(z.custom>()), -]); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace InstructType$ { - /** @deprecated use `InstructType$inboundSchema` instead. */ - export const inboundSchema = InstructType$inboundSchema; - /** @deprecated use `InstructType$outboundSchema` instead. */ - export const outboundSchema = InstructType$outboundSchema; -} diff --git a/src/models/internalserverresponseerrordata.ts b/src/models/internalserverresponseerrordata.ts index 3fc841c1..959ab464 100644 --- a/src/models/internalserverresponseerrordata.ts +++ b/src/models/internalserverresponseerrordata.ts @@ -26,46 +26,6 @@ export const InternalServerResponseErrorData$inboundSchema: z.ZodType< metadata: z.nullable(z.record(z.string(), z.nullable(z.any()))).optional(), }); -/** @internal */ -export type InternalServerResponseErrorData$Outbound = { - code: number; - message: string; - metadata?: { [k: string]: any | null } | null | undefined; -}; - -/** @internal */ -export const InternalServerResponseErrorData$outboundSchema: z.ZodType< - InternalServerResponseErrorData$Outbound, - InternalServerResponseErrorData -> = z.object({ - code: z.number().int(), - message: z.string(), - metadata: z.nullable(z.record(z.string(), z.nullable(z.any()))).optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace InternalServerResponseErrorData$ { - /** @deprecated use `InternalServerResponseErrorData$inboundSchema` instead. */ - export const inboundSchema = InternalServerResponseErrorData$inboundSchema; - /** @deprecated use `InternalServerResponseErrorData$outboundSchema` instead. */ - export const outboundSchema = InternalServerResponseErrorData$outboundSchema; - /** @deprecated use `InternalServerResponseErrorData$Outbound` instead. */ - export type Outbound = InternalServerResponseErrorData$Outbound; -} - -export function internalServerResponseErrorDataToJSON( - internalServerResponseErrorData: InternalServerResponseErrorData, -): string { - return JSON.stringify( - InternalServerResponseErrorData$outboundSchema.parse( - internalServerResponseErrorData, - ), - ); -} - export function internalServerResponseErrorDataFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/jsonschemaconfig.ts b/src/models/jsonschemaconfig.ts index d84cce74..cc17f5ee 100644 --- a/src/models/jsonschemaconfig.ts +++ b/src/models/jsonschemaconfig.ts @@ -3,9 +3,6 @@ */ import * as z from "zod/v4"; -import { safeParse } from "../lib/schemas.js"; -import { Result as SafeParseResult } from "../types/fp.js"; -import { SDKValidationError } from "./errors/sdkvalidationerror.js"; export type JSONSchemaConfig = { name: string; @@ -14,17 +11,6 @@ export type JSONSchemaConfig = { strict?: boolean | null | undefined; }; -/** @internal */ -export const JSONSchemaConfig$inboundSchema: z.ZodType< - JSONSchemaConfig, - unknown -> = z.object({ - name: z.string(), - description: z.string().optional(), - schema: z.record(z.string(), z.any()).optional(), - strict: z.nullable(z.boolean()).optional(), -}); - /** @internal */ export type JSONSchemaConfig$Outbound = { name: string; @@ -44,19 +30,6 @@ export const JSONSchemaConfig$outboundSchema: z.ZodType< strict: z.nullable(z.boolean()).optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace JSONSchemaConfig$ { - /** @deprecated use `JSONSchemaConfig$inboundSchema` instead. */ - export const inboundSchema = JSONSchemaConfig$inboundSchema; - /** @deprecated use `JSONSchemaConfig$outboundSchema` instead. */ - export const outboundSchema = JSONSchemaConfig$outboundSchema; - /** @deprecated use `JSONSchemaConfig$Outbound` instead. */ - export type Outbound = JSONSchemaConfig$Outbound; -} - export function jsonSchemaConfigToJSON( jsonSchemaConfig: JSONSchemaConfig, ): string { @@ -64,13 +37,3 @@ export function jsonSchemaConfigToJSON( JSONSchemaConfig$outboundSchema.parse(jsonSchemaConfig), ); } - -export function jsonSchemaConfigFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => JSONSchemaConfig$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'JSONSchemaConfig' from JSON`, - ); -} diff --git a/src/models/listendpointsresponse.ts b/src/models/listendpointsresponse.ts index 567d5060..96eb7130 100644 --- a/src/models/listendpointsresponse.ts +++ b/src/models/listendpointsresponse.ts @@ -5,33 +5,18 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; -import { - catchUnrecognizedEnum, - OpenEnum, - Unrecognized, -} from "../types/enums.js"; +import { catchUnrecognizedEnum, OpenEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; -import { - InputModality, - InputModality$inboundSchema, - InputModality$outboundSchema, -} from "./inputmodality.js"; -import { - InstructType, - InstructType$inboundSchema, - InstructType$outboundSchema, -} from "./instructtype.js"; +import { InputModality, InputModality$inboundSchema } from "./inputmodality.js"; +import { InstructType, InstructType$inboundSchema } from "./instructtype.js"; import { OutputModality, OutputModality$inboundSchema, - OutputModality$outboundSchema, } from "./outputmodality.js"; import { PublicEndpoint, PublicEndpoint$inboundSchema, - PublicEndpoint$Outbound, - PublicEndpoint$outboundSchema, } from "./publicendpoint.js"; /** @@ -120,24 +105,6 @@ export const Tokenizer$inboundSchema: z.ZodType = z z.string().transform(catchUnrecognizedEnum), ]); -/** @internal */ -export const Tokenizer$outboundSchema: z.ZodType = z - .union([ - z.enum(Tokenizer), - z.string().and(z.custom>()), - ]); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Tokenizer$ { - /** @deprecated use `Tokenizer$inboundSchema` instead. */ - export const inboundSchema = Tokenizer$inboundSchema; - /** @deprecated use `Tokenizer$outboundSchema` instead. */ - export const outboundSchema = Tokenizer$outboundSchema; -} - /** @internal */ export const Architecture$inboundSchema: z.ZodType = z .object({ @@ -154,50 +121,6 @@ export const Architecture$inboundSchema: z.ZodType = z }); }); -/** @internal */ -export type Architecture$Outbound = { - tokenizer: string | null; - instruct_type: string | null; - modality: string | null; - input_modalities: Array; - output_modalities: Array; -}; - -/** @internal */ -export const Architecture$outboundSchema: z.ZodType< - Architecture$Outbound, - Architecture -> = z.object({ - tokenizer: z.nullable(Tokenizer$outboundSchema), - instructType: z.nullable(InstructType$outboundSchema), - modality: z.nullable(z.string()), - inputModalities: z.array(InputModality$outboundSchema), - outputModalities: z.array(OutputModality$outboundSchema), -}).transform((v) => { - return remap$(v, { - instructType: "instruct_type", - inputModalities: "input_modalities", - outputModalities: "output_modalities", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Architecture$ { - /** @deprecated use `Architecture$inboundSchema` instead. */ - export const inboundSchema = Architecture$inboundSchema; - /** @deprecated use `Architecture$outboundSchema` instead. */ - export const outboundSchema = Architecture$outboundSchema; - /** @deprecated use `Architecture$Outbound` instead. */ - export type Outbound = Architecture$Outbound; -} - -export function architectureToJSON(architecture: Architecture): string { - return JSON.stringify(Architecture$outboundSchema.parse(architecture)); -} - export function architectureFromJSON( jsonString: string, ): SafeParseResult { @@ -221,50 +144,6 @@ export const ListEndpointsResponse$inboundSchema: z.ZodType< endpoints: z.array(PublicEndpoint$inboundSchema), }); -/** @internal */ -export type ListEndpointsResponse$Outbound = { - id: string; - name: string; - created: number; - description: string; - architecture: Architecture$Outbound; - endpoints: Array; -}; - -/** @internal */ -export const ListEndpointsResponse$outboundSchema: z.ZodType< - ListEndpointsResponse$Outbound, - ListEndpointsResponse -> = z.object({ - id: z.string(), - name: z.string(), - created: z.number(), - description: z.string(), - architecture: z.lazy(() => Architecture$outboundSchema), - endpoints: z.array(PublicEndpoint$outboundSchema), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ListEndpointsResponse$ { - /** @deprecated use `ListEndpointsResponse$inboundSchema` instead. */ - export const inboundSchema = ListEndpointsResponse$inboundSchema; - /** @deprecated use `ListEndpointsResponse$outboundSchema` instead. */ - export const outboundSchema = ListEndpointsResponse$outboundSchema; - /** @deprecated use `ListEndpointsResponse$Outbound` instead. */ - export type Outbound = ListEndpointsResponse$Outbound; -} - -export function listEndpointsResponseToJSON( - listEndpointsResponse: ListEndpointsResponse, -): string { - return JSON.stringify( - ListEndpointsResponse$outboundSchema.parse(listEndpointsResponse), - ); -} - export function listEndpointsResponseFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/message.ts b/src/models/message.ts index 0035d980..a28aff78 100644 --- a/src/models/message.ts +++ b/src/models/message.ts @@ -3,36 +3,28 @@ */ import * as z from "zod/v4"; -import { safeParse } from "../lib/schemas.js"; -import { Result as SafeParseResult } from "../types/fp.js"; import { AssistantMessage, - AssistantMessage$inboundSchema, AssistantMessage$Outbound, AssistantMessage$outboundSchema, } from "./assistantmessage.js"; import { ChatMessageContentItemText, - ChatMessageContentItemText$inboundSchema, ChatMessageContentItemText$Outbound, ChatMessageContentItemText$outboundSchema, } from "./chatmessagecontentitemtext.js"; -import { SDKValidationError } from "./errors/sdkvalidationerror.js"; import { SystemMessage, - SystemMessage$inboundSchema, SystemMessage$Outbound, SystemMessage$outboundSchema, } from "./systemmessage.js"; import { ToolResponseMessage, - ToolResponseMessage$inboundSchema, ToolResponseMessage$Outbound, ToolResponseMessage$outboundSchema, } from "./toolresponsemessage.js"; import { UserMessage, - UserMessage$inboundSchema, UserMessage$Outbound, UserMessage$outboundSchema, } from "./usermessage.js"; @@ -52,10 +44,6 @@ export type Message = | MessageDeveloper | AssistantMessage; -/** @internal */ -export const MessageContent$inboundSchema: z.ZodType = - z.union([z.string(), z.array(ChatMessageContentItemText$inboundSchema)]); - /** @internal */ export type MessageContent$Outbound = | string @@ -67,46 +55,10 @@ export const MessageContent$outboundSchema: z.ZodType< MessageContent > = z.union([z.string(), z.array(ChatMessageContentItemText$outboundSchema)]); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace MessageContent$ { - /** @deprecated use `MessageContent$inboundSchema` instead. */ - export const inboundSchema = MessageContent$inboundSchema; - /** @deprecated use `MessageContent$outboundSchema` instead. */ - export const outboundSchema = MessageContent$outboundSchema; - /** @deprecated use `MessageContent$Outbound` instead. */ - export type Outbound = MessageContent$Outbound; -} - export function messageContentToJSON(messageContent: MessageContent): string { return JSON.stringify(MessageContent$outboundSchema.parse(messageContent)); } -export function messageContentFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => MessageContent$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'MessageContent' from JSON`, - ); -} - -/** @internal */ -export const MessageDeveloper$inboundSchema: z.ZodType< - MessageDeveloper, - unknown -> = z.object({ - role: z.literal("developer"), - content: z.union([ - z.string(), - z.array(ChatMessageContentItemText$inboundSchema), - ]), - name: z.string().optional(), -}); - /** @internal */ export type MessageDeveloper$Outbound = { role: "developer"; @@ -127,19 +79,6 @@ export const MessageDeveloper$outboundSchema: z.ZodType< name: z.string().optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace MessageDeveloper$ { - /** @deprecated use `MessageDeveloper$inboundSchema` instead. */ - export const inboundSchema = MessageDeveloper$inboundSchema; - /** @deprecated use `MessageDeveloper$outboundSchema` instead. */ - export const outboundSchema = MessageDeveloper$outboundSchema; - /** @deprecated use `MessageDeveloper$Outbound` instead. */ - export type Outbound = MessageDeveloper$Outbound; -} - export function messageDeveloperToJSON( messageDeveloper: MessageDeveloper, ): string { @@ -148,25 +87,6 @@ export function messageDeveloperToJSON( ); } -export function messageDeveloperFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => MessageDeveloper$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'MessageDeveloper' from JSON`, - ); -} - -/** @internal */ -export const Message$inboundSchema: z.ZodType = z.union([ - ToolResponseMessage$inboundSchema, - SystemMessage$inboundSchema, - UserMessage$inboundSchema, - z.lazy(() => MessageDeveloper$inboundSchema), - AssistantMessage$inboundSchema, -]); - /** @internal */ export type Message$Outbound = | ToolResponseMessage$Outbound @@ -185,29 +105,6 @@ export const Message$outboundSchema: z.ZodType = z AssistantMessage$outboundSchema, ]); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Message$ { - /** @deprecated use `Message$inboundSchema` instead. */ - export const inboundSchema = Message$inboundSchema; - /** @deprecated use `Message$outboundSchema` instead. */ - export const outboundSchema = Message$outboundSchema; - /** @deprecated use `Message$Outbound` instead. */ - export type Outbound = Message$Outbound; -} - export function messageToJSON(message: Message): string { return JSON.stringify(Message$outboundSchema.parse(message)); } - -export function messageFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Message$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Message' from JSON`, - ); -} diff --git a/src/models/model.ts b/src/models/model.ts index 6800c659..656b3ff5 100644 --- a/src/models/model.ts +++ b/src/models/model.ts @@ -9,38 +9,21 @@ import { Result as SafeParseResult } from "../types/fp.js"; import { DefaultParameters, DefaultParameters$inboundSchema, - DefaultParameters$Outbound, - DefaultParameters$outboundSchema, } from "./defaultparameters.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; import { ModelArchitecture, ModelArchitecture$inboundSchema, - ModelArchitecture$Outbound, - ModelArchitecture$outboundSchema, } from "./modelarchitecture.js"; -import { - Parameter, - Parameter$inboundSchema, - Parameter$outboundSchema, -} from "./parameter.js"; +import { Parameter, Parameter$inboundSchema } from "./parameter.js"; import { PerRequestLimits, PerRequestLimits$inboundSchema, - PerRequestLimits$Outbound, - PerRequestLimits$outboundSchema, } from "./perrequestlimits.js"; -import { - PublicPricing, - PublicPricing$inboundSchema, - PublicPricing$Outbound, - PublicPricing$outboundSchema, -} from "./publicpricing.js"; +import { PublicPricing, PublicPricing$inboundSchema } from "./publicpricing.js"; import { TopProviderInfo, TopProviderInfo$inboundSchema, - TopProviderInfo$Outbound, - TopProviderInfo$outboundSchema, } from "./topproviderinfo.js"; /** @@ -128,67 +111,6 @@ export const Model$inboundSchema: z.ZodType = z.object({ }); }); -/** @internal */ -export type Model$Outbound = { - id: string; - canonical_slug: string; - hugging_face_id?: string | null | undefined; - name: string; - created: number; - description?: string | undefined; - pricing: PublicPricing$Outbound; - context_length: number | null; - architecture: ModelArchitecture$Outbound; - top_provider: TopProviderInfo$Outbound; - per_request_limits: PerRequestLimits$Outbound | null; - supported_parameters: Array; - default_parameters: DefaultParameters$Outbound | null; -}; - -/** @internal */ -export const Model$outboundSchema: z.ZodType = z.object({ - id: z.string(), - canonicalSlug: z.string(), - huggingFaceId: z.nullable(z.string()).optional(), - name: z.string(), - created: z.number(), - description: z.string().optional(), - pricing: PublicPricing$outboundSchema, - contextLength: z.nullable(z.number()), - architecture: ModelArchitecture$outboundSchema, - topProvider: TopProviderInfo$outboundSchema, - perRequestLimits: z.nullable(PerRequestLimits$outboundSchema), - supportedParameters: z.array(Parameter$outboundSchema), - defaultParameters: z.nullable(DefaultParameters$outboundSchema), -}).transform((v) => { - return remap$(v, { - canonicalSlug: "canonical_slug", - huggingFaceId: "hugging_face_id", - contextLength: "context_length", - topProvider: "top_provider", - perRequestLimits: "per_request_limits", - supportedParameters: "supported_parameters", - defaultParameters: "default_parameters", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Model$ { - /** @deprecated use `Model$inboundSchema` instead. */ - export const inboundSchema = Model$inboundSchema; - /** @deprecated use `Model$outboundSchema` instead. */ - export const outboundSchema = Model$outboundSchema; - /** @deprecated use `Model$Outbound` instead. */ - export type Outbound = Model$Outbound; -} - -export function modelToJSON(model: Model): string { - return JSON.stringify(Model$outboundSchema.parse(model)); -} - export function modelFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/modelarchitecture.ts b/src/models/modelarchitecture.ts index e84f2745..60d966ba 100644 --- a/src/models/modelarchitecture.ts +++ b/src/models/modelarchitecture.ts @@ -5,27 +5,14 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; -import { - catchUnrecognizedEnum, - OpenEnum, - Unrecognized, -} from "../types/enums.js"; +import { catchUnrecognizedEnum, OpenEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; -import { - InputModality, - InputModality$inboundSchema, - InputModality$outboundSchema, -} from "./inputmodality.js"; -import { - ModelGroup, - ModelGroup$inboundSchema, - ModelGroup$outboundSchema, -} from "./modelgroup.js"; +import { InputModality, InputModality$inboundSchema } from "./inputmodality.js"; +import { ModelGroup, ModelGroup$inboundSchema } from "./modelgroup.js"; import { OutputModality, OutputModality$inboundSchema, - OutputModality$outboundSchema, } from "./outputmodality.js"; /** @@ -98,26 +85,6 @@ export const ModelArchitectureInstructType$inboundSchema: z.ZodType< z.string().transform(catchUnrecognizedEnum), ]); -/** @internal */ -export const ModelArchitectureInstructType$outboundSchema: z.ZodType< - ModelArchitectureInstructType, - ModelArchitectureInstructType -> = z.union([ - z.enum(ModelArchitectureInstructType), - z.string().and(z.custom>()), -]); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ModelArchitectureInstructType$ { - /** @deprecated use `ModelArchitectureInstructType$inboundSchema` instead. */ - export const inboundSchema = ModelArchitectureInstructType$inboundSchema; - /** @deprecated use `ModelArchitectureInstructType$outboundSchema` instead. */ - export const outboundSchema = ModelArchitectureInstructType$outboundSchema; -} - /** @internal */ export const ModelArchitecture$inboundSchema: z.ZodType< ModelArchitecture, @@ -137,55 +104,6 @@ export const ModelArchitecture$inboundSchema: z.ZodType< }); }); -/** @internal */ -export type ModelArchitecture$Outbound = { - tokenizer?: string | undefined; - instruct_type?: string | null | undefined; - modality: string | null; - input_modalities: Array; - output_modalities: Array; -}; - -/** @internal */ -export const ModelArchitecture$outboundSchema: z.ZodType< - ModelArchitecture$Outbound, - ModelArchitecture -> = z.object({ - tokenizer: ModelGroup$outboundSchema.optional(), - instructType: z.nullable(ModelArchitectureInstructType$outboundSchema) - .optional(), - modality: z.nullable(z.string()), - inputModalities: z.array(InputModality$outboundSchema), - outputModalities: z.array(OutputModality$outboundSchema), -}).transform((v) => { - return remap$(v, { - instructType: "instruct_type", - inputModalities: "input_modalities", - outputModalities: "output_modalities", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ModelArchitecture$ { - /** @deprecated use `ModelArchitecture$inboundSchema` instead. */ - export const inboundSchema = ModelArchitecture$inboundSchema; - /** @deprecated use `ModelArchitecture$outboundSchema` instead. */ - export const outboundSchema = ModelArchitecture$outboundSchema; - /** @deprecated use `ModelArchitecture$Outbound` instead. */ - export type Outbound = ModelArchitecture$Outbound; -} - -export function modelArchitectureToJSON( - modelArchitecture: ModelArchitecture, -): string { - return JSON.stringify( - ModelArchitecture$outboundSchema.parse(modelArchitecture), - ); -} - export function modelArchitectureFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/modelgroup.ts b/src/models/modelgroup.ts index 2174072e..05dcbda9 100644 --- a/src/models/modelgroup.ts +++ b/src/models/modelgroup.ts @@ -3,11 +3,7 @@ */ import * as z from "zod/v4"; -import { - catchUnrecognizedEnum, - OpenEnum, - Unrecognized, -} from "../types/enums.js"; +import { catchUnrecognizedEnum, OpenEnum } from "../types/enums.js"; /** * Tokenizer type used by the model @@ -44,21 +40,3 @@ export const ModelGroup$inboundSchema: z.ZodType = z z.enum(ModelGroup), z.string().transform(catchUnrecognizedEnum), ]); - -/** @internal */ -export const ModelGroup$outboundSchema: z.ZodType = z - .union([ - z.enum(ModelGroup), - z.string().and(z.custom>()), - ]); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ModelGroup$ { - /** @deprecated use `ModelGroup$inboundSchema` instead. */ - export const inboundSchema = ModelGroup$inboundSchema; - /** @deprecated use `ModelGroup$outboundSchema` instead. */ - export const outboundSchema = ModelGroup$outboundSchema; -} diff --git a/src/models/modelscountresponse.ts b/src/models/modelscountresponse.ts index 93be4fac..370d489b 100644 --- a/src/models/modelscountresponse.ts +++ b/src/models/modelscountresponse.ts @@ -35,40 +35,6 @@ export const ModelsCountResponseData$inboundSchema: z.ZodType< count: z.number(), }); -/** @internal */ -export type ModelsCountResponseData$Outbound = { - count: number; -}; - -/** @internal */ -export const ModelsCountResponseData$outboundSchema: z.ZodType< - ModelsCountResponseData$Outbound, - ModelsCountResponseData -> = z.object({ - count: z.number(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ModelsCountResponseData$ { - /** @deprecated use `ModelsCountResponseData$inboundSchema` instead. */ - export const inboundSchema = ModelsCountResponseData$inboundSchema; - /** @deprecated use `ModelsCountResponseData$outboundSchema` instead. */ - export const outboundSchema = ModelsCountResponseData$outboundSchema; - /** @deprecated use `ModelsCountResponseData$Outbound` instead. */ - export type Outbound = ModelsCountResponseData$Outbound; -} - -export function modelsCountResponseDataToJSON( - modelsCountResponseData: ModelsCountResponseData, -): string { - return JSON.stringify( - ModelsCountResponseData$outboundSchema.parse(modelsCountResponseData), - ); -} - export function modelsCountResponseDataFromJSON( jsonString: string, ): SafeParseResult { @@ -87,40 +53,6 @@ export const ModelsCountResponse$inboundSchema: z.ZodType< data: z.lazy(() => ModelsCountResponseData$inboundSchema), }); -/** @internal */ -export type ModelsCountResponse$Outbound = { - data: ModelsCountResponseData$Outbound; -}; - -/** @internal */ -export const ModelsCountResponse$outboundSchema: z.ZodType< - ModelsCountResponse$Outbound, - ModelsCountResponse -> = z.object({ - data: z.lazy(() => ModelsCountResponseData$outboundSchema), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ModelsCountResponse$ { - /** @deprecated use `ModelsCountResponse$inboundSchema` instead. */ - export const inboundSchema = ModelsCountResponse$inboundSchema; - /** @deprecated use `ModelsCountResponse$outboundSchema` instead. */ - export const outboundSchema = ModelsCountResponse$outboundSchema; - /** @deprecated use `ModelsCountResponse$Outbound` instead. */ - export type Outbound = ModelsCountResponse$Outbound; -} - -export function modelsCountResponseToJSON( - modelsCountResponse: ModelsCountResponse, -): string { - return JSON.stringify( - ModelsCountResponse$outboundSchema.parse(modelsCountResponse), - ); -} - export function modelsCountResponseFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/modelslistresponse.ts b/src/models/modelslistresponse.ts index 6a26fc4c..b36813b7 100644 --- a/src/models/modelslistresponse.ts +++ b/src/models/modelslistresponse.ts @@ -6,12 +6,7 @@ import * as z from "zod/v4"; import { safeParse } from "../lib/schemas.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; -import { - Model, - Model$inboundSchema, - Model$Outbound, - Model$outboundSchema, -} from "./model.js"; +import { Model, Model$inboundSchema } from "./model.js"; /** * List of available models @@ -31,40 +26,6 @@ export const ModelsListResponse$inboundSchema: z.ZodType< data: z.array(Model$inboundSchema), }); -/** @internal */ -export type ModelsListResponse$Outbound = { - data: Array; -}; - -/** @internal */ -export const ModelsListResponse$outboundSchema: z.ZodType< - ModelsListResponse$Outbound, - ModelsListResponse -> = z.object({ - data: z.array(Model$outboundSchema), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ModelsListResponse$ { - /** @deprecated use `ModelsListResponse$inboundSchema` instead. */ - export const inboundSchema = ModelsListResponse$inboundSchema; - /** @deprecated use `ModelsListResponse$outboundSchema` instead. */ - export const outboundSchema = ModelsListResponse$outboundSchema; - /** @deprecated use `ModelsListResponse$Outbound` instead. */ - export type Outbound = ModelsListResponse$Outbound; -} - -export function modelsListResponseToJSON( - modelsListResponse: ModelsListResponse, -): string { - return JSON.stringify( - ModelsListResponse$outboundSchema.parse(modelsListResponse), - ); -} - export function modelsListResponseFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/namedtoolchoice.ts b/src/models/namedtoolchoice.ts index 096a02a1..acc523e5 100644 --- a/src/models/namedtoolchoice.ts +++ b/src/models/namedtoolchoice.ts @@ -3,9 +3,6 @@ */ import * as z from "zod/v4"; -import { safeParse } from "../lib/schemas.js"; -import { Result as SafeParseResult } from "../types/fp.js"; -import { SDKValidationError } from "./errors/sdkvalidationerror.js"; export type NamedToolChoiceFunction = { name: string; @@ -16,14 +13,6 @@ export type NamedToolChoice = { function: NamedToolChoiceFunction; }; -/** @internal */ -export const NamedToolChoiceFunction$inboundSchema: z.ZodType< - NamedToolChoiceFunction, - unknown -> = z.object({ - name: z.string(), -}); - /** @internal */ export type NamedToolChoiceFunction$Outbound = { name: string; @@ -37,19 +26,6 @@ export const NamedToolChoiceFunction$outboundSchema: z.ZodType< name: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace NamedToolChoiceFunction$ { - /** @deprecated use `NamedToolChoiceFunction$inboundSchema` instead. */ - export const inboundSchema = NamedToolChoiceFunction$inboundSchema; - /** @deprecated use `NamedToolChoiceFunction$outboundSchema` instead. */ - export const outboundSchema = NamedToolChoiceFunction$outboundSchema; - /** @deprecated use `NamedToolChoiceFunction$Outbound` instead. */ - export type Outbound = NamedToolChoiceFunction$Outbound; -} - export function namedToolChoiceFunctionToJSON( namedToolChoiceFunction: NamedToolChoiceFunction, ): string { @@ -58,25 +34,6 @@ export function namedToolChoiceFunctionToJSON( ); } -export function namedToolChoiceFunctionFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => NamedToolChoiceFunction$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'NamedToolChoiceFunction' from JSON`, - ); -} - -/** @internal */ -export const NamedToolChoice$inboundSchema: z.ZodType< - NamedToolChoice, - unknown -> = z.object({ - type: z.literal("function"), - function: z.lazy(() => NamedToolChoiceFunction$inboundSchema), -}); - /** @internal */ export type NamedToolChoice$Outbound = { type: "function"; @@ -92,31 +49,8 @@ export const NamedToolChoice$outboundSchema: z.ZodType< function: z.lazy(() => NamedToolChoiceFunction$outboundSchema), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace NamedToolChoice$ { - /** @deprecated use `NamedToolChoice$inboundSchema` instead. */ - export const inboundSchema = NamedToolChoice$inboundSchema; - /** @deprecated use `NamedToolChoice$outboundSchema` instead. */ - export const outboundSchema = NamedToolChoice$outboundSchema; - /** @deprecated use `NamedToolChoice$Outbound` instead. */ - export type Outbound = NamedToolChoice$Outbound; -} - export function namedToolChoiceToJSON( namedToolChoice: NamedToolChoice, ): string { return JSON.stringify(NamedToolChoice$outboundSchema.parse(namedToolChoice)); } - -export function namedToolChoiceFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => NamedToolChoice$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'NamedToolChoice' from JSON`, - ); -} diff --git a/src/models/notfoundresponseerrordata.ts b/src/models/notfoundresponseerrordata.ts index 98f2c5b8..d7a0d219 100644 --- a/src/models/notfoundresponseerrordata.ts +++ b/src/models/notfoundresponseerrordata.ts @@ -26,44 +26,6 @@ export const NotFoundResponseErrorData$inboundSchema: z.ZodType< metadata: z.nullable(z.record(z.string(), z.nullable(z.any()))).optional(), }); -/** @internal */ -export type NotFoundResponseErrorData$Outbound = { - code: number; - message: string; - metadata?: { [k: string]: any | null } | null | undefined; -}; - -/** @internal */ -export const NotFoundResponseErrorData$outboundSchema: z.ZodType< - NotFoundResponseErrorData$Outbound, - NotFoundResponseErrorData -> = z.object({ - code: z.number().int(), - message: z.string(), - metadata: z.nullable(z.record(z.string(), z.nullable(z.any()))).optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace NotFoundResponseErrorData$ { - /** @deprecated use `NotFoundResponseErrorData$inboundSchema` instead. */ - export const inboundSchema = NotFoundResponseErrorData$inboundSchema; - /** @deprecated use `NotFoundResponseErrorData$outboundSchema` instead. */ - export const outboundSchema = NotFoundResponseErrorData$outboundSchema; - /** @deprecated use `NotFoundResponseErrorData$Outbound` instead. */ - export type Outbound = NotFoundResponseErrorData$Outbound; -} - -export function notFoundResponseErrorDataToJSON( - notFoundResponseErrorData: NotFoundResponseErrorData, -): string { - return JSON.stringify( - NotFoundResponseErrorData$outboundSchema.parse(notFoundResponseErrorData), - ); -} - export function notFoundResponseErrorDataFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/openairesponsesannotation.ts b/src/models/openairesponsesannotation.ts index 239634d1..23596614 100644 --- a/src/models/openairesponsesannotation.ts +++ b/src/models/openairesponsesannotation.ts @@ -36,7 +36,6 @@ export const OpenAIResponsesAnnotation$inboundSchema: z.ZodType< FileCitation$inboundSchema, FilePath$inboundSchema, ]); - /** @internal */ export type OpenAIResponsesAnnotation$Outbound = | URLCitation$Outbound @@ -53,19 +52,6 @@ export const OpenAIResponsesAnnotation$outboundSchema: z.ZodType< FilePath$outboundSchema, ]); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenAIResponsesAnnotation$ { - /** @deprecated use `OpenAIResponsesAnnotation$inboundSchema` instead. */ - export const inboundSchema = OpenAIResponsesAnnotation$inboundSchema; - /** @deprecated use `OpenAIResponsesAnnotation$outboundSchema` instead. */ - export const outboundSchema = OpenAIResponsesAnnotation$outboundSchema; - /** @deprecated use `OpenAIResponsesAnnotation$Outbound` instead. */ - export type Outbound = OpenAIResponsesAnnotation$Outbound; -} - export function openAIResponsesAnnotationToJSON( openAIResponsesAnnotation: OpenAIResponsesAnnotation, ): string { @@ -73,7 +59,6 @@ export function openAIResponsesAnnotationToJSON( OpenAIResponsesAnnotation$outboundSchema.parse(openAIResponsesAnnotation), ); } - export function openAIResponsesAnnotationFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/openairesponsesincludable.ts b/src/models/openairesponsesincludable.ts index 3cacbecc..0e7efebc 100644 --- a/src/models/openairesponsesincludable.ts +++ b/src/models/openairesponsesincludable.ts @@ -3,11 +3,7 @@ */ import * as z from "zod/v4"; -import { - catchUnrecognizedEnum, - OpenEnum, - Unrecognized, -} from "../types/enums.js"; +import { OpenEnum, Unrecognized } from "../types/enums.js"; export const OpenAIResponsesIncludable = { FileSearchCallResults: "file_search_call.results", @@ -20,16 +16,6 @@ export type OpenAIResponsesIncludable = OpenEnum< typeof OpenAIResponsesIncludable >; -/** @internal */ -export const OpenAIResponsesIncludable$inboundSchema: z.ZodType< - OpenAIResponsesIncludable, - unknown -> = z - .union([ - z.enum(OpenAIResponsesIncludable), - z.string().transform(catchUnrecognizedEnum), - ]); - /** @internal */ export const OpenAIResponsesIncludable$outboundSchema: z.ZodType< OpenAIResponsesIncludable, @@ -38,14 +24,3 @@ export const OpenAIResponsesIncludable$outboundSchema: z.ZodType< z.enum(OpenAIResponsesIncludable), z.string().and(z.custom>()), ]); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenAIResponsesIncludable$ { - /** @deprecated use `OpenAIResponsesIncludable$inboundSchema` instead. */ - export const inboundSchema = OpenAIResponsesIncludable$inboundSchema; - /** @deprecated use `OpenAIResponsesIncludable$outboundSchema` instead. */ - export const outboundSchema = OpenAIResponsesIncludable$outboundSchema; -} diff --git a/src/models/openairesponsesincompletedetails.ts b/src/models/openairesponsesincompletedetails.ts index f253dc0d..04946239 100644 --- a/src/models/openairesponsesincompletedetails.ts +++ b/src/models/openairesponsesincompletedetails.ts @@ -4,11 +4,7 @@ import * as z from "zod/v4"; import { safeParse } from "../lib/schemas.js"; -import { - catchUnrecognizedEnum, - OpenEnum, - Unrecognized, -} from "../types/enums.js"; +import { catchUnrecognizedEnum, OpenEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; @@ -29,23 +25,6 @@ export const Reason$inboundSchema: z.ZodType = z z.string().transform(catchUnrecognizedEnum), ]); -/** @internal */ -export const Reason$outboundSchema: z.ZodType = z.union([ - z.enum(Reason), - z.string().and(z.custom>()), -]); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Reason$ { - /** @deprecated use `Reason$inboundSchema` instead. */ - export const inboundSchema = Reason$inboundSchema; - /** @deprecated use `Reason$outboundSchema` instead. */ - export const outboundSchema = Reason$outboundSchema; -} - /** @internal */ export const OpenAIResponsesIncompleteDetails$inboundSchema: z.ZodType< OpenAIResponsesIncompleteDetails, @@ -54,42 +33,6 @@ export const OpenAIResponsesIncompleteDetails$inboundSchema: z.ZodType< reason: Reason$inboundSchema.optional(), }); -/** @internal */ -export type OpenAIResponsesIncompleteDetails$Outbound = { - reason?: string | undefined; -}; - -/** @internal */ -export const OpenAIResponsesIncompleteDetails$outboundSchema: z.ZodType< - OpenAIResponsesIncompleteDetails$Outbound, - OpenAIResponsesIncompleteDetails -> = z.object({ - reason: Reason$outboundSchema.optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenAIResponsesIncompleteDetails$ { - /** @deprecated use `OpenAIResponsesIncompleteDetails$inboundSchema` instead. */ - export const inboundSchema = OpenAIResponsesIncompleteDetails$inboundSchema; - /** @deprecated use `OpenAIResponsesIncompleteDetails$outboundSchema` instead. */ - export const outboundSchema = OpenAIResponsesIncompleteDetails$outboundSchema; - /** @deprecated use `OpenAIResponsesIncompleteDetails$Outbound` instead. */ - export type Outbound = OpenAIResponsesIncompleteDetails$Outbound; -} - -export function openAIResponsesIncompleteDetailsToJSON( - openAIResponsesIncompleteDetails: OpenAIResponsesIncompleteDetails, -): string { - return JSON.stringify( - OpenAIResponsesIncompleteDetails$outboundSchema.parse( - openAIResponsesIncompleteDetails, - ), - ); -} - export function openAIResponsesIncompleteDetailsFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/openairesponsesinputunion.ts b/src/models/openairesponsesinputunion.ts index 7a29e871..db403b76 100644 --- a/src/models/openairesponsesinputunion.ts +++ b/src/models/openairesponsesinputunion.ts @@ -11,43 +11,27 @@ import { SDKValidationError } from "./errors/sdkvalidationerror.js"; import { OutputItemImageGenerationCall, OutputItemImageGenerationCall$inboundSchema, - OutputItemImageGenerationCall$Outbound, - OutputItemImageGenerationCall$outboundSchema, } from "./outputitemimagegenerationcall.js"; -import { - OutputMessage, - OutputMessage$inboundSchema, - OutputMessage$Outbound, - OutputMessage$outboundSchema, -} from "./outputmessage.js"; +import { OutputMessage, OutputMessage$inboundSchema } from "./outputmessage.js"; import { ResponseInputAudio, ResponseInputAudio$inboundSchema, - ResponseInputAudio$Outbound, - ResponseInputAudio$outboundSchema, } from "./responseinputaudio.js"; import { ResponseInputFile, ResponseInputFile$inboundSchema, - ResponseInputFile$Outbound, - ResponseInputFile$outboundSchema, } from "./responseinputfile.js"; import { ResponseInputImage, ResponseInputImage$inboundSchema, - ResponseInputImage$Outbound, - ResponseInputImage$outboundSchema, } from "./responseinputimage.js"; import { ResponseInputText, ResponseInputText$inboundSchema, - ResponseInputText$Outbound, - ResponseInputText$outboundSchema, } from "./responseinputtext.js"; import { ToolCallStatus, ToolCallStatus$inboundSchema, - ToolCallStatus$outboundSchema, } from "./toolcallstatus.js"; export const OpenAIResponsesInputTypeFunctionCall = { @@ -233,24 +217,6 @@ export const OpenAIResponsesInputTypeFunctionCall$inboundSchema: z.ZodEnum< typeof OpenAIResponsesInputTypeFunctionCall > = z.enum(OpenAIResponsesInputTypeFunctionCall); -/** @internal */ -export const OpenAIResponsesInputTypeFunctionCall$outboundSchema: z.ZodEnum< - typeof OpenAIResponsesInputTypeFunctionCall -> = OpenAIResponsesInputTypeFunctionCall$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenAIResponsesInputTypeFunctionCall$ { - /** @deprecated use `OpenAIResponsesInputTypeFunctionCall$inboundSchema` instead. */ - export const inboundSchema = - OpenAIResponsesInputTypeFunctionCall$inboundSchema; - /** @deprecated use `OpenAIResponsesInputTypeFunctionCall$outboundSchema` instead. */ - export const outboundSchema = - OpenAIResponsesInputTypeFunctionCall$outboundSchema; -} - /** @internal */ export const OpenAIResponsesInputFunctionCall$inboundSchema: z.ZodType< OpenAIResponsesInputFunctionCall, @@ -268,56 +234,6 @@ export const OpenAIResponsesInputFunctionCall$inboundSchema: z.ZodType< }); }); -/** @internal */ -export type OpenAIResponsesInputFunctionCall$Outbound = { - type: string; - call_id: string; - name: string; - arguments: string; - id?: string | undefined; - status?: string | undefined; -}; - -/** @internal */ -export const OpenAIResponsesInputFunctionCall$outboundSchema: z.ZodType< - OpenAIResponsesInputFunctionCall$Outbound, - OpenAIResponsesInputFunctionCall -> = z.object({ - type: OpenAIResponsesInputTypeFunctionCall$outboundSchema, - callId: z.string(), - name: z.string(), - arguments: z.string(), - id: z.string().optional(), - status: ToolCallStatus$outboundSchema.optional(), -}).transform((v) => { - return remap$(v, { - callId: "call_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenAIResponsesInputFunctionCall$ { - /** @deprecated use `OpenAIResponsesInputFunctionCall$inboundSchema` instead. */ - export const inboundSchema = OpenAIResponsesInputFunctionCall$inboundSchema; - /** @deprecated use `OpenAIResponsesInputFunctionCall$outboundSchema` instead. */ - export const outboundSchema = OpenAIResponsesInputFunctionCall$outboundSchema; - /** @deprecated use `OpenAIResponsesInputFunctionCall$Outbound` instead. */ - export type Outbound = OpenAIResponsesInputFunctionCall$Outbound; -} - -export function openAIResponsesInputFunctionCallToJSON( - openAIResponsesInputFunctionCall: OpenAIResponsesInputFunctionCall, -): string { - return JSON.stringify( - OpenAIResponsesInputFunctionCall$outboundSchema.parse( - openAIResponsesInputFunctionCall, - ), - ); -} - export function openAIResponsesInputFunctionCallFromJSON( jsonString: string, ): SafeParseResult { @@ -334,24 +250,6 @@ export const OpenAIResponsesInputTypeFunctionCallOutput$inboundSchema: OpenAIResponsesInputTypeFunctionCallOutput, ); -/** @internal */ -export const OpenAIResponsesInputTypeFunctionCallOutput$outboundSchema: - z.ZodEnum = - OpenAIResponsesInputTypeFunctionCallOutput$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenAIResponsesInputTypeFunctionCallOutput$ { - /** @deprecated use `OpenAIResponsesInputTypeFunctionCallOutput$inboundSchema` instead. */ - export const inboundSchema = - OpenAIResponsesInputTypeFunctionCallOutput$inboundSchema; - /** @deprecated use `OpenAIResponsesInputTypeFunctionCallOutput$outboundSchema` instead. */ - export const outboundSchema = - OpenAIResponsesInputTypeFunctionCallOutput$outboundSchema; -} - /** @internal */ export const OpenAIResponsesInputFunctionCallOutput$inboundSchema: z.ZodType< OpenAIResponsesInputFunctionCallOutput, @@ -368,57 +266,6 @@ export const OpenAIResponsesInputFunctionCallOutput$inboundSchema: z.ZodType< }); }); -/** @internal */ -export type OpenAIResponsesInputFunctionCallOutput$Outbound = { - type: string; - id: string; - call_id: string; - output: string; - status?: string | undefined; -}; - -/** @internal */ -export const OpenAIResponsesInputFunctionCallOutput$outboundSchema: z.ZodType< - OpenAIResponsesInputFunctionCallOutput$Outbound, - OpenAIResponsesInputFunctionCallOutput -> = z.object({ - type: OpenAIResponsesInputTypeFunctionCallOutput$outboundSchema, - id: z.string(), - callId: z.string(), - output: z.string(), - status: ToolCallStatus$outboundSchema.optional(), -}).transform((v) => { - return remap$(v, { - callId: "call_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenAIResponsesInputFunctionCallOutput$ { - /** @deprecated use `OpenAIResponsesInputFunctionCallOutput$inboundSchema` instead. */ - export const inboundSchema = - OpenAIResponsesInputFunctionCallOutput$inboundSchema; - /** @deprecated use `OpenAIResponsesInputFunctionCallOutput$outboundSchema` instead. */ - export const outboundSchema = - OpenAIResponsesInputFunctionCallOutput$outboundSchema; - /** @deprecated use `OpenAIResponsesInputFunctionCallOutput$Outbound` instead. */ - export type Outbound = OpenAIResponsesInputFunctionCallOutput$Outbound; -} - -export function openAIResponsesInputFunctionCallOutputToJSON( - openAIResponsesInputFunctionCallOutput: - OpenAIResponsesInputFunctionCallOutput, -): string { - return JSON.stringify( - OpenAIResponsesInputFunctionCallOutput$outboundSchema.parse( - openAIResponsesInputFunctionCallOutput, - ), - ); -} - export function openAIResponsesInputFunctionCallOutputFromJSON( jsonString: string, ): SafeParseResult { @@ -435,86 +282,21 @@ export const OpenAIResponsesInputTypeMessage2$inboundSchema: z.ZodEnum< typeof OpenAIResponsesInputTypeMessage2 > = z.enum(OpenAIResponsesInputTypeMessage2); -/** @internal */ -export const OpenAIResponsesInputTypeMessage2$outboundSchema: z.ZodEnum< - typeof OpenAIResponsesInputTypeMessage2 -> = OpenAIResponsesInputTypeMessage2$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenAIResponsesInputTypeMessage2$ { - /** @deprecated use `OpenAIResponsesInputTypeMessage2$inboundSchema` instead. */ - export const inboundSchema = OpenAIResponsesInputTypeMessage2$inboundSchema; - /** @deprecated use `OpenAIResponsesInputTypeMessage2$outboundSchema` instead. */ - export const outboundSchema = OpenAIResponsesInputTypeMessage2$outboundSchema; -} - /** @internal */ export const OpenAIResponsesInputRoleDeveloper2$inboundSchema: z.ZodEnum< typeof OpenAIResponsesInputRoleDeveloper2 > = z.enum(OpenAIResponsesInputRoleDeveloper2); -/** @internal */ -export const OpenAIResponsesInputRoleDeveloper2$outboundSchema: z.ZodEnum< - typeof OpenAIResponsesInputRoleDeveloper2 -> = OpenAIResponsesInputRoleDeveloper2$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenAIResponsesInputRoleDeveloper2$ { - /** @deprecated use `OpenAIResponsesInputRoleDeveloper2$inboundSchema` instead. */ - export const inboundSchema = OpenAIResponsesInputRoleDeveloper2$inboundSchema; - /** @deprecated use `OpenAIResponsesInputRoleDeveloper2$outboundSchema` instead. */ - export const outboundSchema = - OpenAIResponsesInputRoleDeveloper2$outboundSchema; -} - /** @internal */ export const OpenAIResponsesInputRoleSystem2$inboundSchema: z.ZodEnum< typeof OpenAIResponsesInputRoleSystem2 > = z.enum(OpenAIResponsesInputRoleSystem2); -/** @internal */ -export const OpenAIResponsesInputRoleSystem2$outboundSchema: z.ZodEnum< - typeof OpenAIResponsesInputRoleSystem2 -> = OpenAIResponsesInputRoleSystem2$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenAIResponsesInputRoleSystem2$ { - /** @deprecated use `OpenAIResponsesInputRoleSystem2$inboundSchema` instead. */ - export const inboundSchema = OpenAIResponsesInputRoleSystem2$inboundSchema; - /** @deprecated use `OpenAIResponsesInputRoleSystem2$outboundSchema` instead. */ - export const outboundSchema = OpenAIResponsesInputRoleSystem2$outboundSchema; -} - /** @internal */ export const OpenAIResponsesInputRoleUser2$inboundSchema: z.ZodEnum< typeof OpenAIResponsesInputRoleUser2 > = z.enum(OpenAIResponsesInputRoleUser2); -/** @internal */ -export const OpenAIResponsesInputRoleUser2$outboundSchema: z.ZodEnum< - typeof OpenAIResponsesInputRoleUser2 -> = OpenAIResponsesInputRoleUser2$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenAIResponsesInputRoleUser2$ { - /** @deprecated use `OpenAIResponsesInputRoleUser2$inboundSchema` instead. */ - export const inboundSchema = OpenAIResponsesInputRoleUser2$inboundSchema; - /** @deprecated use `OpenAIResponsesInputRoleUser2$outboundSchema` instead. */ - export const outboundSchema = OpenAIResponsesInputRoleUser2$outboundSchema; -} - /** @internal */ export const OpenAIResponsesInputRoleUnion2$inboundSchema: z.ZodType< OpenAIResponsesInputRoleUnion2, @@ -525,42 +307,6 @@ export const OpenAIResponsesInputRoleUnion2$inboundSchema: z.ZodType< OpenAIResponsesInputRoleDeveloper2$inboundSchema, ]); -/** @internal */ -export type OpenAIResponsesInputRoleUnion2$Outbound = string | string | string; - -/** @internal */ -export const OpenAIResponsesInputRoleUnion2$outboundSchema: z.ZodType< - OpenAIResponsesInputRoleUnion2$Outbound, - OpenAIResponsesInputRoleUnion2 -> = z.union([ - OpenAIResponsesInputRoleUser2$outboundSchema, - OpenAIResponsesInputRoleSystem2$outboundSchema, - OpenAIResponsesInputRoleDeveloper2$outboundSchema, -]); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenAIResponsesInputRoleUnion2$ { - /** @deprecated use `OpenAIResponsesInputRoleUnion2$inboundSchema` instead. */ - export const inboundSchema = OpenAIResponsesInputRoleUnion2$inboundSchema; - /** @deprecated use `OpenAIResponsesInputRoleUnion2$outboundSchema` instead. */ - export const outboundSchema = OpenAIResponsesInputRoleUnion2$outboundSchema; - /** @deprecated use `OpenAIResponsesInputRoleUnion2$Outbound` instead. */ - export type Outbound = OpenAIResponsesInputRoleUnion2$Outbound; -} - -export function openAIResponsesInputRoleUnion2ToJSON( - openAIResponsesInputRoleUnion2: OpenAIResponsesInputRoleUnion2, -): string { - return JSON.stringify( - OpenAIResponsesInputRoleUnion2$outboundSchema.parse( - openAIResponsesInputRoleUnion2, - ), - ); -} - export function openAIResponsesInputRoleUnion2FromJSON( jsonString: string, ): SafeParseResult { @@ -598,63 +344,6 @@ export const OpenAIResponsesInputContent3$inboundSchema: z.ZodType< ), ]); -/** @internal */ -export type OpenAIResponsesInputContent3$Outbound = - | (ResponseInputText$Outbound & { type: "input_text" }) - | (ResponseInputImage$Outbound & { type: "input_image" }) - | (ResponseInputAudio$Outbound & { type: "input_audio" }) - | (ResponseInputFile$Outbound & { type: "input_file" }); - -/** @internal */ -export const OpenAIResponsesInputContent3$outboundSchema: z.ZodType< - OpenAIResponsesInputContent3$Outbound, - OpenAIResponsesInputContent3 -> = z.union([ - ResponseInputText$outboundSchema.and( - z.object({ type: z.literal("input_text") }).transform((v) => ({ - type: v.type, - })), - ), - ResponseInputImage$outboundSchema.and( - z.object({ type: z.literal("input_image") }).transform((v) => ({ - type: v.type, - })), - ), - ResponseInputAudio$outboundSchema.and( - z.object({ type: z.literal("input_audio") }).transform((v) => ({ - type: v.type, - })), - ), - ResponseInputFile$outboundSchema.and( - z.object({ type: z.literal("input_file") }).transform((v) => ({ - type: v.type, - })), - ), -]); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenAIResponsesInputContent3$ { - /** @deprecated use `OpenAIResponsesInputContent3$inboundSchema` instead. */ - export const inboundSchema = OpenAIResponsesInputContent3$inboundSchema; - /** @deprecated use `OpenAIResponsesInputContent3$outboundSchema` instead. */ - export const outboundSchema = OpenAIResponsesInputContent3$outboundSchema; - /** @deprecated use `OpenAIResponsesInputContent3$Outbound` instead. */ - export type Outbound = OpenAIResponsesInputContent3$Outbound; -} - -export function openAIResponsesInputContent3ToJSON( - openAIResponsesInputContent3: OpenAIResponsesInputContent3, -): string { - return JSON.stringify( - OpenAIResponsesInputContent3$outboundSchema.parse( - openAIResponsesInputContent3, - ), - ); -} - export function openAIResponsesInputContent3FromJSON( jsonString: string, ): SafeParseResult { @@ -703,80 +392,6 @@ export const OpenAIResponsesInputMessage2$inboundSchema: z.ZodType< ), }); -/** @internal */ -export type OpenAIResponsesInputMessage2$Outbound = { - id: string; - type?: string | undefined; - role: string | string | string; - content: Array< - | (ResponseInputText$Outbound & { type: "input_text" }) - | (ResponseInputImage$Outbound & { type: "input_image" }) - | (ResponseInputAudio$Outbound & { type: "input_audio" }) - | (ResponseInputFile$Outbound & { type: "input_file" }) - >; -}; - -/** @internal */ -export const OpenAIResponsesInputMessage2$outboundSchema: z.ZodType< - OpenAIResponsesInputMessage2$Outbound, - OpenAIResponsesInputMessage2 -> = z.object({ - id: z.string(), - type: OpenAIResponsesInputTypeMessage2$outboundSchema.optional(), - role: z.union([ - OpenAIResponsesInputRoleUser2$outboundSchema, - OpenAIResponsesInputRoleSystem2$outboundSchema, - OpenAIResponsesInputRoleDeveloper2$outboundSchema, - ]), - content: z.array( - z.union([ - ResponseInputText$outboundSchema.and( - z.object({ type: z.literal("input_text") }).transform((v) => ({ - type: v.type, - })), - ), - ResponseInputImage$outboundSchema.and( - z.object({ type: z.literal("input_image") }).transform((v) => ({ - type: v.type, - })), - ), - ResponseInputAudio$outboundSchema.and( - z.object({ type: z.literal("input_audio") }).transform((v) => ({ - type: v.type, - })), - ), - ResponseInputFile$outboundSchema.and( - z.object({ type: z.literal("input_file") }).transform((v) => ({ - type: v.type, - })), - ), - ]), - ), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenAIResponsesInputMessage2$ { - /** @deprecated use `OpenAIResponsesInputMessage2$inboundSchema` instead. */ - export const inboundSchema = OpenAIResponsesInputMessage2$inboundSchema; - /** @deprecated use `OpenAIResponsesInputMessage2$outboundSchema` instead. */ - export const outboundSchema = OpenAIResponsesInputMessage2$outboundSchema; - /** @deprecated use `OpenAIResponsesInputMessage2$Outbound` instead. */ - export type Outbound = OpenAIResponsesInputMessage2$Outbound; -} - -export function openAIResponsesInputMessage2ToJSON( - openAIResponsesInputMessage2: OpenAIResponsesInputMessage2, -): string { - return JSON.stringify( - OpenAIResponsesInputMessage2$outboundSchema.parse( - openAIResponsesInputMessage2, - ), - ); -} - export function openAIResponsesInputMessage2FromJSON( jsonString: string, ): SafeParseResult { @@ -792,108 +407,26 @@ export const OpenAIResponsesInputTypeMessage1$inboundSchema: z.ZodEnum< typeof OpenAIResponsesInputTypeMessage1 > = z.enum(OpenAIResponsesInputTypeMessage1); -/** @internal */ -export const OpenAIResponsesInputTypeMessage1$outboundSchema: z.ZodEnum< - typeof OpenAIResponsesInputTypeMessage1 -> = OpenAIResponsesInputTypeMessage1$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenAIResponsesInputTypeMessage1$ { - /** @deprecated use `OpenAIResponsesInputTypeMessage1$inboundSchema` instead. */ - export const inboundSchema = OpenAIResponsesInputTypeMessage1$inboundSchema; - /** @deprecated use `OpenAIResponsesInputTypeMessage1$outboundSchema` instead. */ - export const outboundSchema = OpenAIResponsesInputTypeMessage1$outboundSchema; -} - /** @internal */ export const OpenAIResponsesInputRoleDeveloper1$inboundSchema: z.ZodEnum< typeof OpenAIResponsesInputRoleDeveloper1 > = z.enum(OpenAIResponsesInputRoleDeveloper1); -/** @internal */ -export const OpenAIResponsesInputRoleDeveloper1$outboundSchema: z.ZodEnum< - typeof OpenAIResponsesInputRoleDeveloper1 -> = OpenAIResponsesInputRoleDeveloper1$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenAIResponsesInputRoleDeveloper1$ { - /** @deprecated use `OpenAIResponsesInputRoleDeveloper1$inboundSchema` instead. */ - export const inboundSchema = OpenAIResponsesInputRoleDeveloper1$inboundSchema; - /** @deprecated use `OpenAIResponsesInputRoleDeveloper1$outboundSchema` instead. */ - export const outboundSchema = - OpenAIResponsesInputRoleDeveloper1$outboundSchema; -} - /** @internal */ export const OpenAIResponsesInputRoleAssistant$inboundSchema: z.ZodEnum< typeof OpenAIResponsesInputRoleAssistant > = z.enum(OpenAIResponsesInputRoleAssistant); -/** @internal */ -export const OpenAIResponsesInputRoleAssistant$outboundSchema: z.ZodEnum< - typeof OpenAIResponsesInputRoleAssistant -> = OpenAIResponsesInputRoleAssistant$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenAIResponsesInputRoleAssistant$ { - /** @deprecated use `OpenAIResponsesInputRoleAssistant$inboundSchema` instead. */ - export const inboundSchema = OpenAIResponsesInputRoleAssistant$inboundSchema; - /** @deprecated use `OpenAIResponsesInputRoleAssistant$outboundSchema` instead. */ - export const outboundSchema = - OpenAIResponsesInputRoleAssistant$outboundSchema; -} - /** @internal */ export const OpenAIResponsesInputRoleSystem1$inboundSchema: z.ZodEnum< typeof OpenAIResponsesInputRoleSystem1 > = z.enum(OpenAIResponsesInputRoleSystem1); -/** @internal */ -export const OpenAIResponsesInputRoleSystem1$outboundSchema: z.ZodEnum< - typeof OpenAIResponsesInputRoleSystem1 -> = OpenAIResponsesInputRoleSystem1$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenAIResponsesInputRoleSystem1$ { - /** @deprecated use `OpenAIResponsesInputRoleSystem1$inboundSchema` instead. */ - export const inboundSchema = OpenAIResponsesInputRoleSystem1$inboundSchema; - /** @deprecated use `OpenAIResponsesInputRoleSystem1$outboundSchema` instead. */ - export const outboundSchema = OpenAIResponsesInputRoleSystem1$outboundSchema; -} - /** @internal */ export const OpenAIResponsesInputRoleUser1$inboundSchema: z.ZodEnum< typeof OpenAIResponsesInputRoleUser1 > = z.enum(OpenAIResponsesInputRoleUser1); -/** @internal */ -export const OpenAIResponsesInputRoleUser1$outboundSchema: z.ZodEnum< - typeof OpenAIResponsesInputRoleUser1 -> = OpenAIResponsesInputRoleUser1$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenAIResponsesInputRoleUser1$ { - /** @deprecated use `OpenAIResponsesInputRoleUser1$inboundSchema` instead. */ - export const inboundSchema = OpenAIResponsesInputRoleUser1$inboundSchema; - /** @deprecated use `OpenAIResponsesInputRoleUser1$outboundSchema` instead. */ - export const outboundSchema = OpenAIResponsesInputRoleUser1$outboundSchema; -} - /** @internal */ export const OpenAIResponsesInputRoleUnion1$inboundSchema: z.ZodType< OpenAIResponsesInputRoleUnion1, @@ -905,47 +438,6 @@ export const OpenAIResponsesInputRoleUnion1$inboundSchema: z.ZodType< OpenAIResponsesInputRoleDeveloper1$inboundSchema, ]); -/** @internal */ -export type OpenAIResponsesInputRoleUnion1$Outbound = - | string - | string - | string - | string; - -/** @internal */ -export const OpenAIResponsesInputRoleUnion1$outboundSchema: z.ZodType< - OpenAIResponsesInputRoleUnion1$Outbound, - OpenAIResponsesInputRoleUnion1 -> = z.union([ - OpenAIResponsesInputRoleUser1$outboundSchema, - OpenAIResponsesInputRoleSystem1$outboundSchema, - OpenAIResponsesInputRoleAssistant$outboundSchema, - OpenAIResponsesInputRoleDeveloper1$outboundSchema, -]); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenAIResponsesInputRoleUnion1$ { - /** @deprecated use `OpenAIResponsesInputRoleUnion1$inboundSchema` instead. */ - export const inboundSchema = OpenAIResponsesInputRoleUnion1$inboundSchema; - /** @deprecated use `OpenAIResponsesInputRoleUnion1$outboundSchema` instead. */ - export const outboundSchema = OpenAIResponsesInputRoleUnion1$outboundSchema; - /** @deprecated use `OpenAIResponsesInputRoleUnion1$Outbound` instead. */ - export type Outbound = OpenAIResponsesInputRoleUnion1$Outbound; -} - -export function openAIResponsesInputRoleUnion1ToJSON( - openAIResponsesInputRoleUnion1: OpenAIResponsesInputRoleUnion1, -): string { - return JSON.stringify( - OpenAIResponsesInputRoleUnion1$outboundSchema.parse( - openAIResponsesInputRoleUnion1, - ), - ); -} - export function openAIResponsesInputRoleUnion1FromJSON( jsonString: string, ): SafeParseResult { @@ -983,63 +475,6 @@ export const OpenAIResponsesInputContent1$inboundSchema: z.ZodType< ), ]); -/** @internal */ -export type OpenAIResponsesInputContent1$Outbound = - | (ResponseInputText$Outbound & { type: "input_text" }) - | (ResponseInputImage$Outbound & { type: "input_image" }) - | (ResponseInputAudio$Outbound & { type: "input_audio" }) - | (ResponseInputFile$Outbound & { type: "input_file" }); - -/** @internal */ -export const OpenAIResponsesInputContent1$outboundSchema: z.ZodType< - OpenAIResponsesInputContent1$Outbound, - OpenAIResponsesInputContent1 -> = z.union([ - ResponseInputText$outboundSchema.and( - z.object({ type: z.literal("input_text") }).transform((v) => ({ - type: v.type, - })), - ), - ResponseInputImage$outboundSchema.and( - z.object({ type: z.literal("input_image") }).transform((v) => ({ - type: v.type, - })), - ), - ResponseInputAudio$outboundSchema.and( - z.object({ type: z.literal("input_audio") }).transform((v) => ({ - type: v.type, - })), - ), - ResponseInputFile$outboundSchema.and( - z.object({ type: z.literal("input_file") }).transform((v) => ({ - type: v.type, - })), - ), -]); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenAIResponsesInputContent1$ { - /** @deprecated use `OpenAIResponsesInputContent1$inboundSchema` instead. */ - export const inboundSchema = OpenAIResponsesInputContent1$inboundSchema; - /** @deprecated use `OpenAIResponsesInputContent1$outboundSchema` instead. */ - export const outboundSchema = OpenAIResponsesInputContent1$outboundSchema; - /** @deprecated use `OpenAIResponsesInputContent1$Outbound` instead. */ - export type Outbound = OpenAIResponsesInputContent1$Outbound; -} - -export function openAIResponsesInputContent1ToJSON( - openAIResponsesInputContent1: OpenAIResponsesInputContent1, -): string { - return JSON.stringify( - OpenAIResponsesInputContent1$outboundSchema.parse( - openAIResponsesInputContent1, - ), - ); -} - export function openAIResponsesInputContent1FromJSON( jsonString: string, ): SafeParseResult { @@ -1082,71 +517,6 @@ export const OpenAIResponsesInputContent2$inboundSchema: z.ZodType< z.string(), ]); -/** @internal */ -export type OpenAIResponsesInputContent2$Outbound = - | Array< - | (ResponseInputText$Outbound & { type: "input_text" }) - | (ResponseInputImage$Outbound & { type: "input_image" }) - | (ResponseInputAudio$Outbound & { type: "input_audio" }) - | (ResponseInputFile$Outbound & { type: "input_file" }) - > - | string; - -/** @internal */ -export const OpenAIResponsesInputContent2$outboundSchema: z.ZodType< - OpenAIResponsesInputContent2$Outbound, - OpenAIResponsesInputContent2 -> = z.union([ - z.array( - z.union([ - ResponseInputText$outboundSchema.and( - z.object({ type: z.literal("input_text") }).transform((v) => ({ - type: v.type, - })), - ), - ResponseInputImage$outboundSchema.and( - z.object({ type: z.literal("input_image") }).transform((v) => ({ - type: v.type, - })), - ), - ResponseInputAudio$outboundSchema.and( - z.object({ type: z.literal("input_audio") }).transform((v) => ({ - type: v.type, - })), - ), - ResponseInputFile$outboundSchema.and( - z.object({ type: z.literal("input_file") }).transform((v) => ({ - type: v.type, - })), - ), - ]), - ), - z.string(), -]); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenAIResponsesInputContent2$ { - /** @deprecated use `OpenAIResponsesInputContent2$inboundSchema` instead. */ - export const inboundSchema = OpenAIResponsesInputContent2$inboundSchema; - /** @deprecated use `OpenAIResponsesInputContent2$outboundSchema` instead. */ - export const outboundSchema = OpenAIResponsesInputContent2$outboundSchema; - /** @deprecated use `OpenAIResponsesInputContent2$Outbound` instead. */ - export type Outbound = OpenAIResponsesInputContent2$Outbound; -} - -export function openAIResponsesInputContent2ToJSON( - openAIResponsesInputContent2: OpenAIResponsesInputContent2, -): string { - return JSON.stringify( - OpenAIResponsesInputContent2$outboundSchema.parse( - openAIResponsesInputContent2, - ), - ); -} - export function openAIResponsesInputContent2FromJSON( jsonString: string, ): SafeParseResult { @@ -1198,84 +568,6 @@ export const OpenAIResponsesInputMessage1$inboundSchema: z.ZodType< ]), }); -/** @internal */ -export type OpenAIResponsesInputMessage1$Outbound = { - type?: string | undefined; - role: string | string | string | string; - content: - | Array< - | (ResponseInputText$Outbound & { type: "input_text" }) - | (ResponseInputImage$Outbound & { type: "input_image" }) - | (ResponseInputAudio$Outbound & { type: "input_audio" }) - | (ResponseInputFile$Outbound & { type: "input_file" }) - > - | string; -}; - -/** @internal */ -export const OpenAIResponsesInputMessage1$outboundSchema: z.ZodType< - OpenAIResponsesInputMessage1$Outbound, - OpenAIResponsesInputMessage1 -> = z.object({ - type: OpenAIResponsesInputTypeMessage1$outboundSchema.optional(), - role: z.union([ - OpenAIResponsesInputRoleUser1$outboundSchema, - OpenAIResponsesInputRoleSystem1$outboundSchema, - OpenAIResponsesInputRoleAssistant$outboundSchema, - OpenAIResponsesInputRoleDeveloper1$outboundSchema, - ]), - content: z.union([ - z.array( - z.union([ - ResponseInputText$outboundSchema.and( - z.object({ type: z.literal("input_text") }).transform((v) => ({ - type: v.type, - })), - ), - ResponseInputImage$outboundSchema.and( - z.object({ type: z.literal("input_image") }).transform((v) => ({ - type: v.type, - })), - ), - ResponseInputAudio$outboundSchema.and( - z.object({ type: z.literal("input_audio") }).transform((v) => ({ - type: v.type, - })), - ), - ResponseInputFile$outboundSchema.and( - z.object({ type: z.literal("input_file") }).transform((v) => ({ - type: v.type, - })), - ), - ]), - ), - z.string(), - ]), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenAIResponsesInputMessage1$ { - /** @deprecated use `OpenAIResponsesInputMessage1$inboundSchema` instead. */ - export const inboundSchema = OpenAIResponsesInputMessage1$inboundSchema; - /** @deprecated use `OpenAIResponsesInputMessage1$outboundSchema` instead. */ - export const outboundSchema = OpenAIResponsesInputMessage1$outboundSchema; - /** @deprecated use `OpenAIResponsesInputMessage1$Outbound` instead. */ - export type Outbound = OpenAIResponsesInputMessage1$Outbound; -} - -export function openAIResponsesInputMessage1ToJSON( - openAIResponsesInputMessage1: OpenAIResponsesInputMessage1, -): string { - return JSON.stringify( - OpenAIResponsesInputMessage1$outboundSchema.parse( - openAIResponsesInputMessage1, - ), - ); -} - export function openAIResponsesInputMessage1FromJSON( jsonString: string, ): SafeParseResult { @@ -1299,49 +591,6 @@ export const OpenAIResponsesInputUnion1$inboundSchema: z.ZodType< z.lazy(() => OpenAIResponsesInputMessage1$inboundSchema), ]); -/** @internal */ -export type OpenAIResponsesInputUnion1$Outbound = - | OpenAIResponsesInputFunctionCallOutput$Outbound - | OpenAIResponsesInputFunctionCall$Outbound - | OutputItemImageGenerationCall$Outbound - | OutputMessage$Outbound - | OpenAIResponsesInputMessage2$Outbound - | OpenAIResponsesInputMessage1$Outbound; - -/** @internal */ -export const OpenAIResponsesInputUnion1$outboundSchema: z.ZodType< - OpenAIResponsesInputUnion1$Outbound, - OpenAIResponsesInputUnion1 -> = z.union([ - z.lazy(() => OpenAIResponsesInputFunctionCallOutput$outboundSchema), - z.lazy(() => OpenAIResponsesInputFunctionCall$outboundSchema), - OutputItemImageGenerationCall$outboundSchema, - OutputMessage$outboundSchema, - z.lazy(() => OpenAIResponsesInputMessage2$outboundSchema), - z.lazy(() => OpenAIResponsesInputMessage1$outboundSchema), -]); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenAIResponsesInputUnion1$ { - /** @deprecated use `OpenAIResponsesInputUnion1$inboundSchema` instead. */ - export const inboundSchema = OpenAIResponsesInputUnion1$inboundSchema; - /** @deprecated use `OpenAIResponsesInputUnion1$outboundSchema` instead. */ - export const outboundSchema = OpenAIResponsesInputUnion1$outboundSchema; - /** @deprecated use `OpenAIResponsesInputUnion1$Outbound` instead. */ - export type Outbound = OpenAIResponsesInputUnion1$Outbound; -} - -export function openAIResponsesInputUnion1ToJSON( - openAIResponsesInputUnion1: OpenAIResponsesInputUnion1, -): string { - return JSON.stringify( - OpenAIResponsesInputUnion1$outboundSchema.parse(openAIResponsesInputUnion1), - ); -} - export function openAIResponsesInputUnion1FromJSON( jsonString: string, ): SafeParseResult { @@ -1369,57 +618,6 @@ export const OpenAIResponsesInputUnion$inboundSchema: z.ZodType< z.any(), ]); -/** @internal */ -export type OpenAIResponsesInputUnion$Outbound = - | string - | Array< - | OpenAIResponsesInputFunctionCallOutput$Outbound - | OpenAIResponsesInputFunctionCall$Outbound - | OutputItemImageGenerationCall$Outbound - | OutputMessage$Outbound - | OpenAIResponsesInputMessage2$Outbound - | OpenAIResponsesInputMessage1$Outbound - > - | any; - -/** @internal */ -export const OpenAIResponsesInputUnion$outboundSchema: z.ZodType< - OpenAIResponsesInputUnion$Outbound, - OpenAIResponsesInputUnion -> = z.union([ - z.string(), - z.array(z.union([ - z.lazy(() => OpenAIResponsesInputFunctionCallOutput$outboundSchema), - z.lazy(() => OpenAIResponsesInputFunctionCall$outboundSchema), - OutputItemImageGenerationCall$outboundSchema, - OutputMessage$outboundSchema, - z.lazy(() => OpenAIResponsesInputMessage2$outboundSchema), - z.lazy(() => OpenAIResponsesInputMessage1$outboundSchema), - ])), - z.any(), -]); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenAIResponsesInputUnion$ { - /** @deprecated use `OpenAIResponsesInputUnion$inboundSchema` instead. */ - export const inboundSchema = OpenAIResponsesInputUnion$inboundSchema; - /** @deprecated use `OpenAIResponsesInputUnion$outboundSchema` instead. */ - export const outboundSchema = OpenAIResponsesInputUnion$outboundSchema; - /** @deprecated use `OpenAIResponsesInputUnion$Outbound` instead. */ - export type Outbound = OpenAIResponsesInputUnion$Outbound; -} - -export function openAIResponsesInputUnionToJSON( - openAIResponsesInputUnion: OpenAIResponsesInputUnion, -): string { - return JSON.stringify( - OpenAIResponsesInputUnion$outboundSchema.parse(openAIResponsesInputUnion), - ); -} - export function openAIResponsesInputUnionFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/openairesponsesprompt.ts b/src/models/openairesponsesprompt.ts index 623446b9..91c80fb2 100644 --- a/src/models/openairesponsesprompt.ts +++ b/src/models/openairesponsesprompt.ts @@ -52,7 +52,6 @@ export const Variables$inboundSchema: z.ZodType = z.union([ ResponseInputFile$inboundSchema, z.string(), ]); - /** @internal */ export type Variables$Outbound = | ResponseInputText$Outbound @@ -71,23 +70,9 @@ export const Variables$outboundSchema: z.ZodType< z.string(), ]); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Variables$ { - /** @deprecated use `Variables$inboundSchema` instead. */ - export const inboundSchema = Variables$inboundSchema; - /** @deprecated use `Variables$outboundSchema` instead. */ - export const outboundSchema = Variables$outboundSchema; - /** @deprecated use `Variables$Outbound` instead. */ - export type Outbound = Variables$Outbound; -} - export function variablesToJSON(variables: Variables): string { return JSON.stringify(Variables$outboundSchema.parse(variables)); } - export function variablesFromJSON( jsonString: string, ): SafeParseResult { @@ -116,7 +101,6 @@ export const OpenAIResponsesPrompt$inboundSchema: z.ZodType< ), ).optional(), }); - /** @internal */ export type OpenAIResponsesPrompt$Outbound = { id: string; @@ -151,19 +135,6 @@ export const OpenAIResponsesPrompt$outboundSchema: z.ZodType< ).optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenAIResponsesPrompt$ { - /** @deprecated use `OpenAIResponsesPrompt$inboundSchema` instead. */ - export const inboundSchema = OpenAIResponsesPrompt$inboundSchema; - /** @deprecated use `OpenAIResponsesPrompt$outboundSchema` instead. */ - export const outboundSchema = OpenAIResponsesPrompt$outboundSchema; - /** @deprecated use `OpenAIResponsesPrompt$Outbound` instead. */ - export type Outbound = OpenAIResponsesPrompt$Outbound; -} - export function openAIResponsesPromptToJSON( openAIResponsesPrompt: OpenAIResponsesPrompt, ): string { @@ -171,7 +142,6 @@ export function openAIResponsesPromptToJSON( OpenAIResponsesPrompt$outboundSchema.parse(openAIResponsesPrompt), ); } - export function openAIResponsesPromptFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/openairesponsesreasoningconfig.ts b/src/models/openairesponsesreasoningconfig.ts index d83b38f9..f8b75c5c 100644 --- a/src/models/openairesponsesreasoningconfig.ts +++ b/src/models/openairesponsesreasoningconfig.ts @@ -9,12 +9,10 @@ import { SDKValidationError } from "./errors/sdkvalidationerror.js"; import { OpenAIResponsesReasoningEffort, OpenAIResponsesReasoningEffort$inboundSchema, - OpenAIResponsesReasoningEffort$outboundSchema, } from "./openairesponsesreasoningeffort.js"; import { ReasoningSummaryVerbosity, ReasoningSummaryVerbosity$inboundSchema, - ReasoningSummaryVerbosity$outboundSchema, } from "./reasoningsummaryverbosity.js"; export type OpenAIResponsesReasoningConfig = { @@ -31,44 +29,6 @@ export const OpenAIResponsesReasoningConfig$inboundSchema: z.ZodType< summary: ReasoningSummaryVerbosity$inboundSchema.optional(), }); -/** @internal */ -export type OpenAIResponsesReasoningConfig$Outbound = { - effort?: string | null | undefined; - summary?: string | undefined; -}; - -/** @internal */ -export const OpenAIResponsesReasoningConfig$outboundSchema: z.ZodType< - OpenAIResponsesReasoningConfig$Outbound, - OpenAIResponsesReasoningConfig -> = z.object({ - effort: z.nullable(OpenAIResponsesReasoningEffort$outboundSchema).optional(), - summary: ReasoningSummaryVerbosity$outboundSchema.optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenAIResponsesReasoningConfig$ { - /** @deprecated use `OpenAIResponsesReasoningConfig$inboundSchema` instead. */ - export const inboundSchema = OpenAIResponsesReasoningConfig$inboundSchema; - /** @deprecated use `OpenAIResponsesReasoningConfig$outboundSchema` instead. */ - export const outboundSchema = OpenAIResponsesReasoningConfig$outboundSchema; - /** @deprecated use `OpenAIResponsesReasoningConfig$Outbound` instead. */ - export type Outbound = OpenAIResponsesReasoningConfig$Outbound; -} - -export function openAIResponsesReasoningConfigToJSON( - openAIResponsesReasoningConfig: OpenAIResponsesReasoningConfig, -): string { - return JSON.stringify( - OpenAIResponsesReasoningConfig$outboundSchema.parse( - openAIResponsesReasoningConfig, - ), - ); -} - export function openAIResponsesReasoningConfigFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/openairesponsesreasoningeffort.ts b/src/models/openairesponsesreasoningeffort.ts index c9689c43..3aef746b 100644 --- a/src/models/openairesponsesreasoningeffort.ts +++ b/src/models/openairesponsesreasoningeffort.ts @@ -28,7 +28,6 @@ export const OpenAIResponsesReasoningEffort$inboundSchema: z.ZodType< z.enum(OpenAIResponsesReasoningEffort), z.string().transform(catchUnrecognizedEnum), ]); - /** @internal */ export const OpenAIResponsesReasoningEffort$outboundSchema: z.ZodType< OpenAIResponsesReasoningEffort, @@ -37,14 +36,3 @@ export const OpenAIResponsesReasoningEffort$outboundSchema: z.ZodType< z.enum(OpenAIResponsesReasoningEffort), z.string().and(z.custom>()), ]); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenAIResponsesReasoningEffort$ { - /** @deprecated use `OpenAIResponsesReasoningEffort$inboundSchema` instead. */ - export const inboundSchema = OpenAIResponsesReasoningEffort$inboundSchema; - /** @deprecated use `OpenAIResponsesReasoningEffort$outboundSchema` instead. */ - export const outboundSchema = OpenAIResponsesReasoningEffort$outboundSchema; -} diff --git a/src/models/openairesponsesrefusalcontent.ts b/src/models/openairesponsesrefusalcontent.ts index de481a79..0e9d2c92 100644 --- a/src/models/openairesponsesrefusalcontent.ts +++ b/src/models/openairesponsesrefusalcontent.ts @@ -24,24 +24,11 @@ export type OpenAIResponsesRefusalContent = { export const OpenAIResponsesRefusalContentType$inboundSchema: z.ZodEnum< typeof OpenAIResponsesRefusalContentType > = z.enum(OpenAIResponsesRefusalContentType); - /** @internal */ export const OpenAIResponsesRefusalContentType$outboundSchema: z.ZodEnum< typeof OpenAIResponsesRefusalContentType > = OpenAIResponsesRefusalContentType$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenAIResponsesRefusalContentType$ { - /** @deprecated use `OpenAIResponsesRefusalContentType$inboundSchema` instead. */ - export const inboundSchema = OpenAIResponsesRefusalContentType$inboundSchema; - /** @deprecated use `OpenAIResponsesRefusalContentType$outboundSchema` instead. */ - export const outboundSchema = - OpenAIResponsesRefusalContentType$outboundSchema; -} - /** @internal */ export const OpenAIResponsesRefusalContent$inboundSchema: z.ZodType< OpenAIResponsesRefusalContent, @@ -50,7 +37,6 @@ export const OpenAIResponsesRefusalContent$inboundSchema: z.ZodType< type: OpenAIResponsesRefusalContentType$inboundSchema, refusal: z.string(), }); - /** @internal */ export type OpenAIResponsesRefusalContent$Outbound = { type: string; @@ -66,19 +52,6 @@ export const OpenAIResponsesRefusalContent$outboundSchema: z.ZodType< refusal: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenAIResponsesRefusalContent$ { - /** @deprecated use `OpenAIResponsesRefusalContent$inboundSchema` instead. */ - export const inboundSchema = OpenAIResponsesRefusalContent$inboundSchema; - /** @deprecated use `OpenAIResponsesRefusalContent$outboundSchema` instead. */ - export const outboundSchema = OpenAIResponsesRefusalContent$outboundSchema; - /** @deprecated use `OpenAIResponsesRefusalContent$Outbound` instead. */ - export type Outbound = OpenAIResponsesRefusalContent$Outbound; -} - export function openAIResponsesRefusalContentToJSON( openAIResponsesRefusalContent: OpenAIResponsesRefusalContent, ): string { @@ -88,7 +61,6 @@ export function openAIResponsesRefusalContentToJSON( ), ); } - export function openAIResponsesRefusalContentFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/openairesponsesresponsestatus.ts b/src/models/openairesponsesresponsestatus.ts index 356a4d70..4dc8f5bc 100644 --- a/src/models/openairesponsesresponsestatus.ts +++ b/src/models/openairesponsesresponsestatus.ts @@ -3,11 +3,7 @@ */ import * as z from "zod/v4"; -import { - catchUnrecognizedEnum, - OpenEnum, - Unrecognized, -} from "../types/enums.js"; +import { catchUnrecognizedEnum, OpenEnum } from "../types/enums.js"; export const OpenAIResponsesResponseStatus = { Completed: "completed", @@ -30,23 +26,3 @@ export const OpenAIResponsesResponseStatus$inboundSchema: z.ZodType< z.enum(OpenAIResponsesResponseStatus), z.string().transform(catchUnrecognizedEnum), ]); - -/** @internal */ -export const OpenAIResponsesResponseStatus$outboundSchema: z.ZodType< - OpenAIResponsesResponseStatus, - OpenAIResponsesResponseStatus -> = z.union([ - z.enum(OpenAIResponsesResponseStatus), - z.string().and(z.custom>()), -]); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenAIResponsesResponseStatus$ { - /** @deprecated use `OpenAIResponsesResponseStatus$inboundSchema` instead. */ - export const inboundSchema = OpenAIResponsesResponseStatus$inboundSchema; - /** @deprecated use `OpenAIResponsesResponseStatus$outboundSchema` instead. */ - export const outboundSchema = OpenAIResponsesResponseStatus$outboundSchema; -} diff --git a/src/models/openairesponsesservicetier.ts b/src/models/openairesponsesservicetier.ts index f6869430..4b966503 100644 --- a/src/models/openairesponsesservicetier.ts +++ b/src/models/openairesponsesservicetier.ts @@ -3,11 +3,7 @@ */ import * as z from "zod/v4"; -import { - catchUnrecognizedEnum, - OpenEnum, - Unrecognized, -} from "../types/enums.js"; +import { catchUnrecognizedEnum, OpenEnum } from "../types/enums.js"; export const OpenAIResponsesServiceTier = { Auto: "auto", @@ -29,23 +25,3 @@ export const OpenAIResponsesServiceTier$inboundSchema: z.ZodType< z.enum(OpenAIResponsesServiceTier), z.string().transform(catchUnrecognizedEnum), ]); - -/** @internal */ -export const OpenAIResponsesServiceTier$outboundSchema: z.ZodType< - OpenAIResponsesServiceTier, - OpenAIResponsesServiceTier -> = z.union([ - z.enum(OpenAIResponsesServiceTier), - z.string().and(z.custom>()), -]); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenAIResponsesServiceTier$ { - /** @deprecated use `OpenAIResponsesServiceTier$inboundSchema` instead. */ - export const inboundSchema = OpenAIResponsesServiceTier$inboundSchema; - /** @deprecated use `OpenAIResponsesServiceTier$outboundSchema` instead. */ - export const outboundSchema = OpenAIResponsesServiceTier$outboundSchema; -} diff --git a/src/models/openairesponsestoolchoiceunion.ts b/src/models/openairesponsestoolchoiceunion.ts index e2a88af0..5c98f015 100644 --- a/src/models/openairesponsestoolchoiceunion.ts +++ b/src/models/openairesponsestoolchoiceunion.ts @@ -77,54 +77,25 @@ export const OpenAIResponsesToolChoiceTypeWebSearchPreview$inboundSchema: z.ZodEnum = z.enum( OpenAIResponsesToolChoiceTypeWebSearchPreview, ); - /** @internal */ export const OpenAIResponsesToolChoiceTypeWebSearchPreview$outboundSchema: z.ZodEnum = OpenAIResponsesToolChoiceTypeWebSearchPreview$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenAIResponsesToolChoiceTypeWebSearchPreview$ { - /** @deprecated use `OpenAIResponsesToolChoiceTypeWebSearchPreview$inboundSchema` instead. */ - export const inboundSchema = - OpenAIResponsesToolChoiceTypeWebSearchPreview$inboundSchema; - /** @deprecated use `OpenAIResponsesToolChoiceTypeWebSearchPreview$outboundSchema` instead. */ - export const outboundSchema = - OpenAIResponsesToolChoiceTypeWebSearchPreview$outboundSchema; -} - /** @internal */ export const OpenAIResponsesToolChoiceTypeWebSearchPreview20250311$inboundSchema: z.ZodEnum = z .enum(OpenAIResponsesToolChoiceTypeWebSearchPreview20250311); - /** @internal */ export const OpenAIResponsesToolChoiceTypeWebSearchPreview20250311$outboundSchema: z.ZodEnum = OpenAIResponsesToolChoiceTypeWebSearchPreview20250311$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenAIResponsesToolChoiceTypeWebSearchPreview20250311$ { - /** @deprecated use `OpenAIResponsesToolChoiceTypeWebSearchPreview20250311$inboundSchema` instead. */ - export const inboundSchema = - OpenAIResponsesToolChoiceTypeWebSearchPreview20250311$inboundSchema; - /** @deprecated use `OpenAIResponsesToolChoiceTypeWebSearchPreview20250311$outboundSchema` instead. */ - export const outboundSchema = - OpenAIResponsesToolChoiceTypeWebSearchPreview20250311$outboundSchema; -} - /** @internal */ export const Type$inboundSchema: z.ZodType = z.union([ OpenAIResponsesToolChoiceTypeWebSearchPreview20250311$inboundSchema, OpenAIResponsesToolChoiceTypeWebSearchPreview$inboundSchema, ]); - /** @internal */ export type Type$Outbound = string | string; @@ -134,23 +105,9 @@ export const Type$outboundSchema: z.ZodType = z.union([ OpenAIResponsesToolChoiceTypeWebSearchPreview$outboundSchema, ]); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Type$ { - /** @deprecated use `Type$inboundSchema` instead. */ - export const inboundSchema = Type$inboundSchema; - /** @deprecated use `Type$outboundSchema` instead. */ - export const outboundSchema = Type$outboundSchema; - /** @deprecated use `Type$Outbound` instead. */ - export type Outbound = Type$Outbound; -} - export function typeToJSON(type: Type): string { return JSON.stringify(Type$outboundSchema.parse(type)); } - export function typeFromJSON( jsonString: string, ): SafeParseResult { @@ -171,7 +128,6 @@ export const OpenAIResponsesToolChoice$inboundSchema: z.ZodType< OpenAIResponsesToolChoiceTypeWebSearchPreview$inboundSchema, ]), }); - /** @internal */ export type OpenAIResponsesToolChoice$Outbound = { type: string | string; @@ -188,19 +144,6 @@ export const OpenAIResponsesToolChoice$outboundSchema: z.ZodType< ]), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenAIResponsesToolChoice$ { - /** @deprecated use `OpenAIResponsesToolChoice$inboundSchema` instead. */ - export const inboundSchema = OpenAIResponsesToolChoice$inboundSchema; - /** @deprecated use `OpenAIResponsesToolChoice$outboundSchema` instead. */ - export const outboundSchema = OpenAIResponsesToolChoice$outboundSchema; - /** @deprecated use `OpenAIResponsesToolChoice$Outbound` instead. */ - export type Outbound = OpenAIResponsesToolChoice$Outbound; -} - export function openAIResponsesToolChoiceToJSON( openAIResponsesToolChoice: OpenAIResponsesToolChoice, ): string { @@ -208,7 +151,6 @@ export function openAIResponsesToolChoiceToJSON( OpenAIResponsesToolChoice$outboundSchema.parse(openAIResponsesToolChoice), ); } - export function openAIResponsesToolChoiceFromJSON( jsonString: string, ): SafeParseResult { @@ -223,25 +165,11 @@ export function openAIResponsesToolChoiceFromJSON( export const OpenAIResponsesToolChoiceTypeFunction$inboundSchema: z.ZodEnum< typeof OpenAIResponsesToolChoiceTypeFunction > = z.enum(OpenAIResponsesToolChoiceTypeFunction); - /** @internal */ export const OpenAIResponsesToolChoiceTypeFunction$outboundSchema: z.ZodEnum< typeof OpenAIResponsesToolChoiceTypeFunction > = OpenAIResponsesToolChoiceTypeFunction$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenAIResponsesToolChoiceTypeFunction$ { - /** @deprecated use `OpenAIResponsesToolChoiceTypeFunction$inboundSchema` instead. */ - export const inboundSchema = - OpenAIResponsesToolChoiceTypeFunction$inboundSchema; - /** @deprecated use `OpenAIResponsesToolChoiceTypeFunction$outboundSchema` instead. */ - export const outboundSchema = - OpenAIResponsesToolChoiceTypeFunction$outboundSchema; -} - /** @internal */ export const OpenAIResponsesToolChoiceFunction$inboundSchema: z.ZodType< OpenAIResponsesToolChoiceFunction, @@ -250,7 +178,6 @@ export const OpenAIResponsesToolChoiceFunction$inboundSchema: z.ZodType< type: OpenAIResponsesToolChoiceTypeFunction$inboundSchema, name: z.string(), }); - /** @internal */ export type OpenAIResponsesToolChoiceFunction$Outbound = { type: string; @@ -266,20 +193,6 @@ export const OpenAIResponsesToolChoiceFunction$outboundSchema: z.ZodType< name: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenAIResponsesToolChoiceFunction$ { - /** @deprecated use `OpenAIResponsesToolChoiceFunction$inboundSchema` instead. */ - export const inboundSchema = OpenAIResponsesToolChoiceFunction$inboundSchema; - /** @deprecated use `OpenAIResponsesToolChoiceFunction$outboundSchema` instead. */ - export const outboundSchema = - OpenAIResponsesToolChoiceFunction$outboundSchema; - /** @deprecated use `OpenAIResponsesToolChoiceFunction$Outbound` instead. */ - export type Outbound = OpenAIResponsesToolChoiceFunction$Outbound; -} - export function openAIResponsesToolChoiceFunctionToJSON( openAIResponsesToolChoiceFunction: OpenAIResponsesToolChoiceFunction, ): string { @@ -289,7 +202,6 @@ export function openAIResponsesToolChoiceFunctionToJSON( ), ); } - export function openAIResponsesToolChoiceFunctionFromJSON( jsonString: string, ): SafeParseResult { @@ -304,66 +216,29 @@ export function openAIResponsesToolChoiceFunctionFromJSON( export const OpenAIResponsesToolChoiceRequired$inboundSchema: z.ZodEnum< typeof OpenAIResponsesToolChoiceRequired > = z.enum(OpenAIResponsesToolChoiceRequired); - /** @internal */ export const OpenAIResponsesToolChoiceRequired$outboundSchema: z.ZodEnum< typeof OpenAIResponsesToolChoiceRequired > = OpenAIResponsesToolChoiceRequired$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenAIResponsesToolChoiceRequired$ { - /** @deprecated use `OpenAIResponsesToolChoiceRequired$inboundSchema` instead. */ - export const inboundSchema = OpenAIResponsesToolChoiceRequired$inboundSchema; - /** @deprecated use `OpenAIResponsesToolChoiceRequired$outboundSchema` instead. */ - export const outboundSchema = - OpenAIResponsesToolChoiceRequired$outboundSchema; -} - /** @internal */ export const OpenAIResponsesToolChoiceNone$inboundSchema: z.ZodEnum< typeof OpenAIResponsesToolChoiceNone > = z.enum(OpenAIResponsesToolChoiceNone); - /** @internal */ export const OpenAIResponsesToolChoiceNone$outboundSchema: z.ZodEnum< typeof OpenAIResponsesToolChoiceNone > = OpenAIResponsesToolChoiceNone$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenAIResponsesToolChoiceNone$ { - /** @deprecated use `OpenAIResponsesToolChoiceNone$inboundSchema` instead. */ - export const inboundSchema = OpenAIResponsesToolChoiceNone$inboundSchema; - /** @deprecated use `OpenAIResponsesToolChoiceNone$outboundSchema` instead. */ - export const outboundSchema = OpenAIResponsesToolChoiceNone$outboundSchema; -} - /** @internal */ export const OpenAIResponsesToolChoiceAuto$inboundSchema: z.ZodEnum< typeof OpenAIResponsesToolChoiceAuto > = z.enum(OpenAIResponsesToolChoiceAuto); - /** @internal */ export const OpenAIResponsesToolChoiceAuto$outboundSchema: z.ZodEnum< typeof OpenAIResponsesToolChoiceAuto > = OpenAIResponsesToolChoiceAuto$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenAIResponsesToolChoiceAuto$ { - /** @deprecated use `OpenAIResponsesToolChoiceAuto$inboundSchema` instead. */ - export const inboundSchema = OpenAIResponsesToolChoiceAuto$inboundSchema; - /** @deprecated use `OpenAIResponsesToolChoiceAuto$outboundSchema` instead. */ - export const outboundSchema = OpenAIResponsesToolChoiceAuto$outboundSchema; -} - /** @internal */ export const OpenAIResponsesToolChoiceUnion$inboundSchema: z.ZodType< OpenAIResponsesToolChoiceUnion, @@ -375,7 +250,6 @@ export const OpenAIResponsesToolChoiceUnion$inboundSchema: z.ZodType< OpenAIResponsesToolChoiceNone$inboundSchema, OpenAIResponsesToolChoiceRequired$inboundSchema, ]); - /** @internal */ export type OpenAIResponsesToolChoiceUnion$Outbound = | OpenAIResponsesToolChoiceFunction$Outbound @@ -396,19 +270,6 @@ export const OpenAIResponsesToolChoiceUnion$outboundSchema: z.ZodType< OpenAIResponsesToolChoiceRequired$outboundSchema, ]); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenAIResponsesToolChoiceUnion$ { - /** @deprecated use `OpenAIResponsesToolChoiceUnion$inboundSchema` instead. */ - export const inboundSchema = OpenAIResponsesToolChoiceUnion$inboundSchema; - /** @deprecated use `OpenAIResponsesToolChoiceUnion$outboundSchema` instead. */ - export const outboundSchema = OpenAIResponsesToolChoiceUnion$outboundSchema; - /** @deprecated use `OpenAIResponsesToolChoiceUnion$Outbound` instead. */ - export type Outbound = OpenAIResponsesToolChoiceUnion$Outbound; -} - export function openAIResponsesToolChoiceUnionToJSON( openAIResponsesToolChoiceUnion: OpenAIResponsesToolChoiceUnion, ): string { @@ -418,7 +279,6 @@ export function openAIResponsesToolChoiceUnionToJSON( ), ); } - export function openAIResponsesToolChoiceUnionFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/openairesponsestruncation.ts b/src/models/openairesponsestruncation.ts index f8125dd2..5d0c3e1a 100644 --- a/src/models/openairesponsestruncation.ts +++ b/src/models/openairesponsestruncation.ts @@ -3,11 +3,7 @@ */ import * as z from "zod/v4"; -import { - catchUnrecognizedEnum, - OpenEnum, - Unrecognized, -} from "../types/enums.js"; +import { catchUnrecognizedEnum, OpenEnum } from "../types/enums.js"; export const OpenAIResponsesTruncation = { Auto: "auto", @@ -26,23 +22,3 @@ export const OpenAIResponsesTruncation$inboundSchema: z.ZodType< z.enum(OpenAIResponsesTruncation), z.string().transform(catchUnrecognizedEnum), ]); - -/** @internal */ -export const OpenAIResponsesTruncation$outboundSchema: z.ZodType< - OpenAIResponsesTruncation, - OpenAIResponsesTruncation -> = z.union([ - z.enum(OpenAIResponsesTruncation), - z.string().and(z.custom>()), -]); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenAIResponsesTruncation$ { - /** @deprecated use `OpenAIResponsesTruncation$inboundSchema` instead. */ - export const inboundSchema = OpenAIResponsesTruncation$inboundSchema; - /** @deprecated use `OpenAIResponsesTruncation$outboundSchema` instead. */ - export const outboundSchema = OpenAIResponsesTruncation$outboundSchema; -} diff --git a/src/models/openresponseseasyinputmessage.ts b/src/models/openresponseseasyinputmessage.ts index 69457d26..1eb2c6ce 100644 --- a/src/models/openresponseseasyinputmessage.ts +++ b/src/models/openresponseseasyinputmessage.ts @@ -3,31 +3,24 @@ */ import * as z from "zod/v4"; -import { safeParse } from "../lib/schemas.js"; import { ClosedEnum } from "../types/enums.js"; -import { Result as SafeParseResult } from "../types/fp.js"; -import { SDKValidationError } from "./errors/sdkvalidationerror.js"; import { ResponseInputAudio, - ResponseInputAudio$inboundSchema, ResponseInputAudio$Outbound, ResponseInputAudio$outboundSchema, } from "./responseinputaudio.js"; import { ResponseInputFile, - ResponseInputFile$inboundSchema, ResponseInputFile$Outbound, ResponseInputFile$outboundSchema, } from "./responseinputfile.js"; import { ResponseInputImage, - ResponseInputImage$inboundSchema, ResponseInputImage$Outbound, ResponseInputImage$outboundSchema, } from "./responseinputimage.js"; import { ResponseInputText, - ResponseInputText$inboundSchema, ResponseInputText$Outbound, ResponseInputText$outboundSchema, } from "./responseinputtext.js"; @@ -105,132 +98,32 @@ export type OpenResponsesEasyInputMessage = { | string; }; -/** @internal */ -export const OpenResponsesEasyInputMessageType$inboundSchema: z.ZodEnum< - typeof OpenResponsesEasyInputMessageType -> = z.enum(OpenResponsesEasyInputMessageType); - /** @internal */ export const OpenResponsesEasyInputMessageType$outboundSchema: z.ZodEnum< typeof OpenResponsesEasyInputMessageType -> = OpenResponsesEasyInputMessageType$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesEasyInputMessageType$ { - /** @deprecated use `OpenResponsesEasyInputMessageType$inboundSchema` instead. */ - export const inboundSchema = OpenResponsesEasyInputMessageType$inboundSchema; - /** @deprecated use `OpenResponsesEasyInputMessageType$outboundSchema` instead. */ - export const outboundSchema = - OpenResponsesEasyInputMessageType$outboundSchema; -} +> = z.enum(OpenResponsesEasyInputMessageType); /** @internal */ -export const OpenResponsesEasyInputMessageRoleDeveloper$inboundSchema: +export const OpenResponsesEasyInputMessageRoleDeveloper$outboundSchema: z.ZodEnum = z.enum( OpenResponsesEasyInputMessageRoleDeveloper, ); /** @internal */ -export const OpenResponsesEasyInputMessageRoleDeveloper$outboundSchema: - z.ZodEnum = - OpenResponsesEasyInputMessageRoleDeveloper$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesEasyInputMessageRoleDeveloper$ { - /** @deprecated use `OpenResponsesEasyInputMessageRoleDeveloper$inboundSchema` instead. */ - export const inboundSchema = - OpenResponsesEasyInputMessageRoleDeveloper$inboundSchema; - /** @deprecated use `OpenResponsesEasyInputMessageRoleDeveloper$outboundSchema` instead. */ - export const outboundSchema = - OpenResponsesEasyInputMessageRoleDeveloper$outboundSchema; -} - -/** @internal */ -export const OpenResponsesEasyInputMessageRoleAssistant$inboundSchema: +export const OpenResponsesEasyInputMessageRoleAssistant$outboundSchema: z.ZodEnum = z.enum( OpenResponsesEasyInputMessageRoleAssistant, ); -/** @internal */ -export const OpenResponsesEasyInputMessageRoleAssistant$outboundSchema: - z.ZodEnum = - OpenResponsesEasyInputMessageRoleAssistant$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesEasyInputMessageRoleAssistant$ { - /** @deprecated use `OpenResponsesEasyInputMessageRoleAssistant$inboundSchema` instead. */ - export const inboundSchema = - OpenResponsesEasyInputMessageRoleAssistant$inboundSchema; - /** @deprecated use `OpenResponsesEasyInputMessageRoleAssistant$outboundSchema` instead. */ - export const outboundSchema = - OpenResponsesEasyInputMessageRoleAssistant$outboundSchema; -} - -/** @internal */ -export const OpenResponsesEasyInputMessageRoleSystem$inboundSchema: z.ZodEnum< - typeof OpenResponsesEasyInputMessageRoleSystem -> = z.enum(OpenResponsesEasyInputMessageRoleSystem); - /** @internal */ export const OpenResponsesEasyInputMessageRoleSystem$outboundSchema: z.ZodEnum< typeof OpenResponsesEasyInputMessageRoleSystem -> = OpenResponsesEasyInputMessageRoleSystem$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesEasyInputMessageRoleSystem$ { - /** @deprecated use `OpenResponsesEasyInputMessageRoleSystem$inboundSchema` instead. */ - export const inboundSchema = - OpenResponsesEasyInputMessageRoleSystem$inboundSchema; - /** @deprecated use `OpenResponsesEasyInputMessageRoleSystem$outboundSchema` instead. */ - export const outboundSchema = - OpenResponsesEasyInputMessageRoleSystem$outboundSchema; -} - -/** @internal */ -export const OpenResponsesEasyInputMessageRoleUser$inboundSchema: z.ZodEnum< - typeof OpenResponsesEasyInputMessageRoleUser -> = z.enum(OpenResponsesEasyInputMessageRoleUser); +> = z.enum(OpenResponsesEasyInputMessageRoleSystem); /** @internal */ export const OpenResponsesEasyInputMessageRoleUser$outboundSchema: z.ZodEnum< typeof OpenResponsesEasyInputMessageRoleUser -> = OpenResponsesEasyInputMessageRoleUser$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesEasyInputMessageRoleUser$ { - /** @deprecated use `OpenResponsesEasyInputMessageRoleUser$inboundSchema` instead. */ - export const inboundSchema = - OpenResponsesEasyInputMessageRoleUser$inboundSchema; - /** @deprecated use `OpenResponsesEasyInputMessageRoleUser$outboundSchema` instead. */ - export const outboundSchema = - OpenResponsesEasyInputMessageRoleUser$outboundSchema; -} - -/** @internal */ -export const OpenResponsesEasyInputMessageRoleUnion$inboundSchema: z.ZodType< - OpenResponsesEasyInputMessageRoleUnion, - unknown -> = z.union([ - OpenResponsesEasyInputMessageRoleUser$inboundSchema, - OpenResponsesEasyInputMessageRoleSystem$inboundSchema, - OpenResponsesEasyInputMessageRoleAssistant$inboundSchema, - OpenResponsesEasyInputMessageRoleDeveloper$inboundSchema, -]); +> = z.enum(OpenResponsesEasyInputMessageRoleUser); /** @internal */ export type OpenResponsesEasyInputMessageRoleUnion$Outbound = @@ -250,21 +143,6 @@ export const OpenResponsesEasyInputMessageRoleUnion$outboundSchema: z.ZodType< OpenResponsesEasyInputMessageRoleDeveloper$outboundSchema, ]); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesEasyInputMessageRoleUnion$ { - /** @deprecated use `OpenResponsesEasyInputMessageRoleUnion$inboundSchema` instead. */ - export const inboundSchema = - OpenResponsesEasyInputMessageRoleUnion$inboundSchema; - /** @deprecated use `OpenResponsesEasyInputMessageRoleUnion$outboundSchema` instead. */ - export const outboundSchema = - OpenResponsesEasyInputMessageRoleUnion$outboundSchema; - /** @deprecated use `OpenResponsesEasyInputMessageRoleUnion$Outbound` instead. */ - export type Outbound = OpenResponsesEasyInputMessageRoleUnion$Outbound; -} - export function openResponsesEasyInputMessageRoleUnionToJSON( openResponsesEasyInputMessageRoleUnion: OpenResponsesEasyInputMessageRoleUnion, @@ -276,44 +154,6 @@ export function openResponsesEasyInputMessageRoleUnionToJSON( ); } -export function openResponsesEasyInputMessageRoleUnionFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - OpenResponsesEasyInputMessageRoleUnion$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'OpenResponsesEasyInputMessageRoleUnion' from JSON`, - ); -} - -/** @internal */ -export const OpenResponsesEasyInputMessageContent1$inboundSchema: z.ZodType< - OpenResponsesEasyInputMessageContent1, - unknown -> = z.union([ - ResponseInputText$inboundSchema.and( - z.object({ type: z.literal("input_text") }).transform((v) => ({ - type: v.type, - })), - ), - ResponseInputImage$inboundSchema.and( - z.object({ type: z.literal("input_image") }).transform((v) => ({ - type: v.type, - })), - ), - ResponseInputAudio$inboundSchema.and( - z.object({ type: z.literal("input_audio") }).transform((v) => ({ - type: v.type, - })), - ), - ResponseInputFile$inboundSchema.and( - z.object({ type: z.literal("input_file") }).transform((v) => ({ - type: v.type, - })), - ), -]); - /** @internal */ export type OpenResponsesEasyInputMessageContent1$Outbound = | (ResponseInputText$Outbound & { type: "input_text" }) @@ -348,21 +188,6 @@ export const OpenResponsesEasyInputMessageContent1$outboundSchema: z.ZodType< ), ]); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesEasyInputMessageContent1$ { - /** @deprecated use `OpenResponsesEasyInputMessageContent1$inboundSchema` instead. */ - export const inboundSchema = - OpenResponsesEasyInputMessageContent1$inboundSchema; - /** @deprecated use `OpenResponsesEasyInputMessageContent1$outboundSchema` instead. */ - export const outboundSchema = - OpenResponsesEasyInputMessageContent1$outboundSchema; - /** @deprecated use `OpenResponsesEasyInputMessageContent1$Outbound` instead. */ - export type Outbound = OpenResponsesEasyInputMessageContent1$Outbound; -} - export function openResponsesEasyInputMessageContent1ToJSON( openResponsesEasyInputMessageContent1: OpenResponsesEasyInputMessageContent1, ): string { @@ -373,49 +198,6 @@ export function openResponsesEasyInputMessageContent1ToJSON( ); } -export function openResponsesEasyInputMessageContent1FromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - OpenResponsesEasyInputMessageContent1$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'OpenResponsesEasyInputMessageContent1' from JSON`, - ); -} - -/** @internal */ -export const OpenResponsesEasyInputMessageContent2$inboundSchema: z.ZodType< - OpenResponsesEasyInputMessageContent2, - unknown -> = z.union([ - z.array( - z.union([ - ResponseInputText$inboundSchema.and( - z.object({ type: z.literal("input_text") }).transform((v) => ({ - type: v.type, - })), - ), - ResponseInputImage$inboundSchema.and( - z.object({ type: z.literal("input_image") }).transform((v) => ({ - type: v.type, - })), - ), - ResponseInputAudio$inboundSchema.and( - z.object({ type: z.literal("input_audio") }).transform((v) => ({ - type: v.type, - })), - ), - ResponseInputFile$inboundSchema.and( - z.object({ type: z.literal("input_file") }).transform((v) => ({ - type: v.type, - })), - ), - ]), - ), - z.string(), -]); - /** @internal */ export type OpenResponsesEasyInputMessageContent2$Outbound = | Array< @@ -458,21 +240,6 @@ export const OpenResponsesEasyInputMessageContent2$outboundSchema: z.ZodType< z.string(), ]); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesEasyInputMessageContent2$ { - /** @deprecated use `OpenResponsesEasyInputMessageContent2$inboundSchema` instead. */ - export const inboundSchema = - OpenResponsesEasyInputMessageContent2$inboundSchema; - /** @deprecated use `OpenResponsesEasyInputMessageContent2$outboundSchema` instead. */ - export const outboundSchema = - OpenResponsesEasyInputMessageContent2$outboundSchema; - /** @deprecated use `OpenResponsesEasyInputMessageContent2$Outbound` instead. */ - export type Outbound = OpenResponsesEasyInputMessageContent2$Outbound; -} - export function openResponsesEasyInputMessageContent2ToJSON( openResponsesEasyInputMessageContent2: OpenResponsesEasyInputMessageContent2, ): string { @@ -483,58 +250,6 @@ export function openResponsesEasyInputMessageContent2ToJSON( ); } -export function openResponsesEasyInputMessageContent2FromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - OpenResponsesEasyInputMessageContent2$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'OpenResponsesEasyInputMessageContent2' from JSON`, - ); -} - -/** @internal */ -export const OpenResponsesEasyInputMessage$inboundSchema: z.ZodType< - OpenResponsesEasyInputMessage, - unknown -> = z.object({ - type: OpenResponsesEasyInputMessageType$inboundSchema.optional(), - role: z.union([ - OpenResponsesEasyInputMessageRoleUser$inboundSchema, - OpenResponsesEasyInputMessageRoleSystem$inboundSchema, - OpenResponsesEasyInputMessageRoleAssistant$inboundSchema, - OpenResponsesEasyInputMessageRoleDeveloper$inboundSchema, - ]), - content: z.union([ - z.array( - z.union([ - ResponseInputText$inboundSchema.and( - z.object({ type: z.literal("input_text") }).transform((v) => ({ - type: v.type, - })), - ), - ResponseInputImage$inboundSchema.and( - z.object({ type: z.literal("input_image") }).transform((v) => ({ - type: v.type, - })), - ), - ResponseInputAudio$inboundSchema.and( - z.object({ type: z.literal("input_audio") }).transform((v) => ({ - type: v.type, - })), - ), - ResponseInputFile$inboundSchema.and( - z.object({ type: z.literal("input_file") }).transform((v) => ({ - type: v.type, - })), - ), - ]), - ), - z.string(), - ]), -}); - /** @internal */ export type OpenResponsesEasyInputMessage$Outbound = { type?: string | undefined; @@ -590,19 +305,6 @@ export const OpenResponsesEasyInputMessage$outboundSchema: z.ZodType< ]), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesEasyInputMessage$ { - /** @deprecated use `OpenResponsesEasyInputMessage$inboundSchema` instead. */ - export const inboundSchema = OpenResponsesEasyInputMessage$inboundSchema; - /** @deprecated use `OpenResponsesEasyInputMessage$outboundSchema` instead. */ - export const outboundSchema = OpenResponsesEasyInputMessage$outboundSchema; - /** @deprecated use `OpenResponsesEasyInputMessage$Outbound` instead. */ - export type Outbound = OpenResponsesEasyInputMessage$Outbound; -} - export function openResponsesEasyInputMessageToJSON( openResponsesEasyInputMessage: OpenResponsesEasyInputMessage, ): string { @@ -612,13 +314,3 @@ export function openResponsesEasyInputMessageToJSON( ), ); } - -export function openResponsesEasyInputMessageFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => OpenResponsesEasyInputMessage$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'OpenResponsesEasyInputMessage' from JSON`, - ); -} diff --git a/src/models/openresponseserrorevent.ts b/src/models/openresponseserrorevent.ts index 64c24e1f..9ec64921 100644 --- a/src/models/openresponseserrorevent.ts +++ b/src/models/openresponseserrorevent.ts @@ -32,22 +32,6 @@ export const OpenResponsesErrorEventType$inboundSchema: z.ZodEnum< typeof OpenResponsesErrorEventType > = z.enum(OpenResponsesErrorEventType); -/** @internal */ -export const OpenResponsesErrorEventType$outboundSchema: z.ZodEnum< - typeof OpenResponsesErrorEventType -> = OpenResponsesErrorEventType$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesErrorEventType$ { - /** @deprecated use `OpenResponsesErrorEventType$inboundSchema` instead. */ - export const inboundSchema = OpenResponsesErrorEventType$inboundSchema; - /** @deprecated use `OpenResponsesErrorEventType$outboundSchema` instead. */ - export const outboundSchema = OpenResponsesErrorEventType$outboundSchema; -} - /** @internal */ export const OpenResponsesErrorEvent$inboundSchema: z.ZodType< OpenResponsesErrorEvent, @@ -64,52 +48,6 @@ export const OpenResponsesErrorEvent$inboundSchema: z.ZodType< }); }); -/** @internal */ -export type OpenResponsesErrorEvent$Outbound = { - type: string; - code: string | null; - message: string; - param: string | null; - sequence_number: number; -}; - -/** @internal */ -export const OpenResponsesErrorEvent$outboundSchema: z.ZodType< - OpenResponsesErrorEvent$Outbound, - OpenResponsesErrorEvent -> = z.object({ - type: OpenResponsesErrorEventType$outboundSchema, - code: z.nullable(z.string()), - message: z.string(), - param: z.nullable(z.string()), - sequenceNumber: z.number(), -}).transform((v) => { - return remap$(v, { - sequenceNumber: "sequence_number", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesErrorEvent$ { - /** @deprecated use `OpenResponsesErrorEvent$inboundSchema` instead. */ - export const inboundSchema = OpenResponsesErrorEvent$inboundSchema; - /** @deprecated use `OpenResponsesErrorEvent$outboundSchema` instead. */ - export const outboundSchema = OpenResponsesErrorEvent$outboundSchema; - /** @deprecated use `OpenResponsesErrorEvent$Outbound` instead. */ - export type Outbound = OpenResponsesErrorEvent$Outbound; -} - -export function openResponsesErrorEventToJSON( - openResponsesErrorEvent: OpenResponsesErrorEvent, -): string { - return JSON.stringify( - OpenResponsesErrorEvent$outboundSchema.parse(openResponsesErrorEvent), - ); -} - export function openResponsesErrorEventFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/openresponsesfunctioncalloutput.ts b/src/models/openresponsesfunctioncalloutput.ts index 51fe7e92..60a6cda9 100644 --- a/src/models/openresponsesfunctioncalloutput.ts +++ b/src/models/openresponsesfunctioncalloutput.ts @@ -4,13 +4,9 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; import { ClosedEnum } from "../types/enums.js"; -import { Result as SafeParseResult } from "../types/fp.js"; -import { SDKValidationError } from "./errors/sdkvalidationerror.js"; import { ToolCallStatus, - ToolCallStatus$inboundSchema, ToolCallStatus$outboundSchema, } from "./toolcallstatus.js"; @@ -32,44 +28,10 @@ export type OpenResponsesFunctionCallOutput = { status?: ToolCallStatus | undefined; }; -/** @internal */ -export const OpenResponsesFunctionCallOutputType$inboundSchema: z.ZodEnum< - typeof OpenResponsesFunctionCallOutputType -> = z.enum(OpenResponsesFunctionCallOutputType); - /** @internal */ export const OpenResponsesFunctionCallOutputType$outboundSchema: z.ZodEnum< typeof OpenResponsesFunctionCallOutputType -> = OpenResponsesFunctionCallOutputType$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesFunctionCallOutputType$ { - /** @deprecated use `OpenResponsesFunctionCallOutputType$inboundSchema` instead. */ - export const inboundSchema = - OpenResponsesFunctionCallOutputType$inboundSchema; - /** @deprecated use `OpenResponsesFunctionCallOutputType$outboundSchema` instead. */ - export const outboundSchema = - OpenResponsesFunctionCallOutputType$outboundSchema; -} - -/** @internal */ -export const OpenResponsesFunctionCallOutput$inboundSchema: z.ZodType< - OpenResponsesFunctionCallOutput, - unknown -> = z.object({ - type: OpenResponsesFunctionCallOutputType$inboundSchema, - id: z.string(), - call_id: z.string(), - output: z.string(), - status: ToolCallStatus$inboundSchema.optional(), -}).transform((v) => { - return remap$(v, { - "call_id": "callId", - }); -}); +> = z.enum(OpenResponsesFunctionCallOutputType); /** @internal */ export type OpenResponsesFunctionCallOutput$Outbound = { @@ -96,19 +58,6 @@ export const OpenResponsesFunctionCallOutput$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesFunctionCallOutput$ { - /** @deprecated use `OpenResponsesFunctionCallOutput$inboundSchema` instead. */ - export const inboundSchema = OpenResponsesFunctionCallOutput$inboundSchema; - /** @deprecated use `OpenResponsesFunctionCallOutput$outboundSchema` instead. */ - export const outboundSchema = OpenResponsesFunctionCallOutput$outboundSchema; - /** @deprecated use `OpenResponsesFunctionCallOutput$Outbound` instead. */ - export type Outbound = OpenResponsesFunctionCallOutput$Outbound; -} - export function openResponsesFunctionCallOutputToJSON( openResponsesFunctionCallOutput: OpenResponsesFunctionCallOutput, ): string { @@ -118,13 +67,3 @@ export function openResponsesFunctionCallOutputToJSON( ), ); } - -export function openResponsesFunctionCallOutputFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => OpenResponsesFunctionCallOutput$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'OpenResponsesFunctionCallOutput' from JSON`, - ); -} diff --git a/src/models/openresponsesfunctiontoolcall.ts b/src/models/openresponsesfunctiontoolcall.ts index 94a7212d..9a09fb14 100644 --- a/src/models/openresponsesfunctiontoolcall.ts +++ b/src/models/openresponsesfunctiontoolcall.ts @@ -4,13 +4,9 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; import { ClosedEnum } from "../types/enums.js"; -import { Result as SafeParseResult } from "../types/fp.js"; -import { SDKValidationError } from "./errors/sdkvalidationerror.js"; import { ToolCallStatus, - ToolCallStatus$inboundSchema, ToolCallStatus$outboundSchema, } from "./toolcallstatus.js"; @@ -33,44 +29,10 @@ export type OpenResponsesFunctionToolCall = { status?: ToolCallStatus | undefined; }; -/** @internal */ -export const OpenResponsesFunctionToolCallType$inboundSchema: z.ZodEnum< - typeof OpenResponsesFunctionToolCallType -> = z.enum(OpenResponsesFunctionToolCallType); - /** @internal */ export const OpenResponsesFunctionToolCallType$outboundSchema: z.ZodEnum< typeof OpenResponsesFunctionToolCallType -> = OpenResponsesFunctionToolCallType$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesFunctionToolCallType$ { - /** @deprecated use `OpenResponsesFunctionToolCallType$inboundSchema` instead. */ - export const inboundSchema = OpenResponsesFunctionToolCallType$inboundSchema; - /** @deprecated use `OpenResponsesFunctionToolCallType$outboundSchema` instead. */ - export const outboundSchema = - OpenResponsesFunctionToolCallType$outboundSchema; -} - -/** @internal */ -export const OpenResponsesFunctionToolCall$inboundSchema: z.ZodType< - OpenResponsesFunctionToolCall, - unknown -> = z.object({ - type: OpenResponsesFunctionToolCallType$inboundSchema, - call_id: z.string(), - name: z.string(), - arguments: z.string(), - id: z.string(), - status: ToolCallStatus$inboundSchema.optional(), -}).transform((v) => { - return remap$(v, { - "call_id": "callId", - }); -}); +> = z.enum(OpenResponsesFunctionToolCallType); /** @internal */ export type OpenResponsesFunctionToolCall$Outbound = { @@ -99,19 +61,6 @@ export const OpenResponsesFunctionToolCall$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesFunctionToolCall$ { - /** @deprecated use `OpenResponsesFunctionToolCall$inboundSchema` instead. */ - export const inboundSchema = OpenResponsesFunctionToolCall$inboundSchema; - /** @deprecated use `OpenResponsesFunctionToolCall$outboundSchema` instead. */ - export const outboundSchema = OpenResponsesFunctionToolCall$outboundSchema; - /** @deprecated use `OpenResponsesFunctionToolCall$Outbound` instead. */ - export type Outbound = OpenResponsesFunctionToolCall$Outbound; -} - export function openResponsesFunctionToolCallToJSON( openResponsesFunctionToolCall: OpenResponsesFunctionToolCall, ): string { @@ -121,13 +70,3 @@ export function openResponsesFunctionToolCallToJSON( ), ); } - -export function openResponsesFunctionToolCallFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => OpenResponsesFunctionToolCall$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'OpenResponsesFunctionToolCall' from JSON`, - ); -} diff --git a/src/models/openresponsesimagegencallcompleted.ts b/src/models/openresponsesimagegencallcompleted.ts index 18d4d8dd..7d0cc6ba 100644 --- a/src/models/openresponsesimagegencallcompleted.ts +++ b/src/models/openresponsesimagegencallcompleted.ts @@ -32,24 +32,6 @@ export const OpenResponsesImageGenCallCompletedType$inboundSchema: z.ZodEnum< typeof OpenResponsesImageGenCallCompletedType > = z.enum(OpenResponsesImageGenCallCompletedType); -/** @internal */ -export const OpenResponsesImageGenCallCompletedType$outboundSchema: z.ZodEnum< - typeof OpenResponsesImageGenCallCompletedType -> = OpenResponsesImageGenCallCompletedType$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesImageGenCallCompletedType$ { - /** @deprecated use `OpenResponsesImageGenCallCompletedType$inboundSchema` instead. */ - export const inboundSchema = - OpenResponsesImageGenCallCompletedType$inboundSchema; - /** @deprecated use `OpenResponsesImageGenCallCompletedType$outboundSchema` instead. */ - export const outboundSchema = - OpenResponsesImageGenCallCompletedType$outboundSchema; -} - /** @internal */ export const OpenResponsesImageGenCallCompleted$inboundSchema: z.ZodType< OpenResponsesImageGenCallCompleted, @@ -67,55 +49,6 @@ export const OpenResponsesImageGenCallCompleted$inboundSchema: z.ZodType< }); }); -/** @internal */ -export type OpenResponsesImageGenCallCompleted$Outbound = { - type: string; - item_id: string; - output_index: number; - sequence_number: number; -}; - -/** @internal */ -export const OpenResponsesImageGenCallCompleted$outboundSchema: z.ZodType< - OpenResponsesImageGenCallCompleted$Outbound, - OpenResponsesImageGenCallCompleted -> = z.object({ - type: OpenResponsesImageGenCallCompletedType$outboundSchema, - itemId: z.string(), - outputIndex: z.number(), - sequenceNumber: z.number(), -}).transform((v) => { - return remap$(v, { - itemId: "item_id", - outputIndex: "output_index", - sequenceNumber: "sequence_number", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesImageGenCallCompleted$ { - /** @deprecated use `OpenResponsesImageGenCallCompleted$inboundSchema` instead. */ - export const inboundSchema = OpenResponsesImageGenCallCompleted$inboundSchema; - /** @deprecated use `OpenResponsesImageGenCallCompleted$outboundSchema` instead. */ - export const outboundSchema = - OpenResponsesImageGenCallCompleted$outboundSchema; - /** @deprecated use `OpenResponsesImageGenCallCompleted$Outbound` instead. */ - export type Outbound = OpenResponsesImageGenCallCompleted$Outbound; -} - -export function openResponsesImageGenCallCompletedToJSON( - openResponsesImageGenCallCompleted: OpenResponsesImageGenCallCompleted, -): string { - return JSON.stringify( - OpenResponsesImageGenCallCompleted$outboundSchema.parse( - openResponsesImageGenCallCompleted, - ), - ); -} - export function openResponsesImageGenCallCompletedFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/openresponsesimagegencallgenerating.ts b/src/models/openresponsesimagegencallgenerating.ts index 4c7e9a16..bf1a51f3 100644 --- a/src/models/openresponsesimagegencallgenerating.ts +++ b/src/models/openresponsesimagegencallgenerating.ts @@ -32,24 +32,6 @@ export const OpenResponsesImageGenCallGeneratingType$inboundSchema: z.ZodEnum< typeof OpenResponsesImageGenCallGeneratingType > = z.enum(OpenResponsesImageGenCallGeneratingType); -/** @internal */ -export const OpenResponsesImageGenCallGeneratingType$outboundSchema: z.ZodEnum< - typeof OpenResponsesImageGenCallGeneratingType -> = OpenResponsesImageGenCallGeneratingType$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesImageGenCallGeneratingType$ { - /** @deprecated use `OpenResponsesImageGenCallGeneratingType$inboundSchema` instead. */ - export const inboundSchema = - OpenResponsesImageGenCallGeneratingType$inboundSchema; - /** @deprecated use `OpenResponsesImageGenCallGeneratingType$outboundSchema` instead. */ - export const outboundSchema = - OpenResponsesImageGenCallGeneratingType$outboundSchema; -} - /** @internal */ export const OpenResponsesImageGenCallGenerating$inboundSchema: z.ZodType< OpenResponsesImageGenCallGenerating, @@ -67,56 +49,6 @@ export const OpenResponsesImageGenCallGenerating$inboundSchema: z.ZodType< }); }); -/** @internal */ -export type OpenResponsesImageGenCallGenerating$Outbound = { - type: string; - item_id: string; - output_index: number; - sequence_number: number; -}; - -/** @internal */ -export const OpenResponsesImageGenCallGenerating$outboundSchema: z.ZodType< - OpenResponsesImageGenCallGenerating$Outbound, - OpenResponsesImageGenCallGenerating -> = z.object({ - type: OpenResponsesImageGenCallGeneratingType$outboundSchema, - itemId: z.string(), - outputIndex: z.number(), - sequenceNumber: z.number(), -}).transform((v) => { - return remap$(v, { - itemId: "item_id", - outputIndex: "output_index", - sequenceNumber: "sequence_number", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesImageGenCallGenerating$ { - /** @deprecated use `OpenResponsesImageGenCallGenerating$inboundSchema` instead. */ - export const inboundSchema = - OpenResponsesImageGenCallGenerating$inboundSchema; - /** @deprecated use `OpenResponsesImageGenCallGenerating$outboundSchema` instead. */ - export const outboundSchema = - OpenResponsesImageGenCallGenerating$outboundSchema; - /** @deprecated use `OpenResponsesImageGenCallGenerating$Outbound` instead. */ - export type Outbound = OpenResponsesImageGenCallGenerating$Outbound; -} - -export function openResponsesImageGenCallGeneratingToJSON( - openResponsesImageGenCallGenerating: OpenResponsesImageGenCallGenerating, -): string { - return JSON.stringify( - OpenResponsesImageGenCallGenerating$outboundSchema.parse( - openResponsesImageGenCallGenerating, - ), - ); -} - export function openResponsesImageGenCallGeneratingFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/openresponsesimagegencallinprogress.ts b/src/models/openresponsesimagegencallinprogress.ts index 5a5d37e2..4dfe4986 100644 --- a/src/models/openresponsesimagegencallinprogress.ts +++ b/src/models/openresponsesimagegencallinprogress.ts @@ -32,24 +32,6 @@ export const OpenResponsesImageGenCallInProgressType$inboundSchema: z.ZodEnum< typeof OpenResponsesImageGenCallInProgressType > = z.enum(OpenResponsesImageGenCallInProgressType); -/** @internal */ -export const OpenResponsesImageGenCallInProgressType$outboundSchema: z.ZodEnum< - typeof OpenResponsesImageGenCallInProgressType -> = OpenResponsesImageGenCallInProgressType$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesImageGenCallInProgressType$ { - /** @deprecated use `OpenResponsesImageGenCallInProgressType$inboundSchema` instead. */ - export const inboundSchema = - OpenResponsesImageGenCallInProgressType$inboundSchema; - /** @deprecated use `OpenResponsesImageGenCallInProgressType$outboundSchema` instead. */ - export const outboundSchema = - OpenResponsesImageGenCallInProgressType$outboundSchema; -} - /** @internal */ export const OpenResponsesImageGenCallInProgress$inboundSchema: z.ZodType< OpenResponsesImageGenCallInProgress, @@ -67,56 +49,6 @@ export const OpenResponsesImageGenCallInProgress$inboundSchema: z.ZodType< }); }); -/** @internal */ -export type OpenResponsesImageGenCallInProgress$Outbound = { - type: string; - item_id: string; - output_index: number; - sequence_number: number; -}; - -/** @internal */ -export const OpenResponsesImageGenCallInProgress$outboundSchema: z.ZodType< - OpenResponsesImageGenCallInProgress$Outbound, - OpenResponsesImageGenCallInProgress -> = z.object({ - type: OpenResponsesImageGenCallInProgressType$outboundSchema, - itemId: z.string(), - outputIndex: z.number(), - sequenceNumber: z.number(), -}).transform((v) => { - return remap$(v, { - itemId: "item_id", - outputIndex: "output_index", - sequenceNumber: "sequence_number", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesImageGenCallInProgress$ { - /** @deprecated use `OpenResponsesImageGenCallInProgress$inboundSchema` instead. */ - export const inboundSchema = - OpenResponsesImageGenCallInProgress$inboundSchema; - /** @deprecated use `OpenResponsesImageGenCallInProgress$outboundSchema` instead. */ - export const outboundSchema = - OpenResponsesImageGenCallInProgress$outboundSchema; - /** @deprecated use `OpenResponsesImageGenCallInProgress$Outbound` instead. */ - export type Outbound = OpenResponsesImageGenCallInProgress$Outbound; -} - -export function openResponsesImageGenCallInProgressToJSON( - openResponsesImageGenCallInProgress: OpenResponsesImageGenCallInProgress, -): string { - return JSON.stringify( - OpenResponsesImageGenCallInProgress$outboundSchema.parse( - openResponsesImageGenCallInProgress, - ), - ); -} - export function openResponsesImageGenCallInProgressFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/openresponsesimagegencallpartialimage.ts b/src/models/openresponsesimagegencallpartialimage.ts index ff01f5cb..ad7cda33 100644 --- a/src/models/openresponsesimagegencallpartialimage.ts +++ b/src/models/openresponsesimagegencallpartialimage.ts @@ -34,24 +34,6 @@ export const OpenResponsesImageGenCallPartialImageType$inboundSchema: z.ZodEnum< typeof OpenResponsesImageGenCallPartialImageType > = z.enum(OpenResponsesImageGenCallPartialImageType); -/** @internal */ -export const OpenResponsesImageGenCallPartialImageType$outboundSchema: - z.ZodEnum = - OpenResponsesImageGenCallPartialImageType$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesImageGenCallPartialImageType$ { - /** @deprecated use `OpenResponsesImageGenCallPartialImageType$inboundSchema` instead. */ - export const inboundSchema = - OpenResponsesImageGenCallPartialImageType$inboundSchema; - /** @deprecated use `OpenResponsesImageGenCallPartialImageType$outboundSchema` instead. */ - export const outboundSchema = - OpenResponsesImageGenCallPartialImageType$outboundSchema; -} - /** @internal */ export const OpenResponsesImageGenCallPartialImage$inboundSchema: z.ZodType< OpenResponsesImageGenCallPartialImage, @@ -73,62 +55,6 @@ export const OpenResponsesImageGenCallPartialImage$inboundSchema: z.ZodType< }); }); -/** @internal */ -export type OpenResponsesImageGenCallPartialImage$Outbound = { - type: string; - item_id: string; - output_index: number; - sequence_number: number; - partial_image_b64: string; - partial_image_index: number; -}; - -/** @internal */ -export const OpenResponsesImageGenCallPartialImage$outboundSchema: z.ZodType< - OpenResponsesImageGenCallPartialImage$Outbound, - OpenResponsesImageGenCallPartialImage -> = z.object({ - type: OpenResponsesImageGenCallPartialImageType$outboundSchema, - itemId: z.string(), - outputIndex: z.number(), - sequenceNumber: z.number(), - partialImageB64: z.string(), - partialImageIndex: z.number(), -}).transform((v) => { - return remap$(v, { - itemId: "item_id", - outputIndex: "output_index", - sequenceNumber: "sequence_number", - partialImageB64: "partial_image_b64", - partialImageIndex: "partial_image_index", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesImageGenCallPartialImage$ { - /** @deprecated use `OpenResponsesImageGenCallPartialImage$inboundSchema` instead. */ - export const inboundSchema = - OpenResponsesImageGenCallPartialImage$inboundSchema; - /** @deprecated use `OpenResponsesImageGenCallPartialImage$outboundSchema` instead. */ - export const outboundSchema = - OpenResponsesImageGenCallPartialImage$outboundSchema; - /** @deprecated use `OpenResponsesImageGenCallPartialImage$Outbound` instead. */ - export type Outbound = OpenResponsesImageGenCallPartialImage$Outbound; -} - -export function openResponsesImageGenCallPartialImageToJSON( - openResponsesImageGenCallPartialImage: OpenResponsesImageGenCallPartialImage, -): string { - return JSON.stringify( - OpenResponsesImageGenCallPartialImage$outboundSchema.parse( - openResponsesImageGenCallPartialImage, - ), - ); -} - export function openResponsesImageGenCallPartialImageFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/openresponsesinput.ts b/src/models/openresponsesinput.ts index fd7d0890..864c727e 100644 --- a/src/models/openresponsesinput.ts +++ b/src/models/openresponsesinput.ts @@ -3,72 +3,58 @@ */ import * as z from "zod/v4"; -import { safeParse } from "../lib/schemas.js"; -import { Result as SafeParseResult } from "../types/fp.js"; -import { SDKValidationError } from "./errors/sdkvalidationerror.js"; import { OpenResponsesEasyInputMessage, - OpenResponsesEasyInputMessage$inboundSchema, OpenResponsesEasyInputMessage$Outbound, OpenResponsesEasyInputMessage$outboundSchema, } from "./openresponseseasyinputmessage.js"; import { OpenResponsesFunctionCallOutput, - OpenResponsesFunctionCallOutput$inboundSchema, OpenResponsesFunctionCallOutput$Outbound, OpenResponsesFunctionCallOutput$outboundSchema, } from "./openresponsesfunctioncalloutput.js"; import { OpenResponsesFunctionToolCall, - OpenResponsesFunctionToolCall$inboundSchema, OpenResponsesFunctionToolCall$Outbound, OpenResponsesFunctionToolCall$outboundSchema, } from "./openresponsesfunctiontoolcall.js"; import { OpenResponsesInputMessageItem, - OpenResponsesInputMessageItem$inboundSchema, OpenResponsesInputMessageItem$Outbound, OpenResponsesInputMessageItem$outboundSchema, } from "./openresponsesinputmessageitem.js"; import { OpenResponsesReasoning, - OpenResponsesReasoning$inboundSchema, OpenResponsesReasoning$Outbound, OpenResponsesReasoning$outboundSchema, } from "./openresponsesreasoning.js"; import { ResponsesImageGenerationCall, - ResponsesImageGenerationCall$inboundSchema, ResponsesImageGenerationCall$Outbound, ResponsesImageGenerationCall$outboundSchema, } from "./responsesimagegenerationcall.js"; import { ResponsesOutputItemFileSearchCall, - ResponsesOutputItemFileSearchCall$inboundSchema, ResponsesOutputItemFileSearchCall$Outbound, ResponsesOutputItemFileSearchCall$outboundSchema, } from "./responsesoutputitemfilesearchcall.js"; import { ResponsesOutputItemFunctionCall, - ResponsesOutputItemFunctionCall$inboundSchema, ResponsesOutputItemFunctionCall$Outbound, ResponsesOutputItemFunctionCall$outboundSchema, } from "./responsesoutputitemfunctioncall.js"; import { ResponsesOutputItemReasoning, - ResponsesOutputItemReasoning$inboundSchema, ResponsesOutputItemReasoning$Outbound, ResponsesOutputItemReasoning$outboundSchema, } from "./responsesoutputitemreasoning.js"; import { ResponsesOutputMessage, - ResponsesOutputMessage$inboundSchema, ResponsesOutputMessage$Outbound, ResponsesOutputMessage$outboundSchema, } from "./responsesoutputmessage.js"; import { ResponsesWebSearchCallOutput, - ResponsesWebSearchCallOutput$inboundSchema, ResponsesWebSearchCallOutput$Outbound, ResponsesWebSearchCallOutput$outboundSchema, } from "./responseswebsearchcalloutput.js"; @@ -105,24 +91,6 @@ export type OpenResponsesInput = | ResponsesOutputItemReasoning >; -/** @internal */ -export const OpenResponsesInput1$inboundSchema: z.ZodType< - OpenResponsesInput1, - unknown -> = z.union([ - OpenResponsesFunctionToolCall$inboundSchema, - OpenResponsesFunctionCallOutput$inboundSchema, - ResponsesOutputMessage$inboundSchema, - ResponsesOutputItemFunctionCall$inboundSchema, - ResponsesOutputItemFileSearchCall$inboundSchema, - ResponsesImageGenerationCall$inboundSchema, - OpenResponsesReasoning$inboundSchema, - ResponsesWebSearchCallOutput$inboundSchema, - OpenResponsesEasyInputMessage$inboundSchema, - OpenResponsesInputMessageItem$inboundSchema, - ResponsesOutputItemReasoning$inboundSchema, -]); - /** @internal */ export type OpenResponsesInput1$Outbound = | OpenResponsesFunctionToolCall$Outbound @@ -155,19 +123,6 @@ export const OpenResponsesInput1$outboundSchema: z.ZodType< ResponsesOutputItemReasoning$outboundSchema, ]); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesInput1$ { - /** @deprecated use `OpenResponsesInput1$inboundSchema` instead. */ - export const inboundSchema = OpenResponsesInput1$inboundSchema; - /** @deprecated use `OpenResponsesInput1$outboundSchema` instead. */ - export const outboundSchema = OpenResponsesInput1$outboundSchema; - /** @deprecated use `OpenResponsesInput1$Outbound` instead. */ - export type Outbound = OpenResponsesInput1$Outbound; -} - export function openResponsesInput1ToJSON( openResponsesInput1: OpenResponsesInput1, ): string { @@ -176,39 +131,6 @@ export function openResponsesInput1ToJSON( ); } -export function openResponsesInput1FromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => OpenResponsesInput1$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'OpenResponsesInput1' from JSON`, - ); -} - -/** @internal */ -export const OpenResponsesInput$inboundSchema: z.ZodType< - OpenResponsesInput, - unknown -> = z.union([ - z.string(), - z.array( - z.union([ - OpenResponsesFunctionToolCall$inboundSchema, - OpenResponsesFunctionCallOutput$inboundSchema, - ResponsesOutputMessage$inboundSchema, - ResponsesOutputItemFunctionCall$inboundSchema, - ResponsesOutputItemFileSearchCall$inboundSchema, - ResponsesImageGenerationCall$inboundSchema, - OpenResponsesReasoning$inboundSchema, - ResponsesWebSearchCallOutput$inboundSchema, - OpenResponsesEasyInputMessage$inboundSchema, - OpenResponsesInputMessageItem$inboundSchema, - ResponsesOutputItemReasoning$inboundSchema, - ]), - ), -]); - /** @internal */ export type OpenResponsesInput$Outbound = | string @@ -249,19 +171,6 @@ export const OpenResponsesInput$outboundSchema: z.ZodType< ), ]); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesInput$ { - /** @deprecated use `OpenResponsesInput$inboundSchema` instead. */ - export const inboundSchema = OpenResponsesInput$inboundSchema; - /** @deprecated use `OpenResponsesInput$outboundSchema` instead. */ - export const outboundSchema = OpenResponsesInput$outboundSchema; - /** @deprecated use `OpenResponsesInput$Outbound` instead. */ - export type Outbound = OpenResponsesInput$Outbound; -} - export function openResponsesInputToJSON( openResponsesInput: OpenResponsesInput, ): string { @@ -269,13 +178,3 @@ export function openResponsesInputToJSON( OpenResponsesInput$outboundSchema.parse(openResponsesInput), ); } - -export function openResponsesInputFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => OpenResponsesInput$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'OpenResponsesInput' from JSON`, - ); -} diff --git a/src/models/openresponsesinputmessageitem.ts b/src/models/openresponsesinputmessageitem.ts index 393034c8..b7f21ac0 100644 --- a/src/models/openresponsesinputmessageitem.ts +++ b/src/models/openresponsesinputmessageitem.ts @@ -3,31 +3,24 @@ */ import * as z from "zod/v4"; -import { safeParse } from "../lib/schemas.js"; import { ClosedEnum } from "../types/enums.js"; -import { Result as SafeParseResult } from "../types/fp.js"; -import { SDKValidationError } from "./errors/sdkvalidationerror.js"; import { ResponseInputAudio, - ResponseInputAudio$inboundSchema, ResponseInputAudio$Outbound, ResponseInputAudio$outboundSchema, } from "./responseinputaudio.js"; import { ResponseInputFile, - ResponseInputFile$inboundSchema, ResponseInputFile$Outbound, ResponseInputFile$outboundSchema, } from "./responseinputfile.js"; import { ResponseInputImage, - ResponseInputImage$inboundSchema, ResponseInputImage$Outbound, ResponseInputImage$outboundSchema, } from "./responseinputimage.js"; import { ResponseInputText, - ResponseInputText$inboundSchema, ResponseInputText$Outbound, ResponseInputText$outboundSchema, } from "./responseinputtext.js"; @@ -86,107 +79,26 @@ export type OpenResponsesInputMessageItem = { >; }; -/** @internal */ -export const OpenResponsesInputMessageItemType$inboundSchema: z.ZodEnum< - typeof OpenResponsesInputMessageItemType -> = z.enum(OpenResponsesInputMessageItemType); - /** @internal */ export const OpenResponsesInputMessageItemType$outboundSchema: z.ZodEnum< typeof OpenResponsesInputMessageItemType -> = OpenResponsesInputMessageItemType$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesInputMessageItemType$ { - /** @deprecated use `OpenResponsesInputMessageItemType$inboundSchema` instead. */ - export const inboundSchema = OpenResponsesInputMessageItemType$inboundSchema; - /** @deprecated use `OpenResponsesInputMessageItemType$outboundSchema` instead. */ - export const outboundSchema = - OpenResponsesInputMessageItemType$outboundSchema; -} +> = z.enum(OpenResponsesInputMessageItemType); /** @internal */ -export const OpenResponsesInputMessageItemRoleDeveloper$inboundSchema: +export const OpenResponsesInputMessageItemRoleDeveloper$outboundSchema: z.ZodEnum = z.enum( OpenResponsesInputMessageItemRoleDeveloper, ); -/** @internal */ -export const OpenResponsesInputMessageItemRoleDeveloper$outboundSchema: - z.ZodEnum = - OpenResponsesInputMessageItemRoleDeveloper$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesInputMessageItemRoleDeveloper$ { - /** @deprecated use `OpenResponsesInputMessageItemRoleDeveloper$inboundSchema` instead. */ - export const inboundSchema = - OpenResponsesInputMessageItemRoleDeveloper$inboundSchema; - /** @deprecated use `OpenResponsesInputMessageItemRoleDeveloper$outboundSchema` instead. */ - export const outboundSchema = - OpenResponsesInputMessageItemRoleDeveloper$outboundSchema; -} - -/** @internal */ -export const OpenResponsesInputMessageItemRoleSystem$inboundSchema: z.ZodEnum< - typeof OpenResponsesInputMessageItemRoleSystem -> = z.enum(OpenResponsesInputMessageItemRoleSystem); - /** @internal */ export const OpenResponsesInputMessageItemRoleSystem$outboundSchema: z.ZodEnum< typeof OpenResponsesInputMessageItemRoleSystem -> = OpenResponsesInputMessageItemRoleSystem$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesInputMessageItemRoleSystem$ { - /** @deprecated use `OpenResponsesInputMessageItemRoleSystem$inboundSchema` instead. */ - export const inboundSchema = - OpenResponsesInputMessageItemRoleSystem$inboundSchema; - /** @deprecated use `OpenResponsesInputMessageItemRoleSystem$outboundSchema` instead. */ - export const outboundSchema = - OpenResponsesInputMessageItemRoleSystem$outboundSchema; -} - -/** @internal */ -export const OpenResponsesInputMessageItemRoleUser$inboundSchema: z.ZodEnum< - typeof OpenResponsesInputMessageItemRoleUser -> = z.enum(OpenResponsesInputMessageItemRoleUser); +> = z.enum(OpenResponsesInputMessageItemRoleSystem); /** @internal */ export const OpenResponsesInputMessageItemRoleUser$outboundSchema: z.ZodEnum< typeof OpenResponsesInputMessageItemRoleUser -> = OpenResponsesInputMessageItemRoleUser$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesInputMessageItemRoleUser$ { - /** @deprecated use `OpenResponsesInputMessageItemRoleUser$inboundSchema` instead. */ - export const inboundSchema = - OpenResponsesInputMessageItemRoleUser$inboundSchema; - /** @deprecated use `OpenResponsesInputMessageItemRoleUser$outboundSchema` instead. */ - export const outboundSchema = - OpenResponsesInputMessageItemRoleUser$outboundSchema; -} - -/** @internal */ -export const OpenResponsesInputMessageItemRoleUnion$inboundSchema: z.ZodType< - OpenResponsesInputMessageItemRoleUnion, - unknown -> = z.union([ - OpenResponsesInputMessageItemRoleUser$inboundSchema, - OpenResponsesInputMessageItemRoleSystem$inboundSchema, - OpenResponsesInputMessageItemRoleDeveloper$inboundSchema, -]); +> = z.enum(OpenResponsesInputMessageItemRoleUser); /** @internal */ export type OpenResponsesInputMessageItemRoleUnion$Outbound = @@ -204,21 +116,6 @@ export const OpenResponsesInputMessageItemRoleUnion$outboundSchema: z.ZodType< OpenResponsesInputMessageItemRoleDeveloper$outboundSchema, ]); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesInputMessageItemRoleUnion$ { - /** @deprecated use `OpenResponsesInputMessageItemRoleUnion$inboundSchema` instead. */ - export const inboundSchema = - OpenResponsesInputMessageItemRoleUnion$inboundSchema; - /** @deprecated use `OpenResponsesInputMessageItemRoleUnion$outboundSchema` instead. */ - export const outboundSchema = - OpenResponsesInputMessageItemRoleUnion$outboundSchema; - /** @deprecated use `OpenResponsesInputMessageItemRoleUnion$Outbound` instead. */ - export type Outbound = OpenResponsesInputMessageItemRoleUnion$Outbound; -} - export function openResponsesInputMessageItemRoleUnionToJSON( openResponsesInputMessageItemRoleUnion: OpenResponsesInputMessageItemRoleUnion, @@ -230,44 +127,6 @@ export function openResponsesInputMessageItemRoleUnionToJSON( ); } -export function openResponsesInputMessageItemRoleUnionFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - OpenResponsesInputMessageItemRoleUnion$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'OpenResponsesInputMessageItemRoleUnion' from JSON`, - ); -} - -/** @internal */ -export const OpenResponsesInputMessageItemContent$inboundSchema: z.ZodType< - OpenResponsesInputMessageItemContent, - unknown -> = z.union([ - ResponseInputText$inboundSchema.and( - z.object({ type: z.literal("input_text") }).transform((v) => ({ - type: v.type, - })), - ), - ResponseInputImage$inboundSchema.and( - z.object({ type: z.literal("input_image") }).transform((v) => ({ - type: v.type, - })), - ), - ResponseInputAudio$inboundSchema.and( - z.object({ type: z.literal("input_audio") }).transform((v) => ({ - type: v.type, - })), - ), - ResponseInputFile$inboundSchema.and( - z.object({ type: z.literal("input_file") }).transform((v) => ({ - type: v.type, - })), - ), -]); - /** @internal */ export type OpenResponsesInputMessageItemContent$Outbound = | (ResponseInputText$Outbound & { type: "input_text" }) @@ -302,21 +161,6 @@ export const OpenResponsesInputMessageItemContent$outboundSchema: z.ZodType< ), ]); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesInputMessageItemContent$ { - /** @deprecated use `OpenResponsesInputMessageItemContent$inboundSchema` instead. */ - export const inboundSchema = - OpenResponsesInputMessageItemContent$inboundSchema; - /** @deprecated use `OpenResponsesInputMessageItemContent$outboundSchema` instead. */ - export const outboundSchema = - OpenResponsesInputMessageItemContent$outboundSchema; - /** @deprecated use `OpenResponsesInputMessageItemContent$Outbound` instead. */ - export type Outbound = OpenResponsesInputMessageItemContent$Outbound; -} - export function openResponsesInputMessageItemContentToJSON( openResponsesInputMessageItemContent: OpenResponsesInputMessageItemContent, ): string { @@ -327,55 +171,6 @@ export function openResponsesInputMessageItemContentToJSON( ); } -export function openResponsesInputMessageItemContentFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => - OpenResponsesInputMessageItemContent$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'OpenResponsesInputMessageItemContent' from JSON`, - ); -} - -/** @internal */ -export const OpenResponsesInputMessageItem$inboundSchema: z.ZodType< - OpenResponsesInputMessageItem, - unknown -> = z.object({ - id: z.string().optional(), - type: OpenResponsesInputMessageItemType$inboundSchema.optional(), - role: z.union([ - OpenResponsesInputMessageItemRoleUser$inboundSchema, - OpenResponsesInputMessageItemRoleSystem$inboundSchema, - OpenResponsesInputMessageItemRoleDeveloper$inboundSchema, - ]), - content: z.array( - z.union([ - ResponseInputText$inboundSchema.and( - z.object({ type: z.literal("input_text") }).transform((v) => ({ - type: v.type, - })), - ), - ResponseInputImage$inboundSchema.and( - z.object({ type: z.literal("input_image") }).transform((v) => ({ - type: v.type, - })), - ), - ResponseInputAudio$inboundSchema.and( - z.object({ type: z.literal("input_audio") }).transform((v) => ({ - type: v.type, - })), - ), - ResponseInputFile$inboundSchema.and( - z.object({ type: z.literal("input_file") }).transform((v) => ({ - type: v.type, - })), - ), - ]), - ), -}); - /** @internal */ export type OpenResponsesInputMessageItem$Outbound = { id?: string | undefined; @@ -427,19 +222,6 @@ export const OpenResponsesInputMessageItem$outboundSchema: z.ZodType< ), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesInputMessageItem$ { - /** @deprecated use `OpenResponsesInputMessageItem$inboundSchema` instead. */ - export const inboundSchema = OpenResponsesInputMessageItem$inboundSchema; - /** @deprecated use `OpenResponsesInputMessageItem$outboundSchema` instead. */ - export const outboundSchema = OpenResponsesInputMessageItem$outboundSchema; - /** @deprecated use `OpenResponsesInputMessageItem$Outbound` instead. */ - export type Outbound = OpenResponsesInputMessageItem$Outbound; -} - export function openResponsesInputMessageItemToJSON( openResponsesInputMessageItem: OpenResponsesInputMessageItem, ): string { @@ -449,13 +231,3 @@ export function openResponsesInputMessageItemToJSON( ), ); } - -export function openResponsesInputMessageItemFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => OpenResponsesInputMessageItem$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'OpenResponsesInputMessageItem' from JSON`, - ); -} diff --git a/src/models/openresponseslogprobs.ts b/src/models/openresponseslogprobs.ts index d6ec31db..567cdfc4 100644 --- a/src/models/openresponseslogprobs.ts +++ b/src/models/openresponseslogprobs.ts @@ -10,8 +10,6 @@ import { SDKValidationError } from "./errors/sdkvalidationerror.js"; import { OpenResponsesTopLogprobs, OpenResponsesTopLogprobs$inboundSchema, - OpenResponsesTopLogprobs$Outbound, - OpenResponsesTopLogprobs$outboundSchema, } from "./openresponsestoplogprobs.js"; /** @@ -37,48 +35,6 @@ export const OpenResponsesLogProbs$inboundSchema: z.ZodType< }); }); -/** @internal */ -export type OpenResponsesLogProbs$Outbound = { - logprob: number; - token: string; - top_logprobs?: Array | undefined; -}; - -/** @internal */ -export const OpenResponsesLogProbs$outboundSchema: z.ZodType< - OpenResponsesLogProbs$Outbound, - OpenResponsesLogProbs -> = z.object({ - logprob: z.number(), - token: z.string(), - topLogprobs: z.array(OpenResponsesTopLogprobs$outboundSchema).optional(), -}).transform((v) => { - return remap$(v, { - topLogprobs: "top_logprobs", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesLogProbs$ { - /** @deprecated use `OpenResponsesLogProbs$inboundSchema` instead. */ - export const inboundSchema = OpenResponsesLogProbs$inboundSchema; - /** @deprecated use `OpenResponsesLogProbs$outboundSchema` instead. */ - export const outboundSchema = OpenResponsesLogProbs$outboundSchema; - /** @deprecated use `OpenResponsesLogProbs$Outbound` instead. */ - export type Outbound = OpenResponsesLogProbs$Outbound; -} - -export function openResponsesLogProbsToJSON( - openResponsesLogProbs: OpenResponsesLogProbs, -): string { - return JSON.stringify( - OpenResponsesLogProbs$outboundSchema.parse(openResponsesLogProbs), - ); -} - export function openResponsesLogProbsFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/openresponsesnonstreamingresponse.ts b/src/models/openresponsesnonstreamingresponse.ts index 72a3709f..7b5172f9 100644 --- a/src/models/openresponsesnonstreamingresponse.ts +++ b/src/models/openresponsesnonstreamingresponse.ts @@ -11,95 +11,66 @@ import { SDKValidationError } from "./errors/sdkvalidationerror.js"; import { OpenAIResponsesIncompleteDetails, OpenAIResponsesIncompleteDetails$inboundSchema, - OpenAIResponsesIncompleteDetails$Outbound, - OpenAIResponsesIncompleteDetails$outboundSchema, } from "./openairesponsesincompletedetails.js"; import { OpenAIResponsesInputUnion, OpenAIResponsesInputUnion$inboundSchema, - OpenAIResponsesInputUnion$Outbound, - OpenAIResponsesInputUnion$outboundSchema, } from "./openairesponsesinputunion.js"; import { OpenAIResponsesPrompt, OpenAIResponsesPrompt$inboundSchema, - OpenAIResponsesPrompt$Outbound, - OpenAIResponsesPrompt$outboundSchema, } from "./openairesponsesprompt.js"; import { OpenAIResponsesReasoningConfig, OpenAIResponsesReasoningConfig$inboundSchema, - OpenAIResponsesReasoningConfig$Outbound, - OpenAIResponsesReasoningConfig$outboundSchema, } from "./openairesponsesreasoningconfig.js"; import { OpenAIResponsesResponseStatus, OpenAIResponsesResponseStatus$inboundSchema, - OpenAIResponsesResponseStatus$outboundSchema, } from "./openairesponsesresponsestatus.js"; import { OpenAIResponsesServiceTier, OpenAIResponsesServiceTier$inboundSchema, - OpenAIResponsesServiceTier$outboundSchema, } from "./openairesponsesservicetier.js"; import { OpenAIResponsesToolChoiceUnion, OpenAIResponsesToolChoiceUnion$inboundSchema, - OpenAIResponsesToolChoiceUnion$Outbound, - OpenAIResponsesToolChoiceUnion$outboundSchema, } from "./openairesponsestoolchoiceunion.js"; import { OpenAIResponsesTruncation, OpenAIResponsesTruncation$inboundSchema, - OpenAIResponsesTruncation$outboundSchema, } from "./openairesponsestruncation.js"; import { OpenResponsesUsage, OpenResponsesUsage$inboundSchema, - OpenResponsesUsage$Outbound, - OpenResponsesUsage$outboundSchema, } from "./openresponsesusage.js"; import { OpenResponsesWebSearch20250826Tool, OpenResponsesWebSearch20250826Tool$inboundSchema, - OpenResponsesWebSearch20250826Tool$Outbound, - OpenResponsesWebSearch20250826Tool$outboundSchema, } from "./openresponseswebsearch20250826tool.js"; import { OpenResponsesWebSearchPreview20250311Tool, OpenResponsesWebSearchPreview20250311Tool$inboundSchema, - OpenResponsesWebSearchPreview20250311Tool$Outbound, - OpenResponsesWebSearchPreview20250311Tool$outboundSchema, } from "./openresponseswebsearchpreview20250311tool.js"; import { OpenResponsesWebSearchPreviewTool, OpenResponsesWebSearchPreviewTool$inboundSchema, - OpenResponsesWebSearchPreviewTool$Outbound, - OpenResponsesWebSearchPreviewTool$outboundSchema, } from "./openresponseswebsearchpreviewtool.js"; import { OpenResponsesWebSearchTool, OpenResponsesWebSearchTool$inboundSchema, - OpenResponsesWebSearchTool$Outbound, - OpenResponsesWebSearchTool$outboundSchema, } from "./openresponseswebsearchtool.js"; import { ResponsesErrorField, ResponsesErrorField$inboundSchema, - ResponsesErrorField$Outbound, - ResponsesErrorField$outboundSchema, } from "./responseserrorfield.js"; import { ResponsesOutputItem, ResponsesOutputItem$inboundSchema, - ResponsesOutputItem$Outbound, - ResponsesOutputItem$outboundSchema, } from "./responsesoutputitem.js"; import { ResponseTextConfig, ResponseTextConfig$inboundSchema, - ResponseTextConfig$Outbound, - ResponseTextConfig$outboundSchema, } from "./responsetextconfig.js"; export const ObjectT = { @@ -190,44 +161,11 @@ export type OpenResponsesNonStreamingResponse = { /** @internal */ export const ObjectT$inboundSchema: z.ZodEnum = z.enum(ObjectT); -/** @internal */ -export const ObjectT$outboundSchema: z.ZodEnum = - ObjectT$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ObjectT$ { - /** @deprecated use `ObjectT$inboundSchema` instead. */ - export const inboundSchema = ObjectT$inboundSchema; - /** @deprecated use `ObjectT$outboundSchema` instead. */ - export const outboundSchema = ObjectT$outboundSchema; -} - /** @internal */ export const OpenResponsesNonStreamingResponseType$inboundSchema: z.ZodEnum< typeof OpenResponsesNonStreamingResponseType > = z.enum(OpenResponsesNonStreamingResponseType); -/** @internal */ -export const OpenResponsesNonStreamingResponseType$outboundSchema: z.ZodEnum< - typeof OpenResponsesNonStreamingResponseType -> = OpenResponsesNonStreamingResponseType$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesNonStreamingResponseType$ { - /** @deprecated use `OpenResponsesNonStreamingResponseType$inboundSchema` instead. */ - export const inboundSchema = - OpenResponsesNonStreamingResponseType$inboundSchema; - /** @deprecated use `OpenResponsesNonStreamingResponseType$outboundSchema` instead. */ - export const outboundSchema = - OpenResponsesNonStreamingResponseType$outboundSchema; -} - /** @internal */ export const OpenResponsesNonStreamingResponseToolFunction$inboundSchema: z.ZodType = z.object({ @@ -238,54 +176,6 @@ export const OpenResponsesNonStreamingResponseToolFunction$inboundSchema: parameters: z.nullable(z.record(z.string(), z.nullable(z.any()))), }); -/** @internal */ -export type OpenResponsesNonStreamingResponseToolFunction$Outbound = { - type: string; - name: string; - description?: string | null | undefined; - strict?: boolean | null | undefined; - parameters: { [k: string]: any | null } | null; -}; - -/** @internal */ -export const OpenResponsesNonStreamingResponseToolFunction$outboundSchema: - z.ZodType< - OpenResponsesNonStreamingResponseToolFunction$Outbound, - OpenResponsesNonStreamingResponseToolFunction - > = z.object({ - type: OpenResponsesNonStreamingResponseType$outboundSchema, - name: z.string(), - description: z.nullable(z.string()).optional(), - strict: z.nullable(z.boolean()).optional(), - parameters: z.nullable(z.record(z.string(), z.nullable(z.any()))), - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesNonStreamingResponseToolFunction$ { - /** @deprecated use `OpenResponsesNonStreamingResponseToolFunction$inboundSchema` instead. */ - export const inboundSchema = - OpenResponsesNonStreamingResponseToolFunction$inboundSchema; - /** @deprecated use `OpenResponsesNonStreamingResponseToolFunction$outboundSchema` instead. */ - export const outboundSchema = - OpenResponsesNonStreamingResponseToolFunction$outboundSchema; - /** @deprecated use `OpenResponsesNonStreamingResponseToolFunction$Outbound` instead. */ - export type Outbound = OpenResponsesNonStreamingResponseToolFunction$Outbound; -} - -export function openResponsesNonStreamingResponseToolFunctionToJSON( - openResponsesNonStreamingResponseToolFunction: - OpenResponsesNonStreamingResponseToolFunction, -): string { - return JSON.stringify( - OpenResponsesNonStreamingResponseToolFunction$outboundSchema.parse( - openResponsesNonStreamingResponseToolFunction, - ), - ); -} - export function openResponsesNonStreamingResponseToolFunctionFromJSON( jsonString: string, ): SafeParseResult< @@ -312,53 +202,6 @@ export const OpenResponsesNonStreamingResponseToolUnion$inboundSchema: OpenResponsesWebSearch20250826Tool$inboundSchema, ]); -/** @internal */ -export type OpenResponsesNonStreamingResponseToolUnion$Outbound = - | OpenResponsesNonStreamingResponseToolFunction$Outbound - | OpenResponsesWebSearchPreviewTool$Outbound - | OpenResponsesWebSearchPreview20250311Tool$Outbound - | OpenResponsesWebSearchTool$Outbound - | OpenResponsesWebSearch20250826Tool$Outbound; - -/** @internal */ -export const OpenResponsesNonStreamingResponseToolUnion$outboundSchema: - z.ZodType< - OpenResponsesNonStreamingResponseToolUnion$Outbound, - OpenResponsesNonStreamingResponseToolUnion - > = z.union([ - z.lazy(() => OpenResponsesNonStreamingResponseToolFunction$outboundSchema), - OpenResponsesWebSearchPreviewTool$outboundSchema, - OpenResponsesWebSearchPreview20250311Tool$outboundSchema, - OpenResponsesWebSearchTool$outboundSchema, - OpenResponsesWebSearch20250826Tool$outboundSchema, - ]); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesNonStreamingResponseToolUnion$ { - /** @deprecated use `OpenResponsesNonStreamingResponseToolUnion$inboundSchema` instead. */ - export const inboundSchema = - OpenResponsesNonStreamingResponseToolUnion$inboundSchema; - /** @deprecated use `OpenResponsesNonStreamingResponseToolUnion$outboundSchema` instead. */ - export const outboundSchema = - OpenResponsesNonStreamingResponseToolUnion$outboundSchema; - /** @deprecated use `OpenResponsesNonStreamingResponseToolUnion$Outbound` instead. */ - export type Outbound = OpenResponsesNonStreamingResponseToolUnion$Outbound; -} - -export function openResponsesNonStreamingResponseToolUnionToJSON( - openResponsesNonStreamingResponseToolUnion: - OpenResponsesNonStreamingResponseToolUnion, -): string { - return JSON.stringify( - OpenResponsesNonStreamingResponseToolUnion$outboundSchema.parse( - openResponsesNonStreamingResponseToolUnion, - ), - ); -} - export function openResponsesNonStreamingResponseToolUnionFromJSON( jsonString: string, ): SafeParseResult< @@ -440,138 +283,6 @@ export const OpenResponsesNonStreamingResponse$inboundSchema: z.ZodType< }); }); -/** @internal */ -export type OpenResponsesNonStreamingResponse$Outbound = { - id: string; - object: string; - created_at: number; - model: string; - status?: string | undefined; - output: Array; - user?: string | null | undefined; - output_text?: string | undefined; - prompt_cache_key?: string | null | undefined; - safety_identifier?: string | null | undefined; - error: ResponsesErrorField$Outbound | null; - incomplete_details: OpenAIResponsesIncompleteDetails$Outbound | null; - usage?: OpenResponsesUsage$Outbound | undefined; - max_tool_calls?: number | null | undefined; - top_logprobs?: number | undefined; - max_output_tokens?: number | null | undefined; - temperature: number | null; - top_p: number | null; - instructions?: OpenAIResponsesInputUnion$Outbound | null | undefined; - metadata: { [k: string]: string } | null; - tools: Array< - | OpenResponsesNonStreamingResponseToolFunction$Outbound - | OpenResponsesWebSearchPreviewTool$Outbound - | OpenResponsesWebSearchPreview20250311Tool$Outbound - | OpenResponsesWebSearchTool$Outbound - | OpenResponsesWebSearch20250826Tool$Outbound - >; - tool_choice: OpenAIResponsesToolChoiceUnion$Outbound; - parallel_tool_calls: boolean; - prompt?: OpenAIResponsesPrompt$Outbound | null | undefined; - background?: boolean | null | undefined; - previous_response_id?: string | null | undefined; - reasoning?: OpenAIResponsesReasoningConfig$Outbound | null | undefined; - service_tier?: string | null | undefined; - store?: boolean | undefined; - truncation?: string | null | undefined; - text?: ResponseTextConfig$Outbound | undefined; -}; - -/** @internal */ -export const OpenResponsesNonStreamingResponse$outboundSchema: z.ZodType< - OpenResponsesNonStreamingResponse$Outbound, - OpenResponsesNonStreamingResponse -> = z.object({ - id: z.string(), - object: ObjectT$outboundSchema, - createdAt: z.number(), - model: z.string(), - status: OpenAIResponsesResponseStatus$outboundSchema.optional(), - output: z.array(ResponsesOutputItem$outboundSchema), - user: z.nullable(z.string()).optional(), - outputText: z.string().optional(), - promptCacheKey: z.nullable(z.string()).optional(), - safetyIdentifier: z.nullable(z.string()).optional(), - error: z.nullable(ResponsesErrorField$outboundSchema), - incompleteDetails: z.nullable( - OpenAIResponsesIncompleteDetails$outboundSchema, - ), - usage: OpenResponsesUsage$outboundSchema.optional(), - maxToolCalls: z.nullable(z.number()).optional(), - topLogprobs: z.number().optional(), - maxOutputTokens: z.nullable(z.number()).optional(), - temperature: z.nullable(z.number()), - topP: z.nullable(z.number()), - instructions: z.nullable(OpenAIResponsesInputUnion$outboundSchema).optional(), - metadata: z.nullable(z.record(z.string(), z.string())), - tools: z.array( - z.union([ - z.lazy(() => - OpenResponsesNonStreamingResponseToolFunction$outboundSchema - ), - OpenResponsesWebSearchPreviewTool$outboundSchema, - OpenResponsesWebSearchPreview20250311Tool$outboundSchema, - OpenResponsesWebSearchTool$outboundSchema, - OpenResponsesWebSearch20250826Tool$outboundSchema, - ]), - ), - toolChoice: OpenAIResponsesToolChoiceUnion$outboundSchema, - parallelToolCalls: z.boolean(), - prompt: z.nullable(OpenAIResponsesPrompt$outboundSchema).optional(), - background: z.nullable(z.boolean()).optional(), - previousResponseId: z.nullable(z.string()).optional(), - reasoning: z.nullable(OpenAIResponsesReasoningConfig$outboundSchema) - .optional(), - serviceTier: z.nullable(OpenAIResponsesServiceTier$outboundSchema).optional(), - store: z.boolean().optional(), - truncation: z.nullable(OpenAIResponsesTruncation$outboundSchema).optional(), - text: ResponseTextConfig$outboundSchema.optional(), -}).transform((v) => { - return remap$(v, { - createdAt: "created_at", - outputText: "output_text", - promptCacheKey: "prompt_cache_key", - safetyIdentifier: "safety_identifier", - incompleteDetails: "incomplete_details", - maxToolCalls: "max_tool_calls", - topLogprobs: "top_logprobs", - maxOutputTokens: "max_output_tokens", - topP: "top_p", - toolChoice: "tool_choice", - parallelToolCalls: "parallel_tool_calls", - previousResponseId: "previous_response_id", - serviceTier: "service_tier", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesNonStreamingResponse$ { - /** @deprecated use `OpenResponsesNonStreamingResponse$inboundSchema` instead. */ - export const inboundSchema = OpenResponsesNonStreamingResponse$inboundSchema; - /** @deprecated use `OpenResponsesNonStreamingResponse$outboundSchema` instead. */ - export const outboundSchema = - OpenResponsesNonStreamingResponse$outboundSchema; - /** @deprecated use `OpenResponsesNonStreamingResponse$Outbound` instead. */ - export type Outbound = OpenResponsesNonStreamingResponse$Outbound; -} - -export function openResponsesNonStreamingResponseToJSON( - openResponsesNonStreamingResponse: OpenResponsesNonStreamingResponse, -): string { - return JSON.stringify( - OpenResponsesNonStreamingResponse$outboundSchema.parse( - openResponsesNonStreamingResponse, - ), - ); -} - export function openResponsesNonStreamingResponseFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/openresponsesreasoning.ts b/src/models/openresponsesreasoning.ts index 7397c712..14c9eb64 100644 --- a/src/models/openresponsesreasoning.ts +++ b/src/models/openresponsesreasoning.ts @@ -4,24 +4,14 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { - catchUnrecognizedEnum, - ClosedEnum, - OpenEnum, - Unrecognized, -} from "../types/enums.js"; -import { Result as SafeParseResult } from "../types/fp.js"; -import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { ClosedEnum, OpenEnum, Unrecognized } from "../types/enums.js"; import { ReasoningSummaryText, - ReasoningSummaryText$inboundSchema, ReasoningSummaryText$Outbound, ReasoningSummaryText$outboundSchema, } from "./reasoningsummarytext.js"; import { ReasoningTextContent, - ReasoningTextContent$inboundSchema, ReasoningTextContent$Outbound, ReasoningTextContent$outboundSchema, } from "./reasoningtextcontent.js"; @@ -87,105 +77,25 @@ export type OpenResponsesReasoning = { format?: OpenResponsesReasoningFormat | null | undefined; }; -/** @internal */ -export const OpenResponsesReasoningType$inboundSchema: z.ZodEnum< - typeof OpenResponsesReasoningType -> = z.enum(OpenResponsesReasoningType); - /** @internal */ export const OpenResponsesReasoningType$outboundSchema: z.ZodEnum< typeof OpenResponsesReasoningType -> = OpenResponsesReasoningType$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesReasoningType$ { - /** @deprecated use `OpenResponsesReasoningType$inboundSchema` instead. */ - export const inboundSchema = OpenResponsesReasoningType$inboundSchema; - /** @deprecated use `OpenResponsesReasoningType$outboundSchema` instead. */ - export const outboundSchema = OpenResponsesReasoningType$outboundSchema; -} - -/** @internal */ -export const OpenResponsesReasoningStatusInProgress$inboundSchema: z.ZodEnum< - typeof OpenResponsesReasoningStatusInProgress -> = z.enum(OpenResponsesReasoningStatusInProgress); +> = z.enum(OpenResponsesReasoningType); /** @internal */ export const OpenResponsesReasoningStatusInProgress$outboundSchema: z.ZodEnum< typeof OpenResponsesReasoningStatusInProgress -> = OpenResponsesReasoningStatusInProgress$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesReasoningStatusInProgress$ { - /** @deprecated use `OpenResponsesReasoningStatusInProgress$inboundSchema` instead. */ - export const inboundSchema = - OpenResponsesReasoningStatusInProgress$inboundSchema; - /** @deprecated use `OpenResponsesReasoningStatusInProgress$outboundSchema` instead. */ - export const outboundSchema = - OpenResponsesReasoningStatusInProgress$outboundSchema; -} - -/** @internal */ -export const OpenResponsesReasoningStatusIncomplete$inboundSchema: z.ZodEnum< - typeof OpenResponsesReasoningStatusIncomplete -> = z.enum(OpenResponsesReasoningStatusIncomplete); +> = z.enum(OpenResponsesReasoningStatusInProgress); /** @internal */ export const OpenResponsesReasoningStatusIncomplete$outboundSchema: z.ZodEnum< typeof OpenResponsesReasoningStatusIncomplete -> = OpenResponsesReasoningStatusIncomplete$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesReasoningStatusIncomplete$ { - /** @deprecated use `OpenResponsesReasoningStatusIncomplete$inboundSchema` instead. */ - export const inboundSchema = - OpenResponsesReasoningStatusIncomplete$inboundSchema; - /** @deprecated use `OpenResponsesReasoningStatusIncomplete$outboundSchema` instead. */ - export const outboundSchema = - OpenResponsesReasoningStatusIncomplete$outboundSchema; -} - -/** @internal */ -export const OpenResponsesReasoningStatusCompleted$inboundSchema: z.ZodEnum< - typeof OpenResponsesReasoningStatusCompleted -> = z.enum(OpenResponsesReasoningStatusCompleted); +> = z.enum(OpenResponsesReasoningStatusIncomplete); /** @internal */ export const OpenResponsesReasoningStatusCompleted$outboundSchema: z.ZodEnum< typeof OpenResponsesReasoningStatusCompleted -> = OpenResponsesReasoningStatusCompleted$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesReasoningStatusCompleted$ { - /** @deprecated use `OpenResponsesReasoningStatusCompleted$inboundSchema` instead. */ - export const inboundSchema = - OpenResponsesReasoningStatusCompleted$inboundSchema; - /** @deprecated use `OpenResponsesReasoningStatusCompleted$outboundSchema` instead. */ - export const outboundSchema = - OpenResponsesReasoningStatusCompleted$outboundSchema; -} - -/** @internal */ -export const OpenResponsesReasoningStatusUnion$inboundSchema: z.ZodType< - OpenResponsesReasoningStatusUnion, - unknown -> = z.union([ - OpenResponsesReasoningStatusCompleted$inboundSchema, - OpenResponsesReasoningStatusIncomplete$inboundSchema, - OpenResponsesReasoningStatusInProgress$inboundSchema, -]); +> = z.enum(OpenResponsesReasoningStatusCompleted); /** @internal */ export type OpenResponsesReasoningStatusUnion$Outbound = @@ -203,20 +113,6 @@ export const OpenResponsesReasoningStatusUnion$outboundSchema: z.ZodType< OpenResponsesReasoningStatusInProgress$outboundSchema, ]); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesReasoningStatusUnion$ { - /** @deprecated use `OpenResponsesReasoningStatusUnion$inboundSchema` instead. */ - export const inboundSchema = OpenResponsesReasoningStatusUnion$inboundSchema; - /** @deprecated use `OpenResponsesReasoningStatusUnion$outboundSchema` instead. */ - export const outboundSchema = - OpenResponsesReasoningStatusUnion$outboundSchema; - /** @deprecated use `OpenResponsesReasoningStatusUnion$Outbound` instead. */ - export type Outbound = OpenResponsesReasoningStatusUnion$Outbound; -} - export function openResponsesReasoningStatusUnionToJSON( openResponsesReasoningStatusUnion: OpenResponsesReasoningStatusUnion, ): string { @@ -227,26 +123,6 @@ export function openResponsesReasoningStatusUnionToJSON( ); } -export function openResponsesReasoningStatusUnionFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => OpenResponsesReasoningStatusUnion$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'OpenResponsesReasoningStatusUnion' from JSON`, - ); -} - -/** @internal */ -export const OpenResponsesReasoningFormat$inboundSchema: z.ZodType< - OpenResponsesReasoningFormat, - unknown -> = z - .union([ - z.enum(OpenResponsesReasoningFormat), - z.string().transform(catchUnrecognizedEnum), - ]); - /** @internal */ export const OpenResponsesReasoningFormat$outboundSchema: z.ZodType< OpenResponsesReasoningFormat, @@ -256,40 +132,6 @@ export const OpenResponsesReasoningFormat$outboundSchema: z.ZodType< z.string().and(z.custom>()), ]); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesReasoningFormat$ { - /** @deprecated use `OpenResponsesReasoningFormat$inboundSchema` instead. */ - export const inboundSchema = OpenResponsesReasoningFormat$inboundSchema; - /** @deprecated use `OpenResponsesReasoningFormat$outboundSchema` instead. */ - export const outboundSchema = OpenResponsesReasoningFormat$outboundSchema; -} - -/** @internal */ -export const OpenResponsesReasoning$inboundSchema: z.ZodType< - OpenResponsesReasoning, - unknown -> = z.object({ - type: OpenResponsesReasoningType$inboundSchema, - id: z.string(), - content: z.array(ReasoningTextContent$inboundSchema).optional(), - summary: z.array(ReasoningSummaryText$inboundSchema), - encrypted_content: z.nullable(z.string()).optional(), - status: z.union([ - OpenResponsesReasoningStatusCompleted$inboundSchema, - OpenResponsesReasoningStatusIncomplete$inboundSchema, - OpenResponsesReasoningStatusInProgress$inboundSchema, - ]).optional(), - signature: z.nullable(z.string()).optional(), - format: z.nullable(OpenResponsesReasoningFormat$inboundSchema).optional(), -}).transform((v) => { - return remap$(v, { - "encrypted_content": "encryptedContent", - }); -}); - /** @internal */ export type OpenResponsesReasoning$Outbound = { type: string; @@ -325,19 +167,6 @@ export const OpenResponsesReasoning$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesReasoning$ { - /** @deprecated use `OpenResponsesReasoning$inboundSchema` instead. */ - export const inboundSchema = OpenResponsesReasoning$inboundSchema; - /** @deprecated use `OpenResponsesReasoning$outboundSchema` instead. */ - export const outboundSchema = OpenResponsesReasoning$outboundSchema; - /** @deprecated use `OpenResponsesReasoning$Outbound` instead. */ - export type Outbound = OpenResponsesReasoning$Outbound; -} - export function openResponsesReasoningToJSON( openResponsesReasoning: OpenResponsesReasoning, ): string { @@ -345,13 +174,3 @@ export function openResponsesReasoningToJSON( OpenResponsesReasoning$outboundSchema.parse(openResponsesReasoning), ); } - -export function openResponsesReasoningFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => OpenResponsesReasoning$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'OpenResponsesReasoning' from JSON`, - ); -} diff --git a/src/models/openresponsesreasoningconfig.ts b/src/models/openresponsesreasoningconfig.ts index 0f129688..f4e607ba 100644 --- a/src/models/openresponsesreasoningconfig.ts +++ b/src/models/openresponsesreasoningconfig.ts @@ -4,17 +4,12 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { Result as SafeParseResult } from "../types/fp.js"; -import { SDKValidationError } from "./errors/sdkvalidationerror.js"; import { OpenAIResponsesReasoningEffort, - OpenAIResponsesReasoningEffort$inboundSchema, OpenAIResponsesReasoningEffort$outboundSchema, } from "./openairesponsesreasoningeffort.js"; import { ReasoningSummaryVerbosity, - ReasoningSummaryVerbosity$inboundSchema, ReasoningSummaryVerbosity$outboundSchema, } from "./reasoningsummaryverbosity.js"; @@ -28,21 +23,6 @@ export type OpenResponsesReasoningConfig = { enabled?: boolean | null | undefined; }; -/** @internal */ -export const OpenResponsesReasoningConfig$inboundSchema: z.ZodType< - OpenResponsesReasoningConfig, - unknown -> = z.object({ - effort: z.nullable(OpenAIResponsesReasoningEffort$inboundSchema).optional(), - summary: ReasoningSummaryVerbosity$inboundSchema.optional(), - max_tokens: z.nullable(z.number()).optional(), - enabled: z.nullable(z.boolean()).optional(), -}).transform((v) => { - return remap$(v, { - "max_tokens": "maxTokens", - }); -}); - /** @internal */ export type OpenResponsesReasoningConfig$Outbound = { effort?: string | null | undefined; @@ -66,19 +46,6 @@ export const OpenResponsesReasoningConfig$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesReasoningConfig$ { - /** @deprecated use `OpenResponsesReasoningConfig$inboundSchema` instead. */ - export const inboundSchema = OpenResponsesReasoningConfig$inboundSchema; - /** @deprecated use `OpenResponsesReasoningConfig$outboundSchema` instead. */ - export const outboundSchema = OpenResponsesReasoningConfig$outboundSchema; - /** @deprecated use `OpenResponsesReasoningConfig$Outbound` instead. */ - export type Outbound = OpenResponsesReasoningConfig$Outbound; -} - export function openResponsesReasoningConfigToJSON( openResponsesReasoningConfig: OpenResponsesReasoningConfig, ): string { @@ -88,13 +55,3 @@ export function openResponsesReasoningConfigToJSON( ), ); } - -export function openResponsesReasoningConfigFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => OpenResponsesReasoningConfig$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'OpenResponsesReasoningConfig' from JSON`, - ); -} diff --git a/src/models/openresponsesreasoningdeltaevent.ts b/src/models/openresponsesreasoningdeltaevent.ts index 7802043e..ee3adf9e 100644 --- a/src/models/openresponsesreasoningdeltaevent.ts +++ b/src/models/openresponsesreasoningdeltaevent.ts @@ -33,24 +33,6 @@ export const OpenResponsesReasoningDeltaEventType$inboundSchema: z.ZodEnum< typeof OpenResponsesReasoningDeltaEventType > = z.enum(OpenResponsesReasoningDeltaEventType); -/** @internal */ -export const OpenResponsesReasoningDeltaEventType$outboundSchema: z.ZodEnum< - typeof OpenResponsesReasoningDeltaEventType -> = OpenResponsesReasoningDeltaEventType$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesReasoningDeltaEventType$ { - /** @deprecated use `OpenResponsesReasoningDeltaEventType$inboundSchema` instead. */ - export const inboundSchema = - OpenResponsesReasoningDeltaEventType$inboundSchema; - /** @deprecated use `OpenResponsesReasoningDeltaEventType$outboundSchema` instead. */ - export const outboundSchema = - OpenResponsesReasoningDeltaEventType$outboundSchema; -} - /** @internal */ export const OpenResponsesReasoningDeltaEvent$inboundSchema: z.ZodType< OpenResponsesReasoningDeltaEvent, @@ -71,59 +53,6 @@ export const OpenResponsesReasoningDeltaEvent$inboundSchema: z.ZodType< }); }); -/** @internal */ -export type OpenResponsesReasoningDeltaEvent$Outbound = { - type: string; - output_index: number; - item_id: string; - content_index: number; - delta: string; - sequence_number: number; -}; - -/** @internal */ -export const OpenResponsesReasoningDeltaEvent$outboundSchema: z.ZodType< - OpenResponsesReasoningDeltaEvent$Outbound, - OpenResponsesReasoningDeltaEvent -> = z.object({ - type: OpenResponsesReasoningDeltaEventType$outboundSchema, - outputIndex: z.number(), - itemId: z.string(), - contentIndex: z.number(), - delta: z.string(), - sequenceNumber: z.number(), -}).transform((v) => { - return remap$(v, { - outputIndex: "output_index", - itemId: "item_id", - contentIndex: "content_index", - sequenceNumber: "sequence_number", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesReasoningDeltaEvent$ { - /** @deprecated use `OpenResponsesReasoningDeltaEvent$inboundSchema` instead. */ - export const inboundSchema = OpenResponsesReasoningDeltaEvent$inboundSchema; - /** @deprecated use `OpenResponsesReasoningDeltaEvent$outboundSchema` instead. */ - export const outboundSchema = OpenResponsesReasoningDeltaEvent$outboundSchema; - /** @deprecated use `OpenResponsesReasoningDeltaEvent$Outbound` instead. */ - export type Outbound = OpenResponsesReasoningDeltaEvent$Outbound; -} - -export function openResponsesReasoningDeltaEventToJSON( - openResponsesReasoningDeltaEvent: OpenResponsesReasoningDeltaEvent, -): string { - return JSON.stringify( - OpenResponsesReasoningDeltaEvent$outboundSchema.parse( - openResponsesReasoningDeltaEvent, - ), - ); -} - export function openResponsesReasoningDeltaEventFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/openresponsesreasoningdoneevent.ts b/src/models/openresponsesreasoningdoneevent.ts index 847d92a8..a164feef 100644 --- a/src/models/openresponsesreasoningdoneevent.ts +++ b/src/models/openresponsesreasoningdoneevent.ts @@ -33,24 +33,6 @@ export const OpenResponsesReasoningDoneEventType$inboundSchema: z.ZodEnum< typeof OpenResponsesReasoningDoneEventType > = z.enum(OpenResponsesReasoningDoneEventType); -/** @internal */ -export const OpenResponsesReasoningDoneEventType$outboundSchema: z.ZodEnum< - typeof OpenResponsesReasoningDoneEventType -> = OpenResponsesReasoningDoneEventType$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesReasoningDoneEventType$ { - /** @deprecated use `OpenResponsesReasoningDoneEventType$inboundSchema` instead. */ - export const inboundSchema = - OpenResponsesReasoningDoneEventType$inboundSchema; - /** @deprecated use `OpenResponsesReasoningDoneEventType$outboundSchema` instead. */ - export const outboundSchema = - OpenResponsesReasoningDoneEventType$outboundSchema; -} - /** @internal */ export const OpenResponsesReasoningDoneEvent$inboundSchema: z.ZodType< OpenResponsesReasoningDoneEvent, @@ -71,59 +53,6 @@ export const OpenResponsesReasoningDoneEvent$inboundSchema: z.ZodType< }); }); -/** @internal */ -export type OpenResponsesReasoningDoneEvent$Outbound = { - type: string; - output_index: number; - item_id: string; - content_index: number; - text: string; - sequence_number: number; -}; - -/** @internal */ -export const OpenResponsesReasoningDoneEvent$outboundSchema: z.ZodType< - OpenResponsesReasoningDoneEvent$Outbound, - OpenResponsesReasoningDoneEvent -> = z.object({ - type: OpenResponsesReasoningDoneEventType$outboundSchema, - outputIndex: z.number(), - itemId: z.string(), - contentIndex: z.number(), - text: z.string(), - sequenceNumber: z.number(), -}).transform((v) => { - return remap$(v, { - outputIndex: "output_index", - itemId: "item_id", - contentIndex: "content_index", - sequenceNumber: "sequence_number", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesReasoningDoneEvent$ { - /** @deprecated use `OpenResponsesReasoningDoneEvent$inboundSchema` instead. */ - export const inboundSchema = OpenResponsesReasoningDoneEvent$inboundSchema; - /** @deprecated use `OpenResponsesReasoningDoneEvent$outboundSchema` instead. */ - export const outboundSchema = OpenResponsesReasoningDoneEvent$outboundSchema; - /** @deprecated use `OpenResponsesReasoningDoneEvent$Outbound` instead. */ - export type Outbound = OpenResponsesReasoningDoneEvent$Outbound; -} - -export function openResponsesReasoningDoneEventToJSON( - openResponsesReasoningDoneEvent: OpenResponsesReasoningDoneEvent, -): string { - return JSON.stringify( - OpenResponsesReasoningDoneEvent$outboundSchema.parse( - openResponsesReasoningDoneEvent, - ), - ); -} - export function openResponsesReasoningDoneEventFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/openresponsesreasoningsummarypartaddedevent.ts b/src/models/openresponsesreasoningsummarypartaddedevent.ts index 22dcac3e..f6ecdca9 100644 --- a/src/models/openresponsesreasoningsummarypartaddedevent.ts +++ b/src/models/openresponsesreasoningsummarypartaddedevent.ts @@ -11,8 +11,6 @@ import { SDKValidationError } from "./errors/sdkvalidationerror.js"; import { ReasoningSummaryText, ReasoningSummaryText$inboundSchema, - ReasoningSummaryText$Outbound, - ReasoningSummaryText$outboundSchema, } from "./reasoningsummarytext.js"; export const OpenResponsesReasoningSummaryPartAddedEventType = { @@ -40,24 +38,6 @@ export const OpenResponsesReasoningSummaryPartAddedEventType$inboundSchema: OpenResponsesReasoningSummaryPartAddedEventType, ); -/** @internal */ -export const OpenResponsesReasoningSummaryPartAddedEventType$outboundSchema: - z.ZodEnum = - OpenResponsesReasoningSummaryPartAddedEventType$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesReasoningSummaryPartAddedEventType$ { - /** @deprecated use `OpenResponsesReasoningSummaryPartAddedEventType$inboundSchema` instead. */ - export const inboundSchema = - OpenResponsesReasoningSummaryPartAddedEventType$inboundSchema; - /** @deprecated use `OpenResponsesReasoningSummaryPartAddedEventType$outboundSchema` instead. */ - export const outboundSchema = - OpenResponsesReasoningSummaryPartAddedEventType$outboundSchema; -} - /** @internal */ export const OpenResponsesReasoningSummaryPartAddedEvent$inboundSchema: z.ZodType = z.object({ @@ -76,63 +56,6 @@ export const OpenResponsesReasoningSummaryPartAddedEvent$inboundSchema: }); }); -/** @internal */ -export type OpenResponsesReasoningSummaryPartAddedEvent$Outbound = { - type: string; - output_index: number; - item_id: string; - summary_index: number; - part: ReasoningSummaryText$Outbound; - sequence_number: number; -}; - -/** @internal */ -export const OpenResponsesReasoningSummaryPartAddedEvent$outboundSchema: - z.ZodType< - OpenResponsesReasoningSummaryPartAddedEvent$Outbound, - OpenResponsesReasoningSummaryPartAddedEvent - > = z.object({ - type: OpenResponsesReasoningSummaryPartAddedEventType$outboundSchema, - outputIndex: z.number(), - itemId: z.string(), - summaryIndex: z.number(), - part: ReasoningSummaryText$outboundSchema, - sequenceNumber: z.number(), - }).transform((v) => { - return remap$(v, { - outputIndex: "output_index", - itemId: "item_id", - summaryIndex: "summary_index", - sequenceNumber: "sequence_number", - }); - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesReasoningSummaryPartAddedEvent$ { - /** @deprecated use `OpenResponsesReasoningSummaryPartAddedEvent$inboundSchema` instead. */ - export const inboundSchema = - OpenResponsesReasoningSummaryPartAddedEvent$inboundSchema; - /** @deprecated use `OpenResponsesReasoningSummaryPartAddedEvent$outboundSchema` instead. */ - export const outboundSchema = - OpenResponsesReasoningSummaryPartAddedEvent$outboundSchema; - /** @deprecated use `OpenResponsesReasoningSummaryPartAddedEvent$Outbound` instead. */ - export type Outbound = OpenResponsesReasoningSummaryPartAddedEvent$Outbound; -} - -export function openResponsesReasoningSummaryPartAddedEventToJSON( - openResponsesReasoningSummaryPartAddedEvent: - OpenResponsesReasoningSummaryPartAddedEvent, -): string { - return JSON.stringify( - OpenResponsesReasoningSummaryPartAddedEvent$outboundSchema.parse( - openResponsesReasoningSummaryPartAddedEvent, - ), - ); -} - export function openResponsesReasoningSummaryPartAddedEventFromJSON( jsonString: string, ): SafeParseResult< diff --git a/src/models/openresponsesreasoningsummarytextdeltaevent.ts b/src/models/openresponsesreasoningsummarytextdeltaevent.ts index 7f8cced0..a7e07d74 100644 --- a/src/models/openresponsesreasoningsummarytextdeltaevent.ts +++ b/src/models/openresponsesreasoningsummarytextdeltaevent.ts @@ -34,24 +34,6 @@ export const OpenResponsesReasoningSummaryTextDeltaEventType$inboundSchema: OpenResponsesReasoningSummaryTextDeltaEventType, ); -/** @internal */ -export const OpenResponsesReasoningSummaryTextDeltaEventType$outboundSchema: - z.ZodEnum = - OpenResponsesReasoningSummaryTextDeltaEventType$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesReasoningSummaryTextDeltaEventType$ { - /** @deprecated use `OpenResponsesReasoningSummaryTextDeltaEventType$inboundSchema` instead. */ - export const inboundSchema = - OpenResponsesReasoningSummaryTextDeltaEventType$inboundSchema; - /** @deprecated use `OpenResponsesReasoningSummaryTextDeltaEventType$outboundSchema` instead. */ - export const outboundSchema = - OpenResponsesReasoningSummaryTextDeltaEventType$outboundSchema; -} - /** @internal */ export const OpenResponsesReasoningSummaryTextDeltaEvent$inboundSchema: z.ZodType = z.object({ @@ -70,63 +52,6 @@ export const OpenResponsesReasoningSummaryTextDeltaEvent$inboundSchema: }); }); -/** @internal */ -export type OpenResponsesReasoningSummaryTextDeltaEvent$Outbound = { - type: string; - item_id: string; - output_index: number; - summary_index: number; - delta: string; - sequence_number: number; -}; - -/** @internal */ -export const OpenResponsesReasoningSummaryTextDeltaEvent$outboundSchema: - z.ZodType< - OpenResponsesReasoningSummaryTextDeltaEvent$Outbound, - OpenResponsesReasoningSummaryTextDeltaEvent - > = z.object({ - type: OpenResponsesReasoningSummaryTextDeltaEventType$outboundSchema, - itemId: z.string(), - outputIndex: z.number(), - summaryIndex: z.number(), - delta: z.string(), - sequenceNumber: z.number(), - }).transform((v) => { - return remap$(v, { - itemId: "item_id", - outputIndex: "output_index", - summaryIndex: "summary_index", - sequenceNumber: "sequence_number", - }); - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesReasoningSummaryTextDeltaEvent$ { - /** @deprecated use `OpenResponsesReasoningSummaryTextDeltaEvent$inboundSchema` instead. */ - export const inboundSchema = - OpenResponsesReasoningSummaryTextDeltaEvent$inboundSchema; - /** @deprecated use `OpenResponsesReasoningSummaryTextDeltaEvent$outboundSchema` instead. */ - export const outboundSchema = - OpenResponsesReasoningSummaryTextDeltaEvent$outboundSchema; - /** @deprecated use `OpenResponsesReasoningSummaryTextDeltaEvent$Outbound` instead. */ - export type Outbound = OpenResponsesReasoningSummaryTextDeltaEvent$Outbound; -} - -export function openResponsesReasoningSummaryTextDeltaEventToJSON( - openResponsesReasoningSummaryTextDeltaEvent: - OpenResponsesReasoningSummaryTextDeltaEvent, -): string { - return JSON.stringify( - OpenResponsesReasoningSummaryTextDeltaEvent$outboundSchema.parse( - openResponsesReasoningSummaryTextDeltaEvent, - ), - ); -} - export function openResponsesReasoningSummaryTextDeltaEventFromJSON( jsonString: string, ): SafeParseResult< diff --git a/src/models/openresponsesreasoningsummarytextdoneevent.ts b/src/models/openresponsesreasoningsummarytextdoneevent.ts index 80ed3da0..ee5782dd 100644 --- a/src/models/openresponsesreasoningsummarytextdoneevent.ts +++ b/src/models/openresponsesreasoningsummarytextdoneevent.ts @@ -34,24 +34,6 @@ export const OpenResponsesReasoningSummaryTextDoneEventType$inboundSchema: OpenResponsesReasoningSummaryTextDoneEventType, ); -/** @internal */ -export const OpenResponsesReasoningSummaryTextDoneEventType$outboundSchema: - z.ZodEnum = - OpenResponsesReasoningSummaryTextDoneEventType$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesReasoningSummaryTextDoneEventType$ { - /** @deprecated use `OpenResponsesReasoningSummaryTextDoneEventType$inboundSchema` instead. */ - export const inboundSchema = - OpenResponsesReasoningSummaryTextDoneEventType$inboundSchema; - /** @deprecated use `OpenResponsesReasoningSummaryTextDoneEventType$outboundSchema` instead. */ - export const outboundSchema = - OpenResponsesReasoningSummaryTextDoneEventType$outboundSchema; -} - /** @internal */ export const OpenResponsesReasoningSummaryTextDoneEvent$inboundSchema: z.ZodType = z.object({ @@ -70,63 +52,6 @@ export const OpenResponsesReasoningSummaryTextDoneEvent$inboundSchema: }); }); -/** @internal */ -export type OpenResponsesReasoningSummaryTextDoneEvent$Outbound = { - type: string; - item_id: string; - output_index: number; - summary_index: number; - text: string; - sequence_number: number; -}; - -/** @internal */ -export const OpenResponsesReasoningSummaryTextDoneEvent$outboundSchema: - z.ZodType< - OpenResponsesReasoningSummaryTextDoneEvent$Outbound, - OpenResponsesReasoningSummaryTextDoneEvent - > = z.object({ - type: OpenResponsesReasoningSummaryTextDoneEventType$outboundSchema, - itemId: z.string(), - outputIndex: z.number(), - summaryIndex: z.number(), - text: z.string(), - sequenceNumber: z.number(), - }).transform((v) => { - return remap$(v, { - itemId: "item_id", - outputIndex: "output_index", - summaryIndex: "summary_index", - sequenceNumber: "sequence_number", - }); - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesReasoningSummaryTextDoneEvent$ { - /** @deprecated use `OpenResponsesReasoningSummaryTextDoneEvent$inboundSchema` instead. */ - export const inboundSchema = - OpenResponsesReasoningSummaryTextDoneEvent$inboundSchema; - /** @deprecated use `OpenResponsesReasoningSummaryTextDoneEvent$outboundSchema` instead. */ - export const outboundSchema = - OpenResponsesReasoningSummaryTextDoneEvent$outboundSchema; - /** @deprecated use `OpenResponsesReasoningSummaryTextDoneEvent$Outbound` instead. */ - export type Outbound = OpenResponsesReasoningSummaryTextDoneEvent$Outbound; -} - -export function openResponsesReasoningSummaryTextDoneEventToJSON( - openResponsesReasoningSummaryTextDoneEvent: - OpenResponsesReasoningSummaryTextDoneEvent, -): string { - return JSON.stringify( - OpenResponsesReasoningSummaryTextDoneEvent$outboundSchema.parse( - openResponsesReasoningSummaryTextDoneEvent, - ), - ); -} - export function openResponsesReasoningSummaryTextDoneEventFromJSON( jsonString: string, ): SafeParseResult< diff --git a/src/models/openresponsesrequest.ts b/src/models/openresponsesrequest.ts index 333ff75d..6c9befc2 100644 --- a/src/models/openresponsesrequest.ts +++ b/src/models/openresponsesrequest.ts @@ -4,84 +4,58 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { - catchUnrecognizedEnum, - ClosedEnum, - OpenEnum, - Unrecognized, -} from "../types/enums.js"; -import { Result as SafeParseResult } from "../types/fp.js"; -import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { ClosedEnum, OpenEnum, Unrecognized } from "../types/enums.js"; import { OpenAIResponsesIncludable, - OpenAIResponsesIncludable$inboundSchema, OpenAIResponsesIncludable$outboundSchema, } from "./openairesponsesincludable.js"; import { OpenAIResponsesPrompt, - OpenAIResponsesPrompt$inboundSchema, OpenAIResponsesPrompt$Outbound, OpenAIResponsesPrompt$outboundSchema, } from "./openairesponsesprompt.js"; import { OpenAIResponsesToolChoiceUnion, - OpenAIResponsesToolChoiceUnion$inboundSchema, OpenAIResponsesToolChoiceUnion$Outbound, OpenAIResponsesToolChoiceUnion$outboundSchema, } from "./openairesponsestoolchoiceunion.js"; import { OpenResponsesInput, - OpenResponsesInput$inboundSchema, OpenResponsesInput$Outbound, OpenResponsesInput$outboundSchema, } from "./openresponsesinput.js"; import { OpenResponsesReasoningConfig, - OpenResponsesReasoningConfig$inboundSchema, OpenResponsesReasoningConfig$Outbound, OpenResponsesReasoningConfig$outboundSchema, } from "./openresponsesreasoningconfig.js"; import { OpenResponsesResponseText, - OpenResponsesResponseText$inboundSchema, OpenResponsesResponseText$Outbound, OpenResponsesResponseText$outboundSchema, } from "./openresponsesresponsetext.js"; import { OpenResponsesWebSearch20250826Tool, - OpenResponsesWebSearch20250826Tool$inboundSchema, OpenResponsesWebSearch20250826Tool$Outbound, OpenResponsesWebSearch20250826Tool$outboundSchema, } from "./openresponseswebsearch20250826tool.js"; import { OpenResponsesWebSearchPreview20250311Tool, - OpenResponsesWebSearchPreview20250311Tool$inboundSchema, OpenResponsesWebSearchPreview20250311Tool$Outbound, OpenResponsesWebSearchPreview20250311Tool$outboundSchema, } from "./openresponseswebsearchpreview20250311tool.js"; import { OpenResponsesWebSearchPreviewTool, - OpenResponsesWebSearchPreviewTool$inboundSchema, OpenResponsesWebSearchPreviewTool$Outbound, OpenResponsesWebSearchPreviewTool$outboundSchema, } from "./openresponseswebsearchpreviewtool.js"; import { OpenResponsesWebSearchTool, - OpenResponsesWebSearchTool$inboundSchema, OpenResponsesWebSearchTool$Outbound, OpenResponsesWebSearchTool$outboundSchema, } from "./openresponseswebsearchtool.js"; -import { - ProviderName, - ProviderName$inboundSchema, - ProviderName$outboundSchema, -} from "./providername.js"; -import { - Quantization, - Quantization$inboundSchema, - Quantization$outboundSchema, -} from "./quantization.js"; +import { ProviderName, ProviderName$outboundSchema } from "./providername.js"; +import { Quantization, Quantization$outboundSchema } from "./quantization.js"; export const OpenResponsesRequestType = { Function: "function", @@ -358,38 +332,10 @@ export type OpenResponsesRequest = { user?: string | undefined; }; -/** @internal */ -export const OpenResponsesRequestType$inboundSchema: z.ZodEnum< - typeof OpenResponsesRequestType -> = z.enum(OpenResponsesRequestType); - /** @internal */ export const OpenResponsesRequestType$outboundSchema: z.ZodEnum< typeof OpenResponsesRequestType -> = OpenResponsesRequestType$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesRequestType$ { - /** @deprecated use `OpenResponsesRequestType$inboundSchema` instead. */ - export const inboundSchema = OpenResponsesRequestType$inboundSchema; - /** @deprecated use `OpenResponsesRequestType$outboundSchema` instead. */ - export const outboundSchema = OpenResponsesRequestType$outboundSchema; -} - -/** @internal */ -export const OpenResponsesRequestToolFunction$inboundSchema: z.ZodType< - OpenResponsesRequestToolFunction, - unknown -> = z.object({ - type: OpenResponsesRequestType$inboundSchema, - name: z.string(), - description: z.nullable(z.string()).optional(), - strict: z.nullable(z.boolean()).optional(), - parameters: z.nullable(z.record(z.string(), z.nullable(z.any()))), -}); +> = z.enum(OpenResponsesRequestType); /** @internal */ export type OpenResponsesRequestToolFunction$Outbound = { @@ -412,19 +358,6 @@ export const OpenResponsesRequestToolFunction$outboundSchema: z.ZodType< parameters: z.nullable(z.record(z.string(), z.nullable(z.any()))), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesRequestToolFunction$ { - /** @deprecated use `OpenResponsesRequestToolFunction$inboundSchema` instead. */ - export const inboundSchema = OpenResponsesRequestToolFunction$inboundSchema; - /** @deprecated use `OpenResponsesRequestToolFunction$outboundSchema` instead. */ - export const outboundSchema = OpenResponsesRequestToolFunction$outboundSchema; - /** @deprecated use `OpenResponsesRequestToolFunction$Outbound` instead. */ - export type Outbound = OpenResponsesRequestToolFunction$Outbound; -} - export function openResponsesRequestToolFunctionToJSON( openResponsesRequestToolFunction: OpenResponsesRequestToolFunction, ): string { @@ -435,28 +368,6 @@ export function openResponsesRequestToolFunctionToJSON( ); } -export function openResponsesRequestToolFunctionFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => OpenResponsesRequestToolFunction$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'OpenResponsesRequestToolFunction' from JSON`, - ); -} - -/** @internal */ -export const OpenResponsesRequestToolUnion$inboundSchema: z.ZodType< - OpenResponsesRequestToolUnion, - unknown -> = z.union([ - z.lazy(() => OpenResponsesRequestToolFunction$inboundSchema), - OpenResponsesWebSearchPreviewTool$inboundSchema, - OpenResponsesWebSearchPreview20250311Tool$inboundSchema, - OpenResponsesWebSearchTool$inboundSchema, - OpenResponsesWebSearch20250826Tool$inboundSchema, -]); - /** @internal */ export type OpenResponsesRequestToolUnion$Outbound = | OpenResponsesRequestToolFunction$Outbound @@ -477,19 +388,6 @@ export const OpenResponsesRequestToolUnion$outboundSchema: z.ZodType< OpenResponsesWebSearch20250826Tool$outboundSchema, ]); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesRequestToolUnion$ { - /** @deprecated use `OpenResponsesRequestToolUnion$inboundSchema` instead. */ - export const inboundSchema = OpenResponsesRequestToolUnion$inboundSchema; - /** @deprecated use `OpenResponsesRequestToolUnion$outboundSchema` instead. */ - export const outboundSchema = OpenResponsesRequestToolUnion$outboundSchema; - /** @deprecated use `OpenResponsesRequestToolUnion$Outbound` instead. */ - export type Outbound = OpenResponsesRequestToolUnion$Outbound; -} - export function openResponsesRequestToolUnionToJSON( openResponsesRequestToolUnion: OpenResponsesRequestToolUnion, ): string { @@ -500,23 +398,6 @@ export function openResponsesRequestToolUnionToJSON( ); } -export function openResponsesRequestToolUnionFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => OpenResponsesRequestToolUnion$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'OpenResponsesRequestToolUnion' from JSON`, - ); -} - -/** @internal */ -export const ServiceTier$inboundSchema: z.ZodType = z - .union([ - z.enum(ServiceTier), - z.string().transform(catchUnrecognizedEnum), - ]); - /** @internal */ export const ServiceTier$outboundSchema: z.ZodType = z .union([ @@ -524,24 +405,6 @@ export const ServiceTier$outboundSchema: z.ZodType = z z.string().and(z.custom>()), ]); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ServiceTier$ { - /** @deprecated use `ServiceTier$inboundSchema` instead. */ - export const inboundSchema = ServiceTier$inboundSchema; - /** @deprecated use `ServiceTier$outboundSchema` instead. */ - export const outboundSchema = ServiceTier$outboundSchema; -} - -/** @internal */ -export const Truncation$inboundSchema: z.ZodType = z - .union([ - z.enum(Truncation), - z.string().transform(catchUnrecognizedEnum), - ]); - /** @internal */ export const Truncation$outboundSchema: z.ZodType = z .union([ @@ -549,25 +412,6 @@ export const Truncation$outboundSchema: z.ZodType = z z.string().and(z.custom>()), ]); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Truncation$ { - /** @deprecated use `Truncation$inboundSchema` instead. */ - export const inboundSchema = Truncation$inboundSchema; - /** @deprecated use `Truncation$outboundSchema` instead. */ - export const outboundSchema = Truncation$outboundSchema; -} - -/** @internal */ -export const DataCollection$inboundSchema: z.ZodType = - z - .union([ - z.enum(DataCollection), - z.string().transform(catchUnrecognizedEnum), - ]); - /** @internal */ export const DataCollection$outboundSchema: z.ZodType< DataCollection, @@ -577,23 +421,6 @@ export const DataCollection$outboundSchema: z.ZodType< z.string().and(z.custom>()), ]); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace DataCollection$ { - /** @deprecated use `DataCollection$inboundSchema` instead. */ - export const inboundSchema = DataCollection$inboundSchema; - /** @deprecated use `DataCollection$outboundSchema` instead. */ - export const outboundSchema = DataCollection$outboundSchema; -} - -/** @internal */ -export const Order$inboundSchema: z.ZodType = z.union([ - ProviderName$inboundSchema, - z.string(), -]); - /** @internal */ export type Order$Outbound = string | string; @@ -603,39 +430,10 @@ export const Order$outboundSchema: z.ZodType = z.union([ z.string(), ]); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Order$ { - /** @deprecated use `Order$inboundSchema` instead. */ - export const inboundSchema = Order$inboundSchema; - /** @deprecated use `Order$outboundSchema` instead. */ - export const outboundSchema = Order$outboundSchema; - /** @deprecated use `Order$Outbound` instead. */ - export type Outbound = Order$Outbound; -} - export function orderToJSON(order: Order): string { return JSON.stringify(Order$outboundSchema.parse(order)); } -export function orderFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Order$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Order' from JSON`, - ); -} - -/** @internal */ -export const Only$inboundSchema: z.ZodType = z.union([ - ProviderName$inboundSchema, - z.string(), -]); - /** @internal */ export type Only$Outbound = string | string; @@ -645,39 +443,10 @@ export const Only$outboundSchema: z.ZodType = z.union([ z.string(), ]); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Only$ { - /** @deprecated use `Only$inboundSchema` instead. */ - export const inboundSchema = Only$inboundSchema; - /** @deprecated use `Only$outboundSchema` instead. */ - export const outboundSchema = Only$outboundSchema; - /** @deprecated use `Only$Outbound` instead. */ - export type Outbound = Only$Outbound; -} - export function onlyToJSON(only: Only): string { return JSON.stringify(Only$outboundSchema.parse(only)); } -export function onlyFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Only$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Only' from JSON`, - ); -} - -/** @internal */ -export const Ignore$inboundSchema: z.ZodType = z.union([ - ProviderName$inboundSchema, - z.string(), -]); - /** @internal */ export type Ignore$Outbound = string | string; @@ -685,66 +454,16 @@ export type Ignore$Outbound = string | string; export const Ignore$outboundSchema: z.ZodType = z .union([ProviderName$outboundSchema, z.string()]); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Ignore$ { - /** @deprecated use `Ignore$inboundSchema` instead. */ - export const inboundSchema = Ignore$inboundSchema; - /** @deprecated use `Ignore$outboundSchema` instead. */ - export const outboundSchema = Ignore$outboundSchema; - /** @deprecated use `Ignore$Outbound` instead. */ - export type Outbound = Ignore$Outbound; -} - export function ignoreToJSON(ignore: Ignore): string { return JSON.stringify(Ignore$outboundSchema.parse(ignore)); } -export function ignoreFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Ignore$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Ignore' from JSON`, - ); -} - -/** @internal */ -export const Sort$inboundSchema: z.ZodType = z - .union([ - z.enum(Sort), - z.string().transform(catchUnrecognizedEnum), - ]); - /** @internal */ export const Sort$outboundSchema: z.ZodType = z.union([ z.enum(Sort), z.string().and(z.custom>()), ]); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Sort$ { - /** @deprecated use `Sort$inboundSchema` instead. */ - export const inboundSchema = Sort$inboundSchema; - /** @deprecated use `Sort$outboundSchema` instead. */ - export const outboundSchema = Sort$outboundSchema; -} - -/** @internal */ -export const MaxPrice$inboundSchema: z.ZodType = z.object({ - prompt: z.any().optional(), - completion: z.any().optional(), - image: z.any().optional(), - audio: z.any().optional(), - request: z.any().optional(), -}); - /** @internal */ export type MaxPrice$Outbound = { prompt?: any | undefined; @@ -764,37 +483,10 @@ export const MaxPrice$outboundSchema: z.ZodType = z request: z.any().optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace MaxPrice$ { - /** @deprecated use `MaxPrice$inboundSchema` instead. */ - export const inboundSchema = MaxPrice$inboundSchema; - /** @deprecated use `MaxPrice$outboundSchema` instead. */ - export const outboundSchema = MaxPrice$outboundSchema; - /** @deprecated use `MaxPrice$Outbound` instead. */ - export type Outbound = MaxPrice$Outbound; -} - export function maxPriceToJSON(maxPrice: MaxPrice): string { return JSON.stringify(MaxPrice$outboundSchema.parse(maxPrice)); } -export function maxPriceFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => MaxPrice$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'MaxPrice' from JSON`, - ); -} - -/** @internal */ -export const Experimental$inboundSchema: z.ZodType = z - .object({}); - /** @internal */ export type Experimental$Outbound = {}; @@ -804,58 +496,10 @@ export const Experimental$outboundSchema: z.ZodType< Experimental > = z.object({}); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Experimental$ { - /** @deprecated use `Experimental$inboundSchema` instead. */ - export const inboundSchema = Experimental$inboundSchema; - /** @deprecated use `Experimental$outboundSchema` instead. */ - export const outboundSchema = Experimental$outboundSchema; - /** @deprecated use `Experimental$Outbound` instead. */ - export type Outbound = Experimental$Outbound; -} - export function experimentalToJSON(experimental: Experimental): string { return JSON.stringify(Experimental$outboundSchema.parse(experimental)); } -export function experimentalFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Experimental$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Experimental' from JSON`, - ); -} - -/** @internal */ -export const Provider$inboundSchema: z.ZodType = z.object({ - allow_fallbacks: z.nullable(z.boolean()).optional(), - require_parameters: z.nullable(z.boolean()).optional(), - data_collection: z.nullable(DataCollection$inboundSchema).optional(), - zdr: z.nullable(z.boolean()).optional(), - order: z.nullable(z.array(z.union([ProviderName$inboundSchema, z.string()]))) - .optional(), - only: z.nullable(z.array(z.union([ProviderName$inboundSchema, z.string()]))) - .optional(), - ignore: z.nullable(z.array(z.union([ProviderName$inboundSchema, z.string()]))) - .optional(), - quantizations: z.nullable(z.array(Quantization$inboundSchema)).optional(), - sort: z.nullable(Sort$inboundSchema).optional(), - max_price: z.lazy(() => MaxPrice$inboundSchema).optional(), - experimental: z.nullable(z.lazy(() => Experimental$inboundSchema)).optional(), -}).transform((v) => { - return remap$(v, { - "allow_fallbacks": "allowFallbacks", - "require_parameters": "requireParameters", - "data_collection": "dataCollection", - "max_price": "maxPrice", - }); -}); - /** @internal */ export type Provider$Outbound = { allow_fallbacks?: boolean | null | undefined; @@ -901,59 +545,14 @@ export const Provider$outboundSchema: z.ZodType = z }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Provider$ { - /** @deprecated use `Provider$inboundSchema` instead. */ - export const inboundSchema = Provider$inboundSchema; - /** @deprecated use `Provider$outboundSchema` instead. */ - export const outboundSchema = Provider$outboundSchema; - /** @deprecated use `Provider$Outbound` instead. */ - export type Outbound = Provider$Outbound; -} - export function providerToJSON(provider: Provider): string { return JSON.stringify(Provider$outboundSchema.parse(provider)); } -export function providerFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Provider$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Provider' from JSON`, - ); -} - /** @internal */ -export const IdFileParser$inboundSchema: z.ZodEnum = z +export const IdFileParser$outboundSchema: z.ZodEnum = z .enum(IdFileParser); -/** @internal */ -export const IdFileParser$outboundSchema: z.ZodEnum = - IdFileParser$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace IdFileParser$ { - /** @deprecated use `IdFileParser$inboundSchema` instead. */ - export const inboundSchema = IdFileParser$inboundSchema; - /** @deprecated use `IdFileParser$outboundSchema` instead. */ - export const outboundSchema = IdFileParser$outboundSchema; -} - -/** @internal */ -export const PdfEngine$inboundSchema: z.ZodType = z - .union([ - z.enum(PdfEngine), - z.string().transform(catchUnrecognizedEnum), - ]); - /** @internal */ export const PdfEngine$outboundSchema: z.ZodType = z .union([ @@ -961,22 +560,6 @@ export const PdfEngine$outboundSchema: z.ZodType = z z.string().and(z.custom>()), ]); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PdfEngine$ { - /** @deprecated use `PdfEngine$inboundSchema` instead. */ - export const inboundSchema = PdfEngine$inboundSchema; - /** @deprecated use `PdfEngine$outboundSchema` instead. */ - export const outboundSchema = PdfEngine$outboundSchema; -} - -/** @internal */ -export const Pdf$inboundSchema: z.ZodType = z.object({ - engine: PdfEngine$inboundSchema.optional(), -}); - /** @internal */ export type Pdf$Outbound = { engine?: string | undefined; @@ -987,47 +570,10 @@ export const Pdf$outboundSchema: z.ZodType = z.object({ engine: PdfEngine$outboundSchema.optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Pdf$ { - /** @deprecated use `Pdf$inboundSchema` instead. */ - export const inboundSchema = Pdf$inboundSchema; - /** @deprecated use `Pdf$outboundSchema` instead. */ - export const outboundSchema = Pdf$outboundSchema; - /** @deprecated use `Pdf$Outbound` instead. */ - export type Outbound = Pdf$Outbound; -} - export function pdfToJSON(pdf: Pdf): string { return JSON.stringify(Pdf$outboundSchema.parse(pdf)); } -export function pdfFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Pdf$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Pdf' from JSON`, - ); -} - -/** @internal */ -export const PluginFileParser$inboundSchema: z.ZodType< - PluginFileParser, - unknown -> = z.object({ - id: IdFileParser$inboundSchema, - max_files: z.number().optional(), - pdf: z.lazy(() => Pdf$inboundSchema).optional(), -}).transform((v) => { - return remap$(v, { - "max_files": "maxFiles", - }); -}); - /** @internal */ export type PluginFileParser$Outbound = { id: string; @@ -1049,19 +595,6 @@ export const PluginFileParser$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PluginFileParser$ { - /** @deprecated use `PluginFileParser$inboundSchema` instead. */ - export const inboundSchema = PluginFileParser$inboundSchema; - /** @deprecated use `PluginFileParser$outboundSchema` instead. */ - export const outboundSchema = PluginFileParser$outboundSchema; - /** @deprecated use `PluginFileParser$Outbound` instead. */ - export type Outbound = PluginFileParser$Outbound; -} - export function pluginFileParserToJSON( pluginFileParser: PluginFileParser, ): string { @@ -1070,40 +603,8 @@ export function pluginFileParserToJSON( ); } -export function pluginFileParserFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PluginFileParser$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PluginFileParser' from JSON`, - ); -} - /** @internal */ -export const IdWeb$inboundSchema: z.ZodEnum = z.enum(IdWeb); - -/** @internal */ -export const IdWeb$outboundSchema: z.ZodEnum = - IdWeb$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace IdWeb$ { - /** @deprecated use `IdWeb$inboundSchema` instead. */ - export const inboundSchema = IdWeb$inboundSchema; - /** @deprecated use `IdWeb$outboundSchema` instead. */ - export const outboundSchema = IdWeb$outboundSchema; -} - -/** @internal */ -export const Engine$inboundSchema: z.ZodType = z - .union([ - z.enum(Engine), - z.string().transform(catchUnrecognizedEnum), - ]); +export const IdWeb$outboundSchema: z.ZodEnum = z.enum(IdWeb); /** @internal */ export const Engine$outboundSchema: z.ZodType = z.union([ @@ -1111,30 +612,6 @@ export const Engine$outboundSchema: z.ZodType = z.union([ z.string().and(z.custom>()), ]); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Engine$ { - /** @deprecated use `Engine$inboundSchema` instead. */ - export const inboundSchema = Engine$inboundSchema; - /** @deprecated use `Engine$outboundSchema` instead. */ - export const outboundSchema = Engine$outboundSchema; -} - -/** @internal */ -export const PluginWeb$inboundSchema: z.ZodType = z.object({ - id: IdWeb$inboundSchema, - max_results: z.number().optional(), - search_prompt: z.string().optional(), - engine: Engine$inboundSchema.optional(), -}).transform((v) => { - return remap$(v, { - "max_results": "maxResults", - "search_prompt": "searchPrompt", - }); -}); - /** @internal */ export type PluginWeb$Outbound = { id: string; @@ -1159,60 +636,14 @@ export const PluginWeb$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PluginWeb$ { - /** @deprecated use `PluginWeb$inboundSchema` instead. */ - export const inboundSchema = PluginWeb$inboundSchema; - /** @deprecated use `PluginWeb$outboundSchema` instead. */ - export const outboundSchema = PluginWeb$outboundSchema; - /** @deprecated use `PluginWeb$Outbound` instead. */ - export type Outbound = PluginWeb$Outbound; -} - export function pluginWebToJSON(pluginWeb: PluginWeb): string { return JSON.stringify(PluginWeb$outboundSchema.parse(pluginWeb)); } -export function pluginWebFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PluginWeb$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PluginWeb' from JSON`, - ); -} - /** @internal */ -export const IdModeration$inboundSchema: z.ZodEnum = z +export const IdModeration$outboundSchema: z.ZodEnum = z .enum(IdModeration); -/** @internal */ -export const IdModeration$outboundSchema: z.ZodEnum = - IdModeration$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace IdModeration$ { - /** @deprecated use `IdModeration$inboundSchema` instead. */ - export const inboundSchema = IdModeration$inboundSchema; - /** @deprecated use `IdModeration$outboundSchema` instead. */ - export const outboundSchema = IdModeration$outboundSchema; -} - -/** @internal */ -export const PluginModeration$inboundSchema: z.ZodType< - PluginModeration, - unknown -> = z.object({ - id: IdModeration$inboundSchema, -}); - /** @internal */ export type PluginModeration$Outbound = { id: string; @@ -1226,19 +657,6 @@ export const PluginModeration$outboundSchema: z.ZodType< id: IdModeration$outboundSchema, }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PluginModeration$ { - /** @deprecated use `PluginModeration$inboundSchema` instead. */ - export const inboundSchema = PluginModeration$inboundSchema; - /** @deprecated use `PluginModeration$outboundSchema` instead. */ - export const outboundSchema = PluginModeration$outboundSchema; - /** @deprecated use `PluginModeration$Outbound` instead. */ - export type Outbound = PluginModeration$Outbound; -} - export function pluginModerationToJSON( pluginModeration: PluginModeration, ): string { @@ -1247,23 +665,6 @@ export function pluginModerationToJSON( ); } -export function pluginModerationFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => PluginModeration$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'PluginModeration' from JSON`, - ); -} - -/** @internal */ -export const Plugin$inboundSchema: z.ZodType = z.union([ - z.lazy(() => PluginModeration$inboundSchema), - z.lazy(() => PluginWeb$inboundSchema), - z.lazy(() => PluginFileParser$inboundSchema), -]); - /** @internal */ export type Plugin$Outbound = | PluginModeration$Outbound @@ -1278,94 +679,10 @@ export const Plugin$outboundSchema: z.ZodType = z z.lazy(() => PluginFileParser$outboundSchema), ]); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Plugin$ { - /** @deprecated use `Plugin$inboundSchema` instead. */ - export const inboundSchema = Plugin$inboundSchema; - /** @deprecated use `Plugin$outboundSchema` instead. */ - export const outboundSchema = Plugin$outboundSchema; - /** @deprecated use `Plugin$Outbound` instead. */ - export type Outbound = Plugin$Outbound; -} - export function pluginToJSON(plugin: Plugin): string { return JSON.stringify(Plugin$outboundSchema.parse(plugin)); } -export function pluginFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Plugin$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Plugin' from JSON`, - ); -} - -/** @internal */ -export const OpenResponsesRequest$inboundSchema: z.ZodType< - OpenResponsesRequest, - unknown -> = z.object({ - input: OpenResponsesInput$inboundSchema.optional(), - instructions: z.nullable(z.string()).optional(), - metadata: z.nullable(z.record(z.string(), z.string())).optional(), - tools: z.array( - z.union([ - z.lazy(() => OpenResponsesRequestToolFunction$inboundSchema), - OpenResponsesWebSearchPreviewTool$inboundSchema, - OpenResponsesWebSearchPreview20250311Tool$inboundSchema, - OpenResponsesWebSearchTool$inboundSchema, - OpenResponsesWebSearch20250826Tool$inboundSchema, - ]), - ).optional(), - tool_choice: OpenAIResponsesToolChoiceUnion$inboundSchema.optional(), - parallel_tool_calls: z.nullable(z.boolean()).optional(), - model: z.string().optional(), - models: z.array(z.string()).optional(), - text: OpenResponsesResponseText$inboundSchema.optional(), - reasoning: z.nullable(OpenResponsesReasoningConfig$inboundSchema).optional(), - max_output_tokens: z.nullable(z.number()).optional(), - temperature: z.nullable(z.number()).optional(), - top_p: z.nullable(z.number()).optional(), - top_k: z.number().optional(), - prompt_cache_key: z.nullable(z.string()).optional(), - previous_response_id: z.nullable(z.string()).optional(), - prompt: z.nullable(OpenAIResponsesPrompt$inboundSchema).optional(), - include: z.nullable(z.array(OpenAIResponsesIncludable$inboundSchema)) - .optional(), - background: z.nullable(z.boolean()).optional(), - safety_identifier: z.nullable(z.string()).optional(), - store: z.nullable(z.boolean()).optional(), - service_tier: z.nullable(ServiceTier$inboundSchema).optional(), - truncation: z.nullable(Truncation$inboundSchema).optional(), - stream: z.boolean().default(false), - provider: z.nullable(z.lazy(() => Provider$inboundSchema)).optional(), - plugins: z.array( - z.union([ - z.lazy(() => PluginModeration$inboundSchema), - z.lazy(() => PluginWeb$inboundSchema), - z.lazy(() => PluginFileParser$inboundSchema), - ]), - ).optional(), - user: z.string().optional(), -}).transform((v) => { - return remap$(v, { - "tool_choice": "toolChoice", - "parallel_tool_calls": "parallelToolCalls", - "max_output_tokens": "maxOutputTokens", - "top_p": "topP", - "top_k": "topK", - "prompt_cache_key": "promptCacheKey", - "previous_response_id": "previousResponseId", - "safety_identifier": "safetyIdentifier", - "service_tier": "serviceTier", - }); -}); - /** @internal */ export type OpenResponsesRequest$Outbound = { input?: OpenResponsesInput$Outbound | undefined; @@ -1470,19 +787,6 @@ export const OpenResponsesRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesRequest$ { - /** @deprecated use `OpenResponsesRequest$inboundSchema` instead. */ - export const inboundSchema = OpenResponsesRequest$inboundSchema; - /** @deprecated use `OpenResponsesRequest$outboundSchema` instead. */ - export const outboundSchema = OpenResponsesRequest$outboundSchema; - /** @deprecated use `OpenResponsesRequest$Outbound` instead. */ - export type Outbound = OpenResponsesRequest$Outbound; -} - export function openResponsesRequestToJSON( openResponsesRequest: OpenResponsesRequest, ): string { @@ -1490,13 +794,3 @@ export function openResponsesRequestToJSON( OpenResponsesRequest$outboundSchema.parse(openResponsesRequest), ); } - -export function openResponsesRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => OpenResponsesRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'OpenResponsesRequest' from JSON`, - ); -} diff --git a/src/models/openresponsesresponsetext.ts b/src/models/openresponsesresponsetext.ts index 24ef895a..4c00c96b 100644 --- a/src/models/openresponsesresponsetext.ts +++ b/src/models/openresponsesresponsetext.ts @@ -3,17 +3,9 @@ */ import * as z from "zod/v4"; -import { safeParse } from "../lib/schemas.js"; -import { - catchUnrecognizedEnum, - OpenEnum, - Unrecognized, -} from "../types/enums.js"; -import { Result as SafeParseResult } from "../types/fp.js"; -import { SDKValidationError } from "./errors/sdkvalidationerror.js"; +import { OpenEnum, Unrecognized } from "../types/enums.js"; import { ResponseFormatTextConfig, - ResponseFormatTextConfig$inboundSchema, ResponseFormatTextConfig$Outbound, ResponseFormatTextConfig$outboundSchema, } from "./responseformattextconfig.js"; @@ -38,16 +30,6 @@ export type OpenResponsesResponseText = { verbosity?: OpenResponsesResponseTextVerbosity | null | undefined; }; -/** @internal */ -export const OpenResponsesResponseTextVerbosity$inboundSchema: z.ZodType< - OpenResponsesResponseTextVerbosity, - unknown -> = z - .union([ - z.enum(OpenResponsesResponseTextVerbosity), - z.string().transform(catchUnrecognizedEnum), - ]); - /** @internal */ export const OpenResponsesResponseTextVerbosity$outboundSchema: z.ZodType< OpenResponsesResponseTextVerbosity, @@ -57,28 +39,6 @@ export const OpenResponsesResponseTextVerbosity$outboundSchema: z.ZodType< z.string().and(z.custom>()), ]); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesResponseTextVerbosity$ { - /** @deprecated use `OpenResponsesResponseTextVerbosity$inboundSchema` instead. */ - export const inboundSchema = OpenResponsesResponseTextVerbosity$inboundSchema; - /** @deprecated use `OpenResponsesResponseTextVerbosity$outboundSchema` instead. */ - export const outboundSchema = - OpenResponsesResponseTextVerbosity$outboundSchema; -} - -/** @internal */ -export const OpenResponsesResponseText$inboundSchema: z.ZodType< - OpenResponsesResponseText, - unknown -> = z.object({ - format: ResponseFormatTextConfig$inboundSchema.optional(), - verbosity: z.nullable(OpenResponsesResponseTextVerbosity$inboundSchema) - .optional(), -}); - /** @internal */ export type OpenResponsesResponseText$Outbound = { format?: ResponseFormatTextConfig$Outbound | undefined; @@ -95,19 +55,6 @@ export const OpenResponsesResponseText$outboundSchema: z.ZodType< .optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesResponseText$ { - /** @deprecated use `OpenResponsesResponseText$inboundSchema` instead. */ - export const inboundSchema = OpenResponsesResponseText$inboundSchema; - /** @deprecated use `OpenResponsesResponseText$outboundSchema` instead. */ - export const outboundSchema = OpenResponsesResponseText$outboundSchema; - /** @deprecated use `OpenResponsesResponseText$Outbound` instead. */ - export type Outbound = OpenResponsesResponseText$Outbound; -} - export function openResponsesResponseTextToJSON( openResponsesResponseText: OpenResponsesResponseText, ): string { @@ -115,13 +62,3 @@ export function openResponsesResponseTextToJSON( OpenResponsesResponseText$outboundSchema.parse(openResponsesResponseText), ); } - -export function openResponsesResponseTextFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => OpenResponsesResponseText$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'OpenResponsesResponseText' from JSON`, - ); -} diff --git a/src/models/openresponsesstreamevent.ts b/src/models/openresponsesstreamevent.ts index 00b590ef..4de1d671 100644 --- a/src/models/openresponsesstreamevent.ts +++ b/src/models/openresponsesstreamevent.ts @@ -11,110 +11,74 @@ import { SDKValidationError } from "./errors/sdkvalidationerror.js"; import { OpenAIResponsesAnnotation, OpenAIResponsesAnnotation$inboundSchema, - OpenAIResponsesAnnotation$Outbound, - OpenAIResponsesAnnotation$outboundSchema, } from "./openairesponsesannotation.js"; import { OpenAIResponsesRefusalContent, OpenAIResponsesRefusalContent$inboundSchema, - OpenAIResponsesRefusalContent$Outbound, - OpenAIResponsesRefusalContent$outboundSchema, } from "./openairesponsesrefusalcontent.js"; import { OpenResponsesErrorEvent, OpenResponsesErrorEvent$inboundSchema, - OpenResponsesErrorEvent$Outbound, - OpenResponsesErrorEvent$outboundSchema, } from "./openresponseserrorevent.js"; import { OpenResponsesImageGenCallCompleted, OpenResponsesImageGenCallCompleted$inboundSchema, - OpenResponsesImageGenCallCompleted$Outbound, - OpenResponsesImageGenCallCompleted$outboundSchema, } from "./openresponsesimagegencallcompleted.js"; import { OpenResponsesImageGenCallGenerating, OpenResponsesImageGenCallGenerating$inboundSchema, - OpenResponsesImageGenCallGenerating$Outbound, - OpenResponsesImageGenCallGenerating$outboundSchema, } from "./openresponsesimagegencallgenerating.js"; import { OpenResponsesImageGenCallInProgress, OpenResponsesImageGenCallInProgress$inboundSchema, - OpenResponsesImageGenCallInProgress$Outbound, - OpenResponsesImageGenCallInProgress$outboundSchema, } from "./openresponsesimagegencallinprogress.js"; import { OpenResponsesImageGenCallPartialImage, OpenResponsesImageGenCallPartialImage$inboundSchema, - OpenResponsesImageGenCallPartialImage$Outbound, - OpenResponsesImageGenCallPartialImage$outboundSchema, } from "./openresponsesimagegencallpartialimage.js"; import { OpenResponsesLogProbs, OpenResponsesLogProbs$inboundSchema, - OpenResponsesLogProbs$Outbound, - OpenResponsesLogProbs$outboundSchema, } from "./openresponseslogprobs.js"; import { OpenResponsesNonStreamingResponse, OpenResponsesNonStreamingResponse$inboundSchema, - OpenResponsesNonStreamingResponse$Outbound, - OpenResponsesNonStreamingResponse$outboundSchema, } from "./openresponsesnonstreamingresponse.js"; import { OpenResponsesReasoningDeltaEvent, OpenResponsesReasoningDeltaEvent$inboundSchema, - OpenResponsesReasoningDeltaEvent$Outbound, - OpenResponsesReasoningDeltaEvent$outboundSchema, } from "./openresponsesreasoningdeltaevent.js"; import { OpenResponsesReasoningDoneEvent, OpenResponsesReasoningDoneEvent$inboundSchema, - OpenResponsesReasoningDoneEvent$Outbound, - OpenResponsesReasoningDoneEvent$outboundSchema, } from "./openresponsesreasoningdoneevent.js"; import { OpenResponsesReasoningSummaryPartAddedEvent, OpenResponsesReasoningSummaryPartAddedEvent$inboundSchema, - OpenResponsesReasoningSummaryPartAddedEvent$Outbound, - OpenResponsesReasoningSummaryPartAddedEvent$outboundSchema, } from "./openresponsesreasoningsummarypartaddedevent.js"; import { OpenResponsesReasoningSummaryTextDeltaEvent, OpenResponsesReasoningSummaryTextDeltaEvent$inboundSchema, - OpenResponsesReasoningSummaryTextDeltaEvent$Outbound, - OpenResponsesReasoningSummaryTextDeltaEvent$outboundSchema, } from "./openresponsesreasoningsummarytextdeltaevent.js"; import { OpenResponsesReasoningSummaryTextDoneEvent, OpenResponsesReasoningSummaryTextDoneEvent$inboundSchema, - OpenResponsesReasoningSummaryTextDoneEvent$Outbound, - OpenResponsesReasoningSummaryTextDoneEvent$outboundSchema, } from "./openresponsesreasoningsummarytextdoneevent.js"; import { ReasoningSummaryText, ReasoningSummaryText$inboundSchema, - ReasoningSummaryText$Outbound, - ReasoningSummaryText$outboundSchema, } from "./reasoningsummarytext.js"; import { ReasoningTextContent, ReasoningTextContent$inboundSchema, - ReasoningTextContent$Outbound, - ReasoningTextContent$outboundSchema, } from "./reasoningtextcontent.js"; import { ResponseOutputText, ResponseOutputText$inboundSchema, - ResponseOutputText$Outbound, - ResponseOutputText$outboundSchema, } from "./responseoutputtext.js"; import { ResponsesOutputItem, ResponsesOutputItem$inboundSchema, - ResponsesOutputItem$Outbound, - ResponsesOutputItem$outboundSchema, } from "./responsesoutputitem.js"; export const TypeResponseReasoningSummaryPartDone = { @@ -487,24 +451,6 @@ export const TypeResponseReasoningSummaryPartDone$inboundSchema: z.ZodEnum< typeof TypeResponseReasoningSummaryPartDone > = z.enum(TypeResponseReasoningSummaryPartDone); -/** @internal */ -export const TypeResponseReasoningSummaryPartDone$outboundSchema: z.ZodEnum< - typeof TypeResponseReasoningSummaryPartDone -> = TypeResponseReasoningSummaryPartDone$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace TypeResponseReasoningSummaryPartDone$ { - /** @deprecated use `TypeResponseReasoningSummaryPartDone$inboundSchema` instead. */ - export const inboundSchema = - TypeResponseReasoningSummaryPartDone$inboundSchema; - /** @deprecated use `TypeResponseReasoningSummaryPartDone$outboundSchema` instead. */ - export const outboundSchema = - TypeResponseReasoningSummaryPartDone$outboundSchema; -} - /** @internal */ export const OpenResponsesStreamEventResponseReasoningSummaryPartDone$inboundSchema: z.ZodType = @@ -524,64 +470,6 @@ export const OpenResponsesStreamEventResponseReasoningSummaryPartDone$inboundSch }); }); -/** @internal */ -export type OpenResponsesStreamEventResponseReasoningSummaryPartDone$Outbound = - { - type: string; - output_index: number; - item_id: string; - summary_index: number; - part: ReasoningSummaryText$Outbound; - sequence_number: number; - }; - -/** @internal */ -export const OpenResponsesStreamEventResponseReasoningSummaryPartDone$outboundSchema: - z.ZodType< - OpenResponsesStreamEventResponseReasoningSummaryPartDone$Outbound, - OpenResponsesStreamEventResponseReasoningSummaryPartDone - > = z.object({ - type: TypeResponseReasoningSummaryPartDone$outboundSchema, - outputIndex: z.number(), - itemId: z.string(), - summaryIndex: z.number(), - part: ReasoningSummaryText$outboundSchema, - sequenceNumber: z.number(), - }).transform((v) => { - return remap$(v, { - outputIndex: "output_index", - itemId: "item_id", - summaryIndex: "summary_index", - sequenceNumber: "sequence_number", - }); - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesStreamEventResponseReasoningSummaryPartDone$ { - /** @deprecated use `OpenResponsesStreamEventResponseReasoningSummaryPartDone$inboundSchema` instead. */ - export const inboundSchema = - OpenResponsesStreamEventResponseReasoningSummaryPartDone$inboundSchema; - /** @deprecated use `OpenResponsesStreamEventResponseReasoningSummaryPartDone$outboundSchema` instead. */ - export const outboundSchema = - OpenResponsesStreamEventResponseReasoningSummaryPartDone$outboundSchema; - /** @deprecated use `OpenResponsesStreamEventResponseReasoningSummaryPartDone$Outbound` instead. */ - export type Outbound = - OpenResponsesStreamEventResponseReasoningSummaryPartDone$Outbound; -} - -export function openResponsesStreamEventResponseReasoningSummaryPartDoneToJSON( - openResponsesStreamEventResponseReasoningSummaryPartDone: - OpenResponsesStreamEventResponseReasoningSummaryPartDone, -): string { - return JSON.stringify( - OpenResponsesStreamEventResponseReasoningSummaryPartDone$outboundSchema - .parse(openResponsesStreamEventResponseReasoningSummaryPartDone), - ); -} - export function openResponsesStreamEventResponseReasoningSummaryPartDoneFromJSON( jsonString: string, ): SafeParseResult< @@ -602,24 +490,6 @@ export const TypeResponseFunctionCallArgumentsDone$inboundSchema: z.ZodEnum< typeof TypeResponseFunctionCallArgumentsDone > = z.enum(TypeResponseFunctionCallArgumentsDone); -/** @internal */ -export const TypeResponseFunctionCallArgumentsDone$outboundSchema: z.ZodEnum< - typeof TypeResponseFunctionCallArgumentsDone -> = TypeResponseFunctionCallArgumentsDone$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace TypeResponseFunctionCallArgumentsDone$ { - /** @deprecated use `TypeResponseFunctionCallArgumentsDone$inboundSchema` instead. */ - export const inboundSchema = - TypeResponseFunctionCallArgumentsDone$inboundSchema; - /** @deprecated use `TypeResponseFunctionCallArgumentsDone$outboundSchema` instead. */ - export const outboundSchema = - TypeResponseFunctionCallArgumentsDone$outboundSchema; -} - /** @internal */ export const OpenResponsesStreamEventResponseFunctionCallArgumentsDone$inboundSchema: z.ZodType< @@ -640,63 +510,6 @@ export const OpenResponsesStreamEventResponseFunctionCallArgumentsDone$inboundSc }); }); -/** @internal */ -export type OpenResponsesStreamEventResponseFunctionCallArgumentsDone$Outbound = - { - type: string; - item_id: string; - output_index: number; - name: string; - arguments: string; - sequence_number: number; - }; - -/** @internal */ -export const OpenResponsesStreamEventResponseFunctionCallArgumentsDone$outboundSchema: - z.ZodType< - OpenResponsesStreamEventResponseFunctionCallArgumentsDone$Outbound, - OpenResponsesStreamEventResponseFunctionCallArgumentsDone - > = z.object({ - type: TypeResponseFunctionCallArgumentsDone$outboundSchema, - itemId: z.string(), - outputIndex: z.number(), - name: z.string(), - arguments: z.string(), - sequenceNumber: z.number(), - }).transform((v) => { - return remap$(v, { - itemId: "item_id", - outputIndex: "output_index", - sequenceNumber: "sequence_number", - }); - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesStreamEventResponseFunctionCallArgumentsDone$ { - /** @deprecated use `OpenResponsesStreamEventResponseFunctionCallArgumentsDone$inboundSchema` instead. */ - export const inboundSchema = - OpenResponsesStreamEventResponseFunctionCallArgumentsDone$inboundSchema; - /** @deprecated use `OpenResponsesStreamEventResponseFunctionCallArgumentsDone$outboundSchema` instead. */ - export const outboundSchema = - OpenResponsesStreamEventResponseFunctionCallArgumentsDone$outboundSchema; - /** @deprecated use `OpenResponsesStreamEventResponseFunctionCallArgumentsDone$Outbound` instead. */ - export type Outbound = - OpenResponsesStreamEventResponseFunctionCallArgumentsDone$Outbound; -} - -export function openResponsesStreamEventResponseFunctionCallArgumentsDoneToJSON( - openResponsesStreamEventResponseFunctionCallArgumentsDone: - OpenResponsesStreamEventResponseFunctionCallArgumentsDone, -): string { - return JSON.stringify( - OpenResponsesStreamEventResponseFunctionCallArgumentsDone$outboundSchema - .parse(openResponsesStreamEventResponseFunctionCallArgumentsDone), - ); -} - export function openResponsesStreamEventResponseFunctionCallArgumentsDoneFromJSON( jsonString: string, ): SafeParseResult< @@ -717,24 +530,6 @@ export const TypeResponseFunctionCallArgumentsDelta$inboundSchema: z.ZodEnum< typeof TypeResponseFunctionCallArgumentsDelta > = z.enum(TypeResponseFunctionCallArgumentsDelta); -/** @internal */ -export const TypeResponseFunctionCallArgumentsDelta$outboundSchema: z.ZodEnum< - typeof TypeResponseFunctionCallArgumentsDelta -> = TypeResponseFunctionCallArgumentsDelta$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace TypeResponseFunctionCallArgumentsDelta$ { - /** @deprecated use `TypeResponseFunctionCallArgumentsDelta$inboundSchema` instead. */ - export const inboundSchema = - TypeResponseFunctionCallArgumentsDelta$inboundSchema; - /** @deprecated use `TypeResponseFunctionCallArgumentsDelta$outboundSchema` instead. */ - export const outboundSchema = - TypeResponseFunctionCallArgumentsDelta$outboundSchema; -} - /** @internal */ export const OpenResponsesStreamEventResponseFunctionCallArgumentsDelta$inboundSchema: z.ZodType< @@ -754,61 +549,6 @@ export const OpenResponsesStreamEventResponseFunctionCallArgumentsDelta$inboundS }); }); -/** @internal */ -export type OpenResponsesStreamEventResponseFunctionCallArgumentsDelta$Outbound = - { - type: string; - item_id: string; - output_index: number; - delta: string; - sequence_number: number; - }; - -/** @internal */ -export const OpenResponsesStreamEventResponseFunctionCallArgumentsDelta$outboundSchema: - z.ZodType< - OpenResponsesStreamEventResponseFunctionCallArgumentsDelta$Outbound, - OpenResponsesStreamEventResponseFunctionCallArgumentsDelta - > = z.object({ - type: TypeResponseFunctionCallArgumentsDelta$outboundSchema, - itemId: z.string(), - outputIndex: z.number(), - delta: z.string(), - sequenceNumber: z.number(), - }).transform((v) => { - return remap$(v, { - itemId: "item_id", - outputIndex: "output_index", - sequenceNumber: "sequence_number", - }); - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesStreamEventResponseFunctionCallArgumentsDelta$ { - /** @deprecated use `OpenResponsesStreamEventResponseFunctionCallArgumentsDelta$inboundSchema` instead. */ - export const inboundSchema = - OpenResponsesStreamEventResponseFunctionCallArgumentsDelta$inboundSchema; - /** @deprecated use `OpenResponsesStreamEventResponseFunctionCallArgumentsDelta$outboundSchema` instead. */ - export const outboundSchema = - OpenResponsesStreamEventResponseFunctionCallArgumentsDelta$outboundSchema; - /** @deprecated use `OpenResponsesStreamEventResponseFunctionCallArgumentsDelta$Outbound` instead. */ - export type Outbound = - OpenResponsesStreamEventResponseFunctionCallArgumentsDelta$Outbound; -} - -export function openResponsesStreamEventResponseFunctionCallArgumentsDeltaToJSON( - openResponsesStreamEventResponseFunctionCallArgumentsDelta: - OpenResponsesStreamEventResponseFunctionCallArgumentsDelta, -): string { - return JSON.stringify( - OpenResponsesStreamEventResponseFunctionCallArgumentsDelta$outboundSchema - .parse(openResponsesStreamEventResponseFunctionCallArgumentsDelta), - ); -} - export function openResponsesStreamEventResponseFunctionCallArgumentsDeltaFromJSON( jsonString: string, ): SafeParseResult< @@ -829,24 +569,6 @@ export const TypeResponseOutputTextAnnotationAdded$inboundSchema: z.ZodEnum< typeof TypeResponseOutputTextAnnotationAdded > = z.enum(TypeResponseOutputTextAnnotationAdded); -/** @internal */ -export const TypeResponseOutputTextAnnotationAdded$outboundSchema: z.ZodEnum< - typeof TypeResponseOutputTextAnnotationAdded -> = TypeResponseOutputTextAnnotationAdded$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace TypeResponseOutputTextAnnotationAdded$ { - /** @deprecated use `TypeResponseOutputTextAnnotationAdded$inboundSchema` instead. */ - export const inboundSchema = - TypeResponseOutputTextAnnotationAdded$inboundSchema; - /** @deprecated use `TypeResponseOutputTextAnnotationAdded$outboundSchema` instead. */ - export const outboundSchema = - TypeResponseOutputTextAnnotationAdded$outboundSchema; -} - /** @internal */ export const OpenResponsesStreamEventResponseOutputTextAnnotationAdded$inboundSchema: z.ZodType< @@ -870,67 +592,6 @@ export const OpenResponsesStreamEventResponseOutputTextAnnotationAdded$inboundSc }); }); -/** @internal */ -export type OpenResponsesStreamEventResponseOutputTextAnnotationAdded$Outbound = - { - type: string; - output_index: number; - item_id: string; - content_index: number; - sequence_number: number; - annotation_index: number; - annotation: OpenAIResponsesAnnotation$Outbound; - }; - -/** @internal */ -export const OpenResponsesStreamEventResponseOutputTextAnnotationAdded$outboundSchema: - z.ZodType< - OpenResponsesStreamEventResponseOutputTextAnnotationAdded$Outbound, - OpenResponsesStreamEventResponseOutputTextAnnotationAdded - > = z.object({ - type: TypeResponseOutputTextAnnotationAdded$outboundSchema, - outputIndex: z.number(), - itemId: z.string(), - contentIndex: z.number(), - sequenceNumber: z.number(), - annotationIndex: z.number(), - annotation: OpenAIResponsesAnnotation$outboundSchema, - }).transform((v) => { - return remap$(v, { - outputIndex: "output_index", - itemId: "item_id", - contentIndex: "content_index", - sequenceNumber: "sequence_number", - annotationIndex: "annotation_index", - }); - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesStreamEventResponseOutputTextAnnotationAdded$ { - /** @deprecated use `OpenResponsesStreamEventResponseOutputTextAnnotationAdded$inboundSchema` instead. */ - export const inboundSchema = - OpenResponsesStreamEventResponseOutputTextAnnotationAdded$inboundSchema; - /** @deprecated use `OpenResponsesStreamEventResponseOutputTextAnnotationAdded$outboundSchema` instead. */ - export const outboundSchema = - OpenResponsesStreamEventResponseOutputTextAnnotationAdded$outboundSchema; - /** @deprecated use `OpenResponsesStreamEventResponseOutputTextAnnotationAdded$Outbound` instead. */ - export type Outbound = - OpenResponsesStreamEventResponseOutputTextAnnotationAdded$Outbound; -} - -export function openResponsesStreamEventResponseOutputTextAnnotationAddedToJSON( - openResponsesStreamEventResponseOutputTextAnnotationAdded: - OpenResponsesStreamEventResponseOutputTextAnnotationAdded, -): string { - return JSON.stringify( - OpenResponsesStreamEventResponseOutputTextAnnotationAdded$outboundSchema - .parse(openResponsesStreamEventResponseOutputTextAnnotationAdded), - ); -} - export function openResponsesStreamEventResponseOutputTextAnnotationAddedFromJSON( jsonString: string, ): SafeParseResult< @@ -951,22 +612,6 @@ export const TypeResponseRefusalDone$inboundSchema: z.ZodEnum< typeof TypeResponseRefusalDone > = z.enum(TypeResponseRefusalDone); -/** @internal */ -export const TypeResponseRefusalDone$outboundSchema: z.ZodEnum< - typeof TypeResponseRefusalDone -> = TypeResponseRefusalDone$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace TypeResponseRefusalDone$ { - /** @deprecated use `TypeResponseRefusalDone$inboundSchema` instead. */ - export const inboundSchema = TypeResponseRefusalDone$inboundSchema; - /** @deprecated use `TypeResponseRefusalDone$outboundSchema` instead. */ - export const outboundSchema = TypeResponseRefusalDone$outboundSchema; -} - /** @internal */ export const OpenResponsesStreamEventResponseRefusalDone$inboundSchema: z.ZodType = z.object({ @@ -985,63 +630,6 @@ export const OpenResponsesStreamEventResponseRefusalDone$inboundSchema: }); }); -/** @internal */ -export type OpenResponsesStreamEventResponseRefusalDone$Outbound = { - type: string; - output_index: number; - item_id: string; - content_index: number; - refusal: string; - sequence_number: number; -}; - -/** @internal */ -export const OpenResponsesStreamEventResponseRefusalDone$outboundSchema: - z.ZodType< - OpenResponsesStreamEventResponseRefusalDone$Outbound, - OpenResponsesStreamEventResponseRefusalDone - > = z.object({ - type: TypeResponseRefusalDone$outboundSchema, - outputIndex: z.number(), - itemId: z.string(), - contentIndex: z.number(), - refusal: z.string(), - sequenceNumber: z.number(), - }).transform((v) => { - return remap$(v, { - outputIndex: "output_index", - itemId: "item_id", - contentIndex: "content_index", - sequenceNumber: "sequence_number", - }); - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesStreamEventResponseRefusalDone$ { - /** @deprecated use `OpenResponsesStreamEventResponseRefusalDone$inboundSchema` instead. */ - export const inboundSchema = - OpenResponsesStreamEventResponseRefusalDone$inboundSchema; - /** @deprecated use `OpenResponsesStreamEventResponseRefusalDone$outboundSchema` instead. */ - export const outboundSchema = - OpenResponsesStreamEventResponseRefusalDone$outboundSchema; - /** @deprecated use `OpenResponsesStreamEventResponseRefusalDone$Outbound` instead. */ - export type Outbound = OpenResponsesStreamEventResponseRefusalDone$Outbound; -} - -export function openResponsesStreamEventResponseRefusalDoneToJSON( - openResponsesStreamEventResponseRefusalDone: - OpenResponsesStreamEventResponseRefusalDone, -): string { - return JSON.stringify( - OpenResponsesStreamEventResponseRefusalDone$outboundSchema.parse( - openResponsesStreamEventResponseRefusalDone, - ), - ); -} - export function openResponsesStreamEventResponseRefusalDoneFromJSON( jsonString: string, ): SafeParseResult< @@ -1063,22 +651,6 @@ export const TypeResponseRefusalDelta$inboundSchema: z.ZodEnum< typeof TypeResponseRefusalDelta > = z.enum(TypeResponseRefusalDelta); -/** @internal */ -export const TypeResponseRefusalDelta$outboundSchema: z.ZodEnum< - typeof TypeResponseRefusalDelta -> = TypeResponseRefusalDelta$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace TypeResponseRefusalDelta$ { - /** @deprecated use `TypeResponseRefusalDelta$inboundSchema` instead. */ - export const inboundSchema = TypeResponseRefusalDelta$inboundSchema; - /** @deprecated use `TypeResponseRefusalDelta$outboundSchema` instead. */ - export const outboundSchema = TypeResponseRefusalDelta$outboundSchema; -} - /** @internal */ export const OpenResponsesStreamEventResponseRefusalDelta$inboundSchema: z.ZodType = z.object({ @@ -1097,63 +669,6 @@ export const OpenResponsesStreamEventResponseRefusalDelta$inboundSchema: }); }); -/** @internal */ -export type OpenResponsesStreamEventResponseRefusalDelta$Outbound = { - type: string; - output_index: number; - item_id: string; - content_index: number; - delta: string; - sequence_number: number; -}; - -/** @internal */ -export const OpenResponsesStreamEventResponseRefusalDelta$outboundSchema: - z.ZodType< - OpenResponsesStreamEventResponseRefusalDelta$Outbound, - OpenResponsesStreamEventResponseRefusalDelta - > = z.object({ - type: TypeResponseRefusalDelta$outboundSchema, - outputIndex: z.number(), - itemId: z.string(), - contentIndex: z.number(), - delta: z.string(), - sequenceNumber: z.number(), - }).transform((v) => { - return remap$(v, { - outputIndex: "output_index", - itemId: "item_id", - contentIndex: "content_index", - sequenceNumber: "sequence_number", - }); - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesStreamEventResponseRefusalDelta$ { - /** @deprecated use `OpenResponsesStreamEventResponseRefusalDelta$inboundSchema` instead. */ - export const inboundSchema = - OpenResponsesStreamEventResponseRefusalDelta$inboundSchema; - /** @deprecated use `OpenResponsesStreamEventResponseRefusalDelta$outboundSchema` instead. */ - export const outboundSchema = - OpenResponsesStreamEventResponseRefusalDelta$outboundSchema; - /** @deprecated use `OpenResponsesStreamEventResponseRefusalDelta$Outbound` instead. */ - export type Outbound = OpenResponsesStreamEventResponseRefusalDelta$Outbound; -} - -export function openResponsesStreamEventResponseRefusalDeltaToJSON( - openResponsesStreamEventResponseRefusalDelta: - OpenResponsesStreamEventResponseRefusalDelta, -): string { - return JSON.stringify( - OpenResponsesStreamEventResponseRefusalDelta$outboundSchema.parse( - openResponsesStreamEventResponseRefusalDelta, - ), - ); -} - export function openResponsesStreamEventResponseRefusalDeltaFromJSON( jsonString: string, ): SafeParseResult< @@ -1175,22 +690,6 @@ export const TypeResponseOutputTextDone$inboundSchema: z.ZodEnum< typeof TypeResponseOutputTextDone > = z.enum(TypeResponseOutputTextDone); -/** @internal */ -export const TypeResponseOutputTextDone$outboundSchema: z.ZodEnum< - typeof TypeResponseOutputTextDone -> = TypeResponseOutputTextDone$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace TypeResponseOutputTextDone$ { - /** @deprecated use `TypeResponseOutputTextDone$inboundSchema` instead. */ - export const inboundSchema = TypeResponseOutputTextDone$inboundSchema; - /** @deprecated use `TypeResponseOutputTextDone$outboundSchema` instead. */ - export const outboundSchema = TypeResponseOutputTextDone$outboundSchema; -} - /** @internal */ export const OpenResponsesStreamEventResponseOutputTextDone$inboundSchema: z.ZodType = z.object( @@ -1212,66 +711,6 @@ export const OpenResponsesStreamEventResponseOutputTextDone$inboundSchema: }); }); -/** @internal */ -export type OpenResponsesStreamEventResponseOutputTextDone$Outbound = { - type: string; - output_index: number; - item_id: string; - content_index: number; - text: string; - sequence_number: number; - logprobs: Array; -}; - -/** @internal */ -export const OpenResponsesStreamEventResponseOutputTextDone$outboundSchema: - z.ZodType< - OpenResponsesStreamEventResponseOutputTextDone$Outbound, - OpenResponsesStreamEventResponseOutputTextDone - > = z.object({ - type: TypeResponseOutputTextDone$outboundSchema, - outputIndex: z.number(), - itemId: z.string(), - contentIndex: z.number(), - text: z.string(), - sequenceNumber: z.number(), - logprobs: z.array(OpenResponsesLogProbs$outboundSchema), - }).transform((v) => { - return remap$(v, { - outputIndex: "output_index", - itemId: "item_id", - contentIndex: "content_index", - sequenceNumber: "sequence_number", - }); - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesStreamEventResponseOutputTextDone$ { - /** @deprecated use `OpenResponsesStreamEventResponseOutputTextDone$inboundSchema` instead. */ - export const inboundSchema = - OpenResponsesStreamEventResponseOutputTextDone$inboundSchema; - /** @deprecated use `OpenResponsesStreamEventResponseOutputTextDone$outboundSchema` instead. */ - export const outboundSchema = - OpenResponsesStreamEventResponseOutputTextDone$outboundSchema; - /** @deprecated use `OpenResponsesStreamEventResponseOutputTextDone$Outbound` instead. */ - export type Outbound = - OpenResponsesStreamEventResponseOutputTextDone$Outbound; -} - -export function openResponsesStreamEventResponseOutputTextDoneToJSON( - openResponsesStreamEventResponseOutputTextDone: - OpenResponsesStreamEventResponseOutputTextDone, -): string { - return JSON.stringify( - OpenResponsesStreamEventResponseOutputTextDone$outboundSchema.parse( - openResponsesStreamEventResponseOutputTextDone, - ), - ); -} - export function openResponsesStreamEventResponseOutputTextDoneFromJSON( jsonString: string, ): SafeParseResult< @@ -1293,22 +732,6 @@ export const TypeResponseOutputTextDelta$inboundSchema: z.ZodEnum< typeof TypeResponseOutputTextDelta > = z.enum(TypeResponseOutputTextDelta); -/** @internal */ -export const TypeResponseOutputTextDelta$outboundSchema: z.ZodEnum< - typeof TypeResponseOutputTextDelta -> = TypeResponseOutputTextDelta$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace TypeResponseOutputTextDelta$ { - /** @deprecated use `TypeResponseOutputTextDelta$inboundSchema` instead. */ - export const inboundSchema = TypeResponseOutputTextDelta$inboundSchema; - /** @deprecated use `TypeResponseOutputTextDelta$outboundSchema` instead. */ - export const outboundSchema = TypeResponseOutputTextDelta$outboundSchema; -} - /** @internal */ export const OpenResponsesStreamEventResponseOutputTextDelta$inboundSchema: z.ZodType = z @@ -1329,66 +752,6 @@ export const OpenResponsesStreamEventResponseOutputTextDelta$inboundSchema: }); }); -/** @internal */ -export type OpenResponsesStreamEventResponseOutputTextDelta$Outbound = { - type: string; - logprobs: Array; - output_index: number; - item_id: string; - content_index: number; - delta: string; - sequence_number: number; -}; - -/** @internal */ -export const OpenResponsesStreamEventResponseOutputTextDelta$outboundSchema: - z.ZodType< - OpenResponsesStreamEventResponseOutputTextDelta$Outbound, - OpenResponsesStreamEventResponseOutputTextDelta - > = z.object({ - type: TypeResponseOutputTextDelta$outboundSchema, - logprobs: z.array(OpenResponsesLogProbs$outboundSchema), - outputIndex: z.number(), - itemId: z.string(), - contentIndex: z.number(), - delta: z.string(), - sequenceNumber: z.number(), - }).transform((v) => { - return remap$(v, { - outputIndex: "output_index", - itemId: "item_id", - contentIndex: "content_index", - sequenceNumber: "sequence_number", - }); - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesStreamEventResponseOutputTextDelta$ { - /** @deprecated use `OpenResponsesStreamEventResponseOutputTextDelta$inboundSchema` instead. */ - export const inboundSchema = - OpenResponsesStreamEventResponseOutputTextDelta$inboundSchema; - /** @deprecated use `OpenResponsesStreamEventResponseOutputTextDelta$outboundSchema` instead. */ - export const outboundSchema = - OpenResponsesStreamEventResponseOutputTextDelta$outboundSchema; - /** @deprecated use `OpenResponsesStreamEventResponseOutputTextDelta$Outbound` instead. */ - export type Outbound = - OpenResponsesStreamEventResponseOutputTextDelta$Outbound; -} - -export function openResponsesStreamEventResponseOutputTextDeltaToJSON( - openResponsesStreamEventResponseOutputTextDelta: - OpenResponsesStreamEventResponseOutputTextDelta, -): string { - return JSON.stringify( - OpenResponsesStreamEventResponseOutputTextDelta$outboundSchema.parse( - openResponsesStreamEventResponseOutputTextDelta, - ), - ); -} - export function openResponsesStreamEventResponseOutputTextDeltaFromJSON( jsonString: string, ): SafeParseResult< @@ -1410,22 +773,6 @@ export const TypeResponseContentPartDone$inboundSchema: z.ZodEnum< typeof TypeResponseContentPartDone > = z.enum(TypeResponseContentPartDone); -/** @internal */ -export const TypeResponseContentPartDone$outboundSchema: z.ZodEnum< - typeof TypeResponseContentPartDone -> = TypeResponseContentPartDone$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace TypeResponseContentPartDone$ { - /** @deprecated use `TypeResponseContentPartDone$inboundSchema` instead. */ - export const inboundSchema = TypeResponseContentPartDone$inboundSchema; - /** @deprecated use `TypeResponseContentPartDone$outboundSchema` instead. */ - export const outboundSchema = TypeResponseContentPartDone$outboundSchema; -} - /** @internal */ export const Part2$inboundSchema: z.ZodType = z.union([ ResponseOutputText$inboundSchema, @@ -1433,36 +780,6 @@ export const Part2$inboundSchema: z.ZodType = z.union([ OpenAIResponsesRefusalContent$inboundSchema, ]); -/** @internal */ -export type Part2$Outbound = - | ResponseOutputText$Outbound - | ReasoningTextContent$Outbound - | OpenAIResponsesRefusalContent$Outbound; - -/** @internal */ -export const Part2$outboundSchema: z.ZodType = z.union([ - ResponseOutputText$outboundSchema, - ReasoningTextContent$outboundSchema, - OpenAIResponsesRefusalContent$outboundSchema, -]); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Part2$ { - /** @deprecated use `Part2$inboundSchema` instead. */ - export const inboundSchema = Part2$inboundSchema; - /** @deprecated use `Part2$outboundSchema` instead. */ - export const outboundSchema = Part2$outboundSchema; - /** @deprecated use `Part2$Outbound` instead. */ - export type Outbound = Part2$Outbound; -} - -export function part2ToJSON(part2: Part2): string { - return JSON.stringify(Part2$outboundSchema.parse(part2)); -} - export function part2FromJSON( jsonString: string, ): SafeParseResult { @@ -1496,71 +813,6 @@ export const OpenResponsesStreamEventResponseContentPartDone$inboundSchema: }); }); -/** @internal */ -export type OpenResponsesStreamEventResponseContentPartDone$Outbound = { - type: string; - output_index: number; - item_id: string; - content_index: number; - part: - | ResponseOutputText$Outbound - | ReasoningTextContent$Outbound - | OpenAIResponsesRefusalContent$Outbound; - sequence_number: number; -}; - -/** @internal */ -export const OpenResponsesStreamEventResponseContentPartDone$outboundSchema: - z.ZodType< - OpenResponsesStreamEventResponseContentPartDone$Outbound, - OpenResponsesStreamEventResponseContentPartDone - > = z.object({ - type: TypeResponseContentPartDone$outboundSchema, - outputIndex: z.number(), - itemId: z.string(), - contentIndex: z.number(), - part: z.union([ - ResponseOutputText$outboundSchema, - ReasoningTextContent$outboundSchema, - OpenAIResponsesRefusalContent$outboundSchema, - ]), - sequenceNumber: z.number(), - }).transform((v) => { - return remap$(v, { - outputIndex: "output_index", - itemId: "item_id", - contentIndex: "content_index", - sequenceNumber: "sequence_number", - }); - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesStreamEventResponseContentPartDone$ { - /** @deprecated use `OpenResponsesStreamEventResponseContentPartDone$inboundSchema` instead. */ - export const inboundSchema = - OpenResponsesStreamEventResponseContentPartDone$inboundSchema; - /** @deprecated use `OpenResponsesStreamEventResponseContentPartDone$outboundSchema` instead. */ - export const outboundSchema = - OpenResponsesStreamEventResponseContentPartDone$outboundSchema; - /** @deprecated use `OpenResponsesStreamEventResponseContentPartDone$Outbound` instead. */ - export type Outbound = - OpenResponsesStreamEventResponseContentPartDone$Outbound; -} - -export function openResponsesStreamEventResponseContentPartDoneToJSON( - openResponsesStreamEventResponseContentPartDone: - OpenResponsesStreamEventResponseContentPartDone, -): string { - return JSON.stringify( - OpenResponsesStreamEventResponseContentPartDone$outboundSchema.parse( - openResponsesStreamEventResponseContentPartDone, - ), - ); -} - export function openResponsesStreamEventResponseContentPartDoneFromJSON( jsonString: string, ): SafeParseResult< @@ -1582,22 +834,6 @@ export const TypeResponseContentPartAdded$inboundSchema: z.ZodEnum< typeof TypeResponseContentPartAdded > = z.enum(TypeResponseContentPartAdded); -/** @internal */ -export const TypeResponseContentPartAdded$outboundSchema: z.ZodEnum< - typeof TypeResponseContentPartAdded -> = TypeResponseContentPartAdded$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace TypeResponseContentPartAdded$ { - /** @deprecated use `TypeResponseContentPartAdded$inboundSchema` instead. */ - export const inboundSchema = TypeResponseContentPartAdded$inboundSchema; - /** @deprecated use `TypeResponseContentPartAdded$outboundSchema` instead. */ - export const outboundSchema = TypeResponseContentPartAdded$outboundSchema; -} - /** @internal */ export const Part1$inboundSchema: z.ZodType = z.union([ ResponseOutputText$inboundSchema, @@ -1605,36 +841,6 @@ export const Part1$inboundSchema: z.ZodType = z.union([ OpenAIResponsesRefusalContent$inboundSchema, ]); -/** @internal */ -export type Part1$Outbound = - | ResponseOutputText$Outbound - | ReasoningTextContent$Outbound - | OpenAIResponsesRefusalContent$Outbound; - -/** @internal */ -export const Part1$outboundSchema: z.ZodType = z.union([ - ResponseOutputText$outboundSchema, - ReasoningTextContent$outboundSchema, - OpenAIResponsesRefusalContent$outboundSchema, -]); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Part1$ { - /** @deprecated use `Part1$inboundSchema` instead. */ - export const inboundSchema = Part1$inboundSchema; - /** @deprecated use `Part1$outboundSchema` instead. */ - export const outboundSchema = Part1$outboundSchema; - /** @deprecated use `Part1$Outbound` instead. */ - export type Outbound = Part1$Outbound; -} - -export function part1ToJSON(part1: Part1): string { - return JSON.stringify(Part1$outboundSchema.parse(part1)); -} - export function part1FromJSON( jsonString: string, ): SafeParseResult { @@ -1668,71 +874,6 @@ export const OpenResponsesStreamEventResponseContentPartAdded$inboundSchema: }); }); -/** @internal */ -export type OpenResponsesStreamEventResponseContentPartAdded$Outbound = { - type: string; - output_index: number; - item_id: string; - content_index: number; - part: - | ResponseOutputText$Outbound - | ReasoningTextContent$Outbound - | OpenAIResponsesRefusalContent$Outbound; - sequence_number: number; -}; - -/** @internal */ -export const OpenResponsesStreamEventResponseContentPartAdded$outboundSchema: - z.ZodType< - OpenResponsesStreamEventResponseContentPartAdded$Outbound, - OpenResponsesStreamEventResponseContentPartAdded - > = z.object({ - type: TypeResponseContentPartAdded$outboundSchema, - outputIndex: z.number(), - itemId: z.string(), - contentIndex: z.number(), - part: z.union([ - ResponseOutputText$outboundSchema, - ReasoningTextContent$outboundSchema, - OpenAIResponsesRefusalContent$outboundSchema, - ]), - sequenceNumber: z.number(), - }).transform((v) => { - return remap$(v, { - outputIndex: "output_index", - itemId: "item_id", - contentIndex: "content_index", - sequenceNumber: "sequence_number", - }); - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesStreamEventResponseContentPartAdded$ { - /** @deprecated use `OpenResponsesStreamEventResponseContentPartAdded$inboundSchema` instead. */ - export const inboundSchema = - OpenResponsesStreamEventResponseContentPartAdded$inboundSchema; - /** @deprecated use `OpenResponsesStreamEventResponseContentPartAdded$outboundSchema` instead. */ - export const outboundSchema = - OpenResponsesStreamEventResponseContentPartAdded$outboundSchema; - /** @deprecated use `OpenResponsesStreamEventResponseContentPartAdded$Outbound` instead. */ - export type Outbound = - OpenResponsesStreamEventResponseContentPartAdded$Outbound; -} - -export function openResponsesStreamEventResponseContentPartAddedToJSON( - openResponsesStreamEventResponseContentPartAdded: - OpenResponsesStreamEventResponseContentPartAdded, -): string { - return JSON.stringify( - OpenResponsesStreamEventResponseContentPartAdded$outboundSchema.parse( - openResponsesStreamEventResponseContentPartAdded, - ), - ); -} - export function openResponsesStreamEventResponseContentPartAddedFromJSON( jsonString: string, ): SafeParseResult< @@ -1754,22 +895,6 @@ export const TypeResponseOutputItemDone$inboundSchema: z.ZodEnum< typeof TypeResponseOutputItemDone > = z.enum(TypeResponseOutputItemDone); -/** @internal */ -export const TypeResponseOutputItemDone$outboundSchema: z.ZodEnum< - typeof TypeResponseOutputItemDone -> = TypeResponseOutputItemDone$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace TypeResponseOutputItemDone$ { - /** @deprecated use `TypeResponseOutputItemDone$inboundSchema` instead. */ - export const inboundSchema = TypeResponseOutputItemDone$inboundSchema; - /** @deprecated use `TypeResponseOutputItemDone$outboundSchema` instead. */ - export const outboundSchema = TypeResponseOutputItemDone$outboundSchema; -} - /** @internal */ export const OpenResponsesStreamEventResponseOutputItemDone$inboundSchema: z.ZodType = z.object( @@ -1786,58 +911,6 @@ export const OpenResponsesStreamEventResponseOutputItemDone$inboundSchema: }); }); -/** @internal */ -export type OpenResponsesStreamEventResponseOutputItemDone$Outbound = { - type: string; - output_index: number; - item: ResponsesOutputItem$Outbound; - sequence_number: number; -}; - -/** @internal */ -export const OpenResponsesStreamEventResponseOutputItemDone$outboundSchema: - z.ZodType< - OpenResponsesStreamEventResponseOutputItemDone$Outbound, - OpenResponsesStreamEventResponseOutputItemDone - > = z.object({ - type: TypeResponseOutputItemDone$outboundSchema, - outputIndex: z.number(), - item: ResponsesOutputItem$outboundSchema, - sequenceNumber: z.number(), - }).transform((v) => { - return remap$(v, { - outputIndex: "output_index", - sequenceNumber: "sequence_number", - }); - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesStreamEventResponseOutputItemDone$ { - /** @deprecated use `OpenResponsesStreamEventResponseOutputItemDone$inboundSchema` instead. */ - export const inboundSchema = - OpenResponsesStreamEventResponseOutputItemDone$inboundSchema; - /** @deprecated use `OpenResponsesStreamEventResponseOutputItemDone$outboundSchema` instead. */ - export const outboundSchema = - OpenResponsesStreamEventResponseOutputItemDone$outboundSchema; - /** @deprecated use `OpenResponsesStreamEventResponseOutputItemDone$Outbound` instead. */ - export type Outbound = - OpenResponsesStreamEventResponseOutputItemDone$Outbound; -} - -export function openResponsesStreamEventResponseOutputItemDoneToJSON( - openResponsesStreamEventResponseOutputItemDone: - OpenResponsesStreamEventResponseOutputItemDone, -): string { - return JSON.stringify( - OpenResponsesStreamEventResponseOutputItemDone$outboundSchema.parse( - openResponsesStreamEventResponseOutputItemDone, - ), - ); -} - export function openResponsesStreamEventResponseOutputItemDoneFromJSON( jsonString: string, ): SafeParseResult< @@ -1859,22 +932,6 @@ export const TypeResponseOutputItemAdded$inboundSchema: z.ZodEnum< typeof TypeResponseOutputItemAdded > = z.enum(TypeResponseOutputItemAdded); -/** @internal */ -export const TypeResponseOutputItemAdded$outboundSchema: z.ZodEnum< - typeof TypeResponseOutputItemAdded -> = TypeResponseOutputItemAdded$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace TypeResponseOutputItemAdded$ { - /** @deprecated use `TypeResponseOutputItemAdded$inboundSchema` instead. */ - export const inboundSchema = TypeResponseOutputItemAdded$inboundSchema; - /** @deprecated use `TypeResponseOutputItemAdded$outboundSchema` instead. */ - export const outboundSchema = TypeResponseOutputItemAdded$outboundSchema; -} - /** @internal */ export const OpenResponsesStreamEventResponseOutputItemAdded$inboundSchema: z.ZodType = z @@ -1890,58 +947,6 @@ export const OpenResponsesStreamEventResponseOutputItemAdded$inboundSchema: }); }); -/** @internal */ -export type OpenResponsesStreamEventResponseOutputItemAdded$Outbound = { - type: string; - output_index: number; - item: ResponsesOutputItem$Outbound; - sequence_number: number; -}; - -/** @internal */ -export const OpenResponsesStreamEventResponseOutputItemAdded$outboundSchema: - z.ZodType< - OpenResponsesStreamEventResponseOutputItemAdded$Outbound, - OpenResponsesStreamEventResponseOutputItemAdded - > = z.object({ - type: TypeResponseOutputItemAdded$outboundSchema, - outputIndex: z.number(), - item: ResponsesOutputItem$outboundSchema, - sequenceNumber: z.number(), - }).transform((v) => { - return remap$(v, { - outputIndex: "output_index", - sequenceNumber: "sequence_number", - }); - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesStreamEventResponseOutputItemAdded$ { - /** @deprecated use `OpenResponsesStreamEventResponseOutputItemAdded$inboundSchema` instead. */ - export const inboundSchema = - OpenResponsesStreamEventResponseOutputItemAdded$inboundSchema; - /** @deprecated use `OpenResponsesStreamEventResponseOutputItemAdded$outboundSchema` instead. */ - export const outboundSchema = - OpenResponsesStreamEventResponseOutputItemAdded$outboundSchema; - /** @deprecated use `OpenResponsesStreamEventResponseOutputItemAdded$Outbound` instead. */ - export type Outbound = - OpenResponsesStreamEventResponseOutputItemAdded$Outbound; -} - -export function openResponsesStreamEventResponseOutputItemAddedToJSON( - openResponsesStreamEventResponseOutputItemAdded: - OpenResponsesStreamEventResponseOutputItemAdded, -): string { - return JSON.stringify( - OpenResponsesStreamEventResponseOutputItemAdded$outboundSchema.parse( - openResponsesStreamEventResponseOutputItemAdded, - ), - ); -} - export function openResponsesStreamEventResponseOutputItemAddedFromJSON( jsonString: string, ): SafeParseResult< @@ -1963,22 +968,6 @@ export const TypeResponseFailed$inboundSchema: z.ZodEnum< typeof TypeResponseFailed > = z.enum(TypeResponseFailed); -/** @internal */ -export const TypeResponseFailed$outboundSchema: z.ZodEnum< - typeof TypeResponseFailed -> = TypeResponseFailed$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace TypeResponseFailed$ { - /** @deprecated use `TypeResponseFailed$inboundSchema` instead. */ - export const inboundSchema = TypeResponseFailed$inboundSchema; - /** @deprecated use `TypeResponseFailed$outboundSchema` instead. */ - export const outboundSchema = TypeResponseFailed$outboundSchema; -} - /** @internal */ export const OpenResponsesStreamEventResponseFailed$inboundSchema: z.ZodType< OpenResponsesStreamEventResponseFailed, @@ -1993,53 +982,6 @@ export const OpenResponsesStreamEventResponseFailed$inboundSchema: z.ZodType< }); }); -/** @internal */ -export type OpenResponsesStreamEventResponseFailed$Outbound = { - type: string; - response: OpenResponsesNonStreamingResponse$Outbound; - sequence_number: number; -}; - -/** @internal */ -export const OpenResponsesStreamEventResponseFailed$outboundSchema: z.ZodType< - OpenResponsesStreamEventResponseFailed$Outbound, - OpenResponsesStreamEventResponseFailed -> = z.object({ - type: TypeResponseFailed$outboundSchema, - response: OpenResponsesNonStreamingResponse$outboundSchema, - sequenceNumber: z.number(), -}).transform((v) => { - return remap$(v, { - sequenceNumber: "sequence_number", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesStreamEventResponseFailed$ { - /** @deprecated use `OpenResponsesStreamEventResponseFailed$inboundSchema` instead. */ - export const inboundSchema = - OpenResponsesStreamEventResponseFailed$inboundSchema; - /** @deprecated use `OpenResponsesStreamEventResponseFailed$outboundSchema` instead. */ - export const outboundSchema = - OpenResponsesStreamEventResponseFailed$outboundSchema; - /** @deprecated use `OpenResponsesStreamEventResponseFailed$Outbound` instead. */ - export type Outbound = OpenResponsesStreamEventResponseFailed$Outbound; -} - -export function openResponsesStreamEventResponseFailedToJSON( - openResponsesStreamEventResponseFailed: - OpenResponsesStreamEventResponseFailed, -): string { - return JSON.stringify( - OpenResponsesStreamEventResponseFailed$outboundSchema.parse( - openResponsesStreamEventResponseFailed, - ), - ); -} - export function openResponsesStreamEventResponseFailedFromJSON( jsonString: string, ): SafeParseResult { @@ -2056,22 +998,6 @@ export const TypeResponseIncomplete$inboundSchema: z.ZodEnum< typeof TypeResponseIncomplete > = z.enum(TypeResponseIncomplete); -/** @internal */ -export const TypeResponseIncomplete$outboundSchema: z.ZodEnum< - typeof TypeResponseIncomplete -> = TypeResponseIncomplete$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace TypeResponseIncomplete$ { - /** @deprecated use `TypeResponseIncomplete$inboundSchema` instead. */ - export const inboundSchema = TypeResponseIncomplete$inboundSchema; - /** @deprecated use `TypeResponseIncomplete$outboundSchema` instead. */ - export const outboundSchema = TypeResponseIncomplete$outboundSchema; -} - /** @internal */ export const OpenResponsesStreamEventResponseIncomplete$inboundSchema: z.ZodType = z.object({ @@ -2084,54 +1010,6 @@ export const OpenResponsesStreamEventResponseIncomplete$inboundSchema: }); }); -/** @internal */ -export type OpenResponsesStreamEventResponseIncomplete$Outbound = { - type: string; - response: OpenResponsesNonStreamingResponse$Outbound; - sequence_number: number; -}; - -/** @internal */ -export const OpenResponsesStreamEventResponseIncomplete$outboundSchema: - z.ZodType< - OpenResponsesStreamEventResponseIncomplete$Outbound, - OpenResponsesStreamEventResponseIncomplete - > = z.object({ - type: TypeResponseIncomplete$outboundSchema, - response: OpenResponsesNonStreamingResponse$outboundSchema, - sequenceNumber: z.number(), - }).transform((v) => { - return remap$(v, { - sequenceNumber: "sequence_number", - }); - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesStreamEventResponseIncomplete$ { - /** @deprecated use `OpenResponsesStreamEventResponseIncomplete$inboundSchema` instead. */ - export const inboundSchema = - OpenResponsesStreamEventResponseIncomplete$inboundSchema; - /** @deprecated use `OpenResponsesStreamEventResponseIncomplete$outboundSchema` instead. */ - export const outboundSchema = - OpenResponsesStreamEventResponseIncomplete$outboundSchema; - /** @deprecated use `OpenResponsesStreamEventResponseIncomplete$Outbound` instead. */ - export type Outbound = OpenResponsesStreamEventResponseIncomplete$Outbound; -} - -export function openResponsesStreamEventResponseIncompleteToJSON( - openResponsesStreamEventResponseIncomplete: - OpenResponsesStreamEventResponseIncomplete, -): string { - return JSON.stringify( - OpenResponsesStreamEventResponseIncomplete$outboundSchema.parse( - openResponsesStreamEventResponseIncomplete, - ), - ); -} - export function openResponsesStreamEventResponseIncompleteFromJSON( jsonString: string, ): SafeParseResult< @@ -2153,22 +1031,6 @@ export const TypeResponseCompleted$inboundSchema: z.ZodEnum< typeof TypeResponseCompleted > = z.enum(TypeResponseCompleted); -/** @internal */ -export const TypeResponseCompleted$outboundSchema: z.ZodEnum< - typeof TypeResponseCompleted -> = TypeResponseCompleted$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace TypeResponseCompleted$ { - /** @deprecated use `TypeResponseCompleted$inboundSchema` instead. */ - export const inboundSchema = TypeResponseCompleted$inboundSchema; - /** @deprecated use `TypeResponseCompleted$outboundSchema` instead. */ - export const outboundSchema = TypeResponseCompleted$outboundSchema; -} - /** @internal */ export const OpenResponsesStreamEventResponseCompleted$inboundSchema: z.ZodType< OpenResponsesStreamEventResponseCompleted, @@ -2183,54 +1045,6 @@ export const OpenResponsesStreamEventResponseCompleted$inboundSchema: z.ZodType< }); }); -/** @internal */ -export type OpenResponsesStreamEventResponseCompleted$Outbound = { - type: string; - response: OpenResponsesNonStreamingResponse$Outbound; - sequence_number: number; -}; - -/** @internal */ -export const OpenResponsesStreamEventResponseCompleted$outboundSchema: - z.ZodType< - OpenResponsesStreamEventResponseCompleted$Outbound, - OpenResponsesStreamEventResponseCompleted - > = z.object({ - type: TypeResponseCompleted$outboundSchema, - response: OpenResponsesNonStreamingResponse$outboundSchema, - sequenceNumber: z.number(), - }).transform((v) => { - return remap$(v, { - sequenceNumber: "sequence_number", - }); - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesStreamEventResponseCompleted$ { - /** @deprecated use `OpenResponsesStreamEventResponseCompleted$inboundSchema` instead. */ - export const inboundSchema = - OpenResponsesStreamEventResponseCompleted$inboundSchema; - /** @deprecated use `OpenResponsesStreamEventResponseCompleted$outboundSchema` instead. */ - export const outboundSchema = - OpenResponsesStreamEventResponseCompleted$outboundSchema; - /** @deprecated use `OpenResponsesStreamEventResponseCompleted$Outbound` instead. */ - export type Outbound = OpenResponsesStreamEventResponseCompleted$Outbound; -} - -export function openResponsesStreamEventResponseCompletedToJSON( - openResponsesStreamEventResponseCompleted: - OpenResponsesStreamEventResponseCompleted, -): string { - return JSON.stringify( - OpenResponsesStreamEventResponseCompleted$outboundSchema.parse( - openResponsesStreamEventResponseCompleted, - ), - ); -} - export function openResponsesStreamEventResponseCompletedFromJSON( jsonString: string, ): SafeParseResult< @@ -2252,22 +1066,6 @@ export const TypeResponseInProgress$inboundSchema: z.ZodEnum< typeof TypeResponseInProgress > = z.enum(TypeResponseInProgress); -/** @internal */ -export const TypeResponseInProgress$outboundSchema: z.ZodEnum< - typeof TypeResponseInProgress -> = TypeResponseInProgress$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace TypeResponseInProgress$ { - /** @deprecated use `TypeResponseInProgress$inboundSchema` instead. */ - export const inboundSchema = TypeResponseInProgress$inboundSchema; - /** @deprecated use `TypeResponseInProgress$outboundSchema` instead. */ - export const outboundSchema = TypeResponseInProgress$outboundSchema; -} - /** @internal */ export const OpenResponsesStreamEventResponseInProgress$inboundSchema: z.ZodType = z.object({ @@ -2280,54 +1078,6 @@ export const OpenResponsesStreamEventResponseInProgress$inboundSchema: }); }); -/** @internal */ -export type OpenResponsesStreamEventResponseInProgress$Outbound = { - type: string; - response: OpenResponsesNonStreamingResponse$Outbound; - sequence_number: number; -}; - -/** @internal */ -export const OpenResponsesStreamEventResponseInProgress$outboundSchema: - z.ZodType< - OpenResponsesStreamEventResponseInProgress$Outbound, - OpenResponsesStreamEventResponseInProgress - > = z.object({ - type: TypeResponseInProgress$outboundSchema, - response: OpenResponsesNonStreamingResponse$outboundSchema, - sequenceNumber: z.number(), - }).transform((v) => { - return remap$(v, { - sequenceNumber: "sequence_number", - }); - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesStreamEventResponseInProgress$ { - /** @deprecated use `OpenResponsesStreamEventResponseInProgress$inboundSchema` instead. */ - export const inboundSchema = - OpenResponsesStreamEventResponseInProgress$inboundSchema; - /** @deprecated use `OpenResponsesStreamEventResponseInProgress$outboundSchema` instead. */ - export const outboundSchema = - OpenResponsesStreamEventResponseInProgress$outboundSchema; - /** @deprecated use `OpenResponsesStreamEventResponseInProgress$Outbound` instead. */ - export type Outbound = OpenResponsesStreamEventResponseInProgress$Outbound; -} - -export function openResponsesStreamEventResponseInProgressToJSON( - openResponsesStreamEventResponseInProgress: - OpenResponsesStreamEventResponseInProgress, -): string { - return JSON.stringify( - OpenResponsesStreamEventResponseInProgress$outboundSchema.parse( - openResponsesStreamEventResponseInProgress, - ), - ); -} - export function openResponsesStreamEventResponseInProgressFromJSON( jsonString: string, ): SafeParseResult< @@ -2349,22 +1099,6 @@ export const TypeResponseCreated$inboundSchema: z.ZodEnum< typeof TypeResponseCreated > = z.enum(TypeResponseCreated); -/** @internal */ -export const TypeResponseCreated$outboundSchema: z.ZodEnum< - typeof TypeResponseCreated -> = TypeResponseCreated$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace TypeResponseCreated$ { - /** @deprecated use `TypeResponseCreated$inboundSchema` instead. */ - export const inboundSchema = TypeResponseCreated$inboundSchema; - /** @deprecated use `TypeResponseCreated$outboundSchema` instead. */ - export const outboundSchema = TypeResponseCreated$outboundSchema; -} - /** @internal */ export const OpenResponsesStreamEventResponseCreated$inboundSchema: z.ZodType< OpenResponsesStreamEventResponseCreated, @@ -2379,53 +1113,6 @@ export const OpenResponsesStreamEventResponseCreated$inboundSchema: z.ZodType< }); }); -/** @internal */ -export type OpenResponsesStreamEventResponseCreated$Outbound = { - type: string; - response: OpenResponsesNonStreamingResponse$Outbound; - sequence_number: number; -}; - -/** @internal */ -export const OpenResponsesStreamEventResponseCreated$outboundSchema: z.ZodType< - OpenResponsesStreamEventResponseCreated$Outbound, - OpenResponsesStreamEventResponseCreated -> = z.object({ - type: TypeResponseCreated$outboundSchema, - response: OpenResponsesNonStreamingResponse$outboundSchema, - sequenceNumber: z.number(), -}).transform((v) => { - return remap$(v, { - sequenceNumber: "sequence_number", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesStreamEventResponseCreated$ { - /** @deprecated use `OpenResponsesStreamEventResponseCreated$inboundSchema` instead. */ - export const inboundSchema = - OpenResponsesStreamEventResponseCreated$inboundSchema; - /** @deprecated use `OpenResponsesStreamEventResponseCreated$outboundSchema` instead. */ - export const outboundSchema = - OpenResponsesStreamEventResponseCreated$outboundSchema; - /** @deprecated use `OpenResponsesStreamEventResponseCreated$Outbound` instead. */ - export type Outbound = OpenResponsesStreamEventResponseCreated$Outbound; -} - -export function openResponsesStreamEventResponseCreatedToJSON( - openResponsesStreamEventResponseCreated: - OpenResponsesStreamEventResponseCreated, -): string { - return JSON.stringify( - OpenResponsesStreamEventResponseCreated$outboundSchema.parse( - openResponsesStreamEventResponseCreated, - ), - ); -} - export function openResponsesStreamEventResponseCreatedFromJSON( jsonString: string, ): SafeParseResult< @@ -2484,99 +1171,6 @@ export const OpenResponsesStreamEvent$inboundSchema: z.ZodType< z.lazy(() => OpenResponsesStreamEventResponseFailed$inboundSchema), ]); -/** @internal */ -export type OpenResponsesStreamEvent$Outbound = - | OpenResponsesStreamEventResponseOutputTextDelta$Outbound - | OpenResponsesStreamEventResponseOutputTextDone$Outbound - | OpenResponsesStreamEventResponseOutputTextAnnotationAdded$Outbound - | OpenResponsesStreamEventResponseContentPartAdded$Outbound - | OpenResponsesStreamEventResponseContentPartDone$Outbound - | OpenResponsesStreamEventResponseRefusalDelta$Outbound - | OpenResponsesStreamEventResponseRefusalDone$Outbound - | OpenResponsesStreamEventResponseFunctionCallArgumentsDone$Outbound - | OpenResponsesReasoningDeltaEvent$Outbound - | OpenResponsesReasoningDoneEvent$Outbound - | OpenResponsesReasoningSummaryPartAddedEvent$Outbound - | OpenResponsesStreamEventResponseReasoningSummaryPartDone$Outbound - | OpenResponsesReasoningSummaryTextDeltaEvent$Outbound - | OpenResponsesReasoningSummaryTextDoneEvent$Outbound - | OpenResponsesImageGenCallPartialImage$Outbound - | OpenResponsesErrorEvent$Outbound - | OpenResponsesStreamEventResponseFunctionCallArgumentsDelta$Outbound - | OpenResponsesStreamEventResponseOutputItemAdded$Outbound - | OpenResponsesStreamEventResponseOutputItemDone$Outbound - | OpenResponsesImageGenCallInProgress$Outbound - | OpenResponsesImageGenCallGenerating$Outbound - | OpenResponsesImageGenCallCompleted$Outbound - | OpenResponsesStreamEventResponseCreated$Outbound - | OpenResponsesStreamEventResponseInProgress$Outbound - | OpenResponsesStreamEventResponseCompleted$Outbound - | OpenResponsesStreamEventResponseIncomplete$Outbound - | OpenResponsesStreamEventResponseFailed$Outbound; - -/** @internal */ -export const OpenResponsesStreamEvent$outboundSchema: z.ZodType< - OpenResponsesStreamEvent$Outbound, - OpenResponsesStreamEvent -> = z.union([ - z.lazy(() => OpenResponsesStreamEventResponseOutputTextDelta$outboundSchema), - z.lazy(() => OpenResponsesStreamEventResponseOutputTextDone$outboundSchema), - z.lazy(() => - OpenResponsesStreamEventResponseOutputTextAnnotationAdded$outboundSchema - ), - z.lazy(() => OpenResponsesStreamEventResponseContentPartAdded$outboundSchema), - z.lazy(() => OpenResponsesStreamEventResponseContentPartDone$outboundSchema), - z.lazy(() => OpenResponsesStreamEventResponseRefusalDelta$outboundSchema), - z.lazy(() => OpenResponsesStreamEventResponseRefusalDone$outboundSchema), - z.lazy(() => - OpenResponsesStreamEventResponseFunctionCallArgumentsDone$outboundSchema - ), - OpenResponsesReasoningDeltaEvent$outboundSchema, - OpenResponsesReasoningDoneEvent$outboundSchema, - OpenResponsesReasoningSummaryPartAddedEvent$outboundSchema, - z.lazy(() => - OpenResponsesStreamEventResponseReasoningSummaryPartDone$outboundSchema - ), - OpenResponsesReasoningSummaryTextDeltaEvent$outboundSchema, - OpenResponsesReasoningSummaryTextDoneEvent$outboundSchema, - OpenResponsesImageGenCallPartialImage$outboundSchema, - OpenResponsesErrorEvent$outboundSchema, - z.lazy(() => - OpenResponsesStreamEventResponseFunctionCallArgumentsDelta$outboundSchema - ), - z.lazy(() => OpenResponsesStreamEventResponseOutputItemAdded$outboundSchema), - z.lazy(() => OpenResponsesStreamEventResponseOutputItemDone$outboundSchema), - OpenResponsesImageGenCallInProgress$outboundSchema, - OpenResponsesImageGenCallGenerating$outboundSchema, - OpenResponsesImageGenCallCompleted$outboundSchema, - z.lazy(() => OpenResponsesStreamEventResponseCreated$outboundSchema), - z.lazy(() => OpenResponsesStreamEventResponseInProgress$outboundSchema), - z.lazy(() => OpenResponsesStreamEventResponseCompleted$outboundSchema), - z.lazy(() => OpenResponsesStreamEventResponseIncomplete$outboundSchema), - z.lazy(() => OpenResponsesStreamEventResponseFailed$outboundSchema), -]); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesStreamEvent$ { - /** @deprecated use `OpenResponsesStreamEvent$inboundSchema` instead. */ - export const inboundSchema = OpenResponsesStreamEvent$inboundSchema; - /** @deprecated use `OpenResponsesStreamEvent$outboundSchema` instead. */ - export const outboundSchema = OpenResponsesStreamEvent$outboundSchema; - /** @deprecated use `OpenResponsesStreamEvent$Outbound` instead. */ - export type Outbound = OpenResponsesStreamEvent$Outbound; -} - -export function openResponsesStreamEventToJSON( - openResponsesStreamEvent: OpenResponsesStreamEvent, -): string { - return JSON.stringify( - OpenResponsesStreamEvent$outboundSchema.parse(openResponsesStreamEvent), - ); -} - export function openResponsesStreamEventFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/openresponsestoplogprobs.ts b/src/models/openresponsestoplogprobs.ts index dfc10aa5..88ce3acd 100644 --- a/src/models/openresponsestoplogprobs.ts +++ b/src/models/openresponsestoplogprobs.ts @@ -24,42 +24,6 @@ export const OpenResponsesTopLogprobs$inboundSchema: z.ZodType< logprob: z.number().optional(), }); -/** @internal */ -export type OpenResponsesTopLogprobs$Outbound = { - token?: string | undefined; - logprob?: number | undefined; -}; - -/** @internal */ -export const OpenResponsesTopLogprobs$outboundSchema: z.ZodType< - OpenResponsesTopLogprobs$Outbound, - OpenResponsesTopLogprobs -> = z.object({ - token: z.string().optional(), - logprob: z.number().optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesTopLogprobs$ { - /** @deprecated use `OpenResponsesTopLogprobs$inboundSchema` instead. */ - export const inboundSchema = OpenResponsesTopLogprobs$inboundSchema; - /** @deprecated use `OpenResponsesTopLogprobs$outboundSchema` instead. */ - export const outboundSchema = OpenResponsesTopLogprobs$outboundSchema; - /** @deprecated use `OpenResponsesTopLogprobs$Outbound` instead. */ - export type Outbound = OpenResponsesTopLogprobs$Outbound; -} - -export function openResponsesTopLogprobsToJSON( - openResponsesTopLogprobs: OpenResponsesTopLogprobs, -): string { - return JSON.stringify( - OpenResponsesTopLogprobs$outboundSchema.parse(openResponsesTopLogprobs), - ); -} - export function openResponsesTopLogprobsFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/openresponsesusage.ts b/src/models/openresponsesusage.ts index 2f415cb3..f083cbbd 100644 --- a/src/models/openresponsesusage.ts +++ b/src/models/openresponsesusage.ts @@ -54,44 +54,6 @@ export const InputTokensDetails$inboundSchema: z.ZodType< }); }); -/** @internal */ -export type InputTokensDetails$Outbound = { - cached_tokens: number; -}; - -/** @internal */ -export const InputTokensDetails$outboundSchema: z.ZodType< - InputTokensDetails$Outbound, - InputTokensDetails -> = z.object({ - cachedTokens: z.number(), -}).transform((v) => { - return remap$(v, { - cachedTokens: "cached_tokens", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace InputTokensDetails$ { - /** @deprecated use `InputTokensDetails$inboundSchema` instead. */ - export const inboundSchema = InputTokensDetails$inboundSchema; - /** @deprecated use `InputTokensDetails$outboundSchema` instead. */ - export const outboundSchema = InputTokensDetails$outboundSchema; - /** @deprecated use `InputTokensDetails$Outbound` instead. */ - export type Outbound = InputTokensDetails$Outbound; -} - -export function inputTokensDetailsToJSON( - inputTokensDetails: InputTokensDetails, -): string { - return JSON.stringify( - InputTokensDetails$outboundSchema.parse(inputTokensDetails), - ); -} - export function inputTokensDetailsFromJSON( jsonString: string, ): SafeParseResult { @@ -114,44 +76,6 @@ export const OutputTokensDetails$inboundSchema: z.ZodType< }); }); -/** @internal */ -export type OutputTokensDetails$Outbound = { - reasoning_tokens: number; -}; - -/** @internal */ -export const OutputTokensDetails$outboundSchema: z.ZodType< - OutputTokensDetails$Outbound, - OutputTokensDetails -> = z.object({ - reasoningTokens: z.number(), -}).transform((v) => { - return remap$(v, { - reasoningTokens: "reasoning_tokens", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OutputTokensDetails$ { - /** @deprecated use `OutputTokensDetails$inboundSchema` instead. */ - export const inboundSchema = OutputTokensDetails$inboundSchema; - /** @deprecated use `OutputTokensDetails$outboundSchema` instead. */ - export const outboundSchema = OutputTokensDetails$outboundSchema; - /** @deprecated use `OutputTokensDetails$Outbound` instead. */ - export type Outbound = OutputTokensDetails$Outbound; -} - -export function outputTokensDetailsToJSON( - outputTokensDetails: OutputTokensDetails, -): string { - return JSON.stringify( - OutputTokensDetails$outboundSchema.parse(outputTokensDetails), - ); -} - export function outputTokensDetailsFromJSON( jsonString: string, ): SafeParseResult { @@ -176,46 +100,6 @@ export const CostDetails$inboundSchema: z.ZodType = z }); }); -/** @internal */ -export type CostDetails$Outbound = { - upstream_inference_cost?: number | null | undefined; - upstream_inference_input_cost: number; - upstream_inference_output_cost: number; -}; - -/** @internal */ -export const CostDetails$outboundSchema: z.ZodType< - CostDetails$Outbound, - CostDetails -> = z.object({ - upstreamInferenceCost: z.nullable(z.number()).optional(), - upstreamInferenceInputCost: z.number(), - upstreamInferenceOutputCost: z.number(), -}).transform((v) => { - return remap$(v, { - upstreamInferenceCost: "upstream_inference_cost", - upstreamInferenceInputCost: "upstream_inference_input_cost", - upstreamInferenceOutputCost: "upstream_inference_output_cost", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CostDetails$ { - /** @deprecated use `CostDetails$inboundSchema` instead. */ - export const inboundSchema = CostDetails$inboundSchema; - /** @deprecated use `CostDetails$outboundSchema` instead. */ - export const outboundSchema = CostDetails$outboundSchema; - /** @deprecated use `CostDetails$Outbound` instead. */ - export type Outbound = CostDetails$Outbound; -} - -export function costDetailsToJSON(costDetails: CostDetails): string { - return JSON.stringify(CostDetails$outboundSchema.parse(costDetails)); -} - export function costDetailsFromJSON( jsonString: string, ): SafeParseResult { @@ -251,64 +135,6 @@ export const OpenResponsesUsage$inboundSchema: z.ZodType< }); }); -/** @internal */ -export type OpenResponsesUsage$Outbound = { - input_tokens: number; - input_tokens_details: InputTokensDetails$Outbound; - output_tokens: number; - output_tokens_details: OutputTokensDetails$Outbound; - total_tokens: number; - cost?: number | null | undefined; - is_byok?: boolean | undefined; - cost_details?: CostDetails$Outbound | undefined; -}; - -/** @internal */ -export const OpenResponsesUsage$outboundSchema: z.ZodType< - OpenResponsesUsage$Outbound, - OpenResponsesUsage -> = z.object({ - inputTokens: z.number(), - inputTokensDetails: z.lazy(() => InputTokensDetails$outboundSchema), - outputTokens: z.number(), - outputTokensDetails: z.lazy(() => OutputTokensDetails$outboundSchema), - totalTokens: z.number(), - cost: z.nullable(z.number()).optional(), - isByok: z.boolean().optional(), - costDetails: z.lazy(() => CostDetails$outboundSchema).optional(), -}).transform((v) => { - return remap$(v, { - inputTokens: "input_tokens", - inputTokensDetails: "input_tokens_details", - outputTokens: "output_tokens", - outputTokensDetails: "output_tokens_details", - totalTokens: "total_tokens", - isByok: "is_byok", - costDetails: "cost_details", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesUsage$ { - /** @deprecated use `OpenResponsesUsage$inboundSchema` instead. */ - export const inboundSchema = OpenResponsesUsage$inboundSchema; - /** @deprecated use `OpenResponsesUsage$outboundSchema` instead. */ - export const outboundSchema = OpenResponsesUsage$outboundSchema; - /** @deprecated use `OpenResponsesUsage$Outbound` instead. */ - export type Outbound = OpenResponsesUsage$Outbound; -} - -export function openResponsesUsageToJSON( - openResponsesUsage: OpenResponsesUsage, -): string { - return JSON.stringify( - OpenResponsesUsage$outboundSchema.parse(openResponsesUsage), - ); -} - export function openResponsesUsageFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/openresponseswebsearch20250826tool.ts b/src/models/openresponseswebsearch20250826tool.ts index a5cd1530..180c7705 100644 --- a/src/models/openresponseswebsearch20250826tool.ts +++ b/src/models/openresponseswebsearch20250826tool.ts @@ -51,25 +51,11 @@ export type OpenResponsesWebSearch20250826Tool = { export const OpenResponsesWebSearch20250826ToolType$inboundSchema: z.ZodEnum< typeof OpenResponsesWebSearch20250826ToolType > = z.enum(OpenResponsesWebSearch20250826ToolType); - /** @internal */ export const OpenResponsesWebSearch20250826ToolType$outboundSchema: z.ZodEnum< typeof OpenResponsesWebSearch20250826ToolType > = OpenResponsesWebSearch20250826ToolType$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesWebSearch20250826ToolType$ { - /** @deprecated use `OpenResponsesWebSearch20250826ToolType$inboundSchema` instead. */ - export const inboundSchema = - OpenResponsesWebSearch20250826ToolType$inboundSchema; - /** @deprecated use `OpenResponsesWebSearch20250826ToolType$outboundSchema` instead. */ - export const outboundSchema = - OpenResponsesWebSearch20250826ToolType$outboundSchema; -} - /** @internal */ export const OpenResponsesWebSearch20250826ToolFilters$inboundSchema: z.ZodType< OpenResponsesWebSearch20250826ToolFilters, @@ -81,7 +67,6 @@ export const OpenResponsesWebSearch20250826ToolFilters$inboundSchema: z.ZodType< "allowed_domains": "allowedDomains", }); }); - /** @internal */ export type OpenResponsesWebSearch20250826ToolFilters$Outbound = { allowed_domains?: Array | null | undefined; @@ -100,21 +85,6 @@ export const OpenResponsesWebSearch20250826ToolFilters$outboundSchema: }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesWebSearch20250826ToolFilters$ { - /** @deprecated use `OpenResponsesWebSearch20250826ToolFilters$inboundSchema` instead. */ - export const inboundSchema = - OpenResponsesWebSearch20250826ToolFilters$inboundSchema; - /** @deprecated use `OpenResponsesWebSearch20250826ToolFilters$outboundSchema` instead. */ - export const outboundSchema = - OpenResponsesWebSearch20250826ToolFilters$outboundSchema; - /** @deprecated use `OpenResponsesWebSearch20250826ToolFilters$Outbound` instead. */ - export type Outbound = OpenResponsesWebSearch20250826ToolFilters$Outbound; -} - export function openResponsesWebSearch20250826ToolFiltersToJSON( openResponsesWebSearch20250826ToolFilters: OpenResponsesWebSearch20250826ToolFilters, @@ -125,7 +95,6 @@ export function openResponsesWebSearch20250826ToolFiltersToJSON( ), ); } - export function openResponsesWebSearch20250826ToolFiltersFromJSON( jsonString: string, ): SafeParseResult< @@ -160,7 +129,6 @@ export const OpenResponsesWebSearch20250826Tool$inboundSchema: z.ZodType< "user_location": "userLocation", }); }); - /** @internal */ export type OpenResponsesWebSearch20250826Tool$Outbound = { type: string; @@ -191,20 +159,6 @@ export const OpenResponsesWebSearch20250826Tool$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesWebSearch20250826Tool$ { - /** @deprecated use `OpenResponsesWebSearch20250826Tool$inboundSchema` instead. */ - export const inboundSchema = OpenResponsesWebSearch20250826Tool$inboundSchema; - /** @deprecated use `OpenResponsesWebSearch20250826Tool$outboundSchema` instead. */ - export const outboundSchema = - OpenResponsesWebSearch20250826Tool$outboundSchema; - /** @deprecated use `OpenResponsesWebSearch20250826Tool$Outbound` instead. */ - export type Outbound = OpenResponsesWebSearch20250826Tool$Outbound; -} - export function openResponsesWebSearch20250826ToolToJSON( openResponsesWebSearch20250826Tool: OpenResponsesWebSearch20250826Tool, ): string { @@ -214,7 +168,6 @@ export function openResponsesWebSearch20250826ToolToJSON( ), ); } - export function openResponsesWebSearch20250826ToolFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/openresponseswebsearchpreview20250311tool.ts b/src/models/openresponseswebsearchpreview20250311tool.ts index 78b0770e..a9ba0d63 100644 --- a/src/models/openresponseswebsearchpreview20250311tool.ts +++ b/src/models/openresponseswebsearchpreview20250311tool.ts @@ -44,25 +44,11 @@ export const OpenResponsesWebSearchPreview20250311ToolType$inboundSchema: z.ZodEnum = z.enum( OpenResponsesWebSearchPreview20250311ToolType, ); - /** @internal */ export const OpenResponsesWebSearchPreview20250311ToolType$outboundSchema: z.ZodEnum = OpenResponsesWebSearchPreview20250311ToolType$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesWebSearchPreview20250311ToolType$ { - /** @deprecated use `OpenResponsesWebSearchPreview20250311ToolType$inboundSchema` instead. */ - export const inboundSchema = - OpenResponsesWebSearchPreview20250311ToolType$inboundSchema; - /** @deprecated use `OpenResponsesWebSearchPreview20250311ToolType$outboundSchema` instead. */ - export const outboundSchema = - OpenResponsesWebSearchPreview20250311ToolType$outboundSchema; -} - /** @internal */ export const OpenResponsesWebSearchPreview20250311Tool$inboundSchema: z.ZodType< OpenResponsesWebSearchPreview20250311Tool, @@ -78,7 +64,6 @@ export const OpenResponsesWebSearchPreview20250311Tool$inboundSchema: z.ZodType< "user_location": "userLocation", }); }); - /** @internal */ export type OpenResponsesWebSearchPreview20250311Tool$Outbound = { type: string; @@ -103,21 +88,6 @@ export const OpenResponsesWebSearchPreview20250311Tool$outboundSchema: }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesWebSearchPreview20250311Tool$ { - /** @deprecated use `OpenResponsesWebSearchPreview20250311Tool$inboundSchema` instead. */ - export const inboundSchema = - OpenResponsesWebSearchPreview20250311Tool$inboundSchema; - /** @deprecated use `OpenResponsesWebSearchPreview20250311Tool$outboundSchema` instead. */ - export const outboundSchema = - OpenResponsesWebSearchPreview20250311Tool$outboundSchema; - /** @deprecated use `OpenResponsesWebSearchPreview20250311Tool$Outbound` instead. */ - export type Outbound = OpenResponsesWebSearchPreview20250311Tool$Outbound; -} - export function openResponsesWebSearchPreview20250311ToolToJSON( openResponsesWebSearchPreview20250311Tool: OpenResponsesWebSearchPreview20250311Tool, @@ -128,7 +98,6 @@ export function openResponsesWebSearchPreview20250311ToolToJSON( ), ); } - export function openResponsesWebSearchPreview20250311ToolFromJSON( jsonString: string, ): SafeParseResult< diff --git a/src/models/openresponseswebsearchpreviewtool.ts b/src/models/openresponseswebsearchpreviewtool.ts index 04f4a9a8..2ee856fc 100644 --- a/src/models/openresponseswebsearchpreviewtool.ts +++ b/src/models/openresponseswebsearchpreviewtool.ts @@ -43,25 +43,11 @@ export type OpenResponsesWebSearchPreviewTool = { export const OpenResponsesWebSearchPreviewToolType$inboundSchema: z.ZodEnum< typeof OpenResponsesWebSearchPreviewToolType > = z.enum(OpenResponsesWebSearchPreviewToolType); - /** @internal */ export const OpenResponsesWebSearchPreviewToolType$outboundSchema: z.ZodEnum< typeof OpenResponsesWebSearchPreviewToolType > = OpenResponsesWebSearchPreviewToolType$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesWebSearchPreviewToolType$ { - /** @deprecated use `OpenResponsesWebSearchPreviewToolType$inboundSchema` instead. */ - export const inboundSchema = - OpenResponsesWebSearchPreviewToolType$inboundSchema; - /** @deprecated use `OpenResponsesWebSearchPreviewToolType$outboundSchema` instead. */ - export const outboundSchema = - OpenResponsesWebSearchPreviewToolType$outboundSchema; -} - /** @internal */ export const OpenResponsesWebSearchPreviewTool$inboundSchema: z.ZodType< OpenResponsesWebSearchPreviewTool, @@ -77,7 +63,6 @@ export const OpenResponsesWebSearchPreviewTool$inboundSchema: z.ZodType< "user_location": "userLocation", }); }); - /** @internal */ export type OpenResponsesWebSearchPreviewTool$Outbound = { type: string; @@ -101,20 +86,6 @@ export const OpenResponsesWebSearchPreviewTool$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesWebSearchPreviewTool$ { - /** @deprecated use `OpenResponsesWebSearchPreviewTool$inboundSchema` instead. */ - export const inboundSchema = OpenResponsesWebSearchPreviewTool$inboundSchema; - /** @deprecated use `OpenResponsesWebSearchPreviewTool$outboundSchema` instead. */ - export const outboundSchema = - OpenResponsesWebSearchPreviewTool$outboundSchema; - /** @deprecated use `OpenResponsesWebSearchPreviewTool$Outbound` instead. */ - export type Outbound = OpenResponsesWebSearchPreviewTool$Outbound; -} - export function openResponsesWebSearchPreviewToolToJSON( openResponsesWebSearchPreviewTool: OpenResponsesWebSearchPreviewTool, ): string { @@ -124,7 +95,6 @@ export function openResponsesWebSearchPreviewToolToJSON( ), ); } - export function openResponsesWebSearchPreviewToolFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/openresponseswebsearchtool.ts b/src/models/openresponseswebsearchtool.ts index 42305925..8b683f1c 100644 --- a/src/models/openresponseswebsearchtool.ts +++ b/src/models/openresponseswebsearchtool.ts @@ -51,23 +51,11 @@ export type OpenResponsesWebSearchTool = { export const OpenResponsesWebSearchToolType$inboundSchema: z.ZodEnum< typeof OpenResponsesWebSearchToolType > = z.enum(OpenResponsesWebSearchToolType); - /** @internal */ export const OpenResponsesWebSearchToolType$outboundSchema: z.ZodEnum< typeof OpenResponsesWebSearchToolType > = OpenResponsesWebSearchToolType$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesWebSearchToolType$ { - /** @deprecated use `OpenResponsesWebSearchToolType$inboundSchema` instead. */ - export const inboundSchema = OpenResponsesWebSearchToolType$inboundSchema; - /** @deprecated use `OpenResponsesWebSearchToolType$outboundSchema` instead. */ - export const outboundSchema = OpenResponsesWebSearchToolType$outboundSchema; -} - /** @internal */ export const OpenResponsesWebSearchToolFilters$inboundSchema: z.ZodType< OpenResponsesWebSearchToolFilters, @@ -79,7 +67,6 @@ export const OpenResponsesWebSearchToolFilters$inboundSchema: z.ZodType< "allowed_domains": "allowedDomains", }); }); - /** @internal */ export type OpenResponsesWebSearchToolFilters$Outbound = { allowed_domains?: Array | null | undefined; @@ -97,20 +84,6 @@ export const OpenResponsesWebSearchToolFilters$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesWebSearchToolFilters$ { - /** @deprecated use `OpenResponsesWebSearchToolFilters$inboundSchema` instead. */ - export const inboundSchema = OpenResponsesWebSearchToolFilters$inboundSchema; - /** @deprecated use `OpenResponsesWebSearchToolFilters$outboundSchema` instead. */ - export const outboundSchema = - OpenResponsesWebSearchToolFilters$outboundSchema; - /** @deprecated use `OpenResponsesWebSearchToolFilters$Outbound` instead. */ - export type Outbound = OpenResponsesWebSearchToolFilters$Outbound; -} - export function openResponsesWebSearchToolFiltersToJSON( openResponsesWebSearchToolFilters: OpenResponsesWebSearchToolFilters, ): string { @@ -120,7 +93,6 @@ export function openResponsesWebSearchToolFiltersToJSON( ), ); } - export function openResponsesWebSearchToolFiltersFromJSON( jsonString: string, ): SafeParseResult { @@ -149,7 +121,6 @@ export const OpenResponsesWebSearchTool$inboundSchema: z.ZodType< "user_location": "userLocation", }); }); - /** @internal */ export type OpenResponsesWebSearchTool$Outbound = { type: string; @@ -177,19 +148,6 @@ export const OpenResponsesWebSearchTool$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OpenResponsesWebSearchTool$ { - /** @deprecated use `OpenResponsesWebSearchTool$inboundSchema` instead. */ - export const inboundSchema = OpenResponsesWebSearchTool$inboundSchema; - /** @deprecated use `OpenResponsesWebSearchTool$outboundSchema` instead. */ - export const outboundSchema = OpenResponsesWebSearchTool$outboundSchema; - /** @deprecated use `OpenResponsesWebSearchTool$Outbound` instead. */ - export type Outbound = OpenResponsesWebSearchTool$Outbound; -} - export function openResponsesWebSearchToolToJSON( openResponsesWebSearchTool: OpenResponsesWebSearchTool, ): string { @@ -197,7 +155,6 @@ export function openResponsesWebSearchToolToJSON( OpenResponsesWebSearchTool$outboundSchema.parse(openResponsesWebSearchTool), ); } - export function openResponsesWebSearchToolFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/createauthkeyscode.ts b/src/models/operations/createauthkeyscode.ts index 4e83073f..b0baf27d 100644 --- a/src/models/operations/createauthkeyscode.ts +++ b/src/models/operations/createauthkeyscode.ts @@ -5,11 +5,7 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; -import { - catchUnrecognizedEnum, - OpenEnum, - Unrecognized, -} from "../../types/enums.js"; +import { OpenEnum, Unrecognized } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -74,16 +70,6 @@ export type CreateAuthKeysCodeResponse = { data: CreateAuthKeysCodeData; }; -/** @internal */ -export const CreateAuthKeysCodeCodeChallengeMethod$inboundSchema: z.ZodType< - CreateAuthKeysCodeCodeChallengeMethod, - unknown -> = z - .union([ - z.enum(CreateAuthKeysCodeCodeChallengeMethod), - z.string().transform(catchUnrecognizedEnum), - ]); - /** @internal */ export const CreateAuthKeysCodeCodeChallengeMethod$outboundSchema: z.ZodType< CreateAuthKeysCodeCodeChallengeMethod, @@ -93,37 +79,6 @@ export const CreateAuthKeysCodeCodeChallengeMethod$outboundSchema: z.ZodType< z.string().and(z.custom>()), ]); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateAuthKeysCodeCodeChallengeMethod$ { - /** @deprecated use `CreateAuthKeysCodeCodeChallengeMethod$inboundSchema` instead. */ - export const inboundSchema = - CreateAuthKeysCodeCodeChallengeMethod$inboundSchema; - /** @deprecated use `CreateAuthKeysCodeCodeChallengeMethod$outboundSchema` instead. */ - export const outboundSchema = - CreateAuthKeysCodeCodeChallengeMethod$outboundSchema; -} - -/** @internal */ -export const CreateAuthKeysCodeRequest$inboundSchema: z.ZodType< - CreateAuthKeysCodeRequest, - unknown -> = z.object({ - callback_url: z.string(), - code_challenge: z.string().optional(), - code_challenge_method: CreateAuthKeysCodeCodeChallengeMethod$inboundSchema - .optional(), - limit: z.number().optional(), -}).transform((v) => { - return remap$(v, { - "callback_url": "callbackUrl", - "code_challenge": "codeChallenge", - "code_challenge_method": "codeChallengeMethod", - }); -}); - /** @internal */ export type CreateAuthKeysCodeRequest$Outbound = { callback_url: string; @@ -150,19 +105,6 @@ export const CreateAuthKeysCodeRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateAuthKeysCodeRequest$ { - /** @deprecated use `CreateAuthKeysCodeRequest$inboundSchema` instead. */ - export const inboundSchema = CreateAuthKeysCodeRequest$inboundSchema; - /** @deprecated use `CreateAuthKeysCodeRequest$outboundSchema` instead. */ - export const outboundSchema = CreateAuthKeysCodeRequest$outboundSchema; - /** @deprecated use `CreateAuthKeysCodeRequest$Outbound` instead. */ - export type Outbound = CreateAuthKeysCodeRequest$Outbound; -} - export function createAuthKeysCodeRequestToJSON( createAuthKeysCodeRequest: CreateAuthKeysCodeRequest, ): string { @@ -171,16 +113,6 @@ export function createAuthKeysCodeRequestToJSON( ); } -export function createAuthKeysCodeRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CreateAuthKeysCodeRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CreateAuthKeysCodeRequest' from JSON`, - ); -} - /** @internal */ export const CreateAuthKeysCodeData$inboundSchema: z.ZodType< CreateAuthKeysCodeData, @@ -196,49 +128,6 @@ export const CreateAuthKeysCodeData$inboundSchema: z.ZodType< }); }); -/** @internal */ -export type CreateAuthKeysCodeData$Outbound = { - id: string; - app_id: number; - created_at: string; -}; - -/** @internal */ -export const CreateAuthKeysCodeData$outboundSchema: z.ZodType< - CreateAuthKeysCodeData$Outbound, - CreateAuthKeysCodeData -> = z.object({ - id: z.string(), - appId: z.number(), - createdAt: z.string(), -}).transform((v) => { - return remap$(v, { - appId: "app_id", - createdAt: "created_at", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateAuthKeysCodeData$ { - /** @deprecated use `CreateAuthKeysCodeData$inboundSchema` instead. */ - export const inboundSchema = CreateAuthKeysCodeData$inboundSchema; - /** @deprecated use `CreateAuthKeysCodeData$outboundSchema` instead. */ - export const outboundSchema = CreateAuthKeysCodeData$outboundSchema; - /** @deprecated use `CreateAuthKeysCodeData$Outbound` instead. */ - export type Outbound = CreateAuthKeysCodeData$Outbound; -} - -export function createAuthKeysCodeDataToJSON( - createAuthKeysCodeData: CreateAuthKeysCodeData, -): string { - return JSON.stringify( - CreateAuthKeysCodeData$outboundSchema.parse(createAuthKeysCodeData), - ); -} - export function createAuthKeysCodeDataFromJSON( jsonString: string, ): SafeParseResult { @@ -257,40 +146,6 @@ export const CreateAuthKeysCodeResponse$inboundSchema: z.ZodType< data: z.lazy(() => CreateAuthKeysCodeData$inboundSchema), }); -/** @internal */ -export type CreateAuthKeysCodeResponse$Outbound = { - data: CreateAuthKeysCodeData$Outbound; -}; - -/** @internal */ -export const CreateAuthKeysCodeResponse$outboundSchema: z.ZodType< - CreateAuthKeysCodeResponse$Outbound, - CreateAuthKeysCodeResponse -> = z.object({ - data: z.lazy(() => CreateAuthKeysCodeData$outboundSchema), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateAuthKeysCodeResponse$ { - /** @deprecated use `CreateAuthKeysCodeResponse$inboundSchema` instead. */ - export const inboundSchema = CreateAuthKeysCodeResponse$inboundSchema; - /** @deprecated use `CreateAuthKeysCodeResponse$outboundSchema` instead. */ - export const outboundSchema = CreateAuthKeysCodeResponse$outboundSchema; - /** @deprecated use `CreateAuthKeysCodeResponse$Outbound` instead. */ - export type Outbound = CreateAuthKeysCodeResponse$Outbound; -} - -export function createAuthKeysCodeResponseToJSON( - createAuthKeysCodeResponse: CreateAuthKeysCodeResponse, -): string { - return JSON.stringify( - CreateAuthKeysCodeResponse$outboundSchema.parse(createAuthKeysCodeResponse), - ); -} - export function createAuthKeysCodeResponseFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/createcoinbasecharge.ts b/src/models/operations/createcoinbasecharge.ts index f95c30cc..bab9d0e9 100644 --- a/src/models/operations/createcoinbasecharge.ts +++ b/src/models/operations/createcoinbasecharge.ts @@ -54,14 +54,6 @@ export type CreateCoinbaseChargeResponse = { data: CreateCoinbaseChargeData; }; -/** @internal */ -export const CreateCoinbaseChargeSecurity$inboundSchema: z.ZodType< - CreateCoinbaseChargeSecurity, - unknown -> = z.object({ - bearer: z.string(), -}); - /** @internal */ export type CreateCoinbaseChargeSecurity$Outbound = { bearer: string; @@ -75,19 +67,6 @@ export const CreateCoinbaseChargeSecurity$outboundSchema: z.ZodType< bearer: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateCoinbaseChargeSecurity$ { - /** @deprecated use `CreateCoinbaseChargeSecurity$inboundSchema` instead. */ - export const inboundSchema = CreateCoinbaseChargeSecurity$inboundSchema; - /** @deprecated use `CreateCoinbaseChargeSecurity$outboundSchema` instead. */ - export const outboundSchema = CreateCoinbaseChargeSecurity$outboundSchema; - /** @deprecated use `CreateCoinbaseChargeSecurity$Outbound` instead. */ - export type Outbound = CreateCoinbaseChargeSecurity$Outbound; -} - export function createCoinbaseChargeSecurityToJSON( createCoinbaseChargeSecurity: CreateCoinbaseChargeSecurity, ): string { @@ -98,16 +77,6 @@ export function createCoinbaseChargeSecurityToJSON( ); } -export function createCoinbaseChargeSecurityFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CreateCoinbaseChargeSecurity$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CreateCoinbaseChargeSecurity' from JSON`, - ); -} - /** @internal */ export const CallData$inboundSchema: z.ZodType = z.object({ deadline: z.string(), @@ -129,59 +98,6 @@ export const CallData$inboundSchema: z.ZodType = z.object({ }); }); -/** @internal */ -export type CallData$Outbound = { - deadline: string; - fee_amount: string; - id: string; - operator: string; - prefix: string; - recipient: string; - recipient_amount: string; - recipient_currency: string; - refund_destination: string; - signature: string; -}; - -/** @internal */ -export const CallData$outboundSchema: z.ZodType = z - .object({ - deadline: z.string(), - feeAmount: z.string(), - id: z.string(), - operator: z.string(), - prefix: z.string(), - recipient: z.string(), - recipientAmount: z.string(), - recipientCurrency: z.string(), - refundDestination: z.string(), - signature: z.string(), - }).transform((v) => { - return remap$(v, { - feeAmount: "fee_amount", - recipientAmount: "recipient_amount", - recipientCurrency: "recipient_currency", - refundDestination: "refund_destination", - }); - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CallData$ { - /** @deprecated use `CallData$inboundSchema` instead. */ - export const inboundSchema = CallData$inboundSchema; - /** @deprecated use `CallData$outboundSchema` instead. */ - export const outboundSchema = CallData$outboundSchema; - /** @deprecated use `CallData$Outbound` instead. */ - export type Outbound = CallData$Outbound; -} - -export function callDataToJSON(callData: CallData): string { - return JSON.stringify(CallData$outboundSchema.parse(callData)); -} - export function callDataFromJSON( jsonString: string, ): SafeParseResult { @@ -204,43 +120,6 @@ export const Metadata$inboundSchema: z.ZodType = z.object({ }); }); -/** @internal */ -export type Metadata$Outbound = { - chain_id: number; - contract_address: string; - sender: string; -}; - -/** @internal */ -export const Metadata$outboundSchema: z.ZodType = z - .object({ - chainId: z.number(), - contractAddress: z.string(), - sender: z.string(), - }).transform((v) => { - return remap$(v, { - chainId: "chain_id", - contractAddress: "contract_address", - }); - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Metadata$ { - /** @deprecated use `Metadata$inboundSchema` instead. */ - export const inboundSchema = Metadata$inboundSchema; - /** @deprecated use `Metadata$outboundSchema` instead. */ - export const outboundSchema = Metadata$outboundSchema; - /** @deprecated use `Metadata$Outbound` instead. */ - export type Outbound = Metadata$Outbound; -} - -export function metadataToJSON(metadata: Metadata): string { - return JSON.stringify(Metadata$outboundSchema.parse(metadata)); -} - export function metadataFromJSON( jsonString: string, ): SafeParseResult { @@ -262,42 +141,6 @@ export const TransferIntent$inboundSchema: z.ZodType = }); }); -/** @internal */ -export type TransferIntent$Outbound = { - call_data: CallData$Outbound; - metadata: Metadata$Outbound; -}; - -/** @internal */ -export const TransferIntent$outboundSchema: z.ZodType< - TransferIntent$Outbound, - TransferIntent -> = z.object({ - callData: z.lazy(() => CallData$outboundSchema), - metadata: z.lazy(() => Metadata$outboundSchema), -}).transform((v) => { - return remap$(v, { - callData: "call_data", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace TransferIntent$ { - /** @deprecated use `TransferIntent$inboundSchema` instead. */ - export const inboundSchema = TransferIntent$inboundSchema; - /** @deprecated use `TransferIntent$outboundSchema` instead. */ - export const outboundSchema = TransferIntent$outboundSchema; - /** @deprecated use `TransferIntent$Outbound` instead. */ - export type Outbound = TransferIntent$Outbound; -} - -export function transferIntentToJSON(transferIntent: TransferIntent): string { - return JSON.stringify(TransferIntent$outboundSchema.parse(transferIntent)); -} - export function transferIntentFromJSON( jsonString: string, ): SafeParseResult { @@ -317,38 +160,6 @@ export const Web3Data$inboundSchema: z.ZodType = z.object({ }); }); -/** @internal */ -export type Web3Data$Outbound = { - transfer_intent: TransferIntent$Outbound; -}; - -/** @internal */ -export const Web3Data$outboundSchema: z.ZodType = z - .object({ - transferIntent: z.lazy(() => TransferIntent$outboundSchema), - }).transform((v) => { - return remap$(v, { - transferIntent: "transfer_intent", - }); - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Web3Data$ { - /** @deprecated use `Web3Data$inboundSchema` instead. */ - export const inboundSchema = Web3Data$inboundSchema; - /** @deprecated use `Web3Data$outboundSchema` instead. */ - export const outboundSchema = Web3Data$outboundSchema; - /** @deprecated use `Web3Data$Outbound` instead. */ - export type Outbound = Web3Data$Outbound; -} - -export function web3DataToJSON(web3Data: Web3Data): string { - return JSON.stringify(Web3Data$outboundSchema.parse(web3Data)); -} - export function web3DataFromJSON( jsonString: string, ): SafeParseResult { @@ -376,52 +187,6 @@ export const CreateCoinbaseChargeData$inboundSchema: z.ZodType< }); }); -/** @internal */ -export type CreateCoinbaseChargeData$Outbound = { - id: string; - created_at: string; - expires_at: string; - web3_data: Web3Data$Outbound; -}; - -/** @internal */ -export const CreateCoinbaseChargeData$outboundSchema: z.ZodType< - CreateCoinbaseChargeData$Outbound, - CreateCoinbaseChargeData -> = z.object({ - id: z.string(), - createdAt: z.string(), - expiresAt: z.string(), - web3Data: z.lazy(() => Web3Data$outboundSchema), -}).transform((v) => { - return remap$(v, { - createdAt: "created_at", - expiresAt: "expires_at", - web3Data: "web3_data", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateCoinbaseChargeData$ { - /** @deprecated use `CreateCoinbaseChargeData$inboundSchema` instead. */ - export const inboundSchema = CreateCoinbaseChargeData$inboundSchema; - /** @deprecated use `CreateCoinbaseChargeData$outboundSchema` instead. */ - export const outboundSchema = CreateCoinbaseChargeData$outboundSchema; - /** @deprecated use `CreateCoinbaseChargeData$Outbound` instead. */ - export type Outbound = CreateCoinbaseChargeData$Outbound; -} - -export function createCoinbaseChargeDataToJSON( - createCoinbaseChargeData: CreateCoinbaseChargeData, -): string { - return JSON.stringify( - CreateCoinbaseChargeData$outboundSchema.parse(createCoinbaseChargeData), - ); -} - export function createCoinbaseChargeDataFromJSON( jsonString: string, ): SafeParseResult { @@ -440,42 +205,6 @@ export const CreateCoinbaseChargeResponse$inboundSchema: z.ZodType< data: z.lazy(() => CreateCoinbaseChargeData$inboundSchema), }); -/** @internal */ -export type CreateCoinbaseChargeResponse$Outbound = { - data: CreateCoinbaseChargeData$Outbound; -}; - -/** @internal */ -export const CreateCoinbaseChargeResponse$outboundSchema: z.ZodType< - CreateCoinbaseChargeResponse$Outbound, - CreateCoinbaseChargeResponse -> = z.object({ - data: z.lazy(() => CreateCoinbaseChargeData$outboundSchema), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateCoinbaseChargeResponse$ { - /** @deprecated use `CreateCoinbaseChargeResponse$inboundSchema` instead. */ - export const inboundSchema = CreateCoinbaseChargeResponse$inboundSchema; - /** @deprecated use `CreateCoinbaseChargeResponse$outboundSchema` instead. */ - export const outboundSchema = CreateCoinbaseChargeResponse$outboundSchema; - /** @deprecated use `CreateCoinbaseChargeResponse$Outbound` instead. */ - export type Outbound = CreateCoinbaseChargeResponse$Outbound; -} - -export function createCoinbaseChargeResponseToJSON( - createCoinbaseChargeResponse: CreateCoinbaseChargeResponse, -): string { - return JSON.stringify( - CreateCoinbaseChargeResponse$outboundSchema.parse( - createCoinbaseChargeResponse, - ), - ); -} - export function createCoinbaseChargeResponseFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/createembeddings.ts b/src/models/operations/createembeddings.ts index 864a6bd7..3f777af1 100644 --- a/src/models/operations/createembeddings.ts +++ b/src/models/operations/createembeddings.ts @@ -5,12 +5,7 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; -import { - catchUnrecognizedEnum, - ClosedEnum, - OpenEnum, - Unrecognized, -} from "../../types/enums.js"; +import { ClosedEnum, OpenEnum, Unrecognized } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import * as models from "../index.js"; @@ -197,14 +192,6 @@ export type CreateEmbeddingsResponseBody = { export type CreateEmbeddingsResponse = CreateEmbeddingsResponseBody | string; -/** @internal */ -export const Input$inboundSchema: z.ZodType = z.union([ - z.string(), - z.array(z.string()), - z.array(z.number()), - z.array(z.array(z.number())), -]); - /** @internal */ export type Input$Outbound = | string @@ -220,41 +207,10 @@ export const Input$outboundSchema: z.ZodType = z.union([ z.array(z.array(z.number())), ]); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Input$ { - /** @deprecated use `Input$inboundSchema` instead. */ - export const inboundSchema = Input$inboundSchema; - /** @deprecated use `Input$outboundSchema` instead. */ - export const outboundSchema = Input$outboundSchema; - /** @deprecated use `Input$Outbound` instead. */ - export type Outbound = Input$Outbound; -} - export function inputToJSON(input: Input): string { return JSON.stringify(Input$outboundSchema.parse(input)); } -export function inputFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Input$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Input' from JSON`, - ); -} - -/** @internal */ -export const DataCollection$inboundSchema: z.ZodType = - z - .union([ - z.enum(DataCollection), - z.string().transform(catchUnrecognizedEnum), - ]); - /** @internal */ export const DataCollection$outboundSchema: z.ZodType< DataCollection, @@ -264,23 +220,6 @@ export const DataCollection$outboundSchema: z.ZodType< z.string().and(z.custom>()), ]); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace DataCollection$ { - /** @deprecated use `DataCollection$inboundSchema` instead. */ - export const inboundSchema = DataCollection$inboundSchema; - /** @deprecated use `DataCollection$outboundSchema` instead. */ - export const outboundSchema = DataCollection$outboundSchema; -} - -/** @internal */ -export const Order$inboundSchema: z.ZodType = z.union([ - models.ProviderName$inboundSchema, - z.string(), -]); - /** @internal */ export type Order$Outbound = string | string; @@ -290,39 +229,10 @@ export const Order$outboundSchema: z.ZodType = z.union([ z.string(), ]); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Order$ { - /** @deprecated use `Order$inboundSchema` instead. */ - export const inboundSchema = Order$inboundSchema; - /** @deprecated use `Order$outboundSchema` instead. */ - export const outboundSchema = Order$outboundSchema; - /** @deprecated use `Order$Outbound` instead. */ - export type Outbound = Order$Outbound; -} - export function orderToJSON(order: Order): string { return JSON.stringify(Order$outboundSchema.parse(order)); } -export function orderFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Order$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Order' from JSON`, - ); -} - -/** @internal */ -export const Only$inboundSchema: z.ZodType = z.union([ - models.ProviderName$inboundSchema, - z.string(), -]); - /** @internal */ export type Only$Outbound = string | string; @@ -332,39 +242,10 @@ export const Only$outboundSchema: z.ZodType = z.union([ z.string(), ]); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Only$ { - /** @deprecated use `Only$inboundSchema` instead. */ - export const inboundSchema = Only$inboundSchema; - /** @deprecated use `Only$outboundSchema` instead. */ - export const outboundSchema = Only$outboundSchema; - /** @deprecated use `Only$Outbound` instead. */ - export type Outbound = Only$Outbound; -} - export function onlyToJSON(only: Only): string { return JSON.stringify(Only$outboundSchema.parse(only)); } -export function onlyFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Only$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Only' from JSON`, - ); -} - -/** @internal */ -export const Ignore$inboundSchema: z.ZodType = z.union([ - models.ProviderName$inboundSchema, - z.string(), -]); - /** @internal */ export type Ignore$Outbound = string | string; @@ -372,66 +253,16 @@ export type Ignore$Outbound = string | string; export const Ignore$outboundSchema: z.ZodType = z .union([models.ProviderName$outboundSchema, z.string()]); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Ignore$ { - /** @deprecated use `Ignore$inboundSchema` instead. */ - export const inboundSchema = Ignore$inboundSchema; - /** @deprecated use `Ignore$outboundSchema` instead. */ - export const outboundSchema = Ignore$outboundSchema; - /** @deprecated use `Ignore$Outbound` instead. */ - export type Outbound = Ignore$Outbound; -} - export function ignoreToJSON(ignore: Ignore): string { return JSON.stringify(Ignore$outboundSchema.parse(ignore)); } -export function ignoreFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Ignore$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Ignore' from JSON`, - ); -} - -/** @internal */ -export const Sort$inboundSchema: z.ZodType = z - .union([ - z.enum(Sort), - z.string().transform(catchUnrecognizedEnum), - ]); - /** @internal */ export const Sort$outboundSchema: z.ZodType = z.union([ z.enum(Sort), z.string().and(z.custom>()), ]); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Sort$ { - /** @deprecated use `Sort$inboundSchema` instead. */ - export const inboundSchema = Sort$inboundSchema; - /** @deprecated use `Sort$outboundSchema` instead. */ - export const outboundSchema = Sort$outboundSchema; -} - -/** @internal */ -export const MaxPrice$inboundSchema: z.ZodType = z.object({ - prompt: z.any().optional(), - completion: z.any().optional(), - image: z.any().optional(), - audio: z.any().optional(), - request: z.any().optional(), -}); - /** @internal */ export type MaxPrice$Outbound = { prompt?: any | undefined; @@ -451,37 +282,10 @@ export const MaxPrice$outboundSchema: z.ZodType = z request: z.any().optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace MaxPrice$ { - /** @deprecated use `MaxPrice$inboundSchema` instead. */ - export const inboundSchema = MaxPrice$inboundSchema; - /** @deprecated use `MaxPrice$outboundSchema` instead. */ - export const outboundSchema = MaxPrice$outboundSchema; - /** @deprecated use `MaxPrice$Outbound` instead. */ - export type Outbound = MaxPrice$Outbound; -} - export function maxPriceToJSON(maxPrice: MaxPrice): string { return JSON.stringify(MaxPrice$outboundSchema.parse(maxPrice)); } -export function maxPriceFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => MaxPrice$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'MaxPrice' from JSON`, - ); -} - -/** @internal */ -export const Experimental$inboundSchema: z.ZodType = z - .object({}); - /** @internal */ export type Experimental$Outbound = {}; @@ -491,65 +295,10 @@ export const Experimental$outboundSchema: z.ZodType< Experimental > = z.object({}); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Experimental$ { - /** @deprecated use `Experimental$inboundSchema` instead. */ - export const inboundSchema = Experimental$inboundSchema; - /** @deprecated use `Experimental$outboundSchema` instead. */ - export const outboundSchema = Experimental$outboundSchema; - /** @deprecated use `Experimental$Outbound` instead. */ - export type Outbound = Experimental$Outbound; -} - export function experimentalToJSON(experimental: Experimental): string { return JSON.stringify(Experimental$outboundSchema.parse(experimental)); } -export function experimentalFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Experimental$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Experimental' from JSON`, - ); -} - -/** @internal */ -export const CreateEmbeddingsProvider$inboundSchema: z.ZodType< - CreateEmbeddingsProvider, - unknown -> = z.object({ - allow_fallbacks: z.nullable(z.boolean()).optional(), - require_parameters: z.nullable(z.boolean()).optional(), - data_collection: z.nullable(DataCollection$inboundSchema).optional(), - zdr: z.nullable(z.boolean()).optional(), - order: z.nullable( - z.array(z.union([models.ProviderName$inboundSchema, z.string()])), - ).optional(), - only: z.nullable( - z.array(z.union([models.ProviderName$inboundSchema, z.string()])), - ).optional(), - ignore: z.nullable( - z.array(z.union([models.ProviderName$inboundSchema, z.string()])), - ).optional(), - quantizations: z.nullable(z.array(models.Quantization$inboundSchema)) - .optional(), - sort: z.nullable(Sort$inboundSchema).optional(), - max_price: z.lazy(() => MaxPrice$inboundSchema).optional(), - experimental: z.nullable(z.lazy(() => Experimental$inboundSchema)).optional(), -}).transform((v) => { - return remap$(v, { - "allow_fallbacks": "allowFallbacks", - "require_parameters": "requireParameters", - "data_collection": "dataCollection", - "max_price": "maxPrice", - }); -}); - /** @internal */ export type CreateEmbeddingsProvider$Outbound = { allow_fallbacks?: boolean | null | undefined; @@ -598,19 +347,6 @@ export const CreateEmbeddingsProvider$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateEmbeddingsProvider$ { - /** @deprecated use `CreateEmbeddingsProvider$inboundSchema` instead. */ - export const inboundSchema = CreateEmbeddingsProvider$inboundSchema; - /** @deprecated use `CreateEmbeddingsProvider$outboundSchema` instead. */ - export const outboundSchema = CreateEmbeddingsProvider$outboundSchema; - /** @deprecated use `CreateEmbeddingsProvider$Outbound` instead. */ - export type Outbound = CreateEmbeddingsProvider$Outbound; -} - export function createEmbeddingsProviderToJSON( createEmbeddingsProvider: CreateEmbeddingsProvider, ): string { @@ -619,64 +355,15 @@ export function createEmbeddingsProviderToJSON( ); } -export function createEmbeddingsProviderFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CreateEmbeddingsProvider$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CreateEmbeddingsProvider' from JSON`, - ); -} - -/** @internal */ -export const EncodingFormatBase64$inboundSchema: z.ZodEnum< - typeof EncodingFormatBase64 -> = z.enum(EncodingFormatBase64); - /** @internal */ export const EncodingFormatBase64$outboundSchema: z.ZodEnum< typeof EncodingFormatBase64 -> = EncodingFormatBase64$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace EncodingFormatBase64$ { - /** @deprecated use `EncodingFormatBase64$inboundSchema` instead. */ - export const inboundSchema = EncodingFormatBase64$inboundSchema; - /** @deprecated use `EncodingFormatBase64$outboundSchema` instead. */ - export const outboundSchema = EncodingFormatBase64$outboundSchema; -} - -/** @internal */ -export const EncodingFormatFloat$inboundSchema: z.ZodEnum< - typeof EncodingFormatFloat -> = z.enum(EncodingFormatFloat); +> = z.enum(EncodingFormatBase64); /** @internal */ export const EncodingFormatFloat$outboundSchema: z.ZodEnum< typeof EncodingFormatFloat -> = EncodingFormatFloat$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace EncodingFormatFloat$ { - /** @deprecated use `EncodingFormatFloat$inboundSchema` instead. */ - export const inboundSchema = EncodingFormatFloat$inboundSchema; - /** @deprecated use `EncodingFormatFloat$outboundSchema` instead. */ - export const outboundSchema = EncodingFormatFloat$outboundSchema; -} - -/** @internal */ -export const EncodingFormat$inboundSchema: z.ZodType = - z.union([ - EncodingFormatFloat$inboundSchema, - EncodingFormatBase64$inboundSchema, - ]); +> = z.enum(EncodingFormatFloat); /** @internal */ export type EncodingFormat$Outbound = string | string; @@ -690,57 +377,10 @@ export const EncodingFormat$outboundSchema: z.ZodType< EncodingFormatBase64$outboundSchema, ]); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace EncodingFormat$ { - /** @deprecated use `EncodingFormat$inboundSchema` instead. */ - export const inboundSchema = EncodingFormat$inboundSchema; - /** @deprecated use `EncodingFormat$outboundSchema` instead. */ - export const outboundSchema = EncodingFormat$outboundSchema; - /** @deprecated use `EncodingFormat$Outbound` instead. */ - export type Outbound = EncodingFormat$Outbound; -} - export function encodingFormatToJSON(encodingFormat: EncodingFormat): string { return JSON.stringify(EncodingFormat$outboundSchema.parse(encodingFormat)); } -export function encodingFormatFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => EncodingFormat$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'EncodingFormat' from JSON`, - ); -} - -/** @internal */ -export const CreateEmbeddingsRequest$inboundSchema: z.ZodType< - CreateEmbeddingsRequest, - unknown -> = z.object({ - input: z.union([ - z.string(), - z.array(z.string()), - z.array(z.number()), - z.array(z.array(z.number())), - ]), - model: z.string(), - provider: z.lazy(() => CreateEmbeddingsProvider$inboundSchema).optional(), - encoding_format: z.union([ - EncodingFormatFloat$inboundSchema, - EncodingFormatBase64$inboundSchema, - ]).optional(), - user: z.string().optional(), -}).transform((v) => { - return remap$(v, { - "encoding_format": "encodingFormat", - }); -}); - /** @internal */ export type CreateEmbeddingsRequest$Outbound = { input: string | Array | Array | Array>; @@ -774,19 +414,6 @@ export const CreateEmbeddingsRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateEmbeddingsRequest$ { - /** @deprecated use `CreateEmbeddingsRequest$inboundSchema` instead. */ - export const inboundSchema = CreateEmbeddingsRequest$inboundSchema; - /** @deprecated use `CreateEmbeddingsRequest$outboundSchema` instead. */ - export const outboundSchema = CreateEmbeddingsRequest$outboundSchema; - /** @deprecated use `CreateEmbeddingsRequest$Outbound` instead. */ - export type Outbound = CreateEmbeddingsRequest$Outbound; -} - export function createEmbeddingsRequestToJSON( createEmbeddingsRequest: CreateEmbeddingsRequest, ): string { @@ -795,85 +422,19 @@ export function createEmbeddingsRequestToJSON( ); } -export function createEmbeddingsRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CreateEmbeddingsRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CreateEmbeddingsRequest' from JSON`, - ); -} - /** @internal */ export const ObjectT$inboundSchema: z.ZodEnum = z.enum(ObjectT); -/** @internal */ -export const ObjectT$outboundSchema: z.ZodEnum = - ObjectT$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ObjectT$ { - /** @deprecated use `ObjectT$inboundSchema` instead. */ - export const inboundSchema = ObjectT$inboundSchema; - /** @deprecated use `ObjectT$outboundSchema` instead. */ - export const outboundSchema = ObjectT$outboundSchema; -} - /** @internal */ export const ObjectEmbedding$inboundSchema: z.ZodEnum = z.enum(ObjectEmbedding); -/** @internal */ -export const ObjectEmbedding$outboundSchema: z.ZodEnum = - ObjectEmbedding$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ObjectEmbedding$ { - /** @deprecated use `ObjectEmbedding$inboundSchema` instead. */ - export const inboundSchema = ObjectEmbedding$inboundSchema; - /** @deprecated use `ObjectEmbedding$outboundSchema` instead. */ - export const outboundSchema = ObjectEmbedding$outboundSchema; -} - /** @internal */ export const Embedding$inboundSchema: z.ZodType = z.union([ z.array(z.number()), z.string(), ]); -/** @internal */ -export type Embedding$Outbound = Array | string; - -/** @internal */ -export const Embedding$outboundSchema: z.ZodType< - Embedding$Outbound, - Embedding -> = z.union([z.array(z.number()), z.string()]); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Embedding$ { - /** @deprecated use `Embedding$inboundSchema` instead. */ - export const inboundSchema = Embedding$inboundSchema; - /** @deprecated use `Embedding$outboundSchema` instead. */ - export const outboundSchema = Embedding$outboundSchema; - /** @deprecated use `Embedding$Outbound` instead. */ - export type Outbound = Embedding$Outbound; -} - -export function embeddingToJSON(embedding: Embedding): string { - return JSON.stringify(Embedding$outboundSchema.parse(embedding)); -} - export function embeddingFromJSON( jsonString: string, ): SafeParseResult { @@ -894,44 +455,6 @@ export const CreateEmbeddingsData$inboundSchema: z.ZodType< index: z.number().optional(), }); -/** @internal */ -export type CreateEmbeddingsData$Outbound = { - object: string; - embedding: Array | string; - index?: number | undefined; -}; - -/** @internal */ -export const CreateEmbeddingsData$outboundSchema: z.ZodType< - CreateEmbeddingsData$Outbound, - CreateEmbeddingsData -> = z.object({ - object: ObjectEmbedding$outboundSchema, - embedding: z.union([z.array(z.number()), z.string()]), - index: z.number().optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateEmbeddingsData$ { - /** @deprecated use `CreateEmbeddingsData$inboundSchema` instead. */ - export const inboundSchema = CreateEmbeddingsData$inboundSchema; - /** @deprecated use `CreateEmbeddingsData$outboundSchema` instead. */ - export const outboundSchema = CreateEmbeddingsData$outboundSchema; - /** @deprecated use `CreateEmbeddingsData$Outbound` instead. */ - export type Outbound = CreateEmbeddingsData$Outbound; -} - -export function createEmbeddingsDataToJSON( - createEmbeddingsData: CreateEmbeddingsData, -): string { - return JSON.stringify( - CreateEmbeddingsData$outboundSchema.parse(createEmbeddingsData), - ); -} - export function createEmbeddingsDataFromJSON( jsonString: string, ): SafeParseResult { @@ -954,42 +477,6 @@ export const Usage$inboundSchema: z.ZodType = z.object({ }); }); -/** @internal */ -export type Usage$Outbound = { - prompt_tokens: number; - total_tokens: number; - cost?: number | undefined; -}; - -/** @internal */ -export const Usage$outboundSchema: z.ZodType = z.object({ - promptTokens: z.number(), - totalTokens: z.number(), - cost: z.number().optional(), -}).transform((v) => { - return remap$(v, { - promptTokens: "prompt_tokens", - totalTokens: "total_tokens", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Usage$ { - /** @deprecated use `Usage$inboundSchema` instead. */ - export const inboundSchema = Usage$inboundSchema; - /** @deprecated use `Usage$outboundSchema` instead. */ - export const outboundSchema = Usage$outboundSchema; - /** @deprecated use `Usage$Outbound` instead. */ - export type Outbound = Usage$Outbound; -} - -export function usageToJSON(usage: Usage): string { - return JSON.stringify(Usage$outboundSchema.parse(usage)); -} - export function usageFromJSON( jsonString: string, ): SafeParseResult { @@ -1012,50 +499,6 @@ export const CreateEmbeddingsResponseBody$inboundSchema: z.ZodType< usage: z.lazy(() => Usage$inboundSchema).optional(), }); -/** @internal */ -export type CreateEmbeddingsResponseBody$Outbound = { - id?: string | undefined; - object: string; - data: Array; - model: string; - usage?: Usage$Outbound | undefined; -}; - -/** @internal */ -export const CreateEmbeddingsResponseBody$outboundSchema: z.ZodType< - CreateEmbeddingsResponseBody$Outbound, - CreateEmbeddingsResponseBody -> = z.object({ - id: z.string().optional(), - object: ObjectT$outboundSchema, - data: z.array(z.lazy(() => CreateEmbeddingsData$outboundSchema)), - model: z.string(), - usage: z.lazy(() => Usage$outboundSchema).optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateEmbeddingsResponseBody$ { - /** @deprecated use `CreateEmbeddingsResponseBody$inboundSchema` instead. */ - export const inboundSchema = CreateEmbeddingsResponseBody$inboundSchema; - /** @deprecated use `CreateEmbeddingsResponseBody$outboundSchema` instead. */ - export const outboundSchema = CreateEmbeddingsResponseBody$outboundSchema; - /** @deprecated use `CreateEmbeddingsResponseBody$Outbound` instead. */ - export type Outbound = CreateEmbeddingsResponseBody$Outbound; -} - -export function createEmbeddingsResponseBodyToJSON( - createEmbeddingsResponseBody: CreateEmbeddingsResponseBody, -): string { - return JSON.stringify( - CreateEmbeddingsResponseBody$outboundSchema.parse( - createEmbeddingsResponseBody, - ), - ); -} - export function createEmbeddingsResponseBodyFromJSON( jsonString: string, ): SafeParseResult { @@ -1075,41 +518,6 @@ export const CreateEmbeddingsResponse$inboundSchema: z.ZodType< z.string(), ]); -/** @internal */ -export type CreateEmbeddingsResponse$Outbound = - | CreateEmbeddingsResponseBody$Outbound - | string; - -/** @internal */ -export const CreateEmbeddingsResponse$outboundSchema: z.ZodType< - CreateEmbeddingsResponse$Outbound, - CreateEmbeddingsResponse -> = z.union([ - z.lazy(() => CreateEmbeddingsResponseBody$outboundSchema), - z.string(), -]); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateEmbeddingsResponse$ { - /** @deprecated use `CreateEmbeddingsResponse$inboundSchema` instead. */ - export const inboundSchema = CreateEmbeddingsResponse$inboundSchema; - /** @deprecated use `CreateEmbeddingsResponse$outboundSchema` instead. */ - export const outboundSchema = CreateEmbeddingsResponse$outboundSchema; - /** @deprecated use `CreateEmbeddingsResponse$Outbound` instead. */ - export type Outbound = CreateEmbeddingsResponse$Outbound; -} - -export function createEmbeddingsResponseToJSON( - createEmbeddingsResponse: CreateEmbeddingsResponse, -): string { - return JSON.stringify( - CreateEmbeddingsResponse$outboundSchema.parse(createEmbeddingsResponse), - ); -} - export function createEmbeddingsResponseFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/createkeys.ts b/src/models/operations/createkeys.ts index 5fa5d03e..e0073d03 100644 --- a/src/models/operations/createkeys.ts +++ b/src/models/operations/createkeys.ts @@ -5,11 +5,7 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; -import { - catchUnrecognizedEnum, - OpenEnum, - Unrecognized, -} from "../../types/enums.js"; +import { OpenEnum, Unrecognized } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -137,16 +133,6 @@ export type CreateKeysResponse = { key: string; }; -/** @internal */ -export const CreateKeysLimitReset$inboundSchema: z.ZodType< - CreateKeysLimitReset, - unknown -> = z - .union([ - z.enum(CreateKeysLimitReset), - z.string().transform(catchUnrecognizedEnum), - ]); - /** @internal */ export const CreateKeysLimitReset$outboundSchema: z.ZodType< CreateKeysLimitReset, @@ -156,33 +142,6 @@ export const CreateKeysLimitReset$outboundSchema: z.ZodType< z.string().and(z.custom>()), ]); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateKeysLimitReset$ { - /** @deprecated use `CreateKeysLimitReset$inboundSchema` instead. */ - export const inboundSchema = CreateKeysLimitReset$inboundSchema; - /** @deprecated use `CreateKeysLimitReset$outboundSchema` instead. */ - export const outboundSchema = CreateKeysLimitReset$outboundSchema; -} - -/** @internal */ -export const CreateKeysRequest$inboundSchema: z.ZodType< - CreateKeysRequest, - unknown -> = z.object({ - name: z.string(), - limit: z.nullable(z.number()).optional(), - limit_reset: z.nullable(CreateKeysLimitReset$inboundSchema).optional(), - include_byok_in_limit: z.boolean().optional(), -}).transform((v) => { - return remap$(v, { - "limit_reset": "limitReset", - "include_byok_in_limit": "includeByokInLimit", - }); -}); - /** @internal */ export type CreateKeysRequest$Outbound = { name: string; @@ -207,19 +166,6 @@ export const CreateKeysRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateKeysRequest$ { - /** @deprecated use `CreateKeysRequest$inboundSchema` instead. */ - export const inboundSchema = CreateKeysRequest$inboundSchema; - /** @deprecated use `CreateKeysRequest$outboundSchema` instead. */ - export const outboundSchema = CreateKeysRequest$outboundSchema; - /** @deprecated use `CreateKeysRequest$Outbound` instead. */ - export type Outbound = CreateKeysRequest$Outbound; -} - export function createKeysRequestToJSON( createKeysRequest: CreateKeysRequest, ): string { @@ -228,16 +174,6 @@ export function createKeysRequestToJSON( ); } -export function createKeysRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => CreateKeysRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'CreateKeysRequest' from JSON`, - ); -} - /** @internal */ export const CreateKeysData$inboundSchema: z.ZodType = z.object({ @@ -276,85 +212,6 @@ export const CreateKeysData$inboundSchema: z.ZodType = }); }); -/** @internal */ -export type CreateKeysData$Outbound = { - hash: string; - name: string; - label: string; - disabled: boolean; - limit: number | null; - limit_remaining: number | null; - limit_reset: string | null; - include_byok_in_limit: boolean; - usage: number; - usage_daily: number; - usage_weekly: number; - usage_monthly: number; - byok_usage: number; - byok_usage_daily: number; - byok_usage_weekly: number; - byok_usage_monthly: number; - created_at: string; - updated_at: string | null; -}; - -/** @internal */ -export const CreateKeysData$outboundSchema: z.ZodType< - CreateKeysData$Outbound, - CreateKeysData -> = z.object({ - hash: z.string(), - name: z.string(), - label: z.string(), - disabled: z.boolean(), - limit: z.nullable(z.number()), - limitRemaining: z.nullable(z.number()), - limitReset: z.nullable(z.string()), - includeByokInLimit: z.boolean(), - usage: z.number(), - usageDaily: z.number(), - usageWeekly: z.number(), - usageMonthly: z.number(), - byokUsage: z.number(), - byokUsageDaily: z.number(), - byokUsageWeekly: z.number(), - byokUsageMonthly: z.number(), - createdAt: z.string(), - updatedAt: z.nullable(z.string()), -}).transform((v) => { - return remap$(v, { - limitRemaining: "limit_remaining", - limitReset: "limit_reset", - includeByokInLimit: "include_byok_in_limit", - usageDaily: "usage_daily", - usageWeekly: "usage_weekly", - usageMonthly: "usage_monthly", - byokUsage: "byok_usage", - byokUsageDaily: "byok_usage_daily", - byokUsageWeekly: "byok_usage_weekly", - byokUsageMonthly: "byok_usage_monthly", - createdAt: "created_at", - updatedAt: "updated_at", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateKeysData$ { - /** @deprecated use `CreateKeysData$inboundSchema` instead. */ - export const inboundSchema = CreateKeysData$inboundSchema; - /** @deprecated use `CreateKeysData$outboundSchema` instead. */ - export const outboundSchema = CreateKeysData$outboundSchema; - /** @deprecated use `CreateKeysData$Outbound` instead. */ - export type Outbound = CreateKeysData$Outbound; -} - -export function createKeysDataToJSON(createKeysData: CreateKeysData): string { - return JSON.stringify(CreateKeysData$outboundSchema.parse(createKeysData)); -} - export function createKeysDataFromJSON( jsonString: string, ): SafeParseResult { @@ -374,42 +231,6 @@ export const CreateKeysResponse$inboundSchema: z.ZodType< key: z.string(), }); -/** @internal */ -export type CreateKeysResponse$Outbound = { - data: CreateKeysData$Outbound; - key: string; -}; - -/** @internal */ -export const CreateKeysResponse$outboundSchema: z.ZodType< - CreateKeysResponse$Outbound, - CreateKeysResponse -> = z.object({ - data: z.lazy(() => CreateKeysData$outboundSchema), - key: z.string(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateKeysResponse$ { - /** @deprecated use `CreateKeysResponse$inboundSchema` instead. */ - export const inboundSchema = CreateKeysResponse$inboundSchema; - /** @deprecated use `CreateKeysResponse$outboundSchema` instead. */ - export const outboundSchema = CreateKeysResponse$outboundSchema; - /** @deprecated use `CreateKeysResponse$Outbound` instead. */ - export type Outbound = CreateKeysResponse$Outbound; -} - -export function createKeysResponseToJSON( - createKeysResponse: CreateKeysResponse, -): string { - return JSON.stringify( - CreateKeysResponse$outboundSchema.parse(createKeysResponse), - ); -} - export function createKeysResponseFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/createresponses.ts b/src/models/operations/createresponses.ts index 08d79bfe..44c4e3e5 100644 --- a/src/models/operations/createresponses.ts +++ b/src/models/operations/createresponses.ts @@ -41,42 +41,6 @@ export const CreateResponsesResponseBody$inboundSchema: z.ZodType< }).pipe(models.OpenResponsesStreamEvent$inboundSchema), }); -/** @internal */ -export type CreateResponsesResponseBody$Outbound = { - data: models.OpenResponsesStreamEvent$Outbound; -}; - -/** @internal */ -export const CreateResponsesResponseBody$outboundSchema: z.ZodType< - CreateResponsesResponseBody$Outbound, - CreateResponsesResponseBody -> = z.object({ - data: models.OpenResponsesStreamEvent$outboundSchema, -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateResponsesResponseBody$ { - /** @deprecated use `CreateResponsesResponseBody$inboundSchema` instead. */ - export const inboundSchema = CreateResponsesResponseBody$inboundSchema; - /** @deprecated use `CreateResponsesResponseBody$outboundSchema` instead. */ - export const outboundSchema = CreateResponsesResponseBody$outboundSchema; - /** @deprecated use `CreateResponsesResponseBody$Outbound` instead. */ - export type Outbound = CreateResponsesResponseBody$Outbound; -} - -export function createResponsesResponseBodyToJSON( - createResponsesResponseBody: CreateResponsesResponseBody, -): string { - return JSON.stringify( - CreateResponsesResponseBody$outboundSchema.parse( - createResponsesResponseBody, - ), - ); -} - export function createResponsesResponseBodyFromJSON( jsonString: string, ): SafeParseResult { @@ -106,41 +70,6 @@ export const CreateResponsesResponse$inboundSchema: z.ZodType< }), ]); -/** @internal */ -export type CreateResponsesResponse$Outbound = - | models.OpenResponsesNonStreamingResponse$Outbound - | never; - -/** @internal */ -export const CreateResponsesResponse$outboundSchema: z.ZodType< - CreateResponsesResponse$Outbound, - CreateResponsesResponse -> = z.union([ - models.OpenResponsesNonStreamingResponse$outboundSchema, - z.never(), -]); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CreateResponsesResponse$ { - /** @deprecated use `CreateResponsesResponse$inboundSchema` instead. */ - export const inboundSchema = CreateResponsesResponse$inboundSchema; - /** @deprecated use `CreateResponsesResponse$outboundSchema` instead. */ - export const outboundSchema = CreateResponsesResponse$outboundSchema; - /** @deprecated use `CreateResponsesResponse$Outbound` instead. */ - export type Outbound = CreateResponsesResponse$Outbound; -} - -export function createResponsesResponseToJSON( - createResponsesResponse: CreateResponsesResponse, -): string { - return JSON.stringify( - CreateResponsesResponse$outboundSchema.parse(createResponsesResponse), - ); -} - export function createResponsesResponseFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/deletekeys.ts b/src/models/operations/deletekeys.ts index 8bb156a1..9fc5fc73 100644 --- a/src/models/operations/deletekeys.ts +++ b/src/models/operations/deletekeys.ts @@ -24,14 +24,6 @@ export type DeleteKeysResponse = { deleted: true; }; -/** @internal */ -export const DeleteKeysRequest$inboundSchema: z.ZodType< - DeleteKeysRequest, - unknown -> = z.object({ - hash: z.string(), -}); - /** @internal */ export type DeleteKeysRequest$Outbound = { hash: string; @@ -45,19 +37,6 @@ export const DeleteKeysRequest$outboundSchema: z.ZodType< hash: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace DeleteKeysRequest$ { - /** @deprecated use `DeleteKeysRequest$inboundSchema` instead. */ - export const inboundSchema = DeleteKeysRequest$inboundSchema; - /** @deprecated use `DeleteKeysRequest$outboundSchema` instead. */ - export const outboundSchema = DeleteKeysRequest$outboundSchema; - /** @deprecated use `DeleteKeysRequest$Outbound` instead. */ - export type Outbound = DeleteKeysRequest$Outbound; -} - export function deleteKeysRequestToJSON( deleteKeysRequest: DeleteKeysRequest, ): string { @@ -66,16 +45,6 @@ export function deleteKeysRequestToJSON( ); } -export function deleteKeysRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => DeleteKeysRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'DeleteKeysRequest' from JSON`, - ); -} - /** @internal */ export const DeleteKeysResponse$inboundSchema: z.ZodType< DeleteKeysResponse, @@ -84,40 +53,6 @@ export const DeleteKeysResponse$inboundSchema: z.ZodType< deleted: z.literal(true), }); -/** @internal */ -export type DeleteKeysResponse$Outbound = { - deleted: true; -}; - -/** @internal */ -export const DeleteKeysResponse$outboundSchema: z.ZodType< - DeleteKeysResponse$Outbound, - DeleteKeysResponse -> = z.object({ - deleted: z.literal(true), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace DeleteKeysResponse$ { - /** @deprecated use `DeleteKeysResponse$inboundSchema` instead. */ - export const inboundSchema = DeleteKeysResponse$inboundSchema; - /** @deprecated use `DeleteKeysResponse$outboundSchema` instead. */ - export const outboundSchema = DeleteKeysResponse$outboundSchema; - /** @deprecated use `DeleteKeysResponse$Outbound` instead. */ - export type Outbound = DeleteKeysResponse$Outbound; -} - -export function deleteKeysResponseToJSON( - deleteKeysResponse: DeleteKeysResponse, -): string { - return JSON.stringify( - DeleteKeysResponse$outboundSchema.parse(deleteKeysResponse), - ); -} - export function deleteKeysResponseFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/exchangeauthcodeforapikey.ts b/src/models/operations/exchangeauthcodeforapikey.ts index 409e2d31..f4f95175 100644 --- a/src/models/operations/exchangeauthcodeforapikey.ts +++ b/src/models/operations/exchangeauthcodeforapikey.ts @@ -5,11 +5,7 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; -import { - catchUnrecognizedEnum, - OpenEnum, - Unrecognized, -} from "../../types/enums.js"; +import { OpenEnum, Unrecognized } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -59,14 +55,6 @@ export type ExchangeAuthCodeForAPIKeyResponse = { userId: string | null; }; -/** @internal */ -export const ExchangeAuthCodeForAPIKeyCodeChallengeMethod$inboundSchema: - z.ZodType = z - .union([ - z.enum(ExchangeAuthCodeForAPIKeyCodeChallengeMethod), - z.string().transform(catchUnrecognizedEnum), - ]); - /** @internal */ export const ExchangeAuthCodeForAPIKeyCodeChallengeMethod$outboundSchema: z.ZodType< @@ -77,36 +65,6 @@ export const ExchangeAuthCodeForAPIKeyCodeChallengeMethod$outboundSchema: z.string().and(z.custom>()), ]); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ExchangeAuthCodeForAPIKeyCodeChallengeMethod$ { - /** @deprecated use `ExchangeAuthCodeForAPIKeyCodeChallengeMethod$inboundSchema` instead. */ - export const inboundSchema = - ExchangeAuthCodeForAPIKeyCodeChallengeMethod$inboundSchema; - /** @deprecated use `ExchangeAuthCodeForAPIKeyCodeChallengeMethod$outboundSchema` instead. */ - export const outboundSchema = - ExchangeAuthCodeForAPIKeyCodeChallengeMethod$outboundSchema; -} - -/** @internal */ -export const ExchangeAuthCodeForAPIKeyRequest$inboundSchema: z.ZodType< - ExchangeAuthCodeForAPIKeyRequest, - unknown -> = z.object({ - code: z.string(), - code_verifier: z.string().optional(), - code_challenge_method: z.nullable( - ExchangeAuthCodeForAPIKeyCodeChallengeMethod$inboundSchema, - ).optional(), -}).transform((v) => { - return remap$(v, { - "code_verifier": "codeVerifier", - "code_challenge_method": "codeChallengeMethod", - }); -}); - /** @internal */ export type ExchangeAuthCodeForAPIKeyRequest$Outbound = { code: string; @@ -131,19 +89,6 @@ export const ExchangeAuthCodeForAPIKeyRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ExchangeAuthCodeForAPIKeyRequest$ { - /** @deprecated use `ExchangeAuthCodeForAPIKeyRequest$inboundSchema` instead. */ - export const inboundSchema = ExchangeAuthCodeForAPIKeyRequest$inboundSchema; - /** @deprecated use `ExchangeAuthCodeForAPIKeyRequest$outboundSchema` instead. */ - export const outboundSchema = ExchangeAuthCodeForAPIKeyRequest$outboundSchema; - /** @deprecated use `ExchangeAuthCodeForAPIKeyRequest$Outbound` instead. */ - export type Outbound = ExchangeAuthCodeForAPIKeyRequest$Outbound; -} - export function exchangeAuthCodeForAPIKeyRequestToJSON( exchangeAuthCodeForAPIKeyRequest: ExchangeAuthCodeForAPIKeyRequest, ): string { @@ -154,16 +99,6 @@ export function exchangeAuthCodeForAPIKeyRequestToJSON( ); } -export function exchangeAuthCodeForAPIKeyRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ExchangeAuthCodeForAPIKeyRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ExchangeAuthCodeForAPIKeyRequest' from JSON`, - ); -} - /** @internal */ export const ExchangeAuthCodeForAPIKeyResponse$inboundSchema: z.ZodType< ExchangeAuthCodeForAPIKeyResponse, @@ -177,49 +112,6 @@ export const ExchangeAuthCodeForAPIKeyResponse$inboundSchema: z.ZodType< }); }); -/** @internal */ -export type ExchangeAuthCodeForAPIKeyResponse$Outbound = { - key: string; - user_id: string | null; -}; - -/** @internal */ -export const ExchangeAuthCodeForAPIKeyResponse$outboundSchema: z.ZodType< - ExchangeAuthCodeForAPIKeyResponse$Outbound, - ExchangeAuthCodeForAPIKeyResponse -> = z.object({ - key: z.string(), - userId: z.nullable(z.string()), -}).transform((v) => { - return remap$(v, { - userId: "user_id", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ExchangeAuthCodeForAPIKeyResponse$ { - /** @deprecated use `ExchangeAuthCodeForAPIKeyResponse$inboundSchema` instead. */ - export const inboundSchema = ExchangeAuthCodeForAPIKeyResponse$inboundSchema; - /** @deprecated use `ExchangeAuthCodeForAPIKeyResponse$outboundSchema` instead. */ - export const outboundSchema = - ExchangeAuthCodeForAPIKeyResponse$outboundSchema; - /** @deprecated use `ExchangeAuthCodeForAPIKeyResponse$Outbound` instead. */ - export type Outbound = ExchangeAuthCodeForAPIKeyResponse$Outbound; -} - -export function exchangeAuthCodeForAPIKeyResponseToJSON( - exchangeAuthCodeForAPIKeyResponse: ExchangeAuthCodeForAPIKeyResponse, -): string { - return JSON.stringify( - ExchangeAuthCodeForAPIKeyResponse$outboundSchema.parse( - exchangeAuthCodeForAPIKeyResponse, - ), - ); -} - export function exchangeAuthCodeForAPIKeyResponseFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/getcredits.ts b/src/models/operations/getcredits.ts index 3689dc08..345dbbe6 100644 --- a/src/models/operations/getcredits.ts +++ b/src/models/operations/getcredits.ts @@ -18,36 +18,6 @@ export const GetCreditsResponse$inboundSchema: z.ZodType< unknown > = z.object({}); -/** @internal */ -export type GetCreditsResponse$Outbound = {}; - -/** @internal */ -export const GetCreditsResponse$outboundSchema: z.ZodType< - GetCreditsResponse$Outbound, - GetCreditsResponse -> = z.object({}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetCreditsResponse$ { - /** @deprecated use `GetCreditsResponse$inboundSchema` instead. */ - export const inboundSchema = GetCreditsResponse$inboundSchema; - /** @deprecated use `GetCreditsResponse$outboundSchema` instead. */ - export const outboundSchema = GetCreditsResponse$outboundSchema; - /** @deprecated use `GetCreditsResponse$Outbound` instead. */ - export type Outbound = GetCreditsResponse$Outbound; -} - -export function getCreditsResponseToJSON( - getCreditsResponse: GetCreditsResponse, -): string { - return JSON.stringify( - GetCreditsResponse$outboundSchema.parse(getCreditsResponse), - ); -} - export function getCreditsResponseFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/getcurrentkey.ts b/src/models/operations/getcurrentkey.ts index e6080e28..583181a2 100644 --- a/src/models/operations/getcurrentkey.ts +++ b/src/models/operations/getcurrentkey.ts @@ -117,40 +117,6 @@ export const RateLimit$inboundSchema: z.ZodType = z.object({ note: z.string(), }); -/** @internal */ -export type RateLimit$Outbound = { - requests: number; - interval: string; - note: string; -}; - -/** @internal */ -export const RateLimit$outboundSchema: z.ZodType< - RateLimit$Outbound, - RateLimit -> = z.object({ - requests: z.number(), - interval: z.string(), - note: z.string(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace RateLimit$ { - /** @deprecated use `RateLimit$inboundSchema` instead. */ - export const inboundSchema = RateLimit$inboundSchema; - /** @deprecated use `RateLimit$outboundSchema` instead. */ - export const outboundSchema = RateLimit$outboundSchema; - /** @deprecated use `RateLimit$Outbound` instead. */ - export type Outbound = RateLimit$Outbound; -} - -export function rateLimitToJSON(rateLimit: RateLimit): string { - return JSON.stringify(RateLimit$outboundSchema.parse(rateLimit)); -} - export function rateLimitFromJSON( jsonString: string, ): SafeParseResult { @@ -200,86 +166,6 @@ export const GetCurrentKeyData$inboundSchema: z.ZodType< }); }); -/** @internal */ -export type GetCurrentKeyData$Outbound = { - label: string; - limit: number | null; - usage: number; - usage_daily: number; - usage_weekly: number; - usage_monthly: number; - byok_usage: number; - byok_usage_daily: number; - byok_usage_weekly: number; - byok_usage_monthly: number; - is_free_tier: boolean; - is_provisioning_key: boolean; - limit_remaining: number | null; - limit_reset: string | null; - include_byok_in_limit: boolean; - rate_limit: RateLimit$Outbound; -}; - -/** @internal */ -export const GetCurrentKeyData$outboundSchema: z.ZodType< - GetCurrentKeyData$Outbound, - GetCurrentKeyData -> = z.object({ - label: z.string(), - limit: z.nullable(z.number()), - usage: z.number(), - usageDaily: z.number(), - usageWeekly: z.number(), - usageMonthly: z.number(), - byokUsage: z.number(), - byokUsageDaily: z.number(), - byokUsageWeekly: z.number(), - byokUsageMonthly: z.number(), - isFreeTier: z.boolean(), - isProvisioningKey: z.boolean(), - limitRemaining: z.nullable(z.number()), - limitReset: z.nullable(z.string()), - includeByokInLimit: z.boolean(), - rateLimit: z.lazy(() => RateLimit$outboundSchema), -}).transform((v) => { - return remap$(v, { - usageDaily: "usage_daily", - usageWeekly: "usage_weekly", - usageMonthly: "usage_monthly", - byokUsage: "byok_usage", - byokUsageDaily: "byok_usage_daily", - byokUsageWeekly: "byok_usage_weekly", - byokUsageMonthly: "byok_usage_monthly", - isFreeTier: "is_free_tier", - isProvisioningKey: "is_provisioning_key", - limitRemaining: "limit_remaining", - limitReset: "limit_reset", - includeByokInLimit: "include_byok_in_limit", - rateLimit: "rate_limit", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetCurrentKeyData$ { - /** @deprecated use `GetCurrentKeyData$inboundSchema` instead. */ - export const inboundSchema = GetCurrentKeyData$inboundSchema; - /** @deprecated use `GetCurrentKeyData$outboundSchema` instead. */ - export const outboundSchema = GetCurrentKeyData$outboundSchema; - /** @deprecated use `GetCurrentKeyData$Outbound` instead. */ - export type Outbound = GetCurrentKeyData$Outbound; -} - -export function getCurrentKeyDataToJSON( - getCurrentKeyData: GetCurrentKeyData, -): string { - return JSON.stringify( - GetCurrentKeyData$outboundSchema.parse(getCurrentKeyData), - ); -} - export function getCurrentKeyDataFromJSON( jsonString: string, ): SafeParseResult { @@ -298,40 +184,6 @@ export const GetCurrentKeyResponse$inboundSchema: z.ZodType< data: z.lazy(() => GetCurrentKeyData$inboundSchema), }); -/** @internal */ -export type GetCurrentKeyResponse$Outbound = { - data: GetCurrentKeyData$Outbound; -}; - -/** @internal */ -export const GetCurrentKeyResponse$outboundSchema: z.ZodType< - GetCurrentKeyResponse$Outbound, - GetCurrentKeyResponse -> = z.object({ - data: z.lazy(() => GetCurrentKeyData$outboundSchema), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetCurrentKeyResponse$ { - /** @deprecated use `GetCurrentKeyResponse$inboundSchema` instead. */ - export const inboundSchema = GetCurrentKeyResponse$inboundSchema; - /** @deprecated use `GetCurrentKeyResponse$outboundSchema` instead. */ - export const outboundSchema = GetCurrentKeyResponse$outboundSchema; - /** @deprecated use `GetCurrentKeyResponse$Outbound` instead. */ - export type Outbound = GetCurrentKeyResponse$Outbound; -} - -export function getCurrentKeyResponseToJSON( - getCurrentKeyResponse: GetCurrentKeyResponse, -): string { - return JSON.stringify( - GetCurrentKeyResponse$outboundSchema.parse(getCurrentKeyResponse), - ); -} - export function getCurrentKeyResponseFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/getgeneration.ts b/src/models/operations/getgeneration.ts index 9703381f..deb56079 100644 --- a/src/models/operations/getgeneration.ts +++ b/src/models/operations/getgeneration.ts @@ -5,11 +5,7 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; -import { - catchUnrecognizedEnum, - OpenEnum, - Unrecognized, -} from "../../types/enums.js"; +import { catchUnrecognizedEnum, OpenEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -129,10 +125,6 @@ export type GetGenerationData = { * Number of audio inputs in the prompt */ numInputAudioPrompt: number | null; - /** - * Number of video inputs in the prompt - */ - numVideoPrompt: number | null; /** * Number of media items in the completion */ @@ -177,14 +169,6 @@ export type GetGenerationResponse = { data: GetGenerationData; }; -/** @internal */ -export const GetGenerationRequest$inboundSchema: z.ZodType< - GetGenerationRequest, - unknown -> = z.object({ - id: z.string(), -}); - /** @internal */ export type GetGenerationRequest$Outbound = { id: string; @@ -198,19 +182,6 @@ export const GetGenerationRequest$outboundSchema: z.ZodType< id: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetGenerationRequest$ { - /** @deprecated use `GetGenerationRequest$inboundSchema` instead. */ - export const inboundSchema = GetGenerationRequest$inboundSchema; - /** @deprecated use `GetGenerationRequest$outboundSchema` instead. */ - export const outboundSchema = GetGenerationRequest$outboundSchema; - /** @deprecated use `GetGenerationRequest$Outbound` instead. */ - export type Outbound = GetGenerationRequest$Outbound; -} - export function getGenerationRequestToJSON( getGenerationRequest: GetGenerationRequest, ): string { @@ -219,16 +190,6 @@ export function getGenerationRequestToJSON( ); } -export function getGenerationRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetGenerationRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetGenerationRequest' from JSON`, - ); -} - /** @internal */ export const ApiType$inboundSchema: z.ZodType = z .union([ @@ -236,23 +197,6 @@ export const ApiType$inboundSchema: z.ZodType = z z.string().transform(catchUnrecognizedEnum), ]); -/** @internal */ -export const ApiType$outboundSchema: z.ZodType = z.union([ - z.enum(ApiType), - z.string().and(z.custom>()), -]); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ApiType$ { - /** @deprecated use `ApiType$inboundSchema` instead. */ - export const inboundSchema = ApiType$inboundSchema; - /** @deprecated use `ApiType$outboundSchema` instead. */ - export const outboundSchema = ApiType$outboundSchema; -} - /** @internal */ export const GetGenerationData$inboundSchema: z.ZodType< GetGenerationData, @@ -282,7 +226,6 @@ export const GetGenerationData$inboundSchema: z.ZodType< native_tokens_cached: z.nullable(z.number()), num_media_prompt: z.nullable(z.number()), num_input_audio_prompt: z.nullable(z.number()), - num_video_prompt: z.nullable(z.number()), num_media_completion: z.nullable(z.number()), num_search_results: z.nullable(z.number()), origin: z.string(), @@ -312,7 +255,6 @@ export const GetGenerationData$inboundSchema: z.ZodType< "native_tokens_cached": "nativeTokensCached", "num_media_prompt": "numMediaPrompt", "num_input_audio_prompt": "numInputAudioPrompt", - "num_video_prompt": "numVideoPrompt", "num_media_completion": "numMediaCompletion", "num_search_results": "numSearchResults", "is_byok": "isByok", @@ -322,133 +264,6 @@ export const GetGenerationData$inboundSchema: z.ZodType< }); }); -/** @internal */ -export type GetGenerationData$Outbound = { - id: string; - upstream_id: string | null; - total_cost: number; - cache_discount: number | null; - upstream_inference_cost: number | null; - created_at: string; - model: string; - app_id: number | null; - streamed: boolean | null; - cancelled: boolean | null; - provider_name: string | null; - latency: number | null; - moderation_latency: number | null; - generation_time: number | null; - finish_reason: string | null; - tokens_prompt: number | null; - tokens_completion: number | null; - native_tokens_prompt: number | null; - native_tokens_completion: number | null; - native_tokens_completion_images: number | null; - native_tokens_reasoning: number | null; - native_tokens_cached: number | null; - num_media_prompt: number | null; - num_input_audio_prompt: number | null; - num_video_prompt: number | null; - num_media_completion: number | null; - num_search_results: number | null; - origin: string; - usage: number; - is_byok: boolean; - native_finish_reason: string | null; - external_user: string | null; - api_type: string | null; -}; - -/** @internal */ -export const GetGenerationData$outboundSchema: z.ZodType< - GetGenerationData$Outbound, - GetGenerationData -> = z.object({ - id: z.string(), - upstreamId: z.nullable(z.string()), - totalCost: z.number(), - cacheDiscount: z.nullable(z.number()), - upstreamInferenceCost: z.nullable(z.number()), - createdAt: z.string(), - model: z.string(), - appId: z.nullable(z.number()), - streamed: z.nullable(z.boolean()), - cancelled: z.nullable(z.boolean()), - providerName: z.nullable(z.string()), - latency: z.nullable(z.number()), - moderationLatency: z.nullable(z.number()), - generationTime: z.nullable(z.number()), - finishReason: z.nullable(z.string()), - tokensPrompt: z.nullable(z.number()), - tokensCompletion: z.nullable(z.number()), - nativeTokensPrompt: z.nullable(z.number()), - nativeTokensCompletion: z.nullable(z.number()), - nativeTokensCompletionImages: z.nullable(z.number()), - nativeTokensReasoning: z.nullable(z.number()), - nativeTokensCached: z.nullable(z.number()), - numMediaPrompt: z.nullable(z.number()), - numInputAudioPrompt: z.nullable(z.number()), - numVideoPrompt: z.nullable(z.number()), - numMediaCompletion: z.nullable(z.number()), - numSearchResults: z.nullable(z.number()), - origin: z.string(), - usage: z.number(), - isByok: z.boolean(), - nativeFinishReason: z.nullable(z.string()), - externalUser: z.nullable(z.string()), - apiType: z.nullable(ApiType$outboundSchema), -}).transform((v) => { - return remap$(v, { - upstreamId: "upstream_id", - totalCost: "total_cost", - cacheDiscount: "cache_discount", - upstreamInferenceCost: "upstream_inference_cost", - createdAt: "created_at", - appId: "app_id", - providerName: "provider_name", - moderationLatency: "moderation_latency", - generationTime: "generation_time", - finishReason: "finish_reason", - tokensPrompt: "tokens_prompt", - tokensCompletion: "tokens_completion", - nativeTokensPrompt: "native_tokens_prompt", - nativeTokensCompletion: "native_tokens_completion", - nativeTokensCompletionImages: "native_tokens_completion_images", - nativeTokensReasoning: "native_tokens_reasoning", - nativeTokensCached: "native_tokens_cached", - numMediaPrompt: "num_media_prompt", - numInputAudioPrompt: "num_input_audio_prompt", - numVideoPrompt: "num_video_prompt", - numMediaCompletion: "num_media_completion", - numSearchResults: "num_search_results", - isByok: "is_byok", - nativeFinishReason: "native_finish_reason", - externalUser: "external_user", - apiType: "api_type", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetGenerationData$ { - /** @deprecated use `GetGenerationData$inboundSchema` instead. */ - export const inboundSchema = GetGenerationData$inboundSchema; - /** @deprecated use `GetGenerationData$outboundSchema` instead. */ - export const outboundSchema = GetGenerationData$outboundSchema; - /** @deprecated use `GetGenerationData$Outbound` instead. */ - export type Outbound = GetGenerationData$Outbound; -} - -export function getGenerationDataToJSON( - getGenerationData: GetGenerationData, -): string { - return JSON.stringify( - GetGenerationData$outboundSchema.parse(getGenerationData), - ); -} - export function getGenerationDataFromJSON( jsonString: string, ): SafeParseResult { @@ -467,40 +282,6 @@ export const GetGenerationResponse$inboundSchema: z.ZodType< data: z.lazy(() => GetGenerationData$inboundSchema), }); -/** @internal */ -export type GetGenerationResponse$Outbound = { - data: GetGenerationData$Outbound; -}; - -/** @internal */ -export const GetGenerationResponse$outboundSchema: z.ZodType< - GetGenerationResponse$Outbound, - GetGenerationResponse -> = z.object({ - data: z.lazy(() => GetGenerationData$outboundSchema), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetGenerationResponse$ { - /** @deprecated use `GetGenerationResponse$inboundSchema` instead. */ - export const inboundSchema = GetGenerationResponse$inboundSchema; - /** @deprecated use `GetGenerationResponse$outboundSchema` instead. */ - export const outboundSchema = GetGenerationResponse$outboundSchema; - /** @deprecated use `GetGenerationResponse$Outbound` instead. */ - export type Outbound = GetGenerationResponse$Outbound; -} - -export function getGenerationResponseToJSON( - getGenerationResponse: GetGenerationResponse, -): string { - return JSON.stringify( - GetGenerationResponse$outboundSchema.parse(getGenerationResponse), - ); -} - export function getGenerationResponseFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/getkey.ts b/src/models/operations/getkey.ts index ff13c0e6..a336daed 100644 --- a/src/models/operations/getkey.ts +++ b/src/models/operations/getkey.ts @@ -103,12 +103,6 @@ export type GetKeyResponse = { data: GetKeyData; }; -/** @internal */ -export const GetKeyRequest$inboundSchema: z.ZodType = z - .object({ - hash: z.string(), - }); - /** @internal */ export type GetKeyRequest$Outbound = { hash: string; @@ -122,33 +116,10 @@ export const GetKeyRequest$outboundSchema: z.ZodType< hash: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetKeyRequest$ { - /** @deprecated use `GetKeyRequest$inboundSchema` instead. */ - export const inboundSchema = GetKeyRequest$inboundSchema; - /** @deprecated use `GetKeyRequest$outboundSchema` instead. */ - export const outboundSchema = GetKeyRequest$outboundSchema; - /** @deprecated use `GetKeyRequest$Outbound` instead. */ - export type Outbound = GetKeyRequest$Outbound; -} - export function getKeyRequestToJSON(getKeyRequest: GetKeyRequest): string { return JSON.stringify(GetKeyRequest$outboundSchema.parse(getKeyRequest)); } -export function getKeyRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetKeyRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetKeyRequest' from JSON`, - ); -} - /** @internal */ export const GetKeyData$inboundSchema: z.ZodType = z .object({ @@ -187,85 +158,6 @@ export const GetKeyData$inboundSchema: z.ZodType = z }); }); -/** @internal */ -export type GetKeyData$Outbound = { - hash: string; - name: string; - label: string; - disabled: boolean; - limit: number | null; - limit_remaining: number | null; - limit_reset: string | null; - include_byok_in_limit: boolean; - usage: number; - usage_daily: number; - usage_weekly: number; - usage_monthly: number; - byok_usage: number; - byok_usage_daily: number; - byok_usage_weekly: number; - byok_usage_monthly: number; - created_at: string; - updated_at: string | null; -}; - -/** @internal */ -export const GetKeyData$outboundSchema: z.ZodType< - GetKeyData$Outbound, - GetKeyData -> = z.object({ - hash: z.string(), - name: z.string(), - label: z.string(), - disabled: z.boolean(), - limit: z.nullable(z.number()), - limitRemaining: z.nullable(z.number()), - limitReset: z.nullable(z.string()), - includeByokInLimit: z.boolean(), - usage: z.number(), - usageDaily: z.number(), - usageWeekly: z.number(), - usageMonthly: z.number(), - byokUsage: z.number(), - byokUsageDaily: z.number(), - byokUsageWeekly: z.number(), - byokUsageMonthly: z.number(), - createdAt: z.string(), - updatedAt: z.nullable(z.string()), -}).transform((v) => { - return remap$(v, { - limitRemaining: "limit_remaining", - limitReset: "limit_reset", - includeByokInLimit: "include_byok_in_limit", - usageDaily: "usage_daily", - usageWeekly: "usage_weekly", - usageMonthly: "usage_monthly", - byokUsage: "byok_usage", - byokUsageDaily: "byok_usage_daily", - byokUsageWeekly: "byok_usage_weekly", - byokUsageMonthly: "byok_usage_monthly", - createdAt: "created_at", - updatedAt: "updated_at", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetKeyData$ { - /** @deprecated use `GetKeyData$inboundSchema` instead. */ - export const inboundSchema = GetKeyData$inboundSchema; - /** @deprecated use `GetKeyData$outboundSchema` instead. */ - export const outboundSchema = GetKeyData$outboundSchema; - /** @deprecated use `GetKeyData$Outbound` instead. */ - export type Outbound = GetKeyData$Outbound; -} - -export function getKeyDataToJSON(getKeyData: GetKeyData): string { - return JSON.stringify(GetKeyData$outboundSchema.parse(getKeyData)); -} - export function getKeyDataFromJSON( jsonString: string, ): SafeParseResult { @@ -282,36 +174,6 @@ export const GetKeyResponse$inboundSchema: z.ZodType = data: z.lazy(() => GetKeyData$inboundSchema), }); -/** @internal */ -export type GetKeyResponse$Outbound = { - data: GetKeyData$Outbound; -}; - -/** @internal */ -export const GetKeyResponse$outboundSchema: z.ZodType< - GetKeyResponse$Outbound, - GetKeyResponse -> = z.object({ - data: z.lazy(() => GetKeyData$outboundSchema), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetKeyResponse$ { - /** @deprecated use `GetKeyResponse$inboundSchema` instead. */ - export const inboundSchema = GetKeyResponse$inboundSchema; - /** @deprecated use `GetKeyResponse$outboundSchema` instead. */ - export const outboundSchema = GetKeyResponse$outboundSchema; - /** @deprecated use `GetKeyResponse$Outbound` instead. */ - export type Outbound = GetKeyResponse$Outbound; -} - -export function getKeyResponseToJSON(getKeyResponse: GetKeyResponse): string { - return JSON.stringify(GetKeyResponse$outboundSchema.parse(getKeyResponse)); -} - export function getKeyResponseFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/getmodels.ts b/src/models/operations/getmodels.ts index fb908f61..aa1233a7 100644 --- a/src/models/operations/getmodels.ts +++ b/src/models/operations/getmodels.ts @@ -4,28 +4,12 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../../lib/primitives.js"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type GetModelsRequest = { category?: string | undefined; supportedParameters?: string | undefined; }; -/** @internal */ -export const GetModelsRequest$inboundSchema: z.ZodType< - GetModelsRequest, - unknown -> = z.object({ - category: z.string().optional(), - supported_parameters: z.string().optional(), -}).transform((v) => { - return remap$(v, { - "supported_parameters": "supportedParameters", - }); -}); - /** @internal */ export type GetModelsRequest$Outbound = { category?: string | undefined; @@ -45,19 +29,6 @@ export const GetModelsRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetModelsRequest$ { - /** @deprecated use `GetModelsRequest$inboundSchema` instead. */ - export const inboundSchema = GetModelsRequest$inboundSchema; - /** @deprecated use `GetModelsRequest$outboundSchema` instead. */ - export const outboundSchema = GetModelsRequest$outboundSchema; - /** @deprecated use `GetModelsRequest$Outbound` instead. */ - export type Outbound = GetModelsRequest$Outbound; -} - export function getModelsRequestToJSON( getModelsRequest: GetModelsRequest, ): string { @@ -65,13 +36,3 @@ export function getModelsRequestToJSON( GetModelsRequest$outboundSchema.parse(getModelsRequest), ); } - -export function getModelsRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetModelsRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetModelsRequest' from JSON`, - ); -} diff --git a/src/models/operations/getparameters.ts b/src/models/operations/getparameters.ts index eb7ca81a..681a9f7b 100644 --- a/src/models/operations/getparameters.ts +++ b/src/models/operations/getparameters.ts @@ -146,14 +146,6 @@ export type GetParametersResponse = { data: GetParametersData; }; -/** @internal */ -export const GetParametersSecurity$inboundSchema: z.ZodType< - GetParametersSecurity, - unknown -> = z.object({ - bearer: z.string(), -}); - /** @internal */ export type GetParametersSecurity$Outbound = { bearer: string; @@ -167,19 +159,6 @@ export const GetParametersSecurity$outboundSchema: z.ZodType< bearer: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetParametersSecurity$ { - /** @deprecated use `GetParametersSecurity$inboundSchema` instead. */ - export const inboundSchema = GetParametersSecurity$inboundSchema; - /** @deprecated use `GetParametersSecurity$outboundSchema` instead. */ - export const outboundSchema = GetParametersSecurity$outboundSchema; - /** @deprecated use `GetParametersSecurity$Outbound` instead. */ - export type Outbound = GetParametersSecurity$Outbound; -} - export function getParametersSecurityToJSON( getParametersSecurity: GetParametersSecurity, ): string { @@ -188,26 +167,6 @@ export function getParametersSecurityToJSON( ); } -export function getParametersSecurityFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetParametersSecurity$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetParametersSecurity' from JSON`, - ); -} - -/** @internal */ -export const GetParametersProvider$inboundSchema: z.ZodType< - GetParametersProvider, - unknown -> = z - .union([ - z.enum(GetParametersProvider), - z.string().transform(catchUnrecognizedEnum), - ]); - /** @internal */ export const GetParametersProvider$outboundSchema: z.ZodType< GetParametersProvider, @@ -217,27 +176,6 @@ export const GetParametersProvider$outboundSchema: z.ZodType< z.string().and(z.custom>()), ]); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetParametersProvider$ { - /** @deprecated use `GetParametersProvider$inboundSchema` instead. */ - export const inboundSchema = GetParametersProvider$inboundSchema; - /** @deprecated use `GetParametersProvider$outboundSchema` instead. */ - export const outboundSchema = GetParametersProvider$outboundSchema; -} - -/** @internal */ -export const GetParametersRequest$inboundSchema: z.ZodType< - GetParametersRequest, - unknown -> = z.object({ - author: z.string(), - slug: z.string(), - provider: GetParametersProvider$inboundSchema.optional(), -}); - /** @internal */ export type GetParametersRequest$Outbound = { author: string; @@ -255,19 +193,6 @@ export const GetParametersRequest$outboundSchema: z.ZodType< provider: GetParametersProvider$outboundSchema.optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetParametersRequest$ { - /** @deprecated use `GetParametersRequest$inboundSchema` instead. */ - export const inboundSchema = GetParametersRequest$inboundSchema; - /** @deprecated use `GetParametersRequest$outboundSchema` instead. */ - export const outboundSchema = GetParametersRequest$outboundSchema; - /** @deprecated use `GetParametersRequest$Outbound` instead. */ - export type Outbound = GetParametersRequest$Outbound; -} - export function getParametersRequestToJSON( getParametersRequest: GetParametersRequest, ): string { @@ -276,16 +201,6 @@ export function getParametersRequestToJSON( ); } -export function getParametersRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetParametersRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetParametersRequest' from JSON`, - ); -} - /** @internal */ export const SupportedParameter$inboundSchema: z.ZodType< SupportedParameter, @@ -296,26 +211,6 @@ export const SupportedParameter$inboundSchema: z.ZodType< z.string().transform(catchUnrecognizedEnum), ]); -/** @internal */ -export const SupportedParameter$outboundSchema: z.ZodType< - SupportedParameter, - SupportedParameter -> = z.union([ - z.enum(SupportedParameter), - z.string().and(z.custom>()), -]); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace SupportedParameter$ { - /** @deprecated use `SupportedParameter$inboundSchema` instead. */ - export const inboundSchema = SupportedParameter$inboundSchema; - /** @deprecated use `SupportedParameter$outboundSchema` instead. */ - export const outboundSchema = SupportedParameter$outboundSchema; -} - /** @internal */ export const GetParametersData$inboundSchema: z.ZodType< GetParametersData, @@ -329,46 +224,6 @@ export const GetParametersData$inboundSchema: z.ZodType< }); }); -/** @internal */ -export type GetParametersData$Outbound = { - model: string; - supported_parameters: Array; -}; - -/** @internal */ -export const GetParametersData$outboundSchema: z.ZodType< - GetParametersData$Outbound, - GetParametersData -> = z.object({ - model: z.string(), - supportedParameters: z.array(SupportedParameter$outboundSchema), -}).transform((v) => { - return remap$(v, { - supportedParameters: "supported_parameters", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetParametersData$ { - /** @deprecated use `GetParametersData$inboundSchema` instead. */ - export const inboundSchema = GetParametersData$inboundSchema; - /** @deprecated use `GetParametersData$outboundSchema` instead. */ - export const outboundSchema = GetParametersData$outboundSchema; - /** @deprecated use `GetParametersData$Outbound` instead. */ - export type Outbound = GetParametersData$Outbound; -} - -export function getParametersDataToJSON( - getParametersData: GetParametersData, -): string { - return JSON.stringify( - GetParametersData$outboundSchema.parse(getParametersData), - ); -} - export function getParametersDataFromJSON( jsonString: string, ): SafeParseResult { @@ -387,40 +242,6 @@ export const GetParametersResponse$inboundSchema: z.ZodType< data: z.lazy(() => GetParametersData$inboundSchema), }); -/** @internal */ -export type GetParametersResponse$Outbound = { - data: GetParametersData$Outbound; -}; - -/** @internal */ -export const GetParametersResponse$outboundSchema: z.ZodType< - GetParametersResponse$Outbound, - GetParametersResponse -> = z.object({ - data: z.lazy(() => GetParametersData$outboundSchema), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetParametersResponse$ { - /** @deprecated use `GetParametersResponse$inboundSchema` instead. */ - export const inboundSchema = GetParametersResponse$inboundSchema; - /** @deprecated use `GetParametersResponse$outboundSchema` instead. */ - export const outboundSchema = GetParametersResponse$outboundSchema; - /** @deprecated use `GetParametersResponse$Outbound` instead. */ - export type Outbound = GetParametersResponse$Outbound; -} - -export function getParametersResponseToJSON( - getParametersResponse: GetParametersResponse, -): string { - return JSON.stringify( - GetParametersResponse$outboundSchema.parse(getParametersResponse), - ); -} - export function getParametersResponseFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/getuseractivity.ts b/src/models/operations/getuseractivity.ts index 10b2d21d..6691a27a 100644 --- a/src/models/operations/getuseractivity.ts +++ b/src/models/operations/getuseractivity.ts @@ -25,14 +25,6 @@ export type GetUserActivityResponse = { data: Array; }; -/** @internal */ -export const GetUserActivityRequest$inboundSchema: z.ZodType< - GetUserActivityRequest, - unknown -> = z.object({ - date: z.string().optional(), -}); - /** @internal */ export type GetUserActivityRequest$Outbound = { date?: string | undefined; @@ -46,19 +38,6 @@ export const GetUserActivityRequest$outboundSchema: z.ZodType< date: z.string().optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetUserActivityRequest$ { - /** @deprecated use `GetUserActivityRequest$inboundSchema` instead. */ - export const inboundSchema = GetUserActivityRequest$inboundSchema; - /** @deprecated use `GetUserActivityRequest$outboundSchema` instead. */ - export const outboundSchema = GetUserActivityRequest$outboundSchema; - /** @deprecated use `GetUserActivityRequest$Outbound` instead. */ - export type Outbound = GetUserActivityRequest$Outbound; -} - export function getUserActivityRequestToJSON( getUserActivityRequest: GetUserActivityRequest, ): string { @@ -67,16 +46,6 @@ export function getUserActivityRequestToJSON( ); } -export function getUserActivityRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => GetUserActivityRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'GetUserActivityRequest' from JSON`, - ); -} - /** @internal */ export const GetUserActivityResponse$inboundSchema: z.ZodType< GetUserActivityResponse, @@ -85,40 +54,6 @@ export const GetUserActivityResponse$inboundSchema: z.ZodType< data: z.array(models.ActivityItem$inboundSchema), }); -/** @internal */ -export type GetUserActivityResponse$Outbound = { - data: Array; -}; - -/** @internal */ -export const GetUserActivityResponse$outboundSchema: z.ZodType< - GetUserActivityResponse$Outbound, - GetUserActivityResponse -> = z.object({ - data: z.array(models.ActivityItem$outboundSchema), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace GetUserActivityResponse$ { - /** @deprecated use `GetUserActivityResponse$inboundSchema` instead. */ - export const inboundSchema = GetUserActivityResponse$inboundSchema; - /** @deprecated use `GetUserActivityResponse$outboundSchema` instead. */ - export const outboundSchema = GetUserActivityResponse$outboundSchema; - /** @deprecated use `GetUserActivityResponse$Outbound` instead. */ - export type Outbound = GetUserActivityResponse$Outbound; -} - -export function getUserActivityResponseToJSON( - getUserActivityResponse: GetUserActivityResponse, -): string { - return JSON.stringify( - GetUserActivityResponse$outboundSchema.parse(getUserActivityResponse), - ); -} - export function getUserActivityResponseFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/list.ts b/src/models/operations/list.ts index 612f0670..a453c58b 100644 --- a/src/models/operations/list.ts +++ b/src/models/operations/list.ts @@ -104,17 +104,6 @@ export type ListResponse = { data: Array; }; -/** @internal */ -export const ListRequest$inboundSchema: z.ZodType = z - .object({ - include_disabled: z.string().optional(), - offset: z.string().optional(), - }).transform((v) => { - return remap$(v, { - "include_disabled": "includeDisabled", - }); - }); - /** @internal */ export type ListRequest$Outbound = { include_disabled?: string | undefined; @@ -134,33 +123,10 @@ export const ListRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ListRequest$ { - /** @deprecated use `ListRequest$inboundSchema` instead. */ - export const inboundSchema = ListRequest$inboundSchema; - /** @deprecated use `ListRequest$outboundSchema` instead. */ - export const outboundSchema = ListRequest$outboundSchema; - /** @deprecated use `ListRequest$Outbound` instead. */ - export type Outbound = ListRequest$Outbound; -} - export function listRequestToJSON(listRequest: ListRequest): string { return JSON.stringify(ListRequest$outboundSchema.parse(listRequest)); } -export function listRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ListRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ListRequest' from JSON`, - ); -} - /** @internal */ export const ListData$inboundSchema: z.ZodType = z.object({ hash: z.string(), @@ -198,83 +164,6 @@ export const ListData$inboundSchema: z.ZodType = z.object({ }); }); -/** @internal */ -export type ListData$Outbound = { - hash: string; - name: string; - label: string; - disabled: boolean; - limit: number | null; - limit_remaining: number | null; - limit_reset: string | null; - include_byok_in_limit: boolean; - usage: number; - usage_daily: number; - usage_weekly: number; - usage_monthly: number; - byok_usage: number; - byok_usage_daily: number; - byok_usage_weekly: number; - byok_usage_monthly: number; - created_at: string; - updated_at: string | null; -}; - -/** @internal */ -export const ListData$outboundSchema: z.ZodType = z - .object({ - hash: z.string(), - name: z.string(), - label: z.string(), - disabled: z.boolean(), - limit: z.nullable(z.number()), - limitRemaining: z.nullable(z.number()), - limitReset: z.nullable(z.string()), - includeByokInLimit: z.boolean(), - usage: z.number(), - usageDaily: z.number(), - usageWeekly: z.number(), - usageMonthly: z.number(), - byokUsage: z.number(), - byokUsageDaily: z.number(), - byokUsageWeekly: z.number(), - byokUsageMonthly: z.number(), - createdAt: z.string(), - updatedAt: z.nullable(z.string()), - }).transform((v) => { - return remap$(v, { - limitRemaining: "limit_remaining", - limitReset: "limit_reset", - includeByokInLimit: "include_byok_in_limit", - usageDaily: "usage_daily", - usageWeekly: "usage_weekly", - usageMonthly: "usage_monthly", - byokUsage: "byok_usage", - byokUsageDaily: "byok_usage_daily", - byokUsageWeekly: "byok_usage_weekly", - byokUsageMonthly: "byok_usage_monthly", - createdAt: "created_at", - updatedAt: "updated_at", - }); - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ListData$ { - /** @deprecated use `ListData$inboundSchema` instead. */ - export const inboundSchema = ListData$inboundSchema; - /** @deprecated use `ListData$outboundSchema` instead. */ - export const outboundSchema = ListData$outboundSchema; - /** @deprecated use `ListData$Outbound` instead. */ - export type Outbound = ListData$Outbound; -} - -export function listDataToJSON(listData: ListData): string { - return JSON.stringify(ListData$outboundSchema.parse(listData)); -} - export function listDataFromJSON( jsonString: string, ): SafeParseResult { @@ -291,36 +180,6 @@ export const ListResponse$inboundSchema: z.ZodType = z data: z.array(z.lazy(() => ListData$inboundSchema)), }); -/** @internal */ -export type ListResponse$Outbound = { - data: Array; -}; - -/** @internal */ -export const ListResponse$outboundSchema: z.ZodType< - ListResponse$Outbound, - ListResponse -> = z.object({ - data: z.array(z.lazy(() => ListData$outboundSchema)), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ListResponse$ { - /** @deprecated use `ListResponse$inboundSchema` instead. */ - export const inboundSchema = ListResponse$inboundSchema; - /** @deprecated use `ListResponse$outboundSchema` instead. */ - export const outboundSchema = ListResponse$outboundSchema; - /** @deprecated use `ListResponse$Outbound` instead. */ - export type Outbound = ListResponse$Outbound; -} - -export function listResponseToJSON(listResponse: ListResponse): string { - return JSON.stringify(ListResponse$outboundSchema.parse(listResponse)); -} - export function listResponseFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/listendpoints.ts b/src/models/operations/listendpoints.ts index beae7d3c..5a2891de 100644 --- a/src/models/operations/listendpoints.ts +++ b/src/models/operations/listendpoints.ts @@ -23,15 +23,6 @@ export type ListEndpointsResponse = { data: models.ListEndpointsResponse; }; -/** @internal */ -export const ListEndpointsRequest$inboundSchema: z.ZodType< - ListEndpointsRequest, - unknown -> = z.object({ - author: z.string(), - slug: z.string(), -}); - /** @internal */ export type ListEndpointsRequest$Outbound = { author: string; @@ -47,19 +38,6 @@ export const ListEndpointsRequest$outboundSchema: z.ZodType< slug: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ListEndpointsRequest$ { - /** @deprecated use `ListEndpointsRequest$inboundSchema` instead. */ - export const inboundSchema = ListEndpointsRequest$inboundSchema; - /** @deprecated use `ListEndpointsRequest$outboundSchema` instead. */ - export const outboundSchema = ListEndpointsRequest$outboundSchema; - /** @deprecated use `ListEndpointsRequest$Outbound` instead. */ - export type Outbound = ListEndpointsRequest$Outbound; -} - export function listEndpointsRequestToJSON( listEndpointsRequest: ListEndpointsRequest, ): string { @@ -68,16 +46,6 @@ export function listEndpointsRequestToJSON( ); } -export function listEndpointsRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ListEndpointsRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ListEndpointsRequest' from JSON`, - ); -} - /** @internal */ export const ListEndpointsResponse$inboundSchema: z.ZodType< ListEndpointsResponse, @@ -86,40 +54,6 @@ export const ListEndpointsResponse$inboundSchema: z.ZodType< data: models.ListEndpointsResponse$inboundSchema, }); -/** @internal */ -export type ListEndpointsResponse$Outbound = { - data: models.ListEndpointsResponse$Outbound; -}; - -/** @internal */ -export const ListEndpointsResponse$outboundSchema: z.ZodType< - ListEndpointsResponse$Outbound, - ListEndpointsResponse -> = z.object({ - data: models.ListEndpointsResponse$outboundSchema, -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ListEndpointsResponse$ { - /** @deprecated use `ListEndpointsResponse$inboundSchema` instead. */ - export const inboundSchema = ListEndpointsResponse$inboundSchema; - /** @deprecated use `ListEndpointsResponse$outboundSchema` instead. */ - export const outboundSchema = ListEndpointsResponse$outboundSchema; - /** @deprecated use `ListEndpointsResponse$Outbound` instead. */ - export type Outbound = ListEndpointsResponse$Outbound; -} - -export function listEndpointsResponseToJSON( - listEndpointsResponse: ListEndpointsResponse, -): string { - return JSON.stringify( - ListEndpointsResponse$outboundSchema.parse(listEndpointsResponse), - ); -} - export function listEndpointsResponseFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/listendpointszdr.ts b/src/models/operations/listendpointszdr.ts index aafa655b..10c81042 100644 --- a/src/models/operations/listendpointszdr.ts +++ b/src/models/operations/listendpointszdr.ts @@ -23,40 +23,6 @@ export const ListEndpointsZdrResponse$inboundSchema: z.ZodType< data: z.array(models.PublicEndpoint$inboundSchema), }); -/** @internal */ -export type ListEndpointsZdrResponse$Outbound = { - data: Array; -}; - -/** @internal */ -export const ListEndpointsZdrResponse$outboundSchema: z.ZodType< - ListEndpointsZdrResponse$Outbound, - ListEndpointsZdrResponse -> = z.object({ - data: z.array(models.PublicEndpoint$outboundSchema), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ListEndpointsZdrResponse$ { - /** @deprecated use `ListEndpointsZdrResponse$inboundSchema` instead. */ - export const inboundSchema = ListEndpointsZdrResponse$inboundSchema; - /** @deprecated use `ListEndpointsZdrResponse$outboundSchema` instead. */ - export const outboundSchema = ListEndpointsZdrResponse$outboundSchema; - /** @deprecated use `ListEndpointsZdrResponse$Outbound` instead. */ - export type Outbound = ListEndpointsZdrResponse$Outbound; -} - -export function listEndpointsZdrResponseToJSON( - listEndpointsZdrResponse: ListEndpointsZdrResponse, -): string { - return JSON.stringify( - ListEndpointsZdrResponse$outboundSchema.parse(listEndpointsZdrResponse), - ); -} - export function listEndpointsZdrResponseFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/listmodelsuser.ts b/src/models/operations/listmodelsuser.ts index c4a4a813..53219054 100644 --- a/src/models/operations/listmodelsuser.ts +++ b/src/models/operations/listmodelsuser.ts @@ -3,22 +3,11 @@ */ import * as z from "zod/v4"; -import { safeParse } from "../../lib/schemas.js"; -import { Result as SafeParseResult } from "../../types/fp.js"; -import { SDKValidationError } from "../errors/sdkvalidationerror.js"; export type ListModelsUserSecurity = { bearer: string; }; -/** @internal */ -export const ListModelsUserSecurity$inboundSchema: z.ZodType< - ListModelsUserSecurity, - unknown -> = z.object({ - bearer: z.string(), -}); - /** @internal */ export type ListModelsUserSecurity$Outbound = { bearer: string; @@ -32,19 +21,6 @@ export const ListModelsUserSecurity$outboundSchema: z.ZodType< bearer: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ListModelsUserSecurity$ { - /** @deprecated use `ListModelsUserSecurity$inboundSchema` instead. */ - export const inboundSchema = ListModelsUserSecurity$inboundSchema; - /** @deprecated use `ListModelsUserSecurity$outboundSchema` instead. */ - export const outboundSchema = ListModelsUserSecurity$outboundSchema; - /** @deprecated use `ListModelsUserSecurity$Outbound` instead. */ - export type Outbound = ListModelsUserSecurity$Outbound; -} - export function listModelsUserSecurityToJSON( listModelsUserSecurity: ListModelsUserSecurity, ): string { @@ -52,13 +28,3 @@ export function listModelsUserSecurityToJSON( ListModelsUserSecurity$outboundSchema.parse(listModelsUserSecurity), ); } - -export function listModelsUserSecurityFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ListModelsUserSecurity$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ListModelsUserSecurity' from JSON`, - ); -} diff --git a/src/models/operations/listproviders.ts b/src/models/operations/listproviders.ts index 885c8d84..93c7f3be 100644 --- a/src/models/operations/listproviders.ts +++ b/src/models/operations/listproviders.ts @@ -56,54 +56,6 @@ export const ListProvidersData$inboundSchema: z.ZodType< }); }); -/** @internal */ -export type ListProvidersData$Outbound = { - name: string; - slug: string; - privacy_policy_url: string | null; - terms_of_service_url?: string | null | undefined; - status_page_url?: string | null | undefined; -}; - -/** @internal */ -export const ListProvidersData$outboundSchema: z.ZodType< - ListProvidersData$Outbound, - ListProvidersData -> = z.object({ - name: z.string(), - slug: z.string(), - privacyPolicyUrl: z.nullable(z.string()), - termsOfServiceUrl: z.nullable(z.string()).optional(), - statusPageUrl: z.nullable(z.string()).optional(), -}).transform((v) => { - return remap$(v, { - privacyPolicyUrl: "privacy_policy_url", - termsOfServiceUrl: "terms_of_service_url", - statusPageUrl: "status_page_url", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ListProvidersData$ { - /** @deprecated use `ListProvidersData$inboundSchema` instead. */ - export const inboundSchema = ListProvidersData$inboundSchema; - /** @deprecated use `ListProvidersData$outboundSchema` instead. */ - export const outboundSchema = ListProvidersData$outboundSchema; - /** @deprecated use `ListProvidersData$Outbound` instead. */ - export type Outbound = ListProvidersData$Outbound; -} - -export function listProvidersDataToJSON( - listProvidersData: ListProvidersData, -): string { - return JSON.stringify( - ListProvidersData$outboundSchema.parse(listProvidersData), - ); -} - export function listProvidersDataFromJSON( jsonString: string, ): SafeParseResult { @@ -122,40 +74,6 @@ export const ListProvidersResponse$inboundSchema: z.ZodType< data: z.array(z.lazy(() => ListProvidersData$inboundSchema)), }); -/** @internal */ -export type ListProvidersResponse$Outbound = { - data: Array; -}; - -/** @internal */ -export const ListProvidersResponse$outboundSchema: z.ZodType< - ListProvidersResponse$Outbound, - ListProvidersResponse -> = z.object({ - data: z.array(z.lazy(() => ListProvidersData$outboundSchema)), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ListProvidersResponse$ { - /** @deprecated use `ListProvidersResponse$inboundSchema` instead. */ - export const inboundSchema = ListProvidersResponse$inboundSchema; - /** @deprecated use `ListProvidersResponse$outboundSchema` instead. */ - export const outboundSchema = ListProvidersResponse$outboundSchema; - /** @deprecated use `ListProvidersResponse$Outbound` instead. */ - export type Outbound = ListProvidersResponse$Outbound; -} - -export function listProvidersResponseToJSON( - listProvidersResponse: ListProvidersResponse, -): string { - return JSON.stringify( - ListProvidersResponse$outboundSchema.parse(listProvidersResponse), - ); -} - export function listProvidersResponseFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/sendchatcompletionrequest.ts b/src/models/operations/sendchatcompletionrequest.ts index 3fb723bf..c14e884c 100644 --- a/src/models/operations/sendchatcompletionrequest.ts +++ b/src/models/operations/sendchatcompletionrequest.ts @@ -31,41 +31,6 @@ export const SendChatCompletionRequestResponse$inboundSchema: z.ZodType< }), ]); -/** @internal */ -export type SendChatCompletionRequestResponse$Outbound = - | models.ChatResponse$Outbound - | never; - -/** @internal */ -export const SendChatCompletionRequestResponse$outboundSchema: z.ZodType< - SendChatCompletionRequestResponse$Outbound, - SendChatCompletionRequestResponse -> = z.union([models.ChatResponse$outboundSchema, z.never()]); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace SendChatCompletionRequestResponse$ { - /** @deprecated use `SendChatCompletionRequestResponse$inboundSchema` instead. */ - export const inboundSchema = SendChatCompletionRequestResponse$inboundSchema; - /** @deprecated use `SendChatCompletionRequestResponse$outboundSchema` instead. */ - export const outboundSchema = - SendChatCompletionRequestResponse$outboundSchema; - /** @deprecated use `SendChatCompletionRequestResponse$Outbound` instead. */ - export type Outbound = SendChatCompletionRequestResponse$Outbound; -} - -export function sendChatCompletionRequestResponseToJSON( - sendChatCompletionRequestResponse: SendChatCompletionRequestResponse, -): string { - return JSON.stringify( - SendChatCompletionRequestResponse$outboundSchema.parse( - sendChatCompletionRequestResponse, - ), - ); -} - export function sendChatCompletionRequestResponseFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/operations/updatekeys.ts b/src/models/operations/updatekeys.ts index 730b6db0..a8f12b94 100644 --- a/src/models/operations/updatekeys.ts +++ b/src/models/operations/updatekeys.ts @@ -5,11 +5,7 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../../lib/primitives.js"; import { safeParse } from "../../lib/schemas.js"; -import { - catchUnrecognizedEnum, - OpenEnum, - Unrecognized, -} from "../../types/enums.js"; +import { OpenEnum, Unrecognized } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; @@ -145,16 +141,6 @@ export type UpdateKeysResponse = { data: UpdateKeysData; }; -/** @internal */ -export const UpdateKeysLimitReset$inboundSchema: z.ZodType< - UpdateKeysLimitReset, - unknown -> = z - .union([ - z.enum(UpdateKeysLimitReset), - z.string().transform(catchUnrecognizedEnum), - ]); - /** @internal */ export const UpdateKeysLimitReset$outboundSchema: z.ZodType< UpdateKeysLimitReset, @@ -164,34 +150,6 @@ export const UpdateKeysLimitReset$outboundSchema: z.ZodType< z.string().and(z.custom>()), ]); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateKeysLimitReset$ { - /** @deprecated use `UpdateKeysLimitReset$inboundSchema` instead. */ - export const inboundSchema = UpdateKeysLimitReset$inboundSchema; - /** @deprecated use `UpdateKeysLimitReset$outboundSchema` instead. */ - export const outboundSchema = UpdateKeysLimitReset$outboundSchema; -} - -/** @internal */ -export const UpdateKeysRequestBody$inboundSchema: z.ZodType< - UpdateKeysRequestBody, - unknown -> = z.object({ - name: z.string().optional(), - disabled: z.boolean().optional(), - limit: z.nullable(z.number()).optional(), - limit_reset: z.nullable(UpdateKeysLimitReset$inboundSchema).optional(), - include_byok_in_limit: z.boolean().optional(), -}).transform((v) => { - return remap$(v, { - "limit_reset": "limitReset", - "include_byok_in_limit": "includeByokInLimit", - }); -}); - /** @internal */ export type UpdateKeysRequestBody$Outbound = { name?: string | undefined; @@ -218,19 +176,6 @@ export const UpdateKeysRequestBody$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateKeysRequestBody$ { - /** @deprecated use `UpdateKeysRequestBody$inboundSchema` instead. */ - export const inboundSchema = UpdateKeysRequestBody$inboundSchema; - /** @deprecated use `UpdateKeysRequestBody$outboundSchema` instead. */ - export const outboundSchema = UpdateKeysRequestBody$outboundSchema; - /** @deprecated use `UpdateKeysRequestBody$Outbound` instead. */ - export type Outbound = UpdateKeysRequestBody$Outbound; -} - export function updateKeysRequestBodyToJSON( updateKeysRequestBody: UpdateKeysRequestBody, ): string { @@ -239,29 +184,6 @@ export function updateKeysRequestBodyToJSON( ); } -export function updateKeysRequestBodyFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => UpdateKeysRequestBody$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'UpdateKeysRequestBody' from JSON`, - ); -} - -/** @internal */ -export const UpdateKeysRequest$inboundSchema: z.ZodType< - UpdateKeysRequest, - unknown -> = z.object({ - hash: z.string(), - RequestBody: z.lazy(() => UpdateKeysRequestBody$inboundSchema), -}).transform((v) => { - return remap$(v, { - "RequestBody": "requestBody", - }); -}); - /** @internal */ export type UpdateKeysRequest$Outbound = { hash: string; @@ -281,19 +203,6 @@ export const UpdateKeysRequest$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateKeysRequest$ { - /** @deprecated use `UpdateKeysRequest$inboundSchema` instead. */ - export const inboundSchema = UpdateKeysRequest$inboundSchema; - /** @deprecated use `UpdateKeysRequest$outboundSchema` instead. */ - export const outboundSchema = UpdateKeysRequest$outboundSchema; - /** @deprecated use `UpdateKeysRequest$Outbound` instead. */ - export type Outbound = UpdateKeysRequest$Outbound; -} - export function updateKeysRequestToJSON( updateKeysRequest: UpdateKeysRequest, ): string { @@ -302,16 +211,6 @@ export function updateKeysRequestToJSON( ); } -export function updateKeysRequestFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => UpdateKeysRequest$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'UpdateKeysRequest' from JSON`, - ); -} - /** @internal */ export const UpdateKeysData$inboundSchema: z.ZodType = z.object({ @@ -350,85 +249,6 @@ export const UpdateKeysData$inboundSchema: z.ZodType = }); }); -/** @internal */ -export type UpdateKeysData$Outbound = { - hash: string; - name: string; - label: string; - disabled: boolean; - limit: number | null; - limit_remaining: number | null; - limit_reset: string | null; - include_byok_in_limit: boolean; - usage: number; - usage_daily: number; - usage_weekly: number; - usage_monthly: number; - byok_usage: number; - byok_usage_daily: number; - byok_usage_weekly: number; - byok_usage_monthly: number; - created_at: string; - updated_at: string | null; -}; - -/** @internal */ -export const UpdateKeysData$outboundSchema: z.ZodType< - UpdateKeysData$Outbound, - UpdateKeysData -> = z.object({ - hash: z.string(), - name: z.string(), - label: z.string(), - disabled: z.boolean(), - limit: z.nullable(z.number()), - limitRemaining: z.nullable(z.number()), - limitReset: z.nullable(z.string()), - includeByokInLimit: z.boolean(), - usage: z.number(), - usageDaily: z.number(), - usageWeekly: z.number(), - usageMonthly: z.number(), - byokUsage: z.number(), - byokUsageDaily: z.number(), - byokUsageWeekly: z.number(), - byokUsageMonthly: z.number(), - createdAt: z.string(), - updatedAt: z.nullable(z.string()), -}).transform((v) => { - return remap$(v, { - limitRemaining: "limit_remaining", - limitReset: "limit_reset", - includeByokInLimit: "include_byok_in_limit", - usageDaily: "usage_daily", - usageWeekly: "usage_weekly", - usageMonthly: "usage_monthly", - byokUsage: "byok_usage", - byokUsageDaily: "byok_usage_daily", - byokUsageWeekly: "byok_usage_weekly", - byokUsageMonthly: "byok_usage_monthly", - createdAt: "created_at", - updatedAt: "updated_at", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateKeysData$ { - /** @deprecated use `UpdateKeysData$inboundSchema` instead. */ - export const inboundSchema = UpdateKeysData$inboundSchema; - /** @deprecated use `UpdateKeysData$outboundSchema` instead. */ - export const outboundSchema = UpdateKeysData$outboundSchema; - /** @deprecated use `UpdateKeysData$Outbound` instead. */ - export type Outbound = UpdateKeysData$Outbound; -} - -export function updateKeysDataToJSON(updateKeysData: UpdateKeysData): string { - return JSON.stringify(UpdateKeysData$outboundSchema.parse(updateKeysData)); -} - export function updateKeysDataFromJSON( jsonString: string, ): SafeParseResult { @@ -447,40 +267,6 @@ export const UpdateKeysResponse$inboundSchema: z.ZodType< data: z.lazy(() => UpdateKeysData$inboundSchema), }); -/** @internal */ -export type UpdateKeysResponse$Outbound = { - data: UpdateKeysData$Outbound; -}; - -/** @internal */ -export const UpdateKeysResponse$outboundSchema: z.ZodType< - UpdateKeysResponse$Outbound, - UpdateKeysResponse -> = z.object({ - data: z.lazy(() => UpdateKeysData$outboundSchema), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UpdateKeysResponse$ { - /** @deprecated use `UpdateKeysResponse$inboundSchema` instead. */ - export const inboundSchema = UpdateKeysResponse$inboundSchema; - /** @deprecated use `UpdateKeysResponse$outboundSchema` instead. */ - export const outboundSchema = UpdateKeysResponse$outboundSchema; - /** @deprecated use `UpdateKeysResponse$Outbound` instead. */ - export type Outbound = UpdateKeysResponse$Outbound; -} - -export function updateKeysResponseToJSON( - updateKeysResponse: UpdateKeysResponse, -): string { - return JSON.stringify( - UpdateKeysResponse$outboundSchema.parse(updateKeysResponse), - ); -} - export function updateKeysResponseFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/outputitemimagegenerationcall.ts b/src/models/outputitemimagegenerationcall.ts index e1d42b7f..455dfce2 100644 --- a/src/models/outputitemimagegenerationcall.ts +++ b/src/models/outputitemimagegenerationcall.ts @@ -10,7 +10,6 @@ import { SDKValidationError } from "./errors/sdkvalidationerror.js"; import { ImageGenerationStatus, ImageGenerationStatus$inboundSchema, - ImageGenerationStatus$outboundSchema, } from "./imagegenerationstatus.js"; export const OutputItemImageGenerationCallType = { @@ -32,23 +31,6 @@ export const OutputItemImageGenerationCallType$inboundSchema: z.ZodEnum< typeof OutputItemImageGenerationCallType > = z.enum(OutputItemImageGenerationCallType); -/** @internal */ -export const OutputItemImageGenerationCallType$outboundSchema: z.ZodEnum< - typeof OutputItemImageGenerationCallType -> = OutputItemImageGenerationCallType$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OutputItemImageGenerationCallType$ { - /** @deprecated use `OutputItemImageGenerationCallType$inboundSchema` instead. */ - export const inboundSchema = OutputItemImageGenerationCallType$inboundSchema; - /** @deprecated use `OutputItemImageGenerationCallType$outboundSchema` instead. */ - export const outboundSchema = - OutputItemImageGenerationCallType$outboundSchema; -} - /** @internal */ export const OutputItemImageGenerationCall$inboundSchema: z.ZodType< OutputItemImageGenerationCall, @@ -60,48 +42,6 @@ export const OutputItemImageGenerationCall$inboundSchema: z.ZodType< status: ImageGenerationStatus$inboundSchema, }); -/** @internal */ -export type OutputItemImageGenerationCall$Outbound = { - type: string; - id: string; - result: string | null; - status: string; -}; - -/** @internal */ -export const OutputItemImageGenerationCall$outboundSchema: z.ZodType< - OutputItemImageGenerationCall$Outbound, - OutputItemImageGenerationCall -> = z.object({ - type: OutputItemImageGenerationCallType$outboundSchema, - id: z.string(), - result: z.nullable(z.string()), - status: ImageGenerationStatus$outboundSchema, -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OutputItemImageGenerationCall$ { - /** @deprecated use `OutputItemImageGenerationCall$inboundSchema` instead. */ - export const inboundSchema = OutputItemImageGenerationCall$inboundSchema; - /** @deprecated use `OutputItemImageGenerationCall$outboundSchema` instead. */ - export const outboundSchema = OutputItemImageGenerationCall$outboundSchema; - /** @deprecated use `OutputItemImageGenerationCall$Outbound` instead. */ - export type Outbound = OutputItemImageGenerationCall$Outbound; -} - -export function outputItemImageGenerationCallToJSON( - outputItemImageGenerationCall: OutputItemImageGenerationCall, -): string { - return JSON.stringify( - OutputItemImageGenerationCall$outboundSchema.parse( - outputItemImageGenerationCall, - ), - ); -} - export function outputItemImageGenerationCallFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/outputmessage.ts b/src/models/outputmessage.ts index 220e93f0..4f63fed3 100644 --- a/src/models/outputmessage.ts +++ b/src/models/outputmessage.ts @@ -10,14 +10,10 @@ import { SDKValidationError } from "./errors/sdkvalidationerror.js"; import { OpenAIResponsesRefusalContent, OpenAIResponsesRefusalContent$inboundSchema, - OpenAIResponsesRefusalContent$Outbound, - OpenAIResponsesRefusalContent$outboundSchema, } from "./openairesponsesrefusalcontent.js"; import { ResponseOutputText, ResponseOutputText$inboundSchema, - ResponseOutputText$Outbound, - ResponseOutputText$outboundSchema, } from "./responseoutputtext.js"; export const OutputMessageRole = { @@ -77,106 +73,26 @@ export const OutputMessageRole$inboundSchema: z.ZodEnum< typeof OutputMessageRole > = z.enum(OutputMessageRole); -/** @internal */ -export const OutputMessageRole$outboundSchema: z.ZodEnum< - typeof OutputMessageRole -> = OutputMessageRole$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OutputMessageRole$ { - /** @deprecated use `OutputMessageRole$inboundSchema` instead. */ - export const inboundSchema = OutputMessageRole$inboundSchema; - /** @deprecated use `OutputMessageRole$outboundSchema` instead. */ - export const outboundSchema = OutputMessageRole$outboundSchema; -} - /** @internal */ export const OutputMessageType$inboundSchema: z.ZodEnum< typeof OutputMessageType > = z.enum(OutputMessageType); -/** @internal */ -export const OutputMessageType$outboundSchema: z.ZodEnum< - typeof OutputMessageType -> = OutputMessageType$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OutputMessageType$ { - /** @deprecated use `OutputMessageType$inboundSchema` instead. */ - export const inboundSchema = OutputMessageType$inboundSchema; - /** @deprecated use `OutputMessageType$outboundSchema` instead. */ - export const outboundSchema = OutputMessageType$outboundSchema; -} - /** @internal */ export const OutputMessageStatusInProgress$inboundSchema: z.ZodEnum< typeof OutputMessageStatusInProgress > = z.enum(OutputMessageStatusInProgress); -/** @internal */ -export const OutputMessageStatusInProgress$outboundSchema: z.ZodEnum< - typeof OutputMessageStatusInProgress -> = OutputMessageStatusInProgress$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OutputMessageStatusInProgress$ { - /** @deprecated use `OutputMessageStatusInProgress$inboundSchema` instead. */ - export const inboundSchema = OutputMessageStatusInProgress$inboundSchema; - /** @deprecated use `OutputMessageStatusInProgress$outboundSchema` instead. */ - export const outboundSchema = OutputMessageStatusInProgress$outboundSchema; -} - /** @internal */ export const OutputMessageStatusIncomplete$inboundSchema: z.ZodEnum< typeof OutputMessageStatusIncomplete > = z.enum(OutputMessageStatusIncomplete); -/** @internal */ -export const OutputMessageStatusIncomplete$outboundSchema: z.ZodEnum< - typeof OutputMessageStatusIncomplete -> = OutputMessageStatusIncomplete$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OutputMessageStatusIncomplete$ { - /** @deprecated use `OutputMessageStatusIncomplete$inboundSchema` instead. */ - export const inboundSchema = OutputMessageStatusIncomplete$inboundSchema; - /** @deprecated use `OutputMessageStatusIncomplete$outboundSchema` instead. */ - export const outboundSchema = OutputMessageStatusIncomplete$outboundSchema; -} - /** @internal */ export const OutputMessageStatusCompleted$inboundSchema: z.ZodEnum< typeof OutputMessageStatusCompleted > = z.enum(OutputMessageStatusCompleted); -/** @internal */ -export const OutputMessageStatusCompleted$outboundSchema: z.ZodEnum< - typeof OutputMessageStatusCompleted -> = OutputMessageStatusCompleted$inboundSchema; - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OutputMessageStatusCompleted$ { - /** @deprecated use `OutputMessageStatusCompleted$inboundSchema` instead. */ - export const inboundSchema = OutputMessageStatusCompleted$inboundSchema; - /** @deprecated use `OutputMessageStatusCompleted$outboundSchema` instead. */ - export const outboundSchema = OutputMessageStatusCompleted$outboundSchema; -} - /** @internal */ export const OutputMessageStatusUnion$inboundSchema: z.ZodType< OutputMessageStatusUnion, @@ -187,40 +103,6 @@ export const OutputMessageStatusUnion$inboundSchema: z.ZodType< OutputMessageStatusInProgress$inboundSchema, ]); -/** @internal */ -export type OutputMessageStatusUnion$Outbound = string | string | string; - -/** @internal */ -export const OutputMessageStatusUnion$outboundSchema: z.ZodType< - OutputMessageStatusUnion$Outbound, - OutputMessageStatusUnion -> = z.union([ - OutputMessageStatusCompleted$outboundSchema, - OutputMessageStatusIncomplete$outboundSchema, - OutputMessageStatusInProgress$outboundSchema, -]); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OutputMessageStatusUnion$ { - /** @deprecated use `OutputMessageStatusUnion$inboundSchema` instead. */ - export const inboundSchema = OutputMessageStatusUnion$inboundSchema; - /** @deprecated use `OutputMessageStatusUnion$outboundSchema` instead. */ - export const outboundSchema = OutputMessageStatusUnion$outboundSchema; - /** @deprecated use `OutputMessageStatusUnion$Outbound` instead. */ - export type Outbound = OutputMessageStatusUnion$Outbound; -} - -export function outputMessageStatusUnionToJSON( - outputMessageStatusUnion: OutputMessageStatusUnion, -): string { - return JSON.stringify( - OutputMessageStatusUnion$outboundSchema.parse(outputMessageStatusUnion), - ); -} - export function outputMessageStatusUnionFromJSON( jsonString: string, ): SafeParseResult { @@ -240,41 +122,6 @@ export const OutputMessageContent$inboundSchema: z.ZodType< OpenAIResponsesRefusalContent$inboundSchema, ]); -/** @internal */ -export type OutputMessageContent$Outbound = - | ResponseOutputText$Outbound - | OpenAIResponsesRefusalContent$Outbound; - -/** @internal */ -export const OutputMessageContent$outboundSchema: z.ZodType< - OutputMessageContent$Outbound, - OutputMessageContent -> = z.union([ - ResponseOutputText$outboundSchema, - OpenAIResponsesRefusalContent$outboundSchema, -]); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OutputMessageContent$ { - /** @deprecated use `OutputMessageContent$inboundSchema` instead. */ - export const inboundSchema = OutputMessageContent$inboundSchema; - /** @deprecated use `OutputMessageContent$outboundSchema` instead. */ - export const outboundSchema = OutputMessageContent$outboundSchema; - /** @deprecated use `OutputMessageContent$Outbound` instead. */ - export type Outbound = OutputMessageContent$Outbound; -} - -export function outputMessageContentToJSON( - outputMessageContent: OutputMessageContent, -): string { - return JSON.stringify( - OutputMessageContent$outboundSchema.parse(outputMessageContent), - ); -} - export function outputMessageContentFromJSON( jsonString: string, ): SafeParseResult { @@ -304,55 +151,6 @@ export const OutputMessage$inboundSchema: z.ZodType = z ), }); -/** @internal */ -export type OutputMessage$Outbound = { - id: string; - role: string; - type: string; - status?: string | string | string | undefined; - content: Array< - ResponseOutputText$Outbound | OpenAIResponsesRefusalContent$Outbound - >; -}; - -/** @internal */ -export const OutputMessage$outboundSchema: z.ZodType< - OutputMessage$Outbound, - OutputMessage -> = z.object({ - id: z.string(), - role: OutputMessageRole$outboundSchema, - type: OutputMessageType$outboundSchema, - status: z.union([ - OutputMessageStatusCompleted$outboundSchema, - OutputMessageStatusIncomplete$outboundSchema, - OutputMessageStatusInProgress$outboundSchema, - ]).optional(), - content: z.array( - z.union([ - ResponseOutputText$outboundSchema, - OpenAIResponsesRefusalContent$outboundSchema, - ]), - ), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OutputMessage$ { - /** @deprecated use `OutputMessage$inboundSchema` instead. */ - export const inboundSchema = OutputMessage$inboundSchema; - /** @deprecated use `OutputMessage$outboundSchema` instead. */ - export const outboundSchema = OutputMessage$outboundSchema; - /** @deprecated use `OutputMessage$Outbound` instead. */ - export type Outbound = OutputMessage$Outbound; -} - -export function outputMessageToJSON(outputMessage: OutputMessage): string { - return JSON.stringify(OutputMessage$outboundSchema.parse(outputMessage)); -} - export function outputMessageFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/outputmodality.ts b/src/models/outputmodality.ts index edc82bc6..4d4621bd 100644 --- a/src/models/outputmodality.ts +++ b/src/models/outputmodality.ts @@ -3,11 +3,7 @@ */ import * as z from "zod/v4"; -import { - catchUnrecognizedEnum, - OpenEnum, - Unrecognized, -} from "../types/enums.js"; +import { catchUnrecognizedEnum, OpenEnum } from "../types/enums.js"; export const OutputModality = { Text: "text", @@ -23,23 +19,3 @@ export const OutputModality$inboundSchema: z.ZodType = z.enum(OutputModality), z.string().transform(catchUnrecognizedEnum), ]); - -/** @internal */ -export const OutputModality$outboundSchema: z.ZodType< - OutputModality, - OutputModality -> = z.union([ - z.enum(OutputModality), - z.string().and(z.custom>()), -]); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace OutputModality$ { - /** @deprecated use `OutputModality$inboundSchema` instead. */ - export const inboundSchema = OutputModality$inboundSchema; - /** @deprecated use `OutputModality$outboundSchema` instead. */ - export const outboundSchema = OutputModality$outboundSchema; -} diff --git a/src/models/parameter.ts b/src/models/parameter.ts index 6dd4e860..1ad8ecff 100644 --- a/src/models/parameter.ts +++ b/src/models/parameter.ts @@ -3,11 +3,7 @@ */ import * as z from "zod/v4"; -import { - catchUnrecognizedEnum, - OpenEnum, - Unrecognized, -} from "../types/enums.js"; +import { catchUnrecognizedEnum, OpenEnum } from "../types/enums.js"; export const Parameter = { Temperature: "temperature", @@ -42,21 +38,3 @@ export const Parameter$inboundSchema: z.ZodType = z z.enum(Parameter), z.string().transform(catchUnrecognizedEnum), ]); - -/** @internal */ -export const Parameter$outboundSchema: z.ZodType = z - .union([ - z.enum(Parameter), - z.string().and(z.custom>()), - ]); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Parameter$ { - /** @deprecated use `Parameter$inboundSchema` instead. */ - export const inboundSchema = Parameter$inboundSchema; - /** @deprecated use `Parameter$outboundSchema` instead. */ - export const outboundSchema = Parameter$outboundSchema; -} diff --git a/src/models/payloadtoolargeresponseerrordata.ts b/src/models/payloadtoolargeresponseerrordata.ts index 88a0e9cf..a83cb4b1 100644 --- a/src/models/payloadtoolargeresponseerrordata.ts +++ b/src/models/payloadtoolargeresponseerrordata.ts @@ -26,46 +26,6 @@ export const PayloadTooLargeResponseErrorData$inboundSchema: z.ZodType< metadata: z.nullable(z.record(z.string(), z.nullable(z.any()))).optional(), }); -/** @internal */ -export type PayloadTooLargeResponseErrorData$Outbound = { - code: number; - message: string; - metadata?: { [k: string]: any | null } | null | undefined; -}; - -/** @internal */ -export const PayloadTooLargeResponseErrorData$outboundSchema: z.ZodType< - PayloadTooLargeResponseErrorData$Outbound, - PayloadTooLargeResponseErrorData -> = z.object({ - code: z.number().int(), - message: z.string(), - metadata: z.nullable(z.record(z.string(), z.nullable(z.any()))).optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PayloadTooLargeResponseErrorData$ { - /** @deprecated use `PayloadTooLargeResponseErrorData$inboundSchema` instead. */ - export const inboundSchema = PayloadTooLargeResponseErrorData$inboundSchema; - /** @deprecated use `PayloadTooLargeResponseErrorData$outboundSchema` instead. */ - export const outboundSchema = PayloadTooLargeResponseErrorData$outboundSchema; - /** @deprecated use `PayloadTooLargeResponseErrorData$Outbound` instead. */ - export type Outbound = PayloadTooLargeResponseErrorData$Outbound; -} - -export function payloadTooLargeResponseErrorDataToJSON( - payloadTooLargeResponseErrorData: PayloadTooLargeResponseErrorData, -): string { - return JSON.stringify( - PayloadTooLargeResponseErrorData$outboundSchema.parse( - payloadTooLargeResponseErrorData, - ), - ); -} - export function payloadTooLargeResponseErrorDataFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/paymentrequiredresponseerrordata.ts b/src/models/paymentrequiredresponseerrordata.ts index 853c0355..20599c7b 100644 --- a/src/models/paymentrequiredresponseerrordata.ts +++ b/src/models/paymentrequiredresponseerrordata.ts @@ -26,46 +26,6 @@ export const PaymentRequiredResponseErrorData$inboundSchema: z.ZodType< metadata: z.nullable(z.record(z.string(), z.nullable(z.any()))).optional(), }); -/** @internal */ -export type PaymentRequiredResponseErrorData$Outbound = { - code: number; - message: string; - metadata?: { [k: string]: any | null } | null | undefined; -}; - -/** @internal */ -export const PaymentRequiredResponseErrorData$outboundSchema: z.ZodType< - PaymentRequiredResponseErrorData$Outbound, - PaymentRequiredResponseErrorData -> = z.object({ - code: z.number().int(), - message: z.string(), - metadata: z.nullable(z.record(z.string(), z.nullable(z.any()))).optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PaymentRequiredResponseErrorData$ { - /** @deprecated use `PaymentRequiredResponseErrorData$inboundSchema` instead. */ - export const inboundSchema = PaymentRequiredResponseErrorData$inboundSchema; - /** @deprecated use `PaymentRequiredResponseErrorData$outboundSchema` instead. */ - export const outboundSchema = PaymentRequiredResponseErrorData$outboundSchema; - /** @deprecated use `PaymentRequiredResponseErrorData$Outbound` instead. */ - export type Outbound = PaymentRequiredResponseErrorData$Outbound; -} - -export function paymentRequiredResponseErrorDataToJSON( - paymentRequiredResponseErrorData: PaymentRequiredResponseErrorData, -): string { - return JSON.stringify( - PaymentRequiredResponseErrorData$outboundSchema.parse( - paymentRequiredResponseErrorData, - ), - ); -} - export function paymentRequiredResponseErrorDataFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/perrequestlimits.ts b/src/models/perrequestlimits.ts index c679df59..d7ebb6ce 100644 --- a/src/models/perrequestlimits.ts +++ b/src/models/perrequestlimits.ts @@ -36,47 +36,6 @@ export const PerRequestLimits$inboundSchema: z.ZodType< }); }); -/** @internal */ -export type PerRequestLimits$Outbound = { - prompt_tokens: number; - completion_tokens: number; -}; - -/** @internal */ -export const PerRequestLimits$outboundSchema: z.ZodType< - PerRequestLimits$Outbound, - PerRequestLimits -> = z.object({ - promptTokens: z.number(), - completionTokens: z.number(), -}).transform((v) => { - return remap$(v, { - promptTokens: "prompt_tokens", - completionTokens: "completion_tokens", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PerRequestLimits$ { - /** @deprecated use `PerRequestLimits$inboundSchema` instead. */ - export const inboundSchema = PerRequestLimits$inboundSchema; - /** @deprecated use `PerRequestLimits$outboundSchema` instead. */ - export const outboundSchema = PerRequestLimits$outboundSchema; - /** @deprecated use `PerRequestLimits$Outbound` instead. */ - export type Outbound = PerRequestLimits$Outbound; -} - -export function perRequestLimitsToJSON( - perRequestLimits: PerRequestLimits, -): string { - return JSON.stringify( - PerRequestLimits$outboundSchema.parse(perRequestLimits), - ); -} - export function perRequestLimitsFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/providername.ts b/src/models/providername.ts index cf7fead5..17edf0ec 100644 --- a/src/models/providername.ts +++ b/src/models/providername.ts @@ -105,7 +105,6 @@ export const ProviderName$inboundSchema: z.ZodType = z z.enum(ProviderName), z.string().transform(catchUnrecognizedEnum), ]); - /** @internal */ export const ProviderName$outboundSchema: z.ZodType< ProviderName, @@ -114,14 +113,3 @@ export const ProviderName$outboundSchema: z.ZodType< z.enum(ProviderName), z.string().and(z.custom>()), ]); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ProviderName$ { - /** @deprecated use `ProviderName$inboundSchema` instead. */ - export const inboundSchema = ProviderName$inboundSchema; - /** @deprecated use `ProviderName$outboundSchema` instead. */ - export const outboundSchema = ProviderName$outboundSchema; -} diff --git a/src/models/provideroverloadedresponseerrordata.ts b/src/models/provideroverloadedresponseerrordata.ts index 3cc5439e..a78a57d9 100644 --- a/src/models/provideroverloadedresponseerrordata.ts +++ b/src/models/provideroverloadedresponseerrordata.ts @@ -26,48 +26,6 @@ export const ProviderOverloadedResponseErrorData$inboundSchema: z.ZodType< metadata: z.nullable(z.record(z.string(), z.nullable(z.any()))).optional(), }); -/** @internal */ -export type ProviderOverloadedResponseErrorData$Outbound = { - code: number; - message: string; - metadata?: { [k: string]: any | null } | null | undefined; -}; - -/** @internal */ -export const ProviderOverloadedResponseErrorData$outboundSchema: z.ZodType< - ProviderOverloadedResponseErrorData$Outbound, - ProviderOverloadedResponseErrorData -> = z.object({ - code: z.number().int(), - message: z.string(), - metadata: z.nullable(z.record(z.string(), z.nullable(z.any()))).optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ProviderOverloadedResponseErrorData$ { - /** @deprecated use `ProviderOverloadedResponseErrorData$inboundSchema` instead. */ - export const inboundSchema = - ProviderOverloadedResponseErrorData$inboundSchema; - /** @deprecated use `ProviderOverloadedResponseErrorData$outboundSchema` instead. */ - export const outboundSchema = - ProviderOverloadedResponseErrorData$outboundSchema; - /** @deprecated use `ProviderOverloadedResponseErrorData$Outbound` instead. */ - export type Outbound = ProviderOverloadedResponseErrorData$Outbound; -} - -export function providerOverloadedResponseErrorDataToJSON( - providerOverloadedResponseErrorData: ProviderOverloadedResponseErrorData, -): string { - return JSON.stringify( - ProviderOverloadedResponseErrorData$outboundSchema.parse( - providerOverloadedResponseErrorData, - ), - ); -} - export function providerOverloadedResponseErrorDataFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/publicendpoint.ts b/src/models/publicendpoint.ts index 646828c3..21e2f877 100644 --- a/src/models/publicendpoint.ts +++ b/src/models/publicendpoint.ts @@ -5,28 +5,15 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; import { safeParse } from "../lib/schemas.js"; -import { - catchUnrecognizedEnum, - OpenEnum, - Unrecognized, -} from "../types/enums.js"; +import { catchUnrecognizedEnum, OpenEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { EndpointStatus, EndpointStatus$inboundSchema, - EndpointStatus$outboundSchema, } from "./endpointstatus.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; -import { - Parameter, - Parameter$inboundSchema, - Parameter$outboundSchema, -} from "./parameter.js"; -import { - ProviderName, - ProviderName$inboundSchema, - ProviderName$outboundSchema, -} from "./providername.js"; +import { Parameter, Parameter$inboundSchema } from "./parameter.js"; +import { ProviderName, ProviderName$inboundSchema } from "./providername.js"; export type Pricing = { /** @@ -135,65 +122,6 @@ export const Pricing$inboundSchema: z.ZodType = z.object({ }); }); -/** @internal */ -export type Pricing$Outbound = { - prompt?: any | undefined; - completion?: any | undefined; - request?: any | undefined; - image?: any | undefined; - image_output?: any | undefined; - audio?: any | undefined; - input_audio_cache?: any | undefined; - web_search?: any | undefined; - internal_reasoning?: any | undefined; - input_cache_read?: any | undefined; - input_cache_write?: any | undefined; - discount?: number | undefined; -}; - -/** @internal */ -export const Pricing$outboundSchema: z.ZodType = z - .object({ - prompt: z.any().optional(), - completion: z.any().optional(), - request: z.any().optional(), - image: z.any().optional(), - imageOutput: z.any().optional(), - audio: z.any().optional(), - inputAudioCache: z.any().optional(), - webSearch: z.any().optional(), - internalReasoning: z.any().optional(), - inputCacheRead: z.any().optional(), - inputCacheWrite: z.any().optional(), - discount: z.number().optional(), - }).transform((v) => { - return remap$(v, { - imageOutput: "image_output", - inputAudioCache: "input_audio_cache", - webSearch: "web_search", - internalReasoning: "internal_reasoning", - inputCacheRead: "input_cache_read", - inputCacheWrite: "input_cache_write", - }); - }); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Pricing$ { - /** @deprecated use `Pricing$inboundSchema` instead. */ - export const inboundSchema = Pricing$inboundSchema; - /** @deprecated use `Pricing$outboundSchema` instead. */ - export const outboundSchema = Pricing$outboundSchema; - /** @deprecated use `Pricing$Outbound` instead. */ - export type Outbound = Pricing$Outbound; -} - -export function pricingToJSON(pricing: Pricing): string { - return JSON.stringify(Pricing$outboundSchema.parse(pricing)); -} - export function pricingFromJSON( jsonString: string, ): SafeParseResult { @@ -214,26 +142,6 @@ export const PublicEndpointQuantization$inboundSchema: z.ZodType< z.string().transform(catchUnrecognizedEnum), ]); -/** @internal */ -export const PublicEndpointQuantization$outboundSchema: z.ZodType< - PublicEndpointQuantization, - PublicEndpointQuantization -> = z.union([ - z.enum(PublicEndpointQuantization), - z.string().and(z.custom>()), -]); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PublicEndpointQuantization$ { - /** @deprecated use `PublicEndpointQuantization$inboundSchema` instead. */ - export const inboundSchema = PublicEndpointQuantization$inboundSchema; - /** @deprecated use `PublicEndpointQuantization$outboundSchema` instead. */ - export const outboundSchema = PublicEndpointQuantization$outboundSchema; -} - /** @internal */ export const PublicEndpoint$inboundSchema: z.ZodType = z.object({ @@ -263,71 +171,6 @@ export const PublicEndpoint$inboundSchema: z.ZodType = }); }); -/** @internal */ -export type PublicEndpoint$Outbound = { - name: string; - model_name: string; - context_length: number; - pricing: Pricing$Outbound; - provider_name: string; - tag: string; - quantization: string | null; - max_completion_tokens: number | null; - max_prompt_tokens: number | null; - supported_parameters: Array; - status?: number | undefined; - uptime_last_30m: number | null; - supports_implicit_caching: boolean; -}; - -/** @internal */ -export const PublicEndpoint$outboundSchema: z.ZodType< - PublicEndpoint$Outbound, - PublicEndpoint -> = z.object({ - name: z.string(), - modelName: z.string(), - contextLength: z.number(), - pricing: z.lazy(() => Pricing$outboundSchema), - providerName: ProviderName$outboundSchema, - tag: z.string(), - quantization: z.nullable(PublicEndpointQuantization$outboundSchema), - maxCompletionTokens: z.nullable(z.number()), - maxPromptTokens: z.nullable(z.number()), - supportedParameters: z.array(Parameter$outboundSchema), - status: EndpointStatus$outboundSchema.optional(), - uptimeLast30m: z.nullable(z.number()), - supportsImplicitCaching: z.boolean(), -}).transform((v) => { - return remap$(v, { - modelName: "model_name", - contextLength: "context_length", - providerName: "provider_name", - maxCompletionTokens: "max_completion_tokens", - maxPromptTokens: "max_prompt_tokens", - supportedParameters: "supported_parameters", - uptimeLast30m: "uptime_last_30m", - supportsImplicitCaching: "supports_implicit_caching", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PublicEndpoint$ { - /** @deprecated use `PublicEndpoint$inboundSchema` instead. */ - export const inboundSchema = PublicEndpoint$inboundSchema; - /** @deprecated use `PublicEndpoint$outboundSchema` instead. */ - export const outboundSchema = PublicEndpoint$outboundSchema; - /** @deprecated use `PublicEndpoint$Outbound` instead. */ - export type Outbound = PublicEndpoint$Outbound; -} - -export function publicEndpointToJSON(publicEndpoint: PublicEndpoint): string { - return JSON.stringify(PublicEndpoint$outboundSchema.parse(publicEndpoint)); -} - export function publicEndpointFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/publicpricing.ts b/src/models/publicpricing.ts index 40aa4bd9..80e79e80 100644 --- a/src/models/publicpricing.ts +++ b/src/models/publicpricing.ts @@ -85,67 +85,6 @@ export const PublicPricing$inboundSchema: z.ZodType = z }); }); -/** @internal */ -export type PublicPricing$Outbound = { - prompt?: any | undefined; - completion?: any | undefined; - request?: any | undefined; - image?: any | undefined; - image_output?: any | undefined; - audio?: any | undefined; - input_audio_cache?: any | undefined; - web_search?: any | undefined; - internal_reasoning?: any | undefined; - input_cache_read?: any | undefined; - input_cache_write?: any | undefined; - discount?: number | undefined; -}; - -/** @internal */ -export const PublicPricing$outboundSchema: z.ZodType< - PublicPricing$Outbound, - PublicPricing -> = z.object({ - prompt: z.any().optional(), - completion: z.any().optional(), - request: z.any().optional(), - image: z.any().optional(), - imageOutput: z.any().optional(), - audio: z.any().optional(), - inputAudioCache: z.any().optional(), - webSearch: z.any().optional(), - internalReasoning: z.any().optional(), - inputCacheRead: z.any().optional(), - inputCacheWrite: z.any().optional(), - discount: z.number().optional(), -}).transform((v) => { - return remap$(v, { - imageOutput: "image_output", - inputAudioCache: "input_audio_cache", - webSearch: "web_search", - internalReasoning: "internal_reasoning", - inputCacheRead: "input_cache_read", - inputCacheWrite: "input_cache_write", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace PublicPricing$ { - /** @deprecated use `PublicPricing$inboundSchema` instead. */ - export const inboundSchema = PublicPricing$inboundSchema; - /** @deprecated use `PublicPricing$outboundSchema` instead. */ - export const outboundSchema = PublicPricing$outboundSchema; - /** @deprecated use `PublicPricing$Outbound` instead. */ - export type Outbound = PublicPricing$Outbound; -} - -export function publicPricingToJSON(publicPricing: PublicPricing): string { - return JSON.stringify(PublicPricing$outboundSchema.parse(publicPricing)); -} - export function publicPricingFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/quantization.ts b/src/models/quantization.ts index 035cae90..baa017bd 100644 --- a/src/models/quantization.ts +++ b/src/models/quantization.ts @@ -3,11 +3,7 @@ */ import * as z from "zod/v4"; -import { - catchUnrecognizedEnum, - OpenEnum, - Unrecognized, -} from "../types/enums.js"; +import { OpenEnum, Unrecognized } from "../types/enums.js"; export const Quantization = { Int4: "int4", @@ -22,13 +18,6 @@ export const Quantization = { } as const; export type Quantization = OpenEnum; -/** @internal */ -export const Quantization$inboundSchema: z.ZodType = z - .union([ - z.enum(Quantization), - z.string().transform(catchUnrecognizedEnum), - ]); - /** @internal */ export const Quantization$outboundSchema: z.ZodType< Quantization, @@ -37,14 +26,3 @@ export const Quantization$outboundSchema: z.ZodType< z.enum(Quantization), z.string().and(z.custom>()), ]); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Quantization$ { - /** @deprecated use `Quantization$inboundSchema` instead. */ - export const inboundSchema = Quantization$inboundSchema; - /** @deprecated use `Quantization$outboundSchema` instead. */ - export const outboundSchema = Quantization$outboundSchema; -} diff --git a/src/models/reasoningsummarytext.ts b/src/models/reasoningsummarytext.ts index 496c30f7..a00f7331 100644 --- a/src/models/reasoningsummarytext.ts +++ b/src/models/reasoningsummarytext.ts @@ -24,23 +24,11 @@ export type ReasoningSummaryText = { export const ReasoningSummaryTextType$inboundSchema: z.ZodEnum< typeof ReasoningSummaryTextType > = z.enum(ReasoningSummaryTextType); - /** @internal */ export const ReasoningSummaryTextType$outboundSchema: z.ZodEnum< typeof ReasoningSummaryTextType > = ReasoningSummaryTextType$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ReasoningSummaryTextType$ { - /** @deprecated use `ReasoningSummaryTextType$inboundSchema` instead. */ - export const inboundSchema = ReasoningSummaryTextType$inboundSchema; - /** @deprecated use `ReasoningSummaryTextType$outboundSchema` instead. */ - export const outboundSchema = ReasoningSummaryTextType$outboundSchema; -} - /** @internal */ export const ReasoningSummaryText$inboundSchema: z.ZodType< ReasoningSummaryText, @@ -49,7 +37,6 @@ export const ReasoningSummaryText$inboundSchema: z.ZodType< type: ReasoningSummaryTextType$inboundSchema, text: z.string(), }); - /** @internal */ export type ReasoningSummaryText$Outbound = { type: string; @@ -65,19 +52,6 @@ export const ReasoningSummaryText$outboundSchema: z.ZodType< text: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ReasoningSummaryText$ { - /** @deprecated use `ReasoningSummaryText$inboundSchema` instead. */ - export const inboundSchema = ReasoningSummaryText$inboundSchema; - /** @deprecated use `ReasoningSummaryText$outboundSchema` instead. */ - export const outboundSchema = ReasoningSummaryText$outboundSchema; - /** @deprecated use `ReasoningSummaryText$Outbound` instead. */ - export type Outbound = ReasoningSummaryText$Outbound; -} - export function reasoningSummaryTextToJSON( reasoningSummaryText: ReasoningSummaryText, ): string { @@ -85,7 +59,6 @@ export function reasoningSummaryTextToJSON( ReasoningSummaryText$outboundSchema.parse(reasoningSummaryText), ); } - export function reasoningSummaryTextFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/reasoningsummaryverbosity.ts b/src/models/reasoningsummaryverbosity.ts index ded510c2..8ad72922 100644 --- a/src/models/reasoningsummaryverbosity.ts +++ b/src/models/reasoningsummaryverbosity.ts @@ -27,7 +27,6 @@ export const ReasoningSummaryVerbosity$inboundSchema: z.ZodType< z.enum(ReasoningSummaryVerbosity), z.string().transform(catchUnrecognizedEnum), ]); - /** @internal */ export const ReasoningSummaryVerbosity$outboundSchema: z.ZodType< ReasoningSummaryVerbosity, @@ -36,14 +35,3 @@ export const ReasoningSummaryVerbosity$outboundSchema: z.ZodType< z.enum(ReasoningSummaryVerbosity), z.string().and(z.custom>()), ]); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ReasoningSummaryVerbosity$ { - /** @deprecated use `ReasoningSummaryVerbosity$inboundSchema` instead. */ - export const inboundSchema = ReasoningSummaryVerbosity$inboundSchema; - /** @deprecated use `ReasoningSummaryVerbosity$outboundSchema` instead. */ - export const outboundSchema = ReasoningSummaryVerbosity$outboundSchema; -} diff --git a/src/models/reasoningtextcontent.ts b/src/models/reasoningtextcontent.ts index ff7ed8d8..5347eb07 100644 --- a/src/models/reasoningtextcontent.ts +++ b/src/models/reasoningtextcontent.ts @@ -24,23 +24,11 @@ export type ReasoningTextContent = { export const ReasoningTextContentType$inboundSchema: z.ZodEnum< typeof ReasoningTextContentType > = z.enum(ReasoningTextContentType); - /** @internal */ export const ReasoningTextContentType$outboundSchema: z.ZodEnum< typeof ReasoningTextContentType > = ReasoningTextContentType$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ReasoningTextContentType$ { - /** @deprecated use `ReasoningTextContentType$inboundSchema` instead. */ - export const inboundSchema = ReasoningTextContentType$inboundSchema; - /** @deprecated use `ReasoningTextContentType$outboundSchema` instead. */ - export const outboundSchema = ReasoningTextContentType$outboundSchema; -} - /** @internal */ export const ReasoningTextContent$inboundSchema: z.ZodType< ReasoningTextContent, @@ -49,7 +37,6 @@ export const ReasoningTextContent$inboundSchema: z.ZodType< type: ReasoningTextContentType$inboundSchema, text: z.string(), }); - /** @internal */ export type ReasoningTextContent$Outbound = { type: string; @@ -65,19 +52,6 @@ export const ReasoningTextContent$outboundSchema: z.ZodType< text: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ReasoningTextContent$ { - /** @deprecated use `ReasoningTextContent$inboundSchema` instead. */ - export const inboundSchema = ReasoningTextContent$inboundSchema; - /** @deprecated use `ReasoningTextContent$outboundSchema` instead. */ - export const outboundSchema = ReasoningTextContent$outboundSchema; - /** @deprecated use `ReasoningTextContent$Outbound` instead. */ - export type Outbound = ReasoningTextContent$Outbound; -} - export function reasoningTextContentToJSON( reasoningTextContent: ReasoningTextContent, ): string { @@ -85,7 +59,6 @@ export function reasoningTextContentToJSON( ReasoningTextContent$outboundSchema.parse(reasoningTextContent), ); } - export function reasoningTextContentFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/requesttimeoutresponseerrordata.ts b/src/models/requesttimeoutresponseerrordata.ts index 3bcf3599..7b51e7b3 100644 --- a/src/models/requesttimeoutresponseerrordata.ts +++ b/src/models/requesttimeoutresponseerrordata.ts @@ -26,46 +26,6 @@ export const RequestTimeoutResponseErrorData$inboundSchema: z.ZodType< metadata: z.nullable(z.record(z.string(), z.nullable(z.any()))).optional(), }); -/** @internal */ -export type RequestTimeoutResponseErrorData$Outbound = { - code: number; - message: string; - metadata?: { [k: string]: any | null } | null | undefined; -}; - -/** @internal */ -export const RequestTimeoutResponseErrorData$outboundSchema: z.ZodType< - RequestTimeoutResponseErrorData$Outbound, - RequestTimeoutResponseErrorData -> = z.object({ - code: z.number().int(), - message: z.string(), - metadata: z.nullable(z.record(z.string(), z.nullable(z.any()))).optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace RequestTimeoutResponseErrorData$ { - /** @deprecated use `RequestTimeoutResponseErrorData$inboundSchema` instead. */ - export const inboundSchema = RequestTimeoutResponseErrorData$inboundSchema; - /** @deprecated use `RequestTimeoutResponseErrorData$outboundSchema` instead. */ - export const outboundSchema = RequestTimeoutResponseErrorData$outboundSchema; - /** @deprecated use `RequestTimeoutResponseErrorData$Outbound` instead. */ - export type Outbound = RequestTimeoutResponseErrorData$Outbound; -} - -export function requestTimeoutResponseErrorDataToJSON( - requestTimeoutResponseErrorData: RequestTimeoutResponseErrorData, -): string { - return JSON.stringify( - RequestTimeoutResponseErrorData$outboundSchema.parse( - requestTimeoutResponseErrorData, - ), - ); -} - export function requestTimeoutResponseErrorDataFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/responseformatjsonschema.ts b/src/models/responseformatjsonschema.ts index 0f66220a..3fe19d90 100644 --- a/src/models/responseformatjsonschema.ts +++ b/src/models/responseformatjsonschema.ts @@ -4,12 +4,8 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { Result as SafeParseResult } from "../types/fp.js"; -import { SDKValidationError } from "./errors/sdkvalidationerror.js"; import { JSONSchemaConfig, - JSONSchemaConfig$inboundSchema, JSONSchemaConfig$Outbound, JSONSchemaConfig$outboundSchema, } from "./jsonschemaconfig.js"; @@ -19,19 +15,6 @@ export type ResponseFormatJSONSchema = { jsonSchema: JSONSchemaConfig; }; -/** @internal */ -export const ResponseFormatJSONSchema$inboundSchema: z.ZodType< - ResponseFormatJSONSchema, - unknown -> = z.object({ - type: z.literal("json_schema"), - json_schema: JSONSchemaConfig$inboundSchema, -}).transform((v) => { - return remap$(v, { - "json_schema": "jsonSchema", - }); -}); - /** @internal */ export type ResponseFormatJSONSchema$Outbound = { type: "json_schema"; @@ -51,19 +34,6 @@ export const ResponseFormatJSONSchema$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ResponseFormatJSONSchema$ { - /** @deprecated use `ResponseFormatJSONSchema$inboundSchema` instead. */ - export const inboundSchema = ResponseFormatJSONSchema$inboundSchema; - /** @deprecated use `ResponseFormatJSONSchema$outboundSchema` instead. */ - export const outboundSchema = ResponseFormatJSONSchema$outboundSchema; - /** @deprecated use `ResponseFormatJSONSchema$Outbound` instead. */ - export type Outbound = ResponseFormatJSONSchema$Outbound; -} - export function responseFormatJSONSchemaToJSON( responseFormatJSONSchema: ResponseFormatJSONSchema, ): string { @@ -71,13 +41,3 @@ export function responseFormatJSONSchemaToJSON( ResponseFormatJSONSchema$outboundSchema.parse(responseFormatJSONSchema), ); } - -export function responseFormatJSONSchemaFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ResponseFormatJSONSchema$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ResponseFormatJSONSchema' from JSON`, - ); -} diff --git a/src/models/responseformattextconfig.ts b/src/models/responseformattextconfig.ts index 398c198b..a62c7d8b 100644 --- a/src/models/responseformattextconfig.ts +++ b/src/models/responseformattextconfig.ts @@ -42,7 +42,6 @@ export const ResponseFormatTextConfig$inboundSchema: z.ZodType< ResponsesFormatText$inboundSchema, ResponsesFormatJSONObject$inboundSchema, ]); - /** @internal */ export type ResponseFormatTextConfig$Outbound = | ResponsesFormatTextJSONSchemaConfig$Outbound @@ -59,19 +58,6 @@ export const ResponseFormatTextConfig$outboundSchema: z.ZodType< ResponsesFormatJSONObject$outboundSchema, ]); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ResponseFormatTextConfig$ { - /** @deprecated use `ResponseFormatTextConfig$inboundSchema` instead. */ - export const inboundSchema = ResponseFormatTextConfig$inboundSchema; - /** @deprecated use `ResponseFormatTextConfig$outboundSchema` instead. */ - export const outboundSchema = ResponseFormatTextConfig$outboundSchema; - /** @deprecated use `ResponseFormatTextConfig$Outbound` instead. */ - export type Outbound = ResponseFormatTextConfig$Outbound; -} - export function responseFormatTextConfigToJSON( responseFormatTextConfig: ResponseFormatTextConfig, ): string { @@ -79,7 +65,6 @@ export function responseFormatTextConfigToJSON( ResponseFormatTextConfig$outboundSchema.parse(responseFormatTextConfig), ); } - export function responseFormatTextConfigFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/responseformattextgrammar.ts b/src/models/responseformattextgrammar.ts index b5bc4892..0743dfdb 100644 --- a/src/models/responseformattextgrammar.ts +++ b/src/models/responseformattextgrammar.ts @@ -3,24 +3,12 @@ */ import * as z from "zod/v4"; -import { safeParse } from "../lib/schemas.js"; -import { Result as SafeParseResult } from "../types/fp.js"; -import { SDKValidationError } from "./errors/sdkvalidationerror.js"; export type ResponseFormatTextGrammar = { type: "grammar"; grammar: string; }; -/** @internal */ -export const ResponseFormatTextGrammar$inboundSchema: z.ZodType< - ResponseFormatTextGrammar, - unknown -> = z.object({ - type: z.literal("grammar"), - grammar: z.string(), -}); - /** @internal */ export type ResponseFormatTextGrammar$Outbound = { type: "grammar"; @@ -36,19 +24,6 @@ export const ResponseFormatTextGrammar$outboundSchema: z.ZodType< grammar: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ResponseFormatTextGrammar$ { - /** @deprecated use `ResponseFormatTextGrammar$inboundSchema` instead. */ - export const inboundSchema = ResponseFormatTextGrammar$inboundSchema; - /** @deprecated use `ResponseFormatTextGrammar$outboundSchema` instead. */ - export const outboundSchema = ResponseFormatTextGrammar$outboundSchema; - /** @deprecated use `ResponseFormatTextGrammar$Outbound` instead. */ - export type Outbound = ResponseFormatTextGrammar$Outbound; -} - export function responseFormatTextGrammarToJSON( responseFormatTextGrammar: ResponseFormatTextGrammar, ): string { @@ -56,13 +31,3 @@ export function responseFormatTextGrammarToJSON( ResponseFormatTextGrammar$outboundSchema.parse(responseFormatTextGrammar), ); } - -export function responseFormatTextGrammarFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ResponseFormatTextGrammar$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ResponseFormatTextGrammar' from JSON`, - ); -} diff --git a/src/models/responseinputaudio.ts b/src/models/responseinputaudio.ts index 85391d13..eadffa5f 100644 --- a/src/models/responseinputaudio.ts +++ b/src/models/responseinputaudio.ts @@ -44,23 +44,11 @@ export type ResponseInputAudio = { export const ResponseInputAudioType$inboundSchema: z.ZodEnum< typeof ResponseInputAudioType > = z.enum(ResponseInputAudioType); - /** @internal */ export const ResponseInputAudioType$outboundSchema: z.ZodEnum< typeof ResponseInputAudioType > = ResponseInputAudioType$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ResponseInputAudioType$ { - /** @deprecated use `ResponseInputAudioType$inboundSchema` instead. */ - export const inboundSchema = ResponseInputAudioType$inboundSchema; - /** @deprecated use `ResponseInputAudioType$outboundSchema` instead. */ - export const outboundSchema = ResponseInputAudioType$outboundSchema; -} - /** @internal */ export const ResponseInputAudioFormat$inboundSchema: z.ZodType< ResponseInputAudioFormat, @@ -70,7 +58,6 @@ export const ResponseInputAudioFormat$inboundSchema: z.ZodType< z.enum(ResponseInputAudioFormat), z.string().transform(catchUnrecognizedEnum), ]); - /** @internal */ export const ResponseInputAudioFormat$outboundSchema: z.ZodType< ResponseInputAudioFormat, @@ -80,17 +67,6 @@ export const ResponseInputAudioFormat$outboundSchema: z.ZodType< z.string().and(z.custom>()), ]); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ResponseInputAudioFormat$ { - /** @deprecated use `ResponseInputAudioFormat$inboundSchema` instead. */ - export const inboundSchema = ResponseInputAudioFormat$inboundSchema; - /** @deprecated use `ResponseInputAudioFormat$outboundSchema` instead. */ - export const outboundSchema = ResponseInputAudioFormat$outboundSchema; -} - /** @internal */ export const ResponseInputAudioInputAudio$inboundSchema: z.ZodType< ResponseInputAudioInputAudio, @@ -99,7 +75,6 @@ export const ResponseInputAudioInputAudio$inboundSchema: z.ZodType< data: z.string(), format: ResponseInputAudioFormat$inboundSchema, }); - /** @internal */ export type ResponseInputAudioInputAudio$Outbound = { data: string; @@ -115,19 +90,6 @@ export const ResponseInputAudioInputAudio$outboundSchema: z.ZodType< format: ResponseInputAudioFormat$outboundSchema, }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ResponseInputAudioInputAudio$ { - /** @deprecated use `ResponseInputAudioInputAudio$inboundSchema` instead. */ - export const inboundSchema = ResponseInputAudioInputAudio$inboundSchema; - /** @deprecated use `ResponseInputAudioInputAudio$outboundSchema` instead. */ - export const outboundSchema = ResponseInputAudioInputAudio$outboundSchema; - /** @deprecated use `ResponseInputAudioInputAudio$Outbound` instead. */ - export type Outbound = ResponseInputAudioInputAudio$Outbound; -} - export function responseInputAudioInputAudioToJSON( responseInputAudioInputAudio: ResponseInputAudioInputAudio, ): string { @@ -137,7 +99,6 @@ export function responseInputAudioInputAudioToJSON( ), ); } - export function responseInputAudioInputAudioFromJSON( jsonString: string, ): SafeParseResult { @@ -160,7 +121,6 @@ export const ResponseInputAudio$inboundSchema: z.ZodType< "input_audio": "inputAudio", }); }); - /** @internal */ export type ResponseInputAudio$Outbound = { type: string; @@ -180,19 +140,6 @@ export const ResponseInputAudio$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ResponseInputAudio$ { - /** @deprecated use `ResponseInputAudio$inboundSchema` instead. */ - export const inboundSchema = ResponseInputAudio$inboundSchema; - /** @deprecated use `ResponseInputAudio$outboundSchema` instead. */ - export const outboundSchema = ResponseInputAudio$outboundSchema; - /** @deprecated use `ResponseInputAudio$Outbound` instead. */ - export type Outbound = ResponseInputAudio$Outbound; -} - export function responseInputAudioToJSON( responseInputAudio: ResponseInputAudio, ): string { @@ -200,7 +147,6 @@ export function responseInputAudioToJSON( ResponseInputAudio$outboundSchema.parse(responseInputAudio), ); } - export function responseInputAudioFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/responseinputfile.ts b/src/models/responseinputfile.ts index 42f8f66e..7774bd2c 100644 --- a/src/models/responseinputfile.ts +++ b/src/models/responseinputfile.ts @@ -29,23 +29,11 @@ export type ResponseInputFile = { export const ResponseInputFileType$inboundSchema: z.ZodEnum< typeof ResponseInputFileType > = z.enum(ResponseInputFileType); - /** @internal */ export const ResponseInputFileType$outboundSchema: z.ZodEnum< typeof ResponseInputFileType > = ResponseInputFileType$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ResponseInputFileType$ { - /** @deprecated use `ResponseInputFileType$inboundSchema` instead. */ - export const inboundSchema = ResponseInputFileType$inboundSchema; - /** @deprecated use `ResponseInputFileType$outboundSchema` instead. */ - export const outboundSchema = ResponseInputFileType$outboundSchema; -} - /** @internal */ export const ResponseInputFile$inboundSchema: z.ZodType< ResponseInputFile, @@ -63,7 +51,6 @@ export const ResponseInputFile$inboundSchema: z.ZodType< "file_url": "fileUrl", }); }); - /** @internal */ export type ResponseInputFile$Outbound = { type: string; @@ -91,19 +78,6 @@ export const ResponseInputFile$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ResponseInputFile$ { - /** @deprecated use `ResponseInputFile$inboundSchema` instead. */ - export const inboundSchema = ResponseInputFile$inboundSchema; - /** @deprecated use `ResponseInputFile$outboundSchema` instead. */ - export const outboundSchema = ResponseInputFile$outboundSchema; - /** @deprecated use `ResponseInputFile$Outbound` instead. */ - export type Outbound = ResponseInputFile$Outbound; -} - export function responseInputFileToJSON( responseInputFile: ResponseInputFile, ): string { @@ -111,7 +85,6 @@ export function responseInputFileToJSON( ResponseInputFile$outboundSchema.parse(responseInputFile), ); } - export function responseInputFileFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/responseinputimage.ts b/src/models/responseinputimage.ts index 44488b44..6be3caa4 100644 --- a/src/models/responseinputimage.ts +++ b/src/models/responseinputimage.ts @@ -41,23 +41,11 @@ export type ResponseInputImage = { export const ResponseInputImageType$inboundSchema: z.ZodEnum< typeof ResponseInputImageType > = z.enum(ResponseInputImageType); - /** @internal */ export const ResponseInputImageType$outboundSchema: z.ZodEnum< typeof ResponseInputImageType > = ResponseInputImageType$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ResponseInputImageType$ { - /** @deprecated use `ResponseInputImageType$inboundSchema` instead. */ - export const inboundSchema = ResponseInputImageType$inboundSchema; - /** @deprecated use `ResponseInputImageType$outboundSchema` instead. */ - export const outboundSchema = ResponseInputImageType$outboundSchema; -} - /** @internal */ export const ResponseInputImageDetail$inboundSchema: z.ZodType< ResponseInputImageDetail, @@ -67,7 +55,6 @@ export const ResponseInputImageDetail$inboundSchema: z.ZodType< z.enum(ResponseInputImageDetail), z.string().transform(catchUnrecognizedEnum), ]); - /** @internal */ export const ResponseInputImageDetail$outboundSchema: z.ZodType< ResponseInputImageDetail, @@ -77,17 +64,6 @@ export const ResponseInputImageDetail$outboundSchema: z.ZodType< z.string().and(z.custom>()), ]); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ResponseInputImageDetail$ { - /** @deprecated use `ResponseInputImageDetail$inboundSchema` instead. */ - export const inboundSchema = ResponseInputImageDetail$inboundSchema; - /** @deprecated use `ResponseInputImageDetail$outboundSchema` instead. */ - export const outboundSchema = ResponseInputImageDetail$outboundSchema; -} - /** @internal */ export const ResponseInputImage$inboundSchema: z.ZodType< ResponseInputImage, @@ -101,7 +77,6 @@ export const ResponseInputImage$inboundSchema: z.ZodType< "image_url": "imageUrl", }); }); - /** @internal */ export type ResponseInputImage$Outbound = { type: string; @@ -123,19 +98,6 @@ export const ResponseInputImage$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ResponseInputImage$ { - /** @deprecated use `ResponseInputImage$inboundSchema` instead. */ - export const inboundSchema = ResponseInputImage$inboundSchema; - /** @deprecated use `ResponseInputImage$outboundSchema` instead. */ - export const outboundSchema = ResponseInputImage$outboundSchema; - /** @deprecated use `ResponseInputImage$Outbound` instead. */ - export type Outbound = ResponseInputImage$Outbound; -} - export function responseInputImageToJSON( responseInputImage: ResponseInputImage, ): string { @@ -143,7 +105,6 @@ export function responseInputImageToJSON( ResponseInputImage$outboundSchema.parse(responseInputImage), ); } - export function responseInputImageFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/responseinputtext.ts b/src/models/responseinputtext.ts index 0dde5b9b..d97504a5 100644 --- a/src/models/responseinputtext.ts +++ b/src/models/responseinputtext.ts @@ -25,23 +25,11 @@ export type ResponseInputText = { export const ResponseInputTextType$inboundSchema: z.ZodEnum< typeof ResponseInputTextType > = z.enum(ResponseInputTextType); - /** @internal */ export const ResponseInputTextType$outboundSchema: z.ZodEnum< typeof ResponseInputTextType > = ResponseInputTextType$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ResponseInputTextType$ { - /** @deprecated use `ResponseInputTextType$inboundSchema` instead. */ - export const inboundSchema = ResponseInputTextType$inboundSchema; - /** @deprecated use `ResponseInputTextType$outboundSchema` instead. */ - export const outboundSchema = ResponseInputTextType$outboundSchema; -} - /** @internal */ export const ResponseInputText$inboundSchema: z.ZodType< ResponseInputText, @@ -50,7 +38,6 @@ export const ResponseInputText$inboundSchema: z.ZodType< type: ResponseInputTextType$inboundSchema, text: z.string(), }); - /** @internal */ export type ResponseInputText$Outbound = { type: string; @@ -66,19 +53,6 @@ export const ResponseInputText$outboundSchema: z.ZodType< text: z.string(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ResponseInputText$ { - /** @deprecated use `ResponseInputText$inboundSchema` instead. */ - export const inboundSchema = ResponseInputText$inboundSchema; - /** @deprecated use `ResponseInputText$outboundSchema` instead. */ - export const outboundSchema = ResponseInputText$outboundSchema; - /** @deprecated use `ResponseInputText$Outbound` instead. */ - export type Outbound = ResponseInputText$Outbound; -} - export function responseInputTextToJSON( responseInputText: ResponseInputText, ): string { @@ -86,7 +60,6 @@ export function responseInputTextToJSON( ResponseInputText$outboundSchema.parse(responseInputText), ); } - export function responseInputTextFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/responseoutputtext.ts b/src/models/responseoutputtext.ts index cc59ccb7..3d3a6534 100644 --- a/src/models/responseoutputtext.ts +++ b/src/models/responseoutputtext.ts @@ -29,23 +29,11 @@ export type ResponseOutputText = { export const ResponseOutputTextType$inboundSchema: z.ZodEnum< typeof ResponseOutputTextType > = z.enum(ResponseOutputTextType); - /** @internal */ export const ResponseOutputTextType$outboundSchema: z.ZodEnum< typeof ResponseOutputTextType > = ResponseOutputTextType$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ResponseOutputTextType$ { - /** @deprecated use `ResponseOutputTextType$inboundSchema` instead. */ - export const inboundSchema = ResponseOutputTextType$inboundSchema; - /** @deprecated use `ResponseOutputTextType$outboundSchema` instead. */ - export const outboundSchema = ResponseOutputTextType$outboundSchema; -} - /** @internal */ export const ResponseOutputText$inboundSchema: z.ZodType< ResponseOutputText, @@ -55,7 +43,6 @@ export const ResponseOutputText$inboundSchema: z.ZodType< text: z.string(), annotations: z.array(OpenAIResponsesAnnotation$inboundSchema).optional(), }); - /** @internal */ export type ResponseOutputText$Outbound = { type: string; @@ -73,19 +60,6 @@ export const ResponseOutputText$outboundSchema: z.ZodType< annotations: z.array(OpenAIResponsesAnnotation$outboundSchema).optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ResponseOutputText$ { - /** @deprecated use `ResponseOutputText$inboundSchema` instead. */ - export const inboundSchema = ResponseOutputText$inboundSchema; - /** @deprecated use `ResponseOutputText$outboundSchema` instead. */ - export const outboundSchema = ResponseOutputText$outboundSchema; - /** @deprecated use `ResponseOutputText$Outbound` instead. */ - export type Outbound = ResponseOutputText$Outbound; -} - export function responseOutputTextToJSON( responseOutputText: ResponseOutputText, ): string { @@ -93,7 +67,6 @@ export function responseOutputTextToJSON( ResponseOutputText$outboundSchema.parse(responseOutputText), ); } - export function responseOutputTextFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/responseserrorfield.ts b/src/models/responseserrorfield.ts index 381c0fa5..4a5d2523 100644 --- a/src/models/responseserrorfield.ts +++ b/src/models/responseserrorfield.ts @@ -4,11 +4,7 @@ import * as z from "zod/v4"; import { safeParse } from "../lib/schemas.js"; -import { - catchUnrecognizedEnum, - OpenEnum, - Unrecognized, -} from "../types/enums.js"; +import { catchUnrecognizedEnum, OpenEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; @@ -49,23 +45,6 @@ export const CodeEnum$inboundSchema: z.ZodType = z z.string().transform(catchUnrecognizedEnum), ]); -/** @internal */ -export const CodeEnum$outboundSchema: z.ZodType = z.union([ - z.enum(CodeEnum), - z.string().and(z.custom>()), -]); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace CodeEnum$ { - /** @deprecated use `CodeEnum$inboundSchema` instead. */ - export const inboundSchema = CodeEnum$inboundSchema; - /** @deprecated use `CodeEnum$outboundSchema` instead. */ - export const outboundSchema = CodeEnum$outboundSchema; -} - /** @internal */ export const ResponsesErrorField$inboundSchema: z.ZodType< ResponsesErrorField, @@ -75,42 +54,6 @@ export const ResponsesErrorField$inboundSchema: z.ZodType< message: z.string(), }); -/** @internal */ -export type ResponsesErrorField$Outbound = { - code: string; - message: string; -}; - -/** @internal */ -export const ResponsesErrorField$outboundSchema: z.ZodType< - ResponsesErrorField$Outbound, - ResponsesErrorField -> = z.object({ - code: CodeEnum$outboundSchema, - message: z.string(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ResponsesErrorField$ { - /** @deprecated use `ResponsesErrorField$inboundSchema` instead. */ - export const inboundSchema = ResponsesErrorField$inboundSchema; - /** @deprecated use `ResponsesErrorField$outboundSchema` instead. */ - export const outboundSchema = ResponsesErrorField$outboundSchema; - /** @deprecated use `ResponsesErrorField$Outbound` instead. */ - export type Outbound = ResponsesErrorField$Outbound; -} - -export function responsesErrorFieldToJSON( - responsesErrorField: ResponsesErrorField, -): string { - return JSON.stringify( - ResponsesErrorField$outboundSchema.parse(responsesErrorField), - ); -} - export function responsesErrorFieldFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/responsesformatjsonobject.ts b/src/models/responsesformatjsonobject.ts index 6152a4e6..9a59e149 100644 --- a/src/models/responsesformatjsonobject.ts +++ b/src/models/responsesformatjsonobject.ts @@ -26,23 +26,11 @@ export type ResponsesFormatJSONObject = { export const ResponsesFormatJSONObjectType$inboundSchema: z.ZodEnum< typeof ResponsesFormatJSONObjectType > = z.enum(ResponsesFormatJSONObjectType); - /** @internal */ export const ResponsesFormatJSONObjectType$outboundSchema: z.ZodEnum< typeof ResponsesFormatJSONObjectType > = ResponsesFormatJSONObjectType$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ResponsesFormatJSONObjectType$ { - /** @deprecated use `ResponsesFormatJSONObjectType$inboundSchema` instead. */ - export const inboundSchema = ResponsesFormatJSONObjectType$inboundSchema; - /** @deprecated use `ResponsesFormatJSONObjectType$outboundSchema` instead. */ - export const outboundSchema = ResponsesFormatJSONObjectType$outboundSchema; -} - /** @internal */ export const ResponsesFormatJSONObject$inboundSchema: z.ZodType< ResponsesFormatJSONObject, @@ -50,7 +38,6 @@ export const ResponsesFormatJSONObject$inboundSchema: z.ZodType< > = z.object({ type: ResponsesFormatJSONObjectType$inboundSchema, }); - /** @internal */ export type ResponsesFormatJSONObject$Outbound = { type: string; @@ -64,19 +51,6 @@ export const ResponsesFormatJSONObject$outboundSchema: z.ZodType< type: ResponsesFormatJSONObjectType$outboundSchema, }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ResponsesFormatJSONObject$ { - /** @deprecated use `ResponsesFormatJSONObject$inboundSchema` instead. */ - export const inboundSchema = ResponsesFormatJSONObject$inboundSchema; - /** @deprecated use `ResponsesFormatJSONObject$outboundSchema` instead. */ - export const outboundSchema = ResponsesFormatJSONObject$outboundSchema; - /** @deprecated use `ResponsesFormatJSONObject$Outbound` instead. */ - export type Outbound = ResponsesFormatJSONObject$Outbound; -} - export function responsesFormatJSONObjectToJSON( responsesFormatJSONObject: ResponsesFormatJSONObject, ): string { @@ -84,7 +58,6 @@ export function responsesFormatJSONObjectToJSON( ResponsesFormatJSONObject$outboundSchema.parse(responsesFormatJSONObject), ); } - export function responsesFormatJSONObjectFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/responsesformattext.ts b/src/models/responsesformattext.ts index 56a87566..de5a4e67 100644 --- a/src/models/responsesformattext.ts +++ b/src/models/responsesformattext.ts @@ -26,23 +26,11 @@ export type ResponsesFormatText = { export const ResponsesFormatTextType$inboundSchema: z.ZodEnum< typeof ResponsesFormatTextType > = z.enum(ResponsesFormatTextType); - /** @internal */ export const ResponsesFormatTextType$outboundSchema: z.ZodEnum< typeof ResponsesFormatTextType > = ResponsesFormatTextType$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ResponsesFormatTextType$ { - /** @deprecated use `ResponsesFormatTextType$inboundSchema` instead. */ - export const inboundSchema = ResponsesFormatTextType$inboundSchema; - /** @deprecated use `ResponsesFormatTextType$outboundSchema` instead. */ - export const outboundSchema = ResponsesFormatTextType$outboundSchema; -} - /** @internal */ export const ResponsesFormatText$inboundSchema: z.ZodType< ResponsesFormatText, @@ -50,7 +38,6 @@ export const ResponsesFormatText$inboundSchema: z.ZodType< > = z.object({ type: ResponsesFormatTextType$inboundSchema, }); - /** @internal */ export type ResponsesFormatText$Outbound = { type: string; @@ -64,19 +51,6 @@ export const ResponsesFormatText$outboundSchema: z.ZodType< type: ResponsesFormatTextType$outboundSchema, }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ResponsesFormatText$ { - /** @deprecated use `ResponsesFormatText$inboundSchema` instead. */ - export const inboundSchema = ResponsesFormatText$inboundSchema; - /** @deprecated use `ResponsesFormatText$outboundSchema` instead. */ - export const outboundSchema = ResponsesFormatText$outboundSchema; - /** @deprecated use `ResponsesFormatText$Outbound` instead. */ - export type Outbound = ResponsesFormatText$Outbound; -} - export function responsesFormatTextToJSON( responsesFormatText: ResponsesFormatText, ): string { @@ -84,7 +58,6 @@ export function responsesFormatTextToJSON( ResponsesFormatText$outboundSchema.parse(responsesFormatText), ); } - export function responsesFormatTextFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/responsesformattextjsonschemaconfig.ts b/src/models/responsesformattextjsonschemaconfig.ts index 051651fa..9e4ef10e 100644 --- a/src/models/responsesformattextjsonschemaconfig.ts +++ b/src/models/responsesformattextjsonschemaconfig.ts @@ -30,25 +30,11 @@ export type ResponsesFormatTextJSONSchemaConfig = { export const ResponsesFormatTextJSONSchemaConfigType$inboundSchema: z.ZodEnum< typeof ResponsesFormatTextJSONSchemaConfigType > = z.enum(ResponsesFormatTextJSONSchemaConfigType); - /** @internal */ export const ResponsesFormatTextJSONSchemaConfigType$outboundSchema: z.ZodEnum< typeof ResponsesFormatTextJSONSchemaConfigType > = ResponsesFormatTextJSONSchemaConfigType$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ResponsesFormatTextJSONSchemaConfigType$ { - /** @deprecated use `ResponsesFormatTextJSONSchemaConfigType$inboundSchema` instead. */ - export const inboundSchema = - ResponsesFormatTextJSONSchemaConfigType$inboundSchema; - /** @deprecated use `ResponsesFormatTextJSONSchemaConfigType$outboundSchema` instead. */ - export const outboundSchema = - ResponsesFormatTextJSONSchemaConfigType$outboundSchema; -} - /** @internal */ export const ResponsesFormatTextJSONSchemaConfig$inboundSchema: z.ZodType< ResponsesFormatTextJSONSchemaConfig, @@ -60,7 +46,6 @@ export const ResponsesFormatTextJSONSchemaConfig$inboundSchema: z.ZodType< strict: z.nullable(z.boolean()).optional(), schema: z.record(z.string(), z.nullable(z.any())), }); - /** @internal */ export type ResponsesFormatTextJSONSchemaConfig$Outbound = { type: string; @@ -82,21 +67,6 @@ export const ResponsesFormatTextJSONSchemaConfig$outboundSchema: z.ZodType< schema: z.record(z.string(), z.nullable(z.any())), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ResponsesFormatTextJSONSchemaConfig$ { - /** @deprecated use `ResponsesFormatTextJSONSchemaConfig$inboundSchema` instead. */ - export const inboundSchema = - ResponsesFormatTextJSONSchemaConfig$inboundSchema; - /** @deprecated use `ResponsesFormatTextJSONSchemaConfig$outboundSchema` instead. */ - export const outboundSchema = - ResponsesFormatTextJSONSchemaConfig$outboundSchema; - /** @deprecated use `ResponsesFormatTextJSONSchemaConfig$Outbound` instead. */ - export type Outbound = ResponsesFormatTextJSONSchemaConfig$Outbound; -} - export function responsesFormatTextJSONSchemaConfigToJSON( responsesFormatTextJSONSchemaConfig: ResponsesFormatTextJSONSchemaConfig, ): string { @@ -106,7 +76,6 @@ export function responsesFormatTextJSONSchemaConfigToJSON( ), ); } - export function responsesFormatTextJSONSchemaConfigFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/responsesimagegenerationcall.ts b/src/models/responsesimagegenerationcall.ts index 0b9ff32a..1019800e 100644 --- a/src/models/responsesimagegenerationcall.ts +++ b/src/models/responsesimagegenerationcall.ts @@ -31,23 +31,11 @@ export type ResponsesImageGenerationCall = { export const ResponsesImageGenerationCallType$inboundSchema: z.ZodEnum< typeof ResponsesImageGenerationCallType > = z.enum(ResponsesImageGenerationCallType); - /** @internal */ export const ResponsesImageGenerationCallType$outboundSchema: z.ZodEnum< typeof ResponsesImageGenerationCallType > = ResponsesImageGenerationCallType$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ResponsesImageGenerationCallType$ { - /** @deprecated use `ResponsesImageGenerationCallType$inboundSchema` instead. */ - export const inboundSchema = ResponsesImageGenerationCallType$inboundSchema; - /** @deprecated use `ResponsesImageGenerationCallType$outboundSchema` instead. */ - export const outboundSchema = ResponsesImageGenerationCallType$outboundSchema; -} - /** @internal */ export const ResponsesImageGenerationCall$inboundSchema: z.ZodType< ResponsesImageGenerationCall, @@ -58,7 +46,6 @@ export const ResponsesImageGenerationCall$inboundSchema: z.ZodType< result: z.nullable(z.string()), status: ImageGenerationStatus$inboundSchema, }); - /** @internal */ export type ResponsesImageGenerationCall$Outbound = { type: string; @@ -78,19 +65,6 @@ export const ResponsesImageGenerationCall$outboundSchema: z.ZodType< status: ImageGenerationStatus$outboundSchema, }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ResponsesImageGenerationCall$ { - /** @deprecated use `ResponsesImageGenerationCall$inboundSchema` instead. */ - export const inboundSchema = ResponsesImageGenerationCall$inboundSchema; - /** @deprecated use `ResponsesImageGenerationCall$outboundSchema` instead. */ - export const outboundSchema = ResponsesImageGenerationCall$outboundSchema; - /** @deprecated use `ResponsesImageGenerationCall$Outbound` instead. */ - export type Outbound = ResponsesImageGenerationCall$Outbound; -} - export function responsesImageGenerationCallToJSON( responsesImageGenerationCall: ResponsesImageGenerationCall, ): string { @@ -100,7 +74,6 @@ export function responsesImageGenerationCallToJSON( ), ); } - export function responsesImageGenerationCallFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/responsesoutputitem.ts b/src/models/responsesoutputitem.ts index 105d5298..e954c2df 100644 --- a/src/models/responsesoutputitem.ts +++ b/src/models/responsesoutputitem.ts @@ -9,38 +9,26 @@ import { SDKValidationError } from "./errors/sdkvalidationerror.js"; import { ResponsesImageGenerationCall, ResponsesImageGenerationCall$inboundSchema, - ResponsesImageGenerationCall$Outbound, - ResponsesImageGenerationCall$outboundSchema, } from "./responsesimagegenerationcall.js"; import { ResponsesOutputItemFileSearchCall, ResponsesOutputItemFileSearchCall$inboundSchema, - ResponsesOutputItemFileSearchCall$Outbound, - ResponsesOutputItemFileSearchCall$outboundSchema, } from "./responsesoutputitemfilesearchcall.js"; import { ResponsesOutputItemFunctionCall, ResponsesOutputItemFunctionCall$inboundSchema, - ResponsesOutputItemFunctionCall$Outbound, - ResponsesOutputItemFunctionCall$outboundSchema, } from "./responsesoutputitemfunctioncall.js"; import { ResponsesOutputItemReasoning, ResponsesOutputItemReasoning$inboundSchema, - ResponsesOutputItemReasoning$Outbound, - ResponsesOutputItemReasoning$outboundSchema, } from "./responsesoutputitemreasoning.js"; import { ResponsesOutputMessage, ResponsesOutputMessage$inboundSchema, - ResponsesOutputMessage$Outbound, - ResponsesOutputMessage$outboundSchema, } from "./responsesoutputmessage.js"; import { ResponsesWebSearchCallOutput, ResponsesWebSearchCallOutput$inboundSchema, - ResponsesWebSearchCallOutput$Outbound, - ResponsesWebSearchCallOutput$outboundSchema, } from "./responseswebsearchcalloutput.js"; /** @@ -67,49 +55,6 @@ export const ResponsesOutputItem$inboundSchema: z.ZodType< ResponsesOutputItemReasoning$inboundSchema, ]); -/** @internal */ -export type ResponsesOutputItem$Outbound = - | ResponsesOutputMessage$Outbound - | ResponsesOutputItemFunctionCall$Outbound - | ResponsesOutputItemFileSearchCall$Outbound - | ResponsesImageGenerationCall$Outbound - | ResponsesWebSearchCallOutput$Outbound - | ResponsesOutputItemReasoning$Outbound; - -/** @internal */ -export const ResponsesOutputItem$outboundSchema: z.ZodType< - ResponsesOutputItem$Outbound, - ResponsesOutputItem -> = z.union([ - ResponsesOutputMessage$outboundSchema, - ResponsesOutputItemFunctionCall$outboundSchema, - ResponsesOutputItemFileSearchCall$outboundSchema, - ResponsesImageGenerationCall$outboundSchema, - ResponsesWebSearchCallOutput$outboundSchema, - ResponsesOutputItemReasoning$outboundSchema, -]); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ResponsesOutputItem$ { - /** @deprecated use `ResponsesOutputItem$inboundSchema` instead. */ - export const inboundSchema = ResponsesOutputItem$inboundSchema; - /** @deprecated use `ResponsesOutputItem$outboundSchema` instead. */ - export const outboundSchema = ResponsesOutputItem$outboundSchema; - /** @deprecated use `ResponsesOutputItem$Outbound` instead. */ - export type Outbound = ResponsesOutputItem$Outbound; -} - -export function responsesOutputItemToJSON( - responsesOutputItem: ResponsesOutputItem, -): string { - return JSON.stringify( - ResponsesOutputItem$outboundSchema.parse(responsesOutputItem), - ); -} - export function responsesOutputItemFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/responsesoutputitemfilesearchcall.ts b/src/models/responsesoutputitemfilesearchcall.ts index a4b3cdcb..86c6b0b2 100644 --- a/src/models/responsesoutputitemfilesearchcall.ts +++ b/src/models/responsesoutputitemfilesearchcall.ts @@ -31,25 +31,11 @@ export type ResponsesOutputItemFileSearchCall = { export const ResponsesOutputItemFileSearchCallType$inboundSchema: z.ZodEnum< typeof ResponsesOutputItemFileSearchCallType > = z.enum(ResponsesOutputItemFileSearchCallType); - /** @internal */ export const ResponsesOutputItemFileSearchCallType$outboundSchema: z.ZodEnum< typeof ResponsesOutputItemFileSearchCallType > = ResponsesOutputItemFileSearchCallType$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ResponsesOutputItemFileSearchCallType$ { - /** @deprecated use `ResponsesOutputItemFileSearchCallType$inboundSchema` instead. */ - export const inboundSchema = - ResponsesOutputItemFileSearchCallType$inboundSchema; - /** @deprecated use `ResponsesOutputItemFileSearchCallType$outboundSchema` instead. */ - export const outboundSchema = - ResponsesOutputItemFileSearchCallType$outboundSchema; -} - /** @internal */ export const ResponsesOutputItemFileSearchCall$inboundSchema: z.ZodType< ResponsesOutputItemFileSearchCall, @@ -60,7 +46,6 @@ export const ResponsesOutputItemFileSearchCall$inboundSchema: z.ZodType< queries: z.array(z.string()), status: WebSearchStatus$inboundSchema, }); - /** @internal */ export type ResponsesOutputItemFileSearchCall$Outbound = { type: string; @@ -80,20 +65,6 @@ export const ResponsesOutputItemFileSearchCall$outboundSchema: z.ZodType< status: WebSearchStatus$outboundSchema, }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ResponsesOutputItemFileSearchCall$ { - /** @deprecated use `ResponsesOutputItemFileSearchCall$inboundSchema` instead. */ - export const inboundSchema = ResponsesOutputItemFileSearchCall$inboundSchema; - /** @deprecated use `ResponsesOutputItemFileSearchCall$outboundSchema` instead. */ - export const outboundSchema = - ResponsesOutputItemFileSearchCall$outboundSchema; - /** @deprecated use `ResponsesOutputItemFileSearchCall$Outbound` instead. */ - export type Outbound = ResponsesOutputItemFileSearchCall$Outbound; -} - export function responsesOutputItemFileSearchCallToJSON( responsesOutputItemFileSearchCall: ResponsesOutputItemFileSearchCall, ): string { @@ -103,7 +74,6 @@ export function responsesOutputItemFileSearchCallToJSON( ), ); } - export function responsesOutputItemFileSearchCallFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/responsesoutputitemfunctioncall.ts b/src/models/responsesoutputitemfunctioncall.ts index 0552e61f..d870232c 100644 --- a/src/models/responsesoutputitemfunctioncall.ts +++ b/src/models/responsesoutputitemfunctioncall.ts @@ -59,97 +59,41 @@ export type ResponsesOutputItemFunctionCall = { export const ResponsesOutputItemFunctionCallType$inboundSchema: z.ZodEnum< typeof ResponsesOutputItemFunctionCallType > = z.enum(ResponsesOutputItemFunctionCallType); - /** @internal */ export const ResponsesOutputItemFunctionCallType$outboundSchema: z.ZodEnum< typeof ResponsesOutputItemFunctionCallType > = ResponsesOutputItemFunctionCallType$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ResponsesOutputItemFunctionCallType$ { - /** @deprecated use `ResponsesOutputItemFunctionCallType$inboundSchema` instead. */ - export const inboundSchema = - ResponsesOutputItemFunctionCallType$inboundSchema; - /** @deprecated use `ResponsesOutputItemFunctionCallType$outboundSchema` instead. */ - export const outboundSchema = - ResponsesOutputItemFunctionCallType$outboundSchema; -} - /** @internal */ export const ResponsesOutputItemFunctionCallStatusInProgress$inboundSchema: z.ZodEnum = z.enum( ResponsesOutputItemFunctionCallStatusInProgress, ); - /** @internal */ export const ResponsesOutputItemFunctionCallStatusInProgress$outboundSchema: z.ZodEnum = ResponsesOutputItemFunctionCallStatusInProgress$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ResponsesOutputItemFunctionCallStatusInProgress$ { - /** @deprecated use `ResponsesOutputItemFunctionCallStatusInProgress$inboundSchema` instead. */ - export const inboundSchema = - ResponsesOutputItemFunctionCallStatusInProgress$inboundSchema; - /** @deprecated use `ResponsesOutputItemFunctionCallStatusInProgress$outboundSchema` instead. */ - export const outboundSchema = - ResponsesOutputItemFunctionCallStatusInProgress$outboundSchema; -} - /** @internal */ export const ResponsesOutputItemFunctionCallStatusIncomplete$inboundSchema: z.ZodEnum = z.enum( ResponsesOutputItemFunctionCallStatusIncomplete, ); - /** @internal */ export const ResponsesOutputItemFunctionCallStatusIncomplete$outboundSchema: z.ZodEnum = ResponsesOutputItemFunctionCallStatusIncomplete$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ResponsesOutputItemFunctionCallStatusIncomplete$ { - /** @deprecated use `ResponsesOutputItemFunctionCallStatusIncomplete$inboundSchema` instead. */ - export const inboundSchema = - ResponsesOutputItemFunctionCallStatusIncomplete$inboundSchema; - /** @deprecated use `ResponsesOutputItemFunctionCallStatusIncomplete$outboundSchema` instead. */ - export const outboundSchema = - ResponsesOutputItemFunctionCallStatusIncomplete$outboundSchema; -} - /** @internal */ export const ResponsesOutputItemFunctionCallStatusCompleted$inboundSchema: z.ZodEnum = z.enum( ResponsesOutputItemFunctionCallStatusCompleted, ); - /** @internal */ export const ResponsesOutputItemFunctionCallStatusCompleted$outboundSchema: z.ZodEnum = ResponsesOutputItemFunctionCallStatusCompleted$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ResponsesOutputItemFunctionCallStatusCompleted$ { - /** @deprecated use `ResponsesOutputItemFunctionCallStatusCompleted$inboundSchema` instead. */ - export const inboundSchema = - ResponsesOutputItemFunctionCallStatusCompleted$inboundSchema; - /** @deprecated use `ResponsesOutputItemFunctionCallStatusCompleted$outboundSchema` instead. */ - export const outboundSchema = - ResponsesOutputItemFunctionCallStatusCompleted$outboundSchema; -} - /** @internal */ export const ResponsesOutputItemFunctionCallStatusUnion$inboundSchema: z.ZodType = z.union([ @@ -157,7 +101,6 @@ export const ResponsesOutputItemFunctionCallStatusUnion$inboundSchema: ResponsesOutputItemFunctionCallStatusIncomplete$inboundSchema, ResponsesOutputItemFunctionCallStatusInProgress$inboundSchema, ]); - /** @internal */ export type ResponsesOutputItemFunctionCallStatusUnion$Outbound = | string @@ -175,21 +118,6 @@ export const ResponsesOutputItemFunctionCallStatusUnion$outboundSchema: ResponsesOutputItemFunctionCallStatusInProgress$outboundSchema, ]); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ResponsesOutputItemFunctionCallStatusUnion$ { - /** @deprecated use `ResponsesOutputItemFunctionCallStatusUnion$inboundSchema` instead. */ - export const inboundSchema = - ResponsesOutputItemFunctionCallStatusUnion$inboundSchema; - /** @deprecated use `ResponsesOutputItemFunctionCallStatusUnion$outboundSchema` instead. */ - export const outboundSchema = - ResponsesOutputItemFunctionCallStatusUnion$outboundSchema; - /** @deprecated use `ResponsesOutputItemFunctionCallStatusUnion$Outbound` instead. */ - export type Outbound = ResponsesOutputItemFunctionCallStatusUnion$Outbound; -} - export function responsesOutputItemFunctionCallStatusUnionToJSON( responsesOutputItemFunctionCallStatusUnion: ResponsesOutputItemFunctionCallStatusUnion, @@ -200,7 +128,6 @@ export function responsesOutputItemFunctionCallStatusUnionToJSON( ), ); } - export function responsesOutputItemFunctionCallStatusUnionFromJSON( jsonString: string, ): SafeParseResult< @@ -237,7 +164,6 @@ export const ResponsesOutputItemFunctionCall$inboundSchema: z.ZodType< "call_id": "callId", }); }); - /** @internal */ export type ResponsesOutputItemFunctionCall$Outbound = { type: string; @@ -269,19 +195,6 @@ export const ResponsesOutputItemFunctionCall$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ResponsesOutputItemFunctionCall$ { - /** @deprecated use `ResponsesOutputItemFunctionCall$inboundSchema` instead. */ - export const inboundSchema = ResponsesOutputItemFunctionCall$inboundSchema; - /** @deprecated use `ResponsesOutputItemFunctionCall$outboundSchema` instead. */ - export const outboundSchema = ResponsesOutputItemFunctionCall$outboundSchema; - /** @deprecated use `ResponsesOutputItemFunctionCall$Outbound` instead. */ - export type Outbound = ResponsesOutputItemFunctionCall$Outbound; -} - export function responsesOutputItemFunctionCallToJSON( responsesOutputItemFunctionCall: ResponsesOutputItemFunctionCall, ): string { @@ -291,7 +204,6 @@ export function responsesOutputItemFunctionCallToJSON( ), ); } - export function responsesOutputItemFunctionCallFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/responsesoutputitemreasoning.ts b/src/models/responsesoutputitemreasoning.ts index 43ec9af4..bc327b5c 100644 --- a/src/models/responsesoutputitemreasoning.ts +++ b/src/models/responsesoutputitemreasoning.ts @@ -74,95 +74,41 @@ export type ResponsesOutputItemReasoning = { export const ResponsesOutputItemReasoningType$inboundSchema: z.ZodEnum< typeof ResponsesOutputItemReasoningType > = z.enum(ResponsesOutputItemReasoningType); - /** @internal */ export const ResponsesOutputItemReasoningType$outboundSchema: z.ZodEnum< typeof ResponsesOutputItemReasoningType > = ResponsesOutputItemReasoningType$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ResponsesOutputItemReasoningType$ { - /** @deprecated use `ResponsesOutputItemReasoningType$inboundSchema` instead. */ - export const inboundSchema = ResponsesOutputItemReasoningType$inboundSchema; - /** @deprecated use `ResponsesOutputItemReasoningType$outboundSchema` instead. */ - export const outboundSchema = ResponsesOutputItemReasoningType$outboundSchema; -} - /** @internal */ export const ResponsesOutputItemReasoningStatusInProgress$inboundSchema: z.ZodEnum = z.enum( ResponsesOutputItemReasoningStatusInProgress, ); - /** @internal */ export const ResponsesOutputItemReasoningStatusInProgress$outboundSchema: z.ZodEnum = ResponsesOutputItemReasoningStatusInProgress$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ResponsesOutputItemReasoningStatusInProgress$ { - /** @deprecated use `ResponsesOutputItemReasoningStatusInProgress$inboundSchema` instead. */ - export const inboundSchema = - ResponsesOutputItemReasoningStatusInProgress$inboundSchema; - /** @deprecated use `ResponsesOutputItemReasoningStatusInProgress$outboundSchema` instead. */ - export const outboundSchema = - ResponsesOutputItemReasoningStatusInProgress$outboundSchema; -} - /** @internal */ export const ResponsesOutputItemReasoningStatusIncomplete$inboundSchema: z.ZodEnum = z.enum( ResponsesOutputItemReasoningStatusIncomplete, ); - /** @internal */ export const ResponsesOutputItemReasoningStatusIncomplete$outboundSchema: z.ZodEnum = ResponsesOutputItemReasoningStatusIncomplete$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ResponsesOutputItemReasoningStatusIncomplete$ { - /** @deprecated use `ResponsesOutputItemReasoningStatusIncomplete$inboundSchema` instead. */ - export const inboundSchema = - ResponsesOutputItemReasoningStatusIncomplete$inboundSchema; - /** @deprecated use `ResponsesOutputItemReasoningStatusIncomplete$outboundSchema` instead. */ - export const outboundSchema = - ResponsesOutputItemReasoningStatusIncomplete$outboundSchema; -} - /** @internal */ export const ResponsesOutputItemReasoningStatusCompleted$inboundSchema: z.ZodEnum = z.enum( ResponsesOutputItemReasoningStatusCompleted, ); - /** @internal */ export const ResponsesOutputItemReasoningStatusCompleted$outboundSchema: z.ZodEnum = ResponsesOutputItemReasoningStatusCompleted$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ResponsesOutputItemReasoningStatusCompleted$ { - /** @deprecated use `ResponsesOutputItemReasoningStatusCompleted$inboundSchema` instead. */ - export const inboundSchema = - ResponsesOutputItemReasoningStatusCompleted$inboundSchema; - /** @deprecated use `ResponsesOutputItemReasoningStatusCompleted$outboundSchema` instead. */ - export const outboundSchema = - ResponsesOutputItemReasoningStatusCompleted$outboundSchema; -} - /** @internal */ export const ResponsesOutputItemReasoningStatusUnion$inboundSchema: z.ZodType< ResponsesOutputItemReasoningStatusUnion, @@ -172,7 +118,6 @@ export const ResponsesOutputItemReasoningStatusUnion$inboundSchema: z.ZodType< ResponsesOutputItemReasoningStatusIncomplete$inboundSchema, ResponsesOutputItemReasoningStatusInProgress$inboundSchema, ]); - /** @internal */ export type ResponsesOutputItemReasoningStatusUnion$Outbound = | string @@ -189,21 +134,6 @@ export const ResponsesOutputItemReasoningStatusUnion$outboundSchema: z.ZodType< ResponsesOutputItemReasoningStatusInProgress$outboundSchema, ]); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ResponsesOutputItemReasoningStatusUnion$ { - /** @deprecated use `ResponsesOutputItemReasoningStatusUnion$inboundSchema` instead. */ - export const inboundSchema = - ResponsesOutputItemReasoningStatusUnion$inboundSchema; - /** @deprecated use `ResponsesOutputItemReasoningStatusUnion$outboundSchema` instead. */ - export const outboundSchema = - ResponsesOutputItemReasoningStatusUnion$outboundSchema; - /** @deprecated use `ResponsesOutputItemReasoningStatusUnion$Outbound` instead. */ - export type Outbound = ResponsesOutputItemReasoningStatusUnion$Outbound; -} - export function responsesOutputItemReasoningStatusUnionToJSON( responsesOutputItemReasoningStatusUnion: ResponsesOutputItemReasoningStatusUnion, @@ -214,7 +144,6 @@ export function responsesOutputItemReasoningStatusUnionToJSON( ), ); } - export function responsesOutputItemReasoningStatusUnionFromJSON( jsonString: string, ): SafeParseResult< @@ -251,7 +180,6 @@ export const ResponsesOutputItemReasoning$inboundSchema: z.ZodType< "encrypted_content": "encryptedContent", }); }); - /** @internal */ export type ResponsesOutputItemReasoning$Outbound = { type: string; @@ -283,19 +211,6 @@ export const ResponsesOutputItemReasoning$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ResponsesOutputItemReasoning$ { - /** @deprecated use `ResponsesOutputItemReasoning$inboundSchema` instead. */ - export const inboundSchema = ResponsesOutputItemReasoning$inboundSchema; - /** @deprecated use `ResponsesOutputItemReasoning$outboundSchema` instead. */ - export const outboundSchema = ResponsesOutputItemReasoning$outboundSchema; - /** @deprecated use `ResponsesOutputItemReasoning$Outbound` instead. */ - export type Outbound = ResponsesOutputItemReasoning$Outbound; -} - export function responsesOutputItemReasoningToJSON( responsesOutputItemReasoning: ResponsesOutputItemReasoning, ): string { @@ -305,7 +220,6 @@ export function responsesOutputItemReasoningToJSON( ), ); } - export function responsesOutputItemReasoningFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/responsesoutputmessage.ts b/src/models/responsesoutputmessage.ts index 8a3a6d64..154a30fb 100644 --- a/src/models/responsesoutputmessage.ts +++ b/src/models/responsesoutputmessage.ts @@ -83,113 +83,47 @@ export type ResponsesOutputMessage = { export const ResponsesOutputMessageRole$inboundSchema: z.ZodEnum< typeof ResponsesOutputMessageRole > = z.enum(ResponsesOutputMessageRole); - /** @internal */ export const ResponsesOutputMessageRole$outboundSchema: z.ZodEnum< typeof ResponsesOutputMessageRole > = ResponsesOutputMessageRole$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ResponsesOutputMessageRole$ { - /** @deprecated use `ResponsesOutputMessageRole$inboundSchema` instead. */ - export const inboundSchema = ResponsesOutputMessageRole$inboundSchema; - /** @deprecated use `ResponsesOutputMessageRole$outboundSchema` instead. */ - export const outboundSchema = ResponsesOutputMessageRole$outboundSchema; -} - /** @internal */ export const ResponsesOutputMessageType$inboundSchema: z.ZodEnum< typeof ResponsesOutputMessageType > = z.enum(ResponsesOutputMessageType); - /** @internal */ export const ResponsesOutputMessageType$outboundSchema: z.ZodEnum< typeof ResponsesOutputMessageType > = ResponsesOutputMessageType$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ResponsesOutputMessageType$ { - /** @deprecated use `ResponsesOutputMessageType$inboundSchema` instead. */ - export const inboundSchema = ResponsesOutputMessageType$inboundSchema; - /** @deprecated use `ResponsesOutputMessageType$outboundSchema` instead. */ - export const outboundSchema = ResponsesOutputMessageType$outboundSchema; -} - /** @internal */ export const ResponsesOutputMessageStatusInProgress$inboundSchema: z.ZodEnum< typeof ResponsesOutputMessageStatusInProgress > = z.enum(ResponsesOutputMessageStatusInProgress); - /** @internal */ export const ResponsesOutputMessageStatusInProgress$outboundSchema: z.ZodEnum< typeof ResponsesOutputMessageStatusInProgress > = ResponsesOutputMessageStatusInProgress$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ResponsesOutputMessageStatusInProgress$ { - /** @deprecated use `ResponsesOutputMessageStatusInProgress$inboundSchema` instead. */ - export const inboundSchema = - ResponsesOutputMessageStatusInProgress$inboundSchema; - /** @deprecated use `ResponsesOutputMessageStatusInProgress$outboundSchema` instead. */ - export const outboundSchema = - ResponsesOutputMessageStatusInProgress$outboundSchema; -} - /** @internal */ export const ResponsesOutputMessageStatusIncomplete$inboundSchema: z.ZodEnum< typeof ResponsesOutputMessageStatusIncomplete > = z.enum(ResponsesOutputMessageStatusIncomplete); - /** @internal */ export const ResponsesOutputMessageStatusIncomplete$outboundSchema: z.ZodEnum< typeof ResponsesOutputMessageStatusIncomplete > = ResponsesOutputMessageStatusIncomplete$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ResponsesOutputMessageStatusIncomplete$ { - /** @deprecated use `ResponsesOutputMessageStatusIncomplete$inboundSchema` instead. */ - export const inboundSchema = - ResponsesOutputMessageStatusIncomplete$inboundSchema; - /** @deprecated use `ResponsesOutputMessageStatusIncomplete$outboundSchema` instead. */ - export const outboundSchema = - ResponsesOutputMessageStatusIncomplete$outboundSchema; -} - /** @internal */ export const ResponsesOutputMessageStatusCompleted$inboundSchema: z.ZodEnum< typeof ResponsesOutputMessageStatusCompleted > = z.enum(ResponsesOutputMessageStatusCompleted); - /** @internal */ export const ResponsesOutputMessageStatusCompleted$outboundSchema: z.ZodEnum< typeof ResponsesOutputMessageStatusCompleted > = ResponsesOutputMessageStatusCompleted$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ResponsesOutputMessageStatusCompleted$ { - /** @deprecated use `ResponsesOutputMessageStatusCompleted$inboundSchema` instead. */ - export const inboundSchema = - ResponsesOutputMessageStatusCompleted$inboundSchema; - /** @deprecated use `ResponsesOutputMessageStatusCompleted$outboundSchema` instead. */ - export const outboundSchema = - ResponsesOutputMessageStatusCompleted$outboundSchema; -} - /** @internal */ export const ResponsesOutputMessageStatusUnion$inboundSchema: z.ZodType< ResponsesOutputMessageStatusUnion, @@ -199,7 +133,6 @@ export const ResponsesOutputMessageStatusUnion$inboundSchema: z.ZodType< ResponsesOutputMessageStatusIncomplete$inboundSchema, ResponsesOutputMessageStatusInProgress$inboundSchema, ]); - /** @internal */ export type ResponsesOutputMessageStatusUnion$Outbound = | string @@ -216,20 +149,6 @@ export const ResponsesOutputMessageStatusUnion$outboundSchema: z.ZodType< ResponsesOutputMessageStatusInProgress$outboundSchema, ]); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ResponsesOutputMessageStatusUnion$ { - /** @deprecated use `ResponsesOutputMessageStatusUnion$inboundSchema` instead. */ - export const inboundSchema = ResponsesOutputMessageStatusUnion$inboundSchema; - /** @deprecated use `ResponsesOutputMessageStatusUnion$outboundSchema` instead. */ - export const outboundSchema = - ResponsesOutputMessageStatusUnion$outboundSchema; - /** @deprecated use `ResponsesOutputMessageStatusUnion$Outbound` instead. */ - export type Outbound = ResponsesOutputMessageStatusUnion$Outbound; -} - export function responsesOutputMessageStatusUnionToJSON( responsesOutputMessageStatusUnion: ResponsesOutputMessageStatusUnion, ): string { @@ -239,7 +158,6 @@ export function responsesOutputMessageStatusUnionToJSON( ), ); } - export function responsesOutputMessageStatusUnionFromJSON( jsonString: string, ): SafeParseResult { @@ -258,7 +176,6 @@ export const ResponsesOutputMessageContent$inboundSchema: z.ZodType< ResponseOutputText$inboundSchema, OpenAIResponsesRefusalContent$inboundSchema, ]); - /** @internal */ export type ResponsesOutputMessageContent$Outbound = | ResponseOutputText$Outbound @@ -273,19 +190,6 @@ export const ResponsesOutputMessageContent$outboundSchema: z.ZodType< OpenAIResponsesRefusalContent$outboundSchema, ]); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ResponsesOutputMessageContent$ { - /** @deprecated use `ResponsesOutputMessageContent$inboundSchema` instead. */ - export const inboundSchema = ResponsesOutputMessageContent$inboundSchema; - /** @deprecated use `ResponsesOutputMessageContent$outboundSchema` instead. */ - export const outboundSchema = ResponsesOutputMessageContent$outboundSchema; - /** @deprecated use `ResponsesOutputMessageContent$Outbound` instead. */ - export type Outbound = ResponsesOutputMessageContent$Outbound; -} - export function responsesOutputMessageContentToJSON( responsesOutputMessageContent: ResponsesOutputMessageContent, ): string { @@ -295,7 +199,6 @@ export function responsesOutputMessageContentToJSON( ), ); } - export function responsesOutputMessageContentFromJSON( jsonString: string, ): SafeParseResult { @@ -326,7 +229,6 @@ export const ResponsesOutputMessage$inboundSchema: z.ZodType< ]), ), }); - /** @internal */ export type ResponsesOutputMessage$Outbound = { id: string; @@ -359,19 +261,6 @@ export const ResponsesOutputMessage$outboundSchema: z.ZodType< ), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ResponsesOutputMessage$ { - /** @deprecated use `ResponsesOutputMessage$inboundSchema` instead. */ - export const inboundSchema = ResponsesOutputMessage$inboundSchema; - /** @deprecated use `ResponsesOutputMessage$outboundSchema` instead. */ - export const outboundSchema = ResponsesOutputMessage$outboundSchema; - /** @deprecated use `ResponsesOutputMessage$Outbound` instead. */ - export type Outbound = ResponsesOutputMessage$Outbound; -} - export function responsesOutputMessageToJSON( responsesOutputMessage: ResponsesOutputMessage, ): string { @@ -379,7 +268,6 @@ export function responsesOutputMessageToJSON( ResponsesOutputMessage$outboundSchema.parse(responsesOutputMessage), ); } - export function responsesOutputMessageFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/responsessearchcontextsize.ts b/src/models/responsessearchcontextsize.ts index 6f62cf43..80989c19 100644 --- a/src/models/responsessearchcontextsize.ts +++ b/src/models/responsessearchcontextsize.ts @@ -33,7 +33,6 @@ export const ResponsesSearchContextSize$inboundSchema: z.ZodType< z.enum(ResponsesSearchContextSize), z.string().transform(catchUnrecognizedEnum), ]); - /** @internal */ export const ResponsesSearchContextSize$outboundSchema: z.ZodType< ResponsesSearchContextSize, @@ -42,14 +41,3 @@ export const ResponsesSearchContextSize$outboundSchema: z.ZodType< z.enum(ResponsesSearchContextSize), z.string().and(z.custom>()), ]); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ResponsesSearchContextSize$ { - /** @deprecated use `ResponsesSearchContextSize$inboundSchema` instead. */ - export const inboundSchema = ResponsesSearchContextSize$inboundSchema; - /** @deprecated use `ResponsesSearchContextSize$outboundSchema` instead. */ - export const outboundSchema = ResponsesSearchContextSize$outboundSchema; -} diff --git a/src/models/responseswebsearchcalloutput.ts b/src/models/responseswebsearchcalloutput.ts index bb9a494a..e7a4b3ee 100644 --- a/src/models/responseswebsearchcalloutput.ts +++ b/src/models/responseswebsearchcalloutput.ts @@ -30,23 +30,11 @@ export type ResponsesWebSearchCallOutput = { export const ResponsesWebSearchCallOutputType$inboundSchema: z.ZodEnum< typeof ResponsesWebSearchCallOutputType > = z.enum(ResponsesWebSearchCallOutputType); - /** @internal */ export const ResponsesWebSearchCallOutputType$outboundSchema: z.ZodEnum< typeof ResponsesWebSearchCallOutputType > = ResponsesWebSearchCallOutputType$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ResponsesWebSearchCallOutputType$ { - /** @deprecated use `ResponsesWebSearchCallOutputType$inboundSchema` instead. */ - export const inboundSchema = ResponsesWebSearchCallOutputType$inboundSchema; - /** @deprecated use `ResponsesWebSearchCallOutputType$outboundSchema` instead. */ - export const outboundSchema = ResponsesWebSearchCallOutputType$outboundSchema; -} - /** @internal */ export const ResponsesWebSearchCallOutput$inboundSchema: z.ZodType< ResponsesWebSearchCallOutput, @@ -56,7 +44,6 @@ export const ResponsesWebSearchCallOutput$inboundSchema: z.ZodType< id: z.string(), status: WebSearchStatus$inboundSchema, }); - /** @internal */ export type ResponsesWebSearchCallOutput$Outbound = { type: string; @@ -74,19 +61,6 @@ export const ResponsesWebSearchCallOutput$outboundSchema: z.ZodType< status: WebSearchStatus$outboundSchema, }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ResponsesWebSearchCallOutput$ { - /** @deprecated use `ResponsesWebSearchCallOutput$inboundSchema` instead. */ - export const inboundSchema = ResponsesWebSearchCallOutput$inboundSchema; - /** @deprecated use `ResponsesWebSearchCallOutput$outboundSchema` instead. */ - export const outboundSchema = ResponsesWebSearchCallOutput$outboundSchema; - /** @deprecated use `ResponsesWebSearchCallOutput$Outbound` instead. */ - export type Outbound = ResponsesWebSearchCallOutput$Outbound; -} - export function responsesWebSearchCallOutputToJSON( responsesWebSearchCallOutput: ResponsesWebSearchCallOutput, ): string { @@ -96,7 +70,6 @@ export function responsesWebSearchCallOutputToJSON( ), ); } - export function responsesWebSearchCallOutputFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/responseswebsearchuserlocation.ts b/src/models/responseswebsearchuserlocation.ts index 2b6590e6..ffe619c4 100644 --- a/src/models/responseswebsearchuserlocation.ts +++ b/src/models/responseswebsearchuserlocation.ts @@ -30,24 +30,11 @@ export type ResponsesWebSearchUserLocation = { export const ResponsesWebSearchUserLocationType$inboundSchema: z.ZodEnum< typeof ResponsesWebSearchUserLocationType > = z.enum(ResponsesWebSearchUserLocationType); - /** @internal */ export const ResponsesWebSearchUserLocationType$outboundSchema: z.ZodEnum< typeof ResponsesWebSearchUserLocationType > = ResponsesWebSearchUserLocationType$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ResponsesWebSearchUserLocationType$ { - /** @deprecated use `ResponsesWebSearchUserLocationType$inboundSchema` instead. */ - export const inboundSchema = ResponsesWebSearchUserLocationType$inboundSchema; - /** @deprecated use `ResponsesWebSearchUserLocationType$outboundSchema` instead. */ - export const outboundSchema = - ResponsesWebSearchUserLocationType$outboundSchema; -} - /** @internal */ export const ResponsesWebSearchUserLocation$inboundSchema: z.ZodType< ResponsesWebSearchUserLocation, @@ -59,7 +46,6 @@ export const ResponsesWebSearchUserLocation$inboundSchema: z.ZodType< region: z.nullable(z.string()).optional(), timezone: z.nullable(z.string()).optional(), }); - /** @internal */ export type ResponsesWebSearchUserLocation$Outbound = { type?: string | undefined; @@ -81,19 +67,6 @@ export const ResponsesWebSearchUserLocation$outboundSchema: z.ZodType< timezone: z.nullable(z.string()).optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ResponsesWebSearchUserLocation$ { - /** @deprecated use `ResponsesWebSearchUserLocation$inboundSchema` instead. */ - export const inboundSchema = ResponsesWebSearchUserLocation$inboundSchema; - /** @deprecated use `ResponsesWebSearchUserLocation$outboundSchema` instead. */ - export const outboundSchema = ResponsesWebSearchUserLocation$outboundSchema; - /** @deprecated use `ResponsesWebSearchUserLocation$Outbound` instead. */ - export type Outbound = ResponsesWebSearchUserLocation$Outbound; -} - export function responsesWebSearchUserLocationToJSON( responsesWebSearchUserLocation: ResponsesWebSearchUserLocation, ): string { @@ -103,7 +76,6 @@ export function responsesWebSearchUserLocationToJSON( ), ); } - export function responsesWebSearchUserLocationFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/responsetextconfig.ts b/src/models/responsetextconfig.ts index 9a08b7c5..f7d8f409 100644 --- a/src/models/responsetextconfig.ts +++ b/src/models/responsetextconfig.ts @@ -4,18 +4,12 @@ import * as z from "zod/v4"; import { safeParse } from "../lib/schemas.js"; -import { - catchUnrecognizedEnum, - OpenEnum, - Unrecognized, -} from "../types/enums.js"; +import { catchUnrecognizedEnum, OpenEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; import { ResponseFormatTextConfig, ResponseFormatTextConfig$inboundSchema, - ResponseFormatTextConfig$Outbound, - ResponseFormatTextConfig$outboundSchema, } from "./responseformattextconfig.js"; export const ResponseTextConfigVerbosity = { @@ -48,26 +42,6 @@ export const ResponseTextConfigVerbosity$inboundSchema: z.ZodType< z.string().transform(catchUnrecognizedEnum), ]); -/** @internal */ -export const ResponseTextConfigVerbosity$outboundSchema: z.ZodType< - ResponseTextConfigVerbosity, - ResponseTextConfigVerbosity -> = z.union([ - z.enum(ResponseTextConfigVerbosity), - z.string().and(z.custom>()), -]); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ResponseTextConfigVerbosity$ { - /** @deprecated use `ResponseTextConfigVerbosity$inboundSchema` instead. */ - export const inboundSchema = ResponseTextConfigVerbosity$inboundSchema; - /** @deprecated use `ResponseTextConfigVerbosity$outboundSchema` instead. */ - export const outboundSchema = ResponseTextConfigVerbosity$outboundSchema; -} - /** @internal */ export const ResponseTextConfig$inboundSchema: z.ZodType< ResponseTextConfig, @@ -77,42 +51,6 @@ export const ResponseTextConfig$inboundSchema: z.ZodType< verbosity: z.nullable(ResponseTextConfigVerbosity$inboundSchema).optional(), }); -/** @internal */ -export type ResponseTextConfig$Outbound = { - format?: ResponseFormatTextConfig$Outbound | undefined; - verbosity?: string | null | undefined; -}; - -/** @internal */ -export const ResponseTextConfig$outboundSchema: z.ZodType< - ResponseTextConfig$Outbound, - ResponseTextConfig -> = z.object({ - format: ResponseFormatTextConfig$outboundSchema.optional(), - verbosity: z.nullable(ResponseTextConfigVerbosity$outboundSchema).optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ResponseTextConfig$ { - /** @deprecated use `ResponseTextConfig$inboundSchema` instead. */ - export const inboundSchema = ResponseTextConfig$inboundSchema; - /** @deprecated use `ResponseTextConfig$outboundSchema` instead. */ - export const outboundSchema = ResponseTextConfig$outboundSchema; - /** @deprecated use `ResponseTextConfig$Outbound` instead. */ - export type Outbound = ResponseTextConfig$Outbound; -} - -export function responseTextConfigToJSON( - responseTextConfig: ResponseTextConfig, -): string { - return JSON.stringify( - ResponseTextConfig$outboundSchema.parse(responseTextConfig), - ); -} - export function responseTextConfigFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/security.ts b/src/models/security.ts index 80ef0eab..9a9e7534 100644 --- a/src/models/security.ts +++ b/src/models/security.ts @@ -3,19 +3,11 @@ */ import * as z from "zod/v4"; -import { safeParse } from "../lib/schemas.js"; -import { Result as SafeParseResult } from "../types/fp.js"; -import { SDKValidationError } from "./errors/sdkvalidationerror.js"; export type Security = { apiKey?: string | undefined; }; -/** @internal */ -export const Security$inboundSchema: z.ZodType = z.object({ - apiKey: z.string().optional(), -}); - /** @internal */ export type Security$Outbound = { apiKey?: string | undefined; @@ -27,29 +19,6 @@ export const Security$outboundSchema: z.ZodType = z apiKey: z.string().optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Security$ { - /** @deprecated use `Security$inboundSchema` instead. */ - export const inboundSchema = Security$inboundSchema; - /** @deprecated use `Security$outboundSchema` instead. */ - export const outboundSchema = Security$outboundSchema; - /** @deprecated use `Security$Outbound` instead. */ - export type Outbound = Security$Outbound; -} - export function securityToJSON(security: Security): string { return JSON.stringify(Security$outboundSchema.parse(security)); } - -export function securityFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Security$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Security' from JSON`, - ); -} diff --git a/src/models/serviceunavailableresponseerrordata.ts b/src/models/serviceunavailableresponseerrordata.ts index a57ef60a..5b7169f4 100644 --- a/src/models/serviceunavailableresponseerrordata.ts +++ b/src/models/serviceunavailableresponseerrordata.ts @@ -26,48 +26,6 @@ export const ServiceUnavailableResponseErrorData$inboundSchema: z.ZodType< metadata: z.nullable(z.record(z.string(), z.nullable(z.any()))).optional(), }); -/** @internal */ -export type ServiceUnavailableResponseErrorData$Outbound = { - code: number; - message: string; - metadata?: { [k: string]: any | null } | null | undefined; -}; - -/** @internal */ -export const ServiceUnavailableResponseErrorData$outboundSchema: z.ZodType< - ServiceUnavailableResponseErrorData$Outbound, - ServiceUnavailableResponseErrorData -> = z.object({ - code: z.number().int(), - message: z.string(), - metadata: z.nullable(z.record(z.string(), z.nullable(z.any()))).optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ServiceUnavailableResponseErrorData$ { - /** @deprecated use `ServiceUnavailableResponseErrorData$inboundSchema` instead. */ - export const inboundSchema = - ServiceUnavailableResponseErrorData$inboundSchema; - /** @deprecated use `ServiceUnavailableResponseErrorData$outboundSchema` instead. */ - export const outboundSchema = - ServiceUnavailableResponseErrorData$outboundSchema; - /** @deprecated use `ServiceUnavailableResponseErrorData$Outbound` instead. */ - export type Outbound = ServiceUnavailableResponseErrorData$Outbound; -} - -export function serviceUnavailableResponseErrorDataToJSON( - serviceUnavailableResponseErrorData: ServiceUnavailableResponseErrorData, -): string { - return JSON.stringify( - ServiceUnavailableResponseErrorData$outboundSchema.parse( - serviceUnavailableResponseErrorData, - ), - ); -} - export function serviceUnavailableResponseErrorDataFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/systemmessage.ts b/src/models/systemmessage.ts index d32973a4..8a634d7e 100644 --- a/src/models/systemmessage.ts +++ b/src/models/systemmessage.ts @@ -3,15 +3,11 @@ */ import * as z from "zod/v4"; -import { safeParse } from "../lib/schemas.js"; -import { Result as SafeParseResult } from "../types/fp.js"; import { ChatMessageContentItemText, - ChatMessageContentItemText$inboundSchema, ChatMessageContentItemText$Outbound, ChatMessageContentItemText$outboundSchema, } from "./chatmessagecontentitemtext.js"; -import { SDKValidationError } from "./errors/sdkvalidationerror.js"; export type SystemMessageContent = string | Array; @@ -21,12 +17,6 @@ export type SystemMessage = { name?: string | undefined; }; -/** @internal */ -export const SystemMessageContent$inboundSchema: z.ZodType< - SystemMessageContent, - unknown -> = z.union([z.string(), z.array(ChatMessageContentItemText$inboundSchema)]); - /** @internal */ export type SystemMessageContent$Outbound = | string @@ -38,19 +28,6 @@ export const SystemMessageContent$outboundSchema: z.ZodType< SystemMessageContent > = z.union([z.string(), z.array(ChatMessageContentItemText$outboundSchema)]); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace SystemMessageContent$ { - /** @deprecated use `SystemMessageContent$inboundSchema` instead. */ - export const inboundSchema = SystemMessageContent$inboundSchema; - /** @deprecated use `SystemMessageContent$outboundSchema` instead. */ - export const outboundSchema = SystemMessageContent$outboundSchema; - /** @deprecated use `SystemMessageContent$Outbound` instead. */ - export type Outbound = SystemMessageContent$Outbound; -} - export function systemMessageContentToJSON( systemMessageContent: SystemMessageContent, ): string { @@ -59,27 +36,6 @@ export function systemMessageContentToJSON( ); } -export function systemMessageContentFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => SystemMessageContent$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'SystemMessageContent' from JSON`, - ); -} - -/** @internal */ -export const SystemMessage$inboundSchema: z.ZodType = z - .object({ - role: z.literal("system"), - content: z.union([ - z.string(), - z.array(ChatMessageContentItemText$inboundSchema), - ]), - name: z.string().optional(), - }); - /** @internal */ export type SystemMessage$Outbound = { role: "system"; @@ -100,29 +56,6 @@ export const SystemMessage$outboundSchema: z.ZodType< name: z.string().optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace SystemMessage$ { - /** @deprecated use `SystemMessage$inboundSchema` instead. */ - export const inboundSchema = SystemMessage$inboundSchema; - /** @deprecated use `SystemMessage$outboundSchema` instead. */ - export const outboundSchema = SystemMessage$outboundSchema; - /** @deprecated use `SystemMessage$Outbound` instead. */ - export type Outbound = SystemMessage$Outbound; -} - export function systemMessageToJSON(systemMessage: SystemMessage): string { return JSON.stringify(SystemMessage$outboundSchema.parse(systemMessage)); } - -export function systemMessageFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => SystemMessage$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'SystemMessage' from JSON`, - ); -} diff --git a/src/models/tool.ts b/src/models/tool.ts deleted file mode 100644 index 7a57dafe..00000000 --- a/src/models/tool.ts +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ - -import * as z from "zod/v4"; -import { safeParse } from "../lib/schemas.js"; -import { Result as SafeParseResult } from "../types/fp.js"; -import { SDKValidationError } from "./errors/sdkvalidationerror.js"; - -export type ToolFunction = { - name: string; - description?: string | undefined; - parameters?: { [k: string]: any } | undefined; - strict?: boolean | null | undefined; -}; - -export type Tool = { - type: "function"; - function: ToolFunction; -}; - -/** @internal */ -export const ToolFunction$inboundSchema: z.ZodType = z - .object({ - name: z.string(), - description: z.string().optional(), - parameters: z.record(z.string(), z.any()).optional(), - strict: z.nullable(z.boolean()).optional(), - }); - -/** @internal */ -export type ToolFunction$Outbound = { - name: string; - description?: string | undefined; - parameters?: { [k: string]: any } | undefined; - strict?: boolean | null | undefined; -}; - -/** @internal */ -export const ToolFunction$outboundSchema: z.ZodType< - ToolFunction$Outbound, - ToolFunction -> = z.object({ - name: z.string(), - description: z.string().optional(), - parameters: z.record(z.string(), z.any()).optional(), - strict: z.nullable(z.boolean()).optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ToolFunction$ { - /** @deprecated use `ToolFunction$inboundSchema` instead. */ - export const inboundSchema = ToolFunction$inboundSchema; - /** @deprecated use `ToolFunction$outboundSchema` instead. */ - export const outboundSchema = ToolFunction$outboundSchema; - /** @deprecated use `ToolFunction$Outbound` instead. */ - export type Outbound = ToolFunction$Outbound; -} - -export function toolFunctionToJSON(toolFunction: ToolFunction): string { - return JSON.stringify(ToolFunction$outboundSchema.parse(toolFunction)); -} - -export function toolFunctionFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ToolFunction$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ToolFunction' from JSON`, - ); -} - -/** @internal */ -export const Tool$inboundSchema: z.ZodType = z.object({ - type: z.literal("function"), - function: z.lazy(() => ToolFunction$inboundSchema), -}); - -/** @internal */ -export type Tool$Outbound = { - type: "function"; - function: ToolFunction$Outbound; -}; - -/** @internal */ -export const Tool$outboundSchema: z.ZodType = z.object({ - type: z.literal("function"), - function: z.lazy(() => ToolFunction$outboundSchema), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace Tool$ { - /** @deprecated use `Tool$inboundSchema` instead. */ - export const inboundSchema = Tool$inboundSchema; - /** @deprecated use `Tool$outboundSchema` instead. */ - export const outboundSchema = Tool$outboundSchema; - /** @deprecated use `Tool$Outbound` instead. */ - export type Outbound = Tool$Outbound; -} - -export function toolToJSON(tool: Tool): string { - return JSON.stringify(Tool$outboundSchema.parse(tool)); -} - -export function toolFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => Tool$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'Tool' from JSON`, - ); -} diff --git a/src/models/toolcallstatus.ts b/src/models/toolcallstatus.ts index 16e23a32..131ee4eb 100644 --- a/src/models/toolcallstatus.ts +++ b/src/models/toolcallstatus.ts @@ -23,7 +23,6 @@ export const ToolCallStatus$inboundSchema: z.ZodType = z.enum(ToolCallStatus), z.string().transform(catchUnrecognizedEnum), ]); - /** @internal */ export const ToolCallStatus$outboundSchema: z.ZodType< ToolCallStatus, @@ -32,14 +31,3 @@ export const ToolCallStatus$outboundSchema: z.ZodType< z.enum(ToolCallStatus), z.string().and(z.custom>()), ]); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ToolCallStatus$ { - /** @deprecated use `ToolCallStatus$inboundSchema` instead. */ - export const inboundSchema = ToolCallStatus$inboundSchema; - /** @deprecated use `ToolCallStatus$outboundSchema` instead. */ - export const outboundSchema = ToolCallStatus$outboundSchema; -} diff --git a/src/models/tooldefinitionjson.ts b/src/models/tooldefinitionjson.ts new file mode 100644 index 00000000..52240c6c --- /dev/null +++ b/src/models/tooldefinitionjson.ts @@ -0,0 +1,67 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import * as z from "zod/v4"; + +export type ToolDefinitionJsonFunction = { + name: string; + description?: string | undefined; + parameters?: { [k: string]: any } | undefined; + strict?: boolean | null | undefined; +}; + +export type ToolDefinitionJson = { + type: "function"; + function: ToolDefinitionJsonFunction; +}; + +/** @internal */ +export type ToolDefinitionJsonFunction$Outbound = { + name: string; + description?: string | undefined; + parameters?: { [k: string]: any } | undefined; + strict?: boolean | null | undefined; +}; + +/** @internal */ +export const ToolDefinitionJsonFunction$outboundSchema: z.ZodType< + ToolDefinitionJsonFunction$Outbound, + ToolDefinitionJsonFunction +> = z.object({ + name: z.string(), + description: z.string().optional(), + parameters: z.record(z.string(), z.any()).optional(), + strict: z.nullable(z.boolean()).optional(), +}); + +export function toolDefinitionJsonFunctionToJSON( + toolDefinitionJsonFunction: ToolDefinitionJsonFunction, +): string { + return JSON.stringify( + ToolDefinitionJsonFunction$outboundSchema.parse(toolDefinitionJsonFunction), + ); +} + +/** @internal */ +export type ToolDefinitionJson$Outbound = { + type: "function"; + function: ToolDefinitionJsonFunction$Outbound; +}; + +/** @internal */ +export const ToolDefinitionJson$outboundSchema: z.ZodType< + ToolDefinitionJson$Outbound, + ToolDefinitionJson +> = z.object({ + type: z.literal("function"), + function: z.lazy(() => ToolDefinitionJsonFunction$outboundSchema), +}); + +export function toolDefinitionJsonToJSON( + toolDefinitionJson: ToolDefinitionJson, +): string { + return JSON.stringify( + ToolDefinitionJson$outboundSchema.parse(toolDefinitionJson), + ); +} diff --git a/src/models/toolresponsemessage.ts b/src/models/toolresponsemessage.ts index 21fb3ea5..31c998ba 100644 --- a/src/models/toolresponsemessage.ts +++ b/src/models/toolresponsemessage.ts @@ -4,15 +4,11 @@ import * as z from "zod/v4"; import { remap as remap$ } from "../lib/primitives.js"; -import { safeParse } from "../lib/schemas.js"; -import { Result as SafeParseResult } from "../types/fp.js"; import { ChatMessageContentItem, - ChatMessageContentItem$inboundSchema, ChatMessageContentItem$Outbound, ChatMessageContentItem$outboundSchema, } from "./chatmessagecontentitem.js"; -import { SDKValidationError } from "./errors/sdkvalidationerror.js"; export type ToolResponseMessageContent = string | Array; @@ -22,12 +18,6 @@ export type ToolResponseMessage = { toolCallId: string; }; -/** @internal */ -export const ToolResponseMessageContent$inboundSchema: z.ZodType< - ToolResponseMessageContent, - unknown -> = z.union([z.string(), z.array(ChatMessageContentItem$inboundSchema)]); - /** @internal */ export type ToolResponseMessageContent$Outbound = | string @@ -39,19 +29,6 @@ export const ToolResponseMessageContent$outboundSchema: z.ZodType< ToolResponseMessageContent > = z.union([z.string(), z.array(ChatMessageContentItem$outboundSchema)]); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ToolResponseMessageContent$ { - /** @deprecated use `ToolResponseMessageContent$inboundSchema` instead. */ - export const inboundSchema = ToolResponseMessageContent$inboundSchema; - /** @deprecated use `ToolResponseMessageContent$outboundSchema` instead. */ - export const outboundSchema = ToolResponseMessageContent$outboundSchema; - /** @deprecated use `ToolResponseMessageContent$Outbound` instead. */ - export type Outbound = ToolResponseMessageContent$Outbound; -} - export function toolResponseMessageContentToJSON( toolResponseMessageContent: ToolResponseMessageContent, ): string { @@ -60,30 +37,6 @@ export function toolResponseMessageContentToJSON( ); } -export function toolResponseMessageContentFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ToolResponseMessageContent$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ToolResponseMessageContent' from JSON`, - ); -} - -/** @internal */ -export const ToolResponseMessage$inboundSchema: z.ZodType< - ToolResponseMessage, - unknown -> = z.object({ - role: z.literal("tool"), - content: z.union([z.string(), z.array(ChatMessageContentItem$inboundSchema)]), - tool_call_id: z.string(), -}).transform((v) => { - return remap$(v, { - "tool_call_id": "toolCallId", - }); -}); - /** @internal */ export type ToolResponseMessage$Outbound = { role: "tool"; @@ -108,19 +61,6 @@ export const ToolResponseMessage$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace ToolResponseMessage$ { - /** @deprecated use `ToolResponseMessage$inboundSchema` instead. */ - export const inboundSchema = ToolResponseMessage$inboundSchema; - /** @deprecated use `ToolResponseMessage$outboundSchema` instead. */ - export const outboundSchema = ToolResponseMessage$outboundSchema; - /** @deprecated use `ToolResponseMessage$Outbound` instead. */ - export type Outbound = ToolResponseMessage$Outbound; -} - export function toolResponseMessageToJSON( toolResponseMessage: ToolResponseMessage, ): string { @@ -128,13 +68,3 @@ export function toolResponseMessageToJSON( ToolResponseMessage$outboundSchema.parse(toolResponseMessage), ); } - -export function toolResponseMessageFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => ToolResponseMessage$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'ToolResponseMessage' from JSON`, - ); -} diff --git a/src/models/toomanyrequestsresponseerrordata.ts b/src/models/toomanyrequestsresponseerrordata.ts index 8dc3537b..6b1c8e06 100644 --- a/src/models/toomanyrequestsresponseerrordata.ts +++ b/src/models/toomanyrequestsresponseerrordata.ts @@ -26,46 +26,6 @@ export const TooManyRequestsResponseErrorData$inboundSchema: z.ZodType< metadata: z.nullable(z.record(z.string(), z.nullable(z.any()))).optional(), }); -/** @internal */ -export type TooManyRequestsResponseErrorData$Outbound = { - code: number; - message: string; - metadata?: { [k: string]: any | null } | null | undefined; -}; - -/** @internal */ -export const TooManyRequestsResponseErrorData$outboundSchema: z.ZodType< - TooManyRequestsResponseErrorData$Outbound, - TooManyRequestsResponseErrorData -> = z.object({ - code: z.number().int(), - message: z.string(), - metadata: z.nullable(z.record(z.string(), z.nullable(z.any()))).optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace TooManyRequestsResponseErrorData$ { - /** @deprecated use `TooManyRequestsResponseErrorData$inboundSchema` instead. */ - export const inboundSchema = TooManyRequestsResponseErrorData$inboundSchema; - /** @deprecated use `TooManyRequestsResponseErrorData$outboundSchema` instead. */ - export const outboundSchema = TooManyRequestsResponseErrorData$outboundSchema; - /** @deprecated use `TooManyRequestsResponseErrorData$Outbound` instead. */ - export type Outbound = TooManyRequestsResponseErrorData$Outbound; -} - -export function tooManyRequestsResponseErrorDataToJSON( - tooManyRequestsResponseErrorData: TooManyRequestsResponseErrorData, -): string { - return JSON.stringify( - TooManyRequestsResponseErrorData$outboundSchema.parse( - tooManyRequestsResponseErrorData, - ), - ); -} - export function tooManyRequestsResponseErrorDataFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/topproviderinfo.ts b/src/models/topproviderinfo.ts index 47d0ab2b..c1cf18b1 100644 --- a/src/models/topproviderinfo.ts +++ b/src/models/topproviderinfo.ts @@ -42,48 +42,6 @@ export const TopProviderInfo$inboundSchema: z.ZodType< }); }); -/** @internal */ -export type TopProviderInfo$Outbound = { - context_length?: number | null | undefined; - max_completion_tokens?: number | null | undefined; - is_moderated: boolean; -}; - -/** @internal */ -export const TopProviderInfo$outboundSchema: z.ZodType< - TopProviderInfo$Outbound, - TopProviderInfo -> = z.object({ - contextLength: z.nullable(z.number()).optional(), - maxCompletionTokens: z.nullable(z.number()).optional(), - isModerated: z.boolean(), -}).transform((v) => { - return remap$(v, { - contextLength: "context_length", - maxCompletionTokens: "max_completion_tokens", - isModerated: "is_moderated", - }); -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace TopProviderInfo$ { - /** @deprecated use `TopProviderInfo$inboundSchema` instead. */ - export const inboundSchema = TopProviderInfo$inboundSchema; - /** @deprecated use `TopProviderInfo$outboundSchema` instead. */ - export const outboundSchema = TopProviderInfo$outboundSchema; - /** @deprecated use `TopProviderInfo$Outbound` instead. */ - export type Outbound = TopProviderInfo$Outbound; -} - -export function topProviderInfoToJSON( - topProviderInfo: TopProviderInfo, -): string { - return JSON.stringify(TopProviderInfo$outboundSchema.parse(topProviderInfo)); -} - export function topProviderInfoFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/unauthorizedresponseerrordata.ts b/src/models/unauthorizedresponseerrordata.ts index bc35cd92..0e9f2cf0 100644 --- a/src/models/unauthorizedresponseerrordata.ts +++ b/src/models/unauthorizedresponseerrordata.ts @@ -26,46 +26,6 @@ export const UnauthorizedResponseErrorData$inboundSchema: z.ZodType< metadata: z.nullable(z.record(z.string(), z.nullable(z.any()))).optional(), }); -/** @internal */ -export type UnauthorizedResponseErrorData$Outbound = { - code: number; - message: string; - metadata?: { [k: string]: any | null } | null | undefined; -}; - -/** @internal */ -export const UnauthorizedResponseErrorData$outboundSchema: z.ZodType< - UnauthorizedResponseErrorData$Outbound, - UnauthorizedResponseErrorData -> = z.object({ - code: z.number().int(), - message: z.string(), - metadata: z.nullable(z.record(z.string(), z.nullable(z.any()))).optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UnauthorizedResponseErrorData$ { - /** @deprecated use `UnauthorizedResponseErrorData$inboundSchema` instead. */ - export const inboundSchema = UnauthorizedResponseErrorData$inboundSchema; - /** @deprecated use `UnauthorizedResponseErrorData$outboundSchema` instead. */ - export const outboundSchema = UnauthorizedResponseErrorData$outboundSchema; - /** @deprecated use `UnauthorizedResponseErrorData$Outbound` instead. */ - export type Outbound = UnauthorizedResponseErrorData$Outbound; -} - -export function unauthorizedResponseErrorDataToJSON( - unauthorizedResponseErrorData: UnauthorizedResponseErrorData, -): string { - return JSON.stringify( - UnauthorizedResponseErrorData$outboundSchema.parse( - unauthorizedResponseErrorData, - ), - ); -} - export function unauthorizedResponseErrorDataFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/unprocessableentityresponseerrordata.ts b/src/models/unprocessableentityresponseerrordata.ts index c68b6b10..cd38b5a8 100644 --- a/src/models/unprocessableentityresponseerrordata.ts +++ b/src/models/unprocessableentityresponseerrordata.ts @@ -26,48 +26,6 @@ export const UnprocessableEntityResponseErrorData$inboundSchema: z.ZodType< metadata: z.nullable(z.record(z.string(), z.nullable(z.any()))).optional(), }); -/** @internal */ -export type UnprocessableEntityResponseErrorData$Outbound = { - code: number; - message: string; - metadata?: { [k: string]: any | null } | null | undefined; -}; - -/** @internal */ -export const UnprocessableEntityResponseErrorData$outboundSchema: z.ZodType< - UnprocessableEntityResponseErrorData$Outbound, - UnprocessableEntityResponseErrorData -> = z.object({ - code: z.number().int(), - message: z.string(), - metadata: z.nullable(z.record(z.string(), z.nullable(z.any()))).optional(), -}); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UnprocessableEntityResponseErrorData$ { - /** @deprecated use `UnprocessableEntityResponseErrorData$inboundSchema` instead. */ - export const inboundSchema = - UnprocessableEntityResponseErrorData$inboundSchema; - /** @deprecated use `UnprocessableEntityResponseErrorData$outboundSchema` instead. */ - export const outboundSchema = - UnprocessableEntityResponseErrorData$outboundSchema; - /** @deprecated use `UnprocessableEntityResponseErrorData$Outbound` instead. */ - export type Outbound = UnprocessableEntityResponseErrorData$Outbound; -} - -export function unprocessableEntityResponseErrorDataToJSON( - unprocessableEntityResponseErrorData: UnprocessableEntityResponseErrorData, -): string { - return JSON.stringify( - UnprocessableEntityResponseErrorData$outboundSchema.parse( - unprocessableEntityResponseErrorData, - ), - ); -} - export function unprocessableEntityResponseErrorDataFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/urlcitation.ts b/src/models/urlcitation.ts index e984eb89..0b88d1f7 100644 --- a/src/models/urlcitation.ts +++ b/src/models/urlcitation.ts @@ -25,22 +25,10 @@ export type URLCitation = { /** @internal */ export const URLCitationType$inboundSchema: z.ZodEnum = z.enum(URLCitationType); - /** @internal */ export const URLCitationType$outboundSchema: z.ZodEnum = URLCitationType$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace URLCitationType$ { - /** @deprecated use `URLCitationType$inboundSchema` instead. */ - export const inboundSchema = URLCitationType$inboundSchema; - /** @deprecated use `URLCitationType$outboundSchema` instead. */ - export const outboundSchema = URLCitationType$outboundSchema; -} - /** @internal */ export const URLCitation$inboundSchema: z.ZodType = z .object({ @@ -55,7 +43,6 @@ export const URLCitation$inboundSchema: z.ZodType = z "end_index": "endIndex", }); }); - /** @internal */ export type URLCitation$Outbound = { type: string; @@ -82,23 +69,9 @@ export const URLCitation$outboundSchema: z.ZodType< }); }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace URLCitation$ { - /** @deprecated use `URLCitation$inboundSchema` instead. */ - export const inboundSchema = URLCitation$inboundSchema; - /** @deprecated use `URLCitation$outboundSchema` instead. */ - export const outboundSchema = URLCitation$outboundSchema; - /** @deprecated use `URLCitation$Outbound` instead. */ - export type Outbound = URLCitation$Outbound; -} - export function urlCitationToJSON(urlCitation: URLCitation): string { return JSON.stringify(URLCitation$outboundSchema.parse(urlCitation)); } - export function urlCitationFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/usermessage.ts b/src/models/usermessage.ts index 43549822..9cfcc7ae 100644 --- a/src/models/usermessage.ts +++ b/src/models/usermessage.ts @@ -3,15 +3,11 @@ */ import * as z from "zod/v4"; -import { safeParse } from "../lib/schemas.js"; -import { Result as SafeParseResult } from "../types/fp.js"; import { ChatMessageContentItem, - ChatMessageContentItem$inboundSchema, ChatMessageContentItem$Outbound, ChatMessageContentItem$outboundSchema, } from "./chatmessagecontentitem.js"; -import { SDKValidationError } from "./errors/sdkvalidationerror.js"; export type UserMessageContent = string | Array; @@ -21,12 +17,6 @@ export type UserMessage = { name?: string | undefined; }; -/** @internal */ -export const UserMessageContent$inboundSchema: z.ZodType< - UserMessageContent, - unknown -> = z.union([z.string(), z.array(ChatMessageContentItem$inboundSchema)]); - /** @internal */ export type UserMessageContent$Outbound = | string @@ -38,19 +28,6 @@ export const UserMessageContent$outboundSchema: z.ZodType< UserMessageContent > = z.union([z.string(), z.array(ChatMessageContentItem$outboundSchema)]); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UserMessageContent$ { - /** @deprecated use `UserMessageContent$inboundSchema` instead. */ - export const inboundSchema = UserMessageContent$inboundSchema; - /** @deprecated use `UserMessageContent$outboundSchema` instead. */ - export const outboundSchema = UserMessageContent$outboundSchema; - /** @deprecated use `UserMessageContent$Outbound` instead. */ - export type Outbound = UserMessageContent$Outbound; -} - export function userMessageContentToJSON( userMessageContent: UserMessageContent, ): string { @@ -59,27 +36,6 @@ export function userMessageContentToJSON( ); } -export function userMessageContentFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => UserMessageContent$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'UserMessageContent' from JSON`, - ); -} - -/** @internal */ -export const UserMessage$inboundSchema: z.ZodType = z - .object({ - role: z.literal("user"), - content: z.union([ - z.string(), - z.array(ChatMessageContentItem$inboundSchema), - ]), - name: z.string().optional(), - }); - /** @internal */ export type UserMessage$Outbound = { role: "user"; @@ -100,29 +56,6 @@ export const UserMessage$outboundSchema: z.ZodType< name: z.string().optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace UserMessage$ { - /** @deprecated use `UserMessage$inboundSchema` instead. */ - export const inboundSchema = UserMessage$inboundSchema; - /** @deprecated use `UserMessage$outboundSchema` instead. */ - export const outboundSchema = UserMessage$outboundSchema; - /** @deprecated use `UserMessage$Outbound` instead. */ - export type Outbound = UserMessage$Outbound; -} - export function userMessageToJSON(userMessage: UserMessage): string { return JSON.stringify(UserMessage$outboundSchema.parse(userMessage)); } - -export function userMessageFromJSON( - jsonString: string, -): SafeParseResult { - return safeParse( - jsonString, - (x) => UserMessage$inboundSchema.parse(JSON.parse(x)), - `Failed to parse 'UserMessage' from JSON`, - ); -} diff --git a/src/models/websearchpreviewtooluserlocation.ts b/src/models/websearchpreviewtooluserlocation.ts index 61115e88..8c162ac5 100644 --- a/src/models/websearchpreviewtooluserlocation.ts +++ b/src/models/websearchpreviewtooluserlocation.ts @@ -27,25 +27,11 @@ export type WebSearchPreviewToolUserLocation = { export const WebSearchPreviewToolUserLocationType$inboundSchema: z.ZodEnum< typeof WebSearchPreviewToolUserLocationType > = z.enum(WebSearchPreviewToolUserLocationType); - /** @internal */ export const WebSearchPreviewToolUserLocationType$outboundSchema: z.ZodEnum< typeof WebSearchPreviewToolUserLocationType > = WebSearchPreviewToolUserLocationType$inboundSchema; -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace WebSearchPreviewToolUserLocationType$ { - /** @deprecated use `WebSearchPreviewToolUserLocationType$inboundSchema` instead. */ - export const inboundSchema = - WebSearchPreviewToolUserLocationType$inboundSchema; - /** @deprecated use `WebSearchPreviewToolUserLocationType$outboundSchema` instead. */ - export const outboundSchema = - WebSearchPreviewToolUserLocationType$outboundSchema; -} - /** @internal */ export const WebSearchPreviewToolUserLocation$inboundSchema: z.ZodType< WebSearchPreviewToolUserLocation, @@ -57,7 +43,6 @@ export const WebSearchPreviewToolUserLocation$inboundSchema: z.ZodType< region: z.nullable(z.string()).optional(), timezone: z.nullable(z.string()).optional(), }); - /** @internal */ export type WebSearchPreviewToolUserLocation$Outbound = { type: string; @@ -79,19 +64,6 @@ export const WebSearchPreviewToolUserLocation$outboundSchema: z.ZodType< timezone: z.nullable(z.string()).optional(), }); -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace WebSearchPreviewToolUserLocation$ { - /** @deprecated use `WebSearchPreviewToolUserLocation$inboundSchema` instead. */ - export const inboundSchema = WebSearchPreviewToolUserLocation$inboundSchema; - /** @deprecated use `WebSearchPreviewToolUserLocation$outboundSchema` instead. */ - export const outboundSchema = WebSearchPreviewToolUserLocation$outboundSchema; - /** @deprecated use `WebSearchPreviewToolUserLocation$Outbound` instead. */ - export type Outbound = WebSearchPreviewToolUserLocation$Outbound; -} - export function webSearchPreviewToolUserLocationToJSON( webSearchPreviewToolUserLocation: WebSearchPreviewToolUserLocation, ): string { @@ -101,7 +73,6 @@ export function webSearchPreviewToolUserLocationToJSON( ), ); } - export function webSearchPreviewToolUserLocationFromJSON( jsonString: string, ): SafeParseResult { diff --git a/src/models/websearchstatus.ts b/src/models/websearchstatus.ts index 606c8940..ef4dcf47 100644 --- a/src/models/websearchstatus.ts +++ b/src/models/websearchstatus.ts @@ -26,7 +26,6 @@ export const WebSearchStatus$inboundSchema: z.ZodType< z.enum(WebSearchStatus), z.string().transform(catchUnrecognizedEnum), ]); - /** @internal */ export const WebSearchStatus$outboundSchema: z.ZodType< WebSearchStatus, @@ -35,14 +34,3 @@ export const WebSearchStatus$outboundSchema: z.ZodType< z.enum(WebSearchStatus), z.string().and(z.custom>()), ]); - -/** - * @internal - * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. - */ -export namespace WebSearchStatus$ { - /** @deprecated use `WebSearchStatus$inboundSchema` instead. */ - export const inboundSchema = WebSearchStatus$inboundSchema; - /** @deprecated use `WebSearchStatus$outboundSchema` instead. */ - export const outboundSchema = WebSearchStatus$outboundSchema; -} diff --git a/src/react-query/index.ts b/src/react-query/index.ts index 99974a46..cd0086f3 100644 --- a/src/react-query/index.ts +++ b/src/react-query/index.ts @@ -23,6 +23,7 @@ export * from "./endpointsListZdrEndpoints.js"; export * from "./generationsGetGeneration.js"; export * from "./modelsCount.js"; export * from "./modelsList.js"; +export * from "./modelsListEmbeddings.js"; export * from "./modelsListForUser.js"; export * from "./oAuthCreateAuthCode.js"; export * from "./oAuthExchangeAuthCodeForAPIKey.js"; diff --git a/src/react-query/modelsListEmbeddings.ts b/src/react-query/modelsListEmbeddings.ts new file mode 100644 index 00000000..befaa2e9 --- /dev/null +++ b/src/react-query/modelsListEmbeddings.ts @@ -0,0 +1,124 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ + +import { + InvalidateQueryFilters, + QueryClient, + QueryFunctionContext, + QueryKey, + useQuery, + UseQueryResult, + useSuspenseQuery, + UseSuspenseQueryResult, +} from "@tanstack/react-query"; +import { OpenRouterCore } from "../core.js"; +import { modelsListEmbeddings } from "../funcs/modelsListEmbeddings.js"; +import { combineSignals } from "../lib/primitives.js"; +import { RequestOptions } from "../lib/sdks.js"; +import * as models from "../models/index.js"; +import { unwrapAsync } from "../types/fp.js"; +import { useOpenRouterContext } from "./_context.js"; +import { QueryHookOptions, SuspenseQueryHookOptions } from "./_types.js"; + +export type ModelsListEmbeddingsQueryData = models.ModelsListResponse; + +/** + * List all embeddings models + * + * @remarks + * Returns a list of all available embeddings models and their properties + */ +export function useModelsListEmbeddings( + options?: QueryHookOptions, +): UseQueryResult { + const client = useOpenRouterContext(); + return useQuery({ + ...buildModelsListEmbeddingsQuery( + client, + options, + ), + ...options, + }); +} + +/** + * List all embeddings models + * + * @remarks + * Returns a list of all available embeddings models and their properties + */ +export function useModelsListEmbeddingsSuspense( + options?: SuspenseQueryHookOptions, +): UseSuspenseQueryResult { + const client = useOpenRouterContext(); + return useSuspenseQuery({ + ...buildModelsListEmbeddingsQuery( + client, + options, + ), + ...options, + }); +} + +export function prefetchModelsListEmbeddings( + queryClient: QueryClient, + client$: OpenRouterCore, +): Promise { + return queryClient.prefetchQuery({ + ...buildModelsListEmbeddingsQuery( + client$, + ), + }); +} + +export function setModelsListEmbeddingsData( + client: QueryClient, + data: ModelsListEmbeddingsQueryData, +): ModelsListEmbeddingsQueryData | undefined { + const key = queryKeyModelsListEmbeddings(); + + return client.setQueryData(key, data); +} + +export function invalidateAllModelsListEmbeddings( + client: QueryClient, + filters?: Omit, +): Promise { + return client.invalidateQueries({ + ...filters, + queryKey: ["@openrouter/sdk", "Models", "listEmbeddings"], + }); +} + +export function buildModelsListEmbeddingsQuery( + client$: OpenRouterCore, + options?: RequestOptions, +): { + queryKey: QueryKey; + queryFn: ( + context: QueryFunctionContext, + ) => Promise; +} { + return { + queryKey: queryKeyModelsListEmbeddings(), + queryFn: async function modelsListEmbeddingsQueryFn( + ctx, + ): Promise { + const sig = combineSignals(ctx.signal, options?.fetchOptions?.signal); + const mergedOptions = { + ...options, + fetchOptions: { ...options?.fetchOptions, signal: sig }, + }; + + return unwrapAsync(modelsListEmbeddings( + client$, + mergedOptions, + )); + }, + }; +} + +export function queryKeyModelsListEmbeddings(): QueryKey { + return ["@openrouter/sdk", "Models", "listEmbeddings"]; +} diff --git a/src/sdk/models.ts b/src/sdk/models.ts index 7fd2396d..67861f81 100644 --- a/src/sdk/models.ts +++ b/src/sdk/models.ts @@ -4,6 +4,7 @@ import { modelsCount } from "../funcs/modelsCount.js"; import { modelsList } from "../funcs/modelsList.js"; +import { modelsListEmbeddings } from "../funcs/modelsListEmbeddings.js"; import { modelsListForUser } from "../funcs/modelsListForUser.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as models from "../models/index.js"; @@ -37,6 +38,21 @@ export class Models extends ClientSDK { )); } + /** + * List all embeddings models + * + * @remarks + * Returns a list of all available embeddings models and their properties + */ + async listEmbeddings( + options?: RequestOptions, + ): Promise { + return unwrapAsync(modelsListEmbeddings( + this, + options, + )); + } + /** * List models filtered by user provider preferences */