autumn-js 1.2.13 → 1.2.15

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.
Files changed (126) hide show
  1. package/dist/backend/adapters/express.js +623 -108
  2. package/dist/backend/adapters/express.mjs +8 -8
  3. package/dist/backend/adapters/fetch.js +623 -108
  4. package/dist/backend/adapters/fetch.mjs +8 -8
  5. package/dist/backend/adapters/hono.js +623 -108
  6. package/dist/backend/adapters/hono.mjs +8 -8
  7. package/dist/backend/adapters/index.js +623 -108
  8. package/dist/backend/adapters/index.mjs +11 -11
  9. package/dist/backend/adapters/next.js +623 -108
  10. package/dist/backend/adapters/next.mjs +8 -8
  11. package/dist/backend/{chunk-DNNJOZAT.mjs → chunk-BQVZ6GCE.mjs} +1 -1
  12. package/dist/backend/{chunk-YSQQKZBU.mjs → chunk-IEOQUAJY.mjs} +7 -7
  13. package/dist/backend/{chunk-MANTLPDT.mjs → chunk-IQS3LQVP.mjs} +36 -8
  14. package/dist/backend/{chunk-7BVATYGA.mjs → chunk-NDB3VKT4.mjs} +1 -1
  15. package/dist/backend/{chunk-RPH5L44S.mjs → chunk-NRTK5YZK.mjs} +1 -1
  16. package/dist/backend/{chunk-T42RZEUZ.mjs → chunk-OXCQHLZX.mjs} +587 -100
  17. package/dist/backend/{chunk-EJGHP7KT.mjs → chunk-RSIOYTRW.mjs} +5 -5
  18. package/dist/backend/{chunk-OUDB34Y7.mjs → chunk-X7LDYBKC.mjs} +1 -1
  19. package/dist/backend/core/handlers/coreHandler.d.mts +1 -1
  20. package/dist/backend/core/handlers/coreHandler.d.ts +1 -1
  21. package/dist/backend/core/handlers/coreHandler.js +623 -108
  22. package/dist/backend/core/handlers/coreHandler.mjs +6 -6
  23. package/dist/backend/core/handlers/executeRoute.d.mts +1 -1
  24. package/dist/backend/core/handlers/executeRoute.d.ts +1 -1
  25. package/dist/backend/core/handlers/executeRoute.mjs +3 -3
  26. package/dist/backend/core/handlers/handleRouteByName.js +623 -108
  27. package/dist/backend/core/handlers/handleRouteByName.mjs +6 -6
  28. package/dist/backend/core/handlers/index.d.mts +1 -1
  29. package/dist/backend/core/handlers/index.d.ts +1 -1
  30. package/dist/backend/core/handlers/index.js +623 -108
  31. package/dist/backend/core/handlers/index.mjs +10 -10
  32. package/dist/backend/core/index.d.mts +1 -1
  33. package/dist/backend/core/index.d.ts +1 -1
  34. package/dist/backend/core/index.js +623 -108
  35. package/dist/backend/core/index.mjs +7 -7
  36. package/dist/backend/core/routes/index.d.mts +1 -1
  37. package/dist/backend/core/routes/index.d.ts +1 -1
  38. package/dist/backend/core/routes/index.js +36 -8
  39. package/dist/backend/core/routes/index.mjs +1 -1
  40. package/dist/backend/core/routes/routeBuilder.d.mts +1 -1
  41. package/dist/backend/core/routes/routeBuilder.d.ts +1 -1
  42. package/dist/backend/core/routes/routeConfigs.d.mts +1 -1
  43. package/dist/backend/core/routes/routeConfigs.d.ts +1 -1
  44. package/dist/backend/core/routes/routeConfigs.js +36 -8
  45. package/dist/backend/core/routes/routeConfigs.mjs +1 -1
  46. package/dist/backend/core/types/handlerTypes.d.mts +1 -1
  47. package/dist/backend/core/types/handlerTypes.d.ts +1 -1
  48. package/dist/backend/core/types/index.d.mts +1 -1
  49. package/dist/backend/core/types/index.d.ts +1 -1
  50. package/dist/backend/core/types/routeTypes.d.mts +1 -1
  51. package/dist/backend/core/types/routeTypes.d.ts +1 -1
  52. package/dist/backend/index.d.mts +2 -2
  53. package/dist/backend/index.d.ts +2 -2
  54. package/dist/backend/index.js +623 -108
  55. package/dist/backend/index.mjs +7 -7
  56. package/dist/backend/{routeTypes-DVwngaBn.d.mts → routeTypes-CIspXIZ4.d.mts} +841 -169
  57. package/dist/backend/{routeTypes-B94_Mq2J.d.ts → routeTypes-COwIJFNS.d.ts} +841 -169
  58. package/dist/better-auth/{chunk-4OWECHZC.mjs → chunk-L6XX4ONM.mjs} +1 -1
  59. package/dist/better-auth/{chunk-ZZGFPTHO.mjs → chunk-QT6R3AXQ.mjs} +588 -101
  60. package/dist/better-auth/{chunk-JIFD4TSN.mjs → chunk-ZO3KGM5W.mjs} +36 -8
  61. package/dist/better-auth/client.d.mts +2 -4
  62. package/dist/better-auth/client.d.ts +2 -4
  63. package/dist/better-auth/{createAutumnEndpoint-CvXRCg-M.d.ts → createAutumnEndpoint-Clm1sxhQ.d.mts} +4 -8
  64. package/dist/better-auth/{createAutumnEndpoint-CvXRCg-M.d.mts → createAutumnEndpoint-Clm1sxhQ.d.ts} +4 -8
  65. package/dist/better-auth/index.d.mts +2 -4
  66. package/dist/better-auth/index.d.ts +2 -4
  67. package/dist/better-auth/index.js +623 -108
  68. package/dist/better-auth/index.mjs +3 -3
  69. package/dist/better-auth/utils/createAutumnEndpoint.d.mts +2 -4
  70. package/dist/better-auth/utils/createAutumnEndpoint.d.ts +2 -4
  71. package/dist/better-auth/utils/createAutumnEndpoint.js +36 -8
  72. package/dist/better-auth/utils/createAutumnEndpoint.mjs +2 -2
  73. package/dist/better-auth/utils/handleBetterAuthRoute.d.mts +2 -4
  74. package/dist/better-auth/utils/handleBetterAuthRoute.d.ts +2 -4
  75. package/dist/better-auth/utils/handleBetterAuthRoute.js +623 -108
  76. package/dist/better-auth/utils/handleBetterAuthRoute.mjs +2 -2
  77. package/dist/better-auth/utils/index.d.mts +3 -4
  78. package/dist/better-auth/utils/index.d.ts +3 -4
  79. package/dist/better-auth/utils/index.js +623 -108
  80. package/dist/better-auth/utils/index.mjs +3 -3
  81. package/dist/react/AutumnContext.d.mts +2 -2
  82. package/dist/react/AutumnContext.d.ts +2 -2
  83. package/dist/react/client/AutumnClient.d.mts +2 -2
  84. package/dist/react/client/AutumnClient.d.ts +2 -2
  85. package/dist/react/client/IAutumnClient.d.mts +2 -2
  86. package/dist/react/client/IAutumnClient.d.ts +2 -2
  87. package/dist/react/client/index.d.mts +2 -2
  88. package/dist/react/client/index.d.ts +2 -2
  89. package/dist/react/{customer-DB8vL_m7.d.mts → customer-BDxW2bu6.d.mts} +35 -9
  90. package/dist/react/{customer-CaGJEN5J.d.ts → customer-BPUObmME.d.ts} +35 -9
  91. package/dist/react/hooks/index.d.mts +2 -2
  92. package/dist/react/hooks/index.d.ts +2 -2
  93. package/dist/react/hooks/internal/check/balanceToAllowed.d.mts +1 -1
  94. package/dist/react/hooks/internal/check/balanceToAllowed.d.ts +1 -1
  95. package/dist/react/hooks/internal/check/customerToFeatures.d.mts +1 -1
  96. package/dist/react/hooks/internal/check/customerToFeatures.d.ts +1 -1
  97. package/dist/react/hooks/internal/check/findCreditSystemsByFeature.d.mts +1 -1
  98. package/dist/react/hooks/internal/check/findCreditSystemsByFeature.d.ts +1 -1
  99. package/dist/react/hooks/internal/check/getCreditCost.d.mts +1 -1
  100. package/dist/react/hooks/internal/check/getCreditCost.d.ts +1 -1
  101. package/dist/react/hooks/internal/getLocalCheckResponse.d.mts +2 -2
  102. package/dist/react/hooks/internal/getLocalCheckResponse.d.ts +2 -2
  103. package/dist/react/hooks/internal/useCustomerActions.d.mts +2 -2
  104. package/dist/react/hooks/internal/useCustomerActions.d.ts +2 -2
  105. package/dist/react/hooks/useAggregateEvents.d.mts +1 -1
  106. package/dist/react/hooks/useAggregateEvents.d.ts +1 -1
  107. package/dist/react/hooks/useCustomer.d.mts +2 -2
  108. package/dist/react/hooks/useCustomer.d.ts +2 -2
  109. package/dist/react/hooks/useEntity.d.mts +1 -1
  110. package/dist/react/hooks/useEntity.d.ts +1 -1
  111. package/dist/react/hooks/useListEvents.d.mts +1 -1
  112. package/dist/react/hooks/useListEvents.d.ts +1 -1
  113. package/dist/react/hooks/useListPlans.d.mts +1 -1
  114. package/dist/react/hooks/useListPlans.d.ts +1 -1
  115. package/dist/react/hooks/useReferrals.d.mts +1 -1
  116. package/dist/react/hooks/useReferrals.d.ts +1 -1
  117. package/dist/react/index.d.mts +2 -2
  118. package/dist/react/index.d.ts +2 -2
  119. package/dist/react/{params-B5l9vHfZ.d.ts → params-D4cEukOJ.d.ts} +615 -64
  120. package/dist/react/{params-BVglT8vT.d.mts → params-DzbSUS8O.d.mts} +615 -64
  121. package/dist/sdk/index.d.mts +980 -173
  122. package/dist/sdk/index.d.ts +980 -173
  123. package/dist/sdk/index.js +978 -212
  124. package/dist/sdk/index.mjs +825 -149
  125. package/package.json +1 -1
  126. package/dist/backend/{chunk-S5HPMJ4U.mjs → chunk-55C2WWXQ.mjs} +3 -3
