fusio-sdk 5.1.4 → 5.1.6

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.
@@ -3,18 +3,14 @@
3
3
  * {@link https://sdkgen.app}
4
4
  */
5
5
  import { BackendStatisticChart } from "./BackendStatisticChart";
6
- import { BackendDashboardApps } from "./BackendDashboardApps";
7
- import { BackendDashboardRequests } from "./BackendDashboardRequests";
8
- import { BackendDashboardUsers } from "./BackendDashboardUsers";
9
- import { BackendDashboardTransactions } from "./BackendDashboardTransactions";
10
6
  export interface BackendDashboard {
11
7
  errorsPerOperation?: BackendStatisticChart;
12
8
  incomingRequests?: BackendStatisticChart;
13
9
  incomingTransactions?: BackendStatisticChart;
14
10
  mostUsedOperations?: BackendStatisticChart;
15
11
  timePerOperation?: BackendStatisticChart;
16
- latestApps?: BackendDashboardApps;
17
- latestRequests?: BackendDashboardRequests;
18
- latestUsers?: BackendDashboardUsers;
19
- latestTransactions?: BackendDashboardTransactions;
12
+ testCoverage?: BackendStatisticChart;
13
+ mostUsedActivities?: BackendStatisticChart;
14
+ activitiesPerUser?: BackendStatisticChart;
15
+ userRegistrations?: BackendStatisticChart;
20
16
  }
@@ -6,6 +6,12 @@ import { TagAbstract } from "sdkgen-client";
6
6
  import { BackendStatisticChart } from "./BackendStatisticChart";
7
7
  import { BackendStatisticCount } from "./BackendStatisticCount";
8
8
  export declare class BackendStatisticTag extends TagAbstract {
9
+ /**
10
+ * @returns {Promise<BackendStatisticChart>}
11
+ * @throws {CommonMessageExceptionException}
12
+ * @throws {ClientException}
13
+ */
14
+ getUserRegistrations(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>;
9
15
  /**
10
16
  * @returns {Promise<BackendStatisticChart>}
11
17
  * @throws {CommonMessageExceptionException}
@@ -24,6 +30,12 @@ export declare class BackendStatisticTag extends TagAbstract {
24
30
  * @throws {ClientException}
25
31
  */
26
32
  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>;
33
+ /**
34
+ * @returns {Promise<BackendStatisticChart>}
35
+ * @throws {CommonMessageExceptionException}
36
+ * @throws {ClientException}
37
+ */
38
+ getTestCoverage(): Promise<BackendStatisticChart>;
27
39
  /**
28
40
  * @returns {Promise<BackendStatisticChart>}
29
41
  * @throws {CommonMessageExceptionException}
@@ -36,6 +48,12 @@ export declare class BackendStatisticTag extends TagAbstract {
36
48
  * @throws {ClientException}
37
49
  */
38
50
  getMostUsedApps(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>;
51
+ /**
52
+ * @returns {Promise<BackendStatisticChart>}
53
+ * @throws {CommonMessageExceptionException}
54
+ * @throws {ClientException}
55
+ */
56
+ getMostUsedActivities(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>;
39
57
  /**
40
58
  * @returns {Promise<BackendStatisticChart>}
41
59
  * @throws {CommonMessageExceptionException}
@@ -66,4 +84,10 @@ export declare class BackendStatisticTag extends TagAbstract {
66
84
  * @throws {ClientException}
67
85
  */
68
86
  getCountRequests(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<BackendStatisticCount>;
87
+ /**
88
+ * @returns {Promise<BackendStatisticCount>}
89
+ * @throws {CommonMessageExceptionException}
90
+ * @throws {ClientException}
91
+ */
92
+ getActivitiesPerUser(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<BackendStatisticCount>;
69
93
  }
@@ -7,6 +7,56 @@ import { TagAbstract } from "sdkgen-client";
7
7
  import { ClientException, UnknownStatusCodeException } from "sdkgen-client";
8
8
  import { CommonMessageException } from "./CommonMessageException";
9
9
  export class BackendStatisticTag extends TagAbstract {
10
+ /**
11
+ * @returns {Promise<BackendStatisticChart>}
12
+ * @throws {CommonMessageExceptionException}
13
+ * @throws {ClientException}
14
+ */
15
+ async getUserRegistrations(startIndex, count, search, from, to, operationId, appId, userId, ip, userAgent, method, path, header, body) {
16
+ const url = this.parser.url('/backend/statistic/user_registrations', {});
17
+ let params = {
18
+ url: url,
19
+ method: 'GET',
20
+ params: this.parser.query({
21
+ 'startIndex': startIndex,
22
+ 'count': count,
23
+ 'search': search,
24
+ 'from': from,
25
+ 'to': to,
26
+ 'operationId': operationId,
27
+ 'appId': appId,
28
+ 'userId': userId,
29
+ 'ip': ip,
30
+ 'userAgent': userAgent,
31
+ 'method': method,
32
+ 'path': path,
33
+ 'header': header,
34
+ 'body': body,
35
+ }, []),
36
+ };
37
+ try {
38
+ const response = await this.httpClient.request(params);
39
+ return response.data;
40
+ }
41
+ catch (error) {
42
+ if (error instanceof ClientException) {
43
+ throw error;
44
+ }
45
+ else if (axios.isAxiosError(error) && error.response) {
46
+ switch (error.response.status) {
47
+ case 401:
48
+ throw new CommonMessageException(error.response.data);
49
+ case 500:
50
+ throw new CommonMessageException(error.response.data);
51
+ default:
52
+ throw new UnknownStatusCodeException('The server returned an unknown status code');
53
+ }
54
+ }
55
+ else {
56
+ throw new ClientException('An unknown error occurred: ' + String(error));
57
+ }
58
+ }
59
+ }
10
60
  /**
11
61
  * @returns {Promise<BackendStatisticChart>}
12
62
  * @throws {CommonMessageExceptionException}
@@ -157,6 +207,41 @@ export class BackendStatisticTag extends TagAbstract {
157
207
  }
158
208
  }
159
209
  }
210
+ /**
211
+ * @returns {Promise<BackendStatisticChart>}
212
+ * @throws {CommonMessageExceptionException}
213
+ * @throws {ClientException}
214
+ */
215
+ async getTestCoverage() {
216
+ const url = this.parser.url('/backend/statistic/test_coverage', {});
217
+ let params = {
218
+ url: url,
219
+ method: 'GET',
220
+ params: this.parser.query({}, []),
221
+ };
222
+ try {
223
+ const response = await this.httpClient.request(params);
224
+ return response.data;
225
+ }
226
+ catch (error) {
227
+ if (error instanceof ClientException) {
228
+ throw error;
229
+ }
230
+ else if (axios.isAxiosError(error) && error.response) {
231
+ switch (error.response.status) {
232
+ case 401:
233
+ throw new CommonMessageException(error.response.data);
234
+ case 500:
235
+ throw new CommonMessageException(error.response.data);
236
+ default:
237
+ throw new UnknownStatusCodeException('The server returned an unknown status code');
238
+ }
239
+ }
240
+ else {
241
+ throw new ClientException('An unknown error occurred: ' + String(error));
242
+ }
243
+ }
244
+ }
160
245
  /**
161
246
  * @returns {Promise<BackendStatisticChart>}
162
247
  * @throws {CommonMessageExceptionException}
@@ -257,6 +342,56 @@ export class BackendStatisticTag extends TagAbstract {
257
342
  }
258
343
  }
259
344
  }
345
+ /**
346
+ * @returns {Promise<BackendStatisticChart>}
347
+ * @throws {CommonMessageExceptionException}
348
+ * @throws {ClientException}
349
+ */
350
+ async getMostUsedActivities(startIndex, count, search, from, to, operationId, appId, userId, ip, userAgent, method, path, header, body) {
351
+ const url = this.parser.url('/backend/statistic/most_used_activities', {});
352
+ let params = {
353
+ url: url,
354
+ method: 'GET',
355
+ params: this.parser.query({
356
+ 'startIndex': startIndex,
357
+ 'count': count,
358
+ 'search': search,
359
+ 'from': from,
360
+ 'to': to,
361
+ 'operationId': operationId,
362
+ 'appId': appId,
363
+ 'userId': userId,
364
+ 'ip': ip,
365
+ 'userAgent': userAgent,
366
+ 'method': method,
367
+ 'path': path,
368
+ 'header': header,
369
+ 'body': body,
370
+ }, []),
371
+ };
372
+ try {
373
+ const response = await this.httpClient.request(params);
374
+ return response.data;
375
+ }
376
+ catch (error) {
377
+ if (error instanceof ClientException) {
378
+ throw error;
379
+ }
380
+ else if (axios.isAxiosError(error) && error.response) {
381
+ switch (error.response.status) {
382
+ case 401:
383
+ throw new CommonMessageException(error.response.data);
384
+ case 500:
385
+ throw new CommonMessageException(error.response.data);
386
+ default:
387
+ throw new UnknownStatusCodeException('The server returned an unknown status code');
388
+ }
389
+ }
390
+ else {
391
+ throw new ClientException('An unknown error occurred: ' + String(error));
392
+ }
393
+ }
394
+ }
260
395
  /**
261
396
  * @returns {Promise<BackendStatisticChart>}
262
397
  * @throws {CommonMessageExceptionException}
@@ -507,4 +642,54 @@ export class BackendStatisticTag extends TagAbstract {
507
642
  }
508
643
  }
509
644
  }
645
+ /**
646
+ * @returns {Promise<BackendStatisticCount>}
647
+ * @throws {CommonMessageExceptionException}
648
+ * @throws {ClientException}
649
+ */
650
+ async getActivitiesPerUser(startIndex, count, search, from, to, operationId, appId, userId, ip, userAgent, method, path, header, body) {
651
+ const url = this.parser.url('/backend/statistic/activities_per_user', {});
652
+ let params = {
653
+ url: url,
654
+ method: 'GET',
655
+ params: this.parser.query({
656
+ 'startIndex': startIndex,
657
+ 'count': count,
658
+ 'search': search,
659
+ 'from': from,
660
+ 'to': to,
661
+ 'operationId': operationId,
662
+ 'appId': appId,
663
+ 'userId': userId,
664
+ 'ip': ip,
665
+ 'userAgent': userAgent,
666
+ 'method': method,
667
+ 'path': path,
668
+ 'header': header,
669
+ 'body': body,
670
+ }, []),
671
+ };
672
+ try {
673
+ const response = await this.httpClient.request(params);
674
+ return response.data;
675
+ }
676
+ catch (error) {
677
+ if (error instanceof ClientException) {
678
+ throw error;
679
+ }
680
+ else if (axios.isAxiosError(error) && error.response) {
681
+ switch (error.response.status) {
682
+ case 401:
683
+ throw new CommonMessageException(error.response.data);
684
+ case 500:
685
+ throw new CommonMessageException(error.response.data);
686
+ default:
687
+ throw new UnknownStatusCodeException('The server returned an unknown status code');
688
+ }
689
+ }
690
+ else {
691
+ throw new ClientException('An unknown error occurred: ' + String(error));
692
+ }
693
+ }
694
+ }
510
695
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fusio-sdk",
3
- "version": "5.1.4",
3
+ "version": "5.1.6",
4
4
  "description": "SDK to talk to the Fusio API",
5
5
  "keywords": [
6
6
  "API",
@@ -1,9 +0,0 @@
1
- /**
2
- * BackendDashboardApp automatically generated by SDKgen please do not edit this file manually
3
- * {@link https://sdkgen.app}
4
- */
5
- export interface BackendDashboardApp {
6
- id?: number;
7
- name?: string;
8
- date?: string;
9
- }
@@ -1,5 +0,0 @@
1
- /**
2
- * BackendDashboardApp automatically generated by SDKgen please do not edit this file manually
3
- * {@link https://sdkgen.app}
4
- */
5
- export {};
@@ -1,7 +0,0 @@
1
- /**
2
- * BackendDashboardApps automatically generated by SDKgen please do not edit this file manually
3
- * {@link https://sdkgen.app}
4
- */
5
- import { CommonCollection } from "./CommonCollection";
6
- import { BackendDashboardApp } from "./BackendDashboardApp";
7
- export type BackendDashboardApps = CommonCollection<BackendDashboardApp>;
@@ -1,5 +0,0 @@
1
- /**
2
- * BackendDashboardApps automatically generated by SDKgen please do not edit this file manually
3
- * {@link https://sdkgen.app}
4
- */
5
- export {};
@@ -1,10 +0,0 @@
1
- /**
2
- * BackendDashboardRequest automatically generated by SDKgen please do not edit this file manually
3
- * {@link https://sdkgen.app}
4
- */
5
- export interface BackendDashboardRequest {
6
- id?: number;
7
- path?: string;
8
- ip?: string;
9
- date?: string;
10
- }
@@ -1,5 +0,0 @@
1
- /**
2
- * BackendDashboardRequest automatically generated by SDKgen please do not edit this file manually
3
- * {@link https://sdkgen.app}
4
- */
5
- export {};
@@ -1,7 +0,0 @@
1
- /**
2
- * BackendDashboardRequests automatically generated by SDKgen please do not edit this file manually
3
- * {@link https://sdkgen.app}
4
- */
5
- import { CommonCollection } from "./CommonCollection";
6
- import { BackendDashboardRequest } from "./BackendDashboardRequest";
7
- export type BackendDashboardRequests = CommonCollection<BackendDashboardRequest>;
@@ -1,5 +0,0 @@
1
- /**
2
- * BackendDashboardRequests automatically generated by SDKgen please do not edit this file manually
3
- * {@link https://sdkgen.app}
4
- */
5
- export {};
@@ -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,5 +0,0 @@
1
- /**
2
- * BackendDashboardTransaction automatically generated by SDKgen please do not edit this file manually
3
- * {@link https://sdkgen.app}
4
- */
5
- export {};
@@ -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>;
@@ -1,5 +0,0 @@
1
- /**
2
- * BackendDashboardTransactions automatically generated by SDKgen please do not edit this file manually
3
- * {@link https://sdkgen.app}
4
- */
5
- export {};
@@ -1,10 +0,0 @@
1
- /**
2
- * BackendDashboardUser automatically generated by SDKgen please do not edit this file manually
3
- * {@link https://sdkgen.app}
4
- */
5
- export interface BackendDashboardUser {
6
- id?: number;
7
- status?: string;
8
- name?: string;
9
- date?: string;
10
- }
@@ -1,5 +0,0 @@
1
- /**
2
- * BackendDashboardUser automatically generated by SDKgen please do not edit this file manually
3
- * {@link https://sdkgen.app}
4
- */
5
- export {};
@@ -1,7 +0,0 @@
1
- /**
2
- * BackendDashboardUsers automatically generated by SDKgen please do not edit this file manually
3
- * {@link https://sdkgen.app}
4
- */
5
- import { CommonCollection } from "./CommonCollection";
6
- import { BackendDashboardUser } from "./BackendDashboardUser";
7
- export type BackendDashboardUsers = CommonCollection<BackendDashboardUser>;
@@ -1,5 +0,0 @@
1
- /**
2
- * BackendDashboardUsers automatically generated by SDKgen please do not edit this file manually
3
- * {@link https://sdkgen.app}
4
- */
5
- export {};