autumn-js 1.1.8 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/dist/backend/adapters/express.js +28 -13
  2. package/dist/backend/adapters/express.mjs +5 -5
  3. package/dist/backend/adapters/fetch.js +28 -13
  4. package/dist/backend/adapters/fetch.mjs +5 -5
  5. package/dist/backend/adapters/hono.js +28 -13
  6. package/dist/backend/adapters/hono.mjs +5 -5
  7. package/dist/backend/adapters/index.js +28 -13
  8. package/dist/backend/adapters/index.mjs +8 -8
  9. package/dist/backend/adapters/next.js +28 -13
  10. package/dist/backend/adapters/next.mjs +5 -5
  11. package/dist/backend/{chunk-WVXLG3HD.mjs → chunk-3YYODLUY.mjs} +1 -1
  12. package/dist/backend/{chunk-4CAIFRHS.mjs → chunk-5TDPAYPN.mjs} +1 -1
  13. package/dist/backend/{chunk-OQXZXMNQ.mjs → chunk-6YVVHFAT.mjs} +1 -1
  14. package/dist/backend/{chunk-VDKSZFDB.mjs → chunk-BSY23UM3.mjs} +16 -8
  15. package/dist/backend/{chunk-UUYPN27R.mjs → chunk-JDL37I7Y.mjs} +2 -2
  16. package/dist/backend/{chunk-XK7RZSEV.mjs → chunk-MJBKNDWD.mjs} +12 -5
  17. package/dist/backend/{chunk-FN75G3TE.mjs → chunk-RYP3CVST.mjs} +1 -1
  18. package/dist/backend/{chunk-UANWRTQO.mjs → chunk-VR35K2UZ.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 +28 -13
  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 +28 -13
  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 +28 -13
  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 +28 -13
  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 -8
  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 -8
  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 +28 -13
  54. package/dist/backend/index.mjs +4 -4
  55. package/dist/backend/{routeTypes-COJtRKM-.d.ts → routeTypes-B7YXq83l.d.ts} +24 -0
  56. package/dist/backend/{routeTypes-BTLwfLzU.d.mts → routeTypes-BglWygTb.d.mts} +24 -0
  57. package/dist/better-auth/{chunk-7MR76UL4.mjs → chunk-I4LI2AOX.mjs} +13 -6
  58. package/dist/better-auth/{chunk-KVCXG6IW.mjs → chunk-LHA6NFFS.mjs} +16 -8
  59. package/dist/better-auth/{chunk-GVZ475U2.mjs → chunk-TDX4NREA.mjs} +1 -1
  60. package/dist/better-auth/index.js +28 -13
  61. package/dist/better-auth/index.mjs +3 -3
  62. package/dist/better-auth/utils/createAutumnEndpoint.js +16 -8
  63. package/dist/better-auth/utils/createAutumnEndpoint.mjs +2 -2
  64. package/dist/better-auth/utils/handleBetterAuthRoute.js +28 -13
  65. package/dist/better-auth/utils/handleBetterAuthRoute.mjs +2 -2
  66. package/dist/better-auth/utils/index.js +28 -13
  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-D0knGGE_.d.mts → params-BmtAnULw.d.mts} +22 -0
  97. package/dist/react/{params-CULG2g_G.d.ts → params-CL0lZNfr.d.ts} +22 -0
  98. package/dist/sdk/index.d.mts +34 -0
  99. package/dist/sdk/index.d.ts +34 -0
  100. package/dist/sdk/index.js +12 -5
  101. package/dist/sdk/index.mjs +12 -5
  102. package/package.json +1 -1
@@ -1336,7 +1336,8 @@ var EventsAggregateParams$outboundSchema = z8.pipe(
1336
1336
  binSize: z8._default(BinSize$outboundSchema, "day"),
1337
1337
  customRange: z8.optional(
1338
1338
  z8.lazy(() => AggregateEventsCustomRange$outboundSchema)
1339
- )
1339
+ ),
1340
+ maxGroups: z8.optional(z8.int())
1340
1341
  }),
1341
1342
  z8.transform((v) => {
1342
1343
  return remap(v, {
@@ -1345,7 +1346,8 @@ var EventsAggregateParams$outboundSchema = z8.pipe(
1345
1346
  featureId: "feature_id",
1346
1347
  groupBy: "group_by",
1347
1348
  binSize: "bin_size",
1348
- customRange: "custom_range"
1349
+ customRange: "custom_range",
1350
+ maxGroups: "max_groups"
1349
1351
  });
1350
1352
  })
1351
1353
  );
@@ -1691,7 +1693,8 @@ var AttachParams$outboundSchema = z10.pipe(
1691
1693
  ),
1692
1694
  carryOverUsages: z10.optional(
1693
1695
  z10.lazy(() => AttachCarryOverUsages$outboundSchema)
1694
- )
1696
+ ),
1697
+ metadata: z10.optional(z10.record(z10.string(), z10.string()))
1695
1698
  }),
