@fern-api/venus-api-sdk 0.13.2-5-g36df8bc → 0.13.4-10-g9e497fa
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 +7 -3
- package/api/resources/commons/types/OrganizationId.d.ts +1 -1
- package/api/resources/commons/types/OrganizationId.js +1 -2
- package/api/resources/commons/types/UserId.d.ts +1 -1
- package/api/resources/commons/types/UserId.js +1 -2
- package/api/resources/index.js +17 -7
- package/api/resources/organization/client/Client.d.ts +8 -1
- package/api/resources/organization/client/Client.js +66 -109
- package/api/resources/organization/client/addUser.d.ts +1 -1
- package/api/resources/organization/client/addUser.js +17 -7
- package/api/resources/organization/client/create.d.ts +1 -1
- package/api/resources/organization/client/create.js +17 -7
- package/api/resources/organization/client/get.d.ts +1 -1
- package/api/resources/organization/client/get.js +17 -7
- package/api/resources/organization/client/getMyOrganizationFromScopedToken.d.ts +1 -1
- package/api/resources/organization/client/getMyOrganizationFromScopedToken.js +17 -7
- package/api/resources/organization/client/getOrgIdsFromToken.d.ts +1 -1
- package/api/resources/organization/client/getOrgIdsFromToken.js +17 -7
- package/api/resources/organization/client/index.js +17 -7
- package/api/resources/organization/client/inviteUser.d.ts +1 -1
- package/api/resources/organization/client/inviteUser.js +17 -7
- package/api/resources/organization/client/isMember.d.ts +1 -1
- package/api/resources/organization/client/isMember.js +17 -7
- package/api/resources/organization/client/removeUser.d.ts +1 -1
- package/api/resources/organization/client/removeUser.js +17 -7
- package/api/resources/organization/client/requests/CreateOrganizationRequest.d.ts +2 -0
- package/api/resources/organization/client/requests/UpdateOrganizationRequest.d.ts +6 -0
- package/api/resources/organization/client/update.d.ts +1 -1
- package/api/resources/organization/client/update.js +17 -7
- package/api/resources/organization/types/CreateOrganizationResponse.d.ts +12 -0
- package/api/resources/organization/types/CreateOrganizationResponse.js +5 -0
- package/api/resources/organization/types/index.d.ts +1 -0
- package/api/resources/organization/types/index.js +1 -0
- package/api/resources/registry/client/Client.d.ts +4 -0
- package/api/resources/registry/client/Client.js +29 -40
- package/api/resources/registry/client/generateRegistryTokens.d.ts +1 -1
- package/api/resources/registry/client/generateRegistryTokens.js +17 -7
- package/api/resources/registry/client/hasRegistryPermission.d.ts +1 -1
- package/api/resources/registry/client/hasRegistryPermission.js +17 -7
- package/api/resources/registry/client/index.js +17 -7
- package/api/resources/registry/client/revokeToken.d.ts +1 -1
- package/api/resources/registry/client/revokeToken.js +17 -7
- package/api/resources/registry/types/RegistryToken.d.ts +1 -1
- package/api/resources/user/client/Client.d.ts +4 -0
- package/api/resources/user/client/Client.js +23 -25
- package/api/resources/user/client/getMyOrganizations.d.ts +1 -1
- package/api/resources/user/client/getMyOrganizations.js +17 -7
- package/api/resources/user/client/getMyself.d.ts +1 -1
- package/api/resources/user/client/getMyself.js +17 -7
- package/api/resources/user/client/index.js +17 -7
- package/core/auth/BearerToken.d.ts +1 -1
- package/core/fetcher/APIResponse.d.ts +1 -1
- package/core/fetcher/Fetcher.d.ts +3 -3
- package/core/fetcher/Fetcher.js +6 -5
- package/core/fetcher/Supplier.d.ts +1 -1
- package/core/fetcher/createRequestUrl.d.ts +1 -1
- package/core/fetcher/createRequestUrl.js +1 -2
- package/core/fetcher/getFetchFn.js +18 -9
- package/core/fetcher/getHeader.js +1 -2
- package/core/fetcher/getRequestBody.js +5 -5
- package/core/fetcher/getResponseBody.js +4 -2
- package/core/fetcher/makeRequest.d.ts +1 -1
- package/core/fetcher/requestWithRetries.js +17 -9
- package/core/fetcher/signals.d.ts +0 -1
- package/core/fetcher/signals.js +2 -3
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +0 -1
- package/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +6 -4
- package/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +1 -1
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +1 -1
- package/core/fetcher/stream-wrappers/chooseStreamWrapper.js +18 -9
- package/core/index.js +17 -7
- package/core/json.d.ts +15 -0
- package/core/json.js +24 -0
- package/core/runtime/runtime.d.ts +1 -1
- package/core/runtime/runtime.js +51 -41
- package/core/schemas/Schema.d.ts +7 -5
- package/core/schemas/Schema.js +2 -0
- package/core/schemas/builders/bigint/bigint.d.ts +1 -1
- package/core/schemas/builders/bigint/bigint.js +22 -19
- package/core/schemas/builders/date/date.js +1 -2
- package/core/schemas/builders/enum/enum.js +1 -2
- package/core/schemas/builders/lazy/lazy.d.ts +1 -1
- package/core/schemas/builders/lazy/lazy.js +3 -4
- package/core/schemas/builders/lazy/lazyObject.js +1 -2
- package/core/schemas/builders/list/list.js +1 -2
- package/core/schemas/builders/literals/booleanLiteral.js +1 -2
- package/core/schemas/builders/literals/stringLiteral.js +1 -2
- package/core/schemas/builders/object/object.d.ts +1 -1
- package/core/schemas/builders/object/object.js +31 -3
- package/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +3 -3
- package/core/schemas/builders/object/objectWithoutOptionalProperties.js +1 -2
- package/core/schemas/builders/object/property.js +2 -3
- package/core/schemas/builders/object/types.d.ts +16 -11
- package/core/schemas/builders/object-like/getObjectLikeUtils.js +2 -3
- package/core/schemas/builders/object-like/types.d.ts +1 -1
- package/core/schemas/builders/record/record.js +2 -4
- package/core/schemas/builders/record/types.d.ts +2 -2
- package/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +4 -0
- package/core/schemas/builders/schema-utils/getSchemaUtils.js +67 -4
- package/core/schemas/builders/schema-utils/stringifyValidationErrors.js +1 -2
- package/core/schemas/builders/set/set.js +1 -2
- package/core/schemas/builders/undiscriminated-union/types.d.ts +4 -4
- package/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +1 -2
- package/core/schemas/builders/union/discriminant.js +1 -2
- package/core/schemas/builders/union/types.d.ts +6 -6
- package/core/schemas/builders/union/union.d.ts +1 -1
- package/core/schemas/builders/union/union.js +1 -2
- package/core/schemas/utils/MaybePromise.d.ts +1 -1
- package/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +4 -4
- package/core/schemas/utils/createIdentitySchemaCreator.js +1 -2
- package/core/schemas/utils/entries.d.ts +1 -1
- package/core/schemas/utils/entries.js +1 -2
- package/core/schemas/utils/filterObject.d.ts +1 -1
- package/core/schemas/utils/filterObject.js +1 -2
- package/core/schemas/utils/getErrorMessageForIncorrectType.js +1 -2
- package/core/schemas/utils/isPlainObject.js +1 -2
- package/core/schemas/utils/keys.d.ts +1 -1
- package/core/schemas/utils/keys.js +1 -2
- package/core/schemas/utils/maybeSkipValidation.js +1 -2
- package/core/schemas/utils/partition.js +1 -2
- package/dist/Client.d.ts +7 -3
- package/dist/api/resources/commons/types/OrganizationId.d.ts +1 -1
- package/dist/api/resources/commons/types/OrganizationId.js +1 -2
- package/dist/api/resources/commons/types/UserId.d.ts +1 -1
- package/dist/api/resources/commons/types/UserId.js +1 -2
- package/dist/api/resources/index.js +17 -7
- package/dist/api/resources/organization/client/Client.d.ts +8 -1
- package/dist/api/resources/organization/client/Client.js +66 -109
- package/dist/api/resources/organization/client/addUser.d.ts +1 -1
- package/dist/api/resources/organization/client/addUser.js +17 -7
- package/dist/api/resources/organization/client/create.d.ts +1 -1
- package/dist/api/resources/organization/client/create.js +17 -7
- package/dist/api/resources/organization/client/get.d.ts +1 -1
- package/dist/api/resources/organization/client/get.js +17 -7
- package/dist/api/resources/organization/client/getMyOrganizationFromScopedToken.d.ts +1 -1
- package/dist/api/resources/organization/client/getMyOrganizationFromScopedToken.js +17 -7
- package/dist/api/resources/organization/client/getOrgIdsFromToken.d.ts +1 -1
- package/dist/api/resources/organization/client/getOrgIdsFromToken.js +17 -7
- package/dist/api/resources/organization/client/index.js +17 -7
- package/dist/api/resources/organization/client/inviteUser.d.ts +1 -1
- package/dist/api/resources/organization/client/inviteUser.js +17 -7
- package/dist/api/resources/organization/client/isMember.d.ts +1 -1
- package/dist/api/resources/organization/client/isMember.js +17 -7
- package/dist/api/resources/organization/client/removeUser.d.ts +1 -1
- package/dist/api/resources/organization/client/removeUser.js +17 -7
- package/dist/api/resources/organization/client/requests/CreateOrganizationRequest.d.ts +2 -0
- package/dist/api/resources/organization/client/requests/UpdateOrganizationRequest.d.ts +6 -0
- package/dist/api/resources/organization/client/update.d.ts +1 -1
- package/dist/api/resources/organization/client/update.js +17 -7
- package/dist/api/resources/organization/types/CreateOrganizationResponse.d.ts +12 -0
- package/dist/api/resources/organization/types/CreateOrganizationResponse.js +5 -0
- package/dist/api/resources/organization/types/index.d.ts +1 -0
- package/dist/api/resources/organization/types/index.js +1 -0
- package/dist/api/resources/registry/client/Client.d.ts +4 -0
- package/dist/api/resources/registry/client/Client.js +29 -40
- package/dist/api/resources/registry/client/generateRegistryTokens.d.ts +1 -1
- package/dist/api/resources/registry/client/generateRegistryTokens.js +17 -7
- package/dist/api/resources/registry/client/hasRegistryPermission.d.ts +1 -1
- package/dist/api/resources/registry/client/hasRegistryPermission.js +17 -7
- package/dist/api/resources/registry/client/index.js +17 -7
- package/dist/api/resources/registry/client/revokeToken.d.ts +1 -1
- package/dist/api/resources/registry/client/revokeToken.js +17 -7
- package/dist/api/resources/registry/types/RegistryToken.d.ts +1 -1
- package/dist/api/resources/user/client/Client.d.ts +4 -0
- package/dist/api/resources/user/client/Client.js +23 -25
- package/dist/api/resources/user/client/getMyOrganizations.d.ts +1 -1
- package/dist/api/resources/user/client/getMyOrganizations.js +17 -7
- package/dist/api/resources/user/client/getMyself.d.ts +1 -1
- package/dist/api/resources/user/client/getMyself.js +17 -7
- package/dist/api/resources/user/client/index.js +17 -7
- package/dist/core/auth/BearerToken.d.ts +1 -1
- package/dist/core/fetcher/APIResponse.d.ts +1 -1
- package/dist/core/fetcher/Fetcher.d.ts +3 -3
- package/dist/core/fetcher/Fetcher.js +6 -5
- package/dist/core/fetcher/Supplier.d.ts +1 -1
- package/dist/core/fetcher/createRequestUrl.d.ts +1 -1
- package/dist/core/fetcher/createRequestUrl.js +1 -2
- package/dist/core/fetcher/getFetchFn.js +18 -9
- package/dist/core/fetcher/getHeader.js +1 -2
- package/dist/core/fetcher/getRequestBody.js +5 -5
- package/dist/core/fetcher/getResponseBody.js +4 -2
- package/dist/core/fetcher/makeRequest.d.ts +1 -1
- package/dist/core/fetcher/requestWithRetries.js +17 -9
- package/dist/core/fetcher/signals.d.ts +0 -1
- package/dist/core/fetcher/signals.js +2 -3
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.d.ts +0 -1
- package/dist/core/fetcher/stream-wrappers/NodePre18StreamWrapper.js +6 -4
- package/dist/core/fetcher/stream-wrappers/UndiciStreamWrapper.d.ts +1 -1
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.d.ts +1 -1
- package/dist/core/fetcher/stream-wrappers/chooseStreamWrapper.js +18 -9
- package/dist/core/index.js +17 -7
- package/dist/core/json.d.ts +15 -0
- package/dist/core/json.js +24 -0
- package/dist/core/runtime/runtime.d.ts +1 -1
- package/dist/core/runtime/runtime.js +51 -41
- package/dist/core/schemas/Schema.d.ts +7 -5
- package/dist/core/schemas/Schema.js +2 -0
- package/dist/core/schemas/builders/bigint/bigint.d.ts +1 -1
- package/dist/core/schemas/builders/bigint/bigint.js +22 -19
- package/dist/core/schemas/builders/date/date.js +1 -2
- package/dist/core/schemas/builders/enum/enum.js +1 -2
- package/dist/core/schemas/builders/lazy/lazy.d.ts +1 -1
- package/dist/core/schemas/builders/lazy/lazy.js +3 -4
- package/dist/core/schemas/builders/lazy/lazyObject.js +1 -2
- package/dist/core/schemas/builders/list/list.js +1 -2
- package/dist/core/schemas/builders/literals/booleanLiteral.js +1 -2
- package/dist/core/schemas/builders/literals/stringLiteral.js +1 -2
- package/dist/core/schemas/builders/object/object.d.ts +1 -1
- package/dist/core/schemas/builders/object/object.js +31 -3
- package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.d.ts +3 -3
- package/dist/core/schemas/builders/object/objectWithoutOptionalProperties.js +1 -2
- package/dist/core/schemas/builders/object/property.js +2 -3
- package/dist/core/schemas/builders/object/types.d.ts +16 -11
- package/dist/core/schemas/builders/object-like/getObjectLikeUtils.js +2 -3
- package/dist/core/schemas/builders/object-like/types.d.ts +1 -1
- package/dist/core/schemas/builders/record/record.js +2 -4
- package/dist/core/schemas/builders/record/types.d.ts +2 -2
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.d.ts +4 -0
- package/dist/core/schemas/builders/schema-utils/getSchemaUtils.js +67 -4
- package/dist/core/schemas/builders/schema-utils/stringifyValidationErrors.js +1 -2
- package/dist/core/schemas/builders/set/set.js +1 -2
- package/dist/core/schemas/builders/undiscriminated-union/types.d.ts +4 -4
- package/dist/core/schemas/builders/undiscriminated-union/undiscriminatedUnion.js +1 -2
- package/dist/core/schemas/builders/union/discriminant.js +1 -2
- package/dist/core/schemas/builders/union/types.d.ts +6 -6
- package/dist/core/schemas/builders/union/union.d.ts +1 -1
- package/dist/core/schemas/builders/union/union.js +1 -2
- package/dist/core/schemas/utils/MaybePromise.d.ts +1 -1
- package/dist/core/schemas/utils/addQuestionMarksToNullableProperties.d.ts +4 -4
- package/dist/core/schemas/utils/createIdentitySchemaCreator.js +1 -2
- package/dist/core/schemas/utils/entries.d.ts +1 -1
- package/dist/core/schemas/utils/entries.js +1 -2
- package/dist/core/schemas/utils/filterObject.d.ts +1 -1
- package/dist/core/schemas/utils/filterObject.js +1 -2
- package/dist/core/schemas/utils/getErrorMessageForIncorrectType.js +1 -2
- package/dist/core/schemas/utils/isPlainObject.js +1 -2
- package/dist/core/schemas/utils/keys.d.ts +1 -1
- package/dist/core/schemas/utils/keys.js +1 -2
- package/dist/core/schemas/utils/maybeSkipValidation.js +1 -2
- package/dist/core/schemas/utils/partition.js +1 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +19 -8
- package/dist/serialization/resources/commons/types/OrganizationId.js +17 -7
- package/dist/serialization/resources/commons/types/UserId.js +17 -7
- package/dist/serialization/resources/index.js +17 -7
- package/dist/serialization/resources/organization/client/addUser.js +17 -7
- package/dist/serialization/resources/organization/client/create.js +17 -7
- package/dist/serialization/resources/organization/client/get.js +17 -7
- package/dist/serialization/resources/organization/client/getMyOrganizationFromScopedToken.js +17 -7
- package/dist/serialization/resources/organization/client/getOrgIdsFromToken.js +17 -7
- package/dist/serialization/resources/organization/client/index.js +17 -7
- package/dist/serialization/resources/organization/client/inviteUser.js +17 -7
- package/dist/serialization/resources/organization/client/isMember.js +17 -7
- package/dist/serialization/resources/organization/client/removeUser.js +17 -7
- package/dist/serialization/resources/organization/client/requests/AddUserToOrgRequest.js +17 -7
- package/dist/serialization/resources/organization/client/requests/CreateOrganizationRequest.d.ts +1 -0
- package/dist/serialization/resources/organization/client/requests/CreateOrganizationRequest.js +18 -7
- package/dist/serialization/resources/organization/client/requests/InviteUserToOrgRequest.js +17 -7
- package/dist/serialization/resources/organization/client/requests/RemoveUserFromOrgRequest.js +17 -7
- package/dist/serialization/resources/organization/client/requests/UpdateOrganizationRequest.d.ts +2 -0
- package/dist/serialization/resources/organization/client/requests/UpdateOrganizationRequest.js +19 -7
- package/dist/serialization/resources/organization/client/update.js +17 -7
- package/dist/serialization/resources/organization/types/CreateOrganizationResponse.d.ts +13 -0
- package/dist/serialization/resources/organization/types/CreateOrganizationResponse.js +44 -0
- package/dist/serialization/resources/organization/types/LightweightUser.js +17 -7
- package/dist/serialization/resources/organization/types/Organization.js +17 -7
- package/dist/serialization/resources/organization/types/index.d.ts +1 -0
- package/dist/serialization/resources/organization/types/index.js +1 -0
- package/dist/serialization/resources/registry/client/generateRegistryTokens.js +17 -7
- package/dist/serialization/resources/registry/client/hasRegistryPermission.js +17 -7
- package/dist/serialization/resources/registry/client/index.js +17 -7
- package/dist/serialization/resources/registry/client/requests/CheckRegistryPermissionRequest.js +17 -7
- package/dist/serialization/resources/registry/client/requests/GenerateRegistryTokensRequest.js +17 -7
- package/dist/serialization/resources/registry/client/requests/RevokeTokenRequest.js +17 -7
- package/dist/serialization/resources/registry/client/revokeToken.js +17 -7
- package/dist/serialization/resources/registry/types/MavenRegistryToken.js +17 -7
- package/dist/serialization/resources/registry/types/NpmRegistryToken.js +17 -7
- package/dist/serialization/resources/registry/types/PypiRegistryToken.js +17 -7
- package/dist/serialization/resources/registry/types/RegistryToken.js +17 -7
- package/dist/serialization/resources/registry/types/RegistryTokens.js +17 -7
- package/dist/serialization/resources/user/types/OrganizationsPage.js +17 -7
- package/dist/serialization/resources/user/types/User.js +17 -7
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/index.d.ts +1 -0
- package/index.js +19 -8
- package/{jest.config.js → jest.config.mjs} +4 -1
- package/package.json +16 -17
- package/scripts/rename-to-esm-files.js +115 -0
- package/serialization/resources/commons/types/OrganizationId.js +17 -7
- package/serialization/resources/commons/types/UserId.js +17 -7
- package/serialization/resources/index.js +17 -7
- package/serialization/resources/organization/client/addUser.js +17 -7
- package/serialization/resources/organization/client/create.js +17 -7
- package/serialization/resources/organization/client/get.js +17 -7
- package/serialization/resources/organization/client/getMyOrganizationFromScopedToken.js +17 -7
- package/serialization/resources/organization/client/getOrgIdsFromToken.js +17 -7
- package/serialization/resources/organization/client/index.js +17 -7
- package/serialization/resources/organization/client/inviteUser.js +17 -7
- package/serialization/resources/organization/client/isMember.js +17 -7
- package/serialization/resources/organization/client/removeUser.js +17 -7
- package/serialization/resources/organization/client/requests/AddUserToOrgRequest.js +17 -7
- package/serialization/resources/organization/client/requests/CreateOrganizationRequest.d.ts +1 -0
- package/serialization/resources/organization/client/requests/CreateOrganizationRequest.js +18 -7
- package/serialization/resources/organization/client/requests/InviteUserToOrgRequest.js +17 -7
- package/serialization/resources/organization/client/requests/RemoveUserFromOrgRequest.js +17 -7
- package/serialization/resources/organization/client/requests/UpdateOrganizationRequest.d.ts +2 -0
- package/serialization/resources/organization/client/requests/UpdateOrganizationRequest.js +19 -7
- package/serialization/resources/organization/client/update.js +17 -7
- package/serialization/resources/organization/types/CreateOrganizationResponse.d.ts +13 -0
- package/serialization/resources/organization/types/CreateOrganizationResponse.js +44 -0
- package/serialization/resources/organization/types/LightweightUser.js +17 -7
- package/serialization/resources/organization/types/Organization.js +17 -7
- package/serialization/resources/organization/types/index.d.ts +1 -0
- package/serialization/resources/organization/types/index.js +1 -0
- package/serialization/resources/registry/client/generateRegistryTokens.js +17 -7
- package/serialization/resources/registry/client/hasRegistryPermission.js +17 -7
- package/serialization/resources/registry/client/index.js +17 -7
- package/serialization/resources/registry/client/requests/CheckRegistryPermissionRequest.js +17 -7
- package/serialization/resources/registry/client/requests/GenerateRegistryTokensRequest.js +17 -7
- package/serialization/resources/registry/client/requests/RevokeTokenRequest.js +17 -7
- package/serialization/resources/registry/client/revokeToken.js +17 -7
- package/serialization/resources/registry/types/MavenRegistryToken.js +17 -7
- package/serialization/resources/registry/types/NpmRegistryToken.js +17 -7
- package/serialization/resources/registry/types/PypiRegistryToken.js +17 -7
- package/serialization/resources/registry/types/RegistryToken.js +17 -7
- package/serialization/resources/registry/types/RegistryTokens.js +17 -7
- package/serialization/resources/user/types/OrganizationsPage.js +17 -7
- package/serialization/resources/user/types/User.js +17 -7
- package/version.d.ts +1 -1
- package/version.js +1 -1
package/Client.d.ts
CHANGED
|
@@ -8,6 +8,8 @@ import { User } from "./api/resources/user/client/Client";
|
|
|
8
8
|
export declare namespace FernVenusApiClient {
|
|
9
9
|
interface Options {
|
|
10
10
|
environment: core.Supplier<string>;
|
|
11
|
+
/** Specify a custom URL to connect the client to. */
|
|
12
|
+
baseUrl?: core.Supplier<string>;
|
|
11
13
|
token?: core.Supplier<core.BearerToken | undefined>;
|
|
12
14
|
}
|
|
13
15
|
interface RequestOptions {
|
|
@@ -17,15 +19,17 @@ export declare namespace FernVenusApiClient {
|
|
|
17
19
|
maxRetries?: number;
|
|
18
20
|
/** A hook to abort the request. */
|
|
19
21
|
abortSignal?: AbortSignal;
|
|
22
|
+
/** Additional headers to include in the request. */
|
|
23
|
+
headers?: Record<string, string>;
|
|
20
24
|
}
|
|
21
25
|
}
|
|
22
26
|
export declare class FernVenusApiClient {
|
|
23
27
|
protected readonly _options: FernVenusApiClient.Options;
|
|
24
|
-
constructor(_options: FernVenusApiClient.Options);
|
|
25
28
|
protected _organization: Organization | undefined;
|
|
26
|
-
get organization(): Organization;
|
|
27
29
|
protected _registry: Registry | undefined;
|
|
28
|
-
get registry(): Registry;
|
|
29
30
|
protected _user: User | undefined;
|
|
31
|
+
constructor(_options: FernVenusApiClient.Options);
|
|
32
|
+
get organization(): Organization;
|
|
33
|
+
get registry(): Registry;
|
|
30
34
|
get user(): User;
|
|
31
35
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
import * as FernVenusApi from "../../../index";
|
|
5
|
-
export
|
|
5
|
+
export type OrganizationId = string & {
|
|
6
6
|
OrganizationId: void;
|
|
7
7
|
};
|
|
8
8
|
export declare function OrganizationId(value: string): FernVenusApi.OrganizationId;
|
|
@@ -3,8 +3,7 @@
|
|
|
3
3
|
* This file was auto-generated by Fern from our API Definition.
|
|
4
4
|
*/
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.OrganizationId =
|
|
6
|
+
exports.OrganizationId = OrganizationId;
|
|
7
7
|
function OrganizationId(value) {
|
|
8
8
|
return value;
|
|
9
9
|
}
|
|
10
|
-
exports.OrganizationId = OrganizationId;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
import * as FernVenusApi from "../../../index";
|
|
5
|
-
export
|
|
5
|
+
export type UserId = string & {
|
|
6
6
|
UserId: void;
|
|
7
7
|
};
|
|
8
8
|
export declare function UserId(value: string): FernVenusApi.UserId;
|
package/api/resources/index.js
CHANGED
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
26
36
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
27
37
|
};
|
|
@@ -6,6 +6,8 @@ import * as FernVenusApi from "../../../index";
|
|
|
6
6
|
export declare namespace Organization {
|
|
7
7
|
interface Options {
|
|
8
8
|
environment: core.Supplier<string>;
|
|
9
|
+
/** Specify a custom URL to connect the client to. */
|
|
10
|
+
baseUrl?: core.Supplier<string>;
|
|
9
11
|
token?: core.Supplier<core.BearerToken | undefined>;
|
|
10
12
|
}
|
|
11
13
|
interface RequestOptions {
|
|
@@ -15,6 +17,8 @@ export declare namespace Organization {
|
|
|
15
17
|
maxRetries?: number;
|
|
16
18
|
/** A hook to abort the request. */
|
|
17
19
|
abortSignal?: AbortSignal;
|
|
20
|
+
/** Additional headers to include in the request. */
|
|
21
|
+
headers?: Record<string, string>;
|
|
18
22
|
}
|
|
19
23
|
}
|
|
20
24
|
export declare class Organization {
|
|
@@ -27,11 +31,12 @@ export declare class Organization {
|
|
|
27
31
|
* @example
|
|
28
32
|
* await client.organization.create({
|
|
29
33
|
* organizationId: FernVenusApi.OrganizationId("string"),
|
|
34
|
+
* displayName: "string",
|
|
30
35
|
* artifactReadRequiresToken: true,
|
|
31
36
|
* enableGithubConnection: true
|
|
32
37
|
* })
|
|
33
38
|
*/
|
|
34
|
-
create(request: FernVenusApi.CreateOrganizationRequest, requestOptions?: Organization.RequestOptions): Promise<core.APIResponse<
|
|
39
|
+
create(request: FernVenusApi.CreateOrganizationRequest, requestOptions?: Organization.RequestOptions): Promise<core.APIResponse<FernVenusApi.CreateOrganizationResponse, FernVenusApi.organization.create.Error>>;
|
|
35
40
|
/**
|
|
36
41
|
* @param {FernVenusApi.OrganizationId} orgId
|
|
37
42
|
* @param {FernVenusApi.UpdateOrganizationRequest} request
|
|
@@ -39,6 +44,8 @@ export declare class Organization {
|
|
|
39
44
|
*
|
|
40
45
|
* @example
|
|
41
46
|
* await client.organization.update(FernVenusApi.OrganizationId("string"), {
|
|
47
|
+
* displayName: "string",
|
|
48
|
+
* logoUrl: "string",
|
|
42
49
|
* artifactReadRequiresToken: true,
|
|
43
50
|
* isWhitelabeled: true,
|
|
44
51
|
* previewEnabled: true,
|
|
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
18
18
|
}) : function(o, v) {
|
|
19
19
|
o["default"] = v;
|
|
20
20
|
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || function (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
};
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
28
38
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
29
39
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
30
40
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -54,24 +64,18 @@ class Organization {
|
|
|
54
64
|
* @example
|
|
55
65
|
* await client.organization.create({
|
|
56
66
|
* organizationId: FernVenusApi.OrganizationId("string"),
|
|
67
|
+
* displayName: "string",
|
|
57
68
|
* artifactReadRequiresToken: true,
|
|
58
69
|
* enableGithubConnection: true
|
|
59
70
|
* })
|
|
60
71
|
*/
|
|
61
72
|
create(request, requestOptions) {
|
|
62
|
-
var _a;
|
|
63
73
|
return __awaiter(this, void 0, void 0, function* () {
|
|
74
|
+
var _a, _b;
|
|
64
75
|
const _response = yield core.fetcher({
|
|
65
|
-
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "/organizations/create"),
|
|
76
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)), "/organizations/create"),
|
|
66
77
|
method: "POST",
|
|
67
|
-
headers: {
|
|
68
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
69
|
-
"X-Fern-Language": "JavaScript",
|
|
70
|
-
"X-Fern-SDK-Name": "@fern-api/venus-api-sdk",
|
|
71
|
-
"X-Fern-SDK-Version": "0.13.2-5-g36df8bc",
|
|
72
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
73
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
74
|
-
},
|
|
78
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@fern-api/venus-api-sdk", "X-Fern-SDK-Version": "0.13.4-10-g9e497fa", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
75
79
|
contentType: "application/json",
|
|
76
80
|
requestType: "json",
|
|
77
81
|
body: serializers.CreateOrganizationRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -82,11 +86,16 @@ class Organization {
|
|
|
82
86
|
if (_response.ok) {
|
|
83
87
|
return {
|
|
84
88
|
ok: true,
|
|
85
|
-
body:
|
|
89
|
+
body: serializers.CreateOrganizationResponse.parseOrThrow(_response.body, {
|
|
90
|
+
unrecognizedObjectKeys: "passthrough",
|
|
91
|
+
allowUnrecognizedUnionMembers: true,
|
|
92
|
+
allowUnrecognizedEnumValues: true,
|
|
93
|
+
breadcrumbsPrefix: ["response"],
|
|
94
|
+
}),
|
|
86
95
|
};
|
|
87
96
|
}
|
|
88
97
|
if (_response.error.reason === "status-code") {
|
|
89
|
-
switch ((
|
|
98
|
+
switch ((_b = _response.error.body) === null || _b === void 0 ? void 0 : _b.error) {
|
|
90
99
|
case "UnauthorizedError":
|
|
91
100
|
case "OrganizationAlreadyExistsError":
|
|
92
101
|
return {
|
|
@@ -113,6 +122,8 @@ class Organization {
|
|
|
113
122
|
*
|
|
114
123
|
* @example
|
|
115
124
|
* await client.organization.update(FernVenusApi.OrganizationId("string"), {
|
|
125
|
+
* displayName: "string",
|
|
126
|
+
* logoUrl: "string",
|
|
116
127
|
* artifactReadRequiresToken: true,
|
|
117
128
|
* isWhitelabeled: true,
|
|
118
129
|
* previewEnabled: true,
|
|
@@ -128,20 +139,13 @@ class Organization {
|
|
|
128
139
|
* workosOrganizationId: "string"
|
|
129
140
|
* })
|
|
130
141
|
*/
|
|
131
|
-
update(
|
|
132
|
-
|
|
133
|
-
|
|
142
|
+
update(orgId_1) {
|
|
143
|
+
return __awaiter(this, arguments, void 0, function* (orgId, request = {}, requestOptions) {
|
|
144
|
+
var _a, _b;
|
|
134
145
|
const _response = yield core.fetcher({
|
|
135
|
-
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `/organizations/${encodeURIComponent(serializers.OrganizationId.jsonOrThrow(orgId))}/update`),
|
|
146
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)), `/organizations/${encodeURIComponent(serializers.OrganizationId.jsonOrThrow(orgId))}/update`),
|
|
136
147
|
method: "POST",
|
|
137
|
-
headers: {
|
|
138
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
139
|
-
"X-Fern-Language": "JavaScript",
|
|
140
|
-
"X-Fern-SDK-Name": "@fern-api/venus-api-sdk",
|
|
141
|
-
"X-Fern-SDK-Version": "0.13.2-5-g36df8bc",
|
|
142
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
143
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
144
|
-
},
|
|
148
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@fern-api/venus-api-sdk", "X-Fern-SDK-Version": "0.13.4-10-g9e497fa", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
145
149
|
contentType: "application/json",
|
|
146
150
|
requestType: "json",
|
|
147
151
|
body: serializers.UpdateOrganizationRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -156,7 +160,7 @@ class Organization {
|
|
|
156
160
|
};
|
|
157
161
|
}
|
|
158
162
|
if (_response.error.reason === "status-code") {
|
|
159
|
-
switch ((
|
|
163
|
+
switch ((_b = _response.error.body) === null || _b === void 0 ? void 0 : _b.error) {
|
|
160
164
|
case "UnauthorizedError":
|
|
161
165
|
return {
|
|
162
166
|
ok: false,
|
|
@@ -185,25 +189,18 @@ class Organization {
|
|
|
185
189
|
* shouldIncludeFernUsers: true
|
|
186
190
|
* })
|
|
187
191
|
*/
|
|
188
|
-
get(
|
|
189
|
-
|
|
190
|
-
|
|
192
|
+
get(orgId_1) {
|
|
193
|
+
return __awaiter(this, arguments, void 0, function* (orgId, request = {}, requestOptions) {
|
|
194
|
+
var _a, _b;
|
|
191
195
|
const { shouldIncludeFernUsers } = request;
|
|
192
196
|
const _queryParams = {};
|
|
193
197
|
if (shouldIncludeFernUsers != null) {
|
|
194
198
|
_queryParams["shouldIncludeFernUsers"] = shouldIncludeFernUsers.toString();
|
|
195
199
|
}
|
|
196
200
|
const _response = yield core.fetcher({
|
|
197
|
-
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `/organizations/${encodeURIComponent(serializers.OrganizationId.jsonOrThrow(orgId))}`),
|
|
201
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)), `/organizations/${encodeURIComponent(serializers.OrganizationId.jsonOrThrow(orgId))}`),
|
|
198
202
|
method: "GET",
|
|
199
|
-
headers: {
|
|
200
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
201
|
-
"X-Fern-Language": "JavaScript",
|
|
202
|
-
"X-Fern-SDK-Name": "@fern-api/venus-api-sdk",
|
|
203
|
-
"X-Fern-SDK-Version": "0.13.2-5-g36df8bc",
|
|
204
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
205
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
206
|
-
},
|
|
203
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@fern-api/venus-api-sdk", "X-Fern-SDK-Version": "0.13.4-10-g9e497fa", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
207
204
|
contentType: "application/json",
|
|
208
205
|
queryParameters: _queryParams,
|
|
209
206
|
requestType: "json",
|
|
@@ -223,7 +220,7 @@ class Organization {
|
|
|
223
220
|
};
|
|
224
221
|
}
|
|
225
222
|
if (_response.error.reason === "status-code") {
|
|
226
|
-
switch ((
|
|
223
|
+
switch ((_b = _response.error.body) === null || _b === void 0 ? void 0 : _b.error) {
|
|
227
224
|
case "UnauthorizedError":
|
|
228
225
|
return {
|
|
229
226
|
ok: false,
|
|
@@ -251,17 +248,11 @@ class Organization {
|
|
|
251
248
|
*/
|
|
252
249
|
isMember(organizationId, requestOptions) {
|
|
253
250
|
return __awaiter(this, void 0, void 0, function* () {
|
|
251
|
+
var _a;
|
|
254
252
|
const _response = yield core.fetcher({
|
|
255
|
-
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), `/organizations/belongs-to-organization/${encodeURIComponent(serializers.OrganizationId.jsonOrThrow(organizationId))}`),
|
|
253
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)), `/organizations/belongs-to-organization/${encodeURIComponent(serializers.OrganizationId.jsonOrThrow(organizationId))}`),
|
|
256
254
|
method: "POST",
|
|
257
|
-
headers: {
|
|
258
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
259
|
-
"X-Fern-Language": "JavaScript",
|
|
260
|
-
"X-Fern-SDK-Name": "@fern-api/venus-api-sdk",
|
|
261
|
-
"X-Fern-SDK-Version": "0.13.2-5-g36df8bc",
|
|
262
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
263
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
264
|
-
},
|
|
255
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@fern-api/venus-api-sdk", "X-Fern-SDK-Version": "0.13.4-10-g9e497fa", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
265
256
|
contentType: "application/json",
|
|
266
257
|
requestType: "json",
|
|
267
258
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -296,25 +287,18 @@ class Organization {
|
|
|
296
287
|
* shouldIncludeFernUsers: true
|
|
297
288
|
* })
|
|
298
289
|
*/
|
|
299
|
-
getMyOrganizationFromScopedToken(
|
|
300
|
-
|
|
301
|
-
|
|
290
|
+
getMyOrganizationFromScopedToken() {
|
|
291
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
292
|
+
var _a, _b;
|
|
302
293
|
const { shouldIncludeFernUsers } = request;
|
|
303
294
|
const _queryParams = {};
|
|
304
295
|
if (shouldIncludeFernUsers != null) {
|
|
305
296
|
_queryParams["shouldIncludeFernUsers"] = shouldIncludeFernUsers.toString();
|
|
306
297
|
}
|
|
307
298
|
const _response = yield core.fetcher({
|
|
308
|
-
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "/organizations/myself"),
|
|
299
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)), "/organizations/myself"),
|
|
309
300
|
method: "POST",
|
|
310
|
-
headers: {
|
|
311
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
312
|
-
"X-Fern-Language": "JavaScript",
|
|
313
|
-
"X-Fern-SDK-Name": "@fern-api/venus-api-sdk",
|
|
314
|
-
"X-Fern-SDK-Version": "0.13.2-5-g36df8bc",
|
|
315
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
316
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
317
|
-
},
|
|
301
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@fern-api/venus-api-sdk", "X-Fern-SDK-Version": "0.13.4-10-g9e497fa", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
318
302
|
contentType: "application/json",
|
|
319
303
|
queryParameters: _queryParams,
|
|
320
304
|
requestType: "json",
|
|
@@ -334,7 +318,7 @@ class Organization {
|
|
|
334
318
|
};
|
|
335
319
|
}
|
|
336
320
|
if (_response.error.reason === "status-code") {
|
|
337
|
-
switch ((
|
|
321
|
+
switch ((_b = _response.error.body) === null || _b === void 0 ? void 0 : _b.error) {
|
|
338
322
|
case "UnauthorizedError":
|
|
339
323
|
return {
|
|
340
324
|
ok: false,
|
|
@@ -361,17 +345,11 @@ class Organization {
|
|
|
361
345
|
*/
|
|
362
346
|
getOrgIdsFromToken(requestOptions) {
|
|
363
347
|
return __awaiter(this, void 0, void 0, function* () {
|
|
348
|
+
var _a;
|
|
364
349
|
const _response = yield core.fetcher({
|
|
365
|
-
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "/organizations"),
|
|
350
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)), "/organizations"),
|
|
366
351
|
method: "POST",
|
|
367
|
-
headers: {
|
|
368
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
369
|
-
"X-Fern-Language": "JavaScript",
|
|
370
|
-
"X-Fern-SDK-Name": "@fern-api/venus-api-sdk",
|
|
371
|
-
"X-Fern-SDK-Version": "0.13.2-5-g36df8bc",
|
|
372
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
373
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
374
|
-
},
|
|
352
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@fern-api/venus-api-sdk", "X-Fern-SDK-Version": "0.13.4-10-g9e497fa", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
375
353
|
contentType: "application/json",
|
|
376
354
|
requestType: "json",
|
|
377
355
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -406,19 +384,12 @@ class Organization {
|
|
|
406
384
|
* })
|
|
407
385
|
*/
|
|
408
386
|
addUser(request, requestOptions) {
|
|
409
|
-
var _a;
|
|
410
387
|
return __awaiter(this, void 0, void 0, function* () {
|
|
388
|
+
var _a, _b;
|
|
411
389
|
const _response = yield core.fetcher({
|
|
412
|
-
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "/organizations/add-user"),
|
|
390
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)), "/organizations/add-user"),
|
|
413
391
|
method: "POST",
|
|
414
|
-
headers: {
|
|
415
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
416
|
-
"X-Fern-Language": "JavaScript",
|
|
417
|
-
"X-Fern-SDK-Name": "@fern-api/venus-api-sdk",
|
|
418
|
-
"X-Fern-SDK-Version": "0.13.2-5-g36df8bc",
|
|
419
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
420
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
421
|
-
},
|
|
392
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@fern-api/venus-api-sdk", "X-Fern-SDK-Version": "0.13.4-10-g9e497fa", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
422
393
|
contentType: "application/json",
|
|
423
394
|
requestType: "json",
|
|
424
395
|
body: serializers.AddUserToOrgRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -433,7 +404,7 @@ class Organization {
|
|
|
433
404
|
};
|
|
434
405
|
}
|
|
435
406
|
if (_response.error.reason === "status-code") {
|
|
436
|
-
switch ((
|
|
407
|
+
switch ((_b = _response.error.body) === null || _b === void 0 ? void 0 : _b.error) {
|
|
437
408
|
case "UnauthorizedError":
|
|
438
409
|
case "UserIdDoesNotExistError":
|
|
439
410
|
return {
|
|
@@ -464,19 +435,12 @@ class Organization {
|
|
|
464
435
|
* })
|
|
465
436
|
*/
|
|
466
437
|
inviteUser(request, requestOptions) {
|
|
467
|
-
var _a;
|
|
468
438
|
return __awaiter(this, void 0, void 0, function* () {
|
|
439
|
+
var _a, _b;
|
|
469
440
|
const _response = yield core.fetcher({
|
|
470
|
-
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "/organizations/invite"),
|
|
441
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)), "/organizations/invite"),
|
|
471
442
|
method: "POST",
|
|
472
|
-
headers: {
|
|
473
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
474
|
-
"X-Fern-Language": "JavaScript",
|
|
475
|
-
"X-Fern-SDK-Name": "@fern-api/venus-api-sdk",
|
|
476
|
-
"X-Fern-SDK-Version": "0.13.2-5-g36df8bc",
|
|
477
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
478
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
479
|
-
},
|
|
443
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@fern-api/venus-api-sdk", "X-Fern-SDK-Version": "0.13.4-10-g9e497fa", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
480
444
|
contentType: "application/json",
|
|
481
445
|
requestType: "json",
|
|
482
446
|
body: serializers.InviteUserToOrgRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -491,7 +455,7 @@ class Organization {
|
|
|
491
455
|
};
|
|
492
456
|
}
|
|
493
457
|
if (_response.error.reason === "status-code") {
|
|
494
|
-
switch ((
|
|
458
|
+
switch ((_b = _response.error.body) === null || _b === void 0 ? void 0 : _b.error) {
|
|
495
459
|
case "UnauthorizedError":
|
|
496
460
|
case "UserIdDoesNotExistError":
|
|
497
461
|
return {
|
|
@@ -522,19 +486,12 @@ class Organization {
|
|
|
522
486
|
* })
|
|
523
487
|
*/
|
|
524
488
|
removeUser(request, requestOptions) {
|
|
525
|
-
var _a;
|
|
526
489
|
return __awaiter(this, void 0, void 0, function* () {
|
|
490
|
+
var _a, _b;
|
|
527
491
|
const _response = yield core.fetcher({
|
|
528
|
-
url: (0, url_join_1.default)(yield core.Supplier.get(this._options.environment), "/organizations/user"),
|
|
492
|
+
url: (0, url_join_1.default)((_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment)), "/organizations/user"),
|
|
529
493
|
method: "DELETE",
|
|
530
|
-
headers: {
|
|
531
|
-
Authorization: yield this._getAuthorizationHeader(),
|
|
532
|
-
"X-Fern-Language": "JavaScript",
|
|
533
|
-
"X-Fern-SDK-Name": "@fern-api/venus-api-sdk",
|
|
534
|
-
"X-Fern-SDK-Version": "0.13.2-5-g36df8bc",
|
|
535
|
-
"X-Fern-Runtime": core.RUNTIME.type,
|
|
536
|
-
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
537
|
-
},
|
|
494
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@fern-api/venus-api-sdk", "X-Fern-SDK-Version": "0.13.4-10-g9e497fa", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
538
495
|
contentType: "application/json",
|
|
539
496
|
requestType: "json",
|
|
540
497
|
body: serializers.RemoveUserFromOrgRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -549,7 +506,7 @@ class Organization {
|
|
|
549
506
|
};
|
|
550
507
|
}
|
|
551
508
|
if (_response.error.reason === "status-code") {
|
|
552
|
-
switch ((
|
|
509
|
+
switch ((_b = _response.error.body) === null || _b === void 0 ? void 0 : _b.error) {
|
|
553
510
|
case "UnauthorizedError":
|
|
554
511
|
case "UserIdDoesNotExistError":
|
|
555
512
|
return {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as FernVenusApi from "../../../index";
|
|
5
5
|
import * as core from "../../../../core";
|
|
6
|
-
export
|
|
6
|
+
export type Error = FernVenusApi.organization.addUser.Error.UnauthorizedError | FernVenusApi.organization.addUser.Error.UserIdDoesNotExistError | FernVenusApi.organization.addUser.Error._Unknown;
|
|
7
7
|
export declare namespace Error {
|
|
8
8
|
interface UnauthorizedError extends _Utils {
|
|
9
9
|
error: "UnauthorizedError";
|
|
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
18
18
|
}) : function(o, v) {
|
|
19
19
|
o["default"] = v;
|
|
20
20
|
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || function (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
};
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
28
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
39
|
exports.Error = void 0;
|
|
30
40
|
const FernVenusApi = __importStar(require("../../../index"));
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as FernVenusApi from "../../../index";
|
|
5
5
|
import * as core from "../../../../core";
|
|
6
|
-
export
|
|
6
|
+
export type Error = FernVenusApi.organization.create.Error.UnauthorizedError | FernVenusApi.organization.create.Error.OrganizationAlreadyExistsError | FernVenusApi.organization.create.Error._Unknown;
|
|
7
7
|
export declare namespace Error {
|
|
8
8
|
interface UnauthorizedError extends _Utils {
|
|
9
9
|
error: "UnauthorizedError";
|
|
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
18
18
|
}) : function(o, v) {
|
|
19
19
|
o["default"] = v;
|
|
20
20
|
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || function (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
};
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
28
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
39
|
exports.Error = void 0;
|
|
30
40
|
const FernVenusApi = __importStar(require("../../../index"));
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as FernVenusApi from "../../../index";
|
|
5
5
|
import * as core from "../../../../core";
|
|
6
|
-
export
|
|
6
|
+
export type Error = FernVenusApi.organization.get.Error.UnauthorizedError | FernVenusApi.organization.get.Error._Unknown;
|
|
7
7
|
export declare namespace Error {
|
|
8
8
|
interface UnauthorizedError extends _Utils {
|
|
9
9
|
error: "UnauthorizedError";
|
|
@@ -18,13 +18,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
18
18
|
}) : function(o, v) {
|
|
19
19
|
o["default"] = v;
|
|
20
20
|
});
|
|
21
|
-
var __importStar = (this && this.__importStar) || function (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
};
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
28
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
39
|
exports.Error = void 0;
|
|
30
40
|
const FernVenusApi = __importStar(require("../../../index"));
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as FernVenusApi from "../../../index";
|
|
5
5
|
import * as core from "../../../../core";
|
|
6
|
-
export
|
|
6
|
+
export type Error = FernVenusApi.organization.getMyOrganizationFromScopedToken.Error.UnauthorizedError | FernVenusApi.organization.getMyOrganizationFromScopedToken.Error._Unknown;
|
|
7
7
|
export declare namespace Error {
|
|
8
8
|
interface UnauthorizedError extends _Utils {
|
|
9
9
|
error: "UnauthorizedError";
|