chargebee 3.24.0 → 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 +8 -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/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/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 +4 -1
- package/types/core.d.ts +2 -0
- package/types/index.d.ts +16 -0
|
@@ -0,0 +1,355 @@
|
|
|
1
|
+
// Generated Zod schemas: PaymentSource
|
|
2
|
+
// Actions: createUsingTempToken, createUsingPermanentToken, createUsingToken, createUsingPaymentIntent, createVoucherPaymentSource, createCard, createBankAccount, updateCard, updateBankAccount, verifyBankAccount, switchGatewayAccount, exportPaymentSource
|
|
3
|
+
// Do not edit manually – regenerate via sdk-generator
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
//PaymentSource.createUsingTempToken
|
|
6
|
+
const CreateUsingTempTokenPaymentSourceAdditionalInformationSchema = z.looseObject({});
|
|
7
|
+
const CreateUsingTempTokenPaymentSourceBodySchema = z.looseObject({
|
|
8
|
+
customer_id: z.string().max(50),
|
|
9
|
+
gateway_account_id: z.string().max(50).optional(),
|
|
10
|
+
type: z.enum([
|
|
11
|
+
'card',
|
|
12
|
+
'paypal_express_checkout',
|
|
13
|
+
'amazon_payments',
|
|
14
|
+
'direct_debit',
|
|
15
|
+
'generic',
|
|
16
|
+
'alipay',
|
|
17
|
+
'unionpay',
|
|
18
|
+
'apple_pay',
|
|
19
|
+
'wechat_pay',
|
|
20
|
+
'ideal',
|
|
21
|
+
'google_pay',
|
|
22
|
+
'sofort',
|
|
23
|
+
'bancontact',
|
|
24
|
+
'giropay',
|
|
25
|
+
'dotpay',
|
|
26
|
+
'upi',
|
|
27
|
+
'netbanking_emandates',
|
|
28
|
+
'venmo',
|
|
29
|
+
'pay_to',
|
|
30
|
+
'faster_payments',
|
|
31
|
+
'sepa_instant_transfer',
|
|
32
|
+
'automated_bank_transfer',
|
|
33
|
+
'klarna_pay_now',
|
|
34
|
+
'online_banking_poland',
|
|
35
|
+
'payconiq_by_bancontact',
|
|
36
|
+
'electronic_payment_standard',
|
|
37
|
+
'kbc_payment_button',
|
|
38
|
+
'pay_by_bank',
|
|
39
|
+
'trustly',
|
|
40
|
+
'stablecoin',
|
|
41
|
+
'kakao_pay',
|
|
42
|
+
'naver_pay',
|
|
43
|
+
'revolut_pay',
|
|
44
|
+
'cash_app_pay',
|
|
45
|
+
'pix',
|
|
46
|
+
'twint',
|
|
47
|
+
'go_pay',
|
|
48
|
+
'grab_pay',
|
|
49
|
+
'pay_co',
|
|
50
|
+
'after_pay',
|
|
51
|
+
'swish',
|
|
52
|
+
'payme',
|
|
53
|
+
]),
|
|
54
|
+
tmp_token: z.string().max(65000),
|
|
55
|
+
issuing_country: z.string().max(50).optional(),
|
|
56
|
+
replace_primary_payment_source: z.boolean().default(false).optional(),
|
|
57
|
+
additional_information: CreateUsingTempTokenPaymentSourceAdditionalInformationSchema.optional(),
|
|
58
|
+
});
|
|
59
|
+
export { CreateUsingTempTokenPaymentSourceBodySchema };
|
|
60
|
+
//PaymentSource.createUsingPermanentToken
|
|
61
|
+
const CreateUsingPermanentTokenPaymentSourceAdditionalInformationSchema = z.looseObject({});
|
|
62
|
+
const CreateUsingPermanentTokenPaymentSourceCardSchema = z.object({
|
|
63
|
+
last4: z.string().max(4).min(4).optional(),
|
|
64
|
+
iin: z.string().max(6).min(6).optional(),
|
|
65
|
+
expiry_month: z.number().int().min(1).max(12).optional(),
|
|
66
|
+
expiry_year: z.number().int().optional(),
|
|
67
|
+
brand: z
|
|
68
|
+
.enum([
|
|
69
|
+
'visa',
|
|
70
|
+
'mastercard',
|
|
71
|
+
'american_express',
|
|
72
|
+
'discover',
|
|
73
|
+
'jcb',
|
|
74
|
+
'diners_club',
|
|
75
|
+
'other',
|
|
76
|
+
'bancontact',
|
|
77
|
+
'cmr_falabella',
|
|
78
|
+
'tarjeta_naranja',
|
|
79
|
+
'nativa',
|
|
80
|
+
'cencosud',
|
|
81
|
+
'cabal',
|
|
82
|
+
'argencard',
|
|
83
|
+
'elo',
|
|
84
|
+
'hipercard',
|
|
85
|
+
'carnet',
|
|
86
|
+
'rupay',
|
|
87
|
+
'maestro',
|
|
88
|
+
'dankort',
|
|
89
|
+
'cartes_bancaires',
|
|
90
|
+
'mada',
|
|
91
|
+
])
|
|
92
|
+
.optional(),
|
|
93
|
+
funding_type: z.enum(['credit', 'debit', 'prepaid', 'not_known']).optional(),
|
|
94
|
+
});
|
|
95
|
+
const CreateUsingPermanentTokenPaymentSourceBillingAddressSchema = z.object({
|
|
96
|
+
first_name: z.string().max(150).optional(),
|
|
97
|
+
last_name: z.string().max(150).optional(),
|
|
98
|
+
email: z.string().email().max(70).optional(),
|
|
99
|
+
line1: z.string().max(150).optional(),
|
|
100
|
+
line2: z.string().max(150).optional(),
|
|
101
|
+
line3: z.string().max(150).optional(),
|
|
102
|
+
city: z.string().max(50).optional(),
|
|
103
|
+
state_code: z.string().max(50).optional(),
|
|
104
|
+
state: z.string().max(50).optional(),
|
|
105
|
+
zip: z.string().max(20).optional(),
|
|
106
|
+
country: z.string().max(50).optional(),
|
|
107
|
+
});
|
|
108
|
+
const CreateUsingPermanentTokenPaymentSourceBodySchema = z.looseObject({
|
|
109
|
+
customer_id: z.string().max(50),
|
|
110
|
+
type: z.enum([
|
|
111
|
+
'card',
|
|
112
|
+
'paypal_express_checkout',
|
|
113
|
+
'amazon_payments',
|
|
114
|
+
'direct_debit',
|
|
115
|
+
'generic',
|
|
116
|
+
'alipay',
|
|
117
|
+
'unionpay',
|
|
118
|
+
'apple_pay',
|
|
119
|
+
'wechat_pay',
|
|
120
|
+
'ideal',
|
|
121
|
+
'google_pay',
|
|
122
|
+
'sofort',
|
|
123
|
+
'bancontact',
|
|
124
|
+
'giropay',
|
|
125
|
+
'dotpay',
|
|
126
|
+
'upi',
|
|
127
|
+
'netbanking_emandates',
|
|
128
|
+
'venmo',
|
|
129
|
+
'pay_to',
|
|
130
|
+
'faster_payments',
|
|
131
|
+
'sepa_instant_transfer',
|
|
132
|
+
'automated_bank_transfer',
|
|
133
|
+
'klarna_pay_now',
|
|
134
|
+
'online_banking_poland',
|
|
135
|
+
'payconiq_by_bancontact',
|
|
136
|
+
'electronic_payment_standard',
|
|
137
|
+
'kbc_payment_button',
|
|
138
|
+
'pay_by_bank',
|
|
139
|
+
'trustly',
|
|
140
|
+
'stablecoin',
|
|
141
|
+
'kakao_pay',
|
|
142
|
+
'naver_pay',
|
|
143
|
+
'revolut_pay',
|
|
144
|
+
'cash_app_pay',
|
|
145
|
+
'pix',
|
|
146
|
+
'twint',
|
|
147
|
+
'go_pay',
|
|
148
|
+
'grab_pay',
|
|
149
|
+
'pay_co',
|
|
150
|
+
'after_pay',
|
|
151
|
+
'swish',
|
|
152
|
+
'payme',
|
|
153
|
+
]),
|
|
154
|
+
gateway_account_id: z.string().max(50).optional(),
|
|
155
|
+
reference_id: z.string().max(200).optional(),
|
|
156
|
+
issuing_country: z.string().max(50).optional(),
|
|
157
|
+
replace_primary_payment_source: z.boolean().default(false).optional(),
|
|
158
|
+
payment_method_token: z.string().max(100).optional(),
|
|
159
|
+
customer_profile_token: z.string().max(100).optional(),
|
|
160
|
+
network_transaction_id: z.string().max(100).optional(),
|
|
161
|
+
mandate_id: z.string().max(100).optional(),
|
|
162
|
+
skip_retrieval: z.boolean().default(false).optional(),
|
|
163
|
+
additional_information: CreateUsingPermanentTokenPaymentSourceAdditionalInformationSchema.optional(),
|
|
164
|
+
card: CreateUsingPermanentTokenPaymentSourceCardSchema.optional(),
|
|
165
|
+
billing_address: CreateUsingPermanentTokenPaymentSourceBillingAddressSchema.optional(),
|
|
166
|
+
});
|
|
167
|
+
export { CreateUsingPermanentTokenPaymentSourceBodySchema };
|
|
168
|
+
//PaymentSource.createUsingToken
|
|
169
|
+
const CreateUsingTokenPaymentSourceBodySchema = z.looseObject({
|
|
170
|
+
customer_id: z.string().max(50),
|
|
171
|
+
replace_primary_payment_source: z.boolean().default(false).optional(),
|
|
172
|
+
token_id: z.string().max(40),
|
|
173
|
+
});
|
|
174
|
+
export { CreateUsingTokenPaymentSourceBodySchema };
|
|
175
|
+
//PaymentSource.createUsingPaymentIntent
|
|
176
|
+
const CreateUsingPaymentIntentPaymentSourceAdditionalInfoSchema = z.looseObject({});
|
|
177
|
+
const CreateUsingPaymentIntentPaymentSourceAdditionalInformationSchema = z.looseObject({});
|
|
178
|
+
const CreateUsingPaymentIntentPaymentSourcePaymentIntentSchema = z.object({
|
|
179
|
+
id: z.string().max(150).optional(),
|
|
180
|
+
gateway_account_id: z.string().max(50).optional(),
|
|
181
|
+
gw_token: z.string().max(65000).optional(),
|
|
182
|
+
payment_method_type: z
|
|
183
|
+
.enum([
|
|
184
|
+
'card',
|
|
185
|
+
'ideal',
|
|
186
|
+
'sofort',
|
|
187
|
+
'bancontact',
|
|
188
|
+
'google_pay',
|
|
189
|
+
'dotpay',
|
|
190
|
+
'giropay',
|
|
191
|
+
'apple_pay',
|
|
192
|
+
'upi',
|
|
193
|
+
'netbanking_emandates',
|
|
194
|
+
'paypal_express_checkout',
|
|
195
|
+
'direct_debit',
|
|
196
|
+
'boleto',
|
|
197
|
+
'venmo',
|
|
198
|
+
'amazon_payments',
|
|
199
|
+
'pay_to',
|
|
200
|
+
'faster_payments',
|
|
201
|
+
'sepa_instant_transfer',
|
|
202
|
+
'klarna_pay_now',
|
|
203
|
+
'online_banking_poland',
|
|
204
|
+
'payconiq_by_bancontact',
|
|
205
|
+
'electronic_payment_standard',
|
|
206
|
+
'kbc_payment_button',
|
|
207
|
+
'pay_by_bank',
|
|
208
|
+
'trustly',
|
|
209
|
+
'stablecoin',
|
|
210
|
+
'kakao_pay',
|
|
211
|
+
'naver_pay',
|
|
212
|
+
'revolut_pay',
|
|
213
|
+
'cash_app_pay',
|
|
214
|
+
'wechat_pay',
|
|
215
|
+
'alipay',
|
|
216
|
+
'pix',
|
|
217
|
+
'twint',
|
|
218
|
+
'go_pay',
|
|
219
|
+
'grab_pay',
|
|
220
|
+
'pay_co',
|
|
221
|
+
'after_pay',
|
|
222
|
+
'swish',
|
|
223
|
+
'payme',
|
|
224
|
+
])
|
|
225
|
+
.optional(),
|
|
226
|
+
reference_id: z.string().max(65000).optional(),
|
|
227
|
+
gw_payment_method_id: z.string().max(65000).optional(),
|
|
228
|
+
additional_info: CreateUsingPaymentIntentPaymentSourceAdditionalInfoSchema.optional(),
|
|
229
|
+
additional_information: CreateUsingPaymentIntentPaymentSourceAdditionalInformationSchema.optional(),
|
|
230
|
+
});
|
|
231
|
+
const CreateUsingPaymentIntentPaymentSourceBodySchema = z.looseObject({
|
|
232
|
+
customer_id: z.string().max(50),
|
|
233
|
+
replace_primary_payment_source: z.boolean().default(false).optional(),
|
|
234
|
+
payment_intent: CreateUsingPaymentIntentPaymentSourcePaymentIntentSchema.optional(),
|
|
235
|
+
});
|
|
236
|
+
export { CreateUsingPaymentIntentPaymentSourceBodySchema };
|
|
237
|
+
//PaymentSource.createVoucherPaymentSource
|
|
238
|
+
const CreateVoucherPaymentSourcePaymentSourceBillingAddressSchema = z.looseObject({});
|
|
239
|
+
const CreateVoucherPaymentSourcePaymentSourceVoucherPaymentSourceSchema = z.object({
|
|
240
|
+
voucher_type: z.enum(['boleto']),
|
|
241
|
+
gateway_account_id: z.string().max(50).optional(),
|
|
242
|
+
tax_id: z.string().max(20).optional(),
|
|
243
|
+
billing_address: CreateVoucherPaymentSourcePaymentSourceBillingAddressSchema.optional(),
|
|
244
|
+
});
|
|
245
|
+
const CreateVoucherPaymentSourcePaymentSourceBodySchema = z.looseObject({
|
|
246
|
+
customer_id: z.string().max(50),
|
|
247
|
+
voucher_payment_source: CreateVoucherPaymentSourcePaymentSourceVoucherPaymentSourceSchema.optional(),
|
|
248
|
+
});
|
|
249
|
+
export { CreateVoucherPaymentSourcePaymentSourceBodySchema };
|
|
250
|
+
//PaymentSource.createCard
|
|
251
|
+
const CreateCardPaymentSourceAdditionalInformationSchema = z.looseObject({});
|
|
252
|
+
const CreateCardPaymentSourceCardSchema = z.object({
|
|
253
|
+
gateway_account_id: z.string().max(50).optional(),
|
|
254
|
+
first_name: z.string().max(50).optional(),
|
|
255
|
+
last_name: z.string().max(50).optional(),
|
|
256
|
+
number: z.string().max(1500),
|
|
257
|
+
expiry_month: z.number().int().min(1).max(12),
|
|
258
|
+
expiry_year: z.number().int(),
|
|
259
|
+
cvv: z.string().max(520).optional(),
|
|
260
|
+
preferred_scheme: z
|
|
261
|
+
.enum(['cartes_bancaires', 'mastercard', 'visa'])
|
|
262
|
+
.optional(),
|
|
263
|
+
billing_addr1: z.string().max(150).optional(),
|
|
264
|
+
billing_addr2: z.string().max(150).optional(),
|
|
265
|
+
billing_city: z.string().max(50).optional(),
|
|
266
|
+
billing_state_code: z.string().max(50).optional(),
|
|
267
|
+
billing_state: z.string().max(50).optional(),
|
|
268
|
+
billing_zip: z.string().max(20).optional(),
|
|
269
|
+
billing_country: z.string().max(50).optional(),
|
|
270
|
+
additional_information: CreateCardPaymentSourceAdditionalInformationSchema.optional(),
|
|
271
|
+
});
|
|
272
|
+
const CreateCardPaymentSourceBodySchema = z.looseObject({
|
|
273
|
+
customer_id: z.string().max(50),
|
|
274
|
+
replace_primary_payment_source: z.boolean().default(false).optional(),
|
|
275
|
+
card: CreateCardPaymentSourceCardSchema.optional(),
|
|
276
|
+
});
|
|
277
|
+
export { CreateCardPaymentSourceBodySchema };
|
|
278
|
+
//PaymentSource.createBankAccount
|
|
279
|
+
const CreateBankAccountPaymentSourceBillingAddressSchema = z.looseObject({});
|
|
280
|
+
const CreateBankAccountPaymentSourceBankAccountSchema = z.object({
|
|
281
|
+
gateway_account_id: z.string().max(50).optional(),
|
|
282
|
+
iban: z.string().max(50).min(10).optional(),
|
|
283
|
+
first_name: z.string().max(150).optional(),
|
|
284
|
+
last_name: z.string().max(150).optional(),
|
|
285
|
+
company: z.string().max(250).optional(),
|
|
286
|
+
email: z.string().email().max(70).optional(),
|
|
287
|
+
phone: z.string().max(50).optional(),
|
|
288
|
+
bank_name: z.string().max(100).optional(),
|
|
289
|
+
account_number: z.string().max(17).min(4).optional(),
|
|
290
|
+
routing_number: z.string().max(9).min(3).optional(),
|
|
291
|
+
bank_code: z.string().max(20).optional(),
|
|
292
|
+
account_type: z
|
|
293
|
+
.enum(['checking', 'savings', 'business_checking', 'current'])
|
|
294
|
+
.optional(),
|
|
295
|
+
account_holder_type: z.enum(['individual', 'company']).optional(),
|
|
296
|
+
echeck_type: z.enum(['web', 'ppd', 'ccd']).optional(),
|
|
297
|
+
swedish_identity_number: z.string().max(12).min(10).optional(),
|
|
298
|
+
billing_address: CreateBankAccountPaymentSourceBillingAddressSchema.optional(),
|
|
299
|
+
});
|
|
300
|
+
const CreateBankAccountPaymentSourceBodySchema = z.looseObject({
|
|
301
|
+
customer_id: z.string().max(50),
|
|
302
|
+
issuing_country: z.string().max(50).optional(),
|
|
303
|
+
replace_primary_payment_source: z.boolean().default(false).optional(),
|
|
304
|
+
bank_account: CreateBankAccountPaymentSourceBankAccountSchema.optional(),
|
|
305
|
+
});
|
|
306
|
+
export { CreateBankAccountPaymentSourceBodySchema };
|
|
307
|
+
//PaymentSource.updateCard
|
|
308
|
+
const UpdateCardPaymentSourceGatewayMetaDataSchema = z.looseObject({});
|
|
309
|
+
const UpdateCardPaymentSourceAdditionalInformationSchema = z.looseObject({});
|
|
310
|
+
const UpdateCardPaymentSourceCardSchema = z.object({
|
|
311
|
+
first_name: z.string().max(50).optional(),
|
|
312
|
+
last_name: z.string().max(50).optional(),
|
|
313
|
+
expiry_month: z.number().int().min(1).max(12).optional(),
|
|
314
|
+
expiry_year: z.number().int().optional(),
|
|
315
|
+
billing_addr1: z.string().max(150).optional(),
|
|
316
|
+
billing_addr2: z.string().max(150).optional(),
|
|
317
|
+
billing_city: z.string().max(50).optional(),
|
|
318
|
+
billing_zip: z.string().max(20).optional(),
|
|
319
|
+
billing_state_code: z.string().max(50).optional(),
|
|
320
|
+
billing_state: z.string().max(50).optional(),
|
|
321
|
+
billing_country: z.string().max(50).optional(),
|
|
322
|
+
additional_information: UpdateCardPaymentSourceAdditionalInformationSchema.optional(),
|
|
323
|
+
});
|
|
324
|
+
const UpdateCardPaymentSourceBodySchema = z.looseObject({
|
|
325
|
+
gateway_meta_data: UpdateCardPaymentSourceGatewayMetaDataSchema.optional(),
|
|
326
|
+
reference_transaction: z.string().max(50).optional(),
|
|
327
|
+
card: UpdateCardPaymentSourceCardSchema.optional(),
|
|
328
|
+
});
|
|
329
|
+
export { UpdateCardPaymentSourceBodySchema };
|
|
330
|
+
//PaymentSource.updateBankAccount
|
|
331
|
+
const UpdateBankAccountPaymentSourceBankAccountSchema = z.object({
|
|
332
|
+
first_name: z.string().max(150).optional(),
|
|
333
|
+
last_name: z.string().max(150).optional(),
|
|
334
|
+
email: z.string().email().max(70).optional(),
|
|
335
|
+
});
|
|
336
|
+
const UpdateBankAccountPaymentSourceBodySchema = z.looseObject({
|
|
337
|
+
bank_account: UpdateBankAccountPaymentSourceBankAccountSchema.optional(),
|
|
338
|
+
});
|
|
339
|
+
export { UpdateBankAccountPaymentSourceBodySchema };
|
|
340
|
+
//PaymentSource.verifyBankAccount
|
|
341
|
+
const VerifyBankAccountPaymentSourceBodySchema = z.looseObject({
|
|
342
|
+
amount1: z.number().int().min(0),
|
|
343
|
+
amount2: z.number().int().min(0),
|
|
344
|
+
});
|
|
345
|
+
export { VerifyBankAccountPaymentSourceBodySchema };
|
|
346
|
+
//PaymentSource.switchGatewayAccount
|
|
347
|
+
const SwitchGatewayAccountPaymentSourceBodySchema = z.looseObject({
|
|
348
|
+
gateway_account_id: z.string().max(50),
|
|
349
|
+
});
|
|
350
|
+
export { SwitchGatewayAccountPaymentSourceBodySchema };
|
|
351
|
+
//PaymentSource.exportPaymentSource
|
|
352
|
+
const ExportPaymentSourcePaymentSourceBodySchema = z.looseObject({
|
|
353
|
+
gateway_account_id: z.string().max(50),
|
|
354
|
+
});
|
|
355
|
+
export { ExportPaymentSourcePaymentSourceBodySchema };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// Generated Zod schemas: PaymentVoucher
|
|
2
|
+
// Actions: create, payment_vouchersForInvoice, payment_vouchersForCustomer
|
|
3
|
+
// Do not edit manually – regenerate via sdk-generator
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
//PaymentVoucher.create
|
|
6
|
+
const CreatePaymentVoucherVoucherPaymentSourceSchema = z.object({
|
|
7
|
+
voucher_type: z.enum(['boleto']),
|
|
8
|
+
});
|
|
9
|
+
const CreatePaymentVoucherInvoiceAllocationsSchema = z.object({
|
|
10
|
+
invoice_id: z.array(z.string().max(50).optional()),
|
|
11
|
+
});
|
|
12
|
+
const CreatePaymentVoucherBodySchema = z.looseObject({
|
|
13
|
+
customer_id: z.string().max(50),
|
|
14
|
+
payment_source_id: z.string().max(40).optional(),
|
|
15
|
+
voucher_payment_source: CreatePaymentVoucherVoucherPaymentSourceSchema.optional(),
|
|
16
|
+
invoice_allocations: CreatePaymentVoucherInvoiceAllocationsSchema.optional(),
|
|
17
|
+
});
|
|
18
|
+
export { CreatePaymentVoucherBodySchema };
|
|
19
|
+
//PaymentVoucher.payment_vouchersForInvoice
|
|
20
|
+
const PaymentVouchersforinvoicePaymentVoucherStatusSchema = z.object({
|
|
21
|
+
is: z.enum(['active', 'consumed', 'expired', 'failure']).optional(),
|
|
22
|
+
is_not: z.enum(['active', 'consumed', 'expired', 'failure']).optional(),
|
|
23
|
+
in: z.enum(['active', 'consumed', 'expired', 'failure']).optional(),
|
|
24
|
+
not_in: z.enum(['active', 'consumed', 'expired', 'failure']).optional(),
|
|
25
|
+
});
|
|
26
|
+
const PaymentVouchersforinvoicePaymentVoucherSortBySchema = z.looseObject({
|
|
27
|
+
asc: z.enum(['date', 'updated_at']).optional(),
|
|
28
|
+
desc: z.enum(['date', 'updated_at']).optional(),
|
|
29
|
+
});
|
|
30
|
+
const PaymentVouchersforinvoicePaymentVoucherBodySchema = z.looseObject({
|
|
31
|
+
limit: z.number().int().min(1).max(100).optional(),
|
|
32
|
+
offset: z.string().max(1000).optional(),
|
|
33
|
+
status: PaymentVouchersforinvoicePaymentVoucherStatusSchema.optional(),
|
|
34
|
+
sort_by: PaymentVouchersforinvoicePaymentVoucherSortBySchema.optional(),
|
|
35
|
+
});
|
|
36
|
+
export { PaymentVouchersforinvoicePaymentVoucherBodySchema };
|
|
37
|
+
//PaymentVoucher.payment_vouchersForCustomer
|
|
38
|
+
const PaymentVouchersforcustomerPaymentVoucherStatusSchema = z.object({
|
|
39
|
+
is: z.enum(['active', 'consumed', 'expired', 'failure']).optional(),
|
|
40
|
+
is_not: z.enum(['active', 'consumed', 'expired', 'failure']).optional(),
|
|
41
|
+
in: z.enum(['active', 'consumed', 'expired', 'failure']).optional(),
|
|
42
|
+
not_in: z.enum(['active', 'consumed', 'expired', 'failure']).optional(),
|
|
43
|
+
});
|
|
44
|
+
const PaymentVouchersforcustomerPaymentVoucherSortBySchema = z.looseObject({
|
|
45
|
+
asc: z.enum(['date', 'updated_at']).optional(),
|
|
46
|
+
desc: z.enum(['date', 'updated_at']).optional(),
|
|
47
|
+
});
|
|
48
|
+
const PaymentVouchersforcustomerPaymentVoucherBodySchema = z.looseObject({
|
|
49
|
+
limit: z.number().int().min(1).max(100).optional(),
|
|
50
|
+
offset: z.string().max(1000).optional(),
|
|
51
|
+
status: PaymentVouchersforcustomerPaymentVoucherStatusSchema.optional(),
|
|
52
|
+
sort_by: PaymentVouchersforcustomerPaymentVoucherSortBySchema.optional(),
|
|
53
|
+
});
|
|
54
|
+
export { PaymentVouchersforcustomerPaymentVoucherBodySchema };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// Generated Zod schemas: PersonalizedOffer
|
|
2
|
+
// Actions: personalizedOffers
|
|
3
|
+
// Do not edit manually – regenerate via sdk-generator
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
//PersonalizedOffer.personalizedOffers
|
|
6
|
+
const PersonalizedOffersPersonalizedOfferCustomSchema = z.looseObject({});
|
|
7
|
+
const PersonalizedOffersPersonalizedOfferRequestContextSchema = z.object({
|
|
8
|
+
user_agent: z.string().max(255).optional(),
|
|
9
|
+
locale: z.string().max(50).optional(),
|
|
10
|
+
timezone: z.string().max(64).optional(),
|
|
11
|
+
url: z.string().max(250).optional(),
|
|
12
|
+
referrer_url: z.string().max(250).optional(),
|
|
13
|
+
});
|
|
14
|
+
const PersonalizedOffersPersonalizedOfferBodySchema = z.looseObject({
|
|
15
|
+
first_name: z.string().max(150).optional(),
|
|
16
|
+
last_name: z.string().max(150).optional(),
|
|
17
|
+
email: z.string().email().max(70).optional(),
|
|
18
|
+
roles: z.array(z.string().max(50).optional()).optional(),
|
|
19
|
+
external_user_id: z.string().max(50).optional(),
|
|
20
|
+
subscription_id: z.string().max(50).optional(),
|
|
21
|
+
customer_id: z.string().max(50),
|
|
22
|
+
custom: PersonalizedOffersPersonalizedOfferCustomSchema.optional(),
|
|
23
|
+
request_context: PersonalizedOffersPersonalizedOfferRequestContextSchema.optional(),
|
|
24
|
+
});
|
|
25
|
+
export { PersonalizedOffersPersonalizedOfferBodySchema };
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
// Generated Zod schemas: Plan
|
|
2
|
+
// Actions: create, update, copy
|
|
3
|
+
// Do not edit manually – regenerate via sdk-generator
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
//Plan.create
|
|
6
|
+
const CreatePlanMetaDataSchema = z.looseObject({});
|
|
7
|
+
const CreatePlanTiersSchema = z.object({
|
|
8
|
+
starting_unit: z.array(z.number().int().min(1).optional()).optional(),
|
|
9
|
+
ending_unit: z.array(z.number().int().optional()).optional(),
|
|
10
|
+
price: z.array(z.number().int().min(0).optional()).optional(),
|
|
11
|
+
starting_unit_in_decimal: z.array(z.string().max(33).optional()).optional(),
|
|
12
|
+
ending_unit_in_decimal: z.array(z.string().max(33).optional()).optional(),
|
|
13
|
+
price_in_decimal: z.array(z.string().max(39).optional()).optional(),
|
|
14
|
+
});
|
|
15
|
+
const CreatePlanTaxProvidersFieldsSchema = z.object({
|
|
16
|
+
provider_name: z.array(z.string().max(50).optional()),
|
|
17
|
+
field_id: z.array(z.string().max(50).optional()),
|
|
18
|
+
field_value: z.array(z.string().max(50).optional()),
|
|
19
|
+
});
|
|
20
|
+
const CreatePlanApplicableAddonsSchema = z.object({
|
|
21
|
+
id: z.array(z.string().max(100).optional()).optional(),
|
|
22
|
+
});
|
|
23
|
+
const CreatePlanEventBasedAddonsSchema = z.object({
|
|
24
|
+
id: z.array(z.string().max(100).optional()).optional(),
|
|
25
|
+
quantity: z.array(z.number().int().min(1).optional()).optional(),
|
|
26
|
+
quantity_in_decimal: z.array(z.string().max(33).optional()).optional(),
|
|
27
|
+
on_event: z
|
|
28
|
+
.array(z
|
|
29
|
+
.enum([
|
|
30
|
+
'subscription_creation',
|
|
31
|
+
'subscription_trial_start',
|
|
32
|
+
'plan_activation',
|
|
33
|
+
'subscription_activation',
|
|
34
|
+
'contract_termination',
|
|
35
|
+
])
|
|
36
|
+
.optional())
|
|
37
|
+
.optional(),
|
|
38
|
+
charge_once: z.array(z.boolean().default(true).optional()).optional(),
|
|
39
|
+
});
|
|
40
|
+
const CreatePlanAttachedAddonsSchema = z.object({
|
|
41
|
+
id: z.array(z.string().max(100).optional()).optional(),
|
|
42
|
+
quantity: z.array(z.number().int().min(1).optional()).optional(),
|
|
43
|
+
quantity_in_decimal: z.array(z.string().max(33).optional()).optional(),
|
|
44
|
+
billing_cycles: z.array(z.number().int().min(1).optional()).optional(),
|
|
45
|
+
type: z.array(z.enum(['recommended', 'mandatory']).optional()).optional(),
|
|
46
|
+
});
|
|
47
|
+
const CreatePlanBodySchema = z.looseObject({
|
|
48
|
+
id: z.string().max(100),
|
|
49
|
+
name: z.string().max(100),
|
|
50
|
+
invoice_name: z.string().max(100).optional(),
|
|
51
|
+
description: z.string().max(2000).optional(),
|
|
52
|
+
trial_period: z.number().int().min(1).optional(),
|
|
53
|
+
trial_period_unit: z.enum(['day', 'month']).optional(),
|
|
54
|
+
trial_end_action: z
|
|
55
|
+
.enum(['site_default', 'activate_subscription', 'cancel_subscription'])
|
|
56
|
+
.optional(),
|
|
57
|
+
period: z.number().int().min(1).optional(),
|
|
58
|
+
period_unit: z.enum(['day', 'week', 'month', 'year']).optional(),
|
|
59
|
+
setup_cost: z.number().int().min(1).optional(),
|
|
60
|
+
price: z.number().int().min(0).optional(),
|
|
61
|
+
price_in_decimal: z.string().max(39).optional(),
|
|
62
|
+
currency_code: z.string().max(3).optional(),
|
|
63
|
+
billing_cycles: z.number().int().min(1).optional(),
|
|
64
|
+
pricing_model: z
|
|
65
|
+
.enum(['flat_fee', 'per_unit', 'tiered', 'volume', 'stairstep'])
|
|
66
|
+
.optional(),
|
|
67
|
+
charge_model: z
|
|
68
|
+
.enum(['flat_fee', 'per_unit', 'tiered', 'volume', 'stairstep'])
|
|
69
|
+
.optional(),
|
|
70
|
+
free_quantity: z.number().int().min(0).optional(),
|
|
71
|
+
free_quantity_in_decimal: z.string().max(33).optional(),
|
|
72
|
+
addon_applicability: z.enum(['all', 'restricted']).optional(),
|
|
73
|
+
downgrade_penalty: z.number().min(0.01).max(100).optional(),
|
|
74
|
+
redirect_url: z.string().max(500).optional(),
|
|
75
|
+
enabled_in_hosted_pages: z.boolean().default(true).optional(),
|
|
76
|
+
enabled_in_portal: z.boolean().default(true).optional(),
|
|
77
|
+
taxable: z.boolean().default(true).optional(),
|
|
78
|
+
tax_profile_id: z.string().max(50).optional(),
|
|
79
|
+
tax_code: z.string().max(50).optional(),
|
|
80
|
+
hsn_code: z.string().max(50).optional(),
|
|
81
|
+
taxjar_product_code: z.string().max(50).optional(),
|
|
82
|
+
avalara_sale_type: z
|
|
83
|
+
.enum(['wholesale', 'retail', 'consumed', 'vendor_use'])
|
|
84
|
+
.optional(),
|
|
85
|
+
avalara_transaction_type: z.number().int().optional(),
|
|
86
|
+
avalara_service_type: z.number().int().optional(),
|
|
87
|
+
sku: z.string().max(100).optional(),
|
|
88
|
+
accounting_code: z.string().max(100).optional(),
|
|
89
|
+
accounting_category1: z.string().max(100).optional(),
|
|
90
|
+
accounting_category2: z.string().max(100).optional(),
|
|
91
|
+
accounting_category3: z.string().max(100).optional(),
|
|
92
|
+
accounting_category4: z.string().max(100).optional(),
|
|
93
|
+
is_shippable: z.boolean().default(false).optional(),
|
|
94
|
+
shipping_frequency_period: z.number().int().min(1).optional(),
|
|
95
|
+
shipping_frequency_period_unit: z
|
|
96
|
+
.enum(['year', 'month', 'week', 'day'])
|
|
97
|
+
.optional(),
|
|
98
|
+
invoice_notes: z.string().max(2000).optional(),
|
|
99
|
+
meta_data: CreatePlanMetaDataSchema.optional(),
|
|
100
|
+
show_description_in_invoices: z.boolean().default(false).optional(),
|
|
101
|
+
show_description_in_quotes: z.boolean().default(false).optional(),
|
|
102
|
+
giftable: z.boolean().default(false).optional(),
|
|
103
|
+
status: z.enum(['active', 'archived']).optional(),
|
|
104
|
+
claim_url: z.string().max(500).optional(),
|
|
105
|
+
tiers: CreatePlanTiersSchema.optional(),
|
|
106
|
+
tax_providers_fields: CreatePlanTaxProvidersFieldsSchema.optional(),
|
|
107
|
+
applicable_addons: CreatePlanApplicableAddonsSchema.optional(),
|
|
108
|
+
event_based_addons: CreatePlanEventBasedAddonsSchema.optional(),
|
|
109
|
+
attached_addons: CreatePlanAttachedAddonsSchema.optional(),
|
|
110
|
+
});
|
|
111
|
+
export { CreatePlanBodySchema };
|
|
112
|
+
//Plan.update
|
|
113
|
+
const UpdatePlanMetaDataSchema = z.looseObject({});
|
|
114
|
+
const UpdatePlanTiersSchema = z.object({
|
|
115
|
+
starting_unit: z.array(z.number().int().min(1).optional()).optional(),
|
|
116
|
+
ending_unit: z.array(z.number().int().optional()).optional(),
|
|
117
|
+
price: z.array(z.number().int().min(0).optional()).optional(),
|
|
118
|
+
starting_unit_in_decimal: z.array(z.string().max(33).optional()).optional(),
|
|
119
|
+
ending_unit_in_decimal: z.array(z.string().max(33).optional()).optional(),
|
|
120
|
+
price_in_decimal: z.array(z.string().max(39).optional()).optional(),
|
|
121
|
+
});
|
|
122
|
+
const UpdatePlanTaxProvidersFieldsSchema = z.object({
|
|
123
|
+
provider_name: z.array(z.string().max(50).optional()),
|
|
124
|
+
field_id: z.array(z.string().max(50).optional()),
|
|
125
|
+
field_value: z.array(z.string().max(50).optional()),
|
|
126
|
+
});
|
|
127
|
+
const UpdatePlanApplicableAddonsSchema = z.object({
|
|
128
|
+
id: z.array(z.string().max(100).optional()).optional(),
|
|
129
|
+
});
|
|
130
|
+
const UpdatePlanEventBasedAddonsSchema = z.object({
|
|
131
|
+
id: z.array(z.string().max(100).optional()).optional(),
|
|
132
|
+
quantity: z.array(z.number().int().min(1).optional()).optional(),
|
|
133
|
+
quantity_in_decimal: z.array(z.string().max(33).optional()).optional(),
|
|
134
|
+
on_event: z
|
|
135
|
+
.array(z
|
|
136
|
+
.enum([
|
|
137
|
+
'subscription_creation',
|
|
138
|
+
'subscription_trial_start',
|
|
139
|
+
'plan_activation',
|
|
140
|
+
'subscription_activation',
|
|
141
|
+
'contract_termination',
|
|
142
|
+
])
|
|
143
|
+
.optional())
|
|
144
|
+
.optional(),
|
|
145
|
+
charge_once: z.array(z.boolean().default(true).optional()).optional(),
|
|
146
|
+
});
|
|
147
|
+
const UpdatePlanAttachedAddonsSchema = z.object({
|
|
148
|
+
id: z.array(z.string().max(100).optional()).optional(),
|
|
149
|
+
quantity: z.array(z.number().int().min(1).optional()).optional(),
|
|
150
|
+
quantity_in_decimal: z.array(z.string().max(33).optional()).optional(),
|
|
151
|
+
billing_cycles: z.array(z.number().int().min(1).optional()).optional(),
|
|
152
|
+
type: z.array(z.enum(['recommended', 'mandatory']).optional()).optional(),
|
|
153
|
+
});
|
|
154
|
+
const UpdatePlanBodySchema = z.looseObject({
|
|
155
|
+
name: z.string().max(100).optional(),
|
|
156
|
+
invoice_name: z.string().max(100).optional(),
|
|
157
|
+
description: z.string().max(2000).optional(),
|
|
158
|
+
trial_period: z.number().int().min(0).optional(),
|
|
159
|
+
trial_period_unit: z.enum(['day', 'month']).optional(),
|
|
160
|
+
trial_end_action: z
|
|
161
|
+
.enum(['site_default', 'activate_subscription', 'cancel_subscription'])
|
|
162
|
+
.optional(),
|
|
163
|
+
period: z.number().int().min(1).optional(),
|
|
164
|
+
period_unit: z.enum(['day', 'week', 'month', 'year']).optional(),
|
|
165
|
+
setup_cost: z.number().int().min(1).optional(),
|
|
166
|
+
price: z.number().int().min(0).optional(),
|
|
167
|
+
price_in_decimal: z.string().max(39).optional(),
|
|
168
|
+
currency_code: z.string().max(3).optional(),
|
|
169
|
+
billing_cycles: z.number().int().min(1).optional(),
|
|
170
|
+
pricing_model: z
|
|
171
|
+
.enum(['flat_fee', 'per_unit', 'tiered', 'volume', 'stairstep'])
|
|
172
|
+
.optional(),
|
|
173
|
+
charge_model: z
|
|
174
|
+
.enum(['flat_fee', 'per_unit', 'tiered', 'volume', 'stairstep'])
|
|
175
|
+
.optional(),
|
|
176
|
+
free_quantity: z.number().int().min(0).optional(),
|
|
177
|
+
free_quantity_in_decimal: z.string().max(33).optional(),
|
|
178
|
+
addon_applicability: z.enum(['all', 'restricted']).optional(),
|
|
179
|
+
downgrade_penalty: z.number().min(0.01).max(100).optional(),
|
|
180
|
+
redirect_url: z.string().max(500).optional(),
|
|
181
|
+
enabled_in_hosted_pages: z.boolean().default(true).optional(),
|
|
182
|
+
enabled_in_portal: z.boolean().default(true).optional(),
|
|
183
|
+
taxable: z.boolean().default(true).optional(),
|
|
184
|
+
tax_profile_id: z.string().max(50).optional(),
|
|
185
|
+
tax_code: z.string().max(50).optional(),
|
|
186
|
+
hsn_code: z.string().max(50).optional(),
|
|
187
|
+
taxjar_product_code: z.string().max(50).optional(),
|
|
188
|
+
avalara_sale_type: z
|
|
189
|
+
.enum(['wholesale', 'retail', 'consumed', 'vendor_use'])
|
|
190
|
+
.optional(),
|
|
191
|
+
avalara_transaction_type: z.number().int().optional(),
|
|
192
|
+
avalara_service_type: z.number().int().optional(),
|
|
193
|
+
sku: z.string().max(100).optional(),
|
|
194
|
+
accounting_code: z.string().max(100).optional(),
|
|
195
|
+
accounting_category1: z.string().max(100).optional(),
|
|
196
|
+
accounting_category2: z.string().max(100).optional(),
|
|
197
|
+
accounting_category3: z.string().max(100).optional(),
|
|
198
|
+
accounting_category4: z.string().max(100).optional(),
|
|
199
|
+
is_shippable: z.boolean().default(false).optional(),
|
|
200
|
+
shipping_frequency_period: z.number().int().min(1).optional(),
|
|
201
|
+
shipping_frequency_period_unit: z
|
|
202
|
+
.enum(['year', 'month', 'week', 'day'])
|
|
203
|
+
.optional(),
|
|
204
|
+
invoice_notes: z.string().max(2000).optional(),
|
|
205
|
+
meta_data: UpdatePlanMetaDataSchema.optional(),
|
|
206
|
+
show_description_in_invoices: z.boolean().default(false).optional(),
|
|
207
|
+
show_description_in_quotes: z.boolean().default(false).optional(),
|
|
208
|
+
tiers: UpdatePlanTiersSchema.optional(),
|
|
209
|
+
tax_providers_fields: UpdatePlanTaxProvidersFieldsSchema.optional(),
|
|
210
|
+
applicable_addons: UpdatePlanApplicableAddonsSchema.optional(),
|
|
211
|
+
event_based_addons: UpdatePlanEventBasedAddonsSchema.optional(),
|
|
212
|
+
attached_addons: UpdatePlanAttachedAddonsSchema.optional(),
|
|
213
|
+
});
|
|
214
|
+
export { UpdatePlanBodySchema };
|
|
215
|
+
//Plan.copy
|
|
216
|
+
const CopyPlanBodySchema = z.looseObject({
|
|
217
|
+
from_site: z.string().max(50),
|
|
218
|
+
id_at_from_site: z.string().max(100),
|
|
219
|
+
id: z.string().max(100).optional(),
|
|
220
|
+
for_site_merging: z.boolean().default(false).optional(),
|
|
221
|
+
});
|
|
222
|
+
export { CopyPlanBodySchema };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// Generated Zod schemas: PortalSession
|
|
2
|
+
// Actions: create, activate
|
|
3
|
+
// Do not edit manually – regenerate via sdk-generator
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
//PortalSession.create
|
|
6
|
+
const CreatePortalSessionCustomerSchema = z.object({
|
|
7
|
+
id: z.string().max(50),
|
|
8
|
+
});
|
|
9
|
+
const CreatePortalSessionBodySchema = z.looseObject({
|
|
10
|
+
redirect_url: z.string().max(250).optional(),
|
|
11
|
+
forward_url: z.string().max(250).optional(),
|
|
12
|
+
customer: CreatePortalSessionCustomerSchema.optional(),
|
|
13
|
+
});
|
|
14
|
+
export { CreatePortalSessionBodySchema };
|
|
15
|
+
//PortalSession.activate
|
|
16
|
+
const ActivatePortalSessionBodySchema = z.looseObject({
|
|
17
|
+
token: z.string().max(70),
|
|
18
|
+
});
|
|
19
|
+
export { ActivatePortalSessionBodySchema };
|