1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-22 11:13:46 +00:00

PM-5274 Migrate Collection Service State (#7732)

* update collection service to use new state provider framework, remove stateservice from collection service, update collections state provider with migrate file and unit test
This commit is contained in:
Jason Ng
2024-02-14 17:03:03 -05:00
committed by GitHub
parent d8b74b78da
commit 3edf098aaf
23 changed files with 426 additions and 170 deletions

View File

@@ -1,8 +1,11 @@
import { Jsonify } from "type-fest";
import { CollectionId, OrganizationId } from "../../../types/guid";
import { CollectionDetailsResponse } from "../response/collection.response";
export class CollectionData {
id: string;
organizationId: string;
id: CollectionId;
organizationId: OrganizationId;
name: string;
externalId: string;
readOnly: boolean;
@@ -18,4 +21,8 @@ export class CollectionData {
this.manage = response.manage;
this.hidePasswords = response.hidePasswords;
}
static fromJSON(obj: Jsonify<CollectionData>) {
return Object.assign(new CollectionData(new CollectionDetailsResponse({})), obj);
}
}