chargebee 3.35.0 → 3.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +65 -0
- package/cjs/environment.js +1 -1
- package/cjs/resources/api_endpoints.js +56 -0
- package/cjs/resources/webhook/eventType.js +2 -0
- package/cjs/schema/addon.schema.js +221 -40
- package/cjs/schema/alert.schema.js +17 -2
- package/cjs/schema/alert_status.schema.js +6 -1
- package/cjs/schema/attached_item.schema.js +101 -26
- package/cjs/schema/business_entity.schema.js +16 -5
- package/cjs/schema/business_rule.schema.js +2 -2
- package/cjs/schema/business_ruleset.schema.js +2 -2
- package/cjs/schema/comment.schema.js +15 -4
- package/cjs/schema/coupon.schema.js +218 -37
- package/cjs/schema/coupon_code.schema.js +36 -6
- package/cjs/schema/coupon_set.schema.js +108 -27
- package/cjs/schema/credit_note.schema.js +496 -105
- package/cjs/schema/credit_unit.schema.js +12 -2
- package/cjs/schema/customer.schema.js +212 -62
- package/cjs/schema/differential_price.schema.js +100 -12
- package/cjs/schema/dispute.schema.js +125 -33
- package/cjs/schema/einvoice.schema.js +27 -6
- package/cjs/schema/email_log.schema.js +15 -4
- package/cjs/schema/entitlement.schema.js +33 -4
- package/cjs/schema/entitlement_override.schema.js +17 -1
- package/cjs/schema/estimate.schema.js +581 -36
- package/cjs/schema/event.schema.js +1282 -633
- package/cjs/schema/export.schema.js +4459 -1412
- package/cjs/schema/feature.schema.js +73 -11
- package/cjs/schema/gateway_request_log.schema.js +309 -0
- package/cjs/schema/gateway_webhook_log.schema.js +257 -0
- package/cjs/schema/gift.schema.js +51 -5
- package/cjs/schema/grant_block.schema.js +45 -12
- package/cjs/schema/hosted_page.schema.js +562 -66
- package/cjs/schema/index.js +3 -0
- package/cjs/schema/invoice.schema.js +821 -121
- package/cjs/schema/item.schema.js +151 -28
- package/cjs/schema/item_entitlement.schema.js +23 -2
- package/cjs/schema/item_family.schema.js +29 -8
- package/cjs/schema/item_price.schema.js +263 -48
- package/cjs/schema/ledger_operation.schema.js +42 -15
- package/cjs/schema/metered_feature.schema.js +10 -1
- package/cjs/schema/omnichannel_one_time_order.schema.js +32 -2
- package/cjs/schema/omnichannel_subscription.schema.js +136 -30
- package/cjs/schema/order.schema.js +233 -61
- package/cjs/schema/organization_detail.schema.js +36 -0
- package/cjs/schema/payment_schedule.schema.js +39 -8
- package/cjs/schema/payment_schedule_scheme.schema.js +37 -7
- package/cjs/schema/payment_source.schema.js +360 -148
- package/cjs/schema/payment_voucher.schema.js +33 -5
- package/cjs/schema/plan.schema.js +345 -57
- package/cjs/schema/price_ramp.schema.js +79 -14
- package/cjs/schema/price_variant.schema.js +88 -18
- package/cjs/schema/pricing_page_session.schema.js +36 -2
- package/cjs/schema/promotional_credit.schema.js +27 -6
- package/cjs/schema/purchase.schema.js +204 -12
- package/cjs/schema/quote.schema.js +901 -81
- package/cjs/schema/quote_entitlement.schema.js +6 -2
- package/cjs/schema/ramp.schema.js +238 -24
- package/cjs/schema/site_migration_detail.schema.js +50 -16
- package/cjs/schema/subscription.schema.js +998 -169
- package/cjs/schema/subscription_entitlement.schema.js +9 -1
- package/cjs/schema/transaction.schema.js +780 -342
- package/cjs/schema/unbilled_charge.schema.js +141 -13
- package/cjs/schema/usage.schema.js +55 -12
- package/cjs/schema/usage_event.schema.js +13 -1
- package/cjs/schema/virtual_bank_account.schema.js +42 -10
- package/cjs/schema/webhook_endpoint.schema.js +4 -0
- package/esm/environment.js +1 -1
- package/esm/resources/api_endpoints.js +56 -0
- package/esm/resources/webhook/eventType.js +2 -0
- package/esm/schema/addon.schema.js +221 -40
- package/esm/schema/alert.schema.js +17 -2
- package/esm/schema/alert_status.schema.js +6 -1
- package/esm/schema/attached_item.schema.js +101 -26
- package/esm/schema/business_entity.schema.js +16 -5
- package/esm/schema/business_rule.schema.js +2 -2
- package/esm/schema/business_ruleset.schema.js +2 -2
- package/esm/schema/comment.schema.js +15 -4
- package/esm/schema/coupon.schema.js +218 -37
- package/esm/schema/coupon_code.schema.js +36 -6
- package/esm/schema/coupon_set.schema.js +108 -27
- package/esm/schema/credit_note.schema.js +496 -105
- package/esm/schema/credit_unit.schema.js +12 -2
- package/esm/schema/customer.schema.js +212 -62
- package/esm/schema/differential_price.schema.js +100 -12
- package/esm/schema/dispute.schema.js +125 -33
- package/esm/schema/einvoice.schema.js +27 -6
- package/esm/schema/email_log.schema.js +15 -4
- package/esm/schema/entitlement.schema.js +33 -4
- package/esm/schema/entitlement_override.schema.js +17 -1
- package/esm/schema/estimate.schema.js +581 -36
- package/esm/schema/event.schema.js +1282 -633
- package/esm/schema/export.schema.js +4459 -1412
- package/esm/schema/feature.schema.js +73 -11
- package/esm/schema/gateway_request_log.schema.js +306 -0
- package/esm/schema/gateway_webhook_log.schema.js +254 -0
- package/esm/schema/gift.schema.js +51 -5
- package/esm/schema/grant_block.schema.js +45 -12
- package/esm/schema/hosted_page.schema.js +562 -66
- package/esm/schema/index.js +3 -0
- package/esm/schema/invoice.schema.js +821 -121
- package/esm/schema/item.schema.js +151 -28
- package/esm/schema/item_entitlement.schema.js +23 -2
- package/esm/schema/item_family.schema.js +29 -8
- package/esm/schema/item_price.schema.js +263 -48
- package/esm/schema/ledger_operation.schema.js +42 -15
- package/esm/schema/metered_feature.schema.js +10 -1
- package/esm/schema/omnichannel_one_time_order.schema.js +32 -2
- package/esm/schema/omnichannel_subscription.schema.js +136 -30
- package/esm/schema/order.schema.js +233 -61
- package/esm/schema/organization_detail.schema.js +33 -0
- package/esm/schema/payment_schedule.schema.js +39 -8
- package/esm/schema/payment_schedule_scheme.schema.js +37 -7
- package/esm/schema/payment_source.schema.js +360 -148
- package/esm/schema/payment_voucher.schema.js +33 -5
- package/esm/schema/plan.schema.js +345 -57
- package/esm/schema/price_ramp.schema.js +79 -14
- package/esm/schema/price_variant.schema.js +88 -18
- package/esm/schema/pricing_page_session.schema.js +36 -2
- package/esm/schema/promotional_credit.schema.js +27 -6
- package/esm/schema/purchase.schema.js +204 -12
- package/esm/schema/quote.schema.js +901 -81
- package/esm/schema/quote_entitlement.schema.js +6 -2
- package/esm/schema/ramp.schema.js +238 -24
- package/esm/schema/site_migration_detail.schema.js +50 -16
- package/esm/schema/subscription.schema.js +998 -169
- package/esm/schema/subscription_entitlement.schema.js +9 -1
- package/esm/schema/transaction.schema.js +780 -342
- package/esm/schema/unbilled_charge.schema.js +141 -13
- package/esm/schema/usage.schema.js +55 -12
- package/esm/schema/usage_event.schema.js +13 -1
- package/esm/schema/virtual_bank_account.schema.js +42 -10
- package/esm/schema/webhook_endpoint.schema.js +4 -0
- package/package.json +1 -1
- package/types/core.d.ts +10 -6
- package/types/index.d.ts +8 -1
- package/types/resources/BillingLineItem.d.ts +10 -0
- package/types/resources/BillingMetadata.d.ts +9 -0
- package/types/resources/Content.d.ts +5 -0
- package/types/resources/Discount.d.ts +1 -0
- package/types/resources/DraftRequest.d.ts +1 -1
- package/types/resources/Estimate.d.ts +3 -0
- package/types/resources/Event.d.ts +2 -0
- package/types/resources/GatewayRequestLog.d.ts +82 -0
- package/types/resources/GatewayWebhookLog.d.ts +74 -0
- package/types/resources/GrantBlock.d.ts +5 -0
- package/types/resources/HostedPage.d.ts +18 -0
- package/types/resources/Invoice.d.ts +4 -0
- package/types/resources/OrganizationDetail.d.ts +84 -0
- package/types/resources/Subscription.d.ts +3 -0
- package/types/resources/Usage.d.ts +1 -0
- package/types/resources/WebhookEvent.d.ts +10 -0
|
@@ -110,6 +110,15 @@ const CreateSubscriptionEstimateContractTermSchema = z.object({
|
|
|
110
110
|
action_at_term_end: z.enum(['renew', 'evergreen', 'cancel']).optional(),
|
|
111
111
|
cancellation_cutoff_period: z.number().int().optional(),
|
|
112
112
|
});
|
|
113
|
+
const CreateSubscriptionEstimateAddonsItemSchema = z.object({
|
|
114
|
+
id: z.string().max(100).optional(),
|
|
115
|
+
quantity: z.number().int().min(1).optional(),
|
|
116
|
+
quantity_in_decimal: z.string().max(33).optional(),
|
|
117
|
+
unit_price: z.number().int().min(0).optional(),
|
|
118
|
+
unit_price_in_decimal: z.string().max(39).optional(),
|
|
119
|
+
billing_cycles: z.number().int().min(0).optional(),
|
|
120
|
+
trial_end: z.number().int().optional(),
|
|
121
|
+
});
|
|
113
122
|
const CreateSubscriptionEstimateAddonsSchema = z.object({
|
|
114
123
|
id: z.array(z.string().max(100).optional()).optional(),
|
|
115
124
|
quantity: z.array(z.number().int().min(1).optional()).optional(),
|
|
@@ -119,6 +128,25 @@ const CreateSubscriptionEstimateAddonsSchema = z.object({
|
|
|
119
128
|
billing_cycles: z.array(z.number().int().min(0).optional()).optional(),
|
|
120
129
|
trial_end: z.array(z.number().int().optional()).optional(),
|
|
121
130
|
});
|
|
131
|
+
const CreateSubscriptionEstimateEventBasedAddonsItemSchema = z.object({
|
|
132
|
+
id: z.string().max(100).optional(),
|
|
133
|
+
quantity: z.number().int().min(1).optional(),
|
|
134
|
+
unit_price: z.number().int().min(0).optional(),
|
|
135
|
+
quantity_in_decimal: z.string().max(33).optional(),
|
|
136
|
+
unit_price_in_decimal: z.string().max(39).optional(),
|
|
137
|
+
service_period_in_days: z.number().int().min(1).max(4000).optional(),
|
|
138
|
+
on_event: z
|
|
139
|
+
.enum([
|
|
140
|
+
'subscription_creation',
|
|
141
|
+
'subscription_trial_start',
|
|
142
|
+
'plan_activation',
|
|
143
|
+
'subscription_activation',
|
|
144
|
+
'contract_termination',
|
|
145
|
+
])
|
|
146
|
+
.optional(),
|
|
147
|
+
charge_once: z.boolean().default(true).optional(),
|
|
148
|
+
charge_on: z.enum(['immediately', 'on_event']).optional(),
|
|
149
|
+
});
|
|
122
150
|
const CreateSubscriptionEstimateEventBasedAddonsSchema = z.object({
|
|
123
151
|
id: z.array(z.string().max(100).optional()).optional(),
|
|
124
152
|
quantity: z.array(z.number().int().min(1).optional()).optional(),
|
|
@@ -142,6 +170,11 @@ const CreateSubscriptionEstimateEventBasedAddonsSchema = z.object({
|
|
|
142
170
|
charge_once: z.array(z.boolean().default(true).optional()).optional(),
|
|
143
171
|
charge_on: z.array(z.enum(['immediately', 'on_event']).optional()).optional(),
|
|
144
172
|
});
|
|
173
|
+
const CreateSubscriptionEstimateTaxProvidersFieldsItemSchema = z.object({
|
|
174
|
+
provider_name: z.string().max(50).optional(),
|
|
175
|
+
field_id: z.string().max(50).optional(),
|
|
176
|
+
field_value: z.string().max(50).optional(),
|
|
177
|
+
});
|
|
145
178
|
const CreateSubscriptionEstimateTaxProvidersFieldsSchema = z.object({
|
|
146
179
|
provider_name: z.array(z.string().max(50).optional()).optional(),
|
|
147
180
|
field_id: z.array(z.string().max(50).optional()).optional(),
|
|
@@ -163,9 +196,24 @@ const CreateSubscriptionEstimateBodySchema = z.looseObject({
|
|
|
163
196
|
shipping_address: CreateSubscriptionEstimateShippingAddressSchema.optional(),
|
|
164
197
|
customer: CreateSubscriptionEstimateCustomerSchema.optional(),
|
|
165
198
|
contract_term: CreateSubscriptionEstimateContractTermSchema.optional(),
|
|
166
|
-
addons:
|
|
167
|
-
|
|
168
|
-
|
|
199
|
+
addons: z
|
|
200
|
+
.union([
|
|
201
|
+
z.array(CreateSubscriptionEstimateAddonsItemSchema.optional()),
|
|
202
|
+
CreateSubscriptionEstimateAddonsSchema,
|
|
203
|
+
])
|
|
204
|
+
.optional(),
|
|
205
|
+
event_based_addons: z
|
|
206
|
+
.union([
|
|
207
|
+
z.array(CreateSubscriptionEstimateEventBasedAddonsItemSchema.optional()),
|
|
208
|
+
CreateSubscriptionEstimateEventBasedAddonsSchema,
|
|
209
|
+
])
|
|
210
|
+
.optional(),
|
|
211
|
+
tax_providers_fields: z
|
|
212
|
+
.union([
|
|
213
|
+
z.array(CreateSubscriptionEstimateTaxProvidersFieldsItemSchema.optional()),
|
|
214
|
+
CreateSubscriptionEstimateTaxProvidersFieldsSchema,
|
|
215
|
+
])
|
|
216
|
+
.optional(),
|
|
169
217
|
});
|
|
170
218
|
export { CreateSubscriptionEstimateBodySchema };
|
|
171
219
|
//Estimate.createSubItemEstimate
|
|
@@ -272,6 +320,29 @@ const CreateSubItemEstimateEstimateContractTermSchema = z.object({
|
|
|
272
320
|
contract_start: z.number().int().optional(),
|
|
273
321
|
cancellation_cutoff_period: z.number().int().optional(),
|
|
274
322
|
});
|
|
323
|
+
const CreateSubItemEstimateEstimateSubscriptionItemsItemSchema = z.object({
|
|
324
|
+
item_price_id: z.string().max(100),
|
|
325
|
+
quantity: z.number().int().min(1).optional(),
|
|
326
|
+
quantity_in_decimal: z.string().max(33).optional(),
|
|
327
|
+
unit_price: z.number().int().min(0).optional(),
|
|
328
|
+
unit_price_in_decimal: z.string().max(39).optional(),
|
|
329
|
+
billing_cycles: z.number().int().min(0).optional(),
|
|
330
|
+
trial_end: z.number().int().optional(),
|
|
331
|
+
service_period_days: z.number().int().min(1).max(4000).optional(),
|
|
332
|
+
charge_on_event: z
|
|
333
|
+
.enum([
|
|
334
|
+
'subscription_creation',
|
|
335
|
+
'subscription_trial_start',
|
|
336
|
+
'plan_activation',
|
|
337
|
+
'subscription_activation',
|
|
338
|
+
'contract_termination',
|
|
339
|
+
])
|
|
340
|
+
.optional(),
|
|
341
|
+
charge_once: z.boolean().optional(),
|
|
342
|
+
item_type: z.enum(['plan', 'addon', 'charge']).optional(),
|
|
343
|
+
description: z.string().max(2000).optional(),
|
|
344
|
+
charge_on_option: z.enum(['immediately', 'on_event']).optional(),
|
|
345
|
+
});
|
|
275
346
|
const CreateSubItemEstimateEstimateSubscriptionItemsSchema = z.object({
|
|
276
347
|
item_price_id: z.array(z.string().max(100).optional()),
|
|
277
348
|
quantity: z.array(z.number().int().min(1).optional()).optional(),
|
|
@@ -296,11 +367,23 @@ const CreateSubItemEstimateEstimateSubscriptionItemsSchema = z.object({
|
|
|
296
367
|
.optional(),
|
|
297
368
|
charge_once: z.array(z.boolean().optional()).optional(),
|
|
298
369
|
item_type: z.array(z.enum(['plan', 'addon', 'charge']).optional()).optional(),
|
|
299
|
-
description: z.array(z.string().max(
|
|
370
|
+
description: z.array(z.string().max(2000).optional()).optional(),
|
|
300
371
|
charge_on_option: z
|
|
301
372
|
.array(z.enum(['immediately', 'on_event']).optional())
|
|
302
373
|
.optional(),
|
|
303
374
|
});
|
|
375
|
+
const CreateSubItemEstimateEstimateDiscountsItemSchema = z.object({
|
|
376
|
+
apply_on: z.enum(['invoice_amount', 'specific_item_price']).optional(),
|
|
377
|
+
duration_type: z.enum(['one_time', 'forever', 'limited_period']),
|
|
378
|
+
percentage: z.number().min(0.01).max(100).optional(),
|
|
379
|
+
amount: z.number().int().min(0).optional(),
|
|
380
|
+
period: z.number().int().min(1).optional(),
|
|
381
|
+
period_unit: z.enum(['day', 'week', 'month', 'year']).optional(),
|
|
382
|
+
included_in_mrr: z.boolean().optional(),
|
|
383
|
+
item_price_id: z.string().max(100).optional(),
|
|
384
|
+
quantity: z.number().int().min(1).optional(),
|
|
385
|
+
description: z.string().max(100).optional(),
|
|
386
|
+
});
|
|
304
387
|
const CreateSubItemEstimateEstimateDiscountsSchema = z.object({
|
|
305
388
|
apply_on: z
|
|
306
389
|
.array(z.enum(['invoice_amount', 'specific_item_price']).optional())
|
|
@@ -315,6 +398,18 @@ const CreateSubItemEstimateEstimateDiscountsSchema = z.object({
|
|
|
315
398
|
included_in_mrr: z.array(z.boolean().optional()).optional(),
|
|
316
399
|
item_price_id: z.array(z.string().max(100).optional()).optional(),
|
|
317
400
|
quantity: z.array(z.number().int().min(1).optional()).optional(),
|
|
401
|
+
description: z.array(z.string().max(100).optional()).optional(),
|
|
402
|
+
});
|
|
403
|
+
const CreateSubItemEstimateEstimateItemTiersItemSchema = z.object({
|
|
404
|
+
item_price_id: z.string().max(100).optional(),
|
|
405
|
+
starting_unit: z.number().int().min(1).optional(),
|
|
406
|
+
ending_unit: z.number().int().optional(),
|
|
407
|
+
price: z.number().int().min(0).optional(),
|
|
408
|
+
starting_unit_in_decimal: z.string().max(33).optional(),
|
|
409
|
+
ending_unit_in_decimal: z.string().max(33).optional(),
|
|
410
|
+
price_in_decimal: z.string().max(39).optional(),
|
|
411
|
+
pricing_type: z.enum(['per_unit', 'flat_fee', 'package']).optional(),
|
|
412
|
+
package_size: z.number().int().min(1).optional(),
|
|
318
413
|
});
|
|
319
414
|
const CreateSubItemEstimateEstimateItemTiersSchema = z.object({
|
|
320
415
|
item_price_id: z.array(z.string().max(100).optional()).optional(),
|
|
@@ -329,6 +424,11 @@ const CreateSubItemEstimateEstimateItemTiersSchema = z.object({
|
|
|
329
424
|
.optional(),
|
|
330
425
|
package_size: z.array(z.number().int().min(1).optional()).optional(),
|
|
331
426
|
});
|
|
427
|
+
const CreateSubItemEstimateEstimateTaxProvidersFieldsItemSchema = z.object({
|
|
428
|
+
provider_name: z.string().max(50).optional(),
|
|
429
|
+
field_id: z.string().max(50).optional(),
|
|
430
|
+
field_value: z.string().max(50).optional(),
|
|
431
|
+
});
|
|
332
432
|
const CreateSubItemEstimateEstimateTaxProvidersFieldsSchema = z.object({
|
|
333
433
|
provider_name: z.array(z.string().max(50).optional()).optional(),
|
|
334
434
|
field_id: z.array(z.string().max(50).optional()).optional(),
|
|
@@ -348,10 +448,30 @@ const CreateSubItemEstimateEstimateBodySchema = z.looseObject({
|
|
|
348
448
|
shipping_address: CreateSubItemEstimateEstimateShippingAddressSchema.optional(),
|
|
349
449
|
customer: CreateSubItemEstimateEstimateCustomerSchema.optional(),
|
|
350
450
|
contract_term: CreateSubItemEstimateEstimateContractTermSchema.optional(),
|
|
351
|
-
subscription_items:
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
451
|
+
subscription_items: z
|
|
452
|
+
.union([
|
|
453
|
+
z.array(CreateSubItemEstimateEstimateSubscriptionItemsItemSchema.optional()),
|
|
454
|
+
CreateSubItemEstimateEstimateSubscriptionItemsSchema,
|
|
455
|
+
])
|
|
456
|
+
.optional(),
|
|
457
|
+
discounts: z
|
|
458
|
+
.union([
|
|
459
|
+
z.array(CreateSubItemEstimateEstimateDiscountsItemSchema.optional()),
|
|
460
|
+
CreateSubItemEstimateEstimateDiscountsSchema,
|
|
461
|
+
])
|
|
462
|
+
.optional(),
|
|
463
|
+
item_tiers: z
|
|
464
|
+
.union([
|
|
465
|
+
z.array(CreateSubItemEstimateEstimateItemTiersItemSchema.optional()),
|
|
466
|
+
CreateSubItemEstimateEstimateItemTiersSchema,
|
|
467
|
+
])
|
|
468
|
+
.optional(),
|
|
469
|
+
tax_providers_fields: z
|
|
470
|
+
.union([
|
|
471
|
+
z.array(CreateSubItemEstimateEstimateTaxProvidersFieldsItemSchema.optional()),
|
|
472
|
+
CreateSubItemEstimateEstimateTaxProvidersFieldsSchema,
|
|
473
|
+
])
|
|
474
|
+
.optional(),
|
|
355
475
|
});
|
|
356
476
|
export { CreateSubItemEstimateEstimateBodySchema };
|
|
357
477
|
//Estimate.createSubForCustomerEstimate
|
|
@@ -415,6 +535,15 @@ const CreateSubForCustomerEstimateEstimateContractTermSchema = z.object({
|
|
|
415
535
|
action_at_term_end: z.enum(['renew', 'evergreen', 'cancel']).optional(),
|
|
416
536
|
cancellation_cutoff_period: z.number().int().optional(),
|
|
417
537
|
});
|
|
538
|
+
const CreateSubForCustomerEstimateEstimateAddonsItemSchema = z.object({
|
|
539
|
+
id: z.string().max(100).optional(),
|
|
540
|
+
quantity: z.number().int().min(1).optional(),
|
|
541
|
+
quantity_in_decimal: z.string().max(33).optional(),
|
|
542
|
+
unit_price: z.number().int().min(0).optional(),
|
|
543
|
+
unit_price_in_decimal: z.string().max(39).optional(),
|
|
544
|
+
billing_cycles: z.number().int().min(0).optional(),
|
|
545
|
+
trial_end: z.number().int().optional(),
|
|
546
|
+
});
|
|
418
547
|
const CreateSubForCustomerEstimateEstimateAddonsSchema = z.object({
|
|
419
548
|
id: z.array(z.string().max(100).optional()).optional(),
|
|
420
549
|
quantity: z.array(z.number().int().min(1).optional()).optional(),
|
|
@@ -424,6 +553,25 @@ const CreateSubForCustomerEstimateEstimateAddonsSchema = z.object({
|
|
|
424
553
|
billing_cycles: z.array(z.number().int().min(0).optional()).optional(),
|
|
425
554
|
trial_end: z.array(z.number().int().optional()).optional(),
|
|
426
555
|
});
|
|
556
|
+
const CreateSubForCustomerEstimateEstimateEventBasedAddonsItemSchema = z.object({
|
|
557
|
+
id: z.string().max(100).optional(),
|
|
558
|
+
quantity: z.number().int().min(1).optional(),
|
|
559
|
+
unit_price: z.number().int().min(0).optional(),
|
|
560
|
+
quantity_in_decimal: z.string().max(33).optional(),
|
|
561
|
+
unit_price_in_decimal: z.string().max(39).optional(),
|
|
562
|
+
service_period_in_days: z.number().int().min(1).max(4000).optional(),
|
|
563
|
+
on_event: z
|
|
564
|
+
.enum([
|
|
565
|
+
'subscription_creation',
|
|
566
|
+
'subscription_trial_start',
|
|
567
|
+
'plan_activation',
|
|
568
|
+
'subscription_activation',
|
|
569
|
+
'contract_termination',
|
|
570
|
+
])
|
|
571
|
+
.optional(),
|
|
572
|
+
charge_once: z.boolean().default(true).optional(),
|
|
573
|
+
charge_on: z.enum(['immediately', 'on_event']).optional(),
|
|
574
|
+
});
|
|
427
575
|
const CreateSubForCustomerEstimateEstimateEventBasedAddonsSchema = z.object({
|
|
428
576
|
id: z.array(z.string().max(100).optional()).optional(),
|
|
429
577
|
quantity: z.array(z.number().int().min(1).optional()).optional(),
|
|
@@ -461,8 +609,18 @@ const CreateSubForCustomerEstimateEstimateBodySchema = z.looseObject({
|
|
|
461
609
|
subscription: CreateSubForCustomerEstimateEstimateSubscriptionSchema.optional(),
|
|
462
610
|
shipping_address: CreateSubForCustomerEstimateEstimateShippingAddressSchema.optional(),
|
|
463
611
|
contract_term: CreateSubForCustomerEstimateEstimateContractTermSchema.optional(),
|
|
464
|
-
addons:
|
|
465
|
-
|
|
612
|
+
addons: z
|
|
613
|
+
.union([
|
|
614
|
+
z.array(CreateSubForCustomerEstimateEstimateAddonsItemSchema.optional()),
|
|
615
|
+
CreateSubForCustomerEstimateEstimateAddonsSchema,
|
|
616
|
+
])
|
|
617
|
+
.optional(),
|
|
618
|
+
event_based_addons: z
|
|
619
|
+
.union([
|
|
620
|
+
z.array(CreateSubForCustomerEstimateEstimateEventBasedAddonsItemSchema.optional()),
|
|
621
|
+
CreateSubForCustomerEstimateEstimateEventBasedAddonsSchema,
|
|
622
|
+
])
|
|
623
|
+
.optional(),
|
|
466
624
|
});
|
|
467
625
|
export { CreateSubForCustomerEstimateEstimateBodySchema };
|
|
468
626
|
//Estimate.createSubItemForCustomerEstimate
|
|
@@ -538,6 +696,29 @@ const CreateSubItemForCustomerEstimateEstimateBillingOverrideSchema = z.object({
|
|
|
538
696
|
max_excess_payment_usage: z.number().int().min(-1).optional(),
|
|
539
697
|
max_refundable_credits_usage: z.number().int().min(-1).optional(),
|
|
540
698
|
});
|
|
699
|
+
const CreateSubItemForCustomerEstimateEstimateSubscriptionItemsItemSchema = z.object({
|
|
700
|
+
item_price_id: z.string().max(100),
|
|
701
|
+
quantity: z.number().int().min(1).optional(),
|
|
702
|
+
quantity_in_decimal: z.string().max(33).optional(),
|
|
703
|
+
unit_price: z.number().int().min(0).optional(),
|
|
704
|
+
unit_price_in_decimal: z.string().max(39).optional(),
|
|
705
|
+
billing_cycles: z.number().int().min(0).optional(),
|
|
706
|
+
trial_end: z.number().int().optional(),
|
|
707
|
+
service_period_days: z.number().int().min(1).max(4000).optional(),
|
|
708
|
+
charge_on_event: z
|
|
709
|
+
.enum([
|
|
710
|
+
'subscription_creation',
|
|
711
|
+
'subscription_trial_start',
|
|
712
|
+
'plan_activation',
|
|
713
|
+
'subscription_activation',
|
|
714
|
+
'contract_termination',
|
|
715
|
+
])
|
|
716
|
+
.optional(),
|
|
717
|
+
charge_once: z.boolean().optional(),
|
|
718
|
+
item_type: z.enum(['plan', 'addon', 'charge']).optional(),
|
|
719
|
+
description: z.string().max(2000).optional(),
|
|
720
|
+
charge_on_option: z.enum(['immediately', 'on_event']).optional(),
|
|
721
|
+
});
|
|
541
722
|
const CreateSubItemForCustomerEstimateEstimateSubscriptionItemsSchema = z.object({
|
|
542
723
|
item_price_id: z.array(z.string().max(100).optional()),
|
|
543
724
|
quantity: z.array(z.number().int().min(1).optional()).optional(),
|
|
@@ -564,11 +745,23 @@ const CreateSubItemForCustomerEstimateEstimateSubscriptionItemsSchema = z.object
|
|
|
564
745
|
item_type: z
|
|
565
746
|
.array(z.enum(['plan', 'addon', 'charge']).optional())
|
|
566
747
|
.optional(),
|
|
567
|
-
description: z.array(z.string().max(
|
|
748
|
+
description: z.array(z.string().max(2000).optional()).optional(),
|
|
568
749
|
charge_on_option: z
|
|
569
750
|
.array(z.enum(['immediately', 'on_event']).optional())
|
|
570
751
|
.optional(),
|
|
571
752
|
});
|
|
753
|
+
const CreateSubItemForCustomerEstimateEstimateDiscountsItemSchema = z.object({
|
|
754
|
+
apply_on: z.enum(['invoice_amount', 'specific_item_price']).optional(),
|
|
755
|
+
duration_type: z.enum(['one_time', 'forever', 'limited_period']),
|
|
756
|
+
percentage: z.number().min(0.01).max(100).optional(),
|
|
757
|
+
amount: z.number().int().min(0).optional(),
|
|
758
|
+
period: z.number().int().min(1).optional(),
|
|
759
|
+
period_unit: z.enum(['day', 'week', 'month', 'year']).optional(),
|
|
760
|
+
included_in_mrr: z.boolean().optional(),
|
|
761
|
+
item_price_id: z.string().max(100).optional(),
|
|
762
|
+
quantity: z.number().int().min(1).optional(),
|
|
763
|
+
description: z.string().max(100).optional(),
|
|
764
|
+
});
|
|
572
765
|
const CreateSubItemForCustomerEstimateEstimateDiscountsSchema = z.object({
|
|
573
766
|
apply_on: z
|
|
574
767
|
.array(z.enum(['invoice_amount', 'specific_item_price']).optional())
|
|
@@ -583,6 +776,18 @@ const CreateSubItemForCustomerEstimateEstimateDiscountsSchema = z.object({
|
|
|
583
776
|
included_in_mrr: z.array(z.boolean().optional()).optional(),
|
|
584
777
|
item_price_id: z.array(z.string().max(100).optional()).optional(),
|
|
585
778
|
quantity: z.array(z.number().int().min(1).optional()).optional(),
|
|
779
|
+
description: z.array(z.string().max(100).optional()).optional(),
|
|
780
|
+
});
|
|
781
|
+
const CreateSubItemForCustomerEstimateEstimateItemTiersItemSchema = z.object({
|
|
782
|
+
item_price_id: z.string().max(100).optional(),
|
|
783
|
+
starting_unit: z.number().int().min(1).optional(),
|
|
784
|
+
ending_unit: z.number().int().optional(),
|
|
785
|
+
price: z.number().int().min(0).optional(),
|
|
786
|
+
starting_unit_in_decimal: z.string().max(33).optional(),
|
|
787
|
+
ending_unit_in_decimal: z.string().max(33).optional(),
|
|
788
|
+
price_in_decimal: z.string().max(39).optional(),
|
|
789
|
+
pricing_type: z.enum(['per_unit', 'flat_fee', 'package']).optional(),
|
|
790
|
+
package_size: z.number().int().min(1).optional(),
|
|
586
791
|
});
|
|
587
792
|
const CreateSubItemForCustomerEstimateEstimateItemTiersSchema = z.object({
|
|
588
793
|
item_price_id: z.array(z.string().max(100).optional()).optional(),
|
|
@@ -611,9 +816,24 @@ const CreateSubItemForCustomerEstimateEstimateBodySchema = z.looseObject({
|
|
|
611
816
|
billing_address: CreateSubItemForCustomerEstimateEstimateBillingAddressSchema.optional(),
|
|
612
817
|
contract_term: CreateSubItemForCustomerEstimateEstimateContractTermSchema.optional(),
|
|
613
818
|
billing_override: CreateSubItemForCustomerEstimateEstimateBillingOverrideSchema.optional(),
|
|
614
|
-
subscription_items:
|
|
615
|
-
|
|
616
|
-
|
|
819
|
+
subscription_items: z
|
|
820
|
+
.union([
|
|
821
|
+
z.array(CreateSubItemForCustomerEstimateEstimateSubscriptionItemsItemSchema.optional()),
|
|
822
|
+
CreateSubItemForCustomerEstimateEstimateSubscriptionItemsSchema,
|
|
823
|
+
])
|
|
824
|
+
.optional(),
|
|
825
|
+
discounts: z
|
|
826
|
+
.union([
|
|
827
|
+
z.array(CreateSubItemForCustomerEstimateEstimateDiscountsItemSchema.optional()),
|
|
828
|
+
CreateSubItemForCustomerEstimateEstimateDiscountsSchema,
|
|
829
|
+
])
|
|
830
|
+
.optional(),
|
|
831
|
+
item_tiers: z
|
|
832
|
+
.union([
|
|
833
|
+
z.array(CreateSubItemForCustomerEstimateEstimateItemTiersItemSchema.optional()),
|
|
834
|
+
CreateSubItemForCustomerEstimateEstimateItemTiersSchema,
|
|
835
|
+
])
|
|
836
|
+
.optional(),
|
|
617
837
|
});
|
|
618
838
|
export { CreateSubItemForCustomerEstimateEstimateBodySchema };
|
|
619
839
|
//Estimate.updateSubscription
|
|
@@ -687,6 +907,16 @@ const UpdateSubscriptionEstimateCustomerSchema = z.object({
|
|
|
687
907
|
registered_for_gst: z.boolean().optional(),
|
|
688
908
|
taxability: z.enum(['taxable', 'exempt', 'zero_rated']).optional(),
|
|
689
909
|
});
|
|
910
|
+
const UpdateSubscriptionEstimateAddonsItemSchema = z.object({
|
|
911
|
+
id: z.string().max(100).optional(),
|
|
912
|
+
quantity: z.number().int().min(1).optional(),
|
|
913
|
+
unit_price: z.number().int().min(0).optional(),
|
|
914
|
+
billing_cycles: z.number().int().min(0).optional(),
|
|
915
|
+
quantity_in_decimal: z.string().max(33).optional(),
|
|
916
|
+
unit_price_in_decimal: z.string().max(39).optional(),
|
|
917
|
+
trial_end: z.number().int().optional(),
|
|
918
|
+
proration_type: z.enum(['full_term', 'partial_term', 'none']).optional(),
|
|
919
|
+
});
|
|
690
920
|
const UpdateSubscriptionEstimateAddonsSchema = z.object({
|
|
691
921
|
id: z.array(z.string().max(100).optional()).optional(),
|
|
692
922
|
quantity: z.array(z.number().int().min(1).optional()).optional(),
|
|
@@ -699,6 +929,25 @@ const UpdateSubscriptionEstimateAddonsSchema = z.object({
|
|
|
699
929
|
.array(z.enum(['full_term', 'partial_term', 'none']).optional())
|
|
700
930
|
.optional(),
|
|
701
931
|
});
|
|
932
|
+
const UpdateSubscriptionEstimateEventBasedAddonsItemSchema = z.object({
|
|
933
|
+
id: z.string().max(100).optional(),
|
|
934
|
+
quantity: z.number().int().min(1).optional(),
|
|
935
|
+
unit_price: z.number().int().min(0).optional(),
|
|
936
|
+
service_period_in_days: z.number().int().min(1).max(4000).optional(),
|
|
937
|
+
charge_on: z.enum(['immediately', 'on_event']).optional(),
|
|
938
|
+
on_event: z
|
|
939
|
+
.enum([
|
|
940
|
+
'subscription_creation',
|
|
941
|
+
'subscription_trial_start',
|
|
942
|
+
'plan_activation',
|
|
943
|
+
'subscription_activation',
|
|
944
|
+
'contract_termination',
|
|
945
|
+
])
|
|
946
|
+
.optional(),
|
|
947
|
+
charge_once: z.boolean().default(true).optional(),
|
|
948
|
+
quantity_in_decimal: z.string().max(33).optional(),
|
|
949
|
+
unit_price_in_decimal: z.string().max(39).optional(),
|
|
950
|
+
});
|
|
702
951
|
const UpdateSubscriptionEstimateEventBasedAddonsSchema = z.object({
|
|
703
952
|
id: z.array(z.string().max(100).optional()).optional(),
|
|
704
953
|
quantity: z.array(z.number().int().min(1).optional()).optional(),
|
|
@@ -749,8 +998,18 @@ const UpdateSubscriptionEstimateBodySchema = z.looseObject({
|
|
|
749
998
|
billing_address: UpdateSubscriptionEstimateBillingAddressSchema.optional(),
|
|
750
999
|
shipping_address: UpdateSubscriptionEstimateShippingAddressSchema.optional(),
|
|
751
1000
|
customer: UpdateSubscriptionEstimateCustomerSchema.optional(),
|
|
752
|
-
addons:
|
|
753
|
-
|
|
1001
|
+
addons: z
|
|
1002
|
+
.union([
|
|
1003
|
+
z.array(UpdateSubscriptionEstimateAddonsItemSchema.optional()),
|
|
1004
|
+
UpdateSubscriptionEstimateAddonsSchema,
|
|
1005
|
+
])
|
|
1006
|
+
.optional(),
|
|
1007
|
+
event_based_addons: z
|
|
1008
|
+
.union([
|
|
1009
|
+
z.array(UpdateSubscriptionEstimateEventBasedAddonsItemSchema.optional()),
|
|
1010
|
+
UpdateSubscriptionEstimateEventBasedAddonsSchema,
|
|
1011
|
+
])
|
|
1012
|
+
.optional(),
|
|
754
1013
|
});
|
|
755
1014
|
export { UpdateSubscriptionEstimateBodySchema };
|
|
756
1015
|
//Estimate.updateSubscriptionForItems
|
|
@@ -823,6 +1082,30 @@ const UpdateSubscriptionForItemsEstimateBillingOverrideSchema = z.object({
|
|
|
823
1082
|
max_excess_payment_usage: z.number().int().min(-1).optional(),
|
|
824
1083
|
max_refundable_credits_usage: z.number().int().min(-1).optional(),
|
|
825
1084
|
});
|
|
1085
|
+
const UpdateSubscriptionForItemsEstimateSubscriptionItemsItemSchema = z.object({
|
|
1086
|
+
item_price_id: z.string().max(100),
|
|
1087
|
+
quantity: z.number().int().min(1).optional(),
|
|
1088
|
+
quantity_in_decimal: z.string().max(33).optional(),
|
|
1089
|
+
unit_price: z.number().int().min(0).optional(),
|
|
1090
|
+
unit_price_in_decimal: z.string().max(39).optional(),
|
|
1091
|
+
billing_cycles: z.number().int().min(0).optional(),
|
|
1092
|
+
trial_end: z.number().int().optional(),
|
|
1093
|
+
service_period_days: z.number().int().min(1).max(4000).optional(),
|
|
1094
|
+
charge_on_event: z
|
|
1095
|
+
.enum([
|
|
1096
|
+
'subscription_creation',
|
|
1097
|
+
'subscription_trial_start',
|
|
1098
|
+
'plan_activation',
|
|
1099
|
+
'subscription_activation',
|
|
1100
|
+
'contract_termination',
|
|
1101
|
+
])
|
|
1102
|
+
.optional(),
|
|
1103
|
+
charge_once: z.boolean().optional(),
|
|
1104
|
+
charge_on_option: z.enum(['immediately', 'on_event']).optional(),
|
|
1105
|
+
item_type: z.enum(['plan', 'addon', 'charge']).optional(),
|
|
1106
|
+
description: z.string().max(2000).optional(),
|
|
1107
|
+
proration_type: z.enum(['full_term', 'partial_term', 'none']).optional(),
|
|
1108
|
+
});
|
|
826
1109
|
const UpdateSubscriptionForItemsEstimateSubscriptionItemsSchema = z.object({
|
|
827
1110
|
item_price_id: z.array(z.string().max(100).optional()),
|
|
828
1111
|
quantity: z.array(z.number().int().min(1).optional()).optional(),
|
|
@@ -850,11 +1133,25 @@ const UpdateSubscriptionForItemsEstimateSubscriptionItemsSchema = z.object({
|
|
|
850
1133
|
.array(z.enum(['immediately', 'on_event']).optional())
|
|
851
1134
|
.optional(),
|
|
852
1135
|
item_type: z.array(z.enum(['plan', 'addon', 'charge']).optional()).optional(),
|
|
853
|
-
description: z.array(z.string().max(
|
|
1136
|
+
description: z.array(z.string().max(2000).optional()).optional(),
|
|
854
1137
|
proration_type: z
|
|
855
1138
|
.array(z.enum(['full_term', 'partial_term', 'none']).optional())
|
|
856
1139
|
.optional(),
|
|
857
1140
|
});
|
|
1141
|
+
const UpdateSubscriptionForItemsEstimateDiscountsItemSchema = z.object({
|
|
1142
|
+
apply_on: z.enum(['invoice_amount', 'specific_item_price']).optional(),
|
|
1143
|
+
duration_type: z.enum(['one_time', 'forever', 'limited_period']),
|
|
1144
|
+
percentage: z.number().min(0.01).max(100).optional(),
|
|
1145
|
+
amount: z.number().int().min(0).optional(),
|
|
1146
|
+
period: z.number().int().min(1).optional(),
|
|
1147
|
+
period_unit: z.enum(['day', 'week', 'month', 'year']).optional(),
|
|
1148
|
+
included_in_mrr: z.boolean().optional(),
|
|
1149
|
+
item_price_id: z.string().max(100).optional(),
|
|
1150
|
+
quantity: z.number().int().min(1).optional(),
|
|
1151
|
+
operation_type: z.enum(['add', 'remove']),
|
|
1152
|
+
id: z.string().max(50).optional(),
|
|
1153
|
+
description: z.string().max(100).optional(),
|
|
1154
|
+
});
|
|
858
1155
|
const UpdateSubscriptionForItemsEstimateDiscountsSchema = z.object({
|
|
859
1156
|
apply_on: z
|
|
860
1157
|
.array(z.enum(['invoice_amount', 'specific_item_price']).optional())
|
|
@@ -871,6 +1168,18 @@ const UpdateSubscriptionForItemsEstimateDiscountsSchema = z.object({
|
|
|
871
1168
|
quantity: z.array(z.number().int().min(1).optional()).optional(),
|
|
872
1169
|
operation_type: z.array(z.enum(['add', 'remove']).optional()),
|
|
873
1170
|
id: z.array(z.string().max(50).optional()).optional(),
|
|
1171
|
+
description: z.array(z.string().max(100).optional()).optional(),
|
|
1172
|
+
});
|
|
1173
|
+
const UpdateSubscriptionForItemsEstimateItemTiersItemSchema = z.object({
|
|
1174
|
+
item_price_id: z.string().max(100).optional(),
|
|
1175
|
+
starting_unit: z.number().int().min(1).optional(),
|
|
1176
|
+
ending_unit: z.number().int().optional(),
|
|
1177
|
+
price: z.number().int().min(0).optional(),
|
|
1178
|
+
starting_unit_in_decimal: z.string().max(33).optional(),
|
|
1179
|
+
ending_unit_in_decimal: z.string().max(33).optional(),
|
|
1180
|
+
price_in_decimal: z.string().max(39).optional(),
|
|
1181
|
+
pricing_type: z.enum(['per_unit', 'flat_fee', 'package']).optional(),
|
|
1182
|
+
package_size: z.number().int().min(1).optional(),
|
|
874
1183
|
});
|
|
875
1184
|
const UpdateSubscriptionForItemsEstimateItemTiersSchema = z.object({
|
|
876
1185
|
item_price_id: z.array(z.string().max(100).optional()).optional(),
|
|
@@ -912,9 +1221,24 @@ const UpdateSubscriptionForItemsEstimateBodySchema = z.looseObject({
|
|
|
912
1221
|
shipping_address: UpdateSubscriptionForItemsEstimateShippingAddressSchema.optional(),
|
|
913
1222
|
customer: UpdateSubscriptionForItemsEstimateCustomerSchema.optional(),
|
|
914
1223
|
billing_override: UpdateSubscriptionForItemsEstimateBillingOverrideSchema.optional(),
|
|
915
|
-
subscription_items:
|
|
916
|
-
|
|
917
|
-
|
|
1224
|
+
subscription_items: z
|
|
1225
|
+
.union([
|
|
1226
|
+
z.array(UpdateSubscriptionForItemsEstimateSubscriptionItemsItemSchema.optional()),
|
|
1227
|
+
UpdateSubscriptionForItemsEstimateSubscriptionItemsSchema,
|
|
1228
|
+
])
|
|
1229
|
+
.optional(),
|
|
1230
|
+
discounts: z
|
|
1231
|
+
.union([
|
|
1232
|
+
z.array(UpdateSubscriptionForItemsEstimateDiscountsItemSchema.optional()),
|
|
1233
|
+
UpdateSubscriptionForItemsEstimateDiscountsSchema,
|
|
1234
|
+
])
|
|
1235
|
+
.optional(),
|
|
1236
|
+
item_tiers: z
|
|
1237
|
+
.union([
|
|
1238
|
+
z.array(UpdateSubscriptionForItemsEstimateItemTiersItemSchema.optional()),
|
|
1239
|
+
UpdateSubscriptionForItemsEstimateItemTiersSchema,
|
|
1240
|
+
])
|
|
1241
|
+
.optional(),
|
|
918
1242
|
});
|
|
919
1243
|
export { UpdateSubscriptionForItemsEstimateBodySchema };
|
|
920
1244
|
//Estimate.renewalEstimate
|
|
@@ -935,6 +1259,10 @@ const AdvanceInvoiceEstimateEstimateFixedIntervalScheduleSchema = z.object({
|
|
|
935
1259
|
.optional(),
|
|
936
1260
|
end_date: z.number().int().optional(),
|
|
937
1261
|
});
|
|
1262
|
+
const AdvanceInvoiceEstimateEstimateSpecificDatesScheduleItemSchema = z.object({
|
|
1263
|
+
terms_to_charge: z.number().int().optional(),
|
|
1264
|
+
date: z.number().int().optional(),
|
|
1265
|
+
});
|
|
938
1266
|
const AdvanceInvoiceEstimateEstimateSpecificDatesScheduleSchema = z.object({
|
|
939
1267
|
terms_to_charge: z.array(z.number().int().optional()).optional(),
|
|
940
1268
|
date: z.array(z.number().int().optional()).optional(),
|
|
@@ -946,7 +1274,12 @@ const AdvanceInvoiceEstimateEstimateBodySchema = z.looseObject({
|
|
|
946
1274
|
.enum(['immediate', 'specific_dates', 'fixed_intervals'])
|
|
947
1275
|
.optional(),
|
|
948
1276
|
fixed_interval_schedule: AdvanceInvoiceEstimateEstimateFixedIntervalScheduleSchema.optional(),
|
|
949
|
-
specific_dates_schedule:
|
|
1277
|
+
specific_dates_schedule: z
|
|
1278
|
+
.union([
|
|
1279
|
+
z.array(AdvanceInvoiceEstimateEstimateSpecificDatesScheduleItemSchema.optional()),
|
|
1280
|
+
AdvanceInvoiceEstimateEstimateSpecificDatesScheduleSchema,
|
|
1281
|
+
])
|
|
1282
|
+
.optional(),
|
|
950
1283
|
});
|
|
951
1284
|
export { AdvanceInvoiceEstimateEstimateBodySchema };
|
|
952
1285
|
//Estimate.regenerateInvoiceEstimate
|
|
@@ -970,6 +1303,12 @@ const ChangeTermEndEstimateBodySchema = z.looseObject({
|
|
|
970
1303
|
});
|
|
971
1304
|
export { ChangeTermEndEstimateBodySchema };
|
|
972
1305
|
//Estimate.cancelSubscription
|
|
1306
|
+
const CancelSubscriptionEstimateEventBasedAddonsItemSchema = z.object({
|
|
1307
|
+
id: z.string().max(100).optional(),
|
|
1308
|
+
quantity: z.number().int().min(1).optional(),
|
|
1309
|
+
unit_price: z.number().int().min(0).optional(),
|
|
1310
|
+
service_period_in_days: z.number().int().min(1).max(4000).optional(),
|
|
1311
|
+
});
|
|
973
1312
|
const CancelSubscriptionEstimateEventBasedAddonsSchema = z.object({
|
|
974
1313
|
id: z.array(z.string().max(100).optional()).optional(),
|
|
975
1314
|
quantity: z.array(z.number().int().min(1).optional()).optional(),
|
|
@@ -1009,10 +1348,23 @@ const CancelSubscriptionEstimateBodySchema = z.looseObject({
|
|
|
1009
1348
|
.optional(),
|
|
1010
1349
|
invoice_date: z.number().int().optional(),
|
|
1011
1350
|
cancel_reason_code: z.string().max(100).optional(),
|
|
1012
|
-
event_based_addons:
|
|
1351
|
+
event_based_addons: z
|
|
1352
|
+
.union([
|
|
1353
|
+
z.array(CancelSubscriptionEstimateEventBasedAddonsItemSchema.optional()),
|
|
1354
|
+
CancelSubscriptionEstimateEventBasedAddonsSchema,
|
|
1355
|
+
])
|
|
1356
|
+
.optional(),
|
|
1013
1357
|
});
|
|
1014
1358
|
export { CancelSubscriptionEstimateBodySchema };
|
|
1015
1359
|
//Estimate.cancelSubscriptionForItems
|
|
1360
|
+
const CancelSubscriptionForItemsEstimateSubscriptionItemsItemSchema = z.object({
|
|
1361
|
+
item_price_id: z.string().max(100).optional(),
|
|
1362
|
+
quantity: z.number().int().min(1).optional(),
|
|
1363
|
+
quantity_in_decimal: z.string().max(33).optional(),
|
|
1364
|
+
unit_price: z.number().int().min(0).optional(),
|
|
1365
|
+
unit_price_in_decimal: z.string().max(39).optional(),
|
|
1366
|
+
service_period_days: z.number().int().min(1).max(4000).optional(),
|
|
1367
|
+
});
|
|
1016
1368
|
const CancelSubscriptionForItemsEstimateSubscriptionItemsSchema = z.object({
|
|
1017
1369
|
item_price_id: z.array(z.string().max(100).optional()).optional(),
|
|
1018
1370
|
quantity: z.array(z.number().int().min(1).optional()).optional(),
|
|
@@ -1055,7 +1407,12 @@ const CancelSubscriptionForItemsEstimateBodySchema = z.looseObject({
|
|
|
1055
1407
|
invoice_date: z.number().int().optional(),
|
|
1056
1408
|
include_cancellation_day_in_billing: z.boolean().optional(),
|
|
1057
1409
|
cancel_reason_code: z.string().max(100).optional(),
|
|
1058
|
-
subscription_items:
|
|
1410
|
+
subscription_items: z
|
|
1411
|
+
.union([
|
|
1412
|
+
z.array(CancelSubscriptionForItemsEstimateSubscriptionItemsItemSchema.optional()),
|
|
1413
|
+
CancelSubscriptionForItemsEstimateSubscriptionItemsSchema,
|
|
1414
|
+
])
|
|
1415
|
+
.optional(),
|
|
1059
1416
|
});
|
|
1060
1417
|
export { CancelSubscriptionForItemsEstimateBodySchema };
|
|
1061
1418
|
//Estimate.pauseSubscription
|
|
@@ -1204,6 +1561,11 @@ const GiftSubscriptionEstimateSubscriptionSchema = z.object({
|
|
|
1204
1561
|
plan_quantity: z.number().int().min(1).optional(),
|
|
1205
1562
|
plan_quantity_in_decimal: z.string().max(33).optional(),
|
|
1206
1563
|
});
|
|
1564
|
+
const GiftSubscriptionEstimateAddonsItemSchema = z.object({
|
|
1565
|
+
id: z.string().max(100).optional(),
|
|
1566
|
+
quantity: z.number().int().min(1).optional(),
|
|
1567
|
+
quantity_in_decimal: z.string().max(33).optional(),
|
|
1568
|
+
});
|
|
1207
1569
|
const GiftSubscriptionEstimateAddonsSchema = z.object({
|
|
1208
1570
|
id: z.array(z.string().max(100).optional()).optional(),
|
|
1209
1571
|
quantity: z.array(z.number().int().min(1).optional()).optional(),
|
|
@@ -1217,7 +1579,12 @@ const GiftSubscriptionEstimateBodySchema = z.looseObject({
|
|
|
1217
1579
|
payment_intent: GiftSubscriptionEstimatePaymentIntentSchema.optional(),
|
|
1218
1580
|
shipping_address: GiftSubscriptionEstimateShippingAddressSchema.optional(),
|
|
1219
1581
|
subscription: GiftSubscriptionEstimateSubscriptionSchema.optional(),
|
|
1220
|
-
addons:
|
|
1582
|
+
addons: z
|
|
1583
|
+
.union([
|
|
1584
|
+
z.array(GiftSubscriptionEstimateAddonsItemSchema.optional()),
|
|
1585
|
+
GiftSubscriptionEstimateAddonsSchema,
|
|
1586
|
+
])
|
|
1587
|
+
.optional(),
|
|
1221
1588
|
});
|
|
1222
1589
|
export { GiftSubscriptionEstimateBodySchema };
|
|
1223
1590
|
//Estimate.giftSubscriptionForItems
|
|
@@ -1335,6 +1702,13 @@ const GiftSubscriptionForItemsEstimateShippingAddressSchema = z.object({
|
|
|
1335
1702
|
.enum(['not_validated', 'valid', 'partially_valid', 'invalid'])
|
|
1336
1703
|
.optional(),
|
|
1337
1704
|
});
|
|
1705
|
+
const GiftSubscriptionForItemsEstimateSubscriptionItemsItemSchema = z.object({
|
|
1706
|
+
item_price_id: z.string().max(100).optional(),
|
|
1707
|
+
quantity: z.number().int().min(1).optional(),
|
|
1708
|
+
quantity_in_decimal: z.string().max(33).optional(),
|
|
1709
|
+
unit_price: z.number().int().min(0).optional(),
|
|
1710
|
+
unit_price_in_decimal: z.string().max(39).optional(),
|
|
1711
|
+
});
|
|
1338
1712
|
const GiftSubscriptionForItemsEstimateSubscriptionItemsSchema = z.object({
|
|
1339
1713
|
item_price_id: z.array(z.string().max(100).optional()).optional(),
|
|
1340
1714
|
quantity: z.array(z.number().int().min(1).optional()).optional(),
|
|
@@ -1342,6 +1716,15 @@ const GiftSubscriptionForItemsEstimateSubscriptionItemsSchema = z.object({
|
|
|
1342
1716
|
unit_price: z.array(z.number().int().min(0).optional()).optional(),
|
|
1343
1717
|
unit_price_in_decimal: z.array(z.string().max(39).optional()).optional(),
|
|
1344
1718
|
});
|
|
1719
|
+
const GiftSubscriptionForItemsEstimateItemTiersItemSchema = z.object({
|
|
1720
|
+
item_price_id: z.string().max(100).optional(),
|
|
1721
|
+
starting_unit: z.number().int().min(1).optional(),
|
|
1722
|
+
ending_unit: z.number().int().optional(),
|
|
1723
|
+
price: z.number().int().min(0).optional(),
|
|
1724
|
+
starting_unit_in_decimal: z.string().max(33).optional(),
|
|
1725
|
+
ending_unit_in_decimal: z.string().max(33).optional(),
|
|
1726
|
+
price_in_decimal: z.string().max(39).optional(),
|
|
1727
|
+
});
|
|
1345
1728
|
const GiftSubscriptionForItemsEstimateItemTiersSchema = z.object({
|
|
1346
1729
|
item_price_id: z.array(z.string().max(100).optional()).optional(),
|
|
1347
1730
|
starting_unit: z.array(z.number().int().min(1).optional()).optional(),
|
|
@@ -1358,8 +1741,18 @@ const GiftSubscriptionForItemsEstimateBodySchema = z.looseObject({
|
|
|
1358
1741
|
gift_receiver: GiftSubscriptionForItemsEstimateGiftReceiverSchema.optional(),
|
|
1359
1742
|
payment_intent: GiftSubscriptionForItemsEstimatePaymentIntentSchema.optional(),
|
|
1360
1743
|
shipping_address: GiftSubscriptionForItemsEstimateShippingAddressSchema.optional(),
|
|
1361
|
-
subscription_items:
|
|
1362
|
-
|
|
1744
|
+
subscription_items: z
|
|
1745
|
+
.union([
|
|
1746
|
+
z.array(GiftSubscriptionForItemsEstimateSubscriptionItemsItemSchema.optional()),
|
|
1747
|
+
GiftSubscriptionForItemsEstimateSubscriptionItemsSchema,
|
|
1748
|
+
])
|
|
1749
|
+
.optional(),
|
|
1750
|
+
item_tiers: z
|
|
1751
|
+
.union([
|
|
1752
|
+
z.array(GiftSubscriptionForItemsEstimateItemTiersItemSchema.optional()),
|
|
1753
|
+
GiftSubscriptionForItemsEstimateItemTiersSchema,
|
|
1754
|
+
])
|
|
1755
|
+
.optional(),
|
|
1363
1756
|
});
|
|
1364
1757
|
export { GiftSubscriptionForItemsEstimateBodySchema };
|
|
1365
1758
|
//Estimate.createInvoice
|
|
@@ -1386,6 +1779,15 @@ const CreateInvoiceEstimateShippingAddressSchema = z.object({
|
|
|
1386
1779
|
.enum(['not_validated', 'valid', 'partially_valid', 'invalid'])
|
|
1387
1780
|
.optional(),
|
|
1388
1781
|
});
|
|
1782
|
+
const CreateInvoiceEstimateAddonsItemSchema = z.object({
|
|
1783
|
+
id: z.string().max(100).optional(),
|
|
1784
|
+
quantity: z.number().int().min(1).optional(),
|
|
1785
|
+
quantity_in_decimal: z.string().max(33).optional(),
|
|
1786
|
+
unit_price: z.number().int().min(0).optional(),
|
|
1787
|
+
unit_price_in_decimal: z.string().max(39).optional(),
|
|
1788
|
+
date_from: z.number().int().optional(),
|
|
1789
|
+
date_to: z.number().int().optional(),
|
|
1790
|
+
});
|
|
1389
1791
|
const CreateInvoiceEstimateAddonsSchema = z.object({
|
|
1390
1792
|
id: z.array(z.string().max(100).optional()).optional(),
|
|
1391
1793
|
quantity: z.array(z.number().int().min(1).optional()).optional(),
|
|
@@ -1395,6 +1797,23 @@ const CreateInvoiceEstimateAddonsSchema = z.object({
|
|
|
1395
1797
|
date_from: z.array(z.number().int().optional()).optional(),
|
|
1396
1798
|
date_to: z.array(z.number().int().optional()).optional(),
|
|
1397
1799
|
});
|
|
1800
|
+
const CreateInvoiceEstimateChargesItemSchema = z.object({
|
|
1801
|
+
amount: z.number().int().min(1).optional(),
|
|
1802
|
+
amount_in_decimal: z.string().max(39).optional(),
|
|
1803
|
+
description: z.string().max(250).optional(),
|
|
1804
|
+
taxable: z.boolean().default(true).optional(),
|
|
1805
|
+
tax_profile_id: z.string().max(50).optional(),
|
|
1806
|
+
avalara_tax_code: z.string().max(50).optional(),
|
|
1807
|
+
hsn_code: z.string().max(50).optional(),
|
|
1808
|
+
taxjar_product_code: z.string().max(50).optional(),
|
|
1809
|
+
avalara_sale_type: z
|
|
1810
|
+
.enum(['wholesale', 'retail', 'consumed', 'vendor_use'])
|
|
1811
|
+
.optional(),
|
|
1812
|
+
avalara_transaction_type: z.number().int().optional(),
|
|
1813
|
+
avalara_service_type: z.number().int().optional(),
|
|
1814
|
+
date_from: z.number().int().optional(),
|
|
1815
|
+
date_to: z.number().int().optional(),
|
|
1816
|
+
});
|
|
1398
1817
|
const CreateInvoiceEstimateChargesSchema = z.object({
|
|
1399
1818
|
amount: z.array(z.number().int().min(1).optional()).optional(),
|
|
1400
1819
|
amount_in_decimal: z.array(z.string().max(39).optional()).optional(),
|
|
@@ -1412,6 +1831,12 @@ const CreateInvoiceEstimateChargesSchema = z.object({
|
|
|
1412
1831
|
date_from: z.array(z.number().int().optional()).optional(),
|
|
1413
1832
|
date_to: z.array(z.number().int().optional()).optional(),
|
|
1414
1833
|
});
|
|
1834
|
+
const CreateInvoiceEstimateNotesToRemoveItemSchema = z.object({
|
|
1835
|
+
entity_type: z
|
|
1836
|
+
.enum(['plan', 'addon', 'customer', 'subscription', 'coupon'])
|
|
1837
|
+
.optional(),
|
|
1838
|
+
entity_id: z.string().max(100).optional(),
|
|
1839
|
+
});
|
|
1415
1840
|
const CreateInvoiceEstimateNotesToRemoveSchema = z.object({
|
|
1416
1841
|
entity_type: z
|
|
1417
1842
|
.array(z
|
|
@@ -1420,6 +1845,11 @@ const CreateInvoiceEstimateNotesToRemoveSchema = z.object({
|
|
|
1420
1845
|
.optional(),
|
|
1421
1846
|
entity_id: z.array(z.string().max(100).optional()).optional(),
|
|
1422
1847
|
});
|
|
1848
|
+
const CreateInvoiceEstimateTaxProvidersFieldsItemSchema = z.object({
|
|
1849
|
+
provider_name: z.string().max(50).optional(),
|
|
1850
|
+
field_id: z.string().max(50).optional(),
|
|
1851
|
+
field_value: z.string().max(50).optional(),
|
|
1852
|
+
});
|
|
1423
1853
|
const CreateInvoiceEstimateTaxProvidersFieldsSchema = z.object({
|
|
1424
1854
|
provider_name: z.array(z.string().max(50).optional()).optional(),
|
|
1425
1855
|
field_id: z.array(z.string().max(50).optional()).optional(),
|
|
@@ -1437,10 +1867,30 @@ const CreateInvoiceEstimateBodySchema = z.looseObject({
|
|
|
1437
1867
|
invoice_date: z.number().int().optional(),
|
|
1438
1868
|
invoice: CreateInvoiceEstimateInvoiceSchema.optional(),
|
|
1439
1869
|
shipping_address: CreateInvoiceEstimateShippingAddressSchema.optional(),
|
|
1440
|
-
addons:
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1870
|
+
addons: z
|
|
1871
|
+
.union([
|
|
1872
|
+
z.array(CreateInvoiceEstimateAddonsItemSchema.optional()),
|
|
1873
|
+
CreateInvoiceEstimateAddonsSchema,
|
|
1874
|
+
])
|
|
1875
|
+
.optional(),
|
|
1876
|
+
charges: z
|
|
1877
|
+
.union([
|
|
1878
|
+
z.array(CreateInvoiceEstimateChargesItemSchema.optional()),
|
|
1879
|
+
CreateInvoiceEstimateChargesSchema,
|
|
1880
|
+
])
|
|
1881
|
+
.optional(),
|
|
1882
|
+
notes_to_remove: z
|
|
1883
|
+
.union([
|
|
1884
|
+
z.array(CreateInvoiceEstimateNotesToRemoveItemSchema.optional()),
|
|
1885
|
+
CreateInvoiceEstimateNotesToRemoveSchema,
|
|
1886
|
+
])
|
|
1887
|
+
.optional(),
|
|
1888
|
+
tax_providers_fields: z
|
|
1889
|
+
.union([
|
|
1890
|
+
z.array(CreateInvoiceEstimateTaxProvidersFieldsItemSchema.optional()),
|
|
1891
|
+
CreateInvoiceEstimateTaxProvidersFieldsSchema,
|
|
1892
|
+
])
|
|
1893
|
+
.optional(),
|
|
1444
1894
|
});
|
|
1445
1895
|
export { CreateInvoiceEstimateBodySchema };
|
|
1446
1896
|
//Estimate.createInvoiceForItems
|
|
@@ -1479,6 +1929,17 @@ const CreateInvoiceForItemsEstimateBillingAddressSchema = z.object({
|
|
|
1479
1929
|
.enum(['not_validated', 'valid', 'partially_valid', 'invalid'])
|
|
1480
1930
|
.optional(),
|
|
1481
1931
|
});
|
|
1932
|
+
const CreateInvoiceForItemsEstimateItemPricesItemSchema = z.object({
|
|
1933
|
+
item_price_id: z.string().max(100).optional(),
|
|
1934
|
+
quantity: z.number().int().min(1).optional(),
|
|
1935
|
+
quantity_in_decimal: z.string().max(33).optional(),
|
|
1936
|
+
unit_price: z.number().int().min(0).optional(),
|
|
1937
|
+
unit_price_in_decimal: z.string().max(39).optional(),
|
|
1938
|
+
date_from: z.number().int().optional(),
|
|
1939
|
+
date_to: z.number().int().optional(),
|
|
1940
|
+
description: z.string().max(250).optional(),
|
|
1941
|
+
entity_description: z.string().max(2000).optional(),
|
|
1942
|
+
});
|
|
1482
1943
|
const CreateInvoiceForItemsEstimateItemPricesSchema = z.object({
|
|
1483
1944
|
item_price_id: z.array(z.string().max(100).optional()).optional(),
|
|
1484
1945
|
quantity: z.array(z.number().int().min(1).optional()).optional(),
|
|
@@ -1490,6 +1951,17 @@ const CreateInvoiceForItemsEstimateItemPricesSchema = z.object({
|
|
|
1490
1951
|
description: z.array(z.string().max(250).optional()).optional(),
|
|
1491
1952
|
entity_description: z.array(z.string().max(2000).optional()).optional(),
|
|
1492
1953
|
});
|
|
1954
|
+
const CreateInvoiceForItemsEstimateItemTiersItemSchema = z.object({
|
|
1955
|
+
item_price_id: z.string().max(100).optional(),
|
|
1956
|
+
starting_unit: z.number().int().min(1).optional(),
|
|
1957
|
+
ending_unit: z.number().int().optional(),
|
|
1958
|
+
price: z.number().int().min(0).optional(),
|
|
1959
|
+
starting_unit_in_decimal: z.string().max(33).optional(),
|
|
1960
|
+
ending_unit_in_decimal: z.string().max(33).optional(),
|
|
1961
|
+
price_in_decimal: z.string().max(39).optional(),
|
|
1962
|
+
pricing_type: z.enum(['per_unit', 'flat_fee', 'package']).optional(),
|
|
1963
|
+
package_size: z.number().int().min(1).optional(),
|
|
1964
|
+
});
|
|
1493
1965
|
const CreateInvoiceForItemsEstimateItemTiersSchema = z.object({
|
|
1494
1966
|
item_price_id: z.array(z.string().max(100).optional()).optional(),
|
|
1495
1967
|
starting_unit: z.array(z.number().int().min(1).optional()).optional(),
|
|
@@ -1503,6 +1975,24 @@ const CreateInvoiceForItemsEstimateItemTiersSchema = z.object({
|
|
|
1503
1975
|
.optional(),
|
|
1504
1976
|
package_size: z.array(z.number().int().min(1).optional()).optional(),
|
|
1505
1977
|
});
|
|
1978
|
+
const CreateInvoiceForItemsEstimateChargesItemSchema = z.object({
|
|
1979
|
+
amount: z.number().int().min(1).optional(),
|
|
1980
|
+
amount_in_decimal: z.string().max(39).optional(),
|
|
1981
|
+
description: z.string().max(250).optional(),
|
|
1982
|
+
taxable: z.boolean().default(true).optional(),
|
|
1983
|
+
tax_profile_id: z.string().max(50).optional(),
|
|
1984
|
+
avalara_tax_code: z.string().max(50).optional(),
|
|
1985
|
+
hsn_code: z.string().max(50).optional(),
|
|
1986
|
+
taxjar_product_code: z.string().max(50).optional(),
|
|
1987
|
+
avalara_sale_type: z
|
|
1988
|
+
.enum(['wholesale', 'retail', 'consumed', 'vendor_use'])
|
|
1989
|
+
.optional(),
|
|
1990
|
+
avalara_transaction_type: z.number().int().optional(),
|
|
1991
|
+
avalara_service_type: z.number().int().optional(),
|
|
1992
|
+
date_from: z.number().int().optional(),
|
|
1993
|
+
date_to: z.number().int().optional(),
|
|
1994
|
+
entity_description: z.string().max(2000).optional(),
|
|
1995
|
+
});
|
|
1506
1996
|
const CreateInvoiceForItemsEstimateChargesSchema = z.object({
|
|
1507
1997
|
amount: z.array(z.number().int().min(1).optional()).optional(),
|
|
1508
1998
|
amount_in_decimal: z.array(z.string().max(39).optional()).optional(),
|
|
@@ -1521,6 +2011,19 @@ const CreateInvoiceForItemsEstimateChargesSchema = z.object({
|
|
|
1521
2011
|
date_to: z.array(z.number().int().optional()).optional(),
|
|
1522
2012
|
entity_description: z.array(z.string().max(2000).optional()).optional(),
|
|
1523
2013
|
});
|
|
2014
|
+
const CreateInvoiceForItemsEstimateNotesToRemoveItemSchema = z.object({
|
|
2015
|
+
entity_type: z
|
|
2016
|
+
.enum([
|
|
2017
|
+
'customer',
|
|
2018
|
+
'subscription',
|
|
2019
|
+
'coupon',
|
|
2020
|
+
'plan_item_price',
|
|
2021
|
+
'addon_item_price',
|
|
2022
|
+
'charge_item_price',
|
|
2023
|
+
])
|
|
2024
|
+
.optional(),
|
|
2025
|
+
entity_id: z.string().max(100).optional(),
|
|
2026
|
+
});
|
|
1524
2027
|
const CreateInvoiceForItemsEstimateNotesToRemoveSchema = z.object({
|
|
1525
2028
|
entity_type: z
|
|
1526
2029
|
.array(z
|
|
@@ -1536,6 +2039,13 @@ const CreateInvoiceForItemsEstimateNotesToRemoveSchema = z.object({
|
|
|
1536
2039
|
.optional(),
|
|
1537
2040
|
entity_id: z.array(z.string().max(100).optional()).optional(),
|
|
1538
2041
|
});
|
|
2042
|
+
const CreateInvoiceForItemsEstimateDiscountsItemSchema = z.object({
|
|
2043
|
+
percentage: z.number().min(0.01).max(100).optional(),
|
|
2044
|
+
amount: z.number().int().min(0).optional(),
|
|
2045
|
+
quantity: z.number().int().min(1).optional(),
|
|
2046
|
+
apply_on: z.enum(['invoice_amount', 'specific_item_price']),
|
|
2047
|
+
item_price_id: z.string().max(100).optional(),
|
|
2048
|
+
});
|
|
1539
2049
|
const CreateInvoiceForItemsEstimateDiscountsSchema = z.object({
|
|
1540
2050
|
percentage: z.array(z.number().min(0.01).max(100).optional()).optional(),
|
|
1541
2051
|
amount: z.array(z.number().int().min(0).optional()).optional(),
|
|
@@ -1543,6 +2053,11 @@ const CreateInvoiceForItemsEstimateDiscountsSchema = z.object({
|
|
|
1543
2053
|
apply_on: z.array(z.enum(['invoice_amount', 'specific_item_price']).optional()),
|
|
1544
2054
|
item_price_id: z.array(z.string().max(100).optional()).optional(),
|
|
1545
2055
|
});
|
|
2056
|
+
const CreateInvoiceForItemsEstimateTaxProvidersFieldsItemSchema = z.object({
|
|
2057
|
+
provider_name: z.string().max(50).optional(),
|
|
2058
|
+
field_id: z.string().max(50).optional(),
|
|
2059
|
+
field_value: z.string().max(50).optional(),
|
|
2060
|
+
});
|
|
1546
2061
|
const CreateInvoiceForItemsEstimateTaxProvidersFieldsSchema = z.object({
|
|
1547
2062
|
provider_name: z.array(z.string().max(50).optional()).optional(),
|
|
1548
2063
|
field_id: z.array(z.string().max(50).optional()).optional(),
|
|
@@ -1561,12 +2076,42 @@ const CreateInvoiceForItemsEstimateBodySchema = z.looseObject({
|
|
|
1561
2076
|
invoice: CreateInvoiceForItemsEstimateInvoiceSchema.optional(),
|
|
1562
2077
|
shipping_address: CreateInvoiceForItemsEstimateShippingAddressSchema.optional(),
|
|
1563
2078
|
billing_address: CreateInvoiceForItemsEstimateBillingAddressSchema.optional(),
|
|
1564
|
-
item_prices:
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
2079
|
+
item_prices: z
|
|
2080
|
+
.union([
|
|
2081
|
+
z.array(CreateInvoiceForItemsEstimateItemPricesItemSchema.optional()),
|
|
2082
|
+
CreateInvoiceForItemsEstimateItemPricesSchema,
|
|
2083
|
+
])
|
|
2084
|
+
.optional(),
|
|
2085
|
+
item_tiers: z
|
|
2086
|
+
.union([
|
|
2087
|
+
z.array(CreateInvoiceForItemsEstimateItemTiersItemSchema.optional()),
|
|
2088
|
+
CreateInvoiceForItemsEstimateItemTiersSchema,
|
|
2089
|
+
])
|
|
2090
|
+
.optional(),
|
|
2091
|
+
charges: z
|
|
2092
|
+
.union([
|
|
2093
|
+
z.array(CreateInvoiceForItemsEstimateChargesItemSchema.optional()),
|
|
2094
|
+
CreateInvoiceForItemsEstimateChargesSchema,
|
|
2095
|
+
])
|
|
2096
|
+
.optional(),
|
|
2097
|
+
notes_to_remove: z
|
|
2098
|
+
.union([
|
|
2099
|
+
z.array(CreateInvoiceForItemsEstimateNotesToRemoveItemSchema.optional()),
|
|
2100
|
+
CreateInvoiceForItemsEstimateNotesToRemoveSchema,
|
|
2101
|
+
])
|
|
2102
|
+
.optional(),
|
|
2103
|
+
discounts: z
|
|
2104
|
+
.union([
|
|
2105
|
+
z.array(CreateInvoiceForItemsEstimateDiscountsItemSchema.optional()),
|
|
2106
|
+
CreateInvoiceForItemsEstimateDiscountsSchema,
|
|
2107
|
+
])
|
|
2108
|
+
.optional(),
|
|
2109
|
+
tax_providers_fields: z
|
|
2110
|
+
.union([
|
|
2111
|
+
z.array(CreateInvoiceForItemsEstimateTaxProvidersFieldsItemSchema.optional()),
|
|
2112
|
+
CreateInvoiceForItemsEstimateTaxProvidersFieldsSchema,
|
|
2113
|
+
])
|
|
2114
|
+
.optional(),
|
|
1570
2115
|
});
|
|
1571
2116
|
export { CreateInvoiceForItemsEstimateBodySchema };
|
|
1572
2117
|
//Estimate.paymentSchedules
|