autumn-js 0.0.41 → 0.0.43

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 (100) hide show
  1. package/dist/libraries/backend/{chunk-V7VIK7Q2.mjs → chunk-A5HOYSHP.mjs} +3 -2
  2. package/dist/libraries/backend/{chunk-UD4U5ECV.mjs → chunk-FIYJUKAL.mjs} +1 -1
  3. package/dist/libraries/backend/{chunk-XPNATE4H.mjs → chunk-WYSUJ2U3.mjs} +1 -1
  4. package/dist/libraries/backend/{chunk-GA6SKSWH.mjs → chunk-YG24ABSZ.mjs} +3 -3
  5. package/dist/libraries/backend/{entTypes-BHLroNdS.d.mts → client-C4aZxBxK.d.mts} +34 -28
  6. package/dist/libraries/backend/{entTypes-BJGM9Knl.d.ts → client-DJJAbrX7.d.ts} +34 -28
  7. package/dist/libraries/backend/express.js +3 -2
  8. package/dist/libraries/backend/express.mjs +4 -4
  9. package/dist/libraries/backend/fastify.js +3 -2
  10. package/dist/libraries/backend/fastify.mjs +4 -4
  11. package/dist/libraries/backend/hono.js +3 -2
  12. package/dist/libraries/backend/hono.mjs +4 -4
  13. package/dist/libraries/backend/next.js +3 -2
  14. package/dist/libraries/backend/next.mjs +4 -4
  15. package/dist/libraries/backend/remix.js +3 -2
  16. package/dist/libraries/backend/remix.mjs +4 -4
  17. package/dist/libraries/backend/routes/backendRouter.d.mts +1 -1
  18. package/dist/libraries/backend/routes/backendRouter.d.ts +1 -1
  19. package/dist/libraries/backend/routes/backendRouter.js +3 -2
  20. package/dist/libraries/backend/routes/backendRouter.mjs +4 -4
  21. package/dist/libraries/backend/routes/entityRoutes.js +3 -2
  22. package/dist/libraries/backend/routes/entityRoutes.mjs +2 -2
  23. package/dist/libraries/backend/routes/genRoutes.js +3 -2
  24. package/dist/libraries/backend/routes/genRoutes.mjs +2 -2
  25. package/dist/libraries/backend/tanstack.js +3 -2
  26. package/dist/libraries/backend/tanstack.mjs +4 -4
  27. package/dist/libraries/backend/utils/AuthFunction.d.mts +1 -1
  28. package/dist/libraries/backend/utils/AuthFunction.d.ts +1 -1
  29. package/dist/libraries/backend/utils/withAuth.d.mts +1 -1
  30. package/dist/libraries/backend/utils/withAuth.d.ts +1 -1
  31. package/dist/libraries/backend/utils/withAuth.js +3 -2
  32. package/dist/libraries/backend/utils/withAuth.mjs +1 -1
  33. package/dist/libraries/react/AutumnContext.d.mts +2 -2
  34. package/dist/libraries/react/AutumnContext.d.ts +2 -2
  35. package/dist/libraries/react/BaseAutumnProvider.d.mts +2 -2
  36. package/dist/libraries/react/BaseAutumnProvider.d.ts +2 -2
  37. package/dist/libraries/react/{ReactAutumnClient-C5hkD9_F.d.ts → ReactAutumnClient-CXWgmZSf.d.ts} +1 -1
  38. package/dist/libraries/react/{ReactAutumnClient-Cs1RcVVR.d.mts → ReactAutumnClient-b8N5xZyk.d.mts} +1 -1
  39. package/dist/libraries/react/{chunk-K6GCHMT7.mjs → chunk-554MLA6A.mjs} +7 -11
  40. package/dist/libraries/react/client/ReactAutumnClient.d.mts +2 -2
  41. package/dist/libraries/react/client/ReactAutumnClient.d.ts +2 -2
  42. package/dist/libraries/react/client/clientCompMethods.d.mts +2 -2
  43. package/dist/libraries/react/client/clientCompMethods.d.ts +2 -2
  44. package/dist/libraries/react/client/clientCusMethods.d.mts +2 -2
  45. package/dist/libraries/react/client/clientCusMethods.d.ts +2 -2
  46. package/dist/libraries/react/client/clientEntityMethods.d.mts +2 -2
  47. package/dist/libraries/react/client/clientEntityMethods.d.ts +2 -2
  48. package/dist/libraries/react/client/clientGenMethods.d.mts +2 -2
  49. package/dist/libraries/react/client/clientGenMethods.d.ts +2 -2
  50. package/dist/libraries/react/client/types/clientEntTypes.d.mts +5 -1
  51. package/dist/libraries/react/client/types/clientEntTypes.d.ts +5 -1
  52. package/dist/libraries/react/client/types/clientGenTypes.d.mts +5 -0
  53. package/dist/libraries/react/client/types/clientGenTypes.d.ts +5 -0
  54. package/dist/libraries/react/hooks/useAutumn.d.mts +2 -1
  55. package/dist/libraries/react/hooks/useAutumn.d.ts +2 -1
  56. package/dist/libraries/react/hooks/useAutumn.js +7 -11
  57. package/dist/libraries/react/hooks/useAutumn.mjs +1 -1
  58. package/dist/libraries/react/hooks/useCustomer.d.mts +12 -12
  59. package/dist/libraries/react/hooks/useCustomer.d.ts +12 -12
  60. package/dist/libraries/react/hooks/useCustomerProvider.d.mts +2 -2
  61. package/dist/libraries/react/hooks/useCustomerProvider.d.ts +2 -2
  62. package/dist/libraries/react/hooks/useEntityProvider.d.mts +2 -2
  63. package/dist/libraries/react/hooks/useEntityProvider.d.ts +2 -2
  64. package/dist/libraries/react/hooks/usePricingTableProvider.d.mts +2 -2
  65. package/dist/libraries/react/hooks/usePricingTableProvider.d.ts +2 -2
  66. package/dist/libraries/react/index.d.mts +5 -5
  67. package/dist/libraries/react/index.d.ts +5 -5
  68. package/dist/libraries/react/index.js +7 -11
  69. package/dist/libraries/react/index.mjs +1 -1
  70. package/dist/libraries/react/{response-DSY82HjT.d.mts → response-T-FFa-qt.d.mts} +0 -1
  71. package/dist/libraries/react/{response-DGkb5pA9.d.ts → response-muDt0SJZ.d.ts} +0 -1
  72. package/dist/next/client/hooks/types.d.mts +2 -23
  73. package/dist/next/client/hooks/types.d.ts +2 -23
  74. package/dist/next/client/hooks/useAutumn.d.mts +5 -3
  75. package/dist/next/client/hooks/useAutumn.d.ts +5 -3
  76. package/dist/next/client/hooks/useAutumn.js +24 -9
  77. package/dist/next/client/hooks/useAutumn.mjs +24 -9
  78. package/dist/next/client/hooks/useCustomer.d.mts +1 -1
  79. package/dist/next/client/hooks/useCustomer.d.ts +1 -1
  80. package/dist/next/client/types-B7efCges.d.mts +29 -0
  81. package/dist/next/client/types-B7efCges.d.ts +29 -0
  82. package/dist/next/index.d.mts +11 -3
  83. package/dist/next/index.d.ts +11 -3
  84. package/dist/next/server/cusActions.d.mts +2 -29
  85. package/dist/next/server/cusActions.d.ts +2 -29
  86. package/dist/next/server/genActions.d.mts +13 -2
  87. package/dist/next/server/genActions.d.ts +13 -2
  88. package/dist/next/server/genActions.js +25 -10
  89. package/dist/next/server/genActions.mjs +25 -10
  90. package/dist/next/server/{genTypes-faVFtUHP.d.ts → genTypes-DNndDcib.d.mts} +36 -3
  91. package/dist/next/server/{genTypes-C1alamyV.d.mts → genTypes-DaYkl9Ex.d.ts} +36 -3
  92. package/dist/sdk/{entTypes-B07YrTT7.d.mts → entTypes-DAoQnp8D.d.mts} +5 -1
  93. package/dist/sdk/{entTypes-DS32o2jz.d.ts → entTypes-oQpX0x_Y.d.ts} +5 -1
  94. package/dist/sdk/entities.d.mts +1 -1
  95. package/dist/sdk/entities.d.ts +1 -1
  96. package/dist/sdk/general.d.mts +11 -8
  97. package/dist/sdk/general.d.ts +11 -8
  98. package/dist/sdk/index.d.mts +2 -2
  99. package/dist/sdk/index.d.ts +2 -2
  100. package/package.json +1 -1
