autumn-js 1.3.2 → 1.3.3

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 (121) hide show
  1. package/dist/backend/adapters/express.js +6018 -6627
  2. package/dist/backend/adapters/express.mjs +9 -9
  3. package/dist/backend/adapters/fetch.js +6018 -6627
  4. package/dist/backend/adapters/fetch.mjs +9 -9
  5. package/dist/backend/adapters/hono.js +6018 -6627
  6. package/dist/backend/adapters/hono.mjs +9 -9
  7. package/dist/backend/adapters/index.js +6019 -6628
  8. package/dist/backend/adapters/index.mjs +12 -12
  9. package/dist/backend/adapters/next.js +6018 -6627
  10. package/dist/backend/adapters/next.mjs +9 -9
  11. package/dist/backend/{chunk-P3NB2TPD.mjs → chunk-65W4TZTS.mjs} +1 -1
  12. package/dist/backend/{chunk-U3XVAFP3.mjs → chunk-7KCCF4EQ.mjs} +1 -1
  13. package/dist/backend/{chunk-BN2RKNWA.mjs → chunk-7M2QJK3F.mjs} +1 -1
  14. package/dist/backend/{chunk-WBVNGT6C.mjs → chunk-ALCYAWIU.mjs} +5615 -5173
  15. package/dist/backend/{chunk-UFFJTOUP.mjs → chunk-DMYETTMK.mjs} +1 -1
  16. package/dist/backend/{chunk-O2FNE4BV.mjs → chunk-ECPEYFTT.mjs} +7 -7
  17. package/dist/backend/{chunk-MMTTJRJ7.mjs → chunk-QTW6YBAQ.mjs} +790 -1841
  18. package/dist/backend/{chunk-2WFPFKXF.mjs → chunk-UCE7X36J.mjs} +5 -5
  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 +6018 -6627
  22. package/dist/backend/core/handlers/coreHandler.mjs +7 -7
  23. package/dist/backend/core/handlers/executeRoute.d.mts +1 -1
  24. package/dist/backend/core/handlers/executeRoute.d.ts +1 -1
  25. package/dist/backend/core/handlers/executeRoute.mjs +4 -4
  26. package/dist/backend/core/handlers/handleRouteByName.js +6018 -6627
  27. package/dist/backend/core/handlers/handleRouteByName.mjs +7 -7
  28. package/dist/backend/core/handlers/index.d.mts +1 -1
  29. package/dist/backend/core/handlers/index.d.ts +1 -1
  30. package/dist/backend/core/handlers/index.js +6018 -6627
  31. package/dist/backend/core/handlers/index.mjs +10 -10
  32. package/dist/backend/core/index.d.mts +1 -1
  33. package/dist/backend/core/index.d.ts +1 -1
  34. package/dist/backend/core/index.js +6018 -6627
  35. package/dist/backend/core/index.mjs +10 -10
  36. package/dist/backend/core/routes/index.d.mts +1 -1
  37. package/dist/backend/core/routes/index.d.ts +1 -1
  38. package/dist/backend/core/routes/index.js +790 -1841
  39. package/dist/backend/core/routes/index.mjs +2 -2
  40. package/dist/backend/core/routes/routeBuilder.d.mts +1 -1
  41. package/dist/backend/core/routes/routeBuilder.d.ts +1 -1
  42. package/dist/backend/core/routes/routeConfigs.d.mts +1 -1
  43. package/dist/backend/core/routes/routeConfigs.d.ts +1 -1
  44. package/dist/backend/core/routes/routeConfigs.js +790 -1841
  45. package/dist/backend/core/routes/routeConfigs.mjs +2 -2
  46. package/dist/backend/core/types/handlerTypes.d.mts +1 -1
  47. package/dist/backend/core/types/handlerTypes.d.ts +1 -1
  48. package/dist/backend/core/types/index.d.mts +1 -1
  49. package/dist/backend/core/types/index.d.ts +1 -1
  50. package/dist/backend/core/types/routeTypes.d.mts +1 -1
  51. package/dist/backend/core/types/routeTypes.d.ts +1 -1
  52. package/dist/backend/core/utils/index.mjs +3 -3
  53. package/dist/backend/index.d.mts +2 -2
  54. package/dist/backend/index.d.ts +2 -2
  55. package/dist/backend/index.js +6018 -6627
  56. package/dist/backend/index.mjs +10 -10
  57. package/dist/backend/{routeTypes-B4IhP62O.d.mts → routeTypes-CIyvTbT-.d.mts} +933 -268
  58. package/dist/backend/{routeTypes-Clg-tGZs.d.ts → routeTypes-Dovw-kXS.d.ts} +933 -268
  59. package/dist/better-auth/{chunk-QRHWL7PJ.mjs → chunk-AYUZ7BAL.mjs} +1 -1
  60. package/dist/better-auth/{chunk-ZSPHK3QP.mjs → chunk-MAM2SPNT.mjs} +790 -1841
  61. package/dist/better-auth/{chunk-GHX3KM47.mjs → chunk-RXQY5TZP.mjs} +5616 -5174
  62. package/dist/better-auth/index.js +6247 -6856
  63. package/dist/better-auth/index.mjs +3 -3
  64. package/dist/better-auth/utils/createAutumnEndpoint.js +790 -1841
  65. package/dist/better-auth/utils/createAutumnEndpoint.mjs +2 -2
  66. package/dist/better-auth/utils/handleBetterAuthRoute.js +6018 -6627
  67. package/dist/better-auth/utils/handleBetterAuthRoute.mjs +2 -2
  68. package/dist/better-auth/utils/index.js +6247 -6856
  69. package/dist/better-auth/utils/index.mjs +3 -3
  70. package/dist/react/AutumnContext.d.mts +4 -4
  71. package/dist/react/AutumnContext.d.ts +4 -4
  72. package/dist/react/client/AutumnClient.d.mts +4 -4
  73. package/dist/react/client/AutumnClient.d.ts +4 -4
  74. package/dist/react/client/IAutumnClient.d.mts +4 -4
  75. package/dist/react/client/IAutumnClient.d.ts +4 -4
  76. package/dist/react/client/index.d.mts +4 -4
  77. package/dist/react/client/index.d.ts +4 -4
  78. package/dist/react/{customer-7v3j-HM8.d.ts → customer-Bp7Npmb4.d.ts} +1 -5
  79. package/dist/react/{customer-B1dHh-Kx.d.mts → customer-Ho7hCUyc.d.mts} +1 -5
  80. package/dist/react/hooks/index.d.mts +4 -4
  81. package/dist/react/hooks/index.d.ts +4 -4
  82. package/dist/react/hooks/index.mjs +5 -5
  83. package/dist/react/hooks/internal/check/balanceToAllowed.d.mts +2 -2
  84. package/dist/react/hooks/internal/check/balanceToAllowed.d.ts +2 -2
  85. package/dist/react/hooks/internal/check/customerToFeatures.d.mts +2 -2
  86. package/dist/react/hooks/internal/check/customerToFeatures.d.ts +2 -2
  87. package/dist/react/hooks/internal/check/findCreditSystemsByFeature.d.mts +2 -2
  88. package/dist/react/hooks/internal/check/findCreditSystemsByFeature.d.ts +2 -2
  89. package/dist/react/hooks/internal/check/getCreditCost.d.mts +2 -2
  90. package/dist/react/hooks/internal/check/getCreditCost.d.ts +2 -2
  91. package/dist/react/hooks/internal/getLocalCheckResponse.d.mts +3 -3
  92. package/dist/react/hooks/internal/getLocalCheckResponse.d.ts +3 -3
  93. package/dist/react/hooks/internal/useCustomerActions.d.mts +4 -4
  94. package/dist/react/hooks/internal/useCustomerActions.d.ts +4 -4
  95. package/dist/react/hooks/useAggregateEvents.d.mts +2 -2
  96. package/dist/react/hooks/useAggregateEvents.d.ts +2 -2
  97. package/dist/react/hooks/useCustomer.d.mts +3 -3
  98. package/dist/react/hooks/useCustomer.d.ts +3 -3
  99. package/dist/react/hooks/useEntity.d.mts +2 -2
  100. package/dist/react/hooks/useEntity.d.ts +2 -2
  101. package/dist/react/hooks/useListEvents.d.mts +2 -2
  102. package/dist/react/hooks/useListEvents.d.ts +2 -2
  103. package/dist/react/hooks/useListPlans.d.mts +3 -3
  104. package/dist/react/hooks/useListPlans.d.ts +3 -3
  105. package/dist/react/hooks/useReferrals.d.mts +2 -2
  106. package/dist/react/hooks/useReferrals.d.ts +2 -2
  107. package/dist/react/index.d.mts +4 -4
  108. package/dist/react/index.d.ts +4 -4
  109. package/dist/react/index.mjs +5 -5
  110. package/dist/react/{list-plans-response-BdNdM3Qx.d.ts → list-plans-response-CN5npYlB.d.mts} +126 -5
  111. package/dist/react/{list-plans-response-CH1VbFIg.d.mts → list-plans-response-ZA4i4qbk.d.ts} +126 -5
  112. package/dist/react/{params-ClWEGYj-.d.mts → params-ChTAunjw.d.ts} +344 -25
  113. package/dist/react/{params-cj_zZr99.d.ts → params-xlsDk_Hb.d.mts} +344 -25
  114. package/dist/react/{plan-Dq6s6t9I.d.mts → plan-CrpW2EZo.d.mts} +52 -5
  115. package/dist/react/{plan-Dq6s6t9I.d.ts → plan-CrpW2EZo.d.ts} +52 -5
  116. package/dist/sdk/index.d.mts +4387 -3312
  117. package/dist/sdk/index.d.ts +4387 -3312
  118. package/dist/sdk/index.js +19203 -18287
  119. package/dist/sdk/index.mjs +19003 -18271
  120. package/package.json +3 -2
  121. package/dist/backend/{chunk-IXUCY7AU.mjs → chunk-MOHYGUMA.mjs} +3 -3
