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
|
@@ -23,6 +23,16 @@ const CreateItemPriceAccountingDetailSchema = z.object({
|
|
|
23
23
|
accounting_category3: z.string().max(100).optional(),
|
|
24
24
|
accounting_category4: z.string().max(100).optional(),
|
|
25
25
|
});
|
|
26
|
+
const CreateItemPriceTiersItemSchema = z.object({
|
|
27
|
+
starting_unit: z.number().int().min(1).optional(),
|
|
28
|
+
ending_unit: z.number().int().optional(),
|
|
29
|
+
price: z.number().int().min(0).optional(),
|
|
30
|
+
starting_unit_in_decimal: z.string().max(33).optional(),
|
|
31
|
+
ending_unit_in_decimal: z.string().max(33).optional(),
|
|
32
|
+
price_in_decimal: z.string().max(39).optional(),
|
|
33
|
+
pricing_type: z.enum(['per_unit', 'flat_fee', 'package']).optional(),
|
|
34
|
+
package_size: z.number().int().min(1).optional(),
|
|
35
|
+
});
|
|
26
36
|
const CreateItemPriceTiersSchema = z.object({
|
|
27
37
|
starting_unit: z.array(z.number().int().min(1).optional()).optional(),
|
|
28
38
|
ending_unit: z.array(z.number().int().optional()).optional(),
|
|
@@ -35,6 +45,11 @@ const CreateItemPriceTiersSchema = z.object({
|
|
|
35
45
|
.optional(),
|
|
36
46
|
package_size: z.array(z.number().int().min(1).optional()).optional(),
|
|
37
47
|
});
|
|
48
|
+
const CreateItemPriceTaxProvidersFieldsItemSchema = z.object({
|
|
49
|
+
provider_name: z.string().max(50),
|
|
50
|
+
field_id: z.string().max(50),
|
|
51
|
+
field_value: z.string().max(50),
|
|
52
|
+
});
|
|
38
53
|
const CreateItemPriceTaxProvidersFieldsSchema = z.object({
|
|
39
54
|
provider_name: z.array(z.string().max(50).optional()),
|
|
40
55
|
field_id: z.array(z.string().max(50).optional()),
|
|
@@ -79,8 +94,18 @@ const CreateItemPriceBodySchema = z.looseObject({
|
|
|
79
94
|
.optional(),
|
|
80
95
|
tax_detail: CreateItemPriceTaxDetailSchema.optional(),
|
|
81
96
|
accounting_detail: CreateItemPriceAccountingDetailSchema.optional(),
|
|
82
|
-
tiers:
|
|
83
|
-
|
|
97
|
+
tiers: z
|
|
98
|
+
.union([
|
|
99
|
+
z.array(CreateItemPriceTiersItemSchema.optional()),
|
|
100
|
+
CreateItemPriceTiersSchema,
|
|
101
|
+
])
|
|
102
|
+
.optional(),
|
|
103
|
+
tax_providers_fields: z
|
|
104
|
+
.union([
|
|
105
|
+
z.array(CreateItemPriceTaxProvidersFieldsItemSchema.optional()),
|
|
106
|
+
CreateItemPriceTaxProvidersFieldsSchema,
|
|
107
|
+
])
|
|
108
|
+
.optional(),
|
|
84
109
|
});
|
|
85
110
|
export { CreateItemPriceBodySchema };
|
|
86
111
|
//ItemPrice.update
|
|
@@ -104,6 +129,16 @@ const UpdateItemPriceAccountingDetailSchema = z.object({
|
|
|
104
129
|
accounting_category3: z.string().max(100).optional(),
|
|
105
130
|
accounting_category4: z.string().max(100).optional(),
|
|
106
131
|
});
|
|
132
|
+
const UpdateItemPriceTiersItemSchema = z.object({
|
|
133
|
+
starting_unit: z.number().int().min(1).optional(),
|
|
134
|
+
ending_unit: z.number().int().optional(),
|
|
135
|
+
price: z.number().int().min(0).optional(),
|
|
136
|
+
starting_unit_in_decimal: z.string().max(33).optional(),
|
|
137
|
+
ending_unit_in_decimal: z.string().max(33).optional(),
|
|
138
|
+
price_in_decimal: z.string().max(39).optional(),
|
|
139
|
+
pricing_type: z.enum(['per_unit', 'flat_fee', 'package']).optional(),
|
|
140
|
+
package_size: z.number().int().min(1).optional(),
|
|
141
|
+
});
|
|
107
142
|
const UpdateItemPriceTiersSchema = z.object({
|
|
108
143
|
starting_unit: z.array(z.number().int().min(1).optional()).optional(),
|
|
109
144
|
ending_unit: z.array(z.number().int().optional()).optional(),
|
|
@@ -116,6 +151,11 @@ const UpdateItemPriceTiersSchema = z.object({
|
|
|
116
151
|
.optional(),
|
|
117
152
|
package_size: z.array(z.number().int().min(1).optional()).optional(),
|
|
118
153
|
});
|
|
154
|
+
const UpdateItemPriceTaxProvidersFieldsItemSchema = z.object({
|
|
155
|
+
provider_name: z.string().max(50),
|
|
156
|
+
field_id: z.string().max(50),
|
|
157
|
+
field_value: z.string().max(50),
|
|
158
|
+
});
|
|
119
159
|
const UpdateItemPriceTaxProvidersFieldsSchema = z.object({
|
|
120
160
|
provider_name: z.array(z.string().max(50).optional()),
|
|
121
161
|
field_id: z.array(z.string().max(50).optional()),
|
|
@@ -158,8 +198,18 @@ const UpdateItemPriceBodySchema = z.looseObject({
|
|
|
158
198
|
show_description_in_quotes: z.boolean().optional(),
|
|
159
199
|
tax_detail: UpdateItemPriceTaxDetailSchema.optional(),
|
|
160
200
|
accounting_detail: UpdateItemPriceAccountingDetailSchema.optional(),
|
|
161
|
-
tiers:
|
|
162
|
-
|
|
201
|
+
tiers: z
|
|
202
|
+
.union([
|
|
203
|
+
z.array(UpdateItemPriceTiersItemSchema.optional()),
|
|
204
|
+
UpdateItemPriceTiersSchema,
|
|
205
|
+
])
|
|
206
|
+
.optional(),
|
|
207
|
+
tax_providers_fields: z
|
|
208
|
+
.union([
|
|
209
|
+
z.array(UpdateItemPriceTaxProvidersFieldsItemSchema.optional()),
|
|
210
|
+
UpdateItemPriceTaxProvidersFieldsSchema,
|
|
211
|
+
])
|
|
212
|
+
.optional(),
|
|
163
213
|
});
|
|
164
214
|
export { UpdateItemPriceBodySchema };
|
|
165
215
|
//ItemPrice.list
|
|
@@ -167,15 +217,35 @@ const ListItemPriceIdSchema = z.object({
|
|
|
167
217
|
is: z.string().min(1).optional(),
|
|
168
218
|
is_not: z.string().min(1).optional(),
|
|
169
219
|
starts_with: z.string().min(1).optional(),
|
|
170
|
-
in: z
|
|
171
|
-
|
|
220
|
+
in: z
|
|
221
|
+
.union([
|
|
222
|
+
z.array(z.string().optional()),
|
|
223
|
+
z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
224
|
+
])
|
|
225
|
+
.optional(),
|
|
226
|
+
not_in: z
|
|
227
|
+
.union([
|
|
228
|
+
z.array(z.string().optional()),
|
|
229
|
+
z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
230
|
+
])
|
|
231
|
+
.optional(),
|
|
172
232
|
});
|
|
173
233
|
const ListItemPriceNameSchema = z.object({
|
|
174
234
|
is: z.string().min(1).optional(),
|
|
175
235
|
is_not: z.string().min(1).optional(),
|
|
176
236
|
starts_with: z.string().min(1).optional(),
|
|
177
|
-
in: z
|
|
178
|
-
|
|
237
|
+
in: z
|
|
238
|
+
.union([
|
|
239
|
+
z.array(z.string().optional()),
|
|
240
|
+
z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
241
|
+
])
|
|
242
|
+
.optional(),
|
|
243
|
+
not_in: z
|
|
244
|
+
.union([
|
|
245
|
+
z.array(z.string().optional()),
|
|
246
|
+
z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
247
|
+
])
|
|
248
|
+
.optional(),
|
|
179
249
|
});
|
|
180
250
|
const ListItemPricePricingModelSchema = z.object({
|
|
181
251
|
is: z
|
|
@@ -185,100 +255,245 @@ const ListItemPricePricingModelSchema = z.object({
|
|
|
185
255
|
.enum(['flat_fee', 'per_unit', 'tiered', 'volume', 'stairstep'])
|
|
186
256
|
.optional(),
|
|
187
257
|
in: z
|
|
188
|
-
.
|
|
258
|
+
.union([
|
|
259
|
+
z.array(z
|
|
260
|
+
.enum(['flat_fee', 'per_unit', 'tiered', 'volume', 'stairstep'])
|
|
261
|
+
.optional()),
|
|
262
|
+
z.enum(['flat_fee', 'per_unit', 'tiered', 'volume', 'stairstep']),
|
|
263
|
+
])
|
|
189
264
|
.optional(),
|
|
190
265
|
not_in: z
|
|
191
|
-
.
|
|
266
|
+
.union([
|
|
267
|
+
z.array(z
|
|
268
|
+
.enum(['flat_fee', 'per_unit', 'tiered', 'volume', 'stairstep'])
|
|
269
|
+
.optional()),
|
|
270
|
+
z.enum(['flat_fee', 'per_unit', 'tiered', 'volume', 'stairstep']),
|
|
271
|
+
])
|
|
192
272
|
.optional(),
|
|
193
273
|
});
|
|
194
274
|
const ListItemPriceItemIdSchema = z.object({
|
|
195
275
|
is: z.string().min(1).optional(),
|
|
196
276
|
is_not: z.string().min(1).optional(),
|
|
197
277
|
starts_with: z.string().min(1).optional(),
|
|
198
|
-
in: z
|
|
199
|
-
|
|
278
|
+
in: z
|
|
279
|
+
.union([
|
|
280
|
+
z.array(z.string().optional()),
|
|
281
|
+
z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
282
|
+
])
|
|
283
|
+
.optional(),
|
|
284
|
+
not_in: z
|
|
285
|
+
.union([
|
|
286
|
+
z.array(z.string().optional()),
|
|
287
|
+
z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
288
|
+
])
|
|
289
|
+
.optional(),
|
|
200
290
|
});
|
|
201
291
|
const ListItemPriceItemFamilyIdSchema = z.object({
|
|
202
292
|
is: z.string().min(1).optional(),
|
|
203
293
|
is_not: z.string().min(1).optional(),
|
|
204
294
|
starts_with: z.string().min(1).optional(),
|
|
205
|
-
in: z
|
|
206
|
-
|
|
295
|
+
in: z
|
|
296
|
+
.union([
|
|
297
|
+
z.array(z.string().optional()),
|
|
298
|
+
z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
299
|
+
])
|
|
300
|
+
.optional(),
|
|
301
|
+
not_in: z
|
|
302
|
+
.union([
|
|
303
|
+
z.array(z.string().optional()),
|
|
304
|
+
z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
305
|
+
])
|
|
306
|
+
.optional(),
|
|
207
307
|
});
|
|
208
308
|
const ListItemPriceItemTypeSchema = z.object({
|
|
209
309
|
is: z.enum(['plan', 'addon', 'charge']).optional(),
|
|
210
310
|
is_not: z.enum(['plan', 'addon', 'charge']).optional(),
|
|
211
|
-
in: z
|
|
212
|
-
|
|
311
|
+
in: z
|
|
312
|
+
.union([
|
|
313
|
+
z.array(z.enum(['plan', 'addon', 'charge']).optional()),
|
|
314
|
+
z.enum(['plan', 'addon', 'charge']),
|
|
315
|
+
])
|
|
316
|
+
.optional(),
|
|
317
|
+
not_in: z
|
|
318
|
+
.union([
|
|
319
|
+
z.array(z.enum(['plan', 'addon', 'charge']).optional()),
|
|
320
|
+
z.enum(['plan', 'addon', 'charge']),
|
|
321
|
+
])
|
|
322
|
+
.optional(),
|
|
213
323
|
});
|
|
214
324
|
const ListItemPriceCurrencyCodeSchema = z.object({
|
|
215
325
|
is: z.string().min(1).optional(),
|
|
216
326
|
is_not: z.string().min(1).optional(),
|
|
217
327
|
starts_with: z.string().min(1).optional(),
|
|
218
|
-
in: z
|
|
219
|
-
|
|
328
|
+
in: z
|
|
329
|
+
.union([
|
|
330
|
+
z.array(z.string().optional()),
|
|
331
|
+
z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
332
|
+
])
|
|
333
|
+
.optional(),
|
|
334
|
+
not_in: z
|
|
335
|
+
.union([
|
|
336
|
+
z.array(z.string().optional()),
|
|
337
|
+
z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
338
|
+
])
|
|
339
|
+
.optional(),
|
|
220
340
|
});
|
|
221
341
|
const ListItemPricePriceVariantIdSchema = z.object({
|
|
222
342
|
is: z.string().min(1).optional(),
|
|
223
343
|
is_not: z.string().min(1).optional(),
|
|
224
344
|
starts_with: z.string().min(1).optional(),
|
|
225
|
-
in: z
|
|
226
|
-
|
|
345
|
+
in: z
|
|
346
|
+
.union([
|
|
347
|
+
z.array(z.string().optional()),
|
|
348
|
+
z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
349
|
+
])
|
|
350
|
+
.optional(),
|
|
351
|
+
not_in: z
|
|
352
|
+
.union([
|
|
353
|
+
z.array(z.string().optional()),
|
|
354
|
+
z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
|
|
355
|
+
])
|
|
356
|
+
.optional(),
|
|
227
357
|
});
|
|
228
358
|
const ListItemPriceTrialPeriodSchema = z.object({
|
|
229
|
-
is: z
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
359
|
+
is: z
|
|
360
|
+
.union([z.number().int(), z.string().regex(RegExp('^-?\\d+$'))])
|
|
361
|
+
.optional(),
|
|
362
|
+
is_not: z
|
|
363
|
+
.union([z.number().int(), z.string().regex(RegExp('^-?\\d+$'))])
|
|
364
|
+
.optional(),
|
|
365
|
+
lt: z
|
|
366
|
+
.union([z.number().int(), z.string().regex(RegExp('^-?\\d+$'))])
|
|
367
|
+
.optional(),
|
|
368
|
+
lte: z
|
|
369
|
+
.union([z.number().int(), z.string().regex(RegExp('^-?\\d+$'))])
|
|
370
|
+
.optional(),
|
|
371
|
+
gt: z
|
|
372
|
+
.union([z.number().int(), z.string().regex(RegExp('^-?\\d+$'))])
|
|
373
|
+
.optional(),
|
|
374
|
+
gte: z
|
|
375
|
+
.union([z.number().int(), z.string().regex(RegExp('^-?\\d+$'))])
|
|
376
|
+
.optional(),
|
|
377
|
+
between: z
|
|
378
|
+
.union([
|
|
379
|
+
z.array(z.number().int().optional()).min(2).max(2),
|
|
380
|
+
z.string().regex(RegExp('^\\[-?\\d+,-?\\d+\\]$')),
|
|
381
|
+
])
|
|
382
|
+
.optional(),
|
|
236
383
|
});
|
|
237
384
|
const ListItemPriceTrialPeriodUnitSchema = z.object({
|
|
238
385
|
is: z.enum(['day', 'month']).optional(),
|
|
239
386
|
is_not: z.enum(['day', 'month']).optional(),
|
|
240
|
-
in: z
|
|
241
|
-
|
|
387
|
+
in: z
|
|
388
|
+
.union([
|
|
389
|
+
z.array(z.enum(['day', 'month']).optional()),
|
|
390
|
+
z.enum(['day', 'month']),
|
|
391
|
+
])
|
|
392
|
+
.optional(),
|
|
393
|
+
not_in: z
|
|
394
|
+
.union([
|
|
395
|
+
z.array(z.enum(['day', 'month']).optional()),
|
|
396
|
+
z.enum(['day', 'month']),
|
|
397
|
+
])
|
|
398
|
+
.optional(),
|
|
242
399
|
});
|
|
243
400
|
const ListItemPriceStatusSchema = z.object({
|
|
244
401
|
is: z.enum(['active', 'archived', 'deleted']).optional(),
|
|
245
402
|
is_not: z.enum(['active', 'archived', 'deleted']).optional(),
|
|
246
|
-
in: z
|
|
247
|
-
|
|
403
|
+
in: z
|
|
404
|
+
.union([
|
|
405
|
+
z.array(z.enum(['active', 'archived', 'deleted']).optional()),
|
|
406
|
+
z.enum(['active', 'archived', 'deleted']),
|
|
407
|
+
])
|
|
408
|
+
.optional(),
|
|
409
|
+
not_in: z
|
|
410
|
+
.union([
|
|
411
|
+
z.array(z.enum(['active', 'archived', 'deleted']).optional()),
|
|
412
|
+
z.enum(['active', 'archived', 'deleted']),
|
|
413
|
+
])
|
|
414
|
+
.optional(),
|
|
248
415
|
});
|
|
249
416
|
const ListItemPriceUpdatedAtSchema = z.object({
|
|
250
|
-
after: z
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
417
|
+
after: z
|
|
418
|
+
.union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
|
|
419
|
+
.optional(),
|
|
420
|
+
before: z
|
|
421
|
+
.union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
|
|
422
|
+
.optional(),
|
|
423
|
+
on: z
|
|
424
|
+
.union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
|
|
425
|
+
.optional(),
|
|
426
|
+
between: z
|
|
427
|
+
.union([
|
|
428
|
+
z.array(z.number().int().optional()).min(2).max(2),
|
|
429
|
+
z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')),
|
|
430
|
+
])
|
|
431
|
+
.optional(),
|
|
254
432
|
});
|
|
255
433
|
const ListItemPriceBusinessEntityIdSchema = z.object({
|
|
256
|
-
is_present: z.enum(['true', 'false']).optional(),
|
|
257
434
|
is: z.string().min(1).optional(),
|
|
435
|
+
is_present: z.union([z.boolean(), z.enum(['true', 'false'])]).optional(),
|
|
258
436
|
});
|
|
259
437
|
const ListItemPriceIncludeSiteLevelResourcesSchema = z.object({
|
|
260
|
-
is: z.enum(['true', 'false']).optional(),
|
|
438
|
+
is: z.union([z.boolean(), z.enum(['true', 'false'])]).optional(),
|
|
261
439
|
});
|
|
262
440
|
const ListItemPricePeriodUnitSchema = z.object({
|
|
263
441
|
is: z.enum(['day', 'week', 'month', 'year']).optional(),
|
|
264
442
|
is_not: z.enum(['day', 'week', 'month', 'year']).optional(),
|
|
265
|
-
in: z
|
|
266
|
-
|
|
443
|
+
in: z
|
|
444
|
+
.union([
|
|
445
|
+
z.array(z.enum(['day', 'week', 'month', 'year']).optional()),
|
|
446
|
+
z.enum(['day', 'week', 'month', 'year']),
|
|
447
|
+
])
|
|
448
|
+
.optional(),
|
|
449
|
+
not_in: z
|
|
450
|
+
.union([
|
|
451
|
+
z.array(z.enum(['day', 'week', 'month', 'year']).optional()),
|
|
452
|
+
z.enum(['day', 'week', 'month', 'year']),
|
|
453
|
+
])
|
|
454
|
+
.optional(),
|
|
267
455
|
});
|
|
268
456
|
const ListItemPricePeriodSchema = z.object({
|
|
269
|
-
is: z
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
457
|
+
is: z
|
|
458
|
+
.union([z.number().int(), z.string().regex(RegExp('^-?\\d+$'))])
|
|
459
|
+
.optional(),
|
|
460
|
+
is_not: z
|
|
461
|
+
.union([z.number().int(), z.string().regex(RegExp('^-?\\d+$'))])
|
|
462
|
+
.optional(),
|
|
463
|
+
lt: z
|
|
464
|
+
.union([z.number().int(), z.string().regex(RegExp('^-?\\d+$'))])
|
|
465
|
+
.optional(),
|
|
466
|
+
lte: z
|
|
467
|
+
.union([z.number().int(), z.string().regex(RegExp('^-?\\d+$'))])
|
|
468
|
+
.optional(),
|
|
469
|
+
gt: z
|
|
470
|
+
.union([z.number().int(), z.string().regex(RegExp('^-?\\d+$'))])
|
|
471
|
+
.optional(),
|
|
472
|
+
gte: z
|
|
473
|
+
.union([z.number().int(), z.string().regex(RegExp('^-?\\d+$'))])
|
|
474
|
+
.optional(),
|
|
475
|
+
between: z
|
|
476
|
+
.union([
|
|
477
|
+
z.array(z.number().int().optional()).min(2).max(2),
|
|
478
|
+
z.string().regex(RegExp('^\\[-?\\d+,-?\\d+\\]$')),
|
|
479
|
+
])
|
|
480
|
+
.optional(),
|
|
276
481
|
});
|
|
277
482
|
const ListItemPriceChannelSchema = z.object({
|
|
278
483
|
is: z.enum(['web', 'app_store', 'play_store']).optional(),
|
|
279
484
|
is_not: z.enum(['web', 'app_store', 'play_store']).optional(),
|
|
280
|
-
in: z
|
|
281
|
-
|
|
485
|
+
in: z
|
|
486
|
+
.union([
|
|
487
|
+
z.array(z.enum(['web', 'app_store', 'play_store']).optional()),
|
|
488
|
+
z.enum(['web', 'app_store', 'play_store']),
|
|
489
|
+
])
|
|
490
|
+
.optional(),
|
|
491
|
+
not_in: z
|
|
492
|
+
.union([
|
|
493
|
+
z.array(z.enum(['web', 'app_store', 'play_store']).optional()),
|
|
494
|
+
z.enum(['web', 'app_store', 'play_store']),
|
|
495
|
+
])
|
|
496
|
+
.optional(),
|
|
282
497
|
});
|
|
283
498
|
const ListItemPriceSortBySchema = z.looseObject({
|
|
284
499
|
asc: z.enum(['name', 'id', 'updated_at']).optional(),
|
|
@@ -10,24 +10,51 @@ const ListLedgerOperationsLedgerOperationUnitIdSchema = z.object({
|
|
|
10
10
|
is: z.string().min(1).optional(),
|
|
11
11
|
});
|
|
12
12
|
const ListLedgerOperationsLedgerOperationCreatedAtSchema = z.object({
|
|
13
|
-
after: z
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
after: z
|
|
14
|
+
.union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
|
|
15
|
+
.optional(),
|
|
16
|
+
before: z
|
|
17
|
+
.union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
|
|
18
|
+
.optional(),
|
|
19
|
+
on: z
|
|
20
|
+
.union([z.number().int(), z.string().regex(RegExp('^\\d{10}$'))])
|
|
21
|
+
.optional(),
|
|
22
|
+
between: z
|
|
23
|
+
.union([
|
|
24
|
+
z.array(z.number().int().optional()).min(2).max(2),
|
|
25
|
+
z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')),
|
|
26
|
+
])
|
|
27
|
+
.optional(),
|
|
17
28
|
});
|
|
18
29
|
const ListLedgerOperationsLedgerOperationTypeSchema = z.object({
|
|
19
30
|
in: z
|
|
20
|
-
.
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
+
.union([
|
|
32
|
+
z.array(z
|
|
33
|
+
.enum([
|
|
34
|
+
'allocation',
|
|
35
|
+
'capture',
|
|
36
|
+
'authorize',
|
|
37
|
+
'release_authorization',
|
|
38
|
+
'capture_authorization',
|
|
39
|
+
'expiry',
|
|
40
|
+
'void',
|
|
41
|
+
'rollover',
|
|
42
|
+
'adjustment',
|
|
43
|
+
'overdraft_settlement',
|
|
44
|
+
])
|
|
45
|
+
.optional()),
|
|
46
|
+
z.enum([
|
|
47
|
+
'allocation',
|
|
48
|
+
'capture',
|
|
49
|
+
'authorize',
|
|
50
|
+
'release_authorization',
|
|
51
|
+
'capture_authorization',
|
|
52
|
+
'expiry',
|
|
53
|
+
'void',
|
|
54
|
+
'rollover',
|
|
55
|
+
'adjustment',
|
|
56
|
+
'overdraft_settlement',
|
|
57
|
+
]),
|
|
31
58
|
])
|
|
32
59
|
.optional(),
|
|
33
60
|
is: z
|
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
// Do not edit manually – regenerate via sdk-generator
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
//MeteredFeature.create
|
|
6
|
+
const CreateMeteredFeatureColumnDefinitionsItemSchema = z.object({
|
|
7
|
+
column_name: z.string().max(100),
|
|
8
|
+
data_type: z.enum(['number', 'string']),
|
|
9
|
+
});
|
|
6
10
|
const CreateMeteredFeatureColumnDefinitionsSchema = z.object({
|
|
7
11
|
column_name: z.array(z.string().max(100).optional()),
|
|
8
12
|
data_type: z.array(z.enum(['number', 'string']).optional()),
|
|
@@ -12,6 +16,11 @@ const CreateMeteredFeatureBodySchema = z.looseObject({
|
|
|
12
16
|
description: z.string().max(250).optional(),
|
|
13
17
|
feature_unit: z.string().max(50),
|
|
14
18
|
query: z.string().max(1000),
|
|
15
|
-
column_definitions:
|
|
19
|
+
column_definitions: z
|
|
20
|
+
.union([
|
|
21
|
+
z.array(CreateMeteredFeatureColumnDefinitionsItemSchema.optional()),
|
|
22
|
+
CreateMeteredFeatureColumnDefinitionsSchema,
|
|
23
|
+
])
|
|
24
|
+
.optional(),
|
|
16
25
|
});
|
|
17
26
|
export { CreateMeteredFeatureBodySchema };
|
|
@@ -11,10 +11,40 @@ const ListOmnichannelOneTimeOrderSourceSchema = z.object({
|
|
|
11
11
|
.enum(['apple_app_store', 'google_play_store', 'roku', 'amazon_app_store'])
|
|
12
12
|
.optional(),
|
|
13
13
|
in: z
|
|
14
|
-
.
|
|
14
|
+
.union([
|
|
15
|
+
z.array(z
|
|
16
|
+
.enum([
|
|
17
|
+
'apple_app_store',
|
|
18
|
+
'google_play_store',
|
|
19
|
+
'roku',
|
|
20
|
+
'amazon_app_store',
|
|
21
|
+
])
|
|
22
|
+
.optional()),
|
|
23
|
+
z.enum([
|
|
24
|
+
'apple_app_store',
|
|
25
|
+
'google_play_store',
|
|
26
|
+
'roku',
|
|
27
|
+
'amazon_app_store',
|
|
28
|
+
]),
|
|
29
|
+
])
|
|
15
30
|
.optional(),
|
|
16
31
|
not_in: z
|
|
17
|
-
.
|
|
32
|
+
.union([
|
|
33
|
+
z.array(z
|
|
34
|
+
.enum([
|
|
35
|
+
'apple_app_store',
|
|
36
|
+
'google_play_store',
|
|
37
|
+
'roku',
|
|
38
|
+
'amazon_app_store',
|
|
39
|
+
])
|
|
40
|
+
.optional()),
|
|
41
|
+
z.enum([
|
|
42
|
+
'apple_app_store',
|
|
43
|
+
'google_play_store',
|
|
44
|
+
'roku',
|
|
45
|
+
'amazon_app_store',
|
|
46
|
+
]),
|
|
47
|
+
])
|
|
18
48
|
.optional(),
|
|
19
49
|
});
|
|
20
50
|
const ListOmnichannelOneTimeOrderCustomerIdSchema = z.object({
|