chargebee 3.32.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.
Files changed (113) hide show
  1. package/CHANGELOG.md +196 -0
  2. package/cjs/environment.js +1 -1
  3. package/cjs/resources/api_endpoints.js +323 -2
  4. package/cjs/resources/webhook/eventType.js +14 -0
  5. package/cjs/schema/business_rule.schema.js +54 -0
  6. package/cjs/schema/business_ruleset.schema.js +68 -0
  7. package/cjs/schema/card.schema.js +3 -1
  8. package/cjs/schema/credit_note.schema.js +10 -4
  9. package/cjs/schema/customer.schema.js +81 -10
  10. package/cjs/schema/dispute.schema.js +104 -0
  11. package/cjs/schema/einvoice.schema.js +37 -0
  12. package/cjs/schema/email_log.schema.js +28 -0
  13. package/cjs/schema/estimate.schema.js +38 -9
  14. package/cjs/schema/event.schema.js +56 -0
  15. package/cjs/schema/export.schema.js +68 -12
  16. package/cjs/schema/feature.schema.js +2 -2
  17. package/cjs/schema/gift.schema.js +27 -1
  18. package/cjs/schema/hosted_page.schema.js +26 -6
  19. package/cjs/schema/index.js +6 -0
  20. package/cjs/schema/invoice.schema.js +74 -10
  21. package/cjs/schema/ledger_operation.schema.js +4 -0
  22. package/cjs/schema/meter.schema.js +1 -1
  23. package/cjs/schema/metered_feature.schema.js +1 -1
  24. package/cjs/schema/payment_intent.schema.js +27 -0
  25. package/cjs/schema/payment_schedule.schema.js +36 -0
  26. package/cjs/schema/payment_schedule_scheme.schema.js +23 -2
  27. package/cjs/schema/payment_source.schema.js +103 -1
  28. package/cjs/schema/pricing_page_session.schema.js +1 -0
  29. package/cjs/schema/promotional_grant.schema.js +2 -0
  30. package/cjs/schema/purchase.schema.js +14 -1
  31. package/cjs/schema/quote.schema.js +2 -2
  32. package/cjs/schema/ramp.schema.js +8 -0
  33. package/cjs/schema/subscription.schema.js +179 -16
  34. package/cjs/schema/transaction.schema.js +60 -2
  35. package/cjs/schema/webhook_endpoint.schema.js +28 -0
  36. package/esm/environment.js +1 -1
  37. package/esm/resources/api_endpoints.js +323 -2
  38. package/esm/resources/webhook/eventType.js +14 -0
  39. package/esm/schema/business_rule.schema.js +51 -0
  40. package/esm/schema/business_ruleset.schema.js +65 -0
  41. package/esm/schema/card.schema.js +3 -1
  42. package/esm/schema/credit_note.schema.js +10 -4
  43. package/esm/schema/customer.schema.js +81 -10
  44. package/esm/schema/dispute.schema.js +101 -0
  45. package/esm/schema/einvoice.schema.js +34 -0
  46. package/esm/schema/email_log.schema.js +25 -0
  47. package/esm/schema/estimate.schema.js +38 -9
  48. package/esm/schema/event.schema.js +56 -0
  49. package/esm/schema/export.schema.js +68 -12
  50. package/esm/schema/feature.schema.js +2 -2
  51. package/esm/schema/gift.schema.js +27 -1
  52. package/esm/schema/hosted_page.schema.js +26 -6
  53. package/esm/schema/index.js +6 -0
  54. package/esm/schema/invoice.schema.js +74 -10
  55. package/esm/schema/ledger_operation.schema.js +4 -0
  56. package/esm/schema/meter.schema.js +1 -1
  57. package/esm/schema/metered_feature.schema.js +1 -1
  58. package/esm/schema/omnichannel_subscription.schema.js +1 -1
  59. package/esm/schema/payment_intent.schema.js +27 -0
  60. package/esm/schema/payment_schedule.schema.js +33 -0
  61. package/esm/schema/payment_schedule_scheme.schema.js +22 -1
  62. package/esm/schema/payment_source.schema.js +103 -1
  63. package/esm/schema/pricing_page_session.schema.js +1 -0
  64. package/esm/schema/promotional_grant.schema.js +2 -0
  65. package/esm/schema/purchase.schema.js +14 -1
  66. package/esm/schema/quote.schema.js +2 -2
  67. package/esm/schema/ramp.schema.js +8 -0
  68. package/esm/schema/subscription.schema.js +179 -16
  69. package/esm/schema/subscription_entitlement.schema.js +2 -2
  70. package/esm/schema/transaction.schema.js +60 -2
  71. package/esm/schema/webhook_endpoint.schema.js +28 -0
  72. package/package.json +1 -1
  73. package/types/core.d.ts +86 -8
  74. package/types/index.d.ts +15 -0
  75. package/types/resources/AppliedBusinessRule.d.ts +15 -0
  76. package/types/resources/AppliedRule.d.ts +14 -0
  77. package/types/resources/ApplyRule.d.ts +28 -0
  78. package/types/resources/BusinessRule.d.ts +161 -0
  79. package/types/resources/BusinessRuleset.d.ts +165 -0
  80. package/types/resources/BusinessRulesetRule.d.ts +9 -0
  81. package/types/resources/Card.d.ts +1 -1
  82. package/types/resources/Content.d.ts +9 -0
  83. package/types/resources/Coupon.d.ts +2 -2
  84. package/types/resources/CreditNote.d.ts +12 -0
  85. package/types/resources/CustomDataSchema.d.ts +15 -0
  86. package/types/resources/Customer.d.ts +42 -5
  87. package/types/resources/Dispute.d.ts +65 -0
  88. package/types/resources/Einvoice.d.ts +64 -1
  89. package/types/resources/EmailLog.d.ts +45 -0
  90. package/types/resources/Estimate.d.ts +34 -5
  91. package/types/resources/Event.d.ts +15 -0
  92. package/types/resources/Gift.d.ts +29 -3
  93. package/types/resources/GrantBlock.d.ts +26 -7
  94. package/types/resources/HostedPage.d.ts +14 -3
  95. package/types/resources/Invoice.d.ts +42 -4
  96. package/types/resources/LedgerEntry.d.ts +4 -4
  97. package/types/resources/LedgerOperation.d.ts +15 -8
  98. package/types/resources/OmnichannelSubscriptionItem.d.ts +5 -1
  99. package/types/resources/PaymentIntent.d.ts +72 -5
  100. package/types/resources/PaymentSchedule.d.ts +38 -1
  101. package/types/resources/PaymentScheduleEstimate.d.ts +1 -0
  102. package/types/resources/PaymentScheduleScheme.d.ts +17 -1
  103. package/types/resources/PaymentSource.d.ts +31 -2
  104. package/types/resources/PricingPageSession.d.ts +1 -0
  105. package/types/resources/PromotionalGrant.d.ts +2 -0
  106. package/types/resources/Purchase.d.ts +14 -1
  107. package/types/resources/Quote.d.ts +2 -2
  108. package/types/resources/QuotedSubscription.d.ts +3 -2
  109. package/types/resources/Ramp.d.ts +12 -0
  110. package/types/resources/Subscription.d.ts +116 -17
  111. package/types/resources/ThirdPartyPaymentMethod.d.ts +1 -0
  112. package/types/resources/Transaction.d.ts +5 -0
  113. package/types/resources/WebhookEvent.d.ts +70 -0
