autumn-js 0.1.11 → 0.1.12

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 (192) hide show
  1. package/dist/libraries/backend/better-auth.d.mts +30 -26
  2. package/dist/libraries/backend/better-auth.d.ts +30 -26
  3. package/dist/libraries/backend/better-auth.js +172 -2
  4. package/dist/libraries/backend/better-auth.mjs +7 -7
  5. package/dist/libraries/backend/{chunk-EW2R7722.mjs → chunk-2DWGCQCF.mjs} +1 -1
  6. package/dist/libraries/backend/{chunk-VNJ3MFJE.mjs → chunk-56RGUNOT.mjs} +1 -1
  7. package/dist/libraries/backend/{chunk-P3ARLB2M.mjs → chunk-6JI6MF4S.mjs} +1 -1
  8. package/dist/libraries/backend/{chunk-5DDCZMDB.mjs → chunk-FA5Z2MOT.mjs} +1 -1
  9. package/dist/libraries/backend/{chunk-RAHKKJED.mjs → chunk-NWPFUFXX.mjs} +6 -6
  10. package/dist/libraries/backend/{chunk-NAP2URIW.mjs → chunk-Q7SD535L.mjs} +172 -2
  11. package/dist/libraries/backend/{chunk-7K3RATTK.mjs → chunk-SDL7BFTH.mjs} +1 -1
  12. package/dist/libraries/backend/convex.js +172 -2
  13. package/dist/libraries/backend/convex.mjs +7 -7
  14. package/dist/libraries/backend/elysia.js +172 -2
  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 +172 -2
  19. package/dist/libraries/backend/express.mjs +7 -7
  20. package/dist/libraries/backend/fastify.js +172 -2
  21. package/dist/libraries/backend/fastify.mjs +7 -7
  22. package/dist/libraries/backend/hono.js +172 -2
  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 +172 -2
  27. package/dist/libraries/backend/index.mjs +7 -7
  28. package/dist/libraries/backend/next.js +172 -2
  29. package/dist/libraries/backend/next.mjs +7 -7
  30. package/dist/libraries/backend/react-router.js +172 -2
  31. package/dist/libraries/backend/react-router.mjs +7 -7
  32. package/dist/libraries/backend/{referralTypes-C1eZ8cjO.d.mts → referralTypes-BOsjdpOb.d.mts} +176 -6
  33. package/dist/libraries/backend/{referralTypes-FlI0fYwz.d.ts → referralTypes-DcfU8B6R.d.ts} +176 -6
  34. package/dist/libraries/backend/remix_dep.js +172 -2
  35. package/dist/libraries/backend/remix_dep.mjs +7 -7
  36. package/dist/libraries/backend/routes/backendRouter.js +172 -2
  37. package/dist/libraries/backend/routes/backendRouter.mjs +7 -7
  38. package/dist/libraries/backend/routes/entityRoutes.js +172 -2
  39. package/dist/libraries/backend/routes/entityRoutes.mjs +3 -3
  40. package/dist/libraries/backend/routes/genRoutes.js +172 -2
  41. package/dist/libraries/backend/routes/genRoutes.mjs +3 -3
  42. package/dist/libraries/backend/routes/productRoutes.js +172 -2
  43. package/dist/libraries/backend/routes/productRoutes.mjs +3 -3
  44. package/dist/libraries/backend/routes/referralRoutes.js +172 -2
  45. package/dist/libraries/backend/routes/referralRoutes.mjs +3 -3
  46. package/dist/libraries/backend/supabase.js +172 -2
  47. package/dist/libraries/backend/supabase.mjs +7 -7
  48. package/dist/libraries/backend/tanstack.js +172 -2
  49. package/dist/libraries/backend/tanstack.mjs +7 -7
  50. package/dist/libraries/backend/utils/backendRes.js +172 -2
  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 +172 -2
  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 +172 -2
  59. package/dist/libraries/react/AutumnContext.mjs +4 -4
  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 +172 -13
  63. package/dist/libraries/react/BaseAutumnProvider.mjs +9 -9
  64. package/dist/libraries/react/{ReactAutumnClient-CfDtucnL.d.ts → ReactAutumnClient-CIAkiqwV.d.ts} +5 -5
  65. package/dist/libraries/react/{ReactAutumnClient-IFdMWiu5.d.mts → ReactAutumnClient-zBxnpPLM.d.mts} +5 -5
  66. package/dist/libraries/react/ReactAutumnProvider.d.mts +2 -2
  67. package/dist/libraries/react/ReactAutumnProvider.d.ts +2 -2
  68. package/dist/libraries/react/ReactAutumnProvider.js +172 -13
  69. package/dist/libraries/react/ReactAutumnProvider.mjs +10 -10
  70. package/dist/libraries/react/{attachTypes-CLK4jfuj.d.ts → attachTypes-BQaZHr5e.d.ts} +1 -1
  71. package/dist/libraries/react/{attachTypes-C5gcbNrS.d.mts → attachTypes-Cuxn1ThG.d.mts} +1 -1
  72. package/dist/libraries/react/{chunk-4NZ7ML7V.mjs → chunk-26K62U62.mjs} +2 -2
  73. package/dist/libraries/react/{chunk-WYQMHQUE.mjs → chunk-5O3IHYFF.mjs} +172 -2
  74. package/dist/libraries/react/{chunk-3MF54MDU.mjs → chunk-5RTUQSYZ.mjs} +1 -1
  75. package/dist/libraries/react/{chunk-XK3AXQED.mjs → chunk-6X76WFOV.mjs} +3 -13
  76. package/dist/libraries/react/{chunk-JHFJKAXG.mjs → chunk-7A2PZDUO.mjs} +25 -25
  77. package/dist/libraries/react/{chunk-YHT2JUXO.mjs → chunk-7HRCOEUW.mjs} +1 -1
  78. package/dist/libraries/react/{chunk-KP2Q65Y3.mjs → chunk-CMUWZZWV.mjs} +2 -2
  79. package/dist/libraries/react/{chunk-KMYL54B4.mjs → chunk-DKOF357C.mjs} +1 -1
  80. package/dist/libraries/react/{chunk-67RWFVWN.mjs → chunk-HNIU2WNT.mjs} +2 -2
  81. package/dist/libraries/react/{chunk-U3OQJXCW.mjs → chunk-JTYEHM27.mjs} +4 -4
  82. package/dist/libraries/react/{chunk-6D6TYTTO.mjs → chunk-P6CAHZVT.mjs} +1 -2
  83. package/dist/libraries/react/{chunk-TTLL63A4.mjs → chunk-QNMB7QR6.mjs} +3 -3
  84. package/dist/libraries/react/{chunk-2ENHPIYQ.mjs → chunk-RK4NRHHQ.mjs} +3 -3
  85. package/dist/libraries/react/{chunk-VZY225C6.mjs → chunk-ROKCGZ77.mjs} +2 -2
  86. package/dist/libraries/react/{chunk-FDNQ6GRK.mjs → chunk-TE2MOBO7.mjs} +1 -1
  87. package/dist/libraries/react/{chunk-OMJJLT2Q.mjs → chunk-VGNA76RG.mjs} +1 -1
  88. package/dist/libraries/react/client/ReactAutumnClient.d.mts +6 -6
  89. package/dist/libraries/react/client/ReactAutumnClient.d.ts +6 -6
  90. package/dist/libraries/react/client/ReactAutumnClient.js +172 -2
  91. package/dist/libraries/react/client/ReactAutumnClient.mjs +3 -3
  92. package/dist/libraries/react/client/clientCompMethods.d.mts +6 -6
  93. package/dist/libraries/react/client/clientCompMethods.d.ts +6 -6
  94. package/dist/libraries/react/client/clientCusMethods.d.mts +6 -6
  95. package/dist/libraries/react/client/clientCusMethods.d.ts +6 -6
  96. package/dist/libraries/react/client/clientEntityMethods.d.mts +6 -6
  97. package/dist/libraries/react/client/clientEntityMethods.d.ts +6 -6
  98. package/dist/libraries/react/client/clientGenMethods.d.mts +6 -6
  99. package/dist/libraries/react/client/clientGenMethods.d.ts +6 -6
  100. package/dist/libraries/react/client/clientProdMethods.d.mts +6 -6
  101. package/dist/libraries/react/client/clientProdMethods.d.ts +6 -6
  102. package/dist/libraries/react/client/clientReferralMethods.d.mts +6 -6
  103. package/dist/libraries/react/client/clientReferralMethods.d.ts +6 -6
  104. package/dist/libraries/react/client/types/clientGenTypes.js +172 -2
  105. package/dist/libraries/react/client/types/clientGenTypes.mjs +1 -1
  106. package/dist/libraries/react/components/checkout-dialog/checkout-dialog-synced.d.mts +2 -2
  107. package/dist/libraries/react/components/checkout-dialog/checkout-dialog-synced.d.ts +2 -2
  108. package/dist/libraries/react/components/checkout-dialog/checkout-dialog-synced.js +172 -13
  109. package/dist/libraries/react/components/checkout-dialog/checkout-dialog-synced.mjs +26 -26
  110. package/dist/libraries/react/components/checkout-dialog/lib/checkout-content.d.mts +2 -2
  111. package/dist/libraries/react/components/checkout-dialog/lib/checkout-content.d.ts +2 -2
  112. package/dist/libraries/react/components/paywall-dialog/lib/paywall-content.d.mts +1 -1
  113. package/dist/libraries/react/components/paywall-dialog/lib/paywall-content.d.ts +1 -1
  114. package/dist/libraries/react/components/paywall-dialog/paywall-dialog-synced.js +172 -2
  115. package/dist/libraries/react/components/paywall-dialog/paywall-dialog-synced.mjs +26 -26
  116. package/dist/libraries/react/components/pricing-table/lib/pricing-table-content.d.mts +1 -1
  117. package/dist/libraries/react/components/pricing-table/lib/pricing-table-content.d.ts +1 -1
  118. package/dist/libraries/react/components/pricing-table/pricing-table-synced.d.mts +1 -1
  119. package/dist/libraries/react/components/pricing-table/pricing-table-synced.d.ts +1 -1
  120. package/dist/libraries/react/components/pricing-table/pricing-table-synced.js +172 -13
  121. package/dist/libraries/react/components/pricing-table/pricing-table-synced.mjs +26 -26
  122. package/dist/libraries/react/components/ui/button.d.mts +2 -2
  123. package/dist/libraries/react/components/ui/button.d.ts +2 -2
  124. package/dist/libraries/react/components/ui/dialog.mjs +2 -2
  125. package/dist/libraries/react/components/ui/popover.mjs +2 -2
  126. package/dist/libraries/react/{cusTypes-CBapqjzm.d.mts → cusTypes-B2m4-oz4.d.mts} +1 -1
  127. package/dist/libraries/react/{cusTypes-D13MXEN7.d.ts → cusTypes-lMnznWYJ.d.ts} +1 -1
  128. package/dist/libraries/react/{entTypes-C1bM1Zpv.d.mts → entTypes-D-gn1jj2.d.mts} +1 -1
  129. package/dist/libraries/react/{entTypes-DbIrfEpl.d.ts → entTypes-WMQRyYAv.d.ts} +1 -1
  130. package/dist/libraries/react/{genTypes-C_ilxndU.d.mts → genTypes-DdYlVEah.d.mts} +1 -1
  131. package/dist/libraries/react/{genTypes-DjcQWIOM.d.ts → genTypes-aPPwPimh.d.ts} +1 -1
  132. package/dist/libraries/react/hooks/helpers/handleCheck.d.mts +6 -6
  133. package/dist/libraries/react/hooks/helpers/handleCheck.d.ts +6 -6
  134. package/dist/libraries/react/hooks/helpers/handleCheck.js +172 -2
  135. package/dist/libraries/react/hooks/helpers/handleCheck.mjs +2 -2
  136. package/dist/libraries/react/hooks/helpers/useAutumnBase.d.mts +6 -6
  137. package/dist/libraries/react/hooks/helpers/useAutumnBase.d.ts +6 -6
  138. package/dist/libraries/react/hooks/helpers/useAutumnBase.js +172 -3
  139. package/dist/libraries/react/hooks/helpers/useAutumnBase.mjs +3 -3
  140. package/dist/libraries/react/hooks/useAnalytics.d.mts +2 -2
  141. package/dist/libraries/react/hooks/useAnalytics.d.ts +2 -2
  142. package/dist/libraries/react/hooks/useAnalytics.js +172 -2
  143. package/dist/libraries/react/hooks/useAnalytics.mjs +5 -5
  144. package/dist/libraries/react/hooks/useCustomer.d.mts +66 -8
  145. package/dist/libraries/react/hooks/useCustomer.d.ts +66 -8
  146. package/dist/libraries/react/hooks/useCustomer.js +172 -13
  147. package/dist/libraries/react/hooks/useCustomer.mjs +9 -9
  148. package/dist/libraries/react/hooks/useCustomerBase.d.mts +50 -9
  149. package/dist/libraries/react/hooks/useCustomerBase.d.ts +50 -9
  150. package/dist/libraries/react/hooks/useCustomerBase.js +172 -13
  151. package/dist/libraries/react/hooks/useCustomerBase.mjs +8 -8
  152. package/dist/libraries/react/hooks/useEntity.d.mts +4 -4
  153. package/dist/libraries/react/hooks/useEntity.d.ts +4 -4
  154. package/dist/libraries/react/hooks/useEntity.js +172 -3
  155. package/dist/libraries/react/hooks/useEntity.mjs +9 -9
  156. package/dist/libraries/react/hooks/useEntityBase.d.mts +6 -6
  157. package/dist/libraries/react/hooks/useEntityBase.d.ts +6 -6
  158. package/dist/libraries/react/hooks/useEntityBase.js +172 -3
  159. package/dist/libraries/react/hooks/useEntityBase.mjs +8 -8
  160. package/dist/libraries/react/hooks/usePaywall.d.mts +1 -1
  161. package/dist/libraries/react/hooks/usePaywall.d.ts +1 -1
  162. package/dist/libraries/react/hooks/usePaywall.js +172 -2
  163. package/dist/libraries/react/hooks/usePaywall.mjs +5 -5
  164. package/dist/libraries/react/hooks/usePricingTable.d.mts +1 -1
  165. package/dist/libraries/react/hooks/usePricingTable.d.ts +1 -1
  166. package/dist/libraries/react/hooks/usePricingTable.js +172 -2
  167. package/dist/libraries/react/hooks/usePricingTable.mjs +6 -6
  168. package/dist/libraries/react/hooks/usePricingTableBase.d.mts +6 -6
  169. package/dist/libraries/react/hooks/usePricingTableBase.d.ts +6 -6
  170. package/dist/libraries/react/hooks/usePricingTableBase.js +172 -2
  171. package/dist/libraries/react/hooks/usePricingTableBase.mjs +2 -2
  172. package/dist/libraries/react/hooks/useProductsBase.d.mts +6 -6
  173. package/dist/libraries/react/hooks/useProductsBase.d.ts +6 -6
  174. package/dist/libraries/react/index.d.mts +104 -7
  175. package/dist/libraries/react/index.d.ts +104 -7
  176. package/dist/libraries/react/index.js +172 -13
  177. package/dist/libraries/react/index.mjs +172 -13
  178. package/dist/libraries/react/{prodTypes-B8NdKyKo.d.ts → prodTypes-C8xRoBP7.d.mts} +1 -1
  179. package/dist/libraries/react/{prodTypes-B8NdKyKo.d.mts → prodTypes-C8xRoBP7.d.ts} +1 -1
  180. package/dist/next/client/hooks/useCustomer.d.mts +44 -7
  181. package/dist/next/client/hooks/useCustomer.d.ts +44 -7
  182. package/dist/next/server/cusActions.d.mts +176 -6
  183. package/dist/next/server/cusActions.d.ts +176 -6
  184. package/dist/sdk/index.d.mts +174 -4
  185. package/dist/sdk/index.d.ts +174 -4
  186. package/dist/sdk/index.js +171 -1
  187. package/dist/sdk/index.mjs +171 -1
  188. package/dist/utils/encryptUtils.js +172 -2
  189. package/dist/utils/encryptUtils.mjs +172 -2
  190. package/package.json +1 -1
  191. package/dist/libraries/react/{chunk-7JNU5ABT.mjs → chunk-FJWZPMWU.mjs} +3 -3
  192. package/dist/libraries/react/{chunk-LCWL3TIT.mjs → chunk-OTZ65PCT.mjs} +3 -3
