autumn-js 1.3.19 → 1.3.21

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 +80 -12
  2. package/dist/backend/adapters/express.mjs +5 -5
  3. package/dist/backend/adapters/fetch.js +80 -12
  4. package/dist/backend/adapters/fetch.mjs +5 -5
  5. package/dist/backend/adapters/hono.js +80 -12
  6. package/dist/backend/adapters/hono.mjs +5 -5
  7. package/dist/backend/adapters/index.js +80 -12
  8. package/dist/backend/adapters/index.mjs +8 -8
  9. package/dist/backend/adapters/next.js +80 -12
  10. package/dist/backend/adapters/next.mjs +5 -5
  11. package/dist/backend/{chunk-RGGW7MYQ.mjs → chunk-5MHFZETT.mjs} +50 -6
  12. package/dist/backend/{chunk-R6CWGJRR.mjs → chunk-7HAJHIDK.mjs} +2 -2
  13. package/dist/backend/{chunk-EETAZF3L.mjs → chunk-AZAFGMQX.mjs} +1 -1
  14. package/dist/backend/{chunk-NX3QPLEZ.mjs → chunk-CCYZDY2S.mjs} +1 -1
  15. package/dist/backend/{chunk-ET3EY5PE.mjs → chunk-IU4DGONB.mjs} +30 -6
  16. package/dist/backend/{chunk-ORQUSNYD.mjs → chunk-NCQMQWZZ.mjs} +1 -1
  17. package/dist/backend/{chunk-KPND33EK.mjs → chunk-UUXEUVUW.mjs} +2 -2
  18. package/dist/backend/{chunk-F6RWEUFE.mjs → chunk-ZL7TQVBF.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 +80 -12
  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 +80 -12
  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 +80 -12
  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 +80 -12
  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 +30 -6
  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 +30 -6
  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 +80 -12
  54. package/dist/backend/index.mjs +4 -4
  55. package/dist/backend/{routeTypes-CVNEIkWv.d.mts → routeTypes-BDhI1aVG.d.mts} +41 -0
  56. package/dist/backend/{routeTypes-DRaLLtYM.d.ts → routeTypes-S7the8kq.d.ts} +41 -0
  57. package/dist/better-auth/{chunk-24CG3YJD.mjs → chunk-I5EKFT6Q.mjs} +1 -1
  58. package/dist/better-auth/{chunk-LCFFOKLD.mjs → chunk-IZPM54OK.mjs} +30 -6
  59. package/dist/better-auth/{chunk-EU45GEWM.mjs → chunk-YTTMRMTV.mjs} +51 -7
  60. package/dist/better-auth/index.js +80 -12
  61. package/dist/better-auth/index.mjs +3 -3
  62. package/dist/better-auth/utils/createAutumnEndpoint.js +30 -6
  63. package/dist/better-auth/utils/createAutumnEndpoint.mjs +2 -2
  64. package/dist/better-auth/utils/handleBetterAuthRoute.js +80 -12
  65. package/dist/better-auth/utils/handleBetterAuthRoute.mjs +2 -2
  66. package/dist/better-auth/utils/index.js +80 -12
  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-BNmjxPTb.d.mts → params-B1GU-u8Q.d.mts} +39 -0
  97. package/dist/react/{params-DOhtJtIQ.d.ts → params-Dp-az5AD.d.ts} +39 -0
  98. package/dist/sdk/index.d.mts +66 -1
  99. package/dist/sdk/index.d.ts +66 -1
  100. package/dist/sdk/index.js +73 -6
  101. package/dist/sdk/index.mjs +68 -7
  102. package/package.json +2 -2
@@ -242,6 +242,9 @@ var attachLicenseQuantitySchema = import_v42.z.object({
242
242
  licensePlanId: import_v42.z.string(),
243
243
  quantity: import_v42.z.number()
244
244
  });
