chargebee 3.26.0 → 3.27.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 (163) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/README.md +39 -0
  3. package/cjs/RequestWrapper.js +27 -0
  4. package/cjs/chargebee.cjs.js +3 -0
  5. package/cjs/chargebee.cjs.worker.js +2 -0
  6. package/cjs/chargebeeZodValidationError.js +18 -0
  7. package/cjs/createChargebee.js +5 -0
  8. package/cjs/environment.js +1 -1
  9. package/cjs/schema/addon.schema.js +269 -0
  10. package/cjs/schema/address.schema.js +35 -0
  11. package/cjs/schema/alert.schema.js +74 -0
  12. package/cjs/schema/alert_status.schema.js +31 -0
  13. package/cjs/schema/attached_item.schema.js +144 -0
  14. package/cjs/schema/business_entity.schema.js +46 -0
  15. package/cjs/schema/card.schema.js +165 -0
  16. package/cjs/schema/comment.schema.js +69 -0
  17. package/cjs/schema/coupon.schema.js +323 -0
  18. package/cjs/schema/coupon_code.schema.js +49 -0
  19. package/cjs/schema/coupon_set.schema.js +88 -0
  20. package/cjs/schema/credit_note.schema.js +502 -0
  21. package/cjs/schema/currency.schema.js +32 -0
  22. package/cjs/schema/customer.schema.js +1201 -0
  23. package/cjs/schema/customer_entitlement.schema.js +14 -0
  24. package/cjs/schema/differential_price.schema.js +106 -0
  25. package/cjs/schema/entitlement.schema.js +54 -0
  26. package/cjs/schema/entitlement_override.schema.js +35 -0
  27. package/cjs/schema/estimate.schema.js +1535 -0
  28. package/cjs/schema/event.schema.js +1060 -0
  29. package/cjs/schema/export.schema.js +3385 -0
  30. package/cjs/schema/feature.schema.js +78 -0
  31. package/cjs/schema/gift.schema.js +293 -0
  32. package/cjs/schema/grant_block.schema.js +47 -0
  33. package/cjs/schema/hosted_page.schema.js +1777 -0
  34. package/cjs/schema/in_app_subscription.schema.js +68 -0
  35. package/cjs/schema/index.js +88 -0
  36. package/cjs/schema/invoice.schema.js +1685 -0
  37. package/cjs/schema/item.schema.js +195 -0
  38. package/cjs/schema/item_entitlement.schema.js +45 -0
  39. package/cjs/schema/item_family.schema.js +57 -0
  40. package/cjs/schema/item_price.schema.js +335 -0
  41. package/cjs/schema/ledger_account_balance.schema.js +21 -0
  42. package/cjs/schema/ledger_operation.schema.js +104 -0
  43. package/cjs/schema/meter.schema.js +13 -0
  44. package/cjs/schema/metered_feature.schema.js +20 -0
  45. package/cjs/schema/non_subscription.schema.js +28 -0
  46. package/cjs/schema/offer_event.schema.js +13 -0
  47. package/cjs/schema/offer_fulfillment.schema.js +20 -0
  48. package/cjs/schema/omnichannel_one_time_order.schema.js +26 -0
  49. package/cjs/schema/omnichannel_subscription.schema.js +122 -0
  50. package/cjs/schema/omnichannel_subscription_item.schema.js +13 -0
  51. package/cjs/schema/order.schema.js +441 -0
  52. package/cjs/schema/payment_intent.schema.js +127 -0
  53. package/cjs/schema/payment_schedule_scheme.schema.js +20 -0
  54. package/cjs/schema/payment_source.schema.js +630 -0
  55. package/cjs/schema/payment_voucher.schema.js +57 -0
  56. package/cjs/schema/personalized_offer.schema.js +28 -0
  57. package/cjs/schema/plan.schema.js +363 -0
  58. package/cjs/schema/portal_session.schema.js +22 -0
  59. package/cjs/schema/price_variant.schema.js +93 -0
  60. package/cjs/schema/pricing_page_session.schema.js +135 -0
  61. package/cjs/schema/promotional_credit.schema.js +78 -0
  62. package/cjs/schema/promotional_grant.schema.js +17 -0
  63. package/cjs/schema/purchase.schema.js +277 -0
  64. package/cjs/schema/quote.schema.js +1667 -0
  65. package/cjs/schema/ramp.schema.js +245 -0
  66. package/cjs/schema/recorded_purchase.schema.js +32 -0
  67. package/cjs/schema/resource_migration.schema.js +14 -0
  68. package/cjs/schema/site_migration_detail.schema.js +81 -0
  69. package/cjs/schema/subscription.schema.js +3344 -0
  70. package/cjs/schema/subscription_entitlement.schema.js +25 -0
  71. package/cjs/schema/time_machine.schema.js +17 -0
  72. package/cjs/schema/transaction.schema.js +744 -0
  73. package/cjs/schema/unbilled_charge.schema.js +139 -0
  74. package/cjs/schema/usage.schema.js +93 -0
  75. package/cjs/schema/usage_charge.schema.js +17 -0
  76. package/cjs/schema/usage_event.schema.js +28 -0
  77. package/cjs/schema/usage_file.schema.js +13 -0
  78. package/cjs/schema/usage_summary.schema.js +17 -0
  79. package/cjs/schema/virtual_bank_account.schema.js +71 -0
  80. package/cjs/schema/webhook_endpoint.schema.js +508 -0
  81. package/cjs/validationLoader.js +59 -0
  82. package/esm/RequestWrapper.js +27 -0
  83. package/esm/chargebee.esm.js +2 -0
  84. package/esm/chargebee.esm.worker.js +1 -0
  85. package/esm/chargebeeZodValidationError.js +14 -0
  86. package/esm/createChargebee.js +5 -0
  87. package/esm/environment.js +1 -1
  88. package/esm/schema/addon.schema.js +266 -0
  89. package/esm/schema/address.schema.js +32 -0
  90. package/esm/schema/alert.schema.js +71 -0
  91. package/esm/schema/alert_status.schema.js +28 -0
  92. package/esm/schema/attached_item.schema.js +141 -0
  93. package/esm/schema/business_entity.schema.js +43 -0
  94. package/esm/schema/card.schema.js +162 -0
  95. package/esm/schema/comment.schema.js +66 -0
  96. package/esm/schema/coupon.schema.js +320 -0
  97. package/esm/schema/coupon_code.schema.js +46 -0
  98. package/esm/schema/coupon_set.schema.js +85 -0
  99. package/esm/schema/credit_note.schema.js +499 -0
  100. package/esm/schema/currency.schema.js +29 -0
  101. package/esm/schema/customer.schema.js +1198 -0
  102. package/esm/schema/customer_entitlement.schema.js +11 -0
  103. package/esm/schema/differential_price.schema.js +103 -0
  104. package/esm/schema/entitlement.schema.js +51 -0
  105. package/esm/schema/entitlement_override.schema.js +32 -0
  106. package/esm/schema/estimate.schema.js +1532 -0
  107. package/esm/schema/event.schema.js +1057 -0
  108. package/esm/schema/export.schema.js +3382 -0
  109. package/esm/schema/feature.schema.js +75 -0
  110. package/esm/schema/gift.schema.js +290 -0
  111. package/esm/schema/grant_block.schema.js +44 -0
  112. package/esm/schema/hosted_page.schema.js +1774 -0
  113. package/esm/schema/in_app_subscription.schema.js +65 -0
  114. package/esm/schema/index.js +72 -0
  115. package/esm/schema/invoice.schema.js +1682 -0
  116. package/esm/schema/item.schema.js +192 -0
  117. package/esm/schema/item_entitlement.schema.js +42 -0
  118. package/esm/schema/item_family.schema.js +54 -0
  119. package/esm/schema/item_price.schema.js +332 -0
  120. package/esm/schema/ledger_account_balance.schema.js +18 -0
  121. package/esm/schema/ledger_operation.schema.js +101 -0
  122. package/esm/schema/meter.schema.js +10 -0
  123. package/esm/schema/metered_feature.schema.js +17 -0
  124. package/esm/schema/non_subscription.schema.js +25 -0
  125. package/esm/schema/offer_event.schema.js +10 -0
  126. package/esm/schema/offer_fulfillment.schema.js +17 -0
  127. package/esm/schema/omnichannel_one_time_order.schema.js +23 -0
  128. package/esm/schema/omnichannel_subscription.schema.js +119 -0
  129. package/esm/schema/omnichannel_subscription_item.schema.js +10 -0
  130. package/esm/schema/order.schema.js +438 -0
  131. package/esm/schema/payment_intent.schema.js +124 -0
  132. package/esm/schema/payment_schedule_scheme.schema.js +17 -0
  133. package/esm/schema/payment_source.schema.js +627 -0
  134. package/esm/schema/payment_voucher.schema.js +54 -0
  135. package/esm/schema/personalized_offer.schema.js +25 -0
  136. package/esm/schema/plan.schema.js +360 -0
  137. package/esm/schema/portal_session.schema.js +19 -0
  138. package/esm/schema/price_variant.schema.js +90 -0
  139. package/esm/schema/pricing_page_session.schema.js +132 -0
  140. package/esm/schema/promotional_credit.schema.js +75 -0
  141. package/esm/schema/promotional_grant.schema.js +14 -0
  142. package/esm/schema/purchase.schema.js +274 -0
  143. package/esm/schema/quote.schema.js +1664 -0
  144. package/esm/schema/ramp.schema.js +242 -0
  145. package/esm/schema/recorded_purchase.schema.js +29 -0
  146. package/esm/schema/resource_migration.schema.js +11 -0
  147. package/esm/schema/site_migration_detail.schema.js +78 -0
  148. package/esm/schema/subscription.schema.js +3341 -0
  149. package/esm/schema/subscription_entitlement.schema.js +22 -0
  150. package/esm/schema/time_machine.schema.js +14 -0
  151. package/esm/schema/transaction.schema.js +741 -0
  152. package/esm/schema/unbilled_charge.schema.js +136 -0
  153. package/esm/schema/usage.schema.js +90 -0
  154. package/esm/schema/usage_charge.schema.js +14 -0
  155. package/esm/schema/usage_event.schema.js +25 -0
  156. package/esm/schema/usage_file.schema.js +10 -0
  157. package/esm/schema/usage_summary.schema.js +14 -0
  158. package/esm/schema/virtual_bank_account.schema.js +68 -0
  159. package/esm/schema/webhook_endpoint.schema.js +505 -0
  160. package/esm/validationLoader.js +56 -0
  161. package/package.json +4 -1
  162. package/types/core.d.ts +2 -0
  163. package/types/index.d.ts +16 -0
