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.
Files changed (198) hide show
  1. package/CHANGELOG.md +237 -0
  2. package/cjs/environment.js +1 -1
  3. package/cjs/resources/api_endpoints.js +230 -2
  4. package/cjs/resources/webhook/eventType.js +25 -1
  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 +43 -6
  10. package/cjs/schema/business_rule.schema.js +2 -2
  11. package/cjs/schema/business_ruleset.schema.js +2 -2
  12. package/cjs/schema/collections_payment_promise.schema.js +43 -0
  13. package/cjs/schema/comment.schema.js +17 -4
  14. package/cjs/schema/coupon.schema.js +218 -37
  15. package/cjs/schema/coupon_code.schema.js +36 -6
  16. package/cjs/schema/coupon_set.schema.js +108 -27
  17. package/cjs/schema/credit_note.schema.js +497 -105
  18. package/cjs/schema/credit_unit.schema.js +12 -2
  19. package/cjs/schema/customer.schema.js +212 -62
  20. package/cjs/schema/differential_price.schema.js +100 -12
  21. package/cjs/schema/dispute.schema.js +125 -33
  22. package/cjs/schema/einvoice.schema.js +27 -6
  23. package/cjs/schema/email_log.schema.js +15 -4
  24. package/cjs/schema/entitlement.schema.js +35 -6
  25. package/cjs/schema/entitlement_override.schema.js +17 -1
  26. package/cjs/schema/estimate.schema.js +585 -40
  27. package/cjs/schema/event.schema.js +1334 -585
  28. package/cjs/schema/export.schema.js +4459 -1412
  29. package/cjs/schema/feature.schema.js +73 -11
  30. package/cjs/schema/gateway_request_log.schema.js +309 -0
  31. package/cjs/schema/gateway_webhook_log.schema.js +257 -0
  32. package/cjs/schema/gift.schema.js +51 -5
  33. package/cjs/schema/grant_block.schema.js +45 -12
  34. package/cjs/schema/hosted_page.schema.js +564 -68
  35. package/cjs/schema/index.js +6 -0
  36. package/cjs/schema/invoice.schema.js +843 -123
  37. package/cjs/schema/item.schema.js +151 -28
  38. package/cjs/schema/item_entitlement.schema.js +23 -2
  39. package/cjs/schema/item_family.schema.js +29 -8
  40. package/cjs/schema/item_price.schema.js +263 -48
  41. package/cjs/schema/ledger_account_balance.schema.js +11 -2
  42. package/cjs/schema/ledger_operation.schema.js +44 -17
  43. package/cjs/schema/metered_feature.schema.js +10 -1
  44. package/cjs/schema/omnichannel_one_time_order.schema.js +42 -4
  45. package/cjs/schema/omnichannel_subscription.schema.js +146 -32
  46. package/cjs/schema/order.schema.js +233 -61
  47. package/cjs/schema/organization_detail.schema.js +36 -0
  48. package/cjs/schema/payment_schedule.schema.js +39 -8
  49. package/cjs/schema/payment_schedule_scheme.schema.js +37 -7
  50. package/cjs/schema/payment_source.schema.js +375 -148
  51. package/cjs/schema/payment_voucher.schema.js +33 -5
  52. package/cjs/schema/plan.schema.js +345 -57
  53. package/cjs/schema/price_ramp.schema.js +153 -0
  54. package/cjs/schema/price_variant.schema.js +88 -18
  55. package/cjs/schema/pricing_page_session.schema.js +36 -2
  56. package/cjs/schema/promotional_credit.schema.js +27 -6
  57. package/cjs/schema/purchase.schema.js +210 -12
  58. package/cjs/schema/quote.schema.js +907 -87
  59. package/cjs/schema/quote_entitlement.schema.js +6 -2
  60. package/cjs/schema/ramp.schema.js +242 -24
  61. package/cjs/schema/retry_segment.schema.js +12 -0
  62. package/cjs/schema/site_migration_detail.schema.js +50 -16
  63. package/cjs/schema/subscription.schema.js +1002 -173
  64. package/cjs/schema/subscription_entitlement.schema.js +9 -1
  65. package/cjs/schema/transaction.schema.js +780 -342
  66. package/cjs/schema/unbilled_charge.schema.js +141 -13
  67. package/cjs/schema/usage.schema.js +59 -11
  68. package/cjs/schema/usage_event.schema.js +13 -1
  69. package/cjs/schema/usage_summary.schema.js +1 -0
  70. package/cjs/schema/virtual_bank_account.schema.js +42 -10
  71. package/cjs/schema/webhook_endpoint.schema.js +50 -2
  72. package/esm/environment.js +1 -1
  73. package/esm/resources/api_endpoints.js +230 -2
  74. package/esm/resources/webhook/eventType.js +25 -1
  75. package/esm/schema/addon.schema.js +221 -40
  76. package/esm/schema/alert.schema.js +17 -2
  77. package/esm/schema/alert_status.schema.js +6 -1
  78. package/esm/schema/attached_item.schema.js +101 -26
  79. package/esm/schema/business_entity.schema.js +42 -5
  80. package/esm/schema/business_rule.schema.js +2 -2
  81. package/esm/schema/business_ruleset.schema.js +2 -2
  82. package/esm/schema/collections_payment_promise.schema.js +40 -0
  83. package/esm/schema/comment.schema.js +17 -4
  84. package/esm/schema/coupon.schema.js +218 -37
  85. package/esm/schema/coupon_code.schema.js +36 -6
  86. package/esm/schema/coupon_set.schema.js +108 -27
  87. package/esm/schema/credit_note.schema.js +497 -105
  88. package/esm/schema/credit_unit.schema.js +12 -2
  89. package/esm/schema/customer.schema.js +212 -62
  90. package/esm/schema/differential_price.schema.js +100 -12
  91. package/esm/schema/dispute.schema.js +125 -33
  92. package/esm/schema/einvoice.schema.js +27 -6
  93. package/esm/schema/email_log.schema.js +15 -4
  94. package/esm/schema/entitlement.schema.js +35 -6
  95. package/esm/schema/entitlement_override.schema.js +17 -1
  96. package/esm/schema/estimate.schema.js +585 -40
  97. package/esm/schema/event.schema.js +1334 -585
  98. package/esm/schema/export.schema.js +4459 -1412
  99. package/esm/schema/feature.schema.js +73 -11
  100. package/esm/schema/gateway_request_log.schema.js +306 -0
  101. package/esm/schema/gateway_webhook_log.schema.js +254 -0
  102. package/esm/schema/gift.schema.js +51 -5
  103. package/esm/schema/grant_block.schema.js +45 -12
  104. package/esm/schema/hosted_page.schema.js +564 -68
  105. package/esm/schema/index.js +6 -0
  106. package/esm/schema/invoice.schema.js +842 -122
  107. package/esm/schema/item.schema.js +151 -28
  108. package/esm/schema/item_entitlement.schema.js +23 -2
  109. package/esm/schema/item_family.schema.js +29 -8
  110. package/esm/schema/item_price.schema.js +263 -48
  111. package/esm/schema/ledger_account_balance.schema.js +10 -1
  112. package/esm/schema/ledger_operation.schema.js +44 -17
  113. package/esm/schema/metered_feature.schema.js +10 -1
  114. package/esm/schema/omnichannel_one_time_order.schema.js +42 -4
  115. package/esm/schema/omnichannel_subscription.schema.js +146 -32
  116. package/esm/schema/order.schema.js +233 -61
  117. package/esm/schema/organization_detail.schema.js +33 -0
  118. package/esm/schema/payment_schedule.schema.js +39 -8
  119. package/esm/schema/payment_schedule_scheme.schema.js +37 -7
  120. package/esm/schema/payment_source.schema.js +375 -148
  121. package/esm/schema/payment_voucher.schema.js +33 -5
  122. package/esm/schema/plan.schema.js +345 -57
  123. package/esm/schema/price_ramp.schema.js +150 -0
  124. package/esm/schema/price_variant.schema.js +88 -18
  125. package/esm/schema/pricing_page_session.schema.js +36 -2
  126. package/esm/schema/promotional_credit.schema.js +27 -6
  127. package/esm/schema/purchase.schema.js +210 -12
  128. package/esm/schema/quote.schema.js +907 -87
  129. package/esm/schema/quote_entitlement.schema.js +6 -2
  130. package/esm/schema/ramp.schema.js +242 -24
  131. package/esm/schema/retry_segment.schema.js +9 -0
  132. package/esm/schema/site_migration_detail.schema.js +50 -16
  133. package/esm/schema/subscription.schema.js +1002 -173
  134. package/esm/schema/subscription_entitlement.schema.js +9 -1
  135. package/esm/schema/transaction.schema.js +780 -342
  136. package/esm/schema/unbilled_charge.schema.js +141 -13
  137. package/esm/schema/usage.schema.js +59 -11
  138. package/esm/schema/usage_event.schema.js +13 -1
  139. package/esm/schema/usage_summary.schema.js +1 -0
  140. package/esm/schema/virtual_bank_account.schema.js +42 -10
  141. package/esm/schema/webhook_endpoint.schema.js +50 -2
  142. package/package.json +1 -1
  143. package/types/core.d.ts +63 -74
  144. package/types/index.d.ts +29 -1
  145. package/types/resources/BillingLineItem.d.ts +10 -0
  146. package/types/resources/BillingMetadata.d.ts +9 -0
  147. package/types/resources/BusinessEntity.d.ts +52 -0
  148. package/types/resources/Citation.d.ts +13 -0
  149. package/types/resources/CollectionsDispute.d.ts +24 -0
  150. package/types/resources/CollectionsPaymentPromise.d.ts +93 -0
  151. package/types/resources/CollectionsReminderSequence.d.ts +35 -0
  152. package/types/resources/Comment.d.ts +2 -1
  153. package/types/resources/Content.d.ts +23 -1
  154. package/types/resources/CreditNote.d.ts +1 -0
  155. package/types/resources/CustomData.d.ts +14 -0
  156. package/types/resources/Discount.d.ts +1 -0
  157. package/types/resources/DraftEstimate.d.ts +13 -0
  158. package/types/resources/DraftRequest.d.ts +45 -0
  159. package/types/resources/EmailAttachment.d.ts +16 -0
  160. package/types/resources/EmailConversation.d.ts +18 -0
  161. package/types/resources/EmailLog.d.ts +1 -0
  162. package/types/resources/EmailMessage.d.ts +40 -0
  163. package/types/resources/Estimate.d.ts +3 -0
  164. package/types/resources/Event.d.ts +25 -1
  165. package/types/resources/Execution.d.ts +12 -0
  166. package/types/resources/GatewayPaymentMethodToken.d.ts +2 -2
  167. package/types/resources/GatewayRequestLog.d.ts +82 -0
  168. package/types/resources/GatewayWebhookLog.d.ts +74 -0
  169. package/types/resources/GrantBlock.d.ts +5 -0
  170. package/types/resources/GroupByAttribute.d.ts +15 -0
  171. package/types/resources/GroupByRecommendation.d.ts +10 -0
  172. package/types/resources/HostedPage.d.ts +18 -0
  173. package/types/resources/Invoice.d.ts +19 -0
  174. package/types/resources/ItemPrice.d.ts +1 -0
  175. package/types/resources/LedgerAccountBalance.d.ts +19 -0
  176. package/types/resources/Meter.d.ts +1 -0
  177. package/types/resources/MeteredFeature.d.ts +1 -0
  178. package/types/resources/OmnichannelOneTimeOrder.d.ts +5 -1
  179. package/types/resources/OmnichannelSubscription.d.ts +6 -1
  180. package/types/resources/OmnichannelSubscriptionItem.d.ts +4 -1
  181. package/types/resources/OrganizationDetail.d.ts +84 -0
  182. package/types/resources/PaymentSchedule.d.ts +1 -1
  183. package/types/resources/PaymentScheduleEstimate.d.ts +1 -1
  184. package/types/resources/PaymentSource.d.ts +19 -0
  185. package/types/resources/PreferenceVariant.d.ts +10 -0
  186. package/types/resources/PriceRamp.d.ts +113 -0
  187. package/types/resources/PrivateNote.d.ts +18 -0
  188. package/types/resources/Purchase.d.ts +6 -0
  189. package/types/resources/Ramp.d.ts +6 -0
  190. package/types/resources/RampInterval.d.ts +12 -0
  191. package/types/resources/RecordedPurchase.d.ts +5 -1
  192. package/types/resources/RetrySegment.d.ts +36 -0
  193. package/types/resources/Subscription.d.ts +3 -0
  194. package/types/resources/Transaction.d.ts +4 -0
  195. package/types/resources/Usage.d.ts +7 -0
  196. package/types/resources/UsageSummary.d.ts +2 -0
  197. package/types/resources/WebhookEvent.d.ts +159 -5
  198. package/types/resources/AppliedBusinessRule.d.ts +0 -15
