chargebee 3.26.0 → 3.28.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 (172) hide show
  1. package/CHANGELOG.md +14 -1
  2. package/README.md +131 -0
  3. package/cjs/RequestWrapper.js +130 -12
  4. package/cjs/chargebee.cjs.js +5 -0
  5. package/cjs/chargebee.cjs.worker.js +2 -0
  6. package/cjs/chargebeeZodValidationError.js +18 -0
  7. package/cjs/createChargebee.js +23 -2
  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/telemetry/TelemetryAdapter.js +145 -0
  82. package/cjs/telemetry/index.js +28 -0
  83. package/cjs/telemetry/otel.js +66 -0
  84. package/cjs/telemetry/types.js +47 -0
  85. package/cjs/validationLoader.js +59 -0
  86. package/esm/RequestWrapper.js +130 -12
  87. package/esm/chargebee.esm.js +3 -0
  88. package/esm/chargebee.esm.worker.js +1 -0
  89. package/esm/chargebeeZodValidationError.js +14 -0
  90. package/esm/createChargebee.js +23 -2
  91. package/esm/environment.js +1 -1
  92. package/esm/schema/addon.schema.js +266 -0
  93. package/esm/schema/address.schema.js +32 -0
  94. package/esm/schema/alert.schema.js +71 -0
  95. package/esm/schema/alert_status.schema.js +28 -0
  96. package/esm/schema/attached_item.schema.js +141 -0
  97. package/esm/schema/business_entity.schema.js +43 -0
  98. package/esm/schema/card.schema.js +162 -0
  99. package/esm/schema/comment.schema.js +66 -0
  100. package/esm/schema/coupon.schema.js +320 -0
  101. package/esm/schema/coupon_code.schema.js +46 -0
  102. package/esm/schema/coupon_set.schema.js +85 -0
  103. package/esm/schema/credit_note.schema.js +499 -0
  104. package/esm/schema/currency.schema.js +29 -0
  105. package/esm/schema/customer.schema.js +1198 -0
  106. package/esm/schema/customer_entitlement.schema.js +11 -0
  107. package/esm/schema/differential_price.schema.js +103 -0
  108. package/esm/schema/entitlement.schema.js +51 -0
  109. package/esm/schema/entitlement_override.schema.js +32 -0
  110. package/esm/schema/estimate.schema.js +1532 -0
  111. package/esm/schema/event.schema.js +1057 -0
  112. package/esm/schema/export.schema.js +3382 -0
  113. package/esm/schema/feature.schema.js +75 -0
  114. package/esm/schema/gift.schema.js +290 -0
  115. package/esm/schema/grant_block.schema.js +44 -0
  116. package/esm/schema/hosted_page.schema.js +1774 -0
  117. package/esm/schema/in_app_subscription.schema.js +65 -0
  118. package/esm/schema/index.js +72 -0
  119. package/esm/schema/invoice.schema.js +1682 -0
  120. package/esm/schema/item.schema.js +192 -0
  121. package/esm/schema/item_entitlement.schema.js +42 -0
  122. package/esm/schema/item_family.schema.js +54 -0
  123. package/esm/schema/item_price.schema.js +332 -0
  124. package/esm/schema/ledger_account_balance.schema.js +18 -0
  125. package/esm/schema/ledger_operation.schema.js +101 -0
  126. package/esm/schema/meter.schema.js +10 -0
  127. package/esm/schema/metered_feature.schema.js +17 -0
  128. package/esm/schema/non_subscription.schema.js +25 -0
  129. package/esm/schema/offer_event.schema.js +10 -0
  130. package/esm/schema/offer_fulfillment.schema.js +17 -0
  131. package/esm/schema/omnichannel_one_time_order.schema.js +23 -0
  132. package/esm/schema/omnichannel_subscription.schema.js +119 -0
  133. package/esm/schema/omnichannel_subscription_item.schema.js +10 -0
  134. package/esm/schema/order.schema.js +438 -0
  135. package/esm/schema/payment_intent.schema.js +124 -0
  136. package/esm/schema/payment_schedule_scheme.schema.js +17 -0
  137. package/esm/schema/payment_source.schema.js +627 -0
  138. package/esm/schema/payment_voucher.schema.js +54 -0
  139. package/esm/schema/personalized_offer.schema.js +25 -0
  140. package/esm/schema/plan.schema.js +360 -0
  141. package/esm/schema/portal_session.schema.js +19 -0
  142. package/esm/schema/price_variant.schema.js +90 -0
  143. package/esm/schema/pricing_page_session.schema.js +132 -0
  144. package/esm/schema/promotional_credit.schema.js +75 -0
  145. package/esm/schema/promotional_grant.schema.js +14 -0
  146. package/esm/schema/purchase.schema.js +274 -0
  147. package/esm/schema/quote.schema.js +1664 -0
  148. package/esm/schema/ramp.schema.js +242 -0
  149. package/esm/schema/recorded_purchase.schema.js +29 -0
  150. package/esm/schema/resource_migration.schema.js +11 -0
  151. package/esm/schema/site_migration_detail.schema.js +78 -0
  152. package/esm/schema/subscription.schema.js +3341 -0
  153. package/esm/schema/subscription_entitlement.schema.js +22 -0
  154. package/esm/schema/time_machine.schema.js +14 -0
  155. package/esm/schema/transaction.schema.js +741 -0
  156. package/esm/schema/unbilled_charge.schema.js +136 -0
  157. package/esm/schema/usage.schema.js +90 -0
  158. package/esm/schema/usage_charge.schema.js +14 -0
  159. package/esm/schema/usage_event.schema.js +25 -0
  160. package/esm/schema/usage_file.schema.js +10 -0
  161. package/esm/schema/usage_summary.schema.js +14 -0
  162. package/esm/schema/virtual_bank_account.schema.js +68 -0
  163. package/esm/schema/webhook_endpoint.schema.js +505 -0
  164. package/esm/telemetry/TelemetryAdapter.js +132 -0
  165. package/esm/telemetry/index.js +8 -0
  166. package/esm/telemetry/otel.js +62 -0
  167. package/esm/telemetry/types.js +44 -0
  168. package/esm/validationLoader.js +56 -0
  169. package/package.json +43 -24
  170. package/types/core.d.ts +2 -0
  171. package/types/index.d.ts +85 -0
  172. package/types/telemetry/otel.d.ts +22 -0
