chargebee 3.34.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 +237 -0
- package/cjs/environment.js +1 -1
- package/cjs/resources/api_endpoints.js +230 -2
- package/cjs/resources/webhook/eventType.js +25 -1
- 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 +43 -6
- package/cjs/schema/business_rule.schema.js +2 -2
- package/cjs/schema/business_ruleset.schema.js +2 -2
- package/cjs/schema/collections_payment_promise.schema.js +43 -0
- package/cjs/schema/comment.schema.js +17 -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 +497 -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 +35 -6
- package/cjs/schema/entitlement_override.schema.js +17 -1
- package/cjs/schema/estimate.schema.js +585 -40
- package/cjs/schema/event.schema.js +1334 -585
- 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 +564 -68
- package/cjs/schema/index.js +6 -0
- package/cjs/schema/invoice.schema.js +843 -123
- 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_account_balance.schema.js +11 -2
- package/cjs/schema/ledger_operation.schema.js +44 -17
- package/cjs/schema/metered_feature.schema.js +10 -1
- package/cjs/schema/omnichannel_one_time_order.schema.js +42 -4
- package/cjs/schema/omnichannel_subscription.schema.js +146 -32
- 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 +375 -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 +153 -0
- 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 +210 -12
- package/cjs/schema/quote.schema.js +907 -87
- package/cjs/schema/quote_entitlement.schema.js +6 -2
- package/cjs/schema/ramp.schema.js +242 -24
- package/cjs/schema/retry_segment.schema.js +12 -0
- package/cjs/schema/site_migration_detail.schema.js +50 -16
- package/cjs/schema/subscription.schema.js +1002 -173
- 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 +59 -11
- package/cjs/schema/usage_event.schema.js +13 -1
- package/cjs/schema/usage_summary.schema.js +1 -0
- package/cjs/schema/virtual_bank_account.schema.js +42 -10
- package/cjs/schema/webhook_endpoint.schema.js +50 -2
- package/esm/environment.js +1 -1
- package/esm/resources/api_endpoints.js +230 -2
- package/esm/resources/webhook/eventType.js +25 -1
- 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 +42 -5
- package/esm/schema/business_rule.schema.js +2 -2
- package/esm/schema/business_ruleset.schema.js +2 -2
- package/esm/schema/collections_payment_promise.schema.js +40 -0
- package/esm/schema/comment.schema.js +17 -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 +497 -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 +35 -6
- package/esm/schema/entitlement_override.schema.js +17 -1
- package/esm/schema/estimate.schema.js +585 -40
- package/esm/schema/event.schema.js +1334 -585
- 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 +564 -68
- package/esm/schema/index.js +6 -0
- package/esm/schema/invoice.schema.js +842 -122
- 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_account_balance.schema.js +10 -1
- package/esm/schema/ledger_operation.schema.js +44 -17
- package/esm/schema/metered_feature.schema.js +10 -1
- package/esm/schema/omnichannel_one_time_order.schema.js +42 -4
- package/esm/schema/omnichannel_subscription.schema.js +146 -32
- 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 +375 -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 +150 -0
- 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 +210 -12
- package/esm/schema/quote.schema.js +907 -87
- package/esm/schema/quote_entitlement.schema.js +6 -2
- package/esm/schema/ramp.schema.js +242 -24
- package/esm/schema/retry_segment.schema.js +9 -0
- package/esm/schema/site_migration_detail.schema.js +50 -16
- package/esm/schema/subscription.schema.js +1002 -173
- 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 +59 -11
- package/esm/schema/usage_event.schema.js +13 -1
- package/esm/schema/usage_summary.schema.js +1 -0
- package/esm/schema/virtual_bank_account.schema.js +42 -10
- package/esm/schema/webhook_endpoint.schema.js +50 -2
- package/package.json +1 -1
- package/types/core.d.ts +63 -74
- package/types/index.d.ts +29 -1
- package/types/resources/BillingLineItem.d.ts +10 -0
- package/types/resources/BillingMetadata.d.ts +9 -0
- package/types/resources/BusinessEntity.d.ts +52 -0
- package/types/resources/Citation.d.ts +13 -0
- package/types/resources/CollectionsDispute.d.ts +24 -0
- package/types/resources/CollectionsPaymentPromise.d.ts +93 -0
- package/types/resources/CollectionsReminderSequence.d.ts +35 -0
- package/types/resources/Comment.d.ts +2 -1
- package/types/resources/Content.d.ts +23 -1
- package/types/resources/CreditNote.d.ts +1 -0
- package/types/resources/CustomData.d.ts +14 -0
- package/types/resources/Discount.d.ts +1 -0
- package/types/resources/DraftEstimate.d.ts +13 -0
- package/types/resources/DraftRequest.d.ts +45 -0
- package/types/resources/EmailAttachment.d.ts +16 -0
- package/types/resources/EmailConversation.d.ts +18 -0
- package/types/resources/EmailLog.d.ts +1 -0
- package/types/resources/EmailMessage.d.ts +40 -0
- package/types/resources/Estimate.d.ts +3 -0
- package/types/resources/Event.d.ts +25 -1
- package/types/resources/Execution.d.ts +12 -0
- package/types/resources/GatewayPaymentMethodToken.d.ts +2 -2
- 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/GroupByAttribute.d.ts +15 -0
- package/types/resources/GroupByRecommendation.d.ts +10 -0
- package/types/resources/HostedPage.d.ts +18 -0
- package/types/resources/Invoice.d.ts +19 -0
- package/types/resources/ItemPrice.d.ts +1 -0
- package/types/resources/LedgerAccountBalance.d.ts +19 -0
- package/types/resources/Meter.d.ts +1 -0
- package/types/resources/MeteredFeature.d.ts +1 -0
- package/types/resources/OmnichannelOneTimeOrder.d.ts +5 -1
- package/types/resources/OmnichannelSubscription.d.ts +6 -1
- package/types/resources/OmnichannelSubscriptionItem.d.ts +4 -1
- package/types/resources/OrganizationDetail.d.ts +84 -0
- package/types/resources/PaymentSchedule.d.ts +1 -1
- package/types/resources/PaymentScheduleEstimate.d.ts +1 -1
- package/types/resources/PaymentSource.d.ts +19 -0
- package/types/resources/PreferenceVariant.d.ts +10 -0
- package/types/resources/PriceRamp.d.ts +113 -0
- package/types/resources/PrivateNote.d.ts +18 -0
- package/types/resources/Purchase.d.ts +6 -0
- package/types/resources/Ramp.d.ts +6 -0
- package/types/resources/RampInterval.d.ts +12 -0
- package/types/resources/RecordedPurchase.d.ts +5 -1
- package/types/resources/RetrySegment.d.ts +36 -0
- package/types/resources/Subscription.d.ts +3 -0
- package/types/resources/Transaction.d.ts +4 -0
- package/types/resources/Usage.d.ts +7 -0
- package/types/resources/UsageSummary.d.ts +2 -0
- package/types/resources/WebhookEvent.d.ts +159 -5
- package/types/resources/AppliedBusinessRule.d.ts +0 -15
|
@@ -9,6 +9,9 @@ const zod_1 = require("zod");
|
|
|
9
9
|
const CreatePaymentVoucherVoucherPaymentSourceSchema = zod_1.z.object({
|
|
10
10
|
voucher_type: zod_1.z.enum(['boleto']),
|
|
11
11
|
});
|
|
12
|
+
const CreatePaymentVoucherInvoiceAllocationsItemSchema = zod_1.z.object({
|
|
13
|
+
invoice_id: zod_1.z.string().max(50),
|
|
14
|
+
});
|
|
12
15
|
const CreatePaymentVoucherInvoiceAllocationsSchema = zod_1.z.object({
|
|
13
16
|
invoice_id: zod_1.z.array(zod_1.z.string().max(50).optional()),
|
|
14
17
|
});
|
|
@@ -16,15 +19,30 @@ const CreatePaymentVoucherBodySchema = zod_1.z.looseObject({
|
|
|
16
19
|
customer_id: zod_1.z.string().max(50),
|
|
17
20
|
payment_source_id: zod_1.z.string().max(40).optional(),
|
|
18
21
|
voucher_payment_source: CreatePaymentVoucherVoucherPaymentSourceSchema.optional(),
|
|
19
|
-
invoice_allocations:
|
|
22
|
+
invoice_allocations: zod_1.z
|
|
23
|
+
.union([
|
|
24
|
+
zod_1.z.array(CreatePaymentVoucherInvoiceAllocationsItemSchema.optional()),
|
|
25
|
+
CreatePaymentVoucherInvoiceAllocationsSchema,
|
|
26
|
+
])
|
|
27
|
+
.optional(),
|
|
20
28
|
});
|
|
21
29
|
exports.CreatePaymentVoucherBodySchema = CreatePaymentVoucherBodySchema;
|
|
22
30
|
//PaymentVoucher.payment_vouchersForInvoice
|
|
23
31
|
const PaymentVouchersforinvoicePaymentVoucherStatusSchema = zod_1.z.object({
|
|
24
32
|
is: zod_1.z.enum(['active', 'consumed', 'expired', 'failure']).optional(),
|
|
25
33
|
is_not: zod_1.z.enum(['active', 'consumed', 'expired', 'failure']).optional(),
|
|
26
|
-
in: zod_1.z
|
|
27
|
-
|
|
34
|
+
in: zod_1.z
|
|
35
|
+
.union([
|
|
36
|
+
zod_1.z.array(zod_1.z.enum(['active', 'consumed', 'expired', 'failure']).optional()),
|
|
37
|
+
zod_1.z.enum(['active', 'consumed', 'expired', 'failure']),
|
|
38
|
+
])
|
|
39
|
+
.optional(),
|
|
40
|
+
not_in: zod_1.z
|
|
41
|
+
.union([
|
|
42
|
+
zod_1.z.array(zod_1.z.enum(['active', 'consumed', 'expired', 'failure']).optional()),
|
|
43
|
+
zod_1.z.enum(['active', 'consumed', 'expired', 'failure']),
|
|
44
|
+
])
|
|
45
|
+
.optional(),
|
|
28
46
|
});
|
|
29
47
|
const PaymentVouchersforinvoicePaymentVoucherSortBySchema = zod_1.z.looseObject({
|
|
30
48
|
asc: zod_1.z.enum(['date', 'updated_at']).optional(),
|
|
@@ -41,8 +59,18 @@ exports.PaymentVouchersforinvoicePaymentVoucherBodySchema = PaymentVouchersforin
|
|
|
41
59
|
const PaymentVouchersforcustomerPaymentVoucherStatusSchema = zod_1.z.object({
|
|
42
60
|
is: zod_1.z.enum(['active', 'consumed', 'expired', 'failure']).optional(),
|
|
43
61
|
is_not: zod_1.z.enum(['active', 'consumed', 'expired', 'failure']).optional(),
|
|
44
|
-
in: zod_1.z
|
|
45
|
-
|
|
62
|
+
in: zod_1.z
|
|
63
|
+
.union([
|
|
64
|
+
zod_1.z.array(zod_1.z.enum(['active', 'consumed', 'expired', 'failure']).optional()),
|
|
65
|
+
zod_1.z.enum(['active', 'consumed', 'expired', 'failure']),
|
|
66
|
+
])
|
|
67
|
+
.optional(),
|
|
68
|
+
not_in: zod_1.z
|
|
69
|
+
.union([
|
|
70
|
+
zod_1.z.array(zod_1.z.enum(['active', 'consumed', 'expired', 'failure']).optional()),
|
|
71
|
+
zod_1.z.enum(['active', 'consumed', 'expired', 'failure']),
|
|
72
|
+
])
|
|
73
|
+
.optional(),
|
|
46
74
|
});
|
|
47
75
|
const PaymentVouchersforcustomerPaymentVoucherSortBySchema = zod_1.z.looseObject({
|
|
48
76
|
asc: zod_1.z.enum(['date', 'updated_at']).optional(),
|
|
@@ -7,6 +7,14 @@ exports.CopyPlanBodySchema = exports.ListPlanBodySchema = exports.UpdatePlanBody
|
|
|
7
7
|
const zod_1 = require("zod");
|
|
8
8
|
//Plan.create
|
|
9
9
|
const CreatePlanMetaDataSchema = zod_1.z.looseObject({});
|
|
10
|
+
const CreatePlanTiersItemSchema = zod_1.z.object({
|
|
11
|
+
starting_unit: zod_1.z.number().int().min(1).optional(),
|
|
12
|
+
ending_unit: zod_1.z.number().int().optional(),
|
|
13
|
+
price: zod_1.z.number().int().min(0).optional(),
|
|
14
|
+
starting_unit_in_decimal: zod_1.z.string().max(33).optional(),
|
|
15
|
+
ending_unit_in_decimal: zod_1.z.string().max(33).optional(),
|
|
16
|
+
price_in_decimal: zod_1.z.string().max(39).optional(),
|
|
17
|
+
});
|
|
10
18
|
const CreatePlanTiersSchema = zod_1.z.object({
|
|
11
19
|
starting_unit: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
|
|
12
20
|
ending_unit: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
|
|
@@ -15,14 +23,37 @@ const CreatePlanTiersSchema = zod_1.z.object({
|
|
|
15
23
|
ending_unit_in_decimal: zod_1.z.array(zod_1.z.string().max(33).optional()).optional(),
|
|
16
24
|
price_in_decimal: zod_1.z.array(zod_1.z.string().max(39).optional()).optional(),
|
|
17
25
|
});
|
|
26
|
+
const CreatePlanTaxProvidersFieldsItemSchema = zod_1.z.object({
|
|
27
|
+
provider_name: zod_1.z.string().max(50),
|
|
28
|
+
field_id: zod_1.z.string().max(50),
|
|
29
|
+
field_value: zod_1.z.string().max(50),
|
|
30
|
+
});
|
|
18
31
|
const CreatePlanTaxProvidersFieldsSchema = zod_1.z.object({
|
|
19
32
|
provider_name: zod_1.z.array(zod_1.z.string().max(50).optional()),
|
|
20
33
|
field_id: zod_1.z.array(zod_1.z.string().max(50).optional()),
|
|
21
34
|
field_value: zod_1.z.array(zod_1.z.string().max(50).optional()),
|
|
22
35
|
});
|
|
36
|
+
const CreatePlanApplicableAddonsItemSchema = zod_1.z.object({
|
|
37
|
+
id: zod_1.z.string().max(100).optional(),
|
|
38
|
+
});
|
|
23
39
|
const CreatePlanApplicableAddonsSchema = zod_1.z.object({
|
|
24
40
|
id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
|
|
25
41
|
});
|
|
42
|
+
const CreatePlanEventBasedAddonsItemSchema = zod_1.z.object({
|
|
43
|
+
id: zod_1.z.string().max(100).optional(),
|
|
44
|
+
quantity: zod_1.z.number().int().min(1).optional(),
|
|
45
|
+
quantity_in_decimal: zod_1.z.string().max(33).optional(),
|
|
46
|
+
on_event: zod_1.z
|
|
47
|
+
.enum([
|
|
48
|
+
'subscription_creation',
|
|
49
|
+
'subscription_trial_start',
|
|
50
|
+
'plan_activation',
|
|
51
|
+
'subscription_activation',
|
|
52
|
+
'contract_termination',
|
|
53
|
+
])
|
|
54
|
+
.optional(),
|
|
55
|
+
charge_once: zod_1.z.boolean().default(true).optional(),
|
|
56
|
+
});
|
|
26
57
|
const CreatePlanEventBasedAddonsSchema = zod_1.z.object({
|
|
27
58
|
id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
|
|
28
59
|
quantity: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
|
|
@@ -40,6 +71,13 @@ const CreatePlanEventBasedAddonsSchema = zod_1.z.object({
|
|
|
40
71
|
.optional(),
|
|
41
72
|
charge_once: zod_1.z.array(zod_1.z.boolean().default(true).optional()).optional(),
|
|
42
73
|
});
|
|
74
|
+
const CreatePlanAttachedAddonsItemSchema = zod_1.z.object({
|
|
75
|
+
id: zod_1.z.string().max(100).optional(),
|
|
76
|
+
quantity: zod_1.z.number().int().min(1).optional(),
|
|
77
|
+
quantity_in_decimal: zod_1.z.string().max(33).optional(),
|
|
78
|
+
billing_cycles: zod_1.z.number().int().min(1).optional(),
|
|
79
|
+
type: zod_1.z.enum(['recommended', 'mandatory']).optional(),
|
|
80
|
+
});
|
|
43
81
|
const CreatePlanAttachedAddonsSchema = zod_1.z.object({
|
|
44
82
|
id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
|
|
45
83
|
quantity: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
|
|
@@ -105,15 +143,48 @@ const CreatePlanBodySchema = zod_1.z.looseObject({
|
|
|
105
143
|
giftable: zod_1.z.boolean().default(false).optional(),
|
|
106
144
|
status: zod_1.z.enum(['active', 'archived']).optional(),
|
|
107
145
|
claim_url: zod_1.z.string().max(500).optional(),
|
|
108
|
-
tiers:
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
146
|
+
tiers: zod_1.z
|
|
147
|
+
.union([
|
|
148
|
+
zod_1.z.array(CreatePlanTiersItemSchema.optional()),
|
|
149
|
+
CreatePlanTiersSchema,
|
|
150
|
+
])
|
|
151
|
+
.optional(),
|
|
152
|
+
tax_providers_fields: zod_1.z
|
|
153
|
+
.union([
|
|
154
|
+
zod_1.z.array(CreatePlanTaxProvidersFieldsItemSchema.optional()),
|
|
155
|
+
CreatePlanTaxProvidersFieldsSchema,
|
|
156
|
+
])
|
|
157
|
+
.optional(),
|
|
158
|
+
applicable_addons: zod_1.z
|
|
159
|
+
.union([
|
|
160
|
+
zod_1.z.array(CreatePlanApplicableAddonsItemSchema.optional()),
|
|
161
|
+
CreatePlanApplicableAddonsSchema,
|
|
162
|
+
])
|
|
163
|
+
.optional(),
|
|
164
|
+
event_based_addons: zod_1.z
|
|
165
|
+
.union([
|
|
166
|
+
zod_1.z.array(CreatePlanEventBasedAddonsItemSchema.optional()),
|
|
167
|
+
CreatePlanEventBasedAddonsSchema,
|
|
168
|
+
])
|
|
169
|
+
.optional(),
|
|
170
|
+
attached_addons: zod_1.z
|
|
171
|
+
.union([
|
|
172
|
+
zod_1.z.array(CreatePlanAttachedAddonsItemSchema.optional()),
|
|
173
|
+
CreatePlanAttachedAddonsSchema,
|
|
174
|
+
])
|
|
175
|
+
.optional(),
|
|
113
176
|
});
|
|
114
177
|
exports.CreatePlanBodySchema = CreatePlanBodySchema;
|
|
115
178
|
//Plan.update
|
|
116
179
|
const UpdatePlanMetaDataSchema = zod_1.z.looseObject({});
|
|
180
|
+
const UpdatePlanTiersItemSchema = zod_1.z.object({
|
|
181
|
+
starting_unit: zod_1.z.number().int().min(1).optional(),
|
|
182
|
+
ending_unit: zod_1.z.number().int().optional(),
|
|
183
|
+
price: zod_1.z.number().int().min(0).optional(),
|
|
184
|
+
starting_unit_in_decimal: zod_1.z.string().max(33).optional(),
|
|
185
|
+
ending_unit_in_decimal: zod_1.z.string().max(33).optional(),
|
|
186
|
+
price_in_decimal: zod_1.z.string().max(39).optional(),
|
|
187
|
+
});
|
|
117
188
|
const UpdatePlanTiersSchema = zod_1.z.object({
|
|
118
189
|
starting_unit: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
|
|
119
190
|
ending_unit: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
|
|
@@ -122,14 +193,37 @@ const UpdatePlanTiersSchema = zod_1.z.object({
|
|
|
122
193
|
ending_unit_in_decimal: zod_1.z.array(zod_1.z.string().max(33).optional()).optional(),
|
|
123
194
|
price_in_decimal: zod_1.z.array(zod_1.z.string().max(39).optional()).optional(),
|
|
124
195
|
});
|
|
196
|
+
const UpdatePlanTaxProvidersFieldsItemSchema = zod_1.z.object({
|
|
197
|
+
provider_name: zod_1.z.string().max(50),
|
|
198
|
+
field_id: zod_1.z.string().max(50),
|
|
199
|
+
field_value: zod_1.z.string().max(50),
|
|
200
|
+
});
|
|
125
201
|
const UpdatePlanTaxProvidersFieldsSchema = zod_1.z.object({
|
|
126
202
|
provider_name: zod_1.z.array(zod_1.z.string().max(50).optional()),
|
|
127
203
|
field_id: zod_1.z.array(zod_1.z.string().max(50).optional()),
|
|
128
204
|
field_value: zod_1.z.array(zod_1.z.string().max(50).optional()),
|
|
129
205
|
});
|
|
206
|
+
const UpdatePlanApplicableAddonsItemSchema = zod_1.z.object({
|
|
207
|
+
id: zod_1.z.string().max(100).optional(),
|
|
208
|
+
});
|
|
130
209
|
const UpdatePlanApplicableAddonsSchema = zod_1.z.object({
|
|
131
210
|
id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
|
|
132
211
|
});
|
|
212
|
+
const UpdatePlanEventBasedAddonsItemSchema = zod_1.z.object({
|
|
213
|
+
id: zod_1.z.string().max(100).optional(),
|
|
214
|
+
quantity: zod_1.z.number().int().min(1).optional(),
|
|
215
|
+
quantity_in_decimal: zod_1.z.string().max(33).optional(),
|
|
216
|
+
on_event: zod_1.z
|
|
217
|
+
.enum([
|
|
218
|
+
'subscription_creation',
|
|
219
|
+
'subscription_trial_start',
|
|
220
|
+
'plan_activation',
|
|
221
|
+
'subscription_activation',
|
|
222
|
+
'contract_termination',
|
|
223
|
+
])
|
|
224
|
+
.optional(),
|
|
225
|
+
charge_once: zod_1.z.boolean().default(true).optional(),
|
|
226
|
+
});
|
|
133
227
|
const UpdatePlanEventBasedAddonsSchema = zod_1.z.object({
|
|
134
228
|
id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
|
|
135
229
|
quantity: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
|
|
@@ -147,6 +241,13 @@ const UpdatePlanEventBasedAddonsSchema = zod_1.z.object({
|
|
|
147
241
|
.optional(),
|
|
148
242
|
charge_once: zod_1.z.array(zod_1.z.boolean().default(true).optional()).optional(),
|
|
149
243
|
});
|
|
244
|
+
const UpdatePlanAttachedAddonsItemSchema = zod_1.z.object({
|
|
245
|
+
id: zod_1.z.string().max(100).optional(),
|
|
246
|
+
quantity: zod_1.z.number().int().min(1).optional(),
|
|
247
|
+
quantity_in_decimal: zod_1.z.string().max(33).optional(),
|
|
248
|
+
billing_cycles: zod_1.z.number().int().min(1).optional(),
|
|
249
|
+
type: zod_1.z.enum(['recommended', 'mandatory']).optional(),
|
|
250
|
+
});
|
|
150
251
|
const UpdatePlanAttachedAddonsSchema = zod_1.z.object({
|
|
151
252
|
id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
|
|
152
253
|
quantity: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
|
|
@@ -208,11 +309,36 @@ const UpdatePlanBodySchema = zod_1.z.looseObject({
|
|
|
208
309
|
meta_data: UpdatePlanMetaDataSchema.optional(),
|
|
209
310
|
show_description_in_invoices: zod_1.z.boolean().default(false).optional(),
|
|
210
311
|
show_description_in_quotes: zod_1.z.boolean().default(false).optional(),
|
|
211
|
-
tiers:
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
312
|
+
tiers: zod_1.z
|
|
313
|
+
.union([
|
|
314
|
+
zod_1.z.array(UpdatePlanTiersItemSchema.optional()),
|
|
315
|
+
UpdatePlanTiersSchema,
|
|
316
|
+
])
|
|
317
|
+
.optional(),
|
|
318
|
+
tax_providers_fields: zod_1.z
|
|
319
|
+
.union([
|
|
320
|
+
zod_1.z.array(UpdatePlanTaxProvidersFieldsItemSchema.optional()),
|
|
321
|
+
UpdatePlanTaxProvidersFieldsSchema,
|
|
322
|
+
])
|
|
323
|
+
.optional(),
|
|
324
|
+
applicable_addons: zod_1.z
|
|
325
|
+
.union([
|
|
326
|
+
zod_1.z.array(UpdatePlanApplicableAddonsItemSchema.optional()),
|
|
327
|
+
UpdatePlanApplicableAddonsSchema,
|
|
328
|
+
])
|
|
329
|
+
.optional(),
|
|
330
|
+
event_based_addons: zod_1.z
|
|
331
|
+
.union([
|
|
332
|
+
zod_1.z.array(UpdatePlanEventBasedAddonsItemSchema.optional()),
|
|
333
|
+
UpdatePlanEventBasedAddonsSchema,
|
|
334
|
+
])
|
|
335
|
+
.optional(),
|
|
336
|
+
attached_addons: zod_1.z
|
|
337
|
+
.union([
|
|
338
|
+
zod_1.z.array(UpdatePlanAttachedAddonsItemSchema.optional()),
|
|
339
|
+
UpdatePlanAttachedAddonsSchema,
|
|
340
|
+
])
|
|
341
|
+
.optional(),
|
|
216
342
|
});
|
|
217
343
|
exports.UpdatePlanBodySchema = UpdatePlanBodySchema;
|
|
218
344
|
//Plan.list
|
|
@@ -220,64 +346,165 @@ const ListPlanIdSchema = zod_1.z.object({
|
|
|
220
346
|
is: zod_1.z.string().min(1).optional(),
|
|
221
347
|
is_not: zod_1.z.string().min(1).optional(),
|
|
222
348
|
starts_with: zod_1.z.string().min(1).optional(),
|
|
223
|
-
in: zod_1.z
|
|
224
|
-
|
|
349
|
+
in: zod_1.z
|
|
350
|
+
.union([
|
|
351
|
+
zod_1.z.array(zod_1.z.string().optional()),
|
|
352
|
+
zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
353
|
+
])
|
|
354
|
+
.optional(),
|
|
355
|
+
not_in: zod_1.z
|
|
356
|
+
.union([
|
|
357
|
+
zod_1.z.array(zod_1.z.string().optional()),
|
|
358
|
+
zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
359
|
+
])
|
|
360
|
+
.optional(),
|
|
225
361
|
});
|
|
226
362
|
const ListPlanNameSchema = zod_1.z.object({
|
|
227
363
|
is: zod_1.z.string().min(1).optional(),
|
|
228
364
|
is_not: zod_1.z.string().min(1).optional(),
|
|
229
365
|
starts_with: zod_1.z.string().min(1).optional(),
|
|
230
|
-
in: zod_1.z
|
|
231
|
-
|
|
366
|
+
in: zod_1.z
|
|
367
|
+
.union([
|
|
368
|
+
zod_1.z.array(zod_1.z.string().optional()),
|
|
369
|
+
zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
370
|
+
])
|
|
371
|
+
.optional(),
|
|
372
|
+
not_in: zod_1.z
|
|
373
|
+
.union([
|
|
374
|
+
zod_1.z.array(zod_1.z.string().optional()),
|
|
375
|
+
zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
376
|
+
])
|
|
377
|
+
.optional(),
|
|
232
378
|
});
|
|
233
379
|
const ListPlanPriceSchema = zod_1.z.object({
|
|
234
|
-
is: zod_1.z
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
380
|
+
is: zod_1.z
|
|
381
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
|
|
382
|
+
.optional(),
|
|
383
|
+
is_not: zod_1.z
|
|
384
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
|
|
385
|
+
.optional(),
|
|
386
|
+
lt: zod_1.z
|
|
387
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
|
|
388
|
+
.optional(),
|
|
389
|
+
lte: zod_1.z
|
|
390
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
|
|
391
|
+
.optional(),
|
|
392
|
+
gt: zod_1.z
|
|
393
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
|
|
394
|
+
.optional(),
|
|
395
|
+
gte: zod_1.z
|
|
396
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
|
|
397
|
+
.optional(),
|
|
398
|
+
between: zod_1.z
|
|
399
|
+
.union([
|
|
400
|
+
zod_1.z.array(zod_1.z.number().int().optional()).min(2).max(2),
|
|
401
|
+
zod_1.z.string().regex(RegExp('^\\[-?\\d+,-?\\d+\\]$')),
|
|
402
|
+
])
|
|
403
|
+
.optional(),
|
|
241
404
|
});
|
|
242
405
|
const ListPlanPeriodSchema = zod_1.z.object({
|
|
243
|
-
is: zod_1.z
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
406
|
+
is: zod_1.z
|
|
407
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
|
|
408
|
+
.optional(),
|
|
409
|
+
is_not: zod_1.z
|
|
410
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
|
|
411
|
+
.optional(),
|
|
412
|
+
lt: zod_1.z
|
|
413
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
|
|
414
|
+
.optional(),
|
|
415
|
+
lte: zod_1.z
|
|
416
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
|
|
417
|
+
.optional(),
|
|
418
|
+
gt: zod_1.z
|
|
419
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
|
|
420
|
+
.optional(),
|
|
421
|
+
gte: zod_1.z
|
|
422
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
|
|
423
|
+
.optional(),
|
|
424
|
+
between: zod_1.z
|
|
425
|
+
.union([
|
|
426
|
+
zod_1.z.array(zod_1.z.number().int().optional()).min(2).max(2),
|
|
427
|
+
zod_1.z.string().regex(RegExp('^\\[-?\\d+,-?\\d+\\]$')),
|
|
428
|
+
])
|
|
429
|
+
.optional(),
|
|
250
430
|
});
|
|
251
431
|
const ListPlanPeriodUnitSchema = zod_1.z.object({
|
|
252
432
|
is: zod_1.z.enum(['day', 'week', 'month', 'year']).optional(),
|
|
253
433
|
is_not: zod_1.z.enum(['day', 'week', 'month', 'year']).optional(),
|
|
254
|
-
in: zod_1.z
|
|
255
|
-
|
|
434
|
+
in: zod_1.z
|
|
435
|
+
.union([
|
|
436
|
+
zod_1.z.array(zod_1.z.enum(['day', 'week', 'month', 'year']).optional()),
|
|
437
|
+
zod_1.z.enum(['day', 'week', 'month', 'year']),
|
|
438
|
+
])
|
|
439
|
+
.optional(),
|
|
440
|
+
not_in: zod_1.z
|
|
441
|
+
.union([
|
|
442
|
+
zod_1.z.array(zod_1.z.enum(['day', 'week', 'month', 'year']).optional()),
|
|
443
|
+
zod_1.z.enum(['day', 'week', 'month', 'year']),
|
|
444
|
+
])
|
|
445
|
+
.optional(),
|
|
256
446
|
});
|
|
257
447
|
const ListPlanTrialPeriodSchema = zod_1.z.object({
|
|
258
|
-
is: zod_1.z
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
448
|
+
is: zod_1.z
|
|
449
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
|
|
450
|
+
.optional(),
|
|
451
|
+
is_not: zod_1.z
|
|
452
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
|
|
453
|
+
.optional(),
|
|
454
|
+
lt: zod_1.z
|
|
455
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
|
|
456
|
+
.optional(),
|
|
457
|
+
lte: zod_1.z
|
|
458
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
|
|
459
|
+
.optional(),
|
|
460
|
+
gt: zod_1.z
|
|
461
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
|
|
462
|
+
.optional(),
|
|
463
|
+
gte: zod_1.z
|
|
464
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
|
|
465
|
+
.optional(),
|
|
466
|
+
between: zod_1.z
|
|
467
|
+
.union([
|
|
468
|
+
zod_1.z.array(zod_1.z.number().int().optional()).min(2).max(2),
|
|
469
|
+
zod_1.z.string().regex(RegExp('^\\[-?\\d+,-?\\d+\\]$')),
|
|
470
|
+
])
|
|
471
|
+
.optional(),
|
|
472
|
+
is_present: zod_1.z.union([zod_1.z.boolean(), zod_1.z.enum(['true', 'false'])]).optional(),
|
|
266
473
|
});
|
|
267
474
|
const ListPlanTrialPeriodUnitSchema = zod_1.z.object({
|
|
268
475
|
is: zod_1.z.enum(['day', 'month']).optional(),
|
|
269
476
|
is_not: zod_1.z.enum(['day', 'month']).optional(),
|
|
270
|
-
in: zod_1.z
|
|
271
|
-
|
|
477
|
+
in: zod_1.z
|
|
478
|
+
.union([
|
|
479
|
+
zod_1.z.array(zod_1.z.enum(['day', 'month']).optional()),
|
|
480
|
+
zod_1.z.enum(['day', 'month']),
|
|
481
|
+
])
|
|
482
|
+
.optional(),
|
|
483
|
+
not_in: zod_1.z
|
|
484
|
+
.union([
|
|
485
|
+
zod_1.z.array(zod_1.z.enum(['day', 'month']).optional()),
|
|
486
|
+
zod_1.z.enum(['day', 'month']),
|
|
487
|
+
])
|
|
488
|
+
.optional(),
|
|
272
489
|
});
|
|
273
490
|
const ListPlanAddonApplicabilitySchema = zod_1.z.object({
|
|
274
491
|
is: zod_1.z.enum(['all', 'restricted']).optional(),
|
|
275
492
|
is_not: zod_1.z.enum(['all', 'restricted']).optional(),
|
|
276
|
-
in: zod_1.z
|
|
277
|
-
|
|
493
|
+
in: zod_1.z
|
|
494
|
+
.union([
|
|
495
|
+
zod_1.z.array(zod_1.z.enum(['all', 'restricted']).optional()),
|
|
496
|
+
zod_1.z.enum(['all', 'restricted']),
|
|
497
|
+
])
|
|
498
|
+
.optional(),
|
|
499
|
+
not_in: zod_1.z
|
|
500
|
+
.union([
|
|
501
|
+
zod_1.z.array(zod_1.z.enum(['all', 'restricted']).optional()),
|
|
502
|
+
zod_1.z.enum(['all', 'restricted']),
|
|
503
|
+
])
|
|
504
|
+
.optional(),
|
|
278
505
|
});
|
|
279
506
|
const ListPlanGiftableSchema = zod_1.z.object({
|
|
280
|
-
is: zod_1.z.enum(['true', 'false']).optional(),
|
|
507
|
+
is: zod_1.z.union([zod_1.z.boolean(), zod_1.z.enum(['true', 'false'])]).optional(),
|
|
281
508
|
});
|
|
282
509
|
const ListPlanChargeModelSchema = zod_1.z.object({
|
|
283
510
|
is: zod_1.z
|
|
@@ -287,10 +514,20 @@ const ListPlanChargeModelSchema = zod_1.z.object({
|
|
|
287
514
|
.enum(['flat_fee', 'per_unit', 'tiered', 'volume', 'stairstep'])
|
|
288
515
|
.optional(),
|
|
289
516
|
in: zod_1.z
|
|
290
|
-
.
|
|
517
|
+
.union([
|
|
518
|
+
zod_1.z.array(zod_1.z
|
|
519
|
+
.enum(['flat_fee', 'per_unit', 'tiered', 'volume', 'stairstep'])
|
|
520
|
+
.optional()),
|
|
521
|
+
zod_1.z.enum(['flat_fee', 'per_unit', 'tiered', 'volume', 'stairstep']),
|
|
522
|
+
])
|
|
291
523
|
.optional(),
|
|
292
524
|
not_in: zod_1.z
|
|
293
|
-
.
|
|
525
|
+
.union([
|
|
526
|
+
zod_1.z.array(zod_1.z
|
|
527
|
+
.enum(['flat_fee', 'per_unit', 'tiered', 'volume', 'stairstep'])
|
|
528
|
+
.optional()),
|
|
529
|
+
zod_1.z.enum(['flat_fee', 'per_unit', 'tiered', 'volume', 'stairstep']),
|
|
530
|
+
])
|
|
294
531
|
.optional(),
|
|
295
532
|
});
|
|
296
533
|
const ListPlanPricingModelSchema = zod_1.z.object({
|
|
@@ -301,36 +538,87 @@ const ListPlanPricingModelSchema = zod_1.z.object({
|
|
|
301
538
|
.enum(['flat_fee', 'per_unit', 'tiered', 'volume', 'stairstep'])
|
|
302
539
|
.optional(),
|
|
303
540
|
in: zod_1.z
|
|
304
|
-
.
|
|
541
|
+
.union([
|
|
542
|
+
zod_1.z.array(zod_1.z
|
|
543
|
+
.enum(['flat_fee', 'per_unit', 'tiered', 'volume', 'stairstep'])
|
|
544
|
+
.optional()),
|
|
545
|
+
zod_1.z.enum(['flat_fee', 'per_unit', 'tiered', 'volume', 'stairstep']),
|
|
546
|
+
])
|
|
305
547
|
.optional(),
|
|
306
548
|
not_in: zod_1.z
|
|
307
|
-
.
|
|
549
|
+
.union([
|
|
550
|
+
zod_1.z.array(zod_1.z
|
|
551
|
+
.enum(['flat_fee', 'per_unit', 'tiered', 'volume', 'stairstep'])
|
|
552
|
+
.optional()),
|
|
553
|
+
zod_1.z.enum(['flat_fee', 'per_unit', 'tiered', 'volume', 'stairstep']),
|
|
554
|
+
])
|
|
308
555
|
.optional(),
|
|
309
556
|
});
|
|
310
557
|
const ListPlanStatusSchema = zod_1.z.object({
|
|
311
558
|
is: zod_1.z.enum(['active', 'archived', 'deleted']).optional(),
|
|
312
559
|
is_not: zod_1.z.enum(['active', 'archived', 'deleted']).optional(),
|
|
313
|
-
in: zod_1.z
|
|
314
|
-
|
|
560
|
+
in: zod_1.z
|
|
561
|
+
.union([
|
|
562
|
+
zod_1.z.array(zod_1.z.enum(['active', 'archived', 'deleted']).optional()),
|
|
563
|
+
zod_1.z.enum(['active', 'archived', 'deleted']),
|
|
564
|
+
])
|
|
565
|
+
.optional(),
|
|
566
|
+
not_in: zod_1.z
|
|
567
|
+
.union([
|
|
568
|
+
zod_1.z.array(zod_1.z.enum(['active', 'archived', 'deleted']).optional()),
|
|
569
|
+
zod_1.z.enum(['active', 'archived', 'deleted']),
|
|
570
|
+
])
|
|
571
|
+
.optional(),
|
|
315
572
|
});
|
|
316
573
|
const ListPlanUpdatedAtSchema = zod_1.z.object({
|
|
317
|
-
after: zod_1.z
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
574
|
+
after: zod_1.z
|
|
575
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
|
|
576
|
+
.optional(),
|
|
577
|
+
before: zod_1.z
|
|
578
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
|
|
579
|
+
.optional(),
|
|
580
|
+
on: zod_1.z
|
|
581
|
+
.union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
|
|
582
|
+
.optional(),
|
|
583
|
+
between: zod_1.z
|
|
584
|
+
.union([
|
|
585
|
+
zod_1.z.array(zod_1.z.number().int().optional()).min(2).max(2),
|
|
586
|
+
zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')),
|
|
587
|
+
])
|
|
588
|
+
.optional(),
|
|
321
589
|
});
|
|
322
590
|
const ListPlanCurrencyCodeSchema = zod_1.z.object({
|
|
323
591
|
is: zod_1.z.string().min(1).optional(),
|
|
324
592
|
is_not: zod_1.z.string().min(1).optional(),
|
|
325
593
|
starts_with: zod_1.z.string().min(1).optional(),
|
|
326
|
-
in: zod_1.z
|
|
327
|
-
|
|
594
|
+
in: zod_1.z
|
|
595
|
+
.union([
|
|
596
|
+
zod_1.z.array(zod_1.z.string().optional()),
|
|
597
|
+
zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
598
|
+
])
|
|
599
|
+
.optional(),
|
|
600
|
+
not_in: zod_1.z
|
|
601
|
+
.union([
|
|
602
|
+
zod_1.z.array(zod_1.z.string().optional()),
|
|
603
|
+
zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
604
|
+
])
|
|
605
|
+
.optional(),
|
|
328
606
|
});
|
|
329
607
|
const ListPlanChannelSchema = zod_1.z.object({
|
|
330
608
|
is: zod_1.z.enum(['web', 'app_store', 'play_store']).optional(),
|
|
331
609
|
is_not: zod_1.z.enum(['web', 'app_store', 'play_store']).optional(),
|
|
332
|
-
in: zod_1.z
|
|
333
|
-
|
|
610
|
+
in: zod_1.z
|
|
611
|
+
.union([
|
|
612
|
+
zod_1.z.array(zod_1.z.enum(['web', 'app_store', 'play_store']).optional()),
|
|
613
|
+
zod_1.z.enum(['web', 'app_store', 'play_store']),
|
|
614
|
+
])
|
|
615
|
+
.optional(),
|
|
616
|
+
not_in: zod_1.z
|
|
617
|
+
.union([
|
|
618
|
+
zod_1.z.array(zod_1.z.enum(['web', 'app_store', 'play_store']).optional()),
|
|
619
|
+
zod_1.z.enum(['web', 'app_store', 'play_store']),
|
|
620
|
+
])
|
|
621
|
+
.optional(),
|
|
334
622
|
});
|
|
335
623
|
const ListPlanBodySchema = zod_1.z.looseObject({
|
|
336
624
|
limit: zod_1.z.number().int().min(1).max(100).optional(),
|