autumn-js 1.2.12 → 1.2.14

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 (157) hide show
  1. package/dist/backend/adapters/express.js +510 -73
  2. package/dist/backend/adapters/express.mjs +5 -5
  3. package/dist/backend/adapters/fetch.js +510 -73
  4. package/dist/backend/adapters/fetch.mjs +5 -5
  5. package/dist/backend/adapters/hono.js +510 -73
  6. package/dist/backend/adapters/hono.mjs +5 -5
  7. package/dist/backend/adapters/index.js +510 -73
  8. package/dist/backend/adapters/index.mjs +8 -8
  9. package/dist/backend/adapters/next.js +510 -73
  10. package/dist/backend/adapters/next.mjs +5 -5
  11. package/dist/backend/{chunk-ITXMMCSD.mjs → chunk-5XWZK7Q6.mjs} +2 -2
  12. package/dist/backend/{chunk-4Q54RXI2.mjs → chunk-BVJU43R5.mjs} +1 -1
  13. package/dist/backend/{chunk-UEYDU64U.mjs → chunk-GE5VY4YO.mjs} +506 -73
  14. package/dist/backend/{chunk-7Q77N2K2.mjs → chunk-JDJMZQCY.mjs} +1 -1
  15. package/dist/backend/{chunk-X4LPDDOP.mjs → chunk-MANTLPDT.mjs} +4 -0
  16. package/dist/backend/{chunk-JQX5WYYY.mjs → chunk-N2OJ347N.mjs} +1 -1
  17. package/dist/backend/{chunk-N53PKNZ6.mjs → chunk-QAFNIIBW.mjs} +2 -2
  18. package/dist/backend/{chunk-SE5CK5NY.mjs → chunk-ZOOAE7OJ.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 +510 -73
  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 +510 -73
  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 +510 -73
  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 +510 -73
  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 +4 -0
  38. package/dist/backend/core/routes/index.mjs +1 -1
  39. package/dist/backend/core/routes/routeBuilder.d.mts +1 -1
  40. package/dist/backend/core/routes/routeBuilder.d.ts +1 -1
  41. package/dist/backend/core/routes/routeConfigs.d.mts +1 -1
  42. package/dist/backend/core/routes/routeConfigs.d.ts +1 -1
  43. package/dist/backend/core/routes/routeConfigs.js +4 -0
  44. package/dist/backend/core/routes/routeConfigs.mjs +1 -1
  45. package/dist/backend/core/types/handlerTypes.d.mts +1 -1
  46. package/dist/backend/core/types/handlerTypes.d.ts +1 -1
  47. package/dist/backend/core/types/index.d.mts +1 -1
  48. package/dist/backend/core/types/index.d.ts +1 -1
  49. package/dist/backend/core/types/routeTypes.d.mts +1 -1
  50. package/dist/backend/core/types/routeTypes.d.ts +1 -1
  51. package/dist/backend/index.d.mts +2 -2
  52. package/dist/backend/index.d.ts +2 -2
  53. package/dist/backend/index.js +510 -73
  54. package/dist/backend/index.mjs +4 -4
  55. package/dist/backend/{routeTypes-Cu-XQy7A.d.mts → routeTypes-B-X-zb1q.d.mts} +651 -68
  56. package/dist/backend/{routeTypes-D0ag5-Tb.d.ts → routeTypes-bGaZQm24.d.ts} +651 -68
  57. package/dist/better-auth/{chunk-TEP6CVHR.mjs → chunk-4OWECHZC.mjs} +1 -1
  58. package/dist/better-auth/{chunk-XFATOIZD.mjs → chunk-DNNKTBFL.mjs} +507 -74
  59. package/dist/better-auth/{chunk-GKUK5UGW.mjs → chunk-JIFD4TSN.mjs} +4 -0
  60. package/dist/better-auth/client.d.mts +2 -8
  61. package/dist/better-auth/client.d.ts +2 -8
  62. package/dist/better-auth/createAutumnEndpoint-Clm1sxhQ.d.mts +39 -0
  63. package/dist/better-auth/createAutumnEndpoint-Clm1sxhQ.d.ts +39 -0
  64. package/dist/better-auth/index.d.mts +2 -8
  65. package/dist/better-auth/index.d.ts +2 -8
  66. package/dist/better-auth/index.js +510 -73
  67. package/dist/better-auth/index.mjs +3 -3
  68. package/dist/better-auth/utils/createAutumnEndpoint.d.mts +2 -8
  69. package/dist/better-auth/utils/createAutumnEndpoint.d.ts +2 -8
  70. package/dist/better-auth/utils/createAutumnEndpoint.js +4 -0
  71. package/dist/better-auth/utils/createAutumnEndpoint.mjs +2 -2
  72. package/dist/better-auth/utils/handleBetterAuthRoute.d.mts +2 -8
  73. package/dist/better-auth/utils/handleBetterAuthRoute.d.ts +2 -8
  74. package/dist/better-auth/utils/handleBetterAuthRoute.js +510 -73
  75. package/dist/better-auth/utils/handleBetterAuthRoute.mjs +2 -2
  76. package/dist/better-auth/utils/index.d.mts +2 -8
  77. package/dist/better-auth/utils/index.d.ts +2 -8
  78. package/dist/better-auth/utils/index.js +510 -73
  79. package/dist/better-auth/utils/index.mjs +3 -3
  80. package/dist/react/AutumnContext.d.mts +3 -3
  81. package/dist/react/AutumnContext.d.ts +3 -3
  82. package/dist/react/AutumnProvider.js +15 -15
  83. package/dist/react/AutumnProvider.mjs +2 -2
  84. package/dist/react/{chunk-26CKSAPZ.mjs → chunk-7IDH4OMG.mjs} +1 -1
  85. package/dist/react/{chunk-HSQUB3BZ.mjs → chunk-BDG6JHEW.mjs} +1 -1
  86. package/dist/react/{chunk-KB72KQKN.mjs → chunk-DEZBJQEG.mjs} +1 -1
  87. package/dist/react/{chunk-XJZH5NMZ.mjs → chunk-E5ZHOMZ4.mjs} +23 -23
  88. package/dist/react/{chunk-OXQG65ZT.mjs → chunk-FWWIAOPU.mjs} +1 -1
  89. package/dist/react/{chunk-ZGPE4R6H.mjs → chunk-HVBDZARN.mjs} +2 -2
  90. package/dist/react/{chunk-MC2YYATT.mjs → chunk-J6SLKTKE.mjs} +1 -1
  91. package/dist/react/{chunk-CHU7CIWP.mjs → chunk-NSFHAUTD.mjs} +1 -1
  92. package/dist/react/{chunk-G7FTQLT7.mjs → chunk-YQFYWH7J.mjs} +1 -1
  93. package/dist/react/client/AutumnClient.d.mts +3 -3
  94. package/dist/react/client/AutumnClient.d.ts +3 -3
  95. package/dist/react/client/IAutumnClient.d.mts +16 -3
  96. package/dist/react/client/IAutumnClient.d.ts +16 -3
  97. package/dist/react/client/index.d.mts +3 -3
  98. package/dist/react/client/index.d.ts +3 -3
  99. package/dist/react/{customer-CbcVyRCQ.d.ts → customer-CaGJEN5J.d.ts} +1 -1
  100. package/dist/react/{customer-BYYt9N1h.d.mts → customer-DB8vL_m7.d.mts} +1 -1
  101. package/dist/react/hooks/index.d.mts +3 -3
  102. package/dist/react/hooks/index.d.ts +3 -3
  103. package/dist/react/hooks/index.js +16 -16
  104. package/dist/react/hooks/index.mjs +8 -8
  105. package/dist/react/hooks/internal/check/balanceToAllowed.d.mts +2 -2
  106. package/dist/react/hooks/internal/check/balanceToAllowed.d.ts +2 -2
  107. package/dist/react/hooks/internal/check/customerToFeatures.d.mts +2 -2
  108. package/dist/react/hooks/internal/check/customerToFeatures.d.ts +2 -2
  109. package/dist/react/hooks/internal/check/findCreditSystemsByFeature.d.mts +2 -2
  110. package/dist/react/hooks/internal/check/findCreditSystemsByFeature.d.ts +2 -2
  111. package/dist/react/hooks/internal/check/getCreditCost.d.mts +2 -2
  112. package/dist/react/hooks/internal/check/getCreditCost.d.ts +2 -2
  113. package/dist/react/hooks/internal/getLocalCheckResponse.d.mts +3 -3
  114. package/dist/react/hooks/internal/getLocalCheckResponse.d.ts +3 -3
  115. package/dist/react/hooks/internal/useCustomerActions.d.mts +3 -3
  116. package/dist/react/hooks/internal/useCustomerActions.d.ts +3 -3
  117. package/dist/react/hooks/internal/useCustomerActions.js +1 -1
  118. package/dist/react/hooks/internal/useCustomerActions.mjs +2 -2
  119. package/dist/react/hooks/useAggregateEvents.d.mts +2 -2
  120. package/dist/react/hooks/useAggregateEvents.d.ts +2 -2
  121. package/dist/react/hooks/useAggregateEvents.js +16 -16
  122. package/dist/react/hooks/useAggregateEvents.mjs +2 -2
  123. package/dist/react/hooks/useCustomer.d.mts +3 -3
  124. package/dist/react/hooks/useCustomer.d.ts +3 -3
  125. package/dist/react/hooks/useCustomer.js +16 -16
  126. package/dist/react/hooks/useCustomer.mjs +3 -3
  127. package/dist/react/hooks/useEntity.d.mts +2 -2
  128. package/dist/react/hooks/useEntity.d.ts +2 -2
  129. package/dist/react/hooks/useEntity.js +16 -16
  130. package/dist/react/hooks/useEntity.mjs +2 -2
  131. package/dist/react/hooks/useListEvents.d.mts +2 -2
  132. package/dist/react/hooks/useListEvents.d.ts +2 -2
  133. package/dist/react/hooks/useListEvents.js +16 -16
  134. package/dist/react/hooks/useListEvents.mjs +2 -2
  135. package/dist/react/hooks/useListPlans.d.mts +2 -2
  136. package/dist/react/hooks/useListPlans.d.ts +2 -2
  137. package/dist/react/hooks/useListPlans.js +16 -16
  138. package/dist/react/hooks/useListPlans.mjs +2 -2
  139. package/dist/react/hooks/useReferrals.d.mts +2 -2
  140. package/dist/react/hooks/useReferrals.d.ts +2 -2
  141. package/dist/react/hooks/useReferrals.js +16 -16
  142. package/dist/react/hooks/useReferrals.mjs +2 -2
  143. package/dist/react/index.d.mts +3 -3
  144. package/dist/react/index.d.ts +3 -3
  145. package/dist/react/index.js +22 -22
  146. package/dist/react/index.mjs +9 -9
  147. package/dist/react/{params-By0MIRsJ.d.ts → params-CTiHT2EX.d.ts} +516 -65
  148. package/dist/react/{params-CUb0ZlUG.d.mts → params-ZvrBzzFE.d.mts} +516 -65
  149. package/dist/react/{plan-CqxFGNk2.d.mts → plan-DSTBzzTY.d.mts} +13 -0
  150. package/dist/react/{plan-CqxFGNk2.d.ts → plan-DSTBzzTY.d.ts} +13 -0
  151. package/dist/sdk/index.d.mts +807 -109
  152. package/dist/sdk/index.d.ts +807 -109
  153. package/dist/sdk/index.js +3546 -2857
  154. package/dist/sdk/index.mjs +3416 -2805
  155. package/package.json +1 -1
  156. package/dist/better-auth/createAutumnEndpoint-D9Plymvy.d.mts +0 -309
  157. package/dist/better-auth/createAutumnEndpoint-D9Plymvy.d.ts +0 -309
@@ -2282,31 +2282,31 @@ var BillingUpdateResponse$inboundSchema = z12.pipe(
2282
2282
 
2283
2283
  // ../sdk/src/models/check-op.ts
2284
2284
  var z13 = __toESM(require("zod/v4-mini"), 1);
2285
- var FlagType = {
2285
+ var FlagType2 = {
2286
2286
  Boolean: "boolean",
2287
2287
  Metered: "metered",
2288
2288
  CreditSystem: "credit_system"
2289
2289
  };
2290
- var Scenario = {
2290
+ var Scenario2 = {
2291
2291
  UsageLimit: "usage_limit",
2292
2292
  FeatureFlag: "feature_flag"
2293
2293
  };
2294
- var CheckEnv = {
2294
+ var CheckEnv2 = {
2295
2295
  Sandbox: "sandbox",
2296
2296
  Live: "live"
2297
2297
  };
2298
- var ProductType = {
2298
+ var ProductType2 = {
2299
2299
  Feature: "feature",
2300
2300
  PricedFeature: "priced_feature",
2301
2301
  Price: "price"
2302
2302
  };
2303
- var FeatureType = {
2303
+ var FeatureType2 = {
2304
2304
  SingleUse: "single_use",
2305
2305
  ContinuousUse: "continuous_use",
2306
2306
  Boolean: "boolean",
2307
2307
  Static: "static"
2308
2308
  };
2309
- var CheckInterval = {
2309
+ var CheckInterval2 = {
2310
2310
  Minute: "minute",
2311
2311
  Hour: "hour",
2312
2312
  Day: "day",
@@ -2316,37 +2316,113 @@ var CheckInterval = {
2316
2316
  SemiAnnual: "semi_annual",
2317
2317
  Year: "year"
2318
2318
  };
2319
- var CheckTierBehavior = {
2319
+ var CheckTierBehavior2 = {
2320
2320
  Graduated: "graduated",
2321
2321
  Volume: "volume"
2322
2322
  };
2323
- var UsageModel = {
2323
+ var UsageModel2 = {
2324
2324
  Prepaid: "prepaid",
2325
2325
  PayPerUse: "pay_per_use"
2326
2326
  };
2327
- var ConfigDuration = {
2327
+ var ConfigDuration2 = {
2328
2328
  Month: "month",
2329
2329
  Forever: "forever"
2330
2330
  };
2331
- var CheckOnIncrease = {
2331
+ var CheckOnIncrease2 = {
2332
2332
  BillImmediately: "bill_immediately",
2333
2333
  ProrateImmediately: "prorate_immediately",
2334
2334
  ProrateNextCycle: "prorate_next_cycle",
2335
2335
  BillNextCycle: "bill_next_cycle"
2336
2336
  };
2337
- var CheckOnDecrease = {
2337
+ var CheckOnDecrease2 = {
2338
2338
  Prorate: "prorate",
2339
2339
  ProrateImmediately: "prorate_immediately",
2340
2340
  ProrateNextCycle: "prorate_next_cycle",
2341
2341
  None: "none",
2342
2342
  NoProrations: "no_prorations"
2343
2343
  };
2344
- var FreeTrialDuration = {
2344
+ var FreeTrialDuration2 = {
2345
2345
  Day: "day",
2346
2346
  Month: "month",
2347
2347
  Year: "year"
2348
2348
  };
2349
- var ProductScenario = {
2349
+ var ProductScenario2 = {
2350
+ Scheduled: "scheduled",
2351
+ Active: "active",
2352
+ New: "new",
2353
+ Renew: "renew",
2354
+ Upgrade: "upgrade",
2355
+ UpdatePrepaidQuantity: "update_prepaid_quantity",
2356
+ Downgrade: "downgrade",
2357
+ Cancel: "cancel",
2358
+ Expired: "expired",
2359
+ PastDue: "past_due"
2360
+ };
2361
+ var FlagType1 = {
2362
+ Boolean: "boolean",
2363
+ Metered: "metered",
2364
+ CreditSystem: "credit_system"
2365
+ };
2366
+ var Scenario1 = {
2367
+ UsageLimit: "usage_limit",
2368
+ FeatureFlag: "feature_flag"
2369
+ };
2370
+ var CheckEnv1 = {
2371
+ Sandbox: "sandbox",
2372
+ Live: "live"
2373
+ };
2374
+ var ProductType1 = {
2375
+ Feature: "feature",
2376
+ PricedFeature: "priced_feature",
2377
+ Price: "price"
2378
+ };
2379
+ var FeatureType1 = {
2380
+ SingleUse: "single_use",
2381
+ ContinuousUse: "continuous_use",
2382
+ Boolean: "boolean",
2383
+ Static: "static"
2384
+ };
2385
+ var CheckInterval1 = {
2386
+ Minute: "minute",
2387
+ Hour: "hour",
2388
+ Day: "day",
2389
+ Week: "week",
2390
+ Month: "month",
2391
+ Quarter: "quarter",
2392
+ SemiAnnual: "semi_annual",
2393
+ Year: "year"
2394
+ };
2395
+ var CheckTierBehavior1 = {
2396
+ Graduated: "graduated",
2397
+ Volume: "volume"
2398
+ };
2399
+ var UsageModel1 = {
2400
+ Prepaid: "prepaid",
2401
+ PayPerUse: "pay_per_use"
2402
+ };
2403
+ var ConfigDuration1 = {
2404
+ Month: "month",
2405
+ Forever: "forever"
2406
+ };
2407
+ var CheckOnIncrease1 = {
2408
+ BillImmediately: "bill_immediately",
2409
+ ProrateImmediately: "prorate_immediately",
2410
+ ProrateNextCycle: "prorate_next_cycle",
2411
+ BillNextCycle: "bill_next_cycle"
2412
+ };
2413
+ var CheckOnDecrease1 = {
2414
+ Prorate: "prorate",
2415
+ ProrateImmediately: "prorate_immediately",
2416
+ ProrateNextCycle: "prorate_next_cycle",
2417
+ None: "none",
2418
+ NoProrations: "no_prorations"
2419
+ };
2420
+ var FreeTrialDuration1 = {
2421
+ Day: "day",
2422
+ Month: "month",
2423
+ Year: "year"
2424
+ };
2425
+ var ProductScenario1 = {
2350
2426
  Scheduled: "scheduled",
2351
2427
  Active: "active",
2352
2428
  New: "new",
@@ -2393,8 +2469,8 @@ var CheckParams$outboundSchema = z13.pipe(
2393
2469
  });
2394
2470
  })
2395
2471
  );
2396
- var FlagType$inboundSchema = inboundSchema(FlagType);
2397
- var CheckCreditSchema$inboundSchema = z13.pipe(
2472
+ var FlagType2$inboundSchema = inboundSchema(FlagType2);
2473
+ var CheckCreditSchema2$inboundSchema = z13.pipe(
2398
2474
  z13.object({
2399
2475
  metered_feature_id: string4(),
2400
2476
  credit_cost: number2()
@@ -2406,21 +2482,21 @@ var CheckCreditSchema$inboundSchema = z13.pipe(
2406
2482
  });
2407
2483
  })
2408
2484
  );
2409
- var FlagDisplay$inboundSchema = z13.object({
2485
+ var FlagDisplay2$inboundSchema = z13.object({
2410
2486
  singular: z13.optional(z13.nullable(string4())),
2411
2487
  plural: z13.optional(z13.nullable(string4()))
2412
2488
  });
2413
- var CheckFeature$inboundSchema = z13.pipe(
2489
+ var CheckFeature2$inboundSchema = z13.pipe(
2414
2490
  z13.object({
2415
2491
  id: string4(),
2416
2492
  name: string4(),
2417
- type: FlagType$inboundSchema,
2493
+ type: FlagType2$inboundSchema,
2418
2494
  consumable: boolean2(),
2419
2495
  event_names: optional2(z13.array(string4())),
2420
2496
  credit_schema: optional2(
2421
- z13.array(z13.lazy(() => CheckCreditSchema$inboundSchema))
2497
+ z13.array(z13.lazy(() => CheckCreditSchema2$inboundSchema))
2422
2498
  ),
2423
- display: optional2(z13.lazy(() => FlagDisplay$inboundSchema)),
2499
+ display: optional2(z13.lazy(() => FlagDisplay2$inboundSchema)),
2424
2500
  archived: boolean2()
2425
2501
  }),
2426
2502
  z13.transform((v) => {
@@ -2430,13 +2506,13 @@ var CheckFeature$inboundSchema = z13.pipe(
2430
2506
  });
2431
2507
  })
2432
2508
  );
2433
- var Flag$inboundSchema = z13.pipe(
2509
+ var Flag2$inboundSchema = z13.pipe(
2434
2510
  z13.object({
2435
2511
  id: string4(),
2436
2512
  plan_id: nullable(string4()),
2437
2513
  expires_at: nullable(number2()),
2438
2514
  feature_id: string4(),
2439
- feature: optional2(z13.lazy(() => CheckFeature$inboundSchema))
2515
+ feature: optional2(z13.lazy(() => CheckFeature2$inboundSchema))
2440
2516
  }),
2441
2517
  z13.transform((v) => {
2442
2518
  return remap(v, {
@@ -2446,15 +2522,15 @@ var Flag$inboundSchema = z13.pipe(
2446
2522
  });
2447
2523
  })
2448
2524
  );
2449
- var Scenario$inboundSchema = inboundSchema(Scenario);
2450
- var CheckEnv$inboundSchema = inboundSchema(CheckEnv);
2451
- var ProductType$inboundSchema = inboundSchema(ProductType);
2452
- var FeatureType$inboundSchema = inboundSchema(FeatureType);
2453
- var IncludedUsage$inboundSchema = smartUnion([number2(), string4()]);
2454
- var CheckInterval$inboundSchema = inboundSchema(CheckInterval);
2455
- var CheckTierBehavior$inboundSchema = inboundSchema(CheckTierBehavior);
2456
- var UsageModel$inboundSchema = inboundSchema(UsageModel);
2457
- var ProductDisplay$inboundSchema = z13.pipe(
2525
+ var Scenario2$inboundSchema = inboundSchema(Scenario2);
2526
+ var CheckEnv2$inboundSchema = inboundSchema(CheckEnv2);
2527
+ var ProductType2$inboundSchema = inboundSchema(ProductType2);
2528
+ var FeatureType2$inboundSchema = inboundSchema(FeatureType2);
2529
+ var IncludedUsage2$inboundSchema = smartUnion([number2(), string4()]);
2530
+ var CheckInterval2$inboundSchema = inboundSchema(CheckInterval2);
2531
+ var CheckTierBehavior2$inboundSchema = inboundSchema(CheckTierBehavior2);
2532
+ var UsageModel2$inboundSchema = inboundSchema(UsageModel2);
2533
+ var ProductDisplay2$inboundSchema = z13.pipe(
2458
2534
  z13.object({
2459
2535
  primary_text: string4(),
2460
2536
  secondary_text: z13.optional(z13.nullable(string4()))
@@ -2466,12 +2542,12 @@ var ProductDisplay$inboundSchema = z13.pipe(
2466
2542
  });
2467
2543
  })
2468
2544
  );
2469
- var ConfigDuration$inboundSchema = inboundSchema(ConfigDuration);
2470
- var CheckRollover$inboundSchema = z13.pipe(
2545
+ var ConfigDuration2$inboundSchema = inboundSchema(ConfigDuration2);
2546
+ var CheckRollover2$inboundSchema = z13.pipe(
2471
2547
  z13.object({
2472
2548
  max: z13.optional(z13.nullable(number2())),
2473
2549
  max_percentage: z13.optional(z13.nullable(number2())),
2474
- duration: z13._default(ConfigDuration$inboundSchema, "month"),
2550
+ duration: z13._default(ConfigDuration2$inboundSchema, "month"),
2475
2551
  length: number2()
2476
2552
  }),
2477
2553
  z13.transform((v) => {
@@ -2480,15 +2556,15 @@ var CheckRollover$inboundSchema = z13.pipe(
2480
2556
  });
2481
2557
  })
2482
2558
  );
2483
- var CheckOnIncrease$inboundSchema = inboundSchema(CheckOnIncrease);
2484
- var CheckOnDecrease$inboundSchema = inboundSchema(CheckOnDecrease);
2485
- var CheckConfig$inboundSchema = z13.pipe(
2559
+ var CheckOnIncrease2$inboundSchema = inboundSchema(CheckOnIncrease2);
2560
+ var CheckOnDecrease2$inboundSchema = inboundSchema(CheckOnDecrease2);
2561
+ var CheckConfig2$inboundSchema = z13.pipe(
2486
2562
  z13.object({
2487
2563
  rollover: z13.optional(
2488
- z13.nullable(z13.lazy(() => CheckRollover$inboundSchema))
2564
+ z13.nullable(z13.lazy(() => CheckRollover2$inboundSchema))
2489
2565
  ),
2490
- on_increase: z13.optional(z13.nullable(CheckOnIncrease$inboundSchema)),
2491
- on_decrease: z13.optional(z13.nullable(CheckOnDecrease$inboundSchema))
2566
+ on_increase: z13.optional(z13.nullable(CheckOnIncrease2$inboundSchema)),
2567
+ on_decrease: z13.optional(z13.nullable(CheckOnDecrease2$inboundSchema))
2492
2568
  }),
2493
2569
  z13.transform((v) => {
2494
2570
  return remap(v, {
@@ -2497,29 +2573,29 @@ var CheckConfig$inboundSchema = z13.pipe(
2497
2573
  });
2498
2574
  })
2499
2575
  );
2500
- var CheckItem$inboundSchema = z13.pipe(
2576
+ var CheckItem2$inboundSchema = z13.pipe(
2501
2577
  z13.object({
2502
- type: z13.optional(z13.nullable(ProductType$inboundSchema)),
2578
+ type: z13.optional(z13.nullable(ProductType2$inboundSchema)),
2503
2579
  feature_id: z13.optional(z13.nullable(string4())),
2504
- feature_type: z13.optional(z13.nullable(FeatureType$inboundSchema)),
2580
+ feature_type: z13.optional(z13.nullable(FeatureType2$inboundSchema)),
2505
2581
  included_usage: z13.optional(
2506
2582
  z13.nullable(smartUnion([number2(), string4()]))
2507
2583
  ),
2508
- interval: z13.optional(z13.nullable(CheckInterval$inboundSchema)),
2584
+ interval: z13.optional(z13.nullable(CheckInterval2$inboundSchema)),
2509
2585
  interval_count: z13.optional(z13.nullable(number2())),
2510
2586
  price: z13.optional(z13.nullable(number2())),
2511
2587
  tiers: z13.optional(z13.nullable(z13.array(nullable(z13.any())))),
2512
- tier_behavior: z13.optional(z13.nullable(CheckTierBehavior$inboundSchema)),
2513
- usage_model: z13.optional(z13.nullable(UsageModel$inboundSchema)),
2588
+ tier_behavior: z13.optional(z13.nullable(CheckTierBehavior2$inboundSchema)),
2589
+ usage_model: z13.optional(z13.nullable(UsageModel2$inboundSchema)),
2514
2590
  billing_units: z13.optional(z13.nullable(number2())),
2515
2591
  reset_usage_when_enabled: z13.optional(z13.nullable(boolean2())),
2516
2592
  entity_feature_id: z13.optional(z13.nullable(string4())),
2517
2593
  display: z13.optional(
2518
- z13.nullable(z13.lazy(() => ProductDisplay$inboundSchema))
2594
+ z13.nullable(z13.lazy(() => ProductDisplay2$inboundSchema))
2519
2595
  ),
2520
2596
  quantity: z13.optional(z13.nullable(number2())),
2521
2597
  next_cycle_quantity: z13.optional(z13.nullable(number2())),
2522
- config: z13.optional(z13.nullable(z13.lazy(() => CheckConfig$inboundSchema)))
2598
+ config: z13.optional(z13.nullable(z13.lazy(() => CheckConfig2$inboundSchema)))
2523
2599
  }),
2524
2600
  z13.transform((v) => {
2525
2601
  return remap(v, {
@@ -2536,10 +2612,10 @@ var CheckItem$inboundSchema = z13.pipe(
2536
2612
  });
2537
2613
  })
2538
2614
  );
2539
- var FreeTrialDuration$inboundSchema = inboundSchema(FreeTrialDuration);
2540
- var CheckFreeTrial$inboundSchema = z13.pipe(
2615
+ var FreeTrialDuration2$inboundSchema = inboundSchema(FreeTrialDuration2);
2616
+ var CheckFreeTrial2$inboundSchema = z13.pipe(
2541
2617
  z13.object({
2542
- duration: FreeTrialDuration$inboundSchema,
2618
+ duration: FreeTrialDuration2$inboundSchema,
2543
2619
  length: number2(),
2544
2620
  unique_fingerprint: boolean2(),
2545
2621
  card_required: boolean2(),
@@ -2553,8 +2629,8 @@ var CheckFreeTrial$inboundSchema = z13.pipe(
2553
2629
  });
2554
2630
  })
2555
2631
  );
2556
- var ProductScenario$inboundSchema = inboundSchema(ProductScenario);
2557
- var Properties$inboundSchema = z13.pipe(
2632
+ var ProductScenario2$inboundSchema = inboundSchema(ProductScenario2);
2633
+ var Properties2$inboundSchema = z13.pipe(
2558
2634
  z13.object({
2559
2635
  is_free: boolean2(),
2560
2636
  is_one_off: boolean2(),
@@ -2571,22 +2647,22 @@ var Properties$inboundSchema = z13.pipe(
2571
2647
  });
2572
2648
  })
2573
2649
  );
2574
- var Product$inboundSchema = z13.pipe(
2650
+ var Product2$inboundSchema = z13.pipe(
2575
2651
  z13.object({
2576
2652
  id: string4(),
2577
2653
  name: string4(),
2578
2654
  group: nullable(string4()),
2579
- env: CheckEnv$inboundSchema,
2655
+ env: CheckEnv2$inboundSchema,
2580
2656
  is_add_on: boolean2(),
2581
2657
  is_default: boolean2(),
2582
2658
  archived: boolean2(),
2583
2659
  version: number2(),
2584
2660
  created_at: number2(),
2585
- items: z13.array(z13.lazy(() => CheckItem$inboundSchema)),
2586
- free_trial: nullable(z13.lazy(() => CheckFreeTrial$inboundSchema)),
2661
+ items: z13.array(z13.lazy(() => CheckItem2$inboundSchema)),
2662
+ free_trial: nullable(z13.lazy(() => CheckFreeTrial2$inboundSchema)),
2587
2663
  base_variant_id: nullable(string4()),
2588
- scenario: optional2(ProductScenario$inboundSchema),
2589
- properties: optional2(z13.lazy(() => Properties$inboundSchema))
2664
+ scenario: optional2(ProductScenario2$inboundSchema),
2665
+ properties: optional2(z13.lazy(() => Properties2$inboundSchema))
2590
2666
  }),
2591
2667
  z13.transform((v) => {
2592
2668
  return remap(v, {
@@ -2598,14 +2674,14 @@ var Product$inboundSchema = z13.pipe(
2598
2674
  });
2599
2675
  })
2600
2676
  );
2601
- var Preview$inboundSchema = z13.pipe(
2677
+ var Preview2$inboundSchema = z13.pipe(
2602
2678
  z13.object({
2603
- scenario: Scenario$inboundSchema,
2679
+ scenario: Scenario2$inboundSchema,
2604
2680
  title: string4(),
2605
2681
  message: string4(),
2606
2682
  feature_id: string4(),
2607
2683
  feature_name: string4(),
2608
- products: z13.array(z13.lazy(() => Product$inboundSchema))
2684
+ products: z13.array(z13.lazy(() => Product2$inboundSchema))
2609
2685
  }),
2610
2686
  z13.transform((v) => {
2611
2687
  return remap(v, {
@@ -2614,15 +2690,15 @@ var Preview$inboundSchema = z13.pipe(
2614
2690
  });
2615
2691
  })
2616
2692
  );
2617
- var CheckResponse$inboundSchema = z13.pipe(
2693
+ var CheckResponseBody2$inboundSchema = z13.pipe(
2618
2694
  z13.object({
2619
2695
  allowed: boolean2(),
2620
2696
  customer_id: string4(),
2621
2697
  entity_id: z13.optional(z13.nullable(string4())),
2622
2698
  required_balance: optional2(number2()),
2623
2699
  balance: nullable(Balance$inboundSchema),
2624
- flag: nullable(z13.lazy(() => Flag$inboundSchema)),
2625
- preview: optional2(z13.lazy(() => Preview$inboundSchema))
2700
+ flag: nullable(z13.lazy(() => Flag2$inboundSchema)),
2701
+ preview: optional2(z13.lazy(() => Preview2$inboundSchema))
2626
2702
  }),
2627
2703
  z13.transform((v) => {
2628
2704
  return remap(v, {
@@ -2632,6 +2708,249 @@ var CheckResponse$inboundSchema = z13.pipe(
2632
2708
  });
2633
2709
  })
2634
2710
  );
2711
+ var FlagType1$inboundSchema = inboundSchema(FlagType1);
2712
+ var CheckCreditSchema1$inboundSchema = z13.pipe(
2713
+ z13.object({
2714
+ metered_feature_id: string4(),
2715
+ credit_cost: number2()
2716
+ }),
2717
+ z13.transform((v) => {
2718
+ return remap(v, {
2719
+ "metered_feature_id": "meteredFeatureId",
2720
+ "credit_cost": "creditCost"
2721
+ });
2722
+ })
2723
+ );
2724
+ var FlagDisplay1$inboundSchema = z13.object({
2725
+ singular: z13.optional(z13.nullable(string4())),
2726
+ plural: z13.optional(z13.nullable(string4()))
2727
+ });
2728
+ var CheckFeature1$inboundSchema = z13.pipe(
2729
+ z13.object({
2730
+ id: string4(),
2731
+ name: string4(),
2732
+ type: FlagType1$inboundSchema,
2733
+ consumable: boolean2(),
2734
+ event_names: optional2(z13.array(string4())),
2735
+ credit_schema: optional2(
2736
+ z13.array(z13.lazy(() => CheckCreditSchema1$inboundSchema))
2737
+ ),
2738
+ display: optional2(z13.lazy(() => FlagDisplay1$inboundSchema)),
2739
+ archived: boolean2()
2740
+ }),
2741
+ z13.transform((v) => {
2742
+ return remap(v, {
2743
+ "event_names": "eventNames",
2744
+ "credit_schema": "creditSchema"
2745
+ });
2746
+ })
2747
+ );
2748
+ var Flag1$inboundSchema = z13.pipe(
2749
+ z13.object({
2750
+ id: string4(),
2751
+ plan_id: nullable(string4()),
2752
+ expires_at: nullable(number2()),
2753
+ feature_id: string4(),
2754
+ feature: optional2(z13.lazy(() => CheckFeature1$inboundSchema))
2755
+ }),
2756
+ z13.transform((v) => {
2757
+ return remap(v, {
2758
+ "plan_id": "planId",
2759
+ "expires_at": "expiresAt",
2760
+ "feature_id": "featureId"
2761
+ });
2762
+ })
2763
+ );
2764
+ var Scenario1$inboundSchema = inboundSchema(Scenario1);
2765
+ var CheckEnv1$inboundSchema = inboundSchema(CheckEnv1);
2766
+ var ProductType1$inboundSchema = inboundSchema(ProductType1);
2767
+ var FeatureType1$inboundSchema = inboundSchema(FeatureType1);
2768
+ var IncludedUsage1$inboundSchema = smartUnion([number2(), string4()]);
2769
+ var CheckInterval1$inboundSchema = inboundSchema(CheckInterval1);
2770
+ var CheckTierBehavior1$inboundSchema = inboundSchema(CheckTierBehavior1);
2771
+ var UsageModel1$inboundSchema = inboundSchema(UsageModel1);
2772
+ var ProductDisplay1$inboundSchema = z13.pipe(
2773
+ z13.object({
2774
+ primary_text: string4(),
2775
+ secondary_text: z13.optional(z13.nullable(string4()))
2776
+ }),
2777
+ z13.transform((v) => {
2778
+ return remap(v, {
2779
+ "primary_text": "primaryText",
2780
+ "secondary_text": "secondaryText"
2781
+ });
2782
+ })
2783
+ );
2784
+ var ConfigDuration1$inboundSchema = inboundSchema(ConfigDuration1);
2785
+ var CheckRollover1$inboundSchema = z13.pipe(
2786
+ z13.object({
2787
+ max: z13.optional(z13.nullable(number2())),
2788
+ max_percentage: z13.optional(z13.nullable(number2())),
2789
+ duration: z13._default(ConfigDuration1$inboundSchema, "month"),
2790
+ length: number2()
2791
+ }),
2792
+ z13.transform((v) => {
2793
+ return remap(v, {
2794
+ "max_percentage": "maxPercentage"
2795
+ });
2796
+ })
2797
+ );
2798
+ var CheckOnIncrease1$inboundSchema = inboundSchema(CheckOnIncrease1);
2799
+ var CheckOnDecrease1$inboundSchema = inboundSchema(CheckOnDecrease1);
2800
+ var CheckConfig1$inboundSchema = z13.pipe(
2801
+ z13.object({
2802
+ rollover: z13.optional(
2803
+ z13.nullable(z13.lazy(() => CheckRollover1$inboundSchema))
2804
+ ),
2805
+ on_increase: z13.optional(z13.nullable(CheckOnIncrease1$inboundSchema)),
2806
+ on_decrease: z13.optional(z13.nullable(CheckOnDecrease1$inboundSchema))
2807
+ }),
2808
+ z13.transform((v) => {
2809
+ return remap(v, {
2810
+ "on_increase": "onIncrease",
2811
+ "on_decrease": "onDecrease"
2812
+ });
2813
+ })
2814
+ );
2815
+ var CheckItem1$inboundSchema = z13.pipe(
2816
+ z13.object({
2817
+ type: z13.optional(z13.nullable(ProductType1$inboundSchema)),
2818
+ feature_id: z13.optional(z13.nullable(string4())),
2819
+ feature_type: z13.optional(z13.nullable(FeatureType1$inboundSchema)),
2820
+ included_usage: z13.optional(
2821
+ z13.nullable(smartUnion([number2(), string4()]))
2822
+ ),
2823
+ interval: z13.optional(z13.nullable(CheckInterval1$inboundSchema)),
2824
+ interval_count: z13.optional(z13.nullable(number2())),
2825
+ price: z13.optional(z13.nullable(number2())),
2826
+ tiers: z13.optional(z13.nullable(z13.array(nullable(z13.any())))),
2827
+ tier_behavior: z13.optional(z13.nullable(CheckTierBehavior1$inboundSchema)),
2828
+ usage_model: z13.optional(z13.nullable(UsageModel1$inboundSchema)),
2829
+ billing_units: z13.optional(z13.nullable(number2())),
2830
+ reset_usage_when_enabled: z13.optional(z13.nullable(boolean2())),
2831
+ entity_feature_id: z13.optional(z13.nullable(string4())),
2832
+ display: z13.optional(
2833
+ z13.nullable(z13.lazy(() => ProductDisplay1$inboundSchema))
2834
+ ),
2835
+ quantity: z13.optional(z13.nullable(number2())),
2836
+ next_cycle_quantity: z13.optional(z13.nullable(number2())),
2837
+ config: z13.optional(z13.nullable(z13.lazy(() => CheckConfig1$inboundSchema)))
2838
+ }),
2839
+ z13.transform((v) => {
2840
+ return remap(v, {
2841
+ "feature_id": "featureId",
2842
+ "feature_type": "featureType",
2843
+ "included_usage": "includedUsage",
2844
+ "interval_count": "intervalCount",
2845
+ "tier_behavior": "tierBehavior",
2846
+ "usage_model": "usageModel",
2847
+ "billing_units": "billingUnits",
2848
+ "reset_usage_when_enabled": "resetUsageWhenEnabled",
2849
+ "entity_feature_id": "entityFeatureId",
2850
+ "next_cycle_quantity": "nextCycleQuantity"
2851
+ });
2852
+ })
2853
+ );
2854
+ var FreeTrialDuration1$inboundSchema = inboundSchema(FreeTrialDuration1);
2855
+ var CheckFreeTrial1$inboundSchema = z13.pipe(
2856
+ z13.object({
2857
+ duration: FreeTrialDuration1$inboundSchema,
2858
+ length: number2(),
2859
+ unique_fingerprint: boolean2(),
2860
+ card_required: boolean2(),
2861
+ trial_available: z13.nullable(z13._default(boolean2(), true))
2862
+ }),
2863
+ z13.transform((v) => {
2864
+ return remap(v, {
2865
+ "unique_fingerprint": "uniqueFingerprint",
2866
+ "card_required": "cardRequired",
2867
+ "trial_available": "trialAvailable"
2868
+ });
2869
+ })
2870
+ );
2871
+ var ProductScenario1$inboundSchema = inboundSchema(ProductScenario1);
2872
+ var Properties1$inboundSchema = z13.pipe(
2873
+ z13.object({
2874
+ is_free: boolean2(),
2875
+ is_one_off: boolean2(),
2876
+ interval_group: z13.optional(z13.nullable(string4())),
2877
+ has_trial: z13.optional(z13.nullable(boolean2())),
2878
+ updateable: z13.optional(z13.nullable(boolean2()))
2879
+ }),
2880
+ z13.transform((v) => {
2881
+ return remap(v, {
2882
+ "is_free": "isFree",
2883
+ "is_one_off": "isOneOff",
2884
+ "interval_group": "intervalGroup",
2885
+ "has_trial": "hasTrial"
2886
+ });
2887
+ })
2888
+ );
2889
+ var Product1$inboundSchema = z13.pipe(
2890
+ z13.object({
2891
+ id: string4(),
2892
+ name: string4(),
2893
+ group: nullable(string4()),
2894
+ env: CheckEnv1$inboundSchema,
2895
+ is_add_on: boolean2(),
2896
+ is_default: boolean2(),
2897
+ archived: boolean2(),
2898
+ version: number2(),
2899
+ created_at: number2(),
2900
+ items: z13.array(z13.lazy(() => CheckItem1$inboundSchema)),
2901
+ free_trial: nullable(z13.lazy(() => CheckFreeTrial1$inboundSchema)),
2902
+ base_variant_id: nullable(string4()),
2903
+ scenario: optional2(ProductScenario1$inboundSchema),
2904
+ properties: optional2(z13.lazy(() => Properties1$inboundSchema))
2905
+ }),
2906
+ z13.transform((v) => {
2907
+ return remap(v, {
2908
+ "is_add_on": "isAddOn",
2909
+ "is_default": "isDefault",
2910
+ "created_at": "createdAt",
2911
+ "free_trial": "freeTrial",
2912
+ "base_variant_id": "baseVariantId"
2913
+ });
2914
+ })
2915
+ );
2916
+ var Preview1$inboundSchema = z13.pipe(
2917
+ z13.object({
2918
+ scenario: Scenario1$inboundSchema,
2919
+ title: string4(),
2920
+ message: string4(),
2921
+ feature_id: string4(),
2922
+ feature_name: string4(),
2923
+ products: z13.array(z13.lazy(() => Product1$inboundSchema))
2924
+ }),
2925
+ z13.transform((v) => {
2926
+ return remap(v, {
2927
+ "feature_id": "featureId",
2928
+ "feature_name": "featureName"
2929
+ });
2930
+ })
2931
+ );
2932
+ var CheckResponseBody1$inboundSchema = z13.pipe(
2933
+ z13.object({
2934
+ allowed: boolean2(),
2935
+ customer_id: string4(),
2936
+ entity_id: z13.optional(z13.nullable(string4())),
2937
+ required_balance: optional2(number2()),
2938
+ balance: nullable(Balance$inboundSchema),
2939
+ flag: nullable(z13.lazy(() => Flag1$inboundSchema)),
2940
+ preview: optional2(z13.lazy(() => Preview1$inboundSchema))
2941
+ }),
2942
+ z13.transform((v) => {
2943
+ return remap(v, {
2944
+ "customer_id": "customerId",
2945
+ "entity_id": "entityId",
2946
+ "required_balance": "requiredBalance"
2947
+ });
2948
+ })
2949
+ );
2950
+ var CheckResponse$inboundSchema = smartUnion([
2951
+ z13.lazy(() => CheckResponseBody1$inboundSchema),
2952
+ z13.lazy(() => CheckResponseBody2$inboundSchema)
2953
+ ]);
2635
2954
 
2636
2955
  // ../sdk/src/models/create-balance-op.ts
2637
2956
  var z14 = __toESM(require("zod/v4-mini"), 1);
@@ -3079,6 +3398,16 @@ var FreeTrial$inboundSchema = z16.pipe(
3079
3398
  })
3080
3399
  );
3081
3400
  var PlanEnv$inboundSchema = inboundSchema(PlanEnv);
3401
+ var PlanConfig$inboundSchema = z16.pipe(
3402
+ z16.object({
3403
+ ignore_past_due: z16._default(boolean2(), false)
3404
+ }),
3405
+ z16.transform((v) => {
3406
+ return remap(v, {
3407
+ "ignore_past_due": "ignorePastDue"
3408
+ });
3409
+ })
3410
+ );
3082
3411
  var PlanStatus$inboundSchema = inboundSchema(PlanStatus);
3083
3412
  var AttachAction$inboundSchema = inboundSchema(AttachAction);
3084
3413
  var CustomerEligibility$inboundSchema = z16.pipe(
@@ -3112,6 +3441,7 @@ var Plan$inboundSchema = z16.pipe(
3112
3441
  env: PlanEnv$inboundSchema,
3113
3442
  archived: boolean2(),
3114
3443
  base_variant_id: nullable(string4()),
3444
+ config: z16.lazy(() => PlanConfig$inboundSchema),
3115
3445
  customer_eligibility: optional2(z16.lazy(
3116
3446
  () => CustomerEligibility$inboundSchema
3117
3447
  ))
@@ -3792,6 +4122,16 @@ var FreeTrialRequest$outboundSchema = z19.pipe(
3792
4122
  });
3793
4123
  })
3794
4124
  );
4125
+ var CreatePlanConfigRequest$outboundSchema = z19.pipe(
4126
+ z19.object({
4127
+ ignorePastDue: z19._default(z19.boolean(), false)
4128
+ }),
4129
+ z19.transform((v) => {
4130
+ return remap(v, {
4131
+ ignorePastDue: "ignore_past_due"
4132
+ });
4133
+ })
4134
+ );
3795
4135
  var CreatePlanParams$outboundSchema = z19.pipe(
3796
4136
  z19.object({
3797
4137
  planId: z19.string(),
@@ -3802,7 +4142,8 @@ var CreatePlanParams$outboundSchema = z19.pipe(
3802
4142
  autoEnable: z19._default(z19.boolean(), false),
3803
4143
  price: z19.optional(z19.lazy(() => CreatePlanPriceRequest$outboundSchema)),
3804
4144
  items: z19.optional(z19.array(z19.lazy(() => CreatePlanPlanItem$outboundSchema))),
3805
- freeTrial: z19.optional(z19.lazy(() => FreeTrialRequest$outboundSchema))
4145
+ freeTrial: z19.optional(z19.lazy(() => FreeTrialRequest$outboundSchema)),
4146
+ config: z19.optional(z19.lazy(() => CreatePlanConfigRequest$outboundSchema))
3806
4147
  }),
3807
4148
  z19.transform((v) => {
3808
4149
  return remap(v, {
@@ -3976,6 +4317,16 @@ var CreatePlanFreeTrialResponse$inboundSchema = z19.pipe(
3976
4317
  })
3977
4318
  );
3978
4319
  var CreatePlanEnv$inboundSchema = inboundSchema(CreatePlanEnv);
4320
+ var CreatePlanConfigResponse$inboundSchema = z19.pipe(
4321
+ z19.object({
4322
+ ignore_past_due: z19._default(boolean2(), false)
4323
+ }),
4324
+ z19.transform((v) => {
4325
+ return remap(v, {
4326
+ "ignore_past_due": "ignorePastDue"
4327
+ });
4328
+ })
4329
+ );
3979
4330
  var CreatePlanStatus$inboundSchema = inboundSchema(CreatePlanStatus);
3980
4331
  var CreatePlanAttachAction$inboundSchema = inboundSchema(CreatePlanAttachAction);
3981
4332
  var CreatePlanCustomerEligibility$inboundSchema = z19.pipe(
@@ -4011,6 +4362,7 @@ var CreatePlanResponse$inboundSchema = z19.pipe(
4011
4362
  env: CreatePlanEnv$inboundSchema,
4012
4363
  archived: boolean2(),
4013
4364
  base_variant_id: nullable(string4()),
4365
+ config: z19.lazy(() => CreatePlanConfigResponse$inboundSchema),
4014
4366
  customer_eligibility: optional2(
4015
4367
  z19.lazy(() => CreatePlanCustomerEligibility$inboundSchema)
4016
4368
  )
@@ -4573,9 +4925,16 @@ var FinalizeBalanceParams$outboundSchema = z27.pipe(
4573
4925
  });
4574
4926
  })
4575
4927
  );
4576
- var FinalizeLockResponse$inboundSchema = z27.object({
4928
+ var FinalizeLockResponseBody2$inboundSchema = z27.object({
4929
+ success: boolean2()
4930
+ });
4931
+ var FinalizeLockResponseBody1$inboundSchema = z27.object({
4577
4932
  success: boolean2()
4578
4933
  });
4934
+ var FinalizeLockResponse$inboundSchema = smartUnion([
4935
+ z27.lazy(() => FinalizeLockResponseBody1$inboundSchema),
4936
+ z27.lazy(() => FinalizeLockResponseBody2$inboundSchema)
4937
+ ]);
4579
4938
 
4580
4939
  // ../sdk/src/models/get-entity-op.ts
4581
4940
  var z28 = __toESM(require("zod/v4-mini"), 1);
@@ -5263,6 +5622,16 @@ var GetPlanFreeTrial$inboundSchema = z31.pipe(
5263
5622
  })
5264
5623
  );
5265
5624
  var GetPlanEnv$inboundSchema = inboundSchema(GetPlanEnv);
5625
+ var GetPlanConfig$inboundSchema = z31.pipe(
5626
+ z31.object({
5627
+ ignore_past_due: z31._default(boolean2(), false)
5628
+ }),
5629
+ z31.transform((v) => {
5630
+ return remap(v, {
5631
+ "ignore_past_due": "ignorePastDue"
5632
+ });
5633
+ })
5634
+ );
5266
5635
  var GetPlanStatus$inboundSchema = inboundSchema(GetPlanStatus);
5267
5636
  var GetPlanAttachAction$inboundSchema = inboundSchema(GetPlanAttachAction);
5268
5637
  var GetPlanCustomerEligibility$inboundSchema = z31.pipe(
@@ -5296,6 +5665,7 @@ var GetPlanResponse$inboundSchema = z31.pipe(
5296
5665
  env: GetPlanEnv$inboundSchema,
5297
5666
  archived: boolean2(),
5298
5667
  base_variant_id: nullable(string4()),
5668
+ config: z31.lazy(() => GetPlanConfig$inboundSchema),
5299
5669
  customer_eligibility: optional2(
5300
5670
  z31.lazy(() => GetPlanCustomerEligibility$inboundSchema)
5301
5671
  )
@@ -6006,6 +6376,16 @@ var ListPlansFreeTrial$inboundSchema = z35.pipe(
6006
6376
  })
6007
6377
  );
6008
6378
  var ListPlansEnv$inboundSchema = inboundSchema(ListPlansEnv);
6379
+ var ListPlansConfig$inboundSchema = z35.pipe(
6380
+ z35.object({
6381
+ ignore_past_due: z35._default(boolean2(), false)
6382
+ }),
6383
+ z35.transform((v) => {
6384
+ return remap(v, {
6385
+ "ignore_past_due": "ignorePastDue"
6386
+ });
6387
+ })
6388
+ );
6009
6389
  var ListPlansStatus$inboundSchema = inboundSchema(ListPlansStatus);
6010
6390
  var ListPlansAttachAction$inboundSchema = inboundSchema(ListPlansAttachAction);
6011
6391
  var ListPlansCustomerEligibility$inboundSchema = z35.pipe(
@@ -6039,6 +6419,7 @@ var ListPlansList$inboundSchema = z35.pipe(
6039
6419
  env: ListPlansEnv$inboundSchema,
6040
6420
  archived: boolean2(),
6041
6421
  base_variant_id: nullable(string4()),
6422
+ config: z35.lazy(() => ListPlansConfig$inboundSchema),
6042
6423
  customer_eligibility: optional2(
6043
6424
  z35.lazy(() => ListPlansCustomerEligibility$inboundSchema)
6044
6425
  )
@@ -8589,7 +8970,24 @@ var TrackParams$outboundSchema = z43.pipe(
8589
8970
  });
8590
8971
  })
8591
8972
  );
8592
- var TrackResponse$inboundSchema = z43.pipe(
8973
+ var TrackResponseBody2$inboundSchema = z43.pipe(
8974
+ z43.object({
8975
+ customer_id: string4(),
8976
+ entity_id: optional2(string4()),
8977
+ event_name: optional2(string4()),
8978
+ value: number2(),
8979
+ balance: nullable(Balance$inboundSchema),
8980
+ balances: optional2(z43.record(z43.string(), Balance$inboundSchema))
8981
+ }),
8982
+ z43.transform((v) => {
8983
+ return remap(v, {
8984
+ "customer_id": "customerId",
8985
+ "entity_id": "entityId",
8986
+ "event_name": "eventName"
8987
+ });
8988
+ })
8989
+ );
8990
+ var TrackResponseBody1$inboundSchema = z43.pipe(
8593
8991
  z43.object({
8594
8992
  customer_id: string4(),
8595
8993
  entity_id: optional2(string4()),
@@ -8606,6 +9004,10 @@ var TrackResponse$inboundSchema = z43.pipe(
8606
9004
  });
8607
9005
  })
8608
9006
  );
9007
+ var TrackResponse$inboundSchema = smartUnion([
9008
+ z43.lazy(() => TrackResponseBody1$inboundSchema),
9009
+ z43.lazy(() => TrackResponseBody2$inboundSchema)
9010
+ ]);
8609
9011
 
8610
9012
  // ../sdk/src/models/update-balance-op.ts
8611
9013
  var z44 = __toESM(require("zod/v4-mini"), 1);
@@ -9733,6 +10135,16 @@ var UpdatePlanFreeTrialParams$outboundSchema = z48.pipe(
9733
10135
  });
9734
10136
  })
9735
10137
  );
10138
+ var UpdatePlanConfigRequest$outboundSchema = z48.pipe(
10139
+ z48.object({
10140
+ ignorePastDue: z48._default(z48.boolean(), false)
10141
+ }),
10142
+ z48.transform((v) => {
10143
+ return remap(v, {
10144
+ ignorePastDue: "ignore_past_due"
10145
+ });
10146
+ })
10147
+ );
9736
10148
  var UpdatePlanParams$outboundSchema = z48.pipe(
9737
10149
  z48.object({
9738
10150
  planId: z48.string(),
@@ -9748,6 +10160,7 @@ var UpdatePlanParams$outboundSchema = z48.pipe(
9748
10160
  freeTrial: z48.optional(
9749
10161
  z48.nullable(z48.lazy(() => UpdatePlanFreeTrialParams$outboundSchema))
9750
10162
  ),
10163
+ config: z48.optional(z48.lazy(() => UpdatePlanConfigRequest$outboundSchema)),
9751
10164
  version: z48.optional(z48.number()),
9752
10165
  archived: z48._default(z48.boolean(), false),
9753
10166
  newPlanId: z48.optional(z48.string())
@@ -9925,6 +10338,16 @@ var UpdatePlanFreeTrial$inboundSchema = z48.pipe(
9925
10338
  })
9926
10339
  );
9927
10340
  var UpdatePlanEnv$inboundSchema = inboundSchema(UpdatePlanEnv);
10341
+ var UpdatePlanConfigResponse$inboundSchema = z48.pipe(
10342
+ z48.object({
10343
+ ignore_past_due: z48._default(boolean2(), false)
10344
+ }),
10345
+ z48.transform((v) => {
10346
+ return remap(v, {
10347
+ "ignore_past_due": "ignorePastDue"
10348
+ });
10349
+ })
10350
+ );
9928
10351
  var UpdatePlanStatus$inboundSchema = inboundSchema(UpdatePlanStatus);
9929
10352
  var UpdatePlanAttachAction$inboundSchema = inboundSchema(UpdatePlanAttachAction);
9930
10353
  var UpdatePlanCustomerEligibility$inboundSchema = z48.pipe(
@@ -9958,6 +10381,7 @@ var UpdatePlanResponse$inboundSchema = z48.pipe(
9958
10381
  env: UpdatePlanEnv$inboundSchema,
9959
10382
  archived: boolean2(),
9960
10383
  base_variant_id: nullable(string4()),
10384
+ config: z48.lazy(() => UpdatePlanConfigResponse$inboundSchema),
9961
10385
  customer_eligibility: optional2(
9962
10386
  z48.lazy(() => UpdatePlanCustomerEligibility$inboundSchema)
9963
10387
  )
@@ -10068,6 +10492,7 @@ async function $do(client, request, options) {
10068
10492
  const response = doResult.value;
10069
10493
  const [result] = await match(
10070
10494
  json(200, CheckResponse$inboundSchema),
10495
+ json(202, CheckResponse$inboundSchema),
10071
10496
  fail("4XX"),
10072
10497
  fail("5XX")
10073
10498
  )(response, req);
@@ -10146,6 +10571,7 @@ async function $do2(client, request, options) {
10146
10571
  const response = doResult.value;
10147
10572
  const [result] = await match(
10148
10573
  json(200, TrackResponse$inboundSchema),
10574
+ json(202, TrackResponse$inboundSchema),
10149
10575
  fail("4XX"),
10150
10576
  fail("5XX")
10151
10577
  )(response, req);
@@ -10216,10 +10642,14 @@ var FailOpenHook = class {
10216
10642
  fetcher: async (input, init) => {
10217
10643
  try {
10218
10644
  return init == null ? await fetch(input) : await fetch(input, init);
10219
- } catch {
10645
+ } catch (error) {
10646
+ console.log(error);
10647
+ console.log(
10648
+ `Network failed to reach Autumn: ${error}. Returning 555 Network Error.`
10649
+ );
10220
10650
  return new Response(null, {
10221
- status: 503,
10222
- statusText: "Autumn Unreachable"
10651
+ status: 555,
10652
+ statusText: "Network Error"
10223
10653
  });
10224
10654
  }
10225
10655
  }
@@ -10981,6 +11411,7 @@ async function $do5(client, request, options) {
10981
11411
  const response = doResult.value;
10982
11412
  const [result] = await match(
10983
11413
  json(200, FinalizeLockResponse$inboundSchema),
11414
+ json(202, FinalizeLockResponse$inboundSchema),
10984
11415
  fail("4XX"),
10985
11416
  fail("5XX")
10986
11417
  )(response, req);
@@ -13981,6 +14412,7 @@ var Plans = class extends ClientSDK {
13981
14412
  * @param price - Base recurring price for the plan. Omit for free or usage-only plans. (optional)
13982
14413
  * @param items - Feature configurations for this plan. Each item defines included units, pricing, and reset behavior. (optional)
13983
14414
  * @param freeTrial - Free trial configuration. Customers can try this plan before being charged. (optional)
14415
+ * @param config - Miscellaneous plan-level configuration flags. (optional)
13984
14416
  *
13985
14417
  * @returns The created plan object.
13986
14418
  */
@@ -14086,6 +14518,7 @@ var Plans = class extends ClientSDK {
14086
14518
  * @param price - The price of the plan. Set to null to remove the base price. (optional)
14087
14519
  * @param items - Feature configurations for this plan. Each item defines included units, pricing, and reset behavior. (optional)
14088
14520
  * @param freeTrial - The free trial of the plan. Set to null to remove the free trial. (optional)
14521
+ * @param config - Miscellaneous plan-level configuration flags. (optional)
14089
14522
  * @param newPlanId - The new ID to use for the plan. Can only be updated if the plan has not been used by any customers. (optional)
14090
14523
  *
14091
14524
  * @returns The updated plan object.
@@ -14377,7 +14810,7 @@ var Autumn = class extends ClientSDK {
14377
14810
  * @param lock - Reserve units of a feature upfront by passing a lock_id, then call balances.finalize to confirm or release the hold. (optional)
14378
14811
  * @param withPreview - If true, includes upgrade/upsell information in the response when access is denied. Useful for displaying paywalls. (optional)
14379
14812
  *
14380
- * @returns Whether access is allowed, plus the current balance for that feature.
14813
+ * @returns Whether access is allowed, plus the current balance for that feature. If Autumn is experiencing degraded service from a downstream provider, the API may return 202 and allow access fail-open.
14381
14814
  */
14382
14815
  async check(request, options) {
14383
14816
  return unwrapAsync(check(
@@ -14410,7 +14843,7 @@ var Autumn = class extends ClientSDK {
14410
14843
  * @param value - The amount of usage to record. Defaults to 1. Use negative values to credit balance (e.g., when removing a seat). (optional)
14411
14844
  * @param properties - Additional properties to attach to this usage event. (optional)
14412
14845
  *
14413
- * @returns The usage value recorded, with either a single updated balance or a map of updated balances.
14846
+ * @returns The usage value recorded, with either a single updated balance or a map of updated balances. If Autumn is experiencing degraded service from a downstream provider, the API may return 202 after accepting the event for replay so it can be tracked as soon as the service is restored.
14414
14847
  */
14415
14848
  async track(request, options) {
14416
14849
  return unwrapAsync(track(
@@ -14971,6 +15404,9 @@ var listPlansItemDisplaySchema = import_v46.z.object({
14971
15404
  primaryText: import_v46.z.string(),
14972
15405
  secondaryText: import_v46.z.union([import_v46.z.string(), import_v46.z.undefined()]).optional()
14973
15406
  });
15407
+ var listPlansConfigSchema = import_v46.z.object({
15408
+ ignorePastDue: import_v46.z.boolean()
15409
+ });
14974
15410
  var listPlansParamsOutboundSchema = import_v46.z.object({
14975
15411
  customer_id: import_v46.z.union([import_v46.z.string(), import_v46.z.undefined()]).optional(),
14976
15412
  entity_id: import_v46.z.union([import_v46.z.string(), import_v46.z.undefined()]).optional(),
@@ -15059,6 +15495,7 @@ var listPlansListSchema = import_v46.z.object({
15059
15495
  env: listPlansEnvSchema,
15060
15496
  archived: import_v46.z.boolean(),
15061
15497
  baseVariantId: import_v46.z.string().nullable(),
15498
+ config: listPlansConfigSchema,
15062
15499
  customerEligibility: import_v46.z.union([listPlansCustomerEligibilitySchema, import_v46.z.undefined()]).optional()
15063
15500
  });
15064
15501
  var listPlansResponseSchema = import_v46.z.object({