chargebee 3.12.0 → 3.14.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.
- package/CHANGELOG.md +70 -0
- package/README.md +30 -1
- package/cjs/coreCommon.js +1 -1
- package/cjs/environment.js +1 -1
- package/cjs/resources/api_endpoints.js +66 -0
- package/esm/coreCommon.js +1 -1
- package/esm/environment.js +1 -1
- package/esm/resources/api_endpoints.js +66 -0
- package/package.json +2 -2
- package/types/core.d.ts +8 -1
- package/types/index.d.ts +16 -0
- package/types/resources/BusinessEntityChange.d.ts +16 -0
- package/types/resources/Comment.d.ts +0 -9
- package/types/resources/Content.d.ts +110 -0
- package/types/resources/CreditNote.d.ts +3 -1
- package/types/resources/CreditNoteEstimate.d.ts +31 -31
- package/types/resources/Currency.d.ts +11 -5
- package/types/resources/Customer.d.ts +1 -0
- package/types/resources/Estimate.d.ts +2 -0
- package/types/resources/Event.d.ts +208 -1
- package/types/resources/GatewayErrorDetail.d.ts +1 -0
- package/types/resources/HostedPage.d.ts +3 -1
- package/types/resources/Invoice.d.ts +5 -1
- package/types/resources/InvoiceEstimate.d.ts +42 -42
- package/types/resources/OfferEvent.d.ts +25 -0
- package/types/resources/OfferFulfillment.d.ts +77 -0
- package/types/resources/OmnichannelOneTimeOrder.d.ts +1 -13
- package/types/resources/OmnichannelSubscription.d.ts +13 -12
- package/types/resources/OmnichannelSubscriptionItem.d.ts +1 -0
- package/types/resources/OmnichannelSubscriptionItemOffer.d.ts +22 -0
- package/types/resources/OmnichannelTransaction.d.ts +13 -0
- package/types/resources/Order.d.ts +0 -1
- package/types/resources/PersonalizedOffer.d.ts +64 -0
- package/types/resources/Product.d.ts +135 -0
- package/types/resources/Quote.d.ts +35 -34
- package/types/resources/QuoteLineGroup.d.ts +21 -21
- package/types/resources/Ramp.d.ts +46 -0
- package/types/resources/SalesOrder.d.ts +143 -0
- package/types/resources/Subscription.d.ts +1 -1
- package/types/resources/SubscriptionEstimate.d.ts +0 -1
- package/types/resources/Transaction.d.ts +1 -0
- package/types/resources/UsageFile.d.ts +2 -0
- package/types/resources/UsageReminderInfo.d.ts +9 -0
- package/types/resources/Variant.d.ts +116 -0
- package/types/resources/WebhookEvent.d.ts +1619 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,73 @@
|
|
|
1
|
+
### v3.14.0 (2025-09-23)
|
|
2
|
+
* * *
|
|
3
|
+
|
|
4
|
+
### New Resources:
|
|
5
|
+
* PersonalizedOffer has been added.
|
|
6
|
+
* OfferFulfillment has been added.
|
|
7
|
+
* OfferEvent has been added.
|
|
8
|
+
* OmnichannelSubscriptionItemOffer has been added.
|
|
9
|
+
|
|
10
|
+
### New Attributes:
|
|
11
|
+
* business_entity_id has been added to Customer#Balance.
|
|
12
|
+
* processor_advice_code has been added to GatewayErrorDetail.
|
|
13
|
+
* processor_advice_code has been added to Transaction#GatewayErrorDetail.
|
|
14
|
+
* omnichannel_subscription_item_offers has been added to OmnichannelSubscriptionItem.
|
|
15
|
+
* linked_omnichannel_subscriptions has been added to OmnichannelTransaction.
|
|
16
|
+
* linked_omnichannel_one_time_orders has been added to OmnichannelTransaction.
|
|
17
|
+
* contract_term has been added to Ramp.
|
|
18
|
+
* charge_once has been added to Ramp#ItemsToAdd.
|
|
19
|
+
* charge_on_option has been added to Ramp#ItemsToAdd.
|
|
20
|
+
* charge_on_event has been added to Ramp#ItemsToAdd.
|
|
21
|
+
* charge_once has been added to Ramp#ItemsToUpdate.
|
|
22
|
+
* charge_on_option has been added to Ramp#ItemsToUpdate.
|
|
23
|
+
* charge_on_event has been added to Ramp#ItemsToUpdate.
|
|
24
|
+
* error_file_path has been added to UsageFile.
|
|
25
|
+
* error_file_url has been added to UsageFile.
|
|
26
|
+
|
|
27
|
+
### New Endpoint:
|
|
28
|
+
* move has been added to OmnichannelSubscription.
|
|
29
|
+
|
|
30
|
+
### New Parameters:
|
|
31
|
+
* offline_payment_method has been added to Estimate#CreateSubItemEstimateRequest.
|
|
32
|
+
* offline_payment_method has been added to Estimate#CreateSubItemForCustomerEstimateRequest.
|
|
33
|
+
* offline_payment_method has been added to HostedPage#CheckoutNewForItemsRequest.
|
|
34
|
+
* offline_payment_method has been added to Quote#SubscriptionCreateSubItemsForCustomerQuoteRequest.
|
|
35
|
+
* offline_payment_method has been added to Quote#SubscriptionEditCreateSubCustomerQuoteForItemsRequest.
|
|
36
|
+
* contract_term has been added to Ramp#CreateForSubscriptionRequest.
|
|
37
|
+
* items_to_add has been added to Ramp#CreateForSubscriptionRequest.
|
|
38
|
+
* items_to_update has been added to Ramp#CreateForSubscriptionRequest.
|
|
39
|
+
* contract_term has been added to Ramp#UpdateRequest.
|
|
40
|
+
* items_to_add has been added to Ramp#UpdateRequest.
|
|
41
|
+
* items_to_update has been added to Ramp#UpdateRequest.
|
|
42
|
+
|
|
43
|
+
### New Enums:
|
|
44
|
+
* DUNNING_UPDATED has been added EventType.
|
|
45
|
+
* OMNICHANNEL_SUBSCRIPTION_MOVED_IN has been added to EventType.
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
### Bug Fixes:
|
|
49
|
+
* currency list action has been marked as ListRequest.
|
|
50
|
+
* index has been removed from CreditNote#ShippingAddress.
|
|
51
|
+
* index has been removed from Invoice#ShippingAddress
|
|
52
|
+
* index has been removed from Order#ShippingAddress.
|
|
53
|
+
* index has been removed from Quote#ShippingAddress.
|
|
54
|
+
* index has been removed from SubscriptionEstimate#ShippingAddress.
|
|
55
|
+
* index has been removed from Subscription#ShippingAddress.
|
|
56
|
+
|
|
57
|
+
### v3.13.0 (2025-09-15)
|
|
58
|
+
* * *
|
|
59
|
+
|
|
60
|
+
### New Resources:
|
|
61
|
+
* BusinessEntityChange has been added.
|
|
62
|
+
* Product has been added.
|
|
63
|
+
* SalesOrder has been added.
|
|
64
|
+
* UsageReminderInfo has been added.
|
|
65
|
+
* Variant has been added.
|
|
66
|
+
|
|
67
|
+
### New Enhancement:
|
|
68
|
+
* Content of HostedPages and Events now have a type.
|
|
69
|
+
* WebhookEvent has been added for better type mapping with actual event and webhook content.
|
|
70
|
+
|
|
1
71
|
### v3.12.0 (2025-08-19)
|
|
2
72
|
* * *
|
|
3
73
|
|
package/README.md
CHANGED
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
# Chargebee Node.js / TypeScript Client Library
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> [!NOTE]
|
|
4
|
+
> [](https://discord.gg/S3SXDzXHAg)
|
|
5
|
+
>
|
|
6
|
+
> We are trialing a Discord server for developers building with Chargebee. Limited spots are open on a first-come basis. Join [here](https://discord.gg/S3SXDzXHAg) if interested.
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
> [!TIP]
|
|
10
|
+
> If you are using [Next.js](https://nextjs.org/) or [Express](https://expressjs.com/), check out [chargebee-init](https://www.npmjs.com/package/chargebee-init) to get started quickly with the adapters for these frameworks. Learn more about it in this [tutorial](https://www.chargebee.com/tutorials/chargebee-init-nextjs-integration/).
|
|
11
|
+
|
|
4
12
|
|
|
5
13
|
- 📘 For a complete reference of available APIs, check out our [API Documentation](https://apidocs.chargebee.com/docs/api/?lang=node).
|
|
6
14
|
- 🧪 To explore and test API capabilities interactively, head over to our [API Explorer](https://api-explorer.chargebee.com).
|
|
7
15
|
|
|
8
16
|
If you're upgrading from an older version of [`chargebee-typescript`](https://www.npmjs.com/package/chargebee-typescript) or [`chargebee`](https://www.npmjs.com/package/chargebee/v/2.40.0), please refer to the [Migration Guide](https://github.com/chargebee/chargebee-node/wiki/Migration-guide-for-v3).
|
|
9
17
|
|
|
18
|
+
|
|
10
19
|
## Requirements
|
|
11
20
|
|
|
12
21
|
Node.js 18 or higher.
|
|
@@ -209,6 +218,26 @@ try {
|
|
|
209
218
|
}
|
|
210
219
|
```
|
|
211
220
|
|
|
221
|
+
### Webhook Type Mapping
|
|
222
|
+
To improve type safety and gain better autocompletion when working with webhooks, you can leverage the `WebhookEvent` resource. This allows you to strongly type the event content for a particular webhook event.
|
|
223
|
+
|
|
224
|
+
#### Example
|
|
225
|
+
|
|
226
|
+
```ts
|
|
227
|
+
import Chargebee, { type WebhookContentType, WebhookEvent } from "chargebee";
|
|
228
|
+
|
|
229
|
+
const result = await chargebeeInstance.event.retrieve("{event-id}");
|
|
230
|
+
const subscripitonActivatedEvent: WebhookEvent<WebhookContentType.SubscriptionActivated> = result.event;
|
|
231
|
+
const subscription = subscripitonActivatedEvent.content.subscription;
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
#### Notes
|
|
235
|
+
|
|
236
|
+
* `WebhookEvent<T>` provides type hinting for the event payload, making it easier to work with specific event structures.
|
|
237
|
+
* Use the `WebhookContentType` to specify the exact event type (e.g., `SubscriptionCreated`, `InvoiceGenerated`, etc.).
|
|
238
|
+
* This approach ensures you get proper IntelliSense and compile-time checks when accessing event fields.
|
|
239
|
+
|
|
240
|
+
|
|
212
241
|
## Feedback
|
|
213
242
|
|
|
214
243
|
If you find any bugs or have any questions / feedback, open an issue in this repository or reach out to us on dx@chargebee.com
|
package/cjs/coreCommon.js
CHANGED
|
@@ -21,7 +21,7 @@ function throwError(callBack, rawError, headers) {
|
|
|
21
21
|
}
|
|
22
22
|
const handleResponse = async (callback, response) => {
|
|
23
23
|
try {
|
|
24
|
-
const res = await response.toJson();
|
|
24
|
+
const res = response.getStatusCode() === 204 ? response : await response.toJson();
|
|
25
25
|
const status = response.getStatusCode();
|
|
26
26
|
const headers = response.getHeaders();
|
|
27
27
|
if (status && (status < 200 || status > 299)) {
|
package/cjs/environment.js
CHANGED
|
@@ -11,7 +11,7 @@ exports.Environment = {
|
|
|
11
11
|
hostSuffix: '.chargebee.com',
|
|
12
12
|
apiPath: '/api/v2',
|
|
13
13
|
timeout: DEFAULT_TIME_OUT,
|
|
14
|
-
clientVersion: 'v3.
|
|
14
|
+
clientVersion: 'v3.14.0',
|
|
15
15
|
port: DEFAULT_PORT,
|
|
16
16
|
timemachineWaitInMillis: DEFAULT_TIME_MACHINE_WAIT,
|
|
17
17
|
exportWaitInMillis: DEFAULT_EXPORT_WAIT,
|
|
@@ -4645,6 +4645,19 @@ exports.Endpoints = {
|
|
|
4645
4645
|
{},
|
|
4646
4646
|
{},
|
|
4647
4647
|
],
|
|
4648
|
+
[
|
|
4649
|
+
'move',
|
|
4650
|
+
'POST',
|
|
4651
|
+
'/omnichannel_subscriptions',
|
|
4652
|
+
'/move',
|
|
4653
|
+
true,
|
|
4654
|
+
null,
|
|
4655
|
+
false,
|
|
4656
|
+
{},
|
|
4657
|
+
{
|
|
4658
|
+
isIdempotent: true,
|
|
4659
|
+
},
|
|
4660
|
+
],
|
|
4648
4661
|
],
|
|
4649
4662
|
omnichannelTransaction: [],
|
|
4650
4663
|
omnichannelSubscriptionItem: [
|
|
@@ -4755,7 +4768,60 @@ exports.Endpoints = {
|
|
|
4755
4768
|
{},
|
|
4756
4769
|
],
|
|
4757
4770
|
],
|
|
4771
|
+
personalizedOffer: [
|
|
4772
|
+
[
|
|
4773
|
+
'personalizedOffers',
|
|
4774
|
+
'POST',
|
|
4775
|
+
'/personalized_offers',
|
|
4776
|
+
null,
|
|
4777
|
+
false,
|
|
4778
|
+
'grow',
|
|
4779
|
+
true,
|
|
4780
|
+
{
|
|
4781
|
+
custom: 0,
|
|
4782
|
+
},
|
|
4783
|
+
{},
|
|
4784
|
+
],
|
|
4785
|
+
],
|
|
4758
4786
|
brand: [],
|
|
4787
|
+
offerFulfillment: [
|
|
4788
|
+
[
|
|
4789
|
+
'offerFulfillments',
|
|
4790
|
+
'POST',
|
|
4791
|
+
'/offer_fulfillments',
|
|
4792
|
+
null,
|
|
4793
|
+
false,
|
|
4794
|
+
'grow',
|
|
4795
|
+
true,
|
|
4796
|
+
{},
|
|
4797
|
+
{},
|
|
4798
|
+
],
|
|
4799
|
+
[
|
|
4800
|
+
'offerFulfillmentsGet',
|
|
4801
|
+
'GET',
|
|
4802
|
+
'/offer_fulfillments',
|
|
4803
|
+
null,
|
|
4804
|
+
true,
|
|
4805
|
+
'grow',
|
|
4806
|
+
true,
|
|
4807
|
+
{},
|
|
4808
|
+
{},
|
|
4809
|
+
],
|
|
4810
|
+
[
|
|
4811
|
+
'offerFulfillmentsUpdate',
|
|
4812
|
+
'POST',
|
|
4813
|
+
'/offer_fulfillments',
|
|
4814
|
+
null,
|
|
4815
|
+
true,
|
|
4816
|
+
'grow',
|
|
4817
|
+
true,
|
|
4818
|
+
{},
|
|
4819
|
+
{},
|
|
4820
|
+
],
|
|
4821
|
+
],
|
|
4822
|
+
offerEvent: [
|
|
4823
|
+
['offerEvents', 'POST', '/offer_events', null, false, 'grow', true, {}, {}],
|
|
4824
|
+
],
|
|
4759
4825
|
webhookEndpoint: [
|
|
4760
4826
|
[
|
|
4761
4827
|
'create',
|
package/esm/coreCommon.js
CHANGED
|
@@ -17,7 +17,7 @@ export function throwError(callBack, rawError, headers) {
|
|
|
17
17
|
}
|
|
18
18
|
export const handleResponse = async (callback, response) => {
|
|
19
19
|
try {
|
|
20
|
-
const res = await response.toJson();
|
|
20
|
+
const res = response.getStatusCode() === 204 ? response : await response.toJson();
|
|
21
21
|
const status = response.getStatusCode();
|
|
22
22
|
const headers = response.getHeaders();
|
|
23
23
|
if (status && (status < 200 || status > 299)) {
|
package/esm/environment.js
CHANGED
|
@@ -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.
|
|
11
|
+
clientVersion: 'v3.14.0',
|
|
12
12
|
port: DEFAULT_PORT,
|
|
13
13
|
timemachineWaitInMillis: DEFAULT_TIME_MACHINE_WAIT,
|
|
14
14
|
exportWaitInMillis: DEFAULT_EXPORT_WAIT,
|
|
@@ -4642,6 +4642,19 @@ export const Endpoints = {
|
|
|
4642
4642
|
{},
|
|
4643
4643
|
{},
|
|
4644
4644
|
],
|
|
4645
|
+
[
|
|
4646
|
+
'move',
|
|
4647
|
+
'POST',
|
|
4648
|
+
'/omnichannel_subscriptions',
|
|
4649
|
+
'/move',
|
|
4650
|
+
true,
|
|
4651
|
+
null,
|
|
4652
|
+
false,
|
|
4653
|
+
{},
|
|
4654
|
+
{
|
|
4655
|
+
isIdempotent: true,
|
|
4656
|
+
},
|
|
4657
|
+
],
|
|
4645
4658
|
],
|
|
4646
4659
|
omnichannelTransaction: [],
|
|
4647
4660
|
omnichannelSubscriptionItem: [
|
|
@@ -4752,7 +4765,60 @@ export const Endpoints = {
|
|
|
4752
4765
|
{},
|
|
4753
4766
|
],
|
|
4754
4767
|
],
|
|
4768
|
+
personalizedOffer: [
|
|
4769
|
+
[
|
|
4770
|
+
'personalizedOffers',
|
|
4771
|
+
'POST',
|
|
4772
|
+
'/personalized_offers',
|
|
4773
|
+
null,
|
|
4774
|
+
false,
|
|
4775
|
+
'grow',
|
|
4776
|
+
true,
|
|
4777
|
+
{
|
|
4778
|
+
custom: 0,
|
|
4779
|
+
},
|
|
4780
|
+
{},
|
|
4781
|
+
],
|
|
4782
|
+
],
|
|
4755
4783
|
brand: [],
|
|
4784
|
+
offerFulfillment: [
|
|
4785
|
+
[
|
|
4786
|
+
'offerFulfillments',
|
|
4787
|
+
'POST',
|
|
4788
|
+
'/offer_fulfillments',
|
|
4789
|
+
null,
|
|
4790
|
+
false,
|
|
4791
|
+
'grow',
|
|
4792
|
+
true,
|
|
4793
|
+
{},
|
|
4794
|
+
{},
|
|
4795
|
+
],
|
|
4796
|
+
[
|
|
4797
|
+
'offerFulfillmentsGet',
|
|
4798
|
+
'GET',
|
|
4799
|
+
'/offer_fulfillments',
|
|
4800
|
+
null,
|
|
4801
|
+
true,
|
|
4802
|
+
'grow',
|
|
4803
|
+
true,
|
|
4804
|
+
{},
|
|
4805
|
+
{},
|
|
4806
|
+
],
|
|
4807
|
+
[
|
|
4808
|
+
'offerFulfillmentsUpdate',
|
|
4809
|
+
'POST',
|
|
4810
|
+
'/offer_fulfillments',
|
|
4811
|
+
null,
|
|
4812
|
+
true,
|
|
4813
|
+
'grow',
|
|
4814
|
+
true,
|
|
4815
|
+
{},
|
|
4816
|
+
{},
|
|
4817
|
+
],
|
|
4818
|
+
],
|
|
4819
|
+
offerEvent: [
|
|
4820
|
+
['offerEvents', 'POST', '/offer_events', null, false, 'grow', true, {}, {}],
|
|
4821
|
+
],
|
|
4756
4822
|
webhookEndpoint: [
|
|
4757
4823
|
[
|
|
4758
4824
|
'create',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "chargebee",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.14.0",
|
|
4
4
|
"description": "A library for integrating with Chargebee.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"prepack": "npm install && npm run build",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
},
|
|
12
12
|
"types": "./types/index.d.ts",
|
|
13
13
|
"keywords": [
|
|
14
|
-
"
|
|
14
|
+
"payments",
|
|
15
15
|
"billings",
|
|
16
16
|
"subscription",
|
|
17
17
|
"chargebee"
|
package/types/core.d.ts
CHANGED
|
@@ -45,6 +45,7 @@ declare module 'chargebee' {
|
|
|
45
45
|
| 'end_of_term'
|
|
46
46
|
| 'specific_date'
|
|
47
47
|
| 'end_of_billing_term';
|
|
48
|
+
type CategoryEnum = 'introductory' | 'promotional' | 'developer_determined';
|
|
48
49
|
type ChangeOptionEnum = 'immediately' | 'end_of_term' | 'specific_date';
|
|
49
50
|
type ChannelEnum = 'web' | 'app_store' | 'play_store';
|
|
50
51
|
type ChargeModelEnum = 'full_charge' | 'prorate';
|
|
@@ -80,6 +81,7 @@ declare module 'chargebee' {
|
|
|
80
81
|
| 'becs_nz'
|
|
81
82
|
| 'pad'
|
|
82
83
|
| 'not_applicable';
|
|
84
|
+
type DiscountTypeEnum = 'fixed_amount' | 'percentage' | 'price';
|
|
83
85
|
type DispositionTypeEnum = 'attachment' | 'inline';
|
|
84
86
|
type DunningTypeEnum = 'auto_collect' | 'offline' | 'direct_debit';
|
|
85
87
|
type DurationTypeEnum = 'one_time' | 'forever' | 'limited_period';
|
|
@@ -219,6 +221,7 @@ declare module 'chargebee' {
|
|
|
219
221
|
| 'transaction_deleted'
|
|
220
222
|
| 'payment_succeeded'
|
|
221
223
|
| 'payment_failed'
|
|
224
|
+
| 'dunning_updated'
|
|
222
225
|
| 'payment_refunded'
|
|
223
226
|
| 'payment_initiated'
|
|
224
227
|
| 'refund_initiated'
|
|
@@ -356,6 +359,7 @@ declare module 'chargebee' {
|
|
|
356
359
|
| 'omnichannel_one_time_order_item_cancelled'
|
|
357
360
|
| 'usage_file_ingested'
|
|
358
361
|
| 'omnichannel_subscription_item_pause_scheduled'
|
|
362
|
+
| 'omnichannel_subscription_moved_in'
|
|
359
363
|
| 'plan_created'
|
|
360
364
|
| 'plan_updated'
|
|
361
365
|
| 'plan_deleted'
|
|
@@ -611,7 +615,10 @@ declare module 'chargebee' {
|
|
|
611
615
|
| 'automated_bank_transfer'
|
|
612
616
|
| 'klarna_pay_now'
|
|
613
617
|
| 'online_banking_poland'
|
|
614
|
-
| 'payconiq_by_bancontact'
|
|
618
|
+
| 'payconiq_by_bancontact'
|
|
619
|
+
| 'free_trial'
|
|
620
|
+
| 'pay_up_front'
|
|
621
|
+
| 'pay_as_you_go';
|
|
615
622
|
type UnbilledChargesHandlingEnum = 'no_action' | 'invoice';
|
|
616
623
|
type UnbilledChargesOptionEnum = 'invoice' | 'delete';
|
|
617
624
|
type UnpaidInvoicesHandlingEnum = 'no_action' | 'schedule_payment_collection';
|
package/types/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
///<reference path='./resources/BillingConfiguration.d.ts' />
|
|
7
7
|
///<reference path='./resources/Brand.d.ts' />
|
|
8
8
|
///<reference path='./resources/BusinessEntity.d.ts' />
|
|
9
|
+
///<reference path='./resources/BusinessEntityChange.d.ts' />
|
|
9
10
|
///<reference path='./resources/BusinessEntityTransfer.d.ts' />
|
|
10
11
|
///<reference path='./resources/Card.d.ts' />
|
|
11
12
|
///<reference path='./resources/Comment.d.ts' />
|
|
@@ -46,10 +47,13 @@
|
|
|
46
47
|
///<reference path='./resources/ItemPrice.d.ts' />
|
|
47
48
|
///<reference path='./resources/Metadata.d.ts' />
|
|
48
49
|
///<reference path='./resources/NonSubscription.d.ts' />
|
|
50
|
+
///<reference path='./resources/OfferEvent.d.ts' />
|
|
51
|
+
///<reference path='./resources/OfferFulfillment.d.ts' />
|
|
49
52
|
///<reference path='./resources/OmnichannelOneTimeOrder.d.ts' />
|
|
50
53
|
///<reference path='./resources/OmnichannelOneTimeOrderItem.d.ts' />
|
|
51
54
|
///<reference path='./resources/OmnichannelSubscription.d.ts' />
|
|
52
55
|
///<reference path='./resources/OmnichannelSubscriptionItem.d.ts' />
|
|
56
|
+
///<reference path='./resources/OmnichannelSubscriptionItemOffer.d.ts' />
|
|
53
57
|
///<reference path='./resources/OmnichannelSubscriptionItemScheduledChange.d.ts' />
|
|
54
58
|
///<reference path='./resources/OmnichannelTransaction.d.ts' />
|
|
55
59
|
///<reference path='./resources/Order.d.ts' />
|
|
@@ -60,10 +64,12 @@
|
|
|
60
64
|
///<reference path='./resources/PaymentScheduleScheme.d.ts' />
|
|
61
65
|
///<reference path='./resources/PaymentSource.d.ts' />
|
|
62
66
|
///<reference path='./resources/PaymentVoucher.d.ts' />
|
|
67
|
+
///<reference path='./resources/PersonalizedOffer.d.ts' />
|
|
63
68
|
///<reference path='./resources/Plan.d.ts' />
|
|
64
69
|
///<reference path='./resources/PortalSession.d.ts' />
|
|
65
70
|
///<reference path='./resources/PriceVariant.d.ts' />
|
|
66
71
|
///<reference path='./resources/PricingPageSession.d.ts' />
|
|
72
|
+
///<reference path='./resources/Product.d.ts' />
|
|
67
73
|
///<reference path='./resources/PromotionalCredit.d.ts' />
|
|
68
74
|
///<reference path='./resources/Purchase.d.ts' />
|
|
69
75
|
///<reference path='./resources/Quote.d.ts' />
|
|
@@ -75,6 +81,7 @@
|
|
|
75
81
|
///<reference path='./resources/RecordedPurchase.d.ts' />
|
|
76
82
|
///<reference path='./resources/ResourceMigration.d.ts' />
|
|
77
83
|
///<reference path='./resources/Rule.d.ts' />
|
|
84
|
+
///<reference path='./resources/SalesOrder.d.ts' />
|
|
78
85
|
///<reference path='./resources/SiteMigrationDetail.d.ts' />
|
|
79
86
|
///<reference path='./resources/Subscription.d.ts' />
|
|
80
87
|
///<reference path='./resources/SubscriptionEntitlement.d.ts' />
|
|
@@ -90,8 +97,12 @@
|
|
|
90
97
|
///<reference path='./resources/Usage.d.ts' />
|
|
91
98
|
///<reference path='./resources/UsageEvent.d.ts' />
|
|
92
99
|
///<reference path='./resources/UsageFile.d.ts' />
|
|
100
|
+
///<reference path='./resources/UsageReminderInfo.d.ts' />
|
|
101
|
+
///<reference path='./resources/Variant.d.ts' />
|
|
93
102
|
///<reference path='./resources/VirtualBankAccount.d.ts' />
|
|
94
103
|
///<reference path='./resources/WebhookEndpoint.d.ts' />
|
|
104
|
+
///<reference path='./resources/Content.d.ts' />
|
|
105
|
+
///<reference path='./resources/WebhookEvent.d.ts' />
|
|
95
106
|
|
|
96
107
|
export type Config = {
|
|
97
108
|
/**
|
|
@@ -192,6 +203,8 @@ declare module 'chargebee' {
|
|
|
192
203
|
itemFamily: ItemFamily.ItemFamilyResource;
|
|
193
204
|
itemPrice: ItemPrice.ItemPriceResource;
|
|
194
205
|
nonSubscription: NonSubscription.NonSubscriptionResource;
|
|
206
|
+
offerEvent: OfferEvent.OfferEventResource;
|
|
207
|
+
offerFulfillment: OfferFulfillment.OfferFulfillmentResource;
|
|
195
208
|
omnichannelOneTimeOrder: OmnichannelOneTimeOrder.OmnichannelOneTimeOrderResource;
|
|
196
209
|
omnichannelSubscription: OmnichannelSubscription.OmnichannelSubscriptionResource;
|
|
197
210
|
omnichannelSubscriptionItem: OmnichannelSubscriptionItem.OmnichannelSubscriptionItemResource;
|
|
@@ -200,10 +213,12 @@ declare module 'chargebee' {
|
|
|
200
213
|
paymentScheduleScheme: PaymentScheduleScheme.PaymentScheduleSchemeResource;
|
|
201
214
|
paymentSource: PaymentSource.PaymentSourceResource;
|
|
202
215
|
paymentVoucher: PaymentVoucher.PaymentVoucherResource;
|
|
216
|
+
personalizedOffer: PersonalizedOffer.PersonalizedOfferResource;
|
|
203
217
|
plan: Plan.PlanResource;
|
|
204
218
|
portalSession: PortalSession.PortalSessionResource;
|
|
205
219
|
priceVariant: PriceVariant.PriceVariantResource;
|
|
206
220
|
pricingPageSession: PricingPageSession.PricingPageSessionResource;
|
|
221
|
+
product: Product.ProductResource;
|
|
207
222
|
promotionalCredit: PromotionalCredit.PromotionalCreditResource;
|
|
208
223
|
purchase: Purchase.PurchaseResource;
|
|
209
224
|
quote: Quote.QuoteResource;
|
|
@@ -220,6 +235,7 @@ declare module 'chargebee' {
|
|
|
220
235
|
usage: Usage.UsageResource;
|
|
221
236
|
usageEvent: UsageEvent.UsageEventResource;
|
|
222
237
|
usageFile: UsageFile.UsageFileResource;
|
|
238
|
+
variant: Variant.VariantResource;
|
|
223
239
|
virtualBankAccount: VirtualBankAccount.VirtualBankAccountResource;
|
|
224
240
|
webhookEndpoint: WebhookEndpoint.WebhookEndpointResource;
|
|
225
241
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
///<reference path='./../core.d.ts'/>
|
|
2
|
+
///<reference path='./../index.d.ts'/>
|
|
3
|
+
|
|
4
|
+
declare module 'chargebee' {
|
|
5
|
+
export interface BusinessEntityChange {
|
|
6
|
+
id: string;
|
|
7
|
+
business_entity_id: string;
|
|
8
|
+
reason?: 'correction';
|
|
9
|
+
active_from: number;
|
|
10
|
+
active_to?: number;
|
|
11
|
+
resource_type: 'customer' | 'subscription';
|
|
12
|
+
modified_at: number;
|
|
13
|
+
resource_id: string;
|
|
14
|
+
active_resource_id: string;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -77,15 +77,6 @@ declare module 'chargebee' {
|
|
|
77
77
|
| 'coupon'
|
|
78
78
|
| 'order'
|
|
79
79
|
| 'business_entity'
|
|
80
|
-
| 'omnichannel_subscription'
|
|
81
|
-
| 'omnichannel_subscription_item'
|
|
82
|
-
| 'omnichannel_transaction'
|
|
83
|
-
| 'recorded_purchase'
|
|
84
|
-
| 'omnichannel_subscription_item_scheduled_change'
|
|
85
|
-
| 'sales_order'
|
|
86
|
-
| 'omnichannel_one_time_order'
|
|
87
|
-
| 'omnichannel_one_time_order_item'
|
|
88
|
-
| 'usage_file'
|
|
89
80
|
| 'item_family'
|
|
90
81
|
| 'item'
|
|
91
82
|
| 'item_price'
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
///<reference path='./../core.d.ts'/>
|
|
2
|
+
///<reference path='./../index.d.ts'/>
|
|
3
|
+
|
|
4
|
+
declare module 'chargebee' {
|
|
5
|
+
export interface Content {
|
|
6
|
+
addon: Addon;
|
|
7
|
+
address: Address;
|
|
8
|
+
advance_invoice_schedule: AdvanceInvoiceSchedule;
|
|
9
|
+
attached_item: AttachedItem;
|
|
10
|
+
attribute: Attribute;
|
|
11
|
+
billing_configuration: BillingConfiguration;
|
|
12
|
+
brand: Brand;
|
|
13
|
+
business_entity: BusinessEntity;
|
|
14
|
+
business_entity_change: BusinessEntityChange;
|
|
15
|
+
business_entity_transfer: BusinessEntityTransfer;
|
|
16
|
+
card: Card;
|
|
17
|
+
comment: Comment;
|
|
18
|
+
configuration: Configuration;
|
|
19
|
+
contact: Contact;
|
|
20
|
+
contract_term: ContractTerm;
|
|
21
|
+
coupon: Coupon;
|
|
22
|
+
coupon_code: CouponCode;
|
|
23
|
+
coupon_set: CouponSet;
|
|
24
|
+
credit_note: CreditNote;
|
|
25
|
+
credit_note_estimate: CreditNoteEstimate;
|
|
26
|
+
currency: Currency;
|
|
27
|
+
customer: Customer;
|
|
28
|
+
customer_entitlement: CustomerEntitlement;
|
|
29
|
+
differential_price: DifferentialPrice;
|
|
30
|
+
discount: Discount;
|
|
31
|
+
download: Download;
|
|
32
|
+
entitlement: Entitlement;
|
|
33
|
+
entitlement_override: EntitlementOverride;
|
|
34
|
+
estimate: Estimate;
|
|
35
|
+
event: Event;
|
|
36
|
+
export: Export;
|
|
37
|
+
feature: Feature;
|
|
38
|
+
gateway_error_detail: GatewayErrorDetail;
|
|
39
|
+
gift: Gift;
|
|
40
|
+
hierarchy: Hierarchy;
|
|
41
|
+
hosted_page: HostedPage;
|
|
42
|
+
impacted_customer: ImpactedCustomer;
|
|
43
|
+
impacted_item: ImpactedItem;
|
|
44
|
+
impacted_item_price: ImpactedItemPrice;
|
|
45
|
+
impacted_subscription: ImpactedSubscription;
|
|
46
|
+
in_app_subscription: InAppSubscription;
|
|
47
|
+
invoice: Invoice;
|
|
48
|
+
invoice_estimate: InvoiceEstimate;
|
|
49
|
+
item: Item;
|
|
50
|
+
item_entitlement: ItemEntitlement;
|
|
51
|
+
item_family: ItemFamily;
|
|
52
|
+
item_price: ItemPrice;
|
|
53
|
+
metadata: Metadata;
|
|
54
|
+
non_subscription: NonSubscription;
|
|
55
|
+
offer_event: OfferEvent;
|
|
56
|
+
offer_fulfillment: OfferFulfillment;
|
|
57
|
+
omnichannel_one_time_order: OmnichannelOneTimeOrder;
|
|
58
|
+
omnichannel_one_time_order_item: OmnichannelOneTimeOrderItem;
|
|
59
|
+
omnichannel_subscription: OmnichannelSubscription;
|
|
60
|
+
omnichannel_subscription_item: OmnichannelSubscriptionItem;
|
|
61
|
+
omnichannel_subscription_item_offer: OmnichannelSubscriptionItemOffer;
|
|
62
|
+
omnichannel_subscription_item_scheduled_change: OmnichannelSubscriptionItemScheduledChange;
|
|
63
|
+
omnichannel_transaction: OmnichannelTransaction;
|
|
64
|
+
order: Order;
|
|
65
|
+
payment_intent: PaymentIntent;
|
|
66
|
+
payment_reference_number: PaymentReferenceNumber;
|
|
67
|
+
payment_schedule: PaymentSchedule;
|
|
68
|
+
payment_schedule_estimate: PaymentScheduleEstimate;
|
|
69
|
+
payment_schedule_scheme: PaymentScheduleScheme;
|
|
70
|
+
payment_source: PaymentSource;
|
|
71
|
+
payment_voucher: PaymentVoucher;
|
|
72
|
+
personalized_offer: PersonalizedOffer;
|
|
73
|
+
plan: Plan;
|
|
74
|
+
portal_session: PortalSession;
|
|
75
|
+
price_variant: PriceVariant;
|
|
76
|
+
pricing_page_session: PricingPageSession;
|
|
77
|
+
product: Product;
|
|
78
|
+
promotional_credit: PromotionalCredit;
|
|
79
|
+
purchase: Purchase;
|
|
80
|
+
quote: Quote;
|
|
81
|
+
quote_line_group: QuoteLineGroup;
|
|
82
|
+
quoted_charge: QuotedCharge;
|
|
83
|
+
quoted_ramp: QuotedRamp;
|
|
84
|
+
quoted_subscription: QuotedSubscription;
|
|
85
|
+
ramp: Ramp;
|
|
86
|
+
recorded_purchase: RecordedPurchase;
|
|
87
|
+
resource_migration: ResourceMigration;
|
|
88
|
+
rule: Rule;
|
|
89
|
+
sales_order: SalesOrder;
|
|
90
|
+
site_migration_detail: SiteMigrationDetail;
|
|
91
|
+
subscription: Subscription;
|
|
92
|
+
subscription_entitlement: SubscriptionEntitlement;
|
|
93
|
+
subscription_entitlements_created_detail: SubscriptionEntitlementsCreatedDetail;
|
|
94
|
+
subscription_entitlements_updated_detail: SubscriptionEntitlementsUpdatedDetail;
|
|
95
|
+
subscription_estimate: SubscriptionEstimate;
|
|
96
|
+
tax_withheld: TaxWithheld;
|
|
97
|
+
third_party_payment_method: ThirdPartyPaymentMethod;
|
|
98
|
+
time_machine: TimeMachine;
|
|
99
|
+
token: Token;
|
|
100
|
+
transaction: Transaction;
|
|
101
|
+
unbilled_charge: UnbilledCharge;
|
|
102
|
+
usage: Usage;
|
|
103
|
+
usage_event: UsageEvent;
|
|
104
|
+
usage_file: UsageFile;
|
|
105
|
+
usage_reminder_info: UsageReminderInfo;
|
|
106
|
+
variant: Variant;
|
|
107
|
+
virtual_bank_account: VirtualBankAccount;
|
|
108
|
+
webhook_endpoint: WebhookEndpoint;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
///<reference path='./filter.d.ts'/>
|
|
4
4
|
declare module 'chargebee' {
|
|
5
5
|
export interface CreditNote {
|
|
6
|
+
[key: string]: unknown;
|
|
6
7
|
id: string;
|
|
7
8
|
customer_id: string;
|
|
8
9
|
subscription_id?: string;
|
|
@@ -395,7 +396,6 @@ declare module 'chargebee' {
|
|
|
395
396
|
country?: string;
|
|
396
397
|
zip?: string;
|
|
397
398
|
validation_status?: ValidationStatusEnum;
|
|
398
|
-
index: number;
|
|
399
399
|
}
|
|
400
400
|
export interface BillingAddress {
|
|
401
401
|
first_name?: string;
|
|
@@ -450,6 +450,7 @@ declare module 'chargebee' {
|
|
|
450
450
|
currency_code?: string;
|
|
451
451
|
comment?: string;
|
|
452
452
|
line_items?: LineItemsCreateInputParam[];
|
|
453
|
+
[key: `cf_${string}`]: unknown;
|
|
453
454
|
}
|
|
454
455
|
export interface RetrieveInputParam {
|
|
455
456
|
line_item?: LineItemRetrieveInputParam;
|
|
@@ -528,6 +529,7 @@ declare module 'chargebee' {
|
|
|
528
529
|
taxes?: TaxesImportCreditNoteInputParam[];
|
|
529
530
|
allocations?: AllocationsImportCreditNoteInputParam[];
|
|
530
531
|
linked_refunds?: LinkedRefundsImportCreditNoteInputParam[];
|
|
532
|
+
[key: `cf_${string}`]: unknown;
|
|
531
533
|
}
|
|
532
534
|
export interface LineItemsCreateInputParam {
|
|
533
535
|
reference_line_item_id?: string;
|