chargebee 3.34.0 → 3.35.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 (118) hide show
  1. package/CHANGELOG.md +172 -0
  2. package/cjs/environment.js +1 -1
  3. package/cjs/resources/api_endpoints.js +174 -2
  4. package/cjs/resources/webhook/eventType.js +23 -1
  5. package/cjs/schema/business_entity.schema.js +28 -2
  6. package/cjs/schema/collections_payment_promise.schema.js +43 -0
  7. package/cjs/schema/comment.schema.js +2 -0
  8. package/cjs/schema/coupon.schema.js +1 -1
  9. package/cjs/schema/credit_note.schema.js +1 -0
  10. package/cjs/schema/credit_unit.schema.js +2 -2
  11. package/cjs/schema/einvoice.schema.js +2 -2
  12. package/cjs/schema/entitlement.schema.js +4 -4
  13. package/cjs/schema/estimate.schema.js +4 -4
  14. package/cjs/schema/event.schema.js +104 -4
  15. package/cjs/schema/export.schema.js +7 -7
  16. package/cjs/schema/hosted_page.schema.js +2 -2
  17. package/cjs/schema/index.js +3 -0
  18. package/cjs/schema/invoice.schema.js +24 -4
  19. package/cjs/schema/item.schema.js +1 -1
  20. package/cjs/schema/item_family.schema.js +1 -1
  21. package/cjs/schema/item_price.schema.js +1 -1
  22. package/cjs/schema/ledger_account_balance.schema.js +11 -2
  23. package/cjs/schema/ledger_operation.schema.js +2 -2
  24. package/cjs/schema/omnichannel_one_time_order.schema.js +12 -4
  25. package/cjs/schema/omnichannel_subscription.schema.js +18 -10
  26. package/cjs/schema/payment_source.schema.js +15 -0
  27. package/cjs/schema/price_ramp.schema.js +88 -0
  28. package/cjs/schema/price_variant.schema.js +1 -1
  29. package/cjs/schema/purchase.schema.js +6 -0
  30. package/cjs/schema/quote.schema.js +6 -6
  31. package/cjs/schema/ramp.schema.js +10 -6
  32. package/cjs/schema/retry_segment.schema.js +12 -0
  33. package/cjs/schema/subscription.schema.js +4 -4
  34. package/cjs/schema/usage.schema.js +5 -0
  35. package/cjs/schema/usage_summary.schema.js +1 -0
  36. package/cjs/schema/webhook_endpoint.schema.js +46 -2
  37. package/esm/environment.js +1 -1
  38. package/esm/resources/api_endpoints.js +174 -2
  39. package/esm/resources/webhook/eventType.js +23 -1
  40. package/esm/schema/business_entity.schema.js +27 -1
  41. package/esm/schema/collections_payment_promise.schema.js +40 -0
  42. package/esm/schema/comment.schema.js +2 -0
  43. package/esm/schema/coupon.schema.js +1 -1
  44. package/esm/schema/credit_note.schema.js +1 -0
  45. package/esm/schema/credit_unit.schema.js +2 -2
  46. package/esm/schema/einvoice.schema.js +2 -2
  47. package/esm/schema/entitlement.schema.js +4 -4
  48. package/esm/schema/estimate.schema.js +4 -4
  49. package/esm/schema/event.schema.js +104 -4
  50. package/esm/schema/export.schema.js +7 -7
  51. package/esm/schema/hosted_page.schema.js +2 -2
  52. package/esm/schema/index.js +3 -0
  53. package/esm/schema/invoice.schema.js +23 -3
  54. package/esm/schema/item.schema.js +1 -1
  55. package/esm/schema/item_family.schema.js +1 -1
  56. package/esm/schema/item_price.schema.js +1 -1
  57. package/esm/schema/ledger_account_balance.schema.js +10 -1
  58. package/esm/schema/ledger_operation.schema.js +2 -2
  59. package/esm/schema/omnichannel_one_time_order.schema.js +12 -4
  60. package/esm/schema/omnichannel_subscription.schema.js +18 -10
  61. package/esm/schema/payment_source.schema.js +15 -0
  62. package/esm/schema/price_ramp.schema.js +85 -0
  63. package/esm/schema/price_variant.schema.js +1 -1
  64. package/esm/schema/purchase.schema.js +6 -0
  65. package/esm/schema/quote.schema.js +6 -6
  66. package/esm/schema/ramp.schema.js +10 -6
  67. package/esm/schema/retry_segment.schema.js +9 -0
  68. package/esm/schema/subscription.schema.js +4 -4
  69. package/esm/schema/usage.schema.js +5 -0
  70. package/esm/schema/usage_summary.schema.js +1 -0
  71. package/esm/schema/webhook_endpoint.schema.js +46 -2
  72. package/package.json +1 -1
  73. package/types/core.d.ts +53 -68
  74. package/types/index.d.ts +22 -1
  75. package/types/resources/BusinessEntity.d.ts +52 -0
  76. package/types/resources/Citation.d.ts +13 -0
  77. package/types/resources/CollectionsDispute.d.ts +24 -0
  78. package/types/resources/CollectionsPaymentPromise.d.ts +93 -0
  79. package/types/resources/CollectionsReminderSequence.d.ts +35 -0
  80. package/types/resources/Comment.d.ts +2 -1
  81. package/types/resources/Content.d.ts +18 -1
  82. package/types/resources/CreditNote.d.ts +1 -0
  83. package/types/resources/CustomData.d.ts +14 -0
  84. package/types/resources/DraftEstimate.d.ts +13 -0
  85. package/types/resources/DraftRequest.d.ts +45 -0
  86. package/types/resources/EmailAttachment.d.ts +16 -0
  87. package/types/resources/EmailConversation.d.ts +18 -0
  88. package/types/resources/EmailLog.d.ts +1 -0
  89. package/types/resources/EmailMessage.d.ts +40 -0
  90. package/types/resources/Event.d.ts +23 -1
  91. package/types/resources/Execution.d.ts +12 -0
  92. package/types/resources/GatewayPaymentMethodToken.d.ts +2 -2
  93. package/types/resources/GroupByAttribute.d.ts +15 -0
  94. package/types/resources/GroupByRecommendation.d.ts +10 -0
  95. package/types/resources/Invoice.d.ts +15 -0
  96. package/types/resources/ItemPrice.d.ts +1 -0
  97. package/types/resources/LedgerAccountBalance.d.ts +19 -0
  98. package/types/resources/Meter.d.ts +1 -0
  99. package/types/resources/MeteredFeature.d.ts +1 -0
  100. package/types/resources/OmnichannelOneTimeOrder.d.ts +5 -1
  101. package/types/resources/OmnichannelSubscription.d.ts +6 -1
  102. package/types/resources/OmnichannelSubscriptionItem.d.ts +4 -1
  103. package/types/resources/PaymentSchedule.d.ts +1 -1
  104. package/types/resources/PaymentScheduleEstimate.d.ts +1 -1
  105. package/types/resources/PaymentSource.d.ts +19 -0
  106. package/types/resources/PreferenceVariant.d.ts +10 -0
  107. package/types/resources/PriceRamp.d.ts +113 -0
  108. package/types/resources/PrivateNote.d.ts +18 -0
  109. package/types/resources/Purchase.d.ts +6 -0
  110. package/types/resources/Ramp.d.ts +6 -0
  111. package/types/resources/RampInterval.d.ts +12 -0
  112. package/types/resources/RecordedPurchase.d.ts +5 -1
  113. package/types/resources/RetrySegment.d.ts +36 -0
  114. package/types/resources/Transaction.d.ts +4 -0
  115. package/types/resources/Usage.d.ts +6 -0
  116. package/types/resources/UsageSummary.d.ts +2 -0
  117. package/types/resources/WebhookEvent.d.ts +149 -5
  118. package/types/resources/AppliedBusinessRule.d.ts +0 -15
