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.
- package/CHANGELOG.md +65 -0
- package/cjs/environment.js +1 -1
- package/cjs/resources/api_endpoints.js +56 -0
- package/cjs/resources/webhook/eventType.js +2 -0
- package/cjs/schema/addon.schema.js +221 -40
- package/cjs/schema/alert.schema.js +17 -2
- package/cjs/schema/alert_status.schema.js +6 -1
- package/cjs/schema/attached_item.schema.js +101 -26
- package/cjs/schema/business_entity.schema.js +16 -5
- package/cjs/schema/business_rule.schema.js +2 -2
- package/cjs/schema/business_ruleset.schema.js +2 -2
- package/cjs/schema/comment.schema.js +15 -4
- package/cjs/schema/coupon.schema.js +218 -37
- package/cjs/schema/coupon_code.schema.js +36 -6
- package/cjs/schema/coupon_set.schema.js +108 -27
- package/cjs/schema/credit_note.schema.js +496 -105
- package/cjs/schema/credit_unit.schema.js +12 -2
- package/cjs/schema/customer.schema.js +212 -62
- package/cjs/schema/differential_price.schema.js +100 -12
- package/cjs/schema/dispute.schema.js +125 -33
- package/cjs/schema/einvoice.schema.js +27 -6
- package/cjs/schema/email_log.schema.js +15 -4
- package/cjs/schema/entitlement.schema.js +33 -4
- package/cjs/schema/entitlement_override.schema.js +17 -1
- package/cjs/schema/estimate.schema.js +581 -36
- package/cjs/schema/event.schema.js +1282 -633
- package/cjs/schema/export.schema.js +4459 -1412
- package/cjs/schema/feature.schema.js +73 -11
- package/cjs/schema/gateway_request_log.schema.js +309 -0
- package/cjs/schema/gateway_webhook_log.schema.js +257 -0
- package/cjs/schema/gift.schema.js +51 -5
- package/cjs/schema/grant_block.schema.js +45 -12
- package/cjs/schema/hosted_page.schema.js +562 -66
- package/cjs/schema/index.js +3 -0
- package/cjs/schema/invoice.schema.js +821 -121
- package/cjs/schema/item.schema.js +151 -28
- package/cjs/schema/item_entitlement.schema.js +23 -2
- package/cjs/schema/item_family.schema.js +29 -8
- package/cjs/schema/item_price.schema.js +263 -48
- package/cjs/schema/ledger_operation.schema.js +42 -15
- package/cjs/schema/metered_feature.schema.js +10 -1
- package/cjs/schema/omnichannel_one_time_order.schema.js +32 -2
- package/cjs/schema/omnichannel_subscription.schema.js +136 -30
- package/cjs/schema/order.schema.js +233 -61
- package/cjs/schema/organization_detail.schema.js +36 -0
- package/cjs/schema/payment_schedule.schema.js +39 -8
- package/cjs/schema/payment_schedule_scheme.schema.js +37 -7
- package/cjs/schema/payment_source.schema.js +360 -148
- package/cjs/schema/payment_voucher.schema.js +33 -5
- package/cjs/schema/plan.schema.js +345 -57
- package/cjs/schema/price_ramp.schema.js +79 -14
- package/cjs/schema/price_variant.schema.js +88 -18
- package/cjs/schema/pricing_page_session.schema.js +36 -2
- package/cjs/schema/promotional_credit.schema.js +27 -6
- package/cjs/schema/purchase.schema.js +204 -12
- package/cjs/schema/quote.schema.js +901 -81
- package/cjs/schema/quote_entitlement.schema.js +6 -2
- package/cjs/schema/ramp.schema.js +238 -24
- package/cjs/schema/site_migration_detail.schema.js +50 -16
- package/cjs/schema/subscription.schema.js +998 -169
- package/cjs/schema/subscription_entitlement.schema.js +9 -1
- package/cjs/schema/transaction.schema.js +780 -342
- package/cjs/schema/unbilled_charge.schema.js +141 -13
- package/cjs/schema/usage.schema.js +55 -12
- package/cjs/schema/usage_event.schema.js +13 -1
- package/cjs/schema/virtual_bank_account.schema.js +42 -10
- package/cjs/schema/webhook_endpoint.schema.js +4 -0
- package/esm/environment.js +1 -1
- package/esm/resources/api_endpoints.js +56 -0
- package/esm/resources/webhook/eventType.js +2 -0
- package/esm/schema/addon.schema.js +221 -40
- package/esm/schema/alert.schema.js +17 -2
- package/esm/schema/alert_status.schema.js +6 -1
- package/esm/schema/attached_item.schema.js +101 -26
- package/esm/schema/business_entity.schema.js +16 -5
- package/esm/schema/business_rule.schema.js +2 -2
- package/esm/schema/business_ruleset.schema.js +2 -2
- package/esm/schema/comment.schema.js +15 -4
- package/esm/schema/coupon.schema.js +218 -37
- package/esm/schema/coupon_code.schema.js +36 -6
- package/esm/schema/coupon_set.schema.js +108 -27
- package/esm/schema/credit_note.schema.js +496 -105
- package/esm/schema/credit_unit.schema.js +12 -2
- package/esm/schema/customer.schema.js +212 -62
- package/esm/schema/differential_price.schema.js +100 -12
- package/esm/schema/dispute.schema.js +125 -33
- package/esm/schema/einvoice.schema.js +27 -6
- package/esm/schema/email_log.schema.js +15 -4
- package/esm/schema/entitlement.schema.js +33 -4
- package/esm/schema/entitlement_override.schema.js +17 -1
- package/esm/schema/estimate.schema.js +581 -36
- package/esm/schema/event.schema.js +1282 -633
- package/esm/schema/export.schema.js +4459 -1412
- package/esm/schema/feature.schema.js +73 -11
- package/esm/schema/gateway_request_log.schema.js +306 -0
- package/esm/schema/gateway_webhook_log.schema.js +254 -0
- package/esm/schema/gift.schema.js +51 -5
- package/esm/schema/grant_block.schema.js +45 -12
- package/esm/schema/hosted_page.schema.js +562 -66
- package/esm/schema/index.js +3 -0
- package/esm/schema/invoice.schema.js +821 -121
- package/esm/schema/item.schema.js +151 -28
- package/esm/schema/item_entitlement.schema.js +23 -2
- package/esm/schema/item_family.schema.js +29 -8
- package/esm/schema/item_price.schema.js +263 -48
- package/esm/schema/ledger_operation.schema.js +42 -15
- package/esm/schema/metered_feature.schema.js +10 -1
- package/esm/schema/omnichannel_one_time_order.schema.js +32 -2
- package/esm/schema/omnichannel_subscription.schema.js +136 -30
- package/esm/schema/order.schema.js +233 -61
- package/esm/schema/organization_detail.schema.js +33 -0
- package/esm/schema/payment_schedule.schema.js +39 -8
- package/esm/schema/payment_schedule_scheme.schema.js +37 -7
- package/esm/schema/payment_source.schema.js +360 -148
- package/esm/schema/payment_voucher.schema.js +33 -5
- package/esm/schema/plan.schema.js +345 -57
- package/esm/schema/price_ramp.schema.js +79 -14
- package/esm/schema/price_variant.schema.js +88 -18
- package/esm/schema/pricing_page_session.schema.js +36 -2
- package/esm/schema/promotional_credit.schema.js +27 -6
- package/esm/schema/purchase.schema.js +204 -12
- package/esm/schema/quote.schema.js +901 -81
- package/esm/schema/quote_entitlement.schema.js +6 -2
- package/esm/schema/ramp.schema.js +238 -24
- package/esm/schema/site_migration_detail.schema.js +50 -16
- package/esm/schema/subscription.schema.js +998 -169
- package/esm/schema/subscription_entitlement.schema.js +9 -1
- package/esm/schema/transaction.schema.js +780 -342
- package/esm/schema/unbilled_charge.schema.js +141 -13
- package/esm/schema/usage.schema.js +55 -12
- package/esm/schema/usage_event.schema.js +13 -1
- package/esm/schema/virtual_bank_account.schema.js +42 -10
- package/esm/schema/webhook_endpoint.schema.js +4 -0
- package/package.json +1 -1
- package/types/core.d.ts +10 -6
- package/types/index.d.ts +8 -1
- package/types/resources/BillingLineItem.d.ts +10 -0
- package/types/resources/BillingMetadata.d.ts +9 -0
- package/types/resources/Content.d.ts +5 -0
- package/types/resources/Discount.d.ts +1 -0
- package/types/resources/DraftRequest.d.ts +1 -1
- package/types/resources/Estimate.d.ts +3 -0
- package/types/resources/Event.d.ts +2 -0
- package/types/resources/GatewayRequestLog.d.ts +82 -0
- package/types/resources/GatewayWebhookLog.d.ts +74 -0
- package/types/resources/GrantBlock.d.ts +5 -0
- package/types/resources/HostedPage.d.ts +18 -0
- package/types/resources/Invoice.d.ts +4 -0
- package/types/resources/OrganizationDetail.d.ts +84 -0
- package/types/resources/Subscription.d.ts +3 -0
- package/types/resources/Usage.d.ts +1 -0
- 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:
|
|
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
|
|
24
|
-
|
|
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
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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
|
|
460
|
-
|
|
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
|
-
.
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
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
|
-
.
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
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
|
-
.
|
|
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
|
-
.
|
|
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
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
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
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
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:
|
|
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
|
|
24
|
-
|
|
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
|
|
42
|
-
|
|
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(),
|