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.
Files changed (152) hide show
  1. package/CHANGELOG.md +65 -0
  2. package/cjs/environment.js +1 -1
  3. package/cjs/resources/api_endpoints.js +56 -0
  4. package/cjs/resources/webhook/eventType.js +2 -0
  5. package/cjs/schema/addon.schema.js +221 -40
  6. package/cjs/schema/alert.schema.js +17 -2
  7. package/cjs/schema/alert_status.schema.js +6 -1
  8. package/cjs/schema/attached_item.schema.js +101 -26
  9. package/cjs/schema/business_entity.schema.js +16 -5
  10. package/cjs/schema/business_rule.schema.js +2 -2
  11. package/cjs/schema/business_ruleset.schema.js +2 -2
  12. package/cjs/schema/comment.schema.js +15 -4
  13. package/cjs/schema/coupon.schema.js +218 -37
  14. package/cjs/schema/coupon_code.schema.js +36 -6
  15. package/cjs/schema/coupon_set.schema.js +108 -27
  16. package/cjs/schema/credit_note.schema.js +496 -105
  17. package/cjs/schema/credit_unit.schema.js +12 -2
  18. package/cjs/schema/customer.schema.js +212 -62
  19. package/cjs/schema/differential_price.schema.js +100 -12
  20. package/cjs/schema/dispute.schema.js +125 -33
  21. package/cjs/schema/einvoice.schema.js +27 -6
  22. package/cjs/schema/email_log.schema.js +15 -4
  23. package/cjs/schema/entitlement.schema.js +33 -4
  24. package/cjs/schema/entitlement_override.schema.js +17 -1
  25. package/cjs/schema/estimate.schema.js +581 -36
  26. package/cjs/schema/event.schema.js +1282 -633
  27. package/cjs/schema/export.schema.js +4459 -1412
  28. package/cjs/schema/feature.schema.js +73 -11
  29. package/cjs/schema/gateway_request_log.schema.js +309 -0
  30. package/cjs/schema/gateway_webhook_log.schema.js +257 -0
  31. package/cjs/schema/gift.schema.js +51 -5
  32. package/cjs/schema/grant_block.schema.js +45 -12
  33. package/cjs/schema/hosted_page.schema.js +562 -66
  34. package/cjs/schema/index.js +3 -0
  35. package/cjs/schema/invoice.schema.js +821 -121
  36. package/cjs/schema/item.schema.js +151 -28
  37. package/cjs/schema/item_entitlement.schema.js +23 -2
  38. package/cjs/schema/item_family.schema.js +29 -8
  39. package/cjs/schema/item_price.schema.js +263 -48
  40. package/cjs/schema/ledger_operation.schema.js +42 -15
  41. package/cjs/schema/metered_feature.schema.js +10 -1
  42. package/cjs/schema/omnichannel_one_time_order.schema.js +32 -2
  43. package/cjs/schema/omnichannel_subscription.schema.js +136 -30
  44. package/cjs/schema/order.schema.js +233 -61
  45. package/cjs/schema/organization_detail.schema.js +36 -0
  46. package/cjs/schema/payment_schedule.schema.js +39 -8
  47. package/cjs/schema/payment_schedule_scheme.schema.js +37 -7
  48. package/cjs/schema/payment_source.schema.js +360 -148
  49. package/cjs/schema/payment_voucher.schema.js +33 -5
  50. package/cjs/schema/plan.schema.js +345 -57
  51. package/cjs/schema/price_ramp.schema.js +79 -14
  52. package/cjs/schema/price_variant.schema.js +88 -18
  53. package/cjs/schema/pricing_page_session.schema.js +36 -2
  54. package/cjs/schema/promotional_credit.schema.js +27 -6
  55. package/cjs/schema/purchase.schema.js +204 -12
  56. package/cjs/schema/quote.schema.js +901 -81
  57. package/cjs/schema/quote_entitlement.schema.js +6 -2
  58. package/cjs/schema/ramp.schema.js +238 -24
  59. package/cjs/schema/site_migration_detail.schema.js +50 -16
  60. package/cjs/schema/subscription.schema.js +998 -169
  61. package/cjs/schema/subscription_entitlement.schema.js +9 -1
  62. package/cjs/schema/transaction.schema.js +780 -342
  63. package/cjs/schema/unbilled_charge.schema.js +141 -13
  64. package/cjs/schema/usage.schema.js +55 -12
  65. package/cjs/schema/usage_event.schema.js +13 -1
  66. package/cjs/schema/virtual_bank_account.schema.js +42 -10
  67. package/cjs/schema/webhook_endpoint.schema.js +4 -0
  68. package/esm/environment.js +1 -1
  69. package/esm/resources/api_endpoints.js +56 -0
  70. package/esm/resources/webhook/eventType.js +2 -0
  71. package/esm/schema/addon.schema.js +221 -40
  72. package/esm/schema/alert.schema.js +17 -2
  73. package/esm/schema/alert_status.schema.js +6 -1
  74. package/esm/schema/attached_item.schema.js +101 -26
  75. package/esm/schema/business_entity.schema.js +16 -5
  76. package/esm/schema/business_rule.schema.js +2 -2
  77. package/esm/schema/business_ruleset.schema.js +2 -2
  78. package/esm/schema/comment.schema.js +15 -4
  79. package/esm/schema/coupon.schema.js +218 -37
  80. package/esm/schema/coupon_code.schema.js +36 -6
  81. package/esm/schema/coupon_set.schema.js +108 -27
  82. package/esm/schema/credit_note.schema.js +496 -105
  83. package/esm/schema/credit_unit.schema.js +12 -2
  84. package/esm/schema/customer.schema.js +212 -62
  85. package/esm/schema/differential_price.schema.js +100 -12
  86. package/esm/schema/dispute.schema.js +125 -33
  87. package/esm/schema/einvoice.schema.js +27 -6
  88. package/esm/schema/email_log.schema.js +15 -4
  89. package/esm/schema/entitlement.schema.js +33 -4
  90. package/esm/schema/entitlement_override.schema.js +17 -1
  91. package/esm/schema/estimate.schema.js +581 -36
  92. package/esm/schema/event.schema.js +1282 -633
  93. package/esm/schema/export.schema.js +4459 -1412
  94. package/esm/schema/feature.schema.js +73 -11
  95. package/esm/schema/gateway_request_log.schema.js +306 -0
  96. package/esm/schema/gateway_webhook_log.schema.js +254 -0
  97. package/esm/schema/gift.schema.js +51 -5
  98. package/esm/schema/grant_block.schema.js +45 -12
  99. package/esm/schema/hosted_page.schema.js +562 -66
  100. package/esm/schema/index.js +3 -0
  101. package/esm/schema/invoice.schema.js +821 -121
  102. package/esm/schema/item.schema.js +151 -28
  103. package/esm/schema/item_entitlement.schema.js +23 -2
  104. package/esm/schema/item_family.schema.js +29 -8
  105. package/esm/schema/item_price.schema.js +263 -48
  106. package/esm/schema/ledger_operation.schema.js +42 -15
  107. package/esm/schema/metered_feature.schema.js +10 -1
  108. package/esm/schema/omnichannel_one_time_order.schema.js +32 -2
  109. package/esm/schema/omnichannel_subscription.schema.js +136 -30
  110. package/esm/schema/order.schema.js +233 -61
  111. package/esm/schema/organization_detail.schema.js +33 -0
  112. package/esm/schema/payment_schedule.schema.js +39 -8
  113. package/esm/schema/payment_schedule_scheme.schema.js +37 -7
  114. package/esm/schema/payment_source.schema.js +360 -148
  115. package/esm/schema/payment_voucher.schema.js +33 -5
  116. package/esm/schema/plan.schema.js +345 -57
  117. package/esm/schema/price_ramp.schema.js +79 -14
  118. package/esm/schema/price_variant.schema.js +88 -18
  119. package/esm/schema/pricing_page_session.schema.js +36 -2
  120. package/esm/schema/promotional_credit.schema.js +27 -6
  121. package/esm/schema/purchase.schema.js +204 -12
  122. package/esm/schema/quote.schema.js +901 -81
  123. package/esm/schema/quote_entitlement.schema.js +6 -2
  124. package/esm/schema/ramp.schema.js +238 -24
  125. package/esm/schema/site_migration_detail.schema.js +50 -16
  126. package/esm/schema/subscription.schema.js +998 -169
  127. package/esm/schema/subscription_entitlement.schema.js +9 -1
  128. package/esm/schema/transaction.schema.js +780 -342
  129. package/esm/schema/unbilled_charge.schema.js +141 -13
  130. package/esm/schema/usage.schema.js +55 -12
  131. package/esm/schema/usage_event.schema.js +13 -1
  132. package/esm/schema/virtual_bank_account.schema.js +42 -10
  133. package/esm/schema/webhook_endpoint.schema.js +4 -0
  134. package/package.json +1 -1
  135. package/types/core.d.ts +10 -6
  136. package/types/index.d.ts +8 -1
  137. package/types/resources/BillingLineItem.d.ts +10 -0
  138. package/types/resources/BillingMetadata.d.ts +9 -0
  139. package/types/resources/Content.d.ts +5 -0
  140. package/types/resources/Discount.d.ts +1 -0
  141. package/types/resources/DraftRequest.d.ts +1 -1
  142. package/types/resources/Estimate.d.ts +3 -0
  143. package/types/resources/Event.d.ts +2 -0
  144. package/types/resources/GatewayRequestLog.d.ts +82 -0
  145. package/types/resources/GatewayWebhookLog.d.ts +74 -0
  146. package/types/resources/GrantBlock.d.ts +5 -0
  147. package/types/resources/HostedPage.d.ts +18 -0
  148. package/types/resources/Invoice.d.ts +4 -0
  149. package/types/resources/OrganizationDetail.d.ts +84 -0
  150. package/types/resources/Subscription.d.ts +3 -0
  151. package/types/resources/Usage.d.ts +1 -0
  152. package/types/resources/WebhookEvent.d.ts +10 -0
