@shipstatic/ship 3.1.0 → 3.2.0

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.cts CHANGED
@@ -672,9 +672,9 @@ interface TokenDeleteResponse {
672
672
  * Price it is on. They form a ladder: a dearer tier is a superset of the one
673
673
  * below it, and the API says which is next in {@link Account.upgrade}.
674
674
  * - **Granted** — `scale`, `sponsored`. Paid plans the operator confers by
675
- * hand; no Stripe subscription, no Checkout, no Stripe object at all. These
676
- * and `free` are the only plans an operator can set; a billed plan is only
677
- * ever Stripe's to confer.
675
+ * hand, never reached through Checkout: no Stripe subscription and no
676
+ * Stripe object behind them. These and `free` are the only plans an
677
+ * operator can set; a billed plan is only ever Stripe's to confer.
678
678
  *
679
679
  * The numbers each plan confers — caps, sizes — are POLICY and are delivered
680
680
  * by the API (`GET /plans`, `GET /account`, `GET /limits`), never published
@@ -780,12 +780,10 @@ interface Account {
780
780
  /** User profile picture URL, null if not set */
781
781
  readonly picture: string | null;
782
782
  /**
783
- * The tier the account stands at. A sponsored account is Pro that nobody
784
- * bills, so it reports `pro` here with {@link billed} false; the grant
785
- * itself is the operator's fact, seen on the operator's surfaces and never
786
- * here. A console therefore treats a sponsored account exactly as a Pro one
787
- * everywhere, and the one difference it can see is the one that is real:
788
- * there is no Subscription.
783
+ * The plan the account is on, by its own name. A granted plan names
784
+ * itself: a sponsored account reports `sponsored` and a scale one `scale`,
785
+ * each with {@link billed} false. So a billed plan's name is a promise:
786
+ * `pro` or `team` here always means a Subscription bills the account.
789
787
  */
790
788
  readonly plan: AccountPlanType;
791
789
  /**
@@ -851,11 +849,12 @@ interface Account {
851
849
  */
852
850
  readonly billed: boolean;
853
851
  /**
854
- * The next plan up the ladder this account could move to, or `null` when
855
- * there is none: the top billed tier, a plan sold by conversation, and any
856
- * plan not on the menu answer `null`. One server-side fact so that no surface derives "can this account
857
- * upgrade, and to what" from the menu — a grandfathered row has no menu
858
- * price to compare, and a conversation plan must never be sent to Checkout.
852
+ * The next plan up this account could move to: the cheapest sold plan that
853
+ * offers more than its own, or `null` when none does (the top billed tier)
854
+ * or the account cannot buy (a plan sold by conversation). One server-side
855
+ * fact so that no surface derives "can this account upgrade, and to what"
856
+ * from the menu — a grandfathered row has no menu price to compare, and a
857
+ * conversation plan must never be sent to Checkout.
859
858
  */
860
859
  readonly upgrade: AccountPlanType | null;
861
860
  /**
@@ -2364,6 +2363,13 @@ interface BillingPortalSession {
2364
2363
  */
2365
2364
  interface BillingSyncResponse {
2366
2365
  readonly plan: AccountPlanType;
2366
+ /**
2367
+ * Does Stripe bill that plan? The same fact as {@link Account.billed}, for
2368
+ * the plan named beside it. A purchase lands on a billed plan, so this is
2369
+ * what tells a Checkout arrival that the payment has landed: a plan that is
2370
+ * paid but granted (sponsored) is where the buyer stood before paying.
2371
+ */
2372
+ readonly billed: boolean;
2367
2373
  }
2368
2374
  /**
2369
2375
  * All activity event types logged in the system.
package/dist/index.d.ts CHANGED
@@ -672,9 +672,9 @@ interface TokenDeleteResponse {
672
672
  * Price it is on. They form a ladder: a dearer tier is a superset of the one
673
673
  * below it, and the API says which is next in {@link Account.upgrade}.
674
674
  * - **Granted** — `scale`, `sponsored`. Paid plans the operator confers by
675
- * hand; no Stripe subscription, no Checkout, no Stripe object at all. These
676
- * and `free` are the only plans an operator can set; a billed plan is only
677
- * ever Stripe's to confer.
675
+ * hand, never reached through Checkout: no Stripe subscription and no
676
+ * Stripe object behind them. These and `free` are the only plans an
677
+ * operator can set; a billed plan is only ever Stripe's to confer.
678
678
  *
679
679
  * The numbers each plan confers — caps, sizes — are POLICY and are delivered
680
680
  * by the API (`GET /plans`, `GET /account`, `GET /limits`), never published
@@ -780,12 +780,10 @@ interface Account {
780
780
  /** User profile picture URL, null if not set */
781
781
  readonly picture: string | null;
782
782
  /**
783
- * The tier the account stands at. A sponsored account is Pro that nobody
784
- * bills, so it reports `pro` here with {@link billed} false; the grant
785
- * itself is the operator's fact, seen on the operator's surfaces and never
786
- * here. A console therefore treats a sponsored account exactly as a Pro one
787
- * everywhere, and the one difference it can see is the one that is real:
788
- * there is no Subscription.
783
+ * The plan the account is on, by its own name. A granted plan names
784
+ * itself: a sponsored account reports `sponsored` and a scale one `scale`,
785
+ * each with {@link billed} false. So a billed plan's name is a promise:
786
+ * `pro` or `team` here always means a Subscription bills the account.
789
787
  */
790
788
  readonly plan: AccountPlanType;
791
789
  /**
@@ -851,11 +849,12 @@ interface Account {
851
849
  */
852
850
  readonly billed: boolean;
853
851
  /**
854
- * The next plan up the ladder this account could move to, or `null` when
855
- * there is none: the top billed tier, a plan sold by conversation, and any
856
- * plan not on the menu answer `null`. One server-side fact so that no surface derives "can this account
857
- * upgrade, and to what" from the menu — a grandfathered row has no menu
858
- * price to compare, and a conversation plan must never be sent to Checkout.
852
+ * The next plan up this account could move to: the cheapest sold plan that
853
+ * offers more than its own, or `null` when none does (the top billed tier)
854
+ * or the account cannot buy (a plan sold by conversation). One server-side
855
+ * fact so that no surface derives "can this account upgrade, and to what"
856
+ * from the menu — a grandfathered row has no menu price to compare, and a
857
+ * conversation plan must never be sent to Checkout.
859
858
  */
860
859
  readonly upgrade: AccountPlanType | null;
861
860
  /**
@@ -2364,6 +2363,13 @@ interface BillingPortalSession {
2364
2363
  */
2365
2364
  interface BillingSyncResponse {
2366
2365
  readonly plan: AccountPlanType;
2366
+ /**
2367
+ * Does Stripe bill that plan? The same fact as {@link Account.billed}, for
2368
+ * the plan named beside it. A purchase lands on a billed plan, so this is
2369
+ * what tells a Checkout arrival that the payment has landed: a plan that is
2370
+ * paid but granted (sponsored) is where the buyer stood before paying.
2371
+ */
2372
+ readonly billed: boolean;
2367
2373
  }
2368
2374
  /**
2369
2375
  * All activity event types logged in the system.