@databutton/firebase-types 1.136.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;
@@ -416,10 +422,18 @@ export interface FeatureFlagBase {
416
422
  lastChangedBy: PerformedBy;
417
423
  state: "ENABLED" | "DISABLED";
418
424
  /**
419
- * Key used when checkning if feature is enabled
425
+ * Key used when checking if feature is enabled
420
426
  */
421
427
  key: string;
422
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";
423
437
  }
424
438
  /**
425
439
  * Enable a feature for a percentage of our users
@@ -1419,6 +1433,15 @@ export interface Project {
1419
1433
  * Used in accounts to indicate who is responsible for the project, and thus recipient of important notifications or similar.
1420
1434
  */
1421
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
+ };
1422
1445
  permittedUsers?: Record<ProjectPermissionName, string[]>;
1423
1446
  name: string;
1424
1447
  tags?: string[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@databutton/firebase-types",
3
- "version": "1.136.0",
3
+ "version": "1.138.0",
4
4
  "main": "lib/types/published/index.js",
5
5
  "type": "module",
6
6
  "engines": {