@@ -26,6 +26,16 @@ const CreateItemPriceAccountingDetailSchema = zod_1.z.object({
26
26
  accounting_category3: zod_1.z.string().max(100).optional(),
27
27
  accounting_category4: zod_1.z.string().max(100).optional(),
28
28
  });
29
+ const CreateItemPriceTiersItemSchema = zod_1.z.object({
30
+ starting_unit: zod_1.z.number().int().min(1).optional(),
31
+ ending_unit: zod_1.z.number().int().optional(),
32
+ price: zod_1.z.number().int().min(0).optional(),
33
+ starting_unit_in_decimal: zod_1.z.string().max(33).optional(),
34
+ ending_unit_in_decimal: zod_1.z.string().max(33).optional(),
35
+ price_in_decimal: zod_1.z.string().max(39).optional(),
36
+ pricing_type: zod_1.z.enum(['per_unit', 'flat_fee', 'package']).optional(),
37
+ package_size: zod_1.z.number().int().min(1).optional(),
38
+ });
29
39
  const CreateItemPriceTiersSchema = zod_1.z.object({
30
40
  starting_unit: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
31
41
  ending_unit: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
@@ -38,6 +48,11 @@ const CreateItemPriceTiersSchema = zod_1.z.object({
38
48
  .optional(),
39
49
  package_size: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
40
50
  });
51
+ const CreateItemPriceTaxProvidersFieldsItemSchema = zod_1.z.object({
52
+ provider_name: zod_1.z.string().max(50),
53
+ field_id: zod_1.z.string().max(50),
54
+ field_value: zod_1.z.string().max(50),
55
+ });
41
56
  const CreateItemPriceTaxProvidersFieldsSchema = zod_1.z.object({
42
57
  provider_name: zod_1.z.array(zod_1.z.string().max(50).optional()),
43
58
  field_id: zod_1.z.array(zod_1.z.string().max(50).optional()),
@@ -82,8 +97,18 @@ const CreateItemPriceBodySchema = zod_1.z.looseObject({
82
97
  .optional(),
83
98
  tax_detail: CreateItemPriceTaxDetailSchema.optional(),
84
99
  accounting_detail: CreateItemPriceAccountingDetailSchema.optional(),
85
- tiers: CreateItemPriceTiersSchema.optional(),
86
- tax_providers_fields: CreateItemPriceTaxProvidersFieldsSchema.optional(),
100
+ tiers: zod_1.z
101
+ .union([
102
+ zod_1.z.array(CreateItemPriceTiersItemSchema.optional()),
103
+ CreateItemPriceTiersSchema,
104
+ ])
105
+ .optional(),
106
+ tax_providers_fields: zod_1.z
107
+ .union([
108
+ zod_1.z.array(CreateItemPriceTaxProvidersFieldsItemSchema.optional()),
109
+ CreateItemPriceTaxProvidersFieldsSchema,
110
+ ])
111
+ .optional(),
87
112
  });
88
113
  exports.CreateItemPriceBodySchema = CreateItemPriceBodySchema;
89
114
  //ItemPrice.update
@@ -107,6 +132,16 @@ const UpdateItemPriceAccountingDetailSchema = zod_1.z.object({
107
132
  accounting_category3: zod_1.z.string().max(100).optional(),
108
133
  accounting_category4: zod_1.z.string().max(100).optional(),
109
134
  });
135
+ const UpdateItemPriceTiersItemSchema = zod_1.z.object({
136
+ starting_unit: zod_1.z.number().int().min(1).optional(),
137
+ ending_unit: zod_1.z.number().int().optional(),
138
+ price: zod_1.z.number().int().min(0).optional(),
139
+ starting_unit_in_decimal: zod_1.z.string().max(33).optional(),
140
+ ending_unit_in_decimal: zod_1.z.string().max(33).optional(),
141
+ price_in_decimal: zod_1.z.string().max(39).optional(),
142
+ pricing_type: zod_1.z.enum(['per_unit', 'flat_fee', 'package']).optional(),
143
+ package_size: zod_1.z.number().int().min(1).optional(),
144
+ });
110
145
  const UpdateItemPriceTiersSchema = zod_1.z.object({
111
146
  starting_unit: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
112
147
  ending_unit: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
@@ -119,6 +154,11 @@ const UpdateItemPriceTiersSchema = zod_1.z.object({
119
154
  .optional(),
120
155
  package_size: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
121
156
  });
157
+ const UpdateItemPriceTaxProvidersFieldsItemSchema = zod_1.z.object({
158
+ provider_name: zod_1.z.string().max(50),
159
+ field_id: zod_1.z.string().max(50),
160
+ field_value: zod_1.z.string().max(50),
161
+ });
122
162
  const UpdateItemPriceTaxProvidersFieldsSchema = zod_1.z.object({
123
163
  provider_name: zod_1.z.array(zod_1.z.string().max(50).optional()),
124
164
  field_id: zod_1.z.array(zod_1.z.string().max(50).optional()),
@@ -161,8 +201,18 @@ const UpdateItemPriceBodySchema = zod_1.z.looseObject({
161
201
  show_description_in_quotes: zod_1.z.boolean().optional(),
162
202
  tax_detail: UpdateItemPriceTaxDetailSchema.optional(),
163
203
  accounting_detail: UpdateItemPriceAccountingDetailSchema.optional(),
164
- tiers: UpdateItemPriceTiersSchema.optional(),
165
- tax_providers_fields: UpdateItemPriceTaxProvidersFieldsSchema.optional(),
204
+ tiers: zod_1.z
205
+ .union([
206
+ zod_1.z.array(UpdateItemPriceTiersItemSchema.optional()),
207
+ UpdateItemPriceTiersSchema,
208
+ ])
209
+ .optional(),
210
+ tax_providers_fields: zod_1.z
211
+ .union([
212
+ zod_1.z.array(UpdateItemPriceTaxProvidersFieldsItemSchema.optional()),
213
+ UpdateItemPriceTaxProvidersFieldsSchema,
214
+ ])
215
+ .optional(),
166
216
  });
167
217
  exports.UpdateItemPriceBodySchema = UpdateItemPriceBodySchema;
168
218
  //ItemPrice.list
@@ -170,15 +220,35 @@ const ListItemPriceIdSchema = zod_1.z.object({
170
220
  is: zod_1.z.string().min(1).optional(),
171
221
  is_not: zod_1.z.string().min(1).optional(),
172
222
  starts_with: zod_1.z.string().min(1).optional(),
173
- in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
174
- not_in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
223
+ in: zod_1.z
224
+ .union([
225
+ zod_1.z.array(zod_1.z.string().optional()),
226
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
227
+ ])
228
+ .optional(),
229
+ not_in: zod_1.z
230
+ .union([
231
+ zod_1.z.array(zod_1.z.string().optional()),
232
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
233
+ ])
234
+ .optional(),
175
235
  });
176
236
  const ListItemPriceNameSchema = zod_1.z.object({
177
237
  is: zod_1.z.string().min(1).optional(),
178
238
  is_not: zod_1.z.string().min(1).optional(),
179
239
  starts_with: zod_1.z.string().min(1).optional(),
180
- in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
181
- not_in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
240
+ in: zod_1.z
241
+ .union([
242
+ zod_1.z.array(zod_1.z.string().optional()),
243
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
244
+ ])
245
+ .optional(),
246
+ not_in: zod_1.z
247
+ .union([
248
+ zod_1.z.array(zod_1.z.string().optional()),
249
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
250
+ ])
251
+ .optional(),
182
252
  });
183
253
  const ListItemPricePricingModelSchema = zod_1.z.object({
184
254
  is: zod_1.z
@@ -188,100 +258,245 @@ const ListItemPricePricingModelSchema = zod_1.z.object({
188
258
  .enum(['flat_fee', 'per_unit', 'tiered', 'volume', 'stairstep'])
189
259
  .optional(),
190
260
  in: zod_1.z
191
- .enum(['flat_fee', 'per_unit', 'tiered', 'volume', 'stairstep'])
261
+ .union([
262
+ zod_1.z.array(zod_1.z
263
+ .enum(['flat_fee', 'per_unit', 'tiered', 'volume', 'stairstep'])
264
+ .optional()),
265
+ zod_1.z.enum(['flat_fee', 'per_unit', 'tiered', 'volume', 'stairstep']),
266
+ ])
192
267
  .optional(),
193
268
  not_in: zod_1.z
194
- .enum(['flat_fee', 'per_unit', 'tiered', 'volume', 'stairstep'])
269
+ .union([
270
+ zod_1.z.array(zod_1.z
271
+ .enum(['flat_fee', 'per_unit', 'tiered', 'volume', 'stairstep'])
272
+ .optional()),
273
+ zod_1.z.enum(['flat_fee', 'per_unit', 'tiered', 'volume', 'stairstep']),
274
+ ])
195
275
  .optional(),
196
276
  });
197
277
  const ListItemPriceItemIdSchema = zod_1.z.object({
198
278
  is: zod_1.z.string().min(1).optional(),
199
279
  is_not: zod_1.z.string().min(1).optional(),
200
280
  starts_with: zod_1.z.string().min(1).optional(),
201
- in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
202
- not_in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
281
+ in: zod_1.z
282
+ .union([
283
+ zod_1.z.array(zod_1.z.string().optional()),
284
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
285
+ ])
286
+ .optional(),
287
+ not_in: zod_1.z
288
+ .union([
289
+ zod_1.z.array(zod_1.z.string().optional()),
290
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
291
+ ])
292
+ .optional(),
203
293
  });
204
294
  const ListItemPriceItemFamilyIdSchema = zod_1.z.object({
205
295
  is: zod_1.z.string().min(1).optional(),
206
296
  is_not: zod_1.z.string().min(1).optional(),
207
297
  starts_with: zod_1.z.string().min(1).optional(),
208
- in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
209
- not_in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
298
+ in: zod_1.z
299
+ .union([
300
+ zod_1.z.array(zod_1.z.string().optional()),
301
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
302
+ ])
303
+ .optional(),
304
+ not_in: zod_1.z
305
+ .union([
306
+ zod_1.z.array(zod_1.z.string().optional()),
307
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
308
+ ])
309
+ .optional(),
210
310
  });
211
311
  const ListItemPriceItemTypeSchema = zod_1.z.object({
212
312
  is: zod_1.z.enum(['plan', 'addon', 'charge']).optional(),
213
313
  is_not: zod_1.z.enum(['plan', 'addon', 'charge']).optional(),
214
- in: zod_1.z.enum(['plan', 'addon', 'charge']).optional(),
215
- not_in: zod_1.z.enum(['plan', 'addon', 'charge']).optional(),
314
+ in: zod_1.z
315
+ .union([
316
+ zod_1.z.array(zod_1.z.enum(['plan', 'addon', 'charge']).optional()),
317
+ zod_1.z.enum(['plan', 'addon', 'charge']),
318
+ ])
319
+ .optional(),
320
+ not_in: zod_1.z
321
+ .union([
322
+ zod_1.z.array(zod_1.z.enum(['plan', 'addon', 'charge']).optional()),
323
+ zod_1.z.enum(['plan', 'addon', 'charge']),
324
+ ])
325
+ .optional(),
216
326
  });
217
327
  const ListItemPriceCurrencyCodeSchema = zod_1.z.object({
218
328
  is: zod_1.z.string().min(1).optional(),
219
329
  is_not: zod_1.z.string().min(1).optional(),
220
330
  starts_with: zod_1.z.string().min(1).optional(),
221
- in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
222
- not_in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
331
+ in: zod_1.z
332
+ .union([
333
+ zod_1.z.array(zod_1.z.string().optional()),
334
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
335
+ ])
336
+ .optional(),
337
+ not_in: zod_1.z
338
+ .union([
339
+ zod_1.z.array(zod_1.z.string().optional()),
340
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
341
+ ])
342
+ .optional(),
223
343
  });
224
344
  const ListItemPricePriceVariantIdSchema = zod_1.z.object({
225
345
  is: zod_1.z.string().min(1).optional(),
226
346
  is_not: zod_1.z.string().min(1).optional(),
227
347
  starts_with: zod_1.z.string().min(1).optional(),
228
- in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
229
- not_in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
348
+ in: zod_1.z
349
+ .union([
350
+ zod_1.z.array(zod_1.z.string().optional()),
351
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
352
+ ])
353
+ .optional(),
354
+ not_in: zod_1.z
355
+ .union([
356
+ zod_1.z.array(zod_1.z.string().optional()),
357
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
358
+ ])
359
+ .optional(),
230
360
  });
231
361
  const ListItemPriceTrialPeriodSchema = zod_1.z.object({
232
- is: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
233
- is_not: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
234
- lt: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
235
- lte: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
236
- gt: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
237
- gte: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
238
- between: zod_1.z.string().regex(RegExp('^\\[-?\\d+,-?\\d+\\]$')).optional(),
362
+ is: zod_1.z
363
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
364
+ .optional(),
365
+ is_not: zod_1.z
366
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
367
+ .optional(),
368
+ lt: zod_1.z
369
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
370
+ .optional(),
371
+ lte: zod_1.z
372
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
373
+ .optional(),
374
+ gt: zod_1.z
375
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
376
+ .optional(),
377
+ gte: zod_1.z
378
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
379
+ .optional(),
380
+ between: zod_1.z
381
+ .union([
382
+ zod_1.z.array(zod_1.z.number().int().optional()).min(2).max(2),
383
+ zod_1.z.string().regex(RegExp('^\\[-?\\d+,-?\\d+\\]$')),
384
+ ])
385
+ .optional(),
239
386
  });
240
387
  const ListItemPriceTrialPeriodUnitSchema = zod_1.z.object({
241
388
  is: zod_1.z.enum(['day', 'month']).optional(),
242
389
  is_not: zod_1.z.enum(['day', 'month']).optional(),
243
- in: zod_1.z.enum(['day', 'month']).optional(),
244
- not_in: zod_1.z.enum(['day', 'month']).optional(),
390
+ in: zod_1.z
391
+ .union([
392
+ zod_1.z.array(zod_1.z.enum(['day', 'month']).optional()),
393
+ zod_1.z.enum(['day', 'month']),
394
+ ])
395
+ .optional(),
396
+ not_in: zod_1.z
397
+ .union([
398
+ zod_1.z.array(zod_1.z.enum(['day', 'month']).optional()),
399
+ zod_1.z.enum(['day', 'month']),
400
+ ])
401
+ .optional(),
245
402
  });
246
403
  const ListItemPriceStatusSchema = zod_1.z.object({
247
404
  is: zod_1.z.enum(['active', 'archived', 'deleted']).optional(),
248
405
  is_not: zod_1.z.enum(['active', 'archived', 'deleted']).optional(),
249
- in: zod_1.z.enum(['active', 'archived', 'deleted']).optional(),
250
- not_in: zod_1.z.enum(['active', 'archived', 'deleted']).optional(),
406
+ in: zod_1.z
407
+ .union([
408
+ zod_1.z.array(zod_1.z.enum(['active', 'archived', 'deleted']).optional()),
409
+ zod_1.z.enum(['active', 'archived', 'deleted']),
410
+ ])
411
+ .optional(),
412
+ not_in: zod_1.z
413
+ .union([
414
+ zod_1.z.array(zod_1.z.enum(['active', 'archived', 'deleted']).optional()),
415
+ zod_1.z.enum(['active', 'archived', 'deleted']),
416
+ ])
417
+ .optional(),
251
418
  });
252
419
  const ListItemPriceUpdatedAtSchema = zod_1.z.object({
253
- after: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
254
- before: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
255
- on: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
256
- between: zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
420
+ after: zod_1.z
421
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
422
+ .optional(),
423
+ before: zod_1.z
424
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
425
+ .optional(),
426
+ on: zod_1.z
427
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
428
+ .optional(),
429
+ between: zod_1.z
430
+ .union([
431
+ zod_1.z.array(zod_1.z.number().int().optional()).min(2).max(2),
432
+ zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')),
433
+ ])
434
+ .optional(),
257
435
  });
258
436
  const ListItemPriceBusinessEntityIdSchema = zod_1.z.object({
259
- is_present: zod_1.z.enum(['true', 'false']).optional(),
260
437
  is: zod_1.z.string().min(1).optional(),
438
+ is_present: zod_1.z.union([zod_1.z.boolean(), zod_1.z.enum(['true', 'false'])]).optional(),
261
439
  });
262
440
  const ListItemPriceIncludeSiteLevelResourcesSchema = zod_1.z.object({
263
- is: zod_1.z.enum(['true', 'false']).optional(),
441
+ is: zod_1.z.union([zod_1.z.boolean(), zod_1.z.enum(['true', 'false'])]).optional(),
264
442
  });
265
443
  const ListItemPricePeriodUnitSchema = zod_1.z.object({
266
444
  is: zod_1.z.enum(['day', 'week', 'month', 'year']).optional(),
267
445
  is_not: zod_1.z.enum(['day', 'week', 'month', 'year']).optional(),
268
- in: zod_1.z.enum(['day', 'week', 'month', 'year']).optional(),
269
- not_in: zod_1.z.enum(['day', 'week', 'month', 'year']).optional(),
446
+ in: zod_1.z
447
+ .union([
448
+ zod_1.z.array(zod_1.z.enum(['day', 'week', 'month', 'year']).optional()),
449
+ zod_1.z.enum(['day', 'week', 'month', 'year']),
450
+ ])
451
+ .optional(),
452
+ not_in: zod_1.z
453
+ .union([
454
+ zod_1.z.array(zod_1.z.enum(['day', 'week', 'month', 'year']).optional()),
455
+ zod_1.z.enum(['day', 'week', 'month', 'year']),
456
+ ])
457
+ .optional(),
270
458
  });
271
459
  const ListItemPricePeriodSchema = zod_1.z.object({
272
- is: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
273
- is_not: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
274
- lt: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
275
- lte: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
276
- gt: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
277
- gte: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
278
- between: zod_1.z.string().regex(RegExp('^\\[-?\\d+,-?\\d+\\]$')).optional(),
460
+ is: zod_1.z
461
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
462
+ .optional(),
463
+ is_not: zod_1.z
464
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
465
+ .optional(),
466
+ lt: zod_1.z
467
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
468
+ .optional(),
469
+ lte: zod_1.z
470
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
471
+ .optional(),
472
+ gt: zod_1.z
473
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
474
+ .optional(),
475
+ gte: zod_1.z
476
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
477
+ .optional(),
478
+ between: zod_1.z
479
+ .union([
480
+ zod_1.z.array(zod_1.z.number().int().optional()).min(2).max(2),
481
+ zod_1.z.string().regex(RegExp('^\\[-?\\d+,-?\\d+\\]$')),
482
+ ])
483
+ .optional(),
279
484
  });
280
485
  const ListItemPriceChannelSchema = zod_1.z.object({
281
486
  is: zod_1.z.enum(['web', 'app_store', 'play_store']).optional(),
282
487
  is_not: zod_1.z.enum(['web', 'app_store', 'play_store']).optional(),
283
- in: zod_1.z.enum(['web', 'app_store', 'play_store']).optional(),
284
- not_in: zod_1.z.enum(['web', 'app_store', 'play_store']).optional(),
488
+ in: zod_1.z
489
+ .union([
490
+ zod_1.z.array(zod_1.z.enum(['web', 'app_store', 'play_store']).optional()),
491
+ zod_1.z.enum(['web', 'app_store', 'play_store']),
492
+ ])
493
+ .optional(),
494
+ not_in: zod_1.z
495
+ .union([
496
+ zod_1.z.array(zod_1.z.enum(['web', 'app_store', 'play_store']).optional()),
497
+ zod_1.z.enum(['web', 'app_store', 'play_store']),
498
+ ])
499
+ .optional(),
285
500
  });
286
501
  const ListItemPriceSortBySchema = zod_1.z.looseObject({
287
502
  asc: zod_1.z.enum(['name', 'id', 'updated_at']).optional(),
@@ -13,24 +13,51 @@ const ListLedgerOperationsLedgerOperationUnitIdSchema = zod_1.z.object({
13
13
  is: zod_1.z.string().min(1).optional(),
14
14
  });
15
15
  const ListLedgerOperationsLedgerOperationCreatedAtSchema = zod_1.z.object({
16
- after: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
17
- before: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
18
- on: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
19
- between: zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
16
+ after: zod_1.z
17
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
18
+ .optional(),
19
+ before: zod_1.z
20
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
21
+ .optional(),
22
+ on: zod_1.z
23
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
24
+ .optional(),
25
+ between: zod_1.z
26
+ .union([
27
+ zod_1.z.array(zod_1.z.number().int().optional()).min(2).max(2),
28
+ zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')),
29
+ ])
30
+ .optional(),
20
31
  });
21
32
  const ListLedgerOperationsLedgerOperationTypeSchema = zod_1.z.object({
22
33
  in: zod_1.z
23
- .enum([
24
- 'allocation',
25
- 'capture',
26
- 'authorize',
27
- 'release_authorization',
28
- 'capture_authorization',
29
- 'expiry',
30
- 'void',
31
- 'rollover',
32
- 'adjustment',
33
- 'overdraft_settlement',
34
+ .union([
35
+ zod_1.z.array(zod_1.z
36
+ .enum([
37
+ 'allocation',
38
+ 'capture',
39
+ 'authorize',
40
+ 'release_authorization',
41
+ 'capture_authorization',
42
+ 'expiry',
43
+ 'void',
44
+ 'rollover',
45
+ 'adjustment',
46
+ 'overdraft_settlement',
47
+ ])
48
+ .optional()),
49
+ zod_1.z.enum([
50
+ 'allocation',
51
+ 'capture',
52
+ 'authorize',
53
+ 'release_authorization',
54
+ 'capture_authorization',
55
+ 'expiry',
56
+ 'void',
57
+ 'rollover',
58
+ 'adjustment',
59
+ 'overdraft_settlement',
60
+ ]),
34
61
  ])
35
62
  .optional(),
36
63
  is: zod_1.z
@@ -6,6 +6,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.CreateMeteredFeatureBodySchema = void 0;
7
7
  const zod_1 = require("zod");
8
8
  //MeteredFeature.create
9
+ const CreateMeteredFeatureColumnDefinitionsItemSchema = zod_1.z.object({
10
+ column_name: zod_1.z.string().max(100),
11
+ data_type: zod_1.z.enum(['number', 'string']),
12
+ });
9
13
  const CreateMeteredFeatureColumnDefinitionsSchema = zod_1.z.object({
10
14
  column_name: zod_1.z.array(zod_1.z.string().max(100).optional()),
11
15
  data_type: zod_1.z.array(zod_1.z.enum(['number', 'string']).optional()),
@@ -15,6 +19,11 @@ const CreateMeteredFeatureBodySchema = zod_1.z.looseObject({
15
19
  description: zod_1.z.string().max(250).optional(),
16
20
  feature_unit: zod_1.z.string().max(50),
17
21
  query: zod_1.z.string().max(1000),
18
- column_definitions: CreateMeteredFeatureColumnDefinitionsSchema.optional(),
22
+ column_definitions: zod_1.z
23
+ .union([
24
+ zod_1.z.array(CreateMeteredFeatureColumnDefinitionsItemSchema.optional()),
25
+ CreateMeteredFeatureColumnDefinitionsSchema,
26
+ ])
27
+ .optional(),
19
28
  });
20
29
  exports.CreateMeteredFeatureBodySchema = CreateMeteredFeatureBodySchema;
@@ -14,10 +14,40 @@ const ListOmnichannelOneTimeOrderSourceSchema = zod_1.z.object({
14
14
  .enum(['apple_app_store', 'google_play_store', 'roku', 'amazon_app_store'])
15
15
  .optional(),
16
16
  in: zod_1.z
17
- .enum(['apple_app_store', 'google_play_store', 'roku', 'amazon_app_store'])
17
+ .union([
18
+ zod_1.z.array(zod_1.z
19
+ .enum([
20
+ 'apple_app_store',
21
+ 'google_play_store',
22
+ 'roku',
23
+ 'amazon_app_store',
24
+ ])
25
+ .optional()),
26
+ zod_1.z.enum([
27
+ 'apple_app_store',
28
+ 'google_play_store',
29
+ 'roku',
30
+ 'amazon_app_store',
31
+ ]),
32
+ ])
18
33
  .optional(),
19
34
  not_in: zod_1.z
20
- .enum(['apple_app_store', 'google_play_store', 'roku', 'amazon_app_store'])
35
+ .union([
36
+ zod_1.z.array(zod_1.z
37
+ .enum([
38
+ 'apple_app_store',
39
+ 'google_play_store',
40
+ 'roku',
41
+ 'amazon_app_store',
42
+ ])
43
+ .optional()),
44
+ zod_1.z.enum([
45
+ 'apple_app_store',
46
+ 'google_play_store',
47
+ 'roku',
48
+ 'amazon_app_store',
49
+ ]),
50
+ ])
21
51
  .optional(),
22
52
  });
23
53
  const ListOmnichannelOneTimeOrderCustomerIdSchema = zod_1.z.object({