@@ -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
437
  is: zod_1.z.string().min(1).optional(),
260
- is_present: zod_1.z.enum(['true', 'false']).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(),
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  // Generated Zod schemas: LedgerAccountBalance
3
- // Actions: listLedgerAccountBalances
3
+ // Actions: listLedgerAccountBalances, updateOverdraftLimit
4
4
  // Do not edit manually – regenerate via sdk-generator
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.ListLedgerAccountBalancesLedgerAccountBalanceBodySchema = void 0;
6
+ exports.UpdateOverdraftLimitLedgerAccountBalanceBodySchema = exports.ListLedgerAccountBalancesLedgerAccountBalanceBodySchema = void 0;
7
7
  const zod_1 = require("zod");
8
8
  //LedgerAccountBalance.listLedgerAccountBalances
9
9
  const ListLedgerAccountBalancesLedgerAccountBalanceSubscriptionIdSchema = zod_1.z.object({
@@ -19,3 +19,12 @@ const ListLedgerAccountBalancesLedgerAccountBalanceBodySchema = zod_1.z.looseObj
19
19
  unit_id: ListLedgerAccountBalancesLedgerAccountBalanceUnitIdSchema.optional(),
20
20
  });
21
21
  exports.ListLedgerAccountBalancesLedgerAccountBalanceBodySchema = ListLedgerAccountBalancesLedgerAccountBalanceBodySchema;
