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
package/CHANGELOG.md CHANGED
@@ -1,3 +1,68 @@
1
+ ### v3.36.0 (2026-11-12)
2
+ * * *
3
+ ### New Resources:
4
+ - `BillingLineItem` has been added.
5
+ - `BillingMetadata` has been added.
6
+ - `GatewayRequestLog` has been added.
7
+ - `GatewayWebhookLog` has been added.
8
+ - `OrganizationDetail` has been added.
9
+
10
+
11
+ ### New Attributes:
12
+ - `description` has been added to `Discount`.
13
+ - `billing_metadata` has been added to `GrantBlock`.
14
+ - `offline_payment_method` has been added to `Invoice`.
15
+
16
+
17
+ ### New Parameters:
18
+ - `discounts.description` has been added as request body parameter to `estimate_for_creating_a_customer_and_subscription` in `Estimate`.
19
+ - `discounts.description` has been added as request body parameter to `estimate_for_updating_a_subscription` in `Estimate`.
20
+ - `discounts.description` has been added as request body parameter to `estimate_for_creating_a_subscription` in `Estimate`.
21
+ - `allowed_billing_frequencies` has been added as request body parameter to `checkout_gift_subscription_for_items` in `HostedPage`.
22
+ - `show_billing_frequency_selector` has been added as request body parameter to `checkout_gift_subscription_for_items` in `HostedPage`.
23
+ - `allowed_billing_frequencies` has been added as request body parameter to `create_checkout_for_a_new_subscription` in `HostedPage`.
24
+ - `show_billing_frequency_selector` has been added as request body parameter to `create_checkout_for_a_new_subscription` in `HostedPage`.
25
+ - `allowed_billing_frequencies` has been added as request body parameter to `create_checkout_to_update_a_subscription` in `HostedPage`.
26
+ - `show_billing_frequency_selector` has been added as request body parameter to `create_checkout_to_update_a_subscription` in `HostedPage`.
27
+ - `credit_notes.amount` has been added as request body parameter to `apply_credits_for_an_invoice` in `Invoice`.
28
+ - `credit_notes.applied_at` has been added as request body parameter to `apply_credits_for_an_invoice` in `Invoice`.
29
+ - `offline_payment_method` has been added as request body parameter to `create_invoice_for_items_and_one-time_charges` in `Invoice`.
30
+ - `discounts.description` has been added as request body parameter to `update_subscription_for_items` in `Subscription`.
31
+ - `discounts.description` has been added as request body parameter to `create_subscription_for_items` in `Subscription`.
32
+ - `group_by.window_size` has been added as request body parameter to `retrieve_usages_for_an_invoice_as_pdf` in `Usage`.
33
+
34
+
35
+ ### New Events:
36
+ - `organization_details_updated` has been added.
37
+ - `organization_details_created` has been added.
38
+
39
+
40
+ ### Deleted Actions:
41
+ - `list_citations_for_a_draft_request` has been removed from `DraftRequest`.
42
+ - `add_citations_to_a_draft_request` has been removed from `DraftRequest`.
43
+ - `execute_a_draft_request` has been removed from `DraftRequest`.
44
+ - `estimate_a_draft_request` has been removed from `DraftRequest`.
45
+ - `list_comments_for_a_draft_request` has been removed from `DraftRequest`.
46
+ - `add_comments_to_a_draft_request` has been removed from `DraftRequest`.
47
+ - `retrieve_a_draft_request` has been removed from `DraftRequest`.
48
+ - `update_a_draft_request` has been removed from `DraftRequest`.
49
+ - `create_a_draft_request` has been removed from `DraftRequest`.
50
+
51
+
52
+ ### New Enums:
53
+ - `organization_details_created` and `organization_details_updated` have been added as new values enum `EventType`.
54
+ - `invocation_time` has been added as a new value to enum query parameter `sort_by.asc` in `list_gateway_request_logs` of `GatewayRequestLog`.
55
+ - `invocation_time` has been added as a new value to enum query parameter `sort_by.desc` in `list_gateway_request_logs` of `GatewayRequestLog`.
56
+ - `received_at` has been added as a new value to enum query parameter `sort_by.asc` in `list_gateway_webhook_logs` of `GatewayWebhookLog`.
57
+ - `received_at` has been added as a new value to enum query parameter `sort_by.desc` in `list_gateway_webhook_logs` of `GatewayWebhookLog`.
58
+ - `none` and `day` have been added as new values to enum request body parameter `group_by.window_size` in `retrieve_usages_for_an_invoice_as_pdf` of `Usage`.
59
+
60
+
61
+ ### Bug Fixes:
62
+ - Fixed `enableValidation` rejecting correctly typed params: filter operators now accept arrays, numbers and booleans (e.g. `status: { in: ['active'] }`), and composite array params (e.g. `subscription_items`) accept an array of objects. Resolves https://github.com/chargebee/chargebee-node/issues/140.
63
+
64
+
65
+
1
66
  ### v3.35.0 (2026-11-02)
