chargebee 3.26.0 → 3.27.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 (163) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/README.md +39 -0
  3. package/cjs/RequestWrapper.js +27 -0
  4. package/cjs/chargebee.cjs.js +3 -0
  5. package/cjs/chargebee.cjs.worker.js +2 -0
  6. package/cjs/chargebeeZodValidationError.js +18 -0
  7. package/cjs/createChargebee.js +5 -0
  8. package/cjs/environment.js +1 -1
  9. package/cjs/schema/addon.schema.js +269 -0
  10. package/cjs/schema/address.schema.js +35 -0
  11. package/cjs/schema/alert.schema.js +74 -0
  12. package/cjs/schema/alert_status.schema.js +31 -0
  13. package/cjs/schema/attached_item.schema.js +144 -0
  14. package/cjs/schema/business_entity.schema.js +46 -0
  15. package/cjs/schema/card.schema.js +165 -0
  16. package/cjs/schema/comment.schema.js +69 -0
  17. package/cjs/schema/coupon.schema.js +323 -0
  18. package/cjs/schema/coupon_code.schema.js +49 -0
  19. package/cjs/schema/coupon_set.schema.js +88 -0
  20. package/cjs/schema/credit_note.schema.js +502 -0
  21. package/cjs/schema/currency.schema.js +32 -0
  22. package/cjs/schema/customer.schema.js +1201 -0
  23. package/cjs/schema/customer_entitlement.schema.js +14 -0
  24. package/cjs/schema/differential_price.schema.js +106 -0
  25. package/cjs/schema/entitlement.schema.js +54 -0
  26. package/cjs/schema/entitlement_override.schema.js +35 -0
  27. package/cjs/schema/estimate.schema.js +1535 -0
  28. package/cjs/schema/event.schema.js +1060 -0
  29. package/cjs/schema/export.schema.js +3385 -0
  30. package/cjs/schema/feature.schema.js +78 -0
  31. package/cjs/schema/gift.schema.js +293 -0
  32. package/cjs/schema/grant_block.schema.js +47 -0
  33. package/cjs/schema/hosted_page.schema.js +1777 -0
  34. package/cjs/schema/in_app_subscription.schema.js +68 -0
  35. package/cjs/schema/index.js +88 -0
  36. package/cjs/schema/invoice.schema.js +1685 -0
  37. package/cjs/schema/item.schema.js +195 -0
  38. package/cjs/schema/item_entitlement.schema.js +45 -0
  39. package/cjs/schema/item_family.schema.js +57 -0
  40. package/cjs/schema/item_price.schema.js +335 -0
  41. package/cjs/schema/ledger_account_balance.schema.js +21 -0
  42. package/cjs/schema/ledger_operation.schema.js +104 -0
  43. package/cjs/schema/meter.schema.js +13 -0
  44. package/cjs/schema/metered_feature.schema.js +20 -0
  45. package/cjs/schema/non_subscription.schema.js +28 -0
  46. package/cjs/schema/offer_event.schema.js +13 -0
  47. package/cjs/schema/offer_fulfillment.schema.js +20 -0
  48. package/cjs/schema/omnichannel_one_time_order.schema.js +26 -0
  49. package/cjs/schema/omnichannel_subscription.schema.js +122 -0
  50. package/cjs/schema/omnichannel_subscription_item.schema.js +13 -0
  51. package/cjs/schema/order.schema.js +441 -0
  52. package/cjs/schema/payment_intent.schema.js +127 -0
  53. package/cjs/schema/payment_schedule_scheme.schema.js +20 -0
  54. package/cjs/schema/payment_source.schema.js +630 -0
  55. package/cjs/schema/payment_voucher.schema.js +57 -0
  56. package/cjs/schema/personalized_offer.schema.js +28 -0
  57. package/cjs/schema/plan.schema.js +363 -0
  58. package/cjs/schema/portal_session.schema.js +22 -0
  59. package/cjs/schema/price_variant.schema.js +93 -0
  60. package/cjs/schema/pricing_page_session.schema.js +135 -0
  61. package/cjs/schema/promotional_credit.schema.js +78 -0
  62. package/cjs/schema/promotional_grant.schema.js +17 -0
  63. package/cjs/schema/purchase.schema.js +277 -0
  64. package/cjs/schema/quote.schema.js +1667 -0
  65. package/cjs/schema/ramp.schema.js +245 -0
  66. package/cjs/schema/recorded_purchase.schema.js +32 -0
  67. package/cjs/schema/resource_migration.schema.js +14 -0
  68. package/cjs/schema/site_migration_detail.schema.js +81 -0
  69. package/cjs/schema/subscription.schema.js +3344 -0
  70. package/cjs/schema/subscription_entitlement.schema.js +25 -0
  71. package/cjs/schema/time_machine.schema.js +17 -0
  72. package/cjs/schema/transaction.schema.js +744 -0
  73. package/cjs/schema/unbilled_charge.schema.js +139 -0
  74. package/cjs/schema/usage.schema.js +93 -0
  75. package/cjs/schema/usage_charge.schema.js +17 -0
  76. package/cjs/schema/usage_event.schema.js +28 -0
  77. package/cjs/schema/usage_file.schema.js +13 -0
  78. package/cjs/schema/usage_summary.schema.js +17 -0
  79. package/cjs/schema/virtual_bank_account.schema.js +71 -0
  80. package/cjs/schema/webhook_endpoint.schema.js +508 -0
  81. package/cjs/validationLoader.js +59 -0
  82. package/esm/RequestWrapper.js +27 -0
  83. package/esm/chargebee.esm.js +2 -0
  84. package/esm/chargebee.esm.worker.js +1 -0
  85. package/esm/chargebeeZodValidationError.js +14 -0
  86. package/esm/createChargebee.js +5 -0
  87. package/esm/environment.js +1 -1
  88. package/esm/schema/addon.schema.js +266 -0
  89. package/esm/schema/address.schema.js +32 -0
  90. package/esm/schema/alert.schema.js +71 -0
  91. package/esm/schema/alert_status.schema.js +28 -0
  92. package/esm/schema/attached_item.schema.js +141 -0
  93. package/esm/schema/business_entity.schema.js +43 -0
  94. package/esm/schema/card.schema.js +162 -0
  95. package/esm/schema/comment.schema.js +66 -0
  96. package/esm/schema/coupon.schema.js +320 -0
  97. package/esm/schema/coupon_code.schema.js +46 -0
  98. package/esm/schema/coupon_set.schema.js +85 -0
  99. package/esm/schema/credit_note.schema.js +499 -0
  100. package/esm/schema/currency.schema.js +29 -0
  101. package/esm/schema/customer.schema.js +1198 -0
  102. package/esm/schema/customer_entitlement.schema.js +11 -0
  103. package/esm/schema/differential_price.schema.js +103 -0
  104. package/esm/schema/entitlement.schema.js +51 -0
  105. package/esm/schema/entitlement_override.schema.js +32 -0
  106. package/esm/schema/estimate.schema.js +1532 -0
  107. package/esm/schema/event.schema.js +1057 -0
  108. package/esm/schema/export.schema.js +3382 -0
  109. package/esm/schema/feature.schema.js +75 -0
  110. package/esm/schema/gift.schema.js +290 -0
  111. package/esm/schema/grant_block.schema.js +44 -0
  112. package/esm/schema/hosted_page.schema.js +1774 -0
  113. package/esm/schema/in_app_subscription.schema.js +65 -0
  114. package/esm/schema/index.js +72 -0
  115. package/esm/schema/invoice.schema.js +1682 -0
  116. package/esm/schema/item.schema.js +192 -0
  117. package/esm/schema/item_entitlement.schema.js +42 -0
  118. package/esm/schema/item_family.schema.js +54 -0
  119. package/esm/schema/item_price.schema.js +332 -0
  120. package/esm/schema/ledger_account_balance.schema.js +18 -0
  121. package/esm/schema/ledger_operation.schema.js +101 -0
  122. package/esm/schema/meter.schema.js +10 -0
  123. package/esm/schema/metered_feature.schema.js +17 -0
  124. package/esm/schema/non_subscription.schema.js +25 -0
  125. package/esm/schema/offer_event.schema.js +10 -0
  126. package/esm/schema/offer_fulfillment.schema.js +17 -0
  127. package/esm/schema/omnichannel_one_time_order.schema.js +23 -0
  128. package/esm/schema/omnichannel_subscription.schema.js +119 -0
  129. package/esm/schema/omnichannel_subscription_item.schema.js +10 -0
  130. package/esm/schema/order.schema.js +438 -0
  131. package/esm/schema/payment_intent.schema.js +124 -0
  132. package/esm/schema/payment_schedule_scheme.schema.js +17 -0
  133. package/esm/schema/payment_source.schema.js +627 -0
  134. package/esm/schema/payment_voucher.schema.js +54 -0
  135. package/esm/schema/personalized_offer.schema.js +25 -0
  136. package/esm/schema/plan.schema.js +360 -0
  137. package/esm/schema/portal_session.schema.js +19 -0
  138. package/esm/schema/price_variant.schema.js +90 -0
  139. package/esm/schema/pricing_page_session.schema.js +132 -0
  140. package/esm/schema/promotional_credit.schema.js +75 -0
  141. package/esm/schema/promotional_grant.schema.js +14 -0
  142. package/esm/schema/purchase.schema.js +274 -0
  143. package/esm/schema/quote.schema.js +1664 -0
  144. package/esm/schema/ramp.schema.js +242 -0
  145. package/esm/schema/recorded_purchase.schema.js +29 -0
  146. package/esm/schema/resource_migration.schema.js +11 -0
  147. package/esm/schema/site_migration_detail.schema.js +78 -0
  148. package/esm/schema/subscription.schema.js +3341 -0
  149. package/esm/schema/subscription_entitlement.schema.js +22 -0
  150. package/esm/schema/time_machine.schema.js +14 -0
  151. package/esm/schema/transaction.schema.js +741 -0
  152. package/esm/schema/unbilled_charge.schema.js +136 -0
  153. package/esm/schema/usage.schema.js +90 -0
  154. package/esm/schema/usage_charge.schema.js +14 -0
  155. package/esm/schema/usage_event.schema.js +25 -0
  156. package/esm/schema/usage_file.schema.js +10 -0
  157. package/esm/schema/usage_summary.schema.js +14 -0
  158. package/esm/schema/virtual_bank_account.schema.js +68 -0
  159. package/esm/schema/webhook_endpoint.schema.js +505 -0
  160. package/esm/validationLoader.js +56 -0
  161. package/package.json +4 -1
  162. package/types/core.d.ts +2 -0
  163. package/types/index.d.ts +16 -0
