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
|
@@ -7,6 +7,12 @@ const CreateItemMetadataSchema = z.looseObject({});
|
|
|
7
7
|
const CreateItemBundleConfigurationSchema = z.object({
|
|
8
8
|
type: z.enum(['fixed']).optional(),
|
|
9
9
|
});
|
|
10
|
+
const CreateItemBundleItemsToAddItemSchema = z.object({
|
|
11
|
+
item_id: z.string().max(100).optional(),
|
|
12
|
+
item_type: z.enum(['plan', 'addon', 'charge']).optional(),
|
|
13
|
+
quantity: z.number().int().min(1).optional(),
|
|
14
|
+
price_allocation: z.number().min(0).max(100).optional(),
|
|
15
|
+
});
|
|
10
16
|
const CreateItemBundleItemsToAddSchema = z.object({
|
|
11
17
|
item_id: z.array(z.string().max(100).optional()).optional(),
|
|
12
18
|
item_type: z.array(z.enum(['plan', 'addon', 'charge']).optional()).optional(),
|
|
@@ -38,7 +44,12 @@ const CreateItemBodySchema = z.looseObject({
|
|
|
38
44
|
metadata: CreateItemMetadataSchema.optional(),
|
|
39
45
|
business_entity_id: z.string().max(50).optional(),
|
|
40
46
|
bundle_configuration: CreateItemBundleConfigurationSchema.optional(),
|
|
41
|
-
bundle_items_to_add:
|
|
47
|
+
bundle_items_to_add: z
|
|
48
|
+
.union([
|
|
49
|
+
z.array(CreateItemBundleItemsToAddItemSchema.optional()),
|
|
50
|
+
CreateItemBundleItemsToAddSchema,
|
|
51
|
+
])
|
|
52
|
+
.optional(),
|
|
42
53
|
});
|
|
43
54
|
export { CreateItemBodySchema };
|
|
44
55
|
//Item.update
|
|
@@ -46,18 +57,34 @@ const UpdateItemMetadataSchema = z.looseObject({});
|
|
|
46
57
|
const UpdateItemBundleConfigurationSchema = z.object({
|
|
47
58
|
type: z.enum(['fixed']).optional(),
|
|
48
59
|
});
|
|
60
|
+
const UpdateItemBundleItemsToAddItemSchema = z.object({
|
|
61
|
+
item_id: z.string().max(100).optional(),
|
|
62
|
+
item_type: z.enum(['plan', 'addon', 'charge']).optional(),
|
|
63
|
+
quantity: z.number().int().min(1).optional(),
|
|
64
|
+
price_allocation: z.number().min(0).max(100).optional(),
|
|
65
|
+
});
|
|
49
66
|
const UpdateItemBundleItemsToAddSchema = z.object({
|
|
50
67
|
item_id: z.array(z.string().max(100).optional()).optional(),
|
|
51
68
|
item_type: z.array(z.enum(['plan', 'addon', 'charge']).optional()).optional(),
|
|
52
69
|
quantity: z.array(z.number().int().min(1).optional()).optional(),
|
|
53
70
|
price_allocation: z.array(z.number().min(0).max(100).optional()).optional(),
|
|
54
71
|
});
|
|
72
|
+
const UpdateItemBundleItemsToUpdateItemSchema = z.object({
|
|
73
|
+
item_id: z.string().max(100).optional(),
|
|
74
|
+
item_type: z.enum(['plan', 'addon', 'charge']).optional(),
|
|
75
|
+
quantity: z.number().int().min(1).optional(),
|
|
76
|
+
price_allocation: z.number().min(0).max(100).optional(),
|
|
77
|
+
});
|
|
55
78
|
const UpdateItemBundleItemsToUpdateSchema = z.object({
|
|
56
79
|
item_id: z.array(z.string().max(100).optional()).optional(),
|
|
57
80
|
item_type: z.array(z.enum(['plan', 'addon', 'charge']).optional()).optional(),
|
|
58
81
|
quantity: z.array(z.number().int().min(1).optional()).optional(),
|
|
59
82
|
price_allocation: z.array(z.number().min(0).max(100).optional()).optional(),
|
|
60
83
|
});
|
|
84
|
+
const UpdateItemBundleItemsToRemoveItemSchema = z.object({
|
|
85
|
+
item_id: z.string().max(100).optional(),
|
|
86
|
+
item_type: z.enum(['plan', 'addon', 'charge']).optional(),
|
|
87
|
+
});
|
|
61
88
|
const UpdateItemBundleItemsToRemoveSchema = z.object({
|
|
62
89
|
item_id: z.array(z.string().max(100).optional()).optional(),
|
|
63
90
|
item_type: z.array(z.enum(['plan', 'addon', 'charge']).optional()).optional(),
|
|
@@ -81,9 +108,24 @@ const UpdateItemBodySchema = z.looseObject({
|
|
|
81
108
|
status: z.enum(['active', 'archived']).optional(),
|
|
82
109
|
is_percentage_pricing: z.boolean().default(false).optional(),
|
|
83
110
|
bundle_configuration: UpdateItemBundleConfigurationSchema.optional(),
|
|
84
|
-
bundle_items_to_add:
|
|
85
|
-
|
|
86
|
-
|
|
111
|
+
bundle_items_to_add: z
|
|
112
|
+
.union([
|
|
113
|
+
z.array(UpdateItemBundleItemsToAddItemSchema.optional()),
|
|
114
|
+
UpdateItemBundleItemsToAddSchema,
|
|
115
|
+
])
|
|
116
|
+
.optional(),
|
|
117
|
+
bundle_items_to_update: z
|
|
118
|
+
.union([
|
|
119
|
+
z.array(UpdateItemBundleItemsToUpdateItemSchema.optional()),
|
|
120
|
+
UpdateItemBundleItemsToUpdateSchema,
|
|
121
|
+
])
|
|
122
|
+
.optional(),
|
|
123
|
+
bundle_items_to_remove: z
|
|
124
|
+
.union([
|
|
125
|
+
z.array(UpdateItemBundleItemsToRemoveItemSchema.optional()),
|
|
126
|
+
UpdateItemBundleItemsToRemoveSchema,
|
|
127
|
+
])
|
|
128
|
+
.optional(),
|
|
87
129
|
});
|
|
88
130
|
export { UpdateItemBodySchema };
|
|
89
131
|
//Item.list
|
|
@@ -91,21 +133,51 @@ const ListItemIdSchema = z.object({
|
|
|
91
133
|
is: z.string().min(1).optional(),
|
|
92
134
|
is_not: z.string().min(1).optional(),
|
|
93
135
|
starts_with: z.string().min(1).optional(),
|
|
94
|
-
in: z
|
|
95
|
-
|
|
136
|
+
in: z
|
|
137
|
+
.union([
|
|
138
|
+
z.array(z.string().optional()),
|
|
139
|
+
z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
140
|
+
])
|
|
141
|
+
.optional(),
|
|
142
|
+
not_in: z
|
|
143
|
+
.union([
|
|
144
|
+
z.array(z.string().optional()),
|
|
145
|
+
z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
146
|
+
])
|
|
147
|
+
.optional(),
|
|
96
148
|
});
|
|
97
149
|
const ListItemItemFamilyIdSchema = z.object({
|
|
98
150
|
is: z.string().min(1).optional(),
|
|
99
151
|
is_not: z.string().min(1).optional(),
|
|
100
152
|
starts_with: z.string().min(1).optional(),
|
|
101
|
-
in: z
|
|
102
|
-
|
|
153
|
+
in: z
|
|
154
|
+
.union([
|
|
155
|
+
z.array(z.string().optional()),
|
|
156
|
+
z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
157
|
+
])
|
|
158
|
+
.optional(),
|
|
159
|
+
not_in: z
|
|
160
|
+
.union([
|
|
161
|
+
z.array(z.string().optional()),
|
|
162
|
+
z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
163
|
+
])
|
|
164
|
+
.optional(),
|
|
103
165
|
});
|
|
104
166
|
const ListItemTypeSchema = z.object({
|
|
105
167
|
is: z.enum(['plan', 'addon', 'charge']).optional(),
|
|
106
168
|
is_not: z.enum(['plan', 'addon', 'charge']).optional(),
|
|
107
|
-
in: z
|
|
108
|
-
|
|
169
|
+
in: z
|
|
170
|
+
.union([
|
|
171
|
+
z.array(z.enum(['plan', 'addon', 'charge']).optional()),
|
|
172
|
+
z.enum(['plan', 'addon', 'charge']),
|
|
173
|
+
])
|
|
174
|
+
.optional(),
|
|
175
|
+
not_in: z
|
|
176
|
+
.union([
|
|
177
|
+
z.array(z.enum(['plan', 'addon', 'charge']).optional()),
|
|
178
|
+
z.enum(['plan', 'addon', 'charge']),
|
|
179
|
+
])
|
|
180
|
+
.optional(),
|
|
109
181
|
});
|
|
110
182
|
const ListItemNameSchema = z.object({
|
|
111
183
|
is: z.string().min(1).optional(),
|
|
@@ -115,51 +187,102 @@ const ListItemNameSchema = z.object({
|
|
|
115
187
|
const ListItemItemApplicabilitySchema = z.object({
|
|
116
188
|
is: z.enum(['all', 'restricted']).optional(),
|
|
117
189
|
is_not: z.enum(['all', 'restricted']).optional(),
|
|
118
|
-
in: z
|
|
119
|
-
|
|
190
|
+
in: z
|
|
191
|
+
.union([
|
|
192
|
+
z.array(z.enum(['all', 'restricted']).optional()),
|
|
193
|
+
z.enum(['all', 'restricted']),
|
|
194
|
+
])
|
|
195
|
+
.optional(),
|
|
196
|
+
not_in: z
|
|
197
|
+
.union([
|
|
198
|
+
z.array(z.enum(['all', 'restricted']).optional()),
|
|
199
|
+
z.enum(['all', 'restricted']),
|
|
200
|
+
])
|
|
201
|
+
.optional(),
|
|
120
202
|
});
|
|
121
203
|
const ListItemStatusSchema = z.object({
|
|
122
204
|
is: z.enum(['active', 'archived', 'deleted']).optional(),
|
|
123
205
|
is_not: z.enum(['active', 'archived', 'deleted']).optional(),
|
|
124
|
-
in: z
|
|
125
|
-
|
|
206
|
+
in: z
|
|
207
|
+
.union([
|
|
208
|
+
z.array(z.enum(['active', 'archived', 'deleted']).optional()),
|
|
209
|
+
z.enum(['active', 'archived', 'deleted']),
|
|
210
|
+
])
|
|
211
|
+
.optional(),
|
|
212
|
+
not_in: z
|
|
213
|
+
.union([
|
|
214
|
+
z.array(z.enum(['active', 'archived', 'deleted']).optional()),
|
|
215
|
+
z.enum(['active', 'archived', 'deleted']),
|
|
216
|
+
])
|
|
217
|
+
.optional(),
|
|
126
218
|
});
|
|
127
219
|
const ListItemIsGiftableSchema = z.object({
|
|
128
|
-
is: z.enum(['true', 'false']).optional(),
|
|
220
|
+
is: z.union([z.boolean(), z.enum(['true', 'false'])]).optional(),
|
|
129
221
|
});
|
|
130
222
|
const ListItemUpdatedAtSchema = z.object({
|
|
131
|
-
after: z
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
223
|
+
after: z
|
|
224
|
+
.union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
|
|
225
|
+
.optional(),
|
|
226
|
+
before: z
|
|
227
|
+
.union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
|
|
228
|
+
.optional(),
|
|
229
|
+
on: z
|
|
230
|
+
.union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
|
|
231
|
+
.optional(),
|
|
232
|
+
between: z
|
|
233
|
+
.union([
|
|
234
|
+
z.array(z.number().int().optional()).min(2).max(2),
|
|
235
|
+
z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')),
|
|
236
|
+
])
|
|
237
|
+
.optional(),
|
|
135
238
|
});
|
|
136
239
|
const ListItemEnabledForCheckoutSchema = z.object({
|
|
137
|
-
is: z.enum(['true', 'false']).optional(),
|
|
240
|
+
is: z.union([z.boolean(), z.enum(['true', 'false'])]).optional(),
|
|
138
241
|
});
|
|
139
242
|
const ListItemEnabledInPortalSchema = z.object({
|
|
140
|
-
is: z.enum(['true', 'false']).optional(),
|
|
243
|
+
is: z.union([z.boolean(), z.enum(['true', 'false'])]).optional(),
|
|
141
244
|
});
|
|
142
245
|
const ListItemMeteredSchema = z.object({
|
|
143
|
-
is: z.enum(['true', 'false']).optional(),
|
|
246
|
+
is: z.union([z.boolean(), z.enum(['true', 'false'])]).optional(),
|
|
144
247
|
});
|
|
145
248
|
const ListItemUsageCalculationSchema = z.object({
|
|
146
249
|
is: z.enum(['sum_of_usages', 'last_usage', 'max_usage']).optional(),
|
|
147
250
|
is_not: z.enum(['sum_of_usages', 'last_usage', 'max_usage']).optional(),
|
|
148
|
-
in: z
|
|
149
|
-
|
|
251
|
+
in: z
|
|
252
|
+
.union([
|
|
253
|
+
z.array(z.enum(['sum_of_usages', 'last_usage', 'max_usage']).optional()),
|
|
254
|
+
z.enum(['sum_of_usages', 'last_usage', 'max_usage']),
|
|
255
|
+
])
|
|
256
|
+
.optional(),
|
|
257
|
+
not_in: z
|
|
258
|
+
.union([
|
|
259
|
+
z.array(z.enum(['sum_of_usages', 'last_usage', 'max_usage']).optional()),
|
|
260
|
+
z.enum(['sum_of_usages', 'last_usage', 'max_usage']),
|
|
261
|
+
])
|
|
262
|
+
.optional(),
|
|
150
263
|
});
|
|
151
264
|
const ListItemChannelSchema = z.object({
|
|
152
265
|
is: z.enum(['web', 'app_store', 'play_store']).optional(),
|
|
153
266
|
is_not: z.enum(['web', 'app_store', 'play_store']).optional(),
|
|
154
|
-
in: z
|
|
155
|
-
|
|
267
|
+
in: z
|
|
268
|
+
.union([
|
|
269
|
+
z.array(z.enum(['web', 'app_store', 'play_store']).optional()),
|
|
270
|
+
z.enum(['web', 'app_store', 'play_store']),
|
|
271
|
+
])
|
|
272
|
+
.optional(),
|
|
273
|
+
not_in: z
|
|
274
|
+
.union([
|
|
275
|
+
z.array(z.enum(['web', 'app_store', 'play_store']).optional()),
|
|
276
|
+
z.enum(['web', 'app_store', 'play_store']),
|
|
277
|
+
])
|
|
278
|
+
.optional(),
|
|
156
279
|
});
|
|
157
280
|
const ListItemBusinessEntityIdSchema = z.object({
|
|
158
281
|
is: z.string().min(1).optional(),
|
|
159
|
-
is_present: z.enum(['true', 'false']).optional(),
|
|
282
|
+
is_present: z.union([z.boolean(), z.enum(['true', 'false'])]).optional(),
|
|
160
283
|
});
|
|
161
284
|
const ListItemIncludeSiteLevelResourcesSchema = z.object({
|
|
162
|
-
is: z.enum(['true', 'false']).optional(),
|
|
285
|
+
is: z.union([z.boolean(), z.enum(['true', 'false'])]).optional(),
|
|
163
286
|
});
|
|
164
287
|
const ListItemSortBySchema = z.looseObject({
|
|
165
288
|
asc: z.enum(['name', 'id', 'updated_at']).optional(),
|
|
@@ -18,6 +18,13 @@ const ItemEntitlementsForFeatureItemEntitlementBodySchema = z.looseObject({
|
|
|
18
18
|
});
|
|
19
19
|
export { ItemEntitlementsForFeatureItemEntitlementBodySchema };
|
|
20
20
|
//ItemEntitlement.addItemEntitlements
|
|
21
|
+
const AddItemEntitlementsItemEntitlementItemEntitlementsItemSchema = z.object({
|
|
22
|
+
item_id: z.string().max(100),
|
|
23
|
+
item_type: z
|
|
24
|
+
.enum(['plan', 'addon', 'charge', 'subscription', 'item'])
|
|
25
|
+
.optional(),
|
|
26
|
+
value: z.string().max(50).optional(),
|
|
27
|
+
});
|
|
21
28
|
const AddItemEntitlementsItemEntitlementItemEntitlementsSchema = z.object({
|
|
22
29
|
item_id: z.array(z.string().max(100).optional()),
|
|
23
30
|
item_type: z
|
|
@@ -27,16 +34,30 @@ const AddItemEntitlementsItemEntitlementItemEntitlementsSchema = z.object({
|
|
|
27
34
|
});
|
|
28
35
|
const AddItemEntitlementsItemEntitlementBodySchema = z.looseObject({
|
|
29
36
|
action: z.enum(['upsert', 'remove']),
|
|
30
|
-
item_entitlements:
|
|
37
|
+
item_entitlements: z
|
|
38
|
+
.union([
|
|
39
|
+
z.array(AddItemEntitlementsItemEntitlementItemEntitlementsItemSchema.optional()),
|
|
40
|
+
AddItemEntitlementsItemEntitlementItemEntitlementsSchema,
|
|
41
|
+
])
|
|
42
|
+
.optional(),
|
|
31
43
|
});
|
|
32
44
|
export { AddItemEntitlementsItemEntitlementBodySchema };
|
|
33
45
|
//ItemEntitlement.upsertOrRemoveItemEntitlementsForItem
|
|
46
|
+
const UpsertOrRemoveItemEntitlementsForItemItemEntitlementItemEntitlementsItemSchema = z.object({
|
|
47
|
+
feature_id: z.string().max(50),
|
|
48
|
+
value: z.string().max(50).optional(),
|
|
49
|
+
});
|
|
34
50
|
const UpsertOrRemoveItemEntitlementsForItemItemEntitlementItemEntitlementsSchema = z.object({
|
|
35
51
|
feature_id: z.array(z.string().max(50).optional()),
|
|
36
52
|
value: z.array(z.string().max(50).optional()).optional(),
|
|
37
53
|
});
|
|
38
54
|
const UpsertOrRemoveItemEntitlementsForItemItemEntitlementBodySchema = z.looseObject({
|
|
39
55
|
action: z.enum(['upsert', 'remove']),
|
|
40
|
-
item_entitlements:
|
|
56
|
+
item_entitlements: z
|
|
57
|
+
.union([
|
|
58
|
+
z.array(UpsertOrRemoveItemEntitlementsForItemItemEntitlementItemEntitlementsItemSchema.optional()),
|
|
59
|
+
UpsertOrRemoveItemEntitlementsForItemItemEntitlementItemEntitlementsSchema,
|
|
60
|
+
])
|
|
61
|
+
.optional(),
|
|
41
62
|
});
|
|
42
63
|
export { UpsertOrRemoveItemEntitlementsForItemItemEntitlementBodySchema };
|
|
@@ -15,8 +15,18 @@ const ListItemFamilyIdSchema = z.object({
|
|
|
15
15
|
is: z.string().min(1).optional(),
|
|
16
16
|
is_not: z.string().min(1).optional(),
|
|
17
17
|
starts_with: z.string().min(1).optional(),
|
|
18
|
-
in: z
|
|
19
|
-
|
|
18
|
+
in: z
|
|
19
|
+
.union([
|
|
20
|
+
z.array(z.string().optional()),
|
|
21
|
+
z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
22
|
+
])
|
|
23
|
+
.optional(),
|
|
24
|
+
not_in: z
|
|
25
|
+
.union([
|
|
26
|
+
z.array(z.string().optional()),
|
|
27
|
+
z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
28
|
+
])
|
|
29
|
+
.optional(),
|
|
20
30
|
});
|
|
21
31
|
const ListItemFamilyNameSchema = z.object({
|
|
22
32
|
is: z.string().min(1).optional(),
|
|
@@ -24,17 +34,28 @@ const ListItemFamilyNameSchema = z.object({
|
|
|
24
34
|
starts_with: z.string().min(1).optional(),
|
|
25
35
|
});
|
|
26
36
|
const ListItemFamilyUpdatedAtSchema = z.object({
|
|
27
|
-
after: z
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
37
|
+
after: z
|
|
38
|
+
.union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
|
|
39
|
+
.optional(),
|
|
40
|
+
before: z
|
|
41
|
+
.union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
|
|
42
|
+
.optional(),
|
|
43
|
+
on: z
|
|
44
|
+
.union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
|
|
45
|
+
.optional(),
|
|
46
|
+
between: z
|
|
47
|
+
.union([
|
|
48
|
+
z.array(z.number().int().optional()).min(2).max(2),
|
|
49
|
+
z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')),
|
|
50
|
+
])
|
|
51
|
+
.optional(),
|
|
31
52
|
});
|
|
32
53
|
const ListItemFamilyBusinessEntityIdSchema = z.object({
|
|
33
54
|
is: z.string().min(1).optional(),
|
|
34
|
-
is_present: z.enum(['true', 'false']).optional(),
|
|
55
|
+
is_present: z.union([z.boolean(), z.enum(['true', 'false'])]).optional(),
|
|
35
56
|
});
|
|
36
57
|
const ListItemFamilyIncludeSiteLevelResourcesSchema = z.object({
|
|
37
|
-
is: z.enum(['true', 'false']).optional(),
|
|
58
|
+
is: z.union([z.boolean(), z.enum(['true', 'false'])]).optional(),
|
|
38
59
|
});
|
|
39
60
|
const ListItemFamilyBodySchema = z.looseObject({
|
|
40
61
|
limit: z.number().int().min(1).max(100).optional(),
|