autumn-js 0.1.5 → 0.1.7

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 (232) hide show
  1. package/dist/libraries/backend/better-auth.d.mts +6 -46
  2. package/dist/libraries/backend/better-auth.d.ts +6 -46
  3. package/dist/libraries/backend/better-auth.js +43 -13
  4. package/dist/libraries/backend/better-auth.mjs +23 -21
  5. package/dist/libraries/backend/{chunk-NTPYEOME.mjs → chunk-33ET4N4V.mjs} +1 -1
  6. package/dist/libraries/backend/{chunk-2LSEWYPD.mjs → chunk-3OVRYTZX.mjs} +6 -6
  7. package/dist/libraries/backend/{chunk-TTNUEXHB.mjs → chunk-AREWK25J.mjs} +28 -0
  8. package/dist/libraries/backend/{chunk-WBYCMG34.mjs → chunk-GO7TVFSN.mjs} +1 -1
  9. package/dist/libraries/backend/{chunk-7Z2OYXN4.mjs → chunk-LL53FE2Z.mjs} +1 -1
  10. package/dist/libraries/backend/{chunk-Y63QWBQ6.mjs → chunk-TFYLV3GN.mjs} +1 -1
  11. package/dist/libraries/backend/{chunk-QVLMREDB.mjs → chunk-VBHBF3GP.mjs} +1 -1
  12. package/dist/libraries/backend/convex.js +28 -0
  13. package/dist/libraries/backend/convex.mjs +7 -7
  14. package/dist/libraries/backend/elysia.js +28 -0
  15. package/dist/libraries/backend/elysia.mjs +7 -7
  16. package/dist/libraries/backend/express.d.mts +1 -1
  17. package/dist/libraries/backend/express.d.ts +1 -1
  18. package/dist/libraries/backend/express.js +28 -0
  19. package/dist/libraries/backend/express.mjs +7 -7
  20. package/dist/libraries/backend/fastify.js +28 -0
  21. package/dist/libraries/backend/fastify.mjs +7 -7
  22. package/dist/libraries/backend/hono.js +28 -0
  23. package/dist/libraries/backend/hono.mjs +7 -7
  24. package/dist/libraries/backend/index.d.mts +1 -1
  25. package/dist/libraries/backend/index.d.ts +1 -1
  26. package/dist/libraries/backend/index.js +28 -0
  27. package/dist/libraries/backend/index.mjs +7 -7
  28. package/dist/libraries/backend/next.js +28 -0
  29. package/dist/libraries/backend/next.mjs +7 -7
  30. package/dist/libraries/backend/react-router.js +28 -0
  31. package/dist/libraries/backend/react-router.mjs +7 -7
  32. package/dist/libraries/backend/{referralTypes-BfrNJ62q.d.mts → referralTypes-B50JL4PY.d.mts} +69 -2
  33. package/dist/libraries/backend/{referralTypes-Djyi4iGt.d.ts → referralTypes-dW2HaxKV.d.ts} +69 -2
  34. package/dist/libraries/backend/remix_dep.js +28 -0
  35. package/dist/libraries/backend/remix_dep.mjs +7 -7
  36. package/dist/libraries/backend/routes/backendRouter.js +28 -0
  37. package/dist/libraries/backend/routes/backendRouter.mjs +7 -7
  38. package/dist/libraries/backend/routes/entityRoutes.js +28 -0
  39. package/dist/libraries/backend/routes/entityRoutes.mjs +3 -3
  40. package/dist/libraries/backend/routes/genRoutes.js +28 -0
  41. package/dist/libraries/backend/routes/genRoutes.mjs +3 -3
  42. package/dist/libraries/backend/routes/productRoutes.js +28 -0
  43. package/dist/libraries/backend/routes/productRoutes.mjs +3 -3
  44. package/dist/libraries/backend/routes/referralRoutes.js +28 -0
  45. package/dist/libraries/backend/routes/referralRoutes.mjs +3 -3
  46. package/dist/libraries/backend/supabase.js +28 -0
  47. package/dist/libraries/backend/supabase.mjs +7 -7
  48. package/dist/libraries/backend/tanstack.js +28 -0
  49. package/dist/libraries/backend/tanstack.mjs +7 -7
  50. package/dist/libraries/backend/utils/backendRes.js +28 -0
  51. package/dist/libraries/backend/utils/backendRes.mjs +1 -1
  52. package/dist/libraries/backend/utils/withAuth.d.mts +1 -1
  53. package/dist/libraries/backend/utils/withAuth.d.ts +1 -1
  54. package/dist/libraries/backend/utils/withAuth.js +28 -0
  55. package/dist/libraries/backend/utils/withAuth.mjs +2 -2
  56. package/dist/libraries/react/AutumnContext.d.mts +6 -6
  57. package/dist/libraries/react/AutumnContext.d.ts +6 -6
  58. package/dist/libraries/react/AutumnContext.js +35 -1
  59. package/dist/libraries/react/AutumnContext.mjs +5 -5
  60. package/dist/libraries/react/BaseAutumnProvider.d.mts +6 -6
  61. package/dist/libraries/react/BaseAutumnProvider.d.ts +6 -6
  62. package/dist/libraries/react/BaseAutumnProvider.js +35 -1
  63. package/dist/libraries/react/BaseAutumnProvider.mjs +10 -10
  64. package/dist/libraries/react/{ReactAutumnClient-DM5ZRTfX.d.ts → ReactAutumnClient-BUq9E84_.d.ts} +8 -6
  65. package/dist/libraries/react/{ReactAutumnClient-BHjd9Tw5.d.mts → ReactAutumnClient-CpAGyyur.d.mts} +8 -6
  66. package/dist/libraries/react/ReactAutumnProvider.d.mts +4 -3
  67. package/dist/libraries/react/ReactAutumnProvider.d.ts +4 -3
  68. package/dist/libraries/react/ReactAutumnProvider.js +39 -3
  69. package/dist/libraries/react/ReactAutumnProvider.mjs +11 -11
  70. package/dist/libraries/react/{attachTypes-Bz1_JTvk.d.ts → attachTypes-CcB6xjSF.d.ts} +1 -1
  71. package/dist/{next/client/attachTypes-9VCTaz0m.d.mts → libraries/react/attachTypes-DqUN3q8s.d.mts} +5 -5
  72. package/dist/libraries/react/{chunk-KZVVSY52.mjs → chunk-56PEGK2Z.mjs} +2 -2
  73. package/dist/libraries/react/{chunk-ZT5TN67S.mjs → chunk-ECOBNPRU.mjs} +7 -5
  74. package/dist/libraries/react/{chunk-5K2M3CQZ.mjs → chunk-FEISQQNM.mjs} +1 -1
  75. package/dist/libraries/react/{chunk-BXMZYHE7.mjs → chunk-FJWZPMWU.mjs} +3 -3
  76. package/dist/libraries/react/{chunk-PGU4IXT7.mjs → chunk-FMRBH4CP.mjs} +1 -1
  77. package/dist/libraries/react/{chunk-KLSRAX2F.mjs → chunk-GWVZB5GK.mjs} +3 -3
  78. package/dist/libraries/react/{chunk-QV6Q2XXO.mjs → chunk-HIC6P67K.mjs} +14 -8
  79. package/dist/libraries/react/{chunk-33OTK7MB.mjs → chunk-HMZZIUCF.mjs} +1 -1
  80. package/dist/libraries/react/{chunk-WT5K3J2K.mjs → chunk-I2A7PK2L.mjs} +17 -17
  81. package/dist/libraries/react/{chunk-TJMYXANS.mjs → chunk-JFTZRU2U.mjs} +1 -1
  82. package/dist/libraries/react/{chunk-YCDNQZT5.mjs → chunk-JGDTNJTR.mjs} +2 -2
  83. package/dist/libraries/react/{chunk-7AJBRRXV.mjs → chunk-JNR7QAPG.mjs} +1 -1
  84. package/dist/libraries/react/{chunk-M7SUFZ42.mjs → chunk-KUS3X33V.mjs} +1 -1
  85. package/dist/libraries/react/{chunk-EXK6MS5M.mjs → chunk-KYZ3DYMI.mjs} +454 -456
  86. package/dist/libraries/react/{chunk-W5XUD2S6.mjs → chunk-MW2FSYG3.mjs} +1 -1
  87. package/dist/libraries/react/{chunk-2TQBFCWM.mjs → chunk-OTZ65PCT.mjs} +4 -4
  88. package/dist/libraries/react/{chunk-IM2FNHYV.mjs → chunk-QQKJE2ND.mjs} +2 -2
  89. package/dist/libraries/react/{chunk-GUDRYJ3O.mjs → chunk-SFGXTDMX.mjs} +2 -2
  90. package/dist/libraries/react/{chunk-QW2YS3JY.mjs → chunk-SZJOMZTC.mjs} +2 -2
  91. package/dist/libraries/react/{chunk-F5QUME7S.mjs → chunk-ULIUD6YP.mjs} +3 -3
  92. package/dist/libraries/react/{chunk-EK2RMWXP.mjs → chunk-WQXUZO6K.mjs} +28 -0
  93. package/dist/libraries/react/{chunk-NHDZWWMZ.mjs → chunk-YWQTQ72B.mjs} +2 -2
  94. package/dist/libraries/react/{chunk-SFDHYUHA.mjs → chunk-ZJBEC254.mjs} +1 -1
  95. package/dist/libraries/react/client/ReactAutumnClient.d.mts +6 -6
  96. package/dist/libraries/react/client/ReactAutumnClient.d.ts +6 -6
  97. package/dist/libraries/react/client/ReactAutumnClient.js +35 -1
  98. package/dist/libraries/react/client/ReactAutumnClient.mjs +4 -4
  99. package/dist/libraries/react/client/clientCompMethods.d.mts +6 -6
  100. package/dist/libraries/react/client/clientCompMethods.d.ts +6 -6
  101. package/dist/libraries/react/client/clientCusMethods.d.mts +6 -6
  102. package/dist/libraries/react/client/clientCusMethods.d.ts +6 -6
  103. package/dist/libraries/react/client/clientEntityMethods.d.mts +6 -6
  104. package/dist/libraries/react/client/clientEntityMethods.d.ts +6 -6
  105. package/dist/libraries/react/client/clientGenMethods.d.mts +6 -6
  106. package/dist/libraries/react/client/clientGenMethods.d.ts +6 -6
  107. package/dist/libraries/react/client/clientProdMethods.d.mts +6 -6
  108. package/dist/libraries/react/client/clientProdMethods.d.ts +6 -6
  109. package/dist/libraries/react/client/clientReferralMethods.d.mts +6 -6
  110. package/dist/libraries/react/client/clientReferralMethods.d.ts +6 -6
  111. package/dist/libraries/react/client/types/clientGenTypes.js +28 -0
  112. package/dist/libraries/react/client/types/clientGenTypes.mjs +1 -1
  113. package/dist/libraries/react/components/checkout-dialog/checkout-dialog-synced.d.mts +2 -2
  114. package/dist/libraries/react/components/checkout-dialog/checkout-dialog-synced.d.ts +2 -2
  115. package/dist/libraries/react/components/checkout-dialog/checkout-dialog-synced.js +35 -1
  116. package/dist/libraries/react/components/checkout-dialog/checkout-dialog-synced.mjs +29 -29
  117. package/dist/libraries/react/components/checkout-dialog/lib/checkout-content.d.mts +2 -2
  118. package/dist/libraries/react/components/checkout-dialog/lib/checkout-content.d.ts +2 -2
  119. package/dist/libraries/react/components/paywall-dialog/lib/paywall-content.d.mts +1 -1
  120. package/dist/libraries/react/components/paywall-dialog/lib/paywall-content.d.ts +1 -1
  121. package/dist/libraries/react/components/paywall-dialog/paywall-dialog-synced.js +35 -1
  122. package/dist/libraries/react/components/paywall-dialog/paywall-dialog-synced.mjs +29 -29
  123. package/dist/libraries/react/components/pricing-table/lib/pricing-table-content.d.mts +1 -1
  124. package/dist/libraries/react/components/pricing-table/lib/pricing-table-content.d.ts +1 -1
  125. package/dist/libraries/react/components/pricing-table/pricing-table-synced.d.mts +1 -1
  126. package/dist/libraries/react/components/pricing-table/pricing-table-synced.d.ts +1 -1
  127. package/dist/libraries/react/components/pricing-table/pricing-table-synced.js +35 -1
  128. package/dist/libraries/react/components/pricing-table/pricing-table-synced.mjs +29 -29
  129. package/dist/libraries/react/components/ui/accordion.mjs +3 -3
  130. package/dist/libraries/react/components/ui/button.d.mts +1 -1
  131. package/dist/libraries/react/components/ui/button.d.ts +1 -1
  132. package/dist/libraries/react/components/ui/dialog.mjs +4 -4
  133. package/dist/libraries/react/components/ui/popover.mjs +5 -5
  134. package/dist/libraries/react/components/ui/switch.mjs +3 -3
  135. package/dist/libraries/react/{cusTypes-DT-gAUL9.d.mts → cusTypes-CSmAk5io.d.mts} +1 -1
  136. package/dist/libraries/react/{cusTypes-yJ0fSxbq.d.ts → cusTypes-DHjT-9rV.d.ts} +1 -1
  137. package/dist/libraries/react/{entTypes-BPdjCunj.d.ts → entTypes-CoF9enrR.d.ts} +1 -1
  138. package/dist/libraries/react/{entTypes-D79XPrxo.d.mts → entTypes-S4hkh1RG.d.mts} +1 -1
  139. package/dist/libraries/react/{genTypes-DJUAkD36.d.ts → genTypes-DsiuvyWS.d.ts} +1 -1
  140. package/dist/libraries/react/{genTypes-BV-Jc6Q1.d.mts → genTypes-fEH_nqSm.d.mts} +1 -1
  141. package/dist/libraries/react/hooks/helpers/handleCheck.d.mts +6 -6
  142. package/dist/libraries/react/hooks/helpers/handleCheck.d.ts +6 -6
  143. package/dist/libraries/react/hooks/helpers/handleCheck.js +28 -0
  144. package/dist/libraries/react/hooks/helpers/handleCheck.mjs +2 -2
  145. package/dist/libraries/react/hooks/helpers/useAutumnBase.d.mts +6 -6
  146. package/dist/libraries/react/hooks/helpers/useAutumnBase.d.ts +6 -6
  147. package/dist/libraries/react/hooks/helpers/useAutumnBase.js +28 -0
  148. package/dist/libraries/react/hooks/helpers/useAutumnBase.mjs +3 -3
  149. package/dist/libraries/react/hooks/useAnalytics.d.mts +2 -2
  150. package/dist/libraries/react/hooks/useAnalytics.d.ts +2 -2
  151. package/dist/libraries/react/hooks/useAnalytics.js +35 -1
  152. package/dist/libraries/react/hooks/useAnalytics.mjs +6 -6
  153. package/dist/libraries/react/hooks/useCustomer.d.mts +6 -6
  154. package/dist/libraries/react/hooks/useCustomer.d.ts +6 -6
  155. package/dist/libraries/react/hooks/useCustomer.js +35 -1
  156. package/dist/libraries/react/hooks/useCustomer.mjs +10 -10
  157. package/dist/libraries/react/hooks/useCustomerBase.d.mts +6 -6
  158. package/dist/libraries/react/hooks/useCustomerBase.d.ts +6 -6
  159. package/dist/libraries/react/hooks/useCustomerBase.js +35 -1
  160. package/dist/libraries/react/hooks/useCustomerBase.mjs +9 -9
  161. package/dist/libraries/react/hooks/useEntity.d.mts +4 -4
  162. package/dist/libraries/react/hooks/useEntity.d.ts +4 -4
  163. package/dist/libraries/react/hooks/useEntity.js +35 -1
  164. package/dist/libraries/react/hooks/useEntity.mjs +10 -10
  165. package/dist/libraries/react/hooks/useEntityBase.d.mts +6 -6
  166. package/dist/libraries/react/hooks/useEntityBase.d.ts +6 -6
  167. package/dist/libraries/react/hooks/useEntityBase.js +35 -1
  168. package/dist/libraries/react/hooks/useEntityBase.mjs +9 -9
  169. package/dist/libraries/react/hooks/usePaywall.d.mts +1 -1
  170. package/dist/libraries/react/hooks/usePaywall.d.ts +1 -1
  171. package/dist/libraries/react/hooks/usePaywall.js +35 -1
  172. package/dist/libraries/react/hooks/usePaywall.mjs +6 -6
  173. package/dist/libraries/react/hooks/usePricingTable.d.mts +1 -1
  174. package/dist/libraries/react/hooks/usePricingTable.d.ts +1 -1
  175. package/dist/libraries/react/hooks/usePricingTable.js +35 -1
  176. package/dist/libraries/react/hooks/usePricingTable.mjs +7 -7
  177. package/dist/libraries/react/hooks/usePricingTableBase.d.mts +6 -6
  178. package/dist/libraries/react/hooks/usePricingTableBase.d.ts +6 -6
  179. package/dist/libraries/react/hooks/usePricingTableBase.js +28 -0
  180. package/dist/libraries/react/hooks/usePricingTableBase.mjs +2 -2
  181. package/dist/libraries/react/hooks/useProductsBase.d.mts +6 -6
  182. package/dist/libraries/react/hooks/useProductsBase.d.ts +6 -6
  183. package/dist/libraries/react/index.d.mts +2 -1
  184. package/dist/libraries/react/index.d.ts +2 -1
  185. package/dist/libraries/react/index.js +39 -3
  186. package/dist/libraries/react/index.mjs +39 -3
  187. package/dist/libraries/react/{prodTypes-2tlu9Pyz.d.mts → prodTypes--VvnyGlN.d.mts} +1 -1
  188. package/dist/libraries/react/{prodTypes-2tlu9Pyz.d.ts → prodTypes--VvnyGlN.d.ts} +1 -1
  189. package/dist/next/client/NextAutumnClient.d.mts +21 -19
  190. package/dist/next/client/NextAutumnClient.d.ts +21 -19
  191. package/dist/next/client/NextAutumnProvider.d.mts +2 -2
  192. package/dist/next/client/NextAutumnProvider.d.ts +2 -2
  193. package/dist/next/client/{attachTypes-DLxEa_Wj.d.ts → attachTypes-DKlQexnQ.d.ts} +5 -5
  194. package/dist/{libraries/react/attachTypes-C9FJTCo6.d.mts → next/client/attachTypes-EvdK0fPK.d.mts} +5 -5
  195. package/dist/next/client/{clientAttachTypes-umadXlvp.d.ts → clientAttachTypes-CGPjsdPk.d.ts} +27 -27
  196. package/dist/next/client/{clientAttachTypes-BzsPgggN.d.mts → clientAttachTypes-CZFjz8Rq.d.mts} +27 -27
  197. package/dist/next/client/clientUtils.d.mts +3 -3
  198. package/dist/next/client/clientUtils.d.ts +3 -3
  199. package/dist/next/client/{cusTypes-CYojUJSJ.d.ts → cusTypes-DEURYNg4.d.ts} +5 -5
  200. package/dist/next/client/{cusTypes-CIGvysWL.d.mts → cusTypes-y5wEmx07.d.mts} +5 -5
  201. package/dist/next/client/{entTypes-BAD1NMvb.d.ts → entTypes-CRFgWhOr.d.ts} +1 -1
  202. package/dist/next/client/{entTypes-mOI7WnPZ.d.mts → entTypes-KRxjcMFv.d.mts} +1 -1
  203. package/dist/next/client/hooks/useAutumn.d.mts +5 -5
  204. package/dist/next/client/hooks/useAutumn.d.ts +5 -5
  205. package/dist/next/client/hooks/useCustomer.d.mts +5 -5
  206. package/dist/next/client/hooks/useCustomer.d.ts +5 -5
  207. package/dist/next/client/hooks/useEntity.d.mts +7 -7
  208. package/dist/next/client/hooks/useEntity.d.ts +7 -7
  209. package/dist/next/client/hooks/usePricingTable.d.mts +1 -1
  210. package/dist/next/client/hooks/usePricingTable.d.ts +1 -1
  211. package/dist/next/client/types.d.mts +3 -3
  212. package/dist/next/client/types.d.ts +3 -3
  213. package/dist/next/server/auth/withNextAuth.d.mts +1 -1
  214. package/dist/next/server/auth/withNextAuth.d.ts +1 -1
  215. package/dist/next/server/componentActions.d.mts +1 -1
  216. package/dist/next/server/componentActions.d.ts +1 -1
  217. package/dist/next/server/cusActions.d.mts +84 -17
  218. package/dist/next/server/cusActions.d.ts +84 -17
  219. package/dist/next/server/genActions.d.mts +1 -1
  220. package/dist/next/server/genActions.d.ts +1 -1
  221. package/dist/sdk/index.d.mts +70 -3
  222. package/dist/sdk/index.d.ts +70 -3
  223. package/dist/sdk/index.js +28 -0
  224. package/dist/sdk/index.mjs +28 -0
  225. package/dist/utils/encryptUtils.js +28 -0
  226. package/dist/utils/encryptUtils.mjs +28 -0
  227. package/package.json +1 -1
  228. package/dist/libraries/react/{chunk-KWNH6C27.mjs → chunk-7TYAAD2T.mjs} +11 -11
  229. package/dist/next/client/{prodTypes-CxvB1YY3.d.mts → prodTypes-DzTLP57C.d.mts} +8 -8
  230. package/dist/next/client/{prodTypes-CxvB1YY3.d.ts → prodTypes-DzTLP57C.d.ts} +8 -8
  231. package/dist/next/server/{cusTypes-DgoOZMIt.d.ts → cusTypes-CwopPHB0.d.mts} +8 -8
  232. package/dist/next/server/{cusTypes-DgoOZMIt.d.mts → cusTypes-CwopPHB0.d.ts} +8 -8
