mirror of
https://github.com/bitwarden/browser
synced 2025-12-11 05:43:41 +00:00
[PM-14461] Update organization state after subscription update (#12222)
* Update organization state after subscription update * QA: Fix SM trial seat adjustment
This commit is contained in:
@@ -53,11 +53,11 @@ export class OrganizationApiServiceAbstraction {
|
||||
updatePasswordManagerSeats: (
|
||||
id: string,
|
||||
request: OrganizationSubscriptionUpdateRequest,
|
||||
) => Promise<void>;
|
||||
) => Promise<ProfileOrganizationResponse>;
|
||||
updateSecretsManagerSubscription: (
|
||||
id: string,
|
||||
request: OrganizationSmSubscriptionUpdateRequest,
|
||||
) => Promise<void>;
|
||||
) => Promise<ProfileOrganizationResponse>;
|
||||
updateSeats: (id: string, request: SeatRequest) => Promise<PaymentResponse>;
|
||||
updateStorage: (id: string, request: StorageRequest) => Promise<PaymentResponse>;
|
||||
verifyBank: (id: string, request: VerifyBankRequest) => Promise<void>;
|
||||
|
||||
@@ -161,27 +161,29 @@ export class OrganizationApiService implements OrganizationApiServiceAbstraction
|
||||
async updatePasswordManagerSeats(
|
||||
id: string,
|
||||
request: OrganizationSubscriptionUpdateRequest,
|
||||
): Promise<void> {
|
||||
return this.apiService.send(
|
||||
): Promise<ProfileOrganizationResponse> {
|
||||
const r = await this.apiService.send(
|
||||
"POST",
|
||||
"/organizations/" + id + "/subscription",
|
||||
request,
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
);
|
||||
return new ProfileOrganizationResponse(r);
|
||||
}
|
||||
|
||||
async updateSecretsManagerSubscription(
|
||||
id: string,
|
||||
request: OrganizationSmSubscriptionUpdateRequest,
|
||||
): Promise<void> {
|
||||
return this.apiService.send(
|
||||
): Promise<ProfileOrganizationResponse> {
|
||||
const r = await this.apiService.send(
|
||||
"POST",
|
||||
"/organizations/" + id + "/sm-subscription",
|
||||
request,
|
||||
true,
|
||||
false,
|
||||
true,
|
||||
);
|
||||
return new ProfileOrganizationResponse(r);
|
||||
}
|
||||
|
||||
async updateSeats(id: string, request: SeatRequest): Promise<PaymentResponse> {
|
||||
|
||||
Reference in New Issue
Block a user