chargebee 3.11.0 → 3.12.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 +64 -0
- package/cjs/environment.js +1 -1
- package/cjs/resources/api_endpoints.js +75 -4
- package/cjs/util.js +5 -14
- package/esm/environment.js +1 -1
- package/esm/resources/api_endpoints.js +75 -4
- package/esm/util.js +5 -14
- package/package.json +5 -1
- package/types/core.d.ts +8 -1
- package/types/index.d.ts +8 -0
- package/types/resources/Comment.d.ts +4 -0
- package/types/resources/CreditNote.d.ts +83 -76
- package/types/resources/Customer.d.ts +1 -0
- package/types/resources/CustomerEntitlement.d.ts +1 -0
- package/types/resources/Discount.d.ts +2 -1
- package/types/resources/Estimate.d.ts +4 -0
- package/types/resources/HostedPage.d.ts +3 -0
- package/types/resources/ImpactedCustomer.d.ts +19 -0
- package/types/resources/Invoice.d.ts +86 -79
- package/types/resources/OmnichannelOneTimeOrder.d.ts +62 -0
- package/types/resources/OmnichannelOneTimeOrderItem.d.ts +20 -0
- package/types/resources/OmnichannelSubscriptionItemScheduledChange.d.ts +1 -1
- package/types/resources/PricingPageSession.d.ts +2 -0
- package/types/resources/PromotionalCredit.d.ts +1 -0
- package/types/resources/Purchase.d.ts +2 -0
- package/types/resources/Quote.d.ts +6 -0
- package/types/resources/QuotedCharge.d.ts +5 -0
- package/types/resources/RecordedPurchase.d.ts +6 -0
- package/types/resources/Subscription.d.ts +9 -2
- package/types/resources/SubscriptionEntitlementsCreatedDetail.d.ts +9 -0
- package/types/resources/SubscriptionEntitlementsUpdatedDetail.d.ts +9 -0
- package/types/resources/UsageFile.d.ts +8 -8
- package/types/resources/WebhookEndpoint.d.ts +98 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
///<reference path='./../core.d.ts'/>
|
|
2
|
+
///<reference path='./../index.d.ts'/>
|
|
3
|
+
|
|
4
|
+
declare module 'chargebee' {
|
|
5
|
+
export interface OmnichannelOneTimeOrderItem {
|
|
6
|
+
id: string;
|
|
7
|
+
item_id_at_source: string;
|
|
8
|
+
item_type_at_source?: string;
|
|
9
|
+
quantity?: number;
|
|
10
|
+
cancelled_at?: number;
|
|
11
|
+
cancellation_reason?:
|
|
12
|
+
| 'customer_cancelled'
|
|
13
|
+
| 'customer_did_not_consent_to_price_increase'
|
|
14
|
+
| 'refunded_due_to_app_issue'
|
|
15
|
+
| 'refunded_for_other_reason'
|
|
16
|
+
| 'merchant_revoked';
|
|
17
|
+
created_at: number;
|
|
18
|
+
resource_version?: number;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -106,6 +106,7 @@ declare module 'chargebee' {
|
|
|
106
106
|
period_unit?: PeriodUnitEnum;
|
|
107
107
|
included_in_mrr?: boolean;
|
|
108
108
|
item_price_id?: string;
|
|
109
|
+
quantity?: number;
|
|
109
110
|
label?: string;
|
|
110
111
|
}
|
|
111
112
|
export interface PricingPageCreateForExistingSubscriptionInputParam {
|
|
@@ -124,6 +125,7 @@ declare module 'chargebee' {
|
|
|
124
125
|
period_unit?: PeriodUnitEnum;
|
|
125
126
|
included_in_mrr?: boolean;
|
|
126
127
|
item_price_id?: string;
|
|
128
|
+
quantity?: number;
|
|
127
129
|
label?: string;
|
|
128
130
|
}
|
|
129
131
|
}
|
|
@@ -126,6 +126,7 @@ declare module 'chargebee' {
|
|
|
126
126
|
index?: number;
|
|
127
127
|
coupon_id?: string;
|
|
128
128
|
percentage?: number;
|
|
129
|
+
quantity?: number;
|
|
129
130
|
amount?: number;
|
|
130
131
|
included_in_mrr?: boolean;
|
|
131
132
|
}
|
|
@@ -199,6 +200,7 @@ declare module 'chargebee' {
|
|
|
199
200
|
index?: number;
|
|
200
201
|
coupon_id?: string;
|
|
201
202
|
percentage?: number;
|
|
203
|
+
quantity?: number;
|
|
202
204
|
amount?: number;
|
|
203
205
|
included_in_mrr?: boolean;
|
|
204
206
|
}
|
|
@@ -1150,6 +1150,7 @@ declare module 'chargebee' {
|
|
|
1150
1150
|
period_unit?: PeriodUnitEnum;
|
|
1151
1151
|
included_in_mrr?: boolean;
|
|
1152
1152
|
item_price_id?: string;
|
|
1153
|
+
quantity?: number;
|
|
1153
1154
|
start_date?: number;
|
|
1154
1155
|
end_date?: number;
|
|
1155
1156
|
}
|
|
@@ -1247,6 +1248,7 @@ declare module 'chargebee' {
|
|
|
1247
1248
|
period_unit?: PeriodUnitEnum;
|
|
1248
1249
|
included_in_mrr?: boolean;
|
|
1249
1250
|
item_price_id?: string;
|
|
1251
|
+
quantity?: number;
|
|
1250
1252
|
start_date?: number;
|
|
1251
1253
|
end_date?: number;
|
|
1252
1254
|
}
|
|
@@ -1354,6 +1356,7 @@ declare module 'chargebee' {
|
|
|
1354
1356
|
period_unit?: PeriodUnitEnum;
|
|
1355
1357
|
included_in_mrr?: boolean;
|
|
1356
1358
|
item_price_id?: string;
|
|
1359
|
+
quantity?: number;
|
|
1357
1360
|
operation_type: OperationTypeEnum;
|
|
1358
1361
|
id?: string;
|
|
1359
1362
|
start_date?: number;
|
|
@@ -1462,6 +1465,7 @@ declare module 'chargebee' {
|
|
|
1462
1465
|
period_unit?: PeriodUnitEnum;
|
|
1463
1466
|
included_in_mrr?: boolean;
|
|
1464
1467
|
item_price_id?: string;
|
|
1468
|
+
quantity?: number;
|
|
1465
1469
|
operation_type: OperationTypeEnum;
|
|
1466
1470
|
id?: string;
|
|
1467
1471
|
start_date?: number;
|
|
@@ -1528,6 +1532,7 @@ declare module 'chargebee' {
|
|
|
1528
1532
|
}
|
|
1529
1533
|
export interface DiscountsCreateForChargeItemsAndChargesInputParam {
|
|
1530
1534
|
percentage?: number;
|
|
1535
|
+
quantity?: number;
|
|
1531
1536
|
amount?: number;
|
|
1532
1537
|
apply_on: ApplyOnEnum;
|
|
1533
1538
|
item_price_id?: string;
|
|
@@ -1600,6 +1605,7 @@ declare module 'chargebee' {
|
|
|
1600
1605
|
}
|
|
1601
1606
|
export interface DiscountsEditForChargeItemsAndChargesInputParam {
|
|
1602
1607
|
percentage?: number;
|
|
1608
|
+
quantity?: number;
|
|
1603
1609
|
amount?: number;
|
|
1604
1610
|
apply_on: ApplyOnEnum;
|
|
1605
1611
|
item_price_id?: string;
|
|
@@ -8,6 +8,7 @@ declare module 'chargebee' {
|
|
|
8
8
|
invoice_items?: QuotedCharge.InvoiceItem[];
|
|
9
9
|
item_tiers?: QuotedCharge.ItemTier[];
|
|
10
10
|
coupons?: QuotedCharge.Coupon[];
|
|
11
|
+
coupon_applicability_mappings?: QuotedCharge.CouponApplicabilityMapping[];
|
|
11
12
|
}
|
|
12
13
|
|
|
13
14
|
export namespace QuotedCharge {
|
|
@@ -52,6 +53,10 @@ declare module 'chargebee' {
|
|
|
52
53
|
export interface Coupon {
|
|
53
54
|
coupon_id: string;
|
|
54
55
|
}
|
|
56
|
+
export interface CouponApplicabilityMapping {
|
|
57
|
+
coupon_id?: string;
|
|
58
|
+
applicable_item_price_ids?: string[];
|
|
59
|
+
}
|
|
55
60
|
// REQUEST PARAMS
|
|
56
61
|
//---------------
|
|
57
62
|
}
|
|
@@ -12,6 +12,7 @@ declare module 'chargebee' {
|
|
|
12
12
|
created_at: number;
|
|
13
13
|
resource_version?: number;
|
|
14
14
|
linked_omnichannel_subscriptions?: RecordedPurchase.LinkedOmnichannelSubscription[];
|
|
15
|
+
linked_omnichannel_one_time_orders?: RecordedPurchase.LinkedOmnichannelOneTimeOrder[];
|
|
15
16
|
error_detail?: RecordedPurchase.ErrorDetail;
|
|
16
17
|
}
|
|
17
18
|
|
|
@@ -40,6 +41,9 @@ declare module 'chargebee' {
|
|
|
40
41
|
export interface LinkedOmnichannelSubscription {
|
|
41
42
|
omnichannel_subscription_id?: string;
|
|
42
43
|
}
|
|
44
|
+
export interface LinkedOmnichannelOneTimeOrder {
|
|
45
|
+
omnichannel_one_time_order_id?: string;
|
|
46
|
+
}
|
|
43
47
|
export interface ErrorDetail {
|
|
44
48
|
error_message?: string;
|
|
45
49
|
}
|
|
@@ -58,6 +62,8 @@ declare module 'chargebee' {
|
|
|
58
62
|
}
|
|
59
63
|
export interface GooglePlayStoreCreateInputParam {
|
|
60
64
|
purchase_token?: string;
|
|
65
|
+
product_id?: string;
|
|
66
|
+
order_id?: string;
|
|
61
67
|
}
|
|
62
68
|
export interface AppleAppStoreCreateInputParam {
|
|
63
69
|
transaction_id?: string;
|
|
@@ -689,9 +689,10 @@ declare module 'chargebee' {
|
|
|
689
689
|
export interface Discount {
|
|
690
690
|
id: string;
|
|
691
691
|
invoice_name?: string;
|
|
692
|
-
type: 'fixed_amount' | 'percentage';
|
|
692
|
+
type: 'fixed_amount' | 'percentage' | 'offer_quantity';
|
|
693
693
|
percentage?: number;
|
|
694
694
|
amount?: number;
|
|
695
|
+
quantity?: number;
|
|
695
696
|
currency_code?: string;
|
|
696
697
|
duration_type: 'one_time' | 'forever' | 'limited_period';
|
|
697
698
|
period?: number;
|
|
@@ -1659,6 +1660,7 @@ declare module 'chargebee' {
|
|
|
1659
1660
|
period_unit?: PeriodUnitEnum;
|
|
1660
1661
|
included_in_mrr?: boolean;
|
|
1661
1662
|
item_price_id?: string;
|
|
1663
|
+
quantity?: number;
|
|
1662
1664
|
}
|
|
1663
1665
|
export interface CouponsCreateWithItemsInputParam {
|
|
1664
1666
|
/**
|
|
@@ -2003,6 +2005,7 @@ declare module 'chargebee' {
|
|
|
2003
2005
|
period_unit?: PeriodUnitEnum;
|
|
2004
2006
|
included_in_mrr?: boolean;
|
|
2005
2007
|
item_price_id?: string;
|
|
2008
|
+
quantity?: number;
|
|
2006
2009
|
operation_type: OperationTypeEnum;
|
|
2007
2010
|
id?: string;
|
|
2008
2011
|
}
|
|
@@ -2341,7 +2344,10 @@ declare module 'chargebee' {
|
|
|
2341
2344
|
| 'adhoc'
|
|
2342
2345
|
| 'plan_item_price'
|
|
2343
2346
|
| 'addon_item_price'
|
|
2344
|
-
| 'charge_item_price'
|
|
2347
|
+
| 'charge_item_price'
|
|
2348
|
+
| 'plan_setup'
|
|
2349
|
+
| 'plan'
|
|
2350
|
+
| 'addon';
|
|
2345
2351
|
entity_id?: string;
|
|
2346
2352
|
description?: string;
|
|
2347
2353
|
unit_amount?: number;
|
|
@@ -2412,6 +2418,7 @@ declare module 'chargebee' {
|
|
|
2412
2418
|
period_unit?: PeriodUnitEnum;
|
|
2413
2419
|
included_in_mrr?: boolean;
|
|
2414
2420
|
item_price_id?: string;
|
|
2421
|
+
quantity?: number;
|
|
2415
2422
|
}
|
|
2416
2423
|
export interface CouponsImportForItemsInputParam {
|
|
2417
2424
|
/**
|
|
@@ -22,22 +22,22 @@ declare module 'chargebee' {
|
|
|
22
22
|
|
|
23
23
|
export namespace UsageFile {
|
|
24
24
|
export class UsageFileResource {
|
|
25
|
-
|
|
26
|
-
input:
|
|
25
|
+
uploadUrl(
|
|
26
|
+
input: UploadUrlInputParam,
|
|
27
27
|
headers?: ChargebeeRequestHeader,
|
|
28
|
-
): Promise<ChargebeeResponse<
|
|
28
|
+
): Promise<ChargebeeResponse<UploadUrlResponse>>;
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
processingStatus(
|
|
31
31
|
usage_file_id: string,
|
|
32
32
|
headers?: ChargebeeRequestHeader,
|
|
33
|
-
): Promise<ChargebeeResponse<
|
|
33
|
+
): Promise<ChargebeeResponse<ProcessingStatusResponse>>;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
export interface
|
|
36
|
+
export interface UploadUrlResponse {
|
|
37
37
|
usage_file: UsageFile;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
export interface
|
|
40
|
+
export interface ProcessingStatusResponse {
|
|
41
41
|
usage_file: UsageFile;
|
|
42
42
|
}
|
|
43
43
|
|
|
@@ -48,7 +48,7 @@ declare module 'chargebee' {
|
|
|
48
48
|
// REQUEST PARAMS
|
|
49
49
|
//---------------
|
|
50
50
|
|
|
51
|
-
export interface
|
|
51
|
+
export interface UploadUrlInputParam {
|
|
52
52
|
file_name: string;
|
|
53
53
|
mime_type: string;
|
|
54
54
|
}
|
|
@@ -0,0 +1,98 @@
|
|
|
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 WebhookEndpoint {
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
url: string;
|
|
9
|
+
send_card_resource?: boolean;
|
|
10
|
+
disabled: boolean;
|
|
11
|
+
primary_url: boolean;
|
|
12
|
+
api_version: 'v1' | 'v2';
|
|
13
|
+
chargebee_response_schema_type?: ChargebeeResponseSchemaTypeEnum;
|
|
14
|
+
enabled_events?: EventTypeEnum[];
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export namespace WebhookEndpoint {
|
|
18
|
+
export class WebhookEndpointResource {
|
|
19
|
+
create(
|
|
20
|
+
input: CreateInputParam,
|
|
21
|
+
headers?: ChargebeeRequestHeader,
|
|
22
|
+
): Promise<ChargebeeResponse<CreateResponse>>;
|
|
23
|
+
|
|
24
|
+
update(
|
|
25
|
+
webhook_endpoint_id: string,
|
|
26
|
+
input?: UpdateInputParam,
|
|
27
|
+
headers?: ChargebeeRequestHeader,
|
|
28
|
+
): Promise<ChargebeeResponse<UpdateResponse>>;
|
|
29
|
+
|
|
30
|
+
retrieve(
|
|
31
|
+
webhook_endpoint_id: string,
|
|
32
|
+
headers?: ChargebeeRequestHeader,
|
|
33
|
+
): Promise<ChargebeeResponse<RetrieveResponse>>;
|
|
34
|
+
|
|
35
|
+
delete(
|
|
36
|
+
webhook_endpoint_id: string,
|
|
37
|
+
headers?: ChargebeeRequestHeader,
|
|
38
|
+
): Promise<ChargebeeResponse<DeleteResponse>>;
|
|
39
|
+
|
|
40
|
+
list(
|
|
41
|
+
input?: ListInputParam,
|
|
42
|
+
headers?: ChargebeeRequestHeader,
|
|
43
|
+
): Promise<ChargebeeResponse<ListResponse>>;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface CreateResponse {
|
|
47
|
+
webhook_endpoint: WebhookEndpoint;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface UpdateResponse {
|
|
51
|
+
webhook_endpoint: WebhookEndpoint;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface RetrieveResponse {
|
|
55
|
+
webhook_endpoint: WebhookEndpoint;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface DeleteResponse {
|
|
59
|
+
webhook_endpoint: WebhookEndpoint;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export interface ListResponse {
|
|
63
|
+
list: { webhook_endpoint: WebhookEndpoint }[];
|
|
64
|
+
next_offset?: string;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// REQUEST PARAMS
|
|
68
|
+
//---------------
|
|
69
|
+
|
|
70
|
+
export interface CreateInputParam {
|
|
71
|
+
name: string;
|
|
72
|
+
api_version?: 'v1' | 'v2';
|
|
73
|
+
url: string;
|
|
74
|
+
primary_url?: boolean;
|
|
75
|
+
disabled?: boolean;
|
|
76
|
+
basic_auth_password?: string;
|
|
77
|
+
basic_auth_username?: string;
|
|
78
|
+
send_card_resource?: boolean;
|
|
79
|
+
chargebee_response_schema_type?: ChargebeeResponseSchemaTypeEnum;
|
|
80
|
+
enabled_events?: EventTypeEnum[];
|
|
81
|
+
}
|
|
82
|
+
export interface UpdateInputParam {
|
|
83
|
+
name?: string;
|
|
84
|
+
api_version?: 'v1' | 'v2';
|
|
85
|
+
url?: string;
|
|
86
|
+
primary_url?: boolean;
|
|
87
|
+
send_card_resource?: boolean;
|
|
88
|
+
basic_auth_password?: string;
|
|
89
|
+
basic_auth_username?: string;
|
|
90
|
+
disabled?: boolean;
|
|
91
|
+
enabled_events?: EventTypeEnum[];
|
|
92
|
+
}
|
|
93
|
+
export interface ListInputParam {
|
|
94
|
+
limit?: number;
|
|
95
|
+
offset?: string;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|