@@ -1,4 +1,4 @@
1
- import { C as CustomerData } from '../cusTypes-DgoOZMIt.mjs';
1
+ import { C as CustomerData } from '../cusTypes-CwopPHB0.mjs';
2
2
  import 'zod';
3
3
 
4
4
  declare const withAuth: <T extends {
@@ -1,4 +1,4 @@
1
- import { C as CustomerData } from '../cusTypes-DgoOZMIt.js';
1
+ import { C as CustomerData } from '../cusTypes-CwopPHB0.js';
2
2
  import 'zod';
3
3
 
4
4
  declare const withAuth: <T extends {
@@ -1,4 +1,4 @@
1
- import { C as CustomerData } from './cusTypes-DgoOZMIt.mjs';
1
+ import { C as CustomerData } from './cusTypes-CwopPHB0.mjs';
2
2
  import 'zod';
3
3
 
4
4
  declare const getPricingTableAction: (args: Omit<{
@@ -1,4 +1,4 @@
1
- import { C as CustomerData } from './cusTypes-DgoOZMIt.js';
1
+ import { C as CustomerData } from './cusTypes-CwopPHB0.js';
2
2
  import 'zod';
3
3
 
4
4
  declare const getPricingTableAction: (args: Omit<{
@@ -1,4 +1,4 @@
1
- import { C as CustomerData, a as CheckFeatureResult, b as CheckProductResult, P as ProductItem, c as Product, G as GetCustomerParams, d as Customer, e as CreateCustomerParams, U as UpdateCustomerParams, B as BillingPortalParams, f as BillingPortalResult, g as UpdateBalancesParams, h as UpdateBalancesResult, i as CreateProductParams, L as ListProductsParams, j as CustomerProduct, k as CustomerFeature, l as CustomerInvoice } from './cusTypes-DgoOZMIt.mjs';
1
+ import { C as CustomerData, a as CheckFeatureResult, b as CheckProductResult, P as ProductItem, c as Product, G as GetCustomerParams, d as Customer, e as CreateCustomerParams, U as UpdateCustomerParams, B as BillingPortalParams, f as BillingPortalResult, g as UpdateBalancesParams, h as UpdateBalancesResult, i as CreateProductParams, L as ListProductsParams, j as CustomerProduct, k as CustomerFeature, l as CustomerInvoice } from './cusTypes-CwopPHB0.mjs';
2
2
  import { z } from 'zod';
3
3
  import { R as Result, A as AutumnError } from './response-eH4S4sg0.mjs';
4
4
 
@@ -8,13 +8,13 @@ declare const CancelParamsSchema: z.ZodObject<{
8
8
  entity_id: z.ZodOptional<z.ZodString>;
9
9
  cancel_immediately: z.ZodOptional<z.ZodBoolean>;
10
10
  }, "strip", z.ZodTypeAny, {
11
- customer_id: string;
12
11
  product_id: string;
12
+ customer_id: string;
13
13
  entity_id?: string | undefined;
14
14
  cancel_immediately?: boolean | undefined;
15
15
  }, {
16
- customer_id: string;
17
16
  product_id: string;
17
+ customer_id: string;
18
18
  entity_id?: string | undefined;
19
19
  cancel_immediately?: boolean | undefined;
20
20
  }>;
@@ -70,9 +70,9 @@ declare const CheckParamsSchema: z.ZodObject<{
70
70
  }, "strip", z.ZodTypeAny, {
71
71
  customer_id: string;
72
72
  feature_id?: string | undefined;
73
+ product_id?: string | undefined;
73
74
  entity_id?: string | undefined;
74
75
  required_balance?: number | undefined;
75
- product_id?: string | undefined;
76
76
  customer_data?: any;
77
77
  entity_data?: {
78
78
  feature_id: string;
@@ -83,9 +83,9 @@ declare const CheckParamsSchema: z.ZodObject<{
83
83
  }, {
84
84
  customer_id: string;
85
85
  feature_id?: string | undefined;
86
+ product_id?: string | undefined;
86
87
  entity_id?: string | undefined;
87
88
  required_balance?: number | undefined;
88
- product_id?: string | undefined;
89
89
  customer_data?: any;
90
90
  entity_data?: {
91
91
  feature_id: string;
@@ -121,12 +121,12 @@ declare const QueryParamsSchema: z.ZodObject<{
121
121
  feature_id: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
122
122
  range: z.ZodOptional<z.ZodEnum<["24h", "7d", "30d", "90d", "last_cycle"]>>;
123
123
  }, "strip", z.ZodTypeAny, {
124
- customer_id: string;
125
124
  feature_id: string | string[];
125
+ customer_id: string;
126
126
  range?: "24h" | "7d" | "30d" | "90d" | "last_cycle" | undefined;
127
127
  }, {
128
- customer_id: string;
129
128
  feature_id: string | string[];
129
+ customer_id: string;
130
130
  range?: "24h" | "7d" | "30d" | "90d" | "last_cycle" | undefined;
131
131
  }>;
132
132
  type QueryParams = z.infer<typeof QueryParamsSchema>;
@@ -190,9 +190,9 @@ declare const AttachParamsSchema: z.ZodObject<{
190
190
  feature_id: string;
191
191
  quantity: number;
192
192
  }[] | undefined;
193
- entity_id?: string | undefined;
194
193
  metadata?: Record<string, string> | undefined;
195
194
  product_id?: string | undefined;
195
+ entity_id?: string | undefined;
196
196
  product_ids?: string[] | undefined;
197
197
  free_trial?: boolean | undefined;
198
198
  success_url?: string | undefined;
@@ -211,9 +211,9 @@ declare const AttachParamsSchema: z.ZodObject<{
211
211
  feature_id: string;
212
212
  quantity: number;
213
213
  }[] | undefined;
214
- entity_id?: string | undefined;
215
214
  metadata?: Record<string, string> | undefined;
216
215
  product_id?: string | undefined;
216
+ entity_id?: string | undefined;
217
217
  product_ids?: string[] | undefined;
218
218
  free_trial?: boolean | undefined;
219
219
  success_url?: string | undefined;
@@ -260,8 +260,8 @@ declare const CheckoutParamsSchema: z.ZodObject<{
260
260
  checkout_session_params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
261
261
  reward: z.ZodOptional<z.ZodString>;
262
262
  }, "strip", z.ZodTypeAny, {
263
- customer_id: string;
264
263
  product_id: string;
264
+ customer_id: string;
265
265
  options?: {
266
266
  feature_id: string;
267
267
  quantity: number;
@@ -277,8 +277,8 @@ declare const CheckoutParamsSchema: z.ZodObject<{
277
277
  checkout_session_params?: Record<string, any> | undefined;
278
278
  reward?: string | undefined;
279
279
  }, {
280
- customer_id: string;
281
280
  product_id: string;
281
+ customer_id: string;
282
282
  options?: {
283
283
  feature_id: string;
284
284
  quantity: number;
@@ -315,6 +315,63 @@ type CheckoutResult = {
315
315
  };
316
316
  };
317
317
 
318
+ declare enum FeatureType {
319
+ Boolean = "boolean",
320
+ SingleUse = "single_use",
321
+ ContinuousUse = "continuous_use",
322
+ CreditSystem = "credit_system"
323
+ }
324
+ declare const FeatureSchema: z.ZodObject<{
325
+ id: z.ZodString;
326
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
327
+ type: z.ZodNativeEnum<typeof FeatureType>;
328
+ display: z.ZodOptional<z.ZodNullable<z.ZodObject<{
329
+ singular: z.ZodString;
330
+ plural: z.ZodString;
331
+ }, "strip", z.ZodTypeAny, {
332
+ singular: string;
333
+ plural: string;
334
+ }, {
335
+ singular: string;
336
+ plural: string;
337
+ }>>>;
338
+ credit_schema: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
339
+ metered_feature_id: z.ZodString;
340
+ credit_cost: z.ZodNumber;
341
+ }, "strip", z.ZodTypeAny, {
342
+ metered_feature_id: string;
343
+ credit_cost: number;
344
+ }, {
345
+ metered_feature_id: string;
346
+ credit_cost: number;
347
+ }>, "many">>>;
348
+ }, "strip", z.ZodTypeAny, {
349
+ type: FeatureType;
350
+ id: string;
351
+ name?: string | null | undefined;
352
+ credit_schema?: {
353
+ metered_feature_id: string;
354
+ credit_cost: number;
355
+ }[] | null | undefined;
356
+ display?: {
357
+ singular: string;
358
+ plural: string;
359
+ } | null | undefined;
360
+ }, {
361
+ type: FeatureType;
362
+ id: string;
363
+ name?: string | null | undefined;
364
+ credit_schema?: {
365
+ metered_feature_id: string;
366
+ credit_cost: number;
367
+ }[] | null | undefined;
368
+ display?: {
369
+ singular: string;
370
+ plural: string;
371
+ } | null | undefined;
372
+ }>;
373
+ type Feature = z.infer<typeof FeatureSchema>;
374
+
318
375
  declare class Autumn {
319
376
  private readonly secretKey;
320
377
  private readonly publishableKey;
@@ -357,6 +414,11 @@ declare class Autumn {
357
414
  createCode: (params: CreateReferralCodeParams) => Promise<Result<any, AutumnError>>;
358
415
  redeemCode: (params: RedeemReferralCodeParams) => Promise<Result<any, AutumnError>>;
359
416
  };
417
+ static features: {
418
+ list: () => Promise<Result<{
419
+ list: Feature[];
420
+ }, AutumnError>>;
421
+ };
360
422
  customers: {
361
423
  get: (id: string, params?: GetCustomerParams) => Promise<Result<Customer, AutumnError>>;
362
424
  create: (params?: CreateCustomerParams) => Promise<Result<Customer, AutumnError>>;
@@ -382,6 +444,11 @@ declare class Autumn {
382
444
  createCode: (params: CreateReferralCodeParams) => Promise<Result<any, AutumnError>>;
383
445
  redeemCode: (params: RedeemReferralCodeParams) => Promise<Result<any, AutumnError>>;
384
446
  };
447
+ features: {
448
+ list: () => Promise<Result<{
449
+ list: Feature[];
450
+ }, AutumnError>>;
451
+ };
385
452
  static checkout: (params: CheckoutParams) => Promise<Result<CheckoutResult, AutumnError>>;
386
453
  checkout(params: CheckoutParams): Promise<Result<CheckoutResult, AutumnError>>;
387
454
  static attach: (params: AttachParams) => Promise<Result<{
@@ -404,28 +471,28 @@ declare class Autumn {
404
471
  static setupPayment: (params: SetupPaymentParams) => Promise<Result<SetupPaymentResult, AutumnError>>;
405
472
  setupPayment(params: SetupPaymentParams): Promise<Result<SetupPaymentResult, AutumnError>>;
406
473
  static cancel: (params: CancelParams) => Promise<Result<{
407
- customer_id: string;
408
474
  product_id: string;
475
+ customer_id: string;
409
476
  success: boolean;
410
477
  }, AutumnError>>;
411
478
  cancel(params: CancelParams): Promise<Result<{
412
- customer_id: string;
413
479
  product_id: string;
480
+ customer_id: string;
414
481
  success: boolean;
415
482
  }, AutumnError>>;
416
483
  static check: (params: CheckParams) => Promise<Result<CheckResult, AutumnError>>;
417
484
  check(params: CheckParams): Promise<Result<CheckResult, AutumnError>>;
418
485
  static track: (params: TrackParams) => Promise<Result<{
419
486
  code: string;
420
- customer_id: string;
421
487
  id: string;
488
+ customer_id: string;
422
489
  feature_id?: string | undefined;
423
490
  event_name?: string | undefined;
424
491
  }, AutumnError>>;
425
492
  track(params: TrackParams): Promise<Result<{
426
493
  code: string;
427
- customer_id: string;
428
494
  id: string;
495
+ customer_id: string;
429
496
  feature_id?: string | undefined;
430
497
  event_name?: string | undefined;
431
498
  }, AutumnError>>;
@@ -466,13 +533,13 @@ declare const TransferProductParamsSchema: z.ZodObject<{
466
533
  to_entity_id: z.ZodString;
467
534
  product_id: z.ZodString;
468
535
  }, "strip", z.ZodTypeAny, {
469
- product_id: string;
470
536
  from_entity_id: string;
471
537
  to_entity_id: string;
472
- }, {
473
538
  product_id: string;
539
+ }, {
474
540
  from_entity_id: string;
475
541
  to_entity_id: string;
542
+ product_id: string;
476
543
  }>;
477
544
  type TransferProductParams = z.infer<typeof TransferProductParamsSchema>;
478
545
  type TransferProductResult = {
@@ -1,4 +1,4 @@
1
- import { C as CustomerData, a as CheckFeatureResult, b as CheckProductResult, P as ProductItem, c as Product, G as GetCustomerParams, d as Customer, e as CreateCustomerParams, U as UpdateCustomerParams, B as BillingPortalParams, f as BillingPortalResult, g as UpdateBalancesParams, h as UpdateBalancesResult, i as CreateProductParams, L as ListProductsParams, j as CustomerProduct, k as CustomerFeature, l as CustomerInvoice } from './cusTypes-DgoOZMIt.js';
1
+ import { C as CustomerData, a as CheckFeatureResult, b as CheckProductResult, P as ProductItem, c as Product, G as GetCustomerParams, d as Customer, e as CreateCustomerParams, U as UpdateCustomerParams, B as BillingPortalParams, f as BillingPortalResult, g as UpdateBalancesParams, h as UpdateBalancesResult, i as CreateProductParams, L as ListProductsParams, j as CustomerProduct, k as CustomerFeature, l as CustomerInvoice } from './cusTypes-CwopPHB0.js';
2
2
  import { z } from 'zod';
3
3
  import { R as Result, A as AutumnError } from './response-eH4S4sg0.js';
4
4
 
@@ -8,13 +8,13 @@ declare const CancelParamsSchema: z.ZodObject<{
8
8
  entity_id: z.ZodOptional<z.ZodString>;
9
9
  cancel_immediately: z.ZodOptional<z.ZodBoolean>;
10
10
  }, "strip", z.ZodTypeAny, {
11
- customer_id: string;
12
11
  product_id: string;
12
+ customer_id: string;
13
13
  entity_id?: string | undefined;
14
14
  cancel_immediately?: boolean | undefined;
15
15
  }, {
16
- customer_id: string;
17
16
  product_id: string;
17
+ customer_id: string;
18
18
  entity_id?: string | undefined;
19
19
  cancel_immediately?: boolean | undefined;
20
20
  }>;
@@ -70,9 +70,9 @@ declare const CheckParamsSchema: z.ZodObject<{
70
70
  }, "strip", z.ZodTypeAny, {
71
71
  customer_id: string;
72
72
  feature_id?: string | undefined;
73
+ product_id?: string | undefined;
73
74
  entity_id?: string | undefined;
74
75
  required_balance?: number | undefined;
75
- product_id?: string | undefined;
76
76
  customer_data?: any;
77
77
  entity_data?: {
78
78
  feature_id: string;
@@ -83,9 +83,9 @@ declare const CheckParamsSchema: z.ZodObject<{
83
83
  }, {
84
84
  customer_id: string;
85
85
  feature_id?: string | undefined;
86
+ product_id?: string | undefined;
86
87
  entity_id?: string | undefined;
87
88
  required_balance?: number | undefined;
88
- product_id?: string | undefined;
89
89
  customer_data?: any;
90
90
  entity_data?: {
91
91
  feature_id: string;
@@ -121,12 +121,12 @@ declare const QueryParamsSchema: z.ZodObject<{
121
121
  feature_id: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
122
122
  range: z.ZodOptional<z.ZodEnum<["24h", "7d", "30d", "90d", "last_cycle"]>>;
123
123
  }, "strip", z.ZodTypeAny, {
124
- customer_id: string;
125
124
  feature_id: string | string[];
125
+ customer_id: string;
126
126
  range?: "24h" | "7d" | "30d" | "90d" | "last_cycle" | undefined;
127
127
  }, {
128
- customer_id: string;
129
128
  feature_id: string | string[];
129
+ customer_id: string;
130
130
  range?: "24h" | "7d" | "30d" | "90d" | "last_cycle" | undefined;
131
131
  }>;
132
132
  type QueryParams = z.infer<typeof QueryParamsSchema>;
@@ -190,9 +190,9 @@ declare const AttachParamsSchema: z.ZodObject<{
190
190
  feature_id: string;
191
191
  quantity: number;
192
192
  }[] | undefined;
193
- entity_id?: string | undefined;
194
193
  metadata?: Record<string, string> | undefined;
195
194
  product_id?: string | undefined;
195
+ entity_id?: string | undefined;
196
196
  product_ids?: string[] | undefined;
197
197
  free_trial?: boolean | undefined;
198
198
  success_url?: string | undefined;
@@ -211,9 +211,9 @@ declare const AttachParamsSchema: z.ZodObject<{
211
211
  feature_id: string;
212
212
  quantity: number;
213
213
  }[] | undefined;
214
- entity_id?: string | undefined;
215
214
  metadata?: Record<string, string> | undefined;
216
215
  product_id?: string | undefined;
216
+ entity_id?: string | undefined;
217
217
  product_ids?: string[] | undefined;
218
218
  free_trial?: boolean | undefined;
219
219
  success_url?: string | undefined;
@@ -260,8 +260,8 @@ declare const CheckoutParamsSchema: z.ZodObject<{
260
260
  checkout_session_params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
261
261
  reward: z.ZodOptional<z.ZodString>;
262
262
  }, "strip", z.ZodTypeAny, {
263
- customer_id: string;
264
263
  product_id: string;
264
+ customer_id: string;
265
265
  options?: {
266
266
  feature_id: string;
267
267
  quantity: number;
@@ -277,8 +277,8 @@ declare const CheckoutParamsSchema: z.ZodObject<{
277
277
  checkout_session_params?: Record<string, any> | undefined;
278
278
  reward?: string | undefined;
279
279
  }, {
280
- customer_id: string;
281
280
  product_id: string;
281
+ customer_id: string;
282
282
  options?: {
283
283
  feature_id: string;
284
284
  quantity: number;
@@ -315,6 +315,63 @@ type CheckoutResult = {
315
315
  };
316
316
  };
317
317
 
318
+ declare enum FeatureType {
319
+ Boolean = "boolean",
320
+ SingleUse = "single_use",
321
+ ContinuousUse = "continuous_use",
322
+ CreditSystem = "credit_system"
323
+ }
324
+ declare const FeatureSchema: z.ZodObject<{
325
+ id: z.ZodString;
326
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
327
+ type: z.ZodNativeEnum<typeof FeatureType>;
328
+ display: z.ZodOptional<z.ZodNullable<z.ZodObject<{
329
+ singular: z.ZodString;
330
+ plural: z.ZodString;
331
+ }, "strip", z.ZodTypeAny, {
332
+ singular: string;
333
+ plural: string;
334
+ }, {
335
+ singular: string;
336
+ plural: string;
337
+ }>>>;
338
+ credit_schema: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
339
+ metered_feature_id: z.ZodString;
340
+ credit_cost: z.ZodNumber;
341
+ }, "strip", z.ZodTypeAny, {
342
+ metered_feature_id: string;
343
+ credit_cost: number;
344
+ }, {
345
+ metered_feature_id: string;
346
+ credit_cost: number;
347
+ }>, "many">>>;
348
+ }, "strip", z.ZodTypeAny, {
349
+ type: FeatureType;
350
+ id: string;
351
+ name?: string | null | undefined;
352
+ credit_schema?: {
353
+ metered_feature_id: string;
354
+ credit_cost: number;
355
+ }[] | null | undefined;
356
+ display?: {
357
+ singular: string;
358
+ plural: string;
359
+ } | null | undefined;
360
+ }, {
361
+ type: FeatureType;
362
+ id: string;
363
+ name?: string | null | undefined;
364
+ credit_schema?: {
365
+ metered_feature_id: string;
366
+ credit_cost: number;
367
+ }[] | null | undefined;
368
+ display?: {
369
+ singular: string;
370
+ plural: string;
371
+ } | null | undefined;
372
+ }>;
373
+ type Feature = z.infer<typeof FeatureSchema>;
374
+
318
375
  declare class Autumn {
319
376
  private readonly secretKey;
320
377
  private readonly publishableKey;
@@ -357,6 +414,11 @@ declare class Autumn {
357
414
  createCode: (params: CreateReferralCodeParams) => Promise<Result<any, AutumnError>>;
358
415
  redeemCode: (params: RedeemReferralCodeParams) => Promise<Result<any, AutumnError>>;
359
416
  };
417
+ static features: {
418
+ list: () => Promise<Result<{
419
+ list: Feature[];
420
+ }, AutumnError>>;
421
+ };
360
422
  customers: {
361
423
  get: (id: string, params?: GetCustomerParams) => Promise<Result<Customer, AutumnError>>;
362
424
  create: (params?: CreateCustomerParams) => Promise<Result<Customer, AutumnError>>;
@@ -382,6 +444,11 @@ declare class Autumn {
382
444
  createCode: (params: CreateReferralCodeParams) => Promise<Result<any, AutumnError>>;
383
445
  redeemCode: (params: RedeemReferralCodeParams) => Promise<Result<any, AutumnError>>;
384
446
  };
447
+ features: {
448
+ list: () => Promise<Result<{
449
+ list: Feature[];
450
+ }, AutumnError>>;
451
+ };
385
452
  static checkout: (params: CheckoutParams) => Promise<Result<CheckoutResult, AutumnError>>;
386
453
  checkout(params: CheckoutParams): Promise<Result<CheckoutResult, AutumnError>>;
387
454
  static attach: (params: AttachParams) => Promise<Result<{
@@ -404,28 +471,28 @@ declare class Autumn {
404
471
  static setupPayment: (params: SetupPaymentParams) => Promise<Result<SetupPaymentResult, AutumnError>>;
405
472
  setupPayment(params: SetupPaymentParams): Promise<Result<SetupPaymentResult, AutumnError>>;
406
473
  static cancel: (params: CancelParams) => Promise<Result<{
407
- customer_id: string;
408
474
  product_id: string;
475
+ customer_id: string;
409
476
  success: boolean;
410
477
  }, AutumnError>>;
411
478
  cancel(params: CancelParams): Promise<Result<{
412
- customer_id: string;
413
479
  product_id: string;
480
+ customer_id: string;
414
481
  success: boolean;
415
482
  }, AutumnError>>;
416
483
  static check: (params: CheckParams) => Promise<Result<CheckResult, AutumnError>>;
417
484
  check(params: CheckParams): Promise<Result<CheckResult, AutumnError>>;
418
485
  static track: (params: TrackParams) => Promise<Result<{
419
486
  code: string;
420
- customer_id: string;
421
487
  id: string;
488
+ customer_id: string;
422
489
  feature_id?: string | undefined;
423
490
  event_name?: string | undefined;
424
491
  }, AutumnError>>;
425
492
  track(params: TrackParams): Promise<Result<{
426
493
  code: string;
427
- customer_id: string;
428
494
  id: string;
495
+ customer_id: string;
429
496
  feature_id?: string | undefined;
430
497
  event_name?: string | undefined;
431
498
  }, AutumnError>>;
@@ -466,13 +533,13 @@ declare const TransferProductParamsSchema: z.ZodObject<{
466
533
  to_entity_id: z.ZodString;
467
534
  product_id: z.ZodString;
468
535
  }, "strip", z.ZodTypeAny, {
469
- product_id: string;
470
536
  from_entity_id: string;
471
537
  to_entity_id: string;
472
- }, {
473
538
  product_id: string;
539
+ }, {
474
540
  from_entity_id: string;
475
541
  to_entity_id: string;
542
+ product_id: string;
476
543
  }>;
477
544
  type TransferProductParams = z.infer<typeof TransferProductParamsSchema>;
478
545
  type TransferProductResult = {
@@ -1,4 +1,4 @@
1
- import { C as CustomerData, B as BillingPortalParams } from './cusTypes-DgoOZMIt.mjs';
1
+ import { C as CustomerData, B as BillingPortalParams } from './cusTypes-CwopPHB0.mjs';
2
2
  import 'zod';
3
3
 
4
4
  declare const attachAction: (args: Omit<{
@@ -1,4 +1,4 @@
1
- import { C as CustomerData, B as BillingPortalParams } from './cusTypes-DgoOZMIt.js';
1
+ import { C as CustomerData, B as BillingPortalParams } from './cusTypes-CwopPHB0.js';
2
2
  import 'zod';
3
3
 
4
4
  declare const attachAction: (args: Omit<{
@@ -212,7 +212,7 @@ interface PriceTier {
212
212
  to: number;
213
213
  amount: number | "inf";
214
214
  }
215
- interface Feature {
215
+ interface Feature$1 {
216
216
  id: string;
217
217
  name: string;
218
218
  type: "boolean" | "continuous_use" | "single_use" | "credit_system";
@@ -222,7 +222,7 @@ interface ProductItem {
222
222
  feature_id?: string;
223
223
  included_usage?: number | typeof Infinite;
224
224
  interval?: ProductItemIntervalType;
225
- feature?: Feature;
225
+ feature?: Feature$1;
226
226
  usage_model?: UsageModel;
227
227
  price?: number;
228
228
  billing_units?: number;
@@ -887,6 +887,63 @@ type CheckoutResult = {
887
887
  };
888
888
  };
889
889
 
890
+ declare enum FeatureType {
891
+ Boolean = "boolean",
892
+ SingleUse = "single_use",
893
+ ContinuousUse = "continuous_use",
894
+ CreditSystem = "credit_system"
895
+ }
896
+ declare const FeatureSchema: z.ZodObject<{
897
+ id: z.ZodString;
898
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
899
+ type: z.ZodNativeEnum<typeof FeatureType>;
900
+ display: z.ZodOptional<z.ZodNullable<z.ZodObject<{
901
+ singular: z.ZodString;
902
+ plural: z.ZodString;
903
+ }, "strip", z.ZodTypeAny, {
904
+ singular: string;
905
+ plural: string;
906
+ }, {
907
+ singular: string;
908
+ plural: string;
909
+ }>>>;
910
+ credit_schema: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
911
+ metered_feature_id: z.ZodString;
912
+ credit_cost: z.ZodNumber;
913
+ }, "strip", z.ZodTypeAny, {
914
+ metered_feature_id: string;
915
+ credit_cost: number;
916
+ }, {
917
+ metered_feature_id: string;
918
+ credit_cost: number;
919
+ }>, "many">>>;
920
+ }, "strip", z.ZodTypeAny, {
921
+ type: FeatureType;
922
+ id: string;
923
+ credit_schema?: {
924
+ metered_feature_id: string;
925
+ credit_cost: number;
926
+ }[] | null | undefined;
927
+ name?: string | null | undefined;
928
+ display?: {
929
+ singular: string;
930
+ plural: string;
931
+ } | null | undefined;
932
+ }, {
933
+ type: FeatureType;
934
+ id: string;
935
+ credit_schema?: {
936
+ metered_feature_id: string;
937
+ credit_cost: number;
938
+ }[] | null | undefined;
939
+ name?: string | null | undefined;
940
+ display?: {
941
+ singular: string;
942
+ plural: string;
943
+ } | null | undefined;
944
+ }>;
945
+ type Feature = z.infer<typeof FeatureSchema>;
946
+
890
947
  type Success<T> = {
891
948
  data: T;
892
949
  error: null;
@@ -947,6 +1004,11 @@ declare class Autumn {
947
1004
  createCode: (params: CreateReferralCodeParams) => Promise<Result<any, AutumnError>>;
948
1005
  redeemCode: (params: RedeemReferralCodeParams) => Promise<Result<any, AutumnError>>;
949
1006
  };
1007
+ static features: {
1008
+ list: () => Promise<Result<{
1009
+ list: Feature[];
1010
+ }, AutumnError>>;
1011
+ };
950
1012
  customers: {
951
1013
  get: (id: string, params?: GetCustomerParams) => Promise<Result<Customer, AutumnError>>;
952
1014
  create: (params?: CreateCustomerParams) => Promise<Result<Customer, AutumnError>>;
@@ -972,6 +1034,11 @@ declare class Autumn {
972
1034
  createCode: (params: CreateReferralCodeParams) => Promise<Result<any, AutumnError>>;
973
1035
  redeemCode: (params: RedeemReferralCodeParams) => Promise<Result<any, AutumnError>>;
974
1036
  };
1037
+ features: {
1038
+ list: () => Promise<Result<{
1039
+ list: Feature[];
1040
+ }, AutumnError>>;
1041
+ };
975
1042
  static checkout: (params: CheckoutParams) => Promise<Result<CheckoutResult, AutumnError>>;
976
1043
  checkout(params: CheckoutParams): Promise<Result<CheckoutResult, AutumnError>>;
977
1044
  static attach: (params: AttachParams) => Promise<Result<{
@@ -1140,4 +1207,4 @@ interface RedeemReferralCodeResult {
1140
1207
  applied: boolean;
1141
1208
  }
1142
1209
 
1143
- export { AppEnv, type AttachFeatureOptions, AttachFeatureOptionsSchema, type AttachParams, AttachParamsSchema, type AttachResult, AttachResultSchema, Autumn, AutumnError, type AutumnPromise, type BillingPortalParams, BillingPortalParamsSchema, type BillingPortalResult, type CancelParams, CancelParamsSchema, type CancelResult, CancelResultSchema, type CheckFeaturePreview, type CheckFeatureResult, CheckFeatureResultSchema, type CheckFeatureScenario, type CheckParams, CheckParamsSchema, type CheckProductPreview, type CheckProductResult, type CheckResult, type CheckoutParams, CheckoutParamsSchema, type CheckoutResult, CoreCusFeatureSchema, type CoreCustomerFeature, type CreateCustomerParams, CreateCustomerParamsSchema, type CreateEntityParams, type CreateEntityResult, type CreateProductParams, type CreateReferralCodeParams, CreateReferralCodeParamsSchema, type CreateReferralCodeResult, type Customer, type CustomerData, CustomerDataSchema, CustomerExpandEnum, type CustomerExpandOption, type CustomerFeature, type CustomerInvoice, type CustomerProduct, type DeleteEntityResult, type Entity, type EntityData, EntityDataSchema, type EntityExpandOption, type ErrorResponse, type Feature, type FreeTrial, FreeTrialDuration, type GetCustomerParams, type GetEntityParams, type GetPricingTableParams, Infinite, type ListProductsParams, type PriceTier, type PricingTableProduct, type Product, type ProductItem, ProductItemInterval, type ProductItemIntervalType, type ProductScenario, ProductStatus, type QueryParams, QueryParamsSchema, QueryRangeEnum, type QueryResult, type RedeemReferralCodeParams, RedeemReferralCodeParamsSchema, type RedeemReferralCodeResult, type SetupPaymentParams, type SetupPaymentResult, type TrackParams, TrackParamsSchema, type TrackResult, TrackResultSchema, type TransferProductParams, TransferProductParamsSchema, type TransferProductResult, type UpdateBalancesParams, UpdateBalancesParamsSchema, type UpdateBalancesResult, type UpdateCustomerParams, UsageModel, type UsageModelType, type UsageParams, type UsageResult, fetchPricingTable, toContainerResult };
1210
+ export { AppEnv, type AttachFeatureOptions, AttachFeatureOptionsSchema, type AttachParams, AttachParamsSchema, type AttachResult, AttachResultSchema, Autumn, AutumnError, type AutumnPromise, type BillingPortalParams, BillingPortalParamsSchema, type BillingPortalResult, type CancelParams, CancelParamsSchema, type CancelResult, CancelResultSchema, type CheckFeaturePreview, type CheckFeatureResult, CheckFeatureResultSchema, type CheckFeatureScenario, type CheckParams, CheckParamsSchema, type CheckProductPreview, type CheckProductResult, type CheckResult, type CheckoutParams, CheckoutParamsSchema, type CheckoutResult, CoreCusFeatureSchema, type CoreCustomerFeature, type CreateCustomerParams, CreateCustomerParamsSchema, type CreateEntityParams, type CreateEntityResult, type CreateProductParams, type CreateReferralCodeParams, CreateReferralCodeParamsSchema, type CreateReferralCodeResult, type Customer, type CustomerData, CustomerDataSchema, CustomerExpandEnum, type CustomerExpandOption, type CustomerFeature, type CustomerInvoice, type CustomerProduct, type DeleteEntityResult, type Entity, type EntityData, EntityDataSchema, type EntityExpandOption, type ErrorResponse, type Feature$1 as Feature, type FreeTrial, FreeTrialDuration, type GetCustomerParams, type GetEntityParams, type GetPricingTableParams, Infinite, type ListProductsParams, type PriceTier, type PricingTableProduct, type Product, type ProductItem, ProductItemInterval, type ProductItemIntervalType, type ProductScenario, ProductStatus, type QueryParams, QueryParamsSchema, QueryRangeEnum, type QueryResult, type RedeemReferralCodeParams, RedeemReferralCodeParamsSchema, type RedeemReferralCodeResult, type SetupPaymentParams, type SetupPaymentResult, type TrackParams, TrackParamsSchema, type TrackResult, TrackResultSchema, type TransferProductParams, TransferProductParamsSchema, type TransferProductResult, type UpdateBalancesParams, UpdateBalancesParamsSchema, type UpdateBalancesResult, type UpdateCustomerParams, UsageModel, type UsageModelType, type UsageParams, type UsageResult, fetchPricingTable, toContainerResult };