fusio-sdk 5.1.4 → 5.1.5
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/dist/BackendDashboard.d.ts +1 -2
- package/dist/BackendStatisticTag.d.ts +6 -0
- package/dist/BackendStatisticTag.js +35 -0
- package/package.json +1 -1
- package/dist/BackendDashboardTransaction.d.ts +0 -12
- package/dist/BackendDashboardTransaction.js +0 -5
- package/dist/BackendDashboardTransactions.d.ts +0 -7
- package/dist/BackendDashboardTransactions.js +0 -5
|
@@ -6,15 +6,14 @@ import { BackendStatisticChart } from "./BackendStatisticChart";
|
|
|
6
6
|
import { BackendDashboardApps } from "./BackendDashboardApps";
|
|
7
7
|
import { BackendDashboardRequests } from "./BackendDashboardRequests";
|
|
8
8
|
import { BackendDashboardUsers } from "./BackendDashboardUsers";
|
|
9
|
-
import { BackendDashboardTransactions } from "./BackendDashboardTransactions";
|
|
10
9
|
export interface BackendDashboard {
|
|
11
10
|
errorsPerOperation?: BackendStatisticChart;
|
|
12
11
|
incomingRequests?: BackendStatisticChart;
|
|
13
12
|
incomingTransactions?: BackendStatisticChart;
|
|
14
13
|
mostUsedOperations?: BackendStatisticChart;
|
|
15
14
|
timePerOperation?: BackendStatisticChart;
|
|
15
|
+
testCoverage?: BackendStatisticChart;
|
|
16
16
|
latestApps?: BackendDashboardApps;
|
|
17
17
|
latestRequests?: BackendDashboardRequests;
|
|
18
18
|
latestUsers?: BackendDashboardUsers;
|
|
19
|
-
latestTransactions?: BackendDashboardTransactions;
|
|
20
19
|
}
|
|
@@ -24,6 +24,12 @@ export declare class BackendStatisticTag extends TagAbstract {
|
|
|
24
24
|
* @throws {ClientException}
|
|
25
25
|
*/
|
|
26
26
|
getTimeAverage(startIndex?: number, count?: number, search?: string, from?: string, to?: string, operationId?: number, appId?: number, userId?: number, ip?: string, userAgent?: string, method?: string, path?: string, header?: string, body?: string): Promise<BackendStatisticChart>;
|
|
27
|
+
/**
|
|
28
|
+
* @returns {Promise<BackendStatisticChart>}
|
|
29
|
+
* @throws {CommonMessageExceptionException}
|
|
30
|
+
* @throws {ClientException}
|
|
31
|
+
*/
|
|
32
|
+
getTestCoverage(): Promise<BackendStatisticChart>;
|
|
27
33
|
/**
|
|
28
34
|
* @returns {Promise<BackendStatisticChart>}
|
|
29
35
|
* @throws {CommonMessageExceptionException}
|
|
@@ -157,6 +157,41 @@ export class BackendStatisticTag extends TagAbstract {
|
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
|
+
/**
|
|
161
|
+
* @returns {Promise<BackendStatisticChart>}
|
|
162
|
+
* @throws {CommonMessageExceptionException}
|
|
163
|
+
* @throws {ClientException}
|
|
164
|
+
*/
|
|
165
|
+
async getTestCoverage() {
|
|
166
|
+
const url = this.parser.url('/backend/statistic/test_coverage', {});
|
|
167
|
+
let params = {
|
|
168
|
+
url: url,
|
|
169
|
+
method: 'GET',
|
|
170
|
+
params: this.parser.query({}, []),
|
|
171
|
+
};
|
|
172
|
+
try {
|
|
173
|
+
const response = await this.httpClient.request(params);
|
|
174
|
+
return response.data;
|
|
175
|
+
}
|
|
176
|
+
catch (error) {
|
|
177
|
+
if (error instanceof ClientException) {
|
|
178
|
+
throw error;
|
|
179
|
+
}
|
|
180
|
+
else if (axios.isAxiosError(error) && error.response) {
|
|
181
|
+
switch (error.response.status) {
|
|
182
|
+
case 401:
|
|
183
|
+
throw new CommonMessageException(error.response.data);
|
|
184
|
+
case 500:
|
|
185
|
+
throw new CommonMessageException(error.response.data);
|
|
186
|
+
default:
|
|
187
|
+
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
else {
|
|
191
|
+
throw new ClientException('An unknown error occurred: ' + String(error));
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
160
195
|
/**
|
|
161
196
|
* @returns {Promise<BackendStatisticChart>}
|
|
162
197
|
* @throws {CommonMessageExceptionException}
|
package/package.json
CHANGED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* BackendDashboardTransaction automatically generated by SDKgen please do not edit this file manually
|
|
3
|
-
* {@link https://sdkgen.app}
|
|
4
|
-
*/
|
|
5
|
-
export interface BackendDashboardTransaction {
|
|
6
|
-
id?: number;
|
|
7
|
-
status?: string;
|
|
8
|
-
provider?: string;
|
|
9
|
-
transactionId?: string;
|
|
10
|
-
amount?: number;
|
|
11
|
-
date?: string;
|
|
12
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* BackendDashboardTransactions automatically generated by SDKgen please do not edit this file manually
|
|
3
|
-
* {@link https://sdkgen.app}
|
|
4
|
-
*/
|
|
5
|
-
import { CommonCollection } from "./CommonCollection";
|
|
6
|
-
import { BackendDashboardTransaction } from "./BackendDashboardTransaction";
|
|
7
|
-
export type BackendDashboardTransactions = CommonCollection<BackendDashboardTransaction>;
|