@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
|
@@ -1,8 +1,25 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
|
+
import { OpenEnum } from "../types/enums.js";
|
|
2
3
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
4
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
5
|
import { ResponsesSearchContextSize } from "./responsessearchcontextsize.js";
|
|
5
6
|
import { WebSearchPreviewToolUserLocation, WebSearchPreviewToolUserLocation$Outbound } from "./websearchpreviewtooluserlocation.js";
|
|
7
|
+
/**
|
|
8
|
+
* Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search. "exa" forces the Exa search API.
|
|
9
|
+
*/
|
|
10
|
+
export declare const OpenResponsesWebSearchPreviewToolEngine: {
|
|
11
|
+
readonly Auto: "auto";
|
|
12
|
+
readonly Native: "native";
|
|
13
|
+
readonly Exa: "exa";
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search. "exa" forces the Exa search API.
|
|
17
|
+
*/
|
|
18
|
+
export type OpenResponsesWebSearchPreviewToolEngine = OpenEnum<typeof OpenResponsesWebSearchPreviewToolEngine>;
|
|
19
|
+
export type OpenResponsesWebSearchPreviewToolFilters = {
|
|
20
|
+
allowedDomains?: Array<string> | null | undefined;
|
|
21
|
+
excludedDomains?: Array<string> | null | undefined;
|
|
22
|
+
};
|
|
6
23
|
/**
|
|
7
24
|
* Web search preview tool configuration
|
|
8
25
|
*/
|
|
@@ -13,14 +30,41 @@ export type OpenResponsesWebSearchPreviewTool = {
|
|
|
13
30
|
*/
|
|
14
31
|
searchContextSize?: ResponsesSearchContextSize | undefined;
|
|
15
32
|
userLocation?: WebSearchPreviewToolUserLocation | null | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search. "exa" forces the Exa search API.
|
|
35
|
+
*/
|
|
36
|
+
engine?: OpenResponsesWebSearchPreviewToolEngine | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* Maximum number of search results to return per search call. Defaults to 5.
|
|
39
|
+
*/
|
|
40
|
+
maxResults?: number | undefined;
|
|
41
|
+
filters?: OpenResponsesWebSearchPreviewToolFilters | null | undefined;
|
|
42
|
+
};
|
|
43
|
+
/** @internal */
|
|
44
|
+
export declare const OpenResponsesWebSearchPreviewToolEngine$inboundSchema: z.ZodType<OpenResponsesWebSearchPreviewToolEngine, unknown>;
|
|
45
|
+
/** @internal */
|
|
46
|
+
export declare const OpenResponsesWebSearchPreviewToolEngine$outboundSchema: z.ZodType<string, OpenResponsesWebSearchPreviewToolEngine>;
|
|
47
|
+
/** @internal */
|
|
48
|
+
export declare const OpenResponsesWebSearchPreviewToolFilters$inboundSchema: z.ZodType<OpenResponsesWebSearchPreviewToolFilters, unknown>;
|
|
49
|
+
/** @internal */
|
|
50
|
+
export type OpenResponsesWebSearchPreviewToolFilters$Outbound = {
|
|
51
|
+
allowed_domains?: Array<string> | null | undefined;
|
|
52
|
+
excluded_domains?: Array<string> | null | undefined;
|
|
16
53
|
};
|
|
17
54
|
/** @internal */
|
|
55
|
+
export declare const OpenResponsesWebSearchPreviewToolFilters$outboundSchema: z.ZodType<OpenResponsesWebSearchPreviewToolFilters$Outbound, OpenResponsesWebSearchPreviewToolFilters>;
|
|
56
|
+
export declare function openResponsesWebSearchPreviewToolFiltersToJSON(openResponsesWebSearchPreviewToolFilters: OpenResponsesWebSearchPreviewToolFilters): string;
|
|
57
|
+
export declare function openResponsesWebSearchPreviewToolFiltersFromJSON(jsonString: string): SafeParseResult<OpenResponsesWebSearchPreviewToolFilters, SDKValidationError>;
|
|
58
|
+
/** @internal */
|
|
18
59
|
export declare const OpenResponsesWebSearchPreviewTool$inboundSchema: z.ZodType<OpenResponsesWebSearchPreviewTool, unknown>;
|
|
19
60
|
/** @internal */
|
|
20
61
|
export type OpenResponsesWebSearchPreviewTool$Outbound = {
|
|
21
62
|
type: "web_search_preview";
|
|
22
63
|
search_context_size?: string | undefined;
|
|
23
64
|
user_location?: WebSearchPreviewToolUserLocation$Outbound | null | undefined;
|
|
65
|
+
engine?: string | undefined;
|
|
66
|
+
max_results?: number | undefined;
|
|
67
|
+
filters?: OpenResponsesWebSearchPreviewToolFilters$Outbound | null | undefined;
|
|
24
68
|
};
|
|
25
69
|
/** @internal */
|
|
26
70
|
export declare const OpenResponsesWebSearchPreviewTool$outboundSchema: z.ZodType<OpenResponsesWebSearchPreviewTool$Outbound, OpenResponsesWebSearchPreviewTool>;
|
|
@@ -5,18 +5,61 @@
|
|
|
5
5
|
import * as z from "zod/v4";
|
|
6
6
|
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
7
|
import { safeParse } from "../lib/schemas.js";
|
|
8
|
+
import * as openEnums from "../types/enums.js";
|
|
8
9
|
import { ResponsesSearchContextSize$inboundSchema, ResponsesSearchContextSize$outboundSchema, } from "./responsessearchcontextsize.js";
|
|
9
10
|
import { WebSearchPreviewToolUserLocation$inboundSchema, WebSearchPreviewToolUserLocation$outboundSchema, } from "./websearchpreviewtooluserlocation.js";
|
|
11
|
+
/**
|
|
12
|
+
* Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search. "exa" forces the Exa search API.
|
|
13
|
+
*/
|
|
14
|
+
export const OpenResponsesWebSearchPreviewToolEngine = {
|
|
15
|
+
Auto: "auto",
|
|
16
|
+
Native: "native",
|
|
17
|
+
Exa: "exa",
|
|
18
|
+
};
|
|
19
|
+
/** @internal */
|
|
20
|
+
export const OpenResponsesWebSearchPreviewToolEngine$inboundSchema = openEnums.inboundSchema(OpenResponsesWebSearchPreviewToolEngine);
|
|
21
|
+
/** @internal */
|
|
22
|
+
export const OpenResponsesWebSearchPreviewToolEngine$outboundSchema = openEnums.outboundSchema(OpenResponsesWebSearchPreviewToolEngine);
|
|
23
|
+
/** @internal */
|
|
24
|
+
export const OpenResponsesWebSearchPreviewToolFilters$inboundSchema = z.object({
|
|
25
|
+
allowed_domains: z.nullable(z.array(z.string())).optional(),
|
|
26
|
+
excluded_domains: z.nullable(z.array(z.string())).optional(),
|
|
27
|
+
}).transform((v) => {
|
|
28
|
+
return remap$(v, {
|
|
29
|
+
"allowed_domains": "allowedDomains",
|
|
30
|
+
"excluded_domains": "excludedDomains",
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
/** @internal */
|
|
34
|
+
export const OpenResponsesWebSearchPreviewToolFilters$outboundSchema = z.object({
|
|
35
|
+
allowedDomains: z.nullable(z.array(z.string())).optional(),
|
|
36
|
+
excludedDomains: z.nullable(z.array(z.string())).optional(),
|
|
37
|
+
}).transform((v) => {
|
|
38
|
+
return remap$(v, {
|
|
39
|
+
allowedDomains: "allowed_domains",
|
|
40
|
+
excludedDomains: "excluded_domains",
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
export function openResponsesWebSearchPreviewToolFiltersToJSON(openResponsesWebSearchPreviewToolFilters) {
|
|
44
|
+
return JSON.stringify(OpenResponsesWebSearchPreviewToolFilters$outboundSchema.parse(openResponsesWebSearchPreviewToolFilters));
|
|
45
|
+
}
|
|
46
|
+
export function openResponsesWebSearchPreviewToolFiltersFromJSON(jsonString) {
|
|
47
|
+
return safeParse(jsonString, (x) => OpenResponsesWebSearchPreviewToolFilters$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OpenResponsesWebSearchPreviewToolFilters' from JSON`);
|
|
48
|
+
}
|
|
10
49
|
/** @internal */
|
|
11
50
|
export const OpenResponsesWebSearchPreviewTool$inboundSchema = z.object({
|
|
12
51
|
type: z.literal("web_search_preview"),
|
|
13
52
|
search_context_size: ResponsesSearchContextSize$inboundSchema.optional(),
|
|
14
53
|
user_location: z.nullable(WebSearchPreviewToolUserLocation$inboundSchema)
|
|
15
54
|
.optional(),
|
|
55
|
+
engine: OpenResponsesWebSearchPreviewToolEngine$inboundSchema.optional(),
|
|
56
|
+
max_results: z.number().optional(),
|
|
57
|
+
filters: z.nullable(z.lazy(() => OpenResponsesWebSearchPreviewToolFilters$inboundSchema)).optional(),
|
|
16
58
|
}).transform((v) => {
|
|
17
59
|
return remap$(v, {
|
|
18
60
|
"search_context_size": "searchContextSize",
|
|
19
61
|
"user_location": "userLocation",
|
|
62
|
+
"max_results": "maxResults",
|
|
20
63
|
});
|
|
21
64
|
});
|
|
22
65
|
/** @internal */
|
|
@@ -25,10 +68,14 @@ export const OpenResponsesWebSearchPreviewTool$outboundSchema = z.object({
|
|
|
25
68
|
searchContextSize: ResponsesSearchContextSize$outboundSchema.optional(),
|
|
26
69
|
userLocation: z.nullable(WebSearchPreviewToolUserLocation$outboundSchema)
|
|
27
70
|
.optional(),
|
|
71
|
+
engine: OpenResponsesWebSearchPreviewToolEngine$outboundSchema.optional(),
|
|
72
|
+
maxResults: z.number().optional(),
|
|
73
|
+
filters: z.nullable(z.lazy(() => OpenResponsesWebSearchPreviewToolFilters$outboundSchema)).optional(),
|
|
28
74
|
}).transform((v) => {
|
|
29
75
|
return remap$(v, {
|
|
30
76
|
searchContextSize: "search_context_size",
|
|
31
77
|
userLocation: "user_location",
|
|
78
|
+
maxResults: "max_results",
|
|
32
79
|
});
|
|
33
80
|
});
|
|
34
81
|
export function openResponsesWebSearchPreviewToolToJSON(openResponsesWebSearchPreviewTool) {
|
|
@@ -1,11 +1,25 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
|
+
import { OpenEnum } from "../types/enums.js";
|
|
2
3
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
4
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
5
|
import { ResponsesSearchContextSize } from "./responsessearchcontextsize.js";
|
|
5
6
|
import { ResponsesWebSearchUserLocation, ResponsesWebSearchUserLocation$Outbound } from "./responseswebsearchuserlocation.js";
|
|
6
7
|
export type OpenResponsesWebSearchToolFilters = {
|
|
7
8
|
allowedDomains?: Array<string> | null | undefined;
|
|
9
|
+
excludedDomains?: Array<string> | null | undefined;
|
|
8
10
|
};
|
|
11
|
+
/**
|
|
12
|
+
* Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search. "exa" forces the Exa search API.
|
|
13
|
+
*/
|
|
14
|
+
export declare const OpenResponsesWebSearchToolEngine: {
|
|
15
|
+
readonly Auto: "auto";
|
|
16
|
+
readonly Native: "native";
|
|
17
|
+
readonly Exa: "exa";
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search. "exa" forces the Exa search API.
|
|
21
|
+
*/
|
|
22
|
+
export type OpenResponsesWebSearchToolEngine = OpenEnum<typeof OpenResponsesWebSearchToolEngine>;
|
|
9
23
|
/**
|
|
10
24
|
* Web search tool configuration
|
|
11
25
|
*/
|
|
@@ -20,18 +34,31 @@ export type OpenResponsesWebSearchTool = {
|
|
|
20
34
|
* User location information for web search
|
|
21
35
|
*/
|
|
22
36
|
userLocation?: ResponsesWebSearchUserLocation | null | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search. "exa" forces the Exa search API.
|
|
39
|
+
*/
|
|
40
|
+
engine?: OpenResponsesWebSearchToolEngine | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* Maximum number of search results to return per search call. Defaults to 5.
|
|
43
|
+
*/
|
|
44
|
+
maxResults?: number | undefined;
|
|
23
45
|
};
|
|
24
46
|
/** @internal */
|
|
25
47
|
export declare const OpenResponsesWebSearchToolFilters$inboundSchema: z.ZodType<OpenResponsesWebSearchToolFilters, unknown>;
|
|
26
48
|
/** @internal */
|
|
27
49
|
export type OpenResponsesWebSearchToolFilters$Outbound = {
|
|
28
50
|
allowed_domains?: Array<string> | null | undefined;
|
|
51
|
+
excluded_domains?: Array<string> | null | undefined;
|
|
29
52
|
};
|
|
30
53
|
/** @internal */
|
|
31
54
|
export declare const OpenResponsesWebSearchToolFilters$outboundSchema: z.ZodType<OpenResponsesWebSearchToolFilters$Outbound, OpenResponsesWebSearchToolFilters>;
|
|
32
55
|
export declare function openResponsesWebSearchToolFiltersToJSON(openResponsesWebSearchToolFilters: OpenResponsesWebSearchToolFilters): string;
|
|
33
56
|
export declare function openResponsesWebSearchToolFiltersFromJSON(jsonString: string): SafeParseResult<OpenResponsesWebSearchToolFilters, SDKValidationError>;
|
|
34
57
|
/** @internal */
|
|
58
|
+
export declare const OpenResponsesWebSearchToolEngine$inboundSchema: z.ZodType<OpenResponsesWebSearchToolEngine, unknown>;
|
|
59
|
+
/** @internal */
|
|
60
|
+
export declare const OpenResponsesWebSearchToolEngine$outboundSchema: z.ZodType<string, OpenResponsesWebSearchToolEngine>;
|
|
61
|
+
/** @internal */
|
|
35
62
|
export declare const OpenResponsesWebSearchTool$inboundSchema: z.ZodType<OpenResponsesWebSearchTool, unknown>;
|
|
36
63
|
/** @internal */
|
|
37
64
|
export type OpenResponsesWebSearchTool$Outbound = {
|
|
@@ -39,6 +66,8 @@ export type OpenResponsesWebSearchTool$Outbound = {
|
|
|
39
66
|
filters?: OpenResponsesWebSearchToolFilters$Outbound | null | undefined;
|
|
40
67
|
search_context_size?: string | undefined;
|
|
41
68
|
user_location?: ResponsesWebSearchUserLocation$Outbound | null | undefined;
|
|
69
|
+
engine?: string | undefined;
|
|
70
|
+
max_results?: number | undefined;
|
|
42
71
|
};
|
|
43
72
|
/** @internal */
|
|
44
73
|
export declare const OpenResponsesWebSearchTool$outboundSchema: z.ZodType<OpenResponsesWebSearchTool$Outbound, OpenResponsesWebSearchTool>;
|
|
@@ -5,22 +5,35 @@
|
|
|
5
5
|
import * as z from "zod/v4";
|
|
6
6
|
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
7
|
import { safeParse } from "../lib/schemas.js";
|
|
8
|
+
import * as openEnums from "../types/enums.js";
|
|
8
9
|
import { ResponsesSearchContextSize$inboundSchema, ResponsesSearchContextSize$outboundSchema, } from "./responsessearchcontextsize.js";
|
|
9
10
|
import { ResponsesWebSearchUserLocation$inboundSchema, ResponsesWebSearchUserLocation$outboundSchema, } from "./responseswebsearchuserlocation.js";
|
|
11
|
+
/**
|
|
12
|
+
* Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search. "exa" forces the Exa search API.
|
|
13
|
+
*/
|
|
14
|
+
export const OpenResponsesWebSearchToolEngine = {
|
|
15
|
+
Auto: "auto",
|
|
16
|
+
Native: "native",
|
|
17
|
+
Exa: "exa",
|
|
18
|
+
};
|
|
10
19
|
/** @internal */
|
|
11
20
|
export const OpenResponsesWebSearchToolFilters$inboundSchema = z.object({
|
|
12
21
|
allowed_domains: z.nullable(z.array(z.string())).optional(),
|
|
22
|
+
excluded_domains: z.nullable(z.array(z.string())).optional(),
|
|
13
23
|
}).transform((v) => {
|
|
14
24
|
return remap$(v, {
|
|
15
25
|
"allowed_domains": "allowedDomains",
|
|
26
|
+
"excluded_domains": "excludedDomains",
|
|
16
27
|
});
|
|
17
28
|
});
|
|
18
29
|
/** @internal */
|
|
19
30
|
export const OpenResponsesWebSearchToolFilters$outboundSchema = z.object({
|
|
20
31
|
allowedDomains: z.nullable(z.array(z.string())).optional(),
|
|
32
|
+
excludedDomains: z.nullable(z.array(z.string())).optional(),
|
|
21
33
|
}).transform((v) => {
|
|
22
34
|
return remap$(v, {
|
|
23
35
|
allowedDomains: "allowed_domains",
|
|
36
|
+
excludedDomains: "excluded_domains",
|
|
24
37
|
});
|
|
25
38
|
});
|
|
26
39
|
export function openResponsesWebSearchToolFiltersToJSON(openResponsesWebSearchToolFilters) {
|
|
@@ -30,16 +43,23 @@ export function openResponsesWebSearchToolFiltersFromJSON(jsonString) {
|
|
|
30
43
|
return safeParse(jsonString, (x) => OpenResponsesWebSearchToolFilters$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OpenResponsesWebSearchToolFilters' from JSON`);
|
|
31
44
|
}
|
|
32
45
|
/** @internal */
|
|
46
|
+
export const OpenResponsesWebSearchToolEngine$inboundSchema = openEnums.inboundSchema(OpenResponsesWebSearchToolEngine);
|
|
47
|
+
/** @internal */
|
|
48
|
+
export const OpenResponsesWebSearchToolEngine$outboundSchema = openEnums.outboundSchema(OpenResponsesWebSearchToolEngine);
|
|
49
|
+
/** @internal */
|
|
33
50
|
export const OpenResponsesWebSearchTool$inboundSchema = z.object({
|
|
34
51
|
type: z.literal("web_search"),
|
|
35
52
|
filters: z.nullable(z.lazy(() => OpenResponsesWebSearchToolFilters$inboundSchema)).optional(),
|
|
36
53
|
search_context_size: ResponsesSearchContextSize$inboundSchema.optional(),
|
|
37
54
|
user_location: z.nullable(ResponsesWebSearchUserLocation$inboundSchema)
|
|
38
55
|
.optional(),
|
|
56
|
+
engine: OpenResponsesWebSearchToolEngine$inboundSchema.optional(),
|
|
57
|
+
max_results: z.number().optional(),
|
|
39
58
|
}).transform((v) => {
|
|
40
59
|
return remap$(v, {
|
|
41
60
|
"search_context_size": "searchContextSize",
|
|
42
61
|
"user_location": "userLocation",
|
|
62
|
+
"max_results": "maxResults",
|
|
43
63
|
});
|
|
44
64
|
});
|
|
45
65
|
/** @internal */
|
|
@@ -49,10 +69,13 @@ export const OpenResponsesWebSearchTool$outboundSchema = z.object({
|
|
|
49
69
|
searchContextSize: ResponsesSearchContextSize$outboundSchema.optional(),
|
|
50
70
|
userLocation: z.nullable(ResponsesWebSearchUserLocation$outboundSchema)
|
|
51
71
|
.optional(),
|
|
72
|
+
engine: OpenResponsesWebSearchToolEngine$outboundSchema.optional(),
|
|
73
|
+
maxResults: z.number().optional(),
|
|
52
74
|
}).transform((v) => {
|
|
53
75
|
return remap$(v, {
|
|
54
76
|
searchContextSize: "search_context_size",
|
|
55
77
|
userLocation: "user_location",
|
|
78
|
+
maxResults: "max_results",
|
|
56
79
|
});
|
|
57
80
|
});
|
|
58
81
|
export function openResponsesWebSearchToolToJSON(openResponsesWebSearchTool) {
|
|
@@ -14,7 +14,13 @@ export type BulkAssignKeysToGuardrailGlobals = {
|
|
|
14
14
|
*
|
|
15
15
|
* @remarks
|
|
16
16
|
*/
|
|
17
|
-
|
|
17
|
+
appTitle?: string | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
|
|
20
|
+
*
|
|
21
|
+
* @remarks
|
|
22
|
+
*/
|
|
23
|
+
appCategories?: string | undefined;
|
|
18
24
|
};
|
|
19
25
|
export type BulkAssignKeysToGuardrailRequestBody = {
|
|
20
26
|
/**
|
|
@@ -35,7 +41,13 @@ export type BulkAssignKeysToGuardrailRequest = {
|
|
|
35
41
|
*
|
|
36
42
|
* @remarks
|
|
37
43
|
*/
|
|
38
|
-
|
|
44
|
+
appTitle?: string | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
|
|
47
|
+
*
|
|
48
|
+
* @remarks
|
|
49
|
+
*/
|
|
50
|
+
appCategories?: string | undefined;
|
|
39
51
|
/**
|
|
40
52
|
* The unique identifier of the guardrail
|
|
41
53
|
*/
|
|
@@ -61,7 +73,8 @@ export declare function bulkAssignKeysToGuardrailRequestBodyToJSON(bulkAssignKey
|
|
|
61
73
|
/** @internal */
|
|
62
74
|
export type BulkAssignKeysToGuardrailRequest$Outbound = {
|
|
63
75
|
"HTTP-Referer"?: string | undefined;
|
|
64
|
-
|
|
76
|
+
appTitle?: string | undefined;
|
|
77
|
+
appCategories?: string | undefined;
|
|
65
78
|
id: string;
|
|
66
79
|
RequestBody: BulkAssignKeysToGuardrailRequestBody$Outbound;
|
|
67
80
|
};
|
|
@@ -19,13 +19,13 @@ export function bulkAssignKeysToGuardrailRequestBodyToJSON(bulkAssignKeysToGuard
|
|
|
19
19
|
/** @internal */
|
|
20
20
|
export const BulkAssignKeysToGuardrailRequest$outboundSchema = z.object({
|
|
21
21
|
httpReferer: z.string().optional(),
|
|
22
|
-
|
|
22
|
+
appTitle: z.string().optional(),
|
|
23
|
+
appCategories: z.string().optional(),
|
|
23
24
|
id: z.string(),
|
|
24
25
|
requestBody: z.lazy(() => BulkAssignKeysToGuardrailRequestBody$outboundSchema),
|
|
25
26
|
}).transform((v) => {
|
|
26
27
|
return remap$(v, {
|
|
27
28
|
httpReferer: "HTTP-Referer",
|
|
28
|
-
xTitle: "X-Title",
|
|
29
29
|
requestBody: "RequestBody",
|
|
30
30
|
});
|
|
31
31
|
});
|
|
@@ -14,7 +14,13 @@ export type BulkAssignMembersToGuardrailGlobals = {
|
|
|
14
14
|
*
|
|
15
15
|
* @remarks
|
|
16
16
|
*/
|
|
17
|
-
|
|
17
|
+
appTitle?: string | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
|
|
20
|
+
*
|
|
21
|
+
* @remarks
|
|
22
|
+
*/
|
|
23
|
+
appCategories?: string | undefined;
|
|
18
24
|
};
|
|
19
25
|
export type BulkAssignMembersToGuardrailRequestBody = {
|
|
20
26
|
/**
|
|
@@ -35,7 +41,13 @@ export type BulkAssignMembersToGuardrailRequest = {
|
|
|
35
41
|
*
|
|
36
42
|
* @remarks
|
|
37
43
|
*/
|
|
38
|
-
|
|
44
|
+
appTitle?: string | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
|
|
47
|
+
*
|
|
48
|
+
* @remarks
|
|
49
|
+
*/
|
|
50
|
+
appCategories?: string | undefined;
|
|
39
51
|
/**
|
|
40
52
|
* The unique identifier of the guardrail
|
|
41
53
|
*/
|
|
@@ -61,7 +73,8 @@ export declare function bulkAssignMembersToGuardrailRequestBodyToJSON(bulkAssign
|
|
|
61
73
|
/** @internal */
|
|
62
74
|
export type BulkAssignMembersToGuardrailRequest$Outbound = {
|
|
63
75
|
"HTTP-Referer"?: string | undefined;
|
|
64
|
-
|
|
76
|
+
appTitle?: string | undefined;
|
|
77
|
+
appCategories?: string | undefined;
|
|
65
78
|
id: string;
|
|
66
79
|
RequestBody: BulkAssignMembersToGuardrailRequestBody$Outbound;
|
|
67
80
|
};
|
|
@@ -19,13 +19,13 @@ export function bulkAssignMembersToGuardrailRequestBodyToJSON(bulkAssignMembersT
|
|
|
19
19
|
/** @internal */
|
|
20
20
|
export const BulkAssignMembersToGuardrailRequest$outboundSchema = z.object({
|
|
21
21
|
httpReferer: z.string().optional(),
|
|
22
|
-
|
|
22
|
+
appTitle: z.string().optional(),
|
|
23
|
+
appCategories: z.string().optional(),
|
|
23
24
|
id: z.string(),
|
|
24
25
|
requestBody: z.lazy(() => BulkAssignMembersToGuardrailRequestBody$outboundSchema),
|
|
25
26
|
}).transform((v) => {
|
|
26
27
|
return remap$(v, {
|
|
27
28
|
httpReferer: "HTTP-Referer",
|
|
28
|
-
xTitle: "X-Title",
|
|
29
29
|
requestBody: "RequestBody",
|
|
30
30
|
});
|
|
31
31
|
});
|
|
@@ -14,7 +14,13 @@ export type BulkUnassignKeysFromGuardrailGlobals = {
|
|
|
14
14
|
*
|
|
15
15
|
* @remarks
|
|
16
16
|
*/
|
|
17
|
-
|
|
17
|
+
appTitle?: string | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
|
|
20
|
+
*
|
|
21
|
+
* @remarks
|
|
22
|
+
*/
|
|
23
|
+
appCategories?: string | undefined;
|
|
18
24
|
};
|
|
19
25
|
export type BulkUnassignKeysFromGuardrailRequestBody = {
|
|
20
26
|
/**
|
|
@@ -35,7 +41,13 @@ export type BulkUnassignKeysFromGuardrailRequest = {
|
|
|
35
41
|
*
|
|
36
42
|
* @remarks
|
|
37
43
|
*/
|
|
38
|
-
|
|
44
|
+
appTitle?: string | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
|
|
47
|
+
*
|
|
48
|
+
* @remarks
|
|
49
|
+
*/
|
|
50
|
+
appCategories?: string | undefined;
|
|
39
51
|
/**
|
|
40
52
|
* The unique identifier of the guardrail
|
|
41
53
|
*/
|
|
@@ -61,7 +73,8 @@ export declare function bulkUnassignKeysFromGuardrailRequestBodyToJSON(bulkUnass
|
|
|
61
73
|
/** @internal */
|
|
62
74
|
export type BulkUnassignKeysFromGuardrailRequest$Outbound = {
|
|
63
75
|
"HTTP-Referer"?: string | undefined;
|
|
64
|
-
|
|
76
|
+
appTitle?: string | undefined;
|
|
77
|
+
appCategories?: string | undefined;
|
|
65
78
|
id: string;
|
|
66
79
|
RequestBody: BulkUnassignKeysFromGuardrailRequestBody$Outbound;
|
|
67
80
|
};
|
|
@@ -19,13 +19,13 @@ export function bulkUnassignKeysFromGuardrailRequestBodyToJSON(bulkUnassignKeysF
|
|
|
19
19
|
/** @internal */
|
|
20
20
|
export const BulkUnassignKeysFromGuardrailRequest$outboundSchema = z.object({
|
|
21
21
|
httpReferer: z.string().optional(),
|
|
22
|
-
|
|
22
|
+
appTitle: z.string().optional(),
|
|
23
|
+
appCategories: z.string().optional(),
|
|
23
24
|
id: z.string(),
|
|
24
25
|
requestBody: z.lazy(() => BulkUnassignKeysFromGuardrailRequestBody$outboundSchema),
|
|
25
26
|
}).transform((v) => {
|
|
26
27
|
return remap$(v, {
|
|
27
28
|
httpReferer: "HTTP-Referer",
|
|
28
|
-
xTitle: "X-Title",
|
|
29
29
|
requestBody: "RequestBody",
|
|
30
30
|
});
|
|
31
31
|
});
|
|
@@ -14,7 +14,13 @@ export type BulkUnassignMembersFromGuardrailGlobals = {
|
|
|
14
14
|
*
|
|
15
15
|
* @remarks
|
|
16
16
|
*/
|
|
17
|
-
|
|
17
|
+
appTitle?: string | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
|
|
20
|
+
*
|
|
21
|
+
* @remarks
|
|
22
|
+
*/
|
|
23
|
+
appCategories?: string | undefined;
|
|
18
24
|
};
|
|
19
25
|
export type BulkUnassignMembersFromGuardrailRequestBody = {
|
|
20
26
|
/**
|
|
@@ -35,7 +41,13 @@ export type BulkUnassignMembersFromGuardrailRequest = {
|
|
|
35
41
|
*
|
|
36
42
|
* @remarks
|
|
37
43
|
*/
|
|
38
|
-
|
|
44
|
+
appTitle?: string | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
|
|
47
|
+
*
|
|
48
|
+
* @remarks
|
|
49
|
+
*/
|
|
50
|
+
appCategories?: string | undefined;
|
|
39
51
|
/**
|
|
40
52
|
* The unique identifier of the guardrail
|
|
41
53
|
*/
|
|
@@ -61,7 +73,8 @@ export declare function bulkUnassignMembersFromGuardrailRequestBodyToJSON(bulkUn
|
|
|
61
73
|
/** @internal */
|
|
62
74
|
export type BulkUnassignMembersFromGuardrailRequest$Outbound = {
|
|
63
75
|
"HTTP-Referer"?: string | undefined;
|
|
64
|
-
|
|
76
|
+
appTitle?: string | undefined;
|
|
77
|
+
appCategories?: string | undefined;
|
|
65
78
|
id: string;
|
|
66
79
|
RequestBody: BulkUnassignMembersFromGuardrailRequestBody$Outbound;
|
|
67
80
|
};
|
|
@@ -19,13 +19,13 @@ export function bulkUnassignMembersFromGuardrailRequestBodyToJSON(bulkUnassignMe
|
|
|
19
19
|
/** @internal */
|
|
20
20
|
export const BulkUnassignMembersFromGuardrailRequest$outboundSchema = z.object({
|
|
21
21
|
httpReferer: z.string().optional(),
|
|
22
|
-
|
|
22
|
+
appTitle: z.string().optional(),
|
|
23
|
+
appCategories: z.string().optional(),
|
|
23
24
|
id: z.string(),
|
|
24
25
|
requestBody: z.lazy(() => BulkUnassignMembersFromGuardrailRequestBody$outboundSchema),
|
|
25
26
|
}).transform((v) => {
|
|
26
27
|
return remap$(v, {
|
|
27
28
|
httpReferer: "HTTP-Referer",
|
|
28
|
-
xTitle: "X-Title",
|
|
29
29
|
requestBody: "RequestBody",
|
|
30
30
|
});
|
|
31
31
|
});
|
|
@@ -15,7 +15,13 @@ export type CreateAuthKeysCodeGlobals = {
|
|
|
15
15
|
*
|
|
16
16
|
* @remarks
|
|
17
17
|
*/
|
|
18
|
-
|
|
18
|
+
appTitle?: string | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
|
|
21
|
+
*
|
|
22
|
+
* @remarks
|
|
23
|
+
*/
|
|
24
|
+
appCategories?: string | undefined;
|
|
19
25
|
};
|
|
20
26
|
/**
|
|
21
27
|
* The method used to generate the code challenge
|
|
@@ -28,6 +34,18 @@ export declare const CreateAuthKeysCodeCodeChallengeMethod: {
|
|
|
28
34
|
* The method used to generate the code challenge
|
|
29
35
|
*/
|
|
30
36
|
export type CreateAuthKeysCodeCodeChallengeMethod = OpenEnum<typeof CreateAuthKeysCodeCodeChallengeMethod>;
|
|
37
|
+
/**
|
|
38
|
+
* Optional credit limit reset interval. When set, the credit limit resets on this interval.
|
|
39
|
+
*/
|
|
40
|
+
export declare const UsageLimitType: {
|
|
41
|
+
readonly Daily: "daily";
|
|
42
|
+
readonly Weekly: "weekly";
|
|
43
|
+
readonly Monthly: "monthly";
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* Optional credit limit reset interval. When set, the credit limit resets on this interval.
|
|
47
|
+
*/
|
|
48
|
+
export type UsageLimitType = OpenEnum<typeof UsageLimitType>;
|
|
31
49
|
export type CreateAuthKeysCodeRequestBody = {
|
|
32
50
|
/**
|
|
33
51
|
* The callback URL to redirect to after authorization. Note, only https URLs on ports 443 and 3000 are allowed.
|
|
@@ -49,6 +67,14 @@ export type CreateAuthKeysCodeRequestBody = {
|
|
|
49
67
|
* Optional expiration time for the API key to be created
|
|
50
68
|
*/
|
|
51
69
|
expiresAt?: Date | null | undefined;
|
|
70
|
+
/**
|
|
71
|
+
* Optional custom label for the API key. Defaults to the app name if not provided.
|
|
72
|
+
*/
|
|
73
|
+
keyLabel?: string | undefined;
|
|
74
|
+
/**
|
|
75
|
+
* Optional credit limit reset interval. When set, the credit limit resets on this interval.
|
|
76
|
+
*/
|
|
77
|
+
usageLimitType?: UsageLimitType | undefined;
|
|
52
78
|
};
|
|
53
79
|
export type CreateAuthKeysCodeRequest = {
|
|
54
80
|
/**
|
|
@@ -63,7 +89,13 @@ export type CreateAuthKeysCodeRequest = {
|
|
|
63
89
|
*
|
|
64
90
|
* @remarks
|
|
65
91
|
*/
|
|
66
|
-
|
|
92
|
+
appTitle?: string | undefined;
|
|
93
|
+
/**
|
|
94
|
+
* Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
|
|
95
|
+
*
|
|
96
|
+
* @remarks
|
|
97
|
+
*/
|
|
98
|
+
appCategories?: string | undefined;
|
|
67
99
|
requestBody: CreateAuthKeysCodeRequestBody;
|
|
68
100
|
};
|
|
69
101
|
/**
|
|
@@ -95,12 +127,16 @@ export type CreateAuthKeysCodeResponse = {
|
|
|
95
127
|
/** @internal */
|
|
96
128
|
export declare const CreateAuthKeysCodeCodeChallengeMethod$outboundSchema: z.ZodType<string, CreateAuthKeysCodeCodeChallengeMethod>;
|
|
97
129
|
/** @internal */
|
|
130
|
+
export declare const UsageLimitType$outboundSchema: z.ZodType<string, UsageLimitType>;
|
|
131
|
+
/** @internal */
|
|
98
132
|
export type CreateAuthKeysCodeRequestBody$Outbound = {
|
|
99
133
|
callback_url: string;
|
|
100
134
|
code_challenge?: string | undefined;
|
|
101
135
|
code_challenge_method?: string | undefined;
|
|
102
136
|
limit?: number | undefined;
|
|
103
137
|
expires_at?: string | null | undefined;
|
|
138
|
+
key_label?: string | undefined;
|
|
139
|
+
usage_limit_type?: string | undefined;
|
|
104
140
|
};
|
|
105
141
|
/** @internal */
|
|
106
142
|
export declare const CreateAuthKeysCodeRequestBody$outboundSchema: z.ZodType<CreateAuthKeysCodeRequestBody$Outbound, CreateAuthKeysCodeRequestBody>;
|
|
@@ -108,7 +144,8 @@ export declare function createAuthKeysCodeRequestBodyToJSON(createAuthKeysCodeRe
|
|
|
108
144
|
/** @internal */
|
|
109
145
|
export type CreateAuthKeysCodeRequest$Outbound = {
|
|
110
146
|
"HTTP-Referer"?: string | undefined;
|
|
111
|
-
|
|
147
|
+
appTitle?: string | undefined;
|
|
148
|
+
appCategories?: string | undefined;
|
|
112
149
|
RequestBody: CreateAuthKeysCodeRequestBody$Outbound;
|
|
113
150
|
};
|
|
114
151
|
/** @internal */
|
|
@@ -13,9 +13,19 @@ export const CreateAuthKeysCodeCodeChallengeMethod = {
|
|
|
13
13
|
S256: "S256",
|
|
14
14
|
Plain: "plain",
|
|
15
15
|
};
|
|
16
|
+
/**
|
|
17
|
+
* Optional credit limit reset interval. When set, the credit limit resets on this interval.
|
|
18
|
+
*/
|
|
19
|
+
export const UsageLimitType = {
|
|
20
|
+
Daily: "daily",
|
|
21
|
+
Weekly: "weekly",
|
|
22
|
+
Monthly: "monthly",
|
|
23
|
+
};
|
|
16
24
|
/** @internal */
|
|
17
25
|
export const CreateAuthKeysCodeCodeChallengeMethod$outboundSchema = openEnums.outboundSchema(CreateAuthKeysCodeCodeChallengeMethod);
|
|
18
26
|
/** @internal */
|
|
27
|
+
export const UsageLimitType$outboundSchema = openEnums.outboundSchema(UsageLimitType);
|
|
28
|
+
/** @internal */
|
|
19
29
|
export const CreateAuthKeysCodeRequestBody$outboundSchema = z.object({
|
|
20
30
|
callbackUrl: z.string(),
|
|
21
31
|
codeChallenge: z.string().optional(),
|
|
@@ -23,12 +33,16 @@ export const CreateAuthKeysCodeRequestBody$outboundSchema = z.object({
|
|
|
23
33
|
.optional(),
|
|
24
34
|
limit: z.number().optional(),
|
|
25
35
|
expiresAt: z.nullable(z.date().transform(v => v.toISOString())).optional(),
|
|
36
|
+
keyLabel: z.string().optional(),
|
|
37
|
+
usageLimitType: UsageLimitType$outboundSchema.optional(),
|
|
26
38
|
}).transform((v) => {
|
|
27
39
|
return remap$(v, {
|
|
28
40
|
callbackUrl: "callback_url",
|
|
29
41
|
codeChallenge: "code_challenge",
|
|
30
42
|
codeChallengeMethod: "code_challenge_method",
|
|
31
43
|
expiresAt: "expires_at",
|
|
44
|
+
keyLabel: "key_label",
|
|
45
|
+
usageLimitType: "usage_limit_type",
|
|
32
46
|
});
|
|
33
47
|
});
|
|
34
48
|
export function createAuthKeysCodeRequestBodyToJSON(createAuthKeysCodeRequestBody) {
|
|
@@ -37,12 +51,12 @@ export function createAuthKeysCodeRequestBodyToJSON(createAuthKeysCodeRequestBod
|
|
|
37
51
|
/** @internal */
|
|
38
52
|
export const CreateAuthKeysCodeRequest$outboundSchema = z.object({
|
|
39
53
|
httpReferer: z.string().optional(),
|
|
40
|
-
|
|
54
|
+
appTitle: z.string().optional(),
|
|
55
|
+
appCategories: z.string().optional(),
|
|
41
56
|
requestBody: z.lazy(() => CreateAuthKeysCodeRequestBody$outboundSchema),
|
|
42
57
|
}).transform((v) => {
|
|
43
58
|
return remap$(v, {
|
|
44
59
|
httpReferer: "HTTP-Referer",
|
|
45
|
-
xTitle: "X-Title",
|
|
46
60
|
requestBody: "RequestBody",
|
|
47
61
|
});
|
|
48
62
|
});
|