1696
1699
  z10.transform((v) => {
1697
1700
  return remap(v, {
@@ -6539,7 +6542,8 @@ var PreviewAttachParams$outboundSchema = z38.pipe(
6539
6542
  ),
6540
6543
  carryOverUsages: z38.optional(
6541
6544
  z38.lazy(() => PreviewAttachCarryOverUsages$outboundSchema)
6542
- )
6545
+ ),
6546
+ metadata: z38.optional(z38.record(z38.string(), z38.string()))
6543
6547
  }),
6544
6548
  z38.transform((v) => {
6545
6549
  return remap(v, {
@@ -8193,7 +8197,8 @@ var SetupPaymentParams$outboundSchema = z42.pipe(
8193
8197
  ),
8194
8198
  carryOverUsages: z42.optional(
8195
8199
  z42.lazy(() => SetupPaymentCarryOverUsages$outboundSchema)
8196
- )
8200
+ ),
8201
+ metadata: z42.optional(z42.record(z42.string(), z42.string()))
8197
8202
  }),
8198
8203
  z42.transform((v) => {
8199
8204
  return remap(v, {
@@ -11338,6 +11343,7 @@ var Billing = class extends ClientSDK {
11338
11343
  * @param processorSubscriptionId - The processor subscription ID to link. Use this to attach an existing Stripe subscription instead of creating a new one. (optional)
11339
11344
  * @param carryOverBalances - Whether to carry over balances from the previous plan. (optional)
11340
11345
  * @param carryOverUsages - Whether to carry over usages from the previous plan. (optional)
11346
+ * @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)
11341
11347
  *
11342
11348
  * @returns A billing response with customer ID, invoice details, and payment URL (if checkout required).
11343
11349
  */
@@ -11421,6 +11427,7 @@ var Billing = class extends ClientSDK {
11421
11427
  * @param processorSubscriptionId - The processor subscription ID to link. Use this to attach an existing Stripe subscription instead of creating a new one. (optional)
11422
11428
  * @param carryOverBalances - Whether to carry over balances from the previous plan. (optional)
11423
11429
  * @param carryOverUsages - Whether to carry over usages from the previous plan. (optional)
11430
+ * @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)
11424
11431
  *
11425
11432
  * @returns A preview response with line items, totals, and effective dates for the proposed changes.
11426
11433
  */
@@ -14032,7 +14039,8 @@ var eventsAggregateParamsOutboundSchema = import_v4.z.object({
14032
14039
  group_by: import_v4.z.union([import_v4.z.string(), import_v4.z.undefined()]).optional(),
14033
14040
  range: import_v4.z.union([import_v4.z.string(), import_v4.z.undefined()]).optional(),
14034
14041
  bin_size: import_v4.z.string(),
14035
- custom_range: import_v4.z.union([aggregateEventsCustomRangeOutboundSchema, import_v4.z.undefined()]).optional()
14042
+ custom_range: import_v4.z.union([aggregateEventsCustomRangeOutboundSchema, import_v4.z.undefined()]).optional(),
14043
+ max_groups: import_v4.z.union([import_v4.z.number(), import_v4.z.undefined()]).optional()
14036
14044
  });
14037
14045
  var closedEnumSchema = import_v4.z.any();
14038
14046
  var rangeSchema = closedEnumSchema;
@@ -14044,7 +14052,8 @@ var eventsAggregateParamsSchema = import_v4.z.object({
14044
14052
  groupBy: import_v4.z.union([import_v4.z.string(), import_v4.z.undefined()]).optional(),
14045
14053
  range: import_v4.z.union([rangeSchema, import_v4.z.undefined()]).optional(),
14046
14054
  binSize: import_v4.z.union([binSizeSchema, import_v4.z.undefined()]).optional(),
14047
- customRange: import_v4.z.union([aggregateEventsCustomRangeSchema, import_v4.z.undefined()]).optional()
14055
+ customRange: import_v4.z.union([aggregateEventsCustomRangeSchema, import_v4.z.undefined()]).optional(),
14056
+ maxGroups: import_v4.z.union([import_v4.z.number(), import_v4.z.undefined()]).optional()
14048
14057
  });
14049
14058
 
14050
14059
  // src/generated/attachSchemas.ts
@@ -14189,7 +14198,8 @@ var attachParamsOutboundSchema = import_v42.z.object({
14189
14198
  custom_line_items: import_v42.z.union([import_v42.z.array(attachCustomLineItemOutboundSchema), import_v42.z.undefined()]).optional(),
14190
14199
  processor_subscription_id: import_v42.z.union([import_v42.z.string(), import_v42.z.undefined()]).optional(),
14191
14200
  carry_over_balances: import_v42.z.union([attachCarryOverBalancesOutboundSchema, import_v42.z.undefined()]).optional(),
14192
- carry_over_usages: import_v42.z.union([attachCarryOverUsagesOutboundSchema, import_v42.z.undefined()]).optional()
14201
+ carry_over_usages: import_v42.z.union([attachCarryOverUsagesOutboundSchema, import_v42.z.undefined()]).optional(),
14202
+ metadata: import_v42.z.union([import_v42.z.record(import_v42.z.string(), import_v42.z.string()), import_v42.z.undefined()]).optional()
14193
14203
  });
14194
14204
  var closedEnumSchema2 = import_v42.z.any();
14195
14205
  var openEnumSchema = import_v42.z.any();
@@ -14271,7 +14281,8 @@ var attachParamsSchema = import_v42.z.object({
14271
14281
  customLineItems: import_v42.z.union([import_v42.z.array(attachCustomLineItemSchema), import_v42.z.undefined()]).optional(),
14272
14282
  processorSubscriptionId: import_v42.z.union([import_v42.z.string(), import_v42.z.undefined()]).optional(),
14273
14283
  carryOverBalances: import_v42.z.union([attachCarryOverBalancesSchema, import_v42.z.undefined()]).optional(),
14274
- carryOverUsages: import_v42.z.union([attachCarryOverUsagesSchema, import_v42.z.undefined()]).optional()
14284
+ carryOverUsages: import_v42.z.union([attachCarryOverUsagesSchema, import_v42.z.undefined()]).optional(),
14285
+ metadata: import_v42.z.union([import_v42.z.record(import_v42.z.string(), import_v42.z.string()), import_v42.z.undefined()]).optional()
14275
14286
  });
14276
14287
  var attachCodeSchema = openEnumSchema;
14277
14288
  var attachRequiredActionSchema = import_v42.z.object({
@@ -15058,7 +15069,8 @@ var previewAttachParamsOutboundSchema = import_v49.z.object({
15058
15069
  custom_line_items: import_v49.z.union([import_v49.z.array(previewAttachCustomLineItemOutboundSchema), import_v49.z.undefined()]).optional(),
15059
15070
  processor_subscription_id: import_v49.z.union([import_v49.z.string(), import_v49.z.undefined()]).optional(),
15060
15071
  carry_over_balances: import_v49.z.union([previewAttachCarryOverBalancesOutboundSchema, import_v49.z.undefined()]).optional(),
15061
- carry_over_usages: import_v49.z.union([previewAttachCarryOverUsagesOutboundSchema, import_v49.z.undefined()]).optional()
15072
+ carry_over_usages: import_v49.z.union([previewAttachCarryOverUsagesOutboundSchema, import_v49.z.undefined()]).optional(),
15073
+ metadata: import_v49.z.union([import_v49.z.record(import_v49.z.string(), import_v49.z.string()), import_v49.z.undefined()]).optional()
15062
15074
  });
15063
15075
  var closedEnumSchema5 = import_v49.z.any();
15064
15076
  var planSchema = import_v49.z.any();
@@ -15141,7 +15153,8 @@ var previewAttachParamsSchema = import_v49.z.object({
15141
15153
  customLineItems: import_v49.z.union([import_v49.z.array(previewAttachCustomLineItemSchema), import_v49.z.undefined()]).optional(),
15142
15154
  processorSubscriptionId: import_v49.z.union([import_v49.z.string(), import_v49.z.undefined()]).optional(),
15143
15155
  carryOverBalances: import_v49.z.union([previewAttachCarryOverBalancesSchema, import_v49.z.undefined()]).optional(),
15144
- carryOverUsages: import_v49.z.union([previewAttachCarryOverUsagesSchema, import_v49.z.undefined()]).optional()
15156
+ carryOverUsages: import_v49.z.union([previewAttachCarryOverUsagesSchema, import_v49.z.undefined()]).optional(),
15157
+ metadata: import_v49.z.union([import_v49.z.record(import_v49.z.string(), import_v49.z.string()), import_v49.z.undefined()]).optional()
15145
15158
  });
15146
15159
  var previewAttachIncomingSchema = import_v49.z.object({
15147
15160
  planId: import_v49.z.string(),
@@ -15948,7 +15961,8 @@ var setupPaymentParamsOutboundSchema = import_v413.z.object({
15948
15961
  custom_line_items: import_v413.z.union([import_v413.z.array(setupPaymentCustomLineItemOutboundSchema), import_v413.z.undefined()]).optional(),
15949
15962
  processor_subscription_id: import_v413.z.union([import_v413.z.string(), import_v413.z.undefined()]).optional(),
15950
15963
  carry_over_balances: import_v413.z.union([setupPaymentCarryOverBalancesOutboundSchema, import_v413.z.undefined()]).optional(),
15951
- carry_over_usages: import_v413.z.union([setupPaymentCarryOverUsagesOutboundSchema, import_v413.z.undefined()]).optional()
15964
+ carry_over_usages: import_v413.z.union([setupPaymentCarryOverUsagesOutboundSchema, import_v413.z.undefined()]).optional(),
15965
+ metadata: import_v413.z.union([import_v413.z.record(import_v413.z.string(), import_v413.z.string()), import_v413.z.undefined()]).optional()
15952
15966
  });
15953
15967
  var closedEnumSchema8 = import_v413.z.any();
15954
15968
  var setupPaymentPriceIntervalSchema = closedEnumSchema8;
@@ -16023,7 +16037,8 @@ var setupPaymentParamsSchema = import_v413.z.object({
16023
16037
  customLineItems: import_v413.z.union([import_v413.z.array(setupPaymentCustomLineItemSchema), import_v413.z.undefined()]).optional(),
16024
16038
  processorSubscriptionId: import_v413.z.union([import_v413.z.string(), import_v413.z.undefined()]).optional(),
16025
16039
  carryOverBalances: import_v413.z.union([setupPaymentCarryOverBalancesSchema, import_v413.z.undefined()]).optional(),
16026
- carryOverUsages: import_v413.z.union([setupPaymentCarryOverUsagesSchema, import_v413.z.undefined()]).optional()
16040
+ carryOverUsages: import_v413.z.union([setupPaymentCarryOverUsagesSchema, import_v413.z.undefined()]).optional(),
16041
+ metadata: import_v413.z.union([import_v413.z.record(import_v413.z.string(), import_v413.z.string()), import_v413.z.undefined()]).optional()
16027
16042
  });
16028
16043
 
16029
16044
  // src/generated/updateSubscriptionSchemas.ts
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  autumnHandler
3
- } from "../chunk-WVXLG3HD.mjs";
3
+ } from "../chunk-3YYODLUY.mjs";
4
4
  import "../chunk-WYDGEDEU.mjs";
5
5
  import "../chunk-VXND2UDT.mjs";
6
- import "../chunk-UUYPN27R.mjs";
7
- import "../chunk-UANWRTQO.mjs";
8
- import "../chunk-XK7RZSEV.mjs";
6
+ import "../chunk-JDL37I7Y.mjs";
7
+ import "../chunk-VR35K2UZ.mjs";
8
+ import "../chunk-MJBKNDWD.mjs";
9
9
  import "../chunk-55C2WWXQ.mjs";
10
10
  import "../chunk-TBQ27LIK.mjs";
11
11
  import "../chunk-J44WR3QZ.mjs";
12
12
  import "../chunk-TSF4YCUO.mjs";
13
13
  import "../chunk-UAR3TMWI.mjs";
14
- import "../chunk-VDKSZFDB.mjs";
14
+ import "../chunk-BSY23UM3.mjs";
15
15
  import "../chunk-OTXV5FY7.mjs";
16
16
  import "../chunk-VZIMT7AO.mjs";
17
17
  import "../chunk-Z6QP3YEA.mjs";
@@ -1336,7 +1336,8 @@ var EventsAggregateParams$outboundSchema = z8.pipe(
1336
1336
  binSize: z8._default(BinSize$outboundSchema, "day"),
1337
1337
  customRange: z8.optional(
1338
1338
  z8.lazy(() => AggregateEventsCustomRange$outboundSchema)
1339
- )
1339
+ ),
1340
+ maxGroups: z8.optional(z8.int())
1340
1341
  }),
1341
1342
  z8.transform((v) => {
1342
1343
  return remap(v, {
@@ -1345,7 +1346,8 @@ var EventsAggregateParams$outboundSchema = z8.pipe(
1345
1346
  featureId: "feature_id",
1346
1347
  groupBy: "group_by",
1347
1348
  binSize: "bin_size",
1348
- customRange: "custom_range"
1349
+ customRange: "custom_range",
1350
+ maxGroups: "max_groups"
1349
1351
  });
1350
1352
  })
1351
1353
  );
@@ -1691,7 +1693,8 @@ var AttachParams$outboundSchema = z10.pipe(
1691
1693
  ),
1692
1694
  carryOverUsages: z10.optional(
1693
1695
  z10.lazy(() => AttachCarryOverUsages$outboundSchema)
1694
- )
1696
+ ),
1697
+ metadata: z10.optional(z10.record(z10.string(), z10.string()))
1695
1698
  }),
1696
1699
  z10.transform((v) => {
1697
1700
  return remap(v, {
@@ -6539,7 +6542,8 @@ var PreviewAttachParams$outboundSchema = z38.pipe(
6539
6542
  ),
6540
6543
  carryOverUsages: z38.optional(
6541
6544
  z38.lazy(() => PreviewAttachCarryOverUsages$outboundSchema)
6542
- )
6545
+ ),
6546
+ metadata: z38.optional(z38.record(z38.string(), z38.string()))
6543
6547
  }),
6544
6548
  z38.transform((v) => {
6545
6549
  return remap(v, {
@@ -8193,7 +8197,8 @@ var SetupPaymentParams$outboundSchema = z42.pipe(
8193
8197
  ),
8194
8198
  carryOverUsages: z42.optional(
8195
8199
  z42.lazy(() => SetupPaymentCarryOverUsages$outboundSchema)
8196
- )
8200
+ ),
8201
+ metadata: z42.optional(z42.record(z42.string(), z42.string()))
8197
8202
  }),
8198
8203
  z42.transform((v) => {
8199
8204
  return remap(v, {
@@ -11338,6 +11343,7 @@ var Billing = class extends ClientSDK {
11338
11343
  * @param processorSubscriptionId - The processor subscription ID to link. Use this to attach an existing Stripe subscription instead of creating a new one. (optional)
11339
11344
  * @param carryOverBalances - Whether to carry over balances from the previous plan. (optional)
11340
11345
  * @param carryOverUsages - Whether to carry over usages from the previous plan. (optional)
11346
+ * @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)
11341
11347
  *
11342
11348
  * @returns A billing response with customer ID, invoice details, and payment URL (if checkout required).
11343
11349
  */
@@ -11421,6 +11427,7 @@ var Billing = class extends ClientSDK {
11421
11427
  * @param processorSubscriptionId - The processor subscription ID to link. Use this to attach an existing Stripe subscription instead of creating a new one. (optional)
11422
11428
  * @param carryOverBalances - Whether to carry over balances from the previous plan. (optional)
11423
11429
  * @param carryOverUsages - Whether to carry over usages from the previous plan. (optional)
11430
+ * @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)
11424
11431
  *
11425
11432
  * @returns A preview response with line items, totals, and effective dates for the proposed changes.
11426
11433
  */
@@ -14032,7 +14039,8 @@ var eventsAggregateParamsOutboundSchema = import_v4.z.object({
14032
14039
  group_by: import_v4.z.union([import_v4.z.string(), import_v4.z.undefined()]).optional(),
14033
14040
  range: import_v4.z.union([import_v4.z.string(), import_v4.z.undefined()]).optional(),
14034
14041
  bin_size: import_v4.z.string(),
14035
- custom_range: import_v4.z.union([aggregateEventsCustomRangeOutboundSchema, import_v4.z.undefined()]).optional()
14042
+ custom_range: import_v4.z.union([aggregateEventsCustomRangeOutboundSchema, import_v4.z.undefined()]).optional(),
14043
+ max_groups: import_v4.z.union([import_v4.z.number(), import_v4.z.undefined()]).optional()
14036
14044
  });
14037
14045
  var closedEnumSchema = import_v4.z.any();
14038
14046
  var rangeSchema = closedEnumSchema;
@@ -14044,7 +14052,8 @@ var eventsAggregateParamsSchema = import_v4.z.object({
14044
14052
  groupBy: import_v4.z.union([import_v4.z.string(), import_v4.z.undefined()]).optional(),
14045
14053
  range: import_v4.z.union([rangeSchema, import_v4.z.undefined()]).optional(),
14046
14054
  binSize: import_v4.z.union([binSizeSchema, import_v4.z.undefined()]).optional(),
14047
- customRange: import_v4.z.union([aggregateEventsCustomRangeSchema, import_v4.z.undefined()]).optional()
14055
+ customRange: import_v4.z.union([aggregateEventsCustomRangeSchema, import_v4.z.undefined()]).optional(),
14056
+ maxGroups: import_v4.z.union([import_v4.z.number(), import_v4.z.undefined()]).optional()
14048
14057
  });
14049
14058
 
14050
14059
  // src/generated/attachSchemas.ts
@@ -14189,7 +14198,8 @@ var attachParamsOutboundSchema = import_v42.z.object({
14189
14198
  custom_line_items: import_v42.z.union([import_v42.z.array(attachCustomLineItemOutboundSchema), import_v42.z.undefined()]).optional(),
14190
14199
  processor_subscription_id: import_v42.z.union([import_v42.z.string(), import_v42.z.undefined()]).optional(),
14191
14200
  carry_over_balances: import_v42.z.union([attachCarryOverBalancesOutboundSchema, import_v42.z.undefined()]).optional(),
14192
- carry_over_usages: import_v42.z.union([attachCarryOverUsagesOutboundSchema, import_v42.z.undefined()]).optional()
14201
+ carry_over_usages: import_v42.z.union([attachCarryOverUsagesOutboundSchema, import_v42.z.undefined()]).optional(),
14202
+ metadata: import_v42.z.union([import_v42.z.record(import_v42.z.string(), import_v42.z.string()), import_v42.z.undefined()]).optional()
14193
14203
  });
14194
14204
  var closedEnumSchema2 = import_v42.z.any();
14195
14205
  var openEnumSchema = import_v42.z.any();
@@ -14271,7 +14281,8 @@ var attachParamsSchema = import_v42.z.object({
14271
14281
  customLineItems: import_v42.z.union([import_v42.z.array(attachCustomLineItemSchema), import_v42.z.undefined()]).optional(),
14272
14282
  processorSubscriptionId: import_v42.z.union([import_v42.z.string(), import_v42.z.undefined()]).optional(),
14273
14283
  carryOverBalances: import_v42.z.union([attachCarryOverBalancesSchema, import_v42.z.undefined()]).optional(),
14274
- carryOverUsages: import_v42.z.union([attachCarryOverUsagesSchema, import_v42.z.undefined()]).optional()
14284
+ carryOverUsages: import_v42.z.union([attachCarryOverUsagesSchema, import_v42.z.undefined()]).optional(),
14285
+ metadata: import_v42.z.union([import_v42.z.record(import_v42.z.string(), import_v42.z.string()), import_v42.z.undefined()]).optional()
14275
14286
  });
14276
14287
  var attachCodeSchema = openEnumSchema;
14277
14288
  var attachRequiredActionSchema = import_v42.z.object({
@@ -15058,7 +15069,8 @@ var previewAttachParamsOutboundSchema = import_v49.z.object({
15058
15069
  custom_line_items: import_v49.z.union([import_v49.z.array(previewAttachCustomLineItemOutboundSchema), import_v49.z.undefined()]).optional(),
15059
15070
  processor_subscription_id: import_v49.z.union([import_v49.z.string(), import_v49.z.undefined()]).optional(),
15060
15071
  carry_over_balances: import_v49.z.union([previewAttachCarryOverBalancesOutboundSchema, import_v49.z.undefined()]).optional(),
15061
- carry_over_usages: import_v49.z.union([previewAttachCarryOverUsagesOutboundSchema, import_v49.z.undefined()]).optional()
15072
+ carry_over_usages: import_v49.z.union([previewAttachCarryOverUsagesOutboundSchema, import_v49.z.undefined()]).optional(),
15073
+ metadata: import_v49.z.union([import_v49.z.record(import_v49.z.string(), import_v49.z.string()), import_v49.z.undefined()]).optional()
15062
15074
  });
15063
15075
  var closedEnumSchema5 = import_v49.z.any();
15064
15076
  var planSchema = import_v49.z.any();
@@ -15141,7 +15153,8 @@ var previewAttachParamsSchema = import_v49.z.object({
15141
15153
  customLineItems: import_v49.z.union([import_v49.z.array(previewAttachCustomLineItemSchema), import_v49.z.undefined()]).optional(),
15142
15154
  processorSubscriptionId: import_v49.z.union([import_v49.z.string(), import_v49.z.undefined()]).optional(),
15143
15155
  carryOverBalances: import_v49.z.union([previewAttachCarryOverBalancesSchema, import_v49.z.undefined()]).optional(),
15144
- carryOverUsages: import_v49.z.union([previewAttachCarryOverUsagesSchema, import_v49.z.undefined()]).optional()
15156
+ carryOverUsages: import_v49.z.union([previewAttachCarryOverUsagesSchema, import_v49.z.undefined()]).optional(),
15157
+ metadata: import_v49.z.union([import_v49.z.record(import_v49.z.string(), import_v49.z.string()), import_v49.z.undefined()]).optional()
15145
15158
  });
15146
15159
  var previewAttachIncomingSchema = import_v49.z.object({
15147
15160
  planId: import_v49.z.string(),
@@ -15948,7 +15961,8 @@ var setupPaymentParamsOutboundSchema = import_v413.z.object({
15948
15961
  custom_line_items: import_v413.z.union([import_v413.z.array(setupPaymentCustomLineItemOutboundSchema), import_v413.z.undefined()]).optional(),
15949
15962
  processor_subscription_id: import_v413.z.union([import_v413.z.string(), import_v413.z.undefined()]).optional(),
15950
15963
  carry_over_balances: import_v413.z.union([setupPaymentCarryOverBalancesOutboundSchema, import_v413.z.undefined()]).optional(),
15951
- carry_over_usages: import_v413.z.union([setupPaymentCarryOverUsagesOutboundSchema, import_v413.z.undefined()]).optional()
15964
+ carry_over_usages: import_v413.z.union([setupPaymentCarryOverUsagesOutboundSchema, import_v413.z.undefined()]).optional(),
15965
+ metadata: import_v413.z.union([import_v413.z.record(import_v413.z.string(), import_v413.z.string()), import_v413.z.undefined()]).optional()
15952
15966
  });
15953
15967
  var closedEnumSchema8 = import_v413.z.any();
15954
15968
  var setupPaymentPriceIntervalSchema = closedEnumSchema8;
@@ -16023,7 +16037,8 @@ var setupPaymentParamsSchema = import_v413.z.object({
16023
16037
  customLineItems: import_v413.z.union([import_v413.z.array(setupPaymentCustomLineItemSchema), import_v413.z.undefined()]).optional(),
16024
16038
  processorSubscriptionId: import_v413.z.union([import_v413.z.string(), import_v413.z.undefined()]).optional(),
16025
16039
  carryOverBalances: import_v413.z.union([setupPaymentCarryOverBalancesSchema, import_v413.z.undefined()]).optional(),
16026
- carryOverUsages: import_v413.z.union([setupPaymentCarryOverUsagesSchema, import_v413.z.undefined()]).optional()
16040
+ carryOverUsages: import_v413.z.union([setupPaymentCarryOverUsagesSchema, import_v413.z.undefined()]).optional(),
16041
+ metadata: import_v413.z.union([import_v413.z.record(import_v413.z.string(), import_v413.z.string()), import_v413.z.undefined()]).optional()
16027
16042
  });
16028
16043
 
16029
16044
  // src/generated/updateSubscriptionSchemas.ts
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  autumnHandler
3
- } from "../chunk-4CAIFRHS.mjs";
3
+ } from "../chunk-5TDPAYPN.mjs";
4
4
  import "../chunk-WYDGEDEU.mjs";
5
5
  import "../chunk-VXND2UDT.mjs";
6
- import "../chunk-UUYPN27R.mjs";
7
- import "../chunk-UANWRTQO.mjs";
8
- import "../chunk-XK7RZSEV.mjs";
6
+ import "../chunk-JDL37I7Y.mjs";
7
+ import "../chunk-VR35K2UZ.mjs";
8
+ import "../chunk-MJBKNDWD.mjs";
9
9
  import "../chunk-55C2WWXQ.mjs";
10
10
  import "../chunk-TBQ27LIK.mjs";
11
11
  import "../chunk-J44WR3QZ.mjs";
12
12
  import "../chunk-TSF4YCUO.mjs";
13
13
  import "../chunk-UAR3TMWI.mjs";
14
- import "../chunk-VDKSZFDB.mjs";
14
+ import "../chunk-BSY23UM3.mjs";
15
15
  import "../chunk-OTXV5FY7.mjs";
16
16
  import "../chunk-VZIMT7AO.mjs";
17
17
  import "../chunk-Z6QP3YEA.mjs";
@@ -1336,7 +1336,8 @@ var EventsAggregateParams$outboundSchema = z8.pipe(
1336
1336
  binSize: z8._default(BinSize$outboundSchema, "day"),
1337
1337
  customRange: z8.optional(
1338
1338
  z8.lazy(() => AggregateEventsCustomRange$outboundSchema)
1339
- )
1339
+ ),
1340
+ maxGroups: z8.optional(z8.int())
1340
1341
  }),
1341
1342
  z8.transform((v) => {
1342
1343
  return remap(v, {
@@ -1345,7 +1346,8 @@ var EventsAggregateParams$outboundSchema = z8.pipe(
1345
1346
  featureId: "feature_id",
1346
1347
  groupBy: "group_by",
1347
1348
  binSize: "bin_size",
1348
- customRange: "custom_range"
1349
+ customRange: "custom_range",
1350
+ maxGroups: "max_groups"
1349
1351
  });
1350
1352
  })
1351
1353
  );
@@ -1691,7 +1693,8 @@ var AttachParams$outboundSchema = z10.pipe(
1691
1693
  ),
1692
1694
  carryOverUsages: z10.optional(
1693
1695
  z10.lazy(() => AttachCarryOverUsages$outboundSchema)
1694
- )
1696
+ ),
1697
+ metadata: z10.optional(z10.record(z10.string(), z10.string()))
1695
1698
  }),
1696
1699
  z10.transform((v) => {
1697
1700
  return remap(v, {
@@ -6539,7 +6542,8 @@ var PreviewAttachParams$outboundSchema = z38.pipe(
6539
6542
  ),
6540
6543
  carryOverUsages: z38.optional(
6541
6544
  z38.lazy(() => PreviewAttachCarryOverUsages$outboundSchema)
6542
- )
6545
+ ),
6546
+ metadata: z38.optional(z38.record(z38.string(), z38.string()))
6543
6547
  }),
6544
6548
  z38.transform((v) => {
6545
6549
  return remap(v, {
@@ -8193,7 +8197,8 @@ var SetupPaymentParams$outboundSchema = z42.pipe(
8193
8197
  ),
8194
8198
  carryOverUsages: z42.optional(
8195
8199
  z42.lazy(() => SetupPaymentCarryOverUsages$outboundSchema)
8196
- )
8200
+ ),
8201
+ metadata: z42.optional(z42.record(z42.string(), z42.string()))
8197
8202
  }),
8198
8203
  z42.transform((v) => {
8199
8204
  return remap(v, {
@@ -11338,6 +11343,7 @@ var Billing = class extends ClientSDK {
11338
11343
  * @param processorSubscriptionId - The processor subscription ID to link. Use this to attach an existing Stripe subscription instead of creating a new one. (optional)
11339
11344
  * @param carryOverBalances - Whether to carry over balances from the previous plan. (optional)
11340
11345
  * @param carryOverUsages - Whether to carry over usages from the previous plan. (optional)
11346
+ * @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)
11341
11347
  *
11342
11348
  * @returns A billing response with customer ID, invoice details, and payment URL (if checkout required).
11343
11349
  */
@@ -11421,6 +11427,7 @@ var Billing = class extends ClientSDK {
11421
11427
  * @param processorSubscriptionId - The processor subscription ID to link. Use this to attach an existing Stripe subscription instead of creating a new one. (optional)
11422
11428
  * @param carryOverBalances - Whether to carry over balances from the previous plan. (optional)
11423
11429
  * @param carryOverUsages - Whether to carry over usages from the previous plan. (optional)
11430
+ * @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)
11424
11431
  *
11425
11432
  * @returns A preview response with line items, totals, and effective dates for the proposed changes.
11426
11433
  */
@@ -14032,7 +14039,8 @@ var eventsAggregateParamsOutboundSchema = import_v4.z.object({
14032
14039
  group_by: import_v4.z.union([import_v4.z.string(), import_v4.z.undefined()]).optional(),
14033
14040
  range: import_v4.z.union([import_v4.z.string(), import_v4.z.undefined()]).optional(),
14034
14041
  bin_size: import_v4.z.string(),
14035
- custom_range: import_v4.z.union([aggregateEventsCustomRangeOutboundSchema, import_v4.z.undefined()]).optional()
14042
+ custom_range: import_v4.z.union([aggregateEventsCustomRangeOutboundSchema, import_v4.z.undefined()]).optional(),
14043
+ max_groups: import_v4.z.union([import_v4.z.number(), import_v4.z.undefined()]).optional()
14036
14044
  });
14037
14045
  var closedEnumSchema = import_v4.z.any();
14038
14046
  var rangeSchema = closedEnumSchema;
@@ -14044,7 +14052,8 @@ var eventsAggregateParamsSchema = import_v4.z.object({
14044
14052
  groupBy: import_v4.z.union([import_v4.z.string(), import_v4.z.undefined()]).optional(),
14045
14053
  range: import_v4.z.union([rangeSchema, import_v4.z.undefined()]).optional(),
14046
14054
  binSize: import_v4.z.union([binSizeSchema, import_v4.z.undefined()]).optional(),
14047
- customRange: import_v4.z.union([aggregateEventsCustomRangeSchema, import_v4.z.undefined()]).optional()
14055
+ customRange: import_v4.z.union([aggregateEventsCustomRangeSchema, import_v4.z.undefined()]).optional(),
14056
+ maxGroups: import_v4.z.union([import_v4.z.number(), import_v4.z.undefined()]).optional()
14048
14057
  });
14049
14058
 
14050
14059
  // src/generated/attachSchemas.ts
@@ -14189,7 +14198,8 @@ var attachParamsOutboundSchema = import_v42.z.object({
14189
14198
  custom_line_items: import_v42.z.union([import_v42.z.array(attachCustomLineItemOutboundSchema), import_v42.z.undefined()]).optional(),
14190
14199
  processor_subscription_id: import_v42.z.union([import_v42.z.string(), import_v42.z.undefined()]).optional(),
14191
14200
  carry_over_balances: import_v42.z.union([attachCarryOverBalancesOutboundSchema, import_v42.z.undefined()]).optional(),
14192
- carry_over_usages: import_v42.z.union([attachCarryOverUsagesOutboundSchema, import_v42.z.undefined()]).optional()
14201
+ carry_over_usages: import_v42.z.union([attachCarryOverUsagesOutboundSchema, import_v42.z.undefined()]).optional(),
14202
+ metadata: import_v42.z.union([import_v42.z.record(import_v42.z.string(), import_v42.z.string()), import_v42.z.undefined()]).optional()
14193
14203
  });
14194
14204
  var closedEnumSchema2 = import_v42.z.any();
14195
14205
  var openEnumSchema = import_v42.z.any();
@@ -14271,7 +14281,8 @@ var attachParamsSchema = import_v42.z.object({
14271
14281
  customLineItems: import_v42.z.union([import_v42.z.array(attachCustomLineItemSchema), import_v42.z.undefined()]).optional(),
14272
14282
  processorSubscriptionId: import_v42.z.union([import_v42.z.string(), import_v42.z.undefined()]).optional(),
14273
14283
  carryOverBalances: import_v42.z.union([attachCarryOverBalancesSchema, import_v42.z.undefined()]).optional(),
14274
- carryOverUsages: import_v42.z.union([attachCarryOverUsagesSchema, import_v42.z.undefined()]).optional()
14284
+ carryOverUsages: import_v42.z.union([attachCarryOverUsagesSchema, import_v42.z.undefined()]).optional(),
14285
+ metadata: import_v42.z.union([import_v42.z.record(import_v42.z.string(), import_v42.z.string()), import_v42.z.undefined()]).optional()
14275
14286
  });
14276
14287
  var attachCodeSchema = openEnumSchema;
14277
14288
  var attachRequiredActionSchema = import_v42.z.object({
@@ -15058,7 +15069,8 @@ var previewAttachParamsOutboundSchema = import_v49.z.object({
15058
15069
  custom_line_items: import_v49.z.union([import_v49.z.array(previewAttachCustomLineItemOutboundSchema), import_v49.z.undefined()]).optional(),
15059
15070
  processor_subscription_id: import_v49.z.union([import_v49.z.string(), import_v49.z.undefined()]).optional(),
15060
15071
  carry_over_balances: import_v49.z.union([previewAttachCarryOverBalancesOutboundSchema, import_v49.z.undefined()]).optional(),
15061
- carry_over_usages: import_v49.z.union([previewAttachCarryOverUsagesOutboundSchema, import_v49.z.undefined()]).optional()
15072
+ carry_over_usages: import_v49.z.union([previewAttachCarryOverUsagesOutboundSchema, import_v49.z.undefined()]).optional(),
15073
+ metadata: import_v49.z.union([import_v49.z.record(import_v49.z.string(), import_v49.z.string()), import_v49.z.undefined()]).optional()
15062
15074
  });
15063
15075
  var closedEnumSchema5 = import_v49.z.any();
15064
15076
  var planSchema = import_v49.z.any();
@@ -15141,7 +15153,8 @@ var previewAttachParamsSchema = import_v49.z.object({
15141
15153
  customLineItems: import_v49.z.union([import_v49.z.array(previewAttachCustomLineItemSchema), import_v49.z.undefined()]).optional(),
15142
15154
  processorSubscriptionId: import_v49.z.union([import_v49.z.string(), import_v49.z.undefined()]).optional(),
15143
15155
  carryOverBalances: import_v49.z.union([previewAttachCarryOverBalancesSchema, import_v49.z.undefined()]).optional(),
15144
- carryOverUsages: import_v49.z.union([previewAttachCarryOverUsagesSchema, import_v49.z.undefined()]).optional()
15156
+ carryOverUsages: import_v49.z.union([previewAttachCarryOverUsagesSchema, import_v49.z.undefined()]).optional(),
15157
+ metadata: import_v49.z.union([import_v49.z.record(import_v49.z.string(), import_v49.z.string()), import_v49.z.undefined()]).optional()
15145
15158
  });
15146
15159
  var previewAttachIncomingSchema = import_v49.z.object({
15147
15160
  planId: import_v49.z.string(),
@@ -15948,7 +15961,8 @@ var setupPaymentParamsOutboundSchema = import_v413.z.object({
15948
15961
  custom_line_items: import_v413.z.union([import_v413.z.array(setupPaymentCustomLineItemOutboundSchema), import_v413.z.undefined()]).optional(),
15949
15962
  processor_subscription_id: import_v413.z.union([import_v413.z.string(), import_v413.z.undefined()]).optional(),
15950
15963
  carry_over_balances: import_v413.z.union([setupPaymentCarryOverBalancesOutboundSchema, import_v413.z.undefined()]).optional(),
15951
- carry_over_usages: import_v413.z.union([setupPaymentCarryOverUsagesOutboundSchema, import_v413.z.undefined()]).optional()
15964
+ carry_over_usages: import_v413.z.union([setupPaymentCarryOverUsagesOutboundSchema, import_v413.z.undefined()]).optional(),
15965
+ metadata: import_v413.z.union([import_v413.z.record(import_v413.z.string(), import_v413.z.string()), import_v413.z.undefined()]).optional()
15952
15966
  });
15953
15967
  var closedEnumSchema8 = import_v413.z.any();
15954
15968
  var setupPaymentPriceIntervalSchema = closedEnumSchema8;
@@ -16023,7 +16037,8 @@ var setupPaymentParamsSchema = import_v413.z.object({
16023
16037
  customLineItems: import_v413.z.union([import_v413.z.array(setupPaymentCustomLineItemSchema), import_v413.z.undefined()]).optional(),
16024
16038
  processorSubscriptionId: import_v413.z.union([import_v413.z.string(), import_v413.z.undefined()]).optional(),
16025
16039
  carryOverBalances: import_v413.z.union([setupPaymentCarryOverBalancesSchema, import_v413.z.undefined()]).optional(),
16026
- carryOverUsages: import_v413.z.union([setupPaymentCarryOverUsagesSchema, import_v413.z.undefined()]).optional()
16040
+ carryOverUsages: import_v413.z.union([setupPaymentCarryOverUsagesSchema, import_v413.z.undefined()]).optional(),
16041
+ metadata: import_v413.z.union([import_v413.z.record(import_v413.z.string(), import_v413.z.string()), import_v413.z.undefined()]).optional()
16027
16042
  });
16028
16043
 
16029
16044
  // src/generated/updateSubscriptionSchemas.ts
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  autumnHandler
3
- } from "../chunk-OQXZXMNQ.mjs";
3
+ } from "../chunk-6YVVHFAT.mjs";
4
4
  import "../chunk-WYDGEDEU.mjs";
5
5
  import "../chunk-VXND2UDT.mjs";
6
- import "../chunk-UUYPN27R.mjs";
7
- import "../chunk-UANWRTQO.mjs";
8
- import "../chunk-XK7RZSEV.mjs";
6
+ import "../chunk-JDL37I7Y.mjs";
7
+ import "../chunk-VR35K2UZ.mjs";
8
+ import "../chunk-MJBKNDWD.mjs";
9
9
  import "../chunk-55C2WWXQ.mjs";
10
10
  import "../chunk-TBQ27LIK.mjs";
11
11
  import "../chunk-J44WR3QZ.mjs";
12
12
  import "../chunk-TSF4YCUO.mjs";
13
13
  import "../chunk-UAR3TMWI.mjs";
14
- import "../chunk-VDKSZFDB.mjs";
14
+ import "../chunk-BSY23UM3.mjs";
15
15
  import "../chunk-OTXV5FY7.mjs";
16
16
  import "../chunk-VZIMT7AO.mjs";
17
17
  import "../chunk-Z6QP3YEA.mjs";
@@ -1339,7 +1339,8 @@ var EventsAggregateParams$outboundSchema = z8.pipe(
1339
1339
  binSize: z8._default(BinSize$outboundSchema, "day"),
1340
1340
  customRange: z8.optional(
1341
1341
  z8.lazy(() => AggregateEventsCustomRange$outboundSchema)
1342
- )
1342
+ ),
1343
+ maxGroups: z8.optional(z8.int())
1343
1344
  }),
1344
1345
  z8.transform((v) => {
1345
1346
  return remap(v, {
@@ -1348,7 +1349,8 @@ var EventsAggregateParams$outboundSchema = z8.pipe(
1348
1349
  featureId: "feature_id",
1349
1350
  groupBy: "group_by",
1350
1351
  binSize: "bin_size",
1351
- customRange: "custom_range"
1352
+ customRange: "custom_range",
1353
+ maxGroups: "max_groups"
1352
1354
  });
1353
1355
  })
1354
1356
  );
@@ -1694,7 +1696,8 @@ var AttachParams$outboundSchema = z10.pipe(
1694
1696
  ),
1695
1697
  carryOverUsages: z10.optional(
1696
1698
  z10.lazy(() => AttachCarryOverUsages$outboundSchema)
1697
- )
1699
+ ),
1700
+ metadata: z10.optional(z10.record(z10.string(), z10.string()))
1698
1701
  }),
1699
1702
  z10.transform((v) => {
1700
1703
  return remap(v, {
@@ -6542,7 +6545,8 @@ var PreviewAttachParams$outboundSchema = z38.pipe(
6542
6545
  ),
6543
6546
  carryOverUsages: z38.optional(
6544
6547
  z38.lazy(() => PreviewAttachCarryOverUsages$outboundSchema)
6545
- )
6548
+ ),
6549
+ metadata: z38.optional(z38.record(z38.string(), z38.string()))
6546
6550
  }),
6547
6551
  z38.transform((v) => {
6548
6552
  return remap(v, {
@@ -8196,7 +8200,8 @@ var SetupPaymentParams$outboundSchema = z42.pipe(
8196
8200
  ),
8197
8201
  carryOverUsages: z42.optional(
8198
8202
  z42.lazy(() => SetupPaymentCarryOverUsages$outboundSchema)
8199
- )
8203
+ ),
8204
+ metadata: z42.optional(z42.record(z42.string(), z42.string()))
8200
8205
  }),
8201
8206
  z42.transform((v) => {
8202
8207
  return remap(v, {
@@ -11341,6 +11346,7 @@ var Billing = class extends ClientSDK {
11341
11346
  * @param processorSubscriptionId - The processor subscription ID to link. Use this to attach an existing Stripe subscription instead of creating a new one. (optional)
11342
11347
  * @param carryOverBalances - Whether to carry over balances from the previous plan. (optional)
11343
11348
  * @param carryOverUsages - Whether to carry over usages from the previous plan. (optional)
11349
+ * @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)
11344
11350
  *
11345
11351
  * @returns A billing response with customer ID, invoice details, and payment URL (if checkout required).
11346
11352
  */
@@ -11424,6 +11430,7 @@ var Billing = class extends ClientSDK {
11424
11430
  * @param processorSubscriptionId - The processor subscription ID to link. Use this to attach an existing Stripe subscription instead of creating a new one. (optional)
11425
11431
  * @param carryOverBalances - Whether to carry over balances from the previous plan. (optional)
11426
11432
  * @param carryOverUsages - Whether to carry over usages from the previous plan. (optional)
11433
+ * @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)
11427
11434
  *
11428
11435
  * @returns A preview response with line items, totals, and effective dates for the proposed changes.
11429
11436
  */
@@ -14035,7 +14042,8 @@ var eventsAggregateParamsOutboundSchema = import_v4.z.object({
14035
14042
  group_by: import_v4.z.union([import_v4.z.string(), import_v4.z.undefined()]).optional(),
14036
14043
  range: import_v4.z.union([import_v4.z.string(), import_v4.z.undefined()]).optional(),
14037
14044
  bin_size: import_v4.z.string(),
14038
- custom_range: import_v4.z.union([aggregateEventsCustomRangeOutboundSchema, import_v4.z.undefined()]).optional()
14045
+ custom_range: import_v4.z.union([aggregateEventsCustomRangeOutboundSchema, import_v4.z.undefined()]).optional(),
14046
+ max_groups: import_v4.z.union([import_v4.z.number(), import_v4.z.undefined()]).optional()
14039
14047
  });
14040
14048
  var closedEnumSchema = import_v4.z.any();
14041
14049
  var rangeSchema = closedEnumSchema;
@@ -14047,7 +14055,8 @@ var eventsAggregateParamsSchema = import_v4.z.object({
14047
14055
  groupBy: import_v4.z.union([import_v4.z.string(), import_v4.z.undefined()]).optional(),
14048
14056
  range: import_v4.z.union([rangeSchema, import_v4.z.undefined()]).optional(),
14049
14057
  binSize: import_v4.z.union([binSizeSchema, import_v4.z.undefined()]).optional(),
14050
- customRange: import_v4.z.union([aggregateEventsCustomRangeSchema, import_v4.z.undefined()]).optional()
14058
+ customRange: import_v4.z.union([aggregateEventsCustomRangeSchema, import_v4.z.undefined()]).optional(),
14059
+ maxGroups: import_v4.z.union([import_v4.z.number(), import_v4.z.undefined()]).optional()
14051
14060
  });
14052
14061
 
14053
14062
  // src/generated/attachSchemas.ts
@@ -14192,7 +14201,8 @@ var attachParamsOutboundSchema = import_v42.z.object({
14192
14201
  custom_line_items: import_v42.z.union([import_v42.z.array(attachCustomLineItemOutboundSchema), import_v42.z.undefined()]).optional(),
14193
14202
  processor_subscription_id: import_v42.z.union([import_v42.z.string(), import_v42.z.undefined()]).optional(),
14194
14203
  carry_over_balances: import_v42.z.union([attachCarryOverBalancesOutboundSchema, import_v42.z.undefined()]).optional(),
14195
- carry_over_usages: import_v42.z.union([attachCarryOverUsagesOutboundSchema, import_v42.z.undefined()]).optional()
14204
+ carry_over_usages: import_v42.z.union([attachCarryOverUsagesOutboundSchema, import_v42.z.undefined()]).optional(),
14205
+ metadata: import_v42.z.union([import_v42.z.record(import_v42.z.string(), import_v42.z.string()), import_v42.z.undefined()]).optional()
14196
14206
  });
14197
14207
  var closedEnumSchema2 = import_v42.z.any();
14198
14208
  var openEnumSchema = import_v42.z.any();
@@ -14274,7 +14284,8 @@ var attachParamsSchema = import_v42.z.object({
14274
14284
  customLineItems: import_v42.z.union([import_v42.z.array(attachCustomLineItemSchema), import_v42.z.undefined()]).optional(),
14275
14285
  processorSubscriptionId: import_v42.z.union([import_v42.z.string(), import_v42.z.undefined()]).optional(),
14276
14286
  carryOverBalances: import_v42.z.union([attachCarryOverBalancesSchema, import_v42.z.undefined()]).optional(),
14277
- carryOverUsages: import_v42.z.union([attachCarryOverUsagesSchema, import_v42.z.undefined()]).optional()
14287
+ carryOverUsages: import_v42.z.union([attachCarryOverUsagesSchema, import_v42.z.undefined()]).optional(),
14288
+ metadata: import_v42.z.union([import_v42.z.record(import_v42.z.string(), import_v42.z.string()), import_v42.z.undefined()]).optional()
14278
14289
  });
14279
14290
  var attachCodeSchema = openEnumSchema;
14280
14291
  var attachRequiredActionSchema = import_v42.z.object({
@@ -15061,7 +15072,8 @@ var previewAttachParamsOutboundSchema = import_v49.z.object({
15061
15072
  custom_line_items: import_v49.z.union([import_v49.z.array(previewAttachCustomLineItemOutboundSchema), import_v49.z.undefined()]).optional(),
15062
15073
  processor_subscription_id: import_v49.z.union([import_v49.z.string(), import_v49.z.undefined()]).optional(),
15063
15074
  carry_over_balances: import_v49.z.union([previewAttachCarryOverBalancesOutboundSchema, import_v49.z.undefined()]).optional(),
15064
- carry_over_usages: import_v49.z.union([previewAttachCarryOverUsagesOutboundSchema, import_v49.z.undefined()]).optional()
15075
+ carry_over_usages: import_v49.z.union([previewAttachCarryOverUsagesOutboundSchema, import_v49.z.undefined()]).optional(),
15076
+ metadata: import_v49.z.union([import_v49.z.record(import_v49.z.string(), import_v49.z.string()), import_v49.z.undefined()]).optional()
15065
15077
  });
15066
15078
  var closedEnumSchema5 = import_v49.z.any();
15067
15079
  var planSchema = import_v49.z.any();
@@ -15144,7 +15156,8 @@ var previewAttachParamsSchema = import_v49.z.object({
15144
15156
  customLineItems: import_v49.z.union([import_v49.z.array(previewAttachCustomLineItemSchema), import_v49.z.undefined()]).optional(),
15145
15157
  processorSubscriptionId: import_v49.z.union([import_v49.z.string(), import_v49.z.undefined()]).optional(),
15146
15158
  carryOverBalances: import_v49.z.union([previewAttachCarryOverBalancesSchema, import_v49.z.undefined()]).optional(),
15147
- carryOverUsages: import_v49.z.union([previewAttachCarryOverUsagesSchema, import_v49.z.undefined()]).optional()
15159
+ carryOverUsages: import_v49.z.union([previewAttachCarryOverUsagesSchema, import_v49.z.undefined()]).optional(),
15160
+ metadata: import_v49.z.union([import_v49.z.record(import_v49.z.string(), import_v49.z.string()), import_v49.z.undefined()]).optional()
15148
15161
  });
15149
15162
  var previewAttachIncomingSchema = import_v49.z.object({
15150
15163
  planId: import_v49.z.string(),
@@ -15951,7 +15964,8 @@ var setupPaymentParamsOutboundSchema = import_v413.z.object({
15951
15964
  custom_line_items: import_v413.z.union([import_v413.z.array(setupPaymentCustomLineItemOutboundSchema), import_v413.z.undefined()]).optional(),
15952
15965
  processor_subscription_id: import_v413.z.union([import_v413.z.string(), import_v413.z.undefined()]).optional(),
15953
15966
  carry_over_balances: import_v413.z.union([setupPaymentCarryOverBalancesOutboundSchema, import_v413.z.undefined()]).optional(),
15954
- carry_over_usages: import_v413.z.union([setupPaymentCarryOverUsagesOutboundSchema, import_v413.z.undefined()]).optional()
15967
+ carry_over_usages: import_v413.z.union([setupPaymentCarryOverUsagesOutboundSchema, import_v413.z.undefined()]).optional(),
15968
+ metadata: import_v413.z.union([import_v413.z.record(import_v413.z.string(), import_v413.z.string()), import_v413.z.undefined()]).optional()
15955
15969
  });
15956
15970
  var closedEnumSchema8 = import_v413.z.any();
15957
15971
  var setupPaymentPriceIntervalSchema = closedEnumSchema8;
@@ -16026,7 +16040,8 @@ var setupPaymentParamsSchema = import_v413.z.object({
16026
16040
  customLineItems: import_v413.z.union([import_v413.z.array(setupPaymentCustomLineItemSchema), import_v413.z.undefined()]).optional(),
16027
16041
  processorSubscriptionId: import_v413.z.union([import_v413.z.string(), import_v413.z.undefined()]).optional(),
16028
16042
  carryOverBalances: import_v413.z.union([setupPaymentCarryOverBalancesSchema, import_v413.z.undefined()]).optional(),
16029
- carryOverUsages: import_v413.z.union([setupPaymentCarryOverUsagesSchema, import_v413.z.undefined()]).optional()
16043
+ carryOverUsages: import_v413.z.union([setupPaymentCarryOverUsagesSchema, import_v413.z.undefined()]).optional(),
16044
+ metadata: import_v413.z.union([import_v413.z.record(import_v413.z.string(), import_v413.z.string()), import_v413.z.undefined()]).optional()
16030
16045
  });
16031
16046
 
16032
16047
  // src/generated/updateSubscriptionSchemas.ts