autumn-js 1.3.13 → 1.3.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 (102) hide show
  1. package/dist/backend/adapters/express.js +10761 -10483
  2. package/dist/backend/adapters/express.mjs +5 -5
  3. package/dist/backend/adapters/fetch.js +10761 -10483
  4. package/dist/backend/adapters/fetch.mjs +5 -5
  5. package/dist/backend/adapters/hono.js +10761 -10483
  6. package/dist/backend/adapters/hono.mjs +5 -5
  7. package/dist/backend/adapters/index.js +10761 -10483
  8. package/dist/backend/adapters/index.mjs +8 -8
  9. package/dist/backend/adapters/next.js +10761 -10483
  10. package/dist/backend/adapters/next.mjs +5 -5
  11. package/dist/backend/{chunk-C2NPCEJI.mjs → chunk-3NWZ5JCS.mjs} +1 -1
  12. package/dist/backend/{chunk-C6ZZJ7EE.mjs → chunk-5L2FQENX.mjs} +1 -1
  13. package/dist/backend/{chunk-IAILCOBU.mjs → chunk-HLTECDHI.mjs} +10740 -10478
  14. package/dist/backend/{chunk-R6G7SG3N.mjs → chunk-ITZ2QE2R.mjs} +16 -0
  15. package/dist/backend/{chunk-DPUV4QAN.mjs → chunk-NFNIIF6U.mjs} +1 -1
  16. package/dist/backend/{chunk-2UUPONJZ.mjs → chunk-QRHOBVQP.mjs} +1 -1
  17. package/dist/backend/{chunk-SYMBZ24L.mjs → chunk-SQEGXZCR.mjs} +2 -2
  18. package/dist/backend/{chunk-XJWHTUI6.mjs → chunk-WTIOYLNM.mjs} +2 -2
  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 +10761 -10483
  22. package/dist/backend/core/handlers/coreHandler.mjs +3 -3
  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/handleRouteByName.js +10761 -10483
  26. package/dist/backend/core/handlers/handleRouteByName.mjs +3 -3
  27. package/dist/backend/core/handlers/index.d.mts +1 -1
  28. package/dist/backend/core/handlers/index.d.ts +1 -1
  29. package/dist/backend/core/handlers/index.js +10761 -10483
  30. package/dist/backend/core/handlers/index.mjs +4 -4
  31. package/dist/backend/core/index.d.mts +1 -1
  32. package/dist/backend/core/index.d.ts +1 -1
  33. package/dist/backend/core/index.js +10761 -10483
  34. package/dist/backend/core/index.mjs +4 -4
  35. package/dist/backend/core/routes/index.d.mts +1 -1
  36. package/dist/backend/core/routes/index.d.ts +1 -1
  37. package/dist/backend/core/routes/index.js +16 -0
  38. package/dist/backend/core/routes/index.mjs +1 -1
  39. package/dist/backend/core/routes/routeBuilder.d.mts +1 -1
  40. package/dist/backend/core/routes/routeBuilder.d.ts +1 -1
  41. package/dist/backend/core/routes/routeConfigs.d.mts +1 -1
  42. package/dist/backend/core/routes/routeConfigs.d.ts +1 -1
  43. package/dist/backend/core/routes/routeConfigs.js +16 -0
  44. package/dist/backend/core/routes/routeConfigs.mjs +1 -1
  45. package/dist/backend/core/types/handlerTypes.d.mts +1 -1
  46. package/dist/backend/core/types/handlerTypes.d.ts +1 -1
  47. package/dist/backend/core/types/index.d.mts +1 -1
  48. package/dist/backend/core/types/index.d.ts +1 -1
  49. package/dist/backend/core/types/routeTypes.d.mts +1 -1
  50. package/dist/backend/core/types/routeTypes.d.ts +1 -1
  51. package/dist/backend/index.d.mts +2 -2
  52. package/dist/backend/index.d.ts +2 -2
  53. package/dist/backend/index.js +10761 -10483
  54. package/dist/backend/index.mjs +4 -4
  55. package/dist/backend/{routeTypes-CIZ-ZBtX.d.ts → routeTypes-BO-VBvq4.d.ts} +108 -1
  56. package/dist/backend/{routeTypes-BoCJIb-T.d.mts → routeTypes-BPqyn4tP.d.mts} +108 -1
  57. package/dist/better-auth/{chunk-U5BLUB3E.mjs → chunk-AXWF2UCR.mjs} +16 -0
  58. package/dist/better-auth/{chunk-C6ATXDH4.mjs → chunk-IQCXDDKS.mjs} +10741 -10479
  59. package/dist/better-auth/{chunk-CWELMXBP.mjs → chunk-IT7LJSHT.mjs} +1 -1
  60. package/dist/better-auth/index.js +10761 -10483
  61. package/dist/better-auth/index.mjs +3 -3
  62. package/dist/better-auth/utils/createAutumnEndpoint.js +16 -0
  63. package/dist/better-auth/utils/createAutumnEndpoint.mjs +2 -2
  64. package/dist/better-auth/utils/handleBetterAuthRoute.js +10761 -10483
  65. package/dist/better-auth/utils/handleBetterAuthRoute.mjs +2 -2
  66. package/dist/better-auth/utils/index.js +10761 -10483
  67. package/dist/better-auth/utils/index.mjs +3 -3
  68. package/dist/react/AutumnContext.d.mts +1 -1
  69. package/dist/react/AutumnContext.d.ts +1 -1
  70. package/dist/react/client/AutumnClient.d.mts +1 -1
  71. package/dist/react/client/AutumnClient.d.ts +1 -1
  72. package/dist/react/client/IAutumnClient.d.mts +1 -1
  73. package/dist/react/client/IAutumnClient.d.ts +1 -1
  74. package/dist/react/client/index.d.mts +1 -1
  75. package/dist/react/client/index.d.ts +1 -1
  76. package/dist/react/hooks/index.d.mts +1 -1
  77. package/dist/react/hooks/index.d.ts +1 -1
  78. package/dist/react/hooks/internal/getLocalCheckResponse.d.mts +1 -1
  79. package/dist/react/hooks/internal/getLocalCheckResponse.d.ts +1 -1
  80. package/dist/react/hooks/internal/useCustomerActions.d.mts +1 -1
  81. package/dist/react/hooks/internal/useCustomerActions.d.ts +1 -1
  82. package/dist/react/hooks/useAggregateEvents.d.mts +1 -1
  83. package/dist/react/hooks/useAggregateEvents.d.ts +1 -1
  84. package/dist/react/hooks/useCustomer.d.mts +1 -1
  85. package/dist/react/hooks/useCustomer.d.ts +1 -1
  86. package/dist/react/hooks/useEntity.d.mts +1 -1
  87. package/dist/react/hooks/useEntity.d.ts +1 -1
  88. package/dist/react/hooks/useListEvents.d.mts +1 -1
  89. package/dist/react/hooks/useListEvents.d.ts +1 -1
  90. package/dist/react/hooks/useListPlans.d.mts +1 -1
  91. package/dist/react/hooks/useListPlans.d.ts +1 -1
  92. package/dist/react/hooks/useReferrals.d.mts +1 -1
  93. package/dist/react/hooks/useReferrals.d.ts +1 -1
  94. package/dist/react/index.d.mts +1 -1
  95. package/dist/react/index.d.ts +1 -1
  96. package/dist/react/{params-B5IVa4Ut.d.mts → params-BNmjxPTb.d.mts} +26 -0
  97. package/dist/react/{params-CT8HBmlA.d.ts → params-DOhtJtIQ.d.ts} +26 -0
  98. package/dist/sdk/index.d.mts +158 -2
  99. package/dist/sdk/index.d.ts +158 -2
  100. package/dist/sdk/index.js +343 -39
  101. package/dist/sdk/index.mjs +328 -40
  102. package/package.json +2 -2
