@openrouter/sdk 0.0.0-beta.1 → 0.0.0-beta.17
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 +5 -0
- package/FUNCTIONS.md +8 -6
- package/REACT_QUERY.md +32 -25
- package/README.md +115 -53
- package/dist/commonjs/funcs/alphaResponsesSend2.d.ts +35 -0
- package/dist/commonjs/funcs/alphaResponsesSend2.d.ts.map +1 -0
- package/dist/commonjs/funcs/alphaResponsesSend2.js +119 -0
- package/dist/commonjs/funcs/alphaResponsesSend2.js.map +1 -0
- package/dist/commonjs/funcs/analyticsGetActivity.d.ts +2 -1
- package/dist/commonjs/funcs/analyticsGetActivity.d.ts.map +1 -1
- package/dist/commonjs/funcs/analyticsGetActivity.js +8 -3
- package/dist/commonjs/funcs/analyticsGetActivity.js.map +1 -1
- package/dist/commonjs/funcs/apiKeysDeleteKeysHash.d.ts +2 -1
- package/dist/commonjs/funcs/apiKeysDeleteKeysHash.d.ts.map +1 -1
- package/dist/commonjs/funcs/apiKeysDeleteKeysHash.js +8 -3
- package/dist/commonjs/funcs/apiKeysDeleteKeysHash.js.map +1 -1
- package/dist/commonjs/funcs/apiKeysGetAuthKey.d.ts +2 -1
- package/dist/commonjs/funcs/apiKeysGetAuthKey.d.ts.map +1 -1
- package/dist/commonjs/funcs/apiKeysGetAuthKey.js +8 -3
- package/dist/commonjs/funcs/apiKeysGetAuthKey.js.map +1 -1
- package/dist/commonjs/funcs/apiKeysGetKey.d.ts +2 -1
- package/dist/commonjs/funcs/apiKeysGetKey.d.ts.map +1 -1
- package/dist/commonjs/funcs/apiKeysGetKey.js +8 -3
- package/dist/commonjs/funcs/apiKeysGetKey.js.map +1 -1
- package/dist/commonjs/funcs/apiKeysGetKeys.d.ts +2 -1
- package/dist/commonjs/funcs/apiKeysGetKeys.d.ts.map +1 -1
- package/dist/commonjs/funcs/apiKeysGetKeys.js +8 -3
- package/dist/commonjs/funcs/apiKeysGetKeys.js.map +1 -1
- package/dist/commonjs/funcs/apiKeysGetKeysHash.d.ts +2 -1
- package/dist/commonjs/funcs/apiKeysGetKeysHash.d.ts.map +1 -1
- package/dist/commonjs/funcs/apiKeysGetKeysHash.js +8 -3
- package/dist/commonjs/funcs/apiKeysGetKeysHash.js.map +1 -1
- package/dist/commonjs/funcs/apiKeysPatchKeysHash.d.ts +2 -1
- package/dist/commonjs/funcs/apiKeysPatchKeysHash.d.ts.map +1 -1
- package/dist/commonjs/funcs/apiKeysPatchKeysHash.js +8 -3
- package/dist/commonjs/funcs/apiKeysPatchKeysHash.js.map +1 -1
- package/dist/commonjs/funcs/apiKeysPostKeys.d.ts +2 -1
- package/dist/commonjs/funcs/apiKeysPostKeys.d.ts.map +1 -1
- package/dist/commonjs/funcs/apiKeysPostKeys.js +8 -3
- package/dist/commonjs/funcs/apiKeysPostKeys.js.map +1 -1
- package/dist/commonjs/funcs/chatSend.d.ts +12 -1
- package/dist/commonjs/funcs/chatSend.d.ts.map +1 -1
- package/dist/commonjs/funcs/chatSend.js +5 -12
- package/dist/commonjs/funcs/chatSend.js.map +1 -1
- package/dist/commonjs/funcs/completionsGenerate.d.ts +36 -0
- package/dist/commonjs/funcs/completionsGenerate.d.ts.map +1 -0
- package/dist/commonjs/funcs/completionsGenerate.js +120 -0
- package/dist/commonjs/funcs/completionsGenerate.js.map +1 -0
- package/dist/commonjs/funcs/{getCredits.d.ts → creditsGetCredits.d.ts} +3 -2
- package/dist/commonjs/funcs/creditsGetCredits.d.ts.map +1 -0
- package/dist/commonjs/funcs/{getCredits.js → creditsGetCredits.js} +11 -6
- package/dist/commonjs/funcs/creditsGetCredits.js.map +1 -0
- package/dist/commonjs/funcs/{postCreditsCoinbase.d.ts → creditsPostCreditsCoinbase.d.ts} +3 -2
- package/dist/commonjs/funcs/creditsPostCreditsCoinbase.d.ts.map +1 -0
- package/dist/commonjs/funcs/{postCreditsCoinbase.js → creditsPostCreditsCoinbase.js} +19 -10
- package/dist/commonjs/funcs/creditsPostCreditsCoinbase.js.map +1 -0
- package/dist/commonjs/funcs/{embeddingsPostEmbeddings.d.ts → embeddingsGenerate.d.ts} +3 -2
- package/dist/commonjs/funcs/embeddingsGenerate.d.ts.map +1 -0
- package/dist/commonjs/funcs/{embeddingsPostEmbeddings.js → embeddingsGenerate.js} +11 -6
- package/dist/commonjs/funcs/embeddingsGenerate.js.map +1 -0
- package/dist/commonjs/funcs/endpointsGetEndpointsZdr.d.ts +2 -1
- package/dist/commonjs/funcs/endpointsGetEndpointsZdr.d.ts.map +1 -1
- package/dist/commonjs/funcs/endpointsGetEndpointsZdr.js +8 -3
- package/dist/commonjs/funcs/endpointsGetEndpointsZdr.js.map +1 -1
- package/dist/commonjs/funcs/endpointsGetModelsAuthorSlugEndpoints.d.ts +2 -1
- package/dist/commonjs/funcs/endpointsGetModelsAuthorSlugEndpoints.d.ts.map +1 -1
- package/dist/commonjs/funcs/endpointsGetModelsAuthorSlugEndpoints.js +8 -3
- package/dist/commonjs/funcs/endpointsGetModelsAuthorSlugEndpoints.js.map +1 -1
- package/dist/commonjs/funcs/generationsGetGeneration.d.ts +2 -1
- package/dist/commonjs/funcs/generationsGetGeneration.d.ts.map +1 -1
- package/dist/commonjs/funcs/generationsGetGeneration.js +8 -3
- package/dist/commonjs/funcs/generationsGetGeneration.js.map +1 -1
- package/dist/{esm/funcs/parametersGetParametersAuthorSlug.d.ts → commonjs/funcs/modelGetParametersAuthorSlug.d.ts} +3 -2
- package/dist/commonjs/funcs/modelGetParametersAuthorSlug.d.ts.map +1 -0
- package/dist/commonjs/funcs/{parametersGetParametersAuthorSlug.js → modelGetParametersAuthorSlug.js} +19 -10
- package/dist/commonjs/funcs/modelGetParametersAuthorSlug.js.map +1 -0
- package/dist/commonjs/funcs/modelsGetModels.d.ts +2 -1
- package/dist/commonjs/funcs/modelsGetModels.d.ts.map +1 -1
- package/dist/commonjs/funcs/modelsGetModels.js +8 -3
- package/dist/commonjs/funcs/modelsGetModels.js.map +1 -1
- package/dist/commonjs/funcs/modelsGetModelsCount.d.ts +2 -1
- package/dist/commonjs/funcs/modelsGetModelsCount.d.ts.map +1 -1
- package/dist/commonjs/funcs/modelsGetModelsCount.js +8 -3
- package/dist/commonjs/funcs/modelsGetModelsCount.js.map +1 -1
- package/dist/commonjs/funcs/modelsGetModelsUser.d.ts +2 -1
- package/dist/commonjs/funcs/modelsGetModelsUser.d.ts.map +1 -1
- package/dist/commonjs/funcs/modelsGetModelsUser.js +17 -8
- package/dist/commonjs/funcs/modelsGetModelsUser.js.map +1 -1
- package/dist/commonjs/funcs/oAuthPostAuthKeys.d.ts +18 -0
- package/dist/commonjs/funcs/oAuthPostAuthKeys.d.ts.map +1 -0
- package/dist/commonjs/funcs/oAuthPostAuthKeys.js +120 -0
- package/dist/commonjs/funcs/oAuthPostAuthKeys.js.map +1 -0
- package/dist/commonjs/funcs/oAuthPostAuthKeysCode.d.ts +18 -0
- package/dist/commonjs/funcs/oAuthPostAuthKeysCode.d.ts.map +1 -0
- package/dist/commonjs/funcs/oAuthPostAuthKeysCode.js +120 -0
- package/dist/commonjs/funcs/oAuthPostAuthKeysCode.js.map +1 -0
- package/dist/{esm/funcs/getProviders.d.ts → commonjs/funcs/providersGetProviders.d.ts} +5 -2
- package/dist/commonjs/funcs/providersGetProviders.d.ts.map +1 -0
- package/dist/commonjs/funcs/{getProviders.js → providersGetProviders.js} +9 -5
- package/dist/commonjs/funcs/providersGetProviders.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +4 -8
- package/dist/commonjs/lib/config.d.ts.map +1 -1
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/lib/config.js.map +1 -1
- package/dist/commonjs/lib/env.d.ts +0 -1
- package/dist/commonjs/lib/env.d.ts.map +1 -1
- package/dist/commonjs/lib/env.js +0 -1
- package/dist/commonjs/lib/env.js.map +1 -1
- package/dist/commonjs/lib/security.d.ts.map +1 -1
- package/dist/commonjs/lib/security.js +1 -7
- package/dist/commonjs/lib/security.js.map +1 -1
- package/dist/commonjs/models/chaterror.d.ts +23 -2
- package/dist/commonjs/models/chaterror.d.ts.map +1 -1
- package/dist/commonjs/models/chaterror.js +26 -3
- package/dist/commonjs/models/chaterror.js.map +1 -1
- package/dist/commonjs/models/chatgenerationparams.d.ts +108 -108
- package/dist/commonjs/models/chatgenerationparams.d.ts.map +1 -1
- package/dist/commonjs/models/chatgenerationparams.js +143 -144
- package/dist/commonjs/models/chatgenerationparams.js.map +1 -1
- package/dist/commonjs/models/chatresponse.d.ts +2 -2
- package/dist/commonjs/models/chatresponse.d.ts.map +1 -1
- package/dist/commonjs/models/chatresponse.js +2 -2
- package/dist/commonjs/models/chatresponse.js.map +1 -1
- package/dist/commonjs/models/chatstreamingresponsechunk.d.ts +17 -17
- package/dist/commonjs/models/chatstreamingresponsechunk.d.ts.map +1 -1
- package/dist/commonjs/models/chatstreamingresponsechunk.js +21 -23
- package/dist/commonjs/models/chatstreamingresponsechunk.js.map +1 -1
- package/dist/commonjs/models/completionchoice.d.ts +37 -0
- package/dist/commonjs/models/completionchoice.d.ts.map +1 -0
- package/dist/commonjs/models/completionchoice.js +86 -0
- package/dist/commonjs/models/completionchoice.js.map +1 -0
- package/dist/commonjs/models/completioncreateparams.d.ts +327 -0
- package/dist/commonjs/models/completioncreateparams.d.ts.map +1 -0
- package/dist/commonjs/models/completioncreateparams.js +461 -0
- package/dist/commonjs/models/completioncreateparams.js.map +1 -0
- package/dist/commonjs/models/completionerror.d.ts +56 -0
- package/dist/commonjs/models/completionerror.d.ts.map +1 -0
- package/dist/commonjs/models/completionerror.js +98 -0
- package/dist/commonjs/models/completionerror.js.map +1 -0
- package/dist/commonjs/models/completionfinishreason.d.ts +31 -0
- package/dist/commonjs/models/completionfinishreason.d.ts.map +1 -0
- package/dist/commonjs/models/completionfinishreason.js +61 -0
- package/dist/commonjs/models/completionfinishreason.js.map +1 -0
- package/dist/commonjs/models/completionlogprobs.d.ts +39 -0
- package/dist/commonjs/models/completionlogprobs.d.ts.map +1 -0
- package/dist/commonjs/models/completionlogprobs.js +88 -0
- package/dist/commonjs/models/completionlogprobs.js.map +1 -0
- package/dist/commonjs/models/completionresponse.d.ts +43 -0
- package/dist/commonjs/models/completionresponse.d.ts.map +1 -0
- package/dist/commonjs/models/completionresponse.js +92 -0
- package/dist/commonjs/models/completionresponse.js.map +1 -0
- package/dist/commonjs/models/completionstreamingchoice.d.ts +37 -0
- package/dist/commonjs/models/completionstreamingchoice.d.ts.map +1 -0
- package/dist/commonjs/models/completionstreamingchoice.js +86 -0
- package/dist/commonjs/models/completionstreamingchoice.js.map +1 -0
- package/dist/commonjs/models/completionstreamingresponsechunk.d.ts +68 -0
- package/dist/commonjs/models/completionstreamingresponsechunk.d.ts.map +1 -0
- package/dist/commonjs/models/completionstreamingresponsechunk.js +130 -0
- package/dist/commonjs/models/completionstreamingresponsechunk.js.map +1 -0
- package/dist/commonjs/models/completionusage.d.ts +33 -0
- package/dist/commonjs/models/completionusage.d.ts.map +1 -0
- package/dist/commonjs/models/completionusage.js +86 -0
- package/dist/commonjs/models/completionusage.js.map +1 -0
- package/dist/commonjs/models/errorresponse.d.ts +8 -38
- package/dist/commonjs/models/errorresponse.d.ts.map +1 -1
- package/dist/commonjs/models/errorresponse.js +14 -51
- package/dist/commonjs/models/errorresponse.js.map +1 -1
- package/dist/commonjs/models/errors/completionerror.d.ts +37 -0
- package/dist/commonjs/models/errors/completionerror.d.ts.map +1 -0
- package/dist/commonjs/models/errors/completionerror.js +85 -0
- package/dist/commonjs/models/errors/completionerror.js.map +1 -0
- package/dist/commonjs/models/errors/errorresponse.d.ts +46 -0
- package/dist/commonjs/models/errors/errorresponse.d.ts.map +1 -0
- package/dist/commonjs/models/errors/errorresponse.js +100 -0
- package/dist/commonjs/models/errors/errorresponse.js.map +1 -0
- package/dist/commonjs/models/errors/getproviders.d.ts +3 -3
- package/dist/commonjs/models/errors/getproviders.d.ts.map +1 -1
- package/dist/commonjs/models/errors/getproviders.js +2 -2
- package/dist/commonjs/models/errors/getproviders.js.map +1 -1
- package/dist/commonjs/models/errors/index.d.ts +2 -0
- package/dist/commonjs/models/errors/index.d.ts.map +1 -1
- package/dist/commonjs/models/errors/index.js +2 -0
- package/dist/commonjs/models/errors/index.js.map +1 -1
- package/dist/commonjs/models/index.d.ts +9 -0
- package/dist/commonjs/models/index.d.ts.map +1 -1
- package/dist/commonjs/models/index.js +9 -0
- package/dist/commonjs/models/index.js.map +1 -1
- package/dist/commonjs/models/operations/deletekeyshash.d.ts +3 -25
- package/dist/commonjs/models/operations/deletekeyshash.d.ts.map +1 -1
- package/dist/commonjs/models/operations/deletekeyshash.js +3 -33
- package/dist/commonjs/models/operations/deletekeyshash.js.map +1 -1
- package/dist/commonjs/models/operations/getactivity.d.ts +3 -24
- package/dist/commonjs/models/operations/getactivity.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getactivity.js +3 -32
- package/dist/commonjs/models/operations/getactivity.js.map +1 -1
- package/dist/commonjs/models/operations/getauthkey.d.ts +3 -25
- package/dist/commonjs/models/operations/getauthkey.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getauthkey.js +3 -33
- package/dist/commonjs/models/operations/getauthkey.js.map +1 -1
- package/dist/commonjs/models/operations/getcredits.d.ts +3 -25
- package/dist/commonjs/models/operations/getcredits.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getcredits.js +3 -33
- package/dist/commonjs/models/operations/getcredits.js.map +1 -1
- package/dist/commonjs/models/operations/getendpointszdr.d.ts +3 -25
- package/dist/commonjs/models/operations/getendpointszdr.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getendpointszdr.js +3 -33
- package/dist/commonjs/models/operations/getendpointszdr.js.map +1 -1
- package/dist/commonjs/models/operations/getgeneration.d.ts +3 -25
- package/dist/commonjs/models/operations/getgeneration.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getgeneration.js +3 -33
- package/dist/commonjs/models/operations/getgeneration.js.map +1 -1
- package/dist/commonjs/models/operations/getkey.d.ts +3 -25
- package/dist/commonjs/models/operations/getkey.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getkey.js +3 -33
- package/dist/commonjs/models/operations/getkey.js.map +1 -1
- package/dist/commonjs/models/operations/getkeys.d.ts +3 -25
- package/dist/commonjs/models/operations/getkeys.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getkeys.js +3 -33
- package/dist/commonjs/models/operations/getkeys.js.map +1 -1
- package/dist/commonjs/models/operations/getkeyshash.d.ts +3 -25
- package/dist/commonjs/models/operations/getkeyshash.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getkeyshash.js +3 -33
- package/dist/commonjs/models/operations/getkeyshash.js.map +1 -1
- package/dist/commonjs/models/operations/getmodels.d.ts +2 -3
- package/dist/commonjs/models/operations/getmodels.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getmodels.js +2 -11
- package/dist/commonjs/models/operations/getmodels.js.map +1 -1
- package/dist/commonjs/models/operations/getmodelsauthorslugendpoints.d.ts +3 -25
- package/dist/commonjs/models/operations/getmodelsauthorslugendpoints.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getmodelsauthorslugendpoints.js +3 -33
- package/dist/commonjs/models/operations/getmodelsauthorslugendpoints.js.map +1 -1
- package/dist/commonjs/models/operations/getmodelscount.d.ts +3 -25
- package/dist/commonjs/models/operations/getmodelscount.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getmodelscount.js +3 -33
- package/dist/commonjs/models/operations/getmodelscount.js.map +1 -1
- package/dist/commonjs/models/operations/getmodelsuser.d.ts +28 -25
- package/dist/commonjs/models/operations/getmodelsuser.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getmodelsuser.js +31 -34
- package/dist/commonjs/models/operations/getmodelsuser.js.map +1 -1
- package/dist/commonjs/models/operations/getparametersauthorslug.d.ts +28 -25
- package/dist/commonjs/models/operations/getparametersauthorslug.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getparametersauthorslug.js +30 -33
- package/dist/commonjs/models/operations/getparametersauthorslug.js.map +1 -1
- package/dist/commonjs/models/operations/getproviders.d.ts +13 -13
- package/dist/commonjs/models/operations/getproviders.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getproviders.js +16 -17
- package/dist/commonjs/models/operations/getproviders.js.map +1 -1
- package/dist/commonjs/models/operations/index.d.ts +4 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +4 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/patchkeyshash.d.ts +3 -25
- package/dist/commonjs/models/operations/patchkeyshash.d.ts.map +1 -1
- package/dist/commonjs/models/operations/patchkeyshash.js +3 -33
- package/dist/commonjs/models/operations/patchkeyshash.js.map +1 -1
- package/dist/commonjs/models/operations/postapialpharesponses.d.ts +11049 -0
- package/dist/commonjs/models/operations/postapialpharesponses.d.ts.map +1 -0
- package/dist/commonjs/models/operations/postapialpharesponses.js +11305 -0
- package/dist/commonjs/models/operations/postapialpharesponses.js.map +1 -0
- package/dist/commonjs/models/operations/postauthkeys.d.ts +110 -0
- package/dist/commonjs/models/operations/postauthkeys.d.ts.map +1 -0
- package/dist/commonjs/models/operations/postauthkeys.js +145 -0
- package/dist/commonjs/models/operations/postauthkeys.js.map +1 -0
- package/dist/commonjs/models/operations/postauthkeyscode.d.ts +145 -0
- package/dist/commonjs/models/operations/postauthkeyscode.d.ts.map +1 -0
- package/dist/commonjs/models/operations/postauthkeyscode.js +180 -0
- package/dist/commonjs/models/operations/postauthkeyscode.js.map +1 -0
- package/dist/commonjs/models/operations/postcompletions.d.ts +27 -0
- package/dist/commonjs/models/operations/postcompletions.d.ts.map +1 -0
- package/dist/commonjs/models/operations/postcompletions.js +80 -0
- package/dist/commonjs/models/operations/postcompletions.js.map +1 -0
- package/dist/commonjs/models/operations/postcreditscoinbase.d.ts +28 -25
- package/dist/commonjs/models/operations/postcreditscoinbase.d.ts.map +1 -1
- package/dist/commonjs/models/operations/postcreditscoinbase.js +30 -33
- package/dist/commonjs/models/operations/postcreditscoinbase.js.map +1 -1
- package/dist/commonjs/models/operations/postembeddings.d.ts +142 -164
- package/dist/commonjs/models/operations/postembeddings.d.ts.map +1 -1
- package/dist/commonjs/models/operations/postembeddings.js +192 -236
- package/dist/commonjs/models/operations/postembeddings.js.map +1 -1
- package/dist/commonjs/models/operations/postkeys.d.ts +3 -25
- package/dist/commonjs/models/operations/postkeys.d.ts.map +1 -1
- package/dist/commonjs/models/operations/postkeys.js +3 -33
- package/dist/commonjs/models/operations/postkeys.js.map +1 -1
- package/dist/commonjs/models/security.d.ts +0 -2
- package/dist/commonjs/models/security.d.ts.map +1 -1
- package/dist/commonjs/models/security.js +0 -2
- package/dist/commonjs/models/security.js.map +1 -1
- package/dist/commonjs/react-query/alphaResponsesSend2.d.ts +27 -0
- package/dist/commonjs/react-query/alphaResponsesSend2.d.ts.map +1 -0
- package/dist/commonjs/react-query/alphaResponsesSend2.js +50 -0
- package/dist/commonjs/react-query/alphaResponsesSend2.js.map +1 -0
- package/dist/commonjs/react-query/chatSend.d.ts +1 -1
- package/dist/commonjs/react-query/chatSend.d.ts.map +1 -1
- package/dist/commonjs/react-query/completionsGenerate.d.ts +28 -0
- package/dist/commonjs/react-query/completionsGenerate.d.ts.map +1 -0
- package/dist/commonjs/react-query/completionsGenerate.js +50 -0
- package/dist/commonjs/react-query/completionsGenerate.js.map +1 -0
- package/dist/commonjs/react-query/creditsGetCredits.d.ts +23 -0
- package/dist/commonjs/react-query/creditsGetCredits.d.ts.map +1 -0
- package/dist/commonjs/react-query/creditsGetCredits.js +69 -0
- package/dist/commonjs/react-query/creditsGetCredits.js.map +1 -0
- package/dist/commonjs/react-query/creditsPostCreditsCoinbase.d.ts +21 -0
- package/dist/commonjs/react-query/creditsPostCreditsCoinbase.d.ts.map +1 -0
- package/dist/commonjs/react-query/creditsPostCreditsCoinbase.js +44 -0
- package/dist/commonjs/react-query/creditsPostCreditsCoinbase.js.map +1 -0
- package/dist/commonjs/react-query/embeddingsGenerate.d.ts +23 -0
- package/dist/commonjs/react-query/embeddingsGenerate.d.ts.map +1 -0
- package/dist/commonjs/react-query/{embeddingsPostEmbeddings.js → embeddingsGenerate.js} +13 -13
- package/dist/commonjs/react-query/embeddingsGenerate.js.map +1 -0
- package/dist/commonjs/react-query/index.d.ts +9 -5
- package/dist/commonjs/react-query/index.d.ts.map +1 -1
- package/dist/commonjs/react-query/index.js +9 -5
- package/dist/commonjs/react-query/index.js.map +1 -1
- package/dist/commonjs/react-query/modelGetParametersAuthorSlug.d.ts +38 -0
- package/dist/commonjs/react-query/modelGetParametersAuthorSlug.d.ts.map +1 -0
- package/dist/commonjs/react-query/modelGetParametersAuthorSlug.js +88 -0
- package/dist/commonjs/react-query/modelGetParametersAuthorSlug.js.map +1 -0
- package/dist/commonjs/react-query/modelsGetModelsUser.d.ts +4 -4
- package/dist/commonjs/react-query/modelsGetModelsUser.d.ts.map +1 -1
- package/dist/commonjs/react-query/modelsGetModelsUser.js +8 -8
- package/dist/commonjs/react-query/modelsGetModelsUser.js.map +1 -1
- package/dist/commonjs/react-query/oAuthPostAuthKeys.d.ts +23 -0
- package/dist/commonjs/react-query/oAuthPostAuthKeys.d.ts.map +1 -0
- package/dist/commonjs/react-query/oAuthPostAuthKeys.js +47 -0
- package/dist/commonjs/react-query/oAuthPostAuthKeys.js.map +1 -0
- package/dist/commonjs/react-query/oAuthPostAuthKeysCode.d.ts +23 -0
- package/dist/commonjs/react-query/oAuthPostAuthKeysCode.d.ts.map +1 -0
- package/dist/commonjs/react-query/oAuthPostAuthKeysCode.js +47 -0
- package/dist/commonjs/react-query/oAuthPostAuthKeysCode.js.map +1 -0
- package/dist/commonjs/react-query/providersGetProviders.d.ts +23 -0
- package/dist/commonjs/react-query/providersGetProviders.d.ts.map +1 -0
- package/dist/commonjs/react-query/providersGetProviders.js +69 -0
- package/dist/commonjs/react-query/providersGetProviders.js.map +1 -0
- package/dist/commonjs/sdk/alpha.d.ts +7 -0
- package/dist/commonjs/sdk/alpha.d.ts.map +1 -0
- package/dist/commonjs/sdk/alpha.js +15 -0
- package/dist/commonjs/sdk/alpha.js.map +1 -0
- package/dist/commonjs/sdk/chat.d.ts +12 -1
- package/dist/commonjs/sdk/chat.d.ts.map +1 -1
- package/dist/commonjs/sdk/chat.js +0 -6
- package/dist/commonjs/sdk/chat.js.map +1 -1
- package/dist/commonjs/sdk/completions.d.ts +28 -0
- package/dist/commonjs/sdk/completions.d.ts.map +1 -0
- package/dist/commonjs/sdk/completions.js +18 -0
- package/dist/commonjs/sdk/completions.js.map +1 -0
- package/dist/commonjs/sdk/credits.d.ts +13 -0
- package/dist/commonjs/sdk/credits.d.ts.map +1 -0
- package/dist/commonjs/sdk/credits.js +26 -0
- package/dist/commonjs/sdk/credits.js.map +1 -0
- package/dist/commonjs/sdk/embeddings.d.ts +1 -1
- package/dist/commonjs/sdk/embeddings.d.ts.map +1 -1
- package/dist/commonjs/sdk/embeddings.js +3 -3
- package/dist/commonjs/sdk/embeddings.js.map +1 -1
- package/dist/commonjs/sdk/model.d.ts +9 -0
- package/dist/commonjs/sdk/model.d.ts.map +1 -0
- package/dist/commonjs/sdk/model.js +19 -0
- package/dist/commonjs/sdk/model.js.map +1 -0
- package/dist/commonjs/sdk/models.d.ts +1 -1
- package/dist/commonjs/sdk/models.d.ts.map +1 -1
- package/dist/commonjs/sdk/models.js +2 -2
- package/dist/commonjs/sdk/models.js.map +1 -1
- package/dist/commonjs/sdk/oauth.d.ts +19 -0
- package/dist/commonjs/sdk/oauth.d.ts.map +1 -0
- package/dist/commonjs/sdk/oauth.js +32 -0
- package/dist/commonjs/sdk/oauth.js.map +1 -0
- package/dist/commonjs/sdk/providers.d.ts +9 -0
- package/dist/commonjs/sdk/providers.d.ts.map +1 -0
- package/dist/commonjs/sdk/providers.js +19 -0
- package/dist/commonjs/sdk/providers.js.map +1 -0
- package/dist/commonjs/sdk/responses.d.ts +27 -0
- package/dist/commonjs/sdk/responses.d.ts.map +1 -0
- package/dist/commonjs/sdk/responses.js +18 -0
- package/dist/commonjs/sdk/responses.js.map +1 -0
- package/dist/commonjs/sdk/sdk.d.ts +19 -14
- package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
- package/dist/commonjs/sdk/sdk.js +22 -21
- package/dist/commonjs/sdk/sdk.js.map +1 -1
- package/dist/esm/funcs/alphaResponsesSend2.d.ts +35 -0
- package/dist/esm/funcs/alphaResponsesSend2.d.ts.map +1 -0
- package/dist/esm/funcs/alphaResponsesSend2.js +82 -0
- package/dist/esm/funcs/alphaResponsesSend2.js.map +1 -0
- package/dist/esm/funcs/analyticsGetActivity.d.ts +2 -1
- package/dist/esm/funcs/analyticsGetActivity.d.ts.map +1 -1
- package/dist/esm/funcs/analyticsGetActivity.js +8 -3
- package/dist/esm/funcs/analyticsGetActivity.js.map +1 -1
- package/dist/esm/funcs/apiKeysDeleteKeysHash.d.ts +2 -1
- package/dist/esm/funcs/apiKeysDeleteKeysHash.d.ts.map +1 -1
- package/dist/esm/funcs/apiKeysDeleteKeysHash.js +8 -3
- package/dist/esm/funcs/apiKeysDeleteKeysHash.js.map +1 -1
- package/dist/esm/funcs/apiKeysGetAuthKey.d.ts +2 -1
- package/dist/esm/funcs/apiKeysGetAuthKey.d.ts.map +1 -1
- package/dist/esm/funcs/apiKeysGetAuthKey.js +8 -3
- package/dist/esm/funcs/apiKeysGetAuthKey.js.map +1 -1
- package/dist/esm/funcs/apiKeysGetKey.d.ts +2 -1
- package/dist/esm/funcs/apiKeysGetKey.d.ts.map +1 -1
- package/dist/esm/funcs/apiKeysGetKey.js +8 -3
- package/dist/esm/funcs/apiKeysGetKey.js.map +1 -1
- package/dist/esm/funcs/apiKeysGetKeys.d.ts +2 -1
- package/dist/esm/funcs/apiKeysGetKeys.d.ts.map +1 -1
- package/dist/esm/funcs/apiKeysGetKeys.js +8 -3
- package/dist/esm/funcs/apiKeysGetKeys.js.map +1 -1
- package/dist/esm/funcs/apiKeysGetKeysHash.d.ts +2 -1
- package/dist/esm/funcs/apiKeysGetKeysHash.d.ts.map +1 -1
- package/dist/esm/funcs/apiKeysGetKeysHash.js +8 -3
- package/dist/esm/funcs/apiKeysGetKeysHash.js.map +1 -1
- package/dist/esm/funcs/apiKeysPatchKeysHash.d.ts +2 -1
- package/dist/esm/funcs/apiKeysPatchKeysHash.d.ts.map +1 -1
- package/dist/esm/funcs/apiKeysPatchKeysHash.js +8 -3
- package/dist/esm/funcs/apiKeysPatchKeysHash.js.map +1 -1
- package/dist/esm/funcs/apiKeysPostKeys.d.ts +2 -1
- package/dist/esm/funcs/apiKeysPostKeys.d.ts.map +1 -1
- package/dist/esm/funcs/apiKeysPostKeys.js +8 -3
- package/dist/esm/funcs/apiKeysPostKeys.js.map +1 -1
- package/dist/esm/funcs/chatSend.d.ts +12 -1
- package/dist/esm/funcs/chatSend.d.ts.map +1 -1
- package/dist/esm/funcs/chatSend.js +5 -12
- package/dist/esm/funcs/chatSend.js.map +1 -1
- package/dist/esm/funcs/completionsGenerate.d.ts +36 -0
- package/dist/esm/funcs/completionsGenerate.d.ts.map +1 -0
- package/dist/esm/funcs/completionsGenerate.js +83 -0
- package/dist/esm/funcs/completionsGenerate.js.map +1 -0
- package/dist/esm/funcs/{getCredits.d.ts → creditsGetCredits.d.ts} +3 -2
- package/dist/esm/funcs/creditsGetCredits.d.ts.map +1 -0
- package/dist/esm/funcs/{getCredits.js → creditsGetCredits.js} +10 -5
- package/dist/esm/funcs/creditsGetCredits.js.map +1 -0
- package/dist/esm/funcs/{postCreditsCoinbase.d.ts → creditsPostCreditsCoinbase.d.ts} +3 -2
- package/dist/esm/funcs/creditsPostCreditsCoinbase.d.ts.map +1 -0
- package/dist/esm/funcs/{postCreditsCoinbase.js → creditsPostCreditsCoinbase.js} +19 -10
- package/dist/esm/funcs/creditsPostCreditsCoinbase.js.map +1 -0
- package/dist/esm/funcs/{embeddingsPostEmbeddings.d.ts → embeddingsGenerate.d.ts} +3 -2
- package/dist/esm/funcs/embeddingsGenerate.d.ts.map +1 -0
- package/dist/esm/funcs/{embeddingsPostEmbeddings.js → embeddingsGenerate.js} +10 -5
- package/dist/esm/funcs/embeddingsGenerate.js.map +1 -0
- package/dist/esm/funcs/endpointsGetEndpointsZdr.d.ts +2 -1
- package/dist/esm/funcs/endpointsGetEndpointsZdr.d.ts.map +1 -1
- package/dist/esm/funcs/endpointsGetEndpointsZdr.js +8 -3
- package/dist/esm/funcs/endpointsGetEndpointsZdr.js.map +1 -1
- package/dist/esm/funcs/endpointsGetModelsAuthorSlugEndpoints.d.ts +2 -1
- package/dist/esm/funcs/endpointsGetModelsAuthorSlugEndpoints.d.ts.map +1 -1
- package/dist/esm/funcs/endpointsGetModelsAuthorSlugEndpoints.js +8 -3
- package/dist/esm/funcs/endpointsGetModelsAuthorSlugEndpoints.js.map +1 -1
- package/dist/esm/funcs/generationsGetGeneration.d.ts +2 -1
- package/dist/esm/funcs/generationsGetGeneration.d.ts.map +1 -1
- package/dist/esm/funcs/generationsGetGeneration.js +8 -3
- package/dist/esm/funcs/generationsGetGeneration.js.map +1 -1
- package/dist/{commonjs/funcs/parametersGetParametersAuthorSlug.d.ts → esm/funcs/modelGetParametersAuthorSlug.d.ts} +3 -2
- package/dist/esm/funcs/modelGetParametersAuthorSlug.d.ts.map +1 -0
- package/dist/esm/funcs/{parametersGetParametersAuthorSlug.js → modelGetParametersAuthorSlug.js} +19 -10
- package/dist/esm/funcs/modelGetParametersAuthorSlug.js.map +1 -0
- package/dist/esm/funcs/modelsGetModels.d.ts +2 -1
- package/dist/esm/funcs/modelsGetModels.d.ts.map +1 -1
- package/dist/esm/funcs/modelsGetModels.js +8 -3
- package/dist/esm/funcs/modelsGetModels.js.map +1 -1
- package/dist/esm/funcs/modelsGetModelsCount.d.ts +2 -1
- package/dist/esm/funcs/modelsGetModelsCount.d.ts.map +1 -1
- package/dist/esm/funcs/modelsGetModelsCount.js +8 -3
- package/dist/esm/funcs/modelsGetModelsCount.js.map +1 -1
- package/dist/esm/funcs/modelsGetModelsUser.d.ts +2 -1
- package/dist/esm/funcs/modelsGetModelsUser.d.ts.map +1 -1
- package/dist/esm/funcs/modelsGetModelsUser.js +18 -9
- package/dist/esm/funcs/modelsGetModelsUser.js.map +1 -1
- package/dist/esm/funcs/oAuthPostAuthKeys.d.ts +18 -0
- package/dist/esm/funcs/oAuthPostAuthKeys.d.ts.map +1 -0
- package/dist/esm/funcs/oAuthPostAuthKeys.js +84 -0
- package/dist/esm/funcs/oAuthPostAuthKeys.js.map +1 -0
- package/dist/esm/funcs/oAuthPostAuthKeysCode.d.ts +18 -0
- package/dist/esm/funcs/oAuthPostAuthKeysCode.d.ts.map +1 -0
- package/dist/esm/funcs/oAuthPostAuthKeysCode.js +84 -0
- package/dist/esm/funcs/oAuthPostAuthKeysCode.js.map +1 -0
- package/dist/{commonjs/funcs/getProviders.d.ts → esm/funcs/providersGetProviders.d.ts} +5 -2
- package/dist/esm/funcs/providersGetProviders.d.ts.map +1 -0
- package/dist/esm/funcs/{getProviders.js → providersGetProviders.js} +8 -4
- package/dist/esm/funcs/providersGetProviders.js.map +1 -0
- package/dist/esm/lib/config.d.ts +4 -8
- package/dist/esm/lib/config.d.ts.map +1 -1
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/lib/config.js.map +1 -1
- package/dist/esm/lib/env.d.ts +0 -1
- package/dist/esm/lib/env.d.ts.map +1 -1
- package/dist/esm/lib/env.js +0 -1
- package/dist/esm/lib/env.js.map +1 -1
- package/dist/esm/lib/security.d.ts.map +1 -1
- package/dist/esm/lib/security.js +1 -7
- package/dist/esm/lib/security.js.map +1 -1
- package/dist/esm/models/chaterror.d.ts +23 -2
- package/dist/esm/models/chaterror.d.ts.map +1 -1
- package/dist/esm/models/chaterror.js +23 -2
- package/dist/esm/models/chaterror.js.map +1 -1
- package/dist/esm/models/chatgenerationparams.d.ts +108 -108
- package/dist/esm/models/chatgenerationparams.d.ts.map +1 -1
- package/dist/esm/models/chatgenerationparams.js +126 -127
- package/dist/esm/models/chatgenerationparams.js.map +1 -1
- package/dist/esm/models/chatresponse.d.ts +2 -2
- package/dist/esm/models/chatresponse.d.ts.map +1 -1
- package/dist/esm/models/chatresponse.js +2 -2
- package/dist/esm/models/chatresponse.js.map +1 -1
- package/dist/esm/models/chatstreamingresponsechunk.d.ts +17 -17
- package/dist/esm/models/chatstreamingresponsechunk.d.ts.map +1 -1
- package/dist/esm/models/chatstreamingresponsechunk.js +18 -20
- package/dist/esm/models/chatstreamingresponsechunk.js.map +1 -1
- package/dist/esm/models/completionchoice.d.ts +37 -0
- package/dist/esm/models/completionchoice.d.ts.map +1 -0
- package/dist/esm/models/completionchoice.js +48 -0
- package/dist/esm/models/completionchoice.js.map +1 -0
- package/dist/esm/models/completioncreateparams.d.ts +327 -0
- package/dist/esm/models/completioncreateparams.d.ts.map +1 -0
- package/dist/esm/models/completioncreateparams.js +403 -0
- package/dist/esm/models/completioncreateparams.js.map +1 -0
- package/dist/esm/models/completionerror.d.ts +56 -0
- package/dist/esm/models/completionerror.d.ts.map +1 -0
- package/dist/esm/models/completionerror.js +58 -0
- package/dist/esm/models/completionerror.js.map +1 -0
- package/dist/esm/models/completionfinishreason.d.ts +31 -0
- package/dist/esm/models/completionfinishreason.d.ts.map +1 -0
- package/dist/esm/models/completionfinishreason.js +25 -0
- package/dist/esm/models/completionfinishreason.js.map +1 -0
- package/dist/esm/models/completionlogprobs.d.ts +39 -0
- package/dist/esm/models/completionlogprobs.d.ts.map +1 -0
- package/dist/esm/models/completionlogprobs.js +50 -0
- package/dist/esm/models/completionlogprobs.js.map +1 -0
- package/dist/esm/models/completionresponse.d.ts +43 -0
- package/dist/esm/models/completionresponse.d.ts.map +1 -0
- package/dist/esm/models/completionresponse.js +54 -0
- package/dist/esm/models/completionresponse.js.map +1 -0
- package/dist/esm/models/completionstreamingchoice.d.ts +37 -0
- package/dist/esm/models/completionstreamingchoice.d.ts.map +1 -0
- package/dist/esm/models/completionstreamingchoice.js +48 -0
- package/dist/esm/models/completionstreamingchoice.js.map +1 -0
- package/dist/esm/models/completionstreamingresponsechunk.d.ts +68 -0
- package/dist/esm/models/completionstreamingresponsechunk.d.ts.map +1 -0
- package/dist/esm/models/completionstreamingresponsechunk.js +90 -0
- package/dist/esm/models/completionstreamingresponsechunk.js.map +1 -0
- package/dist/esm/models/completionusage.d.ts +33 -0
- package/dist/esm/models/completionusage.d.ts.map +1 -0
- package/dist/esm/models/completionusage.js +48 -0
- package/dist/esm/models/completionusage.js.map +1 -0
- package/dist/esm/models/errorresponse.d.ts +8 -38
- package/dist/esm/models/errorresponse.d.ts.map +1 -1
- package/dist/esm/models/errorresponse.js +13 -48
- package/dist/esm/models/errorresponse.js.map +1 -1
- package/dist/esm/models/errors/completionerror.d.ts +37 -0
- package/dist/esm/models/errors/completionerror.d.ts.map +1 -0
- package/dist/esm/models/errors/completionerror.js +48 -0
- package/dist/esm/models/errors/completionerror.js.map +1 -0
- package/dist/esm/models/errors/errorresponse.d.ts +46 -0
- package/dist/esm/models/errors/errorresponse.d.ts.map +1 -0
- package/dist/esm/models/errors/errorresponse.js +63 -0
- package/dist/esm/models/errors/errorresponse.js.map +1 -0
- package/dist/esm/models/errors/getproviders.d.ts +3 -3
- package/dist/esm/models/errors/getproviders.d.ts.map +1 -1
- package/dist/esm/models/errors/getproviders.js +2 -2
- package/dist/esm/models/errors/getproviders.js.map +1 -1
- package/dist/esm/models/errors/index.d.ts +2 -0
- package/dist/esm/models/errors/index.d.ts.map +1 -1
- package/dist/esm/models/errors/index.js +2 -0
- package/dist/esm/models/errors/index.js.map +1 -1
- package/dist/esm/models/index.d.ts +9 -0
- package/dist/esm/models/index.d.ts.map +1 -1
- package/dist/esm/models/index.js +9 -0
- package/dist/esm/models/index.js.map +1 -1
- package/dist/esm/models/operations/deletekeyshash.d.ts +3 -25
- package/dist/esm/models/operations/deletekeyshash.d.ts.map +1 -1
- package/dist/esm/models/operations/deletekeyshash.js +2 -30
- package/dist/esm/models/operations/deletekeyshash.js.map +1 -1
- package/dist/esm/models/operations/getactivity.d.ts +3 -24
- package/dist/esm/models/operations/getactivity.d.ts.map +1 -1
- package/dist/esm/models/operations/getactivity.js +2 -29
- package/dist/esm/models/operations/getactivity.js.map +1 -1
- package/dist/esm/models/operations/getauthkey.d.ts +3 -25
- package/dist/esm/models/operations/getauthkey.d.ts.map +1 -1
- package/dist/esm/models/operations/getauthkey.js +2 -30
- package/dist/esm/models/operations/getauthkey.js.map +1 -1
- package/dist/esm/models/operations/getcredits.d.ts +3 -25
- package/dist/esm/models/operations/getcredits.d.ts.map +1 -1
- package/dist/esm/models/operations/getcredits.js +2 -30
- package/dist/esm/models/operations/getcredits.js.map +1 -1
- package/dist/esm/models/operations/getendpointszdr.d.ts +3 -25
- package/dist/esm/models/operations/getendpointszdr.d.ts.map +1 -1
- package/dist/esm/models/operations/getendpointszdr.js +2 -30
- package/dist/esm/models/operations/getendpointszdr.js.map +1 -1
- package/dist/esm/models/operations/getgeneration.d.ts +3 -25
- package/dist/esm/models/operations/getgeneration.d.ts.map +1 -1
- package/dist/esm/models/operations/getgeneration.js +2 -30
- package/dist/esm/models/operations/getgeneration.js.map +1 -1
- package/dist/esm/models/operations/getkey.d.ts +3 -25
- package/dist/esm/models/operations/getkey.d.ts.map +1 -1
- package/dist/esm/models/operations/getkey.js +2 -30
- package/dist/esm/models/operations/getkey.js.map +1 -1
- package/dist/esm/models/operations/getkeys.d.ts +3 -25
- package/dist/esm/models/operations/getkeys.d.ts.map +1 -1
- package/dist/esm/models/operations/getkeys.js +2 -30
- package/dist/esm/models/operations/getkeys.js.map +1 -1
- package/dist/esm/models/operations/getkeyshash.d.ts +3 -25
- package/dist/esm/models/operations/getkeyshash.d.ts.map +1 -1
- package/dist/esm/models/operations/getkeyshash.js +2 -30
- package/dist/esm/models/operations/getkeyshash.js.map +1 -1
- package/dist/esm/models/operations/getmodels.d.ts +2 -3
- package/dist/esm/models/operations/getmodels.d.ts.map +1 -1
- package/dist/esm/models/operations/getmodels.js +2 -11
- package/dist/esm/models/operations/getmodels.js.map +1 -1
- package/dist/esm/models/operations/getmodelsauthorslugendpoints.d.ts +3 -25
- package/dist/esm/models/operations/getmodelsauthorslugendpoints.d.ts.map +1 -1
- package/dist/esm/models/operations/getmodelsauthorslugendpoints.js +2 -30
- package/dist/esm/models/operations/getmodelsauthorslugendpoints.js.map +1 -1
- package/dist/esm/models/operations/getmodelscount.d.ts +3 -25
- package/dist/esm/models/operations/getmodelscount.d.ts.map +1 -1
- package/dist/esm/models/operations/getmodelscount.js +2 -30
- package/dist/esm/models/operations/getmodelscount.js.map +1 -1
- package/dist/esm/models/operations/getmodelsuser.d.ts +28 -25
- package/dist/esm/models/operations/getmodelsuser.d.ts.map +1 -1
- package/dist/esm/models/operations/getmodelsuser.js +27 -30
- package/dist/esm/models/operations/getmodelsuser.js.map +1 -1
- package/dist/esm/models/operations/getparametersauthorslug.d.ts +28 -25
- package/dist/esm/models/operations/getparametersauthorslug.d.ts.map +1 -1
- package/dist/esm/models/operations/getparametersauthorslug.js +27 -30
- package/dist/esm/models/operations/getparametersauthorslug.js.map +1 -1
- package/dist/esm/models/operations/getproviders.d.ts +13 -13
- package/dist/esm/models/operations/getproviders.d.ts.map +1 -1
- package/dist/esm/models/operations/getproviders.js +13 -14
- package/dist/esm/models/operations/getproviders.js.map +1 -1
- package/dist/esm/models/operations/index.d.ts +4 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +4 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/patchkeyshash.d.ts +3 -25
- package/dist/esm/models/operations/patchkeyshash.d.ts.map +1 -1
- package/dist/esm/models/operations/patchkeyshash.js +2 -30
- package/dist/esm/models/operations/patchkeyshash.js.map +1 -1
- package/dist/esm/models/operations/postapialpharesponses.d.ts +11049 -0
- package/dist/esm/models/operations/postapialpharesponses.d.ts.map +1 -0
- package/dist/esm/models/operations/postapialpharesponses.js +10873 -0
- package/dist/esm/models/operations/postapialpharesponses.js.map +1 -0
- package/dist/esm/models/operations/postauthkeys.d.ts +110 -0
- package/dist/esm/models/operations/postauthkeys.d.ts.map +1 -0
- package/dist/esm/models/operations/postauthkeys.js +105 -0
- package/dist/esm/models/operations/postauthkeys.js.map +1 -0
- package/dist/esm/models/operations/postauthkeyscode.d.ts +145 -0
- package/dist/esm/models/operations/postauthkeyscode.d.ts.map +1 -0
- package/dist/esm/models/operations/postauthkeyscode.js +138 -0
- package/dist/esm/models/operations/postauthkeyscode.js.map +1 -0
- package/dist/esm/models/operations/postcompletions.d.ts +27 -0
- package/dist/esm/models/operations/postcompletions.d.ts.map +1 -0
- package/dist/esm/models/operations/postcompletions.js +42 -0
- package/dist/esm/models/operations/postcompletions.js.map +1 -0
- package/dist/esm/models/operations/postcreditscoinbase.d.ts +28 -25
- package/dist/esm/models/operations/postcreditscoinbase.d.ts.map +1 -1
- package/dist/esm/models/operations/postcreditscoinbase.js +27 -30
- package/dist/esm/models/operations/postcreditscoinbase.js.map +1 -1
- package/dist/esm/models/operations/postembeddings.d.ts +142 -164
- package/dist/esm/models/operations/postembeddings.d.ts.map +1 -1
- package/dist/esm/models/operations/postembeddings.js +184 -226
- package/dist/esm/models/operations/postembeddings.js.map +1 -1
- package/dist/esm/models/operations/postkeys.d.ts +3 -25
- package/dist/esm/models/operations/postkeys.d.ts.map +1 -1
- package/dist/esm/models/operations/postkeys.js +2 -30
- package/dist/esm/models/operations/postkeys.js.map +1 -1
- package/dist/esm/models/security.d.ts +0 -2
- package/dist/esm/models/security.d.ts.map +1 -1
- package/dist/esm/models/security.js +0 -2
- package/dist/esm/models/security.js.map +1 -1
- package/dist/esm/react-query/alphaResponsesSend2.d.ts +27 -0
- package/dist/esm/react-query/alphaResponsesSend2.d.ts.map +1 -0
- package/dist/esm/react-query/alphaResponsesSend2.js +43 -0
- package/dist/esm/react-query/alphaResponsesSend2.js.map +1 -0
- package/dist/esm/react-query/chatSend.d.ts +1 -1
- package/dist/esm/react-query/chatSend.d.ts.map +1 -1
- package/dist/esm/react-query/completionsGenerate.d.ts +28 -0
- package/dist/esm/react-query/completionsGenerate.d.ts.map +1 -0
- package/dist/esm/react-query/completionsGenerate.js +43 -0
- package/dist/esm/react-query/completionsGenerate.js.map +1 -0
- package/dist/esm/react-query/creditsGetCredits.d.ts +23 -0
- package/dist/esm/react-query/creditsGetCredits.d.ts.map +1 -0
- package/dist/esm/react-query/{getCredits.js → creditsGetCredits.js} +18 -18
- package/dist/esm/react-query/creditsGetCredits.js.map +1 -0
- package/dist/esm/react-query/creditsPostCreditsCoinbase.d.ts +21 -0
- package/dist/esm/react-query/creditsPostCreditsCoinbase.d.ts.map +1 -0
- package/dist/esm/react-query/{postCreditsCoinbase.js → creditsPostCreditsCoinbase.js} +10 -10
- package/dist/esm/react-query/creditsPostCreditsCoinbase.js.map +1 -0
- package/dist/esm/react-query/embeddingsGenerate.d.ts +23 -0
- package/dist/esm/react-query/embeddingsGenerate.d.ts.map +1 -0
- package/dist/esm/react-query/{embeddingsPostEmbeddings.js → embeddingsGenerate.js} +10 -10
- package/dist/esm/react-query/embeddingsGenerate.js.map +1 -0
- package/dist/esm/react-query/index.d.ts +9 -5
- package/dist/esm/react-query/index.d.ts.map +1 -1
- package/dist/esm/react-query/index.js +9 -5
- package/dist/esm/react-query/index.js.map +1 -1
- package/dist/esm/react-query/modelGetParametersAuthorSlug.d.ts +38 -0
- package/dist/esm/react-query/modelGetParametersAuthorSlug.d.ts.map +1 -0
- package/dist/esm/react-query/modelGetParametersAuthorSlug.js +78 -0
- package/dist/esm/react-query/modelGetParametersAuthorSlug.js.map +1 -0
- package/dist/esm/react-query/modelsGetModelsUser.d.ts +4 -4
- package/dist/esm/react-query/modelsGetModelsUser.d.ts.map +1 -1
- package/dist/esm/react-query/modelsGetModelsUser.js +8 -8
- package/dist/esm/react-query/modelsGetModelsUser.js.map +1 -1
- package/dist/esm/react-query/oAuthPostAuthKeys.d.ts +23 -0
- package/dist/esm/react-query/oAuthPostAuthKeys.d.ts.map +1 -0
- package/dist/esm/react-query/oAuthPostAuthKeys.js +42 -0
- package/dist/esm/react-query/oAuthPostAuthKeys.js.map +1 -0
- package/dist/esm/react-query/oAuthPostAuthKeysCode.d.ts +23 -0
- package/dist/esm/react-query/oAuthPostAuthKeysCode.d.ts.map +1 -0
- package/dist/esm/react-query/oAuthPostAuthKeysCode.js +42 -0
- package/dist/esm/react-query/oAuthPostAuthKeysCode.js.map +1 -0
- package/dist/esm/react-query/providersGetProviders.d.ts +23 -0
- package/dist/esm/react-query/providersGetProviders.d.ts.map +1 -0
- package/dist/esm/react-query/providersGetProviders.js +60 -0
- package/dist/esm/react-query/providersGetProviders.js.map +1 -0
- package/dist/esm/sdk/alpha.d.ts +7 -0
- package/dist/esm/sdk/alpha.d.ts.map +1 -0
- package/dist/esm/sdk/alpha.js +11 -0
- package/dist/esm/sdk/alpha.js.map +1 -0
- package/dist/esm/sdk/chat.d.ts +12 -1
- package/dist/esm/sdk/chat.d.ts.map +1 -1
- package/dist/esm/sdk/chat.js +0 -6
- package/dist/esm/sdk/chat.js.map +1 -1
- package/dist/esm/sdk/completions.d.ts +28 -0
- package/dist/esm/sdk/completions.d.ts.map +1 -0
- package/dist/esm/sdk/completions.js +13 -0
- package/dist/esm/sdk/completions.js.map +1 -0
- package/dist/esm/sdk/credits.d.ts +13 -0
- package/dist/esm/sdk/credits.d.ts.map +1 -0
- package/dist/esm/sdk/credits.js +22 -0
- package/dist/esm/sdk/credits.js.map +1 -0
- package/dist/esm/sdk/embeddings.d.ts +1 -1
- package/dist/esm/sdk/embeddings.d.ts.map +1 -1
- package/dist/esm/sdk/embeddings.js +3 -3
- package/dist/esm/sdk/embeddings.js.map +1 -1
- package/dist/esm/sdk/model.d.ts +9 -0
- package/dist/esm/sdk/model.d.ts.map +1 -0
- package/dist/esm/sdk/model.js +15 -0
- package/dist/esm/sdk/model.js.map +1 -0
- package/dist/esm/sdk/models.d.ts +1 -1
- package/dist/esm/sdk/models.d.ts.map +1 -1
- package/dist/esm/sdk/models.js +2 -2
- package/dist/esm/sdk/models.js.map +1 -1
- package/dist/esm/sdk/oauth.d.ts +19 -0
- package/dist/esm/sdk/oauth.d.ts.map +1 -0
- package/dist/esm/sdk/oauth.js +28 -0
- package/dist/esm/sdk/oauth.js.map +1 -0
- package/dist/esm/sdk/providers.d.ts +9 -0
- package/dist/esm/sdk/providers.d.ts.map +1 -0
- package/dist/esm/sdk/providers.js +15 -0
- package/dist/esm/sdk/providers.js.map +1 -0
- package/dist/esm/sdk/responses.d.ts +27 -0
- package/dist/esm/sdk/responses.d.ts.map +1 -0
- package/dist/esm/sdk/responses.js +13 -0
- package/dist/esm/sdk/responses.js.map +1 -0
- package/dist/esm/sdk/sdk.d.ts +19 -14
- package/dist/esm/sdk/sdk.d.ts.map +1 -1
- package/dist/esm/sdk/sdk.js +22 -21
- package/dist/esm/sdk/sdk.js.map +1 -1
- package/docs/sdks/alpha/README.md +6 -0
- package/docs/sdks/analytics/README.md +6 -9
- package/docs/sdks/apikeys/README.md +42 -63
- package/docs/sdks/chat/README.md +10 -8
- package/docs/sdks/completions/README.md +102 -0
- package/docs/sdks/credits/README.md +193 -0
- package/docs/sdks/embeddings/README.md +14 -17
- package/docs/sdks/endpoints/README.md +12 -18
- package/docs/sdks/generations/README.md +6 -9
- package/docs/sdks/{parameters → model}/README.md +23 -25
- package/docs/sdks/models/README.md +25 -33
- package/docs/sdks/oauth/README.md +201 -0
- package/docs/sdks/openrouter/README.md +1 -292
- package/docs/sdks/providers/README.md +104 -0
- package/docs/sdks/responses/README.md +103 -0
- package/examples/{getCredits.example.ts → alphaResponsesSend2.example.ts} +7 -5
- package/examples/chatCompletions.example.ts +93 -0
- package/jsr.json +1 -1
- package/package.json +5 -1
- package/src/funcs/alphaResponsesSend2.ts +231 -0
- package/src/funcs/analyticsGetActivity.ts +14 -6
- package/src/funcs/apiKeysDeleteKeysHash.ts +14 -6
- package/src/funcs/apiKeysGetAuthKey.ts +14 -6
- package/src/funcs/apiKeysGetKey.ts +14 -6
- package/src/funcs/apiKeysGetKeys.ts +14 -6
- package/src/funcs/apiKeysGetKeysHash.ts +14 -6
- package/src/funcs/apiKeysPatchKeysHash.ts +14 -6
- package/src/funcs/apiKeysPostKeys.ts +14 -6
- package/src/funcs/chatSend.ts +62 -9
- package/src/funcs/completionsGenerate.ts +233 -0
- package/src/funcs/{getCredits.ts → creditsGetCredits.ts} +14 -6
- package/src/funcs/{postCreditsCoinbase.ts → creditsPostCreditsCoinbase.ts} +27 -10
- package/src/funcs/{embeddingsPostEmbeddings.ts → embeddingsGenerate.ts} +15 -7
- package/src/funcs/endpointsGetEndpointsZdr.ts +14 -6
- package/src/funcs/endpointsGetModelsAuthorSlugEndpoints.ts +14 -9
- package/src/funcs/generationsGetGeneration.ts +14 -6
- package/src/funcs/{parametersGetParametersAuthorSlug.ts → modelGetParametersAuthorSlug.ts} +27 -10
- package/src/funcs/modelsGetModels.ts +14 -6
- package/src/funcs/modelsGetModelsCount.ts +14 -6
- package/src/funcs/modelsGetModelsUser.ts +26 -9
- package/src/funcs/oAuthPostAuthKeys.ts +171 -0
- package/src/funcs/oAuthPostAuthKeysCode.ts +171 -0
- package/src/funcs/{getProviders.ts → providersGetProviders.ts} +7 -3
- package/src/lib/config.ts +4 -8
- package/src/lib/env.ts +0 -2
- package/src/lib/security.ts +1 -8
- package/src/models/chaterror.ts +50 -4
- package/src/models/chatgenerationparams.ts +335 -249
- package/src/models/chatresponse.ts +4 -4
- package/src/models/chatstreamingresponsechunk.ts +62 -51
- package/src/models/completionchoice.ts +98 -0
- package/src/models/completioncreateparams.ts +912 -0
- package/src/models/completionerror.ts +128 -0
- package/src/models/completionfinishreason.ts +34 -0
- package/src/models/completionlogprobs.ts +91 -0
- package/src/models/completionresponse.ts +111 -0
- package/src/models/completionstreamingchoice.ts +98 -0
- package/src/models/completionstreamingresponsechunk.ts +186 -0
- package/src/models/completionusage.ts +85 -0
- package/src/models/errorresponse.ts +14 -85
- package/src/models/errors/completionerror.ts +79 -0
- package/src/models/errors/errorresponse.ts +102 -0
- package/src/models/errors/getproviders.ts +5 -5
- package/src/models/errors/index.ts +2 -0
- package/src/models/index.ts +9 -0
- package/src/models/operations/deletekeyshash.ts +7 -68
- package/src/models/operations/getactivity.ts +7 -67
- package/src/models/operations/getauthkey.ts +7 -66
- package/src/models/operations/getcredits.ts +7 -66
- package/src/models/operations/getendpointszdr.ts +7 -70
- package/src/models/operations/getgeneration.ts +7 -68
- package/src/models/operations/getkey.ts +7 -66
- package/src/models/operations/getkeys.ts +7 -66
- package/src/models/operations/getkeyshash.ts +7 -68
- package/src/models/operations/getmodels.ts +3 -16
- package/src/models/operations/getmodelsauthorslugendpoints.ts +7 -79
- package/src/models/operations/getmodelscount.ts +7 -68
- package/src/models/operations/getmodelsuser.ts +64 -67
- package/src/models/operations/getparametersauthorslug.ts +66 -72
- package/src/models/operations/getproviders.ts +30 -23
- package/src/models/operations/index.ts +4 -0
- package/src/models/operations/patchkeyshash.ts +7 -68
- package/src/models/operations/postapialpharesponses.ts +20393 -0
- package/src/models/operations/postauthkeys.ts +211 -0
- package/src/models/operations/postauthkeyscode.ts +289 -0
- package/src/models/operations/postcompletions.ts +78 -0
- package/src/models/operations/postcreditscoinbase.ts +66 -69
- package/src/models/operations/postembeddings.ts +339 -328
- package/src/models/operations/postkeys.ts +7 -66
- package/src/models/security.ts +0 -4
- package/src/react-query/alphaResponsesSend2.ts +94 -0
- package/src/react-query/chatSend.ts +1 -1
- package/src/react-query/completionsGenerate.ts +95 -0
- package/src/react-query/{getCredits.ts → creditsGetCredits.ts} +29 -27
- package/src/react-query/{postCreditsCoinbase.ts → creditsPostCreditsCoinbase.ts} +21 -18
- package/src/react-query/{embeddingsPostEmbeddings.ts → embeddingsGenerate.ts} +18 -19
- package/src/react-query/index.ts +9 -5
- package/src/react-query/{parametersGetParametersAuthorSlug.ts → modelGetParametersAuthorSlug.ts} +37 -34
- package/src/react-query/modelsGetModelsUser.ts +8 -0
- package/src/react-query/oAuthPostAuthKeys.ts +88 -0
- package/src/react-query/oAuthPostAuthKeysCode.ts +89 -0
- package/src/react-query/{getProviders.ts → providersGetProviders.ts} +35 -27
- package/src/sdk/alpha.ts +13 -0
- package/src/sdk/chat.ts +14 -1
- package/src/sdk/completions.ts +46 -0
- package/src/sdk/credits.ts +39 -0
- package/src/sdk/embeddings.ts +3 -3
- package/src/sdk/{parameters.ts → model.ts} +5 -3
- package/src/sdk/models.ts +2 -0
- package/src/sdk/oauth.ts +45 -0
- package/src/sdk/providers.ts +22 -0
- package/src/sdk/responses.ts +47 -0
- package/src/sdk/sdk.ts +33 -43
- package/dist/commonjs/funcs/embeddingsPostEmbeddings.d.ts.map +0 -1
- package/dist/commonjs/funcs/embeddingsPostEmbeddings.js.map +0 -1
- package/dist/commonjs/funcs/getCredits.d.ts.map +0 -1
- package/dist/commonjs/funcs/getCredits.js.map +0 -1
- package/dist/commonjs/funcs/getProviders.d.ts.map +0 -1
- package/dist/commonjs/funcs/getProviders.js.map +0 -1
- package/dist/commonjs/funcs/parametersGetParametersAuthorSlug.d.ts.map +0 -1
- package/dist/commonjs/funcs/parametersGetParametersAuthorSlug.js.map +0 -1
- package/dist/commonjs/funcs/postCreditsCoinbase.d.ts.map +0 -1
- package/dist/commonjs/funcs/postCreditsCoinbase.js.map +0 -1
- package/dist/commonjs/react-query/embeddingsPostEmbeddings.d.ts +0 -23
- package/dist/commonjs/react-query/embeddingsPostEmbeddings.d.ts.map +0 -1
- package/dist/commonjs/react-query/embeddingsPostEmbeddings.js.map +0 -1
- package/dist/commonjs/react-query/getCredits.d.ts +0 -23
- package/dist/commonjs/react-query/getCredits.d.ts.map +0 -1
- package/dist/commonjs/react-query/getCredits.js +0 -69
- package/dist/commonjs/react-query/getCredits.js.map +0 -1
- package/dist/commonjs/react-query/getProviders.d.ts +0 -17
- package/dist/commonjs/react-query/getProviders.d.ts.map +0 -1
- package/dist/commonjs/react-query/getProviders.js +0 -63
- package/dist/commonjs/react-query/getProviders.js.map +0 -1
- package/dist/commonjs/react-query/parametersGetParametersAuthorSlug.d.ts +0 -38
- package/dist/commonjs/react-query/parametersGetParametersAuthorSlug.d.ts.map +0 -1
- package/dist/commonjs/react-query/parametersGetParametersAuthorSlug.js +0 -88
- package/dist/commonjs/react-query/parametersGetParametersAuthorSlug.js.map +0 -1
- package/dist/commonjs/react-query/postCreditsCoinbase.d.ts +0 -20
- package/dist/commonjs/react-query/postCreditsCoinbase.d.ts.map +0 -1
- package/dist/commonjs/react-query/postCreditsCoinbase.js +0 -44
- package/dist/commonjs/react-query/postCreditsCoinbase.js.map +0 -1
- package/dist/commonjs/sdk/parameters.d.ts +0 -9
- package/dist/commonjs/sdk/parameters.d.ts.map +0 -1
- package/dist/commonjs/sdk/parameters.js +0 -19
- package/dist/commonjs/sdk/parameters.js.map +0 -1
- package/dist/esm/funcs/embeddingsPostEmbeddings.d.ts.map +0 -1
- package/dist/esm/funcs/embeddingsPostEmbeddings.js.map +0 -1
- package/dist/esm/funcs/getCredits.d.ts.map +0 -1
- package/dist/esm/funcs/getCredits.js.map +0 -1
- package/dist/esm/funcs/getProviders.d.ts.map +0 -1
- package/dist/esm/funcs/getProviders.js.map +0 -1
- package/dist/esm/funcs/parametersGetParametersAuthorSlug.d.ts.map +0 -1
- package/dist/esm/funcs/parametersGetParametersAuthorSlug.js.map +0 -1
- package/dist/esm/funcs/postCreditsCoinbase.d.ts.map +0 -1
- package/dist/esm/funcs/postCreditsCoinbase.js.map +0 -1
- package/dist/esm/react-query/embeddingsPostEmbeddings.d.ts +0 -23
- package/dist/esm/react-query/embeddingsPostEmbeddings.d.ts.map +0 -1
- package/dist/esm/react-query/embeddingsPostEmbeddings.js.map +0 -1
- package/dist/esm/react-query/getCredits.d.ts +0 -23
- package/dist/esm/react-query/getCredits.d.ts.map +0 -1
- package/dist/esm/react-query/getCredits.js.map +0 -1
- package/dist/esm/react-query/getProviders.d.ts +0 -17
- package/dist/esm/react-query/getProviders.d.ts.map +0 -1
- package/dist/esm/react-query/getProviders.js +0 -54
- package/dist/esm/react-query/getProviders.js.map +0 -1
- package/dist/esm/react-query/parametersGetParametersAuthorSlug.d.ts +0 -38
- package/dist/esm/react-query/parametersGetParametersAuthorSlug.d.ts.map +0 -1
- package/dist/esm/react-query/parametersGetParametersAuthorSlug.js +0 -78
- package/dist/esm/react-query/parametersGetParametersAuthorSlug.js.map +0 -1
- package/dist/esm/react-query/postCreditsCoinbase.d.ts +0 -20
- package/dist/esm/react-query/postCreditsCoinbase.d.ts.map +0 -1
- package/dist/esm/react-query/postCreditsCoinbase.js.map +0 -1
- package/dist/esm/sdk/parameters.d.ts +0 -9
- package/dist/esm/sdk/parameters.d.ts.map +0 -1
- package/dist/esm/sdk/parameters.js +0 -15
- package/dist/esm/sdk/parameters.js.map +0 -1
- package/examples/chatCompletion.example.ts +0 -19
- package/examples/chatCompletionStream.example.ts +0 -30
- package/examples/unauthorized.example.ts +0 -19
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
RequestTimeoutError,
|
|
16
16
|
UnexpectedClientError,
|
|
17
17
|
} from "../models/errors/httpclienterrors.js";
|
|
18
|
+
import * as errors from "../models/errors/index.js";
|
|
18
19
|
import { OpenRouterError } from "../models/errors/openroutererror.js";
|
|
19
20
|
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
20
21
|
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
@@ -31,6 +32,7 @@ export function modelsGetModelsCount(
|
|
|
31
32
|
): APIPromise<
|
|
32
33
|
Result<
|
|
33
34
|
operations.GetModelsCountResponse,
|
|
35
|
+
| errors.ErrorResponse
|
|
34
36
|
| OpenRouterError
|
|
35
37
|
| ResponseValidationError
|
|
36
38
|
| ConnectionError
|
|
@@ -54,6 +56,7 @@ async function $do(
|
|
|
54
56
|
[
|
|
55
57
|
Result<
|
|
56
58
|
operations.GetModelsCountResponse,
|
|
59
|
+
| errors.ErrorResponse
|
|
57
60
|
| OpenRouterError
|
|
58
61
|
| ResponseValidationError
|
|
59
62
|
| ConnectionError
|
|
@@ -72,7 +75,8 @@ async function $do(
|
|
|
72
75
|
Accept: "application/json",
|
|
73
76
|
}));
|
|
74
77
|
|
|
75
|
-
const
|
|
78
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
79
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
76
80
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
77
81
|
|
|
78
82
|
const context = {
|
|
@@ -83,7 +87,7 @@ async function $do(
|
|
|
83
87
|
|
|
84
88
|
resolvedSecurity: requestSecurity,
|
|
85
89
|
|
|
86
|
-
securitySource: client._options.
|
|
90
|
+
securitySource: client._options.apiKey,
|
|
87
91
|
retryConfig: options?.retries
|
|
88
92
|
|| client._options.retryConfig
|
|
89
93
|
|| { strategy: "none" },
|
|
@@ -115,8 +119,13 @@ async function $do(
|
|
|
115
119
|
}
|
|
116
120
|
const response = doResult.value;
|
|
117
121
|
|
|
122
|
+
const responseFields = {
|
|
123
|
+
HttpMeta: { Response: response, Request: req },
|
|
124
|
+
};
|
|
125
|
+
|
|
118
126
|
const [result] = await M.match<
|
|
119
127
|
operations.GetModelsCountResponse,
|
|
128
|
+
| errors.ErrorResponse
|
|
120
129
|
| OpenRouterError
|
|
121
130
|
| ResponseValidationError
|
|
122
131
|
| ConnectionError
|
|
@@ -127,10 +136,9 @@ async function $do(
|
|
|
127
136
|
| SDKValidationError
|
|
128
137
|
>(
|
|
129
138
|
M.json(200, operations.GetModelsCountResponse$inboundSchema),
|
|
130
|
-
M.
|
|
131
|
-
M.
|
|
132
|
-
|
|
133
|
-
)(response, req);
|
|
139
|
+
M.jsonErr("4XX", errors.ErrorResponse$inboundSchema),
|
|
140
|
+
M.jsonErr("5XX", errors.ErrorResponse$inboundSchema),
|
|
141
|
+
)(response, req, { extraFields: responseFields });
|
|
134
142
|
if (!result.ok) {
|
|
135
143
|
return [result, { status: "complete", request: req, response }];
|
|
136
144
|
}
|
|
@@ -6,7 +6,7 @@ import { OpenRouterCore } from "../core.js";
|
|
|
6
6
|
import * as M from "../lib/matchers.js";
|
|
7
7
|
import { compactMap } from "../lib/primitives.js";
|
|
8
8
|
import { RequestOptions } from "../lib/sdks.js";
|
|
9
|
-
import {
|
|
9
|
+
import { resolveSecurity } from "../lib/security.js";
|
|
10
10
|
import { pathToFunc } from "../lib/url.js";
|
|
11
11
|
import {
|
|
12
12
|
ConnectionError,
|
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
RequestTimeoutError,
|
|
16
16
|
UnexpectedClientError,
|
|
17
17
|
} from "../models/errors/httpclienterrors.js";
|
|
18
|
+
import * as errors from "../models/errors/index.js";
|
|
18
19
|
import { OpenRouterError } from "../models/errors/openroutererror.js";
|
|
19
20
|
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
20
21
|
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
@@ -27,10 +28,12 @@ import { Result } from "../types/fp.js";
|
|
|
27
28
|
*/
|
|
28
29
|
export function modelsGetModelsUser(
|
|
29
30
|
client: OpenRouterCore,
|
|
31
|
+
security: operations.GetModelsUserSecurity,
|
|
30
32
|
options?: RequestOptions,
|
|
31
33
|
): APIPromise<
|
|
32
34
|
Result<
|
|
33
35
|
operations.GetModelsUserResponse,
|
|
36
|
+
| errors.ErrorResponse
|
|
34
37
|
| OpenRouterError
|
|
35
38
|
| ResponseValidationError
|
|
36
39
|
| ConnectionError
|
|
@@ -43,17 +46,20 @@ export function modelsGetModelsUser(
|
|
|
43
46
|
> {
|
|
44
47
|
return new APIPromise($do(
|
|
45
48
|
client,
|
|
49
|
+
security,
|
|
46
50
|
options,
|
|
47
51
|
));
|
|
48
52
|
}
|
|
49
53
|
|
|
50
54
|
async function $do(
|
|
51
55
|
client: OpenRouterCore,
|
|
56
|
+
security: operations.GetModelsUserSecurity,
|
|
52
57
|
options?: RequestOptions,
|
|
53
58
|
): Promise<
|
|
54
59
|
[
|
|
55
60
|
Result<
|
|
56
61
|
operations.GetModelsUserResponse,
|
|
62
|
+
| errors.ErrorResponse
|
|
57
63
|
| OpenRouterError
|
|
58
64
|
| ResponseValidationError
|
|
59
65
|
| ConnectionError
|
|
@@ -72,18 +78,25 @@ async function $do(
|
|
|
72
78
|
Accept: "application/json",
|
|
73
79
|
}));
|
|
74
80
|
|
|
75
|
-
const
|
|
76
|
-
|
|
81
|
+
const requestSecurity = resolveSecurity(
|
|
82
|
+
[
|
|
83
|
+
{
|
|
84
|
+
fieldName: "Authorization",
|
|
85
|
+
type: "apiKey:header",
|
|
86
|
+
value: security?.bearer,
|
|
87
|
+
},
|
|
88
|
+
],
|
|
89
|
+
);
|
|
77
90
|
|
|
78
91
|
const context = {
|
|
79
92
|
options: client._options,
|
|
80
93
|
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
81
94
|
operationID: "get_/models/user",
|
|
82
|
-
oAuth2Scopes:
|
|
95
|
+
oAuth2Scopes: null,
|
|
83
96
|
|
|
84
97
|
resolvedSecurity: requestSecurity,
|
|
85
98
|
|
|
86
|
-
securitySource:
|
|
99
|
+
securitySource: security,
|
|
87
100
|
retryConfig: options?.retries
|
|
88
101
|
|| client._options.retryConfig
|
|
89
102
|
|| { strategy: "none" },
|
|
@@ -115,8 +128,13 @@ async function $do(
|
|
|
115
128
|
}
|
|
116
129
|
const response = doResult.value;
|
|
117
130
|
|
|
131
|
+
const responseFields = {
|
|
132
|
+
HttpMeta: { Response: response, Request: req },
|
|
133
|
+
};
|
|
134
|
+
|
|
118
135
|
const [result] = await M.match<
|
|
119
136
|
operations.GetModelsUserResponse,
|
|
137
|
+
| errors.ErrorResponse
|
|
120
138
|
| OpenRouterError
|
|
121
139
|
| ResponseValidationError
|
|
122
140
|
| ConnectionError
|
|
@@ -127,10 +145,9 @@ async function $do(
|
|
|
127
145
|
| SDKValidationError
|
|
128
146
|
>(
|
|
129
147
|
M.json(200, operations.GetModelsUserResponse$inboundSchema),
|
|
130
|
-
M.
|
|
131
|
-
M.
|
|
132
|
-
|
|
133
|
-
)(response, req);
|
|
148
|
+
M.jsonErr("4XX", errors.ErrorResponse$inboundSchema),
|
|
149
|
+
M.jsonErr("5XX", errors.ErrorResponse$inboundSchema),
|
|
150
|
+
)(response, req, { extraFields: responseFields });
|
|
134
151
|
if (!result.ok) {
|
|
135
152
|
return [result, { status: "complete", request: req, response }];
|
|
136
153
|
}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { OpenRouterCore } from "../core.js";
|
|
6
|
+
import { encodeJSON } from "../lib/encodings.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { compactMap } from "../lib/primitives.js";
|
|
9
|
+
import { safeParse } from "../lib/schemas.js";
|
|
10
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
11
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
|
+
import { pathToFunc } from "../lib/url.js";
|
|
13
|
+
import {
|
|
14
|
+
ConnectionError,
|
|
15
|
+
InvalidRequestError,
|
|
16
|
+
RequestAbortedError,
|
|
17
|
+
RequestTimeoutError,
|
|
18
|
+
UnexpectedClientError,
|
|
19
|
+
} from "../models/errors/httpclienterrors.js";
|
|
20
|
+
import * as errors from "../models/errors/index.js";
|
|
21
|
+
import { OpenRouterError } from "../models/errors/openroutererror.js";
|
|
22
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
23
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
24
|
+
import * as operations from "../models/operations/index.js";
|
|
25
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
26
|
+
import { Result } from "../types/fp.js";
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Exchange authorization code for API key
|
|
30
|
+
*
|
|
31
|
+
* @remarks
|
|
32
|
+
* Exchange an authorization code from the PKCE flow for a user-controlled API key
|
|
33
|
+
*/
|
|
34
|
+
export function oAuthPostAuthKeys(
|
|
35
|
+
client: OpenRouterCore,
|
|
36
|
+
request?: operations.PostAuthKeysRequest | undefined,
|
|
37
|
+
options?: RequestOptions,
|
|
38
|
+
): APIPromise<
|
|
39
|
+
Result<
|
|
40
|
+
operations.PostAuthKeysResponse,
|
|
41
|
+
| errors.ErrorResponse
|
|
42
|
+
| OpenRouterError
|
|
43
|
+
| ResponseValidationError
|
|
44
|
+
| ConnectionError
|
|
45
|
+
| RequestAbortedError
|
|
46
|
+
| RequestTimeoutError
|
|
47
|
+
| InvalidRequestError
|
|
48
|
+
| UnexpectedClientError
|
|
49
|
+
| SDKValidationError
|
|
50
|
+
>
|
|
51
|
+
> {
|
|
52
|
+
return new APIPromise($do(
|
|
53
|
+
client,
|
|
54
|
+
request,
|
|
55
|
+
options,
|
|
56
|
+
));
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
async function $do(
|
|
60
|
+
client: OpenRouterCore,
|
|
61
|
+
request?: operations.PostAuthKeysRequest | undefined,
|
|
62
|
+
options?: RequestOptions,
|
|
63
|
+
): Promise<
|
|
64
|
+
[
|
|
65
|
+
Result<
|
|
66
|
+
operations.PostAuthKeysResponse,
|
|
67
|
+
| errors.ErrorResponse
|
|
68
|
+
| OpenRouterError
|
|
69
|
+
| ResponseValidationError
|
|
70
|
+
| ConnectionError
|
|
71
|
+
| RequestAbortedError
|
|
72
|
+
| RequestTimeoutError
|
|
73
|
+
| InvalidRequestError
|
|
74
|
+
| UnexpectedClientError
|
|
75
|
+
| SDKValidationError
|
|
76
|
+
>,
|
|
77
|
+
APICall,
|
|
78
|
+
]
|
|
79
|
+
> {
|
|
80
|
+
const parsed = safeParse(
|
|
81
|
+
request,
|
|
82
|
+
(value) =>
|
|
83
|
+
operations.PostAuthKeysRequest$outboundSchema.optional().parse(value),
|
|
84
|
+
"Input validation failed",
|
|
85
|
+
);
|
|
86
|
+
if (!parsed.ok) {
|
|
87
|
+
return [parsed, { status: "invalid" }];
|
|
88
|
+
}
|
|
89
|
+
const payload = parsed.value;
|
|
90
|
+
const body = payload === undefined
|
|
91
|
+
? null
|
|
92
|
+
: encodeJSON("body", payload, { explode: true });
|
|
93
|
+
|
|
94
|
+
const path = pathToFunc("/auth/keys")();
|
|
95
|
+
|
|
96
|
+
const headers = new Headers(compactMap({
|
|
97
|
+
"Content-Type": "application/json",
|
|
98
|
+
Accept: "application/json",
|
|
99
|
+
}));
|
|
100
|
+
|
|
101
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
102
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
103
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
104
|
+
|
|
105
|
+
const context = {
|
|
106
|
+
options: client._options,
|
|
107
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
108
|
+
operationID: "post_/auth/keys",
|
|
109
|
+
oAuth2Scopes: [],
|
|
110
|
+
|
|
111
|
+
resolvedSecurity: requestSecurity,
|
|
112
|
+
|
|
113
|
+
securitySource: client._options.apiKey,
|
|
114
|
+
retryConfig: options?.retries
|
|
115
|
+
|| client._options.retryConfig
|
|
116
|
+
|| { strategy: "none" },
|
|
117
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
const requestRes = client._createRequest(context, {
|
|
121
|
+
security: requestSecurity,
|
|
122
|
+
method: "POST",
|
|
123
|
+
baseURL: options?.serverURL,
|
|
124
|
+
path: path,
|
|
125
|
+
headers: headers,
|
|
126
|
+
body: body,
|
|
127
|
+
userAgent: client._options.userAgent,
|
|
128
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
129
|
+
}, options);
|
|
130
|
+
if (!requestRes.ok) {
|
|
131
|
+
return [requestRes, { status: "invalid" }];
|
|
132
|
+
}
|
|
133
|
+
const req = requestRes.value;
|
|
134
|
+
|
|
135
|
+
const doResult = await client._do(req, {
|
|
136
|
+
context,
|
|
137
|
+
errorCodes: ["4XX", "5XX"],
|
|
138
|
+
retryConfig: context.retryConfig,
|
|
139
|
+
retryCodes: context.retryCodes,
|
|
140
|
+
});
|
|
141
|
+
if (!doResult.ok) {
|
|
142
|
+
return [doResult, { status: "request-error", request: req }];
|
|
143
|
+
}
|
|
144
|
+
const response = doResult.value;
|
|
145
|
+
|
|
146
|
+
const responseFields = {
|
|
147
|
+
HttpMeta: { Response: response, Request: req },
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
const [result] = await M.match<
|
|
151
|
+
operations.PostAuthKeysResponse,
|
|
152
|
+
| errors.ErrorResponse
|
|
153
|
+
| OpenRouterError
|
|
154
|
+
| ResponseValidationError
|
|
155
|
+
| ConnectionError
|
|
156
|
+
| RequestAbortedError
|
|
157
|
+
| RequestTimeoutError
|
|
158
|
+
| InvalidRequestError
|
|
159
|
+
| UnexpectedClientError
|
|
160
|
+
| SDKValidationError
|
|
161
|
+
>(
|
|
162
|
+
M.json(200, operations.PostAuthKeysResponse$inboundSchema),
|
|
163
|
+
M.jsonErr("4XX", errors.ErrorResponse$inboundSchema),
|
|
164
|
+
M.jsonErr("5XX", errors.ErrorResponse$inboundSchema),
|
|
165
|
+
)(response, req, { extraFields: responseFields });
|
|
166
|
+
if (!result.ok) {
|
|
167
|
+
return [result, { status: "complete", request: req, response }];
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
return [result, { status: "complete", request: req, response }];
|
|
171
|
+
}
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { OpenRouterCore } from "../core.js";
|
|
6
|
+
import { encodeJSON } from "../lib/encodings.js";
|
|
7
|
+
import * as M from "../lib/matchers.js";
|
|
8
|
+
import { compactMap } from "../lib/primitives.js";
|
|
9
|
+
import { safeParse } from "../lib/schemas.js";
|
|
10
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
11
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
|
+
import { pathToFunc } from "../lib/url.js";
|
|
13
|
+
import {
|
|
14
|
+
ConnectionError,
|
|
15
|
+
InvalidRequestError,
|
|
16
|
+
RequestAbortedError,
|
|
17
|
+
RequestTimeoutError,
|
|
18
|
+
UnexpectedClientError,
|
|
19
|
+
} from "../models/errors/httpclienterrors.js";
|
|
20
|
+
import * as errors from "../models/errors/index.js";
|
|
21
|
+
import { OpenRouterError } from "../models/errors/openroutererror.js";
|
|
22
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
23
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
24
|
+
import * as operations from "../models/operations/index.js";
|
|
25
|
+
import { APICall, APIPromise } from "../types/async.js";
|
|
26
|
+
import { Result } from "../types/fp.js";
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Create authorization code
|
|
30
|
+
*
|
|
31
|
+
* @remarks
|
|
32
|
+
* Create an authorization code for the PKCE flow to generate a user-controlled API key
|
|
33
|
+
*/
|
|
34
|
+
export function oAuthPostAuthKeysCode(
|
|
35
|
+
client: OpenRouterCore,
|
|
36
|
+
request?: operations.PostAuthKeysCodeRequest | undefined,
|
|
37
|
+
options?: RequestOptions,
|
|
38
|
+
): APIPromise<
|
|
39
|
+
Result<
|
|
40
|
+
operations.PostAuthKeysCodeResponse,
|
|
41
|
+
| errors.ErrorResponse
|
|
42
|
+
| OpenRouterError
|
|
43
|
+
| ResponseValidationError
|
|
44
|
+
| ConnectionError
|
|
45
|
+
| RequestAbortedError
|
|
46
|
+
| RequestTimeoutError
|
|
47
|
+
| InvalidRequestError
|
|
48
|
+
| UnexpectedClientError
|
|
49
|
+
| SDKValidationError
|
|
50
|
+
>
|
|
51
|
+
> {
|
|
52
|
+
return new APIPromise($do(
|
|
53
|
+
client,
|
|
54
|
+
request,
|
|
55
|
+
options,
|
|
56
|
+
));
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
async function $do(
|
|
60
|
+
client: OpenRouterCore,
|
|
61
|
+
request?: operations.PostAuthKeysCodeRequest | undefined,
|
|
62
|
+
options?: RequestOptions,
|
|
63
|
+
): Promise<
|
|
64
|
+
[
|
|
65
|
+
Result<
|
|
66
|
+
operations.PostAuthKeysCodeResponse,
|
|
67
|
+
| errors.ErrorResponse
|
|
68
|
+
| OpenRouterError
|
|
69
|
+
| ResponseValidationError
|
|
70
|
+
| ConnectionError
|
|
71
|
+
| RequestAbortedError
|
|
72
|
+
| RequestTimeoutError
|
|
73
|
+
| InvalidRequestError
|
|
74
|
+
| UnexpectedClientError
|
|
75
|
+
| SDKValidationError
|
|
76
|
+
>,
|
|
77
|
+
APICall,
|
|
78
|
+
]
|
|
79
|
+
> {
|
|
80
|
+
const parsed = safeParse(
|
|
81
|
+
request,
|
|
82
|
+
(value) =>
|
|
83
|
+
operations.PostAuthKeysCodeRequest$outboundSchema.optional().parse(value),
|
|
84
|
+
"Input validation failed",
|
|
85
|
+
);
|
|
86
|
+
if (!parsed.ok) {
|
|
87
|
+
return [parsed, { status: "invalid" }];
|
|
88
|
+
}
|
|
89
|
+
const payload = parsed.value;
|
|
90
|
+
const body = payload === undefined
|
|
91
|
+
? null
|
|
92
|
+
: encodeJSON("body", payload, { explode: true });
|
|
93
|
+
|
|
94
|
+
const path = pathToFunc("/auth/keys/code")();
|
|
95
|
+
|
|
96
|
+
const headers = new Headers(compactMap({
|
|
97
|
+
"Content-Type": "application/json",
|
|
98
|
+
Accept: "application/json",
|
|
99
|
+
}));
|
|
100
|
+
|
|
101
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
102
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
103
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
104
|
+
|
|
105
|
+
const context = {
|
|
106
|
+
options: client._options,
|
|
107
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
108
|
+
operationID: "post_/auth/keys/code",
|
|
109
|
+
oAuth2Scopes: [],
|
|
110
|
+
|
|
111
|
+
resolvedSecurity: requestSecurity,
|
|
112
|
+
|
|
113
|
+
securitySource: client._options.apiKey,
|
|
114
|
+
retryConfig: options?.retries
|
|
115
|
+
|| client._options.retryConfig
|
|
116
|
+
|| { strategy: "none" },
|
|
117
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
118
|
+
};
|
|
119
|
+
|
|
120
|
+
const requestRes = client._createRequest(context, {
|
|
121
|
+
security: requestSecurity,
|
|
122
|
+
method: "POST",
|
|
123
|
+
baseURL: options?.serverURL,
|
|
124
|
+
path: path,
|
|
125
|
+
headers: headers,
|
|
126
|
+
body: body,
|
|
127
|
+
userAgent: client._options.userAgent,
|
|
128
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
129
|
+
}, options);
|
|
130
|
+
if (!requestRes.ok) {
|
|
131
|
+
return [requestRes, { status: "invalid" }];
|
|
132
|
+
}
|
|
133
|
+
const req = requestRes.value;
|
|
134
|
+
|
|
135
|
+
const doResult = await client._do(req, {
|
|
136
|
+
context,
|
|
137
|
+
errorCodes: ["4XX", "5XX"],
|
|
138
|
+
retryConfig: context.retryConfig,
|
|
139
|
+
retryCodes: context.retryCodes,
|
|
140
|
+
});
|
|
141
|
+
if (!doResult.ok) {
|
|
142
|
+
return [doResult, { status: "request-error", request: req }];
|
|
143
|
+
}
|
|
144
|
+
const response = doResult.value;
|
|
145
|
+
|
|
146
|
+
const responseFields = {
|
|
147
|
+
HttpMeta: { Response: response, Request: req },
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
const [result] = await M.match<
|
|
151
|
+
operations.PostAuthKeysCodeResponse,
|
|
152
|
+
| errors.ErrorResponse
|
|
153
|
+
| OpenRouterError
|
|
154
|
+
| ResponseValidationError
|
|
155
|
+
| ConnectionError
|
|
156
|
+
| RequestAbortedError
|
|
157
|
+
| RequestTimeoutError
|
|
158
|
+
| InvalidRequestError
|
|
159
|
+
| UnexpectedClientError
|
|
160
|
+
| SDKValidationError
|
|
161
|
+
>(
|
|
162
|
+
M.json(200, operations.PostAuthKeysCodeResponse$inboundSchema),
|
|
163
|
+
M.jsonErr("4XX", errors.ErrorResponse$inboundSchema),
|
|
164
|
+
M.jsonErr("5XX", errors.ErrorResponse$inboundSchema),
|
|
165
|
+
)(response, req, { extraFields: responseFields });
|
|
166
|
+
if (!result.ok) {
|
|
167
|
+
return [result, { status: "complete", request: req, response }];
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
return [result, { status: "complete", request: req, response }];
|
|
171
|
+
}
|
|
@@ -23,7 +23,10 @@ import * as operations from "../models/operations/index.js";
|
|
|
23
23
|
import { APICall, APIPromise } from "../types/async.js";
|
|
24
24
|
import { Result } from "../types/fp.js";
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
/**
|
|
27
|
+
* List all available model providers
|
|
28
|
+
*/
|
|
29
|
+
export function providersGetProviders(
|
|
27
30
|
client: OpenRouterCore,
|
|
28
31
|
options?: RequestOptions,
|
|
29
32
|
): APIPromise<
|
|
@@ -72,7 +75,8 @@ async function $do(
|
|
|
72
75
|
Accept: "application/json",
|
|
73
76
|
}));
|
|
74
77
|
|
|
75
|
-
const
|
|
78
|
+
const secConfig = await extractSecurity(client._options.apiKey);
|
|
79
|
+
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
76
80
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
77
81
|
|
|
78
82
|
const context = {
|
|
@@ -83,7 +87,7 @@ async function $do(
|
|
|
83
87
|
|
|
84
88
|
resolvedSecurity: requestSecurity,
|
|
85
89
|
|
|
86
|
-
securitySource: client._options.
|
|
90
|
+
securitySource: client._options.apiKey,
|
|
87
91
|
retryConfig: options?.retries
|
|
88
92
|
|| client._options.retryConfig
|
|
89
93
|
|| { strategy: "none" },
|
package/src/lib/config.ts
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import * as models from "../models/index.js";
|
|
6
5
|
import { HTTPClient } from "./http.js";
|
|
7
6
|
import { Logger } from "./logger.js";
|
|
8
7
|
import { RetryConfig } from "./retries.js";
|
|
@@ -20,10 +19,7 @@ export const ServerList = {
|
|
|
20
19
|
} as const;
|
|
21
20
|
|
|
22
21
|
export type SDKOptions = {
|
|
23
|
-
|
|
24
|
-
* The security details required to authenticate the SDK
|
|
25
|
-
*/
|
|
26
|
-
security?: models.Security | (() => Promise<models.Security>) | undefined;
|
|
22
|
+
apiKey?: string | (() => Promise<string>) | undefined;
|
|
27
23
|
|
|
28
24
|
httpClient?: HTTPClient;
|
|
29
25
|
/**
|
|
@@ -63,8 +59,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
63
59
|
export const SDK_METADATA = {
|
|
64
60
|
language: "typescript",
|
|
65
61
|
openapiDocVersion: "1.0.0",
|
|
66
|
-
sdkVersion: "0.0.0-beta.
|
|
67
|
-
genVersion: "2.
|
|
62
|
+
sdkVersion: "0.0.0-beta.17",
|
|
63
|
+
genVersion: "2.716.9",
|
|
68
64
|
userAgent:
|
|
69
|
-
"speakeasy-sdk/typescript 0.0.0-beta.
|
|
65
|
+
"speakeasy-sdk/typescript 0.0.0-beta.17 2.716.9 1.0.0 @openrouter/sdk",
|
|
70
66
|
} as const;
|
package/src/lib/env.ts
CHANGED
|
@@ -8,14 +8,12 @@ import * as z from "zod";
|
|
|
8
8
|
|
|
9
9
|
export interface Env {
|
|
10
10
|
OPENROUTER_API_KEY?: string | undefined;
|
|
11
|
-
OPENROUTER_BEARER?: string | undefined;
|
|
12
11
|
|
|
13
12
|
OPENROUTER_DEBUG?: boolean | undefined;
|
|
14
13
|
}
|
|
15
14
|
|
|
16
15
|
export const envSchema: z.ZodType<Env, z.ZodTypeDef, unknown> = z.object({
|
|
17
16
|
OPENROUTER_API_KEY: z.string().optional(),
|
|
18
|
-
OPENROUTER_BEARER: z.string().optional(),
|
|
19
17
|
|
|
20
18
|
OPENROUTER_DEBUG: z.coerce.boolean().optional(),
|
|
21
19
|
});
|
package/src/lib/security.ts
CHANGED
|
@@ -243,18 +243,11 @@ export function resolveGlobalSecurity(
|
|
|
243
243
|
security: Partial<models.Security> | null | undefined,
|
|
244
244
|
): SecurityState | null {
|
|
245
245
|
return resolveSecurity(
|
|
246
|
-
[
|
|
247
|
-
{
|
|
248
|
-
fieldName: "Authorization",
|
|
249
|
-
type: "apiKey:header",
|
|
250
|
-
value: security?.apiKey ?? env().OPENROUTER_API_KEY,
|
|
251
|
-
},
|
|
252
|
-
],
|
|
253
246
|
[
|
|
254
247
|
{
|
|
255
248
|
fieldName: "Authorization",
|
|
256
249
|
type: "http:bearer",
|
|
257
|
-
value: security?.
|
|
250
|
+
value: security?.apiKey ?? env().OPENROUTER_API_KEY,
|
|
258
251
|
},
|
|
259
252
|
],
|
|
260
253
|
);
|