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
|
@@ -60,6 +60,15 @@ const CreateSubForCustomerQuoteQuoteContractTermSchema = z.object({
|
|
|
60
60
|
action_at_term_end: z.enum(['renew', 'evergreen', 'cancel']).optional(),
|
|
61
61
|
cancellation_cutoff_period: z.number().int().optional(),
|
|
62
62
|
});
|
|
63
|
+
const CreateSubForCustomerQuoteQuoteAddonsItemSchema = z.object({
|
|
64
|
+
id: z.string().max(100).optional(),
|
|
65
|
+
quantity: z.number().int().min(1).optional(),
|
|
66
|
+
quantity_in_decimal: z.string().max(33).optional(),
|
|
67
|
+
unit_price: z.number().int().min(0).optional(),
|
|
68
|
+
unit_price_in_decimal: z.string().max(39).optional(),
|
|
69
|
+
billing_cycles: z.number().int().min(0).optional(),
|
|
70
|
+
trial_end: z.number().int().optional(),
|
|
71
|
+
});
|
|
63
72
|
const CreateSubForCustomerQuoteQuoteAddonsSchema = z.object({
|
|
64
73
|
id: z.array(z.string().max(100).optional()).optional(),
|
|
65
74
|
quantity: z.array(z.number().int().min(1).optional()).optional(),
|
|
@@ -69,6 +78,25 @@ const CreateSubForCustomerQuoteQuoteAddonsSchema = z.object({
|
|
|
69
78
|
billing_cycles: z.array(z.number().int().min(0).optional()).optional(),
|
|
70
79
|
trial_end: z.array(z.number().int().optional()).optional(),
|
|
71
80
|
});
|
|
81
|
+
const CreateSubForCustomerQuoteQuoteEventBasedAddonsItemSchema = z.object({
|
|
82
|
+
id: z.string().max(100).optional(),
|
|
83
|
+
quantity: z.number().int().min(1).optional(),
|
|
84
|
+
unit_price: z.number().int().min(0).optional(),
|
|
85
|
+
quantity_in_decimal: z.string().max(33).optional(),
|
|
86
|
+
unit_price_in_decimal: z.string().max(39).optional(),
|
|
87
|
+
service_period_in_days: z.number().int().min(1).max(4000).optional(),
|
|
88
|
+
on_event: z
|
|
89
|
+
.enum([
|
|
90
|
+
'subscription_creation',
|
|
91
|
+
'subscription_trial_start',
|
|
92
|
+
'plan_activation',
|
|
93
|
+
'subscription_activation',
|
|
94
|
+
'contract_termination',
|
|
95
|
+
])
|
|
96
|
+
.optional(),
|
|
97
|
+
charge_once: z.boolean().default(true).optional(),
|
|
98
|
+
charge_on: z.enum(['immediately', 'on_event']).optional(),
|
|
99
|
+
});
|
|
72
100
|
const CreateSubForCustomerQuoteQuoteEventBasedAddonsSchema = z.object({
|
|
73
101
|
id: z.array(z.string().max(100).optional()).optional(),
|
|
74
102
|
quantity: z.array(z.number().int().min(1).optional()).optional(),
|
|
@@ -106,8 +134,18 @@ const CreateSubForCustomerQuoteQuoteBodySchema = z.looseObject({
|
|
|
106
134
|
subscription: CreateSubForCustomerQuoteQuoteSubscriptionSchema.optional(),
|
|
107
135
|
shipping_address: CreateSubForCustomerQuoteQuoteShippingAddressSchema.optional(),
|
|
108
136
|
contract_term: CreateSubForCustomerQuoteQuoteContractTermSchema.optional(),
|
|
109
|
-
addons:
|
|
110
|
-
|
|
137
|
+
addons: z
|
|
138
|
+
.union([
|
|
139
|
+
z.array(CreateSubForCustomerQuoteQuoteAddonsItemSchema.optional()),
|
|
140
|
+
CreateSubForCustomerQuoteQuoteAddonsSchema,
|
|
141
|
+
])
|
|
142
|
+
.optional(),
|
|
143
|
+
event_based_addons: z
|
|
144
|
+
.union([
|
|
145
|
+
z.array(CreateSubForCustomerQuoteQuoteEventBasedAddonsItemSchema.optional()),
|
|
146
|
+
CreateSubForCustomerQuoteQuoteEventBasedAddonsSchema,
|
|
147
|
+
])
|
|
148
|
+
.optional(),
|
|
111
149
|
});
|
|
112
150
|
export { CreateSubForCustomerQuoteQuoteBodySchema };
|
|
113
151
|
//Quote.editCreateSubForCustomerQuote
|
|
@@ -168,6 +206,15 @@ const EditCreateSubForCustomerQuoteQuoteContractTermSchema = z.object({
|
|
|
168
206
|
action_at_term_end: z.enum(['renew', 'evergreen', 'cancel']).optional(),
|
|
169
207
|
cancellation_cutoff_period: z.number().int().optional(),
|
|
170
208
|
});
|
|
209
|
+
const EditCreateSubForCustomerQuoteQuoteAddonsItemSchema = z.object({
|
|
210
|
+
id: z.string().max(100).optional(),
|
|
211
|
+
quantity: z.number().int().min(1).optional(),
|
|
212
|
+
quantity_in_decimal: z.string().max(33).optional(),
|
|
213
|
+
unit_price: z.number().int().min(0).optional(),
|
|
214
|
+
unit_price_in_decimal: z.string().max(39).optional(),
|
|
215
|
+
billing_cycles: z.number().int().min(0).optional(),
|
|
216
|
+
trial_end: z.number().int().optional(),
|
|
217
|
+
});
|
|
171
218
|
const EditCreateSubForCustomerQuoteQuoteAddonsSchema = z.object({
|
|
172
219
|
id: z.array(z.string().max(100).optional()).optional(),
|
|
173
220
|
quantity: z.array(z.number().int().min(1).optional()).optional(),
|
|
@@ -177,6 +224,25 @@ const EditCreateSubForCustomerQuoteQuoteAddonsSchema = z.object({
|
|
|
177
224
|
billing_cycles: z.array(z.number().int().min(0).optional()).optional(),
|
|
178
225
|
trial_end: z.array(z.number().int().optional()).optional(),
|
|
179
226
|
});
|
|
227
|
+
const EditCreateSubForCustomerQuoteQuoteEventBasedAddonsItemSchema = z.object({
|
|
228
|
+
id: z.string().max(100).optional(),
|
|
229
|
+
quantity: z.number().int().min(1).optional(),
|
|
230
|
+
unit_price: z.number().int().min(0).optional(),
|
|
231
|
+
quantity_in_decimal: z.string().max(33).optional(),
|
|
232
|
+
unit_price_in_decimal: z.string().max(39).optional(),
|
|
233
|
+
service_period_in_days: z.number().int().min(1).max(4000).optional(),
|
|
234
|
+
on_event: z
|
|
235
|
+
.enum([
|
|
236
|
+
'subscription_creation',
|
|
237
|
+
'subscription_trial_start',
|
|
238
|
+
'plan_activation',
|
|
239
|
+
'subscription_activation',
|
|
240
|
+
'contract_termination',
|
|
241
|
+
])
|
|
242
|
+
.optional(),
|
|
243
|
+
charge_once: z.boolean().default(true).optional(),
|
|
244
|
+
charge_on: z.enum(['immediately', 'on_event']).optional(),
|
|
245
|
+
});
|
|
180
246
|
const EditCreateSubForCustomerQuoteQuoteEventBasedAddonsSchema = z.object({
|
|
181
247
|
id: z.array(z.string().max(100).optional()).optional(),
|
|
182
248
|
quantity: z.array(z.number().int().min(1).optional()).optional(),
|
|
@@ -213,8 +279,18 @@ const EditCreateSubForCustomerQuoteQuoteBodySchema = z.looseObject({
|
|
|
213
279
|
subscription: EditCreateSubForCustomerQuoteQuoteSubscriptionSchema.optional(),
|
|
214
280
|
shipping_address: EditCreateSubForCustomerQuoteQuoteShippingAddressSchema.optional(),
|
|
215
281
|
contract_term: EditCreateSubForCustomerQuoteQuoteContractTermSchema.optional(),
|
|
216
|
-
addons:
|
|
217
|
-
|
|
282
|
+
addons: z
|
|
283
|
+
.union([
|
|
284
|
+
z.array(EditCreateSubForCustomerQuoteQuoteAddonsItemSchema.optional()),
|
|
285
|
+
EditCreateSubForCustomerQuoteQuoteAddonsSchema,
|
|
286
|
+
])
|
|
287
|
+
.optional(),
|
|
288
|
+
event_based_addons: z
|
|
289
|
+
.union([
|
|
290
|
+
z.array(EditCreateSubForCustomerQuoteQuoteEventBasedAddonsItemSchema.optional()),
|
|
291
|
+
EditCreateSubForCustomerQuoteQuoteEventBasedAddonsSchema,
|
|
292
|
+
])
|
|
293
|
+
.optional(),
|
|
218
294
|
});
|
|
219
295
|
export { EditCreateSubForCustomerQuoteQuoteBodySchema };
|
|
220
296
|
//Quote.updateSubscriptionQuote
|
|
@@ -301,6 +377,15 @@ const UpdateSubscriptionQuoteQuoteContractTermSchema = z.object({
|
|
|
301
377
|
.optional(),
|
|
302
378
|
cancellation_cutoff_period: z.number().int().optional(),
|
|
303
379
|
});
|
|
380
|
+
const UpdateSubscriptionQuoteQuoteAddonsItemSchema = z.object({
|
|
381
|
+
id: z.string().max(100).optional(),
|
|
382
|
+
quantity: z.number().int().min(1).optional(),
|
|
383
|
+
unit_price: z.number().int().min(0).optional(),
|
|
384
|
+
billing_cycles: z.number().int().min(0).optional(),
|
|
385
|
+
quantity_in_decimal: z.string().max(33).optional(),
|
|
386
|
+
unit_price_in_decimal: z.string().max(39).optional(),
|
|
387
|
+
trial_end: z.number().int().optional(),
|
|
388
|
+
});
|
|
304
389
|
const UpdateSubscriptionQuoteQuoteAddonsSchema = z.object({
|
|
305
390
|
id: z.array(z.string().max(100).optional()).optional(),
|
|
306
391
|
quantity: z.array(z.number().int().min(1).optional()).optional(),
|
|
@@ -310,6 +395,25 @@ const UpdateSubscriptionQuoteQuoteAddonsSchema = z.object({
|
|
|
310
395
|
unit_price_in_decimal: z.array(z.string().max(39).optional()).optional(),
|
|
311
396
|
trial_end: z.array(z.number().int().optional()).optional(),
|
|
312
397
|
});
|
|
398
|
+
const UpdateSubscriptionQuoteQuoteEventBasedAddonsItemSchema = z.object({
|
|
399
|
+
id: z.string().max(100).optional(),
|
|
400
|
+
quantity: z.number().int().min(1).optional(),
|
|
401
|
+
unit_price: z.number().int().min(0).optional(),
|
|
402
|
+
service_period_in_days: z.number().int().min(1).max(4000).optional(),
|
|
403
|
+
charge_on: z.enum(['immediately', 'on_event']).optional(),
|
|
404
|
+
on_event: z
|
|
405
|
+
.enum([
|
|
406
|
+
'subscription_creation',
|
|
407
|
+
'subscription_trial_start',
|
|
408
|
+
'plan_activation',
|
|
409
|
+
'subscription_activation',
|
|
410
|
+
'contract_termination',
|
|
411
|
+
])
|
|
412
|
+
.optional(),
|
|
413
|
+
charge_once: z.boolean().default(true).optional(),
|
|
414
|
+
quantity_in_decimal: z.string().max(33).optional(),
|
|
415
|
+
unit_price_in_decimal: z.string().max(39).optional(),
|
|
416
|
+
});
|
|
313
417
|
const UpdateSubscriptionQuoteQuoteEventBasedAddonsSchema = z.object({
|
|
314
418
|
id: z.array(z.string().max(100).optional()).optional(),
|
|
315
419
|
quantity: z.array(z.number().int().min(1).optional()).optional(),
|
|
@@ -356,8 +460,18 @@ const UpdateSubscriptionQuoteQuoteBodySchema = z.looseObject({
|
|
|
356
460
|
shipping_address: UpdateSubscriptionQuoteQuoteShippingAddressSchema.optional(),
|
|
357
461
|
customer: UpdateSubscriptionQuoteQuoteCustomerSchema.optional(),
|
|
358
462
|
contract_term: UpdateSubscriptionQuoteQuoteContractTermSchema.optional(),
|
|
359
|
-
addons:
|
|
360
|
-
|
|
463
|
+
addons: z
|
|
464
|
+
.union([
|
|
465
|
+
z.array(UpdateSubscriptionQuoteQuoteAddonsItemSchema.optional()),
|
|
466
|
+
UpdateSubscriptionQuoteQuoteAddonsSchema,
|
|
467
|
+
])
|
|
468
|
+
.optional(),
|
|
469
|
+
event_based_addons: z
|
|
470
|
+
.union([
|
|
471
|
+
z.array(UpdateSubscriptionQuoteQuoteEventBasedAddonsItemSchema.optional()),
|
|
472
|
+
UpdateSubscriptionQuoteQuoteEventBasedAddonsSchema,
|
|
473
|
+
])
|
|
474
|
+
.optional(),
|
|
361
475
|
});
|
|
362
476
|
export { UpdateSubscriptionQuoteQuoteBodySchema };
|
|
363
477
|
//Quote.editUpdateSubscriptionQuote
|
|
@@ -443,6 +557,15 @@ const EditUpdateSubscriptionQuoteQuoteContractTermSchema = z.object({
|
|
|
443
557
|
.optional(),
|
|
444
558
|
cancellation_cutoff_period: z.number().int().optional(),
|
|
445
559
|
});
|
|
560
|
+
const EditUpdateSubscriptionQuoteQuoteAddonsItemSchema = z.object({
|
|
561
|
+
id: z.string().max(100).optional(),
|
|
562
|
+
quantity: z.number().int().min(1).optional(),
|
|
563
|
+
unit_price: z.number().int().min(0).optional(),
|
|
564
|
+
billing_cycles: z.number().int().min(0).optional(),
|
|
565
|
+
quantity_in_decimal: z.string().max(33).optional(),
|
|
566
|
+
unit_price_in_decimal: z.string().max(39).optional(),
|
|
567
|
+
trial_end: z.number().int().optional(),
|
|
568
|
+
});
|
|
446
569
|
const EditUpdateSubscriptionQuoteQuoteAddonsSchema = z.object({
|
|
447
570
|
id: z.array(z.string().max(100).optional()).optional(),
|
|
448
571
|
quantity: z.array(z.number().int().min(1).optional()).optional(),
|
|
@@ -452,6 +575,25 @@ const EditUpdateSubscriptionQuoteQuoteAddonsSchema = z.object({
|
|
|
452
575
|
unit_price_in_decimal: z.array(z.string().max(39).optional()).optional(),
|
|
453
576
|
trial_end: z.array(z.number().int().optional()).optional(),
|
|
454
577
|
});
|
|
578
|
+
const EditUpdateSubscriptionQuoteQuoteEventBasedAddonsItemSchema = z.object({
|
|
579
|
+
id: z.string().max(100).optional(),
|
|
580
|
+
quantity: z.number().int().min(1).optional(),
|
|
581
|
+
unit_price: z.number().int().min(0).optional(),
|
|
582
|
+
service_period_in_days: z.number().int().min(1).max(4000).optional(),
|
|
583
|
+
charge_on: z.enum(['immediately', 'on_event']).optional(),
|
|
584
|
+
on_event: z
|
|
585
|
+
.enum([
|
|
586
|
+
'subscription_creation',
|
|
587
|
+
'subscription_trial_start',
|
|
588
|
+
'plan_activation',
|
|
589
|
+
'subscription_activation',
|
|
590
|
+
'contract_termination',
|
|
591
|
+
])
|
|
592
|
+
.optional(),
|
|
593
|
+
charge_once: z.boolean().default(true).optional(),
|
|
594
|
+
quantity_in_decimal: z.string().max(33).optional(),
|
|
595
|
+
unit_price_in_decimal: z.string().max(39).optional(),
|
|
596
|
+
});
|
|
455
597
|
const EditUpdateSubscriptionQuoteQuoteEventBasedAddonsSchema = z.object({
|
|
456
598
|
id: z.array(z.string().max(100).optional()).optional(),
|
|
457
599
|
quantity: z.array(z.number().int().min(1).optional()).optional(),
|
|
@@ -497,8 +639,18 @@ const EditUpdateSubscriptionQuoteQuoteBodySchema = z.looseObject({
|
|
|
497
639
|
shipping_address: EditUpdateSubscriptionQuoteQuoteShippingAddressSchema.optional(),
|
|
498
640
|
customer: EditUpdateSubscriptionQuoteQuoteCustomerSchema.optional(),
|
|
499
641
|
contract_term: EditUpdateSubscriptionQuoteQuoteContractTermSchema.optional(),
|
|
500
|
-
addons:
|
|
501
|
-
|
|
642
|
+
addons: z
|
|
643
|
+
.union([
|
|
644
|
+
z.array(EditUpdateSubscriptionQuoteQuoteAddonsItemSchema.optional()),
|
|
645
|
+
EditUpdateSubscriptionQuoteQuoteAddonsSchema,
|
|
646
|
+
])
|
|
647
|
+
.optional(),
|
|
648
|
+
event_based_addons: z
|
|
649
|
+
.union([
|
|
650
|
+
z.array(EditUpdateSubscriptionQuoteQuoteEventBasedAddonsItemSchema.optional()),
|
|
651
|
+
EditUpdateSubscriptionQuoteQuoteEventBasedAddonsSchema,
|
|
652
|
+
])
|
|
653
|
+
.optional(),
|
|
502
654
|
});
|
|
503
655
|
export { EditUpdateSubscriptionQuoteQuoteBodySchema };
|
|
504
656
|
//Quote.createForOnetimeCharges
|
|
@@ -520,6 +672,14 @@ const CreateForOnetimeChargesQuoteShippingAddressSchema = z.object({
|
|
|
520
672
|
.enum(['not_validated', 'valid', 'partially_valid', 'invalid'])
|
|
521
673
|
.optional(),
|
|
522
674
|
});
|
|
675
|
+
const CreateForOnetimeChargesQuoteAddonsItemSchema = z.object({
|
|
676
|
+
id: z.string().max(100).optional(),
|
|
677
|
+
quantity: z.number().int().min(1).optional(),
|
|
678
|
+
quantity_in_decimal: z.string().max(33).optional(),
|
|
679
|
+
unit_price: z.number().int().min(0).optional(),
|
|
680
|
+
unit_price_in_decimal: z.string().max(39).optional(),
|
|
681
|
+
service_period: z.number().int().optional(),
|
|
682
|
+
});
|
|
523
683
|
const CreateForOnetimeChargesQuoteAddonsSchema = z.object({
|
|
524
684
|
id: z.array(z.string().max(100).optional()).optional(),
|
|
525
685
|
quantity: z.array(z.number().int().min(1).optional()).optional(),
|
|
@@ -528,6 +688,17 @@ const CreateForOnetimeChargesQuoteAddonsSchema = z.object({
|
|
|
528
688
|
unit_price_in_decimal: z.array(z.string().max(39).optional()).optional(),
|
|
529
689
|
service_period: z.array(z.number().int().optional()).optional(),
|
|
530
690
|
});
|
|
691
|
+
const CreateForOnetimeChargesQuoteChargesItemSchema = z.object({
|
|
692
|
+
amount: z.number().int().min(1).optional(),
|
|
693
|
+
amount_in_decimal: z.string().max(39).optional(),
|
|
694
|
+
description: z.string().max(250).optional(),
|
|
695
|
+
avalara_sale_type: z
|
|
696
|
+
.enum(['wholesale', 'retail', 'consumed', 'vendor_use'])
|
|
697
|
+
.optional(),
|
|
698
|
+
avalara_transaction_type: z.number().int().optional(),
|
|
699
|
+
avalara_service_type: z.number().int().optional(),
|
|
700
|
+
service_period: z.number().int().optional(),
|
|
701
|
+
});
|
|
531
702
|
const CreateForOnetimeChargesQuoteChargesSchema = z.object({
|
|
532
703
|
amount: z.array(z.number().int().min(1).optional()).optional(),
|
|
533
704
|
amount_in_decimal: z.array(z.string().max(39).optional()).optional(),
|
|
@@ -539,6 +710,11 @@ const CreateForOnetimeChargesQuoteChargesSchema = z.object({
|
|
|
539
710
|
avalara_service_type: z.array(z.number().int().optional()).optional(),
|
|
540
711
|
service_period: z.array(z.number().int().optional()).optional(),
|
|
541
712
|
});
|
|
713
|
+
const CreateForOnetimeChargesQuoteTaxProvidersFieldsItemSchema = z.object({
|
|
714
|
+
provider_name: z.string().max(50).optional(),
|
|
715
|
+
field_id: z.string().max(50).optional(),
|
|
716
|
+
field_value: z.string().max(50).optional(),
|
|
717
|
+
});
|
|
542
718
|
const CreateForOnetimeChargesQuoteTaxProvidersFieldsSchema = z.object({
|
|
543
719
|
provider_name: z.array(z.string().max(50).optional()).optional(),
|
|
544
720
|
field_id: z.array(z.string().max(50).optional()).optional(),
|
|
@@ -554,9 +730,24 @@ const CreateForOnetimeChargesQuoteBodySchema = z.looseObject({
|
|
|
554
730
|
coupon: z.string().max(100).optional(),
|
|
555
731
|
coupon_ids: z.array(z.string().max(100).optional()).optional(),
|
|
556
732
|
shipping_address: CreateForOnetimeChargesQuoteShippingAddressSchema.optional(),
|
|
557
|
-
addons:
|
|
558
|
-
|
|
559
|
-
|
|
733
|
+
addons: z
|
|
734
|
+
.union([
|
|
735
|
+
z.array(CreateForOnetimeChargesQuoteAddonsItemSchema.optional()),
|
|
736
|
+
CreateForOnetimeChargesQuoteAddonsSchema,
|
|
737
|
+
])
|
|
738
|
+
.optional(),
|
|
739
|
+
charges: z
|
|
740
|
+
.union([
|
|
741
|
+
z.array(CreateForOnetimeChargesQuoteChargesItemSchema.optional()),
|
|
742
|
+
CreateForOnetimeChargesQuoteChargesSchema,
|
|
743
|
+
])
|
|
744
|
+
.optional(),
|
|
745
|
+
tax_providers_fields: z
|
|
746
|
+
.union([
|
|
747
|
+
z.array(CreateForOnetimeChargesQuoteTaxProvidersFieldsItemSchema.optional()),
|
|
748
|
+
CreateForOnetimeChargesQuoteTaxProvidersFieldsSchema,
|
|
749
|
+
])
|
|
750
|
+
.optional(),
|
|
560
751
|
});
|
|
561
752
|
export { CreateForOnetimeChargesQuoteBodySchema };
|
|
562
753
|
//Quote.editOneTimeQuote
|
|
@@ -578,6 +769,14 @@ const EditOneTimeQuoteQuoteShippingAddressSchema = z.object({
|
|
|
578
769
|
.enum(['not_validated', 'valid', 'partially_valid', 'invalid'])
|
|
579
770
|
.optional(),
|
|
580
771
|
});
|
|
772
|
+
const EditOneTimeQuoteQuoteAddonsItemSchema = z.object({
|
|
773
|
+
id: z.string().max(100).optional(),
|
|
774
|
+
quantity: z.number().int().min(1).optional(),
|
|
775
|
+
quantity_in_decimal: z.string().max(33).optional(),
|
|
776
|
+
unit_price: z.number().int().min(0).optional(),
|
|
777
|
+
unit_price_in_decimal: z.string().max(39).optional(),
|
|
778
|
+
service_period: z.number().int().optional(),
|
|
779
|
+
});
|
|
581
780
|
const EditOneTimeQuoteQuoteAddonsSchema = z.object({
|
|
582
781
|
id: z.array(z.string().max(100).optional()).optional(),
|
|
583
782
|
quantity: z.array(z.number().int().min(1).optional()).optional(),
|
|
@@ -586,6 +785,17 @@ const EditOneTimeQuoteQuoteAddonsSchema = z.object({
|
|
|
586
785
|
unit_price_in_decimal: z.array(z.string().max(39).optional()).optional(),
|
|
587
786
|
service_period: z.array(z.number().int().optional()).optional(),
|
|
588
787
|
});
|
|
788
|
+
const EditOneTimeQuoteQuoteChargesItemSchema = z.object({
|
|
789
|
+
amount: z.number().int().min(1).optional(),
|
|
790
|
+
amount_in_decimal: z.string().max(39).optional(),
|
|
791
|
+
description: z.string().max(250).optional(),
|
|
792
|
+
avalara_sale_type: z
|
|
793
|
+
.enum(['wholesale', 'retail', 'consumed', 'vendor_use'])
|
|
794
|
+
.optional(),
|
|
795
|
+
avalara_transaction_type: z.number().int().optional(),
|
|
796
|
+
avalara_service_type: z.number().int().optional(),
|
|
797
|
+
service_period: z.number().int().optional(),
|
|
798
|
+
});
|
|
589
799
|
const EditOneTimeQuoteQuoteChargesSchema = z.object({
|
|
590
800
|
amount: z.array(z.number().int().min(1).optional()).optional(),
|
|
591
801
|
amount_in_decimal: z.array(z.string().max(39).optional()).optional(),
|
|
@@ -597,6 +807,11 @@ const EditOneTimeQuoteQuoteChargesSchema = z.object({
|
|
|
597
807
|
avalara_service_type: z.array(z.number().int().optional()).optional(),
|
|
598
808
|
service_period: z.array(z.number().int().optional()).optional(),
|
|
599
809
|
});
|
|
810
|
+
const EditOneTimeQuoteQuoteTaxProvidersFieldsItemSchema = z.object({
|
|
811
|
+
provider_name: z.string().max(50).optional(),
|
|
812
|
+
field_id: z.string().max(50).optional(),
|
|
813
|
+
field_value: z.string().max(50).optional(),
|
|
814
|
+
});
|
|
600
815
|
const EditOneTimeQuoteQuoteTaxProvidersFieldsSchema = z.object({
|
|
601
816
|
provider_name: z.array(z.string().max(50).optional()).optional(),
|
|
602
817
|
field_id: z.array(z.string().max(50).optional()).optional(),
|
|
@@ -610,9 +825,24 @@ const EditOneTimeQuoteQuoteBodySchema = z.looseObject({
|
|
|
610
825
|
coupon: z.string().max(100).optional(),
|
|
611
826
|
coupon_ids: z.array(z.string().max(100).optional()).optional(),
|
|
612
827
|
shipping_address: EditOneTimeQuoteQuoteShippingAddressSchema.optional(),
|
|
613
|
-
addons:
|
|
614
|
-
|
|
615
|
-
|
|
828
|
+
addons: z
|
|
829
|
+
.union([
|
|
830
|
+
z.array(EditOneTimeQuoteQuoteAddonsItemSchema.optional()),
|
|
831
|
+
EditOneTimeQuoteQuoteAddonsSchema,
|
|
832
|
+
])
|
|
833
|
+
.optional(),
|
|
834
|
+
charges: z
|
|
835
|
+
.union([
|
|
836
|
+
z.array(EditOneTimeQuoteQuoteChargesItemSchema.optional()),
|
|
837
|
+
EditOneTimeQuoteQuoteChargesSchema,
|
|
838
|
+
])
|
|
839
|
+
.optional(),
|
|
840
|
+
tax_providers_fields: z
|
|
841
|
+
.union([
|
|
842
|
+
z.array(EditOneTimeQuoteQuoteTaxProvidersFieldsItemSchema.optional()),
|
|
843
|
+
EditOneTimeQuoteQuoteTaxProvidersFieldsSchema,
|
|
844
|
+
])
|
|
845
|
+
.optional(),
|
|
616
846
|
});
|
|
617
847
|
export { EditOneTimeQuoteQuoteBodySchema };
|
|
618
848
|
//Quote.createSubItemsForCustomerQuote
|
|
@@ -688,6 +918,32 @@ const CreateSubItemsForCustomerQuoteQuoteBillingAddressSchema = z.object({
|
|
|
688
918
|
.enum(['not_validated', 'valid', 'partially_valid', 'invalid'])
|
|
689
919
|
.optional(),
|
|
690
920
|
});
|
|
921
|
+
const CreateSubItemsForCustomerQuoteQuoteSubscriptionItemsItemSchema = z.object({
|
|
922
|
+
item_price_id: z.string().max(100),
|
|
923
|
+
quantity: z.number().int().min(1).optional(),
|
|
924
|
+
quantity_in_decimal: z.string().max(33).optional(),
|
|
925
|
+
unit_price: z.number().int().min(0).optional(),
|
|
926
|
+
unit_price_in_decimal: z.string().max(39).optional(),
|
|
927
|
+
billing_cycles: z.number().int().min(0).optional(),
|
|
928
|
+
trial_end: z.number().int().optional(),
|
|
929
|
+
service_period_days: z.number().int().min(1).max(4000).optional(),
|
|
930
|
+
charge_on_event: z
|
|
931
|
+
.enum([
|
|
932
|
+
'subscription_creation',
|
|
933
|
+
'subscription_trial_start',
|
|
934
|
+
'plan_activation',
|
|
935
|
+
'subscription_activation',
|
|
936
|
+
'contract_termination',
|
|
937
|
+
])
|
|
938
|
+
.optional(),
|
|
939
|
+
charge_once: z.boolean().optional(),
|
|
940
|
+
item_type: z.enum(['plan', 'addon', 'charge']).optional(),
|
|
941
|
+
charge_on_option: z.enum(['immediately', 'on_event']).optional(),
|
|
942
|
+
start_date: z.number().int().optional(),
|
|
943
|
+
end_date: z.number().int().optional(),
|
|
944
|
+
description: z.string().max(2000).optional(),
|
|
945
|
+
ramp_tier_id: z.string().max(105).optional(),
|
|
946
|
+
});
|
|
691
947
|
const CreateSubItemsForCustomerQuoteQuoteSubscriptionItemsSchema = z.object({
|
|
692
948
|
item_price_id: z.array(z.string().max(100).optional()),
|
|
693
949
|
quantity: z.array(z.number().int().min(1).optional()).optional(),
|
|
@@ -720,6 +976,19 @@ const CreateSubItemsForCustomerQuoteQuoteSubscriptionItemsSchema = z.object({
|
|
|
720
976
|
description: z.array(z.string().max(2000).optional()).optional(),
|
|
721
977
|
ramp_tier_id: z.array(z.string().max(105).optional()).optional(),
|
|
722
978
|
});
|
|
979
|
+
const CreateSubItemsForCustomerQuoteQuoteDiscountsItemSchema = z.object({
|
|
980
|
+
apply_on: z.enum(['invoice_amount', 'specific_item_price']).optional(),
|
|
981
|
+
duration_type: z.enum(['one_time', 'forever', 'limited_period']),
|
|
982
|
+
percentage: z.number().min(0.01).max(100).optional(),
|
|
983
|
+
amount: z.number().int().min(0).optional(),
|
|
984
|
+
period: z.number().int().min(1).optional(),
|
|
985
|
+
period_unit: z.enum(['day', 'week', 'month', 'year']).optional(),
|
|
986
|
+
included_in_mrr: z.boolean().optional(),
|
|
987
|
+
item_price_id: z.string().max(100).optional(),
|
|
988
|
+
quantity: z.number().int().min(1).optional(),
|
|
989
|
+
start_date: z.number().int().optional(),
|
|
990
|
+
end_date: z.number().int().optional(),
|
|
991
|
+
});
|
|
723
992
|
const CreateSubItemsForCustomerQuoteQuoteDiscountsSchema = z.object({
|
|
724
993
|
apply_on: z
|
|
725
994
|
.array(z.enum(['invoice_amount', 'specific_item_price']).optional())
|
|
@@ -737,6 +1006,18 @@ const CreateSubItemsForCustomerQuoteQuoteDiscountsSchema = z.object({
|
|
|
737
1006
|
start_date: z.array(z.number().int().optional()).optional(),
|
|
738
1007
|
end_date: z.array(z.number().int().optional()).optional(),
|
|
739
1008
|
});
|
|
1009
|
+
const CreateSubItemsForCustomerQuoteQuoteItemTiersItemSchema = z.object({
|
|
1010
|
+
item_price_id: z.string().max(100).optional(),
|
|
1011
|
+
starting_unit: z.number().int().min(1).optional(),
|
|
1012
|
+
ending_unit: z.number().int().optional(),
|
|
1013
|
+
price: z.number().int().min(0).optional(),
|
|
1014
|
+
starting_unit_in_decimal: z.string().max(33).optional(),
|
|
1015
|
+
ending_unit_in_decimal: z.string().max(33).optional(),
|
|
1016
|
+
price_in_decimal: z.string().max(39).optional(),
|
|
1017
|
+
pricing_type: z.enum(['per_unit', 'flat_fee', 'package']).optional(),
|
|
1018
|
+
package_size: z.number().int().min(1).optional(),
|
|
1019
|
+
ramp_tier_id: z.string().max(105).optional(),
|
|
1020
|
+
});
|
|
740
1021
|
const CreateSubItemsForCustomerQuoteQuoteItemTiersSchema = z.object({
|
|
741
1022
|
item_price_id: z.array(z.string().max(100).optional()).optional(),
|
|
742
1023
|
starting_unit: z.array(z.number().int().min(1).optional()).optional(),
|
|
@@ -751,11 +1032,27 @@ const CreateSubItemsForCustomerQuoteQuoteItemTiersSchema = z.object({
|
|
|
751
1032
|
package_size: z.array(z.number().int().min(1).optional()).optional(),
|
|
752
1033
|
ramp_tier_id: z.array(z.string().max(105).optional()).optional(),
|
|
753
1034
|
});
|
|
1035
|
+
const CreateSubItemsForCustomerQuoteQuoteCouponsItemSchema = z.object({
|
|
1036
|
+
id: z.string().max(100).optional(),
|
|
1037
|
+
start_date: z.number().int().optional(),
|
|
1038
|
+
end_date: z.number().int().optional(),
|
|
1039
|
+
});
|
|
754
1040
|
const CreateSubItemsForCustomerQuoteQuoteCouponsSchema = z.object({
|
|
755
1041
|
id: z.array(z.string().max(100).optional()).optional(),
|
|
756
1042
|
start_date: z.array(z.number().int().optional()).optional(),
|
|
757
1043
|
end_date: z.array(z.number().int().optional()).optional(),
|
|
758
1044
|
});
|
|
1045
|
+
const CreateSubItemsForCustomerQuoteQuoteEntitlementOverridesItemSchema = z.object({
|
|
1046
|
+
feature_id: z.string().max(50).optional(),
|
|
1047
|
+
entity_id: z.string().max(100).optional(),
|
|
1048
|
+
entity_type: z
|
|
1049
|
+
.enum(['plan_price', 'addon_price', 'charge_price', 'charge'])
|
|
1050
|
+
.optional(),
|
|
1051
|
+
value: z.string().max(50).optional(),
|
|
1052
|
+
is_enabled: z.boolean().optional(),
|
|
1053
|
+
start_date: z.number().int().optional(),
|
|
1054
|
+
end_date: z.number().int().optional(),
|
|
1055
|
+
});
|
|
759
1056
|
const CreateSubItemsForCustomerQuoteQuoteEntitlementOverridesSchema = z.object({
|
|
760
1057
|
feature_id: z.array(z.string().max(50).optional()).optional(),
|
|
761
1058
|
entity_id: z.array(z.string().max(100).optional()).optional(),
|
|
@@ -784,11 +1081,36 @@ const CreateSubItemsForCustomerQuoteQuoteBodySchema = z.looseObject({
|
|
|
784
1081
|
shipping_address: CreateSubItemsForCustomerQuoteQuoteShippingAddressSchema.optional(),
|
|
785
1082
|
contract_term: CreateSubItemsForCustomerQuoteQuoteContractTermSchema.optional(),
|
|
786
1083
|
billing_address: CreateSubItemsForCustomerQuoteQuoteBillingAddressSchema.optional(),
|
|
787
|
-
subscription_items:
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
1084
|
+
subscription_items: z
|
|
1085
|
+
.union([
|
|
1086
|
+
z.array(CreateSubItemsForCustomerQuoteQuoteSubscriptionItemsItemSchema.optional()),
|
|
1087
|
+
CreateSubItemsForCustomerQuoteQuoteSubscriptionItemsSchema,
|
|
1088
|
+
])
|
|
1089
|
+
.optional(),
|
|
1090
|
+
discounts: z
|
|
1091
|
+
.union([
|
|
1092
|
+
z.array(CreateSubItemsForCustomerQuoteQuoteDiscountsItemSchema.optional()),
|
|
1093
|
+
CreateSubItemsForCustomerQuoteQuoteDiscountsSchema,
|
|
1094
|
+
])
|
|
1095
|
+
.optional(),
|
|
1096
|
+
item_tiers: z
|
|
1097
|
+
.union([
|
|
1098
|
+
z.array(CreateSubItemsForCustomerQuoteQuoteItemTiersItemSchema.optional()),
|
|
1099
|
+
CreateSubItemsForCustomerQuoteQuoteItemTiersSchema,
|
|
1100
|
+
])
|
|
1101
|
+
.optional(),
|
|
1102
|
+
coupons: z
|
|
1103
|
+
.union([
|
|
1104
|
+
z.array(CreateSubItemsForCustomerQuoteQuoteCouponsItemSchema.optional()),
|
|
1105
|
+
CreateSubItemsForCustomerQuoteQuoteCouponsSchema,
|
|
1106
|
+
])
|
|
1107
|
+
.optional(),
|
|
1108
|
+
entitlement_overrides: z
|
|
1109
|
+
.union([
|
|
1110
|
+
z.array(CreateSubItemsForCustomerQuoteQuoteEntitlementOverridesItemSchema.optional()),
|
|
1111
|
+
CreateSubItemsForCustomerQuoteQuoteEntitlementOverridesSchema,
|
|
1112
|
+
])
|
|
1113
|
+
.optional(),
|
|
792
1114
|
});
|
|
793
1115
|
export { CreateSubItemsForCustomerQuoteQuoteBodySchema };
|
|
794
1116
|
//Quote.editCreateSubCustomerQuoteForItems
|
|
@@ -864,6 +1186,32 @@ const EditCreateSubCustomerQuoteForItemsQuoteBillingAddressSchema = z.object({
|
|
|
864
1186
|
.enum(['not_validated', 'valid', 'partially_valid', 'invalid'])
|
|
865
1187
|
.optional(),
|
|
866
1188
|
});
|
|
1189
|
+
const EditCreateSubCustomerQuoteForItemsQuoteSubscriptionItemsItemSchema = z.object({
|
|
1190
|
+
item_price_id: z.string().max(100),
|
|
1191
|
+
quantity: z.number().int().min(1).optional(),
|
|
1192
|
+
quantity_in_decimal: z.string().max(33).optional(),
|
|
1193
|
+
unit_price: z.number().int().min(0).optional(),
|
|
1194
|
+
unit_price_in_decimal: z.string().max(39).optional(),
|
|
1195
|
+
billing_cycles: z.number().int().min(0).optional(),
|
|
1196
|
+
trial_end: z.number().int().optional(),
|
|
1197
|
+
service_period_days: z.number().int().min(1).max(4000).optional(),
|
|
1198
|
+
charge_on_event: z
|
|
1199
|
+
.enum([
|
|
1200
|
+
'subscription_creation',
|
|
1201
|
+
'subscription_trial_start',
|
|
1202
|
+
'plan_activation',
|
|
1203
|
+
'subscription_activation',
|
|
1204
|
+
'contract_termination',
|
|
1205
|
+
])
|
|
1206
|
+
.optional(),
|
|
1207
|
+
charge_once: z.boolean().optional(),
|
|
1208
|
+
item_type: z.enum(['plan', 'addon', 'charge']).optional(),
|
|
1209
|
+
charge_on_option: z.enum(['immediately', 'on_event']).optional(),
|
|
1210
|
+
start_date: z.number().int().optional(),
|
|
1211
|
+
end_date: z.number().int().optional(),
|
|
1212
|
+
description: z.string().max(2000).optional(),
|
|
1213
|
+
ramp_tier_id: z.string().max(105).optional(),
|
|
1214
|
+
});
|
|
867
1215
|
const EditCreateSubCustomerQuoteForItemsQuoteSubscriptionItemsSchema = z.object({
|
|
868
1216
|
item_price_id: z.array(z.string().max(100).optional()),
|
|
869
1217
|
quantity: z.array(z.number().int().min(1).optional()).optional(),
|
|
@@ -898,6 +1246,19 @@ const EditCreateSubCustomerQuoteForItemsQuoteSubscriptionItemsSchema = z.object(
|
|
|
898
1246
|
description: z.array(z.string().max(2000).optional()).optional(),
|
|
899
1247
|
ramp_tier_id: z.array(z.string().max(105).optional()).optional(),
|
|
900
1248
|
});
|
|
1249
|
+
const EditCreateSubCustomerQuoteForItemsQuoteDiscountsItemSchema = z.object({
|
|
1250
|
+
apply_on: z.enum(['invoice_amount', 'specific_item_price']).optional(),
|
|
1251
|
+
duration_type: z.enum(['one_time', 'forever', 'limited_period']),
|
|
1252
|
+
percentage: z.number().min(0.01).max(100).optional(),
|
|
1253
|
+
amount: z.number().int().min(0).optional(),
|
|
1254
|
+
period: z.number().int().min(1).optional(),
|
|
1255
|
+
period_unit: z.enum(['day', 'week', 'month', 'year']).optional(),
|
|
1256
|
+
included_in_mrr: z.boolean().optional(),
|
|
1257
|
+
item_price_id: z.string().max(100).optional(),
|
|
1258
|
+
quantity: z.number().int().min(1).optional(),
|
|
1259
|
+
start_date: z.number().int().optional(),
|
|
1260
|
+
end_date: z.number().int().optional(),
|
|
1261
|
+
});
|
|
901
1262
|
const EditCreateSubCustomerQuoteForItemsQuoteDiscountsSchema = z.object({
|
|
902
1263
|
apply_on: z
|
|
903
1264
|
.array(z.enum(['invoice_amount', 'specific_item_price']).optional())
|
|
@@ -915,6 +1276,18 @@ const EditCreateSubCustomerQuoteForItemsQuoteDiscountsSchema = z.object({
|
|
|
915
1276
|
start_date: z.array(z.number().int().optional()).optional(),
|
|
916
1277
|
end_date: z.array(z.number().int().optional()).optional(),
|
|
917
1278
|
});
|
|
1279
|
+
const EditCreateSubCustomerQuoteForItemsQuoteItemTiersItemSchema = z.object({
|
|
1280
|
+
item_price_id: z.string().max(100).optional(),
|
|
1281
|
+
starting_unit: z.number().int().min(1).optional(),
|
|
1282
|
+
ending_unit: z.number().int().optional(),
|
|
1283
|
+
price: z.number().int().min(0).optional(),
|
|
1284
|
+
starting_unit_in_decimal: z.string().max(33).optional(),
|
|
1285
|
+
ending_unit_in_decimal: z.string().max(33).optional(),
|
|
1286
|
+
price_in_decimal: z.string().max(39).optional(),
|
|
1287
|
+
pricing_type: z.enum(['per_unit', 'flat_fee', 'package']).optional(),
|
|
1288
|
+
package_size: z.number().int().min(1).optional(),
|
|
1289
|
+
ramp_tier_id: z.string().max(105).optional(),
|
|
1290
|
+
});
|
|
918
1291
|
const EditCreateSubCustomerQuoteForItemsQuoteItemTiersSchema = z.object({
|
|
919
1292
|
item_price_id: z.array(z.string().max(100).optional()).optional(),
|
|
920
1293
|
starting_unit: z.array(z.number().int().min(1).optional()).optional(),
|
|
@@ -929,11 +1302,27 @@ const EditCreateSubCustomerQuoteForItemsQuoteItemTiersSchema = z.object({
|
|
|
929
1302
|
package_size: z.array(z.number().int().min(1).optional()).optional(),
|
|
930
1303
|
ramp_tier_id: z.array(z.string().max(105).optional()).optional(),
|
|
931
1304
|
});
|
|
1305
|
+
const EditCreateSubCustomerQuoteForItemsQuoteCouponsItemSchema = z.object({
|
|
1306
|
+
id: z.string().max(100).optional(),
|
|
1307
|
+
start_date: z.number().int().optional(),
|
|
1308
|
+
end_date: z.number().int().optional(),
|
|
1309
|
+
});
|
|
932
1310
|
const EditCreateSubCustomerQuoteForItemsQuoteCouponsSchema = z.object({
|
|
933
1311
|
id: z.array(z.string().max(100).optional()).optional(),
|
|
934
1312
|
start_date: z.array(z.number().int().optional()).optional(),
|
|
935
1313
|
end_date: z.array(z.number().int().optional()).optional(),
|
|
936
1314
|
});
|
|
1315
|
+
const EditCreateSubCustomerQuoteForItemsQuoteEntitlementOverridesItemSchema = z.object({
|
|
1316
|
+
feature_id: z.string().max(50).optional(),
|
|
1317
|
+
entity_id: z.string().max(100).optional(),
|
|
1318
|
+
entity_type: z
|
|
1319
|
+
.enum(['plan_price', 'addon_price', 'charge_price', 'charge'])
|
|
1320
|
+
.optional(),
|
|
1321
|
+
value: z.string().max(50).optional(),
|
|
1322
|
+
is_enabled: z.boolean().optional(),
|
|
1323
|
+
start_date: z.number().int().optional(),
|
|
1324
|
+
end_date: z.number().int().optional(),
|
|
1325
|
+
});
|
|
937
1326
|
const EditCreateSubCustomerQuoteForItemsQuoteEntitlementOverridesSchema = z.object({
|
|
938
1327
|
feature_id: z.array(z.string().max(50).optional()).optional(),
|
|
939
1328
|
entity_id: z.array(z.string().max(100).optional()).optional(),
|
|
@@ -961,11 +1350,36 @@ const EditCreateSubCustomerQuoteForItemsQuoteBodySchema = z.looseObject({
|
|
|
961
1350
|
shipping_address: EditCreateSubCustomerQuoteForItemsQuoteShippingAddressSchema.optional(),
|
|
962
1351
|
contract_term: EditCreateSubCustomerQuoteForItemsQuoteContractTermSchema.optional(),
|
|
963
1352
|
billing_address: EditCreateSubCustomerQuoteForItemsQuoteBillingAddressSchema.optional(),
|
|
964
|
-
subscription_items:
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
1353
|
+
subscription_items: z
|
|
1354
|
+
.union([
|
|
1355
|
+
z.array(EditCreateSubCustomerQuoteForItemsQuoteSubscriptionItemsItemSchema.optional()),
|
|
1356
|
+
EditCreateSubCustomerQuoteForItemsQuoteSubscriptionItemsSchema,
|
|
1357
|
+
])
|
|
1358
|
+
.optional(),
|
|
1359
|
+
discounts: z
|
|
1360
|
+
.union([
|
|
1361
|
+
z.array(EditCreateSubCustomerQuoteForItemsQuoteDiscountsItemSchema.optional()),
|
|
1362
|
+
EditCreateSubCustomerQuoteForItemsQuoteDiscountsSchema,
|
|
1363
|
+
])
|
|
1364
|
+
.optional(),
|
|
1365
|
+
item_tiers: z
|
|
1366
|
+
.union([
|
|
1367
|
+
z.array(EditCreateSubCustomerQuoteForItemsQuoteItemTiersItemSchema.optional()),
|
|
1368
|
+
EditCreateSubCustomerQuoteForItemsQuoteItemTiersSchema,
|
|
1369
|
+
])
|
|
1370
|
+
.optional(),
|
|
1371
|
+
coupons: z
|
|
1372
|
+
.union([
|
|
1373
|
+
z.array(EditCreateSubCustomerQuoteForItemsQuoteCouponsItemSchema.optional()),
|
|
1374
|
+
EditCreateSubCustomerQuoteForItemsQuoteCouponsSchema,
|
|
1375
|
+
])
|
|
1376
|
+
.optional(),
|
|
1377
|
+
entitlement_overrides: z
|
|
1378
|
+
.union([
|
|
1379
|
+
z.array(EditCreateSubCustomerQuoteForItemsQuoteEntitlementOverridesItemSchema.optional()),
|
|
1380
|
+
EditCreateSubCustomerQuoteForItemsQuoteEntitlementOverridesSchema,
|
|
1381
|
+
])
|
|
1382
|
+
.optional(),
|
|
969
1383
|
});
|
|
970
1384
|
export { EditCreateSubCustomerQuoteForItemsQuoteBodySchema };
|
|
971
1385
|
//Quote.updateSubscriptionQuoteForItems
|
|
@@ -1047,6 +1461,32 @@ const UpdateSubscriptionQuoteForItemsQuoteContractTermSchema = z.object({
|
|
|
1047
1461
|
.optional(),
|
|
1048
1462
|
cancellation_cutoff_period: z.number().int().optional(),
|
|
1049
1463
|
});
|
|
1464
|
+
const UpdateSubscriptionQuoteForItemsQuoteSubscriptionItemsItemSchema = z.object({
|
|
1465
|
+
item_price_id: z.string().max(100),
|
|
1466
|
+
quantity: z.number().int().min(1).optional(),
|
|
1467
|
+
quantity_in_decimal: z.string().max(33).optional(),
|
|
1468
|
+
unit_price: z.number().int().min(0).optional(),
|
|
1469
|
+
unit_price_in_decimal: z.string().max(39).optional(),
|
|
1470
|
+
billing_cycles: z.number().int().min(0).optional(),
|
|
1471
|
+
trial_end: z.number().int().optional(),
|
|
1472
|
+
service_period_days: z.number().int().min(1).max(4000).optional(),
|
|
1473
|
+
charge_on_event: z
|
|
1474
|
+
.enum([
|
|
1475
|
+
'subscription_creation',
|
|
1476
|
+
'subscription_trial_start',
|
|
1477
|
+
'plan_activation',
|
|
1478
|
+
'subscription_activation',
|
|
1479
|
+
'contract_termination',
|
|
1480
|
+
])
|
|
1481
|
+
.optional(),
|
|
1482
|
+
charge_once: z.boolean().optional(),
|
|
1483
|
+
charge_on_option: z.enum(['immediately', 'on_event']).optional(),
|
|
1484
|
+
item_type: z.enum(['plan', 'addon', 'charge']).optional(),
|
|
1485
|
+
start_date: z.number().int().optional(),
|
|
1486
|
+
end_date: z.number().int().optional(),
|
|
1487
|
+
description: z.string().max(2000).optional(),
|
|
1488
|
+
ramp_tier_id: z.string().max(105).optional(),
|
|
1489
|
+
});
|
|
1050
1490
|
const UpdateSubscriptionQuoteForItemsQuoteSubscriptionItemsSchema = z.object({
|
|
1051
1491
|
item_price_id: z.array(z.string().max(100).optional()),
|
|
1052
1492
|
quantity: z.array(z.number().int().min(1).optional()).optional(),
|
|
@@ -1079,6 +1519,21 @@ const UpdateSubscriptionQuoteForItemsQuoteSubscriptionItemsSchema = z.object({
|
|
|
1079
1519
|
description: z.array(z.string().max(2000).optional()).optional(),
|
|
1080
1520
|
ramp_tier_id: z.array(z.string().max(105).optional()).optional(),
|
|
1081
1521
|
});
|
|
1522
|
+
const UpdateSubscriptionQuoteForItemsQuoteDiscountsItemSchema = z.object({
|
|
1523
|
+
apply_on: z.enum(['invoice_amount', 'specific_item_price']).optional(),
|
|
1524
|
+
duration_type: z.enum(['one_time', 'forever', 'limited_period']),
|
|
1525
|
+
percentage: z.number().min(0.01).max(100).optional(),
|
|
1526
|
+
amount: z.number().int().min(0).optional(),
|
|
1527
|
+
period: z.number().int().min(1).optional(),
|
|
1528
|
+
period_unit: z.enum(['day', 'week', 'month', 'year']).optional(),
|
|
1529
|
+
included_in_mrr: z.boolean().optional(),
|
|
1530
|
+
item_price_id: z.string().max(100).optional(),
|
|
1531
|
+
quantity: z.number().int().min(1).optional(),
|
|
1532
|
+
operation_type: z.enum(['add', 'remove']),
|
|
1533
|
+
id: z.string().max(50).optional(),
|
|
1534
|
+
start_date: z.number().int().optional(),
|
|
1535
|
+
end_date: z.number().int().optional(),
|
|
1536
|
+
});
|
|
1082
1537
|
const UpdateSubscriptionQuoteForItemsQuoteDiscountsSchema = z.object({
|
|
1083
1538
|
apply_on: z
|
|
1084
1539
|
.array(z.enum(['invoice_amount', 'specific_item_price']).optional())
|
|
@@ -1098,6 +1553,18 @@ const UpdateSubscriptionQuoteForItemsQuoteDiscountsSchema = z.object({
|
|
|
1098
1553
|
start_date: z.array(z.number().int().optional()).optional(),
|
|
1099
1554
|
end_date: z.array(z.number().int().optional()).optional(),
|
|
1100
1555
|
});
|
|
1556
|
+
const UpdateSubscriptionQuoteForItemsQuoteItemTiersItemSchema = z.object({
|
|
1557
|
+
item_price_id: z.string().max(100).optional(),
|
|
1558
|
+
starting_unit: z.number().int().min(1).optional(),
|
|
1559
|
+
ending_unit: z.number().int().optional(),
|
|
1560
|
+
price: z.number().int().min(0).optional(),
|
|
1561
|
+
starting_unit_in_decimal: z.string().max(33).optional(),
|
|
1562
|
+
ending_unit_in_decimal: z.string().max(33).optional(),
|
|
1563
|
+
price_in_decimal: z.string().max(39).optional(),
|
|
1564
|
+
pricing_type: z.enum(['per_unit', 'flat_fee', 'package']).optional(),
|
|
1565
|
+
package_size: z.number().int().min(1).optional(),
|
|
1566
|
+
ramp_tier_id: z.string().max(105).optional(),
|
|
1567
|
+
});
|
|
1101
1568
|
const UpdateSubscriptionQuoteForItemsQuoteItemTiersSchema = z.object({
|
|
1102
1569
|
item_price_id: z.array(z.string().max(100).optional()).optional(),
|
|
1103
1570
|
starting_unit: z.array(z.number().int().min(1).optional()).optional(),
|
|
@@ -1112,11 +1579,27 @@ const UpdateSubscriptionQuoteForItemsQuoteItemTiersSchema = z.object({
|
|
|
1112
1579
|
package_size: z.array(z.number().int().min(1).optional()).optional(),
|
|
1113
1580
|
ramp_tier_id: z.array(z.string().max(105).optional()).optional(),
|
|
1114
1581
|
});
|
|
1582
|
+
const UpdateSubscriptionQuoteForItemsQuoteCouponsItemSchema = z.object({
|
|
1583
|
+
id: z.string().max(100).optional(),
|
|
1584
|
+
start_date: z.number().int().optional(),
|
|
1585
|
+
end_date: z.number().int().optional(),
|
|
1586
|
+
});
|
|
1115
1587
|
const UpdateSubscriptionQuoteForItemsQuoteCouponsSchema = z.object({
|
|
1116
1588
|
id: z.array(z.string().max(100).optional()).optional(),
|
|
1117
1589
|
start_date: z.array(z.number().int().optional()).optional(),
|
|
1118
1590
|
end_date: z.array(z.number().int().optional()).optional(),
|
|
1119
1591
|
});
|
|
1592
|
+
const UpdateSubscriptionQuoteForItemsQuoteEntitlementOverridesItemSchema = z.object({
|
|
1593
|
+
feature_id: z.string().max(50).optional(),
|
|
1594
|
+
entity_id: z.string().max(100).optional(),
|
|
1595
|
+
entity_type: z
|
|
1596
|
+
.enum(['plan_price', 'addon_price', 'charge_price', 'charge'])
|
|
1597
|
+
.optional(),
|
|
1598
|
+
value: z.string().max(50).optional(),
|
|
1599
|
+
is_enabled: z.boolean().optional(),
|
|
1600
|
+
start_date: z.number().int().optional(),
|
|
1601
|
+
end_date: z.number().int().optional(),
|
|
1602
|
+
});
|
|
1120
1603
|
const UpdateSubscriptionQuoteForItemsQuoteEntitlementOverridesSchema = z.object({
|
|
1121
1604
|
feature_id: z.array(z.string().max(50).optional()).optional(),
|
|
1122
1605
|
entity_id: z.array(z.string().max(100).optional()).optional(),
|
|
@@ -1152,11 +1635,36 @@ const UpdateSubscriptionQuoteForItemsQuoteBodySchema = z.looseObject({
|
|
|
1152
1635
|
shipping_address: UpdateSubscriptionQuoteForItemsQuoteShippingAddressSchema.optional(),
|
|
1153
1636
|
customer: UpdateSubscriptionQuoteForItemsQuoteCustomerSchema.optional(),
|
|
1154
1637
|
contract_term: UpdateSubscriptionQuoteForItemsQuoteContractTermSchema.optional(),
|
|
1155
|
-
subscription_items:
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1638
|
+
subscription_items: z
|
|
1639
|
+
.union([
|
|
1640
|
+
z.array(UpdateSubscriptionQuoteForItemsQuoteSubscriptionItemsItemSchema.optional()),
|
|
1641
|
+
UpdateSubscriptionQuoteForItemsQuoteSubscriptionItemsSchema,
|
|
1642
|
+
])
|
|
1643
|
+
.optional(),
|
|
1644
|
+
discounts: z
|
|
1645
|
+
.union([
|
|
1646
|
+
z.array(UpdateSubscriptionQuoteForItemsQuoteDiscountsItemSchema.optional()),
|
|
1647
|
+
UpdateSubscriptionQuoteForItemsQuoteDiscountsSchema,
|
|
1648
|
+
])
|
|
1649
|
+
.optional(),
|
|
1650
|
+
item_tiers: z
|
|
1651
|
+
.union([
|
|
1652
|
+
z.array(UpdateSubscriptionQuoteForItemsQuoteItemTiersItemSchema.optional()),
|
|
1653
|
+
UpdateSubscriptionQuoteForItemsQuoteItemTiersSchema,
|
|
1654
|
+
])
|
|
1655
|
+
.optional(),
|
|
1656
|
+
coupons: z
|
|
1657
|
+
.union([
|
|
1658
|
+
z.array(UpdateSubscriptionQuoteForItemsQuoteCouponsItemSchema.optional()),
|
|
1659
|
+
UpdateSubscriptionQuoteForItemsQuoteCouponsSchema,
|
|
1660
|
+
])
|
|
1661
|
+
.optional(),
|
|
1662
|
+
entitlement_overrides: z
|
|
1663
|
+
.union([
|
|
1664
|
+
z.array(UpdateSubscriptionQuoteForItemsQuoteEntitlementOverridesItemSchema.optional()),
|
|
1665
|
+
UpdateSubscriptionQuoteForItemsQuoteEntitlementOverridesSchema,
|
|
1666
|
+
])
|
|
1667
|
+
.optional(),
|
|
1160
1668
|
});
|
|
1161
1669
|
export { UpdateSubscriptionQuoteForItemsQuoteBodySchema };
|
|
1162
1670
|
//Quote.editUpdateSubscriptionQuoteForItems
|
|
@@ -1237,6 +1745,32 @@ const EditUpdateSubscriptionQuoteForItemsQuoteContractTermSchema = z.object({
|
|
|
1237
1745
|
.optional(),
|
|
1238
1746
|
cancellation_cutoff_period: z.number().int().optional(),
|
|
1239
1747
|
});
|
|
1748
|
+
const EditUpdateSubscriptionQuoteForItemsQuoteSubscriptionItemsItemSchema = z.object({
|
|
1749
|
+
item_price_id: z.string().max(100),
|
|
1750
|
+
quantity: z.number().int().min(1).optional(),
|
|
1751
|
+
quantity_in_decimal: z.string().max(33).optional(),
|
|
1752
|
+
unit_price: z.number().int().min(0).optional(),
|
|
1753
|
+
unit_price_in_decimal: z.string().max(39).optional(),
|
|
1754
|
+
billing_cycles: z.number().int().min(0).optional(),
|
|
1755
|
+
trial_end: z.number().int().optional(),
|
|
1756
|
+
service_period_days: z.number().int().min(1).max(4000).optional(),
|
|
1757
|
+
charge_on_event: z
|
|
1758
|
+
.enum([
|
|
1759
|
+
'subscription_creation',
|
|
1760
|
+
'subscription_trial_start',
|
|
1761
|
+
'plan_activation',
|
|
1762
|
+
'subscription_activation',
|
|
1763
|
+
'contract_termination',
|
|
1764
|
+
])
|
|
1765
|
+
.optional(),
|
|
1766
|
+
charge_once: z.boolean().optional(),
|
|
1767
|
+
charge_on_option: z.enum(['immediately', 'on_event']).optional(),
|
|
1768
|
+
item_type: z.enum(['plan', 'addon', 'charge']).optional(),
|
|
1769
|
+
start_date: z.number().int().optional(),
|
|
1770
|
+
end_date: z.number().int().optional(),
|
|
1771
|
+
description: z.string().max(2000).optional(),
|
|
1772
|
+
ramp_tier_id: z.string().max(105).optional(),
|
|
1773
|
+
});
|
|
1240
1774
|
const EditUpdateSubscriptionQuoteForItemsQuoteSubscriptionItemsSchema = z.object({
|
|
1241
1775
|
item_price_id: z.array(z.string().max(100).optional()),
|
|
1242
1776
|
quantity: z.array(z.number().int().min(1).optional()).optional(),
|
|
@@ -1271,6 +1805,21 @@ const EditUpdateSubscriptionQuoteForItemsQuoteSubscriptionItemsSchema = z.object
|
|
|
1271
1805
|
description: z.array(z.string().max(2000).optional()).optional(),
|
|
1272
1806
|
ramp_tier_id: z.array(z.string().max(105).optional()).optional(),
|
|
1273
1807
|
});
|
|
1808
|
+
const EditUpdateSubscriptionQuoteForItemsQuoteDiscountsItemSchema = z.object({
|
|
1809
|
+
apply_on: z.enum(['invoice_amount', 'specific_item_price']).optional(),
|
|
1810
|
+
duration_type: z.enum(['one_time', 'forever', 'limited_period']),
|
|
1811
|
+
percentage: z.number().min(0.01).max(100).optional(),
|
|
1812
|
+
amount: z.number().int().min(0).optional(),
|
|
1813
|
+
period: z.number().int().min(1).optional(),
|
|
1814
|
+
period_unit: z.enum(['day', 'week', 'month', 'year']).optional(),
|
|
1815
|
+
included_in_mrr: z.boolean().optional(),
|
|
1816
|
+
item_price_id: z.string().max(100).optional(),
|
|
1817
|
+
quantity: z.number().int().min(1).optional(),
|
|
1818
|
+
operation_type: z.enum(['add', 'remove']),
|
|
1819
|
+
id: z.string().max(50).optional(),
|
|
1820
|
+
start_date: z.number().int().optional(),
|
|
1821
|
+
end_date: z.number().int().optional(),
|
|
1822
|
+
});
|
|
1274
1823
|
const EditUpdateSubscriptionQuoteForItemsQuoteDiscountsSchema = z.object({
|
|
1275
1824
|
apply_on: z
|
|
1276
1825
|
.array(z.enum(['invoice_amount', 'specific_item_price']).optional())
|
|
@@ -1290,6 +1839,18 @@ const EditUpdateSubscriptionQuoteForItemsQuoteDiscountsSchema = z.object({
|
|
|
1290
1839
|
start_date: z.array(z.number().int().optional()).optional(),
|
|
1291
1840
|
end_date: z.array(z.number().int().optional()).optional(),
|
|
1292
1841
|
});
|
|
1842
|
+
const EditUpdateSubscriptionQuoteForItemsQuoteItemTiersItemSchema = z.object({
|
|
1843
|
+
item_price_id: z.string().max(100).optional(),
|
|
1844
|
+
starting_unit: z.number().int().min(1).optional(),
|
|
1845
|
+
ending_unit: z.number().int().optional(),
|
|
1846
|
+
price: z.number().int().min(0).optional(),
|
|
1847
|
+
starting_unit_in_decimal: z.string().max(33).optional(),
|
|
1848
|
+
ending_unit_in_decimal: z.string().max(33).optional(),
|
|
1849
|
+
price_in_decimal: z.string().max(39).optional(),
|
|
1850
|
+
pricing_type: z.enum(['per_unit', 'flat_fee', 'package']).optional(),
|
|
1851
|
+
package_size: z.number().int().min(1).optional(),
|
|
1852
|
+
ramp_tier_id: z.string().max(105).optional(),
|
|
1853
|
+
});
|
|
1293
1854
|
const EditUpdateSubscriptionQuoteForItemsQuoteItemTiersSchema = z.object({
|
|
1294
1855
|
item_price_id: z.array(z.string().max(100).optional()).optional(),
|
|
1295
1856
|
starting_unit: z.array(z.number().int().min(1).optional()).optional(),
|
|
@@ -1304,11 +1865,27 @@ const EditUpdateSubscriptionQuoteForItemsQuoteItemTiersSchema = z.object({
|
|
|
1304
1865
|
package_size: z.array(z.number().int().min(1).optional()).optional(),
|
|
1305
1866
|
ramp_tier_id: z.array(z.string().max(105).optional()).optional(),
|
|
1306
1867
|
});
|
|
1868
|
+
const EditUpdateSubscriptionQuoteForItemsQuoteCouponsItemSchema = z.object({
|
|
1869
|
+
id: z.string().max(100).optional(),
|
|
1870
|
+
start_date: z.number().int().optional(),
|
|
1871
|
+
end_date: z.number().int().optional(),
|
|
1872
|
+
});
|
|
1307
1873
|
const EditUpdateSubscriptionQuoteForItemsQuoteCouponsSchema = z.object({
|
|
1308
1874
|
id: z.array(z.string().max(100).optional()).optional(),
|
|
1309
1875
|
start_date: z.array(z.number().int().optional()).optional(),
|
|
1310
1876
|
end_date: z.array(z.number().int().optional()).optional(),
|
|
1311
1877
|
});
|
|
1878
|
+
const EditUpdateSubscriptionQuoteForItemsQuoteEntitlementOverridesItemSchema = z.object({
|
|
1879
|
+
feature_id: z.string().max(50).optional(),
|
|
1880
|
+
entity_id: z.string().max(100).optional(),
|
|
1881
|
+
entity_type: z
|
|
1882
|
+
.enum(['plan_price', 'addon_price', 'charge_price', 'charge'])
|
|
1883
|
+
.optional(),
|
|
1884
|
+
value: z.string().max(50).optional(),
|
|
1885
|
+
is_enabled: z.boolean().optional(),
|
|
1886
|
+
start_date: z.number().int().optional(),
|
|
1887
|
+
end_date: z.number().int().optional(),
|
|
1888
|
+
});
|
|
1312
1889
|
const EditUpdateSubscriptionQuoteForItemsQuoteEntitlementOverridesSchema = z.object({
|
|
1313
1890
|
feature_id: z.array(z.string().max(50).optional()).optional(),
|
|
1314
1891
|
entity_id: z.array(z.string().max(100).optional()).optional(),
|
|
@@ -1343,11 +1920,36 @@ const EditUpdateSubscriptionQuoteForItemsQuoteBodySchema = z.looseObject({
|
|
|
1343
1920
|
shipping_address: EditUpdateSubscriptionQuoteForItemsQuoteShippingAddressSchema.optional(),
|
|
1344
1921
|
customer: EditUpdateSubscriptionQuoteForItemsQuoteCustomerSchema.optional(),
|
|
1345
1922
|
contract_term: EditUpdateSubscriptionQuoteForItemsQuoteContractTermSchema.optional(),
|
|
1346
|
-
subscription_items:
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1923
|
+
subscription_items: z
|
|
1924
|
+
.union([
|
|
1925
|
+
z.array(EditUpdateSubscriptionQuoteForItemsQuoteSubscriptionItemsItemSchema.optional()),
|
|
1926
|
+
EditUpdateSubscriptionQuoteForItemsQuoteSubscriptionItemsSchema,
|
|
1927
|
+
])
|
|
1928
|
+
.optional(),
|
|
1929
|
+
discounts: z
|
|
1930
|
+
.union([
|
|
1931
|
+
z.array(EditUpdateSubscriptionQuoteForItemsQuoteDiscountsItemSchema.optional()),
|
|
1932
|
+
EditUpdateSubscriptionQuoteForItemsQuoteDiscountsSchema,
|
|
1933
|
+
])
|
|
1934
|
+
.optional(),
|
|
1935
|
+
item_tiers: z
|
|
1936
|
+
.union([
|
|
1937
|
+
z.array(EditUpdateSubscriptionQuoteForItemsQuoteItemTiersItemSchema.optional()),
|
|
1938
|
+
EditUpdateSubscriptionQuoteForItemsQuoteItemTiersSchema,
|
|
1939
|
+
])
|
|
1940
|
+
.optional(),
|
|
1941
|
+
coupons: z
|
|
1942
|
+
.union([
|
|
1943
|
+
z.array(EditUpdateSubscriptionQuoteForItemsQuoteCouponsItemSchema.optional()),
|
|
1944
|
+
EditUpdateSubscriptionQuoteForItemsQuoteCouponsSchema,
|
|
1945
|
+
])
|
|
1946
|
+
.optional(),
|
|
1947
|
+
entitlement_overrides: z
|
|
1948
|
+
.union([
|
|
1949
|
+
z.array(EditUpdateSubscriptionQuoteForItemsQuoteEntitlementOverridesItemSchema.optional()),
|
|
1950
|
+
EditUpdateSubscriptionQuoteForItemsQuoteEntitlementOverridesSchema,
|
|
1951
|
+
])
|
|
1952
|
+
.optional(),
|
|
1351
1953
|
});
|
|
1352
1954
|
export { EditUpdateSubscriptionQuoteForItemsQuoteBodySchema };
|
|
1353
1955
|
//Quote.createForChargeItemsAndCharges
|
|
@@ -1387,6 +1989,14 @@ const CreateForChargeItemsAndChargesQuoteShippingAddressSchema = z.object({
|
|
|
1387
1989
|
.enum(['not_validated', 'valid', 'partially_valid', 'invalid'])
|
|
1388
1990
|
.optional(),
|
|
1389
1991
|
});
|
|
1992
|
+
const CreateForChargeItemsAndChargesQuoteItemPricesItemSchema = z.object({
|
|
1993
|
+
item_price_id: z.string().max(100).optional(),
|
|
1994
|
+
quantity: z.number().int().min(1).optional(),
|
|
1995
|
+
quantity_in_decimal: z.string().max(33).optional(),
|
|
1996
|
+
unit_price: z.number().int().min(0).optional(),
|
|
1997
|
+
unit_price_in_decimal: z.string().max(39).optional(),
|
|
1998
|
+
service_period_days: z.number().int().min(1).max(4000).optional(),
|
|
1999
|
+
});
|
|
1390
2000
|
const CreateForChargeItemsAndChargesQuoteItemPricesSchema = z.object({
|
|
1391
2001
|
item_price_id: z.array(z.string().max(100).optional()).optional(),
|
|
1392
2002
|
quantity: z.array(z.number().int().min(1).optional()).optional(),
|
|
@@ -1397,6 +2007,17 @@ const CreateForChargeItemsAndChargesQuoteItemPricesSchema = z.object({
|
|
|
1397
2007
|
.array(z.number().int().min(1).max(4000).optional())
|
|
1398
2008
|
.optional(),
|
|
1399
2009
|
});
|
|
2010
|
+
const CreateForChargeItemsAndChargesQuoteItemTiersItemSchema = z.object({
|
|
2011
|
+
item_price_id: z.string().max(100).optional(),
|
|
2012
|
+
starting_unit: z.number().int().min(1).optional(),
|
|
2013
|
+
ending_unit: z.number().int().optional(),
|
|
2014
|
+
price: z.number().int().min(0).optional(),
|
|
2015
|
+
starting_unit_in_decimal: z.string().max(33).optional(),
|
|
2016
|
+
ending_unit_in_decimal: z.string().max(33).optional(),
|
|
2017
|
+
price_in_decimal: z.string().max(39).optional(),
|
|
2018
|
+
pricing_type: z.enum(['per_unit', 'flat_fee', 'package']).optional(),
|
|
2019
|
+
package_size: z.number().int().min(1).optional(),
|
|
2020
|
+
});
|
|
1400
2021
|
const CreateForChargeItemsAndChargesQuoteItemTiersSchema = z.object({
|
|
1401
2022
|
item_price_id: z.array(z.string().max(100).optional()).optional(),
|
|
1402
2023
|
starting_unit: z.array(z.number().int().min(1).optional()).optional(),
|
|
@@ -1410,6 +2031,17 @@ const CreateForChargeItemsAndChargesQuoteItemTiersSchema = z.object({
|
|
|
1410
2031
|
.optional(),
|
|
1411
2032
|
package_size: z.array(z.number().int().min(1).optional()).optional(),
|
|
1412
2033
|
});
|
|
2034
|
+
const CreateForChargeItemsAndChargesQuoteChargesItemSchema = z.object({
|
|
2035
|
+
amount: z.number().int().min(1).optional(),
|
|
2036
|
+
amount_in_decimal: z.string().max(39).optional(),
|
|
2037
|
+
description: z.string().max(250).optional(),
|
|
2038
|
+
avalara_sale_type: z
|
|
2039
|
+
.enum(['wholesale', 'retail', 'consumed', 'vendor_use'])
|
|
2040
|
+
.optional(),
|
|
2041
|
+
avalara_transaction_type: z.number().int().optional(),
|
|
2042
|
+
avalara_service_type: z.number().int().optional(),
|
|
2043
|
+
service_period: z.number().int().optional(),
|
|
2044
|
+
});
|
|
1413
2045
|
const CreateForChargeItemsAndChargesQuoteChargesSchema = z.object({
|
|
1414
2046
|
amount: z.array(z.number().int().min(1).optional()).optional(),
|
|
1415
2047
|
amount_in_decimal: z.array(z.string().max(39).optional()).optional(),
|
|
@@ -1421,6 +2053,13 @@ const CreateForChargeItemsAndChargesQuoteChargesSchema = z.object({
|
|
|
1421
2053
|
avalara_service_type: z.array(z.number().int().optional()).optional(),
|
|
1422
2054
|
service_period: z.array(z.number().int().optional()).optional(),
|
|
1423
2055
|
});
|
|
2056
|
+
const CreateForChargeItemsAndChargesQuoteDiscountsItemSchema = z.object({
|
|
2057
|
+
percentage: z.number().min(0.01).max(100).optional(),
|
|
2058
|
+
quantity: z.number().int().min(1).optional(),
|
|
2059
|
+
amount: z.number().int().min(0).optional(),
|
|
2060
|
+
apply_on: z.enum(['invoice_amount', 'specific_item_price']),
|
|
2061
|
+
item_price_id: z.string().max(100).optional(),
|
|
2062
|
+
});
|
|
1424
2063
|
const CreateForChargeItemsAndChargesQuoteDiscountsSchema = z.object({
|
|
1425
2064
|
percentage: z.array(z.number().min(0.01).max(100).optional()).optional(),
|
|
1426
2065
|
quantity: z.array(z.number().int().min(1).optional()).optional(),
|
|
@@ -1428,6 +2067,11 @@ const CreateForChargeItemsAndChargesQuoteDiscountsSchema = z.object({
|
|
|
1428
2067
|
apply_on: z.array(z.enum(['invoice_amount', 'specific_item_price']).optional()),
|
|
1429
2068
|
item_price_id: z.array(z.string().max(100).optional()).optional(),
|
|
1430
2069
|
});
|
|
2070
|
+
const CreateForChargeItemsAndChargesQuoteTaxProvidersFieldsItemSchema = z.object({
|
|
2071
|
+
provider_name: z.string().max(50).optional(),
|
|
2072
|
+
field_id: z.string().max(50).optional(),
|
|
2073
|
+
field_value: z.string().max(50).optional(),
|
|
2074
|
+
});
|
|
1431
2075
|
const CreateForChargeItemsAndChargesQuoteTaxProvidersFieldsSchema = z.object({
|
|
1432
2076
|
provider_name: z.array(z.string().max(50).optional()).optional(),
|
|
1433
2077
|
field_id: z.array(z.string().max(50).optional()).optional(),
|
|
@@ -1445,11 +2089,36 @@ const CreateForChargeItemsAndChargesQuoteBodySchema = z.looseObject({
|
|
|
1445
2089
|
net_term_days: z.number().int().optional(),
|
|
1446
2090
|
billing_address: CreateForChargeItemsAndChargesQuoteBillingAddressSchema.optional(),
|
|
1447
2091
|
shipping_address: CreateForChargeItemsAndChargesQuoteShippingAddressSchema.optional(),
|
|
1448
|
-
item_prices:
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
2092
|
+
item_prices: z
|
|
2093
|
+
.union([
|
|
2094
|
+
z.array(CreateForChargeItemsAndChargesQuoteItemPricesItemSchema.optional()),
|
|
2095
|
+
CreateForChargeItemsAndChargesQuoteItemPricesSchema,
|
|
2096
|
+
])
|
|
2097
|
+
.optional(),
|
|
2098
|
+
item_tiers: z
|
|
2099
|
+
.union([
|
|
2100
|
+
z.array(CreateForChargeItemsAndChargesQuoteItemTiersItemSchema.optional()),
|
|
2101
|
+
CreateForChargeItemsAndChargesQuoteItemTiersSchema,
|
|
2102
|
+
])
|
|
2103
|
+
.optional(),
|
|
2104
|
+
charges: z
|
|
2105
|
+
.union([
|
|
2106
|
+
z.array(CreateForChargeItemsAndChargesQuoteChargesItemSchema.optional()),
|
|
2107
|
+
CreateForChargeItemsAndChargesQuoteChargesSchema,
|
|
2108
|
+
])
|
|
2109
|
+
.optional(),
|
|
2110
|
+
discounts: z
|
|
2111
|
+
.union([
|
|
2112
|
+
z.array(CreateForChargeItemsAndChargesQuoteDiscountsItemSchema.optional()),
|
|
2113
|
+
CreateForChargeItemsAndChargesQuoteDiscountsSchema,
|
|
2114
|
+
])
|
|
2115
|
+
.optional(),
|
|
2116
|
+
tax_providers_fields: z
|
|
2117
|
+
.union([
|
|
2118
|
+
z.array(CreateForChargeItemsAndChargesQuoteTaxProvidersFieldsItemSchema.optional()),
|
|
2119
|
+
CreateForChargeItemsAndChargesQuoteTaxProvidersFieldsSchema,
|
|
2120
|
+
])
|
|
2121
|
+
.optional(),
|
|
1453
2122
|
});
|
|
1454
2123
|
export { CreateForChargeItemsAndChargesQuoteBodySchema };
|
|
1455
2124
|
//Quote.editForChargeItemsAndCharges
|
|
@@ -1489,6 +2158,14 @@ const EditForChargeItemsAndChargesQuoteShippingAddressSchema = z.object({
|
|
|
1489
2158
|
.enum(['not_validated', 'valid', 'partially_valid', 'invalid'])
|
|
1490
2159
|
.optional(),
|
|
1491
2160
|
});
|
|
2161
|
+
const EditForChargeItemsAndChargesQuoteItemPricesItemSchema = z.object({
|
|
2162
|
+
item_price_id: z.string().max(100).optional(),
|
|
2163
|
+
quantity: z.number().int().min(1).optional(),
|
|
2164
|
+
quantity_in_decimal: z.string().max(33).optional(),
|
|
2165
|
+
unit_price: z.number().int().min(0).optional(),
|
|
2166
|
+
unit_price_in_decimal: z.string().max(39).optional(),
|
|
2167
|
+
service_period_days: z.number().int().min(1).max(4000).optional(),
|
|
2168
|
+
});
|
|
1492
2169
|
const EditForChargeItemsAndChargesQuoteItemPricesSchema = z.object({
|
|
1493
2170
|
item_price_id: z.array(z.string().max(100).optional()).optional(),
|
|
1494
2171
|
quantity: z.array(z.number().int().min(1).optional()).optional(),
|
|
@@ -1499,6 +2176,17 @@ const EditForChargeItemsAndChargesQuoteItemPricesSchema = z.object({
|
|
|
1499
2176
|
.array(z.number().int().min(1).max(4000).optional())
|
|
1500
2177
|
.optional(),
|
|
1501
2178
|
});
|
|
2179
|
+
const EditForChargeItemsAndChargesQuoteItemTiersItemSchema = z.object({
|
|
2180
|
+
item_price_id: z.string().max(100).optional(),
|
|
2181
|
+
starting_unit: z.number().int().min(1).optional(),
|
|
2182
|
+
ending_unit: z.number().int().optional(),
|
|
2183
|
+
price: z.number().int().min(0).optional(),
|
|
2184
|
+
starting_unit_in_decimal: z.string().max(33).optional(),
|
|
2185
|
+
ending_unit_in_decimal: z.string().max(33).optional(),
|
|
2186
|
+
price_in_decimal: z.string().max(39).optional(),
|
|
2187
|
+
pricing_type: z.enum(['per_unit', 'flat_fee', 'package']).optional(),
|
|
2188
|
+
package_size: z.number().int().min(1).optional(),
|
|
2189
|
+
});
|
|
1502
2190
|
const EditForChargeItemsAndChargesQuoteItemTiersSchema = z.object({
|
|
1503
2191
|
item_price_id: z.array(z.string().max(100).optional()).optional(),
|
|
1504
2192
|
starting_unit: z.array(z.number().int().min(1).optional()).optional(),
|
|
@@ -1512,6 +2200,17 @@ const EditForChargeItemsAndChargesQuoteItemTiersSchema = z.object({
|
|
|
1512
2200
|
.optional(),
|
|
1513
2201
|
package_size: z.array(z.number().int().min(1).optional()).optional(),
|
|
1514
2202
|
});
|
|
2203
|
+
const EditForChargeItemsAndChargesQuoteChargesItemSchema = z.object({
|
|
2204
|
+
amount: z.number().int().min(1).optional(),
|
|
2205
|
+
amount_in_decimal: z.string().max(39).optional(),
|
|
2206
|
+
description: z.string().max(250).optional(),
|
|
2207
|
+
avalara_sale_type: z
|
|
2208
|
+
.enum(['wholesale', 'retail', 'consumed', 'vendor_use'])
|
|
2209
|
+
.optional(),
|
|
2210
|
+
avalara_transaction_type: z.number().int().optional(),
|
|
2211
|
+
avalara_service_type: z.number().int().optional(),
|
|
2212
|
+
service_period: z.number().int().optional(),
|
|
2213
|
+
});
|
|
1515
2214
|
const EditForChargeItemsAndChargesQuoteChargesSchema = z.object({
|
|
1516
2215
|
amount: z.array(z.number().int().min(1).optional()).optional(),
|
|
1517
2216
|
amount_in_decimal: z.array(z.string().max(39).optional()).optional(),
|
|
@@ -1523,6 +2222,13 @@ const EditForChargeItemsAndChargesQuoteChargesSchema = z.object({
|
|
|
1523
2222
|
avalara_service_type: z.array(z.number().int().optional()).optional(),
|
|
1524
2223
|
service_period: z.array(z.number().int().optional()).optional(),
|
|
1525
2224
|
});
|
|
2225
|
+
const EditForChargeItemsAndChargesQuoteDiscountsItemSchema = z.object({
|
|
2226
|
+
percentage: z.number().min(0.01).max(100).optional(),
|
|
2227
|
+
quantity: z.number().int().min(1).optional(),
|
|
2228
|
+
amount: z.number().int().min(0).optional(),
|
|
2229
|
+
apply_on: z.enum(['invoice_amount', 'specific_item_price']),
|
|
2230
|
+
item_price_id: z.string().max(100).optional(),
|
|
2231
|
+
});
|
|
1526
2232
|
const EditForChargeItemsAndChargesQuoteDiscountsSchema = z.object({
|
|
1527
2233
|
percentage: z.array(z.number().min(0.01).max(100).optional()).optional(),
|
|
1528
2234
|
quantity: z.array(z.number().int().min(1).optional()).optional(),
|
|
@@ -1530,6 +2236,11 @@ const EditForChargeItemsAndChargesQuoteDiscountsSchema = z.object({
|
|
|
1530
2236
|
apply_on: z.array(z.enum(['invoice_amount', 'specific_item_price']).optional()),
|
|
1531
2237
|
item_price_id: z.array(z.string().max(100).optional()).optional(),
|
|
1532
2238
|
});
|
|
2239
|
+
const EditForChargeItemsAndChargesQuoteTaxProvidersFieldsItemSchema = z.object({
|
|
2240
|
+
provider_name: z.string().max(50).optional(),
|
|
2241
|
+
field_id: z.string().max(50).optional(),
|
|
2242
|
+
field_value: z.string().max(50).optional(),
|
|
2243
|
+
});
|
|
1533
2244
|
const EditForChargeItemsAndChargesQuoteTaxProvidersFieldsSchema = z.object({
|
|
1534
2245
|
provider_name: z.array(z.string().max(50).optional()).optional(),
|
|
1535
2246
|
field_id: z.array(z.string().max(50).optional()).optional(),
|
|
@@ -1545,11 +2256,36 @@ const EditForChargeItemsAndChargesQuoteBodySchema = z.looseObject({
|
|
|
1545
2256
|
net_term_days: z.number().int().optional(),
|
|
1546
2257
|
billing_address: EditForChargeItemsAndChargesQuoteBillingAddressSchema.optional(),
|
|
1547
2258
|
shipping_address: EditForChargeItemsAndChargesQuoteShippingAddressSchema.optional(),
|
|
1548
|
-
item_prices:
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
2259
|
+
item_prices: z
|
|
2260
|
+
.union([
|
|
2261
|
+
z.array(EditForChargeItemsAndChargesQuoteItemPricesItemSchema.optional()),
|
|
2262
|
+
EditForChargeItemsAndChargesQuoteItemPricesSchema,
|
|
2263
|
+
])
|
|
2264
|
+
.optional(),
|
|
2265
|
+
item_tiers: z
|
|
2266
|
+
.union([
|
|
2267
|
+
z.array(EditForChargeItemsAndChargesQuoteItemTiersItemSchema.optional()),
|
|
2268
|
+
EditForChargeItemsAndChargesQuoteItemTiersSchema,
|
|
2269
|
+
])
|
|
2270
|
+
.optional(),
|
|
2271
|
+
charges: z
|
|
2272
|
+
.union([
|
|
2273
|
+
z.array(EditForChargeItemsAndChargesQuoteChargesItemSchema.optional()),
|
|
2274
|
+
EditForChargeItemsAndChargesQuoteChargesSchema,
|
|
2275
|
+
])
|
|
2276
|
+
.optional(),
|
|
2277
|
+
discounts: z
|
|
2278
|
+
.union([
|
|
2279
|
+
z.array(EditForChargeItemsAndChargesQuoteDiscountsItemSchema.optional()),
|
|
2280
|
+
EditForChargeItemsAndChargesQuoteDiscountsSchema,
|
|
2281
|
+
])
|
|
2282
|
+
.optional(),
|
|
2283
|
+
tax_providers_fields: z
|
|
2284
|
+
.union([
|
|
2285
|
+
z.array(EditForChargeItemsAndChargesQuoteTaxProvidersFieldsItemSchema.optional()),
|
|
2286
|
+
EditForChargeItemsAndChargesQuoteTaxProvidersFieldsSchema,
|
|
2287
|
+
])
|
|
2288
|
+
.optional(),
|
|
1553
2289
|
});
|
|
1554
2290
|
export { EditForChargeItemsAndChargesQuoteBodySchema };
|
|
1555
2291
|
//Quote.list
|
|
@@ -1557,23 +2293,53 @@ const ListQuoteIdSchema = z.object({
|
|
|
1557
2293
|
is: z.string().min(1).optional(),
|
|
1558
2294
|
is_not: z.string().min(1).optional(),
|
|
1559
2295
|
starts_with: z.string().min(1).optional(),
|
|
1560
|
-
in: z
|
|
1561
|
-
|
|
2296
|
+
in: z
|
|
2297
|
+
.union([
|
|
2298
|
+
z.array(z.string().optional()),
|
|
2299
|
+
z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
2300
|
+
])
|
|
2301
|
+
.optional(),
|
|
2302
|
+
not_in: z
|
|
2303
|
+
.union([
|
|
2304
|
+
z.array(z.string().optional()),
|
|
2305
|
+
z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
2306
|
+
])
|
|
2307
|
+
.optional(),
|
|
1562
2308
|
});
|
|
1563
2309
|
const ListQuoteCustomerIdSchema = z.object({
|
|
1564
2310
|
is: z.string().min(1).optional(),
|
|
1565
2311
|
is_not: z.string().min(1).optional(),
|
|
1566
2312
|
starts_with: z.string().min(1).optional(),
|
|
1567
|
-
in: z
|
|
1568
|
-
|
|
2313
|
+
in: z
|
|
2314
|
+
.union([
|
|
2315
|
+
z.array(z.string().optional()),
|
|
2316
|
+
z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
2317
|
+
])
|
|
2318
|
+
.optional(),
|
|
2319
|
+
not_in: z
|
|
2320
|
+
.union([
|
|
2321
|
+
z.array(z.string().optional()),
|
|
2322
|
+
z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
2323
|
+
])
|
|
2324
|
+
.optional(),
|
|
1569
2325
|
});
|
|
1570
2326
|
const ListQuoteSubscriptionIdSchema = z.object({
|
|
1571
2327
|
is: z.string().min(1).optional(),
|
|
1572
2328
|
is_not: z.string().min(1).optional(),
|
|
1573
2329
|
starts_with: z.string().min(1).optional(),
|
|
1574
|
-
is_present: z.enum(['true', 'false']).optional(),
|
|
1575
|
-
in: z
|
|
1576
|
-
|
|
2330
|
+
is_present: z.union([z.boolean(), z.enum(['true', 'false'])]).optional(),
|
|
2331
|
+
in: z
|
|
2332
|
+
.union([
|
|
2333
|
+
z.array(z.string().optional()),
|
|
2334
|
+
z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
2335
|
+
])
|
|
2336
|
+
.optional(),
|
|
2337
|
+
not_in: z
|
|
2338
|
+
.union([
|
|
2339
|
+
z.array(z.string().optional()),
|
|
2340
|
+
z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
2341
|
+
])
|
|
2342
|
+
.optional(),
|
|
1577
2343
|
});
|
|
1578
2344
|
const ListQuoteStatusSchema = z.object({
|
|
1579
2345
|
is: z
|
|
@@ -1605,45 +2371,99 @@ const ListQuoteStatusSchema = z.object({
|
|
|
1605
2371
|
])
|
|
1606
2372
|
.optional(),
|
|
1607
2373
|
in: z
|
|
1608
|
-
.
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
2374
|
+
.union([
|
|
2375
|
+
z.array(z
|
|
2376
|
+
.enum([
|
|
2377
|
+
'open',
|
|
2378
|
+
'accepted',
|
|
2379
|
+
'declined',
|
|
2380
|
+
'invoiced',
|
|
2381
|
+
'closed',
|
|
2382
|
+
'pending_approval',
|
|
2383
|
+
'approval_rejected',
|
|
2384
|
+
'proposed',
|
|
2385
|
+
'voided',
|
|
2386
|
+
'expired',
|
|
2387
|
+
])
|
|
2388
|
+
.optional()),
|
|
2389
|
+
z.enum([
|
|
2390
|
+
'open',
|
|
2391
|
+
'accepted',
|
|
2392
|
+
'declined',
|
|
2393
|
+
'invoiced',
|
|
2394
|
+
'closed',
|
|
2395
|
+
'pending_approval',
|
|
2396
|
+
'approval_rejected',
|
|
2397
|
+
'proposed',
|
|
2398
|
+
'voided',
|
|
2399
|
+
'expired',
|
|
2400
|
+
]),
|
|
1619
2401
|
])
|
|
1620
2402
|
.optional(),
|
|
1621
2403
|
not_in: z
|
|
1622
|
-
.
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
2404
|
+
.union([
|
|
2405
|
+
z.array(z
|
|
2406
|
+
.enum([
|
|
2407
|
+
'open',
|
|
2408
|
+
'accepted',
|
|
2409
|
+
'declined',
|
|
2410
|
+
'invoiced',
|
|
2411
|
+
'closed',
|
|
2412
|
+
'pending_approval',
|
|
2413
|
+
'approval_rejected',
|
|
2414
|
+
'proposed',
|
|
2415
|
+
'voided',
|
|
2416
|
+
'expired',
|
|
2417
|
+
])
|
|
2418
|
+
.optional()),
|
|
2419
|
+
z.enum([
|
|
2420
|
+
'open',
|
|
2421
|
+
'accepted',
|
|
2422
|
+
'declined',
|
|
2423
|
+
'invoiced',
|
|
2424
|
+
'closed',
|
|
2425
|
+
'pending_approval',
|
|
2426
|
+
'approval_rejected',
|
|
2427
|
+
'proposed',
|
|
2428
|
+
'voided',
|
|
2429
|
+
'expired',
|
|
2430
|
+
]),
|
|
1633
2431
|
])
|
|
1634
2432
|
.optional(),
|
|
1635
2433
|
});
|
|
1636
2434
|
const ListQuoteDateSchema = z.object({
|
|
1637
|
-
after: z
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
2435
|
+
after: z
|
|
2436
|
+
.union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
|
|
2437
|
+
.optional(),
|
|
2438
|
+
before: z
|
|
2439
|
+
.union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
|
|
2440
|
+
.optional(),
|
|
2441
|
+
on: z
|
|
2442
|
+
.union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
|
|
2443
|
+
.optional(),
|
|
2444
|
+
between: z
|
|
2445
|
+
.union([
|
|
2446
|
+
z.array(z.number().int().optional()).min(2).max(2),
|
|
2447
|
+
z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')),
|
|
2448
|
+
])
|
|
2449
|
+
.optional(),
|
|
1641
2450
|
});
|
|
1642
2451
|
const ListQuoteUpdatedAtSchema = z.object({
|
|
1643
|
-
after: z
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
2452
|
+
after: z
|
|
2453
|
+
.union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
|
|
2454
|
+
.optional(),
|
|
2455
|
+
before: z
|
|
2456
|
+
.union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
|
|
2457
|
+
.optional(),
|
|
2458
|
+
on: z
|
|
2459
|
+
.union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
|
|
2460
|
+
.optional(),
|
|
2461
|
+
between: z
|
|
2462
|
+
.union([
|
|
2463
|
+
z.array(z.number().int().optional()).min(2).max(2),
|
|
2464
|
+
z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')),
|
|
2465
|
+
])
|
|
2466
|
+
.optional(),
|
|
1647
2467
|
});
|
|
1648
2468
|
const ListQuoteSortBySchema = z.looseObject({
|
|
1649
2469
|
asc: z.enum(['date']).optional(),
|