1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-15 15:53:27 +00:00

[PM-24227] Enable TS-strict for Collection Domain models (#15765)

* wip ts-strict

* wip ts-strict

* wip

* cleanup

* cleanup

* fix story

* fix story

* fix story

* wip

* clean up CollectionAdminView construction

* fix deprecated function call

* fix cli

* clean up

* fix story

* wip

* fix cli

* requested changes

* clean up, fixing minor bugs, more type saftey

* assign props in static ctor, clean up
This commit is contained in:
Brandon Treston
2025-08-14 13:08:24 -04:00
committed by GitHub
parent ac7e873813
commit 27089fbb57
41 changed files with 537 additions and 379 deletions

View File

@@ -143,10 +143,14 @@ export class OrganizationVaultExportService
if (exportData != null) {
if (exportData.collections != null && exportData.collections.length > 0) {
exportData.collections.forEach((c) => {
const collection = new Collection(new CollectionData(c as CollectionDetailsResponse));
const collection = Collection.fromCollectionData(
new CollectionData(c as CollectionDetailsResponse),
);
exportPromises.push(
firstValueFrom(this.keyService.activeUserOrgKeys$)
.then((keys) => collection.decrypt(keys[organizationId as OrganizationId]))
.then((keys) =>
collection.decrypt(keys[organizationId as OrganizationId], this.encryptService),
)
.then((decCol) => {
decCollections.push(decCol);
}),
@@ -191,7 +195,9 @@ export class OrganizationVaultExportService
this.apiService.getCollections(organizationId).then((c) => {
if (c != null && c.data != null && c.data.length > 0) {
c.data.forEach((r) => {
const collection = new Collection(new CollectionData(r as CollectionDetailsResponse));
const collection = Collection.fromCollectionData(
new CollectionData(r as CollectionDetailsResponse),
);
collections.push(collection);
});
}