@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
|
@@ -2,6 +2,7 @@ export * as addUser from "./addUser.js";
|
|
|
2
2
|
export * as create from "./create.js";
|
|
3
3
|
export * as delete from "./delete.js";
|
|
4
4
|
export * as get from "./get.js";
|
|
5
|
+
export * as getByPostmanTeamId from "./getByPostmanTeamId.js";
|
|
5
6
|
export * as getMyOrganizationFromScopedToken from "./getMyOrganizationFromScopedToken.js";
|
|
6
7
|
export * as getOrgIdsFromToken from "./getOrgIdsFromToken.js";
|
|
7
8
|
export * as inviteUser from "./inviteUser.js";
|
|
@@ -36,11 +36,12 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
36
36
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.update = exports.removeUser = exports.isMember = exports.inviteUser = exports.getOrgIdsFromToken = exports.getMyOrganizationFromScopedToken = exports.get = exports.delete = exports.create = exports.addUser = void 0;
|
|
39
|
+
exports.update = exports.removeUser = exports.isMember = exports.inviteUser = exports.getOrgIdsFromToken = exports.getMyOrganizationFromScopedToken = exports.getByPostmanTeamId = exports.get = exports.delete = exports.create = exports.addUser = void 0;
|
|
40
40
|
exports.addUser = __importStar(require("./addUser.js"));
|
|
41
41
|
exports.create = __importStar(require("./create.js"));
|
|
42
42
|
exports.delete = __importStar(require("./delete.js"));
|
|
43
43
|
exports.get = __importStar(require("./get.js"));
|
|
44
|
+
exports.getByPostmanTeamId = __importStar(require("./getByPostmanTeamId.js"));
|
|
44
45
|
exports.getMyOrganizationFromScopedToken = __importStar(require("./getMyOrganizationFromScopedToken.js"));
|
|
45
46
|
exports.getOrgIdsFromToken = __importStar(require("./getOrgIdsFromToken.js"));
|
|
46
47
|
exports.inviteUser = __importStar(require("./inviteUser.js"));
|
|
@@ -22,4 +22,12 @@ export interface CreateOrganizationRequest {
|
|
|
22
22
|
* This is a field to allow for us to create organizations without this in the future if necessary.
|
|
23
23
|
*/
|
|
24
24
|
enableGoogleConnection?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Allow users to log into the organization with their Postman account.
|
|
27
|
+
* True by default.
|
|
28
|
+
* This is a field to allow for us to create organizations without this in the future if necessary.
|
|
29
|
+
*/
|
|
30
|
+
enablePostmanConnection?: boolean;
|
|
31
|
+
/** The Postman team ID to associate with this organization. */
|
|
32
|
+
postmanTeamId?: string;
|
|
25
33
|
}
|
|
@@ -1,40 +1,40 @@
|
|
|
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 RegistryClient {
|
|
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 RegistryClient {
|
|
11
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<RegistryClient.Options>;
|
|
12
|
+
constructor(options?: RegistryClient.Options);
|
|
13
13
|
/**
|
|
14
14
|
* @param {FernVenusApi.GenerateRegistryTokensRequest} request
|
|
15
|
-
* @param {
|
|
15
|
+
* @param {RegistryClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
16
16
|
*
|
|
17
17
|
* @example
|
|
18
18
|
* await client.registry.generateRegistryTokens({
|
|
19
19
|
* organizationId: "organizationId"
|
|
20
20
|
* })
|
|
21
21
|
*/
|
|
22
|
-
generateRegistryTokens(request: FernVenusApi.GenerateRegistryTokensRequest, requestOptions?:
|
|
22
|
+
generateRegistryTokens(request: FernVenusApi.GenerateRegistryTokensRequest, requestOptions?: RegistryClient.RequestOptions): core.HttpResponsePromise<core.APIResponse<FernVenusApi.RegistryTokens, FernVenusApi.registry.generateRegistryTokens.Error>>;
|
|
23
23
|
private __generateRegistryTokens;
|
|
24
24
|
/**
|
|
25
25
|
* @param {FernVenusApi.CheckRegistryPermissionRequest} request
|
|
26
|
-
* @param {
|
|
26
|
+
* @param {RegistryClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
27
27
|
*
|
|
28
28
|
* @example
|
|
29
29
|
* await client.registry.hasRegistryPermission({
|
|
30
30
|
* organizationId: "organizationId"
|
|
31
31
|
* })
|
|
32
32
|
*/
|
|
33
|
-
hasRegistryPermission(request: FernVenusApi.CheckRegistryPermissionRequest, requestOptions?:
|
|
33
|
+
hasRegistryPermission(request: FernVenusApi.CheckRegistryPermissionRequest, requestOptions?: RegistryClient.RequestOptions): core.HttpResponsePromise<core.APIResponse<boolean, FernVenusApi.registry.hasRegistryPermission.Error>>;
|
|
34
34
|
private __hasRegistryPermission;
|
|
35
35
|
/**
|
|
36
36
|
* @param {FernVenusApi.RevokeTokenRequest} request
|
|
37
|
-
* @param {
|
|
37
|
+
* @param {RegistryClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
38
38
|
*
|
|
39
39
|
* @example
|
|
40
40
|
* await client.registry.revokeToken({
|
|
@@ -42,7 +42,6 @@ export declare class Registry {
|
|
|
42
42
|
* token: "token"
|
|
43
43
|
* })
|
|
44
44
|
*/
|
|
45
|
-
revokeToken(request: FernVenusApi.RevokeTokenRequest, requestOptions?:
|
|
45
|
+
revokeToken(request: FernVenusApi.RevokeTokenRequest, requestOptions?: RegistryClient.RequestOptions): core.HttpResponsePromise<core.APIResponse<void, FernVenusApi.registry.revokeToken.Error>>;
|
|
46
46
|
private __revokeToken;
|
|
47
|
-
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
48
47
|
}
|
|
@@ -43,19 +43,20 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
43
43
|
});
|
|
44
44
|
};
|
|
45
45
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
|
-
exports.
|
|
46
|
+
exports.RegistryClient = void 0;
|
|
47
|
+
const BaseClient_js_1 = require("../../../../BaseClient.js");
|
|
47
48
|
const headers_js_1 = require("../../../../core/headers.js");
|
|
48
49
|
const core = __importStar(require("../../../../core/index.js"));
|
|
49
50
|
const environments = __importStar(require("../../../../environments.js"));
|
|
50
51
|
const serializers = __importStar(require("../../../../serialization/index.js"));
|
|
51
52
|
const FernVenusApi = __importStar(require("../../../index.js"));
|
|
52
|
-
class
|
|
53
|
-
constructor(
|
|
54
|
-
this._options =
|
|
53
|
+
class RegistryClient {
|
|
54
|
+
constructor(options = {}) {
|
|
55
|
+
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
55
56
|
}
|
|
56
57
|
/**
|
|
57
58
|
* @param {FernVenusApi.GenerateRegistryTokensRequest} request
|
|
58
|
-
* @param {
|
|
59
|
+
* @param {RegistryClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
59
60
|
*
|
|
60
61
|
* @example
|
|
61
62
|
* await client.registry.generateRegistryTokens({
|
|
@@ -67,8 +68,9 @@ class Registry {
|
|
|
67
68
|
}
|
|
68
69
|
__generateRegistryTokens(request, requestOptions) {
|
|
69
70
|
return __awaiter(this, void 0, void 0, function* () {
|
|
70
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
71
|
-
const
|
|
71
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
72
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
73
|
+
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
74
|
const _response = yield core.fetcher({
|
|
73
75
|
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FernVenusApiEnvironment.Prod, "/registry/generate-tokens"),
|
|
74
76
|
method: "POST",
|
|
@@ -83,6 +85,8 @@ class Registry {
|
|
|
83
85
|
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
84
86
|
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
85
87
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
88
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
89
|
+
logging: this._options.logging,
|
|
86
90
|
});
|
|
87
91
|
if (_response.ok) {
|
|
88
92
|
return {
|
|
@@ -102,9 +106,10 @@ class Registry {
|
|
|
102
106
|
};
|
|
103
107
|
}
|
|
104
108
|
if (_response.error.reason === "status-code") {
|
|
105
|
-
switch ((
|
|
109
|
+
switch ((_k = _response.error.body) === null || _k === void 0 ? void 0 : _k.error) {
|
|
106
110
|
case "UnauthorizedError":
|
|
107
111
|
case "OrganizationNotFoundError":
|
|
112
|
+
case "MissingOrgPermissionsError":
|
|
108
113
|
return {
|
|
109
114
|
data: {
|
|
110
115
|
ok: false,
|
|
@@ -133,7 +138,7 @@ class Registry {
|
|
|
133
138
|
}
|
|
134
139
|
/**
|
|
135
140
|
* @param {FernVenusApi.CheckRegistryPermissionRequest} request
|
|
136
|
-
* @param {
|
|
141
|
+
* @param {RegistryClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
137
142
|
*
|
|
138
143
|
* @example
|
|
139
144
|
* await client.registry.hasRegistryPermission({
|
|
@@ -145,8 +150,8 @@ class Registry {
|
|
|
145
150
|
}
|
|
146
151
|
__hasRegistryPermission(request, requestOptions) {
|
|
147
152
|
return __awaiter(this, void 0, void 0, function* () {
|
|
148
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
149
|
-
const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers,
|
|
153
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
154
|
+
const _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
150
155
|
const _response = yield core.fetcher({
|
|
151
156
|
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FernVenusApiEnvironment.Prod, "/registry/check-permissions"),
|
|
152
157
|
method: "POST",
|
|
@@ -161,6 +166,8 @@ class Registry {
|
|
|
161
166
|
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
162
167
|
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
163
168
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
169
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
170
|
+
logging: this._options.logging,
|
|
164
171
|
});
|
|
165
172
|
if (_response.ok) {
|
|
166
173
|
return {
|
|
@@ -180,7 +187,7 @@ class Registry {
|
|
|
180
187
|
};
|
|
181
188
|
}
|
|
182
189
|
if (_response.error.reason === "status-code") {
|
|
183
|
-
switch ((
|
|
190
|
+
switch ((_k = _response.error.body) === null || _k === void 0 ? void 0 : _k.error) {
|
|
184
191
|
case "UnauthorizedError":
|
|
185
192
|
case "OrganizationNotFoundError":
|
|
186
193
|
return {
|
|
@@ -211,7 +218,7 @@ class Registry {
|
|
|
211
218
|
}
|
|
212
219
|
/**
|
|
213
220
|
* @param {FernVenusApi.RevokeTokenRequest} request
|
|
214
|
-
* @param {
|
|
221
|
+
* @param {RegistryClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
215
222
|
*
|
|
216
223
|
* @example
|
|
217
224
|
* await client.registry.revokeToken({
|
|
@@ -224,8 +231,9 @@ class Registry {
|
|
|
224
231
|
}
|
|
225
232
|
__revokeToken(request, requestOptions) {
|
|
226
233
|
return __awaiter(this, void 0, void 0, function* () {
|
|
227
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
228
|
-
const
|
|
234
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
235
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
236
|
+
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);
|
|
229
237
|
const _response = yield core.fetcher({
|
|
230
238
|
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FernVenusApiEnvironment.Prod, "/registry/revoke-token"),
|
|
231
239
|
method: "POST",
|
|
@@ -240,6 +248,8 @@ class Registry {
|
|
|
240
248
|
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
241
249
|
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
242
250
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
251
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
252
|
+
logging: this._options.logging,
|
|
243
253
|
});
|
|
244
254
|
if (_response.ok) {
|
|
245
255
|
return {
|
|
@@ -253,9 +263,10 @@ class Registry {
|
|
|
253
263
|
};
|
|
254
264
|
}
|
|
255
265
|
if (_response.error.reason === "status-code") {
|
|
256
|
-
switch ((
|
|
266
|
+
switch ((_k = _response.error.body) === null || _k === void 0 ? void 0 : _k.error) {
|
|
257
267
|
case "UnauthorizedError":
|
|
258
268
|
case "OrganizationNotFoundError":
|
|
269
|
+
case "MissingOrgPermissionsError":
|
|
259
270
|
return {
|
|
260
271
|
data: {
|
|
261
272
|
ok: false,
|
|
@@ -282,14 +293,5 @@ class Registry {
|
|
|
282
293
|
};
|
|
283
294
|
});
|
|
284
295
|
}
|
|
285
|
-
_getAuthorizationHeader() {
|
|
286
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
287
|
-
const bearer = yield core.Supplier.get(this._options.token);
|
|
288
|
-
if (bearer != null) {
|
|
289
|
-
return `Bearer ${bearer}`;
|
|
290
|
-
}
|
|
291
|
-
return undefined;
|
|
292
|
-
});
|
|
293
|
-
}
|
|
294
296
|
}
|
|
295
|
-
exports.
|
|
297
|
+
exports.RegistryClient = RegistryClient;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type * as core from "../../../../core/index.js";
|
|
2
2
|
import * as FernVenusApi from "../../../index.js";
|
|
3
|
-
export type Error = FernVenusApi.registry.generateRegistryTokens.Error.UnauthorizedError | FernVenusApi.registry.generateRegistryTokens.Error.OrganizationNotFoundError | FernVenusApi.registry.generateRegistryTokens.Error._Unknown;
|
|
3
|
+
export type Error = FernVenusApi.registry.generateRegistryTokens.Error.UnauthorizedError | FernVenusApi.registry.generateRegistryTokens.Error.OrganizationNotFoundError | FernVenusApi.registry.generateRegistryTokens.Error.MissingOrgPermissionsError | FernVenusApi.registry.generateRegistryTokens.Error._Unknown;
|
|
4
4
|
export declare namespace Error {
|
|
5
5
|
interface UnauthorizedError extends _Utils {
|
|
6
6
|
error: "UnauthorizedError";
|
|
@@ -8,6 +8,9 @@ export declare namespace Error {
|
|
|
8
8
|
interface OrganizationNotFoundError extends _Utils {
|
|
9
9
|
error: "OrganizationNotFoundError";
|
|
10
10
|
}
|
|
11
|
+
interface MissingOrgPermissionsError extends _Utils {
|
|
12
|
+
error: "MissingOrgPermissionsError";
|
|
13
|
+
}
|
|
11
14
|
interface _Unknown extends _Utils {
|
|
12
15
|
error: void;
|
|
13
16
|
content: core.Fetcher.Error;
|
|
@@ -18,12 +21,14 @@ export declare namespace Error {
|
|
|
18
21
|
interface _Visitor<_Result> {
|
|
19
22
|
unauthorizedError: () => _Result;
|
|
20
23
|
organizationNotFoundError: () => _Result;
|
|
24
|
+
missingOrgPermissionsError: () => _Result;
|
|
21
25
|
_other: (value: core.Fetcher.Error) => _Result;
|
|
22
26
|
}
|
|
23
27
|
}
|
|
24
28
|
export declare const Error: {
|
|
25
29
|
readonly unauthorizedError: () => FernVenusApi.registry.generateRegistryTokens.Error.UnauthorizedError;
|
|
26
30
|
readonly organizationNotFoundError: () => FernVenusApi.registry.generateRegistryTokens.Error.OrganizationNotFoundError;
|
|
31
|
+
readonly missingOrgPermissionsError: () => FernVenusApi.registry.generateRegistryTokens.Error.MissingOrgPermissionsError;
|
|
27
32
|
readonly _unknown: (fetcherError: core.Fetcher.Error) => FernVenusApi.registry.generateRegistryTokens.Error._Unknown;
|
|
28
33
|
readonly _visit: <_Result>(value: FernVenusApi.registry.generateRegistryTokens.Error, visitor: FernVenusApi.registry.generateRegistryTokens.Error._Visitor<_Result>) => _Result;
|
|
29
34
|
};
|
|
@@ -53,6 +53,14 @@ exports.Error = {
|
|
|
53
53
|
},
|
|
54
54
|
};
|
|
55
55
|
},
|
|
56
|
+
missingOrgPermissionsError: () => {
|
|
57
|
+
return {
|
|
58
|
+
error: "MissingOrgPermissionsError",
|
|
59
|
+
_visit: function (visitor) {
|
|
60
|
+
return FernVenusApi.registry.generateRegistryTokens.Error._visit(this, visitor);
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
},
|
|
56
64
|
_unknown: (fetcherError) => {
|
|
57
65
|
return {
|
|
58
66
|
error: undefined,
|
|
@@ -68,8 +76,10 @@ exports.Error = {
|
|
|
68
76
|
return visitor.unauthorizedError();
|
|
69
77
|
case "OrganizationNotFoundError":
|
|
70
78
|
return visitor.organizationNotFoundError();
|
|
79
|
+
case "MissingOrgPermissionsError":
|
|
80
|
+
return visitor.missingOrgPermissionsError();
|
|
71
81
|
default:
|
|
72
|
-
return visitor._other(value);
|
|
82
|
+
return visitor._other(value.content);
|
|
73
83
|
}
|
|
74
84
|
},
|
|
75
85
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type * as core from "../../../../core/index.js";
|
|
2
2
|
import * as FernVenusApi from "../../../index.js";
|
|
3
|
-
export type Error = FernVenusApi.registry.revokeToken.Error.UnauthorizedError | FernVenusApi.registry.revokeToken.Error.OrganizationNotFoundError | FernVenusApi.registry.revokeToken.Error._Unknown;
|
|
3
|
+
export type Error = FernVenusApi.registry.revokeToken.Error.UnauthorizedError | FernVenusApi.registry.revokeToken.Error.OrganizationNotFoundError | FernVenusApi.registry.revokeToken.Error.MissingOrgPermissionsError | FernVenusApi.registry.revokeToken.Error._Unknown;
|
|
4
4
|
export declare namespace Error {
|
|
5
5
|
interface UnauthorizedError extends _Utils {
|
|
6
6
|
error: "UnauthorizedError";
|
|
@@ -8,6 +8,9 @@ export declare namespace Error {
|
|
|
8
8
|
interface OrganizationNotFoundError extends _Utils {
|
|
9
9
|
error: "OrganizationNotFoundError";
|
|
10
10
|
}
|
|
11
|
+
interface MissingOrgPermissionsError extends _Utils {
|
|
12
|
+
error: "MissingOrgPermissionsError";
|
|
13
|
+
}
|
|
11
14
|
interface _Unknown extends _Utils {
|
|
12
15
|
error: void;
|
|
13
16
|
content: core.Fetcher.Error;
|
|
@@ -18,12 +21,14 @@ export declare namespace Error {
|
|
|
18
21
|
interface _Visitor<_Result> {
|
|
19
22
|
unauthorizedError: () => _Result;
|
|
20
23
|
organizationNotFoundError: () => _Result;
|
|
24
|
+
missingOrgPermissionsError: () => _Result;
|
|
21
25
|
_other: (value: core.Fetcher.Error) => _Result;
|
|
22
26
|
}
|
|
23
27
|
}
|
|
24
28
|
export declare const Error: {
|
|
25
29
|
readonly unauthorizedError: () => FernVenusApi.registry.revokeToken.Error.UnauthorizedError;
|
|
26
30
|
readonly organizationNotFoundError: () => FernVenusApi.registry.revokeToken.Error.OrganizationNotFoundError;
|
|
31
|
+
readonly missingOrgPermissionsError: () => FernVenusApi.registry.revokeToken.Error.MissingOrgPermissionsError;
|
|
27
32
|
readonly _unknown: (fetcherError: core.Fetcher.Error) => FernVenusApi.registry.revokeToken.Error._Unknown;
|
|
28
33
|
readonly _visit: <_Result>(value: FernVenusApi.registry.revokeToken.Error, visitor: FernVenusApi.registry.revokeToken.Error._Visitor<_Result>) => _Result;
|
|
29
34
|
};
|
|
@@ -53,6 +53,14 @@ exports.Error = {
|
|
|
53
53
|
},
|
|
54
54
|
};
|
|
55
55
|
},
|
|
56
|
+
missingOrgPermissionsError: () => {
|
|
57
|
+
return {
|
|
58
|
+
error: "MissingOrgPermissionsError",
|
|
59
|
+
_visit: function (visitor) {
|
|
60
|
+
return FernVenusApi.registry.revokeToken.Error._visit(this, visitor);
|
|
61
|
+
},
|
|
62
|
+
};
|
|
63
|
+
},
|
|
56
64
|
_unknown: (fetcherError) => {
|
|
57
65
|
return {
|
|
58
66
|
error: undefined,
|
|
@@ -68,8 +76,10 @@ exports.Error = {
|
|
|
68
76
|
return visitor.unauthorizedError();
|
|
69
77
|
case "OrganizationNotFoundError":
|
|
70
78
|
return visitor.organizationNotFoundError();
|
|
79
|
+
case "MissingOrgPermissionsError":
|
|
80
|
+
return visitor.missingOrgPermissionsError();
|
|
71
81
|
default:
|
|
72
|
-
return visitor._other(value);
|
|
82
|
+
return visitor._other(value.content);
|
|
73
83
|
}
|
|
74
84
|
},
|
|
75
85
|
};
|
|
@@ -1,47 +1,46 @@
|
|
|
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 UserClient {
|
|
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 UserClient {
|
|
11
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<UserClient.Options>;
|
|
12
|
+
constructor(options?: UserClient.Options);
|
|
13
13
|
/**
|
|
14
|
-
* @param {
|
|
14
|
+
* @param {UserClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
15
15
|
*
|
|
16
16
|
* @example
|
|
17
17
|
* await client.user.getMyself()
|
|
18
18
|
*/
|
|
19
|
-
getMyself(requestOptions?:
|
|
19
|
+
getMyself(requestOptions?: UserClient.RequestOptions): core.HttpResponsePromise<core.APIResponse<FernVenusApi.User, FernVenusApi.user.getMyself.Error>>;
|
|
20
20
|
private __getMyself;
|
|
21
21
|
/**
|
|
22
22
|
* @param {FernVenusApi.GetUserOrganizationsRequest} request
|
|
23
|
-
* @param {
|
|
23
|
+
* @param {UserClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
24
24
|
*
|
|
25
25
|
* @example
|
|
26
26
|
* await client.user.getMyOrganizations({
|
|
27
27
|
* pageId: 1
|
|
28
28
|
* })
|
|
29
29
|
*/
|
|
30
|
-
getMyOrganizations(request: FernVenusApi.GetUserOrganizationsRequest, requestOptions?:
|
|
30
|
+
getMyOrganizations(request: FernVenusApi.GetUserOrganizationsRequest, requestOptions?: UserClient.RequestOptions): core.HttpResponsePromise<core.APIResponse<FernVenusApi.OrganizationsPage, FernVenusApi.user.getMyOrganizations.Error>>;
|
|
31
31
|
private __getMyOrganizations;
|
|
32
32
|
/**
|
|
33
33
|
* Link user accounts with the same verified email address.
|
|
34
34
|
* Requires admin token authentication.
|
|
35
35
|
*
|
|
36
36
|
* @param {FernVenusApi.LinkAccountsRequest} request
|
|
37
|
-
* @param {
|
|
37
|
+
* @param {UserClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
38
38
|
*
|
|
39
39
|
* @example
|
|
40
40
|
* await client.user.linkAccounts({
|
|
41
41
|
* userId: "userId"
|
|
42
42
|
* })
|
|
43
43
|
*/
|
|
44
|
-
linkAccounts(request: FernVenusApi.LinkAccountsRequest, requestOptions?:
|
|
44
|
+
linkAccounts(request: FernVenusApi.LinkAccountsRequest, requestOptions?: UserClient.RequestOptions): core.HttpResponsePromise<core.APIResponse<FernVenusApi.LinkAccountsResponse, FernVenusApi.user.linkAccounts.Error>>;
|
|
45
45
|
private __linkAccounts;
|
|
46
|
-
protected _getAuthorizationHeader(): Promise<string | undefined>;
|
|
47
46
|
}
|
|
@@ -43,18 +43,19 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
43
43
|
});
|
|
44
44
|
};
|
|
45
45
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
|
-
exports.
|
|
46
|
+
exports.UserClient = void 0;
|
|
47
|
+
const BaseClient_js_1 = require("../../../../BaseClient.js");
|
|
47
48
|
const headers_js_1 = require("../../../../core/headers.js");
|
|
48
49
|
const core = __importStar(require("../../../../core/index.js"));
|
|
49
50
|
const environments = __importStar(require("../../../../environments.js"));
|
|
50
51
|
const serializers = __importStar(require("../../../../serialization/index.js"));
|
|
51
52
|
const FernVenusApi = __importStar(require("../../../index.js"));
|
|
52
|
-
class
|
|
53
|
-
constructor(
|
|
54
|
-
this._options =
|
|
53
|
+
class UserClient {
|
|
54
|
+
constructor(options = {}) {
|
|
55
|
+
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
55
56
|
}
|
|
56
57
|
/**
|
|
57
|
-
* @param {
|
|
58
|
+
* @param {UserClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
58
59
|
*
|
|
59
60
|
* @example
|
|
60
61
|
* await client.user.getMyself()
|
|
@@ -64,8 +65,9 @@ class User {
|
|
|
64
65
|
}
|
|
65
66
|
__getMyself(requestOptions) {
|
|
66
67
|
return __awaiter(this, void 0, void 0, function* () {
|
|
67
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
68
|
-
const
|
|
68
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
69
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
70
|
+
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);
|
|
69
71
|
const _response = yield core.fetcher({
|
|
70
72
|
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FernVenusApiEnvironment.Prod, "/users"),
|
|
71
73
|
method: "GET",
|
|
@@ -74,6 +76,8 @@ class User {
|
|
|
74
76
|
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
75
77
|
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
76
78
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
79
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
80
|
+
logging: this._options.logging,
|
|
77
81
|
});
|
|
78
82
|
if (_response.ok) {
|
|
79
83
|
return {
|
|
@@ -104,7 +108,7 @@ class User {
|
|
|
104
108
|
}
|
|
105
109
|
/**
|
|
106
110
|
* @param {FernVenusApi.GetUserOrganizationsRequest} request
|
|
107
|
-
* @param {
|
|
111
|
+
* @param {UserClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
108
112
|
*
|
|
109
113
|
* @example
|
|
110
114
|
* await client.user.getMyOrganizations({
|
|
@@ -116,11 +120,13 @@ class User {
|
|
|
116
120
|
}
|
|
117
121
|
__getMyOrganizations(request, requestOptions) {
|
|
118
122
|
return __awaiter(this, void 0, void 0, function* () {
|
|
119
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
123
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
120
124
|
const { pageId } = request;
|
|
121
|
-
const _queryParams = {
|
|
122
|
-
|
|
123
|
-
|
|
125
|
+
const _queryParams = {
|
|
126
|
+
pageId,
|
|
127
|
+
};
|
|
128
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
129
|
+
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);
|
|
124
130
|
const _response = yield core.fetcher({
|
|
125
131
|
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FernVenusApiEnvironment.Prod, "/users/organizations"),
|
|
126
132
|
method: "GET",
|
|
@@ -129,6 +135,8 @@ class User {
|
|
|
129
135
|
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
130
136
|
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
131
137
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
138
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
139
|
+
logging: this._options.logging,
|
|
132
140
|
});
|
|
133
141
|
if (_response.ok) {
|
|
134
142
|
return {
|
|
@@ -162,7 +170,7 @@ class User {
|
|
|
162
170
|
* Requires admin token authentication.
|
|
163
171
|
*
|
|
164
172
|
* @param {FernVenusApi.LinkAccountsRequest} request
|
|
165
|
-
* @param {
|
|
173
|
+
* @param {UserClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
166
174
|
*
|
|
167
175
|
* @example
|
|
168
176
|
* await client.user.linkAccounts({
|
|
@@ -174,8 +182,9 @@ class User {
|
|
|
174
182
|
}
|
|
175
183
|
__linkAccounts(request, requestOptions) {
|
|
176
184
|
return __awaiter(this, void 0, void 0, function* () {
|
|
177
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
178
|
-
const
|
|
185
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
186
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
187
|
+
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);
|
|
179
188
|
const _response = yield core.fetcher({
|
|
180
189
|
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FernVenusApiEnvironment.Prod, "/users/link-accounts"),
|
|
181
190
|
method: "POST",
|
|
@@ -190,6 +199,8 @@ class User {
|
|
|
190
199
|
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
191
200
|
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
192
201
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
202
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
203
|
+
logging: this._options.logging,
|
|
193
204
|
});
|
|
194
205
|
if (_response.ok) {
|
|
195
206
|
return {
|
|
@@ -218,14 +229,5 @@ class User {
|
|
|
218
229
|
};
|
|
219
230
|
});
|
|
220
231
|
}
|
|
221
|
-
_getAuthorizationHeader() {
|
|
222
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
223
|
-
const bearer = yield core.Supplier.get(this._options.token);
|
|
224
|
-
if (bearer != null) {
|
|
225
|
-
return `Bearer ${bearer}`;
|
|
226
|
-
}
|
|
227
|
-
return undefined;
|
|
228
|
-
});
|
|
229
|
-
}
|
|
230
232
|
}
|
|
231
|
-
exports.
|
|
233
|
+
exports.UserClient = UserClient;
|