@databutton/firebase-types 1.135.0 → 1.138.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -45,6 +45,7 @@ export declare enum CollectionName {
45
45
  ACCOUNT_INVITES = "account-invites",
46
46
  ACCOUNT_KNOWLEDGE_SUGGESTIONS = "knowledge-suggestions",
47
47
  ACCOUNT_NOTIFICATIONS = "notifications",
48
+ ACCOUNT_NOTIFICATION_GROUPS = "notificationGroups",
48
49
  ROLES = "roles",
49
50
  MESSAGES = "messages",
50
51
  MODULES = "modules",
@@ -46,6 +46,7 @@ export var CollectionName;
46
46
  CollectionName["ACCOUNT_INVITES"] = "account-invites";
47
47
  CollectionName["ACCOUNT_KNOWLEDGE_SUGGESTIONS"] = "knowledge-suggestions";
48
48
  CollectionName["ACCOUNT_NOTIFICATIONS"] = "notifications";
49
+ CollectionName["ACCOUNT_NOTIFICATION_GROUPS"] = "notificationGroups";
49
50
  CollectionName["ROLES"] = "roles";
50
51
  CollectionName["MESSAGES"] = "messages";
51
52
  CollectionName["MODULES"] = "modules";
@@ -30,6 +30,12 @@ export type PerformedBy = PerformedByUser | PerformedBySystem | PerformedByAnony
30
30
  export interface ProjectEventsReadMap {
31
31
  [projectId: string]: Timestamp;
32
32
  }
33
+ export interface AccountNotificationGroup {
34
+ name: string;
35
+ memberIds: string[];
36
+ createdBy: PerformedBy;
37
+ lastUpdatedBy: PerformedBy;
38
+ }
33
39
  export interface Notification {
34
40
  createdBy: PerformedBy;
35
41
  createdAt: Timestamp;
@@ -43,6 +49,7 @@ export interface Notification {
43
49
  description: string;
44
50
  sessionId: string;
45
51
  taskId?: string | null;
52
+ displayId?: string | null;
46
53
  reason?: string | null;
47
54
  taskTitle?: string | null;
48
55
  };
@@ -415,10 +422,18 @@ export interface FeatureFlagBase {
415
422
  lastChangedBy: PerformedBy;
416
423
  state: "ENABLED" | "DISABLED";
417
424
  /**
418
- * Key used when checkning if feature is enabled
425
+ * Key used when checking if feature is enabled
419
426
  */
420
427
  key: string;
421
428
  description: string;
429
+ /**
430
+ * Controls which entity type this flag applies to.
431
+ * - "user": added to profile.enabledFeatures (propagated by Firestore triggers)
432
+ * - "account": added to account.enabledFeatures (managed via admin UI toggle)
433
+ * - "shared": applies to both profiles and accounts
434
+ * Omitted on legacy flags — treat as "user".
435
+ */
436
+ scope?: "user" | "account" | "shared";
422
437
  }
423
438
  /**
424
439
  * Enable a feature for a percentage of our users
@@ -1418,6 +1433,15 @@ export interface Project {
1418
1433
  * Used in accounts to indicate who is responsible for the project, and thus recipient of important notifications or similar.
1419
1434
  */
1420
1435
  maintainers?: string[];
1436
+ /**
1437
+ * Per-project notification settings controlling who receives notifications.
1438
+ */
1439
+ notificationSettings?: {
1440
+ /** When true, all maintainers receive notifications even if a specific userId is also targeted. */
1441
+ sendToAllMaintainers?: boolean;
1442
+ /** IDs of account-level notification groups subscribed to this project's notifications. */
1443
+ subscribedGroupIds?: string[];
1444
+ };
1421
1445
  permittedUsers?: Record<ProjectPermissionName, string[]>;
1422
1446
  name: string;
1423
1447
  tags?: string[];
@@ -575,6 +575,7 @@ export type CreateApprovalNotificationRequest = {
575
575
  toolName: string;
576
576
  sessionId: string;
577
577
  taskId?: string | null;
578
+ displayId?: string | null;
578
579
  reason?: string | null;
579
580
  taskTitle?: string | null;
580
581
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@databutton/firebase-types",
3
- "version": "1.135.0",
3
+ "version": "1.138.0",
4
4
  "main": "lib/types/published/index.js",
5
5
  "type": "module",
6
6
  "engines": {