autumn-js 1.3.16 → 1.3.18

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 (120) hide show
  1. package/dist/backend/adapters/express.d.mts +1 -1
  2. package/dist/backend/adapters/express.d.ts +1 -1
  3. package/dist/backend/adapters/express.js +385 -5
  4. package/dist/backend/adapters/express.mjs +5 -5
  5. package/dist/backend/adapters/fetch.d.mts +1 -1
  6. package/dist/backend/adapters/fetch.d.ts +1 -1
  7. package/dist/backend/adapters/fetch.js +385 -5
  8. package/dist/backend/adapters/fetch.mjs +5 -5
  9. package/dist/backend/adapters/hono.d.mts +1 -1
  10. package/dist/backend/adapters/hono.d.ts +1 -1
  11. package/dist/backend/adapters/hono.js +385 -5
  12. package/dist/backend/adapters/hono.mjs +5 -5
  13. package/dist/backend/adapters/index.d.mts +1 -1
  14. package/dist/backend/adapters/index.d.ts +1 -1
  15. package/dist/backend/adapters/index.js +385 -5
  16. package/dist/backend/adapters/index.mjs +8 -8
  17. package/dist/backend/adapters/next.d.mts +1 -1
  18. package/dist/backend/adapters/next.d.ts +1 -1
  19. package/dist/backend/adapters/next.js +385 -5
  20. package/dist/backend/adapters/next.mjs +5 -5
  21. package/dist/backend/{authTypes-CE4qx_oC.d.mts → authTypes-TPWTIfcM.d.mts} +92 -0
  22. package/dist/backend/{authTypes-CE4qx_oC.d.ts → authTypes-TPWTIfcM.d.ts} +92 -0
  23. package/dist/backend/{chunk-B4CUYWLF.mjs → chunk-63QUSMCV.mjs} +293 -5
  24. package/dist/backend/{chunk-5ZJ4SMY3.mjs → chunk-A47BOCKP.mjs} +1 -1
  25. package/dist/backend/{chunk-R2CXUYPG.mjs → chunk-C7XNQRUJ.mjs} +2 -2
  26. package/dist/backend/{chunk-QSHAL5TZ.mjs → chunk-CZLYNX6I.mjs} +2 -2
  27. package/dist/backend/{chunk-ITZ2QE2R.mjs → chunk-ET3EY5PE.mjs} +92 -0
  28. package/dist/backend/{chunk-2HWIH2HC.mjs → chunk-H5NW7P7T.mjs} +1 -1
  29. package/dist/backend/{chunk-TQFTGTIC.mjs → chunk-OSKLYXB5.mjs} +1 -1
  30. package/dist/backend/{chunk-OJMGNEVM.mjs → chunk-XB6IWBJK.mjs} +1 -1
  31. package/dist/backend/core/handlers/coreHandler.d.mts +2 -2
  32. package/dist/backend/core/handlers/coreHandler.d.ts +2 -2
  33. package/dist/backend/core/handlers/coreHandler.js +385 -5
  34. package/dist/backend/core/handlers/coreHandler.mjs +3 -3
  35. package/dist/backend/core/handlers/executeRoute.d.mts +2 -2
  36. package/dist/backend/core/handlers/executeRoute.d.ts +2 -2
  37. package/dist/backend/core/handlers/handleRouteByName.d.mts +1 -1
  38. package/dist/backend/core/handlers/handleRouteByName.d.ts +1 -1
  39. package/dist/backend/core/handlers/handleRouteByName.js +385 -5
  40. package/dist/backend/core/handlers/handleRouteByName.mjs +3 -3
  41. package/dist/backend/core/handlers/index.d.mts +2 -2
  42. package/dist/backend/core/handlers/index.d.ts +2 -2
  43. package/dist/backend/core/handlers/index.js +385 -5
  44. package/dist/backend/core/handlers/index.mjs +4 -4
  45. package/dist/backend/core/handlers/resolveIdentity.d.mts +1 -1
  46. package/dist/backend/core/handlers/resolveIdentity.d.ts +1 -1
  47. package/dist/backend/core/index.d.mts +2 -2
  48. package/dist/backend/core/index.d.ts +2 -2
  49. package/dist/backend/core/index.js +385 -5
  50. package/dist/backend/core/index.mjs +4 -4
  51. package/dist/backend/core/routes/index.d.mts +2 -2
  52. package/dist/backend/core/routes/index.d.ts +2 -2
  53. package/dist/backend/core/routes/index.js +92 -0
  54. package/dist/backend/core/routes/index.mjs +1 -1
  55. package/dist/backend/core/routes/routeBuilder.d.mts +2 -2
  56. package/dist/backend/core/routes/routeBuilder.d.ts +2 -2
  57. package/dist/backend/core/routes/routeConfigs.d.mts +2 -2
  58. package/dist/backend/core/routes/routeConfigs.d.ts +2 -2
  59. package/dist/backend/core/routes/routeConfigs.js +92 -0
  60. package/dist/backend/core/routes/routeConfigs.mjs +1 -1
  61. package/dist/backend/core/types/authTypes.d.mts +1 -1
  62. package/dist/backend/core/types/authTypes.d.ts +1 -1
  63. package/dist/backend/core/types/handlerTypes.d.mts +2 -2
  64. package/dist/backend/core/types/handlerTypes.d.ts +2 -2
  65. package/dist/backend/core/types/index.d.mts +2 -2
  66. package/dist/backend/core/types/index.d.ts +2 -2
  67. package/dist/backend/core/types/routeTypes.d.mts +2 -2
  68. package/dist/backend/core/types/routeTypes.d.ts +2 -2
  69. package/dist/backend/index.d.mts +4 -4
  70. package/dist/backend/index.d.ts +4 -4
  71. package/dist/backend/index.js +385 -5
  72. package/dist/backend/index.mjs +4 -4
  73. package/dist/backend/{routeTypes-DbEShvad.d.ts → routeTypes-CIsf-5k4.d.ts} +193 -1
  74. package/dist/backend/{routeTypes-TP-m0VH4.d.mts → routeTypes-CaQm0FI6.d.mts} +193 -1
  75. package/dist/better-auth/{chunk-IT7LJSHT.mjs → chunk-24CG3YJD.mjs} +1 -1
  76. package/dist/better-auth/{chunk-AXWF2UCR.mjs → chunk-LCFFOKLD.mjs} +92 -0
  77. package/dist/better-auth/{chunk-6ILQPBBY.mjs → chunk-MMJ4X5QR.mjs} +294 -6
  78. package/dist/better-auth/index.js +385 -5
  79. package/dist/better-auth/index.mjs +3 -3
  80. package/dist/better-auth/types.d.mts +92 -0
  81. package/dist/better-auth/types.d.ts +92 -0
  82. package/dist/better-auth/utils/createAutumnEndpoint.js +92 -0
  83. package/dist/better-auth/utils/createAutumnEndpoint.mjs +2 -2
  84. package/dist/better-auth/utils/handleBetterAuthRoute.js +385 -5
  85. package/dist/better-auth/utils/handleBetterAuthRoute.mjs +2 -2
  86. package/dist/better-auth/utils/index.js +385 -5
  87. package/dist/better-auth/utils/index.mjs +3 -3
  88. package/dist/react/AutumnContext.d.mts +1 -1
  89. package/dist/react/AutumnContext.d.ts +1 -1
  90. package/dist/react/client/AutumnClient.d.mts +1 -1
  91. package/dist/react/client/AutumnClient.d.ts +1 -1
  92. package/dist/react/client/IAutumnClient.d.mts +1 -1
  93. package/dist/react/client/IAutumnClient.d.ts +1 -1
  94. package/dist/react/client/index.d.mts +1 -1
  95. package/dist/react/client/index.d.ts +1 -1
  96. package/dist/react/{customer-Bp7Npmb4.d.ts → customer-D1yd7b5X.d.ts} +50 -0
  97. package/dist/react/{customer-Ho7hCUyc.d.mts → customer-RPAUbbhQ.d.mts} +50 -0
  98. package/dist/react/hooks/index.d.mts +1 -1
  99. package/dist/react/hooks/index.d.ts +1 -1
  100. package/dist/react/hooks/internal/check/balanceToAllowed.d.mts +1 -1
  101. package/dist/react/hooks/internal/check/balanceToAllowed.d.ts +1 -1
  102. package/dist/react/hooks/internal/check/customerToFeatures.d.mts +1 -1
  103. package/dist/react/hooks/internal/check/customerToFeatures.d.ts +1 -1
  104. package/dist/react/hooks/internal/check/findCreditSystemsByFeature.d.mts +1 -1
  105. package/dist/react/hooks/internal/check/findCreditSystemsByFeature.d.ts +1 -1
  106. package/dist/react/hooks/internal/check/getCreditCost.d.mts +1 -1
  107. package/dist/react/hooks/internal/check/getCreditCost.d.ts +1 -1
  108. package/dist/react/hooks/internal/getLocalCheckResponse.d.mts +1 -1
  109. package/dist/react/hooks/internal/getLocalCheckResponse.d.ts +1 -1
  110. package/dist/react/hooks/internal/useCustomerActions.d.mts +1 -1
  111. package/dist/react/hooks/internal/useCustomerActions.d.ts +1 -1
  112. package/dist/react/hooks/useCustomer.d.mts +1 -1
  113. package/dist/react/hooks/useCustomer.d.ts +1 -1
  114. package/dist/react/index.d.mts +1 -1
  115. package/dist/react/index.d.ts +1 -1
  116. package/dist/sdk/index.d.mts +447 -1
  117. package/dist/sdk/index.d.ts +447 -1
  118. package/dist/sdk/index.js +511 -5
  119. package/dist/sdk/index.mjs +456 -6
  120. package/package.json +2 -2
