chargebee 3.35.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 (152) hide show
  1. package/CHANGELOG.md +65 -0
  2. package/cjs/environment.js +1 -1
  3. package/cjs/resources/api_endpoints.js +56 -0
  4. package/cjs/resources/webhook/eventType.js +2 -0
  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 +16 -5
  10. package/cjs/schema/business_rule.schema.js +2 -2
  11. package/cjs/schema/business_ruleset.schema.js +2 -2
  12. package/cjs/schema/comment.schema.js +15 -4
  13. package/cjs/schema/coupon.schema.js +218 -37
  14. package/cjs/schema/coupon_code.schema.js +36 -6
  15. package/cjs/schema/coupon_set.schema.js +108 -27
  16. package/cjs/schema/credit_note.schema.js +496 -105
  17. package/cjs/schema/credit_unit.schema.js +12 -2
  18. package/cjs/schema/customer.schema.js +212 -62
  19. package/cjs/schema/differential_price.schema.js +100 -12
  20. package/cjs/schema/dispute.schema.js +125 -33
  21. package/cjs/schema/einvoice.schema.js +27 -6
  22. package/cjs/schema/email_log.schema.js +15 -4
  23. package/cjs/schema/entitlement.schema.js +33 -4
  24. package/cjs/schema/entitlement_override.schema.js +17 -1
  25. package/cjs/schema/estimate.schema.js +581 -36
  26. package/cjs/schema/event.schema.js +1282 -633
  27. package/cjs/schema/export.schema.js +4459 -1412
  28. package/cjs/schema/feature.schema.js +73 -11
  29. package/cjs/schema/gateway_request_log.schema.js +309 -0
  30. package/cjs/schema/gateway_webhook_log.schema.js +257 -0
  31. package/cjs/schema/gift.schema.js +51 -5
  32. package/cjs/schema/grant_block.schema.js +45 -12
  33. package/cjs/schema/hosted_page.schema.js +562 -66
  34. package/cjs/schema/index.js +3 -0
  35. package/cjs/schema/invoice.schema.js +821 -121
  36. package/cjs/schema/item.schema.js +151 -28
  37. package/cjs/schema/item_entitlement.schema.js +23 -2
  38. package/cjs/schema/item_family.schema.js +29 -8
  39. package/cjs/schema/item_price.schema.js +263 -48
  40. package/cjs/schema/ledger_operation.schema.js +42 -15
  41. package/cjs/schema/metered_feature.schema.js +10 -1
  42. package/cjs/schema/omnichannel_one_time_order.schema.js +32 -2
  43. package/cjs/schema/omnichannel_subscription.schema.js +136 -30
  44. package/cjs/schema/order.schema.js +233 -61
  45. package/cjs/schema/organization_detail.schema.js +36 -0
  46. package/cjs/schema/payment_schedule.schema.js +39 -8
  47. package/cjs/schema/payment_schedule_scheme.schema.js +37 -7
  48. package/cjs/schema/payment_source.schema.js +360 -148
  49. package/cjs/schema/payment_voucher.schema.js +33 -5
  50. package/cjs/schema/plan.schema.js +345 -57
  51. package/cjs/schema/price_ramp.schema.js +79 -14
  52. package/cjs/schema/price_variant.schema.js +88 -18
  53. package/cjs/schema/pricing_page_session.schema.js +36 -2
  54. package/cjs/schema/promotional_credit.schema.js +27 -6
  55. package/cjs/schema/purchase.schema.js +204 -12
  56. package/cjs/schema/quote.schema.js +901 -81
  57. package/cjs/schema/quote_entitlement.schema.js +6 -2
  58. package/cjs/schema/ramp.schema.js +238 -24
  59. package/cjs/schema/site_migration_detail.schema.js +50 -16
  60. package/cjs/schema/subscription.schema.js +998 -169
  61. package/cjs/schema/subscription_entitlement.schema.js +9 -1
  62. package/cjs/schema/transaction.schema.js +780 -342
  63. package/cjs/schema/unbilled_charge.schema.js +141 -13
  64. package/cjs/schema/usage.schema.js +55 -12
  65. package/cjs/schema/usage_event.schema.js +13 -1
  66. package/cjs/schema/virtual_bank_account.schema.js +42 -10
  67. package/cjs/schema/webhook_endpoint.schema.js +4 -0
  68. package/esm/environment.js +1 -1
  69. package/esm/resources/api_endpoints.js +56 -0
  70. package/esm/resources/webhook/eventType.js +2 -0
  71. package/esm/schema/addon.schema.js +221 -40
  72. package/esm/schema/alert.schema.js +17 -2
  73. package/esm/schema/alert_status.schema.js +6 -1
  74. package/esm/schema/attached_item.schema.js +101 -26
  75. package/esm/schema/business_entity.schema.js +16 -5
  76. package/esm/schema/business_rule.schema.js +2 -2
  77. package/esm/schema/business_ruleset.schema.js +2 -2
  78. package/esm/schema/comment.schema.js +15 -4
  79. package/esm/schema/coupon.schema.js +218 -37
  80. package/esm/schema/coupon_code.schema.js +36 -6
  81. package/esm/schema/coupon_set.schema.js +108 -27
  82. package/esm/schema/credit_note.schema.js +496 -105
  83. package/esm/schema/credit_unit.schema.js +12 -2
  84. package/esm/schema/customer.schema.js +212 -62
  85. package/esm/schema/differential_price.schema.js +100 -12
  86. package/esm/schema/dispute.schema.js +125 -33
  87. package/esm/schema/einvoice.schema.js +27 -6
  88. package/esm/schema/email_log.schema.js +15 -4
  89. package/esm/schema/entitlement.schema.js +33 -4
  90. package/esm/schema/entitlement_override.schema.js +17 -1
  91. package/esm/schema/estimate.schema.js +581 -36
  92. package/esm/schema/event.schema.js +1282 -633
  93. package/esm/schema/export.schema.js +4459 -1412
  94. package/esm/schema/feature.schema.js +73 -11
  95. package/esm/schema/gateway_request_log.schema.js +306 -0
  96. package/esm/schema/gateway_webhook_log.schema.js +254 -0
  97. package/esm/schema/gift.schema.js +51 -5
  98. package/esm/schema/grant_block.schema.js +45 -12
  99. package/esm/schema/hosted_page.schema.js +562 -66
  100. package/esm/schema/index.js +3 -0
  101. package/esm/schema/invoice.schema.js +821 -121
  102. package/esm/schema/item.schema.js +151 -28
  103. package/esm/schema/item_entitlement.schema.js +23 -2
  104. package/esm/schema/item_family.schema.js +29 -8
  105. package/esm/schema/item_price.schema.js +263 -48
  106. package/esm/schema/ledger_operation.schema.js +42 -15
  107. package/esm/schema/metered_feature.schema.js +10 -1
  108. package/esm/schema/omnichannel_one_time_order.schema.js +32 -2
  109. package/esm/schema/omnichannel_subscription.schema.js +136 -30
  110. package/esm/schema/order.schema.js +233 -61
  111. package/esm/schema/organization_detail.schema.js +33 -0
  112. package/esm/schema/payment_schedule.schema.js +39 -8
  113. package/esm/schema/payment_schedule_scheme.schema.js +37 -7
  114. package/esm/schema/payment_source.schema.js +360 -148
  115. package/esm/schema/payment_voucher.schema.js +33 -5
  116. package/esm/schema/plan.schema.js +345 -57
  117. package/esm/schema/price_ramp.schema.js +79 -14
  118. package/esm/schema/price_variant.schema.js +88 -18
  119. package/esm/schema/pricing_page_session.schema.js +36 -2
  120. package/esm/schema/promotional_credit.schema.js +27 -6
  121. package/esm/schema/purchase.schema.js +204 -12
  122. package/esm/schema/quote.schema.js +901 -81
  123. package/esm/schema/quote_entitlement.schema.js +6 -2
  124. package/esm/schema/ramp.schema.js +238 -24
  125. package/esm/schema/site_migration_detail.schema.js +50 -16
  126. package/esm/schema/subscription.schema.js +998 -169
  127. package/esm/schema/subscription_entitlement.schema.js +9 -1
  128. package/esm/schema/transaction.schema.js +780 -342
  129. package/esm/schema/unbilled_charge.schema.js +141 -13
  130. package/esm/schema/usage.schema.js +55 -12
  131. package/esm/schema/usage_event.schema.js +13 -1
  132. package/esm/schema/virtual_bank_account.schema.js +42 -10
  133. package/esm/schema/webhook_endpoint.schema.js +4 -0
  134. package/package.json +1 -1
  135. package/types/core.d.ts +10 -6
  136. package/types/index.d.ts +8 -1
  137. package/types/resources/BillingLineItem.d.ts +10 -0
  138. package/types/resources/BillingMetadata.d.ts +9 -0
  139. package/types/resources/Content.d.ts +5 -0
  140. package/types/resources/Discount.d.ts +1 -0
  141. package/types/resources/DraftRequest.d.ts +1 -1
  142. package/types/resources/Estimate.d.ts +3 -0
  143. package/types/resources/Event.d.ts +2 -0
  144. package/types/resources/GatewayRequestLog.d.ts +82 -0
  145. package/types/resources/GatewayWebhookLog.d.ts +74 -0
  146. package/types/resources/GrantBlock.d.ts +5 -0
  147. package/types/resources/HostedPage.d.ts +18 -0
  148. package/types/resources/Invoice.d.ts +4 -0
  149. package/types/resources/OrganizationDetail.d.ts +84 -0
  150. package/types/resources/Subscription.d.ts +3 -0
  151. package/types/resources/Usage.d.ts +1 -0
  152. package/types/resources/WebhookEvent.d.ts +10 -0
