1
0
mirror of https://github.com/bitwarden/browser synced 2026-01-08 03:23:50 +00:00

[PM-18955] Use OrganizationWarningsService on AC Collections Page behind FF (#14437)

* Add getWarnings to OrganizationBillingApiService

* Add OrganizationWarningsService

* Add feature flag

* Add standalone warning components that consume new service

* Add new components to AC collections vault when FF is enabled

* Add OrganizationWarningsService spec

* Run prettier on spec file

* Thomas' feedback
This commit is contained in:
Alex Morask
2025-05-01 17:13:18 -04:00
committed by GitHub
parent 23e7f120fd
commit c8d6e48996
10 changed files with 828 additions and 9 deletions

View File

@@ -1,3 +1,5 @@
import { OrganizationWarningsResponse } from "@bitwarden/common/billing/models/response/organization-warnings.response";
import { ApiService } from "../../../abstractions/api.service";
import { OrganizationBillingApiServiceAbstraction } from "../../abstractions/organizations/organization-billing-api.service.abstraction";
import {
@@ -50,6 +52,18 @@ export class OrganizationBillingApiService implements OrganizationBillingApiServ
return r?.map((i: any) => new BillingTransactionResponse(i)) || [];
}
async getWarnings(id: string): Promise<OrganizationWarningsResponse> {
const response = await this.apiService.send(
"GET",
`/organizations/${id}/billing/warnings`,
null,
true,
true,
);
return new OrganizationWarningsResponse(response);
}
async setupBusinessUnit(
id: string,
request: {