@openrouter/sdk 0.8.0 → 0.10.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/FUNCTIONS.md +2 -1
- package/_speakeasy/.github/action-inputs-config.json +4 -0
- package/esm/funcs/analyticsGetUserActivity.js +2 -1
- package/esm/funcs/apiKeysCreate.js +2 -1
- package/esm/funcs/apiKeysDelete.js +2 -1
- package/esm/funcs/apiKeysGet.js +2 -1
- package/esm/funcs/apiKeysGetCurrentKeyMetadata.js +2 -1
- package/esm/funcs/apiKeysList.js +2 -1
- package/esm/funcs/apiKeysUpdate.js +2 -1
- package/esm/funcs/betaResponsesSend.js +2 -1
- package/esm/funcs/call-model.d.ts +19 -70
- package/esm/funcs/call-model.js +29 -71
- package/esm/funcs/chatSend.d.ts +3 -3
- package/esm/funcs/chatSend.js +20 -3
- package/esm/funcs/creditsCreateCoinbaseCharge.js +2 -1
- package/esm/funcs/creditsGetCredits.js +2 -1
- package/esm/funcs/embeddingsGenerate.js +2 -1
- package/esm/funcs/embeddingsListModels.js +2 -1
- package/esm/funcs/endpointsList.js +2 -1
- package/esm/funcs/endpointsListZdrEndpoints.js +2 -1
- package/esm/funcs/generationsGetGeneration.js +2 -1
- package/esm/funcs/guardrailsBulkAssignKeys.js +2 -1
- package/esm/funcs/guardrailsBulkAssignMembers.js +2 -1
- package/esm/funcs/guardrailsBulkUnassignKeys.js +2 -1
- package/esm/funcs/guardrailsBulkUnassignMembers.js +2 -1
- package/esm/funcs/guardrailsCreate.js +2 -1
- package/esm/funcs/guardrailsDelete.js +2 -1
- package/esm/funcs/guardrailsGet.js +2 -1
- package/esm/funcs/guardrailsList.js +2 -1
- package/esm/funcs/guardrailsListGuardrailKeyAssignments.js +2 -1
- package/esm/funcs/guardrailsListGuardrailMemberAssignments.js +2 -1
- package/esm/funcs/guardrailsListKeyAssignments.js +2 -1
- package/esm/funcs/guardrailsListMemberAssignments.js +2 -1
- package/esm/funcs/guardrailsUpdate.js +2 -1
- package/esm/funcs/modelsCount.d.ts +1 -1
- package/esm/funcs/modelsCount.js +9 -4
- package/esm/funcs/modelsList.js +3 -1
- package/esm/funcs/modelsListForUser.js +2 -1
- package/esm/funcs/oAuthCreateAuthCode.d.ts +1 -1
- package/esm/funcs/oAuthCreateAuthCode.js +4 -3
- package/esm/funcs/oAuthExchangeAuthCodeForAPIKey.js +2 -1
- package/esm/funcs/providersList.js +2 -1
- package/esm/index.d.ts +22 -23
- package/esm/index.js +20 -17
- package/esm/lib/anthropic-compat.d.ts +2 -1
- package/esm/lib/anthropic-compat.js +1 -2
- package/esm/lib/async-params.d.ts +19 -5
- package/esm/lib/async-params.js +5 -1
- package/esm/lib/chat-compat.d.ts +1 -1
- package/esm/lib/chat-compat.js +1 -2
- package/esm/lib/claude-type-guards.d.ts +2 -2
- package/esm/lib/config.d.ts +8 -10
- package/esm/lib/config.js +2 -2
- package/esm/lib/conversation-state.d.ts +1 -1
- package/esm/lib/conversation-state.js +35 -32
- package/esm/lib/env.d.ts +6 -2
- package/esm/lib/env.js +7 -3
- package/esm/lib/model-result.d.ts +73 -17
- package/esm/lib/model-result.js +329 -125
- package/esm/lib/sdks.d.ts +1 -1
- package/esm/lib/sdks.js +8 -28
- package/esm/lib/stream-transformers.d.ts +5 -4
- package/esm/lib/stream-transformers.js +24 -29
- package/esm/lib/stream-type-guards.js +8 -32
- package/esm/lib/tool-context.d.ts +68 -0
- package/esm/lib/tool-context.js +175 -0
- package/esm/lib/tool-executor.d.ts +9 -5
- package/esm/lib/tool-executor.js +26 -16
- package/esm/lib/tool-orchestrator.d.ts +2 -2
- package/esm/lib/tool-types.d.ts +101 -14
- package/esm/lib/tool-types.js +17 -0
- package/esm/lib/tool.d.ts +49 -60
- package/esm/lib/tool.js +15 -19
- package/esm/lib/turn-context.d.ts +1 -1
- package/esm/models/assistantmessage.d.ts +53 -36
- package/esm/models/assistantmessage.js +38 -47
- package/esm/models/assistantmessageimages.d.ts +33 -0
- package/esm/models/assistantmessageimages.js +44 -0
- package/esm/models/chatcompletionaudiooutput.d.ts +38 -0
- package/esm/models/chatcompletionaudiooutput.js +36 -0
- package/esm/models/chatgenerationparams.d.ts +527 -131
- package/esm/models/chatgenerationparams.js +280 -97
- package/esm/models/chatgenerationtokenusage.d.ts +48 -0
- package/esm/models/chatmessagecontentitem.d.ts +16 -10
- package/esm/models/chatmessagecontentitem.js +28 -4
- package/esm/models/chatmessagecontentitemaudio.d.ts +20 -2
- package/esm/models/chatmessagecontentitemaudio.js +9 -2
- package/esm/models/chatmessagecontentitemcachecontrol.d.ts +19 -8
- package/esm/models/chatmessagecontentitemcachecontrol.js +14 -9
- package/esm/models/chatmessagecontentitemfile.d.ts +57 -0
- package/esm/models/chatmessagecontentitemfile.js +59 -0
- package/esm/models/chatmessagecontentitemimage.d.ts +26 -3
- package/esm/models/chatmessagecontentitemimage.js +12 -2
- package/esm/models/chatmessagecontentitemtext.d.ts +17 -2
- package/esm/models/chatmessagecontentitemtext.js +9 -2
- package/esm/models/chatmessagecontentitemvideo.d.ts +12 -55
- package/esm/models/chatmessagecontentitemvideo.js +5 -72
- package/esm/models/chatmessagecontentitemvideolegacy.d.ts +28 -0
- package/esm/models/chatmessagecontentitemvideolegacy.js +33 -0
- package/esm/models/chatmessagetokenlogprob.d.ts +15 -0
- package/esm/models/chatmessagetokenlogprobs.d.ts +10 -1
- package/esm/models/chatmessagetokenlogprobs.js +2 -1
- package/esm/models/chatmessagetoolcall.d.ts +23 -2
- package/esm/models/chatmessagetoolcall.js +9 -2
- package/esm/models/chatresponse.d.ts +30 -2
- package/esm/models/chatresponse.js +7 -2
- package/esm/models/chatresponsechoice.d.ts +13 -2
- package/esm/models/chatresponsechoice.js +1 -2
- package/esm/models/chatstreamingchoice.d.ts +13 -2
- package/esm/models/chatstreamingchoice.js +1 -2
- package/esm/models/chatstreamingmessagechunk.d.ts +31 -2
- package/esm/models/chatstreamingmessagechunk.js +7 -2
- package/esm/models/chatstreamingmessagetoolcall.d.ts +38 -1
- package/esm/models/chatstreamingmessagetoolcall.js +9 -1
- package/esm/models/chatstreamingresponsechunk.d.ts +46 -12
- package/esm/models/chatstreamingresponsechunk.js +12 -26
- package/esm/models/chatstreamoptions.d.ts +8 -0
- package/esm/models/compoundfilter.d.ts +36 -0
- package/esm/models/compoundfilter.js +32 -0
- package/esm/models/conflictresponseerrordata.d.ts +17 -0
- package/esm/models/conflictresponseerrordata.js +16 -0
- package/esm/models/contextcompressionengine.d.ts +15 -0
- package/esm/models/contextcompressionengine.js +14 -0
- package/esm/models/datetimeservertool.d.ts +30 -0
- package/esm/models/datetimeservertool.js +22 -0
- package/esm/models/debugoptions.d.ts +18 -0
- package/esm/models/debugoptions.js +18 -0
- package/esm/models/defaultparameters.d.ts +3 -0
- package/esm/models/defaultparameters.js +6 -0
- package/esm/models/developermessage.d.ts +12 -0
- package/esm/models/errors/conflictresponseerror.d.ts +33 -0
- package/esm/models/errors/{chaterror.js → conflictresponseerror.js} +17 -7
- package/esm/models/errors/index.d.ts +1 -1
- package/esm/models/errors/index.js +1 -1
- package/esm/models/index.d.ts +35 -12
- package/esm/models/index.js +35 -12
- package/esm/models/jsonschemaconfig.d.ts +17 -2
- package/esm/models/jsonschemaconfig.js +1 -1
- package/esm/models/message.d.ts +9 -2
- package/esm/models/message.js +1 -1
- package/esm/models/modelscountresponse.d.ts +4 -4
- package/esm/models/modelscountresponse.js +4 -4
- package/esm/models/namedtoolchoice.d.ts +15 -2
- package/esm/models/namedtoolchoice.js +6 -1
- package/esm/models/openairesponsesinputunion.d.ts +32 -1
- package/esm/models/openairesponsesinputunion.js +53 -1
- package/esm/models/openairesponsesreasoningconfig.d.ts +1 -1
- package/esm/models/openairesponsesreasoningconfig.js +1 -1
- package/esm/models/openresponsesapplypatchtool.d.ts +20 -0
- package/esm/models/openresponsesapplypatchtool.js +21 -0
- package/esm/models/openresponsescodeinterpretertool.d.ts +68 -0
- package/esm/models/openresponsescodeinterpretertool.js +85 -0
- package/esm/models/openresponsescomputertool.d.ts +39 -0
- package/esm/models/openresponsescomputertool.js +50 -0
- package/esm/models/openresponsescustomtool.d.ts +75 -0
- package/esm/models/openresponsescustomtool.js +95 -0
- package/esm/models/openresponseseasyinputmessage.d.ts +30 -4
- package/esm/models/openresponseseasyinputmessage.js +28 -2
- package/esm/models/openresponsesfilesearchtool.d.ts +111 -0
- package/esm/models/openresponsesfilesearchtool.js +180 -0
- package/esm/models/openresponsesfunctioncalloutput.d.ts +46 -7
- package/esm/models/openresponsesfunctioncalloutput.js +56 -4
- package/esm/models/openresponsesfunctionshelltool.d.ts +20 -0
- package/esm/models/openresponsesfunctionshelltool.js +21 -0
- package/esm/models/openresponsesimagegenerationtool.d.ts +125 -0
- package/esm/models/openresponsesimagegenerationtool.js +153 -0
- package/esm/models/openresponsesinputmessageitem.d.ts +2 -2
- package/esm/models/openresponsesinputmessageitem.js +2 -2
- package/esm/models/openresponsesinputunion.d.ts +207 -0
- package/esm/models/openresponsesinputunion.js +225 -0
- package/esm/models/openresponseslocalshelltool.d.ts +20 -0
- package/esm/models/openresponseslocalshelltool.js +21 -0
- package/esm/models/openresponsesmcptool.d.ts +128 -0
- package/esm/models/openresponsesmcptool.js +173 -0
- package/esm/models/openresponsesnonstreamingresponse.d.ts +15 -6
- package/esm/models/openresponsesnonstreamingresponse.js +30 -3
- package/esm/models/openresponsesreasoning.d.ts +2 -2
- package/esm/models/openresponsesreasoning.js +1 -1
- package/esm/models/openresponsesreasoningconfig.d.ts +2 -2
- package/esm/models/openresponsesreasoningconfig.js +1 -1
- package/esm/models/openresponsesrequest.d.ts +111 -39
- package/esm/models/openresponsesrequest.js +112 -38
- package/esm/models/openresponsesstreamevent.d.ts +52 -4
- package/esm/models/openresponsesstreamevent.js +54 -3
- package/esm/models/openresponseswebsearch20250826tool.d.ts +29 -0
- package/esm/models/openresponseswebsearch20250826tool.js +23 -0
- package/esm/models/openresponseswebsearchcallcompleted.d.ts +16 -0
- package/esm/models/openresponseswebsearchcallcompleted.js +24 -0
- package/esm/models/openresponseswebsearchcallinprogress.d.ts +16 -0
- package/esm/models/openresponseswebsearchcallinprogress.js +24 -0
- package/esm/models/openresponseswebsearchcallsearching.d.ts +16 -0
- package/esm/models/openresponseswebsearchcallsearching.js +24 -0
- package/esm/models/openresponseswebsearchpreview20250311tool.d.ts +44 -0
- package/esm/models/openresponseswebsearchpreview20250311tool.js +51 -0
- package/esm/models/openresponseswebsearchpreviewtool.d.ts +44 -0
- package/esm/models/openresponseswebsearchpreviewtool.js +47 -0
- package/esm/models/openresponseswebsearchtool.d.ts +29 -0
- package/esm/models/openresponseswebsearchtool.js +23 -0
- package/esm/models/operations/bulkassignkeystoguardrail.d.ts +16 -3
- package/esm/models/operations/bulkassignkeystoguardrail.js +2 -2
- package/esm/models/operations/bulkassignmemberstoguardrail.d.ts +16 -3
- package/esm/models/operations/bulkassignmemberstoguardrail.js +2 -2
- package/esm/models/operations/bulkunassignkeysfromguardrail.d.ts +16 -3
- package/esm/models/operations/bulkunassignkeysfromguardrail.js +2 -2
- package/esm/models/operations/bulkunassignmembersfromguardrail.d.ts +16 -3
- package/esm/models/operations/bulkunassignmembersfromguardrail.js +2 -2
- package/esm/models/operations/createauthkeyscode.d.ts +40 -3
- package/esm/models/operations/createauthkeyscode.js +16 -2
- package/esm/models/operations/createcoinbasecharge.d.ts +16 -3
- package/esm/models/operations/createcoinbasecharge.js +2 -2
- package/esm/models/operations/createembeddings.d.ts +16 -3
- package/esm/models/operations/createembeddings.js +2 -2
- package/esm/models/operations/createguardrail.d.ts +25 -3
- package/esm/models/operations/createguardrail.js +6 -2
- package/esm/models/operations/createkeys.d.ts +16 -3
- package/esm/models/operations/createkeys.js +2 -2
- package/esm/models/operations/createresponses.d.ts +16 -3
- package/esm/models/operations/createresponses.js +2 -2
- package/esm/models/operations/deleteguardrail.d.ts +16 -3
- package/esm/models/operations/deleteguardrail.js +2 -2
- package/esm/models/operations/deletekeys.d.ts +16 -3
- package/esm/models/operations/deletekeys.js +2 -2
- package/esm/models/operations/exchangeauthcodeforapikey.d.ts +16 -3
- package/esm/models/operations/exchangeauthcodeforapikey.js +2 -2
- package/esm/models/operations/getcredits.d.ts +16 -3
- package/esm/models/operations/getcredits.js +2 -2
- package/esm/models/operations/getcurrentkey.d.ts +16 -3
- package/esm/models/operations/getcurrentkey.js +2 -2
- package/esm/models/operations/getgeneration.d.ts +27 -3
- package/esm/models/operations/getgeneration.js +9 -2
- package/esm/models/operations/getguardrail.d.ts +20 -3
- package/esm/models/operations/getguardrail.js +4 -2
- package/esm/models/operations/getkey.d.ts +16 -3
- package/esm/models/operations/getkey.js +2 -2
- package/esm/models/operations/getmodels.d.ts +21 -3
- package/esm/models/operations/getmodels.js +4 -2
- package/esm/models/operations/getuseractivity.d.ts +16 -3
- package/esm/models/operations/getuseractivity.js +2 -2
- package/esm/models/operations/list.d.ts +16 -3
- package/esm/models/operations/list.js +2 -2
- package/esm/models/operations/listembeddingsmodels.d.ts +16 -3
- package/esm/models/operations/listembeddingsmodels.js +2 -2
- package/esm/models/operations/listendpoints.d.ts +16 -3
- package/esm/models/operations/listendpoints.js +2 -2
- package/esm/models/operations/listendpointszdr.d.ts +16 -3
- package/esm/models/operations/listendpointszdr.js +2 -2
- package/esm/models/operations/listguardrailkeyassignments.d.ts +16 -3
- package/esm/models/operations/listguardrailkeyassignments.js +2 -2
- package/esm/models/operations/listguardrailmemberassignments.d.ts +16 -3
- package/esm/models/operations/listguardrailmemberassignments.js +2 -2
- package/esm/models/operations/listguardrails.d.ts +20 -3
- package/esm/models/operations/listguardrails.js +4 -2
- package/esm/models/operations/listkeyassignments.d.ts +16 -3
- package/esm/models/operations/listkeyassignments.js +2 -2
- package/esm/models/operations/listmemberassignments.d.ts +16 -3
- package/esm/models/operations/listmemberassignments.js +2 -2
- package/esm/models/operations/listmodelscount.d.ts +21 -3
- package/esm/models/operations/listmodelscount.js +4 -2
- package/esm/models/operations/listmodelsuser.d.ts +16 -3
- package/esm/models/operations/listmodelsuser.js +2 -2
- package/esm/models/operations/listproviders.d.ts +16 -3
- package/esm/models/operations/listproviders.js +2 -2
- package/esm/models/operations/sendchatcompletionrequest.d.ts +27 -5
- package/esm/models/operations/sendchatcompletionrequest.js +22 -4
- package/esm/models/operations/updateguardrail.d.ts +25 -3
- package/esm/models/operations/updateguardrail.js +6 -2
- package/esm/models/operations/updatekeys.d.ts +16 -3
- package/esm/models/operations/updatekeys.js +2 -2
- package/esm/models/outputmessage.d.ts +23 -0
- package/esm/models/outputmessage.js +24 -0
- package/esm/models/outputmodality.d.ts +1 -0
- package/esm/models/outputmodality.js +1 -0
- package/esm/models/providername.d.ts +3 -0
- package/esm/models/providername.js +3 -0
- package/esm/models/providerpreferences.d.ts +49 -14
- package/esm/models/providerpreferences.js +33 -15
- package/esm/models/providersort.d.ts +7 -0
- package/esm/models/providersort.js +4 -0
- package/esm/models/providersortconfig.d.ts +31 -2
- package/esm/models/providersortconfig.js +16 -2
- package/esm/models/reasoningdetailencrypted.d.ts +42 -0
- package/esm/models/reasoningdetailencrypted.js +42 -0
- package/esm/models/reasoningdetailsummary.d.ts +42 -0
- package/esm/models/reasoningdetailsummary.js +42 -0
- package/esm/models/reasoningdetailtext.d.ts +44 -0
- package/esm/models/reasoningdetailtext.js +44 -0
- package/esm/models/reasoningdetailunion.d.ts +19 -0
- package/esm/models/reasoningdetailunion.js +28 -0
- package/esm/models/responseformatjsonobject.d.ts +20 -0
- package/esm/models/responseformatjsonobject.js +21 -0
- package/esm/models/responseformatjsonschema.d.ts +6 -0
- package/esm/models/responseformattext.d.ts +15 -0
- package/esm/models/responseformattext.js +13 -0
- package/esm/models/responseformattextconfig.d.ts +3 -3
- package/esm/models/responseformattextconfig.js +3 -3
- package/esm/models/responseformattextgrammar.d.ts +6 -0
- package/esm/models/responseformattextpython.d.ts +15 -0
- package/esm/models/responseformattextpython.js +13 -0
- package/esm/models/responseoutputtext.d.ts +8 -8
- package/esm/models/responseoutputtext.js +10 -9
- package/esm/models/responseserrorfield.d.ts +4 -4
- package/esm/models/responseserrorfield.js +4 -4
- package/esm/models/responsesoutputitem.d.ts +2 -13
- package/esm/models/responsesoutputitem.js +8 -6
- package/esm/models/responsesoutputitemreasoning.d.ts +3 -32
- package/esm/models/responsesoutputitemreasoning.js +3 -45
- package/esm/models/responsesoutputmessage.d.ts +24 -32
- package/esm/models/responsesoutputmessage.js +26 -47
- package/esm/models/responsesservertooloutput.d.ts +42 -0
- package/esm/models/responsesservertooloutput.js +44 -0
- package/esm/models/responseswebsearchcalloutput.d.ts +90 -5
- package/esm/models/responseswebsearchcalloutput.js +113 -5
- package/esm/models/responseswebsearchservertool.d.ts +35 -0
- package/esm/models/responseswebsearchservertool.js +28 -0
- package/esm/models/systemmessage.d.ts +12 -0
- package/esm/models/toolchoiceoption.d.ts +31 -0
- package/esm/models/toolchoiceoption.js +32 -0
- package/esm/models/tooldefinitionjson.d.ts +62 -10
- package/esm/models/tooldefinitionjson.js +29 -6
- package/esm/models/toolresponsemessage.d.ts +12 -0
- package/esm/models/usermessage.d.ts +12 -0
- package/esm/models/videoinput.d.ts +23 -0
- package/esm/models/videoinput.js +22 -0
- package/esm/models/websearchengine.d.ts +2 -0
- package/esm/models/websearchengine.js +2 -0
- package/esm/models/websearchservertool.d.ts +116 -0
- package/esm/models/websearchservertool.js +77 -0
- package/esm/models/websearchshorthand.d.ts +215 -0
- package/esm/models/websearchshorthand.js +138 -0
- package/esm/sdk/chat.d.ts +1 -1
- package/esm/sdk/sdk.d.ts +6 -3
- package/esm/sdk/sdk.js +3 -4
- package/esm/types/index.d.ts +0 -2
- package/esm/types/index.js +0 -1
- package/jsr.json +1 -1
- package/package.json +11 -6
- package/turbo.json +10 -0
- package/esm/models/chaterror.d.ts +0 -17
- package/esm/models/chaterror.js +0 -25
- package/esm/models/errors/chaterror.d.ts +0 -19
- package/esm/models/openresponsesinput.d.ts +0 -28
- package/esm/models/openresponsesinput.js +0 -54
- package/esm/models/openresponseslogprobs.d.ts +0 -16
- package/esm/models/openresponseslogprobs.js +0 -22
- package/esm/models/openresponsestoplogprobs.d.ts +0 -14
- package/esm/models/openresponsestoplogprobs.js +0 -15
- package/esm/models/providersortunion.d.ts +0 -10
- package/esm/models/providersortunion.js +0 -13
- package/esm/models/responsesformatjsonobject.d.ts +0 -20
- package/esm/models/responsesformatjsonobject.js +0 -21
- package/esm/models/schema10.d.ts +0 -33
- package/esm/models/schema10.js +0 -30
- package/esm/models/schema14.d.ts +0 -8
- package/esm/models/schema14.js +0 -12
- package/esm/models/schema17.d.ts +0 -102
- package/esm/models/schema17.js +0 -95
- package/esm/models/schema19.d.ts +0 -92
- package/esm/models/schema19.js +0 -109
- package/esm/models/schema5.d.ts +0 -86
- package/esm/models/schema5.js +0 -89
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 0f461c2f2470
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../lib/schemas.js";
|
|
8
|
+
import * as openEnums from "../types/enums.js";
|
|
9
|
+
import { CompoundFilter$inboundSchema, CompoundFilter$outboundSchema, } from "./compoundfilter.js";
|
|
10
|
+
export const FiltersType = {
|
|
11
|
+
Eq: "eq",
|
|
12
|
+
Ne: "ne",
|
|
13
|
+
Gt: "gt",
|
|
14
|
+
Gte: "gte",
|
|
15
|
+
Lt: "lt",
|
|
16
|
+
Lte: "lte",
|
|
17
|
+
};
|
|
18
|
+
export const Ranker = {
|
|
19
|
+
Auto: "auto",
|
|
20
|
+
Default20241115: "default-2024-11-15",
|
|
21
|
+
};
|
|
22
|
+
/** @internal */
|
|
23
|
+
export const FiltersType$inboundSchema = openEnums.inboundSchema(FiltersType);
|
|
24
|
+
/** @internal */
|
|
25
|
+
export const FiltersType$outboundSchema = openEnums.outboundSchema(FiltersType);
|
|
26
|
+
/** @internal */
|
|
27
|
+
export const Value1$inboundSchema = z.union([
|
|
28
|
+
z.string(),
|
|
29
|
+
z.number(),
|
|
30
|
+
]);
|
|
31
|
+
/** @internal */
|
|
32
|
+
export const Value1$outboundSchema = z
|
|
33
|
+
.union([z.string(), z.number()]);
|
|
34
|
+
export function value1ToJSON(value1) {
|
|
35
|
+
return JSON.stringify(Value1$outboundSchema.parse(value1));
|
|
36
|
+
}
|
|
37
|
+
export function value1FromJSON(jsonString) {
|
|
38
|
+
return safeParse(jsonString, (x) => Value1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Value1' from JSON`);
|
|
39
|
+
}
|
|
40
|
+
/** @internal */
|
|
41
|
+
export const Value2$inboundSchema = z.union([
|
|
42
|
+
z.string(),
|
|
43
|
+
z.number(),
|
|
44
|
+
z.boolean(),
|
|
45
|
+
z.array(z.union([z.string(), z.number()])),
|
|
46
|
+
]);
|
|
47
|
+
/** @internal */
|
|
48
|
+
export const Value2$outboundSchema = z
|
|
49
|
+
.union([
|
|
50
|
+
z.string(),
|
|
51
|
+
z.number(),
|
|
52
|
+
z.boolean(),
|
|
53
|
+
z.array(z.union([z.string(), z.number()])),
|
|
54
|
+
]);
|
|
55
|
+
export function value2ToJSON(value2) {
|
|
56
|
+
return JSON.stringify(Value2$outboundSchema.parse(value2));
|
|
57
|
+
}
|
|
58
|
+
export function value2FromJSON(jsonString) {
|
|
59
|
+
return safeParse(jsonString, (x) => Value2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Value2' from JSON`);
|
|
60
|
+
}
|
|
61
|
+
/** @internal */
|
|
62
|
+
export const OpenResponsesFileSearchToolFilters$inboundSchema = z.object({
|
|
63
|
+
key: z.string(),
|
|
64
|
+
type: FiltersType$inboundSchema,
|
|
65
|
+
value: z.union([
|
|
66
|
+
z.string(),
|
|
67
|
+
z.number(),
|
|
68
|
+
z.boolean(),
|
|
69
|
+
z.array(z.union([z.string(), z.number()])),
|
|
70
|
+
]),
|
|
71
|
+
});
|
|
72
|
+
/** @internal */
|
|
73
|
+
export const OpenResponsesFileSearchToolFilters$outboundSchema = z.object({
|
|
74
|
+
key: z.string(),
|
|
75
|
+
type: FiltersType$outboundSchema,
|
|
76
|
+
value: z.union([
|
|
77
|
+
z.string(),
|
|
78
|
+
z.number(),
|
|
79
|
+
z.boolean(),
|
|
80
|
+
z.array(z.union([z.string(), z.number()])),
|
|
81
|
+
]),
|
|
82
|
+
});
|
|
83
|
+
export function openResponsesFileSearchToolFiltersToJSON(openResponsesFileSearchToolFilters) {
|
|
84
|
+
return JSON.stringify(OpenResponsesFileSearchToolFilters$outboundSchema.parse(openResponsesFileSearchToolFilters));
|
|
85
|
+
}
|
|
86
|
+
export function openResponsesFileSearchToolFiltersFromJSON(jsonString) {
|
|
87
|
+
return safeParse(jsonString, (x) => OpenResponsesFileSearchToolFilters$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OpenResponsesFileSearchToolFilters' from JSON`);
|
|
88
|
+
}
|
|
89
|
+
/** @internal */
|
|
90
|
+
export const Filters$inboundSchema = z.union([
|
|
91
|
+
z.lazy(() => OpenResponsesFileSearchToolFilters$inboundSchema),
|
|
92
|
+
CompoundFilter$inboundSchema,
|
|
93
|
+
z.any(),
|
|
94
|
+
]);
|
|
95
|
+
/** @internal */
|
|
96
|
+
export const Filters$outboundSchema = z
|
|
97
|
+
.union([
|
|
98
|
+
z.lazy(() => OpenResponsesFileSearchToolFilters$outboundSchema),
|
|
99
|
+
CompoundFilter$outboundSchema,
|
|
100
|
+
z.any(),
|
|
101
|
+
]);
|
|
102
|
+
export function filtersToJSON(filters) {
|
|
103
|
+
return JSON.stringify(Filters$outboundSchema.parse(filters));
|
|
104
|
+
}
|
|
105
|
+
export function filtersFromJSON(jsonString) {
|
|
106
|
+
return safeParse(jsonString, (x) => Filters$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Filters' from JSON`);
|
|
107
|
+
}
|
|
108
|
+
/** @internal */
|
|
109
|
+
export const Ranker$inboundSchema = openEnums
|
|
110
|
+
.inboundSchema(Ranker);
|
|
111
|
+
/** @internal */
|
|
112
|
+
export const Ranker$outboundSchema = openEnums
|
|
113
|
+
.outboundSchema(Ranker);
|
|
114
|
+
/** @internal */
|
|
115
|
+
export const RankingOptions$inboundSchema = z.object({
|
|
116
|
+
ranker: Ranker$inboundSchema.optional(),
|
|
117
|
+
score_threshold: z.number().optional(),
|
|
118
|
+
}).transform((v) => {
|
|
119
|
+
return remap$(v, {
|
|
120
|
+
"score_threshold": "scoreThreshold",
|
|
121
|
+
});
|
|
122
|
+
});
|
|
123
|
+
/** @internal */
|
|
124
|
+
export const RankingOptions$outboundSchema = z.object({
|
|
125
|
+
ranker: Ranker$outboundSchema.optional(),
|
|
126
|
+
scoreThreshold: z.number().optional(),
|
|
127
|
+
}).transform((v) => {
|
|
128
|
+
return remap$(v, {
|
|
129
|
+
scoreThreshold: "score_threshold",
|
|
130
|
+
});
|
|
131
|
+
});
|
|
132
|
+
export function rankingOptionsToJSON(rankingOptions) {
|
|
133
|
+
return JSON.stringify(RankingOptions$outboundSchema.parse(rankingOptions));
|
|
134
|
+
}
|
|
135
|
+
export function rankingOptionsFromJSON(jsonString) {
|
|
136
|
+
return safeParse(jsonString, (x) => RankingOptions$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RankingOptions' from JSON`);
|
|
137
|
+
}
|
|
138
|
+
/** @internal */
|
|
139
|
+
export const OpenResponsesFileSearchTool$inboundSchema = z.object({
|
|
140
|
+
type: z.literal("file_search"),
|
|
141
|
+
vector_store_ids: z.array(z.string()),
|
|
142
|
+
filters: z.nullable(z.union([
|
|
143
|
+
z.lazy(() => OpenResponsesFileSearchToolFilters$inboundSchema),
|
|
144
|
+
CompoundFilter$inboundSchema,
|
|
145
|
+
z.any(),
|
|
146
|
+
])).optional(),
|
|
147
|
+
max_num_results: z.int().optional(),
|
|
148
|
+
ranking_options: z.lazy(() => RankingOptions$inboundSchema).optional(),
|
|
149
|
+
}).transform((v) => {
|
|
150
|
+
return remap$(v, {
|
|
151
|
+
"vector_store_ids": "vectorStoreIds",
|
|
152
|
+
"max_num_results": "maxNumResults",
|
|
153
|
+
"ranking_options": "rankingOptions",
|
|
154
|
+
});
|
|
155
|
+
});
|
|
156
|
+
/** @internal */
|
|
157
|
+
export const OpenResponsesFileSearchTool$outboundSchema = z.object({
|
|
158
|
+
type: z.literal("file_search"),
|
|
159
|
+
vectorStoreIds: z.array(z.string()),
|
|
160
|
+
filters: z.nullable(z.union([
|
|
161
|
+
z.lazy(() => OpenResponsesFileSearchToolFilters$outboundSchema),
|
|
162
|
+
CompoundFilter$outboundSchema,
|
|
163
|
+
z.any(),
|
|
164
|
+
])).optional(),
|
|
165
|
+
maxNumResults: z.int().optional(),
|
|
166
|
+
rankingOptions: z.lazy(() => RankingOptions$outboundSchema).optional(),
|
|
167
|
+
}).transform((v) => {
|
|
168
|
+
return remap$(v, {
|
|
169
|
+
vectorStoreIds: "vector_store_ids",
|
|
170
|
+
maxNumResults: "max_num_results",
|
|
171
|
+
rankingOptions: "ranking_options",
|
|
172
|
+
});
|
|
173
|
+
});
|
|
174
|
+
export function openResponsesFileSearchToolToJSON(openResponsesFileSearchTool) {
|
|
175
|
+
return JSON.stringify(OpenResponsesFileSearchTool$outboundSchema.parse(openResponsesFileSearchTool));
|
|
176
|
+
}
|
|
177
|
+
export function openResponsesFileSearchToolFromJSON(jsonString) {
|
|
178
|
+
return safeParse(jsonString, (x) => OpenResponsesFileSearchTool$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OpenResponsesFileSearchTool' from JSON`);
|
|
179
|
+
}
|
|
180
|
+
//# sourceMappingURL=openresponsesfilesearchtool.js.map
|
|
@@ -1,28 +1,67 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
|
-
import { ClosedEnum } from "../types/enums.js";
|
|
2
|
+
import { ClosedEnum, OpenEnum } from "../types/enums.js";
|
|
3
|
+
import { ResponseInputFile, ResponseInputFile$Outbound } from "./responseinputfile.js";
|
|
4
|
+
import { ResponseInputText, ResponseInputText$Outbound } from "./responseinputtext.js";
|
|
3
5
|
import { ToolCallStatus } from "./toolcallstatus.js";
|
|
4
|
-
export declare const
|
|
6
|
+
export declare const OpenResponsesFunctionCallOutputTypeFunctionCallOutput: {
|
|
5
7
|
readonly FunctionCallOutput: "function_call_output";
|
|
6
8
|
};
|
|
7
|
-
export type
|
|
9
|
+
export type OpenResponsesFunctionCallOutputTypeFunctionCallOutput = ClosedEnum<typeof OpenResponsesFunctionCallOutputTypeFunctionCallOutput>;
|
|
10
|
+
export declare const OpenResponsesFunctionCallOutputDetail: {
|
|
11
|
+
readonly Auto: "auto";
|
|
12
|
+
readonly High: "high";
|
|
13
|
+
readonly Low: "low";
|
|
14
|
+
};
|
|
15
|
+
export type OpenResponsesFunctionCallOutputDetail = OpenEnum<typeof OpenResponsesFunctionCallOutputDetail>;
|
|
16
|
+
/**
|
|
17
|
+
* Image input content item
|
|
18
|
+
*/
|
|
19
|
+
export type OutputInputImage = {
|
|
20
|
+
type: "input_image";
|
|
21
|
+
detail: OpenResponsesFunctionCallOutputDetail;
|
|
22
|
+
imageUrl?: string | null | undefined;
|
|
23
|
+
};
|
|
24
|
+
export type OpenResponsesFunctionCallOutputOutputUnion1 = ResponseInputText | OutputInputImage | ResponseInputFile;
|
|
25
|
+
export type OpenResponsesFunctionCallOutputOutputUnion2 = string | Array<ResponseInputText | OutputInputImage | ResponseInputFile>;
|
|
8
26
|
/**
|
|
9
27
|
* The output from a function call execution
|
|
10
28
|
*/
|
|
11
29
|
export type OpenResponsesFunctionCallOutput = {
|
|
12
|
-
type:
|
|
30
|
+
type: OpenResponsesFunctionCallOutputTypeFunctionCallOutput;
|
|
13
31
|
id?: string | null | undefined;
|
|
14
32
|
callId: string;
|
|
15
|
-
output: string
|
|
33
|
+
output: string | Array<ResponseInputText | OutputInputImage | ResponseInputFile>;
|
|
16
34
|
status?: ToolCallStatus | null | undefined;
|
|
17
35
|
};
|
|
18
36
|
/** @internal */
|
|
19
|
-
export declare const
|
|
37
|
+
export declare const OpenResponsesFunctionCallOutputTypeFunctionCallOutput$outboundSchema: z.ZodEnum<typeof OpenResponsesFunctionCallOutputTypeFunctionCallOutput>;
|
|
38
|
+
/** @internal */
|
|
39
|
+
export declare const OpenResponsesFunctionCallOutputDetail$outboundSchema: z.ZodType<string, OpenResponsesFunctionCallOutputDetail>;
|
|
40
|
+
/** @internal */
|
|
41
|
+
export type OutputInputImage$Outbound = {
|
|
42
|
+
type: "input_image";
|
|
43
|
+
detail: string;
|
|
44
|
+
image_url?: string | null | undefined;
|
|
45
|
+
};
|
|
46
|
+
/** @internal */
|
|
47
|
+
export declare const OutputInputImage$outboundSchema: z.ZodType<OutputInputImage$Outbound, OutputInputImage>;
|
|
48
|
+
export declare function outputInputImageToJSON(outputInputImage: OutputInputImage): string;
|
|
49
|
+
/** @internal */
|
|
50
|
+
export type OpenResponsesFunctionCallOutputOutputUnion1$Outbound = ResponseInputText$Outbound | OutputInputImage$Outbound | ResponseInputFile$Outbound;
|
|
51
|
+
/** @internal */
|
|
52
|
+
export declare const OpenResponsesFunctionCallOutputOutputUnion1$outboundSchema: z.ZodType<OpenResponsesFunctionCallOutputOutputUnion1$Outbound, OpenResponsesFunctionCallOutputOutputUnion1>;
|
|
53
|
+
export declare function openResponsesFunctionCallOutputOutputUnion1ToJSON(openResponsesFunctionCallOutputOutputUnion1: OpenResponsesFunctionCallOutputOutputUnion1): string;
|
|
54
|
+
/** @internal */
|
|
55
|
+
export type OpenResponsesFunctionCallOutputOutputUnion2$Outbound = string | Array<ResponseInputText$Outbound | OutputInputImage$Outbound | ResponseInputFile$Outbound>;
|
|
56
|
+
/** @internal */
|
|
57
|
+
export declare const OpenResponsesFunctionCallOutputOutputUnion2$outboundSchema: z.ZodType<OpenResponsesFunctionCallOutputOutputUnion2$Outbound, OpenResponsesFunctionCallOutputOutputUnion2>;
|
|
58
|
+
export declare function openResponsesFunctionCallOutputOutputUnion2ToJSON(openResponsesFunctionCallOutputOutputUnion2: OpenResponsesFunctionCallOutputOutputUnion2): string;
|
|
20
59
|
/** @internal */
|
|
21
60
|
export type OpenResponsesFunctionCallOutput$Outbound = {
|
|
22
61
|
type: string;
|
|
23
62
|
id?: string | null | undefined;
|
|
24
63
|
call_id: string;
|
|
25
|
-
output: string
|
|
64
|
+
output: string | Array<ResponseInputText$Outbound | OutputInputImage$Outbound | ResponseInputFile$Outbound>;
|
|
26
65
|
status?: string | null | undefined;
|
|
27
66
|
};
|
|
28
67
|
/** @internal */
|
|
@@ -4,18 +4,70 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import * as z from "zod/v4";
|
|
6
6
|
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import * as openEnums from "../types/enums.js";
|
|
8
|
+
import { ResponseInputFile$outboundSchema, } from "./responseinputfile.js";
|
|
9
|
+
import { ResponseInputText$outboundSchema, } from "./responseinputtext.js";
|
|
7
10
|
import { ToolCallStatus$outboundSchema, } from "./toolcallstatus.js";
|
|
8
|
-
export const
|
|
11
|
+
export const OpenResponsesFunctionCallOutputTypeFunctionCallOutput = {
|
|
9
12
|
FunctionCallOutput: "function_call_output",
|
|
10
13
|
};
|
|
14
|
+
export const OpenResponsesFunctionCallOutputDetail = {
|
|
15
|
+
Auto: "auto",
|
|
16
|
+
High: "high",
|
|
17
|
+
Low: "low",
|
|
18
|
+
};
|
|
19
|
+
/** @internal */
|
|
20
|
+
export const OpenResponsesFunctionCallOutputTypeFunctionCallOutput$outboundSchema = z
|
|
21
|
+
.enum(OpenResponsesFunctionCallOutputTypeFunctionCallOutput);
|
|
22
|
+
/** @internal */
|
|
23
|
+
export const OpenResponsesFunctionCallOutputDetail$outboundSchema = openEnums.outboundSchema(OpenResponsesFunctionCallOutputDetail);
|
|
24
|
+
/** @internal */
|
|
25
|
+
export const OutputInputImage$outboundSchema = z.object({
|
|
26
|
+
type: z.literal("input_image"),
|
|
27
|
+
detail: OpenResponsesFunctionCallOutputDetail$outboundSchema,
|
|
28
|
+
imageUrl: z.nullable(z.string()).optional(),
|
|
29
|
+
}).transform((v) => {
|
|
30
|
+
return remap$(v, {
|
|
31
|
+
imageUrl: "image_url",
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
export function outputInputImageToJSON(outputInputImage) {
|
|
35
|
+
return JSON.stringify(OutputInputImage$outboundSchema.parse(outputInputImage));
|
|
36
|
+
}
|
|
11
37
|
/** @internal */
|
|
12
|
-
export const
|
|
38
|
+
export const OpenResponsesFunctionCallOutputOutputUnion1$outboundSchema = z.union([
|
|
39
|
+
ResponseInputText$outboundSchema,
|
|
40
|
+
z.lazy(() => OutputInputImage$outboundSchema),
|
|
41
|
+
ResponseInputFile$outboundSchema,
|
|
42
|
+
]);
|
|
43
|
+
export function openResponsesFunctionCallOutputOutputUnion1ToJSON(openResponsesFunctionCallOutputOutputUnion1) {
|
|
44
|
+
return JSON.stringify(OpenResponsesFunctionCallOutputOutputUnion1$outboundSchema.parse(openResponsesFunctionCallOutputOutputUnion1));
|
|
45
|
+
}
|
|
46
|
+
/** @internal */
|
|
47
|
+
export const OpenResponsesFunctionCallOutputOutputUnion2$outboundSchema = z.union([
|
|
48
|
+
z.string(),
|
|
49
|
+
z.array(z.union([
|
|
50
|
+
ResponseInputText$outboundSchema,
|
|
51
|
+
z.lazy(() => OutputInputImage$outboundSchema),
|
|
52
|
+
ResponseInputFile$outboundSchema,
|
|
53
|
+
])),
|
|
54
|
+
]);
|
|
55
|
+
export function openResponsesFunctionCallOutputOutputUnion2ToJSON(openResponsesFunctionCallOutputOutputUnion2) {
|
|
56
|
+
return JSON.stringify(OpenResponsesFunctionCallOutputOutputUnion2$outboundSchema.parse(openResponsesFunctionCallOutputOutputUnion2));
|
|
57
|
+
}
|
|
13
58
|
/** @internal */
|
|
14
59
|
export const OpenResponsesFunctionCallOutput$outboundSchema = z.object({
|
|
15
|
-
type:
|
|
60
|
+
type: OpenResponsesFunctionCallOutputTypeFunctionCallOutput$outboundSchema,
|
|
16
61
|
id: z.nullable(z.string()).optional(),
|
|
17
62
|
callId: z.string(),
|
|
18
|
-
output: z.
|
|
63
|
+
output: z.union([
|
|
64
|
+
z.string(),
|
|
65
|
+
z.array(z.union([
|
|
66
|
+
ResponseInputText$outboundSchema,
|
|
67
|
+
z.lazy(() => OutputInputImage$outboundSchema),
|
|
68
|
+
ResponseInputFile$outboundSchema,
|
|
69
|
+
])),
|
|
70
|
+
]),
|
|
19
71
|
status: z.nullable(ToolCallStatus$outboundSchema).optional(),
|
|
20
72
|
}).transform((v) => {
|
|
21
73
|
return remap$(v, {
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
+
/**
|
|
5
|
+
* Shell tool configuration
|
|
6
|
+
*/
|
|
7
|
+
export type OpenResponsesFunctionShellTool = {
|
|
8
|
+
type: "shell";
|
|
9
|
+
};
|
|
10
|
+
/** @internal */
|
|
11
|
+
export declare const OpenResponsesFunctionShellTool$inboundSchema: z.ZodType<OpenResponsesFunctionShellTool, unknown>;
|
|
12
|
+
/** @internal */
|
|
13
|
+
export type OpenResponsesFunctionShellTool$Outbound = {
|
|
14
|
+
type: "shell";
|
|
15
|
+
};
|
|
16
|
+
/** @internal */
|
|
17
|
+
export declare const OpenResponsesFunctionShellTool$outboundSchema: z.ZodType<OpenResponsesFunctionShellTool$Outbound, OpenResponsesFunctionShellTool>;
|
|
18
|
+
export declare function openResponsesFunctionShellToolToJSON(openResponsesFunctionShellTool: OpenResponsesFunctionShellTool): string;
|
|
19
|
+
export declare function openResponsesFunctionShellToolFromJSON(jsonString: string): SafeParseResult<OpenResponsesFunctionShellTool, SDKValidationError>;
|
|
20
|
+
//# sourceMappingURL=openresponsesfunctionshelltool.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: d23282e24d97
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
/** @internal */
|
|
8
|
+
export const OpenResponsesFunctionShellTool$inboundSchema = z.object({
|
|
9
|
+
type: z.literal("shell"),
|
|
10
|
+
});
|
|
11
|
+
/** @internal */
|
|
12
|
+
export const OpenResponsesFunctionShellTool$outboundSchema = z.object({
|
|
13
|
+
type: z.literal("shell"),
|
|
14
|
+
});
|
|
15
|
+
export function openResponsesFunctionShellToolToJSON(openResponsesFunctionShellTool) {
|
|
16
|
+
return JSON.stringify(OpenResponsesFunctionShellTool$outboundSchema.parse(openResponsesFunctionShellTool));
|
|
17
|
+
}
|
|
18
|
+
export function openResponsesFunctionShellToolFromJSON(jsonString) {
|
|
19
|
+
return safeParse(jsonString, (x) => OpenResponsesFunctionShellTool$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OpenResponsesFunctionShellTool' from JSON`);
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=openresponsesfunctionshelltool.js.map
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { OpenEnum } from "../types/enums.js";
|
|
3
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
|
+
export declare const Background: {
|
|
6
|
+
readonly Transparent: "transparent";
|
|
7
|
+
readonly Opaque: "opaque";
|
|
8
|
+
readonly Auto: "auto";
|
|
9
|
+
};
|
|
10
|
+
export type Background = OpenEnum<typeof Background>;
|
|
11
|
+
export declare const InputFidelity: {
|
|
12
|
+
readonly High: "high";
|
|
13
|
+
readonly Low: "low";
|
|
14
|
+
};
|
|
15
|
+
export type InputFidelity = OpenEnum<typeof InputFidelity>;
|
|
16
|
+
export type InputImageMask = {
|
|
17
|
+
imageUrl?: string | undefined;
|
|
18
|
+
fileId?: string | undefined;
|
|
19
|
+
};
|
|
20
|
+
export declare const ModelEnum: {
|
|
21
|
+
readonly GptImage1: "gpt-image-1";
|
|
22
|
+
readonly GptImage1Mini: "gpt-image-1-mini";
|
|
23
|
+
};
|
|
24
|
+
export type ModelEnum = OpenEnum<typeof ModelEnum>;
|
|
25
|
+
export declare const Moderation: {
|
|
26
|
+
readonly Auto: "auto";
|
|
27
|
+
readonly Low: "low";
|
|
28
|
+
};
|
|
29
|
+
export type Moderation = OpenEnum<typeof Moderation>;
|
|
30
|
+
export declare const OutputFormat: {
|
|
31
|
+
readonly Png: "png";
|
|
32
|
+
readonly Webp: "webp";
|
|
33
|
+
readonly Jpeg: "jpeg";
|
|
34
|
+
};
|
|
35
|
+
export type OutputFormat = OpenEnum<typeof OutputFormat>;
|
|
36
|
+
export declare const Quality: {
|
|
37
|
+
readonly Low: "low";
|
|
38
|
+
readonly Medium: "medium";
|
|
39
|
+
readonly High: "high";
|
|
40
|
+
readonly Auto: "auto";
|
|
41
|
+
};
|
|
42
|
+
export type Quality = OpenEnum<typeof Quality>;
|
|
43
|
+
export declare const Size: {
|
|
44
|
+
readonly OneThousandAndTwentyFourx1024: "1024x1024";
|
|
45
|
+
readonly OneThousandAndTwentyFourx1536: "1024x1536";
|
|
46
|
+
readonly OneThousandFiveHundredAndThirtySixx1024: "1536x1024";
|
|
47
|
+
readonly Auto: "auto";
|
|
48
|
+
};
|
|
49
|
+
export type Size = OpenEnum<typeof Size>;
|
|
50
|
+
/**
|
|
51
|
+
* Image generation tool configuration
|
|
52
|
+
*/
|
|
53
|
+
export type OpenResponsesImageGenerationTool = {
|
|
54
|
+
type: "image_generation";
|
|
55
|
+
background?: Background | undefined;
|
|
56
|
+
inputFidelity?: InputFidelity | null | undefined;
|
|
57
|
+
inputImageMask?: InputImageMask | undefined;
|
|
58
|
+
model?: ModelEnum | undefined;
|
|
59
|
+
moderation?: Moderation | undefined;
|
|
60
|
+
outputCompression?: number | undefined;
|
|
61
|
+
outputFormat?: OutputFormat | undefined;
|
|
62
|
+
partialImages?: number | undefined;
|
|
63
|
+
quality?: Quality | undefined;
|
|
64
|
+
size?: Size | undefined;
|
|
65
|
+
};
|
|
66
|
+
/** @internal */
|
|
67
|
+
export declare const Background$inboundSchema: z.ZodType<Background, unknown>;
|
|
68
|
+
/** @internal */
|
|
69
|
+
export declare const Background$outboundSchema: z.ZodType<string, Background>;
|
|
70
|
+
/** @internal */
|
|
71
|
+
export declare const InputFidelity$inboundSchema: z.ZodType<InputFidelity, unknown>;
|
|
72
|
+
/** @internal */
|
|
73
|
+
export declare const InputFidelity$outboundSchema: z.ZodType<string, InputFidelity>;
|
|
74
|
+
/** @internal */
|
|
75
|
+
export declare const InputImageMask$inboundSchema: z.ZodType<InputImageMask, unknown>;
|
|
76
|
+
/** @internal */
|
|
77
|
+
export type InputImageMask$Outbound = {
|
|
78
|
+
image_url?: string | undefined;
|
|
79
|
+
file_id?: string | undefined;
|
|
80
|
+
};
|
|
81
|
+
/** @internal */
|
|
82
|
+
export declare const InputImageMask$outboundSchema: z.ZodType<InputImageMask$Outbound, InputImageMask>;
|
|
83
|
+
export declare function inputImageMaskToJSON(inputImageMask: InputImageMask): string;
|
|
84
|
+
export declare function inputImageMaskFromJSON(jsonString: string): SafeParseResult<InputImageMask, SDKValidationError>;
|
|
85
|
+
/** @internal */
|
|
86
|
+
export declare const ModelEnum$inboundSchema: z.ZodType<ModelEnum, unknown>;
|
|
87
|
+
/** @internal */
|
|
88
|
+
export declare const ModelEnum$outboundSchema: z.ZodType<string, ModelEnum>;
|
|
89
|
+
/** @internal */
|
|
90
|
+
export declare const Moderation$inboundSchema: z.ZodType<Moderation, unknown>;
|
|
91
|
+
/** @internal */
|
|
92
|
+
export declare const Moderation$outboundSchema: z.ZodType<string, Moderation>;
|
|
93
|
+
/** @internal */
|
|
94
|
+
export declare const OutputFormat$inboundSchema: z.ZodType<OutputFormat, unknown>;
|
|
95
|
+
/** @internal */
|
|
96
|
+
export declare const OutputFormat$outboundSchema: z.ZodType<string, OutputFormat>;
|
|
97
|
+
/** @internal */
|
|
98
|
+
export declare const Quality$inboundSchema: z.ZodType<Quality, unknown>;
|
|
99
|
+
/** @internal */
|
|
100
|
+
export declare const Quality$outboundSchema: z.ZodType<string, Quality>;
|
|
101
|
+
/** @internal */
|
|
102
|
+
export declare const Size$inboundSchema: z.ZodType<Size, unknown>;
|
|
103
|
+
/** @internal */
|
|
104
|
+
export declare const Size$outboundSchema: z.ZodType<string, Size>;
|
|
105
|
+
/** @internal */
|
|
106
|
+
export declare const OpenResponsesImageGenerationTool$inboundSchema: z.ZodType<OpenResponsesImageGenerationTool, unknown>;
|
|
107
|
+
/** @internal */
|
|
108
|
+
export type OpenResponsesImageGenerationTool$Outbound = {
|
|
109
|
+
type: "image_generation";
|
|
110
|
+
background?: string | undefined;
|
|
111
|
+
input_fidelity?: string | null | undefined;
|
|
112
|
+
input_image_mask?: InputImageMask$Outbound | undefined;
|
|
113
|
+
model?: string | undefined;
|
|
114
|
+
moderation?: string | undefined;
|
|
115
|
+
output_compression?: number | undefined;
|
|
116
|
+
output_format?: string | undefined;
|
|
117
|
+
partial_images?: number | undefined;
|
|
118
|
+
quality?: string | undefined;
|
|
119
|
+
size?: string | undefined;
|
|
120
|
+
};
|
|
121
|
+
/** @internal */
|
|
122
|
+
export declare const OpenResponsesImageGenerationTool$outboundSchema: z.ZodType<OpenResponsesImageGenerationTool$Outbound, OpenResponsesImageGenerationTool>;
|
|
123
|
+
export declare function openResponsesImageGenerationToolToJSON(openResponsesImageGenerationTool: OpenResponsesImageGenerationTool): string;
|
|
124
|
+
export declare function openResponsesImageGenerationToolFromJSON(jsonString: string): SafeParseResult<OpenResponsesImageGenerationTool, SDKValidationError>;
|
|
125
|
+
//# sourceMappingURL=openresponsesimagegenerationtool.d.ts.map
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 149a19208595
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../lib/schemas.js";
|
|
8
|
+
import * as openEnums from "../types/enums.js";
|
|
9
|
+
export const Background = {
|
|
10
|
+
Transparent: "transparent",
|
|
11
|
+
Opaque: "opaque",
|
|
12
|
+
Auto: "auto",
|
|
13
|
+
};
|
|
14
|
+
export const InputFidelity = {
|
|
15
|
+
High: "high",
|
|
16
|
+
Low: "low",
|
|
17
|
+
};
|
|
18
|
+
export const ModelEnum = {
|
|
19
|
+
GptImage1: "gpt-image-1",
|
|
20
|
+
GptImage1Mini: "gpt-image-1-mini",
|
|
21
|
+
};
|
|
22
|
+
export const Moderation = {
|
|
23
|
+
Auto: "auto",
|
|
24
|
+
Low: "low",
|
|
25
|
+
};
|
|
26
|
+
export const OutputFormat = {
|
|
27
|
+
Png: "png",
|
|
28
|
+
Webp: "webp",
|
|
29
|
+
Jpeg: "jpeg",
|
|
30
|
+
};
|
|
31
|
+
export const Quality = {
|
|
32
|
+
Low: "low",
|
|
33
|
+
Medium: "medium",
|
|
34
|
+
High: "high",
|
|
35
|
+
Auto: "auto",
|
|
36
|
+
};
|
|
37
|
+
export const Size = {
|
|
38
|
+
OneThousandAndTwentyFourx1024: "1024x1024",
|
|
39
|
+
OneThousandAndTwentyFourx1536: "1024x1536",
|
|
40
|
+
OneThousandFiveHundredAndThirtySixx1024: "1536x1024",
|
|
41
|
+
Auto: "auto",
|
|
42
|
+
};
|
|
43
|
+
/** @internal */
|
|
44
|
+
export const Background$inboundSchema = openEnums.inboundSchema(Background);
|
|
45
|
+
/** @internal */
|
|
46
|
+
export const Background$outboundSchema = openEnums.outboundSchema(Background);
|
|
47
|
+
/** @internal */
|
|
48
|
+
export const InputFidelity$inboundSchema = openEnums.inboundSchema(InputFidelity);
|
|
49
|
+
/** @internal */
|
|
50
|
+
export const InputFidelity$outboundSchema = openEnums.outboundSchema(InputFidelity);
|
|
51
|
+
/** @internal */
|
|
52
|
+
export const InputImageMask$inboundSchema = z.object({
|
|
53
|
+
image_url: z.string().optional(),
|
|
54
|
+
file_id: z.string().optional(),
|
|
55
|
+
}).transform((v) => {
|
|
56
|
+
return remap$(v, {
|
|
57
|
+
"image_url": "imageUrl",
|
|
58
|
+
"file_id": "fileId",
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
/** @internal */
|
|
62
|
+
export const InputImageMask$outboundSchema = z.object({
|
|
63
|
+
imageUrl: z.string().optional(),
|
|
64
|
+
fileId: z.string().optional(),
|
|
65
|
+
}).transform((v) => {
|
|
66
|
+
return remap$(v, {
|
|
67
|
+
imageUrl: "image_url",
|
|
68
|
+
fileId: "file_id",
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
export function inputImageMaskToJSON(inputImageMask) {
|
|
72
|
+
return JSON.stringify(InputImageMask$outboundSchema.parse(inputImageMask));
|
|
73
|
+
}
|
|
74
|
+
export function inputImageMaskFromJSON(jsonString) {
|
|
75
|
+
return safeParse(jsonString, (x) => InputImageMask$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'InputImageMask' from JSON`);
|
|
76
|
+
}
|
|
77
|
+
/** @internal */
|
|
78
|
+
export const ModelEnum$inboundSchema = openEnums
|
|
79
|
+
.inboundSchema(ModelEnum);
|
|
80
|
+
/** @internal */
|
|
81
|
+
export const ModelEnum$outboundSchema = openEnums
|
|
82
|
+
.outboundSchema(ModelEnum);
|
|
83
|
+
/** @internal */
|
|
84
|
+
export const Moderation$inboundSchema = openEnums.inboundSchema(Moderation);
|
|
85
|
+
/** @internal */
|
|
86
|
+
export const Moderation$outboundSchema = openEnums.outboundSchema(Moderation);
|
|
87
|
+
/** @internal */
|
|
88
|
+
export const OutputFormat$inboundSchema = openEnums.inboundSchema(OutputFormat);
|
|
89
|
+
/** @internal */
|
|
90
|
+
export const OutputFormat$outboundSchema = openEnums.outboundSchema(OutputFormat);
|
|
91
|
+
/** @internal */
|
|
92
|
+
export const Quality$inboundSchema = openEnums
|
|
93
|
+
.inboundSchema(Quality);
|
|
94
|
+
/** @internal */
|
|
95
|
+
export const Quality$outboundSchema = openEnums
|
|
96
|
+
.outboundSchema(Quality);
|
|
97
|
+
/** @internal */
|
|
98
|
+
export const Size$inboundSchema = openEnums
|
|
99
|
+
.inboundSchema(Size);
|
|
100
|
+
/** @internal */
|
|
101
|
+
export const Size$outboundSchema = openEnums
|
|
102
|
+
.outboundSchema(Size);
|
|
103
|
+
/** @internal */
|
|
104
|
+
export const OpenResponsesImageGenerationTool$inboundSchema = z.object({
|
|
105
|
+
type: z.literal("image_generation"),
|
|
106
|
+
background: Background$inboundSchema.optional(),
|
|
107
|
+
input_fidelity: z.nullable(InputFidelity$inboundSchema).optional(),
|
|
108
|
+
input_image_mask: z.lazy(() => InputImageMask$inboundSchema).optional(),
|
|
109
|
+
model: ModelEnum$inboundSchema.optional(),
|
|
110
|
+
moderation: Moderation$inboundSchema.optional(),
|
|
111
|
+
output_compression: z.number().optional(),
|
|
112
|
+
output_format: OutputFormat$inboundSchema.optional(),
|
|
113
|
+
partial_images: z.number().optional(),
|
|
114
|
+
quality: Quality$inboundSchema.optional(),
|
|
115
|
+
size: Size$inboundSchema.optional(),
|
|
116
|
+
}).transform((v) => {
|
|
117
|
+
return remap$(v, {
|
|
118
|
+
"input_fidelity": "inputFidelity",
|
|
119
|
+
"input_image_mask": "inputImageMask",
|
|
120
|
+
"output_compression": "outputCompression",
|
|
121
|
+
"output_format": "outputFormat",
|
|
122
|
+
"partial_images": "partialImages",
|
|
123
|
+
});
|
|
124
|
+
});
|
|
125
|
+
/** @internal */
|
|
126
|
+
export const OpenResponsesImageGenerationTool$outboundSchema = z.object({
|
|
127
|
+
type: z.literal("image_generation"),
|
|
128
|
+
background: Background$outboundSchema.optional(),
|
|
129
|
+
inputFidelity: z.nullable(InputFidelity$outboundSchema).optional(),
|
|
130
|
+
inputImageMask: z.lazy(() => InputImageMask$outboundSchema).optional(),
|
|
131
|
+
model: ModelEnum$outboundSchema.optional(),
|
|
132
|
+
moderation: Moderation$outboundSchema.optional(),
|
|
133
|
+
outputCompression: z.number().optional(),
|
|
134
|
+
outputFormat: OutputFormat$outboundSchema.optional(),
|
|
135
|
+
partialImages: z.number().optional(),
|
|
136
|
+
quality: Quality$outboundSchema.optional(),
|
|
137
|
+
size: Size$outboundSchema.optional(),
|
|
138
|
+
}).transform((v) => {
|
|
139
|
+
return remap$(v, {
|
|
140
|
+
inputFidelity: "input_fidelity",
|
|
141
|
+
inputImageMask: "input_image_mask",
|
|
142
|
+
outputCompression: "output_compression",
|
|
143
|
+
outputFormat: "output_format",
|
|
144
|
+
partialImages: "partial_images",
|
|
145
|
+
});
|
|
146
|
+
});
|
|
147
|
+
export function openResponsesImageGenerationToolToJSON(openResponsesImageGenerationTool) {
|
|
148
|
+
return JSON.stringify(OpenResponsesImageGenerationTool$outboundSchema.parse(openResponsesImageGenerationTool));
|
|
149
|
+
}
|
|
150
|
+
export function openResponsesImageGenerationToolFromJSON(jsonString) {
|
|
151
|
+
return safeParse(jsonString, (x) => OpenResponsesImageGenerationTool$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OpenResponsesImageGenerationTool' from JSON`);
|
|
152
|
+
}
|
|
153
|
+
//# sourceMappingURL=openresponsesimagegenerationtool.js.map
|
|
@@ -40,7 +40,7 @@ export type OpenResponsesInputMessageItem = {
|
|
|
40
40
|
id?: string | undefined;
|
|
41
41
|
type?: OpenResponsesInputMessageItemTypeMessage | undefined;
|
|
42
42
|
role: OpenResponsesInputMessageItemRoleUser | OpenResponsesInputMessageItemRoleSystem | OpenResponsesInputMessageItemRoleDeveloper;
|
|
43
|
-
content
|
|
43
|
+
content?: Array<ResponseInputText | OpenResponsesInputMessageItemContentInputImage | ResponseInputFile | ResponseInputAudio | ResponseInputVideo> | null | undefined;
|
|
44
44
|
};
|
|
45
45
|
/** @internal */
|
|
46
46
|
export declare const OpenResponsesInputMessageItemTypeMessage$outboundSchema: z.ZodEnum<typeof OpenResponsesInputMessageItemTypeMessage>;
|
|
@@ -76,7 +76,7 @@ export type OpenResponsesInputMessageItem$Outbound = {
|
|
|
76
76
|
id?: string | undefined;
|
|
77
77
|
type?: string | undefined;
|
|
78
78
|
role: string | string | string;
|
|
79
|
-
content
|
|
79
|
+
content?: Array<ResponseInputText$Outbound | OpenResponsesInputMessageItemContentInputImage$Outbound | ResponseInputFile$Outbound | ResponseInputAudio$Outbound | ResponseInputVideo$Outbound> | null | undefined;
|
|
80
80
|
};
|
|
81
81
|
/** @internal */
|
|
82
82
|
export declare const OpenResponsesInputMessageItem$outboundSchema: z.ZodType<OpenResponsesInputMessageItem$Outbound, OpenResponsesInputMessageItem>;
|