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
@@ -10,8 +10,18 @@ const ListDisputeIdSchema = zod_1.z.object({
10
10
  is: zod_1.z.string().min(1).optional(),
11
11
  is_not: zod_1.z.string().min(1).optional(),
12
12
  starts_with: zod_1.z.string().min(1).optional(),
13
- in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
14
- not_in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
13
+ in: zod_1.z
14
+ .union([
15
+ zod_1.z.array(zod_1.z.string().optional()),
16
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
17
+ ])
18
+ .optional(),
19
+ not_in: zod_1.z
20
+ .union([
21
+ zod_1.z.array(zod_1.z.string().optional()),
22
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
23
+ ])
24
+ .optional(),
15
25
  });
16
26
  const ListDisputeStatusSchema = zod_1.z.object({
17
27
  is: zod_1.z
@@ -35,60 +45,142 @@ const ListDisputeStatusSchema = zod_1.z.object({
35
45
  ])
36
46
  .optional(),
37
47
  in: zod_1.z
38
- .enum([
39
- 'initiated',
40
- 'funds_withdrawn',
41
- 'in_review',
42
- 'cancelled',
43
- 'lost',
44
- 'won',
48
+ .union([
49
+ zod_1.z.array(zod_1.z
50
+ .enum([
51
+ 'initiated',
52
+ 'funds_withdrawn',
53
+ 'in_review',
54
+ 'cancelled',
55
+ 'lost',
56
+ 'won',
57
+ ])
58
+ .optional()),
59
+ zod_1.z.enum([
60
+ 'initiated',
61
+ 'funds_withdrawn',
62
+ 'in_review',
63
+ 'cancelled',
64
+ 'lost',
65
+ 'won',
66
+ ]),
45
67
  ])
46
68
  .optional(),
47
69
  not_in: zod_1.z
48
- .enum([
49
- 'initiated',
50
- 'funds_withdrawn',
51
- 'in_review',
52
- 'cancelled',
53
- 'lost',
54
- 'won',
70
+ .union([
71
+ zod_1.z.array(zod_1.z
72
+ .enum([
73
+ 'initiated',
74
+ 'funds_withdrawn',
75
+ 'in_review',
76
+ 'cancelled',
77
+ 'lost',
78
+ 'won',
79
+ ])
80
+ .optional()),
81
+ zod_1.z.enum([
82
+ 'initiated',
83
+ 'funds_withdrawn',
84
+ 'in_review',
85
+ 'cancelled',
86
+ 'lost',
87
+ 'won',
88
+ ]),
55
89
  ])
56
90
  .optional(),
57
91
  });
58
92
  const ListDisputeTypeSchema = zod_1.z.object({
59
93
  is: zod_1.z.enum(['chargeback', 'inquiry']).optional(),
60
94
  is_not: zod_1.z.enum(['chargeback', 'inquiry']).optional(),
61
- in: zod_1.z.enum(['chargeback', 'inquiry']).optional(),
62
- not_in: zod_1.z.enum(['chargeback', 'inquiry']).optional(),
95
+ in: zod_1.z
96
+ .union([
97
+ zod_1.z.array(zod_1.z.enum(['chargeback', 'inquiry']).optional()),
98
+ zod_1.z.enum(['chargeback', 'inquiry']),
99
+ ])
100
+ .optional(),
101
+ not_in: zod_1.z
102
+ .union([
103
+ zod_1.z.array(zod_1.z.enum(['chargeback', 'inquiry']).optional()),
104
+ zod_1.z.enum(['chargeback', 'inquiry']),
105
+ ])
106
+ .optional(),
63
107
  });
64
108
  const ListDisputeCustomerIdSchema = zod_1.z.object({
65
109
  is: zod_1.z.string().min(1).optional(),
66
110
  is_not: zod_1.z.string().min(1).optional(),
67
111
  starts_with: zod_1.z.string().min(1).optional(),
68
- in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
69
- not_in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
112
+ in: zod_1.z
113
+ .union([
114
+ zod_1.z.array(zod_1.z.string().optional()),
115
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
116
+ ])
117
+ .optional(),
118
+ not_in: zod_1.z
119
+ .union([
120
+ zod_1.z.array(zod_1.z.string().optional()),
121
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
122
+ ])
123
+ .optional(),
70
124
  });
71
125
  const ListDisputeTransactionIdSchema = zod_1.z.object({
72
126
  is: zod_1.z.string().min(1).optional(),
73
127
  is_not: zod_1.z.string().min(1).optional(),
74
128
  starts_with: zod_1.z.string().min(1).optional(),
75
- in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
76
- not_in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
129
+ in: zod_1.z
130
+ .union([
131
+ zod_1.z.array(zod_1.z.string().optional()),
132
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
133
+ ])
134
+ .optional(),
135
+ not_in: zod_1.z
136
+ .union([
137
+ zod_1.z.array(zod_1.z.string().optional()),
138
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
139
+ ])
140
+ .optional(),
77
141
  });
78
142
  const ListDisputeAmountSchema = zod_1.z.object({
79
- is: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
80
- is_not: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
81
- lt: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
82
- lte: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
83
- gt: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
84
- gte: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
85
- between: zod_1.z.string().regex(RegExp('^\\[-?\\d+,-?\\d+\\]$')).optional(),
143
+ is: zod_1.z
144
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
145
+ .optional(),
146
+ is_not: zod_1.z
147
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
148
+ .optional(),
149
+ lt: zod_1.z
150
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
151
+ .optional(),
152
+ lte: zod_1.z
153
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
154
+ .optional(),
155
+ gt: zod_1.z
156
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
157
+ .optional(),
158
+ gte: zod_1.z
159
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
160
+ .optional(),
161
+ between: zod_1.z
162
+ .union([
163
+ zod_1.z.array(zod_1.z.number().int().optional()).min(2).max(2),
164
+ zod_1.z.string().regex(RegExp('^\\[-?\\d+,-?\\d+\\]$')),
165
+ ])
166
+ .optional(),
86
167
  });
87
168
  const ListDisputeCreatedAtSchema = zod_1.z.object({
88
- after: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
89
- before: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
90
- on: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
91
- between: zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
169
+ after: zod_1.z
170
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
171
+ .optional(),
172
+ before: zod_1.z
173
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
174
+ .optional(),
175
+ on: zod_1.z
176
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
177
+ .optional(),
178
+ between: zod_1.z
179
+ .union([
180
+ zod_1.z.array(zod_1.z.number().int().optional()).min(2).max(2),
181
+ zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')),
182
+ ])
183
+ .optional(),
92
184
  });
93
185
  const ListDisputeBodySchema = zod_1.z.looseObject({
94
186
  limit: zod_1.z.number().int().min(1).max(100).optional(),
@@ -7,18 +7,39 @@ exports.ListEinvoicesEinvoiceBodySchema = void 0;
7
7
  const zod_1 = require("zod");
8
8
  //Einvoice.listEinvoices
9
9
  const ListEinvoicesEinvoiceIdSchema = zod_1.z.object({
10
+ in: zod_1.z
11
+ .union([
12
+ zod_1.z.array(zod_1.z.string().optional()),
13
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
14
+ ])
15
+ .optional(),
10
16
  is: zod_1.z.string().min(1).optional(),
11
- in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
12
17
  });
13
18
  const ListEinvoicesEinvoiceReferenceIdSchema = zod_1.z.object({
19
+ in: zod_1.z
20
+ .union([
21
+ zod_1.z.array(zod_1.z.string().optional()),
22
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
23
+ ])
24
+ .optional(),
14
25
  is: zod_1.z.string().min(1).optional(),
15
- in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
16
26
  });
17
27
  const ListEinvoicesEinvoiceUpdatedAtSchema = zod_1.z.object({
18
- after: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
19
- before: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
20
- on: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
21
- between: zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
28
+ after: zod_1.z
29
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
30
+ .optional(),
31
+ before: zod_1.z
32
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
33
+ .optional(),
34
+ on: zod_1.z
35
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
36
+ .optional(),
37
+ between: zod_1.z
38
+ .union([
39
+ zod_1.z.array(zod_1.z.number().int().optional()).min(2).max(2),
40
+ zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')),
41
+ ])
42
+ .optional(),
22
43
  });
23
44
  const ListEinvoicesEinvoiceSortBySchema = zod_1.z.looseObject({
24
45
  asc: zod_1.z.enum(['updated_at']).optional(),
@@ -7,10 +7,21 @@ exports.EmailLogsForCustomerEmailLogBodySchema = void 0;
7
7
  const zod_1 = require("zod");
8
8
  //EmailLog.emailLogsForCustomer
9
9
  const EmailLogsForCustomerEmailLogSentOnSchema = zod_1.z.object({
10
- after: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
11
- before: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
12
- on: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
13
- between: zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
10
+ after: zod_1.z
11
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
12
+ .optional(),
13
+ before: zod_1.z
14
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
15
+ .optional(),
16
+ on: zod_1.z
17
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
18
+ .optional(),
19
+ between: zod_1.z
20
+ .union([
21
+ zod_1.z.array(zod_1.z.number().int().optional()).min(2).max(2),
22
+ zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')),
23
+ ])
24
+ .optional(),
14
25
  });
15
26
  const EmailLogsForCustomerEmailLogBusinessEntityIdSchema = zod_1.z.object({
16
27
  is: zod_1.z.string().min(1).optional(),
@@ -7,20 +7,35 @@ exports.CreateEntitlementBodySchema = exports.ListEntitlementBodySchema = void 0
7
7
  const zod_1 = require("zod");
8
8
  //Entitlement.list
9
9
  const ListEntitlementFeatureIdSchema = zod_1.z.object({
10
+ in: zod_1.z
11
+ .union([
12
+ zod_1.z.array(zod_1.z.string().optional()),
13
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
14
+ ])
15
+ .optional(),
10
16
  is: zod_1.z.string().min(1).optional(),
11
- in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
12
17
  });
13
18
  const ListEntitlementEntityTypeSchema = zod_1.z.object({
14
- is: zod_1.z
15
- .enum(['plan', 'addon', 'charge', 'plan_price', 'addon_price'])
16
- .optional(),
17
19
  in: zod_1.z
20
+ .union([
21
+ zod_1.z.array(zod_1.z
22
+ .enum(['plan', 'addon', 'charge', 'plan_price', 'addon_price'])
23
+ .optional()),
24
+ zod_1.z.enum(['plan', 'addon', 'charge', 'plan_price', 'addon_price']),
25
+ ])
26
+ .optional(),
27
+ is: zod_1.z
18
28
  .enum(['plan', 'addon', 'charge', 'plan_price', 'addon_price'])
19
29
  .optional(),
20
30
  });
21
31
  const ListEntitlementEntityIdSchema = zod_1.z.object({
32
+ in: zod_1.z
33
+ .union([
34
+ zod_1.z.array(zod_1.z.string().optional()),
35
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
36
+ ])
37
+ .optional(),
22
38
  is: zod_1.z.string().min(1).optional(),
23
- in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
24
39
  });
25
40
  const ListEntitlementBodySchema = zod_1.z.looseObject({
26
41
  limit: zod_1.z.number().int().min(1).max(100).optional(),
@@ -33,6 +48,15 @@ const ListEntitlementBodySchema = zod_1.z.looseObject({
33
48
  });
34
49
  exports.ListEntitlementBodySchema = ListEntitlementBodySchema;
35
50
  //Entitlement.create
51
+ const CreateEntitlementEntitlementsItemSchema = zod_1.z.object({
52
+ entity_id: zod_1.z.string().max(100),
53
+ feature_id: zod_1.z.string().max(50),
54
+ entity_type: zod_1.z
55
+ .enum(['plan', 'addon', 'charge', 'plan_price', 'addon_price'])
56
+ .optional(),
57
+ value: zod_1.z.string().max(50).optional(),
58
+ apply_grandfathering: zod_1.z.boolean().default(false).optional(),
59
+ });
36
60
  const CreateEntitlementEntitlementsSchema = zod_1.z.object({
37
61
  entity_id: zod_1.z.array(zod_1.z.string().max(100).optional()),
38
62
  feature_id: zod_1.z.array(zod_1.z.string().max(50).optional()),
@@ -49,6 +73,11 @@ const CreateEntitlementEntitlementsSchema = zod_1.z.object({
49
73
  const CreateEntitlementBodySchema = zod_1.z.looseObject({
50
74
  action: zod_1.z.enum(['upsert', 'remove']),
51
75
  change_reason: zod_1.z.string().max(100).optional(),
52
- entitlements: CreateEntitlementEntitlementsSchema.optional(),
76
+ entitlements: zod_1.z
77
+ .union([
78
+ zod_1.z.array(CreateEntitlementEntitlementsItemSchema.optional()),
79
+ CreateEntitlementEntitlementsSchema,
80
+ ])
81
+ .optional(),
53
82
  });
54
83
  exports.CreateEntitlementBodySchema = CreateEntitlementBodySchema;
@@ -6,6 +6,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.ListEntitlementOverrideForSubscriptionEntitlementOverrideBodySchema = exports.AddEntitlementOverrideForSubscriptionEntitlementOverrideBodySchema = void 0;
7
7
  const zod_1 = require("zod");
8
8
  //EntitlementOverride.addEntitlementOverrideForSubscription
9
+ const AddEntitlementOverrideForSubscriptionEntitlementOverrideEntitlementOverridesItemSchema = zod_1.z.object({
10
+ feature_id: zod_1.z.string().max(50),
11
+ entity_id: zod_1.z.string().max(100).optional(),
12
+ entity_type: zod_1.z
13
+ .enum(['plan_price', 'addon_price', 'charge', 'charge_price'])
14
+ .optional(),
15
+ value: zod_1.z.string().max(50).optional(),
16
+ expires_at: zod_1.z.number().int().optional(),
17
+ effective_from: zod_1.z.number().int().optional(),
18
+ is_enabled: zod_1.z.boolean().optional(),
19
+ });
9
20
  const AddEntitlementOverrideForSubscriptionEntitlementOverrideEntitlementOverridesSchema = zod_1.z.object({
10
21
  feature_id: zod_1.z.array(zod_1.z.string().max(50).optional()),
11
22
  entity_id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
@@ -21,7 +32,12 @@ const AddEntitlementOverrideForSubscriptionEntitlementOverrideEntitlementOverrid
21
32
  });
22
33
  const AddEntitlementOverrideForSubscriptionEntitlementOverrideBodySchema = zod_1.z.looseObject({
23
34
  action: zod_1.z.enum(['upsert', 'remove']).optional(),
24
- entitlement_overrides: AddEntitlementOverrideForSubscriptionEntitlementOverrideEntitlementOverridesSchema.optional(),
35
+ entitlement_overrides: zod_1.z
36
+ .union([
37
+ zod_1.z.array(AddEntitlementOverrideForSubscriptionEntitlementOverrideEntitlementOverridesItemSchema.optional()),
38
+ AddEntitlementOverrideForSubscriptionEntitlementOverrideEntitlementOverridesSchema,
39
+ ])
40
+ .optional(),
25
41
  });
26
42
  exports.AddEntitlementOverrideForSubscriptionEntitlementOverrideBodySchema = AddEntitlementOverrideForSubscriptionEntitlementOverrideBodySchema;
27
43
  //EntitlementOverride.listEntitlementOverrideForSubscription