autumn-js 0.0.101 → 0.0.103

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 (188) hide show
  1. package/dist/compose/index.d.mts +67 -93
  2. package/dist/compose/index.d.ts +67 -93
  3. package/dist/compose/index.js +14 -83
  4. package/dist/compose/index.mjs +14 -80
  5. package/dist/libraries/backend/better-auth.d.mts +18 -18
  6. package/dist/libraries/backend/better-auth.d.ts +18 -18
  7. package/dist/libraries/backend/better-auth.mjs +3 -3
  8. package/dist/libraries/backend/convex.mjs +3 -3
  9. package/dist/libraries/backend/elysia.d.mts +1 -1
  10. package/dist/libraries/backend/elysia.d.ts +1 -1
  11. package/dist/libraries/backend/elysia.mjs +3 -3
  12. package/dist/libraries/backend/express.d.mts +1 -1
  13. package/dist/libraries/backend/express.d.ts +1 -1
  14. package/dist/libraries/backend/express.mjs +3 -3
  15. package/dist/libraries/backend/fastify.mjs +3 -3
  16. package/dist/libraries/backend/hono.mjs +3 -3
  17. package/dist/libraries/backend/next.js +209 -186
  18. package/dist/libraries/backend/next.mjs +212 -189
  19. package/dist/libraries/backend/react-router.mjs +3 -3
  20. package/dist/libraries/backend/{referralTypes-HAk2vTns.d.ts → referralTypes-DV8s1h8w.d.ts} +34 -29
  21. package/dist/libraries/backend/{referralTypes-Dg9pRvI7.d.mts → referralTypes-DcDxMGTp.d.mts} +34 -29
  22. package/dist/libraries/backend/remix_dep.mjs +3 -3
  23. package/dist/libraries/backend/routes/backendRouter.mjs +3 -3
  24. package/dist/libraries/backend/supabase.mjs +3 -3
  25. package/dist/libraries/backend/tanstack.js +2 -2
  26. package/dist/libraries/backend/tanstack.mjs +5 -5
  27. package/dist/libraries/backend/utils/withAuth.d.mts +1 -1
  28. package/dist/libraries/backend/utils/withAuth.d.ts +1 -1
  29. package/dist/libraries/react/AutumnContext.d.mts +4 -4
  30. package/dist/libraries/react/AutumnContext.d.ts +4 -4
  31. package/dist/libraries/react/AutumnContext.mjs +5 -5
  32. package/dist/libraries/react/BaseAutumnProvider.d.mts +4 -4
  33. package/dist/libraries/react/BaseAutumnProvider.d.ts +4 -4
  34. package/dist/libraries/react/BaseAutumnProvider.js +7 -2
  35. package/dist/libraries/react/BaseAutumnProvider.mjs +10 -10
  36. package/dist/libraries/react/{ReactAutumnClient-B4P_QjY1.d.ts → ReactAutumnClient-BlxQQOXE.d.ts} +5 -5
  37. package/dist/libraries/react/{ReactAutumnClient-DCdPx-ps.d.mts → ReactAutumnClient-C8Nt-pqu.d.mts} +5 -5
  38. package/dist/libraries/react/ReactAutumnProvider.d.mts +1 -1
  39. package/dist/libraries/react/ReactAutumnProvider.d.ts +1 -1
  40. package/dist/libraries/react/ReactAutumnProvider.js +7 -2
  41. package/dist/libraries/react/ReactAutumnProvider.mjs +11 -11
  42. package/dist/libraries/react/{chunk-APDR7D6A.mjs → chunk-3SGSKYJ7.mjs} +2 -2
  43. package/dist/libraries/react/{chunk-YLZ5NFYO.mjs → chunk-AL3VJLFU.mjs} +1 -1
  44. package/dist/libraries/react/{chunk-G3FBFZLU.mjs → chunk-CGWNDUYV.mjs} +1 -1
  45. package/dist/libraries/react/{chunk-T5PIJ4HG.mjs → chunk-DBGTWERW.mjs} +4 -3
  46. package/dist/libraries/react/{chunk-CAMHARUX.mjs → chunk-DHJ36QEV.mjs} +2 -2
  47. package/dist/libraries/react/{chunk-R4BYOLST.mjs → chunk-EHOBTSZ7.mjs} +2 -2
  48. package/dist/libraries/react/{chunk-AOJCMXVS.mjs → chunk-GQIE3MFB.mjs} +3 -3
  49. package/dist/libraries/react/{chunk-LVDONEVF.mjs → chunk-KYSWTOMQ.mjs} +7 -3
  50. package/dist/libraries/react/{chunk-RQG36YPD.mjs → chunk-LXSKONN2.mjs} +5 -9
  51. package/dist/libraries/react/{chunk-R46CJXF7.mjs → chunk-OAPUYXBO.mjs} +6 -6
  52. package/dist/libraries/react/{chunk-3CJSWXNT.mjs → chunk-OAWFFAKA.mjs} +6 -6
  53. package/dist/libraries/react/{chunk-5G3DYUNT.mjs → chunk-PZJQBCVG.mjs} +1 -1
  54. package/dist/libraries/react/{chunk-DVMVIAZE.mjs → chunk-RQN4VDAE.mjs} +1 -1
  55. package/dist/libraries/react/{chunk-MZDRIPNS.mjs → chunk-S6JUZ43Q.mjs} +2 -2
  56. package/dist/libraries/react/{chunk-CPITDC7S.mjs → chunk-SDMBKRAI.mjs} +37 -172
  57. package/dist/libraries/react/{chunk-6CJ3FB74.mjs → chunk-X4R3V6O6.mjs} +2 -2
  58. package/dist/libraries/react/{chunk-24EVX3BR.mjs → chunk-ZEVKOP7Z.mjs} +24 -45
  59. package/dist/libraries/react/{chunk-RQEL7G2O.mjs → chunk-ZVQKDPUP.mjs} +3 -3
  60. package/dist/libraries/react/client/ReactAutumnClient.d.mts +4 -4
  61. package/dist/libraries/react/client/ReactAutumnClient.d.ts +4 -4
  62. package/dist/libraries/react/client/ReactAutumnClient.mjs +4 -4
  63. package/dist/libraries/react/client/clientCompMethods.d.mts +4 -4
  64. package/dist/libraries/react/client/clientCompMethods.d.ts +4 -4
  65. package/dist/libraries/react/client/clientCusMethods.d.mts +4 -4
  66. package/dist/libraries/react/client/clientCusMethods.d.ts +4 -4
  67. package/dist/libraries/react/client/clientEntityMethods.d.mts +4 -4
  68. package/dist/libraries/react/client/clientEntityMethods.d.ts +4 -4
  69. package/dist/libraries/react/client/clientGenMethods.d.mts +4 -4
  70. package/dist/libraries/react/client/clientGenMethods.d.ts +4 -4
  71. package/dist/libraries/react/client/clientProdMethods.d.mts +4 -4
  72. package/dist/libraries/react/client/clientProdMethods.d.ts +4 -4
  73. package/dist/libraries/react/client/clientReferralMethods.d.mts +4 -4
  74. package/dist/libraries/react/client/clientReferralMethods.d.ts +4 -4
  75. package/dist/libraries/react/client/types/clientGenTypes.d.mts +4 -4
  76. package/dist/libraries/react/client/types/clientGenTypes.d.ts +4 -4
  77. package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.css +111 -116
  78. package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.d.mts +1 -1
  79. package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.d.ts +1 -1
  80. package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.js +76 -212
  81. package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.mjs +25 -25
  82. package/dist/libraries/react/components/attach-dialog/lib/attach-content.d.mts +1 -1
  83. package/dist/libraries/react/components/attach-dialog/lib/attach-content.d.ts +1 -1
  84. package/dist/libraries/react/components/check-dialog/check-dialog-synced.d.mts +1 -1
  85. package/dist/libraries/react/components/check-dialog/check-dialog-synced.d.ts +1 -1
  86. package/dist/libraries/react/components/check-dialog/check-dialog-synced.js +47 -169
  87. package/dist/libraries/react/components/check-dialog/check-dialog-synced.mjs +5 -5
  88. package/dist/libraries/react/components/check-dialog/lib/check-content.d.mts +1 -1
  89. package/dist/libraries/react/components/check-dialog/lib/check-content.d.ts +1 -1
  90. package/dist/libraries/react/components/pricing-table/pricing-table-synced.css +111 -116
  91. package/dist/libraries/react/components/pricing-table/pricing-table-synced.d.mts +1 -1
  92. package/dist/libraries/react/components/pricing-table/pricing-table-synced.d.ts +1 -1
  93. package/dist/libraries/react/components/pricing-table/pricing-table-synced.js +76 -215
  94. package/dist/libraries/react/components/pricing-table/pricing-table-synced.mjs +25 -25
  95. package/dist/libraries/react/components/ui/button.js +3 -3
  96. package/dist/libraries/react/components/ui/button.mjs +2 -2
  97. package/dist/libraries/react/components/ui/dialog.js +43 -157
  98. package/dist/libraries/react/components/ui/dialog.mjs +3 -3
  99. package/dist/libraries/react/components/ui/switch.js +12 -12
  100. package/dist/libraries/react/components/ui/switch.mjs +3 -3
  101. package/dist/libraries/react/{cusTypes-Bf1qr9iE.d.ts → cusTypes-CHcG59KG.d.mts} +4 -3
  102. package/dist/libraries/react/{cusTypes-Bf1qr9iE.d.mts → cusTypes-CHcG59KG.d.ts} +4 -3
  103. package/dist/libraries/react/{entTypes-CscyyE1A.d.mts → entTypes-3t7AbNhm.d.mts} +1 -1
  104. package/dist/libraries/react/{entTypes-O8YXxhrA.d.ts → entTypes-8-4TWxee.d.ts} +1 -1
  105. package/dist/libraries/react/hooks/handleAllowed.d.mts +2 -2
  106. package/dist/libraries/react/hooks/handleAllowed.d.ts +2 -2
  107. package/dist/libraries/react/hooks/useAutumn.d.mts +2 -2
  108. package/dist/libraries/react/hooks/useAutumn.d.ts +2 -2
  109. package/dist/libraries/react/hooks/useAutumn.js +5 -1
  110. package/dist/libraries/react/hooks/useAutumn.mjs +8 -8
  111. package/dist/libraries/react/hooks/useAutumnBase.d.mts +6 -5
  112. package/dist/libraries/react/hooks/useAutumnBase.d.ts +6 -5
  113. package/dist/libraries/react/hooks/useAutumnBase.js +5 -1
  114. package/dist/libraries/react/hooks/useAutumnBase.mjs +7 -7
  115. package/dist/libraries/react/hooks/useCustomer.d.mts +4 -4
  116. package/dist/libraries/react/hooks/useCustomer.d.ts +4 -4
  117. package/dist/libraries/react/hooks/useCustomer.js +7 -2
  118. package/dist/libraries/react/hooks/useCustomer.mjs +9 -9
  119. package/dist/libraries/react/hooks/useCustomerBase.d.mts +4 -4
  120. package/dist/libraries/react/hooks/useCustomerBase.d.ts +4 -4
  121. package/dist/libraries/react/hooks/useCustomerBase.js +7 -2
  122. package/dist/libraries/react/hooks/useCustomerBase.mjs +8 -8
  123. package/dist/libraries/react/hooks/useEntity.d.mts +3 -3
  124. package/dist/libraries/react/hooks/useEntity.d.ts +3 -3
  125. package/dist/libraries/react/hooks/useEntity.js +5 -1
  126. package/dist/libraries/react/hooks/useEntity.mjs +9 -9
  127. package/dist/libraries/react/hooks/useEntityBase.d.mts +4 -4
  128. package/dist/libraries/react/hooks/useEntityBase.d.ts +4 -4
  129. package/dist/libraries/react/hooks/useEntityBase.js +5 -1
  130. package/dist/libraries/react/hooks/useEntityBase.mjs +8 -8
  131. package/dist/libraries/react/hooks/usePricingTable.d.mts +1 -1
  132. package/dist/libraries/react/hooks/usePricingTable.d.ts +1 -1
  133. package/dist/libraries/react/hooks/usePricingTable.mjs +7 -7
  134. package/dist/libraries/react/hooks/usePricingTableBase.d.mts +4 -4
  135. package/dist/libraries/react/hooks/usePricingTableBase.d.ts +4 -4
  136. package/dist/libraries/react/hooks/usePricingTableBase.mjs +6 -6
  137. package/dist/libraries/react/hooks/useProductsBase.mjs +5 -5
  138. package/dist/libraries/react/index.d.mts +1 -0
  139. package/dist/libraries/react/index.d.ts +1 -0
  140. package/dist/libraries/react/index.js +80 -222
  141. package/dist/libraries/react/index.mjs +65 -207
  142. package/dist/libraries/react/{response-B4VzjWEU.d.mts → response-B8MYd86O.d.mts} +1 -1
  143. package/dist/libraries/react/{response-C3S90max.d.ts → response-DnJCkvfc.d.ts} +1 -1
  144. package/dist/next/{AutumnProvider-CCYZC_bN.d.mts → AutumnProvider-Xl1mqxls.d.mts} +1 -0
  145. package/dist/next/{AutumnProvider-CCYZC_bN.d.ts → AutumnProvider-Xl1mqxls.d.ts} +1 -0
  146. package/dist/next/AutumnProvider.d.mts +1 -1
  147. package/dist/next/AutumnProvider.d.ts +1 -1
  148. package/dist/next/client/NextAutumnClient.d.mts +7 -7
  149. package/dist/next/client/NextAutumnClient.d.ts +7 -7
  150. package/dist/next/client/NextAutumnProvider.d.mts +1 -1
  151. package/dist/next/client/NextAutumnProvider.d.ts +1 -1
  152. package/dist/next/client/{clientGenTypes-CxB4go6q.d.ts → clientGenTypes-Dx1TULjb.d.ts} +9 -9
  153. package/dist/next/client/{clientGenTypes-9ngy1q97.d.mts → clientGenTypes-tE8HbEdV.d.mts} +9 -9
  154. package/dist/next/client/clientUtils.d.mts +2 -2
  155. package/dist/next/client/clientUtils.d.ts +2 -2
  156. package/dist/next/client/{cusTypes-D8lhXGaX.d.mts → cusTypes-nWQygxXu.d.mts} +3 -2
  157. package/dist/next/client/{cusTypes-D8lhXGaX.d.ts → cusTypes-nWQygxXu.d.ts} +3 -2
  158. package/dist/next/client/{entTypes-Dq2mbehl.d.ts → entTypes-DDZyYuom.d.ts} +1 -1
  159. package/dist/next/client/{entTypes-B-2_9hzP.d.mts → entTypes-DusU3WqD.d.mts} +1 -1
  160. package/dist/next/client/hooks/useAutumn.d.mts +2 -2
  161. package/dist/next/client/hooks/useAutumn.d.ts +2 -2
  162. package/dist/next/client/hooks/useCustomer.d.mts +3 -3
  163. package/dist/next/client/hooks/useCustomer.d.ts +3 -3
  164. package/dist/next/client/hooks/useEntity.d.mts +3 -3
  165. package/dist/next/client/hooks/useEntity.d.ts +3 -3
  166. package/dist/next/client/hooks/usePricingTable.d.mts +1 -1
  167. package/dist/next/client/hooks/usePricingTable.d.ts +1 -1
  168. package/dist/next/client/types.d.mts +2 -2
  169. package/dist/next/client/types.d.ts +2 -2
  170. package/dist/next/index.d.mts +2 -2
  171. package/dist/next/index.d.ts +2 -2
  172. package/dist/next/server/auth/withNextAuth.d.mts +1 -1
  173. package/dist/next/server/auth/withNextAuth.d.ts +1 -1
  174. package/dist/next/server/componentActions.d.mts +1 -1
  175. package/dist/next/server/componentActions.d.ts +1 -1
  176. package/dist/next/server/cusActions.d.mts +3 -3
  177. package/dist/next/server/cusActions.d.ts +3 -3
  178. package/dist/next/server/{cusTypes-DhOYtM7H.d.mts → cusTypes-Tc189V9T.d.mts} +6 -1
  179. package/dist/next/server/{cusTypes-DhOYtM7H.d.ts → cusTypes-Tc189V9T.d.ts} +6 -1
  180. package/dist/next/server/genActions.d.mts +1 -1
  181. package/dist/next/server/genActions.d.ts +1 -1
  182. package/dist/sdk/index.d.mts +3 -2
  183. package/dist/sdk/index.d.ts +3 -2
  184. package/dist/styles/global.css +111 -116
  185. package/package.json +3 -24
  186. package/tsup.config.ts +0 -1
  187. package/dist/libraries/backend/{chunk-NW6B7QXB.mjs → chunk-YFWJ6E4U.mjs} +6 -6
  188. package/dist/libraries/react/{chunk-ALFXUHDD.mjs → chunk-CYW4LNFZ.mjs} +9 -9