@@ -0,0 +1,266 @@
1
+ // Generated Zod schemas: Addon
2
+ // Actions: create, update, list, copy
3
+ // Do not edit manually – regenerate via sdk-generator
4
+ import { z } from 'zod';
5
+ //Addon.create
6
+ const CreateAddonMetaDataSchema = z.looseObject({});
7
+ const CreateAddonTiersSchema = z.object({
8
+ starting_unit: z.array(z.number().int().min(1).optional()).optional(),
9
+ ending_unit: z.array(z.number().int().optional()).optional(),
10
+ price: z.array(z.number().int().min(0).optional()).optional(),
11
+ starting_unit_in_decimal: z.array(z.string().max(33).optional()).optional(),
12
+ ending_unit_in_decimal: z.array(z.string().max(33).optional()).optional(),
13
+ price_in_decimal: z.array(z.string().max(39).optional()).optional(),
14
+ });
15
+ const CreateAddonTaxProvidersFieldsSchema = z.object({
16
+ provider_name: z.array(z.string().max(50).optional()),
17
+ field_id: z.array(z.string().max(50).optional()),
18
+ field_value: z.array(z.string().max(50).optional()),
19
+ });
20
+ const CreateAddonBodySchema = z.looseObject({
21
+ id: z.string().max(100),
22
+ name: z.string().max(100),
23
+ invoice_name: z.string().max(100).optional(),
24
+ description: z.string().max(2000).optional(),
25
+ charge_type: z.enum(['recurring', 'non_recurring']),
26
+ price: z.number().int().min(0).optional(),
27
+ currency_code: z.string().max(3).optional(),
28
+ period: z.number().int().min(1).optional(),
29
+ period_unit: z
30
+ .enum(['day', 'week', 'month', 'year', 'not_applicable'])
31
+ .optional(),
32
+ pricing_model: z
33
+ .enum(['flat_fee', 'per_unit', 'tiered', 'volume', 'stairstep'])
34
+ .optional(),
35
+ type: z
36
+ .enum(['on_off', 'quantity', 'tiered', 'volume', 'stairstep'])
37
+ .optional(),
38
+ unit: z.string().max(30).optional(),
39
+ enabled_in_portal: z.boolean().default(true).optional(),
40
+ taxable: z.boolean().default(true).optional(),
41
+ tax_profile_id: z.string().max(50).optional(),
42
+ avalara_sale_type: z
43
+ .enum(['wholesale', 'retail', 'consumed', 'vendor_use'])
44
+ .optional(),
45
+ avalara_transaction_type: z.number().int().optional(),
46
+ avalara_service_type: z.number().int().optional(),
47
+ tax_code: z.string().max(50).optional(),
48
+ hsn_code: z.string().max(50).optional(),
49
+ taxjar_product_code: z.string().max(50).optional(),
50
+ invoice_notes: z.string().max(2000).optional(),
51
+ meta_data: CreateAddonMetaDataSchema.optional(),
52
+ sku: z.string().max(100).optional(),
53
+ accounting_code: z.string().max(100).optional(),
54
+ accounting_category1: z.string().max(100).optional(),
55
+ accounting_category2: z.string().max(100).optional(),
56
+ accounting_category3: z.string().max(100).optional(),
57
+ accounting_category4: z.string().max(100).optional(),
58
+ is_shippable: z.boolean().default(false).optional(),
59
+ shipping_frequency_period: z.number().int().min(1).optional(),
60
+ shipping_frequency_period_unit: z
61
+ .enum(['year', 'month', 'week', 'day'])
62
+ .optional(),
63
+ included_in_mrr: z.boolean().optional(),
64
+ show_description_in_invoices: z.boolean().default(false).optional(),
65
+ show_description_in_quotes: z.boolean().default(false).optional(),
66
+ price_in_decimal: z.string().max(39).optional(),
67
+ proration_type: z
68
+ .enum(['site_default', 'partial_term', 'full_term'])
69
+ .optional(),
70
+ status: z.enum(['active', 'archived']).optional(),
71
+ tiers: CreateAddonTiersSchema.optional(),
72
+ tax_providers_fields: CreateAddonTaxProvidersFieldsSchema.optional(),
73
+ });
74
+ export { CreateAddonBodySchema };
75
+ //Addon.update
76
+ const UpdateAddonMetaDataSchema = z.looseObject({});
77
+ const UpdateAddonTiersSchema = z.object({
78
+ starting_unit: z.array(z.number().int().min(1).optional()).optional(),
79
+ ending_unit: z.array(z.number().int().optional()).optional(),
80
+ price: z.array(z.number().int().min(0).optional()).optional(),
81
+ starting_unit_in_decimal: z.array(z.string().max(33).optional()).optional(),
82
+ ending_unit_in_decimal: z.array(z.string().max(33).optional()).optional(),
83
+ price_in_decimal: z.array(z.string().max(39).optional()).optional(),
84
+ });
85
+ const UpdateAddonTaxProvidersFieldsSchema = z.object({
86
+ provider_name: z.array(z.string().max(50).optional()),
87
+ field_id: z.array(z.string().max(50).optional()),
88
+ field_value: z.array(z.string().max(50).optional()),
89
+ });
90
+ const UpdateAddonBodySchema = z.looseObject({
91
+ name: z.string().max(100).optional(),
92
+ invoice_name: z.string().max(100).optional(),
93
+ description: z.string().max(2000).optional(),
94
+ charge_type: z.enum(['recurring', 'non_recurring']).optional(),
95
+ price: z.number().int().min(0).optional(),
96
+ currency_code: z.string().max(3).optional(),
97
+ period: z.number().int().min(1).optional(),
98
+ period_unit: z
99
+ .enum(['day', 'week', 'month', 'year', 'not_applicable'])
100
+ .optional(),
101
+ pricing_model: z
102
+ .enum(['flat_fee', 'per_unit', 'tiered', 'volume', 'stairstep'])
103
+ .optional(),
104
+ type: z
105
+ .enum(['on_off', 'quantity', 'tiered', 'volume', 'stairstep'])
106
+ .optional(),
107
+ unit: z.string().max(30).optional(),
108
+ enabled_in_portal: z.boolean().default(true).optional(),
109
+ taxable: z.boolean().default(true).optional(),
110
+ tax_profile_id: z.string().max(50).optional(),
111
+ avalara_sale_type: z
112
+ .enum(['wholesale', 'retail', 'consumed', 'vendor_use'])
113
+ .optional(),
114
+ avalara_transaction_type: z.number().int().optional(),
115
+ avalara_service_type: z.number().int().optional(),
116
+ tax_code: z.string().max(50).optional(),
117
+ hsn_code: z.string().max(50).optional(),
118
+ taxjar_product_code: z.string().max(50).optional(),
119
+ invoice_notes: z.string().max(2000).optional(),
120
+ meta_data: UpdateAddonMetaDataSchema.optional(),
121
+ sku: z.string().max(100).optional(),
122
+ accounting_code: z.string().max(100).optional(),
123
+ accounting_category1: z.string().max(100).optional(),
124
+ accounting_category2: z.string().max(100).optional(),
125
+ accounting_category3: z.string().max(100).optional(),
126
+ accounting_category4: z.string().max(100).optional(),
127
+ is_shippable: z.boolean().default(false).optional(),
128
+ shipping_frequency_period: z.number().int().min(1).optional(),
129
+ shipping_frequency_period_unit: z
130
+ .enum(['year', 'month', 'week', 'day'])
131
+ .optional(),
132
+ included_in_mrr: z.boolean().optional(),
133
+ show_description_in_invoices: z.boolean().default(false).optional(),
134
+ show_description_in_quotes: z.boolean().default(false).optional(),
135
+ price_in_decimal: z.string().max(39).optional(),
136
+ proration_type: z
137
+ .enum(['site_default', 'partial_term', 'full_term'])
138
+ .optional(),
139
+ tiers: UpdateAddonTiersSchema.optional(),
140
+ tax_providers_fields: UpdateAddonTaxProvidersFieldsSchema.optional(),
141
+ });
142
+ export { UpdateAddonBodySchema };
143
+ //Addon.list
144
+ const ListAddonIdSchema = z.object({
145
+ is: z.string().min(1).optional(),
146
+ is_not: z.string().min(1).optional(),
147
+ starts_with: z.string().min(1).optional(),
148
+ in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
149
+ not_in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
150
+ });
151
+ const ListAddonNameSchema = z.object({
152
+ is: z.string().min(1).optional(),
153
+ is_not: z.string().min(1).optional(),
154
+ starts_with: z.string().min(1).optional(),
155
+ in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
156
+ not_in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
157
+ });
158
+ const ListAddonPricingModelSchema = z.object({
159
+ is: z
160
+ .enum(['flat_fee', 'per_unit', 'tiered', 'volume', 'stairstep'])
161
+ .optional(),
162
+ is_not: z
163
+ .enum(['flat_fee', 'per_unit', 'tiered', 'volume', 'stairstep'])
164
+ .optional(),
165
+ in: z
166
+ .enum(['flat_fee', 'per_unit', 'tiered', 'volume', 'stairstep'])
167
+ .optional(),
168
+ not_in: z
169
+ .enum(['flat_fee', 'per_unit', 'tiered', 'volume', 'stairstep'])
170
+ .optional(),
171
+ });
172
+ const ListAddonTypeSchema = z.object({
173
+ is: z
174
+ .enum(['on_off', 'quantity', 'tiered', 'volume', 'stairstep'])
175
+ .optional(),
176
+ is_not: z
177
+ .enum(['on_off', 'quantity', 'tiered', 'volume', 'stairstep'])
178
+ .optional(),
179
+ in: z
180
+ .enum(['on_off', 'quantity', 'tiered', 'volume', 'stairstep'])
181
+ .optional(),
182
+ not_in: z
183
+ .enum(['on_off', 'quantity', 'tiered', 'volume', 'stairstep'])
184
+ .optional(),
185
+ });
186
+ const ListAddonChargeTypeSchema = z.object({
187
+ is: z.enum(['recurring', 'non_recurring']).optional(),
188
+ is_not: z.enum(['recurring', 'non_recurring']).optional(),
189
+ in: z.enum(['recurring', 'non_recurring']).optional(),
190
+ not_in: z.enum(['recurring', 'non_recurring']).optional(),
191
+ });
192
+ const ListAddonPriceSchema = z.object({
193
+ is: z.string().regex(RegExp('^-?\\d+$')).optional(),
194
+ is_not: z.string().regex(RegExp('^-?\\d+$')).optional(),
195
+ lt: z.string().regex(RegExp('^-?\\d+$')).optional(),
196
+ lte: z.string().regex(RegExp('^-?\\d+$')).optional(),
197
+ gt: z.string().regex(RegExp('^-?\\d+$')).optional(),
198
+ gte: z.string().regex(RegExp('^-?\\d+$')).optional(),
199
+ between: z.string().regex(RegExp('^\\[-?\\d+,-?\\d+\\]$')).optional(),
200
+ });
201
+ const ListAddonPeriodSchema = z.object({
202
+ is: z.string().regex(RegExp('^-?\\d+$')).optional(),
203
+ is_not: z.string().regex(RegExp('^-?\\d+$')).optional(),
204
+ lt: z.string().regex(RegExp('^-?\\d+$')).optional(),
205
+ lte: z.string().regex(RegExp('^-?\\d+$')).optional(),
206
+ gt: z.string().regex(RegExp('^-?\\d+$')).optional(),
207
+ gte: z.string().regex(RegExp('^-?\\d+$')).optional(),
208
+ between: z.string().regex(RegExp('^\\[-?\\d+,-?\\d+\\]$')).optional(),
209
+ });
210
+ const ListAddonPeriodUnitSchema = z.object({
211
+ is: z.enum(['day', 'week', 'month', 'year', 'not_applicable']).optional(),
212
+ is_not: z.enum(['day', 'week', 'month', 'year', 'not_applicable']).optional(),
213
+ in: z.enum(['day', 'week', 'month', 'year', 'not_applicable']).optional(),
214
+ not_in: z.enum(['day', 'week', 'month', 'year', 'not_applicable']).optional(),
215
+ });
216
+ const ListAddonStatusSchema = z.object({
217
+ is: z.enum(['active', 'archived', 'deleted']).optional(),
218
+ is_not: z.enum(['active', 'archived', 'deleted']).optional(),
219
+ in: z.enum(['active', 'archived', 'deleted']).optional(),
220
+ not_in: z.enum(['active', 'archived', 'deleted']).optional(),
221
+ });
222
+ const ListAddonUpdatedAtSchema = z.object({
223
+ after: z.string().regex(RegExp('^\\d{10}$')).optional(),
224
+ before: z.string().regex(RegExp('^\\d{10}$')).optional(),
225
+ on: z.string().regex(RegExp('^\\d{10}$')).optional(),
226
+ between: z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
227
+ });
228
+ const ListAddonCurrencyCodeSchema = z.object({
229
+ is: z.string().min(1).optional(),
230
+ is_not: z.string().min(1).optional(),
231
+ starts_with: z.string().min(1).optional(),
232
+ in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
233
+ not_in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
234
+ });
235
+ const ListAddonChannelSchema = z.object({
236
+ is: z.enum(['web', 'app_store', 'play_store']).optional(),
237
+ is_not: z.enum(['web', 'app_store', 'play_store']).optional(),
238
+ in: z.enum(['web', 'app_store', 'play_store']).optional(),
239
+ not_in: z.enum(['web', 'app_store', 'play_store']).optional(),
240
+ });
241
+ const ListAddonBodySchema = z.looseObject({
242
+ limit: z.number().int().min(1).max(100).optional(),
243
+ offset: z.string().max(1000).optional(),
244
+ id: ListAddonIdSchema.optional(),
245
+ name: ListAddonNameSchema.optional(),
246
+ pricing_model: ListAddonPricingModelSchema.optional(),
247
+ type: ListAddonTypeSchema.optional(),
248
+ charge_type: ListAddonChargeTypeSchema.optional(),
249
+ price: ListAddonPriceSchema.optional(),
250
+ period: ListAddonPeriodSchema.optional(),
251
+ period_unit: ListAddonPeriodUnitSchema.optional(),
252
+ status: ListAddonStatusSchema.optional(),
253
+ updated_at: ListAddonUpdatedAtSchema.optional(),
254
+ currency_code: ListAddonCurrencyCodeSchema.optional(),
255
+ channel: ListAddonChannelSchema.optional(),
256
+ include_deleted: z.boolean().default(false).optional(),
257
+ });
258
+ export { ListAddonBodySchema };
259
+ //Addon.copy
260
+ const CopyAddonBodySchema = z.looseObject({
261
+ from_site: z.string().max(50),
262
+ id_at_from_site: z.string().max(100),
263
+ id: z.string().max(100).optional(),
264
+ for_site_merging: z.boolean().default(false).optional(),
265
+ });
266
+ export { CopyAddonBodySchema };
@@ -0,0 +1,32 @@
1
+ // Generated Zod schemas: Address
2
+ // Actions: retrieve, update
3
+ // Do not edit manually – regenerate via sdk-generator
4
+ import { z } from 'zod';
5
+ //Address.retrieve
6
+ const RetrieveAddressBodySchema = z.looseObject({
7
+ subscription_id: z.string().max(50),
8
+ label: z.string().max(50),
9
+ });
10
+ export { RetrieveAddressBodySchema };
11
+ //Address.update
12
+ const UpdateAddressBodySchema = z.looseObject({
13
+ subscription_id: z.string().max(50),
14
+ label: z.string().max(50),
15
+ first_name: z.string().max(150).optional(),
16
+ last_name: z.string().max(150).optional(),
17
+ email: z.string().email().max(70).optional(),
18
+ company: z.string().max(250).optional(),
19
+ phone: z.string().max(50).optional(),
20
+ addr: z.string().max(150).optional(),
21
+ extended_addr: z.string().max(150).optional(),
22
+ extended_addr2: z.string().max(150).optional(),
23
+ city: z.string().max(50).optional(),
24
+ state_code: z.string().max(50).optional(),
25
+ state: z.string().max(50).optional(),
26
+ zip: z.string().max(20).optional(),
27
+ country: z.string().max(50).optional(),
28
+ validation_status: z
29
+ .enum(['not_validated', 'valid', 'partially_valid', 'invalid'])
30
+ .optional(),
31
+ });
32
+ export { UpdateAddressBodySchema };
@@ -0,0 +1,71 @@
1
+ // Generated Zod schemas: Alert
2
+ // Actions: create, list, update, application_alertsForSubscription
3
+ // Do not edit manually – regenerate via sdk-generator
4
+ import { z } from 'zod';
5
+ //Alert.create
6
+ const CreateAlertThresholdSchema = z.object({
7
+ mode: z.enum(['absolute', 'percentage']),
8
+ value: z.number(),
9
+ });
10
+ const CreateAlertFilterConditionsSchema = z.object({
11
+ field: z.array(z.enum(['plan_price_id']).optional()).optional(),
12
+ operator: z.array(z.enum(['equals', 'not_equals']).optional()).optional(),
13
+ value: z.array(z.string().max(50).optional()).optional(),
14
+ });
15
+ const CreateAlertBodySchema = z.looseObject({
16
+ type: z.enum(['usage_exceeded']),
17
+ name: z.string().max(50),
18
+ description: z.string().max(65000).optional(),
19
+ metered_feature_id: z.string().max(50),
20
+ subscription_id: z.string().max(50).optional(),
21
+ meta: z.string().max(65000).optional(),
22
+ threshold: CreateAlertThresholdSchema.optional(),
23
+ filter_conditions: CreateAlertFilterConditionsSchema.optional(),
24
+ });
25
+ export { CreateAlertBodySchema };
26
+ //Alert.list
27
+ const ListAlertIdSchema = z.object({
28
+ in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
29
+ });
30
+ const ListAlertTypeSchema = z.object({
31
+ is: z.enum(['usage_exceeded']).optional(),
32
+ });
33
+ const ListAlertSubscriptionIdSchema = z.object({
34
+ is: z.string().min(1).optional(),
35
+ });
36
+ const ListAlertStatusSchema = z.object({
37
+ is: z.enum(['enabled', 'disabled']).optional(),
38
+ });
39
+ const ListAlertBodySchema = z.looseObject({
40
+ limit: z.number().int().min(1).max(100).optional(),
41
+ offset: z.string().max(1000).optional(),
42
+ id: ListAlertIdSchema.optional(),
43
+ type: ListAlertTypeSchema.optional(),
44
+ subscription_id: ListAlertSubscriptionIdSchema.optional(),
45
+ status: ListAlertStatusSchema.optional(),
46
+ });
47
+ export { ListAlertBodySchema };
48
+ //Alert.update
49
+ const UpdateAlertThresholdSchema = z.object({
50
+ mode: z.enum(['absolute', 'percentage']).optional(),
51
+ value: z.number().optional(),
52
+ });
53
+ const UpdateAlertBodySchema = z.looseObject({
54
+ status: z.enum(['enabled', 'disabled']).optional(),
55
+ threshold: UpdateAlertThresholdSchema.optional(),
56
+ });
57
+ export { UpdateAlertBodySchema };
58
+ //Alert.application_alertsForSubscription
59
+ const ApplicationAlertsforsubscriptionAlertStatusSchema = z.object({
60
+ is: z.enum(['enabled', 'disabled']).optional(),
61
+ });
62
+ const ApplicationAlertsforsubscriptionAlertTypeSchema = z.object({
63
+ is: z.enum(['usage_exceeded']).optional(),
64
+ });
65
+ const ApplicationAlertsforsubscriptionAlertBodySchema = z.looseObject({
66
+ limit: z.number().int().min(1).max(100).optional(),
67
+ offset: z.string().max(1000).optional(),
68
+ status: ApplicationAlertsforsubscriptionAlertStatusSchema.optional(),
69
+ type: ApplicationAlertsforsubscriptionAlertTypeSchema.optional(),
70
+ });
71
+ export { ApplicationAlertsforsubscriptionAlertBodySchema };
@@ -0,0 +1,28 @@
1
+ // Generated Zod schemas: AlertStatus
2
+ // Actions: alert_statusesForSubscription, alert_statusesForAlert
3
+ // Do not edit manually – regenerate via sdk-generator
4
+ import { z } from 'zod';
5
+ //AlertStatus.alert_statusesForSubscription
6
+ const AlertStatusesforsubscriptionAlertStatusAlarmStatusSchema = z.object({
7
+ is: z.enum(['within_limit', 'in_alarm']).optional(),
8
+ });
9
+ const AlertStatusesforsubscriptionAlertStatusAlertIdSchema = z.object({
10
+ in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
11
+ });
12
+ const AlertStatusesforsubscriptionAlertStatusBodySchema = z.looseObject({
13
+ limit: z.number().int().min(1).max(100).optional(),
14
+ offset: z.string().max(1000).optional(),
15
+ alarm_status: AlertStatusesforsubscriptionAlertStatusAlarmStatusSchema.optional(),
16
+ alert_id: AlertStatusesforsubscriptionAlertStatusAlertIdSchema.optional(),
17
+ });
18
+ export { AlertStatusesforsubscriptionAlertStatusBodySchema };
19
+ //AlertStatus.alert_statusesForAlert
20
+ const AlertStatusesforalertAlertStatusAlarmStatusSchema = z.object({
21
+ is: z.enum(['within_limit', 'in_alarm']).optional(),
22
+ });
23
+ const AlertStatusesforalertAlertStatusBodySchema = z.looseObject({
24
+ limit: z.number().int().min(1).max(100).optional(),
25
+ offset: z.string().max(1000).optional(),
26
+ alarm_status: AlertStatusesforalertAlertStatusAlarmStatusSchema.optional(),
27
+ });
28
+ export { AlertStatusesforalertAlertStatusBodySchema };
@@ -0,0 +1,141 @@
1
+ // Generated Zod schemas: AttachedItem
2
+ // Actions: create, update, retrieve, delete, list
3
+ // Do not edit manually – regenerate via sdk-generator
4
+ import { z } from 'zod';
5
+ //AttachedItem.create
6
+ const CreateAttachedItemBodySchema = z.looseObject({
7
+ item_id: z.string().max(100),
8
+ type: z.enum(['recommended', 'mandatory', 'optional']).optional(),
9
+ billing_cycles: z.number().int().min(1).optional(),
10
+ quantity: z.number().int().min(1).optional(),
11
+ quantity_in_decimal: z.string().max(33).optional(),
12
+ charge_on_event: z
13
+ .enum([
14
+ 'subscription_creation',
15
+ 'subscription_trial_start',
16
+ 'plan_activation',
17
+ 'subscription_activation',
18
+ 'contract_termination',
19
+ 'on_demand',
20
+ ])
21
+ .optional(),
22
+ charge_once: z.boolean().optional(),
23
+ business_entity_id: z.string().max(50).optional(),
24
+ });
25
+ export { CreateAttachedItemBodySchema };
26
+ //AttachedItem.update
27
+ const UpdateAttachedItemBodySchema = z.looseObject({
28
+ parent_item_id: z.string().max(100),
29
+ type: z.enum(['recommended', 'mandatory', 'optional']).optional(),
30
+ billing_cycles: z.number().int().min(1).optional(),
31
+ quantity: z.number().int().min(1).optional(),
32
+ quantity_in_decimal: z.string().max(33).optional(),
33
+ charge_on_event: z
34
+ .enum([
35
+ 'subscription_creation',
36
+ 'subscription_trial_start',
37
+ 'plan_activation',
38
+ 'subscription_activation',
39
+ 'contract_termination',
40
+ 'on_demand',
41
+ ])
42
+ .optional(),
43
+ charge_once: z.boolean().optional(),
44
+ });
45
+ export { UpdateAttachedItemBodySchema };
46
+ //AttachedItem.retrieve
47
+ const RetrieveAttachedItemBodySchema = z.looseObject({
48
+ parent_item_id: z.string().max(100),
49
+ });
50
+ export { RetrieveAttachedItemBodySchema };
51
+ //AttachedItem.delete
52
+ const DeleteAttachedItemBodySchema = z.looseObject({
53
+ parent_item_id: z.string().max(100),
54
+ });
55
+ export { DeleteAttachedItemBodySchema };
56
+ //AttachedItem.list
57
+ const ListAttachedItemIdSchema = z.object({
58
+ is: z.string().min(1).optional(),
59
+ is_not: z.string().min(1).optional(),
60
+ starts_with: z.string().min(1).optional(),
61
+ in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
62
+ not_in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
63
+ });
64
+ const ListAttachedItemItemIdSchema = z.object({
65
+ is: z.string().min(1).optional(),
66
+ is_not: z.string().min(1).optional(),
67
+ starts_with: z.string().min(1).optional(),
68
+ in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
69
+ not_in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
70
+ });
71
+ const ListAttachedItemTypeSchema = z.object({
72
+ is: z.enum(['recommended', 'mandatory', 'optional']).optional(),
73
+ is_not: z.enum(['recommended', 'mandatory', 'optional']).optional(),
74
+ in: z.enum(['recommended', 'mandatory', 'optional']).optional(),
75
+ not_in: z.enum(['recommended', 'mandatory', 'optional']).optional(),
76
+ });
77
+ const ListAttachedItemItemTypeSchema = z.object({
78
+ is: z.enum(['plan', 'addon', 'charge']).optional(),
79
+ is_not: z.enum(['plan', 'addon', 'charge']).optional(),
80
+ in: z.enum(['plan', 'addon', 'charge']).optional(),
81
+ not_in: z.enum(['plan', 'addon', 'charge']).optional(),
82
+ });
83
+ const ListAttachedItemChargeOnEventSchema = z.object({
84
+ is: z
85
+ .enum([
86
+ 'subscription_creation',
87
+ 'subscription_trial_start',
88
+ 'plan_activation',
89
+ 'subscription_activation',
90
+ 'contract_termination',
91
+ 'on_demand',
92
+ ])
93
+ .optional(),
94
+ is_not: z
95
+ .enum([
96
+ 'subscription_creation',
97
+ 'subscription_trial_start',
98
+ 'plan_activation',
99
+ 'subscription_activation',
100
+ 'contract_termination',
101
+ 'on_demand',
102
+ ])
103
+ .optional(),
104
+ in: z
105
+ .enum([
106
+ 'subscription_creation',
107
+ 'subscription_trial_start',
108
+ 'plan_activation',
109
+ 'subscription_activation',
110
+ 'contract_termination',
111
+ 'on_demand',
112
+ ])
113
+ .optional(),
114
+ not_in: z
115
+ .enum([
116
+ 'subscription_creation',
117
+ 'subscription_trial_start',
118
+ 'plan_activation',
119
+ 'subscription_activation',
120
+ 'contract_termination',
121
+ 'on_demand',
122
+ ])
123
+ .optional(),
124
+ });
125
+ const ListAttachedItemUpdatedAtSchema = z.object({
126
+ after: z.string().regex(RegExp('^\\d{10}$')).optional(),
127
+ before: z.string().regex(RegExp('^\\d{10}$')).optional(),
128
+ on: z.string().regex(RegExp('^\\d{10}$')).optional(),
129
+ between: z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
130
+ });
131
+ const ListAttachedItemBodySchema = z.looseObject({
132
+ limit: z.number().int().min(1).max(100).optional(),
133
+ offset: z.string().max(1000).optional(),
134
+ id: ListAttachedItemIdSchema.optional(),
135
+ item_id: ListAttachedItemItemIdSchema.optional(),
136
+ type: ListAttachedItemTypeSchema.optional(),
137
+ item_type: ListAttachedItemItemTypeSchema.optional(),
138
+ charge_on_event: ListAttachedItemChargeOnEventSchema.optional(),
139
+ updated_at: ListAttachedItemUpdatedAtSchema.optional(),
140
+ });
141
+ export { ListAttachedItemBodySchema };
@@ -0,0 +1,43 @@
1
+ // Generated Zod schemas: BusinessEntity
2
+ // Actions: createTransfers, getTransfers
3
+ // Do not edit manually – regenerate via sdk-generator
4
+ import { z } from 'zod';
5
+ //BusinessEntity.createTransfers
6
+ const CreateTransfersBusinessEntityBodySchema = z.looseObject({
7
+ active_resource_ids: z.array(z.string().max(50).optional()),
8
+ destination_business_entity_ids: z.array(z.string().max(50).optional()),
9
+ source_business_entity_ids: z.array(z.string().max(50).optional()).optional(),
10
+ resource_types: z.array(z.string().max(50).optional()),
11
+ reason_codes: z.array(z.string().max(50).optional()),
12
+ });
13
+ export { CreateTransfersBusinessEntityBodySchema };
14
+ //BusinessEntity.getTransfers
15
+ const GetTransfersBusinessEntityResourceTypeSchema = z.object({
16
+ is: z.string().min(1).optional(),
17
+ });
18
+ const GetTransfersBusinessEntityResourceIdSchema = z.object({
19
+ is: z.string().min(1).optional(),
20
+ });
21
+ const GetTransfersBusinessEntityActiveResourceIdSchema = z.object({
22
+ is: z.string().min(1).optional(),
23
+ });
24
+ const GetTransfersBusinessEntityCreatedAtSchema = z.object({
25
+ after: z.string().regex(RegExp('^\\d{10}$')).optional(),
26
+ before: z.string().regex(RegExp('^\\d{10}$')).optional(),
27
+ on: z.string().regex(RegExp('^\\d{10}$')).optional(),
28
+ between: z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
29
+ });
30
+ const GetTransfersBusinessEntitySortBySchema = z.looseObject({
31
+ asc: z.enum(['created_at']).optional(),
32
+ desc: z.enum(['created_at']).optional(),
33
+ });
34
+ const GetTransfersBusinessEntityBodySchema = z.looseObject({
35
+ limit: z.number().int().min(1).max(100).optional(),
36
+ offset: z.string().max(1000).optional(),
37
+ resource_type: GetTransfersBusinessEntityResourceTypeSchema.optional(),
38
+ resource_id: GetTransfersBusinessEntityResourceIdSchema.optional(),
39
+ active_resource_id: GetTransfersBusinessEntityActiveResourceIdSchema.optional(),
40
+ created_at: GetTransfersBusinessEntityCreatedAtSchema.optional(),
41
+ sort_by: GetTransfersBusinessEntitySortBySchema.optional(),
42
+ });
43
+ export { GetTransfersBusinessEntityBodySchema };