2
67
  * * *
3
68
  ### New Resources:
@@ -11,7 +11,7 @@ exports.Environment = {
11
11
  hostSuffix: '.chargebee.com',
12
12
  apiPath: '/api/v2',
13
13
  timeout: DEFAULT_TIME_OUT,
14
- clientVersion: 'v3.35.0',
14
+ clientVersion: 'v3.36.0',
15
15
  port: DEFAULT_PORT,
16
16
  timemachineWaitInMillis: DEFAULT_TIME_MACHINE_WAIT,
17
17
  exportWaitInMillis: DEFAULT_EXPORT_WAIT,
@@ -1228,6 +1228,34 @@ exports.Endpoints = {
1228
1228
  {},
1229
1229
  ],
1230
1230
  ],
1231
+ gatewayRequestLog: [
1232
+ ['list', 'GET', '/gateway_request_logs', null, false, null, false, {}, {}],
1233
+ [
1234
+ 'retrieve',
1235
+ 'GET',
1236
+ '/gateway_request_logs',
1237
+ null,
1238
+ true,
1239
+ null,
1240
+ false,
1241
+ {},
1242
+ {},
1243
+ ],
1244
+ ],
1245
+ gatewayWebhookLog: [
1246
+ ['list', 'GET', '/gateway_webhook_logs', null, false, null, false, {}, {}],
1247
+ [
1248
+ 'retrieve',
1249
+ 'GET',
1250
+ '/gateway_webhook_logs',
1251
+ null,
1252
+ true,
1253
+ null,
1254
+ false,
1255
+ {},
1256
+ {},
1257
+ ],
1258
+ ],
1231
1259
  invoice: [
1232
1260
  [
1233
1261
  'create',
@@ -4807,6 +4835,33 @@ exports.Endpoints = {
4807
4835
  {},
4808
4836
  ],
4809
4837
  ],
4838
+ organizationDetail: [
4839
+ [
4840
+ 'create',
4841
+ 'POST',
4842
+ '/organization_details',
4843
+ null,
4844
+ false,
4845
+ null,
4846
+ false,
4847
+ {},
4848
+ {
4849
+ isIdempotent: true,
4850
+ },
4851
+ ],
4852
+ [
4853
+ 'retrieve',
4854
+ 'GET',
4855
+ '/organization_details',
4856
+ null,
4857
+ true,
4858
+ null,
4859
+ false,
4860
+ {},
4861
+ {},
4862
+ ],
4863
+ ['list', 'GET', '/organization_details', null, false, null, false, {}, {}],
4864
+ ],
4810
4865
  currency: [
4811
4866
  ['list', 'GET', '/currencies', '/list', false, null, false, {}, {}],
4812
4867
  ['retrieve', 'GET', '/currencies', null, true, null, false, {}, {}],
@@ -5843,6 +5898,7 @@ exports.Endpoints = {
5843
5898
  {},
5844
5899
  ],
5845
5900
  ],
5901
+ billingMetadata: [],
5846
5902
  grantBlock: [
5847
5903
  [
5848
5904
  'listGrantBlocks',
@@ -163,6 +163,8 @@ var WebhookEventType;
163
163
  WebhookEventType["OrderResent"] = "order_resent";
164
164
  WebhookEventType["OrderReturned"] = "order_returned";
165
165
  WebhookEventType["OrderUpdated"] = "order_updated";
166
+ WebhookEventType["OrganizationDetailsCreated"] = "organization_details_created";
167
+ WebhookEventType["OrganizationDetailsUpdated"] = "organization_details_updated";
166
168
  WebhookEventType["PaymentDueReminder"] = "payment_due_reminder";
167
169
  WebhookEventType["PaymentFailed"] = "payment_failed";
168
170
  WebhookEventType["PaymentInitiated"] = "payment_initiated";
@@ -7,6 +7,14 @@ exports.CopyAddonBodySchema = exports.ListAddonBodySchema = exports.UpdateAddonB
7
7
  const zod_1 = require("zod");
8
8
  //Addon.create
9
9
  const CreateAddonMetaDataSchema = zod_1.z.looseObject({});
10
+ const CreateAddonTiersItemSchema = zod_1.z.object({
11
+ starting_unit: zod_1.z.number().int().min(1).optional(),
12
+ ending_unit: zod_1.z.number().int().optional(),
13
+ price: zod_1.z.number().int().min(0).optional(),
14
+ starting_unit_in_decimal: zod_1.z.string().max(33).optional(),
15
+ ending_unit_in_decimal: zod_1.z.string().max(33).optional(),
16
+ price_in_decimal: zod_1.z.string().max(39).optional(),
17
+ });
10
18
  const CreateAddonTiersSchema = zod_1.z.object({
11
19
  starting_unit: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
12
20
  ending_unit: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
@@ -15,6 +23,11 @@ const CreateAddonTiersSchema = zod_1.z.object({
15
23
  ending_unit_in_decimal: zod_1.z.array(zod_1.z.string().max(33).optional()).optional(),
16
24
  price_in_decimal: zod_1.z.array(zod_1.z.string().max(39).optional()).optional(),
17
25
  });
26
+ const CreateAddonTaxProvidersFieldsItemSchema = zod_1.z.object({
27
+ provider_name: zod_1.z.string().max(50),
28
+ field_id: zod_1.z.string().max(50),
29
+ field_value: zod_1.z.string().max(50),
30
+ });
18
31
  const CreateAddonTaxProvidersFieldsSchema = zod_1.z.object({
19
32
  provider_name: zod_1.z.array(zod_1.z.string().max(50).optional()),
20
33
  field_id: zod_1.z.array(zod_1.z.string().max(50).optional()),
@@ -71,12 +84,30 @@ const CreateAddonBodySchema = zod_1.z.looseObject({
71
84
  .enum(['site_default', 'partial_term', 'full_term'])
72
85
  .optional(),
73
86
  status: zod_1.z.enum(['active', 'archived']).optional(),
74
- tiers: CreateAddonTiersSchema.optional(),
75
- tax_providers_fields: CreateAddonTaxProvidersFieldsSchema.optional(),
87
+ tiers: zod_1.z
88
+ .union([
89
+ zod_1.z.array(CreateAddonTiersItemSchema.optional()),
90
+ CreateAddonTiersSchema,
91
+ ])
92
+ .optional(),
93
+ tax_providers_fields: zod_1.z
94
+ .union([
95
+ zod_1.z.array(CreateAddonTaxProvidersFieldsItemSchema.optional()),
96
+ CreateAddonTaxProvidersFieldsSchema,
97
+ ])
98
+ .optional(),
76
99
  });
77
100
  exports.CreateAddonBodySchema = CreateAddonBodySchema;
78
101
  //Addon.update
79
102
  const UpdateAddonMetaDataSchema = zod_1.z.looseObject({});
103
+ const UpdateAddonTiersItemSchema = zod_1.z.object({
104
+ starting_unit: zod_1.z.number().int().min(1).optional(),
105
+ ending_unit: zod_1.z.number().int().optional(),
106
+ price: zod_1.z.number().int().min(0).optional(),
107
+ starting_unit_in_decimal: zod_1.z.string().max(33).optional(),
108
+ ending_unit_in_decimal: zod_1.z.string().max(33).optional(),
109
+ price_in_decimal: zod_1.z.string().max(39).optional(),
110
+ });
80
111
  const UpdateAddonTiersSchema = zod_1.z.object({
81
112
  starting_unit: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
82
113
  ending_unit: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
@@ -85,6 +116,11 @@ const UpdateAddonTiersSchema = zod_1.z.object({
85
116
  ending_unit_in_decimal: zod_1.z.array(zod_1.z.string().max(33).optional()).optional(),
86
117
  price_in_decimal: zod_1.z.array(zod_1.z.string().max(39).optional()).optional(),
87
118
  });
119
+ const UpdateAddonTaxProvidersFieldsItemSchema = zod_1.z.object({
120
+ provider_name: zod_1.z.string().max(50),
121
+ field_id: zod_1.z.string().max(50),
122
+ field_value: zod_1.z.string().max(50),
123
+ });
88
124
  const UpdateAddonTaxProvidersFieldsSchema = zod_1.z.object({
89
125
  provider_name: zod_1.z.array(zod_1.z.string().max(50).optional()),
90
126
  field_id: zod_1.z.array(zod_1.z.string().max(50).optional()),
@@ -139,8 +175,18 @@ const UpdateAddonBodySchema = zod_1.z.looseObject({
139
175
  proration_type: zod_1.z
140
176
  .enum(['site_default', 'partial_term', 'full_term'])
141
177
  .optional(),
142
- tiers: UpdateAddonTiersSchema.optional(),
143
- tax_providers_fields: UpdateAddonTaxProvidersFieldsSchema.optional(),
178
+ tiers: zod_1.z
179
+ .union([
180
+ zod_1.z.array(UpdateAddonTiersItemSchema.optional()),
181
+ UpdateAddonTiersSchema,
182
+ ])
183
+ .optional(),
184
+ tax_providers_fields: zod_1.z
185
+ .union([
186
+ zod_1.z.array(UpdateAddonTaxProvidersFieldsItemSchema.optional()),
187
+ UpdateAddonTaxProvidersFieldsSchema,
188
+ ])
189
+ .optional(),
144
190
  });
145
191
  exports.UpdateAddonBodySchema = UpdateAddonBodySchema;
146
192
  //Addon.list
@@ -148,15 +194,35 @@ const ListAddonIdSchema = zod_1.z.object({
148
194
  is: zod_1.z.string().min(1).optional(),
149
195
  is_not: zod_1.z.string().min(1).optional(),
150
196
  starts_with: zod_1.z.string().min(1).optional(),
151
- in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
152
- not_in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
197
+ in: zod_1.z
198
+ .union([
199
+ zod_1.z.array(zod_1.z.string().optional()),
200
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
201
+ ])
202
+ .optional(),
203
+ not_in: zod_1.z
204
+ .union([
205
+ zod_1.z.array(zod_1.z.string().optional()),
206
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
207
+ ])
208
+ .optional(),
153
209
  });
154
210
  const ListAddonNameSchema = zod_1.z.object({
155
211
  is: zod_1.z.string().min(1).optional(),
156
212
  is_not: zod_1.z.string().min(1).optional(),
157
213
  starts_with: zod_1.z.string().min(1).optional(),
158
- in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
159
- not_in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
214
+ in: zod_1.z
215
+ .union([
216
+ zod_1.z.array(zod_1.z.string().optional()),
217
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
218
+ ])
219
+ .optional(),
220
+ not_in: zod_1.z
221
+ .union([
222
+ zod_1.z.array(zod_1.z.string().optional()),
223
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
224
+ ])
225
+ .optional(),
160
226
  });
161
227
  const ListAddonPricingModelSchema = zod_1.z.object({
162
228
  is: zod_1.z
@@ -166,10 +232,20 @@ const ListAddonPricingModelSchema = zod_1.z.object({
166
232
  .enum(['flat_fee', 'per_unit', 'tiered', 'volume', 'stairstep'])
167
233
  .optional(),
168
234
  in: zod_1.z
169
- .enum(['flat_fee', 'per_unit', 'tiered', 'volume', 'stairstep'])
235
+ .union([
236
+ zod_1.z.array(zod_1.z
237
+ .enum(['flat_fee', 'per_unit', 'tiered', 'volume', 'stairstep'])
238
+ .optional()),
239
+ zod_1.z.enum(['flat_fee', 'per_unit', 'tiered', 'volume', 'stairstep']),
240
+ ])
170
241
  .optional(),
171
242
  not_in: zod_1.z
172
- .enum(['flat_fee', 'per_unit', 'tiered', 'volume', 'stairstep'])
243
+ .union([
244
+ zod_1.z.array(zod_1.z
245
+ .enum(['flat_fee', 'per_unit', 'tiered', 'volume', 'stairstep'])
246
+ .optional()),
247
+ zod_1.z.enum(['flat_fee', 'per_unit', 'tiered', 'volume', 'stairstep']),
248
+ ])
173
249
  .optional(),
174
250
  });
175
251
  const ListAddonTypeSchema = zod_1.z.object({
@@ -180,66 +256,171 @@ const ListAddonTypeSchema = zod_1.z.object({
180
256
  .enum(['on_off', 'quantity', 'tiered', 'volume', 'stairstep'])
181
257
  .optional(),
182
258
  in: zod_1.z
183
- .enum(['on_off', 'quantity', 'tiered', 'volume', 'stairstep'])
259
+ .union([
260
+ zod_1.z.array(zod_1.z
261
+ .enum(['on_off', 'quantity', 'tiered', 'volume', 'stairstep'])
262
+ .optional()),
263
+ zod_1.z.enum(['on_off', 'quantity', 'tiered', 'volume', 'stairstep']),
264
+ ])
184
265
  .optional(),
185
266
  not_in: zod_1.z
186
- .enum(['on_off', 'quantity', 'tiered', 'volume', 'stairstep'])
267
+ .union([
268
+ zod_1.z.array(zod_1.z
269
+ .enum(['on_off', 'quantity', 'tiered', 'volume', 'stairstep'])
270
+ .optional()),
271
+ zod_1.z.enum(['on_off', 'quantity', 'tiered', 'volume', 'stairstep']),
272
+ ])
187
273
  .optional(),
188
274
  });
189
275
  const ListAddonChargeTypeSchema = zod_1.z.object({
190
276
  is: zod_1.z.enum(['recurring', 'non_recurring']).optional(),
191
277
  is_not: zod_1.z.enum(['recurring', 'non_recurring']).optional(),
192
- in: zod_1.z.enum(['recurring', 'non_recurring']).optional(),
193
- not_in: zod_1.z.enum(['recurring', 'non_recurring']).optional(),
278
+ in: zod_1.z
279
+ .union([
280
+ zod_1.z.array(zod_1.z.enum(['recurring', 'non_recurring']).optional()),
281
+ zod_1.z.enum(['recurring', 'non_recurring']),
282
+ ])
283
+ .optional(),
284
+ not_in: zod_1.z
285
+ .union([
286
+ zod_1.z.array(zod_1.z.enum(['recurring', 'non_recurring']).optional()),
287
+ zod_1.z.enum(['recurring', 'non_recurring']),
288
+ ])
289
+ .optional(),
194
290
  });
195
291
  const ListAddonPriceSchema = zod_1.z.object({
196
- is: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
197
- is_not: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
198
- lt: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
199
- lte: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
200
- gt: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
201
- gte: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
202
- between: zod_1.z.string().regex(RegExp('^\\[-?\\d+,-?\\d+\\]$')).optional(),
292
+ is: zod_1.z
293
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
294
+ .optional(),
295
+ is_not: zod_1.z
296
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
297
+ .optional(),
298
+ lt: zod_1.z
299
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
300
+ .optional(),
301
+ lte: zod_1.z
302
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
303
+ .optional(),
304
+ gt: zod_1.z
305
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
306
+ .optional(),
307
+ gte: zod_1.z
308
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
309
+ .optional(),
310
+ between: zod_1.z
311
+ .union([
312
+ zod_1.z.array(zod_1.z.number().int().optional()).min(2).max(2),
313
+ zod_1.z.string().regex(RegExp('^\\[-?\\d+,-?\\d+\\]$')),
314
+ ])
315
+ .optional(),
203
316
  });
204
317
  const ListAddonPeriodSchema = zod_1.z.object({
205
- is: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
206
- is_not: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
207
- lt: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
208
- lte: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
209
- gt: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
210
- gte: zod_1.z.string().regex(RegExp('^-?\\d+$')).optional(),
211
- between: zod_1.z.string().regex(RegExp('^\\[-?\\d+,-?\\d+\\]$')).optional(),
318
+ is: zod_1.z
319
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
320
+ .optional(),
321
+ is_not: zod_1.z
322
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
323
+ .optional(),
324
+ lt: zod_1.z
325
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
326
+ .optional(),
327
+ lte: zod_1.z
328
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
329
+ .optional(),
330
+ gt: zod_1.z
331
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
332
+ .optional(),
333
+ gte: zod_1.z
334
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^-?\\d+$'))])
335
+ .optional(),
336
+ between: zod_1.z
337
+ .union([
338
+ zod_1.z.array(zod_1.z.number().int().optional()).min(2).max(2),
339
+ zod_1.z.string().regex(RegExp('^\\[-?\\d+,-?\\d+\\]$')),
340
+ ])
341
+ .optional(),
212
342
  });
213
343
  const ListAddonPeriodUnitSchema = zod_1.z.object({
214
344
  is: zod_1.z.enum(['day', 'week', 'month', 'year', 'not_applicable']).optional(),
215
345
  is_not: zod_1.z.enum(['day', 'week', 'month', 'year', 'not_applicable']).optional(),
216
- in: zod_1.z.enum(['day', 'week', 'month', 'year', 'not_applicable']).optional(),
217
- not_in: zod_1.z.enum(['day', 'week', 'month', 'year', 'not_applicable']).optional(),
346
+ in: zod_1.z
347
+ .union([
348
+ zod_1.z.array(zod_1.z.enum(['day', 'week', 'month', 'year', 'not_applicable']).optional()),
349
+ zod_1.z.enum(['day', 'week', 'month', 'year', 'not_applicable']),
350
+ ])
351
+ .optional(),
352
+ not_in: zod_1.z
353
+ .union([
354
+ zod_1.z.array(zod_1.z.enum(['day', 'week', 'month', 'year', 'not_applicable']).optional()),
355
+ zod_1.z.enum(['day', 'week', 'month', 'year', 'not_applicable']),
356
+ ])
357
+ .optional(),
218
358
  });
219
359
  const ListAddonStatusSchema = zod_1.z.object({
220
360
  is: zod_1.z.enum(['active', 'archived', 'deleted']).optional(),
221
361
  is_not: zod_1.z.enum(['active', 'archived', 'deleted']).optional(),
222
- in: zod_1.z.enum(['active', 'archived', 'deleted']).optional(),
223
- not_in: zod_1.z.enum(['active', 'archived', 'deleted']).optional(),
362
+ in: zod_1.z
363
+ .union([
364
+ zod_1.z.array(zod_1.z.enum(['active', 'archived', 'deleted']).optional()),
365
+ zod_1.z.enum(['active', 'archived', 'deleted']),
366
+ ])
367
+ .optional(),
368
+ not_in: zod_1.z
369
+ .union([
370
+ zod_1.z.array(zod_1.z.enum(['active', 'archived', 'deleted']).optional()),
371
+ zod_1.z.enum(['active', 'archived', 'deleted']),
372
+ ])
373
+ .optional(),
224
374
  });
225
375
  const ListAddonUpdatedAtSchema = zod_1.z.object({
226
- after: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
227
- before: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
228
- on: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
229
- between: zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
376
+ after: zod_1.z
377
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
378
+ .optional(),
379
+ before: zod_1.z
380
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
381
+ .optional(),
382
+ on: zod_1.z
383
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
384
+ .optional(),
385
+ between: zod_1.z
386
+ .union([
387
+ zod_1.z.array(zod_1.z.number().int().optional()).min(2).max(2),
388
+ zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')),
389
+ ])
390
+ .optional(),
230
391
  });
231
392
  const ListAddonCurrencyCodeSchema = zod_1.z.object({
232
393
  is: zod_1.z.string().min(1).optional(),
233
394
  is_not: zod_1.z.string().min(1).optional(),
234
395
  starts_with: zod_1.z.string().min(1).optional(),
235
- in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
236
- not_in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
396
+ in: zod_1.z
397
+ .union([
398
+ zod_1.z.array(zod_1.z.string().optional()),
399
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
400
+ ])
401
+ .optional(),
402
+ not_in: zod_1.z
403
+ .union([
404
+ zod_1.z.array(zod_1.z.string().optional()),
405
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
406
+ ])
407
+ .optional(),
237
408
  });
238
409
  const ListAddonChannelSchema = zod_1.z.object({
239
410
  is: zod_1.z.enum(['web', 'app_store', 'play_store']).optional(),
240
411
  is_not: zod_1.z.enum(['web', 'app_store', 'play_store']).optional(),
241
- in: zod_1.z.enum(['web', 'app_store', 'play_store']).optional(),
242
- not_in: zod_1.z.enum(['web', 'app_store', 'play_store']).optional(),
412
+ in: zod_1.z
413
+ .union([
414
+ zod_1.z.array(zod_1.z.enum(['web', 'app_store', 'play_store']).optional()),
415
+ zod_1.z.enum(['web', 'app_store', 'play_store']),
416
+ ])
417
+ .optional(),
418
+ not_in: zod_1.z
419
+ .union([
420
+ zod_1.z.array(zod_1.z.enum(['web', 'app_store', 'play_store']).optional()),
421
+ zod_1.z.enum(['web', 'app_store', 'play_store']),
422
+ ])
423
+ .optional(),
243
424
  });
244
425
  const ListAddonBodySchema = zod_1.z.looseObject({
245
426
  limit: zod_1.z.number().int().min(1).max(100).optional(),
@@ -10,6 +10,11 @@ const CreateAlertThresholdSchema = zod_1.z.object({
10
10
  mode: zod_1.z.enum(['absolute', 'percentage']).optional(),
11
11
  value: zod_1.z.number(),
12
12
  });
13
+ const CreateAlertFilterConditionsItemSchema = zod_1.z.object({
14
+ field: zod_1.z.enum(['plan_price_id']).optional(),
15
+ operator: zod_1.z.enum(['equals', 'not_equals']).optional(),
16
+ value: zod_1.z.string().max(50).optional(),
17
+ });
13
18
  const CreateAlertFilterConditionsSchema = zod_1.z.object({
14
19
  field: zod_1.z.array(zod_1.z.enum(['plan_price_id']).optional()).optional(),
15
20
  operator: zod_1.z.array(zod_1.z.enum(['equals', 'not_equals']).optional()).optional(),
@@ -25,12 +30,22 @@ const CreateAlertBodySchema = zod_1.z.looseObject({
25
30
  subscription_id: zod_1.z.string().max(50).optional(),
26
31
  meta: zod_1.z.string().max(65000).optional(),
27
32
  threshold: CreateAlertThresholdSchema.optional(),
28
- filter_conditions: CreateAlertFilterConditionsSchema.optional(),
33
+ filter_conditions: zod_1.z
34
+ .union([
35
+ zod_1.z.array(CreateAlertFilterConditionsItemSchema.optional()),
36
+ CreateAlertFilterConditionsSchema,
37
+ ])
38
+ .optional(),
29
39
  });
30
40
  exports.CreateAlertBodySchema = CreateAlertBodySchema;
31
41
  //Alert.list
32
42
  const ListAlertIdSchema = zod_1.z.object({
33
- in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
43
+ in: zod_1.z
44
+ .union([
45
+ zod_1.z.array(zod_1.z.string().optional()),
46
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
47
+ ])
48
+ .optional(),
34
49
  });
35
50
  const ListAlertTypeSchema = zod_1.z.object({
36
51
  is: zod_1.z
@@ -10,7 +10,12 @@ const AlertStatusesforsubscriptionAlertStatusAlarmStatusSchema = zod_1.z.object(
10
10
  is: zod_1.z.enum(['within_limit', 'in_alarm']).optional(),
11
11
  });
12
12
  const AlertStatusesforsubscriptionAlertStatusAlertIdSchema = zod_1.z.object({
13
- 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(),
14
19
  });
15
20
  const AlertStatusesforsubscriptionAlertStatusBodySchema = zod_1.z.looseObject({
16
21
  limit: zod_1.z.number().int().min(1).max(100).optional(),