245
+ var attachRemoveDiscountSchema = import_v42.z.object({
246
+ rewardId: import_v42.z.string()
247
+ });
245
248
  var attachInvoiceSchema = import_v42.z.object({
246
249
  status: import_v42.z.string().nullable(),
247
250
  stripeId: import_v42.z.string(),
@@ -466,6 +469,9 @@ var attachLicenseQuantityOutboundSchema = import_v42.z.object({
466
469
  license_plan_id: import_v42.z.string(),
467
470
  quantity: import_v42.z.number()
468
471
  });
472
+ var attachRemoveDiscountOutboundSchema = import_v42.z.object({
473
+ reward_id: import_v42.z.string()
474
+ });
469
475
  var closedEnumSchema2 = import_v42.z.any();
470
476
  var attachUpsertLicenseThresholdBillingSchema = import_v42.z.any();
471
477
  var attachUpsertLicenseResetSchema = import_v42.z.any();
@@ -691,7 +697,8 @@ var attachParamsSchema = import_v42.z.object({
691
697
  enablePlanImmediately: import_v42.z.union([import_v42.z.boolean(), import_v42.z.undefined()]).optional(),
692
698
  taxRateId: import_v42.z.union([import_v42.z.string(), import_v42.z.undefined()]).optional(),
693
699
  currency: import_v42.z.union([import_v42.z.string(), import_v42.z.undefined()]).optional(),
694
- removePlanIds: import_v42.z.union([import_v42.z.array(import_v42.z.string()), import_v42.z.undefined()]).optional()
700
+ removePlanIds: import_v42.z.union([import_v42.z.array(import_v42.z.string()), import_v42.z.undefined()]).optional(),
701
+ removeDiscounts: import_v42.z.union([import_v42.z.array(attachRemoveDiscountSchema), import_v42.z.undefined()]).optional()
695
702
  });
696
703
  var attachCodeSchema = openEnumSchema2;
697
704
  var attachRequiredActionSchema = import_v42.z.object({
@@ -775,7 +782,8 @@ var attachParamsOutboundSchema = import_v42.z.object({
775
782
  enable_plan_immediately: import_v42.z.union([import_v42.z.boolean(), import_v42.z.undefined()]).optional(),
776
783
  tax_rate_id: import_v42.z.union([import_v42.z.string(), import_v42.z.undefined()]).optional(),
777
784
  currency: import_v42.z.union([import_v42.z.string(), import_v42.z.undefined()]).optional(),
778
- remove_plan_ids: import_v42.z.union([import_v42.z.array(import_v42.z.string()), import_v42.z.undefined()]).optional()
785
+ remove_plan_ids: import_v42.z.union([import_v42.z.array(import_v42.z.string()), import_v42.z.undefined()]).optional(),
786
+ remove_discounts: import_v42.z.union([import_v42.z.array(attachRemoveDiscountOutboundSchema), import_v42.z.undefined()]).optional()
779
787
  });
780
788
 
781
789
  // src/generated/createReferralCodeSchemas.ts
@@ -3042,6 +3050,9 @@ var previewAttachLicenseQuantitySchema = import_v412.z.object({
3042
3050
  licensePlanId: import_v412.z.string(),
3043
3051
  quantity: import_v412.z.number()
3044
3052
  });
3053
+ var previewAttachRemoveDiscountSchema = import_v412.z.object({
3054
+ rewardId: import_v412.z.string()
3055
+ });
3045
3056
  var previewAttachDiscountSchema = import_v412.z.object({
3046
3057
  amountOff: import_v412.z.number(),
3047
3058
  percentOff: import_v412.z.union([import_v412.z.number(), import_v412.z.undefined()]).optional(),
@@ -3330,6 +3341,9 @@ var previewAttachLicenseQuantityOutboundSchema = import_v412.z.object({
3330
3341
  license_plan_id: import_v412.z.string(),
3331
3342
  quantity: import_v412.z.number()
3332
3343
  });
3344
+ var previewAttachRemoveDiscountOutboundSchema = import_v412.z.object({
3345
+ reward_id: import_v412.z.string()
3346
+ });
3333
3347
  var closedEnumSchema8 = import_v412.z.any();
3334
3348
  var previewAttachUpsertLicenseThresholdBillingSchema = import_v412.z.any();
3335
3349
  var previewAttachUpsertLicenseResetSchema = import_v412.z.any();
@@ -3565,7 +3579,8 @@ var previewAttachParamsSchema = import_v412.z.object({
3565
3579
  enablePlanImmediately: import_v412.z.union([import_v412.z.boolean(), import_v412.z.undefined()]).optional(),
3566
3580
  taxRateId: import_v412.z.union([import_v412.z.string(), import_v412.z.undefined()]).optional(),
3567
3581
  currency: import_v412.z.union([import_v412.z.string(), import_v412.z.undefined()]).optional(),
3568
- removePlanIds: import_v412.z.union([import_v412.z.array(import_v412.z.string()), import_v412.z.undefined()]).optional()
3582
+ removePlanIds: import_v412.z.union([import_v412.z.array(import_v412.z.string()), import_v412.z.undefined()]).optional(),
3583
+ removeDiscounts: import_v412.z.union([import_v412.z.array(previewAttachRemoveDiscountSchema), import_v412.z.undefined()]).optional()
3569
3584
  });
3570
3585
  var previewAttachIncomingSchema = import_v412.z.object({
3571
3586
  planId: import_v412.z.string(),
@@ -3690,7 +3705,8 @@ var previewAttachParamsOutboundSchema = import_v412.z.object({
3690
3705
  enable_plan_immediately: import_v412.z.union([import_v412.z.boolean(), import_v412.z.undefined()]).optional(),
3691
3706
  tax_rate_id: import_v412.z.union([import_v412.z.string(), import_v412.z.undefined()]).optional(),
3692
3707
  currency: import_v412.z.union([import_v412.z.string(), import_v412.z.undefined()]).optional(),
3693
- remove_plan_ids: import_v412.z.union([import_v412.z.array(import_v412.z.string()), import_v412.z.undefined()]).optional()
3708
+ remove_plan_ids: import_v412.z.union([import_v412.z.array(import_v412.z.string()), import_v412.z.undefined()]).optional(),
3709
+ remove_discounts: import_v412.z.union([import_v412.z.array(previewAttachRemoveDiscountOutboundSchema), import_v412.z.undefined()]).optional()
3694
3710
  });
3695
3711
 
3696
3712
  // src/generated/previewMultiAttachSchemas.ts
@@ -5436,6 +5452,9 @@ var setupPaymentLicenseQuantitySchema = import_v416.z.object({
5436
5452
  licensePlanId: import_v416.z.string(),
5437
5453
  quantity: import_v416.z.number()
5438
5454
  });
5455
+ var setupPaymentRemoveDiscountSchema = import_v416.z.object({
5456
+ rewardId: import_v416.z.string()
5457
+ });
5439
5458
  var setupPaymentResponseSchema = import_v416.z.object({
5440
5459
  customerId: import_v416.z.string(),
5441
5460
  entityId: import_v416.z.union([import_v416.z.string(), import_v416.z.undefined()]).optional(),
@@ -5643,6 +5662,9 @@ var setupPaymentLicenseQuantityOutboundSchema = import_v416.z.object({
5643
5662
  license_plan_id: import_v416.z.string(),
5644
5663
  quantity: import_v416.z.number()
5645
5664
  });
5665
+ var setupPaymentRemoveDiscountOutboundSchema = import_v416.z.object({
5666
+ reward_id: import_v416.z.string()
5667
+ });
5646
5668
  var closedEnumSchema11 = import_v416.z.any();
5647
5669
  var setupPaymentUpsertLicenseThresholdBillingSchema = import_v416.z.any();
5648
5670
  var setupPaymentUpsertLicenseResetSchema = import_v416.z.any();
@@ -5866,7 +5888,8 @@ var setupPaymentParamsSchema = import_v416.z.object({
5866
5888
  enablePlanImmediately: import_v416.z.union([import_v416.z.boolean(), import_v416.z.undefined()]).optional(),
5867
5889
  taxRateId: import_v416.z.union([import_v416.z.string(), import_v416.z.undefined()]).optional(),
5868
5890
  currency: import_v416.z.union([import_v416.z.string(), import_v416.z.undefined()]).optional(),
5869
- removePlanIds: import_v416.z.union([import_v416.z.array(import_v416.z.string()), import_v416.z.undefined()]).optional()
5891
+ removePlanIds: import_v416.z.union([import_v416.z.array(import_v416.z.string()), import_v416.z.undefined()]).optional(),
5892
+ removeDiscounts: import_v416.z.union([import_v416.z.array(setupPaymentRemoveDiscountSchema), import_v416.z.undefined()]).optional()
5870
5893
  });
5871
5894
  var setupPaymentUpsertLicensePlanItemOutboundSchema = import_v416.z.object({
5872
5895
  threshold_billing: import_v416.z.union([
@@ -5942,7 +5965,8 @@ var setupPaymentParamsOutboundSchema = import_v416.z.object({
5942
5965
  enable_plan_immediately: import_v416.z.union([import_v416.z.boolean(), import_v416.z.undefined()]).optional(),
5943
5966
  tax_rate_id: import_v416.z.union([import_v416.z.string(), import_v416.z.undefined()]).optional(),
5944
5967
  currency: import_v416.z.union([import_v416.z.string(), import_v416.z.undefined()]).optional(),
5945
- remove_plan_ids: import_v416.z.union([import_v416.z.array(import_v416.z.string()), import_v416.z.undefined()]).optional()
5968
+ remove_plan_ids: import_v416.z.union([import_v416.z.array(import_v416.z.string()), import_v416.z.undefined()]).optional(),
5969
+ remove_discounts: import_v416.z.union([import_v416.z.array(setupPaymentRemoveDiscountOutboundSchema), import_v416.z.undefined()]).optional()
5946
5970
  });
5947
5971
 
5948
5972
  // src/generated/updateSubscriptionSchemas.ts
@@ -10270,6 +10294,16 @@ var AttachLicenseQuantity$outboundSchema = z32.pipe(
10270
10294
  });
10271
10295
  })
10272
10296
  );
10297
+ var AttachRemoveDiscount$outboundSchema = z32.pipe(
10298
+ z32.object({
10299
+ rewardId: z32.string()
10300
+ }),
10301
+ z32.transform((v) => {
10302
+ return remap(v, {
10303
+ rewardId: "reward_id"
10304
+ });
10305
+ })
10306
+ );
10273
10307
  var AttachParams$outboundSchema = z32.pipe(
10274
10308
  z32.object({
10275
10309
  customerId: z32.string(),
@@ -10314,7 +10348,10 @@ var AttachParams$outboundSchema = z32.pipe(
10314
10348
  enablePlanImmediately: z32.optional(z32.boolean()),
10315
10349
  taxRateId: z32.optional(z32.string()),
10316
10350
  currency: z32.optional(z32.string()),
10317
- removePlanIds: z32.optional(z32.array(z32.string()))
10351
+ removePlanIds: z32.optional(z32.array(z32.string())),
10352
+ removeDiscounts: z32.optional(
10353
+ z32.array(z32.lazy(() => AttachRemoveDiscount$outboundSchema))
10354
+ )
10318
10355
  }),
10319
10356
  z32.transform((v) => {
10320
10357
  return remap(v, {
@@ -10343,7 +10380,8 @@ var AttachParams$outboundSchema = z32.pipe(
10343
10380
  noBillingChanges: "no_billing_changes",
10344
10381
  enablePlanImmediately: "enable_plan_immediately",
10345
10382
  taxRateId: "tax_rate_id",
10346
- removePlanIds: "remove_plan_ids"
10383
+ removePlanIds: "remove_plan_ids",
10384
+ removeDiscounts: "remove_discounts"
10347
10385
  });
10348
10386
  })
10349
10387
  );
@@ -43856,6 +43894,16 @@ var PreviewAttachLicenseQuantity$outboundSchema = z99.pipe(
43856
43894
  });
43857
43895
  })
43858
43896
  );
43897
+ var PreviewAttachRemoveDiscount$outboundSchema = z99.pipe(
43898
+ z99.object({
43899
+ rewardId: z99.string()
43900
+ }),
43901
+ z99.transform((v) => {
43902
+ return remap(v, {
43903
+ rewardId: "reward_id"
43904
+ });
43905
+ })
43906
+ );
43859
43907
  var PreviewAttachParams$outboundSchema = z99.pipe(
43860
43908
  z99.object({
43861
43909
  customerId: z99.string(),
@@ -43909,7 +43957,10 @@ var PreviewAttachParams$outboundSchema = z99.pipe(
43909
43957
  enablePlanImmediately: z99.optional(z99.boolean()),
43910
43958
  taxRateId: z99.optional(z99.string()),
43911
43959
  currency: z99.optional(z99.string()),
43912
- removePlanIds: z99.optional(z99.array(z99.string()))
43960
+ removePlanIds: z99.optional(z99.array(z99.string())),
43961
+ removeDiscounts: z99.optional(
43962
+ z99.array(z99.lazy(() => PreviewAttachRemoveDiscount$outboundSchema))
43963
+ )
43913
43964
  }),
43914
43965
  z99.transform((v) => {
43915
43966
  return remap(v, {
@@ -43938,7 +43989,8 @@ var PreviewAttachParams$outboundSchema = z99.pipe(
43938
43989
  noBillingChanges: "no_billing_changes",
43939
43990
  enablePlanImmediately: "enable_plan_immediately",
43940
43991
  taxRateId: "tax_rate_id",
43941
- removePlanIds: "remove_plan_ids"
43992
+ removePlanIds: "remove_plan_ids",
43993
+ removeDiscounts: "remove_discounts"
43942
43994
  });
43943
43995
  })
43944
43996
  );
@@ -50861,6 +50913,16 @@ var SetupPaymentLicenseQuantity$outboundSchema = z113.pipe(
50861
50913
  });
50862
50914
  })
50863
50915
  );
50916
+ var SetupPaymentRemoveDiscount$outboundSchema = z113.pipe(
50917
+ z113.object({
50918
+ rewardId: z113.string()
50919
+ }),
50920
+ z113.transform((v) => {
50921
+ return remap(v, {
50922
+ rewardId: "reward_id"
50923
+ });
50924
+ })
50925
+ );
50864
50926
  var SetupPaymentParams$outboundSchema = z113.pipe(
50865
50927
  z113.object({
50866
50928
  customerId: z113.string(),
@@ -50902,7 +50964,10 @@ var SetupPaymentParams$outboundSchema = z113.pipe(
50902
50964
  enablePlanImmediately: z113.optional(z113.boolean()),
50903
50965
  taxRateId: z113.optional(z113.string()),
50904
50966
  currency: z113.optional(z113.string()),
50905
- removePlanIds: z113.optional(z113.array(z113.string()))
50967
+ removePlanIds: z113.optional(z113.array(z113.string())),
50968
+ removeDiscounts: z113.optional(
50969
+ z113.array(z113.lazy(() => SetupPaymentRemoveDiscount$outboundSchema))
50970
+ )
50906
50971
  }),
50907
50972
  z113.transform((v) => {
50908
50973
  return remap(v, {
@@ -50926,7 +50991,8 @@ var SetupPaymentParams$outboundSchema = z113.pipe(
50926
50991
  noBillingChanges: "no_billing_changes",
50927
50992
  enablePlanImmediately: "enable_plan_immediately",
50928
50993
  taxRateId: "tax_rate_id",
50929
- removePlanIds: "remove_plan_ids"
50994
+ removePlanIds: "remove_plan_ids",
50995
+ removeDiscounts: "remove_discounts"
50930
50996
  });
50931
50997
  })
50932
50998
  );
@@ -61811,6 +61877,7 @@ var Billing = class extends ClientSDK {
61811
61877
  * @param taxRateId - Stripe tax rate ID (txr_...) to apply as the default tax rate on the created subscription, invoice, or checkout session line items. (optional)
61812
61878
  * @param currency - Currency to bill this attach in (e.g. usd, eur). Must match the customer's currency if they are already locked to one, and the plan must offer a paid price in it. Defaults to the customer's currency, then the org default. (optional)
61813
61879
  * @param removePlanIds - Plan IDs to expire on the customer as part of this attach. Each must be an active plan billed on the same subscription as the attach (or a free plan); plans on a separate subscription are rejected. (optional)
61880
+ * @param removeDiscounts - Discounts to remove from the subscription, by reward ID. Discounts not listed are left unchanged. (optional)
61814
61881
  *
61815
61882
  * @returns A billing response with customer ID, invoice details, and payment URL (if checkout required).
61816
61883
  */
@@ -61948,6 +62015,7 @@ var Billing = class extends ClientSDK {
61948
62015
  * @param taxRateId - Stripe tax rate ID (txr_...) to apply as the default tax rate on the created subscription, invoice, or checkout session line items. (optional)
61949
62016
  * @param currency - Currency to bill this attach in (e.g. usd, eur). Must match the customer's currency if they are already locked to one, and the plan must offer a paid price in it. Defaults to the customer's currency, then the org default. (optional)
61950
62017
  * @param removePlanIds - Plan IDs to expire on the customer as part of this attach. Each must be an active plan billed on the same subscription as the attach (or a free plan); plans on a separate subscription are rejected. (optional)
62018
+ * @param removeDiscounts - Discounts to remove from the subscription, by reward ID. Discounts not listed are left unchanged. (optional)
61951
62019
  *
61952
62020
  * @returns A preview response with line items, totals, and effective dates for the proposed changes.
61953
62021
  */
@@ -1,12 +1,12 @@
1
1
  import "./chunk-HIWOK3G6.mjs";
2
2
  import {
3
3
  createAutumnEndpoint
4
- } from "./chunk-24CG3YJD.mjs";
4
+ } from "./chunk-I5EKFT6Q.mjs";
5
5
  import {
6
6
  createHandleBetterAuthRoute
7
- } from "./chunk-EU45GEWM.mjs";
7
+ } from "./chunk-YTTMRMTV.mjs";
8
8
  import "./chunk-J2WYVGHS.mjs";
9
- import "./chunk-LCFFOKLD.mjs";
9
+ import "./chunk-IZPM54OK.mjs";
10
10
  import "./chunk-BT3EAYVW.mjs";
11
11
  import "./chunk-GJAMWZNZ.mjs";
12
12
 
@@ -230,6 +230,9 @@ var attachLicenseQuantitySchema = import_v42.z.object({
230
230
  licensePlanId: import_v42.z.string(),
231
231
  quantity: import_v42.z.number()
232
232
  });
233
+ var attachRemoveDiscountSchema = import_v42.z.object({
234
+ rewardId: import_v42.z.string()
235
+ });
233
236
  var attachInvoiceSchema = import_v42.z.object({
234
237
  status: import_v42.z.string().nullable(),
235
238
  stripeId: import_v42.z.string(),
@@ -454,6 +457,9 @@ var attachLicenseQuantityOutboundSchema = import_v42.z.object({
454
457
  license_plan_id: import_v42.z.string(),
455
458
  quantity: import_v42.z.number()
456
459
  });
460
+ var attachRemoveDiscountOutboundSchema = import_v42.z.object({
461
+ reward_id: import_v42.z.string()
462
+ });
457
463
  var closedEnumSchema2 = import_v42.z.any();
458
464
  var attachUpsertLicenseThresholdBillingSchema = import_v42.z.any();
459
465
  var attachUpsertLicenseResetSchema = import_v42.z.any();
@@ -679,7 +685,8 @@ var attachParamsSchema = import_v42.z.object({
679
685
  enablePlanImmediately: import_v42.z.union([import_v42.z.boolean(), import_v42.z.undefined()]).optional(),
680
686
  taxRateId: import_v42.z.union([import_v42.z.string(), import_v42.z.undefined()]).optional(),
681
687
  currency: import_v42.z.union([import_v42.z.string(), import_v42.z.undefined()]).optional(),
682
- removePlanIds: import_v42.z.union([import_v42.z.array(import_v42.z.string()), import_v42.z.undefined()]).optional()
688
+ removePlanIds: import_v42.z.union([import_v42.z.array(import_v42.z.string()), import_v42.z.undefined()]).optional(),
689
+ removeDiscounts: import_v42.z.union([import_v42.z.array(attachRemoveDiscountSchema), import_v42.z.undefined()]).optional()
683
690
  });
684
691
  var attachCodeSchema = openEnumSchema2;
685
692
  var attachRequiredActionSchema = import_v42.z.object({
@@ -763,7 +770,8 @@ var attachParamsOutboundSchema = import_v42.z.object({
763
770
  enable_plan_immediately: import_v42.z.union([import_v42.z.boolean(), import_v42.z.undefined()]).optional(),
764
771
  tax_rate_id: import_v42.z.union([import_v42.z.string(), import_v42.z.undefined()]).optional(),
765
772
  currency: import_v42.z.union([import_v42.z.string(), import_v42.z.undefined()]).optional(),
766
- remove_plan_ids: import_v42.z.union([import_v42.z.array(import_v42.z.string()), import_v42.z.undefined()]).optional()
773
+ remove_plan_ids: import_v42.z.union([import_v42.z.array(import_v42.z.string()), import_v42.z.undefined()]).optional(),
774
+ remove_discounts: import_v42.z.union([import_v42.z.array(attachRemoveDiscountOutboundSchema), import_v42.z.undefined()]).optional()
767
775
  });
768
776
 
769
777
  // src/generated/createReferralCodeSchemas.ts
@@ -3030,6 +3038,9 @@ var previewAttachLicenseQuantitySchema = import_v412.z.object({
3030
3038
  licensePlanId: import_v412.z.string(),
3031
3039
  quantity: import_v412.z.number()
3032
3040
  });
3041
+ var previewAttachRemoveDiscountSchema = import_v412.z.object({
3042
+ rewardId: import_v412.z.string()
3043
+ });
3033
3044
  var previewAttachDiscountSchema = import_v412.z.object({
3034
3045
  amountOff: import_v412.z.number(),
3035
3046
  percentOff: import_v412.z.union([import_v412.z.number(), import_v412.z.undefined()]).optional(),
@@ -3318,6 +3329,9 @@ var previewAttachLicenseQuantityOutboundSchema = import_v412.z.object({
3318
3329
  license_plan_id: import_v412.z.string(),
3319
3330
  quantity: import_v412.z.number()
3320
3331
  });
3332
+ var previewAttachRemoveDiscountOutboundSchema = import_v412.z.object({
3333
+ reward_id: import_v412.z.string()
3334
+ });
3321
3335
  var closedEnumSchema8 = import_v412.z.any();
3322
3336
  var previewAttachUpsertLicenseThresholdBillingSchema = import_v412.z.any();
3323
3337
  var previewAttachUpsertLicenseResetSchema = import_v412.z.any();
@@ -3553,7 +3567,8 @@ var previewAttachParamsSchema = import_v412.z.object({
3553
3567
  enablePlanImmediately: import_v412.z.union([import_v412.z.boolean(), import_v412.z.undefined()]).optional(),
3554
3568
  taxRateId: import_v412.z.union([import_v412.z.string(), import_v412.z.undefined()]).optional(),
3555
3569
  currency: import_v412.z.union([import_v412.z.string(), import_v412.z.undefined()]).optional(),
3556
- removePlanIds: import_v412.z.union([import_v412.z.array(import_v412.z.string()), import_v412.z.undefined()]).optional()
3570
+ removePlanIds: import_v412.z.union([import_v412.z.array(import_v412.z.string()), import_v412.z.undefined()]).optional(),
3571
+ removeDiscounts: import_v412.z.union([import_v412.z.array(previewAttachRemoveDiscountSchema), import_v412.z.undefined()]).optional()
3557
3572
  });
3558
3573
  var previewAttachIncomingSchema = import_v412.z.object({
3559
3574
  planId: import_v412.z.string(),
@@ -3678,7 +3693,8 @@ var previewAttachParamsOutboundSchema = import_v412.z.object({
3678
3693
  enable_plan_immediately: import_v412.z.union([import_v412.z.boolean(), import_v412.z.undefined()]).optional(),
3679
3694
  tax_rate_id: import_v412.z.union([import_v412.z.string(), import_v412.z.undefined()]).optional(),
3680
3695
  currency: import_v412.z.union([import_v412.z.string(), import_v412.z.undefined()]).optional(),
3681
- remove_plan_ids: import_v412.z.union([import_v412.z.array(import_v412.z.string()), import_v412.z.undefined()]).optional()
3696
+ remove_plan_ids: import_v412.z.union([import_v412.z.array(import_v412.z.string()), import_v412.z.undefined()]).optional(),
3697
+ remove_discounts: import_v412.z.union([import_v412.z.array(previewAttachRemoveDiscountOutboundSchema), import_v412.z.undefined()]).optional()
3682
3698
  });
3683
3699
 
3684
3700
  // src/generated/previewMultiAttachSchemas.ts
@@ -5424,6 +5440,9 @@ var setupPaymentLicenseQuantitySchema = import_v416.z.object({
5424
5440
  licensePlanId: import_v416.z.string(),
5425
5441
  quantity: import_v416.z.number()
5426
5442
  });
5443
+ var setupPaymentRemoveDiscountSchema = import_v416.z.object({
5444
+ rewardId: import_v416.z.string()
5445
+ });
5427
5446
  var setupPaymentResponseSchema = import_v416.z.object({
5428
5447
  customerId: import_v416.z.string(),
5429
5448
  entityId: import_v416.z.union([import_v416.z.string(), import_v416.z.undefined()]).optional(),
@@ -5631,6 +5650,9 @@ var setupPaymentLicenseQuantityOutboundSchema = import_v416.z.object({
5631
5650
  license_plan_id: import_v416.z.string(),
5632
5651
  quantity: import_v416.z.number()
5633
5652
  });
5653
+ var setupPaymentRemoveDiscountOutboundSchema = import_v416.z.object({
5654
+ reward_id: import_v416.z.string()
5655
+ });
5634
5656
  var closedEnumSchema11 = import_v416.z.any();
5635
5657
  var setupPaymentUpsertLicenseThresholdBillingSchema = import_v416.z.any();
5636
5658
  var setupPaymentUpsertLicenseResetSchema = import_v416.z.any();
@@ -5854,7 +5876,8 @@ var setupPaymentParamsSchema = import_v416.z.object({
5854
5876
  enablePlanImmediately: import_v416.z.union([import_v416.z.boolean(), import_v416.z.undefined()]).optional(),
5855
5877
  taxRateId: import_v416.z.union([import_v416.z.string(), import_v416.z.undefined()]).optional(),
5856
5878
  currency: import_v416.z.union([import_v416.z.string(), import_v416.z.undefined()]).optional(),
5857
- removePlanIds: import_v416.z.union([import_v416.z.array(import_v416.z.string()), import_v416.z.undefined()]).optional()
5879
+ removePlanIds: import_v416.z.union([import_v416.z.array(import_v416.z.string()), import_v416.z.undefined()]).optional(),
5880
+ removeDiscounts: import_v416.z.union([import_v416.z.array(setupPaymentRemoveDiscountSchema), import_v416.z.undefined()]).optional()
5858
5881
  });
5859
5882
  var setupPaymentUpsertLicensePlanItemOutboundSchema = import_v416.z.object({
5860
5883
  threshold_billing: import_v416.z.union([
@@ -5930,7 +5953,8 @@ var setupPaymentParamsOutboundSchema = import_v416.z.object({
5930
5953
  enable_plan_immediately: import_v416.z.union([import_v416.z.boolean(), import_v416.z.undefined()]).optional(),
5931
5954
  tax_rate_id: import_v416.z.union([import_v416.z.string(), import_v416.z.undefined()]).optional(),
5932
5955
  currency: import_v416.z.union([import_v416.z.string(), import_v416.z.undefined()]).optional(),
5933
- remove_plan_ids: import_v416.z.union([import_v416.z.array(import_v416.z.string()), import_v416.z.undefined()]).optional()
5956
+ remove_plan_ids: import_v416.z.union([import_v416.z.array(import_v416.z.string()), import_v416.z.undefined()]).optional(),
5957
+ remove_discounts: import_v416.z.union([import_v416.z.array(setupPaymentRemoveDiscountOutboundSchema), import_v416.z.undefined()]).optional()
5934
5958
  });
5935
5959
 
5936
5960
  // src/generated/updateSubscriptionSchemas.ts
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createAutumnEndpoint
3
- } from "../chunk-24CG3YJD.mjs";
4
- import "../chunk-LCFFOKLD.mjs";
3
+ } from "../chunk-I5EKFT6Q.mjs";
4
+ import "../chunk-IZPM54OK.mjs";
5
5
  import "../chunk-GJAMWZNZ.mjs";
6
6
  export {
7
7
  createAutumnEndpoint
@@ -3472,6 +3472,16 @@ var AttachLicenseQuantity$outboundSchema = z13.pipe(
3472
3472
  });
3473
3473
  })
3474
3474
  );
3475
+ var AttachRemoveDiscount$outboundSchema = z13.pipe(
3476
+ z13.object({
3477
+ rewardId: z13.string()
3478
+ }),
3479
+ z13.transform((v) => {
3480
+ return remap(v, {
3481
+ rewardId: "reward_id"
3482
+ });
3483
+ })
3484
+ );
3475
3485
  var AttachParams$outboundSchema = z13.pipe(
3476
3486
  z13.object({
3477
3487
  customerId: z13.string(),
@@ -3516,7 +3526,10 @@ var AttachParams$outboundSchema = z13.pipe(
3516
3526
  enablePlanImmediately: z13.optional(z13.boolean()),
3517
3527
  taxRateId: z13.optional(z13.string()),
3518
3528
  currency: z13.optional(z13.string()),
3519
- removePlanIds: z13.optional(z13.array(z13.string()))
3529
+ removePlanIds: z13.optional(z13.array(z13.string())),
3530
+ removeDiscounts: z13.optional(
3531
+ z13.array(z13.lazy(() => AttachRemoveDiscount$outboundSchema))
3532
+ )
3520
3533
  }),
3521
3534
  z13.transform((v) => {
3522
3535
  return remap(v, {
@@ -3545,7 +3558,8 @@ var AttachParams$outboundSchema = z13.pipe(
3545
3558
  noBillingChanges: "no_billing_changes",
3546
3559
  enablePlanImmediately: "enable_plan_immediately",
3547
3560
  taxRateId: "tax_rate_id",
3548
- removePlanIds: "remove_plan_ids"
3561
+ removePlanIds: "remove_plan_ids",
3562
+ removeDiscounts: "remove_discounts"
3549
3563
  });
3550
3564
  })
3551
3565
  );
@@ -37058,6 +37072,16 @@ var PreviewAttachLicenseQuantity$outboundSchema = z80.pipe(
37058
37072
  });
37059
37073
  })
37060
37074
  );
37075
+ var PreviewAttachRemoveDiscount$outboundSchema = z80.pipe(
37076
+ z80.object({
37077
+ rewardId: z80.string()
37078
+ }),
37079
+ z80.transform((v) => {
37080
+ return remap(v, {
37081
+ rewardId: "reward_id"
37082
+ });
37083
+ })
37084
+ );
37061
37085
  var PreviewAttachParams$outboundSchema = z80.pipe(
37062
37086
  z80.object({
37063
37087
  customerId: z80.string(),
@@ -37111,7 +37135,10 @@ var PreviewAttachParams$outboundSchema = z80.pipe(
37111
37135
  enablePlanImmediately: z80.optional(z80.boolean()),
37112
37136
  taxRateId: z80.optional(z80.string()),
37113
37137
  currency: z80.optional(z80.string()),
37114
- removePlanIds: z80.optional(z80.array(z80.string()))
37138
+ removePlanIds: z80.optional(z80.array(z80.string())),
37139
+ removeDiscounts: z80.optional(
37140
+ z80.array(z80.lazy(() => PreviewAttachRemoveDiscount$outboundSchema))
37141
+ )
37115
37142
  }),
37116
37143
  z80.transform((v) => {
37117
37144
  return remap(v, {
@@ -37140,7 +37167,8 @@ var PreviewAttachParams$outboundSchema = z80.pipe(
37140
37167
  noBillingChanges: "no_billing_changes",
37141
37168
  enablePlanImmediately: "enable_plan_immediately",
37142
37169
  taxRateId: "tax_rate_id",
37143
- removePlanIds: "remove_plan_ids"
37170
+ removePlanIds: "remove_plan_ids",
37171
+ removeDiscounts: "remove_discounts"
37144
37172
  });
37145
37173
  })
37146
37174
  );
@@ -44063,6 +44091,16 @@ var SetupPaymentLicenseQuantity$outboundSchema = z94.pipe(
44063
44091
  });
44064
44092
  })
44065
44093
  );
44094
+ var SetupPaymentRemoveDiscount$outboundSchema = z94.pipe(
44095
+ z94.object({
44096
+ rewardId: z94.string()
44097
+ }),
44098
+ z94.transform((v) => {
44099
+ return remap(v, {
44100
+ rewardId: "reward_id"
44101
+ });
44102
+ })
44103
+ );
44066
44104
  var SetupPaymentParams$outboundSchema = z94.pipe(
44067
44105
  z94.object({
44068
44106
  customerId: z94.string(),
@@ -44104,7 +44142,10 @@ var SetupPaymentParams$outboundSchema = z94.pipe(
44104
44142
  enablePlanImmediately: z94.optional(z94.boolean()),
44105
44143
  taxRateId: z94.optional(z94.string()),
44106
44144
  currency: z94.optional(z94.string()),
44107
- removePlanIds: z94.optional(z94.array(z94.string()))
44145
+ removePlanIds: z94.optional(z94.array(z94.string())),
44146
+ removeDiscounts: z94.optional(
44147
+ z94.array(z94.lazy(() => SetupPaymentRemoveDiscount$outboundSchema))
44148
+ )
44108
44149
  }),
44109
44150
  z94.transform((v) => {
44110
44151
  return remap(v, {
@@ -44128,7 +44169,8 @@ var SetupPaymentParams$outboundSchema = z94.pipe(
44128
44169
  noBillingChanges: "no_billing_changes",
44129
44170
  enablePlanImmediately: "enable_plan_immediately",
44130
44171
  taxRateId: "tax_rate_id",
44131
- removePlanIds: "remove_plan_ids"
44172
+ removePlanIds: "remove_plan_ids",
44173
+ removeDiscounts: "remove_discounts"
44132
44174
  });
44133
44175
  })
44134
44176
  );
@@ -55013,6 +55055,7 @@ var Billing = class extends ClientSDK {
55013
55055
  * @param taxRateId - Stripe tax rate ID (txr_...) to apply as the default tax rate on the created subscription, invoice, or checkout session line items. (optional)
55014
55056
  * @param currency - Currency to bill this attach in (e.g. usd, eur). Must match the customer's currency if they are already locked to one, and the plan must offer a paid price in it. Defaults to the customer's currency, then the org default. (optional)
55015
55057
  * @param removePlanIds - Plan IDs to expire on the customer as part of this attach. Each must be an active plan billed on the same subscription as the attach (or a free plan); plans on a separate subscription are rejected. (optional)
55058
+ * @param removeDiscounts - Discounts to remove from the subscription, by reward ID. Discounts not listed are left unchanged. (optional)
55016
55059
  *
55017
55060
  * @returns A billing response with customer ID, invoice details, and payment URL (if checkout required).
55018
55061
  */
@@ -55150,6 +55193,7 @@ var Billing = class extends ClientSDK {
55150
55193
  * @param taxRateId - Stripe tax rate ID (txr_...) to apply as the default tax rate on the created subscription, invoice, or checkout session line items. (optional)
55151
55194
  * @param currency - Currency to bill this attach in (e.g. usd, eur). Must match the customer's currency if they are already locked to one, and the plan must offer a paid price in it. Defaults to the customer's currency, then the org default. (optional)
55152
55195
  * @param removePlanIds - Plan IDs to expire on the customer as part of this attach. Each must be an active plan billed on the same subscription as the attach (or a free plan); plans on a separate subscription are rejected. (optional)
55196
+ * @param removeDiscounts - Discounts to remove from the subscription, by reward ID. Discounts not listed are left unchanged. (optional)
55153
55197
  *
55154
55198
  * @returns A preview response with line items, totals, and effective dates for the proposed changes.
55155
55199
  */
@@ -61278,6 +61322,9 @@ var attachLicenseQuantitySchema = import_v42.z.object({
61278
61322
  licensePlanId: import_v42.z.string(),
61279
61323
  quantity: import_v42.z.number()
61280
61324
  });
61325
+ var attachRemoveDiscountSchema = import_v42.z.object({
61326
+ rewardId: import_v42.z.string()
61327
+ });
61281
61328
  var attachInvoiceSchema = import_v42.z.object({
61282
61329
  status: import_v42.z.string().nullable(),
61283
61330
  stripeId: import_v42.z.string(),
@@ -61502,6 +61549,9 @@ var attachLicenseQuantityOutboundSchema = import_v42.z.object({
61502
61549
  license_plan_id: import_v42.z.string(),
61503
61550
  quantity: import_v42.z.number()
61504
61551
  });
61552
+ var attachRemoveDiscountOutboundSchema = import_v42.z.object({
61553
+ reward_id: import_v42.z.string()
61554
+ });
61505
61555
  var closedEnumSchema2 = import_v42.z.any();
61506
61556
  var attachUpsertLicenseThresholdBillingSchema = import_v42.z.any();
61507
61557
  var attachUpsertLicenseResetSchema = import_v42.z.any();
@@ -61727,7 +61777,8 @@ var attachParamsSchema = import_v42.z.object({
61727
61777
  enablePlanImmediately: import_v42.z.union([import_v42.z.boolean(), import_v42.z.undefined()]).optional(),
61728
61778
  taxRateId: import_v42.z.union([import_v42.z.string(), import_v42.z.undefined()]).optional(),
61729
61779
  currency: import_v42.z.union([import_v42.z.string(), import_v42.z.undefined()]).optional(),
61730
- removePlanIds: import_v42.z.union([import_v42.z.array(import_v42.z.string()), import_v42.z.undefined()]).optional()
61780
+ removePlanIds: import_v42.z.union([import_v42.z.array(import_v42.z.string()), import_v42.z.undefined()]).optional(),
61781
+ removeDiscounts: import_v42.z.union([import_v42.z.array(attachRemoveDiscountSchema), import_v42.z.undefined()]).optional()
61731
61782
  });
61732
61783
  var attachCodeSchema = openEnumSchema2;
61733
61784
  var attachRequiredActionSchema = import_v42.z.object({
@@ -61811,7 +61862,8 @@ var attachParamsOutboundSchema = import_v42.z.object({
61811
61862
  enable_plan_immediately: import_v42.z.union([import_v42.z.boolean(), import_v42.z.undefined()]).optional(),
61812
61863
  tax_rate_id: import_v42.z.union([import_v42.z.string(), import_v42.z.undefined()]).optional(),
61813
61864
  currency: import_v42.z.union([import_v42.z.string(), import_v42.z.undefined()]).optional(),
61814
- remove_plan_ids: import_v42.z.union([import_v42.z.array(import_v42.z.string()), import_v42.z.undefined()]).optional()
61865
+ remove_plan_ids: import_v42.z.union([import_v42.z.array(import_v42.z.string()), import_v42.z.undefined()]).optional(),
61866
+ remove_discounts: import_v42.z.union([import_v42.z.array(attachRemoveDiscountOutboundSchema), import_v42.z.undefined()]).optional()
61815
61867
  });
61816
61868
 
61817
61869
  // src/generated/createReferralCodeSchemas.ts
@@ -64078,6 +64130,9 @@ var previewAttachLicenseQuantitySchema = import_v412.z.object({
64078
64130
  licensePlanId: import_v412.z.string(),
64079
64131
  quantity: import_v412.z.number()
64080
64132
  });
64133
+ var previewAttachRemoveDiscountSchema = import_v412.z.object({
64134
+ rewardId: import_v412.z.string()
64135
+ });
64081
64136
  var previewAttachDiscountSchema = import_v412.z.object({
64082
64137
  amountOff: import_v412.z.number(),
64083
64138
  percentOff: import_v412.z.union([import_v412.z.number(), import_v412.z.undefined()]).optional(),
@@ -64366,6 +64421,9 @@ var previewAttachLicenseQuantityOutboundSchema = import_v412.z.object({
64366
64421
  license_plan_id: import_v412.z.string(),
64367
64422
  quantity: import_v412.z.number()
64368
64423
  });
64424
+ var previewAttachRemoveDiscountOutboundSchema = import_v412.z.object({
64425
+ reward_id: import_v412.z.string()
64426
+ });
64369
64427
  var closedEnumSchema8 = import_v412.z.any();
64370
64428
  var previewAttachUpsertLicenseThresholdBillingSchema = import_v412.z.any();
64371
64429
  var previewAttachUpsertLicenseResetSchema = import_v412.z.any();
@@ -64601,7 +64659,8 @@ var previewAttachParamsSchema = import_v412.z.object({
64601
64659
  enablePlanImmediately: import_v412.z.union([import_v412.z.boolean(), import_v412.z.undefined()]).optional(),
64602
64660
  taxRateId: import_v412.z.union([import_v412.z.string(), import_v412.z.undefined()]).optional(),
64603
64661
  currency: import_v412.z.union([import_v412.z.string(), import_v412.z.undefined()]).optional(),
64604
- removePlanIds: import_v412.z.union([import_v412.z.array(import_v412.z.string()), import_v412.z.undefined()]).optional()
64662
+ removePlanIds: import_v412.z.union([import_v412.z.array(import_v412.z.string()), import_v412.z.undefined()]).optional(),
64663
+ removeDiscounts: import_v412.z.union([import_v412.z.array(previewAttachRemoveDiscountSchema), import_v412.z.undefined()]).optional()
64605
64664
  });
64606
64665
  var previewAttachIncomingSchema = import_v412.z.object({
64607
64666
  planId: import_v412.z.string(),
@@ -64726,7 +64785,8 @@ var previewAttachParamsOutboundSchema = import_v412.z.object({
64726
64785
  enable_plan_immediately: import_v412.z.union([import_v412.z.boolean(), import_v412.z.undefined()]).optional(),
64727
64786
  tax_rate_id: import_v412.z.union([import_v412.z.string(), import_v412.z.undefined()]).optional(),
64728
64787
  currency: import_v412.z.union([import_v412.z.string(), import_v412.z.undefined()]).optional(),
64729
- remove_plan_ids: import_v412.z.union([import_v412.z.array(import_v412.z.string()), import_v412.z.undefined()]).optional()
64788
+ remove_plan_ids: import_v412.z.union([import_v412.z.array(import_v412.z.string()), import_v412.z.undefined()]).optional(),
64789
+ remove_discounts: import_v412.z.union([import_v412.z.array(previewAttachRemoveDiscountOutboundSchema), import_v412.z.undefined()]).optional()
64730
64790
  });
64731
64791
 
64732
64792
  // src/generated/previewMultiAttachSchemas.ts
@@ -66472,6 +66532,9 @@ var setupPaymentLicenseQuantitySchema = import_v416.z.object({
66472
66532
  licensePlanId: import_v416.z.string(),
66473
66533
  quantity: import_v416.z.number()
66474
66534
  });
66535
+ var setupPaymentRemoveDiscountSchema = import_v416.z.object({
66536
+ rewardId: import_v416.z.string()
66537
+ });
66475
66538
  var setupPaymentResponseSchema = import_v416.z.object({
66476
66539
  customerId: import_v416.z.string(),
66477
66540
  entityId: import_v416.z.union([import_v416.z.string(), import_v416.z.undefined()]).optional(),
@@ -66679,6 +66742,9 @@ var setupPaymentLicenseQuantityOutboundSchema = import_v416.z.object({
66679
66742
  license_plan_id: import_v416.z.string(),
66680
66743
  quantity: import_v416.z.number()
66681
66744
  });
66745
+ var setupPaymentRemoveDiscountOutboundSchema = import_v416.z.object({
66746
+ reward_id: import_v416.z.string()
66747
+ });
66682
66748
  var closedEnumSchema11 = import_v416.z.any();
66683
66749
  var setupPaymentUpsertLicenseThresholdBillingSchema = import_v416.z.any();
66684
66750
  var setupPaymentUpsertLicenseResetSchema = import_v416.z.any();
@@ -66902,7 +66968,8 @@ var setupPaymentParamsSchema = import_v416.z.object({
66902
66968
  enablePlanImmediately: import_v416.z.union([import_v416.z.boolean(), import_v416.z.undefined()]).optional(),
66903
66969
  taxRateId: import_v416.z.union([import_v416.z.string(), import_v416.z.undefined()]).optional(),
66904
66970
  currency: import_v416.z.union([import_v416.z.string(), import_v416.z.undefined()]).optional(),
66905
- removePlanIds: import_v416.z.union([import_v416.z.array(import_v416.z.string()), import_v416.z.undefined()]).optional()
66971
+ removePlanIds: import_v416.z.union([import_v416.z.array(import_v416.z.string()), import_v416.z.undefined()]).optional(),
66972
+ removeDiscounts: import_v416.z.union([import_v416.z.array(setupPaymentRemoveDiscountSchema), import_v416.z.undefined()]).optional()
66906
66973
  });
66907
66974
  var setupPaymentUpsertLicensePlanItemOutboundSchema = import_v416.z.object({
66908
66975
  threshold_billing: import_v416.z.union([
@@ -66978,7 +67045,8 @@ var setupPaymentParamsOutboundSchema = import_v416.z.object({
66978
67045
  enable_plan_immediately: import_v416.z.union([import_v416.z.boolean(), import_v416.z.undefined()]).optional(),
66979
67046
  tax_rate_id: import_v416.z.union([import_v416.z.string(), import_v416.z.undefined()]).optional(),
66980
67047
  currency: import_v416.z.union([import_v416.z.string(), import_v416.z.undefined()]).optional(),
66981
- remove_plan_ids: import_v416.z.union([import_v416.z.array(import_v416.z.string()), import_v416.z.undefined()]).optional()
67048
+ remove_plan_ids: import_v416.z.union([import_v416.z.array(import_v416.z.string()), import_v416.z.undefined()]).optional(),
67049
+ remove_discounts: import_v416.z.union([import_v416.z.array(setupPaymentRemoveDiscountOutboundSchema), import_v416.z.undefined()]).optional()
66982
67050
  });
66983
67051
 
66984
67052
  // src/generated/updateSubscriptionSchemas.ts
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  createHandleBetterAuthRoute
3
- } from "../chunk-EU45GEWM.mjs";
3
+ } from "../chunk-YTTMRMTV.mjs";
4
4
  import "../chunk-J2WYVGHS.mjs";
5
- import "../chunk-LCFFOKLD.mjs";
5
+ import "../chunk-IZPM54OK.mjs";
6
6
  import "../chunk-BT3EAYVW.mjs";
7
7
  export {
8
8
  createHandleBetterAuthRoute