autumn-js 0.0.110 → 0.0.111

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 (140) hide show
  1. package/dist/libraries/backend/better-auth.d.mts +18 -18
  2. package/dist/libraries/backend/better-auth.d.ts +18 -18
  3. package/dist/libraries/backend/express.d.mts +1 -1
  4. package/dist/libraries/backend/express.d.ts +1 -1
  5. package/dist/libraries/backend/utils/withAuth.d.mts +1 -1
  6. package/dist/libraries/backend/utils/withAuth.d.ts +1 -1
  7. package/dist/libraries/react/AutumnContext.d.mts +6 -6
  8. package/dist/libraries/react/AutumnContext.d.ts +6 -6
  9. package/dist/libraries/react/AutumnContext.mjs +6 -6
  10. package/dist/libraries/react/BaseAutumnProvider.d.mts +6 -6
  11. package/dist/libraries/react/BaseAutumnProvider.d.ts +6 -6
  12. package/dist/libraries/react/BaseAutumnProvider.js +16 -10
  13. package/dist/libraries/react/BaseAutumnProvider.mjs +9 -9
  14. package/dist/libraries/react/{ReactAutumnClient-Cf3-brZx.d.ts → ReactAutumnClient-BW-6a3gM.d.ts} +5 -5
  15. package/dist/libraries/react/{ReactAutumnClient-C4CPCKrp.d.mts → ReactAutumnClient-Cs9voLwk.d.mts} +5 -5
  16. package/dist/libraries/react/ReactAutumnProvider.d.mts +2 -2
  17. package/dist/libraries/react/ReactAutumnProvider.d.ts +2 -2
  18. package/dist/libraries/react/ReactAutumnProvider.js +16 -10
  19. package/dist/libraries/react/ReactAutumnProvider.mjs +10 -10
  20. package/dist/libraries/react/{attachTypes-C1BZ4HNs.d.mts → attachTypes-4AuOXG1E.d.mts} +1 -1
  21. package/dist/libraries/react/{attachTypes-BKzcsvuA.d.ts → attachTypes-DWeMSBmL.d.ts} +1 -1
  22. package/dist/libraries/react/{chunk-T4Z5BKOW.mjs → chunk-673LDIYO.mjs} +3 -3
  23. package/dist/libraries/react/{chunk-FE5GYL7P.mjs → chunk-6ZY2HQCJ.mjs} +2 -2
  24. package/dist/libraries/react/{chunk-2FMO4MDR.mjs → chunk-7BVXQ3DF.mjs} +2 -2
  25. package/dist/libraries/react/{chunk-RMR7LP6D.mjs → chunk-AGQVYTPY.mjs} +18 -18
  26. package/dist/libraries/react/{chunk-MIITU3Q2.mjs → chunk-CK7IHYXM.mjs} +6 -6
  27. package/dist/libraries/react/{chunk-V2XCEJ4T.mjs → chunk-J7CZEH52.mjs} +1 -1
  28. package/dist/libraries/react/{chunk-3LLAOCW3.mjs → chunk-KX42ZLE6.mjs} +12 -6
  29. package/dist/libraries/react/{chunk-PDCSW5VX.mjs → chunk-S7DJFJ6P.mjs} +1 -1
  30. package/dist/libraries/react/{chunk-2H7G6M6Z.mjs → chunk-THV76QT6.mjs} +1 -1
  31. package/dist/libraries/react/{chunk-K7IJMDIV.mjs → chunk-UJHH6JP6.mjs} +1 -1
  32. package/dist/libraries/react/{chunk-3GZZXL6J.mjs → chunk-WR2HU2B2.mjs} +3 -3
  33. package/dist/libraries/react/{chunk-OXPO56ZD.mjs → chunk-YN4HCDGX.mjs} +1 -1
  34. package/dist/libraries/react/client/ReactAutumnClient.d.mts +6 -6
  35. package/dist/libraries/react/client/ReactAutumnClient.d.ts +6 -6
  36. package/dist/libraries/react/client/ReactAutumnClient.mjs +5 -5
  37. package/dist/libraries/react/client/clientCompMethods.d.mts +6 -6
  38. package/dist/libraries/react/client/clientCompMethods.d.ts +6 -6
  39. package/dist/libraries/react/client/clientCusMethods.d.mts +6 -6
  40. package/dist/libraries/react/client/clientCusMethods.d.ts +6 -6
  41. package/dist/libraries/react/client/clientEntityMethods.d.mts +6 -6
  42. package/dist/libraries/react/client/clientEntityMethods.d.ts +6 -6
  43. package/dist/libraries/react/client/clientGenMethods.d.mts +6 -6
  44. package/dist/libraries/react/client/clientGenMethods.d.ts +6 -6
  45. package/dist/libraries/react/client/clientProdMethods.d.mts +6 -6
  46. package/dist/libraries/react/client/clientProdMethods.d.ts +6 -6
  47. package/dist/libraries/react/client/clientReferralMethods.d.mts +6 -6
  48. package/dist/libraries/react/client/clientReferralMethods.d.ts +6 -6
  49. package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.d.mts +2 -2
  50. package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.d.ts +2 -2
  51. package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.js +16 -10
  52. package/dist/libraries/react/components/attach-dialog/attach-dialog-synced.mjs +22 -22
  53. package/dist/libraries/react/components/attach-dialog/lib/attach-content.d.mts +2 -2
  54. package/dist/libraries/react/components/attach-dialog/lib/attach-content.d.ts +2 -2
  55. package/dist/libraries/react/components/check-dialog/check-dialog-synced.mjs +22 -22
  56. package/dist/libraries/react/components/check-dialog/lib/check-content.d.mts +1 -1
  57. package/dist/libraries/react/components/check-dialog/lib/check-content.d.ts +1 -1
  58. package/dist/libraries/react/components/pricing-table/lib/pricing-table-content.d.mts +1 -1
  59. package/dist/libraries/react/components/pricing-table/lib/pricing-table-content.d.ts +1 -1
  60. package/dist/libraries/react/components/pricing-table/pricing-table-synced.d.mts +1 -1
  61. package/dist/libraries/react/components/pricing-table/pricing-table-synced.d.ts +1 -1
  62. package/dist/libraries/react/components/pricing-table/pricing-table-synced.js +16 -10
  63. package/dist/libraries/react/components/pricing-table/pricing-table-synced.mjs +22 -22
  64. package/dist/libraries/react/{cusTypes-DmFGAdnp.d.mts → cusTypes-BnKb-vxP.d.mts} +1 -1
  65. package/dist/libraries/react/{cusTypes-DG6zrQYk.d.ts → cusTypes-CWMup6bJ.d.ts} +1 -1
  66. package/dist/libraries/react/{entTypes-DG9rJhum.d.ts → entTypes-B0UaW3Jh.d.ts} +2 -2
  67. package/dist/libraries/react/{entTypes-BbmxlLGb.d.mts → entTypes-BqZEH0S_.d.mts} +2 -2
  68. package/dist/libraries/react/{genTypes-CHD2Kdqf.d.ts → genTypes-CNkoakWD.d.ts} +1 -1
  69. package/dist/libraries/react/{genTypes-CHerQ_Ka.d.mts → genTypes-DufheKvo.d.mts} +1 -1
  70. package/dist/libraries/react/hooks/helpers/handleCheck.d.mts +11 -8
  71. package/dist/libraries/react/hooks/helpers/handleCheck.d.ts +11 -8
  72. package/dist/libraries/react/hooks/helpers/handleCheck.js +12 -6
  73. package/dist/libraries/react/hooks/helpers/handleCheck.mjs +1 -1
  74. package/dist/libraries/react/hooks/helpers/useAutumnBase.d.mts +7 -7
  75. package/dist/libraries/react/hooks/helpers/useAutumnBase.d.ts +7 -7
  76. package/dist/libraries/react/hooks/useAnalytics.d.mts +2 -2
  77. package/dist/libraries/react/hooks/useAnalytics.d.ts +2 -2
  78. package/dist/libraries/react/hooks/useAnalytics.mjs +7 -7
  79. package/dist/libraries/react/hooks/useCustomer.d.mts +6 -6
  80. package/dist/libraries/react/hooks/useCustomer.d.ts +6 -6
  81. package/dist/libraries/react/hooks/useCustomer.js +16 -10
  82. package/dist/libraries/react/hooks/useCustomer.mjs +9 -9
  83. package/dist/libraries/react/hooks/useCustomerBase.d.mts +7 -7
  84. package/dist/libraries/react/hooks/useCustomerBase.d.ts +7 -7
  85. package/dist/libraries/react/hooks/useCustomerBase.js +16 -10
  86. package/dist/libraries/react/hooks/useCustomerBase.mjs +8 -8
  87. package/dist/libraries/react/hooks/useEntity.d.mts +10 -7
  88. package/dist/libraries/react/hooks/useEntity.d.ts +10 -7
  89. package/dist/libraries/react/hooks/useEntity.js +13 -7
  90. package/dist/libraries/react/hooks/useEntity.mjs +9 -9
  91. package/dist/libraries/react/hooks/useEntityBase.d.mts +12 -9
  92. package/dist/libraries/react/hooks/useEntityBase.d.ts +12 -9
  93. package/dist/libraries/react/hooks/useEntityBase.js +13 -7
  94. package/dist/libraries/react/hooks/useEntityBase.mjs +8 -8
  95. package/dist/libraries/react/hooks/usePaywall.d.mts +1 -1
  96. package/dist/libraries/react/hooks/usePaywall.d.ts +1 -1
  97. package/dist/libraries/react/hooks/usePaywall.mjs +7 -7
  98. package/dist/libraries/react/hooks/usePricingTable.d.mts +1 -1
  99. package/dist/libraries/react/hooks/usePricingTable.d.ts +1 -1
  100. package/dist/libraries/react/hooks/usePricingTable.mjs +7 -7
  101. package/dist/libraries/react/hooks/usePricingTableBase.d.mts +6 -6
  102. package/dist/libraries/react/hooks/usePricingTableBase.d.ts +6 -6
  103. package/dist/libraries/react/hooks/useProductsBase.d.mts +6 -6
  104. package/dist/libraries/react/hooks/useProductsBase.d.ts +6 -6
  105. package/dist/libraries/react/index.d.mts +5 -2
  106. package/dist/libraries/react/index.d.ts +5 -2
  107. package/dist/libraries/react/index.js +17 -11
  108. package/dist/libraries/react/index.mjs +17 -11
  109. package/dist/libraries/react/{prodTypes-Mrr6azoz.d.mts → prodTypes-BlLYTHoR.d.mts} +1 -1
  110. package/dist/libraries/react/{prodTypes-Mrr6azoz.d.ts → prodTypes-BlLYTHoR.d.ts} +1 -1
  111. package/dist/next/client/NextAutumnClient.d.mts +6 -6
  112. package/dist/next/client/NextAutumnClient.d.ts +6 -6
  113. package/dist/next/client/NextAutumnProvider.d.mts +1 -1
  114. package/dist/next/client/NextAutumnProvider.d.ts +1 -1
  115. package/dist/next/client/{clientAttachTypes-SPRZ0-u3.d.ts → clientAttachTypes-BeoVoLvx.d.ts} +3 -3
  116. package/dist/next/client/{clientAttachTypes-Dde-B-ga.d.mts → clientAttachTypes-CWF6N5NJ.d.mts} +3 -3
  117. package/dist/next/client/clientUtils.d.mts +2 -2
  118. package/dist/next/client/clientUtils.d.ts +2 -2
  119. package/dist/next/client/{entTypes-DzTUirPM.d.mts → entTypes-CKUB-m_4.d.mts} +1 -1
  120. package/dist/next/client/{entTypes-BYx5xBXO.d.ts → entTypes-DTHm0Be2.d.ts} +1 -1
  121. package/dist/next/client/hooks/useAutumn.d.mts +3 -3
  122. package/dist/next/client/hooks/useAutumn.d.ts +3 -3
  123. package/dist/next/client/hooks/useCustomer.d.mts +5 -5
  124. package/dist/next/client/hooks/useCustomer.d.ts +5 -5
  125. package/dist/next/client/hooks/useEntity.d.mts +7 -4
  126. package/dist/next/client/hooks/useEntity.d.ts +7 -4
  127. package/dist/next/client/types.d.mts +2 -2
  128. package/dist/next/client/types.d.ts +2 -2
  129. package/dist/next/index.d.mts +5 -2
  130. package/dist/next/index.d.ts +5 -2
  131. package/dist/sdk/index.d.mts +1 -1
  132. package/dist/sdk/index.d.ts +1 -1
  133. package/package.json +1 -1
  134. package/dist/libraries/backend/{referralTypes-CpEs5id9.d.mts → referralTypes-C9zChWVP.d.mts} +35 -35
  135. package/dist/libraries/backend/{referralTypes-PV0SFnx_.d.ts → referralTypes-DuBjp_OL.d.ts} +35 -35
  136. package/dist/libraries/react/{chunk-MS4UEBVX.mjs → chunk-EEEUDTTP.mjs} +16 -16
  137. package/dist/next/client/{attachTypes-DJ4Lz7dN.d.ts → attachTypes-DM5XWLRr.d.ts} +2 -2
  138. package/dist/next/client/{attachTypes-Hja4wFD-.d.mts → attachTypes-Pf0NPwsI.d.mts} +2 -2
  139. package/dist/next/client/{cusTypes-CkonzuMA.d.mts → cusTypes-Dv_i9zPh.d.mts} +2 -2
  140. package/dist/next/client/{cusTypes-CGQNbPsC.d.ts → cusTypes-QmO8mj7R.d.ts} +2 -2
