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
@@ -0,0 +1,153 @@
1
+ "use strict";
2
+ // Generated Zod schemas: PriceRamp
3
+ // Actions: create, update, list
4
+ // Do not edit manually – regenerate via sdk-generator
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ListPriceRampBodySchema = exports.UpdatePriceRampBodySchema = exports.CreatePriceRampBodySchema = void 0;
7
+ const zod_1 = require("zod");
8
+ //PriceRamp.create
9
+ const CreatePriceRampRampIntervalsItemSchema = zod_1.z.object({
10
+ starting_billing_cycle: zod_1.z.number().int().min(1),
11
+ ending_billing_cycle: zod_1.z.number().int().min(1).optional(),
12
+ apply_catalog_price: zod_1.z.boolean().default(false).optional(),
13
+ price: zod_1.z.number().int().min(0).optional(),
14
+ price_in_decimal: zod_1.z.string().max(39).optional(),
15
+ });
16
+ const CreatePriceRampRampIntervalsSchema = zod_1.z.object({
17
+ starting_billing_cycle: zod_1.z.array(zod_1.z.number().int().min(1).optional()),
18
+ ending_billing_cycle: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
19
+ apply_catalog_price: zod_1.z
20
+ .array(zod_1.z.boolean().default(false).optional())
21
+ .optional(),
22
+ price: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
23
+ price_in_decimal: zod_1.z.array(zod_1.z.string().max(39).optional()).optional(),
24
+ });
25
+ const CreatePriceRampBodySchema = zod_1.z.looseObject({
26
+ item_price_id: zod_1.z.string().max(100),
27
+ business_entity_id: zod_1.z.string().max(50).optional(),
28
+ ramp_intervals: zod_1.z
29
+ .union([
30
+ zod_1.z.array(CreatePriceRampRampIntervalsItemSchema.optional()),
31
+ CreatePriceRampRampIntervalsSchema,
32
+ ])
33
+ .optional(),
34
+ });
35
+ exports.CreatePriceRampBodySchema = CreatePriceRampBodySchema;
36
+ //PriceRamp.update
37
+ const UpdatePriceRampRampIntervalsItemSchema = zod_1.z.object({
38
+ starting_billing_cycle: zod_1.z.number().int().min(1),
39
+ ending_billing_cycle: zod_1.z.number().int().min(1).optional(),
40
+ apply_catalog_price: zod_1.z.boolean().default(false).optional(),
41
+ price: zod_1.z.number().int().min(0).optional(),
42
+ price_in_decimal: zod_1.z.string().max(39).optional(),
43
+ });
44
+ const UpdatePriceRampRampIntervalsSchema = zod_1.z.object({
45
+ starting_billing_cycle: zod_1.z.array(zod_1.z.number().int().min(1).optional()),
46
+ ending_billing_cycle: zod_1.z.array(zod_1.z.number().int().min(1).optional()).optional(),
47
+ apply_catalog_price: zod_1.z
48
+ .array(zod_1.z.boolean().default(false).optional())
49
+ .optional(),
50
+ price: zod_1.z.array(zod_1.z.number().int().min(0).optional()).optional(),
51
+ price_in_decimal: zod_1.z.array(zod_1.z.string().max(39).optional()).optional(),
52
+ });
53
+ const UpdatePriceRampBodySchema = zod_1.z.looseObject({
54
+ status: zod_1.z.enum(['active', 'archived']).optional(),
55
+ ramp_intervals: zod_1.z
56
+ .union([
57
+ zod_1.z.array(UpdatePriceRampRampIntervalsItemSchema.optional()),
58
+ UpdatePriceRampRampIntervalsSchema,
59
+ ])
60
+ .optional(),
61
+ });
62
+ exports.UpdatePriceRampBodySchema = UpdatePriceRampBodySchema;
63
+ //PriceRamp.list
64
+ const ListPriceRampIdSchema = zod_1.z.object({
65
+ is: zod_1.z.string().min(1).optional(),
66
+ is_not: zod_1.z.string().min(1).optional(),
67
+ starts_with: zod_1.z.string().min(1).optional(),
68
+ in: zod_1.z
69
+ .union([
70
+ zod_1.z.array(zod_1.z.string().optional()),
71
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
72
+ ])
73
+ .optional(),
74
+ not_in: zod_1.z
75
+ .union([
76
+ zod_1.z.array(zod_1.z.string().optional()),
77
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
78
+ ])
79
+ .optional(),
80
+ });
81
+ const ListPriceRampItemPriceIdSchema = zod_1.z.object({
82
+ is: zod_1.z.string().min(1).optional(),
83
+ is_not: zod_1.z.string().min(1).optional(),
84
+ starts_with: zod_1.z.string().min(1).optional(),
85
+ in: zod_1.z
86
+ .union([
87
+ zod_1.z.array(zod_1.z.string().optional()),
88
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
89
+ ])
90
+ .optional(),
91
+ not_in: zod_1.z
92
+ .union([
93
+ zod_1.z.array(zod_1.z.string().optional()),
94
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
95
+ ])
96
+ .optional(),
97
+ });
98
+ const ListPriceRampStatusSchema = zod_1.z.object({
99
+ is: zod_1.z.enum(['active', 'archived']).optional(),
100
+ is_not: zod_1.z.enum(['active', 'archived']).optional(),
101
+ in: zod_1.z
102
+ .union([
103
+ zod_1.z.array(zod_1.z.enum(['active', 'archived']).optional()),
104
+ zod_1.z.enum(['active', 'archived']),
105
+ ])
106
+ .optional(),
107
+ not_in: zod_1.z
108
+ .union([
109
+ zod_1.z.array(zod_1.z.enum(['active', 'archived']).optional()),
110
+ zod_1.z.enum(['active', 'archived']),
111
+ ])
112
+ .optional(),
113
+ });
114
+ const ListPriceRampUpdatedAtSchema = zod_1.z.object({
115
+ after: zod_1.z
116
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
117
+ .optional(),
118
+ before: zod_1.z
119
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
120
+ .optional(),
121
+ on: zod_1.z
122
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
123
+ .optional(),
124
+ between: zod_1.z
125
+ .union([
126
+ zod_1.z.array(zod_1.z.number().int().optional()).min(2).max(2),
127
+ zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')),
128
+ ])
129
+ .optional(),
130
+ });
131
+ const ListPriceRampBusinessEntityIdSchema = zod_1.z.object({
132
+ is: zod_1.z.string().min(1).optional(),
133
+ is_present: zod_1.z.union([zod_1.z.boolean(), zod_1.z.enum(['true', 'false'])]).optional(),
134
+ });
135
+ const ListPriceRampIncludeSiteLevelResourcesSchema = zod_1.z.object({
136
+ is: zod_1.z.union([zod_1.z.boolean(), zod_1.z.enum(['true', 'false'])]).optional(),
137
+ });
138
+ const ListPriceRampSortBySchema = zod_1.z.looseObject({
139
+ asc: zod_1.z.enum(['id', 'status', 'updated_at']).optional(),
140
+ desc: zod_1.z.enum(['id', 'status', 'updated_at']).optional(),
141
+ });
142
+ const ListPriceRampBodySchema = zod_1.z.looseObject({
143
+ limit: zod_1.z.number().int().min(1).max(100).optional(),
144
+ offset: zod_1.z.string().max(1000).optional(),
145
+ id: ListPriceRampIdSchema.optional(),
146
+ item_price_id: ListPriceRampItemPriceIdSchema.optional(),
147
+ status: ListPriceRampStatusSchema.optional(),
148
+ updated_at: ListPriceRampUpdatedAtSchema.optional(),
149
+ business_entity_id: ListPriceRampBusinessEntityIdSchema.optional(),
150
+ include_site_level_resources: ListPriceRampIncludeSiteLevelResourcesSchema.optional(),
151
+ sort_by: ListPriceRampSortBySchema.optional(),
152
+ });
153
+ exports.ListPriceRampBodySchema = ListPriceRampBodySchema;
@@ -6,6 +6,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.ListPriceVariantBodySchema = exports.UpdatePriceVariantBodySchema = exports.CreatePriceVariantBodySchema = void 0;
7
7
  const zod_1 = require("zod");
