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