22
+ //LedgerAccountBalance.updateOverdraftLimit
23
+ const UpdateOverdraftLimitLedgerAccountBalanceBodySchema = zod_1.z.looseObject({
24
+ subscription_id: zod_1.z.string().max(50),
25
+ unit_id: zod_1.z.string().max(50),
26
+ is_unlimited: zod_1.z.boolean(),
27
+ limit: zod_1.z.string().max(36).optional(),
28
+ change_reason: zod_1.z.string().max(255).optional(),
29
+ });
30
+ exports.UpdateOverdraftLimitLedgerAccountBalanceBodySchema = UpdateOverdraftLimitLedgerAccountBalanceBodySchema;
@@ -13,27 +13,54 @@ 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
- is: 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',
33
+ in: zod_1.z
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
- in: zod_1.z
63
+ is: zod_1.z
37
64
  .enum([
38
65
  'allocation',
39
66
  'capture',
@@ -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;
@@ -7,10 +7,48 @@ exports.ListOmnichannelOneTimeOrderBodySchema = void 0;
7
7
  const zod_1 = require("zod");
8
8
  //OmnichannelOneTimeOrder.list
9
9
  const ListOmnichannelOneTimeOrderSourceSchema = zod_1.z.object({
10
- is: zod_1.z.enum(['apple_app_store', 'google_play_store']).optional(),
11
- is_not: zod_1.z.enum(['apple_app_store', 'google_play_store']).optional(),
12
- in: zod_1.z.enum(['apple_app_store', 'google_play_store']).optional(),
13
- not_in: zod_1.z.enum(['apple_app_store', 'google_play_store']).optional(),
10
+ is: zod_1.z
11
+ .enum(['apple_app_store', 'google_play_store', 'roku', 'amazon_app_store'])
12
+ .optional(),
13
+ is_not: zod_1.z
14
+ .enum(['apple_app_store', 'google_play_store', 'roku', 'amazon_app_store'])
15
+ .optional(),
16
+ in: zod_1.z
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
+ ])
33
+ .optional(),
34
+ not_in: zod_1.z
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
+ ])
51
+ .optional(),
14
52
  });
15
53
  const ListOmnichannelOneTimeOrderCustomerIdSchema = zod_1.z.object({
16
54
  is: zod_1.z.string().min(1).optional(),