@wireapp/api-client 27.46.0 → 27.47.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.
|
@@ -11,19 +11,8 @@ export declare class BillingAPI {
|
|
|
11
11
|
private readonly client;
|
|
12
12
|
static readonly DEFAULT_INVOICES_CHUNK_SIZE = 10;
|
|
13
13
|
constructor(client: HttpClient);
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
CURRENCIES: string;
|
|
17
|
-
INFO: string;
|
|
18
|
-
CARD: string;
|
|
19
|
-
COUPON: string;
|
|
20
|
-
INVOICES: string;
|
|
21
|
-
PLAN: string;
|
|
22
|
-
LIST: string;
|
|
23
|
-
TEAMS: string;
|
|
24
|
-
TEAM: string;
|
|
25
|
-
UPCOMING: string;
|
|
26
|
-
};
|
|
14
|
+
getBilling(teamId: string): Promise<any>;
|
|
15
|
+
getBillingEmbedded(teamId: string, planId: string): Promise<any>;
|
|
27
16
|
getBillingTeam(teamId: string): Promise<BillingTeamData>;
|
|
28
17
|
putBillingInfo(teamId: string, billingInfo: BillingData): Promise<BillingData>;
|
|
29
18
|
getBillingInfo(teamId: string): Promise<BillingData>;
|
|
@@ -42,5 +31,6 @@ export declare class BillingAPI {
|
|
|
42
31
|
getSupportedCurrencies(teamId: string): Promise<SupportedCurrency[]>;
|
|
43
32
|
getUpcomingInvoice(teamId: string): Promise<InvoiceUpcomingData>;
|
|
44
33
|
getInvoices(teamId: string, limit?: number, startAfterInvoiceId?: string): Promise<InvoiceListData>;
|
|
34
|
+
getPortalUrl(teamId: string): Promise<any>;
|
|
45
35
|
}
|
|
46
36
|
//# sourceMappingURL=BillingAPI.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BillingAPI.d.ts","sourceRoot":"","sources":["../../../src/team/billing/BillingAPI.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAC,eAAe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CAAC;IAUpE,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAUhE,WAAW,CACtB,MAAM,EAAE,MAAM,EACd,KAAK,GAAE,MAA+C,EACtD,mBAAmB,CAAC,EAAE,MAAM,GAC3B,OAAO,CAAC,eAAe,CAAC;IAcd,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;CASxD"}
|
|
@@ -25,23 +25,29 @@ class BillingAPI {
|
|
|
25
25
|
constructor(client) {
|
|
26
26
|
this.client = client;
|
|
27
27
|
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
28
|
+
async getBilling(teamId) {
|
|
29
|
+
const config = {
|
|
30
|
+
method: 'get',
|
|
31
|
+
url: `/teams/${teamId}/billing/checkout`,
|
|
32
|
+
};
|
|
33
|
+
const response = await this.client.sendJSON(config);
|
|
34
|
+
return response.data;
|
|
35
|
+
}
|
|
36
|
+
async getBillingEmbedded(teamId, planId) {
|
|
37
|
+
const config = {
|
|
38
|
+
method: 'POST',
|
|
39
|
+
url: `/teams/${teamId}/billing/checkout/embedded`,
|
|
40
|
+
data: {
|
|
41
|
+
planId,
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
const response = await this.client.sendJSON(config);
|
|
45
|
+
return response.data;
|
|
46
|
+
}
|
|
41
47
|
async getBillingTeam(teamId) {
|
|
42
48
|
const config = {
|
|
43
49
|
method: 'get',
|
|
44
|
-
url:
|
|
50
|
+
url: `/teams/${teamId}/billing/team`,
|
|
45
51
|
};
|
|
46
52
|
const response = await this.client.sendJSON(config);
|
|
47
53
|
return response.data;
|
|
@@ -50,7 +56,7 @@ class BillingAPI {
|
|
|
50
56
|
const config = {
|
|
51
57
|
data: billingInfo,
|
|
52
58
|
method: 'put',
|
|
53
|
-
url:
|
|
59
|
+
url: `/teams/${teamId}/billing/info`,
|
|
54
60
|
};
|
|
55
61
|
const response = await this.client.sendJSON(config);
|
|
56
62
|
return response.data;
|
|
@@ -58,7 +64,7 @@ class BillingAPI {
|
|
|
58
64
|
async getBillingInfo(teamId) {
|
|
59
65
|
const config = {
|
|
60
66
|
method: 'get',
|
|
61
|
-
url:
|
|
67
|
+
url: `/teams/${teamId}/billing/info`,
|
|
62
68
|
};
|
|
63
69
|
const response = await this.client.sendJSON(config);
|
|
64
70
|
return response.data;
|
|
@@ -69,7 +75,7 @@ class BillingAPI {
|
|
|
69
75
|
paymentMethod: paymentMethodId,
|
|
70
76
|
},
|
|
71
77
|
method: 'put',
|
|
72
|
-
url:
|
|
78
|
+
url: `/teams/${teamId}/billing/card`,
|
|
73
79
|
};
|
|
74
80
|
const response = await this.client.sendJSON(config);
|
|
75
81
|
return response.data;
|
|
@@ -77,7 +83,7 @@ class BillingAPI {
|
|
|
77
83
|
async deleteCard(teamId) {
|
|
78
84
|
const config = {
|
|
79
85
|
method: 'delete',
|
|
80
|
-
url:
|
|
86
|
+
url: `/teams/${teamId}/billing/card`,
|
|
81
87
|
};
|
|
82
88
|
const response = await this.client.sendJSON(config);
|
|
83
89
|
return response.data;
|
|
@@ -85,7 +91,7 @@ class BillingAPI {
|
|
|
85
91
|
async getCard(teamId) {
|
|
86
92
|
const config = {
|
|
87
93
|
method: 'get',
|
|
88
|
-
url:
|
|
94
|
+
url: `/teams/${teamId}/billing/card`,
|
|
89
95
|
};
|
|
90
96
|
const response = await this.client.sendJSON(config);
|
|
91
97
|
return response.data;
|
|
@@ -96,7 +102,7 @@ class BillingAPI {
|
|
|
96
102
|
coupon,
|
|
97
103
|
},
|
|
98
104
|
method: 'post',
|
|
99
|
-
url:
|
|
105
|
+
url: `/teams/${teamId}/billing/coupon`,
|
|
100
106
|
};
|
|
101
107
|
const response = await this.client.sendJSON(config);
|
|
102
108
|
return response.data;
|
|
@@ -107,14 +113,14 @@ class BillingAPI {
|
|
|
107
113
|
coupon,
|
|
108
114
|
},
|
|
109
115
|
method: 'delete',
|
|
110
|
-
url:
|
|
116
|
+
url: `/teams/${teamId}/billing/coupon`,
|
|
111
117
|
};
|
|
112
118
|
await this.client.sendJSON(config);
|
|
113
119
|
}
|
|
114
120
|
async getCurrentPlan(teamId) {
|
|
115
121
|
const config = {
|
|
116
122
|
method: 'get',
|
|
117
|
-
url:
|
|
123
|
+
url: `/teams/${teamId}/billing/plan`,
|
|
118
124
|
};
|
|
119
125
|
const response = await this.client.sendJSON(config);
|
|
120
126
|
return response.data;
|
|
@@ -123,7 +129,7 @@ class BillingAPI {
|
|
|
123
129
|
const config = {
|
|
124
130
|
data: { planId },
|
|
125
131
|
method: 'put',
|
|
126
|
-
url:
|
|
132
|
+
url: `/teams/${teamId}/billing/subscription`,
|
|
127
133
|
};
|
|
128
134
|
const response = await this.client.sendJSON(config);
|
|
129
135
|
return response.data;
|
|
@@ -132,7 +138,7 @@ class BillingAPI {
|
|
|
132
138
|
const config = {
|
|
133
139
|
data: { planId },
|
|
134
140
|
method: 'put',
|
|
135
|
-
url:
|
|
141
|
+
url: `/teams/${teamId}/billing/plan`,
|
|
136
142
|
};
|
|
137
143
|
const response = await this.client.sendJSON(config);
|
|
138
144
|
return response.data;
|
|
@@ -141,7 +147,7 @@ class BillingAPI {
|
|
|
141
147
|
const config = {
|
|
142
148
|
params: filter,
|
|
143
149
|
method: 'get',
|
|
144
|
-
url:
|
|
150
|
+
url: `/teams/${teamId}/billing/plan/list`,
|
|
145
151
|
};
|
|
146
152
|
const response = await this.client.sendJSON(config);
|
|
147
153
|
return response.data;
|
|
@@ -149,7 +155,7 @@ class BillingAPI {
|
|
|
149
155
|
async getSupportedCurrencies(teamId) {
|
|
150
156
|
const config = {
|
|
151
157
|
method: 'get',
|
|
152
|
-
url:
|
|
158
|
+
url: `/teams/${teamId}/billing/currencies`,
|
|
153
159
|
};
|
|
154
160
|
const response = await this.client.sendJSON(config);
|
|
155
161
|
return response.data;
|
|
@@ -157,7 +163,7 @@ class BillingAPI {
|
|
|
157
163
|
async getUpcomingInvoice(teamId) {
|
|
158
164
|
const config = {
|
|
159
165
|
method: 'get',
|
|
160
|
-
url:
|
|
166
|
+
url: `/teams/${teamId}/billing/invoices/upcoming`,
|
|
161
167
|
};
|
|
162
168
|
const response = await this.client.sendJSON(config);
|
|
163
169
|
return response.data;
|
|
@@ -169,7 +175,15 @@ class BillingAPI {
|
|
|
169
175
|
size: limit,
|
|
170
176
|
start: startAfterInvoiceId,
|
|
171
177
|
},
|
|
172
|
-
url:
|
|
178
|
+
url: `/teams/${teamId}/billing/invoices`,
|
|
179
|
+
};
|
|
180
|
+
const response = await this.client.sendJSON(config);
|
|
181
|
+
return response.data;
|
|
182
|
+
}
|
|
183
|
+
async getPortalUrl(teamId) {
|
|
184
|
+
const config = {
|
|
185
|
+
method: 'get',
|
|
186
|
+
url: `/teams/${teamId}/billing/checkout/portal`,
|
|
173
187
|
};
|
|
174
188
|
const response = await this.client.sendJSON(config);
|
|
175
189
|
return response.data;
|
package/package.json
CHANGED