@openrouter/sdk 0.0.1-beta.9 → 0.1.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/REACT_QUERY.md +3 -12
- package/README.md +52 -396
- package/esm/funcs/analyticsGetUserActivity.d.ts +1 -1
- package/esm/funcs/analyticsGetUserActivity.js +2 -2
- package/esm/funcs/apiKeysCreate.d.ts +1 -1
- package/esm/funcs/apiKeysCreate.js +2 -2
- package/esm/funcs/apiKeysDelete.d.ts +1 -1
- package/esm/funcs/apiKeysDelete.js +2 -2
- package/esm/funcs/apiKeysGet.d.ts +1 -1
- package/esm/funcs/apiKeysGet.js +2 -2
- package/esm/funcs/apiKeysGetCurrentKeyMetadata.d.ts +1 -1
- package/esm/funcs/apiKeysGetCurrentKeyMetadata.js +2 -2
- package/esm/funcs/apiKeysList.d.ts +1 -1
- package/esm/funcs/apiKeysList.js +2 -2
- package/esm/funcs/apiKeysUpdate.d.ts +1 -1
- package/esm/funcs/apiKeysUpdate.js +2 -2
- package/esm/funcs/betaResponsesSend.d.ts +9 -1
- package/esm/funcs/betaResponsesSend.js +38 -14
- package/esm/funcs/chatSend.d.ts +7 -0
- package/esm/funcs/chatSend.js +1 -7
- package/esm/funcs/creditsCreateCoinbaseCharge.d.ts +1 -1
- package/esm/funcs/creditsCreateCoinbaseCharge.js +15 -5
- package/esm/funcs/creditsGetCredits.d.ts +1 -1
- package/esm/funcs/creditsGetCredits.js +2 -2
- package/esm/funcs/endpointsList.d.ts +1 -1
- package/esm/funcs/endpointsList.js +2 -2
- package/esm/funcs/endpointsListZdrEndpoints.d.ts +2 -1
- package/esm/funcs/endpointsListZdrEndpoints.js +6 -2
- package/esm/funcs/generationsGetGeneration.d.ts +1 -1
- package/esm/funcs/generationsGetGeneration.js +13 -2
- package/esm/funcs/modelsCount.d.ts +3 -2
- package/esm/funcs/modelsCount.js +7 -3
- package/esm/funcs/modelsList.d.ts +3 -1
- package/esm/funcs/modelsList.js +8 -7
- package/esm/funcs/modelsListForUser.d.ts +3 -1
- package/esm/funcs/modelsListForUser.js +7 -3
- package/esm/funcs/oAuthCreateAuthCode.d.ts +18 -0
- package/esm/funcs/oAuthCreateAuthCode.js +82 -0
- package/esm/funcs/oAuthCreateAuthorizationUrl.d.ts +2 -2
- package/esm/funcs/oAuthExchangeAuthCodeForAPIKey.d.ts +18 -0
- package/esm/funcs/oAuthExchangeAuthCodeForAPIKey.js +82 -0
- package/esm/funcs/parametersGetParameters.d.ts +1 -1
- package/esm/funcs/parametersGetParameters.js +2 -2
- package/esm/funcs/providersList.d.ts +1 -1
- package/esm/funcs/providersList.js +1 -1
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/lib/event-streams.d.ts +1 -1
- package/esm/models/badgatewayresponseerrordata.d.ts +40 -0
- package/esm/models/badgatewayresponseerrordata.js +35 -0
- package/esm/models/badrequestresponseerrordata.d.ts +40 -0
- package/esm/models/badrequestresponseerrordata.js +35 -0
- package/esm/models/chatgenerationparams.d.ts +12 -12
- package/esm/models/chatgenerationparams.js +16 -16
- package/esm/models/chatgenerationtokenusage.d.ts +2 -2
- package/esm/models/chatgenerationtokenusage.js +2 -4
- package/esm/models/chatmessagetokenlogprob.d.ts +15 -15
- package/esm/models/chatmessagetokenlogprob.js +16 -15
- package/esm/models/chatstreamingresponsechunk.d.ts +15 -15
- package/esm/models/chatstreamingresponsechunk.js +15 -15
- package/esm/models/completioncreateparams.d.ts +2 -2
- package/esm/models/completioncreateparams.js +2 -2
- package/esm/models/createchargerequest.d.ts +31 -2
- package/esm/models/createchargerequest.js +47 -2
- package/esm/models/defaultparameters.d.ts +36 -0
- package/esm/models/defaultparameters.js +46 -0
- package/esm/models/edgenetworktimeoutresponseerrordata.d.ts +40 -0
- package/esm/models/edgenetworktimeoutresponseerrordata.js +35 -0
- package/esm/models/endpointstatus.d.ts +26 -0
- package/esm/models/endpointstatus.js +36 -0
- package/esm/models/errors/badgatewayresponseerror.d.ts +52 -0
- package/esm/models/errors/badgatewayresponseerror.js +63 -0
- package/esm/models/errors/badrequestresponseerror.d.ts +52 -0
- package/esm/models/errors/badrequestresponseerror.js +63 -0
- package/esm/models/errors/edgenetworktimeoutresponseerror.d.ts +52 -0
- package/esm/models/errors/edgenetworktimeoutresponseerror.js +63 -0
- package/esm/models/errors/forbiddenresponseerror.d.ts +52 -0
- package/esm/models/errors/forbiddenresponseerror.js +63 -0
- package/esm/models/errors/index.d.ts +14 -2
- package/esm/models/errors/index.js +14 -2
- package/esm/models/errors/internalserverresponseerror.d.ts +52 -0
- package/esm/models/errors/internalserverresponseerror.js +63 -0
- package/esm/models/errors/notfoundresponseerror.d.ts +52 -0
- package/esm/models/errors/{errorresponse.js → notfoundresponseerror.js} +16 -17
- package/esm/models/errors/payloadtoolargeresponseerror.d.ts +52 -0
- package/esm/models/errors/payloadtoolargeresponseerror.js +63 -0
- package/esm/models/errors/paymentrequiredresponseerror.d.ts +52 -0
- package/esm/models/errors/paymentrequiredresponseerror.js +63 -0
- package/esm/models/errors/provideroverloadedresponseerror.d.ts +52 -0
- package/esm/models/errors/provideroverloadedresponseerror.js +63 -0
- package/esm/models/errors/requesttimeoutresponseerror.d.ts +52 -0
- package/esm/models/errors/requesttimeoutresponseerror.js +63 -0
- package/esm/models/errors/serviceunavailableresponseerror.d.ts +52 -0
- package/esm/models/errors/serviceunavailableresponseerror.js +63 -0
- package/esm/models/errors/toomanyrequestsresponseerror.d.ts +52 -0
- package/esm/models/errors/toomanyrequestsresponseerror.js +63 -0
- package/esm/models/errors/unauthorizedresponseerror.d.ts +52 -0
- package/esm/models/errors/unauthorizedresponseerror.js +63 -0
- package/esm/models/errors/unprocessableentityresponseerror.d.ts +52 -0
- package/esm/models/errors/unprocessableentityresponseerror.js +63 -0
- package/esm/models/filecitation.d.ts +58 -0
- package/esm/models/filecitation.js +65 -0
- package/esm/models/filepath.d.ts +56 -0
- package/esm/models/filepath.js +64 -0
- package/esm/models/forbiddenresponseerrordata.d.ts +40 -0
- package/esm/models/forbiddenresponseerrordata.js +35 -0
- package/esm/models/index.d.ts +67 -23
- package/esm/models/index.js +67 -23
- package/esm/models/inputmodality.d.ts +25 -0
- package/esm/models/inputmodality.js +35 -0
- package/esm/models/instructtype.d.ts +48 -0
- package/esm/models/instructtype.js +55 -0
- package/esm/models/internalserverresponseerrordata.d.ts +40 -0
- package/esm/models/internalserverresponseerrordata.js +35 -0
- package/esm/models/listendpointsresponse.d.ts +126 -2
- package/esm/models/listendpointsresponse.js +115 -2
- package/esm/models/model.d.ts +101 -0
- package/esm/models/model.js +82 -0
- package/esm/models/modelarchitecture.d.ts +104 -0
- package/esm/models/modelarchitecture.js +107 -0
- package/esm/models/modelgroup.d.ts +45 -0
- package/esm/models/modelgroup.js +53 -0
- package/esm/models/modelscountresponse.d.ts +40 -2
- package/esm/models/modelscountresponse.js +31 -2
- package/esm/models/modelslistresponse.d.ts +10 -2
- package/esm/models/modelslistresponse.js +7 -2
- package/esm/models/notfoundresponseerrordata.d.ts +40 -0
- package/esm/models/notfoundresponseerrordata.js +35 -0
- package/esm/models/openairesponsesannotation.d.ts +28 -0
- package/esm/models/openairesponsesannotation.js +38 -0
- package/esm/models/openairesponsesincludable.d.ts +25 -0
- package/esm/models/openairesponsesincludable.js +35 -0
- package/esm/models/openairesponsesincompletedetails.d.ts +49 -0
- package/esm/models/openairesponsesincompletedetails.js +58 -0
- package/esm/models/openairesponsesinputunion.d.ts +588 -0
- package/esm/models/openairesponsesinputunion.js +686 -0
- package/esm/models/openairesponsesprompt.d.ts +83 -0
- package/esm/models/openairesponsesprompt.js +97 -0
- package/esm/models/openairesponsesreasoningconfig.d.ts +33 -0
- package/esm/models/openairesponsesreasoningconfig.js +35 -0
- package/esm/models/openairesponsesreasoningeffort.d.ts +24 -0
- package/esm/models/openairesponsesreasoningeffort.js +34 -0
- package/esm/models/openairesponsesrefusalcontent.d.ts +54 -0
- package/esm/models/openairesponsesrefusalcontent.js +51 -0
- package/esm/models/openairesponsesresponsestatus.d.ts +26 -0
- package/esm/models/openairesponsesresponsestatus.js +36 -0
- package/esm/models/openairesponsesservicetier.d.ts +25 -0
- package/esm/models/openairesponsesservicetier.js +35 -0
- package/esm/models/openairesponsestoolchoiceunion.d.ts +231 -0
- package/esm/models/openairesponsestoolchoiceunion.js +233 -0
- package/esm/models/openairesponsestruncation.d.ts +22 -0
- package/esm/models/openairesponsestruncation.js +32 -0
- package/esm/models/openresponseseasyinputmessage.d.ts +75 -19
- package/esm/models/openresponseseasyinputmessage.js +105 -16
- package/esm/models/openresponseserrorevent.d.ts +63 -0
- package/esm/models/openresponseserrorevent.js +66 -0
- package/esm/models/openresponsesimagegencallcompleted.d.ts +61 -0
- package/esm/models/openresponsesimagegencallcompleted.js +68 -0
- package/esm/models/openresponsesimagegencallgenerating.d.ts +61 -0
- package/esm/models/openresponsesimagegencallgenerating.js +68 -0
- package/esm/models/openresponsesimagegencallinprogress.d.ts +61 -0
- package/esm/models/openresponsesimagegencallinprogress.js +68 -0
- package/esm/models/openresponsesimagegencallpartialimage.d.ts +65 -0
- package/esm/models/openresponsesimagegencallpartialimage.js +76 -0
- package/esm/models/openresponsesinput.d.ts +36 -5
- package/esm/models/openresponsesinput.js +82 -5
- package/esm/models/openresponsesinputmessageitem.d.ts +52 -8
- package/esm/models/openresponsesinputmessageitem.js +68 -5
- package/esm/models/openresponseslogprobs.d.ts +3 -32
- package/esm/models/openresponseslogprobs.js +3 -29
- package/esm/models/openresponsesnonstreamingresponse.d.ts +93 -123
- package/esm/models/openresponsesnonstreamingresponse.js +111 -145
- package/esm/models/openresponsesreasoning.d.ts +89 -0
- package/esm/models/openresponsesreasoning.js +93 -0
- package/esm/models/openresponsesreasoningconfig.d.ts +2 -23
- package/esm/models/openresponsesreasoningconfig.js +3 -33
- package/esm/models/openresponsesreasoningdeltaevent.d.ts +65 -0
- package/esm/models/openresponsesreasoningdeltaevent.js +74 -0
- package/esm/models/openresponsesreasoningdoneevent.d.ts +65 -0
- package/esm/models/openresponsesreasoningdoneevent.js +74 -0
- package/esm/models/openresponsesreasoningsummarypartaddedevent.d.ts +66 -0
- package/esm/models/openresponsesreasoningsummarypartaddedevent.js +75 -0
- package/esm/models/openresponsesreasoningsummarytextdeltaevent.d.ts +65 -0
- package/esm/models/openresponsesreasoningsummarytextdeltaevent.js +74 -0
- package/esm/models/openresponsesreasoningsummarytextdoneevent.d.ts +65 -0
- package/esm/models/openresponsesreasoningsummarytextdoneevent.js +74 -0
- package/esm/models/openresponsesrequest.d.ts +736 -2
- package/esm/models/openresponsesrequest.js +789 -2
- package/esm/models/openresponsesresponsetext.d.ts +59 -0
- package/esm/models/openresponsesresponsetext.js +64 -0
- package/esm/models/openresponsesstreamevent.d.ts +25 -612
- package/esm/models/openresponsesstreamevent.js +51 -742
- package/esm/models/openresponsestoplogprobs.d.ts +34 -0
- package/esm/models/openresponsestoplogprobs.js +33 -0
- package/esm/models/{responsesusage.d.ts → openresponsesusage.d.ts} +14 -14
- package/esm/models/{responsesusage.js → openresponsesusage.js} +14 -14
- package/esm/models/operations/createauthkeyscode.d.ts +145 -0
- package/esm/models/operations/createauthkeyscode.js +146 -0
- package/esm/models/operations/createresponses.d.ts +58 -0
- package/esm/models/operations/createresponses.js +80 -0
- package/esm/models/operations/exchangeauthcodeforapikey.d.ts +104 -0
- package/esm/models/operations/exchangeauthcodeforapikey.js +111 -0
- package/esm/models/operations/getmodels.d.ts +0 -26
- package/esm/models/operations/getmodels.js +0 -38
- package/esm/models/operations/getparameters.d.ts +1 -0
- package/esm/models/operations/getparameters.js +1 -0
- package/esm/models/operations/index.d.ts +3 -2
- package/esm/models/operations/index.js +3 -2
- package/esm/models/operations/listendpointszdr.d.ts +3 -24
- package/esm/models/operations/listendpointszdr.js +2 -29
- package/esm/models/operations/listmodelsuser.d.ts +0 -22
- package/esm/models/operations/listmodelsuser.js +0 -28
- package/esm/models/operations/listproviders.d.ts +0 -36
- package/esm/models/operations/listproviders.js +0 -28
- package/esm/models/operations/sendchatcompletionrequest.d.ts +1 -1
- package/esm/models/operations/sendchatcompletionrequest.js +2 -1
- package/esm/models/outputitemimagegenerationcall.d.ts +59 -0
- package/esm/models/outputitemimagegenerationcall.js +56 -0
- package/esm/models/outputmessage.d.ts +192 -0
- package/esm/models/outputmessage.js +202 -0
- package/esm/models/outputmodality.d.ts +23 -0
- package/esm/models/outputmodality.js +33 -0
- package/esm/models/parameter.d.ts +43 -0
- package/esm/models/parameter.js +54 -0
- package/esm/models/payloadtoolargeresponseerrordata.d.ts +40 -0
- package/esm/models/payloadtoolargeresponseerrordata.js +35 -0
- package/esm/models/paymentrequiredresponseerrordata.d.ts +40 -0
- package/esm/models/paymentrequiredresponseerrordata.js +35 -0
- package/esm/models/perrequestlimits.d.ts +40 -0
- package/esm/models/perrequestlimits.js +44 -0
- package/esm/models/providername.d.ts +106 -0
- package/esm/models/providername.js +116 -0
- package/esm/models/provideroverloadedresponseerrordata.d.ts +40 -0
- package/esm/models/provideroverloadedresponseerrordata.js +35 -0
- package/esm/models/publicendpoint.d.ts +140 -2
- package/esm/models/publicendpoint.js +156 -2
- package/esm/models/publicpricing.d.ts +87 -0
- package/esm/models/publicpricing.js +73 -0
- package/esm/models/quantization.d.ts +29 -0
- package/esm/models/quantization.js +39 -0
- package/esm/models/requesttimeoutresponseerrordata.d.ts +40 -0
- package/esm/models/requesttimeoutresponseerrordata.js +35 -0
- package/esm/models/responseformattextconfig.d.ts +31 -0
- package/esm/models/responseformattextconfig.js +38 -0
- package/esm/models/responseinputfile.d.ts +63 -0
- package/esm/models/responseinputfile.js +70 -0
- package/esm/models/responseinputimage.d.ts +79 -0
- package/esm/models/responseinputimage.js +90 -0
- package/esm/models/responseinputtext.d.ts +57 -0
- package/esm/models/responseinputtext.js +51 -0
- package/esm/models/responseoutputtext.d.ts +57 -0
- package/esm/models/responseoutputtext.js +54 -0
- package/esm/models/responseserrorfield.d.ts +25 -10
- package/esm/models/responseserrorfield.js +29 -14
- package/esm/models/responsesformatjsonobject.d.ts +55 -0
- package/esm/models/responsesformatjsonobject.js +49 -0
- package/esm/models/responsesformattext.d.ts +55 -0
- package/esm/models/responsesformattext.js +49 -0
- package/esm/models/responsesformattextjsonschemaconfig.d.ts +67 -0
- package/esm/models/responsesformattextjsonschemaconfig.js +57 -0
- package/esm/models/responsesoutputitemfunctioncall.d.ts +89 -0
- package/esm/models/responsesoutputitemfunctioncall.js +93 -0
- package/esm/models/responsesoutputitemreasoning.d.ts +92 -0
- package/esm/models/responsesoutputitemreasoning.js +93 -0
- package/esm/models/responsesoutputmessage.d.ts +45 -42
- package/esm/models/responsesoutputmessage.js +76 -65
- package/esm/models/responsetextconfig.d.ts +59 -0
- package/esm/models/responsetextconfig.js +62 -0
- package/esm/models/serviceunavailableresponseerrordata.d.ts +40 -0
- package/esm/models/serviceunavailableresponseerrordata.js +35 -0
- package/esm/models/toomanyrequestsresponseerrordata.d.ts +40 -0
- package/esm/models/toomanyrequestsresponseerrordata.js +35 -0
- package/esm/models/topproviderinfo.d.ts +45 -0
- package/esm/models/topproviderinfo.js +48 -0
- package/esm/models/unauthorizedresponseerrordata.d.ts +40 -0
- package/esm/models/unauthorizedresponseerrordata.js +35 -0
- package/esm/models/unprocessableentityresponseerrordata.d.ts +40 -0
- package/esm/models/unprocessableentityresponseerrordata.js +35 -0
- package/esm/models/urlcitation.d.ts +60 -0
- package/esm/models/urlcitation.js +69 -0
- package/esm/react-query/betaResponsesSend.d.ts +1 -1
- package/esm/react-query/index.d.ts +2 -0
- package/esm/react-query/index.js +2 -0
- package/esm/react-query/modelsCount.d.ts +2 -2
- package/esm/react-query/modelsList.d.ts +2 -7
- package/esm/react-query/modelsList.js +0 -2
- package/esm/react-query/modelsListForUser.d.ts +2 -1
- package/esm/react-query/oAuthCreateAuthCode.d.ts +23 -0
- package/esm/react-query/oAuthCreateAuthCode.js +42 -0
- package/esm/react-query/oAuthExchangeAuthCodeForAPIKey.d.ts +23 -0
- package/esm/react-query/oAuthExchangeAuthCodeForAPIKey.js +42 -0
- package/esm/sdk/chat.d.ts +7 -0
- package/esm/sdk/chat.js +0 -6
- package/esm/sdk/models.d.ts +4 -3
- package/esm/sdk/oauth.d.ts +46 -0
- package/esm/sdk/oauth.js +67 -0
- package/esm/sdk/responses.d.ts +8 -1
- package/esm/sdk/responses.js +0 -6
- package/esm/sdk/sdk.d.ts +3 -0
- package/esm/sdk/sdk.js +4 -0
- package/jsr.json +1 -1
- package/package.json +3 -1
- package/vitest.config.ts +26 -0
- package/.devcontainer/README.md +0 -35
- package/esm/models/errorresponse.d.ts +0 -155
- package/esm/models/errorresponse.js +0 -167
- package/esm/models/errors/errorresponse.d.ts +0 -46
- package/esm/models/errors/listproviders.d.ts +0 -49
- package/esm/models/errors/listproviders.js +0 -51
- package/esm/models/filecitationannotation.d.ts +0 -58
- package/esm/models/filecitationannotation.js +0 -64
- package/esm/models/filepathannotation.d.ts +0 -56
- package/esm/models/filepathannotation.js +0 -62
- package/esm/models/openresponsesformatjsonobject.d.ts +0 -55
- package/esm/models/openresponsesformatjsonobject.js +0 -49
- package/esm/models/openresponsesformatjsonschema.d.ts +0 -67
- package/esm/models/openresponsesformatjsonschema.js +0 -57
- package/esm/models/openresponsesformattext.d.ts +0 -55
- package/esm/models/openresponsesformattext.js +0 -49
- package/esm/models/openresponsesformattextconfig.d.ts +0 -31
- package/esm/models/openresponsesformattextconfig.js +0 -38
- package/esm/models/openresponsesinputcontent.d.ts +0 -43
- package/esm/models/openresponsesinputcontent.js +0 -50
- package/esm/models/openresponsesinputfile.d.ts +0 -63
- package/esm/models/openresponsesinputfile.js +0 -70
- package/esm/models/openresponsesinputimage.d.ts +0 -79
- package/esm/models/openresponsesinputimage.js +0 -90
- package/esm/models/openresponsesinputitem.d.ts +0 -39
- package/esm/models/openresponsesinputitem.js +0 -62
- package/esm/models/openresponsesinputtext.d.ts +0 -57
- package/esm/models/openresponsesinputtext.js +0 -51
- package/esm/models/openresponsesoutputtext.d.ts +0 -80
- package/esm/models/openresponsesoutputtext.js +0 -93
- package/esm/models/openresponsesprompt.d.ts +0 -39
- package/esm/models/openresponsesprompt.js +0 -34
- package/esm/models/openresponsesrefusalcontent.d.ts +0 -54
- package/esm/models/openresponsesrefusalcontent.js +0 -51
- package/esm/models/openresponsestextconfig.d.ts +0 -59
- package/esm/models/openresponsestextconfig.js +0 -63
- package/esm/models/openresponsestoolchoice.d.ts +0 -148
- package/esm/models/openresponsestoolchoice.js +0 -139
- package/esm/models/openresponsestoolunion.d.ts +0 -95
- package/esm/models/openresponsestoolunion.js +0 -94
- package/esm/models/operations/createapialpharesponses.d.ts +0 -58
- package/esm/models/operations/createapialpharesponses.js +0 -83
- package/esm/models/operations/listmodelscount.d.ts +0 -26
- package/esm/models/operations/listmodelscount.js +0 -34
- package/esm/models/outputtextcontent.d.ts +0 -80
- package/esm/models/outputtextcontent.js +0 -93
- package/esm/models/refusalcontent.d.ts +0 -54
- package/esm/models/refusalcontent.js +0 -51
- package/esm/models/toolchoicetypes.d.ts +0 -164
- package/esm/models/toolchoicetypes.js +0 -167
- package/esm/models/urlcitationannotation.d.ts +0 -60
- package/esm/models/urlcitationannotation.js +0 -68
- package/examples/README.md +0 -31
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import * as z from "zod/v4";
|
|
5
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
6
|
+
import * as models from "../index.js";
|
|
7
|
+
import { OpenRouterError } from "./openroutererror.js";
|
|
8
|
+
/**
|
|
9
|
+
* Service Unavailable - Service temporarily unavailable
|
|
10
|
+
*/
|
|
11
|
+
export class ServiceUnavailableResponseError extends OpenRouterError {
|
|
12
|
+
constructor(err, httpMeta) {
|
|
13
|
+
const message = err.error?.message
|
|
14
|
+
|| `API error occurred: ${JSON.stringify(err)}`;
|
|
15
|
+
super(message, httpMeta);
|
|
16
|
+
this.data$ = err;
|
|
17
|
+
this.error = err.error;
|
|
18
|
+
if (err.userId != null)
|
|
19
|
+
this.userId = err.userId;
|
|
20
|
+
this.name = "ServiceUnavailableResponseError";
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
/** @internal */
|
|
24
|
+
export const ServiceUnavailableResponseError$inboundSchema = z.object({
|
|
25
|
+
error: models.ServiceUnavailableResponseErrorData$inboundSchema,
|
|
26
|
+
user_id: z.nullable(z.string()).optional(),
|
|
27
|
+
request$: z.custom(x => x instanceof Request),
|
|
28
|
+
response$: z.custom(x => x instanceof Response),
|
|
29
|
+
body$: z.string(),
|
|
30
|
+
})
|
|
31
|
+
.transform((v) => {
|
|
32
|
+
const remapped = remap$(v, {
|
|
33
|
+
"user_id": "userId",
|
|
34
|
+
});
|
|
35
|
+
return new ServiceUnavailableResponseError(remapped, {
|
|
36
|
+
request: v.request$,
|
|
37
|
+
response: v.response$,
|
|
38
|
+
body: v.body$,
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
/** @internal */
|
|
42
|
+
export const ServiceUnavailableResponseError$outboundSchema = z.custom(x => x instanceof ServiceUnavailableResponseError)
|
|
43
|
+
.transform(v => v.data$)
|
|
44
|
+
.pipe(z.object({
|
|
45
|
+
error: models.ServiceUnavailableResponseErrorData$outboundSchema,
|
|
46
|
+
userId: z.nullable(z.string()).optional(),
|
|
47
|
+
}).transform((v) => {
|
|
48
|
+
return remap$(v, {
|
|
49
|
+
userId: "user_id",
|
|
50
|
+
});
|
|
51
|
+
}));
|
|
52
|
+
/**
|
|
53
|
+
* @internal
|
|
54
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
55
|
+
*/
|
|
56
|
+
export var ServiceUnavailableResponseError$;
|
|
57
|
+
(function (ServiceUnavailableResponseError$) {
|
|
58
|
+
/** @deprecated use `ServiceUnavailableResponseError$inboundSchema` instead. */
|
|
59
|
+
ServiceUnavailableResponseError$.inboundSchema = ServiceUnavailableResponseError$inboundSchema;
|
|
60
|
+
/** @deprecated use `ServiceUnavailableResponseError$outboundSchema` instead. */
|
|
61
|
+
ServiceUnavailableResponseError$.outboundSchema = ServiceUnavailableResponseError$outboundSchema;
|
|
62
|
+
})(ServiceUnavailableResponseError$ || (ServiceUnavailableResponseError$ = {}));
|
|
63
|
+
//# sourceMappingURL=serviceunavailableresponseerror.js.map
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import * as models from "../index.js";
|
|
3
|
+
import { OpenRouterError } from "./openroutererror.js";
|
|
4
|
+
/**
|
|
5
|
+
* Too Many Requests - Rate limit exceeded
|
|
6
|
+
*/
|
|
7
|
+
export type TooManyRequestsResponseErrorData = {
|
|
8
|
+
/**
|
|
9
|
+
* Error data for TooManyRequestsResponse
|
|
10
|
+
*/
|
|
11
|
+
error: models.TooManyRequestsResponseErrorData;
|
|
12
|
+
userId?: string | null | undefined;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Too Many Requests - Rate limit exceeded
|
|
16
|
+
*/
|
|
17
|
+
export declare class TooManyRequestsResponseError extends OpenRouterError {
|
|
18
|
+
/**
|
|
19
|
+
* Error data for TooManyRequestsResponse
|
|
20
|
+
*/
|
|
21
|
+
error: models.TooManyRequestsResponseErrorData;
|
|
22
|
+
userId?: string | null | undefined;
|
|
23
|
+
/** The original data that was passed to this error instance. */
|
|
24
|
+
data$: TooManyRequestsResponseErrorData;
|
|
25
|
+
constructor(err: TooManyRequestsResponseErrorData, httpMeta: {
|
|
26
|
+
response: Response;
|
|
27
|
+
request: Request;
|
|
28
|
+
body: string;
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
/** @internal */
|
|
32
|
+
export declare const TooManyRequestsResponseError$inboundSchema: z.ZodType<TooManyRequestsResponseError, unknown>;
|
|
33
|
+
/** @internal */
|
|
34
|
+
export type TooManyRequestsResponseError$Outbound = {
|
|
35
|
+
error: models.TooManyRequestsResponseErrorData$Outbound;
|
|
36
|
+
user_id?: string | null | undefined;
|
|
37
|
+
};
|
|
38
|
+
/** @internal */
|
|
39
|
+
export declare const TooManyRequestsResponseError$outboundSchema: z.ZodType<TooManyRequestsResponseError$Outbound, TooManyRequestsResponseError>;
|
|
40
|
+
/**
|
|
41
|
+
* @internal
|
|
42
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
43
|
+
*/
|
|
44
|
+
export declare namespace TooManyRequestsResponseError$ {
|
|
45
|
+
/** @deprecated use `TooManyRequestsResponseError$inboundSchema` instead. */
|
|
46
|
+
const inboundSchema: z.ZodType<TooManyRequestsResponseError, unknown, z.core.$ZodTypeInternals<TooManyRequestsResponseError, unknown>>;
|
|
47
|
+
/** @deprecated use `TooManyRequestsResponseError$outboundSchema` instead. */
|
|
48
|
+
const outboundSchema: z.ZodType<TooManyRequestsResponseError$Outbound, TooManyRequestsResponseError, z.core.$ZodTypeInternals<TooManyRequestsResponseError$Outbound, TooManyRequestsResponseError>>;
|
|
49
|
+
/** @deprecated use `TooManyRequestsResponseError$Outbound` instead. */
|
|
50
|
+
type Outbound = TooManyRequestsResponseError$Outbound;
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=toomanyrequestsresponseerror.d.ts.map
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import * as z from "zod/v4";
|
|
5
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
6
|
+
import * as models from "../index.js";
|
|
7
|
+
import { OpenRouterError } from "./openroutererror.js";
|
|
8
|
+
/**
|
|
9
|
+
* Too Many Requests - Rate limit exceeded
|
|
10
|
+
*/
|
|
11
|
+
export class TooManyRequestsResponseError extends OpenRouterError {
|
|
12
|
+
constructor(err, httpMeta) {
|
|
13
|
+
const message = err.error?.message
|
|
14
|
+
|| `API error occurred: ${JSON.stringify(err)}`;
|
|
15
|
+
super(message, httpMeta);
|
|
16
|
+
this.data$ = err;
|
|
17
|
+
this.error = err.error;
|
|
18
|
+
if (err.userId != null)
|
|
19
|
+
this.userId = err.userId;
|
|
20
|
+
this.name = "TooManyRequestsResponseError";
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
/** @internal */
|
|
24
|
+
export const TooManyRequestsResponseError$inboundSchema = z.object({
|
|
25
|
+
error: models.TooManyRequestsResponseErrorData$inboundSchema,
|
|
26
|
+
user_id: z.nullable(z.string()).optional(),
|
|
27
|
+
request$: z.custom(x => x instanceof Request),
|
|
28
|
+
response$: z.custom(x => x instanceof Response),
|
|
29
|
+
body$: z.string(),
|
|
30
|
+
})
|
|
31
|
+
.transform((v) => {
|
|
32
|
+
const remapped = remap$(v, {
|
|
33
|
+
"user_id": "userId",
|
|
34
|
+
});
|
|
35
|
+
return new TooManyRequestsResponseError(remapped, {
|
|
36
|
+
request: v.request$,
|
|
37
|
+
response: v.response$,
|
|
38
|
+
body: v.body$,
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
/** @internal */
|
|
42
|
+
export const TooManyRequestsResponseError$outboundSchema = z.custom(x => x instanceof TooManyRequestsResponseError)
|
|
43
|
+
.transform(v => v.data$)
|
|
44
|
+
.pipe(z.object({
|
|
45
|
+
error: models.TooManyRequestsResponseErrorData$outboundSchema,
|
|
46
|
+
userId: z.nullable(z.string()).optional(),
|
|
47
|
+
}).transform((v) => {
|
|
48
|
+
return remap$(v, {
|
|
49
|
+
userId: "user_id",
|
|
50
|
+
});
|
|
51
|
+
}));
|
|
52
|
+
/**
|
|
53
|
+
* @internal
|
|
54
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
55
|
+
*/
|
|
56
|
+
export var TooManyRequestsResponseError$;
|
|
57
|
+
(function (TooManyRequestsResponseError$) {
|
|
58
|
+
/** @deprecated use `TooManyRequestsResponseError$inboundSchema` instead. */
|
|
59
|
+
TooManyRequestsResponseError$.inboundSchema = TooManyRequestsResponseError$inboundSchema;
|
|
60
|
+
/** @deprecated use `TooManyRequestsResponseError$outboundSchema` instead. */
|
|
61
|
+
TooManyRequestsResponseError$.outboundSchema = TooManyRequestsResponseError$outboundSchema;
|
|
62
|
+
})(TooManyRequestsResponseError$ || (TooManyRequestsResponseError$ = {}));
|
|
63
|
+
//# sourceMappingURL=toomanyrequestsresponseerror.js.map
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import * as models from "../index.js";
|
|
3
|
+
import { OpenRouterError } from "./openroutererror.js";
|
|
4
|
+
/**
|
|
5
|
+
* Unauthorized - Authentication required or invalid credentials
|
|
6
|
+
*/
|
|
7
|
+
export type UnauthorizedResponseErrorData = {
|
|
8
|
+
/**
|
|
9
|
+
* Error data for UnauthorizedResponse
|
|
10
|
+
*/
|
|
11
|
+
error: models.UnauthorizedResponseErrorData;
|
|
12
|
+
userId?: string | null | undefined;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Unauthorized - Authentication required or invalid credentials
|
|
16
|
+
*/
|
|
17
|
+
export declare class UnauthorizedResponseError extends OpenRouterError {
|
|
18
|
+
/**
|
|
19
|
+
* Error data for UnauthorizedResponse
|
|
20
|
+
*/
|
|
21
|
+
error: models.UnauthorizedResponseErrorData;
|
|
22
|
+
userId?: string | null | undefined;
|
|
23
|
+
/** The original data that was passed to this error instance. */
|
|
24
|
+
data$: UnauthorizedResponseErrorData;
|
|
25
|
+
constructor(err: UnauthorizedResponseErrorData, httpMeta: {
|
|
26
|
+
response: Response;
|
|
27
|
+
request: Request;
|
|
28
|
+
body: string;
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
/** @internal */
|
|
32
|
+
export declare const UnauthorizedResponseError$inboundSchema: z.ZodType<UnauthorizedResponseError, unknown>;
|
|
33
|
+
/** @internal */
|
|
34
|
+
export type UnauthorizedResponseError$Outbound = {
|
|
35
|
+
error: models.UnauthorizedResponseErrorData$Outbound;
|
|
36
|
+
user_id?: string | null | undefined;
|
|
37
|
+
};
|
|
38
|
+
/** @internal */
|
|
39
|
+
export declare const UnauthorizedResponseError$outboundSchema: z.ZodType<UnauthorizedResponseError$Outbound, UnauthorizedResponseError>;
|
|
40
|
+
/**
|
|
41
|
+
* @internal
|
|
42
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
43
|
+
*/
|
|
44
|
+
export declare namespace UnauthorizedResponseError$ {
|
|
45
|
+
/** @deprecated use `UnauthorizedResponseError$inboundSchema` instead. */
|
|
46
|
+
const inboundSchema: z.ZodType<UnauthorizedResponseError, unknown, z.core.$ZodTypeInternals<UnauthorizedResponseError, unknown>>;
|
|
47
|
+
/** @deprecated use `UnauthorizedResponseError$outboundSchema` instead. */
|
|
48
|
+
const outboundSchema: z.ZodType<UnauthorizedResponseError$Outbound, UnauthorizedResponseError, z.core.$ZodTypeInternals<UnauthorizedResponseError$Outbound, UnauthorizedResponseError>>;
|
|
49
|
+
/** @deprecated use `UnauthorizedResponseError$Outbound` instead. */
|
|
50
|
+
type Outbound = UnauthorizedResponseError$Outbound;
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=unauthorizedresponseerror.d.ts.map
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import * as z from "zod/v4";
|
|
5
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
6
|
+
import * as models from "../index.js";
|
|
7
|
+
import { OpenRouterError } from "./openroutererror.js";
|
|
8
|
+
/**
|
|
9
|
+
* Unauthorized - Authentication required or invalid credentials
|
|
10
|
+
*/
|
|
11
|
+
export class UnauthorizedResponseError extends OpenRouterError {
|
|
12
|
+
constructor(err, httpMeta) {
|
|
13
|
+
const message = err.error?.message
|
|
14
|
+
|| `API error occurred: ${JSON.stringify(err)}`;
|
|
15
|
+
super(message, httpMeta);
|
|
16
|
+
this.data$ = err;
|
|
17
|
+
this.error = err.error;
|
|
18
|
+
if (err.userId != null)
|
|
19
|
+
this.userId = err.userId;
|
|
20
|
+
this.name = "UnauthorizedResponseError";
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
/** @internal */
|
|
24
|
+
export const UnauthorizedResponseError$inboundSchema = z.object({
|
|
25
|
+
error: models.UnauthorizedResponseErrorData$inboundSchema,
|
|
26
|
+
user_id: z.nullable(z.string()).optional(),
|
|
27
|
+
request$: z.custom(x => x instanceof Request),
|
|
28
|
+
response$: z.custom(x => x instanceof Response),
|
|
29
|
+
body$: z.string(),
|
|
30
|
+
})
|
|
31
|
+
.transform((v) => {
|
|
32
|
+
const remapped = remap$(v, {
|
|
33
|
+
"user_id": "userId",
|
|
34
|
+
});
|
|
35
|
+
return new UnauthorizedResponseError(remapped, {
|
|
36
|
+
request: v.request$,
|
|
37
|
+
response: v.response$,
|
|
38
|
+
body: v.body$,
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
/** @internal */
|
|
42
|
+
export const UnauthorizedResponseError$outboundSchema = z.custom(x => x instanceof UnauthorizedResponseError)
|
|
43
|
+
.transform(v => v.data$)
|
|
44
|
+
.pipe(z.object({
|
|
45
|
+
error: models.UnauthorizedResponseErrorData$outboundSchema,
|
|
46
|
+
userId: z.nullable(z.string()).optional(),
|
|
47
|
+
}).transform((v) => {
|
|
48
|
+
return remap$(v, {
|
|
49
|
+
userId: "user_id",
|
|
50
|
+
});
|
|
51
|
+
}));
|
|
52
|
+
/**
|
|
53
|
+
* @internal
|
|
54
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
55
|
+
*/
|
|
56
|
+
export var UnauthorizedResponseError$;
|
|
57
|
+
(function (UnauthorizedResponseError$) {
|
|
58
|
+
/** @deprecated use `UnauthorizedResponseError$inboundSchema` instead. */
|
|
59
|
+
UnauthorizedResponseError$.inboundSchema = UnauthorizedResponseError$inboundSchema;
|
|
60
|
+
/** @deprecated use `UnauthorizedResponseError$outboundSchema` instead. */
|
|
61
|
+
UnauthorizedResponseError$.outboundSchema = UnauthorizedResponseError$outboundSchema;
|
|
62
|
+
})(UnauthorizedResponseError$ || (UnauthorizedResponseError$ = {}));
|
|
63
|
+
//# sourceMappingURL=unauthorizedresponseerror.js.map
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import * as models from "../index.js";
|
|
3
|
+
import { OpenRouterError } from "./openroutererror.js";
|
|
4
|
+
/**
|
|
5
|
+
* Unprocessable Entity - Semantic validation failure
|
|
6
|
+
*/
|
|
7
|
+
export type UnprocessableEntityResponseErrorData = {
|
|
8
|
+
/**
|
|
9
|
+
* Error data for UnprocessableEntityResponse
|
|
10
|
+
*/
|
|
11
|
+
error: models.UnprocessableEntityResponseErrorData;
|
|
12
|
+
userId?: string | null | undefined;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Unprocessable Entity - Semantic validation failure
|
|
16
|
+
*/
|
|
17
|
+
export declare class UnprocessableEntityResponseError extends OpenRouterError {
|
|
18
|
+
/**
|
|
19
|
+
* Error data for UnprocessableEntityResponse
|
|
20
|
+
*/
|
|
21
|
+
error: models.UnprocessableEntityResponseErrorData;
|
|
22
|
+
userId?: string | null | undefined;
|
|
23
|
+
/** The original data that was passed to this error instance. */
|
|
24
|
+
data$: UnprocessableEntityResponseErrorData;
|
|
25
|
+
constructor(err: UnprocessableEntityResponseErrorData, httpMeta: {
|
|
26
|
+
response: Response;
|
|
27
|
+
request: Request;
|
|
28
|
+
body: string;
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
/** @internal */
|
|
32
|
+
export declare const UnprocessableEntityResponseError$inboundSchema: z.ZodType<UnprocessableEntityResponseError, unknown>;
|
|
33
|
+
/** @internal */
|
|
34
|
+
export type UnprocessableEntityResponseError$Outbound = {
|
|
35
|
+
error: models.UnprocessableEntityResponseErrorData$Outbound;
|
|
36
|
+
user_id?: string | null | undefined;
|
|
37
|
+
};
|
|
38
|
+
/** @internal */
|
|
39
|
+
export declare const UnprocessableEntityResponseError$outboundSchema: z.ZodType<UnprocessableEntityResponseError$Outbound, UnprocessableEntityResponseError>;
|
|
40
|
+
/**
|
|
41
|
+
* @internal
|
|
42
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
43
|
+
*/
|
|
44
|
+
export declare namespace UnprocessableEntityResponseError$ {
|
|
45
|
+
/** @deprecated use `UnprocessableEntityResponseError$inboundSchema` instead. */
|
|
46
|
+
const inboundSchema: z.ZodType<UnprocessableEntityResponseError, unknown, z.core.$ZodTypeInternals<UnprocessableEntityResponseError, unknown>>;
|
|
47
|
+
/** @deprecated use `UnprocessableEntityResponseError$outboundSchema` instead. */
|
|
48
|
+
const outboundSchema: z.ZodType<UnprocessableEntityResponseError$Outbound, UnprocessableEntityResponseError, z.core.$ZodTypeInternals<UnprocessableEntityResponseError$Outbound, UnprocessableEntityResponseError>>;
|
|
49
|
+
/** @deprecated use `UnprocessableEntityResponseError$Outbound` instead. */
|
|
50
|
+
type Outbound = UnprocessableEntityResponseError$Outbound;
|
|
51
|
+
}
|
|
52
|
+
//# sourceMappingURL=unprocessableentityresponseerror.d.ts.map
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import * as z from "zod/v4";
|
|
5
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
6
|
+
import * as models from "../index.js";
|
|
7
|
+
import { OpenRouterError } from "./openroutererror.js";
|
|
8
|
+
/**
|
|
9
|
+
* Unprocessable Entity - Semantic validation failure
|
|
10
|
+
*/
|
|
11
|
+
export class UnprocessableEntityResponseError extends OpenRouterError {
|
|
12
|
+
constructor(err, httpMeta) {
|
|
13
|
+
const message = err.error?.message
|
|
14
|
+
|| `API error occurred: ${JSON.stringify(err)}`;
|
|
15
|
+
super(message, httpMeta);
|
|
16
|
+
this.data$ = err;
|
|
17
|
+
this.error = err.error;
|
|
18
|
+
if (err.userId != null)
|
|
19
|
+
this.userId = err.userId;
|
|
20
|
+
this.name = "UnprocessableEntityResponseError";
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
/** @internal */
|
|
24
|
+
export const UnprocessableEntityResponseError$inboundSchema = z.object({
|
|
25
|
+
error: models.UnprocessableEntityResponseErrorData$inboundSchema,
|
|
26
|
+
user_id: z.nullable(z.string()).optional(),
|
|
27
|
+
request$: z.custom(x => x instanceof Request),
|
|
28
|
+
response$: z.custom(x => x instanceof Response),
|
|
29
|
+
body$: z.string(),
|
|
30
|
+
})
|
|
31
|
+
.transform((v) => {
|
|
32
|
+
const remapped = remap$(v, {
|
|
33
|
+
"user_id": "userId",
|
|
34
|
+
});
|
|
35
|
+
return new UnprocessableEntityResponseError(remapped, {
|
|
36
|
+
request: v.request$,
|
|
37
|
+
response: v.response$,
|
|
38
|
+
body: v.body$,
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
/** @internal */
|
|
42
|
+
export const UnprocessableEntityResponseError$outboundSchema = z.custom(x => x instanceof UnprocessableEntityResponseError)
|
|
43
|
+
.transform(v => v.data$)
|
|
44
|
+
.pipe(z.object({
|
|
45
|
+
error: models.UnprocessableEntityResponseErrorData$outboundSchema,
|
|
46
|
+
userId: z.nullable(z.string()).optional(),
|
|
47
|
+
}).transform((v) => {
|
|
48
|
+
return remap$(v, {
|
|
49
|
+
userId: "user_id",
|
|
50
|
+
});
|
|
51
|
+
}));
|
|
52
|
+
/**
|
|
53
|
+
* @internal
|
|
54
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
55
|
+
*/
|
|
56
|
+
export var UnprocessableEntityResponseError$;
|
|
57
|
+
(function (UnprocessableEntityResponseError$) {
|
|
58
|
+
/** @deprecated use `UnprocessableEntityResponseError$inboundSchema` instead. */
|
|
59
|
+
UnprocessableEntityResponseError$.inboundSchema = UnprocessableEntityResponseError$inboundSchema;
|
|
60
|
+
/** @deprecated use `UnprocessableEntityResponseError$outboundSchema` instead. */
|
|
61
|
+
UnprocessableEntityResponseError$.outboundSchema = UnprocessableEntityResponseError$outboundSchema;
|
|
62
|
+
})(UnprocessableEntityResponseError$ || (UnprocessableEntityResponseError$ = {}));
|
|
63
|
+
//# sourceMappingURL=unprocessableentityresponseerror.js.map
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
3
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
|
+
export declare const FileCitationType: {
|
|
6
|
+
readonly FileCitation: "file_citation";
|
|
7
|
+
};
|
|
8
|
+
export type FileCitationType = ClosedEnum<typeof FileCitationType>;
|
|
9
|
+
export type FileCitation = {
|
|
10
|
+
type: FileCitationType;
|
|
11
|
+
fileId: string;
|
|
12
|
+
filename: string;
|
|
13
|
+
index: number;
|
|
14
|
+
};
|
|
15
|
+
/** @internal */
|
|
16
|
+
export declare const FileCitationType$inboundSchema: z.ZodEnum<typeof FileCitationType>;
|
|
17
|
+
/** @internal */
|
|
18
|
+
export declare const FileCitationType$outboundSchema: z.ZodEnum<typeof FileCitationType>;
|
|
19
|
+
/**
|
|
20
|
+
* @internal
|
|
21
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
22
|
+
*/
|
|
23
|
+
export declare namespace FileCitationType$ {
|
|
24
|
+
/** @deprecated use `FileCitationType$inboundSchema` instead. */
|
|
25
|
+
const inboundSchema: z.ZodEnum<{
|
|
26
|
+
readonly FileCitation: "file_citation";
|
|
27
|
+
}>;
|
|
28
|
+
/** @deprecated use `FileCitationType$outboundSchema` instead. */
|
|
29
|
+
const outboundSchema: z.ZodEnum<{
|
|
30
|
+
readonly FileCitation: "file_citation";
|
|
31
|
+
}>;
|
|
32
|
+
}
|
|
33
|
+
/** @internal */
|
|
34
|
+
export declare const FileCitation$inboundSchema: z.ZodType<FileCitation, unknown>;
|
|
35
|
+
/** @internal */
|
|
36
|
+
export type FileCitation$Outbound = {
|
|
37
|
+
type: string;
|
|
38
|
+
file_id: string;
|
|
39
|
+
filename: string;
|
|
40
|
+
index: number;
|
|
41
|
+
};
|
|
42
|
+
/** @internal */
|
|
43
|
+
export declare const FileCitation$outboundSchema: z.ZodType<FileCitation$Outbound, FileCitation>;
|
|
44
|
+
/**
|
|
45
|
+
* @internal
|
|
46
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
47
|
+
*/
|
|
48
|
+
export declare namespace FileCitation$ {
|
|
49
|
+
/** @deprecated use `FileCitation$inboundSchema` instead. */
|
|
50
|
+
const inboundSchema: z.ZodType<FileCitation, unknown, z.core.$ZodTypeInternals<FileCitation, unknown>>;
|
|
51
|
+
/** @deprecated use `FileCitation$outboundSchema` instead. */
|
|
52
|
+
const outboundSchema: z.ZodType<FileCitation$Outbound, FileCitation, z.core.$ZodTypeInternals<FileCitation$Outbound, FileCitation>>;
|
|
53
|
+
/** @deprecated use `FileCitation$Outbound` instead. */
|
|
54
|
+
type Outbound = FileCitation$Outbound;
|
|
55
|
+
}
|
|
56
|
+
export declare function fileCitationToJSON(fileCitation: FileCitation): string;
|
|
57
|
+
export declare function fileCitationFromJSON(jsonString: string): SafeParseResult<FileCitation, SDKValidationError>;
|
|
58
|
+
//# sourceMappingURL=filecitation.d.ts.map
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import * as z from "zod/v4";
|
|
5
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
export const FileCitationType = {
|
|
8
|
+
FileCitation: "file_citation",
|
|
9
|
+
};
|
|
10
|
+
/** @internal */
|
|
11
|
+
export const FileCitationType$inboundSchema = z.enum(FileCitationType);
|
|
12
|
+
/** @internal */
|
|
13
|
+
export const FileCitationType$outboundSchema = FileCitationType$inboundSchema;
|
|
14
|
+
/**
|
|
15
|
+
* @internal
|
|
16
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
17
|
+
*/
|
|
18
|
+
export var FileCitationType$;
|
|
19
|
+
(function (FileCitationType$) {
|
|
20
|
+
/** @deprecated use `FileCitationType$inboundSchema` instead. */
|
|
21
|
+
FileCitationType$.inboundSchema = FileCitationType$inboundSchema;
|
|
22
|
+
/** @deprecated use `FileCitationType$outboundSchema` instead. */
|
|
23
|
+
FileCitationType$.outboundSchema = FileCitationType$outboundSchema;
|
|
24
|
+
})(FileCitationType$ || (FileCitationType$ = {}));
|
|
25
|
+
/** @internal */
|
|
26
|
+
export const FileCitation$inboundSchema = z
|
|
27
|
+
.object({
|
|
28
|
+
type: FileCitationType$inboundSchema,
|
|
29
|
+
file_id: z.string(),
|
|
30
|
+
filename: z.string(),
|
|
31
|
+
index: z.number(),
|
|
32
|
+
}).transform((v) => {
|
|
33
|
+
return remap$(v, {
|
|
34
|
+
"file_id": "fileId",
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
/** @internal */
|
|
38
|
+
export const FileCitation$outboundSchema = z.object({
|
|
39
|
+
type: FileCitationType$outboundSchema,
|
|
40
|
+
fileId: z.string(),
|
|
41
|
+
filename: z.string(),
|
|
42
|
+
index: z.number(),
|
|
43
|
+
}).transform((v) => {
|
|
44
|
+
return remap$(v, {
|
|
45
|
+
fileId: "file_id",
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
/**
|
|
49
|
+
* @internal
|
|
50
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
51
|
+
*/
|
|
52
|
+
export var FileCitation$;
|
|
53
|
+
(function (FileCitation$) {
|
|
54
|
+
/** @deprecated use `FileCitation$inboundSchema` instead. */
|
|
55
|
+
FileCitation$.inboundSchema = FileCitation$inboundSchema;
|
|
56
|
+
/** @deprecated use `FileCitation$outboundSchema` instead. */
|
|
57
|
+
FileCitation$.outboundSchema = FileCitation$outboundSchema;
|
|
58
|
+
})(FileCitation$ || (FileCitation$ = {}));
|
|
59
|
+
export function fileCitationToJSON(fileCitation) {
|
|
60
|
+
return JSON.stringify(FileCitation$outboundSchema.parse(fileCitation));
|
|
61
|
+
}
|
|
62
|
+
export function fileCitationFromJSON(jsonString) {
|
|
63
|
+
return safeParse(jsonString, (x) => FileCitation$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'FileCitation' from JSON`);
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=filecitation.js.map
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
3
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
|
+
export declare const FilePathType: {
|
|
6
|
+
readonly FilePath: "file_path";
|
|
7
|
+
};
|
|
8
|
+
export type FilePathType = ClosedEnum<typeof FilePathType>;
|
|
9
|
+
export type FilePath = {
|
|
10
|
+
type: FilePathType;
|
|
11
|
+
fileId: string;
|
|
12
|
+
index: number;
|
|
13
|
+
};
|
|
14
|
+
/** @internal */
|
|
15
|
+
export declare const FilePathType$inboundSchema: z.ZodEnum<typeof FilePathType>;
|
|
16
|
+
/** @internal */
|
|
17
|
+
export declare const FilePathType$outboundSchema: z.ZodEnum<typeof FilePathType>;
|
|
18
|
+
/**
|
|
19
|
+
* @internal
|
|
20
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
21
|
+
*/
|
|
22
|
+
export declare namespace FilePathType$ {
|
|
23
|
+
/** @deprecated use `FilePathType$inboundSchema` instead. */
|
|
24
|
+
const inboundSchema: z.ZodEnum<{
|
|
25
|
+
readonly FilePath: "file_path";
|
|
26
|
+
}>;
|
|
27
|
+
/** @deprecated use `FilePathType$outboundSchema` instead. */
|
|
28
|
+
const outboundSchema: z.ZodEnum<{
|
|
29
|
+
readonly FilePath: "file_path";
|
|
30
|
+
}>;
|
|
31
|
+
}
|
|
32
|
+
/** @internal */
|
|
33
|
+
export declare const FilePath$inboundSchema: z.ZodType<FilePath, unknown>;
|
|
34
|
+
/** @internal */
|
|
35
|
+
export type FilePath$Outbound = {
|
|
36
|
+
type: string;
|
|
37
|
+
file_id: string;
|
|
38
|
+
index: number;
|
|
39
|
+
};
|
|
40
|
+
/** @internal */
|
|
41
|
+
export declare const FilePath$outboundSchema: z.ZodType<FilePath$Outbound, FilePath>;
|
|
42
|
+
/**
|
|
43
|
+
* @internal
|
|
44
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
45
|
+
*/
|
|
46
|
+
export declare namespace FilePath$ {
|
|
47
|
+
/** @deprecated use `FilePath$inboundSchema` instead. */
|
|
48
|
+
const inboundSchema: z.ZodType<FilePath, unknown, z.core.$ZodTypeInternals<FilePath, unknown>>;
|
|
49
|
+
/** @deprecated use `FilePath$outboundSchema` instead. */
|
|
50
|
+
const outboundSchema: z.ZodType<FilePath$Outbound, FilePath, z.core.$ZodTypeInternals<FilePath$Outbound, FilePath>>;
|
|
51
|
+
/** @deprecated use `FilePath$Outbound` instead. */
|
|
52
|
+
type Outbound = FilePath$Outbound;
|
|
53
|
+
}
|
|
54
|
+
export declare function filePathToJSON(filePath: FilePath): string;
|
|
55
|
+
export declare function filePathFromJSON(jsonString: string): SafeParseResult<FilePath, SDKValidationError>;
|
|
56
|
+
//# sourceMappingURL=filepath.d.ts.map
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
import * as z from "zod/v4";
|
|
5
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
export const FilePathType = {
|
|
8
|
+
FilePath: "file_path",
|
|
9
|
+
};
|
|
10
|
+
/** @internal */
|
|
11
|
+
export const FilePathType$inboundSchema = z
|
|
12
|
+
.enum(FilePathType);
|
|
13
|
+
/** @internal */
|
|
14
|
+
export const FilePathType$outboundSchema = FilePathType$inboundSchema;
|
|
15
|
+
/**
|
|
16
|
+
* @internal
|
|
17
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
18
|
+
*/
|
|
19
|
+
export var FilePathType$;
|
|
20
|
+
(function (FilePathType$) {
|
|
21
|
+
/** @deprecated use `FilePathType$inboundSchema` instead. */
|
|
22
|
+
FilePathType$.inboundSchema = FilePathType$inboundSchema;
|
|
23
|
+
/** @deprecated use `FilePathType$outboundSchema` instead. */
|
|
24
|
+
FilePathType$.outboundSchema = FilePathType$outboundSchema;
|
|
25
|
+
})(FilePathType$ || (FilePathType$ = {}));
|
|
26
|
+
/** @internal */
|
|
27
|
+
export const FilePath$inboundSchema = z.object({
|
|
28
|
+
type: FilePathType$inboundSchema,
|
|
29
|
+
file_id: z.string(),
|
|
30
|
+
index: z.number(),
|
|
31
|
+
}).transform((v) => {
|
|
32
|
+
return remap$(v, {
|
|
33
|
+
"file_id": "fileId",
|
|
34
|
+
});
|
|
35
|
+
});
|
|
36
|
+
/** @internal */
|
|
37
|
+
export const FilePath$outboundSchema = z
|
|
38
|
+
.object({
|
|
39
|
+
type: FilePathType$outboundSchema,
|
|
40
|
+
fileId: z.string(),
|
|
41
|
+
index: z.number(),
|
|
42
|
+
}).transform((v) => {
|
|
43
|
+
return remap$(v, {
|
|
44
|
+
fileId: "file_id",
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
/**
|
|
48
|
+
* @internal
|
|
49
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
50
|
+
*/
|
|
51
|
+
export var FilePath$;
|
|
52
|
+
(function (FilePath$) {
|
|
53
|
+
/** @deprecated use `FilePath$inboundSchema` instead. */
|
|
54
|
+
FilePath$.inboundSchema = FilePath$inboundSchema;
|
|
55
|
+
/** @deprecated use `FilePath$outboundSchema` instead. */
|
|
56
|
+
FilePath$.outboundSchema = FilePath$outboundSchema;
|
|
57
|
+
})(FilePath$ || (FilePath$ = {}));
|
|
58
|
+
export function filePathToJSON(filePath) {
|
|
59
|
+
return JSON.stringify(FilePath$outboundSchema.parse(filePath));
|
|
60
|
+
}
|
|
61
|
+
export function filePathFromJSON(jsonString) {
|
|
62
|
+
return safeParse(jsonString, (x) => FilePath$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'FilePath' from JSON`);
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=filepath.js.map
|