@fern-api/venus-api-sdk 0.22.4-3-g76792b3 → 0.22.34
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 +270 -0
- package/dist/cjs/BaseClient.d.ts +17 -4
- package/dist/cjs/BaseClient.js +59 -0
- package/dist/cjs/Client.d.ts +19 -16
- package/dist/cjs/Client.js +15 -50
- package/dist/cjs/api/resources/apiKeys/client/Client.d.ts +16 -17
- package/dist/cjs/api/resources/apiKeys/client/Client.js +41 -34
- package/dist/cjs/api/resources/apiKeys/client/create.js +1 -1
- package/dist/cjs/api/resources/apiKeys/client/getTokenMetadata.js +1 -1
- package/dist/cjs/api/resources/apiKeys/client/getTokensForOrganization.js +1 -1
- package/dist/cjs/api/resources/apiKeys/client/revokeToken.js +1 -1
- package/dist/cjs/api/resources/apiKeys/client/revokeTokenById.js +1 -1
- package/dist/cjs/api/resources/auth/client/Client.d.ts +69 -0
- package/dist/cjs/api/resources/auth/client/Client.js +295 -0
- package/dist/cjs/api/resources/auth/client/getAutopilotToken.d.ts +24 -0
- package/dist/cjs/api/resources/auth/client/getAutopilotToken.js +65 -0
- package/dist/cjs/api/resources/auth/client/getJwt.d.ts +24 -0
- package/dist/cjs/api/resources/auth/client/getJwt.js +65 -0
- package/dist/cjs/api/resources/auth/client/getOrgForGithubOwner.d.ts +19 -0
- package/dist/cjs/api/resources/auth/client/getOrgForGithubOwner.js +55 -0
- package/dist/cjs/api/resources/auth/client/index.d.ts +4 -0
- package/dist/cjs/api/resources/auth/client/index.js +43 -0
- package/dist/cjs/api/resources/auth/client/requests/GetAutopilotTokenRequest.d.ts +22 -0
- package/dist/cjs/api/resources/auth/client/requests/GetAutopilotTokenRequest.js +3 -0
- package/dist/cjs/api/resources/auth/client/requests/GetJwtRequest.d.ts +16 -0
- package/dist/cjs/api/resources/auth/client/requests/GetJwtRequest.js +3 -0
- package/dist/cjs/api/resources/auth/client/requests/index.d.ts +2 -0
- package/dist/cjs/api/resources/auth/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/auth/index.d.ts +2 -0
- package/dist/cjs/api/resources/auth/index.js +18 -0
- package/dist/cjs/api/resources/auth/types/JwtResponse.d.ts +11 -0
- package/dist/cjs/api/resources/auth/types/JwtResponse.js +3 -0
- package/dist/cjs/api/resources/auth/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/auth/types/index.js +17 -0
- package/dist/cjs/api/resources/index.d.ts +3 -0
- package/dist/cjs/api/resources/index.js +4 -1
- package/dist/cjs/api/resources/organization/client/Client.d.ts +37 -27
- package/dist/cjs/api/resources/organization/client/Client.js +152 -60
- package/dist/cjs/api/resources/organization/client/addUser.js +1 -1
- package/dist/cjs/api/resources/organization/client/create.js +1 -1
- package/dist/cjs/api/resources/organization/client/delete.js +1 -1
- package/dist/cjs/api/resources/organization/client/get.js +1 -1
- package/dist/cjs/api/resources/organization/client/getByPostmanTeamId.d.ts +24 -0
- package/dist/cjs/api/resources/organization/client/getByPostmanTeamId.js +65 -0
- package/dist/cjs/api/resources/organization/client/getMyOrganizationFromScopedToken.js +1 -1
- package/dist/cjs/api/resources/organization/client/getOrgIdsFromToken.js +1 -1
- package/dist/cjs/api/resources/organization/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/organization/client/index.js +2 -1
- package/dist/cjs/api/resources/organization/client/inviteUser.js +1 -1
- package/dist/cjs/api/resources/organization/client/isMember.js +1 -1
- package/dist/cjs/api/resources/organization/client/removeUser.js +1 -1
- package/dist/cjs/api/resources/organization/client/requests/CreateOrganizationRequest.d.ts +8 -0
- package/dist/cjs/api/resources/organization/client/update.js +1 -1
- package/dist/cjs/api/resources/organization/types/Organization.d.ts +2 -0
- package/dist/cjs/api/resources/registry/client/Client.d.ts +12 -13
- package/dist/cjs/api/resources/registry/client/Client.js +28 -26
- package/dist/cjs/api/resources/registry/client/generateRegistryTokens.d.ts +6 -1
- package/dist/cjs/api/resources/registry/client/generateRegistryTokens.js +11 -1
- package/dist/cjs/api/resources/registry/client/hasRegistryPermission.js +1 -1
- package/dist/cjs/api/resources/registry/client/revokeToken.d.ts +6 -1
- package/dist/cjs/api/resources/registry/client/revokeToken.js +11 -1
- package/dist/cjs/api/resources/user/client/Client.d.ts +12 -13
- package/dist/cjs/api/resources/user/client/Client.js +27 -25
- package/dist/cjs/api/resources/user/client/getMyOrganizations.js +1 -1
- package/dist/cjs/api/resources/user/client/getMyself.js +1 -1
- package/dist/cjs/api/resources/user/client/linkAccounts.js +1 -1
- 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 +4 -1
- package/dist/cjs/core/auth/BearerToken.d.ts +3 -1
- package/dist/cjs/core/auth/BearerToken.js +7 -6
- 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 +1 -0
- package/dist/cjs/core/auth/index.js +3 -1
- package/dist/cjs/core/exports.d.ts +1 -0
- package/dist/cjs/core/exports.js +17 -0
- package/dist/cjs/core/fetcher/BinaryResponse.d.ts +6 -7
- package/dist/cjs/core/fetcher/EndpointSupplier.d.ts +2 -2
- package/dist/cjs/core/fetcher/Fetcher.d.ts +10 -4
- package/dist/cjs/core/fetcher/Fetcher.js +210 -10
- package/dist/cjs/core/fetcher/getRequestBody.d.ts +1 -1
- package/dist/cjs/core/fetcher/getRequestBody.js +4 -0
- package/dist/cjs/core/fetcher/getResponseBody.js +18 -4
- package/dist/cjs/core/fetcher/makeRequest.d.ts +1 -1
- package/dist/cjs/core/fetcher/makeRequest.js +0 -2
- package/dist/cjs/core/fetcher/requestWithRetries.js +0 -9
- package/dist/cjs/core/fetcher/signals.d.ts +1 -7
- package/dist/cjs/core/fetcher/signals.js +0 -12
- package/dist/cjs/core/headers.d.ts +2 -2
- package/dist/cjs/core/headers.js +6 -4
- package/dist/cjs/core/index.d.ts +1 -0
- package/dist/cjs/core/index.js +2 -1
- package/dist/cjs/core/logging/exports.d.ts +18 -0
- package/dist/cjs/core/logging/exports.js +45 -0
- package/dist/cjs/core/logging/index.d.ts +1 -0
- package/dist/cjs/core/logging/index.js +17 -0
- package/dist/cjs/core/logging/logger.d.ts +126 -0
- package/dist/cjs/core/logging/logger.js +144 -0
- package/dist/cjs/core/runtime/runtime.js +11 -10
- package/dist/cjs/core/schemas/Schema.d.ts +1 -0
- package/dist/cjs/core/schemas/Schema.js +1 -0
- package/dist/cjs/core/schemas/builders/object/object.js +34 -3
- package/dist/cjs/core/schemas/builders/primitives/index.d.ts +1 -0
- package/dist/cjs/core/schemas/builders/primitives/index.js +3 -1
- package/dist/cjs/core/schemas/builders/primitives/never.d.ts +2 -0
- package/dist/cjs/core/schemas/builders/primitives/never.js +14 -0
- package/dist/cjs/core/url/join.js +0 -1
- package/dist/cjs/exports.d.ts +1 -0
- package/dist/cjs/exports.js +17 -0
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.js +4 -0
- package/dist/cjs/serialization/resources/auth/client/getAutopilotToken.d.ts +10 -0
- package/dist/cjs/serialization/resources/auth/client/getAutopilotToken.js +66 -0
- package/dist/cjs/serialization/resources/auth/client/getJwt.d.ts +10 -0
- package/dist/cjs/serialization/resources/auth/client/getJwt.js +66 -0
- package/dist/cjs/serialization/resources/auth/client/getOrgForGithubOwner.d.ts +8 -0
- package/dist/cjs/serialization/resources/auth/client/getOrgForGithubOwner.js +6 -0
- package/dist/cjs/serialization/resources/auth/client/index.d.ts +4 -0
- package/dist/cjs/serialization/resources/auth/client/index.js +43 -0
- package/dist/cjs/serialization/resources/auth/client/requests/GetAutopilotTokenRequest.d.ts +11 -0
- package/dist/cjs/serialization/resources/auth/client/requests/GetAutopilotTokenRequest.js +43 -0
- package/dist/cjs/serialization/resources/auth/client/requests/GetJwtRequest.d.ts +10 -0
- package/dist/cjs/serialization/resources/auth/client/requests/GetJwtRequest.js +42 -0
- package/dist/cjs/serialization/resources/auth/client/requests/index.d.ts +2 -0
- package/dist/cjs/serialization/resources/auth/client/requests/index.js +7 -0
- package/dist/cjs/serialization/resources/auth/index.d.ts +2 -0
- package/dist/cjs/serialization/resources/auth/index.js +18 -0
- package/dist/cjs/serialization/resources/auth/types/JwtResponse.d.ts +10 -0
- package/dist/cjs/serialization/resources/auth/types/JwtResponse.js +42 -0
- package/dist/cjs/serialization/resources/auth/types/index.d.ts +1 -0
- package/dist/cjs/serialization/resources/auth/types/index.js +17 -0
- package/dist/cjs/serialization/resources/index.d.ts +3 -0
- package/dist/cjs/serialization/resources/index.js +4 -1
- package/dist/cjs/serialization/resources/organization/client/getByPostmanTeamId.d.ts +10 -0
- package/dist/cjs/serialization/resources/organization/client/getByPostmanTeamId.js +66 -0
- package/dist/cjs/serialization/resources/organization/client/index.d.ts +1 -0
- package/dist/cjs/serialization/resources/organization/client/index.js +2 -1
- package/dist/cjs/serialization/resources/organization/client/requests/CreateOrganizationRequest.d.ts +2 -0
- package/dist/cjs/serialization/resources/organization/client/requests/CreateOrganizationRequest.js +2 -0
- package/dist/cjs/serialization/resources/organization/types/Organization.d.ts +1 -0
- package/dist/cjs/serialization/resources/organization/types/Organization.js +1 -0
- package/dist/cjs/serialization/resources/registry/client/generateRegistryTokens.d.ts +4 -1
- package/dist/cjs/serialization/resources/registry/client/generateRegistryTokens.js +3 -0
- package/dist/cjs/serialization/resources/registry/client/revokeToken.d.ts +4 -1
- package/dist/cjs/serialization/resources/registry/client/revokeToken.js +3 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.d.mts +17 -4
- package/dist/esm/BaseClient.mjs +24 -1
- package/dist/esm/Client.d.mts +19 -16
- package/dist/esm/Client.mjs +16 -18
- package/dist/esm/api/resources/apiKeys/client/Client.d.mts +16 -17
- package/dist/esm/api/resources/apiKeys/client/Client.mjs +40 -33
- package/dist/esm/api/resources/apiKeys/client/create.mjs +1 -1
- package/dist/esm/api/resources/apiKeys/client/getTokenMetadata.mjs +1 -1
- package/dist/esm/api/resources/apiKeys/client/getTokensForOrganization.mjs +1 -1
- package/dist/esm/api/resources/apiKeys/client/revokeToken.mjs +1 -1
- package/dist/esm/api/resources/apiKeys/client/revokeTokenById.mjs +1 -1
- package/dist/esm/api/resources/auth/client/Client.d.mts +69 -0
- package/dist/esm/api/resources/auth/client/Client.mjs +258 -0
- package/dist/esm/api/resources/auth/client/getAutopilotToken.d.mts +24 -0
- package/dist/esm/api/resources/auth/client/getAutopilotToken.mjs +29 -0
- package/dist/esm/api/resources/auth/client/getJwt.d.mts +24 -0
- package/dist/esm/api/resources/auth/client/getJwt.mjs +29 -0
- package/dist/esm/api/resources/auth/client/getOrgForGithubOwner.d.mts +19 -0
- package/dist/esm/api/resources/auth/client/getOrgForGithubOwner.mjs +19 -0
- package/dist/esm/api/resources/auth/client/index.d.mts +4 -0
- package/dist/esm/api/resources/auth/client/index.mjs +4 -0
- package/dist/esm/api/resources/auth/client/requests/GetAutopilotTokenRequest.d.mts +22 -0
- package/dist/esm/api/resources/auth/client/requests/GetAutopilotTokenRequest.mjs +2 -0
- package/dist/esm/api/resources/auth/client/requests/GetJwtRequest.d.mts +16 -0
- package/dist/esm/api/resources/auth/client/requests/GetJwtRequest.mjs +2 -0
- package/dist/esm/api/resources/auth/client/requests/index.d.mts +2 -0
- package/dist/esm/api/resources/auth/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/auth/index.d.mts +2 -0
- package/dist/esm/api/resources/auth/index.mjs +2 -0
- package/dist/esm/api/resources/auth/types/JwtResponse.d.mts +11 -0
- package/dist/esm/api/resources/auth/types/JwtResponse.mjs +2 -0
- package/dist/esm/api/resources/auth/types/index.d.mts +1 -0
- package/dist/esm/api/resources/auth/types/index.mjs +1 -0
- package/dist/esm/api/resources/index.d.mts +3 -0
- package/dist/esm/api/resources/index.mjs +3 -0
- package/dist/esm/api/resources/organization/client/Client.d.mts +37 -27
- package/dist/esm/api/resources/organization/client/Client.mjs +151 -59
- package/dist/esm/api/resources/organization/client/addUser.mjs +1 -1
- package/dist/esm/api/resources/organization/client/create.mjs +1 -1
- package/dist/esm/api/resources/organization/client/delete.mjs +1 -1
- package/dist/esm/api/resources/organization/client/get.mjs +1 -1
- package/dist/esm/api/resources/organization/client/getByPostmanTeamId.d.mts +24 -0
- package/dist/esm/api/resources/organization/client/getByPostmanTeamId.mjs +29 -0
- package/dist/esm/api/resources/organization/client/getMyOrganizationFromScopedToken.mjs +1 -1
- package/dist/esm/api/resources/organization/client/getOrgIdsFromToken.mjs +1 -1
- package/dist/esm/api/resources/organization/client/index.d.mts +1 -0
- package/dist/esm/api/resources/organization/client/index.mjs +1 -0
- package/dist/esm/api/resources/organization/client/inviteUser.mjs +1 -1
- package/dist/esm/api/resources/organization/client/isMember.mjs +1 -1
- package/dist/esm/api/resources/organization/client/removeUser.mjs +1 -1
- package/dist/esm/api/resources/organization/client/requests/CreateOrganizationRequest.d.mts +8 -0
- package/dist/esm/api/resources/organization/client/update.mjs +1 -1
- package/dist/esm/api/resources/organization/types/Organization.d.mts +2 -0
- package/dist/esm/api/resources/registry/client/Client.d.mts +12 -13
- package/dist/esm/api/resources/registry/client/Client.mjs +27 -25
- package/dist/esm/api/resources/registry/client/generateRegistryTokens.d.mts +6 -1
- package/dist/esm/api/resources/registry/client/generateRegistryTokens.mjs +11 -1
- package/dist/esm/api/resources/registry/client/hasRegistryPermission.mjs +1 -1
- package/dist/esm/api/resources/registry/client/revokeToken.d.mts +6 -1
- package/dist/esm/api/resources/registry/client/revokeToken.mjs +11 -1
- package/dist/esm/api/resources/user/client/Client.d.mts +12 -13
- package/dist/esm/api/resources/user/client/Client.mjs +26 -24
- package/dist/esm/api/resources/user/client/getMyOrganizations.mjs +1 -1
- package/dist/esm/api/resources/user/client/getMyself.mjs +1 -1
- package/dist/esm/api/resources/user/client/linkAccounts.mjs +1 -1
- 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 +4 -1
- package/dist/esm/core/auth/BearerToken.d.mts +3 -1
- package/dist/esm/core/auth/BearerToken.mjs +7 -6
- 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 +1 -0
- package/dist/esm/core/auth/index.mjs +1 -0
- package/dist/esm/core/exports.d.mts +1 -0
- package/dist/esm/core/exports.mjs +1 -0
- package/dist/esm/core/fetcher/BinaryResponse.d.mts +6 -7
- package/dist/esm/core/fetcher/EndpointSupplier.d.mts +2 -2
- package/dist/esm/core/fetcher/Fetcher.d.mts +10 -4
- package/dist/esm/core/fetcher/Fetcher.mjs +210 -10
- package/dist/esm/core/fetcher/getRequestBody.d.mts +1 -1
- package/dist/esm/core/fetcher/getRequestBody.mjs +4 -0
- package/dist/esm/core/fetcher/getResponseBody.mjs +18 -4
- package/dist/esm/core/fetcher/makeRequest.d.mts +1 -1
- package/dist/esm/core/fetcher/makeRequest.mjs +0 -2
- package/dist/esm/core/fetcher/requestWithRetries.mjs +0 -9
- package/dist/esm/core/fetcher/signals.d.mts +1 -7
- package/dist/esm/core/fetcher/signals.mjs +0 -12
- package/dist/esm/core/headers.d.mts +2 -2
- package/dist/esm/core/headers.mjs +6 -4
- package/dist/esm/core/index.d.mts +1 -0
- package/dist/esm/core/index.mjs +1 -0
- package/dist/esm/core/logging/exports.d.mts +18 -0
- package/dist/esm/core/logging/exports.mjs +9 -0
- package/dist/esm/core/logging/index.d.mts +1 -0
- package/dist/esm/core/logging/index.mjs +1 -0
- package/dist/esm/core/logging/logger.d.mts +126 -0
- package/dist/esm/core/logging/logger.mjs +138 -0
- package/dist/esm/core/runtime/runtime.mjs +11 -10
- package/dist/esm/core/schemas/Schema.d.mts +1 -0
- package/dist/esm/core/schemas/Schema.mjs +1 -0
- package/dist/esm/core/schemas/builders/object/object.mjs +34 -3
- package/dist/esm/core/schemas/builders/primitives/index.d.mts +1 -0
- package/dist/esm/core/schemas/builders/primitives/index.mjs +1 -0
- package/dist/esm/core/schemas/builders/primitives/never.d.mts +2 -0
- package/dist/esm/core/schemas/builders/primitives/never.mjs +11 -0
- package/dist/esm/core/url/join.mjs +0 -1
- package/dist/esm/exports.d.mts +1 -0
- package/dist/esm/exports.mjs +1 -0
- package/dist/esm/index.d.mts +1 -0
- package/dist/esm/index.mjs +1 -0
- package/dist/esm/serialization/resources/auth/client/getAutopilotToken.d.mts +10 -0
- package/dist/esm/serialization/resources/auth/client/getAutopilotToken.mjs +30 -0
- package/dist/esm/serialization/resources/auth/client/getJwt.d.mts +10 -0
- package/dist/esm/serialization/resources/auth/client/getJwt.mjs +30 -0
- package/dist/esm/serialization/resources/auth/client/getOrgForGithubOwner.d.mts +8 -0
- package/dist/esm/serialization/resources/auth/client/getOrgForGithubOwner.mjs +3 -0
- package/dist/esm/serialization/resources/auth/client/index.d.mts +4 -0
- package/dist/esm/serialization/resources/auth/client/index.mjs +4 -0
- package/dist/esm/serialization/resources/auth/client/requests/GetAutopilotTokenRequest.d.mts +11 -0
- package/dist/esm/serialization/resources/auth/client/requests/GetAutopilotTokenRequest.mjs +7 -0
- package/dist/esm/serialization/resources/auth/client/requests/GetJwtRequest.d.mts +10 -0
- package/dist/esm/serialization/resources/auth/client/requests/GetJwtRequest.mjs +6 -0
- package/dist/esm/serialization/resources/auth/client/requests/index.d.mts +2 -0
- package/dist/esm/serialization/resources/auth/client/requests/index.mjs +2 -0
- package/dist/esm/serialization/resources/auth/index.d.mts +2 -0
- package/dist/esm/serialization/resources/auth/index.mjs +2 -0
- package/dist/esm/serialization/resources/auth/types/JwtResponse.d.mts +10 -0
- package/dist/esm/serialization/resources/auth/types/JwtResponse.mjs +6 -0
- package/dist/esm/serialization/resources/auth/types/index.d.mts +1 -0
- package/dist/esm/serialization/resources/auth/types/index.mjs +1 -0
- package/dist/esm/serialization/resources/index.d.mts +3 -0
- package/dist/esm/serialization/resources/index.mjs +3 -0
- package/dist/esm/serialization/resources/organization/client/getByPostmanTeamId.d.mts +10 -0
- package/dist/esm/serialization/resources/organization/client/getByPostmanTeamId.mjs +30 -0
- package/dist/esm/serialization/resources/organization/client/index.d.mts +1 -0
- package/dist/esm/serialization/resources/organization/client/index.mjs +1 -0
- package/dist/esm/serialization/resources/organization/client/requests/CreateOrganizationRequest.d.mts +2 -0
- package/dist/esm/serialization/resources/organization/client/requests/CreateOrganizationRequest.mjs +2 -0
- package/dist/esm/serialization/resources/organization/types/Organization.d.mts +1 -0
- package/dist/esm/serialization/resources/organization/types/Organization.mjs +1 -0
- package/dist/esm/serialization/resources/registry/client/generateRegistryTokens.d.mts +4 -1
- package/dist/esm/serialization/resources/registry/client/generateRegistryTokens.mjs +3 -0
- package/dist/esm/serialization/resources/registry/client/revokeToken.d.mts +4 -1
- package/dist/esm/serialization/resources/registry/client/revokeToken.mjs +3 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +8 -3
- package/reference.md +1369 -0
- package/dist/cjs/core/fetcher/ResponseWithBody.d.ts +0 -4
- package/dist/cjs/core/fetcher/ResponseWithBody.js +0 -6
- package/dist/esm/core/fetcher/ResponseWithBody.d.mts +0 -4
- package/dist/esm/core/fetcher/ResponseWithBody.mjs +0 -3
package/README.md
ADDED
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
# Fern TypeScript Library
|
|
2
|
+
|
|
3
|
+
[](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2Ffern-api%2Fvenus-node)
|
|
4
|
+
[](https://www.npmjs.com/package/@fern-api/venus-api-sdk)
|
|
5
|
+
|
|
6
|
+
The Fern TypeScript library provides convenient access to the Fern APIs from TypeScript.
|
|
7
|
+
|
|
8
|
+
## Table of Contents
|
|
9
|
+
|
|
10
|
+
- [Installation](#installation)
|
|
11
|
+
- [Reference](#reference)
|
|
12
|
+
- [Usage](#usage)
|
|
13
|
+
- [Request and Response Types](#request-and-response-types)
|
|
14
|
+
- [Exception Handling](#exception-handling)
|
|
15
|
+
- [Advanced](#advanced)
|
|
16
|
+
- [Additional Headers](#additional-headers)
|
|
17
|
+
- [Additional Query String Parameters](#additional-query-string-parameters)
|
|
18
|
+
- [Retries](#retries)
|
|
19
|
+
- [Timeouts](#timeouts)
|
|
20
|
+
- [Aborting Requests](#aborting-requests)
|
|
21
|
+
- [Access Raw Response Data](#access-raw-response-data)
|
|
22
|
+
- [Logging](#logging)
|
|
23
|
+
- [Runtime Compatibility](#runtime-compatibility)
|
|
24
|
+
- [Contributing](#contributing)
|
|
25
|
+
|
|
26
|
+
## Installation
|
|
27
|
+
|
|
28
|
+
```sh
|
|
29
|
+
npm i -s @fern-api/venus-api-sdk
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Reference
|
|
33
|
+
|
|
34
|
+
A full reference for this library is available [here](https://github.com/fern-api/venus-node/blob/HEAD/./reference.md).
|
|
35
|
+
|
|
36
|
+
## Usage
|
|
37
|
+
|
|
38
|
+
Instantiate and use the client with the following:
|
|
39
|
+
|
|
40
|
+
```typescript
|
|
41
|
+
import { FernVenusApiClient } from "@fern-api/venus-api-sdk";
|
|
42
|
+
|
|
43
|
+
const client = new FernVenusApiClient({ token: "YOUR_TOKEN" });
|
|
44
|
+
await client.apiKeys.create({
|
|
45
|
+
organizationId: "missing-org-id"
|
|
46
|
+
});
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Request and Response Types
|
|
50
|
+
|
|
51
|
+
The SDK exports all request and response types as TypeScript interfaces. Simply import them with the
|
|
52
|
+
following namespace:
|
|
53
|
+
|
|
54
|
+
```typescript
|
|
55
|
+
import { FernVenusApi } from "@fern-api/venus-api-sdk";
|
|
56
|
+
|
|
57
|
+
const request: FernVenusApi.CreateApiKeyRequest = {
|
|
58
|
+
...
|
|
59
|
+
};
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Exception Handling
|
|
63
|
+
|
|
64
|
+
When the API returns a non-success status code (4xx or 5xx response), a subclass of the following error
|
|
65
|
+
will be thrown.
|
|
66
|
+
|
|
67
|
+
```typescript
|
|
68
|
+
import { FernVenusApiError } from "@fern-api/venus-api-sdk";
|
|
69
|
+
|
|
70
|
+
try {
|
|
71
|
+
await client.apiKeys.create(...);
|
|
72
|
+
} catch (err) {
|
|
73
|
+
if (err instanceof FernVenusApiError) {
|
|
74
|
+
console.log(err.statusCode);
|
|
75
|
+
console.log(err.message);
|
|
76
|
+
console.log(err.body);
|
|
77
|
+
console.log(err.rawResponse);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## Advanced
|
|
83
|
+
|
|
84
|
+
### Additional Headers
|
|
85
|
+
|
|
86
|
+
If you would like to send additional headers as part of the request, use the `headers` request option.
|
|
87
|
+
|
|
88
|
+
```typescript
|
|
89
|
+
import { FernVenusApiClient } from "@fern-api/venus-api-sdk";
|
|
90
|
+
|
|
91
|
+
const client = new FernVenusApiClient({
|
|
92
|
+
...
|
|
93
|
+
headers: {
|
|
94
|
+
'X-Custom-Header': 'custom value'
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
const response = await client.apiKeys.create(..., {
|
|
99
|
+
headers: {
|
|
100
|
+
'X-Custom-Header': 'custom value'
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### Additional Query String Parameters
|
|
106
|
+
|
|
107
|
+
If you would like to send additional query string parameters as part of the request, use the `queryParams` request option.
|
|
108
|
+
|
|
109
|
+
```typescript
|
|
110
|
+
const response = await client.apiKeys.create(..., {
|
|
111
|
+
queryParams: {
|
|
112
|
+
'customQueryParamKey': 'custom query param value'
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### Retries
|
|
118
|
+
|
|
119
|
+
The SDK is instrumented with automatic retries with exponential backoff. A request will be retried as long
|
|
120
|
+
as the request is deemed retryable and the number of retry attempts has not grown larger than the configured
|
|
121
|
+
retry limit (default: 2).
|
|
122
|
+
|
|
123
|
+
A request is deemed retryable when any of the following HTTP status codes is returned:
|
|
124
|
+
|
|
125
|
+
- [408](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408) (Timeout)
|
|
126
|
+
- [429](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) (Too Many Requests)
|
|
127
|
+
- [5XX](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500) (Internal Server Errors)
|
|
128
|
+
|
|
129
|
+
Use the `maxRetries` request option to configure this behavior.
|
|
130
|
+
|
|
131
|
+
```typescript
|
|
132
|
+
const response = await client.apiKeys.create(..., {
|
|
133
|
+
maxRetries: 0 // override maxRetries at the request level
|
|
134
|
+
});
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### Timeouts
|
|
138
|
+
|
|
139
|
+
The SDK defaults to a 60 second timeout. Use the `timeoutInSeconds` option to configure this behavior.
|
|
140
|
+
|
|
141
|
+
```typescript
|
|
142
|
+
const response = await client.apiKeys.create(..., {
|
|
143
|
+
timeoutInSeconds: 30 // override timeout to 30s
|
|
144
|
+
});
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### Aborting Requests
|
|
148
|
+
|
|
149
|
+
The SDK allows users to abort requests at any point by passing in an abort signal.
|
|
150
|
+
|
|
151
|
+
```typescript
|
|
152
|
+
const controller = new AbortController();
|
|
153
|
+
const response = await client.apiKeys.create(..., {
|
|
154
|
+
abortSignal: controller.signal
|
|
155
|
+
});
|
|
156
|
+
controller.abort(); // aborts the request
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
### Access Raw Response Data
|
|
160
|
+
|
|
161
|
+
The SDK provides access to raw response data, including headers, through the `.withRawResponse()` method.
|
|
162
|
+
The `.withRawResponse()` method returns a promise that results to an object with a `data` and a `rawResponse` property.
|
|
163
|
+
|
|
164
|
+
```typescript
|
|
165
|
+
const { data, rawResponse } = await client.apiKeys.create(...).withRawResponse();
|
|
166
|
+
|
|
167
|
+
console.log(data);
|
|
168
|
+
console.log(rawResponse.headers['X-My-Header']);
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### Logging
|
|
172
|
+
|
|
173
|
+
The SDK supports logging. You can configure the logger by passing in a `logging` object to the client options.
|
|
174
|
+
|
|
175
|
+
```typescript
|
|
176
|
+
import { FernVenusApiClient, logging } from "@fern-api/venus-api-sdk";
|
|
177
|
+
|
|
178
|
+
const client = new FernVenusApiClient({
|
|
179
|
+
...
|
|
180
|
+
logging: {
|
|
181
|
+
level: logging.LogLevel.Debug, // defaults to logging.LogLevel.Info
|
|
182
|
+
logger: new logging.ConsoleLogger(), // defaults to ConsoleLogger
|
|
183
|
+
silent: false, // defaults to true, set to false to enable logging
|
|
184
|
+
}
|
|
185
|
+
});
|
|
186
|
+
```
|
|
187
|
+
The `logging` object can have the following properties:
|
|
188
|
+
- `level`: The log level to use. Defaults to `logging.LogLevel.Info`.
|
|
189
|
+
- `logger`: The logger to use. Defaults to a `logging.ConsoleLogger`.
|
|
190
|
+
- `silent`: Whether to silence the logger. Defaults to `true`.
|
|
191
|
+
|
|
192
|
+
The `level` property can be one of the following values:
|
|
193
|
+
- `logging.LogLevel.Debug`
|
|
194
|
+
- `logging.LogLevel.Info`
|
|
195
|
+
- `logging.LogLevel.Warn`
|
|
196
|
+
- `logging.LogLevel.Error`
|
|
197
|
+
|
|
198
|
+
To provide a custom logger, you can pass in an object that implements the `logging.ILogger` interface.
|
|
199
|
+
|
|
200
|
+
<details>
|
|
201
|
+
<summary>Custom logger examples</summary>
|
|
202
|
+
|
|
203
|
+
Here's an example using the popular `winston` logging library.
|
|
204
|
+
```ts
|
|
205
|
+
import winston from 'winston';
|
|
206
|
+
|
|
207
|
+
const winstonLogger = winston.createLogger({...});
|
|
208
|
+
|
|
209
|
+
const logger: logging.ILogger = {
|
|
210
|
+
debug: (msg, ...args) => winstonLogger.debug(msg, ...args),
|
|
211
|
+
info: (msg, ...args) => winstonLogger.info(msg, ...args),
|
|
212
|
+
warn: (msg, ...args) => winstonLogger.warn(msg, ...args),
|
|
213
|
+
error: (msg, ...args) => winstonLogger.error(msg, ...args),
|
|
214
|
+
};
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
Here's an example using the popular `pino` logging library.
|
|
218
|
+
|
|
219
|
+
```ts
|
|
220
|
+
import pino from 'pino';
|
|
221
|
+
|
|
222
|
+
const pinoLogger = pino({...});
|
|
223
|
+
|
|
224
|
+
const logger: logging.ILogger = {
|
|
225
|
+
debug: (msg, ...args) => pinoLogger.debug(args, msg),
|
|
226
|
+
info: (msg, ...args) => pinoLogger.info(args, msg),
|
|
227
|
+
warn: (msg, ...args) => pinoLogger.warn(args, msg),
|
|
228
|
+
error: (msg, ...args) => pinoLogger.error(args, msg),
|
|
229
|
+
};
|
|
230
|
+
```
|
|
231
|
+
</details>
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
### Runtime Compatibility
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
The SDK works in the following runtimes:
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
- Node.js 18+
|
|
242
|
+
- Vercel
|
|
243
|
+
- Cloudflare Workers
|
|
244
|
+
- Deno v1.25+
|
|
245
|
+
- Bun 1.0+
|
|
246
|
+
- React Native
|
|
247
|
+
|
|
248
|
+
### Customizing Fetch Client
|
|
249
|
+
|
|
250
|
+
The SDK provides a way for you to customize the underlying HTTP client / Fetch function. If you're running in an
|
|
251
|
+
unsupported environment, this provides a way for you to break glass and ensure the SDK works.
|
|
252
|
+
|
|
253
|
+
```typescript
|
|
254
|
+
import { FernVenusApiClient } from "@fern-api/venus-api-sdk";
|
|
255
|
+
|
|
256
|
+
const client = new FernVenusApiClient({
|
|
257
|
+
...
|
|
258
|
+
fetcher: // provide your implementation here
|
|
259
|
+
});
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
## Contributing
|
|
263
|
+
|
|
264
|
+
While we value open-source contributions to this SDK, this library is generated programmatically.
|
|
265
|
+
Additions made directly to this library would have to be moved over to our generation code,
|
|
266
|
+
otherwise they would be overwritten upon the next generated release. Feel free to open a PR as
|
|
267
|
+
a proof of concept, but know that we will not be able to merge it as-is. We suggest opening
|
|
268
|
+
an issue first to discuss with us!
|
|
269
|
+
|
|
270
|
+
On the other hand, contributions to the README are always very welcome!
|
package/dist/cjs/BaseClient.d.ts
CHANGED
|
@@ -1,17 +1,21 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { BearerAuthProvider } from "./auth/BearerAuthProvider.js";
|
|
2
|
+
import * as core from "./core/index.js";
|
|
2
3
|
import type * as environments from "./environments.js";
|
|
3
|
-
export
|
|
4
|
+
export type BaseClientOptions = {
|
|
4
5
|
environment?: core.Supplier<environments.FernVenusApiEnvironment | string>;
|
|
5
6
|
/** Specify a custom URL to connect the client to. */
|
|
6
7
|
baseUrl?: core.Supplier<string>;
|
|
7
|
-
token?: core.Supplier<core.BearerToken | undefined>;
|
|
8
8
|
/** Additional headers to include in requests. */
|
|
9
9
|
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
10
10
|
/** The default maximum time to wait for a response in seconds. */
|
|
11
11
|
timeoutInSeconds?: number;
|
|
12
12
|
/** The default number of times to retry the request. Defaults to 2. */
|
|
13
13
|
maxRetries?: number;
|
|
14
|
-
|
|
14
|
+
/** Provide a custom fetch implementation. Useful for platforms that don't have a built-in fetch or need a custom implementation. */
|
|
15
|
+
fetch?: typeof fetch;
|
|
16
|
+
/** Configure logging for the client. */
|
|
17
|
+
logging?: core.logging.LogConfig | core.logging.Logger;
|
|
18
|
+
} & BearerAuthProvider.AuthOptions;
|
|
15
19
|
export interface BaseRequestOptions {
|
|
16
20
|
/** The maximum time to wait for a response in seconds. */
|
|
17
21
|
timeoutInSeconds?: number;
|
|
@@ -24,3 +28,12 @@ export interface BaseRequestOptions {
|
|
|
24
28
|
/** Additional headers to include in the request. */
|
|
25
29
|
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
26
30
|
}
|
|
31
|
+
export type NormalizedClientOptions<T extends BaseClientOptions = BaseClientOptions> = T & {
|
|
32
|
+
logging: core.logging.Logger;
|
|
33
|
+
authProvider?: core.AuthProvider;
|
|
34
|
+
};
|
|
35
|
+
export type NormalizedClientOptionsWithAuth<T extends BaseClientOptions = BaseClientOptions> = NormalizedClientOptions<T> & {
|
|
36
|
+
authProvider: core.AuthProvider;
|
|
37
|
+
};
|
|
38
|
+
export declare function normalizeClientOptions<T extends BaseClientOptions = BaseClientOptions>(options: T): NormalizedClientOptions<T>;
|
|
39
|
+
export declare function normalizeClientOptionsWithAuth<T extends BaseClientOptions = BaseClientOptions>(options: T): NormalizedClientOptionsWithAuth<T>;
|
package/dist/cjs/BaseClient.js
CHANGED
|
@@ -1,3 +1,62 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
3
36
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
exports.normalizeClientOptions = normalizeClientOptions;
|
|
38
|
+
exports.normalizeClientOptionsWithAuth = normalizeClientOptionsWithAuth;
|
|
39
|
+
const BearerAuthProvider_js_1 = require("./auth/BearerAuthProvider.js");
|
|
40
|
+
const headers_js_1 = require("./core/headers.js");
|
|
41
|
+
const core = __importStar(require("./core/index.js"));
|
|
42
|
+
function normalizeClientOptions(options) {
|
|
43
|
+
const headers = (0, headers_js_1.mergeHeaders)({
|
|
44
|
+
"X-Fern-Language": "JavaScript",
|
|
45
|
+
"X-Fern-SDK-Name": "@fern-api/venus-api-sdk",
|
|
46
|
+
"X-Fern-SDK-Version": "0.22.34-6-gfbf1677",
|
|
47
|
+
"User-Agent": "@fern-api/venus-api-sdk/0.22.34-6-gfbf1677",
|
|
48
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
49
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
50
|
+
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
51
|
+
return Object.assign(Object.assign({}, options), { logging: core.logging.createLogger(options === null || options === void 0 ? void 0 : options.logging), headers });
|
|
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,23 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { ApiKeysClient } from "./api/resources/apiKeys/client/Client.js";
|
|
2
|
+
import { AuthClient } from "./api/resources/auth/client/Client.js";
|
|
3
|
+
import { OrganizationClient } from "./api/resources/organization/client/Client.js";
|
|
4
|
+
import { RegistryClient } from "./api/resources/registry/client/Client.js";
|
|
5
|
+
import { UserClient } from "./api/resources/user/client/Client.js";
|
|
5
6
|
import type { BaseClientOptions, BaseRequestOptions } from "./BaseClient.js";
|
|
7
|
+
import { type NormalizedClientOptionsWithAuth } from "./BaseClient.js";
|
|
6
8
|
export declare namespace FernVenusApiClient {
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
+
type Options = BaseClientOptions;
|
|
9
10
|
interface RequestOptions extends BaseRequestOptions {
|
|
10
11
|
}
|
|
11
12
|
}
|
|
12
13
|
export declare class FernVenusApiClient {
|
|
13
|
-
protected readonly _options: FernVenusApiClient.Options
|
|
14
|
-
protected _apiKeys:
|
|
15
|
-
protected
|
|
16
|
-
protected
|
|
17
|
-
protected
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
get
|
|
21
|
-
get
|
|
22
|
-
get
|
|
14
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<FernVenusApiClient.Options>;
|
|
15
|
+
protected _apiKeys: ApiKeysClient | undefined;
|
|
16
|
+
protected _auth: AuthClient | undefined;
|
|
17
|
+
protected _organization: OrganizationClient | undefined;
|
|
18
|
+
protected _registry: RegistryClient | undefined;
|
|
19
|
+
protected _user: UserClient | undefined;
|
|
20
|
+
constructor(options?: FernVenusApiClient.Options);
|
|
21
|
+
get apiKeys(): ApiKeysClient;
|
|
22
|
+
get auth(): AuthClient;
|
|
23
|
+
get organization(): OrganizationClient;
|
|
24
|
+
get registry(): RegistryClient;
|
|
25
|
+
get user(): UserClient;
|
|
23
26
|
}
|
package/dist/cjs/Client.js
CHANGED
|
@@ -1,71 +1,36 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
-
if (k2 === undefined) k2 = k;
|
|
5
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
-
}
|
|
9
|
-
Object.defineProperty(o, k2, desc);
|
|
10
|
-
}) : (function(o, m, k, k2) {
|
|
11
|
-
if (k2 === undefined) k2 = k;
|
|
12
|
-
o[k2] = m[k];
|
|
13
|
-
}));
|
|
14
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
-
}) : function(o, v) {
|
|
17
|
-
o["default"] = v;
|
|
18
|
-
});
|
|
19
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
-
var ownKeys = function(o) {
|
|
21
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
-
var ar = [];
|
|
23
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
-
return ar;
|
|
25
|
-
};
|
|
26
|
-
return ownKeys(o);
|
|
27
|
-
};
|
|
28
|
-
return function (mod) {
|
|
29
|
-
if (mod && mod.__esModule) return mod;
|
|
30
|
-
var result = {};
|
|
31
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
-
__setModuleDefault(result, mod);
|
|
33
|
-
return result;
|
|
34
|
-
};
|
|
35
|
-
})();
|
|
36
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
4
|
exports.FernVenusApiClient = void 0;
|
|
38
5
|
const Client_js_1 = require("./api/resources/apiKeys/client/Client.js");
|
|
39
|
-
const Client_js_2 = require("./api/resources/
|
|
40
|
-
const Client_js_3 = require("./api/resources/
|
|
41
|
-
const Client_js_4 = require("./api/resources/
|
|
42
|
-
const
|
|
43
|
-
const
|
|
6
|
+
const Client_js_2 = require("./api/resources/auth/client/Client.js");
|
|
7
|
+
const Client_js_3 = require("./api/resources/organization/client/Client.js");
|
|
8
|
+
const Client_js_4 = require("./api/resources/registry/client/Client.js");
|
|
9
|
+
const Client_js_5 = require("./api/resources/user/client/Client.js");
|
|
10
|
+
const BaseClient_js_1 = require("./BaseClient.js");
|
|
44
11
|
class FernVenusApiClient {
|
|
45
|
-
constructor(
|
|
46
|
-
this._options =
|
|
47
|
-
"X-Fern-Language": "JavaScript",
|
|
48
|
-
"X-Fern-SDK-Name": "@fern-api/venus-api-sdk",
|
|
49
|
-
"X-Fern-SDK-Version": "0.22.4-3-g76792b3",
|
|
50
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
51
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
52
|
-
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
12
|
+
constructor(options = {}) {
|
|
13
|
+
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
53
14
|
}
|
|
54
15
|
get apiKeys() {
|
|
55
16
|
var _a;
|
|
56
|
-
return ((_a = this._apiKeys) !== null && _a !== void 0 ? _a : (this._apiKeys = new Client_js_1.
|
|
17
|
+
return ((_a = this._apiKeys) !== null && _a !== void 0 ? _a : (this._apiKeys = new Client_js_1.ApiKeysClient(this._options)));
|
|
18
|
+
}
|
|
19
|
+
get auth() {
|
|
20
|
+
var _a;
|
|
21
|
+
return ((_a = this._auth) !== null && _a !== void 0 ? _a : (this._auth = new Client_js_2.AuthClient(this._options)));
|
|
57
22
|
}
|
|
58
23
|
get organization() {
|
|
59
24
|
var _a;
|
|
60
|
-
return ((_a = this._organization) !== null && _a !== void 0 ? _a : (this._organization = new
|
|
25
|
+
return ((_a = this._organization) !== null && _a !== void 0 ? _a : (this._organization = new Client_js_3.OrganizationClient(this._options)));
|
|
61
26
|
}
|
|
62
27
|
get registry() {
|
|
63
28
|
var _a;
|
|
64
|
-
return ((_a = this._registry) !== null && _a !== void 0 ? _a : (this._registry = new
|
|
29
|
+
return ((_a = this._registry) !== null && _a !== void 0 ? _a : (this._registry = new Client_js_4.RegistryClient(this._options)));
|
|
65
30
|
}
|
|
66
31
|
get user() {
|
|
67
32
|
var _a;
|
|
68
|
-
return ((_a = this._user) !== null && _a !== void 0 ? _a : (this._user = new
|
|
33
|
+
return ((_a = this._user) !== null && _a !== void 0 ? _a : (this._user = new Client_js_5.UserClient(this._options)));
|
|
69
34
|
}
|
|
70
35
|
}
|
|
71
36
|
exports.FernVenusApiClient = FernVenusApiClient;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
|
|
2
|
+
import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
|
|
2
3
|
import * as core from "../../../../core/index.js";
|
|
3
4
|
import * as FernVenusApi from "../../../index.js";
|
|
4
|
-
export declare namespace
|
|
5
|
-
|
|
6
|
-
}
|
|
5
|
+
export declare namespace ApiKeysClient {
|
|
6
|
+
type Options = BaseClientOptions;
|
|
7
7
|
interface RequestOptions extends BaseRequestOptions {
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
|
-
export declare class
|
|
11
|
-
protected readonly _options:
|
|
12
|
-
constructor(
|
|
10
|
+
export declare class ApiKeysClient {
|
|
11
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<ApiKeysClient.Options>;
|
|
12
|
+
constructor(options?: ApiKeysClient.Options);
|
|
13
13
|
/**
|
|
14
14
|
* @param {FernVenusApi.CreateApiKeyRequest} request
|
|
15
|
-
* @param {
|
|
15
|
+
* @param {ApiKeysClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
16
16
|
*
|
|
17
17
|
* @example
|
|
18
18
|
* await client.apiKeys.create({
|
|
@@ -24,11 +24,11 @@ export declare class ApiKeys {
|
|
|
24
24
|
* organizationId: "missing-org-id"
|
|
25
25
|
* })
|
|
26
26
|
*/
|
|
27
|
-
create(request: FernVenusApi.CreateApiKeyRequest, requestOptions?:
|
|
27
|
+
create(request: FernVenusApi.CreateApiKeyRequest, requestOptions?: ApiKeysClient.RequestOptions): core.HttpResponsePromise<core.APIResponse<FernVenusApi.CreateTokenResponse, FernVenusApi.apiKeys.create.Error>>;
|
|
28
28
|
private __create;
|
|
29
29
|
/**
|
|
30
30
|
* @param {FernVenusApi.GetTokenMetadataRequest} request
|
|
31
|
-
* @param {
|
|
31
|
+
* @param {ApiKeysClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
32
32
|
*
|
|
33
33
|
* @example
|
|
34
34
|
* await client.apiKeys.getTokenMetadata({
|
|
@@ -40,11 +40,11 @@ export declare class ApiKeys {
|
|
|
40
40
|
* token: "missing-token-value"
|
|
41
41
|
* })
|
|
42
42
|
*/
|
|
43
|
-
getTokenMetadata(request: FernVenusApi.GetTokenMetadataRequest, requestOptions?:
|
|
43
|
+
getTokenMetadata(request: FernVenusApi.GetTokenMetadataRequest, requestOptions?: ApiKeysClient.RequestOptions): core.HttpResponsePromise<core.APIResponse<FernVenusApi.TokenMetadata, FernVenusApi.apiKeys.getTokenMetadata.Error>>;
|
|
44
44
|
private __getTokenMetadata;
|
|
45
45
|
/**
|
|
46
46
|
* @param {FernVenusApi.OrganizationId} organizationId
|
|
47
|
-
* @param {
|
|
47
|
+
* @param {ApiKeysClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
48
48
|
*
|
|
49
49
|
* @example
|
|
50
50
|
* await client.apiKeys.getTokensForOrganization("some-org-id")
|
|
@@ -52,11 +52,11 @@ export declare class ApiKeys {
|
|
|
52
52
|
* @example
|
|
53
53
|
* await client.apiKeys.getTokensForOrganization("missing-org-id")
|
|
54
54
|
*/
|
|
55
|
-
getTokensForOrganization(organizationId: FernVenusApi.OrganizationId, requestOptions?:
|
|
55
|
+
getTokensForOrganization(organizationId: FernVenusApi.OrganizationId, requestOptions?: ApiKeysClient.RequestOptions): core.HttpResponsePromise<core.APIResponse<FernVenusApi.TokenMetadata[], FernVenusApi.apiKeys.getTokensForOrganization.Error>>;
|
|
56
56
|
private __getTokensForOrganization;
|
|
57
57
|
/**
|
|
58
58
|
* @param {FernVenusApi.TokenId} tokenId
|
|
59
|
-
* @param {
|
|
59
|
+
* @param {ApiKeysClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
60
60
|
*
|
|
61
61
|
* @example
|
|
62
62
|
* await client.apiKeys.revokeTokenById("some-token-id")
|
|
@@ -64,11 +64,11 @@ export declare class ApiKeys {
|
|
|
64
64
|
* @example
|
|
65
65
|
* await client.apiKeys.revokeTokenById("missing-token-id")
|
|
66
66
|
*/
|
|
67
|
-
revokeTokenById(tokenId: FernVenusApi.TokenId, requestOptions?:
|
|
67
|
+
revokeTokenById(tokenId: FernVenusApi.TokenId, requestOptions?: ApiKeysClient.RequestOptions): core.HttpResponsePromise<core.APIResponse<void, FernVenusApi.apiKeys.revokeTokenById.Error>>;
|
|
68
68
|
private __revokeTokenById;
|
|
69
69
|
/**
|
|
70
70
|
* @param {FernVenusApi.RevokeApiKeyRequest} request
|
|
71
|
-
* @param {
|
|
71
|
+
* @param {ApiKeysClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
72
72
|
*
|
|
73
73
|
* @example
|
|
74
74
|
* await client.apiKeys.revokeToken({
|
|
@@ -80,7 +80,6 @@ export declare class ApiKeys {
|
|
|
80
80
|
* token: "missing-token-value"
|
|
81
81
|
* })
|
|
82
82
|
*/
|
|
83
|
-
revokeToken(request: FernVenusApi.RevokeApiKeyRequest, requestOptions?:
|
|
83
|
+
revokeToken(request: FernVenusApi.RevokeApiKeyRequest, requestOptions?: ApiKeysClient.RequestOptions): core.HttpResponsePromise<core.APIResponse<void, FernVenusApi.apiKeys.revokeToken.Error>>;
|
|
84
84
|
private __revokeToken;
|
|
85
|
-
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
86
85
|
}
|