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