@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 +25 -12
- package/package.json +1 -1
- package/src/index.ts +39 -15
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
|
|
1903
|
-
*
|
|
1904
|
-
*
|
|
1905
|
-
*
|
|
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. `
|
|
1919
|
-
*
|
|
1920
|
-
* the
|
|
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
|
|
1958
|
-
*
|
|
1959
|
-
* account
|
|
1960
|
-
*
|
|
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
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
|
|
2767
|
-
*
|
|
2768
|
-
*
|
|
2769
|
-
*
|
|
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. `
|
|
2784
|
-
*
|
|
2785
|
-
* the
|
|
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
|
|
2824
|
-
*
|
|
2825
|
-
* account
|
|
2826
|
-
*
|
|
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
|
-
//
|
|
2860
|
-
//
|
|
2861
|
-
//
|
|
2862
|
-
//
|
|
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
|