chargebee 3.34.0 → 3.36.0

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 (198) hide show
  1. package/CHANGELOG.md +237 -0
  2. package/cjs/environment.js +1 -1
  3. package/cjs/resources/api_endpoints.js +230 -2
  4. package/cjs/resources/webhook/eventType.js +25 -1
  5. package/cjs/schema/addon.schema.js +221 -40
  6. package/cjs/schema/alert.schema.js +17 -2
  7. package/cjs/schema/alert_status.schema.js +6 -1
  8. package/cjs/schema/attached_item.schema.js +101 -26
  9. package/cjs/schema/business_entity.schema.js +43 -6
  10. package/cjs/schema/business_rule.schema.js +2 -2
  11. package/cjs/schema/business_ruleset.schema.js +2 -2
  12. package/cjs/schema/collections_payment_promise.schema.js +43 -0
  13. package/cjs/schema/comment.schema.js +17 -4
  14. package/cjs/schema/coupon.schema.js +218 -37
  15. package/cjs/schema/coupon_code.schema.js +36 -6
  16. package/cjs/schema/coupon_set.schema.js +108 -27
  17. package/cjs/schema/credit_note.schema.js +497 -105
  18. package/cjs/schema/credit_unit.schema.js +12 -2
  19. package/cjs/schema/customer.schema.js +212 -62
  20. package/cjs/schema/differential_price.schema.js +100 -12
  21. package/cjs/schema/dispute.schema.js +125 -33
  22. package/cjs/schema/einvoice.schema.js +27 -6
  23. package/cjs/schema/email_log.schema.js +15 -4
  24. package/cjs/schema/entitlement.schema.js +35 -6
  25. package/cjs/schema/entitlement_override.schema.js +17 -1
  26. package/cjs/schema/estimate.schema.js +585 -40
  27. package/cjs/schema/event.schema.js +1334 -585
  28. package/cjs/schema/export.schema.js +4459 -1412
  29. package/cjs/schema/feature.schema.js +73 -11
  30. package/cjs/schema/gateway_request_log.schema.js +309 -0
  31. package/cjs/schema/gateway_webhook_log.schema.js +257 -0
  32. package/cjs/schema/gift.schema.js +51 -5
  33. package/cjs/schema/grant_block.schema.js +45 -12
  34. package/cjs/schema/hosted_page.schema.js +564 -68
  35. package/cjs/schema/index.js +6 -0
  36. package/cjs/schema/invoice.schema.js +843 -123
  37. package/cjs/schema/item.schema.js +151 -28
  38. package/cjs/schema/item_entitlement.schema.js +23 -2
  39. package/cjs/schema/item_family.schema.js +29 -8
  40. package/cjs/schema/item_price.schema.js +263 -48
  41. package/cjs/schema/ledger_account_balance.schema.js +11 -2
  42. package/cjs/schema/ledger_operation.schema.js +44 -17
  43. package/cjs/schema/metered_feature.schema.js +10 -1
  44. package/cjs/schema/omnichannel_one_time_order.schema.js +42 -4
  45. package/cjs/schema/omnichannel_subscription.schema.js +146 -32
  46. package/cjs/schema/order.schema.js +233 -61
  47. package/cjs/schema/organization_detail.schema.js +36 -0
  48. package/cjs/schema/payment_schedule.schema.js +39 -8
  49. package/cjs/schema/payment_schedule_scheme.schema.js +37 -7
  50. package/cjs/schema/payment_source.schema.js +375 -148
  51. package/cjs/schema/payment_voucher.schema.js +33 -5
  52. package/cjs/schema/plan.schema.js +345 -57
  53. package/cjs/schema/price_ramp.schema.js +153 -0
  54. package/cjs/schema/price_variant.schema.js +88 -18
  55. package/cjs/schema/pricing_page_session.schema.js +36 -2
  56. package/cjs/schema/promotional_credit.schema.js +27 -6
  57. package/cjs/schema/purchase.schema.js +210 -12
  58. package/cjs/schema/quote.schema.js +907 -87
  59. package/cjs/schema/quote_entitlement.schema.js +6 -2
  60. package/cjs/schema/ramp.schema.js +242 -24
  61. package/cjs/schema/retry_segment.schema.js +12 -0
  62. package/cjs/schema/site_migration_detail.schema.js +50 -16
  63. package/cjs/schema/subscription.schema.js +1002 -173
  64. package/cjs/schema/subscription_entitlement.schema.js +9 -1
  65. package/cjs/schema/transaction.schema.js +780 -342
  66. package/cjs/schema/unbilled_charge.schema.js +141 -13
  67. package/cjs/schema/usage.schema.js +59 -11
  68. package/cjs/schema/usage_event.schema.js +13 -1
  69. package/cjs/schema/usage_summary.schema.js +1 -0
  70. package/cjs/schema/virtual_bank_account.schema.js +42 -10
  71. package/cjs/schema/webhook_endpoint.schema.js +50 -2
  72. package/esm/environment.js +1 -1
  73. package/esm/resources/api_endpoints.js +230 -2
  74. package/esm/resources/webhook/eventType.js +25 -1
  75. package/esm/schema/addon.schema.js +221 -40
  76. package/esm/schema/alert.schema.js +17 -2
  77. package/esm/schema/alert_status.schema.js +6 -1
  78. package/esm/schema/attached_item.schema.js +101 -26
  79. package/esm/schema/business_entity.schema.js +42 -5
  80. package/esm/schema/business_rule.schema.js +2 -2
  81. package/esm/schema/business_ruleset.schema.js +2 -2
  82. package/esm/schema/collections_payment_promise.schema.js +40 -0
  83. package/esm/schema/comment.schema.js +17 -4
  84. package/esm/schema/coupon.schema.js +218 -37
  85. package/esm/schema/coupon_code.schema.js +36 -6
  86. package/esm/schema/coupon_set.schema.js +108 -27
  87. package/esm/schema/credit_note.schema.js +497 -105
  88. package/esm/schema/credit_unit.schema.js +12 -2
  89. package/esm/schema/customer.schema.js +212 -62
  90. package/esm/schema/differential_price.schema.js +100 -12
  91. package/esm/schema/dispute.schema.js +125 -33
  92. package/esm/schema/einvoice.schema.js +27 -6
  93. package/esm/schema/email_log.schema.js +15 -4
  94. package/esm/schema/entitlement.schema.js +35 -6
  95. package/esm/schema/entitlement_override.schema.js +17 -1
  96. package/esm/schema/estimate.schema.js +585 -40
  97. package/esm/schema/event.schema.js +1334 -585
  98. package/esm/schema/export.schema.js +4459 -1412
  99. package/esm/schema/feature.schema.js +73 -11
  100. package/esm/schema/gateway_request_log.schema.js +306 -0
  101. package/esm/schema/gateway_webhook_log.schema.js +254 -0
  102. package/esm/schema/gift.schema.js +51 -5
  103. package/esm/schema/grant_block.schema.js +45 -12
  104. package/esm/schema/hosted_page.schema.js +564 -68
  105. package/esm/schema/index.js +6 -0
  106. package/esm/schema/invoice.schema.js +842 -122
  107. package/esm/schema/item.schema.js +151 -28
  108. package/esm/schema/item_entitlement.schema.js +23 -2
  109. package/esm/schema/item_family.schema.js +29 -8
  110. package/esm/schema/item_price.schema.js +263 -48
  111. package/esm/schema/ledger_account_balance.schema.js +10 -1
  112. package/esm/schema/ledger_operation.schema.js +44 -17
  113. package/esm/schema/metered_feature.schema.js +10 -1
  114. package/esm/schema/omnichannel_one_time_order.schema.js +42 -4
  115. package/esm/schema/omnichannel_subscription.schema.js +146 -32
  116. package/esm/schema/order.schema.js +233 -61
  117. package/esm/schema/organization_detail.schema.js +33 -0
  118. package/esm/schema/payment_schedule.schema.js +39 -8
  119. package/esm/schema/payment_schedule_scheme.schema.js +37 -7
  120. package/esm/schema/payment_source.schema.js +375 -148
  121. package/esm/schema/payment_voucher.schema.js +33 -5
  122. package/esm/schema/plan.schema.js +345 -57
  123. package/esm/schema/price_ramp.schema.js +150 -0
  124. package/esm/schema/price_variant.schema.js +88 -18
  125. package/esm/schema/pricing_page_session.schema.js +36 -2
  126. package/esm/schema/promotional_credit.schema.js +27 -6
  127. package/esm/schema/purchase.schema.js +210 -12
  128. package/esm/schema/quote.schema.js +907 -87
  129. package/esm/schema/quote_entitlement.schema.js +6 -2
  130. package/esm/schema/ramp.schema.js +242 -24
  131. package/esm/schema/retry_segment.schema.js +9 -0
  132. package/esm/schema/site_migration_detail.schema.js +50 -16
  133. package/esm/schema/subscription.schema.js +1002 -173
  134. package/esm/schema/subscription_entitlement.schema.js +9 -1
  135. package/esm/schema/transaction.schema.js +780 -342
  136. package/esm/schema/unbilled_charge.schema.js +141 -13
  137. package/esm/schema/usage.schema.js +59 -11
  138. package/esm/schema/usage_event.schema.js +13 -1
  139. package/esm/schema/usage_summary.schema.js +1 -0
  140. package/esm/schema/virtual_bank_account.schema.js +42 -10
  141. package/esm/schema/webhook_endpoint.schema.js +50 -2
  142. package/package.json +1 -1
  143. package/types/core.d.ts +63 -74
  144. package/types/index.d.ts +29 -1
  145. package/types/resources/BillingLineItem.d.ts +10 -0
  146. package/types/resources/BillingMetadata.d.ts +9 -0
  147. package/types/resources/BusinessEntity.d.ts +52 -0
  148. package/types/resources/Citation.d.ts +13 -0
  149. package/types/resources/CollectionsDispute.d.ts +24 -0
  150. package/types/resources/CollectionsPaymentPromise.d.ts +93 -0
  151. package/types/resources/CollectionsReminderSequence.d.ts +35 -0
  152. package/types/resources/Comment.d.ts +2 -1
  153. package/types/resources/Content.d.ts +23 -1
  154. package/types/resources/CreditNote.d.ts +1 -0
  155. package/types/resources/CustomData.d.ts +14 -0
  156. package/types/resources/Discount.d.ts +1 -0
  157. package/types/resources/DraftEstimate.d.ts +13 -0
  158. package/types/resources/DraftRequest.d.ts +45 -0
  159. package/types/resources/EmailAttachment.d.ts +16 -0
  160. package/types/resources/EmailConversation.d.ts +18 -0
  161. package/types/resources/EmailLog.d.ts +1 -0
  162. package/types/resources/EmailMessage.d.ts +40 -0
  163. package/types/resources/Estimate.d.ts +3 -0
  164. package/types/resources/Event.d.ts +25 -1
  165. package/types/resources/Execution.d.ts +12 -0
  166. package/types/resources/GatewayPaymentMethodToken.d.ts +2 -2
  167. package/types/resources/GatewayRequestLog.d.ts +82 -0
  168. package/types/resources/GatewayWebhookLog.d.ts +74 -0
  169. package/types/resources/GrantBlock.d.ts +5 -0
  170. package/types/resources/GroupByAttribute.d.ts +15 -0
  171. package/types/resources/GroupByRecommendation.d.ts +10 -0
  172. package/types/resources/HostedPage.d.ts +18 -0
  173. package/types/resources/Invoice.d.ts +19 -0
  174. package/types/resources/ItemPrice.d.ts +1 -0
  175. package/types/resources/LedgerAccountBalance.d.ts +19 -0
  176. package/types/resources/Meter.d.ts +1 -0
  177. package/types/resources/MeteredFeature.d.ts +1 -0
  178. package/types/resources/OmnichannelOneTimeOrder.d.ts +5 -1
  179. package/types/resources/OmnichannelSubscription.d.ts +6 -1
  180. package/types/resources/OmnichannelSubscriptionItem.d.ts +4 -1
  181. package/types/resources/OrganizationDetail.d.ts +84 -0
  182. package/types/resources/PaymentSchedule.d.ts +1 -1
  183. package/types/resources/PaymentScheduleEstimate.d.ts +1 -1
  184. package/types/resources/PaymentSource.d.ts +19 -0
  185. package/types/resources/PreferenceVariant.d.ts +10 -0
  186. package/types/resources/PriceRamp.d.ts +113 -0
  187. package/types/resources/PrivateNote.d.ts +18 -0
  188. package/types/resources/Purchase.d.ts +6 -0
  189. package/types/resources/Ramp.d.ts +6 -0
  190. package/types/resources/RampInterval.d.ts +12 -0
  191. package/types/resources/RecordedPurchase.d.ts +5 -1
  192. package/types/resources/RetrySegment.d.ts +36 -0
  193. package/types/resources/Subscription.d.ts +3 -0
  194. package/types/resources/Transaction.d.ts +4 -0
  195. package/types/resources/Usage.d.ts +7 -0
  196. package/types/resources/UsageSummary.d.ts +2 -0
  197. package/types/resources/WebhookEvent.d.ts +159 -5
  198. package/types/resources/AppliedBusinessRule.d.ts +0 -15
