autumn-js 1.4.48 → 1.4.49

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 (119) hide show
  1. package/dist/backend/adapters/express.js +1659 -792
  2. package/dist/backend/adapters/express.mjs +9 -9
  3. package/dist/backend/adapters/fetch.js +1659 -792
  4. package/dist/backend/adapters/fetch.mjs +9 -9
  5. package/dist/backend/adapters/hono.js +1659 -792
  6. package/dist/backend/adapters/hono.mjs +9 -9
  7. package/dist/backend/adapters/index.js +1659 -792
  8. package/dist/backend/adapters/index.mjs +12 -12
  9. package/dist/backend/adapters/next.js +1659 -792
  10. package/dist/backend/adapters/next.mjs +9 -9
  11. package/dist/backend/{chunk-6LQFPGW7.mjs → chunk-4J2TOGWE.mjs} +220 -60
  12. package/dist/backend/{chunk-3BKOWATO.mjs → chunk-6X4JZECX.mjs} +1 -1
  13. package/dist/backend/{chunk-57HJE4EP.mjs → chunk-EUR3CZTF.mjs} +1 -1
  14. package/dist/backend/{chunk-JZB3BYQP.mjs → chunk-EVPPOVX5.mjs} +7 -7
  15. package/dist/backend/{chunk-MYD4ZJQG.mjs → chunk-L4HKBZCC.mjs} +1439 -732
  16. package/dist/backend/{chunk-YFKANU3R.mjs → chunk-N2SCUJPL.mjs} +5 -5
  17. package/dist/backend/{chunk-XJDT6H4H.mjs → chunk-QPDWSMZ5.mjs} +1 -1
  18. package/dist/backend/{chunk-SO54V4AE.mjs → chunk-XIBFK5EL.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 +1659 -792
  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 +1659 -792
  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 +1659 -792
  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 +1659 -792
  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 +220 -60
  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 +220 -60
  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 +1659 -792
  56. package/dist/backend/index.mjs +10 -10
  57. package/dist/backend/{routeTypes-X7n9tC0I.d.mts → routeTypes-C_10hxA-.d.mts} +642 -130
  58. package/dist/backend/{routeTypes-dgoLP-JI.d.ts → routeTypes-CqaUPWtn.d.ts} +642 -130
  59. package/dist/better-auth/{chunk-HXNWUYPW.mjs → chunk-44MLRR2L.mjs} +1440 -733
  60. package/dist/better-auth/{chunk-XMGJ2JOK.mjs → chunk-TX2WZUZT.mjs} +1 -1
  61. package/dist/better-auth/{chunk-7UPP5FN5.mjs → chunk-ZHYDDOAE.mjs} +220 -60
  62. package/dist/better-auth/index.js +1659 -792
  63. package/dist/better-auth/index.mjs +3 -3
  64. package/dist/better-auth/utils/createAutumnEndpoint.js +220 -60
  65. package/dist/better-auth/utils/createAutumnEndpoint.mjs +2 -2
  66. package/dist/better-auth/utils/handleBetterAuthRoute.js +1659 -792
  67. package/dist/better-auth/utils/handleBetterAuthRoute.mjs +2 -2
  68. package/dist/better-auth/utils/index.js +1659 -792
  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-A48nR0Yu.d.mts → customer-BK_WEJ0J.d.mts} +1 -1
  79. package/dist/react/{customer-CwfTBZ-l.d.ts → customer-CGLAquo9.d.ts} +1 -1
  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/internal/check/balanceToAllowed.d.mts +2 -2
  83. package/dist/react/hooks/internal/check/balanceToAllowed.d.ts +2 -2
  84. package/dist/react/hooks/internal/check/customerToFeatures.d.mts +2 -2
  85. package/dist/react/hooks/internal/check/customerToFeatures.d.ts +2 -2
  86. package/dist/react/hooks/internal/check/findCreditSystemsByFeature.d.mts +2 -2
  87. package/dist/react/hooks/internal/check/findCreditSystemsByFeature.d.ts +2 -2
  88. package/dist/react/hooks/internal/check/getCreditCost.d.mts +2 -2
  89. package/dist/react/hooks/internal/check/getCreditCost.d.ts +2 -2
  90. package/dist/react/hooks/internal/getLocalCheckResponse.d.mts +3 -3
  91. package/dist/react/hooks/internal/getLocalCheckResponse.d.ts +3 -3
  92. package/dist/react/hooks/internal/useCustomerActions.d.mts +4 -4
  93. package/dist/react/hooks/internal/useCustomerActions.d.ts +4 -4
  94. package/dist/react/hooks/useAggregateEvents.d.mts +2 -2
  95. package/dist/react/hooks/useAggregateEvents.d.ts +2 -2
  96. package/dist/react/hooks/useCustomer.d.mts +3 -3
  97. package/dist/react/hooks/useCustomer.d.ts +3 -3
  98. package/dist/react/hooks/useEntity.d.mts +2 -2
  99. package/dist/react/hooks/useEntity.d.ts +2 -2
  100. package/dist/react/hooks/useListEvents.d.mts +2 -2
  101. package/dist/react/hooks/useListEvents.d.ts +2 -2
  102. package/dist/react/hooks/useListPlans.d.mts +3 -3
  103. package/dist/react/hooks/useListPlans.d.ts +3 -3
  104. package/dist/react/hooks/useReferrals.d.mts +2 -2
  105. package/dist/react/hooks/useReferrals.d.ts +2 -2
  106. package/dist/react/index.d.mts +4 -4
  107. package/dist/react/index.d.ts +4 -4
  108. package/dist/react/{list-plans-response-BSFOou5d.d.ts → list-plans-response-BMWMbzkK.d.ts} +89 -20
  109. package/dist/react/{list-plans-response-CC-3erse.d.mts → list-plans-response-kbT4GwSh.d.mts} +89 -20
  110. package/dist/react/{params-CXQcikIK.d.mts → params-D_8sPp60.d.ts} +210 -40
  111. package/dist/react/{params-iVVzwH_e.d.ts → params-eTM9nRBb.d.mts} +210 -40
  112. package/dist/react/{plan-DoD803CO.d.mts → plan-Dji-zdws.d.mts} +37 -7
  113. package/dist/react/{plan-DoD803CO.d.ts → plan-Dji-zdws.d.ts} +37 -7
  114. package/dist/sdk/index.d.mts +2013 -1205
  115. package/dist/sdk/index.d.ts +2013 -1205
  116. package/dist/sdk/index.js +21222 -20050
  117. package/dist/sdk/index.mjs +21120 -20050
  118. package/package.json +2 -2
  119. package/dist/backend/{chunk-IXUCY7AU.mjs → chunk-MOHYGUMA.mjs} +3 -3