@@ -70,6 +70,7 @@ const CreateCustomerCardSchema = zod_1.z.object({
70
70
  'tempus',
71
71
  'moyasar',
72
72
  'payway',
73
+ 'payu',
73
74
  ])
74
75
  .optional(),
75
76
  gateway_account_id: zod_1.z.string().max(50).optional(),
@@ -81,7 +82,7 @@ const CreateCustomerCardSchema = zod_1.z.object({
81
82
  expiry_year: zod_1.z.number().int().optional(),
82
83
  cvv: zod_1.z.string().max(520).optional(),
83
84
  preferred_scheme: zod_1.z
84
- .enum(['cartes_bancaires', 'mastercard', 'visa'])
85
+ .enum(['cartes_bancaires', 'mastercard', 'visa', 'dankort'])
85
86
  .optional(),
86
87
  billing_addr1: zod_1.z.string().max(150).optional(),
87
88
  billing_addr2: zod_1.z.string().max(150).optional(),
@@ -172,6 +173,19 @@ const CreateCustomerPaymentMethodSchema = zod_1.z.object({
172
173
  'touch_n_go',
173
174
  'tamara',
174
175
  'qpay',
176
+ 'ovo',
177
+ 'momo',
178
+ 'mercado_pago',
179
+ 'nequi',
180
+ 'nupay',
181
+ 'picpay',
182
+ 'thai_qr',
183
+ 'blik',
184
+ 'fpx',
185
+ 'wero',
186
+ 'p24',
187
+ 'affirm_pay',
188
+ 'rakuten_pay',
175
189
  ])
176
190
  .optional(),
177
191
  gateway: zod_1.z
@@ -235,6 +249,7 @@ const CreateCustomerPaymentMethodSchema = zod_1.z.object({
235
249
  'tempus',
236
250
  'moyasar',
237
251
  'payway',
252
+ 'payu',
238
253
  ])
239
254
  .optional(),
240
255
  gateway_account_id: zod_1.z.string().max(50).optional(),
@@ -301,6 +316,19 @@ const CreateCustomerPaymentIntentSchema = zod_1.z.object({
301
316
  'touch_n_go',
302
317
  'tamara',
303
318
  'qpay',
319
+ 'ovo',
320
+ 'momo',
321
+ 'mercado_pago',
322
+ 'nequi',
323
+ 'nupay',
324
+ 'picpay',
325
+ 'thai_qr',
326
+ 'blik',
327
+ 'fpx',
328
+ 'wero',
329
+ 'p24',
330
+ 'affirm_pay',
331
+ 'rakuten_pay',
304
332
  ])
305
333
  .optional(),
306
334
  reference_id: zod_1.z.string().max(65000).optional(),
@@ -336,7 +364,7 @@ const CreateCustomerBodySchema = zod_1.z.looseObject({
336
364
  registered_for_gst: zod_1.z.boolean().optional(),
337
365
  is_einvoice_enabled: zod_1.z.boolean().optional(),
338
366
  einvoicing_method: zod_1.z.enum(['automatic', 'manual', 'site_default']).optional(),
339
- taxability: zod_1.z.enum(['taxable', 'exempt']).optional(),
367
+ taxability: zod_1.z.enum(['taxable', 'exempt', 'zero_rated']).optional(),
340
368
  exemption_details: zod_1.z.array(zod_1.z.string().optional()).optional(),
341
369
  customer_type: zod_1.z
342
370
  .enum(['residential', 'business', 'senior_citizen', 'industrial'])
@@ -393,6 +421,7 @@ const CreateCustomerBodySchema = zod_1.z.looseObject({
393
421
  consolidated_invoicing: zod_1.z.boolean().optional(),
394
422
  token_id: zod_1.z.string().max(40).optional(),
395
423
  business_entity_id: zod_1.z.string().max(50).optional(),
424
+ brand_id: zod_1.z.string().max(50).optional(),
396
425
  created_from_ip: zod_1.z.string().max(50).optional(),
397
426
  invoice_notes: zod_1.z.string().max(2000).optional(),
398
427
  card: CreateCustomerCardSchema.optional(),
@@ -449,10 +478,10 @@ const ListCustomerAutoCollectionSchema = zod_1.z.object({
449
478
  not_in: zod_1.z.enum(['on', 'off']).optional(),
450
479
  });
451
480
  const ListCustomerTaxabilitySchema = zod_1.z.object({
452
- is: zod_1.z.enum(['taxable', 'exempt']).optional(),
453
- is_not: zod_1.z.enum(['taxable', 'exempt']).optional(),
454
- in: zod_1.z.enum(['taxable', 'exempt']).optional(),
455
- not_in: zod_1.z.enum(['taxable', 'exempt']).optional(),
481
+ is: zod_1.z.enum(['taxable', 'exempt', 'zero_rated']).optional(),
482
+ is_not: zod_1.z.enum(['taxable', 'exempt', 'zero_rated']).optional(),
483
+ in: zod_1.z.enum(['taxable', 'exempt', 'zero_rated']).optional(),
484
+ not_in: zod_1.z.enum(['taxable', 'exempt', 'zero_rated']).optional(),
456
485
  });
457
486
  const ListCustomerCreatedAtSchema = zod_1.z.object({
458
487
  after: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
@@ -611,7 +640,7 @@ const UpdateCustomerBodySchema = zod_1.z.looseObject({
611
640
  auto_collection: zod_1.z.enum(['on', 'off']).optional(),
612
641
  allow_direct_debit: zod_1.z.boolean().default(false).optional(),
613
642
  net_term_days: zod_1.z.number().int().optional(),
614
- taxability: zod_1.z.enum(['taxable', 'exempt']).optional(),
643
+ taxability: zod_1.z.enum(['taxable', 'exempt', 'zero_rated']).optional(),
615
644
  exemption_details: zod_1.z.array(zod_1.z.string().optional()).optional(),
616
645
  customer_type: zod_1.z
617
646
  .enum(['residential', 'business', 'senior_citizen', 'industrial'])
@@ -727,6 +756,19 @@ const UpdatePaymentMethodCustomerPaymentMethodSchema = zod_1.z.object({
727
756
  'touch_n_go',
728
757
  'tamara',
729
758
  'qpay',
759
+ 'ovo',
760
+ 'momo',
761
+ 'mercado_pago',
762
+ 'nequi',
763
+ 'nupay',
764
+ 'picpay',
765
+ 'thai_qr',
766
+ 'blik',
767
+ 'fpx',
768
+ 'wero',
769
+ 'p24',
770
+ 'affirm_pay',
771
+ 'rakuten_pay',
730
772
  ]),
731
773
  gateway: zod_1.z
732
774
  .enum([
@@ -789,6 +831,7 @@ const UpdatePaymentMethodCustomerPaymentMethodSchema = zod_1.z.object({
789
831
  'tempus',
790
832
  'moyasar',
791
833
  'payway',
834
+ 'payu',
792
835
  ])
793
836
  .optional(),
794
837
  gateway_account_id: zod_1.z.string().max(50).optional(),
@@ -947,10 +990,12 @@ const RecordExcessPaymentCustomerTransactionSchema = zod_1.z.object({
947
990
  'app_store',
948
991
  'play_store',
949
992
  'custom',
950
- 'dana',
951
- 'touch_n_go',
952
993
  'tamara',
953
994
  'qpay',
995
+ 'blik',
996
+ 'fpx',
997
+ 'wero',
998
+ 'p24',
954
999
  ]),
955
1000
  reference_number: zod_1.z.string().max(100).optional(),
956
1001
  custom_payment_method_id: zod_1.z.string().max(50).optional(),
@@ -1019,6 +1064,19 @@ const CollectPaymentCustomerPaymentMethodSchema = zod_1.z.object({
1019
1064
  'touch_n_go',
1020
1065
  'tamara',
1021
1066
  'qpay',
1067
+ 'ovo',
1068
+ 'momo',
1069
+ 'mercado_pago',
1070
+ 'nequi',
1071
+ 'nupay',
1072
+ 'picpay',
1073
+ 'thai_qr',
1074
+ 'blik',
1075
+ 'fpx',
1076
+ 'wero',
1077
+ 'p24',
1078
+ 'affirm_pay',
1079
+ 'rakuten_pay',
1022
1080
  ])
1023
1081
  .optional(),
1024
1082
  gateway_account_id: zod_1.z.string().max(50).optional(),
@@ -1035,7 +1093,7 @@ const CollectPaymentCustomerCardSchema = zod_1.z.object({
1035
1093
  expiry_year: zod_1.z.number().int().optional(),
1036
1094
  cvv: zod_1.z.string().max(520).optional(),
1037
1095
  preferred_scheme: zod_1.z
1038
- .enum(['cartes_bancaires', 'mastercard', 'visa'])
1096
+ .enum(['cartes_bancaires', 'mastercard', 'visa', 'dankort'])
1039
1097
  .optional(),
1040
1098
  billing_addr1: zod_1.z.string().max(150).optional(),
1041
1099
  billing_addr2: zod_1.z.string().max(150).optional(),
@@ -1104,6 +1162,19 @@ const CollectPaymentCustomerPaymentIntentSchema = zod_1.z.object({
1104
1162
  'touch_n_go',
1105
1163
  'tamara',
1106
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',
1107
1178
  ])
1108
1179
  .optional(),
1109
1180
  gw_payment_method_id: zod_1.z.string().max(65000).optional(),
@@ -0,0 +1,104 @@
1
+ "use strict";
2
+ // Generated Zod schemas: Dispute
3
+ // Actions: list
4
+ // Do not edit manually – regenerate via sdk-generator
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ListDisputeBodySchema = void 0;
7
+ const zod_1 = require("zod");
8
+ //Dispute.list
9
+ const ListDisputeIdSchema = zod_1.z.object({
10
+ is: zod_1.z.string().min(1).optional(),
11
+ is_not: zod_1.z.string().min(1).optional(),
12
+ starts_with: zod_1.z.string().min(1).optional(),
13
+ in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
14
+ not_in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
15
+ });
16
+ const ListDisputeStatusSchema = zod_1.z.object({
17
+ is: zod_1.z
18
+ .enum([
19
+ 'initiated',
20
+ 'funds_withdrawn',
21
+ 'in_review',
22
+ 'cancelled',
23
+ 'lost',
24
+ 'won',
25
+ ])
26
+ .optional(),
27
+ is_not: zod_1.z
28
+ .enum([
29
+ 'initiated',
30
+ 'funds_withdrawn',
31
+ 'in_review',
32
+ 'cancelled',
33
+ 'lost',
34
+ 'won',
35
+ ])
36
+ .optional(),
37
+ in: zod_1.z
38
+ .enum([
39
+ 'initiated',
40
+ 'funds_withdrawn',
41
+ 'in_review',
42
+ 'cancelled',
43
+ 'lost',
44
+ 'won',
45
+ ])
46
+ .optional(),
47
+ not_in: zod_1.z
48
+ .enum([
49
+ 'initiated',
50
+ 'funds_withdrawn',
51
+ 'in_review',
52
+ 'cancelled',
53
+ 'lost',
54
+ 'won',
55
+ ])
56
+ .optional(),
57
+ });
58
+ const ListDisputeTypeSchema = zod_1.z.object({
59
+ is: zod_1.z.enum(['chargeback', 'inquiry']).optional(),
60
+ is_not: zod_1.z.enum(['chargeback', 'inquiry']).optional(),
61
+ in: zod_1.z.enum(['chargeback', 'inquiry']).optional(),
62
+ not_in: zod_1.z.enum(['chargeback', 'inquiry']).optional(),
63
+ });
64
+ const ListDisputeCustomerIdSchema = zod_1.z.object({
65
+ is: zod_1.z.string().min(1).optional(),
66
+ is_not: zod_1.z.string().min(1).optional(),
67
+ starts_with: zod_1.z.string().min(1).optional(),
68
+ in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
69
+ not_in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
70
+ });
71
+ const ListDisputeTransactionIdSchema = zod_1.z.object({
72
+ is: zod_1.z.string().min(1).optional(),
73
+ is_not: zod_1.z.string().min(1).optional(),
74
+ starts_with: zod_1.z.string().min(1).optional(),
75
+ in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
76
+ not_in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
77
+ });
78
+ const ListDisputeAmountSchema = zod_1.z.object({
79
+ is: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
80
+ is_not: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
81
+ lt: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
82
+ lte: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
83
+ gt: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
84
+ gte: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
85
+ between: zod_1.z.string().regex(RegExp('^\\[-?\\d+,-?\\d+\\]$')).optional(),
86
+ });
87
+ const ListDisputeCreatedAtSchema = zod_1.z.object({
88
+ after: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
89
+ before: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
90
+ on: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
91
+ between: zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
92
+ });
93
+ const ListDisputeBodySchema = zod_1.z.looseObject({
94
+ limit: zod_1.z.number().int().min(1).max(100).optional(),
95
+ offset: zod_1.z.string().max(1000).optional(),
96
+ id: ListDisputeIdSchema.optional(),
97
+ status: ListDisputeStatusSchema.optional(),
98
+ type: ListDisputeTypeSchema.optional(),
99
+ customer_id: ListDisputeCustomerIdSchema.optional(),
100
+ transaction_id: ListDisputeTransactionIdSchema.optional(),
101
+ amount: ListDisputeAmountSchema.optional(),
102
+ created_at: ListDisputeCreatedAtSchema.optional(),
103
+ });
104
+ exports.ListDisputeBodySchema = ListDisputeBodySchema;
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ // Generated Zod schemas: Einvoice
3
+ // Actions: listEinvoices
4
+ // Do not edit manually – regenerate via sdk-generator
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ListEinvoicesEinvoiceBodySchema = void 0;
7
+ const zod_1 = require("zod");
8
+ //Einvoice.listEinvoices
9
+ const ListEinvoicesEinvoiceIdSchema = zod_1.z.object({
10
+ is: zod_1.z.string().min(1).optional(),
11
+ in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
12
+ });
13
+ const ListEinvoicesEinvoiceReferenceIdSchema = zod_1.z.object({
14
+ is: zod_1.z.string().min(1).optional(),
15
+ in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
16
+ });
17
+ const ListEinvoicesEinvoiceUpdatedAtSchema = zod_1.z.object({
18
+ after: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
19
+ before: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
20
+ on: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
21
+ between: zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
22
+ });
23
+ const ListEinvoicesEinvoiceSortBySchema = zod_1.z.looseObject({
24
+ asc: zod_1.z.enum(['updated_at']).optional(),
25
+ desc: zod_1.z.enum(['updated_at']).optional(),
26
+ });
27
+ const ListEinvoicesEinvoiceBodySchema = zod_1.z.looseObject({
28
+ limit: zod_1.z.number().int().min(1).max(100).optional(),
29
+ offset: zod_1.z.string().max(1000).optional(),
30
+ id: ListEinvoicesEinvoiceIdSchema.optional(),
31
+ reference_id: ListEinvoicesEinvoiceReferenceIdSchema.optional(),
32
+ updated_at: ListEinvoicesEinvoiceUpdatedAtSchema.optional(),
33
+ sort_by: ListEinvoicesEinvoiceSortBySchema.optional(),
34
+ invoice_id: zod_1.z.string().max(50).optional(),
35
+ credit_note_id: zod_1.z.string().max(50).optional(),
36
+ });
37
+ exports.ListEinvoicesEinvoiceBodySchema = ListEinvoicesEinvoiceBodySchema;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ // Generated Zod schemas: EmailLog
3
+ // Actions: emailLogsForCustomer
4
+ // Do not edit manually – regenerate via sdk-generator
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.EmailLogsForCustomerEmailLogBodySchema = void 0;
7
+ const zod_1 = require("zod");
8
+ //EmailLog.emailLogsForCustomer
9
+ const EmailLogsForCustomerEmailLogSentOnSchema = zod_1.z.object({
10
+ after: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
11
+ before: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
12
+ on: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
13
+ between: zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
14
+ });
15
+ const EmailLogsForCustomerEmailLogBusinessEntityIdSchema = zod_1.z.object({
16
+ is: zod_1.z.string().min(1).optional(),
17
+ });
18
+ const EmailLogsForCustomerEmailLogBrandIdSchema = zod_1.z.object({
19
+ is: zod_1.z.string().min(1).optional(),
20
+ });
21
+ const EmailLogsForCustomerEmailLogBodySchema = zod_1.z.looseObject({
22
+ limit: zod_1.z.number().int().min(1).max(100).optional(),
23
+ offset: zod_1.z.string().max(1000).optional(),
24
+ sent_on: EmailLogsForCustomerEmailLogSentOnSchema.optional(),
25
+ business_entity_id: EmailLogsForCustomerEmailLogBusinessEntityIdSchema.optional(),
26
+ brand_id: EmailLogsForCustomerEmailLogBrandIdSchema.optional(),
27
+ });
28
+ exports.EmailLogsForCustomerEmailLogBodySchema = EmailLogsForCustomerEmailLogBodySchema;
@@ -8,7 +8,7 @@ const zod_1 = require("zod");
8
8
  //Estimate.createSubscription
9
9
  const CreateSubscriptionEstimateSubscriptionSchema = zod_1.z.object({
10
10
  id: zod_1.z.string().max(50).optional(),
11
- plan_id: zod_1.z.string().max(100),
11
+ plan_id: zod_1.z.string().max(100).optional(),
12
12
  plan_quantity: zod_1.z.number().int().min(1).optional(),
13
13
  plan_quantity_in_decimal: zod_1.z.string().max(33).optional(),
14
14
  plan_unit_price: zod_1.z.number().int().min(0).optional(),
@@ -79,7 +79,7 @@ const CreateSubscriptionEstimateCustomerSchema = zod_1.z.object({
79
79
  vat_number: zod_1.z.string().max(20).optional(),
80
80
  vat_number_prefix: zod_1.z.string().max(10).optional(),
81
81
  registered_for_gst: zod_1.z.boolean().optional(),
82
- taxability: zod_1.z.enum(['taxable', 'exempt']).optional(),
82
+ taxability: zod_1.z.enum(['taxable', 'exempt', 'zero_rated']).optional(),
83
83
  entity_code: zod_1.z
84
84
  .enum([
85
85
  'a',
@@ -240,7 +240,7 @@ const CreateSubItemEstimateEstimateCustomerSchema = zod_1.z.object({
240
240
  vat_number: zod_1.z.string().max(20).optional(),
241
241
  vat_number_prefix: zod_1.z.string().max(10).optional(),
242
242
  registered_for_gst: zod_1.z.boolean().optional(),
243
- taxability: zod_1.z.enum(['taxable', 'exempt']).optional(),
243
+ taxability: zod_1.z.enum(['taxable', 'exempt', 'zero_rated']).optional(),
244
244
  entity_code: zod_1.z
245
245
  .enum([
246
246
  'a',
@@ -299,6 +299,7 @@ const CreateSubItemEstimateEstimateSubscriptionItemsSchema = zod_1.z.object({
299
299
  .optional(),
300
300
  charge_once: zod_1.z.array(zod_1.z.boolean().optional()).optional(),
301
301
  item_type: zod_1.z.array(zod_1.z.enum(['plan', 'addon', 'charge']).optional()).optional(),
302
+ description: zod_1.z.array(zod_1.z.string().max(500).optional()).optional(),
302
303
  charge_on_option: zod_1.z
303
304
  .array(zod_1.z.enum(['immediately', 'on_event']).optional())
304
305
  .optional(),
@@ -359,7 +360,7 @@ exports.CreateSubItemEstimateEstimateBodySchema = CreateSubItemEstimateEstimateB
359
360
  //Estimate.createSubForCustomerEstimate
360
361
  const CreateSubForCustomerEstimateEstimateSubscriptionSchema = zod_1.z.object({
361
362
  id: zod_1.z.string().max(50).optional(),
362
- plan_id: zod_1.z.string().max(100),
363
+ plan_id: zod_1.z.string().max(100).optional(),
363
364
  plan_quantity: zod_1.z.number().int().min(1).optional(),
364
365
  plan_quantity_in_decimal: zod_1.z.string().max(33).optional(),
365
366
  plan_unit_price: zod_1.z.number().int().min(0).optional(),
@@ -566,6 +567,7 @@ const CreateSubItemForCustomerEstimateEstimateSubscriptionItemsSchema = zod_1.z.
566
567
  item_type: zod_1.z
567
568
  .array(zod_1.z.enum(['plan', 'addon', 'charge']).optional())
568
569
  .optional(),
570
+ description: zod_1.z.array(zod_1.z.string().max(500).optional()).optional(),
569
571
  charge_on_option: zod_1.z
570
572
  .array(zod_1.z.enum(['immediately', 'on_event']).optional())
571
573
  .optional(),
@@ -686,7 +688,7 @@ const UpdateSubscriptionEstimateCustomerSchema = zod_1.z.object({
686
688
  vat_number: zod_1.z.string().max(20).optional(),
687
689
  vat_number_prefix: zod_1.z.string().max(10).optional(),
688
690
  registered_for_gst: zod_1.z.boolean().optional(),
689
- taxability: zod_1.z.enum(['taxable', 'exempt']).optional(),
691
+ taxability: zod_1.z.enum(['taxable', 'exempt', 'zero_rated']).optional(),
690
692
  });
691
693
  const UpdateSubscriptionEstimateAddonsSchema = zod_1.z.object({
692
694
  id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
@@ -818,7 +820,7 @@ const UpdateSubscriptionForItemsEstimateCustomerSchema = zod_1.z.object({
818
820
  vat_number: zod_1.z.string().max(20).optional(),
819
821
  vat_number_prefix: zod_1.z.string().max(10).optional(),
820
822
  registered_for_gst: zod_1.z.boolean().optional(),
821
- taxability: zod_1.z.enum(['taxable', 'exempt']).optional(),
823
+ taxability: zod_1.z.enum(['taxable', 'exempt', 'zero_rated']).optional(),
822
824
  });
823
825
  const UpdateSubscriptionForItemsEstimateBillingOverrideSchema = zod_1.z.object({
824
826
  max_excess_payment_usage: zod_1.z.number().int().min(-1).optional(),
@@ -851,6 +853,7 @@ const UpdateSubscriptionForItemsEstimateSubscriptionItemsSchema = zod_1.z.object
851
853
  .array(zod_1.z.enum(['immediately', 'on_event']).optional())
852
854
  .optional(),
853
855
  item_type: zod_1.z.array(zod_1.z.enum(['plan', 'addon', 'charge']).optional()).optional(),
856
+ description: zod_1.z.array(zod_1.z.string().max(500).optional()).optional(),
854
857
  proration_type: zod_1.z
855
858
  .array(zod_1.z.enum(['full_term', 'partial_term', 'none']).optional())
856
859
  .optional(),
@@ -1162,6 +1165,19 @@ const GiftSubscriptionEstimatePaymentIntentSchema = zod_1.z.object({
1162
1165
  'touch_n_go',
1163
1166
  'tamara',
1164
1167
  'qpay',
1168
+ 'ovo',
1169
+ 'momo',
1170
+ 'mercado_pago',
1171
+ 'nequi',
1172
+ 'nupay',
1173
+ 'picpay',
1174
+ 'thai_qr',
1175
+ 'blik',
1176
+ 'fpx',
1177
+ 'wero',
1178
+ 'p24',
1179
+ 'affirm_pay',
1180
+ 'rakuten_pay',
1165
1181
  ])
1166
1182
  .optional(),
1167
1183
  reference_id: zod_1.z.string().max(65000).optional(),
@@ -1187,7 +1203,7 @@ const GiftSubscriptionEstimateShippingAddressSchema = zod_1.z.object({
1187
1203
  .optional(),
1188
1204
  });
1189
1205
  const GiftSubscriptionEstimateSubscriptionSchema = zod_1.z.object({
1190
- plan_id: zod_1.z.string().max(100),
1206
+ plan_id: zod_1.z.string().max(100).optional(),
1191
1207
  plan_quantity: zod_1.z.number().int().min(1).optional(),
1192
1208
  plan_quantity_in_decimal: zod_1.z.string().max(33).optional(),
1193
1209
  });
@@ -1285,6 +1301,19 @@ const GiftSubscriptionForItemsEstimatePaymentIntentSchema = zod_1.z.object({
1285
1301
  'touch_n_go',
1286
1302
  'tamara',
1287
1303
  'qpay',
1304
+ 'ovo',
1305
+ 'momo',
1306
+ 'mercado_pago',
1307
+ 'nequi',
1308
+ 'nupay',
1309
+ 'picpay',
1310
+ 'thai_qr',
1311
+ 'blik',
1312
+ 'fpx',
1313
+ 'wero',
1314
+ 'p24',
1315
+ 'affirm_pay',
1316
+ 'rakuten_pay',
1288
1317
  ])
1289
1318
  .optional(),
1290
1319
  reference_id: zod_1.z.string().max(65000).optional(),
@@ -1462,7 +1491,7 @@ const CreateInvoiceForItemsEstimateItemPricesSchema = zod_1.z.object({
1462
1491
  date_from: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
1463
1492
  date_to: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
1464
1493
  description: zod_1.z.array(zod_1.z.string().max(250).optional()).optional(),
1465
- entity_description: zod_1.z.array(zod_1.z.string().max(500).optional()).optional(),
1494
+ entity_description: zod_1.z.array(zod_1.z.string().max(2000).optional()).optional(),
1466
1495
  });
1467
1496
  const CreateInvoiceForItemsEstimateItemTiersSchema = zod_1.z.object({
1468
1497
  item_price_id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
@@ -1493,7 +1522,7 @@ const CreateInvoiceForItemsEstimateChargesSchema = zod_1.z.object({
1493
1522
  avalara_service_type: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
1494
1523
  date_from: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
1495
1524
  date_to: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
1496
- entity_description: zod_1.z.array(zod_1.z.string().max(500).optional()).optional(),
1525
+ entity_description: zod_1.z.array(zod_1.z.string().max(2000).optional()).optional(),
1497
1526
  });
1498
1527
  const CreateInvoiceForItemsEstimateNotesToRemoveSchema = zod_1.z.object({
1499
1528
  entity_type: zod_1.z
@@ -128,6 +128,8 @@ const ListEventEventTypeSchema = zod_1.z.object({
128
128
  'credit_note_created_with_backdating',
129
129
  'credit_note_updated',
130
130
  'credit_note_deleted',
131
+ 'einvoice_created',
132
+ 'einvoice_updated',
131
133
  'payment_schedules_created',
132
134
  'payment_schedules_updated',
133
135
  'payment_schedule_scheme_created',
@@ -298,9 +300,21 @@ const ListEventEventTypeSchema = zod_1.z.object({
298
300
  'grant_blocks_created',
299
301
  'grant_blocks_updated',
300
302
  'ledger_updated',
303
+ 'business_rule_created',
304
+ 'business_rule_updated',
305
+ 'business_rule_activated',
306
+ 'business_rule_deactivated',
307
+ 'business_rule_deleted',
308
+ 'business_rule_released',
301
309
  'vault_token_created',
302
310
  'vault_token_updated',
303
311
  'vault_token_deleted',
312
+ 'business_rules_applied',
313
+ 'business_ruleset_created',
314
+ 'business_ruleset_updated',
315
+ 'business_ruleset_activated',
316
+ 'business_ruleset_deactivated',
317
+ 'business_ruleset_deleted',
304
318
  ])
305
319
  .optional(),
306
320
  is_not: zod_1.z
@@ -363,6 +377,8 @@ const ListEventEventTypeSchema = zod_1.z.object({
363
377
  'credit_note_created_with_backdating',
364
378
  'credit_note_updated',
365
379
  'credit_note_deleted',
380
+ 'einvoice_created',
381
+ 'einvoice_updated',
366
382
  'payment_schedules_created',
367
383
  'payment_schedules_updated',
368
384
  'payment_schedule_scheme_created',
@@ -533,9 +549,21 @@ const ListEventEventTypeSchema = zod_1.z.object({
533
549
  'grant_blocks_created',
534
550
  'grant_blocks_updated',
535
551
  'ledger_updated',
552
+ 'business_rule_created',
553
+ 'business_rule_updated',
554
+ 'business_rule_activated',
555
+ 'business_rule_deactivated',
556
+ 'business_rule_deleted',
557
+ 'business_rule_released',
536
558
  'vault_token_created',
537
559
  'vault_token_updated',
538
560
  'vault_token_deleted',
561
+ 'business_rules_applied',
562
+ 'business_ruleset_created',
563
+ 'business_ruleset_updated',
564
+ 'business_ruleset_activated',
565
+ 'business_ruleset_deactivated',
566
+ 'business_ruleset_deleted',
539
567
  ])
540
568
  .optional(),
541
569
  in: zod_1.z
@@ -598,6 +626,8 @@ const ListEventEventTypeSchema = zod_1.z.object({
598
626
  'credit_note_created_with_backdating',
599
627
  'credit_note_updated',
600
628
  'credit_note_deleted',
629
+ 'einvoice_created',
630
+ 'einvoice_updated',
601
631
  'payment_schedules_created',
602
632
  'payment_schedules_updated',
603
633
  'payment_schedule_scheme_created',
@@ -768,9 +798,21 @@ const ListEventEventTypeSchema = zod_1.z.object({
768
798
  'grant_blocks_created',
769
799
  'grant_blocks_updated',
770
800
  'ledger_updated',
801
+ 'business_rule_created',
802
+ 'business_rule_updated',
803
+ 'business_rule_activated',
804
+ 'business_rule_deactivated',
805
+ 'business_rule_deleted',
806
+ 'business_rule_released',
771
807
  'vault_token_created',
772
808
  'vault_token_updated',
773
809
  'vault_token_deleted',
810
+ 'business_rules_applied',
811
+ 'business_ruleset_created',
812
+ 'business_ruleset_updated',
813
+ 'business_ruleset_activated',
814
+ 'business_ruleset_deactivated',
815
+ 'business_ruleset_deleted',
774
816
  ])
775
817
  .optional(),
776
818
  not_in: zod_1.z
@@ -833,6 +875,8 @@ const ListEventEventTypeSchema = zod_1.z.object({
833
875
  'credit_note_created_with_backdating',
834
876
  'credit_note_updated',
835
877
  'credit_note_deleted',
878
+ 'einvoice_created',
879
+ 'einvoice_updated',
836
880
  'payment_schedules_created',
837
881
  'payment_schedules_updated',
838
882
  'payment_schedule_scheme_created',
@@ -1003,9 +1047,21 @@ const ListEventEventTypeSchema = zod_1.z.object({
1003
1047
  'grant_blocks_created',
1004
1048
  'grant_blocks_updated',
1005
1049
  'ledger_updated',
1050
+ 'business_rule_created',
1051
+ 'business_rule_updated',
1052
+ 'business_rule_activated',
1053
+ 'business_rule_deactivated',
1054
+ 'business_rule_deleted',
1055
+ 'business_rule_released',
1006
1056
  'vault_token_created',
1007
1057
  'vault_token_updated',
1008
1058
  'vault_token_deleted',
1059
+ 'business_rules_applied',
1060
+ 'business_ruleset_created',
1061
+ 'business_ruleset_updated',
1062
+ 'business_ruleset_activated',
1063
+ 'business_ruleset_deactivated',
1064
+ 'business_ruleset_deleted',
1009
1065
  ])
1010
1066
  .optional(),
1011
1067
  });