autumn-js 0.1.78 → 0.1.79

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 (147) hide show
  1. package/dist/libraries/backend/better-auth.d.mts +3 -4
  2. package/dist/libraries/backend/better-auth.d.ts +3 -4
  3. package/dist/libraries/backend/better-auth.js +0 -10
  4. package/dist/libraries/backend/better-auth.mjs +3 -3
  5. package/dist/libraries/backend/{chunk-TBV5ICWG.mjs → chunk-44NIJD4F.mjs} +2 -7
  6. package/dist/libraries/backend/{chunk-JOPPC6LZ.mjs → chunk-UOA7N335.mjs} +0 -2
  7. package/dist/libraries/backend/{chunk-DWQVUPJC.mjs → chunk-YMTSI7AB.mjs} +0 -3
  8. package/dist/libraries/backend/convex.js +9 -18
  9. package/dist/libraries/backend/convex.mjs +6 -7
  10. package/dist/libraries/backend/elysia.js +0 -10
  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.js +0 -10
  15. package/dist/libraries/backend/express.mjs +3 -3
  16. package/dist/libraries/backend/fastify.js +0 -10
  17. package/dist/libraries/backend/fastify.mjs +3 -3
  18. package/dist/libraries/backend/hono.js +0 -10
  19. package/dist/libraries/backend/hono.mjs +3 -3
  20. package/dist/libraries/backend/index.d.mts +1 -1
  21. package/dist/libraries/backend/index.d.ts +1 -1
  22. package/dist/libraries/backend/index.js +0 -10
  23. package/dist/libraries/backend/index.mjs +3 -3
  24. package/dist/libraries/backend/next.js +0 -10
  25. package/dist/libraries/backend/next.mjs +3 -3
  26. package/dist/libraries/backend/react-router.js +0 -10
  27. package/dist/libraries/backend/react-router.mjs +3 -3
  28. package/dist/libraries/backend/remix_dep.js +0 -10
  29. package/dist/libraries/backend/remix_dep.mjs +3 -3
  30. package/dist/libraries/backend/routes/backendRouter.js +0 -10
  31. package/dist/libraries/backend/routes/backendRouter.mjs +3 -3
  32. package/dist/libraries/backend/routes/genRoutes.js +0 -2
  33. package/dist/libraries/backend/routes/genRoutes.mjs +1 -1
  34. package/dist/libraries/backend/routes/referralRoutes.js +0 -3
  35. package/dist/libraries/backend/routes/referralRoutes.mjs +1 -1
  36. package/dist/libraries/backend/supabase.js +0 -10
  37. package/dist/libraries/backend/supabase.mjs +3 -3
  38. package/dist/libraries/backend/tanstack.js +0 -10
  39. package/dist/libraries/backend/tanstack.mjs +3 -3
  40. package/dist/libraries/backend/utils/withAuth.d.mts +1 -1
  41. package/dist/libraries/backend/utils/withAuth.d.ts +1 -1
  42. package/dist/libraries/react/AutumnContext.d.mts +1 -1
  43. package/dist/libraries/react/AutumnContext.d.ts +1 -1
  44. package/dist/libraries/react/AutumnContext.mjs +3 -3
  45. package/dist/libraries/react/BaseAutumnProvider.d.mts +1 -1
  46. package/dist/libraries/react/BaseAutumnProvider.d.ts +1 -1
  47. package/dist/libraries/react/BaseAutumnProvider.js +0 -4
  48. package/dist/libraries/react/BaseAutumnProvider.mjs +5 -5
  49. package/dist/libraries/react/{ReactAutumnClient-DHK5xQSh.d.mts → ReactAutumnClient-BhnCTe45.d.mts} +1 -1
  50. package/dist/libraries/react/{ReactAutumnClient-gCQI1CIi.d.ts → ReactAutumnClient-DWqywQa3.d.ts} +1 -1
  51. package/dist/libraries/react/ReactAutumnProvider.js +0 -4
  52. package/dist/libraries/react/ReactAutumnProvider.mjs +6 -6
  53. package/dist/libraries/react/{chunk-4M6OTLD6.mjs → chunk-35VLNLQV.mjs} +1 -1
  54. package/dist/libraries/react/{chunk-Y626BPVN.mjs → chunk-4SUGB4ZT.mjs} +9 -9
  55. package/dist/libraries/react/chunk-56QLXX4H.mjs +202 -0
  56. package/dist/libraries/react/{chunk-BW2SK4UJ.mjs → chunk-5C63G4CQ.mjs} +1 -1
  57. package/dist/libraries/react/{chunk-DT3IDHYN.mjs → chunk-5G5GA7P6.mjs} +3 -3
  58. package/dist/libraries/react/{chunk-CWQ4UVCS.mjs → chunk-6ZRY6PKI.mjs} +18 -13
  59. package/dist/libraries/react/{chunk-C3LUB2Q3.mjs → chunk-AU2F4GNP.mjs} +6 -6
  60. package/dist/libraries/react/{chunk-MJF25D7E.mjs → chunk-CS5EEOVE.mjs} +32 -32
  61. package/dist/libraries/react/chunk-CSHMYQ4F.mjs +44 -0
  62. package/dist/libraries/react/{chunk-6I5DGTWH.mjs → chunk-CVP2NVVB.mjs} +2 -2
  63. package/dist/libraries/react/{chunk-ZTXC6FCH.mjs → chunk-DFYYSB6J.mjs} +1 -1
  64. package/dist/libraries/react/{chunk-5A5JYUXK.mjs → chunk-DOHZO6CD.mjs} +2 -2
  65. package/dist/libraries/react/{chunk-EMHT2HX4.mjs → chunk-EXPTYLRU.mjs} +9 -9
  66. package/dist/libraries/react/{chunk-QQ5722JR.mjs → chunk-FPPUNUTG.mjs} +1 -1
  67. package/dist/libraries/react/{chunk-4R77E3G5.mjs → chunk-GW5XXBD2.mjs} +1 -1
  68. package/dist/libraries/react/{chunk-C5KYPZWV.mjs → chunk-HC34RXZX.mjs} +2 -2
  69. package/dist/libraries/react/{chunk-JZH2QS6K.mjs → chunk-KK4T73OI.mjs} +449 -447
  70. package/dist/libraries/react/{chunk-LR5XT5S2.mjs → chunk-LOZSSINH.mjs} +1 -1
  71. package/dist/libraries/react/{chunk-36POY2CM.mjs → chunk-O5YZQMPB.mjs} +20 -20
  72. package/dist/libraries/react/{chunk-3PZRTZOH.mjs → chunk-OIE4REKJ.mjs} +1 -1
  73. package/dist/libraries/react/{chunk-7N75YTVM.mjs → chunk-VBH3VM7U.mjs} +109 -21
  74. package/dist/libraries/react/{chunk-F5JYHOSC.mjs → chunk-WL23XOKQ.mjs} +1 -5
  75. package/dist/libraries/react/{chunk-UVPB6ZBI.mjs → chunk-XJTDWHH6.mjs} +1 -1
  76. package/dist/libraries/react/client/ConvexAutumnClient.d.mts +1 -1
  77. package/dist/libraries/react/client/ConvexAutumnClient.d.ts +1 -1
  78. package/dist/libraries/react/client/ReactAutumnClient.d.mts +1 -1
  79. package/dist/libraries/react/client/ReactAutumnClient.d.ts +1 -1
  80. package/dist/libraries/react/client/ReactAutumnClient.mjs +2 -2
  81. package/dist/libraries/react/client/clientAnalyticsMethods.d.mts +1 -1
  82. package/dist/libraries/react/client/clientAnalyticsMethods.d.ts +1 -1
  83. package/dist/libraries/react/client/clientCompMethods.d.mts +1 -1
  84. package/dist/libraries/react/client/clientCompMethods.d.ts +1 -1
  85. package/dist/libraries/react/client/clientCusMethods.d.mts +1 -1
  86. package/dist/libraries/react/client/clientCusMethods.d.ts +1 -1
  87. package/dist/libraries/react/client/clientEntityMethods.d.mts +1 -1
  88. package/dist/libraries/react/client/clientEntityMethods.d.ts +1 -1
  89. package/dist/libraries/react/client/clientGenMethods.d.mts +1 -1
  90. package/dist/libraries/react/client/clientGenMethods.d.ts +1 -1
  91. package/dist/libraries/react/client/clientProdMethods.d.mts +1 -1
  92. package/dist/libraries/react/client/clientProdMethods.d.ts +1 -1
  93. package/dist/libraries/react/client/clientReferralMethods.d.mts +1 -1
  94. package/dist/libraries/react/client/clientReferralMethods.d.ts +1 -1
  95. package/dist/libraries/react/client/types/clientAnalyticsTypes.d.mts +2 -2
  96. package/dist/libraries/react/client/types/clientAnalyticsTypes.d.ts +2 -2
  97. package/dist/libraries/react/components/checkout-dialog/checkout-dialog-synced.js +507 -405
  98. package/dist/libraries/react/components/checkout-dialog/checkout-dialog-synced.mjs +27 -27
  99. package/dist/libraries/react/components/paywall-dialog/paywall-dialog-synced.js +346 -240
  100. package/dist/libraries/react/components/paywall-dialog/paywall-dialog-synced.mjs +27 -27
  101. package/dist/libraries/react/components/pricing-table/pricing-table-synced.js +547 -445
  102. package/dist/libraries/react/components/pricing-table/pricing-table-synced.mjs +27 -27
  103. package/dist/libraries/react/components/ui/accordion.js +19 -18
  104. package/dist/libraries/react/components/ui/accordion.mjs +4 -4
  105. package/dist/libraries/react/components/ui/button.js +19 -5
  106. package/dist/libraries/react/components/ui/button.mjs +2 -2
  107. package/dist/libraries/react/components/ui/dialog.js +45 -44
  108. package/dist/libraries/react/components/ui/dialog.mjs +5 -5
  109. package/dist/libraries/react/components/ui/popover.js +56 -50
  110. package/dist/libraries/react/components/ui/popover.mjs +6 -6
  111. package/dist/libraries/react/components/ui/switch.js +14 -13
  112. package/dist/libraries/react/components/ui/switch.mjs +4 -4
  113. package/dist/libraries/react/hooks/helpers/handleCheck.d.mts +1 -1
  114. package/dist/libraries/react/hooks/helpers/handleCheck.d.ts +1 -1
  115. package/dist/libraries/react/hooks/helpers/useAutumnBase.d.mts +1 -1
  116. package/dist/libraries/react/hooks/helpers/useAutumnBase.d.ts +1 -1
  117. package/dist/libraries/react/hooks/useAggregateEvents.mjs +4 -4
  118. package/dist/libraries/react/hooks/useAnalytics.mjs +4 -4
  119. package/dist/libraries/react/hooks/useCustomer.d.mts +1 -1
  120. package/dist/libraries/react/hooks/useCustomer.d.ts +1 -1
  121. package/dist/libraries/react/hooks/useCustomer.js +0 -4
  122. package/dist/libraries/react/hooks/useCustomer.mjs +5 -5
  123. package/dist/libraries/react/hooks/useCustomerBase.d.mts +1 -1
  124. package/dist/libraries/react/hooks/useCustomerBase.d.ts +1 -1
  125. package/dist/libraries/react/hooks/useCustomerBase.js +0 -4
  126. package/dist/libraries/react/hooks/useCustomerBase.mjs +4 -4
  127. package/dist/libraries/react/hooks/useEntity.mjs +5 -5
  128. package/dist/libraries/react/hooks/useEntityBase.d.mts +1 -1
  129. package/dist/libraries/react/hooks/useEntityBase.d.ts +1 -1
  130. package/dist/libraries/react/hooks/useEntityBase.mjs +4 -4
  131. package/dist/libraries/react/hooks/useListEvents.mjs +4 -4
  132. package/dist/libraries/react/hooks/usePaywall.mjs +4 -4
  133. package/dist/libraries/react/hooks/usePricingTable.mjs +4 -4
  134. package/dist/libraries/react/hooks/usePricingTableBase.d.mts +1 -1
  135. package/dist/libraries/react/hooks/usePricingTableBase.d.ts +1 -1
  136. package/dist/libraries/react/hooks/useProductsBase.d.mts +1 -1
  137. package/dist/libraries/react/hooks/useProductsBase.d.ts +1 -1
  138. package/dist/libraries/react/index.js +552 -450
  139. package/dist/libraries/react/index.mjs +499 -397
  140. package/dist/next/client/NextAutumnClient.d.mts +2 -2
  141. package/dist/next/client/NextAutumnClient.d.ts +2 -2
  142. package/package.json +1 -1
  143. package/dist/libraries/react/chunk-ACRIHVEO.mjs +0 -134
  144. package/dist/libraries/react/chunk-WA7QZHL5.mjs +0 -101
  145. package/dist/libraries/backend/{billingTypes-R484Te9H.d.mts → billingTypes-CL0TFwXf.d.mts} +17 -17
  146. package/dist/libraries/backend/{billingTypes-ZgrABOib.d.ts → billingTypes-xXaWtCka.d.ts} +17 -17
  147. package/dist/libraries/react/{chunk-6JD7NIYF.mjs → chunk-LPWQ2U3T.mjs} +3 -3