@@ -738,6 +738,10 @@ type AttachParams = {
738
738
  * If true, skips any billing changes for the attach operation.
739
739
  */
740
740
  noBillingChanges?: boolean | undefined;
741
+ /**
742
+ * If true, the customer's plan is activated immediately even when payment is deferred (invoice mode) or pending (Stripe checkout). For Stripe checkout, the customer_product is inserted before the customer completes the hosted form.
743
+ */
744
+ enablePlanImmediately?: boolean | undefined;
741
745
  };
742
746
  /**
743
747
  * Invoice details if an invoice was created. Only present when a charge was made.
@@ -1510,126 +1514,576 @@ type BillingUpdateInvoice = {
1510
1514
  */
1511
1515
  stripeId: string;
1512
1516
  /**
1513
- * The total amount of the invoice in cents.
1517
+ * The total amount of the invoice in cents.
1518
+ */
1519
+ total: number;
1520
+ /**
1521
+ * The three-letter ISO currency code (e.g., 'usd').
1522
+ */
1523
+ currency: string;
1524
+ /**
1525
+ * URL to the hosted invoice page where the customer can view and pay the invoice.
1526
+ */
1527
+ hostedInvoiceUrl: string | null;
1528
+ };
1529
+ /**
1530
+ * The type of action required to complete the payment.
1531
+ */
1532
+ declare const BillingUpdateCode: {
1533
+ readonly ThreedsRequired: "3ds_required";
1534
+ readonly PaymentMethodRequired: "payment_method_required";
1535
+ readonly PaymentFailed: "payment_failed";
1536
+ };
1537
+ /**
1538
+ * The type of action required to complete the payment.
1539
+ */
1540
+ type BillingUpdateCode = OpenEnum<typeof BillingUpdateCode>;
1541
+ /**
1542
+ * Details about any action required to complete the payment. Present when the payment could not be processed automatically.
1543
+ */
1544
+ type BillingUpdateRequiredAction = {
1545
+ /**
1546
+ * The type of action required to complete the payment.
1547
+ */
1548
+ code: BillingUpdateCode;
1549
+ /**
1550
+ * A human-readable explanation of why this action is required.
1551
+ */
1552
+ reason: string;
1553
+ };
1554
+ /**
1555
+ * OK
1556
+ */
1557
+ type BillingUpdateResponse = {
1558
+ /**
1559
+ * The ID of the customer.
1560
+ */
1561
+ customerId: string;
1562
+ /**
1563
+ * The ID of the entity, if the plan was attached to an entity.
1564
+ */
1565
+ entityId?: string | undefined;
1566
+ /**
1567
+ * Invoice details if an invoice was created. Only present when a charge was made.
1568
+ */
1569
+ invoice?: BillingUpdateInvoice | undefined;
1570
+ /**
1571
+ * URL to redirect the customer to complete payment. Null if no payment action is required.
1572
+ */
1573
+ paymentUrl: string | null;
1574
+ /**
1575
+ * Details about any action required to complete the payment. Present when the payment could not be processed automatically.
1576
+ */
1577
+ requiredAction?: BillingUpdateRequiredAction | undefined;
1578
+ };
1579
+
1580
+ /**
1581
+ * Reserve units of a feature upfront by passing a lock_id, then call balances.finalize to confirm or release the hold.
1582
+ */
1583
+ type CheckLock = {
1584
+ /**
1585
+ * A unique identifier for this lock. Used to finalize the lock later via balances.finalize.
1586
+ */
1587
+ lockId: string;
1588
+ /**
1589
+ * Must be true to enable locking.
1590
+ */
1591
+ enabled: true;
1592
+ /**
1593
+ * Unix timestamp (ms) when the lock automatically expires and releases the held balance.
1594
+ */
1595
+ expiresAt?: number | undefined;
1596
+ };
1597
+ type CheckParams = {
1598
+ /**
1599
+ * The ID of the customer.
1600
+ */
1601
+ customerId: string;
1602
+ /**
1603
+ * The ID of the feature.
1604
+ */
1605
+ featureId: string;
1606
+ /**
1607
+ * The ID of the entity for entity-scoped balances (e.g., per-seat limits).
1608
+ */
1609
+ entityId?: string | undefined;
1610
+ /**
1611
+ * Minimum balance required for access. Returns allowed: false if the customer's balance is below this value. Defaults to 1.
1612
+ */
1613
+ requiredBalance?: number | undefined;
1614
+ /**
1615
+ * Additional properties to attach to the usage event if send_event is true.
1616
+ */
1617
+ properties?: {
1618
+ [k: string]: any;
1619
+ } | undefined;
1620
+ /**
1621
+ * If true, atomically records a usage event while checking access. The required_balance value is used as the usage amount. Combines check + track in one call.
1622
+ */
1623
+ sendEvent?: boolean | undefined;
1624
+ /**
1625
+ * Reserve units of a feature upfront by passing a lock_id, then call balances.finalize to confirm or release the hold.
1626
+ */
1627
+ lock?: CheckLock | undefined;
1628
+ /**
1629
+ * If true, includes upgrade/upsell information in the response when access is denied. Useful for displaying paywalls.
1630
+ */
1631
+ withPreview?: boolean | undefined;
1632
+ };
1633
+ /**
1634
+ * Feature type: 'boolean' for on/off access, 'metered' for usage-tracked features, 'credit_system' for unified credit pools.
1635
+ */
1636
+ declare const FlagType2: {
1637
+ readonly Boolean: "boolean";
1638
+ readonly Metered: "metered";
1639
+ readonly CreditSystem: "credit_system";
1640
+ };
1641
+ /**
1642
+ * Feature type: 'boolean' for on/off access, 'metered' for usage-tracked features, 'credit_system' for unified credit pools.
1643
+ */
1644
+ type FlagType2 = OpenEnum<typeof FlagType2>;
1645
+ type CheckCreditSchema2 = {
1646
+ /**
1647
+ * ID of the metered feature that draws from this credit system.
1648
+ */
1649
+ meteredFeatureId: string;
1650
+ /**
1651
+ * Credits consumed per unit of the metered feature.
1652
+ */
1653
+ creditCost: number;
1654
+ };
1655
+ /**
1656
+ * Display names for the feature in billing UI and customer-facing components.
1657
+ */
1658
+ type FlagDisplay2 = {
1659
+ /**
1660
+ * Singular form for UI display (e.g., 'API call', 'seat').
1661
+ */
1662
+ singular?: string | null | undefined;
1663
+ /**
1664
+ * Plural form for UI display (e.g., 'API calls', 'seats').
1665
+ */
1666
+ plural?: string | null | undefined;
1667
+ };
1668
+ /**
1669
+ * The full feature object if expanded.
1670
+ */
1671
+ type CheckFeature2 = {
1672
+ /**
1673
+ * The unique identifier for this feature, used in /check and /track calls.
1674
+ */
1675
+ id: string;
1676
+ /**
1677
+ * Human-readable name displayed in the dashboard and billing UI.
1678
+ */
1679
+ name: string;
1680
+ /**
1681
+ * Feature type: 'boolean' for on/off access, 'metered' for usage-tracked features, 'credit_system' for unified credit pools.
1682
+ */
1683
+ type: FlagType2;
1684
+ /**
1685
+ * For metered features: true if usage resets periodically (API calls, credits), false if allocated persistently (seats, storage).
1686
+ */
1687
+ consumable: boolean;
1688
+ /**
1689
+ * Event names that trigger this feature's balance. Allows multiple features to respond to a single event.
1690
+ */
1691
+ eventNames?: Array<string> | undefined;
1692
+ /**
1693
+ * For credit_system features: maps metered features to their credit costs.
1694
+ */
1695
+ creditSchema?: Array<CheckCreditSchema2> | undefined;
1696
+ /**
1697
+ * Display names for the feature in billing UI and customer-facing components.
1698
+ */
1699
+ display?: FlagDisplay2 | undefined;
1700
+ /**
1701
+ * Whether the feature is archived and hidden from the dashboard.
1702
+ */
1703
+ archived: boolean;
1704
+ };
1705
+ type Flag2 = {
1706
+ /**
1707
+ * The unique identifier for this flag.
1708
+ */
1709
+ id: string;
1710
+ /**
1711
+ * The plan ID this flag originates from, or null for standalone flags.
1712
+ */
1713
+ planId: string | null;
1714
+ /**
1715
+ * Timestamp when this flag expires, or null for no expiration.
1716
+ */
1717
+ expiresAt: number | null;
1718
+ /**
1719
+ * The feature ID this flag is for.
1720
+ */
1721
+ featureId: string;
1722
+ /**
1723
+ * The full feature object if expanded.
1724
+ */
1725
+ feature?: CheckFeature2 | undefined;
1726
+ };
1727
+ /**
1728
+ * The reason access was denied. 'usage_limit' means the customer exceeded their balance, 'feature_flag' means the feature is not included in their plan.
1729
+ */
1730
+ declare const Scenario2: {
1731
+ readonly UsageLimit: "usage_limit";
1732
+ readonly FeatureFlag: "feature_flag";
1733
+ };
1734
+ /**
1735
+ * The reason access was denied. 'usage_limit' means the customer exceeded their balance, 'feature_flag' means the feature is not included in their plan.
1736
+ */
1737
+ type Scenario2 = OpenEnum<typeof Scenario2>;
1738
+ /**
1739
+ * The environment of the product
1740
+ */
1741
+ declare const CheckEnv2: {
1742
+ readonly Sandbox: "sandbox";
1743
+ readonly Live: "live";
1744
+ };
1745
+ /**
1746
+ * The environment of the product
1747
+ */
1748
+ type CheckEnv2 = OpenEnum<typeof CheckEnv2>;
1749
+ declare const ProductType2: {
1750
+ readonly Feature: "feature";
1751
+ readonly PricedFeature: "priced_feature";
1752
+ readonly Price: "price";
1753
+ };
1754
+ type ProductType2 = OpenEnum<typeof ProductType2>;
1755
+ declare const FeatureType2: {
1756
+ readonly SingleUse: "single_use";
1757
+ readonly ContinuousUse: "continuous_use";
1758
+ readonly Boolean: "boolean";
1759
+ readonly Static: "static";
1760
+ };
1761
+ type FeatureType2 = OpenEnum<typeof FeatureType2>;
1762
+ declare const CheckInterval2: {
1763
+ readonly Minute: "minute";
1764
+ readonly Hour: "hour";
1765
+ readonly Day: "day";
1766
+ readonly Week: "week";
1767
+ readonly Month: "month";
1768
+ readonly Quarter: "quarter";
1769
+ readonly SemiAnnual: "semi_annual";
1770
+ readonly Year: "year";
1771
+ };
1772
+ type CheckInterval2 = OpenEnum<typeof CheckInterval2>;
1773
+ declare const CheckTierBehavior2: {
1774
+ readonly Graduated: "graduated";
1775
+ readonly Volume: "volume";
1776
+ };
1777
+ type CheckTierBehavior2 = OpenEnum<typeof CheckTierBehavior2>;
1778
+ declare const UsageModel2: {
1779
+ readonly Prepaid: "prepaid";
1780
+ readonly PayPerUse: "pay_per_use";
1781
+ };
1782
+ type UsageModel2 = OpenEnum<typeof UsageModel2>;
1783
+ type ProductDisplay2 = {
1784
+ primaryText: string;
1785
+ secondaryText?: string | null | undefined;
1786
+ };
1787
+ declare const ConfigDuration2: {
1788
+ readonly Month: "month";
1789
+ readonly Forever: "forever";
1790
+ };
1791
+ type ConfigDuration2 = OpenEnum<typeof ConfigDuration2>;
1792
+ type CheckRollover2 = {
1793
+ max?: number | null | undefined;
1794
+ maxPercentage?: number | null | undefined;
1795
+ duration: ConfigDuration2;
1796
+ length: number;
1797
+ };
1798
+ declare const CheckOnIncrease2: {
1799
+ readonly BillImmediately: "bill_immediately";
1800
+ readonly ProrateImmediately: "prorate_immediately";
1801
+ readonly ProrateNextCycle: "prorate_next_cycle";
1802
+ readonly BillNextCycle: "bill_next_cycle";
1803
+ };
1804
+ type CheckOnIncrease2 = OpenEnum<typeof CheckOnIncrease2>;
1805
+ declare const CheckOnDecrease2: {
1806
+ readonly Prorate: "prorate";
1807
+ readonly ProrateImmediately: "prorate_immediately";
1808
+ readonly ProrateNextCycle: "prorate_next_cycle";
1809
+ readonly None: "none";
1810
+ readonly NoProrations: "no_prorations";
1811
+ };
1812
+ type CheckOnDecrease2 = OpenEnum<typeof CheckOnDecrease2>;
1813
+ type CheckConfig2 = {
1814
+ rollover?: CheckRollover2 | null | undefined;
1815
+ onIncrease?: CheckOnIncrease2 | null | undefined;
1816
+ onDecrease?: CheckOnDecrease2 | null | undefined;
1817
+ };
1818
+ /**
1819
+ * Product item defining features and pricing within a product
1820
+ */
1821
+ type CheckItem2 = {
1822
+ /**
1823
+ * The type of the product item
1824
+ */
1825
+ type?: ProductType2 | null | undefined;
1826
+ /**
1827
+ * The feature ID of the product item. If the item is a fixed price, should be `null`
1828
+ */
1829
+ featureId?: string | null | undefined;
1830
+ /**
1831
+ * Single use features are used once and then depleted, like API calls or credits. Continuous use features are those being used on an ongoing-basis, like storage or seats.
1832
+ */
1833
+ featureType?: FeatureType2 | null | undefined;
1834
+ /**
1835
+ * The amount of usage included for this feature.
1836
+ */
1837
+ includedUsage?: number | string | null | undefined;
1838
+ /**
1839
+ * The reset or billing interval of the product item. If null, feature will have no reset date, and if there's a price, it will be billed one-off.
1840
+ */
1841
+ interval?: CheckInterval2 | null | undefined;
1842
+ /**
1843
+ * The interval count of the product item.
1844
+ */
1845
+ intervalCount?: number | null | undefined;
1846
+ /**
1847
+ * The price of the product item. Should be `null` if tiered pricing is set.
1848
+ */
1849
+ price?: number | null | undefined;
1850
+ /**
1851
+ * Tiered pricing for the product item. Not applicable for fixed price items.
1852
+ */
1853
+ tiers?: Array<any | null> | null | undefined;
1854
+ /**
1855
+ * How tiers are applied: graduated (split across bands) or volume (flat rate for the matched tier). Defaults to graduated.
1856
+ */
1857
+ tierBehavior?: CheckTierBehavior2 | null | undefined;
1858
+ /**
1859
+ * Whether the feature should be prepaid upfront or billed for how much they use end of billing period.
1860
+ */
1861
+ usageModel?: UsageModel2 | null | undefined;
1862
+ /**
1863
+ * The amount per billing unit (eg. $9 / 250 units)
1864
+ */
1865
+ billingUnits?: number | null | undefined;
1866
+ /**
1867
+ * Whether the usage should be reset when the product is enabled.
1868
+ */
1869
+ resetUsageWhenEnabled?: boolean | null | undefined;
1870
+ /**
1871
+ * The entity feature ID of the product item if applicable.
1872
+ */
1873
+ entityFeatureId?: string | null | undefined;
1874
+ /**
1875
+ * The display of the product item.
1876
+ */
1877
+ display?: ProductDisplay2 | null | undefined;
1878
+ /**
1879
+ * Used in customer context. Quantity of the feature the customer has prepaid for.
1880
+ */
1881
+ quantity?: number | null | undefined;
1882
+ /**
1883
+ * Used in customer context. Quantity of the feature the customer will prepay for in the next cycle.
1884
+ */
1885
+ nextCycleQuantity?: number | null | undefined;
1886
+ /**
1887
+ * Configuration for rollover and proration behavior of the feature.
1888
+ */
1889
+ config?: CheckConfig2 | null | undefined;
1890
+ };
1891
+ /**
1892
+ * The duration type of the free trial
1893
+ */
1894
+ declare const FreeTrialDuration2: {
1895
+ readonly Day: "day";
1896
+ readonly Month: "month";
1897
+ readonly Year: "year";
1898
+ };
1899
+ /**
1900
+ * The duration type of the free trial
1901
+ */
1902
+ type FreeTrialDuration2 = OpenEnum<typeof FreeTrialDuration2>;
1903
+ type CheckFreeTrial2 = {
1904
+ /**
1905
+ * The duration type of the free trial
1906
+ */
1907
+ duration: FreeTrialDuration2;
1908
+ /**
1909
+ * The length of the duration type specified
1910
+ */
1911
+ length: number;
1912
+ /**
1913
+ * Whether the free trial is limited to one per customer fingerprint
1914
+ */
1915
+ uniqueFingerprint: boolean;
1916
+ /**
1917
+ * Whether the free trial requires a card. If false, the customer can attach the product without going through a checkout flow or having a card on file.
1918
+ */
1919
+ cardRequired: boolean;
1920
+ /**
1921
+ * Used in customer context. Whether the free trial is available for the customer if they were to attach the product.
1922
+ */
1923
+ trialAvailable: boolean | null;
1924
+ };
1925
+ /**
1926
+ * Scenario for when this product is used in attach flows
1927
+ */
1928
+ declare const ProductScenario2: {
1929
+ readonly Scheduled: "scheduled";
1930
+ readonly Active: "active";
1931
+ readonly New: "new";
1932
+ readonly Renew: "renew";
1933
+ readonly Upgrade: "upgrade";
1934
+ readonly UpdatePrepaidQuantity: "update_prepaid_quantity";
1935
+ readonly Downgrade: "downgrade";
1936
+ readonly Cancel: "cancel";
1937
+ readonly Expired: "expired";
1938
+ readonly PastDue: "past_due";
1939
+ };
1940
+ /**
1941
+ * Scenario for when this product is used in attach flows
1942
+ */
1943
+ type ProductScenario2 = OpenEnum<typeof ProductScenario2>;
1944
+ type Properties2 = {
1945
+ /**
1946
+ * True if the product has no base price or usage prices
1947
+ */
1948
+ isFree: boolean;
1949
+ /**
1950
+ * True if the product only contains a one-time price
1951
+ */
1952
+ isOneOff: boolean;
1953
+ /**
1954
+ * The billing interval group for recurring products (e.g., 'monthly', 'yearly')
1955
+ */
1956
+ intervalGroup?: string | null | undefined;
1957
+ /**
1958
+ * True if the product includes a free trial
1959
+ */
1960
+ hasTrial?: boolean | null | undefined;
1961
+ /**
1962
+ * True if the product can be updated after creation (only applicable if there are prepaid recurring prices)
1963
+ */
1964
+ updateable?: boolean | null | undefined;
1965
+ };
1966
+ type Product2 = {
1967
+ /**
1968
+ * The ID of the product you set when creating the product
1969
+ */
1970
+ id: string;
1971
+ /**
1972
+ * The name of the product
1973
+ */
1974
+ name: string;
1975
+ /**
1976
+ * Product group which this product belongs to
1977
+ */
1978
+ group: string | null;
1979
+ /**
1980
+ * The environment of the product
1981
+ */
1982
+ env: CheckEnv2;
1983
+ /**
1984
+ * Whether the product is an add-on and can be purchased alongside other products
1985
+ */
1986
+ isAddOn: boolean;
1987
+ /**
1988
+ * Whether the product is the default product
1989
+ */
1990
+ isDefault: boolean;
1991
+ /**
1992
+ * Whether this product has been archived and is no longer available
1993
+ */
1994
+ archived: boolean;
1995
+ /**
1996
+ * The current version of the product
1997
+ */
1998
+ version: number;
1999
+ /**
2000
+ * The timestamp of when the product was created in milliseconds since epoch
1514
2001
  */
1515
- total: number;
2002
+ createdAt: number;
1516
2003
  /**
1517
- * The three-letter ISO currency code (e.g., 'usd').
2004
+ * Array of product items that define the product's features and pricing
1518
2005
  */
1519
- currency: string;
2006
+ items: Array<CheckItem2>;
1520
2007
  /**
1521
- * URL to the hosted invoice page where the customer can view and pay the invoice.
2008
+ * Free trial configuration for this product, if available
1522
2009
  */
1523
- hostedInvoiceUrl: string | null;
1524
- };
1525
- /**
1526
- * The type of action required to complete the payment.
1527
- */
1528
- declare const BillingUpdateCode: {
1529
- readonly ThreedsRequired: "3ds_required";
1530
- readonly PaymentMethodRequired: "payment_method_required";
1531
- readonly PaymentFailed: "payment_failed";
1532
- };
1533
- /**
1534
- * The type of action required to complete the payment.
1535
- */
1536
- type BillingUpdateCode = OpenEnum<typeof BillingUpdateCode>;
1537
- /**
1538
- * Details about any action required to complete the payment. Present when the payment could not be processed automatically.
1539
- */
1540
- type BillingUpdateRequiredAction = {
2010
+ freeTrial: CheckFreeTrial2 | null;
1541
2011
  /**
1542
- * The type of action required to complete the payment.
2012
+ * ID of the base variant this product is derived from
1543
2013
  */
1544
- code: BillingUpdateCode;
2014
+ baseVariantId: string | null;
1545
2015
  /**
1546
- * A human-readable explanation of why this action is required.
2016
+ * Scenario for when this product is used in attach flows
1547
2017
  */
1548
- reason: string;
2018
+ scenario?: ProductScenario2 | undefined;
2019
+ properties?: Properties2 | undefined;
1549
2020
  };
