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