@databutton/firebase-types 1.94.19 → 1.95.1
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.
|
@@ -37,6 +37,7 @@ export declare enum CollectionName {
|
|
|
37
37
|
LOGS = "logs",
|
|
38
38
|
ACCOUNT_MEMBERS = "members",
|
|
39
39
|
ACCOUNT_CONFIGS = "configs",
|
|
40
|
+
ACCOUNT_APPROVAL_REQUESTS = "approval-requests",
|
|
40
41
|
ROLES = "roles",
|
|
41
42
|
MESSAGES = "messages",
|
|
42
43
|
MODULES = "modules",
|
|
@@ -208,7 +209,9 @@ export declare enum CreateProjectErrorCode {
|
|
|
208
209
|
UNKNOWN_ERROR = "UNKNOWN_ERROR"
|
|
209
210
|
}
|
|
210
211
|
export declare enum ConfigTypes {
|
|
211
|
-
SSO = "sso"
|
|
212
|
+
SSO = "sso",
|
|
213
|
+
POSTHOG = "posthog",
|
|
214
|
+
GATING = "gating"
|
|
212
215
|
}
|
|
213
216
|
export declare enum MigrateToRiffErrorCode {
|
|
214
217
|
UNKNOWN_ERROR = "UNKNOWN_ERROR"
|
|
@@ -38,6 +38,7 @@ export var CollectionName;
|
|
|
38
38
|
CollectionName["LOGS"] = "logs";
|
|
39
39
|
CollectionName["ACCOUNT_MEMBERS"] = "members";
|
|
40
40
|
CollectionName["ACCOUNT_CONFIGS"] = "configs";
|
|
41
|
+
CollectionName["ACCOUNT_APPROVAL_REQUESTS"] = "approval-requests";
|
|
41
42
|
CollectionName["ROLES"] = "roles";
|
|
42
43
|
CollectionName["MESSAGES"] = "messages";
|
|
43
44
|
CollectionName["MODULES"] = "modules";
|
|
@@ -227,6 +228,8 @@ export var CreateProjectErrorCode;
|
|
|
227
228
|
export var ConfigTypes;
|
|
228
229
|
(function (ConfigTypes) {
|
|
229
230
|
ConfigTypes["SSO"] = "sso";
|
|
231
|
+
ConfigTypes["POSTHOG"] = "posthog";
|
|
232
|
+
ConfigTypes["GATING"] = "gating";
|
|
230
233
|
})(ConfigTypes || (ConfigTypes = {}));
|
|
231
234
|
export var MigrateToRiffErrorCode;
|
|
232
235
|
(function (MigrateToRiffErrorCode) {
|
|
@@ -84,11 +84,63 @@ export interface SSOConfig extends AccountConfigBase {
|
|
|
84
84
|
*/
|
|
85
85
|
autoAddNewUsers: boolean;
|
|
86
86
|
}
|
|
87
|
-
export
|
|
87
|
+
export interface PostHogConfig extends AccountConfigBase {
|
|
88
|
+
type: ConfigTypes.POSTHOG;
|
|
89
|
+
/**
|
|
90
|
+
* PostHog project ID for the account
|
|
91
|
+
* This is the project ID from PostHog cloud/self-hosted instance
|
|
92
|
+
*/
|
|
93
|
+
projectId: string;
|
|
94
|
+
/**
|
|
95
|
+
* PostHog host URL (e.g., "https://eu.i.posthog.com")
|
|
96
|
+
*/
|
|
97
|
+
host: string;
|
|
98
|
+
}
|
|
99
|
+
export type PermissionName = "deploy";
|
|
100
|
+
export type ApprovalLevel = "role" | "permission" | "approval";
|
|
101
|
+
export interface GatingConfig extends AccountConfigBase {
|
|
102
|
+
type: ConfigTypes.GATING;
|
|
103
|
+
approvalLevelRequiredFor: Record<PermissionName, ApprovalLevel>;
|
|
104
|
+
}
|
|
105
|
+
export type AccountConfig = SSOConfig | PostHogConfig | GatingConfig;
|
|
88
106
|
export interface SSOConfigLookupEntry {
|
|
89
107
|
lastUpdatedAt: Timestamp;
|
|
90
108
|
organizationId: string;
|
|
91
109
|
}
|
|
110
|
+
interface Approvable {
|
|
111
|
+
approvalRequestRef?: string | null;
|
|
112
|
+
approvedBy?: PerformedBy | null;
|
|
113
|
+
deniedBy?: PerformedBy | null;
|
|
114
|
+
}
|
|
115
|
+
interface ApprovalRequestBase<T = string, M = Record<string, string>> {
|
|
116
|
+
requestedBy: PerformedBy;
|
|
117
|
+
requesterComment: string;
|
|
118
|
+
roleRequiredToApprove: "admin";
|
|
119
|
+
docToApproveRef: string | null;
|
|
120
|
+
type: T;
|
|
121
|
+
metadata: M;
|
|
122
|
+
review: {
|
|
123
|
+
reviewedBy: PerformedBy;
|
|
124
|
+
comment: string;
|
|
125
|
+
approved: boolean;
|
|
126
|
+
} | null;
|
|
127
|
+
}
|
|
128
|
+
type AddPermissionApprovalConfig = {
|
|
129
|
+
projectId: string;
|
|
130
|
+
userId: string;
|
|
131
|
+
permission: PermissionName;
|
|
132
|
+
};
|
|
133
|
+
export type AddPermissionApprovalRequest = ApprovalRequestBase<"add-permission", AddPermissionApprovalConfig>;
|
|
134
|
+
type UseIntegrationApprovalConfig = {
|
|
135
|
+
projectId: string;
|
|
136
|
+
integrationRef: string;
|
|
137
|
+
};
|
|
138
|
+
export type UseIntegrationApprovalRequest = ApprovalRequestBase<"use-integration", UseIntegrationApprovalConfig>;
|
|
139
|
+
type DeployProjectApprovalConfig = {
|
|
140
|
+
deploymentRef: string;
|
|
141
|
+
};
|
|
142
|
+
export type DeployProjectApprovalRequest = ApprovalRequestBase<"deploy-project", DeployProjectApprovalConfig>;
|
|
143
|
+
export type ApprovalRequest = AddPermissionApprovalRequest | UseIntegrationApprovalRequest | DeployProjectApprovalRequest;
|
|
92
144
|
/**
|
|
93
145
|
* A list of account IDs that the user is at least a member of
|
|
94
146
|
*/
|
|
@@ -718,7 +770,8 @@ export declare enum ProjectExtension {
|
|
|
718
770
|
FIREBASE_AUTH = "firebase-auth",
|
|
719
771
|
NEON_DATABASE = "neon-database",
|
|
720
772
|
STACK_AUTH = "stack-auth",
|
|
721
|
-
MCP = "mcp"
|
|
773
|
+
MCP = "mcp",
|
|
774
|
+
POSTHOG = "posthog"
|
|
722
775
|
}
|
|
723
776
|
export type ProjectExtensionConfig<T = object> = {
|
|
724
777
|
name: ProjectExtension;
|
|
@@ -784,6 +837,9 @@ export interface FirebaseAuthExtensionConfig {
|
|
|
784
837
|
tosLink: string;
|
|
785
838
|
privacyPolicyLink: string;
|
|
786
839
|
}
|
|
840
|
+
export interface PostHogExtensionConfig {
|
|
841
|
+
projectId: string;
|
|
842
|
+
}
|
|
787
843
|
export type ProjectExtensions = ProjectExtensionConfig[];
|
|
788
844
|
export interface BaseTheme {
|
|
789
845
|
defaultFontFamily: string;
|
|
@@ -1126,6 +1182,7 @@ export interface Project {
|
|
|
1126
1182
|
markedForDeletionAt: Timestamp | null;
|
|
1127
1183
|
markedForDeletionBy?: PerformedBy | null;
|
|
1128
1184
|
members: string[];
|
|
1185
|
+
permittedUsers?: Record<PermissionName, string[]>;
|
|
1129
1186
|
name: string;
|
|
1130
1187
|
tags?: string[];
|
|
1131
1188
|
slug?: string;
|
|
@@ -1156,7 +1213,7 @@ export interface Project {
|
|
|
1156
1213
|
serviceCreationSucceededAt?: Timestamp;
|
|
1157
1214
|
serviceCreationFailedAt?: Timestamp;
|
|
1158
1215
|
/**
|
|
1159
|
-
* @deprecated
|
|
1216
|
+
* @deprecated No longer in use
|
|
1160
1217
|
*/
|
|
1161
1218
|
supportAccessEnabled?: boolean;
|
|
1162
1219
|
supportAccessEnabledUntil?: Timestamp | null;
|
|
@@ -1516,7 +1573,7 @@ export type AppSnapshot<T = ComponentSnapshotBase> = {
|
|
|
1516
1573
|
uiComponents?: UiComponentSnapshot<T>[];
|
|
1517
1574
|
frontends?: FrontendSnapshot<T>[];
|
|
1518
1575
|
};
|
|
1519
|
-
export interface ProjectDeploymentBase<T = ComponentSnapshotBase> extends AppSnapshot<T> {
|
|
1576
|
+
export interface ProjectDeploymentBase<T = ComponentSnapshotBase> extends Approvable, AppSnapshot<T> {
|
|
1520
1577
|
build: {
|
|
1521
1578
|
id: string;
|
|
1522
1579
|
venv?: {
|
|
@@ -60,6 +60,7 @@ export var ProjectExtension;
|
|
|
60
60
|
ProjectExtension["NEON_DATABASE"] = "neon-database";
|
|
61
61
|
ProjectExtension["STACK_AUTH"] = "stack-auth";
|
|
62
62
|
ProjectExtension["MCP"] = "mcp";
|
|
63
|
+
ProjectExtension["POSTHOG"] = "posthog";
|
|
63
64
|
})(ProjectExtension || (ProjectExtension = {}));
|
|
64
65
|
/**
|
|
65
66
|
* Taken from AWS types
|