@databutton/firebase-types 1.18.5 → 1.19.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.
@@ -216,7 +216,7 @@ export interface PageRef {
216
216
  sequence: number;
217
217
  hidden: boolean;
218
218
  }
219
- export interface MultipageAppDeployment {
219
+ export interface MultipageAppDeploymentDeprecated {
220
220
  createdBy: PerformedBy;
221
221
  deployFinishedAt: Timestamp | null;
222
222
  deployFailedAt: Timestamp | null;
@@ -378,6 +378,8 @@ export interface Project {
378
378
  deployCurrentDeployedId?: string;
379
379
  deployLastDeploymentSuccess?: boolean;
380
380
  region?: string;
381
+ currentDeploymentId?: string | null;
382
+ currentBuildId?: string | null;
381
383
  }
382
384
  export interface ProjectTemplateApp {
383
385
  name: string;
@@ -495,7 +497,7 @@ export type Pulse = {
495
497
  eventName: string;
496
498
  properties: Record<string, string | number | boolean | null>;
497
499
  };
498
- export interface ModuleSnapshot {
500
+ export interface ModuleSnapshotDeprecated {
499
501
  id: string;
500
502
  codeBlockId: string;
501
503
  version: string;
@@ -509,27 +511,33 @@ export interface ComponentSnapshot {
509
511
  name: string;
510
512
  codeHash: number;
511
513
  }
512
- export interface PageSnapshot extends ComponentSnapshot {
514
+ export interface PageSnapshotDeprecated extends ComponentSnapshot {
513
515
  hidden: boolean;
514
516
  sequence: number;
515
517
  }
516
- export interface JobSnapshot extends ComponentSnapshot {
518
+ export interface JobSnapshotDeprecated extends ComponentSnapshot {
517
519
  requirementsHash: string;
518
- modules: ModuleSnapshot[];
520
+ modules: ModuleSnapshotDeprecated[];
519
521
  }
520
- export interface MultipageAppSnapshot {
522
+ export interface ViewSnapshotDeprecated extends ComponentSnapshot {
523
+ requirementsHash: string;
524
+ modules: ModuleSnapshotDeprecated[];
525
+ }
526
+ export interface MultipageAppSnapshotDeprecated {
521
527
  id: string;
522
528
  requirementsHash: string;
523
- modules: ModuleSnapshot[];
524
- pages: PageSnapshot[];
529
+ modules: ModuleSnapshotDeprecated[];
530
+ pages: PageSnapshotDeprecated[];
525
531
  }
526
532
  export interface AppConfigSnapshot {
527
533
  deploymentId: string | null;
528
534
  createdBy: PerformedBy;
529
- multipageApps: MultipageAppSnapshot[];
530
- jobs: JobSnapshot[];
535
+ multipageApps: MultipageAppSnapshotDeprecated[];
536
+ jobs: JobSnapshotDeprecated[];
537
+ views: ViewSnapshotDeprecated[];
531
538
  }
532
539
  export type RequirementsV2 = {
540
+ requirementsId: string;
533
541
  baseRequirementsTxt: string;
534
542
  userRequirementsTxt: string;
535
543
  pyprojectToml?: string | null;
@@ -555,4 +563,54 @@ export type Build = {
555
563
  export type BuildRequest = Omit<Build, "resolveFailedAt" | "resolveSucceededAt" | "buildStartedAt" | "buildSucceededAt" | "buildFailedAt"> & {
556
564
  deployToDevx: boolean;
557
565
  };
566
+ type WithDocRef<T> = T & {
567
+ id: string;
568
+ ref: string;
569
+ };
570
+ export type ComponentSnapshotBase = {
571
+ component: WithDocRef<{
572
+ name: string;
573
+ type: "page" | "job" | "view" | "module";
574
+ }>;
575
+ codeBlock: WithDocRef<{
576
+ version: WithDocRef<{
577
+ createdAt: Timestamp;
578
+ name: string;
579
+ hash: number;
580
+ }>;
581
+ }>;
582
+ };
583
+ export type ModuleSnapshot<T = ComponentSnapshotBase> = T;
584
+ export type ComponentDependenciesSnapshot<T = ComponentSnapshotBase> = {
585
+ modules: ModuleSnapshot<T>[];
586
+ venv: {
587
+ hash: string;
588
+ };
589
+ };
590
+ export type PageSnapshot<T = ComponentSnapshotBase> = T & {
591
+ hidden: boolean;
592
+ sequence: number;
593
+ slug: string;
594
+ };
595
+ export type MultipageAppSnapshot<T = ComponentSnapshotBase> = {
596
+ id: "main";
597
+ pages: PageSnapshot<T>[];
598
+ dependencies: ComponentDependenciesSnapshot<T>;
599
+ };
600
+ export type ViewSnapshot<T = ComponentSnapshotBase> = T & {
601
+ dependencies: ComponentDependenciesSnapshot<T>;
602
+ };
603
+ export type JobSnapshot<T = ComponentSnapshotBase> = T & {
604
+ dependencies: ComponentDependenciesSnapshot<T>;
605
+ };
606
+ export type ProjectDeploymentBase<T = ComponentSnapshotBase> = {
607
+ deployedBy: PerformedBy;
608
+ multipageApps: MultipageAppSnapshot<T>[];
609
+ views: ViewSnapshot<T>[];
610
+ jobs: JobSnapshot<T>[];
611
+ build: {
612
+ id: string;
613
+ };
614
+ };
615
+ export type ProjectDeployment = ProjectDeploymentBase;
558
616
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@databutton/firebase-types",
3
- "version": "1.18.5",
3
+ "version": "1.19.0",
4
4
  "main": "./lib/index.js",
5
5
  "type": "module",
6
6
  "engines": {