@@ -1,5 +1,4 @@
1
1
  import * as better_auth from 'better-auth';
2
- import * as better_call from 'better-call';
3
2
  import { z } from 'zod/v4';
4
3
  import { AutumnOptions } from './utils/betterAuth/types.mjs';
5
4
  import 'better-auth/plugins';
@@ -28,7 +27,7 @@ declare const autumn: (options?: AutumnOptions) => {
28
27
  } & {
29
28
  asResponse?: boolean;
30
29
  returnHeaders?: boolean;
31
- use?: better_call.Middleware[];
30
+ use?: better_auth.Middleware[];
32
31
  path?: string;
33
32
  } & {
34
33
  asResponse?: AsResponse | undefined;
@@ -709,7 +708,7 @@ declare const autumn: (options?: AutumnOptions) => {
709
708
  featureId: string | string[];
710
709
  groupBy?: string | undefined;
711
710
  range?: "24h" | "7d" | "30d" | "90d" | "last_cycle" | "1bc" | "3bc" | undefined;
712
- binSize?: "day" | "hour" | undefined;
711
+ binSize?: "hour" | "day" | undefined;
713
712
  customRange?: {
714
713
  start: number;
715
714
  end: number;
@@ -753,8 +752,8 @@ declare const autumn: (options?: AutumnOptions) => {
753
752
  "3bc": "3bc";
754
753
  }>>;
755
754
  binSize: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
756
- day: "day";
757
755
  hour: "hour";
756
+ day: "day";
758
757
  }>>>;
759
758
  customRange: z.ZodOptional<z.ZodObject<{
760
759
  start: z.ZodNumber;
@@ -1,5 +1,4 @@
1
1
  import * as better_auth from 'better-auth';
2
- import * as better_call from 'better-call';
3
2
  import { z } from 'zod/v4';
4
3
  import { AutumnOptions } from './utils/betterAuth/types.js';
5
4
  import 'better-auth/plugins';
@@ -28,7 +27,7 @@ declare const autumn: (options?: AutumnOptions) => {
28
27
  } & {
29
28
  asResponse?: boolean;
30
29
  returnHeaders?: boolean;
31
- use?: better_call.Middleware[];
30
+ use?: better_auth.Middleware[];
32
31
  path?: string;
33
32
  } & {
34
33
  asResponse?: AsResponse | undefined;
@@ -709,7 +708,7 @@ declare const autumn: (options?: AutumnOptions) => {
709
708
  featureId: string | string[];
710
709
  groupBy?: string | undefined;
711
710
  range?: "24h" | "7d" | "30d" | "90d" | "last_cycle" | "1bc" | "3bc" | undefined;
712
- binSize?: "day" | "hour" | undefined;
711
+ binSize?: "hour" | "day" | undefined;
713
712
  customRange?: {
714
713
  start: number;
715
714
  end: number;
@@ -753,8 +752,8 @@ declare const autumn: (options?: AutumnOptions) => {
753
752
  "3bc": "3bc";
754
753
  }>>;
755
754
  binSize: z.ZodOptional<z.ZodDefault<z.ZodEnum<{
756
- day: "day";
757
755
  hour: "hour";
756
+ day: "day";
758
757
  }>>>;
759
758
  customRange: z.ZodOptional<z.ZodObject<{
760
759
  start: z.ZodNumber;
@@ -2060,8 +2060,6 @@ var attachHandler = (options) => withAuth({
2060
2060
  customer_data,
2061
2061
  body
2062
2062
  }) => {
2063
- console.log("Body: ", body);
2064
- console.log("Customer ID: ", customer_id);
2065
2063
  return await autumn2.attach({
2066
2064
  ...sanitizeBody2(body),
2067
2065
  customer_id,
@@ -2207,13 +2205,10 @@ var createReferralCodeHandler = (options) => withAuth({
2207
2205
  customer_id,
2208
2206
  body
2209
2207
  }) => {
2210
- console.log("Creating referral code for customer: ", customer_id);
2211
- console.log("Body: ", body);
2212
2208
  const res = await autumn2.referrals.createCode({
2213
2209
  ...body,
2214
2210
  customer_id
2215
2211
  });
2216
- console.log("Res: ", res);
2217
2212
  return res;
2218
2213
  },
2219
2214
  suppressLogs: options?.suppressLogs
@@ -2255,16 +2250,11 @@ var createCustomerHandler = (options) => withAuth({
2255
2250
  customer_data = {},
2256
2251
  body
2257
2252
  }) => {
2258
- console.log("Body: ", JSON.stringify(body, null, 2));
2259
2253
  const res = await autumn2.customers.create({
2260
2254
  id: customer_id,
2261
2255
  ...customer_data,
2262
2256
  ...sanitizeCustomerBody(body)
2263
2257
  });
2264
- console.log(
2265
- "Fetched customer products: ",
2266
- JSON.stringify(res?.data?.products, null, 2)
2267
- );
2268
2258
  return res;
2269
2259
  },
2270
2260
  suppressLogs: options?.suppressLogs
@@ -8,11 +8,11 @@ import {
8
8
  } from "./chunk-UNZHJTEY.mjs";
9
9
  import {
10
10
  createRouterWithOptions
11
- } from "./chunk-TBV5ICWG.mjs";
11
+ } from "./chunk-44NIJD4F.mjs";
12
12
  import "./chunk-NJTZVTKU.mjs";
13
- import "./chunk-JOPPC6LZ.mjs";
13
+ import "./chunk-UOA7N335.mjs";
14
14
  import "./chunk-5QQQ3LHJ.mjs";
15
- import "./chunk-DWQVUPJC.mjs";
15
+ import "./chunk-YMTSI7AB.mjs";
16
16
  import "./chunk-JAPNDBOX.mjs";
17
17
  import "./chunk-TX2PKTBZ.mjs";
18
18
  import {
@@ -3,13 +3,13 @@ import {
3
3
  } from "./chunk-NJTZVTKU.mjs";
4
4
  import {
5
5
  addGenRoutes
6
- } from "./chunk-JOPPC6LZ.mjs";
6
+ } from "./chunk-UOA7N335.mjs";
7
7
  import {
8
8
  addProductRoutes
9
9
  } from "./chunk-5QQQ3LHJ.mjs";
10
10
  import {
11
11
  addReferralRoutes
12
- } from "./chunk-DWQVUPJC.mjs";
12
+ } from "./chunk-YMTSI7AB.mjs";
13
13
  import {
14
14
  addAnalyticsRoutes
15
15
  } from "./chunk-JAPNDBOX.mjs";
@@ -39,16 +39,11 @@ var createCustomerHandler = (options) => withAuth({
39
39
  customer_data = {},
40
40
  body
41
41
  }) => {
42
- console.log("Body: ", JSON.stringify(body, null, 2));
43
42
  const res = await autumn.customers.create({
44
43
  id: customer_id,
45
44
  ...customer_data,
46
45
  ...sanitizeCustomerBody(body)
47
46
  });
48
- console.log(
49
- "Fetched customer products: ",
50
- JSON.stringify(res?.data?.products, null, 2)
51
- );
52
47
  return res;
53
48
  },
54
49
  suppressLogs: options?.suppressLogs
@@ -36,8 +36,6 @@ var attachHandler = (options) => withAuth({
36
36
  customer_data,
37
37
  body
38
38
  }) => {
39
- console.log("Body: ", body);
40
- console.log("Customer ID: ", customer_id);
41
39
  return await autumn.attach({
42
40
  ...sanitizeBody(body),
43
41
  customer_id,
@@ -13,13 +13,10 @@ var createReferralCodeHandler = (options) => withAuth({
13
13
  customer_id,
14
14
  body
15
15
  }) => {
16
- console.log("Creating referral code for customer: ", customer_id);
17
- console.log("Body: ", body);
18
16
  const res = await autumn.referrals.createCode({
19
17
  ...body,
20
18
  customer_id
21
19
  });
22
- console.log("Res: ", res);
23
20
  return res;
24
21
  },
25
22
  suppressLogs: options?.suppressLogs
@@ -35,9 +35,6 @@ __export(convex_exports, {
35
35
  });
36
36
  module.exports = __toCommonJS(convex_exports);
37
37
 
38
- // src/libraries/backend/routes/backendRouter.ts
39
- var import_rou36 = require("rou3");
40
-
41
38
  // src/libraries/backend/constants.ts
42
39
  var autumnApiUrl = "https://api.useautumn.com/v1";
43
40
  var BASE_PATH = "/api/autumn";
@@ -1624,6 +1621,12 @@ var BillingPreviewResponseSchema = import_v412.z.object({
1624
1621
  }).optional()
1625
1622
  });
1626
1623
 
1624
+ // src/libraries/backend/convex.ts
1625
+ var import_rou37 = require("rou3");
1626
+
1627
+ // src/libraries/backend/routes/backendRouter.ts
1628
+ var import_rou36 = require("rou3");
1629
+
1627
1630
  // src/libraries/backend/utils/backendRes.ts
1628
1631
  var toBackendRes = ({ res }) => {
1629
1632
  let statusCode = res.statusCode ? res.statusCode : res.error ? 500 : 200;
@@ -1895,8 +1898,6 @@ var attachHandler = (options) => withAuth({
1895
1898
  customer_data,
1896
1899
  body
1897
1900
  }) => {
1898
- console.log("Body: ", body);
1899
- console.log("Customer ID: ", customer_id);
1900
1901
  return await autumn.attach({
1901
1902
  ...sanitizeBody2(body),
1902
1903
  customer_id,
@@ -2042,13 +2043,10 @@ var createReferralCodeHandler = (options) => withAuth({
2042
2043
  customer_id,
2043
2044
  body
2044
2045
  }) => {
2045
- console.log("Creating referral code for customer: ", customer_id);
2046
- console.log("Body: ", body);
2047
2046
  const res = await autumn.referrals.createCode({
2048
2047
  ...body,
2049
2048
  customer_id
2050
2049
  });
2051
- console.log("Res: ", res);
2052
2050
  return res;
2053
2051
  },
2054
2052
  suppressLogs: options?.suppressLogs
@@ -2090,16 +2088,11 @@ var createCustomerHandler = (options) => withAuth({
2090
2088
  customer_data = {},
2091
2089
  body
2092
2090
  }) => {
2093
- console.log("Body: ", JSON.stringify(body, null, 2));
2094
2091
  const res = await autumn.customers.create({
2095
2092
  id: customer_id,
2096
2093
  ...customer_data,
2097
2094
  ...sanitizeCustomerBody(body)
2098
2095
  });
2099
- console.log(
2100
- "Fetched customer products: ",
2101
- JSON.stringify(res?.data?.products, null, 2)
2102
- );
2103
2096
  return res;
2104
2097
  },
2105
2098
  suppressLogs: options?.suppressLogs
@@ -2162,7 +2155,6 @@ var secretKeyCheck = (secretKey) => {
2162
2155
  };
2163
2156
 
2164
2157
  // src/libraries/backend/convex.ts
2165
- var import_rou37 = require("rou3");
2166
2158
  function autumnHandler(options) {
2167
2159
  const router = createRouterWithOptions();
2168
2160
  return options.httpAction(async (ctx, request) => {
@@ -2179,7 +2171,7 @@ function autumnHandler(options) {
2179
2171
  })
2180
2172
  });
2181
2173
  }
2182
- let { found, error: resError } = secretKeyCheck(options.secretKey);
2174
+ const { found, error: resError } = secretKeyCheck(options.secretKey);
2183
2175
  if (!found && !options.secretKey) {
2184
2176
  return Response.json(resError, { status: resError.statusCode });
2185
2177
  }
@@ -2230,7 +2222,7 @@ function convexHandler(options) {
2230
2222
  "Access-Control-Allow-Headers": "*",
2231
2223
  "Access-Control-Allow-Credentials": "true",
2232
2224
  "Access-Control-Max-Age": "86400",
2233
- "Vary": "Origin"
2225
+ Vary: "Origin"
2234
2226
  };
2235
2227
  return async (ctx, request) => {
2236
2228
  const headers = request.headers;
@@ -2239,7 +2231,7 @@ function convexHandler(options) {
2239
2231
  headers: new Headers(corsHeaders)
2240
2232
  });
2241
2233
  }
2242
- let { found, error: resError } = secretKeyCheck(options.secretKey);
2234
+ const { found, error: resError } = secretKeyCheck(options.secretKey);
2243
2235
  if (!found && !options.secretKey) {
2244
2236
  return new Response(JSON.stringify(resError), {
2245
2237
  status: resError.statusCode,
@@ -2277,7 +2269,6 @@ function convexHandler(options) {
2277
2269
  }
2278
2270
  }
2279
2271
  try {
2280
- console.log("Identity in convex.ts:", options.identity);
2281
2272
  const result = await handler({
2282
2273
  autumn,
2283
2274
  body,
@@ -3,11 +3,11 @@ import {
3
3
  } from "./chunk-UNZHJTEY.mjs";
4
4
  import {
5
5
  createRouterWithOptions
6
- } from "./chunk-TBV5ICWG.mjs";
6
+ } from "./chunk-44NIJD4F.mjs";
7
7
  import "./chunk-NJTZVTKU.mjs";
8
- import "./chunk-JOPPC6LZ.mjs";
8
+ import "./chunk-UOA7N335.mjs";
9
9
  import "./chunk-5QQQ3LHJ.mjs";
10
- import "./chunk-DWQVUPJC.mjs";
10
+ import "./chunk-YMTSI7AB.mjs";
11
11
  import "./chunk-JAPNDBOX.mjs";
12
12
  import "./chunk-TX2PKTBZ.mjs";
13
13
  import {
@@ -34,7 +34,7 @@ function autumnHandler(options) {
34
34
  })
35
35
  });
36
36
  }
37
- let { found, error: resError } = secretKeyCheck(options.secretKey);
37
+ const { found, error: resError } = secretKeyCheck(options.secretKey);
38
38
  if (!found && !options.secretKey) {
39
39
  return Response.json(resError, { status: resError.statusCode });
40
40
  }
@@ -85,7 +85,7 @@ function convexHandler(options) {
85
85
  "Access-Control-Allow-Headers": "*",
86
86
  "Access-Control-Allow-Credentials": "true",
87
87
  "Access-Control-Max-Age": "86400",
88
- "Vary": "Origin"
88
+ Vary: "Origin"
89
89
  };
90
90
  return async (ctx, request) => {
91
91
  const headers = request.headers;
@@ -94,7 +94,7 @@ function convexHandler(options) {
94
94
  headers: new Headers(corsHeaders)
95
95
  });
96
96
  }
97
- let { found, error: resError } = secretKeyCheck(options.secretKey);
97
+ const { found, error: resError } = secretKeyCheck(options.secretKey);
98
98
  if (!found && !options.secretKey) {
99
99
  return new Response(JSON.stringify(resError), {
100
100
  status: resError.statusCode,
@@ -132,7 +132,6 @@ function convexHandler(options) {
132
132
  }
133
133
  }
134
134
  try {
135
- console.log("Identity in convex.ts:", options.identity);
136
135
  const result = await handler({
137
136
  autumn,
138
137
  body,
@@ -1895,8 +1895,6 @@ var attachHandler = (options) => withAuth({
1895
1895
  customer_data,
1896
1896
  body
1897
1897
  }) => {
1898
- console.log("Body: ", body);
1899
- console.log("Customer ID: ", customer_id);
1900
1898
  return await autumn.attach({
1901
1899
  ...sanitizeBody2(body),
1902
1900
  customer_id,
@@ -2042,13 +2040,10 @@ var createReferralCodeHandler = (options) => withAuth({
2042
2040
  customer_id,
2043
2041
  body
2044
2042
  }) => {
2045
- console.log("Creating referral code for customer: ", customer_id);
2046
- console.log("Body: ", body);
2047
2043
  const res = await autumn.referrals.createCode({
2048
2044
  ...body,
2049
2045
  customer_id
2050
2046
  });
2051
- console.log("Res: ", res);
2052
2047
  return res;
2053
2048
  },
2054
2049
  suppressLogs: options?.suppressLogs
@@ -2090,16 +2085,11 @@ var createCustomerHandler = (options) => withAuth({
2090
2085
  customer_data = {},
2091
2086
  body
2092
2087
  }) => {
2093
- console.log("Body: ", JSON.stringify(body, null, 2));
2094
2088
  const res = await autumn.customers.create({
2095
2089
  id: customer_id,
2096
2090
  ...customer_data,
2097
2091
  ...sanitizeCustomerBody(body)
2098
2092
  });
2099
- console.log(
2100
- "Fetched customer products: ",
2101
- JSON.stringify(res?.data?.products, null, 2)
2102
- );
2103
2093
  return res;
2104
2094
  },
2105
2095
  suppressLogs: options?.suppressLogs
@@ -3,11 +3,11 @@ import {
3
3
  } from "./chunk-UNZHJTEY.mjs";
4
4
  import {
5
5
  createRouterWithOptions
6
- } from "./chunk-TBV5ICWG.mjs";
6
+ } from "./chunk-44NIJD4F.mjs";
7
7
  import "./chunk-NJTZVTKU.mjs";
8
- import "./chunk-JOPPC6LZ.mjs";
8
+ import "./chunk-UOA7N335.mjs";
9
9
  import "./chunk-5QQQ3LHJ.mjs";
10
- import "./chunk-DWQVUPJC.mjs";
10
+ import "./chunk-YMTSI7AB.mjs";
11
11
  import "./chunk-JAPNDBOX.mjs";
12
12
  import {
13
13
  toSnakeCase
@@ -1,4 +1,4 @@
1
- import { A as Autumn } from './billingTypes-R484Te9H.mjs';
1
+ import { A as Autumn } from './billingTypes-CL0TFwXf.mjs';
2
2
  import { AuthResult } from './utils/AuthFunction.mjs';
3
3
  import 'zod/v4';
4
4
  import './response-BBvvMvoC.mjs';
@@ -1,4 +1,4 @@
1
- import { A as Autumn } from './billingTypes-ZgrABOib.js';
1
+ import { A as Autumn } from './billingTypes-xXaWtCka.js';
2
2
  import { AuthResult } from './utils/AuthFunction.js';
3
3
  import 'zod/v4';
4
4
  import './response-BBvvMvoC.js';
@@ -1895,8 +1895,6 @@ var attachHandler = (options) => withAuth({
1895
1895
  customer_data,
1896
1896
  body
1897
1897
  }) => {
1898
- console.log("Body: ", body);
1899
- console.log("Customer ID: ", customer_id);
1900
1898
  return await autumn.attach({
1901
1899
  ...sanitizeBody2(body),
1902
1900
  customer_id,
@@ -2042,13 +2040,10 @@ var createReferralCodeHandler = (options) => withAuth({
2042
2040
  customer_id,
2043
2041
  body
2044
2042
  }) => {
2045
- console.log("Creating referral code for customer: ", customer_id);
2046
- console.log("Body: ", body);
2047
2043
  const res = await autumn.referrals.createCode({
2048
2044
  ...body,
2049
2045
  customer_id
2050
2046
  });
2051
- console.log("Res: ", res);
2052
2047
  return res;
2053
2048
  },
2054
2049
  suppressLogs: options?.suppressLogs
@@ -2090,16 +2085,11 @@ var createCustomerHandler = (options) => withAuth({
2090
2085
  customer_data = {},
2091
2086
  body
2092
2087
  }) => {
2093
- console.log("Body: ", JSON.stringify(body, null, 2));
2094
2088
  const res = await autumn.customers.create({
2095
2089
  id: customer_id,
2096
2090
  ...customer_data,
2097
2091
  ...sanitizeCustomerBody(body)
2098
2092
  });
2099
- console.log(
2100
- "Fetched customer products: ",
2101
- JSON.stringify(res?.data?.products, null, 2)
2102
- );
2103
2093
  return res;
2104
2094
  },
2105
2095
  suppressLogs: options?.suppressLogs
@@ -3,11 +3,11 @@ import {
3
3
  } from "./chunk-UNZHJTEY.mjs";
4
4
  import {
5
5
  createRouterWithOptions
6
- } from "./chunk-TBV5ICWG.mjs";
6
+ } from "./chunk-44NIJD4F.mjs";
7
7
  import "./chunk-NJTZVTKU.mjs";
8
- import "./chunk-JOPPC6LZ.mjs";
8
+ import "./chunk-UOA7N335.mjs";
9
9
  import "./chunk-5QQQ3LHJ.mjs";
10
- import "./chunk-DWQVUPJC.mjs";
10
+ import "./chunk-YMTSI7AB.mjs";
11
11
  import "./chunk-JAPNDBOX.mjs";
12
12
  import "./chunk-TX2PKTBZ.mjs";
13
13
  import {
@@ -1895,8 +1895,6 @@ var attachHandler = (options) => withAuth({
1895
1895
  customer_data,
1896
1896
  body
1897
1897
  }) => {
1898
- console.log("Body: ", body);
1899
- console.log("Customer ID: ", customer_id);
1900
1898
  return await autumn.attach({
1901
1899
  ...sanitizeBody2(body),
1902
1900
  customer_id,
@@ -2042,13 +2040,10 @@ var createReferralCodeHandler = (options) => withAuth({
2042
2040
  customer_id,
2043
2041
  body
2044
2042
  }) => {
2045
- console.log("Creating referral code for customer: ", customer_id);
2046
- console.log("Body: ", body);
2047
2043
  const res = await autumn.referrals.createCode({
2048
2044
  ...body,
2049
2045
  customer_id
2050
2046
  });
2051
- console.log("Res: ", res);
2052
2047
  return res;
2053
2048
  },
2054
2049
  suppressLogs: options?.suppressLogs
@@ -2090,16 +2085,11 @@ var createCustomerHandler = (options) => withAuth({
2090
2085
  customer_data = {},
2091
2086
  body
2092
2087
  }) => {
2093
- console.log("Body: ", JSON.stringify(body, null, 2));
2094
2088
  const res = await autumn.customers.create({
2095
2089
  id: customer_id,
2096
2090
  ...customer_data,
2097
2091
  ...sanitizeCustomerBody(body)
2098
2092
  });
2099
- console.log(
2100
- "Fetched customer products: ",
2101
- JSON.stringify(res?.data?.products, null, 2)
2102
- );
2103
2093
  return res;
2104
2094
  },
2105
2095
  suppressLogs: options?.suppressLogs
@@ -3,11 +3,11 @@ import {
3
3
  } from "./chunk-UNZHJTEY.mjs";
4
4
  import {
5
5
  createRouterWithOptions
6
- } from "./chunk-TBV5ICWG.mjs";
6
+ } from "./chunk-44NIJD4F.mjs";
7
7
  import "./chunk-NJTZVTKU.mjs";
8
- import "./chunk-JOPPC6LZ.mjs";
8
+ import "./chunk-UOA7N335.mjs";
9
9
  import "./chunk-5QQQ3LHJ.mjs";
10
- import "./chunk-DWQVUPJC.mjs";
10
+ import "./chunk-YMTSI7AB.mjs";
11
11
  import "./chunk-JAPNDBOX.mjs";
12
12
  import "./chunk-TX2PKTBZ.mjs";
13
13
  import {
@@ -1895,8 +1895,6 @@ var attachHandler = (options) => withAuth({
1895
1895
  customer_data,
1896
1896
  body
1897
1897
  }) => {
1898
- console.log("Body: ", body);
1899
- console.log("Customer ID: ", customer_id);
1900
1898
  return await autumn.attach({
1901
1899
  ...sanitizeBody2(body),
1902
1900
  customer_id,
@@ -2042,13 +2040,10 @@ var createReferralCodeHandler = (options) => withAuth({
2042
2040
  customer_id,
2043
2041
  body
2044
2042
  }) => {
2045
- console.log("Creating referral code for customer: ", customer_id);
2046
- console.log("Body: ", body);
2047
2043
  const res = await autumn.referrals.createCode({
2048
2044
  ...body,
2049
2045
  customer_id
2050
2046
  });
2051
- console.log("Res: ", res);
2052
2047
  return res;
2053
2048
  },
2054
2049
  suppressLogs: options?.suppressLogs
@@ -2090,16 +2085,11 @@ var createCustomerHandler = (options) => withAuth({
2090
2085
  customer_data = {},
2091
2086
  body
2092
2087
  }) => {
2093
- console.log("Body: ", JSON.stringify(body, null, 2));
2094
2088
  const res = await autumn.customers.create({
2095
2089
  id: customer_id,
2096
2090
  ...customer_data,
2097
2091
  ...sanitizeCustomerBody(body)
2098
2092
  });
2099
- console.log(
2100
- "Fetched customer products: ",
2101
- JSON.stringify(res?.data?.products, null, 2)
2102
- );
2103
2093
  return res;
2104
2094
  },
2105
2095
  suppressLogs: options?.suppressLogs
@@ -3,11 +3,11 @@ import {
3
3
  } from "./chunk-UNZHJTEY.mjs";
4
4
  import {
5
5
  createRouterWithOptions
6
- } from "./chunk-TBV5ICWG.mjs";
6
+ } from "./chunk-44NIJD4F.mjs";
7
7
  import "./chunk-NJTZVTKU.mjs";
8
- import "./chunk-JOPPC6LZ.mjs";
8
+ import "./chunk-UOA7N335.mjs";
9
9
  import "./chunk-5QQQ3LHJ.mjs";
10
- import "./chunk-DWQVUPJC.mjs";
10
+ import "./chunk-YMTSI7AB.mjs";
11
11
  import "./chunk-JAPNDBOX.mjs";
12
12
  import "./chunk-TX2PKTBZ.mjs";
13
13
  import {
@@ -1,4 +1,4 @@
1
- export { A as Autumn } from './billingTypes-R484Te9H.mjs';
1
+ export { A as Autumn } from './billingTypes-CL0TFwXf.mjs';
2
2
  import 'zod/v4';
3
3
  import './response-BBvvMvoC.mjs';
4
4
 
@@ -1,4 +1,4 @@
1
- export { A as Autumn } from './billingTypes-ZgrABOib.js';
1
+ export { A as Autumn } from './billingTypes-xXaWtCka.js';
2
2
  import 'zod/v4';
3
3
  import './response-BBvvMvoC.js';
4
4
 
@@ -1895,8 +1895,6 @@ var attachHandler = (options) => withAuth({
1895
1895
  customer_data,
1896
1896
  body
1897
1897
  }) => {
1898
- console.log("Body: ", body);
1899
- console.log("Customer ID: ", customer_id);
1900
1898
  return await autumn.attach({
1901
1899
  ...sanitizeBody2(body),
1902
1900
  customer_id,
@@ -2042,13 +2040,10 @@ var createReferralCodeHandler = (options) => withAuth({
2042
2040
  customer_id,
2043
2041
  body
2044
2042
  }) => {
2045
- console.log("Creating referral code for customer: ", customer_id);
2046
- console.log("Body: ", body);
2047
2043
  const res = await autumn.referrals.createCode({
2048
2044
  ...body,
2049
2045
  customer_id
2050
2046
  });
2051
- console.log("Res: ", res);
2052
2047
  return res;
2053
2048
  },
2054
2049
  suppressLogs: options?.suppressLogs
@@ -2090,16 +2085,11 @@ var createCustomerHandler = (options) => withAuth({
2090
2085
  customer_data = {},
2091
2086
  body
2092
2087
  }) => {
2093
- console.log("Body: ", JSON.stringify(body, null, 2));
2094
2088
  const res = await autumn.customers.create({
2095
2089
  id: customer_id,
2096
2090
  ...customer_data,
2097
2091
  ...sanitizeCustomerBody(body)
2098
2092
  });
2099
- console.log(
2100
- "Fetched customer products: ",
2101
- JSON.stringify(res?.data?.products, null, 2)
2102
- );
2103
2093
  return res;
2104
2094
  },
2105
2095
  suppressLogs: options?.suppressLogs
@@ -3,11 +3,11 @@ import {
3
3
  } from "./chunk-UNZHJTEY.mjs";
4
4
  import {
5
5
  createRouterWithOptions
6
- } from "./chunk-TBV5ICWG.mjs";
6
+ } from "./chunk-44NIJD4F.mjs";
7
7
  import "./chunk-NJTZVTKU.mjs";
8
- import "./chunk-JOPPC6LZ.mjs";
8
+ import "./chunk-UOA7N335.mjs";
9
9
  import "./chunk-5QQQ3LHJ.mjs";
10
- import "./chunk-DWQVUPJC.mjs";
10
+ import "./chunk-YMTSI7AB.mjs";
11
11
  import "./chunk-JAPNDBOX.mjs";
12
12
  import "./chunk-TX2PKTBZ.mjs";
13
13
  import {