@@ -17,7 +17,8 @@ var withAuth = ({
17
17
  searchParams
18
18
  }) => {
19
19
  let authResult = await getCustomer();
20
- if (!authResult && requireCustomer) {
20
+ let customerId = authResult?.customerId;
21
+ if (!customerId && requireCustomer) {
21
22
  if (body?.errorOnNotFound === false) {
22
23
  return toBackendError({
23
24
  path,
@@ -39,7 +40,7 @@ var withAuth = ({
39
40
  let res = await fn({
40
41
  body,
41
42
  autumn,
42
- customer_id: authResult?.customerId || "",
43
+ customer_id: customerId,
43
44
  customer_data: cusData,
44
45
  pathParams,
45
46
  searchParams
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  withAuth
3
- } from "./chunk-V7VIK7Q2.mjs";
3
+ } from "./chunk-A5HOYSHP.mjs";
4
4
  import {
5
5
  BASE_PATH
6
6
  } from "./chunk-KSG3E4Q2.mjs";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  withAuth
3
- } from "./chunk-V7VIK7Q2.mjs";
3
+ } from "./chunk-A5HOYSHP.mjs";
4
4
 
5
5
  // src/libraries/backend/routes/entityRoutes.ts
6
6
  import { addRoute } from "rou3";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  addEntityRoutes
3
- } from "./chunk-XPNATE4H.mjs";
3
+ } from "./chunk-WYSUJ2U3.mjs";
4
4
  import {
5
5
  addGenRoutes
6
- } from "./chunk-UD4U5ECV.mjs";
6
+ } from "./chunk-FIYJUKAL.mjs";
7
7
  import {
8
8
  withAuth
9
- } from "./chunk-V7VIK7Q2.mjs";
9
+ } from "./chunk-A5HOYSHP.mjs";
10
10
  import {
11
11
  fetchPricingTable
12
12
  } from "./chunk-7SOQYC4B.mjs";
@@ -114,6 +114,37 @@ interface CustomerInvoice {
114
114
  created_at: number;
115
115
  }
116
116
 
117
+ type EntityExpandOption = "invoices";
118
+
119
+ interface CreateEntityParams {
120
+ id: string;
121
+ name: string;
122
+ feature_id: string;
123
+ }
124
+ interface CreateEntityResult {
125
+ success: boolean;
126
+ }
127
+ interface DeleteEntityResult {
128
+ success: boolean;
129
+ }
130
+ interface GetEntityParams {
131
+ expand?: EntityExpandOption[];
132
+ }
133
+ interface Entity {
134
+ id: string;
135
+ name: string;
136
+ customer_id: string;
137
+ created_at: number;
138
+ env: string;
139
+ products: CustomerProduct[];
140
+ features: Record<string, CustomerFeature>;
141
+ invoices?: CustomerInvoice[];
142
+ }
143
+ interface EntityData {
144
+ name?: string;
145
+ feature_id: string;
146
+ }
147
+
117
148
  interface ProductItem {
118
149
  feature_id?: string;
119
150
  included_usage?: number | typeof Infinite;
@@ -212,6 +243,7 @@ interface AttachParams {
212
243
  metadata?: Record<string, string>;
213
244
  force_checkout?: boolean;
214
245
  customer_data?: CustomerData;
246
+ entity_data?: EntityData;
215
247
  }
216
248
  interface CancelParams {
217
249
  customer_id: string;
@@ -239,6 +271,7 @@ interface TrackParams {
239
271
  entity_id?: string;
240
272
  customer_data?: CustomerData;
241
273
  idempotency_key?: string;
274
+ entity_data?: EntityData;
242
275
  }
243
276
  interface TrackResult {
244
277
  id: string;
@@ -246,7 +279,6 @@ interface TrackResult {
246
279
  customer_id: string;
247
280
  feature_id?: string;
248
281
  event_name?: string;
249
- idempotency_key?: string;
250
282
  }
251
283
  interface CheckParams {
252
284
  customer_id: string;
@@ -257,6 +289,7 @@ interface CheckParams {
257
289
  required_quantity?: number;
258
290
  send_event?: boolean;
259
291
  with_preview?: "raw" | "formatted";
292
+ entity_data?: EntityData;
260
293
  }
261
294
  interface CheckResult {
262
295
  customer_id: string;
@@ -364,31 +397,4 @@ declare class Autumn {
364
397
  usage(params: UsageParams): Promise<Result<UsageResult, AutumnError>>;
365
398
  }
366
399
 
367
- type EntityExpandOption = "invoices";
368
-
369
- interface CreateEntityParams {
370
- id: string;
371
- name: string;
372
- feature_id: string;
373
- }
374
- interface CreateEntityResult {
375
- success: boolean;
376
- }
377
- interface DeleteEntityResult {
378
- success: boolean;
379
- }
380
- interface GetEntityParams {
381
- expand?: EntityExpandOption[];
382
- }
383
- interface Entity {
384
- id: string;
385
- name: string;
386
- customer_id: string;
387
- created_at: number;
388
- env: string;
389
- products: CustomerProduct[];
390
- features: Record<string, CustomerFeature>;
391
- invoices?: CustomerInvoice[];
392
- }
393
-
394
400
  export { Autumn as A, type CustomerData as C };
@@ -114,6 +114,37 @@ interface CustomerInvoice {
114
114
  created_at: number;
115
115
  }
116
116
 
117
+ type EntityExpandOption = "invoices";
118
+
119
+ interface CreateEntityParams {
120
+ id: string;
121
+ name: string;
122
+ feature_id: string;
123
+ }
124
+ interface CreateEntityResult {
125
+ success: boolean;
126
+ }
127
+ interface DeleteEntityResult {
128
+ success: boolean;
129
+ }
130
+ interface GetEntityParams {
131
+ expand?: EntityExpandOption[];
132
+ }
133
+ interface Entity {
134
+ id: string;
135
+ name: string;
136
+ customer_id: string;
137
+ created_at: number;
138
+ env: string;
139
+ products: CustomerProduct[];
140
+ features: Record<string, CustomerFeature>;
141
+ invoices?: CustomerInvoice[];
142
+ }
143
+ interface EntityData {
144
+ name?: string;
145
+ feature_id: string;
146
+ }
147
+
117
148
  interface ProductItem {
118
149
  feature_id?: string;
119
150
  included_usage?: number | typeof Infinite;
@@ -212,6 +243,7 @@ interface AttachParams {
212
243
  metadata?: Record<string, string>;
213
244
  force_checkout?: boolean;
214
245
  customer_data?: CustomerData;
246
+ entity_data?: EntityData;
215
247
  }
216
248
  interface CancelParams {
217
249
  customer_id: string;
@@ -239,6 +271,7 @@ interface TrackParams {
239
271
  entity_id?: string;
240
272
  customer_data?: CustomerData;
241
273
  idempotency_key?: string;
274
+ entity_data?: EntityData;
242
275
  }
243
276
  interface TrackResult {
244
277
  id: string;
@@ -246,7 +279,6 @@ interface TrackResult {
246
279
  customer_id: string;
247
280
  feature_id?: string;
248
281
  event_name?: string;
249
- idempotency_key?: string;
250
282
  }
251
283
  interface CheckParams {
252
284
  customer_id: string;
@@ -257,6 +289,7 @@ interface CheckParams {
257
289
  required_quantity?: number;
258
290
  send_event?: boolean;
259
291
  with_preview?: "raw" | "formatted";
292
+ entity_data?: EntityData;
260
293
  }
261
294
  interface CheckResult {
262
295
  customer_id: string;
@@ -364,31 +397,4 @@ declare class Autumn {
364
397
  usage(params: UsageParams): Promise<Result<UsageResult, AutumnError>>;
365
398
  }
366
399
 
367
- type EntityExpandOption = "invoices";
368
-
369
- interface CreateEntityParams {
370
- id: string;
371
- name: string;
372
- feature_id: string;
373
- }
374
- interface CreateEntityResult {
375
- success: boolean;
376
- }
377
- interface DeleteEntityResult {
378
- success: boolean;
379
- }
380
- interface GetEntityParams {
381
- expand?: EntityExpandOption[];
382
- }
383
- interface Entity {
384
- id: string;
385
- name: string;
386
- customer_id: string;
387
- created_at: number;
388
- env: string;
389
- products: CustomerProduct[];
390
- features: Record<string, CustomerFeature>;
391
- invoices?: CustomerInvoice[];
392
- }
393
-
394
400
  export { Autumn as A, type CustomerData as C };
@@ -473,7 +473,8 @@ var withAuth = ({
473
473
  searchParams
474
474
  }) => {
475
475
  let authResult = await getCustomer2();
476
- if (!authResult && requireCustomer) {
476
+ let customerId = authResult?.customerId;
477
+ if (!customerId && requireCustomer) {
477
478
  if (body?.errorOnNotFound === false) {
478
479
  return toBackendError({
479
480
  path,
@@ -495,7 +496,7 @@ var withAuth = ({
495
496
  let res = await fn({
496
497
  body,
497
498
  autumn,
498
- customer_id: authResult?.customerId || "",
499
+ customer_id: customerId,
499
500
  customer_data: cusData,
500
501
  pathParams,
501
502
  searchParams
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  createRouterWithOptions
3
- } from "./chunk-GA6SKSWH.mjs";
4
- import "./chunk-XPNATE4H.mjs";
5
- import "./chunk-UD4U5ECV.mjs";
6
- import "./chunk-V7VIK7Q2.mjs";
3
+ } from "./chunk-YG24ABSZ.mjs";
4
+ import "./chunk-WYSUJ2U3.mjs";
5
+ import "./chunk-FIYJUKAL.mjs";
6
+ import "./chunk-A5HOYSHP.mjs";
7
7
  import {
8
8
  Autumn
9
9
  } from "./chunk-7SOQYC4B.mjs";
@@ -473,7 +473,8 @@ var withAuth = ({
473
473
  searchParams
474
474
  }) => {
475
475
  let authResult = await getCustomer2();
476
- if (!authResult && requireCustomer) {
476
+ let customerId = authResult?.customerId;
477
+ if (!customerId && requireCustomer) {
477
478
  if (body?.errorOnNotFound === false) {
478
479
  return toBackendError({
479
480
  path,
@@ -495,7 +496,7 @@ var withAuth = ({
495
496
  let res = await fn({
496
497
  body,
497
498
  autumn,
498
- customer_id: authResult?.customerId || "",
499
+ customer_id: customerId,
499
500
  customer_data: cusData,
500
501
  pathParams,
501
502
  searchParams
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  createRouterWithOptions
3
- } from "./chunk-GA6SKSWH.mjs";
4
- import "./chunk-XPNATE4H.mjs";
5
- import "./chunk-UD4U5ECV.mjs";
6
- import "./chunk-V7VIK7Q2.mjs";
3
+ } from "./chunk-YG24ABSZ.mjs";
4
+ import "./chunk-WYSUJ2U3.mjs";
5
+ import "./chunk-FIYJUKAL.mjs";
6
+ import "./chunk-A5HOYSHP.mjs";
7
7
  import {
8
8
  Autumn
9
9
  } from "./chunk-7SOQYC4B.mjs";
@@ -473,7 +473,8 @@ var withAuth = ({
473
473
  searchParams
474
474
  }) => {
475
475
  let authResult = await getCustomer2();
476
- if (!authResult && requireCustomer) {
476
+ let customerId = authResult?.customerId;
477
+ if (!customerId && requireCustomer) {
477
478
  if (body?.errorOnNotFound === false) {
478
479
  return toBackendError({
479
480
  path,
@@ -495,7 +496,7 @@ var withAuth = ({
495
496
  let res = await fn({
496
497
  body,
497
498
  autumn,
498
- customer_id: authResult?.customerId || "",
499
+ customer_id: customerId,
499
500
  customer_data: cusData,
500
501
  pathParams,
501
502
  searchParams
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  createRouterWithOptions
3
- } from "./chunk-GA6SKSWH.mjs";
4
- import "./chunk-XPNATE4H.mjs";
5
- import "./chunk-UD4U5ECV.mjs";
6
- import "./chunk-V7VIK7Q2.mjs";
3
+ } from "./chunk-YG24ABSZ.mjs";
4
+ import "./chunk-WYSUJ2U3.mjs";
5
+ import "./chunk-FIYJUKAL.mjs";
6
+ import "./chunk-A5HOYSHP.mjs";
7
7
  import {
8
8
  Autumn
9
9
  } from "./chunk-7SOQYC4B.mjs";
@@ -3983,7 +3983,8 @@ var withAuth = ({
3983
3983
  searchParams
3984
3984
  }) => {
3985
3985
  let authResult = await getCustomer2();
3986
- if (!authResult && requireCustomer) {
3986
+ let customerId = authResult?.customerId;
3987
+ if (!customerId && requireCustomer) {
3987
3988
  if (body?.errorOnNotFound === false) {
3988
3989
  return toBackendError({
3989
3990
  path,
@@ -4005,7 +4006,7 @@ var withAuth = ({
4005
4006
  let res = await fn({
4006
4007
  body,
4007
4008
  autumn,
4008
- customer_id: authResult?.customerId || "",
4009
+ customer_id: customerId,
4009
4010
  customer_data: cusData,
4010
4011
  pathParams,
4011
4012
  searchParams
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  createRouterWithOptions
3
- } from "./chunk-GA6SKSWH.mjs";
4
- import "./chunk-XPNATE4H.mjs";
5
- import "./chunk-UD4U5ECV.mjs";
6
- import "./chunk-V7VIK7Q2.mjs";
3
+ } from "./chunk-YG24ABSZ.mjs";
4
+ import "./chunk-WYSUJ2U3.mjs";
5
+ import "./chunk-FIYJUKAL.mjs";
6
+ import "./chunk-A5HOYSHP.mjs";
7
7
  import {
8
8
  Autumn
9
9
  } from "./chunk-7SOQYC4B.mjs";
@@ -472,7 +472,8 @@ var withAuth = ({
472
472
  searchParams
473
473
  }) => {
474
474
  let authResult = await getCustomer2();
475
- if (!authResult && requireCustomer) {
475
+ let customerId = authResult?.customerId;
476
+ if (!customerId && requireCustomer) {
476
477
  if (body?.errorOnNotFound === false) {
477
478
  return toBackendError({
478
479
  path,
@@ -494,7 +495,7 @@ var withAuth = ({
494
495
  let res = await fn({
495
496
  body,
496
497
  autumn,
497
- customer_id: authResult?.customerId || "",
498
+ customer_id: customerId,
498
499
  customer_data: cusData,
499
500
  pathParams,
500
501
  searchParams
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  createRouterWithOptions
3
- } from "./chunk-GA6SKSWH.mjs";
4
- import "./chunk-XPNATE4H.mjs";
5
- import "./chunk-UD4U5ECV.mjs";
6
- import "./chunk-V7VIK7Q2.mjs";
3
+ } from "./chunk-YG24ABSZ.mjs";
4
+ import "./chunk-WYSUJ2U3.mjs";
5
+ import "./chunk-FIYJUKAL.mjs";
6
+ import "./chunk-A5HOYSHP.mjs";
7
7
  import {
8
8
  Autumn
9
9
  } from "./chunk-7SOQYC4B.mjs";
@@ -1,5 +1,5 @@
1
1
  import * as rou3 from 'rou3';
2
- import { A as Autumn } from '../entTypes-BHLroNdS.mjs';
2
+ import { A as Autumn } from '../client-C4aZxBxK.mjs';
3
3
  import '../response-ByHPEnHs.mjs';
4
4
 
5
5
  type RouteData = {
@@ -1,5 +1,5 @@
1
1
  import * as rou3 from 'rou3';
2
- import { A as Autumn } from '../entTypes-BJGM9Knl.js';
2
+ import { A as Autumn } from '../client-DJJAbrX7.js';
3
3
  import '../response-ByHPEnHs.js';
4
4
 
5
5
  type RouteData = {
@@ -472,7 +472,8 @@ var withAuth = ({
472
472
  searchParams
473
473
  }) => {
474
474
  let authResult = await getCustomer2();
475
- if (!authResult && requireCustomer) {
475
+ let customerId = authResult?.customerId;
476
+ if (!customerId && requireCustomer) {
476
477
  if (body?.errorOnNotFound === false) {
477
478
  return toBackendError({
478
479
  path,
@@ -494,7 +495,7 @@ var withAuth = ({
494
495
  let res = await fn({
495
496
  body,
496
497
  autumn,
497
- customer_id: authResult?.customerId || "",
498
+ customer_id: customerId,
498
499
  customer_data: cusData,
499
500
  pathParams,
500
501
  searchParams
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  createRouterWithOptions
3
- } from "../chunk-GA6SKSWH.mjs";
4
- import "../chunk-XPNATE4H.mjs";
5
- import "../chunk-UD4U5ECV.mjs";
6
- import "../chunk-V7VIK7Q2.mjs";
3
+ } from "../chunk-YG24ABSZ.mjs";
4
+ import "../chunk-WYSUJ2U3.mjs";
5
+ import "../chunk-FIYJUKAL.mjs";
6
+ import "../chunk-A5HOYSHP.mjs";
7
7
  import "../chunk-7SOQYC4B.mjs";
8
8
  import "../chunk-KSG3E4Q2.mjs";
9
9
  import "../chunk-6DZX6EAA.mjs";
@@ -449,7 +449,8 @@ var withAuth = ({
449
449
  searchParams
450
450
  }) => {
451
451
  let authResult = await getCustomer2();
452
- if (!authResult && requireCustomer) {
452
+ let customerId = authResult?.customerId;
453
+ if (!customerId && requireCustomer) {
453
454
  if (body?.errorOnNotFound === false) {
454
455
  return toBackendError({
455
456
  path,
@@ -471,7 +472,7 @@ var withAuth = ({
471
472
  let res = await fn({
472
473
  body,
473
474
  autumn,
474
- customer_id: authResult?.customerId || "",
475
+ customer_id: customerId,
475
476
  customer_data: cusData,
476
477
  pathParams,
477
478
  searchParams
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  addEntityRoutes
3
- } from "../chunk-XPNATE4H.mjs";
4
- import "../chunk-V7VIK7Q2.mjs";
3
+ } from "../chunk-WYSUJ2U3.mjs";
4
+ import "../chunk-A5HOYSHP.mjs";
5
5
  import "../chunk-7SOQYC4B.mjs";
6
6
  import "../chunk-6DZX6EAA.mjs";
7
7
  export {
@@ -448,7 +448,8 @@ var withAuth = ({
448
448
  searchParams
449
449
  }) => {
450
450
  let authResult = await getCustomer2();
451
- if (!authResult && requireCustomer) {
451
+ let customerId = authResult?.customerId;
452
+ if (!customerId && requireCustomer) {
452
453
  if (body?.errorOnNotFound === false) {
453
454
  return toBackendError({
454
455
  path,
@@ -470,7 +471,7 @@ var withAuth = ({
470
471
  let res = await fn({
471
472
  body,
472
473
  autumn,
473
- customer_id: authResult?.customerId || "",
474
+ customer_id: customerId,
474
475
  customer_data: cusData,
475
476
  pathParams,
476
477
  searchParams
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  addGenRoutes
3
- } from "../chunk-UD4U5ECV.mjs";
4
- import "../chunk-V7VIK7Q2.mjs";
3
+ } from "../chunk-FIYJUKAL.mjs";
4
+ import "../chunk-A5HOYSHP.mjs";
5
5
  import "../chunk-7SOQYC4B.mjs";
6
6
  import "../chunk-KSG3E4Q2.mjs";
7
7
  import "../chunk-6DZX6EAA.mjs";
@@ -477,7 +477,8 @@ var withAuth = ({
477
477
  searchParams
478
478
  }) => {
479
479
  let authResult = await getCustomer2();
480
- if (!authResult && requireCustomer) {
480
+ let customerId = authResult?.customerId;
481
+ if (!customerId && requireCustomer) {
481
482
  if (body?.errorOnNotFound === false) {
482
483
  return toBackendError({
483
484
  path,
@@ -499,7 +500,7 @@ var withAuth = ({
499
500
  let res = await fn({
500
501
  body,
501
502
  autumn,
502
- customer_id: authResult?.customerId || "",
503
+ customer_id: customerId,
503
504
  customer_data: cusData,
504
505
  pathParams,
505
506
  searchParams
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  createRouterWithOptions
3
- } from "./chunk-GA6SKSWH.mjs";
4
- import "./chunk-XPNATE4H.mjs";
5
- import "./chunk-UD4U5ECV.mjs";
6
- import "./chunk-V7VIK7Q2.mjs";
3
+ } from "./chunk-YG24ABSZ.mjs";
4
+ import "./chunk-WYSUJ2U3.mjs";
5
+ import "./chunk-FIYJUKAL.mjs";
6
+ import "./chunk-A5HOYSHP.mjs";
7
7
  import {
8
8
  Autumn
9
9
  } from "./chunk-7SOQYC4B.mjs";
@@ -1,5 +1,5 @@
1
1
  type AuthResult = Promise<{
2
- customerId: string;
2
+ customerId?: string;
3
3
  customerData?: {
4
4
  name?: string;
5
5
  email?: string;
@@ -1,5 +1,5 @@
1
1
  type AuthResult = Promise<{
2
- customerId: string;
2
+ customerId?: string;
3
3
  customerData?: {
4
4
  name?: string;
5
5
  email?: string;
@@ -1,4 +1,4 @@
1
- import { A as Autumn, C as CustomerData } from '../entTypes-BHLroNdS.mjs';
1
+ import { A as Autumn, C as CustomerData } from '../client-C4aZxBxK.mjs';
2
2
  import { AuthResult } from './AuthFunction.mjs';
3
3
  import '../response-ByHPEnHs.mjs';
4
4
 
@@ -1,4 +1,4 @@
1
- import { A as Autumn, C as CustomerData } from '../entTypes-BJGM9Knl.js';
1
+ import { A as Autumn, C as CustomerData } from '../client-DJJAbrX7.js';
2
2
  import { AuthResult } from './AuthFunction.js';
3
3
  import '../response-ByHPEnHs.js';
4
4
 
@@ -448,7 +448,8 @@ var withAuth = ({
448
448
  searchParams
449
449
  }) => {
450
450
  let authResult = await getCustomer2();
451
- if (!authResult && requireCustomer) {
451
+ let customerId = authResult?.customerId;
452
+ if (!customerId && requireCustomer) {
452
453
  if (body?.errorOnNotFound === false) {
453
454
  return toBackendError({
454
455
  path,
@@ -470,7 +471,7 @@ var withAuth = ({
470
471
  let res = await fn({
471
472
  body,
472
473
  autumn,
473
- customer_id: authResult?.customerId || "",
474
+ customer_id: customerId,
474
475
  customer_data: cusData,
475
476
  pathParams,
476
477
  searchParams
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  withAuth
3
- } from "../chunk-V7VIK7Q2.mjs";
3
+ } from "../chunk-A5HOYSHP.mjs";
4
4
  import "../chunk-7SOQYC4B.mjs";
5
5
  import "../chunk-6DZX6EAA.mjs";
6
6
  export {
@@ -1,10 +1,10 @@
1
1
  import * as react from 'react';
2
2
  import { A as AutumnError } from './error-CG2LXoa7.mjs';
3
- import { P as PricingTableProduct, A as AutumnClient } from './ReactAutumnClient-Cs1RcVVR.mjs';
3
+ import { P as PricingTableProduct, A as AutumnClient } from './ReactAutumnClient-b8N5xZyk.mjs';
4
4
  import { EntityProvider } from './hooks/useEntityProvider.mjs';
5
5
  import './client/types/clientEntTypes.mjs';
6
6
  import './client/types/clientGenTypes.mjs';
7
- import './response-DSY82HjT.mjs';
7
+ import './response-T-FFa-qt.mjs';
8
8
  import './cusTypes-CrKQos3U.mjs';
9
9
  import './entTypes-D5hhz3BB.mjs';
10
10
 
@@ -1,10 +1,10 @@
1
1
  import * as react from 'react';
2
2
  import { A as AutumnError } from './error-CG2LXoa7.js';
3
- import { P as PricingTableProduct, A as AutumnClient } from './ReactAutumnClient-C5hkD9_F.js';
3
+ import { P as PricingTableProduct, A as AutumnClient } from './ReactAutumnClient-CXWgmZSf.js';
4
4
  import { EntityProvider } from './hooks/useEntityProvider.js';
5
5
  import './client/types/clientEntTypes.js';
6
6
  import './client/types/clientGenTypes.js';
7
- import './response-DGkb5pA9.js';
7
+ import './response-muDt0SJZ.js';
8
8
  import './cusTypes-CrKQos3U.js';
9
9
  import './entTypes-Pu4KEgBU.js';
10
10