@openrouter/sdk 0.0.1-beta.7 → 0.0.1-beta.9
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/core.d.ts +10 -0
- package/esm/core.js +13 -0
- package/esm/funcs/analyticsGetUserActivity.d.ts +18 -0
- package/esm/funcs/analyticsGetUserActivity.js +85 -0
- package/esm/funcs/apiKeysCreate.d.ts +15 -0
- package/esm/funcs/apiKeysCreate.js +79 -0
- package/esm/funcs/apiKeysDelete.d.ts +15 -0
- package/esm/funcs/apiKeysDelete.js +84 -0
- package/esm/funcs/apiKeysGet.d.ts +15 -0
- package/esm/funcs/apiKeysGet.js +84 -0
- package/esm/funcs/apiKeysGetCurrentKeyMetadata.d.ts +18 -0
- package/esm/funcs/apiKeysGetCurrentKeyMetadata.js +72 -0
- package/esm/funcs/apiKeysList.d.ts +15 -0
- package/esm/funcs/apiKeysList.js +83 -0
- package/esm/funcs/apiKeysUpdate.d.ts +15 -0
- package/esm/funcs/apiKeysUpdate.js +85 -0
- package/esm/funcs/betaResponsesSend.d.ts +18 -0
- package/esm/funcs/betaResponsesSend.js +69 -0
- package/esm/funcs/chatSend.d.ts +19 -0
- package/esm/funcs/chatSend.js +83 -0
- package/esm/funcs/completionsGenerate.d.ts +18 -0
- package/esm/funcs/completionsGenerate.js +82 -0
- package/esm/funcs/creditsCreateCoinbaseCharge.d.ts +19 -0
- package/esm/funcs/creditsCreateCoinbaseCharge.js +77 -0
- package/esm/funcs/creditsGetCredits.d.ts +18 -0
- package/esm/funcs/creditsGetCredits.js +72 -0
- package/esm/funcs/endpointsList.d.ts +15 -0
- package/esm/funcs/endpointsList.js +88 -0
- package/esm/funcs/endpointsListZdrEndpoints.d.ts +14 -0
- package/esm/funcs/endpointsListZdrEndpoints.js +65 -0
- package/esm/funcs/generationsGetGeneration.d.ts +15 -0
- package/esm/funcs/generationsGetGeneration.js +82 -0
- package/esm/funcs/modelsCount.d.ts +14 -0
- package/esm/funcs/modelsCount.js +65 -0
- package/esm/funcs/modelsList.d.ts +14 -0
- package/esm/funcs/modelsList.js +83 -0
- package/esm/funcs/modelsListForUser.d.ts +14 -0
- package/esm/funcs/modelsListForUser.js +69 -0
- package/esm/funcs/oAuthCreateAuthorizationUrl.d.ts +43 -0
- package/esm/funcs/oAuthCreateAuthorizationUrl.js +44 -0
- package/esm/funcs/oAuthCreateSHA256CodeChallenge.d.ts +35 -0
- package/esm/funcs/oAuthCreateSHA256CodeChallenge.js +69 -0
- package/esm/funcs/parametersGetParameters.d.ts +15 -0
- package/esm/funcs/parametersGetParameters.js +96 -0
- package/esm/funcs/providersList.d.ts +15 -0
- package/esm/funcs/providersList.js +69 -0
- package/esm/hooks/hooks.d.ts +25 -0
- package/esm/hooks/hooks.js +82 -0
- package/esm/hooks/index.d.ts +3 -0
- package/esm/hooks/index.js +6 -0
- package/esm/hooks/registration.d.ts +3 -0
- package/esm/hooks/registration.js +12 -0
- package/esm/hooks/types.d.ts +76 -0
- package/esm/hooks/types.js +5 -0
- package/esm/index.d.ts +6 -0
- package/esm/index.js +8 -0
- package/esm/lib/base64.d.ts +10 -0
- package/esm/lib/base64.js +29 -0
- package/esm/lib/config.d.ts +44 -0
- package/esm/lib/config.js +32 -0
- package/esm/lib/dlv.d.ts +14 -0
- package/esm/lib/dlv.js +46 -0
- package/esm/lib/encodings.d.ts +52 -0
- package/esm/lib/encodings.js +354 -0
- package/esm/lib/env.d.ts +15 -0
- package/esm/lib/env.js +44 -0
- package/esm/lib/event-streams.d.ts +11 -0
- package/esm/lib/event-streams.js +125 -0
- package/esm/lib/files.d.ts +13 -0
- package/esm/lib/files.js +73 -0
- package/esm/lib/http.d.ts +67 -0
- package/esm/lib/http.js +207 -0
- package/esm/lib/is-plain-object.d.ts +2 -0
- package/esm/lib/is-plain-object.js +38 -0
- package/esm/lib/logger.d.ts +6 -0
- package/esm/lib/logger.js +5 -0
- package/esm/lib/matchers.d.ts +59 -0
- package/esm/lib/matchers.js +203 -0
- package/esm/lib/primitives.d.ts +26 -0
- package/esm/lib/primitives.js +103 -0
- package/esm/lib/retries.d.ts +38 -0
- package/esm/lib/retries.js +147 -0
- package/esm/lib/schemas.d.ts +21 -0
- package/esm/lib/schemas.js +57 -0
- package/esm/lib/sdks.d.ts +63 -0
- package/esm/lib/sdks.js +269 -0
- package/esm/lib/security.d.ts +83 -0
- package/esm/lib/security.js +137 -0
- package/esm/lib/url.d.ts +5 -0
- package/esm/lib/url.js +22 -0
- package/esm/models/activityitem.d.ts +82 -0
- package/esm/models/activityitem.js +73 -0
- package/esm/models/assistantmessage.d.ts +62 -0
- package/esm/models/assistantmessage.js +73 -0
- package/esm/models/chatcompletionfinishreason.d.ts +25 -0
- package/esm/models/chatcompletionfinishreason.js +35 -0
- package/esm/models/chaterror.d.ts +56 -0
- package/esm/models/chaterror.js +64 -0
- package/esm/models/chatgenerationparams.d.ts +249 -0
- package/esm/models/chatgenerationparams.js +301 -0
- package/esm/models/chatgenerationtokenusage.d.ts +95 -0
- package/esm/models/chatgenerationtokenusage.js +142 -0
- package/esm/models/chatmessagecontentitem.d.ts +40 -0
- package/esm/models/chatmessagecontentitem.js +46 -0
- package/esm/models/chatmessagecontentitemaudio.d.ts +83 -0
- package/esm/models/chatmessagecontentitemaudio.js +102 -0
- package/esm/models/chatmessagecontentitemimage.d.ts +79 -0
- package/esm/models/chatmessagecontentitemimage.js +98 -0
- package/esm/models/chatmessagecontentitemtext.d.ts +31 -0
- package/esm/models/chatmessagecontentitemtext.js +33 -0
- package/esm/models/chatmessagetokenlogprob.d.ts +64 -0
- package/esm/models/chatmessagetokenlogprob.js +75 -0
- package/esm/models/chatmessagetokenlogprobs.d.ts +32 -0
- package/esm/models/chatmessagetokenlogprobs.js +34 -0
- package/esm/models/chatmessagetoolcall.d.ts +60 -0
- package/esm/models/chatmessagetoolcall.js +62 -0
- package/esm/models/chatresponse.d.ts +43 -0
- package/esm/models/chatresponse.js +55 -0
- package/esm/models/chatresponsechoice.d.ts +38 -0
- package/esm/models/chatresponsechoice.js +49 -0
- package/esm/models/chatstreamingchoice.d.ts +38 -0
- package/esm/models/chatstreamingchoice.js +49 -0
- package/esm/models/chatstreamingmessagechunk.d.ts +61 -0
- package/esm/models/chatstreamingmessagechunk.js +67 -0
- package/esm/models/chatstreamingmessagetoolcall.d.ts +62 -0
- package/esm/models/chatstreamingmessagetoolcall.js +66 -0
- package/esm/models/chatstreamingresponsechunk.d.ts +97 -0
- package/esm/models/chatstreamingresponsechunk.js +120 -0
- package/esm/models/chatstreamoptions.d.ts +29 -0
- package/esm/models/chatstreamoptions.js +40 -0
- package/esm/models/completionchoice.d.ts +57 -0
- package/esm/models/completionchoice.js +75 -0
- package/esm/models/completioncreateparams.d.ts +240 -0
- package/esm/models/completioncreateparams.js +313 -0
- package/esm/models/completionlogprobs.d.ts +39 -0
- package/esm/models/completionlogprobs.js +50 -0
- package/esm/models/completionresponse.d.ts +43 -0
- package/esm/models/completionresponse.js +54 -0
- package/esm/models/completionusage.d.ts +33 -0
- package/esm/models/completionusage.js +48 -0
- package/esm/models/createchargerequest.d.ts +28 -0
- package/esm/models/createchargerequest.js +27 -0
- package/esm/models/errorresponse.d.ts +155 -0
- package/esm/models/errorresponse.js +167 -0
- package/esm/models/errors/chaterror.d.ts +37 -0
- package/esm/models/errors/chaterror.js +48 -0
- package/esm/models/errors/errorresponse.d.ts +46 -0
- package/esm/models/errors/errorresponse.js +64 -0
- package/esm/models/errors/httpclienterrors.d.ts +44 -0
- package/esm/models/errors/httpclienterrors.js +69 -0
- package/esm/models/errors/index.d.ts +9 -0
- package/esm/models/errors/index.js +12 -0
- package/esm/models/errors/listproviders.d.ts +49 -0
- package/esm/models/errors/listproviders.js +51 -0
- package/esm/models/errors/openrouterdefaulterror.d.ts +10 -0
- package/esm/models/errors/openrouterdefaulterror.js +30 -0
- package/esm/models/errors/openroutererror.d.ts +19 -0
- package/esm/models/errors/openroutererror.js +16 -0
- package/esm/models/errors/responsevalidationerror.d.ts +26 -0
- package/esm/models/errors/responsevalidationerror.js +29 -0
- package/esm/models/errors/sdkvalidationerror.d.ts +21 -0
- package/esm/models/errors/sdkvalidationerror.js +44 -0
- package/esm/models/filecitationannotation.d.ts +58 -0
- package/esm/models/filecitationannotation.js +64 -0
- package/esm/models/filepathannotation.d.ts +56 -0
- package/esm/models/filepathannotation.js +62 -0
- package/esm/models/imagegenerationstatus.d.ts +24 -0
- package/esm/models/imagegenerationstatus.js +34 -0
- package/esm/models/index.d.ts +96 -0
- package/esm/models/index.js +99 -0
- package/esm/models/jsonschemaconfig.d.ts +39 -0
- package/esm/models/jsonschemaconfig.js +37 -0
- package/esm/models/listendpointsresponse.d.ts +28 -0
- package/esm/models/listendpointsresponse.js +27 -0
- package/esm/models/message.d.ts +80 -0
- package/esm/models/message.js +101 -0
- package/esm/models/modelscountresponse.d.ts +28 -0
- package/esm/models/modelscountresponse.js +27 -0
- package/esm/models/modelslistresponse.d.ts +28 -0
- package/esm/models/modelslistresponse.js +27 -0
- package/esm/models/namedtoolchoice.d.ts +56 -0
- package/esm/models/namedtoolchoice.js +58 -0
- package/esm/models/openresponseseasyinputmessage.d.ts +190 -0
- package/esm/models/openresponseseasyinputmessage.js +194 -0
- package/esm/models/openresponsesformatjsonobject.d.ts +55 -0
- package/esm/models/openresponsesformatjsonobject.js +49 -0
- package/esm/models/openresponsesformatjsonschema.d.ts +67 -0
- package/esm/models/openresponsesformatjsonschema.js +57 -0
- package/esm/models/openresponsesformattext.d.ts +55 -0
- package/esm/models/openresponsesformattext.js +49 -0
- package/esm/models/openresponsesformattextconfig.d.ts +31 -0
- package/esm/models/openresponsesformattextconfig.js +38 -0
- package/esm/models/openresponsesfunctioncalloutput.d.ts +64 -0
- package/esm/models/openresponsesfunctioncalloutput.js +67 -0
- package/esm/models/openresponsesfunctiontoolcall.d.ts +66 -0
- package/esm/models/openresponsesfunctiontoolcall.js +69 -0
- package/esm/models/openresponsesinput.d.ts +29 -0
- package/esm/models/openresponsesinput.js +36 -0
- package/esm/models/openresponsesinputcontent.d.ts +43 -0
- package/esm/models/openresponsesinputcontent.js +50 -0
- package/esm/models/openresponsesinputfile.d.ts +63 -0
- package/esm/models/openresponsesinputfile.js +70 -0
- package/esm/models/openresponsesinputimage.d.ts +79 -0
- package/esm/models/openresponsesinputimage.js +90 -0
- package/esm/models/openresponsesinputitem.d.ts +39 -0
- package/esm/models/openresponsesinputitem.js +62 -0
- package/esm/models/openresponsesinputmessageitem.d.ts +149 -0
- package/esm/models/openresponsesinputmessageitem.js +147 -0
- package/esm/models/openresponsesinputtext.d.ts +57 -0
- package/esm/models/openresponsesinputtext.js +51 -0
- package/esm/models/openresponseslogprobs.d.ts +66 -0
- package/esm/models/openresponseslogprobs.js +71 -0
- package/esm/models/openresponsesnonstreamingresponse.d.ts +260 -0
- package/esm/models/openresponsesnonstreamingresponse.js +290 -0
- package/esm/models/openresponsesoutputtext.d.ts +80 -0
- package/esm/models/openresponsesoutputtext.js +93 -0
- package/esm/models/openresponsesprompt.d.ts +39 -0
- package/esm/models/openresponsesprompt.js +34 -0
- package/esm/models/openresponsesreasoning.d.ts +90 -0
- package/esm/models/openresponsesreasoning.js +101 -0
- package/esm/models/openresponsesreasoningconfig.d.ts +61 -0
- package/esm/models/openresponsesreasoningconfig.js +78 -0
- package/esm/models/openresponsesrefusalcontent.d.ts +54 -0
- package/esm/models/openresponsesrefusalcontent.js +51 -0
- package/esm/models/openresponsesrequest.d.ts +28 -0
- package/esm/models/openresponsesrequest.js +27 -0
- package/esm/models/openresponsesstreamevent.d.ts +1683 -0
- package/esm/models/openresponsesstreamevent.js +1944 -0
- package/esm/models/openresponsestextconfig.d.ts +59 -0
- package/esm/models/openresponsestextconfig.js +63 -0
- package/esm/models/openresponsestoolchoice.d.ts +148 -0
- package/esm/models/openresponsestoolchoice.js +139 -0
- package/esm/models/openresponsestoolunion.d.ts +95 -0
- package/esm/models/openresponsestoolunion.js +94 -0
- package/esm/models/openresponseswebsearch20250826tool.d.ts +94 -0
- package/esm/models/openresponseswebsearch20250826tool.js +103 -0
- package/esm/models/openresponseswebsearchpreview20250311tool.d.ts +64 -0
- package/esm/models/openresponseswebsearchpreview20250311tool.js +68 -0
- package/esm/models/openresponseswebsearchpreviewtool.d.ts +64 -0
- package/esm/models/openresponseswebsearchpreviewtool.js +68 -0
- package/esm/models/openresponseswebsearchtool.d.ts +94 -0
- package/esm/models/openresponseswebsearchtool.js +103 -0
- package/esm/models/operations/createapialpharesponses.d.ts +58 -0
- package/esm/models/operations/createapialpharesponses.js +83 -0
- package/esm/models/operations/createcoinbasecharge.d.ts +212 -0
- package/esm/models/operations/createcoinbasecharge.js +267 -0
- package/esm/models/operations/createkeys.d.ts +226 -0
- package/esm/models/operations/createkeys.js +195 -0
- package/esm/models/operations/deletekeys.d.ts +63 -0
- package/esm/models/operations/deletekeys.js +56 -0
- package/esm/models/operations/getcredits.d.ts +28 -0
- package/esm/models/operations/getcredits.js +27 -0
- package/esm/models/operations/getcurrentkey.d.ts +186 -0
- package/esm/models/operations/getcurrentkey.js +148 -0
- package/esm/models/operations/getgeneration.d.ts +272 -0
- package/esm/models/operations/getgeneration.js +230 -0
- package/esm/models/operations/getkey.d.ts +179 -0
- package/esm/models/operations/getkey.js +148 -0
- package/esm/models/operations/getmodels.d.ts +57 -0
- package/esm/models/operations/getmodels.js +80 -0
- package/esm/models/operations/getparameters.d.ts +250 -0
- package/esm/models/operations/getparameters.js +260 -0
- package/esm/models/operations/getuseractivity.d.ts +64 -0
- package/esm/models/operations/getuseractivity.js +57 -0
- package/esm/models/operations/index.d.ts +20 -0
- package/esm/models/operations/index.js +23 -0
- package/esm/models/operations/list.d.ts +181 -0
- package/esm/models/operations/list.js +159 -0
- package/esm/models/operations/listendpoints.d.ts +63 -0
- package/esm/models/operations/listendpoints.js +59 -0
- package/esm/models/operations/listendpointszdr.d.ts +54 -0
- package/esm/models/operations/listendpointszdr.js +59 -0
- package/esm/models/operations/listmodelscount.d.ts +26 -0
- package/esm/models/operations/listmodelscount.js +34 -0
- package/esm/models/operations/listmodelsuser.d.ts +51 -0
- package/esm/models/operations/listmodelsuser.js +59 -0
- package/esm/models/operations/listproviders.d.ts +116 -0
- package/esm/models/operations/listproviders.js +105 -0
- package/esm/models/operations/sendchatcompletionrequest.d.ts +27 -0
- package/esm/models/operations/sendchatcompletionrequest.js +41 -0
- package/esm/models/operations/updatekeys.d.ts +256 -0
- package/esm/models/operations/updatekeys.js +230 -0
- package/esm/models/outputtextcontent.d.ts +80 -0
- package/esm/models/outputtextcontent.js +93 -0
- package/esm/models/publicendpoint.d.ts +28 -0
- package/esm/models/publicendpoint.js +27 -0
- package/esm/models/reasoningsummarytext.d.ts +54 -0
- package/esm/models/reasoningsummarytext.js +51 -0
- package/esm/models/reasoningsummaryverbosity.d.ts +23 -0
- package/esm/models/reasoningsummaryverbosity.js +33 -0
- package/esm/models/reasoningtextcontent.d.ts +54 -0
- package/esm/models/reasoningtextcontent.js +51 -0
- package/esm/models/refusalcontent.d.ts +54 -0
- package/esm/models/refusalcontent.js +51 -0
- package/esm/models/responseformatjsonschema.d.ts +32 -0
- package/esm/models/responseformatjsonschema.js +43 -0
- package/esm/models/responseformattextgrammar.d.ts +31 -0
- package/esm/models/responseformattextgrammar.js +33 -0
- package/esm/models/responseserrorfield.d.ts +55 -0
- package/esm/models/responseserrorfield.js +61 -0
- package/esm/models/responsesimagegenerationcall.d.ts +59 -0
- package/esm/models/responsesimagegenerationcall.js +56 -0
- package/esm/models/responsesoutputitem.d.ts +34 -0
- package/esm/models/responsesoutputitem.js +47 -0
- package/esm/models/responsesoutputitemfilesearchcall.d.ts +59 -0
- package/esm/models/responsesoutputitemfilesearchcall.js +56 -0
- package/esm/models/responsesoutputitemfunctioncall.d.ts +60 -0
- package/esm/models/responsesoutputitemfunctioncall.js +66 -0
- package/esm/models/responsesoutputitemreasoning.d.ts +62 -0
- package/esm/models/responsesoutputitemreasoning.js +68 -0
- package/esm/models/responsesoutputmessage.d.ts +192 -0
- package/esm/models/responsesoutputmessage.js +190 -0
- package/esm/models/responsessearchcontextsize.d.ts +29 -0
- package/esm/models/responsessearchcontextsize.js +36 -0
- package/esm/models/responsesusage.d.ts +131 -0
- package/esm/models/responsesusage.js +174 -0
- package/esm/models/responseswebsearchcalloutput.d.ts +57 -0
- package/esm/models/responseswebsearchcalloutput.js +54 -0
- package/esm/models/responseswebsearchuserlocation.d.ts +63 -0
- package/esm/models/responseswebsearchuserlocation.js +57 -0
- package/esm/models/security.d.ts +29 -0
- package/esm/models/security.js +32 -0
- package/esm/models/systemmessage.d.ts +55 -0
- package/esm/models/systemmessage.js +64 -0
- package/esm/models/tool.d.ts +66 -0
- package/esm/models/tool.js +65 -0
- package/esm/models/toolcallstatus.d.ts +23 -0
- package/esm/models/toolcallstatus.js +33 -0
- package/esm/models/toolchoicetypes.d.ts +164 -0
- package/esm/models/toolchoicetypes.js +167 -0
- package/esm/models/toolresponsemessage.d.ts +55 -0
- package/esm/models/toolresponsemessage.js +69 -0
- package/esm/models/urlcitationannotation.d.ts +60 -0
- package/esm/models/urlcitationannotation.js +68 -0
- package/esm/models/usermessage.d.ts +55 -0
- package/esm/models/usermessage.js +64 -0
- package/esm/models/websearchpreviewtooluserlocation.d.ts +60 -0
- package/esm/models/websearchpreviewtooluserlocation.js +57 -0
- package/esm/models/websearchstatus.d.ts +24 -0
- package/esm/models/websearchstatus.js +34 -0
- package/esm/react-query/_context.d.ts +8 -0
- package/esm/react-query/_context.js +14 -0
- package/esm/react-query/_types.d.ts +27 -0
- package/esm/react-query/_types.js +5 -0
- package/esm/react-query/analyticsGetUserActivity.d.ts +36 -0
- package/esm/react-query/analyticsGetUserActivity.js +77 -0
- package/esm/react-query/apiKeysCreate.d.ts +20 -0
- package/esm/react-query/apiKeysCreate.js +39 -0
- package/esm/react-query/apiKeysDelete.d.ts +20 -0
- package/esm/react-query/apiKeysDelete.js +39 -0
- package/esm/react-query/apiKeysGet.d.ts +24 -0
- package/esm/react-query/apiKeysGet.js +66 -0
- package/esm/react-query/apiKeysGetCurrentKeyMetadata.d.ts +29 -0
- package/esm/react-query/apiKeysGetCurrentKeyMetadata.js +66 -0
- package/esm/react-query/apiKeysList.d.ts +37 -0
- package/esm/react-query/apiKeysList.js +69 -0
- package/esm/react-query/apiKeysUpdate.d.ts +20 -0
- package/esm/react-query/apiKeysUpdate.js +39 -0
- package/esm/react-query/betaResponsesSend.d.ts +24 -0
- package/esm/react-query/betaResponsesSend.js +42 -0
- package/esm/react-query/chatSend.d.ts +24 -0
- package/esm/react-query/chatSend.js +42 -0
- package/esm/react-query/completionsGenerate.d.ts +23 -0
- package/esm/react-query/completionsGenerate.js +42 -0
- package/esm/react-query/creditsCreateCoinbaseCharge.d.ts +25 -0
- package/esm/react-query/creditsCreateCoinbaseCharge.js +42 -0
- package/esm/react-query/creditsGetCredits.d.ts +29 -0
- package/esm/react-query/creditsGetCredits.js +66 -0
- package/esm/react-query/endpointsList.d.ts +24 -0
- package/esm/react-query/endpointsList.js +66 -0
- package/esm/react-query/endpointsListZdrEndpoints.d.ts +23 -0
- package/esm/react-query/endpointsListZdrEndpoints.js +60 -0
- package/esm/react-query/generationsGetGeneration.d.ts +30 -0
- package/esm/react-query/generationsGetGeneration.js +71 -0
- package/esm/react-query/index.d.ts +23 -0
- package/esm/react-query/index.js +26 -0
- package/esm/react-query/modelsCount.d.ts +23 -0
- package/esm/react-query/modelsCount.js +60 -0
- package/esm/react-query/modelsList.d.ts +43 -0
- package/esm/react-query/modelsList.js +71 -0
- package/esm/react-query/modelsListForUser.d.ts +23 -0
- package/esm/react-query/modelsListForUser.js +60 -0
- package/esm/react-query/parametersGetParameters.d.ts +38 -0
- package/esm/react-query/parametersGetParameters.js +80 -0
- package/esm/react-query/providersList.d.ts +23 -0
- package/esm/react-query/providersList.js +60 -0
- package/esm/sdk/analytics.d.ts +12 -0
- package/esm/sdk/analytics.js +18 -0
- package/esm/sdk/apikeys.d.ts +32 -0
- package/esm/sdk/apikeys.js +53 -0
- package/esm/sdk/beta.d.ts +7 -0
- package/esm/sdk/beta.js +11 -0
- package/esm/sdk/chat.d.ts +13 -0
- package/esm/sdk/chat.js +18 -0
- package/esm/sdk/completions.d.ts +12 -0
- package/esm/sdk/completions.js +18 -0
- package/esm/sdk/credits.d.ts +20 -0
- package/esm/sdk/credits.js +28 -0
- package/esm/sdk/endpoints.d.ts +13 -0
- package/esm/sdk/endpoints.js +22 -0
- package/esm/sdk/generations.d.ts +9 -0
- package/esm/sdk/generations.js +15 -0
- package/esm/sdk/index.d.ts +2 -0
- package/esm/sdk/index.js +5 -0
- package/esm/sdk/models.d.ts +17 -0
- package/esm/sdk/models.js +29 -0
- package/esm/sdk/parameters.d.ts +9 -0
- package/esm/sdk/parameters.js +15 -0
- package/esm/sdk/providers.d.ts +9 -0
- package/esm/sdk/providers.js +15 -0
- package/esm/sdk/responses.d.ts +13 -0
- package/esm/sdk/responses.js +18 -0
- package/esm/sdk/sdk.d.ts +37 -0
- package/esm/sdk/sdk.js +51 -0
- package/esm/types/async.d.ts +23 -0
- package/esm/types/async.js +40 -0
- package/esm/types/blobs.d.ts +4 -0
- package/esm/types/blobs.js +25 -0
- package/esm/types/constdatetime.d.ts +3 -0
- package/esm/types/constdatetime.js +10 -0
- package/esm/types/enums.d.ts +12 -0
- package/esm/types/enums.js +7 -0
- package/esm/types/fp.d.ts +31 -0
- package/esm/types/fp.js +31 -0
- package/esm/types/index.d.ts +8 -0
- package/esm/types/index.js +8 -0
- package/esm/types/operations.d.ts +27 -0
- package/esm/types/operations.js +77 -0
- package/esm/types/rfcdate.d.ts +21 -0
- package/esm/types/rfcdate.js +42 -0
- package/esm/types/streams.d.ts +2 -0
- package/esm/types/streams.js +15 -0
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/tsconfig.json +3 -3
- package/core.d.ts +0 -9
- package/core.js +0 -12
- package/funcs/analyticsGetUserActivity.d.ts +0 -17
- package/funcs/analyticsGetUserActivity.js +0 -84
- package/funcs/apiKeysCreate.d.ts +0 -14
- package/funcs/apiKeysCreate.js +0 -78
- package/funcs/apiKeysDelete.d.ts +0 -14
- package/funcs/apiKeysDelete.js +0 -83
- package/funcs/apiKeysGet.d.ts +0 -14
- package/funcs/apiKeysGet.js +0 -83
- package/funcs/apiKeysGetCurrentKeyMetadata.d.ts +0 -17
- package/funcs/apiKeysGetCurrentKeyMetadata.js +0 -71
- package/funcs/apiKeysList.d.ts +0 -14
- package/funcs/apiKeysList.js +0 -82
- package/funcs/apiKeysUpdate.d.ts +0 -14
- package/funcs/apiKeysUpdate.js +0 -84
- package/funcs/betaResponsesSend.d.ts +0 -17
- package/funcs/betaResponsesSend.js +0 -68
- package/funcs/chatSend.d.ts +0 -18
- package/funcs/chatSend.js +0 -82
- package/funcs/completionsGenerate.d.ts +0 -17
- package/funcs/completionsGenerate.js +0 -81
- package/funcs/creditsCreateCoinbaseCharge.d.ts +0 -18
- package/funcs/creditsCreateCoinbaseCharge.js +0 -76
- package/funcs/creditsGetCredits.d.ts +0 -17
- package/funcs/creditsGetCredits.js +0 -71
- package/funcs/endpointsList.d.ts +0 -14
- package/funcs/endpointsList.js +0 -87
- package/funcs/endpointsListZdrEndpoints.d.ts +0 -13
- package/funcs/endpointsListZdrEndpoints.js +0 -64
- package/funcs/generationsGetGeneration.d.ts +0 -14
- package/funcs/generationsGetGeneration.js +0 -81
- package/funcs/modelsCount.d.ts +0 -13
- package/funcs/modelsCount.js +0 -64
- package/funcs/modelsList.d.ts +0 -13
- package/funcs/modelsList.js +0 -82
- package/funcs/modelsListForUser.d.ts +0 -13
- package/funcs/modelsListForUser.js +0 -68
- package/funcs/oAuthCreateAuthorizationUrl.d.ts +0 -42
- package/funcs/oAuthCreateAuthorizationUrl.js +0 -43
- package/funcs/oAuthCreateSHA256CodeChallenge.d.ts +0 -34
- package/funcs/oAuthCreateSHA256CodeChallenge.js +0 -68
- package/funcs/parametersGetParameters.d.ts +0 -14
- package/funcs/parametersGetParameters.js +0 -95
- package/funcs/providersList.d.ts +0 -14
- package/funcs/providersList.js +0 -68
- package/hooks/hooks.d.ts +0 -24
- package/hooks/hooks.js +0 -81
- package/hooks/index.d.ts +0 -2
- package/hooks/index.js +0 -5
- package/hooks/registration.d.ts +0 -2
- package/hooks/registration.js +0 -11
- package/hooks/types.d.ts +0 -75
- package/hooks/types.js +0 -4
- package/index.d.ts +0 -5
- package/index.js +0 -7
- package/lib/base64.d.ts +0 -9
- package/lib/base64.js +0 -28
- package/lib/config.d.ts +0 -43
- package/lib/config.js +0 -31
- package/lib/dlv.d.ts +0 -13
- package/lib/dlv.js +0 -45
- package/lib/encodings.d.ts +0 -51
- package/lib/encodings.js +0 -353
- package/lib/env.d.ts +0 -14
- package/lib/env.js +0 -43
- package/lib/event-streams.d.ts +0 -10
- package/lib/event-streams.js +0 -124
- package/lib/files.d.ts +0 -12
- package/lib/files.js +0 -72
- package/lib/http.d.ts +0 -66
- package/lib/http.js +0 -206
- package/lib/is-plain-object.d.ts +0 -1
- package/lib/is-plain-object.js +0 -37
- package/lib/logger.d.ts +0 -5
- package/lib/logger.js +0 -4
- package/lib/matchers.d.ts +0 -58
- package/lib/matchers.js +0 -202
- package/lib/primitives.d.ts +0 -25
- package/lib/primitives.js +0 -102
- package/lib/retries.d.ts +0 -37
- package/lib/retries.js +0 -146
- package/lib/schemas.d.ts +0 -20
- package/lib/schemas.js +0 -56
- package/lib/sdks.d.ts +0 -62
- package/lib/sdks.js +0 -268
- package/lib/security.d.ts +0 -82
- package/lib/security.js +0 -136
- package/lib/url.d.ts +0 -4
- package/lib/url.js +0 -21
- package/models/activityitem.d.ts +0 -81
- package/models/activityitem.js +0 -72
- package/models/assistantmessage.d.ts +0 -61
- package/models/assistantmessage.js +0 -72
- package/models/chatcompletionfinishreason.d.ts +0 -24
- package/models/chatcompletionfinishreason.js +0 -34
- package/models/chaterror.d.ts +0 -55
- package/models/chaterror.js +0 -63
- package/models/chatgenerationparams.d.ts +0 -248
- package/models/chatgenerationparams.js +0 -300
- package/models/chatgenerationtokenusage.d.ts +0 -94
- package/models/chatgenerationtokenusage.js +0 -141
- package/models/chatmessagecontentitem.d.ts +0 -39
- package/models/chatmessagecontentitem.js +0 -45
- package/models/chatmessagecontentitemaudio.d.ts +0 -82
- package/models/chatmessagecontentitemaudio.js +0 -101
- package/models/chatmessagecontentitemimage.d.ts +0 -78
- package/models/chatmessagecontentitemimage.js +0 -97
- package/models/chatmessagecontentitemtext.d.ts +0 -30
- package/models/chatmessagecontentitemtext.js +0 -32
- package/models/chatmessagetokenlogprob.d.ts +0 -63
- package/models/chatmessagetokenlogprob.js +0 -74
- package/models/chatmessagetokenlogprobs.d.ts +0 -31
- package/models/chatmessagetokenlogprobs.js +0 -33
- package/models/chatmessagetoolcall.d.ts +0 -59
- package/models/chatmessagetoolcall.js +0 -61
- package/models/chatresponse.d.ts +0 -42
- package/models/chatresponse.js +0 -54
- package/models/chatresponsechoice.d.ts +0 -37
- package/models/chatresponsechoice.js +0 -48
- package/models/chatstreamingchoice.d.ts +0 -37
- package/models/chatstreamingchoice.js +0 -48
- package/models/chatstreamingmessagechunk.d.ts +0 -60
- package/models/chatstreamingmessagechunk.js +0 -66
- package/models/chatstreamingmessagetoolcall.d.ts +0 -61
- package/models/chatstreamingmessagetoolcall.js +0 -65
- package/models/chatstreamingresponsechunk.d.ts +0 -96
- package/models/chatstreamingresponsechunk.js +0 -119
- package/models/chatstreamoptions.d.ts +0 -28
- package/models/chatstreamoptions.js +0 -39
- package/models/completionchoice.d.ts +0 -56
- package/models/completionchoice.js +0 -74
- package/models/completioncreateparams.d.ts +0 -239
- package/models/completioncreateparams.js +0 -312
- package/models/completionlogprobs.d.ts +0 -38
- package/models/completionlogprobs.js +0 -49
- package/models/completionresponse.d.ts +0 -42
- package/models/completionresponse.js +0 -53
- package/models/completionusage.d.ts +0 -32
- package/models/completionusage.js +0 -47
- package/models/createchargerequest.d.ts +0 -27
- package/models/createchargerequest.js +0 -26
- package/models/errorresponse.d.ts +0 -154
- package/models/errorresponse.js +0 -166
- package/models/errors/chaterror.d.ts +0 -36
- package/models/errors/chaterror.js +0 -47
- package/models/errors/errorresponse.d.ts +0 -45
- package/models/errors/errorresponse.js +0 -63
- package/models/errors/httpclienterrors.d.ts +0 -43
- package/models/errors/httpclienterrors.js +0 -68
- package/models/errors/index.d.ts +0 -8
- package/models/errors/index.js +0 -11
- package/models/errors/listproviders.d.ts +0 -48
- package/models/errors/listproviders.js +0 -50
- package/models/errors/openrouterdefaulterror.d.ts +0 -9
- package/models/errors/openrouterdefaulterror.js +0 -29
- package/models/errors/openroutererror.d.ts +0 -18
- package/models/errors/openroutererror.js +0 -15
- package/models/errors/responsevalidationerror.d.ts +0 -25
- package/models/errors/responsevalidationerror.js +0 -28
- package/models/errors/sdkvalidationerror.d.ts +0 -20
- package/models/errors/sdkvalidationerror.js +0 -43
- package/models/filecitationannotation.d.ts +0 -57
- package/models/filecitationannotation.js +0 -63
- package/models/filepathannotation.d.ts +0 -55
- package/models/filepathannotation.js +0 -61
- package/models/imagegenerationstatus.d.ts +0 -23
- package/models/imagegenerationstatus.js +0 -33
- package/models/index.d.ts +0 -95
- package/models/index.js +0 -98
- package/models/jsonschemaconfig.d.ts +0 -38
- package/models/jsonschemaconfig.js +0 -36
- package/models/listendpointsresponse.d.ts +0 -27
- package/models/listendpointsresponse.js +0 -26
- package/models/message.d.ts +0 -79
- package/models/message.js +0 -100
- package/models/modelscountresponse.d.ts +0 -27
- package/models/modelscountresponse.js +0 -26
- package/models/modelslistresponse.d.ts +0 -27
- package/models/modelslistresponse.js +0 -26
- package/models/namedtoolchoice.d.ts +0 -55
- package/models/namedtoolchoice.js +0 -57
- package/models/openresponseseasyinputmessage.d.ts +0 -189
- package/models/openresponseseasyinputmessage.js +0 -193
- package/models/openresponsesformatjsonobject.d.ts +0 -54
- package/models/openresponsesformatjsonobject.js +0 -48
- package/models/openresponsesformatjsonschema.d.ts +0 -66
- package/models/openresponsesformatjsonschema.js +0 -56
- package/models/openresponsesformattext.d.ts +0 -54
- package/models/openresponsesformattext.js +0 -48
- package/models/openresponsesformattextconfig.d.ts +0 -30
- package/models/openresponsesformattextconfig.js +0 -37
- package/models/openresponsesfunctioncalloutput.d.ts +0 -63
- package/models/openresponsesfunctioncalloutput.js +0 -66
- package/models/openresponsesfunctiontoolcall.d.ts +0 -65
- package/models/openresponsesfunctiontoolcall.js +0 -68
- package/models/openresponsesinput.d.ts +0 -28
- package/models/openresponsesinput.js +0 -35
- package/models/openresponsesinputcontent.d.ts +0 -42
- package/models/openresponsesinputcontent.js +0 -49
- package/models/openresponsesinputfile.d.ts +0 -62
- package/models/openresponsesinputfile.js +0 -69
- package/models/openresponsesinputimage.d.ts +0 -78
- package/models/openresponsesinputimage.js +0 -89
- package/models/openresponsesinputitem.d.ts +0 -38
- package/models/openresponsesinputitem.js +0 -61
- package/models/openresponsesinputmessageitem.d.ts +0 -148
- package/models/openresponsesinputmessageitem.js +0 -146
- package/models/openresponsesinputtext.d.ts +0 -56
- package/models/openresponsesinputtext.js +0 -50
- package/models/openresponseslogprobs.d.ts +0 -65
- package/models/openresponseslogprobs.js +0 -70
- package/models/openresponsesnonstreamingresponse.d.ts +0 -259
- package/models/openresponsesnonstreamingresponse.js +0 -289
- package/models/openresponsesoutputtext.d.ts +0 -79
- package/models/openresponsesoutputtext.js +0 -92
- package/models/openresponsesprompt.d.ts +0 -38
- package/models/openresponsesprompt.js +0 -33
- package/models/openresponsesreasoning.d.ts +0 -89
- package/models/openresponsesreasoning.js +0 -100
- package/models/openresponsesreasoningconfig.d.ts +0 -60
- package/models/openresponsesreasoningconfig.js +0 -77
- package/models/openresponsesrefusalcontent.d.ts +0 -53
- package/models/openresponsesrefusalcontent.js +0 -50
- package/models/openresponsesrequest.d.ts +0 -27
- package/models/openresponsesrequest.js +0 -26
- package/models/openresponsesstreamevent.d.ts +0 -1682
- package/models/openresponsesstreamevent.js +0 -1943
- package/models/openresponsestextconfig.d.ts +0 -58
- package/models/openresponsestextconfig.js +0 -62
- package/models/openresponsestoolchoice.d.ts +0 -147
- package/models/openresponsestoolchoice.js +0 -138
- package/models/openresponsestoolunion.d.ts +0 -94
- package/models/openresponsestoolunion.js +0 -93
- package/models/openresponseswebsearch20250826tool.d.ts +0 -93
- package/models/openresponseswebsearch20250826tool.js +0 -102
- package/models/openresponseswebsearchpreview20250311tool.d.ts +0 -63
- package/models/openresponseswebsearchpreview20250311tool.js +0 -67
- package/models/openresponseswebsearchpreviewtool.d.ts +0 -63
- package/models/openresponseswebsearchpreviewtool.js +0 -67
- package/models/openresponseswebsearchtool.d.ts +0 -93
- package/models/openresponseswebsearchtool.js +0 -102
- package/models/operations/createapialpharesponses.d.ts +0 -57
- package/models/operations/createapialpharesponses.js +0 -82
- package/models/operations/createcoinbasecharge.d.ts +0 -211
- package/models/operations/createcoinbasecharge.js +0 -266
- package/models/operations/createkeys.d.ts +0 -225
- package/models/operations/createkeys.js +0 -194
- package/models/operations/deletekeys.d.ts +0 -62
- package/models/operations/deletekeys.js +0 -55
- package/models/operations/getcredits.d.ts +0 -27
- package/models/operations/getcredits.js +0 -26
- package/models/operations/getcurrentkey.d.ts +0 -185
- package/models/operations/getcurrentkey.js +0 -147
- package/models/operations/getgeneration.d.ts +0 -271
- package/models/operations/getgeneration.js +0 -229
- package/models/operations/getkey.d.ts +0 -178
- package/models/operations/getkey.js +0 -147
- package/models/operations/getmodels.d.ts +0 -56
- package/models/operations/getmodels.js +0 -79
- package/models/operations/getparameters.d.ts +0 -249
- package/models/operations/getparameters.js +0 -259
- package/models/operations/getuseractivity.d.ts +0 -63
- package/models/operations/getuseractivity.js +0 -56
- package/models/operations/index.d.ts +0 -19
- package/models/operations/index.js +0 -22
- package/models/operations/list.d.ts +0 -180
- package/models/operations/list.js +0 -158
- package/models/operations/listendpoints.d.ts +0 -62
- package/models/operations/listendpoints.js +0 -58
- package/models/operations/listendpointszdr.d.ts +0 -53
- package/models/operations/listendpointszdr.js +0 -58
- package/models/operations/listmodelscount.d.ts +0 -25
- package/models/operations/listmodelscount.js +0 -33
- package/models/operations/listmodelsuser.d.ts +0 -50
- package/models/operations/listmodelsuser.js +0 -58
- package/models/operations/listproviders.d.ts +0 -115
- package/models/operations/listproviders.js +0 -104
- package/models/operations/sendchatcompletionrequest.d.ts +0 -26
- package/models/operations/sendchatcompletionrequest.js +0 -40
- package/models/operations/updatekeys.d.ts +0 -255
- package/models/operations/updatekeys.js +0 -229
- package/models/outputtextcontent.d.ts +0 -79
- package/models/outputtextcontent.js +0 -92
- package/models/publicendpoint.d.ts +0 -27
- package/models/publicendpoint.js +0 -26
- package/models/reasoningsummarytext.d.ts +0 -53
- package/models/reasoningsummarytext.js +0 -50
- package/models/reasoningsummaryverbosity.d.ts +0 -22
- package/models/reasoningsummaryverbosity.js +0 -32
- package/models/reasoningtextcontent.d.ts +0 -53
- package/models/reasoningtextcontent.js +0 -50
- package/models/refusalcontent.d.ts +0 -53
- package/models/refusalcontent.js +0 -50
- package/models/responseformatjsonschema.d.ts +0 -31
- package/models/responseformatjsonschema.js +0 -42
- package/models/responseformattextgrammar.d.ts +0 -30
- package/models/responseformattextgrammar.js +0 -32
- package/models/responseserrorfield.d.ts +0 -54
- package/models/responseserrorfield.js +0 -60
- package/models/responsesimagegenerationcall.d.ts +0 -58
- package/models/responsesimagegenerationcall.js +0 -55
- package/models/responsesoutputitem.d.ts +0 -33
- package/models/responsesoutputitem.js +0 -46
- package/models/responsesoutputitemfilesearchcall.d.ts +0 -58
- package/models/responsesoutputitemfilesearchcall.js +0 -55
- package/models/responsesoutputitemfunctioncall.d.ts +0 -59
- package/models/responsesoutputitemfunctioncall.js +0 -65
- package/models/responsesoutputitemreasoning.d.ts +0 -61
- package/models/responsesoutputitemreasoning.js +0 -67
- package/models/responsesoutputmessage.d.ts +0 -191
- package/models/responsesoutputmessage.js +0 -189
- package/models/responsessearchcontextsize.d.ts +0 -28
- package/models/responsessearchcontextsize.js +0 -35
- package/models/responsesusage.d.ts +0 -130
- package/models/responsesusage.js +0 -173
- package/models/responseswebsearchcalloutput.d.ts +0 -56
- package/models/responseswebsearchcalloutput.js +0 -53
- package/models/responseswebsearchuserlocation.d.ts +0 -62
- package/models/responseswebsearchuserlocation.js +0 -56
- package/models/security.d.ts +0 -28
- package/models/security.js +0 -31
- package/models/systemmessage.d.ts +0 -54
- package/models/systemmessage.js +0 -63
- package/models/tool.d.ts +0 -65
- package/models/tool.js +0 -64
- package/models/toolcallstatus.d.ts +0 -22
- package/models/toolcallstatus.js +0 -32
- package/models/toolchoicetypes.d.ts +0 -163
- package/models/toolchoicetypes.js +0 -166
- package/models/toolresponsemessage.d.ts +0 -54
- package/models/toolresponsemessage.js +0 -68
- package/models/urlcitationannotation.d.ts +0 -59
- package/models/urlcitationannotation.js +0 -67
- package/models/usermessage.d.ts +0 -54
- package/models/usermessage.js +0 -63
- package/models/websearchpreviewtooluserlocation.d.ts +0 -59
- package/models/websearchpreviewtooluserlocation.js +0 -56
- package/models/websearchstatus.d.ts +0 -23
- package/models/websearchstatus.js +0 -33
- package/react-query/_context.d.ts +0 -7
- package/react-query/_context.js +0 -13
- package/react-query/_types.d.ts +0 -26
- package/react-query/_types.js +0 -4
- package/react-query/analyticsGetUserActivity.d.ts +0 -35
- package/react-query/analyticsGetUserActivity.js +0 -76
- package/react-query/apiKeysCreate.d.ts +0 -19
- package/react-query/apiKeysCreate.js +0 -38
- package/react-query/apiKeysDelete.d.ts +0 -19
- package/react-query/apiKeysDelete.js +0 -38
- package/react-query/apiKeysGet.d.ts +0 -23
- package/react-query/apiKeysGet.js +0 -65
- package/react-query/apiKeysGetCurrentKeyMetadata.d.ts +0 -28
- package/react-query/apiKeysGetCurrentKeyMetadata.js +0 -65
- package/react-query/apiKeysList.d.ts +0 -36
- package/react-query/apiKeysList.js +0 -68
- package/react-query/apiKeysUpdate.d.ts +0 -19
- package/react-query/apiKeysUpdate.js +0 -38
- package/react-query/betaResponsesSend.d.ts +0 -23
- package/react-query/betaResponsesSend.js +0 -41
- package/react-query/chatSend.d.ts +0 -23
- package/react-query/chatSend.js +0 -41
- package/react-query/completionsGenerate.d.ts +0 -22
- package/react-query/completionsGenerate.js +0 -41
- package/react-query/creditsCreateCoinbaseCharge.d.ts +0 -24
- package/react-query/creditsCreateCoinbaseCharge.js +0 -41
- package/react-query/creditsGetCredits.d.ts +0 -28
- package/react-query/creditsGetCredits.js +0 -65
- package/react-query/endpointsList.d.ts +0 -23
- package/react-query/endpointsList.js +0 -65
- package/react-query/endpointsListZdrEndpoints.d.ts +0 -22
- package/react-query/endpointsListZdrEndpoints.js +0 -59
- package/react-query/generationsGetGeneration.d.ts +0 -29
- package/react-query/generationsGetGeneration.js +0 -70
- package/react-query/index.d.ts +0 -22
- package/react-query/index.js +0 -25
- package/react-query/modelsCount.d.ts +0 -22
- package/react-query/modelsCount.js +0 -59
- package/react-query/modelsList.d.ts +0 -42
- package/react-query/modelsList.js +0 -70
- package/react-query/modelsListForUser.d.ts +0 -22
- package/react-query/modelsListForUser.js +0 -59
- package/react-query/parametersGetParameters.d.ts +0 -37
- package/react-query/parametersGetParameters.js +0 -79
- package/react-query/providersList.d.ts +0 -22
- package/react-query/providersList.js +0 -59
- package/sdk/analytics.d.ts +0 -11
- package/sdk/analytics.js +0 -17
- package/sdk/apikeys.d.ts +0 -31
- package/sdk/apikeys.js +0 -52
- package/sdk/beta.d.ts +0 -6
- package/sdk/beta.js +0 -10
- package/sdk/chat.d.ts +0 -12
- package/sdk/chat.js +0 -17
- package/sdk/completions.d.ts +0 -11
- package/sdk/completions.js +0 -17
- package/sdk/credits.d.ts +0 -19
- package/sdk/credits.js +0 -27
- package/sdk/endpoints.d.ts +0 -12
- package/sdk/endpoints.js +0 -21
- package/sdk/generations.d.ts +0 -8
- package/sdk/generations.js +0 -14
- package/sdk/index.d.ts +0 -1
- package/sdk/index.js +0 -4
- package/sdk/models.d.ts +0 -16
- package/sdk/models.js +0 -28
- package/sdk/parameters.d.ts +0 -8
- package/sdk/parameters.js +0 -14
- package/sdk/providers.d.ts +0 -8
- package/sdk/providers.js +0 -14
- package/sdk/responses.d.ts +0 -12
- package/sdk/responses.js +0 -17
- package/sdk/sdk.d.ts +0 -36
- package/sdk/sdk.js +0 -50
- package/types/async.d.ts +0 -22
- package/types/async.js +0 -39
- package/types/blobs.d.ts +0 -3
- package/types/blobs.js +0 -24
- package/types/constdatetime.d.ts +0 -2
- package/types/constdatetime.js +0 -9
- package/types/enums.d.ts +0 -11
- package/types/enums.js +0 -6
- package/types/fp.d.ts +0 -30
- package/types/fp.js +0 -30
- package/types/index.d.ts +0 -7
- package/types/index.js +0 -7
- package/types/operations.d.ts +0 -26
- package/types/operations.js +0 -76
- package/types/rfcdate.d.ts +0 -20
- package/types/rfcdate.js +0 -41
- package/types/streams.d.ts +0 -1
- package/types/streams.js +0 -14
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v4";
|
|
2
|
-
import { OpenEnum } from "../types/enums.js";
|
|
3
|
-
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
|
-
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
|
-
export declare const ErrorResponseCode: {
|
|
6
|
-
readonly OneHundred: 100;
|
|
7
|
-
readonly OneHundredAndOne: 101;
|
|
8
|
-
readonly OneHundredAndTwo: 102;
|
|
9
|
-
readonly TwoHundred: 200;
|
|
10
|
-
readonly TwoHundredAndOne: 201;
|
|
11
|
-
readonly TwoHundredAndTwo: 202;
|
|
12
|
-
readonly TwoHundredAndThree: 203;
|
|
13
|
-
readonly TwoHundredAndFour: 204;
|
|
14
|
-
readonly TwoHundredAndFive: 205;
|
|
15
|
-
readonly TwoHundredAndSix: 206;
|
|
16
|
-
readonly TwoHundredAndSeven: 207;
|
|
17
|
-
readonly TwoHundredAndEight: 208;
|
|
18
|
-
readonly ThreeHundred: 300;
|
|
19
|
-
readonly ThreeHundredAndOne: 301;
|
|
20
|
-
readonly ThreeHundredAndTwo: 302;
|
|
21
|
-
readonly ThreeHundredAndThree: 303;
|
|
22
|
-
readonly ThreeHundredAndFour: 304;
|
|
23
|
-
readonly ThreeHundredAndFive: 305;
|
|
24
|
-
readonly ThreeHundredAndSeven: 307;
|
|
25
|
-
readonly ThreeHundredAndEight: 308;
|
|
26
|
-
readonly FourHundred: 400;
|
|
27
|
-
readonly FourHundredAndOne: 401;
|
|
28
|
-
readonly FourHundredAndTwo: 402;
|
|
29
|
-
readonly FourHundredAndThree: 403;
|
|
30
|
-
readonly FourHundredAndFour: 404;
|
|
31
|
-
readonly FourHundredAndFive: 405;
|
|
32
|
-
readonly FourHundredAndSix: 406;
|
|
33
|
-
readonly FourHundredAndSeven: 407;
|
|
34
|
-
readonly FourHundredAndEight: 408;
|
|
35
|
-
readonly FourHundredAndNine: 409;
|
|
36
|
-
readonly FourHundredAndTen: 410;
|
|
37
|
-
readonly FourHundredAndEleven: 411;
|
|
38
|
-
readonly FourHundredAndTwelve: 412;
|
|
39
|
-
readonly FourHundredAndThirteen: 413;
|
|
40
|
-
readonly FourHundredAndFourteen: 414;
|
|
41
|
-
readonly FourHundredAndFifteen: 415;
|
|
42
|
-
readonly FourHundredAndSixteen: 416;
|
|
43
|
-
readonly FourHundredAndSeventeen: 417;
|
|
44
|
-
readonly FourHundredAndEighteen: 418;
|
|
45
|
-
readonly FourHundredAndTwentyTwo: 422;
|
|
46
|
-
readonly FourHundredAndTwentyThree: 423;
|
|
47
|
-
readonly FourHundredAndTwentyFour: 424;
|
|
48
|
-
readonly FourHundredAndTwentyFive: 425;
|
|
49
|
-
readonly FourHundredAndTwentySix: 426;
|
|
50
|
-
readonly FourHundredAndTwentyEight: 428;
|
|
51
|
-
readonly FourHundredAndTwentyNine: 429;
|
|
52
|
-
readonly FourHundredAndThirtyOne: 431;
|
|
53
|
-
readonly FourHundredAndFiftyOne: 451;
|
|
54
|
-
readonly FourHundredAndNinetyEight: 498;
|
|
55
|
-
readonly FourHundredAndNinetyNine: 499;
|
|
56
|
-
readonly FiveHundred: 500;
|
|
57
|
-
readonly FiveHundredAndOne: 501;
|
|
58
|
-
readonly FiveHundredAndTwo: 502;
|
|
59
|
-
readonly FiveHundredAndThree: 503;
|
|
60
|
-
readonly FiveHundredAndFour: 504;
|
|
61
|
-
readonly FiveHundredAndFive: 505;
|
|
62
|
-
readonly FiveHundredAndSix: 506;
|
|
63
|
-
readonly FiveHundredAndSeven: 507;
|
|
64
|
-
readonly FiveHundredAndEight: 508;
|
|
65
|
-
readonly FiveHundredAndTen: 510;
|
|
66
|
-
readonly FiveHundredAndEleven: 511;
|
|
67
|
-
readonly FiveHundredAndTwenty: 520;
|
|
68
|
-
readonly FiveHundredAndTwentyOne: 521;
|
|
69
|
-
readonly FiveHundredAndTwentyTwo: 522;
|
|
70
|
-
readonly FiveHundredAndTwentyThree: 523;
|
|
71
|
-
readonly FiveHundredAndTwentyFour: 524;
|
|
72
|
-
readonly FiveHundredAndTwentyFive: 525;
|
|
73
|
-
readonly FiveHundredAndTwentySix: 526;
|
|
74
|
-
readonly FiveHundredAndTwentyNine: 529;
|
|
75
|
-
readonly FiveHundredAndThirty: 530;
|
|
76
|
-
};
|
|
77
|
-
export type ErrorResponseCode = OpenEnum<typeof ErrorResponseCode>;
|
|
78
|
-
export type ErrorResponseError = {
|
|
79
|
-
code: ErrorResponseCode;
|
|
80
|
-
message: string;
|
|
81
|
-
metadata?: {
|
|
82
|
-
[k: string]: any | null;
|
|
83
|
-
} | null | undefined;
|
|
84
|
-
};
|
|
85
|
-
/**
|
|
86
|
-
* Error response
|
|
87
|
-
*/
|
|
88
|
-
export type ErrorResponse = {
|
|
89
|
-
error: ErrorResponseError;
|
|
90
|
-
userId?: string | null | undefined;
|
|
91
|
-
};
|
|
92
|
-
/** @internal */
|
|
93
|
-
export declare const ErrorResponseCode$inboundSchema: z.ZodType<ErrorResponseCode, unknown>;
|
|
94
|
-
/** @internal */
|
|
95
|
-
export declare const ErrorResponseCode$outboundSchema: z.ZodType<ErrorResponseCode, ErrorResponseCode>;
|
|
96
|
-
/**
|
|
97
|
-
* @internal
|
|
98
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
99
|
-
*/
|
|
100
|
-
export declare namespace ErrorResponseCode$ {
|
|
101
|
-
/** @deprecated use `ErrorResponseCode$inboundSchema` instead. */
|
|
102
|
-
const inboundSchema: z.ZodType<ErrorResponseCode, unknown, z.core.$ZodTypeInternals<ErrorResponseCode, unknown>>;
|
|
103
|
-
/** @deprecated use `ErrorResponseCode$outboundSchema` instead. */
|
|
104
|
-
const outboundSchema: z.ZodType<ErrorResponseCode, ErrorResponseCode, z.core.$ZodTypeInternals<ErrorResponseCode, ErrorResponseCode>>;
|
|
105
|
-
}
|
|
106
|
-
/** @internal */
|
|
107
|
-
export declare const ErrorResponseError$inboundSchema: z.ZodType<ErrorResponseError, unknown>;
|
|
108
|
-
/** @internal */
|
|
109
|
-
export type ErrorResponseError$Outbound = {
|
|
110
|
-
code: number;
|
|
111
|
-
message: string;
|
|
112
|
-
metadata?: {
|
|
113
|
-
[k: string]: any | null;
|
|
114
|
-
} | null | undefined;
|
|
115
|
-
};
|
|
116
|
-
/** @internal */
|
|
117
|
-
export declare const ErrorResponseError$outboundSchema: z.ZodType<ErrorResponseError$Outbound, ErrorResponseError>;
|
|
118
|
-
/**
|
|
119
|
-
* @internal
|
|
120
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
121
|
-
*/
|
|
122
|
-
export declare namespace ErrorResponseError$ {
|
|
123
|
-
/** @deprecated use `ErrorResponseError$inboundSchema` instead. */
|
|
124
|
-
const inboundSchema: z.ZodType<ErrorResponseError, unknown, z.core.$ZodTypeInternals<ErrorResponseError, unknown>>;
|
|
125
|
-
/** @deprecated use `ErrorResponseError$outboundSchema` instead. */
|
|
126
|
-
const outboundSchema: z.ZodType<ErrorResponseError$Outbound, ErrorResponseError, z.core.$ZodTypeInternals<ErrorResponseError$Outbound, ErrorResponseError>>;
|
|
127
|
-
/** @deprecated use `ErrorResponseError$Outbound` instead. */
|
|
128
|
-
type Outbound = ErrorResponseError$Outbound;
|
|
129
|
-
}
|
|
130
|
-
export declare function errorResponseErrorToJSON(errorResponseError: ErrorResponseError): string;
|
|
131
|
-
export declare function errorResponseErrorFromJSON(jsonString: string): SafeParseResult<ErrorResponseError, SDKValidationError>;
|
|
132
|
-
/** @internal */
|
|
133
|
-
export declare const ErrorResponse$inboundSchema: z.ZodType<ErrorResponse, unknown>;
|
|
134
|
-
/** @internal */
|
|
135
|
-
export type ErrorResponse$Outbound = {
|
|
136
|
-
error: ErrorResponseError$Outbound;
|
|
137
|
-
user_id?: string | null | undefined;
|
|
138
|
-
};
|
|
139
|
-
/** @internal */
|
|
140
|
-
export declare const ErrorResponse$outboundSchema: z.ZodType<ErrorResponse$Outbound, ErrorResponse>;
|
|
141
|
-
/**
|
|
142
|
-
* @internal
|
|
143
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
144
|
-
*/
|
|
145
|
-
export declare namespace ErrorResponse$ {
|
|
146
|
-
/** @deprecated use `ErrorResponse$inboundSchema` instead. */
|
|
147
|
-
const inboundSchema: z.ZodType<ErrorResponse, unknown, z.core.$ZodTypeInternals<ErrorResponse, unknown>>;
|
|
148
|
-
/** @deprecated use `ErrorResponse$outboundSchema` instead. */
|
|
149
|
-
const outboundSchema: z.ZodType<ErrorResponse$Outbound, ErrorResponse, z.core.$ZodTypeInternals<ErrorResponse$Outbound, ErrorResponse>>;
|
|
150
|
-
/** @deprecated use `ErrorResponse$Outbound` instead. */
|
|
151
|
-
type Outbound = ErrorResponse$Outbound;
|
|
152
|
-
}
|
|
153
|
-
export declare function errorResponseToJSON(errorResponse: ErrorResponse): string;
|
|
154
|
-
export declare function errorResponseFromJSON(jsonString: string): SafeParseResult<ErrorResponse, SDKValidationError>;
|
package/models/errorresponse.js
DELETED
|
@@ -1,166 +0,0 @@
|
|
|
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
|
-
import { catchUnrecognizedEnum, } from "../types/enums.js";
|
|
8
|
-
export const ErrorResponseCode = {
|
|
9
|
-
OneHundred: 100,
|
|
10
|
-
OneHundredAndOne: 101,
|
|
11
|
-
OneHundredAndTwo: 102,
|
|
12
|
-
TwoHundred: 200,
|
|
13
|
-
TwoHundredAndOne: 201,
|
|
14
|
-
TwoHundredAndTwo: 202,
|
|
15
|
-
TwoHundredAndThree: 203,
|
|
16
|
-
TwoHundredAndFour: 204,
|
|
17
|
-
TwoHundredAndFive: 205,
|
|
18
|
-
TwoHundredAndSix: 206,
|
|
19
|
-
TwoHundredAndSeven: 207,
|
|
20
|
-
TwoHundredAndEight: 208,
|
|
21
|
-
ThreeHundred: 300,
|
|
22
|
-
ThreeHundredAndOne: 301,
|
|
23
|
-
ThreeHundredAndTwo: 302,
|
|
24
|
-
ThreeHundredAndThree: 303,
|
|
25
|
-
ThreeHundredAndFour: 304,
|
|
26
|
-
ThreeHundredAndFive: 305,
|
|
27
|
-
ThreeHundredAndSeven: 307,
|
|
28
|
-
ThreeHundredAndEight: 308,
|
|
29
|
-
FourHundred: 400,
|
|
30
|
-
FourHundredAndOne: 401,
|
|
31
|
-
FourHundredAndTwo: 402,
|
|
32
|
-
FourHundredAndThree: 403,
|
|
33
|
-
FourHundredAndFour: 404,
|
|
34
|
-
FourHundredAndFive: 405,
|
|
35
|
-
FourHundredAndSix: 406,
|
|
36
|
-
FourHundredAndSeven: 407,
|
|
37
|
-
FourHundredAndEight: 408,
|
|
38
|
-
FourHundredAndNine: 409,
|
|
39
|
-
FourHundredAndTen: 410,
|
|
40
|
-
FourHundredAndEleven: 411,
|
|
41
|
-
FourHundredAndTwelve: 412,
|
|
42
|
-
FourHundredAndThirteen: 413,
|
|
43
|
-
FourHundredAndFourteen: 414,
|
|
44
|
-
FourHundredAndFifteen: 415,
|
|
45
|
-
FourHundredAndSixteen: 416,
|
|
46
|
-
FourHundredAndSeventeen: 417,
|
|
47
|
-
FourHundredAndEighteen: 418,
|
|
48
|
-
FourHundredAndTwentyTwo: 422,
|
|
49
|
-
FourHundredAndTwentyThree: 423,
|
|
50
|
-
FourHundredAndTwentyFour: 424,
|
|
51
|
-
FourHundredAndTwentyFive: 425,
|
|
52
|
-
FourHundredAndTwentySix: 426,
|
|
53
|
-
FourHundredAndTwentyEight: 428,
|
|
54
|
-
FourHundredAndTwentyNine: 429,
|
|
55
|
-
FourHundredAndThirtyOne: 431,
|
|
56
|
-
FourHundredAndFiftyOne: 451,
|
|
57
|
-
FourHundredAndNinetyEight: 498,
|
|
58
|
-
FourHundredAndNinetyNine: 499,
|
|
59
|
-
FiveHundred: 500,
|
|
60
|
-
FiveHundredAndOne: 501,
|
|
61
|
-
FiveHundredAndTwo: 502,
|
|
62
|
-
FiveHundredAndThree: 503,
|
|
63
|
-
FiveHundredAndFour: 504,
|
|
64
|
-
FiveHundredAndFive: 505,
|
|
65
|
-
FiveHundredAndSix: 506,
|
|
66
|
-
FiveHundredAndSeven: 507,
|
|
67
|
-
FiveHundredAndEight: 508,
|
|
68
|
-
FiveHundredAndTen: 510,
|
|
69
|
-
FiveHundredAndEleven: 511,
|
|
70
|
-
FiveHundredAndTwenty: 520,
|
|
71
|
-
FiveHundredAndTwentyOne: 521,
|
|
72
|
-
FiveHundredAndTwentyTwo: 522,
|
|
73
|
-
FiveHundredAndTwentyThree: 523,
|
|
74
|
-
FiveHundredAndTwentyFour: 524,
|
|
75
|
-
FiveHundredAndTwentyFive: 525,
|
|
76
|
-
FiveHundredAndTwentySix: 526,
|
|
77
|
-
FiveHundredAndTwentyNine: 529,
|
|
78
|
-
FiveHundredAndThirty: 530,
|
|
79
|
-
};
|
|
80
|
-
/** @internal */
|
|
81
|
-
export const ErrorResponseCode$inboundSchema = z
|
|
82
|
-
.union([
|
|
83
|
-
z.enum(ErrorResponseCode),
|
|
84
|
-
z.number().transform(catchUnrecognizedEnum),
|
|
85
|
-
]);
|
|
86
|
-
/** @internal */
|
|
87
|
-
export const ErrorResponseCode$outboundSchema = z.union([
|
|
88
|
-
z.enum(ErrorResponseCode),
|
|
89
|
-
z.number().and(z.custom()),
|
|
90
|
-
]);
|
|
91
|
-
/**
|
|
92
|
-
* @internal
|
|
93
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
94
|
-
*/
|
|
95
|
-
export var ErrorResponseCode$;
|
|
96
|
-
(function (ErrorResponseCode$) {
|
|
97
|
-
/** @deprecated use `ErrorResponseCode$inboundSchema` instead. */
|
|
98
|
-
ErrorResponseCode$.inboundSchema = ErrorResponseCode$inboundSchema;
|
|
99
|
-
/** @deprecated use `ErrorResponseCode$outboundSchema` instead. */
|
|
100
|
-
ErrorResponseCode$.outboundSchema = ErrorResponseCode$outboundSchema;
|
|
101
|
-
})(ErrorResponseCode$ || (ErrorResponseCode$ = {}));
|
|
102
|
-
/** @internal */
|
|
103
|
-
export const ErrorResponseError$inboundSchema = z.object({
|
|
104
|
-
code: ErrorResponseCode$inboundSchema,
|
|
105
|
-
message: z.string(),
|
|
106
|
-
metadata: z.nullable(z.record(z.string(), z.nullable(z.any()))).optional(),
|
|
107
|
-
});
|
|
108
|
-
/** @internal */
|
|
109
|
-
export const ErrorResponseError$outboundSchema = z.object({
|
|
110
|
-
code: ErrorResponseCode$outboundSchema,
|
|
111
|
-
message: z.string(),
|
|
112
|
-
metadata: z.nullable(z.record(z.string(), z.nullable(z.any()))).optional(),
|
|
113
|
-
});
|
|
114
|
-
/**
|
|
115
|
-
* @internal
|
|
116
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
117
|
-
*/
|
|
118
|
-
export var ErrorResponseError$;
|
|
119
|
-
(function (ErrorResponseError$) {
|
|
120
|
-
/** @deprecated use `ErrorResponseError$inboundSchema` instead. */
|
|
121
|
-
ErrorResponseError$.inboundSchema = ErrorResponseError$inboundSchema;
|
|
122
|
-
/** @deprecated use `ErrorResponseError$outboundSchema` instead. */
|
|
123
|
-
ErrorResponseError$.outboundSchema = ErrorResponseError$outboundSchema;
|
|
124
|
-
})(ErrorResponseError$ || (ErrorResponseError$ = {}));
|
|
125
|
-
export function errorResponseErrorToJSON(errorResponseError) {
|
|
126
|
-
return JSON.stringify(ErrorResponseError$outboundSchema.parse(errorResponseError));
|
|
127
|
-
}
|
|
128
|
-
export function errorResponseErrorFromJSON(jsonString) {
|
|
129
|
-
return safeParse(jsonString, (x) => ErrorResponseError$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ErrorResponseError' from JSON`);
|
|
130
|
-
}
|
|
131
|
-
/** @internal */
|
|
132
|
-
export const ErrorResponse$inboundSchema = z
|
|
133
|
-
.object({
|
|
134
|
-
error: z.lazy(() => ErrorResponseError$inboundSchema),
|
|
135
|
-
user_id: z.nullable(z.string()).optional(),
|
|
136
|
-
}).transform((v) => {
|
|
137
|
-
return remap$(v, {
|
|
138
|
-
"user_id": "userId",
|
|
139
|
-
});
|
|
140
|
-
});
|
|
141
|
-
/** @internal */
|
|
142
|
-
export const ErrorResponse$outboundSchema = z.object({
|
|
143
|
-
error: z.lazy(() => ErrorResponseError$outboundSchema),
|
|
144
|
-
userId: z.nullable(z.string()).optional(),
|
|
145
|
-
}).transform((v) => {
|
|
146
|
-
return remap$(v, {
|
|
147
|
-
userId: "user_id",
|
|
148
|
-
});
|
|
149
|
-
});
|
|
150
|
-
/**
|
|
151
|
-
* @internal
|
|
152
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
153
|
-
*/
|
|
154
|
-
export var ErrorResponse$;
|
|
155
|
-
(function (ErrorResponse$) {
|
|
156
|
-
/** @deprecated use `ErrorResponse$inboundSchema` instead. */
|
|
157
|
-
ErrorResponse$.inboundSchema = ErrorResponse$inboundSchema;
|
|
158
|
-
/** @deprecated use `ErrorResponse$outboundSchema` instead. */
|
|
159
|
-
ErrorResponse$.outboundSchema = ErrorResponse$outboundSchema;
|
|
160
|
-
})(ErrorResponse$ || (ErrorResponse$ = {}));
|
|
161
|
-
export function errorResponseToJSON(errorResponse) {
|
|
162
|
-
return JSON.stringify(ErrorResponse$outboundSchema.parse(errorResponse));
|
|
163
|
-
}
|
|
164
|
-
export function errorResponseFromJSON(jsonString) {
|
|
165
|
-
return safeParse(jsonString, (x) => ErrorResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ErrorResponse' from JSON`);
|
|
166
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v4";
|
|
2
|
-
import * as models from "../index.js";
|
|
3
|
-
import { OpenRouterError } from "./openroutererror.js";
|
|
4
|
-
export type ChatErrorData = {
|
|
5
|
-
error: models.ChatErrorError;
|
|
6
|
-
};
|
|
7
|
-
export declare class ChatError extends OpenRouterError {
|
|
8
|
-
error: models.ChatErrorError;
|
|
9
|
-
/** The original data that was passed to this error instance. */
|
|
10
|
-
data$: ChatErrorData;
|
|
11
|
-
constructor(err: ChatErrorData, httpMeta: {
|
|
12
|
-
response: Response;
|
|
13
|
-
request: Request;
|
|
14
|
-
body: string;
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
/** @internal */
|
|
18
|
-
export declare const ChatError$inboundSchema: z.ZodType<ChatError, unknown>;
|
|
19
|
-
/** @internal */
|
|
20
|
-
export type ChatError$Outbound = {
|
|
21
|
-
error: models.ChatErrorError$Outbound;
|
|
22
|
-
};
|
|
23
|
-
/** @internal */
|
|
24
|
-
export declare const ChatError$outboundSchema: z.ZodType<ChatError$Outbound, ChatError>;
|
|
25
|
-
/**
|
|
26
|
-
* @internal
|
|
27
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
28
|
-
*/
|
|
29
|
-
export declare namespace ChatError$ {
|
|
30
|
-
/** @deprecated use `ChatError$inboundSchema` instead. */
|
|
31
|
-
const inboundSchema: z.ZodType<ChatError, unknown, z.core.$ZodTypeInternals<ChatError, unknown>>;
|
|
32
|
-
/** @deprecated use `ChatError$outboundSchema` instead. */
|
|
33
|
-
const outboundSchema: z.ZodType<ChatError$Outbound, ChatError, z.core.$ZodTypeInternals<ChatError$Outbound, ChatError>>;
|
|
34
|
-
/** @deprecated use `ChatError$Outbound` instead. */
|
|
35
|
-
type Outbound = ChatError$Outbound;
|
|
36
|
-
}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
import * as z from "zod/v4";
|
|
5
|
-
import * as models from "../index.js";
|
|
6
|
-
import { OpenRouterError } from "./openroutererror.js";
|
|
7
|
-
export class ChatError extends OpenRouterError {
|
|
8
|
-
constructor(err, httpMeta) {
|
|
9
|
-
const message = err.error?.message
|
|
10
|
-
|| `API error occurred: ${JSON.stringify(err)}`;
|
|
11
|
-
super(message, httpMeta);
|
|
12
|
-
this.data$ = err;
|
|
13
|
-
this.error = err.error;
|
|
14
|
-
this.name = "ChatError";
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
/** @internal */
|
|
18
|
-
export const ChatError$inboundSchema = z.object({
|
|
19
|
-
error: z.lazy(() => models.ChatErrorError$inboundSchema),
|
|
20
|
-
request$: z.custom(x => x instanceof Request),
|
|
21
|
-
response$: z.custom(x => x instanceof Response),
|
|
22
|
-
body$: z.string(),
|
|
23
|
-
})
|
|
24
|
-
.transform((v) => {
|
|
25
|
-
return new ChatError(v, {
|
|
26
|
-
request: v.request$,
|
|
27
|
-
response: v.response$,
|
|
28
|
-
body: v.body$,
|
|
29
|
-
});
|
|
30
|
-
});
|
|
31
|
-
/** @internal */
|
|
32
|
-
export const ChatError$outboundSchema = z.custom(x => x instanceof ChatError)
|
|
33
|
-
.transform(v => v.data$)
|
|
34
|
-
.pipe(z.object({
|
|
35
|
-
error: z.lazy(() => models.ChatErrorError$outboundSchema),
|
|
36
|
-
}));
|
|
37
|
-
/**
|
|
38
|
-
* @internal
|
|
39
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
40
|
-
*/
|
|
41
|
-
export var ChatError$;
|
|
42
|
-
(function (ChatError$) {
|
|
43
|
-
/** @deprecated use `ChatError$inboundSchema` instead. */
|
|
44
|
-
ChatError$.inboundSchema = ChatError$inboundSchema;
|
|
45
|
-
/** @deprecated use `ChatError$outboundSchema` instead. */
|
|
46
|
-
ChatError$.outboundSchema = ChatError$outboundSchema;
|
|
47
|
-
})(ChatError$ || (ChatError$ = {}));
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v4";
|
|
2
|
-
import * as models from "../index.js";
|
|
3
|
-
import { OpenRouterError } from "./openroutererror.js";
|
|
4
|
-
/**
|
|
5
|
-
* Error response
|
|
6
|
-
*/
|
|
7
|
-
export type ErrorResponseData = {
|
|
8
|
-
error: models.ErrorResponseError;
|
|
9
|
-
userId?: string | null | undefined;
|
|
10
|
-
};
|
|
11
|
-
/**
|
|
12
|
-
* Error response
|
|
13
|
-
*/
|
|
14
|
-
export declare class ErrorResponse extends OpenRouterError {
|
|
15
|
-
error: models.ErrorResponseError;
|
|
16
|
-
userId?: string | null | undefined;
|
|
17
|
-
/** The original data that was passed to this error instance. */
|
|
18
|
-
data$: ErrorResponseData;
|
|
19
|
-
constructor(err: ErrorResponseData, httpMeta: {
|
|
20
|
-
response: Response;
|
|
21
|
-
request: Request;
|
|
22
|
-
body: string;
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
/** @internal */
|
|
26
|
-
export declare const ErrorResponse$inboundSchema: z.ZodType<ErrorResponse, unknown>;
|
|
27
|
-
/** @internal */
|
|
28
|
-
export type ErrorResponse$Outbound = {
|
|
29
|
-
error: models.ErrorResponseError$Outbound;
|
|
30
|
-
user_id?: string | null | undefined;
|
|
31
|
-
};
|
|
32
|
-
/** @internal */
|
|
33
|
-
export declare const ErrorResponse$outboundSchema: z.ZodType<ErrorResponse$Outbound, ErrorResponse>;
|
|
34
|
-
/**
|
|
35
|
-
* @internal
|
|
36
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
37
|
-
*/
|
|
38
|
-
export declare namespace ErrorResponse$ {
|
|
39
|
-
/** @deprecated use `ErrorResponse$inboundSchema` instead. */
|
|
40
|
-
const inboundSchema: z.ZodType<ErrorResponse, unknown, z.core.$ZodTypeInternals<ErrorResponse, unknown>>;
|
|
41
|
-
/** @deprecated use `ErrorResponse$outboundSchema` instead. */
|
|
42
|
-
const outboundSchema: z.ZodType<ErrorResponse$Outbound, ErrorResponse, z.core.$ZodTypeInternals<ErrorResponse$Outbound, ErrorResponse>>;
|
|
43
|
-
/** @deprecated use `ErrorResponse$Outbound` instead. */
|
|
44
|
-
type Outbound = ErrorResponse$Outbound;
|
|
45
|
-
}
|
|
@@ -1,63 +0,0 @@
|
|
|
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
|
-
* Error response
|
|
10
|
-
*/
|
|
11
|
-
export class ErrorResponse 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 = "ErrorResponse";
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
/** @internal */
|
|
24
|
-
export const ErrorResponse$inboundSchema = z
|
|
25
|
-
.object({
|
|
26
|
-
error: z.lazy(() => models.ErrorResponseError$inboundSchema),
|
|
27
|
-
user_id: z.nullable(z.string()).optional(),
|
|
28
|
-
request$: z.custom(x => x instanceof Request),
|
|
29
|
-
response$: z.custom(x => x instanceof Response),
|
|
30
|
-
body$: z.string(),
|
|
31
|
-
})
|
|
32
|
-
.transform((v) => {
|
|
33
|
-
const remapped = remap$(v, {
|
|
34
|
-
"user_id": "userId",
|
|
35
|
-
});
|
|
36
|
-
return new ErrorResponse(remapped, {
|
|
37
|
-
request: v.request$,
|
|
38
|
-
response: v.response$,
|
|
39
|
-
body: v.body$,
|
|
40
|
-
});
|
|
41
|
-
});
|
|
42
|
-
/** @internal */
|
|
43
|
-
export const ErrorResponse$outboundSchema = z.custom(x => x instanceof ErrorResponse)
|
|
44
|
-
.transform(v => v.data$)
|
|
45
|
-
.pipe(z.object({
|
|
46
|
-
error: z.lazy(() => models.ErrorResponseError$outboundSchema),
|
|
47
|
-
userId: z.nullable(z.string()).optional(),
|
|
48
|
-
}).transform((v) => {
|
|
49
|
-
return remap$(v, {
|
|
50
|
-
userId: "user_id",
|
|
51
|
-
});
|
|
52
|
-
}));
|
|
53
|
-
/**
|
|
54
|
-
* @internal
|
|
55
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
56
|
-
*/
|
|
57
|
-
export var ErrorResponse$;
|
|
58
|
-
(function (ErrorResponse$) {
|
|
59
|
-
/** @deprecated use `ErrorResponse$inboundSchema` instead. */
|
|
60
|
-
ErrorResponse$.inboundSchema = ErrorResponse$inboundSchema;
|
|
61
|
-
/** @deprecated use `ErrorResponse$outboundSchema` instead. */
|
|
62
|
-
ErrorResponse$.outboundSchema = ErrorResponse$outboundSchema;
|
|
63
|
-
})(ErrorResponse$ || (ErrorResponse$ = {}));
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Base class for all HTTP errors.
|
|
3
|
-
*/
|
|
4
|
-
export declare class HTTPClientError extends Error {
|
|
5
|
-
/** The underlying cause of the error. */
|
|
6
|
-
readonly cause: unknown;
|
|
7
|
-
name: string;
|
|
8
|
-
constructor(message: string, opts?: {
|
|
9
|
-
cause?: unknown;
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* An error to capture unrecognised or unexpected errors when making HTTP calls.
|
|
14
|
-
*/
|
|
15
|
-
export declare class UnexpectedClientError extends HTTPClientError {
|
|
16
|
-
name: string;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* An error that is raised when any inputs used to create a request are invalid.
|
|
20
|
-
*/
|
|
21
|
-
export declare class InvalidRequestError extends HTTPClientError {
|
|
22
|
-
name: string;
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* An error that is raised when a HTTP request was aborted by the client error.
|
|
26
|
-
*/
|
|
27
|
-
export declare class RequestAbortedError extends HTTPClientError {
|
|
28
|
-
readonly name = "RequestAbortedError";
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* An error that is raised when a HTTP request timed out due to an AbortSignal
|
|
32
|
-
* signal timeout.
|
|
33
|
-
*/
|
|
34
|
-
export declare class RequestTimeoutError extends HTTPClientError {
|
|
35
|
-
readonly name = "RequestTimeoutError";
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* An error that is raised when a HTTP client is unable to make a request to
|
|
39
|
-
* a server.
|
|
40
|
-
*/
|
|
41
|
-
export declare class ConnectionError extends HTTPClientError {
|
|
42
|
-
readonly name = "ConnectionError";
|
|
43
|
-
}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
/**
|
|
5
|
-
* Base class for all HTTP errors.
|
|
6
|
-
*/
|
|
7
|
-
export class HTTPClientError extends Error {
|
|
8
|
-
constructor(message, opts) {
|
|
9
|
-
let msg = message;
|
|
10
|
-
if (opts?.cause) {
|
|
11
|
-
msg += `: ${opts.cause}`;
|
|
12
|
-
}
|
|
13
|
-
super(msg, opts);
|
|
14
|
-
this.name = "HTTPClientError";
|
|
15
|
-
// In older runtimes, the cause field would not have been assigned through
|
|
16
|
-
// the super() call.
|
|
17
|
-
if (typeof this.cause === "undefined") {
|
|
18
|
-
this.cause = opts?.cause;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* An error to capture unrecognised or unexpected errors when making HTTP calls.
|
|
24
|
-
*/
|
|
25
|
-
export class UnexpectedClientError extends HTTPClientError {
|
|
26
|
-
constructor() {
|
|
27
|
-
super(...arguments);
|
|
28
|
-
this.name = "UnexpectedClientError";
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* An error that is raised when any inputs used to create a request are invalid.
|
|
33
|
-
*/
|
|
34
|
-
export class InvalidRequestError extends HTTPClientError {
|
|
35
|
-
constructor() {
|
|
36
|
-
super(...arguments);
|
|
37
|
-
this.name = "InvalidRequestError";
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* An error that is raised when a HTTP request was aborted by the client error.
|
|
42
|
-
*/
|
|
43
|
-
export class RequestAbortedError extends HTTPClientError {
|
|
44
|
-
constructor() {
|
|
45
|
-
super(...arguments);
|
|
46
|
-
this.name = "RequestAbortedError";
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* An error that is raised when a HTTP request timed out due to an AbortSignal
|
|
51
|
-
* signal timeout.
|
|
52
|
-
*/
|
|
53
|
-
export class RequestTimeoutError extends HTTPClientError {
|
|
54
|
-
constructor() {
|
|
55
|
-
super(...arguments);
|
|
56
|
-
this.name = "RequestTimeoutError";
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
/**
|
|
60
|
-
* An error that is raised when a HTTP client is unable to make a request to
|
|
61
|
-
* a server.
|
|
62
|
-
*/
|
|
63
|
-
export class ConnectionError extends HTTPClientError {
|
|
64
|
-
constructor() {
|
|
65
|
-
super(...arguments);
|
|
66
|
-
this.name = "ConnectionError";
|
|
67
|
-
}
|
|
68
|
-
}
|
package/models/errors/index.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export * from "./chaterror.js";
|
|
2
|
-
export * from "./errorresponse.js";
|
|
3
|
-
export * from "./httpclienterrors.js";
|
|
4
|
-
export * from "./listproviders.js";
|
|
5
|
-
export * from "./openrouterdefaulterror.js";
|
|
6
|
-
export * from "./openroutererror.js";
|
|
7
|
-
export * from "./responsevalidationerror.js";
|
|
8
|
-
export * from "./sdkvalidationerror.js";
|
package/models/errors/index.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
export * from "./chaterror.js";
|
|
5
|
-
export * from "./errorresponse.js";
|
|
6
|
-
export * from "./httpclienterrors.js";
|
|
7
|
-
export * from "./listproviders.js";
|
|
8
|
-
export * from "./openrouterdefaulterror.js";
|
|
9
|
-
export * from "./openroutererror.js";
|
|
10
|
-
export * from "./responsevalidationerror.js";
|
|
11
|
-
export * from "./sdkvalidationerror.js";
|