chargebee 2.40.0 → 3.0.0-beta.1
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 +10 -1
- package/LICENSE +1 -1
- package/README.md +90 -172
- package/cjs/RequestWrapper.js +81 -0
- package/cjs/asyncApiSupport.js +39 -0
- package/cjs/chargebee.cjs.js +13 -0
- package/cjs/chargebee.cjs.worker.js +9 -0
- package/cjs/chargebeeError.js +17 -0
- package/cjs/coreCommon.js +72 -0
- package/cjs/createChargebee.js +92 -0
- package/cjs/environment.js +18 -0
- package/cjs/filter.js +1 -0
- package/cjs/net/ClientInterface.js +40 -0
- package/cjs/net/FetchClient.js +86 -0
- package/cjs/net/NodeClient.js +61 -0
- package/cjs/package.json +1 -0
- package/cjs/resources/api_endpoints.js +1086 -0
- package/cjs/util.js +218 -0
- package/esm/RequestWrapper.js +77 -0
- package/esm/asyncApiSupport.js +35 -0
- package/esm/chargebee.esm.js +9 -0
- package/esm/chargebee.esm.worker.js +5 -0
- package/esm/chargebeeError.js +13 -0
- package/esm/coreCommon.js +67 -0
- package/esm/createChargebee.js +88 -0
- package/esm/environment.js +15 -0
- package/esm/filter.js +1 -0
- package/esm/net/ClientInterface.js +35 -0
- package/esm/net/FetchClient.js +81 -0
- package/esm/net/NodeClient.js +56 -0
- package/esm/package.json +1 -0
- package/esm/resources/api_endpoints.js +1083 -0
- package/esm/util.js +202 -0
- package/package.json +69 -38
- package/types/core.d.ts +558 -89
- package/types/index.d.ts +91 -54
- package/types/resources/Address.d.ts +57 -272
- package/types/resources/AdvanceInvoiceSchedule.d.ts +21 -94
- package/types/resources/AttachedItem.d.ts +91 -329
- package/types/resources/Attribute.d.ts +5 -5
- package/types/resources/BusinessEntity.d.ts +49 -69
- package/types/resources/BusinessEntityTransfer.d.ts +11 -17
- package/types/resources/Card.d.ts +146 -424
- package/types/resources/Comment.d.ts +72 -189
- package/types/resources/Contact.d.ts +12 -64
- package/types/resources/ContractTerm.d.ts +15 -96
- package/types/resources/Coupon.d.ts +282 -758
- package/types/resources/CouponCode.d.ts +56 -52
- package/types/resources/CouponSet.d.ts +92 -234
- package/types/resources/CreditNote.d.ts +588 -1758
- package/types/resources/CreditNoteEstimate.d.ts +131 -157
- package/types/resources/Currency.d.ts +75 -62
- package/types/resources/Customer.d.ts +892 -835
- package/types/resources/CustomerEntitlement.d.ts +36 -0
- package/types/resources/DifferentialPrice.d.ts +116 -314
- package/types/resources/Discount.d.ts +20 -125
- package/types/resources/Download.d.ts +6 -22
- package/types/resources/Entitlement.d.ts +51 -160
- package/types/resources/EntitlementOverride.d.ts +58 -139
- package/types/resources/Estimate.d.ts +1178 -527
- package/types/resources/Event.d.ts +67 -178
- package/types/resources/Export.d.ts +563 -723
- package/types/resources/Feature.d.ts +117 -433
- package/types/resources/GatewayErrorDetail.d.ts +16 -72
- package/types/resources/Gift.d.ts +265 -432
- package/types/resources/Hierarchy.d.ts +8 -36
- package/types/resources/HostedPage.d.ts +1017 -1153
- package/types/resources/ImpactedItem.d.ts +13 -50
- package/types/resources/ImpactedItemPrice.d.ts +13 -15
- package/types/resources/ImpactedSubscription.d.ts +13 -45
- package/types/resources/InAppSubscription.d.ts +93 -389
- package/types/resources/Installment.d.ts +35 -110
- package/types/resources/InstallmentConfig.d.ts +54 -155
- package/types/resources/InstallmentDetail.d.ts +19 -27
- package/types/resources/Invoice.d.ts +1574 -3157
- package/types/resources/InvoiceEstimate.d.ts +131 -161
- package/types/resources/Item.d.ts +133 -611
- package/types/resources/ItemEntitlement.d.ts +78 -215
- package/types/resources/ItemFamily.d.ts +69 -178
- package/types/resources/ItemPrice.d.ts +291 -1203
- package/types/resources/Metadata.d.ts +3 -5
- package/types/resources/Order.d.ts +538 -1471
- package/types/resources/PaymentIntent.d.ts +163 -347
- package/types/resources/PaymentReferenceNumber.d.ts +7 -29
- package/types/resources/PaymentSource.d.ts +476 -1272
- package/types/resources/PaymentVoucher.d.ts +87 -306
- package/types/resources/PortalSession.d.ts +71 -207
- package/types/resources/PriceVariant.d.ts +91 -279
- package/types/resources/PricingPageSession.d.ts +92 -41
- package/types/resources/PromotionalCredit.d.ts +90 -346
- package/types/resources/Purchase.d.ts +185 -315
- package/types/resources/Quote.d.ts +1406 -887
- package/types/resources/QuoteLineGroup.d.ts +125 -452
- package/types/resources/QuotedCharge.d.ts +45 -274
- package/types/resources/QuotedSubscription.d.ts +100 -488
- package/types/resources/Ramp.d.ts +233 -724
- package/types/resources/ResourceMigration.d.ts +25 -80
- package/types/resources/SiteMigrationDetail.d.ts +34 -112
- package/types/resources/Subscription.d.ts +2390 -4335
- package/types/resources/SubscriptionEntitlement.d.ts +59 -160
- package/types/resources/SubscriptionEstimate.d.ts +51 -75
- package/types/resources/TaxWithheld.d.ts +15 -40
- package/types/resources/ThirdPartyPaymentMethod.d.ts +7 -29
- package/types/resources/TimeMachine.d.ts +43 -97
- package/types/resources/Token.d.ts +15 -85
- package/types/resources/Transaction.d.ts +278 -900
- package/types/resources/UnbilledCharge.d.ts +189 -164
- package/types/resources/Usage.d.ts +89 -279
- package/types/resources/VirtualBankAccount.d.ts +103 -255
- package/types/resources/filter.d.ts +52 -0
- package/.github/ISSUE_TEMPLATE/bug_report.yml +0 -81
- package/.github/ISSUE_TEMPLATE/config.yml +0 -6
- package/.github/ISSUE_TEMPLATE/feature_request.yml +0 -34
- package/.github/PULL_REQUEST_TEMPLATE.md +0 -8
- package/lib/chargebee.js +0 -512
- package/lib/resources/api_endpoints.js +0 -2912
- package/types/resources/NonSubscription.d.ts +0 -30
- package/types/resources/Session.d.ts +0 -41
|
@@ -1,91 +1,36 @@
|
|
|
1
1
|
///<reference path='./../core.d.ts'/>
|
|
2
|
+
///<reference path='./../index.d.ts'/>
|
|
3
|
+
|
|
2
4
|
declare module 'chargebee' {
|
|
3
5
|
export interface ResourceMigration {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @description Type of the entity this record is stored for \* customer - Entity that represents a customer
|
|
14
|
-
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
entity_type:'customer';
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* @description Handle of the customer in the current site.
|
|
21
|
-
|
|
22
|
-
*/
|
|
23
|
-
|
|
24
|
-
entity_id:string;
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* @description Status of the copy customer process. \* failed - Failed \* succeeded - Succeeded \* scheduled - Scheduled
|
|
28
|
-
|
|
29
|
-
*/
|
|
30
|
-
|
|
31
|
-
status:'scheduled' | 'failed' | 'succeeded';
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* @description Filled only if the copy operation gets failed
|
|
35
|
-
|
|
36
|
-
*/
|
|
37
|
-
|
|
38
|
-
errors?:string;
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* @description Time the log is created
|
|
42
|
-
|
|
43
|
-
*/
|
|
44
|
-
|
|
45
|
-
created_at:number;
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* @description Time the log is updated
|
|
49
|
-
|
|
50
|
-
*/
|
|
51
|
-
|
|
52
|
-
updated_at:number;
|
|
6
|
+
from_site: string;
|
|
7
|
+
entity_type: 'customer';
|
|
8
|
+
entity_id: string;
|
|
9
|
+
status: 'scheduled' | 'failed' | 'succeeded';
|
|
10
|
+
errors?: string;
|
|
11
|
+
created_at: number;
|
|
12
|
+
updated_at: number;
|
|
53
13
|
}
|
|
54
|
-
export namespace ResourceMigration {
|
|
55
|
-
export class ResourceMigrationResource {
|
|
56
|
-
/**
|
|
57
|
-
* @description Gets the last migration details.
|
|
58
14
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
15
|
+
export namespace ResourceMigration {
|
|
16
|
+
export class ResourceMigrationResource {
|
|
17
|
+
retrieveLatest(
|
|
18
|
+
input: RetrieveLatestInputParam,
|
|
19
|
+
headers?: ChargebeeRequestHeader,
|
|
20
|
+
): Promise<ChargebeeResponse<RetrieveLatestResponse>>;
|
|
65
21
|
}
|
|
66
|
-
export interface RetrieveLatestInputParam {
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* @description Gets the last migration details.
|
|
70
22
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* @description Gets the last migration details.
|
|
23
|
+
export interface RetrieveLatestResponse {
|
|
24
|
+
resource_migration: ResourceMigration;
|
|
25
|
+
}
|
|
77
26
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
entity_type:'customer';
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* @description Gets the last migration details.
|
|
27
|
+
// REQUEST PARAMS
|
|
28
|
+
//---------------
|
|
84
29
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
30
|
+
export interface RetrieveLatestInputParam {
|
|
31
|
+
from_site: string;
|
|
32
|
+
entity_type: 'customer';
|
|
33
|
+
entity_id: string;
|
|
88
34
|
}
|
|
89
|
-
|
|
90
35
|
}
|
|
91
|
-
}
|
|
36
|
+
}
|
|
@@ -1,124 +1,46 @@
|
|
|
1
1
|
///<reference path='./../core.d.ts'/>
|
|
2
|
+
///<reference path='./../index.d.ts'/>
|
|
3
|
+
///<reference path='./filter.d.ts'/>
|
|
2
4
|
declare module 'chargebee' {
|
|
3
5
|
export interface SiteMigrationDetail {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
other_site_name:string;
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* @description Entity Id of the record in the other site.
|
|
21
|
-
|
|
22
|
-
*/
|
|
23
|
-
|
|
24
|
-
entity_id_at_other_site:string;
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* @description Date in which the record is copied
|
|
28
|
-
|
|
29
|
-
*/
|
|
30
|
-
|
|
31
|
-
migrated_at:number;
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* @description Entity Type of the record \* order - Entity that represents an order \* customer - Entity that represents a customer \* invoice - Invoice description \* subscription - Entity that represents a subscription of a customer \* transaction - Entity that represents a transaction. \* credit_note - Credit note description
|
|
35
|
-
|
|
36
|
-
*/
|
|
37
|
-
|
|
38
|
-
entity_type:'credit_note' | 'subscription' | 'invoice' | 'transaction' | 'customer' | 'order';
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* @description Status of the migration \* moving_out - Moving out from one cb site to another \* moved_in - Moved in from another cb site \* moved_out - Moved out from one cb site to another
|
|
42
|
-
|
|
43
|
-
*/
|
|
44
|
-
|
|
45
|
-
status:'moving_out' | 'moved_in' | 'moved_out';
|
|
6
|
+
entity_id: string;
|
|
7
|
+
other_site_name: string;
|
|
8
|
+
entity_id_at_other_site: string;
|
|
9
|
+
migrated_at: number;
|
|
10
|
+
entity_type:
|
|
11
|
+
| 'customer'
|
|
12
|
+
| 'subscription'
|
|
13
|
+
| 'invoice'
|
|
14
|
+
| 'credit_note'
|
|
15
|
+
| 'transaction'
|
|
16
|
+
| 'order';
|
|
17
|
+
status: 'moved_in' | 'moved_out' | 'moving_out';
|
|
46
18
|
}
|
|
47
|
-
export namespace SiteMigrationDetail {
|
|
48
|
-
export class SiteMigrationDetailResource {
|
|
49
|
-
/**
|
|
50
|
-
* @description This endpoint lists the site migration details.
|
|
51
19
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
list(
|
|
20
|
+
export namespace SiteMigrationDetail {
|
|
21
|
+
export class SiteMigrationDetailResource {
|
|
22
|
+
list(
|
|
23
|
+
input?: ListInputParam,
|
|
24
|
+
headers?: ChargebeeRequestHeader,
|
|
25
|
+
): Promise<ChargebeeResponse<ListResponse>>;
|
|
55
26
|
}
|
|
56
|
-
export interface ListResponse {
|
|
57
|
-
/**
|
|
58
|
-
* @description This endpoint lists the site migration details.
|
|
59
27
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* @description This endpoint lists the site migration details.
|
|
66
|
-
|
|
67
|
-
*/
|
|
68
|
-
|
|
69
|
-
next_offset?:string;
|
|
28
|
+
export interface ListResponse {
|
|
29
|
+
list: { site_migration_detail: SiteMigrationDetail }[];
|
|
30
|
+
next_offset?: string;
|
|
70
31
|
}
|
|
71
|
-
export interface ListInputParam {
|
|
72
|
-
[key : string]: any;
|
|
73
|
-
/**
|
|
74
|
-
* @description This endpoint lists the site migration details.
|
|
75
|
-
|
|
76
|
-
*/
|
|
77
|
-
|
|
78
|
-
limit?:number;
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* @description This endpoint lists the site migration details.
|
|
82
|
-
|
|
83
|
-
*/
|
|
84
|
-
|
|
85
|
-
offset?:string;
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* @description This endpoint lists the site migration details.
|
|
89
32
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
entity_id_at_other_site?:{is?:string,is_not?:string,starts_with?:string};
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
* @description This endpoint lists the site migration details.
|
|
33
|
+
// REQUEST PARAMS
|
|
34
|
+
//---------------
|
|
96
35
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
entity_id?:{is?:string,is_not?:string,starts_with?:string};
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
* @description This endpoint lists the site migration details.
|
|
110
|
-
|
|
111
|
-
*/
|
|
112
|
-
|
|
113
|
-
entity_type?:{in?:string,is?:'credit_note' | 'subscription' | 'invoice' | 'transaction' | 'customer' | 'order',is_not?:'credit_note' | 'subscription' | 'invoice' | 'transaction' | 'customer' | 'order',not_in?:string};
|
|
114
|
-
|
|
115
|
-
/**
|
|
116
|
-
* @description This endpoint lists the site migration details.
|
|
117
|
-
|
|
118
|
-
*/
|
|
119
|
-
|
|
120
|
-
status?:{in?:string,is?:'moving_out' | 'moved_in' | 'moved_out',is_not?:'moving_out' | 'moved_in' | 'moved_out',not_in?:string};
|
|
36
|
+
export interface ListInputParam {
|
|
37
|
+
limit?: number;
|
|
38
|
+
offset?: string;
|
|
39
|
+
entity_id_at_other_site?: filter.String;
|
|
40
|
+
other_site_name?: filter.String;
|
|
41
|
+
entity_id?: filter.String;
|
|
42
|
+
entity_type?: filter.Enum;
|
|
43
|
+
status?: filter.Enum;
|
|
121
44
|
}
|
|
122
|
-
|
|
123
45
|
}
|
|
124
|
-
}
|
|
46
|
+
}
|