chargebee 3.30.1 → 3.31.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 (70) hide show
  1. package/CHANGELOG.md +69 -0
  2. package/cjs/environment.js +1 -1
  3. package/cjs/resources/api_endpoints.js +84 -2
  4. package/cjs/resources/webhook/eventType.js +4 -0
  5. package/cjs/schema/coupon.schema.js +1 -1
  6. package/cjs/schema/credit_note.schema.js +7 -2
  7. package/cjs/schema/credit_unit.schema.js +2 -2
  8. package/cjs/schema/entitlement.schema.js +4 -4
  9. package/cjs/schema/entitlement_override.schema.js +1 -1
  10. package/cjs/schema/estimate.schema.js +2 -2
  11. package/cjs/schema/event.schema.js +16 -0
  12. package/cjs/schema/export.schema.js +35 -3
  13. package/cjs/schema/hosted_page.schema.js +1 -0
  14. package/cjs/schema/index.js +1 -0
  15. package/cjs/schema/invoice.schema.js +11 -4
  16. package/cjs/schema/ledger_operation.schema.js +2 -2
  17. package/cjs/schema/meter.schema.js +1 -1
  18. package/cjs/schema/omnichannel_subscription.schema.js +6 -2
  19. package/cjs/schema/payment_intent.schema.js +4 -0
  20. package/cjs/schema/payment_source.schema.js +9 -2
  21. package/cjs/schema/pricing_page_session.schema.js +1 -1
  22. package/cjs/schema/quote.schema.js +60 -0
  23. package/cjs/schema/quote_entitlement.schema.js +25 -0
  24. package/cjs/schema/ramp.schema.js +2 -2
  25. package/cjs/schema/subscription.schema.js +2 -2
  26. package/cjs/schema/webhook_endpoint.schema.js +8 -0
  27. package/esm/environment.js +1 -1
  28. package/esm/resources/api_endpoints.js +84 -2
  29. package/esm/resources/webhook/eventType.js +4 -0
  30. package/esm/schema/coupon.schema.js +1 -1
  31. package/esm/schema/credit_note.schema.js +6 -1
  32. package/esm/schema/credit_unit.schema.js +2 -2
  33. package/esm/schema/entitlement.schema.js +4 -4
  34. package/esm/schema/entitlement_override.schema.js +1 -1
  35. package/esm/schema/estimate.schema.js +2 -2
  36. package/esm/schema/event.schema.js +16 -0
  37. package/esm/schema/export.schema.js +34 -2
  38. package/esm/schema/hosted_page.schema.js +1 -0
  39. package/esm/schema/index.js +1 -0
  40. package/esm/schema/invoice.schema.js +10 -3
  41. package/esm/schema/ledger_operation.schema.js +2 -2
  42. package/esm/schema/meter.schema.js +1 -1
  43. package/esm/schema/omnichannel_subscription.schema.js +6 -2
  44. package/esm/schema/payment_intent.schema.js +4 -0
  45. package/esm/schema/payment_source.schema.js +8 -1
  46. package/esm/schema/pricing_page_session.schema.js +1 -1
  47. package/esm/schema/quote.schema.js +60 -0
  48. package/esm/schema/quote_entitlement.schema.js +22 -0
  49. package/esm/schema/ramp.schema.js +2 -2
  50. package/esm/schema/subscription.schema.js +2 -2
  51. package/esm/schema/webhook_endpoint.schema.js +8 -0
  52. package/package.json +2 -2
  53. package/types/core.d.ts +78 -3
  54. package/types/index.d.ts +6 -0
  55. package/types/resources/Content.d.ts +4 -0
  56. package/types/resources/CreditNote.d.ts +14 -0
  57. package/types/resources/Event.d.ts +4 -0
  58. package/types/resources/Export.d.ts +20 -0
  59. package/types/resources/GatewayPaymentMethodToken.d.ts +15 -0
  60. package/types/resources/HostedPage.d.ts +1 -0
  61. package/types/resources/Invoice.d.ts +17 -1
  62. package/types/resources/OmnichannelSubscriptionItemMetric.d.ts +18 -0
  63. package/types/resources/PaymentIntent.d.ts +14 -11
  64. package/types/resources/PaymentSource.d.ts +17 -0
  65. package/types/resources/PricingPageSession.d.ts +1 -1
  66. package/types/resources/Quote.d.ts +45 -0
  67. package/types/resources/QuoteEntitlement.d.ts +49 -0
  68. package/types/resources/QuotedRamp.d.ts +1 -0
  69. package/types/resources/VaultedPaymentMethod.d.ts +28 -0
  70. package/types/resources/WebhookEvent.d.ts +24 -0
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  // Generated Zod schemas: PaymentSource
3
- // Actions: createUsingTempToken, createUsingPermanentToken, createUsingToken, createUsingPaymentIntent, createVoucherPaymentSource, createCard, createBankAccount, updateCard, updateBankAccount, verifyBankAccount, list, switchGatewayAccount, exportPaymentSource
3
+ // Actions: createUsingTempToken, createUsingPermanentToken, createUsingToken, createUsingPaymentIntent, createVoucherPaymentSource, createCard, createBankAccount, updateCard, updateBankAccount, verifyBankAccount, listGatewayTokensForPaymentSource, list, switchGatewayAccount, exportPaymentSource
4
4
  // Do not edit manually – regenerate via sdk-generator
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.ExportPaymentSourcePaymentSourceBodySchema = exports.SwitchGatewayAccountPaymentSourceBodySchema = exports.ListPaymentSourceBodySchema = exports.VerifyBankAccountPaymentSourceBodySchema = exports.UpdateBankAccountPaymentSourceBodySchema = exports.UpdateCardPaymentSourceBodySchema = exports.CreateBankAccountPaymentSourceBodySchema = exports.CreateCardPaymentSourceBodySchema = exports.CreateVoucherPaymentSourcePaymentSourceBodySchema = exports.CreateUsingPaymentIntentPaymentSourceBodySchema = exports.CreateUsingTokenPaymentSourceBodySchema = exports.CreateUsingPermanentTokenPaymentSourceBodySchema = exports.CreateUsingTempTokenPaymentSourceBodySchema = void 0;
6
+ exports.ExportPaymentSourcePaymentSourceBodySchema = exports.SwitchGatewayAccountPaymentSourceBodySchema = exports.ListPaymentSourceBodySchema = exports.ListGatewayTokensForPaymentSourcePaymentSourceBodySchema = exports.VerifyBankAccountPaymentSourceBodySchema = exports.UpdateBankAccountPaymentSourceBodySchema = exports.UpdateCardPaymentSourceBodySchema = exports.CreateBankAccountPaymentSourceBodySchema = exports.CreateCardPaymentSourceBodySchema = exports.CreateVoucherPaymentSourcePaymentSourceBodySchema = exports.CreateUsingPaymentIntentPaymentSourceBodySchema = exports.CreateUsingTokenPaymentSourceBodySchema = exports.CreateUsingPermanentTokenPaymentSourceBodySchema = exports.CreateUsingTempTokenPaymentSourceBodySchema = void 0;
7
7
  const zod_1 = require("zod");
