@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 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, StripeSession,
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. A union rather than a nullable number, so "free" and
1775
- * "talk to us" are two different answers instead of two readings of the
1776
- * same `null`. Amounts are integer CENTS in USD, as the API's plan table
1777
- * states them and as Stripe's Prices are provisioned from it — the wire
1778
- * never carries a formatted price, because formatting is the reader's job.
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: 'free' | 'contact' | {
1787
+ readonly price: 'contact' | {
1781
1788
  readonly month: number;
1782
1789
  readonly year: number;
1783
1790
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shipstatic/types",
3
- "version": "2.14.0-beta.1",
3
+ "version": "2.15.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
@@ -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. A union rather than a nullable number, so "free" and
2639
- * "talk to us" are two different answers instead of two readings of the
2640
- * same `null`. Amounts are integer CENTS in USD, as the API's plan table
2641
- * states them and as Stripe's Prices are provisioned from it — the wire
2642
- * never carries a formatted price, because formatting is the reader's job.
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: 'free' | 'contact' | { readonly month: number; readonly year: number };
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).