@@ -959,6 +959,16 @@ type ItemExpiry = {
959
959
  duration: ItemDuration;
960
960
  length: number;
961
961
  };
962
+ type PlanCreditSchemaItemFeatureOverride3 = {
963
+ /**
964
+ * ID of the metered feature to remove from the credit system.
965
+ */
966
+ meteredFeatureId: string;
967
+ /**
968
+ * Removes this feature from the credit system for customers on this plan. Cannot be combined with a rate.
969
+ */
970
+ excluded: true;
971
+ };
962
972
  type PlanDimensionsItem4 = {
963
973
  /**
964
974
  * Event properties this entry applies to. Every key must equal the tracked property, compared as strings.
@@ -1177,9 +1187,9 @@ type ItemMarkups = {
1177
1187
  */
1178
1188
  type ItemFeatureOverride = {
1179
1189
  /**
1180
- * For credit system features: replaces the feature's credit_schema entirely for customers on this plan.
1190
+ * For credit system features: merges into the feature's credit_schema by metered_feature_id for customers on this plan. A row with a rate overrides or adds that feature, a row with `excluded: true` removes it, and unlisted features keep the credit system's rate.
1181
1191
  */
1182
- creditSchema?: Array<PlanCreditSchemaItemFeatureOverride1 | PlanCreditSchemaItemFeatureOverride2> | undefined;
1192
+ creditSchema?: Array<PlanCreditSchemaItemFeatureOverride1 | PlanCreditSchemaItemFeatureOverride2 | PlanCreditSchemaItemFeatureOverride3> | undefined;
1183
1193
  /**
1184
1194
  * For AI credit system features: replaces the feature's markup chain entirely for customers on this plan. An unset level means no markup at that level rather than inheriting the feature's.
1185
1195
  */
@@ -1901,6 +1911,16 @@ type VariantDetailsExpiry = {
1901
1911
  duration: VariantDetailsDuration;
1902
1912
  length: number;
1903
1913
  };
1914
+ type PlanCreditSchemaVariantDetails3 = {
1915
+ /**
1916
+ * ID of the metered feature to remove from the credit system.
1917
+ */
1918
+ meteredFeatureId: string;
1919
+ /**
1920
+ * Removes this feature from the credit system for customers on this plan. Cannot be combined with a rate.
1921
+ */
1922
+ excluded: true;
1923
+ };
1904
1924
  type PlanDimensionsVariantDetails4 = {
1905
1925
  /**
1906
1926
  * Event properties this entry applies to. Every key must equal the tracked property, compared as strings.
@@ -2119,9 +2139,9 @@ type VariantDetailsMarkups = {
2119
2139
  */
2120
2140
  type VariantDetailsFeatureOverride = {
2121
2141
  /**
2122
- * For credit system features: replaces the feature's credit_schema entirely for customers on this plan.
2142
+ * For credit system features: merges into the feature's credit_schema by metered_feature_id for customers on this plan. A row with a rate overrides or adds that feature, a row with `excluded: true` removes it, and unlisted features keep the credit system's rate.
2123
2143
  */
2124
- creditSchema?: Array<PlanCreditSchemaVariantDetails1 | PlanCreditSchemaVariantDetails2> | undefined;
2144
+ creditSchema?: Array<PlanCreditSchemaVariantDetails1 | PlanCreditSchemaVariantDetails2 | PlanCreditSchemaVariantDetails3> | undefined;
2125
2145
  /**
2126
2146
  * For AI credit system features: replaces the feature's markup chain entirely for customers on this plan. An unset level means no markup at that level rather than inheriting the feature's.
2127
2147
  */
@@ -2492,6 +2512,7 @@ type PlanVariantDetailsUsageAlert = {
2492
2512
  */
2493
2513
  name?: string | undefined;
2494
2514
  };
2515
+
2495
2516
  type PlanVariantDetailsOverageAllowed1 = {
2496
2517
  /**
2497
2518
  * The feature ID this overage allowed control applies to.
@@ -2527,7 +2548,6 @@ type PlanVariantDetailsBillingControls1 = {
2527
2548
  */
2528
2549
  overageAllowed?: Array<PlanVariantDetailsOverageAllowed1> | undefined;
2529
2550
  };
2530
-
2531
2551
  /**
2532
2552
  * Billing interval (e.g. 'month', 'year').
2533
2553
  */
@@ -2802,6 +2822,16 @@ type UpsertLicenseExpiry = {
2802
2822
  duration: UpsertLicenseDuration;
2803
2823
  length: number;
2804
2824
  };
2825
+ type PlanCreditSchemaUpsertLicense3 = {
2826
+ /**
2827
+ * ID of the metered feature to remove from the credit system.
2828
+ */
2829
+ meteredFeatureId: string;
2830
+ /**
2831
+ * Removes this feature from the credit system for customers on this plan. Cannot be combined with a rate.
2832
+ */
2833
+ excluded: true;
2834
+ };
2805
2835
  type PlanDimensionsUpsertLicense4 = {
2806
2836
  /**
2807
2837
  * Event properties this entry applies to. Every key must equal the tracked property, compared as strings.
@@ -3020,9 +3050,9 @@ type UpsertLicenseMarkups = {
3020
3050
  */
3021
3051
  type UpsertLicenseFeatureOverride = {
3022
3052
  /**
3023
- * For credit system features: replaces the feature's credit_schema entirely for customers on this plan.
3053
+ * For credit system features: merges into the feature's credit_schema by metered_feature_id for customers on this plan. A row with a rate overrides or adds that feature, a row with `excluded: true` removes it, and unlisted features keep the credit system's rate.
3024
3054
  */
3025
- creditSchema?: Array<PlanCreditSchemaUpsertLicense1 | PlanCreditSchemaUpsertLicense2> | undefined;
3055
+ creditSchema?: Array<PlanCreditSchemaUpsertLicense1 | PlanCreditSchemaUpsertLicense2 | PlanCreditSchemaUpsertLicense3> | undefined;
3026
3056
  /**
3027
3057
  * For AI credit system features: replaces the feature's markup chain entirely for customers on this plan. An unset level means no markup at that level rather than inheriting the feature's.
3028
3058
  */