@@ -0,0 +1,1201 @@
1
+ "use strict";
2
+ // Generated Zod schemas: Customer
3
+ // Actions: create, list, 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.ListCustomerBodySchema = 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
+ 'twint',
156
+ 'go_pay',
157
+ 'grab_pay',
158
+ 'pay_co',
159
+ 'after_pay',
160
+ 'swish',
161
+ 'payme',
162
+ 'pix',
163
+ 'klarna',
164
+ 'alipay_hk',
165
+ 'paypay',
166
+ 'gcash',
167
+ 'south_korean_cards',
168
+ ])
169
+ .optional(),
170
+ gateway: zod_1.z
171
+ .enum([
172
+ 'chargebee_payments',
173
+ 'adyen',
174
+ 'stripe',
175
+ 'wepay',
176
+ 'braintree',
177
+ 'authorize_net',
178
+ 'paypal_pro',
179
+ 'pin',
180
+ 'eway',
181
+ 'eway_rapid',
182
+ 'worldpay',
183
+ 'balanced_payments',
184
+ 'beanstream',
185
+ 'bluepay',
186
+ 'elavon',
187
+ 'first_data_global',
188
+ 'hdfc',
189
+ 'migs',
190
+ 'nmi',
191
+ 'ogone',
192
+ 'paymill',
193
+ 'paypal_payflow_pro',
194
+ 'sage_pay',
195
+ 'tco',
196
+ 'wirecard',
197
+ 'amazon_payments',
198
+ 'paypal_express_checkout',
199
+ 'gocardless',
200
+ 'orbital',
201
+ 'moneris_us',
202
+ 'moneris',
203
+ 'bluesnap',
204
+ 'cybersource',
205
+ 'vantiv',
206
+ 'checkout_com',
207
+ 'paypal',
208
+ 'ingenico_direct',
209
+ 'exact',
210
+ 'mollie',
211
+ 'quickbooks',
212
+ 'razorpay',
213
+ 'global_payments',
214
+ 'bank_of_america',
215
+ 'ecentric',
216
+ 'metrics_global',
217
+ 'windcave',
218
+ 'pay_com',
219
+ 'ebanx',
220
+ 'dlocal',
221
+ 'nuvei',
222
+ 'solidgate',
223
+ 'paystack',
224
+ 'jp_morgan',
225
+ 'deutsche_bank',
226
+ 'ezidebit',
227
+ 'twikey',
228
+ 'tempus',
229
+ 'moyasar',
230
+ 'payway',
231
+ ])
232
+ .optional(),
233
+ gateway_account_id: zod_1.z.string().max(50).optional(),
234
+ reference_id: zod_1.z.string().max(200).optional(),
235
+ tmp_token: zod_1.z.string().max(65000).optional(),
236
+ issuing_country: zod_1.z.string().max(50).optional(),
237
+ additional_information: CreateCustomerAdditionalInformationSchema.optional(),
238
+ });
239
+ const CreateCustomerPaymentIntentSchema = zod_1.z.object({
240
+ id: zod_1.z.string().max(150).optional(),
241
+ gateway_account_id: zod_1.z.string().max(50).optional(),
242
+ gw_token: zod_1.z.string().max(65000).optional(),
243
+ payment_method_type: zod_1.z
244
+ .enum([
245
+ 'card',
246
+ 'ideal',
247
+ 'sofort',
248
+ 'bancontact',
249
+ 'google_pay',
250
+ 'dotpay',
251
+ 'giropay',
252
+ 'apple_pay',
253
+ 'upi',
254
+ 'netbanking_emandates',
255
+ 'paypal_express_checkout',
256
+ 'direct_debit',
257
+ 'boleto',
258
+ 'venmo',
259
+ 'amazon_payments',
260
+ 'pay_to',
261
+ 'faster_payments',
262
+ 'sepa_instant_transfer',
263
+ 'klarna_pay_now',
264
+ 'online_banking_poland',
265
+ 'payconiq_by_bancontact',
266
+ 'electronic_payment_standard',
267
+ 'kbc_payment_button',
268
+ 'pay_by_bank',
269
+ 'trustly',
270
+ 'stablecoin',
271
+ 'kakao_pay',
272
+ 'naver_pay',
273
+ 'revolut_pay',
274
+ 'cash_app_pay',
275
+ 'wechat_pay',
276
+ 'alipay',
277
+ 'twint',
278
+ 'go_pay',
279
+ 'grab_pay',
280
+ 'pay_co',
281
+ 'after_pay',
282
+ 'swish',
283
+ 'payme',
284
+ 'pix',
285
+ 'klarna',
286
+ 'alipay_hk',
287
+ 'paypay',
288
+ 'gcash',
289
+ 'south_korean_cards',
290
+ ])
291
+ .optional(),
292
+ reference_id: zod_1.z.string().max(65000).optional(),
293
+ gw_payment_method_id: zod_1.z.string().max(65000).optional(),
294
+ additional_information: CreateCustomerAdditionalInformationSchema.optional(),
295
+ });
296
+ const CreateCustomerEntityIdentifiersSchema = zod_1.z.object({
297
+ id: zod_1.z.array(zod_1.z.string().max(40).optional()).optional(),
298
+ scheme: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
299
+ value: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
300
+ standard: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
301
+ });
302
+ const CreateCustomerTaxProvidersFieldsSchema = zod_1.z.object({
303
+ provider_name: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
304
+ field_id: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
305
+ field_value: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
306
+ });
307
+ const CreateCustomerBodySchema = zod_1.z.looseObject({
308
+ id: zod_1.z.string().max(50).optional(),
309
+ first_name: zod_1.z.string().max(150).optional(),
310
+ last_name: zod_1.z.string().max(150).optional(),
311
+ email: zod_1.z.string().email().max(70).optional(),
312
+ preferred_currency_code: zod_1.z.string().max(3).optional(),
313
+ phone: zod_1.z.string().max(50).optional(),
314
+ company: zod_1.z.string().max(250).optional(),
315
+ auto_collection: zod_1.z.enum(['on', 'off']).optional(),
316
+ net_term_days: zod_1.z.number().int().optional(),
317
+ allow_direct_debit: zod_1.z.boolean().default(false).optional(),
318
+ vat_number: zod_1.z.string().max(20).optional(),
319
+ vat_number_prefix: zod_1.z.string().max(10).optional(),
320
+ entity_identifier_scheme: zod_1.z.string().max(50).optional(),
321
+ entity_identifier_standard: zod_1.z.string().max(50).optional(),
322
+ registered_for_gst: zod_1.z.boolean().optional(),
323
+ is_einvoice_enabled: zod_1.z.boolean().optional(),
324
+ einvoicing_method: zod_1.z.enum(['automatic', 'manual', 'site_default']).optional(),
325
+ taxability: zod_1.z.enum(['taxable', 'exempt']).optional(),
326
+ exemption_details: zod_1.z.array(zod_1.z.string().optional()).optional(),
327
+ customer_type: zod_1.z
328
+ .enum(['residential', 'business', 'senior_citizen', 'industrial'])
329
+ .optional(),
330
+ client_profile_id: zod_1.z.string().max(50).optional(),
331
+ taxjar_exemption_category: zod_1.z
332
+ .enum(['wholesale', 'government', 'other'])
333
+ .optional(),
334
+ business_customer_without_vat_number: zod_1.z.boolean().optional(),
335
+ locale: zod_1.z.string().max(50).optional(),
336
+ entity_code: zod_1.z
337
+ .enum([
338
+ 'a',
339
+ 'b',
340
+ 'c',
341
+ 'd',
342
+ 'e',
343
+ 'f',
344
+ 'g',
345
+ 'h',
346
+ 'i',
347
+ 'j',
348
+ 'k',
349
+ 'l',
350
+ 'm',
351
+ 'n',
352
+ 'p',
353
+ 'q',
354
+ 'r',
355
+ 'med1',
356
+ 'med2',
357
+ ])
358
+ .optional(),
359
+ exempt_number: zod_1.z.string().max(100).optional(),
360
+ meta_data: CreateCustomerMetaDataSchema.optional(),
361
+ offline_payment_method: zod_1.z
362
+ .enum([
363
+ 'no_preference',
364
+ 'cash',
365
+ 'check',
366
+ 'bank_transfer',
367
+ 'ach_credit',
368
+ 'sepa_credit',
369
+ 'boleto',
370
+ 'us_automated_bank_transfer',
371
+ 'eu_automated_bank_transfer',
372
+ 'uk_automated_bank_transfer',
373
+ 'jp_automated_bank_transfer',
374
+ 'mx_automated_bank_transfer',
375
+ 'custom',
376
+ ])
377
+ .optional(),
378
+ auto_close_invoices: zod_1.z.boolean().optional(),
379
+ consolidated_invoicing: zod_1.z.boolean().optional(),
380
+ token_id: zod_1.z.string().max(40).optional(),
381
+ business_entity_id: zod_1.z.string().max(50).optional(),
382
+ created_from_ip: zod_1.z.string().max(50).optional(),
383
+ invoice_notes: zod_1.z.string().max(2000).optional(),
384
+ card: CreateCustomerCardSchema.optional(),
385
+ bank_account: CreateCustomerBankAccountSchema.optional(),
386
+ payment_method: CreateCustomerPaymentMethodSchema.optional(),
387
+ payment_intent: CreateCustomerPaymentIntentSchema.optional(),
388
+ billing_address: CreateCustomerBillingAddressSchema.optional(),
389
+ entity_identifiers: CreateCustomerEntityIdentifiersSchema.optional(),
390
+ tax_providers_fields: CreateCustomerTaxProvidersFieldsSchema.optional(),
391
+ });
392
+ exports.CreateCustomerBodySchema = CreateCustomerBodySchema;
393
+ //Customer.list
394
+ const ListCustomerIdSchema = zod_1.z.object({
395
+ is: zod_1.z.string().min(1).optional(),
396
+ is_not: zod_1.z.string().min(1).optional(),
397
+ starts_with: zod_1.z.string().min(1).optional(),
398
+ in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
399
+ not_in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
400
+ });
401
+ const ListCustomerFirstNameSchema = zod_1.z.object({
402
+ is: zod_1.z.string().min(1).optional(),
403
+ is_not: zod_1.z.string().min(1).optional(),
404
+ starts_with: zod_1.z.string().min(1).optional(),
405
+ is_present: zod_1.z.enum(['true', 'false']).optional(),
406
+ });
407
+ const ListCustomerLastNameSchema = zod_1.z.object({
408
+ is: zod_1.z.string().min(1).optional(),
409
+ is_not: zod_1.z.string().min(1).optional(),
410
+ starts_with: zod_1.z.string().min(1).optional(),
411
+ is_present: zod_1.z.enum(['true', 'false']).optional(),
412
+ });
413
+ const ListCustomerEmailSchema = zod_1.z.object({
414
+ is: zod_1.z.string().min(1).optional(),
415
+ is_not: zod_1.z.string().min(1).optional(),
416
+ starts_with: zod_1.z.string().min(1).optional(),
417
+ is_present: zod_1.z.enum(['true', 'false']).optional(),
418
+ });
419
+ const ListCustomerCompanySchema = zod_1.z.object({
420
+ is: zod_1.z.string().min(1).optional(),
421
+ is_not: zod_1.z.string().min(1).optional(),
422
+ starts_with: zod_1.z.string().min(1).optional(),
423
+ is_present: zod_1.z.enum(['true', 'false']).optional(),
424
+ });
425
+ const ListCustomerPhoneSchema = zod_1.z.object({
426
+ is: zod_1.z.string().min(1).optional(),
427
+ is_not: zod_1.z.string().min(1).optional(),
428
+ starts_with: zod_1.z.string().min(1).optional(),
429
+ is_present: zod_1.z.enum(['true', 'false']).optional(),
430
+ });
431
+ const ListCustomerAutoCollectionSchema = zod_1.z.object({
432
+ is: zod_1.z.enum(['on', 'off']).optional(),
433
+ is_not: zod_1.z.enum(['on', 'off']).optional(),
434
+ in: zod_1.z.enum(['on', 'off']).optional(),
435
+ not_in: zod_1.z.enum(['on', 'off']).optional(),
436
+ });
437
+ const ListCustomerTaxabilitySchema = zod_1.z.object({
438
+ is: zod_1.z.enum(['taxable', 'exempt']).optional(),
439
+ is_not: zod_1.z.enum(['taxable', 'exempt']).optional(),
440
+ in: zod_1.z.enum(['taxable', 'exempt']).optional(),
441
+ not_in: zod_1.z.enum(['taxable', 'exempt']).optional(),
442
+ });
443
+ const ListCustomerCreatedAtSchema = zod_1.z.object({
444
+ after: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
445
+ before: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
446
+ on: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
447
+ between: zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
448
+ });
449
+ const ListCustomerUpdatedAtSchema = zod_1.z.object({
450
+ after: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
451
+ before: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
452
+ on: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
453
+ between: zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
454
+ });
455
+ const ListCustomerOfflinePaymentMethodSchema = zod_1.z.object({
456
+ is: zod_1.z
457
+ .enum([
458
+ 'no_preference',
459
+ 'cash',
460
+ 'check',
461
+ 'bank_transfer',
462
+ 'ach_credit',
463
+ 'sepa_credit',
464
+ 'boleto',
465
+ 'us_automated_bank_transfer',
466
+ 'eu_automated_bank_transfer',
467
+ 'uk_automated_bank_transfer',
468
+ 'jp_automated_bank_transfer',
469
+ 'mx_automated_bank_transfer',
470
+ 'custom',
471
+ ])
472
+ .optional(),
473
+ is_not: zod_1.z
474
+ .enum([
475
+ 'no_preference',
476
+ 'cash',
477
+ 'check',
478
+ 'bank_transfer',
479
+ 'ach_credit',
480
+ 'sepa_credit',
481
+ 'boleto',
482
+ 'us_automated_bank_transfer',
483
+ 'eu_automated_bank_transfer',
484
+ 'uk_automated_bank_transfer',
485
+ 'jp_automated_bank_transfer',
486
+ 'mx_automated_bank_transfer',
487
+ 'custom',
488
+ ])
489
+ .optional(),
490
+ in: zod_1.z
491
+ .enum([
492
+ 'no_preference',
493
+ 'cash',
494
+ 'check',
495
+ 'bank_transfer',
496
+ 'ach_credit',
497
+ 'sepa_credit',
498
+ 'boleto',
499
+ 'us_automated_bank_transfer',
500
+ 'eu_automated_bank_transfer',
501
+ 'uk_automated_bank_transfer',
502
+ 'jp_automated_bank_transfer',
503
+ 'mx_automated_bank_transfer',
504
+ 'custom',
505
+ ])
506
+ .optional(),
507
+ not_in: zod_1.z
508
+ .enum([
509
+ 'no_preference',
510
+ 'cash',
511
+ 'check',
512
+ 'bank_transfer',
513
+ 'ach_credit',
514
+ 'sepa_credit',
515
+ 'boleto',
516
+ 'us_automated_bank_transfer',
517
+ 'eu_automated_bank_transfer',
518
+ 'uk_automated_bank_transfer',
519
+ 'jp_automated_bank_transfer',
520
+ 'mx_automated_bank_transfer',
521
+ 'custom',
522
+ ])
523
+ .optional(),
524
+ });
525
+ const ListCustomerAutoCloseInvoicesSchema = zod_1.z.object({
526
+ is: zod_1.z.enum(['true', 'false']).optional(),
527
+ });
528
+ const ListCustomerChannelSchema = zod_1.z.object({
529
+ is: zod_1.z.enum(['web', 'app_store', 'play_store']).optional(),
530
+ is_not: zod_1.z.enum(['web', 'app_store', 'play_store']).optional(),
531
+ in: zod_1.z.enum(['web', 'app_store', 'play_store']).optional(),
532
+ not_in: zod_1.z.enum(['web', 'app_store', 'play_store']).optional(),
533
+ });
534
+ const ListCustomerBusinessEntityIdSchema = zod_1.z.object({
535
+ is: zod_1.z.string().min(1).optional(),
536
+ });
537
+ const ListCustomerSortBySchema = zod_1.z.looseObject({
538
+ asc: zod_1.z.enum(['created_at', 'updated_at']).optional(),
539
+ desc: zod_1.z.enum(['created_at', 'updated_at']).optional(),
540
+ });
541
+ const ListCustomerParentIdSchema = zod_1.z.object({
542
+ is: zod_1.z.string().min(1).optional(),
543
+ is_not: zod_1.z.string().min(1).optional(),
544
+ starts_with: zod_1.z.string().min(1).optional(),
545
+ });
546
+ const ListCustomerPaymentOwnerIdSchema = zod_1.z.object({
547
+ is: zod_1.z.string().min(1).optional(),
548
+ is_not: zod_1.z.string().min(1).optional(),
549
+ starts_with: zod_1.z.string().min(1).optional(),
550
+ });
551
+ const ListCustomerInvoiceOwnerIdSchema = zod_1.z.object({
552
+ is: zod_1.z.string().min(1).optional(),
553
+ is_not: zod_1.z.string().min(1).optional(),
554
+ starts_with: zod_1.z.string().min(1).optional(),
555
+ });
556
+ const ListCustomerRelationshipSchema = zod_1.z.object({
557
+ parent_id: ListCustomerParentIdSchema.optional(),
558
+ payment_owner_id: ListCustomerPaymentOwnerIdSchema.optional(),
559
+ invoice_owner_id: ListCustomerInvoiceOwnerIdSchema.optional(),
560
+ });
561
+ const ListCustomerBodySchema = zod_1.z.looseObject({
562
+ limit: zod_1.z.number().int().min(1).max(100).optional(),
563
+ offset: zod_1.z.string().max(1000).optional(),
564
+ include_deleted: zod_1.z.boolean().default(false).optional(),
565
+ id: ListCustomerIdSchema.optional(),
566
+ first_name: ListCustomerFirstNameSchema.optional(),
567
+ last_name: ListCustomerLastNameSchema.optional(),
568
+ email: ListCustomerEmailSchema.optional(),
569
+ company: ListCustomerCompanySchema.optional(),
570
+ phone: ListCustomerPhoneSchema.optional(),
571
+ auto_collection: ListCustomerAutoCollectionSchema.optional(),
572
+ taxability: ListCustomerTaxabilitySchema.optional(),
573
+ created_at: ListCustomerCreatedAtSchema.optional(),
574
+ updated_at: ListCustomerUpdatedAtSchema.optional(),
575
+ offline_payment_method: ListCustomerOfflinePaymentMethodSchema.optional(),
576
+ auto_close_invoices: ListCustomerAutoCloseInvoicesSchema.optional(),
577
+ channel: ListCustomerChannelSchema.optional(),
578
+ business_entity_id: ListCustomerBusinessEntityIdSchema.optional(),
579
+ sort_by: ListCustomerSortBySchema.optional(),
580
+ relationship: ListCustomerRelationshipSchema.optional(),
581
+ });
582
+ exports.ListCustomerBodySchema = ListCustomerBodySchema;
583
+ //Customer.update
584
+ const UpdateCustomerMetaDataSchema = zod_1.z.looseObject({});
585
+ const UpdateCustomerTaxProvidersFieldsSchema = zod_1.z.object({
586
+ provider_name: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
587
+ field_id: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
588
+ field_value: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
589
+ });
590
+ const UpdateCustomerBodySchema = zod_1.z.looseObject({
591
+ first_name: zod_1.z.string().max(150).optional(),
592
+ last_name: zod_1.z.string().max(150).optional(),
593
+ email: zod_1.z.string().email().max(70).optional(),
594
+ preferred_currency_code: zod_1.z.string().max(3).optional(),
595
+ phone: zod_1.z.string().max(50).optional(),
596
+ company: zod_1.z.string().max(250).optional(),
597
+ auto_collection: zod_1.z.enum(['on', 'off']).optional(),
598
+ allow_direct_debit: zod_1.z.boolean().default(false).optional(),
599
+ net_term_days: zod_1.z.number().int().optional(),
600
+ taxability: zod_1.z.enum(['taxable', 'exempt']).optional(),
601
+ exemption_details: zod_1.z.array(zod_1.z.string().optional()).optional(),
602
+ customer_type: zod_1.z
603
+ .enum(['residential', 'business', 'senior_citizen', 'industrial'])
604
+ .optional(),
605
+ client_profile_id: zod_1.z.string().max(50).optional(),
606
+ taxjar_exemption_category: zod_1.z
607
+ .enum(['wholesale', 'government', 'other'])
608
+ .optional(),
609
+ locale: zod_1.z.string().max(50).optional(),
610
+ entity_code: zod_1.z
611
+ .enum([
612
+ 'a',
613
+ 'b',
614
+ 'c',
615
+ 'd',
616
+ 'e',
617
+ 'f',
618
+ 'g',
619
+ 'h',
620
+ 'i',
621
+ 'j',
622
+ 'k',
623
+ 'l',
624
+ 'm',
625
+ 'n',
626
+ 'p',
627
+ 'q',
628
+ 'r',
629
+ 'med1',
630
+ 'med2',
631
+ ])
632
+ .optional(),
633
+ exempt_number: zod_1.z.string().max(100).optional(),
634
+ offline_payment_method: zod_1.z
635
+ .enum([
636
+ 'no_preference',
637
+ 'cash',
638
+ 'check',
639
+ 'bank_transfer',
640
+ 'ach_credit',
641
+ 'sepa_credit',
642
+ 'boleto',
643
+ 'us_automated_bank_transfer',
644
+ 'eu_automated_bank_transfer',
645
+ 'uk_automated_bank_transfer',
646
+ 'jp_automated_bank_transfer',
647
+ 'mx_automated_bank_transfer',
648
+ 'custom',
649
+ ])
650
+ .optional(),
651
+ invoice_notes: zod_1.z.string().max(2000).optional(),
652
+ auto_close_invoices: zod_1.z.boolean().optional(),
653
+ meta_data: UpdateCustomerMetaDataSchema.optional(),
654
+ fraud_flag: zod_1.z.enum(['safe', 'fraudulent']).optional(),
655
+ consolidated_invoicing: zod_1.z.boolean().optional(),
656
+ tax_providers_fields: UpdateCustomerTaxProvidersFieldsSchema.optional(),
657
+ });
658
+ exports.UpdateCustomerBodySchema = UpdateCustomerBodySchema;
659
+ //Customer.updatePaymentMethod
660
+ const UpdatePaymentMethodCustomerAdditionalInformationSchema = zod_1.z.looseObject({});
661
+ const UpdatePaymentMethodCustomerPaymentMethodSchema = zod_1.z.object({
662
+ type: zod_1.z.enum([
663
+ 'card',
664
+ 'paypal_express_checkout',
665
+ 'amazon_payments',
666
+ 'direct_debit',
667
+ 'generic',
668
+ 'alipay',
669
+ 'unionpay',
670
+ 'wechat_pay',
671
+ 'ideal',
672
+ 'google_pay',
673
+ 'sofort',
674
+ 'bancontact',
675
+ 'giropay',
676
+ 'dotpay',
677
+ 'upi',
678
+ 'netbanking_emandates',
679
+ 'venmo',
680
+ 'pay_to',
681
+ 'faster_payments',
682
+ 'sepa_instant_transfer',
683
+ 'automated_bank_transfer',
684
+ 'klarna_pay_now',
685
+ 'online_banking_poland',
686
+ 'payconiq_by_bancontact',
687
+ 'electronic_payment_standard',
688
+ 'kbc_payment_button',
689
+ 'pay_by_bank',
690
+ 'trustly',
691
+ 'stablecoin',
692
+ 'kakao_pay',
693
+ 'naver_pay',
694
+ 'revolut_pay',
695
+ 'cash_app_pay',
696
+ 'twint',
697
+ 'go_pay',
698
+ 'grab_pay',
699
+ 'pay_co',
700
+ 'after_pay',
701
+ 'swish',
702
+ 'payme',
703
+ 'pix',
704
+ 'klarna',
705
+ 'alipay_hk',
706
+ 'paypay',
707
+ 'gcash',
708
+ 'south_korean_cards',
709
+ ]),
710
+ gateway: zod_1.z
711
+ .enum([
712
+ 'chargebee_payments',
713
+ 'adyen',
714
+ 'stripe',
715
+ 'wepay',
716
+ 'braintree',
717
+ 'authorize_net',
718
+ 'paypal_pro',
719
+ 'pin',
720
+ 'eway',
721
+ 'eway_rapid',
722
+ 'worldpay',
723
+ 'balanced_payments',
724
+ 'beanstream',
725
+ 'bluepay',
726
+ 'elavon',
727
+ 'first_data_global',
728
+ 'hdfc',
729
+ 'migs',
730
+ 'nmi',
731
+ 'ogone',
732
+ 'paymill',
733
+ 'paypal_payflow_pro',
734
+ 'sage_pay',
735
+ 'tco',
736
+ 'wirecard',
737
+ 'amazon_payments',
738
+ 'paypal_express_checkout',
739
+ 'gocardless',
740
+ 'orbital',
741
+ 'moneris_us',
742
+ 'moneris',
743
+ 'bluesnap',
744
+ 'cybersource',
745
+ 'vantiv',
746
+ 'checkout_com',
747
+ 'paypal',
748
+ 'ingenico_direct',
749
+ 'exact',
750
+ 'mollie',
751
+ 'quickbooks',
752
+ 'razorpay',
753
+ 'global_payments',
754
+ 'bank_of_america',
755
+ 'ecentric',
756
+ 'metrics_global',
757
+ 'windcave',
758
+ 'pay_com',
759
+ 'ebanx',
760
+ 'dlocal',
761
+ 'nuvei',
762
+ 'solidgate',
763
+ 'paystack',
764
+ 'jp_morgan',
765
+ 'deutsche_bank',
766
+ 'ezidebit',
767
+ 'twikey',
768
+ 'tempus',
769
+ 'moyasar',
770
+ 'payway',
771
+ ])
772
+ .optional(),
773
+ gateway_account_id: zod_1.z.string().max(50).optional(),
774
+ reference_id: zod_1.z.string().max(200).optional(),
775
+ tmp_token: zod_1.z.string().max(65000).optional(),
776
+ issuing_country: zod_1.z.string().max(50).optional(),
777
+ additional_information: UpdatePaymentMethodCustomerAdditionalInformationSchema.optional(),
778
+ });
779
+ const UpdatePaymentMethodCustomerBodySchema = zod_1.z.looseObject({
780
+ payment_method: UpdatePaymentMethodCustomerPaymentMethodSchema.optional(),
781
+ });
782
+ exports.UpdatePaymentMethodCustomerBodySchema = UpdatePaymentMethodCustomerBodySchema;
783
+ //Customer.updateBillingInfo
784
+ const UpdateBillingInfoCustomerBillingAddressSchema = zod_1.z.object({
785
+ first_name: zod_1.z.string().max(150).optional(),
786
+ last_name: zod_1.z.string().max(150).optional(),
787
+ email: zod_1.z.string().email().max(70).optional(),
788
+ company: zod_1.z.string().max(250).optional(),
789
+ phone: zod_1.z.string().max(50).optional(),
790
+ line1: zod_1.z.string().max(150).optional(),
791
+ line2: zod_1.z.string().max(150).optional(),
792
+ line3: zod_1.z.string().max(150).optional(),
793
+ city: zod_1.z.string().max(50).optional(),
794
+ state_code: zod_1.z.string().max(50).optional(),
795
+ state: zod_1.z.string().max(50).optional(),
796
+ zip: zod_1.z.string().max(20).optional(),
797
+ country: zod_1.z.string().max(50).optional(),
798
+ validation_status: zod_1.z
799
+ .enum(['not_validated', 'valid', 'partially_valid', 'invalid'])
800
+ .optional(),
801
+ });
802
+ const UpdateBillingInfoCustomerEntityIdentifiersSchema = zod_1.z.object({
803
+ id: zod_1.z.array(zod_1.z.string().max(40).optional()).optional(),
804
+ scheme: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
805
+ value: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
806
+ operation: zod_1.z
807
+ .array(zod_1.z.enum(['create', 'update', 'delete']).optional())
808
+ .optional(),
809
+ standard: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
810
+ });
811
+ const UpdateBillingInfoCustomerTaxProvidersFieldsSchema = zod_1.z.object({
812
+ provider_name: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
813
+ field_id: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
814
+ field_value: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
815
+ });
816
+ const UpdateBillingInfoCustomerBodySchema = zod_1.z.looseObject({
817
+ vat_number: zod_1.z.string().max(20).optional(),
818
+ vat_number_prefix: zod_1.z.string().max(10).optional(),
819
+ entity_identifier_scheme: zod_1.z.string().max(50).optional(),
820
+ entity_identifier_standard: zod_1.z.string().max(50).optional(),
821
+ registered_for_gst: zod_1.z.boolean().optional(),
822
+ business_customer_without_vat_number: zod_1.z.boolean().optional(),
823
+ is_einvoice_enabled: zod_1.z.boolean().optional(),
824
+ einvoicing_method: zod_1.z.enum(['automatic', 'manual', 'site_default']).optional(),
825
+ billing_address: UpdateBillingInfoCustomerBillingAddressSchema.optional(),
826
+ entity_identifiers: UpdateBillingInfoCustomerEntityIdentifiersSchema.optional(),
827
+ tax_providers_fields: UpdateBillingInfoCustomerTaxProvidersFieldsSchema.optional(),
828
+ });
829
+ exports.UpdateBillingInfoCustomerBodySchema = UpdateBillingInfoCustomerBodySchema;
830
+ //Customer.contactsForCustomer
831
+ const ContactsForCustomerCustomerBodySchema = zod_1.z.looseObject({
832
+ limit: zod_1.z.number().int().min(1).max(100).optional(),
833
+ offset: zod_1.z.string().max(1000).optional(),
834
+ });
835
+ exports.ContactsForCustomerCustomerBodySchema = ContactsForCustomerCustomerBodySchema;
836
+ //Customer.assignPaymentRole
837
+ const AssignPaymentRoleCustomerBodySchema = zod_1.z.looseObject({
838
+ payment_source_id: zod_1.z.string().max(40),
839
+ role: zod_1.z.enum(['primary', 'backup', 'none']),
840
+ });
841
+ exports.AssignPaymentRoleCustomerBodySchema = AssignPaymentRoleCustomerBodySchema;
842
+ //Customer.addContact
843
+ const AddContactCustomerContactSchema = zod_1.z.object({
844
+ id: zod_1.z.string().max(150).optional(),
845
+ first_name: zod_1.z.string().max(150).optional(),
846
+ last_name: zod_1.z.string().max(150).optional(),
847
+ email: zod_1.z.string().email().max(70),
848
+ phone: zod_1.z.string().max(50).optional(),
849
+ label: zod_1.z.string().max(50).optional(),
850
+ enabled: zod_1.z.boolean().default(false).optional(),
851
+ send_billing_email: zod_1.z.boolean().default(false).optional(),
852
+ send_account_email: zod_1.z.boolean().default(false).optional(),
853
+ });
854
+ const AddContactCustomerBodySchema = zod_1.z.looseObject({
855
+ contact: AddContactCustomerContactSchema.optional(),
856
+ });
857
+ exports.AddContactCustomerBodySchema = AddContactCustomerBodySchema;
858
+ //Customer.updateContact
859
+ const UpdateContactCustomerContactSchema = zod_1.z.object({
860
+ id: zod_1.z.string().max(150),
861
+ first_name: zod_1.z.string().max(150).optional(),
862
+ last_name: zod_1.z.string().max(150).optional(),
863
+ email: zod_1.z.string().email().max(70).optional(),
864
+ phone: zod_1.z.string().max(50).optional(),
865
+ label: zod_1.z.string().max(50).optional(),
866
+ enabled: zod_1.z.boolean().default(false).optional(),
867
+ send_billing_email: zod_1.z.boolean().default(false).optional(),
868
+ send_account_email: zod_1.z.boolean().default(false).optional(),
869
+ });
870
+ const UpdateContactCustomerBodySchema = zod_1.z.looseObject({
871
+ contact: UpdateContactCustomerContactSchema.optional(),
872
+ });
873
+ exports.UpdateContactCustomerBodySchema = UpdateContactCustomerBodySchema;
874
+ //Customer.deleteContact
875
+ const DeleteContactCustomerContactSchema = zod_1.z.object({
876
+ id: zod_1.z.string().max(150),
877
+ });
878
+ const DeleteContactCustomerBodySchema = zod_1.z.looseObject({
879
+ contact: DeleteContactCustomerContactSchema.optional(),
880
+ });
881
+ exports.DeleteContactCustomerBodySchema = DeleteContactCustomerBodySchema;
882
+ //Customer.addPromotionalCredits
883
+ const AddPromotionalCreditsCustomerBodySchema = zod_1.z.looseObject({
884
+ amount: zod_1.z.number().int().min(1),
885
+ currency_code: zod_1.z.string().max(3).optional(),
886
+ description: zod_1.z.string().max(250),
887
+ credit_type: zod_1.z
888
+ .enum(['loyalty_credits', 'referral_rewards', 'general'])
889
+ .optional(),
890
+ reference: zod_1.z.string().max(500).optional(),
891
+ });
892
+ exports.AddPromotionalCreditsCustomerBodySchema = AddPromotionalCreditsCustomerBodySchema;
893
+ //Customer.deductPromotionalCredits
894
+ const DeductPromotionalCreditsCustomerBodySchema = zod_1.z.looseObject({
895
+ amount: zod_1.z.number().int().min(1),
896
+ currency_code: zod_1.z.string().max(3).optional(),
897
+ description: zod_1.z.string().max(250),
898
+ credit_type: zod_1.z
899
+ .enum(['loyalty_credits', 'referral_rewards', 'general'])
900
+ .optional(),
901
+ reference: zod_1.z.string().max(500).optional(),
902
+ });
903
+ exports.DeductPromotionalCreditsCustomerBodySchema = DeductPromotionalCreditsCustomerBodySchema;
904
+ //Customer.setPromotionalCredits
905
+ const SetPromotionalCreditsCustomerBodySchema = zod_1.z.looseObject({
906
+ amount: zod_1.z.number().int().min(0),
907
+ currency_code: zod_1.z.string().max(3).optional(),
908
+ description: zod_1.z.string().max(250),
909
+ credit_type: zod_1.z
910
+ .enum(['loyalty_credits', 'referral_rewards', 'general'])
911
+ .optional(),
912
+ reference: zod_1.z.string().max(500).optional(),
913
+ });
914
+ exports.SetPromotionalCreditsCustomerBodySchema = SetPromotionalCreditsCustomerBodySchema;
915
+ //Customer.recordExcessPayment
916
+ const RecordExcessPaymentCustomerTransactionSchema = zod_1.z.object({
917
+ id: zod_1.z.string().max(40).optional(),
918
+ amount: zod_1.z.number().int().min(0),
919
+ currency_code: zod_1.z.string().max(3).optional(),
920
+ date: zod_1.z.number().int(),
921
+ payment_method: zod_1.z.enum([
922
+ 'cash',
923
+ 'check',
924
+ 'bank_transfer',
925
+ 'other',
926
+ 'app_store',
927
+ 'play_store',
928
+ 'custom',
929
+ ]),
930
+ reference_number: zod_1.z.string().max(100).optional(),
931
+ custom_payment_method_id: zod_1.z.string().max(50).optional(),
932
+ });
933
+ const RecordExcessPaymentCustomerBodySchema = zod_1.z.looseObject({
934
+ comment: zod_1.z.string().max(300).optional(),
935
+ transaction: RecordExcessPaymentCustomerTransactionSchema.optional(),
936
+ });
937
+ exports.RecordExcessPaymentCustomerBodySchema = RecordExcessPaymentCustomerBodySchema;
938
+ //Customer.collectPayment
939
+ const CollectPaymentCustomerAdditionalInformationSchema = zod_1.z.looseObject({});
940
+ const CollectPaymentCustomerPaymentMethodSchema = zod_1.z.object({
941
+ type: zod_1.z
942
+ .enum([
943
+ 'card',
944
+ 'paypal_express_checkout',
945
+ 'amazon_payments',
946
+ 'direct_debit',
947
+ 'generic',
948
+ 'alipay',
949
+ 'unionpay',
950
+ 'apple_pay',
951
+ 'wechat_pay',
952
+ 'ideal',
953
+ 'google_pay',
954
+ 'sofort',
955
+ 'bancontact',
956
+ 'giropay',
957
+ 'dotpay',
958
+ 'upi',
959
+ 'netbanking_emandates',
960
+ 'venmo',
961
+ 'pay_to',
962
+ 'faster_payments',
963
+ 'sepa_instant_transfer',
964
+ 'automated_bank_transfer',
965
+ 'klarna_pay_now',
966
+ 'online_banking_poland',
967
+ 'payconiq_by_bancontact',
968
+ 'electronic_payment_standard',
969
+ 'kbc_payment_button',
970
+ 'pay_by_bank',
971
+ 'trustly',
972
+ 'stablecoin',
973
+ 'kakao_pay',
974
+ 'naver_pay',
975
+ 'revolut_pay',
976
+ 'cash_app_pay',
977
+ 'twint',
978
+ 'go_pay',
979
+ 'grab_pay',
980
+ 'pay_co',
981
+ 'after_pay',
982
+ 'swish',
983
+ 'payme',
984
+ 'pix',
985
+ 'klarna',
986
+ 'alipay_hk',
987
+ 'paypay',
988
+ 'gcash',
989
+ 'south_korean_cards',
990
+ ])
991
+ .optional(),
992
+ gateway_account_id: zod_1.z.string().max(50).optional(),
993
+ reference_id: zod_1.z.string().max(200).optional(),
994
+ tmp_token: zod_1.z.string().max(65000).optional(),
995
+ additional_information: CollectPaymentCustomerAdditionalInformationSchema.optional(),
996
+ });
997
+ const CollectPaymentCustomerCardSchema = zod_1.z.object({
998
+ gateway_account_id: zod_1.z.string().max(50).optional(),
999
+ first_name: zod_1.z.string().max(50).optional(),
1000
+ last_name: zod_1.z.string().max(50).optional(),
1001
+ number: zod_1.z.string().max(1500).optional(),
1002
+ expiry_month: zod_1.z.number().int().min(1).max(12).optional(),
1003
+ expiry_year: zod_1.z.number().int().optional(),
1004
+ cvv: zod_1.z.string().max(520).optional(),
1005
+ preferred_scheme: zod_1.z
1006
+ .enum(['cartes_bancaires', 'mastercard', 'visa'])
1007
+ .optional(),
1008
+ billing_addr1: zod_1.z.string().max(150).optional(),
1009
+ billing_addr2: zod_1.z.string().max(150).optional(),
1010
+ billing_city: zod_1.z.string().max(50).optional(),
1011
+ billing_state_code: zod_1.z.string().max(50).optional(),
1012
+ billing_state: zod_1.z.string().max(50).optional(),
1013
+ billing_zip: zod_1.z.string().max(20).optional(),
1014
+ billing_country: zod_1.z.string().max(50).optional(),
1015
+ additional_information: CollectPaymentCustomerAdditionalInformationSchema.optional(),
1016
+ });
1017
+ const CollectPaymentCustomerPaymentIntentSchema = zod_1.z.object({
1018
+ id: zod_1.z.string().max(150).optional(),
1019
+ gateway_account_id: zod_1.z.string().max(50).optional(),
1020
+ gw_token: zod_1.z.string().max(65000).optional(),
1021
+ payment_method_type: zod_1.z
1022
+ .enum([
1023
+ 'card',
1024
+ 'ideal',
1025
+ 'sofort',
1026
+ 'bancontact',
1027
+ 'google_pay',
1028
+ 'dotpay',
1029
+ 'giropay',
1030
+ 'apple_pay',
1031
+ 'upi',
1032
+ 'netbanking_emandates',
1033
+ 'paypal_express_checkout',
1034
+ 'direct_debit',
1035
+ 'boleto',
1036
+ 'venmo',
1037
+ 'amazon_payments',
1038
+ 'pay_to',
1039
+ 'faster_payments',
1040
+ 'sepa_instant_transfer',
1041
+ 'klarna_pay_now',
1042
+ 'online_banking_poland',
1043
+ 'payconiq_by_bancontact',
1044
+ 'electronic_payment_standard',
1045
+ 'kbc_payment_button',
1046
+ 'pay_by_bank',
1047
+ 'trustly',
1048
+ 'stablecoin',
1049
+ 'kakao_pay',
1050
+ 'naver_pay',
1051
+ 'revolut_pay',
1052
+ 'cash_app_pay',
1053
+ 'wechat_pay',
1054
+ 'alipay',
1055
+ 'twint',
1056
+ 'go_pay',
1057
+ 'grab_pay',
1058
+ 'pay_co',
1059
+ 'after_pay',
1060
+ 'swish',
1061
+ 'payme',
1062
+ 'pix',
1063
+ 'klarna',
1064
+ 'alipay_hk',
1065
+ 'paypay',
1066
+ 'gcash',
1067
+ 'south_korean_cards',
1068
+ ])
1069
+ .optional(),
1070
+ gw_payment_method_id: zod_1.z.string().max(65000).optional(),
1071
+ reference_id: zod_1.z.string().max(65000).optional(),
1072
+ additional_information: CollectPaymentCustomerAdditionalInformationSchema.optional(),
1073
+ });
1074
+ const CollectPaymentCustomerInvoiceAllocationsSchema = zod_1.z.object({
1075
+ invoice_id: zod_1.z.array(zod_1.z.string().max(50).optional()),
1076
+ allocation_amount: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
1077
+ });
1078
+ const CollectPaymentCustomerBodySchema = zod_1.z.looseObject({
1079
+ amount: zod_1.z.number().int().min(0).optional(),
1080
+ payment_source_id: zod_1.z.string().max(40).optional(),
1081
+ token_id: zod_1.z.string().max(40).optional(),
1082
+ replace_primary_payment_source: zod_1.z.boolean().default(false).optional(),
1083
+ retain_payment_source: zod_1.z.boolean().default(false).optional(),
1084
+ payment_initiator: zod_1.z.enum(['customer', 'merchant']).optional(),
1085
+ payment_method: CollectPaymentCustomerPaymentMethodSchema.optional(),
1086
+ card: CollectPaymentCustomerCardSchema.optional(),
1087
+ payment_intent: CollectPaymentCustomerPaymentIntentSchema.optional(),
1088
+ invoice_allocations: CollectPaymentCustomerInvoiceAllocationsSchema.optional(),
1089
+ });
1090
+ exports.CollectPaymentCustomerBodySchema = CollectPaymentCustomerBodySchema;
1091
+ //Customer.delete
1092
+ const DeleteCustomerBodySchema = zod_1.z.looseObject({
1093
+ delete_payment_method: zod_1.z.boolean().default(true).optional(),
1094
+ });
1095
+ exports.DeleteCustomerBodySchema = DeleteCustomerBodySchema;
1096
+ //Customer.move
1097
+ const MoveCustomerBodySchema = zod_1.z.looseObject({
1098
+ id_at_from_site: zod_1.z.string().max(100),
1099
+ from_site: zod_1.z.string().max(50),
1100
+ });
1101
+ exports.MoveCustomerBodySchema = MoveCustomerBodySchema;
1102
+ //Customer.changeBillingDate
1103
+ const ChangeBillingDateCustomerBodySchema = zod_1.z.looseObject({
1104
+ billing_date: zod_1.z.number().int().min(1).max(31).optional(),
1105
+ billing_month: zod_1.z.number().int().min(1).max(12).optional(),
1106
+ billing_date_mode: zod_1.z.enum(['using_defaults', 'manually_set']).optional(),
1107
+ billing_day_of_week: zod_1.z
1108
+ .enum([
1109
+ 'sunday',
1110
+ 'monday',
1111
+ 'tuesday',
1112
+ 'wednesday',
1113
+ 'thursday',
1114
+ 'friday',
1115
+ 'saturday',
1116
+ ])
1117
+ .optional(),
1118
+ billing_day_of_week_mode: zod_1.z
1119
+ .enum(['using_defaults', 'manually_set'])
1120
+ .optional(),
1121
+ });
1122
+ exports.ChangeBillingDateCustomerBodySchema = ChangeBillingDateCustomerBodySchema;
1123
+ //Customer.merge
1124
+ const MergeCustomerBodySchema = zod_1.z.looseObject({
1125
+ from_customer_id: zod_1.z.string().max(50),
1126
+ to_customer_id: zod_1.z.string().max(50),
1127
+ });
1128
+ exports.MergeCustomerBodySchema = MergeCustomerBodySchema;
1129
+ //Customer.relationships
1130
+ const RelationshipsCustomerParentAccountAccessSchema = zod_1.z.object({
1131
+ portal_edit_child_subscriptions: zod_1.z
1132
+ .enum(['yes', 'view_only', 'no'])
1133
+ .optional(),
1134
+ portal_download_child_invoices: zod_1.z.enum(['yes', 'view_only', 'no']).optional(),
1135
+ send_subscription_emails: zod_1.z.boolean().optional(),
1136
+ send_payment_emails: zod_1.z.boolean().optional(),
1137
+ send_invoice_emails: zod_1.z.boolean().optional(),
1138
+ });
1139
+ const RelationshipsCustomerChildAccountAccessSchema = zod_1.z.object({
1140
+ portal_edit_subscriptions: zod_1.z.enum(['yes', 'view_only']).optional(),
1141
+ portal_download_invoices: zod_1.z.enum(['yes', 'view_only', 'no']).optional(),
1142
+ send_subscription_emails: zod_1.z.boolean().optional(),
1143
+ send_payment_emails: zod_1.z.boolean().optional(),
1144
+ send_invoice_emails: zod_1.z.boolean().optional(),
1145
+ });
1146
+ const RelationshipsCustomerBodySchema = zod_1.z.looseObject({
1147
+ parent_id: zod_1.z.string().max(50).optional(),
1148
+ payment_owner_id: zod_1.z.string().max(50).optional(),
1149
+ invoice_owner_id: zod_1.z.string().max(50).optional(),
1150
+ use_default_hierarchy_settings: zod_1.z.boolean().default(true).optional(),
1151
+ parent_account_access: RelationshipsCustomerParentAccountAccessSchema.optional(),
1152
+ child_account_access: RelationshipsCustomerChildAccountAccessSchema.optional(),
1153
+ });
1154
+ exports.RelationshipsCustomerBodySchema = RelationshipsCustomerBodySchema;
1155
+ //Customer.hierarchy
1156
+ const HierarchyCustomerBodySchema = zod_1.z.looseObject({
1157
+ hierarchy_operation_type: zod_1.z.enum([
1158
+ 'complete_hierarchy',
1159
+ 'subordinates',
1160
+ 'path_to_root',
1161
+ 'subordinates_with_unbilled_charges_payable_by_parent',
1162
+ 'immediate_children',
1163
+ ]),
1164
+ });
1165
+ exports.HierarchyCustomerBodySchema = HierarchyCustomerBodySchema;
1166
+ //Customer.listHierarchyDetail
1167
+ const ListHierarchyDetailCustomerBodySchema = zod_1.z.looseObject({
1168
+ limit: zod_1.z.number().int().min(1).max(100).optional(),
1169
+ offset: zod_1.z.string().max(1000).optional(),
1170
+ hierarchy_operation_type: zod_1.z.enum([
1171
+ 'complete_hierarchy',
1172
+ 'subordinates',
1173
+ 'path_to_root',
1174
+ 'subordinates_with_unbilled_charges_payable_by_parent',
1175
+ 'immediate_children',
1176
+ ]),
1177
+ });
1178
+ exports.ListHierarchyDetailCustomerBodySchema = ListHierarchyDetailCustomerBodySchema;
1179
+ //Customer.updateHierarchySettings
1180
+ const UpdateHierarchySettingsCustomerParentAccountAccessSchema = zod_1.z.object({
1181
+ portal_edit_child_subscriptions: zod_1.z
1182
+ .enum(['yes', 'view_only', 'no'])
1183
+ .optional(),
1184
+ portal_download_child_invoices: zod_1.z.enum(['yes', 'view_only', 'no']).optional(),
1185
+ send_subscription_emails: zod_1.z.boolean().optional(),
1186
+ send_payment_emails: zod_1.z.boolean().optional(),
1187
+ send_invoice_emails: zod_1.z.boolean().optional(),
1188
+ });
1189
+ const UpdateHierarchySettingsCustomerChildAccountAccessSchema = zod_1.z.object({
1190
+ portal_edit_subscriptions: zod_1.z.enum(['yes', 'view_only']).optional(),
1191
+ portal_download_invoices: zod_1.z.enum(['yes', 'view_only', 'no']).optional(),
1192
+ send_subscription_emails: zod_1.z.boolean().optional(),
1193
+ send_payment_emails: zod_1.z.boolean().optional(),
1194
+ send_invoice_emails: zod_1.z.boolean().optional(),
1195
+ });
1196
+ const UpdateHierarchySettingsCustomerBodySchema = zod_1.z.looseObject({
1197
+ use_default_hierarchy_settings: zod_1.z.boolean().default(true).optional(),
1198
+ parent_account_access: UpdateHierarchySettingsCustomerParentAccountAccessSchema.optional(),
1199
+ child_account_access: UpdateHierarchySettingsCustomerChildAccountAccessSchema.optional(),
1200
+ });
1201
+ exports.UpdateHierarchySettingsCustomerBodySchema = UpdateHierarchySettingsCustomerBodySchema;