1550
2021
  /**
1551
- * OK
2022
+ * Upgrade/upsell information when access is denied. Only present if with_preview was true and allowed is false.
1552
2023
  */
1553
- type BillingUpdateResponse = {
2024
+ type Preview2 = {
1554
2025
  /**
1555
- * The ID of the customer.
2026
+ * The reason access was denied. 'usage_limit' means the customer exceeded their balance, 'feature_flag' means the feature is not included in their plan.
1556
2027
  */
1557
- customerId: string;
2028
+ scenario: Scenario2;
1558
2029
  /**
1559
- * The ID of the entity, if the plan was attached to an entity.
2030
+ * A title suitable for displaying in a paywall or upgrade modal.
1560
2031
  */
1561
- entityId?: string | undefined;
2032
+ title: string;
1562
2033
  /**
1563
- * Invoice details if an invoice was created. Only present when a charge was made.
2034
+ * A message explaining why access was denied.
1564
2035
  */
1565
- invoice?: BillingUpdateInvoice | undefined;
2036
+ message: string;
1566
2037
  /**
1567
- * URL to redirect the customer to complete payment. Null if no payment action is required.
2038
+ * The ID of the feature that was checked.
1568
2039
  */
1569
- paymentUrl: string | null;
2040
+ featureId: string;
1570
2041
  /**
1571
- * Details about any action required to complete the payment. Present when the payment could not be processed automatically.
2042
+ * The display name of the feature.
1572
2043
  */
1573
- requiredAction?: BillingUpdateRequiredAction | undefined;
2044
+ featureName: string;
2045
+ /**
2046
+ * Products that would grant access to this feature. Use to display upgrade options.
2047
+ */
2048
+ products: Array<Product2>;
1574
2049
  };
1575
-
1576
2050
  /**
1577
- * Reserve units of a feature upfront by passing a lock_id, then call balances.finalize to confirm or release the hold.
2051
+ * Accepted. Autumn is experiencing degraded service from a downstream provider, so access was allowed fail-open.
1578
2052
  */
1579
- type CheckLock = {
1580
- /**
1581
- * A unique identifier for this lock. Used to finalize the lock later via balances.finalize.
1582
- */
1583
- lockId: string;
1584
- /**
1585
- * Must be true to enable locking.
1586
- */
1587
- enabled: true;
2053
+ type CheckResponseBody2 = {
1588
2054
  /**
1589
- * Unix timestamp (ms) when the lock automatically expires and releases the held balance.
2055
+ * Whether the customer is allowed to use the feature. True if they have sufficient balance or the feature is unlimited/boolean.
1590
2056
  */
1591
- expiresAt?: number | undefined;
1592
- };
1593
- type CheckParams = {
2057
+ allowed: boolean;
1594
2058
  /**
1595
- * The ID of the customer.
2059
+ * The ID of the customer that was checked.
1596
2060
  */
1597
2061
  customerId: string;
1598
2062
  /**
1599
- * The ID of the feature.
1600
- */
1601
- featureId: string;
1602
- /**
1603
- * The ID of the entity for entity-scoped balances (e.g., per-seat limits).
2063
+ * The ID of the entity, if an entity-scoped check was performed.
1604
2064
  */
1605
- entityId?: string | undefined;
2065
+ entityId?: string | null | undefined;
1606
2066
  /**
1607
- * Minimum balance required for access. Returns allowed: false if the customer's balance is below this value. Defaults to 1.
2067
+ * The required balance that was checked against.
1608
2068
  */
1609
2069
  requiredBalance?: number | undefined;
1610
2070
  /**
1611
- * Additional properties to attach to the usage event if send_event is true.
1612
- */
1613
- properties?: {
1614
- [k: string]: any;
1615
- } | undefined;
1616
- /**
1617
- * If true, atomically records a usage event while checking access. The required_balance value is used as the usage amount. Combines check + track in one call.
2071
+ * The customer's balance for this feature. Null if the customer has no balance for this feature.
1618
2072
  */
1619
- sendEvent?: boolean | undefined;
2073
+ balance: Balance | null;
1620
2074
  /**
1621
- * Reserve units of a feature upfront by passing a lock_id, then call balances.finalize to confirm or release the hold.
2075
+ * The flag associated with this check, if any.
1622
2076
  */
1623
- lock?: CheckLock | undefined;
2077
+ flag: Flag2 | null;
1624
2078
  /**
1625
- * If true, includes upgrade/upsell information in the response when access is denied. Useful for displaying paywalls.
2079
+ * Upgrade/upsell information when access is denied. Only present if with_preview was true and allowed is false.
1626
2080
  */
1627
- withPreview?: boolean | undefined;
2081
+ preview?: Preview2 | undefined;
1628
2082
  };
1629
2083
  /**
1630
2084
  * Feature type: 'boolean' for on/off access, 'metered' for usage-tracked features, 'credit_system' for unified credit pools.
1631
2085
  */
1632
- declare const FlagType: {
2086
+ declare const FlagType1: {
1633
2087
  readonly Boolean: "boolean";
1634
2088
  readonly Metered: "metered";
1635
2089
  readonly CreditSystem: "credit_system";
@@ -1637,8 +2091,8 @@ declare const FlagType: {
1637
2091
  /**
1638
2092
  * Feature type: 'boolean' for on/off access, 'metered' for usage-tracked features, 'credit_system' for unified credit pools.
1639
2093
  */
1640
- type FlagType = OpenEnum<typeof FlagType>;
1641
- type CheckCreditSchema = {
2094
+ type FlagType1 = OpenEnum<typeof FlagType1>;
2095
+ type CheckCreditSchema1 = {
1642
2096
  /**
1643
2097
  * ID of the metered feature that draws from this credit system.
1644
2098
  */
@@ -1651,7 +2105,7 @@ type CheckCreditSchema = {
1651
2105
  /**
1652
2106
  * Display names for the feature in billing UI and customer-facing components.
1653
2107
  */
1654
- type FlagDisplay = {
2108
+ type FlagDisplay1 = {
1655
2109
  /**
1656
2110
  * Singular form for UI display (e.g., 'API call', 'seat').
1657
2111
  */
@@ -1664,7 +2118,7 @@ type FlagDisplay = {
1664
2118
  /**
1665
2119
  * The full feature object if expanded.
1666
2120
  */
1667
- type CheckFeature = {
2121
+ type CheckFeature1 = {
1668
2122
  /**
1669
2123
  * The unique identifier for this feature, used in /check and /track calls.
1670
2124
  */
@@ -1676,7 +2130,7 @@ type CheckFeature = {
1676
2130
  /**
1677
2131
  * Feature type: 'boolean' for on/off access, 'metered' for usage-tracked features, 'credit_system' for unified credit pools.
1678
2132
  */
1679
- type: FlagType;
2133
+ type: FlagType1;
1680
2134
  /**
1681
2135
  * For metered features: true if usage resets periodically (API calls, credits), false if allocated persistently (seats, storage).
1682
2136
  */
@@ -1688,17 +2142,17 @@ type CheckFeature = {
1688
2142
  /**
1689
2143
  * For credit_system features: maps metered features to their credit costs.
1690
2144
  */
1691
- creditSchema?: Array<CheckCreditSchema> | undefined;
2145
+ creditSchema?: Array<CheckCreditSchema1> | undefined;
1692
2146
  /**
1693
2147
  * Display names for the feature in billing UI and customer-facing components.
1694
2148
  */
1695
- display?: FlagDisplay | undefined;
2149
+ display?: FlagDisplay1 | undefined;
1696
2150
  /**
1697
2151
  * Whether the feature is archived and hidden from the dashboard.
1698
2152
  */
1699
2153
  archived: boolean;
1700
2154
  };
1701
- type Flag = {
2155
+ type Flag1 = {
1702
2156
  /**
1703
2157
  * The unique identifier for this flag.
1704
2158
  */
@@ -1718,44 +2172,44 @@ type Flag = {
1718
2172
  /**
1719
2173
  * The full feature object if expanded.
1720
2174
  */
1721
- feature?: CheckFeature | undefined;
2175
+ feature?: CheckFeature1 | undefined;
1722
2176
  };
1723
2177
  /**
1724
2178
  * The reason access was denied. 'usage_limit' means the customer exceeded their balance, 'feature_flag' means the feature is not included in their plan.
1725
2179
  */
1726
- declare const Scenario: {
2180
+ declare const Scenario1: {
1727
2181
  readonly UsageLimit: "usage_limit";
1728
2182
  readonly FeatureFlag: "feature_flag";
1729
2183
  };
1730
2184
  /**
1731
2185
  * The reason access was denied. 'usage_limit' means the customer exceeded their balance, 'feature_flag' means the feature is not included in their plan.
1732
2186
  */
1733
- type Scenario = OpenEnum<typeof Scenario>;
2187
+ type Scenario1 = OpenEnum<typeof Scenario1>;
1734
2188
  /**
1735
2189
  * The environment of the product
1736
2190
  */
1737
- declare const CheckEnv: {
2191
+ declare const CheckEnv1: {
1738
2192
  readonly Sandbox: "sandbox";
1739
2193
  readonly Live: "live";
1740
2194
  };
1741
2195
  /**
1742
2196
  * The environment of the product
1743
2197
  */
1744
- type CheckEnv = OpenEnum<typeof CheckEnv>;
1745
- declare const ProductType: {
2198
+ type CheckEnv1 = OpenEnum<typeof CheckEnv1>;
2199
+ declare const ProductType1: {
1746
2200
  readonly Feature: "feature";
1747
2201
  readonly PricedFeature: "priced_feature";
1748
2202
  readonly Price: "price";
1749
2203
  };
1750
- type ProductType = OpenEnum<typeof ProductType>;
1751
- declare const FeatureType: {
2204
+ type ProductType1 = OpenEnum<typeof ProductType1>;
2205
+ declare const FeatureType1: {
1752
2206
  readonly SingleUse: "single_use";
1753
2207
  readonly ContinuousUse: "continuous_use";
1754
2208
  readonly Boolean: "boolean";
1755
2209
  readonly Static: "static";
1756
2210
  };
1757
- type FeatureType = OpenEnum<typeof FeatureType>;
1758
- declare const CheckInterval: {
2211
+ type FeatureType1 = OpenEnum<typeof FeatureType1>;
2212
+ declare const CheckInterval1: {
1759
2213
  readonly Minute: "minute";
1760
2214
  readonly Hour: "hour";
1761
2215
  readonly Day: "day";
@@ -1765,60 +2219,60 @@ declare const CheckInterval: {
1765
2219
  readonly SemiAnnual: "semi_annual";
1766
2220
  readonly Year: "year";
1767
2221
  };
1768
- type CheckInterval = OpenEnum<typeof CheckInterval>;
1769
- declare const CheckTierBehavior: {
2222
+ type CheckInterval1 = OpenEnum<typeof CheckInterval1>;
2223
+ declare const CheckTierBehavior1: {
1770
2224
  readonly Graduated: "graduated";
1771
2225
  readonly Volume: "volume";
1772
2226
  };
1773
- type CheckTierBehavior = OpenEnum<typeof CheckTierBehavior>;
1774
- declare const UsageModel: {
2227
+ type CheckTierBehavior1 = OpenEnum<typeof CheckTierBehavior1>;
2228
+ declare const UsageModel1: {
1775
2229
  readonly Prepaid: "prepaid";
1776
2230
  readonly PayPerUse: "pay_per_use";
1777
2231
  };
1778
- type UsageModel = OpenEnum<typeof UsageModel>;
1779
- type ProductDisplay = {
2232
+ type UsageModel1 = OpenEnum<typeof UsageModel1>;
2233
+ type ProductDisplay1 = {
1780
2234
  primaryText: string;
1781
2235
  secondaryText?: string | null | undefined;
1782
2236
  };
1783
- declare const ConfigDuration: {
2237
+ declare const ConfigDuration1: {
1784
2238
  readonly Month: "month";
1785
2239
  readonly Forever: "forever";
1786
2240
  };
1787
- type ConfigDuration = OpenEnum<typeof ConfigDuration>;
1788
- type CheckRollover = {
2241
+ type ConfigDuration1 = OpenEnum<typeof ConfigDuration1>;
2242
+ type CheckRollover1 = {
1789
2243
  max?: number | null | undefined;
1790
2244
  maxPercentage?: number | null | undefined;
1791
- duration: ConfigDuration;
2245
+ duration: ConfigDuration1;
1792
2246
  length: number;
1793
2247
  };
1794
- declare const CheckOnIncrease: {
2248
+ declare const CheckOnIncrease1: {
1795
2249
  readonly BillImmediately: "bill_immediately";
1796
2250
  readonly ProrateImmediately: "prorate_immediately";
1797
2251
  readonly ProrateNextCycle: "prorate_next_cycle";
1798
2252
  readonly BillNextCycle: "bill_next_cycle";
1799
2253
  };
1800
- type CheckOnIncrease = OpenEnum<typeof CheckOnIncrease>;
1801
- declare const CheckOnDecrease: {
2254
+ type CheckOnIncrease1 = OpenEnum<typeof CheckOnIncrease1>;
2255
+ declare const CheckOnDecrease1: {
1802
2256
  readonly Prorate: "prorate";
1803
2257
  readonly ProrateImmediately: "prorate_immediately";
1804
2258
  readonly ProrateNextCycle: "prorate_next_cycle";
1805
2259
  readonly None: "none";
1806
2260
  readonly NoProrations: "no_prorations";
1807
2261
  };
1808
- type CheckOnDecrease = OpenEnum<typeof CheckOnDecrease>;
1809
- type CheckConfig = {
1810
- rollover?: CheckRollover | null | undefined;
1811
- onIncrease?: CheckOnIncrease | null | undefined;
1812
- onDecrease?: CheckOnDecrease | null | undefined;
2262
+ type CheckOnDecrease1 = OpenEnum<typeof CheckOnDecrease1>;
2263
+ type CheckConfig1 = {
2264
+ rollover?: CheckRollover1 | null | undefined;
2265
+ onIncrease?: CheckOnIncrease1 | null | undefined;
2266
+ onDecrease?: CheckOnDecrease1 | null | undefined;
1813
2267
  };
1814
2268
  /**
1815
2269
  * Product item defining features and pricing within a product
1816
2270
  */
1817
- type CheckItem = {
2271
+ type CheckItem1 = {
1818
2272
  /**
1819
2273
  * The type of the product item
1820
2274
  */
1821
- type?: ProductType | null | undefined;
2275
+ type?: ProductType1 | null | undefined;
1822
2276
  /**
1823
2277
  * The feature ID of the product item. If the item is a fixed price, should be `null`
1824
2278
  */
@@ -1826,7 +2280,7 @@ type CheckItem = {
1826
2280
  /**
1827
2281
  * Single use features are used once and then depleted, like API calls or credits. Continuous use features are those being used on an ongoing-basis, like storage or seats.
1828
2282
  */
1829
- featureType?: FeatureType | null | undefined;
2283
+ featureType?: FeatureType1 | null | undefined;
1830
2284
  /**
1831
2285
  * The amount of usage included for this feature.
1832
2286
  */
@@ -1834,7 +2288,7 @@ type CheckItem = {
1834
2288
  /**
1835
2289
  * The reset or billing interval of the product item. If null, feature will have no reset date, and if there's a price, it will be billed one-off.
1836
2290
  */
1837
- interval?: CheckInterval | null | undefined;
2291
+ interval?: CheckInterval1 | null | undefined;
1838
2292
  /**
1839
2293
  * The interval count of the product item.
1840
2294
  */
@@ -1850,11 +2304,11 @@ type CheckItem = {
1850
2304
  /**
1851
2305
  * How tiers are applied: graduated (split across bands) or volume (flat rate for the matched tier). Defaults to graduated.
1852
2306
  */
1853
- tierBehavior?: CheckTierBehavior | null | undefined;
2307
+ tierBehavior?: CheckTierBehavior1 | null | undefined;
1854
2308
  /**
1855
2309
  * Whether the feature should be prepaid upfront or billed for how much they use end of billing period.
1856
2310
  */
1857
- usageModel?: UsageModel | null | undefined;
2311
+ usageModel?: UsageModel1 | null | undefined;
1858
2312
  /**
1859
2313
  * The amount per billing unit (eg. $9 / 250 units)
1860
2314
  */
@@ -1870,7 +2324,7 @@ type CheckItem = {
1870
2324
  /**
1871
2325
  * The display of the product item.
1872
2326
  */
1873
- display?: ProductDisplay | null | undefined;
2327
+ display?: ProductDisplay1 | null | undefined;
1874
2328
  /**
1875
2329
  * Used in customer context. Quantity of the feature the customer has prepaid for.
1876
2330
  */
@@ -1882,12 +2336,12 @@ type CheckItem = {
1882
2336
  /**
1883
2337
  * Configuration for rollover and proration behavior of the feature.
1884
2338
  */
1885
- config?: CheckConfig | null | undefined;
2339
+ config?: CheckConfig1 | null | undefined;
1886
2340
  };
1887
2341
  /**
1888
2342
  * The duration type of the free trial
1889
2343
  */
1890
- declare const FreeTrialDuration: {
2344
+ declare const FreeTrialDuration1: {
1891
2345
  readonly Day: "day";
1892
2346
  readonly Month: "month";
1893
2347
  readonly Year: "year";
@@ -1895,12 +2349,12 @@ declare const FreeTrialDuration: {
1895
2349
  /**
1896
2350
  * The duration type of the free trial
1897
2351
  */
1898
- type FreeTrialDuration = OpenEnum<typeof FreeTrialDuration>;
1899
- type CheckFreeTrial = {
2352
+ type FreeTrialDuration1 = OpenEnum<typeof FreeTrialDuration1>;
2353
+ type CheckFreeTrial1 = {
1900
2354
  /**
1901
2355
  * The duration type of the free trial
1902
2356
  */
1903
- duration: FreeTrialDuration;
2357
+ duration: FreeTrialDuration1;
1904
2358
  /**
1905
2359
  * The length of the duration type specified
1906
2360
  */
@@ -1921,7 +2375,7 @@ type CheckFreeTrial = {
1921
2375
  /**
1922
2376
  * Scenario for when this product is used in attach flows
1923
2377
  */
1924
- declare const ProductScenario: {
2378
+ declare const ProductScenario1: {
1925
2379
  readonly Scheduled: "scheduled";
1926
2380
  readonly Active: "active";
1927
2381
  readonly New: "new";
@@ -1936,8 +2390,8 @@ declare const ProductScenario: {
1936
2390
  /**
1937
2391
  * Scenario for when this product is used in attach flows
1938
2392
  */
1939
- type ProductScenario = OpenEnum<typeof ProductScenario>;
1940
- type Properties = {
2393
+ type ProductScenario1 = OpenEnum<typeof ProductScenario1>;
2394
+ type Properties1 = {
1941
2395
  /**
1942
2396
  * True if the product has no base price or usage prices
1943
2397
  */
@@ -1959,7 +2413,7 @@ type Properties = {
1959
2413
  */
1960
2414
  updateable?: boolean | null | undefined;
1961
2415
  };
1962
- type Product = {
2416
+ type Product1 = {
1963
2417
  /**
1964
2418
  * The ID of the product you set when creating the product
1965
2419
  */
@@ -1975,7 +2429,7 @@ type Product = {
1975
2429
  /**
1976
2430
  * The environment of the product
1977
2431
  */
1978
- env: CheckEnv;
2432
+ env: CheckEnv1;
1979
2433
  /**
1980
2434
  * Whether the product is an add-on and can be purchased alongside other products
1981
2435
  */
@@ -1999,11 +2453,11 @@ type Product = {
1999
2453
  /**
2000
2454
  * Array of product items that define the product's features and pricing
2001
2455
  */
2002
- items: Array<CheckItem>;
2456
+ items: Array<CheckItem1>;
2003
2457
  /**
2004
2458
  * Free trial configuration for this product, if available
2005
2459
  */
2006
- freeTrial: CheckFreeTrial | null;
2460
+ freeTrial: CheckFreeTrial1 | null;
2007
2461
  /**
2008
2462
  * ID of the base variant this product is derived from
2009
2463
  */
@@ -2011,17 +2465,17 @@ type Product = {
2011
2465
  /**
2012
2466
  * Scenario for when this product is used in attach flows
2013
2467
  */
2014
- scenario?: ProductScenario | undefined;
2015
- properties?: Properties | undefined;
2468
+ scenario?: ProductScenario1 | undefined;
2469
+ properties?: Properties1 | undefined;
2016
2470
  };
2017
2471
  /**
2018
2472
  * Upgrade/upsell information when access is denied. Only present if with_preview was true and allowed is false.
2019
2473
  */
2020
- type Preview = {
2474
+ type Preview1 = {
2021
2475
  /**
2022
2476
  * The reason access was denied. 'usage_limit' means the customer exceeded their balance, 'feature_flag' means the feature is not included in their plan.
2023
2477
  */
2024
- scenario: Scenario;
2478
+ scenario: Scenario1;
2025
2479
  /**
2026
2480
  * A title suitable for displaying in a paywall or upgrade modal.
2027
2481
  */
@@ -2041,12 +2495,12 @@ type Preview = {
2041
2495
  /**
2042
2496
  * Products that would grant access to this feature. Use to display upgrade options.
2043
2497
  */
2044
- products: Array<Product>;
2498
+ products: Array<Product1>;
2045
2499
  };
2046
2500
  /**
2047
2501
  * OK
2048
2502
  */
2049
- type CheckResponse = {
2503
+ type CheckResponseBody1 = {
2050
2504
  /**
2051
2505
  * Whether the customer is allowed to use the feature. True if they have sufficient balance or the feature is unlimited/boolean.
2052
2506
  */
@@ -2070,12 +2524,13 @@ type CheckResponse = {
2070
2524
  /**
2071
2525
  * The flag associated with this check, if any.
2072
2526
  */
2073
- flag: Flag | null;
2527
+ flag: Flag1 | null;
2074
2528
  /**
2075
2529
  * Upgrade/upsell information when access is denied. Only present if with_preview was true and allowed is false.
2076
2530
  */
2077
- preview?: Preview | undefined;
2531
+ preview?: Preview1 | undefined;
2078
2532
  };
2533
+ type CheckResponse = CheckResponseBody1 | CheckResponseBody2;
2079
2534
 
2080
2535
  /**
2081
2536
  * The interval at which the balance resets (e.g., 'month', 'day', 'year').
@@ -4163,10 +4618,39 @@ declare const CustomerEnv: {
4163
4618
  * The environment this customer was created in.
4164
4619
  */
4165
4620
  type CustomerEnv = OpenEnum<typeof CustomerEnv>;
4621
+ declare const CustomerInterval2: {
4622
+ readonly Hour: "hour";
4623
+ readonly Day: "day";
4624
+ readonly Week: "week";
4625
+ readonly Month: "month";
4626
+ };
4627
+ type CustomerInterval2 = OpenEnum<typeof CustomerInterval2>;
4628
+ type CustomerPurchaseLimit2 = {
4629
+ /**
4630
+ * The time interval for the purchase limit window. Null when no purchase limit is configured.
4631
+ */
4632
+ interval: CustomerInterval2 | null;
4633
+ /**
4634
+ * Number of intervals in the purchase limit window. Null when no purchase limit is configured.
4635
+ */
4636
+ intervalCount: number | null;
4637
+ /**
4638
+ * Maximum number of auto top-ups allowed within the interval. Null when no purchase limit is configured.
4639
+ */
4640
+ limit: number | null;
4641
+ /**
4642
+ * Number of auto top-ups already consumed in the current window.
4643
+ */
4644
+ count: number;
4645
+ /**
4646
+ * Unix ms timestamp when the current purchase window ends and the count resets.
4647
+ */
4648
+ nextResetAt: number;
4649
+ };
4166
4650
  /**
4167
4651
  * The time interval for the purchase limit window.
4168
4652
  */
4169
- declare const CustomerInterval: {
4653
+ declare const CustomerInterval1: {
4170
4654
  readonly Hour: "hour";
4171
4655
  readonly Day: "day";
4172
4656
  readonly Week: "week";
@@ -4175,15 +4659,12 @@ declare const CustomerInterval: {
4175
4659
  /**
4176
4660
  * The time interval for the purchase limit window.
4177
4661
  */
4178
- type CustomerInterval = OpenEnum<typeof CustomerInterval>;
4179
- /**
4180
- * Optional rate limit to cap how often auto top-ups occur.
4181
- */
4182
- type CustomerPurchaseLimit = {
4662
+ type CustomerInterval1 = OpenEnum<typeof CustomerInterval1>;
4663
+ type CustomerPurchaseLimit1 = {
4183
4664
  /**
4184
4665
  * The time interval for the purchase limit window.
4185
4666
  */
4186
- interval: CustomerInterval;
4667
+ interval: CustomerInterval1;
4187
4668
  /**
4188
4669
  * Number of intervals in the purchase limit window.
4189
4670
  */
@@ -4211,9 +4692,9 @@ type CustomerAutoTopup = {
4211
4692
  */
4212
4693
  quantity: number;
4213
4694
  /**
4214
- * Optional rate limit to cap how often auto top-ups occur.
4695
+ * Optional rate limit to cap how often auto top-ups occur. Expand billing_controls.auto_topups.purchase_limit for a count of top ups and the next_reset_at.
4215
4696
  */
4216
- purchaseLimit?: CustomerPurchaseLimit | undefined;
4697
+ purchaseLimit?: CustomerPurchaseLimit2 | CustomerPurchaseLimit1 | undefined;
4217
4698
  /**
4218
4699
  * When true, auto top-up creates a send_invoice invoice instead of auto-charging.
4219
4700
  */
@@ -4886,12 +5367,19 @@ type FinalizeBalanceParams = {
4886
5367
  [k: string]: any;
4887
5368
  } | undefined;
4888
5369
  };
5370
+ /**
5371
+ * Accepted. Autumn is experiencing degraded service from a downstream provider, so the finalize request was allowed fail-open.
5372
+ */
5373
+ type FinalizeLockResponseBody2 = {
5374
+ success: boolean;
5375
+ };
4889
5376
  /**
4890
5377
  * OK
4891
5378
  */
4892
- type FinalizeLockResponse = {
5379
+ type FinalizeLockResponseBody1 = {
4893
5380
  success: boolean;
4894
5381
  };
5382
+ type FinalizeLockResponse = FinalizeLockResponseBody1 | FinalizeLockResponseBody2;
4895
5383
 
4896
5384
  type GetEntityParams = {
4897
5385
  /**
@@ -5877,10 +6365,39 @@ declare const ListCustomersEnv: {
5877
6365
  * The environment this customer was created in.
5878
6366
  */
5879
6367
  type ListCustomersEnv = OpenEnum<typeof ListCustomersEnv>;
6368
+ declare const ListCustomersInterval2: {
6369
+ readonly Hour: "hour";
6370
+ readonly Day: "day";
6371
+ readonly Week: "week";
6372
+ readonly Month: "month";
6373
+ };
6374
+ type ListCustomersInterval2 = OpenEnum<typeof ListCustomersInterval2>;
6375
+ type ListCustomersPurchaseLimit2 = {
6376
+ /**
6377
+ * The time interval for the purchase limit window. Null when no purchase limit is configured.
6378
+ */
6379
+ interval: ListCustomersInterval2 | null;
6380
+ /**
6381
+ * Number of intervals in the purchase limit window. Null when no purchase limit is configured.
6382
+ */
6383
+ intervalCount: number | null;
6384
+ /**
6385
+ * Maximum number of auto top-ups allowed within the interval. Null when no purchase limit is configured.
6386
+ */
6387
+ limit: number | null;
6388
+ /**
6389
+ * Number of auto top-ups already consumed in the current window.
6390
+ */
6391
+ count: number;
6392
+ /**
6393
+ * Unix ms timestamp when the current purchase window ends and the count resets.
6394
+ */
6395
+ nextResetAt: number;
6396
+ };
5880
6397
  /**
5881
6398
  * The time interval for the purchase limit window.
5882
6399
  */
5883
- declare const ListCustomersInterval: {
6400
+ declare const ListCustomersInterval1: {
5884
6401
  readonly Hour: "hour";
5885
6402
  readonly Day: "day";
5886
6403
  readonly Week: "week";
@@ -5889,15 +6406,12 @@ declare const ListCustomersInterval: {
5889
6406
  /**
5890
6407
  * The time interval for the purchase limit window.
5891
6408
  */
5892
- type ListCustomersInterval = OpenEnum<typeof ListCustomersInterval>;
5893
- /**
5894
- * Optional rate limit to cap how often auto top-ups occur.
5895
- */
5896
- type ListCustomersPurchaseLimit = {
6409
+ type ListCustomersInterval1 = OpenEnum<typeof ListCustomersInterval1>;
6410
+ type ListCustomersPurchaseLimit1 = {
5897
6411
  /**
5898
6412
  * The time interval for the purchase limit window.
5899
6413
  */
5900
- interval: ListCustomersInterval;
6414
+ interval: ListCustomersInterval1;
5901
6415
  /**
5902
6416
  * Number of intervals in the purchase limit window.
5903
6417
  */
@@ -5925,9 +6439,9 @@ type ListCustomersAutoTopup = {
5925
6439
  */
5926
6440
  quantity: number;
5927
6441
  /**
5928
- * Optional rate limit to cap how often auto top-ups occur.
6442
+ * Optional rate limit to cap how often auto top-ups occur. Expand billing_controls.auto_topups.purchase_limit for a count of top ups and the next_reset_at.
5929
6443
  */
5930
- purchaseLimit?: ListCustomersPurchaseLimit | undefined;
6444
+ purchaseLimit?: ListCustomersPurchaseLimit2 | ListCustomersPurchaseLimit1 | undefined;
5931
6445
  /**
5932
6446
  * When true, auto top-up creates a send_invoice invoice instead of auto-charging.
5933
6447
  */
@@ -7428,6 +7942,10 @@ type MultiAttachParams = {
7428
7942
  * Only applicable when the customer has an existing Stripe subscription. If true, creates a new separate subscription instead of merging into the existing one.
7429
7943
  */
7430
7944
  newBillingSubscription?: boolean | undefined;
7945
+ /**
7946
+ * If true, the cusProducts are activated immediately even when payment is pending via Stripe checkout.
7947
+ */
7948
+ enablePlanImmediately?: boolean | undefined;
7431
7949
  /**
7432
7950
  * Customer details to set when creating a customer
7433
7951
  */
@@ -8032,6 +8550,10 @@ type PreviewAttachParams = {
8032
8550
  * If true, skips any billing changes for the attach operation.
8033
8551
  */
8034
8552
  noBillingChanges?: boolean | undefined;
8553
+ /**
8554
+ * If true, the customer's plan is activated immediately even when payment is deferred (invoice mode) or pending (Stripe checkout). For Stripe checkout, the customer_product is inserted before the customer completes the hosted form.
8555
+ */
8556
+ enablePlanImmediately?: boolean | undefined;
8035
8557
  };
8036
8558
  type PreviewAttachDiscount = {
8037
8559
  amountOff: number;
@@ -8274,6 +8796,42 @@ declare const PreviewAttachCheckoutType: {
8274
8796
  readonly AutumnCheckout: "autumn_checkout";
8275
8797
  };
8276
8798
  type PreviewAttachCheckoutType = OpenEnum<typeof PreviewAttachCheckoutType>;
8799
+ /**
8800
+ * Calculation status ('complete' when Stripe Tax succeeds or 'incomplete' when Stripe Tax returned 0 or errored).
8801
+ */
8802
+ declare const PreviewAttachStatus: {
8803
+ readonly Complete: "complete";
8804
+ readonly Incomplete: "incomplete";
8805
+ };
8806
+ /**
8807
+ * Calculation status ('complete' when Stripe Tax succeeds or 'incomplete' when Stripe Tax returned 0 or errored).
8808
+ */
8809
+ type PreviewAttachStatus = OpenEnum<typeof PreviewAttachStatus>;
8810
+ /**
8811
+ * Tax preview for the immediate charge. Contact us to enable the tax flag on your organisation. Shows only with flag enabled, a Stripe customer exists and has a location.
8812
+ */
8813
+ type PreviewAttachTax = {
8814
+ /**
8815
+ * Total tax amount in major currency units.
8816
+ */
8817
+ total: number;
8818
+ /**
8819
+ * Tax included in line item subtotals.
8820
+ */
8821
+ amountInclusive: number;
8822
+ /**
8823
+ * Tax added on top of subtotals.
8824
+ */
8825
+ amountExclusive: number;
8826
+ /**
8827
+ * Three-letter currency code.
8828
+ */
8829
+ currency: string;
8830
+ /**
8831
+ * Calculation status ('complete' when Stripe Tax succeeds or 'incomplete' when Stripe Tax returned 0 or errored).
8832
+ */
8833
+ status: PreviewAttachStatus;
8834
+ };
8277
8835
  /**
8278
8836
  * OK
8279
8837
  */
@@ -8319,6 +8877,10 @@ type PreviewAttachResponse = {
8319
8877
  * The type of checkout that will be used if the customer is redirected to a checkout page.
8320
8878
  */
8321
8879
  checkoutType: PreviewAttachCheckoutType | null;
8880
+ /**
8881
+ * Tax preview for the immediate charge. Contact us to enable the tax flag on your organisation. Shows only with flag enabled, a Stripe customer exists and has a location.
8882
+ */
8883
+ tax?: PreviewAttachTax | undefined;
8322
8884
  };
8323
8885
 
8324
8886
  /**
@@ -8815,6 +9377,10 @@ type PreviewMultiAttachParams = {
8815
9377
  * Only applicable when the customer has an existing Stripe subscription. If true, creates a new separate subscription instead of merging into the existing one.
8816
9378
  */
8817
9379
  newBillingSubscription?: boolean | undefined;
9380
+ /**
9381
+ * If true, the cusProducts are activated immediately even when payment is pending via Stripe checkout.
9382
+ */
9383
+ enablePlanImmediately?: boolean | undefined;
8818
9384
  /**
8819
9385
  * Customer details to set when creating a customer
8820
9386
  */
@@ -9062,6 +9628,42 @@ declare const PreviewMultiAttachCheckoutType: {
9062
9628
  readonly AutumnCheckout: "autumn_checkout";
9063
9629
  };
9064
9630
  type PreviewMultiAttachCheckoutType = OpenEnum<typeof PreviewMultiAttachCheckoutType>;
9631
+ /**
9632
+ * Calculation status ('complete' when Stripe Tax succeeds or 'incomplete' when Stripe Tax returned 0 or errored).
9633
+ */
9634
+ declare const PreviewMultiAttachStatus: {
9635
+ readonly Complete: "complete";
9636
+ readonly Incomplete: "incomplete";
9637
+ };
9638
+ /**
9639
+ * Calculation status ('complete' when Stripe Tax succeeds or 'incomplete' when Stripe Tax returned 0 or errored).
9640
+ */
9641
+ type PreviewMultiAttachStatus = OpenEnum<typeof PreviewMultiAttachStatus>;
9642
+ /**
9643
+ * Tax preview for the immediate charge. Contact us to enable the tax flag on your organisation. Shows only with flag enabled, a Stripe customer exists and has a location.
9644
+ */
9645
+ type PreviewMultiAttachTax = {
9646
+ /**
9647
+ * Total tax amount in major currency units.
9648
+ */
9649
+ total: number;
9650
+ /**
9651
+ * Tax included in line item subtotals.
9652
+ */
9653
+ amountInclusive: number;
9654
+ /**
9655
+ * Tax added on top of subtotals.
9656
+ */
9657
+ amountExclusive: number;
9658
+ /**
9659
+ * Three-letter currency code.
9660
+ */
9661
+ currency: string;
9662
+ /**
9663
+ * Calculation status ('complete' when Stripe Tax succeeds or 'incomplete' when Stripe Tax returned 0 or errored).
9664
+ */
9665
+ status: PreviewMultiAttachStatus;
9666
+ };
9065
9667
  /**
9066
9668
  * OK
9067
9669
  */
@@ -9107,6 +9709,10 @@ type PreviewMultiAttachResponse = {
9107
9709
  * The type of checkout that will be used if the customer is redirected to a checkout page.
9108
9710
  */
9109
9711
  checkoutType: PreviewMultiAttachCheckoutType | null;
9712
+ /**
9713
+ * Tax preview for the immediate charge. Contact us to enable the tax flag on your organisation. Shows only with flag enabled, a Stripe customer exists and has a location.
9714
+ */
9715
+ tax?: PreviewMultiAttachTax | undefined;
9110
9716
  };
9111
9717
 
9112
9718
  /**
@@ -10300,6 +10906,10 @@ type SetupPaymentParams = {
10300
10906
  * If true, skips any billing changes for the attach operation.
10301
10907
  */
10302
10908
  noBillingChanges?: boolean | undefined;
10909
+ /**
10910
+ * If true, the customer's plan is activated immediately even when payment is deferred (invoice mode) or pending (Stripe checkout). For Stripe checkout, the customer_product is inserted before the customer completes the hosted form.
10911
+ */
10912
+ enablePlanImmediately?: boolean | undefined;
10303
10913
  };
10304
10914
  /**
10305
10915
  * OK
@@ -10362,10 +10972,41 @@ type TrackParams = {
10362
10972
  } | undefined;
10363
10973
  lock?: TrackLock | undefined;
10364
10974
  };
10975
+ /**
10976
+ * Accepted. Autumn is experiencing degraded service from a downstream provider, so the event was accepted for replay and will be tracked as soon as the service is restored.
10977
+ */
10978
+ type TrackResponseBody2 = {
10979
+ /**
10980
+ * The ID of the customer whose usage was tracked.
10981
+ */
10982
+ customerId: string;
10983
+ /**
10984
+ * The ID of the entity, if entity-scoped tracking was performed.
10985
+ */
10986
+ entityId?: string | undefined;
10987
+ /**
10988
+ * The event name that was tracked, if event_name was used instead of feature_id.
10989
+ */
10990
+ eventName?: string | undefined;
10991
+ /**
10992
+ * The amount of usage that was recorded.
10993
+ */
10994
+ value: number;
10995
+ /**
10996
+ * The updated balance for the tracked feature. Null if tracking by event_name that affects multiple features.
10997
+ */
10998
+ balance: Balance | null;
10999
+ /**
11000
+ * Map of feature_id to updated balance when tracking by event_name affects multiple features.
11001
+ */
11002
+ balances?: {
11003
+ [k: string]: Balance;
11004
+ } | undefined;
11005
+ };
10365
11006
  /**
10366
11007
  * OK
10367
11008
  */
10368
- type TrackResponse = {
11009
+ type TrackResponseBody1 = {
10369
11010
  /**
10370
11011
  * The ID of the customer whose usage was tracked.
10371
11012
  */
@@ -10393,6 +11034,7 @@ type TrackResponse = {
10393
11034
  [k: string]: Balance;
10394
11035
  } | undefined;
10395
11036
  };
11037
+ type TrackResponse = TrackResponseBody1 | TrackResponseBody2;
10396
11038
 
10397
11039
  /**
10398
11040
  * Target a specific balance by its reset interval. Use when the customer has multiple balances for the same feature with different reset intervals.
@@ -10661,10 +11303,39 @@ declare const UpdateCustomerEnv: {
10661
11303
  * The environment this customer was created in.
10662
11304
  */
10663
11305
  type UpdateCustomerEnv = OpenEnum<typeof UpdateCustomerEnv>;
11306
+ declare const UpdateCustomerIntervalResponse2: {
11307
+ readonly Hour: "hour";
11308
+ readonly Day: "day";
11309
+ readonly Week: "week";
11310
+ readonly Month: "month";
11311
+ };
11312
+ type UpdateCustomerIntervalResponse2 = OpenEnum<typeof UpdateCustomerIntervalResponse2>;
11313
+ type UpdateCustomerPurchaseLimitResponse2 = {
11314
+ /**
11315
+ * The time interval for the purchase limit window. Null when no purchase limit is configured.
11316
+ */
11317
+ interval: UpdateCustomerIntervalResponse2 | null;
11318
+ /**
11319
+ * Number of intervals in the purchase limit window. Null when no purchase limit is configured.
11320
+ */
11321
+ intervalCount: number | null;
11322
+ /**
11323
+ * Maximum number of auto top-ups allowed within the interval. Null when no purchase limit is configured.
11324
+ */
11325
+ limit: number | null;
11326
+ /**
11327
+ * Number of auto top-ups already consumed in the current window.
11328
+ */
11329
+ count: number;
11330
+ /**
11331
+ * Unix ms timestamp when the current purchase window ends and the count resets.
11332
+ */
11333
+ nextResetAt: number;
11334
+ };
10664
11335
  /**
10665
11336
  * The time interval for the purchase limit window.
10666
11337
  */
10667
- declare const UpdateCustomerIntervalResponse: {
11338
+ declare const UpdateCustomerIntervalResponse1: {
10668
11339
  readonly Hour: "hour";
10669
11340
  readonly Day: "day";
10670
11341
  readonly Week: "week";
@@ -10673,15 +11344,12 @@ declare const UpdateCustomerIntervalResponse: {
10673
11344
  /**
10674
11345
  * The time interval for the purchase limit window.
10675
11346
  */
10676
- type UpdateCustomerIntervalResponse = OpenEnum<typeof UpdateCustomerIntervalResponse>;
10677
- /**
10678
- * Optional rate limit to cap how often auto top-ups occur.
10679
- */
10680
- type UpdateCustomerPurchaseLimitResponse = {
11347
+ type UpdateCustomerIntervalResponse1 = OpenEnum<typeof UpdateCustomerIntervalResponse1>;
11348
+ type UpdateCustomerPurchaseLimitResponse1 = {
10681
11349
  /**
10682
11350
  * The time interval for the purchase limit window.
10683
11351
  */
10684
- interval: UpdateCustomerIntervalResponse;
11352
+ interval: UpdateCustomerIntervalResponse1;
10685
11353
  /**
10686
11354
  * Number of intervals in the purchase limit window.
10687
11355
  */
@@ -10709,9 +11377,9 @@ type UpdateCustomerAutoTopupResponse = {
10709
11377
  */
10710
11378
  quantity: number;
10711
11379
  /**
10712
- * Optional rate limit to cap how often auto top-ups occur.
11380
+ * Optional rate limit to cap how often auto top-ups occur. Expand billing_controls.auto_topups.purchase_limit for a count of top ups and the next_reset_at.
10713
11381
  */
10714
- purchaseLimit?: UpdateCustomerPurchaseLimitResponse | undefined;
11382
+ purchaseLimit?: UpdateCustomerPurchaseLimitResponse2 | UpdateCustomerPurchaseLimitResponse1 | undefined;
10715
11383
  /**
10716
11384
  * When true, auto top-up creates a send_invoice invoice instead of auto-charging.
10717
11385
  */
@@ -12617,6 +13285,7 @@ declare class Billing extends ClientSDK {
12617
13285
  * @param carryOverUsages - Whether to carry over usages from the previous plan. (optional)
12618
13286
  * @param metadata - Key-value metadata to attach to the Stripe subscription, invoice, and checkout session created during this attach flow. Keys prefixed with 'autumn_' are reserved and will be stripped. (optional)
12619
13287
  * @param noBillingChanges - If true, skips any billing changes for the attach operation. (optional)
13288
+ * @param enablePlanImmediately - If true, the customer's plan is activated immediately even when payment is deferred (invoice mode) or pending (Stripe checkout). For Stripe checkout, the customer_product is inserted before the customer completes the hosted form. (optional)
12620
13289
  *
12621
13290
  * @returns A billing response with customer ID, invoice details, and payment URL (if checkout required).
12622
13291
  */
@@ -12654,6 +13323,7 @@ declare class Billing extends ClientSDK {
12654
13323
  * @param checkoutSessionParams - Additional parameters to pass into the creation of the Stripe checkout session. (optional)
12655
13324
  * @param redirectMode - Controls when to return a checkout URL. 'always' returns a URL even if payment succeeds, 'if_required' only when payment action is needed, 'never' disables redirects. (optional)
12656
13325
  * @param newBillingSubscription - Only applicable when the customer has an existing Stripe subscription. If true, creates a new separate subscription instead of merging into the existing one. (optional)
13326
+ * @param enablePlanImmediately - If true, the cusProducts are activated immediately even when payment is pending via Stripe checkout. (optional)
12657
13327
  *
12658
13328
  * @returns A billing response with customer ID, invoice details, and payment URL (if checkout required).
12659
13329
  */
@@ -12691,6 +13361,7 @@ declare class Billing extends ClientSDK {
12691
13361
  * @param carryOverUsages - Whether to carry over usages from the previous plan. (optional)
12692
13362
  * @param metadata - Key-value metadata to attach to the Stripe subscription, invoice, and checkout session created during this attach flow. Keys prefixed with 'autumn_' are reserved and will be stripped. (optional)
12693
13363
  * @param noBillingChanges - If true, skips any billing changes for the attach operation. (optional)
13364
+ * @param enablePlanImmediately - If true, the customer's plan is activated immediately even when payment is deferred (invoice mode) or pending (Stripe checkout). For Stripe checkout, the customer_product is inserted before the customer completes the hosted form. (optional)
12694
13365
  *
12695
13366
  * @returns A preview response with line items, totals, and effective dates for the proposed changes.
12696
13367
  */
@@ -12716,6 +13387,7 @@ declare class Billing extends ClientSDK {
12716
13387
  * @param checkoutSessionParams - Additional parameters to pass into the creation of the Stripe checkout session. (optional)
12717
13388
  * @param redirectMode - Controls when to return a checkout URL. 'always' returns a URL even if payment succeeds, 'if_required' only when payment action is needed, 'never' disables redirects. (optional)
12718
13389
  * @param newBillingSubscription - Only applicable when the customer has an existing Stripe subscription. If true, creates a new separate subscription instead of merging into the existing one. (optional)
13390
+ * @param enablePlanImmediately - If true, the cusProducts are activated immediately even when payment is pending via Stripe checkout. (optional)
12719
13391
  *
12720
13392
  * @returns A preview response with line items, totals, and effective dates for the proposed multi-plan attachment.
12721
13393
  */
@@ -13307,7 +13979,7 @@ declare class Autumn extends ClientSDK {
13307
13979
  * @param lock - Reserve units of a feature upfront by passing a lock_id, then call balances.finalize to confirm or release the hold. (optional)
13308
13980
  * @param withPreview - If true, includes upgrade/upsell information in the response when access is denied. Useful for displaying paywalls. (optional)
13309
13981
  *
13310
- * @returns Whether access is allowed, plus the current balance for that feature.
13982
+ * @returns Whether access is allowed, plus the current balance for that feature. If Autumn is experiencing degraded service from a downstream provider, the API may return 202 and allow access fail-open.
13311
13983
  */
13312
13984
  check(request: CheckParams, options?: RequestOptions): Promise<CheckResponse>;
13313
13985
  /**
@@ -13334,7 +14006,7 @@ declare class Autumn extends ClientSDK {
13334
14006
  * @param value - The amount of usage to record. Defaults to 1. Use negative values to credit balance (e.g., when removing a seat). (optional)
13335
14007
  * @param properties - Additional properties to attach to this usage event. (optional)
13336
14008
  *
13337
- * @returns The usage value recorded, with either a single updated balance or a map of updated balances.
14009
+ * @returns The usage value recorded, with either a single updated balance or a map of updated balances. If Autumn is experiencing degraded service from a downstream provider, the API may return 202 after accepting the event for replay so it can be tracked as soon as the service is restored.
13338
14010
  */
13339
14011
  track(request: TrackParams, options?: RequestOptions): Promise<TrackResponse>;
13340
14012
  }