mirror of
https://github.com/bitwarden/browser
synced 2025-12-11 05:43:41 +00:00
[PS-1093] Move Organization Api Calls (#3243)
* Move organization api calls into seperate service * Remove unneeded unknown * Address PR feedback
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import { OrganizationApiKeyType } from "../enums/organizationApiKeyType";
|
||||
import { OrganizationConnectionType } from "../enums/organizationConnectionType";
|
||||
import { SetKeyConnectorKeyRequest } from "../models/request/account/setKeyConnectorKeyRequest";
|
||||
import { AttachmentRequest } from "../models/request/attachmentRequest";
|
||||
@@ -28,23 +27,14 @@ import { ApiTokenRequest } from "../models/request/identityToken/apiTokenRequest
|
||||
import { PasswordTokenRequest } from "../models/request/identityToken/passwordTokenRequest";
|
||||
import { SsoTokenRequest } from "../models/request/identityToken/ssoTokenRequest";
|
||||
import { ImportCiphersRequest } from "../models/request/importCiphersRequest";
|
||||
import { ImportDirectoryRequest } from "../models/request/importDirectoryRequest";
|
||||
import { ImportOrganizationCiphersRequest } from "../models/request/importOrganizationCiphersRequest";
|
||||
import { KdfRequest } from "../models/request/kdfRequest";
|
||||
import { KeyConnectorUserKeyRequest } from "../models/request/keyConnectorUserKeyRequest";
|
||||
import { KeysRequest } from "../models/request/keysRequest";
|
||||
import { OrganizationSponsorshipCreateRequest } from "../models/request/organization/organizationSponsorshipCreateRequest";
|
||||
import { OrganizationSponsorshipRedeemRequest } from "../models/request/organization/organizationSponsorshipRedeemRequest";
|
||||
import { OrganizationSsoRequest } from "../models/request/organization/organizationSsoRequest";
|
||||
import { OrganizationApiKeyRequest } from "../models/request/organizationApiKeyRequest";
|
||||
import { OrganizationConnectionRequest } from "../models/request/organizationConnectionRequest";
|
||||
import { OrganizationCreateRequest } from "../models/request/organizationCreateRequest";
|
||||
import { OrganizationImportRequest } from "../models/request/organizationImportRequest";
|
||||
import { OrganizationKeysRequest } from "../models/request/organizationKeysRequest";
|
||||
import { OrganizationSubscriptionUpdateRequest } from "../models/request/organizationSubscriptionUpdateRequest";
|
||||
import { OrganizationTaxInfoUpdateRequest } from "../models/request/organizationTaxInfoUpdateRequest";
|
||||
import { OrganizationUpdateRequest } from "../models/request/organizationUpdateRequest";
|
||||
import { OrganizationUpgradeRequest } from "../models/request/organizationUpgradeRequest";
|
||||
import { OrganizationUserAcceptRequest } from "../models/request/organizationUserAcceptRequest";
|
||||
import { OrganizationUserBulkConfirmRequest } from "../models/request/organizationUserBulkConfirmRequest";
|
||||
import { OrganizationUserBulkRequest } from "../models/request/organizationUserBulkRequest";
|
||||
@@ -69,7 +59,6 @@ import { ProviderUserConfirmRequest } from "../models/request/provider/providerU
|
||||
import { ProviderUserInviteRequest } from "../models/request/provider/providerUserInviteRequest";
|
||||
import { ProviderUserUpdateRequest } from "../models/request/provider/providerUserUpdateRequest";
|
||||
import { RegisterRequest } from "../models/request/registerRequest";
|
||||
import { SeatRequest } from "../models/request/seatRequest";
|
||||
import { SecretVerificationRequest } from "../models/request/secretVerificationRequest";
|
||||
import { SelectionReadOnlyRequest } from "../models/request/selectionReadOnlyRequest";
|
||||
import { SendAccessRequest } from "../models/request/sendAccessRequest";
|
||||
@@ -90,7 +79,6 @@ import { UpdateTwoFactorEmailRequest } from "../models/request/updateTwoFactorEm
|
||||
import { UpdateTwoFactorWebAuthnDeleteRequest } from "../models/request/updateTwoFactorWebAuthnDeleteRequest";
|
||||
import { UpdateTwoFactorWebAuthnRequest } from "../models/request/updateTwoFactorWebAuthnRequest";
|
||||
import { UpdateTwoFactorYubioOtpRequest } from "../models/request/updateTwoFactorYubioOtpRequest";
|
||||
import { VerifyBankRequest } from "../models/request/verifyBankRequest";
|
||||
import { VerifyDeleteRecoverRequest } from "../models/request/verifyDeleteRecoverRequest";
|
||||
import { VerifyEmailRequest } from "../models/request/verifyEmailRequest";
|
||||
import { ApiKeyResponse } from "../models/response/apiKeyResponse";
|
||||
@@ -98,7 +86,6 @@ import { AttachmentResponse } from "../models/response/attachmentResponse";
|
||||
import { AttachmentUploadDataResponse } from "../models/response/attachmentUploadDataResponse";
|
||||
import { BillingHistoryResponse } from "../models/response/billingHistoryResponse";
|
||||
import { BillingPaymentResponse } from "../models/response/billingPaymentResponse";
|
||||
import { BillingResponse } from "../models/response/billingResponse";
|
||||
import { BreachAccountResponse } from "../models/response/breachAccountResponse";
|
||||
import { CipherResponse } from "../models/response/cipherResponse";
|
||||
import {
|
||||
@@ -120,18 +107,12 @@ import { IdentityTokenResponse } from "../models/response/identityTokenResponse"
|
||||
import { IdentityTwoFactorResponse } from "../models/response/identityTwoFactorResponse";
|
||||
import { KeyConnectorUserKeyResponse } from "../models/response/keyConnectorUserKeyResponse";
|
||||
import { ListResponse } from "../models/response/listResponse";
|
||||
import { OrganizationSsoResponse } from "../models/response/organization/organizationSsoResponse";
|
||||
import { OrganizationApiKeyInformationResponse } from "../models/response/organizationApiKeyInformationResponse";
|
||||
import { OrganizationAutoEnrollStatusResponse } from "../models/response/organizationAutoEnrollStatusResponse";
|
||||
import {
|
||||
OrganizationConnectionConfigApis,
|
||||
OrganizationConnectionResponse,
|
||||
} from "../models/response/organizationConnectionResponse";
|
||||
import { OrganizationExportResponse } from "../models/response/organizationExportResponse";
|
||||
import { OrganizationKeysResponse } from "../models/response/organizationKeysResponse";
|
||||
import { OrganizationResponse } from "../models/response/organizationResponse";
|
||||
import { OrganizationSponsorshipSyncStatusResponse } from "../models/response/organizationSponsorshipSyncStatusResponse";
|
||||
import { OrganizationSubscriptionResponse } from "../models/response/organizationSubscriptionResponse";
|
||||
import { OrganizationUserBulkPublicKeyResponse } from "../models/response/organizationUserBulkPublicKeyResponse";
|
||||
import { OrganizationUserBulkResponse } from "../models/response/organizationUserBulkResponse";
|
||||
import {
|
||||
@@ -214,7 +195,7 @@ export abstract class ApiService {
|
||||
postReinstatePremium: () => Promise<any>;
|
||||
postCancelPremium: () => Promise<any>;
|
||||
postAccountStorage: (request: StorageRequest) => Promise<PaymentResponse>;
|
||||
postAccountPayment: (request: PaymentRequest) => Promise<any>;
|
||||
postAccountPayment: (request: PaymentRequest) => Promise<void>;
|
||||
postAccountLicense: (data: FormData) => Promise<any>;
|
||||
postAccountKey: (request: UpdateKeyRequest) => Promise<any>;
|
||||
postAccountKeys: (request: KeysRequest) => Promise<any>;
|
||||
@@ -415,7 +396,7 @@ export abstract class ApiService {
|
||||
organizationId: string,
|
||||
userId: string,
|
||||
request: OrganizationUserResetPasswordEnrollmentRequest
|
||||
) => Promise<any>;
|
||||
) => Promise<void>;
|
||||
putOrganizationUserResetPassword: (
|
||||
organizationId: string,
|
||||
id: string,
|
||||
@@ -438,7 +419,6 @@ export abstract class ApiService {
|
||||
) => Promise<ListResponse<OrganizationUserBulkResponse>>;
|
||||
|
||||
getSync: () => Promise<SyncResponse>;
|
||||
postImportDirectory: (organizationId: string, request: ImportDirectoryRequest) => Promise<any>;
|
||||
postPublicImportDirectory: (request: OrganizationImportRequest) => Promise<any>;
|
||||
|
||||
getSettingsDomains: () => Promise<DomainsResponse>;
|
||||
@@ -511,10 +491,6 @@ export abstract class ApiService {
|
||||
request: EmergencyAccessPasswordRequest
|
||||
) => Promise<any>;
|
||||
postEmergencyAccessView: (id: string) => Promise<EmergencyAccessViewResponse>;
|
||||
|
||||
getOrganization: (id: string) => Promise<OrganizationResponse>;
|
||||
getOrganizationBilling: (id: string) => Promise<BillingResponse>;
|
||||
getOrganizationSubscription: (id: string) => Promise<OrganizationSubscriptionResponse>;
|
||||
getCloudCommunicationsEnabled: () => Promise<boolean>;
|
||||
abstract getOrganizationConnection<TConfig extends OrganizationConnectionConfigApis>(
|
||||
id: string,
|
||||
@@ -531,59 +507,8 @@ export abstract class ApiService {
|
||||
organizationConnectionId: string
|
||||
): Promise<OrganizationConnectionResponse<TConfig>>;
|
||||
deleteOrganizationConnection: (id: string) => Promise<void>;
|
||||
getOrganizationLicense: (id: string, installationId: string) => Promise<any>;
|
||||
getOrganizationTaxInfo: (id: string) => Promise<TaxInfoResponse>;
|
||||
getOrganizationAutoEnrollStatus: (
|
||||
identifier: string
|
||||
) => Promise<OrganizationAutoEnrollStatusResponse>;
|
||||
getOrganizationSso: (id: string) => Promise<OrganizationSsoResponse>;
|
||||
postOrganization: (request: OrganizationCreateRequest) => Promise<OrganizationResponse>;
|
||||
putOrganization: (
|
||||
id: string,
|
||||
request: OrganizationUpdateRequest
|
||||
) => Promise<OrganizationResponse>;
|
||||
putOrganizationTaxInfo: (id: string, request: OrganizationTaxInfoUpdateRequest) => Promise<any>;
|
||||
postLeaveOrganization: (id: string) => Promise<any>;
|
||||
postOrganizationLicense: (data: FormData) => Promise<OrganizationResponse>;
|
||||
postOrganizationLicenseUpdate: (id: string, data: FormData) => Promise<any>;
|
||||
postOrganizationApiKey: (
|
||||
id: string,
|
||||
request: OrganizationApiKeyRequest
|
||||
) => Promise<ApiKeyResponse>;
|
||||
getOrganizationApiKeyInformation: (
|
||||
id: string,
|
||||
type?: OrganizationApiKeyType
|
||||
) => Promise<ListResponse<OrganizationApiKeyInformationResponse>>;
|
||||
postOrganizationRotateApiKey: (
|
||||
id: string,
|
||||
request: OrganizationApiKeyRequest
|
||||
) => Promise<ApiKeyResponse>;
|
||||
postOrganizationSso: (
|
||||
id: string,
|
||||
request: OrganizationSsoRequest
|
||||
) => Promise<OrganizationSsoResponse>;
|
||||
postOrganizationUpgrade: (
|
||||
id: string,
|
||||
request: OrganizationUpgradeRequest
|
||||
) => Promise<PaymentResponse>;
|
||||
postOrganizationUpdateSubscription: (
|
||||
id: string,
|
||||
request: OrganizationSubscriptionUpdateRequest
|
||||
) => Promise<void>;
|
||||
postOrganizationSeat: (id: string, request: SeatRequest) => Promise<PaymentResponse>;
|
||||
postOrganizationStorage: (id: string, request: StorageRequest) => Promise<any>;
|
||||
postOrganizationPayment: (id: string, request: PaymentRequest) => Promise<any>;
|
||||
postOrganizationVerifyBank: (id: string, request: VerifyBankRequest) => Promise<any>;
|
||||
postOrganizationCancel: (id: string) => Promise<any>;
|
||||
postOrganizationReinstate: (id: string) => Promise<any>;
|
||||
deleteOrganization: (id: string, request: SecretVerificationRequest) => Promise<any>;
|
||||
getPlans: () => Promise<ListResponse<PlanResponse>>;
|
||||
getTaxRates: () => Promise<ListResponse<TaxRateResponse>>;
|
||||
getOrganizationKeys: (id: string) => Promise<OrganizationKeysResponse>;
|
||||
postOrganizationKeys: (
|
||||
id: string,
|
||||
request: OrganizationKeysRequest
|
||||
) => Promise<OrganizationKeysResponse>;
|
||||
|
||||
postProviderSetup: (id: string, request: ProviderSetupRequest) => Promise<ProviderResponse>;
|
||||
getProvider: (id: string) => Promise<ProviderResponse>;
|
||||
@@ -673,7 +598,7 @@ export abstract class ApiService {
|
||||
) => Promise<ListResponse<EventResponse>>;
|
||||
postEventsCollect: (request: EventRequest[]) => Promise<any>;
|
||||
|
||||
deleteSsoUser: (organizationId: string) => Promise<any>;
|
||||
deleteSsoUser: (organizationId: string) => Promise<void>;
|
||||
getSsoUserIdentifier: () => Promise<string>;
|
||||
|
||||
getUserPublicKey: (id: string) => Promise<UserKeyResponse>;
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
export interface MessageBase {
|
||||
command: string;
|
||||
}
|
||||
|
||||
export abstract class BroadcasterService {
|
||||
send: (message: any, id?: string) => void;
|
||||
subscribe: (id: string, messageCallback: (message: any) => any) => void;
|
||||
send: (message: MessageBase, id?: string) => void;
|
||||
subscribe: (id: string, messageCallback: (message: MessageBase) => void) => void;
|
||||
unsubscribe: (id: string) => void;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
import { OrganizationApiKeyType } from "../../enums/organizationApiKeyType";
|
||||
import { ImportDirectoryRequest } from "../../models/request/importDirectoryRequest";
|
||||
import { OrganizationSsoRequest } from "../../models/request/organization/organizationSsoRequest";
|
||||
import { OrganizationApiKeyRequest } from "../../models/request/organizationApiKeyRequest";
|
||||
import { OrganizationCreateRequest } from "../../models/request/organizationCreateRequest";
|
||||
import { OrganizationKeysRequest } from "../../models/request/organizationKeysRequest";
|
||||
import { OrganizationSubscriptionUpdateRequest } from "../../models/request/organizationSubscriptionUpdateRequest";
|
||||
import { OrganizationTaxInfoUpdateRequest } from "../../models/request/organizationTaxInfoUpdateRequest";
|
||||
import { OrganizationUpdateRequest } from "../../models/request/organizationUpdateRequest";
|
||||
import { OrganizationUpgradeRequest } from "../../models/request/organizationUpgradeRequest";
|
||||
import { PaymentRequest } from "../../models/request/paymentRequest";
|
||||
import { SeatRequest } from "../../models/request/seatRequest";
|
||||
import { SecretVerificationRequest } from "../../models/request/secretVerificationRequest";
|
||||
import { StorageRequest } from "../../models/request/storageRequest";
|
||||
import { VerifyBankRequest } from "../../models/request/verifyBankRequest";
|
||||
import { ApiKeyResponse } from "../../models/response/apiKeyResponse";
|
||||
import { BillingResponse } from "../../models/response/billingResponse";
|
||||
import { ListResponse } from "../../models/response/listResponse";
|
||||
import { OrganizationSsoResponse } from "../../models/response/organization/organizationSsoResponse";
|
||||
import { OrganizationApiKeyInformationResponse } from "../../models/response/organizationApiKeyInformationResponse";
|
||||
import { OrganizationAutoEnrollStatusResponse } from "../../models/response/organizationAutoEnrollStatusResponse";
|
||||
import { OrganizationKeysResponse } from "../../models/response/organizationKeysResponse";
|
||||
import { OrganizationResponse } from "../../models/response/organizationResponse";
|
||||
import { OrganizationSubscriptionResponse } from "../../models/response/organizationSubscriptionResponse";
|
||||
import { PaymentResponse } from "../../models/response/paymentResponse";
|
||||
import { TaxInfoResponse } from "../../models/response/taxInfoResponse";
|
||||
|
||||
export class OrganizationApiServiceAbstraction {
|
||||
get: (id: string) => Promise<OrganizationResponse>;
|
||||
getBilling: (id: string) => Promise<BillingResponse>;
|
||||
getSubscription: (id: string) => Promise<OrganizationSubscriptionResponse>;
|
||||
getLicense: (id: string, installationId: string) => Promise<unknown>;
|
||||
getAutoEnrollStatus: (identifier: string) => Promise<OrganizationAutoEnrollStatusResponse>;
|
||||
create: (request: OrganizationCreateRequest) => Promise<OrganizationResponse>;
|
||||
createLicense: (data: FormData) => Promise<OrganizationResponse>;
|
||||
save: (id: string, request: OrganizationUpdateRequest) => Promise<OrganizationResponse>;
|
||||
updatePayment: (id: string, request: PaymentRequest) => Promise<void>;
|
||||
upgrade: (id: string, request: OrganizationUpgradeRequest) => Promise<PaymentResponse>;
|
||||
updateSubscription: (id: string, request: OrganizationSubscriptionUpdateRequest) => Promise<void>;
|
||||
updateSeats: (id: string, request: SeatRequest) => Promise<PaymentResponse>;
|
||||
updateStorage: (id: string, request: StorageRequest) => Promise<PaymentResponse>;
|
||||
verifyBank: (id: string, request: VerifyBankRequest) => Promise<void>;
|
||||
cancel: (id: string) => Promise<void>;
|
||||
reinstate: (id: string) => Promise<void>;
|
||||
leave: (id: string) => Promise<void>;
|
||||
delete: (id: string, request: SecretVerificationRequest) => Promise<void>;
|
||||
updateLicense: (id: string, data: FormData) => Promise<void>;
|
||||
importDirectory: (organizationId: string, request: ImportDirectoryRequest) => Promise<void>;
|
||||
getOrCreateApiKey: (id: string, request: OrganizationApiKeyRequest) => Promise<ApiKeyResponse>;
|
||||
getApiKeyInformation: (
|
||||
id: string,
|
||||
organizationApiKeyType?: OrganizationApiKeyType
|
||||
) => Promise<ListResponse<OrganizationApiKeyInformationResponse>>;
|
||||
rotateApiKey: (id: string, request: OrganizationApiKeyRequest) => Promise<ApiKeyResponse>;
|
||||
getTaxInfo: (id: string) => Promise<TaxInfoResponse>;
|
||||
updateTaxInfo: (id: string, request: OrganizationTaxInfoUpdateRequest) => Promise<void>;
|
||||
getKeys: (id: string) => Promise<OrganizationKeysResponse>;
|
||||
updateKeys: (id: string, request: OrganizationKeysRequest) => Promise<OrganizationKeysResponse>;
|
||||
getSso: (id: string) => Promise<OrganizationSsoResponse>;
|
||||
updateSso: (id: string, request: OrganizationSsoRequest) => Promise<OrganizationSsoResponse>;
|
||||
}
|
||||
@@ -4,7 +4,6 @@ import { EnvironmentService } from "../abstractions/environment.service";
|
||||
import { PlatformUtilsService } from "../abstractions/platformUtils.service";
|
||||
import { TokenService } from "../abstractions/token.service";
|
||||
import { DeviceType } from "../enums/deviceType";
|
||||
import { OrganizationApiKeyType } from "../enums/organizationApiKeyType";
|
||||
import { OrganizationConnectionType } from "../enums/organizationConnectionType";
|
||||
import { Utils } from "../misc/utils";
|
||||
import { SetKeyConnectorKeyRequest } from "../models/request/account/setKeyConnectorKeyRequest";
|
||||
@@ -36,23 +35,14 @@ import { PasswordTokenRequest } from "../models/request/identityToken/passwordTo
|
||||
import { SsoTokenRequest } from "../models/request/identityToken/ssoTokenRequest";
|
||||
import { TokenRequestTwoFactor } from "../models/request/identityToken/tokenRequestTwoFactor";
|
||||
import { ImportCiphersRequest } from "../models/request/importCiphersRequest";
|
||||
import { ImportDirectoryRequest } from "../models/request/importDirectoryRequest";
|
||||
import { ImportOrganizationCiphersRequest } from "../models/request/importOrganizationCiphersRequest";
|
||||
import { KdfRequest } from "../models/request/kdfRequest";
|
||||
import { KeyConnectorUserKeyRequest } from "../models/request/keyConnectorUserKeyRequest";
|
||||
import { KeysRequest } from "../models/request/keysRequest";
|
||||
import { OrganizationSponsorshipCreateRequest } from "../models/request/organization/organizationSponsorshipCreateRequest";
|
||||
import { OrganizationSponsorshipRedeemRequest } from "../models/request/organization/organizationSponsorshipRedeemRequest";
|
||||
import { OrganizationSsoRequest } from "../models/request/organization/organizationSsoRequest";
|
||||
import { OrganizationApiKeyRequest } from "../models/request/organizationApiKeyRequest";
|
||||
import { OrganizationConnectionRequest } from "../models/request/organizationConnectionRequest";
|
||||
import { OrganizationCreateRequest } from "../models/request/organizationCreateRequest";
|
||||
import { OrganizationImportRequest } from "../models/request/organizationImportRequest";
|
||||
import { OrganizationKeysRequest } from "../models/request/organizationKeysRequest";
|
||||
import { OrganizationSubscriptionUpdateRequest } from "../models/request/organizationSubscriptionUpdateRequest";
|
||||
import { OrganizationTaxInfoUpdateRequest } from "../models/request/organizationTaxInfoUpdateRequest";
|
||||
import { OrganizationUpdateRequest } from "../models/request/organizationUpdateRequest";
|
||||
import { OrganizationUpgradeRequest } from "../models/request/organizationUpgradeRequest";
|
||||
import { OrganizationUserAcceptRequest } from "../models/request/organizationUserAcceptRequest";
|
||||
import { OrganizationUserBulkConfirmRequest } from "../models/request/organizationUserBulkConfirmRequest";
|
||||
import { OrganizationUserBulkRequest } from "../models/request/organizationUserBulkRequest";
|
||||
@@ -77,7 +67,6 @@ import { ProviderUserConfirmRequest } from "../models/request/provider/providerU
|
||||
import { ProviderUserInviteRequest } from "../models/request/provider/providerUserInviteRequest";
|
||||
import { ProviderUserUpdateRequest } from "../models/request/provider/providerUserUpdateRequest";
|
||||
import { RegisterRequest } from "../models/request/registerRequest";
|
||||
import { SeatRequest } from "../models/request/seatRequest";
|
||||
import { SecretVerificationRequest } from "../models/request/secretVerificationRequest";
|
||||
import { SelectionReadOnlyRequest } from "../models/request/selectionReadOnlyRequest";
|
||||
import { SendAccessRequest } from "../models/request/sendAccessRequest";
|
||||
@@ -98,7 +87,6 @@ import { UpdateTwoFactorEmailRequest } from "../models/request/updateTwoFactorEm
|
||||
import { UpdateTwoFactorWebAuthnDeleteRequest } from "../models/request/updateTwoFactorWebAuthnDeleteRequest";
|
||||
import { UpdateTwoFactorWebAuthnRequest } from "../models/request/updateTwoFactorWebAuthnRequest";
|
||||
import { UpdateTwoFactorYubioOtpRequest } from "../models/request/updateTwoFactorYubioOtpRequest";
|
||||
import { VerifyBankRequest } from "../models/request/verifyBankRequest";
|
||||
import { VerifyDeleteRecoverRequest } from "../models/request/verifyDeleteRecoverRequest";
|
||||
import { VerifyEmailRequest } from "../models/request/verifyEmailRequest";
|
||||
import { ApiKeyResponse } from "../models/response/apiKeyResponse";
|
||||
@@ -106,7 +94,6 @@ import { AttachmentResponse } from "../models/response/attachmentResponse";
|
||||
import { AttachmentUploadDataResponse } from "../models/response/attachmentUploadDataResponse";
|
||||
import { BillingHistoryResponse } from "../models/response/billingHistoryResponse";
|
||||
import { BillingPaymentResponse } from "../models/response/billingPaymentResponse";
|
||||
import { BillingResponse } from "../models/response/billingResponse";
|
||||
import { BreachAccountResponse } from "../models/response/breachAccountResponse";
|
||||
import { CipherResponse } from "../models/response/cipherResponse";
|
||||
import {
|
||||
@@ -129,18 +116,12 @@ import { IdentityTokenResponse } from "../models/response/identityTokenResponse"
|
||||
import { IdentityTwoFactorResponse } from "../models/response/identityTwoFactorResponse";
|
||||
import { KeyConnectorUserKeyResponse } from "../models/response/keyConnectorUserKeyResponse";
|
||||
import { ListResponse } from "../models/response/listResponse";
|
||||
import { OrganizationSsoResponse } from "../models/response/organization/organizationSsoResponse";
|
||||
import { OrganizationApiKeyInformationResponse } from "../models/response/organizationApiKeyInformationResponse";
|
||||
import { OrganizationAutoEnrollStatusResponse } from "../models/response/organizationAutoEnrollStatusResponse";
|
||||
import {
|
||||
OrganizationConnectionConfigApis,
|
||||
OrganizationConnectionResponse,
|
||||
} from "../models/response/organizationConnectionResponse";
|
||||
import { OrganizationExportResponse } from "../models/response/organizationExportResponse";
|
||||
import { OrganizationKeysResponse } from "../models/response/organizationKeysResponse";
|
||||
import { OrganizationResponse } from "../models/response/organizationResponse";
|
||||
import { OrganizationSponsorshipSyncStatusResponse } from "../models/response/organizationSponsorshipSyncStatusResponse";
|
||||
import { OrganizationSubscriptionResponse } from "../models/response/organizationSubscriptionResponse";
|
||||
import { OrganizationUserBulkPublicKeyResponse } from "../models/response/organizationUserBulkPublicKeyResponse";
|
||||
import { OrganizationUserBulkResponse } from "../models/response/organizationUserBulkResponse";
|
||||
import {
|
||||
@@ -391,7 +372,7 @@ export class ApiService implements ApiServiceAbstraction {
|
||||
return new PaymentResponse(r);
|
||||
}
|
||||
|
||||
postAccountPayment(request: PaymentRequest): Promise<any> {
|
||||
postAccountPayment(request: PaymentRequest): Promise<void> {
|
||||
return this.send("POST", "/accounts/payment", request, true, false);
|
||||
}
|
||||
|
||||
@@ -431,7 +412,7 @@ export class ApiService implements ApiServiceAbstraction {
|
||||
return this.send("POST", "/accounts/kdf", request, true, false);
|
||||
}
|
||||
|
||||
async deleteSsoUser(organizationId: string): Promise<any> {
|
||||
async deleteSsoUser(organizationId: string): Promise<void> {
|
||||
return this.send("DELETE", "/accounts/sso/" + organizationId, null, true, false);
|
||||
}
|
||||
|
||||
@@ -1067,19 +1048,6 @@ export class ApiService implements ApiServiceAbstraction {
|
||||
return new OrganizationUserResetPasswordDetailsReponse(r);
|
||||
}
|
||||
|
||||
async getOrganizationAutoEnrollStatus(
|
||||
identifier: string
|
||||
): Promise<OrganizationAutoEnrollStatusResponse> {
|
||||
const r = await this.send(
|
||||
"GET",
|
||||
"/organizations/" + identifier + "/auto-enroll-status",
|
||||
null,
|
||||
true,
|
||||
true
|
||||
);
|
||||
return new OrganizationAutoEnrollStatusResponse(r);
|
||||
}
|
||||
|
||||
postOrganizationUserInvite(
|
||||
organizationId: string,
|
||||
request: OrganizationUserInviteRequest
|
||||
@@ -1205,7 +1173,7 @@ export class ApiService implements ApiServiceAbstraction {
|
||||
organizationId: string,
|
||||
userId: string,
|
||||
request: OrganizationUserResetPasswordEnrollmentRequest
|
||||
): Promise<any> {
|
||||
): Promise<void> {
|
||||
return this.send(
|
||||
"PUT",
|
||||
"/organizations/" + organizationId + "/users/" + userId + "/reset-password-enrollment",
|
||||
@@ -1308,10 +1276,6 @@ export class ApiService implements ApiServiceAbstraction {
|
||||
return new ListResponse(r, PlanResponse);
|
||||
}
|
||||
|
||||
async postImportDirectory(organizationId: string, request: ImportDirectoryRequest): Promise<any> {
|
||||
return this.send("POST", "/organizations/" + organizationId + "/import", request, true, false);
|
||||
}
|
||||
|
||||
async postPublicImportDirectory(request: OrganizationImportRequest): Promise<any> {
|
||||
return this.send("POST", "/public/organization/import", request, true, false);
|
||||
}
|
||||
@@ -1614,21 +1578,6 @@ export class ApiService implements ApiServiceAbstraction {
|
||||
|
||||
// Organization APIs
|
||||
|
||||
async getOrganization(id: string): Promise<OrganizationResponse> {
|
||||
const r = await this.send("GET", "/organizations/" + id, null, true, true);
|
||||
return new OrganizationResponse(r);
|
||||
}
|
||||
|
||||
async getOrganizationBilling(id: string): Promise<BillingResponse> {
|
||||
const r = await this.send("GET", "/organizations/" + id + "/billing", null, true, true);
|
||||
return new BillingResponse(r);
|
||||
}
|
||||
|
||||
async getOrganizationSubscription(id: string): Promise<OrganizationSubscriptionResponse> {
|
||||
const r = await this.send("GET", "/organizations/" + id + "/subscription", null, true, true);
|
||||
return new OrganizationSubscriptionResponse(r);
|
||||
}
|
||||
|
||||
async getCloudCommunicationsEnabled(): Promise<boolean> {
|
||||
const r = await this.send("GET", "/organizations/connections/enabled", null, true, true);
|
||||
return r as boolean;
|
||||
@@ -1670,159 +1619,6 @@ export class ApiService implements ApiServiceAbstraction {
|
||||
return this.send("DELETE", "/organizations/connections/" + id, null, true, false);
|
||||
}
|
||||
|
||||
async getOrganizationLicense(id: string, installationId: string): Promise<any> {
|
||||
return this.send(
|
||||
"GET",
|
||||
"/organizations/" + id + "/license?installationId=" + installationId,
|
||||
null,
|
||||
true,
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
async getOrganizationTaxInfo(id: string): Promise<TaxInfoResponse> {
|
||||
const r = await this.send("GET", "/organizations/" + id + "/tax", null, true, true);
|
||||
return new TaxInfoResponse(r);
|
||||
}
|
||||
|
||||
async getOrganizationSso(id: string): Promise<OrganizationSsoResponse> {
|
||||
const r = await this.send("GET", "/organizations/" + id + "/sso", null, true, true);
|
||||
return new OrganizationSsoResponse(r);
|
||||
}
|
||||
|
||||
async postOrganization(request: OrganizationCreateRequest): Promise<OrganizationResponse> {
|
||||
const r = await this.send("POST", "/organizations", request, true, true);
|
||||
return new OrganizationResponse(r);
|
||||
}
|
||||
|
||||
async putOrganization(
|
||||
id: string,
|
||||
request: OrganizationUpdateRequest
|
||||
): Promise<OrganizationResponse> {
|
||||
const r = await this.send("PUT", "/organizations/" + id, request, true, true);
|
||||
return new OrganizationResponse(r);
|
||||
}
|
||||
|
||||
async putOrganizationTaxInfo(
|
||||
id: string,
|
||||
request: OrganizationTaxInfoUpdateRequest
|
||||
): Promise<any> {
|
||||
return this.send("PUT", "/organizations/" + id + "/tax", request, true, false);
|
||||
}
|
||||
|
||||
postLeaveOrganization(id: string): Promise<any> {
|
||||
return this.send("POST", "/organizations/" + id + "/leave", null, true, false);
|
||||
}
|
||||
|
||||
async postOrganizationLicense(data: FormData): Promise<OrganizationResponse> {
|
||||
const r = await this.send("POST", "/organizations/license", data, true, true);
|
||||
return new OrganizationResponse(r);
|
||||
}
|
||||
|
||||
async postOrganizationLicenseUpdate(id: string, data: FormData): Promise<any> {
|
||||
return this.send("POST", "/organizations/" + id + "/license", data, true, false);
|
||||
}
|
||||
|
||||
async postOrganizationApiKey(
|
||||
id: string,
|
||||
request: OrganizationApiKeyRequest
|
||||
): Promise<ApiKeyResponse> {
|
||||
const r = await this.send("POST", "/organizations/" + id + "/api-key", request, true, true);
|
||||
return new ApiKeyResponse(r);
|
||||
}
|
||||
|
||||
async getOrganizationApiKeyInformation(
|
||||
id: string,
|
||||
type: OrganizationApiKeyType = null
|
||||
): Promise<ListResponse<OrganizationApiKeyInformationResponse>> {
|
||||
const uri =
|
||||
type === null
|
||||
? "/organizations/" + id + "/api-key-information"
|
||||
: "/organizations/" + id + "/api-key-information/" + type;
|
||||
const r = await this.send("GET", uri, null, true, true);
|
||||
return new ListResponse(r, OrganizationApiKeyInformationResponse);
|
||||
}
|
||||
|
||||
async postOrganizationRotateApiKey(
|
||||
id: string,
|
||||
request: OrganizationApiKeyRequest
|
||||
): Promise<ApiKeyResponse> {
|
||||
const r = await this.send(
|
||||
"POST",
|
||||
"/organizations/" + id + "/rotate-api-key",
|
||||
request,
|
||||
true,
|
||||
true
|
||||
);
|
||||
return new ApiKeyResponse(r);
|
||||
}
|
||||
|
||||
async postOrganizationSso(
|
||||
id: string,
|
||||
request: OrganizationSsoRequest
|
||||
): Promise<OrganizationSsoResponse> {
|
||||
const r = await this.send("POST", "/organizations/" + id + "/sso", request, true, true);
|
||||
return new OrganizationSsoResponse(r);
|
||||
}
|
||||
|
||||
async postOrganizationUpgrade(
|
||||
id: string,
|
||||
request: OrganizationUpgradeRequest
|
||||
): Promise<PaymentResponse> {
|
||||
const r = await this.send("POST", "/organizations/" + id + "/upgrade", request, true, true);
|
||||
return new PaymentResponse(r);
|
||||
}
|
||||
|
||||
async postOrganizationUpdateSubscription(
|
||||
id: string,
|
||||
request: OrganizationSubscriptionUpdateRequest
|
||||
): Promise<void> {
|
||||
return this.send("POST", "/organizations/" + id + "/subscription", request, true, false);
|
||||
}
|
||||
|
||||
async postOrganizationSeat(id: string, request: SeatRequest): Promise<PaymentResponse> {
|
||||
const r = await this.send("POST", "/organizations/" + id + "/seat", request, true, true);
|
||||
return new PaymentResponse(r);
|
||||
}
|
||||
|
||||
async postOrganizationStorage(id: string, request: StorageRequest): Promise<PaymentResponse> {
|
||||
const r = await this.send("POST", "/organizations/" + id + "/storage", request, true, true);
|
||||
return new PaymentResponse(r);
|
||||
}
|
||||
|
||||
postOrganizationPayment(id: string, request: PaymentRequest): Promise<any> {
|
||||
return this.send("POST", "/organizations/" + id + "/payment", request, true, false);
|
||||
}
|
||||
|
||||
postOrganizationVerifyBank(id: string, request: VerifyBankRequest): Promise<any> {
|
||||
return this.send("POST", "/organizations/" + id + "/verify-bank", request, true, false);
|
||||
}
|
||||
|
||||
postOrganizationCancel(id: string): Promise<any> {
|
||||
return this.send("POST", "/organizations/" + id + "/cancel", null, true, false);
|
||||
}
|
||||
|
||||
postOrganizationReinstate(id: string): Promise<any> {
|
||||
return this.send("POST", "/organizations/" + id + "/reinstate", null, true, false);
|
||||
}
|
||||
|
||||
deleteOrganization(id: string, request: SecretVerificationRequest): Promise<any> {
|
||||
return this.send("DELETE", "/organizations/" + id, request, true, false);
|
||||
}
|
||||
|
||||
async getOrganizationKeys(id: string): Promise<OrganizationKeysResponse> {
|
||||
const r = await this.send("GET", "/organizations/" + id + "/keys", null, true, true);
|
||||
return new OrganizationKeysResponse(r);
|
||||
}
|
||||
|
||||
async postOrganizationKeys(
|
||||
id: string,
|
||||
request: OrganizationKeysRequest
|
||||
): Promise<OrganizationKeysResponse> {
|
||||
const r = await this.send("POST", "/organizations/" + id + "/keys", request, true, true);
|
||||
return new OrganizationKeysResponse(r);
|
||||
}
|
||||
|
||||
// Provider APIs
|
||||
|
||||
async postProviderSetup(id: string, request: ProviderSetupRequest) {
|
||||
|
||||
@@ -1,9 +1,15 @@
|
||||
import { BroadcasterService as BroadcasterServiceAbstraction } from "../abstractions/broadcaster.service";
|
||||
import {
|
||||
BroadcasterService as BroadcasterServiceAbstraction,
|
||||
MessageBase,
|
||||
} from "../abstractions/broadcaster.service";
|
||||
|
||||
export class BroadcasterService implements BroadcasterServiceAbstraction {
|
||||
subscribers: Map<string, (message: any) => any> = new Map<string, (message: any) => any>();
|
||||
subscribers: Map<string, (message: MessageBase) => void> = new Map<
|
||||
string,
|
||||
(message: MessageBase) => void
|
||||
>();
|
||||
|
||||
send(message: any, id?: string) {
|
||||
send(message: MessageBase, id?: string) {
|
||||
if (id != null) {
|
||||
if (this.subscribers.has(id)) {
|
||||
this.subscribers.get(id)(message);
|
||||
@@ -16,7 +22,7 @@ export class BroadcasterService implements BroadcasterServiceAbstraction {
|
||||
});
|
||||
}
|
||||
|
||||
subscribe(id: string, messageCallback: (message: any) => any) {
|
||||
subscribe(id: string, messageCallback: (message: MessageBase) => void) {
|
||||
this.subscribers.set(id, messageCallback);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,263 @@
|
||||
import { ApiService } from "../../abstractions/api.service";
|
||||
import { OrganizationApiServiceAbstraction } from "../../abstractions/organization/organization-api.service.abstraction";
|
||||
import { OrganizationApiKeyType } from "../../enums/organizationApiKeyType";
|
||||
import { ImportDirectoryRequest } from "../../models/request/importDirectoryRequest";
|
||||
import { OrganizationSsoRequest } from "../../models/request/organization/organizationSsoRequest";
|
||||
import { OrganizationApiKeyRequest } from "../../models/request/organizationApiKeyRequest";
|
||||
import { OrganizationCreateRequest } from "../../models/request/organizationCreateRequest";
|
||||
import { OrganizationKeysRequest } from "../../models/request/organizationKeysRequest";
|
||||
import { OrganizationSubscriptionUpdateRequest } from "../../models/request/organizationSubscriptionUpdateRequest";
|
||||
import { OrganizationTaxInfoUpdateRequest } from "../../models/request/organizationTaxInfoUpdateRequest";
|
||||
import { OrganizationUpdateRequest } from "../../models/request/organizationUpdateRequest";
|
||||
import { OrganizationUpgradeRequest } from "../../models/request/organizationUpgradeRequest";
|
||||
import { PaymentRequest } from "../../models/request/paymentRequest";
|
||||
import { SeatRequest } from "../../models/request/seatRequest";
|
||||
import { SecretVerificationRequest } from "../../models/request/secretVerificationRequest";
|
||||
import { StorageRequest } from "../../models/request/storageRequest";
|
||||
import { VerifyBankRequest } from "../../models/request/verifyBankRequest";
|
||||
import { ApiKeyResponse } from "../../models/response/apiKeyResponse";
|
||||
import { BillingResponse } from "../../models/response/billingResponse";
|
||||
import { ListResponse } from "../../models/response/listResponse";
|
||||
import { OrganizationSsoResponse } from "../../models/response/organization/organizationSsoResponse";
|
||||
import { OrganizationApiKeyInformationResponse } from "../../models/response/organizationApiKeyInformationResponse";
|
||||
import { OrganizationAutoEnrollStatusResponse } from "../../models/response/organizationAutoEnrollStatusResponse";
|
||||
import { OrganizationKeysResponse } from "../../models/response/organizationKeysResponse";
|
||||
import { OrganizationResponse } from "../../models/response/organizationResponse";
|
||||
import { OrganizationSubscriptionResponse } from "../../models/response/organizationSubscriptionResponse";
|
||||
import { PaymentResponse } from "../../models/response/paymentResponse";
|
||||
import { TaxInfoResponse } from "../../models/response/taxInfoResponse";
|
||||
|
||||
export class OrganizationApiService implements OrganizationApiServiceAbstraction {
|
||||
constructor(private apiService: ApiService) {}
|
||||
|
||||
async get(id: string): Promise<OrganizationResponse> {
|
||||
const r = await this.apiService.send("GET", "/organizations/" + id, null, true, true);
|
||||
return new OrganizationResponse(r);
|
||||
}
|
||||
|
||||
async getBilling(id: string): Promise<BillingResponse> {
|
||||
const r = await this.apiService.send(
|
||||
"GET",
|
||||
"/organizations/" + id + "/billing",
|
||||
null,
|
||||
true,
|
||||
true
|
||||
);
|
||||
return new BillingResponse(r);
|
||||
}
|
||||
|
||||
async getSubscription(id: string): Promise<OrganizationSubscriptionResponse> {
|
||||
const r = await this.apiService.send(
|
||||
"GET",
|
||||
"/organizations/" + id + "/subscription",
|
||||
null,
|
||||
true,
|
||||
true
|
||||
);
|
||||
return new OrganizationSubscriptionResponse(r);
|
||||
}
|
||||
|
||||
async getLicense(id: string, installationId: string): Promise<unknown> {
|
||||
return this.apiService.send(
|
||||
"GET",
|
||||
"/organizations/" + id + "/license?installationId=" + installationId,
|
||||
null,
|
||||
true,
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
async getAutoEnrollStatus(identifier: string): Promise<OrganizationAutoEnrollStatusResponse> {
|
||||
const r = await this.apiService.send(
|
||||
"GET",
|
||||
"/organizations/" + identifier + "/auto-enroll-status",
|
||||
null,
|
||||
true,
|
||||
true
|
||||
);
|
||||
return new OrganizationAutoEnrollStatusResponse(r);
|
||||
}
|
||||
|
||||
async create(request: OrganizationCreateRequest): Promise<OrganizationResponse> {
|
||||
const r = await this.apiService.send("POST", "/organizations", request, true, true);
|
||||
return new OrganizationResponse(r);
|
||||
}
|
||||
|
||||
async createLicense(data: FormData): Promise<OrganizationResponse> {
|
||||
const r = await this.apiService.send("POST", "/organizations/license", data, true, true);
|
||||
return new OrganizationResponse(r);
|
||||
}
|
||||
|
||||
async save(id: string, request: OrganizationUpdateRequest): Promise<OrganizationResponse> {
|
||||
const r = await this.apiService.send("PUT", "/organizations/" + id, request, true, true);
|
||||
return new OrganizationResponse(r);
|
||||
}
|
||||
|
||||
async updatePayment(id: string, request: PaymentRequest): Promise<void> {
|
||||
return this.apiService.send("POST", "/organizations/" + id + "/payment", request, true, false);
|
||||
}
|
||||
|
||||
async upgrade(id: string, request: OrganizationUpgradeRequest): Promise<PaymentResponse> {
|
||||
const r = await this.apiService.send(
|
||||
"POST",
|
||||
"/organizations/" + id + "/upgrade",
|
||||
request,
|
||||
true,
|
||||
true
|
||||
);
|
||||
return new PaymentResponse(r);
|
||||
}
|
||||
|
||||
async updateSubscription(
|
||||
id: string,
|
||||
request: OrganizationSubscriptionUpdateRequest
|
||||
): Promise<void> {
|
||||
return this.apiService.send(
|
||||
"POST",
|
||||
"/organizations/" + id + "/subscription",
|
||||
request,
|
||||
true,
|
||||
false
|
||||
);
|
||||
}
|
||||
|
||||
async updateSeats(id: string, request: SeatRequest): Promise<PaymentResponse> {
|
||||
const r = await this.apiService.send(
|
||||
"POST",
|
||||
"/organizations/" + id + "/seat",
|
||||
request,
|
||||
true,
|
||||
true
|
||||
);
|
||||
return new PaymentResponse(r);
|
||||
}
|
||||
|
||||
async updateStorage(id: string, request: StorageRequest): Promise<PaymentResponse> {
|
||||
const r = await this.apiService.send(
|
||||
"POST",
|
||||
"/organizations/" + id + "/storage",
|
||||
request,
|
||||
true,
|
||||
true
|
||||
);
|
||||
return new PaymentResponse(r);
|
||||
}
|
||||
|
||||
async verifyBank(id: string, request: VerifyBankRequest): Promise<void> {
|
||||
return this.apiService.send(
|
||||
"POST",
|
||||
"/organizations/" + id + "/verify-bank",
|
||||
request,
|
||||
true,
|
||||
false
|
||||
);
|
||||
}
|
||||
|
||||
async cancel(id: string): Promise<void> {
|
||||
return this.apiService.send("POST", "/organizations/" + id + "/cancel", null, true, false);
|
||||
}
|
||||
|
||||
async reinstate(id: string): Promise<void> {
|
||||
return this.apiService.send("POST", "/organizations/" + id + "/reinstate", null, true, false);
|
||||
}
|
||||
|
||||
async leave(id: string): Promise<void> {
|
||||
return this.apiService.send("POST", "/organizations/" + id + "/leave", null, true, false);
|
||||
}
|
||||
|
||||
async delete(id: string, request: SecretVerificationRequest): Promise<void> {
|
||||
return this.apiService.send("DELETE", "/organizations/" + id, request, true, false);
|
||||
}
|
||||
|
||||
async updateLicense(id: string, data: FormData): Promise<void> {
|
||||
return this.apiService.send("POST", "/organizations/" + id + "/license", data, true, false);
|
||||
}
|
||||
|
||||
async importDirectory(organizationId: string, request: ImportDirectoryRequest): Promise<void> {
|
||||
return this.apiService.send(
|
||||
"POST",
|
||||
"/organizations/" + organizationId + "/import",
|
||||
request,
|
||||
true,
|
||||
false
|
||||
);
|
||||
}
|
||||
|
||||
async getOrCreateApiKey(id: string, request: OrganizationApiKeyRequest): Promise<ApiKeyResponse> {
|
||||
const r = await this.apiService.send(
|
||||
"POST",
|
||||
"/organizations/" + id + "/api-key",
|
||||
request,
|
||||
true,
|
||||
true
|
||||
);
|
||||
return new ApiKeyResponse(r);
|
||||
}
|
||||
|
||||
async getApiKeyInformation(
|
||||
id: string,
|
||||
organizationApiKeyType: OrganizationApiKeyType = null
|
||||
): Promise<ListResponse<OrganizationApiKeyInformationResponse>> {
|
||||
const uri =
|
||||
organizationApiKeyType === null
|
||||
? "/organizations/" + id + "/api-key-information"
|
||||
: "/organizations/" + id + "/api-key-information/" + organizationApiKeyType;
|
||||
const r = await this.apiService.send("GET", uri, null, true, true);
|
||||
return new ListResponse(r, OrganizationApiKeyInformationResponse);
|
||||
}
|
||||
|
||||
async rotateApiKey(id: string, request: OrganizationApiKeyRequest): Promise<ApiKeyResponse> {
|
||||
const r = await this.apiService.send(
|
||||
"POST",
|
||||
"/organizations/" + id + "/rotate-api-key",
|
||||
request,
|
||||
true,
|
||||
true
|
||||
);
|
||||
return new ApiKeyResponse(r);
|
||||
}
|
||||
|
||||
async getTaxInfo(id: string): Promise<TaxInfoResponse> {
|
||||
const r = await this.apiService.send("GET", "/organizations/" + id + "/tax", null, true, true);
|
||||
return new TaxInfoResponse(r);
|
||||
}
|
||||
|
||||
async updateTaxInfo(id: string, request: OrganizationTaxInfoUpdateRequest): Promise<void> {
|
||||
return this.apiService.send("PUT", "/organizations/" + id + "/tax", request, true, false);
|
||||
}
|
||||
|
||||
async getKeys(id: string): Promise<OrganizationKeysResponse> {
|
||||
const r = await this.apiService.send("GET", "/organizations/" + id + "/keys", null, true, true);
|
||||
return new OrganizationKeysResponse(r);
|
||||
}
|
||||
|
||||
async updateKeys(
|
||||
id: string,
|
||||
request: OrganizationKeysRequest
|
||||
): Promise<OrganizationKeysResponse> {
|
||||
const r = await this.apiService.send(
|
||||
"POST",
|
||||
"/organizations/" + id + "/keys",
|
||||
request,
|
||||
true,
|
||||
true
|
||||
);
|
||||
return new OrganizationKeysResponse(r);
|
||||
}
|
||||
|
||||
async getSso(id: string): Promise<OrganizationSsoResponse> {
|
||||
const r = await this.apiService.send("GET", "/organizations/" + id + "/sso", null, true, true);
|
||||
return new OrganizationSsoResponse(r);
|
||||
}
|
||||
|
||||
async updateSso(id: string, request: OrganizationSsoRequest): Promise<OrganizationSsoResponse> {
|
||||
const r = await this.apiService.send(
|
||||
"POST",
|
||||
"/organizations/" + id + "/sso",
|
||||
request,
|
||||
true,
|
||||
true
|
||||
);
|
||||
return new OrganizationSsoResponse(r);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user