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
@@ -7,12 +7,22 @@ exports.UpdateCreditUnitBodySchema = exports.CreateCreditUnitBodySchema = export
7
7
  const zod_1 = require("zod");
8
8
  //CreditUnit.list
9
9
  const ListCreditUnitStatusSchema = zod_1.z.object({
10
+ in: zod_1.z
11
+ .union([
12
+ zod_1.z.array(zod_1.z.enum(['active', 'archived']).optional()),
13
+ zod_1.z.enum(['active', 'archived']),
14
+ ])
15
+ .optional(),
10
16
  is: zod_1.z.enum(['active', 'archived']).optional(),
11
- in: zod_1.z.enum(['active', 'archived']).optional(),
12
17
  });
13
18
  const ListCreditUnitIdSchema = zod_1.z.object({
19
+ in: zod_1.z
20
+ .union([
21
+ zod_1.z.array(zod_1.z.string().optional()),
22
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
23
+ ])
24
+ .optional(),
14
25
  is: zod_1.z.string().min(1).optional(),
15
- in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
16
26
  });
17
27
  const ListCreditUnitBodySchema = zod_1.z.looseObject({
18
28
  limit: zod_1.z.number().int().min(1).max(100).optional(),
@@ -335,12 +335,23 @@ const CreateCustomerPaymentIntentSchema = zod_1.z.object({
335
335
  gw_payment_method_id: zod_1.z.string().max(65000).optional(),
336
336
  additional_information: CreateCustomerAdditionalInformationSchema.optional(),
337
337
  });
338
+ const CreateCustomerEntityIdentifiersItemSchema = zod_1.z.object({
339
+ id: zod_1.z.string().max(40).optional(),
340
+ scheme: zod_1.z.string().max(50).optional(),
341
+ value: zod_1.z.string().max(50).optional(),
342
+ standard: zod_1.z.string().max(50).optional(),
343
+ });
338
344
  const CreateCustomerEntityIdentifiersSchema = zod_1.z.object({
339
345
  id: zod_1.z.array(zod_1.z.string().max(40).optional()).optional(),
340
346
  scheme: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
341
347
  value: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
342
348
  standard: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
343
349
  });
350
+ const CreateCustomerTaxProvidersFieldsItemSchema = zod_1.z.object({
351
+ provider_name: zod_1.z.string().max(50).optional(),
352
+ field_id: zod_1.z.string().max(50).optional(),
353
+ field_value: zod_1.z.string().max(50).optional(),
354
+ });
344
355
  const CreateCustomerTaxProvidersFieldsSchema = zod_1.z.object({
345
356
  provider_name: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
346
357
  field_id: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
@@ -429,8 +440,18 @@ const CreateCustomerBodySchema = zod_1.z.looseObject({
429
440
  payment_method: CreateCustomerPaymentMethodSchema.optional(),
430
441
  payment_intent: CreateCustomerPaymentIntentSchema.optional(),
431
442
  billing_address: CreateCustomerBillingAddressSchema.optional(),
432
- entity_identifiers: CreateCustomerEntityIdentifiersSchema.optional(),
433
- tax_providers_fields: CreateCustomerTaxProvidersFieldsSchema.optional(),
443
+ entity_identifiers: zod_1.z
444
+ .union([
445
+ zod_1.z.array(CreateCustomerEntityIdentifiersItemSchema.optional()),
446
+ CreateCustomerEntityIdentifiersSchema,
447
+ ])
448
+ .optional(),
449
+ tax_providers_fields: zod_1.z
450
+ .union([
451
+ zod_1.z.array(CreateCustomerTaxProvidersFieldsItemSchema.optional()),
452
+ CreateCustomerTaxProvidersFieldsSchema,
453
+ ])
454
+ .optional(),
434
455
  });
435
456
  exports.CreateCustomerBodySchema = CreateCustomerBodySchema;
436
457
  //Customer.list
@@ -438,62 +459,108 @@ const ListCustomerIdSchema = zod_1.z.object({
438
459
  is: zod_1.z.string().min(1).optional(),
439
460
  is_not: zod_1.z.string().min(1).optional(),
440
461
  starts_with: zod_1.z.string().min(1).optional(),
441
- in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
442
- not_in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
462
+ in: zod_1.z
463
+ .union([
464
+ zod_1.z.array(zod_1.z.string().optional()),
465
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
466
+ ])
467
+ .optional(),
468
+ not_in: zod_1.z
469
+ .union([
470
+ zod_1.z.array(zod_1.z.string().optional()),
471
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
472
+ ])
473
+ .optional(),
443
474
  });
444
475
  const ListCustomerFirstNameSchema = zod_1.z.object({
445
476
  is: zod_1.z.string().min(1).optional(),
446
477
  is_not: zod_1.z.string().min(1).optional(),
447
478
  starts_with: zod_1.z.string().min(1).optional(),
448
- is_present: zod_1.z.enum(['true', 'false']).optional(),
479
+ is_present: zod_1.z.union([zod_1.z.boolean(), zod_1.z.enum(['true', 'false'])]).optional(),
449
480
  });
450
481
  const ListCustomerLastNameSchema = zod_1.z.object({
451
482
  is: zod_1.z.string().min(1).optional(),
452
483
  is_not: zod_1.z.string().min(1).optional(),
453
484
  starts_with: zod_1.z.string().min(1).optional(),
454
- is_present: zod_1.z.enum(['true', 'false']).optional(),
485
+ is_present: zod_1.z.union([zod_1.z.boolean(), zod_1.z.enum(['true', 'false'])]).optional(),
455
486
  });
456
487
  const ListCustomerEmailSchema = zod_1.z.object({
457
488
  is: zod_1.z.string().min(1).optional(),
458
489
  is_not: zod_1.z.string().min(1).optional(),
459
490
  starts_with: zod_1.z.string().min(1).optional(),
460
- is_present: zod_1.z.enum(['true', 'false']).optional(),
491
+ is_present: zod_1.z.union([zod_1.z.boolean(), zod_1.z.enum(['true', 'false'])]).optional(),
461
492
  });
462
493
  const ListCustomerCompanySchema = zod_1.z.object({
463
494
  is: zod_1.z.string().min(1).optional(),
464
495
  is_not: zod_1.z.string().min(1).optional(),
465
496
  starts_with: zod_1.z.string().min(1).optional(),
466
- is_present: zod_1.z.enum(['true', 'false']).optional(),
497
+ is_present: zod_1.z.union([zod_1.z.boolean(), zod_1.z.enum(['true', 'false'])]).optional(),
467
498
  });
468
499
  const ListCustomerPhoneSchema = zod_1.z.object({
469
500
  is: zod_1.z.string().min(1).optional(),
470
501
  is_not: zod_1.z.string().min(1).optional(),
471
502
  starts_with: zod_1.z.string().min(1).optional(),
472
- is_present: zod_1.z.enum(['true', 'false']).optional(),
503
+ is_present: zod_1.z.union([zod_1.z.boolean(), zod_1.z.enum(['true', 'false'])]).optional(),
473
504
  });
474
505
  const ListCustomerAutoCollectionSchema = zod_1.z.object({
475
506
  is: zod_1.z.enum(['on', 'off']).optional(),
476
507
  is_not: zod_1.z.enum(['on', 'off']).optional(),
477
- in: zod_1.z.enum(['on', 'off']).optional(),
478
- not_in: zod_1.z.enum(['on', 'off']).optional(),
508
+ in: zod_1.z
509
+ .union([zod_1.z.array(zod_1.z.enum(['on', 'off']).optional()), zod_1.z.enum(['on', 'off'])])
510
+ .optional(),
511
+ not_in: zod_1.z
512
+ .union([zod_1.z.array(zod_1.z.enum(['on', 'off']).optional()), zod_1.z.enum(['on', 'off'])])
513
+ .optional(),
479
514
  });
480
515
  const ListCustomerTaxabilitySchema = zod_1.z.object({
481
516
  is: zod_1.z.enum(['taxable', 'exempt', 'zero_rated']).optional(),
482
517
  is_not: zod_1.z.enum(['taxable', 'exempt', 'zero_rated']).optional(),
483
- in: zod_1.z.enum(['taxable', 'exempt', 'zero_rated']).optional(),
484
- not_in: zod_1.z.enum(['taxable', 'exempt', 'zero_rated']).optional(),
518
+ in: zod_1.z
519
+ .union([
520
+ zod_1.z.array(zod_1.z.enum(['taxable', 'exempt', 'zero_rated']).optional()),
521
+ zod_1.z.enum(['taxable', 'exempt', 'zero_rated']),
522
+ ])
523
+ .optional(),
524
+ not_in: zod_1.z
525
+ .union([
526
+ zod_1.z.array(zod_1.z.enum(['taxable', 'exempt', 'zero_rated']).optional()),
527
+ zod_1.z.enum(['taxable', 'exempt', 'zero_rated']),
528
+ ])
529
+ .optional(),
485
530
  });
486
531
  const ListCustomerCreatedAtSchema = zod_1.z.object({
487
- after: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
488
- before: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
489
- on: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
490
- between: zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
532
+ after: zod_1.z
533
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
534
+ .optional(),
535
+ before: zod_1.z
536
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
537
+ .optional(),
538
+ on: zod_1.z
539
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
540
+ .optional(),
541
+ between: zod_1.z
542
+ .union([
543
+ zod_1.z.array(zod_1.z.number().int().optional()).min(2).max(2),
544
+ zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')),
545
+ ])
546
+ .optional(),
491
547
  });
492
548
  const ListCustomerUpdatedAtSchema = zod_1.z.object({
493
- after: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
494
- before: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
495
- on: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
496
- between: zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
549
+ after: zod_1.z
550
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
551
+ .optional(),
552
+ before: zod_1.z
553
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
554
+ .optional(),
555
+ on: zod_1.z
556
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
557
+ .optional(),
558
+ between: zod_1.z
559
+ .union([
560
+ zod_1.z.array(zod_1.z.number().int().optional()).min(2).max(2),
561
+ zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')),
562
+ ])
563
+ .optional(),
497
564
  });
498
565
  const ListCustomerOfflinePaymentMethodSchema = zod_1.z.object({
499
566
  is: zod_1.z
@@ -531,48 +598,96 @@ const ListCustomerOfflinePaymentMethodSchema = zod_1.z.object({
531
598
  ])
532
599
  .optional(),
533
600
  in: zod_1.z
534
- .enum([
535
- 'no_preference',
536
- 'cash',
537
- 'check',
538
- 'bank_transfer',
539
- 'ach_credit',
540
- 'sepa_credit',
541
- 'boleto',
542
- 'us_automated_bank_transfer',
543
- 'eu_automated_bank_transfer',
544
- 'uk_automated_bank_transfer',
545
- 'jp_automated_bank_transfer',
546
- 'mx_automated_bank_transfer',
547
- 'custom',
601
+ .union([
602
+ zod_1.z.array(zod_1.z
603
+ .enum([
604
+ 'no_preference',
605
+ 'cash',
606
+ 'check',
607
+ 'bank_transfer',
608
+ 'ach_credit',
609
+ 'sepa_credit',
610
+ 'boleto',
611
+ 'us_automated_bank_transfer',
612
+ 'eu_automated_bank_transfer',
613
+ 'uk_automated_bank_transfer',
614
+ 'jp_automated_bank_transfer',
615
+ 'mx_automated_bank_transfer',
616
+ 'custom',
617
+ ])
618
+ .optional()),
619
+ zod_1.z.enum([
620
+ 'no_preference',
621
+ 'cash',
622
+ 'check',
623
+ 'bank_transfer',
624
+ 'ach_credit',
625
+ 'sepa_credit',
626
+ 'boleto',
627
+ 'us_automated_bank_transfer',
628
+ 'eu_automated_bank_transfer',
629
+ 'uk_automated_bank_transfer',
630
+ 'jp_automated_bank_transfer',
631
+ 'mx_automated_bank_transfer',
632
+ 'custom',
633
+ ]),
548
634
  ])
549
635
  .optional(),
550
636
  not_in: zod_1.z
551
- .enum([
552
- 'no_preference',
553
- 'cash',
554
- 'check',
555
- 'bank_transfer',
556
- 'ach_credit',
557
- 'sepa_credit',
558
- 'boleto',
559
- 'us_automated_bank_transfer',
560
- 'eu_automated_bank_transfer',
561
- 'uk_automated_bank_transfer',
562
- 'jp_automated_bank_transfer',
563
- 'mx_automated_bank_transfer',
564
- 'custom',
637
+ .union([
638
+ zod_1.z.array(zod_1.z
639
+ .enum([
640
+ 'no_preference',
641
+ 'cash',
642
+ 'check',
643
+ 'bank_transfer',
644
+ 'ach_credit',
645
+ 'sepa_credit',
646
+ 'boleto',
647
+ 'us_automated_bank_transfer',
648
+ 'eu_automated_bank_transfer',
649
+ 'uk_automated_bank_transfer',
650
+ 'jp_automated_bank_transfer',
651
+ 'mx_automated_bank_transfer',
652
+ 'custom',
653
+ ])
654
+ .optional()),
655
+ zod_1.z.enum([
656
+ 'no_preference',
657
+ 'cash',
658
+ 'check',
659
+ 'bank_transfer',
660
+ 'ach_credit',
661
+ 'sepa_credit',
662
+ 'boleto',
663
+ 'us_automated_bank_transfer',
664
+ 'eu_automated_bank_transfer',
665
+ 'uk_automated_bank_transfer',
666
+ 'jp_automated_bank_transfer',
667
+ 'mx_automated_bank_transfer',
668
+ 'custom',
669
+ ]),
565
670
  ])
566
671
  .optional(),
567
672
  });
568
673
  const ListCustomerAutoCloseInvoicesSchema = zod_1.z.object({
569
- is: zod_1.z.enum(['true', 'false']).optional(),
674
+ is: zod_1.z.union([zod_1.z.boolean(), zod_1.z.enum(['true', 'false'])]).optional(),
570
675
  });
571
676
  const ListCustomerChannelSchema = zod_1.z.object({
572
677
  is: zod_1.z.enum(['web', 'app_store', 'play_store']).optional(),
573
678
  is_not: zod_1.z.enum(['web', 'app_store', 'play_store']).optional(),
574
- in: zod_1.z.enum(['web', 'app_store', 'play_store']).optional(),
575
- not_in: zod_1.z.enum(['web', 'app_store', 'play_store']).optional(),
679
+ in: zod_1.z
680
+ .union([
681
+ zod_1.z.array(zod_1.z.enum(['web', 'app_store', 'play_store']).optional()),
682
+ zod_1.z.enum(['web', 'app_store', 'play_store']),
683
+ ])
684
+ .optional(),
685
+ not_in: zod_1.z
686
+ .union([
687
+ zod_1.z.array(zod_1.z.enum(['web', 'app_store', 'play_store']).optional()),
688
+ zod_1.z.enum(['web', 'app_store', 'play_store']),
689
+ ])
690
+ .optional(),
576
691
  });
577
692
  const ListCustomerBusinessEntityIdSchema = zod_1.z.object({
578
693
  is: zod_1.z.string().min(1).optional(),
@@ -625,6 +740,11 @@ const ListCustomerBodySchema = zod_1.z.looseObject({
625
740
  exports.ListCustomerBodySchema = ListCustomerBodySchema;
626
741
  //Customer.update
627
742
  const UpdateCustomerMetaDataSchema = zod_1.z.looseObject({});
743
+ const UpdateCustomerTaxProvidersFieldsItemSchema = zod_1.z.object({
744
+ provider_name: zod_1.z.string().max(50).optional(),
745
+ field_id: zod_1.z.string().max(50).optional(),
746
+ field_value: zod_1.z.string().max(50).optional(),
747
+ });
628
748
  const UpdateCustomerTaxProvidersFieldsSchema = zod_1.z.object({
629
749
  provider_name: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
630
750
  field_id: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
@@ -696,7 +816,12 @@ const UpdateCustomerBodySchema = zod_1.z.looseObject({
696
816
  meta_data: UpdateCustomerMetaDataSchema.optional(),
697
817
  fraud_flag: zod_1.z.enum(['safe', 'fraudulent']).optional(),
698
818
  consolidated_invoicing: zod_1.z.boolean().optional(),
699
- tax_providers_fields: UpdateCustomerTaxProvidersFieldsSchema.optional(),
819
+ tax_providers_fields: zod_1.z
820
+ .union([
821
+ zod_1.z.array(UpdateCustomerTaxProvidersFieldsItemSchema.optional()),
822
+ UpdateCustomerTaxProvidersFieldsSchema,
823
+ ])
824
+ .optional(),
700
825
  });
701
826
  exports.UpdateCustomerBodySchema = UpdateCustomerBodySchema;
702
827
  //Customer.updatePaymentMethod
@@ -863,6 +988,13 @@ const UpdateBillingInfoCustomerBillingAddressSchema = zod_1.z.object({
863
988
  .enum(['not_validated', 'valid', 'partially_valid', 'invalid'])
864
989
  .optional(),
865
990
  });
991
+ const UpdateBillingInfoCustomerEntityIdentifiersItemSchema = zod_1.z.object({
992
+ id: zod_1.z.string().max(40).optional(),
993
+ scheme: zod_1.z.string().max(50).optional(),
994
+ value: zod_1.z.string().max(50).optional(),
995
+ operation: zod_1.z.enum(['create', 'update', 'delete']).optional(),
996
+ standard: zod_1.z.string().max(50).optional(),
997
+ });
866
998
  const UpdateBillingInfoCustomerEntityIdentifiersSchema = zod_1.z.object({
867
999
  id: zod_1.z.array(zod_1.z.string().max(40).optional()).optional(),
868
1000
  scheme: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
@@ -872,6 +1004,11 @@ const UpdateBillingInfoCustomerEntityIdentifiersSchema = zod_1.z.object({
872
1004
  .optional(),
873
1005
  standard: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
874
1006
  });
1007
+ const UpdateBillingInfoCustomerTaxProvidersFieldsItemSchema = zod_1.z.object({
1008
+ provider_name: zod_1.z.string().max(50).optional(),
1009
+ field_id: zod_1.z.string().max(50).optional(),
1010
+ field_value: zod_1.z.string().max(50).optional(),
1011
+ });
875
1012
  const UpdateBillingInfoCustomerTaxProvidersFieldsSchema = zod_1.z.object({
876
1013
  provider_name: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
877
1014
  field_id: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
@@ -887,8 +1024,18 @@ const UpdateBillingInfoCustomerBodySchema = zod_1.z.looseObject({
887
1024
  is_einvoice_enabled: zod_1.z.boolean().optional(),
888
1025
  einvoicing_method: zod_1.z.enum(['automatic', 'manual', 'site_default']).optional(),
889
1026
  billing_address: UpdateBillingInfoCustomerBillingAddressSchema.optional(),
890
- entity_identifiers: UpdateBillingInfoCustomerEntityIdentifiersSchema.optional(),
891
- tax_providers_fields: UpdateBillingInfoCustomerTaxProvidersFieldsSchema.optional(),
1027
+ entity_identifiers: zod_1.z
1028
+ .union([
1029
+ zod_1.z.array(UpdateBillingInfoCustomerEntityIdentifiersItemSchema.optional()),
1030
+ UpdateBillingInfoCustomerEntityIdentifiersSchema,
1031
+ ])
1032
+ .optional(),
1033
+ tax_providers_fields: zod_1.z
1034
+ .union([
1035
+ zod_1.z.array(UpdateBillingInfoCustomerTaxProvidersFieldsItemSchema.optional()),
1036
+ UpdateBillingInfoCustomerTaxProvidersFieldsSchema,
1037
+ ])
1038
+ .optional(),
892
1039
  });
893
1040
  exports.UpdateBillingInfoCustomerBodySchema = UpdateBillingInfoCustomerBodySchema;
894
1041
  //Customer.contactsForCustomer
@@ -990,12 +1137,6 @@ const RecordExcessPaymentCustomerTransactionSchema = zod_1.z.object({
990
1137
  'app_store',
991
1138
  'play_store',
992
1139
  'custom',
993
- 'tamara',
994
- 'qpay',
995
- 'blik',
996
- 'fpx',
997
- 'wero',
998
- 'p24',
999
1140
  ]),
1000
1141
  reference_number: zod_1.z.string().max(100).optional(),
1001
1142
  custom_payment_method_id: zod_1.z.string().max(50).optional(),
@@ -1181,6 +1322,10 @@ const CollectPaymentCustomerPaymentIntentSchema = zod_1.z.object({
1181
1322
  reference_id: zod_1.z.string().max(65000).optional(),
1182
1323
  additional_information: CollectPaymentCustomerAdditionalInformationSchema.optional(),
1183
1324
  });
1325
+ const CollectPaymentCustomerInvoiceAllocationsItemSchema = zod_1.z.object({
1326
+ invoice_id: zod_1.z.string().max(50),
1327
+ allocation_amount: zod_1.z.number().int().min(0).optional(),
1328
+ });
1184
1329
  const CollectPaymentCustomerInvoiceAllocationsSchema = zod_1.z.object({
1185
1330
  invoice_id: zod_1.z.array(zod_1.z.string().max(50).optional()),
1186
1331
  allocation_amount: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
@@ -1195,7 +1340,12 @@ const CollectPaymentCustomerBodySchema = zod_1.z.looseObject({
1195
1340
  payment_method: CollectPaymentCustomerPaymentMethodSchema.optional(),
1196
1341
  card: CollectPaymentCustomerCardSchema.optional(),
1197
1342
  payment_intent: CollectPaymentCustomerPaymentIntentSchema.optional(),
1198
- invoice_allocations: CollectPaymentCustomerInvoiceAllocationsSchema.optional(),
1343
+ invoice_allocations: zod_1.z
1344
+ .union([
1345
+ zod_1.z.array(CollectPaymentCustomerInvoiceAllocationsItemSchema.optional()),
1346
+ CollectPaymentCustomerInvoiceAllocationsSchema,
1347
+ ])
1348
+ .optional(),
1199
1349
  });
1200
1350
  exports.CollectPaymentCustomerBodySchema = CollectPaymentCustomerBodySchema;
1201
1351
  //Customer.delete
@@ -6,10 +6,24 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.ListDifferentialPriceBodySchema = exports.DeleteDifferentialPriceBodySchema = exports.UpdateDifferentialPriceBodySchema = exports.RetrieveDifferentialPriceBodySchema = exports.CreateDifferentialPriceBodySchema = void 0;
7
7
  const zod_1 = require("zod");
8
8
  //DifferentialPrice.create
9
+ const CreateDifferentialPriceParentPeriodsItemSchema = zod_1.z.object({
10
+ period_unit: zod_1.z.enum(['day', 'week', 'month', 'year']),
11
+ period: zod_1.z.array(zod_1.z.string().optional()).optional(),
12
+ });
9
13
  const CreateDifferentialPriceParentPeriodsSchema = zod_1.z.object({
10
14
  period_unit: zod_1.z.array(zod_1.z.enum(['day', 'week', 'month', 'year']).optional()),
11
15
  period: zod_1.z.array(zod_1.z.array(zod_1.z.string().optional()).optional()).optional(),
12
16
  });
17
+ const CreateDifferentialPriceTiersItemSchema = zod_1.z.object({
18
+ starting_unit: zod_1.z.number().int().min(1).optional(),
19
+ ending_unit: zod_1.z.number().int().optional(),
20
+ price: zod_1.z.number().int().min(0).optional(),
21
+ starting_unit_in_decimal: zod_1.z.string().max(33).optional(),
22
+ ending_unit_in_decimal: zod_1.z.string().max(33).optional(),
23
+ price_in_decimal: zod_1.z.string().max(39).optional(),
24
+ pricing_type: zod_1.z.enum(['per_unit', 'flat_fee', 'package']).optional(),
25
+ package_size: zod_1.z.number().int().min(1).optional(),
26
+ });
13
27
  const CreateDifferentialPriceTiersSchema = zod_1.z.object({
14
28
  starting_unit: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
15
29
  ending_unit: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
@@ -27,8 +41,18 @@ const CreateDifferentialPriceBodySchema = zod_1.z.looseObject({
27
41
  price: zod_1.z.number().int().min(0).optional(),
28
42
  price_in_decimal: zod_1.z.string().max(39).optional(),
29
43
  business_entity_id: zod_1.z.string().max(50).optional(),
30
- parent_periods: CreateDifferentialPriceParentPeriodsSchema.optional(),
31
- tiers: CreateDifferentialPriceTiersSchema.optional(),
44
+ parent_periods: zod_1.z
45
+ .union([
46
+ zod_1.z.array(CreateDifferentialPriceParentPeriodsItemSchema.optional()),
47
+ CreateDifferentialPriceParentPeriodsSchema,
48
+ ])
49
+ .optional(),
50
+ tiers: zod_1.z
51
+ .union([
52
+ zod_1.z.array(CreateDifferentialPriceTiersItemSchema.optional()),
53
+ CreateDifferentialPriceTiersSchema,
54
+ ])
55
+ .optional(),
32
56
  });
33
57
  exports.CreateDifferentialPriceBodySchema = CreateDifferentialPriceBodySchema;
34
58
  //DifferentialPrice.retrieve
@@ -37,10 +61,24 @@ const RetrieveDifferentialPriceBodySchema = zod_1.z.looseObject({
37
61
  });
38
62
  exports.RetrieveDifferentialPriceBodySchema = RetrieveDifferentialPriceBodySchema;
39
63
  //DifferentialPrice.update
64
+ const UpdateDifferentialPriceParentPeriodsItemSchema = zod_1.z.object({
65
+ period_unit: zod_1.z.enum(['day', 'week', 'month', 'year']),
66
+ period: zod_1.z.array(zod_1.z.string().optional()).optional(),
67
+ });
40
68
  const UpdateDifferentialPriceParentPeriodsSchema = zod_1.z.object({
41
69
  period_unit: zod_1.z.array(zod_1.z.enum(['day', 'week', 'month', 'year']).optional()),
42
70
  period: zod_1.z.array(zod_1.z.array(zod_1.z.string().optional()).optional()).optional(),
43
71
  });
72
+ const UpdateDifferentialPriceTiersItemSchema = zod_1.z.object({
73
+ starting_unit: zod_1.z.number().int().min(1).optional(),
74
+ ending_unit: zod_1.z.number().int().optional(),
75
+ price: zod_1.z.number().int().min(0).optional(),
76
+ starting_unit_in_decimal: zod_1.z.string().max(33).optional(),
77
+ ending_unit_in_decimal: zod_1.z.string().max(33).optional(),
78
+ price_in_decimal: zod_1.z.string().max(39).optional(),
79
+ pricing_type: zod_1.z.enum(['per_unit', 'flat_fee', 'package']).optional(),
80
+ package_size: zod_1.z.number().int().min(1).optional(),
81
+ });
44
82
  const UpdateDifferentialPriceTiersSchema = zod_1.z.object({
45
83
  starting_unit: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
46
84
  ending_unit: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
@@ -57,8 +95,18 @@ const UpdateDifferentialPriceBodySchema = zod_1.z.looseObject({
57
95
  item_price_id: zod_1.z.string().max(100),
58
96
  price: zod_1.z.number().int().min(0).optional(),
59
97
  price_in_decimal: zod_1.z.string().max(39).optional(),
60
- parent_periods: UpdateDifferentialPriceParentPeriodsSchema.optional(),
61
- tiers: UpdateDifferentialPriceTiersSchema.optional(),
98
+ parent_periods: zod_1.z
99
+ .union([
100
+ zod_1.z.array(UpdateDifferentialPriceParentPeriodsItemSchema.optional()),
101
+ UpdateDifferentialPriceParentPeriodsSchema,
102
+ ])
103
+ .optional(),
104
+ tiers: zod_1.z
105
+ .union([
106
+ zod_1.z.array(UpdateDifferentialPriceTiersItemSchema.optional()),
107
+ UpdateDifferentialPriceTiersSchema,
108
+ ])
109
+ .optional(),
62
110
  });
63
111
  exports.UpdateDifferentialPriceBodySchema = UpdateDifferentialPriceBodySchema;
64
112
  //DifferentialPrice.delete
@@ -71,29 +119,69 @@ const ListDifferentialPriceItemPriceIdSchema = zod_1.z.object({
71
119
  is: zod_1.z.string().min(1).optional(),
72
120
  is_not: zod_1.z.string().min(1).optional(),
73
121
  starts_with: zod_1.z.string().min(1).optional(),
74
- in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
75
- not_in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
122
+ in: zod_1.z
123
+ .union([
124
+ zod_1.z.array(zod_1.z.string().optional()),
125
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
126
+ ])
127
+ .optional(),
128
+ not_in: zod_1.z
129
+ .union([
130
+ zod_1.z.array(zod_1.z.string().optional()),
131
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
132
+ ])
133
+ .optional(),
76
134
  });
77
135
  const ListDifferentialPriceItemIdSchema = zod_1.z.object({
78
136
  is: zod_1.z.string().min(1).optional(),
79
137
  is_not: zod_1.z.string().min(1).optional(),
80
138
  starts_with: zod_1.z.string().min(1).optional(),
81
- in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
82
- not_in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
139
+ in: zod_1.z
140
+ .union([
141
+ zod_1.z.array(zod_1.z.string().optional()),
142
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
143
+ ])
144
+ .optional(),
145
+ not_in: zod_1.z
146
+ .union([
147
+ zod_1.z.array(zod_1.z.string().optional()),
148
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
149
+ ])
150
+ .optional(),
83
151
  });
84
152
  const ListDifferentialPriceIdSchema = zod_1.z.object({
85
153
  is: zod_1.z.string().min(1).optional(),
86
154
  is_not: zod_1.z.string().min(1).optional(),
87
155
  starts_with: zod_1.z.string().min(1).optional(),
88
- in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
89
- not_in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
156
+ in: zod_1.z
157
+ .union([
158
+ zod_1.z.array(zod_1.z.string().optional()),
159
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
160
+ ])
161
+ .optional(),
162
+ not_in: zod_1.z
163
+ .union([
164
+ zod_1.z.array(zod_1.z.string().optional()),
165
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
166
+ ])
167
+ .optional(),
90
168
  });
91
169
  const ListDifferentialPriceParentItemIdSchema = zod_1.z.object({
92
170
  is: zod_1.z.string().min(1).optional(),
93
171
  is_not: zod_1.z.string().min(1).optional(),
94
172
  starts_with: zod_1.z.string().min(1).optional(),
95
- in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
96
- not_in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
173
+ in: zod_1.z
174
+ .union([
175
+ zod_1.z.array(zod_1.z.string().optional()),
176
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
177
+ ])
178
+ .optional(),
179
+ not_in: zod_1.z
180
+ .union([
181
+ zod_1.z.array(zod_1.z.string().optional()),
182
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
183
+ ])
184
+ .optional(),
97
185
  });
98
186
  const ListDifferentialPriceBodySchema = zod_1.z.looseObject({
99
187
  limit: zod_1.z.number().int().min(1).max(100).optional(),