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
|
@@ -430,17 +430,37 @@ const CreateSubscriptionContractTermSchema = zod_1.z.object({
|
|
|
430
430
|
action_at_term_end: zod_1.z.enum(['renew', 'evergreen', 'cancel']).optional(),
|
|
431
431
|
cancellation_cutoff_period: zod_1.z.number().int().optional(),
|
|
432
432
|
});
|
|
433
|
+
const CreateSubscriptionEntityIdentifiersItemSchema = zod_1.z.object({
|
|
434
|
+
id: zod_1.z.string().max(40).optional(),
|
|
435
|
+
scheme: zod_1.z.string().max(50).optional(),
|
|
436
|
+
value: zod_1.z.string().max(50).optional(),
|
|
437
|
+
standard: zod_1.z.string().max(50).optional(),
|
|
438
|
+
});
|
|
433
439
|
const CreateSubscriptionEntityIdentifiersSchema = zod_1.z.object({
|
|
434
440
|
id: zod_1.z.array(zod_1.z.string().max(40).optional()).optional(),
|
|
435
441
|
scheme: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
|
|
436
442
|
value: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
|
|
437
443
|
standard: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
|
|
438
444
|
});
|
|
445
|
+
const CreateSubscriptionTaxProvidersFieldsItemSchema = zod_1.z.object({
|
|
446
|
+
provider_name: zod_1.z.string().max(50).optional(),
|
|
447
|
+
field_id: zod_1.z.string().max(50).optional(),
|
|
448
|
+
field_value: zod_1.z.string().max(50).optional(),
|
|
449
|
+
});
|
|
439
450
|
const CreateSubscriptionTaxProvidersFieldsSchema = zod_1.z.object({
|
|
440
451
|
provider_name: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
|
|
441
452
|
field_id: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
|
|
442
453
|
field_value: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
|
|
443
454
|
});
|
|
455
|
+
const CreateSubscriptionAddonsItemSchema = zod_1.z.object({
|
|
456
|
+
id: zod_1.z.string().max(100).optional(),
|
|
457
|
+
quantity: zod_1.z.number().int().min(1).optional(),
|
|
458
|
+
quantity_in_decimal: zod_1.z.string().max(33).optional(),
|
|
459
|
+
unit_price: zod_1.z.number().int().min(0).optional(),
|
|
460
|
+
unit_price_in_decimal: zod_1.z.string().max(39).optional(),
|
|
461
|
+
billing_cycles: zod_1.z.number().int().min(0).optional(),
|
|
462
|
+
trial_end: zod_1.z.number().int().optional(),
|
|
463
|
+
});
|
|
444
464
|
const CreateSubscriptionAddonsSchema = zod_1.z.object({
|
|
445
465
|
id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
|
|
446
466
|
quantity: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
|
|
@@ -450,6 +470,25 @@ const CreateSubscriptionAddonsSchema = zod_1.z.object({
|
|
|
450
470
|
billing_cycles: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
|
|
451
471
|
trial_end: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
|
|
452
472
|
});
|
|
473
|
+
const CreateSubscriptionEventBasedAddonsItemSchema = zod_1.z.object({
|
|
474
|
+
id: zod_1.z.string().max(100).optional(),
|
|
475
|
+
quantity: zod_1.z.number().int().min(1).optional(),
|
|
476
|
+
unit_price: zod_1.z.number().int().min(0).optional(),
|
|
477
|
+
quantity_in_decimal: zod_1.z.string().max(33).optional(),
|
|
478
|
+
unit_price_in_decimal: zod_1.z.string().max(39).optional(),
|
|
479
|
+
service_period_in_days: zod_1.z.number().int().min(1).max(4000).optional(),
|
|
480
|
+
on_event: zod_1.z
|
|
481
|
+
.enum([
|
|
482
|
+
'subscription_creation',
|
|
483
|
+
'subscription_trial_start',
|
|
484
|
+
'plan_activation',
|
|
485
|
+
'subscription_activation',
|
|
486
|
+
'contract_termination',
|
|
487
|
+
])
|
|
488
|
+
.optional(),
|
|
489
|
+
charge_once: zod_1.z.boolean().default(true).optional(),
|
|
490
|
+
charge_on: zod_1.z.enum(['immediately', 'on_event']).optional(),
|
|
491
|
+
});
|
|
453
492
|
const CreateSubscriptionEventBasedAddonsSchema = zod_1.z.object({
|
|
454
493
|
id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
|
|
455
494
|
quantity: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
|
|
@@ -473,6 +512,10 @@ const CreateSubscriptionEventBasedAddonsSchema = zod_1.z.object({
|
|
|
473
512
|
charge_once: zod_1.z.array(zod_1.z.boolean().default(true).optional()).optional(),
|
|
474
513
|
charge_on: zod_1.z.array(zod_1.z.enum(['immediately', 'on_event']).optional()).optional(),
|
|
475
514
|
});
|
|
515
|
+
const CreateSubscriptionCouponsItemSchema = zod_1.z.object({
|
|
516
|
+
coupon_id: zod_1.z.string().max(100).optional(),
|
|
517
|
+
apply_till: zod_1.z.number().int().optional(),
|
|
518
|
+
});
|
|
476
519
|
const CreateSubscriptionCouponsSchema = zod_1.z.object({
|
|
477
520
|
coupon_id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
|
|
478
521
|
apply_till: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
|
|
@@ -549,11 +592,36 @@ const CreateSubscriptionBodySchema = zod_1.z.looseObject({
|
|
|
549
592
|
shipping_address: CreateSubscriptionShippingAddressSchema.optional(),
|
|
550
593
|
statement_descriptor: CreateSubscriptionStatementDescriptorSchema.optional(),
|
|
551
594
|
contract_term: CreateSubscriptionContractTermSchema.optional(),
|
|
552
|
-
entity_identifiers:
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
595
|
+
entity_identifiers: zod_1.z
|
|
596
|
+
.union([
|
|
597
|
+
zod_1.z.array(CreateSubscriptionEntityIdentifiersItemSchema.optional()),
|
|
598
|
+
CreateSubscriptionEntityIdentifiersSchema,
|
|
599
|
+
])
|
|
600
|
+
.optional(),
|
|
601
|
+
tax_providers_fields: zod_1.z
|
|
602
|
+
.union([
|
|
603
|
+
zod_1.z.array(CreateSubscriptionTaxProvidersFieldsItemSchema.optional()),
|
|
604
|
+
CreateSubscriptionTaxProvidersFieldsSchema,
|
|
605
|
+
])
|
|
606
|
+
.optional(),
|
|
607
|
+
addons: zod_1.z
|
|
608
|
+
.union([
|
|
609
|
+
zod_1.z.array(CreateSubscriptionAddonsItemSchema.optional()),
|
|
610
|
+
CreateSubscriptionAddonsSchema,
|
|
611
|
+
])
|
|
612
|
+
.optional(),
|
|
613
|
+
event_based_addons: zod_1.z
|
|
614
|
+
.union([
|
|
615
|
+
zod_1.z.array(CreateSubscriptionEventBasedAddonsItemSchema.optional()),
|
|
616
|
+
CreateSubscriptionEventBasedAddonsSchema,
|
|
617
|
+
])
|
|
618
|
+
.optional(),
|
|
619
|
+
coupons: zod_1.z
|
|
620
|
+
.union([
|
|
621
|
+
zod_1.z.array(CreateSubscriptionCouponsItemSchema.optional()),
|
|
622
|
+
CreateSubscriptionCouponsSchema,
|
|
623
|
+
])
|
|
624
|
+
.optional(),
|
|
557
625
|
});
|
|
558
626
|
exports.CreateSubscriptionBodySchema = CreateSubscriptionBodySchema;
|
|
559
627
|
//Subscription.createForCustomer
|
|
@@ -661,6 +729,15 @@ const CreateForCustomerSubscriptionContractTermSchema = zod_1.z.object({
|
|
|
661
729
|
action_at_term_end: zod_1.z.enum(['renew', 'evergreen', 'cancel']).optional(),
|
|
662
730
|
cancellation_cutoff_period: zod_1.z.number().int().optional(),
|
|
663
731
|
});
|
|
732
|
+
const CreateForCustomerSubscriptionAddonsItemSchema = zod_1.z.object({
|
|
733
|
+
id: zod_1.z.string().max(100).optional(),
|
|
734
|
+
quantity: zod_1.z.number().int().min(1).optional(),
|
|
735
|
+
quantity_in_decimal: zod_1.z.string().max(33).optional(),
|
|
736
|
+
unit_price: zod_1.z.number().int().min(0).optional(),
|
|
737
|
+
unit_price_in_decimal: zod_1.z.string().max(39).optional(),
|
|
738
|
+
billing_cycles: zod_1.z.number().int().min(0).optional(),
|
|
739
|
+
trial_end: zod_1.z.number().int().optional(),
|
|
740
|
+
});
|
|
664
741
|
const CreateForCustomerSubscriptionAddonsSchema = zod_1.z.object({
|
|
665
742
|
id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
|
|
666
743
|
quantity: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
|
|
@@ -670,6 +747,25 @@ const CreateForCustomerSubscriptionAddonsSchema = zod_1.z.object({
|
|
|
670
747
|
billing_cycles: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
|
|
671
748
|
trial_end: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
|
|
672
749
|
});
|
|
750
|
+
const CreateForCustomerSubscriptionEventBasedAddonsItemSchema = zod_1.z.object({
|
|
751
|
+
id: zod_1.z.string().max(100).optional(),
|
|
752
|
+
quantity: zod_1.z.number().int().min(1).optional(),
|
|
753
|
+
unit_price: zod_1.z.number().int().min(0).optional(),
|
|
754
|
+
quantity_in_decimal: zod_1.z.string().max(33).optional(),
|
|
755
|
+
unit_price_in_decimal: zod_1.z.string().max(39).optional(),
|
|
756
|
+
service_period_in_days: zod_1.z.number().int().min(1).max(4000).optional(),
|
|
757
|
+
on_event: zod_1.z
|
|
758
|
+
.enum([
|
|
759
|
+
'subscription_creation',
|
|
760
|
+
'subscription_trial_start',
|
|
761
|
+
'plan_activation',
|
|
762
|
+
'subscription_activation',
|
|
763
|
+
'contract_termination',
|
|
764
|
+
])
|
|
765
|
+
.optional(),
|
|
766
|
+
charge_once: zod_1.z.boolean().default(true).optional(),
|
|
767
|
+
charge_on: zod_1.z.enum(['immediately', 'on_event']).optional(),
|
|
768
|
+
});
|
|
673
769
|
const CreateForCustomerSubscriptionEventBasedAddonsSchema = zod_1.z.object({
|
|
674
770
|
id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
|
|
675
771
|
quantity: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
|
|
@@ -693,6 +789,10 @@ const CreateForCustomerSubscriptionEventBasedAddonsSchema = zod_1.z.object({
|
|
|
693
789
|
charge_once: zod_1.z.array(zod_1.z.boolean().default(true).optional()).optional(),
|
|
694
790
|
charge_on: zod_1.z.array(zod_1.z.enum(['immediately', 'on_event']).optional()).optional(),
|
|
695
791
|
});
|
|
792
|
+
const CreateForCustomerSubscriptionCouponsItemSchema = zod_1.z.object({
|
|
793
|
+
coupon_id: zod_1.z.string().max(100).optional(),
|
|
794
|
+
apply_till: zod_1.z.number().int().optional(),
|
|
795
|
+
});
|
|
696
796
|
const CreateForCustomerSubscriptionCouponsSchema = zod_1.z.object({
|
|
697
797
|
coupon_id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
|
|
698
798
|
apply_till: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
|
|
@@ -763,9 +863,24 @@ const CreateForCustomerSubscriptionBodySchema = zod_1.z.looseObject({
|
|
|
763
863
|
statement_descriptor: CreateForCustomerSubscriptionStatementDescriptorSchema.optional(),
|
|
764
864
|
payment_intent: CreateForCustomerSubscriptionPaymentIntentSchema.optional(),
|
|
765
865
|
contract_term: CreateForCustomerSubscriptionContractTermSchema.optional(),
|
|
766
|
-
addons:
|
|
767
|
-
|
|
768
|
-
|
|
866
|
+
addons: zod_1.z
|
|
867
|
+
.union([
|
|
868
|
+
zod_1.z.array(CreateForCustomerSubscriptionAddonsItemSchema.optional()),
|
|
869
|
+
CreateForCustomerSubscriptionAddonsSchema,
|
|
870
|
+
])
|
|
871
|
+
.optional(),
|
|
872
|
+
event_based_addons: zod_1.z
|
|
873
|
+
.union([
|
|
874
|
+
zod_1.z.array(CreateForCustomerSubscriptionEventBasedAddonsItemSchema.optional()),
|
|
875
|
+
CreateForCustomerSubscriptionEventBasedAddonsSchema,
|
|
876
|
+
])
|
|
877
|
+
.optional(),
|
|
878
|
+
coupons: zod_1.z
|
|
879
|
+
.union([
|
|
880
|
+
zod_1.z.array(CreateForCustomerSubscriptionCouponsItemSchema.optional()),
|
|
881
|
+
CreateForCustomerSubscriptionCouponsSchema,
|
|
882
|
+
])
|
|
883
|
+
.optional(),
|
|
769
884
|
});
|
|
770
885
|
exports.CreateForCustomerSubscriptionBodySchema = CreateForCustomerSubscriptionBodySchema;
|
|
771
886
|
//Subscription.createWithItems
|
|
@@ -878,6 +993,32 @@ const CreateWithItemsSubscriptionBillingOverrideSchema = zod_1.z.object({
|
|
|
878
993
|
max_excess_payment_usage: zod_1.z.number().int().min(-1).optional(),
|
|
879
994
|
max_refundable_credits_usage: zod_1.z.number().int().min(-1).optional(),
|
|
880
995
|
});
|
|
996
|
+
const CreateWithItemsSubscriptionSubscriptionItemsItemSchema = zod_1.z.object({
|
|
997
|
+
item_price_id: zod_1.z.string().max(100),
|
|
998
|
+
quantity: zod_1.z.number().int().min(1).optional(),
|
|
999
|
+
quantity_in_decimal: zod_1.z.string().max(33).optional(),
|
|
1000
|
+
unit_price: zod_1.z.number().int().min(0).optional(),
|
|
1001
|
+
unit_price_in_decimal: zod_1.z.string().max(39).optional(),
|
|
1002
|
+
billing_cycles: zod_1.z.number().int().min(0).optional(),
|
|
1003
|
+
trial_end: zod_1.z.number().int().optional(),
|
|
1004
|
+
service_period_days: zod_1.z.number().int().min(1).max(4000).optional(),
|
|
1005
|
+
charge_on_event: zod_1.z
|
|
1006
|
+
.enum([
|
|
1007
|
+
'subscription_creation',
|
|
1008
|
+
'subscription_trial_start',
|
|
1009
|
+
'plan_activation',
|
|
1010
|
+
'subscription_activation',
|
|
1011
|
+
'contract_termination',
|
|
1012
|
+
])
|
|
1013
|
+
.optional(),
|
|
1014
|
+
charge_once: zod_1.z.boolean().optional(),
|
|
1015
|
+
item_type: zod_1.z.enum(['plan', 'addon', 'charge']).optional(),
|
|
1016
|
+
description: zod_1.z.string().max(2000).optional(),
|
|
1017
|
+
charge_on_option: zod_1.z.enum(['immediately', 'on_event']).optional(),
|
|
1018
|
+
usage_accumulation_reset_frequency: zod_1.z
|
|
1019
|
+
.enum(['never', 'subscription_billing_frequency'])
|
|
1020
|
+
.optional(),
|
|
1021
|
+
});
|
|
881
1022
|
const CreateWithItemsSubscriptionSubscriptionItemsSchema = zod_1.z.object({
|
|
882
1023
|
item_price_id: zod_1.z.array(zod_1.z.string().max(100).optional()),
|
|
883
1024
|
quantity: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
|
|
@@ -902,7 +1043,7 @@ const CreateWithItemsSubscriptionSubscriptionItemsSchema = zod_1.z.object({
|
|
|
902
1043
|
.optional(),
|
|
903
1044
|
charge_once: zod_1.z.array(zod_1.z.boolean().optional()).optional(),
|
|
904
1045
|
item_type: zod_1.z.array(zod_1.z.enum(['plan', 'addon', 'charge']).optional()).optional(),
|
|
905
|
-
description: zod_1.z.array(zod_1.z.string().max(
|
|
1046
|
+
description: zod_1.z.array(zod_1.z.string().max(2000).optional()).optional(),
|
|
906
1047
|
charge_on_option: zod_1.z
|
|
907
1048
|
.array(zod_1.z.enum(['immediately', 'on_event']).optional())
|
|
908
1049
|
.optional(),
|
|
@@ -910,6 +1051,18 @@ const CreateWithItemsSubscriptionSubscriptionItemsSchema = zod_1.z.object({
|
|
|
910
1051
|
.array(zod_1.z.enum(['never', 'subscription_billing_frequency']).optional())
|
|
911
1052
|
.optional(),
|
|
912
1053
|
});
|
|
1054
|
+
const CreateWithItemsSubscriptionDiscountsItemSchema = zod_1.z.object({
|
|
1055
|
+
apply_on: zod_1.z.enum(['invoice_amount', 'specific_item_price']).optional(),
|
|
1056
|
+
duration_type: zod_1.z.enum(['one_time', 'forever', 'limited_period']),
|
|
1057
|
+
percentage: zod_1.z.number().min(0.01).max(100).optional(),
|
|
1058
|
+
amount: zod_1.z.number().int().min(0).optional(),
|
|
1059
|
+
period: zod_1.z.number().int().min(1).optional(),
|
|
1060
|
+
period_unit: zod_1.z.enum(['day', 'week', 'month', 'year']).optional(),
|
|
1061
|
+
included_in_mrr: zod_1.z.boolean().optional(),
|
|
1062
|
+
item_price_id: zod_1.z.string().max(100).optional(),
|
|
1063
|
+
quantity: zod_1.z.number().int().min(1).optional(),
|
|
1064
|
+
description: zod_1.z.string().max(100).optional(),
|
|
1065
|
+
});
|
|
913
1066
|
const CreateWithItemsSubscriptionDiscountsSchema = zod_1.z.object({
|
|
914
1067
|
apply_on: zod_1.z
|
|
915
1068
|
.array(zod_1.z.enum(['invoice_amount', 'specific_item_price']).optional())
|
|
@@ -924,6 +1077,18 @@ const CreateWithItemsSubscriptionDiscountsSchema = zod_1.z.object({
|
|
|
924
1077
|
included_in_mrr: zod_1.z.array(zod_1.z.boolean().optional()).optional(),
|
|
925
1078
|
item_price_id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
|
|
926
1079
|
quantity: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
|
|
1080
|
+
description: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
|
|
1081
|
+
});
|
|
1082
|
+
const CreateWithItemsSubscriptionItemTiersItemSchema = zod_1.z.object({
|
|
1083
|
+
item_price_id: zod_1.z.string().max(100).optional(),
|
|
1084
|
+
starting_unit: zod_1.z.number().int().min(1).optional(),
|
|
1085
|
+
ending_unit: zod_1.z.number().int().optional(),
|
|
1086
|
+
price: zod_1.z.number().int().min(0).optional(),
|
|
1087
|
+
starting_unit_in_decimal: zod_1.z.string().max(33).optional(),
|
|
1088
|
+
ending_unit_in_decimal: zod_1.z.string().max(33).optional(),
|
|
1089
|
+
price_in_decimal: zod_1.z.string().max(39).optional(),
|
|
1090
|
+
pricing_type: zod_1.z.enum(['per_unit', 'flat_fee', 'package']).optional(),
|
|
1091
|
+
package_size: zod_1.z.number().int().min(1).optional(),
|
|
927
1092
|
});
|
|
928
1093
|
const CreateWithItemsSubscriptionItemTiersSchema = zod_1.z.object({
|
|
929
1094
|
item_price_id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
|
|
@@ -938,6 +1103,10 @@ const CreateWithItemsSubscriptionItemTiersSchema = zod_1.z.object({
|
|
|
938
1103
|
.optional(),
|
|
939
1104
|
package_size: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
|
|
940
1105
|
});
|
|
1106
|
+
const CreateWithItemsSubscriptionCouponsItemSchema = zod_1.z.object({
|
|
1107
|
+
coupon_id: zod_1.z.string().max(100).optional(),
|
|
1108
|
+
apply_till: zod_1.z.number().int().optional(),
|
|
1109
|
+
});
|
|
941
1110
|
const CreateWithItemsSubscriptionCouponsSchema = zod_1.z.object({
|
|
942
1111
|
coupon_id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
|
|
943
1112
|
apply_till: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
|
|
@@ -1007,10 +1176,30 @@ const CreateWithItemsSubscriptionBodySchema = zod_1.z.looseObject({
|
|
|
1007
1176
|
payment_intent: CreateWithItemsSubscriptionPaymentIntentSchema.optional(),
|
|
1008
1177
|
contract_term: CreateWithItemsSubscriptionContractTermSchema.optional(),
|
|
1009
1178
|
billing_override: CreateWithItemsSubscriptionBillingOverrideSchema.optional(),
|
|
1010
|
-
subscription_items:
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1179
|
+
subscription_items: zod_1.z
|
|
1180
|
+
.union([
|
|
1181
|
+
zod_1.z.array(CreateWithItemsSubscriptionSubscriptionItemsItemSchema.optional()),
|
|
1182
|
+
CreateWithItemsSubscriptionSubscriptionItemsSchema,
|
|
1183
|
+
])
|
|
1184
|
+
.optional(),
|
|
1185
|
+
discounts: zod_1.z
|
|
1186
|
+
.union([
|
|
1187
|
+
zod_1.z.array(CreateWithItemsSubscriptionDiscountsItemSchema.optional()),
|
|
1188
|
+
CreateWithItemsSubscriptionDiscountsSchema,
|
|
1189
|
+
])
|
|
1190
|
+
.optional(),
|
|
1191
|
+
item_tiers: zod_1.z
|
|
1192
|
+
.union([
|
|
1193
|
+
zod_1.z.array(CreateWithItemsSubscriptionItemTiersItemSchema.optional()),
|
|
1194
|
+
CreateWithItemsSubscriptionItemTiersSchema,
|
|
1195
|
+
])
|
|
1196
|
+
.optional(),
|
|
1197
|
+
coupons: zod_1.z
|
|
1198
|
+
.union([
|
|
1199
|
+
zod_1.z.array(CreateWithItemsSubscriptionCouponsItemSchema.optional()),
|
|
1200
|
+
CreateWithItemsSubscriptionCouponsSchema,
|
|
1201
|
+
])
|
|
1202
|
+
.optional(),
|
|
1014
1203
|
});
|
|
1015
1204
|
exports.CreateWithItemsSubscriptionBodySchema = CreateWithItemsSubscriptionBodySchema;
|
|
1016
1205
|
//Subscription.list
|
|
@@ -1018,29 +1207,69 @@ const ListSubscriptionIdSchema = zod_1.z.object({
|
|
|
1018
1207
|
is: zod_1.z.string().min(1).optional(),
|
|
1019
1208
|
is_not: zod_1.z.string().min(1).optional(),
|
|
1020
1209
|
starts_with: zod_1.z.string().min(1).optional(),
|
|
1021
|
-
in: zod_1.z
|
|
1022
|
-
|
|
1210
|
+
in: zod_1.z
|
|
1211
|
+
.union([
|
|
1212
|
+
zod_1.z.array(zod_1.z.string().optional()),
|
|
1213
|
+
zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
1214
|
+
])
|
|
1215
|
+
.optional(),
|
|
1216
|
+
not_in: zod_1.z
|
|
1217
|
+
.union([
|
|
1218
|
+
zod_1.z.array(zod_1.z.string().optional()),
|
|
1219
|
+
zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
1220
|
+
])
|
|
1221
|
+
.optional(),
|
|
1023
1222
|
});
|
|
1024
1223
|
const ListSubscriptionCustomerIdSchema = zod_1.z.object({
|
|
1025
1224
|
is: zod_1.z.string().min(1).optional(),
|
|
1026
1225
|
is_not: zod_1.z.string().min(1).optional(),
|
|
1027
1226
|
starts_with: zod_1.z.string().min(1).optional(),
|
|
1028
|
-
in: zod_1.z
|
|
1029
|
-
|
|
1227
|
+
in: zod_1.z
|
|
1228
|
+
.union([
|
|
1229
|
+
zod_1.z.array(zod_1.z.string().optional()),
|
|
1230
|
+
zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
1231
|
+
])
|
|
1232
|
+
.optional(),
|
|
1233
|
+
not_in: zod_1.z
|
|
1234
|
+
.union([
|
|
1235
|
+
zod_1.z.array(zod_1.z.string().optional()),
|
|
1236
|
+
zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
1237
|
+
])
|
|
1238
|
+
.optional(),
|
|
1030
1239
|
});
|
|
1031
1240
|
const ListSubscriptionItemIdSchema = zod_1.z.object({
|
|
1032
1241
|
is: zod_1.z.string().min(1).optional(),
|
|
1033
1242
|
is_not: zod_1.z.string().min(1).optional(),
|
|
1034
1243
|
starts_with: zod_1.z.string().min(1).optional(),
|
|
1035
|
-
in: zod_1.z
|
|
1036
|
-
|
|
1244
|
+
in: zod_1.z
|
|
1245
|
+
.union([
|
|
1246
|
+
zod_1.z.array(zod_1.z.string().optional()),
|
|
1247
|
+
zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
1248
|
+
])
|
|
1249
|
+
.optional(),
|
|
1250
|
+
not_in: zod_1.z
|
|
1251
|
+
.union([
|
|
1252
|
+
zod_1.z.array(zod_1.z.string().optional()),
|
|
1253
|
+
zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
1254
|
+
])
|
|
1255
|
+
.optional(),
|
|
1037
1256
|
});
|
|
1038
1257
|
const ListSubscriptionItemPriceIdSchema = zod_1.z.object({
|
|
1039
1258
|
is: zod_1.z.string().min(1).optional(),
|
|
1040
1259
|
is_not: zod_1.z.string().min(1).optional(),
|
|
1041
1260
|
starts_with: zod_1.z.string().min(1).optional(),
|
|
1042
|
-
in: zod_1.z
|
|
1043
|
-
|
|
1261
|
+
in: zod_1.z
|
|
1262
|
+
.union([
|
|
1263
|
+
zod_1.z.array(zod_1.z.string().optional()),
|
|
1264
|
+
zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
1265
|
+
])
|
|
1266
|
+
.optional(),
|
|
1267
|
+
not_in: zod_1.z
|
|
1268
|
+
.union([
|
|
1269
|
+
zod_1.z.array(zod_1.z.string().optional()),
|
|
1270
|
+
zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
1271
|
+
])
|
|
1272
|
+
.optional(),
|
|
1044
1273
|
});
|
|
1045
1274
|
const ListSubscriptionStatusSchema = zod_1.z.object({
|
|
1046
1275
|
is: zod_1.z
|
|
@@ -1066,25 +1295,51 @@ const ListSubscriptionStatusSchema = zod_1.z.object({
|
|
|
1066
1295
|
])
|
|
1067
1296
|
.optional(),
|
|
1068
1297
|
in: zod_1.z
|
|
1069
|
-
.
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1298
|
+
.union([
|
|
1299
|
+
zod_1.z.array(zod_1.z
|
|
1300
|
+
.enum([
|
|
1301
|
+
'future',
|
|
1302
|
+
'in_trial',
|
|
1303
|
+
'active',
|
|
1304
|
+
'non_renewing',
|
|
1305
|
+
'paused',
|
|
1306
|
+
'cancelled',
|
|
1307
|
+
'transferred',
|
|
1308
|
+
])
|
|
1309
|
+
.optional()),
|
|
1310
|
+
zod_1.z.enum([
|
|
1311
|
+
'future',
|
|
1312
|
+
'in_trial',
|
|
1313
|
+
'active',
|
|
1314
|
+
'non_renewing',
|
|
1315
|
+
'paused',
|
|
1316
|
+
'cancelled',
|
|
1317
|
+
'transferred',
|
|
1318
|
+
]),
|
|
1077
1319
|
])
|
|
1078
1320
|
.optional(),
|
|
1079
1321
|
not_in: zod_1.z
|
|
1080
|
-
.
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1322
|
+
.union([
|
|
1323
|
+
zod_1.z.array(zod_1.z
|
|
1324
|
+
.enum([
|
|
1325
|
+
'future',
|
|
1326
|
+
'in_trial',
|
|
1327
|
+
'active',
|
|
1328
|
+
'non_renewing',
|
|
1329
|
+
'paused',
|
|
1330
|
+
'cancelled',
|
|
1331
|
+
'transferred',
|
|
1332
|
+
])
|
|
1333
|
+
.optional()),
|
|
1334
|
+
zod_1.z.enum([
|
|
1335
|
+
'future',
|
|
1336
|
+
'in_trial',
|
|
1337
|
+
'active',
|
|
1338
|
+
'non_renewing',
|
|
1339
|
+
'paused',
|
|
1340
|
+
'cancelled',
|
|
1341
|
+
'transferred',
|
|
1342
|
+
]),
|
|
1088
1343
|
])
|
|
1089
1344
|
.optional(),
|
|
1090
1345
|
});
|
|
@@ -1112,79 +1367,187 @@ const ListSubscriptionCancelReasonSchema = zod_1.z.object({
|
|
|
1112
1367
|
])
|
|
1113
1368
|
.optional(),
|
|
1114
1369
|
in: zod_1.z
|
|
1115
|
-
.
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1370
|
+
.union([
|
|
1371
|
+
zod_1.z.array(zod_1.z
|
|
1372
|
+
.enum([
|
|
1373
|
+
'not_paid',
|
|
1374
|
+
'no_card',
|
|
1375
|
+
'fraud_review_failed',
|
|
1376
|
+
'non_compliant_eu_customer',
|
|
1377
|
+
'tax_calculation_failed',
|
|
1378
|
+
'currency_incompatible_with_gateway',
|
|
1379
|
+
'non_compliant_customer',
|
|
1380
|
+
])
|
|
1381
|
+
.optional()),
|
|
1382
|
+
zod_1.z.enum([
|
|
1383
|
+
'not_paid',
|
|
1384
|
+
'no_card',
|
|
1385
|
+
'fraud_review_failed',
|
|
1386
|
+
'non_compliant_eu_customer',
|
|
1387
|
+
'tax_calculation_failed',
|
|
1388
|
+
'currency_incompatible_with_gateway',
|
|
1389
|
+
'non_compliant_customer',
|
|
1390
|
+
]),
|
|
1123
1391
|
])
|
|
1124
1392
|
.optional(),
|
|
1125
1393
|
not_in: zod_1.z
|
|
1126
|
-
.
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1394
|
+
.union([
|
|
1395
|
+
zod_1.z.array(zod_1.z
|
|
1396
|
+
.enum([
|
|
1397
|
+
'not_paid',
|
|
1398
|
+
'no_card',
|
|
1399
|
+
'fraud_review_failed',
|
|
1400
|
+
'non_compliant_eu_customer',
|
|
1401
|
+
'tax_calculation_failed',
|
|
1402
|
+
'currency_incompatible_with_gateway',
|
|
1403
|
+
'non_compliant_customer',
|
|
1404
|
+
])
|
|
1405
|
+
.optional()),
|
|
1406
|
+
zod_1.z.enum([
|
|
1407
|
+
'not_paid',
|
|
1408
|
+
'no_card',
|
|
1409
|
+
'fraud_review_failed',
|
|
1410
|
+
'non_compliant_eu_customer',
|
|
1411
|
+
'tax_calculation_failed',
|
|
1412
|
+
'currency_incompatible_with_gateway',
|
|
1413
|
+
'non_compliant_customer',
|
|
1414
|
+
]),
|
|
1134
1415
|
])
|
|
1135
1416
|
.optional(),
|
|
1136
|
-
is_present: zod_1.z.enum(['true', 'false']).optional(),
|
|
1417
|
+
is_present: zod_1.z.union([zod_1.z.boolean(), zod_1.z.enum(['true', 'false'])]).optional(),
|
|
1137
1418
|
});
|
|
1138
1419
|
const ListSubscriptionCancelReasonCodeSchema = zod_1.z.object({
|
|
1139
1420
|
is: zod_1.z.string().min(1).optional(),
|
|
1140
1421
|
is_not: zod_1.z.string().min(1).optional(),
|
|
1141
1422
|
starts_with: zod_1.z.string().min(1).optional(),
|
|
1142
|
-
in: zod_1.z
|
|
1143
|
-
|
|
1423
|
+
in: zod_1.z
|
|
1424
|
+
.union([
|
|
1425
|
+
zod_1.z.array(zod_1.z.string().optional()),
|
|
1426
|
+
zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
1427
|
+
])
|
|
1428
|
+
.optional(),
|
|
1429
|
+
not_in: zod_1.z
|
|
1430
|
+
.union([
|
|
1431
|
+
zod_1.z.array(zod_1.z.string().optional()),
|
|
1432
|
+
zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
1433
|
+
])
|
|
1434
|
+
.optional(),
|
|
1144
1435
|
});
|
|
1145
1436
|
const ListSubscriptionRemainingBillingCyclesSchema = zod_1.z.object({
|
|
1146
|
-
is: zod_1.z
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1437
|
+
is: zod_1.z
|
|
1438
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
|
|
1439
|
+
.optional(),
|
|
1440
|
+
is_not: zod_1.z
|
|
1441
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
|
|
1442
|
+
.optional(),
|
|
1443
|
+
lt: zod_1.z
|
|
1444
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
|
|
1445
|
+
.optional(),
|
|
1446
|
+
lte: zod_1.z
|
|
1447
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
|
|
1448
|
+
.optional(),
|
|
1449
|
+
gt: zod_1.z
|
|
1450
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
|
|
1451
|
+
.optional(),
|
|
1452
|
+
gte: zod_1.z
|
|
1453
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
|
|
1454
|
+
.optional(),
|
|
1455
|
+
between: zod_1.z
|
|
1456
|
+
.union([
|
|
1457
|
+
zod_1.z.array(zod_1.z.number().int().optional()).min(2).max(2),
|
|
1458
|
+
zod_1.z.string().regex(RegExp('^\\[-?\\d+,-?\\d+\\]$')),
|
|
1459
|
+
])
|
|
1460
|
+
.optional(),
|
|
1461
|
+
is_present: zod_1.z.union([zod_1.z.boolean(), zod_1.z.enum(['true', 'false'])]).optional(),
|
|
1154
1462
|
});
|
|
1155
1463
|
const ListSubscriptionCreatedAtSchema = zod_1.z.object({
|
|
1156
|
-
after: zod_1.z
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1464
|
+
after: zod_1.z
|
|
1465
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
|
|
1466
|
+
.optional(),
|
|
1467
|
+
before: zod_1.z
|
|
1468
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
|
|
1469
|
+
.optional(),
|
|
1470
|
+
on: zod_1.z
|
|
1471
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
|
|
1472
|
+
.optional(),
|
|
1473
|
+
between: zod_1.z
|
|
1474
|
+
.union([
|
|
1475
|
+
zod_1.z.array(zod_1.z.number().int().optional()).min(2).max(2),
|
|
1476
|
+
zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')),
|
|
1477
|
+
])
|
|
1478
|
+
.optional(),
|
|
1160
1479
|
});
|
|
1161
1480
|
const ListSubscriptionActivatedAtSchema = zod_1.z.object({
|
|
1162
|
-
after: zod_1.z
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1481
|
+
after: zod_1.z
|
|
1482
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
|
|
1483
|
+
.optional(),
|
|
1484
|
+
before: zod_1.z
|
|
1485
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
|
|
1486
|
+
.optional(),
|
|
1487
|
+
on: zod_1.z
|
|
1488
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
|
|
1489
|
+
.optional(),
|
|
1490
|
+
between: zod_1.z
|
|
1491
|
+
.union([
|
|
1492
|
+
zod_1.z.array(zod_1.z.number().int().optional()).min(2).max(2),
|
|
1493
|
+
zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')),
|
|
1494
|
+
])
|
|
1495
|
+
.optional(),
|
|
1496
|
+
is_present: zod_1.z.union([zod_1.z.boolean(), zod_1.z.enum(['true', 'false'])]).optional(),
|
|
1167
1497
|
});
|
|
1168
1498
|
const ListSubscriptionNextBillingAtSchema = zod_1.z.object({
|
|
1169
|
-
after: zod_1.z
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1499
|
+
after: zod_1.z
|
|
1500
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
|
|
1501
|
+
.optional(),
|
|
1502
|
+
before: zod_1.z
|
|
1503
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
|
|
1504
|
+
.optional(),
|
|
1505
|
+
on: zod_1.z
|
|
1506
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
|
|
1507
|
+
.optional(),
|
|
1508
|
+
between: zod_1.z
|
|
1509
|
+
.union([
|
|
1510
|
+
zod_1.z.array(zod_1.z.number().int().optional()).min(2).max(2),
|
|
1511
|
+
zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')),
|
|
1512
|
+
])
|
|
1513
|
+
.optional(),
|
|
1173
1514
|
});
|
|
1174
1515
|
const ListSubscriptionCancelledAtSchema = zod_1.z.object({
|
|
1175
|
-
after: zod_1.z
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1516
|
+
after: zod_1.z
|
|
1517
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
|
|
1518
|
+
.optional(),
|
|
1519
|
+
before: zod_1.z
|
|
1520
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
|
|
1521
|
+
.optional(),
|
|
1522
|
+
on: zod_1.z
|
|
1523
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
|
|
1524
|
+
.optional(),
|
|
1525
|
+
between: zod_1.z
|
|
1526
|
+
.union([
|
|
1527
|
+
zod_1.z.array(zod_1.z.number().int().optional()).min(2).max(2),
|
|
1528
|
+
zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')),
|
|
1529
|
+
])
|
|
1530
|
+
.optional(),
|
|
1179
1531
|
});
|
|
1180
1532
|
const ListSubscriptionHasScheduledChangesSchema = zod_1.z.object({
|
|
1181
|
-
is: zod_1.z.enum(['true', 'false']).optional(),
|
|
1533
|
+
is: zod_1.z.union([zod_1.z.boolean(), zod_1.z.enum(['true', 'false'])]).optional(),
|
|
1182
1534
|
});
|
|
1183
1535
|
const ListSubscriptionUpdatedAtSchema = zod_1.z.object({
|
|
1184
|
-
after: zod_1.z
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1536
|
+
after: zod_1.z
|
|
1537
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
|
|
1538
|
+
.optional(),
|
|
1539
|
+
before: zod_1.z
|
|
1540
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
|
|
1541
|
+
.optional(),
|
|
1542
|
+
on: zod_1.z
|
|
1543
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
|
|
1544
|
+
.optional(),
|
|
1545
|
+
between: zod_1.z
|
|
1546
|
+
.union([
|
|
1547
|
+
zod_1.z.array(zod_1.z.number().int().optional()).min(2).max(2),
|
|
1548
|
+
zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')),
|
|
1549
|
+
])
|
|
1550
|
+
.optional(),
|
|
1188
1551
|
});
|
|
1189
1552
|
const ListSubscriptionOfflinePaymentMethodSchema = zod_1.z.object({
|
|
1190
1553
|
is: zod_1.z
|
|
@@ -1222,45 +1585,83 @@ const ListSubscriptionOfflinePaymentMethodSchema = zod_1.z.object({
|
|
|
1222
1585
|
])
|
|
1223
1586
|
.optional(),
|
|
1224
1587
|
in: zod_1.z
|
|
1225
|
-
.
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1588
|
+
.union([
|
|
1589
|
+
zod_1.z.array(zod_1.z
|
|
1590
|
+
.enum([
|
|
1591
|
+
'no_preference',
|
|
1592
|
+
'cash',
|
|
1593
|
+
'check',
|
|
1594
|
+
'bank_transfer',
|
|
1595
|
+
'ach_credit',
|
|
1596
|
+
'sepa_credit',
|
|
1597
|
+
'boleto',
|
|
1598
|
+
'us_automated_bank_transfer',
|
|
1599
|
+
'eu_automated_bank_transfer',
|
|
1600
|
+
'uk_automated_bank_transfer',
|
|
1601
|
+
'jp_automated_bank_transfer',
|
|
1602
|
+
'mx_automated_bank_transfer',
|
|
1603
|
+
'custom',
|
|
1604
|
+
])
|
|
1605
|
+
.optional()),
|
|
1606
|
+
zod_1.z.enum([
|
|
1607
|
+
'no_preference',
|
|
1608
|
+
'cash',
|
|
1609
|
+
'check',
|
|
1610
|
+
'bank_transfer',
|
|
1611
|
+
'ach_credit',
|
|
1612
|
+
'sepa_credit',
|
|
1613
|
+
'boleto',
|
|
1614
|
+
'us_automated_bank_transfer',
|
|
1615
|
+
'eu_automated_bank_transfer',
|
|
1616
|
+
'uk_automated_bank_transfer',
|
|
1617
|
+
'jp_automated_bank_transfer',
|
|
1618
|
+
'mx_automated_bank_transfer',
|
|
1619
|
+
'custom',
|
|
1620
|
+
]),
|
|
1239
1621
|
])
|
|
1240
1622
|
.optional(),
|
|
1241
1623
|
not_in: zod_1.z
|
|
1242
|
-
.
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1624
|
+
.union([
|
|
1625
|
+
zod_1.z.array(zod_1.z
|
|
1626
|
+
.enum([
|
|
1627
|
+
'no_preference',
|
|
1628
|
+
'cash',
|
|
1629
|
+
'check',
|
|
1630
|
+
'bank_transfer',
|
|
1631
|
+
'ach_credit',
|
|
1632
|
+
'sepa_credit',
|
|
1633
|
+
'boleto',
|
|
1634
|
+
'us_automated_bank_transfer',
|
|
1635
|
+
'eu_automated_bank_transfer',
|
|
1636
|
+
'uk_automated_bank_transfer',
|
|
1637
|
+
'jp_automated_bank_transfer',
|
|
1638
|
+
'mx_automated_bank_transfer',
|
|
1639
|
+
'custom',
|
|
1640
|
+
])
|
|
1641
|
+
.optional()),
|
|
1642
|
+
zod_1.z.enum([
|
|
1643
|
+
'no_preference',
|
|
1644
|
+
'cash',
|
|
1645
|
+
'check',
|
|
1646
|
+
'bank_transfer',
|
|
1647
|
+
'ach_credit',
|
|
1648
|
+
'sepa_credit',
|
|
1649
|
+
'boleto',
|
|
1650
|
+
'us_automated_bank_transfer',
|
|
1651
|
+
'eu_automated_bank_transfer',
|
|
1652
|
+
'uk_automated_bank_transfer',
|
|
1653
|
+
'jp_automated_bank_transfer',
|
|
1654
|
+
'mx_automated_bank_transfer',
|
|
1655
|
+
'custom',
|
|
1656
|
+
]),
|
|
1256
1657
|
])
|
|
1257
1658
|
.optional(),
|
|
1258
1659
|
});
|
|
1259
1660
|
const ListSubscriptionAutoCloseInvoicesSchema = zod_1.z.object({
|
|
1260
|
-
is: zod_1.z.enum(['true', 'false']).optional(),
|
|
1661
|
+
is: zod_1.z.union([zod_1.z.boolean(), zod_1.z.enum(['true', 'false'])]).optional(),
|
|
1261
1662
|
});
|
|
1262
1663
|
const ListSubscriptionOverrideRelationshipSchema = zod_1.z.object({
|
|
1263
|
-
is: zod_1.z.enum(['true', 'false']).optional(),
|
|
1664
|
+
is: zod_1.z.union([zod_1.z.boolean(), zod_1.z.enum(['true', 'false'])]).optional(),
|
|
1264
1665
|
});
|
|
1265
1666
|
const ListSubscriptionSortBySchema = zod_1.z.looseObject({
|
|
1266
1667
|
asc: zod_1.z.enum(['created_at', 'updated_at']).optional(),
|
|
@@ -1272,18 +1673,38 @@ const ListSubscriptionBusinessEntityIdSchema = zod_1.z.object({
|
|
|
1272
1673
|
const ListSubscriptionChannelSchema = zod_1.z.object({
|
|
1273
1674
|
is: zod_1.z.enum(['web', 'app_store', 'play_store']).optional(),
|
|
1274
1675
|
is_not: zod_1.z.enum(['web', 'app_store', 'play_store']).optional(),
|
|
1275
|
-
in: zod_1.z
|
|
1276
|
-
|
|
1676
|
+
in: zod_1.z
|
|
1677
|
+
.union([
|
|
1678
|
+
zod_1.z.array(zod_1.z.enum(['web', 'app_store', 'play_store']).optional()),
|
|
1679
|
+
zod_1.z.enum(['web', 'app_store', 'play_store']),
|
|
1680
|
+
])
|
|
1681
|
+
.optional(),
|
|
1682
|
+
not_in: zod_1.z
|
|
1683
|
+
.union([
|
|
1684
|
+
zod_1.z.array(zod_1.z.enum(['web', 'app_store', 'play_store']).optional()),
|
|
1685
|
+
zod_1.z.enum(['web', 'app_store', 'play_store']),
|
|
1686
|
+
])
|
|
1687
|
+
.optional(),
|
|
1277
1688
|
});
|
|
1278
1689
|
const ListSubscriptionDecommissionedSchema = zod_1.z.object({
|
|
1279
|
-
is: zod_1.z.enum(['true', 'false']).optional(),
|
|
1690
|
+
is: zod_1.z.union([zod_1.z.boolean(), zod_1.z.enum(['true', 'false'])]).optional(),
|
|
1280
1691
|
});
|
|
1281
1692
|
const ListSubscriptionPlanIdSchema = zod_1.z.object({
|
|
1282
1693
|
is: zod_1.z.string().min(1).optional(),
|
|
1283
1694
|
is_not: zod_1.z.string().min(1).optional(),
|
|
1284
1695
|
starts_with: zod_1.z.string().min(1).optional(),
|
|
1285
|
-
in: zod_1.z
|
|
1286
|
-
|
|
1696
|
+
in: zod_1.z
|
|
1697
|
+
.union([
|
|
1698
|
+
zod_1.z.array(zod_1.z.string().optional()),
|
|
1699
|
+
zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
1700
|
+
])
|
|
1701
|
+
.optional(),
|
|
1702
|
+
not_in: zod_1.z
|
|
1703
|
+
.union([
|
|
1704
|
+
zod_1.z.array(zod_1.z.string().optional()),
|
|
1705
|
+
zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
1706
|
+
])
|
|
1707
|
+
.optional(),
|
|
1287
1708
|
});
|
|
1288
1709
|
const ListSubscriptionBodySchema = zod_1.z.looseObject({
|
|
1289
1710
|
limit: zod_1.z.number().int().min(1).max(100).optional(),
|
|
@@ -1720,6 +2141,16 @@ const UpdateSubscriptionContractTermSchema = zod_1.z.object({
|
|
|
1720
2141
|
.optional(),
|
|
1721
2142
|
cancellation_cutoff_period: zod_1.z.number().int().optional(),
|
|
1722
2143
|
});
|
|
2144
|
+
const UpdateSubscriptionAddonsItemSchema = zod_1.z.object({
|
|
2145
|
+
id: zod_1.z.string().max(100).optional(),
|
|
2146
|
+
quantity: zod_1.z.number().int().min(1).optional(),
|
|
2147
|
+
unit_price: zod_1.z.number().int().min(0).optional(),
|
|
2148
|
+
billing_cycles: zod_1.z.number().int().min(0).optional(),
|
|
2149
|
+
quantity_in_decimal: zod_1.z.string().max(33).optional(),
|
|
2150
|
+
unit_price_in_decimal: zod_1.z.string().max(39).optional(),
|
|
2151
|
+
trial_end: zod_1.z.number().int().optional(),
|
|
2152
|
+
proration_type: zod_1.z.enum(['full_term', 'partial_term', 'none']).optional(),
|
|
2153
|
+
});
|
|
1723
2154
|
const UpdateSubscriptionAddonsSchema = zod_1.z.object({
|
|
1724
2155
|
id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
|
|
1725
2156
|
quantity: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
|
|
@@ -1732,6 +2163,25 @@ const UpdateSubscriptionAddonsSchema = zod_1.z.object({
|
|
|
1732
2163
|
.array(zod_1.z.enum(['full_term', 'partial_term', 'none']).optional())
|
|
1733
2164
|
.optional(),
|
|
1734
2165
|
});
|
|
2166
|
+
const UpdateSubscriptionEventBasedAddonsItemSchema = zod_1.z.object({
|
|
2167
|
+
id: zod_1.z.string().max(100).optional(),
|
|
2168
|
+
quantity: zod_1.z.number().int().min(1).optional(),
|
|
2169
|
+
unit_price: zod_1.z.number().int().min(0).optional(),
|
|
2170
|
+
service_period_in_days: zod_1.z.number().int().min(1).max(4000).optional(),
|
|
2171
|
+
charge_on: zod_1.z.enum(['immediately', 'on_event']).optional(),
|
|
2172
|
+
on_event: zod_1.z
|
|
2173
|
+
.enum([
|
|
2174
|
+
'subscription_creation',
|
|
2175
|
+
'subscription_trial_start',
|
|
2176
|
+
'plan_activation',
|
|
2177
|
+
'subscription_activation',
|
|
2178
|
+
'contract_termination',
|
|
2179
|
+
])
|
|
2180
|
+
.optional(),
|
|
2181
|
+
charge_once: zod_1.z.boolean().default(true).optional(),
|
|
2182
|
+
quantity_in_decimal: zod_1.z.string().max(33).optional(),
|
|
2183
|
+
unit_price_in_decimal: zod_1.z.string().max(39).optional(),
|
|
2184
|
+
});
|
|
1735
2185
|
const UpdateSubscriptionEventBasedAddonsSchema = zod_1.z.object({
|
|
1736
2186
|
id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
|
|
1737
2187
|
quantity: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
|
|
@@ -1755,6 +2205,10 @@ const UpdateSubscriptionEventBasedAddonsSchema = zod_1.z.object({
|
|
|
1755
2205
|
quantity_in_decimal: zod_1.z.array(zod_1.z.string().max(33).optional()).optional(),
|
|
1756
2206
|
unit_price_in_decimal: zod_1.z.array(zod_1.z.string().max(39).optional()).optional(),
|
|
1757
2207
|
});
|
|
2208
|
+
const UpdateSubscriptionCouponsItemSchema = zod_1.z.object({
|
|
2209
|
+
coupon_id: zod_1.z.string().max(100).optional(),
|
|
2210
|
+
apply_till: zod_1.z.number().int().optional(),
|
|
2211
|
+
});
|
|
1758
2212
|
const UpdateSubscriptionCouponsSchema = zod_1.z.object({
|
|
1759
2213
|
coupon_id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
|
|
1760
2214
|
apply_till: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
|
|
@@ -1836,9 +2290,24 @@ const UpdateSubscriptionBodySchema = zod_1.z.looseObject({
|
|
|
1836
2290
|
statement_descriptor: UpdateSubscriptionStatementDescriptorSchema.optional(),
|
|
1837
2291
|
customer: UpdateSubscriptionCustomerSchema.optional(),
|
|
1838
2292
|
contract_term: UpdateSubscriptionContractTermSchema.optional(),
|
|
1839
|
-
addons:
|
|
1840
|
-
|
|
1841
|
-
|
|
2293
|
+
addons: zod_1.z
|
|
2294
|
+
.union([
|
|
2295
|
+
zod_1.z.array(UpdateSubscriptionAddonsItemSchema.optional()),
|
|
2296
|
+
UpdateSubscriptionAddonsSchema,
|
|
2297
|
+
])
|
|
2298
|
+
.optional(),
|
|
2299
|
+
event_based_addons: zod_1.z
|
|
2300
|
+
.union([
|
|
2301
|
+
zod_1.z.array(UpdateSubscriptionEventBasedAddonsItemSchema.optional()),
|
|
2302
|
+
UpdateSubscriptionEventBasedAddonsSchema,
|
|
2303
|
+
])
|
|
2304
|
+
.optional(),
|
|
2305
|
+
coupons: zod_1.z
|
|
2306
|
+
.union([
|
|
2307
|
+
zod_1.z.array(UpdateSubscriptionCouponsItemSchema.optional()),
|
|
2308
|
+
UpdateSubscriptionCouponsSchema,
|
|
2309
|
+
])
|
|
2310
|
+
.optional(),
|
|
1842
2311
|
});
|
|
1843
2312
|
exports.UpdateSubscriptionBodySchema = UpdateSubscriptionBodySchema;
|
|
1844
2313
|
//Subscription.updateForItems
|
|
@@ -2209,6 +2678,33 @@ const UpdateForItemsSubscriptionBillingOverrideSchema = zod_1.z.object({
|
|
|
2209
2678
|
max_excess_payment_usage: zod_1.z.number().int().min(-1).optional(),
|
|
2210
2679
|
max_refundable_credits_usage: zod_1.z.number().int().min(-1).optional(),
|
|
2211
2680
|
});
|
|
2681
|
+
const UpdateForItemsSubscriptionSubscriptionItemsItemSchema = zod_1.z.object({
|
|
2682
|
+
item_price_id: zod_1.z.string().max(100),
|
|
2683
|
+
quantity: zod_1.z.number().int().min(1).optional(),
|
|
2684
|
+
quantity_in_decimal: zod_1.z.string().max(33).optional(),
|
|
2685
|
+
unit_price: zod_1.z.number().int().min(0).optional(),
|
|
2686
|
+
unit_price_in_decimal: zod_1.z.string().max(39).optional(),
|
|
2687
|
+
billing_cycles: zod_1.z.number().int().min(0).optional(),
|
|
2688
|
+
trial_end: zod_1.z.number().int().optional(),
|
|
2689
|
+
service_period_days: zod_1.z.number().int().min(1).max(4000).optional(),
|
|
2690
|
+
charge_on_event: zod_1.z
|
|
2691
|
+
.enum([
|
|
2692
|
+
'subscription_creation',
|
|
2693
|
+
'subscription_trial_start',
|
|
2694
|
+
'plan_activation',
|
|
2695
|
+
'subscription_activation',
|
|
2696
|
+
'contract_termination',
|
|
2697
|
+
])
|
|
2698
|
+
.optional(),
|
|
2699
|
+
charge_once: zod_1.z.boolean().optional(),
|
|
2700
|
+
charge_on_option: zod_1.z.enum(['immediately', 'on_event']).optional(),
|
|
2701
|
+
item_type: zod_1.z.enum(['plan', 'addon', 'charge']).optional(),
|
|
2702
|
+
description: zod_1.z.string().max(2000).optional(),
|
|
2703
|
+
proration_type: zod_1.z.enum(['full_term', 'partial_term', 'none']).optional(),
|
|
2704
|
+
usage_accumulation_reset_frequency: zod_1.z
|
|
2705
|
+
.enum(['never', 'subscription_billing_frequency'])
|
|
2706
|
+
.optional(),
|
|
2707
|
+
});
|
|
2212
2708
|
const UpdateForItemsSubscriptionSubscriptionItemsSchema = zod_1.z.object({
|
|
2213
2709
|
item_price_id: zod_1.z.array(zod_1.z.string().max(100).optional()),
|
|
2214
2710
|
quantity: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
|
|
@@ -2236,7 +2732,7 @@ const UpdateForItemsSubscriptionSubscriptionItemsSchema = zod_1.z.object({
|
|
|
2236
2732
|
.array(zod_1.z.enum(['immediately', 'on_event']).optional())
|
|
2237
2733
|
.optional(),
|
|
2238
2734
|
item_type: zod_1.z.array(zod_1.z.enum(['plan', 'addon', 'charge']).optional()).optional(),
|
|
2239
|
-
description: zod_1.z.array(zod_1.z.string().max(
|
|
2735
|
+
description: zod_1.z.array(zod_1.z.string().max(2000).optional()).optional(),
|
|
2240
2736
|
proration_type: zod_1.z
|
|
2241
2737
|
.array(zod_1.z.enum(['full_term', 'partial_term', 'none']).optional())
|
|
2242
2738
|
.optional(),
|
|
@@ -2244,6 +2740,20 @@ const UpdateForItemsSubscriptionSubscriptionItemsSchema = zod_1.z.object({
|
|
|
2244
2740
|
.array(zod_1.z.enum(['never', 'subscription_billing_frequency']).optional())
|
|
2245
2741
|
.optional(),
|
|
2246
2742
|
});
|
|
2743
|
+
const UpdateForItemsSubscriptionDiscountsItemSchema = zod_1.z.object({
|
|
2744
|
+
apply_on: zod_1.z.enum(['invoice_amount', 'specific_item_price']).optional(),
|
|
2745
|
+
duration_type: zod_1.z.enum(['one_time', 'forever', 'limited_period']),
|
|
2746
|
+
percentage: zod_1.z.number().min(0.01).max(100).optional(),
|
|
2747
|
+
amount: zod_1.z.number().int().min(0).optional(),
|
|
2748
|
+
period: zod_1.z.number().int().min(1).optional(),
|
|
2749
|
+
period_unit: zod_1.z.enum(['day', 'week', 'month', 'year']).optional(),
|
|
2750
|
+
included_in_mrr: zod_1.z.boolean().optional(),
|
|
2751
|
+
item_price_id: zod_1.z.string().max(100).optional(),
|
|
2752
|
+
quantity: zod_1.z.number().int().min(1).optional(),
|
|
2753
|
+
operation_type: zod_1.z.enum(['add', 'remove']),
|
|
2754
|
+
id: zod_1.z.string().max(50).optional(),
|
|
2755
|
+
description: zod_1.z.string().max(100).optional(),
|
|
2756
|
+
});
|
|
2247
2757
|
const UpdateForItemsSubscriptionDiscountsSchema = zod_1.z.object({
|
|
2248
2758
|
apply_on: zod_1.z
|
|
2249
2759
|
.array(zod_1.z.enum(['invoice_amount', 'specific_item_price']).optional())
|
|
@@ -2260,6 +2770,18 @@ const UpdateForItemsSubscriptionDiscountsSchema = zod_1.z.object({
|
|
|
2260
2770
|
quantity: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
|
|
2261
2771
|
operation_type: zod_1.z.array(zod_1.z.enum(['add', 'remove']).optional()),
|
|
2262
2772
|
id: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
|
|
2773
|
+
description: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
|
|
2774
|
+
});
|
|
2775
|
+
const UpdateForItemsSubscriptionItemTiersItemSchema = zod_1.z.object({
|
|
2776
|
+
item_price_id: zod_1.z.string().max(100).optional(),
|
|
2777
|
+
starting_unit: zod_1.z.number().int().min(1).optional(),
|
|
2778
|
+
ending_unit: zod_1.z.number().int().optional(),
|
|
2779
|
+
price: zod_1.z.number().int().min(0).optional(),
|
|
2780
|
+
starting_unit_in_decimal: zod_1.z.string().max(33).optional(),
|
|
2781
|
+
ending_unit_in_decimal: zod_1.z.string().max(33).optional(),
|
|
2782
|
+
price_in_decimal: zod_1.z.string().max(39).optional(),
|
|
2783
|
+
pricing_type: zod_1.z.enum(['per_unit', 'flat_fee', 'package']).optional(),
|
|
2784
|
+
package_size: zod_1.z.number().int().min(1).optional(),
|
|
2263
2785
|
});
|
|
2264
2786
|
const UpdateForItemsSubscriptionItemTiersSchema = zod_1.z.object({
|
|
2265
2787
|
item_price_id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
|
|
@@ -2274,6 +2796,10 @@ const UpdateForItemsSubscriptionItemTiersSchema = zod_1.z.object({
|
|
|
2274
2796
|
.optional(),
|
|
2275
2797
|
package_size: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
|
|
2276
2798
|
});
|
|
2799
|
+
const UpdateForItemsSubscriptionCouponsItemSchema = zod_1.z.object({
|
|
2800
|
+
coupon_id: zod_1.z.string().max(100).optional(),
|
|
2801
|
+
apply_till: zod_1.z.number().int().optional(),
|
|
2802
|
+
});
|
|
2277
2803
|
const UpdateForItemsSubscriptionCouponsSchema = zod_1.z.object({
|
|
2278
2804
|
coupon_id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
|
|
2279
2805
|
apply_till: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
|
|
@@ -2354,10 +2880,30 @@ const UpdateForItemsSubscriptionBodySchema = zod_1.z.looseObject({
|
|
|
2354
2880
|
customer: UpdateForItemsSubscriptionCustomerSchema.optional(),
|
|
2355
2881
|
contract_term: UpdateForItemsSubscriptionContractTermSchema.optional(),
|
|
2356
2882
|
billing_override: UpdateForItemsSubscriptionBillingOverrideSchema.optional(),
|
|
2357
|
-
subscription_items:
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2883
|
+
subscription_items: zod_1.z
|
|
2884
|
+
.union([
|
|
2885
|
+
zod_1.z.array(UpdateForItemsSubscriptionSubscriptionItemsItemSchema.optional()),
|
|
2886
|
+
UpdateForItemsSubscriptionSubscriptionItemsSchema,
|
|
2887
|
+
])
|
|
2888
|
+
.optional(),
|
|
2889
|
+
discounts: zod_1.z
|
|
2890
|
+
.union([
|
|
2891
|
+
zod_1.z.array(UpdateForItemsSubscriptionDiscountsItemSchema.optional()),
|
|
2892
|
+
UpdateForItemsSubscriptionDiscountsSchema,
|
|
2893
|
+
])
|
|
2894
|
+
.optional(),
|
|
2895
|
+
item_tiers: zod_1.z
|
|
2896
|
+
.union([
|
|
2897
|
+
zod_1.z.array(UpdateForItemsSubscriptionItemTiersItemSchema.optional()),
|
|
2898
|
+
UpdateForItemsSubscriptionItemTiersSchema,
|
|
2899
|
+
])
|
|
2900
|
+
.optional(),
|
|
2901
|
+
coupons: zod_1.z
|
|
2902
|
+
.union([
|
|
2903
|
+
zod_1.z.array(UpdateForItemsSubscriptionCouponsItemSchema.optional()),
|
|
2904
|
+
UpdateForItemsSubscriptionCouponsSchema,
|
|
2905
|
+
])
|
|
2906
|
+
.optional(),
|
|
2361
2907
|
});
|
|
2362
2908
|
exports.UpdateForItemsSubscriptionBodySchema = UpdateForItemsSubscriptionBodySchema;
|
|
2363
2909
|
//Subscription.changeTermEnd
|
|
@@ -2508,6 +3054,10 @@ const ChargeFutureRenewalsSubscriptionFixedIntervalScheduleSchema = zod_1.z.obje
|
|
|
2508
3054
|
.optional(),
|
|
2509
3055
|
end_date: zod_1.z.number().int().optional(),
|
|
2510
3056
|
});
|
|
3057
|
+
const ChargeFutureRenewalsSubscriptionSpecificDatesScheduleItemSchema = zod_1.z.object({
|
|
3058
|
+
terms_to_charge: zod_1.z.number().int().optional(),
|
|
3059
|
+
date: zod_1.z.number().int().optional(),
|
|
3060
|
+
});
|
|
2511
3061
|
const ChargeFutureRenewalsSubscriptionSpecificDatesScheduleSchema = zod_1.z.object({
|
|
2512
3062
|
terms_to_charge: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
|
|
2513
3063
|
date: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
|
|
@@ -2519,7 +3069,12 @@ const ChargeFutureRenewalsSubscriptionBodySchema = zod_1.z.looseObject({
|
|
|
2519
3069
|
.enum(['immediate', 'specific_dates', 'fixed_intervals'])
|
|
2520
3070
|
.optional(),
|
|
2521
3071
|
fixed_interval_schedule: ChargeFutureRenewalsSubscriptionFixedIntervalScheduleSchema.optional(),
|
|
2522
|
-
specific_dates_schedule:
|
|
3072
|
+
specific_dates_schedule: zod_1.z
|
|
3073
|
+
.union([
|
|
3074
|
+
zod_1.z.array(ChargeFutureRenewalsSubscriptionSpecificDatesScheduleItemSchema.optional()),
|
|
3075
|
+
ChargeFutureRenewalsSubscriptionSpecificDatesScheduleSchema,
|
|
3076
|
+
])
|
|
3077
|
+
.optional(),
|
|
2523
3078
|
});
|
|
2524
3079
|
exports.ChargeFutureRenewalsSubscriptionBodySchema = ChargeFutureRenewalsSubscriptionBodySchema;
|
|
2525
3080
|
//Subscription.editAdvanceInvoiceSchedule
|
|
@@ -2531,6 +3086,11 @@ const EditAdvanceInvoiceScheduleSubscriptionFixedIntervalScheduleSchema = zod_1.
|
|
|
2531
3086
|
.optional(),
|
|
2532
3087
|
end_date: zod_1.z.number().int().optional(),
|
|
2533
3088
|
});
|
|
3089
|
+
const EditAdvanceInvoiceScheduleSubscriptionSpecificDatesScheduleItemSchema = zod_1.z.object({
|
|
3090
|
+
id: zod_1.z.string().max(50).optional(),
|
|
3091
|
+
terms_to_charge: zod_1.z.number().int().optional(),
|
|
3092
|
+
date: zod_1.z.number().int().optional(),
|
|
3093
|
+
});
|
|
2534
3094
|
const EditAdvanceInvoiceScheduleSubscriptionSpecificDatesScheduleSchema = zod_1.z.object({
|
|
2535
3095
|
id: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
|
|
2536
3096
|
terms_to_charge: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
|
|
@@ -2540,15 +3100,28 @@ const EditAdvanceInvoiceScheduleSubscriptionBodySchema = zod_1.z.looseObject({
|
|
|
2540
3100
|
terms_to_charge: zod_1.z.number().int().min(1).optional(),
|
|
2541
3101
|
schedule_type: zod_1.z.enum(['specific_dates', 'fixed_intervals']).optional(),
|
|
2542
3102
|
fixed_interval_schedule: EditAdvanceInvoiceScheduleSubscriptionFixedIntervalScheduleSchema.optional(),
|
|
2543
|
-
specific_dates_schedule:
|
|
3103
|
+
specific_dates_schedule: zod_1.z
|
|
3104
|
+
.union([
|
|
3105
|
+
zod_1.z.array(EditAdvanceInvoiceScheduleSubscriptionSpecificDatesScheduleItemSchema.optional()),
|
|
3106
|
+
EditAdvanceInvoiceScheduleSubscriptionSpecificDatesScheduleSchema,
|
|
3107
|
+
])
|
|
3108
|
+
.optional(),
|
|
2544
3109
|
});
|
|
2545
3110
|
exports.EditAdvanceInvoiceScheduleSubscriptionBodySchema = EditAdvanceInvoiceScheduleSubscriptionBodySchema;
|
|
2546
3111
|
//Subscription.removeAdvanceInvoiceSchedule
|
|
3112
|
+
const RemoveAdvanceInvoiceScheduleSubscriptionSpecificDatesScheduleItemSchema = zod_1.z.object({
|
|
3113
|
+
id: zod_1.z.string().max(50).optional(),
|
|
3114
|
+
});
|
|
2547
3115
|
const RemoveAdvanceInvoiceScheduleSubscriptionSpecificDatesScheduleSchema = zod_1.z.object({
|
|
2548
3116
|
id: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
|
|
2549
3117
|
});
|
|
2550
3118
|
const RemoveAdvanceInvoiceScheduleSubscriptionBodySchema = zod_1.z.looseObject({
|
|
2551
|
-
specific_dates_schedule:
|
|
3119
|
+
specific_dates_schedule: zod_1.z
|
|
3120
|
+
.union([
|
|
3121
|
+
zod_1.z.array(RemoveAdvanceInvoiceScheduleSubscriptionSpecificDatesScheduleItemSchema.optional()),
|
|
3122
|
+
RemoveAdvanceInvoiceScheduleSubscriptionSpecificDatesScheduleSchema,
|
|
3123
|
+
])
|
|
3124
|
+
.optional(),
|
|
2552
3125
|
});
|
|
2553
3126
|
exports.RemoveAdvanceInvoiceScheduleSubscriptionBodySchema = RemoveAdvanceInvoiceScheduleSubscriptionBodySchema;
|
|
2554
3127
|
//Subscription.regenerateInvoice
|
|
@@ -2892,17 +3465,19 @@ const ImportSubscriptionSubscriptionTransactionSchema = zod_1.z.object({
|
|
|
2892
3465
|
'app_store',
|
|
2893
3466
|
'play_store',
|
|
2894
3467
|
'custom',
|
|
2895
|
-
'tamara',
|
|
2896
|
-
'qpay',
|
|
2897
|
-
'blik',
|
|
2898
|
-
'fpx',
|
|
2899
|
-
'wero',
|
|
2900
|
-
'p24',
|
|
2901
3468
|
])
|
|
2902
3469
|
.optional(),
|
|
2903
3470
|
reference_number: zod_1.z.string().max(100).optional(),
|
|
2904
3471
|
date: zod_1.z.number().int().optional(),
|
|
2905
3472
|
});
|
|
3473
|
+
const ImportSubscriptionSubscriptionAddonsItemSchema = zod_1.z.object({
|
|
3474
|
+
id: zod_1.z.string().max(100).optional(),
|
|
3475
|
+
quantity: zod_1.z.number().int().min(1).optional(),
|
|
3476
|
+
quantity_in_decimal: zod_1.z.string().max(33).optional(),
|
|
3477
|
+
unit_price: zod_1.z.number().int().min(0).optional(),
|
|
3478
|
+
unit_price_in_decimal: zod_1.z.string().max(39).optional(),
|
|
3479
|
+
billing_cycles: zod_1.z.number().int().min(0).optional(),
|
|
3480
|
+
});
|
|
2906
3481
|
const ImportSubscriptionSubscriptionAddonsSchema = zod_1.z.object({
|
|
2907
3482
|
id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
|
|
2908
3483
|
quantity: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
|
|
@@ -2911,6 +3486,24 @@ const ImportSubscriptionSubscriptionAddonsSchema = zod_1.z.object({
|
|
|
2911
3486
|
unit_price_in_decimal: zod_1.z.array(zod_1.z.string().max(39).optional()).optional(),
|
|
2912
3487
|
billing_cycles: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
|
|
2913
3488
|
});
|
|
3489
|
+
const ImportSubscriptionSubscriptionEventBasedAddonsItemSchema = zod_1.z.object({
|
|
3490
|
+
id: zod_1.z.string().max(100).optional(),
|
|
3491
|
+
quantity: zod_1.z.number().int().min(1).optional(),
|
|
3492
|
+
unit_price: zod_1.z.number().int().min(0).optional(),
|
|
3493
|
+
quantity_in_decimal: zod_1.z.string().max(33).optional(),
|
|
3494
|
+
unit_price_in_decimal: zod_1.z.string().max(39).optional(),
|
|
3495
|
+
service_period_in_days: zod_1.z.number().int().min(1).max(4000).optional(),
|
|
3496
|
+
on_event: zod_1.z
|
|
3497
|
+
.enum([
|
|
3498
|
+
'subscription_creation',
|
|
3499
|
+
'subscription_trial_start',
|
|
3500
|
+
'plan_activation',
|
|
3501
|
+
'subscription_activation',
|
|
3502
|
+
'contract_termination',
|
|
3503
|
+
])
|
|
3504
|
+
.optional(),
|
|
3505
|
+
charge_once: zod_1.z.boolean().default(true).optional(),
|
|
3506
|
+
});
|
|
2914
3507
|
const ImportSubscriptionSubscriptionEventBasedAddonsSchema = zod_1.z.object({
|
|
2915
3508
|
id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
|
|
2916
3509
|
quantity: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
|
|
@@ -2933,10 +3526,18 @@ const ImportSubscriptionSubscriptionEventBasedAddonsSchema = zod_1.z.object({
|
|
|
2933
3526
|
.optional(),
|
|
2934
3527
|
charge_once: zod_1.z.array(zod_1.z.boolean().default(true).optional()).optional(),
|
|
2935
3528
|
});
|
|
3529
|
+
const ImportSubscriptionSubscriptionChargedEventBasedAddonsItemSchema = zod_1.z.object({
|
|
3530
|
+
id: zod_1.z.string().max(100).optional(),
|
|
3531
|
+
last_charged_at: zod_1.z.number().int().optional(),
|
|
3532
|
+
});
|
|
2936
3533
|
const ImportSubscriptionSubscriptionChargedEventBasedAddonsSchema = zod_1.z.object({
|
|
2937
3534
|
id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
|
|
2938
3535
|
last_charged_at: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
|
|
2939
3536
|
});
|
|
3537
|
+
const ImportSubscriptionSubscriptionCouponsItemSchema = zod_1.z.object({
|
|
3538
|
+
coupon_id: zod_1.z.string().max(100).optional(),
|
|
3539
|
+
apply_till: zod_1.z.number().int().optional(),
|
|
3540
|
+
});
|
|
2940
3541
|
const ImportSubscriptionSubscriptionCouponsSchema = zod_1.z.object({
|
|
2941
3542
|
coupon_id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
|
|
2942
3543
|
apply_till: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
|
|
@@ -2990,10 +3591,30 @@ const ImportSubscriptionSubscriptionBodySchema = zod_1.z.looseObject({
|
|
|
2990
3591
|
billing_address: ImportSubscriptionSubscriptionBillingAddressSchema.optional(),
|
|
2991
3592
|
shipping_address: ImportSubscriptionSubscriptionShippingAddressSchema.optional(),
|
|
2992
3593
|
transaction: ImportSubscriptionSubscriptionTransactionSchema.optional(),
|
|
2993
|
-
addons:
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
|
|
3594
|
+
addons: zod_1.z
|
|
3595
|
+
.union([
|
|
3596
|
+
zod_1.z.array(ImportSubscriptionSubscriptionAddonsItemSchema.optional()),
|
|
3597
|
+
ImportSubscriptionSubscriptionAddonsSchema,
|
|
3598
|
+
])
|
|
3599
|
+
.optional(),
|
|
3600
|
+
event_based_addons: zod_1.z
|
|
3601
|
+
.union([
|
|
3602
|
+
zod_1.z.array(ImportSubscriptionSubscriptionEventBasedAddonsItemSchema.optional()),
|
|
3603
|
+
ImportSubscriptionSubscriptionEventBasedAddonsSchema,
|
|
3604
|
+
])
|
|
3605
|
+
.optional(),
|
|
3606
|
+
charged_event_based_addons: zod_1.z
|
|
3607
|
+
.union([
|
|
3608
|
+
zod_1.z.array(ImportSubscriptionSubscriptionChargedEventBasedAddonsItemSchema.optional()),
|
|
3609
|
+
ImportSubscriptionSubscriptionChargedEventBasedAddonsSchema,
|
|
3610
|
+
])
|
|
3611
|
+
.optional(),
|
|
3612
|
+
coupons: zod_1.z
|
|
3613
|
+
.union([
|
|
3614
|
+
zod_1.z.array(ImportSubscriptionSubscriptionCouponsItemSchema.optional()),
|
|
3615
|
+
ImportSubscriptionSubscriptionCouponsSchema,
|
|
3616
|
+
])
|
|
3617
|
+
.optional(),
|
|
2997
3618
|
});
|
|
2998
3619
|
exports.ImportSubscriptionSubscriptionBodySchema = ImportSubscriptionSubscriptionBodySchema;
|
|
2999
3620
|
//Subscription.importForCustomer
|
|
@@ -3021,12 +3642,6 @@ const ImportForCustomerSubscriptionTransactionSchema = zod_1.z.object({
|
|
|
3021
3642
|
'app_store',
|
|
3022
3643
|
'play_store',
|
|
3023
3644
|
'custom',
|
|
3024
|
-
'tamara',
|
|
3025
|
-
'qpay',
|
|
3026
|
-
'blik',
|
|
3027
|
-
'fpx',
|
|
3028
|
-
'wero',
|
|
3029
|
-
'p24',
|
|
3030
3645
|
])
|
|
3031
3646
|
.optional(),
|
|
3032
3647
|
reference_number: zod_1.z.string().max(100).optional(),
|
|
@@ -3050,6 +3665,14 @@ const ImportForCustomerSubscriptionShippingAddressSchema = zod_1.z.object({
|
|
|
3050
3665
|
.enum(['not_validated', 'valid', 'partially_valid', 'invalid'])
|
|
3051
3666
|
.optional(),
|
|
3052
3667
|
});
|
|
3668
|
+
const ImportForCustomerSubscriptionAddonsItemSchema = zod_1.z.object({
|
|
3669
|
+
id: zod_1.z.string().max(100).optional(),
|
|
3670
|
+
quantity: zod_1.z.number().int().min(1).optional(),
|
|
3671
|
+
quantity_in_decimal: zod_1.z.string().max(33).optional(),
|
|
3672
|
+
unit_price: zod_1.z.number().int().min(0).optional(),
|
|
3673
|
+
unit_price_in_decimal: zod_1.z.string().max(39).optional(),
|
|
3674
|
+
billing_cycles: zod_1.z.number().int().min(0).optional(),
|
|
3675
|
+
});
|
|
3053
3676
|
const ImportForCustomerSubscriptionAddonsSchema = zod_1.z.object({
|
|
3054
3677
|
id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
|
|
3055
3678
|
quantity: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
|
|
@@ -3058,6 +3681,24 @@ const ImportForCustomerSubscriptionAddonsSchema = zod_1.z.object({
|
|
|
3058
3681
|
unit_price_in_decimal: zod_1.z.array(zod_1.z.string().max(39).optional()).optional(),
|
|
3059
3682
|
billing_cycles: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
|
|
3060
3683
|
});
|
|
3684
|
+
const ImportForCustomerSubscriptionEventBasedAddonsItemSchema = zod_1.z.object({
|
|
3685
|
+
id: zod_1.z.string().max(100).optional(),
|
|
3686
|
+
quantity: zod_1.z.number().int().min(1).optional(),
|
|
3687
|
+
unit_price: zod_1.z.number().int().min(0).optional(),
|
|
3688
|
+
quantity_in_decimal: zod_1.z.string().max(33).optional(),
|
|
3689
|
+
unit_price_in_decimal: zod_1.z.string().max(39).optional(),
|
|
3690
|
+
service_period_in_days: zod_1.z.number().int().min(1).max(4000).optional(),
|
|
3691
|
+
on_event: zod_1.z
|
|
3692
|
+
.enum([
|
|
3693
|
+
'subscription_creation',
|
|
3694
|
+
'subscription_trial_start',
|
|
3695
|
+
'plan_activation',
|
|
3696
|
+
'subscription_activation',
|
|
3697
|
+
'contract_termination',
|
|
3698
|
+
])
|
|
3699
|
+
.optional(),
|
|
3700
|
+
charge_once: zod_1.z.boolean().default(true).optional(),
|
|
3701
|
+
});
|
|
3061
3702
|
const ImportForCustomerSubscriptionEventBasedAddonsSchema = zod_1.z.object({
|
|
3062
3703
|
id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
|
|
3063
3704
|
quantity: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
|
|
@@ -3080,10 +3721,18 @@ const ImportForCustomerSubscriptionEventBasedAddonsSchema = zod_1.z.object({
|
|
|
3080
3721
|
.optional(),
|
|
3081
3722
|
charge_once: zod_1.z.array(zod_1.z.boolean().default(true).optional()).optional(),
|
|
3082
3723
|
});
|
|
3724
|
+
const ImportForCustomerSubscriptionChargedEventBasedAddonsItemSchema = zod_1.z.object({
|
|
3725
|
+
id: zod_1.z.string().max(100).optional(),
|
|
3726
|
+
last_charged_at: zod_1.z.number().int().optional(),
|
|
3727
|
+
});
|
|
3083
3728
|
const ImportForCustomerSubscriptionChargedEventBasedAddonsSchema = zod_1.z.object({
|
|
3084
3729
|
id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
|
|
3085
3730
|
last_charged_at: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
|
|
3086
3731
|
});
|
|
3732
|
+
const ImportForCustomerSubscriptionCouponsItemSchema = zod_1.z.object({
|
|
3733
|
+
coupon_id: zod_1.z.string().max(100).optional(),
|
|
3734
|
+
apply_till: zod_1.z.number().int().optional(),
|
|
3735
|
+
});
|
|
3087
3736
|
const ImportForCustomerSubscriptionCouponsSchema = zod_1.z.object({
|
|
3088
3737
|
coupon_id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
|
|
3089
3738
|
apply_till: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
|
|
@@ -3132,10 +3781,30 @@ const ImportForCustomerSubscriptionBodySchema = zod_1.z.looseObject({
|
|
|
3132
3781
|
contract_term: ImportForCustomerSubscriptionContractTermSchema.optional(),
|
|
3133
3782
|
transaction: ImportForCustomerSubscriptionTransactionSchema.optional(),
|
|
3134
3783
|
shipping_address: ImportForCustomerSubscriptionShippingAddressSchema.optional(),
|
|
3135
|
-
addons:
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
|
|
3784
|
+
addons: zod_1.z
|
|
3785
|
+
.union([
|
|
3786
|
+
zod_1.z.array(ImportForCustomerSubscriptionAddonsItemSchema.optional()),
|
|
3787
|
+
ImportForCustomerSubscriptionAddonsSchema,
|
|
3788
|
+
])
|
|
3789
|
+
.optional(),
|
|
3790
|
+
event_based_addons: zod_1.z
|
|
3791
|
+
.union([
|
|
3792
|
+
zod_1.z.array(ImportForCustomerSubscriptionEventBasedAddonsItemSchema.optional()),
|
|
3793
|
+
ImportForCustomerSubscriptionEventBasedAddonsSchema,
|
|
3794
|
+
])
|
|
3795
|
+
.optional(),
|
|
3796
|
+
charged_event_based_addons: zod_1.z
|
|
3797
|
+
.union([
|
|
3798
|
+
zod_1.z.array(ImportForCustomerSubscriptionChargedEventBasedAddonsItemSchema.optional()),
|
|
3799
|
+
ImportForCustomerSubscriptionChargedEventBasedAddonsSchema,
|
|
3800
|
+
])
|
|
3801
|
+
.optional(),
|
|
3802
|
+
coupons: zod_1.z
|
|
3803
|
+
.union([
|
|
3804
|
+
zod_1.z.array(ImportForCustomerSubscriptionCouponsItemSchema.optional()),
|
|
3805
|
+
ImportForCustomerSubscriptionCouponsSchema,
|
|
3806
|
+
])
|
|
3807
|
+
.optional(),
|
|
3139
3808
|
});
|
|
3140
3809
|
exports.ImportForCustomerSubscriptionBodySchema = ImportForCustomerSubscriptionBodySchema;
|
|
3141
3810
|
//Subscription.importContractTerm
|
|
@@ -3166,6 +3835,31 @@ const ImportContractTermSubscriptionBodySchema = zod_1.z.looseObject({
|
|
|
3166
3835
|
});
|
|
3167
3836
|
exports.ImportContractTermSubscriptionBodySchema = ImportContractTermSubscriptionBodySchema;
|
|
3168
3837
|
//Subscription.importUnbilledCharges
|
|
3838
|
+
const ImportUnbilledChargesSubscriptionUnbilledChargesItemSchema = zod_1.z.object({
|
|
3839
|
+
id: zod_1.z.string().max(40).optional(),
|
|
3840
|
+
date_from: zod_1.z.number().int(),
|
|
3841
|
+
date_to: zod_1.z.number().int(),
|
|
3842
|
+
entity_type: zod_1.z.enum([
|
|
3843
|
+
'adhoc',
|
|
3844
|
+
'plan_item_price',
|
|
3845
|
+
'addon_item_price',
|
|
3846
|
+
'charge_item_price',
|
|
3847
|
+
'plan_setup',
|
|
3848
|
+
'plan',
|
|
3849
|
+
'addon',
|
|
3850
|
+
]),
|
|
3851
|
+
entity_id: zod_1.z.string().max(100).optional(),
|
|
3852
|
+
description: zod_1.z.string().max(250).optional(),
|
|
3853
|
+
unit_amount: zod_1.z.number().int().min(0).optional(),
|
|
3854
|
+
quantity: zod_1.z.number().int().min(0).optional(),
|
|
3855
|
+
amount: zod_1.z.number().int().min(0).optional(),
|
|
3856
|
+
unit_amount_in_decimal: zod_1.z.string().max(39).optional(),
|
|
3857
|
+
quantity_in_decimal: zod_1.z.string().max(33).optional(),
|
|
3858
|
+
amount_in_decimal: zod_1.z.string().max(39).optional(),
|
|
3859
|
+
discount_amount: zod_1.z.number().int().min(0).optional(),
|
|
3860
|
+
use_for_proration: zod_1.z.boolean().default(false).optional(),
|
|
3861
|
+
is_advance_charge: zod_1.z.boolean().default(false).optional(),
|
|
3862
|
+
});
|
|
3169
3863
|
const ImportUnbilledChargesSubscriptionUnbilledChargesSchema = zod_1.z.object({
|
|
3170
3864
|
id: zod_1.z.array(zod_1.z.string().max(40).optional()).optional(),
|
|
3171
3865
|
date_from: zod_1.z.array(zod_1.z.number().int().optional()),
|
|
@@ -3193,6 +3887,20 @@ const ImportUnbilledChargesSubscriptionUnbilledChargesSchema = zod_1.z.object({
|
|
|
3193
3887
|
use_for_proration: zod_1.z.array(zod_1.z.boolean().default(false).optional()).optional(),
|
|
3194
3888
|
is_advance_charge: zod_1.z.array(zod_1.z.boolean().default(false).optional()).optional(),
|
|
3195
3889
|
});
|
|
3890
|
+
const ImportUnbilledChargesSubscriptionDiscountsItemSchema = zod_1.z.object({
|
|
3891
|
+
unbilled_charge_id: zod_1.z.string().max(40).optional(),
|
|
3892
|
+
entity_type: zod_1.z
|
|
3893
|
+
.enum([
|
|
3894
|
+
'item_level_coupon',
|
|
3895
|
+
'document_level_coupon',
|
|
3896
|
+
'item_level_discount',
|
|
3897
|
+
'document_level_discount',
|
|
3898
|
+
])
|
|
3899
|
+
.optional(),
|
|
3900
|
+
entity_id: zod_1.z.string().max(100).optional(),
|
|
3901
|
+
description: zod_1.z.string().max(250).optional(),
|
|
3902
|
+
amount: zod_1.z.number().int().min(0),
|
|
3903
|
+
});
|
|
3196
3904
|
const ImportUnbilledChargesSubscriptionDiscountsSchema = zod_1.z.object({
|
|
3197
3905
|
unbilled_charge_id: zod_1.z.array(zod_1.z.string().max(40).optional()).optional(),
|
|
3198
3906
|
entity_type: zod_1.z
|
|
@@ -3209,6 +3917,17 @@ const ImportUnbilledChargesSubscriptionDiscountsSchema = zod_1.z.object({
|
|
|
3209
3917
|
description: zod_1.z.array(zod_1.z.string().max(250).optional()).optional(),
|
|
3210
3918
|
amount: zod_1.z.array(zod_1.z.number().int().min(0).optional()),
|
|
3211
3919
|
});
|
|
3920
|
+
const ImportUnbilledChargesSubscriptionTiersItemSchema = zod_1.z.object({
|
|
3921
|
+
unbilled_charge_id: zod_1.z.string().max(40),
|
|
3922
|
+
starting_unit: zod_1.z.number().int().min(0).optional(),
|
|
3923
|
+
ending_unit: zod_1.z.number().int().optional(),
|
|
3924
|
+
quantity_used: zod_1.z.number().int().min(0).optional(),
|
|
3925
|
+
unit_amount: zod_1.z.number().int().min(0).optional(),
|
|
3926
|
+
starting_unit_in_decimal: zod_1.z.string().max(33).optional(),
|
|
3927
|
+
ending_unit_in_decimal: zod_1.z.string().max(33).optional(),
|
|
3928
|
+
quantity_used_in_decimal: zod_1.z.string().max(33).optional(),
|
|
3929
|
+
unit_amount_in_decimal: zod_1.z.string().max(40).optional(),
|
|
3930
|
+
});
|
|
3212
3931
|
const ImportUnbilledChargesSubscriptionTiersSchema = zod_1.z.object({
|
|
3213
3932
|
unbilled_charge_id: zod_1.z.array(zod_1.z.string().max(40).optional()),
|
|
3214
3933
|
starting_unit: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
|
|
@@ -3221,9 +3940,24 @@ const ImportUnbilledChargesSubscriptionTiersSchema = zod_1.z.object({
|
|
|
3221
3940
|
unit_amount_in_decimal: zod_1.z.array(zod_1.z.string().max(40).optional()).optional(),
|
|
3222
3941
|
});
|
|
3223
3942
|
const ImportUnbilledChargesSubscriptionBodySchema = zod_1.z.looseObject({
|
|
3224
|
-
unbilled_charges:
|
|
3225
|
-
|
|
3226
|
-
|
|
3943
|
+
unbilled_charges: zod_1.z
|
|
3944
|
+
.union([
|
|
3945
|
+
zod_1.z.array(ImportUnbilledChargesSubscriptionUnbilledChargesItemSchema.optional()),
|
|
3946
|
+
ImportUnbilledChargesSubscriptionUnbilledChargesSchema,
|
|
3947
|
+
])
|
|
3948
|
+
.optional(),
|
|
3949
|
+
discounts: zod_1.z
|
|
3950
|
+
.union([
|
|
3951
|
+
zod_1.z.array(ImportUnbilledChargesSubscriptionDiscountsItemSchema.optional()),
|
|
3952
|
+
ImportUnbilledChargesSubscriptionDiscountsSchema,
|
|
3953
|
+
])
|
|
3954
|
+
.optional(),
|
|
3955
|
+
tiers: zod_1.z
|
|
3956
|
+
.union([
|
|
3957
|
+
zod_1.z.array(ImportUnbilledChargesSubscriptionTiersItemSchema.optional()),
|
|
3958
|
+
ImportUnbilledChargesSubscriptionTiersSchema,
|
|
3959
|
+
])
|
|
3960
|
+
.optional(),
|
|
3227
3961
|
});
|
|
3228
3962
|
exports.ImportUnbilledChargesSubscriptionBodySchema = ImportUnbilledChargesSubscriptionBodySchema;
|
|
3229
3963
|
//Subscription.importForItems
|
|
@@ -3251,12 +3985,6 @@ const ImportForItemsSubscriptionTransactionSchema = zod_1.z.object({
|
|
|
3251
3985
|
'app_store',
|
|
3252
3986
|
'play_store',
|
|
3253
3987
|
'custom',
|
|
3254
|
-
'tamara',
|
|
3255
|
-
'qpay',
|
|
3256
|
-
'blik',
|
|
3257
|
-
'fpx',
|
|
3258
|
-
'wero',
|
|
3259
|
-
'p24',
|
|
3260
3988
|
])
|
|
3261
3989
|
.optional(),
|
|
3262
3990
|
reference_number: zod_1.z.string().max(100).optional(),
|
|
@@ -3280,6 +4008,28 @@ const ImportForItemsSubscriptionShippingAddressSchema = zod_1.z.object({
|
|
|
3280
4008
|
.enum(['not_validated', 'valid', 'partially_valid', 'invalid'])
|
|
3281
4009
|
.optional(),
|
|
3282
4010
|
});
|
|
4011
|
+
const ImportForItemsSubscriptionSubscriptionItemsItemSchema = zod_1.z.object({
|
|
4012
|
+
item_price_id: zod_1.z.string().max(100),
|
|
4013
|
+
quantity: zod_1.z.number().int().min(1).optional(),
|
|
4014
|
+
quantity_in_decimal: zod_1.z.string().max(33).optional(),
|
|
4015
|
+
unit_price: zod_1.z.number().int().min(0).optional(),
|
|
4016
|
+
unit_price_in_decimal: zod_1.z.string().max(39).optional(),
|
|
4017
|
+
billing_cycles: zod_1.z.number().int().min(0).optional(),
|
|
4018
|
+
trial_end: zod_1.z.number().int().optional(),
|
|
4019
|
+
service_period_days: zod_1.z.number().int().min(1).max(4000).optional(),
|
|
4020
|
+
charge_on_event: zod_1.z
|
|
4021
|
+
.enum([
|
|
4022
|
+
'subscription_creation',
|
|
4023
|
+
'subscription_trial_start',
|
|
4024
|
+
'plan_activation',
|
|
4025
|
+
'subscription_activation',
|
|
4026
|
+
'contract_termination',
|
|
4027
|
+
])
|
|
4028
|
+
.optional(),
|
|
4029
|
+
charge_once: zod_1.z.boolean().optional(),
|
|
4030
|
+
item_type: zod_1.z.enum(['plan', 'addon', 'charge']).optional(),
|
|
4031
|
+
description: zod_1.z.string().max(2000).optional(),
|
|
4032
|
+
});
|
|
3283
4033
|
const ImportForItemsSubscriptionSubscriptionItemsSchema = zod_1.z.object({
|
|
3284
4034
|
item_price_id: zod_1.z.array(zod_1.z.string().max(100).optional()),
|
|
3285
4035
|
quantity: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
|
|
@@ -3304,7 +4054,18 @@ const ImportForItemsSubscriptionSubscriptionItemsSchema = zod_1.z.object({
|
|
|
3304
4054
|
.optional(),
|
|
3305
4055
|
charge_once: zod_1.z.array(zod_1.z.boolean().optional()).optional(),
|
|
3306
4056
|
item_type: zod_1.z.array(zod_1.z.enum(['plan', 'addon', 'charge']).optional()).optional(),
|
|
3307
|
-
description: zod_1.z.array(zod_1.z.string().max(
|
|
4057
|
+
description: zod_1.z.array(zod_1.z.string().max(2000).optional()).optional(),
|
|
4058
|
+
});
|
|
4059
|
+
const ImportForItemsSubscriptionDiscountsItemSchema = zod_1.z.object({
|
|
4060
|
+
apply_on: zod_1.z.enum(['invoice_amount', 'specific_item_price']).optional(),
|
|
4061
|
+
duration_type: zod_1.z.enum(['one_time', 'forever', 'limited_period']),
|
|
4062
|
+
percentage: zod_1.z.number().min(0.01).max(100).optional(),
|
|
4063
|
+
amount: zod_1.z.number().int().min(0).optional(),
|
|
4064
|
+
period: zod_1.z.number().int().min(1).optional(),
|
|
4065
|
+
period_unit: zod_1.z.enum(['day', 'week', 'month', 'year']).optional(),
|
|
4066
|
+
included_in_mrr: zod_1.z.boolean().optional(),
|
|
4067
|
+
item_price_id: zod_1.z.string().max(100).optional(),
|
|
4068
|
+
quantity: zod_1.z.number().int().min(1).optional(),
|
|
3308
4069
|
});
|
|
3309
4070
|
const ImportForItemsSubscriptionDiscountsSchema = zod_1.z.object({
|
|
3310
4071
|
apply_on: zod_1.z
|
|
@@ -3321,10 +4082,25 @@ const ImportForItemsSubscriptionDiscountsSchema = zod_1.z.object({
|
|
|
3321
4082
|
item_price_id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
|
|
3322
4083
|
quantity: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
|
|
3323
4084
|
});
|
|
4085
|
+
const ImportForItemsSubscriptionChargedItemsItemSchema = zod_1.z.object({
|
|
4086
|
+
item_price_id: zod_1.z.string().max(100).optional(),
|
|
4087
|
+
last_charged_at: zod_1.z.number().int().optional(),
|
|
4088
|
+
});
|
|
3324
4089
|
const ImportForItemsSubscriptionChargedItemsSchema = zod_1.z.object({
|
|
3325
4090
|
item_price_id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
|
|
3326
4091
|
last_charged_at: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
|
|
3327
4092
|
});
|
|
4093
|
+
const ImportForItemsSubscriptionItemTiersItemSchema = zod_1.z.object({
|
|
4094
|
+
item_price_id: zod_1.z.string().max(100).optional(),
|
|
4095
|
+
starting_unit: zod_1.z.number().int().min(1).optional(),
|
|
4096
|
+
ending_unit: zod_1.z.number().int().optional(),
|
|
4097
|
+
price: zod_1.z.number().int().min(0).optional(),
|
|
4098
|
+
starting_unit_in_decimal: zod_1.z.string().max(33).optional(),
|
|
4099
|
+
ending_unit_in_decimal: zod_1.z.string().max(33).optional(),
|
|
4100
|
+
price_in_decimal: zod_1.z.string().max(39).optional(),
|
|
4101
|
+
pricing_type: zod_1.z.enum(['per_unit', 'flat_fee', 'package']).optional(),
|
|
4102
|
+
package_size: zod_1.z.number().int().min(1).optional(),
|
|
4103
|
+
});
|
|
3328
4104
|
const ImportForItemsSubscriptionItemTiersSchema = zod_1.z.object({
|
|
3329
4105
|
item_price_id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
|
|
3330
4106
|
starting_unit: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
|
|
@@ -3338,6 +4114,10 @@ const ImportForItemsSubscriptionItemTiersSchema = zod_1.z.object({
|
|
|
3338
4114
|
.optional(),
|
|
3339
4115
|
package_size: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
|
|
3340
4116
|
});
|
|
4117
|
+
const ImportForItemsSubscriptionCouponsItemSchema = zod_1.z.object({
|
|
4118
|
+
coupon_id: zod_1.z.string().max(100).optional(),
|
|
4119
|
+
apply_till: zod_1.z.number().int().optional(),
|
|
4120
|
+
});
|
|
3341
4121
|
const ImportForItemsSubscriptionCouponsSchema = zod_1.z.object({
|
|
3342
4122
|
coupon_id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
|
|
3343
4123
|
apply_till: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
|
|
@@ -3386,11 +4166,36 @@ const ImportForItemsSubscriptionBodySchema = zod_1.z.looseObject({
|
|
|
3386
4166
|
contract_term: ImportForItemsSubscriptionContractTermSchema.optional(),
|
|
3387
4167
|
transaction: ImportForItemsSubscriptionTransactionSchema.optional(),
|
|
3388
4168
|
shipping_address: ImportForItemsSubscriptionShippingAddressSchema.optional(),
|
|
3389
|
-
subscription_items:
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
4169
|
+
subscription_items: zod_1.z
|
|
4170
|
+
.union([
|
|
4171
|
+
zod_1.z.array(ImportForItemsSubscriptionSubscriptionItemsItemSchema.optional()),
|
|
4172
|
+
ImportForItemsSubscriptionSubscriptionItemsSchema,
|
|
4173
|
+
])
|
|
4174
|
+
.optional(),
|
|
4175
|
+
discounts: zod_1.z
|
|
4176
|
+
.union([
|
|
4177
|
+
zod_1.z.array(ImportForItemsSubscriptionDiscountsItemSchema.optional()),
|
|
4178
|
+
ImportForItemsSubscriptionDiscountsSchema,
|
|
4179
|
+
])
|
|
4180
|
+
.optional(),
|
|
4181
|
+
charged_items: zod_1.z
|
|
4182
|
+
.union([
|
|
4183
|
+
zod_1.z.array(ImportForItemsSubscriptionChargedItemsItemSchema.optional()),
|
|
4184
|
+
ImportForItemsSubscriptionChargedItemsSchema,
|
|
4185
|
+
])
|
|
4186
|
+
.optional(),
|
|
4187
|
+
item_tiers: zod_1.z
|
|
4188
|
+
.union([
|
|
4189
|
+
zod_1.z.array(ImportForItemsSubscriptionItemTiersItemSchema.optional()),
|
|
4190
|
+
ImportForItemsSubscriptionItemTiersSchema,
|
|
4191
|
+
])
|
|
4192
|
+
.optional(),
|
|
4193
|
+
coupons: zod_1.z
|
|
4194
|
+
.union([
|
|
4195
|
+
zod_1.z.array(ImportForItemsSubscriptionCouponsItemSchema.optional()),
|
|
4196
|
+
ImportForItemsSubscriptionCouponsSchema,
|
|
4197
|
+
])
|
|
4198
|
+
.optional(),
|
|
3394
4199
|
});
|
|
3395
4200
|
exports.ImportForItemsSubscriptionBodySchema = ImportForItemsSubscriptionBodySchema;
|
|
3396
4201
|
//Subscription.overrideBillingProfile
|
|
@@ -3412,6 +4217,12 @@ const PauseSubscriptionBodySchema = zod_1.z.looseObject({
|
|
|
3412
4217
|
});
|
|
3413
4218
|
exports.PauseSubscriptionBodySchema = PauseSubscriptionBodySchema;
|
|
3414
4219
|
//Subscription.cancel
|
|
4220
|
+
const CancelSubscriptionEventBasedAddonsItemSchema = zod_1.z.object({
|
|
4221
|
+
id: zod_1.z.string().max(100).optional(),
|
|
4222
|
+
quantity: zod_1.z.number().int().min(1).optional(),
|
|
4223
|
+
unit_price: zod_1.z.number().int().min(0).optional(),
|
|
4224
|
+
service_period_in_days: zod_1.z.number().int().min(1).max(4000).optional(),
|
|
4225
|
+
});
|
|
3415
4226
|
const CancelSubscriptionEventBasedAddonsSchema = zod_1.z.object({
|
|
3416
4227
|
id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
|
|
3417
4228
|
quantity: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
|
|
@@ -3451,10 +4262,23 @@ const CancelSubscriptionBodySchema = zod_1.z.looseObject({
|
|
|
3451
4262
|
.optional(),
|
|
3452
4263
|
invoice_date: zod_1.z.number().int().optional(),
|
|
3453
4264
|
cancel_reason_code: zod_1.z.string().max(100).optional(),
|
|
3454
|
-
event_based_addons:
|
|
4265
|
+
event_based_addons: zod_1.z
|
|
4266
|
+
.union([
|
|
4267
|
+
zod_1.z.array(CancelSubscriptionEventBasedAddonsItemSchema.optional()),
|
|
4268
|
+
CancelSubscriptionEventBasedAddonsSchema,
|
|
4269
|
+
])
|
|
4270
|
+
.optional(),
|
|
3455
4271
|
});
|
|
3456
4272
|
exports.CancelSubscriptionBodySchema = CancelSubscriptionBodySchema;
|
|
3457
4273
|
//Subscription.cancelForItems
|
|
4274
|
+
const CancelForItemsSubscriptionSubscriptionItemsItemSchema = zod_1.z.object({
|
|
4275
|
+
item_price_id: zod_1.z.string().max(100).optional(),
|
|
4276
|
+
quantity: zod_1.z.number().int().min(1).optional(),
|
|
4277
|
+
quantity_in_decimal: zod_1.z.string().max(33).optional(),
|
|
4278
|
+
unit_price: zod_1.z.number().int().min(0).optional(),
|
|
4279
|
+
unit_price_in_decimal: zod_1.z.string().max(39).optional(),
|
|
4280
|
+
service_period_days: zod_1.z.number().int().min(1).max(4000).optional(),
|
|
4281
|
+
});
|
|
3458
4282
|
const CancelForItemsSubscriptionSubscriptionItemsSchema = zod_1.z.object({
|
|
3459
4283
|
item_price_id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
|
|
3460
4284
|
quantity: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
|
|
@@ -3498,7 +4322,12 @@ const CancelForItemsSubscriptionBodySchema = zod_1.z.looseObject({
|
|
|
3498
4322
|
include_cancellation_day_in_billing: zod_1.z.boolean().optional(),
|
|
3499
4323
|
cancel_reason_code: zod_1.z.string().max(100).optional(),
|
|
3500
4324
|
decommissioned: zod_1.z.boolean().default(false).optional(),
|
|
3501
|
-
subscription_items:
|
|
4325
|
+
subscription_items: zod_1.z
|
|
4326
|
+
.union([
|
|
4327
|
+
zod_1.z.array(CancelForItemsSubscriptionSubscriptionItemsItemSchema.optional()),
|
|
4328
|
+
CancelForItemsSubscriptionSubscriptionItemsSchema,
|
|
4329
|
+
])
|
|
4330
|
+
.optional(),
|
|
3502
4331
|
});
|
|
3503
4332
|
exports.CancelForItemsSubscriptionBodySchema = CancelForItemsSubscriptionBodySchema;
|
|
3504
4333
|
//Subscription.resume
|