@@ -3,8 +3,8 @@ import * as React from 'react';
3
3
  import { VariantProps } from 'class-variance-authority';
4
4
 
5
5
  declare const buttonVariants: (props?: ({
6
- variant?: "default" | "link" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
7
- size?: "default" | "sm" | "lg" | "icon" | null | undefined;
6
+ variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
7
+ size?: "sm" | "lg" | "default" | "icon" | null | undefined;
8
8
  } & class_variance_authority_types.ClassProp) | undefined) => string;
9
9
  interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
10
10
  asChild?: boolean;
@@ -12,9 +12,9 @@ import {
12
12
  DialogPortal,
13
13
  DialogTitle,
14
14
  DialogTrigger
15
- } from "../../chunk-7JNU5ABT.mjs";
16
- import "../../chunk-QJPZFEVW.mjs";
15
+ } from "../../chunk-FJWZPMWU.mjs";
17
16
  import "../../chunk-FEISQQNM.mjs";
17
+ import "../../chunk-QJPZFEVW.mjs";
18
18
  import "../../chunk-I2A7PK2L.mjs";
19
19
  import "../../chunk-7TYAAD2T.mjs";
20
20
  import "../../chunk-RPEGNKJH.mjs";
@@ -5,10 +5,10 @@ import {
5
5
  PopoverAnchor,
6
6
  PopoverContent,
7
7
  PopoverTrigger
8
- } from "../../chunk-LCWL3TIT.mjs";
8
+ } from "../../chunk-OTZ65PCT.mjs";
9
+ import "../../chunk-KUS3X33V.mjs";
9
10
  import "../../chunk-FEISQQNM.mjs";
