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
@@ -6,6 +6,28 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.ImportCreditNoteCreditNoteBodySchema = exports.RemoveTaxWithheldRefundCreditNoteBodySchema = exports.UpdateCreditNoteBodySchema = exports.DeleteCreditNoteBodySchema = exports.CreditNotesForCustomerCreditNoteBodySchema = exports.ListCreditNoteBodySchema = exports.VoidCreditNoteCreditNoteBodySchema = exports.RecordRefundCreditNoteBodySchema = exports.RefundCreditNoteBodySchema = exports.PdfCreditNoteBodySchema = exports.RetrieveCreditNoteBodySchema = exports.CreateCreditNoteBodySchema = void 0;
7
7
  const zod_1 = require("zod");
8
8
  //CreditNote.create
9
+ const CreateCreditNoteLineItemsItemSchema = zod_1.z.object({
10
+ reference_line_item_id: zod_1.z.string().max(40).optional(),
11
+ unit_amount: zod_1.z.number().int().optional(),
12
+ unit_amount_in_decimal: zod_1.z.string().max(39).optional(),
13
+ quantity: zod_1.z.number().int().optional(),
14
+ quantity_in_decimal: zod_1.z.string().max(33).optional(),
15
+ amount: zod_1.z.number().int().optional(),
16
+ date_from: zod_1.z.number().int().optional(),
17
+ date_to: zod_1.z.number().int().optional(),
18
+ description: zod_1.z.string().max(250).optional(),
19
+ entity_type: zod_1.z
20
+ .enum([
21
+ 'adhoc',
22
+ 'plan_item_price',
23
+ 'addon_item_price',
24
+ 'charge_item_price',
25
+ 'plan',
26
+ 'addon',
27
+ ])
28
+ .optional(),
29
+ entity_id: zod_1.z.string().max(100).optional(),
30
+ });
9
31
  const CreateCreditNoteLineItemsSchema = zod_1.z.object({
10
32
  reference_line_item_id: zod_1.z.array(zod_1.z.string().max(40).optional()).optional(),
11
33
  unit_amount: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
@@ -50,7 +72,12 @@ const CreateCreditNoteBodySchema = zod_1.z.looseObject({
50
72
  customer_notes: zod_1.z.string().max(2000).optional(),
51
73
  currency_code: zod_1.z.string().max(3).optional(),
52
74
  comment: zod_1.z.string().max(300).optional(),
53
- line_items: CreateCreditNoteLineItemsSchema.optional(),
75
+ line_items: zod_1.z
76
+ .union([
77
+ zod_1.z.array(CreateCreditNoteLineItemsItemSchema.optional()),
78
+ CreateCreditNoteLineItemsSchema,
79
+ ])
80
+ .optional(),
54
81
  });
55
82
  exports.CreateCreditNoteBodySchema = CreateCreditNoteBodySchema;
56
83
  //CreditNote.retrieve
@@ -95,12 +122,6 @@ const RecordRefundCreditNoteTransactionSchema = zod_1.z.object({
95
122
  'app_store',
96
123
  'play_store',
97
124
  'custom',
98
- 'tamara',
99
- 'qpay',
100
- 'blik',
101
- 'fpx',
102
- 'wero',
103
- 'p24',
104
125
  ]),
105
126
  reference_number: zod_1.z.string().max(100).optional(),
106
127
  custom_payment_method_id: zod_1.z.string().max(50).optional(),
@@ -122,37 +143,87 @@ const ListCreditNoteIdSchema = zod_1.z.object({
122
143
  is: zod_1.z.string().min(1).optional(),
123
144
  is_not: zod_1.z.string().min(1).optional(),
124
145
  starts_with: zod_1.z.string().min(1).optional(),
125
- in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
126
- not_in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
146
+ in: zod_1.z
147
+ .union([
148
+ zod_1.z.array(zod_1.z.string().optional()),
149
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
150
+ ])
151
+ .optional(),
152
+ not_in: zod_1.z
153
+ .union([
154
+ zod_1.z.array(zod_1.z.string().optional()),
155
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
156
+ ])
157
+ .optional(),
127
158
  });
128
159
  const ListCreditNoteCustomerIdSchema = zod_1.z.object({
129
160
  is: zod_1.z.string().min(1).optional(),
130
161
  is_not: zod_1.z.string().min(1).optional(),
131
162
  starts_with: zod_1.z.string().min(1).optional(),
132
- in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
133
- not_in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
163
+ in: zod_1.z
164
+ .union([
165
+ zod_1.z.array(zod_1.z.string().optional()),
166
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
167
+ ])
168
+ .optional(),
169
+ not_in: zod_1.z
170
+ .union([
171
+ zod_1.z.array(zod_1.z.string().optional()),
172
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
173
+ ])
174
+ .optional(),
134
175
  });
135
176
  const ListCreditNoteSubscriptionIdSchema = zod_1.z.object({
136
177
  is: zod_1.z.string().min(1).optional(),
137
178
  is_not: zod_1.z.string().min(1).optional(),
138
179
  starts_with: zod_1.z.string().min(1).optional(),
139
- is_present: zod_1.z.enum(['true', 'false']).optional(),
140
- in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
141
- not_in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
180
+ is_present: zod_1.z.union([zod_1.z.boolean(), zod_1.z.enum(['true', 'false'])]).optional(),
181
+ in: zod_1.z
182
+ .union([
183
+ zod_1.z.array(zod_1.z.string().optional()),
184
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
185
+ ])
186
+ .optional(),
187
+ not_in: zod_1.z
188
+ .union([
189
+ zod_1.z.array(zod_1.z.string().optional()),
190
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
191
+ ])
192
+ .optional(),
142
193
  });
143
194
  const ListCreditNoteReferenceInvoiceIdSchema = zod_1.z.object({
144
195
  is: zod_1.z.string().min(1).optional(),
145
196
  is_not: zod_1.z.string().min(1).optional(),
146
197
  starts_with: zod_1.z.string().min(1).optional(),
147
- is_present: zod_1.z.enum(['true', 'false']).optional(),
148
- in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
149
- not_in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
198
+ is_present: zod_1.z.union([zod_1.z.boolean(), zod_1.z.enum(['true', 'false'])]).optional(),
199
+ in: zod_1.z
200
+ .union([
201
+ zod_1.z.array(zod_1.z.string().optional()),
202
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
203
+ ])
204
+ .optional(),
205
+ not_in: zod_1.z
206
+ .union([
207
+ zod_1.z.array(zod_1.z.string().optional()),
208
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
209
+ ])
210
+ .optional(),
150
211
  });
151
212
  const ListCreditNoteTypeSchema = zod_1.z.object({
152
213
  is: zod_1.z.enum(['adjustment', 'refundable', 'store']).optional(),
153
214
  is_not: zod_1.z.enum(['adjustment', 'refundable', 'store']).optional(),
154
- in: zod_1.z.enum(['adjustment', 'refundable', 'store']).optional(),
155
- not_in: zod_1.z.enum(['adjustment', 'refundable', 'store']).optional(),
215
+ in: zod_1.z
216
+ .union([
217
+ zod_1.z.array(zod_1.z.enum(['adjustment', 'refundable', 'store']).optional()),
218
+ zod_1.z.enum(['adjustment', 'refundable', 'store']),
219
+ ])
220
+ .optional(),
221
+ not_in: zod_1.z
222
+ .union([
223
+ zod_1.z.array(zod_1.z.enum(['adjustment', 'refundable', 'store']).optional()),
224
+ zod_1.z.enum(['adjustment', 'refundable', 'store']),
225
+ ])
226
+ .optional(),
156
227
  });
157
228
  const ListCreditNoteReasonCodeSchema = zod_1.z.object({
158
229
  is: zod_1.z
@@ -188,35 +259,71 @@ const ListCreditNoteReasonCodeSchema = zod_1.z.object({
188
259
  ])
189
260
  .optional(),
190
261
  in: zod_1.z
191
- .enum([
192
- 'write_off',
193
- 'subscription_change',
194
- 'subscription_cancellation',
195
- 'subscription_pause',
196
- 'chargeback',
197
- 'product_unsatisfactory',
198
- 'service_unsatisfactory',
199
- 'order_change',
200
- 'order_cancellation',
201
- 'waiver',
202
- 'other',
203
- 'fraudulent',
262
+ .union([
263
+ zod_1.z.array(zod_1.z
264
+ .enum([
265
+ 'write_off',
266
+ 'subscription_change',
267
+ 'subscription_cancellation',
268
+ 'subscription_pause',
269
+ 'chargeback',
270
+ 'product_unsatisfactory',
271
+ 'service_unsatisfactory',
272
+ 'order_change',
273
+ 'order_cancellation',
274
+ 'waiver',
275
+ 'other',
276
+ 'fraudulent',
277
+ ])
278
+ .optional()),
279
+ zod_1.z.enum([
280
+ 'write_off',
281
+ 'subscription_change',
282
+ 'subscription_cancellation',
283
+ 'subscription_pause',
284
+ 'chargeback',
285
+ 'product_unsatisfactory',
286
+ 'service_unsatisfactory',
287
+ 'order_change',
288
+ 'order_cancellation',
289
+ 'waiver',
290
+ 'other',
291
+ 'fraudulent',
292
+ ]),
204
293
  ])
205
294
  .optional(),
206
295
  not_in: zod_1.z
207
- .enum([
208
- 'write_off',
209
- 'subscription_change',
210
- 'subscription_cancellation',
211
- 'subscription_pause',
212
- 'chargeback',
213
- 'product_unsatisfactory',
214
- 'service_unsatisfactory',
215
- 'order_change',
216
- 'order_cancellation',
217
- 'waiver',
218
- 'other',
219
- 'fraudulent',
296
+ .union([
297
+ zod_1.z.array(zod_1.z
298
+ .enum([
299
+ 'write_off',
300
+ 'subscription_change',
301
+ 'subscription_cancellation',
302
+ 'subscription_pause',
303
+ 'chargeback',
304
+ 'product_unsatisfactory',
305
+ 'service_unsatisfactory',
306
+ 'order_change',
307
+ 'order_cancellation',
308
+ 'waiver',
309
+ 'other',
310
+ 'fraudulent',
311
+ ])
312
+ .optional()),
313
+ zod_1.z.enum([
314
+ 'write_off',
315
+ 'subscription_change',
316
+ 'subscription_cancellation',
317
+ 'subscription_pause',
318
+ 'chargeback',
319
+ 'product_unsatisfactory',
320
+ 'service_unsatisfactory',
321
+ 'order_change',
322
+ 'order_cancellation',
323
+ 'waiver',
324
+ 'other',
325
+ 'fraudulent',
326
+ ]),
220
327
  ])
221
328
  .optional(),
222
329
  });
@@ -224,74 +331,205 @@ const ListCreditNoteCreateReasonCodeSchema = zod_1.z.object({
224
331
  is: zod_1.z.string().min(1).optional(),
225
332
  is_not: zod_1.z.string().min(1).optional(),
226
333
  starts_with: zod_1.z.string().min(1).optional(),
227
- in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
228
- not_in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
334
+ in: zod_1.z
335
+ .union([
336
+ zod_1.z.array(zod_1.z.string().optional()),
337
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
338
+ ])
339
+ .optional(),
340
+ not_in: zod_1.z
341
+ .union([
342
+ zod_1.z.array(zod_1.z.string().optional()),
343
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
344
+ ])
345
+ .optional(),
229
346
  });
230
347
  const ListCreditNoteStatusSchema = zod_1.z.object({
231
348
  is: zod_1.z.enum(['adjusted', 'refunded', 'refund_due', 'voided']).optional(),
232
349
  is_not: zod_1.z.enum(['adjusted', 'refunded', 'refund_due', 'voided']).optional(),
233
- in: zod_1.z.enum(['adjusted', 'refunded', 'refund_due', 'voided']).optional(),
234
- not_in: zod_1.z.enum(['adjusted', 'refunded', 'refund_due', 'voided']).optional(),
350
+ in: zod_1.z
351
+ .union([
352
+ zod_1.z.array(zod_1.z.enum(['adjusted', 'refunded', 'refund_due', 'voided']).optional()),
353
+ zod_1.z.enum(['adjusted', 'refunded', 'refund_due', 'voided']),
354
+ ])
355
+ .optional(),
356
+ not_in: zod_1.z
357
+ .union([
358
+ zod_1.z.array(zod_1.z.enum(['adjusted', 'refunded', 'refund_due', 'voided']).optional()),
359
+ zod_1.z.enum(['adjusted', 'refunded', 'refund_due', 'voided']),
360
+ ])
361
+ .optional(),
235
362
  });
236
363
  const ListCreditNoteDateSchema = zod_1.z.object({
237
- after: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
238
- before: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
239
- on: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
240
- between: zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
364
+ after: zod_1.z
365
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
366
+ .optional(),
367
+ before: zod_1.z
368
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
369
+ .optional(),
370
+ on: zod_1.z
371
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
372
+ .optional(),
373
+ between: zod_1.z
374
+ .union([
375
+ zod_1.z.array(zod_1.z.number().int().optional()).min(2).max(2),
376
+ zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')),
377
+ ])
378
+ .optional(),
241
379
  });
242
380
  const ListCreditNoteTotalSchema = zod_1.z.object({
243
- is: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
244
- is_not: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
245
- lt: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
246
- lte: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
247
- gt: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
248
- gte: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
249
- between: zod_1.z.string().regex(RegExp('^\\[-?\\d+,-?\\d+\\]$')).optional(),
381
+ is: zod_1.z
382
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
383
+ .optional(),
384
+ is_not: zod_1.z
385
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
386
+ .optional(),
387
+ lt: zod_1.z
388
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
389
+ .optional(),
390
+ lte: zod_1.z
391
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
392
+ .optional(),
393
+ gt: zod_1.z
394
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
395
+ .optional(),
396
+ gte: zod_1.z
397
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
398
+ .optional(),
399
+ between: zod_1.z
400
+ .union([
401
+ zod_1.z.array(zod_1.z.number().int().optional()).min(2).max(2),
402
+ zod_1.z.string().regex(RegExp('^\\[-?\\d+,-?\\d+\\]$')),
403
+ ])
404
+ .optional(),
250
405
  });
251
406
  const ListCreditNotePriceTypeSchema = zod_1.z.object({
252
407
  is: zod_1.z.enum(['tax_exclusive', 'tax_inclusive']).optional(),
253
408
  is_not: zod_1.z.enum(['tax_exclusive', 'tax_inclusive']).optional(),
254
- in: zod_1.z.enum(['tax_exclusive', 'tax_inclusive']).optional(),
255
- not_in: zod_1.z.enum(['tax_exclusive', 'tax_inclusive']).optional(),
409
+ in: zod_1.z
410
+ .union([
411
+ zod_1.z.array(zod_1.z.enum(['tax_exclusive', 'tax_inclusive']).optional()),
412
+ zod_1.z.enum(['tax_exclusive', 'tax_inclusive']),
413
+ ])
414
+ .optional(),
415
+ not_in: zod_1.z
416
+ .union([
417
+ zod_1.z.array(zod_1.z.enum(['tax_exclusive', 'tax_inclusive']).optional()),
418
+ zod_1.z.enum(['tax_exclusive', 'tax_inclusive']),
419
+ ])
420
+ .optional(),
256
421
  });
257
422
  const ListCreditNoteAmountAllocatedSchema = zod_1.z.object({
258
- is: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
259
- is_not: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
260
- lt: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
261
- lte: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
262
- gt: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
263
- gte: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
264
- between: zod_1.z.string().regex(RegExp('^\\[-?\\d+,-?\\d+\\]$')).optional(),
423
+ is: zod_1.z
424
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
425
+ .optional(),
426
+ is_not: zod_1.z
427
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
428
+ .optional(),
429
+ lt: zod_1.z
430
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
431
+ .optional(),
432
+ lte: zod_1.z
433
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
434
+ .optional(),
435
+ gt: zod_1.z
436
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
437
+ .optional(),
438
+ gte: zod_1.z
439
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
440
+ .optional(),
441
+ between: zod_1.z
442
+ .union([
443
+ zod_1.z.array(zod_1.z.number().int().optional()).min(2).max(2),
444
+ zod_1.z.string().regex(RegExp('^\\[-?\\d+,-?\\d+\\]$')),
445
+ ])
446
+ .optional(),
265
447
  });
266
448
  const ListCreditNoteAmountRefundedSchema = zod_1.z.object({
267
- is: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
268
- is_not: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
269
- lt: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
270
- lte: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
271
- gt: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
272
- gte: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
273
- between: zod_1.z.string().regex(RegExp('^\\[-?\\d+,-?\\d+\\]$')).optional(),
449
+ is: zod_1.z
450
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
451
+ .optional(),
452
+ is_not: zod_1.z
453
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
454
+ .optional(),
455
+ lt: zod_1.z
456
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
457
+ .optional(),
458
+ lte: zod_1.z
459
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
460
+ .optional(),
461
+ gt: zod_1.z
462
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
463
+ .optional(),
464
+ gte: zod_1.z
465
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
466
+ .optional(),
467
+ between: zod_1.z
468
+ .union([
469
+ zod_1.z.array(zod_1.z.number().int().optional()).min(2).max(2),
470
+ zod_1.z.string().regex(RegExp('^\\[-?\\d+,-?\\d+\\]$')),
471
+ ])
472
+ .optional(),
274
473
  });
275
474
  const ListCreditNoteAmountAvailableSchema = zod_1.z.object({
276
- is: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
277
- is_not: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
278
- lt: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
279
- lte: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
280
- gt: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
281
- gte: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
282
- between: zod_1.z.string().regex(RegExp('^\\[-?\\d+,-?\\d+\\]$')).optional(),
475
+ is: zod_1.z
476
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
477
+ .optional(),
478
+ is_not: zod_1.z
479
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
480
+ .optional(),
481
+ lt: zod_1.z
482
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
483
+ .optional(),
484
+ lte: zod_1.z
485
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
486
+ .optional(),
487
+ gt: zod_1.z
488
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
489
+ .optional(),
490
+ gte: zod_1.z
491
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
492
+ .optional(),
493
+ between: zod_1.z
494
+ .union([
495
+ zod_1.z.array(zod_1.z.number().int().optional()).min(2).max(2),
496
+ zod_1.z.string().regex(RegExp('^\\[-?\\d+,-?\\d+\\]$')),
497
+ ])
498
+ .optional(),
283
499
  });
284
500
  const ListCreditNoteVoidedAtSchema = zod_1.z.object({
285
- after: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
286
- before: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
287
- on: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
288
- between: zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
501
+ after: zod_1.z
502
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
503
+ .optional(),
504
+ before: zod_1.z
505
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
506
+ .optional(),
507
+ on: zod_1.z
508
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
509
+ .optional(),
510
+ between: zod_1.z
511
+ .union([
512
+ zod_1.z.array(zod_1.z.number().int().optional()).min(2).max(2),
513
+ zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')),
514
+ ])
515
+ .optional(),
289
516
  });
290
517
  const ListCreditNoteUpdatedAtSchema = zod_1.z.object({
291
- after: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
292
- before: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
293
- on: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
294
- between: zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
518
+ after: zod_1.z
519
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
520
+ .optional(),
521
+ before: zod_1.z
522
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
523
+ .optional(),
524
+ on: zod_1.z
525
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
526
+ .optional(),
527
+ between: zod_1.z
528
+ .union([
529
+ zod_1.z.array(zod_1.z.number().int().optional()).min(2).max(2),
530
+ zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')),
531
+ ])
532
+ .optional(),
295
533
  });
296
534
  const ListCreditNoteSortBySchema = zod_1.z.looseObject({
297
535
  asc: zod_1.z.enum(['date']).optional(),
@@ -300,8 +538,18 @@ const ListCreditNoteSortBySchema = zod_1.z.looseObject({
300
538
  const ListCreditNoteChannelSchema = zod_1.z.object({
301
539
  is: zod_1.z.enum(['web', 'app_store', 'play_store']).optional(),
302
540
  is_not: zod_1.z.enum(['web', 'app_store', 'play_store']).optional(),
303
- in: zod_1.z.enum(['web', 'app_store', 'play_store']).optional(),
304
- not_in: zod_1.z.enum(['web', 'app_store', 'play_store']).optional(),
541
+ in: zod_1.z
542
+ .union([
543
+ zod_1.z.array(zod_1.z.enum(['web', 'app_store', 'play_store']).optional()),
544
+ zod_1.z.enum(['web', 'app_store', 'play_store']),
545
+ ])
546
+ .optional(),
547
+ not_in: zod_1.z
548
+ .union([
549
+ zod_1.z.array(zod_1.z.enum(['web', 'app_store', 'play_store']).optional()),
550
+ zod_1.z.enum(['web', 'app_store', 'play_store']),
551
+ ])
552
+ .optional(),
305
553
  });
306
554
  const ListCreditNoteEinvoiceSchema = zod_1.z.object({
307
555
  status: ListCreditNoteStatusSchema.optional(),
@@ -356,6 +604,61 @@ const RemoveTaxWithheldRefundCreditNoteBodySchema = zod_1.z.looseObject({
356
604
  });
357
605
  exports.RemoveTaxWithheldRefundCreditNoteBodySchema = RemoveTaxWithheldRefundCreditNoteBodySchema;
358
606
  //CreditNote.importCreditNote
607
+ const ImportCreditNoteCreditNoteLineItemsItemSchema = zod_1.z.object({
608
+ reference_line_item_id: zod_1.z.string().max(40).optional(),
609
+ id: zod_1.z.string().max(40).optional(),
610
+ date_from: zod_1.z.number().int().optional(),
611
+ date_to: zod_1.z.number().int().optional(),
612
+ subscription_id: zod_1.z.string().max(50).optional(),
613
+ description: zod_1.z.string().max(250),
614
+ unit_amount: zod_1.z.number().int().optional(),
615
+ quantity: zod_1.z.number().int().optional(),
616
+ amount: zod_1.z.number().int().optional(),
617
+ unit_amount_in_decimal: zod_1.z.string().max(39).optional(),
618
+ quantity_in_decimal: zod_1.z.string().max(33).optional(),
619
+ amount_in_decimal: zod_1.z.string().max(39).optional(),
620
+ entity_type: zod_1.z
621
+ .enum([
622
+ 'adhoc',
623
+ 'plan_item_price',
624
+ 'addon_item_price',
625
+ 'charge_item_price',
626
+ 'plan_setup',
627
+ 'plan',
628
+ 'addon',
629
+ ])
630
+ .optional(),
631
+ entity_id: zod_1.z.string().max(100).optional(),
632
+ item_level_discount1_entity_id: zod_1.z.string().max(100).optional(),
633
+ item_level_discount1_amount: zod_1.z.number().int().min(0).optional(),
634
+ item_level_discount2_entity_id: zod_1.z.string().max(100).optional(),
635
+ item_level_discount2_amount: zod_1.z.number().int().min(0).optional(),
636
+ tax1_name: zod_1.z.string().max(50).optional(),
637
+ tax1_amount: zod_1.z.number().int().min(0).optional(),
638
+ tax2_name: zod_1.z.string().max(50).optional(),
639
+ tax2_amount: zod_1.z.number().int().min(0).optional(),
640
+ tax3_name: zod_1.z.string().max(50).optional(),
641
+ tax3_amount: zod_1.z.number().int().min(0).optional(),
642
+ tax4_name: zod_1.z.string().max(50).optional(),
643
+ tax4_amount: zod_1.z.number().int().min(0).optional(),
644
+ tax5_name: zod_1.z.string().max(50).optional(),
645
+ tax5_amount: zod_1.z.number().int().min(0).optional(),
646
+ tax6_name: zod_1.z.string().max(50).optional(),
647
+ tax6_amount: zod_1.z.number().int().min(0).optional(),
648
+ tax7_name: zod_1.z.string().max(50).optional(),
649
+ tax7_amount: zod_1.z.number().int().min(0).optional(),
650
+ tax8_name: zod_1.z.string().max(50).optional(),
651
+ tax8_amount: zod_1.z.number().int().min(0).optional(),
652
+ tax9_name: zod_1.z.string().max(50).optional(),
653
+ tax9_amount: zod_1.z.number().int().min(0).optional(),
654
+ tax10_name: zod_1.z.string().max(50).optional(),
655
+ tax10_amount: zod_1.z.number().int().min(0).optional(),
656
+ is_partial_tax_applied: zod_1.z.boolean().optional(),
657
+ taxable_amount: zod_1.z.number().int().min(0).optional(),
658
+ proration_mode: zod_1.z
659
+ .enum(['reset', 'delta', 'service_period_revision', 'adjusted_term'])
660
+ .optional(),
661
+ });
359
662
  const ImportCreditNoteCreditNoteLineItemsSchema = zod_1.z.object({
360
663
  reference_line_item_id: zod_1.z.array(zod_1.z.string().max(40).optional()).optional(),
361
664
  id: zod_1.z.array(zod_1.z.string().max(40).optional()).optional(),
@@ -423,6 +726,17 @@ const ImportCreditNoteCreditNoteLineItemsSchema = zod_1.z.object({
423
726
  .optional())
424
727
  .optional(),
425
728
  });
729
+ const ImportCreditNoteCreditNoteLineItemTiersItemSchema = zod_1.z.object({
730
+ line_item_id: zod_1.z.string().max(40),
731
+ starting_unit: zod_1.z.number().int().min(0).optional(),
732
+ ending_unit: zod_1.z.number().int().optional(),
733
+ quantity_used: zod_1.z.number().int().min(0).optional(),
734
+ unit_amount: zod_1.z.number().int().min(0).optional(),
735
+ starting_unit_in_decimal: zod_1.z.string().max(33).optional(),
736
+ ending_unit_in_decimal: zod_1.z.string().max(33).optional(),
737
+ quantity_used_in_decimal: zod_1.z.string().max(33).optional(),
738
+ unit_amount_in_decimal: zod_1.z.string().max(40).optional(),
739
+ });
426
740
  const ImportCreditNoteCreditNoteLineItemTiersSchema = zod_1.z.object({
427
741
  line_item_id: zod_1.z.array(zod_1.z.string().max(40).optional()),
428
742
  starting_unit: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
@@ -434,6 +748,19 @@ const ImportCreditNoteCreditNoteLineItemTiersSchema = zod_1.z.object({
434
748
  quantity_used_in_decimal: zod_1.z.array(zod_1.z.string().max(33).optional()).optional(),
435
749
  unit_amount_in_decimal: zod_1.z.array(zod_1.z.string().max(40).optional()).optional(),
436
750
  });
751
+ const ImportCreditNoteCreditNoteDiscountsItemSchema = zod_1.z.object({
752
+ line_item_id: zod_1.z.string().max(40).optional(),
753
+ entity_type: zod_1.z.enum([
754
+ 'item_level_coupon',
755
+ 'document_level_coupon',
756
+ 'promotional_credits',
757
+ 'item_level_discount',
758
+ 'document_level_discount',
759
+ ]),
760
+ entity_id: zod_1.z.string().max(100).optional(),
761
+ description: zod_1.z.string().max(250).optional(),
762
+ amount: zod_1.z.number().int().min(0),
763
+ });
437
764
  const ImportCreditNoteCreditNoteDiscountsSchema = zod_1.z.object({
438
765
  line_item_id: zod_1.z.array(zod_1.z.string().max(40).optional()).optional(),
439
766
  entity_type: zod_1.z.array(zod_1.z
@@ -449,6 +776,26 @@ const ImportCreditNoteCreditNoteDiscountsSchema = zod_1.z.object({
449
776
  description: zod_1.z.array(zod_1.z.string().max(250).optional()).optional(),
450
777
  amount: zod_1.z.array(zod_1.z.number().int().min(0).optional()),
451
778
  });
779
+ const ImportCreditNoteCreditNoteTaxesItemSchema = zod_1.z.object({
780
+ name: zod_1.z.string().max(100),
781
+ rate: zod_1.z.number().min(0).max(100),
782
+ amount: zod_1.z.number().int().min(0).optional(),
783
+ description: zod_1.z.string().max(50).optional(),
784
+ juris_type: zod_1.z
785
+ .enum([
786
+ 'country',
787
+ 'federal',
788
+ 'state',
789
+ 'county',
790
+ 'city',
791
+ 'special',
792
+ 'unincorporated',
793
+ 'other',
794
+ ])
795
+ .optional(),
796
+ juris_name: zod_1.z.string().max(250).optional(),
797
+ juris_code: zod_1.z.string().max(250).optional(),
798
+ });
452
799
  const ImportCreditNoteCreditNoteTaxesSchema = zod_1.z.object({
453
800
  name: zod_1.z.array(zod_1.z.string().max(100).optional()),
454
801
  rate: zod_1.z.array(zod_1.z.number().min(0).max(100).optional()),
@@ -471,11 +818,31 @@ const ImportCreditNoteCreditNoteTaxesSchema = zod_1.z.object({
471
818
  juris_name: zod_1.z.array(zod_1.z.string().max(250).optional()).optional(),
472
819
  juris_code: zod_1.z.array(zod_1.z.string().max(250).optional()).optional(),
473
820
  });
821
+ const ImportCreditNoteCreditNoteAllocationsItemSchema = zod_1.z.object({
822
+ invoice_id: zod_1.z.string().max(50),
823
+ allocated_amount: zod_1.z.number().int().min(1),
824
+ allocated_at: zod_1.z.number().int(),
825
+ });
474
826
  const ImportCreditNoteCreditNoteAllocationsSchema = zod_1.z.object({
475
827
  invoice_id: zod_1.z.array(zod_1.z.string().max(50).optional()),
476
828
  allocated_amount: zod_1.z.array(zod_1.z.number().int().min(1).optional()),
477
829
  allocated_at: zod_1.z.array(zod_1.z.number().int().optional()),
478
830
  });
831
+ const ImportCreditNoteCreditNoteLinkedRefundsItemSchema = zod_1.z.object({
832
+ id: zod_1.z.string().max(40).optional(),
833
+ amount: zod_1.z.number().int().min(1),
834
+ payment_method: zod_1.z.enum([
835
+ 'cash',
836
+ 'check',
837
+ 'bank_transfer',
838
+ 'other',
839
+ 'app_store',
840
+ 'play_store',
841
+ 'custom',
842
+ ]),
843
+ date: zod_1.z.number().int(),
844
+ reference_number: zod_1.z.string().max(100).min(1).optional(),
845
+ });
479
846
  const ImportCreditNoteCreditNoteLinkedRefundsSchema = zod_1.z.object({
480
847
  id: zod_1.z.array(zod_1.z.string().max(40).optional()).optional(),
481
848
  amount: zod_1.z.array(zod_1.z.number().int().min(1).optional()),
@@ -488,12 +855,6 @@ const ImportCreditNoteCreditNoteLinkedRefundsSchema = zod_1.z.object({
488
855
  'app_store',
489
856
  'play_store',
490
857
  'custom',
491
- 'tamara',
492
- 'qpay',
493
- 'blik',
494
- 'fpx',
495
- 'wero',
496
- 'p24',
497
858
  ])
498
859
  .optional()),
499
860
  date: zod_1.z.array(zod_1.z.number().int().optional()),
@@ -517,11 +878,41 @@ const ImportCreditNoteCreditNoteBodySchema = zod_1.z.looseObject({
517
878
  round_off_amount: zod_1.z.number().int().min(-99).max(99).optional(),
518
879
  fractional_correction: zod_1.z.number().int().min(-50000).max(50000).optional(),
519
880
  vat_number_prefix: zod_1.z.string().max(10).optional(),
520
- line_items: ImportCreditNoteCreditNoteLineItemsSchema.optional(),
521
- line_item_tiers: ImportCreditNoteCreditNoteLineItemTiersSchema.optional(),
522
- discounts: ImportCreditNoteCreditNoteDiscountsSchema.optional(),
523
- taxes: ImportCreditNoteCreditNoteTaxesSchema.optional(),
524
- allocations: ImportCreditNoteCreditNoteAllocationsSchema.optional(),
525
- linked_refunds: ImportCreditNoteCreditNoteLinkedRefundsSchema.optional(),
881
+ line_items: zod_1.z
882
+ .union([
883
+ zod_1.z.array(ImportCreditNoteCreditNoteLineItemsItemSchema.optional()),
884
+ ImportCreditNoteCreditNoteLineItemsSchema,
885
+ ])
886
+ .optional(),
887
+ line_item_tiers: zod_1.z
888
+ .union([
889
+ zod_1.z.array(ImportCreditNoteCreditNoteLineItemTiersItemSchema.optional()),
890
+ ImportCreditNoteCreditNoteLineItemTiersSchema,
891
+ ])
892
+ .optional(),
893
+ discounts: zod_1.z
894
+ .union([
895
+ zod_1.z.array(ImportCreditNoteCreditNoteDiscountsItemSchema.optional()),
896
+ ImportCreditNoteCreditNoteDiscountsSchema,
897
+ ])
898
+ .optional(),
899
+ taxes: zod_1.z
900
+ .union([
901
+ zod_1.z.array(ImportCreditNoteCreditNoteTaxesItemSchema.optional()),
902
+ ImportCreditNoteCreditNoteTaxesSchema,
903
+ ])
904
+ .optional(),
905
+ allocations: zod_1.z
906
+ .union([
907
+ zod_1.z.array(ImportCreditNoteCreditNoteAllocationsItemSchema.optional()),
908
+ ImportCreditNoteCreditNoteAllocationsSchema,
909
+ ])
910
+ .optional(),
911
+ linked_refunds: zod_1.z
912
+ .union([
913
+ zod_1.z.array(ImportCreditNoteCreditNoteLinkedRefundsItemSchema.optional()),
914
+ ImportCreditNoteCreditNoteLinkedRefundsSchema,
915
+ ])
916
+ .optional(),
526
917
  });
527
918
  exports.ImportCreditNoteCreditNoteBodySchema = ImportCreditNoteCreditNoteBodySchema;