@saasicat/spec 1.0.0-rc.4 → 1.0.0-rc.6
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.
package/admin-api.openapi.yaml
CHANGED
package/package.json
CHANGED
|
@@ -61,12 +61,29 @@ model Subscription {
|
|
|
61
61
|
|
|
62
62
|
trialEndsAt DateTime?
|
|
63
63
|
startedAt DateTime?
|
|
64
|
-
|
|
64
|
+
// WHEN the customer said they want out. Never refused: a cancellation is a
|
|
65
|
+
// declaration, and `canceledEffectiveAt` is when it lands. The two are
|
|
66
|
+
// separate because a subscription cancelled in month three of a year is
|
|
67
|
+
// still running, still billed and still entitled until the term ends —
|
|
68
|
+
// rendering it as "cancelled, gone" is how a tenant loses access they paid
|
|
69
|
+
// for. `SubscriptionBundle` already models it this way.
|
|
70
|
+
canceledAt DateTime?
|
|
71
|
+
canceledEffectiveAt DateTime?
|
|
65
72
|
|
|
66
73
|
// Renewal period (maintained by PlanVersionRenewalService).
|
|
67
74
|
currentPeriodStart DateTime?
|
|
68
75
|
currentPeriodEnd DateTime?
|
|
69
76
|
|
|
77
|
+
// The end of what was committed to, which is not always the end of the
|
|
78
|
+
// period. They coincide while nothing changes, and part company the moment
|
|
79
|
+
// a notice period is configured: a cancellation declared after the window
|
|
80
|
+
// closed lands at the end of the FOLLOWING period, and this is where that
|
|
81
|
+
// date is kept rather than recomputed by whoever asks.
|
|
82
|
+
//
|
|
83
|
+
// Null means no commitment — a trial, or a subscription that predates this
|
|
84
|
+
// field. Readers treat null as "the period end is the answer".
|
|
85
|
+
minimumTermUntil DateTime?
|
|
86
|
+
|
|
70
87
|
// Plan versioning — binds to a published PlanVersion.
|
|
71
88
|
// `pendingPlanVersion*` concern a version change within the
|
|
72
89
|
// same plan; `pendingPlan` the change to a different plan. Both
|
|
@@ -60,8 +60,10 @@ CREATE TABLE "subscriptions" (
|
|
|
60
60
|
"trialEndsAt" TIMESTAMP(3),
|
|
61
61
|
"startedAt" TIMESTAMP(3),
|
|
62
62
|
"canceledAt" TIMESTAMP(3),
|
|
63
|
+
"canceledEffectiveAt" TIMESTAMP(3),
|
|
63
64
|
"currentPeriodStart" TIMESTAMP(3),
|
|
64
65
|
"currentPeriodEnd" TIMESTAMP(3),
|
|
66
|
+
"minimumTermUntil" TIMESTAMP(3),
|
|
65
67
|
"planVersionId" TEXT NOT NULL,
|
|
66
68
|
"pendingPlanVersionId" TEXT,
|
|
67
69
|
"pendingPlanVersionEffectiveAt" TIMESTAMP(3),
|