@databutton/firebase-types 1.136.0 → 1.139.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",
|
|
@@ -91,6 +92,7 @@ export declare enum CollectionName {
|
|
|
91
92
|
UI_COMPONENTS = "ui-components",
|
|
92
93
|
UI_FILES = "ui-files",
|
|
93
94
|
CONTEXT_FILES = "context-files",
|
|
95
|
+
TOOL_CONFIGS = "tool-configs",
|
|
94
96
|
TASKS = "tasks",
|
|
95
97
|
TOKEN_USAGE_ENTRIES = "entries",
|
|
96
98
|
COMPUTE_HOUR_USAGE = "compute-hour-usage",
|
|
@@ -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";
|
|
@@ -92,6 +93,7 @@ export var CollectionName;
|
|
|
92
93
|
CollectionName["UI_COMPONENTS"] = "ui-components";
|
|
93
94
|
CollectionName["UI_FILES"] = "ui-files";
|
|
94
95
|
CollectionName["CONTEXT_FILES"] = "context-files";
|
|
96
|
+
CollectionName["TOOL_CONFIGS"] = "tool-configs";
|
|
95
97
|
CollectionName["TASKS"] = "tasks";
|
|
96
98
|
CollectionName["TOKEN_USAGE_ENTRIES"] = "entries";
|
|
97
99
|
CollectionName["COMPUTE_HOUR_USAGE"] = "compute-hour-usage";
|
|
@@ -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
|
|
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[];
|
|
@@ -2121,6 +2144,12 @@ export interface PublicUsernameRecord {
|
|
|
2121
2144
|
}
|
|
2122
2145
|
export interface CreditTransactionRecord {
|
|
2123
2146
|
customerId: string;
|
|
2147
|
+
/**
|
|
2148
|
+
* The enterprise account where usage occurred. Null for non-enterprise (personal) customers.
|
|
2149
|
+
* For root enterprise teams equals customerId. For sub-teams differs from customerId,
|
|
2150
|
+
* which holds the billing ancestor. Use this field to query transactions per sub-team.
|
|
2151
|
+
*/
|
|
2152
|
+
accountId?: string | null;
|
|
2124
2153
|
userId?: string | null;
|
|
2125
2154
|
comment?: string | null;
|
|
2126
2155
|
internalComment?: string | null;
|
|
@@ -2632,4 +2661,26 @@ export type Channel = SlackChannel | EmailChannel | TeamsChannel;
|
|
|
2632
2661
|
export declare const isSlackChannel: (channel: Channel) => channel is SlackChannel;
|
|
2633
2662
|
export declare const isEmailChannel: (channel: Channel) => channel is EmailChannel;
|
|
2634
2663
|
export declare const isTeamsChannel: (channel: Channel) => channel is TeamsChannel;
|
|
2664
|
+
export type ToolApprovalPolicy = "prompt" | "allow" | "deny" | "custom-or-prompt" | "custom-or-allow" | "custom-or-deny";
|
|
2665
|
+
export type ToolKind = "platform" | "user";
|
|
2666
|
+
export type ToolPrimitive = string | number | boolean;
|
|
2667
|
+
export interface InputAllowlistRule {
|
|
2668
|
+
equals?: ToolPrimitive;
|
|
2669
|
+
anyOf?: ToolPrimitive[];
|
|
2670
|
+
allOf?: ToolPrimitive[];
|
|
2671
|
+
min?: number;
|
|
2672
|
+
max?: number;
|
|
2673
|
+
}
|
|
2674
|
+
export interface ProjectToolEntry {
|
|
2675
|
+
kind: ToolKind;
|
|
2676
|
+
enabled: boolean;
|
|
2677
|
+
approval?: ToolApprovalPolicy;
|
|
2678
|
+
denyReason?: string;
|
|
2679
|
+
inputAllowlists?: Record<string, InputAllowlistRule>;
|
|
2680
|
+
}
|
|
2681
|
+
export interface ProjectToolConfig {
|
|
2682
|
+
version: "2026-05-21";
|
|
2683
|
+
lastUpdatedBy: PerformedBy;
|
|
2684
|
+
tools: Record<string, ProjectToolEntry>;
|
|
2685
|
+
}
|
|
2635
2686
|
export {};
|