@fern-api/venus-api-sdk 3.0.0 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -12
- package/dist/cjs/BaseClient.d.ts +8 -2
- package/dist/cjs/BaseClient.js +14 -2
- package/dist/cjs/Client.d.ts +10 -10
- package/dist/cjs/Client.js +13 -11
- package/dist/cjs/api/client/healthHealthGet.d.ts +5 -5
- package/dist/cjs/api/client/healthHealthGet.js +2 -2
- package/dist/cjs/api/client/metricsMetricsGet.d.ts +5 -5
- package/dist/cjs/api/client/metricsMetricsGet.js +2 -2
- package/dist/cjs/api/resources/apiKeys/client/Client.d.ts +13 -13
- package/dist/cjs/api/resources/apiKeys/client/Client.js +27 -22
- package/dist/cjs/api/resources/apiKeys/client/create.d.ts +8 -8
- package/dist/cjs/api/resources/apiKeys/client/create.js +3 -3
- package/dist/cjs/api/resources/apiKeys/client/getTokenMetadata.d.ts +8 -8
- package/dist/cjs/api/resources/apiKeys/client/getTokenMetadata.js +3 -3
- package/dist/cjs/api/resources/apiKeys/client/getTokensForOrganization.d.ts +8 -8
- package/dist/cjs/api/resources/apiKeys/client/getTokensForOrganization.js +3 -3
- package/dist/cjs/api/resources/apiKeys/client/revokeToken.d.ts +8 -8
- package/dist/cjs/api/resources/apiKeys/client/revokeToken.js +3 -3
- package/dist/cjs/api/resources/apiKeys/client/revokeTokenById.d.ts +8 -8
- package/dist/cjs/api/resources/apiKeys/client/revokeTokenById.js +3 -3
- package/dist/cjs/api/resources/auth/client/Client.d.ts +9 -9
- package/dist/cjs/api/resources/auth/client/Client.js +17 -14
- package/dist/cjs/api/resources/auth/client/getAutopilotToken.d.ts +8 -8
- package/dist/cjs/api/resources/auth/client/getAutopilotToken.js +3 -3
- package/dist/cjs/api/resources/auth/client/getJwt.d.ts +8 -8
- package/dist/cjs/api/resources/auth/client/getJwt.js +3 -3
- package/dist/cjs/api/resources/auth/client/getOrgForGithubOwner.d.ts +8 -8
- package/dist/cjs/api/resources/auth/client/getOrgForGithubOwner.js +3 -3
- package/dist/cjs/api/resources/organization/client/Client.d.ts +26 -26
- package/dist/cjs/api/resources/organization/client/Client.js +60 -48
- package/dist/cjs/api/resources/organization/client/addUser.d.ts +8 -8
- package/dist/cjs/api/resources/organization/client/addUser.js +3 -3
- package/dist/cjs/api/resources/organization/client/create.d.ts +8 -8
- package/dist/cjs/api/resources/organization/client/create.js +3 -3
- package/dist/cjs/api/resources/organization/client/delete.d.ts +8 -8
- package/dist/cjs/api/resources/organization/client/delete.js +3 -3
- package/dist/cjs/api/resources/organization/client/get.d.ts +8 -8
- package/dist/cjs/api/resources/organization/client/get.js +3 -3
- package/dist/cjs/api/resources/organization/client/getMyOrganizationFromScopedToken.d.ts +8 -8
- package/dist/cjs/api/resources/organization/client/getMyOrganizationFromScopedToken.js +3 -3
- package/dist/cjs/api/resources/organization/client/getOrgIdsByPostmanTeamId.d.ts +8 -8
- package/dist/cjs/api/resources/organization/client/getOrgIdsByPostmanTeamId.js +3 -3
- package/dist/cjs/api/resources/organization/client/getOrgIdsFromToken.d.ts +5 -5
- package/dist/cjs/api/resources/organization/client/getOrgIdsFromToken.js +2 -2
- package/dist/cjs/api/resources/organization/client/getPostmanTeamIdByOrgId.d.ts +8 -8
- package/dist/cjs/api/resources/organization/client/getPostmanTeamIdByOrgId.js +3 -3
- package/dist/cjs/api/resources/organization/client/inviteUser.d.ts +8 -8
- package/dist/cjs/api/resources/organization/client/inviteUser.js +3 -3
- package/dist/cjs/api/resources/organization/client/isMember.d.ts +8 -8
- package/dist/cjs/api/resources/organization/client/isMember.js +3 -3
- package/dist/cjs/api/resources/organization/client/removeUser.d.ts +8 -8
- package/dist/cjs/api/resources/organization/client/removeUser.js +3 -3
- package/dist/cjs/api/resources/organization/client/update.d.ts +8 -8
- package/dist/cjs/api/resources/organization/client/update.js +3 -3
- package/dist/cjs/api/resources/registry/client/Client.d.ts +9 -9
- package/dist/cjs/api/resources/registry/client/Client.js +17 -14
- package/dist/cjs/api/resources/registry/client/generateRegistryTokens.d.ts +8 -8
- package/dist/cjs/api/resources/registry/client/generateRegistryTokens.js +3 -3
- package/dist/cjs/api/resources/registry/client/hasRegistryPermission.d.ts +8 -8
- package/dist/cjs/api/resources/registry/client/hasRegistryPermission.js +3 -3
- package/dist/cjs/api/resources/registry/client/requests/CheckRegistryPermissionRequest.d.ts +2 -2
- package/dist/cjs/api/resources/registry/client/revokeToken.d.ts +8 -8
- package/dist/cjs/api/resources/registry/client/revokeToken.js +3 -3
- package/dist/cjs/api/resources/user/client/Client.d.ts +8 -8
- package/dist/cjs/api/resources/user/client/Client.js +15 -12
- package/dist/cjs/api/resources/user/client/getMyOrganizations.d.ts +8 -8
- package/dist/cjs/api/resources/user/client/getMyOrganizations.js +3 -3
- package/dist/cjs/api/resources/user/client/getMyself.d.ts +5 -5
- package/dist/cjs/api/resources/user/client/getMyself.js +2 -2
- package/dist/cjs/api/resources/user/client/linkAccounts.d.ts +8 -8
- package/dist/cjs/api/resources/user/client/linkAccounts.js +3 -3
- package/dist/cjs/api/types/HttpValidationError.d.ts +2 -2
- package/dist/cjs/api/types/Organization.d.ts +2 -2
- package/dist/cjs/api/types/RegistryToken.d.ts +5 -5
- package/dist/cjs/api/types/RegistryTokens.d.ts +4 -4
- package/dist/cjs/api/types/TokenMetadata.d.ts +2 -2
- package/dist/cjs/api/types/TokenStatus.d.ts +5 -5
- package/dist/cjs/api/types/ValidationError.d.ts +2 -2
- package/dist/cjs/auth/BearerAuthProvider.d.ts +20 -0
- package/dist/cjs/auth/BearerAuthProvider.js +76 -0
- package/dist/cjs/auth/index.d.ts +1 -0
- package/dist/cjs/auth/index.js +5 -0
- package/dist/cjs/core/auth/AuthProvider.d.ts +7 -0
- package/dist/cjs/core/auth/AuthProvider.js +2 -0
- package/dist/cjs/core/auth/AuthRequest.d.ts +9 -0
- package/dist/cjs/core/auth/AuthRequest.js +2 -0
- package/dist/cjs/core/auth/BasicAuth.d.ts +8 -0
- package/dist/cjs/core/auth/BasicAuth.js +27 -0
- package/dist/cjs/core/auth/BearerToken.d.ts +7 -0
- package/dist/cjs/core/auth/BearerToken.js +16 -0
- package/dist/cjs/core/auth/NoOpAuthProvider.d.ts +5 -0
- package/dist/cjs/core/auth/NoOpAuthProvider.js +9 -0
- package/dist/cjs/core/auth/index.d.ts +5 -0
- package/dist/cjs/core/auth/index.js +9 -0
- package/dist/cjs/core/base64.d.ts +2 -0
- package/dist/cjs/core/base64.js +26 -0
- package/dist/cjs/core/index.d.ts +2 -0
- package/dist/cjs/core/index.js +2 -0
- package/dist/cjs/index.d.ts +2 -2
- package/dist/cjs/index.js +3 -3
- package/dist/cjs/serialization/resources/apiKeys/client/getTokensForOrganization.d.ts +2 -2
- package/dist/cjs/serialization/resources/apiKeys/client/requests/CreateApiKeyRequest.d.ts +2 -2
- package/dist/cjs/serialization/resources/apiKeys/client/requests/GetTokenMetadataRequest.d.ts +2 -2
- package/dist/cjs/serialization/resources/apiKeys/client/requests/RevokeApiKeyRequest.d.ts +2 -2
- package/dist/cjs/serialization/resources/auth/client/requests/GetAutopilotTokenRequest.d.ts +2 -2
- package/dist/cjs/serialization/resources/auth/client/requests/GetJwtRequest.d.ts +2 -2
- package/dist/cjs/serialization/resources/organization/client/requests/AddUserToOrgRequest.d.ts +2 -2
- package/dist/cjs/serialization/resources/organization/client/requests/CreateOrganizationRequest.d.ts +2 -2
- package/dist/cjs/serialization/resources/organization/client/requests/InviteUserToOrgRequest.d.ts +2 -2
- package/dist/cjs/serialization/resources/organization/client/requests/RemoveUserFromOrgRequest.d.ts +2 -2
- package/dist/cjs/serialization/resources/organization/client/requests/UpdateOrganizationRequest.d.ts +2 -2
- package/dist/cjs/serialization/resources/registry/client/requests/CheckRegistryPermissionRequest.d.ts +2 -2
- package/dist/cjs/serialization/resources/registry/client/requests/GenerateRegistryTokensRequest.d.ts +2 -2
- package/dist/cjs/serialization/resources/registry/client/requests/RevokeTokenRequest.d.ts +2 -2
- package/dist/cjs/serialization/resources/user/client/requests/LinkAccountsRequest.d.ts +2 -2
- package/dist/cjs/serialization/types/Active.d.ts +2 -2
- package/dist/cjs/serialization/types/CreateOrganizationResponse.d.ts +2 -2
- package/dist/cjs/serialization/types/CreateTokenResponse.d.ts +2 -2
- package/dist/cjs/serialization/types/Expired.d.ts +2 -2
- package/dist/cjs/serialization/types/HttpValidationError.d.ts +2 -2
- package/dist/cjs/serialization/types/JwtResponse.d.ts +2 -2
- package/dist/cjs/serialization/types/LightweightUser.d.ts +2 -2
- package/dist/cjs/serialization/types/LinkAccountsResponse.d.ts +2 -2
- package/dist/cjs/serialization/types/Maven.d.ts +2 -2
- package/dist/cjs/serialization/types/MavenRegistryToken.d.ts +2 -2
- package/dist/cjs/serialization/types/Npm.d.ts +2 -2
- package/dist/cjs/serialization/types/NpmRegistryToken.d.ts +2 -2
- package/dist/cjs/serialization/types/Organization.d.ts +2 -2
- package/dist/cjs/serialization/types/OrganizationsPage.d.ts +2 -2
- package/dist/cjs/serialization/types/Pypi.d.ts +2 -2
- package/dist/cjs/serialization/types/PypiRegistryToken.d.ts +2 -2
- package/dist/cjs/serialization/types/RegistryToken.d.ts +2 -2
- package/dist/cjs/serialization/types/RegistryTokens.d.ts +2 -2
- package/dist/cjs/serialization/types/Revoked.d.ts +2 -2
- package/dist/cjs/serialization/types/TokenMetadata.d.ts +2 -2
- package/dist/cjs/serialization/types/TokenStatus.d.ts +2 -2
- package/dist/cjs/serialization/types/User.d.ts +2 -2
- package/dist/cjs/serialization/types/ValidationError.d.ts +2 -2
- package/dist/cjs/serialization/types/ValidationErrorLocItem.d.ts +2 -2
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.d.mts +8 -2
- package/dist/esm/BaseClient.mjs +13 -2
- package/dist/esm/Client.d.mts +10 -10
- package/dist/esm/Client.mjs +12 -10
- package/dist/esm/api/client/healthHealthGet.d.mts +5 -5
- package/dist/esm/api/client/healthHealthGet.mjs +2 -2
- package/dist/esm/api/client/metricsMetricsGet.d.mts +5 -5
- package/dist/esm/api/client/metricsMetricsGet.mjs +2 -2
- package/dist/esm/api/resources/apiKeys/client/Client.d.mts +13 -13
- package/dist/esm/api/resources/apiKeys/client/Client.mjs +28 -23
- package/dist/esm/api/resources/apiKeys/client/create.d.mts +8 -8
- package/dist/esm/api/resources/apiKeys/client/create.mjs +3 -3
- package/dist/esm/api/resources/apiKeys/client/getTokenMetadata.d.mts +8 -8
- package/dist/esm/api/resources/apiKeys/client/getTokenMetadata.mjs +3 -3
- package/dist/esm/api/resources/apiKeys/client/getTokensForOrganization.d.mts +8 -8
- package/dist/esm/api/resources/apiKeys/client/getTokensForOrganization.mjs +3 -3
- package/dist/esm/api/resources/apiKeys/client/revokeToken.d.mts +8 -8
- package/dist/esm/api/resources/apiKeys/client/revokeToken.mjs +3 -3
- package/dist/esm/api/resources/apiKeys/client/revokeTokenById.d.mts +8 -8
- package/dist/esm/api/resources/apiKeys/client/revokeTokenById.mjs +3 -3
- package/dist/esm/api/resources/auth/client/Client.d.mts +9 -9
- package/dist/esm/api/resources/auth/client/Client.mjs +18 -15
- package/dist/esm/api/resources/auth/client/getAutopilotToken.d.mts +8 -8
- package/dist/esm/api/resources/auth/client/getAutopilotToken.mjs +3 -3
- package/dist/esm/api/resources/auth/client/getJwt.d.mts +8 -8
- package/dist/esm/api/resources/auth/client/getJwt.mjs +3 -3
- package/dist/esm/api/resources/auth/client/getOrgForGithubOwner.d.mts +8 -8
- package/dist/esm/api/resources/auth/client/getOrgForGithubOwner.mjs +3 -3
- package/dist/esm/api/resources/organization/client/Client.d.mts +26 -26
- package/dist/esm/api/resources/organization/client/Client.mjs +61 -49
- package/dist/esm/api/resources/organization/client/addUser.d.mts +8 -8
- package/dist/esm/api/resources/organization/client/addUser.mjs +3 -3
- package/dist/esm/api/resources/organization/client/create.d.mts +8 -8
- package/dist/esm/api/resources/organization/client/create.mjs +3 -3
- package/dist/esm/api/resources/organization/client/delete.d.mts +8 -8
- package/dist/esm/api/resources/organization/client/delete.mjs +3 -3
- package/dist/esm/api/resources/organization/client/get.d.mts +8 -8
- package/dist/esm/api/resources/organization/client/get.mjs +3 -3
- package/dist/esm/api/resources/organization/client/getMyOrganizationFromScopedToken.d.mts +8 -8
- package/dist/esm/api/resources/organization/client/getMyOrganizationFromScopedToken.mjs +3 -3
- package/dist/esm/api/resources/organization/client/getOrgIdsByPostmanTeamId.d.mts +8 -8
- package/dist/esm/api/resources/organization/client/getOrgIdsByPostmanTeamId.mjs +3 -3
- package/dist/esm/api/resources/organization/client/getOrgIdsFromToken.d.mts +5 -5
- package/dist/esm/api/resources/organization/client/getOrgIdsFromToken.mjs +2 -2
- package/dist/esm/api/resources/organization/client/getPostmanTeamIdByOrgId.d.mts +8 -8
- package/dist/esm/api/resources/organization/client/getPostmanTeamIdByOrgId.mjs +3 -3
- package/dist/esm/api/resources/organization/client/inviteUser.d.mts +8 -8
- package/dist/esm/api/resources/organization/client/inviteUser.mjs +3 -3
- package/dist/esm/api/resources/organization/client/isMember.d.mts +8 -8
- package/dist/esm/api/resources/organization/client/isMember.mjs +3 -3
- package/dist/esm/api/resources/organization/client/removeUser.d.mts +8 -8
- package/dist/esm/api/resources/organization/client/removeUser.mjs +3 -3
- package/dist/esm/api/resources/organization/client/update.d.mts +8 -8
- package/dist/esm/api/resources/organization/client/update.mjs +3 -3
- package/dist/esm/api/resources/registry/client/Client.d.mts +9 -9
- package/dist/esm/api/resources/registry/client/Client.mjs +18 -15
- package/dist/esm/api/resources/registry/client/generateRegistryTokens.d.mts +8 -8
- package/dist/esm/api/resources/registry/client/generateRegistryTokens.mjs +3 -3
- package/dist/esm/api/resources/registry/client/hasRegistryPermission.d.mts +8 -8
- package/dist/esm/api/resources/registry/client/hasRegistryPermission.mjs +3 -3
- package/dist/esm/api/resources/registry/client/requests/CheckRegistryPermissionRequest.d.mts +2 -2
- package/dist/esm/api/resources/registry/client/revokeToken.d.mts +8 -8
- package/dist/esm/api/resources/registry/client/revokeToken.mjs +3 -3
- package/dist/esm/api/resources/user/client/Client.d.mts +8 -8
- package/dist/esm/api/resources/user/client/Client.mjs +16 -13
- package/dist/esm/api/resources/user/client/getMyOrganizations.d.mts +8 -8
- package/dist/esm/api/resources/user/client/getMyOrganizations.mjs +3 -3
- package/dist/esm/api/resources/user/client/getMyself.d.mts +5 -5
- package/dist/esm/api/resources/user/client/getMyself.mjs +2 -2
- package/dist/esm/api/resources/user/client/linkAccounts.d.mts +8 -8
- package/dist/esm/api/resources/user/client/linkAccounts.mjs +3 -3
- package/dist/esm/api/types/HttpValidationError.d.mts +2 -2
- package/dist/esm/api/types/Organization.d.mts +2 -2
- package/dist/esm/api/types/RegistryToken.d.mts +5 -5
- package/dist/esm/api/types/RegistryTokens.d.mts +4 -4
- package/dist/esm/api/types/TokenMetadata.d.mts +2 -2
- package/dist/esm/api/types/TokenStatus.d.mts +5 -5
- package/dist/esm/api/types/ValidationError.d.mts +2 -2
- package/dist/esm/auth/BearerAuthProvider.d.mts +20 -0
- package/dist/esm/auth/BearerAuthProvider.mjs +39 -0
- package/dist/esm/auth/index.d.mts +1 -0
- package/dist/esm/auth/index.mjs +1 -0
- package/dist/esm/core/auth/AuthProvider.d.mts +7 -0
- package/dist/esm/core/auth/AuthProvider.mjs +1 -0
- package/dist/esm/core/auth/AuthRequest.d.mts +9 -0
- package/dist/esm/core/auth/AuthRequest.mjs +1 -0
- package/dist/esm/core/auth/BasicAuth.d.mts +8 -0
- package/dist/esm/core/auth/BasicAuth.mjs +24 -0
- package/dist/esm/core/auth/BearerToken.d.mts +7 -0
- package/dist/esm/core/auth/BearerToken.mjs +13 -0
- package/dist/esm/core/auth/NoOpAuthProvider.d.mts +5 -0
- package/dist/esm/core/auth/NoOpAuthProvider.mjs +5 -0
- package/dist/esm/core/auth/index.d.mts +5 -0
- package/dist/esm/core/auth/index.mjs +3 -0
- package/dist/esm/core/base64.d.mts +2 -0
- package/dist/esm/core/base64.mjs +22 -0
- package/dist/esm/core/index.d.mts +2 -0
- package/dist/esm/core/index.mjs +2 -0
- package/dist/esm/index.d.mts +2 -2
- package/dist/esm/index.mjs +2 -2
- package/dist/esm/serialization/resources/apiKeys/client/getTokensForOrganization.d.mts +2 -2
- package/dist/esm/serialization/resources/apiKeys/client/requests/CreateApiKeyRequest.d.mts +2 -2
- package/dist/esm/serialization/resources/apiKeys/client/requests/GetTokenMetadataRequest.d.mts +2 -2
- package/dist/esm/serialization/resources/apiKeys/client/requests/RevokeApiKeyRequest.d.mts +2 -2
- package/dist/esm/serialization/resources/auth/client/requests/GetAutopilotTokenRequest.d.mts +2 -2
- package/dist/esm/serialization/resources/auth/client/requests/GetJwtRequest.d.mts +2 -2
- package/dist/esm/serialization/resources/organization/client/requests/AddUserToOrgRequest.d.mts +2 -2
- package/dist/esm/serialization/resources/organization/client/requests/CreateOrganizationRequest.d.mts +2 -2
- package/dist/esm/serialization/resources/organization/client/requests/InviteUserToOrgRequest.d.mts +2 -2
- package/dist/esm/serialization/resources/organization/client/requests/RemoveUserFromOrgRequest.d.mts +2 -2
- package/dist/esm/serialization/resources/organization/client/requests/UpdateOrganizationRequest.d.mts +2 -2
- package/dist/esm/serialization/resources/registry/client/requests/CheckRegistryPermissionRequest.d.mts +2 -2
- package/dist/esm/serialization/resources/registry/client/requests/GenerateRegistryTokensRequest.d.mts +2 -2
- package/dist/esm/serialization/resources/registry/client/requests/RevokeTokenRequest.d.mts +2 -2
- package/dist/esm/serialization/resources/user/client/requests/LinkAccountsRequest.d.mts +2 -2
- package/dist/esm/serialization/types/Active.d.mts +2 -2
- package/dist/esm/serialization/types/CreateOrganizationResponse.d.mts +2 -2
- package/dist/esm/serialization/types/CreateTokenResponse.d.mts +2 -2
- package/dist/esm/serialization/types/Expired.d.mts +2 -2
- package/dist/esm/serialization/types/HttpValidationError.d.mts +2 -2
- package/dist/esm/serialization/types/JwtResponse.d.mts +2 -2
- package/dist/esm/serialization/types/LightweightUser.d.mts +2 -2
- package/dist/esm/serialization/types/LinkAccountsResponse.d.mts +2 -2
- package/dist/esm/serialization/types/Maven.d.mts +2 -2
- package/dist/esm/serialization/types/MavenRegistryToken.d.mts +2 -2
- package/dist/esm/serialization/types/Npm.d.mts +2 -2
- package/dist/esm/serialization/types/NpmRegistryToken.d.mts +2 -2
- package/dist/esm/serialization/types/Organization.d.mts +2 -2
- package/dist/esm/serialization/types/OrganizationsPage.d.mts +2 -2
- package/dist/esm/serialization/types/Pypi.d.mts +2 -2
- package/dist/esm/serialization/types/PypiRegistryToken.d.mts +2 -2
- package/dist/esm/serialization/types/RegistryToken.d.mts +2 -2
- package/dist/esm/serialization/types/RegistryTokens.d.mts +2 -2
- package/dist/esm/serialization/types/Revoked.d.mts +2 -2
- package/dist/esm/serialization/types/TokenMetadata.d.mts +2 -2
- package/dist/esm/serialization/types/TokenStatus.d.mts +2 -2
- package/dist/esm/serialization/types/User.d.mts +2 -2
- package/dist/esm/serialization/types/ValidationError.d.mts +2 -2
- package/dist/esm/serialization/types/ValidationErrorLocItem.d.mts +2 -2
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +54 -54
package/README.md
CHANGED
|
@@ -38,9 +38,9 @@ A full reference for this library is available [here](https://github.com/fern-ap
|
|
|
38
38
|
Instantiate and use the client with the following:
|
|
39
39
|
|
|
40
40
|
```typescript
|
|
41
|
-
import {
|
|
41
|
+
import { FernVenusApiClient } from "@fern-api/venus-api-sdk";
|
|
42
42
|
|
|
43
|
-
const client = new
|
|
43
|
+
const client = new FernVenusApiClient({ environment: "YOUR_BASE_URL", token: "YOUR_TOKEN" });
|
|
44
44
|
await client.apiKeys.create({
|
|
45
45
|
organizationId: "organizationId"
|
|
46
46
|
});
|
|
@@ -52,9 +52,9 @@ The SDK exports all request and response types as TypeScript interfaces. Simply
|
|
|
52
52
|
following namespace:
|
|
53
53
|
|
|
54
54
|
```typescript
|
|
55
|
-
import {
|
|
55
|
+
import { FernVenusApi } from "@fern-api/venus-api-sdk";
|
|
56
56
|
|
|
57
|
-
const request:
|
|
57
|
+
const request: FernVenusApi.CreateApiKeyRequest = {
|
|
58
58
|
...
|
|
59
59
|
};
|
|
60
60
|
```
|
|
@@ -65,12 +65,12 @@ When the API returns a non-success status code (4xx or 5xx response), a subclass
|
|
|
65
65
|
will be thrown.
|
|
66
66
|
|
|
67
67
|
```typescript
|
|
68
|
-
import {
|
|
68
|
+
import { FernVenusApiError } from "@fern-api/venus-api-sdk";
|
|
69
69
|
|
|
70
70
|
try {
|
|
71
71
|
await client.apiKeys.create(...);
|
|
72
72
|
} catch (err) {
|
|
73
|
-
if (err instanceof
|
|
73
|
+
if (err instanceof FernVenusApiError) {
|
|
74
74
|
console.log(err.statusCode);
|
|
75
75
|
console.log(err.message);
|
|
76
76
|
console.log(err.body);
|
|
@@ -86,9 +86,9 @@ try {
|
|
|
86
86
|
If you would like to send additional headers as part of the request, use the `headers` request option.
|
|
87
87
|
|
|
88
88
|
```typescript
|
|
89
|
-
import {
|
|
89
|
+
import { FernVenusApiClient } from "@fern-api/venus-api-sdk";
|
|
90
90
|
|
|
91
|
-
const client = new
|
|
91
|
+
const client = new FernVenusApiClient({
|
|
92
92
|
...
|
|
93
93
|
headers: {
|
|
94
94
|
'X-Custom-Header': 'custom value'
|
|
@@ -173,9 +173,9 @@ console.log(rawResponse.headers['X-My-Header']);
|
|
|
173
173
|
The SDK supports logging. You can configure the logger by passing in a `logging` object to the client options.
|
|
174
174
|
|
|
175
175
|
```typescript
|
|
176
|
-
import {
|
|
176
|
+
import { FernVenusApiClient, logging } from "@fern-api/venus-api-sdk";
|
|
177
177
|
|
|
178
|
-
const client = new
|
|
178
|
+
const client = new FernVenusApiClient({
|
|
179
179
|
...
|
|
180
180
|
logging: {
|
|
181
181
|
level: logging.LogLevel.Debug, // defaults to logging.LogLevel.Info
|
|
@@ -251,9 +251,9 @@ The SDK provides a way for you to customize the underlying HTTP client / Fetch f
|
|
|
251
251
|
unsupported environment, this provides a way for you to break glass and ensure the SDK works.
|
|
252
252
|
|
|
253
253
|
```typescript
|
|
254
|
-
import {
|
|
254
|
+
import { FernVenusApiClient } from "@fern-api/venus-api-sdk";
|
|
255
255
|
|
|
256
|
-
const client = new
|
|
256
|
+
const client = new FernVenusApiClient({
|
|
257
257
|
...
|
|
258
258
|
fetcher: // provide your implementation here
|
|
259
259
|
});
|
package/dist/cjs/BaseClient.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { BearerAuthProvider } from "./auth/BearerAuthProvider.js";
|
|
1
2
|
import * as core from "./core/index.js";
|
|
2
|
-
export
|
|
3
|
+
export type BaseClientOptions = {
|
|
3
4
|
environment: core.Supplier<string>;
|
|
4
5
|
/** Specify a custom URL to connect the client to. */
|
|
5
6
|
baseUrl?: core.Supplier<string>;
|
|
@@ -13,7 +14,7 @@ export interface BaseClientOptions {
|
|
|
13
14
|
fetch?: typeof fetch;
|
|
14
15
|
/** Configure logging for the client. */
|
|
15
16
|
logging?: core.logging.LogConfig | core.logging.Logger;
|
|
16
|
-
}
|
|
17
|
+
} & BearerAuthProvider.AuthOptions;
|
|
17
18
|
export interface BaseRequestOptions {
|
|
18
19
|
/** The maximum time to wait for a response in seconds. */
|
|
19
20
|
timeoutInSeconds?: number;
|
|
@@ -28,5 +29,10 @@ export interface BaseRequestOptions {
|
|
|
28
29
|
}
|
|
29
30
|
export type NormalizedClientOptions<T extends BaseClientOptions = BaseClientOptions> = T & {
|
|
30
31
|
logging: core.logging.Logger;
|
|
32
|
+
authProvider?: core.AuthProvider;
|
|
33
|
+
};
|
|
34
|
+
export type NormalizedClientOptionsWithAuth<T extends BaseClientOptions = BaseClientOptions> = NormalizedClientOptions<T> & {
|
|
35
|
+
authProvider: core.AuthProvider;
|
|
31
36
|
};
|
|
32
37
|
export declare function normalizeClientOptions<T extends BaseClientOptions = BaseClientOptions>(options: T): NormalizedClientOptions<T>;
|
|
38
|
+
export declare function normalizeClientOptionsWithAuth<T extends BaseClientOptions = BaseClientOptions>(options: T): NormalizedClientOptionsWithAuth<T>;
|
package/dist/cjs/BaseClient.js
CHANGED
|
@@ -35,16 +35,28 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
35
|
})();
|
|
36
36
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
37
|
exports.normalizeClientOptions = normalizeClientOptions;
|
|
38
|
+
exports.normalizeClientOptionsWithAuth = normalizeClientOptionsWithAuth;
|
|
39
|
+
const BearerAuthProvider_js_1 = require("./auth/BearerAuthProvider.js");
|
|
38
40
|
const headers_js_1 = require("./core/headers.js");
|
|
39
41
|
const core = __importStar(require("./core/index.js"));
|
|
40
42
|
function normalizeClientOptions(options) {
|
|
41
43
|
const headers = (0, headers_js_1.mergeHeaders)({
|
|
42
44
|
"X-Fern-Language": "JavaScript",
|
|
43
45
|
"X-Fern-SDK-Name": "@fern-api/venus-api-sdk",
|
|
44
|
-
"X-Fern-SDK-Version": "
|
|
45
|
-
"User-Agent": "@fern-api/venus-api-sdk/
|
|
46
|
+
"X-Fern-SDK-Version": "5.0.0",
|
|
47
|
+
"User-Agent": "@fern-api/venus-api-sdk/5.0.0",
|
|
46
48
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
47
49
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
48
50
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
49
51
|
return Object.assign(Object.assign({}, options), { logging: core.logging.createLogger(options === null || options === void 0 ? void 0 : options.logging), headers });
|
|
50
52
|
}
|
|
53
|
+
function normalizeClientOptionsWithAuth(options) {
|
|
54
|
+
var _a;
|
|
55
|
+
const normalized = normalizeClientOptions(options);
|
|
56
|
+
const normalizedWithNoOpAuthProvider = withNoOpAuthProvider(normalized);
|
|
57
|
+
(_a = normalized.authProvider) !== null && _a !== void 0 ? _a : (normalized.authProvider = new BearerAuthProvider_js_1.BearerAuthProvider(normalizedWithNoOpAuthProvider));
|
|
58
|
+
return normalized;
|
|
59
|
+
}
|
|
60
|
+
function withNoOpAuthProvider(options) {
|
|
61
|
+
return Object.assign(Object.assign({}, options), { authProvider: new core.NoOpAuthProvider() });
|
|
62
|
+
}
|
package/dist/cjs/Client.d.ts
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as FernVenusApi from "./api/index.js";
|
|
2
2
|
import { ApiKeysClient } from "./api/resources/apiKeys/client/Client.js";
|
|
3
3
|
import { AuthClient } from "./api/resources/auth/client/Client.js";
|
|
4
4
|
import { OrganizationClient } from "./api/resources/organization/client/Client.js";
|
|
5
5
|
import { RegistryClient } from "./api/resources/registry/client/Client.js";
|
|
6
6
|
import { UserClient } from "./api/resources/user/client/Client.js";
|
|
7
7
|
import type { BaseClientOptions, BaseRequestOptions } from "./BaseClient.js";
|
|
8
|
-
import { type
|
|
8
|
+
import { type NormalizedClientOptionsWithAuth } from "./BaseClient.js";
|
|
9
9
|
import * as core from "./core/index.js";
|
|
10
|
-
export declare namespace
|
|
10
|
+
export declare namespace FernVenusApiClient {
|
|
11
11
|
type Options = BaseClientOptions;
|
|
12
12
|
interface RequestOptions extends BaseRequestOptions {
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
-
export declare class
|
|
16
|
-
protected readonly _options:
|
|
15
|
+
export declare class FernVenusApiClient {
|
|
16
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<FernVenusApiClient.Options>;
|
|
17
17
|
protected _apiKeys: ApiKeysClient | undefined;
|
|
18
18
|
protected _auth: AuthClient | undefined;
|
|
19
19
|
protected _organization: OrganizationClient | undefined;
|
|
20
20
|
protected _registry: RegistryClient | undefined;
|
|
21
21
|
protected _user: UserClient | undefined;
|
|
22
|
-
constructor(options:
|
|
22
|
+
constructor(options: FernVenusApiClient.Options);
|
|
23
23
|
get apiKeys(): ApiKeysClient;
|
|
24
24
|
get auth(): AuthClient;
|
|
25
25
|
get organization(): OrganizationClient;
|
|
@@ -28,19 +28,19 @@ export declare class FernApiClient {
|
|
|
28
28
|
/**
|
|
29
29
|
* Endpoint that serves Prometheus metrics.
|
|
30
30
|
*
|
|
31
|
-
* @param {
|
|
31
|
+
* @param {FernVenusApiClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
32
32
|
*
|
|
33
33
|
* @example
|
|
34
34
|
* await client.metricsMetricsGet()
|
|
35
35
|
*/
|
|
36
|
-
metricsMetricsGet(requestOptions?:
|
|
36
|
+
metricsMetricsGet(requestOptions?: FernVenusApiClient.RequestOptions): core.HttpResponsePromise<core.APIResponse<unknown, FernVenusApi.metricsMetricsGet.Error>>;
|
|
37
37
|
private __metricsMetricsGet;
|
|
38
38
|
/**
|
|
39
|
-
* @param {
|
|
39
|
+
* @param {FernVenusApiClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
40
40
|
*
|
|
41
41
|
* @example
|
|
42
42
|
* await client.healthHealthGet()
|
|
43
43
|
*/
|
|
44
|
-
healthHealthGet(requestOptions?:
|
|
44
|
+
healthHealthGet(requestOptions?: FernVenusApiClient.RequestOptions): core.HttpResponsePromise<core.APIResponse<unknown, FernVenusApi.healthHealthGet.Error>>;
|
|
45
45
|
private __healthHealthGet;
|
|
46
46
|
}
|
package/dist/cjs/Client.js
CHANGED
|
@@ -43,8 +43,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
43
43
|
});
|
|
44
44
|
};
|
|
45
45
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
|
-
exports.
|
|
47
|
-
const
|
|
46
|
+
exports.FernVenusApiClient = void 0;
|
|
47
|
+
const FernVenusApi = __importStar(require("./api/index.js"));
|
|
48
48
|
const Client_js_1 = require("./api/resources/apiKeys/client/Client.js");
|
|
49
49
|
const Client_js_2 = require("./api/resources/auth/client/Client.js");
|
|
50
50
|
const Client_js_3 = require("./api/resources/organization/client/Client.js");
|
|
@@ -53,9 +53,9 @@ const Client_js_5 = require("./api/resources/user/client/Client.js");
|
|
|
53
53
|
const BaseClient_js_1 = require("./BaseClient.js");
|
|
54
54
|
const headers_js_1 = require("./core/headers.js");
|
|
55
55
|
const core = __importStar(require("./core/index.js"));
|
|
56
|
-
class
|
|
56
|
+
class FernVenusApiClient {
|
|
57
57
|
constructor(options) {
|
|
58
|
-
this._options = (0, BaseClient_js_1.
|
|
58
|
+
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
59
59
|
}
|
|
60
60
|
get apiKeys() {
|
|
61
61
|
var _a;
|
|
@@ -80,7 +80,7 @@ class FernApiClient {
|
|
|
80
80
|
/**
|
|
81
81
|
* Endpoint that serves Prometheus metrics.
|
|
82
82
|
*
|
|
83
|
-
* @param {
|
|
83
|
+
* @param {FernVenusApiClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
84
84
|
*
|
|
85
85
|
* @example
|
|
86
86
|
* await client.metricsMetricsGet()
|
|
@@ -91,7 +91,8 @@ class FernApiClient {
|
|
|
91
91
|
__metricsMetricsGet(requestOptions) {
|
|
92
92
|
return __awaiter(this, void 0, void 0, function* () {
|
|
93
93
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
94
|
-
const
|
|
94
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
95
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
95
96
|
const _response = yield core.fetcher({
|
|
96
97
|
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), "metrics"),
|
|
97
98
|
method: "GET",
|
|
@@ -117,7 +118,7 @@ class FernApiClient {
|
|
|
117
118
|
return {
|
|
118
119
|
data: {
|
|
119
120
|
ok: false,
|
|
120
|
-
error:
|
|
121
|
+
error: FernVenusApi.metricsMetricsGet.Error._unknown(_response.error),
|
|
121
122
|
rawResponse: _response.rawResponse,
|
|
122
123
|
},
|
|
123
124
|
rawResponse: _response.rawResponse,
|
|
@@ -125,7 +126,7 @@ class FernApiClient {
|
|
|
125
126
|
});
|
|
126
127
|
}
|
|
127
128
|
/**
|
|
128
|
-
* @param {
|
|
129
|
+
* @param {FernVenusApiClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
129
130
|
*
|
|
130
131
|
* @example
|
|
131
132
|
* await client.healthHealthGet()
|
|
@@ -136,7 +137,8 @@ class FernApiClient {
|
|
|
136
137
|
__healthHealthGet(requestOptions) {
|
|
137
138
|
return __awaiter(this, void 0, void 0, function* () {
|
|
138
139
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
139
|
-
const
|
|
140
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
141
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
140
142
|
const _response = yield core.fetcher({
|
|
141
143
|
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), "health"),
|
|
142
144
|
method: "GET",
|
|
@@ -162,7 +164,7 @@ class FernApiClient {
|
|
|
162
164
|
return {
|
|
163
165
|
data: {
|
|
164
166
|
ok: false,
|
|
165
|
-
error:
|
|
167
|
+
error: FernVenusApi.healthHealthGet.Error._unknown(_response.error),
|
|
166
168
|
rawResponse: _response.rawResponse,
|
|
167
169
|
},
|
|
168
170
|
rawResponse: _response.rawResponse,
|
|
@@ -170,4 +172,4 @@ class FernApiClient {
|
|
|
170
172
|
});
|
|
171
173
|
}
|
|
172
174
|
}
|
|
173
|
-
exports.
|
|
175
|
+
exports.FernVenusApiClient = FernVenusApiClient;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import type * as core from "../../core/index.js";
|
|
2
|
-
import * as
|
|
3
|
-
export type Error =
|
|
2
|
+
import * as FernVenusApi from "../index.js";
|
|
3
|
+
export type Error = FernVenusApi.healthHealthGet.Error._Unknown;
|
|
4
4
|
export declare namespace Error {
|
|
5
5
|
interface _Unknown extends _Utils {
|
|
6
6
|
statusCode: void;
|
|
7
7
|
content: core.Fetcher.Error;
|
|
8
8
|
}
|
|
9
9
|
interface _Utils {
|
|
10
|
-
_visit: <_Result>(visitor:
|
|
10
|
+
_visit: <_Result>(visitor: FernVenusApi.healthHealthGet.Error._Visitor<_Result>) => _Result;
|
|
11
11
|
}
|
|
12
12
|
interface _Visitor<_Result> {
|
|
13
13
|
_other: (value: core.Fetcher.Error) => _Result;
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
export declare const Error: {
|
|
17
|
-
readonly _unknown: (fetcherError: core.Fetcher.Error) =>
|
|
18
|
-
readonly _visit: <_Result>(value:
|
|
17
|
+
readonly _unknown: (fetcherError: core.Fetcher.Error) => FernVenusApi.healthHealthGet.Error._Unknown;
|
|
18
|
+
readonly _visit: <_Result>(value: FernVenusApi.healthHealthGet.Error, visitor: FernVenusApi.healthHealthGet.Error._Visitor<_Result>) => _Result;
|
|
19
19
|
};
|
|
@@ -35,14 +35,14 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
35
|
})();
|
|
36
36
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
37
|
exports.Error = void 0;
|
|
38
|
-
const
|
|
38
|
+
const FernVenusApi = __importStar(require("../index.js"));
|
|
39
39
|
exports.Error = {
|
|
40
40
|
_unknown: (fetcherError) => {
|
|
41
41
|
return {
|
|
42
42
|
statusCode: undefined,
|
|
43
43
|
content: fetcherError,
|
|
44
44
|
_visit: function (visitor) {
|
|
45
|
-
return
|
|
45
|
+
return FernVenusApi.healthHealthGet.Error._visit(this, visitor);
|
|
46
46
|
},
|
|
47
47
|
};
|
|
48
48
|
},
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import type * as core from "../../core/index.js";
|
|
2
|
-
import * as
|
|
3
|
-
export type Error =
|
|
2
|
+
import * as FernVenusApi from "../index.js";
|
|
3
|
+
export type Error = FernVenusApi.metricsMetricsGet.Error._Unknown;
|
|
4
4
|
export declare namespace Error {
|
|
5
5
|
interface _Unknown extends _Utils {
|
|
6
6
|
statusCode: void;
|
|
7
7
|
content: core.Fetcher.Error;
|
|
8
8
|
}
|
|
9
9
|
interface _Utils {
|
|
10
|
-
_visit: <_Result>(visitor:
|
|
10
|
+
_visit: <_Result>(visitor: FernVenusApi.metricsMetricsGet.Error._Visitor<_Result>) => _Result;
|
|
11
11
|
}
|
|
12
12
|
interface _Visitor<_Result> {
|
|
13
13
|
_other: (value: core.Fetcher.Error) => _Result;
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
export declare const Error: {
|
|
17
|
-
readonly _unknown: (fetcherError: core.Fetcher.Error) =>
|
|
18
|
-
readonly _visit: <_Result>(value:
|
|
17
|
+
readonly _unknown: (fetcherError: core.Fetcher.Error) => FernVenusApi.metricsMetricsGet.Error._Unknown;
|
|
18
|
+
readonly _visit: <_Result>(value: FernVenusApi.metricsMetricsGet.Error, visitor: FernVenusApi.metricsMetricsGet.Error._Visitor<_Result>) => _Result;
|
|
19
19
|
};
|
|
@@ -35,14 +35,14 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
35
|
})();
|
|
36
36
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
37
|
exports.Error = void 0;
|
|
38
|
-
const
|
|
38
|
+
const FernVenusApi = __importStar(require("../index.js"));
|
|
39
39
|
exports.Error = {
|
|
40
40
|
_unknown: (fetcherError) => {
|
|
41
41
|
return {
|
|
42
42
|
statusCode: undefined,
|
|
43
43
|
content: fetcherError,
|
|
44
44
|
_visit: function (visitor) {
|
|
45
|
-
return
|
|
45
|
+
return FernVenusApi.metricsMetricsGet.Error._visit(this, visitor);
|
|
46
46
|
},
|
|
47
47
|
};
|
|
48
48
|
},
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
|
|
2
|
-
import { type
|
|
2
|
+
import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
|
|
3
3
|
import * as core from "../../../../core/index.js";
|
|
4
|
-
import * as
|
|
4
|
+
import * as FernVenusApi from "../../../index.js";
|
|
5
5
|
export declare namespace ApiKeysClient {
|
|
6
6
|
type Options = BaseClientOptions;
|
|
7
7
|
interface RequestOptions extends BaseRequestOptions {
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
10
|
export declare class ApiKeysClient {
|
|
11
|
-
protected readonly _options:
|
|
11
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<ApiKeysClient.Options>;
|
|
12
12
|
constructor(options: ApiKeysClient.Options);
|
|
13
13
|
/**
|
|
14
|
-
* @param {
|
|
14
|
+
* @param {FernVenusApi.CreateApiKeyRequest} request
|
|
15
15
|
* @param {ApiKeysClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
16
16
|
*
|
|
17
17
|
* @example
|
|
@@ -19,10 +19,10 @@ export declare class ApiKeysClient {
|
|
|
19
19
|
* organizationId: "organizationId"
|
|
20
20
|
* })
|
|
21
21
|
*/
|
|
22
|
-
create(request:
|
|
22
|
+
create(request: FernVenusApi.CreateApiKeyRequest, requestOptions?: ApiKeysClient.RequestOptions): core.HttpResponsePromise<core.APIResponse<FernVenusApi.CreateTokenResponse, FernVenusApi.apiKeys.create.Error>>;
|
|
23
23
|
private __create;
|
|
24
24
|
/**
|
|
25
|
-
* @param {
|
|
25
|
+
* @param {FernVenusApi.GetTokenMetadataRequest} request
|
|
26
26
|
* @param {ApiKeysClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
27
27
|
*
|
|
28
28
|
* @example
|
|
@@ -30,10 +30,10 @@ export declare class ApiKeysClient {
|
|
|
30
30
|
* token: "token"
|
|
31
31
|
* })
|
|
32
32
|
*/
|
|
33
|
-
getTokenMetadata(request:
|
|
33
|
+
getTokenMetadata(request: FernVenusApi.GetTokenMetadataRequest, requestOptions?: ApiKeysClient.RequestOptions): core.HttpResponsePromise<core.APIResponse<FernVenusApi.TokenMetadata, FernVenusApi.apiKeys.getTokenMetadata.Error>>;
|
|
34
34
|
private __getTokenMetadata;
|
|
35
35
|
/**
|
|
36
|
-
* @param {
|
|
36
|
+
* @param {FernVenusApi.GetTokensForOrganizationApiKeysOrganizationOrganizationIdGetRequest} request
|
|
37
37
|
* @param {ApiKeysClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
38
38
|
*
|
|
39
39
|
* @example
|
|
@@ -41,10 +41,10 @@ export declare class ApiKeysClient {
|
|
|
41
41
|
* organizationId: "organization_id"
|
|
42
42
|
* })
|
|
43
43
|
*/
|
|
44
|
-
getTokensForOrganization(request:
|
|
44
|
+
getTokensForOrganization(request: FernVenusApi.GetTokensForOrganizationApiKeysOrganizationOrganizationIdGetRequest, requestOptions?: ApiKeysClient.RequestOptions): core.HttpResponsePromise<core.APIResponse<FernVenusApi.TokenMetadata[], FernVenusApi.apiKeys.getTokensForOrganization.Error>>;
|
|
45
45
|
private __getTokensForOrganization;
|
|
46
46
|
/**
|
|
47
|
-
* @param {
|
|
47
|
+
* @param {FernVenusApi.RevokeTokenByIdApiKeysRevokeTokenIdPostRequest} request
|
|
48
48
|
* @param {ApiKeysClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
49
49
|
*
|
|
50
50
|
* @example
|
|
@@ -52,10 +52,10 @@ export declare class ApiKeysClient {
|
|
|
52
52
|
* tokenId: "token_id"
|
|
53
53
|
* })
|
|
54
54
|
*/
|
|
55
|
-
revokeTokenById(request:
|
|
55
|
+
revokeTokenById(request: FernVenusApi.RevokeTokenByIdApiKeysRevokeTokenIdPostRequest, requestOptions?: ApiKeysClient.RequestOptions): core.HttpResponsePromise<core.APIResponse<void, FernVenusApi.apiKeys.revokeTokenById.Error>>;
|
|
56
56
|
private __revokeTokenById;
|
|
57
57
|
/**
|
|
58
|
-
* @param {
|
|
58
|
+
* @param {FernVenusApi.RevokeApiKeyRequest} request
|
|
59
59
|
* @param {ApiKeysClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
60
60
|
*
|
|
61
61
|
* @example
|
|
@@ -63,6 +63,6 @@ export declare class ApiKeysClient {
|
|
|
63
63
|
* token: "token"
|
|
64
64
|
* })
|
|
65
65
|
*/
|
|
66
|
-
revokeToken(request:
|
|
66
|
+
revokeToken(request: FernVenusApi.RevokeApiKeyRequest, requestOptions?: ApiKeysClient.RequestOptions): core.HttpResponsePromise<core.APIResponse<void, FernVenusApi.apiKeys.revokeToken.Error>>;
|
|
67
67
|
private __revokeToken;
|
|
68
68
|
}
|
|
@@ -48,13 +48,13 @@ const BaseClient_js_1 = require("../../../../BaseClient.js");
|
|
|
48
48
|
const headers_js_1 = require("../../../../core/headers.js");
|
|
49
49
|
const core = __importStar(require("../../../../core/index.js"));
|
|
50
50
|
const serializers = __importStar(require("../../../../serialization/index.js"));
|
|
51
|
-
const
|
|
51
|
+
const FernVenusApi = __importStar(require("../../../index.js"));
|
|
52
52
|
class ApiKeysClient {
|
|
53
53
|
constructor(options) {
|
|
54
|
-
this._options = (0, BaseClient_js_1.
|
|
54
|
+
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
55
55
|
}
|
|
56
56
|
/**
|
|
57
|
-
* @param {
|
|
57
|
+
* @param {FernVenusApi.CreateApiKeyRequest} request
|
|
58
58
|
* @param {ApiKeysClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
59
59
|
*
|
|
60
60
|
* @example
|
|
@@ -68,7 +68,8 @@ class ApiKeysClient {
|
|
|
68
68
|
__create(request, requestOptions) {
|
|
69
69
|
return __awaiter(this, void 0, void 0, function* () {
|
|
70
70
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
71
|
-
const
|
|
71
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
72
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
72
73
|
const _response = yield core.fetcher({
|
|
73
74
|
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), "api-keys/create"),
|
|
74
75
|
method: "POST",
|
|
@@ -109,7 +110,7 @@ class ApiKeysClient {
|
|
|
109
110
|
return {
|
|
110
111
|
data: {
|
|
111
112
|
ok: false,
|
|
112
|
-
error:
|
|
113
|
+
error: FernVenusApi.apiKeys.create.Error.unprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
113
114
|
unrecognizedObjectKeys: "passthrough",
|
|
114
115
|
allowUnrecognizedUnionMembers: true,
|
|
115
116
|
allowUnrecognizedEnumValues: true,
|
|
@@ -125,7 +126,7 @@ class ApiKeysClient {
|
|
|
125
126
|
return {
|
|
126
127
|
data: {
|
|
127
128
|
ok: false,
|
|
128
|
-
error:
|
|
129
|
+
error: FernVenusApi.apiKeys.create.Error._unknown(_response.error),
|
|
129
130
|
rawResponse: _response.rawResponse,
|
|
130
131
|
},
|
|
131
132
|
rawResponse: _response.rawResponse,
|
|
@@ -133,7 +134,7 @@ class ApiKeysClient {
|
|
|
133
134
|
});
|
|
134
135
|
}
|
|
135
136
|
/**
|
|
136
|
-
* @param {
|
|
137
|
+
* @param {FernVenusApi.GetTokenMetadataRequest} request
|
|
137
138
|
* @param {ApiKeysClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
138
139
|
*
|
|
139
140
|
* @example
|
|
@@ -147,7 +148,8 @@ class ApiKeysClient {
|
|
|
147
148
|
__getTokenMetadata(request, requestOptions) {
|
|
148
149
|
return __awaiter(this, void 0, void 0, function* () {
|
|
149
150
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
150
|
-
const
|
|
151
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
152
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
151
153
|
const _response = yield core.fetcher({
|
|
152
154
|
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), "api-keys/metadata"),
|
|
153
155
|
method: "POST",
|
|
@@ -188,7 +190,7 @@ class ApiKeysClient {
|
|
|
188
190
|
return {
|
|
189
191
|
data: {
|
|
190
192
|
ok: false,
|
|
191
|
-
error:
|
|
193
|
+
error: FernVenusApi.apiKeys.getTokenMetadata.Error.unprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
192
194
|
unrecognizedObjectKeys: "passthrough",
|
|
193
195
|
allowUnrecognizedUnionMembers: true,
|
|
194
196
|
allowUnrecognizedEnumValues: true,
|
|
@@ -204,7 +206,7 @@ class ApiKeysClient {
|
|
|
204
206
|
return {
|
|
205
207
|
data: {
|
|
206
208
|
ok: false,
|
|
207
|
-
error:
|
|
209
|
+
error: FernVenusApi.apiKeys.getTokenMetadata.Error._unknown(_response.error),
|
|
208
210
|
rawResponse: _response.rawResponse,
|
|
209
211
|
},
|
|
210
212
|
rawResponse: _response.rawResponse,
|
|
@@ -212,7 +214,7 @@ class ApiKeysClient {
|
|
|
212
214
|
});
|
|
213
215
|
}
|
|
214
216
|
/**
|
|
215
|
-
* @param {
|
|
217
|
+
* @param {FernVenusApi.GetTokensForOrganizationApiKeysOrganizationOrganizationIdGetRequest} request
|
|
216
218
|
* @param {ApiKeysClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
217
219
|
*
|
|
218
220
|
* @example
|
|
@@ -227,7 +229,8 @@ class ApiKeysClient {
|
|
|
227
229
|
return __awaiter(this, void 0, void 0, function* () {
|
|
228
230
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
229
231
|
const { organizationId } = request;
|
|
230
|
-
const
|
|
232
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
233
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
231
234
|
const _response = yield core.fetcher({
|
|
232
235
|
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), `api-keys/organization/${core.url.encodePathParam(organizationId)}`),
|
|
233
236
|
method: "GET",
|
|
@@ -262,7 +265,7 @@ class ApiKeysClient {
|
|
|
262
265
|
return {
|
|
263
266
|
data: {
|
|
264
267
|
ok: false,
|
|
265
|
-
error:
|
|
268
|
+
error: FernVenusApi.apiKeys.getTokensForOrganization.Error.unprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
266
269
|
unrecognizedObjectKeys: "passthrough",
|
|
267
270
|
allowUnrecognizedUnionMembers: true,
|
|
268
271
|
allowUnrecognizedEnumValues: true,
|
|
@@ -278,7 +281,7 @@ class ApiKeysClient {
|
|
|
278
281
|
return {
|
|
279
282
|
data: {
|
|
280
283
|
ok: false,
|
|
281
|
-
error:
|
|
284
|
+
error: FernVenusApi.apiKeys.getTokensForOrganization.Error._unknown(_response.error),
|
|
282
285
|
rawResponse: _response.rawResponse,
|
|
283
286
|
},
|
|
284
287
|
rawResponse: _response.rawResponse,
|
|
@@ -286,7 +289,7 @@ class ApiKeysClient {
|
|
|
286
289
|
});
|
|
287
290
|
}
|
|
288
291
|
/**
|
|
289
|
-
* @param {
|
|
292
|
+
* @param {FernVenusApi.RevokeTokenByIdApiKeysRevokeTokenIdPostRequest} request
|
|
290
293
|
* @param {ApiKeysClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
291
294
|
*
|
|
292
295
|
* @example
|
|
@@ -301,7 +304,8 @@ class ApiKeysClient {
|
|
|
301
304
|
return __awaiter(this, void 0, void 0, function* () {
|
|
302
305
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
303
306
|
const { tokenId } = request;
|
|
304
|
-
const
|
|
307
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
308
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
305
309
|
const _response = yield core.fetcher({
|
|
306
310
|
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), `api-keys/revoke/${core.url.encodePathParam(tokenId)}`),
|
|
307
311
|
method: "POST",
|
|
@@ -330,7 +334,7 @@ class ApiKeysClient {
|
|
|
330
334
|
return {
|
|
331
335
|
data: {
|
|
332
336
|
ok: false,
|
|
333
|
-
error:
|
|
337
|
+
error: FernVenusApi.apiKeys.revokeTokenById.Error.unprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
334
338
|
unrecognizedObjectKeys: "passthrough",
|
|
335
339
|
allowUnrecognizedUnionMembers: true,
|
|
336
340
|
allowUnrecognizedEnumValues: true,
|
|
@@ -346,7 +350,7 @@ class ApiKeysClient {
|
|
|
346
350
|
return {
|
|
347
351
|
data: {
|
|
348
352
|
ok: false,
|
|
349
|
-
error:
|
|
353
|
+
error: FernVenusApi.apiKeys.revokeTokenById.Error._unknown(_response.error),
|
|
350
354
|
rawResponse: _response.rawResponse,
|
|
351
355
|
},
|
|
352
356
|
rawResponse: _response.rawResponse,
|
|
@@ -354,7 +358,7 @@ class ApiKeysClient {
|
|
|
354
358
|
});
|
|
355
359
|
}
|
|
356
360
|
/**
|
|
357
|
-
* @param {
|
|
361
|
+
* @param {FernVenusApi.RevokeApiKeyRequest} request
|
|
358
362
|
* @param {ApiKeysClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
359
363
|
*
|
|
360
364
|
* @example
|
|
@@ -368,7 +372,8 @@ class ApiKeysClient {
|
|
|
368
372
|
__revokeToken(request, requestOptions) {
|
|
369
373
|
return __awaiter(this, void 0, void 0, function* () {
|
|
370
374
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
371
|
-
const
|
|
375
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
376
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
372
377
|
const _response = yield core.fetcher({
|
|
373
378
|
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), "api-keys/revoke"),
|
|
374
379
|
method: "POST",
|
|
@@ -403,7 +408,7 @@ class ApiKeysClient {
|
|
|
403
408
|
return {
|
|
404
409
|
data: {
|
|
405
410
|
ok: false,
|
|
406
|
-
error:
|
|
411
|
+
error: FernVenusApi.apiKeys.revokeToken.Error.unprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
407
412
|
unrecognizedObjectKeys: "passthrough",
|
|
408
413
|
allowUnrecognizedUnionMembers: true,
|
|
409
414
|
allowUnrecognizedEnumValues: true,
|
|
@@ -419,7 +424,7 @@ class ApiKeysClient {
|
|
|
419
424
|
return {
|
|
420
425
|
data: {
|
|
421
426
|
ok: false,
|
|
422
|
-
error:
|
|
427
|
+
error: FernVenusApi.apiKeys.revokeToken.Error._unknown(_response.error),
|
|
423
428
|
rawResponse: _response.rawResponse,
|
|
424
429
|
},
|
|
425
430
|
rawResponse: _response.rawResponse,
|