autumn-js 0.1.36 → 0.1.38

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 (132) hide show
  1. package/dist/libraries/backend/better-auth.js +9 -4
  2. package/dist/libraries/backend/better-auth.mjs +3 -3
  3. package/dist/libraries/backend/{chunk-PO4EL4BW.mjs → chunk-2HF7BTK6.mjs} +4 -3
  4. package/dist/libraries/backend/{chunk-4MEEJLXG.mjs → chunk-3BSSTNFD.mjs} +2 -2
  5. package/dist/libraries/backend/{chunk-USQ76FYI.mjs → chunk-I5ZBW4DS.mjs} +5 -1
  6. package/dist/libraries/backend/convex.js +9 -4
  7. package/dist/libraries/backend/convex.mjs +3 -3
  8. package/dist/libraries/backend/elysia.js +9 -4
  9. package/dist/libraries/backend/elysia.mjs +3 -3
  10. package/dist/libraries/backend/express.js +9 -4
  11. package/dist/libraries/backend/express.mjs +3 -3
  12. package/dist/libraries/backend/fastify.js +9 -4
  13. package/dist/libraries/backend/fastify.mjs +3 -3
  14. package/dist/libraries/backend/hono.js +9 -4
  15. package/dist/libraries/backend/hono.mjs +3 -3
  16. package/dist/libraries/backend/index.js +9 -4
  17. package/dist/libraries/backend/index.mjs +3 -3
  18. package/dist/libraries/backend/next.js +9 -4
  19. package/dist/libraries/backend/next.mjs +3 -3
  20. package/dist/libraries/backend/react-router.js +9 -4
  21. package/dist/libraries/backend/react-router.mjs +3 -3
  22. package/dist/libraries/backend/remix_dep.js +9 -4
  23. package/dist/libraries/backend/remix_dep.mjs +3 -3
  24. package/dist/libraries/backend/routes/backendRouter.js +9 -4
  25. package/dist/libraries/backend/routes/backendRouter.mjs +3 -3
  26. package/dist/libraries/backend/routes/genRoutes.js +4 -3
  27. package/dist/libraries/backend/routes/genRoutes.mjs +1 -1
  28. package/dist/libraries/backend/routes/referralRoutes.js +5 -1
  29. package/dist/libraries/backend/routes/referralRoutes.mjs +1 -1
  30. package/dist/libraries/backend/supabase.js +9 -4
  31. package/dist/libraries/backend/supabase.mjs +3 -3
  32. package/dist/libraries/backend/tanstack.js +9 -4
  33. package/dist/libraries/backend/tanstack.mjs +3 -3
  34. package/dist/libraries/react/AutumnContext.d.mts +1 -1
  35. package/dist/libraries/react/AutumnContext.d.ts +1 -1
  36. package/dist/libraries/react/AutumnContext.js +8 -2
  37. package/dist/libraries/react/AutumnContext.mjs +2 -2
  38. package/dist/libraries/react/BaseAutumnProvider.d.mts +1 -1
  39. package/dist/libraries/react/BaseAutumnProvider.d.ts +1 -1
  40. package/dist/libraries/react/BaseAutumnProvider.js +8 -2
  41. package/dist/libraries/react/BaseAutumnProvider.mjs +4 -4
  42. package/dist/libraries/react/{ReactAutumnClient-DkAcY1X2.d.ts → ReactAutumnClient-CTcUgU2E.d.ts} +2 -1
  43. package/dist/libraries/react/{ReactAutumnClient-DuYr1i4C.d.mts → ReactAutumnClient-Cev2Qll1.d.mts} +2 -1
  44. package/dist/libraries/react/ReactAutumnProvider.d.mts +2 -1
  45. package/dist/libraries/react/ReactAutumnProvider.d.ts +2 -1
  46. package/dist/libraries/react/ReactAutumnProvider.js +12 -4
  47. package/dist/libraries/react/ReactAutumnProvider.mjs +5 -5
  48. package/dist/libraries/react/{chunk-NPPSXTRQ.mjs → chunk-2LZIBRD4.mjs} +2 -2
  49. package/dist/libraries/react/{chunk-6U2XJZGO.mjs → chunk-35JJUJGK.mjs} +2 -2
  50. package/dist/libraries/react/{chunk-WJZUVBCL.mjs → chunk-3VPXKYJ3.mjs} +7 -5
  51. package/dist/libraries/react/{chunk-KCO4V65K.mjs → chunk-47KEC6LH.mjs} +3 -3
  52. package/dist/libraries/react/{chunk-FAG5HHVM.mjs → chunk-4KLTPVNG.mjs} +2 -2
  53. package/dist/libraries/react/{chunk-HNWWFCOW.mjs → chunk-4QVAJKUF.mjs} +1 -1
  54. package/dist/libraries/react/{chunk-AHIEANFE.mjs → chunk-5TLRC3ED.mjs} +17 -17
  55. package/dist/libraries/react/{chunk-WRYAEUUV.mjs → chunk-7K7ME43L.mjs} +1 -1
  56. package/dist/libraries/react/{chunk-FSJNDXTY.mjs → chunk-DEPJ74S4.mjs} +462 -464
  57. package/dist/libraries/react/{chunk-W3YUWXSL.mjs → chunk-DIDEEVJB.mjs} +2 -2
  58. package/dist/libraries/react/{chunk-6PLIVXZY.mjs → chunk-DTAJR247.mjs} +1 -1
  59. package/dist/libraries/react/{chunk-DJXOY3UC.mjs → chunk-HEKBPI6U.mjs} +2 -2
  60. package/dist/libraries/react/{chunk-BR56DHZ2.mjs → chunk-IZEOJCTN.mjs} +1 -1
  61. package/dist/libraries/react/{chunk-NJRJLNGW.mjs → chunk-P2SWE4OD.mjs} +1 -1
  62. package/dist/libraries/react/{chunk-ATGLJHUN.mjs → chunk-QEWVBDWJ.mjs} +1 -1
  63. package/dist/libraries/react/{chunk-XGIQOMYH.mjs → chunk-TLAWG4JC.mjs} +8 -2
  64. package/dist/libraries/react/{chunk-5BTQDWG6.mjs → chunk-XHXYZVYG.mjs} +1 -1
  65. package/dist/libraries/react/{chunk-QFOYSJQW.mjs → chunk-YCHPTRJA.mjs} +4 -4
  66. package/dist/libraries/react/{chunk-P4BHBYHL.mjs → chunk-ZQPCEJFK.mjs} +1 -1
  67. package/dist/libraries/react/client/ConvexAutumnClient.d.mts +1 -1
  68. package/dist/libraries/react/client/ConvexAutumnClient.d.ts +1 -1
  69. package/dist/libraries/react/client/ReactAutumnClient.d.mts +1 -1
  70. package/dist/libraries/react/client/ReactAutumnClient.d.ts +1 -1
  71. package/dist/libraries/react/client/ReactAutumnClient.js +8 -2
  72. package/dist/libraries/react/client/ReactAutumnClient.mjs +1 -1
  73. package/dist/libraries/react/client/clientCompMethods.d.mts +1 -1
  74. package/dist/libraries/react/client/clientCompMethods.d.ts +1 -1
  75. package/dist/libraries/react/client/clientCusMethods.d.mts +1 -1
  76. package/dist/libraries/react/client/clientCusMethods.d.ts +1 -1
  77. package/dist/libraries/react/client/clientEntityMethods.d.mts +1 -1
  78. package/dist/libraries/react/client/clientEntityMethods.d.ts +1 -1
  79. package/dist/libraries/react/client/clientGenMethods.d.mts +1 -1
  80. package/dist/libraries/react/client/clientGenMethods.d.ts +1 -1
  81. package/dist/libraries/react/client/clientProdMethods.d.mts +1 -1
  82. package/dist/libraries/react/client/clientProdMethods.d.ts +1 -1
  83. package/dist/libraries/react/client/clientReferralMethods.d.mts +1 -1
  84. package/dist/libraries/react/client/clientReferralMethods.d.ts +1 -1
  85. package/dist/libraries/react/components/checkout-dialog/checkout-dialog-synced.js +8 -2
  86. package/dist/libraries/react/components/checkout-dialog/checkout-dialog-synced.mjs +22 -22
  87. package/dist/libraries/react/components/paywall-dialog/paywall-dialog-synced.js +8 -2
  88. package/dist/libraries/react/components/paywall-dialog/paywall-dialog-synced.mjs +22 -22
  89. package/dist/libraries/react/components/pricing-table/pricing-table-synced.js +8 -2
  90. package/dist/libraries/react/components/pricing-table/pricing-table-synced.mjs +22 -22
  91. package/dist/libraries/react/components/ui/accordion.mjs +3 -3
  92. package/dist/libraries/react/components/ui/button.d.mts +1 -1
  93. package/dist/libraries/react/components/ui/button.d.ts +1 -1
  94. package/dist/libraries/react/components/ui/dialog.mjs +4 -4
  95. package/dist/libraries/react/components/ui/popover.mjs +5 -5
  96. package/dist/libraries/react/components/ui/switch.mjs +3 -3
  97. package/dist/libraries/react/hooks/helpers/handleCheck.d.mts +1 -1
  98. package/dist/libraries/react/hooks/helpers/handleCheck.d.ts +1 -1
  99. package/dist/libraries/react/hooks/helpers/useAutumnBase.d.mts +1 -1
  100. package/dist/libraries/react/hooks/helpers/useAutumnBase.d.ts +1 -1
  101. package/dist/libraries/react/hooks/useAnalytics.js +9 -3
  102. package/dist/libraries/react/hooks/useAnalytics.mjs +3 -3
  103. package/dist/libraries/react/hooks/useCustomer.d.mts +1 -1
  104. package/dist/libraries/react/hooks/useCustomer.d.ts +1 -1
  105. package/dist/libraries/react/hooks/useCustomer.js +8 -2
  106. package/dist/libraries/react/hooks/useCustomer.mjs +4 -4
  107. package/dist/libraries/react/hooks/useCustomerBase.d.mts +1 -1
  108. package/dist/libraries/react/hooks/useCustomerBase.d.ts +1 -1
  109. package/dist/libraries/react/hooks/useCustomerBase.js +8 -2
  110. package/dist/libraries/react/hooks/useCustomerBase.mjs +3 -3
  111. package/dist/libraries/react/hooks/useEntity.js +8 -2
  112. package/dist/libraries/react/hooks/useEntity.mjs +4 -4
  113. package/dist/libraries/react/hooks/useEntityBase.d.mts +1 -1
  114. package/dist/libraries/react/hooks/useEntityBase.d.ts +1 -1
  115. package/dist/libraries/react/hooks/useEntityBase.js +8 -2
  116. package/dist/libraries/react/hooks/useEntityBase.mjs +3 -3
  117. package/dist/libraries/react/hooks/usePaywall.js +8 -2
  118. package/dist/libraries/react/hooks/usePaywall.mjs +3 -3
  119. package/dist/libraries/react/hooks/usePricingTable.js +8 -2
  120. package/dist/libraries/react/hooks/usePricingTable.mjs +3 -3
  121. package/dist/libraries/react/hooks/usePricingTableBase.d.mts +1 -1
  122. package/dist/libraries/react/hooks/usePricingTableBase.d.ts +1 -1
  123. package/dist/libraries/react/hooks/useProductsBase.d.mts +1 -1
  124. package/dist/libraries/react/hooks/useProductsBase.d.ts +1 -1
  125. package/dist/libraries/react/index.d.mts +2 -1
  126. package/dist/libraries/react/index.d.ts +2 -1
  127. package/dist/libraries/react/index.js +13 -5
  128. package/dist/libraries/react/index.mjs +13 -5
  129. package/dist/next/client/NextAutumnClient.d.mts +2 -1
  130. package/dist/next/client/NextAutumnClient.d.ts +2 -1
  131. package/package.json +1 -1
  132. package/dist/libraries/react/{chunk-4XU63W7I.mjs → chunk-2GEDBGON.mjs} +11 -11