@@ -20357,6 +20357,7 @@ var CustomerExpand = {
20357
20357
  Entities: "entities",
20358
20358
  Referrals: "referrals",
20359
20359
  PaymentMethod: "payment_method",
20360
+ BillingDetails: "billing_details",
20360
20361
  SubscriptionsPlan: "subscriptions.plan",
20361
20362
  PurchasesPlan: "purchases.plan",
20362
20363
  BalancesFeature: "balances.feature",
@@ -20479,6 +20480,11 @@ var CustomerDurationType = {
20479
20480
  Months: "months",
20480
20481
  Forever: "forever"
20481
20482
  };
20483
+ var TaxExempt = {
20484
+ None: "none",
20485
+ Exempt: "exempt",
20486
+ Reverse: "reverse"
20487
+ };
20482
20488
  var CustomerEnv$inboundSchema = inboundSchema(CustomerEnv);
20483
20489
  var CustomerAutoTopupInterval2$inboundSchema = inboundSchema(CustomerAutoTopupInterval2);
20484
20490
  var CustomerPurchaseLimit2$inboundSchema = z37.pipe(
@@ -21243,6 +21249,57 @@ var Referral$inboundSchema = z37.pipe(
21243
21249
  });
21244
21250
  })
21245
21251
  );
21252
+ var BillingDetailsAddress$inboundSchema = z37.pipe(
21253
+ z37.object({
21254
+ line1: z37.optional(z37.nullable(string5())),
21255
+ line2: z37.optional(z37.nullable(string5())),
21256
+ city: z37.optional(z37.nullable(string5())),
21257
+ state: z37.optional(z37.nullable(string5())),
21258
+ postal_code: z37.optional(z37.nullable(string5())),
21259
+ country: z37.optional(z37.nullable(string5()))
21260
+ }),
21261
+ z37.transform((v) => {
21262
+ return remap(v, {
21263
+ "postal_code": "postalCode"
21264
+ });
21265
+ })
21266
+ );
21267
+ var BillingDetailsTaxId$inboundSchema = z37.object({
21268
+ type: string5(),
21269
+ value: string5()
21270
+ });
21271
+ var TaxExempt$inboundSchema = inboundSchema(TaxExempt);
21272
+ var BillingDetailsCustomField$inboundSchema = z37.object({
21273
+ name: string5(),
21274
+ value: string5()
21275
+ });
21276
+ var InvoiceSettings$inboundSchema = z37.pipe(
21277
+ z37.object({
21278
+ custom_fields: z37.array(
21279
+ z37.lazy(() => BillingDetailsCustomField$inboundSchema)
21280
+ )
21281
+ }),
21282
+ z37.transform((v) => {
21283
+ return remap(v, {
21284
+ "custom_fields": "customFields"
21285
+ });
21286
+ })
21287
+ );
21288
+ var BillingDetails$inboundSchema = z37.pipe(
21289
+ z37.object({
21290
+ address: nullable(z37.lazy(() => BillingDetailsAddress$inboundSchema)),
21291
+ tax_ids: z37.array(z37.lazy(() => BillingDetailsTaxId$inboundSchema)),
21292
+ tax_exempt: nullable(TaxExempt$inboundSchema),
21293
+ invoice_settings: z37.lazy(() => InvoiceSettings$inboundSchema)
21294
+ }),
21295
+ z37.transform((v) => {
21296
+ return remap(v, {
21297
+ "tax_ids": "taxIds",
21298
+ "tax_exempt": "taxExempt",
21299
+ "invoice_settings": "invoiceSettings"
21300
+ });
21301
+ })
21302
+ );
21246
21303
  var Customer$inboundSchema = z37.pipe(
21247
21304
  z37.object({
21248
21305
  id: nullable(string5()),
@@ -21272,7 +21329,10 @@ var Customer$inboundSchema = z37.pipe(
21272
21329
  ),
21273
21330
  rewards: z37.optional(z37.nullable(z37.lazy(() => Rewards$inboundSchema))),
21274
21331
  referrals: optional3(z37.array(z37.lazy(() => Referral$inboundSchema))),
21275
- payment_method: z37.optional(z37.nullable(z37.any()))
21332
+ payment_method: z37.optional(z37.nullable(z37.any())),
21333
+ billing_details: z37.optional(
21334
+ z37.nullable(z37.lazy(() => BillingDetails$inboundSchema))
21335
+ )
21276
21336
  }),
21277
21337
  z37.transform((v) => {
21278
21338
  return remap(v, {
@@ -21282,7 +21342,8 @@ var Customer$inboundSchema = z37.pipe(
21282
21342
  "billing_controls": "billingControls",
21283
21343
  "invoice_previews": "invoicePreviews",
21284
21344
  "trials_used": "trialsUsed",
21285
- "payment_method": "paymentMethod"
21345
+ "payment_method": "paymentMethod",
21346
+ "billing_details": "billingDetails"
21286
21347
  });
21287
21348
  })
21288
21349
  );
@@ -21603,6 +21664,11 @@ var GetCustomerDurationType = {
21603
21664
  Months: "months",
21604
21665
  Forever: "forever"
21605
21666
  };
21667
+ var GetCustomerTaxExempt = {
21668
+ None: "none",
21669
+ Exempt: "exempt",
21670
+ Reverse: "reverse"
21671
+ };
21606
21672
  var GetCustomerParams$outboundSchema = z48.pipe(
21607
21673
  z48.object({
21608
21674
  customerId: z48.string(),
@@ -22390,6 +22456,61 @@ var GetCustomerReferral$inboundSchema = z48.pipe(
22390
22456
  });
22391
22457
  })
22392
22458
  );