8
8
  //PaymentSource.createUsingTempToken
9
9
  const CreateUsingTempTokenPaymentSourceAdditionalInformationSchema = zod_1.z.looseObject({});
@@ -382,6 +382,13 @@ const VerifyBankAccountPaymentSourceBodySchema = zod_1.z.looseObject({
382
382
  amount2: zod_1.z.number().int().min(0),
383
383
  });
384
384
  exports.VerifyBankAccountPaymentSourceBodySchema = VerifyBankAccountPaymentSourceBodySchema;
385
+ //PaymentSource.listGatewayTokensForPaymentSource
386
+ const ListGatewayTokensForPaymentSourcePaymentSourceBodySchema = zod_1.z.looseObject({
387
+ limit: zod_1.z.number().int().min(1).max(100).optional(),
388
+ offset: zod_1.z.string().max(1000).optional(),
389
+ include_deleted: zod_1.z.boolean().default(false).optional(),
390
+ });
391
+ exports.ListGatewayTokensForPaymentSourcePaymentSourceBodySchema = ListGatewayTokensForPaymentSourcePaymentSourceBodySchema;
385
392
  //PaymentSource.list
386
393
  const ListPaymentSourceCustomerIdSchema = zod_1.z.object({
387
394
  is: zod_1.z.string().min(1).optional(),
@@ -8,7 +8,7 @@ const zod_1 = require("zod");
8
8
  //PricingPageSession.createForNewSubscription
9
9
  const CreateForNewSubscriptionPricingPageSessionCustomSchema = zod_1.z.looseObject({});
10
10
  const CreateForNewSubscriptionPricingPageSessionPricingPageSchema = zod_1.z.object({
11
- id: zod_1.z.string().max(50),
11
+ id: zod_1.z.string().max(50).optional(),
12
12
  });
13
13
  const CreateForNewSubscriptionPricingPageSessionSubscriptionSchema = zod_1.z.looseObject({
14
14
  id: zod_1.z.string().max(50).optional(),
@@ -720,6 +720,7 @@ const CreateSubItemsForCustomerQuoteQuoteSubscriptionItemsSchema = zod_1.z.objec
720
720
  .optional(),
721
721
  start_date: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
722
722
  end_date: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
723
+ description: zod_1.z.array(zod_1.z.string().max(2000).optional()).optional(),
723
724
  ramp_tier_id: zod_1.z.array(zod_1.z.string().max(105).optional()).optional(),
724
725
  });
725
726
  const CreateSubItemsForCustomerQuoteQuoteDiscountsSchema = zod_1.z.object({
@@ -758,6 +759,19 @@ const CreateSubItemsForCustomerQuoteQuoteCouponsSchema = zod_1.z.object({
758
759
  start_date: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
759
760
  end_date: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
760
761
  });
762
+ const CreateSubItemsForCustomerQuoteQuoteEntitlementOverridesSchema = zod_1.z.object({
763
+ feature_id: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
764
+ entity_id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
765
+ entity_type: zod_1.z
766
+ .array(zod_1.z
767
+ .enum(['plan_price', 'addon_price', 'charge_price', 'charge'])
768
+ .optional())
769
+ .optional(),
770
+ value: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
771
+ is_enabled: zod_1.z.array(zod_1.z.boolean().optional()).optional(),
772
+ start_date: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
773
+ end_date: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
774
+ });
761
775
  const CreateSubItemsForCustomerQuoteQuoteBodySchema = zod_1.z.looseObject({
762
776
  name: zod_1.z.string().max(100).optional(),
763
777
  notes: zod_1.z.string().max(10000).optional(),
@@ -777,6 +791,7 @@ const CreateSubItemsForCustomerQuoteQuoteBodySchema = zod_1.z.looseObject({
777
791
  discounts: CreateSubItemsForCustomerQuoteQuoteDiscountsSchema.optional(),
778
792
  item_tiers: CreateSubItemsForCustomerQuoteQuoteItemTiersSchema.optional(),
779
793
  coupons: CreateSubItemsForCustomerQuoteQuoteCouponsSchema.optional(),
794
+ entitlement_overrides: CreateSubItemsForCustomerQuoteQuoteEntitlementOverridesSchema.optional(),
780
795
  });
781
796
  exports.CreateSubItemsForCustomerQuoteQuoteBodySchema = CreateSubItemsForCustomerQuoteQuoteBodySchema;
782
797
  //Quote.editCreateSubCustomerQuoteForItems
@@ -883,6 +898,7 @@ const EditCreateSubCustomerQuoteForItemsQuoteSubscriptionItemsSchema = zod_1.z.o
883
898
  .optional(),
884
899
  start_date: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
885
900
  end_date: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
901
+ description: zod_1.z.array(zod_1.z.string().max(2000).optional()).optional(),
886
902
  ramp_tier_id: zod_1.z.array(zod_1.z.string().max(105).optional()).optional(),
887
903
  });
888
904
  const EditCreateSubCustomerQuoteForItemsQuoteDiscountsSchema = zod_1.z.object({
@@ -921,6 +937,19 @@ const EditCreateSubCustomerQuoteForItemsQuoteCouponsSchema = zod_1.z.object({
921
937
  start_date: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
922
938
  end_date: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
923
939
  });
940
+ const EditCreateSubCustomerQuoteForItemsQuoteEntitlementOverridesSchema = zod_1.z.object({
941
+ feature_id: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
942
+ entity_id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
943
+ entity_type: zod_1.z
944
+ .array(zod_1.z
945
+ .enum(['plan_price', 'addon_price', 'charge_price', 'charge'])
946
+ .optional())
947
+ .optional(),
948
+ value: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
949
+ is_enabled: zod_1.z.array(zod_1.z.boolean().optional()).optional(),
950
+ start_date: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
951
+ end_date: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
952
+ });
924
953
  const EditCreateSubCustomerQuoteForItemsQuoteBodySchema = zod_1.z.looseObject({
925
954
  notes: zod_1.z.string().max(10000).optional(),
926
955
  expires_at: zod_1.z.number().int().optional(),
@@ -939,6 +968,7 @@ const EditCreateSubCustomerQuoteForItemsQuoteBodySchema = zod_1.z.looseObject({
939
968
  discounts: EditCreateSubCustomerQuoteForItemsQuoteDiscountsSchema.optional(),
940
969
  item_tiers: EditCreateSubCustomerQuoteForItemsQuoteItemTiersSchema.optional(),
941
970
  coupons: EditCreateSubCustomerQuoteForItemsQuoteCouponsSchema.optional(),
971
+ entitlement_overrides: EditCreateSubCustomerQuoteForItemsQuoteEntitlementOverridesSchema.optional(),
942
972
  });
943
973
  exports.EditCreateSubCustomerQuoteForItemsQuoteBodySchema = EditCreateSubCustomerQuoteForItemsQuoteBodySchema;
944
974
  //Quote.updateSubscriptionQuoteForItems
@@ -1049,6 +1079,7 @@ const UpdateSubscriptionQuoteForItemsQuoteSubscriptionItemsSchema = zod_1.z.obje
1049
1079
  item_type: zod_1.z.array(zod_1.z.enum(['plan', 'addon', 'charge']).optional()).optional(),
1050
1080
  start_date: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
1051
1081
  end_date: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
1082
+ description: zod_1.z.array(zod_1.z.string().max(2000).optional()).optional(),
1052
1083
  ramp_tier_id: zod_1.z.array(zod_1.z.string().max(105).optional()).optional(),
1053
1084
  });
1054
1085
  const UpdateSubscriptionQuoteForItemsQuoteDiscountsSchema = zod_1.z.object({
@@ -1089,6 +1120,19 @@ const UpdateSubscriptionQuoteForItemsQuoteCouponsSchema = zod_1.z.object({
1089
1120
  start_date: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
1090
1121
  end_date: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
1091
1122
  });
1123
+ const UpdateSubscriptionQuoteForItemsQuoteEntitlementOverridesSchema = zod_1.z.object({
1124
+ feature_id: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
1125
+ entity_id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
1126
+ entity_type: zod_1.z
1127
+ .array(zod_1.z
1128
+ .enum(['plan_price', 'addon_price', 'charge_price', 'charge'])
1129
+ .optional())
1130
+ .optional(),
1131
+ value: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
1132
+ is_enabled: zod_1.z.array(zod_1.z.boolean().optional()).optional(),
1133
+ start_date: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
1134
+ end_date: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
1135
+ });
1092
1136
  const UpdateSubscriptionQuoteForItemsQuoteBodySchema = zod_1.z.looseObject({
1093
1137
  name: zod_1.z.string().max(100).optional(),
1094
1138
  notes: zod_1.z.string().max(10000).optional(),
@@ -1115,6 +1159,7 @@ const UpdateSubscriptionQuoteForItemsQuoteBodySchema = zod_1.z.looseObject({
1115
1159
  discounts: UpdateSubscriptionQuoteForItemsQuoteDiscountsSchema.optional(),
1116
1160
  item_tiers: UpdateSubscriptionQuoteForItemsQuoteItemTiersSchema.optional(),
1117
1161
  coupons: UpdateSubscriptionQuoteForItemsQuoteCouponsSchema.optional(),
1162
+ entitlement_overrides: UpdateSubscriptionQuoteForItemsQuoteEntitlementOverridesSchema.optional(),
1118
1163
  });
1119
1164
  exports.UpdateSubscriptionQuoteForItemsQuoteBodySchema = UpdateSubscriptionQuoteForItemsQuoteBodySchema;
1120
1165
  //Quote.editUpdateSubscriptionQuoteForItems
@@ -1226,6 +1271,7 @@ const EditUpdateSubscriptionQuoteForItemsQuoteSubscriptionItemsSchema = zod_1.z.
1226
1271
  .optional(),
1227
1272
  start_date: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
1228
1273
  end_date: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
1274
+ description: zod_1.z.array(zod_1.z.string().max(2000).optional()).optional(),
1229
1275
  ramp_tier_id: zod_1.z.array(zod_1.z.string().max(105).optional()).optional(),
1230
1276
  });
1231
1277
  const EditUpdateSubscriptionQuoteForItemsQuoteDiscountsSchema = zod_1.z.object({
@@ -1266,6 +1312,19 @@ const EditUpdateSubscriptionQuoteForItemsQuoteCouponsSchema = zod_1.z.object({
1266
1312
  start_date: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
1267
1313
  end_date: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
1268
1314
  });
1315
+ const EditUpdateSubscriptionQuoteForItemsQuoteEntitlementOverridesSchema = zod_1.z.object({
1316
+ feature_id: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
1317
+ entity_id: zod_1.z.array(zod_1.z.string().max(100).optional()).optional(),
1318
+ entity_type: zod_1.z
1319
+ .array(zod_1.z
1320
+ .enum(['plan_price', 'addon_price', 'charge_price', 'charge'])
1321
+ .optional())
1322
+ .optional(),
1323
+ value: zod_1.z.array(zod_1.z.string().max(50).optional()).optional(),
1324
+ is_enabled: zod_1.z.array(zod_1.z.boolean().optional()).optional(),
1325
+ start_date: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
1326
+ end_date: zod_1.z.array(zod_1.z.number().int().optional()).optional(),
1327
+ });
1269
1328
  const EditUpdateSubscriptionQuoteForItemsQuoteBodySchema = zod_1.z.looseObject({
1270
1329
  notes: zod_1.z.string().max(10000).optional(),
1271
1330
  expires_at: zod_1.z.number().int().optional(),
@@ -1291,6 +1350,7 @@ const EditUpdateSubscriptionQuoteForItemsQuoteBodySchema = zod_1.z.looseObject({
1291
1350
  discounts: EditUpdateSubscriptionQuoteForItemsQuoteDiscountsSchema.optional(),
1292
1351
  item_tiers: EditUpdateSubscriptionQuoteForItemsQuoteItemTiersSchema.optional(),
1293
1352
  coupons: EditUpdateSubscriptionQuoteForItemsQuoteCouponsSchema.optional(),
1353
+ entitlement_overrides: EditUpdateSubscriptionQuoteForItemsQuoteEntitlementOverridesSchema.optional(),
1294
1354
  });
1295
1355
  exports.EditUpdateSubscriptionQuoteForItemsQuoteBodySchema = EditUpdateSubscriptionQuoteForItemsQuoteBodySchema;
1296
1356
  //Quote.createForChargeItemsAndCharges
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ // Generated Zod schemas: QuoteEntitlement
3
+ // Actions: listQuoteEntitlements
4
+ // Do not edit manually – regenerate via sdk-generator
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ListQuoteEntitlementsQuoteEntitlementBodySchema = void 0;
7
+ const zod_1 = require("zod");
8
+ //QuoteEntitlement.listQuoteEntitlements
9
+ const ListQuoteEntitlementsQuoteEntitlementEntityIdSchema = zod_1.z.object({
10
+ is: zod_1.z.string().min(1).optional(),
11
+ });
12
+ const ListQuoteEntitlementsQuoteEntitlementStartDateSchema = zod_1.z.object({
13
+ on: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
14
+ });
15
+ const ListQuoteEntitlementsQuoteEntitlementEndDateSchema = zod_1.z.object({
16
+ on: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
17
+ });
18
+ const ListQuoteEntitlementsQuoteEntitlementBodySchema = zod_1.z.looseObject({
19
+ limit: zod_1.z.number().int().min(1).max(100).optional(),
20
+ offset: zod_1.z.string().max(1000).optional(),
21
+ entity_id: ListQuoteEntitlementsQuoteEntitlementEntityIdSchema.optional(),
22
+ start_date: ListQuoteEntitlementsQuoteEntitlementStartDateSchema.optional(),
23
+ end_date: ListQuoteEntitlementsQuoteEntitlementEndDateSchema.optional(),
24
+ });
25
+ exports.ListQuoteEntitlementsQuoteEntitlementBodySchema = ListQuoteEntitlementsQuoteEntitlementBodySchema;
@@ -211,12 +211,12 @@ const UpdateRampBodySchema = zod_1.z.looseObject({
211
211
  exports.UpdateRampBodySchema = UpdateRampBodySchema;
212
212
  //Ramp.list
213
213
  const ListRampStatusSchema = zod_1.z.object({
214
- in: zod_1.z.enum(['scheduled', 'succeeded', 'failed', 'draft']).optional(),
215
214
  is: zod_1.z.enum(['scheduled', 'succeeded', 'failed', 'draft']).optional(),
215
+ in: zod_1.z.enum(['scheduled', 'succeeded', 'failed', 'draft']).optional(),
216
216
  });
217
217
  const ListRampSubscriptionIdSchema = zod_1.z.object({
218
- in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
219
218
  is: zod_1.z.string().min(1).optional(),
219
+ in: zod_1.z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
220
220
  });
221
221
  const ListRampEffectiveFromSchema = zod_1.z.object({
222
222
  after: zod_1.z.string().regex(RegExp('^\\d{10}$')).optional(),
@@ -3282,7 +3282,7 @@ const CancelSubscriptionBodySchema = zod_1.z.looseObject({
3282
3282
  end_of_term: zod_1.z.boolean().default(false).optional(),
3283
3283
  cancel_at: zod_1.z.number().int().optional(),
3284
3284
  credit_option_for_current_term_charges: zod_1.z
3285
- .enum(['none', 'prorate', 'full'])
3285
+ .enum(['none', 'prorate', 'full', 'consumption_based'])
3286
3286
  .optional(),
3287
3287
  unbilled_charges_option: zod_1.z.enum(['invoice', 'delete']).optional(),
3288
3288
  account_receivables_handling: zod_1.z
@@ -3327,7 +3327,7 @@ const CancelForItemsSubscriptionBodySchema = zod_1.z.looseObject({
3327
3327
  end_of_term: zod_1.z.boolean().default(false).optional(),
3328
3328
  cancel_at: zod_1.z.number().int().optional(),
3329
3329
  credit_option_for_current_term_charges: zod_1.z
3330
- .enum(['none', 'prorate', 'full'])
3330
+ .enum(['none', 'prorate', 'full', 'consumption_based'])
3331
3331
  .optional(),
3332
3332
  unbilled_charges_option: zod_1.z.enum(['invoice', 'delete']).optional(),
3333
3333
  account_receivables_handling: zod_1.z
@@ -244,10 +244,14 @@ const CreateWebhookEndpointBodySchema = zod_1.z.looseObject({
244
244
  'alert_status_changed',
245
245
  'omnichannel_subscription_item_updated',
246
246
  'omnichannel_subscription_item_recovered',
247
+ 'omnichannel_subscription_item_mrr_updated',
247
248
  'ledger_account_balance_updated',
248
249
  'grant_blocks_created',
249
250
  'grant_blocks_updated',
250
251
  'ledger_updated',
252
+ 'vault_token_created',
253
+ 'vault_token_updated',
254
+ 'vault_token_deleted',
251
255
  'plan_created',
252
256
  'plan_updated',
253
257
  'plan_deleted',
@@ -495,10 +499,14 @@ const UpdateWebhookEndpointBodySchema = zod_1.z.looseObject({
495
499
  'alert_status_changed',
496
500
  'omnichannel_subscription_item_updated',
497
501
  'omnichannel_subscription_item_recovered',
502
+ 'omnichannel_subscription_item_mrr_updated',
498
503
  'ledger_account_balance_updated',
499
504
  'grant_blocks_created',
500
505
  'grant_blocks_updated',
501
506
  'ledger_updated',
507
+ 'vault_token_created',
508
+ 'vault_token_updated',
509
+ 'vault_token_deleted',
502
510
  'plan_created',
503
511
  'plan_updated',
504
512
  'plan_deleted',
@@ -8,7 +8,7 @@ export const Environment = {
8
8
  hostSuffix: '.chargebee.com',
9
9
  apiPath: '/api/v2',
10
10
  timeout: DEFAULT_TIME_OUT,
11
- clientVersion: 'v3.30.1',
11
+ clientVersion: 'v3.31.0',
12
12
  port: DEFAULT_PORT,
13
13
  timemachineWaitInMillis: DEFAULT_TIME_MACHINE_WAIT,
14
14
  exportWaitInMillis: DEFAULT_EXPORT_WAIT,
@@ -944,6 +944,17 @@ export const Endpoints = {
944
944
  isIdempotent: true,
945
945
  },
946
946
  ],
947
+ [
948
+ 'listGatewayTokensForPaymentSource',
949
+ 'GET',
950
+ '/payment_sources',
951
+ '/gateway_payment_method_tokens',
952
+ true,
953
+ null,
954
+ false,
955
+ {},
956
+ {},
957
+ ],
947
958
  ['retrieve', 'GET', '/payment_sources', null, true, null, false, {}, {}],
948
959
  ['list', 'GET', '/payment_sources', null, false, null, false, {}, {}],
949
960
  [
@@ -999,7 +1010,21 @@ export const Endpoints = {
999
1010
  },
1000
1011
  ],
1001
1012
  ],
1013
+ gatewayPaymentMethodToken: [],
1002
1014
  thirdPartyPaymentMethod: [],
1015
+ vaultedPaymentMethod: [
1016
+ [
1017
+ 'retrieve',
1018
+ 'GET',
1019
+ '/vaulted_payment_methods',
1020
+ null,
1021
+ true,
1022
+ null,
1023
+ false,
1024
+ {},
1025
+ {},
1026
+ ],
1027
+ ],
1003
1028
  virtualBankAccount: [
1004
1029
  [
1005
1030
  'createUsingPermanentToken',
@@ -1591,6 +1616,19 @@ export const Endpoints = {
1591
1616
  isIdempotent: true,
1592
1617
  },
1593
1618
  ],
1619
+ [
1620
+ 'voidBeforeCapture',
1621
+ 'POST',
1622
+ '/invoices',
1623
+ '/void_before_capture',
1624
+ true,
1625
+ null,
1626
+ false,
1627
+ {},
1628
+ {
1629
+ isIdempotent: true,
1630
+ },
1631
+ ],
1594
1632
  [
1595
1633
  'delete',
1596
1634
  'POST',
@@ -1775,6 +1813,19 @@ export const Endpoints = {
1775
1813
  isIdempotent: true,
1776
1814
  },
1777
1815
  ],
1816
+ [
1817
+ 'update',
1818
+ 'POST',
1819
+ '/credit_notes',
1820
+ '/update',
1821
+ true,
1822
+ null,
1823
+ false,
1824
+ {},
1825
+ {
1826
+ isIdempotent: true,
1827
+ },
1828
+ ],
1778
1829
  [
1779
1830
  'removeTaxWithheldRefund',
1780
1831
  'POST',
@@ -3031,6 +3082,19 @@ export const Endpoints = {
3031
3082
  quotedDeltaRamp: [],
3032
3083
  billingConfiguration: [],
3033
3084
  quoteLineGroup: [],
3085
+ quoteEntitlement: [
3086
+ [
3087
+ 'listQuoteEntitlements',
3088
+ 'GET',
3089
+ '/quotes',
3090
+ '/quote_entitlements',
3091
+ true,
3092
+ null,
3093
+ false,
3094
+ {},
3095
+ {},
3096
+ ],
3097
+ ],
3034
3098
  cpqQuoteSignature: [],
3035
3099
  plan: [
3036
3100
  [
@@ -3806,6 +3870,19 @@ export const Endpoints = {
3806
3870
  isIdempotent: true,
3807
3871
  },
3808
3872
  ],
3873
+ [
3874
+ 'ramps',
3875
+ 'POST',
3876
+ '/exports',
3877
+ '/ramps',
3878
+ false,
3879
+ null,
3880
+ false,
3881
+ {},
3882
+ {
3883
+ isIdempotent: true,
3884
+ },
3885
+ ],
3809
3886
  ],
3810
3887
  paymentIntent: [
3811
3888
  [
@@ -3816,7 +3893,9 @@ export const Endpoints = {
3816
3893
  false,
3817
3894
  null,
3818
3895
  false,
3819
- {},
3896
+ {
3897
+ payment_method_options: 0,
3898
+ },
3820
3899
  {
3821
3900
  isIdempotent: true,
3822
3901
  },
@@ -3829,7 +3908,9 @@ export const Endpoints = {
3829
3908
  true,
3830
3909
  null,
3831
3910
  false,
3832
- {},
3911
+ {
3912
+ payment_method_options: 0,
3913
+ },
3833
3914
  {
3834
3915
  isIdempotent: true,
3835
3916
  },
@@ -4750,6 +4831,7 @@ export const Endpoints = {
4750
4831
  ],
4751
4832
  ],
4752
4833
  omnichannelSubscriptionItemScheduledChange: [],
4834
+ omnichannelSubscriptionItemMetric: [],
4753
4835
  omnichannelSubscription: [
4754
4836
  [
4755
4837
  'retrieve',
@@ -106,6 +106,7 @@ export var WebhookEventType;
106
106
  WebhookEventType["OmnichannelSubscriptionItemExpired"] = "omnichannel_subscription_item_expired";
107
107
  WebhookEventType["OmnichannelSubscriptionItemGracePeriodExpired"] = "omnichannel_subscription_item_grace_period_expired";
108
108
  WebhookEventType["OmnichannelSubscriptionItemGracePeriodStarted"] = "omnichannel_subscription_item_grace_period_started";
109
+ WebhookEventType["OmnichannelSubscriptionItemMrrUpdated"] = "omnichannel_subscription_item_mrr_updated";
109
110
  WebhookEventType["OmnichannelSubscriptionItemPauseScheduled"] = "omnichannel_subscription_item_pause_scheduled";
110
111
  WebhookEventType["OmnichannelSubscriptionItemPaused"] = "omnichannel_subscription_item_paused";
111
112
  WebhookEventType["OmnichannelSubscriptionItemReactivated"] = "omnichannel_subscription_item_reactivated";
@@ -231,6 +232,9 @@ export var WebhookEventType;
231
232
  WebhookEventType["VariantCreated"] = "variant_created";
232
233
  WebhookEventType["VariantDeleted"] = "variant_deleted";
233
234
  WebhookEventType["VariantUpdated"] = "variant_updated";
235
+ WebhookEventType["VaultTokenCreated"] = "vault_token_created";
236
+ WebhookEventType["VaultTokenDeleted"] = "vault_token_deleted";
237
+ WebhookEventType["VaultTokenUpdated"] = "vault_token_updated";
234
238
  WebhookEventType["VirtualBankAccountAdded"] = "virtual_bank_account_added";
235
239
  WebhookEventType["VirtualBankAccountDeleted"] = "virtual_bank_account_deleted";
236
240
  WebhookEventType["VirtualBankAccountUpdated"] = "virtual_bank_account_updated";
@@ -256,8 +256,8 @@ const ListCouponCurrencyCodeSchema = z.object({
256
256
  not_in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
257
257
  });
258
258
  const ListCouponApplicableItemPriceIdsSchema = z.object({
259
- in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
260
259
  is: z.string().min(1).optional(),
260
+ in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
261
261
  });
262
262
  const ListCouponBodySchema = z.looseObject({
263
263
  limit: z.number().int().min(1).max(100).optional(),
@@ -1,5 +1,5 @@
1
1
  // Generated Zod schemas: CreditNote
2
- // Actions: create, retrieve, pdf, refund, recordRefund, voidCreditNote, list, creditNotesForCustomer, delete, removeTaxWithheldRefund, importCreditNote
2
+ // Actions: create, retrieve, pdf, refund, recordRefund, voidCreditNote, list, creditNotesForCustomer, delete, update, removeTaxWithheldRefund, importCreditNote
3
3
  // Do not edit manually – regenerate via sdk-generator
4
4
  import { z } from 'zod';
5
5
  //CreditNote.create
@@ -337,6 +337,11 @@ const DeleteCreditNoteBodySchema = z.looseObject({
337
337
  comment: z.string().max(300).optional(),
338
338
  });
339
339
  export { DeleteCreditNoteBodySchema };
340
+ //CreditNote.update
341
+ const UpdateCreditNoteBodySchema = z.looseObject({
342
+ comment: z.string().max(300).optional(),
343
+ });
344
+ export { UpdateCreditNoteBodySchema };
340
345
  //CreditNote.removeTaxWithheldRefund
341
346
  const RemoveTaxWithheldRefundCreditNoteTaxWithheldSchema = z.object({
342
347
  id: z.string().max(40),
@@ -4,12 +4,12 @@
4
4
  import { z } from 'zod';
5
5
  //CreditUnit.list
6
6
  const ListCreditUnitStatusSchema = z.object({
7
- in: z.enum(['active', 'archived']).optional(),
8
7
  is: z.enum(['active', 'archived']).optional(),
8
+ in: z.enum(['active', 'archived']).optional(),
9
9
  });
10
10
  const ListCreditUnitIdSchema = z.object({
11
- in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
12
11
  is: z.string().min(1).optional(),
12
+ in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
13
13
  });
14
14
  const ListCreditUnitBodySchema = z.looseObject({
15
15
  limit: z.number().int().min(1).max(100).optional(),
@@ -4,20 +4,20 @@
4
4
  import { z } from 'zod';
5
5
  //Entitlement.list
6
6
  const ListEntitlementFeatureIdSchema = z.object({
7
- in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
8
7
  is: z.string().min(1).optional(),
8
+ in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
9
9
  });
10
10
  const ListEntitlementEntityTypeSchema = z.object({
11
- in: z
11
+ is: z
12
12
  .enum(['plan', 'addon', 'charge', 'plan_price', 'addon_price'])
13
13
  .optional(),
14
- is: z
14
+ in: z
15
15
  .enum(['plan', 'addon', 'charge', 'plan_price', 'addon_price'])
16
16
  .optional(),
17
17
  });
18
18
  const ListEntitlementEntityIdSchema = z.object({
19
- in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
20
19
  is: z.string().min(1).optional(),
20
+ in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
21
21
  });
22
22
  const ListEntitlementBodySchema = z.looseObject({
23
23
  limit: z.number().int().min(1).max(100).optional(),
@@ -5,7 +5,7 @@ import { z } from 'zod';
5
5
  //EntitlementOverride.addEntitlementOverrideForSubscription
6
6
  const AddEntitlementOverrideForSubscriptionEntitlementOverrideEntitlementOverridesSchema = z.object({
7
7
  feature_id: z.array(z.string().max(50).optional()),
8
- entity_id: z.array(z.string().max(50).optional()).optional(),
8
+ entity_id: z.array(z.string().max(100).optional()).optional(),
9
9
  entity_type: z
10
10
  .array(z
11
11
  .enum(['plan_price', 'addon_price', 'charge', 'charge_price'])
@@ -987,7 +987,7 @@ const CancelSubscriptionEstimateBodySchema = z.looseObject({
987
987
  end_of_term: z.boolean().default(false).optional(),
988
988
  cancel_at: z.number().int().optional(),
989
989
  credit_option_for_current_term_charges: z
990
- .enum(['none', 'prorate', 'full'])
990
+ .enum(['none', 'prorate', 'full', 'consumption_based'])
991
991
  .optional(),
992
992
  unbilled_charges_option: z.enum(['invoice', 'delete']).optional(),
993
993
  account_receivables_handling: z
@@ -1032,7 +1032,7 @@ const CancelSubscriptionForItemsEstimateBodySchema = z.looseObject({
1032
1032
  end_of_term: z.boolean().default(false).optional(),
1033
1033
  cancel_at: z.number().int().optional(),
1034
1034
  credit_option_for_current_term_charges: z
1035
- .enum(['none', 'prorate', 'full'])
1035
+ .enum(['none', 'prorate', 'full', 'consumption_based'])
1036
1036
  .optional(),
1037
1037
  unbilled_charges_option: z.enum(['invoice', 'delete']).optional(),
1038
1038
  account_receivables_handling: z
@@ -290,10 +290,14 @@ const ListEventEventTypeSchema = z.object({
290
290
  'alert_status_changed',
291
291
  'omnichannel_subscription_item_updated',
292
292
  'omnichannel_subscription_item_recovered',
293
+ 'omnichannel_subscription_item_mrr_updated',
293
294
  'ledger_account_balance_updated',
294
295
  'grant_blocks_created',
295
296
  'grant_blocks_updated',
296
297
  'ledger_updated',
298
+ 'vault_token_created',
299
+ 'vault_token_updated',
300
+ 'vault_token_deleted',
297
301
  ])
298
302
  .optional(),
299
303
  is_not: z
@@ -521,10 +525,14 @@ const ListEventEventTypeSchema = z.object({
521
525
  'alert_status_changed',
522
526
  'omnichannel_subscription_item_updated',
523
527
  'omnichannel_subscription_item_recovered',
528
+ 'omnichannel_subscription_item_mrr_updated',
524
529
  'ledger_account_balance_updated',
525
530
  'grant_blocks_created',
526
531
  'grant_blocks_updated',
527
532
  'ledger_updated',
533
+ 'vault_token_created',
534
+ 'vault_token_updated',
535
+ 'vault_token_deleted',
528
536
  ])
529
537
  .optional(),
530
538
  in: z
@@ -752,10 +760,14 @@ const ListEventEventTypeSchema = z.object({
752
760
  'alert_status_changed',
753
761
  'omnichannel_subscription_item_updated',
754
762
  'omnichannel_subscription_item_recovered',
763
+ 'omnichannel_subscription_item_mrr_updated',
755
764
  'ledger_account_balance_updated',
756
765
  'grant_blocks_created',
757
766
  'grant_blocks_updated',
758
767
  'ledger_updated',
768
+ 'vault_token_created',
769
+ 'vault_token_updated',
770
+ 'vault_token_deleted',
759
771
  ])
760
772
  .optional(),
761
773
  not_in: z
@@ -983,10 +995,14 @@ const ListEventEventTypeSchema = z.object({
983
995
  'alert_status_changed',
984
996
  'omnichannel_subscription_item_updated',
985
997
  'omnichannel_subscription_item_recovered',
998
+ 'omnichannel_subscription_item_mrr_updated',
986
999
  'ledger_account_balance_updated',
987
1000
  'grant_blocks_created',
988
1001
  'grant_blocks_updated',
989
1002
  'ledger_updated',
1003
+ 'vault_token_created',
1004
+ 'vault_token_updated',
1005
+ 'vault_token_deleted',
990
1006
  ])
991
1007
  .optional(),
992
1008
  });
@@ -1,5 +1,5 @@
1
1
  // Generated Zod schemas: Export
2
- // Actions: revenueRecognition, deferredRevenue, plans, addons, coupons, customers, subscriptions, invoices, creditNotes, transactions, orders, itemFamilies, items, itemPrices, attachedItems, differentialPrices, priceVariants
2
+ // Actions: revenueRecognition, deferredRevenue, plans, addons, coupons, customers, subscriptions, invoices, creditNotes, transactions, orders, itemFamilies, items, itemPrices, attachedItems, differentialPrices, priceVariants, ramps
3
3
  // Do not edit manually – regenerate via sdk-generator
4
4
  import { z } from 'zod';
5
5
  //Export.revenueRecognition
@@ -1099,8 +1099,8 @@ const CouponsExportCurrencyCodeSchema = z.object({
1099
1099
  not_in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
1100
1100
  });
1101
1101
  const CouponsExportApplicableItemPriceIdsSchema = z.object({
1102
- in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
1103
1102
  is: z.string().min(1).optional(),
1103
+ in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
1104
1104
  });
1105
1105
  const CouponsExportIdSchema = z.object({
1106
1106
  is: z.string().min(1).optional(),
@@ -3412,3 +3412,35 @@ const PriceVariantsExportBodySchema = z.looseObject({
3412
3412
  .optional(),
3413
3413
  });
3414
3414
  export { PriceVariantsExportBodySchema };
3415
+ //Export.ramps
3416
+ const RampsExportStatusSchema = z.object({
3417
+ is: z.enum(['scheduled', 'succeeded', 'failed', 'draft']).optional(),
3418
+ in: z.enum(['scheduled', 'succeeded', 'failed', 'draft']).optional(),
3419
+ });
3420
+ const RampsExportSubscriptionIdSchema = z.object({
3421
+ is: z.string().min(1).optional(),
3422
+ in: z.string().regex(RegExp('^\\[(.*)(,.*)*\\]$')).optional(),
3423
+ });
3424
+ const RampsExportEffectiveFromSchema = z.object({
3425
+ after: z.string().regex(RegExp('^\\d{10}$')).optional(),
3426
+ before: z.string().regex(RegExp('^\\d{10}$')).optional(),
3427
+ on: z.string().regex(RegExp('^\\d{10}$')).optional(),
3428
+ between: z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
3429
+ });
3430
+ const RampsExportUpdatedAtSchema = z.object({
3431
+ after: z.string().regex(RegExp('^\\d{10}$')).optional(),
3432
+ before: z.string().regex(RegExp('^\\d{10}$')).optional(),
3433
+ on: z.string().regex(RegExp('^\\d{10}$')).optional(),
3434
+ between: z.string().regex(RegExp('^\\[\\d{10},\\d{10}\\]$')).optional(),
3435
+ });
3436
+ const RampsExportRampItemSchema = z.object({
3437
+ status: RampsExportStatusSchema.optional(),
3438
+ subscription_id: RampsExportSubscriptionIdSchema.optional(),
3439
+ effective_from: RampsExportEffectiveFromSchema.optional(),
3440
+ updated_at: RampsExportUpdatedAtSchema.optional(),
3441
+ });
3442
+ const RampsExportBodySchema = z.looseObject({
3443
+ export_type: z.enum(['data', 'import_friendly_data']).optional(),
3444
+ ramp: z.array(RampsExportRampItemSchema.optional()).optional(),
3445
+ });
3446
+ export { RampsExportBodySchema };