@openrouter/sdk 1.4.25 → 1.5.0
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/esm/funcs/apiKeysList.d.ts +1 -1
- package/esm/funcs/apiKeysList.js +3 -2
- package/esm/funcs/apiKeysUpdate.d.ts +4 -2
- package/esm/funcs/apiKeysUpdate.js +5 -3
- package/esm/funcs/chatSend.d.ts +4 -2
- package/esm/funcs/containersPromoteContainerFile.d.ts +1 -1
- package/esm/funcs/containersPromoteContainerFile.js +2 -2
- package/esm/funcs/embeddingsGenerate.d.ts +1 -1
- package/esm/funcs/embeddingsGenerate.js +2 -2
- package/esm/funcs/{endUsersCreate.d.ts → externalUsersCreate.d.ts} +3 -3
- package/esm/funcs/{endUsersCreate.js → externalUsersCreate.js} +11 -11
- package/esm/funcs/{endUsersDelete.d.ts → externalUsersDelete.d.ts} +3 -3
- package/esm/funcs/{endUsersDelete.js → externalUsersDelete.js} +8 -8
- package/esm/funcs/{endUsersGet.d.ts → externalUsersGet.d.ts} +3 -3
- package/esm/funcs/{endUsersGet.js → externalUsersGet.js} +10 -10
- package/esm/funcs/{endUsersList.d.ts → externalUsersList.d.ts} +3 -3
- package/esm/funcs/{endUsersList.js → externalUsersList.js} +10 -10
- package/esm/funcs/{endUsersUpdate.d.ts → externalUsersUpdate.d.ts} +3 -3
- package/esm/funcs/{endUsersUpdate.js → externalUsersUpdate.js} +11 -11
- package/esm/funcs/filesUpload.d.ts +1 -1
- package/esm/funcs/filesUpload.js +2 -2
- package/esm/funcs/guardrailsListKeyAssignments.d.ts +1 -1
- package/esm/funcs/guardrailsListKeyAssignments.js +2 -2
- package/esm/funcs/guardrailsListMemberAssignments.d.ts +1 -1
- package/esm/funcs/guardrailsListMemberAssignments.js +2 -2
- package/esm/funcs/imagesGenerate.d.ts +4 -2
- package/esm/funcs/internsGetInternConnections.d.ts +21 -0
- package/esm/funcs/internsGetInternConnections.js +105 -0
- package/esm/funcs/internsGetInternDaemon.d.ts +1 -1
- package/esm/funcs/internsGetInternDaemon.js +1 -1
- package/esm/funcs/internsGetInternIcon.d.ts +20 -0
- package/esm/funcs/internsGetInternIcon.js +109 -0
- package/esm/funcs/internsSignInternDaemonAccessRequest.d.ts +22 -0
- package/esm/funcs/internsSignInternDaemonAccessRequest.js +109 -0
- package/esm/funcs/internsSignInternDaemonRequest.d.ts +20 -0
- package/esm/funcs/internsSignInternDaemonRequest.js +109 -0
- package/esm/funcs/modelsListForUser.js +1 -0
- package/esm/funcs/privateEndpointsUpdatePricing.d.ts +1 -1
- package/esm/funcs/privateEndpointsUpdatePricing.js +1 -1
- package/esm/funcs/responsesSend.d.ts +4 -2
- package/esm/funcs/vaultDeleteInternVaultSecret.d.ts +1 -1
- package/esm/funcs/vaultDeleteInternVaultSecret.js +2 -2
- package/esm/funcs/vaultDeleteVaultSecret.d.ts +1 -1
- package/esm/funcs/vaultDeleteVaultSecret.js +2 -2
- package/esm/funcs/vaultListInternConnections.d.ts +20 -0
- package/esm/funcs/vaultListInternConnections.js +104 -0
- package/esm/funcs/vaultStoreVaultSecret.d.ts +1 -1
- package/esm/funcs/vaultStoreVaultSecret.js +2 -2
- package/esm/funcs/videoGenerationGenerate.d.ts +1 -1
- package/esm/funcs/videoGenerationGenerate.js +2 -2
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/lib/encodings.d.ts +10 -9
- package/esm/lib/encodings.js +29 -13
- package/esm/lib/http.d.ts +1 -1
- package/esm/lib/http.js +1 -1
- package/esm/lib/security.d.ts +5 -4
- package/esm/lib/security.js +4 -5
- package/esm/models/additionaltoolsitem.d.ts +16 -1
- package/esm/models/additionaltoolsitem.js +10 -0
- package/esm/models/alignment.d.ts +1 -1
- package/esm/models/alignmentplugin.d.ts +9 -8
- package/esm/models/alignmentplugin.js +3 -2
- package/esm/models/alignmentrule.d.ts +31 -0
- package/esm/models/alignmentrule.js +25 -0
- package/esm/models/alignmentrulerecord.d.ts +7 -3
- package/esm/models/alignmentrulerecord.js +2 -1
- package/esm/models/armorautomode.d.ts +44 -0
- package/esm/models/armorautomode.js +49 -0
- package/esm/models/armorcontext.d.ts +22 -0
- package/esm/models/armorcontext.js +25 -0
- package/esm/models/armorenvironmententry.d.ts +14 -0
- package/esm/models/armorenvironmententry.js +14 -0
- package/esm/models/armorplugin.d.ts +92 -0
- package/esm/models/armorplugin.js +60 -0
- package/esm/models/armorrule.d.ts +30 -0
- package/esm/models/armorrule.js +16 -0
- package/esm/models/armorsafeguardresult.d.ts +69 -0
- package/esm/models/armorsafeguardresult.js +83 -0
- package/esm/models/batchlistitem.d.ts +8 -0
- package/esm/models/batchlistitem.js +3 -0
- package/esm/models/batchobject.d.ts +13 -0
- package/esm/models/batchobject.js +6 -0
- package/esm/models/batchsubmitbody.d.ts +5 -0
- package/esm/models/batchsubmitbody.js +2 -0
- package/esm/models/byokkey.d.ts +3 -3
- package/esm/models/byokkey.js +1 -1
- package/esm/models/byokproviderslug.d.ts +2 -0
- package/esm/models/byokproviderslug.js +2 -0
- package/esm/models/chatcontenttext.d.ts +1 -1
- package/esm/models/chatfunctiontool.d.ts +4 -0
- package/esm/models/chatfunctiontool.js +7 -0
- package/esm/models/chatrequest.d.ts +16 -9
- package/esm/models/chatrequest.js +9 -6
- package/esm/models/chatresult.d.ts +10 -0
- package/esm/models/chatresult.js +5 -0
- package/esm/models/chatstreamchunk.d.ts +7 -0
- package/esm/models/chatstreamchunk.js +5 -0
- package/esm/models/chatwebsearchshorthand.d.ts +1 -1
- package/esm/models/clientclosedrequestresponseerrordata.d.ts +17 -0
- package/esm/models/clientclosedrequestresponseerrordata.js +16 -0
- package/esm/models/computeruseservertool.d.ts +5 -5
- package/esm/models/computeruseservertool.js +5 -5
- package/esm/models/createbyokkeyrequest.d.ts +3 -3
- package/esm/models/createbyokkeyrequest.js +1 -1
- package/esm/models/createexternaluserrequest.d.ts +15 -0
- package/esm/models/createexternaluserrequest.js +13 -0
- package/esm/models/createguardrailrequest.d.ts +10 -0
- package/esm/models/createguardrailrequest.js +4 -0
- package/esm/models/createobservabilitydestinationrequest.d.ts +5 -0
- package/esm/models/createobservabilitydestinationrequest.js +2 -0
- package/esm/models/customtool.d.ts +2 -0
- package/esm/models/customtool.js +11 -0
- package/esm/models/decisionsboxanswer.d.ts +21 -0
- package/esm/models/decisionsboxanswer.js +26 -0
- package/esm/models/decisionsboxquestion.d.ts +34 -0
- package/esm/models/decisionsboxquestion.js +23 -0
- package/esm/models/decisionsrequest.d.ts +6 -5
- package/esm/models/decisionsrequest.js +3 -0
- package/esm/models/decisionsresponse.d.ts +4 -3
- package/esm/models/decisionsresponse.js +3 -0
- package/esm/models/deferredbm25search.d.ts +17 -0
- package/esm/models/deferredbm25search.js +19 -0
- package/esm/models/deferredcustomsearch.d.ts +21 -0
- package/esm/models/deferredcustomsearch.js +23 -0
- package/esm/models/deferredregexsearch.d.ts +17 -0
- package/esm/models/deferredregexsearch.js +19 -0
- package/esm/models/deferredtoolscontrol.d.ts +62 -0
- package/esm/models/deferredtoolscontrol.js +38 -0
- package/esm/models/deferredtoolssearchstrategy.d.ts +14 -0
- package/esm/models/deferredtoolssearchstrategy.js +18 -0
- package/esm/models/errors/batchpaymentrequiredresponseerror.d.ts +16 -0
- package/esm/models/errors/batchpaymentrequiredresponseerror.js +5 -0
- package/esm/models/errors/clientclosedrequestresponseerror.d.ts +39 -0
- package/esm/models/errors/clientclosedrequestresponseerror.js +47 -0
- package/esm/models/errors/index.d.ts +1 -0
- package/esm/models/errors/index.js +1 -0
- package/esm/models/{enduser.d.ts → externaluser.d.ts} +5 -5
- package/esm/models/{enduser.js → externaluser.js} +6 -5
- package/esm/models/externaluserresponse.d.ts +11 -0
- package/esm/models/externaluserresponse.js +15 -0
- package/esm/models/guardrail.d.ts +8 -0
- package/esm/models/guardrail.js +4 -0
- package/esm/models/imagegenerationproviderpreferences.d.ts +12 -0
- package/esm/models/imagegenerationproviderpreferences.js +3 -0
- package/esm/models/index.d.ts +34 -6
- package/esm/models/index.js +34 -6
- package/esm/models/inputsunion.d.ts +7 -4
- package/esm/models/inputsunion.js +9 -0
- package/esm/models/inputtext.d.ts +1 -1
- package/esm/models/intern.d.ts +12 -0
- package/esm/models/intern.js +6 -0
- package/esm/models/internconnection.d.ts +118 -0
- package/esm/models/internconnection.js +105 -0
- package/esm/models/internconnectionlist.d.ts +11 -0
- package/esm/models/internconnectionlist.js +15 -0
- package/esm/models/jevrouterplugin.d.ts +5 -0
- package/esm/models/jevrouterplugin.js +2 -0
- package/esm/models/keybudget.d.ts +80 -0
- package/esm/models/keybudget.js +58 -0
- package/esm/models/legacywebsearchservertool.d.ts +1 -1
- package/esm/models/listexternalusersresponse.d.ts +15 -0
- package/esm/models/listexternalusersresponse.js +21 -0
- package/esm/models/messagesmessageparam.d.ts +7 -6
- package/esm/models/messagesmessageparam.js +4 -0
- package/esm/models/messagesrequest.d.ts +11 -4
- package/esm/models/messagesrequest.js +6 -0
- package/esm/models/namespacefunctiontool.d.ts +5 -5
- package/esm/models/namespacefunctiontool.js +5 -5
- package/esm/models/observabilityarizedestination.d.ts +4 -0
- package/esm/models/observabilityarizedestination.js +2 -0
- package/esm/models/observabilitybraintrustdestination.d.ts +4 -0
- package/esm/models/observabilitybraintrustdestination.js +2 -0
- package/esm/models/observabilityclickhousedestination.d.ts +4 -0
- package/esm/models/observabilityclickhousedestination.js +2 -0
- package/esm/models/observabilitydatadogdestination.d.ts +4 -0
- package/esm/models/observabilitydatadogdestination.js +2 -0
- package/esm/models/observabilitygrafanadestination.d.ts +4 -0
- package/esm/models/observabilitygrafanadestination.js +2 -0
- package/esm/models/observabilitylangfusedestination.d.ts +4 -0
- package/esm/models/observabilitylangfusedestination.js +2 -0
- package/esm/models/observabilitylangsmithdestination.d.ts +4 -0
- package/esm/models/observabilitylangsmithdestination.js +2 -0
- package/esm/models/observabilitynewrelicdestination.d.ts +4 -0
- package/esm/models/observabilitynewrelicdestination.js +2 -0
- package/esm/models/observabilityopikdestination.d.ts +4 -0
- package/esm/models/observabilityopikdestination.js +2 -0
- package/esm/models/observabilityotelcollectordestination.d.ts +4 -0
- package/esm/models/observabilityotelcollectordestination.js +2 -0
- package/esm/models/observabilityposthogdestination.d.ts +4 -0
- package/esm/models/observabilityposthogdestination.js +2 -0
- package/esm/models/observabilityrampdestination.d.ts +4 -0
- package/esm/models/observabilityrampdestination.js +2 -0
- package/esm/models/observabilitys3destination.d.ts +4 -0
- package/esm/models/observabilitys3destination.js +2 -0
- package/esm/models/observabilitysentrydestination.d.ts +4 -0
- package/esm/models/observabilitysentrydestination.js +2 -0
- package/esm/models/observabilitysnowflakedestination.d.ts +4 -0
- package/esm/models/observabilitysnowflakedestination.js +2 -0
- package/esm/models/observabilityweavedestination.d.ts +4 -0
- package/esm/models/observabilityweavedestination.js +2 -0
- package/esm/models/observabilitywebhookdestination.d.ts +8 -4
- package/esm/models/observabilitywebhookdestination.js +5 -4
- package/esm/models/openresponseserrorfield.d.ts +1 -0
- package/esm/models/openresponseserrorfield.js +1 -0
- package/esm/models/openresponseserrormetadata.d.ts +1 -1
- package/esm/models/openresponsesresult.d.ts +19 -3
- package/esm/models/openresponsesresult.js +14 -0
- package/esm/models/operations/{createenduser.d.ts → createexternaluser.d.ts} +8 -8
- package/esm/models/operations/createexternaluser.js +23 -0
- package/esm/models/operations/deleteexternaluser.d.ts +58 -0
- package/esm/models/operations/{deleteenduser.js → deleteexternaluser.js} +5 -5
- package/esm/models/operations/getcurrentkey.d.ts +5 -0
- package/esm/models/operations/getcurrentkey.js +4 -1
- package/esm/models/operations/{updateenduser.d.ts → getexternaluser.d.ts} +7 -10
- package/esm/models/operations/{getenduser.js → getexternaluser.js} +5 -5
- package/esm/models/operations/{deleteenduser.d.ts → getinternconnections.d.ts} +9 -9
- package/esm/models/operations/getinternconnections.js +21 -0
- package/esm/models/operations/{getenduser.d.ts → getinternicon.d.ts} +14 -9
- package/esm/models/operations/getinternicon.js +22 -0
- package/esm/models/operations/index.d.ts +10 -5
- package/esm/models/operations/index.js +10 -5
- package/esm/models/operations/list.d.ts +5 -0
- package/esm/models/operations/list.js +2 -0
- package/esm/models/operations/listbatches.d.ts +4 -4
- package/esm/models/operations/listbatches.js +3 -3
- package/esm/models/operations/listbyokkeys.d.ts +2 -0
- package/esm/models/operations/listbyokkeys.js +2 -0
- package/esm/models/operations/{listendusers.d.ts → listexternalusers.d.ts} +11 -11
- package/esm/models/operations/listexternalusers.js +38 -0
- package/esm/models/operations/listinternconnections.d.ts +75 -0
- package/esm/models/operations/listinternconnections.js +36 -0
- package/esm/models/operations/listmodelsuser.d.ts +29 -0
- package/esm/models/operations/listmodelsuser.js +21 -0
- package/esm/models/operations/signinterndaemonaccessrequest.d.ts +72 -0
- package/esm/models/operations/signinterndaemonaccessrequest.js +38 -0
- package/esm/models/operations/signinterndaemonrequest.d.ts +72 -0
- package/esm/models/operations/signinterndaemonrequest.js +38 -0
- package/esm/models/operations/updateexternaluser.d.ts +61 -0
- package/esm/models/operations/updateexternaluser.js +24 -0
- package/esm/models/operations/updatekeys.d.ts +5 -0
- package/esm/models/operations/updatekeys.js +2 -0
- package/esm/models/oranthropiccontentblock.d.ts +2 -1
- package/esm/models/oranthropiccontentblock.js +2 -0
- package/esm/models/oranthropictoolsearchresult.d.ts +17 -0
- package/esm/models/oranthropictoolsearchresult.js +21 -0
- package/esm/models/oranthropictoolsearchresultparam.d.ts +23 -0
- package/esm/models/oranthropictoolsearchresultparam.js +20 -0
- package/esm/models/outputapplypatchservertoolitem.d.ts +7 -2
- package/esm/models/outputapplypatchservertoolitem.js +5 -3
- package/esm/models/outputarmorblockeditem.d.ts +71 -0
- package/esm/models/outputarmorblockeditem.js +60 -0
- package/esm/models/outputdatetimeitem.d.ts +7 -2
- package/esm/models/outputdatetimeitem.js +5 -3
- package/esm/models/outputimagegenerationservertoolitem.d.ts +7 -2
- package/esm/models/outputimagegenerationservertoolitem.js +5 -3
- package/esm/models/outputitems.d.ts +5 -1
- package/esm/models/outputitems.js +4 -0
- package/esm/models/outputsearchmodelsservertoolitem.d.ts +7 -2
- package/esm/models/outputsearchmodelsservertoolitem.js +5 -3
- package/esm/models/outputtoolsearchcallitem.d.ts +26 -0
- package/esm/models/outputtoolsearchcallitem.js +30 -0
- package/esm/models/outputtoolsearchservertoolitem.d.ts +30 -2
- package/esm/models/outputtoolsearchservertoolitem.js +36 -3
- package/esm/models/outputwebsearchservertoolitem.d.ts +7 -2
- package/esm/models/outputwebsearchservertoolitem.js +5 -3
- package/esm/models/preview20250311websearchservertool.d.ts +1 -1
- package/esm/models/previewwebsearchservertool.d.ts +1 -1
- package/esm/models/privateendpointpricing.d.ts +10 -0
- package/esm/models/privateendpointpricing.js +15 -0
- package/esm/models/promptcachebreakpoint.d.ts +3 -1
- package/esm/models/promptcachebreakpoint.js +2 -0
- package/esm/models/promptcacheoptions.d.ts +1 -1
- package/esm/models/providername.d.ts +2 -0
- package/esm/models/providername.js +2 -0
- package/esm/models/provideroptions.d.ts +12 -0
- package/esm/models/provideroptions.js +3 -0
- package/esm/models/providerresponse.d.ts +2 -0
- package/esm/models/providerresponse.js +2 -0
- package/esm/models/publicendpoint.d.ts +11 -2
- package/esm/models/publicendpoint.js +5 -0
- package/esm/models/publicservicetier.d.ts +17 -0
- package/esm/models/publicservicetier.js +16 -0
- package/esm/models/responsesrequest.d.ts +42 -6
- package/esm/models/responsesrequest.js +22 -0
- package/esm/models/signinterndaemonrequest.d.ts +54 -0
- package/esm/models/signinterndaemonrequest.js +30 -0
- package/esm/models/signinterndaemonresponse.d.ts +32 -0
- package/esm/models/signinterndaemonresponse.js +27 -0
- package/esm/models/speechinput.d.ts +12 -0
- package/esm/models/speechinput.js +12 -0
- package/esm/models/speechinputreferenceimage.d.ts +1 -1
- package/esm/models/speechrequest.d.ts +10 -4
- package/esm/models/speechrequest.js +3 -1
- package/esm/models/speechturn.d.ts +25 -0
- package/esm/models/speechturn.js +15 -0
- package/esm/models/switchyardrouterplugin.d.ts +1 -1
- package/esm/models/tokenexchangerequest.d.ts +7 -6
- package/esm/models/tokenexchangerequest.js +4 -2
- package/esm/models/tokenexchangeresponse.d.ts +3 -0
- package/esm/models/toolsearchcallitem.d.ts +47 -0
- package/esm/models/toolsearchcallitem.js +42 -0
- package/esm/models/toolsearchoutputitem.d.ts +150 -0
- package/esm/models/toolsearchoutputitem.js +181 -0
- package/esm/models/updatebyokkeyrequest.d.ts +3 -3
- package/esm/models/updatebyokkeyrequest.js +1 -1
- package/esm/models/updateexternaluserrequest.d.ts +15 -0
- package/esm/models/updateexternaluserrequest.js +18 -0
- package/esm/models/updateguardrailrequest.d.ts +10 -0
- package/esm/models/updateguardrailrequest.js +4 -0
- package/esm/models/updateobservabilitydestinationrequest.d.ts +5 -0
- package/esm/models/updateobservabilitydestinationrequest.js +2 -0
- package/esm/models/videogenerationrequest.d.ts +12 -0
- package/esm/models/videogenerationrequest.js +3 -0
- package/esm/models/videogenerationresponse.d.ts +11 -0
- package/esm/models/videogenerationresponse.js +3 -0
- package/esm/models/webfetchengineenum.d.ts +2 -2
- package/esm/models/webfetchengineenum.js +1 -1
- package/esm/models/webfetchservertoolconfig.d.ts +1 -1
- package/esm/models/websearchconfig.d.ts +1 -1
- package/esm/models/websearchengineenum.d.ts +2 -2
- package/esm/models/websearchengineenum.js +1 -1
- package/esm/models/websearchservertool.d.ts +1 -1
- package/esm/models/websearchservertoolconfig.d.ts +1 -1
- package/esm/models/workspacebudget.d.ts +4 -4
- package/esm/models/workspacebudget.js +3 -3
- package/esm/sdk/apikeys.d.ts +3 -1
- package/esm/sdk/apikeys.js +3 -1
- package/esm/sdk/betaresponses.d.ts +4 -2
- package/esm/sdk/chat.d.ts +4 -2
- package/esm/sdk/endusers.d.ts +10 -10
- package/esm/sdk/endusers.js +15 -15
- package/esm/sdk/externalusers.d.ts +44 -0
- package/esm/sdk/externalusers.js +60 -0
- package/esm/sdk/images.d.ts +3 -2
- package/esm/sdk/interns.d.ts +31 -1
- package/esm/sdk/interns.js +43 -1
- package/esm/sdk/privateendpoints.d.ts +1 -1
- package/esm/sdk/privateendpoints.js +1 -1
- package/esm/sdk/responses.d.ts +4 -2
- package/esm/sdk/sdk.d.ts +5 -2
- package/esm/sdk/sdk.js +7 -3
- package/esm/sdk/vault.d.ts +7 -0
- package/esm/sdk/vault.js +10 -0
- package/jsr.json +1 -1
- package/package.json +6 -6
- package/esm/models/batchlisttimestamp.d.ts +0 -12
- package/esm/models/batchlisttimestamp.js +0 -15
- package/esm/models/createenduserrequest.d.ts +0 -15
- package/esm/models/createenduserrequest.js +0 -13
- package/esm/models/enduserresponse.d.ts +0 -11
- package/esm/models/enduserresponse.js +0 -15
- package/esm/models/listendusersresponse.d.ts +0 -15
- package/esm/models/listendusersresponse.js +0 -21
- package/esm/models/operations/createenduser.js +0 -23
- package/esm/models/operations/listendusers.js +0 -38
- package/esm/models/operations/updateenduser.js +0 -24
- package/esm/models/updateenduserrequest.d.ts +0 -15
- package/esm/models/updateenduserrequest.js +0 -18
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { OpenRouterCore } from "../core.js";
|
|
2
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
3
|
+
import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
|
|
4
|
+
import * as errors from "../models/errors/index.js";
|
|
5
|
+
import { OpenRouterError } from "../models/errors/openroutererror.js";
|
|
6
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
7
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
8
|
+
import * as operations from "../models/operations/index.js";
|
|
9
|
+
import { APIPromise } from "../types/async.js";
|
|
10
|
+
import { Result } from "../types/fp.js";
|
|
11
|
+
/**
|
|
12
|
+
* Sign a daemon request with the caller's identity
|
|
13
|
+
*
|
|
14
|
+
* @remarks
|
|
15
|
+
* Signs the SHA-256 digest of one request the CLI is about to send to the intern daemon, binding it to the intern and to the signed-in member so personal connections resolve. Only an OAuth session from `ori login --oidc` whose grant carries `vault:read` can sign: an API key is refused with 403 because it names no person, and an `interns`-only grant is refused with 403 because a proof releases that user's personal connections. The route is behind the same gate as chat and counts against the chat turn limiter. The response is sent with `Cache-Control: no-store`. The API key selects the caller, workspace and visible interns. An intern's own API key sees only that intern: the collection and every other intern answer 404 to it. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
|
|
16
|
+
*
|
|
17
|
+
* If set, this operation will use {@link Security.apiKey} from the global security.
|
|
18
|
+
*/
|
|
19
|
+
export declare function internsSignInternDaemonRequest(client: OpenRouterCore, request: operations.SignInternDaemonRequestRequest, options?: RequestOptions): APIPromise<Result<operations.SignInternDaemonRequestResponse, errors.InternLifecycleError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
20
|
+
//# sourceMappingURL=internsSignInternDaemonRequest.d.ts.map
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 597f99f3800d
|
|
4
|
+
*/
|
|
5
|
+
import { encodeJSON, encodeSimple } from "../lib/encodings.js";
|
|
6
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { compactMap } from "../lib/primitives.js";
|
|
9
|
+
import { safeParse } from "../lib/schemas.js";
|
|
10
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
|
+
import { pathToFunc } from "../lib/url.js";
|
|
12
|
+
import { InternLifecycleError$inboundSchema as errors_InternLifecycleError$inboundSchema } from "../models/errors/internlifecycleerror.js";
|
|
13
|
+
import { SignInternDaemonRequestRequest$outboundSchema as operations_SignInternDaemonRequestRequest$outboundSchema, SignInternDaemonRequestResponse$inboundSchema as operations_SignInternDaemonRequestResponse$inboundSchema } from "../models/operations/signinterndaemonrequest.js";
|
|
14
|
+
import { APIPromise } from "../types/async.js";
|
|
15
|
+
/**
|
|
16
|
+
* Sign a daemon request with the caller's identity
|
|
17
|
+
*
|
|
18
|
+
* @remarks
|
|
19
|
+
* Signs the SHA-256 digest of one request the CLI is about to send to the intern daemon, binding it to the intern and to the signed-in member so personal connections resolve. Only an OAuth session from `ori login --oidc` whose grant carries `vault:read` can sign: an API key is refused with 403 because it names no person, and an `interns`-only grant is refused with 403 because a proof releases that user's personal connections. The route is behind the same gate as chat and counts against the chat turn limiter. The response is sent with `Cache-Control: no-store`. The API key selects the caller, workspace and visible interns. An intern's own API key sees only that intern: the collection and every other intern answer 404 to it. There is no default workspace fallback. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
|
|
20
|
+
*
|
|
21
|
+
* If set, this operation will use {@link Security.apiKey} from the global security.
|
|
22
|
+
*/
|
|
23
|
+
export function internsSignInternDaemonRequest(client, request, options) {
|
|
24
|
+
return new APIPromise($do(client, request, options));
|
|
25
|
+
}
|
|
26
|
+
async function $do(client, request, options) {
|
|
27
|
+
const parsed = safeParse(request, (value) => operations_SignInternDaemonRequestRequest$outboundSchema.parse(value), "Input validation failed");
|
|
28
|
+
if (!parsed.ok) {
|
|
29
|
+
return [parsed, { status: "invalid" }];
|
|
30
|
+
}
|
|
31
|
+
const payload = parsed.value;
|
|
32
|
+
const body = encodeJSON("body", payload.SignInternDaemonRequest, {
|
|
33
|
+
explode: true,
|
|
34
|
+
});
|
|
35
|
+
const pathParams = {
|
|
36
|
+
internId: encodeSimple("internId", payload.internId, {
|
|
37
|
+
explode: false,
|
|
38
|
+
charEncoding: "percent",
|
|
39
|
+
}),
|
|
40
|
+
};
|
|
41
|
+
const path = pathToFunc("/interns/{internId}/daemon/sign")(pathParams);
|
|
42
|
+
const headers = new Headers(compactMap({
|
|
43
|
+
"Content-Type": "application/json",
|
|
44
|
+
Accept: "application/json",
|
|
45
|
+
"HTTP-Referer": encodeSimple("HTTP-Referer", payload["HTTP-Referer"] ?? client._options.httpReferer, { explode: false, charEncoding: "none" }),
|
|
46
|
+
"X-OpenRouter-Categories": encodeSimple("X-OpenRouter-Categories", payload.appCategories ?? client._options.appCategories, { explode: false, charEncoding: "none" }),
|
|
47
|
+
"X-OpenRouter-Title": encodeSimple("X-OpenRouter-Title", payload.appTitle ?? client._options.appTitle, { explode: false, charEncoding: "none" }),
|
|
48
|
+
}));
|
|
49
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
50
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
51
|
+
const requestSecurity = resolveGlobalSecurity(securityInput, [0]);
|
|
52
|
+
const context = {
|
|
53
|
+
options: client._options,
|
|
54
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
55
|
+
operationID: "signInternDaemonRequest",
|
|
56
|
+
oAuth2Scopes: null,
|
|
57
|
+
resolvedSecurity: requestSecurity,
|
|
58
|
+
securitySource: client._options.apiKey,
|
|
59
|
+
retryConfig: options?.retries
|
|
60
|
+
|| client._options.retryConfig
|
|
61
|
+
|| {
|
|
62
|
+
strategy: "backoff",
|
|
63
|
+
backoff: {
|
|
64
|
+
initialInterval: 500,
|
|
65
|
+
maxInterval: 60000,
|
|
66
|
+
exponent: 1.5,
|
|
67
|
+
maxElapsedTime: 3600000,
|
|
68
|
+
},
|
|
69
|
+
retryConnectionErrors: true,
|
|
70
|
+
}
|
|
71
|
+
|| { strategy: "none" },
|
|
72
|
+
retryCodes: options?.retryCodes || ["5XX"],
|
|
73
|
+
};
|
|
74
|
+
const requestRes = client._createRequest(context, {
|
|
75
|
+
security: requestSecurity,
|
|
76
|
+
method: "POST",
|
|
77
|
+
baseURL: options?.serverURL,
|
|
78
|
+
path: path,
|
|
79
|
+
headers: headers,
|
|
80
|
+
body: body,
|
|
81
|
+
userAgent: client._options.userAgent,
|
|
82
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
83
|
+
}, options);
|
|
84
|
+
if (!requestRes.ok) {
|
|
85
|
+
return [requestRes, { status: "invalid" }];
|
|
86
|
+
}
|
|
87
|
+
const req = requestRes.value;
|
|
88
|
+
const doResult = await client._do(req, {
|
|
89
|
+
context,
|
|
90
|
+
isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
|
|
91
|
+
retryConfig: context.retryConfig,
|
|
92
|
+
retryCodes: context.retryCodes,
|
|
93
|
+
});
|
|
94
|
+
if (!doResult.ok) {
|
|
95
|
+
return [doResult, { status: "request-error", request: req }];
|
|
96
|
+
}
|
|
97
|
+
const response = doResult.value;
|
|
98
|
+
const responseFields = {
|
|
99
|
+
HttpMeta: { Response: response, Request: req },
|
|
100
|
+
};
|
|
101
|
+
const [result] = await M.match(M.json(200, operations_SignInternDaemonRequestResponse$inboundSchema, {
|
|
102
|
+
key: "Result",
|
|
103
|
+
}), M.jsonErr([400, 401, 403, 404, 408, 413, 415], errors_InternLifecycleError$inboundSchema), M.jsonErr(429, errors_InternLifecycleError$inboundSchema, { hdrs: true }), M.jsonErr(500, errors_InternLifecycleError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
104
|
+
if (!result.ok) {
|
|
105
|
+
return [result, { status: "complete", request: req, response }];
|
|
106
|
+
}
|
|
107
|
+
return [result, { status: "complete", request: req, response }];
|
|
108
|
+
}
|
|
109
|
+
//# sourceMappingURL=internsSignInternDaemonRequest.js.map
|
|
@@ -34,6 +34,7 @@ async function $do(client, security, request, options) {
|
|
|
34
34
|
"limit": payload?.limit,
|
|
35
35
|
"offset": payload?.offset,
|
|
36
36
|
"output_modalities": payload?.output_modalities,
|
|
37
|
+
"sort": payload?.sort,
|
|
37
38
|
});
|
|
38
39
|
const headers = new Headers(compactMap({
|
|
39
40
|
Accept: "application/json",
|
|
@@ -13,7 +13,7 @@ import { Result } from "../types/fp.js";
|
|
|
13
13
|
* Set private endpoint pricing
|
|
14
14
|
*
|
|
15
15
|
* @remarks
|
|
16
|
-
* Set the negotiated per-token rates reported for requests routed to this endpoint. Applies to drafts and active endpoints; new rates take effect for subsequent requests. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
16
|
+
* Set the negotiated per-token rates reported for requests routed to this endpoint. Applies to drafts and active endpoints; new rates take effect for subsequent requests. The body replaces the whole pricing object: omitting `cache_read` or `cache_write` reverts that rate to the provider pricing strategy's default, even if it was set before. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
17
17
|
*/
|
|
18
18
|
export declare function privateEndpointsUpdatePricing(client: OpenRouterCore, request: operations.UpdatePrivateEndpointPricingRequest, options?: RequestOptions): APIPromise<Result<models.PrivateEndpointResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.RequestTimeoutResponseError | errors.ConflictResponseError | errors.UnprocessableEntityResponseError | errors.InternalServerResponseError | errors.BadGatewayResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
19
19
|
//# sourceMappingURL=privateEndpointsUpdatePricing.d.ts.map
|
|
@@ -17,7 +17,7 @@ import { APIPromise } from "../types/async.js";
|
|
|
17
17
|
* Set private endpoint pricing
|
|
18
18
|
*
|
|
19
19
|
* @remarks
|
|
20
|
-
* Set the negotiated per-token rates reported for requests routed to this endpoint. Applies to drafts and active endpoints; new rates take effect for subsequent requests. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
20
|
+
* Set the negotiated per-token rates reported for requests routed to this endpoint. Applies to drafts and active endpoints; new rates take effect for subsequent requests. The body replaces the whole pricing object: omitting `cache_read` or `cache_write` reverts that rate to the provider pricing strategy's default, even if it was set before. [Management key](/docs/guides/overview/auth/management-api-keys) required.
|
|
21
21
|
*/
|
|
22
22
|
export function privateEndpointsUpdatePricing(client, request, options) {
|
|
23
23
|
return new APIPromise($do(client, request, options));
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { OpenRouterCore } from "../core.js";
|
|
2
|
+
import { EventStream } from "../lib/event-streams.js";
|
|
2
3
|
import { RequestOptions } from "../lib/sdks.js";
|
|
3
4
|
import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
|
|
4
5
|
import * as errors from "../models/errors/index.js";
|
|
5
6
|
import { OpenRouterError } from "../models/errors/openroutererror.js";
|
|
6
7
|
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
7
8
|
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
9
|
+
import * as models from "../models/index.js";
|
|
8
10
|
import * as operations from "../models/operations/index.js";
|
|
9
11
|
import { APIPromise } from "../types/async.js";
|
|
10
12
|
import { Result } from "../types/fp.js";
|
|
@@ -18,11 +20,11 @@ export declare function responsesSend(client: OpenRouterCore, request: operation
|
|
|
18
20
|
responsesRequest: {
|
|
19
21
|
stream?: false;
|
|
20
22
|
};
|
|
21
|
-
}, options?: RequestOptions): APIPromise<Result<
|
|
23
|
+
}, options?: RequestOptions): APIPromise<Result<models.OpenResponsesResult, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.PaymentRequiredResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.RequestTimeoutResponseError | errors.PayloadTooLargeResponseError | errors.UnprocessableEntityResponseError | errors.TooManyRequestsResponseError | errors.InternalServerResponseError | errors.BadGatewayResponseError | errors.ServiceUnavailableResponseError | errors.EdgeNetworkTimeoutResponseError | errors.ProviderOverloadedResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
22
24
|
export declare function responsesSend(client: OpenRouterCore, request: operations.CreateResponsesRequest & {
|
|
23
25
|
responsesRequest: {
|
|
24
26
|
stream: true;
|
|
25
27
|
};
|
|
26
|
-
}, options?: RequestOptions): APIPromise<Result<
|
|
28
|
+
}, options?: RequestOptions): APIPromise<Result<EventStream<models.StreamEvents>, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.PaymentRequiredResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.RequestTimeoutResponseError | errors.PayloadTooLargeResponseError | errors.UnprocessableEntityResponseError | errors.TooManyRequestsResponseError | errors.InternalServerResponseError | errors.BadGatewayResponseError | errors.ServiceUnavailableResponseError | errors.EdgeNetworkTimeoutResponseError | errors.ProviderOverloadedResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
27
29
|
export declare function responsesSend(client: OpenRouterCore, request: operations.CreateResponsesRequest, options?: RequestOptions): APIPromise<Result<operations.CreateResponsesResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.PaymentRequiredResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.RequestTimeoutResponseError | errors.PayloadTooLargeResponseError | errors.UnprocessableEntityResponseError | errors.TooManyRequestsResponseError | errors.InternalServerResponseError | errors.BadGatewayResponseError | errors.ServiceUnavailableResponseError | errors.EdgeNetworkTimeoutResponseError | errors.ProviderOverloadedResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
28
30
|
//# sourceMappingURL=responsesSend.d.ts.map
|
|
@@ -16,5 +16,5 @@ import { Result } from "../types/fp.js";
|
|
|
16
16
|
*
|
|
17
17
|
* If set, this operation will use {@link Security.apiKey} from the global security.
|
|
18
18
|
*/
|
|
19
|
-
export declare function vaultDeleteInternVaultSecret(client: OpenRouterCore, request: operations.DeleteInternVaultSecretRequest, options?: RequestOptions): APIPromise<Result<void, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.RequestTimeoutResponseError | errors.TooManyRequestsResponseError | errors.InternalServerResponseError | errors.BadGatewayResponseError | errors.ServiceUnavailableResponseError | errors.GatewayTimeoutResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
19
|
+
export declare function vaultDeleteInternVaultSecret(client: OpenRouterCore, request: operations.DeleteInternVaultSecretRequest, options?: RequestOptions): APIPromise<Result<void, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.RequestTimeoutResponseError | errors.ConflictResponseError | errors.TooManyRequestsResponseError | errors.InternalServerResponseError | errors.BadGatewayResponseError | errors.ServiceUnavailableResponseError | errors.GatewayTimeoutResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
20
20
|
//# sourceMappingURL=vaultDeleteInternVaultSecret.d.ts.map
|
|
@@ -10,7 +10,7 @@ import { compactMap } from "../lib/primitives.js";
|
|
|
10
10
|
import { safeParse } from "../lib/schemas.js";
|
|
11
11
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
12
|
import { pathToFunc } from "../lib/url.js";
|
|
13
|
-
import { BadGatewayResponseError$inboundSchema as errors_BadGatewayResponseError$inboundSchema } from "../models/errors/badgatewayresponseerror.js"; import { BadRequestResponseError$inboundSchema as errors_BadRequestResponseError$inboundSchema } from "../models/errors/badrequestresponseerror.js"; import { ForbiddenResponseError$inboundSchema as errors_ForbiddenResponseError$inboundSchema } from "../models/errors/forbiddenresponseerror.js"; import { GatewayTimeoutResponseError$inboundSchema as errors_GatewayTimeoutResponseError$inboundSchema } from "../models/errors/gatewaytimeoutresponseerror.js"; import { InternalServerResponseError$inboundSchema as errors_InternalServerResponseError$inboundSchema } from "../models/errors/internalserverresponseerror.js"; import { NotFoundResponseError$inboundSchema as errors_NotFoundResponseError$inboundSchema } from "../models/errors/notfoundresponseerror.js"; import { RequestTimeoutResponseError$inboundSchema as errors_RequestTimeoutResponseError$inboundSchema } from "../models/errors/requesttimeoutresponseerror.js"; import { ServiceUnavailableResponseError$inboundSchema as errors_ServiceUnavailableResponseError$inboundSchema } from "../models/errors/serviceunavailableresponseerror.js"; import { TooManyRequestsResponseError$inboundSchema as errors_TooManyRequestsResponseError$inboundSchema } from "../models/errors/toomanyrequestsresponseerror.js"; import { UnauthorizedResponseError$inboundSchema as errors_UnauthorizedResponseError$inboundSchema } from "../models/errors/unauthorizedresponseerror.js";
|
|
13
|
+
import { BadGatewayResponseError$inboundSchema as errors_BadGatewayResponseError$inboundSchema } from "../models/errors/badgatewayresponseerror.js"; import { BadRequestResponseError$inboundSchema as errors_BadRequestResponseError$inboundSchema } from "../models/errors/badrequestresponseerror.js"; import { ConflictResponseError$inboundSchema as errors_ConflictResponseError$inboundSchema } from "../models/errors/conflictresponseerror.js"; import { ForbiddenResponseError$inboundSchema as errors_ForbiddenResponseError$inboundSchema } from "../models/errors/forbiddenresponseerror.js"; import { GatewayTimeoutResponseError$inboundSchema as errors_GatewayTimeoutResponseError$inboundSchema } from "../models/errors/gatewaytimeoutresponseerror.js"; import { InternalServerResponseError$inboundSchema as errors_InternalServerResponseError$inboundSchema } from "../models/errors/internalserverresponseerror.js"; import { NotFoundResponseError$inboundSchema as errors_NotFoundResponseError$inboundSchema } from "../models/errors/notfoundresponseerror.js"; import { RequestTimeoutResponseError$inboundSchema as errors_RequestTimeoutResponseError$inboundSchema } from "../models/errors/requesttimeoutresponseerror.js"; import { ServiceUnavailableResponseError$inboundSchema as errors_ServiceUnavailableResponseError$inboundSchema } from "../models/errors/serviceunavailableresponseerror.js"; import { TooManyRequestsResponseError$inboundSchema as errors_TooManyRequestsResponseError$inboundSchema } from "../models/errors/toomanyrequestsresponseerror.js"; import { UnauthorizedResponseError$inboundSchema as errors_UnauthorizedResponseError$inboundSchema } from "../models/errors/unauthorizedresponseerror.js";
|
|
14
14
|
import { DeleteInternVaultSecretRequest$outboundSchema as operations_DeleteInternVaultSecretRequest$outboundSchema } from "../models/operations/deleteinternvaultsecret.js";
|
|
15
15
|
import { APIPromise } from "../types/async.js";
|
|
16
16
|
/**
|
|
@@ -100,7 +100,7 @@ async function $do(client, request, options) {
|
|
|
100
100
|
const responseFields = {
|
|
101
101
|
HttpMeta: { Response: response, Request: req },
|
|
102
102
|
};
|
|
103
|
-
const [result] = await M.match(M.nil(204, z.void()), M.jsonErr(400, errors_BadRequestResponseError$inboundSchema), M.jsonErr(401, errors_UnauthorizedResponseError$inboundSchema), M.jsonErr(403, errors_ForbiddenResponseError$inboundSchema), M.jsonErr(404, errors_NotFoundResponseError$inboundSchema), M.jsonErr(408, errors_RequestTimeoutResponseError$inboundSchema), M.jsonErr(429, errors_TooManyRequestsResponseError$inboundSchema), M.jsonErr(500, errors_InternalServerResponseError$inboundSchema), M.jsonErr(502, errors_BadGatewayResponseError$inboundSchema), M.jsonErr(503, errors_ServiceUnavailableResponseError$inboundSchema), M.jsonErr(504, errors_GatewayTimeoutResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
103
|
+
const [result] = await M.match(M.nil(204, z.void()), M.jsonErr(400, errors_BadRequestResponseError$inboundSchema), M.jsonErr(401, errors_UnauthorizedResponseError$inboundSchema), M.jsonErr(403, errors_ForbiddenResponseError$inboundSchema), M.jsonErr(404, errors_NotFoundResponseError$inboundSchema), M.jsonErr(408, errors_RequestTimeoutResponseError$inboundSchema), M.jsonErr(409, errors_ConflictResponseError$inboundSchema), M.jsonErr(429, errors_TooManyRequestsResponseError$inboundSchema), M.jsonErr(500, errors_InternalServerResponseError$inboundSchema), M.jsonErr(502, errors_BadGatewayResponseError$inboundSchema), M.jsonErr(503, errors_ServiceUnavailableResponseError$inboundSchema), M.jsonErr(504, errors_GatewayTimeoutResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
104
104
|
if (!result.ok) {
|
|
105
105
|
return [result, { status: "complete", request: req, response }];
|
|
106
106
|
}
|
|
@@ -16,5 +16,5 @@ import { Result } from "../types/fp.js";
|
|
|
16
16
|
*
|
|
17
17
|
* If set, this operation will use {@link Security.apiKey} from the global security.
|
|
18
18
|
*/
|
|
19
|
-
export declare function vaultDeleteVaultSecret(client: OpenRouterCore, request: operations.DeleteVaultSecretRequest, options?: RequestOptions): APIPromise<Result<void, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.RequestTimeoutResponseError | errors.TooManyRequestsResponseError | errors.InternalServerResponseError | errors.BadGatewayResponseError | errors.ServiceUnavailableResponseError | errors.GatewayTimeoutResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
19
|
+
export declare function vaultDeleteVaultSecret(client: OpenRouterCore, request: operations.DeleteVaultSecretRequest, options?: RequestOptions): APIPromise<Result<void, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.RequestTimeoutResponseError | errors.ConflictResponseError | errors.TooManyRequestsResponseError | errors.InternalServerResponseError | errors.BadGatewayResponseError | errors.ServiceUnavailableResponseError | errors.GatewayTimeoutResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
20
20
|
//# sourceMappingURL=vaultDeleteVaultSecret.d.ts.map
|
|
@@ -10,7 +10,7 @@ import { compactMap } from "../lib/primitives.js";
|
|
|
10
10
|
import { safeParse } from "../lib/schemas.js";
|
|
11
11
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
12
|
import { pathToFunc } from "../lib/url.js";
|
|
13
|
-
import { BadGatewayResponseError$inboundSchema as errors_BadGatewayResponseError$inboundSchema } from "../models/errors/badgatewayresponseerror.js"; import { BadRequestResponseError$inboundSchema as errors_BadRequestResponseError$inboundSchema } from "../models/errors/badrequestresponseerror.js"; import { ForbiddenResponseError$inboundSchema as errors_ForbiddenResponseError$inboundSchema } from "../models/errors/forbiddenresponseerror.js"; import { GatewayTimeoutResponseError$inboundSchema as errors_GatewayTimeoutResponseError$inboundSchema } from "../models/errors/gatewaytimeoutresponseerror.js"; import { InternalServerResponseError$inboundSchema as errors_InternalServerResponseError$inboundSchema } from "../models/errors/internalserverresponseerror.js"; import { NotFoundResponseError$inboundSchema as errors_NotFoundResponseError$inboundSchema } from "../models/errors/notfoundresponseerror.js"; import { RequestTimeoutResponseError$inboundSchema as errors_RequestTimeoutResponseError$inboundSchema } from "../models/errors/requesttimeoutresponseerror.js"; import { ServiceUnavailableResponseError$inboundSchema as errors_ServiceUnavailableResponseError$inboundSchema } from "../models/errors/serviceunavailableresponseerror.js"; import { TooManyRequestsResponseError$inboundSchema as errors_TooManyRequestsResponseError$inboundSchema } from "../models/errors/toomanyrequestsresponseerror.js"; import { UnauthorizedResponseError$inboundSchema as errors_UnauthorizedResponseError$inboundSchema } from "../models/errors/unauthorizedresponseerror.js";
|
|
13
|
+
import { BadGatewayResponseError$inboundSchema as errors_BadGatewayResponseError$inboundSchema } from "../models/errors/badgatewayresponseerror.js"; import { BadRequestResponseError$inboundSchema as errors_BadRequestResponseError$inboundSchema } from "../models/errors/badrequestresponseerror.js"; import { ConflictResponseError$inboundSchema as errors_ConflictResponseError$inboundSchema } from "../models/errors/conflictresponseerror.js"; import { ForbiddenResponseError$inboundSchema as errors_ForbiddenResponseError$inboundSchema } from "../models/errors/forbiddenresponseerror.js"; import { GatewayTimeoutResponseError$inboundSchema as errors_GatewayTimeoutResponseError$inboundSchema } from "../models/errors/gatewaytimeoutresponseerror.js"; import { InternalServerResponseError$inboundSchema as errors_InternalServerResponseError$inboundSchema } from "../models/errors/internalserverresponseerror.js"; import { NotFoundResponseError$inboundSchema as errors_NotFoundResponseError$inboundSchema } from "../models/errors/notfoundresponseerror.js"; import { RequestTimeoutResponseError$inboundSchema as errors_RequestTimeoutResponseError$inboundSchema } from "../models/errors/requesttimeoutresponseerror.js"; import { ServiceUnavailableResponseError$inboundSchema as errors_ServiceUnavailableResponseError$inboundSchema } from "../models/errors/serviceunavailableresponseerror.js"; import { TooManyRequestsResponseError$inboundSchema as errors_TooManyRequestsResponseError$inboundSchema } from "../models/errors/toomanyrequestsresponseerror.js"; import { UnauthorizedResponseError$inboundSchema as errors_UnauthorizedResponseError$inboundSchema } from "../models/errors/unauthorizedresponseerror.js";
|
|
14
14
|
import { DeleteVaultSecretRequest$outboundSchema as operations_DeleteVaultSecretRequest$outboundSchema } from "../models/operations/deletevaultsecret.js";
|
|
15
15
|
import { APIPromise } from "../types/async.js";
|
|
16
16
|
/**
|
|
@@ -96,7 +96,7 @@ async function $do(client, request, options) {
|
|
|
96
96
|
const responseFields = {
|
|
97
97
|
HttpMeta: { Response: response, Request: req },
|
|
98
98
|
};
|
|
99
|
-
const [result] = await M.match(M.nil(204, z.void()), M.jsonErr(400, errors_BadRequestResponseError$inboundSchema), M.jsonErr(401, errors_UnauthorizedResponseError$inboundSchema), M.jsonErr(403, errors_ForbiddenResponseError$inboundSchema), M.jsonErr(404, errors_NotFoundResponseError$inboundSchema), M.jsonErr(408, errors_RequestTimeoutResponseError$inboundSchema), M.jsonErr(429, errors_TooManyRequestsResponseError$inboundSchema), M.jsonErr(500, errors_InternalServerResponseError$inboundSchema), M.jsonErr(502, errors_BadGatewayResponseError$inboundSchema), M.jsonErr(503, errors_ServiceUnavailableResponseError$inboundSchema), M.jsonErr(504, errors_GatewayTimeoutResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
99
|
+
const [result] = await M.match(M.nil(204, z.void()), M.jsonErr(400, errors_BadRequestResponseError$inboundSchema), M.jsonErr(401, errors_UnauthorizedResponseError$inboundSchema), M.jsonErr(403, errors_ForbiddenResponseError$inboundSchema), M.jsonErr(404, errors_NotFoundResponseError$inboundSchema), M.jsonErr(408, errors_RequestTimeoutResponseError$inboundSchema), M.jsonErr(409, errors_ConflictResponseError$inboundSchema), M.jsonErr(429, errors_TooManyRequestsResponseError$inboundSchema), M.jsonErr(500, errors_InternalServerResponseError$inboundSchema), M.jsonErr(502, errors_BadGatewayResponseError$inboundSchema), M.jsonErr(503, errors_ServiceUnavailableResponseError$inboundSchema), M.jsonErr(504, errors_GatewayTimeoutResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
100
100
|
if (!result.ok) {
|
|
101
101
|
return [result, { status: "complete", request: req, response }];
|
|
102
102
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { OpenRouterCore } from "../core.js";
|
|
2
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
3
|
+
import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
|
|
4
|
+
import * as errors from "../models/errors/index.js";
|
|
5
|
+
import { OpenRouterError } from "../models/errors/openroutererror.js";
|
|
6
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
7
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
8
|
+
import * as operations from "../models/operations/index.js";
|
|
9
|
+
import { APIPromise } from "../types/async.js";
|
|
10
|
+
import { Result } from "../types/fp.js";
|
|
11
|
+
/**
|
|
12
|
+
* List the connections an intern can use
|
|
13
|
+
*
|
|
14
|
+
* @remarks
|
|
15
|
+
* Lists the connections in scope for the intern, by the key of their card on the dashboard's Connections tab: `github`, `slack`, `google`, a catalog MCP server such as `linear` or `notion`, or `mcp:<host>` for a custom MCP server. A connection is listed when it is stored, enabled, and not turned off or hidden for this intern, as the Connections tab lists it; whether its last test passed is not part of the rule. `ori features add` checks a feature's `ori.requires.connections` against this list. Keys only, never credentials. Returns 404 for an intern the key cannot see. The scope is selected by the API key: workspace routes act on the key's active workspace and intern routes act on one intern inside that workspace. There is no default workspace and no fallback to another scope. Every vault route, including reads, requires access to the Intern API programme and returns 404 outside it. An intern's own API key is confined to that intern: it can always read the intern's secrets and effective secrets, writes to them follow the rules above, and every other intern and every workspace route answers 404. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
|
|
16
|
+
*
|
|
17
|
+
* If set, this operation will use {@link Security.apiKey} from the global security.
|
|
18
|
+
*/
|
|
19
|
+
export declare function vaultListInternConnections(client: OpenRouterCore, request: operations.ListInternConnectionsRequest, options?: RequestOptions): APIPromise<Result<operations.ListInternConnectionsResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.RequestTimeoutResponseError | errors.TooManyRequestsResponseError | errors.InternalServerResponseError | errors.BadGatewayResponseError | errors.ServiceUnavailableResponseError | errors.GatewayTimeoutResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
20
|
+
//# sourceMappingURL=vaultListInternConnections.d.ts.map
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: f53ef5db4004
|
|
4
|
+
*/
|
|
5
|
+
import { encodeSimple } from "../lib/encodings.js";
|
|
6
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { compactMap } from "../lib/primitives.js";
|
|
9
|
+
import { safeParse } from "../lib/schemas.js";
|
|
10
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
|
+
import { pathToFunc } from "../lib/url.js";
|
|
12
|
+
import { BadGatewayResponseError$inboundSchema as errors_BadGatewayResponseError$inboundSchema } from "../models/errors/badgatewayresponseerror.js"; import { BadRequestResponseError$inboundSchema as errors_BadRequestResponseError$inboundSchema } from "../models/errors/badrequestresponseerror.js"; import { ForbiddenResponseError$inboundSchema as errors_ForbiddenResponseError$inboundSchema } from "../models/errors/forbiddenresponseerror.js"; import { GatewayTimeoutResponseError$inboundSchema as errors_GatewayTimeoutResponseError$inboundSchema } from "../models/errors/gatewaytimeoutresponseerror.js"; import { InternalServerResponseError$inboundSchema as errors_InternalServerResponseError$inboundSchema } from "../models/errors/internalserverresponseerror.js"; import { NotFoundResponseError$inboundSchema as errors_NotFoundResponseError$inboundSchema } from "../models/errors/notfoundresponseerror.js"; import { RequestTimeoutResponseError$inboundSchema as errors_RequestTimeoutResponseError$inboundSchema } from "../models/errors/requesttimeoutresponseerror.js"; import { ServiceUnavailableResponseError$inboundSchema as errors_ServiceUnavailableResponseError$inboundSchema } from "../models/errors/serviceunavailableresponseerror.js"; import { TooManyRequestsResponseError$inboundSchema as errors_TooManyRequestsResponseError$inboundSchema } from "../models/errors/toomanyrequestsresponseerror.js"; import { UnauthorizedResponseError$inboundSchema as errors_UnauthorizedResponseError$inboundSchema } from "../models/errors/unauthorizedresponseerror.js";
|
|
13
|
+
import { ListInternConnectionsRequest$outboundSchema as operations_ListInternConnectionsRequest$outboundSchema, ListInternConnectionsResponse$inboundSchema as operations_ListInternConnectionsResponse$inboundSchema } from "../models/operations/listinternconnections.js";
|
|
14
|
+
import { APIPromise } from "../types/async.js";
|
|
15
|
+
/**
|
|
16
|
+
* List the connections an intern can use
|
|
17
|
+
*
|
|
18
|
+
* @remarks
|
|
19
|
+
* Lists the connections in scope for the intern, by the key of their card on the dashboard's Connections tab: `github`, `slack`, `google`, a catalog MCP server such as `linear` or `notion`, or `mcp:<host>` for a custom MCP server. A connection is listed when it is stored, enabled, and not turned off or hidden for this intern, as the Connections tab lists it; whether its last test passed is not part of the rule. `ori features add` checks a feature's `ori.requires.connections` against this list. Keys only, never credentials. Returns 404 for an intern the key cannot see. The scope is selected by the API key: workspace routes act on the key's active workspace and intern routes act on one intern inside that workspace. There is no default workspace and no fallback to another scope. Every vault route, including reads, requires access to the Intern API programme and returns 404 outside it. An intern's own API key is confined to that intern: it can always read the intern's secrets and effective secrets, writes to them follow the rules above, and every other intern and every workspace route answers 404. Requests on regional hostnames such as `eu.openrouter.ai` are refused. [API key](/docs/api-reference/authentication) required.
|
|
20
|
+
*
|
|
21
|
+
* If set, this operation will use {@link Security.apiKey} from the global security.
|
|
22
|
+
*/
|
|
23
|
+
export function vaultListInternConnections(client, request, options) {
|
|
24
|
+
return new APIPromise($do(client, request, options));
|
|
25
|
+
}
|
|
26
|
+
async function $do(client, request, options) {
|
|
27
|
+
const parsed = safeParse(request, (value) => operations_ListInternConnectionsRequest$outboundSchema.parse(value), "Input validation failed");
|
|
28
|
+
if (!parsed.ok) {
|
|
29
|
+
return [parsed, { status: "invalid" }];
|
|
30
|
+
}
|
|
31
|
+
const payload = parsed.value;
|
|
32
|
+
const body = null;
|
|
33
|
+
const pathParams = {
|
|
34
|
+
internId: encodeSimple("internId", payload.internId, {
|
|
35
|
+
explode: false,
|
|
36
|
+
charEncoding: "percent",
|
|
37
|
+
}),
|
|
38
|
+
};
|
|
39
|
+
const path = pathToFunc("/vault/interns/{internId}/connections")(pathParams);
|
|
40
|
+
const headers = new Headers(compactMap({
|
|
41
|
+
Accept: "application/json",
|
|
42
|
+
"HTTP-Referer": encodeSimple("HTTP-Referer", payload["HTTP-Referer"] ?? client._options.httpReferer, { explode: false, charEncoding: "none" }),
|
|
43
|
+
"X-OpenRouter-Categories": encodeSimple("X-OpenRouter-Categories", payload.appCategories ?? client._options.appCategories, { explode: false, charEncoding: "none" }),
|
|
44
|
+
"X-OpenRouter-Title": encodeSimple("X-OpenRouter-Title", payload.appTitle ?? client._options.appTitle, { explode: false, charEncoding: "none" }),
|
|
45
|
+
}));
|
|
46
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
47
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
48
|
+
const requestSecurity = resolveGlobalSecurity(securityInput, [0]);
|
|
49
|
+
const context = {
|
|
50
|
+
options: client._options,
|
|
51
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
52
|
+
operationID: "listInternConnections",
|
|
53
|
+
oAuth2Scopes: null,
|
|
54
|
+
resolvedSecurity: requestSecurity,
|
|
55
|
+
securitySource: client._options.apiKey,
|
|
56
|
+
retryConfig: options?.retries
|
|
57
|
+
|| client._options.retryConfig
|
|
58
|
+
|| {
|
|
59
|
+
strategy: "backoff",
|
|
60
|
+
backoff: {
|
|
61
|
+
initialInterval: 500,
|
|
62
|
+
maxInterval: 60000,
|
|
63
|
+
exponent: 1.5,
|
|
64
|
+
maxElapsedTime: 3600000,
|
|
65
|
+
},
|
|
66
|
+
retryConnectionErrors: true,
|
|
67
|
+
}
|
|
68
|
+
|| { strategy: "none" },
|
|
69
|
+
retryCodes: options?.retryCodes || ["5XX"],
|
|
70
|
+
};
|
|
71
|
+
const requestRes = client._createRequest(context, {
|
|
72
|
+
security: requestSecurity,
|
|
73
|
+
method: "GET",
|
|
74
|
+
baseURL: options?.serverURL,
|
|
75
|
+
path: path,
|
|
76
|
+
headers: headers,
|
|
77
|
+
body: body,
|
|
78
|
+
userAgent: client._options.userAgent,
|
|
79
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
80
|
+
}, options);
|
|
81
|
+
if (!requestRes.ok) {
|
|
82
|
+
return [requestRes, { status: "invalid" }];
|
|
83
|
+
}
|
|
84
|
+
const req = requestRes.value;
|
|
85
|
+
const doResult = await client._do(req, {
|
|
86
|
+
context,
|
|
87
|
+
isErrorStatusCode: (statusCode) => matchStatusCode({ status: statusCode }, ["4XX", "5XX"]),
|
|
88
|
+
retryConfig: context.retryConfig,
|
|
89
|
+
retryCodes: context.retryCodes,
|
|
90
|
+
});
|
|
91
|
+
if (!doResult.ok) {
|
|
92
|
+
return [doResult, { status: "request-error", request: req }];
|
|
93
|
+
}
|
|
94
|
+
const response = doResult.value;
|
|
95
|
+
const responseFields = {
|
|
96
|
+
HttpMeta: { Response: response, Request: req },
|
|
97
|
+
};
|
|
98
|
+
const [result] = await M.match(M.json(200, operations_ListInternConnectionsResponse$inboundSchema), M.jsonErr(400, errors_BadRequestResponseError$inboundSchema), M.jsonErr(401, errors_UnauthorizedResponseError$inboundSchema), M.jsonErr(403, errors_ForbiddenResponseError$inboundSchema), M.jsonErr(404, errors_NotFoundResponseError$inboundSchema), M.jsonErr(408, errors_RequestTimeoutResponseError$inboundSchema), M.jsonErr(429, errors_TooManyRequestsResponseError$inboundSchema), M.jsonErr(500, errors_InternalServerResponseError$inboundSchema), M.jsonErr(502, errors_BadGatewayResponseError$inboundSchema), M.jsonErr(503, errors_ServiceUnavailableResponseError$inboundSchema), M.jsonErr(504, errors_GatewayTimeoutResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
99
|
+
if (!result.ok) {
|
|
100
|
+
return [result, { status: "complete", request: req, response }];
|
|
101
|
+
}
|
|
102
|
+
return [result, { status: "complete", request: req, response }];
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=vaultListInternConnections.js.map
|
|
@@ -17,5 +17,5 @@ import { Result } from "../types/fp.js";
|
|
|
17
17
|
*
|
|
18
18
|
* If set, this operation will use {@link Security.apiKey} from the global security.
|
|
19
19
|
*/
|
|
20
|
-
export declare function vaultStoreVaultSecret(client: OpenRouterCore, request: operations.StoreVaultSecretRequest, options?: RequestOptions): APIPromise<Result<models.VaultSecretResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.RequestTimeoutResponseError | errors.PayloadTooLargeResponseError | errors.TooManyRequestsResponseError | errors.InternalServerResponseError | errors.BadGatewayResponseError | errors.ServiceUnavailableResponseError | errors.GatewayTimeoutResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
20
|
+
export declare function vaultStoreVaultSecret(client: OpenRouterCore, request: operations.StoreVaultSecretRequest, options?: RequestOptions): APIPromise<Result<models.VaultSecretResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.RequestTimeoutResponseError | errors.ConflictResponseError | errors.PayloadTooLargeResponseError | errors.TooManyRequestsResponseError | errors.InternalServerResponseError | errors.BadGatewayResponseError | errors.ServiceUnavailableResponseError | errors.GatewayTimeoutResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
21
21
|
//# sourceMappingURL=vaultStoreVaultSecret.d.ts.map
|
|
@@ -9,7 +9,7 @@ import { compactMap } from "../lib/primitives.js";
|
|
|
9
9
|
import { safeParse } from "../lib/schemas.js";
|
|
10
10
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
11
|
import { pathToFunc } from "../lib/url.js";
|
|
12
|
-
import { BadGatewayResponseError$inboundSchema as errors_BadGatewayResponseError$inboundSchema } from "../models/errors/badgatewayresponseerror.js"; import { BadRequestResponseError$inboundSchema as errors_BadRequestResponseError$inboundSchema } from "../models/errors/badrequestresponseerror.js"; import { ForbiddenResponseError$inboundSchema as errors_ForbiddenResponseError$inboundSchema } from "../models/errors/forbiddenresponseerror.js"; import { GatewayTimeoutResponseError$inboundSchema as errors_GatewayTimeoutResponseError$inboundSchema } from "../models/errors/gatewaytimeoutresponseerror.js"; import { InternalServerResponseError$inboundSchema as errors_InternalServerResponseError$inboundSchema } from "../models/errors/internalserverresponseerror.js"; import { NotFoundResponseError$inboundSchema as errors_NotFoundResponseError$inboundSchema } from "../models/errors/notfoundresponseerror.js"; import { PayloadTooLargeResponseError$inboundSchema as errors_PayloadTooLargeResponseError$inboundSchema } from "../models/errors/payloadtoolargeresponseerror.js"; import { RequestTimeoutResponseError$inboundSchema as errors_RequestTimeoutResponseError$inboundSchema } from "../models/errors/requesttimeoutresponseerror.js"; import { ServiceUnavailableResponseError$inboundSchema as errors_ServiceUnavailableResponseError$inboundSchema } from "../models/errors/serviceunavailableresponseerror.js"; import { TooManyRequestsResponseError$inboundSchema as errors_TooManyRequestsResponseError$inboundSchema } from "../models/errors/toomanyrequestsresponseerror.js"; import { UnauthorizedResponseError$inboundSchema as errors_UnauthorizedResponseError$inboundSchema } from "../models/errors/unauthorizedresponseerror.js";
|
|
12
|
+
import { BadGatewayResponseError$inboundSchema as errors_BadGatewayResponseError$inboundSchema } from "../models/errors/badgatewayresponseerror.js"; import { BadRequestResponseError$inboundSchema as errors_BadRequestResponseError$inboundSchema } from "../models/errors/badrequestresponseerror.js"; import { ConflictResponseError$inboundSchema as errors_ConflictResponseError$inboundSchema } from "../models/errors/conflictresponseerror.js"; import { ForbiddenResponseError$inboundSchema as errors_ForbiddenResponseError$inboundSchema } from "../models/errors/forbiddenresponseerror.js"; import { GatewayTimeoutResponseError$inboundSchema as errors_GatewayTimeoutResponseError$inboundSchema } from "../models/errors/gatewaytimeoutresponseerror.js"; import { InternalServerResponseError$inboundSchema as errors_InternalServerResponseError$inboundSchema } from "../models/errors/internalserverresponseerror.js"; import { NotFoundResponseError$inboundSchema as errors_NotFoundResponseError$inboundSchema } from "../models/errors/notfoundresponseerror.js"; import { PayloadTooLargeResponseError$inboundSchema as errors_PayloadTooLargeResponseError$inboundSchema } from "../models/errors/payloadtoolargeresponseerror.js"; import { RequestTimeoutResponseError$inboundSchema as errors_RequestTimeoutResponseError$inboundSchema } from "../models/errors/requesttimeoutresponseerror.js"; import { ServiceUnavailableResponseError$inboundSchema as errors_ServiceUnavailableResponseError$inboundSchema } from "../models/errors/serviceunavailableresponseerror.js"; import { TooManyRequestsResponseError$inboundSchema as errors_TooManyRequestsResponseError$inboundSchema } from "../models/errors/toomanyrequestsresponseerror.js"; import { UnauthorizedResponseError$inboundSchema as errors_UnauthorizedResponseError$inboundSchema } from "../models/errors/unauthorizedresponseerror.js";
|
|
13
13
|
import { VaultSecretResponse$inboundSchema as models_VaultSecretResponse$inboundSchema } from "../models/vaultsecretresponse.js";
|
|
14
14
|
import { StoreVaultSecretRequest$outboundSchema as operations_StoreVaultSecretRequest$outboundSchema } from "../models/operations/storevaultsecret.js";
|
|
15
15
|
import { APIPromise } from "../types/async.js";
|
|
@@ -99,7 +99,7 @@ async function $do(client, request, options) {
|
|
|
99
99
|
const responseFields = {
|
|
100
100
|
HttpMeta: { Response: response, Request: req },
|
|
101
101
|
};
|
|
102
|
-
const [result] = await M.match(M.json(200, models_VaultSecretResponse$inboundSchema), M.jsonErr(400, errors_BadRequestResponseError$inboundSchema), M.jsonErr(401, errors_UnauthorizedResponseError$inboundSchema), M.jsonErr(403, errors_ForbiddenResponseError$inboundSchema), M.jsonErr(404, errors_NotFoundResponseError$inboundSchema), M.jsonErr(408, errors_RequestTimeoutResponseError$inboundSchema), M.jsonErr(413, errors_PayloadTooLargeResponseError$inboundSchema), M.jsonErr(429, errors_TooManyRequestsResponseError$inboundSchema), M.jsonErr(500, errors_InternalServerResponseError$inboundSchema), M.jsonErr(502, errors_BadGatewayResponseError$inboundSchema), M.jsonErr(503, errors_ServiceUnavailableResponseError$inboundSchema), M.jsonErr(504, errors_GatewayTimeoutResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
102
|
+
const [result] = await M.match(M.json(200, models_VaultSecretResponse$inboundSchema), M.jsonErr(400, errors_BadRequestResponseError$inboundSchema), M.jsonErr(401, errors_UnauthorizedResponseError$inboundSchema), M.jsonErr(403, errors_ForbiddenResponseError$inboundSchema), M.jsonErr(404, errors_NotFoundResponseError$inboundSchema), M.jsonErr(408, errors_RequestTimeoutResponseError$inboundSchema), M.jsonErr(409, errors_ConflictResponseError$inboundSchema), M.jsonErr(413, errors_PayloadTooLargeResponseError$inboundSchema), M.jsonErr(429, errors_TooManyRequestsResponseError$inboundSchema), M.jsonErr(500, errors_InternalServerResponseError$inboundSchema), M.jsonErr(502, errors_BadGatewayResponseError$inboundSchema), M.jsonErr(503, errors_ServiceUnavailableResponseError$inboundSchema), M.jsonErr(504, errors_GatewayTimeoutResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
103
103
|
if (!result.ok) {
|
|
104
104
|
return [result, { status: "complete", request: req, response }];
|
|
105
105
|
}
|
|
@@ -15,5 +15,5 @@ import { Result } from "../types/fp.js";
|
|
|
15
15
|
* @remarks
|
|
16
16
|
* Submits a video generation request and returns a polling URL to check status
|
|
17
17
|
*/
|
|
18
|
-
export declare function videoGenerationGenerate(client: OpenRouterCore, request: operations.CreateVideosRequest, options?: RequestOptions): APIPromise<Result<models.VideoGenerationResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.PaymentRequiredResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.PayloadTooLargeResponseError | errors.TooManyRequestsResponseError | errors.InternalServerResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
18
|
+
export declare function videoGenerationGenerate(client: OpenRouterCore, request: operations.CreateVideosRequest, options?: RequestOptions): APIPromise<Result<models.VideoGenerationResponse, errors.BadRequestResponseError | errors.UnauthorizedResponseError | errors.PaymentRequiredResponseError | errors.ForbiddenResponseError | errors.NotFoundResponseError | errors.PayloadTooLargeResponseError | errors.TooManyRequestsResponseError | errors.ClientClosedRequestResponseError | errors.InternalServerResponseError | errors.ServiceUnavailableResponseError | OpenRouterError | ResponseValidationError | ConnectionError | RequestAbortedError | RequestTimeoutError | InvalidRequestError | UnexpectedClientError | SDKValidationError>>;
|
|
19
19
|
//# sourceMappingURL=videoGenerationGenerate.d.ts.map
|
|
@@ -9,7 +9,7 @@ import { compactMap } from "../lib/primitives.js";
|
|
|
9
9
|
import { safeParse } from "../lib/schemas.js";
|
|
10
10
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
11
11
|
import { pathToFunc } from "../lib/url.js";
|
|
12
|
-
import { BadRequestResponseError$inboundSchema as errors_BadRequestResponseError$inboundSchema } from "../models/errors/badrequestresponseerror.js"; import { ForbiddenResponseError$inboundSchema as errors_ForbiddenResponseError$inboundSchema } from "../models/errors/forbiddenresponseerror.js"; import { InternalServerResponseError$inboundSchema as errors_InternalServerResponseError$inboundSchema } from "../models/errors/internalserverresponseerror.js"; import { NotFoundResponseError$inboundSchema as errors_NotFoundResponseError$inboundSchema } from "../models/errors/notfoundresponseerror.js"; import { PayloadTooLargeResponseError$inboundSchema as errors_PayloadTooLargeResponseError$inboundSchema } from "../models/errors/payloadtoolargeresponseerror.js"; import { PaymentRequiredResponseError$inboundSchema as errors_PaymentRequiredResponseError$inboundSchema } from "../models/errors/paymentrequiredresponseerror.js"; import { TooManyRequestsResponseError$inboundSchema as errors_TooManyRequestsResponseError$inboundSchema } from "../models/errors/toomanyrequestsresponseerror.js"; import { UnauthorizedResponseError$inboundSchema as errors_UnauthorizedResponseError$inboundSchema } from "../models/errors/unauthorizedresponseerror.js";
|
|
12
|
+
import { BadRequestResponseError$inboundSchema as errors_BadRequestResponseError$inboundSchema } from "../models/errors/badrequestresponseerror.js"; import { ClientClosedRequestResponseError$inboundSchema as errors_ClientClosedRequestResponseError$inboundSchema } from "../models/errors/clientclosedrequestresponseerror.js"; import { ForbiddenResponseError$inboundSchema as errors_ForbiddenResponseError$inboundSchema } from "../models/errors/forbiddenresponseerror.js"; import { InternalServerResponseError$inboundSchema as errors_InternalServerResponseError$inboundSchema } from "../models/errors/internalserverresponseerror.js"; import { NotFoundResponseError$inboundSchema as errors_NotFoundResponseError$inboundSchema } from "../models/errors/notfoundresponseerror.js"; import { PayloadTooLargeResponseError$inboundSchema as errors_PayloadTooLargeResponseError$inboundSchema } from "../models/errors/payloadtoolargeresponseerror.js"; import { PaymentRequiredResponseError$inboundSchema as errors_PaymentRequiredResponseError$inboundSchema } from "../models/errors/paymentrequiredresponseerror.js"; import { ServiceUnavailableResponseError$inboundSchema as errors_ServiceUnavailableResponseError$inboundSchema } from "../models/errors/serviceunavailableresponseerror.js"; import { TooManyRequestsResponseError$inboundSchema as errors_TooManyRequestsResponseError$inboundSchema } from "../models/errors/toomanyrequestsresponseerror.js"; import { UnauthorizedResponseError$inboundSchema as errors_UnauthorizedResponseError$inboundSchema } from "../models/errors/unauthorizedresponseerror.js";
|
|
13
13
|
import { VideoGenerationResponse$inboundSchema as models_VideoGenerationResponse$inboundSchema } from "../models/videogenerationresponse.js";
|
|
14
14
|
import { CreateVideosRequest$outboundSchema as operations_CreateVideosRequest$outboundSchema } from "../models/operations/createvideos.js";
|
|
15
15
|
import { APIPromise } from "../types/async.js";
|
|
@@ -91,7 +91,7 @@ async function $do(client, request, options) {
|
|
|
91
91
|
const responseFields = {
|
|
92
92
|
HttpMeta: { Response: response, Request: req },
|
|
93
93
|
};
|
|
94
|
-
const [result] = await M.match(M.json(202, models_VideoGenerationResponse$inboundSchema), M.jsonErr(400, errors_BadRequestResponseError$inboundSchema), M.jsonErr(401, errors_UnauthorizedResponseError$inboundSchema), M.jsonErr(402, errors_PaymentRequiredResponseError$inboundSchema), M.jsonErr(403, errors_ForbiddenResponseError$inboundSchema), M.jsonErr(404, errors_NotFoundResponseError$inboundSchema), M.jsonErr(413, errors_PayloadTooLargeResponseError$inboundSchema), M.jsonErr(429, errors_TooManyRequestsResponseError$inboundSchema), M.jsonErr(500, errors_InternalServerResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
94
|
+
const [result] = await M.match(M.json(202, models_VideoGenerationResponse$inboundSchema), M.jsonErr(400, errors_BadRequestResponseError$inboundSchema), M.jsonErr(401, errors_UnauthorizedResponseError$inboundSchema), M.jsonErr(402, errors_PaymentRequiredResponseError$inboundSchema), M.jsonErr(403, errors_ForbiddenResponseError$inboundSchema), M.jsonErr(404, errors_NotFoundResponseError$inboundSchema), M.jsonErr(413, errors_PayloadTooLargeResponseError$inboundSchema), M.jsonErr(429, errors_TooManyRequestsResponseError$inboundSchema), M.jsonErr(499, errors_ClientClosedRequestResponseError$inboundSchema), M.jsonErr(500, errors_InternalServerResponseError$inboundSchema), M.jsonErr(503, errors_ServiceUnavailableResponseError$inboundSchema), M.fail("4XX"), M.fail("5XX"))(response, req, { extraFields: responseFields });
|
|
95
95
|
if (!result.ok) {
|
|
96
96
|
return [result, { status: "complete", request: req, response }];
|
|
97
97
|
}
|
package/esm/lib/config.d.ts
CHANGED
|
@@ -50,8 +50,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
|
|
|
50
50
|
export declare const SDK_METADATA: {
|
|
51
51
|
readonly language: "typescript";
|
|
52
52
|
readonly openapiDocVersion: "1.0.0";
|
|
53
|
-
readonly sdkVersion: "1.
|
|
54
|
-
readonly genVersion: "2.
|
|
55
|
-
readonly userAgent: "speakeasy-sdk/typescript 1.
|
|
53
|
+
readonly sdkVersion: "1.5.0";
|
|
54
|
+
readonly genVersion: "2.948.4";
|
|
55
|
+
readonly userAgent: "speakeasy-sdk/typescript 1.5.0 2.948.4 1.0.0 @openrouter/sdk";
|
|
56
56
|
};
|
|
57
57
|
//# sourceMappingURL=config.d.ts.map
|
package/esm/lib/config.js
CHANGED
|
@@ -29,8 +29,8 @@ export function serverURLFromOptions(options) {
|
|
|
29
29
|
export const SDK_METADATA = {
|
|
30
30
|
language: "typescript",
|
|
31
31
|
openapiDocVersion: "1.0.0",
|
|
32
|
-
sdkVersion: "1.
|
|
33
|
-
genVersion: "2.
|
|
34
|
-
userAgent: "speakeasy-sdk/typescript 1.
|
|
32
|
+
sdkVersion: "1.5.0",
|
|
33
|
+
genVersion: "2.948.4",
|
|
34
|
+
userAgent: "speakeasy-sdk/typescript 1.5.0 2.948.4 1.0.0 @openrouter/sdk",
|
|
35
35
|
};
|
|
36
36
|
//# sourceMappingURL=config.js.map
|
package/esm/lib/encodings.d.ts
CHANGED
|
@@ -1,43 +1,44 @@
|
|
|
1
1
|
export declare class EncodingError extends Error {
|
|
2
2
|
constructor(message: string);
|
|
3
3
|
}
|
|
4
|
+
export type CharEncoding = "percent" | "percentExceptReserved" | "none";
|
|
4
5
|
export declare function encodeMatrix(key: string, value: unknown, options?: {
|
|
5
6
|
explode?: boolean;
|
|
6
|
-
charEncoding?:
|
|
7
|
+
charEncoding?: CharEncoding;
|
|
7
8
|
}): string | undefined;
|
|
8
9
|
export declare function encodeLabel(key: string, value: unknown, options?: {
|
|
9
10
|
explode?: boolean;
|
|
10
|
-
charEncoding?:
|
|
11
|
+
charEncoding?: CharEncoding;
|
|
11
12
|
}): string | undefined;
|
|
12
13
|
type FormEncoder = (key: string, value: unknown, options?: {
|
|
13
14
|
explode?: boolean;
|
|
14
|
-
charEncoding?:
|
|
15
|
+
charEncoding?: CharEncoding;
|
|
15
16
|
}) => string | undefined;
|
|
16
17
|
export declare const encodeForm: FormEncoder;
|
|
17
18
|
export declare const encodeSpaceDelimited: FormEncoder;
|
|
18
19
|
export declare const encodePipeDelimited: FormEncoder;
|
|
19
20
|
export declare function encodeBodyForm(key: string, value: unknown, options?: {
|
|
20
21
|
explode?: boolean;
|
|
21
|
-
charEncoding?:
|
|
22
|
+
charEncoding?: CharEncoding;
|
|
22
23
|
}): string;
|
|
23
24
|
export declare function encodeDeepObject(key: string, value: unknown, options?: {
|
|
24
|
-
charEncoding?:
|
|
25
|
+
charEncoding?: CharEncoding;
|
|
25
26
|
}): string | undefined;
|
|
26
27
|
export declare function encodeDeepObjectObject(key: string, value: unknown, options?: {
|
|
27
|
-
charEncoding?:
|
|
28
|
+
charEncoding?: CharEncoding;
|
|
28
29
|
}): string | undefined;
|
|
29
30
|
export declare function encodeJSON(key: string, value: unknown, options?: {
|
|
30
31
|
explode?: boolean;
|
|
31
|
-
charEncoding?:
|
|
32
|
+
charEncoding?: CharEncoding;
|
|
32
33
|
}): string | undefined;
|
|
33
34
|
export declare const encodeSimple: (key: string, value: unknown, options?: {
|
|
34
35
|
explode?: boolean;
|
|
35
|
-
charEncoding?:
|
|
36
|
+
charEncoding?: CharEncoding;
|
|
36
37
|
}) => string | undefined;
|
|
37
38
|
export declare function queryJoin(...args: (string | undefined)[]): string;
|
|
38
39
|
type QueryEncoderOptions = {
|
|
39
40
|
explode?: boolean;
|
|
40
|
-
charEncoding?:
|
|
41
|
+
charEncoding?: CharEncoding;
|
|
41
42
|
allowEmptyValue?: string[];
|
|
42
43
|
};
|
|
43
44
|
type QueryEncoder = (key: string, value: unknown, options?: QueryEncoderOptions) => string | undefined;
|