22459
+ var GetCustomerBillingDetailsAddress$inboundSchema = z48.pipe(
22460
+ z48.object({
22461
+ line1: z48.optional(z48.nullable(string5())),
22462
+ line2: z48.optional(z48.nullable(string5())),
22463
+ city: z48.optional(z48.nullable(string5())),
22464
+ state: z48.optional(z48.nullable(string5())),
22465
+ postal_code: z48.optional(z48.nullable(string5())),
22466
+ country: z48.optional(z48.nullable(string5()))
22467
+ }),
22468
+ z48.transform((v) => {
22469
+ return remap(v, {
22470
+ "postal_code": "postalCode"
22471
+ });
22472
+ })
22473
+ );
22474
+ var GetCustomerBillingDetailsTaxId$inboundSchema = z48.object({
22475
+ type: string5(),
22476
+ value: string5()
22477
+ });
22478
+ var GetCustomerTaxExempt$inboundSchema = inboundSchema(GetCustomerTaxExempt);
22479
+ var GetCustomerBillingDetailsCustomField$inboundSchema = z48.object({
22480
+ name: string5(),
22481
+ value: string5()
22482
+ });
22483
+ var GetCustomerInvoiceSettings$inboundSchema = z48.pipe(
22484
+ z48.object({
22485
+ custom_fields: z48.array(
22486
+ z48.lazy(() => GetCustomerBillingDetailsCustomField$inboundSchema)
22487
+ )
22488
+ }),
22489
+ z48.transform((v) => {
22490
+ return remap(v, {
22491
+ "custom_fields": "customFields"
22492
+ });
22493
+ })
22494
+ );
22495
+ var GetCustomerBillingDetails$inboundSchema = z48.pipe(
22496
+ z48.object({
22497
+ address: nullable(
22498
+ z48.lazy(() => GetCustomerBillingDetailsAddress$inboundSchema)
22499
+ ),
22500
+ tax_ids: z48.array(
22501
+ z48.lazy(() => GetCustomerBillingDetailsTaxId$inboundSchema)
22502
+ ),
22503
+ tax_exempt: nullable(GetCustomerTaxExempt$inboundSchema),
22504
+ invoice_settings: z48.lazy(() => GetCustomerInvoiceSettings$inboundSchema)
22505
+ }),
22506
+ z48.transform((v) => {
22507
+ return remap(v, {
22508
+ "tax_ids": "taxIds",
22509
+ "tax_exempt": "taxExempt",
22510
+ "invoice_settings": "invoiceSettings"
22511
+ });
22512
+ })
22513
+ );
22393
22514
  var GetCustomerResponse$inboundSchema = z48.pipe(
22394
22515
  z48.object({
22395
22516
  id: nullable(string5()),
@@ -22429,7 +22550,10 @@ var GetCustomerResponse$inboundSchema = z48.pipe(
22429
22550
  referrals: optional3(
22430
22551
  z48.array(z48.lazy(() => GetCustomerReferral$inboundSchema))
22431
22552
  ),
22432
- payment_method: z48.optional(z48.nullable(z48.any()))
22553
+ payment_method: z48.optional(z48.nullable(z48.any())),
22554
+ billing_details: z48.optional(
22555
+ z48.nullable(z48.lazy(() => GetCustomerBillingDetails$inboundSchema))
22556
+ )
22433
22557
  }),
22434
22558
  z48.transform((v) => {
22435
22559
  return remap(v, {
@@ -22439,7 +22563,8 @@ var GetCustomerResponse$inboundSchema = z48.pipe(
22439
22563
  "billing_controls": "billingControls",
22440
22564
  "invoice_previews": "invoicePreviews",
22441
22565
  "trials_used": "trialsUsed",
22442
- "payment_method": "paymentMethod"
22566
+ "payment_method": "paymentMethod",
22567
+ "billing_details": "billingDetails"
22443
22568
  });
22444
22569
  })
22445
22570
  );
@@ -23456,6 +23581,11 @@ var GetOrCreateCustomerBasis = {
23456
23581
  Recurring: "recurring",
23457
23582
  UsageLimit: "usage_limit"
23458
23583
  };
23584
+ var GetOrCreateCustomerTaxExempt = {
23585
+ None: "none",
23586
+ Exempt: "exempt",
23587
+ Reverse: "reverse"
23588
+ };
23459
23589
  var GetOrCreateCustomerAutoTopupInterval$outboundSchema = z51.enum(GetOrCreateCustomerAutoTopupInterval);
23460
23590
  var GetOrCreateCustomerPurchaseLimit$outboundSchema = z51.pipe(
23461
23591
  z51.object({
@@ -23614,6 +23744,79 @@ var GetOrCreateCustomerConfig$outboundSchema = z51.pipe(
23614
23744
  });
23615
23745
  })
23616
23746
  );
23747
+ var GetOrCreateCustomerBillingDetailsAddress$outboundSchema = z51.pipe(
23748
+ z51.object({
23749
+ line1: z51.optional(z51.nullable(z51.string())),
23750
+ line2: z51.optional(z51.nullable(z51.string())),
23751
+ city: z51.optional(z51.nullable(z51.string())),
23752
+ state: z51.optional(z51.nullable(z51.string())),
23753
+ postalCode: z51.optional(z51.nullable(z51.string())),
23754
+ country: z51.optional(z51.nullable(z51.string()))
23755
+ }),
23756
+ z51.transform((v) => {
23757
+ return remap(v, {
23758
+ postalCode: "postal_code"
23759
+ });
23760
+ })
23761
+ );
23762
+ var GetOrCreateCustomerAddBillingDetailsTaxId$outboundSchema = z51.object({
23763
+ type: z51.string(),
23764
+ value: z51.string()
23765
+ });
23766
+ var GetOrCreateCustomerRemoveBillingDetailsTaxId$outboundSchema = z51.object({
23767
+ type: z51.string(),
23768
+ value: z51.string()
23769
+ });
23770
+ var GetOrCreateCustomerTaxIds$outboundSchema = z51.object({
23771
+ add: z51.optional(
23772
+ z51.array(z51.lazy(
23773
+ () => GetOrCreateCustomerAddBillingDetailsTaxId$outboundSchema
23774
+ ))
23775
+ ),
23776
+ remove: z51.optional(
23777
+ z51.array(z51.lazy(
23778
+ () => GetOrCreateCustomerRemoveBillingDetailsTaxId$outboundSchema
23779
+ ))
23780
+ )
23781
+ });
23782
+ var GetOrCreateCustomerTaxExempt$outboundSchema = z51.enum(GetOrCreateCustomerTaxExempt);
23783
+ var GetOrCreateCustomerBillingDetailsCustomField$outboundSchema = z51.object({
23784
+ name: z51.string(),
23785
+ value: z51.string()
23786
+ });
23787
+ var GetOrCreateCustomerInvoiceSettings$outboundSchema = z51.pipe(
23788
+ z51.object({
23789
+ customFields: z51.optional(z51.nullable(z51.array(z51.lazy(
23790
+ () => GetOrCreateCustomerBillingDetailsCustomField$outboundSchema
23791
+ ))))
23792
+ }),
23793
+ z51.transform((v) => {
23794
+ return remap(v, {
23795
+ customFields: "custom_fields"
23796
+ });
23797
+ })
23798
+ );
23799
+ var GetOrCreateCustomerBillingDetails$outboundSchema = z51.pipe(
23800
+ z51.object({
23801
+ address: z51.optional(z51.nullable(z51.lazy(
23802
+ () => GetOrCreateCustomerBillingDetailsAddress$outboundSchema
23803
+ ))),
23804
+ taxIds: z51.optional(z51.lazy(
23805
+ () => GetOrCreateCustomerTaxIds$outboundSchema
23806
+ )),
23807
+ taxExempt: z51.optional(GetOrCreateCustomerTaxExempt$outboundSchema),
23808
+ invoiceSettings: z51.optional(
23809
+ z51.lazy(() => GetOrCreateCustomerInvoiceSettings$outboundSchema)
23810
+ )
23811
+ }),
23812
+ z51.transform((v) => {
23813
+ return remap(v, {
23814
+ taxIds: "tax_ids",
23815
+ taxExempt: "tax_exempt",
23816
+ invoiceSettings: "invoice_settings"
23817
+ });
23818
+ })
23819
+ );
23617
23820
  var GetOrCreateCustomerParams$outboundSchema = z51.pipe(
23618
23821
  z51.object({
23619
23822
  customerId: z51.nullable(z51.string()),
@@ -23630,6 +23833,9 @@ var GetOrCreateCustomerParams$outboundSchema = z51.pipe(
23630
23833
  z51.lazy(() => GetOrCreateCustomerBillingControls$outboundSchema)
23631
23834
  ),
23632
23835
  config: z51.optional(z51.lazy(() => GetOrCreateCustomerConfig$outboundSchema)),
23836
+ billingDetails: z51.optional(
23837
+ z51.lazy(() => GetOrCreateCustomerBillingDetails$outboundSchema)
23838
+ ),
23633
23839
  expand: z51.optional(z51.array(CustomerExpand$outboundSchema))
23634
23840
  }),
23635
23841
  z51.transform((v) => {
@@ -23639,7 +23845,8 @@ var GetOrCreateCustomerParams$outboundSchema = z51.pipe(
23639
23845
  createInStripe: "create_in_stripe",
23640
23846
  autoEnablePlanId: "auto_enable_plan_id",
23641
23847
  sendEmailReceipts: "send_email_receipts",
23642
- billingControls: "billing_controls"
23848
+ billingControls: "billing_controls",
23849
+ billingDetails: "billing_details"
23643
23850
  });
23644
23851
  })
23645
23852
  );
