@openrouter/sdk 0.0.0-beta.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/.devcontainer/README.md +30 -0
- package/.devcontainer/devcontainer.json +45 -0
- package/FUNCTIONS.md +89 -0
- package/REACT_QUERY.md +302 -0
- package/README.md +502 -0
- package/RUNTIMES.md +48 -0
- package/dist/commonjs/core.d.ts +10 -0
- package/dist/commonjs/core.d.ts.map +1 -0
- package/dist/commonjs/core.js +17 -0
- package/dist/commonjs/core.js.map +1 -0
- package/dist/commonjs/funcs/analyticsGetActivity.d.ts +17 -0
- package/dist/commonjs/funcs/analyticsGetActivity.d.ts.map +1 -0
- package/dist/commonjs/funcs/analyticsGetActivity.js +116 -0
- package/dist/commonjs/funcs/analyticsGetActivity.js.map +1 -0
- package/dist/commonjs/funcs/apiKeysDeleteKeysHash.d.ts +14 -0
- package/dist/commonjs/funcs/apiKeysDeleteKeysHash.d.ts.map +1 -0
- package/dist/commonjs/funcs/apiKeysDeleteKeysHash.js +115 -0
- package/dist/commonjs/funcs/apiKeysDeleteKeysHash.js.map +1 -0
- package/dist/commonjs/funcs/apiKeysGetAuthKey.d.ts +17 -0
- package/dist/commonjs/funcs/apiKeysGetAuthKey.d.ts.map +1 -0
- package/dist/commonjs/funcs/apiKeysGetAuthKey.js +103 -0
- package/dist/commonjs/funcs/apiKeysGetAuthKey.js.map +1 -0
- package/dist/commonjs/funcs/apiKeysGetKey.d.ts +17 -0
- package/dist/commonjs/funcs/apiKeysGetKey.d.ts.map +1 -0
- package/dist/commonjs/funcs/apiKeysGetKey.js +103 -0
- package/dist/commonjs/funcs/apiKeysGetKey.js.map +1 -0
- package/dist/commonjs/funcs/apiKeysGetKeys.d.ts +14 -0
- package/dist/commonjs/funcs/apiKeysGetKeys.d.ts.map +1 -0
- package/dist/commonjs/funcs/apiKeysGetKeys.js +114 -0
- package/dist/commonjs/funcs/apiKeysGetKeys.js.map +1 -0
- package/dist/commonjs/funcs/apiKeysGetKeysHash.d.ts +14 -0
- package/dist/commonjs/funcs/apiKeysGetKeysHash.d.ts.map +1 -0
- package/dist/commonjs/funcs/apiKeysGetKeysHash.js +115 -0
- package/dist/commonjs/funcs/apiKeysGetKeysHash.js.map +1 -0
- package/dist/commonjs/funcs/apiKeysPatchKeysHash.d.ts +14 -0
- package/dist/commonjs/funcs/apiKeysPatchKeysHash.d.ts.map +1 -0
- package/dist/commonjs/funcs/apiKeysPatchKeysHash.js +116 -0
- package/dist/commonjs/funcs/apiKeysPatchKeysHash.js.map +1 -0
- package/dist/commonjs/funcs/apiKeysPostKeys.d.ts +14 -0
- package/dist/commonjs/funcs/apiKeysPostKeys.d.ts.map +1 -0
- package/dist/commonjs/funcs/apiKeysPostKeys.js +112 -0
- package/dist/commonjs/funcs/apiKeysPostKeys.js.map +1 -0
- package/dist/commonjs/funcs/chatSend.d.ts +25 -0
- package/dist/commonjs/funcs/chatSend.d.ts.map +1 -0
- package/dist/commonjs/funcs/chatSend.js +127 -0
- package/dist/commonjs/funcs/chatSend.js.map +1 -0
- package/dist/commonjs/funcs/embeddingsPostEmbeddings.d.ts +17 -0
- package/dist/commonjs/funcs/embeddingsPostEmbeddings.d.ts.map +1 -0
- package/dist/commonjs/funcs/embeddingsPostEmbeddings.js +115 -0
- package/dist/commonjs/funcs/embeddingsPostEmbeddings.js.map +1 -0
- package/dist/commonjs/funcs/endpointsGetEndpointsZdr.d.ts +14 -0
- package/dist/commonjs/funcs/endpointsGetEndpointsZdr.d.ts.map +1 -0
- package/dist/commonjs/funcs/endpointsGetEndpointsZdr.js +100 -0
- package/dist/commonjs/funcs/endpointsGetEndpointsZdr.js.map +1 -0
- package/dist/commonjs/funcs/endpointsGetModelsAuthorSlugEndpoints.d.ts +14 -0
- package/dist/commonjs/funcs/endpointsGetModelsAuthorSlugEndpoints.d.ts.map +1 -0
- package/dist/commonjs/funcs/endpointsGetModelsAuthorSlugEndpoints.js +120 -0
- package/dist/commonjs/funcs/endpointsGetModelsAuthorSlugEndpoints.js.map +1 -0
- package/dist/commonjs/funcs/generationsGetGeneration.d.ts +14 -0
- package/dist/commonjs/funcs/generationsGetGeneration.d.ts.map +1 -0
- package/dist/commonjs/funcs/generationsGetGeneration.js +113 -0
- package/dist/commonjs/funcs/generationsGetGeneration.js.map +1 -0
- package/dist/commonjs/funcs/getCredits.d.ts +14 -0
- package/dist/commonjs/funcs/getCredits.d.ts.map +1 -0
- package/dist/commonjs/funcs/getCredits.js +100 -0
- package/dist/commonjs/funcs/getCredits.js.map +1 -0
- package/dist/commonjs/funcs/getProviders.d.ts +12 -0
- package/dist/commonjs/funcs/getProviders.d.ts.map +1 -0
- package/dist/commonjs/funcs/getProviders.js +101 -0
- package/dist/commonjs/funcs/getProviders.js.map +1 -0
- package/dist/commonjs/funcs/modelsGetModels.d.ts +20 -0
- package/dist/commonjs/funcs/modelsGetModels.d.ts.map +1 -0
- package/dist/commonjs/funcs/modelsGetModels.js +125 -0
- package/dist/commonjs/funcs/modelsGetModels.js.map +1 -0
- package/dist/commonjs/funcs/modelsGetModelsCount.d.ts +14 -0
- package/dist/commonjs/funcs/modelsGetModelsCount.d.ts.map +1 -0
- package/dist/commonjs/funcs/modelsGetModelsCount.js +100 -0
- package/dist/commonjs/funcs/modelsGetModelsCount.js.map +1 -0
- package/dist/commonjs/funcs/modelsGetModelsUser.d.ts +14 -0
- package/dist/commonjs/funcs/modelsGetModelsUser.d.ts.map +1 -0
- package/dist/commonjs/funcs/modelsGetModelsUser.js +100 -0
- package/dist/commonjs/funcs/modelsGetModelsUser.js.map +1 -0
- package/dist/commonjs/funcs/parametersGetParametersAuthorSlug.d.ts +14 -0
- package/dist/commonjs/funcs/parametersGetParametersAuthorSlug.d.ts.map +1 -0
- package/dist/commonjs/funcs/parametersGetParametersAuthorSlug.js +123 -0
- package/dist/commonjs/funcs/parametersGetParametersAuthorSlug.js.map +1 -0
- package/dist/commonjs/funcs/postCreditsCoinbase.d.ts +14 -0
- package/dist/commonjs/funcs/postCreditsCoinbase.d.ts.map +1 -0
- package/dist/commonjs/funcs/postCreditsCoinbase.js +112 -0
- package/dist/commonjs/funcs/postCreditsCoinbase.js.map +1 -0
- package/dist/commonjs/hooks/hooks.d.ts +25 -0
- package/dist/commonjs/hooks/hooks.d.ts.map +1 -0
- package/dist/commonjs/hooks/hooks.js +86 -0
- package/dist/commonjs/hooks/hooks.js.map +1 -0
- package/dist/commonjs/hooks/index.d.ts +3 -0
- package/dist/commonjs/hooks/index.d.ts.map +1 -0
- package/dist/commonjs/hooks/index.js +22 -0
- package/dist/commonjs/hooks/index.js.map +1 -0
- package/dist/commonjs/hooks/registration.d.ts +3 -0
- package/dist/commonjs/hooks/registration.d.ts.map +1 -0
- package/dist/commonjs/hooks/registration.js +15 -0
- package/dist/commonjs/hooks/registration.js.map +1 -0
- package/dist/commonjs/hooks/types.d.ts +76 -0
- package/dist/commonjs/hooks/types.d.ts.map +1 -0
- package/dist/commonjs/hooks/types.js +6 -0
- package/dist/commonjs/hooks/types.js.map +1 -0
- package/dist/commonjs/index.d.ts +6 -0
- package/dist/commonjs/index.d.ts.map +1 -0
- package/dist/commonjs/index.js +48 -0
- package/dist/commonjs/index.js.map +1 -0
- package/dist/commonjs/lib/base64.d.ts +10 -0
- package/dist/commonjs/lib/base64.d.ts.map +1 -0
- package/dist/commonjs/lib/base64.js +71 -0
- package/dist/commonjs/lib/base64.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +48 -0
- package/dist/commonjs/lib/config.d.ts.map +1 -0
- package/dist/commonjs/lib/config.js +36 -0
- package/dist/commonjs/lib/config.js.map +1 -0
- package/dist/commonjs/lib/dlv.d.ts +14 -0
- package/dist/commonjs/lib/dlv.d.ts.map +1 -0
- package/dist/commonjs/lib/dlv.js +49 -0
- package/dist/commonjs/lib/dlv.js.map +1 -0
- package/dist/commonjs/lib/encodings.d.ts +52 -0
- package/dist/commonjs/lib/encodings.d.ts.map +1 -0
- package/dist/commonjs/lib/encodings.js +368 -0
- package/dist/commonjs/lib/encodings.js.map +1 -0
- package/dist/commonjs/lib/env.d.ts +16 -0
- package/dist/commonjs/lib/env.d.ts.map +1 -0
- package/dist/commonjs/lib/env.js +66 -0
- package/dist/commonjs/lib/env.js.map +1 -0
- package/dist/commonjs/lib/event-streams.d.ts +11 -0
- package/dist/commonjs/lib/event-streams.d.ts.map +1 -0
- package/dist/commonjs/lib/event-streams.js +129 -0
- package/dist/commonjs/lib/event-streams.js.map +1 -0
- package/dist/commonjs/lib/files.d.ts +13 -0
- package/dist/commonjs/lib/files.d.ts.map +1 -0
- package/dist/commonjs/lib/files.js +77 -0
- package/dist/commonjs/lib/files.js.map +1 -0
- package/dist/commonjs/lib/http.d.ts +67 -0
- package/dist/commonjs/lib/http.d.ts.map +1 -0
- package/dist/commonjs/lib/http.js +217 -0
- package/dist/commonjs/lib/http.js.map +1 -0
- package/dist/commonjs/lib/is-plain-object.d.ts +2 -0
- package/dist/commonjs/lib/is-plain-object.d.ts.map +1 -0
- package/dist/commonjs/lib/is-plain-object.js +41 -0
- package/dist/commonjs/lib/is-plain-object.js.map +1 -0
- package/dist/commonjs/lib/logger.d.ts +6 -0
- package/dist/commonjs/lib/logger.d.ts.map +1 -0
- package/dist/commonjs/lib/logger.js +6 -0
- package/dist/commonjs/lib/logger.js.map +1 -0
- package/dist/commonjs/lib/matchers.d.ts +59 -0
- package/dist/commonjs/lib/matchers.d.ts.map +1 -0
- package/dist/commonjs/lib/matchers.js +222 -0
- package/dist/commonjs/lib/matchers.js.map +1 -0
- package/dist/commonjs/lib/primitives.d.ts +26 -0
- package/dist/commonjs/lib/primitives.d.ts.map +1 -0
- package/dist/commonjs/lib/primitives.js +111 -0
- package/dist/commonjs/lib/primitives.js.map +1 -0
- package/dist/commonjs/lib/retries.d.ts +38 -0
- package/dist/commonjs/lib/retries.d.ts.map +1 -0
- package/dist/commonjs/lib/retries.js +153 -0
- package/dist/commonjs/lib/retries.js.map +1 -0
- package/dist/commonjs/lib/schemas.d.ts +19 -0
- package/dist/commonjs/lib/schemas.d.ts.map +1 -0
- package/dist/commonjs/lib/schemas.js +62 -0
- package/dist/commonjs/lib/schemas.js.map +1 -0
- package/dist/commonjs/lib/sdks.d.ts +63 -0
- package/dist/commonjs/lib/sdks.d.ts.map +1 -0
- package/dist/commonjs/lib/sdks.js +273 -0
- package/dist/commonjs/lib/sdks.js.map +1 -0
- package/dist/commonjs/lib/security.d.ts +83 -0
- package/dist/commonjs/lib/security.d.ts.map +1 -0
- package/dist/commonjs/lib/security.js +150 -0
- package/dist/commonjs/lib/security.js.map +1 -0
- package/dist/commonjs/lib/url.d.ts +5 -0
- package/dist/commonjs/lib/url.d.ts.map +1 -0
- package/dist/commonjs/lib/url.js +25 -0
- package/dist/commonjs/lib/url.js.map +1 -0
- package/dist/commonjs/models/activityitem.d.ts +82 -0
- package/dist/commonjs/models/activityitem.d.ts.map +1 -0
- package/dist/commonjs/models/activityitem.js +110 -0
- package/dist/commonjs/models/activityitem.js.map +1 -0
- package/dist/commonjs/models/assistantmessage.d.ts +62 -0
- package/dist/commonjs/models/assistantmessage.d.ts.map +1 -0
- package/dist/commonjs/models/assistantmessage.js +113 -0
- package/dist/commonjs/models/assistantmessage.js.map +1 -0
- package/dist/commonjs/models/chaterror.d.ts +35 -0
- package/dist/commonjs/models/chaterror.d.ts.map +1 -0
- package/dist/commonjs/models/chaterror.js +75 -0
- package/dist/commonjs/models/chaterror.js.map +1 -0
- package/dist/commonjs/models/chatgenerationparams.d.ts +403 -0
- package/dist/commonjs/models/chatgenerationparams.d.ts.map +1 -0
- package/dist/commonjs/models/chatgenerationparams.js +492 -0
- package/dist/commonjs/models/chatgenerationparams.js.map +1 -0
- package/dist/commonjs/models/chatgenerationtokenusage.d.ts +95 -0
- package/dist/commonjs/models/chatgenerationtokenusage.d.ts.map +1 -0
- package/dist/commonjs/models/chatgenerationtokenusage.js +184 -0
- package/dist/commonjs/models/chatgenerationtokenusage.js.map +1 -0
- package/dist/commonjs/models/chatmessagecontentitem.d.ts +40 -0
- package/dist/commonjs/models/chatmessagecontentitem.d.ts.map +1 -0
- package/dist/commonjs/models/chatmessagecontentitem.js +84 -0
- package/dist/commonjs/models/chatmessagecontentitem.js.map +1 -0
- package/dist/commonjs/models/chatmessagecontentitemaudio.d.ts +99 -0
- package/dist/commonjs/models/chatmessagecontentitemaudio.d.ts.map +1 -0
- package/dist/commonjs/models/chatmessagecontentitemaudio.js +134 -0
- package/dist/commonjs/models/chatmessagecontentitemaudio.js.map +1 -0
- package/dist/commonjs/models/chatmessagecontentitemimage.d.ts +87 -0
- package/dist/commonjs/models/chatmessagecontentitemimage.d.ts.map +1 -0
- package/dist/commonjs/models/chatmessagecontentitemimage.js +130 -0
- package/dist/commonjs/models/chatmessagecontentitemimage.js.map +1 -0
- package/dist/commonjs/models/chatmessagecontentitemtext.d.ts +31 -0
- package/dist/commonjs/models/chatmessagecontentitemtext.d.ts.map +1 -0
- package/dist/commonjs/models/chatmessagecontentitemtext.js +71 -0
- package/dist/commonjs/models/chatmessagecontentitemtext.js.map +1 -0
- package/dist/commonjs/models/chatmessagetokenlogprob.d.ts +64 -0
- package/dist/commonjs/models/chatmessagetokenlogprob.d.ts.map +1 -0
- package/dist/commonjs/models/chatmessagetokenlogprob.js +115 -0
- package/dist/commonjs/models/chatmessagetokenlogprob.js.map +1 -0
- package/dist/commonjs/models/chatmessagetokenlogprobs.d.ts +32 -0
- package/dist/commonjs/models/chatmessagetokenlogprobs.d.ts.map +1 -0
- package/dist/commonjs/models/chatmessagetokenlogprobs.js +72 -0
- package/dist/commonjs/models/chatmessagetokenlogprobs.js.map +1 -0
- package/dist/commonjs/models/chatmessagetoolcall.d.ts +60 -0
- package/dist/commonjs/models/chatmessagetoolcall.d.ts.map +1 -0
- package/dist/commonjs/models/chatmessagetoolcall.js +102 -0
- package/dist/commonjs/models/chatmessagetoolcall.js.map +1 -0
- package/dist/commonjs/models/chatresponse.d.ts +43 -0
- package/dist/commonjs/models/chatresponse.d.ts.map +1 -0
- package/dist/commonjs/models/chatresponse.js +92 -0
- package/dist/commonjs/models/chatresponse.js.map +1 -0
- package/dist/commonjs/models/chatresponsechoice.d.ts +72 -0
- package/dist/commonjs/models/chatresponsechoice.d.ts.map +1 -0
- package/dist/commonjs/models/chatresponsechoice.js +108 -0
- package/dist/commonjs/models/chatresponsechoice.js.map +1 -0
- package/dist/commonjs/models/chatstreamingchoice.d.ts +72 -0
- package/dist/commonjs/models/chatstreamingchoice.d.ts.map +1 -0
- package/dist/commonjs/models/chatstreamingchoice.js +108 -0
- package/dist/commonjs/models/chatstreamingchoice.js.map +1 -0
- package/dist/commonjs/models/chatstreamingmessagechunk.d.ts +61 -0
- package/dist/commonjs/models/chatstreamingmessagechunk.d.ts.map +1 -0
- package/dist/commonjs/models/chatstreamingmessagechunk.js +105 -0
- package/dist/commonjs/models/chatstreamingmessagechunk.js.map +1 -0
- package/dist/commonjs/models/chatstreamingmessagetoolcall.d.ts +62 -0
- package/dist/commonjs/models/chatstreamingmessagetoolcall.d.ts.map +1 -0
- package/dist/commonjs/models/chatstreamingmessagetoolcall.js +106 -0
- package/dist/commonjs/models/chatstreamingmessagetoolcall.js.map +1 -0
- package/dist/commonjs/models/chatstreamingresponsechunk.d.ts +97 -0
- package/dist/commonjs/models/chatstreamingresponsechunk.d.ts.map +1 -0
- package/dist/commonjs/models/chatstreamingresponsechunk.js +164 -0
- package/dist/commonjs/models/chatstreamingresponsechunk.js.map +1 -0
- package/dist/commonjs/models/chatstreamoptions.d.ts +29 -0
- package/dist/commonjs/models/chatstreamoptions.d.ts.map +1 -0
- package/dist/commonjs/models/chatstreamoptions.js +78 -0
- package/dist/commonjs/models/chatstreamoptions.js.map +1 -0
- package/dist/commonjs/models/errorresponse.d.ts +297 -0
- package/dist/commonjs/models/errorresponse.d.ts.map +1 -0
- package/dist/commonjs/models/errorresponse.js +198 -0
- package/dist/commonjs/models/errorresponse.js.map +1 -0
- package/dist/commonjs/models/errors/chaterror.d.ts +37 -0
- package/dist/commonjs/models/errors/chaterror.d.ts.map +1 -0
- package/dist/commonjs/models/errors/chaterror.js +85 -0
- package/dist/commonjs/models/errors/chaterror.js.map +1 -0
- package/dist/commonjs/models/errors/getproviders.d.ts +49 -0
- package/dist/commonjs/models/errors/getproviders.d.ts.map +1 -0
- package/dist/commonjs/models/errors/getproviders.js +88 -0
- package/dist/commonjs/models/errors/getproviders.js.map +1 -0
- package/dist/commonjs/models/errors/httpclienterrors.d.ts +44 -0
- package/dist/commonjs/models/errors/httpclienterrors.d.ts.map +1 -0
- package/dist/commonjs/models/errors/httpclienterrors.js +78 -0
- package/dist/commonjs/models/errors/httpclienterrors.js.map +1 -0
- package/dist/commonjs/models/errors/index.d.ts +8 -0
- package/dist/commonjs/models/errors/index.d.ts.map +1 -0
- package/dist/commonjs/models/errors/index.js +27 -0
- package/dist/commonjs/models/errors/index.js.map +1 -0
- package/dist/commonjs/models/errors/openrouterdefaulterror.d.ts +10 -0
- package/dist/commonjs/models/errors/openrouterdefaulterror.d.ts.map +1 -0
- package/dist/commonjs/models/errors/openrouterdefaulterror.js +34 -0
- package/dist/commonjs/models/errors/openrouterdefaulterror.js.map +1 -0
- package/dist/commonjs/models/errors/openroutererror.d.ts +19 -0
- package/dist/commonjs/models/errors/openroutererror.d.ts.map +1 -0
- package/dist/commonjs/models/errors/openroutererror.js +20 -0
- package/dist/commonjs/models/errors/openroutererror.js.map +1 -0
- package/dist/commonjs/models/errors/responsevalidationerror.d.ts +26 -0
- package/dist/commonjs/models/errors/responsevalidationerror.d.ts.map +1 -0
- package/dist/commonjs/models/errors/responsevalidationerror.js +66 -0
- package/dist/commonjs/models/errors/responsevalidationerror.js.map +1 -0
- package/dist/commonjs/models/errors/sdkvalidationerror.d.ts +21 -0
- package/dist/commonjs/models/errors/sdkvalidationerror.d.ts.map +1 -0
- package/dist/commonjs/models/errors/sdkvalidationerror.js +129 -0
- package/dist/commonjs/models/errors/sdkvalidationerror.js.map +1 -0
- package/dist/commonjs/models/index.d.ts +28 -0
- package/dist/commonjs/models/index.d.ts.map +1 -0
- package/dist/commonjs/models/index.js +47 -0
- package/dist/commonjs/models/index.js.map +1 -0
- package/dist/commonjs/models/message.d.ts +80 -0
- package/dist/commonjs/models/message.d.ts.map +1 -0
- package/dist/commonjs/models/message.js +142 -0
- package/dist/commonjs/models/message.js.map +1 -0
- package/dist/commonjs/models/namedtoolchoice.d.ts +56 -0
- package/dist/commonjs/models/namedtoolchoice.d.ts.map +1 -0
- package/dist/commonjs/models/namedtoolchoice.js +98 -0
- package/dist/commonjs/models/namedtoolchoice.js.map +1 -0
- package/dist/commonjs/models/operations/deletekeyshash.d.ts +82 -0
- package/dist/commonjs/models/operations/deletekeyshash.d.ts.map +1 -0
- package/dist/commonjs/models/operations/deletekeyshash.js +126 -0
- package/dist/commonjs/models/operations/deletekeyshash.js.map +1 -0
- package/dist/commonjs/models/operations/getactivity.d.ts +82 -0
- package/dist/commonjs/models/operations/getactivity.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getactivity.js +126 -0
- package/dist/commonjs/models/operations/getactivity.js.map +1 -0
- package/dist/commonjs/models/operations/getauthkey.d.ts +163 -0
- package/dist/commonjs/models/operations/getauthkey.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getauthkey.js +184 -0
- package/dist/commonjs/models/operations/getauthkey.js.map +1 -0
- package/dist/commonjs/models/operations/getcredits.d.ts +81 -0
- package/dist/commonjs/models/operations/getcredits.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getcredits.js +139 -0
- package/dist/commonjs/models/operations/getcredits.js.map +1 -0
- package/dist/commonjs/models/operations/getendpointszdr.d.ts +815 -0
- package/dist/commonjs/models/operations/getendpointszdr.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getendpointszdr.js +681 -0
- package/dist/commonjs/models/operations/getendpointszdr.js.map +1 -0
- package/dist/commonjs/models/operations/getgeneration.d.ts +295 -0
- package/dist/commonjs/models/operations/getgeneration.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getgeneration.js +291 -0
- package/dist/commonjs/models/operations/getgeneration.js.map +1 -0
- package/dist/commonjs/models/operations/getkey.d.ts +163 -0
- package/dist/commonjs/models/operations/getkey.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getkey.js +184 -0
- package/dist/commonjs/models/operations/getkey.js.map +1 -0
- package/dist/commonjs/models/operations/getkeys.d.ts +147 -0
- package/dist/commonjs/models/operations/getkeys.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getkeys.js +188 -0
- package/dist/commonjs/models/operations/getkeys.js.map +1 -0
- package/dist/commonjs/models/operations/getkeyshash.d.ts +148 -0
- package/dist/commonjs/models/operations/getkeyshash.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getkeyshash.js +178 -0
- package/dist/commonjs/models/operations/getkeyshash.js.map +1 -0
- package/dist/commonjs/models/operations/getmodels.d.ts +901 -0
- package/dist/commonjs/models/operations/getmodels.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getmodels.js +826 -0
- package/dist/commonjs/models/operations/getmodels.js.map +1 -0
- package/dist/commonjs/models/operations/getmodelsauthorslugendpoints.d.ts +1178 -0
- package/dist/commonjs/models/operations/getmodelsauthorslugendpoints.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getmodelsauthorslugendpoints.js +922 -0
- package/dist/commonjs/models/operations/getmodelsauthorslugendpoints.js.map +1 -0
- package/dist/commonjs/models/operations/getmodelscount.d.ts +88 -0
- package/dist/commonjs/models/operations/getmodelscount.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getmodelscount.js +126 -0
- package/dist/commonjs/models/operations/getmodelscount.js.map +1 -0
- package/dist/commonjs/models/operations/getmodelsuser.d.ts +870 -0
- package/dist/commonjs/models/operations/getmodelsuser.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getmodelsuser.js +779 -0
- package/dist/commonjs/models/operations/getmodelsuser.js.map +1 -0
- package/dist/commonjs/models/operations/getparametersauthorslug.d.ts +419 -0
- package/dist/commonjs/models/operations/getparametersauthorslug.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getparametersauthorslug.js +289 -0
- package/dist/commonjs/models/operations/getparametersauthorslug.js.map +1 -0
- package/dist/commonjs/models/operations/getproviders.d.ts +116 -0
- package/dist/commonjs/models/operations/getproviders.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getproviders.js +147 -0
- package/dist/commonjs/models/operations/getproviders.js.map +1 -0
- package/dist/commonjs/models/operations/index.d.ts +21 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -0
- package/dist/commonjs/models/operations/index.js +40 -0
- package/dist/commonjs/models/operations/index.js.map +1 -0
- package/dist/commonjs/models/operations/patchkeyshash.d.ts +193 -0
- package/dist/commonjs/models/operations/patchkeyshash.d.ts.map +1 -0
- package/dist/commonjs/models/operations/patchkeyshash.js +229 -0
- package/dist/commonjs/models/operations/patchkeyshash.js.map +1 -0
- package/dist/commonjs/models/operations/postchatcompletions.d.ts +27 -0
- package/dist/commonjs/models/operations/postchatcompletions.d.ts.map +1 -0
- package/dist/commonjs/models/operations/postchatcompletions.js +80 -0
- package/dist/commonjs/models/operations/postchatcompletions.js.map +1 -0
- package/dist/commonjs/models/operations/postcreditscoinbase.d.ts +267 -0
- package/dist/commonjs/models/operations/postcreditscoinbase.d.ts.map +1 -0
- package/dist/commonjs/models/operations/postcreditscoinbase.js +377 -0
- package/dist/commonjs/models/operations/postcreditscoinbase.js.map +1 -0
- package/dist/commonjs/models/operations/postembeddings.d.ts +1497 -0
- package/dist/commonjs/models/operations/postembeddings.d.ts.map +1 -0
- package/dist/commonjs/models/operations/postembeddings.js +1064 -0
- package/dist/commonjs/models/operations/postembeddings.js.map +1 -0
- package/dist/commonjs/models/operations/postkeys.d.ts +166 -0
- package/dist/commonjs/models/operations/postkeys.d.ts.map +1 -0
- package/dist/commonjs/models/operations/postkeys.js +192 -0
- package/dist/commonjs/models/operations/postkeys.js.map +1 -0
- package/dist/commonjs/models/security.d.ts +31 -0
- package/dist/commonjs/models/security.d.ts.map +1 -0
- package/dist/commonjs/models/security.js +71 -0
- package/dist/commonjs/models/security.js.map +1 -0
- package/dist/commonjs/models/systemmessage.d.ts +55 -0
- package/dist/commonjs/models/systemmessage.d.ts.map +1 -0
- package/dist/commonjs/models/systemmessage.js +103 -0
- package/dist/commonjs/models/systemmessage.js.map +1 -0
- package/dist/commonjs/models/tool.d.ts +66 -0
- package/dist/commonjs/models/tool.d.ts.map +1 -0
- package/dist/commonjs/models/tool.js +105 -0
- package/dist/commonjs/models/tool.js.map +1 -0
- package/dist/commonjs/models/toolresponsemessage.d.ts +55 -0
- package/dist/commonjs/models/toolresponsemessage.d.ts.map +1 -0
- package/dist/commonjs/models/toolresponsemessage.js +109 -0
- package/dist/commonjs/models/toolresponsemessage.js.map +1 -0
- package/dist/commonjs/models/usermessage.d.ts +55 -0
- package/dist/commonjs/models/usermessage.d.ts.map +1 -0
- package/dist/commonjs/models/usermessage.js +100 -0
- package/dist/commonjs/models/usermessage.js.map +1 -0
- package/dist/commonjs/package.json +3 -0
- package/dist/commonjs/react-query/_context.d.ts +8 -0
- package/dist/commonjs/react-query/_context.d.ts.map +1 -0
- package/dist/commonjs/react-query/_context.js +21 -0
- package/dist/commonjs/react-query/_context.js.map +1 -0
- package/dist/commonjs/react-query/_types.d.ts +27 -0
- package/dist/commonjs/react-query/_types.d.ts.map +1 -0
- package/dist/commonjs/react-query/_types.js +6 -0
- package/dist/commonjs/react-query/_types.js.map +1 -0
- package/dist/commonjs/react-query/analyticsGetActivity.d.ts +36 -0
- package/dist/commonjs/react-query/analyticsGetActivity.d.ts.map +1 -0
- package/dist/commonjs/react-query/analyticsGetActivity.js +82 -0
- package/dist/commonjs/react-query/analyticsGetActivity.js.map +1 -0
- package/dist/commonjs/react-query/apiKeysDeleteKeysHash.d.ts +20 -0
- package/dist/commonjs/react-query/apiKeysDeleteKeysHash.d.ts.map +1 -0
- package/dist/commonjs/react-query/apiKeysDeleteKeysHash.js +44 -0
- package/dist/commonjs/react-query/apiKeysDeleteKeysHash.js.map +1 -0
- package/dist/commonjs/react-query/apiKeysGetAuthKey.d.ts +29 -0
- package/dist/commonjs/react-query/apiKeysGetAuthKey.d.ts.map +1 -0
- package/dist/commonjs/react-query/apiKeysGetAuthKey.js +75 -0
- package/dist/commonjs/react-query/apiKeysGetAuthKey.js.map +1 -0
- package/dist/commonjs/react-query/apiKeysGetKey.d.ts +29 -0
- package/dist/commonjs/react-query/apiKeysGetKey.d.ts.map +1 -0
- package/dist/commonjs/react-query/apiKeysGetKey.js +75 -0
- package/dist/commonjs/react-query/apiKeysGetKey.js.map +1 -0
- package/dist/commonjs/react-query/apiKeysGetKeys.d.ts +37 -0
- package/dist/commonjs/react-query/apiKeysGetKeys.d.ts.map +1 -0
- package/dist/commonjs/react-query/apiKeysGetKeys.js +79 -0
- package/dist/commonjs/react-query/apiKeysGetKeys.js.map +1 -0
- package/dist/commonjs/react-query/apiKeysGetKeysHash.d.ts +24 -0
- package/dist/commonjs/react-query/apiKeysGetKeysHash.d.ts.map +1 -0
- package/dist/commonjs/react-query/apiKeysGetKeysHash.js +76 -0
- package/dist/commonjs/react-query/apiKeysGetKeysHash.js.map +1 -0
- package/dist/commonjs/react-query/apiKeysPatchKeysHash.d.ts +20 -0
- package/dist/commonjs/react-query/apiKeysPatchKeysHash.d.ts.map +1 -0
- package/dist/commonjs/react-query/apiKeysPatchKeysHash.js +44 -0
- package/dist/commonjs/react-query/apiKeysPatchKeysHash.js.map +1 -0
- package/dist/commonjs/react-query/apiKeysPostKeys.d.ts +20 -0
- package/dist/commonjs/react-query/apiKeysPostKeys.d.ts.map +1 -0
- package/dist/commonjs/react-query/apiKeysPostKeys.js +44 -0
- package/dist/commonjs/react-query/apiKeysPostKeys.js.map +1 -0
- package/dist/commonjs/react-query/chatSend.d.ts +28 -0
- package/dist/commonjs/react-query/chatSend.d.ts.map +1 -0
- package/dist/commonjs/react-query/chatSend.js +50 -0
- package/dist/commonjs/react-query/chatSend.js.map +1 -0
- package/dist/commonjs/react-query/embeddingsPostEmbeddings.d.ts +23 -0
- package/dist/commonjs/react-query/embeddingsPostEmbeddings.d.ts.map +1 -0
- package/dist/commonjs/react-query/embeddingsPostEmbeddings.js +47 -0
- package/dist/commonjs/react-query/embeddingsPostEmbeddings.js.map +1 -0
- package/dist/commonjs/react-query/endpointsGetEndpointsZdr.d.ts +23 -0
- package/dist/commonjs/react-query/endpointsGetEndpointsZdr.d.ts.map +1 -0
- package/dist/commonjs/react-query/endpointsGetEndpointsZdr.js +69 -0
- package/dist/commonjs/react-query/endpointsGetEndpointsZdr.js.map +1 -0
- package/dist/commonjs/react-query/endpointsGetModelsAuthorSlugEndpoints.d.ts +24 -0
- package/dist/commonjs/react-query/endpointsGetModelsAuthorSlugEndpoints.d.ts.map +1 -0
- package/dist/commonjs/react-query/endpointsGetModelsAuthorSlugEndpoints.js +87 -0
- package/dist/commonjs/react-query/endpointsGetModelsAuthorSlugEndpoints.js.map +1 -0
- package/dist/commonjs/react-query/generationsGetGeneration.d.ts +30 -0
- package/dist/commonjs/react-query/generationsGetGeneration.d.ts.map +1 -0
- package/dist/commonjs/react-query/generationsGetGeneration.js +81 -0
- package/dist/commonjs/react-query/generationsGetGeneration.js.map +1 -0
- package/dist/commonjs/react-query/getCredits.d.ts +23 -0
- package/dist/commonjs/react-query/getCredits.d.ts.map +1 -0
- package/dist/commonjs/react-query/getCredits.js +69 -0
- package/dist/commonjs/react-query/getCredits.js.map +1 -0
- package/dist/commonjs/react-query/getProviders.d.ts +17 -0
- package/dist/commonjs/react-query/getProviders.d.ts.map +1 -0
- package/dist/commonjs/react-query/getProviders.js +63 -0
- package/dist/commonjs/react-query/getProviders.js.map +1 -0
- package/dist/commonjs/react-query/index.d.ts +23 -0
- package/dist/commonjs/react-query/index.d.ts.map +1 -0
- package/dist/commonjs/react-query/index.js +45 -0
- package/dist/commonjs/react-query/index.js.map +1 -0
- package/dist/commonjs/react-query/modelsGetModels.d.ts +47 -0
- package/dist/commonjs/react-query/modelsGetModels.d.ts.map +1 -0
- package/dist/commonjs/react-query/modelsGetModels.js +84 -0
- package/dist/commonjs/react-query/modelsGetModels.js.map +1 -0
- package/dist/commonjs/react-query/modelsGetModelsCount.d.ts +23 -0
- package/dist/commonjs/react-query/modelsGetModelsCount.d.ts.map +1 -0
- package/dist/commonjs/react-query/modelsGetModelsCount.js +69 -0
- package/dist/commonjs/react-query/modelsGetModelsCount.js.map +1 -0
- package/dist/commonjs/react-query/modelsGetModelsUser.d.ts +23 -0
- package/dist/commonjs/react-query/modelsGetModelsUser.d.ts.map +1 -0
- package/dist/commonjs/react-query/modelsGetModelsUser.js +69 -0
- package/dist/commonjs/react-query/modelsGetModelsUser.js.map +1 -0
- package/dist/commonjs/react-query/parametersGetParametersAuthorSlug.d.ts +38 -0
- package/dist/commonjs/react-query/parametersGetParametersAuthorSlug.d.ts.map +1 -0
- package/dist/commonjs/react-query/parametersGetParametersAuthorSlug.js +88 -0
- package/dist/commonjs/react-query/parametersGetParametersAuthorSlug.js.map +1 -0
- package/dist/commonjs/react-query/postCreditsCoinbase.d.ts +20 -0
- package/dist/commonjs/react-query/postCreditsCoinbase.d.ts.map +1 -0
- package/dist/commonjs/react-query/postCreditsCoinbase.js +44 -0
- package/dist/commonjs/react-query/postCreditsCoinbase.js.map +1 -0
- package/dist/commonjs/sdk/analytics.d.ts +12 -0
- package/dist/commonjs/sdk/analytics.d.ts.map +1 -0
- package/dist/commonjs/sdk/analytics.js +22 -0
- package/dist/commonjs/sdk/analytics.js.map +1 -0
- package/dist/commonjs/sdk/apikeys.d.ts +39 -0
- package/dist/commonjs/sdk/apikeys.d.ts.map +1 -0
- package/dist/commonjs/sdk/apikeys.js +67 -0
- package/dist/commonjs/sdk/apikeys.js.map +1 -0
- package/dist/commonjs/sdk/chat.d.ts +17 -0
- package/dist/commonjs/sdk/chat.d.ts.map +1 -0
- package/dist/commonjs/sdk/chat.js +24 -0
- package/dist/commonjs/sdk/chat.js.map +1 -0
- package/dist/commonjs/sdk/embeddings.d.ts +12 -0
- package/dist/commonjs/sdk/embeddings.d.ts.map +1 -0
- package/dist/commonjs/sdk/embeddings.js +22 -0
- package/dist/commonjs/sdk/embeddings.js.map +1 -0
- package/dist/commonjs/sdk/endpoints.d.ts +13 -0
- package/dist/commonjs/sdk/endpoints.d.ts.map +1 -0
- package/dist/commonjs/sdk/endpoints.js +26 -0
- package/dist/commonjs/sdk/endpoints.js.map +1 -0
- package/dist/commonjs/sdk/generations.d.ts +9 -0
- package/dist/commonjs/sdk/generations.d.ts.map +1 -0
- package/dist/commonjs/sdk/generations.js +19 -0
- package/dist/commonjs/sdk/generations.js.map +1 -0
- package/dist/commonjs/sdk/index.d.ts +2 -0
- package/dist/commonjs/sdk/index.d.ts.map +1 -0
- package/dist/commonjs/sdk/index.js +21 -0
- package/dist/commonjs/sdk/index.js.map +1 -0
- package/dist/commonjs/sdk/models.d.ts +21 -0
- package/dist/commonjs/sdk/models.d.ts.map +1 -0
- package/dist/commonjs/sdk/models.js +35 -0
- package/dist/commonjs/sdk/models.js.map +1 -0
- package/dist/commonjs/sdk/parameters.d.ts +9 -0
- package/dist/commonjs/sdk/parameters.d.ts.map +1 -0
- package/dist/commonjs/sdk/parameters.js +19 -0
- package/dist/commonjs/sdk/parameters.js.map +1 -0
- package/dist/commonjs/sdk/sdk.d.ts +38 -0
- package/dist/commonjs/sdk/sdk.d.ts.map +1 -0
- package/dist/commonjs/sdk/sdk.js +62 -0
- package/dist/commonjs/sdk/sdk.js.map +1 -0
- package/dist/commonjs/types/async.d.ts +23 -0
- package/dist/commonjs/types/async.d.ts.map +1 -0
- package/dist/commonjs/types/async.js +44 -0
- package/dist/commonjs/types/async.js.map +1 -0
- package/dist/commonjs/types/blobs.d.ts +4 -0
- package/dist/commonjs/types/blobs.d.ts.map +1 -0
- package/dist/commonjs/types/blobs.js +62 -0
- package/dist/commonjs/types/blobs.js.map +1 -0
- package/dist/commonjs/types/constdatetime.d.ts +3 -0
- package/dist/commonjs/types/constdatetime.d.ts.map +1 -0
- package/dist/commonjs/types/constdatetime.js +46 -0
- package/dist/commonjs/types/constdatetime.js.map +1 -0
- package/dist/commonjs/types/enums.d.ts +12 -0
- package/dist/commonjs/types/enums.d.ts.map +1 -0
- package/dist/commonjs/types/enums.js +10 -0
- package/dist/commonjs/types/enums.js.map +1 -0
- package/dist/commonjs/types/fp.d.ts +31 -0
- package/dist/commonjs/types/fp.d.ts.map +1 -0
- package/dist/commonjs/types/fp.js +37 -0
- package/dist/commonjs/types/fp.js.map +1 -0
- package/dist/commonjs/types/index.d.ts +8 -0
- package/dist/commonjs/types/index.d.ts.map +1 -0
- package/dist/commonjs/types/index.js +16 -0
- package/dist/commonjs/types/index.js.map +1 -0
- package/dist/commonjs/types/operations.d.ts +27 -0
- package/dist/commonjs/types/operations.d.ts.map +1 -0
- package/dist/commonjs/types/operations.js +83 -0
- package/dist/commonjs/types/operations.js.map +1 -0
- package/dist/commonjs/types/rfcdate.d.ts +21 -0
- package/dist/commonjs/types/rfcdate.d.ts.map +1 -0
- package/dist/commonjs/types/rfcdate.js +46 -0
- package/dist/commonjs/types/rfcdate.js.map +1 -0
- package/dist/commonjs/types/streams.d.ts +2 -0
- package/dist/commonjs/types/streams.d.ts.map +1 -0
- package/dist/commonjs/types/streams.js +18 -0
- package/dist/commonjs/types/streams.js.map +1 -0
- package/dist/esm/core.d.ts +10 -0
- package/dist/esm/core.d.ts.map +1 -0
- package/dist/esm/core.js +13 -0
- package/dist/esm/core.js.map +1 -0
- package/dist/esm/funcs/analyticsGetActivity.d.ts +17 -0
- package/dist/esm/funcs/analyticsGetActivity.d.ts.map +1 -0
- package/dist/esm/funcs/analyticsGetActivity.js +80 -0
- package/dist/esm/funcs/analyticsGetActivity.js.map +1 -0
- package/dist/esm/funcs/apiKeysDeleteKeysHash.d.ts +14 -0
- package/dist/esm/funcs/apiKeysDeleteKeysHash.d.ts.map +1 -0
- package/dist/esm/funcs/apiKeysDeleteKeysHash.js +79 -0
- package/dist/esm/funcs/apiKeysDeleteKeysHash.js.map +1 -0
- package/dist/esm/funcs/apiKeysGetAuthKey.d.ts +17 -0
- package/dist/esm/funcs/apiKeysGetAuthKey.d.ts.map +1 -0
- package/dist/esm/funcs/apiKeysGetAuthKey.js +67 -0
- package/dist/esm/funcs/apiKeysGetAuthKey.js.map +1 -0
- package/dist/esm/funcs/apiKeysGetKey.d.ts +17 -0
- package/dist/esm/funcs/apiKeysGetKey.d.ts.map +1 -0
- package/dist/esm/funcs/apiKeysGetKey.js +67 -0
- package/dist/esm/funcs/apiKeysGetKey.js.map +1 -0
- package/dist/esm/funcs/apiKeysGetKeys.d.ts +14 -0
- package/dist/esm/funcs/apiKeysGetKeys.d.ts.map +1 -0
- package/dist/esm/funcs/apiKeysGetKeys.js +78 -0
- package/dist/esm/funcs/apiKeysGetKeys.js.map +1 -0
- package/dist/esm/funcs/apiKeysGetKeysHash.d.ts +14 -0
- package/dist/esm/funcs/apiKeysGetKeysHash.d.ts.map +1 -0
- package/dist/esm/funcs/apiKeysGetKeysHash.js +79 -0
- package/dist/esm/funcs/apiKeysGetKeysHash.js.map +1 -0
- package/dist/esm/funcs/apiKeysPatchKeysHash.d.ts +14 -0
- package/dist/esm/funcs/apiKeysPatchKeysHash.d.ts.map +1 -0
- package/dist/esm/funcs/apiKeysPatchKeysHash.js +80 -0
- package/dist/esm/funcs/apiKeysPatchKeysHash.js.map +1 -0
- package/dist/esm/funcs/apiKeysPostKeys.d.ts +14 -0
- package/dist/esm/funcs/apiKeysPostKeys.d.ts.map +1 -0
- package/dist/esm/funcs/apiKeysPostKeys.js +76 -0
- package/dist/esm/funcs/apiKeysPostKeys.js.map +1 -0
- package/dist/esm/funcs/chatSend.d.ts +25 -0
- package/dist/esm/funcs/chatSend.d.ts.map +1 -0
- package/dist/esm/funcs/chatSend.js +90 -0
- package/dist/esm/funcs/chatSend.js.map +1 -0
- package/dist/esm/funcs/embeddingsPostEmbeddings.d.ts +17 -0
- package/dist/esm/funcs/embeddingsPostEmbeddings.d.ts.map +1 -0
- package/dist/esm/funcs/embeddingsPostEmbeddings.js +79 -0
- package/dist/esm/funcs/embeddingsPostEmbeddings.js.map +1 -0
- package/dist/esm/funcs/endpointsGetEndpointsZdr.d.ts +14 -0
- package/dist/esm/funcs/endpointsGetEndpointsZdr.d.ts.map +1 -0
- package/dist/esm/funcs/endpointsGetEndpointsZdr.js +64 -0
- package/dist/esm/funcs/endpointsGetEndpointsZdr.js.map +1 -0
- package/dist/esm/funcs/endpointsGetModelsAuthorSlugEndpoints.d.ts +14 -0
- package/dist/esm/funcs/endpointsGetModelsAuthorSlugEndpoints.d.ts.map +1 -0
- package/dist/esm/funcs/endpointsGetModelsAuthorSlugEndpoints.js +84 -0
- package/dist/esm/funcs/endpointsGetModelsAuthorSlugEndpoints.js.map +1 -0
- package/dist/esm/funcs/generationsGetGeneration.d.ts +14 -0
- package/dist/esm/funcs/generationsGetGeneration.d.ts.map +1 -0
- package/dist/esm/funcs/generationsGetGeneration.js +77 -0
- package/dist/esm/funcs/generationsGetGeneration.js.map +1 -0
- package/dist/esm/funcs/getCredits.d.ts +14 -0
- package/dist/esm/funcs/getCredits.d.ts.map +1 -0
- package/dist/esm/funcs/getCredits.js +64 -0
- package/dist/esm/funcs/getCredits.js.map +1 -0
- package/dist/esm/funcs/getProviders.d.ts +12 -0
- package/dist/esm/funcs/getProviders.d.ts.map +1 -0
- package/dist/esm/funcs/getProviders.js +65 -0
- package/dist/esm/funcs/getProviders.js.map +1 -0
- package/dist/esm/funcs/modelsGetModels.d.ts +20 -0
- package/dist/esm/funcs/modelsGetModels.d.ts.map +1 -0
- package/dist/esm/funcs/modelsGetModels.js +88 -0
- package/dist/esm/funcs/modelsGetModels.js.map +1 -0
- package/dist/esm/funcs/modelsGetModelsCount.d.ts +14 -0
- package/dist/esm/funcs/modelsGetModelsCount.d.ts.map +1 -0
- package/dist/esm/funcs/modelsGetModelsCount.js +64 -0
- package/dist/esm/funcs/modelsGetModelsCount.js.map +1 -0
- package/dist/esm/funcs/modelsGetModelsUser.d.ts +14 -0
- package/dist/esm/funcs/modelsGetModelsUser.d.ts.map +1 -0
- package/dist/esm/funcs/modelsGetModelsUser.js +64 -0
- package/dist/esm/funcs/modelsGetModelsUser.js.map +1 -0
- package/dist/esm/funcs/parametersGetParametersAuthorSlug.d.ts +14 -0
- package/dist/esm/funcs/parametersGetParametersAuthorSlug.d.ts.map +1 -0
- package/dist/esm/funcs/parametersGetParametersAuthorSlug.js +87 -0
- package/dist/esm/funcs/parametersGetParametersAuthorSlug.js.map +1 -0
- package/dist/esm/funcs/postCreditsCoinbase.d.ts +14 -0
- package/dist/esm/funcs/postCreditsCoinbase.d.ts.map +1 -0
- package/dist/esm/funcs/postCreditsCoinbase.js +76 -0
- package/dist/esm/funcs/postCreditsCoinbase.js.map +1 -0
- package/dist/esm/hooks/hooks.d.ts +25 -0
- package/dist/esm/hooks/hooks.d.ts.map +1 -0
- package/dist/esm/hooks/hooks.js +82 -0
- package/dist/esm/hooks/hooks.js.map +1 -0
- package/dist/esm/hooks/index.d.ts +3 -0
- package/dist/esm/hooks/index.d.ts.map +1 -0
- package/dist/esm/hooks/index.js +6 -0
- package/dist/esm/hooks/index.js.map +1 -0
- package/dist/esm/hooks/registration.d.ts +3 -0
- package/dist/esm/hooks/registration.d.ts.map +1 -0
- package/dist/esm/hooks/registration.js +12 -0
- package/dist/esm/hooks/registration.js.map +1 -0
- package/dist/esm/hooks/types.d.ts +76 -0
- package/dist/esm/hooks/types.d.ts.map +1 -0
- package/dist/esm/hooks/types.js +5 -0
- package/dist/esm/hooks/types.js.map +1 -0
- package/dist/esm/index.d.ts +6 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +8 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/lib/base64.d.ts +10 -0
- package/dist/esm/lib/base64.d.ts.map +1 -0
- package/dist/esm/lib/base64.js +29 -0
- package/dist/esm/lib/base64.js.map +1 -0
- package/dist/esm/lib/config.d.ts +48 -0
- package/dist/esm/lib/config.d.ts.map +1 -0
- package/dist/esm/lib/config.js +32 -0
- package/dist/esm/lib/config.js.map +1 -0
- package/dist/esm/lib/dlv.d.ts +14 -0
- package/dist/esm/lib/dlv.d.ts.map +1 -0
- package/dist/esm/lib/dlv.js +46 -0
- package/dist/esm/lib/dlv.js.map +1 -0
- package/dist/esm/lib/encodings.d.ts +52 -0
- package/dist/esm/lib/encodings.d.ts.map +1 -0
- package/dist/esm/lib/encodings.js +354 -0
- package/dist/esm/lib/encodings.js.map +1 -0
- package/dist/esm/lib/env.d.ts +16 -0
- package/dist/esm/lib/env.d.ts.map +1 -0
- package/dist/esm/lib/env.js +28 -0
- package/dist/esm/lib/env.js.map +1 -0
- package/dist/esm/lib/event-streams.d.ts +11 -0
- package/dist/esm/lib/event-streams.d.ts.map +1 -0
- package/dist/esm/lib/event-streams.js +125 -0
- package/dist/esm/lib/event-streams.js.map +1 -0
- package/dist/esm/lib/files.d.ts +13 -0
- package/dist/esm/lib/files.d.ts.map +1 -0
- package/dist/esm/lib/files.js +73 -0
- package/dist/esm/lib/files.js.map +1 -0
- package/dist/esm/lib/http.d.ts +67 -0
- package/dist/esm/lib/http.d.ts.map +1 -0
- package/dist/esm/lib/http.js +207 -0
- package/dist/esm/lib/http.js.map +1 -0
- package/dist/esm/lib/is-plain-object.d.ts +2 -0
- package/dist/esm/lib/is-plain-object.d.ts.map +1 -0
- package/dist/esm/lib/is-plain-object.js +38 -0
- package/dist/esm/lib/is-plain-object.js.map +1 -0
- package/dist/esm/lib/logger.d.ts +6 -0
- package/dist/esm/lib/logger.d.ts.map +1 -0
- package/dist/esm/lib/logger.js +5 -0
- package/dist/esm/lib/logger.js.map +1 -0
- package/dist/esm/lib/matchers.d.ts +59 -0
- package/dist/esm/lib/matchers.d.ts.map +1 -0
- package/dist/esm/lib/matchers.js +203 -0
- package/dist/esm/lib/matchers.js.map +1 -0
- package/dist/esm/lib/primitives.d.ts +26 -0
- package/dist/esm/lib/primitives.d.ts.map +1 -0
- package/dist/esm/lib/primitives.js +103 -0
- package/dist/esm/lib/primitives.js.map +1 -0
- package/dist/esm/lib/retries.d.ts +38 -0
- package/dist/esm/lib/retries.d.ts.map +1 -0
- package/dist/esm/lib/retries.js +147 -0
- package/dist/esm/lib/retries.js.map +1 -0
- package/dist/esm/lib/schemas.d.ts +19 -0
- package/dist/esm/lib/schemas.d.ts.map +1 -0
- package/dist/esm/lib/schemas.js +57 -0
- package/dist/esm/lib/schemas.js.map +1 -0
- package/dist/esm/lib/sdks.d.ts +63 -0
- package/dist/esm/lib/sdks.d.ts.map +1 -0
- package/dist/esm/lib/sdks.js +269 -0
- package/dist/esm/lib/sdks.js.map +1 -0
- package/dist/esm/lib/security.d.ts +83 -0
- package/dist/esm/lib/security.d.ts.map +1 -0
- package/dist/esm/lib/security.js +143 -0
- package/dist/esm/lib/security.js.map +1 -0
- package/dist/esm/lib/url.d.ts +5 -0
- package/dist/esm/lib/url.d.ts.map +1 -0
- package/dist/esm/lib/url.js +22 -0
- package/dist/esm/lib/url.js.map +1 -0
- package/dist/esm/models/activityitem.d.ts +82 -0
- package/dist/esm/models/activityitem.d.ts.map +1 -0
- package/dist/esm/models/activityitem.js +72 -0
- package/dist/esm/models/activityitem.js.map +1 -0
- package/dist/esm/models/assistantmessage.d.ts +62 -0
- package/dist/esm/models/assistantmessage.d.ts.map +1 -0
- package/dist/esm/models/assistantmessage.js +73 -0
- package/dist/esm/models/assistantmessage.js.map +1 -0
- package/dist/esm/models/chaterror.d.ts +35 -0
- package/dist/esm/models/chaterror.d.ts.map +1 -0
- package/dist/esm/models/chaterror.js +37 -0
- package/dist/esm/models/chaterror.js.map +1 -0
- package/dist/esm/models/chatgenerationparams.d.ts +403 -0
- package/dist/esm/models/chatgenerationparams.d.ts.map +1 -0
- package/dist/esm/models/chatgenerationparams.js +436 -0
- package/dist/esm/models/chatgenerationparams.js.map +1 -0
- package/dist/esm/models/chatgenerationtokenusage.d.ts +95 -0
- package/dist/esm/models/chatgenerationtokenusage.d.ts.map +1 -0
- package/dist/esm/models/chatgenerationtokenusage.js +142 -0
- package/dist/esm/models/chatgenerationtokenusage.js.map +1 -0
- package/dist/esm/models/chatmessagecontentitem.d.ts +40 -0
- package/dist/esm/models/chatmessagecontentitem.d.ts.map +1 -0
- package/dist/esm/models/chatmessagecontentitem.js +46 -0
- package/dist/esm/models/chatmessagecontentitem.js.map +1 -0
- package/dist/esm/models/chatmessagecontentitemaudio.d.ts +99 -0
- package/dist/esm/models/chatmessagecontentitemaudio.d.ts.map +1 -0
- package/dist/esm/models/chatmessagecontentitemaudio.js +94 -0
- package/dist/esm/models/chatmessagecontentitemaudio.js.map +1 -0
- package/dist/esm/models/chatmessagecontentitemimage.d.ts +87 -0
- package/dist/esm/models/chatmessagecontentitemimage.d.ts.map +1 -0
- package/dist/esm/models/chatmessagecontentitemimage.js +90 -0
- package/dist/esm/models/chatmessagecontentitemimage.js.map +1 -0
- package/dist/esm/models/chatmessagecontentitemtext.d.ts +31 -0
- package/dist/esm/models/chatmessagecontentitemtext.d.ts.map +1 -0
- package/dist/esm/models/chatmessagecontentitemtext.js +33 -0
- package/dist/esm/models/chatmessagecontentitemtext.js.map +1 -0
- package/dist/esm/models/chatmessagetokenlogprob.d.ts +64 -0
- package/dist/esm/models/chatmessagetokenlogprob.d.ts.map +1 -0
- package/dist/esm/models/chatmessagetokenlogprob.js +75 -0
- package/dist/esm/models/chatmessagetokenlogprob.js.map +1 -0
- package/dist/esm/models/chatmessagetokenlogprobs.d.ts +32 -0
- package/dist/esm/models/chatmessagetokenlogprobs.d.ts.map +1 -0
- package/dist/esm/models/chatmessagetokenlogprobs.js +34 -0
- package/dist/esm/models/chatmessagetokenlogprobs.js.map +1 -0
- package/dist/esm/models/chatmessagetoolcall.d.ts +60 -0
- package/dist/esm/models/chatmessagetoolcall.d.ts.map +1 -0
- package/dist/esm/models/chatmessagetoolcall.js +62 -0
- package/dist/esm/models/chatmessagetoolcall.js.map +1 -0
- package/dist/esm/models/chatresponse.d.ts +43 -0
- package/dist/esm/models/chatresponse.d.ts.map +1 -0
- package/dist/esm/models/chatresponse.js +54 -0
- package/dist/esm/models/chatresponse.js.map +1 -0
- package/dist/esm/models/chatresponsechoice.d.ts +72 -0
- package/dist/esm/models/chatresponsechoice.d.ts.map +1 -0
- package/dist/esm/models/chatresponsechoice.js +70 -0
- package/dist/esm/models/chatresponsechoice.js.map +1 -0
- package/dist/esm/models/chatstreamingchoice.d.ts +72 -0
- package/dist/esm/models/chatstreamingchoice.d.ts.map +1 -0
- package/dist/esm/models/chatstreamingchoice.js +70 -0
- package/dist/esm/models/chatstreamingchoice.js.map +1 -0
- package/dist/esm/models/chatstreamingmessagechunk.d.ts +61 -0
- package/dist/esm/models/chatstreamingmessagechunk.d.ts.map +1 -0
- package/dist/esm/models/chatstreamingmessagechunk.js +67 -0
- package/dist/esm/models/chatstreamingmessagechunk.js.map +1 -0
- package/dist/esm/models/chatstreamingmessagetoolcall.d.ts +62 -0
- package/dist/esm/models/chatstreamingmessagetoolcall.d.ts.map +1 -0
- package/dist/esm/models/chatstreamingmessagetoolcall.js +66 -0
- package/dist/esm/models/chatstreamingmessagetoolcall.js.map +1 -0
- package/dist/esm/models/chatstreamingresponsechunk.d.ts +97 -0
- package/dist/esm/models/chatstreamingresponsechunk.d.ts.map +1 -0
- package/dist/esm/models/chatstreamingresponsechunk.js +122 -0
- package/dist/esm/models/chatstreamingresponsechunk.js.map +1 -0
- package/dist/esm/models/chatstreamoptions.d.ts +29 -0
- package/dist/esm/models/chatstreamoptions.d.ts.map +1 -0
- package/dist/esm/models/chatstreamoptions.js +40 -0
- package/dist/esm/models/chatstreamoptions.js.map +1 -0
- package/dist/esm/models/errorresponse.d.ts +297 -0
- package/dist/esm/models/errorresponse.d.ts.map +1 -0
- package/dist/esm/models/errorresponse.js +158 -0
- package/dist/esm/models/errorresponse.js.map +1 -0
- package/dist/esm/models/errors/chaterror.d.ts +37 -0
- package/dist/esm/models/errors/chaterror.d.ts.map +1 -0
- package/dist/esm/models/errors/chaterror.js +48 -0
- package/dist/esm/models/errors/chaterror.js.map +1 -0
- package/dist/esm/models/errors/getproviders.d.ts +49 -0
- package/dist/esm/models/errors/getproviders.d.ts.map +1 -0
- package/dist/esm/models/errors/getproviders.js +51 -0
- package/dist/esm/models/errors/getproviders.js.map +1 -0
- package/dist/esm/models/errors/httpclienterrors.d.ts +44 -0
- package/dist/esm/models/errors/httpclienterrors.d.ts.map +1 -0
- package/dist/esm/models/errors/httpclienterrors.js +69 -0
- package/dist/esm/models/errors/httpclienterrors.js.map +1 -0
- package/dist/esm/models/errors/index.d.ts +8 -0
- package/dist/esm/models/errors/index.d.ts.map +1 -0
- package/dist/esm/models/errors/index.js +11 -0
- package/dist/esm/models/errors/index.js.map +1 -0
- package/dist/esm/models/errors/openrouterdefaulterror.d.ts +10 -0
- package/dist/esm/models/errors/openrouterdefaulterror.d.ts.map +1 -0
- package/dist/esm/models/errors/openrouterdefaulterror.js +30 -0
- package/dist/esm/models/errors/openrouterdefaulterror.js.map +1 -0
- package/dist/esm/models/errors/openroutererror.d.ts +19 -0
- package/dist/esm/models/errors/openroutererror.d.ts.map +1 -0
- package/dist/esm/models/errors/openroutererror.js +16 -0
- package/dist/esm/models/errors/openroutererror.js.map +1 -0
- package/dist/esm/models/errors/responsevalidationerror.d.ts +26 -0
- package/dist/esm/models/errors/responsevalidationerror.d.ts.map +1 -0
- package/dist/esm/models/errors/responsevalidationerror.js +29 -0
- package/dist/esm/models/errors/responsevalidationerror.js.map +1 -0
- package/dist/esm/models/errors/sdkvalidationerror.d.ts +21 -0
- package/dist/esm/models/errors/sdkvalidationerror.d.ts.map +1 -0
- package/dist/esm/models/errors/sdkvalidationerror.js +91 -0
- package/dist/esm/models/errors/sdkvalidationerror.js.map +1 -0
- package/dist/esm/models/index.d.ts +28 -0
- package/dist/esm/models/index.d.ts.map +1 -0
- package/dist/esm/models/index.js +31 -0
- package/dist/esm/models/index.js.map +1 -0
- package/dist/esm/models/message.d.ts +80 -0
- package/dist/esm/models/message.d.ts.map +1 -0
- package/dist/esm/models/message.js +100 -0
- package/dist/esm/models/message.js.map +1 -0
- package/dist/esm/models/namedtoolchoice.d.ts +56 -0
- package/dist/esm/models/namedtoolchoice.d.ts.map +1 -0
- package/dist/esm/models/namedtoolchoice.js +58 -0
- package/dist/esm/models/namedtoolchoice.js.map +1 -0
- package/dist/esm/models/operations/deletekeyshash.d.ts +82 -0
- package/dist/esm/models/operations/deletekeyshash.d.ts.map +1 -0
- package/dist/esm/models/operations/deletekeyshash.js +84 -0
- package/dist/esm/models/operations/deletekeyshash.js.map +1 -0
- package/dist/esm/models/operations/getactivity.d.ts +82 -0
- package/dist/esm/models/operations/getactivity.d.ts.map +1 -0
- package/dist/esm/models/operations/getactivity.js +84 -0
- package/dist/esm/models/operations/getactivity.js.map +1 -0
- package/dist/esm/models/operations/getauthkey.d.ts +163 -0
- package/dist/esm/models/operations/getauthkey.d.ts.map +1 -0
- package/dist/esm/models/operations/getauthkey.js +140 -0
- package/dist/esm/models/operations/getauthkey.js.map +1 -0
- package/dist/esm/models/operations/getcredits.d.ts +81 -0
- package/dist/esm/models/operations/getcredits.d.ts.map +1 -0
- package/dist/esm/models/operations/getcredits.js +97 -0
- package/dist/esm/models/operations/getcredits.js.map +1 -0
- package/dist/esm/models/operations/getendpointszdr.d.ts +815 -0
- package/dist/esm/models/operations/getendpointszdr.d.ts.map +1 -0
- package/dist/esm/models/operations/getendpointszdr.js +614 -0
- package/dist/esm/models/operations/getendpointszdr.js.map +1 -0
- package/dist/esm/models/operations/getgeneration.d.ts +295 -0
- package/dist/esm/models/operations/getgeneration.d.ts.map +1 -0
- package/dist/esm/models/operations/getgeneration.js +247 -0
- package/dist/esm/models/operations/getgeneration.js.map +1 -0
- package/dist/esm/models/operations/getkey.d.ts +163 -0
- package/dist/esm/models/operations/getkey.d.ts.map +1 -0
- package/dist/esm/models/operations/getkey.js +140 -0
- package/dist/esm/models/operations/getkey.js.map +1 -0
- package/dist/esm/models/operations/getkeys.d.ts +147 -0
- package/dist/esm/models/operations/getkeys.d.ts.map +1 -0
- package/dist/esm/models/operations/getkeys.js +144 -0
- package/dist/esm/models/operations/getkeys.js.map +1 -0
- package/dist/esm/models/operations/getkeyshash.d.ts +148 -0
- package/dist/esm/models/operations/getkeyshash.d.ts.map +1 -0
- package/dist/esm/models/operations/getkeyshash.js +134 -0
- package/dist/esm/models/operations/getkeyshash.js.map +1 -0
- package/dist/esm/models/operations/getmodels.d.ts +901 -0
- package/dist/esm/models/operations/getmodels.d.ts.map +1 -0
- package/dist/esm/models/operations/getmodels.js +751 -0
- package/dist/esm/models/operations/getmodels.js.map +1 -0
- package/dist/esm/models/operations/getmodelsauthorslugendpoints.d.ts +1178 -0
- package/dist/esm/models/operations/getmodelsauthorslugendpoints.d.ts.map +1 -0
- package/dist/esm/models/operations/getmodelsauthorslugendpoints.js +849 -0
- package/dist/esm/models/operations/getmodelsauthorslugendpoints.js.map +1 -0
- package/dist/esm/models/operations/getmodelscount.d.ts +88 -0
- package/dist/esm/models/operations/getmodelscount.d.ts.map +1 -0
- package/dist/esm/models/operations/getmodelscount.js +84 -0
- package/dist/esm/models/operations/getmodelscount.js.map +1 -0
- package/dist/esm/models/operations/getmodelsuser.d.ts +870 -0
- package/dist/esm/models/operations/getmodelsuser.d.ts.map +1 -0
- package/dist/esm/models/operations/getmodelsuser.js +706 -0
- package/dist/esm/models/operations/getmodelsuser.js.map +1 -0
- package/dist/esm/models/operations/getparametersauthorslug.d.ts +419 -0
- package/dist/esm/models/operations/getparametersauthorslug.d.ts.map +1 -0
- package/dist/esm/models/operations/getparametersauthorslug.js +245 -0
- package/dist/esm/models/operations/getparametersauthorslug.js.map +1 -0
- package/dist/esm/models/operations/getproviders.d.ts +116 -0
- package/dist/esm/models/operations/getproviders.d.ts.map +1 -0
- package/dist/esm/models/operations/getproviders.js +105 -0
- package/dist/esm/models/operations/getproviders.js.map +1 -0
- package/dist/esm/models/operations/index.d.ts +21 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -0
- package/dist/esm/models/operations/index.js +24 -0
- package/dist/esm/models/operations/index.js.map +1 -0
- package/dist/esm/models/operations/patchkeyshash.d.ts +193 -0
- package/dist/esm/models/operations/patchkeyshash.d.ts.map +1 -0
- package/dist/esm/models/operations/patchkeyshash.js +183 -0
- package/dist/esm/models/operations/patchkeyshash.js.map +1 -0
- package/dist/esm/models/operations/postchatcompletions.d.ts +27 -0
- package/dist/esm/models/operations/postchatcompletions.d.ts.map +1 -0
- package/dist/esm/models/operations/postchatcompletions.js +42 -0
- package/dist/esm/models/operations/postchatcompletions.js.map +1 -0
- package/dist/esm/models/operations/postcreditscoinbase.d.ts +267 -0
- package/dist/esm/models/operations/postcreditscoinbase.d.ts.map +1 -0
- package/dist/esm/models/operations/postcreditscoinbase.js +325 -0
- package/dist/esm/models/operations/postcreditscoinbase.js.map +1 -0
- package/dist/esm/models/operations/postembeddings.d.ts +1497 -0
- package/dist/esm/models/operations/postembeddings.d.ts.map +1 -0
- package/dist/esm/models/operations/postembeddings.js +991 -0
- package/dist/esm/models/operations/postembeddings.js.map +1 -0
- package/dist/esm/models/operations/postkeys.d.ts +166 -0
- package/dist/esm/models/operations/postkeys.d.ts.map +1 -0
- package/dist/esm/models/operations/postkeys.js +148 -0
- package/dist/esm/models/operations/postkeys.js.map +1 -0
- package/dist/esm/models/security.d.ts +31 -0
- package/dist/esm/models/security.d.ts.map +1 -0
- package/dist/esm/models/security.js +33 -0
- package/dist/esm/models/security.js.map +1 -0
- package/dist/esm/models/systemmessage.d.ts +55 -0
- package/dist/esm/models/systemmessage.d.ts.map +1 -0
- package/dist/esm/models/systemmessage.js +63 -0
- package/dist/esm/models/systemmessage.js.map +1 -0
- package/dist/esm/models/tool.d.ts +66 -0
- package/dist/esm/models/tool.d.ts.map +1 -0
- package/dist/esm/models/tool.js +65 -0
- package/dist/esm/models/tool.js.map +1 -0
- package/dist/esm/models/toolresponsemessage.d.ts +55 -0
- package/dist/esm/models/toolresponsemessage.d.ts.map +1 -0
- package/dist/esm/models/toolresponsemessage.js +69 -0
- package/dist/esm/models/toolresponsemessage.js.map +1 -0
- package/dist/esm/models/usermessage.d.ts +55 -0
- package/dist/esm/models/usermessage.d.ts.map +1 -0
- package/dist/esm/models/usermessage.js +60 -0
- package/dist/esm/models/usermessage.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/react-query/_context.d.ts +8 -0
- package/dist/esm/react-query/_context.d.ts.map +1 -0
- package/dist/esm/react-query/_context.js +14 -0
- package/dist/esm/react-query/_context.js.map +1 -0
- package/dist/esm/react-query/_types.d.ts +27 -0
- package/dist/esm/react-query/_types.d.ts.map +1 -0
- package/dist/esm/react-query/_types.js +5 -0
- package/dist/esm/react-query/_types.js.map +1 -0
- package/dist/esm/react-query/analyticsGetActivity.d.ts +36 -0
- package/dist/esm/react-query/analyticsGetActivity.d.ts.map +1 -0
- package/dist/esm/react-query/analyticsGetActivity.js +72 -0
- package/dist/esm/react-query/analyticsGetActivity.js.map +1 -0
- package/dist/esm/react-query/apiKeysDeleteKeysHash.d.ts +20 -0
- package/dist/esm/react-query/apiKeysDeleteKeysHash.d.ts.map +1 -0
- package/dist/esm/react-query/apiKeysDeleteKeysHash.js +39 -0
- package/dist/esm/react-query/apiKeysDeleteKeysHash.js.map +1 -0
- package/dist/esm/react-query/apiKeysGetAuthKey.d.ts +29 -0
- package/dist/esm/react-query/apiKeysGetAuthKey.d.ts.map +1 -0
- package/dist/esm/react-query/apiKeysGetAuthKey.js +66 -0
- package/dist/esm/react-query/apiKeysGetAuthKey.js.map +1 -0
- package/dist/esm/react-query/apiKeysGetKey.d.ts +29 -0
- package/dist/esm/react-query/apiKeysGetKey.d.ts.map +1 -0
- package/dist/esm/react-query/apiKeysGetKey.js +66 -0
- package/dist/esm/react-query/apiKeysGetKey.js.map +1 -0
- package/dist/esm/react-query/apiKeysGetKeys.d.ts +37 -0
- package/dist/esm/react-query/apiKeysGetKeys.d.ts.map +1 -0
- package/dist/esm/react-query/apiKeysGetKeys.js +69 -0
- package/dist/esm/react-query/apiKeysGetKeys.js.map +1 -0
- package/dist/esm/react-query/apiKeysGetKeysHash.d.ts +24 -0
- package/dist/esm/react-query/apiKeysGetKeysHash.d.ts.map +1 -0
- package/dist/esm/react-query/apiKeysGetKeysHash.js +66 -0
- package/dist/esm/react-query/apiKeysGetKeysHash.js.map +1 -0
- package/dist/esm/react-query/apiKeysPatchKeysHash.d.ts +20 -0
- package/dist/esm/react-query/apiKeysPatchKeysHash.d.ts.map +1 -0
- package/dist/esm/react-query/apiKeysPatchKeysHash.js +39 -0
- package/dist/esm/react-query/apiKeysPatchKeysHash.js.map +1 -0
- package/dist/esm/react-query/apiKeysPostKeys.d.ts +20 -0
- package/dist/esm/react-query/apiKeysPostKeys.d.ts.map +1 -0
- package/dist/esm/react-query/apiKeysPostKeys.js +39 -0
- package/dist/esm/react-query/apiKeysPostKeys.js.map +1 -0
- package/dist/esm/react-query/chatSend.d.ts +28 -0
- package/dist/esm/react-query/chatSend.d.ts.map +1 -0
- package/dist/esm/react-query/chatSend.js +43 -0
- package/dist/esm/react-query/chatSend.js.map +1 -0
- package/dist/esm/react-query/embeddingsPostEmbeddings.d.ts +23 -0
- package/dist/esm/react-query/embeddingsPostEmbeddings.d.ts.map +1 -0
- package/dist/esm/react-query/embeddingsPostEmbeddings.js +42 -0
- package/dist/esm/react-query/embeddingsPostEmbeddings.js.map +1 -0
- package/dist/esm/react-query/endpointsGetEndpointsZdr.d.ts +23 -0
- package/dist/esm/react-query/endpointsGetEndpointsZdr.d.ts.map +1 -0
- package/dist/esm/react-query/endpointsGetEndpointsZdr.js +60 -0
- package/dist/esm/react-query/endpointsGetEndpointsZdr.js.map +1 -0
- package/dist/esm/react-query/endpointsGetModelsAuthorSlugEndpoints.d.ts +24 -0
- package/dist/esm/react-query/endpointsGetModelsAuthorSlugEndpoints.d.ts.map +1 -0
- package/dist/esm/react-query/endpointsGetModelsAuthorSlugEndpoints.js +77 -0
- package/dist/esm/react-query/endpointsGetModelsAuthorSlugEndpoints.js.map +1 -0
- package/dist/esm/react-query/generationsGetGeneration.d.ts +30 -0
- package/dist/esm/react-query/generationsGetGeneration.d.ts.map +1 -0
- package/dist/esm/react-query/generationsGetGeneration.js +71 -0
- package/dist/esm/react-query/generationsGetGeneration.js.map +1 -0
- package/dist/esm/react-query/getCredits.d.ts +23 -0
- package/dist/esm/react-query/getCredits.d.ts.map +1 -0
- package/dist/esm/react-query/getCredits.js +60 -0
- package/dist/esm/react-query/getCredits.js.map +1 -0
- package/dist/esm/react-query/getProviders.d.ts +17 -0
- package/dist/esm/react-query/getProviders.d.ts.map +1 -0
- package/dist/esm/react-query/getProviders.js +54 -0
- package/dist/esm/react-query/getProviders.js.map +1 -0
- package/dist/esm/react-query/index.d.ts +23 -0
- package/dist/esm/react-query/index.d.ts.map +1 -0
- package/dist/esm/react-query/index.js +26 -0
- package/dist/esm/react-query/index.js.map +1 -0
- package/dist/esm/react-query/modelsGetModels.d.ts +47 -0
- package/dist/esm/react-query/modelsGetModels.d.ts.map +1 -0
- package/dist/esm/react-query/modelsGetModels.js +72 -0
- package/dist/esm/react-query/modelsGetModels.js.map +1 -0
- package/dist/esm/react-query/modelsGetModelsCount.d.ts +23 -0
- package/dist/esm/react-query/modelsGetModelsCount.d.ts.map +1 -0
- package/dist/esm/react-query/modelsGetModelsCount.js +60 -0
- package/dist/esm/react-query/modelsGetModelsCount.js.map +1 -0
- package/dist/esm/react-query/modelsGetModelsUser.d.ts +23 -0
- package/dist/esm/react-query/modelsGetModelsUser.d.ts.map +1 -0
- package/dist/esm/react-query/modelsGetModelsUser.js +60 -0
- package/dist/esm/react-query/modelsGetModelsUser.js.map +1 -0
- package/dist/esm/react-query/parametersGetParametersAuthorSlug.d.ts +38 -0
- package/dist/esm/react-query/parametersGetParametersAuthorSlug.d.ts.map +1 -0
- package/dist/esm/react-query/parametersGetParametersAuthorSlug.js +78 -0
- package/dist/esm/react-query/parametersGetParametersAuthorSlug.js.map +1 -0
- package/dist/esm/react-query/postCreditsCoinbase.d.ts +20 -0
- package/dist/esm/react-query/postCreditsCoinbase.d.ts.map +1 -0
- package/dist/esm/react-query/postCreditsCoinbase.js +39 -0
- package/dist/esm/react-query/postCreditsCoinbase.js.map +1 -0
- package/dist/esm/sdk/analytics.d.ts +12 -0
- package/dist/esm/sdk/analytics.d.ts.map +1 -0
- package/dist/esm/sdk/analytics.js +18 -0
- package/dist/esm/sdk/analytics.js.map +1 -0
- package/dist/esm/sdk/apikeys.d.ts +39 -0
- package/dist/esm/sdk/apikeys.d.ts.map +1 -0
- package/dist/esm/sdk/apikeys.js +63 -0
- package/dist/esm/sdk/apikeys.js.map +1 -0
- package/dist/esm/sdk/chat.d.ts +17 -0
- package/dist/esm/sdk/chat.d.ts.map +1 -0
- package/dist/esm/sdk/chat.js +19 -0
- package/dist/esm/sdk/chat.js.map +1 -0
- package/dist/esm/sdk/embeddings.d.ts +12 -0
- package/dist/esm/sdk/embeddings.d.ts.map +1 -0
- package/dist/esm/sdk/embeddings.js +18 -0
- package/dist/esm/sdk/embeddings.js.map +1 -0
- package/dist/esm/sdk/endpoints.d.ts +13 -0
- package/dist/esm/sdk/endpoints.d.ts.map +1 -0
- package/dist/esm/sdk/endpoints.js +22 -0
- package/dist/esm/sdk/endpoints.js.map +1 -0
- package/dist/esm/sdk/generations.d.ts +9 -0
- package/dist/esm/sdk/generations.d.ts.map +1 -0
- package/dist/esm/sdk/generations.js +15 -0
- package/dist/esm/sdk/generations.js.map +1 -0
- package/dist/esm/sdk/index.d.ts +2 -0
- package/dist/esm/sdk/index.d.ts.map +1 -0
- package/dist/esm/sdk/index.js +5 -0
- package/dist/esm/sdk/index.js.map +1 -0
- package/dist/esm/sdk/models.d.ts +21 -0
- package/dist/esm/sdk/models.d.ts.map +1 -0
- package/dist/esm/sdk/models.js +30 -0
- package/dist/esm/sdk/models.js.map +1 -0
- package/dist/esm/sdk/parameters.d.ts +9 -0
- package/dist/esm/sdk/parameters.d.ts.map +1 -0
- package/dist/esm/sdk/parameters.js +15 -0
- package/dist/esm/sdk/parameters.js.map +1 -0
- package/dist/esm/sdk/sdk.d.ts +38 -0
- package/dist/esm/sdk/sdk.d.ts.map +1 -0
- package/dist/esm/sdk/sdk.js +58 -0
- package/dist/esm/sdk/sdk.js.map +1 -0
- package/dist/esm/types/async.d.ts +23 -0
- package/dist/esm/types/async.d.ts.map +1 -0
- package/dist/esm/types/async.js +40 -0
- package/dist/esm/types/async.js.map +1 -0
- package/dist/esm/types/blobs.d.ts +4 -0
- package/dist/esm/types/blobs.d.ts.map +1 -0
- package/dist/esm/types/blobs.js +25 -0
- package/dist/esm/types/blobs.js.map +1 -0
- package/dist/esm/types/constdatetime.d.ts +3 -0
- package/dist/esm/types/constdatetime.d.ts.map +1 -0
- package/dist/esm/types/constdatetime.js +10 -0
- package/dist/esm/types/constdatetime.js.map +1 -0
- package/dist/esm/types/enums.d.ts +12 -0
- package/dist/esm/types/enums.d.ts.map +1 -0
- package/dist/esm/types/enums.js +7 -0
- package/dist/esm/types/enums.js.map +1 -0
- package/dist/esm/types/fp.d.ts +31 -0
- package/dist/esm/types/fp.d.ts.map +1 -0
- package/dist/esm/types/fp.js +31 -0
- package/dist/esm/types/fp.js.map +1 -0
- package/dist/esm/types/index.d.ts +8 -0
- package/dist/esm/types/index.d.ts.map +1 -0
- package/dist/esm/types/index.js +8 -0
- package/dist/esm/types/index.js.map +1 -0
- package/dist/esm/types/operations.d.ts +27 -0
- package/dist/esm/types/operations.d.ts.map +1 -0
- package/dist/esm/types/operations.js +77 -0
- package/dist/esm/types/operations.js.map +1 -0
- package/dist/esm/types/rfcdate.d.ts +21 -0
- package/dist/esm/types/rfcdate.d.ts.map +1 -0
- package/dist/esm/types/rfcdate.js +42 -0
- package/dist/esm/types/rfcdate.js.map +1 -0
- package/dist/esm/types/streams.d.ts +2 -0
- package/dist/esm/types/streams.d.ts.map +1 -0
- package/dist/esm/types/streams.js +15 -0
- package/dist/esm/types/streams.js.map +1 -0
- package/docs/sdks/analytics/README.md +113 -0
- package/docs/sdks/apikeys/README.md +716 -0
- package/docs/sdks/chat/README.md +100 -0
- package/docs/sdks/embeddings/README.md +108 -0
- package/docs/sdks/endpoints/README.md +215 -0
- package/docs/sdks/generations/README.md +113 -0
- package/docs/sdks/models/README.md +309 -0
- package/docs/sdks/openrouter/README.md +301 -0
- package/docs/sdks/parameters/README.md +115 -0
- package/examples/README.md +31 -0
- package/examples/chatCompletion.example.ts +19 -0
- package/examples/chatCompletionStream.example.ts +30 -0
- package/examples/getCredits.example.ts +28 -0
- package/examples/package.json +18 -0
- package/examples/unauthorized.example.ts +19 -0
- package/jsr.json +28 -0
- package/package.json +151 -0
- package/src/core.ts +13 -0
- package/src/funcs/analyticsGetActivity.ts +165 -0
- package/src/funcs/apiKeysDeleteKeysHash.ts +163 -0
- package/src/funcs/apiKeysGetAuthKey.ts +142 -0
- package/src/funcs/apiKeysGetKey.ts +142 -0
- package/src/funcs/apiKeysGetKeys.ts +162 -0
- package/src/funcs/apiKeysGetKeysHash.ts +163 -0
- package/src/funcs/apiKeysPatchKeysHash.ts +164 -0
- package/src/funcs/apiKeysPostKeys.ts +160 -0
- package/src/funcs/chatSend.ts +180 -0
- package/src/funcs/embeddingsPostEmbeddings.ts +163 -0
- package/src/funcs/endpointsGetEndpointsZdr.ts +139 -0
- package/src/funcs/endpointsGetModelsAuthorSlugEndpoints.ts +172 -0
- package/src/funcs/generationsGetGeneration.ts +161 -0
- package/src/funcs/getCredits.ts +139 -0
- package/src/funcs/getProviders.ts +144 -0
- package/src/funcs/modelsGetModels.ts +174 -0
- package/src/funcs/modelsGetModelsCount.ts +139 -0
- package/src/funcs/modelsGetModelsUser.ts +139 -0
- package/src/funcs/parametersGetParametersAuthorSlug.ts +173 -0
- package/src/funcs/postCreditsCoinbase.ts +162 -0
- package/src/hooks/hooks.ts +132 -0
- package/src/hooks/index.ts +6 -0
- package/src/hooks/registration.ts +14 -0
- package/src/hooks/types.ts +107 -0
- package/src/index.ts +9 -0
- package/src/lib/base64.ts +37 -0
- package/src/lib/config.ts +70 -0
- package/src/lib/dlv.ts +53 -0
- package/src/lib/encodings.ts +483 -0
- package/src/lib/env.ts +43 -0
- package/src/lib/event-streams.ts +135 -0
- package/src/lib/files.ts +82 -0
- package/src/lib/http.ts +323 -0
- package/src/lib/is-plain-object.ts +43 -0
- package/src/lib/logger.ts +9 -0
- package/src/lib/matchers.ts +352 -0
- package/src/lib/primitives.ts +150 -0
- package/src/lib/retries.ts +218 -0
- package/src/lib/schemas.ts +91 -0
- package/src/lib/sdks.ts +406 -0
- package/src/lib/security.ts +271 -0
- package/src/lib/url.ts +33 -0
- package/src/models/activityitem.ts +156 -0
- package/src/models/assistantmessage.ts +163 -0
- package/src/models/chaterror.ts +74 -0
- package/src/models/chatgenerationparams.ts +847 -0
- package/src/models/chatgenerationtokenusage.ts +259 -0
- package/src/models/chatmessagecontentitem.ts +110 -0
- package/src/models/chatmessagecontentitemaudio.ts +170 -0
- package/src/models/chatmessagecontentitemimage.ts +166 -0
- package/src/models/chatmessagecontentitemtext.ts +70 -0
- package/src/models/chatmessagetokenlogprob.ts +149 -0
- package/src/models/chatmessagetokenlogprobs.ts +76 -0
- package/src/models/chatmessagetoolcall.ts +138 -0
- package/src/models/chatresponse.ts +107 -0
- package/src/models/chatresponsechoice.ts +132 -0
- package/src/models/chatstreamingchoice.ts +132 -0
- package/src/models/chatstreamingmessagechunk.ts +123 -0
- package/src/models/chatstreamingmessagetoolcall.ts +149 -0
- package/src/models/chatstreamingresponsechunk.ts +239 -0
- package/src/models/chatstreamoptions.ts +75 -0
- package/src/models/errorresponse.ts +239 -0
- package/src/models/errors/chaterror.ts +79 -0
- package/src/models/errors/getproviders.ts +91 -0
- package/src/models/errors/httpclienterrors.ts +62 -0
- package/src/models/errors/index.ts +11 -0
- package/src/models/errors/openrouterdefaulterror.ts +40 -0
- package/src/models/errors/openroutererror.ts +35 -0
- package/src/models/errors/responsevalidationerror.ts +50 -0
- package/src/models/errors/sdkvalidationerror.ts +109 -0
- package/src/models/index.ts +31 -0
- package/src/models/message.ts +223 -0
- package/src/models/namedtoolchoice.ts +126 -0
- package/src/models/operations/deletekeyshash.ts +191 -0
- package/src/models/operations/getactivity.ts +191 -0
- package/src/models/operations/getauthkey.ts +330 -0
- package/src/models/operations/getcredits.ts +197 -0
- package/src/models/operations/getendpointszdr.ts +1172 -0
- package/src/models/operations/getgeneration.ts +552 -0
- package/src/models/operations/getkey.ts +324 -0
- package/src/models/operations/getkeys.ts +312 -0
- package/src/models/operations/getkeyshash.ts +313 -0
- package/src/models/operations/getmodels.ts +1527 -0
- package/src/models/operations/getmodelsauthorslugendpoints.ts +1791 -0
- package/src/models/operations/getmodelscount.ts +197 -0
- package/src/models/operations/getmodelsuser.ts +1469 -0
- package/src/models/operations/getparametersauthorslug.ts +437 -0
- package/src/models/operations/getproviders.ts +235 -0
- package/src/models/operations/index.ts +24 -0
- package/src/models/operations/patchkeyshash.ts +417 -0
- package/src/models/operations/postchatcompletions.ts +80 -0
- package/src/models/operations/postcreditscoinbase.ts +622 -0
- package/src/models/operations/postembeddings.ts +1672 -0
- package/src/models/operations/postkeys.ts +339 -0
- package/src/models/security.ts +66 -0
- package/src/models/systemmessage.ts +134 -0
- package/src/models/tool.ts +126 -0
- package/src/models/toolresponsemessage.ts +144 -0
- package/src/models/usermessage.ts +131 -0
- package/src/react-query/_types.ts +162 -0
- package/src/react-query/analyticsGetActivity.ts +150 -0
- package/src/react-query/apiKeysDeleteKeysHash.ts +86 -0
- package/src/react-query/apiKeysGetAuthKey.ts +124 -0
- package/src/react-query/apiKeysGetKey.ts +122 -0
- package/src/react-query/apiKeysGetKeys.ts +158 -0
- package/src/react-query/apiKeysGetKeysHash.ts +142 -0
- package/src/react-query/apiKeysPatchKeysHash.ts +85 -0
- package/src/react-query/apiKeysPostKeys.ts +85 -0
- package/src/react-query/chatSend.ts +87 -0
- package/src/react-query/embeddingsPostEmbeddings.ts +89 -0
- package/src/react-query/endpointsGetEndpointsZdr.ts +119 -0
- package/src/react-query/endpointsGetModelsAuthorSlugEndpoints.ts +168 -0
- package/src/react-query/generationsGetGeneration.ts +150 -0
- package/src/react-query/getCredits.ts +116 -0
- package/src/react-query/getProviders.ts +110 -0
- package/src/react-query/index.ts +27 -0
- package/src/react-query/modelsGetModels.ts +171 -0
- package/src/react-query/modelsGetModelsCount.ts +118 -0
- package/src/react-query/modelsGetModelsUser.ts +118 -0
- package/src/react-query/parametersGetParametersAuthorSlug.ts +184 -0
- package/src/react-query/postCreditsCoinbase.ts +86 -0
- package/src/sdk/analytics.ts +27 -0
- package/src/sdk/apikeys.ts +116 -0
- package/src/sdk/chat.ts +30 -0
- package/src/sdk/embeddings.ts +27 -0
- package/src/sdk/endpoints.ts +37 -0
- package/src/sdk/generations.ts +24 -0
- package/src/sdk/index.ts +5 -0
- package/src/sdk/models.ts +55 -0
- package/src/sdk/parameters.ts +24 -0
- package/src/sdk/sdk.ts +95 -0
- package/src/types/async.ts +68 -0
- package/src/types/blobs.ts +31 -0
- package/src/types/constdatetime.ts +15 -0
- package/src/types/enums.ts +16 -0
- package/src/types/fp.ts +50 -0
- package/src/types/index.ts +11 -0
- package/src/types/operations.ts +105 -0
- package/src/types/rfcdate.ts +54 -0
- package/src/types/streams.ts +21 -0
- package/tsconfig.json +41 -0
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
10
|
+
|
|
11
|
+
export type ChatStreamOptions = {
|
|
12
|
+
includeUsage?: boolean | undefined;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/** @internal */
|
|
16
|
+
export const ChatStreamOptions$inboundSchema: z.ZodType<
|
|
17
|
+
ChatStreamOptions,
|
|
18
|
+
z.ZodTypeDef,
|
|
19
|
+
unknown
|
|
20
|
+
> = z.object({
|
|
21
|
+
include_usage: z.boolean().optional(),
|
|
22
|
+
}).transform((v) => {
|
|
23
|
+
return remap$(v, {
|
|
24
|
+
"include_usage": "includeUsage",
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
/** @internal */
|
|
29
|
+
export type ChatStreamOptions$Outbound = {
|
|
30
|
+
include_usage?: boolean | undefined;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
/** @internal */
|
|
34
|
+
export const ChatStreamOptions$outboundSchema: z.ZodType<
|
|
35
|
+
ChatStreamOptions$Outbound,
|
|
36
|
+
z.ZodTypeDef,
|
|
37
|
+
ChatStreamOptions
|
|
38
|
+
> = z.object({
|
|
39
|
+
includeUsage: z.boolean().optional(),
|
|
40
|
+
}).transform((v) => {
|
|
41
|
+
return remap$(v, {
|
|
42
|
+
includeUsage: "include_usage",
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* @internal
|
|
48
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
49
|
+
*/
|
|
50
|
+
export namespace ChatStreamOptions$ {
|
|
51
|
+
/** @deprecated use `ChatStreamOptions$inboundSchema` instead. */
|
|
52
|
+
export const inboundSchema = ChatStreamOptions$inboundSchema;
|
|
53
|
+
/** @deprecated use `ChatStreamOptions$outboundSchema` instead. */
|
|
54
|
+
export const outboundSchema = ChatStreamOptions$outboundSchema;
|
|
55
|
+
/** @deprecated use `ChatStreamOptions$Outbound` instead. */
|
|
56
|
+
export type Outbound = ChatStreamOptions$Outbound;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function chatStreamOptionsToJSON(
|
|
60
|
+
chatStreamOptions: ChatStreamOptions,
|
|
61
|
+
): string {
|
|
62
|
+
return JSON.stringify(
|
|
63
|
+
ChatStreamOptions$outboundSchema.parse(chatStreamOptions),
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function chatStreamOptionsFromJSON(
|
|
68
|
+
jsonString: string,
|
|
69
|
+
): SafeParseResult<ChatStreamOptions, SDKValidationError> {
|
|
70
|
+
return safeParse(
|
|
71
|
+
jsonString,
|
|
72
|
+
(x) => ChatStreamOptions$inboundSchema.parse(JSON.parse(x)),
|
|
73
|
+
`Failed to parse 'ChatStreamOptions' from JSON`,
|
|
74
|
+
);
|
|
75
|
+
}
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
10
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export const Code = {
|
|
13
|
+
OneHundred: 100,
|
|
14
|
+
OneHundredAndOne: 101,
|
|
15
|
+
OneHundredAndTwo: 102,
|
|
16
|
+
TwoHundred: 200,
|
|
17
|
+
TwoHundredAndOne: 201,
|
|
18
|
+
TwoHundredAndTwo: 202,
|
|
19
|
+
TwoHundredAndThree: 203,
|
|
20
|
+
TwoHundredAndFour: 204,
|
|
21
|
+
TwoHundredAndFive: 205,
|
|
22
|
+
TwoHundredAndSix: 206,
|
|
23
|
+
TwoHundredAndSeven: 207,
|
|
24
|
+
TwoHundredAndEight: 208,
|
|
25
|
+
ThreeHundred: 300,
|
|
26
|
+
ThreeHundredAndOne: 301,
|
|
27
|
+
ThreeHundredAndTwo: 302,
|
|
28
|
+
ThreeHundredAndThree: 303,
|
|
29
|
+
ThreeHundredAndFour: 304,
|
|
30
|
+
ThreeHundredAndFive: 305,
|
|
31
|
+
ThreeHundredAndSeven: 307,
|
|
32
|
+
ThreeHundredAndEight: 308,
|
|
33
|
+
FourHundred: 400,
|
|
34
|
+
FourHundredAndOne: 401,
|
|
35
|
+
FourHundredAndTwo: 402,
|
|
36
|
+
FourHundredAndThree: 403,
|
|
37
|
+
FourHundredAndFour: 404,
|
|
38
|
+
FourHundredAndFive: 405,
|
|
39
|
+
FourHundredAndSix: 406,
|
|
40
|
+
FourHundredAndSeven: 407,
|
|
41
|
+
FourHundredAndEight: 408,
|
|
42
|
+
FourHundredAndNine: 409,
|
|
43
|
+
FourHundredAndTen: 410,
|
|
44
|
+
FourHundredAndEleven: 411,
|
|
45
|
+
FourHundredAndTwelve: 412,
|
|
46
|
+
FourHundredAndThirteen: 413,
|
|
47
|
+
FourHundredAndFourteen: 414,
|
|
48
|
+
FourHundredAndFifteen: 415,
|
|
49
|
+
FourHundredAndSixteen: 416,
|
|
50
|
+
FourHundredAndSeventeen: 417,
|
|
51
|
+
FourHundredAndEighteen: 418,
|
|
52
|
+
FourHundredAndTwentyTwo: 422,
|
|
53
|
+
FourHundredAndTwentyThree: 423,
|
|
54
|
+
FourHundredAndTwentyFour: 424,
|
|
55
|
+
FourHundredAndTwentyFive: 425,
|
|
56
|
+
FourHundredAndTwentySix: 426,
|
|
57
|
+
FourHundredAndTwentyEight: 428,
|
|
58
|
+
FourHundredAndTwentyNine: 429,
|
|
59
|
+
FourHundredAndThirtyOne: 431,
|
|
60
|
+
FourHundredAndFiftyOne: 451,
|
|
61
|
+
FourHundredAndNinetyEight: 498,
|
|
62
|
+
FourHundredAndNinetyNine: 499,
|
|
63
|
+
FiveHundred: 500,
|
|
64
|
+
FiveHundredAndOne: 501,
|
|
65
|
+
FiveHundredAndTwo: 502,
|
|
66
|
+
FiveHundredAndThree: 503,
|
|
67
|
+
FiveHundredAndFour: 504,
|
|
68
|
+
FiveHundredAndFive: 505,
|
|
69
|
+
FiveHundredAndSix: 506,
|
|
70
|
+
FiveHundredAndSeven: 507,
|
|
71
|
+
FiveHundredAndEight: 508,
|
|
72
|
+
FiveHundredAndTen: 510,
|
|
73
|
+
FiveHundredAndEleven: 511,
|
|
74
|
+
FiveHundredAndTwenty: 520,
|
|
75
|
+
FiveHundredAndTwentyOne: 521,
|
|
76
|
+
FiveHundredAndTwentyTwo: 522,
|
|
77
|
+
FiveHundredAndTwentyThree: 523,
|
|
78
|
+
FiveHundredAndTwentyFour: 524,
|
|
79
|
+
FiveHundredAndTwentyFive: 525,
|
|
80
|
+
FiveHundredAndTwentySix: 526,
|
|
81
|
+
FiveHundredAndTwentyNine: 529,
|
|
82
|
+
FiveHundredAndThirty: 530,
|
|
83
|
+
} as const;
|
|
84
|
+
export type Code = ClosedEnum<typeof Code>;
|
|
85
|
+
|
|
86
|
+
export type ErrorResponseError = {
|
|
87
|
+
code: Code;
|
|
88
|
+
message: string;
|
|
89
|
+
metadata?: { [k: string]: any | null } | null | undefined;
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Error response
|
|
94
|
+
*/
|
|
95
|
+
export type ErrorResponse = {
|
|
96
|
+
error: ErrorResponseError;
|
|
97
|
+
userId?: string | null | undefined;
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
/** @internal */
|
|
101
|
+
export const Code$inboundSchema: z.ZodNativeEnum<typeof Code> = z.nativeEnum(
|
|
102
|
+
Code,
|
|
103
|
+
);
|
|
104
|
+
|
|
105
|
+
/** @internal */
|
|
106
|
+
export const Code$outboundSchema: z.ZodNativeEnum<typeof Code> =
|
|
107
|
+
Code$inboundSchema;
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* @internal
|
|
111
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
112
|
+
*/
|
|
113
|
+
export namespace Code$ {
|
|
114
|
+
/** @deprecated use `Code$inboundSchema` instead. */
|
|
115
|
+
export const inboundSchema = Code$inboundSchema;
|
|
116
|
+
/** @deprecated use `Code$outboundSchema` instead. */
|
|
117
|
+
export const outboundSchema = Code$outboundSchema;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/** @internal */
|
|
121
|
+
export const ErrorResponseError$inboundSchema: z.ZodType<
|
|
122
|
+
ErrorResponseError,
|
|
123
|
+
z.ZodTypeDef,
|
|
124
|
+
unknown
|
|
125
|
+
> = z.object({
|
|
126
|
+
code: Code$inboundSchema,
|
|
127
|
+
message: z.string(),
|
|
128
|
+
metadata: z.nullable(z.record(z.nullable(z.any()))).optional(),
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
/** @internal */
|
|
132
|
+
export type ErrorResponseError$Outbound = {
|
|
133
|
+
code: number;
|
|
134
|
+
message: string;
|
|
135
|
+
metadata?: { [k: string]: any | null } | null | undefined;
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
/** @internal */
|
|
139
|
+
export const ErrorResponseError$outboundSchema: z.ZodType<
|
|
140
|
+
ErrorResponseError$Outbound,
|
|
141
|
+
z.ZodTypeDef,
|
|
142
|
+
ErrorResponseError
|
|
143
|
+
> = z.object({
|
|
144
|
+
code: Code$outboundSchema,
|
|
145
|
+
message: z.string(),
|
|
146
|
+
metadata: z.nullable(z.record(z.nullable(z.any()))).optional(),
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* @internal
|
|
151
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
152
|
+
*/
|
|
153
|
+
export namespace ErrorResponseError$ {
|
|
154
|
+
/** @deprecated use `ErrorResponseError$inboundSchema` instead. */
|
|
155
|
+
export const inboundSchema = ErrorResponseError$inboundSchema;
|
|
156
|
+
/** @deprecated use `ErrorResponseError$outboundSchema` instead. */
|
|
157
|
+
export const outboundSchema = ErrorResponseError$outboundSchema;
|
|
158
|
+
/** @deprecated use `ErrorResponseError$Outbound` instead. */
|
|
159
|
+
export type Outbound = ErrorResponseError$Outbound;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
export function errorResponseErrorToJSON(
|
|
163
|
+
errorResponseError: ErrorResponseError,
|
|
164
|
+
): string {
|
|
165
|
+
return JSON.stringify(
|
|
166
|
+
ErrorResponseError$outboundSchema.parse(errorResponseError),
|
|
167
|
+
);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export function errorResponseErrorFromJSON(
|
|
171
|
+
jsonString: string,
|
|
172
|
+
): SafeParseResult<ErrorResponseError, SDKValidationError> {
|
|
173
|
+
return safeParse(
|
|
174
|
+
jsonString,
|
|
175
|
+
(x) => ErrorResponseError$inboundSchema.parse(JSON.parse(x)),
|
|
176
|
+
`Failed to parse 'ErrorResponseError' from JSON`,
|
|
177
|
+
);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/** @internal */
|
|
181
|
+
export const ErrorResponse$inboundSchema: z.ZodType<
|
|
182
|
+
ErrorResponse,
|
|
183
|
+
z.ZodTypeDef,
|
|
184
|
+
unknown
|
|
185
|
+
> = z.object({
|
|
186
|
+
error: z.lazy(() => ErrorResponseError$inboundSchema),
|
|
187
|
+
user_id: z.nullable(z.string()).optional(),
|
|
188
|
+
}).transform((v) => {
|
|
189
|
+
return remap$(v, {
|
|
190
|
+
"user_id": "userId",
|
|
191
|
+
});
|
|
192
|
+
});
|
|
193
|
+
|
|
194
|
+
/** @internal */
|
|
195
|
+
export type ErrorResponse$Outbound = {
|
|
196
|
+
error: ErrorResponseError$Outbound;
|
|
197
|
+
user_id?: string | null | undefined;
|
|
198
|
+
};
|
|
199
|
+
|
|
200
|
+
/** @internal */
|
|
201
|
+
export const ErrorResponse$outboundSchema: z.ZodType<
|
|
202
|
+
ErrorResponse$Outbound,
|
|
203
|
+
z.ZodTypeDef,
|
|
204
|
+
ErrorResponse
|
|
205
|
+
> = z.object({
|
|
206
|
+
error: z.lazy(() => ErrorResponseError$outboundSchema),
|
|
207
|
+
userId: z.nullable(z.string()).optional(),
|
|
208
|
+
}).transform((v) => {
|
|
209
|
+
return remap$(v, {
|
|
210
|
+
userId: "user_id",
|
|
211
|
+
});
|
|
212
|
+
});
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* @internal
|
|
216
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
217
|
+
*/
|
|
218
|
+
export namespace ErrorResponse$ {
|
|
219
|
+
/** @deprecated use `ErrorResponse$inboundSchema` instead. */
|
|
220
|
+
export const inboundSchema = ErrorResponse$inboundSchema;
|
|
221
|
+
/** @deprecated use `ErrorResponse$outboundSchema` instead. */
|
|
222
|
+
export const outboundSchema = ErrorResponse$outboundSchema;
|
|
223
|
+
/** @deprecated use `ErrorResponse$Outbound` instead. */
|
|
224
|
+
export type Outbound = ErrorResponse$Outbound;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
export function errorResponseToJSON(errorResponse: ErrorResponse): string {
|
|
228
|
+
return JSON.stringify(ErrorResponse$outboundSchema.parse(errorResponse));
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
export function errorResponseFromJSON(
|
|
232
|
+
jsonString: string,
|
|
233
|
+
): SafeParseResult<ErrorResponse, SDKValidationError> {
|
|
234
|
+
return safeParse(
|
|
235
|
+
jsonString,
|
|
236
|
+
(x) => ErrorResponse$inboundSchema.parse(JSON.parse(x)),
|
|
237
|
+
`Failed to parse 'ErrorResponse' from JSON`,
|
|
238
|
+
);
|
|
239
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import * as models from "../index.js";
|
|
7
|
+
import { OpenRouterError } from "./openroutererror.js";
|
|
8
|
+
|
|
9
|
+
export type ChatErrorData = {
|
|
10
|
+
error: models.ChatErrorError;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export class ChatError extends OpenRouterError {
|
|
14
|
+
error: models.ChatErrorError;
|
|
15
|
+
|
|
16
|
+
/** The original data that was passed to this error instance. */
|
|
17
|
+
data$: ChatErrorData;
|
|
18
|
+
|
|
19
|
+
constructor(
|
|
20
|
+
err: ChatErrorData,
|
|
21
|
+
httpMeta: { response: Response; request: Request; body: string },
|
|
22
|
+
) {
|
|
23
|
+
const message = err.error?.message
|
|
24
|
+
|| `API error occurred: ${JSON.stringify(err)}`;
|
|
25
|
+
super(message, httpMeta);
|
|
26
|
+
this.data$ = err;
|
|
27
|
+
this.error = err.error;
|
|
28
|
+
|
|
29
|
+
this.name = "ChatError";
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/** @internal */
|
|
34
|
+
export const ChatError$inboundSchema: z.ZodType<
|
|
35
|
+
ChatError,
|
|
36
|
+
z.ZodTypeDef,
|
|
37
|
+
unknown
|
|
38
|
+
> = z.object({
|
|
39
|
+
error: z.lazy(() => models.ChatErrorError$inboundSchema),
|
|
40
|
+
request$: z.instanceof(Request),
|
|
41
|
+
response$: z.instanceof(Response),
|
|
42
|
+
body$: z.string(),
|
|
43
|
+
})
|
|
44
|
+
.transform((v) => {
|
|
45
|
+
return new ChatError(v, {
|
|
46
|
+
request: v.request$,
|
|
47
|
+
response: v.response$,
|
|
48
|
+
body: v.body$,
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
/** @internal */
|
|
53
|
+
export type ChatError$Outbound = {
|
|
54
|
+
error: models.ChatErrorError$Outbound;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
/** @internal */
|
|
58
|
+
export const ChatError$outboundSchema: z.ZodType<
|
|
59
|
+
ChatError$Outbound,
|
|
60
|
+
z.ZodTypeDef,
|
|
61
|
+
ChatError
|
|
62
|
+
> = z.instanceof(ChatError)
|
|
63
|
+
.transform(v => v.data$)
|
|
64
|
+
.pipe(z.object({
|
|
65
|
+
error: z.lazy(() => models.ChatErrorError$outboundSchema),
|
|
66
|
+
}));
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* @internal
|
|
70
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
71
|
+
*/
|
|
72
|
+
export namespace ChatError$ {
|
|
73
|
+
/** @deprecated use `ChatError$inboundSchema` instead. */
|
|
74
|
+
export const inboundSchema = ChatError$inboundSchema;
|
|
75
|
+
/** @deprecated use `ChatError$outboundSchema` instead. */
|
|
76
|
+
export const outboundSchema = ChatError$outboundSchema;
|
|
77
|
+
/** @deprecated use `ChatError$Outbound` instead. */
|
|
78
|
+
export type Outbound = ChatError$Outbound;
|
|
79
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import * as operations from "../operations/index.js";
|
|
7
|
+
import { OpenRouterError } from "./openroutererror.js";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Internal Server Error
|
|
11
|
+
*/
|
|
12
|
+
export type InternalServerErrorData = {
|
|
13
|
+
/**
|
|
14
|
+
* Error details
|
|
15
|
+
*/
|
|
16
|
+
error: operations.ErrorT;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Internal Server Error
|
|
21
|
+
*/
|
|
22
|
+
export class InternalServerError extends OpenRouterError {
|
|
23
|
+
/**
|
|
24
|
+
* Error details
|
|
25
|
+
*/
|
|
26
|
+
error: operations.ErrorT;
|
|
27
|
+
|
|
28
|
+
/** The original data that was passed to this error instance. */
|
|
29
|
+
data$: InternalServerErrorData;
|
|
30
|
+
|
|
31
|
+
constructor(
|
|
32
|
+
err: InternalServerErrorData,
|
|
33
|
+
httpMeta: { response: Response; request: Request; body: string },
|
|
34
|
+
) {
|
|
35
|
+
const message = err.error?.message
|
|
36
|
+
|| `API error occurred: ${JSON.stringify(err)}`;
|
|
37
|
+
super(message, httpMeta);
|
|
38
|
+
this.data$ = err;
|
|
39
|
+
this.error = err.error;
|
|
40
|
+
|
|
41
|
+
this.name = "InternalServerError";
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/** @internal */
|
|
46
|
+
export const InternalServerError$inboundSchema: z.ZodType<
|
|
47
|
+
InternalServerError,
|
|
48
|
+
z.ZodTypeDef,
|
|
49
|
+
unknown
|
|
50
|
+
> = z.object({
|
|
51
|
+
error: z.lazy(() => operations.ErrorT$inboundSchema),
|
|
52
|
+
request$: z.instanceof(Request),
|
|
53
|
+
response$: z.instanceof(Response),
|
|
54
|
+
body$: z.string(),
|
|
55
|
+
})
|
|
56
|
+
.transform((v) => {
|
|
57
|
+
return new InternalServerError(v, {
|
|
58
|
+
request: v.request$,
|
|
59
|
+
response: v.response$,
|
|
60
|
+
body: v.body$,
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
/** @internal */
|
|
65
|
+
export type InternalServerError$Outbound = {
|
|
66
|
+
error: operations.ErrorT$Outbound;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
/** @internal */
|
|
70
|
+
export const InternalServerError$outboundSchema: z.ZodType<
|
|
71
|
+
InternalServerError$Outbound,
|
|
72
|
+
z.ZodTypeDef,
|
|
73
|
+
InternalServerError
|
|
74
|
+
> = z.instanceof(InternalServerError)
|
|
75
|
+
.transform(v => v.data$)
|
|
76
|
+
.pipe(z.object({
|
|
77
|
+
error: z.lazy(() => operations.ErrorT$outboundSchema),
|
|
78
|
+
}));
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* @internal
|
|
82
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
83
|
+
*/
|
|
84
|
+
export namespace InternalServerError$ {
|
|
85
|
+
/** @deprecated use `InternalServerError$inboundSchema` instead. */
|
|
86
|
+
export const inboundSchema = InternalServerError$inboundSchema;
|
|
87
|
+
/** @deprecated use `InternalServerError$outboundSchema` instead. */
|
|
88
|
+
export const outboundSchema = InternalServerError$outboundSchema;
|
|
89
|
+
/** @deprecated use `InternalServerError$Outbound` instead. */
|
|
90
|
+
export type Outbound = InternalServerError$Outbound;
|
|
91
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Base class for all HTTP errors.
|
|
7
|
+
*/
|
|
8
|
+
export class HTTPClientError extends Error {
|
|
9
|
+
/** The underlying cause of the error. */
|
|
10
|
+
override readonly cause: unknown;
|
|
11
|
+
override name = "HTTPClientError";
|
|
12
|
+
constructor(message: string, opts?: { cause?: unknown }) {
|
|
13
|
+
let msg = message;
|
|
14
|
+
if (opts?.cause) {
|
|
15
|
+
msg += `: ${opts.cause}`;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
super(msg, opts);
|
|
19
|
+
// In older runtimes, the cause field would not have been assigned through
|
|
20
|
+
// the super() call.
|
|
21
|
+
if (typeof this.cause === "undefined") {
|
|
22
|
+
this.cause = opts?.cause;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* An error to capture unrecognised or unexpected errors when making HTTP calls.
|
|
29
|
+
*/
|
|
30
|
+
export class UnexpectedClientError extends HTTPClientError {
|
|
31
|
+
override name = "UnexpectedClientError";
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* An error that is raised when any inputs used to create a request are invalid.
|
|
36
|
+
*/
|
|
37
|
+
export class InvalidRequestError extends HTTPClientError {
|
|
38
|
+
override name = "InvalidRequestError";
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* An error that is raised when a HTTP request was aborted by the client error.
|
|
43
|
+
*/
|
|
44
|
+
export class RequestAbortedError extends HTTPClientError {
|
|
45
|
+
override readonly name = "RequestAbortedError";
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* An error that is raised when a HTTP request timed out due to an AbortSignal
|
|
50
|
+
* signal timeout.
|
|
51
|
+
*/
|
|
52
|
+
export class RequestTimeoutError extends HTTPClientError {
|
|
53
|
+
override readonly name = "RequestTimeoutError";
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* An error that is raised when a HTTP client is unable to make a request to
|
|
58
|
+
* a server.
|
|
59
|
+
*/
|
|
60
|
+
export class ConnectionError extends HTTPClientError {
|
|
61
|
+
override readonly name = "ConnectionError";
|
|
62
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
export * from "./chaterror.js";
|
|
6
|
+
export * from "./getproviders.js";
|
|
7
|
+
export * from "./httpclienterrors.js";
|
|
8
|
+
export * from "./openrouterdefaulterror.js";
|
|
9
|
+
export * from "./openroutererror.js";
|
|
10
|
+
export * from "./responsevalidationerror.js";
|
|
11
|
+
export * from "./sdkvalidationerror.js";
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { OpenRouterError } from "./openroutererror.js";
|
|
6
|
+
|
|
7
|
+
/** The fallback error class if no more specific error class is matched */
|
|
8
|
+
export class OpenRouterDefaultError extends OpenRouterError {
|
|
9
|
+
constructor(
|
|
10
|
+
message: string,
|
|
11
|
+
httpMeta: {
|
|
12
|
+
response: Response;
|
|
13
|
+
request: Request;
|
|
14
|
+
body: string;
|
|
15
|
+
},
|
|
16
|
+
) {
|
|
17
|
+
if (message) {
|
|
18
|
+
message += `: `;
|
|
19
|
+
}
|
|
20
|
+
message += `Status ${httpMeta.response.status}`;
|
|
21
|
+
const contentType = httpMeta.response.headers.get("content-type") || `""`;
|
|
22
|
+
if (contentType !== "application/json") {
|
|
23
|
+
message += ` Content-Type ${
|
|
24
|
+
contentType.includes(" ") ? `"${contentType}"` : contentType
|
|
25
|
+
}`;
|
|
26
|
+
}
|
|
27
|
+
const body = httpMeta.body || `""`;
|
|
28
|
+
message += body.length > 100 ? "\n" : ". ";
|
|
29
|
+
let bodyDisplay = body;
|
|
30
|
+
if (body.length > 10000) {
|
|
31
|
+
const truncated = body.substring(0, 10000);
|
|
32
|
+
const remaining = body.length - 10000;
|
|
33
|
+
bodyDisplay = `${truncated}...and ${remaining} more chars`;
|
|
34
|
+
}
|
|
35
|
+
message += `Body: ${bodyDisplay}`;
|
|
36
|
+
message = message.trim();
|
|
37
|
+
super(message, httpMeta);
|
|
38
|
+
this.name = "OpenRouterDefaultError";
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/** The base class for all HTTP error responses */
|
|
6
|
+
export class OpenRouterError extends Error {
|
|
7
|
+
/** HTTP status code */
|
|
8
|
+
public readonly statusCode: number;
|
|
9
|
+
/** HTTP body */
|
|
10
|
+
public readonly body: string;
|
|
11
|
+
/** HTTP headers */
|
|
12
|
+
public readonly headers: Headers;
|
|
13
|
+
/** HTTP content type */
|
|
14
|
+
public readonly contentType: string;
|
|
15
|
+
/** Raw response */
|
|
16
|
+
public readonly rawResponse: Response;
|
|
17
|
+
|
|
18
|
+
constructor(
|
|
19
|
+
message: string,
|
|
20
|
+
httpMeta: {
|
|
21
|
+
response: Response;
|
|
22
|
+
request: Request;
|
|
23
|
+
body: string;
|
|
24
|
+
},
|
|
25
|
+
) {
|
|
26
|
+
super(message);
|
|
27
|
+
this.statusCode = httpMeta.response.status;
|
|
28
|
+
this.body = httpMeta.body;
|
|
29
|
+
this.headers = httpMeta.response.headers;
|
|
30
|
+
this.contentType = httpMeta.response.headers.get("content-type") || "";
|
|
31
|
+
this.rawResponse = httpMeta.response;
|
|
32
|
+
|
|
33
|
+
this.name = "OpenRouterError";
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { OpenRouterError } from "./openroutererror.js";
|
|
7
|
+
import { formatZodError } from "./sdkvalidationerror.js";
|
|
8
|
+
|
|
9
|
+
export class ResponseValidationError extends OpenRouterError {
|
|
10
|
+
/**
|
|
11
|
+
* The raw value that failed validation.
|
|
12
|
+
*/
|
|
13
|
+
public readonly rawValue: unknown;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* The raw message that failed validation.
|
|
17
|
+
*/
|
|
18
|
+
public readonly rawMessage: unknown;
|
|
19
|
+
|
|
20
|
+
constructor(
|
|
21
|
+
message: string,
|
|
22
|
+
extra: {
|
|
23
|
+
response: Response;
|
|
24
|
+
request: Request;
|
|
25
|
+
body: string;
|
|
26
|
+
cause: unknown;
|
|
27
|
+
rawValue: unknown;
|
|
28
|
+
rawMessage: unknown;
|
|
29
|
+
},
|
|
30
|
+
) {
|
|
31
|
+
super(message, extra);
|
|
32
|
+
this.name = "ResponseValidationError";
|
|
33
|
+
this.cause = extra.cause;
|
|
34
|
+
this.rawValue = extra.rawValue;
|
|
35
|
+
this.rawMessage = extra.rawMessage;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Return a pretty-formatted error message if the underlying validation error
|
|
40
|
+
* is a ZodError or some other recognized error type, otherwise return the
|
|
41
|
+
* default error message.
|
|
42
|
+
*/
|
|
43
|
+
public pretty(): string {
|
|
44
|
+
if (this.cause instanceof z.ZodError) {
|
|
45
|
+
return `${this.rawMessage}\n${formatZodError(this.cause)}`;
|
|
46
|
+
} else {
|
|
47
|
+
return this.toString();
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|