1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-14 23:45:37 +00:00
Files
browser/libs/admin-console/src/common/collections/models/collection-with-id.request.ts
Leslie Xiong 44bdaf71b3 Desktop/pm 18769/migrate vault filters (#17919)
Migrated vault filters to new v3 vault's navigation

* Decoupled existing vault filtering from vault component by using routed params with routed-vault-filter-bridge
* Converted vault filters to standalone components
* Removed extending filter Base Components from deprecated /libs/angular library and handled logic directly
* Moved shared 'models' and 'services' directories from web-vault into /libs/vault
2026-01-15 16:17:00 +01:00

20 lines
605 B
TypeScript

import { Collection } from "@bitwarden/common/admin-console/models/collections";
import { BaseCollectionRequest } from "./collection.request";
export class CollectionWithIdRequest extends BaseCollectionRequest {
id: string;
name: string;
constructor(collection: Collection) {
if (collection == null || collection.name == null || collection.name.encryptedString == null) {
throw new Error("CollectionWithIdRequest must contain name.");
}
super({
externalId: collection.externalId,
});
this.name = collection.name.encryptedString;
this.id = collection.id;
}
}