@@ -44457,6 +44664,11 @@ var UpdateCustomerBasisRequestBody = {
44457
44664
  Recurring: "recurring",
44458
44665
  UsageLimit: "usage_limit"
44459
44666
  };
44667
+ var UpdateCustomerTaxExempt = {
44668
+ None: "none",
44669
+ Exempt: "exempt",
44670
+ Reverse: "reverse"
44671
+ };
44460
44672
  var UpdateCustomerEnv = {
44461
44673
  Sandbox: "sandbox",
44462
44674
  Live: "live"
@@ -44754,6 +44966,77 @@ var UpdateCustomerConfigRequestBody$outboundSchema = z99.pipe(
44754
44966
  });
44755
44967
  })
44756
44968
  );
44969
+ var UpdateCustomerBillingDetailsAddress$outboundSchema = z99.pipe(
44970
+ z99.object({
44971
+ line1: z99.optional(z99.nullable(z99.string())),
44972
+ line2: z99.optional(z99.nullable(z99.string())),
44973
+ city: z99.optional(z99.nullable(z99.string())),
44974
+ state: z99.optional(z99.nullable(z99.string())),
44975
+ postalCode: z99.optional(z99.nullable(z99.string())),
44976
+ country: z99.optional(z99.nullable(z99.string()))
44977
+ }),
44978
+ z99.transform((v) => {
44979
+ return remap(v, {
44980
+ postalCode: "postal_code"
44981
+ });
44982
+ })
44983
+ );
44984
+ var UpdateCustomerAddBillingDetailsTaxId$outboundSchema = z99.object({
44985
+ type: z99.string(),
44986
+ value: z99.string()
44987
+ });
44988
+ var UpdateCustomerRemoveBillingDetailsTaxId$outboundSchema = z99.object({
44989
+ type: z99.string(),
44990
+ value: z99.string()
44991
+ });
44992
+ var UpdateCustomerTaxIds$outboundSchema = z99.object({
44993
+ add: z99.optional(
44994
+ z99.array(z99.lazy(() => UpdateCustomerAddBillingDetailsTaxId$outboundSchema))
44995
+ ),
44996
+ remove: z99.optional(
44997
+ z99.array(
44998
+ z99.lazy(() => UpdateCustomerRemoveBillingDetailsTaxId$outboundSchema)
44999
+ )
45000
+ )
45001
+ });
45002
+ var UpdateCustomerTaxExempt$outboundSchema = z99.enum(UpdateCustomerTaxExempt);
45003
+ var UpdateCustomerBillingDetailsCustomField$outboundSchema = z99.object({
45004
+ name: z99.string(),
45005
+ value: z99.string()
45006
+ });
45007
+ var UpdateCustomerInvoiceSettings$outboundSchema = z99.pipe(
45008
+ z99.object({
45009
+ customFields: z99.optional(z99.nullable(z99.array(z99.lazy(
45010
+ () => UpdateCustomerBillingDetailsCustomField$outboundSchema
45011
+ ))))
45012
+ }),
45013
+ z99.transform((v) => {
45014
+ return remap(v, {
45015
+ customFields: "custom_fields"
45016
+ });
45017
+ })
45018
+ );
45019
+ var BillingDetailsParams$outboundSchema = z99.pipe(
45020
+ z99.object({
45021
+ address: z99.optional(z99.nullable(z99.lazy(
45022
+ () => UpdateCustomerBillingDetailsAddress$outboundSchema
45023
+ ))),
45024
+ taxIds: z99.optional(z99.lazy(
45025
+ () => UpdateCustomerTaxIds$outboundSchema
45026
+ )),
45027
+ taxExempt: z99.optional(UpdateCustomerTaxExempt$outboundSchema),
45028
+ invoiceSettings: z99.optional(
45029
+ z99.lazy(() => UpdateCustomerInvoiceSettings$outboundSchema)
45030
+ )
45031
+ }),
45032
+ z99.transform((v) => {
45033
+ return remap(v, {
45034
+ taxIds: "tax_ids",
45035
+ taxExempt: "tax_exempt",
45036
+ invoiceSettings: "invoice_settings"
45037
+ });
45038
+ })
45039
+ );
44757
45040
  var UpdateCustomerParams$outboundSchema = z99.pipe(
44758
45041
  z99.object({
44759
45042
  customerId: z99.string(),
@@ -44770,6 +45053,9 @@ var UpdateCustomerParams$outboundSchema = z99.pipe(
44770
45053
  config: z99.optional(
44771
45054
  z99.lazy(() => UpdateCustomerConfigRequestBody$outboundSchema)
44772
45055
  ),
45056
+ billingDetails: z99.optional(
45057
+ z99.lazy(() => BillingDetailsParams$outboundSchema)
45058
+ ),
44773
45059
  newCustomerId: z99.optional(z99.string())
44774
45060
  }),
44775
45061
  z99.transform((v) => {
@@ -44778,6 +45064,7 @@ var UpdateCustomerParams$outboundSchema = z99.pipe(
44778
45064
  stripeId: "stripe_id",
44779
45065
  sendEmailReceipts: "send_email_receipts",
44780
45066
  billingControls: "billing_controls",
45067
+ billingDetails: "billing_details",
44781
45068
  newCustomerId: "new_customer_id"
44782
45069
  });
44783
45070
  })
@@ -55584,6 +55871,7 @@ var Customers = class extends ClientSDK {
55584
55871
  * @param currency - Currency to bill this customer in (e.g. usd, eur). Defaults to the organization's default currency. (optional)
55585
55872
  * @param billingControls - Billing controls for the customer (auto top-ups, etc.) (optional)
55586
55873
  * @param config - Miscellaneous configurations for the customer. (optional)
55874
+ * @param billingDetails - Billing details to set on the Stripe customer. Creates the Stripe customer if needed. (optional)
55587
55875
  * @param expand - Fields to expand in the returned customer response, such as subscriptions.plan, purchases.plan, balances.feature, or flags.feature. (optional)
55588
55876
  */
55589
55877
  async getOrCreate(request, options) {
@@ -61773,6 +62061,42 @@ var getOrCreateCustomerConfigSchema = import_v46.z.object({
61773
62061
  disablePooledBalance: import_v46.z.union([import_v46.z.boolean(), import_v46.z.undefined()]).optional(),
61774
62062
  disableOverageBilling: import_v46.z.union([import_v46.z.boolean(), import_v46.z.undefined()]).optional()
61775
62063
  });
62064
+ var getOrCreateCustomerBillingDetailsAddressSchema = import_v46.z.object({
62065
+ line1: import_v46.z.union([import_v46.z.string(), import_v46.z.undefined()]).optional().nullable(),
62066
+ line2: import_v46.z.union([import_v46.z.string(), import_v46.z.undefined()]).optional().nullable(),
62067
+ city: import_v46.z.union([import_v46.z.string(), import_v46.z.undefined()]).optional().nullable(),
62068
+ state: import_v46.z.union([import_v46.z.string(), import_v46.z.undefined()]).optional().nullable(),
62069
+ postalCode: import_v46.z.union([import_v46.z.string(), import_v46.z.undefined()]).optional().nullable(),
62070
+ country: import_v46.z.union([import_v46.z.string(), import_v46.z.undefined()]).optional().nullable()
62071
+ });
62072
+ var getOrCreateCustomerAddBillingDetailsTaxIdSchema = import_v46.z.object({
62073
+ type: import_v46.z.string(),
62074
+ value: import_v46.z.string()
62075
+ });
62076
+ var getOrCreateCustomerRemoveBillingDetailsTaxIdSchema = import_v46.z.object({
62077
+ type: import_v46.z.string(),
62078
+ value: import_v46.z.string()
62079
+ });
62080
+ var getOrCreateCustomerTaxIdsSchema = import_v46.z.object({
62081
+ add: import_v46.z.union([
62082
+ import_v46.z.array(getOrCreateCustomerAddBillingDetailsTaxIdSchema),
62083
+ import_v46.z.undefined()
62084
+ ]).optional(),
62085
+ remove: import_v46.z.union([
62086
+ import_v46.z.array(getOrCreateCustomerRemoveBillingDetailsTaxIdSchema),
62087
+ import_v46.z.undefined()
62088
+ ]).optional()
62089
+ });
62090
+ var getOrCreateCustomerBillingDetailsCustomFieldSchema = import_v46.z.object({
62091
+ name: import_v46.z.string(),
62092
+ value: import_v46.z.string()
62093
+ });
62094
+ var getOrCreateCustomerInvoiceSettingsSchema = import_v46.z.object({
62095
+ customFields: import_v46.z.union([
62096
+ import_v46.z.array(getOrCreateCustomerBillingDetailsCustomFieldSchema),
62097
+ import_v46.z.undefined()
62098
+ ]).optional().nullable()
62099
+ });
61776
62100
  var getOrCreateCustomerPurchaseLimitOutboundSchema = import_v46.z.object({
61777
62101
  interval: import_v46.z.string(),
61778
62102
  interval_count: import_v46.z.number(),
@@ -61860,6 +62184,53 @@ var getOrCreateCustomerConfigOutboundSchema = import_v46.z.object({
61860
62184
  disable_pooled_balance: import_v46.z.union([import_v46.z.boolean(), import_v46.z.undefined()]).optional(),
61861
62185
  disable_overage_billing: import_v46.z.union([import_v46.z.boolean(), import_v46.z.undefined()]).optional()
61862
62186
  });
62187
+ var getOrCreateCustomerBillingDetailsAddressOutboundSchema = import_v46.z.object({
62188
+ line1: import_v46.z.union([import_v46.z.string(), import_v46.z.undefined()]).optional().nullable(),
62189
+ line2: import_v46.z.union([import_v46.z.string(), import_v46.z.undefined()]).optional().nullable(),
62190
+ city: import_v46.z.union([import_v46.z.string(), import_v46.z.undefined()]).optional().nullable(),
62191
+ state: import_v46.z.union([import_v46.z.string(), import_v46.z.undefined()]).optional().nullable(),
62192
+ postal_code: import_v46.z.union([import_v46.z.string(), import_v46.z.undefined()]).optional().nullable(),
62193
+ country: import_v46.z.union([import_v46.z.string(), import_v46.z.undefined()]).optional().nullable()
62194
+ });
62195
+ var getOrCreateCustomerAddBillingDetailsTaxIdOutboundSchema = import_v46.z.object(
62196
+ {
62197
+ type: import_v46.z.string(),
62198
+ value: import_v46.z.string()
62199
+ }
62200
+ );
62201
+ var getOrCreateCustomerRemoveBillingDetailsTaxIdOutboundSchema = import_v46.z.object({
62202
+ type: import_v46.z.string(),
62203
+ value: import_v46.z.string()
62204
+ });
62205
+ var getOrCreateCustomerTaxIdsOutboundSchema = import_v46.z.object({
62206
+ add: import_v46.z.union([
62207
+ import_v46.z.array(getOrCreateCustomerAddBillingDetailsTaxIdOutboundSchema),
62208
+ import_v46.z.undefined()
62209
+ ]).optional(),
62210
+ remove: import_v46.z.union([
62211
+ import_v46.z.array(getOrCreateCustomerRemoveBillingDetailsTaxIdOutboundSchema),
62212
+ import_v46.z.undefined()
62213
+ ]).optional()
62214
+ });
62215
+ var getOrCreateCustomerBillingDetailsCustomFieldOutboundSchema = import_v46.z.object({
62216
+ name: import_v46.z.string(),
62217
+ value: import_v46.z.string()
62218
+ });
62219
+ var getOrCreateCustomerInvoiceSettingsOutboundSchema = import_v46.z.object({
62220
+ custom_fields: import_v46.z.union([
62221
+ import_v46.z.array(getOrCreateCustomerBillingDetailsCustomFieldOutboundSchema),
62222
+ import_v46.z.undefined()
62223
+ ]).optional().nullable()
62224
+ });
62225
+ var getOrCreateCustomerBillingDetailsOutboundSchema = import_v46.z.object({
62226
+ address: import_v46.z.union([
62227
+ getOrCreateCustomerBillingDetailsAddressOutboundSchema,
62228
+ import_v46.z.undefined()
62229
+ ]).optional().nullable(),
62230
+ tax_ids: import_v46.z.union([getOrCreateCustomerTaxIdsOutboundSchema, import_v46.z.undefined()]).optional(),
62231
+ tax_exempt: import_v46.z.union([import_v46.z.string(), import_v46.z.undefined()]).optional(),
62232
+ invoice_settings: import_v46.z.union([getOrCreateCustomerInvoiceSettingsOutboundSchema, import_v46.z.undefined()]).optional()
62233
+ });
61863
62234
  var getOrCreateCustomerParamsOutboundSchema = import_v46.z.object({
61864
62235
  customer_id: import_v46.z.string().nullable(),
61865
62236
  name: import_v46.z.union([import_v46.z.string(), import_v46.z.undefined()]).optional().nullable(),
@@ -61873,6 +62244,7 @@ var getOrCreateCustomerParamsOutboundSchema = import_v46.z.object({
61873
62244
  currency: import_v46.z.union([import_v46.z.string(), import_v46.z.undefined()]).optional().nullable(),
61874
62245
  billing_controls: import_v46.z.union([getOrCreateCustomerBillingControlsOutboundSchema, import_v46.z.undefined()]).optional(),
61875
62246
  config: import_v46.z.union([getOrCreateCustomerConfigOutboundSchema, import_v46.z.undefined()]).optional(),
62247
+ billing_details: import_v46.z.union([getOrCreateCustomerBillingDetailsOutboundSchema, import_v46.z.undefined()]).optional(),
61876
62248
  expand: import_v46.z.union([import_v46.z.array(import_v46.z.string()), import_v46.z.undefined()]).optional()
61877
62249
  });
61878
62250
  var closedEnumSchema5 = import_v46.z.any();
@@ -61928,6 +62300,13 @@ var getOrCreateCustomerBillingControlsSchema = import_v46.z.object({
61928
62300
  usageAlerts: import_v46.z.union([import_v46.z.array(getOrCreateCustomerUsageAlertSchema), import_v46.z.undefined()]).optional(),
61929
62301
  overageAllowed: import_v46.z.union([import_v46.z.array(getOrCreateCustomerOverageAllowedSchema), import_v46.z.undefined()]).optional()
61930
62302
  });
62303
+ var getOrCreateCustomerTaxExemptSchema = closedEnumSchema5;
62304
+ var getOrCreateCustomerBillingDetailsSchema = import_v46.z.object({
62305
+ address: import_v46.z.union([getOrCreateCustomerBillingDetailsAddressSchema, import_v46.z.undefined()]).optional().nullable(),
62306
+ taxIds: import_v46.z.union([getOrCreateCustomerTaxIdsSchema, import_v46.z.undefined()]).optional(),
62307
+ taxExempt: import_v46.z.union([getOrCreateCustomerTaxExemptSchema, import_v46.z.undefined()]).optional(),
62308
+ invoiceSettings: import_v46.z.union([getOrCreateCustomerInvoiceSettingsSchema, import_v46.z.undefined()]).optional()
62309
+ });
61931
62310
  var getOrCreateCustomerParamsSchema = import_v46.z.object({
61932
62311
  customerId: import_v46.z.string().nullable(),
61933
62312
  name: import_v46.z.union([import_v46.z.string(), import_v46.z.undefined()]).optional().nullable(),
@@ -61941,6 +62320,7 @@ var getOrCreateCustomerParamsSchema = import_v46.z.object({
61941
62320
  currency: import_v46.z.union([import_v46.z.string(), import_v46.z.undefined()]).optional().nullable(),
61942
62321
  billingControls: import_v46.z.union([getOrCreateCustomerBillingControlsSchema, import_v46.z.undefined()]).optional(),
61943
62322
  config: import_v46.z.union([getOrCreateCustomerConfigSchema, import_v46.z.undefined()]).optional(),
62323
+ billingDetails: import_v46.z.union([getOrCreateCustomerBillingDetailsSchema, import_v46.z.undefined()]).optional(),
61944
62324
  expand: import_v46.z.union([import_v46.z.array(customerExpandSchema), import_v46.z.undefined()]).optional()
61945
62325
  });
61946
62326
 
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  autumnHandler
3
- } from "../chunk-2HWIH2HC.mjs";
3
+ } from "../chunk-H5NW7P7T.mjs";
4
4
  import "../chunk-WYDGEDEU.mjs";
5
5
  import "../chunk-VXND2UDT.mjs";
6
- import "../chunk-R2CXUYPG.mjs";
7
- import "../chunk-QSHAL5TZ.mjs";
8
- import "../chunk-B4CUYWLF.mjs";
6
+ import "../chunk-C7XNQRUJ.mjs";
7
+ import "../chunk-CZLYNX6I.mjs";
8
+ import "../chunk-63QUSMCV.mjs";
9
9
  import "../chunk-MOHYGUMA.mjs";
10
10
  import "../chunk-TBQ27LIK.mjs";
11
11
  import "../chunk-J44WR3QZ.mjs";
12
12
  import "../chunk-TSF4YCUO.mjs";
13
13
  import "../chunk-UAR3TMWI.mjs";
14
- import "../chunk-ITZ2QE2R.mjs";
14
+ import "../chunk-ET3EY5PE.mjs";
15
15
  import "../chunk-OTXV5FY7.mjs";
16
16
  import "../chunk-VZIMT7AO.mjs";
17
17
  import "../chunk-I7CD6EB6.mjs";
@@ -1,7 +1,7 @@
1
1
  import * as hono_utils_types from 'hono/utils/types';
2
2
  import * as hono from 'hono';
3
3
  import { Context, Next } from 'hono';
4
- import { A as AuthResult } from '../authTypes-CE4qx_oC.mjs';
4
+ import { A as AuthResult } from '../authTypes-TPWTIfcM.mjs';
5
5
 
6
6
  type HonoAutumnHandlerOptions<ContextType extends Context = Context> = {
7
7
  /** Function to identify the customer from the Hono context */
@@ -1,7 +1,7 @@
1
1
  import * as hono_utils_types from 'hono/utils/types';
2
2
  import * as hono from 'hono';
3
3
  import { Context, Next } from 'hono';
4
- import { A as AuthResult } from '../authTypes-CE4qx_oC.js';
4
+ import { A as AuthResult } from '../authTypes-TPWTIfcM.js';
5
5
 
6
6
  type HonoAutumnHandlerOptions<ContextType extends Context = Context> = {
7
7
  /** Function to identify the customer from the Hono context */