@@ -0,0 +1,627 @@
1
+ // Generated Zod schemas: PaymentSource
2
+ // Actions: createUsingTempToken, createUsingPermanentToken, createUsingToken, createUsingPaymentIntent, createVoucherPaymentSource, createCard, createBankAccount, updateCard, updateBankAccount, verifyBankAccount, list, switchGatewayAccount, exportPaymentSource
3
+ // Do not edit manually – regenerate via sdk-generator
4
+ import { z } from 'zod';
5
+ //PaymentSource.createUsingTempToken
6
+ const CreateUsingTempTokenPaymentSourceAdditionalInformationSchema = z.looseObject({});
7
+ const CreateUsingTempTokenPaymentSourceBodySchema = z.looseObject({
8
+ customer_id: z.string().max(50),
9
+ gateway_account_id: z.string().max(50).optional(),
10
+ type: z.enum([
11
+ 'card',
12
+ 'paypal_express_checkout',
13
+ 'amazon_payments',
14
+ 'direct_debit',
15
+ 'generic',
16
+ 'alipay',
17
+ 'unionpay',
18
+ 'apple_pay',
19
+ 'wechat_pay',
20
+ 'ideal',
21
+ 'google_pay',
22
+ 'sofort',
23
+ 'bancontact',
24
+ 'giropay',
25
+ 'dotpay',
26
+ 'upi',
27
+ 'netbanking_emandates',
28
+ 'venmo',
29
+ 'pay_to',
30
+ 'faster_payments',
31
+ 'sepa_instant_transfer',
32
+ 'automated_bank_transfer',
33
+ 'klarna_pay_now',
34
+ 'online_banking_poland',
35
+ 'payconiq_by_bancontact',
36
+ 'electronic_payment_standard',
37
+ 'kbc_payment_button',
38
+ 'pay_by_bank',
39
+ 'trustly',
40
+ 'stablecoin',
41
+ 'kakao_pay',
42
+ 'naver_pay',
43
+ 'revolut_pay',
44
+ 'cash_app_pay',
45
+ 'twint',
46
+ 'go_pay',
47
+ 'grab_pay',
48
+ 'pay_co',
49
+ 'after_pay',
50
+ 'swish',
51
+ 'payme',
52
+ 'pix',
53
+ 'klarna',
54
+ 'alipay_hk',
55
+ 'paypay',
56
+ 'gcash',
57
+ 'south_korean_cards',
58
+ ]),
59
+ tmp_token: z.string().max(65000),
60
+ issuing_country: z.string().max(50).optional(),
61
+ replace_primary_payment_source: z.boolean().default(false).optional(),
62
+ additional_information: CreateUsingTempTokenPaymentSourceAdditionalInformationSchema.optional(),
63
+ });
64
+ export { CreateUsingTempTokenPaymentSourceBodySchema };
65
+ //PaymentSource.createUsingPermanentToken
66
+ const CreateUsingPermanentTokenPaymentSourceAdditionalInformationSchema = z.looseObject({});
67
+ const CreateUsingPermanentTokenPaymentSourceCardSchema = z.object({
68
+ last4: z.string().max(4).min(4).optional(),
69
+ iin: z.string().max(6).min(6).optional(),
70
+ expiry_month: z.number().int().min(1).max(12).optional(),
71
+ expiry_year: z.number().int().optional(),
72
+ brand: z
73
+ .enum([
74
+ 'visa',
75
+ 'mastercard',
76
+ 'american_express',
77
+ 'discover',
78
+ 'jcb',
79
+ 'diners_club',
80
+ 'other',
81
+ 'bancontact',
82
+ 'cmr_falabella',
83
+ 'tarjeta_naranja',
84
+ 'nativa',
85
+ 'cencosud',
86
+ 'cabal',
87
+ 'argencard',
88
+ 'elo',
89
+ 'hipercard',
90
+ 'carnet',
91
+ 'rupay',
92
+ 'maestro',
93
+ 'dankort',
94
+ 'cartes_bancaires',
95
+ 'mada',
96
+ ])
97
+ .optional(),
98
+ funding_type: z.enum(['credit', 'debit', 'prepaid', 'not_known']).optional(),
99
+ });
100
+ const CreateUsingPermanentTokenPaymentSourceBillingAddressSchema = z.object({
101
+ first_name: z.string().max(150).optional(),
102
+ last_name: z.string().max(150).optional(),
103
+ email: z.string().email().max(70).optional(),
104
+ line1: z.string().max(150).optional(),
105
+ line2: z.string().max(150).optional(),
106
+ line3: z.string().max(150).optional(),
107
+ city: z.string().max(50).optional(),
108
+ state_code: z.string().max(50).optional(),
109
+ state: z.string().max(50).optional(),
110
+ zip: z.string().max(20).optional(),
111
+ country: z.string().max(50).optional(),
112
+ });
113
+ const CreateUsingPermanentTokenPaymentSourceBodySchema = z.looseObject({
114
+ customer_id: z.string().max(50),
115
+ type: z.enum([
116
+ 'card',
117
+ 'paypal_express_checkout',
118
+ 'amazon_payments',
119
+ 'direct_debit',
120
+ 'generic',
121
+ 'alipay',
122
+ 'unionpay',
123
+ 'apple_pay',
124
+ 'wechat_pay',
125
+ 'ideal',
126
+ 'google_pay',
127
+ 'sofort',
128
+ 'bancontact',
129
+ 'giropay',
130
+ 'dotpay',
131
+ 'upi',
132
+ 'netbanking_emandates',
133
+ 'venmo',
134
+ 'pay_to',
135
+ 'faster_payments',
136
+ 'sepa_instant_transfer',
137
+ 'automated_bank_transfer',
138
+ 'klarna_pay_now',
139
+ 'online_banking_poland',
140
+ 'payconiq_by_bancontact',
141
+ 'electronic_payment_standard',
142
+ 'kbc_payment_button',
143
+ 'pay_by_bank',
144
+ 'trustly',
145
+ 'stablecoin',
146
+ 'kakao_pay',
147
+ 'naver_pay',
148
+ 'revolut_pay',
149
+ 'cash_app_pay',
150
+ 'twint',
151
+ 'go_pay',
152
+ 'grab_pay',
153
+ 'pay_co',
154
+ 'after_pay',
155
+ 'swish',
156
+ 'payme',
157
+ 'pix',
158
+ 'klarna',
159
+ 'alipay_hk',
160
+ 'paypay',
161
+ 'gcash',
162
+ 'south_korean_cards',
163
+ ]),
164
+ gateway_account_id: z.string().max(50).optional(),
165
+ reference_id: z.string().max(200).optional(),
166
+ issuing_country: z.string().max(50).optional(),
167
+ replace_primary_payment_source: z.boolean().default(false).optional(),
168
+ payment_method_token: z.string().max(100).optional(),
169
+ customer_profile_token: z.string().max(100).optional(),
170
+ network_transaction_id: z.string().max(100).optional(),
171
+ mandate_id: z.string().max(100).optional(),
172
+ skip_retrieval: z.boolean().default(false).optional(),
173
+ additional_information: CreateUsingPermanentTokenPaymentSourceAdditionalInformationSchema.optional(),
174
+ card: CreateUsingPermanentTokenPaymentSourceCardSchema.optional(),
175
+ billing_address: CreateUsingPermanentTokenPaymentSourceBillingAddressSchema.optional(),
176
+ });
177
+ export { CreateUsingPermanentTokenPaymentSourceBodySchema };
178
+ //PaymentSource.createUsingToken
179
+ const CreateUsingTokenPaymentSourceBodySchema = z.looseObject({
180
+ customer_id: z.string().max(50),
181
+ replace_primary_payment_source: z.boolean().default(false).optional(),
182
+ token_id: z.string().max(40),
183
+ });
184
+ export { CreateUsingTokenPaymentSourceBodySchema };
185
+ //PaymentSource.createUsingPaymentIntent
186
+ const CreateUsingPaymentIntentPaymentSourceAdditionalInfoSchema = z.looseObject({});
187
+ const CreateUsingPaymentIntentPaymentSourceAdditionalInformationSchema = z.looseObject({});
188
+ const CreateUsingPaymentIntentPaymentSourcePaymentIntentSchema = z.object({
189
+ id: z.string().max(150).optional(),
190
+ gateway_account_id: z.string().max(50).optional(),
191
+ gw_token: z.string().max(65000).optional(),
192
+ payment_method_type: z
193
+ .enum([
194
+ 'card',
195
+ 'ideal',
196
+ 'sofort',
197
+ 'bancontact',
198
+ 'google_pay',
199
+ 'dotpay',
200
+ 'giropay',
201
+ 'apple_pay',
202
+ 'upi',
203
+ 'netbanking_emandates',
204
+ 'paypal_express_checkout',
205
+ 'direct_debit',
206
+ 'boleto',
207
+ 'venmo',
208
+ 'amazon_payments',
209
+ 'pay_to',
210
+ 'faster_payments',
211
+ 'sepa_instant_transfer',
212
+ 'klarna_pay_now',
213
+ 'online_banking_poland',
214
+ 'payconiq_by_bancontact',
215
+ 'electronic_payment_standard',
216
+ 'kbc_payment_button',
217
+ 'pay_by_bank',
218
+ 'trustly',
219
+ 'stablecoin',
220
+ 'kakao_pay',
221
+ 'naver_pay',
222
+ 'revolut_pay',
223
+ 'cash_app_pay',
224
+ 'wechat_pay',
225
+ 'alipay',
226
+ 'twint',
227
+ 'go_pay',
228
+ 'grab_pay',
229
+ 'pay_co',
230
+ 'after_pay',
231
+ 'swish',
232
+ 'payme',
233
+ 'pix',
234
+ 'klarna',
235
+ 'alipay_hk',
236
+ 'paypay',
237
+ 'gcash',
238
+ 'south_korean_cards',
239
+ ])
240
+ .optional(),
241
+ reference_id: z.string().max(65000).optional(),
242
+ gw_payment_method_id: z.string().max(65000).optional(),
243
+ additional_info: CreateUsingPaymentIntentPaymentSourceAdditionalInfoSchema.optional(),
244
+ additional_information: CreateUsingPaymentIntentPaymentSourceAdditionalInformationSchema.optional(),
245
+ });
246
+ const CreateUsingPaymentIntentPaymentSourceBodySchema = z.looseObject({
247
+ customer_id: z.string().max(50),
248
+ replace_primary_payment_source: z.boolean().default(false).optional(),
249
+ payment_intent: CreateUsingPaymentIntentPaymentSourcePaymentIntentSchema.optional(),
250
+ });
251
+ export { CreateUsingPaymentIntentPaymentSourceBodySchema };
252
+ //PaymentSource.createVoucherPaymentSource
253
+ const CreateVoucherPaymentSourcePaymentSourceBillingAddressSchema = z.looseObject({});
254
+ const CreateVoucherPaymentSourcePaymentSourceVoucherPaymentSourceSchema = z.object({
255
+ voucher_type: z.enum(['boleto']),
256
+ gateway_account_id: z.string().max(50).optional(),
257
+ tax_id: z.string().max(20).optional(),
258
+ billing_address: CreateVoucherPaymentSourcePaymentSourceBillingAddressSchema.optional(),
259
+ });
260
+ const CreateVoucherPaymentSourcePaymentSourceBodySchema = z.looseObject({
261
+ customer_id: z.string().max(50),
262
+ voucher_payment_source: CreateVoucherPaymentSourcePaymentSourceVoucherPaymentSourceSchema.optional(),
263
+ });
264
+ export { CreateVoucherPaymentSourcePaymentSourceBodySchema };
265
+ //PaymentSource.createCard
266
+ const CreateCardPaymentSourceAdditionalInformationSchema = z.looseObject({});
267
+ const CreateCardPaymentSourceCardSchema = z.object({
268
+ gateway_account_id: z.string().max(50).optional(),
269
+ first_name: z.string().max(50).optional(),
270
+ last_name: z.string().max(50).optional(),
271
+ number: z.string().max(1500),
272
+ expiry_month: z.number().int().min(1).max(12),
273
+ expiry_year: z.number().int(),
274
+ cvv: z.string().max(520).optional(),
275
+ preferred_scheme: z
276
+ .enum(['cartes_bancaires', 'mastercard', 'visa'])
277
+ .optional(),
278
+ billing_addr1: z.string().max(150).optional(),
279
+ billing_addr2: z.string().max(150).optional(),
280
+ billing_city: z.string().max(50).optional(),
281
+ billing_state_code: z.string().max(50).optional(),
282
+ billing_state: z.string().max(50).optional(),
283
+ billing_zip: z.string().max(20).optional(),
284
+ billing_country: z.string().max(50).optional(),
285
+ additional_information: CreateCardPaymentSourceAdditionalInformationSchema.optional(),
286
+ });
287
+ const CreateCardPaymentSourceBodySchema = z.looseObject({
288
+ customer_id: z.string().max(50),
289
+ replace_primary_payment_source: z.boolean().default(false).optional(),
290
+ card: CreateCardPaymentSourceCardSchema.optional(),
291
+ });
292
+ export { CreateCardPaymentSourceBodySchema };
293
+ //PaymentSource.createBankAccount
294
+ const CreateBankAccountPaymentSourceBillingAddressSchema = z.looseObject({});
295
+ const CreateBankAccountPaymentSourceBankAccountSchema = z.object({
296
+ gateway_account_id: z.string().max(50).optional(),
297
+ iban: z.string().max(50).min(10).optional(),
298
+ first_name: z.string().max(150).optional(),
299
+ last_name: z.string().max(150).optional(),
300
+ company: z.string().max(250).optional(),
301
+ email: z.string().email().max(70).optional(),
302
+ phone: z.string().max(50).optional(),
303
+ bank_name: z.string().max(100).optional(),
304
+ account_number: z.string().max(17).min(4).optional(),
305
+ routing_number: z.string().max(9).min(3).optional(),
306
+ bank_code: z.string().max(20).optional(),
307
+ account_type: z
308
+ .enum(['checking', 'savings', 'business_checking', 'current'])
309
+ .optional(),
310
+ account_holder_type: z.enum(['individual', 'company']).optional(),
311
+ echeck_type: z.enum(['web', 'ppd', 'ccd']).optional(),
312
+ swedish_identity_number: z.string().max(12).min(10).optional(),
313
+ billing_address: CreateBankAccountPaymentSourceBillingAddressSchema.optional(),
314
+ });
315
+ const CreateBankAccountPaymentSourceBodySchema = z.looseObject({
316
+ customer_id: z.string().max(50),
317
+ issuing_country: z.string().max(50).optional(),
318
+ replace_primary_payment_source: z.boolean().default(false).optional(),
319
+ bank_account: CreateBankAccountPaymentSourceBankAccountSchema.optional(),
320
+ });
321
+ export { CreateBankAccountPaymentSourceBodySchema };
322
+ //PaymentSource.updateCard
323
+ const UpdateCardPaymentSourceGatewayMetaDataSchema = z.looseObject({});
324
+ const UpdateCardPaymentSourceAdditionalInformationSchema = z.looseObject({});
325
+ const UpdateCardPaymentSourceCardSchema = z.object({
326
+ first_name: z.string().max(50).optional(),
327
+ last_name: z.string().max(50).optional(),
328
+ expiry_month: z.number().int().min(1).max(12).optional(),
329
+ expiry_year: z.number().int().optional(),
330
+ billing_addr1: z.string().max(150).optional(),
331
+ billing_addr2: z.string().max(150).optional(),
332
+ billing_city: z.string().max(50).optional(),
333
+ billing_zip: z.string().max(20).optional(),
334
+ billing_state_code: z.string().max(50).optional(),
335
+ billing_state: z.string().max(50).optional(),
336
+ billing_country: z.string().max(50).optional(),
337
+ additional_information: UpdateCardPaymentSourceAdditionalInformationSchema.optional(),
338
+ });
339
+ const UpdateCardPaymentSourceBodySchema = z.looseObject({
340
+ gateway_meta_data: UpdateCardPaymentSourceGatewayMetaDataSchema.optional(),
341
+ reference_transaction: z.string().max(50).optional(),
342
+ card: UpdateCardPaymentSourceCardSchema.optional(),
343
+ });
344
+ export { UpdateCardPaymentSourceBodySchema };
345
+ //PaymentSource.updateBankAccount
346
+ const UpdateBankAccountPaymentSourceBankAccountSchema = z.object({
347
+ first_name: z.string().max(150).optional(),
348
+ last_name: z.string().max(150).optional(),
349
+ email: z.string().email().max(70).optional(),
350
+ });
351
+ const UpdateBankAccountPaymentSourceBodySchema = z.looseObject({
352
+ bank_account: UpdateBankAccountPaymentSourceBankAccountSchema.optional(),
353
+ });
354
+ export { UpdateBankAccountPaymentSourceBodySchema };
355
+ //PaymentSource.verifyBankAccount
356
+ const VerifyBankAccountPaymentSourceBodySchema = z.looseObject({
357
+ amount1: z.number().int().min(0),
358
+ amount2: z.number().int().min(0),
359
+ });
360
+ export { VerifyBankAccountPaymentSourceBodySchema };
361
+ //PaymentSource.list
362
+ const ListPaymentSourceCustomerIdSchema = z.object({
363
+ is: z.string().min(1).optional(),
364
+ is_not: z.string().min(1).optional(),
365
+ starts_with: z.string().min(1).optional(),
366
+ in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
367
+ not_in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
368
+ });
369
+ const ListPaymentSourceTypeSchema = z.object({
370
+ is: z
371
+ .enum([
372
+ 'card',
373
+ 'paypal_express_checkout',
374
+ 'amazon_payments',
375
+ 'direct_debit',
376
+ 'generic',
377
+ 'alipay',
378
+ 'unionpay',
379
+ 'apple_pay',
380
+ 'wechat_pay',
381
+ 'ideal',
382
+ 'google_pay',
383
+ 'sofort',
384
+ 'bancontact',
385
+ 'giropay',
386
+ 'dotpay',
387
+ 'upi',
388
+ 'netbanking_emandates',
389
+ 'venmo',
390
+ 'pay_to',
391
+ 'faster_payments',
392
+ 'sepa_instant_transfer',
393
+ 'automated_bank_transfer',
394
+ 'klarna_pay_now',
395
+ 'online_banking_poland',
396
+ 'payconiq_by_bancontact',
397
+ 'electronic_payment_standard',
398
+ 'kbc_payment_button',
399
+ 'pay_by_bank',
400
+ 'trustly',
401
+ 'stablecoin',
402
+ 'kakao_pay',
403
+ 'naver_pay',
404
+ 'revolut_pay',
405
+ 'cash_app_pay',
406
+ 'twint',
407
+ 'go_pay',
408
+ 'grab_pay',
409
+ 'pay_co',
410
+ 'after_pay',
411
+ 'swish',
412
+ 'payme',
413
+ 'pix',
414
+ 'klarna',
415
+ 'alipay_hk',
416
+ 'paypay',
417
+ 'gcash',
418
+ 'south_korean_cards',
419
+ ])
420
+ .optional(),
421
+ is_not: z
422
+ .enum([
423
+ 'card',
424
+ 'paypal_express_checkout',
425
+ 'amazon_payments',
426
+ 'direct_debit',
427
+ 'generic',
428
+ 'alipay',
429
+ 'unionpay',
430
+ 'apple_pay',
431
+ 'wechat_pay',
432
+ 'ideal',
433
+ 'google_pay',
434
+ 'sofort',
435
+ 'bancontact',
436
+ 'giropay',
437
+ 'dotpay',
438
+ 'upi',
439
+ 'netbanking_emandates',
440
+ 'venmo',
441
+ 'pay_to',
442
+ 'faster_payments',
443
+ 'sepa_instant_transfer',
444
+ 'automated_bank_transfer',
445
+ 'klarna_pay_now',
446
+ 'online_banking_poland',
447
+ 'payconiq_by_bancontact',
448
+ 'electronic_payment_standard',
449
+ 'kbc_payment_button',
450
+ 'pay_by_bank',
451
+ 'trustly',
452
+ 'stablecoin',
453
+ 'kakao_pay',
454
+ 'naver_pay',
455
+ 'revolut_pay',
456
+ 'cash_app_pay',
457
+ 'twint',
458
+ 'go_pay',
459
+ 'grab_pay',
460
+ 'pay_co',
461
+ 'after_pay',
462
+ 'swish',
463
+ 'payme',
464
+ 'pix',
465
+ 'klarna',
466
+ 'alipay_hk',
467
+ 'paypay',
468
+ 'gcash',
469
+ 'south_korean_cards',
470
+ ])
471
+ .optional(),
472
+ in: z
473
+ .enum([
474
+ 'card',
475
+ 'paypal_express_checkout',
476
+ 'amazon_payments',
477
+ 'direct_debit',
478
+ 'generic',
479
+ 'alipay',
480
+ 'unionpay',
481
+ 'apple_pay',
482
+ 'wechat_pay',
483
+ 'ideal',
484
+ 'google_pay',
485
+ 'sofort',
486
+ 'bancontact',
487
+ 'giropay',
488
+ 'dotpay',
489
+ 'upi',
490
+ 'netbanking_emandates',
491
+ 'venmo',
492
+ 'pay_to',
493
+ 'faster_payments',
494
+ 'sepa_instant_transfer',
495
+ 'automated_bank_transfer',
496
+ 'klarna_pay_now',
497
+ 'online_banking_poland',
498
+ 'payconiq_by_bancontact',
499
+ 'electronic_payment_standard',
500
+ 'kbc_payment_button',
501
+ 'pay_by_bank',
502
+ 'trustly',
503
+ 'stablecoin',
504
+ 'kakao_pay',
505
+ 'naver_pay',
506
+ 'revolut_pay',
507
+ 'cash_app_pay',
508
+ 'twint',
509
+ 'go_pay',
510
+ 'grab_pay',
511
+ 'pay_co',
512
+ 'after_pay',
513
+ 'swish',
514
+ 'payme',
515
+ 'pix',
516
+ 'klarna',
517
+ 'alipay_hk',
518
+ 'paypay',
519
+ 'gcash',
520
+ 'south_korean_cards',
521
+ ])
522
+ .optional(),
523
+ not_in: z
524
+ .enum([
525
+ 'card',
526
+ 'paypal_express_checkout',
527
+ 'amazon_payments',
528
+ 'direct_debit',
529
+ 'generic',
530
+ 'alipay',
531
+ 'unionpay',
532
+ 'apple_pay',
533
+ 'wechat_pay',
534
+ 'ideal',
535
+ 'google_pay',
536
+ 'sofort',
537
+ 'bancontact',
538
+ 'giropay',
539
+ 'dotpay',
540
+ 'upi',
541
+ 'netbanking_emandates',
542
+ 'venmo',
543
+ 'pay_to',
544
+ 'faster_payments',
545
+ 'sepa_instant_transfer',
546
+ 'automated_bank_transfer',
547
+ 'klarna_pay_now',
548
+ 'online_banking_poland',
549
+ 'payconiq_by_bancontact',
550
+ 'electronic_payment_standard',
551
+ 'kbc_payment_button',
552
+ 'pay_by_bank',
553
+ 'trustly',
554
+ 'stablecoin',
555
+ 'kakao_pay',
556
+ 'naver_pay',
557
+ 'revolut_pay',
558
+ 'cash_app_pay',
559
+ 'twint',
560
+ 'go_pay',
561
+ 'grab_pay',
562
+ 'pay_co',
563
+ 'after_pay',
564
+ 'swish',
565
+ 'payme',
566
+ 'pix',
567
+ 'klarna',
568
+ 'alipay_hk',
569
+ 'paypay',
570
+ 'gcash',
571
+ 'south_korean_cards',
572
+ ])
573
+ .optional(),
574
+ });
575
+ const ListPaymentSourceStatusSchema = z.object({
576
+ is: z
577
+ .enum(['valid', 'expiring', 'expired', 'invalid', 'pending_verification'])
578
+ .optional(),
579
+ is_not: z
580
+ .enum(['valid', 'expiring', 'expired', 'invalid', 'pending_verification'])
581
+ .optional(),
582
+ in: z
583
+ .enum(['valid', 'expiring', 'expired', 'invalid', 'pending_verification'])
584
+ .optional(),
585
+ not_in: z
586
+ .enum(['valid', 'expiring', 'expired', 'invalid', 'pending_verification'])
587
+ .optional(),
588
+ });
589
+ const ListPaymentSourceUpdatedAtSchema = z.object({
590
+ after: z.string().regex(RegExp('^\\d{10}$')).optional(),
591
+ before: z.string().regex(RegExp('^\\d{10}$')).optional(),
592
+ on: z.string().regex(RegExp('^\\d{10}$')).optional(),
593
+ between: z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
594
+ });
595
+ const ListPaymentSourceCreatedAtSchema = z.object({
596
+ after: z.string().regex(RegExp('^\\d{10}$')).optional(),
597
+ before: z.string().regex(RegExp('^\\d{10}$')).optional(),
598
+ on: z.string().regex(RegExp('^\\d{10}$')).optional(),
599
+ between: z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
600
+ });
601
+ const ListPaymentSourceSortBySchema = z.looseObject({
602
+ asc: z.enum(['created_at', 'updated_at']).optional(),
603
+ desc: z.enum(['created_at', 'updated_at']).optional(),
604
+ });
605
+ const ListPaymentSourceBodySchema = z.looseObject({
606
+ limit: z.number().int().min(1).max(100).optional(),
607
+ offset: z.string().max(1000).optional(),
608
+ subscription_id: z.string().max(50).optional(),
609
+ include_deleted: z.boolean().default(false).optional(),
610
+ customer_id: ListPaymentSourceCustomerIdSchema.optional(),
611
+ type: ListPaymentSourceTypeSchema.optional(),
612
+ status: ListPaymentSourceStatusSchema.optional(),
613
+ updated_at: ListPaymentSourceUpdatedAtSchema.optional(),
614
+ created_at: ListPaymentSourceCreatedAtSchema.optional(),
615
+ sort_by: ListPaymentSourceSortBySchema.optional(),
616
+ });
617
+ export { ListPaymentSourceBodySchema };
618
+ //PaymentSource.switchGatewayAccount
619
+ const SwitchGatewayAccountPaymentSourceBodySchema = z.looseObject({
620
+ gateway_account_id: z.string().max(50),
621
+ });
622
+ export { SwitchGatewayAccountPaymentSourceBodySchema };
623
+ //PaymentSource.exportPaymentSource
624
+ const ExportPaymentSourcePaymentSourceBodySchema = z.looseObject({
625
+ gateway_account_id: z.string().max(50),
626
+ });
627
+ export { ExportPaymentSourcePaymentSourceBodySchema };
@@ -0,0 +1,54 @@
1
+ // Generated Zod schemas: PaymentVoucher
2
+ // Actions: create, payment_vouchersForInvoice, payment_vouchersForCustomer
3
+ // Do not edit manually – regenerate via sdk-generator
4
+ import { z } from 'zod';
5
+ //PaymentVoucher.create
6
+ const CreatePaymentVoucherVoucherPaymentSourceSchema = z.object({
7
+ voucher_type: z.enum(['boleto']),
8
+ });
9
+ const CreatePaymentVoucherInvoiceAllocationsSchema = z.object({
10
+ invoice_id: z.array(z.string().max(50).optional()),
11
+ });
12
+ const CreatePaymentVoucherBodySchema = z.looseObject({
13
+ customer_id: z.string().max(50),
14
+ payment_source_id: z.string().max(40).optional(),
15
+ voucher_payment_source: CreatePaymentVoucherVoucherPaymentSourceSchema.optional(),
16
+ invoice_allocations: CreatePaymentVoucherInvoiceAllocationsSchema.optional(),
17
+ });
18
+ export { CreatePaymentVoucherBodySchema };
19
+ //PaymentVoucher.payment_vouchersForInvoice
20
+ const PaymentVouchersforinvoicePaymentVoucherStatusSchema = z.object({
21
+ is: z.enum(['active', 'consumed', 'expired', 'failure']).optional(),
22
+ 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(),
25
+ });
26
+ const PaymentVouchersforinvoicePaymentVoucherSortBySchema = z.looseObject({
27
+ asc: z.enum(['date', 'updated_at']).optional(),
28
+ desc: z.enum(['date', 'updated_at']).optional(),
29
+ });
30
+ const PaymentVouchersforinvoicePaymentVoucherBodySchema = z.looseObject({
31
+ limit: z.number().int().min(1).max(100).optional(),
32
+ offset: z.string().max(1000).optional(),
33
+ status: PaymentVouchersforinvoicePaymentVoucherStatusSchema.optional(),
34
+ sort_by: PaymentVouchersforinvoicePaymentVoucherSortBySchema.optional(),
35
+ });
36
+ export { PaymentVouchersforinvoicePaymentVoucherBodySchema };
37
+ //PaymentVoucher.payment_vouchersForCustomer
38
+ const PaymentVouchersforcustomerPaymentVoucherStatusSchema = z.object({
39
+ is: z.enum(['active', 'consumed', 'expired', 'failure']).optional(),
40
+ 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(),
43
+ });
44
+ const PaymentVouchersforcustomerPaymentVoucherSortBySchema = z.looseObject({
45
+ asc: z.enum(['date', 'updated_at']).optional(),
46
+ desc: z.enum(['date', 'updated_at']).optional(),
47
+ });
48
+ const PaymentVouchersforcustomerPaymentVoucherBodySchema = z.looseObject({
49
+ limit: z.number().int().min(1).max(100).optional(),
50
+ offset: z.string().max(1000).optional(),
51
+ status: PaymentVouchersforcustomerPaymentVoucherStatusSchema.optional(),
52
+ sort_by: PaymentVouchersforcustomerPaymentVoucherSortBySchema.optional(),
53
+ });
54
+ export { PaymentVouchersforcustomerPaymentVoucherBodySchema };