@@ -1,69 +1,17 @@
1
- // src/compose/models/core.ts
2
- import { z } from "zod";
3
- var ProductItemInterval = /* @__PURE__ */ ((ProductItemInterval3) => {
4
- ProductItemInterval3["Minute"] = "minute";
5
- ProductItemInterval3["Hour"] = "hour";
6
- ProductItemInterval3["Day"] = "day";
7
- ProductItemInterval3["Week"] = "week";
8
- ProductItemInterval3["Month"] = "month";
9
- ProductItemInterval3["Quarter"] = "quarter";
10
- ProductItemInterval3["SemiAnnual"] = "semi_annual";
11
- ProductItemInterval3["Year"] = "year";
12
- return ProductItemInterval3;
13
- })(ProductItemInterval || {});
14
- var UsageModel = /* @__PURE__ */ ((UsageModel2) => {
15
- UsageModel2["Prepaid"] = "prepaid";
16
- UsageModel2["PayPerUse"] = "pay_per_use";
17
- return UsageModel2;
18
- })(UsageModel || {});
19
- var ProductItemSchema = z.object({
20
- // Feature stuff
21
- type: z.enum(["feature", "priced_feature"]).nullish(),
22
- feature_id: z.string().nullish(),
23
- included_usage: z.union([z.number(), z.literal("inf")]).nullish(),
24
- interval: z.nativeEnum(ProductItemInterval).nullish(),
25
- // Price config
26
- usage_model: z.nativeEnum(UsageModel).nullish(),
27
- price: z.number().nullish(),
28
- billing_units: z.number().nullish()
29
- // amount per billing unit (eg. $9 / 250 units)
30
- });
31
- var ProductSchema = z.object({
32
- id: z.string().nonempty(),
33
- name: z.string().nonempty(),
34
- is_add_on: z.boolean().default(false).optional(),
35
- is_default: z.boolean().default(false).optional(),
36
- items: z.array(ProductItemSchema)
37
- });
38
- var FeatureSchema = z.object({
39
- id: z.string().nonempty(),
40
- name: z.string().nonempty(),
41
- type: z.enum(["boolean", "continuous_use", "credit_system", "metered"]),
42
- display: z.object({
43
- singular: z.string(),
44
- plural: z.string()
45
- }),
46
- credit_schema: z.array(
47
- z.object({
48
- metered_feature_id: z.string(),
49
- credit_cost: z.number()
50
- })
51
- ).nullish()
52
- });
53
-
54
- // src/compose/builders/core.ts
1
+ // src/compose/builders/builderFunctions.ts
55
2
  var product = (p) => p;