@@ -1268,6 +1268,8 @@ var attachHandler = withAuth({
1268
1268
  customer_data,
1269
1269
  body
1270
1270
  }) => {
1271
+ console.log("Body: ", body);
1272
+ console.log("Customer ID: ", customer_id);
1271
1273
  return await autumn2.attach({
1272
1274
  ...sanitizeBody(body),
1273
1275
  customer_id,
@@ -1346,9 +1348,8 @@ var queryHandler = withAuth({
1346
1348
  body
1347
1349
  }) => {
1348
1350
  return await autumn2.query({
1349
- customer_id,
1350
- range: body.range,
1351
- feature_id: body.featureId
1351
+ ...sanitizeBody(body),
1352
+ customer_id
1352
1353
  });
1353
1354
  }
1354
1355
  });
@@ -1458,10 +1459,14 @@ var createReferralCodeHandler = withAuth({
1458
1459
  customer_id,
1459
1460
  body
1460
1461
  }) => {
1461
- return await autumn2.referrals.createCode({
1462
+ console.log("Creating referral code for customer: ", customer_id);
1463
+ console.log("Body: ", body);
1464
+ const res = await autumn2.referrals.createCode({
1462
1465
  ...body,
1463
1466
  customer_id
1464
1467
  });
1468
+ console.log("Res: ", res);
1469
+ return res;
1465
1470
  }
1466
1471
  });
1467
1472
  var redeemReferralCodeHandler = withAuth({
@@ -8,10 +8,10 @@ import {
8
8
  } from "./chunk-UNZHJTEY.mjs";
9
9
  import {
10
10
  createRouterWithOptions
11
- } from "./chunk-4MEEJLXG.mjs";
12
- import "./chunk-PO4EL4BW.mjs";
11
+ } from "./chunk-3BSSTNFD.mjs";
12
+ import "./chunk-2HF7BTK6.mjs";
13
13
  import "./chunk-MHIUO3ST.mjs";
14
- import "./chunk-USQ76FYI.mjs";
14
+ import "./chunk-I5ZBW4DS.mjs";
15
15
  import "./chunk-LOSIWWM2.mjs";
16
16
  import "./chunk-35N7BIAE.mjs";
17
17
  import {
@@ -35,6 +35,8 @@ var attachHandler = withAuth({
35
35
  customer_data,
36
36
  body
37
37
  }) => {
38
+ console.log("Body: ", body);
39
+ console.log("Customer ID: ", customer_id);
38
40
  return await autumn.attach({
39
41
  ...sanitizeBody(body),
40
42
  customer_id,
@@ -113,9 +115,8 @@ var queryHandler = withAuth({
113
115
  body
114
116
  }) => {
115
117
  return await autumn.query({
116
- customer_id,
117
- range: body.range,
118
- feature_id: body.featureId
118
+ ...sanitizeBody(body),
119
+ customer_id
119
120
  });
120
121
  }
121
122
  });
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  addGenRoutes
3
- } from "./chunk-PO4EL4BW.mjs";
3
+ } from "./chunk-2HF7BTK6.mjs";
4
4
  import {
5
5
  addProductRoutes
6
6
  } from "./chunk-MHIUO3ST.mjs";
7
7
  import {
8
8
  addReferralRoutes
9
- } from "./chunk-USQ76FYI.mjs";
9
+ } from "./chunk-I5ZBW4DS.mjs";
10
10
  import {
11
11
  addEntityRoutes
12
12
  } from "./chunk-LOSIWWM2.mjs";
@@ -13,10 +13,14 @@ var createReferralCodeHandler = withAuth({
13
13
  customer_id,
14
14
  body
15
15
  }) => {
16
- return await autumn.referrals.createCode({
16
+ console.log("Creating referral code for customer: ", customer_id);
17
+ console.log("Body: ", body);
18
+ const res = await autumn.referrals.createCode({
17
19
  ...body,
18
20
  customer_id
19
21
  });
22
+ console.log("Res: ", res);
23
+ return res;
20
24
  }
21
25
  });
22
26
  var redeemReferralCodeHandler = withAuth({
@@ -1158,6 +1158,8 @@ var attachHandler = withAuth({
1158
1158
  customer_data,
1159
1159
  body
1160
1160
  }) => {
1161
+ console.log("Body: ", body);
1162
+ console.log("Customer ID: ", customer_id);
1161
1163
  return await autumn.attach({
1162
1164
  ...sanitizeBody(body),
1163
1165
  customer_id,
@@ -1236,9 +1238,8 @@ var queryHandler = withAuth({
1236
1238
  body
1237
1239
  }) => {
1238
1240
  return await autumn.query({
1239
- customer_id,
1240
- range: body.range,
1241
- feature_id: body.featureId
1241
+ ...sanitizeBody(body),
1242
+ customer_id
1242
1243
  });
1243
1244
  }
1244
1245
  });
@@ -1348,10 +1349,14 @@ var createReferralCodeHandler = withAuth({
1348
1349
  customer_id,
1349
1350
  body
1350
1351
  }) => {
1351
- return await autumn.referrals.createCode({
1352
+ console.log("Creating referral code for customer: ", customer_id);
1353
+ console.log("Body: ", body);
1354
+ const res = await autumn.referrals.createCode({
1352
1355
  ...body,
1353
1356
  customer_id
1354
1357
  });
1358
+ console.log("Res: ", res);
1359
+ return res;
1355
1360
  }
1356
1361
  });
1357
1362
  var redeemReferralCodeHandler = withAuth({
@@ -3,10 +3,10 @@ import {
3
3
  } from "./chunk-UNZHJTEY.mjs";
4
4
  import {
5
5
  createRouterWithOptions
6
- } from "./chunk-4MEEJLXG.mjs";
7
- import "./chunk-PO4EL4BW.mjs";
6
+ } from "./chunk-3BSSTNFD.mjs";
7
+ import "./chunk-2HF7BTK6.mjs";
8
8
  import "./chunk-MHIUO3ST.mjs";
9
- import "./chunk-USQ76FYI.mjs";
9
+ import "./chunk-I5ZBW4DS.mjs";
10
10
  import "./chunk-LOSIWWM2.mjs";
11
11
  import "./chunk-35N7BIAE.mjs";
12
12
  import {
@@ -1158,6 +1158,8 @@ var attachHandler = withAuth({
1158
1158
  customer_data,
1159
1159
  body
1160
1160
  }) => {
1161
+ console.log("Body: ", body);
1162
+ console.log("Customer ID: ", customer_id);
1161
1163
  return await autumn.attach({
1162
1164
  ...sanitizeBody(body),
1163
1165
  customer_id,
@@ -1236,9 +1238,8 @@ var queryHandler = withAuth({
1236
1238
  body
1237
1239
  }) => {
1238
1240
  return await autumn.query({
1239
- customer_id,
1240
- range: body.range,
1241
- feature_id: body.featureId
1241
+ ...sanitizeBody(body),
1242
+ customer_id
1242
1243
  });
1243
1244
  }
1244
1245
  });
@@ -1348,10 +1349,14 @@ var createReferralCodeHandler = withAuth({
1348
1349
  customer_id,
1349
1350
  body
1350
1351
  }) => {
1351
- return await autumn.referrals.createCode({
1352
+ console.log("Creating referral code for customer: ", customer_id);
1353
+ console.log("Body: ", body);
1354
+ const res = await autumn.referrals.createCode({
1352
1355
  ...body,
1353
1356
  customer_id
1354
1357
  });
1358
+ console.log("Res: ", res);
1359
+ return res;
1355
1360
  }
1356
1361
  });
1357
1362
  var redeemReferralCodeHandler = withAuth({
@@ -3,10 +3,10 @@ import {
3
3
  } from "./chunk-UNZHJTEY.mjs";
4
4
  import {
5
5
  createRouterWithOptions
6
- } from "./chunk-4MEEJLXG.mjs";
7
- import "./chunk-PO4EL4BW.mjs";
6
+ } from "./chunk-3BSSTNFD.mjs";
7
+ import "./chunk-2HF7BTK6.mjs";
8
8
  import "./chunk-MHIUO3ST.mjs";
9
- import "./chunk-USQ76FYI.mjs";
9
+ import "./chunk-I5ZBW4DS.mjs";
10
10
  import "./chunk-LOSIWWM2.mjs";
11
11
  import {
12
12
  toSnakeCase
@@ -1158,6 +1158,8 @@ var attachHandler = withAuth({
1158
1158
  customer_data,
1159
1159
  body
1160
1160
  }) => {
1161
+ console.log("Body: ", body);
1162
+ console.log("Customer ID: ", customer_id);
1161
1163
  return await autumn.attach({
1162
1164
  ...sanitizeBody(body),
1163
1165
  customer_id,
@@ -1236,9 +1238,8 @@ var queryHandler = withAuth({
1236
1238
  body
1237
1239
  }) => {
1238
1240
  return await autumn.query({
1239
- customer_id,
1240
- range: body.range,
1241
- feature_id: body.featureId
1241
+ ...sanitizeBody(body),
1242
+ customer_id
1242
1243
  });
1243
1244
  }
1244
1245
  });
@@ -1348,10 +1349,14 @@ var createReferralCodeHandler = withAuth({
1348
1349
  customer_id,
1349
1350
  body
1350
1351
  }) => {
1351
- return await autumn.referrals.createCode({
1352
+ console.log("Creating referral code for customer: ", customer_id);
1353
+ console.log("Body: ", body);
1354
+ const res = await autumn.referrals.createCode({
1352
1355
  ...body,
1353
1356
  customer_id
1354
1357
  });
1358
+ console.log("Res: ", res);
1359
+ return res;
1355
1360
  }
1356
1361
  });
1357
1362
  var redeemReferralCodeHandler = withAuth({
@@ -3,10 +3,10 @@ import {
3
3
  } from "./chunk-UNZHJTEY.mjs";
4
4
  import {
5
5
  createRouterWithOptions
6
- } from "./chunk-4MEEJLXG.mjs";
7
- import "./chunk-PO4EL4BW.mjs";
6
+ } from "./chunk-3BSSTNFD.mjs";
7
+ import "./chunk-2HF7BTK6.mjs";
8
8
  import "./chunk-MHIUO3ST.mjs";
9
- import "./chunk-USQ76FYI.mjs";
9
+ import "./chunk-I5ZBW4DS.mjs";
10
10
  import "./chunk-LOSIWWM2.mjs";
11
11
  import "./chunk-35N7BIAE.mjs";
12
12
  import {
@@ -1158,6 +1158,8 @@ var attachHandler = withAuth({
1158
1158
  customer_data,
1159
1159
  body
1160
1160
  }) => {
1161
+ console.log("Body: ", body);
1162
+ console.log("Customer ID: ", customer_id);
1161
1163
  return await autumn.attach({
1162
1164
  ...sanitizeBody(body),
1163
1165
  customer_id,
@@ -1236,9 +1238,8 @@ var queryHandler = withAuth({
1236
1238
  body
1237
1239
  }) => {
1238
1240
  return await autumn.query({
1239
- customer_id,
1240
- range: body.range,
1241
- feature_id: body.featureId
1241
+ ...sanitizeBody(body),
1242
+ customer_id
1242
1243
  });
1243
1244
  }
1244
1245
  });
@@ -1348,10 +1349,14 @@ var createReferralCodeHandler = withAuth({
1348
1349
  customer_id,
1349
1350
  body
1350
1351
  }) => {
1351
- return await autumn.referrals.createCode({
1352
+ console.log("Creating referral code for customer: ", customer_id);
1353
+ console.log("Body: ", body);
1354
+ const res = await autumn.referrals.createCode({
1352
1355
  ...body,
1353
1356
  customer_id
1354
1357
  });
1358
+ console.log("Res: ", res);
1359
+ return res;
1355
1360
  }
1356
1361
  });
1357
1362
  var redeemReferralCodeHandler = withAuth({
@@ -3,10 +3,10 @@ import {
3
3
  } from "./chunk-UNZHJTEY.mjs";
4
4
  import {
5
5
  createRouterWithOptions
6
- } from "./chunk-4MEEJLXG.mjs";
7
- import "./chunk-PO4EL4BW.mjs";
6
+ } from "./chunk-3BSSTNFD.mjs";
7
+ import "./chunk-2HF7BTK6.mjs";
8
8
  import "./chunk-MHIUO3ST.mjs";
9
- import "./chunk-USQ76FYI.mjs";
9
+ import "./chunk-I5ZBW4DS.mjs";
10
10
  import "./chunk-LOSIWWM2.mjs";
11
11
  import "./chunk-35N7BIAE.mjs";
12
12
  import {
@@ -1158,6 +1158,8 @@ var attachHandler = withAuth({
1158
1158
  customer_data,
1159
1159
  body
1160
1160
  }) => {
1161
+ console.log("Body: ", body);
1162
+ console.log("Customer ID: ", customer_id);
1161
1163
  return await autumn.attach({
1162
1164
  ...sanitizeBody(body),
1163
1165
  customer_id,
@@ -1236,9 +1238,8 @@ var queryHandler = withAuth({
1236
1238
  body
1237
1239
  }) => {
1238
1240
  return await autumn.query({
1239
- customer_id,
1240
- range: body.range,
1241
- feature_id: body.featureId
1241
+ ...sanitizeBody(body),
1242
+ customer_id
1242
1243
  });
1243
1244
  }
1244
1245
  });
@@ -1348,10 +1349,14 @@ var createReferralCodeHandler = withAuth({
1348
1349
  customer_id,
1349
1350
  body
1350
1351
  }) => {
1351
- return await autumn.referrals.createCode({
1352
+ console.log("Creating referral code for customer: ", customer_id);
1353
+ console.log("Body: ", body);
1354
+ const res = await autumn.referrals.createCode({
1352
1355
  ...body,
1353
1356
  customer_id
1354
1357
  });
1358
+ console.log("Res: ", res);
1359
+ return res;
1355
1360
  }
1356
1361
  });
1357
1362
  var redeemReferralCodeHandler = withAuth({
@@ -3,10 +3,10 @@ import {
3
3
  } from "./chunk-UNZHJTEY.mjs";
4
4
  import {
5
5
  createRouterWithOptions
6
- } from "./chunk-4MEEJLXG.mjs";
7
- import "./chunk-PO4EL4BW.mjs";
6
+ } from "./chunk-3BSSTNFD.mjs";
7
+ import "./chunk-2HF7BTK6.mjs";
8
8
  import "./chunk-MHIUO3ST.mjs";
9
- import "./chunk-USQ76FYI.mjs";
9
+ import "./chunk-I5ZBW4DS.mjs";
10
10
  import "./chunk-LOSIWWM2.mjs";
11
11
  import "./chunk-35N7BIAE.mjs";
12
12
  import {
@@ -1158,6 +1158,8 @@ var attachHandler = withAuth({
1158
1158
  customer_data,
1159
1159
  body
1160
1160
  }) => {
1161
+ console.log("Body: ", body);
1162
+ console.log("Customer ID: ", customer_id);
1161
1163
  return await autumn.attach({
1162
1164
  ...sanitizeBody(body),
1163
1165
  customer_id,
@@ -1236,9 +1238,8 @@ var queryHandler = withAuth({
1236
1238
  body
1237
1239
  }) => {
1238
1240
  return await autumn.query({
1239
- customer_id,
1240
- range: body.range,
1241
- feature_id: body.featureId
1241
+ ...sanitizeBody(body),
1242
+ customer_id
1242
1243
  });
1243
1244
  }
1244
1245
  });
@@ -1348,10 +1349,14 @@ var createReferralCodeHandler = withAuth({
1348
1349
  customer_id,
1349
1350
  body
1350
1351
  }) => {
1351
- return await autumn.referrals.createCode({
1352
+ console.log("Creating referral code for customer: ", customer_id);
1353
+ console.log("Body: ", body);
1354
+ const res = await autumn.referrals.createCode({
1352
1355
  ...body,
1353
1356
  customer_id
1354
1357
  });
1358
+ console.log("Res: ", res);
1359
+ return res;
1355
1360
  }
1356
1361
  });
1357
1362
  var redeemReferralCodeHandler = withAuth({
@@ -3,10 +3,10 @@ import {
3
3
  } from "./chunk-UNZHJTEY.mjs";
4
4
  import {
5
5
  createRouterWithOptions
6
- } from "./chunk-4MEEJLXG.mjs";
7
- import "./chunk-PO4EL4BW.mjs";
6
+ } from "./chunk-3BSSTNFD.mjs";
7
+ import "./chunk-2HF7BTK6.mjs";
8
8
  import "./chunk-MHIUO3ST.mjs";
9
- import "./chunk-USQ76FYI.mjs";
9
+ import "./chunk-I5ZBW4DS.mjs";
10
10
  import "./chunk-LOSIWWM2.mjs";
11
11
  import "./chunk-35N7BIAE.mjs";
12
12
  import {
@@ -1161,6 +1161,8 @@ var attachHandler = withAuth({
1161
1161
  customer_data,
1162
1162
  body
1163
1163
  }) => {
1164
+ console.log("Body: ", body);
1165
+ console.log("Customer ID: ", customer_id);
1164
1166
  return await autumn.attach({
1165
1167
  ...sanitizeBody(body),
1166
1168
  customer_id,
@@ -1239,9 +1241,8 @@ var queryHandler = withAuth({
1239
1241
  body
1240
1242
  }) => {
1241
1243
  return await autumn.query({
1242
- customer_id,
1243
- range: body.range,
1244
- feature_id: body.featureId
1244
+ ...sanitizeBody(body),
1245
+ customer_id
1245
1246
  });
1246
1247
  }
1247
1248
  });
@@ -1351,10 +1352,14 @@ var createReferralCodeHandler = withAuth({
1351
1352
  customer_id,
1352
1353
  body
1353
1354
  }) => {
1354
- return await autumn.referrals.createCode({
1355
+ console.log("Creating referral code for customer: ", customer_id);
1356
+ console.log("Body: ", body);
1357
+ const res = await autumn.referrals.createCode({
1355
1358
  ...body,
1356
1359
  customer_id
1357
1360
  });
1361
+ console.log("Res: ", res);
1362
+ return res;
1358
1363
  }
1359
1364
  });
1360
1365
  var redeemReferralCodeHandler = withAuth({
@@ -3,10 +3,10 @@ import {
3
3
  } from "./chunk-UNZHJTEY.mjs";
4
4
  import {
5
5
  createRouterWithOptions
6
- } from "./chunk-4MEEJLXG.mjs";
7
- import "./chunk-PO4EL4BW.mjs";
6
+ } from "./chunk-3BSSTNFD.mjs";
7
+ import "./chunk-2HF7BTK6.mjs";
8
8
  import "./chunk-MHIUO3ST.mjs";
9
- import "./chunk-USQ76FYI.mjs";
9
+ import "./chunk-I5ZBW4DS.mjs";
10
10
  import "./chunk-LOSIWWM2.mjs";
11
11
  import "./chunk-35N7BIAE.mjs";
12
12
  import {
@@ -1158,6 +1158,8 @@ var attachHandler = withAuth({
1158
1158
  customer_data,
1159
1159
  body
1160
1160
  }) => {
1161
+ console.log("Body: ", body);
1162
+ console.log("Customer ID: ", customer_id);
1161
1163
  return await autumn.attach({
1162
1164
  ...sanitizeBody(body),
1163
1165
  customer_id,
@@ -1236,9 +1238,8 @@ var queryHandler = withAuth({
1236
1238
  body
1237
1239
  }) => {
1238
1240
  return await autumn.query({
1239
- customer_id,
1240
- range: body.range,
1241
- feature_id: body.featureId
1241
+ ...sanitizeBody(body),
1242
+ customer_id
1242
1243
  });
1243
1244
  }
1244
1245
  });
@@ -1348,10 +1349,14 @@ var createReferralCodeHandler = withAuth({
1348
1349
  customer_id,
1349
1350
  body
1350
1351
  }) => {
1351
- return await autumn.referrals.createCode({
1352
+ console.log("Creating referral code for customer: ", customer_id);
1353
+ console.log("Body: ", body);
1354
+ const res = await autumn.referrals.createCode({
1352
1355
  ...body,
1353
1356
  customer_id
1354
1357
  });
1358
+ console.log("Res: ", res);
1359
+ return res;
1355
1360
  }
1356
1361
  });
1357
1362
  var redeemReferralCodeHandler = withAuth({
@@ -3,10 +3,10 @@ import {
3
3
  } from "./chunk-UNZHJTEY.mjs";
4
4
  import {
5
5
  createRouterWithOptions
6
- } from "./chunk-4MEEJLXG.mjs";
7
- import "./chunk-PO4EL4BW.mjs";
6
+ } from "./chunk-3BSSTNFD.mjs";
7
+ import "./chunk-2HF7BTK6.mjs";
8
8
  import "./chunk-MHIUO3ST.mjs";
9
- import "./chunk-USQ76FYI.mjs";
9
+ import "./chunk-I5ZBW4DS.mjs";
10
10
  import "./chunk-LOSIWWM2.mjs";
11
11
  import "./chunk-35N7BIAE.mjs";
12
12
  import {
@@ -1157,6 +1157,8 @@ var attachHandler = withAuth({
1157
1157
  customer_data,
1158
1158
  body
1159
1159
  }) => {
1160
+ console.log("Body: ", body);
1161
+ console.log("Customer ID: ", customer_id);
1160
1162
  return await autumn.attach({
1161
1163
  ...sanitizeBody(body),
1162
1164
  customer_id,
@@ -1235,9 +1237,8 @@ var queryHandler = withAuth({
1235
1237
  body
1236
1238
  }) => {
1237
1239
  return await autumn.query({
1238
- customer_id,
1239
- range: body.range,
1240
- feature_id: body.featureId
1240
+ ...sanitizeBody(body),
1241
+ customer_id
1241
1242
  });
1242
1243
  }
1243
1244
  });
@@ -1347,10 +1348,14 @@ var createReferralCodeHandler = withAuth({
1347
1348
  customer_id,
1348
1349
  body
1349
1350
  }) => {
1350
- return await autumn.referrals.createCode({
1351
+ console.log("Creating referral code for customer: ", customer_id);
1352
+ console.log("Body: ", body);
1353
+ const res = await autumn.referrals.createCode({
1351
1354
  ...body,
1352
1355
  customer_id
1353
1356
  });
1357
+ console.log("Res: ", res);
1358
+ return res;
1354
1359
  }
1355
1360
  });
1356
1361
  var redeemReferralCodeHandler = withAuth({
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  createRouterWithOptions
3
- } from "./chunk-4MEEJLXG.mjs";
4
- import "./chunk-PO4EL4BW.mjs";
3
+ } from "./chunk-3BSSTNFD.mjs";
4
+ import "./chunk-2HF7BTK6.mjs";
5
5
  import "./chunk-MHIUO3ST.mjs";
6
- import "./chunk-USQ76FYI.mjs";
6
+ import "./chunk-I5ZBW4DS.mjs";
7
7
  import "./chunk-LOSIWWM2.mjs";
8
8
  import "./chunk-35N7BIAE.mjs";
9
9
  import {
@@ -1157,6 +1157,8 @@ var attachHandler = withAuth({
1157
1157
  customer_data,
1158
1158
  body
1159
1159
  }) => {
1160
+ console.log("Body: ", body);
1161
+ console.log("Customer ID: ", customer_id);
1160
1162
  return await autumn.attach({
1161
1163
  ...sanitizeBody(body),
1162
1164
  customer_id,
@@ -1235,9 +1237,8 @@ var queryHandler = withAuth({
1235
1237
  body
1236
1238
  }) => {
1237
1239
  return await autumn.query({
1238
- customer_id,
1239
- range: body.range,
1240
- feature_id: body.featureId
1240
+ ...sanitizeBody(body),
1241
+ customer_id
1241
1242
  });
1242
1243
  }
1243
1244
  });
@@ -1347,10 +1348,14 @@ var createReferralCodeHandler = withAuth({
1347
1348
  customer_id,
1348
1349
  body
1349
1350
  }) => {
1350
- return await autumn.referrals.createCode({
1351
+ console.log("Creating referral code for customer: ", customer_id);
1352
+ console.log("Body: ", body);
1353
+ const res = await autumn.referrals.createCode({
1351
1354
  ...body,
1352
1355
  customer_id
1353
1356
  });
1357
+ console.log("Res: ", res);
1358
+ return res;
1354
1359
  }
1355
1360
  });
1356
1361
  var redeemReferralCodeHandler = withAuth({
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  createRouterWithOptions
3
- } from "../chunk-4MEEJLXG.mjs";
4
- import "../chunk-PO4EL4BW.mjs";
3
+ } from "../chunk-3BSSTNFD.mjs";
4
+ import "../chunk-2HF7BTK6.mjs";
5
5
  import "../chunk-MHIUO3ST.mjs";
6
- import "../chunk-USQ76FYI.mjs";
6
+ import "../chunk-I5ZBW4DS.mjs";
7
7
  import "../chunk-LOSIWWM2.mjs";
8
8
  import "../chunk-35N7BIAE.mjs";
9
9
  import "../chunk-QOJMX7ML.mjs";
@@ -1133,6 +1133,8 @@ var attachHandler = withAuth({
1133
1133
  customer_data,
1134
1134
  body
1135
1135
  }) => {
1136
+ console.log("Body: ", body);
1137
+ console.log("Customer ID: ", customer_id);
1136
1138
  return await autumn.attach({
1137
1139
  ...sanitizeBody(body),
1138
1140
  customer_id,
@@ -1211,9 +1213,8 @@ var queryHandler = withAuth({
1211
1213
  body
1212
1214
  }) => {
1213
1215
  return await autumn.query({
1214
- customer_id,
1215
- range: body.range,
1216
- feature_id: body.featureId
1216
+ ...sanitizeBody(body),
1217
+ customer_id
1217
1218
  });
1218
1219
  }
1219
1220
  });
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  addGenRoutes
3
- } from "../chunk-PO4EL4BW.mjs";
3
+ } from "../chunk-2HF7BTK6.mjs";
4
4
  import "../chunk-35N7BIAE.mjs";
5
5
  import "../chunk-QOJMX7ML.mjs";
6
6
  import "../chunk-2TEL6LR5.mjs";
@@ -1111,10 +1111,14 @@ var createReferralCodeHandler = withAuth({
1111
1111
  customer_id,
1112
1112
  body
1113
1113
  }) => {
1114
- return await autumn.referrals.createCode({
1114
+ console.log("Creating referral code for customer: ", customer_id);
1115
+ console.log("Body: ", body);
1116
+ const res = await autumn.referrals.createCode({
1115
1117
  ...body,
1116
1118
  customer_id
1117
1119
  });
1120
+ console.log("Res: ", res);
1121
+ return res;
1118
1122
  }
1119
1123
  });
1120
1124
  var redeemReferralCodeHandler = withAuth({