chargebee 3.33.0 → 3.34.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 +190 -0
- package/cjs/environment.js +1 -1
- package/cjs/resources/api_endpoints.js +323 -2
- package/cjs/resources/webhook/eventType.js +14 -0
- package/cjs/schema/business_rule.schema.js +54 -0
- package/cjs/schema/business_ruleset.schema.js +68 -0
- package/cjs/schema/card.schema.js +3 -1
- package/cjs/schema/credit_note.schema.js +10 -4
- package/cjs/schema/customer.schema.js +81 -10
- package/cjs/schema/dispute.schema.js +104 -0
- package/cjs/schema/einvoice.schema.js +37 -0
- package/cjs/schema/email_log.schema.js +28 -0
- package/cjs/schema/estimate.schema.js +35 -6
- package/cjs/schema/event.schema.js +56 -0
- package/cjs/schema/export.schema.js +68 -12
- package/cjs/schema/feature.schema.js +2 -2
- package/cjs/schema/gift.schema.js +26 -0
- package/cjs/schema/hosted_page.schema.js +24 -4
- package/cjs/schema/index.js +6 -0
- package/cjs/schema/invoice.schema.js +74 -10
- package/cjs/schema/ledger_operation.schema.js +4 -0
- package/cjs/schema/meter.schema.js +1 -1
- package/cjs/schema/metered_feature.schema.js +1 -1
- package/cjs/schema/omnichannel_subscription.schema.js +4 -4
- package/cjs/schema/payment_intent.schema.js +27 -0
- package/cjs/schema/payment_schedule.schema.js +36 -0
- package/cjs/schema/payment_schedule_scheme.schema.js +23 -2
- package/cjs/schema/payment_source.schema.js +103 -1
- package/cjs/schema/pricing_page_session.schema.js +1 -0
- package/cjs/schema/promotional_grant.schema.js +2 -0
- package/cjs/schema/purchase.schema.js +14 -1
- package/cjs/schema/ramp.schema.js +8 -0
- package/cjs/schema/subscription.schema.js +175 -12
- package/cjs/schema/transaction.schema.js +60 -2
- package/cjs/schema/webhook_endpoint.schema.js +28 -0
- package/esm/environment.js +1 -1
- package/esm/resources/api_endpoints.js +323 -2
- package/esm/resources/webhook/eventType.js +14 -0
- package/esm/schema/business_rule.schema.js +51 -0
- package/esm/schema/business_ruleset.schema.js +65 -0
- package/esm/schema/card.schema.js +3 -1
- package/esm/schema/credit_note.schema.js +10 -4
- package/esm/schema/customer.schema.js +81 -10
- package/esm/schema/dispute.schema.js +101 -0
- package/esm/schema/einvoice.schema.js +34 -0
- package/esm/schema/email_log.schema.js +25 -0
- package/esm/schema/estimate.schema.js +35 -6
- package/esm/schema/event.schema.js +56 -0
- package/esm/schema/export.schema.js +68 -12
- package/esm/schema/feature.schema.js +2 -2
- package/esm/schema/gift.schema.js +26 -0
- package/esm/schema/hosted_page.schema.js +24 -4
- package/esm/schema/index.js +6 -0
- package/esm/schema/invoice.schema.js +74 -10
- package/esm/schema/ledger_operation.schema.js +4 -0
- package/esm/schema/meter.schema.js +1 -1
- package/esm/schema/metered_feature.schema.js +1 -1
- package/esm/schema/omnichannel_subscription.schema.js +4 -4
- package/esm/schema/payment_intent.schema.js +27 -0
- package/esm/schema/payment_schedule.schema.js +33 -0
- package/esm/schema/payment_schedule_scheme.schema.js +22 -1
- package/esm/schema/payment_source.schema.js +103 -1
- package/esm/schema/pricing_page_session.schema.js +1 -0
- package/esm/schema/promotional_grant.schema.js +2 -0
- package/esm/schema/purchase.schema.js +14 -1
- package/esm/schema/ramp.schema.js +8 -0
- package/esm/schema/subscription.schema.js +175 -12
- package/esm/schema/transaction.schema.js +60 -2
- package/esm/schema/webhook_endpoint.schema.js +28 -0
- package/package.json +1 -1
- package/types/core.d.ts +86 -8
- package/types/index.d.ts +15 -0
- package/types/resources/AppliedBusinessRule.d.ts +15 -0
- package/types/resources/AppliedRule.d.ts +14 -0
- package/types/resources/ApplyRule.d.ts +28 -0
- package/types/resources/BusinessRule.d.ts +161 -0
- package/types/resources/BusinessRuleset.d.ts +165 -0
- package/types/resources/BusinessRulesetRule.d.ts +9 -0
- package/types/resources/Card.d.ts +1 -1
- package/types/resources/Content.d.ts +9 -0
- package/types/resources/CreditNote.d.ts +12 -0
- package/types/resources/CustomDataSchema.d.ts +15 -0
- package/types/resources/Customer.d.ts +42 -5
- package/types/resources/Dispute.d.ts +65 -0
- package/types/resources/Einvoice.d.ts +64 -1
- package/types/resources/EmailLog.d.ts +45 -0
- package/types/resources/Estimate.d.ts +31 -2
- package/types/resources/Event.d.ts +15 -0
- package/types/resources/Gift.d.ts +28 -2
- package/types/resources/GrantBlock.d.ts +26 -7
- package/types/resources/HostedPage.d.ts +11 -0
- package/types/resources/Invoice.d.ts +42 -4
- package/types/resources/LedgerEntry.d.ts +4 -4
- package/types/resources/LedgerOperation.d.ts +15 -8
- package/types/resources/OmnichannelSubscriptionItem.d.ts +5 -1
- package/types/resources/PaymentIntent.d.ts +72 -5
- package/types/resources/PaymentSchedule.d.ts +38 -1
- package/types/resources/PaymentScheduleEstimate.d.ts +1 -0
- package/types/resources/PaymentScheduleScheme.d.ts +17 -1
- package/types/resources/PaymentSource.d.ts +31 -2
- package/types/resources/PricingPageSession.d.ts +1 -0
- package/types/resources/PromotionalGrant.d.ts +2 -0
- package/types/resources/Purchase.d.ts +14 -1
- package/types/resources/QuotedSubscription.d.ts +1 -0
- package/types/resources/Ramp.d.ts +12 -0
- package/types/resources/Subscription.d.ts +110 -11
- package/types/resources/ThirdPartyPaymentMethod.d.ts +1 -0
- package/types/resources/Transaction.d.ts +5 -0
- package/types/resources/WebhookEvent.d.ts +70 -0
|
@@ -67,6 +67,7 @@ const CreateCustomerCardSchema = z.object({
|
|
|
67
67
|
'tempus',
|
|
68
68
|
'moyasar',
|
|
69
69
|
'payway',
|
|
70
|
+
'payu',
|
|
70
71
|
])
|
|
71
72
|
.optional(),
|
|
72
73
|
gateway_account_id: z.string().max(50).optional(),
|
|
@@ -78,7 +79,7 @@ const CreateCustomerCardSchema = z.object({
|
|
|
78
79
|
expiry_year: z.number().int().optional(),
|
|
79
80
|
cvv: z.string().max(520).optional(),
|
|
80
81
|
preferred_scheme: z
|
|
81
|
-
.enum(['cartes_bancaires', 'mastercard', 'visa'])
|
|
82
|
+
.enum(['cartes_bancaires', 'mastercard', 'visa', 'dankort'])
|
|
82
83
|
.optional(),
|
|
83
84
|
billing_addr1: z.string().max(150).optional(),
|
|
84
85
|
billing_addr2: z.string().max(150).optional(),
|
|
@@ -169,6 +170,19 @@ const CreateCustomerPaymentMethodSchema = z.object({
|
|
|
169
170
|
'touch_n_go',
|
|
170
171
|
'tamara',
|
|
171
172
|
'qpay',
|
|
173
|
+
'ovo',
|
|
174
|
+
'momo',
|
|
175
|
+
'mercado_pago',
|
|
176
|
+
'nequi',
|
|
177
|
+
'nupay',
|
|
178
|
+
'picpay',
|
|
179
|
+
'thai_qr',
|
|
180
|
+
'blik',
|
|
181
|
+
'fpx',
|
|
182
|
+
'wero',
|
|
183
|
+
'p24',
|
|
184
|
+
'affirm_pay',
|
|
185
|
+
'rakuten_pay',
|
|
172
186
|
])
|
|
173
187
|
.optional(),
|
|
174
188
|
gateway: z
|
|
@@ -232,6 +246,7 @@ const CreateCustomerPaymentMethodSchema = z.object({
|
|
|
232
246
|
'tempus',
|
|
233
247
|
'moyasar',
|
|
234
248
|
'payway',
|
|
249
|
+
'payu',
|
|
235
250
|
])
|
|
236
251
|
.optional(),
|
|
237
252
|
gateway_account_id: z.string().max(50).optional(),
|
|
@@ -298,6 +313,19 @@ const CreateCustomerPaymentIntentSchema = z.object({
|
|
|
298
313
|
'touch_n_go',
|
|
299
314
|
'tamara',
|
|
300
315
|
'qpay',
|
|
316
|
+
'ovo',
|
|
317
|
+
'momo',
|
|
318
|
+
'mercado_pago',
|
|
319
|
+
'nequi',
|
|
320
|
+
'nupay',
|
|
321
|
+
'picpay',
|
|
322
|
+
'thai_qr',
|
|
323
|
+
'blik',
|
|
324
|
+
'fpx',
|
|
325
|
+
'wero',
|
|
326
|
+
'p24',
|
|
327
|
+
'affirm_pay',
|
|
328
|
+
'rakuten_pay',
|
|
301
329
|
])
|
|
302
330
|
.optional(),
|
|
303
331
|
reference_id: z.string().max(65000).optional(),
|
|
@@ -333,7 +361,7 @@ const CreateCustomerBodySchema = z.looseObject({
|
|
|
333
361
|
registered_for_gst: z.boolean().optional(),
|
|
334
362
|
is_einvoice_enabled: z.boolean().optional(),
|
|
335
363
|
einvoicing_method: z.enum(['automatic', 'manual', 'site_default']).optional(),
|
|
336
|
-
taxability: z.enum(['taxable', 'exempt']).optional(),
|
|
364
|
+
taxability: z.enum(['taxable', 'exempt', 'zero_rated']).optional(),
|
|
337
365
|
exemption_details: z.array(z.string().optional()).optional(),
|
|
338
366
|
customer_type: z
|
|
339
367
|
.enum(['residential', 'business', 'senior_citizen', 'industrial'])
|
|
@@ -390,6 +418,7 @@ const CreateCustomerBodySchema = z.looseObject({
|
|
|
390
418
|
consolidated_invoicing: z.boolean().optional(),
|
|
391
419
|
token_id: z.string().max(40).optional(),
|
|
392
420
|
business_entity_id: z.string().max(50).optional(),
|
|
421
|
+
brand_id: z.string().max(50).optional(),
|
|
393
422
|
created_from_ip: z.string().max(50).optional(),
|
|
394
423
|
invoice_notes: z.string().max(2000).optional(),
|
|
395
424
|
card: CreateCustomerCardSchema.optional(),
|
|
@@ -446,10 +475,10 @@ const ListCustomerAutoCollectionSchema = z.object({
|
|
|
446
475
|
not_in: z.enum(['on', 'off']).optional(),
|
|
447
476
|
});
|
|
448
477
|
const ListCustomerTaxabilitySchema = z.object({
|
|
449
|
-
is: z.enum(['taxable', 'exempt']).optional(),
|
|
450
|
-
is_not: z.enum(['taxable', 'exempt']).optional(),
|
|
451
|
-
in: z.enum(['taxable', 'exempt']).optional(),
|
|
452
|
-
not_in: z.enum(['taxable', 'exempt']).optional(),
|
|
478
|
+
is: z.enum(['taxable', 'exempt', 'zero_rated']).optional(),
|
|
479
|
+
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(),
|
|
453
482
|
});
|
|
454
483
|
const ListCustomerCreatedAtSchema = z.object({
|
|
455
484
|
after: z.string().regex(RegExp('^\\d{10}$')).optional(),
|
|
@@ -608,7 +637,7 @@ const UpdateCustomerBodySchema = z.looseObject({
|
|
|
608
637
|
auto_collection: z.enum(['on', 'off']).optional(),
|
|
609
638
|
allow_direct_debit: z.boolean().default(false).optional(),
|
|
610
639
|
net_term_days: z.number().int().optional(),
|
|
611
|
-
taxability: z.enum(['taxable', 'exempt']).optional(),
|
|
640
|
+
taxability: z.enum(['taxable', 'exempt', 'zero_rated']).optional(),
|
|
612
641
|
exemption_details: z.array(z.string().optional()).optional(),
|
|
613
642
|
customer_type: z
|
|
614
643
|
.enum(['residential', 'business', 'senior_citizen', 'industrial'])
|
|
@@ -724,6 +753,19 @@ const UpdatePaymentMethodCustomerPaymentMethodSchema = z.object({
|
|
|
724
753
|
'touch_n_go',
|
|
725
754
|
'tamara',
|
|
726
755
|
'qpay',
|
|
756
|
+
'ovo',
|
|
757
|
+
'momo',
|
|
758
|
+
'mercado_pago',
|
|
759
|
+
'nequi',
|
|
760
|
+
'nupay',
|
|
761
|
+
'picpay',
|
|
762
|
+
'thai_qr',
|
|
763
|
+
'blik',
|
|
764
|
+
'fpx',
|
|
765
|
+
'wero',
|
|
766
|
+
'p24',
|
|
767
|
+
'affirm_pay',
|
|
768
|
+
'rakuten_pay',
|
|
727
769
|
]),
|
|
728
770
|
gateway: z
|
|
729
771
|
.enum([
|
|
@@ -786,6 +828,7 @@ const UpdatePaymentMethodCustomerPaymentMethodSchema = z.object({
|
|
|
786
828
|
'tempus',
|
|
787
829
|
'moyasar',
|
|
788
830
|
'payway',
|
|
831
|
+
'payu',
|
|
789
832
|
])
|
|
790
833
|
.optional(),
|
|
791
834
|
gateway_account_id: z.string().max(50).optional(),
|
|
@@ -944,10 +987,12 @@ const RecordExcessPaymentCustomerTransactionSchema = z.object({
|
|
|
944
987
|
'app_store',
|
|
945
988
|
'play_store',
|
|
946
989
|
'custom',
|
|
947
|
-
'dana',
|
|
948
|
-
'touch_n_go',
|
|
949
990
|
'tamara',
|
|
950
991
|
'qpay',
|
|
992
|
+
'blik',
|
|
993
|
+
'fpx',
|
|
994
|
+
'wero',
|
|
995
|
+
'p24',
|
|
951
996
|
]),
|
|
952
997
|
reference_number: z.string().max(100).optional(),
|
|
953
998
|
custom_payment_method_id: z.string().max(50).optional(),
|
|
@@ -1016,6 +1061,19 @@ const CollectPaymentCustomerPaymentMethodSchema = z.object({
|
|
|
1016
1061
|
'touch_n_go',
|
|
1017
1062
|
'tamara',
|
|
1018
1063
|
'qpay',
|
|
1064
|
+
'ovo',
|
|
1065
|
+
'momo',
|
|
1066
|
+
'mercado_pago',
|
|
1067
|
+
'nequi',
|
|
1068
|
+
'nupay',
|
|
1069
|
+
'picpay',
|
|
1070
|
+
'thai_qr',
|
|
1071
|
+
'blik',
|
|
1072
|
+
'fpx',
|
|
1073
|
+
'wero',
|
|
1074
|
+
'p24',
|
|
1075
|
+
'affirm_pay',
|
|
1076
|
+
'rakuten_pay',
|
|
1019
1077
|
])
|
|
1020
1078
|
.optional(),
|
|
1021
1079
|
gateway_account_id: z.string().max(50).optional(),
|
|
@@ -1032,7 +1090,7 @@ const CollectPaymentCustomerCardSchema = z.object({
|
|
|
1032
1090
|
expiry_year: z.number().int().optional(),
|
|
1033
1091
|
cvv: z.string().max(520).optional(),
|
|
1034
1092
|
preferred_scheme: z
|
|
1035
|
-
.enum(['cartes_bancaires', 'mastercard', 'visa'])
|
|
1093
|
+
.enum(['cartes_bancaires', 'mastercard', 'visa', 'dankort'])
|
|
1036
1094
|
.optional(),
|
|
1037
1095
|
billing_addr1: z.string().max(150).optional(),
|
|
1038
1096
|
billing_addr2: z.string().max(150).optional(),
|
|
@@ -1101,6 +1159,19 @@ const CollectPaymentCustomerPaymentIntentSchema = z.object({
|
|
|
1101
1159
|
'touch_n_go',
|
|
1102
1160
|
'tamara',
|
|
1103
1161
|
'qpay',
|
|
1162
|
+
'ovo',
|
|
1163
|
+
'momo',
|
|
1164
|
+
'mercado_pago',
|
|
1165
|
+
'nequi',
|
|
1166
|
+
'nupay',
|
|
1167
|
+
'picpay',
|
|
1168
|
+
'thai_qr',
|
|
1169
|
+
'blik',
|
|
1170
|
+
'fpx',
|
|
1171
|
+
'wero',
|
|
1172
|
+
'p24',
|
|
1173
|
+
'affirm_pay',
|
|
1174
|
+
'rakuten_pay',
|
|
1104
1175
|
])
|
|
1105
1176
|
.optional(),
|
|
1106
1177
|
gw_payment_method_id: z.string().max(65000).optional(),
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
// Generated Zod schemas: Dispute
|
|
2
|
+
// Actions: list
|
|
3
|
+
// Do not edit manually – regenerate via sdk-generator
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
//Dispute.list
|
|
6
|
+
const ListDisputeIdSchema = z.object({
|
|
7
|
+
is: z.string().min(1).optional(),
|
|
8
|
+
is_not: z.string().min(1).optional(),
|
|
9
|
+
starts_with: z.string().min(1).optional(),
|
|
10
|
+
in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
|
|
11
|
+
not_in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
|
|
12
|
+
});
|
|
13
|
+
const ListDisputeStatusSchema = z.object({
|
|
14
|
+
is: z
|
|
15
|
+
.enum([
|
|
16
|
+
'initiated',
|
|
17
|
+
'funds_withdrawn',
|
|
18
|
+
'in_review',
|
|
19
|
+
'cancelled',
|
|
20
|
+
'lost',
|
|
21
|
+
'won',
|
|
22
|
+
])
|
|
23
|
+
.optional(),
|
|
24
|
+
is_not: z
|
|
25
|
+
.enum([
|
|
26
|
+
'initiated',
|
|
27
|
+
'funds_withdrawn',
|
|
28
|
+
'in_review',
|
|
29
|
+
'cancelled',
|
|
30
|
+
'lost',
|
|
31
|
+
'won',
|
|
32
|
+
])
|
|
33
|
+
.optional(),
|
|
34
|
+
in: z
|
|
35
|
+
.enum([
|
|
36
|
+
'initiated',
|
|
37
|
+
'funds_withdrawn',
|
|
38
|
+
'in_review',
|
|
39
|
+
'cancelled',
|
|
40
|
+
'lost',
|
|
41
|
+
'won',
|
|
42
|
+
])
|
|
43
|
+
.optional(),
|
|
44
|
+
not_in: z
|
|
45
|
+
.enum([
|
|
46
|
+
'initiated',
|
|
47
|
+
'funds_withdrawn',
|
|
48
|
+
'in_review',
|
|
49
|
+
'cancelled',
|
|
50
|
+
'lost',
|
|
51
|
+
'won',
|
|
52
|
+
])
|
|
53
|
+
.optional(),
|
|
54
|
+
});
|
|
55
|
+
const ListDisputeTypeSchema = z.object({
|
|
56
|
+
is: z.enum(['chargeback', 'inquiry']).optional(),
|
|
57
|
+
is_not: z.enum(['chargeback', 'inquiry']).optional(),
|
|
58
|
+
in: z.enum(['chargeback', 'inquiry']).optional(),
|
|
59
|
+
not_in: z.enum(['chargeback', 'inquiry']).optional(),
|
|
60
|
+
});
|
|
61
|
+
const ListDisputeCustomerIdSchema = z.object({
|
|
62
|
+
is: z.string().min(1).optional(),
|
|
63
|
+
is_not: z.string().min(1).optional(),
|
|
64
|
+
starts_with: z.string().min(1).optional(),
|
|
65
|
+
in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
|
|
66
|
+
not_in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
|
|
67
|
+
});
|
|
68
|
+
const ListDisputeTransactionIdSchema = z.object({
|
|
69
|
+
is: z.string().min(1).optional(),
|
|
70
|
+
is_not: z.string().min(1).optional(),
|
|
71
|
+
starts_with: z.string().min(1).optional(),
|
|
72
|
+
in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
|
|
73
|
+
not_in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
|
|
74
|
+
});
|
|
75
|
+
const ListDisputeAmountSchema = z.object({
|
|
76
|
+
is: z.string().regex(RegExp('^-?\\d+$')).optional(),
|
|
77
|
+
is_not: z.string().regex(RegExp('^-?\\d+$')).optional(),
|
|
78
|
+
lt: z.string().regex(RegExp('^-?\\d+$')).optional(),
|
|
79
|
+
lte: z.string().regex(RegExp('^-?\\d+$')).optional(),
|
|
80
|
+
gt: z.string().regex(RegExp('^-?\\d+$')).optional(),
|
|
81
|
+
gte: z.string().regex(RegExp('^-?\\d+$')).optional(),
|
|
82
|
+
between: z.string().regex(RegExp('^\\[-?\\d+,-?\\d+\\]$')).optional(),
|
|
83
|
+
});
|
|
84
|
+
const ListDisputeCreatedAtSchema = z.object({
|
|
85
|
+
after: z.string().regex(RegExp('^\\d{10}$')).optional(),
|
|
86
|
+
before: z.string().regex(RegExp('^\\d{10}$')).optional(),
|
|
87
|
+
on: z.string().regex(RegExp('^\\d{10}$')).optional(),
|
|
88
|
+
between: z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
|
|
89
|
+
});
|
|
90
|
+
const ListDisputeBodySchema = z.looseObject({
|
|
91
|
+
limit: z.number().int().min(1).max(100).optional(),
|
|
92
|
+
offset: z.string().max(1000).optional(),
|
|
93
|
+
id: ListDisputeIdSchema.optional(),
|
|
94
|
+
status: ListDisputeStatusSchema.optional(),
|
|
95
|
+
type: ListDisputeTypeSchema.optional(),
|
|
96
|
+
customer_id: ListDisputeCustomerIdSchema.optional(),
|
|
97
|
+
transaction_id: ListDisputeTransactionIdSchema.optional(),
|
|
98
|
+
amount: ListDisputeAmountSchema.optional(),
|
|
99
|
+
created_at: ListDisputeCreatedAtSchema.optional(),
|
|
100
|
+
});
|
|
101
|
+
export { ListDisputeBodySchema };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// Generated Zod schemas: Einvoice
|
|
2
|
+
// Actions: listEinvoices
|
|
3
|
+
// Do not edit manually – regenerate via sdk-generator
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
//Einvoice.listEinvoices
|
|
6
|
+
const ListEinvoicesEinvoiceIdSchema = z.object({
|
|
7
|
+
is: z.string().min(1).optional(),
|
|
8
|
+
in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
|
|
9
|
+
});
|
|
10
|
+
const ListEinvoicesEinvoiceReferenceIdSchema = z.object({
|
|
11
|
+
is: z.string().min(1).optional(),
|
|
12
|
+
in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
|
|
13
|
+
});
|
|
14
|
+
const ListEinvoicesEinvoiceUpdatedAtSchema = z.object({
|
|
15
|
+
after: z.string().regex(RegExp('^\\d{10}$')).optional(),
|
|
16
|
+
before: z.string().regex(RegExp('^\\d{10}$')).optional(),
|
|
17
|
+
on: z.string().regex(RegExp('^\\d{10}$')).optional(),
|
|
18
|
+
between: z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
|
|
19
|
+
});
|
|
20
|
+
const ListEinvoicesEinvoiceSortBySchema = z.looseObject({
|
|
21
|
+
asc: z.enum(['updated_at']).optional(),
|
|
22
|
+
desc: z.enum(['updated_at']).optional(),
|
|
23
|
+
});
|
|
24
|
+
const ListEinvoicesEinvoiceBodySchema = z.looseObject({
|
|
25
|
+
limit: z.number().int().min(1).max(100).optional(),
|
|
26
|
+
offset: z.string().max(1000).optional(),
|
|
27
|
+
id: ListEinvoicesEinvoiceIdSchema.optional(),
|
|
28
|
+
reference_id: ListEinvoicesEinvoiceReferenceIdSchema.optional(),
|
|
29
|
+
updated_at: ListEinvoicesEinvoiceUpdatedAtSchema.optional(),
|
|
30
|
+
sort_by: ListEinvoicesEinvoiceSortBySchema.optional(),
|
|
31
|
+
invoice_id: z.string().max(50).optional(),
|
|
32
|
+
credit_note_id: z.string().max(50).optional(),
|
|
33
|
+
});
|
|
34
|
+
export { ListEinvoicesEinvoiceBodySchema };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// Generated Zod schemas: EmailLog
|
|
2
|
+
// Actions: emailLogsForCustomer
|
|
3
|
+
// Do not edit manually – regenerate via sdk-generator
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
//EmailLog.emailLogsForCustomer
|
|
6
|
+
const EmailLogsForCustomerEmailLogSentOnSchema = z.object({
|
|
7
|
+
after: z.string().regex(RegExp('^\\d{10}$')).optional(),
|
|
8
|
+
before: z.string().regex(RegExp('^\\d{10}$')).optional(),
|
|
9
|
+
on: z.string().regex(RegExp('^\\d{10}$')).optional(),
|
|
10
|
+
between: z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
|
|
11
|
+
});
|
|
12
|
+
const EmailLogsForCustomerEmailLogBusinessEntityIdSchema = z.object({
|
|
13
|
+
is: z.string().min(1).optional(),
|
|
14
|
+
});
|
|
15
|
+
const EmailLogsForCustomerEmailLogBrandIdSchema = z.object({
|
|
16
|
+
is: z.string().min(1).optional(),
|
|
17
|
+
});
|
|
18
|
+
const EmailLogsForCustomerEmailLogBodySchema = z.looseObject({
|
|
19
|
+
limit: z.number().int().min(1).max(100).optional(),
|
|
20
|
+
offset: z.string().max(1000).optional(),
|
|
21
|
+
sent_on: EmailLogsForCustomerEmailLogSentOnSchema.optional(),
|
|
22
|
+
business_entity_id: EmailLogsForCustomerEmailLogBusinessEntityIdSchema.optional(),
|
|
23
|
+
brand_id: EmailLogsForCustomerEmailLogBrandIdSchema.optional(),
|
|
24
|
+
});
|
|
25
|
+
export { EmailLogsForCustomerEmailLogBodySchema };
|
|
@@ -76,7 +76,7 @@ const CreateSubscriptionEstimateCustomerSchema = z.object({
|
|
|
76
76
|
vat_number: z.string().max(20).optional(),
|
|
77
77
|
vat_number_prefix: z.string().max(10).optional(),
|
|
78
78
|
registered_for_gst: z.boolean().optional(),
|
|
79
|
-
taxability: z.enum(['taxable', 'exempt']).optional(),
|
|
79
|
+
taxability: z.enum(['taxable', 'exempt', 'zero_rated']).optional(),
|
|
80
80
|
entity_code: z
|
|
81
81
|
.enum([
|
|
82
82
|
'a',
|
|
@@ -237,7 +237,7 @@ const CreateSubItemEstimateEstimateCustomerSchema = z.object({
|
|
|
237
237
|
vat_number: z.string().max(20).optional(),
|
|
238
238
|
vat_number_prefix: z.string().max(10).optional(),
|
|
239
239
|
registered_for_gst: z.boolean().optional(),
|
|
240
|
-
taxability: z.enum(['taxable', 'exempt']).optional(),
|
|
240
|
+
taxability: z.enum(['taxable', 'exempt', 'zero_rated']).optional(),
|
|
241
241
|
entity_code: z
|
|
242
242
|
.enum([
|
|
243
243
|
'a',
|
|
@@ -296,6 +296,7 @@ const CreateSubItemEstimateEstimateSubscriptionItemsSchema = z.object({
|
|
|
296
296
|
.optional(),
|
|
297
297
|
charge_once: z.array(z.boolean().optional()).optional(),
|
|
298
298
|
item_type: z.array(z.enum(['plan', 'addon', 'charge']).optional()).optional(),
|
|
299
|
+
description: z.array(z.string().max(500).optional()).optional(),
|
|
299
300
|
charge_on_option: z
|
|
300
301
|
.array(z.enum(['immediately', 'on_event']).optional())
|
|
301
302
|
.optional(),
|
|
@@ -563,6 +564,7 @@ const CreateSubItemForCustomerEstimateEstimateSubscriptionItemsSchema = z.object
|
|
|
563
564
|
item_type: z
|
|
564
565
|
.array(z.enum(['plan', 'addon', 'charge']).optional())
|
|
565
566
|
.optional(),
|
|
567
|
+
description: z.array(z.string().max(500).optional()).optional(),
|
|
566
568
|
charge_on_option: z
|
|
567
569
|
.array(z.enum(['immediately', 'on_event']).optional())
|
|
568
570
|
.optional(),
|
|
@@ -683,7 +685,7 @@ const UpdateSubscriptionEstimateCustomerSchema = z.object({
|
|
|
683
685
|
vat_number: z.string().max(20).optional(),
|
|
684
686
|
vat_number_prefix: z.string().max(10).optional(),
|
|
685
687
|
registered_for_gst: z.boolean().optional(),
|
|
686
|
-
taxability: z.enum(['taxable', 'exempt']).optional(),
|
|
688
|
+
taxability: z.enum(['taxable', 'exempt', 'zero_rated']).optional(),
|
|
687
689
|
});
|
|
688
690
|
const UpdateSubscriptionEstimateAddonsSchema = z.object({
|
|
689
691
|
id: z.array(z.string().max(100).optional()).optional(),
|
|
@@ -815,7 +817,7 @@ const UpdateSubscriptionForItemsEstimateCustomerSchema = z.object({
|
|
|
815
817
|
vat_number: z.string().max(20).optional(),
|
|
816
818
|
vat_number_prefix: z.string().max(10).optional(),
|
|
817
819
|
registered_for_gst: z.boolean().optional(),
|
|
818
|
-
taxability: z.enum(['taxable', 'exempt']).optional(),
|
|
820
|
+
taxability: z.enum(['taxable', 'exempt', 'zero_rated']).optional(),
|
|
819
821
|
});
|
|
820
822
|
const UpdateSubscriptionForItemsEstimateBillingOverrideSchema = z.object({
|
|
821
823
|
max_excess_payment_usage: z.number().int().min(-1).optional(),
|
|
@@ -848,6 +850,7 @@ const UpdateSubscriptionForItemsEstimateSubscriptionItemsSchema = z.object({
|
|
|
848
850
|
.array(z.enum(['immediately', 'on_event']).optional())
|
|
849
851
|
.optional(),
|
|
850
852
|
item_type: z.array(z.enum(['plan', 'addon', 'charge']).optional()).optional(),
|
|
853
|
+
description: z.array(z.string().max(500).optional()).optional(),
|
|
851
854
|
proration_type: z
|
|
852
855
|
.array(z.enum(['full_term', 'partial_term', 'none']).optional())
|
|
853
856
|
.optional(),
|
|
@@ -1159,6 +1162,19 @@ const GiftSubscriptionEstimatePaymentIntentSchema = z.object({
|
|
|
1159
1162
|
'touch_n_go',
|
|
1160
1163
|
'tamara',
|
|
1161
1164
|
'qpay',
|
|
1165
|
+
'ovo',
|
|
1166
|
+
'momo',
|
|
1167
|
+
'mercado_pago',
|
|
1168
|
+
'nequi',
|
|
1169
|
+
'nupay',
|
|
1170
|
+
'picpay',
|
|
1171
|
+
'thai_qr',
|
|
1172
|
+
'blik',
|
|
1173
|
+
'fpx',
|
|
1174
|
+
'wero',
|
|
1175
|
+
'p24',
|
|
1176
|
+
'affirm_pay',
|
|
1177
|
+
'rakuten_pay',
|
|
1162
1178
|
])
|
|
1163
1179
|
.optional(),
|
|
1164
1180
|
reference_id: z.string().max(65000).optional(),
|
|
@@ -1282,6 +1298,19 @@ const GiftSubscriptionForItemsEstimatePaymentIntentSchema = z.object({
|
|
|
1282
1298
|
'touch_n_go',
|
|
1283
1299
|
'tamara',
|
|
1284
1300
|
'qpay',
|
|
1301
|
+
'ovo',
|
|
1302
|
+
'momo',
|
|
1303
|
+
'mercado_pago',
|
|
1304
|
+
'nequi',
|
|
1305
|
+
'nupay',
|
|
1306
|
+
'picpay',
|
|
1307
|
+
'thai_qr',
|
|
1308
|
+
'blik',
|
|
1309
|
+
'fpx',
|
|
1310
|
+
'wero',
|
|
1311
|
+
'p24',
|
|
1312
|
+
'affirm_pay',
|
|
1313
|
+
'rakuten_pay',
|
|
1285
1314
|
])
|
|
1286
1315
|
.optional(),
|
|
1287
1316
|
reference_id: z.string().max(65000).optional(),
|
|
@@ -1459,7 +1488,7 @@ const CreateInvoiceForItemsEstimateItemPricesSchema = z.object({
|
|
|
1459
1488
|
date_from: z.array(z.number().int().optional()).optional(),
|
|
1460
1489
|
date_to: z.array(z.number().int().optional()).optional(),
|
|
1461
1490
|
description: z.array(z.string().max(250).optional()).optional(),
|
|
1462
|
-
entity_description: z.array(z.string().max(
|
|
1491
|
+
entity_description: z.array(z.string().max(2000).optional()).optional(),
|
|
1463
1492
|
});
|
|
1464
1493
|
const CreateInvoiceForItemsEstimateItemTiersSchema = z.object({
|
|
1465
1494
|
item_price_id: z.array(z.string().max(100).optional()).optional(),
|
|
@@ -1490,7 +1519,7 @@ const CreateInvoiceForItemsEstimateChargesSchema = z.object({
|
|
|
1490
1519
|
avalara_service_type: z.array(z.number().int().optional()).optional(),
|
|
1491
1520
|
date_from: z.array(z.number().int().optional()).optional(),
|
|
1492
1521
|
date_to: z.array(z.number().int().optional()).optional(),
|
|
1493
|
-
entity_description: z.array(z.string().max(
|
|
1522
|
+
entity_description: z.array(z.string().max(2000).optional()).optional(),
|
|
1494
1523
|
});
|
|
1495
1524
|
const CreateInvoiceForItemsEstimateNotesToRemoveSchema = z.object({
|
|
1496
1525
|
entity_type: z
|
|
@@ -125,6 +125,8 @@ const ListEventEventTypeSchema = z.object({
|
|
|
125
125
|
'credit_note_created_with_backdating',
|
|
126
126
|
'credit_note_updated',
|
|
127
127
|
'credit_note_deleted',
|
|
128
|
+
'einvoice_created',
|
|
129
|
+
'einvoice_updated',
|
|
128
130
|
'payment_schedules_created',
|
|
129
131
|
'payment_schedules_updated',
|
|
130
132
|
'payment_schedule_scheme_created',
|
|
@@ -295,9 +297,21 @@ const ListEventEventTypeSchema = z.object({
|
|
|
295
297
|
'grant_blocks_created',
|
|
296
298
|
'grant_blocks_updated',
|
|
297
299
|
'ledger_updated',
|
|
300
|
+
'business_rule_created',
|
|
301
|
+
'business_rule_updated',
|
|
302
|
+
'business_rule_activated',
|
|
303
|
+
'business_rule_deactivated',
|
|
304
|
+
'business_rule_deleted',
|
|
305
|
+
'business_rule_released',
|
|
298
306
|
'vault_token_created',
|
|
299
307
|
'vault_token_updated',
|
|
300
308
|
'vault_token_deleted',
|
|
309
|
+
'business_rules_applied',
|
|
310
|
+
'business_ruleset_created',
|
|
311
|
+
'business_ruleset_updated',
|
|
312
|
+
'business_ruleset_activated',
|
|
313
|
+
'business_ruleset_deactivated',
|
|
314
|
+
'business_ruleset_deleted',
|
|
301
315
|
])
|
|
302
316
|
.optional(),
|
|
303
317
|
is_not: z
|
|
@@ -360,6 +374,8 @@ const ListEventEventTypeSchema = z.object({
|
|
|
360
374
|
'credit_note_created_with_backdating',
|
|
361
375
|
'credit_note_updated',
|
|
362
376
|
'credit_note_deleted',
|
|
377
|
+
'einvoice_created',
|
|
378
|
+
'einvoice_updated',
|
|
363
379
|
'payment_schedules_created',
|
|
364
380
|
'payment_schedules_updated',
|
|
365
381
|
'payment_schedule_scheme_created',
|
|
@@ -530,9 +546,21 @@ const ListEventEventTypeSchema = z.object({
|
|
|
530
546
|
'grant_blocks_created',
|
|
531
547
|
'grant_blocks_updated',
|
|
532
548
|
'ledger_updated',
|
|
549
|
+
'business_rule_created',
|
|
550
|
+
'business_rule_updated',
|
|
551
|
+
'business_rule_activated',
|
|
552
|
+
'business_rule_deactivated',
|
|
553
|
+
'business_rule_deleted',
|
|
554
|
+
'business_rule_released',
|
|
533
555
|
'vault_token_created',
|
|
534
556
|
'vault_token_updated',
|
|
535
557
|
'vault_token_deleted',
|
|
558
|
+
'business_rules_applied',
|
|
559
|
+
'business_ruleset_created',
|
|
560
|
+
'business_ruleset_updated',
|
|
561
|
+
'business_ruleset_activated',
|
|
562
|
+
'business_ruleset_deactivated',
|
|
563
|
+
'business_ruleset_deleted',
|
|
536
564
|
])
|
|
537
565
|
.optional(),
|
|
538
566
|
in: z
|
|
@@ -595,6 +623,8 @@ const ListEventEventTypeSchema = z.object({
|
|
|
595
623
|
'credit_note_created_with_backdating',
|
|
596
624
|
'credit_note_updated',
|
|
597
625
|
'credit_note_deleted',
|
|
626
|
+
'einvoice_created',
|
|
627
|
+
'einvoice_updated',
|
|
598
628
|
'payment_schedules_created',
|
|
599
629
|
'payment_schedules_updated',
|
|
600
630
|
'payment_schedule_scheme_created',
|
|
@@ -765,9 +795,21 @@ const ListEventEventTypeSchema = z.object({
|
|
|
765
795
|
'grant_blocks_created',
|
|
766
796
|
'grant_blocks_updated',
|
|
767
797
|
'ledger_updated',
|
|
798
|
+
'business_rule_created',
|
|
799
|
+
'business_rule_updated',
|
|
800
|
+
'business_rule_activated',
|
|
801
|
+
'business_rule_deactivated',
|
|
802
|
+
'business_rule_deleted',
|
|
803
|
+
'business_rule_released',
|
|
768
804
|
'vault_token_created',
|
|
769
805
|
'vault_token_updated',
|
|
770
806
|
'vault_token_deleted',
|
|
807
|
+
'business_rules_applied',
|
|
808
|
+
'business_ruleset_created',
|
|
809
|
+
'business_ruleset_updated',
|
|
810
|
+
'business_ruleset_activated',
|
|
811
|
+
'business_ruleset_deactivated',
|
|
812
|
+
'business_ruleset_deleted',
|
|
771
813
|
])
|
|
772
814
|
.optional(),
|
|
773
815
|
not_in: z
|
|
@@ -830,6 +872,8 @@ const ListEventEventTypeSchema = z.object({
|
|
|
830
872
|
'credit_note_created_with_backdating',
|
|
831
873
|
'credit_note_updated',
|
|
832
874
|
'credit_note_deleted',
|
|
875
|
+
'einvoice_created',
|
|
876
|
+
'einvoice_updated',
|
|
833
877
|
'payment_schedules_created',
|
|
834
878
|
'payment_schedules_updated',
|
|
835
879
|
'payment_schedule_scheme_created',
|
|
@@ -1000,9 +1044,21 @@ const ListEventEventTypeSchema = z.object({
|
|
|
1000
1044
|
'grant_blocks_created',
|
|
1001
1045
|
'grant_blocks_updated',
|
|
1002
1046
|
'ledger_updated',
|
|
1047
|
+
'business_rule_created',
|
|
1048
|
+
'business_rule_updated',
|
|
1049
|
+
'business_rule_activated',
|
|
1050
|
+
'business_rule_deactivated',
|
|
1051
|
+
'business_rule_deleted',
|
|
1052
|
+
'business_rule_released',
|
|
1003
1053
|
'vault_token_created',
|
|
1004
1054
|
'vault_token_updated',
|
|
1005
1055
|
'vault_token_deleted',
|
|
1056
|
+
'business_rules_applied',
|
|
1057
|
+
'business_ruleset_created',
|
|
1058
|
+
'business_ruleset_updated',
|
|
1059
|
+
'business_ruleset_activated',
|
|
1060
|
+
'business_ruleset_deactivated',
|
|
1061
|
+
'business_ruleset_deleted',
|
|
1006
1062
|
])
|
|
1007
1063
|
.optional(),
|
|
1008
1064
|
});
|