@@ -1,4 +1,4 @@
1
- import { O as OpenEnum, C as ClosedEnum, P as Plan } from './plan-Dq6s6t9I.js';
1
+ import { O as OpenEnum, C as ClosedEnum, P as Plan } from './plan-CrpW2EZo.mjs';
2
2
 
3
3
  type ListPlansAdditionalCurrency = {
4
4
  /**
@@ -328,6 +328,17 @@ type ListPlansItemRollover = {
328
328
  */
329
329
  expiryDurationLength?: number | undefined;
330
330
  };
331
+ declare const ListPlansItemDuration: {
332
+ readonly Day: "day";
333
+ readonly Week: "week";
334
+ readonly Month: "month";
335
+ readonly Year: "year";
336
+ };
337
+ type ListPlansItemDuration = OpenEnum<typeof ListPlansItemDuration>;
338
+ type ListPlansItemExpiry = {
339
+ duration: ListPlansItemDuration;
340
+ length: number;
341
+ };
331
342
  type ListPlansDimensionsItem4 = {
332
343
  /**
333
344
  * Event properties this entry applies to. Every key must equal the tracked property, compared as strings.
@@ -595,6 +606,10 @@ type ListPlansItem = {
595
606
  * Rollover configuration for unused units. If set, unused included units roll over to the next period.
596
607
  */
597
608
  rollover?: ListPlansItemRollover | undefined;
609
+ /**
610
+ * Purchased units expire this long after each purchase. One-off prepaid consumable items only.
611
+ */
612
+ expiry?: ListPlansItemExpiry | null | undefined;
598
613
  /**
599
614
  * Overrides fields of this item's feature for customers on this plan (e.g. a credit system's credit_schema).
600
615
  */
@@ -1239,6 +1254,20 @@ type ListPlansVariantDetailsRollover = {
1239
1254
  */
1240
1255
  expiryDurationLength?: number | undefined;
1241
1256
  };
1257
+ declare const ListPlansVariantDetailsDuration: {
1258
+ readonly Day: "day";
1259
+ readonly Week: "week";
1260
+ readonly Month: "month";
1261
+ readonly Year: "year";
1262
+ };
1263
+ type ListPlansVariantDetailsDuration = OpenEnum<typeof ListPlansVariantDetailsDuration>;
1264
+ /**
1265
+ * Purchased units expire this long after each purchase. One-off prepaid consumable items only.
1266
+ */
1267
+ type ListPlansVariantDetailsExpiry = {
1268
+ duration: ListPlansVariantDetailsDuration;
1269
+ length: number;
1270
+ };
1242
1271
  type ListPlansDimensionsVariantDetails4 = {
1243
1272
  /**
1244
1273
  * Event properties this entry applies to. Every key must equal the tracked property, compared as strings.
@@ -1505,6 +1534,10 @@ type ListPlansVariantDetailsPlanItem = {
1505
1534
  * Rollover config for unused units. If set, unused included units carry over.
1506
1535
  */
1507
1536
  rollover?: ListPlansVariantDetailsRollover | undefined;
1537
+ /**
1538
+ * Purchased units expire this long after each purchase. One-off prepaid consumable items only.
1539
+ */
1540
+ expiry?: ListPlansVariantDetailsExpiry | undefined;
1508
1541
  /**
1509
1542
  * Overrides fields of this item's feature for customers on this plan (e.g. a credit system's credit_schema).
1510
1543
  */
@@ -1826,6 +1859,7 @@ type ListPlansVariantDetailsUsageAlert = {
1826
1859
  */
1827
1860
  name?: string | undefined;
1828
1861
  };
1862
+
1829
1863
  type ListPlansVariantDetailsOverageAllowed = {
1830
1864
  /**
1831
1865
  * The feature ID this overage allowed control applies to.
@@ -1886,7 +1920,6 @@ type ListPlansVariantDetailsUpsertLicenseAdditionalCurrency = {
1886
1920
  */
1887
1921
  amount: number;
1888
1922
  };
1889
-
1890
1923
  /**
1891
1924
  * Base price configuration for a plan.
1892
1925
  */
@@ -2113,6 +2146,20 @@ type ListPlansVariantDetailsUpsertLicenseRollover = {
2113
2146
  */
2114
2147
  expiryDurationLength?: number | undefined;
2115
2148
  };
2149
+ declare const ListPlansVariantDetailsUpsertLicenseDuration: {
2150
+ readonly Day: "day";
2151
+ readonly Week: "week";
2152
+ readonly Month: "month";
2153
+ readonly Year: "year";
2154
+ };
2155
+ type ListPlansVariantDetailsUpsertLicenseDuration = OpenEnum<typeof ListPlansVariantDetailsUpsertLicenseDuration>;
2156
+ /**
2157
+ * Purchased units expire this long after each purchase. One-off prepaid consumable items only.
2158
+ */
2159
+ type ListPlansVariantDetailsUpsertLicenseExpiry = {
2160
+ duration: ListPlansVariantDetailsUpsertLicenseDuration;
2161
+ length: number;
2162
+ };
2116
2163
  type ListPlansDimensionsVariantDetailsUpsertLicense4 = {
2117
2164
  /**
2118
2165
  * Event properties this entry applies to. Every key must equal the tracked property, compared as strings.
@@ -2379,6 +2426,10 @@ type ListPlansVariantDetailsUpsertLicensePlanItem = {
2379
2426
  * Rollover config for unused units. If set, unused included units carry over.
2380
2427
  */
2381
2428
  rollover?: ListPlansVariantDetailsUpsertLicenseRollover | undefined;
2429
+ /**
2430
+ * Purchased units expire this long after each purchase. One-off prepaid consumable items only.
2431
+ */
2432
+ expiry?: ListPlansVariantDetailsUpsertLicenseExpiry | undefined;
2382
2433
  /**
2383
2434
  * Overrides fields of this item's feature for customers on this plan (e.g. a credit system's credit_schema).
2384
2435
  */
@@ -2756,6 +2807,20 @@ type ListPlansLicenseRollover = {
2756
2807
  */
2757
2808
  expiryDurationLength?: number | undefined;
2758
2809
  };
2810
+ declare const ListPlansLicenseDuration: {
2811
+ readonly Day: "day";
2812
+ readonly Week: "week";
2813
+ readonly Month: "month";
2814
+ readonly Year: "year";
2815
+ };
2816
+ type ListPlansLicenseDuration = OpenEnum<typeof ListPlansLicenseDuration>;
2817
+ /**
2818
+ * Purchased units expire this long after each purchase. One-off prepaid consumable items only.
2819
+ */
2820
+ type ListPlansLicenseExpiry = {
2821
+ duration: ListPlansLicenseDuration;
2822
+ length: number;
2823
+ };
2759
2824
  type ListPlansDimensionsLicense4 = {
2760
2825
  /**
2761
2826
  * Event properties this entry applies to. Every key must equal the tracked property, compared as strings.
@@ -3022,6 +3087,10 @@ type ListPlansLicensePlanItem = {
3022
3087
  * Rollover config for unused units. If set, unused included units carry over.
3023
3088
  */
3024
3089
  rollover?: ListPlansLicenseRollover | undefined;
3090
+ /**
3091
+ * Purchased units expire this long after each purchase. One-off prepaid consumable items only.
3092
+ */
3093
+ expiry?: ListPlansLicenseExpiry | undefined;
3025
3094
  /**
3026
3095
  * Overrides fields of this item's feature for customers on this plan (e.g. a credit system's credit_schema).
3027
3096
  */
@@ -3376,6 +3445,20 @@ type ListPlansVariantAddItemRollover = {
3376
3445
  */
3377
3446
  expiryDurationLength?: number | undefined;
3378
3447
  };
3448
+ declare const ListPlansVariantAddItemDuration: {
3449
+ readonly Day: "day";
3450
+ readonly Week: "week";
3451
+ readonly Month: "month";
3452
+ readonly Year: "year";
3453
+ };
3454
+ type ListPlansVariantAddItemDuration = OpenEnum<typeof ListPlansVariantAddItemDuration>;
3455
+ /**
3456
+ * Purchased units expire this long after each purchase. One-off prepaid consumable items only.
3457
+ */
3458
+ type ListPlansVariantAddItemExpiry = {
3459
+ duration: ListPlansVariantAddItemDuration;
3460
+ length: number;
3461
+ };
3379
3462
  type ListPlansDimensionsVariantAddItem4 = {
3380
3463
  /**
3381
3464
  * Event properties this entry applies to. Every key must equal the tracked property, compared as strings.
@@ -3506,6 +3589,7 @@ type ListPlansDimensionsVariantAddItem1 = {
3506
3589
  tierBehavior: "graduated";
3507
3590
  tiers: Array<ListPlansDimensionsVariantAddItemTier1>;
3508
3591
  };
3592
+ type ListPlansVariantAddItemDimensionsUnion1 = ListPlansDimensionsVariantAddItem1 | ListPlansDimensionsVariantAddItem2;
3509
3593
  type ListPlansVariantAddItemMultipliers1 = {
3510
3594
  /**
3511
3595
  * Event properties this entry applies to. Every key must equal the tracked property, compared as strings.
@@ -3536,6 +3620,7 @@ type ListPlansVariantAddItemFeatureOverrideTier = {
3536
3620
  */
3537
3621
  creditCost: number;
3538
3622
  };
3623
+
3539
3624
  type ListPlansCreditSchemaVariantAddItem1 = {
3540
3625
  /**
3541
3626
  * ID of the metered feature that draws from this credit system.
@@ -3549,7 +3634,7 @@ type ListPlansCreditSchemaVariantAddItem1 = {
3549
3634
  * Named rates chosen by event properties. The most specific match sets the rate; with no match the item's own rate applies.
3550
3635
  */
3551
3636
  dimensions?: {
3552
- [k: string]: ListPlansDimensionsVariantAddItem1 | ListPlansDimensionsVariantAddItem2;
3637
+ [k: string]: ListPlansVariantAddItemDimensionsUnion1;
3553
3638
  } | undefined;
3554
3639
  /**
3555
3640
  * Named adjustments chosen by event properties. Every match applies: factors multiply, then adds are summed.
@@ -3642,6 +3727,10 @@ type ListPlansVariantPlanItem = {
3642
3727
  * Rollover config for unused units. If set, unused included units carry over.
3643
3728
  */
3644
3729
  rollover?: ListPlansVariantAddItemRollover | undefined;
3730
+ /**
3731
+ * Purchased units expire this long after each purchase. One-off prepaid consumable items only.
3732
+ */
3733
+ expiry?: ListPlansVariantAddItemExpiry | undefined;
3645
3734
  /**
3646
3735
  * Overrides fields of this item's feature for customers on this plan (e.g. a credit system's credit_schema).
3647
3736
  */
@@ -3679,7 +3768,6 @@ declare const ListPlansIntervalVariantRemoveItemEnum1: {
3679
3768
  readonly Year: "year";
3680
3769
  };
3681
3770
  type ListPlansIntervalVariantRemoveItemEnum1 = OpenEnum<typeof ListPlansIntervalVariantRemoveItemEnum1>;
3682
-
3683
3771
  /**
3684
3772
  * Filter for matching plan items. All provided fields must match (AND).
3685
3773
  */
@@ -4250,6 +4338,20 @@ type ListPlansVariantUpsertLicenseRollover = {
4250
4338
  */
4251
4339
  expiryDurationLength?: number | undefined;
4252
4340
  };
4341
+ declare const ListPlansVariantUpsertLicenseDuration: {
4342
+ readonly Day: "day";
4343
+ readonly Week: "week";
4344
+ readonly Month: "month";
4345
+ readonly Year: "year";
4346
+ };
4347
+ type ListPlansVariantUpsertLicenseDuration = OpenEnum<typeof ListPlansVariantUpsertLicenseDuration>;
4348
+ /**
4349
+ * Purchased units expire this long after each purchase. One-off prepaid consumable items only.
4350
+ */
4351
+ type ListPlansVariantUpsertLicenseExpiry = {
4352
+ duration: ListPlansVariantUpsertLicenseDuration;
4353
+ length: number;
4354
+ };
4253
4355
  type ListPlansDimensionsVariantUpsertLicense4 = {
4254
4356
  /**
4255
4357
  * Event properties this entry applies to. Every key must equal the tracked property, compared as strings.
@@ -4508,6 +4610,10 @@ type ListPlansVariantUpsertLicensePlanItem = {
4508
4610
  * Rollover config for unused units. If set, unused included units carry over.
4509
4611
  */
4510
4612
  rollover?: ListPlansVariantUpsertLicenseRollover | undefined;
4613
+ /**
4614
+ * Purchased units expire this long after each purchase. One-off prepaid consumable items only.
4615
+ */
4616
+ expiry?: ListPlansVariantUpsertLicenseExpiry | undefined;
4511
4617
  /**
4512
4618
  * Overrides fields of this item's feature for customers on this plan (e.g. a credit system's credit_schema).
4513
4619
  */
@@ -4949,6 +5055,17 @@ type VariantPlanRollover = {
4949
5055
  */
4950
5056
  expiryDurationLength?: number | undefined;
4951
5057
  };
5058
+ declare const VariantPlanDuration: {
5059
+ readonly Day: "day";
5060
+ readonly Week: "week";
5061
+ readonly Month: "month";
5062
+ readonly Year: "year";
5063
+ };
5064
+ type VariantPlanDuration = OpenEnum<typeof VariantPlanDuration>;
5065
+ type VariantPlanExpiry = {
5066
+ duration: VariantPlanDuration;
5067
+ length: number;
5068
+ };
4952
5069
  type DimensionsVariantPlan4 = {
4953
5070
  /**
4954
5071
  * Event properties this entry applies to. Every key must equal the tracked property, compared as strings.
@@ -5216,6 +5333,10 @@ type VariantItem = {
5216
5333
  * Rollover configuration for unused units. If set, unused included units roll over to the next period.
5217
5334
  */
5218
5335
  rollover?: VariantPlanRollover | undefined;
5336
+ /**
5337
+ * Purchased units expire this long after each purchase. One-off prepaid consumable items only.
5338
+ */
5339
+ expiry?: VariantPlanExpiry | null | undefined;
5219
5340
  /**
5220
5341
  * Overrides fields of this item's feature for customers on this plan (e.g. a credit system's credit_schema).
5221
5342
  */
@@ -5418,6 +5539,7 @@ declare const VariantPlanUsageLimitInterval: {
5418
5539
  * Interval for the cap, aligned to the customer's billing cycle.
5419
5540
  */
5420
5541
  type VariantPlanUsageLimitInterval = OpenEnum<typeof VariantPlanUsageLimitInterval>;
5542
+
5421
5543
  /**
5422
5544
  * Window alignment. 'billing_cycle' phases the interval to the customer's renewal time; 'utc' aligns to the UTC calendar.
5423
5545
  */
@@ -5715,7 +5837,6 @@ type ListPlansVariant = {
5715
5837
  */
5716
5838
  plan?: ListPlansPlan | undefined;
5717
5839
  };
5718
-
5719
5840
  /**
5720
5841
  * A plan defines features, pricing, entitlements, assignable licenses, and derived variants.
5721
5842
  */
@@ -1,4 +1,4 @@
1
- import { O as OpenEnum, C as ClosedEnum, P as Plan } from './plan-Dq6s6t9I.mjs';
1
+ import { O as OpenEnum, C as ClosedEnum, P as Plan } from './plan-CrpW2EZo.js';
2
2
 
3
3
  type ListPlansAdditionalCurrency = {
4
4
  /**
@@ -328,6 +328,17 @@ type ListPlansItemRollover = {
328
328
  */
329
329
  expiryDurationLength?: number | undefined;
330
330
  };
331
+ declare const ListPlansItemDuration: {
332
+ readonly Day: "day";
333
+ readonly Week: "week";
334
+ readonly Month: "month";
335
+ readonly Year: "year";
336
+ };
337
+ type ListPlansItemDuration = OpenEnum<typeof ListPlansItemDuration>;
338
+ type ListPlansItemExpiry = {
339
+ duration: ListPlansItemDuration;
340
+ length: number;
341
+ };
331
342
  type ListPlansDimensionsItem4 = {
332
343
  /**
333
344
  * Event properties this entry applies to. Every key must equal the tracked property, compared as strings.
@@ -595,6 +606,10 @@ type ListPlansItem = {
595
606
  * Rollover configuration for unused units. If set, unused included units roll over to the next period.
596
607
  */
597
608
  rollover?: ListPlansItemRollover | undefined;
609
+ /**
610
+ * Purchased units expire this long after each purchase. One-off prepaid consumable items only.
611
+ */
612
+ expiry?: ListPlansItemExpiry | null | undefined;
598
613
  /**
599
614
  * Overrides fields of this item's feature for customers on this plan (e.g. a credit system's credit_schema).
600
615
  */
@@ -1239,6 +1254,20 @@ type ListPlansVariantDetailsRollover = {
1239
1254
  */
1240
1255
  expiryDurationLength?: number | undefined;
1241
1256
  };
1257
+ declare const ListPlansVariantDetailsDuration: {
1258
+ readonly Day: "day";
1259
+ readonly Week: "week";
1260
+ readonly Month: "month";
1261
+ readonly Year: "year";
1262
+ };
1263
+ type ListPlansVariantDetailsDuration = OpenEnum<typeof ListPlansVariantDetailsDuration>;
1264
+ /**
1265
+ * Purchased units expire this long after each purchase. One-off prepaid consumable items only.
1266
+ */
1267
+ type ListPlansVariantDetailsExpiry = {
1268
+ duration: ListPlansVariantDetailsDuration;
1269
+ length: number;
1270
+ };
1242
1271
  type ListPlansDimensionsVariantDetails4 = {
1243
1272
  /**
1244
1273
  * Event properties this entry applies to. Every key must equal the tracked property, compared as strings.
@@ -1505,6 +1534,10 @@ type ListPlansVariantDetailsPlanItem = {
1505
1534
  * Rollover config for unused units. If set, unused included units carry over.
1506
1535
  */
1507
1536
  rollover?: ListPlansVariantDetailsRollover | undefined;
1537
+ /**
1538
+ * Purchased units expire this long after each purchase. One-off prepaid consumable items only.
1539
+ */
1540
+ expiry?: ListPlansVariantDetailsExpiry | undefined;
1508
1541
  /**
1509
1542
  * Overrides fields of this item's feature for customers on this plan (e.g. a credit system's credit_schema).
1510
1543
  */
@@ -1826,6 +1859,7 @@ type ListPlansVariantDetailsUsageAlert = {
1826
1859
  */
1827
1860
  name?: string | undefined;
1828
1861
  };
1862
+
1829
1863
  type ListPlansVariantDetailsOverageAllowed = {
1830
1864
  /**
1831
1865
  * The feature ID this overage allowed control applies to.
@@ -1886,7 +1920,6 @@ type ListPlansVariantDetailsUpsertLicenseAdditionalCurrency = {
1886
1920
  */
1887
1921
  amount: number;
1888
1922
  };
1889
-
1890
1923
  /**
1891
1924
  * Base price configuration for a plan.
1892
1925
  */
@@ -2113,6 +2146,20 @@ type ListPlansVariantDetailsUpsertLicenseRollover = {
2113
2146
  */
2114
2147
  expiryDurationLength?: number | undefined;
2115
2148
  };
2149
+ declare const ListPlansVariantDetailsUpsertLicenseDuration: {
2150
+ readonly Day: "day";
2151
+ readonly Week: "week";
2152
+ readonly Month: "month";
2153
+ readonly Year: "year";
2154
+ };
2155
+ type ListPlansVariantDetailsUpsertLicenseDuration = OpenEnum<typeof ListPlansVariantDetailsUpsertLicenseDuration>;
2156
+ /**
2157
+ * Purchased units expire this long after each purchase. One-off prepaid consumable items only.
2158
+ */
2159
+ type ListPlansVariantDetailsUpsertLicenseExpiry = {
2160
+ duration: ListPlansVariantDetailsUpsertLicenseDuration;
2161
+ length: number;
2162
+ };
2116
2163
  type ListPlansDimensionsVariantDetailsUpsertLicense4 = {
2117
2164
  /**
2118
2165
  * Event properties this entry applies to. Every key must equal the tracked property, compared as strings.
@@ -2379,6 +2426,10 @@ type ListPlansVariantDetailsUpsertLicensePlanItem = {
2379
2426
  * Rollover config for unused units. If set, unused included units carry over.
2380
2427
  */
2381
2428
  rollover?: ListPlansVariantDetailsUpsertLicenseRollover | undefined;
2429
+ /**
2430
+ * Purchased units expire this long after each purchase. One-off prepaid consumable items only.
2431
+ */
2432
+ expiry?: ListPlansVariantDetailsUpsertLicenseExpiry | undefined;
2382
2433
  /**
2383
2434
  * Overrides fields of this item's feature for customers on this plan (e.g. a credit system's credit_schema).
2384
2435
  */
@@ -2756,6 +2807,20 @@ type ListPlansLicenseRollover = {
2756
2807
  */
2757
2808
  expiryDurationLength?: number | undefined;
2758
2809
  };
2810
+ declare const ListPlansLicenseDuration: {
2811
+ readonly Day: "day";
2812
+ readonly Week: "week";
2813
+ readonly Month: "month";
2814
+ readonly Year: "year";
2815
+ };
2816
+ type ListPlansLicenseDuration = OpenEnum<typeof ListPlansLicenseDuration>;
2817
+ /**
2818
+ * Purchased units expire this long after each purchase. One-off prepaid consumable items only.
2819
+ */
2820
+ type ListPlansLicenseExpiry = {
2821
+ duration: ListPlansLicenseDuration;
2822
+ length: number;
2823
+ };
2759
2824
  type ListPlansDimensionsLicense4 = {
2760
2825
  /**
2761
2826
  * Event properties this entry applies to. Every key must equal the tracked property, compared as strings.
@@ -3022,6 +3087,10 @@ type ListPlansLicensePlanItem = {
3022
3087
  * Rollover config for unused units. If set, unused included units carry over.
3023
3088
  */
3024
3089
  rollover?: ListPlansLicenseRollover | undefined;
3090
+ /**
3091
+ * Purchased units expire this long after each purchase. One-off prepaid consumable items only.
3092
+ */
3093
+ expiry?: ListPlansLicenseExpiry | undefined;
3025
3094
  /**
3026
3095
  * Overrides fields of this item's feature for customers on this plan (e.g. a credit system's credit_schema).
3027
3096
  */
@@ -3376,6 +3445,20 @@ type ListPlansVariantAddItemRollover = {
3376
3445
  */
3377
3446
  expiryDurationLength?: number | undefined;
3378
3447
  };
3448
+ declare const ListPlansVariantAddItemDuration: {
3449
+ readonly Day: "day";
3450
+ readonly Week: "week";
3451
+ readonly Month: "month";
3452
+ readonly Year: "year";
3453
+ };
3454
+ type ListPlansVariantAddItemDuration = OpenEnum<typeof ListPlansVariantAddItemDuration>;
3455
+ /**
3456
+ * Purchased units expire this long after each purchase. One-off prepaid consumable items only.
3457
+ */
3458
+ type ListPlansVariantAddItemExpiry = {
3459
+ duration: ListPlansVariantAddItemDuration;
3460
+ length: number;
3461
+ };
3379
3462
  type ListPlansDimensionsVariantAddItem4 = {
3380
3463
  /**
3381
3464
  * Event properties this entry applies to. Every key must equal the tracked property, compared as strings.
@@ -3506,6 +3589,7 @@ type ListPlansDimensionsVariantAddItem1 = {
3506
3589
  tierBehavior: "graduated";
3507
3590
  tiers: Array<ListPlansDimensionsVariantAddItemTier1>;
3508
3591
  };
3592
+ type ListPlansVariantAddItemDimensionsUnion1 = ListPlansDimensionsVariantAddItem1 | ListPlansDimensionsVariantAddItem2;
3509
3593
  type ListPlansVariantAddItemMultipliers1 = {
3510
3594
  /**
3511
3595
  * Event properties this entry applies to. Every key must equal the tracked property, compared as strings.
@@ -3536,6 +3620,7 @@ type ListPlansVariantAddItemFeatureOverrideTier = {
3536
3620
  */
3537
3621
  creditCost: number;
3538
3622
  };
3623
+
3539
3624
  type ListPlansCreditSchemaVariantAddItem1 = {
3540
3625
  /**
3541
3626
  * ID of the metered feature that draws from this credit system.
@@ -3549,7 +3634,7 @@ type ListPlansCreditSchemaVariantAddItem1 = {
3549
3634
  * Named rates chosen by event properties. The most specific match sets the rate; with no match the item's own rate applies.
3550
3635
  */
3551
3636
  dimensions?: {
3552
- [k: string]: ListPlansDimensionsVariantAddItem1 | ListPlansDimensionsVariantAddItem2;
3637
+ [k: string]: ListPlansVariantAddItemDimensionsUnion1;
3553
3638
  } | undefined;
3554
3639
  /**
3555
3640
  * Named adjustments chosen by event properties. Every match applies: factors multiply, then adds are summed.
@@ -3642,6 +3727,10 @@ type ListPlansVariantPlanItem = {
3642
3727
  * Rollover config for unused units. If set, unused included units carry over.
3643
3728
  */
3644
3729
  rollover?: ListPlansVariantAddItemRollover | undefined;
3730
+ /**
3731
+ * Purchased units expire this long after each purchase. One-off prepaid consumable items only.
3732
+ */
3733
+ expiry?: ListPlansVariantAddItemExpiry | undefined;
3645
3734
  /**
3646
3735
  * Overrides fields of this item's feature for customers on this plan (e.g. a credit system's credit_schema).
3647
3736
  */
@@ -3679,7 +3768,6 @@ declare const ListPlansIntervalVariantRemoveItemEnum1: {
3679
3768
  readonly Year: "year";
3680
3769
  };
3681
3770
  type ListPlansIntervalVariantRemoveItemEnum1 = OpenEnum<typeof ListPlansIntervalVariantRemoveItemEnum1>;
3682
-
3683
3771
  /**
3684
3772
  * Filter for matching plan items. All provided fields must match (AND).
3685
3773
  */
@@ -4250,6 +4338,20 @@ type ListPlansVariantUpsertLicenseRollover = {
4250
4338
  */
4251
4339
  expiryDurationLength?: number | undefined;
4252
4340
  };
4341
+ declare const ListPlansVariantUpsertLicenseDuration: {
4342
+ readonly Day: "day";
4343
+ readonly Week: "week";
4344
+ readonly Month: "month";
4345
+ readonly Year: "year";
4346
+ };
4347
+ type ListPlansVariantUpsertLicenseDuration = OpenEnum<typeof ListPlansVariantUpsertLicenseDuration>;
4348
+ /**
4349
+ * Purchased units expire this long after each purchase. One-off prepaid consumable items only.
4350
+ */
4351
+ type ListPlansVariantUpsertLicenseExpiry = {
4352
+ duration: ListPlansVariantUpsertLicenseDuration;
4353
+ length: number;
4354
+ };
4253
4355
  type ListPlansDimensionsVariantUpsertLicense4 = {
4254
4356
  /**
4255
4357
  * Event properties this entry applies to. Every key must equal the tracked property, compared as strings.
@@ -4508,6 +4610,10 @@ type ListPlansVariantUpsertLicensePlanItem = {
4508
4610
  * Rollover config for unused units. If set, unused included units carry over.
4509
4611
  */
4510
4612
  rollover?: ListPlansVariantUpsertLicenseRollover | undefined;
4613
+ /**
4614
+ * Purchased units expire this long after each purchase. One-off prepaid consumable items only.
4615
+ */
4616
+ expiry?: ListPlansVariantUpsertLicenseExpiry | undefined;
4511
4617
  /**
4512
4618
  * Overrides fields of this item's feature for customers on this plan (e.g. a credit system's credit_schema).
4513
4619
  */
@@ -4949,6 +5055,17 @@ type VariantPlanRollover = {
4949
5055
  */
4950
5056
  expiryDurationLength?: number | undefined;
4951
5057
  };
5058
+ declare const VariantPlanDuration: {
5059
+ readonly Day: "day";
5060
+ readonly Week: "week";
5061
+ readonly Month: "month";
5062
+ readonly Year: "year";
5063
+ };
5064
+ type VariantPlanDuration = OpenEnum<typeof VariantPlanDuration>;
5065
+ type VariantPlanExpiry = {
5066
+ duration: VariantPlanDuration;
5067
+ length: number;
5068
+ };
4952
5069
  type DimensionsVariantPlan4 = {
4953
5070
  /**
4954
5071
  * Event properties this entry applies to. Every key must equal the tracked property, compared as strings.
@@ -5216,6 +5333,10 @@ type VariantItem = {
5216
5333
  * Rollover configuration for unused units. If set, unused included units roll over to the next period.
5217
5334
  */
5218
5335
  rollover?: VariantPlanRollover | undefined;
5336
+ /**
5337
+ * Purchased units expire this long after each purchase. One-off prepaid consumable items only.
5338
+ */
5339
+ expiry?: VariantPlanExpiry | null | undefined;
5219
5340
  /**
5220
5341
  * Overrides fields of this item's feature for customers on this plan (e.g. a credit system's credit_schema).
5221
5342
  */
@@ -5418,6 +5539,7 @@ declare const VariantPlanUsageLimitInterval: {
5418
5539
  * Interval for the cap, aligned to the customer's billing cycle.
5419
5540
  */
5420
5541
  type VariantPlanUsageLimitInterval = OpenEnum<typeof VariantPlanUsageLimitInterval>;
5542
+
5421
5543
  /**
5422
5544
  * Window alignment. 'billing_cycle' phases the interval to the customer's renewal time; 'utc' aligns to the UTC calendar.
5423
5545
  */
@@ -5715,7 +5837,6 @@ type ListPlansVariant = {
5715
5837
  */
5716
5838
  plan?: ListPlansPlan | undefined;
5717
5839
  };
5718
-
5719
5840
  /**
5720
5841
  * A plan defines features, pricing, entitlements, assignable licenses, and derived variants.
5721
5842
  */