@@ -164,6 +164,14 @@ const CheckoutNewHostedPageContractTermSchema = zod_1.z.object({
164
164
  action_at_term_end: zod_1.z.enum(['renew', 'evergreen', 'cancel']).optional(),
165
165
  cancellation_cutoff_period: zod_1.z.number().int().optional(),
166
166
  });
167
+ const CheckoutNewHostedPageAddonsItemSchema = zod_1.z.object({
168
+ id: zod_1.z.string().max(100).optional(),
169
+ quantity: zod_1.z.number().int().min(1).optional(),
170
+ quantity_in_decimal: zod_1.z.string().max(33).optional(),
171
+ unit_price: zod_1.z.number().int().min(0).optional(),
172
+ unit_price_in_decimal: zod_1.z.string().max(39).optional(),
173
+ billing_cycles: zod_1.z.number().int().min(0).optional(),
174
+ });
167
175
  const CheckoutNewHostedPageAddonsSchema = zod_1.z.object({
168
176
  id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
169
177
  quantity: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
@@ -172,6 +180,25 @@ const CheckoutNewHostedPageAddonsSchema = zod_1.z.object({
172
180
  unit_price_in_decimal: zod_1.z.array(zod_1.z.string().max(39).optional()).optional(),
173
181
  billing_cycles: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
174
182
  });
183
+ const CheckoutNewHostedPageEventBasedAddonsItemSchema = zod_1.z.object({
184
+ id: zod_1.z.string().max(100).optional(),
185
+ quantity: zod_1.z.number().int().min(1).optional(),
186
+ unit_price: zod_1.z.number().int().min(0).optional(),
187
+ quantity_in_decimal: zod_1.z.string().max(33).optional(),
188
+ unit_price_in_decimal: zod_1.z.string().max(39).optional(),
189
+ service_period_in_days: zod_1.z.number().int().min(1).max(4000).optional(),
190
+ on_event: zod_1.z
191
+ .enum([
192
+ 'subscription_creation',
193
+ 'subscription_trial_start',
194
+ 'plan_activation',
195
+ 'subscription_activation',
196
+ 'contract_termination',
197
+ ])
198
+ .optional(),
199
+ charge_once: zod_1.z.boolean().default(true).optional(),
200
+ charge_on: zod_1.z.enum(['immediately', 'on_event']).optional(),
201
+ });
175
202
  const CheckoutNewHostedPageEventBasedAddonsSchema = zod_1.z.object({
176
203
  id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
177
204
  quantity: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
@@ -215,8 +242,18 @@ const CheckoutNewHostedPageBodySchema = zod_1.z.looseObject({
215
242
  billing_address: CheckoutNewHostedPageBillingAddressSchema.optional(),
216
243
  shipping_address: CheckoutNewHostedPageShippingAddressSchema.optional(),
217
244
  contract_term: CheckoutNewHostedPageContractTermSchema.optional(),
218
- addons: CheckoutNewHostedPageAddonsSchema.optional(),
219
- event_based_addons: CheckoutNewHostedPageEventBasedAddonsSchema.optional(),
245
+ addons: zod_1.z
246
+ .union([
247
+ zod_1.z.array(CheckoutNewHostedPageAddonsItemSchema.optional()),
248
+ CheckoutNewHostedPageAddonsSchema,
249
+ ])
250
+ .optional(),
251
+ event_based_addons: zod_1.z
252
+ .union([
253
+ zod_1.z.array(CheckoutNewHostedPageEventBasedAddonsItemSchema.optional()),
254
+ CheckoutNewHostedPageEventBasedAddonsSchema,
255
+ ])
256
+ .optional(),
220
257
  });
221
258
  exports.CheckoutNewHostedPageBodySchema = CheckoutNewHostedPageBodySchema;
222
259
  //HostedPage.checkoutOneTime
@@ -339,6 +376,15 @@ const CheckoutOneTimeHostedPageShippingAddressSchema = zod_1.z.object({
339
376
  .enum(['not_validated', 'valid', 'partially_valid', 'invalid'])
340
377
  .optional(),
341
378
  });
379
+ const CheckoutOneTimeHostedPageAddonsItemSchema = zod_1.z.object({
380
+ id: zod_1.z.string().max(100).optional(),
381
+ quantity: zod_1.z.number().int().min(1).optional(),
382
+ unit_price: zod_1.z.number().int().min(0).optional(),
383
+ quantity_in_decimal: zod_1.z.string().max(33).optional(),
384
+ unit_price_in_decimal: zod_1.z.string().max(39).optional(),
385
+ date_from: zod_1.z.number().int().optional(),
386
+ date_to: zod_1.z.number().int().optional(),
387
+ });
342
388
  const CheckoutOneTimeHostedPageAddonsSchema = zod_1.z.object({
343
389
  id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
344
390
  quantity: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
@@ -348,6 +394,23 @@ const CheckoutOneTimeHostedPageAddonsSchema = zod_1.z.object({
348
394
  date_from: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
349
395
  date_to: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
350
396
  });
397
+ const CheckoutOneTimeHostedPageChargesItemSchema = zod_1.z.object({
398
+ amount: zod_1.z.number().int().min(1).optional(),
399
+ amount_in_decimal: zod_1.z.string().max(39).optional(),
400
+ description: zod_1.z.string().max(250).optional(),
401
+ taxable: zod_1.z.boolean().default(true).optional(),
402
+ tax_profile_id: zod_1.z.string().max(50).optional(),
403
+ avalara_tax_code: zod_1.z.string().max(50).optional(),
404
+ hsn_code: zod_1.z.string().max(50).optional(),
405
+ taxjar_product_code: zod_1.z.string().max(50).optional(),
406
+ avalara_sale_type: zod_1.z
407
+ .enum(['wholesale', 'retail', 'consumed', 'vendor_use'])
408
+ .optional(),
409
+ avalara_transaction_type: zod_1.z.number().int().optional(),
410
+ avalara_service_type: zod_1.z.number().int().optional(),
411
+ date_from: zod_1.z.number().int().optional(),
412
+ date_to: zod_1.z.number().int().optional(),
413
+ });
351
414
  const CheckoutOneTimeHostedPageChargesSchema = zod_1.z.object({
352
415
  amount: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
353
416
  amount_in_decimal: zod_1.z.array(zod_1.z.string().max(39).optional()).optional(),
@@ -380,8 +443,18 @@ const CheckoutOneTimeHostedPageBodySchema = zod_1.z.looseObject({
380
443
  card: CheckoutOneTimeHostedPageCardSchema.optional(),
381
444
  billing_address: CheckoutOneTimeHostedPageBillingAddressSchema.optional(),
382
445
  shipping_address: CheckoutOneTimeHostedPageShippingAddressSchema.optional(),
383
- addons: CheckoutOneTimeHostedPageAddonsSchema.optional(),
384
- charges: CheckoutOneTimeHostedPageChargesSchema.optional(),
446
+ addons: zod_1.z
447
+ .union([
448
+ zod_1.z.array(CheckoutOneTimeHostedPageAddonsItemSchema.optional()),
449
+ CheckoutOneTimeHostedPageAddonsSchema,
450
+ ])
451
+ .optional(),
452
+ charges: zod_1.z
453
+ .union([
454
+ zod_1.z.array(CheckoutOneTimeHostedPageChargesItemSchema.optional()),
455
+ CheckoutOneTimeHostedPageChargesSchema,
456
+ ])
457
+ .optional(),
385
458
  });
386
459
  exports.CheckoutOneTimeHostedPageBodySchema = CheckoutOneTimeHostedPageBodySchema;
387
460
  //HostedPage.checkoutOneTimeForItems
@@ -508,6 +581,15 @@ const CheckoutOneTimeForItemsHostedPageShippingAddressSchema = zod_1.z.object({
508
581
  .enum(['not_validated', 'valid', 'partially_valid', 'invalid'])
509
582
  .optional(),
510
583
  });
584
+ const CheckoutOneTimeForItemsHostedPageItemPricesItemSchema = zod_1.z.object({
585
+ item_price_id: zod_1.z.string().max(100).optional(),
586
+ quantity: zod_1.z.number().int().min(1).optional(),
587
+ quantity_in_decimal: zod_1.z.string().max(33).optional(),
588
+ unit_price: zod_1.z.number().int().min(0).optional(),
589
+ unit_price_in_decimal: zod_1.z.string().max(39).optional(),
590
+ date_from: zod_1.z.number().int().optional(),
591
+ date_to: zod_1.z.number().int().optional(),
592
+ });
511
593
  const CheckoutOneTimeForItemsHostedPageItemPricesSchema = zod_1.z.object({
512
594
  item_price_id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
513
595
  quantity: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
@@ -517,6 +599,17 @@ const CheckoutOneTimeForItemsHostedPageItemPricesSchema = zod_1.z.object({
517
599
  date_from: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
518
600
  date_to: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
519
601
  });
602
+ const CheckoutOneTimeForItemsHostedPageItemTiersItemSchema = zod_1.z.object({
603
+ item_price_id: zod_1.z.string().max(100).optional(),
604
+ starting_unit: zod_1.z.number().int().min(1).optional(),
605
+ ending_unit: zod_1.z.number().int().optional(),
606
+ price: zod_1.z.number().int().min(0).optional(),
607
+ starting_unit_in_decimal: zod_1.z.string().max(33).optional(),
608
+ ending_unit_in_decimal: zod_1.z.string().max(33).optional(),
609
+ price_in_decimal: zod_1.z.string().max(39).optional(),
610
+ pricing_type: zod_1.z.enum(['per_unit', 'flat_fee', 'package']).optional(),
611
+ package_size: zod_1.z.number().int().min(1).optional(),
612
+ });
520
613
  const CheckoutOneTimeForItemsHostedPageItemTiersSchema = zod_1.z.object({
521
614
  item_price_id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
522
615
  starting_unit: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
@@ -530,6 +623,23 @@ const CheckoutOneTimeForItemsHostedPageItemTiersSchema = zod_1.z.object({
530
623
  .optional(),
531
624
  package_size: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
532
625
  });
626
+ const CheckoutOneTimeForItemsHostedPageChargesItemSchema = zod_1.z.object({
627
+ amount: zod_1.z.number().int().min(1).optional(),
628
+ amount_in_decimal: zod_1.z.string().max(39).optional(),
629
+ description: zod_1.z.string().max(250).optional(),
630
+ taxable: zod_1.z.boolean().default(true).optional(),
631
+ tax_profile_id: zod_1.z.string().max(50).optional(),
632
+ avalara_tax_code: zod_1.z.string().max(50).optional(),
633
+ hsn_code: zod_1.z.string().max(50).optional(),
634
+ taxjar_product_code: zod_1.z.string().max(50).optional(),
635
+ avalara_sale_type: zod_1.z
636
+ .enum(['wholesale', 'retail', 'consumed', 'vendor_use'])
637
+ .optional(),
638
+ avalara_transaction_type: zod_1.z.number().int().optional(),
639
+ avalara_service_type: zod_1.z.number().int().optional(),
640
+ date_from: zod_1.z.number().int().optional(),
641
+ date_to: zod_1.z.number().int().optional(),
642
+ });
533
643
  const CheckoutOneTimeForItemsHostedPageChargesSchema = zod_1.z.object({
534
644
  amount: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
535
645
  amount_in_decimal: zod_1.z.array(zod_1.z.string().max(39).optional()).optional(),
@@ -547,6 +657,13 @@ const CheckoutOneTimeForItemsHostedPageChargesSchema = zod_1.z.object({
547
657
  date_from: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
548
658
  date_to: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
549
659
  });
660
+ const CheckoutOneTimeForItemsHostedPageDiscountsItemSchema = zod_1.z.object({
661
+ percentage: zod_1.z.number().min(0.01).max(100).optional(),
662
+ amount: zod_1.z.number().int().min(0).optional(),
663
+ quantity: zod_1.z.number().int().min(1).optional(),
664
+ apply_on: zod_1.z.enum(['invoice_amount', 'specific_item_price']),
665
+ item_price_id: zod_1.z.string().max(100).optional(),
666
+ });
550
667
  const CheckoutOneTimeForItemsHostedPageDiscountsSchema = zod_1.z.object({
551
668
  percentage: zod_1.z.array(zod_1.z.number().min(0.01).max(100).optional()).optional(),
552
669
  amount: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
@@ -554,6 +671,13 @@ const CheckoutOneTimeForItemsHostedPageDiscountsSchema = zod_1.z.object({
554
671
  apply_on: zod_1.z.array(zod_1.z.enum(['invoice_amount', 'specific_item_price']).optional()),
555
672
  item_price_id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
556
673
  });
674
+ const CheckoutOneTimeForItemsHostedPageEntityIdentifiersItemSchema = zod_1.z.object({
675
+ id: zod_1.z.string().max(40).optional(),
676
+ scheme: zod_1.z.string().max(50).optional(),
677
+ value: zod_1.z.string().max(50).optional(),
678
+ operation: zod_1.z.enum(['create', 'update', 'delete']).optional(),
679
+ standard: zod_1.z.string().max(50).optional(),
680
+ });
557
681
  const CheckoutOneTimeForItemsHostedPageEntityIdentifiersSchema = zod_1.z.object({
558
682
  id: zod_1.z.array(zod_1.z.string().max(40).optional()).optional(),
559
683
  scheme: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
@@ -579,11 +703,36 @@ const CheckoutOneTimeForItemsHostedPageBodySchema = zod_1.z.looseObject({
579
703
  card: CheckoutOneTimeForItemsHostedPageCardSchema.optional(),
580
704
  billing_address: CheckoutOneTimeForItemsHostedPageBillingAddressSchema.optional(),
581
705
  shipping_address: CheckoutOneTimeForItemsHostedPageShippingAddressSchema.optional(),
582
- item_prices: CheckoutOneTimeForItemsHostedPageItemPricesSchema.optional(),
583
- item_tiers: CheckoutOneTimeForItemsHostedPageItemTiersSchema.optional(),
584
- charges: CheckoutOneTimeForItemsHostedPageChargesSchema.optional(),
585
- discounts: CheckoutOneTimeForItemsHostedPageDiscountsSchema.optional(),
586
- entity_identifiers: CheckoutOneTimeForItemsHostedPageEntityIdentifiersSchema.optional(),
706
+ item_prices: zod_1.z
707
+ .union([
708
+ zod_1.z.array(CheckoutOneTimeForItemsHostedPageItemPricesItemSchema.optional()),
709
+ CheckoutOneTimeForItemsHostedPageItemPricesSchema,
710
+ ])
711
+ .optional(),
712
+ item_tiers: zod_1.z
713
+ .union([
714
+ zod_1.z.array(CheckoutOneTimeForItemsHostedPageItemTiersItemSchema.optional()),
715
+ CheckoutOneTimeForItemsHostedPageItemTiersSchema,
716
+ ])
717
+ .optional(),
718
+ charges: zod_1.z
719
+ .union([
720
+ zod_1.z.array(CheckoutOneTimeForItemsHostedPageChargesItemSchema.optional()),
721
+ CheckoutOneTimeForItemsHostedPageChargesSchema,
722
+ ])
723
+ .optional(),
724
+ discounts: zod_1.z
725
+ .union([
726
+ zod_1.z.array(CheckoutOneTimeForItemsHostedPageDiscountsItemSchema.optional()),
727
+ CheckoutOneTimeForItemsHostedPageDiscountsSchema,
728
+ ])
729
+ .optional(),
730
+ entity_identifiers: zod_1.z
731
+ .union([
732
+ zod_1.z.array(CheckoutOneTimeForItemsHostedPageEntityIdentifiersItemSchema.optional()),
733
+ CheckoutOneTimeForItemsHostedPageEntityIdentifiersSchema,
734
+ ])
735
+ .optional(),
587
736
  });
588
737
  exports.CheckoutOneTimeForItemsHostedPageBodySchema = CheckoutOneTimeForItemsHostedPageBodySchema;
589
738
  //HostedPage.checkoutNewForItems
@@ -743,6 +892,28 @@ const CheckoutNewForItemsHostedPageContractTermSchema = zod_1.z.object({
743
892
  action_at_term_end: zod_1.z.enum(['renew', 'evergreen', 'cancel']).optional(),
744
893
  cancellation_cutoff_period: zod_1.z.number().int().optional(),
745
894
  });
895
+ const CheckoutNewForItemsHostedPageSubscriptionItemsItemSchema = zod_1.z.object({
896
+ item_price_id: zod_1.z.string().max(100),
897
+ quantity: zod_1.z.number().int().min(1).optional(),
898
+ quantity_in_decimal: zod_1.z.string().max(33).optional(),
899
+ unit_price: zod_1.z.number().int().min(0).optional(),
900
+ unit_price_in_decimal: zod_1.z.string().max(39).optional(),
901
+ billing_cycles: zod_1.z.number().int().min(0).optional(),
902
+ trial_end: zod_1.z.number().int().optional(),
903
+ service_period_days: zod_1.z.number().int().min(1).max(4000).optional(),
904
+ charge_on_event: zod_1.z
905
+ .enum([
906
+ 'subscription_creation',
907
+ 'subscription_trial_start',
908
+ 'plan_activation',
909
+ 'subscription_activation',
910
+ 'contract_termination',
911
+ ])
912
+ .optional(),
913
+ charge_once: zod_1.z.boolean().optional(),
914
+ item_type: zod_1.z.enum(['plan', 'addon', 'charge']).optional(),
915
+ charge_on_option: zod_1.z.enum(['immediately', 'on_event']).optional(),
916
+ });
746
917
  const CheckoutNewForItemsHostedPageSubscriptionItemsSchema = zod_1.z.object({
747
918
  item_price_id: zod_1.z.array(zod_1.z.string().max(100).optional()),
748
919
  quantity: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
@@ -752,7 +923,7 @@ const CheckoutNewForItemsHostedPageSubscriptionItemsSchema = zod_1.z.object({
752
923
  billing_cycles: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
753
924
  trial_end: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
754
925
  service_period_days: zod_1.z
755
- .array(zod_1.z.number().int().min(1).max(730).optional())
926
+ .array(zod_1.z.number().int().min(1).max(4000).optional())
756
927
  .optional(),
757
928
  charge_on_event: zod_1.z
758
929
  .array(zod_1.z
@@ -771,6 +942,17 @@ const CheckoutNewForItemsHostedPageSubscriptionItemsSchema = zod_1.z.object({
771
942
  .array(zod_1.z.enum(['immediately', 'on_event']).optional())
772
943
  .optional(),
773
944
  });
945
+ const CheckoutNewForItemsHostedPageDiscountsItemSchema = zod_1.z.object({
946
+ apply_on: zod_1.z.enum(['invoice_amount', 'specific_item_price']).optional(),
947
+ duration_type: zod_1.z.enum(['one_time', 'forever', 'limited_period']),
948
+ percentage: zod_1.z.number().min(0.01).max(100).optional(),
949
+ amount: zod_1.z.number().int().min(0).optional(),
950
+ period: zod_1.z.number().int().min(1).optional(),
951
+ period_unit: zod_1.z.enum(['day', 'week', 'month', 'year']).optional(),
952
+ included_in_mrr: zod_1.z.boolean().optional(),
953
+ item_price_id: zod_1.z.string().max(100).optional(),
954
+ quantity: zod_1.z.number().int().min(1).optional(),
955
+ });
774
956
  const CheckoutNewForItemsHostedPageDiscountsSchema = zod_1.z.object({
775
957
  apply_on: zod_1.z
776
958
  .array(zod_1.z.enum(['invoice_amount', 'specific_item_price']).optional())
@@ -786,6 +968,17 @@ const CheckoutNewForItemsHostedPageDiscountsSchema = zod_1.z.object({
786
968
  item_price_id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
787
969
  quantity: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
788
970
  });
971
+ const CheckoutNewForItemsHostedPageItemTiersItemSchema = zod_1.z.object({
972
+ item_price_id: zod_1.z.string().max(100).optional(),
973
+ starting_unit: zod_1.z.number().int().min(1).optional(),
974
+ ending_unit: zod_1.z.number().int().optional(),
975
+ price: zod_1.z.number().int().min(0).optional(),
976
+ starting_unit_in_decimal: zod_1.z.string().max(33).optional(),
977
+ ending_unit_in_decimal: zod_1.z.string().max(33).optional(),
978
+ price_in_decimal: zod_1.z.string().max(39).optional(),
979
+ pricing_type: zod_1.z.enum(['per_unit', 'flat_fee', 'package']).optional(),
980
+ package_size: zod_1.z.number().int().min(1).optional(),
981
+ });
789
982
  const CheckoutNewForItemsHostedPageItemTiersSchema = zod_1.z.object({
790
983
  item_price_id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
791
984
  starting_unit: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
@@ -799,6 +992,13 @@ const CheckoutNewForItemsHostedPageItemTiersSchema = zod_1.z.object({
799
992
  .optional(),
800
993
  package_size: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
801
994
  });
995
+ const CheckoutNewForItemsHostedPageEntityIdentifiersItemSchema = zod_1.z.object({
996
+ id: zod_1.z.string().max(40).optional(),
997
+ scheme: zod_1.z.string().max(50).optional(),
998
+ value: zod_1.z.string().max(50).optional(),
999
+ operation: zod_1.z.enum(['create', 'update', 'delete']).optional(),
1000
+ standard: zod_1.z.string().max(50).optional(),
1001
+ });
802
1002
  const CheckoutNewForItemsHostedPageEntityIdentifiersSchema = zod_1.z.object({
803
1003
  id: zod_1.z.array(zod_1.z.string().max(40).optional()).optional(),
804
1004
  scheme: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
@@ -808,6 +1008,16 @@ const CheckoutNewForItemsHostedPageEntityIdentifiersSchema = zod_1.z.object({
808
1008
  .optional(),
809
1009
  standard: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
810
1010
  });
1011
+ const CheckoutNewForItemsHostedPageAllowedBillingFrequenciesItemSchema = zod_1.z.object({
1012
+ period: zod_1.z.number().int().min(1).optional(),
1013
+ period_unit: zod_1.z.enum(['day', 'week', 'month', 'year']).optional(),
1014
+ });
1015
+ const CheckoutNewForItemsHostedPageAllowedBillingFrequenciesSchema = zod_1.z.object({
1016
+ period: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
1017
+ period_unit: zod_1.z
1018
+ .array(zod_1.z.enum(['day', 'week', 'month', 'year']).optional())
1019
+ .optional(),
1020
+ });
811
1021
  const CheckoutNewForItemsHostedPageBodySchema = zod_1.z.looseObject({
812
1022
  layout: zod_1.z.enum(['in_app', 'full_page']).optional(),
813
1023
  business_entity_id: zod_1.z.string().max(50).optional(),
@@ -820,6 +1030,7 @@ const CheckoutNewForItemsHostedPageBodySchema = zod_1.z.looseObject({
820
1030
  redirect_url: zod_1.z.string().max(250).optional(),
821
1031
  cancel_url: zod_1.z.string().max(250).optional(),
822
1032
  pass_thru_content: zod_1.z.string().max(2048).optional(),
1033
+ show_billing_frequency_selector: zod_1.z.boolean().optional(),
823
1034
  allow_offline_payment_methods: zod_1.z.boolean().optional(),
824
1035
  subscription: CheckoutNewForItemsHostedPageSubscriptionSchema.optional(),
825
1036
  customer: CheckoutNewForItemsHostedPageCustomerSchema.optional(),
@@ -827,10 +1038,36 @@ const CheckoutNewForItemsHostedPageBodySchema = zod_1.z.looseObject({
827
1038
  billing_address: CheckoutNewForItemsHostedPageBillingAddressSchema.optional(),
828
1039
  shipping_address: CheckoutNewForItemsHostedPageShippingAddressSchema.optional(),
829
1040
  contract_term: CheckoutNewForItemsHostedPageContractTermSchema.optional(),
830
- subscription_items: CheckoutNewForItemsHostedPageSubscriptionItemsSchema.optional(),
831
- discounts: CheckoutNewForItemsHostedPageDiscountsSchema.optional(),
832
- item_tiers: CheckoutNewForItemsHostedPageItemTiersSchema.optional(),
833
- entity_identifiers: CheckoutNewForItemsHostedPageEntityIdentifiersSchema.optional(),
1041
+ subscription_items: zod_1.z
1042
+ .union([
1043
+ zod_1.z.array(CheckoutNewForItemsHostedPageSubscriptionItemsItemSchema.optional()),
1044
+ CheckoutNewForItemsHostedPageSubscriptionItemsSchema,
1045
+ ])
1046
+ .optional(),
1047
+ discounts: zod_1.z
1048
+ .union([
1049
+ zod_1.z.array(CheckoutNewForItemsHostedPageDiscountsItemSchema.optional()),
1050
+ CheckoutNewForItemsHostedPageDiscountsSchema,
1051
+ ])
1052
+ .optional(),
1053
+ item_tiers: zod_1.z
1054
+ .union([
1055
+ zod_1.z.array(CheckoutNewForItemsHostedPageItemTiersItemSchema.optional()),
1056
+ CheckoutNewForItemsHostedPageItemTiersSchema,
1057
+ ])
1058
+ .optional(),
1059
+ entity_identifiers: zod_1.z
1060
+ .union([
1061
+ zod_1.z.array(CheckoutNewForItemsHostedPageEntityIdentifiersItemSchema.optional()),
1062
+ CheckoutNewForItemsHostedPageEntityIdentifiersSchema,
1063
+ ])
1064
+ .optional(),
1065
+ allowed_billing_frequencies: zod_1.z
1066
+ .union([
1067
+ zod_1.z.array(CheckoutNewForItemsHostedPageAllowedBillingFrequenciesItemSchema.optional()),
1068
+ CheckoutNewForItemsHostedPageAllowedBillingFrequenciesSchema,
1069
+ ])
1070
+ .optional(),
834
1071
  });
835
1072
  exports.CheckoutNewForItemsHostedPageBodySchema = CheckoutNewForItemsHostedPageBodySchema;
836
1073
  //HostedPage.checkoutExisting
@@ -946,6 +1183,14 @@ const CheckoutExistingHostedPageContractTermSchema = zod_1.z.object({
946
1183
  action_at_term_end: zod_1.z.enum(['renew', 'evergreen', 'cancel']).optional(),
947
1184
  cancellation_cutoff_period: zod_1.z.number().int().optional(),
948
1185
  });
1186
+ const CheckoutExistingHostedPageAddonsItemSchema = zod_1.z.object({
1187
+ id: zod_1.z.string().max(100).optional(),
1188
+ quantity: zod_1.z.number().int().min(1).optional(),
1189
+ unit_price: zod_1.z.number().int().min(0).optional(),
1190
+ billing_cycles: zod_1.z.number().int().min(0).optional(),
1191
+ quantity_in_decimal: zod_1.z.string().max(33).optional(),
1192
+ unit_price_in_decimal: zod_1.z.string().max(39).optional(),
1193
+ });
949
1194
  const CheckoutExistingHostedPageAddonsSchema = zod_1.z.object({
950
1195
  id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
951
1196
  quantity: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
@@ -954,6 +1199,25 @@ const CheckoutExistingHostedPageAddonsSchema = zod_1.z.object({
954
1199
  quantity_in_decimal: zod_1.z.array(zod_1.z.string().max(33).optional()).optional(),
955
1200
  unit_price_in_decimal: zod_1.z.array(zod_1.z.string().max(39).optional()).optional(),
956
1201
  });
1202
+ const CheckoutExistingHostedPageEventBasedAddonsItemSchema = zod_1.z.object({
1203
+ id: zod_1.z.string().max(100).optional(),
1204
+ quantity: zod_1.z.number().int().min(1).optional(),
1205
+ unit_price: zod_1.z.number().int().min(0).optional(),
1206
+ service_period_in_days: zod_1.z.number().int().min(1).max(4000).optional(),
1207
+ charge_on: zod_1.z.enum(['immediately', 'on_event']).optional(),
1208
+ on_event: zod_1.z
1209
+ .enum([
1210
+ 'subscription_creation',
1211
+ 'subscription_trial_start',
1212
+ 'plan_activation',
1213
+ 'subscription_activation',
1214
+ 'contract_termination',
1215
+ ])
1216
+ .optional(),
1217
+ charge_once: zod_1.z.boolean().default(true).optional(),
1218
+ quantity_in_decimal: zod_1.z.string().max(33).optional(),
1219
+ unit_price_in_decimal: zod_1.z.string().max(39).optional(),
1220
+ });
957
1221
  const CheckoutExistingHostedPageEventBasedAddonsSchema = zod_1.z.object({
958
1222
  id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
959
1223
  quantity: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
@@ -1001,8 +1265,18 @@ const CheckoutExistingHostedPageBodySchema = zod_1.z.looseObject({
1001
1265
  customer: CheckoutExistingHostedPageCustomerSchema.optional(),
1002
1266
  card: CheckoutExistingHostedPageCardSchema.optional(),
1003
1267
  contract_term: CheckoutExistingHostedPageContractTermSchema.optional(),
1004
- addons: CheckoutExistingHostedPageAddonsSchema.optional(),
1005
- event_based_addons: CheckoutExistingHostedPageEventBasedAddonsSchema.optional(),
1268
+ addons: zod_1.z
1269
+ .union([
1270
+ zod_1.z.array(CheckoutExistingHostedPageAddonsItemSchema.optional()),
1271
+ CheckoutExistingHostedPageAddonsSchema,
1272
+ ])
1273
+ .optional(),
1274
+ event_based_addons: zod_1.z
1275
+ .union([
1276
+ zod_1.z.array(CheckoutExistingHostedPageEventBasedAddonsItemSchema.optional()),
1277
+ CheckoutExistingHostedPageEventBasedAddonsSchema,
1278
+ ])
1279
+ .optional(),
1006
1280
  });
1007
1281
  exports.CheckoutExistingHostedPageBodySchema = CheckoutExistingHostedPageBodySchema;
1008
1282
  //HostedPage.checkoutExistingForItems
@@ -1116,6 +1390,28 @@ const CheckoutExistingForItemsHostedPageContractTermSchema = zod_1.z.object({
1116
1390
  action_at_term_end: zod_1.z.enum(['renew', 'evergreen', 'cancel']).optional(),
1117
1391
  cancellation_cutoff_period: zod_1.z.number().int().optional(),
1118
1392
  });
1393
+ const CheckoutExistingForItemsHostedPageSubscriptionItemsItemSchema = zod_1.z.object({
1394
+ item_price_id: zod_1.z.string().max(100),
1395
+ quantity: zod_1.z.number().int().min(1).optional(),
1396
+ quantity_in_decimal: zod_1.z.string().max(33).optional(),
1397
+ unit_price: zod_1.z.number().int().min(0).optional(),
1398
+ unit_price_in_decimal: zod_1.z.string().max(39).optional(),
1399
+ billing_cycles: zod_1.z.number().int().min(0).optional(),
1400
+ trial_end: zod_1.z.number().int().optional(),
1401
+ service_period_days: zod_1.z.number().int().min(1).max(4000).optional(),
1402
+ charge_on_event: zod_1.z
1403
+ .enum([
1404
+ 'subscription_creation',
1405
+ 'subscription_trial_start',
1406
+ 'plan_activation',
1407
+ 'subscription_activation',
1408
+ 'contract_termination',
1409
+ ])
1410
+ .optional(),
1411
+ charge_once: zod_1.z.boolean().optional(),
1412
+ charge_on_option: zod_1.z.enum(['immediately', 'on_event']).optional(),
1413
+ item_type: zod_1.z.enum(['plan', 'addon', 'charge']).optional(),
1414
+ });
1119
1415
  const CheckoutExistingForItemsHostedPageSubscriptionItemsSchema = zod_1.z.object({
1120
1416
  item_price_id: zod_1.z.array(zod_1.z.string().max(100).optional()),
1121
1417
  quantity: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
@@ -1125,7 +1421,7 @@ const CheckoutExistingForItemsHostedPageSubscriptionItemsSchema = zod_1.z.object
1125
1421
  billing_cycles: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
1126
1422
  trial_end: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
1127
1423
  service_period_days: zod_1.z
1128
- .array(zod_1.z.number().int().min(1).max(730).optional())
1424
+ .array(zod_1.z.number().int().min(1).max(4000).optional())
1129
1425
  .optional(),
1130
1426
  charge_on_event: zod_1.z
1131
1427
  .array(zod_1.z
@@ -1144,6 +1440,19 @@ const CheckoutExistingForItemsHostedPageSubscriptionItemsSchema = zod_1.z.object
1144
1440
  .optional(),
1145
1441
  item_type: zod_1.z.array(zod_1.z.enum(['plan', 'addon', 'charge']).optional()).optional(),
1146
1442
  });
1443
+ const CheckoutExistingForItemsHostedPageDiscountsItemSchema = zod_1.z.object({
1444
+ apply_on: zod_1.z.enum(['invoice_amount', 'specific_item_price']).optional(),
1445
+ duration_type: zod_1.z.enum(['one_time', 'forever', 'limited_period']),
1446
+ percentage: zod_1.z.number().min(0.01).max(100).optional(),
1447
+ amount: zod_1.z.number().int().min(0).optional(),
1448
+ period: zod_1.z.number().int().min(1).optional(),
1449
+ period_unit: zod_1.z.enum(['day', 'week', 'month', 'year']).optional(),
1450
+ included_in_mrr: zod_1.z.boolean().optional(),
1451
+ item_price_id: zod_1.z.string().max(100).optional(),
1452
+ quantity: zod_1.z.number().int().min(1).optional(),
1453
+ operation_type: zod_1.z.enum(['add', 'remove']),
1454
+ id: zod_1.z.string().max(50).optional(),
1455
+ });
1147
1456
  const CheckoutExistingForItemsHostedPageDiscountsSchema = zod_1.z.object({
1148
1457
  apply_on: zod_1.z
1149
1458
  .array(zod_1.z.enum(['invoice_amount', 'specific_item_price']).optional())
@@ -1161,6 +1470,17 @@ const CheckoutExistingForItemsHostedPageDiscountsSchema = zod_1.z.object({
1161
1470
  operation_type: zod_1.z.array(zod_1.z.enum(['add', 'remove']).optional()),
1162
1471
  id: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
1163
1472
  });
1473
+ const CheckoutExistingForItemsHostedPageItemTiersItemSchema = zod_1.z.object({
1474
+ item_price_id: zod_1.z.string().max(100).optional(),
1475
+ starting_unit: zod_1.z.number().int().min(1).optional(),
1476
+ ending_unit: zod_1.z.number().int().optional(),
1477
+ price: zod_1.z.number().int().min(0).optional(),
1478
+ starting_unit_in_decimal: zod_1.z.string().max(33).optional(),
1479
+ ending_unit_in_decimal: zod_1.z.string().max(33).optional(),
1480
+ price_in_decimal: zod_1.z.string().max(39).optional(),
1481
+ pricing_type: zod_1.z.enum(['per_unit', 'flat_fee', 'package']).optional(),
1482
+ package_size: zod_1.z.number().int().min(1).optional(),
1483
+ });
1164
1484
  const CheckoutExistingForItemsHostedPageItemTiersSchema = zod_1.z.object({
1165
1485
  item_price_id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
1166
1486
  starting_unit: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
@@ -1174,6 +1494,13 @@ const CheckoutExistingForItemsHostedPageItemTiersSchema = zod_1.z.object({
1174
1494
  .optional(),
1175
1495
  package_size: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
1176
1496
  });
1497
+ const CheckoutExistingForItemsHostedPageEntityIdentifiersItemSchema = zod_1.z.object({
1498
+ id: zod_1.z.string().max(40).optional(),
1499
+ scheme: zod_1.z.string().max(50).optional(),
1500
+ value: zod_1.z.string().max(50).optional(),
1501
+ operation: zod_1.z.enum(['create', 'update', 'delete']).optional(),
1502
+ standard: zod_1.z.string().max(50).optional(),
1503
+ });
1177
1504
  const CheckoutExistingForItemsHostedPageEntityIdentifiersSchema = zod_1.z.object({
1178
1505
  id: zod_1.z.array(zod_1.z.string().max(40).optional()).optional(),
1179
1506
  scheme: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
@@ -1183,6 +1510,16 @@ const CheckoutExistingForItemsHostedPageEntityIdentifiersSchema = zod_1.z.object
1183
1510
  .optional(),
1184
1511
  standard: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
1185
1512
  });
1513
+ const CheckoutExistingForItemsHostedPageAllowedBillingFrequenciesItemSchema = zod_1.z.object({
1514
+ period: zod_1.z.number().int().min(1).optional(),
1515
+ period_unit: zod_1.z.enum(['day', 'week', 'month', 'year']).optional(),
1516
+ });
1517
+ const CheckoutExistingForItemsHostedPageAllowedBillingFrequenciesSchema = zod_1.z.object({
1518
+ period: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
1519
+ period_unit: zod_1.z
1520
+ .array(zod_1.z.enum(['day', 'week', 'month', 'year']).optional())
1521
+ .optional(),
1522
+ });
1186
1523
  const CheckoutExistingForItemsHostedPageBodySchema = zod_1.z.looseObject({
1187
1524
  layout: zod_1.z.enum(['in_app', 'full_page']).optional(),
1188
1525
  brand_id: zod_1.z.string().max(50).optional(),
@@ -1205,15 +1542,42 @@ const CheckoutExistingForItemsHostedPageBodySchema = zod_1.z.looseObject({
1205
1542
  redirect_url: zod_1.z.string().max(250).optional(),
1206
1543
  cancel_url: zod_1.z.string().max(250).optional(),
1207
1544
  pass_thru_content: zod_1.z.string().max(2048).optional(),
1545
+ show_billing_frequency_selector: zod_1.z.boolean().optional(),
1208
1546
  allow_offline_payment_methods: zod_1.z.boolean().optional(),
1209
1547
  subscription: CheckoutExistingForItemsHostedPageSubscriptionSchema.optional(),
1210
1548
  customer: CheckoutExistingForItemsHostedPageCustomerSchema.optional(),
1211
1549
  card: CheckoutExistingForItemsHostedPageCardSchema.optional(),
1212
1550
  contract_term: CheckoutExistingForItemsHostedPageContractTermSchema.optional(),
1213
- subscription_items: CheckoutExistingForItemsHostedPageSubscriptionItemsSchema.optional(),
1214
- discounts: CheckoutExistingForItemsHostedPageDiscountsSchema.optional(),
1215
- item_tiers: CheckoutExistingForItemsHostedPageItemTiersSchema.optional(),
1216
- entity_identifiers: CheckoutExistingForItemsHostedPageEntityIdentifiersSchema.optional(),
1551
+ subscription_items: zod_1.z
1552
+ .union([
1553
+ zod_1.z.array(CheckoutExistingForItemsHostedPageSubscriptionItemsItemSchema.optional()),
1554
+ CheckoutExistingForItemsHostedPageSubscriptionItemsSchema,
1555
+ ])
1556
+ .optional(),
1557
+ discounts: zod_1.z
1558
+ .union([
1559
+ zod_1.z.array(CheckoutExistingForItemsHostedPageDiscountsItemSchema.optional()),
1560
+ CheckoutExistingForItemsHostedPageDiscountsSchema,
1561
+ ])
1562
+ .optional(),
1563
+ item_tiers: zod_1.z
1564
+ .union([
1565
+ zod_1.z.array(CheckoutExistingForItemsHostedPageItemTiersItemSchema.optional()),
1566
+ CheckoutExistingForItemsHostedPageItemTiersSchema,
1567
+ ])
1568
+ .optional(),
1569
+ entity_identifiers: zod_1.z
1570
+ .union([
1571
+ zod_1.z.array(CheckoutExistingForItemsHostedPageEntityIdentifiersItemSchema.optional()),
1572
+ CheckoutExistingForItemsHostedPageEntityIdentifiersSchema,
1573
+ ])
1574
+ .optional(),
1575
+ allowed_billing_frequencies: zod_1.z
1576
+ .union([
1577
+ zod_1.z.array(CheckoutExistingForItemsHostedPageAllowedBillingFrequenciesItemSchema.optional()),
1578
+ CheckoutExistingForItemsHostedPageAllowedBillingFrequenciesSchema,
1579
+ ])
1580
+ .optional(),
1217
1581
  });
1218
1582
  exports.CheckoutExistingForItemsHostedPageBodySchema = CheckoutExistingForItemsHostedPageBodySchema;
1219
1583
  //HostedPage.updateCard
@@ -1573,6 +1937,11 @@ const CheckoutGiftHostedPageSubscriptionSchema = zod_1.z.looseObject({
1573
1937
  plan_quantity_in_decimal: zod_1.z.string().max(33).optional(),
1574
1938
  coupon: zod_1.z.string().max(100).optional(),
1575
1939
  });
1940
+ const CheckoutGiftHostedPageAddonsItemSchema = zod_1.z.object({
1941
+ id: zod_1.z.string().max(100).optional(),
1942
+ quantity: zod_1.z.number().int().min(1).optional(),
1943
+ quantity_in_decimal: zod_1.z.string().max(33).optional(),
1944
+ });
1576
1945
  const CheckoutGiftHostedPageAddonsSchema = zod_1.z.object({
1577
1946
  id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
1578
1947
  quantity: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
@@ -1583,13 +1952,25 @@ const CheckoutGiftHostedPageBodySchema = zod_1.z.looseObject({
1583
1952
  coupon_ids: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
1584
1953
  gifter: CheckoutGiftHostedPageGifterSchema.optional(),
1585
1954
  subscription: CheckoutGiftHostedPageSubscriptionSchema.optional(),
1586
- addons: CheckoutGiftHostedPageAddonsSchema.optional(),
1955
+ addons: zod_1.z
1956
+ .union([
1957
+ zod_1.z.array(CheckoutGiftHostedPageAddonsItemSchema.optional()),
1958
+ CheckoutGiftHostedPageAddonsSchema,
1959
+ ])
1960
+ .optional(),
1587
1961
  });
1588
1962
  exports.CheckoutGiftHostedPageBodySchema = CheckoutGiftHostedPageBodySchema;
1589
1963
  //HostedPage.checkoutGiftForItems
1590
1964
  const CheckoutGiftForItemsHostedPageGifterSchema = zod_1.z.object({
1591
1965
  customer_id: zod_1.z.string().max(50).optional(),
1592
1966
  });
1967
+ const CheckoutGiftForItemsHostedPageSubscriptionItemsItemSchema = zod_1.z.object({
1968
+ item_price_id: zod_1.z.string().max(100).optional(),
1969
+ quantity: zod_1.z.number().int().min(1).optional(),
1970
+ quantity_in_decimal: zod_1.z.string().max(33).optional(),
1971
+ unit_price: zod_1.z.number().int().min(0).optional(),
1972
+ unit_price_in_decimal: zod_1.z.string().max(39).optional(),
1973
+ });
1593
1974
  const CheckoutGiftForItemsHostedPageSubscriptionItemsSchema = zod_1.z.object({
1594
1975
  item_price_id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
1595
1976
  quantity: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
@@ -1597,6 +1978,15 @@ const CheckoutGiftForItemsHostedPageSubscriptionItemsSchema = zod_1.z.object({
1597
1978
  unit_price: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
1598
1979
  unit_price_in_decimal: zod_1.z.array(zod_1.z.string().max(39).optional()).optional(),
1599
1980
  });
1981
+ const CheckoutGiftForItemsHostedPageItemTiersItemSchema = zod_1.z.object({
1982
+ item_price_id: zod_1.z.string().max(100).optional(),
1983
+ starting_unit: zod_1.z.number().int().min(1).optional(),
1984
+ ending_unit: zod_1.z.number().int().optional(),
1985
+ price: zod_1.z.number().int().min(0).optional(),
1986
+ starting_unit_in_decimal: zod_1.z.string().max(33).optional(),
1987
+ ending_unit_in_decimal: zod_1.z.string().max(33).optional(),
1988
+ price_in_decimal: zod_1.z.string().max(39).optional(),
1989
+ });
1600
1990
  const CheckoutGiftForItemsHostedPageItemTiersSchema = zod_1.z.object({
1601
1991
  item_price_id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
1602
1992
  starting_unit: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
@@ -1606,15 +1996,42 @@ const CheckoutGiftForItemsHostedPageItemTiersSchema = zod_1.z.object({
1606
1996
  ending_unit_in_decimal: zod_1.z.array(zod_1.z.string().max(33).optional()).optional(),
1607
1997
  price_in_decimal: zod_1.z.array(zod_1.z.string().max(39).optional()).optional(),
1608
1998
  });
1999
+ const CheckoutGiftForItemsHostedPageAllowedBillingFrequenciesItemSchema = zod_1.z.object({
2000
+ period: zod_1.z.number().int().min(1).optional(),
2001
+ period_unit: zod_1.z.enum(['day', 'week', 'month', 'year']).optional(),
2002
+ });
2003
+ const CheckoutGiftForItemsHostedPageAllowedBillingFrequenciesSchema = zod_1.z.object({
2004
+ period: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
2005
+ period_unit: zod_1.z
2006
+ .array(zod_1.z.enum(['day', 'week', 'month', 'year']).optional())
2007
+ .optional(),
2008
+ });
1609
2009
  const CheckoutGiftForItemsHostedPageBodySchema = zod_1.z.looseObject({
1610
2010
  layout: zod_1.z.enum(['in_app', 'full_page']).optional(),
1611
2011
  business_entity_id: zod_1.z.string().max(50).optional(),
1612
2012
  brand_id: zod_1.z.string().max(50).optional(),
1613
2013
  redirect_url: zod_1.z.string().max(250).optional(),
1614
2014
  coupon_ids: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
2015
+ show_billing_frequency_selector: zod_1.z.boolean().optional(),
1615
2016
  gifter: CheckoutGiftForItemsHostedPageGifterSchema.optional(),
1616
- subscription_items: CheckoutGiftForItemsHostedPageSubscriptionItemsSchema.optional(),
1617
- item_tiers: CheckoutGiftForItemsHostedPageItemTiersSchema.optional(),
2017
+ subscription_items: zod_1.z
2018
+ .union([
2019
+ zod_1.z.array(CheckoutGiftForItemsHostedPageSubscriptionItemsItemSchema.optional()),
2020
+ CheckoutGiftForItemsHostedPageSubscriptionItemsSchema,
2021
+ ])
2022
+ .optional(),
2023
+ item_tiers: zod_1.z
2024
+ .union([
2025
+ zod_1.z.array(CheckoutGiftForItemsHostedPageItemTiersItemSchema.optional()),
2026
+ CheckoutGiftForItemsHostedPageItemTiersSchema,
2027
+ ])
2028
+ .optional(),
2029
+ allowed_billing_frequencies: zod_1.z
2030
+ .union([
2031
+ zod_1.z.array(CheckoutGiftForItemsHostedPageAllowedBillingFrequenciesItemSchema.optional()),
2032
+ CheckoutGiftForItemsHostedPageAllowedBillingFrequenciesSchema,
2033
+ ])
2034
+ .optional(),
1618
2035
  });
1619
2036
  exports.CheckoutGiftForItemsHostedPageBodySchema = CheckoutGiftForItemsHostedPageBodySchema;
1620
2037
  //HostedPage.claimGift
@@ -1641,8 +2058,18 @@ const ListHostedPageIdSchema = zod_1.z.object({
1641
2058
  is: zod_1.z.string().min(1).optional(),
1642
2059
  is_not: zod_1.z.string().min(1).optional(),
1643
2060
  starts_with: zod_1.z.string().min(1).optional(),
1644
- in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
1645
- not_in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
2061
+ in: zod_1.z
2062
+ .union([
2063
+ zod_1.z.array(zod_1.z.string().optional()),
2064
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
2065
+ ])
2066
+ .optional(),
2067
+ not_in: zod_1.z
2068
+ .union([
2069
+ zod_1.z.array(zod_1.z.string().optional()),
2070
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
2071
+ ])
2072
+ .optional(),
1646
2073
  });
1647
2074
  const ListHostedPageTypeSchema = zod_1.z.object({
1648
2075
  is: zod_1.z
@@ -1676,33 +2103,67 @@ const ListHostedPageTypeSchema = zod_1.z.object({
1676
2103
  ])
1677
2104
  .optional(),
1678
2105
  in: zod_1.z
1679
- .enum([
1680
- 'checkout_new',
1681
- 'checkout_existing',
1682
- 'update_card',
1683
- 'update_payment_method',
1684
- 'manage_payment_sources',
1685
- 'collect_now',
1686
- 'extend_subscription',
1687
- 'checkout_one_time',
1688
- 'pre_cancel',
1689
- 'view_voucher',
1690
- 'accept_quote',
2106
+ .union([
2107
+ zod_1.z.array(zod_1.z
2108
+ .enum([
2109
+ 'checkout_new',
2110
+ 'checkout_existing',
2111
+ 'update_card',
2112
+ 'update_payment_method',
2113
+ 'manage_payment_sources',
2114
+ 'collect_now',
2115
+ 'extend_subscription',
2116
+ 'checkout_one_time',
2117
+ 'pre_cancel',
2118
+ 'view_voucher',
2119
+ 'accept_quote',
2120
+ ])
2121
+ .optional()),
2122
+ zod_1.z.enum([
2123
+ 'checkout_new',
2124
+ 'checkout_existing',
2125
+ 'update_card',
2126
+ 'update_payment_method',
2127
+ 'manage_payment_sources',
2128
+ 'collect_now',
2129
+ 'extend_subscription',
2130
+ 'checkout_one_time',
2131
+ 'pre_cancel',
2132
+ 'view_voucher',
2133
+ 'accept_quote',
2134
+ ]),
1691
2135
  ])
1692
2136
  .optional(),
1693
2137
  not_in: zod_1.z
1694
- .enum([
1695
- 'checkout_new',
1696
- 'checkout_existing',
1697
- 'update_card',
1698
- 'update_payment_method',
1699
- 'manage_payment_sources',
1700
- 'collect_now',
1701
- 'extend_subscription',
1702
- 'checkout_one_time',
1703
- 'pre_cancel',
1704
- 'view_voucher',
1705
- 'accept_quote',
2138
+ .union([
2139
+ zod_1.z.array(zod_1.z
2140
+ .enum([
2141
+ 'checkout_new',
2142
+ 'checkout_existing',
2143
+ 'update_card',
2144
+ 'update_payment_method',
2145
+ 'manage_payment_sources',
2146
+ 'collect_now',
2147
+ 'extend_subscription',
2148
+ 'checkout_one_time',
2149
+ 'pre_cancel',
2150
+ 'view_voucher',
2151
+ 'accept_quote',
2152
+ ])
2153
+ .optional()),
2154
+ zod_1.z.enum([
2155
+ 'checkout_new',
2156
+ 'checkout_existing',
2157
+ 'update_card',
2158
+ 'update_payment_method',
2159
+ 'manage_payment_sources',
2160
+ 'collect_now',
2161
+ 'extend_subscription',
2162
+ 'checkout_one_time',
2163
+ 'pre_cancel',
2164
+ 'view_voucher',
2165
+ 'accept_quote',
2166
+ ]),
1706
2167
  ])
1707
2168
  .optional(),
1708
2169
  });
@@ -1728,31 +2189,66 @@ const ListHostedPageStateSchema = zod_1.z.object({
1728
2189
  ])
1729
2190
  .optional(),
1730
2191
  in: zod_1.z
1731
- .enum([
1732
- 'created',
1733
- 'requested',
1734
- 'succeeded',
1735
- 'cancelled',
1736
- 'failed',
1737
- 'acknowledged',
2192
+ .union([
2193
+ zod_1.z.array(zod_1.z
2194
+ .enum([
2195
+ 'created',
2196
+ 'requested',
2197
+ 'succeeded',
2198
+ 'cancelled',
2199
+ 'failed',
2200
+ 'acknowledged',
2201
+ ])
2202
+ .optional()),
2203
+ zod_1.z.enum([
2204
+ 'created',
2205
+ 'requested',
2206
+ 'succeeded',
2207
+ 'cancelled',
2208
+ 'failed',
2209
+ 'acknowledged',
2210
+ ]),
1738
2211
  ])
1739
2212
  .optional(),
1740
2213
  not_in: zod_1.z
1741
- .enum([
1742
- 'created',
1743
- 'requested',
1744
- 'succeeded',
1745
- 'cancelled',
1746
- 'failed',
1747
- 'acknowledged',
2214
+ .union([
2215
+ zod_1.z.array(zod_1.z
2216
+ .enum([
2217
+ 'created',
2218
+ 'requested',
2219
+ 'succeeded',
2220
+ 'cancelled',
2221
+ 'failed',
2222
+ 'acknowledged',
2223
+ ])
2224
+ .optional()),
2225
+ zod_1.z.enum([
2226
+ 'created',
2227
+ 'requested',
2228
+ 'succeeded',
2229
+ 'cancelled',
2230
+ 'failed',
2231
+ 'acknowledged',
2232
+ ]),
1748
2233
  ])
1749
2234
  .optional(),
1750
2235
  });
1751
2236
  const ListHostedPageUpdatedAtSchema = zod_1.z.object({
1752
- after: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
1753
- before: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
1754
- on: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
1755
- between: zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
2237
+ after: zod_1.z
2238
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
2239
+ .optional(),
2240
+ before: zod_1.z
2241
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
2242
+ .optional(),
2243
+ on: zod_1.z
2244
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
2245
+ .optional(),
2246
+ between: zod_1.z
2247
+ .union([
2248
+ zod_1.z.array(zod_1.z.number().int().optional()).min(2).max(2),
2249
+ zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')),
2250
+ ])
2251
+ .optional(),
1756
2252
  });
1757
2253
  const ListHostedPageBodySchema = zod_1.z.looseObject({
1758
2254
  limit: zod_1.z.number().int().min(1).max(100).optional(),