10
11
  import "../../chunk-I2A7PK2L.mjs";
11
- import "../../chunk-KUS3X33V.mjs";
12
12
  import "../../chunk-7TYAAD2T.mjs";
13
13
  import "../../chunk-RPEGNKJH.mjs";
14
14
  import "../../chunk-4J6OC4ZQ.mjs";
@@ -1,4 +1,4 @@
1
- import { A as AppEnv, a as ProductItem, d as ProductItemInterval } from './prodTypes-B8NdKyKo.mjs';
1
+ import { A as AppEnv, c as ProductItem, d as ProductItemInterval } from './prodTypes-C8xRoBP7.mjs';
2
2
  import { z } from 'zod/v4';
3
3
 
4
4
  declare enum ProductStatus {
@@ -1,4 +1,4 @@
1
- import { A as AppEnv, a as ProductItem, d as ProductItemInterval } from './prodTypes-B8NdKyKo.js';
1
+ import { A as AppEnv, c as ProductItem, d as ProductItemInterval } from './prodTypes-C8xRoBP7.js';
2
2
  import { z } from 'zod/v4';
3
3
 
4
4
  declare enum ProductStatus {
@@ -1,5 +1,5 @@
1
1
  import { A as AutumnError } from './error-DHbclCVh.mjs';
2
- import { d as CustomerProduct, e as CustomerFeature, f as CustomerInvoice } from './cusTypes-CBapqjzm.mjs';
2
+ import { d as CustomerProduct, e as CustomerFeature, f as CustomerInvoice } from './cusTypes-B2m4-oz4.mjs';
3
3
 
4
4
  type Success<T> = {
5
5
  data: T;
@@ -1,5 +1,5 @@
1
1
  import { A as AutumnError } from './error-DHbclCVh.js';
2
- import { d as CustomerProduct, e as CustomerFeature, f as CustomerInvoice } from './cusTypes-D13MXEN7.js';
2
+ import { d as CustomerProduct, e as CustomerFeature, f as CustomerInvoice } from './cusTypes-lMnznWYJ.js';
3
3
 
4
4
  type Success<T> = {
5
5
  data: T;
@@ -1,4 +1,4 @@
1
- import { b as CheckFeatureResult, c as CheckProductResult } from './prodTypes-B8NdKyKo.mjs';
1
+ import { a as CheckFeatureResult, b as CheckProductResult } from './prodTypes-C8xRoBP7.mjs';
2
2
  import { z } from 'zod/v4';
3
3
 
4
4
  declare const CancelResultSchema: z.ZodObject<{
@@ -1,4 +1,4 @@
1
- import { b as CheckFeatureResult, c as CheckProductResult } from './prodTypes-B8NdKyKo.js';
1
+ import { a as CheckFeatureResult, b as CheckProductResult } from './prodTypes-C8xRoBP7.js';
2
2
  import { z } from 'zod/v4';
3
3
 
4
4
  declare const CancelResultSchema: z.ZodObject<{
@@ -1,14 +1,14 @@
1
1
  import { AutumnContextParams } from '../../AutumnContext.mjs';
2
2
  import { CheckParams } from '../../client/types/clientGenTypes.mjs';
3
- import { a as CheckResult } from '../../genTypes-C_ilxndU.mjs';
4
- import { b as Customer } from '../../cusTypes-CBapqjzm.mjs';
5
- import { E as Entity } from '../../entTypes-C1bM1Zpv.mjs';
3
+ import { a as CheckResult } from '../../genTypes-DdYlVEah.mjs';
4
+ import { b as Customer } from '../../cusTypes-B2m4-oz4.mjs';
5
+ import { E as Entity } from '../../entTypes-D-gn1jj2.mjs';
6
6
  import 'react';
7
- import '../../ReactAutumnClient-IFdMWiu5.mjs';
7
+ import '../../ReactAutumnClient-zBxnpPLM.mjs';
8
8
  import '../../client/types/clientEntTypes.mjs';
9
9
  import '../../error-DHbclCVh.mjs';
10
- import '../../attachTypes-C5gcbNrS.mjs';
11
- import '../../prodTypes-B8NdKyKo.mjs';
10
+ import '../../attachTypes-Cuxn1ThG.mjs';
11
+ import '../../prodTypes-C8xRoBP7.mjs';
12
12
  import 'zod/v4';
13
13
 
14
14
  interface AllowedParams {
@@ -1,14 +1,14 @@
1
1
  import { AutumnContextParams } from '../../AutumnContext.js';
2
2
  import { CheckParams } from '../../client/types/clientGenTypes.js';
3
- import { a as CheckResult } from '../../genTypes-DjcQWIOM.js';
4
- import { b as Customer } from '../../cusTypes-D13MXEN7.js';
5
- import { E as Entity } from '../../entTypes-DbIrfEpl.js';
3
+ import { a as CheckResult } from '../../genTypes-aPPwPimh.js';
4
+ import { b as Customer } from '../../cusTypes-lMnznWYJ.js';
5
+ import { E as Entity } from '../../entTypes-WMQRyYAv.js';
6
6
  import 'react';
7
- import '../../ReactAutumnClient-CfDtucnL.js';
7
+ import '../../ReactAutumnClient-CIAkiqwV.js';
8
8
  import '../../client/types/clientEntTypes.js';
9
9
  import '../../error-DHbclCVh.js';
10
- import '../../attachTypes-CLK4jfuj.js';
11
- import '../../prodTypes-B8NdKyKo.js';
10
+ import '../../attachTypes-BQaZHr5e.js';
11
+ import '../../prodTypes-C8xRoBP7.js';
12
12
  import 'zod/v4';
13
13
 
14
14
  interface AllowedParams {
@@ -475,22 +475,92 @@ var Autumn = class {
475
475
  entities = entityMethods(this);
476
476
  referrals = referralMethods(this);
477
477
  features = featureMethods(this);
478
- static checkout = (params) => staticWrapper(handleCheckout, void 0, { params });
478
+ /**
479
+ * Initiates a checkout flow for a product purchase.
480
+ *
481
+ * The checkout function handles the purchase process for products with pricing.
482
+ * It determines whether to show a dialog for user input or redirect directly
483
+ * to Stripe based on the customer's state and product requirements.
484
+ *
485
+ * @param params - Checkout parameters including product ID, customer data, and options
486
+ * @returns Promise resolving to checkout details including pricing, prorations, and URLs
487
+ *
488
+ * @example
489
+ * ```typescript
490
+ * const result = await autumn.checkout({
491
+ * customer_id: "user_123",
492
+ * product_id: "pro",
493
+ * success_url: "https://myapp.com/success"
494
+ * });
495
+ *
496
+ * if (result.url) {
497
+ * // Redirect to Stripe checkout
498
+ * window.location.href = result.url;
499
+ * }
500
+ * ```
501
+ */
479
502
  async checkout(params) {
480
503
  return handleCheckout({
481
504
  instance: this,
482
505
  params
483
506
  });
484
507
  }
485
- static attach = (params) => staticWrapper(handleAttach, void 0, { params });
508
+ static checkout = (params) => staticWrapper(handleCheckout, void 0, { params });
486
509
  static usage = (params) => staticWrapper(handleUsage, void 0, { params });
510
+ /**
511
+ * Attaches a product to a customer, enabling access and handling billing.
512
+ *
513
+ * The attach function activates a product for a customer and applies all product items.
514
+ * When you attach a product:
515
+ * - The customer gains access to all features in the product
516
+ * - If the product has prices, the customer will be billed accordingly
517
+ * - If there's no existing payment method, a checkout URL will be generated
518
+ *
519
+ * @param params - Attach parameters including customer ID, product ID, and options
520
+ * @returns Promise resolving to attachment result with checkout URL if needed
521
+ *
522
+ * @example
523
+ * ```typescript
524
+ * const result = await autumn.attach({
525
+ * customer_id: "user_123",
526
+ * product_id: "pro",
527
+ * success_url: "https://myapp.com/success"
528
+ * });
529
+ *
530
+ * if (result.checkout_url) {
531
+ * // Payment required - redirect to checkout
532
+ * window.location.href = result.checkout_url;
533
+ * } else {
534
+ * // Product successfully attached
535
+ * console.log("Access granted:", result.message);
536
+ * }
537
+ * ```
538
+ */
487
539
  async attach(params) {
488
540
  return handleAttach({
489
541
  instance: this,
490
542
  params
491
543
  });
492
544
  }
545
+ static attach = (params) => staticWrapper(handleAttach, void 0, { params });
493
546
  static setupPayment = (params) => staticWrapper(handleSetupPayment, void 0, { params });
547
+ /**
548
+ * Sets up a payment method for a customer.
549
+ *
550
+ * This method allows you to set up payment methods for customers without
551
+ * immediately charging them. Useful for collecting payment information
552
+ * before product attachment or for updating existing payment methods.
553
+ *
554
+ * @param params - Setup payment parameters including customer information
555
+ * @returns Promise resolving to setup payment result
556
+ *
557
+ * @example
558
+ * ```typescript
559
+ * const result = await autumn.setupPayment({
560
+ * customer_id: "user_123"
561
+ * });
562
+ * ```
563
+ */
494
564
  async setupPayment(params) {
495
565
  return handleSetupPayment({
496
566
  instance: this,
@@ -498,6 +568,24 @@ var Autumn = class {
498
568
  });
499
569
  }
500
570
  static cancel = (params) => staticWrapper(handleCancel, void 0, { params });
571
+ /**
572
+ * Cancels a customer's subscription or product attachment.
573
+ *
574
+ * This method allows you to cancel a customer's subscription to a specific product.
575
+ * You can choose to cancel immediately or at the end of the billing cycle.
576
+ *
577
+ * @param params - Cancel parameters including customer ID and product ID
578
+ * @returns Promise resolving to cancellation result
579
+ *
580
+ * @example
581
+ * ```typescript
582
+ * const result = await autumn.cancel({
583
+ * customer_id: "user_123",
584
+ * product_id: "pro",
585
+ * cancel_immediately: false // Cancel at end of billing cycle
586
+ * });
587
+ * ```
588
+ */
501
589
  async cancel(params) {
502
590
  return handleCancel({
503
591
  instance: this,
@@ -505,6 +593,29 @@ var Autumn = class {
505
593
  });
506
594
  }
507
595
  static check = (params) => staticWrapper(handleCheck, void 0, { params });
596
+ /**
597
+ * Checks if a customer has access to a specific feature.
598
+ *
599
+ * This method verifies whether a customer has permission to use a feature
600
+ * and checks their remaining balance/usage limits. It can be used to gate
601
+ * features and determine when to show upgrade prompts.
602
+ *
603
+ * @param params - Check parameters including customer ID and feature ID
604
+ * @returns Promise resolving to access check result with allowed status and balance info
605
+ *
606
+ * @example
607
+ * ```typescript
608
+ * const result = await autumn.check({
609
+ * customer_id: "user_123",
610
+ * feature_id: "messages",
611
+ * required_balance: 1
612
+ * });
613
+ *
614
+ * if (!result.allowed) {
615
+ * console.log("Feature access denied - upgrade required");
616
+ * }
617
+ * ```
618
+ */
508
619
  async check(params) {
509
620
  return handleCheck({
510
621
  instance: this,
@@ -512,12 +623,50 @@ var Autumn = class {
512
623
  });
513
624
  }
514
625
  static track = (params) => staticWrapper(handleTrack, void 0, { params });
626
+ /**
627
+ * Tracks usage events for features or analytics.
628
+ *
629
+ * This method records usage events for metered features, updating the customer's
630
+ * balance and usage statistics. It's typically used server-side to ensure
631
+ * accurate tracking that cannot be manipulated by users.
632
+ *
633
+ * @param params - Track parameters including customer ID, feature ID, and usage value
634
+ * @returns Promise resolving to tracking result
635
+ *
636
+ * @example
637
+ * ```typescript
638
+ * const result = await autumn.track({
639
+ * customer_id: "user_123",
640
+ * feature_id: "messages",
641
+ * value: 1 // Track 1 message sent
642
+ * });
643
+ * ```
644
+ */
515
645
  async track(params) {
516
646
  return handleTrack({
517
647
  instance: this,
518
648
  params
519
649
  });
520
650
  }
651
+ /**
652
+ * Retrieves usage statistics and analytics for a customer.
653
+ *
654
+ * This method fetches detailed usage information for a customer's features,
655
+ * including current balances, usage history, and analytics data. Useful
656
+ * for displaying usage dashboards or generating reports.
657
+ *
658
+ * @param params - Usage parameters including customer ID and optional filters
659
+ * @returns Promise resolving to usage statistics and analytics data
660
+ *
661
+ * @example
662
+ * ```typescript
663
+ * const result = await autumn.usage({
664
+ * customer_id: "user_123",
665
+ * feature_id: "messages"
666
+ * value: 20 // Usage value
667
+ * });
668
+ * ```
669
+ */
521
670
  async usage(params) {
522
671
  return handleUsage({
523
672
  instance: this,
@@ -525,6 +674,25 @@ var Autumn = class {
525
674
  });
526
675
  }
527
676
  static query = (params) => staticWrapper(handleQuery, void 0, { params });
677
+ /**
678
+ * Performs advanced queries on customer data and analytics.
679
+ *
680
+ * This method allows you to run complex queries against customer data,
681
+ * usage patterns, and billing information. Useful for generating reports,
682
+ * analytics, and custom data insights.
683
+ *
684
+ * @param params - Query parameters including customer ID and query specifications
685
+ * @returns Promise resolving to query results with requested data
686
+ *
687
+ * @example
688
+ * ```typescript
689
+ * const result = await autumn.query({
690
+ * customer_id: "user_123",
691
+ * feature_id: "messages" // feature id to fetch for query, can also be an array
692
+ * });
693
+ *
694
+ * ```
695
+ */
528
696
  async query(params) {
529
697
  return handleQuery({
530
698
  instance: this,
@@ -740,6 +908,8 @@ var CheckoutParamsSchema = import_v47.z.object({
740
908
  product_id: import_v47.z.string(),
741
909
  entity_id: import_v47.z.string().optional(),
742
910
  options: import_v47.z.array(AttachFeatureOptionsSchema).optional(),
911
+ force_checkout: import_v47.z.boolean().optional(),
912
+ invoice: import_v47.z.boolean().optional(),
743
913
  success_url: import_v47.z.string().optional(),
744
914
  customer_data: CustomerDataSchema.optional(),
745
915
  entity_data: import_v47.z.any().optional(),
@@ -3,8 +3,8 @@
3
3
  import {
4
4
  handleCheck,
5
5
  openDialog
6
- } from "../../chunk-KMYL54B4.mjs";
7
- import "../../chunk-WYQMHQUE.mjs";
6
+ } from "../../chunk-DKOF357C.mjs";
7
+ import "../../chunk-5O3IHYFF.mjs";
8
8
  export {
9
9
  handleCheck,
10
10
  openDialog
@@ -1,13 +1,13 @@
1
- import { R as Result, A as AutumnPromise } from '../../entTypes-C1bM1Zpv.mjs';
1
+ import { R as Result, A as AutumnPromise } from '../../entTypes-D-gn1jj2.mjs';
2
2
  import { A as AutumnError } from '../../error-DHbclCVh.mjs';
3
- import { a as CheckResult, T as TrackResult, C as CancelResult, S as SetupPaymentResult } from '../../genTypes-C_ilxndU.mjs';
4
- import { C as CheckoutResult } from '../../attachTypes-C5gcbNrS.mjs';
5
- import { B as BillingPortalResult } from '../../cusTypes-CBapqjzm.mjs';
3
+ import { a as CheckResult, T as TrackResult, C as CancelResult, S as SetupPaymentResult } from '../../genTypes-DdYlVEah.mjs';
4
+ import { C as CheckoutResult } from '../../attachTypes-Cuxn1ThG.mjs';
5
+ import { B as BillingPortalResult } from '../../cusTypes-B2m4-oz4.mjs';
6
6
  import { AutumnContextParams } from '../../AutumnContext.mjs';
7
7
  import { TrackParams, CancelParams, OpenBillingPortalParams, SetupPaymentParams } from '../../client/types/clientGenTypes.mjs';
8
8
  import { AttachParams, CheckoutParams } from '../../client/types/clientAttachTypes.mjs';
9
- import { A as AutumnClient } from '../../ReactAutumnClient-IFdMWiu5.mjs';
10
- import '../../prodTypes-B8NdKyKo.mjs';
9
+ import { A as AutumnClient } from '../../ReactAutumnClient-zBxnpPLM.mjs';
10
+ import '../../prodTypes-C8xRoBP7.mjs';
11
11
  import 'zod/v4';
12
12
  import 'react';
13
13
  import '../../client/types/clientEntTypes.mjs';
@@ -1,13 +1,13 @@
1
- import { R as Result, A as AutumnPromise } from '../../entTypes-DbIrfEpl.js';
1
+ import { R as Result, A as AutumnPromise } from '../../entTypes-WMQRyYAv.js';
2
2
  import { A as AutumnError } from '../../error-DHbclCVh.js';
3
- import { a as CheckResult, T as TrackResult, C as CancelResult, S as SetupPaymentResult } from '../../genTypes-DjcQWIOM.js';
4
- import { C as CheckoutResult } from '../../attachTypes-CLK4jfuj.js';
5
- import { B as BillingPortalResult } from '../../cusTypes-D13MXEN7.js';
3
+ import { a as CheckResult, T as TrackResult, C as CancelResult, S as SetupPaymentResult } from '../../genTypes-aPPwPimh.js';
4
+ import { C as CheckoutResult } from '../../attachTypes-BQaZHr5e.js';
5
+ import { B as BillingPortalResult } from '../../cusTypes-lMnznWYJ.js';
6
6
  import { AutumnContextParams } from '../../AutumnContext.js';
7
7
  import { TrackParams, CancelParams, OpenBillingPortalParams, SetupPaymentParams } from '../../client/types/clientGenTypes.js';
8
8
  import { AttachParams, CheckoutParams } from '../../client/types/clientAttachTypes.js';
9
- import { A as AutumnClient } from '../../ReactAutumnClient-CfDtucnL.js';
10
- import '../../prodTypes-B8NdKyKo.js';
9
+ import { A as AutumnClient } from '../../ReactAutumnClient-CIAkiqwV.js';
10
+ import '../../prodTypes-C8xRoBP7.js';
11
11
  import 'zod/v4';
12
12
  import 'react';
13
13
  import '../../client/types/clientEntTypes.js';
@@ -487,22 +487,92 @@ var Autumn = class {
487
487
  entities = entityMethods(this);
488
488
  referrals = referralMethods(this);
489
489
  features = featureMethods(this);
490
- static checkout = (params) => staticWrapper(handleCheckout, void 0, { params });
490
+ /**
491
+ * Initiates a checkout flow for a product purchase.
492
+ *
493
+ * The checkout function handles the purchase process for products with pricing.
494
+ * It determines whether to show a dialog for user input or redirect directly
495
+ * to Stripe based on the customer's state and product requirements.
496
+ *
497
+ * @param params - Checkout parameters including product ID, customer data, and options
498
+ * @returns Promise resolving to checkout details including pricing, prorations, and URLs
499
+ *
500
+ * @example
501
+ * ```typescript
502
+ * const result = await autumn.checkout({
503
+ * customer_id: "user_123",
504
+ * product_id: "pro",
505
+ * success_url: "https://myapp.com/success"
506
+ * });
507
+ *
508
+ * if (result.url) {
509
+ * // Redirect to Stripe checkout
510
+ * window.location.href = result.url;
511
+ * }
512
+ * ```
513
+ */
491
514
  async checkout(params) {
492
515
  return handleCheckout({
493
516
  instance: this,
494
517
  params
495
518
  });
496
519
  }
497
- static attach = (params) => staticWrapper(handleAttach, void 0, { params });
520
+ static checkout = (params) => staticWrapper(handleCheckout, void 0, { params });
498
521
  static usage = (params) => staticWrapper(handleUsage, void 0, { params });
522
+ /**
523
+ * Attaches a product to a customer, enabling access and handling billing.
524
+ *
525
+ * The attach function activates a product for a customer and applies all product items.
526
+ * When you attach a product:
527
+ * - The customer gains access to all features in the product
528
+ * - If the product has prices, the customer will be billed accordingly
529
+ * - If there's no existing payment method, a checkout URL will be generated
530
+ *
531
+ * @param params - Attach parameters including customer ID, product ID, and options
532
+ * @returns Promise resolving to attachment result with checkout URL if needed
533
+ *
534
+ * @example
535
+ * ```typescript
536
+ * const result = await autumn.attach({
537
+ * customer_id: "user_123",
538
+ * product_id: "pro",
539
+ * success_url: "https://myapp.com/success"
540
+ * });
541
+ *
542
+ * if (result.checkout_url) {
543
+ * // Payment required - redirect to checkout
544
+ * window.location.href = result.checkout_url;
545
+ * } else {
546
+ * // Product successfully attached
547
+ * console.log("Access granted:", result.message);
548
+ * }
549
+ * ```
550
+ */
499
551
  async attach(params) {
500
552
  return handleAttach({
501
553
  instance: this,
502
554
  params
503
555
  });
504
556
  }
557
+ static attach = (params) => staticWrapper(handleAttach, void 0, { params });
505
558
  static setupPayment = (params) => staticWrapper(handleSetupPayment, void 0, { params });
559
+ /**
560
+ * Sets up a payment method for a customer.
561
+ *
562
+ * This method allows you to set up payment methods for customers without
563
+ * immediately charging them. Useful for collecting payment information
564
+ * before product attachment or for updating existing payment methods.
565
+ *
566
+ * @param params - Setup payment parameters including customer information
567
+ * @returns Promise resolving to setup payment result
568
+ *
569
+ * @example
570
+ * ```typescript
571
+ * const result = await autumn.setupPayment({
572
+ * customer_id: "user_123"
573
+ * });
574
+ * ```
575
+ */
506
576
  async setupPayment(params) {
507
577
  return handleSetupPayment({
508
578
  instance: this,
@@ -510,6 +580,24 @@ var Autumn = class {
510
580
  });
511
581
  }
512
582
  static cancel = (params) => staticWrapper(handleCancel, void 0, { params });
583
+ /**
584
+ * Cancels a customer's subscription or product attachment.
585
+ *
586
+ * This method allows you to cancel a customer's subscription to a specific product.
587
+ * You can choose to cancel immediately or at the end of the billing cycle.
588
+ *
589
+ * @param params - Cancel parameters including customer ID and product ID
590
+ * @returns Promise resolving to cancellation result
591
+ *
592
+ * @example
593
+ * ```typescript
594
+ * const result = await autumn.cancel({
595
+ * customer_id: "user_123",
596
+ * product_id: "pro",
597
+ * cancel_immediately: false // Cancel at end of billing cycle
598
+ * });
599
+ * ```
600
+ */
513
601
  async cancel(params) {
514
602
  return handleCancel({
515
603
  instance: this,
@@ -517,6 +605,29 @@ var Autumn = class {
517
605
  });
518
606
  }
519
607
  static check = (params) => staticWrapper(handleCheck, void 0, { params });
608
+ /**
609
+ * Checks if a customer has access to a specific feature.
610
+ *
611
+ * This method verifies whether a customer has permission to use a feature
612
+ * and checks their remaining balance/usage limits. It can be used to gate
613
+ * features and determine when to show upgrade prompts.
614
+ *
615
+ * @param params - Check parameters including customer ID and feature ID
616
+ * @returns Promise resolving to access check result with allowed status and balance info
617
+ *
618
+ * @example
619
+ * ```typescript
620
+ * const result = await autumn.check({
621
+ * customer_id: "user_123",
622
+ * feature_id: "messages",
623
+ * required_balance: 1
624
+ * });
625
+ *
626
+ * if (!result.allowed) {
627
+ * console.log("Feature access denied - upgrade required");
628
+ * }
629
+ * ```
630
+ */
520
631
  async check(params) {
521
632
  return handleCheck({
522
633
  instance: this,
@@ -524,12 +635,50 @@ var Autumn = class {
524
635
  });
525
636
  }
526
637
  static track = (params) => staticWrapper(handleTrack, void 0, { params });
638
+ /**
639
+ * Tracks usage events for features or analytics.
640
+ *
641
+ * This method records usage events for metered features, updating the customer's
642
+ * balance and usage statistics. It's typically used server-side to ensure
643
+ * accurate tracking that cannot be manipulated by users.
644
+ *
645
+ * @param params - Track parameters including customer ID, feature ID, and usage value
646
+ * @returns Promise resolving to tracking result
647
+ *
648
+ * @example
649
+ * ```typescript
650
+ * const result = await autumn.track({
651
+ * customer_id: "user_123",
652
+ * feature_id: "messages",
653
+ * value: 1 // Track 1 message sent
654
+ * });
655
+ * ```
656
+ */
527
657
  async track(params) {
528
658
  return handleTrack({
529
659
  instance: this,
530
660
  params
531
661
  });
532
662
  }
663
+ /**
664
+ * Retrieves usage statistics and analytics for a customer.
665
+ *
666
+ * This method fetches detailed usage information for a customer's features,
667
+ * including current balances, usage history, and analytics data. Useful
668
+ * for displaying usage dashboards or generating reports.
669
+ *
670
+ * @param params - Usage parameters including customer ID and optional filters
671
+ * @returns Promise resolving to usage statistics and analytics data
672
+ *
673
+ * @example
674
+ * ```typescript
675
+ * const result = await autumn.usage({
676
+ * customer_id: "user_123",
677
+ * feature_id: "messages"
678
+ * value: 20 // Usage value
679
+ * });
680
+ * ```
681
+ */
533
682
  async usage(params) {
534
683
  return handleUsage({
535
684
  instance: this,
@@ -537,6 +686,25 @@ var Autumn = class {
537
686
  });
538
687
  }
539
688
  static query = (params) => staticWrapper(handleQuery, void 0, { params });
689
+ /**
690
+ * Performs advanced queries on customer data and analytics.
691
+ *
692
+ * This method allows you to run complex queries against customer data,
693
+ * usage patterns, and billing information. Useful for generating reports,
694
+ * analytics, and custom data insights.
695
+ *
696
+ * @param params - Query parameters including customer ID and query specifications
697
+ * @returns Promise resolving to query results with requested data
698
+ *
699
+ * @example
700
+ * ```typescript
701
+ * const result = await autumn.query({
702
+ * customer_id: "user_123",
703
+ * feature_id: "messages" // feature id to fetch for query, can also be an array
704
+ * });
705
+ *
706
+ * ```
707
+ */
540
708
  async query(params) {
541
709
  return handleQuery({
542
710
  instance: this,
@@ -752,6 +920,8 @@ var CheckoutParamsSchema = import_v47.z.object({
752
920
  product_id: import_v47.z.string(),
753
921
  entity_id: import_v47.z.string().optional(),
754
922
  options: import_v47.z.array(AttachFeatureOptionsSchema).optional(),
923
+ force_checkout: import_v47.z.boolean().optional(),
924
+ invoice: import_v47.z.boolean().optional(),
755
925
  success_url: import_v47.z.string().optional(),
756
926
  customer_data: CustomerDataSchema.optional(),
757
927
  entity_data: import_v47.z.any().optional(),
@@ -1090,7 +1260,6 @@ var useAutumnBase = ({
1090
1260
  };
1091
1261
  return {
1092
1262
  attach,
1093
- // check,
1094
1263
  track,
1095
1264
  cancel,
1096
1265
  openBillingPortal,
@@ -2,9 +2,9 @@
2
2
 
3
3
  import {
4
4
  useAutumnBase
5
- } from "../../chunk-6D6TYTTO.mjs";
6
- import "../../chunk-YHT2JUXO.mjs";
7
- import "../../chunk-WYQMHQUE.mjs";
5
+ } from "../../chunk-P6CAHZVT.mjs";
6
+ import "../../chunk-7HRCOEUW.mjs";
7
+ import "../../chunk-5O3IHYFF.mjs";
8
8
  export {
9
9
  useAutumnBase
10
10
  };