@@ -0,0 +1,85 @@
1
+ // Generated Zod schemas: PriceRamp
2
+ // Actions: create, update, list
3
+ // Do not edit manually – regenerate via sdk-generator
4
+ import { z } from 'zod';
5
+ //PriceRamp.create
6
+ const CreatePriceRampRampIntervalsSchema = z.object({
7
+ starting_billing_cycle: z.array(z.number().int().min(1).optional()),
8
+ ending_billing_cycle: z.array(z.number().int().min(1).optional()).optional(),
9
+ apply_catalog_price: z
10
+ .array(z.boolean().default(false).optional())
11
+ .optional(),
12
+ price: z.array(z.number().int().min(0).optional()).optional(),
13
+ price_in_decimal: z.array(z.string().max(39).optional()).optional(),
14
+ });
15
+ const CreatePriceRampBodySchema = z.looseObject({
16
+ item_price_id: z.string().max(100),
17
+ business_entity_id: z.string().max(50).optional(),
18
+ ramp_intervals: CreatePriceRampRampIntervalsSchema.optional(),
19
+ });
20
+ export { CreatePriceRampBodySchema };
21
+ //PriceRamp.update
22
+ const UpdatePriceRampRampIntervalsSchema = z.object({
23
+ starting_billing_cycle: z.array(z.number().int().min(1).optional()),
24
+ ending_billing_cycle: z.array(z.number().int().min(1).optional()).optional(),
25
+ apply_catalog_price: z
26
+ .array(z.boolean().default(false).optional())
27
+ .optional(),
28
+ price: z.array(z.number().int().min(0).optional()).optional(),
29
+ price_in_decimal: z.array(z.string().max(39).optional()).optional(),
30
+ });
31
+ const UpdatePriceRampBodySchema = z.looseObject({
32
+ status: z.enum(['active', 'archived']).optional(),
33
+ ramp_intervals: UpdatePriceRampRampIntervalsSchema.optional(),
34
+ });
35
+ export { UpdatePriceRampBodySchema };
36
+ //PriceRamp.list
37
+ const ListPriceRampIdSchema = z.object({
38
+ is: z.string().min(1).optional(),
39
+ is_not: z.string().min(1).optional(),
40
+ starts_with: z.string().min(1).optional(),
41
+ in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
42
+ not_in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
43
+ });
44
+ const ListPriceRampItemPriceIdSchema = z.object({
45
+ is: z.string().min(1).optional(),
46
+ is_not: z.string().min(1).optional(),
47
+ starts_with: z.string().min(1).optional(),
48
+ in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
49
+ not_in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
50
+ });
51
+ const ListPriceRampStatusSchema = z.object({
52
+ is: z.enum(['active', 'archived']).optional(),
53
+ is_not: z.enum(['active', 'archived']).optional(),
54
+ in: z.enum(['active', 'archived']).optional(),
55
+ not_in: z.enum(['active', 'archived']).optional(),
56
+ });
57
+ const ListPriceRampUpdatedAtSchema = z.object({
58
+ after: z.string().regex(RegExp('^\\d{10}$')).optional(),
59
+ before: z.string().regex(RegExp('^\\d{10}$')).optional(),
60
+ on: z.string().regex(RegExp('^\\d{10}$')).optional(),
61
+ between: z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
62
+ });
63
+ const ListPriceRampBusinessEntityIdSchema = z.object({
64
+ is_present: z.enum(['true', 'false']).optional(),
65
+ is: z.string().min(1).optional(),
66
+ });
67
+ const ListPriceRampIncludeSiteLevelResourcesSchema = z.object({
68
+ is: z.enum(['true', 'false']).optional(),
69
+ });
70
+ const ListPriceRampSortBySchema = z.looseObject({
71
+ asc: z.enum(['id', 'status', 'updated_at']).optional(),
72
+ desc: z.enum(['id', 'status', 'updated_at']).optional(),
73
+ });
74
+ const ListPriceRampBodySchema = z.looseObject({
75
+ limit: z.number().int().min(1).max(100).optional(),
76
+ offset: z.string().max(1000).optional(),
77
+ id: ListPriceRampIdSchema.optional(),
78
+ item_price_id: ListPriceRampItemPriceIdSchema.optional(),
79
+ status: ListPriceRampStatusSchema.optional(),
80
+ updated_at: ListPriceRampUpdatedAtSchema.optional(),
81
+ business_entity_id: ListPriceRampBusinessEntityIdSchema.optional(),
82
+ include_site_level_resources: ListPriceRampIncludeSiteLevelResourcesSchema.optional(),
83
+ sort_by: ListPriceRampSortBySchema.optional(),
84
+ });
85
+ export { ListPriceRampBodySchema };
@@ -65,8 +65,8 @@ const ListPriceVariantCreatedAtSchema = z.object({
65
65
  between: z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
66
66
  });