@@ -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;
133
134
  options?: {
134
135
  feature_id: string;
135
136
  quantity: number;
136
137
  }[] | undefined;
137
138
  metadata?: Record<string, string> | undefined;
138
139
  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;
@@ -210,13 +210,13 @@ declare const autumn: (options?: {
210
210
  checkout_session_params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
211
211
  reward: z.ZodOptional<z.ZodString>;
212
212
  }, "customer_id">, "strip", z.ZodTypeAny, {
213
+ entity_id?: string | undefined;
213
214
  options?: {
214
215
  feature_id: string;
215
216
  quantity: number;
216
217
  }[] | undefined;
217
218
  metadata?: Record<string, string> | undefined;
218
219
  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;
@@ -230,13 +230,13 @@ declare const autumn: (options?: {
230
230
  checkout_session_params?: Record<string, any> | undefined;
231
231
  reward?: string | undefined;
232
232
  }, {
233
+ entity_id?: string | undefined;
233
234
  options?: {
234
235
  feature_id: string;
235
236
  quantity: number;
236
237
  }[] | undefined;
237
238
  metadata?: Record<string, string> | undefined;
238
239
  product_id?: string | undefined;
239
- entity_id?: string | undefined;
240
240
  product_ids?: string[] | undefined;
241
241
  free_trial?: boolean | undefined;
242
242
  success_url?: string | undefined;
@@ -281,15 +281,15 @@ declare const autumn: (options?: {
281
281
  check: {
282
282
  <AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
283
283
  body: {
284
- product_id?: string | undefined;
285
- entity_id?: string | undefined;
286
284
  feature_id?: string | undefined;
285
+ entity_id?: string | undefined;
286
+ required_balance?: number | undefined;
287
+ product_id?: string | undefined;
287
288
  customer_data?: any;
288
289
  entity_data?: {
289
290
  feature_id: string;
290
291
  name?: string | undefined;
291
292
  } | undefined;
292
- required_balance?: number | undefined;
293
293
  send_event?: boolean | undefined;
294
294
  with_preview?: boolean | undefined;
295
295
  };
@@ -337,27 +337,27 @@ declare const autumn: (options?: {
337
337
  name?: string | undefined;
338
338
  }>>;
339
339
  }, "customer_id">, "strip", z.ZodTypeAny, {
340
- product_id?: string | undefined;
341
- entity_id?: string | undefined;
342
340
  feature_id?: string | undefined;
341
+ entity_id?: string | undefined;
342
+ required_balance?: number | undefined;
343
+ product_id?: string | undefined;
343
344
  customer_data?: any;
344
345
  entity_data?: {
345
346
  feature_id: string;
346
347
  name?: string | undefined;
347
348
  } | undefined;
348
- required_balance?: number | undefined;
349
349
  send_event?: boolean | undefined;
350
350
  with_preview?: boolean | undefined;
351
351
  }, {
352
- product_id?: string | undefined;
353
- entity_id?: string | undefined;
354
352
  feature_id?: string | undefined;
353
+ entity_id?: string | undefined;
354
+ required_balance?: number | undefined;
355
+ product_id?: string | undefined;
355
356
  customer_data?: any;
356
357
  entity_data?: {
357
358
  feature_id: string;
358
359
  name?: string | undefined;
359
360
  } | undefined;
360
- required_balance?: number | undefined;
361
361
  send_event?: boolean | undefined;
362
362
  with_preview?: boolean | undefined;
363
363
  }>;
@@ -392,9 +392,9 @@ declare const autumn: (options?: {
392
392
  track: {
393
393
  <AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
394
394
  body: {
395
- value?: number | undefined;
396
- entity_id?: string | undefined;
397
395
  feature_id?: string | undefined;
396
+ entity_id?: string | undefined;
397
+ value?: number | undefined;
398
398
  customer_data?: any;
399
399
  entity_data?: any;
400
400
  event_name?: string | undefined;
@@ -434,17 +434,17 @@ declare const autumn: (options?: {
434
434
  idempotency_key: z.ZodOptional<z.ZodString>;
435
435
  entity_data: z.ZodOptional<z.ZodAny>;
436
436
  }, "customer_id">, "strip", z.ZodTypeAny, {
437
- value?: number | undefined;
438
- entity_id?: string | undefined;
439
437
  feature_id?: string | undefined;
438
+ entity_id?: string | undefined;
439
+ value?: number | undefined;
440
440
  customer_data?: any;
441
441
  entity_data?: any;
442
442
  event_name?: string | undefined;
443
443
  idempotency_key?: string | undefined;
444
444
  }, {
445
- value?: number | undefined;
446
- entity_id?: string | undefined;
447
445
  feature_id?: string | undefined;
446
+ entity_id?: string | undefined;
447
+ value?: number | undefined;
448
448
  customer_data?: any;
449
449
  entity_data?: any;
450
450
  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;
133
134
  options?: {
134
135
  feature_id: string;
135
136
  quantity: number;
136
137
  }[] | undefined;
137
138
  metadata?: Record<string, string> | undefined;
138
139
  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;
@@ -210,13 +210,13 @@ declare const autumn: (options?: {
210
210
  checkout_session_params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
211
211
  reward: z.ZodOptional<z.ZodString>;
212
212
  }, "customer_id">, "strip", z.ZodTypeAny, {
213
+ entity_id?: string | undefined;
213
214
  options?: {
214
215
  feature_id: string;
215
216
  quantity: number;
216
217
  }[] | undefined;
217
218
  metadata?: Record<string, string> | undefined;
218
219
  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;
@@ -230,13 +230,13 @@ declare const autumn: (options?: {
230
230
  checkout_session_params?: Record<string, any> | undefined;
231
231
  reward?: string | undefined;
232
232
  }, {
233
+ entity_id?: string | undefined;
233
234
  options?: {
234
235
  feature_id: string;
235
236
  quantity: number;
236
237
  }[] | undefined;
237
238
  metadata?: Record<string, string> | undefined;
238
239
  product_id?: string | undefined;
239
- entity_id?: string | undefined;
240
240
  product_ids?: string[] | undefined;
241
241
  free_trial?: boolean | undefined;
242
242
  success_url?: string | undefined;
@@ -281,15 +281,15 @@ declare const autumn: (options?: {
281
281
  check: {
282
282
  <AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
283
283
  body: {
284
- product_id?: string | undefined;
285
- entity_id?: string | undefined;
286
284
  feature_id?: string | undefined;
285
+ entity_id?: string | undefined;
286
+ required_balance?: number | undefined;
287
+ product_id?: string | undefined;
287
288
  customer_data?: any;
288
289
  entity_data?: {
289
290
  feature_id: string;
290
291
  name?: string | undefined;
291
292
  } | undefined;
292
- required_balance?: number | undefined;
293
293
  send_event?: boolean | undefined;
294
294
  with_preview?: boolean | undefined;
295
295
  };
@@ -337,27 +337,27 @@ declare const autumn: (options?: {
337
337
  name?: string | undefined;
338
338
  }>>;
339
339
  }, "customer_id">, "strip", z.ZodTypeAny, {
340
- product_id?: string | undefined;
341
- entity_id?: string | undefined;
342
340
  feature_id?: string | undefined;
341
+ entity_id?: string | undefined;
342
+ required_balance?: number | undefined;
343
+ product_id?: string | undefined;
343
344
  customer_data?: any;
344
345
  entity_data?: {
345
346
  feature_id: string;
346
347
  name?: string | undefined;
347
348
  } | undefined;
348
- required_balance?: number | undefined;
349
349
  send_event?: boolean | undefined;
350
350
  with_preview?: boolean | undefined;
351
351
  }, {
352
- product_id?: string | undefined;
353
- entity_id?: string | undefined;
354
352
  feature_id?: string | undefined;
353
+ entity_id?: string | undefined;
354
+ required_balance?: number | undefined;
355
+ product_id?: string | undefined;
355
356
  customer_data?: any;
356
357
  entity_data?: {
357
358
  feature_id: string;
358
359
  name?: string | undefined;
359
360
  } | undefined;
360
- required_balance?: number | undefined;
361
361
  send_event?: boolean | undefined;
362
362
  with_preview?: boolean | undefined;
363
363
  }>;
@@ -392,9 +392,9 @@ declare const autumn: (options?: {
392
392
  track: {
393
393
  <AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
394
394
  body: {
395
- value?: number | undefined;
396
- entity_id?: string | undefined;
397
395
  feature_id?: string | undefined;
396
+ entity_id?: string | undefined;
397
+ value?: number | undefined;
398
398
  customer_data?: any;
399
399
  entity_data?: any;
400
400
  event_name?: string | undefined;
@@ -434,17 +434,17 @@ declare const autumn: (options?: {
434
434
  idempotency_key: z.ZodOptional<z.ZodString>;
435
435
  entity_data: z.ZodOptional<z.ZodAny>;
436
436
  }, "customer_id">, "strip", z.ZodTypeAny, {
437
- value?: number | undefined;
438
- entity_id?: string | undefined;
439
437
  feature_id?: string | undefined;
438
+ entity_id?: string | undefined;
439
+ value?: number | undefined;
440
440
  customer_data?: any;
441
441
  entity_data?: any;
442
442
  event_name?: string | undefined;
443
443
  idempotency_key?: string | undefined;
444
444
  }, {
445
- value?: number | undefined;
446
- entity_id?: string | undefined;
447
445
  feature_id?: string | undefined;
446
+ entity_id?: string | undefined;
447
+ value?: number | undefined;
448
448
  customer_data?: any;
449
449
  entity_data?: any;
450
450
  event_name?: string | undefined;
@@ -1,4 +1,4 @@
1
- import { A as Autumn } from './referralTypes-CpEs5id9.mjs';
1
+ import { A as Autumn } from './referralTypes-C9zChWVP.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-PV0SFnx_.js';
1
+ import { A as Autumn } from './referralTypes-DuBjp_OL.js';
2
2
  import { AuthResult } from './utils/AuthFunction.js';
3
3
  import 'zod';
4
4
  import './response-CV6KGWH5.js';
@@ -1,4 +1,4 @@
1
- import { A as Autumn, C as CustomerData } from '../referralTypes-CpEs5id9.mjs';
1
+ import { A as Autumn, C as CustomerData } from '../referralTypes-C9zChWVP.mjs';
2
2
  import { AuthResult } from './AuthFunction.mjs';
3
3
  import 'zod';
4
4
  import '../response-CV6KGWH5.mjs';
@@ -1,4 +1,4 @@
1
- import { A as Autumn, C as CustomerData } from '../referralTypes-PV0SFnx_.js';
1
+ import { A as Autumn, C as CustomerData } from '../referralTypes-DuBjp_OL.js';
2
2
  import { AuthResult } from './AuthFunction.js';
3
3
  import 'zod';
4
4
  import '../response-CV6KGWH5.js';
@@ -1,14 +1,14 @@
1
1
  import * as React$1 from 'react';
2
- import { A as AutumnClient } from './ReactAutumnClient-C4CPCKrp.mjs';
2
+ import { A as AutumnClient } from './ReactAutumnClient-Cs9voLwk.mjs';
3
3
  import './client/types/clientEntTypes.mjs';
4
4
  import './client/types/clientGenTypes.mjs';
5
5
  import 'zod';
6
6
  import './error-DHbclCVh.mjs';
7
- import './genTypes-CHerQ_Ka.mjs';
8
- import './prodTypes-Mrr6azoz.mjs';
9
- import './attachTypes-C1BZ4HNs.mjs';
10
- import './entTypes-BbmxlLGb.mjs';
11
- import './cusTypes-DmFGAdnp.mjs';
7
+ import './genTypes-DufheKvo.mjs';
8
+ import './prodTypes-BlLYTHoR.mjs';
9
+ import './attachTypes-4AuOXG1E.mjs';
10
+ import './entTypes-BqZEH0S_.mjs';
11
+ import './cusTypes-BnKb-vxP.mjs';
12
12
 
13
13
  interface AutumnDialogContext {
14
14
  props: any;
@@ -1,14 +1,14 @@
1
1
  import * as React$1 from 'react';
2
- import { A as AutumnClient } from './ReactAutumnClient-Cf3-brZx.js';
2
+ import { A as AutumnClient } from './ReactAutumnClient-BW-6a3gM.js';
3
3
  import './client/types/clientEntTypes.js';
4
4
  import './client/types/clientGenTypes.js';
5
5
  import 'zod';
6
6
  import './error-DHbclCVh.js';
7
- import './genTypes-CHD2Kdqf.js';
8
- import './prodTypes-Mrr6azoz.js';
9
- import './attachTypes-BKzcsvuA.js';
10
- import './entTypes-DG9rJhum.js';
11
- import './cusTypes-DG6zrQYk.js';
7
+ import './genTypes-CNkoakWD.js';
8
+ import './prodTypes-BlLYTHoR.js';
9
+ import './attachTypes-DWeMSBmL.js';
10
+ import './entTypes-B0UaW3Jh.js';
11
+ import './cusTypes-CWMup6bJ.js';
12
12
 
13
13
  interface AutumnDialogContext {
14
14
  props: any;
@@ -3,18 +3,18 @@
3
3
  import {
4
4
  AutumnContext,
5
5
  useAutumnContext
6
- } from "./chunk-V2XCEJ4T.mjs";
7
- import "./chunk-MS4UEBVX.mjs";
6
+ } from "./chunk-J7CZEH52.mjs";
7
+ import "./chunk-EEEUDTTP.mjs";
8
8
  import "./chunk-D3GL2QV3.mjs";
9
+ import "./chunk-WFFVOEUG.mjs";
10
+ import "./chunk-ZF2HUCN6.mjs";
11
+ import "./chunk-BCLKTVUX.mjs";
9
12
  import "./chunk-V575SGOW.mjs";
10
13
  import "./chunk-ZV4RPZTM.mjs";
14
+ import "./chunk-KQT5G3HT.mjs";
11
15
  import "./chunk-JVCOY7ZL.mjs";
12
16
  import "./chunk-CIBQ4BJU.mjs";
13
17
  import "./chunk-VTGR7VVK.mjs";
14
- import "./chunk-WFFVOEUG.mjs";
15
- import "./chunk-ZF2HUCN6.mjs";
16
- import "./chunk-BCLKTVUX.mjs";
17
- import "./chunk-KQT5G3HT.mjs";
18
18
  export {
19
19
  AutumnContext,
20
20
  useAutumnContext
@@ -1,15 +1,15 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import React__default from 'react';
3
- import { A as AutumnClient } from './ReactAutumnClient-C4CPCKrp.mjs';
3
+ import { A as AutumnClient } from './ReactAutumnClient-Cs9voLwk.mjs';
4
4
  import './client/types/clientEntTypes.mjs';
5
5
  import './client/types/clientGenTypes.mjs';
6
6
  import 'zod';
7
7
  import './error-DHbclCVh.mjs';
8
- import './genTypes-CHerQ_Ka.mjs';
9
- import './prodTypes-Mrr6azoz.mjs';
10
- import './attachTypes-C1BZ4HNs.mjs';
11
- import './entTypes-BbmxlLGb.mjs';
12
- import './cusTypes-DmFGAdnp.mjs';
8
+ import './genTypes-DufheKvo.mjs';
9
+ import './prodTypes-BlLYTHoR.mjs';
10
+ import './attachTypes-4AuOXG1E.mjs';
11
+ import './entTypes-BqZEH0S_.mjs';
12
+ import './cusTypes-BnKb-vxP.mjs';
13
13
 
14
14
  declare function BaseAutumnProvider({ client, children, AutumnContext, }: {
15
15
  client: AutumnClient;
@@ -1,15 +1,15 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import React__default from 'react';
3
- import { A as AutumnClient } from './ReactAutumnClient-Cf3-brZx.js';
3
+ import { A as AutumnClient } from './ReactAutumnClient-BW-6a3gM.js';
4
4
  import './client/types/clientEntTypes.js';
5
5
  import './client/types/clientGenTypes.js';
6
6
  import 'zod';
7
7
  import './error-DHbclCVh.js';
8
- import './genTypes-CHD2Kdqf.js';
9
- import './prodTypes-Mrr6azoz.js';
10
- import './attachTypes-BKzcsvuA.js';
11
- import './entTypes-DG9rJhum.js';
12
- import './cusTypes-DG6zrQYk.js';
8
+ import './genTypes-CNkoakWD.js';
9
+ import './prodTypes-BlLYTHoR.js';
10
+ import './attachTypes-DWeMSBmL.js';
11
+ import './entTypes-B0UaW3Jh.js';
12
+ import './cusTypes-CWMup6bJ.js';
13
13
 
14
14
  declare function BaseAutumnProvider({ client, children, AutumnContext, }: {
15
15
  client: AutumnClient;
@@ -1492,7 +1492,7 @@ var openDialog = ({
1492
1492
  params,
1493
1493
  context
1494
1494
  }) => {
1495
- let open = result.allowed === false && params.dialog && context;
1495
+ let open = result?.allowed === false && params.dialog && context;
1496
1496
  if (!open) return;
1497
1497
  const isInRenderCycle = (() => {
1498
1498
  const stack = new Error().stack || "";
@@ -1518,10 +1518,13 @@ var handleCheck2 = ({
1518
1518
  }) => {
1519
1519
  if (!customer) {
1520
1520
  return {
1521
- allowed: false,
1522
- feature_id: "",
1523
- customer_id: "",
1524
- required_balance: 0
1521
+ data: {
1522
+ allowed: false,
1523
+ feature_id: "",
1524
+ customer_id: "",
1525
+ required_balance: 0
1526
+ },
1527
+ error: null
1525
1528
  };
1526
1529
  }
1527
1530
  if (!params.featureId && !params.productId) {
@@ -1532,7 +1535,10 @@ var handleCheck2 = ({
1532
1535
  result = handleFeatureCheck({ customer, params, isEntity });
1533
1536
  if (params.productId)
1534
1537
  result = handleProductCheck({ customer, params, isEntity });
1535
- return result;
1538
+ return {
1539
+ data: result,
1540
+ error: null
1541
+ };
1536
1542
  };
1537
1543
 
1538
1544
  // src/libraries/react/hooks/useCustomerBase.tsx
@@ -1592,18 +1598,18 @@ var useCustomerBase = ({
1592
1598
  createReferralCode: client.referrals.createCode,
1593
1599
  redeemReferralCode: client.referrals.redeemCode,
1594
1600
  check: (params2) => {
1595
- const result = handleCheck2({
1601
+ const res = handleCheck2({
1596
1602
  customer,
1597
1603
  params: params2,
1598
1604
  isEntity: false,
1599
1605
  context
1600
1606
  });
1601
1607
  openDialog({
1602
- result,
1608
+ result: res.data,
1603
1609
  params: params2,
1604
1610
  context
1605
1611
  });
1606
- return result;
1612
+ return res;
1607
1613
  },
1608
1614
  /** @deprecated Use check() instead */
1609
1615
  allowed: (params2) => {
@@ -1613,7 +1619,7 @@ var useCustomerBase = ({
1613
1619
  isEntity: false,
1614
1620
  context
1615
1621
  });
1616
- return result.allowed;
1622
+ return result.data.allowed;
1617
1623
  }
1618
1624
  };
1619
1625
  };
@@ -3,24 +3,24 @@
3
3
  "use client";
4
4
  import {
5
5
  BaseAutumnProvider
6
- } from "./chunk-K7IJMDIV.mjs";
6
+ } from "./chunk-UJHH6JP6.mjs";
7
7
  import "./chunk-RFSQBGLO.mjs";
8
- import "./chunk-MIITU3Q2.mjs";
9
- import "./chunk-3LLAOCW3.mjs";
8
+ import "./chunk-CK7IHYXM.mjs";
9
+ import "./chunk-KX42ZLE6.mjs";
10
10
  import "./chunk-CQD37NSX.mjs";
11
11
  import "./chunk-TL2F3PPG.mjs";
12
- import "./chunk-V2XCEJ4T.mjs";
13
- import "./chunk-MS4UEBVX.mjs";
12
+ import "./chunk-J7CZEH52.mjs";
13
+ import "./chunk-EEEUDTTP.mjs";
14
14
  import "./chunk-D3GL2QV3.mjs";
15
+ import "./chunk-WFFVOEUG.mjs";
16
+ import "./chunk-ZF2HUCN6.mjs";
17
+ import "./chunk-BCLKTVUX.mjs";
15
18
  import "./chunk-V575SGOW.mjs";
16
19
  import "./chunk-ZV4RPZTM.mjs";
20
+ import "./chunk-KQT5G3HT.mjs";
17
21
  import "./chunk-JVCOY7ZL.mjs";
18
22
  import "./chunk-CIBQ4BJU.mjs";
19
23
  import "./chunk-VTGR7VVK.mjs";
20
- import "./chunk-WFFVOEUG.mjs";
21
- import "./chunk-ZF2HUCN6.mjs";
22
- import "./chunk-BCLKTVUX.mjs";
23
- import "./chunk-KQT5G3HT.mjs";
24
24
  export {
25
25
  BaseAutumnProvider
26
26
  };
@@ -1,11 +1,11 @@
1
1
  import { CreateEntityParams, GetEntityParams } from './client/types/clientEntTypes.js';
2
2
  import { OpenBillingPortalParams, SetupPaymentParams } from './client/types/clientGenTypes.js';
3
3
  import { A as AutumnError } from './error-DHbclCVh.js';
4
- import { a as CheckResult, S as SetupPaymentResult, Q as QueryResult } from './genTypes-CHD2Kdqf.js';
5
- import { C as CheckoutResult } from './attachTypes-BKzcsvuA.js';
6
- import { R as Result, A as AutumnPromise, E as Entity, D as DeleteEntityResult } from './entTypes-DG9rJhum.js';
7
- import { c as ProductItem, e as ProductScenario, P as Product } from './prodTypes-Mrr6azoz.js';
8
- import { C as CustomerData, a as CreateCustomerParams, b as Customer, B as BillingPortalResult } from './cusTypes-DG6zrQYk.js';
4
+ import { a as CheckResult, S as SetupPaymentResult, Q as QueryResult } from './genTypes-CNkoakWD.js';
5
+ import { C as CheckoutResult } from './attachTypes-DWeMSBmL.js';
6
+ import { R as Result, A as AutumnPromise, E as Entity, D as DeleteEntityResult } from './entTypes-B0UaW3Jh.js';
7
+ import { a as ProductItem, e as ProductScenario, P as Product } from './prodTypes-BlLYTHoR.js';
8
+ import { C as CustomerData, a as CreateCustomerParams, b as Customer, B as BillingPortalResult } from './cusTypes-CWMup6bJ.js';
9
9
 
10
10
  interface PricingTableProduct {
11
11
  id: string;
@@ -1,11 +1,11 @@
1
1
  import { CreateEntityParams, GetEntityParams } from './client/types/clientEntTypes.mjs';
2
2
  import { OpenBillingPortalParams, SetupPaymentParams } from './client/types/clientGenTypes.mjs';
3
3
  import { A as AutumnError } from './error-DHbclCVh.mjs';
4
- import { a as CheckResult, S as SetupPaymentResult, Q as QueryResult } from './genTypes-CHerQ_Ka.mjs';
5
- import { C as CheckoutResult } from './attachTypes-C1BZ4HNs.mjs';
6
- import { R as Result, A as AutumnPromise, E as Entity, D as DeleteEntityResult } from './entTypes-BbmxlLGb.mjs';
7
- import { c as ProductItem, e as ProductScenario, P as Product } from './prodTypes-Mrr6azoz.mjs';
8
- import { C as CustomerData, a as CreateCustomerParams, b as Customer, B as BillingPortalResult } from './cusTypes-DmFGAdnp.mjs';
4
+ import { a as CheckResult, S as SetupPaymentResult, Q as QueryResult } from './genTypes-DufheKvo.mjs';
5
+ import { C as CheckoutResult } from './attachTypes-4AuOXG1E.mjs';
6
+ import { R as Result, A as AutumnPromise, E as Entity, D as DeleteEntityResult } from './entTypes-BqZEH0S_.mjs';
7
+ import { a as ProductItem, e as ProductScenario, P as Product } from './prodTypes-BlLYTHoR.mjs';
8
+ import { C as CustomerData, a as CreateCustomerParams, b as Customer, B as BillingPortalResult } from './cusTypes-BnKb-vxP.mjs';
9
9
 
10
10
  interface PricingTableProduct {
11
11
  id: string;
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { C as CustomerData } from './cusTypes-DmFGAdnp.mjs';
3
- import './prodTypes-Mrr6azoz.mjs';
2
+ import { C as CustomerData } from './cusTypes-BnKb-vxP.mjs';
3
+ import './prodTypes-BlLYTHoR.mjs';
4
4
  import 'zod';
5
5
 
6
6
  declare const ReactAutumnProvider: ({ children, getBearerToken, backendUrl, customerData, includeCredentials, betterAuthUrl, }: {
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { C as CustomerData } from './cusTypes-DG6zrQYk.js';
3
- import './prodTypes-Mrr6azoz.js';
2
+ import { C as CustomerData } from './cusTypes-CWMup6bJ.js';
3
+ import './prodTypes-BlLYTHoR.js';
4
4
  import 'zod';
5
5
 
6
6
  declare const ReactAutumnProvider: ({ children, getBearerToken, backendUrl, customerData, includeCredentials, betterAuthUrl, }: {
@@ -1493,7 +1493,7 @@ var openDialog = ({
1493
1493
  params,
1494
1494
  context
1495
1495
  }) => {
1496
- let open = result.allowed === false && params.dialog && context;
1496
+ let open = result?.allowed === false && params.dialog && context;
1497
1497
  if (!open) return;
1498
1498
  const isInRenderCycle = (() => {
1499
1499
  const stack = new Error().stack || "";
@@ -1519,10 +1519,13 @@ var handleCheck2 = ({
1519
1519
  }) => {
1520
1520
  if (!customer) {
1521
1521
  return {
1522
- allowed: false,
1523
- feature_id: "",
1524
- customer_id: "",
1525
- required_balance: 0
1522
+ data: {
1523
+ allowed: false,
1524
+ feature_id: "",
1525
+ customer_id: "",
1526
+ required_balance: 0
1527
+ },
1528
+ error: null
1526
1529
  };
1527
1530
  }
1528
1531
  if (!params.featureId && !params.productId) {
@@ -1533,7 +1536,10 @@ var handleCheck2 = ({
1533
1536
  result = handleFeatureCheck({ customer, params, isEntity });
1534
1537
  if (params.productId)
1535
1538
  result = handleProductCheck({ customer, params, isEntity });
1536
- return result;
1539
+ return {
1540
+ data: result,
1541
+ error: null
1542
+ };
1537
1543
  };
1538
1544
 
1539
1545
  // src/libraries/react/hooks/useCustomerBase.tsx
@@ -1593,18 +1599,18 @@ var useCustomerBase = ({
1593
1599
  createReferralCode: client.referrals.createCode,
1594
1600
  redeemReferralCode: client.referrals.redeemCode,
1595
1601
  check: (params2) => {
1596
- const result = handleCheck2({
1602
+ const res = handleCheck2({
1597
1603
  customer,
1598
1604
  params: params2,
1599
1605
  isEntity: false,
1600
1606
  context
1601
1607
  });
1602
1608
  openDialog({
1603
- result,
1609
+ result: res.data,
1604
1610
  params: params2,
1605
1611
  context
1606
1612
  });
1607
- return result;
1613
+ return res;
1608
1614
  },
1609
1615
  /** @deprecated Use check() instead */
1610
1616
  allowed: (params2) => {
@@ -1614,7 +1620,7 @@ var useCustomerBase = ({
1614
1620
  isEntity: false,
1615
1621
  context
1616
1622
  });
1617
- return result.allowed;
1623
+ return result.data.allowed;
1618
1624
  }
1619
1625
  };
1620
1626
  };