fusio-sdk 5.1.5 → 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,9 +3,6 @@
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
6
  export interface BackendDashboard {
10
7
  errorsPerOperation?: BackendStatisticChart;
11
8
  incomingRequests?: BackendStatisticChart;
@@ -13,7 +10,7 @@ export interface BackendDashboard {
13
10
  mostUsedOperations?: BackendStatisticChart;
14
11
  timePerOperation?: BackendStatisticChart;
15
12
  testCoverage?: BackendStatisticChart;
16
- latestApps?: BackendDashboardApps;
17
- latestRequests?: BackendDashboardRequests;
18
- latestUsers?: BackendDashboardUsers;
13
+ mostUsedActivities?: BackendStatisticChart;
14
+ activitiesPerUser?: BackendStatisticChart;
15
+ userRegistrations?: BackendStatisticChart;
19
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}
@@ -42,6 +48,12 @@ export declare class BackendStatisticTag extends TagAbstract {
42
48
  * @throws {ClientException}
43
49
  */
44
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>;
45
57
  /**
46
58
  * @returns {Promise<BackendStatisticChart>}
47
59
  * @throws {CommonMessageExceptionException}
@@ -72,4 +84,10 @@ export declare class BackendStatisticTag extends TagAbstract {
72
84
  * @throws {ClientException}
73
85
  */
74
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>;
75
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}
@@ -292,6 +342,56 @@ export class BackendStatisticTag extends TagAbstract {
292
342
  }
293
343
  }
294
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
+ }
295
395
  /**
296
396
  * @returns {Promise<BackendStatisticChart>}
297
397
  * @throws {CommonMessageExceptionException}
@@ -542,4 +642,54 @@ export class BackendStatisticTag extends TagAbstract {
542
642
  }
543
643
  }
544
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
+ }
545
695
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fusio-sdk",
3
- "version": "5.1.5",
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,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 {};