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,741 @@
1
+ // Generated Zod schemas: Transaction
2
+ // Actions: createAuthorization, recordRefund, reconcile, refund, list, transactionsForCustomer, transactionsForSubscription, paymentsForInvoice, deleteOfflineTransaction
3
+ // Do not edit manually – regenerate via sdk-generator
4
+ import { z } from 'zod';
5
+ //Transaction.createAuthorization
6
+ const CreateAuthorizationTransactionBodySchema = z.looseObject({
7
+ customer_id: z.string().max(50),
8
+ payment_source_id: z.string().max(40).optional(),
9
+ currency_code: z.string().max(3).optional(),
10
+ amount: z.number().int().min(1),
11
+ });
12
+ export { CreateAuthorizationTransactionBodySchema };
13
+ //Transaction.recordRefund
14
+ const RecordRefundTransactionBodySchema = z.looseObject({
15
+ amount: z.number().int().min(1).optional(),
16
+ payment_method: z.enum([
17
+ 'cash',
18
+ 'check',
19
+ 'chargeback',
20
+ 'bank_transfer',
21
+ 'other',
22
+ 'app_store',
23
+ 'play_store',
24
+ 'custom',
25
+ ]),
26
+ date: z.number().int(),
27
+ reference_number: z.string().max(100).optional(),
28
+ custom_payment_method_id: z.string().max(50).optional(),
29
+ comment: z.string().max(300).optional(),
30
+ });
31
+ export { RecordRefundTransactionBodySchema };
32
+ //Transaction.reconcile
33
+ const ReconcileTransactionBodySchema = z.looseObject({
34
+ id_at_gateway: z.string().max(100).optional(),
35
+ customer_id: z.string().max(50).optional(),
36
+ status: z.enum(['success', 'failure']).optional(),
37
+ });
38
+ export { ReconcileTransactionBodySchema };
39
+ //Transaction.refund
40
+ const RefundTransactionBodySchema = z.looseObject({
41
+ amount: z.number().int().min(1).optional(),
42
+ comment: z.string().max(300).optional(),
43
+ });
44
+ export { RefundTransactionBodySchema };
45
+ //Transaction.list
46
+ const ListTransactionIdSchema = z.object({
47
+ is: z.string().min(1).optional(),
48
+ is_not: z.string().min(1).optional(),
49
+ starts_with: z.string().min(1).optional(),
50
+ in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
51
+ not_in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
52
+ });
53
+ const ListTransactionCustomerIdSchema = z.object({
54
+ is: z.string().min(1).optional(),
55
+ is_not: z.string().min(1).optional(),
56
+ starts_with: z.string().min(1).optional(),
57
+ is_present: z.enum(['true', 'false']).optional(),
58
+ in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
59
+ not_in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
60
+ });
61
+ const ListTransactionSubscriptionIdSchema = z.object({
62
+ is: z.string().min(1).optional(),
63
+ is_not: z.string().min(1).optional(),
64
+ starts_with: z.string().min(1).optional(),
65
+ is_present: z.enum(['true', 'false']).optional(),
66
+ in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
67
+ not_in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
68
+ });
69
+ const ListTransactionPaymentSourceIdSchema = z.object({
70
+ is: z.string().min(1).optional(),
71
+ is_not: z.string().min(1).optional(),
72
+ starts_with: z.string().min(1).optional(),
73
+ is_present: z.enum(['true', 'false']).optional(),
74
+ in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
75
+ not_in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
76
+ });
77
+ const ListTransactionPaymentMethodSchema = z.object({
78
+ is: z
79
+ .enum([
80
+ 'card',
81
+ 'cash',
82
+ 'check',
83
+ 'chargeback',
84
+ 'bank_transfer',
85
+ 'amazon_payments',
86
+ 'paypal_express_checkout',
87
+ 'direct_debit',
88
+ 'alipay',
89
+ 'unionpay',
90
+ 'apple_pay',
91
+ 'wechat_pay',
92
+ 'ach_credit',
93
+ 'sepa_credit',
94
+ 'ideal',
95
+ 'google_pay',
96
+ 'sofort',
97
+ 'bancontact',
98
+ 'giropay',
99
+ 'dotpay',
100
+ 'other',
101
+ 'app_store',
102
+ 'upi',
103
+ 'netbanking_emandates',
104
+ 'play_store',
105
+ 'custom',
106
+ 'boleto',
107
+ 'venmo',
108
+ 'pay_to',
109
+ 'faster_payments',
110
+ 'sepa_instant_transfer',
111
+ 'automated_bank_transfer',
112
+ 'klarna_pay_now',
113
+ 'online_banking_poland',
114
+ 'payconiq_by_bancontact',
115
+ 'electronic_payment_standard',
116
+ 'kbc_payment_button',
117
+ 'pay_by_bank',
118
+ 'trustly',
119
+ 'stablecoin',
120
+ 'kakao_pay',
121
+ 'naver_pay',
122
+ 'revolut_pay',
123
+ 'cash_app_pay',
124
+ 'pix',
125
+ 'twint',
126
+ 'go_pay',
127
+ 'grab_pay',
128
+ 'pay_co',
129
+ 'after_pay',
130
+ 'swish',
131
+ 'payme',
132
+ 'klarna',
133
+ 'alipay_hk',
134
+ 'paypay',
135
+ 'gcash',
136
+ 'south_korean_cards',
137
+ ])
138
+ .optional(),
139
+ is_not: z
140
+ .enum([
141
+ 'card',
142
+ 'cash',
143
+ 'check',
144
+ 'chargeback',
145
+ 'bank_transfer',
146
+ 'amazon_payments',
147
+ 'paypal_express_checkout',
148
+ 'direct_debit',
149
+ 'alipay',
150
+ 'unionpay',
151
+ 'apple_pay',
152
+ 'wechat_pay',
153
+ 'ach_credit',
154
+ 'sepa_credit',
155
+ 'ideal',
156
+ 'google_pay',
157
+ 'sofort',
158
+ 'bancontact',
159
+ 'giropay',
160
+ 'dotpay',
161
+ 'other',
162
+ 'app_store',
163
+ 'upi',
164
+ 'netbanking_emandates',
165
+ 'play_store',
166
+ 'custom',
167
+ 'boleto',
168
+ 'venmo',
169
+ 'pay_to',
170
+ 'faster_payments',
171
+ 'sepa_instant_transfer',
172
+ 'automated_bank_transfer',
173
+ 'klarna_pay_now',
174
+ 'online_banking_poland',
175
+ 'payconiq_by_bancontact',
176
+ 'electronic_payment_standard',
177
+ 'kbc_payment_button',
178
+ 'pay_by_bank',
179
+ 'trustly',
180
+ 'stablecoin',
181
+ 'kakao_pay',
182
+ 'naver_pay',
183
+ 'revolut_pay',
184
+ 'cash_app_pay',
185
+ 'pix',
186
+ 'twint',
187
+ 'go_pay',
188
+ 'grab_pay',
189
+ 'pay_co',
190
+ 'after_pay',
191
+ 'swish',
192
+ 'payme',
193
+ 'klarna',
194
+ 'alipay_hk',
195
+ 'paypay',
196
+ 'gcash',
197
+ 'south_korean_cards',
198
+ ])
199
+ .optional(),
200
+ in: z
201
+ .enum([
202
+ 'card',
203
+ 'cash',
204
+ 'check',
205
+ 'chargeback',
206
+ 'bank_transfer',
207
+ 'amazon_payments',
208
+ 'paypal_express_checkout',
209
+ 'direct_debit',
210
+ 'alipay',
211
+ 'unionpay',
212
+ 'apple_pay',
213
+ 'wechat_pay',
214
+ 'ach_credit',
215
+ 'sepa_credit',
216
+ 'ideal',
217
+ 'google_pay',
218
+ 'sofort',
219
+ 'bancontact',
220
+ 'giropay',
221
+ 'dotpay',
222
+ 'other',
223
+ 'app_store',
224
+ 'upi',
225
+ 'netbanking_emandates',
226
+ 'play_store',
227
+ 'custom',
228
+ 'boleto',
229
+ 'venmo',
230
+ 'pay_to',
231
+ 'faster_payments',
232
+ 'sepa_instant_transfer',
233
+ 'automated_bank_transfer',
234
+ 'klarna_pay_now',
235
+ 'online_banking_poland',
236
+ 'payconiq_by_bancontact',
237
+ 'electronic_payment_standard',
238
+ 'kbc_payment_button',
239
+ 'pay_by_bank',
240
+ 'trustly',
241
+ 'stablecoin',
242
+ 'kakao_pay',
243
+ 'naver_pay',
244
+ 'revolut_pay',
245
+ 'cash_app_pay',
246
+ 'pix',
247
+ 'twint',
248
+ 'go_pay',
249
+ 'grab_pay',
250
+ 'pay_co',
251
+ 'after_pay',
252
+ 'swish',
253
+ 'payme',
254
+ 'klarna',
255
+ 'alipay_hk',
256
+ 'paypay',
257
+ 'gcash',
258
+ 'south_korean_cards',
259
+ ])
260
+ .optional(),
261
+ not_in: z
262
+ .enum([
263
+ 'card',
264
+ 'cash',
265
+ 'check',
266
+ 'chargeback',
267
+ 'bank_transfer',
268
+ 'amazon_payments',
269
+ 'paypal_express_checkout',
270
+ 'direct_debit',
271
+ 'alipay',
272
+ 'unionpay',
273
+ 'apple_pay',
274
+ 'wechat_pay',
275
+ 'ach_credit',
276
+ 'sepa_credit',
277
+ 'ideal',
278
+ 'google_pay',
279
+ 'sofort',
280
+ 'bancontact',
281
+ 'giropay',
282
+ 'dotpay',
283
+ 'other',
284
+ 'app_store',
285
+ 'upi',
286
+ 'netbanking_emandates',
287
+ 'play_store',
288
+ 'custom',
289
+ 'boleto',
290
+ 'venmo',
291
+ 'pay_to',
292
+ 'faster_payments',
293
+ 'sepa_instant_transfer',
294
+ 'automated_bank_transfer',
295
+ 'klarna_pay_now',
296
+ 'online_banking_poland',
297
+ 'payconiq_by_bancontact',
298
+ 'electronic_payment_standard',
299
+ 'kbc_payment_button',
300
+ 'pay_by_bank',
301
+ 'trustly',
302
+ 'stablecoin',
303
+ 'kakao_pay',
304
+ 'naver_pay',
305
+ 'revolut_pay',
306
+ 'cash_app_pay',
307
+ 'pix',
308
+ 'twint',
309
+ 'go_pay',
310
+ 'grab_pay',
311
+ 'pay_co',
312
+ 'after_pay',
313
+ 'swish',
314
+ 'payme',
315
+ 'klarna',
316
+ 'alipay_hk',
317
+ 'paypay',
318
+ 'gcash',
319
+ 'south_korean_cards',
320
+ ])
321
+ .optional(),
322
+ });
323
+ const ListTransactionGatewaySchema = z.object({
324
+ is: z
325
+ .enum([
326
+ 'chargebee',
327
+ 'chargebee_payments',
328
+ 'adyen',
329
+ 'stripe',
330
+ 'wepay',
331
+ 'braintree',
332
+ 'authorize_net',
333
+ 'paypal_pro',
334
+ 'pin',
335
+ 'eway',
336
+ 'eway_rapid',
337
+ 'worldpay',
338
+ 'balanced_payments',
339
+ 'beanstream',
340
+ 'bluepay',
341
+ 'elavon',
342
+ 'first_data_global',
343
+ 'hdfc',
344
+ 'migs',
345
+ 'nmi',
346
+ 'ogone',
347
+ 'paymill',
348
+ 'paypal_payflow_pro',
349
+ 'sage_pay',
350
+ 'tco',
351
+ 'wirecard',
352
+ 'amazon_payments',
353
+ 'paypal_express_checkout',
354
+ 'gocardless',
355
+ 'orbital',
356
+ 'moneris_us',
357
+ 'moneris',
358
+ 'bluesnap',
359
+ 'cybersource',
360
+ 'vantiv',
361
+ 'checkout_com',
362
+ 'paypal',
363
+ 'ingenico_direct',
364
+ 'exact',
365
+ 'mollie',
366
+ 'quickbooks',
367
+ 'razorpay',
368
+ 'global_payments',
369
+ 'bank_of_america',
370
+ 'ecentric',
371
+ 'metrics_global',
372
+ 'windcave',
373
+ 'pay_com',
374
+ 'ebanx',
375
+ 'dlocal',
376
+ 'nuvei',
377
+ 'solidgate',
378
+ 'paystack',
379
+ 'jp_morgan',
380
+ 'deutsche_bank',
381
+ 'ezidebit',
382
+ 'twikey',
383
+ 'tempus',
384
+ 'moyasar',
385
+ 'payway',
386
+ 'not_applicable',
387
+ ])
388
+ .optional(),
389
+ is_not: z
390
+ .enum([
391
+ 'chargebee',
392
+ 'chargebee_payments',
393
+ 'adyen',
394
+ 'stripe',
395
+ 'wepay',
396
+ 'braintree',
397
+ 'authorize_net',
398
+ 'paypal_pro',
399
+ 'pin',
400
+ 'eway',
401
+ 'eway_rapid',
402
+ 'worldpay',
403
+ 'balanced_payments',
404
+ 'beanstream',
405
+ 'bluepay',
406
+ 'elavon',
407
+ 'first_data_global',
408
+ 'hdfc',
409
+ 'migs',
410
+ 'nmi',
411
+ 'ogone',
412
+ 'paymill',
413
+ 'paypal_payflow_pro',
414
+ 'sage_pay',
415
+ 'tco',
416
+ 'wirecard',
417
+ 'amazon_payments',
418
+ 'paypal_express_checkout',
419
+ 'gocardless',
420
+ 'orbital',
421
+ 'moneris_us',
422
+ 'moneris',
423
+ 'bluesnap',
424
+ 'cybersource',
425
+ 'vantiv',
426
+ 'checkout_com',
427
+ 'paypal',
428
+ 'ingenico_direct',
429
+ 'exact',
430
+ 'mollie',
431
+ 'quickbooks',
432
+ 'razorpay',
433
+ 'global_payments',
434
+ 'bank_of_america',
435
+ 'ecentric',
436
+ 'metrics_global',
437
+ 'windcave',
438
+ 'pay_com',
439
+ 'ebanx',
440
+ 'dlocal',
441
+ 'nuvei',
442
+ 'solidgate',
443
+ 'paystack',
444
+ 'jp_morgan',
445
+ 'deutsche_bank',
446
+ 'ezidebit',
447
+ 'twikey',
448
+ 'tempus',
449
+ 'moyasar',
450
+ 'payway',
451
+ 'not_applicable',
452
+ ])
453
+ .optional(),
454
+ in: z
455
+ .enum([
456
+ 'chargebee',
457
+ 'chargebee_payments',
458
+ 'adyen',
459
+ 'stripe',
460
+ 'wepay',
461
+ 'braintree',
462
+ 'authorize_net',
463
+ 'paypal_pro',
464
+ 'pin',
465
+ 'eway',
466
+ 'eway_rapid',
467
+ 'worldpay',
468
+ 'balanced_payments',
469
+ 'beanstream',
470
+ 'bluepay',
471
+ 'elavon',
472
+ 'first_data_global',
473
+ 'hdfc',
474
+ 'migs',
475
+ 'nmi',
476
+ 'ogone',
477
+ 'paymill',
478
+ 'paypal_payflow_pro',
479
+ 'sage_pay',
480
+ 'tco',
481
+ 'wirecard',
482
+ 'amazon_payments',
483
+ 'paypal_express_checkout',
484
+ 'gocardless',
485
+ 'orbital',
486
+ 'moneris_us',
487
+ 'moneris',
488
+ 'bluesnap',
489
+ 'cybersource',
490
+ 'vantiv',
491
+ 'checkout_com',
492
+ 'paypal',
493
+ 'ingenico_direct',
494
+ 'exact',
495
+ 'mollie',
496
+ 'quickbooks',
497
+ 'razorpay',
498
+ 'global_payments',
499
+ 'bank_of_america',
500
+ 'ecentric',
501
+ 'metrics_global',
502
+ 'windcave',
503
+ 'pay_com',
504
+ 'ebanx',
505
+ 'dlocal',
506
+ 'nuvei',
507
+ 'solidgate',
508
+ 'paystack',
509
+ 'jp_morgan',
510
+ 'deutsche_bank',
511
+ 'ezidebit',
512
+ 'twikey',
513
+ 'tempus',
514
+ 'moyasar',
515
+ 'payway',
516
+ 'not_applicable',
517
+ ])
518
+ .optional(),
519
+ not_in: z
520
+ .enum([
521
+ 'chargebee',
522
+ 'chargebee_payments',
523
+ 'adyen',
524
+ 'stripe',
525
+ 'wepay',
526
+ 'braintree',
527
+ 'authorize_net',
528
+ 'paypal_pro',
529
+ 'pin',
530
+ 'eway',
531
+ 'eway_rapid',
532
+ 'worldpay',
533
+ 'balanced_payments',
534
+ 'beanstream',
535
+ 'bluepay',
536
+ 'elavon',
537
+ 'first_data_global',
538
+ 'hdfc',
539
+ 'migs',
540
+ 'nmi',
541
+ 'ogone',
542
+ 'paymill',
543
+ 'paypal_payflow_pro',
544
+ 'sage_pay',
545
+ 'tco',
546
+ 'wirecard',
547
+ 'amazon_payments',
548
+ 'paypal_express_checkout',
549
+ 'gocardless',
550
+ 'orbital',
551
+ 'moneris_us',
552
+ 'moneris',
553
+ 'bluesnap',
554
+ 'cybersource',
555
+ 'vantiv',
556
+ 'checkout_com',
557
+ 'paypal',
558
+ 'ingenico_direct',
559
+ 'exact',
560
+ 'mollie',
561
+ 'quickbooks',
562
+ 'razorpay',
563
+ 'global_payments',
564
+ 'bank_of_america',
565
+ 'ecentric',
566
+ 'metrics_global',
567
+ 'windcave',
568
+ 'pay_com',
569
+ 'ebanx',
570
+ 'dlocal',
571
+ 'nuvei',
572
+ 'solidgate',
573
+ 'paystack',
574
+ 'jp_morgan',
575
+ 'deutsche_bank',
576
+ 'ezidebit',
577
+ 'twikey',
578
+ 'tempus',
579
+ 'moyasar',
580
+ 'payway',
581
+ 'not_applicable',
582
+ ])
583
+ .optional(),
584
+ });
585
+ const ListTransactionGatewayAccountIdSchema = z.object({
586
+ is: z.string().min(1).optional(),
587
+ is_not: z.string().min(1).optional(),
588
+ starts_with: z.string().min(1).optional(),
589
+ in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
590
+ not_in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
591
+ });
592
+ const ListTransactionIdAtGatewaySchema = z.object({
593
+ is: z.string().min(1).optional(),
594
+ is_not: z.string().min(1).optional(),
595
+ starts_with: z.string().min(1).optional(),
596
+ });
597
+ const ListTransactionReferenceNumberSchema = z.object({
598
+ is: z.string().min(1).optional(),
599
+ is_not: z.string().min(1).optional(),
600
+ starts_with: z.string().min(1).optional(),
601
+ is_present: z.enum(['true', 'false']).optional(),
602
+ });
603
+ const ListTransactionTypeSchema = z.object({
604
+ is: z
605
+ .enum(['authorization', 'payment', 'refund', 'payment_reversal'])
606
+ .optional(),
607
+ is_not: z
608
+ .enum(['authorization', 'payment', 'refund', 'payment_reversal'])
609
+ .optional(),
610
+ in: z
611
+ .enum(['authorization', 'payment', 'refund', 'payment_reversal'])
612
+ .optional(),
613
+ not_in: z
614
+ .enum(['authorization', 'payment', 'refund', 'payment_reversal'])
615
+ .optional(),
616
+ });
617
+ const ListTransactionDateSchema = z.object({
618
+ after: z.string().regex(RegExp('^\\d{10}$')).optional(),
619
+ before: z.string().regex(RegExp('^\\d{10}$')).optional(),
620
+ on: z.string().regex(RegExp('^\\d{10}$')).optional(),
621
+ between: z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
622
+ });
623
+ const ListTransactionAmountSchema = z.object({
624
+ is: z.string().regex(RegExp('^-?\\d+$')).optional(),
625
+ is_not: z.string().regex(RegExp('^-?\\d+$')).optional(),
626
+ lt: z.string().regex(RegExp('^-?\\d+$')).optional(),
627
+ lte: z.string().regex(RegExp('^-?\\d+$')).optional(),
628
+ gt: z.string().regex(RegExp('^-?\\d+$')).optional(),
629
+ gte: z.string().regex(RegExp('^-?\\d+$')).optional(),
630
+ between: z.string().regex(RegExp('^\\[-?\\d+,-?\\d+\\]$')).optional(),
631
+ });
632
+ const ListTransactionAmountCapturableSchema = z.object({
633
+ is: z.string().regex(RegExp('^-?\\d+$')).optional(),
634
+ is_not: z.string().regex(RegExp('^-?\\d+$')).optional(),
635
+ lt: z.string().regex(RegExp('^-?\\d+$')).optional(),
636
+ lte: z.string().regex(RegExp('^-?\\d+$')).optional(),
637
+ gt: z.string().regex(RegExp('^-?\\d+$')).optional(),
638
+ gte: z.string().regex(RegExp('^-?\\d+$')).optional(),
639
+ between: z.string().regex(RegExp('^\\[-?\\d+,-?\\d+\\]$')).optional(),
640
+ });
641
+ const ListTransactionStatusSchema = z.object({
642
+ is: z
643
+ .enum([
644
+ 'in_progress',
645
+ 'success',
646
+ 'voided',
647
+ 'failure',
648
+ 'timeout',
649
+ 'needs_attention',
650
+ 'late_failure',
651
+ ])
652
+ .optional(),
653
+ is_not: z
654
+ .enum([
655
+ 'in_progress',
656
+ 'success',
657
+ 'voided',
658
+ 'failure',
659
+ 'timeout',
660
+ 'needs_attention',
661
+ 'late_failure',
662
+ ])
663
+ .optional(),
664
+ in: z
665
+ .enum([
666
+ 'in_progress',
667
+ 'success',
668
+ 'voided',
669
+ 'failure',
670
+ 'timeout',
671
+ 'needs_attention',
672
+ 'late_failure',
673
+ ])
674
+ .optional(),
675
+ not_in: z
676
+ .enum([
677
+ 'in_progress',
678
+ 'success',
679
+ 'voided',
680
+ 'failure',
681
+ 'timeout',
682
+ 'needs_attention',
683
+ 'late_failure',
684
+ ])
685
+ .optional(),
686
+ });
687
+ const ListTransactionUpdatedAtSchema = z.object({
688
+ after: z.string().regex(RegExp('^\\d{10}$')).optional(),
689
+ before: z.string().regex(RegExp('^\\d{10}$')).optional(),
690
+ on: z.string().regex(RegExp('^\\d{10}$')).optional(),
691
+ between: z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
692
+ });
693
+ const ListTransactionSortBySchema = z.looseObject({
694
+ asc: z.enum(['date', 'updated_at']).optional(),
695
+ desc: z.enum(['date', 'updated_at']).optional(),
696
+ });
697
+ const ListTransactionBodySchema = z.looseObject({
698
+ limit: z.number().int().min(1).max(100).optional(),
699
+ offset: z.string().max(1000).optional(),
700
+ include_deleted: z.boolean().default(false).optional(),
701
+ id: ListTransactionIdSchema.optional(),
702
+ customer_id: ListTransactionCustomerIdSchema.optional(),
703
+ subscription_id: ListTransactionSubscriptionIdSchema.optional(),
704
+ payment_source_id: ListTransactionPaymentSourceIdSchema.optional(),
705
+ payment_method: ListTransactionPaymentMethodSchema.optional(),
706
+ gateway: ListTransactionGatewaySchema.optional(),
707
+ gateway_account_id: ListTransactionGatewayAccountIdSchema.optional(),
708
+ id_at_gateway: ListTransactionIdAtGatewaySchema.optional(),
709
+ reference_number: ListTransactionReferenceNumberSchema.optional(),
710
+ type: ListTransactionTypeSchema.optional(),
711
+ date: ListTransactionDateSchema.optional(),
712
+ amount: ListTransactionAmountSchema.optional(),
713
+ amount_capturable: ListTransactionAmountCapturableSchema.optional(),
714
+ status: ListTransactionStatusSchema.optional(),
715
+ updated_at: ListTransactionUpdatedAtSchema.optional(),
716
+ sort_by: ListTransactionSortBySchema.optional(),
717
+ });
718
+ export { ListTransactionBodySchema };
719
+ //Transaction.transactionsForCustomer
720
+ const TransactionsForCustomerTransactionBodySchema = z.looseObject({
721
+ limit: z.number().int().min(1).max(100).optional(),
722
+ offset: z.string().max(1000).optional(),
723
+ });
724
+ export { TransactionsForCustomerTransactionBodySchema };
725
+ //Transaction.transactionsForSubscription
726
+ const TransactionsForSubscriptionTransactionBodySchema = z.looseObject({
727
+ limit: z.number().int().min(1).max(100).optional(),
728
+ offset: z.string().max(1000).optional(),
729
+ });
730
+ export { TransactionsForSubscriptionTransactionBodySchema };
731
+ //Transaction.paymentsForInvoice
732
+ const PaymentsForInvoiceTransactionBodySchema = z.looseObject({
733
+ limit: z.number().int().min(1).max(100).optional(),
734
+ offset: z.string().max(1000).optional(),
735
+ });
736
+ export { PaymentsForInvoiceTransactionBodySchema };
737
+ //Transaction.deleteOfflineTransaction
738
+ const DeleteOfflineTransactionTransactionBodySchema = z.looseObject({
739
+ comment: z.string().max(300).optional(),
740
+ });
741
+ export { DeleteOfflineTransactionTransactionBodySchema };