8
8
  //PriceVariant.create
9
+ const CreatePriceVariantAttributesItemSchema = zod_1.z.object({
10
+ name: zod_1.z.string().max(100),
11
+ value: zod_1.z.string().max(100),
12
+ });
9
13
  const CreatePriceVariantAttributesSchema = zod_1.z.object({
10
14
  name: zod_1.z.array(zod_1.z.string().max(100).optional()),
11
15
  value: zod_1.z.array(zod_1.z.string().max(100).optional()),
@@ -17,10 +21,19 @@ const CreatePriceVariantBodySchema = zod_1.z.looseObject({
17
21
  description: zod_1.z.string().max(500).optional(),
18
22
  variant_group: zod_1.z.string().max(100).optional(),
19
23
  business_entity_id: zod_1.z.string().max(50).optional(),
20
- attributes: CreatePriceVariantAttributesSchema.optional(),
24
+ attributes: zod_1.z
25
+ .union([
26
+ zod_1.z.array(CreatePriceVariantAttributesItemSchema.optional()),
27
+ CreatePriceVariantAttributesSchema,
28
+ ])
29
+ .optional(),
21
30
  });
22
31
  exports.CreatePriceVariantBodySchema = CreatePriceVariantBodySchema;
23
32
  //PriceVariant.update
33
+ const UpdatePriceVariantAttributesItemSchema = zod_1.z.object({
34
+ name: zod_1.z.string().max(100),
35
+ value: zod_1.z.string().max(100),
36
+ });
24
37
  const UpdatePriceVariantAttributesSchema = zod_1.z.object({
25
38
  name: zod_1.z.array(zod_1.z.string().max(100).optional()),
26
39
  value: zod_1.z.array(zod_1.z.string().max(100).optional()),
@@ -31,7 +44,12 @@ const UpdatePriceVariantBodySchema = zod_1.z.looseObject({
31
44
  description: zod_1.z.string().max(500).optional(),
32
45
  variant_group: zod_1.z.string().max(100).optional(),
33
46
  status: zod_1.z.enum(['active', 'archived']).optional(),
34
- attributes: UpdatePriceVariantAttributesSchema.optional(),
47
+ attributes: zod_1.z
48
+ .union([
49
+ zod_1.z.array(UpdatePriceVariantAttributesItemSchema.optional()),
50
+ UpdatePriceVariantAttributesSchema,
51
+ ])
52
+ .optional(),
35
53
  });
36
54
  exports.UpdatePriceVariantBodySchema = UpdatePriceVariantBodySchema;
37
55
  //PriceVariant.list
@@ -39,40 +57,92 @@ const ListPriceVariantIdSchema = zod_1.z.object({
39
57
  is: zod_1.z.string().min(1).optional(),
40
58
  is_not: zod_1.z.string().min(1).optional(),
41
59
  starts_with: zod_1.z.string().min(1).optional(),
42
- in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
43
- not_in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
60
+ in: zod_1.z
61
+ .union([
62
+ zod_1.z.array(zod_1.z.string().optional()),
63
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
64
+ ])
65
+ .optional(),
66
+ not_in: zod_1.z
67
+ .union([
68
+ zod_1.z.array(zod_1.z.string().optional()),
69
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
70
+ ])
71
+ .optional(),
44
72
  });
45
73
  const ListPriceVariantNameSchema = zod_1.z.object({
46
74
  is: zod_1.z.string().min(1).optional(),
47
75
  is_not: zod_1.z.string().min(1).optional(),
48
76
  starts_with: zod_1.z.string().min(1).optional(),
49
- in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
50
- not_in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
77
+ in: zod_1.z
78
+ .union([
79
+ zod_1.z.array(zod_1.z.string().optional()),
80
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
81
+ ])
82
+ .optional(),
83
+ not_in: zod_1.z
84
+ .union([
85
+ zod_1.z.array(zod_1.z.string().optional()),
86
+ zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')),
87
+ ])
88
+ .optional(),
51
89
  });
52
90
  const ListPriceVariantStatusSchema = zod_1.z.object({
53
91
  is: zod_1.z.enum(['active', 'archived']).optional(),
54
92
  is_not: zod_1.z.enum(['active', 'archived']).optional(),
55
- in: zod_1.z.enum(['active', 'archived']).optional(),
56
- not_in: zod_1.z.enum(['active', 'archived']).optional(),
93
+ in: zod_1.z
94
+ .union([
95
+ zod_1.z.array(zod_1.z.enum(['active', 'archived']).optional()),
96
+ zod_1.z.enum(['active', 'archived']),
97
+ ])
98
+ .optional(),
99
+ not_in: zod_1.z
100
+ .union([
101
+ zod_1.z.array(zod_1.z.enum(['active', 'archived']).optional()),
102
+ zod_1.z.enum(['active', 'archived']),
103
+ ])
104
+ .optional(),
57
105
  });
58
106
  const ListPriceVariantUpdatedAtSchema = zod_1.z.object({
59
- after: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
60
- before: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
61
- on: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
62
- between: zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
107
+ after: zod_1.z
108
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
109
+ .optional(),
110
+ before: zod_1.z
111
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
112
+ .optional(),
113
+ on: zod_1.z
114
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
115
+ .optional(),
116
+ between: zod_1.z
117
+ .union([
118
+ zod_1.z.array(zod_1.z.number().int().optional()).min(2).max(2),
119
+ zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')),
120
+ ])
121
+ .optional(),
63
122
  });
64
123
  const ListPriceVariantCreatedAtSchema = zod_1.z.object({
65
- after: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
66
- before: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
67
- on: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
68
- between: zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
124
+ after: zod_1.z
125
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
126
+ .optional(),
127
+ before: zod_1.z
128
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
129
+ .optional(),
130
+ on: zod_1.z
131
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
132
+ .optional(),
133
+ between: zod_1.z
134
+ .union([
135
+ zod_1.z.array(zod_1.z.number().int().optional()).min(2).max(2),
136
+ zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')),
137
+ ])
138
+ .optional(),
69
139
  });
70
140
  const ListPriceVariantBusinessEntityIdSchema = zod_1.z.object({
71
141
  is: zod_1.z.string().min(1).optional(),
72
- is_present: zod_1.z.enum(['true', 'false']).optional(),
142
+ is_present: zod_1.z.union([zod_1.z.boolean(), zod_1.z.enum(['true', 'false'])]).optional(),
73
143
  });
74
144
  const ListPriceVariantIncludeSiteLevelResourcesSchema = zod_1.z.object({
75
- is: zod_1.z.enum(['true', 'false']).optional(),
145
+ is: zod_1.z.union([zod_1.z.boolean(), zod_1.z.enum(['true', 'false'])]).optional(),
76
146
  });
77
147
  const ListPriceVariantSortBySchema = zod_1.z.looseObject({
78
148
  asc: zod_1.z.enum(['name', 'id', 'status', 'created_at', 'updated_at']).optional(),
@@ -64,6 +64,18 @@ const CreateForNewSubscriptionPricingPageSessionContractTermSchema = zod_1.z.obj
64
64
  .optional(),
65
65
  cancellation_cutoff_period: zod_1.z.number().int().optional(),
66
66
  });
67
+ const CreateForNewSubscriptionPricingPageSessionDiscountsItemSchema = zod_1.z.object({
68
+ apply_on: zod_1.z.enum(['invoice_amount', 'specific_item_price']).optional(),
69
+ duration_type: zod_1.z.enum(['one_time', 'forever', 'limited_period']),
70
+ percentage: zod_1.z.number().min(0.01).max(100).optional(),
71
+ amount: zod_1.z.number().int().min(0).optional(),
72
+ period: zod_1.z.number().int().min(1).optional(),
73
+ period_unit: zod_1.z.enum(['day', 'week', 'month', 'year']).optional(),
74
+ included_in_mrr: zod_1.z.boolean().optional(),
75
+ item_price_id: zod_1.z.string().max(100).optional(),
76
+ quantity: zod_1.z.number().int().min(1).optional(),
77
+ label: zod_1.z.string().max(100).optional(),
78
+ });
67
79
  const CreateForNewSubscriptionPricingPageSessionDiscountsSchema = zod_1.z.object({
68
80
  apply_on: zod_1.z
69
81
  .array(zod_1.z.enum(['invoice_amount', 'specific_item_price']).optional())
@@ -92,7 +104,12 @@ const CreateForNewSubscriptionPricingPageSessionBodySchema = zod_1.z.looseObject
92
104
  billing_address: CreateForNewSubscriptionPricingPageSessionBillingAddressSchema.optional(),
93
105
  shipping_address: CreateForNewSubscriptionPricingPageSessionShippingAddressSchema.optional(),
94
106
  contract_term: CreateForNewSubscriptionPricingPageSessionContractTermSchema.optional(),
95
- discounts: CreateForNewSubscriptionPricingPageSessionDiscountsSchema.optional(),
107
+ discounts: zod_1.z
108
+ .union([
109
+ zod_1.z.array(CreateForNewSubscriptionPricingPageSessionDiscountsItemSchema.optional()),
110
+ CreateForNewSubscriptionPricingPageSessionDiscountsSchema,
111
+ ])
112
+ .optional(),
96
113
  });
97
114
  exports.CreateForNewSubscriptionPricingPageSessionBodySchema = CreateForNewSubscriptionPricingPageSessionBodySchema;
98
115
  //PricingPageSession.createForExistingSubscription
@@ -109,6 +126,18 @@ const CreateForExistingSubscriptionPricingPageSessionContractTermSchema = zod_1.
109
126
  .optional(),
110
127
  cancellation_cutoff_period: zod_1.z.number().int().optional(),
111
128
  });
129
+ const CreateForExistingSubscriptionPricingPageSessionDiscountsItemSchema = zod_1.z.object({
130
+ apply_on: zod_1.z.enum(['invoice_amount', 'specific_item_price']).optional(),
131
+ duration_type: zod_1.z.enum(['one_time', 'forever', 'limited_period']),
132
+ percentage: zod_1.z.number().min(0.01).max(100).optional(),
133
+ amount: zod_1.z.number().int().min(0).optional(),
134
+ period: zod_1.z.number().int().min(1).optional(),
135
+ period_unit: zod_1.z.enum(['day', 'week', 'month', 'year']).optional(),
136
+ included_in_mrr: zod_1.z.boolean().optional(),
137
+ item_price_id: zod_1.z.string().max(100).optional(),
138
+ quantity: zod_1.z.number().int().min(1).optional(),
139
+ label: zod_1.z.string().max(100).optional(),
140
+ });
112
141
  const CreateForExistingSubscriptionPricingPageSessionDiscountsSchema = zod_1.z.object({
113
142
  apply_on: zod_1.z
114
143
  .array(zod_1.z.enum(['invoice_amount', 'specific_item_price']).optional())
@@ -131,6 +160,11 @@ const CreateForExistingSubscriptionPricingPageSessionBodySchema = zod_1.z.looseO
131
160
  pricing_page: CreateForExistingSubscriptionPricingPageSessionPricingPageSchema.optional(),
132
161
  subscription: CreateForExistingSubscriptionPricingPageSessionSubscriptionSchema.optional(),
133
162
  contract_term: CreateForExistingSubscriptionPricingPageSessionContractTermSchema.optional(),
134
- discounts: CreateForExistingSubscriptionPricingPageSessionDiscountsSchema.optional(),
163
+ discounts: zod_1.z
164
+ .union([
165
+ zod_1.z.array(CreateForExistingSubscriptionPricingPageSessionDiscountsItemSchema.optional()),
166
+ CreateForExistingSubscriptionPricingPageSessionDiscountsSchema,
167
+ ])
168
+ .optional(),
135
169
  });
136
170
  exports.CreateForExistingSubscriptionPricingPageSessionBodySchema = CreateForExistingSubscriptionPricingPageSessionBodySchema;
@@ -51,16 +51,37 @@ const ListPromotionalCreditIdSchema = zod_1.z.object({
51
51
  starts_with: zod_1.z.string().min(1).optional(),
52
52
  });
53
53
  const ListPromotionalCreditCreatedAtSchema = zod_1.z.object({
54
- after: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
55
- before: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
56
- on: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
57
- between: zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
54
+ after: zod_1.z
55
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
56
+ .optional(),
57
+ before: zod_1.z
58
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
59
+ .optional(),
60
+ on: zod_1.z
61
+ .union([zod_1.z.number().int(), zod_1.z.string().regex(RegExp('^\\d{10}$'))])
62
+ .optional(),
63
+ between: zod_1.z
64
+ .union([
65
+ zod_1.z.array(zod_1.z.number().int().optional()).min(2).max(2),
66
+ zod_1.z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')),
67
+ ])
68
+ .optional(),
58
69
  });
59
70
  const ListPromotionalCreditTypeSchema = zod_1.z.object({
60
71
  is: zod_1.z.enum(['increment', 'decrement']).optional(),
61
72
  is_not: zod_1.z.enum(['increment', 'decrement']).optional(),
62
- in: zod_1.z.enum(['increment', 'decrement']).optional(),
63
- not_in: zod_1.z.enum(['increment', 'decrement']).optional(),
73
+ in: zod_1.z
74
+ .union([
75
+ zod_1.z.array(zod_1.z.enum(['increment', 'decrement']).optional()),
76
+ zod_1.z.enum(['increment', 'decrement']),
77
+ ])
78
+ .optional(),
79
+ not_in: zod_1.z
80
+ .union([
81
+ zod_1.z.array(zod_1.z.enum(['increment', 'decrement']).optional()),
82
+ zod_1.z.enum(['increment', 'decrement']),
83
+ ])
84
+ .optional(),
64
85
  });
65
86
  const ListPromotionalCreditCustomerIdSchema = zod_1.z.object({
66
87
  is: zod_1.z.string().min(1).optional(),