chargebee 3.25.0-beta.1 → 3.26.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 (171) hide show
  1. package/CHANGELOG.md +103 -4
  2. package/README.md +0 -39
  3. package/cjs/RequestWrapper.js +1 -28
  4. package/cjs/chargebee.cjs.js +0 -3
  5. package/cjs/chargebee.cjs.worker.js +0 -2
  6. package/cjs/createChargebee.js +0 -5
  7. package/cjs/environment.js +1 -1
  8. package/cjs/resources/api_endpoints.js +121 -3
  9. package/cjs/resources/webhook/eventType.js +2 -0
  10. package/esm/RequestWrapper.js +1 -28
  11. package/esm/chargebee.esm.js +0 -2
  12. package/esm/chargebee.esm.worker.js +0 -1
  13. package/esm/createChargebee.js +0 -5
  14. package/esm/environment.js +1 -1
  15. package/esm/resources/api_endpoints.js +121 -3
  16. package/esm/resources/webhook/eventType.js +2 -0
  17. package/package.json +1 -4
  18. package/types/core.d.ts +24 -6
  19. package/types/index.d.ts +8 -17
  20. package/types/resources/Content.d.ts +4 -1
  21. package/types/resources/CreditNote.d.ts +1 -0
  22. package/types/resources/Customer.d.ts +14 -4
  23. package/types/resources/Estimate.d.ts +14 -4
  24. package/types/resources/Event.d.ts +2 -0
  25. package/types/resources/Gift.d.ts +23 -6
  26. package/types/resources/GrantBlock.d.ts +59 -0
  27. package/types/resources/HostedPage.d.ts +6 -1
  28. package/types/resources/Invoice.d.ts +14 -5
  29. package/types/resources/LedgerAccountBalance.d.ts +50 -0
  30. package/types/resources/LedgerOperation.d.ts +141 -0
  31. package/types/resources/OmnichannelSubscription.d.ts +8 -0
  32. package/types/resources/OmnichannelSubscriptionItem.d.ts +1 -0
  33. package/types/resources/PaymentIntent.d.ts +35 -10
  34. package/types/resources/PaymentSource.d.ts +7 -2
  35. package/types/resources/PromotionalGrant.d.ts +37 -0
  36. package/types/resources/Purchase.d.ts +7 -2
  37. package/types/resources/Subscription.d.ts +49 -14
  38. package/types/resources/WebhookEvent.d.ts +22 -4
  39. package/cjs/chargebeeZodValidationError.js +0 -18
  40. package/cjs/schema/addon.schema.js +0 -153
  41. package/cjs/schema/address.schema.js +0 -35
  42. package/cjs/schema/alert.schema.js +0 -38
  43. package/cjs/schema/attached_item.schema.js +0 -58
  44. package/cjs/schema/business_entity.schema.js +0 -46
  45. package/cjs/schema/card.schema.js +0 -165
  46. package/cjs/schema/comment.schema.js +0 -69
  47. package/cjs/schema/coupon.schema.js +0 -209
  48. package/cjs/schema/coupon_code.schema.js +0 -14
  49. package/cjs/schema/coupon_set.schema.js +0 -28
  50. package/cjs/schema/credit_note.schema.js +0 -288
  51. package/cjs/schema/currency.schema.js +0 -32
  52. package/cjs/schema/customer.schema.js +0 -986
  53. package/cjs/schema/customer_entitlement.schema.js +0 -14
  54. package/cjs/schema/differential_price.schema.js +0 -68
  55. package/cjs/schema/entitlement.schema.js +0 -27
  56. package/cjs/schema/entitlement_override.schema.js +0 -33
  57. package/cjs/schema/estimate.schema.js +0 -1525
  58. package/cjs/schema/export.schema.js +0 -1545
  59. package/cjs/schema/feature.schema.js +0 -37
  60. package/cjs/schema/gift.schema.js +0 -277
  61. package/cjs/schema/hosted_page.schema.js +0 -1649
  62. package/cjs/schema/in_app_subscription.schema.js +0 -68
  63. package/cjs/schema/index.js +0 -80
  64. package/cjs/schema/invoice.schema.js +0 -1467
  65. package/cjs/schema/item.schema.js +0 -91
  66. package/cjs/schema/item_entitlement.schema.js +0 -45
  67. package/cjs/schema/item_family.schema.js +0 -21
  68. package/cjs/schema/item_price.schema.js +0 -190
  69. package/cjs/schema/non_subscription.schema.js +0 -28
  70. package/cjs/schema/offer_event.schema.js +0 -13
  71. package/cjs/schema/offer_fulfillment.schema.js +0 -20
  72. package/cjs/schema/omnichannel_one_time_order.schema.js +0 -26
  73. package/cjs/schema/omnichannel_subscription.schema.js +0 -89
  74. package/cjs/schema/omnichannel_subscription_item.schema.js +0 -13
  75. package/cjs/schema/order.schema.js +0 -273
  76. package/cjs/schema/payment_intent.schema.js +0 -117
  77. package/cjs/schema/payment_schedule_scheme.schema.js +0 -20
  78. package/cjs/schema/payment_source.schema.js +0 -358
  79. package/cjs/schema/payment_voucher.schema.js +0 -57
  80. package/cjs/schema/personalized_offer.schema.js +0 -28
  81. package/cjs/schema/plan.schema.js +0 -225
  82. package/cjs/schema/portal_session.schema.js +0 -22
  83. package/cjs/schema/price_variant.schema.js +0 -36
  84. package/cjs/schema/pricing_page_session.schema.js +0 -135
  85. package/cjs/schema/promotional_credit.schema.js +0 -78
  86. package/cjs/schema/purchase.schema.js +0 -272
  87. package/cjs/schema/quote.schema.js +0 -1557
  88. package/cjs/schema/ramp.schema.js +0 -209
  89. package/cjs/schema/recorded_purchase.schema.js +0 -32
  90. package/cjs/schema/resource_migration.schema.js +0 -14
  91. package/cjs/schema/site_migration_detail.schema.js +0 -81
  92. package/cjs/schema/subscription.schema.js +0 -2993
  93. package/cjs/schema/subscription_entitlement.schema.js +0 -25
  94. package/cjs/schema/time_machine.schema.js +0 -17
  95. package/cjs/schema/transaction.schema.js +0 -70
  96. package/cjs/schema/unbilled_charge.schema.js +0 -113
  97. package/cjs/schema/usage.schema.js +0 -93
  98. package/cjs/schema/usage_charge.schema.js +0 -17
  99. package/cjs/schema/usage_event.schema.js +0 -28
  100. package/cjs/schema/usage_file.schema.js +0 -13
  101. package/cjs/schema/usage_summary.schema.js +0 -17
  102. package/cjs/schema/virtual_bank_account.schema.js +0 -43
  103. package/cjs/schema/webhook_endpoint.schema.js +0 -504
  104. package/cjs/validationLoader.js +0 -59
  105. package/esm/chargebeeZodValidationError.js +0 -14
  106. package/esm/schema/addon.schema.js +0 -150
  107. package/esm/schema/address.schema.js +0 -32
  108. package/esm/schema/alert.schema.js +0 -35
  109. package/esm/schema/attached_item.schema.js +0 -55
  110. package/esm/schema/business_entity.schema.js +0 -43
  111. package/esm/schema/card.schema.js +0 -162
  112. package/esm/schema/comment.schema.js +0 -66
  113. package/esm/schema/coupon.schema.js +0 -206
  114. package/esm/schema/coupon_code.schema.js +0 -11
  115. package/esm/schema/coupon_set.schema.js +0 -25
  116. package/esm/schema/credit_note.schema.js +0 -285
  117. package/esm/schema/currency.schema.js +0 -29
  118. package/esm/schema/customer.schema.js +0 -983
  119. package/esm/schema/customer_entitlement.schema.js +0 -11
  120. package/esm/schema/differential_price.schema.js +0 -65
  121. package/esm/schema/entitlement.schema.js +0 -24
  122. package/esm/schema/entitlement_override.schema.js +0 -30
  123. package/esm/schema/estimate.schema.js +0 -1522
  124. package/esm/schema/export.schema.js +0 -1542
  125. package/esm/schema/feature.schema.js +0 -34
  126. package/esm/schema/gift.schema.js +0 -274
  127. package/esm/schema/hosted_page.schema.js +0 -1646
  128. package/esm/schema/in_app_subscription.schema.js +0 -65
  129. package/esm/schema/index.js +0 -64
  130. package/esm/schema/invoice.schema.js +0 -1464
  131. package/esm/schema/item.schema.js +0 -88
  132. package/esm/schema/item_entitlement.schema.js +0 -42
  133. package/esm/schema/item_family.schema.js +0 -18
  134. package/esm/schema/item_price.schema.js +0 -187
  135. package/esm/schema/non_subscription.schema.js +0 -25
  136. package/esm/schema/offer_event.schema.js +0 -10
  137. package/esm/schema/offer_fulfillment.schema.js +0 -17
  138. package/esm/schema/omnichannel_one_time_order.schema.js +0 -23
  139. package/esm/schema/omnichannel_subscription.schema.js +0 -86
  140. package/esm/schema/omnichannel_subscription_item.schema.js +0 -10
  141. package/esm/schema/order.schema.js +0 -270
  142. package/esm/schema/payment_intent.schema.js +0 -114
  143. package/esm/schema/payment_schedule_scheme.schema.js +0 -17
  144. package/esm/schema/payment_source.schema.js +0 -355
  145. package/esm/schema/payment_voucher.schema.js +0 -54
  146. package/esm/schema/personalized_offer.schema.js +0 -25
  147. package/esm/schema/plan.schema.js +0 -222
  148. package/esm/schema/portal_session.schema.js +0 -19
  149. package/esm/schema/price_variant.schema.js +0 -33
  150. package/esm/schema/pricing_page_session.schema.js +0 -132
  151. package/esm/schema/promotional_credit.schema.js +0 -75
  152. package/esm/schema/purchase.schema.js +0 -269
  153. package/esm/schema/quote.schema.js +0 -1554
  154. package/esm/schema/ramp.schema.js +0 -206
  155. package/esm/schema/recorded_purchase.schema.js +0 -29
  156. package/esm/schema/resource_migration.schema.js +0 -11
  157. package/esm/schema/site_migration_detail.schema.js +0 -78
  158. package/esm/schema/subscription.schema.js +0 -2990
  159. package/esm/schema/subscription_entitlement.schema.js +0 -22
  160. package/esm/schema/time_machine.schema.js +0 -14
  161. package/esm/schema/transaction.schema.js +0 -67
  162. package/esm/schema/unbilled_charge.schema.js +0 -110
  163. package/esm/schema/usage.schema.js +0 -90
  164. package/esm/schema/usage_charge.schema.js +0 -14
  165. package/esm/schema/usage_event.schema.js +0 -25
  166. package/esm/schema/usage_file.schema.js +0 -10
  167. package/esm/schema/usage_summary.schema.js +0 -14
  168. package/esm/schema/virtual_bank_account.schema.js +0 -40
  169. package/esm/schema/webhook_endpoint.schema.js +0 -501
  170. package/esm/validationLoader.js +0 -56
  171. package/types/resources/QuoteEntitlement.d.ts +0 -16
