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