@databutton/firebase-types 1.186.0 → 1.188.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.
@@ -1666,6 +1666,8 @@ export interface Project {
1666
1666
  lifeStageUpdatedBy: PerformedBy;
1667
1667
  /** Heuristic phase deduced from signals, see InferredProjectPhase. */
1668
1668
  inferredPhase?: InferredPhaseState;
1669
+ /** When the last attempt to infer the phase failed. Written by the backend only. */
1670
+ inferredPhaseFailedAt?: Timestamp;
1669
1671
  theme?: ProjectTheme;
1670
1672
  guidelines?: ProjectGuidelines;
1671
1673
  aiGeneratedSummary?: string;
@@ -3026,6 +3028,11 @@ export interface DisplayString {
3026
3028
  updatedBy: PerformedBy;
3027
3029
  updatedAt: Timestamp;
3028
3030
  }
3031
+ export interface ImprovementDiff {
3032
+ target: string;
3033
+ diff: string;
3034
+ rationale: string;
3035
+ }
3029
3036
  export interface AgentImprovement {
3030
3037
  createdBy: PerformedBy;
3031
3038
  createdAt: Timestamp;
@@ -3041,5 +3048,6 @@ export interface AgentImprovement {
3041
3048
  discussionSessionId: string | null;
3042
3049
  source: "agent_proactive" | "user_requested" | "user_manual" | null;
3043
3050
  userId: string | null;
3051
+ diffs?: ImprovementDiff[];
3044
3052
  }
3045
3053
  export {};
@@ -1,7 +1,7 @@
1
1
  import type { Timestamp } from "firebase/firestore";
2
2
  import type { RunMigrationsResponse } from "../db-api.js";
3
3
  import type { AccountRole, CreateNeonTransferErrorCode, CreateProjectErrorCode, CreateStackAuthTransferErrorCode, CreateTeamAccountErrorCode, MigrateToRiffErrorCode, NotificationType } from "./enums.js";
4
- import type { ApprovalLevel, Datafile, Dataframe, Job, Project, ProjectPermissionName, ProjectTemplate, ScheduleTarget, ScheduleWhen } from "./persisted.js";
4
+ import type { ApprovalLevel, Datafile, Dataframe, InferredProjectPhase, Job, Project, ProjectLifeStage, ProjectPermissionName, ProjectTemplate, ScheduleTarget, ScheduleWhen } from "./persisted.js";
5
5
  export type DeleteJob = Pick<Job, "markedForDeletionAt" | "markedForDeletionBy">;
6
6
  export type DeleteProject = Pick<Project, "markedForDeletionAt" | "markedForDeletionBy">;
7
7
  export type DeleteDataframe = Pick<Dataframe, "markedForDeletionAt" | "markedForDeletionBy">;
@@ -221,6 +221,38 @@ export type AdminAccountRow = {
221
221
  export type AdminSearchAccountsResult = {
222
222
  accounts: AdminAccountRow[];
223
223
  };
224
+ export type AdminListHibernationCandidatesPayload = {
225
+ phases?: InferredProjectPhase[];
226
+ owner?: string;
227
+ deployed?: boolean;
228
+ weeks?: number;
229
+ };
230
+ export type AdminHibernationCandidateRow = {
231
+ id: string;
232
+ name: string;
233
+ owner: string;
234
+ ownerName: string | null;
235
+ lifeStage: ProjectLifeStage;
236
+ phase: InferredProjectPhase;
237
+ phaseConfidence: number;
238
+ phaseSinceMs: number;
239
+ lastOpenedAtMs: number | null;
240
+ deployed: boolean;
241
+ creditCentsByWeek: Record<string, number[]>;
242
+ };
243
+ export type AdminListHibernationCandidatesResult = {
244
+ projects: AdminHibernationCandidateRow[];
245
+ };
246
+ export type AdminHibernateProjectsPayload = {
247
+ projectIds: string[];
248
+ };
249
+ export type AdminHibernateProjectsResult = {
250
+ requested: string[];
251
+ skipped: {
252
+ projectId: string;
253
+ reason: string;
254
+ }[];
255
+ };
224
256
  export type AdminCallableRequest = {
225
257
  action: "addCredits";
226
258
  payload: AdminAddCreditsPayload;
@@ -263,6 +295,12 @@ export type AdminCallableRequest = {
263
295
  } | {
264
296
  action: "bulkLinkAccountIntegration";
265
297
  payload: AdminBulkLinkAccountIntegrationPayload;
298
+ } | {
299
+ action: "listHibernationCandidates";
300
+ payload: AdminListHibernationCandidatesPayload;
301
+ } | {
302
+ action: "hibernateProjects";
303
+ payload: AdminHibernateProjectsPayload;
266
304
  };
267
305
  export type AdminCallableResponse = {
268
306
  action: "addCredits";
@@ -306,6 +344,12 @@ export type AdminCallableResponse = {
306
344
  } | {
307
345
  action: "bulkLinkAccountIntegration";
308
346
  result: AdminBulkLinkAccountIntegrationResult;
347
+ } | {
348
+ action: "listHibernationCandidates";
349
+ result: AdminListHibernationCandidatesResult;
350
+ } | {
351
+ action: "hibernateProjects";
352
+ result: AdminHibernateProjectsResult;
309
353
  };
310
354
  export type CreateBillingPortalSessionRequest = {
311
355
  returnUrl: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@databutton/firebase-types",
3
- "version": "1.186.0",
3
+ "version": "1.188.0",
4
4
  "main": "lib/types/published/index.js",
5
5
  "type": "module",
6
6
  "engines": {