mirror of
https://github.com/bitwarden/browser
synced 2026-02-14 23:45:37 +00:00
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
20 lines
605 B
TypeScript
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;
|
|
}
|
|
}
|