67
67
  const ListPriceVariantBusinessEntityIdSchema = z.object({
68
- is: z.string().min(1).optional(),
69
68
  is_present: z.enum(['true', 'false']).optional(),
69
+ is: z.string().min(1).optional(),
70
70
  });
71
71
  const ListPriceVariantIncludeSiteLevelResourcesSchema = z.object({
72
72
  is: z.enum(['true', 'false']).optional(),
@@ -99,6 +99,7 @@ const CreatePurchasePurchaseItemsSchema = z.object({
99
99
  unit_amount: z.array(z.number().int().min(0).optional()).optional(),
100
100
  unit_amount_in_decimal: z.array(z.string().max(39).optional()).optional(),
101
101
  quantity_in_decimal: z.array(z.string().max(33).optional()).optional(),
102
+ trial_end: z.array(z.number().int().optional()).optional(),
102
103
  });
103
104
  const CreatePurchaseItemTiersSchema = z.object({
104
105
  index: z.array(z.number().int().min(0).optional()),
@@ -146,6 +147,8 @@ const CreatePurchaseSubscriptionInfoSchema = z.object({
146
147
  contract_term_billing_cycle_on_renewal: z
147
148
  .array(z.number().int().min(1).max(100).optional())
148
149
  .optional(),
150
+ trial_end: z.array(z.number().int().optional()).optional(),
151
+ start_date: z.array(z.number().int().optional()).optional(),
149
152
  meta_data: z.array(CreatePurchaseMetaDataItemSchema.optional()).optional(),
150
153
  });
151
154
  const CreatePurchaseContractTermsSchema = z.object({
@@ -225,6 +228,7 @@ const EstimatePurchasePurchaseItemsSchema = z.object({
225
228
  unit_amount: z.array(z.number().int().min(0).optional()).optional(),
226
229
  unit_amount_in_decimal: z.array(z.string().max(39).optional()).optional(),
227
230
  quantity_in_decimal: z.array(z.string().max(33).optional()).optional(),
231
+ trial_end: z.array(z.number().int().optional()).optional(),
228
232
  });
229
233
  const EstimatePurchaseItemTiersSchema = z.object({
230
234
  index: z.array(z.number().int().min(0).optional()),
@@ -271,6 +275,8 @@ const EstimatePurchaseSubscriptionInfoSchema = z.object({
271
275
  contract_term_billing_cycle_on_renewal: z
272
276
  .array(z.number().int().min(1).max(100).optional())
273
277
  .optional(),
278
+ trial_end: z.array(z.number().int().optional()).optional(),
279
+ start_date: z.array(z.number().int().optional()).optional(),
274
280
  });
275
281
  const EstimatePurchaseContractTermsSchema = z.object({
276
282
  index: z.array(z.number().int().min(0).optional()),
@@ -697,7 +697,7 @@ const CreateSubItemsForCustomerQuoteQuoteSubscriptionItemsSchema = z.object({
697
697
  billing_cycles: z.array(z.number().int().min(0).optional()).optional(),
698
698
  trial_end: z.array(z.number().int().optional()).optional(),
699
699
  service_period_days: z
700
- .array(z.number().int().min(1).max(730).optional())
700
+ .array(z.number().int().min(1).max(4000).optional())
701
701
  .optional(),
702
702
  charge_on_event: z
703
703
  .array(z
@@ -873,7 +873,7 @@ const EditCreateSubCustomerQuoteForItemsQuoteSubscriptionItemsSchema = z.object(
873
873
  billing_cycles: z.array(z.number().int().min(0).optional()).optional(),
874
874
  trial_end: z.array(z.number().int().optional()).optional(),
875
875
  service_period_days: z
876
- .array(z.number().int().min(1).max(730).optional())
876
+ .array(z.number().int().min(1).max(4000).optional())
877
877
  .optional(),
878
878
  charge_on_event: z
879
879
  .array(z
@@ -1056,7 +1056,7 @@ const UpdateSubscriptionQuoteForItemsQuoteSubscriptionItemsSchema = z.object({
1056
1056
  billing_cycles: z.array(z.number().int().min(0).optional()).optional(),
1057
1057
  trial_end: z.array(z.number().int().optional()).optional(),
1058
1058
  service_period_days: z
1059
- .array(z.number().int().min(1).max(730).optional())
1059
+ .array(z.number().int().min(1).max(4000).optional())
1060
1060
  .optional(),
1061
1061
  charge_on_event: z
1062
1062
  .array(z
@@ -1246,7 +1246,7 @@ const EditUpdateSubscriptionQuoteForItemsQuoteSubscriptionItemsSchema = z.object
1246
1246
  billing_cycles: z.array(z.number().int().min(0).optional()).optional(),
1247
1247
  trial_end: z.array(z.number().int().optional()).optional(),
1248
1248
  service_period_days: z
1249
- .array(z.number().int().min(1).max(730).optional())
1249
+ .array(z.number().int().min(1).max(4000).optional())
1250
1250
  .optional(),
1251
1251
  charge_on_event: z
1252
1252
  .array(z
@@ -1394,7 +1394,7 @@ const CreateForChargeItemsAndChargesQuoteItemPricesSchema = z.object({
1394
1394
  unit_price: z.array(z.number().int().min(0).optional()).optional(),
1395
1395
  unit_price_in_decimal: z.array(z.string().max(39).optional()).optional(),
1396
1396
  service_period_days: z
1397
- .array(z.number().int().min(1).max(730).optional())
1397
+ .array(z.number().int().min(1).max(4000).optional())
1398
1398
  .optional(),
1399
1399
  });
1400
1400
  const CreateForChargeItemsAndChargesQuoteItemTiersSchema = z.object({
@@ -1496,7 +1496,7 @@ const EditForChargeItemsAndChargesQuoteItemPricesSchema = z.object({
1496
1496
  unit_price: z.array(z.number().int().min(0).optional()).optional(),
1497
1497
  unit_price_in_decimal: z.array(z.string().max(39).optional()).optional(),
1498
1498
  service_period_days: z
1499
- .array(z.number().int().min(1).max(730).optional())
1499
+ .array(z.number().int().min(1).max(4000).optional())
1500
1500
  .optional(),
1501
1501
  });
1502
1502
  const EditForChargeItemsAndChargesQuoteItemTiersSchema = z.object({
@@ -21,7 +21,7 @@ const CreateForSubscriptionRampItemsToAddSchema = z.object({
21
21
  unit_price_in_decimal: z.array(z.string().max(39).optional()).optional(),
22
22
  billing_cycles: z.array(z.number().int().min(0).optional()).optional(),
23
23
  service_period_days: z
24
- .array(z.number().int().min(1).max(730).optional())
24
+ .array(z.number().int().min(1).max(4000).optional())
25
25
  .optional(),
26
26
  charge_on_event: z
27
27
  .array(z
@@ -37,6 +37,7 @@ const CreateForSubscriptionRampItemsToAddSchema = z.object({
37
37
  charge_on_option: z
38
38
  .array(z.enum(['immediately', 'on_event']).optional())
39
39
  .optional(),
40
+ description: z.array(z.string().max(500).optional()).optional(),
40
41
  });
41
42
  const CreateForSubscriptionRampItemsToUpdateSchema = z.object({
42
43
  item_price_id: z.array(z.string().max(100).optional()),
@@ -46,7 +47,7 @@ const CreateForSubscriptionRampItemsToUpdateSchema = z.object({
46
47
  unit_price_in_decimal: z.array(z.string().max(39).optional()).optional(),
47
48
  billing_cycles: z.array(z.number().int().min(0).optional()).optional(),
48
49
  service_period_days: z
49
- .array(z.number().int().min(1).max(730).optional())
50
+ .array(z.number().int().min(1).max(4000).optional())
50
51
  .optional(),
51
52
  charge_on_event: z
52
53
  .array(z
@@ -62,6 +63,7 @@ const CreateForSubscriptionRampItemsToUpdateSchema = z.object({
62
63
  charge_on_option: z
63
64
  .array(z.enum(['immediately', 'on_event']).optional())
64
65
  .optional(),
66
+ description: z.array(z.string().max(500).optional()).optional(),
65
67
  });
66
68
  const CreateForSubscriptionRampItemTiersSchema = z.object({
67
69
  item_price_id: z.array(z.string().max(100).optional()).optional(),
@@ -127,7 +129,7 @@ const UpdateRampItemsToAddSchema = z.object({
127
129
  unit_price_in_decimal: z.array(z.string().max(39).optional()).optional(),
128
130
  billing_cycles: z.array(z.number().int().min(0).optional()).optional(),
129
131
  service_period_days: z
130
- .array(z.number().int().min(1).max(730).optional())
132
+ .array(z.number().int().min(1).max(4000).optional())
131
133
  .optional(),
132
134
  charge_on_event: z
133
135
  .array(z
@@ -143,6 +145,7 @@ const UpdateRampItemsToAddSchema = z.object({
143
145
  charge_on_option: z
144
146
  .array(z.enum(['immediately', 'on_event']).optional())
145
147
  .optional(),
148
+ description: z.array(z.string().max(500).optional()).optional(),
146
149
  });
147
150
  const UpdateRampItemsToUpdateSchema = z.object({
148
151
  item_price_id: z.array(z.string().max(100).optional()),
@@ -152,7 +155,7 @@ const UpdateRampItemsToUpdateSchema = z.object({
152
155
  unit_price_in_decimal: z.array(z.string().max(39).optional()).optional(),
153
156
  billing_cycles: z.array(z.number().int().min(0).optional()).optional(),
154
157
  service_period_days: z
155
- .array(z.number().int().min(1).max(730).optional())
158
+ .array(z.number().int().min(1).max(4000).optional())
156
159
  .optional(),
157
160
  charge_on_event: z
158
161
  .array(z
@@ -168,6 +171,7 @@ const UpdateRampItemsToUpdateSchema = z.object({
168
171
  charge_on_option: z
169
172
  .array(z.enum(['immediately', 'on_event']).optional())
170
173
  .optional(),
174
+ description: z.array(z.string().max(500).optional()).optional(),
171
175
  });
172
176
  const UpdateRampItemTiersSchema = z.object({
173
177
  item_price_id: z.array(z.string().max(100).optional()).optional(),
@@ -216,12 +220,12 @@ const UpdateRampBodySchema = z.looseObject({
216
220
  export { UpdateRampBodySchema };
217
221
  //Ramp.list
218
222
  const ListRampStatusSchema = z.object({
219
- is: z.enum(['scheduled', 'succeeded', 'failed', 'draft']).optional(),
220
223
  in: z.enum(['scheduled', 'succeeded', 'failed', 'draft']).optional(),
224
+ is: z.enum(['scheduled', 'succeeded', 'failed', 'draft']).optional(),
221
225
  });
222
226
  const ListRampSubscriptionIdSchema = z.object({
223
- is: z.string().min(1).optional(),
224
227
  in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
228
+ is: z.string().min(1).optional(),
225
229
  });
226
230
  const ListRampEffectiveFromSchema = z.object({
227
231
  after: z.string().regex(RegExp('^\\d{10}$')).optional(),
@@ -0,0 +1,9 @@
1
+ // Generated Zod schemas: RetrySegment
2
+ // Actions: retrieve
3
+ // Do not edit manually – regenerate via sdk-generator
4
+ import { z } from 'zod';
5
+ //RetrySegment.retrieve
6
+ const RetrieveRetrySegmentBodySchema = z.looseObject({
7
+ invoice_id: z.string().max(50).optional(),
8
+ });
9
+ export { RetrieveRetrySegmentBodySchema };
@@ -884,7 +884,7 @@ const CreateWithItemsSubscriptionSubscriptionItemsSchema = z.object({
884
884
  billing_cycles: z.array(z.number().int().min(0).optional()).optional(),
885
885
  trial_end: z.array(z.number().int().optional()).optional(),
886
886
  service_period_days: z
887
- .array(z.number().int().min(1).max(730).optional())
887
+ .array(z.number().int().min(1).max(4000).optional())
888
888
  .optional(),
889
889
  charge_on_event: z
890
890
  .array(z
@@ -2215,7 +2215,7 @@ const UpdateForItemsSubscriptionSubscriptionItemsSchema = z.object({
2215
2215
  billing_cycles: z.array(z.number().int().min(0).optional()).optional(),
2216
2216
  trial_end: z.array(z.number().int().optional()).optional(),
2217
2217
  service_period_days: z
2218
- .array(z.number().int().min(1).max(730).optional())
2218
+ .array(z.number().int().min(1).max(4000).optional())
2219
2219
  .optional(),
2220
2220
  charge_on_event: z
2221
2221
  .array(z
@@ -3286,7 +3286,7 @@ const ImportForItemsSubscriptionSubscriptionItemsSchema = z.object({
3286
3286
  billing_cycles: z.array(z.number().int().min(0).optional()).optional(),
3287
3287
  trial_end: z.array(z.number().int().optional()).optional(),
3288
3288
  service_period_days: z
3289
- .array(z.number().int().min(1).max(730).optional())
3289
+ .array(z.number().int().min(1).max(4000).optional())
3290
3290
  .optional(),
3291
3291
  charge_on_event: z
3292
3292
  .array(z
@@ -3459,7 +3459,7 @@ const CancelForItemsSubscriptionSubscriptionItemsSchema = z.object({
3459
3459
  unit_price: z.array(z.number().int().min(0).optional()).optional(),
3460
3460
  unit_price_in_decimal: z.array(z.string().max(39).optional()).optional(),
3461
3461
  service_period_days: z
3462
- .array(z.number().int().min(1).max(730).optional())
3462
+ .array(z.number().int().min(1).max(4000).optional())
3463
3463
  .optional(),
3464
3464
  });
3465
3465
  const CancelForItemsSubscriptionBodySchema = z.looseObject({
@@ -83,8 +83,13 @@ export { ListUsageBodySchema };
83
83
  const PdfUsageInvoiceSchema = z.object({
84
84
  id: z.string().max(50),
85
85
  });
86
+ const PdfUsageGroupBySchema = z.object({
87
+ feature_id: z.array(z.string().max(100).optional()).optional(),
88
+ attributes: z.array(z.array(z.string().optional()).optional()).optional(),
89
+ });
86
90
  const PdfUsageBodySchema = z.looseObject({
87
91
  disposition_type: z.enum(['attachment', 'inline']).optional(),
88
92
  invoice: PdfUsageInvoiceSchema.optional(),
93
+ group_by: PdfUsageGroupBySchema.optional(),
89
94
  });
90
95
  export { PdfUsageBodySchema };
@@ -10,5 +10,6 @@ const RetrieveUsageSummaryForSubscriptionUsageSummaryBodySchema = z.looseObject(
10
10
  window_size: z.enum(['month', 'week', 'day', 'hour', 'minute']).optional(),
11
11
  timeframe_start: z.number().int().optional(),
12
12
  timeframe_end: z.number().int().optional(),
13
+ group_by: z.array(z.string().max(100).optional()).optional(),
13
14
  });
14
15
  export { RetrieveUsageSummaryForSubscriptionUsageSummaryBodySchema };
@@ -82,6 +82,7 @@ const CreateWebhookEndpointBodySchema = z.looseObject({
82
82
  'payment_schedules_updated',
83
83
  'payment_schedule_scheme_created',
84
84
  'payment_schedule_scheme_deleted',
85
+ 'payment_schedules_cancelled',
85
86
  'subscription_renewal_reminder',
86
87
  'add_usages_reminder',
87
88
  'payment_due_reminder',
@@ -92,6 +93,7 @@ const CreateWebhookEndpointBodySchema = z.looseObject({
92
93
  'payment_failed',
93
94
  'dunning_updated',
94
95
  'payment_refunded',
96
+ 'refund_failed',
95
97
  'payment_initiated',
96
98
  'refund_initiated',
97
99
  'netd_payment_due_reminder',
@@ -243,6 +245,9 @@ const CreateWebhookEndpointBodySchema = z.looseObject({
243
245
  'alert_status_changed',
244
246
  'omnichannel_subscription_item_updated',
245
247
  'omnichannel_subscription_item_recovered',
248
+ 'price_ramp_created',
249
+ 'price_ramp_updated',
250
+ 'price_ramp_deleted',
246
251
  'omnichannel_subscription_item_mrr_updated',
247
252
  'ledger_account_balance_updated',
248
253
  'grant_blocks_created',
@@ -257,12 +262,29 @@ const CreateWebhookEndpointBodySchema = z.looseObject({
257
262
  'vault_token_created',
258
263
  'vault_token_updated',
259
264
  'vault_token_deleted',
260
- 'business_rules_applied',
265
+ 'chargeback_initiated',
266
+ 'chargeback_won',
267
+ 'chargeback_lost',
261
268
  'business_ruleset_created',
262
269
  'business_ruleset_updated',
263
270
  'business_ruleset_activated',
264
271
  'business_ruleset_deactivated',
265
272
  'business_ruleset_deleted',
273
+ 'collections_reminder_sequence_created',
274
+ 'collections_reminder_sequence_paused',
275
+ 'collections_reminder_sequence_resumed',
276
+ 'collections_reminder_sequence_completed',
277
+ 'collections_payment_promise_created',
278
+ 'collections_payment_promise_updated',
279
+ 'collections_payment_promise_fulfilled',
280
+ 'collections_payment_promise_cancelled',
281
+ 'collections_payment_promise_broken',
282
+ 'collections_dispute_created',
283
+ 'collections_dispute_updated',
284
+ 'collections_dispute_resolved',
285
+ 'collections_dispute_withdrawn',
286
+ 'email_message_received',
287
+ 'private_note_added',
266
288
  'plan_created',
267
289
  'plan_updated',
268
290
  'plan_deleted',
@@ -351,6 +373,7 @@ const UpdateWebhookEndpointBodySchema = z.looseObject({
351
373
  'payment_schedules_updated',
352
374
  'payment_schedule_scheme_created',
353
375
  'payment_schedule_scheme_deleted',
376
+ 'payment_schedules_cancelled',
354
377
  'subscription_renewal_reminder',
355
378
  'add_usages_reminder',
356
379
  'payment_due_reminder',
@@ -361,6 +384,7 @@ const UpdateWebhookEndpointBodySchema = z.looseObject({
361
384
  'payment_failed',
362
385
  'dunning_updated',
363
386
  'payment_refunded',
387
+ 'refund_failed',
364
388
  'payment_initiated',
365
389
  'refund_initiated',
366
390
  'netd_payment_due_reminder',
@@ -512,6 +536,9 @@ const UpdateWebhookEndpointBodySchema = z.looseObject({
512
536
  'alert_status_changed',
513
537
  'omnichannel_subscription_item_updated',
514
538
  'omnichannel_subscription_item_recovered',
539
+ 'price_ramp_created',
540
+ 'price_ramp_updated',
541
+ 'price_ramp_deleted',
515
542
  'omnichannel_subscription_item_mrr_updated',
516
543
  'ledger_account_balance_updated',
517
544
  'grant_blocks_created',
@@ -526,12 +553,29 @@ const UpdateWebhookEndpointBodySchema = z.looseObject({
526
553
  'vault_token_created',
527
554
  'vault_token_updated',
528
555
  'vault_token_deleted',
529
- 'business_rules_applied',
556
+ 'chargeback_initiated',
557
+ 'chargeback_won',
558
+ 'chargeback_lost',
530
559
  'business_ruleset_created',
531
560
  'business_ruleset_updated',
532
561
  'business_ruleset_activated',
533
562
  'business_ruleset_deactivated',
534
563
  'business_ruleset_deleted',
564
+ 'collections_reminder_sequence_created',
565
+ 'collections_reminder_sequence_paused',
566
+ 'collections_reminder_sequence_resumed',
567
+ 'collections_reminder_sequence_completed',
568
+ 'collections_payment_promise_created',
569
+ 'collections_payment_promise_updated',
570
+ 'collections_payment_promise_fulfilled',
571
+ 'collections_payment_promise_cancelled',
572
+ 'collections_payment_promise_broken',
573
+ 'collections_dispute_created',
574
+ 'collections_dispute_updated',
575
+ 'collections_dispute_resolved',
576
+ 'collections_dispute_withdrawn',
577
+ 'email_message_received',
578
+ 'private_note_added',
535
579
  'plan_created',
536
580
  'plan_updated',
537
581
  'plan_deleted',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chargebee",
3
- "version": "3.34.0",
3
+ "version": "3.35.0",
4
4
  "description": "A library for integrating with Chargebee.",
5
5
  "scripts": {
6
6
  "prepack": "npm ci && npm run build",
package/types/core.d.ts CHANGED
@@ -132,12 +132,12 @@ declare module 'chargebee' {
132
132
  | 'plan_price'
133
133
  | 'addon_price'
134
134
  | 'charge_price'
135
+ | 'addon'
135
136
  | 'invoice'
136
137
  | 'quote'
137
138
  | 'credit_note'
138
139
  | 'transaction'
139
140
  | 'plan'
140
- | 'addon'
141
141
  | 'order'
142
142
  | 'item_family'
143
143
  | 'item'
@@ -165,7 +165,8 @@ declare module 'chargebee' {
165
165
  | 'business_ruleset'
166
166
  | 'alert_status'
167
167
  | 'omnichannel_subscription_item_metric'
168
- | 'price_ramp';
168
+ | 'price_ramp'
169
+ | 'task';
169
170
  type EventNameEnum = 'cancellation_page_loaded';
170
171
  type EventTypeEnum =
171
172
  | 'coupon_created'
@@ -232,6 +233,7 @@ declare module 'chargebee' {
232
233
  | 'payment_schedules_updated'
233
234
  | 'payment_schedule_scheme_created'
234
235
  | 'payment_schedule_scheme_deleted'
236
+ | 'payment_schedules_cancelled'
235
237
  | 'subscription_renewal_reminder'
236
238
  | 'add_usages_reminder'
237
239
  | 'payment_due_reminder'
@@ -242,6 +244,7 @@ declare module 'chargebee' {
242
244
  | 'payment_failed'
243
245
  | 'dunning_updated'
244
246
  | 'payment_refunded'
247
+ | 'refund_failed'
245
248
  | 'payment_initiated'
246
249
  | 'refund_initiated'
247
250
  | 'authorization_succeeded'
@@ -384,6 +387,9 @@ declare module 'chargebee' {
384
387
  | 'alert_status_changed'
385
388
  | 'omnichannel_subscription_item_updated'
386
389
  | 'omnichannel_subscription_item_recovered'
390
+ | 'price_ramp_created'
391
+ | 'price_ramp_updated'
392
+ | 'price_ramp_deleted'
387
393
  | 'omnichannel_subscription_item_mrr_updated'
388
394
  | 'ledger_account_balance_updated'
389
395
  | 'grant_blocks_created'
@@ -398,12 +404,29 @@ declare module 'chargebee' {
398
404
  | 'vault_token_created'
399
405
  | 'vault_token_updated'
400
406
  | 'vault_token_deleted'
401
- | 'business_rules_applied'
407
+ | 'chargeback_initiated'
408
+ | 'chargeback_won'
409
+ | 'chargeback_lost'
402
410
  | 'business_ruleset_created'
403
411
  | 'business_ruleset_updated'
404
412
  | 'business_ruleset_activated'
405
413
  | 'business_ruleset_deactivated'
406
414
  | 'business_ruleset_deleted'
415
+ | 'collections_reminder_sequence_created'
416
+ | 'collections_reminder_sequence_paused'
417
+ | 'collections_reminder_sequence_resumed'
418
+ | 'collections_reminder_sequence_completed'
419
+ | 'collections_payment_promise_created'
420
+ | 'collections_payment_promise_updated'
421
+ | 'collections_payment_promise_fulfilled'
422
+ | 'collections_payment_promise_cancelled'
423
+ | 'collections_payment_promise_broken'
424
+ | 'collections_dispute_created'
425
+ | 'collections_dispute_updated'
426
+ | 'collections_dispute_resolved'
427
+ | 'collections_dispute_withdrawn'
428
+ | 'email_message_received'
429
+ | 'private_note_added'
407
430
  | 'plan_created'
408
431
  | 'plan_updated'
409
432
  | 'plan_deleted'
@@ -477,69 +500,6 @@ declare module 'chargebee' {
477
500
  | 'payu'
478
501
  | 'gocardless'
479
502
  | 'not_applicable';
480
- type GatewayNameEnum =
481
- | 'chargebee'
482
- | 'chargebee_payments'
483
- | 'adyen'
484
- | 'stripe'
485
- | 'wepay'
486
- | 'braintree'
487
- | 'authorize_net'
488
- | 'paypal_pro'
489
- | 'pin'
490
- | 'eway'
491
- | 'eway_rapid'
492
- | 'worldpay'
493
- | 'balanced_payments'
494
- | 'beanstream'
495
- | 'bluepay'
496
- | 'elavon'
497
- | 'first_data_global'
498
- | 'hdfc'
499
- | 'migs'
500
- | 'nmi'
501
- | 'ogone'
502
- | 'paymill'
503
- | 'paypal_payflow_pro'
504
- | 'sage_pay'
505
- | 'tco'
506
- | 'wirecard'
507
- | 'amazon_payments'
508
- | 'paypal_express_checkout'
509
- | 'gocardless'
510
- | 'orbital'
511
- | 'moneris_us'
512
- | 'moneris'
513
- | 'bluesnap'
514
- | 'cybersource'
515
- | 'vantiv'
516
- | 'checkout_com'
517
- | 'paypal'
518
- | 'ingenico_direct'
519
- | 'exact'
520
- | 'mollie'
521
- | 'quickbooks'
522
- | 'razorpay'
523
- | 'global_payments'
524
- | 'bank_of_america'
525
- | 'ecentric'
526
- | 'metrics_global'
527
- | 'windcave'
528
- | 'pay_com'
529
- | 'ebanx'
530
- | 'dlocal'
531
- | 'nuvei'
532
- | 'solidgate'
533
- | 'paystack'
534
- | 'jp_morgan'
535
- | 'deutsche_bank'
536
- | 'ezidebit'
537
- | 'twikey'
538
- | 'tempus'
539
- | 'moyasar'
540
- | 'payway'
541
- | 'payu'
542
- | 'not_applicable';
543
503
  type HierarchyOperationTypeEnum =
544
504
  | 'complete_hierarchy'
545
505
  | 'subordinates'
@@ -764,7 +724,10 @@ declare module 'chargebee' {
764
724
  | 'none'
765
725
  | 'js_api'
766
726
  | 'migration'
767
- | 'external_service';
727
+ | 'external_service'
728
+ | 'mcp'
729
+ | 'copilot'
730
+ | 'agent';
768
731
  type StatusEnum =
769
732
  | 'scheduled'
770
733
  | 'rescheduled'
@@ -977,6 +940,7 @@ declare module 'chargebee' {
977
940
  | 'payment_schedules_updated'
978
941
  | 'payment_schedule_scheme_created'
979
942
  | 'payment_schedule_scheme_deleted'
943
+ | 'payment_schedules_cancelled'
980
944
  | 'subscription_renewal_reminder'
981
945
  | 'add_usages_reminder'
982
946
  | 'payment_due_reminder'
@@ -987,6 +951,7 @@ declare module 'chargebee' {
987
951
  | 'payment_failed'
988
952
  | 'dunning_updated'
989
953
  | 'payment_refunded'
954
+ | 'refund_failed'
990
955
  | 'payment_initiated'
991
956
  | 'refund_initiated'
992
957
  | 'authorization_succeeded'
@@ -1129,6 +1094,9 @@ declare module 'chargebee' {
1129
1094
  | 'alert_status_changed'
1130
1095
  | 'omnichannel_subscription_item_updated'
1131
1096
  | 'omnichannel_subscription_item_recovered'
1097
+ | 'price_ramp_created'
1098
+ | 'price_ramp_updated'
1099
+ | 'price_ramp_deleted'
1132
1100
  | 'omnichannel_subscription_item_mrr_updated'
1133
1101
  | 'ledger_account_balance_updated'
1134
1102
  | 'grant_blocks_created'
@@ -1143,12 +1111,29 @@ declare module 'chargebee' {
1143
1111
  | 'vault_token_created'
1144
1112
  | 'vault_token_updated'
1145
1113
  | 'vault_token_deleted'
1146
- | 'business_rules_applied'
1114
+ | 'chargeback_initiated'
1115
+ | 'chargeback_won'
1116
+ | 'chargeback_lost'
1147
1117
  | 'business_ruleset_created'
1148
1118
  | 'business_ruleset_updated'
1149
1119
  | 'business_ruleset_activated'
1150
1120
  | 'business_ruleset_deactivated'
1151
1121
  | 'business_ruleset_deleted'
1122
+ | 'collections_reminder_sequence_created'
1123
+ | 'collections_reminder_sequence_paused'
1124
+ | 'collections_reminder_sequence_resumed'
1125
+ | 'collections_reminder_sequence_completed'
1126
+ | 'collections_payment_promise_created'
1127
+ | 'collections_payment_promise_updated'
1128
+ | 'collections_payment_promise_fulfilled'
1129
+ | 'collections_payment_promise_cancelled'
1130
+ | 'collections_payment_promise_broken'
1131
+ | 'collections_dispute_created'
1132
+ | 'collections_dispute_updated'
1133
+ | 'collections_dispute_resolved'
1134
+ | 'collections_dispute_withdrawn'
1135
+ | 'email_message_received'
1136
+ | 'private_note_added'
1152
1137
  | 'plan_created'
1153
1138
  | 'plan_updated'
1154
1139
  | 'plan_deleted'