@@ -3029,7 +3029,6 @@ export const Endpoints = {
3029
3029
  quotedDeltaRamp: [],
3030
3030
  billingConfiguration: [],
3031
3031
  quoteLineGroup: [],
3032
- quoteEntitlement: [],
3033
3032
  cpqQuoteSignature: [],
3034
3033
  plan: [
3035
3034
  [
@@ -4693,6 +4692,7 @@ export const Endpoints = {
4693
4692
  },
4694
4693
  ],
4695
4694
  ],
4695
+ omnichannelSubscriptionItemScheduledChange: [],
4696
4696
  omnichannelSubscription: [
4697
4697
  [
4698
4698
  'retrieve',
@@ -4825,7 +4825,6 @@ export const Endpoints = {
4825
4825
  {},
4826
4826
  ],
4827
4827
  ],
4828
- omnichannelSubscriptionItemScheduledChange: [],
4829
4828
  usageFile: [
4830
4829
  [
4831
4830
  'uploadUrl',
@@ -4885,7 +4884,7 @@ export const Endpoints = {
4885
4884
  null,
4886
4885
  true,
4887
4886
  'grow',
4888
- true,
4887
+ false,
4889
4888
  {},
4890
4889
  {},
4891
4890
  ],
@@ -5052,6 +5051,125 @@ export const Endpoints = {
5052
5051
  {},
5053
5052
  ],
5054
5053
  ],
5054
+ ledgerAccountBalance: [
5055
+ [
5056
+ 'listLedgerAccountBalances',
5057
+ 'GET',
5058
+ '/ledger_account_balances',
5059
+ null,
5060
+ false,
5061
+ null,
5062
+ false,
5063
+ {},
5064
+ {},
5065
+ ],
5066
+ ],
5067
+ ledgerOperation: [
5068
+ [
5069
+ 'retrieveLedgerOperation',
5070
+ 'GET',
5071
+ '/ledger_operations',
5072
+ null,
5073
+ true,
5074
+ null,
5075
+ false,
5076
+ {},
5077
+ {},
5078
+ ],
5079
+ [
5080
+ 'listLedgerOperations',
5081
+ 'GET',
5082
+ '/ledger_operations',
5083
+ null,
5084
+ false,
5085
+ null,
5086
+ false,
5087
+ {},
5088
+ {},
5089
+ ],
5090
+ [
5091
+ 'capture',
5092
+ 'POST',
5093
+ '/ledger_operations',
5094
+ '/capture',
5095
+ false,
5096
+ null,
5097
+ true,
5098
+ {
5099
+ metadata: 0,
5100
+ },
5101
+ {},
5102
+ ],
5103
+ [
5104
+ 'authorize',
5105
+ 'POST',
5106
+ '/ledger_operations',
5107
+ '/authorize',
5108
+ false,
5109
+ null,
5110
+ true,
5111
+ {
5112
+ metadata: 0,
5113
+ },
5114
+ {},
5115
+ ],
5116
+ [
5117
+ 'captureAuthorization',
5118
+ 'POST',
5119
+ '/ledger_operations',
5120
+ '/capture_authorization',
5121
+ false,
5122
+ null,
5123
+ true,
5124
+ {
5125
+ metadata: 0,
5126
+ },
5127
+ {},
5128
+ ],
5129
+ [
5130
+ 'releaseAuthorization',
5131
+ 'POST',
5132
+ '/ledger_operations',
5133
+ '/release_authorization',
5134
+ false,
5135
+ null,
5136
+ true,
5137
+ {
5138
+ metadata: 0,
5139
+ },
5140
+ {},
5141
+ ],
5142
+ ],
5143
+ grantBlock: [
5144
+ [
5145
+ 'listGrantBlocks',
5146
+ 'GET',
5147
+ '/grant_blocks',
5148
+ null,
5149
+ false,
5150
+ null,
5151
+ false,
5152
+ {},
5153
+ {},
5154
+ ],
5155
+ ],
5156
+ promotionalGrant: [
5157
+ [
5158
+ 'promotionalGrants',
5159
+ 'POST',
5160
+ '/promotional_grants',
5161
+ null,
5162
+ false,
5163
+ null,
5164
+ true,
5165
+ {
5166
+ metadata: 0,
5167
+ },
5168
+ {
5169
+ isIdempotent: true,
5170
+ },
5171
+ ],
5172
+ ],
5055
5173
  impactedCustomer: [],
5056
5174
  subscriptionEntitlementsUpdatedDetail: [],
5057
5175
  subscriptionEntitlementsCreatedDetail: [],
@@ -105,12 +105,14 @@ export var WebhookEventType;
105
105
  WebhookEventType["OmnichannelSubscriptionItemPauseScheduled"] = "omnichannel_subscription_item_pause_scheduled";
106
106
  WebhookEventType["OmnichannelSubscriptionItemPaused"] = "omnichannel_subscription_item_paused";
107
107
  WebhookEventType["OmnichannelSubscriptionItemReactivated"] = "omnichannel_subscription_item_reactivated";
108
+ WebhookEventType["OmnichannelSubscriptionItemRecovered"] = "omnichannel_subscription_item_recovered";
108
109
  WebhookEventType["OmnichannelSubscriptionItemRenewed"] = "omnichannel_subscription_item_renewed";
109
110
  WebhookEventType["OmnichannelSubscriptionItemResubscribed"] = "omnichannel_subscription_item_resubscribed";
110
111
  WebhookEventType["OmnichannelSubscriptionItemResumed"] = "omnichannel_subscription_item_resumed";
111
112
  WebhookEventType["OmnichannelSubscriptionItemScheduledCancellationRemoved"] = "omnichannel_subscription_item_scheduled_cancellation_removed";
112
113
  WebhookEventType["OmnichannelSubscriptionItemScheduledChangeRemoved"] = "omnichannel_subscription_item_scheduled_change_removed";
113
114
  WebhookEventType["OmnichannelSubscriptionItemScheduledDowngradeRemoved"] = "omnichannel_subscription_item_scheduled_downgrade_removed";
115
+ WebhookEventType["OmnichannelSubscriptionItemUpdated"] = "omnichannel_subscription_item_updated";
114
116
  WebhookEventType["OmnichannelSubscriptionItemUpgraded"] = "omnichannel_subscription_item_upgraded";
115
117
  WebhookEventType["OmnichannelSubscriptionMovedIn"] = "omnichannel_subscription_moved_in";
116
118
  WebhookEventType["OmnichannelTransactionCreated"] = "omnichannel_transaction_created";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chargebee",
3
- "version": "3.25.0-beta.1",
3
+ "version": "3.26.0",
4
4
  "description": "A library for integrating with Chargebee.",
5
5
  "scripts": {
6
6
  "prepack": "npm install && npm run build",
@@ -75,8 +75,5 @@
75
75
  "semi": true,
76
76
  "singleQuote": true,
77
77
  "parser": "typescript"
78
- },
79
- "dependencies": {
80
- "zod": "^4.3.6"
81
78
  }
82
79
  }
package/types/core.d.ts CHANGED
@@ -5,8 +5,6 @@ declare module 'chargebee' {
5
5
  timeout?: number;
6
6
  timemachineWaitInMillis?: number;
7
7
  exportWaitInMillis?: number;
8
- /** When true, request parameters are validated against Zod schemas before each HTTP call (where a schema exists). */
9
- enableValidation?: boolean;
10
8
  }
11
9
  export type ChargebeeResponse<T> = T & {
12
10
  headers: { [key: string]: string };
@@ -370,6 +368,8 @@ declare module 'chargebee' {
370
368
  | 'omnichannel_subscription_moved_in'
371
369
  | 'omnichannel_transaction_created'
372
370
  | 'alert_status_changed'
371
+ | 'omnichannel_subscription_item_updated'
372
+ | 'omnichannel_subscription_item_recovered'
373
373
  | 'plan_created'
374
374
  | 'plan_updated'
375
375
  | 'plan_deleted'
@@ -532,7 +532,12 @@ declare module 'chargebee' {
532
532
  | 'pay_co'
533
533
  | 'after_pay'
534
534
  | 'swish'
535
- | 'payme';
535
+ | 'payme'
536
+ | 'klarna'
537
+ | 'alipay_hk'
538
+ | 'paypay'
539
+ | 'gcash'
540
+ | 'south_korean_cards';
536
541
  type PaymentMethodSavePolicyEnum = 'always' | 'ask' | 'never';
537
542
  type PaymentMethodTypeEnum =
538
543
  | 'card'
@@ -569,14 +574,19 @@ declare module 'chargebee' {
569
574
  | 'naver_pay'
570
575
  | 'revolut_pay'
571
576
  | 'cash_app_pay'
572
- | 'pix'
573
577
  | 'twint'
574
578
  | 'go_pay'
575
579
  | 'grab_pay'
576
580
  | 'pay_co'
577
581
  | 'after_pay'
578
582
  | 'swish'
579
- | 'payme';
583
+ | 'payme'
584
+ | 'pix'
585
+ | 'klarna'
586
+ | 'alipay_hk'
587
+ | 'paypay'
588
+ | 'gcash'
589
+ | 'south_korean_cards';
580
590
  type PaymentVoucherTypeEnum = 'boleto';
581
591
  type PeriodUnitEnum = 'day' | 'week' | 'month' | 'year';
582
592
  type PriceTypeEnum = 'tax_exclusive' | 'tax_inclusive';
@@ -616,6 +626,7 @@ declare module 'chargebee' {
616
626
  | 'js_api'
617
627
  | 'migration'
618
628
  | 'external_service';
629
+ type StatusEnum = 'available' | 'exhausted' | 'scheduled' | 'in_grace_period';
619
630
  type TaxExemptReasonEnum =
620
631
  | 'tax_not_configured'
621
632
  | 'region_non_taxable'
@@ -679,7 +690,6 @@ declare module 'chargebee' {
679
690
  | 'naver_pay'
680
691
  | 'revolut_pay'
681
692
  | 'cash_app_pay'
682
- | 'pix'
683
693
  | 'twint'
684
694
  | 'go_pay'
685
695
  | 'grab_pay'
@@ -687,6 +697,12 @@ declare module 'chargebee' {
687
697
  | 'after_pay'
688
698
  | 'swish'
689
699
  | 'payme'
700
+ | 'pix'
701
+ | 'klarna'
702
+ | 'alipay_hk'
703
+ | 'paypay'
704
+ | 'gcash'
705
+ | 'south_korean_cards'
690
706
  | 'free_trial'
691
707
  | 'pay_up_front'
692
708
  | 'pay_as_you_go'
@@ -917,6 +933,8 @@ declare module 'chargebee' {
917
933
  | 'omnichannel_subscription_moved_in'
918
934
  | 'omnichannel_transaction_created'
919
935
  | 'alert_status_changed'
936
+ | 'omnichannel_subscription_item_updated'
937
+ | 'omnichannel_subscription_item_recovered'
920
938
  | 'plan_created'
921
939
  | 'plan_updated'
922
940
  | 'plan_deleted'
package/types/index.d.ts CHANGED
@@ -36,6 +36,7 @@
36
36
  ///<reference path='./resources/FilterCondition.d.ts' />
37
37
  ///<reference path='./resources/GatewayErrorDetail.d.ts' />
38
38
  ///<reference path='./resources/Gift.d.ts' />
39
+ ///<reference path='./resources/GrantBlock.d.ts' />
39
40
  ///<reference path='./resources/Hierarchy.d.ts' />
40
41
  ///<reference path='./resources/HostedPage.d.ts' />
41
42
  ///<reference path='./resources/ImpactedCustomer.d.ts' />
@@ -49,6 +50,8 @@
49
50
  ///<reference path='./resources/ItemEntitlement.d.ts' />
50
51
  ///<reference path='./resources/ItemFamily.d.ts' />
51
52
  ///<reference path='./resources/ItemPrice.d.ts' />
53
+ ///<reference path='./resources/LedgerAccountBalance.d.ts' />
54
+ ///<reference path='./resources/LedgerOperation.d.ts' />
52
55
  ///<reference path='./resources/Metadata.d.ts' />
53
56
  ///<reference path='./resources/NonSubscription.d.ts' />
54
57
  ///<reference path='./resources/OfferEvent.d.ts' />
@@ -74,9 +77,9 @@
74
77
  ///<reference path='./resources/PriceVariant.d.ts' />
75
78
  ///<reference path='./resources/PricingPageSession.d.ts' />
76
79
  ///<reference path='./resources/PromotionalCredit.d.ts' />
80
+ ///<reference path='./resources/PromotionalGrant.d.ts' />
77
81
  ///<reference path='./resources/Purchase.d.ts' />
78
82
  ///<reference path='./resources/Quote.d.ts' />
79
- ///<reference path='./resources/QuoteEntitlement.d.ts' />
80
83
  ///<reference path='./resources/QuoteLineGroup.d.ts' />
81
84
  ///<reference path='./resources/QuotedCharge.d.ts' />
82
85
  ///<reference path='./resources/QuotedDeltaRamp.d.ts' />
@@ -165,11 +168,6 @@ declare module 'chargebee' {
165
168
  * @httpClient optional http client implementation, default http client will be used if not provided
166
169
  */
167
170
  httpClient?: HttpClientInterface;
168
-
169
- /**
170
- * @enableValidation When true, every request's parameters are validated against each endpoint's generated Zod schema before the HTTP request is sent. Violations throw `ChargebeeZodValidationError` with structured Zod issues. Calls with no params argument are validated as `{}`. Required resource ids in the URL path are still checked separately.
171
- */
172
- enableValidation?: boolean;
173
171
  };
174
172
 
175
173
  export interface HttpClientInterface {
@@ -215,6 +213,7 @@ declare module 'chargebee' {
215
213
  export: Export.ExportResource;
216
214
  feature: Feature.FeatureResource;
217
215
  gift: Gift.GiftResource;
216
+ grantBlock: GrantBlock.GrantBlockResource;
218
217
  hostedPage: HostedPage.HostedPageResource;
219
218
  inAppSubscription: InAppSubscription.InAppSubscriptionResource;
220
219
  invoice: Invoice.InvoiceResource;
@@ -222,6 +221,8 @@ declare module 'chargebee' {
222
221
  itemEntitlement: ItemEntitlement.ItemEntitlementResource;
223
222
  itemFamily: ItemFamily.ItemFamilyResource;
224
223
  itemPrice: ItemPrice.ItemPriceResource;
224
+ ledgerAccountBalance: LedgerAccountBalance.LedgerAccountBalanceResource;
225
+ ledgerOperation: LedgerOperation.LedgerOperationResource;
225
226
  nonSubscription: NonSubscription.NonSubscriptionResource;
226
227
  offerEvent: OfferEvent.OfferEventResource;
227
228
  offerFulfillment: OfferFulfillment.OfferFulfillmentResource;
@@ -239,6 +240,7 @@ declare module 'chargebee' {
239
240
  priceVariant: PriceVariant.PriceVariantResource;
240
241
  pricingPageSession: PricingPageSession.PricingPageSessionResource;
241
242
  promotionalCredit: PromotionalCredit.PromotionalCreditResource;
243
+ promotionalGrant: PromotionalGrant.PromotionalGrantResource;
242
244
  purchase: Purchase.PurchaseResource;
243
245
  quote: Quote.QuoteResource;
244
246
  ramp: Ramp.RampResource;
@@ -449,15 +451,4 @@ declare module 'chargebee' {
449
451
  name: string;
450
452
  readonly rawBody?: string;
451
453
  }
452
-
453
- /**
454
- * Thrown when `enableValidation` is on and request parameters fail the action's Zod schema.
455
- * Carries `actionName` and the original `ZodError` (issues, `flatten()`, etc.) for programmatic handling.
456
- */
457
- export class ChargebeeZodValidationError extends Error {
458
- constructor(actionName: string, zodError: import('zod').ZodError);
459
- name: string;
460
- readonly actionName: string;
461
- readonly zodError: import('zod').ZodError;
462
- }
463
454
  }
@@ -41,6 +41,7 @@ declare module 'chargebee' {
41
41
  filter_condition: FilterCondition;
42
42
  gateway_error_detail: GatewayErrorDetail;
43
43
  gift: Gift;
44
+ grant_block: GrantBlock;
44
45
  hierarchy: Hierarchy;
45
46
  hosted_page: HostedPage;
46
47
  impacted_customer: ImpactedCustomer;
@@ -54,6 +55,8 @@ declare module 'chargebee' {
54
55
  item_entitlement: ItemEntitlement;
55
56
  item_family: ItemFamily;
56
57
  item_price: ItemPrice;
58
+ ledger_account_balance: LedgerAccountBalance;
59
+ ledger_operation: LedgerOperation;
57
60
  metadata: Metadata;
58
61
  non_subscription: NonSubscription;
59
62
  offer_event: OfferEvent;
@@ -79,9 +82,9 @@ declare module 'chargebee' {
79
82
  price_variant: PriceVariant;
80
83
  pricing_page_session: PricingPageSession;
81
84
  promotional_credit: PromotionalCredit;
85
+ promotional_grant: PromotionalGrant;
82
86
  purchase: Purchase;
83
87
  quote: Quote;
84
- quote_entitlement: QuoteEntitlement;
85
88
  quote_line_group: QuoteLineGroup;
86
89
  quoted_charge: QuotedCharge;
87
90
  quoted_delta_ramp: QuotedDeltaRamp;
@@ -44,6 +44,7 @@ declare module 'chargebee' {
44
44
  local_currency_code?: string;
45
45
  round_off_amount?: number;
46
46
  fractional_correction?: number;
47
+ notes?: string[];
47
48
  line_items?: CreditNote.LineItem[];
48
49
  line_item_tiers?: CreditNote.LineItemTier[];
49
50
  line_item_discounts?: CreditNote.LineItemDiscount[];
@@ -762,14 +762,19 @@ declare module 'chargebee' {
762
762
  | 'cash_app_pay'
763
763
  | 'wechat_pay'
764
764
  | 'alipay'
765
- | 'pix'
766
765
  | 'twint'
767
766
  | 'go_pay'
768
767
  | 'grab_pay'
769
768
  | 'pay_co'
770
769
  | 'after_pay'
771
770
  | 'swish'
772
- | 'payme';
771
+ | 'payme'
772
+ | 'pix'
773
+ | 'klarna'
774
+ | 'alipay_hk'
775
+ | 'paypay'
776
+ | 'gcash'
777
+ | 'south_korean_cards';
773
778
  reference_id?: string;
774
779
  /**
775
780
  * @deprecated Please refer API docs to use other attributes
@@ -954,14 +959,19 @@ declare module 'chargebee' {
954
959
  | 'cash_app_pay'
955
960
  | 'wechat_pay'
956
961
  | 'alipay'
957
- | 'pix'
958
962
  | 'twint'
959
963
  | 'go_pay'
960
964
  | 'grab_pay'
961
965
  | 'pay_co'
962
966
  | 'after_pay'
963
967
  | 'swish'
964
- | 'payme';
968
+ | 'payme'
969
+ | 'pix'
970
+ | 'klarna'
971
+ | 'alipay_hk'
972
+ | 'paypay'
973
+ | 'gcash'
974
+ | 'south_korean_cards';
965
975
  /**
966
976
  * @deprecated Please refer API docs to use other attributes
967
977
  */
@@ -1058,14 +1058,19 @@ declare module 'chargebee' {
1058
1058
  | 'cash_app_pay'
1059
1059
  | 'wechat_pay'
1060
1060
  | 'alipay'
1061
- | 'pix'
1062
1061
  | 'twint'
1063
1062
  | 'go_pay'
1064
1063
  | 'grab_pay'
1065
1064
  | 'pay_co'
1066
1065
  | 'after_pay'
1067
1066
  | 'swish'
1068
- | 'payme';
1067
+ | 'payme'
1068
+ | 'pix'
1069
+ | 'klarna'
1070
+ | 'alipay_hk'
1071
+ | 'paypay'
1072
+ | 'gcash'
1073
+ | 'south_korean_cards';
1069
1074
  reference_id?: string;
1070
1075
  /**
1071
1076
  * @deprecated Please refer API docs to use other attributes
@@ -1155,14 +1160,19 @@ declare module 'chargebee' {
1155
1160
  | 'cash_app_pay'
1156
1161
  | 'wechat_pay'
1157
1162
  | 'alipay'
1158
- | 'pix'
1159
1163
  | 'twint'
1160
1164
  | 'go_pay'
1161
1165
  | 'grab_pay'
1162
1166
  | 'pay_co'
1163
1167
  | 'after_pay'
1164
1168
  | 'swish'
1165
- | 'payme';
1169
+ | 'payme'
1170
+ | 'pix'
1171
+ | 'klarna'
1172
+ | 'alipay_hk'
1173
+ | 'paypay'
1174
+ | 'gcash'
1175
+ | 'south_korean_cards';
1166
1176
  reference_id?: string;
1167
1177
  /**
1168
1178
  * @deprecated Please refer API docs to use other attributes
@@ -65,6 +65,7 @@ declare module 'chargebee' {
65
65
  GiftUnclaimedContent &
66
66
  VirtualBankAccountAddedContent &
67
67
  PaymentIntentCreatedContent &
68
+ OmnichannelSubscriptionItemUpdatedContent &
68
69
  CreditNoteCreatedWithBackdatingContent &
69
70
  ContractTermTerminatedContent &
70
71
  ItemFamilyUpdatedContent &
@@ -77,6 +78,7 @@ declare module 'chargebee' {
77
78
  ItemDeletedContent &
78
79
  SubscriptionRampDraftedContent &
79
80
  DunningUpdatedContent &
81
+ OmnichannelSubscriptionItemRecoveredContent &
80
82
  ItemEntitlementsUpdatedContent &
81
83
  TokenConsumedContent &
82
84
  HierarchyDeletedContent &
@@ -50,7 +50,7 @@ declare module 'chargebee' {
50
50
 
51
51
  updateGift(
52
52
  gift_id: string,
53
- input: UpdateGiftInputParam,
53
+ input?: UpdateGiftInputParam,
54
54
  headers?: ChargebeeRequestHeader,
55
55
  ): Promise<ChargebeeResponse<UpdateGiftResponse>>;
56
56
  }
@@ -147,8 +147,9 @@ declare module 'chargebee' {
147
147
  status?: filter.Enum;
148
148
  }
149
149
  export interface UpdateGiftInputParam {
150
- scheduled_at: number;
150
+ scheduled_at?: number;
151
151
  comment?: string;
152
+ gift_receiver?: GiftReceiverUpdateGiftInputParam;
152
153
  }
153
154
  export interface GiftReceiverCreateInputParam {
154
155
  customer_id: string;
@@ -215,14 +216,19 @@ declare module 'chargebee' {
215
216
  | 'cash_app_pay'
216
217
  | 'wechat_pay'
217
218
  | 'alipay'
218
- | 'pix'
219
219
  | 'twint'
220
220
  | 'go_pay'
221
221
  | 'grab_pay'
222
222
  | 'pay_co'
223
223
  | 'after_pay'
224
224
  | 'swish'
225
- | 'payme';
225
+ | 'payme'
226
+ | 'pix'
227
+ | 'klarna'
228
+ | 'alipay_hk'
229
+ | 'paypay'
230
+ | 'gcash'
231
+ | 'south_korean_cards';
226
232
  reference_id?: string;
227
233
  /**
228
234
  * @deprecated Please refer API docs to use other attributes
@@ -306,14 +312,19 @@ declare module 'chargebee' {
306
312
  | 'cash_app_pay'
307
313
  | 'wechat_pay'
308
314
  | 'alipay'
309
- | 'pix'
310
315
  | 'twint'
311
316
  | 'go_pay'
312
317
  | 'grab_pay'
313
318
  | 'pay_co'
314
319
  | 'after_pay'
315
320
  | 'swish'
316
- | 'payme';
321
+ | 'payme'
322
+ | 'pix'
323
+ | 'klarna'
324
+ | 'alipay_hk'
325
+ | 'paypay'
326
+ | 'gcash'
327
+ | 'south_korean_cards';
317
328
  reference_id?: string;
318
329
  /**
319
330
  * @deprecated Please refer API docs to use other attributes
@@ -345,5 +356,11 @@ declare module 'chargebee' {
345
356
  email?: filter.String;
346
357
  customer_id?: filter.String;
347
358
  }
359
+
360
+ export interface GiftReceiverUpdateGiftInputParam {
361
+ email?: string;
362
+ first_name?: string;
363
+ last_name?: string;
364
+ }
348
365
  }
349
366
  }
@@ -0,0 +1,59 @@
1
+ ///<reference path='./../core.d.ts'/>
2
+ ///<reference path='./../index.d.ts'/>
3
+ ///<reference path='./filter.d.ts'/>
4
+ declare module 'chargebee' {
5
+ export interface GrantBlock {
6
+ id: string;
7
+ granted_amount: string;
8
+ effective_from: number;
9
+ expires_at: number;
10
+ balance: string;
11
+ hold_amount: string;
12
+ used_amount: string;
13
+ expired_amount: string;
14
+ rolled_over_amount: string;
15
+ voided_amount: string;
16
+ origin_grant_block_id?: string;
17
+ status: StatusEnum;
18
+ metadata?: string;
19
+ grant_source:
20
+ | 'subscription_created'
21
+ | 'subscription_changed'
22
+ | 'top_up'
23
+ | 'promotional_grants'
24
+ | 'rollover';
25
+ created_at?: number;
26
+ account_type?: 'provisioned' | 'overdraft';
27
+ unit_id?: string;
28
+ unit_type?: 'credit_unit';
29
+ }
30
+
31
+ export namespace GrantBlock {
32
+ export class GrantBlockResource {
33
+ listGrantBlocks(
34
+ input: ListGrantBlocksInputParam,
35
+ headers?: ChargebeeRequestHeader,
36
+ ): Promise<ChargebeeResponse<ListGrantBlocksResponse>>;
37
+ }
38
+
39
+ export interface ListGrantBlocksResponse {
40
+ list: { grant_block: GrantBlock }[];
41
+ next_offset?: string;
42
+ }
43
+
44
+ // REQUEST PARAMS
45
+ //---------------
46
+
47
+ export interface ListGrantBlocksInputParam {
48
+ limit?: number;
49
+ offset?: string;
50
+ subscription_id: filter.String;
51
+ unit_id?: filter.String;
52
+ effective_from?: filter.Timestamp;
53
+ expires_at?: filter.Timestamp;
54
+ created_at?: filter.Timestamp;
55
+ 'sort_by[asc]'?: string;
56
+ 'sort_by[desc]'?: string;
57
+ }
58
+ }
59
+ }
@@ -7,7 +7,6 @@ declare module 'chargebee' {
7
7
  type?:
8
8
  | 'checkout_new'
9
9
  | 'checkout_existing'
10
- | 'update_payment_method'
11
10
  | 'manage_payment_sources'
12
11
  | 'collect_now'
13
12
  | 'extend_subscription'
@@ -29,6 +28,7 @@ declare module 'chargebee' {
29
28
  embed: boolean;
30
29
  created_at?: number;
31
30
  expires_at?: number;
31
+ layout?: LayoutEnum;
32
32
  content: Content;
33
33
  updated_at?: number;
34
34
  resource_version?: number;
@@ -77,6 +77,10 @@ declare module 'chargebee' {
77
77
  headers?: ChargebeeRequestHeader,
78
78
  ): Promise<ChargebeeResponse<UpdateCardResponse>>;
79
79
 
80
+ /**
81
+ * @deprecated This method is deprecated and will be removed in a future version.
82
+ */
83
+
80
84
  updatePaymentMethod(
81
85
  input: UpdatePaymentMethodInputParam,
82
86
  headers?: ChargebeeRequestHeader,
@@ -437,6 +441,7 @@ declare module 'chargebee' {
437
441
  addons?: AddonsCheckoutGiftInputParam[];
438
442
  }
439
443
  export interface CheckoutGiftForItemsInputParam {
444
+ layout?: LayoutEnum;
440
445
  business_entity_id?: string;
441
446
  redirect_url?: string;
442
447
  coupon_ids?: string[];