@databutton/firebase-types 1.184.0 → 1.186.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.
@@ -34,6 +34,7 @@ export declare enum CollectionName {
34
34
  FEATURE_FLAGS = "feature-flags",
35
35
  JOB_CURSORS = "job-cursors",
36
36
  FRONTENDS = "frontends",
37
+ INFERRED_PHASE_TRANSITIONS = "inferred-phase-transitions",
37
38
  FRONTEND_PACKAGES = "frontend-packages",
38
39
  KNOWLEDGE_BASES = "knowledge-bases",
39
40
  LAUNCH_WAITLIST = "launch-waitlist",
@@ -35,6 +35,7 @@ export var CollectionName;
35
35
  CollectionName["FEATURE_FLAGS"] = "feature-flags";
36
36
  CollectionName["JOB_CURSORS"] = "job-cursors";
37
37
  CollectionName["FRONTENDS"] = "frontends";
38
+ CollectionName["INFERRED_PHASE_TRANSITIONS"] = "inferred-phase-transitions";
38
39
  CollectionName["FRONTEND_PACKAGES"] = "frontend-packages";
39
40
  CollectionName["KNOWLEDGE_BASES"] = "knowledge-bases";
40
41
  CollectionName["LAUNCH_WAITLIST"] = "launch-waitlist";
@@ -952,6 +952,45 @@ export declare enum ProjectLifeStage {
952
952
  Deleting = "deleting",
953
953
  Deleted = "deleted"
954
954
  }
955
+ /**
956
+ * Where a project is in its life, as inferred from activity signals.
957
+ * Unlike ProjectLifeStage (resource state) this is a heuristic classification
958
+ * for reporting, and a deployed app can still be actively developed.
959
+ */
960
+ export declare enum InferredProjectPhase {
961
+ New = "new",
962
+ Building = "building",
963
+ LiveIterating = "live_iterating",
964
+ LiveStable = "live_stable",
965
+ Dormant = "dormant",
966
+ Abandoned = "abandoned"
967
+ }
968
+ /** Current inferred phase, stored on the project. Written by the backend only. */
969
+ export interface InferredPhaseState {
970
+ phase: InferredProjectPhase;
971
+ /** Model confidence in `phase`, from 0 to 1. */
972
+ confidence: number;
973
+ classifiedAt: Timestamp;
974
+ /** When the project was first inferred to be in `phase`. */
975
+ since: Timestamp;
976
+ /** Model that produced the inference. */
977
+ model: string;
978
+ }
979
+ /** Stored in projects/{projectId}/inferred-phase-transitions when the inferred phase changes. */
980
+ export interface InferredPhaseTransition {
981
+ from: InferredProjectPhase;
982
+ to: InferredProjectPhase;
983
+ classifiedAt: Timestamp;
984
+ /** Confidence in `from`, from the inference just before this one. */
985
+ fromConfidence: number;
986
+ /** Confidence in `to`, from the classification that triggered the transition. */
987
+ toConfidence: number;
988
+ model: string;
989
+ /** Probability per phase from the classification that triggered the transition. */
990
+ probabilities: Record<InferredProjectPhase, number>;
991
+ /** The signals the classification was based on. */
992
+ signals: JsonObject;
993
+ }
955
994
  export declare enum TaskStatus {
956
995
  TODO = "todo",
957
996
  IN_PROGRESS = "inprogress",
@@ -1038,7 +1077,8 @@ export declare enum ProjectExtension {
1038
1077
  NEON_DATABASE = "neon-database",
1039
1078
  STACK_AUTH = "stack-auth",
1040
1079
  MCP = "mcp",
1041
- POSTHOG = "posthog"
1080
+ POSTHOG = "posthog",
1081
+ OTEL = "otel"
1042
1082
  }
1043
1083
  export type ProjectExtensionConfig<T = object> = {
1044
1084
  name: ProjectExtension;
@@ -1146,6 +1186,25 @@ export interface PostHogExtensionConfig {
1146
1186
  posthogKey: string;
1147
1187
  apiPath: string;
1148
1188
  }
1189
+ /**
1190
+ * Config of the otel extension, which makes the app's backend emit traces for
1191
+ * inbound HTTP, outbound HTTP and database calls. Every field is optional and
1192
+ * the privacy-relevant ones default to the safe setting (off, except
1193
+ * scrubSecrets which defaults to on). Read by the devx backend
1194
+ * (backend/app/internal/telemetry.py); env vars of the same meaning override it.
1195
+ */
1196
+ export interface OtelExtensionConfig {
1197
+ /** Fraction of traces to keep, 0-1. Defaults to 1. */
1198
+ sampleRatio?: number;
1199
+ /** Record SQL arguments on database spans. Off by default. */
1200
+ captureDbParameters?: boolean;
1201
+ /** Record HTTP request/response headers (Authorization and cookies stay redacted). Off by default. */
1202
+ captureHeaders?: boolean;
1203
+ /** Record HTTP request/response bodies, truncated. Off by default. */
1204
+ captureBodies?: boolean;
1205
+ /** Redact API keys, bearer tokens and secret-looking query params. On by default. */
1206
+ scrubSecrets?: boolean;
1207
+ }
1149
1208
  export type ProjectExtensions = ProjectExtensionConfig[];
1150
1209
  export type ProjectExtensionMap = Record<string, ProjectExtensionConfig>;
1151
1210
  export interface BaseTheme {
@@ -1323,8 +1382,11 @@ export interface IntegrationTemplate {
1323
1382
  /**
1324
1383
  * Riff-oauth are integrations that use our provided Riff OAuth flow
1325
1384
  * Any integration using a custom flow should have usage descriubed in the guide field
1385
+ *
1386
+ * Sourced from IntegrationTemplateVersion (declared below) rather than re-declared, so this
1387
+ * legacy combined interface can't drift from the newer versioned one it's a precursor to.
1326
1388
  */
1327
- authStrategy: "riff-oauth" | "oauth" | "api-key" | "custom" | "egress-proxy";
1389
+ authStrategy: IntegrationTemplateVersion["authStrategy"];
1328
1390
  requiredCredentials: {
1329
1391
  key: string;
1330
1392
  optional?: boolean;
@@ -1388,7 +1450,7 @@ export interface IntegrationTemplateVersion {
1388
1450
  name: string;
1389
1451
  };
1390
1452
  optionalScopes?: IntegrationScope[];
1391
- authStrategy: "riff-oauth" | "oauth" | "api-key" | "custom" | "egress-proxy";
1453
+ authStrategy: "riff-oauth" | "oauth" | "oauth-m2m" | "api-key" | "custom" | "egress-proxy";
1392
1454
  requiredCredentials: {
1393
1455
  key: string;
1394
1456
  optional?: boolean;
@@ -1602,6 +1664,8 @@ export interface Project {
1602
1664
  buildingStage?: ProjectBuildStage;
1603
1665
  lifeStage: ProjectLifeStage;
1604
1666
  lifeStageUpdatedBy: PerformedBy;
1667
+ /** Heuristic phase deduced from signals, see InferredProjectPhase. */
1668
+ inferredPhase?: InferredPhaseState;
1605
1669
  theme?: ProjectTheme;
1606
1670
  guidelines?: ProjectGuidelines;
1607
1671
  aiGeneratedSummary?: string;
@@ -41,6 +41,20 @@ export var ProjectLifeStage;
41
41
  ProjectLifeStage["Deleting"] = "deleting";
42
42
  ProjectLifeStage["Deleted"] = "deleted";
43
43
  })(ProjectLifeStage || (ProjectLifeStage = {}));
44
+ /**
45
+ * Where a project is in its life, as inferred from activity signals.
46
+ * Unlike ProjectLifeStage (resource state) this is a heuristic classification
47
+ * for reporting, and a deployed app can still be actively developed.
48
+ */
49
+ export var InferredProjectPhase;
50
+ (function (InferredProjectPhase) {
51
+ InferredProjectPhase["New"] = "new";
52
+ InferredProjectPhase["Building"] = "building";
53
+ InferredProjectPhase["LiveIterating"] = "live_iterating";
54
+ InferredProjectPhase["LiveStable"] = "live_stable";
55
+ InferredProjectPhase["Dormant"] = "dormant";
56
+ InferredProjectPhase["Abandoned"] = "abandoned";
57
+ })(InferredProjectPhase || (InferredProjectPhase = {}));
44
58
  export var TaskStatus;
45
59
  (function (TaskStatus) {
46
60
  TaskStatus["TODO"] = "todo";
@@ -70,6 +84,7 @@ export var ProjectExtension;
70
84
  ProjectExtension["STACK_AUTH"] = "stack-auth";
71
85
  ProjectExtension["MCP"] = "mcp";
72
86
  ProjectExtension["POSTHOG"] = "posthog";
87
+ ProjectExtension["OTEL"] = "otel";
73
88
  })(ProjectExtension || (ProjectExtension = {}));
74
89
  /**
75
90
  * SpecialProjectType allows for classification of projects that behave differently from a general Riff project.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@databutton/firebase-types",
3
- "version": "1.184.0",
3
+ "version": "1.186.0",
4
4
  "main": "lib/types/published/index.js",
5
5
  "type": "module",
6
6
  "engines": {