@fern-api/venus-api-sdk 0.0.1 → 0.0.3
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/Client.d.ts +23 -0
- package/Client.js +28 -0
- package/api/index.js +17 -0
- package/api/resources/commons/index.js +17 -0
- package/api/resources/commons/types/OrganizationId.js +10 -0
- package/api/resources/commons/types/UserId.js +10 -0
- package/api/resources/commons/types/index.js +18 -0
- package/api/resources/index.js +40 -0
- package/api/resources/organization/client/Client.d.ts +24 -0
- package/api/resources/organization/client/Client.js +214 -0
- package/{types/api → api}/resources/organization/client/addUser.d.ts +0 -1
- package/api/resources/organization/client/addUser.js +44 -0
- package/{types/api → api}/resources/organization/client/create.d.ts +0 -1
- package/api/resources/organization/client/create.js +44 -0
- package/{types/api → api}/resources/organization/client/get.d.ts +0 -1
- package/api/resources/organization/client/get.js +34 -0
- package/{types/api → api}/resources/organization/client/getMyOrganizationFromScopedToken.d.ts +0 -1
- package/api/resources/organization/client/getMyOrganizationFromScopedToken.js +34 -0
- package/api/resources/organization/client/index.js +36 -0
- package/{types/api → api}/resources/organization/client/isMember.d.ts +0 -1
- package/api/resources/organization/client/isMember.js +24 -0
- package/api/resources/organization/client/requests/AddUserToOrgRequest.js +5 -0
- package/api/resources/organization/client/requests/CreateOrganizationRequest.js +5 -0
- package/api/resources/organization/client/requests/UpdateOrganizationRequest.js +5 -0
- package/api/resources/organization/client/requests/index.js +2 -0
- package/{types/api → api}/resources/organization/client/update.d.ts +0 -1
- package/api/resources/organization/client/update.js +34 -0
- package/api/resources/organization/index.js +18 -0
- package/api/resources/organization/types/LightweightUser.d.ts +8 -0
- package/api/resources/organization/types/LightweightUser.js +5 -0
- package/{types/api → api}/resources/organization/types/Organization.d.ts +2 -0
- package/api/resources/organization/types/Organization.js +5 -0
- package/api/resources/organization/types/index.d.ts +2 -0
- package/api/resources/organization/types/index.js +18 -0
- package/api/resources/registry/client/Client.d.ts +18 -0
- package/api/resources/registry/client/Client.js +135 -0
- package/{types/api → api}/resources/registry/client/generateRegistryTokens.d.ts +0 -1
- package/api/resources/registry/client/generateRegistryTokens.js +44 -0
- package/{types/api → api}/resources/registry/client/hasRegistryPermission.d.ts +0 -1
- package/api/resources/registry/client/hasRegistryPermission.js +44 -0
- package/api/resources/registry/client/index.js +33 -0
- package/api/resources/registry/client/requests/CheckRegistryPermissionRequest.js +5 -0
- package/api/resources/registry/client/requests/GenerateRegistryTokensRequest.js +5 -0
- package/api/resources/registry/client/requests/RevokeTokenRequest.js +5 -0
- package/api/resources/registry/client/requests/index.js +2 -0
- package/{types/api → api}/resources/registry/client/revokeToken.d.ts +0 -1
- package/api/resources/registry/client/revokeToken.js +44 -0
- package/api/resources/registry/index.js +18 -0
- package/api/resources/registry/types/MavenRegistryToken.js +5 -0
- package/api/resources/registry/types/NpmRegistryToken.js +5 -0
- package/api/resources/registry/types/PypiRegistryToken.d.ts +7 -0
- package/api/resources/registry/types/PypiRegistryToken.js +5 -0
- package/{types/api → api}/resources/registry/types/RegistryToken.d.ts +6 -1
- package/api/resources/registry/types/RegistryToken.js +56 -0
- package/{types/api → api}/resources/registry/types/RegistryTokens.d.ts +1 -0
- package/api/resources/registry/types/RegistryTokens.js +5 -0
- package/{types/api → api}/resources/registry/types/index.d.ts +1 -0
- package/api/resources/registry/types/index.js +21 -0
- package/api/resources/user/client/Client.d.ts +17 -0
- package/api/resources/user/client/Client.js +87 -0
- package/{types/api → api}/resources/user/client/getMyOrganizations.d.ts +0 -1
- package/api/resources/user/client/getMyOrganizations.js +24 -0
- package/{types/api → api}/resources/user/client/getMyself.d.ts +0 -1
- package/api/resources/user/client/getMyself.js +24 -0
- package/api/resources/user/client/index.js +32 -0
- package/api/resources/user/client/requests/GetUserOrganizationsRequest.js +5 -0
- package/api/resources/user/client/requests/index.js +2 -0
- package/api/resources/user/index.js +18 -0
- package/api/resources/user/types/OrganizationsPage.js +5 -0
- package/api/resources/user/types/User.js +5 -0
- package/api/resources/user/types/index.js +18 -0
- package/core/auth/BasicAuth.js +26 -0
- package/core/auth/BearerToken.js +15 -0
- package/core/auth/index.js +7 -0
- package/core/fetcher/APIResponse.js +2 -0
- package/{types/core → core}/fetcher/Fetcher.d.ts +1 -4
- package/core/fetcher/Fetcher.js +85 -0
- package/core/fetcher/Supplier.js +13 -0
- package/core/fetcher/index.js +7 -0
- package/core/index.js +32 -0
- package/core/schemas/Schema.d.ts +46 -0
- package/core/schemas/Schema.js +19 -0
- package/core/schemas/builders/date/date.js +55 -0
- package/core/schemas/builders/date/index.js +5 -0
- package/core/schemas/builders/enum/enum.d.ts +2 -0
- package/core/schemas/builders/enum/enum.js +29 -0
- package/core/schemas/builders/enum/index.js +5 -0
- package/{types/core → core}/schemas/builders/index.d.ts +0 -1
- package/core/schemas/builders/index.js +28 -0
- package/core/schemas/builders/lazy/index.js +7 -0
- package/core/schemas/builders/lazy/lazy.js +28 -0
- package/core/schemas/builders/lazy/lazyObject.js +21 -0
- package/core/schemas/builders/list/index.js +5 -0
- package/core/schemas/builders/list/list.js +53 -0
- package/core/schemas/builders/literals/index.js +5 -0
- package/core/schemas/builders/literals/stringLiteral.d.ts +2 -0
- package/core/schemas/builders/literals/stringLiteral.js +28 -0
- package/core/schemas/builders/object/index.js +9 -0
- package/core/schemas/builders/object/object.js +231 -0
- package/core/schemas/builders/object/property.js +16 -0
- package/{types/core → core}/schemas/builders/object/types.d.ts +5 -4
- package/core/schemas/builders/object/types.js +2 -0
- package/core/schemas/builders/object-like/getObjectLikeUtils.d.ts +9 -0
- package/core/schemas/builders/object-like/getObjectLikeUtils.js +62 -0
- package/core/schemas/builders/object-like/index.d.ts +2 -0
- package/core/schemas/builders/object-like/index.js +6 -0
- package/core/schemas/builders/object-like/types.d.ts +7 -0
- package/core/schemas/builders/object-like/types.js +2 -0
- package/core/schemas/builders/primitives/any.d.ts +1 -0
- package/core/schemas/builders/primitives/any.js +6 -0
- package/core/schemas/builders/primitives/boolean.d.ts +1 -0
- package/core/schemas/builders/primitives/boolean.js +24 -0
- package/core/schemas/builders/primitives/index.js +13 -0
- package/core/schemas/builders/primitives/number.d.ts +1 -0
- package/core/schemas/builders/primitives/number.js +24 -0
- package/core/schemas/builders/primitives/string.d.ts +1 -0
- package/core/schemas/builders/primitives/string.js +24 -0
- package/core/schemas/builders/primitives/unknown.d.ts +1 -0
- package/core/schemas/builders/primitives/unknown.js +6 -0
- package/core/schemas/builders/record/index.d.ts +2 -0
- package/core/schemas/builders/record/index.js +5 -0
- package/core/schemas/builders/record/record.d.ts +3 -0
- package/core/schemas/builders/record/record.js +91 -0
- package/core/schemas/builders/record/types.d.ts +5 -0
- package/core/schemas/builders/record/types.js +2 -0
- package/core/schemas/builders/schema-utils/JsonError.d.ts +5 -0
- package/core/schemas/builders/schema-utils/JsonError.js +13 -0
- package/core/schemas/builders/schema-utils/ParseError.d.ts +5 -0
- package/core/schemas/builders/schema-utils/ParseError.js +13 -0
- package/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +17 -0
- package/core/schemas/builders/schema-utils/getSchemaUtils.js +82 -0
- package/{types/core → core}/schemas/builders/schema-utils/index.d.ts +2 -1
- package/core/schemas/builders/schema-utils/index.js +11 -0
- package/core/schemas/builders/schema-utils/stringifyValidationErrors.d.ts +2 -0
- package/core/schemas/builders/schema-utils/stringifyValidationErrors.js +10 -0
- package/core/schemas/builders/set/index.js +5 -0
- package/core/schemas/builders/set/set.js +44 -0
- package/core/schemas/builders/union/discriminant.js +10 -0
- package/core/schemas/builders/union/index.js +7 -0
- package/core/schemas/builders/union/types.js +2 -0
- package/core/schemas/builders/union/union.js +100 -0
- package/core/schemas/index.js +17 -0
- package/core/schemas/utils/MaybePromise.d.ts +1 -0
- package/core/schemas/utils/MaybePromise.js +2 -0
- package/core/schemas/utils/OptionalRecord.d.ts +1 -0
- package/core/schemas/utils/OptionalRecord.js +2 -0
- package/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +7 -0
- package/core/schemas/utils/addQuestionMarksToNullableProperties.js +2 -0
- package/core/schemas/utils/createIdentitySchemaCreator.d.ts +2 -0
- package/core/schemas/utils/createIdentitySchemaCreator.js +18 -0
- package/core/schemas/utils/entries.js +7 -0
- package/core/schemas/utils/filterObject.js +14 -0
- package/core/schemas/utils/isPlainObject.d.ts +2 -0
- package/core/schemas/utils/isPlainObject.js +19 -0
- package/core/schemas/utils/keys.js +7 -0
- package/core/schemas/utils/partition.js +16 -0
- package/index.js +29 -0
- package/package.json +20 -44
- package/serialization/index.js +17 -0
- package/serialization/resources/commons/index.js +17 -0
- package/serialization/resources/commons/types/OrganizationId.js +35 -0
- package/serialization/resources/commons/types/UserId.js +37 -0
- package/serialization/resources/commons/types/index.js +18 -0
- package/{types/serialization → serialization}/resources/index.d.ts +2 -0
- package/serialization/resources/index.js +39 -0
- package/{types/serialization → serialization}/resources/organization/client/addUser.d.ts +0 -7
- package/serialization/resources/organization/client/addUser.js +47 -0
- package/{types/serialization → serialization}/resources/organization/client/create.d.ts +0 -7
- package/serialization/resources/organization/client/create.js +47 -0
- package/{types/serialization → serialization}/resources/organization/client/get.d.ts +0 -4
- package/serialization/resources/organization/client/get.js +44 -0
- package/{types/serialization → serialization}/resources/organization/client/getMyOrganizationFromScopedToken.d.ts +0 -4
- package/serialization/resources/organization/client/getMyOrganizationFromScopedToken.js +44 -0
- package/{types/serialization → serialization}/resources/organization/client/index.d.ts +1 -0
- package/serialization/resources/organization/client/index.js +36 -0
- package/serialization/resources/organization/client/isMember.js +31 -0
- package/serialization/resources/organization/client/requests/AddUserToOrgRequest.d.ts +13 -0
- package/serialization/resources/organization/client/requests/AddUserToOrgRequest.js +34 -0
- package/serialization/resources/organization/client/requests/CreateOrganizationRequest.d.ts +13 -0
- package/serialization/resources/organization/client/requests/CreateOrganizationRequest.js +34 -0
- package/serialization/resources/organization/client/requests/UpdateOrganizationRequest.d.ts +12 -0
- package/serialization/resources/organization/client/requests/UpdateOrganizationRequest.js +33 -0
- package/serialization/resources/organization/client/requests/index.d.ts +3 -0
- package/serialization/resources/organization/client/requests/index.js +9 -0
- package/{types/serialization → serialization}/resources/organization/client/update.d.ts +0 -6
- package/serialization/resources/organization/client/update.js +44 -0
- package/serialization/resources/organization/index.js +18 -0
- package/serialization/resources/organization/types/LightweightUser.d.ts +14 -0
- package/serialization/resources/organization/types/LightweightUser.js +35 -0
- package/{types/serialization → serialization}/resources/organization/types/Organization.d.ts +2 -0
- package/serialization/resources/organization/types/Organization.js +36 -0
- package/serialization/resources/organization/types/index.d.ts +2 -0
- package/serialization/resources/organization/types/index.js +18 -0
- package/{types/serialization → serialization}/resources/registry/client/generateRegistryTokens.d.ts +0 -10
- package/serialization/resources/registry/client/generateRegistryTokens.js +47 -0
- package/{types/serialization → serialization}/resources/registry/client/hasRegistryPermission.d.ts +1 -8
- package/serialization/resources/registry/client/hasRegistryPermission.js +48 -0
- package/{types/serialization → serialization}/resources/registry/client/index.d.ts +1 -0
- package/serialization/resources/registry/client/index.js +33 -0
- package/serialization/resources/registry/client/requests/CheckRegistryPermissionRequest.d.ts +13 -0
- package/serialization/resources/registry/client/requests/CheckRegistryPermissionRequest.js +34 -0
- package/serialization/resources/registry/client/requests/GenerateRegistryTokensRequest.d.ts +12 -0
- package/serialization/resources/registry/client/requests/GenerateRegistryTokensRequest.js +33 -0
- package/serialization/resources/registry/client/requests/RevokeTokenRequest.d.ts +13 -0
- package/serialization/resources/registry/client/requests/RevokeTokenRequest.js +34 -0
- package/serialization/resources/registry/client/requests/index.d.ts +3 -0
- package/serialization/resources/registry/client/requests/index.js +9 -0
- package/{types/serialization → serialization}/resources/registry/client/revokeToken.d.ts +0 -7
- package/serialization/resources/registry/client/revokeToken.js +47 -0
- package/serialization/resources/registry/index.js +18 -0
- package/serialization/resources/registry/types/MavenRegistryToken.js +34 -0
- package/serialization/resources/registry/types/NpmRegistryToken.js +33 -0
- package/serialization/resources/registry/types/PypiRegistryToken.d.ts +13 -0
- package/serialization/resources/registry/types/PypiRegistryToken.js +34 -0
- package/{types/serialization → serialization}/resources/registry/types/RegistryToken.d.ts +4 -1
- package/serialization/resources/registry/types/RegistryToken.js +52 -0
- package/{types/serialization → serialization}/resources/registry/types/RegistryTokens.d.ts +1 -0
- package/serialization/resources/registry/types/RegistryTokens.js +35 -0
- package/{types/serialization → serialization}/resources/registry/types/index.d.ts +1 -0
- package/serialization/resources/registry/types/index.js +21 -0
- package/serialization/resources/user/index.d.ts +1 -0
- package/serialization/resources/user/index.js +17 -0
- package/serialization/resources/user/types/OrganizationsPage.js +34 -0
- package/serialization/resources/user/types/User.js +36 -0
- package/serialization/resources/user/types/index.js +18 -0
- package/core.d.ts +0 -3
- package/dist/browser/cjs/core.js +0 -4286
- package/dist/browser/cjs/index.js +0 -6332
- package/dist/browser/cjs/serialization.js +0 -5852
- package/dist/browser/esm/core.js +0 -4280
- package/dist/browser/esm/index.js +0 -6328
- package/dist/browser/esm/serialization.js +0 -5864
- package/dist/node/core.js +0 -12643
- package/dist/node/index.js +0 -14715
- package/dist/node/serialization.js +0 -14721
- package/serialization.d.ts +0 -3
- package/types/Client.d.ts +0 -21
- package/types/api/resources/organization/client/Client.d.ts +0 -24
- package/types/api/resources/organization/types/index.d.ts +0 -1
- package/types/api/resources/registry/client/Client.d.ts +0 -18
- package/types/api/resources/user/client/Client.d.ts +0 -17
- package/types/core/schemas/Schema.d.ts +0 -18
- package/types/core/schemas/builders/enum/enum.d.ts +0 -2
- package/types/core/schemas/builders/identity/createIdentitySchemaCreator.d.ts +0 -2
- package/types/core/schemas/builders/identity/identity.d.ts +0 -2
- package/types/core/schemas/builders/identity/index.d.ts +0 -2
- package/types/core/schemas/builders/literals/stringLiteral.d.ts +0 -2
- package/types/core/schemas/builders/object-like/getObjectLikeUtils.d.ts +0 -8
- package/types/core/schemas/builders/object-like/index.d.ts +0 -2
- package/types/core/schemas/builders/object-like/types.d.ts +0 -13
- package/types/core/schemas/builders/primitives/any.d.ts +0 -1
- package/types/core/schemas/builders/primitives/boolean.d.ts +0 -1
- package/types/core/schemas/builders/primitives/number.d.ts +0 -1
- package/types/core/schemas/builders/primitives/string.d.ts +0 -1
- package/types/core/schemas/builders/primitives/unknown.d.ts +0 -1
- package/types/core/schemas/builders/record/index.d.ts +0 -1
- package/types/core/schemas/builders/record/record.d.ts +0 -2
- package/types/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +0 -12
- package/types/core/schemas/builders/schema-utils/types.d.ts +0 -7
- package/types/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +0 -9
- package/types/serialization/resources/organization/types/index.d.ts +0 -1
- package/types/serialization/resources/user/client/getMyOrganizations.d.ts +0 -10
- package/types/serialization/resources/user/client/getMyself.d.ts +0 -10
- package/types/serialization/resources/user/client/index.d.ts +0 -2
- package/types/serialization/resources/user/index.d.ts +0 -2
- /package/{types/api → api}/index.d.ts +0 -0
- /package/{types/api → api}/resources/commons/index.d.ts +0 -0
- /package/{types/api → api}/resources/commons/types/OrganizationId.d.ts +0 -0
- /package/{types/api → api}/resources/commons/types/UserId.d.ts +0 -0
- /package/{types/api → api}/resources/commons/types/index.d.ts +0 -0
- /package/{types/api → api}/resources/index.d.ts +0 -0
- /package/{types/api → api}/resources/organization/client/index.d.ts +0 -0
- /package/{types/api → api}/resources/organization/client/requests/AddUserToOrgRequest.d.ts +0 -0
- /package/{types/api → api}/resources/organization/client/requests/CreateOrganizationRequest.d.ts +0 -0
- /package/{types/api → api}/resources/organization/client/requests/UpdateOrganizationRequest.d.ts +0 -0
- /package/{types/api → api}/resources/organization/client/requests/index.d.ts +0 -0
- /package/{types/api → api}/resources/organization/index.d.ts +0 -0
- /package/{types/api → api}/resources/registry/client/index.d.ts +0 -0
- /package/{types/api → api}/resources/registry/client/requests/CheckRegistryPermissionRequest.d.ts +0 -0
- /package/{types/api → api}/resources/registry/client/requests/GenerateRegistryTokensRequest.d.ts +0 -0
- /package/{types/api → api}/resources/registry/client/requests/RevokeTokenRequest.d.ts +0 -0
- /package/{types/api → api}/resources/registry/client/requests/index.d.ts +0 -0
- /package/{types/api → api}/resources/registry/index.d.ts +0 -0
- /package/{types/api → api}/resources/registry/types/MavenRegistryToken.d.ts +0 -0
- /package/{types/api → api}/resources/registry/types/NpmRegistryToken.d.ts +0 -0
- /package/{types/api → api}/resources/user/client/index.d.ts +0 -0
- /package/{types/api → api}/resources/user/client/requests/GetUserOrganizationsRequest.d.ts +0 -0
- /package/{types/api → api}/resources/user/client/requests/index.d.ts +0 -0
- /package/{types/api → api}/resources/user/index.d.ts +0 -0
- /package/{types/api → api}/resources/user/types/OrganizationsPage.d.ts +0 -0
- /package/{types/api → api}/resources/user/types/User.d.ts +0 -0
- /package/{types/api → api}/resources/user/types/index.d.ts +0 -0
- /package/{types/core → core}/auth/BasicAuth.d.ts +0 -0
- /package/{types/core → core}/auth/BearerToken.d.ts +0 -0
- /package/{types/core → core}/auth/index.d.ts +0 -0
- /package/{types/core → core}/fetcher/APIResponse.d.ts +0 -0
- /package/{types/core → core}/fetcher/Supplier.d.ts +0 -0
- /package/{types/core → core}/fetcher/index.d.ts +0 -0
- /package/{types/core → core}/index.d.ts +0 -0
- /package/{types/core → core}/schemas/builders/date/date.d.ts +0 -0
- /package/{types/core → core}/schemas/builders/date/index.d.ts +0 -0
- /package/{types/core → core}/schemas/builders/enum/index.d.ts +0 -0
- /package/{types/core → core}/schemas/builders/lazy/index.d.ts +0 -0
- /package/{types/core → core}/schemas/builders/lazy/lazy.d.ts +0 -0
- /package/{types/core → core}/schemas/builders/lazy/lazyObject.d.ts +0 -0
- /package/{types/core → core}/schemas/builders/list/index.d.ts +0 -0
- /package/{types/core → core}/schemas/builders/list/list.d.ts +0 -0
- /package/{types/core → core}/schemas/builders/literals/index.d.ts +0 -0
- /package/{types/core → core}/schemas/builders/object/index.d.ts +0 -0
- /package/{types/core → core}/schemas/builders/object/object.d.ts +0 -0
- /package/{types/core → core}/schemas/builders/object/property.d.ts +0 -0
- /package/{types/core → core}/schemas/builders/primitives/index.d.ts +0 -0
- /package/{types/core → core}/schemas/builders/set/index.d.ts +0 -0
- /package/{types/core → core}/schemas/builders/set/set.d.ts +0 -0
- /package/{types/core → core}/schemas/builders/union/discriminant.d.ts +0 -0
- /package/{types/core → core}/schemas/builders/union/index.d.ts +0 -0
- /package/{types/core → core}/schemas/builders/union/types.d.ts +0 -0
- /package/{types/core → core}/schemas/builders/union/union.d.ts +0 -0
- /package/{types/core → core}/schemas/index.d.ts +0 -0
- /package/{types/core → core}/schemas/utils/entries.d.ts +0 -0
- /package/{types/core → core}/schemas/utils/filterObject.d.ts +0 -0
- /package/{types/core → core}/schemas/utils/keys.d.ts +0 -0
- /package/{types/core → core}/schemas/utils/partition.d.ts +0 -0
- /package/{types/index.d.ts → index.d.ts} +0 -0
- /package/{types/serialization → serialization}/index.d.ts +0 -0
- /package/{types/serialization → serialization}/resources/commons/index.d.ts +0 -0
- /package/{types/serialization → serialization}/resources/commons/types/OrganizationId.d.ts +0 -0
- /package/{types/serialization → serialization}/resources/commons/types/UserId.d.ts +0 -0
- /package/{types/serialization → serialization}/resources/commons/types/index.d.ts +0 -0
- /package/{types/serialization → serialization}/resources/organization/client/isMember.d.ts +0 -0
- /package/{types/serialization → serialization}/resources/organization/index.d.ts +0 -0
- /package/{types/serialization → serialization}/resources/registry/index.d.ts +0 -0
- /package/{types/serialization → serialization}/resources/registry/types/MavenRegistryToken.d.ts +0 -0
- /package/{types/serialization → serialization}/resources/registry/types/NpmRegistryToken.d.ts +0 -0
- /package/{types/serialization → serialization}/resources/user/types/OrganizationsPage.d.ts +0 -0
- /package/{types/serialization → serialization}/resources/user/types/User.d.ts +0 -0
- /package/{types/serialization → serialization}/resources/user/types/index.d.ts +0 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.Error = void 0;
|
|
7
|
+
const venus_api_sdk_1 = require("../../../..");
|
|
8
|
+
exports.Error = {
|
|
9
|
+
_unknown: (fetcherError) => {
|
|
10
|
+
return {
|
|
11
|
+
error: undefined,
|
|
12
|
+
content: fetcherError,
|
|
13
|
+
_visit: function (visitor) {
|
|
14
|
+
return venus_api_sdk_1.FernVenusApi.organization.isMember.Error._visit(this, visitor);
|
|
15
|
+
},
|
|
16
|
+
};
|
|
17
|
+
},
|
|
18
|
+
_visit: (value, visitor) => {
|
|
19
|
+
switch (value.error) {
|
|
20
|
+
default:
|
|
21
|
+
return visitor._other(value);
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
};
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { FernVenusApi } from "../../../..";
|
|
5
5
|
import * as core from "../../../../core";
|
|
6
|
-
export declare type Response = core.APIResponse<void, FernVenusApi.organization.update.Error>;
|
|
7
6
|
export declare type Error = FernVenusApi.organization.update.Error.UnauthorizedError | FernVenusApi.organization.update.Error._Unknown;
|
|
8
7
|
export declare namespace Error {
|
|
9
8
|
interface UnauthorizedError extends _Utils {
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.Error = void 0;
|
|
7
|
+
const venus_api_sdk_1 = require("../../../..");
|
|
8
|
+
exports.Error = {
|
|
9
|
+
unauthorizedError: () => {
|
|
10
|
+
return {
|
|
11
|
+
error: "UnauthorizedError",
|
|
12
|
+
_visit: function (visitor) {
|
|
13
|
+
return venus_api_sdk_1.FernVenusApi.organization.update.Error._visit(this, visitor);
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
},
|
|
17
|
+
_unknown: (fetcherError) => {
|
|
18
|
+
return {
|
|
19
|
+
error: undefined,
|
|
20
|
+
content: fetcherError,
|
|
21
|
+
_visit: function (visitor) {
|
|
22
|
+
return venus_api_sdk_1.FernVenusApi.organization.update.Error._visit(this, visitor);
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
},
|
|
26
|
+
_visit: (value, visitor) => {
|
|
27
|
+
switch (value.error) {
|
|
28
|
+
case "UnauthorizedError":
|
|
29
|
+
return visitor.unauthorizedError();
|
|
30
|
+
default:
|
|
31
|
+
return visitor._other(value);
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./types"), exports);
|
|
18
|
+
__exportStar(require("./client"), exports);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./Organization"), exports);
|
|
18
|
+
__exportStar(require("./LightweightUser"), exports);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as core from "../../../../core";
|
|
5
|
+
import { FernVenusApi } from "../../../..";
|
|
6
|
+
export declare namespace Registry {
|
|
7
|
+
interface Options {
|
|
8
|
+
environment: string;
|
|
9
|
+
token?: core.Supplier<core.BearerToken | undefined>;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
export declare class Registry {
|
|
13
|
+
private readonly options;
|
|
14
|
+
constructor(options: Registry.Options);
|
|
15
|
+
generateRegistryTokens(request: FernVenusApi.GenerateRegistryTokensRequest): Promise<core.APIResponse<FernVenusApi.RegistryTokens, FernVenusApi.registry.generateRegistryTokens.Error>>;
|
|
16
|
+
hasRegistryPermission(request: FernVenusApi.CheckRegistryPermissionRequest): Promise<core.APIResponse<boolean, FernVenusApi.registry.hasRegistryPermission.Error>>;
|
|
17
|
+
revokeToken(request: FernVenusApi.RevokeTokenRequest): Promise<core.APIResponse<void, FernVenusApi.registry.revokeToken.Error>>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
28
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
29
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
30
|
+
};
|
|
31
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
+
exports.Registry = void 0;
|
|
33
|
+
const core = __importStar(require("../../../../core"));
|
|
34
|
+
const venus_api_sdk_1 = require("../../../..");
|
|
35
|
+
const url_join_1 = __importDefault(require("url-join"));
|
|
36
|
+
const serializers = __importStar(require("../../../../serialization"));
|
|
37
|
+
class Registry {
|
|
38
|
+
options;
|
|
39
|
+
constructor(options) {
|
|
40
|
+
this.options = options;
|
|
41
|
+
}
|
|
42
|
+
async generateRegistryTokens(request) {
|
|
43
|
+
const _response = await core.fetcher({
|
|
44
|
+
url: (0, url_join_1.default)(this.options.environment, "/registry/generate-tokens"),
|
|
45
|
+
method: "POST",
|
|
46
|
+
headers: {
|
|
47
|
+
Authorization: core.BearerToken.toAuthorizationHeader(await core.Supplier.get(this.options.token)),
|
|
48
|
+
},
|
|
49
|
+
body: await serializers.GenerateRegistryTokensRequest.jsonOrThrow(request),
|
|
50
|
+
});
|
|
51
|
+
if (_response.ok) {
|
|
52
|
+
return {
|
|
53
|
+
ok: true,
|
|
54
|
+
body: await serializers.RegistryTokens.parseOrThrow(_response.body, {
|
|
55
|
+
allowUnknownKeys: true,
|
|
56
|
+
}),
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
if (_response.error.reason === "status-code") {
|
|
60
|
+
switch (_response.error.body?.error) {
|
|
61
|
+
case "UnauthorizedError":
|
|
62
|
+
case "OrganizationNotFoundError":
|
|
63
|
+
return {
|
|
64
|
+
ok: false,
|
|
65
|
+
error: await serializers.registry.generateRegistryTokens.Error.parseOrThrow(_response.error.body, { allowUnknownKeys: true }),
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return {
|
|
70
|
+
ok: false,
|
|
71
|
+
error: venus_api_sdk_1.FernVenusApi.registry.generateRegistryTokens.Error._unknown(_response.error),
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
async hasRegistryPermission(request) {
|
|
75
|
+
const _response = await core.fetcher({
|
|
76
|
+
url: (0, url_join_1.default)(this.options.environment, "/registry/check-permissions"),
|
|
77
|
+
method: "POST",
|
|
78
|
+
headers: {
|
|
79
|
+
Authorization: core.BearerToken.toAuthorizationHeader(await core.Supplier.get(this.options.token)),
|
|
80
|
+
},
|
|
81
|
+
body: await serializers.CheckRegistryPermissionRequest.jsonOrThrow(request),
|
|
82
|
+
});
|
|
83
|
+
if (_response.ok) {
|
|
84
|
+
return {
|
|
85
|
+
ok: true,
|
|
86
|
+
body: await serializers.registry.hasRegistryPermission.Response.parseOrThrow(_response.body, { allowUnknownKeys: true }),
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
if (_response.error.reason === "status-code") {
|
|
90
|
+
switch (_response.error.body?.error) {
|
|
91
|
+
case "UnauthorizedError":
|
|
92
|
+
case "OrganizationNotFoundError":
|
|
93
|
+
return {
|
|
94
|
+
ok: false,
|
|
95
|
+
error: await serializers.registry.hasRegistryPermission.Error.parseOrThrow(_response.error.body, { allowUnknownKeys: true }),
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
return {
|
|
100
|
+
ok: false,
|
|
101
|
+
error: venus_api_sdk_1.FernVenusApi.registry.hasRegistryPermission.Error._unknown(_response.error),
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
async revokeToken(request) {
|
|
105
|
+
const _response = await core.fetcher({
|
|
106
|
+
url: (0, url_join_1.default)(this.options.environment, "/registry/revoke-token"),
|
|
107
|
+
method: "POST",
|
|
108
|
+
headers: {
|
|
109
|
+
Authorization: core.BearerToken.toAuthorizationHeader(await core.Supplier.get(this.options.token)),
|
|
110
|
+
},
|
|
111
|
+
body: await serializers.RevokeTokenRequest.jsonOrThrow(request),
|
|
112
|
+
});
|
|
113
|
+
if (_response.ok) {
|
|
114
|
+
return {
|
|
115
|
+
ok: true,
|
|
116
|
+
body: undefined,
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
if (_response.error.reason === "status-code") {
|
|
120
|
+
switch (_response.error.body?.error) {
|
|
121
|
+
case "UnauthorizedError":
|
|
122
|
+
case "OrganizationNotFoundError":
|
|
123
|
+
return {
|
|
124
|
+
ok: false,
|
|
125
|
+
error: await serializers.registry.revokeToken.Error.parseOrThrow(_response.error.body, { allowUnknownKeys: true }),
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
return {
|
|
130
|
+
ok: false,
|
|
131
|
+
error: venus_api_sdk_1.FernVenusApi.registry.revokeToken.Error._unknown(_response.error),
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
exports.Registry = Registry;
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { FernVenusApi } from "../../../..";
|
|
5
5
|
import * as core from "../../../../core";
|
|
6
|
-
export declare type Response = core.APIResponse<FernVenusApi.RegistryTokens, FernVenusApi.registry.generateRegistryTokens.Error>;
|
|
7
6
|
export declare type Error = FernVenusApi.registry.generateRegistryTokens.Error.UnauthorizedError | FernVenusApi.registry.generateRegistryTokens.Error.OrganizationNotFoundError | FernVenusApi.registry.generateRegistryTokens.Error._Unknown;
|
|
8
7
|
export declare namespace Error {
|
|
9
8
|
interface UnauthorizedError extends _Utils {
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.Error = void 0;
|
|
7
|
+
const venus_api_sdk_1 = require("../../../..");
|
|
8
|
+
exports.Error = {
|
|
9
|
+
unauthorizedError: () => {
|
|
10
|
+
return {
|
|
11
|
+
error: "UnauthorizedError",
|
|
12
|
+
_visit: function (visitor) {
|
|
13
|
+
return venus_api_sdk_1.FernVenusApi.registry.generateRegistryTokens.Error._visit(this, visitor);
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
},
|
|
17
|
+
organizationNotFoundError: () => {
|
|
18
|
+
return {
|
|
19
|
+
error: "OrganizationNotFoundError",
|
|
20
|
+
_visit: function (visitor) {
|
|
21
|
+
return venus_api_sdk_1.FernVenusApi.registry.generateRegistryTokens.Error._visit(this, visitor);
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
},
|
|
25
|
+
_unknown: (fetcherError) => {
|
|
26
|
+
return {
|
|
27
|
+
error: undefined,
|
|
28
|
+
content: fetcherError,
|
|
29
|
+
_visit: function (visitor) {
|
|
30
|
+
return venus_api_sdk_1.FernVenusApi.registry.generateRegistryTokens.Error._visit(this, visitor);
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
},
|
|
34
|
+
_visit: (value, visitor) => {
|
|
35
|
+
switch (value.error) {
|
|
36
|
+
case "UnauthorizedError":
|
|
37
|
+
return visitor.unauthorizedError();
|
|
38
|
+
case "OrganizationNotFoundError":
|
|
39
|
+
return visitor.organizationNotFoundError();
|
|
40
|
+
default:
|
|
41
|
+
return visitor._other(value);
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
};
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { FernVenusApi } from "../../../..";
|
|
5
5
|
import * as core from "../../../../core";
|
|
6
|
-
export declare type Response = core.APIResponse<boolean, FernVenusApi.registry.hasRegistryPermission.Error>;
|
|
7
6
|
export declare type Error = FernVenusApi.registry.hasRegistryPermission.Error.UnauthorizedError | FernVenusApi.registry.hasRegistryPermission.Error.OrganizationNotFoundError | FernVenusApi.registry.hasRegistryPermission.Error._Unknown;
|
|
8
7
|
export declare namespace Error {
|
|
9
8
|
interface UnauthorizedError extends _Utils {
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.Error = void 0;
|
|
7
|
+
const venus_api_sdk_1 = require("../../../..");
|
|
8
|
+
exports.Error = {
|
|
9
|
+
unauthorizedError: () => {
|
|
10
|
+
return {
|
|
11
|
+
error: "UnauthorizedError",
|
|
12
|
+
_visit: function (visitor) {
|
|
13
|
+
return venus_api_sdk_1.FernVenusApi.registry.hasRegistryPermission.Error._visit(this, visitor);
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
},
|
|
17
|
+
organizationNotFoundError: () => {
|
|
18
|
+
return {
|
|
19
|
+
error: "OrganizationNotFoundError",
|
|
20
|
+
_visit: function (visitor) {
|
|
21
|
+
return venus_api_sdk_1.FernVenusApi.registry.hasRegistryPermission.Error._visit(this, visitor);
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
},
|
|
25
|
+
_unknown: (fetcherError) => {
|
|
26
|
+
return {
|
|
27
|
+
error: undefined,
|
|
28
|
+
content: fetcherError,
|
|
29
|
+
_visit: function (visitor) {
|
|
30
|
+
return venus_api_sdk_1.FernVenusApi.registry.hasRegistryPermission.Error._visit(this, visitor);
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
},
|
|
34
|
+
_visit: (value, visitor) => {
|
|
35
|
+
switch (value.error) {
|
|
36
|
+
case "UnauthorizedError":
|
|
37
|
+
return visitor.unauthorizedError();
|
|
38
|
+
case "OrganizationNotFoundError":
|
|
39
|
+
return visitor.organizationNotFoundError();
|
|
40
|
+
default:
|
|
41
|
+
return visitor._other(value);
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
19
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
20
|
+
};
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.revokeToken = exports.hasRegistryPermission = exports.generateRegistryTokens = void 0;
|
|
30
|
+
__exportStar(require("./requests"), exports);
|
|
31
|
+
exports.generateRegistryTokens = __importStar(require("./generateRegistryTokens"));
|
|
32
|
+
exports.hasRegistryPermission = __importStar(require("./hasRegistryPermission"));
|
|
33
|
+
exports.revokeToken = __importStar(require("./revokeToken"));
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import { FernVenusApi } from "../../../..";
|
|
5
5
|
import * as core from "../../../../core";
|
|
6
|
-
export declare type Response = core.APIResponse<void, FernVenusApi.registry.revokeToken.Error>;
|
|
7
6
|
export declare type Error = FernVenusApi.registry.revokeToken.Error.UnauthorizedError | FernVenusApi.registry.revokeToken.Error.OrganizationNotFoundError | FernVenusApi.registry.revokeToken.Error._Unknown;
|
|
8
7
|
export declare namespace Error {
|
|
9
8
|
interface UnauthorizedError extends _Utils {
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.Error = void 0;
|
|
7
|
+
const venus_api_sdk_1 = require("../../../..");
|
|
8
|
+
exports.Error = {
|
|
9
|
+
unauthorizedError: () => {
|
|
10
|
+
return {
|
|
11
|
+
error: "UnauthorizedError",
|
|
12
|
+
_visit: function (visitor) {
|
|
13
|
+
return venus_api_sdk_1.FernVenusApi.registry.revokeToken.Error._visit(this, visitor);
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
},
|
|
17
|
+
organizationNotFoundError: () => {
|
|
18
|
+
return {
|
|
19
|
+
error: "OrganizationNotFoundError",
|
|
20
|
+
_visit: function (visitor) {
|
|
21
|
+
return venus_api_sdk_1.FernVenusApi.registry.revokeToken.Error._visit(this, visitor);
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
},
|
|
25
|
+
_unknown: (fetcherError) => {
|
|
26
|
+
return {
|
|
27
|
+
error: undefined,
|
|
28
|
+
content: fetcherError,
|
|
29
|
+
_visit: function (visitor) {
|
|
30
|
+
return venus_api_sdk_1.FernVenusApi.registry.revokeToken.Error._visit(this, visitor);
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
},
|
|
34
|
+
_visit: (value, visitor) => {
|
|
35
|
+
switch (value.error) {
|
|
36
|
+
case "UnauthorizedError":
|
|
37
|
+
return visitor.unauthorizedError();
|
|
38
|
+
case "OrganizationNotFoundError":
|
|
39
|
+
return visitor.organizationNotFoundError();
|
|
40
|
+
default:
|
|
41
|
+
return visitor._other(value);
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./types"), exports);
|
|
18
|
+
__exportStar(require("./client"), exports);
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
import { FernVenusApi } from "../../../..";
|
|
5
|
-
export declare type RegistryToken = FernVenusApi.RegistryToken.Npm | FernVenusApi.RegistryToken.Maven | FernVenusApi.RegistryToken._Unknown;
|
|
5
|
+
export declare type RegistryToken = FernVenusApi.RegistryToken.Npm | FernVenusApi.RegistryToken.Maven | FernVenusApi.RegistryToken.Pypi | FernVenusApi.RegistryToken._Unknown;
|
|
6
6
|
export declare namespace RegistryToken {
|
|
7
7
|
interface Npm extends FernVenusApi.NpmRegistryToken, _Utils {
|
|
8
8
|
type: "npm";
|
|
@@ -10,6 +10,9 @@ export declare namespace RegistryToken {
|
|
|
10
10
|
interface Maven extends FernVenusApi.MavenRegistryToken, _Utils {
|
|
11
11
|
type: "maven";
|
|
12
12
|
}
|
|
13
|
+
interface Pypi extends FernVenusApi.PypiRegistryToken, _Utils {
|
|
14
|
+
type: "pypi";
|
|
15
|
+
}
|
|
13
16
|
interface _Unknown extends _Utils {
|
|
14
17
|
type: void;
|
|
15
18
|
}
|
|
@@ -19,6 +22,7 @@ export declare namespace RegistryToken {
|
|
|
19
22
|
interface _Visitor<_Result> {
|
|
20
23
|
npm: (value: FernVenusApi.NpmRegistryToken) => _Result;
|
|
21
24
|
maven: (value: FernVenusApi.MavenRegistryToken) => _Result;
|
|
25
|
+
pypi: (value: FernVenusApi.PypiRegistryToken) => _Result;
|
|
22
26
|
_other: (value: {
|
|
23
27
|
type: string;
|
|
24
28
|
}) => _Result;
|
|
@@ -27,6 +31,7 @@ export declare namespace RegistryToken {
|
|
|
27
31
|
export declare const RegistryToken: {
|
|
28
32
|
readonly npm: (value: FernVenusApi.NpmRegistryToken) => FernVenusApi.RegistryToken.Npm;
|
|
29
33
|
readonly maven: (value: FernVenusApi.MavenRegistryToken) => FernVenusApi.RegistryToken.Maven;
|
|
34
|
+
readonly pypi: (value: FernVenusApi.PypiRegistryToken) => FernVenusApi.RegistryToken.Pypi;
|
|
30
35
|
readonly _unknown: (value: {
|
|
31
36
|
type: string;
|
|
32
37
|
}) => FernVenusApi.RegistryToken._Unknown;
|