@shipstatic/types 2.14.0-beta.1 → 2.15.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/README.md +2 -1
- package/dist/index.d.ts +13 -6
- package/package.json +1 -1
- package/src/index.ts +13 -6
package/README.md
CHANGED
|
@@ -102,7 +102,8 @@ import {
|
|
|
102
102
|
import type {
|
|
103
103
|
PlatformLimits, // per-request size limits from /limits (file size, file count, total size)
|
|
104
104
|
Plan, PlansResponse, // the public plan menu from /plans
|
|
105
|
-
BillingInterval,
|
|
105
|
+
BillingInterval, // 'month' | 'year' — Stripe's own recurring interval
|
|
106
|
+
CheckoutSession, BillingPortalSession, // the two hosted Stripe pages
|
|
106
107
|
ActivityListResponse,
|
|
107
108
|
PingResponse,
|
|
108
109
|
} from '@shipstatic/types';
|
package/dist/index.d.ts
CHANGED
|
@@ -1771,13 +1771,20 @@ export interface Plan {
|
|
|
1771
1771
|
/** Display name, as the marketing site and the console should print it. */
|
|
1772
1772
|
readonly name: string;
|
|
1773
1773
|
/**
|
|
1774
|
-
* What it costs
|
|
1775
|
-
*
|
|
1776
|
-
*
|
|
1777
|
-
*
|
|
1778
|
-
*
|
|
1774
|
+
* What it costs, per interval — integer CENTS in USD, as the API's plan
|
|
1775
|
+
* table states them and as Stripe's Prices are provisioned from it. The wire
|
|
1776
|
+
* never carries a formatted price: formatting is the reader's job.
|
|
1777
|
+
*
|
|
1778
|
+
* **A free plan costs `{ month: 0, year: 0 }`, not a sentinel.** Free IS
|
|
1779
|
+
* zero, so it is a number like any other and every reader formats it with
|
|
1780
|
+
* the same call; a `'free'` member bought one thing — a branch in each
|
|
1781
|
+
* consumer that mapped it straight back to `$0`.
|
|
1782
|
+
*
|
|
1783
|
+
* `'contact'` stays, and the asymmetry is the point: "not sold at a list
|
|
1784
|
+
* price" is genuinely a different KIND of answer, not a different number, so
|
|
1785
|
+
* it is a different shape. Two shapes, and each earns its own.
|
|
1779
1786
|
*/
|
|
1780
|
-
readonly price: '
|
|
1787
|
+
readonly price: 'contact' | {
|
|
1781
1788
|
readonly month: number;
|
|
1782
1789
|
readonly year: number;
|
|
1783
1790
|
};
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -2635,13 +2635,20 @@ export interface Plan {
|
|
|
2635
2635
|
/** Display name, as the marketing site and the console should print it. */
|
|
2636
2636
|
readonly name: string;
|
|
2637
2637
|
/**
|
|
2638
|
-
* What it costs
|
|
2639
|
-
*
|
|
2640
|
-
*
|
|
2641
|
-
*
|
|
2642
|
-
*
|
|
2638
|
+
* What it costs, per interval — integer CENTS in USD, as the API's plan
|
|
2639
|
+
* table states them and as Stripe's Prices are provisioned from it. The wire
|
|
2640
|
+
* never carries a formatted price: formatting is the reader's job.
|
|
2641
|
+
*
|
|
2642
|
+
* **A free plan costs `{ month: 0, year: 0 }`, not a sentinel.** Free IS
|
|
2643
|
+
* zero, so it is a number like any other and every reader formats it with
|
|
2644
|
+
* the same call; a `'free'` member bought one thing — a branch in each
|
|
2645
|
+
* consumer that mapped it straight back to `$0`.
|
|
2646
|
+
*
|
|
2647
|
+
* `'contact'` stays, and the asymmetry is the point: "not sold at a list
|
|
2648
|
+
* price" is genuinely a different KIND of answer, not a different number, so
|
|
2649
|
+
* it is a different shape. Two shapes, and each earns its own.
|
|
2643
2650
|
*/
|
|
2644
|
-
readonly price: '
|
|
2651
|
+
readonly price: 'contact' | { readonly month: number; readonly year: number };
|
|
2645
2652
|
/**
|
|
2646
2653
|
* The caps this plan publishes, or `null` where the menu deliberately says
|
|
2647
2654
|
* nothing (a plan sold by conversation publishes no numbers).
|