@@ -3,6 +3,10 @@
3
3
  // Do not edit manually – regenerate via sdk-generator
4
4
  import { z } from 'zod';
5
5
  //PaymentScheduleScheme.create
6
+ const CreatePaymentScheduleSchemeFlexibleSchedulesItemSchema = z.object({
7
+ period: z.number().int().min(0).max(52).optional(),
8
+ amount_percentage: z.number().min(1).max(100).optional(),
9
+ });
6
10
  const CreatePaymentScheduleSchemeFlexibleSchedulesSchema = z.object({
7
11
  period: z.array(z.number().int().min(0).max(52).optional()).optional(),
8
12
  amount_percentage: z.array(z.number().min(1).max(100).optional()).optional(),
@@ -12,7 +16,12 @@ const CreatePaymentScheduleSchemeBodySchema = z.looseObject({
12
16
  period_unit: z.enum(['day', 'week', 'month']),
13
17
  period: z.number().int().min(1).max(30).optional(),
14
18
  name: z.string().max(100),
15
- flexible_schedules: CreatePaymentScheduleSchemeFlexibleSchedulesSchema.optional(),
19
+ flexible_schedules: z
20
+ .union([
21
+ z.array(CreatePaymentScheduleSchemeFlexibleSchedulesItemSchema.optional()),
22
+ CreatePaymentScheduleSchemeFlexibleSchedulesSchema,
23
+ ])
24
+ .optional(),
16
25
  });
17
26
  export { CreatePaymentScheduleSchemeBodySchema };
18
27
  //PaymentScheduleScheme.list
@@ -20,14 +29,35 @@ const ListPaymentScheduleSchemeIdSchema = z.object({
20
29
  is: z.string().min(1).optional(),
21
30
  is_not: z.string().min(1).optional(),
22
31
  starts_with: z.string().min(1).optional(),
23
- in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
24
- not_in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
32
+ in: z
33
+ .union([
34
+ z.array(z.string().optional()),
35
+ z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
36
+ ])
37
+ .optional(),
38
+ not_in: z
39
+ .union([
40
+ z.array(z.string().optional()),
41
+ z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
42
+ ])
43
+ .optional(),
25
44
  });
26
45
  const ListPaymentScheduleSchemeUpdatedAtSchema = z.object({
27
- after: z.string().regex(RegExp('^\\d{10}$')).optional(),
28
- before: z.string().regex(RegExp('^\\d{10}$')).optional(),
29
- on: z.string().regex(RegExp('^\\d{10}$')).optional(),
30
- between: z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
46
+ after: z
47
+ .union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
48
+ .optional(),
49
+ before: z
50
+ .union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
51
+ .optional(),
52
+ on: z
53
+ .union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
54
+ .optional(),
55
+ between: z
56
+ .union([
57
+ z.array(z.number().int().optional()).min(2).max(2),
58
+ z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')),
59
+ ])
60
+ .optional(),
31
61
  });
32
62
  const ListPaymentScheduleSchemeBodySchema = z.looseObject({
33
63
  limit: z.number().int().min(1).max(100).optional(),
@@ -456,8 +456,18 @@ const ListPaymentSourceCustomerIdSchema = z.object({
456
456
  is: z.string().min(1).optional(),
457
457
  is_not: z.string().min(1).optional(),
458
458
  starts_with: z.string().min(1).optional(),
459
- in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
460
- 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(),
461
471
  });
462
472
  const ListPaymentSourceTypeSchema = z.object({
463
473
  is: z
@@ -603,145 +613,291 @@ const ListPaymentSourceTypeSchema = z.object({
603
613
  ])
604
614
  .optional(),
605
615
  in: z
606
- .enum([
607
- 'card',
608
- 'paypal_express_checkout',
609
- 'amazon_payments',
610
- 'direct_debit',
611
- 'generic',
612
- 'alipay',
613
- 'unionpay',
614
- 'apple_pay',
615
- 'wechat_pay',
616
- 'ideal',
617
- 'google_pay',
618
- 'sofort',
619
- 'bancontact',
620
- 'giropay',
621
- 'dotpay',
622
- 'upi',
623
- 'netbanking_emandates',
624
- 'venmo',
625
- 'pay_to',
626
- 'faster_payments',
627
- 'sepa_instant_transfer',
628
- 'automated_bank_transfer',
629
- 'klarna_pay_now',
630
- 'online_banking_poland',
631
- 'payconiq_by_bancontact',
632
- 'electronic_payment_standard',
633
- 'kbc_payment_button',
634
- 'pay_by_bank',
635
- 'trustly',
636
- 'stablecoin',
637
- 'kakao_pay',
638
- 'naver_pay',
639
- 'revolut_pay',
640
- 'cash_app_pay',
641
- 'twint',
642
- 'go_pay',
643
- 'grab_pay',
644
- 'pay_co',
645
- 'after_pay',
646
- 'swish',
647
- 'payme',
648
- 'pix',
649
- 'klarna',
650
- 'alipay_hk',
651
- 'paypay',
652
- 'gcash',
653
- 'south_korean_cards',
654
- 'paynow',
655
- 'bizum',
656
- 'promptpay',
657
- 'dana',
658
- 'touch_n_go',
659
- 'tamara',
660
- 'qpay',
661
- 'ovo',
662
- 'momo',
663
- 'mercado_pago',
664
- 'nequi',
665
- 'nupay',
666
- 'picpay',
667
- 'thai_qr',
668
- 'blik',
669
- 'fpx',
670
- 'wero',
671
- 'p24',
672
- 'affirm_pay',
673
- 'rakuten_pay',
616
+ .union([
617
+ z.array(z
618
+ .enum([
619
+ 'card',
620
+ 'paypal_express_checkout',
621
+ 'amazon_payments',
622
+ 'direct_debit',
623
+ 'generic',
624
+ 'alipay',
625
+ 'unionpay',
626
+ 'apple_pay',
627
+ 'wechat_pay',
628
+ 'ideal',
629
+ 'google_pay',
630
+ 'sofort',
631
+ 'bancontact',
632
+ 'giropay',
633
+ 'dotpay',
634
+ 'upi',
635
+ 'netbanking_emandates',
636
+ 'venmo',
637
+ 'pay_to',
638
+ 'faster_payments',
639
+ 'sepa_instant_transfer',
640
+ 'automated_bank_transfer',
641
+ 'klarna_pay_now',
642
+ 'online_banking_poland',
643
+ 'payconiq_by_bancontact',
644
+ 'electronic_payment_standard',
645
+ 'kbc_payment_button',
646
+ 'pay_by_bank',
647
+ 'trustly',
648
+ 'stablecoin',
649
+ 'kakao_pay',
650
+ 'naver_pay',
651
+ 'revolut_pay',
652
+ 'cash_app_pay',
653
+ 'twint',
654
+ 'go_pay',
655
+ 'grab_pay',
656
+ 'pay_co',
657
+ 'after_pay',
658
+ 'swish',
659
+ 'payme',
660
+ 'pix',
661
+ 'klarna',
662
+ 'alipay_hk',
663
+ 'paypay',
664
+ 'gcash',
665
+ 'south_korean_cards',
666
+ 'paynow',
667
+ 'bizum',
668
+ 'promptpay',
669
+ 'dana',
670
+ 'touch_n_go',
671
+ 'tamara',
672
+ 'qpay',
673
+ 'ovo',
674
+ 'momo',
675
+ 'mercado_pago',
676
+ 'nequi',
677
+ 'nupay',
678
+ 'picpay',
679
+ 'thai_qr',
680
+ 'blik',
681
+ 'fpx',
682
+ 'wero',
683
+ 'p24',
684
+ 'affirm_pay',
685
+ 'rakuten_pay',
686
+ ])
687
+ .optional()),
688
+ z.enum([
689
+ 'card',
690
+ 'paypal_express_checkout',
691
+ 'amazon_payments',
692
+ 'direct_debit',
693
+ 'generic',
694
+ 'alipay',
695
+ 'unionpay',
696
+ 'apple_pay',
697
+ 'wechat_pay',
698
+ 'ideal',
699
+ 'google_pay',
700
+ 'sofort',
701
+ 'bancontact',
702
+ 'giropay',
703
+ 'dotpay',
704
+ 'upi',
705
+ 'netbanking_emandates',
706
+ 'venmo',
707
+ 'pay_to',
708
+ 'faster_payments',
709
+ 'sepa_instant_transfer',
710
+ 'automated_bank_transfer',
711
+ 'klarna_pay_now',
712
+ 'online_banking_poland',
713
+ 'payconiq_by_bancontact',
714
+ 'electronic_payment_standard',
715
+ 'kbc_payment_button',
716
+ 'pay_by_bank',
717
+ 'trustly',
718
+ 'stablecoin',
719
+ 'kakao_pay',
720
+ 'naver_pay',
721
+ 'revolut_pay',
722
+ 'cash_app_pay',
723
+ 'twint',
724
+ 'go_pay',
725
+ 'grab_pay',
726
+ 'pay_co',
727
+ 'after_pay',
728
+ 'swish',
729
+ 'payme',
730
+ 'pix',
731
+ 'klarna',
732
+ 'alipay_hk',
733
+ 'paypay',
734
+ 'gcash',
735
+ 'south_korean_cards',
736
+ 'paynow',
737
+ 'bizum',
738
+ 'promptpay',
739
+ 'dana',
740
+ 'touch_n_go',
741
+ 'tamara',
742
+ 'qpay',
743
+ 'ovo',
744
+ 'momo',
745
+ 'mercado_pago',
746
+ 'nequi',
747
+ 'nupay',
748
+ 'picpay',
749
+ 'thai_qr',
750
+ 'blik',
751
+ 'fpx',
752
+ 'wero',
753
+ 'p24',
754
+ 'affirm_pay',
755
+ 'rakuten_pay',
756
+ ]),
674
757
  ])
675
758
  .optional(),
676
759
  not_in: z
677
- .enum([
678
- 'card',
679
- 'paypal_express_checkout',
680
- 'amazon_payments',
681
- 'direct_debit',
682
- 'generic',
683
- 'alipay',
684
- 'unionpay',
685
- 'apple_pay',
686
- 'wechat_pay',
687
- 'ideal',
688
- 'google_pay',
689
- 'sofort',
690
- 'bancontact',
691
- 'giropay',
692
- 'dotpay',
693
- 'upi',
694
- 'netbanking_emandates',
695
- 'venmo',
696
- 'pay_to',
697
- 'faster_payments',
698
- 'sepa_instant_transfer',
699
- 'automated_bank_transfer',
700
- 'klarna_pay_now',
701
- 'online_banking_poland',
702
- 'payconiq_by_bancontact',
703
- 'electronic_payment_standard',
704
- 'kbc_payment_button',
705
- 'pay_by_bank',
706
- 'trustly',
707
- 'stablecoin',
708
- 'kakao_pay',
709
- 'naver_pay',
710
- 'revolut_pay',
711
- 'cash_app_pay',
712
- 'twint',
713
- 'go_pay',
714
- 'grab_pay',
715
- 'pay_co',
716
- 'after_pay',
717
- 'swish',
718
- 'payme',
719
- 'pix',
720
- 'klarna',
721
- 'alipay_hk',
722
- 'paypay',
723
- 'gcash',
724
- 'south_korean_cards',
725
- 'paynow',
726
- 'bizum',
727
- 'promptpay',
728
- 'dana',
729
- 'touch_n_go',
730
- 'tamara',
731
- 'qpay',
732
- 'ovo',
733
- 'momo',
734
- 'mercado_pago',
735
- 'nequi',
736
- 'nupay',
737
- 'picpay',
738
- 'thai_qr',
739
- 'blik',
740
- 'fpx',
741
- 'wero',
742
- 'p24',
743
- 'affirm_pay',
744
- 'rakuten_pay',
760
+ .union([
761
+ z.array(z
762
+ .enum([
763
+ 'card',
764
+ 'paypal_express_checkout',
765
+ 'amazon_payments',
766
+ 'direct_debit',
767
+ 'generic',
768
+ 'alipay',
769
+ 'unionpay',
770
+ 'apple_pay',
771
+ 'wechat_pay',
772
+ 'ideal',
773
+ 'google_pay',
774
+ 'sofort',
775
+ 'bancontact',
776
+ 'giropay',
777
+ 'dotpay',
778
+ 'upi',
779
+ 'netbanking_emandates',
780
+ 'venmo',
781
+ 'pay_to',
782
+ 'faster_payments',
783
+ 'sepa_instant_transfer',
784
+ 'automated_bank_transfer',
785
+ 'klarna_pay_now',
786
+ 'online_banking_poland',
787
+ 'payconiq_by_bancontact',
788
+ 'electronic_payment_standard',
789
+ 'kbc_payment_button',
790
+ 'pay_by_bank',
791
+ 'trustly',
792
+ 'stablecoin',
793
+ 'kakao_pay',
794
+ 'naver_pay',
795
+ 'revolut_pay',
796
+ 'cash_app_pay',
797
+ 'twint',
798
+ 'go_pay',
799
+ 'grab_pay',
800
+ 'pay_co',
801
+ 'after_pay',
802
+ 'swish',
803
+ 'payme',
804
+ 'pix',
805
+ 'klarna',
806
+ 'alipay_hk',
807
+ 'paypay',
808
+ 'gcash',
809
+ 'south_korean_cards',
810
+ 'paynow',
811
+ 'bizum',
812
+ 'promptpay',
813
+ 'dana',
814
+ 'touch_n_go',
815
+ 'tamara',
816
+ 'qpay',
817
+ 'ovo',
818
+ 'momo',
819
+ 'mercado_pago',
820
+ 'nequi',
821
+ 'nupay',
822
+ 'picpay',
823
+ 'thai_qr',
824
+ 'blik',
825
+ 'fpx',
826
+ 'wero',
827
+ 'p24',
828
+ 'affirm_pay',
829
+ 'rakuten_pay',
830
+ ])
831
+ .optional()),
832
+ z.enum([
833
+ 'card',
834
+ 'paypal_express_checkout',
835
+ 'amazon_payments',
836
+ 'direct_debit',
837
+ 'generic',
838
+ 'alipay',
839
+ 'unionpay',
840
+ 'apple_pay',
841
+ 'wechat_pay',
842
+ 'ideal',
843
+ 'google_pay',
844
+ 'sofort',
845
+ 'bancontact',
846
+ 'giropay',
847
+ 'dotpay',
848
+ 'upi',
849
+ 'netbanking_emandates',
850
+ 'venmo',
851
+ 'pay_to',
852
+ 'faster_payments',
853
+ 'sepa_instant_transfer',
854
+ 'automated_bank_transfer',
855
+ 'klarna_pay_now',
856
+ 'online_banking_poland',
857
+ 'payconiq_by_bancontact',
858
+ 'electronic_payment_standard',
859
+ 'kbc_payment_button',
860
+ 'pay_by_bank',
861
+ 'trustly',
862
+ 'stablecoin',
863
+ 'kakao_pay',
864
+ 'naver_pay',
865
+ 'revolut_pay',
866
+ 'cash_app_pay',
867
+ 'twint',
868
+ 'go_pay',
869
+ 'grab_pay',
870
+ 'pay_co',
871
+ 'after_pay',
872
+ 'swish',
873
+ 'payme',
874
+ 'pix',
875
+ 'klarna',
876
+ 'alipay_hk',
877
+ 'paypay',
878
+ 'gcash',
879
+ 'south_korean_cards',
880
+ 'paynow',
881
+ 'bizum',
882
+ 'promptpay',
883
+ 'dana',
884
+ 'touch_n_go',
885
+ 'tamara',
886
+ 'qpay',
887
+ 'ovo',
888
+ 'momo',
889
+ 'mercado_pago',
890
+ 'nequi',
891
+ 'nupay',
892
+ 'picpay',
893
+ 'thai_qr',
894
+ 'blik',
895
+ 'fpx',
896
+ 'wero',
897
+ 'p24',
898
+ 'affirm_pay',
899
+ 'rakuten_pay',
900
+ ]),
745
901
  ])
746
902
  .optional(),
747
903
  });
@@ -753,23 +909,79 @@ const ListPaymentSourceStatusSchema = z.object({
753
909
  .enum(['valid', 'expiring', 'expired', 'invalid', 'pending_verification'])
754
910
  .optional(),
755
911
  in: z
756
- .enum(['valid', 'expiring', 'expired', 'invalid', 'pending_verification'])
912
+ .union([
913
+ z.array(z
914
+ .enum([
915
+ 'valid',
916
+ 'expiring',
917
+ 'expired',
918
+ 'invalid',
919
+ 'pending_verification',
920
+ ])
921
+ .optional()),
922
+ z.enum([
923
+ 'valid',
924
+ 'expiring',
925
+ 'expired',
926
+ 'invalid',
927
+ 'pending_verification',
928
+ ]),
929
+ ])
757
930
  .optional(),
758
931
  not_in: z
759
- .enum(['valid', 'expiring', 'expired', 'invalid', 'pending_verification'])
932
+ .union([
933
+ z.array(z
934
+ .enum([
935
+ 'valid',
936
+ 'expiring',
937
+ 'expired',
938
+ 'invalid',
939
+ 'pending_verification',
940
+ ])
941
+ .optional()),
942
+ z.enum([
943
+ 'valid',
944
+ 'expiring',
945
+ 'expired',
946
+ 'invalid',
947
+ 'pending_verification',
948
+ ]),
949
+ ])
760
950
  .optional(),
761
951
  });
762
952
  const ListPaymentSourceUpdatedAtSchema = z.object({
763
- after: z.string().regex(RegExp('^\\d{10}$')).optional(),
764
- before: z.string().regex(RegExp('^\\d{10}$')).optional(),
765
- on: z.string().regex(RegExp('^\\d{10}$')).optional(),
766
- between: z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
953
+ after: z
954
+ .union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
955
+ .optional(),
956
+ before: z
957
+ .union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
958
+ .optional(),
959
+ on: z
960
+ .union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
961
+ .optional(),
962
+ between: z
963
+ .union([
964
+ z.array(z.number().int().optional()).min(2).max(2),
965
+ z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')),
966
+ ])
967
+ .optional(),
767
968
  });
768
969
  const ListPaymentSourceCreatedAtSchema = z.object({
769
- after: z.string().regex(RegExp('^\\d{10}$')).optional(),
770
- before: z.string().regex(RegExp('^\\d{10}$')).optional(),
771
- on: z.string().regex(RegExp('^\\d{10}$')).optional(),
772
- between: z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
970
+ after: z
971
+ .union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
972
+ .optional(),
973
+ before: z
974
+ .union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
975
+ .optional(),
976
+ on: z
977
+ .union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
978
+ .optional(),
979
+ between: z
980
+ .union([
981
+ z.array(z.number().int().optional()).min(2).max(2),
982
+ z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')),
983
+ ])
984
+ .optional(),
773
985
  });
774
986
  const ListPaymentSourceSortBySchema = z.looseObject({
775
987
  asc: z.enum(['created_at', 'updated_at']).optional(),
@@ -6,6 +6,9 @@ import { z } from 'zod';
6
6
  const CreatePaymentVoucherVoucherPaymentSourceSchema = z.object({
7
7
  voucher_type: z.enum(['boleto']),
8
8
  });
9
+ const CreatePaymentVoucherInvoiceAllocationsItemSchema = z.object({
10
+ invoice_id: z.string().max(50),
11
+ });
9
12
  const CreatePaymentVoucherInvoiceAllocationsSchema = z.object({
10
13
  invoice_id: z.array(z.string().max(50).optional()),
11
14
  });
@@ -13,15 +16,30 @@ const CreatePaymentVoucherBodySchema = z.looseObject({
13
16
  customer_id: z.string().max(50),
14
17
  payment_source_id: z.string().max(40).optional(),
15
18
  voucher_payment_source: CreatePaymentVoucherVoucherPaymentSourceSchema.optional(),
16
- invoice_allocations: CreatePaymentVoucherInvoiceAllocationsSchema.optional(),
19
+ invoice_allocations: z
20
+ .union([
21
+ z.array(CreatePaymentVoucherInvoiceAllocationsItemSchema.optional()),
22
+ CreatePaymentVoucherInvoiceAllocationsSchema,
23
+ ])
24
+ .optional(),
17
25
  });
18
26
  export { CreatePaymentVoucherBodySchema };
19
27
  //PaymentVoucher.payment_vouchersForInvoice
20
28
  const PaymentVouchersforinvoicePaymentVoucherStatusSchema = z.object({
21
29
  is: z.enum(['active', 'consumed', 'expired', 'failure']).optional(),
22
30
  is_not: z.enum(['active', 'consumed', 'expired', 'failure']).optional(),
23
- in: z.enum(['active', 'consumed', 'expired', 'failure']).optional(),
24
- not_in: z.enum(['active', 'consumed', 'expired', 'failure']).optional(),
31
+ in: z
32
+ .union([
33
+ z.array(z.enum(['active', 'consumed', 'expired', 'failure']).optional()),
34
+ z.enum(['active', 'consumed', 'expired', 'failure']),
35
+ ])
36
+ .optional(),
37
+ not_in: z
38
+ .union([
39
+ z.array(z.enum(['active', 'consumed', 'expired', 'failure']).optional()),
40
+ z.enum(['active', 'consumed', 'expired', 'failure']),
41
+ ])
42
+ .optional(),
25
43
  });
26
44
  const PaymentVouchersforinvoicePaymentVoucherSortBySchema = z.looseObject({
27
45
  asc: z.enum(['date', 'updated_at']).optional(),
@@ -38,8 +56,18 @@ export { PaymentVouchersforinvoicePaymentVoucherBodySchema };
38
56
  const PaymentVouchersforcustomerPaymentVoucherStatusSchema = z.object({
39
57
  is: z.enum(['active', 'consumed', 'expired', 'failure']).optional(),
40
58
  is_not: z.enum(['active', 'consumed', 'expired', 'failure']).optional(),
41
- in: z.enum(['active', 'consumed', 'expired', 'failure']).optional(),
42
- not_in: z.enum(['active', 'consumed', 'expired', 'failure']).optional(),
59
+ in: z
60
+ .union([
61
+ z.array(z.enum(['active', 'consumed', 'expired', 'failure']).optional()),
62
+ z.enum(['active', 'consumed', 'expired', 'failure']),
63
+ ])
64
+ .optional(),
65
+ not_in: z
66
+ .union([
67
+ z.array(z.enum(['active', 'consumed', 'expired', 'failure']).optional()),
68
+ z.enum(['active', 'consumed', 'expired', 'failure']),
69
+ ])
70
+ .optional(),
43
71
  });
44
72
  const PaymentVouchersforcustomerPaymentVoucherSortBySchema = z.looseObject({
45
73
  asc: z.enum(['date', 'updated_at']).optional(),