@shipstatic/types 2.17.0-beta.9 → 2.18.0-beta.1

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/dist/index.d.ts CHANGED
@@ -1899,10 +1899,16 @@ export interface PlanChangeRequest {
1899
1899
  readonly interval: BillingInterval;
1900
1900
  }
1901
1901
  /**
1902
- * The pending plan change — a Stripe Subscription Schedule the platform
1903
- * minted, mirrored onto the account. `at` is when it applies (the current
1904
- * period's end, Unix seconds). Reversible until then: `DELETE
1905
- * /billing/change` releases it.
1902
+ * The pending plan change — a Stripe Subscription Schedule, mirrored onto the
1903
+ * account. `at` is when it applies (the current period's end, Unix seconds).
1904
+ *
1905
+ * WHO minted the schedule is deliberately not part of this shape, and both
1906
+ * kinds mirror here identically: Stripe mints one when a customer confirms a
1907
+ * cadence downgrade on its own hosted page, and the platform mints one for a
1908
+ * cheaper TIER, the single move Stripe's Customer Portal cannot express.
1909
+ *
1910
+ * Reversible until it applies, and `DELETE /billing/change` is the only way:
1911
+ * Stripe's Portal displays a pending change but offers no control to undo it.
1906
1912
  */
1907
1913
  export interface ScheduledChange {
1908
1914
  readonly plan: AccountPlanType;
@@ -1915,9 +1921,15 @@ export interface ScheduledChange {
1915
1921
  * compile, so "which door was taken" is structural rather than prose.
1916
1922
  *
1917
1923
  * `url` means GO: a Stripe page (Checkout, or the Portal's confirmation page)
1918
- * finishes the change and the browser must be redirected to it. `scheduled`
1919
- * means DONE: the downgrade is booked for period end, nothing to visit, and
1920
- * the account's `scheduled` field now carries it.
1924
+ * finishes the change and the browser must be redirected to it. A `url` does
1925
+ * NOT imply money moves on the confirmation page Stripe decides whether to
1926
+ * charge now or defer the change to period end, and says which. `scheduled`
1927
+ * means DONE: the change is booked for period end by the platform itself,
1928
+ * nothing to visit, and the account's `scheduled` field now carries it.
1929
+ *
1930
+ * A client branches on the SHAPE and holds no copy of which move takes which
1931
+ * door — which is what let the server move that boundary without a wire
1932
+ * change (2026-08-25).
1921
1933
  */
1922
1934
  export type PlanChangeResponse =
1923
1935
  /** GO: a Stripe page finishes the change. Absolute URL, single use, short-lived. */
@@ -1954,12 +1966,13 @@ export interface BillingSyncResponse {
1954
1966
  * All activity event types logged in the system.
1955
1967
  * Uses dot notation consistently: {resource}.{action}
1956
1968
  *
1957
- * Retention: activity rows are permanent the account's own history and
1958
- * the platform's audit ledgers are one table, kept for the life of the
1959
- * account (deletion removes them). Only the personal payload is
1960
- * time-bounded: past 90 days each row sheds its IP.
1969
+ * Retention: activity rows age out. An account keeps a recent window and,
1970
+ * beneath it, never fewer than its most recent handful so a dormant
1971
+ * account's history is never empty and a row that outlives the window
1972
+ * keeps no IP address. Activity from deploys made without an account ages
1973
+ * out sooner, and deleting an account removes its rows outright, at any age.
1961
1974
  */
1962
- export type ActivityEvent = 'account.create' | 'account.delete' | 'account.key.generate' | 'account.plan.transition' | 'deployment.create' | 'deployment.update' | 'deployment.delete' | 'deployment.claim' | 'deployment.flagged' | 'deployment.open' | 'domain.create' | 'domain.update' | 'domain.delete' | 'domain.verify' | 'token.create' | 'token.consume' | 'token.delete' | 'admin.account.plan.update' | 'admin.account.suspended.update' | 'admin.account.ref.update' | 'admin.account.labels.update' | 'admin.deployment.delete' | 'admin.domain.delete' | 'admin.impersonate';
1975
+ export type ActivityEvent = 'account.create' | 'account.delete' | 'account.key.generate' | 'account.plan.transition' | 'deployment.create' | 'deployment.update' | 'deployment.delete' | 'deployment.claim' | 'deployment.flagged' | 'deployment.open' | 'domain.create' | 'domain.update' | 'domain.delete' | 'domain.verify' | 'token.create' | 'token.consume' | 'token.delete' | 'checkout.open' | 'admin.account.plan.update' | 'admin.account.suspended.update' | 'admin.account.ref.update' | 'admin.account.labels.update' | 'admin.deployment.delete' | 'admin.domain.delete' | 'admin.impersonate';
1963
1976
  /**
1964
1977
  * Activity events visible to users in the dashboard
1965
1978
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shipstatic/types",
3
- "version": "2.17.0-beta.9",
3
+ "version": "2.18.0-beta.1",
4
4
  "description": "Shared types for ShipStatic platform",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
package/src/index.ts CHANGED
@@ -2763,10 +2763,16 @@ export interface PlanChangeRequest {
2763
2763
  }
2764
2764
 
2765
2765
  /**
2766
- * The pending plan change — a Stripe Subscription Schedule the platform
2767
- * minted, mirrored onto the account. `at` is when it applies (the current
2768
- * period's end, Unix seconds). Reversible until then: `DELETE
2769
- * /billing/change` releases it.
2766
+ * The pending plan change — a Stripe Subscription Schedule, mirrored onto the
2767
+ * account. `at` is when it applies (the current period's end, Unix seconds).
2768
+ *
2769
+ * WHO minted the schedule is deliberately not part of this shape, and both
2770
+ * kinds mirror here identically: Stripe mints one when a customer confirms a
2771
+ * cadence downgrade on its own hosted page, and the platform mints one for a
2772
+ * cheaper TIER, the single move Stripe's Customer Portal cannot express.
2773
+ *
2774
+ * Reversible until it applies, and `DELETE /billing/change` is the only way:
2775
+ * Stripe's Portal displays a pending change but offers no control to undo it.
2770
2776
  */
2771
2777
  export interface ScheduledChange {
2772
2778
  readonly plan: AccountPlanType;
@@ -2780,9 +2786,15 @@ export interface ScheduledChange {
2780
2786
  * compile, so "which door was taken" is structural rather than prose.
2781
2787
  *
2782
2788
  * `url` means GO: a Stripe page (Checkout, or the Portal's confirmation page)
2783
- * finishes the change and the browser must be redirected to it. `scheduled`
2784
- * means DONE: the downgrade is booked for period end, nothing to visit, and
2785
- * the account's `scheduled` field now carries it.
2789
+ * finishes the change and the browser must be redirected to it. A `url` does
2790
+ * NOT imply money moves on the confirmation page Stripe decides whether to
2791
+ * charge now or defer the change to period end, and says which. `scheduled`
2792
+ * means DONE: the change is booked for period end by the platform itself,
2793
+ * nothing to visit, and the account's `scheduled` field now carries it.
2794
+ *
2795
+ * A client branches on the SHAPE and holds no copy of which move takes which
2796
+ * door — which is what let the server move that boundary without a wire
2797
+ * change (2026-08-25).
2786
2798
  */
2787
2799
  export type PlanChangeResponse =
2788
2800
  /** GO: a Stripe page finishes the change. Absolute URL, single use, short-lived. */
@@ -2820,10 +2832,11 @@ export interface BillingSyncResponse {
2820
2832
  * All activity event types logged in the system.
2821
2833
  * Uses dot notation consistently: {resource}.{action}
2822
2834
  *
2823
- * Retention: activity rows are permanent the account's own history and
2824
- * the platform's audit ledgers are one table, kept for the life of the
2825
- * account (deletion removes them). Only the personal payload is
2826
- * time-bounded: past 90 days each row sheds its IP.
2835
+ * Retention: activity rows age out. An account keeps a recent window and,
2836
+ * beneath it, never fewer than its most recent handful so a dormant
2837
+ * account's history is never empty and a row that outlives the window
2838
+ * keeps no IP address. Activity from deploys made without an account ages
2839
+ * out sooner, and deleting an account removes its rows outright, at any age.
2827
2840
  */
2828
2841
  export type ActivityEvent =
2829
2842
  // Account events
@@ -2847,6 +2860,10 @@ export type ActivityEvent =
2847
2860
  | 'token.create'
2848
2861
  | 'token.consume'
2849
2862
  | 'token.delete'
2863
+ // Billing events (internal: the operator's stream, never the customer's
2864
+ // feed — the feed's copy of this fact is the `account.plan.transition` it
2865
+ // may become)
2866
+ | 'checkout.open'
2850
2867
  // Admin events (not user-visible)
2851
2868
  | 'admin.account.plan.update'
2852
2869
  | 'admin.account.suspended.update'
@@ -2856,10 +2873,17 @@ export type ActivityEvent =
2856
2873
  | 'admin.domain.delete'
2857
2874
  | 'admin.impersonate';
2858
2875
 
2859
- // A subscription's own history is not logged here. What a plan change MEANS
2860
- // is recorded once, as `account.plan.transition`; everything behind it
2861
- // (invoices, refunds, disputes, retries) belongs to Stripe, which owns the
2862
- // record and shows it to the customer in the Customer Portal.
2876
+ // The billing boundary: the stream records the PLATFORM'S own acts, and
2877
+ // Stripe records the subscription's life. `checkout.open` is ours — the
2878
+ // platform mints the Session, and it is the one billing act that exists
2879
+ // before Stripe holds anything. `account.plan.transition` is ours what a
2880
+ // change MEANS, entitlement crossing our threshold. Everything between those
2881
+ // two edges (invoices, refunds, disputes, retries, scheduled changes) is the
2882
+ // subscription's own history, which belongs to Stripe as merchant of record
2883
+ // and is shown to the customer in the Customer Portal; none of it is
2884
+ // restated here. Refusals write no history either: the stream records what
2885
+ // happened to resources, never what was declined — a detection
2886
+ // (`deployment.flagged`) is a fact discovered about content, not a refusal.
2863
2887
 
2864
2888
  /**
2865
2889
  * Activity events visible to users in the dashboard