@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
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
import * as models from "../index.js";
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* The method used to generate the code challenge
|
|
15
|
+
*/
|
|
16
|
+
export const PostAuthKeysCodeChallengeMethod = {
|
|
17
|
+
S256: "S256",
|
|
18
|
+
Plain: "plain",
|
|
19
|
+
} as const;
|
|
20
|
+
/**
|
|
21
|
+
* The method used to generate the code challenge
|
|
22
|
+
*/
|
|
23
|
+
export type PostAuthKeysCodeChallengeMethod = ClosedEnum<
|
|
24
|
+
typeof PostAuthKeysCodeChallengeMethod
|
|
25
|
+
>;
|
|
26
|
+
|
|
27
|
+
export type PostAuthKeysRequest = {
|
|
28
|
+
/**
|
|
29
|
+
* The authorization code received from the OAuth redirect
|
|
30
|
+
*/
|
|
31
|
+
code: string;
|
|
32
|
+
/**
|
|
33
|
+
* The code verifier if code_challenge was used in the authorization request
|
|
34
|
+
*/
|
|
35
|
+
codeVerifier?: string | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* The method used to generate the code challenge
|
|
38
|
+
*/
|
|
39
|
+
codeChallengeMethod?: PostAuthKeysCodeChallengeMethod | undefined;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Successfully exchanged code for an API key
|
|
44
|
+
*/
|
|
45
|
+
export type PostAuthKeysResponseBody = {
|
|
46
|
+
/**
|
|
47
|
+
* The API key to use for OpenRouter requests
|
|
48
|
+
*/
|
|
49
|
+
key: string;
|
|
50
|
+
/**
|
|
51
|
+
* User ID associated with the API key
|
|
52
|
+
*/
|
|
53
|
+
userId: string | null;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
export type PostAuthKeysResponse =
|
|
57
|
+
| PostAuthKeysResponseBody
|
|
58
|
+
| models.ErrorResponse;
|
|
59
|
+
|
|
60
|
+
/** @internal */
|
|
61
|
+
export const PostAuthKeysCodeChallengeMethod$inboundSchema: z.ZodNativeEnum<
|
|
62
|
+
typeof PostAuthKeysCodeChallengeMethod
|
|
63
|
+
> = z.nativeEnum(PostAuthKeysCodeChallengeMethod);
|
|
64
|
+
|
|
65
|
+
/** @internal */
|
|
66
|
+
export const PostAuthKeysCodeChallengeMethod$outboundSchema: z.ZodNativeEnum<
|
|
67
|
+
typeof PostAuthKeysCodeChallengeMethod
|
|
68
|
+
> = PostAuthKeysCodeChallengeMethod$inboundSchema;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* @internal
|
|
72
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
73
|
+
*/
|
|
74
|
+
export namespace PostAuthKeysCodeChallengeMethod$ {
|
|
75
|
+
/** @deprecated use `PostAuthKeysCodeChallengeMethod$inboundSchema` instead. */
|
|
76
|
+
export const inboundSchema = PostAuthKeysCodeChallengeMethod$inboundSchema;
|
|
77
|
+
/** @deprecated use `PostAuthKeysCodeChallengeMethod$outboundSchema` instead. */
|
|
78
|
+
export const outboundSchema = PostAuthKeysCodeChallengeMethod$outboundSchema;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/** @internal */
|
|
82
|
+
export const PostAuthKeysRequest$inboundSchema: z.ZodType<
|
|
83
|
+
PostAuthKeysRequest,
|
|
84
|
+
z.ZodTypeDef,
|
|
85
|
+
unknown
|
|
86
|
+
> = z.object({
|
|
87
|
+
code: z.string(),
|
|
88
|
+
code_verifier: z.string().optional(),
|
|
89
|
+
code_challenge_method: PostAuthKeysCodeChallengeMethod$inboundSchema
|
|
90
|
+
.optional(),
|
|
91
|
+
}).transform((v) => {
|
|
92
|
+
return remap$(v, {
|
|
93
|
+
"code_verifier": "codeVerifier",
|
|
94
|
+
"code_challenge_method": "codeChallengeMethod",
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
/** @internal */
|
|
99
|
+
export type PostAuthKeysRequest$Outbound = {
|
|
100
|
+
code: string;
|
|
101
|
+
code_verifier?: string | undefined;
|
|
102
|
+
code_challenge_method?: string | undefined;
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
/** @internal */
|
|
106
|
+
export const PostAuthKeysRequest$outboundSchema: z.ZodType<
|
|
107
|
+
PostAuthKeysRequest$Outbound,
|
|
108
|
+
z.ZodTypeDef,
|
|
109
|
+
PostAuthKeysRequest
|
|
110
|
+
> = z.object({
|
|
111
|
+
code: z.string(),
|
|
112
|
+
codeVerifier: z.string().optional(),
|
|
113
|
+
codeChallengeMethod: PostAuthKeysCodeChallengeMethod$outboundSchema
|
|
114
|
+
.optional(),
|
|
115
|
+
}).transform((v) => {
|
|
116
|
+
return remap$(v, {
|
|
117
|
+
codeVerifier: "code_verifier",
|
|
118
|
+
codeChallengeMethod: "code_challenge_method",
|
|
119
|
+
});
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* @internal
|
|
124
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
125
|
+
*/
|
|
126
|
+
export namespace PostAuthKeysRequest$ {
|
|
127
|
+
/** @deprecated use `PostAuthKeysRequest$inboundSchema` instead. */
|
|
128
|
+
export const inboundSchema = PostAuthKeysRequest$inboundSchema;
|
|
129
|
+
/** @deprecated use `PostAuthKeysRequest$outboundSchema` instead. */
|
|
130
|
+
export const outboundSchema = PostAuthKeysRequest$outboundSchema;
|
|
131
|
+
/** @deprecated use `PostAuthKeysRequest$Outbound` instead. */
|
|
132
|
+
export type Outbound = PostAuthKeysRequest$Outbound;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export function postAuthKeysRequestToJSON(
|
|
136
|
+
postAuthKeysRequest: PostAuthKeysRequest,
|
|
137
|
+
): string {
|
|
138
|
+
return JSON.stringify(
|
|
139
|
+
PostAuthKeysRequest$outboundSchema.parse(postAuthKeysRequest),
|
|
140
|
+
);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export function postAuthKeysRequestFromJSON(
|
|
144
|
+
jsonString: string,
|
|
145
|
+
): SafeParseResult<PostAuthKeysRequest, SDKValidationError> {
|
|
146
|
+
return safeParse(
|
|
147
|
+
jsonString,
|
|
148
|
+
(x) => PostAuthKeysRequest$inboundSchema.parse(JSON.parse(x)),
|
|
149
|
+
`Failed to parse 'PostAuthKeysRequest' from JSON`,
|
|
150
|
+
);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/** @internal */
|
|
154
|
+
export const PostAuthKeysResponseBody$inboundSchema: z.ZodType<
|
|
155
|
+
PostAuthKeysResponseBody,
|
|
156
|
+
z.ZodTypeDef,
|
|
157
|
+
unknown
|
|
158
|
+
> = z.object({
|
|
159
|
+
key: z.string(),
|
|
160
|
+
user_id: z.nullable(z.string()),
|
|
161
|
+
}).transform((v) => {
|
|
162
|
+
return remap$(v, {
|
|
163
|
+
"user_id": "userId",
|
|
164
|
+
});
|
|
165
|
+
});
|
|
166
|
+
|
|
167
|
+
/** @internal */
|
|
168
|
+
export type PostAuthKeysResponseBody$Outbound = {
|
|
169
|
+
key: string;
|
|
170
|
+
user_id: string | null;
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
/** @internal */
|
|
174
|
+
export const PostAuthKeysResponseBody$outboundSchema: z.ZodType<
|
|
175
|
+
PostAuthKeysResponseBody$Outbound,
|
|
176
|
+
z.ZodTypeDef,
|
|
177
|
+
PostAuthKeysResponseBody
|
|
178
|
+
> = z.object({
|
|
179
|
+
key: z.string(),
|
|
180
|
+
userId: z.nullable(z.string()),
|
|
181
|
+
}).transform((v) => {
|
|
182
|
+
return remap$(v, {
|
|
183
|
+
userId: "user_id",
|
|
184
|
+
});
|
|
185
|
+
});
|
|
186
|
+
|
|
187
|
+
/**
|
|
188
|
+
* @internal
|
|
189
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
190
|
+
*/
|
|
191
|
+
export namespace PostAuthKeysResponseBody$ {
|
|
192
|
+
/** @deprecated use `PostAuthKeysResponseBody$inboundSchema` instead. */
|
|
193
|
+
export const inboundSchema = PostAuthKeysResponseBody$inboundSchema;
|
|
194
|
+
/** @deprecated use `PostAuthKeysResponseBody$outboundSchema` instead. */
|
|
195
|
+
export const outboundSchema = PostAuthKeysResponseBody$outboundSchema;
|
|
196
|
+
/** @deprecated use `PostAuthKeysResponseBody$Outbound` instead. */
|
|
197
|
+
export type Outbound = PostAuthKeysResponseBody$Outbound;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
export function postAuthKeysResponseBodyToJSON(
|
|
201
|
+
postAuthKeysResponseBody: PostAuthKeysResponseBody,
|
|
202
|
+
): string {
|
|
203
|
+
return JSON.stringify(
|
|
204
|
+
PostAuthKeysResponseBody$outboundSchema.parse(postAuthKeysResponseBody),
|
|
205
|
+
);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
export function postAuthKeysResponseBodyFromJSON(
|
|
209
|
+
jsonString: string,
|
|
210
|
+
): SafeParseResult<PostAuthKeysResponseBody, SDKValidationError> {
|
|
211
|
+
return safeParse(
|
|
212
|
+
jsonString,
|
|
213
|
+
(x) => PostAuthKeysResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
214
|
+
`Failed to parse 'PostAuthKeysResponseBody' from JSON`,
|
|
215
|
+
);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
/** @internal */
|
|
219
|
+
export const PostAuthKeysResponse$inboundSchema: z.ZodType<
|
|
220
|
+
PostAuthKeysResponse,
|
|
221
|
+
z.ZodTypeDef,
|
|
222
|
+
unknown
|
|
223
|
+
> = z.union([
|
|
224
|
+
z.lazy(() => PostAuthKeysResponseBody$inboundSchema),
|
|
225
|
+
models.ErrorResponse$inboundSchema,
|
|
226
|
+
]);
|
|
227
|
+
|
|
228
|
+
/** @internal */
|
|
229
|
+
export type PostAuthKeysResponse$Outbound =
|
|
230
|
+
| PostAuthKeysResponseBody$Outbound
|
|
231
|
+
| models.ErrorResponse$Outbound;
|
|
232
|
+
|
|
233
|
+
/** @internal */
|
|
234
|
+
export const PostAuthKeysResponse$outboundSchema: z.ZodType<
|
|
235
|
+
PostAuthKeysResponse$Outbound,
|
|
236
|
+
z.ZodTypeDef,
|
|
237
|
+
PostAuthKeysResponse
|
|
238
|
+
> = z.union([
|
|
239
|
+
z.lazy(() => PostAuthKeysResponseBody$outboundSchema),
|
|
240
|
+
models.ErrorResponse$outboundSchema,
|
|
241
|
+
]);
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* @internal
|
|
245
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
246
|
+
*/
|
|
247
|
+
export namespace PostAuthKeysResponse$ {
|
|
248
|
+
/** @deprecated use `PostAuthKeysResponse$inboundSchema` instead. */
|
|
249
|
+
export const inboundSchema = PostAuthKeysResponse$inboundSchema;
|
|
250
|
+
/** @deprecated use `PostAuthKeysResponse$outboundSchema` instead. */
|
|
251
|
+
export const outboundSchema = PostAuthKeysResponse$outboundSchema;
|
|
252
|
+
/** @deprecated use `PostAuthKeysResponse$Outbound` instead. */
|
|
253
|
+
export type Outbound = PostAuthKeysResponse$Outbound;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
export function postAuthKeysResponseToJSON(
|
|
257
|
+
postAuthKeysResponse: PostAuthKeysResponse,
|
|
258
|
+
): string {
|
|
259
|
+
return JSON.stringify(
|
|
260
|
+
PostAuthKeysResponse$outboundSchema.parse(postAuthKeysResponse),
|
|
261
|
+
);
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
export function postAuthKeysResponseFromJSON(
|
|
265
|
+
jsonString: string,
|
|
266
|
+
): SafeParseResult<PostAuthKeysResponse, SDKValidationError> {
|
|
267
|
+
return safeParse(
|
|
268
|
+
jsonString,
|
|
269
|
+
(x) => PostAuthKeysResponse$inboundSchema.parse(JSON.parse(x)),
|
|
270
|
+
`Failed to parse 'PostAuthKeysResponse' from JSON`,
|
|
271
|
+
);
|
|
272
|
+
}
|
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
import * as models from "../index.js";
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* The method used to generate the code challenge
|
|
15
|
+
*/
|
|
16
|
+
export const PostAuthKeysCodeCodeChallengeMethod = {
|
|
17
|
+
S256: "S256",
|
|
18
|
+
Plain: "plain",
|
|
19
|
+
} as const;
|
|
20
|
+
/**
|
|
21
|
+
* The method used to generate the code challenge
|
|
22
|
+
*/
|
|
23
|
+
export type PostAuthKeysCodeCodeChallengeMethod = ClosedEnum<
|
|
24
|
+
typeof PostAuthKeysCodeCodeChallengeMethod
|
|
25
|
+
>;
|
|
26
|
+
|
|
27
|
+
export type PostAuthKeysCodeRequest = {
|
|
28
|
+
/**
|
|
29
|
+
* The callback URL to redirect to after authorization. Note, only https URLs on ports 443 and 3000 are allowed.
|
|
30
|
+
*/
|
|
31
|
+
callbackUrl: string;
|
|
32
|
+
/**
|
|
33
|
+
* PKCE code challenge for enhanced security
|
|
34
|
+
*/
|
|
35
|
+
codeChallenge?: string | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* The method used to generate the code challenge
|
|
38
|
+
*/
|
|
39
|
+
codeChallengeMethod?: PostAuthKeysCodeCodeChallengeMethod | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* Credit limit for the API key to be created
|
|
42
|
+
*/
|
|
43
|
+
limit?: string | undefined;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export type PostAuthKeysCodeData = {
|
|
47
|
+
/**
|
|
48
|
+
* The authorization code ID to use in the exchange request
|
|
49
|
+
*/
|
|
50
|
+
id: string;
|
|
51
|
+
/**
|
|
52
|
+
* The application ID associated with this auth code
|
|
53
|
+
*/
|
|
54
|
+
appId: number;
|
|
55
|
+
/**
|
|
56
|
+
* ISO 8601 timestamp of when the auth code was created
|
|
57
|
+
*/
|
|
58
|
+
createdAt: string;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Successfully created authorization code
|
|
63
|
+
*/
|
|
64
|
+
export type PostAuthKeysCodeResponseBody = {
|
|
65
|
+
data: PostAuthKeysCodeData;
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export type PostAuthKeysCodeResponse =
|
|
69
|
+
| PostAuthKeysCodeResponseBody
|
|
70
|
+
| models.ErrorResponse;
|
|
71
|
+
|
|
72
|
+
/** @internal */
|
|
73
|
+
export const PostAuthKeysCodeCodeChallengeMethod$inboundSchema: z.ZodNativeEnum<
|
|
74
|
+
typeof PostAuthKeysCodeCodeChallengeMethod
|
|
75
|
+
> = z.nativeEnum(PostAuthKeysCodeCodeChallengeMethod);
|
|
76
|
+
|
|
77
|
+
/** @internal */
|
|
78
|
+
export const PostAuthKeysCodeCodeChallengeMethod$outboundSchema:
|
|
79
|
+
z.ZodNativeEnum<typeof PostAuthKeysCodeCodeChallengeMethod> =
|
|
80
|
+
PostAuthKeysCodeCodeChallengeMethod$inboundSchema;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* @internal
|
|
84
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
85
|
+
*/
|
|
86
|
+
export namespace PostAuthKeysCodeCodeChallengeMethod$ {
|
|
87
|
+
/** @deprecated use `PostAuthKeysCodeCodeChallengeMethod$inboundSchema` instead. */
|
|
88
|
+
export const inboundSchema =
|
|
89
|
+
PostAuthKeysCodeCodeChallengeMethod$inboundSchema;
|
|
90
|
+
/** @deprecated use `PostAuthKeysCodeCodeChallengeMethod$outboundSchema` instead. */
|
|
91
|
+
export const outboundSchema =
|
|
92
|
+
PostAuthKeysCodeCodeChallengeMethod$outboundSchema;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/** @internal */
|
|
96
|
+
export const PostAuthKeysCodeRequest$inboundSchema: z.ZodType<
|
|
97
|
+
PostAuthKeysCodeRequest,
|
|
98
|
+
z.ZodTypeDef,
|
|
99
|
+
unknown
|
|
100
|
+
> = z.object({
|
|
101
|
+
callback_url: z.string(),
|
|
102
|
+
code_challenge: z.string().optional(),
|
|
103
|
+
code_challenge_method: PostAuthKeysCodeCodeChallengeMethod$inboundSchema
|
|
104
|
+
.optional(),
|
|
105
|
+
limit: z.string().optional(),
|
|
106
|
+
}).transform((v) => {
|
|
107
|
+
return remap$(v, {
|
|
108
|
+
"callback_url": "callbackUrl",
|
|
109
|
+
"code_challenge": "codeChallenge",
|
|
110
|
+
"code_challenge_method": "codeChallengeMethod",
|
|
111
|
+
});
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
/** @internal */
|
|
115
|
+
export type PostAuthKeysCodeRequest$Outbound = {
|
|
116
|
+
callback_url: string;
|
|
117
|
+
code_challenge?: string | undefined;
|
|
118
|
+
code_challenge_method?: string | undefined;
|
|
119
|
+
limit?: string | undefined;
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
/** @internal */
|
|
123
|
+
export const PostAuthKeysCodeRequest$outboundSchema: z.ZodType<
|
|
124
|
+
PostAuthKeysCodeRequest$Outbound,
|
|
125
|
+
z.ZodTypeDef,
|
|
126
|
+
PostAuthKeysCodeRequest
|
|
127
|
+
> = z.object({
|
|
128
|
+
callbackUrl: z.string(),
|
|
129
|
+
codeChallenge: z.string().optional(),
|
|
130
|
+
codeChallengeMethod: PostAuthKeysCodeCodeChallengeMethod$outboundSchema
|
|
131
|
+
.optional(),
|
|
132
|
+
limit: z.string().optional(),
|
|
133
|
+
}).transform((v) => {
|
|
134
|
+
return remap$(v, {
|
|
135
|
+
callbackUrl: "callback_url",
|
|
136
|
+
codeChallenge: "code_challenge",
|
|
137
|
+
codeChallengeMethod: "code_challenge_method",
|
|
138
|
+
});
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* @internal
|
|
143
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
144
|
+
*/
|
|
145
|
+
export namespace PostAuthKeysCodeRequest$ {
|
|
146
|
+
/** @deprecated use `PostAuthKeysCodeRequest$inboundSchema` instead. */
|
|
147
|
+
export const inboundSchema = PostAuthKeysCodeRequest$inboundSchema;
|
|
148
|
+
/** @deprecated use `PostAuthKeysCodeRequest$outboundSchema` instead. */
|
|
149
|
+
export const outboundSchema = PostAuthKeysCodeRequest$outboundSchema;
|
|
150
|
+
/** @deprecated use `PostAuthKeysCodeRequest$Outbound` instead. */
|
|
151
|
+
export type Outbound = PostAuthKeysCodeRequest$Outbound;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export function postAuthKeysCodeRequestToJSON(
|
|
155
|
+
postAuthKeysCodeRequest: PostAuthKeysCodeRequest,
|
|
156
|
+
): string {
|
|
157
|
+
return JSON.stringify(
|
|
158
|
+
PostAuthKeysCodeRequest$outboundSchema.parse(postAuthKeysCodeRequest),
|
|
159
|
+
);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
export function postAuthKeysCodeRequestFromJSON(
|
|
163
|
+
jsonString: string,
|
|
164
|
+
): SafeParseResult<PostAuthKeysCodeRequest, SDKValidationError> {
|
|
165
|
+
return safeParse(
|
|
166
|
+
jsonString,
|
|
167
|
+
(x) => PostAuthKeysCodeRequest$inboundSchema.parse(JSON.parse(x)),
|
|
168
|
+
`Failed to parse 'PostAuthKeysCodeRequest' from JSON`,
|
|
169
|
+
);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/** @internal */
|
|
173
|
+
export const PostAuthKeysCodeData$inboundSchema: z.ZodType<
|
|
174
|
+
PostAuthKeysCodeData,
|
|
175
|
+
z.ZodTypeDef,
|
|
176
|
+
unknown
|
|
177
|
+
> = z.object({
|
|
178
|
+
id: z.string(),
|
|
179
|
+
app_id: z.number(),
|
|
180
|
+
created_at: z.string(),
|
|
181
|
+
}).transform((v) => {
|
|
182
|
+
return remap$(v, {
|
|
183
|
+
"app_id": "appId",
|
|
184
|
+
"created_at": "createdAt",
|
|
185
|
+
});
|
|
186
|
+
});
|
|
187
|
+
|
|
188
|
+
/** @internal */
|
|
189
|
+
export type PostAuthKeysCodeData$Outbound = {
|
|
190
|
+
id: string;
|
|
191
|
+
app_id: number;
|
|
192
|
+
created_at: string;
|
|
193
|
+
};
|
|
194
|
+
|
|
195
|
+
/** @internal */
|
|
196
|
+
export const PostAuthKeysCodeData$outboundSchema: z.ZodType<
|
|
197
|
+
PostAuthKeysCodeData$Outbound,
|
|
198
|
+
z.ZodTypeDef,
|
|
199
|
+
PostAuthKeysCodeData
|
|
200
|
+
> = z.object({
|
|
201
|
+
id: z.string(),
|
|
202
|
+
appId: z.number(),
|
|
203
|
+
createdAt: z.string(),
|
|
204
|
+
}).transform((v) => {
|
|
205
|
+
return remap$(v, {
|
|
206
|
+
appId: "app_id",
|
|
207
|
+
createdAt: "created_at",
|
|
208
|
+
});
|
|
209
|
+
});
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* @internal
|
|
213
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
214
|
+
*/
|
|
215
|
+
export namespace PostAuthKeysCodeData$ {
|
|
216
|
+
/** @deprecated use `PostAuthKeysCodeData$inboundSchema` instead. */
|
|
217
|
+
export const inboundSchema = PostAuthKeysCodeData$inboundSchema;
|
|
218
|
+
/** @deprecated use `PostAuthKeysCodeData$outboundSchema` instead. */
|
|
219
|
+
export const outboundSchema = PostAuthKeysCodeData$outboundSchema;
|
|
220
|
+
/** @deprecated use `PostAuthKeysCodeData$Outbound` instead. */
|
|
221
|
+
export type Outbound = PostAuthKeysCodeData$Outbound;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
export function postAuthKeysCodeDataToJSON(
|
|
225
|
+
postAuthKeysCodeData: PostAuthKeysCodeData,
|
|
226
|
+
): string {
|
|
227
|
+
return JSON.stringify(
|
|
228
|
+
PostAuthKeysCodeData$outboundSchema.parse(postAuthKeysCodeData),
|
|
229
|
+
);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
export function postAuthKeysCodeDataFromJSON(
|
|
233
|
+
jsonString: string,
|
|
234
|
+
): SafeParseResult<PostAuthKeysCodeData, SDKValidationError> {
|
|
235
|
+
return safeParse(
|
|
236
|
+
jsonString,
|
|
237
|
+
(x) => PostAuthKeysCodeData$inboundSchema.parse(JSON.parse(x)),
|
|
238
|
+
`Failed to parse 'PostAuthKeysCodeData' from JSON`,
|
|
239
|
+
);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/** @internal */
|
|
243
|
+
export const PostAuthKeysCodeResponseBody$inboundSchema: z.ZodType<
|
|
244
|
+
PostAuthKeysCodeResponseBody,
|
|
245
|
+
z.ZodTypeDef,
|
|
246
|
+
unknown
|
|
247
|
+
> = z.object({
|
|
248
|
+
data: z.lazy(() => PostAuthKeysCodeData$inboundSchema),
|
|
249
|
+
});
|
|
250
|
+
|
|
251
|
+
/** @internal */
|
|
252
|
+
export type PostAuthKeysCodeResponseBody$Outbound = {
|
|
253
|
+
data: PostAuthKeysCodeData$Outbound;
|
|
254
|
+
};
|
|
255
|
+
|
|
256
|
+
/** @internal */
|
|
257
|
+
export const PostAuthKeysCodeResponseBody$outboundSchema: z.ZodType<
|
|
258
|
+
PostAuthKeysCodeResponseBody$Outbound,
|
|
259
|
+
z.ZodTypeDef,
|
|
260
|
+
PostAuthKeysCodeResponseBody
|
|
261
|
+
> = z.object({
|
|
262
|
+
data: z.lazy(() => PostAuthKeysCodeData$outboundSchema),
|
|
263
|
+
});
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* @internal
|
|
267
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
268
|
+
*/
|
|
269
|
+
export namespace PostAuthKeysCodeResponseBody$ {
|
|
270
|
+
/** @deprecated use `PostAuthKeysCodeResponseBody$inboundSchema` instead. */
|
|
271
|
+
export const inboundSchema = PostAuthKeysCodeResponseBody$inboundSchema;
|
|
272
|
+
/** @deprecated use `PostAuthKeysCodeResponseBody$outboundSchema` instead. */
|
|
273
|
+
export const outboundSchema = PostAuthKeysCodeResponseBody$outboundSchema;
|
|
274
|
+
/** @deprecated use `PostAuthKeysCodeResponseBody$Outbound` instead. */
|
|
275
|
+
export type Outbound = PostAuthKeysCodeResponseBody$Outbound;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
export function postAuthKeysCodeResponseBodyToJSON(
|
|
279
|
+
postAuthKeysCodeResponseBody: PostAuthKeysCodeResponseBody,
|
|
280
|
+
): string {
|
|
281
|
+
return JSON.stringify(
|
|
282
|
+
PostAuthKeysCodeResponseBody$outboundSchema.parse(
|
|
283
|
+
postAuthKeysCodeResponseBody,
|
|
284
|
+
),
|
|
285
|
+
);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
export function postAuthKeysCodeResponseBodyFromJSON(
|
|
289
|
+
jsonString: string,
|
|
290
|
+
): SafeParseResult<PostAuthKeysCodeResponseBody, SDKValidationError> {
|
|
291
|
+
return safeParse(
|
|
292
|
+
jsonString,
|
|
293
|
+
(x) => PostAuthKeysCodeResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
294
|
+
`Failed to parse 'PostAuthKeysCodeResponseBody' from JSON`,
|
|
295
|
+
);
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
/** @internal */
|
|
299
|
+
export const PostAuthKeysCodeResponse$inboundSchema: z.ZodType<
|
|
300
|
+
PostAuthKeysCodeResponse,
|
|
301
|
+
z.ZodTypeDef,
|
|
302
|
+
unknown
|
|
303
|
+
> = z.union([
|
|
304
|
+
z.lazy(() => PostAuthKeysCodeResponseBody$inboundSchema),
|
|
305
|
+
models.ErrorResponse$inboundSchema,
|
|
306
|
+
]);
|
|
307
|
+
|
|
308
|
+
/** @internal */
|
|
309
|
+
export type PostAuthKeysCodeResponse$Outbound =
|
|
310
|
+
| PostAuthKeysCodeResponseBody$Outbound
|
|
311
|
+
| models.ErrorResponse$Outbound;
|
|
312
|
+
|
|
313
|
+
/** @internal */
|
|
314
|
+
export const PostAuthKeysCodeResponse$outboundSchema: z.ZodType<
|
|
315
|
+
PostAuthKeysCodeResponse$Outbound,
|
|
316
|
+
z.ZodTypeDef,
|
|
317
|
+
PostAuthKeysCodeResponse
|
|
318
|
+
> = z.union([
|
|
319
|
+
z.lazy(() => PostAuthKeysCodeResponseBody$outboundSchema),
|
|
320
|
+
models.ErrorResponse$outboundSchema,
|
|
321
|
+
]);
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* @internal
|
|
325
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
326
|
+
*/
|
|
327
|
+
export namespace PostAuthKeysCodeResponse$ {
|
|
328
|
+
/** @deprecated use `PostAuthKeysCodeResponse$inboundSchema` instead. */
|
|
329
|
+
export const inboundSchema = PostAuthKeysCodeResponse$inboundSchema;
|
|
330
|
+
/** @deprecated use `PostAuthKeysCodeResponse$outboundSchema` instead. */
|
|
331
|
+
export const outboundSchema = PostAuthKeysCodeResponse$outboundSchema;
|
|
332
|
+
/** @deprecated use `PostAuthKeysCodeResponse$Outbound` instead. */
|
|
333
|
+
export type Outbound = PostAuthKeysCodeResponse$Outbound;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
export function postAuthKeysCodeResponseToJSON(
|
|
337
|
+
postAuthKeysCodeResponse: PostAuthKeysCodeResponse,
|
|
338
|
+
): string {
|
|
339
|
+
return JSON.stringify(
|
|
340
|
+
PostAuthKeysCodeResponse$outboundSchema.parse(postAuthKeysCodeResponse),
|
|
341
|
+
);
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
export function postAuthKeysCodeResponseFromJSON(
|
|
345
|
+
jsonString: string,
|
|
346
|
+
): SafeParseResult<PostAuthKeysCodeResponse, SDKValidationError> {
|
|
347
|
+
return safeParse(
|
|
348
|
+
jsonString,
|
|
349
|
+
(x) => PostAuthKeysCodeResponse$inboundSchema.parse(JSON.parse(x)),
|
|
350
|
+
`Failed to parse 'PostAuthKeysCodeResponse' from JSON`,
|
|
351
|
+
);
|
|
352
|
+
}
|
|
@@ -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 PostCreditsCoinbaseSecurity = {
|
|
14
|
+
bearer: string;
|
|
15
|
+
};
|
|
16
|
+
|
|
13
17
|
export const ChainId = {
|
|
14
18
|
One: 1,
|
|
15
19
|
OneHundredAndThirtySeven: 137,
|
|
@@ -69,6 +73,62 @@ export type PostCreditsCoinbaseResponse =
|
|
|
69
73
|
| PostCreditsCoinbaseResponseBody
|
|
70
74
|
| models.ErrorResponse;
|
|
71
75
|
|
|
76
|
+
/** @internal */
|
|
77
|
+
export const PostCreditsCoinbaseSecurity$inboundSchema: z.ZodType<
|
|
78
|
+
PostCreditsCoinbaseSecurity,
|
|
79
|
+
z.ZodTypeDef,
|
|
80
|
+
unknown
|
|
81
|
+
> = z.object({
|
|
82
|
+
bearer: z.string(),
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
/** @internal */
|
|
86
|
+
export type PostCreditsCoinbaseSecurity$Outbound = {
|
|
87
|
+
bearer: string;
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
/** @internal */
|
|
91
|
+
export const PostCreditsCoinbaseSecurity$outboundSchema: z.ZodType<
|
|
92
|
+
PostCreditsCoinbaseSecurity$Outbound,
|
|
93
|
+
z.ZodTypeDef,
|
|
94
|
+
PostCreditsCoinbaseSecurity
|
|
95
|
+
> = z.object({
|
|
96
|
+
bearer: z.string(),
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* @internal
|
|
101
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
102
|
+
*/
|
|
103
|
+
export namespace PostCreditsCoinbaseSecurity$ {
|
|
104
|
+
/** @deprecated use `PostCreditsCoinbaseSecurity$inboundSchema` instead. */
|
|
105
|
+
export const inboundSchema = PostCreditsCoinbaseSecurity$inboundSchema;
|
|
106
|
+
/** @deprecated use `PostCreditsCoinbaseSecurity$outboundSchema` instead. */
|
|
107
|
+
export const outboundSchema = PostCreditsCoinbaseSecurity$outboundSchema;
|
|
108
|
+
/** @deprecated use `PostCreditsCoinbaseSecurity$Outbound` instead. */
|
|
109
|
+
export type Outbound = PostCreditsCoinbaseSecurity$Outbound;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export function postCreditsCoinbaseSecurityToJSON(
|
|
113
|
+
postCreditsCoinbaseSecurity: PostCreditsCoinbaseSecurity,
|
|
114
|
+
): string {
|
|
115
|
+
return JSON.stringify(
|
|
116
|
+
PostCreditsCoinbaseSecurity$outboundSchema.parse(
|
|
117
|
+
postCreditsCoinbaseSecurity,
|
|
118
|
+
),
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export function postCreditsCoinbaseSecurityFromJSON(
|
|
123
|
+
jsonString: string,
|
|
124
|
+
): SafeParseResult<PostCreditsCoinbaseSecurity, SDKValidationError> {
|
|
125
|
+
return safeParse(
|
|
126
|
+
jsonString,
|
|
127
|
+
(x) => PostCreditsCoinbaseSecurity$inboundSchema.parse(JSON.parse(x)),
|
|
128
|
+
`Failed to parse 'PostCreditsCoinbaseSecurity' from JSON`,
|
|
129
|
+
);
|
|
130
|
+
}
|
|
131
|
+
|
|
72
132
|
/** @internal */
|
|
73
133
|
export const ChainId$inboundSchema: z.ZodNativeEnum<typeof ChainId> = z
|
|
74
134
|
.nativeEnum(ChainId);
|