chargebee 3.23.1 → 3.25.0-beta.1
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 +97 -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 +80 -2
- package/cjs/schema/addon.schema.js +153 -0
- package/cjs/schema/address.schema.js +35 -0
- package/cjs/schema/alert.schema.js +38 -0
- package/cjs/schema/attached_item.schema.js +58 -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 +209 -0
- package/cjs/schema/coupon_code.schema.js +14 -0
- package/cjs/schema/coupon_set.schema.js +28 -0
- package/cjs/schema/credit_note.schema.js +288 -0
- package/cjs/schema/currency.schema.js +32 -0
- package/cjs/schema/customer.schema.js +986 -0
- package/cjs/schema/customer_entitlement.schema.js +14 -0
- package/cjs/schema/differential_price.schema.js +68 -0
- package/cjs/schema/entitlement.schema.js +27 -0
- package/cjs/schema/entitlement_override.schema.js +33 -0
- package/cjs/schema/estimate.schema.js +1525 -0
- package/cjs/schema/export.schema.js +1545 -0
- package/cjs/schema/feature.schema.js +37 -0
- package/cjs/schema/gift.schema.js +277 -0
- package/cjs/schema/hosted_page.schema.js +1649 -0
- package/cjs/schema/in_app_subscription.schema.js +68 -0
- package/cjs/schema/index.js +80 -0
- package/cjs/schema/invoice.schema.js +1467 -0
- package/cjs/schema/item.schema.js +91 -0
- package/cjs/schema/item_entitlement.schema.js +45 -0
- package/cjs/schema/item_family.schema.js +21 -0
- package/cjs/schema/item_price.schema.js +190 -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 +89 -0
- package/cjs/schema/omnichannel_subscription_item.schema.js +13 -0
- package/cjs/schema/order.schema.js +273 -0
- package/cjs/schema/payment_intent.schema.js +117 -0
- package/cjs/schema/payment_schedule_scheme.schema.js +20 -0
- package/cjs/schema/payment_source.schema.js +358 -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 +225 -0
- package/cjs/schema/portal_session.schema.js +22 -0
- package/cjs/schema/price_variant.schema.js +36 -0
- package/cjs/schema/pricing_page_session.schema.js +135 -0
- package/cjs/schema/promotional_credit.schema.js +78 -0
- package/cjs/schema/purchase.schema.js +272 -0
- package/cjs/schema/quote.schema.js +1557 -0
- package/cjs/schema/ramp.schema.js +209 -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 +2993 -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 +70 -0
- package/cjs/schema/unbilled_charge.schema.js +113 -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 +43 -0
- package/cjs/schema/webhook_endpoint.schema.js +504 -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 +80 -2
- package/esm/schema/addon.schema.js +150 -0
- package/esm/schema/address.schema.js +32 -0
- package/esm/schema/alert.schema.js +35 -0
- package/esm/schema/attached_item.schema.js +55 -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 +206 -0
- package/esm/schema/coupon_code.schema.js +11 -0
- package/esm/schema/coupon_set.schema.js +25 -0
- package/esm/schema/credit_note.schema.js +285 -0
- package/esm/schema/currency.schema.js +29 -0
- package/esm/schema/customer.schema.js +983 -0
- package/esm/schema/customer_entitlement.schema.js +11 -0
- package/esm/schema/differential_price.schema.js +65 -0
- package/esm/schema/entitlement.schema.js +24 -0
- package/esm/schema/entitlement_override.schema.js +30 -0
- package/esm/schema/estimate.schema.js +1522 -0
- package/esm/schema/export.schema.js +1542 -0
- package/esm/schema/feature.schema.js +34 -0
- package/esm/schema/gift.schema.js +274 -0
- package/esm/schema/hosted_page.schema.js +1646 -0
- package/esm/schema/in_app_subscription.schema.js +65 -0
- package/esm/schema/index.js +64 -0
- package/esm/schema/invoice.schema.js +1464 -0
- package/esm/schema/item.schema.js +88 -0
- package/esm/schema/item_entitlement.schema.js +42 -0
- package/esm/schema/item_family.schema.js +18 -0
- package/esm/schema/item_price.schema.js +187 -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 +86 -0
- package/esm/schema/omnichannel_subscription_item.schema.js +10 -0
- package/esm/schema/order.schema.js +270 -0
- package/esm/schema/payment_intent.schema.js +114 -0
- package/esm/schema/payment_schedule_scheme.schema.js +17 -0
- package/esm/schema/payment_source.schema.js +355 -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 +222 -0
- package/esm/schema/portal_session.schema.js +19 -0
- package/esm/schema/price_variant.schema.js +33 -0
- package/esm/schema/pricing_page_session.schema.js +132 -0
- package/esm/schema/promotional_credit.schema.js +75 -0
- package/esm/schema/purchase.schema.js +269 -0
- package/esm/schema/quote.schema.js +1554 -0
- package/esm/schema/ramp.schema.js +206 -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 +2990 -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 +67 -0
- package/esm/schema/unbilled_charge.schema.js +110 -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 +40 -0
- package/esm/schema/webhook_endpoint.schema.js +501 -0
- package/esm/validationLoader.js +56 -0
- package/package.json +5 -2
- package/types/core.d.ts +34 -8
- package/types/index.d.ts +20 -0
- package/types/resources/Alert.d.ts +110 -4
- package/types/resources/AlertStatus.d.ts +43 -2
- package/types/resources/Card.d.ts +1 -0
- package/types/resources/Content.d.ts +2 -0
- package/types/resources/Customer.d.ts +16 -2
- package/types/resources/Estimate.d.ts +16 -2
- package/types/resources/Event.d.ts +4 -2
- package/types/resources/FilterCondition.d.ts +10 -0
- package/types/resources/Gift.d.ts +16 -2
- package/types/resources/Invoice.d.ts +17 -2
- package/types/resources/PaymentIntent.d.ts +42 -6
- package/types/resources/PaymentSource.d.ts +11 -2
- package/types/resources/Purchase.d.ts +8 -1
- package/types/resources/Quote.d.ts +2 -0
- package/types/resources/QuoteEntitlement.d.ts +16 -0
- package/types/resources/Subscription.d.ts +56 -7
- package/types/resources/VirtualBankAccount.d.ts +2 -0
|
@@ -0,0 +1,986 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Generated Zod schemas: Customer
|
|
3
|
+
// Actions: create, update, updatePaymentMethod, updateBillingInfo, contactsForCustomer, assignPaymentRole, addContact, updateContact, deleteContact, addPromotionalCredits, deductPromotionalCredits, setPromotionalCredits, recordExcessPayment, collectPayment, delete, move, changeBillingDate, merge, relationships, hierarchy, listHierarchyDetail, updateHierarchySettings
|
|
4
|
+
// Do not edit manually – regenerate via sdk-generator
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.UpdateHierarchySettingsCustomerBodySchema = exports.ListHierarchyDetailCustomerBodySchema = exports.HierarchyCustomerBodySchema = exports.RelationshipsCustomerBodySchema = exports.MergeCustomerBodySchema = exports.ChangeBillingDateCustomerBodySchema = exports.MoveCustomerBodySchema = exports.DeleteCustomerBodySchema = exports.CollectPaymentCustomerBodySchema = exports.RecordExcessPaymentCustomerBodySchema = exports.SetPromotionalCreditsCustomerBodySchema = exports.DeductPromotionalCreditsCustomerBodySchema = exports.AddPromotionalCreditsCustomerBodySchema = exports.DeleteContactCustomerBodySchema = exports.UpdateContactCustomerBodySchema = exports.AddContactCustomerBodySchema = exports.AssignPaymentRoleCustomerBodySchema = exports.ContactsForCustomerCustomerBodySchema = exports.UpdateBillingInfoCustomerBodySchema = exports.UpdatePaymentMethodCustomerBodySchema = exports.UpdateCustomerBodySchema = exports.CreateCustomerBodySchema = void 0;
|
|
7
|
+
const zod_1 = require("zod");
|
|
8
|
+
//Customer.create
|
|
9
|
+
const CreateCustomerMetaDataSchema = zod_1.z.looseObject({});
|
|
10
|
+
const CreateCustomerAdditionalInformationSchema = zod_1.z.looseObject({});
|
|
11
|
+
const CreateCustomerCardSchema = zod_1.z.object({
|
|
12
|
+
gateway: zod_1.z
|
|
13
|
+
.enum([
|
|
14
|
+
'chargebee',
|
|
15
|
+
'chargebee_payments',
|
|
16
|
+
'adyen',
|
|
17
|
+
'stripe',
|
|
18
|
+
'wepay',
|
|
19
|
+
'braintree',
|
|
20
|
+
'authorize_net',
|
|
21
|
+
'paypal_pro',
|
|
22
|
+
'pin',
|
|
23
|
+
'eway',
|
|
24
|
+
'eway_rapid',
|
|
25
|
+
'worldpay',
|
|
26
|
+
'balanced_payments',
|
|
27
|
+
'beanstream',
|
|
28
|
+
'bluepay',
|
|
29
|
+
'elavon',
|
|
30
|
+
'first_data_global',
|
|
31
|
+
'hdfc',
|
|
32
|
+
'migs',
|
|
33
|
+
'nmi',
|
|
34
|
+
'ogone',
|
|
35
|
+
'paymill',
|
|
36
|
+
'paypal_payflow_pro',
|
|
37
|
+
'sage_pay',
|
|
38
|
+
'tco',
|
|
39
|
+
'wirecard',
|
|
40
|
+
'amazon_payments',
|
|
41
|
+
'paypal_express_checkout',
|
|
42
|
+
'orbital',
|
|
43
|
+
'moneris_us',
|
|
44
|
+
'moneris',
|
|
45
|
+
'bluesnap',
|
|
46
|
+
'cybersource',
|
|
47
|
+
'vantiv',
|
|
48
|
+
'checkout_com',
|
|
49
|
+
'paypal',
|
|
50
|
+
'ingenico_direct',
|
|
51
|
+
'exact',
|
|
52
|
+
'mollie',
|
|
53
|
+
'quickbooks',
|
|
54
|
+
'razorpay',
|
|
55
|
+
'global_payments',
|
|
56
|
+
'bank_of_america',
|
|
57
|
+
'ecentric',
|
|
58
|
+
'metrics_global',
|
|
59
|
+
'windcave',
|
|
60
|
+
'pay_com',
|
|
61
|
+
'ebanx',
|
|
62
|
+
'dlocal',
|
|
63
|
+
'nuvei',
|
|
64
|
+
'solidgate',
|
|
65
|
+
'paystack',
|
|
66
|
+
'jp_morgan',
|
|
67
|
+
'deutsche_bank',
|
|
68
|
+
'ezidebit',
|
|
69
|
+
'twikey',
|
|
70
|
+
'tempus',
|
|
71
|
+
'moyasar',
|
|
72
|
+
'payway',
|
|
73
|
+
])
|
|
74
|
+
.optional(),
|
|
75
|
+
gateway_account_id: zod_1.z.string().max(50).optional(),
|
|
76
|
+
tmp_token: zod_1.z.string().max(300).optional(),
|
|
77
|
+
first_name: zod_1.z.string().max(50).optional(),
|
|
78
|
+
last_name: zod_1.z.string().max(50).optional(),
|
|
79
|
+
number: zod_1.z.string().max(1500).optional(),
|
|
80
|
+
expiry_month: zod_1.z.number().int().min(1).max(12).optional(),
|
|
81
|
+
expiry_year: zod_1.z.number().int().optional(),
|
|
82
|
+
cvv: zod_1.z.string().max(520).optional(),
|
|
83
|
+
preferred_scheme: zod_1.z
|
|
84
|
+
.enum(['cartes_bancaires', 'mastercard', 'visa'])
|
|
85
|
+
.optional(),
|
|
86
|
+
billing_addr1: zod_1.z.string().max(150).optional(),
|
|
87
|
+
billing_addr2: zod_1.z.string().max(150).optional(),
|
|
88
|
+
billing_city: zod_1.z.string().max(50).optional(),
|
|
89
|
+
billing_state_code: zod_1.z.string().max(50).optional(),
|
|
90
|
+
billing_state: zod_1.z.string().max(50).optional(),
|
|
91
|
+
billing_zip: zod_1.z.string().max(20).optional(),
|
|
92
|
+
billing_country: zod_1.z.string().max(50).optional(),
|
|
93
|
+
ip_address: zod_1.z.string().max(50).optional(),
|
|
94
|
+
additional_information: CreateCustomerAdditionalInformationSchema.optional(),
|
|
95
|
+
});
|
|
96
|
+
const CreateCustomerBillingAddressSchema = zod_1.z.looseObject({});
|
|
97
|
+
const CreateCustomerBankAccountSchema = zod_1.z.object({
|
|
98
|
+
gateway_account_id: zod_1.z.string().max(50).optional(),
|
|
99
|
+
iban: zod_1.z.string().max(50).min(10).optional(),
|
|
100
|
+
first_name: zod_1.z.string().max(150).optional(),
|
|
101
|
+
last_name: zod_1.z.string().max(150).optional(),
|
|
102
|
+
company: zod_1.z.string().max(250).optional(),
|
|
103
|
+
email: zod_1.z.string().email().max(70).optional(),
|
|
104
|
+
phone: zod_1.z.string().max(50).optional(),
|
|
105
|
+
bank_name: zod_1.z.string().max(100).optional(),
|
|
106
|
+
account_number: zod_1.z.string().max(17).min(4).optional(),
|
|
107
|
+
routing_number: zod_1.z.string().max(9).min(3).optional(),
|
|
108
|
+
bank_code: zod_1.z.string().max(20).optional(),
|
|
109
|
+
account_type: zod_1.z
|
|
110
|
+
.enum(['checking', 'savings', 'business_checking', 'current'])
|
|
111
|
+
.optional(),
|
|
112
|
+
account_holder_type: zod_1.z.enum(['individual', 'company']).optional(),
|
|
113
|
+
echeck_type: zod_1.z.enum(['web', 'ppd', 'ccd']).optional(),
|
|
114
|
+
issuing_country: zod_1.z.string().max(50).optional(),
|
|
115
|
+
swedish_identity_number: zod_1.z.string().max(12).min(10).optional(),
|
|
116
|
+
billing_address: CreateCustomerBillingAddressSchema.optional(),
|
|
117
|
+
});
|
|
118
|
+
const CreateCustomerPaymentMethodSchema = zod_1.z.object({
|
|
119
|
+
type: zod_1.z
|
|
120
|
+
.enum([
|
|
121
|
+
'card',
|
|
122
|
+
'paypal_express_checkout',
|
|
123
|
+
'amazon_payments',
|
|
124
|
+
'direct_debit',
|
|
125
|
+
'generic',
|
|
126
|
+
'alipay',
|
|
127
|
+
'unionpay',
|
|
128
|
+
'apple_pay',
|
|
129
|
+
'wechat_pay',
|
|
130
|
+
'ideal',
|
|
131
|
+
'google_pay',
|
|
132
|
+
'sofort',
|
|
133
|
+
'bancontact',
|
|
134
|
+
'giropay',
|
|
135
|
+
'dotpay',
|
|
136
|
+
'upi',
|
|
137
|
+
'netbanking_emandates',
|
|
138
|
+
'venmo',
|
|
139
|
+
'pay_to',
|
|
140
|
+
'faster_payments',
|
|
141
|
+
'sepa_instant_transfer',
|
|
142
|
+
'automated_bank_transfer',
|
|
143
|
+
'klarna_pay_now',
|
|
144
|
+
'online_banking_poland',
|
|
145
|
+
'payconiq_by_bancontact',
|
|
146
|
+
'electronic_payment_standard',
|
|
147
|
+
'kbc_payment_button',
|
|
148
|
+
'pay_by_bank',
|
|
149
|
+
'trustly',
|
|
150
|
+
'stablecoin',
|
|
151
|
+
'kakao_pay',
|
|
152
|
+
'naver_pay',
|
|
153
|
+
'revolut_pay',
|
|
154
|
+
'cash_app_pay',
|
|
155
|
+
'pix',
|
|
156
|
+
'twint',
|
|
157
|
+
'go_pay',
|
|
158
|
+
'grab_pay',
|
|
159
|
+
'pay_co',
|
|
160
|
+
'after_pay',
|
|
161
|
+
'swish',
|
|
162
|
+
'payme',
|
|
163
|
+
])
|
|
164
|
+
.optional(),
|
|
165
|
+
gateway: zod_1.z
|
|
166
|
+
.enum([
|
|
167
|
+
'chargebee_payments',
|
|
168
|
+
'adyen',
|
|
169
|
+
'stripe',
|
|
170
|
+
'wepay',
|
|
171
|
+
'braintree',
|
|
172
|
+
'authorize_net',
|
|
173
|
+
'paypal_pro',
|
|
174
|
+
'pin',
|
|
175
|
+
'eway',
|
|
176
|
+
'eway_rapid',
|
|
177
|
+
'worldpay',
|
|
178
|
+
'balanced_payments',
|
|
179
|
+
'beanstream',
|
|
180
|
+
'bluepay',
|
|
181
|
+
'elavon',
|
|
182
|
+
'first_data_global',
|
|
183
|
+
'hdfc',
|
|
184
|
+
'migs',
|
|
185
|
+
'nmi',
|
|
186
|
+
'ogone',
|
|
187
|
+
'paymill',
|
|
188
|
+
'paypal_payflow_pro',
|
|
189
|
+
'sage_pay',
|
|
190
|
+
'tco',
|
|
191
|
+
'wirecard',
|
|
192
|
+
'amazon_payments',
|
|
193
|
+
'paypal_express_checkout',
|
|
194
|
+
'gocardless',
|
|
195
|
+
'orbital',
|
|
196
|
+
'moneris_us',
|
|
197
|
+
'moneris',
|
|
198
|
+
'bluesnap',
|
|
199
|
+
'cybersource',
|
|
200
|
+
'vantiv',
|
|
201
|
+
'checkout_com',
|
|
202
|
+
'paypal',
|
|
203
|
+
'ingenico_direct',
|
|
204
|
+
'exact',
|
|
205
|
+
'mollie',
|
|
206
|
+
'quickbooks',
|
|
207
|
+
'razorpay',
|
|
208
|
+
'global_payments',
|
|
209
|
+
'bank_of_america',
|
|
210
|
+
'ecentric',
|
|
211
|
+
'metrics_global',
|
|
212
|
+
'windcave',
|
|
213
|
+
'pay_com',
|
|
214
|
+
'ebanx',
|
|
215
|
+
'dlocal',
|
|
216
|
+
'nuvei',
|
|
217
|
+
'solidgate',
|
|
218
|
+
'paystack',
|
|
219
|
+
'jp_morgan',
|
|
220
|
+
'deutsche_bank',
|
|
221
|
+
'ezidebit',
|
|
222
|
+
'twikey',
|
|
223
|
+
'tempus',
|
|
224
|
+
'moyasar',
|
|
225
|
+
'payway',
|
|
226
|
+
])
|
|
227
|
+
.optional(),
|
|
228
|
+
gateway_account_id: zod_1.z.string().max(50).optional(),
|
|
229
|
+
reference_id: zod_1.z.string().max(200).optional(),
|
|
230
|
+
tmp_token: zod_1.z.string().max(65000).optional(),
|
|
231
|
+
issuing_country: zod_1.z.string().max(50).optional(),
|
|
232
|
+
additional_information: CreateCustomerAdditionalInformationSchema.optional(),
|
|
233
|
+
});
|
|
234
|
+
const CreateCustomerPaymentIntentSchema = zod_1.z.object({
|
|
235
|
+
id: zod_1.z.string().max(150).optional(),
|
|
236
|
+
gateway_account_id: zod_1.z.string().max(50).optional(),
|
|
237
|
+
gw_token: zod_1.z.string().max(65000).optional(),
|
|
238
|
+
payment_method_type: zod_1.z
|
|
239
|
+
.enum([
|
|
240
|
+
'card',
|
|
241
|
+
'ideal',
|
|
242
|
+
'sofort',
|
|
243
|
+
'bancontact',
|
|
244
|
+
'google_pay',
|
|
245
|
+
'dotpay',
|
|
246
|
+
'giropay',
|
|
247
|
+
'apple_pay',
|
|
248
|
+
'upi',
|
|
249
|
+
'netbanking_emandates',
|
|
250
|
+
'paypal_express_checkout',
|
|
251
|
+
'direct_debit',
|
|
252
|
+
'boleto',
|
|
253
|
+
'venmo',
|
|
254
|
+
'amazon_payments',
|
|
255
|
+
'pay_to',
|
|
256
|
+
'faster_payments',
|
|
257
|
+
'sepa_instant_transfer',
|
|
258
|
+
'klarna_pay_now',
|
|
259
|
+
'online_banking_poland',
|
|
260
|
+
'payconiq_by_bancontact',
|
|
261
|
+
'electronic_payment_standard',
|
|
262
|
+
'kbc_payment_button',
|
|
263
|
+
'pay_by_bank',
|
|
264
|
+
'trustly',
|
|
265
|
+
'stablecoin',
|
|
266
|
+
'kakao_pay',
|
|
267
|
+
'naver_pay',
|
|
268
|
+
'revolut_pay',
|
|
269
|
+
'cash_app_pay',
|
|
270
|
+
'wechat_pay',
|
|
271
|
+
'alipay',
|
|
272
|
+
'pix',
|
|
273
|
+
'twint',
|
|
274
|
+
'go_pay',
|
|
275
|
+
'grab_pay',
|
|
276
|
+
'pay_co',
|
|
277
|
+
'after_pay',
|
|
278
|
+
'swish',
|
|
279
|
+
'payme',
|
|
280
|
+
])
|
|
281
|
+
.optional(),
|
|
282
|
+
reference_id: zod_1.z.string().max(65000).optional(),
|
|
283
|
+
gw_payment_method_id: zod_1.z.string().max(65000).optional(),
|
|
284
|
+
additional_information: CreateCustomerAdditionalInformationSchema.optional(),
|
|
285
|
+
});
|
|
286
|
+
const CreateCustomerEntityIdentifiersSchema = zod_1.z.object({
|
|
287
|
+
id: zod_1.z.array(zod_1.z.string().max(40).optional()).optional(),
|
|
288
|
+
scheme: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
|
|
289
|
+
value: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
|
|
290
|
+
standard: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
|
|
291
|
+
});
|
|
292
|
+
const CreateCustomerTaxProvidersFieldsSchema = zod_1.z.object({
|
|
293
|
+
provider_name: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
|
|
294
|
+
field_id: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
|
|
295
|
+
field_value: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
|
|
296
|
+
});
|
|
297
|
+
const CreateCustomerBodySchema = zod_1.z.looseObject({
|
|
298
|
+
id: zod_1.z.string().max(50).optional(),
|
|
299
|
+
first_name: zod_1.z.string().max(150).optional(),
|
|
300
|
+
last_name: zod_1.z.string().max(150).optional(),
|
|
301
|
+
email: zod_1.z.string().email().max(70).optional(),
|
|
302
|
+
preferred_currency_code: zod_1.z.string().max(3).optional(),
|
|
303
|
+
phone: zod_1.z.string().max(50).optional(),
|
|
304
|
+
company: zod_1.z.string().max(250).optional(),
|
|
305
|
+
auto_collection: zod_1.z.enum(['on', 'off']).optional(),
|
|
306
|
+
net_term_days: zod_1.z.number().int().optional(),
|
|
307
|
+
allow_direct_debit: zod_1.z.boolean().default(false).optional(),
|
|
308
|
+
vat_number: zod_1.z.string().max(20).optional(),
|
|
309
|
+
vat_number_prefix: zod_1.z.string().max(10).optional(),
|
|
310
|
+
entity_identifier_scheme: zod_1.z.string().max(50).optional(),
|
|
311
|
+
entity_identifier_standard: zod_1.z.string().max(50).optional(),
|
|
312
|
+
registered_for_gst: zod_1.z.boolean().optional(),
|
|
313
|
+
is_einvoice_enabled: zod_1.z.boolean().optional(),
|
|
314
|
+
einvoicing_method: zod_1.z.enum(['automatic', 'manual', 'site_default']).optional(),
|
|
315
|
+
taxability: zod_1.z.enum(['taxable', 'exempt']).optional(),
|
|
316
|
+
exemption_details: zod_1.z.array(zod_1.z.string().optional()).optional(),
|
|
317
|
+
customer_type: zod_1.z
|
|
318
|
+
.enum(['residential', 'business', 'senior_citizen', 'industrial'])
|
|
319
|
+
.optional(),
|
|
320
|
+
client_profile_id: zod_1.z.string().max(50).optional(),
|
|
321
|
+
taxjar_exemption_category: zod_1.z
|
|
322
|
+
.enum(['wholesale', 'government', 'other'])
|
|
323
|
+
.optional(),
|
|
324
|
+
business_customer_without_vat_number: zod_1.z.boolean().optional(),
|
|
325
|
+
locale: zod_1.z.string().max(50).optional(),
|
|
326
|
+
entity_code: zod_1.z
|
|
327
|
+
.enum([
|
|
328
|
+
'a',
|
|
329
|
+
'b',
|
|
330
|
+
'c',
|
|
331
|
+
'd',
|
|
332
|
+
'e',
|
|
333
|
+
'f',
|
|
334
|
+
'g',
|
|
335
|
+
'h',
|
|
336
|
+
'i',
|
|
337
|
+
'j',
|
|
338
|
+
'k',
|
|
339
|
+
'l',
|
|
340
|
+
'm',
|
|
341
|
+
'n',
|
|
342
|
+
'p',
|
|
343
|
+
'q',
|
|
344
|
+
'r',
|
|
345
|
+
'med1',
|
|
346
|
+
'med2',
|
|
347
|
+
])
|
|
348
|
+
.optional(),
|
|
349
|
+
exempt_number: zod_1.z.string().max(100).optional(),
|
|
350
|
+
meta_data: CreateCustomerMetaDataSchema.optional(),
|
|
351
|
+
offline_payment_method: zod_1.z
|
|
352
|
+
.enum([
|
|
353
|
+
'no_preference',
|
|
354
|
+
'cash',
|
|
355
|
+
'check',
|
|
356
|
+
'bank_transfer',
|
|
357
|
+
'ach_credit',
|
|
358
|
+
'sepa_credit',
|
|
359
|
+
'boleto',
|
|
360
|
+
'us_automated_bank_transfer',
|
|
361
|
+
'eu_automated_bank_transfer',
|
|
362
|
+
'uk_automated_bank_transfer',
|
|
363
|
+
'jp_automated_bank_transfer',
|
|
364
|
+
'mx_automated_bank_transfer',
|
|
365
|
+
'custom',
|
|
366
|
+
])
|
|
367
|
+
.optional(),
|
|
368
|
+
auto_close_invoices: zod_1.z.boolean().optional(),
|
|
369
|
+
consolidated_invoicing: zod_1.z.boolean().optional(),
|
|
370
|
+
token_id: zod_1.z.string().max(40).optional(),
|
|
371
|
+
business_entity_id: zod_1.z.string().max(50).optional(),
|
|
372
|
+
created_from_ip: zod_1.z.string().max(50).optional(),
|
|
373
|
+
invoice_notes: zod_1.z.string().max(2000).optional(),
|
|
374
|
+
card: CreateCustomerCardSchema.optional(),
|
|
375
|
+
bank_account: CreateCustomerBankAccountSchema.optional(),
|
|
376
|
+
payment_method: CreateCustomerPaymentMethodSchema.optional(),
|
|
377
|
+
payment_intent: CreateCustomerPaymentIntentSchema.optional(),
|
|
378
|
+
billing_address: CreateCustomerBillingAddressSchema.optional(),
|
|
379
|
+
entity_identifiers: CreateCustomerEntityIdentifiersSchema.optional(),
|
|
380
|
+
tax_providers_fields: CreateCustomerTaxProvidersFieldsSchema.optional(),
|
|
381
|
+
});
|
|
382
|
+
exports.CreateCustomerBodySchema = CreateCustomerBodySchema;
|
|
383
|
+
//Customer.update
|
|
384
|
+
const UpdateCustomerMetaDataSchema = zod_1.z.looseObject({});
|
|
385
|
+
const UpdateCustomerTaxProvidersFieldsSchema = zod_1.z.object({
|
|
386
|
+
provider_name: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
|
|
387
|
+
field_id: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
|
|
388
|
+
field_value: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
|
|
389
|
+
});
|
|
390
|
+
const UpdateCustomerBodySchema = zod_1.z.looseObject({
|
|
391
|
+
first_name: zod_1.z.string().max(150).optional(),
|
|
392
|
+
last_name: zod_1.z.string().max(150).optional(),
|
|
393
|
+
email: zod_1.z.string().email().max(70).optional(),
|
|
394
|
+
preferred_currency_code: zod_1.z.string().max(3).optional(),
|
|
395
|
+
phone: zod_1.z.string().max(50).optional(),
|
|
396
|
+
company: zod_1.z.string().max(250).optional(),
|
|
397
|
+
auto_collection: zod_1.z.enum(['on', 'off']).optional(),
|
|
398
|
+
allow_direct_debit: zod_1.z.boolean().default(false).optional(),
|
|
399
|
+
net_term_days: zod_1.z.number().int().optional(),
|
|
400
|
+
taxability: zod_1.z.enum(['taxable', 'exempt']).optional(),
|
|
401
|
+
exemption_details: zod_1.z.array(zod_1.z.string().optional()).optional(),
|
|
402
|
+
customer_type: zod_1.z
|
|
403
|
+
.enum(['residential', 'business', 'senior_citizen', 'industrial'])
|
|
404
|
+
.optional(),
|
|
405
|
+
client_profile_id: zod_1.z.string().max(50).optional(),
|
|
406
|
+
taxjar_exemption_category: zod_1.z
|
|
407
|
+
.enum(['wholesale', 'government', 'other'])
|
|
408
|
+
.optional(),
|
|
409
|
+
locale: zod_1.z.string().max(50).optional(),
|
|
410
|
+
entity_code: zod_1.z
|
|
411
|
+
.enum([
|
|
412
|
+
'a',
|
|
413
|
+
'b',
|
|
414
|
+
'c',
|
|
415
|
+
'd',
|
|
416
|
+
'e',
|
|
417
|
+
'f',
|
|
418
|
+
'g',
|
|
419
|
+
'h',
|
|
420
|
+
'i',
|
|
421
|
+
'j',
|
|
422
|
+
'k',
|
|
423
|
+
'l',
|
|
424
|
+
'm',
|
|
425
|
+
'n',
|
|
426
|
+
'p',
|
|
427
|
+
'q',
|
|
428
|
+
'r',
|
|
429
|
+
'med1',
|
|
430
|
+
'med2',
|
|
431
|
+
])
|
|
432
|
+
.optional(),
|
|
433
|
+
exempt_number: zod_1.z.string().max(100).optional(),
|
|
434
|
+
offline_payment_method: zod_1.z
|
|
435
|
+
.enum([
|
|
436
|
+
'no_preference',
|
|
437
|
+
'cash',
|
|
438
|
+
'check',
|
|
439
|
+
'bank_transfer',
|
|
440
|
+
'ach_credit',
|
|
441
|
+
'sepa_credit',
|
|
442
|
+
'boleto',
|
|
443
|
+
'us_automated_bank_transfer',
|
|
444
|
+
'eu_automated_bank_transfer',
|
|
445
|
+
'uk_automated_bank_transfer',
|
|
446
|
+
'jp_automated_bank_transfer',
|
|
447
|
+
'mx_automated_bank_transfer',
|
|
448
|
+
'custom',
|
|
449
|
+
])
|
|
450
|
+
.optional(),
|
|
451
|
+
invoice_notes: zod_1.z.string().max(2000).optional(),
|
|
452
|
+
auto_close_invoices: zod_1.z.boolean().optional(),
|
|
453
|
+
meta_data: UpdateCustomerMetaDataSchema.optional(),
|
|
454
|
+
fraud_flag: zod_1.z.enum(['safe', 'fraudulent']).optional(),
|
|
455
|
+
consolidated_invoicing: zod_1.z.boolean().optional(),
|
|
456
|
+
tax_providers_fields: UpdateCustomerTaxProvidersFieldsSchema.optional(),
|
|
457
|
+
});
|
|
458
|
+
exports.UpdateCustomerBodySchema = UpdateCustomerBodySchema;
|
|
459
|
+
//Customer.updatePaymentMethod
|
|
460
|
+
const UpdatePaymentMethodCustomerAdditionalInformationSchema = zod_1.z.looseObject({});
|
|
461
|
+
const UpdatePaymentMethodCustomerPaymentMethodSchema = zod_1.z.object({
|
|
462
|
+
type: zod_1.z.enum([
|
|
463
|
+
'card',
|
|
464
|
+
'paypal_express_checkout',
|
|
465
|
+
'amazon_payments',
|
|
466
|
+
'direct_debit',
|
|
467
|
+
'generic',
|
|
468
|
+
'alipay',
|
|
469
|
+
'unionpay',
|
|
470
|
+
'wechat_pay',
|
|
471
|
+
'ideal',
|
|
472
|
+
'google_pay',
|
|
473
|
+
'sofort',
|
|
474
|
+
'bancontact',
|
|
475
|
+
'giropay',
|
|
476
|
+
'dotpay',
|
|
477
|
+
'upi',
|
|
478
|
+
'netbanking_emandates',
|
|
479
|
+
'venmo',
|
|
480
|
+
'pay_to',
|
|
481
|
+
'faster_payments',
|
|
482
|
+
'sepa_instant_transfer',
|
|
483
|
+
'automated_bank_transfer',
|
|
484
|
+
'klarna_pay_now',
|
|
485
|
+
'online_banking_poland',
|
|
486
|
+
'payconiq_by_bancontact',
|
|
487
|
+
'electronic_payment_standard',
|
|
488
|
+
'kbc_payment_button',
|
|
489
|
+
'pay_by_bank',
|
|
490
|
+
'trustly',
|
|
491
|
+
'stablecoin',
|
|
492
|
+
'kakao_pay',
|
|
493
|
+
'naver_pay',
|
|
494
|
+
'revolut_pay',
|
|
495
|
+
'cash_app_pay',
|
|
496
|
+
'pix',
|
|
497
|
+
'twint',
|
|
498
|
+
'go_pay',
|
|
499
|
+
'grab_pay',
|
|
500
|
+
'pay_co',
|
|
501
|
+
'after_pay',
|
|
502
|
+
'swish',
|
|
503
|
+
'payme',
|
|
504
|
+
]),
|
|
505
|
+
gateway: zod_1.z
|
|
506
|
+
.enum([
|
|
507
|
+
'chargebee_payments',
|
|
508
|
+
'adyen',
|
|
509
|
+
'stripe',
|
|
510
|
+
'wepay',
|
|
511
|
+
'braintree',
|
|
512
|
+
'authorize_net',
|
|
513
|
+
'paypal_pro',
|
|
514
|
+
'pin',
|
|
515
|
+
'eway',
|
|
516
|
+
'eway_rapid',
|
|
517
|
+
'worldpay',
|
|
518
|
+
'balanced_payments',
|
|
519
|
+
'beanstream',
|
|
520
|
+
'bluepay',
|
|
521
|
+
'elavon',
|
|
522
|
+
'first_data_global',
|
|
523
|
+
'hdfc',
|
|
524
|
+
'migs',
|
|
525
|
+
'nmi',
|
|
526
|
+
'ogone',
|
|
527
|
+
'paymill',
|
|
528
|
+
'paypal_payflow_pro',
|
|
529
|
+
'sage_pay',
|
|
530
|
+
'tco',
|
|
531
|
+
'wirecard',
|
|
532
|
+
'amazon_payments',
|
|
533
|
+
'paypal_express_checkout',
|
|
534
|
+
'gocardless',
|
|
535
|
+
'orbital',
|
|
536
|
+
'moneris_us',
|
|
537
|
+
'moneris',
|
|
538
|
+
'bluesnap',
|
|
539
|
+
'cybersource',
|
|
540
|
+
'vantiv',
|
|
541
|
+
'checkout_com',
|
|
542
|
+
'paypal',
|
|
543
|
+
'ingenico_direct',
|
|
544
|
+
'exact',
|
|
545
|
+
'mollie',
|
|
546
|
+
'quickbooks',
|
|
547
|
+
'razorpay',
|
|
548
|
+
'global_payments',
|
|
549
|
+
'bank_of_america',
|
|
550
|
+
'ecentric',
|
|
551
|
+
'metrics_global',
|
|
552
|
+
'windcave',
|
|
553
|
+
'pay_com',
|
|
554
|
+
'ebanx',
|
|
555
|
+
'dlocal',
|
|
556
|
+
'nuvei',
|
|
557
|
+
'solidgate',
|
|
558
|
+
'paystack',
|
|
559
|
+
'jp_morgan',
|
|
560
|
+
'deutsche_bank',
|
|
561
|
+
'ezidebit',
|
|
562
|
+
'twikey',
|
|
563
|
+
'tempus',
|
|
564
|
+
'moyasar',
|
|
565
|
+
'payway',
|
|
566
|
+
])
|
|
567
|
+
.optional(),
|
|
568
|
+
gateway_account_id: zod_1.z.string().max(50).optional(),
|
|
569
|
+
reference_id: zod_1.z.string().max(200).optional(),
|
|
570
|
+
tmp_token: zod_1.z.string().max(65000).optional(),
|
|
571
|
+
issuing_country: zod_1.z.string().max(50).optional(),
|
|
572
|
+
additional_information: UpdatePaymentMethodCustomerAdditionalInformationSchema.optional(),
|
|
573
|
+
});
|
|
574
|
+
const UpdatePaymentMethodCustomerBodySchema = zod_1.z.looseObject({
|
|
575
|
+
payment_method: UpdatePaymentMethodCustomerPaymentMethodSchema.optional(),
|
|
576
|
+
});
|
|
577
|
+
exports.UpdatePaymentMethodCustomerBodySchema = UpdatePaymentMethodCustomerBodySchema;
|
|
578
|
+
//Customer.updateBillingInfo
|
|
579
|
+
const UpdateBillingInfoCustomerBillingAddressSchema = zod_1.z.object({
|
|
580
|
+
first_name: zod_1.z.string().max(150).optional(),
|
|
581
|
+
last_name: zod_1.z.string().max(150).optional(),
|
|
582
|
+
email: zod_1.z.string().email().max(70).optional(),
|
|
583
|
+
company: zod_1.z.string().max(250).optional(),
|
|
584
|
+
phone: zod_1.z.string().max(50).optional(),
|
|
585
|
+
line1: zod_1.z.string().max(150).optional(),
|
|
586
|
+
line2: zod_1.z.string().max(150).optional(),
|
|
587
|
+
line3: zod_1.z.string().max(150).optional(),
|
|
588
|
+
city: zod_1.z.string().max(50).optional(),
|
|
589
|
+
state_code: zod_1.z.string().max(50).optional(),
|
|
590
|
+
state: zod_1.z.string().max(50).optional(),
|
|
591
|
+
zip: zod_1.z.string().max(20).optional(),
|
|
592
|
+
country: zod_1.z.string().max(50).optional(),
|
|
593
|
+
validation_status: zod_1.z
|
|
594
|
+
.enum(['not_validated', 'valid', 'partially_valid', 'invalid'])
|
|
595
|
+
.optional(),
|
|
596
|
+
});
|
|
597
|
+
const UpdateBillingInfoCustomerEntityIdentifiersSchema = zod_1.z.object({
|
|
598
|
+
id: zod_1.z.array(zod_1.z.string().max(40).optional()).optional(),
|
|
599
|
+
scheme: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
|
|
600
|
+
value: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
|
|
601
|
+
operation: zod_1.z
|
|
602
|
+
.array(zod_1.z.enum(['create', 'update', 'delete']).optional())
|
|
603
|
+
.optional(),
|
|
604
|
+
standard: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
|
|
605
|
+
});
|
|
606
|
+
const UpdateBillingInfoCustomerTaxProvidersFieldsSchema = zod_1.z.object({
|
|
607
|
+
provider_name: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
|
|
608
|
+
field_id: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
|
|
609
|
+
field_value: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
|
|
610
|
+
});
|
|
611
|
+
const UpdateBillingInfoCustomerBodySchema = zod_1.z.looseObject({
|
|
612
|
+
vat_number: zod_1.z.string().max(20).optional(),
|
|
613
|
+
vat_number_prefix: zod_1.z.string().max(10).optional(),
|
|
614
|
+
entity_identifier_scheme: zod_1.z.string().max(50).optional(),
|
|
615
|
+
entity_identifier_standard: zod_1.z.string().max(50).optional(),
|
|
616
|
+
registered_for_gst: zod_1.z.boolean().optional(),
|
|
617
|
+
business_customer_without_vat_number: zod_1.z.boolean().optional(),
|
|
618
|
+
is_einvoice_enabled: zod_1.z.boolean().optional(),
|
|
619
|
+
einvoicing_method: zod_1.z.enum(['automatic', 'manual', 'site_default']).optional(),
|
|
620
|
+
billing_address: UpdateBillingInfoCustomerBillingAddressSchema.optional(),
|
|
621
|
+
entity_identifiers: UpdateBillingInfoCustomerEntityIdentifiersSchema.optional(),
|
|
622
|
+
tax_providers_fields: UpdateBillingInfoCustomerTaxProvidersFieldsSchema.optional(),
|
|
623
|
+
});
|
|
624
|
+
exports.UpdateBillingInfoCustomerBodySchema = UpdateBillingInfoCustomerBodySchema;
|
|
625
|
+
//Customer.contactsForCustomer
|
|
626
|
+
const ContactsForCustomerCustomerBodySchema = zod_1.z.looseObject({
|
|
627
|
+
limit: zod_1.z.number().int().min(1).max(100).optional(),
|
|
628
|
+
offset: zod_1.z.string().max(1000).optional(),
|
|
629
|
+
});
|
|
630
|
+
exports.ContactsForCustomerCustomerBodySchema = ContactsForCustomerCustomerBodySchema;
|
|
631
|
+
//Customer.assignPaymentRole
|
|
632
|
+
const AssignPaymentRoleCustomerBodySchema = zod_1.z.looseObject({
|
|
633
|
+
payment_source_id: zod_1.z.string().max(40),
|
|
634
|
+
role: zod_1.z.enum(['primary', 'backup', 'none']),
|
|
635
|
+
});
|
|
636
|
+
exports.AssignPaymentRoleCustomerBodySchema = AssignPaymentRoleCustomerBodySchema;
|
|
637
|
+
//Customer.addContact
|
|
638
|
+
const AddContactCustomerContactSchema = zod_1.z.object({
|
|
639
|
+
id: zod_1.z.string().max(150).optional(),
|
|
640
|
+
first_name: zod_1.z.string().max(150).optional(),
|
|
641
|
+
last_name: zod_1.z.string().max(150).optional(),
|
|
642
|
+
email: zod_1.z.string().email().max(70),
|
|
643
|
+
phone: zod_1.z.string().max(50).optional(),
|
|
644
|
+
label: zod_1.z.string().max(50).optional(),
|
|
645
|
+
enabled: zod_1.z.boolean().default(false).optional(),
|
|
646
|
+
send_billing_email: zod_1.z.boolean().default(false).optional(),
|
|
647
|
+
send_account_email: zod_1.z.boolean().default(false).optional(),
|
|
648
|
+
});
|
|
649
|
+
const AddContactCustomerBodySchema = zod_1.z.looseObject({
|
|
650
|
+
contact: AddContactCustomerContactSchema.optional(),
|
|
651
|
+
});
|
|
652
|
+
exports.AddContactCustomerBodySchema = AddContactCustomerBodySchema;
|
|
653
|
+
//Customer.updateContact
|
|
654
|
+
const UpdateContactCustomerContactSchema = zod_1.z.object({
|
|
655
|
+
id: zod_1.z.string().max(150),
|
|
656
|
+
first_name: zod_1.z.string().max(150).optional(),
|
|
657
|
+
last_name: zod_1.z.string().max(150).optional(),
|
|
658
|
+
email: zod_1.z.string().email().max(70).optional(),
|
|
659
|
+
phone: zod_1.z.string().max(50).optional(),
|
|
660
|
+
label: zod_1.z.string().max(50).optional(),
|
|
661
|
+
enabled: zod_1.z.boolean().default(false).optional(),
|
|
662
|
+
send_billing_email: zod_1.z.boolean().default(false).optional(),
|
|
663
|
+
send_account_email: zod_1.z.boolean().default(false).optional(),
|
|
664
|
+
});
|
|
665
|
+
const UpdateContactCustomerBodySchema = zod_1.z.looseObject({
|
|
666
|
+
contact: UpdateContactCustomerContactSchema.optional(),
|
|
667
|
+
});
|
|
668
|
+
exports.UpdateContactCustomerBodySchema = UpdateContactCustomerBodySchema;
|
|
669
|
+
//Customer.deleteContact
|
|
670
|
+
const DeleteContactCustomerContactSchema = zod_1.z.object({
|
|
671
|
+
id: zod_1.z.string().max(150),
|
|
672
|
+
});
|
|
673
|
+
const DeleteContactCustomerBodySchema = zod_1.z.looseObject({
|
|
674
|
+
contact: DeleteContactCustomerContactSchema.optional(),
|
|
675
|
+
});
|
|
676
|
+
exports.DeleteContactCustomerBodySchema = DeleteContactCustomerBodySchema;
|
|
677
|
+
//Customer.addPromotionalCredits
|
|
678
|
+
const AddPromotionalCreditsCustomerBodySchema = zod_1.z.looseObject({
|
|
679
|
+
amount: zod_1.z.number().int().min(1),
|
|
680
|
+
currency_code: zod_1.z.string().max(3).optional(),
|
|
681
|
+
description: zod_1.z.string().max(250),
|
|
682
|
+
credit_type: zod_1.z
|
|
683
|
+
.enum(['loyalty_credits', 'referral_rewards', 'general'])
|
|
684
|
+
.optional(),
|
|
685
|
+
reference: zod_1.z.string().max(500).optional(),
|
|
686
|
+
});
|
|
687
|
+
exports.AddPromotionalCreditsCustomerBodySchema = AddPromotionalCreditsCustomerBodySchema;
|
|
688
|
+
//Customer.deductPromotionalCredits
|
|
689
|
+
const DeductPromotionalCreditsCustomerBodySchema = zod_1.z.looseObject({
|
|
690
|
+
amount: zod_1.z.number().int().min(1),
|
|
691
|
+
currency_code: zod_1.z.string().max(3).optional(),
|
|
692
|
+
description: zod_1.z.string().max(250),
|
|
693
|
+
credit_type: zod_1.z
|
|
694
|
+
.enum(['loyalty_credits', 'referral_rewards', 'general'])
|
|
695
|
+
.optional(),
|
|
696
|
+
reference: zod_1.z.string().max(500).optional(),
|
|
697
|
+
});
|
|
698
|
+
exports.DeductPromotionalCreditsCustomerBodySchema = DeductPromotionalCreditsCustomerBodySchema;
|
|
699
|
+
//Customer.setPromotionalCredits
|
|
700
|
+
const SetPromotionalCreditsCustomerBodySchema = zod_1.z.looseObject({
|
|
701
|
+
amount: zod_1.z.number().int().min(0),
|
|
702
|
+
currency_code: zod_1.z.string().max(3).optional(),
|
|
703
|
+
description: zod_1.z.string().max(250),
|
|
704
|
+
credit_type: zod_1.z
|
|
705
|
+
.enum(['loyalty_credits', 'referral_rewards', 'general'])
|
|
706
|
+
.optional(),
|
|
707
|
+
reference: zod_1.z.string().max(500).optional(),
|
|
708
|
+
});
|
|
709
|
+
exports.SetPromotionalCreditsCustomerBodySchema = SetPromotionalCreditsCustomerBodySchema;
|
|
710
|
+
//Customer.recordExcessPayment
|
|
711
|
+
const RecordExcessPaymentCustomerTransactionSchema = zod_1.z.object({
|
|
712
|
+
id: zod_1.z.string().max(40).optional(),
|
|
713
|
+
amount: zod_1.z.number().int().min(0),
|
|
714
|
+
currency_code: zod_1.z.string().max(3).optional(),
|
|
715
|
+
date: zod_1.z.number().int(),
|
|
716
|
+
payment_method: zod_1.z.enum([
|
|
717
|
+
'cash',
|
|
718
|
+
'check',
|
|
719
|
+
'bank_transfer',
|
|
720
|
+
'other',
|
|
721
|
+
'app_store',
|
|
722
|
+
'play_store',
|
|
723
|
+
'custom',
|
|
724
|
+
]),
|
|
725
|
+
reference_number: zod_1.z.string().max(100).optional(),
|
|
726
|
+
custom_payment_method_id: zod_1.z.string().max(50).optional(),
|
|
727
|
+
});
|
|
728
|
+
const RecordExcessPaymentCustomerBodySchema = zod_1.z.looseObject({
|
|
729
|
+
comment: zod_1.z.string().max(300).optional(),
|
|
730
|
+
transaction: RecordExcessPaymentCustomerTransactionSchema.optional(),
|
|
731
|
+
});
|
|
732
|
+
exports.RecordExcessPaymentCustomerBodySchema = RecordExcessPaymentCustomerBodySchema;
|
|
733
|
+
//Customer.collectPayment
|
|
734
|
+
const CollectPaymentCustomerAdditionalInformationSchema = zod_1.z.looseObject({});
|
|
735
|
+
const CollectPaymentCustomerPaymentMethodSchema = zod_1.z.object({
|
|
736
|
+
type: zod_1.z
|
|
737
|
+
.enum([
|
|
738
|
+
'card',
|
|
739
|
+
'paypal_express_checkout',
|
|
740
|
+
'amazon_payments',
|
|
741
|
+
'direct_debit',
|
|
742
|
+
'generic',
|
|
743
|
+
'alipay',
|
|
744
|
+
'unionpay',
|
|
745
|
+
'apple_pay',
|
|
746
|
+
'wechat_pay',
|
|
747
|
+
'ideal',
|
|
748
|
+
'google_pay',
|
|
749
|
+
'sofort',
|
|
750
|
+
'bancontact',
|
|
751
|
+
'giropay',
|
|
752
|
+
'dotpay',
|
|
753
|
+
'upi',
|
|
754
|
+
'netbanking_emandates',
|
|
755
|
+
'venmo',
|
|
756
|
+
'pay_to',
|
|
757
|
+
'faster_payments',
|
|
758
|
+
'sepa_instant_transfer',
|
|
759
|
+
'automated_bank_transfer',
|
|
760
|
+
'klarna_pay_now',
|
|
761
|
+
'online_banking_poland',
|
|
762
|
+
'payconiq_by_bancontact',
|
|
763
|
+
'electronic_payment_standard',
|
|
764
|
+
'kbc_payment_button',
|
|
765
|
+
'pay_by_bank',
|
|
766
|
+
'trustly',
|
|
767
|
+
'stablecoin',
|
|
768
|
+
'kakao_pay',
|
|
769
|
+
'naver_pay',
|
|
770
|
+
'revolut_pay',
|
|
771
|
+
'cash_app_pay',
|
|
772
|
+
'pix',
|
|
773
|
+
'twint',
|
|
774
|
+
'go_pay',
|
|
775
|
+
'grab_pay',
|
|
776
|
+
'pay_co',
|
|
777
|
+
'after_pay',
|
|
778
|
+
'swish',
|
|
779
|
+
'payme',
|
|
780
|
+
])
|
|
781
|
+
.optional(),
|
|
782
|
+
gateway_account_id: zod_1.z.string().max(50).optional(),
|
|
783
|
+
reference_id: zod_1.z.string().max(200).optional(),
|
|
784
|
+
tmp_token: zod_1.z.string().max(65000).optional(),
|
|
785
|
+
additional_information: CollectPaymentCustomerAdditionalInformationSchema.optional(),
|
|
786
|
+
});
|
|
787
|
+
const CollectPaymentCustomerCardSchema = zod_1.z.object({
|
|
788
|
+
gateway_account_id: zod_1.z.string().max(50).optional(),
|
|
789
|
+
first_name: zod_1.z.string().max(50).optional(),
|
|
790
|
+
last_name: zod_1.z.string().max(50).optional(),
|
|
791
|
+
number: zod_1.z.string().max(1500).optional(),
|
|
792
|
+
expiry_month: zod_1.z.number().int().min(1).max(12).optional(),
|
|
793
|
+
expiry_year: zod_1.z.number().int().optional(),
|
|
794
|
+
cvv: zod_1.z.string().max(520).optional(),
|
|
795
|
+
preferred_scheme: zod_1.z
|
|
796
|
+
.enum(['cartes_bancaires', 'mastercard', 'visa'])
|
|
797
|
+
.optional(),
|
|
798
|
+
billing_addr1: zod_1.z.string().max(150).optional(),
|
|
799
|
+
billing_addr2: zod_1.z.string().max(150).optional(),
|
|
800
|
+
billing_city: zod_1.z.string().max(50).optional(),
|
|
801
|
+
billing_state_code: zod_1.z.string().max(50).optional(),
|
|
802
|
+
billing_state: zod_1.z.string().max(50).optional(),
|
|
803
|
+
billing_zip: zod_1.z.string().max(20).optional(),
|
|
804
|
+
billing_country: zod_1.z.string().max(50).optional(),
|
|
805
|
+
additional_information: CollectPaymentCustomerAdditionalInformationSchema.optional(),
|
|
806
|
+
});
|
|
807
|
+
const CollectPaymentCustomerPaymentIntentSchema = zod_1.z.object({
|
|
808
|
+
id: zod_1.z.string().max(150).optional(),
|
|
809
|
+
gateway_account_id: zod_1.z.string().max(50).optional(),
|
|
810
|
+
gw_token: zod_1.z.string().max(65000).optional(),
|
|
811
|
+
payment_method_type: zod_1.z
|
|
812
|
+
.enum([
|
|
813
|
+
'card',
|
|
814
|
+
'ideal',
|
|
815
|
+
'sofort',
|
|
816
|
+
'bancontact',
|
|
817
|
+
'google_pay',
|
|
818
|
+
'dotpay',
|
|
819
|
+
'giropay',
|
|
820
|
+
'apple_pay',
|
|
821
|
+
'upi',
|
|
822
|
+
'netbanking_emandates',
|
|
823
|
+
'paypal_express_checkout',
|
|
824
|
+
'direct_debit',
|
|
825
|
+
'boleto',
|
|
826
|
+
'venmo',
|
|
827
|
+
'amazon_payments',
|
|
828
|
+
'pay_to',
|
|
829
|
+
'faster_payments',
|
|
830
|
+
'sepa_instant_transfer',
|
|
831
|
+
'klarna_pay_now',
|
|
832
|
+
'online_banking_poland',
|
|
833
|
+
'payconiq_by_bancontact',
|
|
834
|
+
'electronic_payment_standard',
|
|
835
|
+
'kbc_payment_button',
|
|
836
|
+
'pay_by_bank',
|
|
837
|
+
'trustly',
|
|
838
|
+
'stablecoin',
|
|
839
|
+
'kakao_pay',
|
|
840
|
+
'naver_pay',
|
|
841
|
+
'revolut_pay',
|
|
842
|
+
'cash_app_pay',
|
|
843
|
+
'wechat_pay',
|
|
844
|
+
'alipay',
|
|
845
|
+
'pix',
|
|
846
|
+
'twint',
|
|
847
|
+
'go_pay',
|
|
848
|
+
'grab_pay',
|
|
849
|
+
'pay_co',
|
|
850
|
+
'after_pay',
|
|
851
|
+
'swish',
|
|
852
|
+
'payme',
|
|
853
|
+
])
|
|
854
|
+
.optional(),
|
|
855
|
+
gw_payment_method_id: zod_1.z.string().max(65000).optional(),
|
|
856
|
+
reference_id: zod_1.z.string().max(65000).optional(),
|
|
857
|
+
additional_information: CollectPaymentCustomerAdditionalInformationSchema.optional(),
|
|
858
|
+
});
|
|
859
|
+
const CollectPaymentCustomerInvoiceAllocationsSchema = zod_1.z.object({
|
|
860
|
+
invoice_id: zod_1.z.array(zod_1.z.string().max(50).optional()),
|
|
861
|
+
allocation_amount: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
|
|
862
|
+
});
|
|
863
|
+
const CollectPaymentCustomerBodySchema = zod_1.z.looseObject({
|
|
864
|
+
amount: zod_1.z.number().int().min(0).optional(),
|
|
865
|
+
payment_source_id: zod_1.z.string().max(40).optional(),
|
|
866
|
+
token_id: zod_1.z.string().max(40).optional(),
|
|
867
|
+
replace_primary_payment_source: zod_1.z.boolean().default(false).optional(),
|
|
868
|
+
retain_payment_source: zod_1.z.boolean().default(false).optional(),
|
|
869
|
+
payment_initiator: zod_1.z.enum(['customer', 'merchant']).optional(),
|
|
870
|
+
payment_method: CollectPaymentCustomerPaymentMethodSchema.optional(),
|
|
871
|
+
card: CollectPaymentCustomerCardSchema.optional(),
|
|
872
|
+
payment_intent: CollectPaymentCustomerPaymentIntentSchema.optional(),
|
|
873
|
+
invoice_allocations: CollectPaymentCustomerInvoiceAllocationsSchema.optional(),
|
|
874
|
+
});
|
|
875
|
+
exports.CollectPaymentCustomerBodySchema = CollectPaymentCustomerBodySchema;
|
|
876
|
+
//Customer.delete
|
|
877
|
+
const DeleteCustomerBodySchema = zod_1.z.looseObject({
|
|
878
|
+
delete_payment_method: zod_1.z.boolean().default(true).optional(),
|
|
879
|
+
});
|
|
880
|
+
exports.DeleteCustomerBodySchema = DeleteCustomerBodySchema;
|
|
881
|
+
//Customer.move
|
|
882
|
+
const MoveCustomerBodySchema = zod_1.z.looseObject({
|
|
883
|
+
id_at_from_site: zod_1.z.string().max(100),
|
|
884
|
+
from_site: zod_1.z.string().max(50),
|
|
885
|
+
});
|
|
886
|
+
exports.MoveCustomerBodySchema = MoveCustomerBodySchema;
|
|
887
|
+
//Customer.changeBillingDate
|
|
888
|
+
const ChangeBillingDateCustomerBodySchema = zod_1.z.looseObject({
|
|
889
|
+
billing_date: zod_1.z.number().int().min(1).max(31).optional(),
|
|
890
|
+
billing_month: zod_1.z.number().int().min(1).max(12).optional(),
|
|
891
|
+
billing_date_mode: zod_1.z.enum(['using_defaults', 'manually_set']).optional(),
|
|
892
|
+
billing_day_of_week: zod_1.z
|
|
893
|
+
.enum([
|
|
894
|
+
'sunday',
|
|
895
|
+
'monday',
|
|
896
|
+
'tuesday',
|
|
897
|
+
'wednesday',
|
|
898
|
+
'thursday',
|
|
899
|
+
'friday',
|
|
900
|
+
'saturday',
|
|
901
|
+
])
|
|
902
|
+
.optional(),
|
|
903
|
+
billing_day_of_week_mode: zod_1.z
|
|
904
|
+
.enum(['using_defaults', 'manually_set'])
|
|
905
|
+
.optional(),
|
|
906
|
+
});
|
|
907
|
+
exports.ChangeBillingDateCustomerBodySchema = ChangeBillingDateCustomerBodySchema;
|
|
908
|
+
//Customer.merge
|
|
909
|
+
const MergeCustomerBodySchema = zod_1.z.looseObject({
|
|
910
|
+
from_customer_id: zod_1.z.string().max(50),
|
|
911
|
+
to_customer_id: zod_1.z.string().max(50),
|
|
912
|
+
});
|
|
913
|
+
exports.MergeCustomerBodySchema = MergeCustomerBodySchema;
|
|
914
|
+
//Customer.relationships
|
|
915
|
+
const RelationshipsCustomerParentAccountAccessSchema = zod_1.z.object({
|
|
916
|
+
portal_edit_child_subscriptions: zod_1.z
|
|
917
|
+
.enum(['yes', 'view_only', 'no'])
|
|
918
|
+
.optional(),
|
|
919
|
+
portal_download_child_invoices: zod_1.z.enum(['yes', 'view_only', 'no']).optional(),
|
|
920
|
+
send_subscription_emails: zod_1.z.boolean().optional(),
|
|
921
|
+
send_payment_emails: zod_1.z.boolean().optional(),
|
|
922
|
+
send_invoice_emails: zod_1.z.boolean().optional(),
|
|
923
|
+
});
|
|
924
|
+
const RelationshipsCustomerChildAccountAccessSchema = zod_1.z.object({
|
|
925
|
+
portal_edit_subscriptions: zod_1.z.enum(['yes', 'view_only']).optional(),
|
|
926
|
+
portal_download_invoices: zod_1.z.enum(['yes', 'view_only', 'no']).optional(),
|
|
927
|
+
send_subscription_emails: zod_1.z.boolean().optional(),
|
|
928
|
+
send_payment_emails: zod_1.z.boolean().optional(),
|
|
929
|
+
send_invoice_emails: zod_1.z.boolean().optional(),
|
|
930
|
+
});
|
|
931
|
+
const RelationshipsCustomerBodySchema = zod_1.z.looseObject({
|
|
932
|
+
parent_id: zod_1.z.string().max(50).optional(),
|
|
933
|
+
payment_owner_id: zod_1.z.string().max(50).optional(),
|
|
934
|
+
invoice_owner_id: zod_1.z.string().max(50).optional(),
|
|
935
|
+
use_default_hierarchy_settings: zod_1.z.boolean().default(true).optional(),
|
|
936
|
+
parent_account_access: RelationshipsCustomerParentAccountAccessSchema.optional(),
|
|
937
|
+
child_account_access: RelationshipsCustomerChildAccountAccessSchema.optional(),
|
|
938
|
+
});
|
|
939
|
+
exports.RelationshipsCustomerBodySchema = RelationshipsCustomerBodySchema;
|
|
940
|
+
//Customer.hierarchy
|
|
941
|
+
const HierarchyCustomerBodySchema = zod_1.z.looseObject({
|
|
942
|
+
hierarchy_operation_type: zod_1.z.enum([
|
|
943
|
+
'complete_hierarchy',
|
|
944
|
+
'subordinates',
|
|
945
|
+
'path_to_root',
|
|
946
|
+
'subordinates_with_unbilled_charges_payable_by_parent',
|
|
947
|
+
'immediate_children',
|
|
948
|
+
]),
|
|
949
|
+
});
|
|
950
|
+
exports.HierarchyCustomerBodySchema = HierarchyCustomerBodySchema;
|
|
951
|
+
//Customer.listHierarchyDetail
|
|
952
|
+
const ListHierarchyDetailCustomerBodySchema = zod_1.z.looseObject({
|
|
953
|
+
limit: zod_1.z.number().int().min(1).max(100).optional(),
|
|
954
|
+
offset: zod_1.z.string().max(1000).optional(),
|
|
955
|
+
hierarchy_operation_type: zod_1.z.enum([
|
|
956
|
+
'complete_hierarchy',
|
|
957
|
+
'subordinates',
|
|
958
|
+
'path_to_root',
|
|
959
|
+
'subordinates_with_unbilled_charges_payable_by_parent',
|
|
960
|
+
'immediate_children',
|
|
961
|
+
]),
|
|
962
|
+
});
|
|
963
|
+
exports.ListHierarchyDetailCustomerBodySchema = ListHierarchyDetailCustomerBodySchema;
|
|
964
|
+
//Customer.updateHierarchySettings
|
|
965
|
+
const UpdateHierarchySettingsCustomerParentAccountAccessSchema = zod_1.z.object({
|
|
966
|
+
portal_edit_child_subscriptions: zod_1.z
|
|
967
|
+
.enum(['yes', 'view_only', 'no'])
|
|
968
|
+
.optional(),
|
|
969
|
+
portal_download_child_invoices: zod_1.z.enum(['yes', 'view_only', 'no']).optional(),
|
|
970
|
+
send_subscription_emails: zod_1.z.boolean().optional(),
|
|
971
|
+
send_payment_emails: zod_1.z.boolean().optional(),
|
|
972
|
+
send_invoice_emails: zod_1.z.boolean().optional(),
|
|
973
|
+
});
|
|
974
|
+
const UpdateHierarchySettingsCustomerChildAccountAccessSchema = zod_1.z.object({
|
|
975
|
+
portal_edit_subscriptions: zod_1.z.enum(['yes', 'view_only']).optional(),
|
|
976
|
+
portal_download_invoices: zod_1.z.enum(['yes', 'view_only', 'no']).optional(),
|
|
977
|
+
send_subscription_emails: zod_1.z.boolean().optional(),
|
|
978
|
+
send_payment_emails: zod_1.z.boolean().optional(),
|
|
979
|
+
send_invoice_emails: zod_1.z.boolean().optional(),
|
|
980
|
+
});
|
|
981
|
+
const UpdateHierarchySettingsCustomerBodySchema = zod_1.z.looseObject({
|
|
982
|
+
use_default_hierarchy_settings: zod_1.z.boolean().default(true).optional(),
|
|
983
|
+
parent_account_access: UpdateHierarchySettingsCustomerParentAccountAccessSchema.optional(),
|
|
984
|
+
child_account_access: UpdateHierarchySettingsCustomerChildAccountAccessSchema.optional(),
|
|
985
|
+
});
|
|
986
|
+
exports.UpdateHierarchySettingsCustomerBodySchema = UpdateHierarchySettingsCustomerBodySchema;
|