1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-12 22:33:35 +00:00

[PM-23920] Admin Console - adopt strongly typed guids (#15814)

Update organization, collection and policy to use strongly typed IDs
This commit is contained in:
Thomas Rittson
2025-08-06 15:27:52 +10:00
committed by GitHub
parent 598348fcc1
commit 61cd0c4f51
36 changed files with 122 additions and 67 deletions

View File

@@ -5,13 +5,14 @@
import { Collection as CollectionDomain, CollectionView } from "@bitwarden/admin-console/common";
import { EncString } from "../../key-management/crypto/models/enc-string";
import { emptyGuid, OrganizationId } from "../../types/guid";
import { safeGetString } from "./utils";
export class CollectionExport {
static template(): CollectionExport {
const req = new CollectionExport();
req.organizationId = "00000000-0000-0000-0000-000000000000";
req.organizationId = emptyGuid as OrganizationId;
req.name = "Collection name";
req.externalId = null;
return req;
@@ -35,7 +36,7 @@ export class CollectionExport {
return domain;
}
organizationId: string;
organizationId: OrganizationId;
name: string;
externalId: string;