@databutton/firebase-types 1.40.17 → 1.41.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.
@@ -70,23 +70,24 @@ export interface Profile {
70
70
  enabledFeatures: string[];
71
71
  plan?: Plan;
72
72
  }
73
- export type Plan = TeamPlan | PayAsYouGoPlan | FreePlan;
73
+ export type Plan = TeamPlan | PayAsYouGoPlan;
74
74
  interface PlanBase {
75
75
  lastChangedBy: PerformedBy;
76
+ currentPeriodStart: Timestamp | null;
77
+ currentPeriodEnd: Timestamp | null;
78
+ endedAt: Timestamp | null;
79
+ status: "active" | "canceled" | "trialing" | "past_due" | "unpaid" | "incomplete" | "incomplete_expired" | "paused" | null;
80
+ startDate: Timestamp | null;
76
81
  }
77
82
  export interface TeamPlan extends PlanBase {
78
83
  type: "team";
79
84
  }
80
- export interface FreePlan extends PlanBase {
81
- type: "free";
82
- }
83
85
  export interface PayAsYouGoPlan extends PlanBase {
84
86
  type: "pay-as-you-go";
85
87
  appExistenceHourPrice: number;
86
88
  creditsPerBillingPeriod: number;
87
89
  currency: "USD";
88
90
  billingPeriodInDays: number;
89
- billingPeriodStartDate: Timestamp;
90
91
  }
91
92
  export interface FeatureFlagBase {
92
93
  createdBy: PerformedBy;
@@ -819,4 +820,12 @@ export interface AppHourUsageRecord extends UsageRecordBase {
819
820
  projectIds: string[];
820
821
  }
821
822
  export type UsageRecord = AppHourUsageRecord;
823
+ export interface Customer {
824
+ createdBy: PerformedBy;
825
+ lastUpdatedBy: PerformedBy;
826
+ type: "stripe";
827
+ stripeCustomerId: string;
828
+ userId: string;
829
+ plan: Plan | null;
830
+ }
822
831
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@databutton/firebase-types",
3
- "version": "1.40.17",
3
+ "version": "1.41.0",
4
4
  "main": "./lib/index.js",
5
5
  "type": "module",
6
6
  "engines": {
@@ -64,6 +64,7 @@
64
64
  "ky-universal": "0.11.0",
65
65
  "lodash": "4.17.21",
66
66
  "nanoid": "4.0.2",
67
+ "stripe": "^12.8.0",
67
68
  "uuid": "8.3.2"
68
69
  },
69
70
  "devDependencies": {