@@ -1,10 +1,10 @@
1
1
  import "./chunk-WYDGEDEU.mjs";
2
2
  import "./chunk-VXND2UDT.mjs";
3
- import "./chunk-SYMBZ24L.mjs";
3
+ import "./chunk-SQEGXZCR.mjs";
4
4
  import {
5
5
  createCoreHandler
6
- } from "./chunk-XJWHTUI6.mjs";
7
- import "./chunk-IAILCOBU.mjs";
6
+ } from "./chunk-WTIOYLNM.mjs";
7
+ import "./chunk-HLTECDHI.mjs";
8
8
  import "./chunk-MOHYGUMA.mjs";
9
9
  import "./chunk-TBQ27LIK.mjs";
10
10
  import "./chunk-J44WR3QZ.mjs";
@@ -14,7 +14,7 @@ import {
14
14
  } from "./chunk-UAR3TMWI.mjs";
15
15
  import {
16
16
  routeConfigs
17
- } from "./chunk-R6G7SG3N.mjs";
17
+ } from "./chunk-ITZ2QE2R.mjs";
18
18
  import "./chunk-OTXV5FY7.mjs";
19
19
  import {
20
20
  secretKeyCheck
@@ -5621,6 +5621,15 @@ type BillingUpdateAttachDiscount = {
5621
5621
  */
5622
5622
  promotionCode?: string | undefined;
5623
5623
  };
5624
+ /**
5625
+ * A discount to remove from the subscription. Discounts that are no longer applied are ignored.
5626
+ */
5627
+ type BillingUpdateRemoveDiscount = {
5628
+ /**
5629
+ * The ID of the reward (or Stripe coupon) to remove.
5630
+ */
5631
+ rewardId: string;
5632
+ };
5624
5633
  type BillingUpdateCustomLineItem = {
5625
5634
  /**
5626
5635
  * Amount in dollars for this line item (e.g. 10.50). Can be negative for credits.
@@ -5735,6 +5744,10 @@ type UpdateSubscriptionParams = {
5735
5744
  * List of discounts to apply. Each discount can be an Autumn reward ID, Stripe coupon ID, or Stripe promotion code.
5736
5745
  */
5737
5746
  discounts?: Array<BillingUpdateAttachDiscount> | undefined;
5747
+ /**
5748
+ * Discounts to remove from the subscription, by reward ID. Discounts not listed are left unchanged.
5749
+ */
5750
+ removeDiscounts?: Array<BillingUpdateRemoveDiscount> | undefined;
5738
5751
  /**
5739
5752
  * Custom line items that replace the auto-generated proration invoice, or bill a standalone invoice when nothing else changes. Only valid on an existing recurring subscription.
5740
5753
  */
@@ -24096,6 +24109,34 @@ type DeleteSandboxResponse = {
24096
24109
  success: true;
24097
24110
  };
24098
24111
 
24112
+ /**
24113
+ * Stripe connection environment to inspect or disconnect.
24114
+ */
24115
+ declare const DisconnectStripeEnv: {
24116
+ readonly Test: "test";
24117
+ readonly Live: "live";
24118
+ };
24119
+ /**
24120
+ * Stripe connection environment to inspect or disconnect.
24121
+ */
24122
+ type DisconnectStripeEnv = ClosedEnum<typeof DisconnectStripeEnv>;
24123
+ type DisconnectStripeParams = {
24124
+ /**
24125
+ * Public tenant organization slug, without the master organization suffix.
24126
+ */
24127
+ organizationSlug: string;
24128
+ /**
24129
+ * Stripe connection environment to inspect or disconnect.
24130
+ */
24131
+ env: DisconnectStripeEnv;
24132
+ };
24133
+ /**
24134
+ * OK
24135
+ */
24136
+ type DisconnectStripeResponse = {
24137
+ success: true;
24138
+ };
24139
+
24099
24140
  /**
24100
24141
  * Use 'confirm' to commit the deduction, or 'release' to return the held balance.
24101
24142
  */
@@ -29682,6 +29723,45 @@ type GetRewardResponse = {
29682
29723
  featureGrant?: GetRewardFeatureGrant | undefined;
29683
29724
  };
29684
29725
 
29726
+ /**
29727
+ * Stripe connection environment to inspect or disconnect.
29728
+ */
29729
+ declare const GetStripeConnectionEnv: {
29730
+ readonly Test: "test";
29731
+ readonly Live: "live";
29732
+ };
29733
+ /**
29734
+ * Stripe connection environment to inspect or disconnect.
29735
+ */
29736
+ type GetStripeConnectionEnv = ClosedEnum<typeof GetStripeConnectionEnv>;
29737
+ type GetStripeConnectionParams = {
29738
+ /**
29739
+ * Public tenant organization slug, without the master organization suffix.
29740
+ */
29741
+ organizationSlug: string;
29742
+ /**
29743
+ * Stripe connection environment to inspect or disconnect.
29744
+ */
29745
+ env: GetStripeConnectionEnv;
29746
+ };
29747
+ /**
29748
+ * OK
29749
+ */
29750
+ type GetStripeConnectionResponse = {
29751
+ /**
29752
+ * Whether an OAuth connection is stored. Excludes platform-managed accounts, default sandbox accounts, and separate secret-key connections.
29753
+ */
29754
+ connected: boolean;
29755
+ /**
29756
+ * OAuth-connected Stripe account ID, or null when absent.
29757
+ */
29758
+ accountId: string | null;
29759
+ /**
29760
+ * Connection timestamp in Unix milliseconds, or null for historical connections without a timestamp and when disconnected.
29761
+ */
29762
+ connectedAt: number | null;
29763
+ };
29764
+
29685
29765
  /**
29686
29766
  * Base class for all HTTP errors.
29687
29767
  */
@@ -47215,6 +47295,15 @@ type PreviewUpdateAttachDiscount = {
47215
47295
  */
47216
47296
  promotionCode?: string | undefined;
47217
47297
  };
47298
+ /**
47299
+ * A discount to remove from the subscription. Discounts that are no longer applied are ignored.
47300
+ */
47301
+ type PreviewUpdateRemoveDiscount = {
47302
+ /**
47303
+ * The ID of the reward (or Stripe coupon) to remove.
47304
+ */
47305
+ rewardId: string;
47306
+ };
47218
47307
  type PreviewUpdateCustomLineItem = {
47219
47308
  /**
47220
47309
  * Amount in dollars for this line item (e.g. 10.50). Can be negative for credits.
@@ -47329,6 +47418,10 @@ type PreviewUpdateParams = {
47329
47418
  * List of discounts to apply. Each discount can be an Autumn reward ID, Stripe coupon ID, or Stripe promotion code.
47330
47419
  */
47331
47420
  discounts?: Array<PreviewUpdateAttachDiscount> | undefined;
47421
+ /**
47422
+ * Discounts to remove from the subscription, by reward ID. Discounts not listed are left unchanged.
47423
+ */
47424
+ removeDiscounts?: Array<PreviewUpdateRemoveDiscount> | undefined;
47332
47425
  /**
47333
47426
  * Custom line items that replace the auto-generated proration invoice, or bill a standalone invoice when nothing else changes. Only valid on an existing recurring subscription.
47334
47427
  */
@@ -47817,6 +47910,10 @@ type CustomField = {
47817
47910
  * Changes that apply to the replacement invoice only.
47818
47911
  */
47819
47912
  type ReissueInvoiceInvoiceRequestBody = {
47913
+ /**
47914
+ * Enable or disable Stripe automatic tax on the replacement. Omit to inherit. Enabling clears inherited manual tax rates; use tax_rate_id: null to remove all tax.
47915
+ */
47916
+ automaticTax?: boolean | undefined;
47820
47917
  /**
47821
47918
  * Fields shown on this invoice only, such as a PO number. Up to four; pass an empty array to clear them.
47822
47919
  */
@@ -48494,7 +48591,7 @@ type ReissueInvoiceParams = {
48494
48591
  */
48495
48592
  invoiceTemplateId?: string | undefined;
48496
48593
  /**
48497
- * Number of days the customer has to pay the replacement invoice. Defaults to the original invoice's due date; required when that date has already passed.
48594
+ * Number of days the customer has to pay the replacement invoice. Defaults to the original invoice's due date; required when that date has already passed. A card-charged invoice has no due date and its replacement is charged immediately; setting this makes the replacement a send-invoice one instead.
48498
48595
  */
48499
48596
  netTermsDays?: number | undefined;
48500
48597
  /**
@@ -61684,6 +61781,7 @@ declare class Billing extends ClientSDK {
61684
61781
  * @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)
61685
61782
  * @param subscriptionId - A unique ID to identify this subscription. Can be used to target specific subscriptions in update operations when a customer has multiple products with the same plan. (optional)
61686
61783
  * @param discounts - List of discounts to apply. Each discount can be an Autumn reward ID, Stripe coupon ID, or Stripe promotion code. (optional)
61784
+ * @param removeDiscounts - Discounts to remove from the subscription, by reward ID. Discounts not listed are left unchanged. (optional)
61687
61785
  * @param customLineItems - Custom line items that replace the auto-generated proration invoice, or bill a standalone invoice when nothing else changes. Only valid on an existing recurring subscription. (optional)
61688
61786
  * @param cancelAction - Action to perform for cancellation. 'cancel_immediately' cancels now with prorated refund, 'cancel_end_of_cycle' cancels at period end, 'uncancel' reverses a pending cancellation. (optional)
61689
61787
  * @param billingCycleAnchor - Reset the billing cycle immediately with 'now', or schedule a reset at a future Unix timestamp in milliseconds. (optional)
@@ -61720,6 +61818,7 @@ declare class Billing extends ClientSDK {
61720
61818
  * @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)
61721
61819
  * @param subscriptionId - A unique ID to identify this subscription. Can be used to target specific subscriptions in update operations when a customer has multiple products with the same plan. (optional)
61722
61820
  * @param discounts - List of discounts to apply. Each discount can be an Autumn reward ID, Stripe coupon ID, or Stripe promotion code. (optional)
61821
+ * @param removeDiscounts - Discounts to remove from the subscription, by reward ID. Discounts not listed are left unchanged. (optional)
61723
61822
  * @param customLineItems - Custom line items that replace the auto-generated proration invoice, or bill a standalone invoice when nothing else changes. Only valid on an existing recurring subscription. (optional)
61724
61823
  * @param cancelAction - Action to perform for cancellation. 'cancel_immediately' cancels now with prorated refund, 'cancel_end_of_cycle' cancels at period end, 'uncancel' reverses a pending cancellation. (optional)
61725
61824
  * @param billingCycleAnchor - Reset the billing cycle immediately with 'now', or schedule a reset at a future Unix timestamp in milliseconds. (optional)
@@ -62376,6 +62475,14 @@ declare class Plans extends ClientSDK {
62376
62475
  }
62377
62476
 
62378
62477
  declare class Platform extends ClientSDK {
62478
+ /**
62479
+ * Read a managed organization's Stripe OAuth connection, account ID, and authorization time in the selected environment.
62480
+ */
62481
+ getStripeConnection(request: GetStripeConnectionParams, options?: RequestOptions): Promise<GetStripeConnectionResponse>;
62482
+ /**
62483
+ * Revoke Autumn's Stripe OAuth access for a managed organization in the selected environment. Does not delete the Stripe account or cancel subscriptions.
62484
+ */
62485
+ disconnectStripe(request: DisconnectStripeParams, options?: RequestOptions): Promise<DisconnectStripeResponse>;
62379
62486
  /**
62380
62487
  * Generate a RevenueCat OAuth URL for linking a project to an organization.
62381
62488
  */
@@ -5621,6 +5621,15 @@ type BillingUpdateAttachDiscount = {
5621
5621
  */
5622
5622
  promotionCode?: string | undefined;
5623
5623
  };
5624
+ /**
5625
+ * A discount to remove from the subscription. Discounts that are no longer applied are ignored.
5626
+ */
5627
+ type BillingUpdateRemoveDiscount = {
5628
+ /**
5629
+ * The ID of the reward (or Stripe coupon) to remove.
5630
+ */
5631
+ rewardId: string;
5632
+ };
5624
5633
  type BillingUpdateCustomLineItem = {
5625
5634
  /**
5626
5635
  * Amount in dollars for this line item (e.g. 10.50). Can be negative for credits.
@@ -5735,6 +5744,10 @@ type UpdateSubscriptionParams = {
5735
5744
  * List of discounts to apply. Each discount can be an Autumn reward ID, Stripe coupon ID, or Stripe promotion code.
5736
5745
  */
5737
5746
  discounts?: Array<BillingUpdateAttachDiscount> | undefined;
5747
+ /**
5748
+ * Discounts to remove from the subscription, by reward ID. Discounts not listed are left unchanged.
5749
+ */
5750
+ removeDiscounts?: Array<BillingUpdateRemoveDiscount> | undefined;
5738
5751
  /**
5739
5752
  * Custom line items that replace the auto-generated proration invoice, or bill a standalone invoice when nothing else changes. Only valid on an existing recurring subscription.
5740
5753
  */
@@ -24096,6 +24109,34 @@ type DeleteSandboxResponse = {
24096
24109
  success: true;
24097
24110
  };
24098
24111
 
24112
+ /**
24113
+ * Stripe connection environment to inspect or disconnect.
24114
+ */
24115
+ declare const DisconnectStripeEnv: {
24116
+ readonly Test: "test";
24117
+ readonly Live: "live";
24118
+ };
24119
+ /**
24120
+ * Stripe connection environment to inspect or disconnect.
24121
+ */
24122
+ type DisconnectStripeEnv = ClosedEnum<typeof DisconnectStripeEnv>;
24123
+ type DisconnectStripeParams = {
24124
+ /**
24125
+ * Public tenant organization slug, without the master organization suffix.
24126
+ */
24127
+ organizationSlug: string;
24128
+ /**
24129
+ * Stripe connection environment to inspect or disconnect.
24130
+ */
24131
+ env: DisconnectStripeEnv;
24132
+ };
24133
+ /**
24134
+ * OK
24135
+ */
24136
+ type DisconnectStripeResponse = {
24137
+ success: true;
24138
+ };
24139
+
24099
24140
  /**
24100
24141
  * Use 'confirm' to commit the deduction, or 'release' to return the held balance.
24101
24142
  */
@@ -29682,6 +29723,45 @@ type GetRewardResponse = {
29682
29723
  featureGrant?: GetRewardFeatureGrant | undefined;
29683
29724
  };
29684
29725
 
29726
+ /**
29727
+ * Stripe connection environment to inspect or disconnect.
29728
+ */
29729
+ declare const GetStripeConnectionEnv: {
29730
+ readonly Test: "test";
29731
+ readonly Live: "live";
29732
+ };
29733
+ /**
29734
+ * Stripe connection environment to inspect or disconnect.
29735
+ */
29736
+ type GetStripeConnectionEnv = ClosedEnum<typeof GetStripeConnectionEnv>;
29737
+ type GetStripeConnectionParams = {
29738
+ /**
29739
+ * Public tenant organization slug, without the master organization suffix.
29740
+ */
29741
+ organizationSlug: string;
29742
+ /**
29743
+ * Stripe connection environment to inspect or disconnect.
29744
+ */
29745
+ env: GetStripeConnectionEnv;
29746
+ };
29747
+ /**
29748
+ * OK
29749
+ */
29750
+ type GetStripeConnectionResponse = {
29751
+ /**
29752
+ * Whether an OAuth connection is stored. Excludes platform-managed accounts, default sandbox accounts, and separate secret-key connections.
29753
+ */
29754
+ connected: boolean;
29755
+ /**
29756
+ * OAuth-connected Stripe account ID, or null when absent.
29757
+ */
29758
+ accountId: string | null;
29759
+ /**
29760
+ * Connection timestamp in Unix milliseconds, or null for historical connections without a timestamp and when disconnected.
29761
+ */
29762
+ connectedAt: number | null;
29763
+ };
29764
+
29685
29765
  /**
29686
29766
  * Base class for all HTTP errors.
29687
29767
  */
@@ -47215,6 +47295,15 @@ type PreviewUpdateAttachDiscount = {
47215
47295
  */
47216
47296
  promotionCode?: string | undefined;
47217
47297
  };
47298
+ /**
47299
+ * A discount to remove from the subscription. Discounts that are no longer applied are ignored.
47300
+ */
47301
+ type PreviewUpdateRemoveDiscount = {
47302
+ /**
47303
+ * The ID of the reward (or Stripe coupon) to remove.
47304
+ */
47305
+ rewardId: string;
47306
+ };
47218
47307
  type PreviewUpdateCustomLineItem = {
47219
47308
  /**
47220
47309
  * Amount in dollars for this line item (e.g. 10.50). Can be negative for credits.
@@ -47329,6 +47418,10 @@ type PreviewUpdateParams = {
47329
47418
  * List of discounts to apply. Each discount can be an Autumn reward ID, Stripe coupon ID, or Stripe promotion code.
47330
47419
  */
47331
47420
  discounts?: Array<PreviewUpdateAttachDiscount> | undefined;
47421
+ /**
47422
+ * Discounts to remove from the subscription, by reward ID. Discounts not listed are left unchanged.
47423
+ */
47424
+ removeDiscounts?: Array<PreviewUpdateRemoveDiscount> | undefined;
47332
47425
  /**
47333
47426
  * Custom line items that replace the auto-generated proration invoice, or bill a standalone invoice when nothing else changes. Only valid on an existing recurring subscription.
47334
47427
  */
@@ -47817,6 +47910,10 @@ type CustomField = {
47817
47910
  * Changes that apply to the replacement invoice only.
47818
47911
  */
47819
47912
  type ReissueInvoiceInvoiceRequestBody = {
47913
+ /**
47914
+ * Enable or disable Stripe automatic tax on the replacement. Omit to inherit. Enabling clears inherited manual tax rates; use tax_rate_id: null to remove all tax.
47915
+ */
47916
+ automaticTax?: boolean | undefined;
47820
47917
  /**
47821
47918
  * Fields shown on this invoice only, such as a PO number. Up to four; pass an empty array to clear them.
47822
47919
  */
@@ -48494,7 +48591,7 @@ type ReissueInvoiceParams = {
48494
48591
  */
48495
48592
  invoiceTemplateId?: string | undefined;
48496
48593
  /**
48497
- * Number of days the customer has to pay the replacement invoice. Defaults to the original invoice's due date; required when that date has already passed.
48594
+ * Number of days the customer has to pay the replacement invoice. Defaults to the original invoice's due date; required when that date has already passed. A card-charged invoice has no due date and its replacement is charged immediately; setting this makes the replacement a send-invoice one instead.
48498
48595
  */
48499
48596
  netTermsDays?: number | undefined;
48500
48597
  /**
@@ -61684,6 +61781,7 @@ declare class Billing extends ClientSDK {
61684
61781
  * @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)
61685
61782
  * @param subscriptionId - A unique ID to identify this subscription. Can be used to target specific subscriptions in update operations when a customer has multiple products with the same plan. (optional)
61686
61783
  * @param discounts - List of discounts to apply. Each discount can be an Autumn reward ID, Stripe coupon ID, or Stripe promotion code. (optional)
61784
+ * @param removeDiscounts - Discounts to remove from the subscription, by reward ID. Discounts not listed are left unchanged. (optional)
61687
61785
  * @param customLineItems - Custom line items that replace the auto-generated proration invoice, or bill a standalone invoice when nothing else changes. Only valid on an existing recurring subscription. (optional)
61688
61786
  * @param cancelAction - Action to perform for cancellation. 'cancel_immediately' cancels now with prorated refund, 'cancel_end_of_cycle' cancels at period end, 'uncancel' reverses a pending cancellation. (optional)
61689
61787
  * @param billingCycleAnchor - Reset the billing cycle immediately with 'now', or schedule a reset at a future Unix timestamp in milliseconds. (optional)
@@ -61720,6 +61818,7 @@ declare class Billing extends ClientSDK {
61720
61818
  * @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)
61721
61819
  * @param subscriptionId - A unique ID to identify this subscription. Can be used to target specific subscriptions in update operations when a customer has multiple products with the same plan. (optional)
61722
61820
  * @param discounts - List of discounts to apply. Each discount can be an Autumn reward ID, Stripe coupon ID, or Stripe promotion code. (optional)
61821
+ * @param removeDiscounts - Discounts to remove from the subscription, by reward ID. Discounts not listed are left unchanged. (optional)
61723
61822
  * @param customLineItems - Custom line items that replace the auto-generated proration invoice, or bill a standalone invoice when nothing else changes. Only valid on an existing recurring subscription. (optional)
61724
61823
  * @param cancelAction - Action to perform for cancellation. 'cancel_immediately' cancels now with prorated refund, 'cancel_end_of_cycle' cancels at period end, 'uncancel' reverses a pending cancellation. (optional)
61725
61824
  * @param billingCycleAnchor - Reset the billing cycle immediately with 'now', or schedule a reset at a future Unix timestamp in milliseconds. (optional)
@@ -62376,6 +62475,14 @@ declare class Plans extends ClientSDK {
62376
62475
  }
62377
62476
 
62378
62477
  declare class Platform extends ClientSDK {
62478
+ /**
62479
+ * Read a managed organization's Stripe OAuth connection, account ID, and authorization time in the selected environment.
62480
+ */
62481
+ getStripeConnection(request: GetStripeConnectionParams, options?: RequestOptions): Promise<GetStripeConnectionResponse>;
62482
+ /**
62483
+ * Revoke Autumn's Stripe OAuth access for a managed organization in the selected environment. Does not delete the Stripe account or cancel subscriptions.
62484
+ */
62485
+ disconnectStripe(request: DisconnectStripeParams, options?: RequestOptions): Promise<DisconnectStripeResponse>;
62379
62486
  /**
62380
62487
  * Generate a RevenueCat OAuth URL for linking a project to an organization.
62381
62488
  */
@@ -4531,6 +4531,9 @@ var previewUpdateAttachDiscountSchema = z14.object({
4531
4531
  rewardId: z14.union([z14.string(), z14.undefined()]).optional(),
4532
4532
  promotionCode: z14.union([z14.string(), z14.undefined()]).optional()
4533
4533
  });
4534
+ var previewUpdateRemoveDiscountSchema = z14.object({
4535
+ rewardId: z14.string()
4536
+ });
4534
4537
  var previewUpdateCustomLineItemSchema = z14.object({
4535
4538
  amount: z14.number(),
4536
4539
  description: z14.string()
@@ -4818,6 +4821,9 @@ var previewUpdateAttachDiscountOutboundSchema = z14.object({
4818
4821
  reward_id: z14.union([z14.string(), z14.undefined()]).optional(),
4819
4822
  promotion_code: z14.union([z14.string(), z14.undefined()]).optional()
4820
4823
  });
4824
+ var previewUpdateRemoveDiscountOutboundSchema = z14.object({
4825
+ reward_id: z14.string()
4826
+ });
4821
4827
  var previewUpdateCustomLineItemOutboundSchema = z14.object({
4822
4828
  amount: z14.number(),
4823
4829
  description: z14.string()
@@ -5055,6 +5061,7 @@ var previewUpdateParamsSchema = z14.object({
5055
5061
  redirectMode: z14.union([previewUpdateRedirectModeSchema, z14.undefined()]).optional(),
5056
5062
  subscriptionId: z14.union([z14.string(), z14.undefined()]).optional(),
5057
5063
  discounts: z14.union([z14.array(previewUpdateAttachDiscountSchema), z14.undefined()]).optional(),
5064
+ removeDiscounts: z14.union([z14.array(previewUpdateRemoveDiscountSchema), z14.undefined()]).optional(),
5058
5065
  customLineItems: z14.union([z14.array(previewUpdateCustomLineItemSchema), z14.undefined()]).optional(),
5059
5066
  cancelAction: z14.union([previewUpdateCancelActionSchema, z14.undefined()]).optional(),
5060
5067
  billingCycleAnchor: z14.union([z14.string(), z14.number(), z14.undefined()]).optional(),
@@ -5169,6 +5176,7 @@ var previewUpdateParamsOutboundSchema = z14.object({
5169
5176
  redirect_mode: z14.string(),
5170
5177
  subscription_id: z14.union([z14.string(), z14.undefined()]).optional(),
5171
5178
  discounts: z14.union([z14.array(previewUpdateAttachDiscountOutboundSchema), z14.undefined()]).optional(),
5179
+ remove_discounts: z14.union([z14.array(previewUpdateRemoveDiscountOutboundSchema), z14.undefined()]).optional(),
5172
5180
  custom_line_items: z14.union([z14.array(previewUpdateCustomLineItemOutboundSchema), z14.undefined()]).optional(),
5173
5181
  cancel_action: z14.union([z14.string(), z14.undefined()]).optional(),
5174
5182
  billing_cycle_anchor: z14.union([z14.string(), z14.number(), z14.undefined()]).optional(),
@@ -5891,6 +5899,9 @@ var billingUpdateAttachDiscountSchema = z17.object({
5891
5899
  rewardId: z17.union([z17.string(), z17.undefined()]).optional(),
5892
5900
  promotionCode: z17.union([z17.string(), z17.undefined()]).optional()
5893
5901
  });
5902
+ var billingUpdateRemoveDiscountSchema = z17.object({
5903
+ rewardId: z17.string()
5904
+ });
5894
5905
  var billingUpdateCustomLineItemSchema = z17.object({
5895
5906
  amount: z17.number(),
5896
5907
  description: z17.string()
@@ -6113,6 +6124,9 @@ var billingUpdateAttachDiscountOutboundSchema = z17.object({
6113
6124
  reward_id: z17.union([z17.string(), z17.undefined()]).optional(),
6114
6125
  promotion_code: z17.union([z17.string(), z17.undefined()]).optional()
6115
6126
  });
6127
+ var billingUpdateRemoveDiscountOutboundSchema = z17.object({
6128
+ reward_id: z17.string()
6129
+ });
6116
6130
  var billingUpdateCustomLineItemOutboundSchema = z17.object({
6117
6131
  amount: z17.number(),
6118
6132
  description: z17.string()
@@ -6346,6 +6360,7 @@ var updateSubscriptionParamsSchema = z17.object({
6346
6360
  redirectMode: z17.union([billingUpdateRedirectModeSchema, z17.undefined()]).optional(),
6347
6361
  subscriptionId: z17.union([z17.string(), z17.undefined()]).optional(),
6348
6362
  discounts: z17.union([z17.array(billingUpdateAttachDiscountSchema), z17.undefined()]).optional(),
6363
+ removeDiscounts: z17.union([z17.array(billingUpdateRemoveDiscountSchema), z17.undefined()]).optional(),
6349
6364
  customLineItems: z17.union([z17.array(billingUpdateCustomLineItemSchema), z17.undefined()]).optional(),
6350
6365
  cancelAction: z17.union([billingUpdateCancelActionSchema, z17.undefined()]).optional(),
6351
6366
  billingCycleAnchor: z17.union([z17.string(), z17.number(), z17.undefined()]).optional(),
@@ -6429,6 +6444,7 @@ var updateSubscriptionParamsOutboundSchema = z17.object({
6429
6444
  redirect_mode: z17.string(),
6430
6445
  subscription_id: z17.union([z17.string(), z17.undefined()]).optional(),
6431
6446
  discounts: z17.union([z17.array(billingUpdateAttachDiscountOutboundSchema), z17.undefined()]).optional(),
6447
+ remove_discounts: z17.union([z17.array(billingUpdateRemoveDiscountOutboundSchema), z17.undefined()]).optional(),
6432
6448
  custom_line_items: z17.union([z17.array(billingUpdateCustomLineItemOutboundSchema), z17.undefined()]).optional(),
6433
6449
  cancel_action: z17.union([z17.string(), z17.undefined()]).optional(),
6434
6450
  billing_cycle_anchor: z17.union([z17.string(), z17.number(), z17.undefined()]).optional(),