56
- var auth = (info) => info;
57
- function feature(f) {
58
- let f_ = f;
59
- if (!f_.display) {
60
- f_.display = {
61
- singular: f_.name,
62
- plural: f_.name
63
- };
64
- }
65
- return f_;
66
- }
3
+ var feature = (f) => f;
4
+ var featureItem = ({
5
+ feature_id,
6
+ included_usage,
7
+ interval
8
+ }) => {
9
+ return {
10
+ included_usage,
11
+ feature_id,
12
+ interval
13
+ };
14
+ };
67
15
  var priceItem = ({
68
16
  price,
69
17
  interval
@@ -79,7 +27,7 @@ var pricedFeatureItem = ({
79
27
  interval,
80
28
  included_usage = void 0,
81
29
  billing_units = 1,
82
- usage_model = "prepaid" /* Prepaid */
30
+ usage_model = "pay_per_use"
83
31
  }) => {
84
32
  return {
85
33
  price,
@@ -90,21 +38,7 @@ var pricedFeatureItem = ({
90
38
  included_usage
91
39
  };
92
40
  };
93
- var featureItem = ({
94
- feature_id,
95
- included_usage,
96
- interval
97
- }) => {
98
- return {
99
- included_usage,
100
- interval,
101
- feature_id
102
- };
103
- };
104
41
  export {
105
- ProductItemInterval,
106
- UsageModel,
107
- auth,
108
42
  feature,
109
43
  featureItem,
110
44
  priceItem,
@@ -130,13 +130,13 @@ declare const autumn: (options?: {
130
130
  attach: {
131
131
  <AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
132
132
  body: {
133
- entity_id?: string | undefined;
134
133
  options?: {
135
134
  feature_id: string;
136
135
  quantity: number;
137
136
  }[] | undefined;
138
137
  metadata?: Record<string, string> | undefined;
139
138
  product_id?: string | undefined;
139
+ entity_id?: string | undefined;
140
140
  product_ids?: string[] | undefined;
141
141
  free_trial?: boolean | undefined;
142
142
  success_url?: string | undefined;
@@ -194,13 +194,13 @@ declare const autumn: (options?: {
194
194
  checkout_session_params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
195
195
  reward: z.ZodOptional<z.ZodString>;
196
196
  }, "customer_id">, "strip", z.ZodTypeAny, {
197
- entity_id?: string | undefined;
198
197
  options?: {
199
198
  feature_id: string;
200
199
  quantity: number;
201
200
  }[] | undefined;
202
201
  metadata?: Record<string, string> | undefined;
203
202
  product_id?: string | undefined;
203
+ entity_id?: string | undefined;
204
204
  product_ids?: string[] | undefined;
205
205
  free_trial?: boolean | undefined;
206
206
  success_url?: string | undefined;
@@ -210,13 +210,13 @@ declare const autumn: (options?: {
210
210
  checkout_session_params?: Record<string, any> | undefined;
211
211
  reward?: string | undefined;
212
212
  }, {
213
- entity_id?: string | undefined;
214
213
  options?: {
215
214
  feature_id: string;
216
215
  quantity: number;
217
216
  }[] | undefined;
218
217
  metadata?: Record<string, string> | undefined;
219
218
  product_id?: string | undefined;
219
+ entity_id?: string | undefined;
220
220
  product_ids?: string[] | undefined;
221
221
  free_trial?: boolean | undefined;
222
222
  success_url?: string | undefined;
@@ -257,15 +257,15 @@ declare const autumn: (options?: {
257
257
  check: {
258
258
  <AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
259
259
  body: {
260
- feature_id?: string | undefined;
261
- entity_id?: string | undefined;
262
- required_balance?: number | undefined;
263
260
  product_id?: string | undefined;
261
+ entity_id?: string | undefined;
262
+ feature_id?: string | undefined;
264
263
  customer_data?: any;
265
264
  entity_data?: {
266
265
  feature_id: string;
267
266
  name?: string | undefined;
268
267
  } | undefined;
268
+ required_balance?: number | undefined;
269
269
  send_event?: boolean | undefined;
270
270
  with_preview?: boolean | undefined;
271
271
  };
@@ -313,27 +313,27 @@ declare const autumn: (options?: {
313
313
  name?: string | undefined;
314
314
  }>>;
315
315
  }, "customer_id">, "strip", z.ZodTypeAny, {
316
- feature_id?: string | undefined;
317
- entity_id?: string | undefined;
318
- required_balance?: number | undefined;
319
316
  product_id?: string | undefined;
317
+ entity_id?: string | undefined;
318
+ feature_id?: string | undefined;
320
319
  customer_data?: any;
321
320
  entity_data?: {
322
321
  feature_id: string;
323
322
  name?: string | undefined;
324
323
  } | undefined;
324
+ required_balance?: number | undefined;
325
325
  send_event?: boolean | undefined;
326
326
  with_preview?: boolean | undefined;
327
327
  }, {
328
- feature_id?: string | undefined;
329
- entity_id?: string | undefined;
330
- required_balance?: number | undefined;
331
328
  product_id?: string | undefined;
329
+ entity_id?: string | undefined;
330
+ feature_id?: string | undefined;
332
331
  customer_data?: any;
333
332
  entity_data?: {
334
333
  feature_id: string;
335
334
  name?: string | undefined;
336
335
  } | undefined;
336
+ required_balance?: number | undefined;
337
337
  send_event?: boolean | undefined;
338
338
  with_preview?: boolean | undefined;
339
339
  }>;
@@ -368,9 +368,9 @@ declare const autumn: (options?: {
368
368
  track: {
369
369
  <AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
370
370
  body: {
371
- feature_id?: string | undefined;
372
- entity_id?: string | undefined;
373
371
  value?: number | undefined;
372
+ entity_id?: string | undefined;
373
+ feature_id?: string | undefined;
374
374
  customer_data?: any;
375
375
  entity_data?: any;
376
376
  event_name?: string | undefined;
@@ -410,17 +410,17 @@ declare const autumn: (options?: {
410
410
  idempotency_key: z.ZodOptional<z.ZodString>;
411
411
  entity_data: z.ZodOptional<z.ZodAny>;
412
412
  }, "customer_id">, "strip", z.ZodTypeAny, {
413
- feature_id?: string | undefined;
414
- entity_id?: string | undefined;
415
413
  value?: number | undefined;
414
+ entity_id?: string | undefined;
415
+ feature_id?: string | undefined;
416
416
  customer_data?: any;
417
417
  entity_data?: any;
418
418
  event_name?: string | undefined;
419
419
  idempotency_key?: string | undefined;
420
420
  }, {
421
- feature_id?: string | undefined;
422
- entity_id?: string | undefined;
423
421
  value?: number | undefined;
422
+ entity_id?: string | undefined;
423
+ feature_id?: string | undefined;
424
424
  customer_data?: any;
425
425
  entity_data?: any;
426
426
  event_name?: string | undefined;
@@ -130,13 +130,13 @@ declare const autumn: (options?: {
130
130
  attach: {
131
131
  <AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
132
132
  body: {
133
- entity_id?: string | undefined;
134
133
  options?: {
135
134
  feature_id: string;
136
135
  quantity: number;
137
136
  }[] | undefined;
138
137
  metadata?: Record<string, string> | undefined;
139
138
  product_id?: string | undefined;
139
+ entity_id?: string | undefined;
140
140
  product_ids?: string[] | undefined;
141
141
  free_trial?: boolean | undefined;
142
142
  success_url?: string | undefined;
@@ -194,13 +194,13 @@ declare const autumn: (options?: {
194
194
  checkout_session_params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
195
195
  reward: z.ZodOptional<z.ZodString>;
196
196
  }, "customer_id">, "strip", z.ZodTypeAny, {
197
- entity_id?: string | undefined;
198
197
  options?: {
199
198
  feature_id: string;
200
199
  quantity: number;
201
200
  }[] | undefined;
202
201
  metadata?: Record<string, string> | undefined;
203
202
  product_id?: string | undefined;
203
+ entity_id?: string | undefined;
204
204
  product_ids?: string[] | undefined;
205
205
  free_trial?: boolean | undefined;
206
206
  success_url?: string | undefined;
@@ -210,13 +210,13 @@ declare const autumn: (options?: {
210
210
  checkout_session_params?: Record<string, any> | undefined;
211
211
  reward?: string | undefined;
212
212
  }, {
213
- entity_id?: string | undefined;
214
213
  options?: {
215
214
  feature_id: string;
216
215
  quantity: number;
217
216
  }[] | undefined;
218
217
  metadata?: Record<string, string> | undefined;
219
218
  product_id?: string | undefined;
219
+ entity_id?: string | undefined;
220
220
  product_ids?: string[] | undefined;
221
221
  free_trial?: boolean | undefined;
222
222
  success_url?: string | undefined;
@@ -257,15 +257,15 @@ declare const autumn: (options?: {
257
257
  check: {
258
258
  <AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
259
259
  body: {
260
- feature_id?: string | undefined;
261
- entity_id?: string | undefined;
262
- required_balance?: number | undefined;
263
260
  product_id?: string | undefined;
261
+ entity_id?: string | undefined;
262
+ feature_id?: string | undefined;
264
263
  customer_data?: any;
265
264
  entity_data?: {
266
265
  feature_id: string;
267
266
  name?: string | undefined;
268
267
  } | undefined;
268
+ required_balance?: number | undefined;
269
269
  send_event?: boolean | undefined;
270
270
  with_preview?: boolean | undefined;
271
271
  };
@@ -313,27 +313,27 @@ declare const autumn: (options?: {
313
313
  name?: string | undefined;
314
314
  }>>;
315
315
  }, "customer_id">, "strip", z.ZodTypeAny, {
316
- feature_id?: string | undefined;
317
- entity_id?: string | undefined;
318
- required_balance?: number | undefined;
319
316
  product_id?: string | undefined;
317
+ entity_id?: string | undefined;
318
+ feature_id?: string | undefined;
320
319
  customer_data?: any;
321
320
  entity_data?: {
322
321
  feature_id: string;
323
322
  name?: string | undefined;
324
323
  } | undefined;
324
+ required_balance?: number | undefined;
325
325
  send_event?: boolean | undefined;
326
326
  with_preview?: boolean | undefined;
327
327
  }, {
328
- feature_id?: string | undefined;
329
- entity_id?: string | undefined;
330
- required_balance?: number | undefined;
331
328
  product_id?: string | undefined;
329
+ entity_id?: string | undefined;
330
+ feature_id?: string | undefined;
332
331
  customer_data?: any;
333
332
  entity_data?: {
334
333
  feature_id: string;
335
334
  name?: string | undefined;
336
335
  } | undefined;
336
+ required_balance?: number | undefined;
337
337
  send_event?: boolean | undefined;
338
338
  with_preview?: boolean | undefined;
339
339
  }>;
@@ -368,9 +368,9 @@ declare const autumn: (options?: {
368
368
  track: {
369
369
  <AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
370
370
  body: {
371
- feature_id?: string | undefined;
372
- entity_id?: string | undefined;
373
371
  value?: number | undefined;
372
+ entity_id?: string | undefined;
373
+ feature_id?: string | undefined;
374
374
  customer_data?: any;
375
375
  entity_data?: any;
376
376
  event_name?: string | undefined;
@@ -410,17 +410,17 @@ declare const autumn: (options?: {
410
410
  idempotency_key: z.ZodOptional<z.ZodString>;
411
411
  entity_data: z.ZodOptional<z.ZodAny>;
412
412
  }, "customer_id">, "strip", z.ZodTypeAny, {
413
- feature_id?: string | undefined;
414
- entity_id?: string | undefined;
415
413
  value?: number | undefined;
414
+ entity_id?: string | undefined;
415
+ feature_id?: string | undefined;
416
416
  customer_data?: any;
417
417
  entity_data?: any;
418
418
  event_name?: string | undefined;
419
419
  idempotency_key?: string | undefined;
420
420
  }, {
421
- feature_id?: string | undefined;
422
- entity_id?: string | undefined;
423
421
  value?: number | undefined;
422
+ entity_id?: string | undefined;
423
+ feature_id?: string | undefined;
424
424
  customer_data?: any;
425
425
  entity_data?: any;
426
426
  event_name?: string | undefined;
@@ -3,11 +3,11 @@ import {
3
3
  } from "./chunk-UNZHJTEY.mjs";
4
4
  import {
5
5
  createRouterWithOptions
6
- } from "./chunk-NW6B7QXB.mjs";
7
- import "./chunk-AKV5N4WO.mjs";
8
- import "./chunk-33NT3WE5.mjs";
6
+ } from "./chunk-YFWJ6E4U.mjs";
9
7
  import "./chunk-RA4AC56B.mjs";
10
8
  import "./chunk-J3L3OBSS.mjs";
9
+ import "./chunk-AKV5N4WO.mjs";
10
+ import "./chunk-33NT3WE5.mjs";
11
11
  import "./chunk-CEZHD5H6.mjs";
12
12
  import {
13
13
  AttachParamsSchema,
@@ -3,11 +3,11 @@ import {
3
3
  } from "./chunk-UNZHJTEY.mjs";
4
4
  import {
5
5
  createRouterWithOptions
6
- } from "./chunk-NW6B7QXB.mjs";
7
- import "./chunk-AKV5N4WO.mjs";
8
- import "./chunk-33NT3WE5.mjs";
6
+ } from "./chunk-YFWJ6E4U.mjs";
9
7
  import "./chunk-RA4AC56B.mjs";
10
8
  import "./chunk-J3L3OBSS.mjs";
9
+ import "./chunk-AKV5N4WO.mjs";
10
+ import "./chunk-33NT3WE5.mjs";
11
11
  import "./chunk-CEZHD5H6.mjs";
12
12
  import {
13
13
  Autumn
@@ -2,7 +2,7 @@ import { AuthResult } from './utils/AuthFunction.mjs';
2
2
  import { Context, Elysia } from 'elysia';
3
3
 
4
4
  declare function autumnHandler<ContextType extends Context = Context>(options: {
5
- identify: (context: ContextType) => AuthResult;
5
+ identify: (context: ContextType) => AuthResult | Promise<AuthResult>;
6
6
  version?: string;
7
7
  secretKey?: string;
8
8
  url?: string;
@@ -2,7 +2,7 @@ import { AuthResult } from './utils/AuthFunction.js';
2
2
  import { Context, Elysia } from 'elysia';
3
3
 
4
4
  declare function autumnHandler<ContextType extends Context = Context>(options: {
5
- identify: (context: ContextType) => AuthResult;
5
+ identify: (context: ContextType) => AuthResult | Promise<AuthResult>;
6
6
  version?: string;
7
7
  secretKey?: string;
8
8
  url?: string;
@@ -3,11 +3,11 @@ import {
3
3
  } from "./chunk-UNZHJTEY.mjs";
4
4
  import {
5
5
  createRouterWithOptions
6
- } from "./chunk-NW6B7QXB.mjs";
7
- import "./chunk-AKV5N4WO.mjs";
8
- import "./chunk-33NT3WE5.mjs";
6
+ } from "./chunk-YFWJ6E4U.mjs";
9
7
  import "./chunk-RA4AC56B.mjs";
10
8
  import "./chunk-J3L3OBSS.mjs";
9
+ import "./chunk-AKV5N4WO.mjs";
10
+ import "./chunk-33NT3WE5.mjs";
11
11
  import "./chunk-CEZHD5H6.mjs";
12
12
  import {
13
13
  Autumn
@@ -1,4 +1,4 @@
1
- import { A as Autumn } from './referralTypes-Dg9pRvI7.mjs';
1
+ import { A as Autumn } from './referralTypes-DcDxMGTp.mjs';
2
2
  import { AuthResult } from './utils/AuthFunction.mjs';
3
3
  import 'zod';
4
4
  import './response-CV6KGWH5.mjs';
@@ -1,4 +1,4 @@
1
- import { A as Autumn } from './referralTypes-HAk2vTns.js';
1
+ import { A as Autumn } from './referralTypes-DV8s1h8w.js';
2
2
  import { AuthResult } from './utils/AuthFunction.js';
3
3
  import 'zod';
4
4
  import './response-CV6KGWH5.js';
@@ -3,11 +3,11 @@ import {
3
3
  } from "./chunk-UNZHJTEY.mjs";
4
4
  import {
5
5
  createRouterWithOptions
6
- } from "./chunk-NW6B7QXB.mjs";
7
- import "./chunk-AKV5N4WO.mjs";
8
- import "./chunk-33NT3WE5.mjs";
6
+ } from "./chunk-YFWJ6E4U.mjs";
9
7
  import "./chunk-RA4AC56B.mjs";
10
8
  import "./chunk-J3L3OBSS.mjs";
9
+ import "./chunk-AKV5N4WO.mjs";
10
+ import "./chunk-33NT3WE5.mjs";
11
11
  import "./chunk-CEZHD5H6.mjs";
12
12
  import {
13
13
  Autumn
@@ -3,11 +3,11 @@ import {
3
3
  } from "./chunk-UNZHJTEY.mjs";
4
4
  import {
5
5
  createRouterWithOptions
6
- } from "./chunk-NW6B7QXB.mjs";
7
- import "./chunk-AKV5N4WO.mjs";
8
- import "./chunk-33NT3WE5.mjs";
6
+ } from "./chunk-YFWJ6E4U.mjs";
9
7
  import "./chunk-RA4AC56B.mjs";
10
8
  import "./chunk-J3L3OBSS.mjs";
9
+ import "./chunk-AKV5N4WO.mjs";
10
+ import "./chunk-33NT3WE5.mjs";
11
11
  import "./chunk-CEZHD5H6.mjs";
12
12
  import {
13
13
  Autumn
@@ -3,11 +3,11 @@ import {
3
3
  } from "./chunk-UNZHJTEY.mjs";
4
4
  import {
5
5
  createRouterWithOptions
6
- } from "./chunk-NW6B7QXB.mjs";
7
- import "./chunk-AKV5N4WO.mjs";
8
- import "./chunk-33NT3WE5.mjs";
6
+ } from "./chunk-YFWJ6E4U.mjs";
9
7
  import "./chunk-RA4AC56B.mjs";
10
8
  import "./chunk-J3L3OBSS.mjs";
9
+ import "./chunk-AKV5N4WO.mjs";
10
+ import "./chunk-33NT3WE5.mjs";
11
11
  import "./chunk-CEZHD5H6.mjs";
12
12
  import {
13
13
  Autumn