@openrouter/sdk 0.0.0-beta.2 → 0.0.0-beta.5
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/FUNCTIONS.md +1 -3
- package/REACT_QUERY.md +10 -14
- package/README.md +62 -40
- package/dist/commonjs/funcs/analyticsGetActivity.js +3 -2
- package/dist/commonjs/funcs/analyticsGetActivity.js.map +1 -1
- package/dist/commonjs/funcs/apiKeysDeleteKeysHash.js +3 -2
- package/dist/commonjs/funcs/apiKeysDeleteKeysHash.js.map +1 -1
- package/dist/commonjs/funcs/apiKeysGetAuthKey.js +3 -2
- package/dist/commonjs/funcs/apiKeysGetAuthKey.js.map +1 -1
- package/dist/commonjs/funcs/apiKeysGetKey.js +3 -2
- package/dist/commonjs/funcs/apiKeysGetKey.js.map +1 -1
- package/dist/commonjs/funcs/apiKeysGetKeys.js +3 -2
- package/dist/commonjs/funcs/apiKeysGetKeys.js.map +1 -1
- package/dist/commonjs/funcs/apiKeysGetKeysHash.js +3 -2
- package/dist/commonjs/funcs/apiKeysGetKeysHash.js.map +1 -1
- package/dist/commonjs/funcs/apiKeysPatchKeysHash.js +3 -2
- package/dist/commonjs/funcs/apiKeysPatchKeysHash.js.map +1 -1
- package/dist/commonjs/funcs/apiKeysPostKeys.js +3 -2
- package/dist/commonjs/funcs/apiKeysPostKeys.js.map +1 -1
- package/dist/commonjs/funcs/chatSend.js +3 -2
- package/dist/commonjs/funcs/chatSend.js.map +1 -1
- package/dist/{esm/funcs/postCreditsCoinbase.d.ts → commonjs/funcs/creditsPostCreditsCoinbase.d.ts} +2 -2
- package/dist/commonjs/funcs/creditsPostCreditsCoinbase.d.ts.map +1 -0
- package/dist/commonjs/funcs/{postCreditsCoinbase.js → creditsPostCreditsCoinbase.js} +14 -9
- package/dist/commonjs/funcs/creditsPostCreditsCoinbase.js.map +1 -0
- package/dist/commonjs/funcs/{embeddingsPostEmbeddings.d.ts → embeddingsGenerate.d.ts} +2 -2
- package/dist/commonjs/funcs/embeddingsGenerate.d.ts.map +1 -0
- package/dist/commonjs/funcs/{embeddingsPostEmbeddings.js → embeddingsGenerate.js} +6 -5
- package/dist/commonjs/funcs/embeddingsGenerate.js.map +1 -0
- package/dist/commonjs/funcs/endpointsGetEndpointsZdr.js +3 -2
- package/dist/commonjs/funcs/endpointsGetEndpointsZdr.js.map +1 -1
- package/dist/commonjs/funcs/endpointsGetModelsAuthorSlugEndpoints.js +3 -2
- package/dist/commonjs/funcs/endpointsGetModelsAuthorSlugEndpoints.js.map +1 -1
- package/dist/commonjs/funcs/generationsGetGeneration.js +3 -2
- package/dist/commonjs/funcs/generationsGetGeneration.js.map +1 -1
- package/dist/commonjs/funcs/getCredits.js +3 -2
- package/dist/commonjs/funcs/getCredits.js.map +1 -1
- package/dist/{esm/funcs/parametersGetParametersAuthorSlug.d.ts → commonjs/funcs/modelGetParametersAuthorSlug.d.ts} +2 -2
- package/dist/commonjs/funcs/modelGetParametersAuthorSlug.d.ts.map +1 -0
- package/dist/commonjs/funcs/{parametersGetParametersAuthorSlug.js → modelGetParametersAuthorSlug.js} +14 -9
- package/dist/commonjs/funcs/modelGetParametersAuthorSlug.js.map +1 -0
- package/dist/commonjs/funcs/modelsGetModels.js +3 -2
- package/dist/commonjs/funcs/modelsGetModels.js.map +1 -1
- package/dist/commonjs/funcs/modelsGetModelsCount.js +3 -2
- package/dist/commonjs/funcs/modelsGetModelsCount.js.map +1 -1
- package/dist/commonjs/funcs/modelsGetModelsUser.d.ts +1 -1
- package/dist/commonjs/funcs/modelsGetModelsUser.d.ts.map +1 -1
- package/dist/commonjs/funcs/modelsGetModelsUser.js +12 -7
- package/dist/commonjs/funcs/modelsGetModelsUser.js.map +1 -1
- package/dist/commonjs/funcs/oAuthPostAuthKeys.d.ts +17 -0
- package/dist/commonjs/funcs/oAuthPostAuthKeys.d.ts.map +1 -0
- package/dist/commonjs/funcs/oAuthPostAuthKeys.js +116 -0
- package/dist/commonjs/funcs/oAuthPostAuthKeys.js.map +1 -0
- package/dist/commonjs/funcs/oAuthPostAuthKeysCode.d.ts +17 -0
- package/dist/commonjs/funcs/oAuthPostAuthKeysCode.d.ts.map +1 -0
- package/dist/commonjs/funcs/oAuthPostAuthKeysCode.js +116 -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 +27 -3
- package/dist/commonjs/models/chaterror.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 +2 -2
- package/dist/commonjs/models/chatstreamingresponsechunk.d.ts.map +1 -1
- package/dist/commonjs/models/chatstreamingresponsechunk.js +2 -2
- package/dist/commonjs/models/chatstreamingresponsechunk.js.map +1 -1
- package/dist/commonjs/models/errorresponse.d.ts +8 -8
- package/dist/commonjs/models/errorresponse.d.ts.map +1 -1
- package/dist/commonjs/models/errorresponse.js +14 -13
- package/dist/commonjs/models/errorresponse.js.map +1 -1
- package/dist/commonjs/models/operations/getmodelsuser.d.ts +25 -0
- package/dist/commonjs/models/operations/getmodelsuser.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getmodelsuser.js +29 -2
- package/dist/commonjs/models/operations/getmodelsuser.js.map +1 -1
- package/dist/commonjs/models/operations/getparametersauthorslug.d.ts +25 -0
- package/dist/commonjs/models/operations/getparametersauthorslug.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getparametersauthorslug.js +28 -1
- package/dist/commonjs/models/operations/getparametersauthorslug.js.map +1 -1
- package/dist/commonjs/models/operations/index.d.ts +2 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +2 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/postauthkeys.d.ts +132 -0
- package/dist/commonjs/models/operations/postauthkeys.d.ts.map +1 -0
- package/dist/commonjs/models/operations/postauthkeys.js +175 -0
- package/dist/commonjs/models/operations/postauthkeys.js.map +1 -0
- package/dist/commonjs/models/operations/postauthkeyscode.d.ts +167 -0
- package/dist/commonjs/models/operations/postauthkeyscode.d.ts.map +1 -0
- package/dist/commonjs/models/operations/postauthkeyscode.js +210 -0
- package/dist/commonjs/models/operations/postauthkeyscode.js.map +1 -0
- package/dist/commonjs/models/operations/postcreditscoinbase.d.ts +25 -0
- package/dist/commonjs/models/operations/postcreditscoinbase.d.ts.map +1 -1
- package/dist/commonjs/models/operations/postcreditscoinbase.js +28 -1
- package/dist/commonjs/models/operations/postcreditscoinbase.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/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 +6 -4
- package/dist/commonjs/react-query/index.d.ts.map +1 -1
- package/dist/commonjs/react-query/index.js +6 -4
- 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/credits.d.ts +9 -0
- package/dist/commonjs/sdk/credits.d.ts.map +1 -0
- package/dist/commonjs/sdk/credits.js +19 -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/sdk.d.ts +12 -8
- package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
- package/dist/commonjs/sdk/sdk.js +15 -14
- package/dist/commonjs/sdk/sdk.js.map +1 -1
- package/dist/esm/funcs/analyticsGetActivity.js +3 -2
- package/dist/esm/funcs/analyticsGetActivity.js.map +1 -1
- package/dist/esm/funcs/apiKeysDeleteKeysHash.js +3 -2
- package/dist/esm/funcs/apiKeysDeleteKeysHash.js.map +1 -1
- package/dist/esm/funcs/apiKeysGetAuthKey.js +3 -2
- package/dist/esm/funcs/apiKeysGetAuthKey.js.map +1 -1
- package/dist/esm/funcs/apiKeysGetKey.js +3 -2
- package/dist/esm/funcs/apiKeysGetKey.js.map +1 -1
- package/dist/esm/funcs/apiKeysGetKeys.js +3 -2
- package/dist/esm/funcs/apiKeysGetKeys.js.map +1 -1
- package/dist/esm/funcs/apiKeysGetKeysHash.js +3 -2
- package/dist/esm/funcs/apiKeysGetKeysHash.js.map +1 -1
- package/dist/esm/funcs/apiKeysPatchKeysHash.js +3 -2
- package/dist/esm/funcs/apiKeysPatchKeysHash.js.map +1 -1
- package/dist/esm/funcs/apiKeysPostKeys.js +3 -2
- package/dist/esm/funcs/apiKeysPostKeys.js.map +1 -1
- package/dist/esm/funcs/chatSend.js +3 -2
- package/dist/esm/funcs/chatSend.js.map +1 -1
- package/dist/{commonjs/funcs/postCreditsCoinbase.d.ts → esm/funcs/creditsPostCreditsCoinbase.d.ts} +2 -2
- package/dist/esm/funcs/creditsPostCreditsCoinbase.d.ts.map +1 -0
- package/dist/esm/funcs/{postCreditsCoinbase.js → creditsPostCreditsCoinbase.js} +14 -9
- package/dist/esm/funcs/creditsPostCreditsCoinbase.js.map +1 -0
- package/dist/esm/funcs/{embeddingsPostEmbeddings.d.ts → embeddingsGenerate.d.ts} +2 -2
- package/dist/esm/funcs/embeddingsGenerate.d.ts.map +1 -0
- package/dist/esm/funcs/{embeddingsPostEmbeddings.js → embeddingsGenerate.js} +5 -4
- package/dist/esm/funcs/embeddingsGenerate.js.map +1 -0
- package/dist/esm/funcs/endpointsGetEndpointsZdr.js +3 -2
- package/dist/esm/funcs/endpointsGetEndpointsZdr.js.map +1 -1
- package/dist/esm/funcs/endpointsGetModelsAuthorSlugEndpoints.js +3 -2
- package/dist/esm/funcs/endpointsGetModelsAuthorSlugEndpoints.js.map +1 -1
- package/dist/esm/funcs/generationsGetGeneration.js +3 -2
- package/dist/esm/funcs/generationsGetGeneration.js.map +1 -1
- package/dist/esm/funcs/getCredits.js +3 -2
- package/dist/esm/funcs/getCredits.js.map +1 -1
- package/dist/{commonjs/funcs/parametersGetParametersAuthorSlug.d.ts → esm/funcs/modelGetParametersAuthorSlug.d.ts} +2 -2
- package/dist/esm/funcs/modelGetParametersAuthorSlug.d.ts.map +1 -0
- package/dist/esm/funcs/{parametersGetParametersAuthorSlug.js → modelGetParametersAuthorSlug.js} +14 -9
- package/dist/esm/funcs/modelGetParametersAuthorSlug.js.map +1 -0
- package/dist/esm/funcs/modelsGetModels.js +3 -2
- package/dist/esm/funcs/modelsGetModels.js.map +1 -1
- package/dist/esm/funcs/modelsGetModelsCount.js +3 -2
- package/dist/esm/funcs/modelsGetModelsCount.js.map +1 -1
- package/dist/esm/funcs/modelsGetModelsUser.d.ts +1 -1
- package/dist/esm/funcs/modelsGetModelsUser.d.ts.map +1 -1
- package/dist/esm/funcs/modelsGetModelsUser.js +13 -8
- package/dist/esm/funcs/modelsGetModelsUser.js.map +1 -1
- package/dist/esm/funcs/oAuthPostAuthKeys.d.ts +17 -0
- package/dist/esm/funcs/oAuthPostAuthKeys.d.ts.map +1 -0
- package/dist/esm/funcs/oAuthPostAuthKeys.js +80 -0
- package/dist/esm/funcs/oAuthPostAuthKeys.js.map +1 -0
- package/dist/esm/funcs/oAuthPostAuthKeysCode.d.ts +17 -0
- package/dist/esm/funcs/oAuthPostAuthKeysCode.d.ts.map +1 -0
- package/dist/esm/funcs/oAuthPostAuthKeysCode.js +80 -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 +24 -2
- package/dist/esm/models/chaterror.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 +2 -2
- package/dist/esm/models/chatstreamingresponsechunk.d.ts.map +1 -1
- package/dist/esm/models/chatstreamingresponsechunk.js +2 -2
- package/dist/esm/models/chatstreamingresponsechunk.js.map +1 -1
- package/dist/esm/models/errorresponse.d.ts +8 -8
- package/dist/esm/models/errorresponse.d.ts.map +1 -1
- package/dist/esm/models/errorresponse.js +13 -12
- package/dist/esm/models/errorresponse.js.map +1 -1
- package/dist/esm/models/operations/getmodelsuser.d.ts +25 -0
- package/dist/esm/models/operations/getmodelsuser.d.ts.map +1 -1
- package/dist/esm/models/operations/getmodelsuser.js +25 -0
- package/dist/esm/models/operations/getmodelsuser.js.map +1 -1
- package/dist/esm/models/operations/getparametersauthorslug.d.ts +25 -0
- package/dist/esm/models/operations/getparametersauthorslug.d.ts.map +1 -1
- package/dist/esm/models/operations/getparametersauthorslug.js +25 -0
- package/dist/esm/models/operations/getparametersauthorslug.js.map +1 -1
- package/dist/esm/models/operations/index.d.ts +2 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +2 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/postauthkeys.d.ts +132 -0
- package/dist/esm/models/operations/postauthkeys.d.ts.map +1 -0
- package/dist/esm/models/operations/postauthkeys.js +133 -0
- package/dist/esm/models/operations/postauthkeys.js.map +1 -0
- package/dist/esm/models/operations/postauthkeyscode.d.ts +167 -0
- package/dist/esm/models/operations/postauthkeyscode.d.ts.map +1 -0
- package/dist/esm/models/operations/postauthkeyscode.js +166 -0
- package/dist/esm/models/operations/postauthkeyscode.js.map +1 -0
- package/dist/esm/models/operations/postcreditscoinbase.d.ts +25 -0
- package/dist/esm/models/operations/postcreditscoinbase.d.ts.map +1 -1
- package/dist/esm/models/operations/postcreditscoinbase.js +25 -0
- package/dist/esm/models/operations/postcreditscoinbase.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/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 +6 -4
- package/dist/esm/react-query/index.d.ts.map +1 -1
- package/dist/esm/react-query/index.js +6 -4
- 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/credits.d.ts +9 -0
- package/dist/esm/sdk/credits.d.ts.map +1 -0
- package/dist/esm/sdk/credits.js +15 -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/sdk.d.ts +12 -8
- package/dist/esm/sdk/sdk.d.ts.map +1 -1
- package/dist/esm/sdk/sdk.js +15 -14
- package/dist/esm/sdk/sdk.js.map +1 -1
- package/docs/sdks/analytics/README.md +2 -6
- package/docs/sdks/apikeys/README.md +14 -42
- package/docs/sdks/chat/README.md +2 -6
- package/docs/sdks/credits/README.md +95 -0
- package/docs/sdks/embeddings/README.md +10 -14
- package/docs/sdks/endpoints/README.md +4 -12
- package/docs/sdks/generations/README.md +2 -6
- package/docs/sdks/{parameters → model}/README.md +19 -22
- package/docs/sdks/models/README.md +13 -24
- package/docs/sdks/oauth/README.md +199 -0
- package/docs/sdks/openrouter/README.md +2 -196
- package/docs/sdks/providers/README.md +104 -0
- package/examples/chatCompletions.example.ts +95 -0
- package/examples/getCredits.example.ts +1 -3
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/analyticsGetActivity.ts +3 -2
- package/src/funcs/apiKeysDeleteKeysHash.ts +3 -2
- package/src/funcs/apiKeysGetAuthKey.ts +3 -2
- package/src/funcs/apiKeysGetKey.ts +3 -2
- package/src/funcs/apiKeysGetKeys.ts +3 -2
- package/src/funcs/apiKeysGetKeysHash.ts +3 -2
- package/src/funcs/apiKeysPatchKeysHash.ts +3 -2
- package/src/funcs/apiKeysPostKeys.ts +3 -2
- package/src/funcs/chatSend.ts +3 -2
- package/src/funcs/{postCreditsCoinbase.ts → creditsPostCreditsCoinbase.ts} +16 -6
- package/src/funcs/{embeddingsPostEmbeddings.ts → embeddingsGenerate.ts} +4 -3
- package/src/funcs/endpointsGetEndpointsZdr.ts +3 -2
- package/src/funcs/endpointsGetModelsAuthorSlugEndpoints.ts +3 -2
- package/src/funcs/generationsGetGeneration.ts +3 -2
- package/src/funcs/getCredits.ts +3 -2
- package/src/funcs/{parametersGetParametersAuthorSlug.ts → modelGetParametersAuthorSlug.ts} +16 -6
- package/src/funcs/modelsGetModels.ts +3 -2
- package/src/funcs/modelsGetModelsCount.ts +3 -2
- package/src/funcs/modelsGetModelsUser.ts +15 -5
- package/src/funcs/oAuthPostAuthKeys.ts +164 -0
- package/src/funcs/oAuthPostAuthKeysCode.ts +164 -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 +44 -4
- package/src/models/chatresponse.ts +4 -4
- package/src/models/chatstreamingresponsechunk.ts +4 -4
- package/src/models/errorresponse.ts +14 -15
- package/src/models/operations/getmodelsuser.ts +58 -0
- package/src/models/operations/getparametersauthorslug.ts +60 -0
- package/src/models/operations/index.ts +2 -0
- package/src/models/operations/postauthkeys.ts +272 -0
- package/src/models/operations/postauthkeyscode.ts +352 -0
- package/src/models/operations/postcreditscoinbase.ts +60 -0
- package/src/models/security.ts +0 -4
- 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 +6 -4
- 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/credits.ts +26 -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/sdk.ts +22 -29
- package/dist/commonjs/funcs/embeddingsPostEmbeddings.d.ts.map +0 -1
- package/dist/commonjs/funcs/embeddingsPostEmbeddings.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/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/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/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
|
@@ -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.5",
|
|
63
|
+
genVersion: "2.714.1",
|
|
68
64
|
userAgent:
|
|
69
|
-
"speakeasy-sdk/typescript 0.0.0-beta.
|
|
65
|
+
"speakeasy-sdk/typescript 0.0.0-beta.5 2.714.1 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
|
);
|
package/src/models/chaterror.ts
CHANGED
|
@@ -7,20 +7,60 @@ import { safeParse } from "../lib/schemas.js";
|
|
|
7
7
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
8
8
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
9
9
|
|
|
10
|
+
export type Code = string | number;
|
|
11
|
+
|
|
10
12
|
export type ChatErrorError = {
|
|
11
|
-
code: string | null;
|
|
13
|
+
code: string | number | null;
|
|
12
14
|
message: string;
|
|
13
15
|
param: string | null;
|
|
14
16
|
type: string;
|
|
15
17
|
};
|
|
16
18
|
|
|
19
|
+
/** @internal */
|
|
20
|
+
export const Code$inboundSchema: z.ZodType<Code, z.ZodTypeDef, unknown> = z
|
|
21
|
+
.union([z.string(), z.number()]);
|
|
22
|
+
|
|
23
|
+
/** @internal */
|
|
24
|
+
export type Code$Outbound = string | number;
|
|
25
|
+
|
|
26
|
+
/** @internal */
|
|
27
|
+
export const Code$outboundSchema: z.ZodType<Code$Outbound, z.ZodTypeDef, Code> =
|
|
28
|
+
z.union([z.string(), z.number()]);
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* @internal
|
|
32
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
33
|
+
*/
|
|
34
|
+
export namespace Code$ {
|
|
35
|
+
/** @deprecated use `Code$inboundSchema` instead. */
|
|
36
|
+
export const inboundSchema = Code$inboundSchema;
|
|
37
|
+
/** @deprecated use `Code$outboundSchema` instead. */
|
|
38
|
+
export const outboundSchema = Code$outboundSchema;
|
|
39
|
+
/** @deprecated use `Code$Outbound` instead. */
|
|
40
|
+
export type Outbound = Code$Outbound;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function codeToJSON(code: Code): string {
|
|
44
|
+
return JSON.stringify(Code$outboundSchema.parse(code));
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function codeFromJSON(
|
|
48
|
+
jsonString: string,
|
|
49
|
+
): SafeParseResult<Code, SDKValidationError> {
|
|
50
|
+
return safeParse(
|
|
51
|
+
jsonString,
|
|
52
|
+
(x) => Code$inboundSchema.parse(JSON.parse(x)),
|
|
53
|
+
`Failed to parse 'Code' from JSON`,
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
|
|
17
57
|
/** @internal */
|
|
18
58
|
export const ChatErrorError$inboundSchema: z.ZodType<
|
|
19
59
|
ChatErrorError,
|
|
20
60
|
z.ZodTypeDef,
|
|
21
61
|
unknown
|
|
22
62
|
> = z.object({
|
|
23
|
-
code: z.nullable(z.string()),
|
|
63
|
+
code: z.nullable(z.union([z.string(), z.number()])),
|
|
24
64
|
message: z.string(),
|
|
25
65
|
param: z.nullable(z.string()),
|
|
26
66
|
type: z.string(),
|
|
@@ -28,7 +68,7 @@ export const ChatErrorError$inboundSchema: z.ZodType<
|
|
|
28
68
|
|
|
29
69
|
/** @internal */
|
|
30
70
|
export type ChatErrorError$Outbound = {
|
|
31
|
-
code: string | null;
|
|
71
|
+
code: string | number | null;
|
|
32
72
|
message: string;
|
|
33
73
|
param: string | null;
|
|
34
74
|
type: string;
|
|
@@ -40,7 +80,7 @@ export const ChatErrorError$outboundSchema: z.ZodType<
|
|
|
40
80
|
z.ZodTypeDef,
|
|
41
81
|
ChatErrorError
|
|
42
82
|
> = z.object({
|
|
43
|
-
code: z.nullable(z.string()),
|
|
83
|
+
code: z.nullable(z.union([z.string(), z.number()])),
|
|
44
84
|
message: z.string(),
|
|
45
85
|
param: z.nullable(z.string()),
|
|
46
86
|
type: z.string(),
|
|
@@ -26,7 +26,7 @@ export type ChatResponse = {
|
|
|
26
26
|
created: number;
|
|
27
27
|
model: string;
|
|
28
28
|
object: "chat.completion";
|
|
29
|
-
systemFingerprint?: string | undefined;
|
|
29
|
+
systemFingerprint?: string | null | undefined;
|
|
30
30
|
usage?: ChatGenerationTokenUsage | undefined;
|
|
31
31
|
};
|
|
32
32
|
|
|
@@ -41,7 +41,7 @@ export const ChatResponse$inboundSchema: z.ZodType<
|
|
|
41
41
|
created: z.number(),
|
|
42
42
|
model: z.string(),
|
|
43
43
|
object: z.literal("chat.completion"),
|
|
44
|
-
system_fingerprint: z.string().optional(),
|
|
44
|
+
system_fingerprint: z.nullable(z.string()).optional(),
|
|
45
45
|
usage: ChatGenerationTokenUsage$inboundSchema.optional(),
|
|
46
46
|
}).transform((v) => {
|
|
47
47
|
return remap$(v, {
|
|
@@ -56,7 +56,7 @@ export type ChatResponse$Outbound = {
|
|
|
56
56
|
created: number;
|
|
57
57
|
model: string;
|
|
58
58
|
object: "chat.completion";
|
|
59
|
-
system_fingerprint?: string | undefined;
|
|
59
|
+
system_fingerprint?: string | null | undefined;
|
|
60
60
|
usage?: ChatGenerationTokenUsage$Outbound | undefined;
|
|
61
61
|
};
|
|
62
62
|
|
|
@@ -71,7 +71,7 @@ export const ChatResponse$outboundSchema: z.ZodType<
|
|
|
71
71
|
created: z.number(),
|
|
72
72
|
model: z.string(),
|
|
73
73
|
object: z.literal("chat.completion"),
|
|
74
|
-
systemFingerprint: z.string().optional(),
|
|
74
|
+
systemFingerprint: z.nullable(z.string()).optional(),
|
|
75
75
|
usage: ChatGenerationTokenUsage$outboundSchema.optional(),
|
|
76
76
|
}).transform((v) => {
|
|
77
77
|
return remap$(v, {
|
|
@@ -31,7 +31,7 @@ export type Data = {
|
|
|
31
31
|
created: number;
|
|
32
32
|
model: string;
|
|
33
33
|
object: "chat.completion.chunk";
|
|
34
|
-
systemFingerprint?: string | undefined;
|
|
34
|
+
systemFingerprint?: string | null | undefined;
|
|
35
35
|
error?: ChatStreamingResponseChunkError | undefined;
|
|
36
36
|
usage?: ChatGenerationTokenUsage | undefined;
|
|
37
37
|
};
|
|
@@ -107,7 +107,7 @@ export const Data$inboundSchema: z.ZodType<Data, z.ZodTypeDef, unknown> = z
|
|
|
107
107
|
created: z.number(),
|
|
108
108
|
model: z.string(),
|
|
109
109
|
object: z.literal("chat.completion.chunk"),
|
|
110
|
-
system_fingerprint: z.string().optional(),
|
|
110
|
+
system_fingerprint: z.nullable(z.string()).optional(),
|
|
111
111
|
error: z.lazy(() => ChatStreamingResponseChunkError$inboundSchema)
|
|
112
112
|
.optional(),
|
|
113
113
|
usage: ChatGenerationTokenUsage$inboundSchema.optional(),
|
|
@@ -124,7 +124,7 @@ export type Data$Outbound = {
|
|
|
124
124
|
created: number;
|
|
125
125
|
model: string;
|
|
126
126
|
object: "chat.completion.chunk";
|
|
127
|
-
system_fingerprint?: string | undefined;
|
|
127
|
+
system_fingerprint?: string | null | undefined;
|
|
128
128
|
error?: ChatStreamingResponseChunkError$Outbound | undefined;
|
|
129
129
|
usage?: ChatGenerationTokenUsage$Outbound | undefined;
|
|
130
130
|
};
|
|
@@ -137,7 +137,7 @@ export const Data$outboundSchema: z.ZodType<Data$Outbound, z.ZodTypeDef, Data> =
|
|
|
137
137
|
created: z.number(),
|
|
138
138
|
model: z.string(),
|
|
139
139
|
object: z.literal("chat.completion.chunk"),
|
|
140
|
-
systemFingerprint: z.string().optional(),
|
|
140
|
+
systemFingerprint: z.nullable(z.string()).optional(),
|
|
141
141
|
error: z.lazy(() => ChatStreamingResponseChunkError$outboundSchema)
|
|
142
142
|
.optional(),
|
|
143
143
|
usage: ChatGenerationTokenUsage$outboundSchema.optional(),
|
|
@@ -9,7 +9,7 @@ import { ClosedEnum } from "../types/enums.js";
|
|
|
9
9
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
10
10
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
11
11
|
|
|
12
|
-
export const
|
|
12
|
+
export const CodeEnum = {
|
|
13
13
|
OneHundred: 100,
|
|
14
14
|
OneHundredAndOne: 101,
|
|
15
15
|
OneHundredAndTwo: 102,
|
|
@@ -81,10 +81,10 @@ export const Code = {
|
|
|
81
81
|
FiveHundredAndTwentyNine: 529,
|
|
82
82
|
FiveHundredAndThirty: 530,
|
|
83
83
|
} as const;
|
|
84
|
-
export type
|
|
84
|
+
export type CodeEnum = ClosedEnum<typeof CodeEnum>;
|
|
85
85
|
|
|
86
86
|
export type ErrorResponseError = {
|
|
87
|
-
code:
|
|
87
|
+
code: CodeEnum;
|
|
88
88
|
message: string;
|
|
89
89
|
metadata?: { [k: string]: any | null } | null | undefined;
|
|
90
90
|
};
|
|
@@ -98,23 +98,22 @@ export type ErrorResponse = {
|
|
|
98
98
|
};
|
|
99
99
|
|
|
100
100
|
/** @internal */
|
|
101
|
-
export const
|
|
102
|
-
|
|
103
|
-
);
|
|
101
|
+
export const CodeEnum$inboundSchema: z.ZodNativeEnum<typeof CodeEnum> = z
|
|
102
|
+
.nativeEnum(CodeEnum);
|
|
104
103
|
|
|
105
104
|
/** @internal */
|
|
106
|
-
export const
|
|
107
|
-
|
|
105
|
+
export const CodeEnum$outboundSchema: z.ZodNativeEnum<typeof CodeEnum> =
|
|
106
|
+
CodeEnum$inboundSchema;
|
|
108
107
|
|
|
109
108
|
/**
|
|
110
109
|
* @internal
|
|
111
110
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
112
111
|
*/
|
|
113
|
-
export namespace
|
|
114
|
-
/** @deprecated use `
|
|
115
|
-
export const inboundSchema =
|
|
116
|
-
/** @deprecated use `
|
|
117
|
-
export const outboundSchema =
|
|
112
|
+
export namespace CodeEnum$ {
|
|
113
|
+
/** @deprecated use `CodeEnum$inboundSchema` instead. */
|
|
114
|
+
export const inboundSchema = CodeEnum$inboundSchema;
|
|
115
|
+
/** @deprecated use `CodeEnum$outboundSchema` instead. */
|
|
116
|
+
export const outboundSchema = CodeEnum$outboundSchema;
|
|
118
117
|
}
|
|
119
118
|
|
|
120
119
|
/** @internal */
|
|
@@ -123,7 +122,7 @@ export const ErrorResponseError$inboundSchema: z.ZodType<
|
|
|
123
122
|
z.ZodTypeDef,
|
|
124
123
|
unknown
|
|
125
124
|
> = z.object({
|
|
126
|
-
code:
|
|
125
|
+
code: CodeEnum$inboundSchema,
|
|
127
126
|
message: z.string(),
|
|
128
127
|
metadata: z.nullable(z.record(z.nullable(z.any()))).optional(),
|
|
129
128
|
});
|
|
@@ -141,7 +140,7 @@ export const ErrorResponseError$outboundSchema: z.ZodType<
|
|
|
141
140
|
z.ZodTypeDef,
|
|
142
141
|
ErrorResponseError
|
|
143
142
|
> = z.object({
|
|
144
|
-
code:
|
|
143
|
+
code: CodeEnum$outboundSchema,
|
|
145
144
|
message: z.string(),
|
|
146
145
|
metadata: z.nullable(z.record(z.nullable(z.any()))).optional(),
|
|
147
146
|
});
|
|
@@ -10,6 +10,10 @@ import { Result as SafeParseResult } from "../../types/fp.js";
|
|
|
10
10
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
11
|
import * as models from "../index.js";
|
|
12
12
|
|
|
13
|
+
export type GetModelsUserSecurity = {
|
|
14
|
+
bearer: string;
|
|
15
|
+
};
|
|
16
|
+
|
|
13
17
|
export type GetModelsUserPrompt = number | string | any;
|
|
14
18
|
|
|
15
19
|
export type GetModelsUserCompletion = number | string | any;
|
|
@@ -284,6 +288,60 @@ export type GetModelsUserResponse =
|
|
|
284
288
|
| GetModelsUserResponseBody
|
|
285
289
|
| models.ErrorResponse;
|
|
286
290
|
|
|
291
|
+
/** @internal */
|
|
292
|
+
export const GetModelsUserSecurity$inboundSchema: z.ZodType<
|
|
293
|
+
GetModelsUserSecurity,
|
|
294
|
+
z.ZodTypeDef,
|
|
295
|
+
unknown
|
|
296
|
+
> = z.object({
|
|
297
|
+
bearer: z.string(),
|
|
298
|
+
});
|
|
299
|
+
|
|
300
|
+
/** @internal */
|
|
301
|
+
export type GetModelsUserSecurity$Outbound = {
|
|
302
|
+
bearer: string;
|
|
303
|
+
};
|
|
304
|
+
|
|
305
|
+
/** @internal */
|
|
306
|
+
export const GetModelsUserSecurity$outboundSchema: z.ZodType<
|
|
307
|
+
GetModelsUserSecurity$Outbound,
|
|
308
|
+
z.ZodTypeDef,
|
|
309
|
+
GetModelsUserSecurity
|
|
310
|
+
> = z.object({
|
|
311
|
+
bearer: z.string(),
|
|
312
|
+
});
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* @internal
|
|
316
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
317
|
+
*/
|
|
318
|
+
export namespace GetModelsUserSecurity$ {
|
|
319
|
+
/** @deprecated use `GetModelsUserSecurity$inboundSchema` instead. */
|
|
320
|
+
export const inboundSchema = GetModelsUserSecurity$inboundSchema;
|
|
321
|
+
/** @deprecated use `GetModelsUserSecurity$outboundSchema` instead. */
|
|
322
|
+
export const outboundSchema = GetModelsUserSecurity$outboundSchema;
|
|
323
|
+
/** @deprecated use `GetModelsUserSecurity$Outbound` instead. */
|
|
324
|
+
export type Outbound = GetModelsUserSecurity$Outbound;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
export function getModelsUserSecurityToJSON(
|
|
328
|
+
getModelsUserSecurity: GetModelsUserSecurity,
|
|
329
|
+
): string {
|
|
330
|
+
return JSON.stringify(
|
|
331
|
+
GetModelsUserSecurity$outboundSchema.parse(getModelsUserSecurity),
|
|
332
|
+
);
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
export function getModelsUserSecurityFromJSON(
|
|
336
|
+
jsonString: string,
|
|
337
|
+
): SafeParseResult<GetModelsUserSecurity, SDKValidationError> {
|
|
338
|
+
return safeParse(
|
|
339
|
+
jsonString,
|
|
340
|
+
(x) => GetModelsUserSecurity$inboundSchema.parse(JSON.parse(x)),
|
|
341
|
+
`Failed to parse 'GetModelsUserSecurity' from JSON`,
|
|
342
|
+
);
|
|
343
|
+
}
|
|
344
|
+
|
|
287
345
|
/** @internal */
|
|
288
346
|
export const GetModelsUserPrompt$inboundSchema: z.ZodType<
|
|
289
347
|
GetModelsUserPrompt,
|
|
@@ -10,6 +10,10 @@ import { Result as SafeParseResult } from "../../types/fp.js";
|
|
|
10
10
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
11
|
import * as models from "../index.js";
|
|
12
12
|
|
|
13
|
+
export type GetParametersAuthorSlugSecurity = {
|
|
14
|
+
bearer: string;
|
|
15
|
+
};
|
|
16
|
+
|
|
13
17
|
export const GetParametersAuthorSlugProvider = {
|
|
14
18
|
Ai21: "AI21",
|
|
15
19
|
AionLabs: "AionLabs",
|
|
@@ -142,6 +146,62 @@ export type GetParametersAuthorSlugResponse =
|
|
|
142
146
|
| GetParametersAuthorSlugResponseBody
|
|
143
147
|
| models.ErrorResponse;
|
|
144
148
|
|
|
149
|
+
/** @internal */
|
|
150
|
+
export const GetParametersAuthorSlugSecurity$inboundSchema: z.ZodType<
|
|
151
|
+
GetParametersAuthorSlugSecurity,
|
|
152
|
+
z.ZodTypeDef,
|
|
153
|
+
unknown
|
|
154
|
+
> = z.object({
|
|
155
|
+
bearer: z.string(),
|
|
156
|
+
});
|
|
157
|
+
|
|
158
|
+
/** @internal */
|
|
159
|
+
export type GetParametersAuthorSlugSecurity$Outbound = {
|
|
160
|
+
bearer: string;
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
/** @internal */
|
|
164
|
+
export const GetParametersAuthorSlugSecurity$outboundSchema: z.ZodType<
|
|
165
|
+
GetParametersAuthorSlugSecurity$Outbound,
|
|
166
|
+
z.ZodTypeDef,
|
|
167
|
+
GetParametersAuthorSlugSecurity
|
|
168
|
+
> = z.object({
|
|
169
|
+
bearer: z.string(),
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* @internal
|
|
174
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
175
|
+
*/
|
|
176
|
+
export namespace GetParametersAuthorSlugSecurity$ {
|
|
177
|
+
/** @deprecated use `GetParametersAuthorSlugSecurity$inboundSchema` instead. */
|
|
178
|
+
export const inboundSchema = GetParametersAuthorSlugSecurity$inboundSchema;
|
|
179
|
+
/** @deprecated use `GetParametersAuthorSlugSecurity$outboundSchema` instead. */
|
|
180
|
+
export const outboundSchema = GetParametersAuthorSlugSecurity$outboundSchema;
|
|
181
|
+
/** @deprecated use `GetParametersAuthorSlugSecurity$Outbound` instead. */
|
|
182
|
+
export type Outbound = GetParametersAuthorSlugSecurity$Outbound;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
export function getParametersAuthorSlugSecurityToJSON(
|
|
186
|
+
getParametersAuthorSlugSecurity: GetParametersAuthorSlugSecurity,
|
|
187
|
+
): string {
|
|
188
|
+
return JSON.stringify(
|
|
189
|
+
GetParametersAuthorSlugSecurity$outboundSchema.parse(
|
|
190
|
+
getParametersAuthorSlugSecurity,
|
|
191
|
+
),
|
|
192
|
+
);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
export function getParametersAuthorSlugSecurityFromJSON(
|
|
196
|
+
jsonString: string,
|
|
197
|
+
): SafeParseResult<GetParametersAuthorSlugSecurity, SDKValidationError> {
|
|
198
|
+
return safeParse(
|
|
199
|
+
jsonString,
|
|
200
|
+
(x) => GetParametersAuthorSlugSecurity$inboundSchema.parse(JSON.parse(x)),
|
|
201
|
+
`Failed to parse 'GetParametersAuthorSlugSecurity' from JSON`,
|
|
202
|
+
);
|
|
203
|
+
}
|
|
204
|
+
|
|
145
205
|
/** @internal */
|
|
146
206
|
export const GetParametersAuthorSlugProvider$inboundSchema: z.ZodNativeEnum<
|
|
147
207
|
typeof GetParametersAuthorSlugProvider
|
|
@@ -18,6 +18,8 @@ export * from "./getmodelsuser.js";
|
|
|
18
18
|
export * from "./getparametersauthorslug.js";
|
|
19
19
|
export * from "./getproviders.js";
|
|
20
20
|
export * from "./patchkeyshash.js";
|
|
21
|
+
export * from "./postauthkeys.js";
|
|
22
|
+
export * from "./postauthkeyscode.js";
|
|
21
23
|
export * from "./postchatcompletions.js";
|
|
22
24
|
export * from "./postcreditscoinbase.js";
|
|
23
25
|
export * from "./postembeddings.js";
|