fusio-sdk 3.0.5 → 3.0.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.
- package/dist/src/generated/backend/AccountTag.d.ts +3 -0
- package/dist/src/generated/backend/AccountTag.js +20 -0
- package/dist/src/generated/backend/ActionTag.d.ts +8 -0
- package/dist/src/generated/backend/ActionTag.js +57 -0
- package/dist/src/generated/backend/AppTag.d.ts +8 -0
- package/dist/src/generated/backend/AppTag.js +63 -0
- package/dist/src/generated/backend/AuditTag.d.ts +2 -0
- package/dist/src/generated/backend/AuditTag.js +15 -0
- package/dist/src/generated/backend/CategoryTag.d.ts +5 -0
- package/dist/src/generated/backend/CategoryTag.js +42 -0
- package/dist/src/generated/backend/ConfigTag.d.ts +3 -0
- package/dist/src/generated/backend/ConfigTag.js +26 -0
- package/dist/src/generated/backend/ConnectionTag.d.ts +12 -2
- package/dist/src/generated/backend/ConnectionTag.js +72 -1
- package/dist/src/generated/backend/CronjobTag.d.ts +5 -0
- package/dist/src/generated/backend/CronjobTag.js +42 -0
- package/dist/src/generated/backend/DashboardTag.d.ts +1 -0
- package/dist/src/generated/backend/DashboardTag.js +6 -0
- package/dist/src/generated/backend/EventTag.d.ts +10 -0
- package/dist/src/generated/backend/EventTag.js +81 -0
- package/dist/src/generated/backend/GeneratorTag.d.ts +4 -0
- package/dist/src/generated/backend/GeneratorTag.js +21 -0
- package/dist/src/generated/backend/LogTag.d.ts +4 -0
- package/dist/src/generated/backend/LogTag.js +25 -0
- package/dist/src/generated/backend/MarketplaceTag.d.ts +5 -0
- package/dist/src/generated/backend/MarketplaceTag.js +40 -0
- package/dist/src/generated/backend/MessageException.d.ts +11 -0
- package/dist/src/generated/backend/MessageException.js +14 -0
- package/dist/src/generated/backend/OperationTag.d.ts +5 -0
- package/dist/src/generated/backend/OperationTag.js +42 -0
- package/dist/src/generated/backend/PageTag.d.ts +5 -0
- package/dist/src/generated/backend/PageTag.js +42 -0
- package/dist/src/generated/backend/PlanTag.d.ts +5 -0
- package/dist/src/generated/backend/PlanTag.js +42 -0
- package/dist/src/generated/backend/RateTag.d.ts +5 -0
- package/dist/src/generated/backend/RateTag.js +42 -0
- package/dist/src/generated/backend/RoleTag.d.ts +5 -0
- package/dist/src/generated/backend/RoleTag.js +42 -0
- package/dist/src/generated/backend/SchemaTag.d.ts +7 -0
- package/dist/src/generated/backend/SchemaTag.js +58 -0
- package/dist/src/generated/backend/ScopeTag.d.ts +6 -0
- package/dist/src/generated/backend/ScopeTag.js +47 -0
- package/dist/src/generated/backend/SdkTag.d.ts +2 -0
- package/dist/src/generated/backend/SdkTag.js +11 -0
- package/dist/src/generated/backend/StatisticTag.d.ts +10 -0
- package/dist/src/generated/backend/StatisticTag.js +51 -0
- package/dist/src/generated/backend/TransactionTag.d.ts +2 -0
- package/dist/src/generated/backend/TransactionTag.js +15 -0
- package/dist/src/generated/backend/TrashTag.d.ts +3 -0
- package/dist/src/generated/backend/TrashTag.js +18 -0
- package/dist/src/generated/backend/UserTag.d.ts +5 -0
- package/dist/src/generated/backend/UserTag.js +42 -0
- package/dist/src/generated/consumer/AccountTag.d.ts +12 -0
- package/dist/src/generated/consumer/AccountTag.js +77 -0
- package/dist/src/generated/consumer/AppTag.d.ts +5 -0
- package/dist/src/generated/consumer/AppTag.js +42 -0
- package/dist/src/generated/consumer/EventTag.d.ts +1 -0
- package/dist/src/generated/consumer/EventTag.js +6 -0
- package/dist/src/generated/consumer/GrantTag.d.ts +2 -0
- package/dist/src/generated/consumer/GrantTag.js +15 -0
- package/dist/src/generated/consumer/LogTag.d.ts +2 -0
- package/dist/src/generated/consumer/LogTag.js +15 -0
- package/dist/src/generated/consumer/MessageException.d.ts +11 -0
- package/dist/src/generated/consumer/MessageException.js +14 -0
- package/dist/src/generated/consumer/PageTag.d.ts +2 -0
- package/dist/src/generated/consumer/PageTag.js +15 -0
- package/dist/src/generated/consumer/PaymentTag.d.ts +2 -0
- package/dist/src/generated/consumer/PaymentTag.js +11 -0
- package/dist/src/generated/consumer/PlanTag.d.ts +2 -0
- package/dist/src/generated/consumer/PlanTag.js +15 -0
- package/dist/src/generated/consumer/ScopeTag.d.ts +1 -0
- package/dist/src/generated/consumer/ScopeTag.js +6 -0
- package/dist/src/generated/consumer/SubscriptionTag.d.ts +5 -0
- package/dist/src/generated/consumer/SubscriptionTag.js +42 -0
- package/dist/src/generated/consumer/TransactionTag.d.ts +2 -0
- package/dist/src/generated/consumer/TransactionTag.js +15 -0
- package/package.json +1 -1
|
@@ -5,9 +5,11 @@
|
|
|
5
5
|
import axios from "axios";
|
|
6
6
|
import { TagAbstract } from "sdkgen-client";
|
|
7
7
|
import { ClientException, UnknownStatusCodeException } from "sdkgen-client";
|
|
8
|
+
import { MessageException } from "./MessageException";
|
|
8
9
|
export class RoleTag extends TagAbstract {
|
|
9
10
|
/**
|
|
10
11
|
* @returns {Promise<Message>}
|
|
12
|
+
* @throws {MessageException}
|
|
11
13
|
* @throws {ClientException}
|
|
12
14
|
*/
|
|
13
15
|
async delete(roleId) {
|
|
@@ -26,6 +28,14 @@ export class RoleTag extends TagAbstract {
|
|
|
26
28
|
catch (error) {
|
|
27
29
|
if (axios.isAxiosError(error) && error.response) {
|
|
28
30
|
switch (error.response.status) {
|
|
31
|
+
case 401:
|
|
32
|
+
throw new MessageException(error.response.data);
|
|
33
|
+
case 404:
|
|
34
|
+
throw new MessageException(error.response.data);
|
|
35
|
+
case 410:
|
|
36
|
+
throw new MessageException(error.response.data);
|
|
37
|
+
case 500:
|
|
38
|
+
throw new MessageException(error.response.data);
|
|
29
39
|
default:
|
|
30
40
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
31
41
|
}
|
|
@@ -35,6 +45,7 @@ export class RoleTag extends TagAbstract {
|
|
|
35
45
|
}
|
|
36
46
|
/**
|
|
37
47
|
* @returns {Promise<Message>}
|
|
48
|
+
* @throws {MessageException}
|
|
38
49
|
* @throws {ClientException}
|
|
39
50
|
*/
|
|
40
51
|
async update(roleId, payload) {
|
|
@@ -54,6 +65,16 @@ export class RoleTag extends TagAbstract {
|
|
|
54
65
|
catch (error) {
|
|
55
66
|
if (axios.isAxiosError(error) && error.response) {
|
|
56
67
|
switch (error.response.status) {
|
|
68
|
+
case 400:
|
|
69
|
+
throw new MessageException(error.response.data);
|
|
70
|
+
case 401:
|
|
71
|
+
throw new MessageException(error.response.data);
|
|
72
|
+
case 404:
|
|
73
|
+
throw new MessageException(error.response.data);
|
|
74
|
+
case 410:
|
|
75
|
+
throw new MessageException(error.response.data);
|
|
76
|
+
case 500:
|
|
77
|
+
throw new MessageException(error.response.data);
|
|
57
78
|
default:
|
|
58
79
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
59
80
|
}
|
|
@@ -63,6 +84,7 @@ export class RoleTag extends TagAbstract {
|
|
|
63
84
|
}
|
|
64
85
|
/**
|
|
65
86
|
* @returns {Promise<Role>}
|
|
87
|
+
* @throws {MessageException}
|
|
66
88
|
* @throws {ClientException}
|
|
67
89
|
*/
|
|
68
90
|
async get(roleId) {
|
|
@@ -81,6 +103,14 @@ export class RoleTag extends TagAbstract {
|
|
|
81
103
|
catch (error) {
|
|
82
104
|
if (axios.isAxiosError(error) && error.response) {
|
|
83
105
|
switch (error.response.status) {
|
|
106
|
+
case 401:
|
|
107
|
+
throw new MessageException(error.response.data);
|
|
108
|
+
case 404:
|
|
109
|
+
throw new MessageException(error.response.data);
|
|
110
|
+
case 410:
|
|
111
|
+
throw new MessageException(error.response.data);
|
|
112
|
+
case 500:
|
|
113
|
+
throw new MessageException(error.response.data);
|
|
84
114
|
default:
|
|
85
115
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
86
116
|
}
|
|
@@ -90,6 +120,7 @@ export class RoleTag extends TagAbstract {
|
|
|
90
120
|
}
|
|
91
121
|
/**
|
|
92
122
|
* @returns {Promise<Message>}
|
|
123
|
+
* @throws {MessageException}
|
|
93
124
|
* @throws {ClientException}
|
|
94
125
|
*/
|
|
95
126
|
async create(payload) {
|
|
@@ -107,6 +138,12 @@ export class RoleTag extends TagAbstract {
|
|
|
107
138
|
catch (error) {
|
|
108
139
|
if (axios.isAxiosError(error) && error.response) {
|
|
109
140
|
switch (error.response.status) {
|
|
141
|
+
case 400:
|
|
142
|
+
throw new MessageException(error.response.data);
|
|
143
|
+
case 401:
|
|
144
|
+
throw new MessageException(error.response.data);
|
|
145
|
+
case 500:
|
|
146
|
+
throw new MessageException(error.response.data);
|
|
110
147
|
default:
|
|
111
148
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
112
149
|
}
|
|
@@ -116,6 +153,7 @@ export class RoleTag extends TagAbstract {
|
|
|
116
153
|
}
|
|
117
154
|
/**
|
|
118
155
|
* @returns {Promise<RoleCollection>}
|
|
156
|
+
* @throws {MessageException}
|
|
119
157
|
* @throws {ClientException}
|
|
120
158
|
*/
|
|
121
159
|
async getAll(startIndex, count, search) {
|
|
@@ -136,6 +174,10 @@ export class RoleTag extends TagAbstract {
|
|
|
136
174
|
catch (error) {
|
|
137
175
|
if (axios.isAxiosError(error) && error.response) {
|
|
138
176
|
switch (error.response.status) {
|
|
177
|
+
case 401:
|
|
178
|
+
throw new MessageException(error.response.data);
|
|
179
|
+
case 500:
|
|
180
|
+
throw new MessageException(error.response.data);
|
|
139
181
|
default:
|
|
140
182
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
141
183
|
}
|
|
@@ -13,36 +13,43 @@ import { SchemaUpdate } from "./SchemaUpdate";
|
|
|
13
13
|
export declare class SchemaTag extends TagAbstract {
|
|
14
14
|
/**
|
|
15
15
|
* @returns {Promise<Message>}
|
|
16
|
+
* @throws {MessageException}
|
|
16
17
|
* @throws {ClientException}
|
|
17
18
|
*/
|
|
18
19
|
delete(schemaId: string): Promise<Message>;
|
|
19
20
|
/**
|
|
20
21
|
* @returns {Promise<Message>}
|
|
22
|
+
* @throws {MessageException}
|
|
21
23
|
* @throws {ClientException}
|
|
22
24
|
*/
|
|
23
25
|
update(schemaId: string, payload: SchemaUpdate): Promise<Message>;
|
|
24
26
|
/**
|
|
25
27
|
* @returns {Promise<Schema>}
|
|
28
|
+
* @throws {MessageException}
|
|
26
29
|
* @throws {ClientException}
|
|
27
30
|
*/
|
|
28
31
|
get(schemaId: string): Promise<Schema>;
|
|
29
32
|
/**
|
|
30
33
|
* @returns {Promise<Message>}
|
|
34
|
+
* @throws {MessageException}
|
|
31
35
|
* @throws {ClientException}
|
|
32
36
|
*/
|
|
33
37
|
updateForm(schemaId: string, payload: SchemaForm): Promise<Message>;
|
|
34
38
|
/**
|
|
35
39
|
* @returns {Promise<SchemaPreviewResponse>}
|
|
40
|
+
* @throws {MessageException}
|
|
36
41
|
* @throws {ClientException}
|
|
37
42
|
*/
|
|
38
43
|
getPreview(schemaId: string): Promise<SchemaPreviewResponse>;
|
|
39
44
|
/**
|
|
40
45
|
* @returns {Promise<Message>}
|
|
46
|
+
* @throws {MessageException}
|
|
41
47
|
* @throws {ClientException}
|
|
42
48
|
*/
|
|
43
49
|
create(payload: SchemaCreate): Promise<Message>;
|
|
44
50
|
/**
|
|
45
51
|
* @returns {Promise<SchemaCollection>}
|
|
52
|
+
* @throws {MessageException}
|
|
46
53
|
* @throws {ClientException}
|
|
47
54
|
*/
|
|
48
55
|
getAll(categoryId?: number, startIndex?: number, count?: number, search?: string): Promise<SchemaCollection>;
|
|
@@ -5,9 +5,11 @@
|
|
|
5
5
|
import axios from "axios";
|
|
6
6
|
import { TagAbstract } from "sdkgen-client";
|
|
7
7
|
import { ClientException, UnknownStatusCodeException } from "sdkgen-client";
|
|
8
|
+
import { MessageException } from "./MessageException";
|
|
8
9
|
export class SchemaTag extends TagAbstract {
|
|
9
10
|
/**
|
|
10
11
|
* @returns {Promise<Message>}
|
|
12
|
+
* @throws {MessageException}
|
|
11
13
|
* @throws {ClientException}
|
|
12
14
|
*/
|
|
13
15
|
async delete(schemaId) {
|
|
@@ -26,6 +28,14 @@ export class SchemaTag extends TagAbstract {
|
|
|
26
28
|
catch (error) {
|
|
27
29
|
if (axios.isAxiosError(error) && error.response) {
|
|
28
30
|
switch (error.response.status) {
|
|
31
|
+
case 401:
|
|
32
|
+
throw new MessageException(error.response.data);
|
|
33
|
+
case 404:
|
|
34
|
+
throw new MessageException(error.response.data);
|
|
35
|
+
case 410:
|
|
36
|
+
throw new MessageException(error.response.data);
|
|
37
|
+
case 500:
|
|
38
|
+
throw new MessageException(error.response.data);
|
|
29
39
|
default:
|
|
30
40
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
31
41
|
}
|
|
@@ -35,6 +45,7 @@ export class SchemaTag extends TagAbstract {
|
|
|
35
45
|
}
|
|
36
46
|
/**
|
|
37
47
|
* @returns {Promise<Message>}
|
|
48
|
+
* @throws {MessageException}
|
|
38
49
|
* @throws {ClientException}
|
|
39
50
|
*/
|
|
40
51
|
async update(schemaId, payload) {
|
|
@@ -54,6 +65,16 @@ export class SchemaTag extends TagAbstract {
|
|
|
54
65
|
catch (error) {
|
|
55
66
|
if (axios.isAxiosError(error) && error.response) {
|
|
56
67
|
switch (error.response.status) {
|
|
68
|
+
case 400:
|
|
69
|
+
throw new MessageException(error.response.data);
|
|
70
|
+
case 401:
|
|
71
|
+
throw new MessageException(error.response.data);
|
|
72
|
+
case 404:
|
|
73
|
+
throw new MessageException(error.response.data);
|
|
74
|
+
case 410:
|
|
75
|
+
throw new MessageException(error.response.data);
|
|
76
|
+
case 500:
|
|
77
|
+
throw new MessageException(error.response.data);
|
|
57
78
|
default:
|
|
58
79
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
59
80
|
}
|
|
@@ -63,6 +84,7 @@ export class SchemaTag extends TagAbstract {
|
|
|
63
84
|
}
|
|
64
85
|
/**
|
|
65
86
|
* @returns {Promise<Schema>}
|
|
87
|
+
* @throws {MessageException}
|
|
66
88
|
* @throws {ClientException}
|
|
67
89
|
*/
|
|
68
90
|
async get(schemaId) {
|
|
@@ -81,6 +103,14 @@ export class SchemaTag extends TagAbstract {
|
|
|
81
103
|
catch (error) {
|
|
82
104
|
if (axios.isAxiosError(error) && error.response) {
|
|
83
105
|
switch (error.response.status) {
|
|
106
|
+
case 401:
|
|
107
|
+
throw new MessageException(error.response.data);
|
|
108
|
+
case 404:
|
|
109
|
+
throw new MessageException(error.response.data);
|
|
110
|
+
case 410:
|
|
111
|
+
throw new MessageException(error.response.data);
|
|
112
|
+
case 500:
|
|
113
|
+
throw new MessageException(error.response.data);
|
|
84
114
|
default:
|
|
85
115
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
86
116
|
}
|
|
@@ -90,6 +120,7 @@ export class SchemaTag extends TagAbstract {
|
|
|
90
120
|
}
|
|
91
121
|
/**
|
|
92
122
|
* @returns {Promise<Message>}
|
|
123
|
+
* @throws {MessageException}
|
|
93
124
|
* @throws {ClientException}
|
|
94
125
|
*/
|
|
95
126
|
async updateForm(schemaId, payload) {
|
|
@@ -109,6 +140,16 @@ export class SchemaTag extends TagAbstract {
|
|
|
109
140
|
catch (error) {
|
|
110
141
|
if (axios.isAxiosError(error) && error.response) {
|
|
111
142
|
switch (error.response.status) {
|
|
143
|
+
case 400:
|
|
144
|
+
throw new MessageException(error.response.data);
|
|
145
|
+
case 401:
|
|
146
|
+
throw new MessageException(error.response.data);
|
|
147
|
+
case 404:
|
|
148
|
+
throw new MessageException(error.response.data);
|
|
149
|
+
case 410:
|
|
150
|
+
throw new MessageException(error.response.data);
|
|
151
|
+
case 500:
|
|
152
|
+
throw new MessageException(error.response.data);
|
|
112
153
|
default:
|
|
113
154
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
114
155
|
}
|
|
@@ -118,6 +159,7 @@ export class SchemaTag extends TagAbstract {
|
|
|
118
159
|
}
|
|
119
160
|
/**
|
|
120
161
|
* @returns {Promise<SchemaPreviewResponse>}
|
|
162
|
+
* @throws {MessageException}
|
|
121
163
|
* @throws {ClientException}
|
|
122
164
|
*/
|
|
123
165
|
async getPreview(schemaId) {
|
|
@@ -136,6 +178,10 @@ export class SchemaTag extends TagAbstract {
|
|
|
136
178
|
catch (error) {
|
|
137
179
|
if (axios.isAxiosError(error) && error.response) {
|
|
138
180
|
switch (error.response.status) {
|
|
181
|
+
case 401:
|
|
182
|
+
throw new MessageException(error.response.data);
|
|
183
|
+
case 500:
|
|
184
|
+
throw new MessageException(error.response.data);
|
|
139
185
|
default:
|
|
140
186
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
141
187
|
}
|
|
@@ -145,6 +191,7 @@ export class SchemaTag extends TagAbstract {
|
|
|
145
191
|
}
|
|
146
192
|
/**
|
|
147
193
|
* @returns {Promise<Message>}
|
|
194
|
+
* @throws {MessageException}
|
|
148
195
|
* @throws {ClientException}
|
|
149
196
|
*/
|
|
150
197
|
async create(payload) {
|
|
@@ -162,6 +209,12 @@ export class SchemaTag extends TagAbstract {
|
|
|
162
209
|
catch (error) {
|
|
163
210
|
if (axios.isAxiosError(error) && error.response) {
|
|
164
211
|
switch (error.response.status) {
|
|
212
|
+
case 400:
|
|
213
|
+
throw new MessageException(error.response.data);
|
|
214
|
+
case 401:
|
|
215
|
+
throw new MessageException(error.response.data);
|
|
216
|
+
case 500:
|
|
217
|
+
throw new MessageException(error.response.data);
|
|
165
218
|
default:
|
|
166
219
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
167
220
|
}
|
|
@@ -171,6 +224,7 @@ export class SchemaTag extends TagAbstract {
|
|
|
171
224
|
}
|
|
172
225
|
/**
|
|
173
226
|
* @returns {Promise<SchemaCollection>}
|
|
227
|
+
* @throws {MessageException}
|
|
174
228
|
* @throws {ClientException}
|
|
175
229
|
*/
|
|
176
230
|
async getAll(categoryId, startIndex, count, search) {
|
|
@@ -192,6 +246,10 @@ export class SchemaTag extends TagAbstract {
|
|
|
192
246
|
catch (error) {
|
|
193
247
|
if (axios.isAxiosError(error) && error.response) {
|
|
194
248
|
switch (error.response.status) {
|
|
249
|
+
case 401:
|
|
250
|
+
throw new MessageException(error.response.data);
|
|
251
|
+
case 500:
|
|
252
|
+
throw new MessageException(error.response.data);
|
|
195
253
|
default:
|
|
196
254
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
197
255
|
}
|
|
@@ -12,31 +12,37 @@ import { ScopeUpdate } from "./ScopeUpdate";
|
|
|
12
12
|
export declare class ScopeTag extends TagAbstract {
|
|
13
13
|
/**
|
|
14
14
|
* @returns {Promise<Message>}
|
|
15
|
+
* @throws {MessageException}
|
|
15
16
|
* @throws {ClientException}
|
|
16
17
|
*/
|
|
17
18
|
delete(scopeId: string): Promise<Message>;
|
|
18
19
|
/**
|
|
19
20
|
* @returns {Promise<Message>}
|
|
21
|
+
* @throws {MessageException}
|
|
20
22
|
* @throws {ClientException}
|
|
21
23
|
*/
|
|
22
24
|
update(scopeId: string, payload: ScopeUpdate): Promise<Message>;
|
|
23
25
|
/**
|
|
24
26
|
* @returns {Promise<Scope>}
|
|
27
|
+
* @throws {MessageException}
|
|
25
28
|
* @throws {ClientException}
|
|
26
29
|
*/
|
|
27
30
|
get(scopeId: string): Promise<Scope>;
|
|
28
31
|
/**
|
|
29
32
|
* @returns {Promise<ScopeCategories>}
|
|
33
|
+
* @throws {MessageException}
|
|
30
34
|
* @throws {ClientException}
|
|
31
35
|
*/
|
|
32
36
|
getCategories(): Promise<ScopeCategories>;
|
|
33
37
|
/**
|
|
34
38
|
* @returns {Promise<Message>}
|
|
39
|
+
* @throws {MessageException}
|
|
35
40
|
* @throws {ClientException}
|
|
36
41
|
*/
|
|
37
42
|
create(payload: ScopeCreate): Promise<Message>;
|
|
38
43
|
/**
|
|
39
44
|
* @returns {Promise<ScopeCollection>}
|
|
45
|
+
* @throws {MessageException}
|
|
40
46
|
* @throws {ClientException}
|
|
41
47
|
*/
|
|
42
48
|
getAll(categoryId?: number, startIndex?: number, count?: number, search?: string): Promise<ScopeCollection>;
|
|
@@ -5,9 +5,11 @@
|
|
|
5
5
|
import axios from "axios";
|
|
6
6
|
import { TagAbstract } from "sdkgen-client";
|
|
7
7
|
import { ClientException, UnknownStatusCodeException } from "sdkgen-client";
|
|
8
|
+
import { MessageException } from "./MessageException";
|
|
8
9
|
export class ScopeTag extends TagAbstract {
|
|
9
10
|
/**
|
|
10
11
|
* @returns {Promise<Message>}
|
|
12
|
+
* @throws {MessageException}
|
|
11
13
|
* @throws {ClientException}
|
|
12
14
|
*/
|
|
13
15
|
async delete(scopeId) {
|
|
@@ -26,6 +28,14 @@ export class ScopeTag extends TagAbstract {
|
|
|
26
28
|
catch (error) {
|
|
27
29
|
if (axios.isAxiosError(error) && error.response) {
|
|
28
30
|
switch (error.response.status) {
|
|
31
|
+
case 401:
|
|
32
|
+
throw new MessageException(error.response.data);
|
|
33
|
+
case 404:
|
|
34
|
+
throw new MessageException(error.response.data);
|
|
35
|
+
case 410:
|
|
36
|
+
throw new MessageException(error.response.data);
|
|
37
|
+
case 500:
|
|
38
|
+
throw new MessageException(error.response.data);
|
|
29
39
|
default:
|
|
30
40
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
31
41
|
}
|
|
@@ -35,6 +45,7 @@ export class ScopeTag extends TagAbstract {
|
|
|
35
45
|
}
|
|
36
46
|
/**
|
|
37
47
|
* @returns {Promise<Message>}
|
|
48
|
+
* @throws {MessageException}
|
|
38
49
|
* @throws {ClientException}
|
|
39
50
|
*/
|
|
40
51
|
async update(scopeId, payload) {
|
|
@@ -54,6 +65,16 @@ export class ScopeTag extends TagAbstract {
|
|
|
54
65
|
catch (error) {
|
|
55
66
|
if (axios.isAxiosError(error) && error.response) {
|
|
56
67
|
switch (error.response.status) {
|
|
68
|
+
case 400:
|
|
69
|
+
throw new MessageException(error.response.data);
|
|
70
|
+
case 401:
|
|
71
|
+
throw new MessageException(error.response.data);
|
|
72
|
+
case 404:
|
|
73
|
+
throw new MessageException(error.response.data);
|
|
74
|
+
case 410:
|
|
75
|
+
throw new MessageException(error.response.data);
|
|
76
|
+
case 500:
|
|
77
|
+
throw new MessageException(error.response.data);
|
|
57
78
|
default:
|
|
58
79
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
59
80
|
}
|
|
@@ -63,6 +84,7 @@ export class ScopeTag extends TagAbstract {
|
|
|
63
84
|
}
|
|
64
85
|
/**
|
|
65
86
|
* @returns {Promise<Scope>}
|
|
87
|
+
* @throws {MessageException}
|
|
66
88
|
* @throws {ClientException}
|
|
67
89
|
*/
|
|
68
90
|
async get(scopeId) {
|
|
@@ -81,6 +103,14 @@ export class ScopeTag extends TagAbstract {
|
|
|
81
103
|
catch (error) {
|
|
82
104
|
if (axios.isAxiosError(error) && error.response) {
|
|
83
105
|
switch (error.response.status) {
|
|
106
|
+
case 401:
|
|
107
|
+
throw new MessageException(error.response.data);
|
|
108
|
+
case 404:
|
|
109
|
+
throw new MessageException(error.response.data);
|
|
110
|
+
case 410:
|
|
111
|
+
throw new MessageException(error.response.data);
|
|
112
|
+
case 500:
|
|
113
|
+
throw new MessageException(error.response.data);
|
|
84
114
|
default:
|
|
85
115
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
86
116
|
}
|
|
@@ -90,6 +120,7 @@ export class ScopeTag extends TagAbstract {
|
|
|
90
120
|
}
|
|
91
121
|
/**
|
|
92
122
|
* @returns {Promise<ScopeCategories>}
|
|
123
|
+
* @throws {MessageException}
|
|
93
124
|
* @throws {ClientException}
|
|
94
125
|
*/
|
|
95
126
|
async getCategories() {
|
|
@@ -106,6 +137,10 @@ export class ScopeTag extends TagAbstract {
|
|
|
106
137
|
catch (error) {
|
|
107
138
|
if (axios.isAxiosError(error) && error.response) {
|
|
108
139
|
switch (error.response.status) {
|
|
140
|
+
case 401:
|
|
141
|
+
throw new MessageException(error.response.data);
|
|
142
|
+
case 500:
|
|
143
|
+
throw new MessageException(error.response.data);
|
|
109
144
|
default:
|
|
110
145
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
111
146
|
}
|
|
@@ -115,6 +150,7 @@ export class ScopeTag extends TagAbstract {
|
|
|
115
150
|
}
|
|
116
151
|
/**
|
|
117
152
|
* @returns {Promise<Message>}
|
|
153
|
+
* @throws {MessageException}
|
|
118
154
|
* @throws {ClientException}
|
|
119
155
|
*/
|
|
120
156
|
async create(payload) {
|
|
@@ -132,6 +168,12 @@ export class ScopeTag extends TagAbstract {
|
|
|
132
168
|
catch (error) {
|
|
133
169
|
if (axios.isAxiosError(error) && error.response) {
|
|
134
170
|
switch (error.response.status) {
|
|
171
|
+
case 400:
|
|
172
|
+
throw new MessageException(error.response.data);
|
|
173
|
+
case 401:
|
|
174
|
+
throw new MessageException(error.response.data);
|
|
175
|
+
case 500:
|
|
176
|
+
throw new MessageException(error.response.data);
|
|
135
177
|
default:
|
|
136
178
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
137
179
|
}
|
|
@@ -141,6 +183,7 @@ export class ScopeTag extends TagAbstract {
|
|
|
141
183
|
}
|
|
142
184
|
/**
|
|
143
185
|
* @returns {Promise<ScopeCollection>}
|
|
186
|
+
* @throws {MessageException}
|
|
144
187
|
* @throws {ClientException}
|
|
145
188
|
*/
|
|
146
189
|
async getAll(categoryId, startIndex, count, search) {
|
|
@@ -162,6 +205,10 @@ export class ScopeTag extends TagAbstract {
|
|
|
162
205
|
catch (error) {
|
|
163
206
|
if (axios.isAxiosError(error) && error.response) {
|
|
164
207
|
switch (error.response.status) {
|
|
208
|
+
case 401:
|
|
209
|
+
throw new MessageException(error.response.data);
|
|
210
|
+
case 500:
|
|
211
|
+
throw new MessageException(error.response.data);
|
|
165
212
|
default:
|
|
166
213
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
167
214
|
}
|
|
@@ -9,11 +9,13 @@ import { SdkResponse } from "./SdkResponse";
|
|
|
9
9
|
export declare class SdkTag extends TagAbstract {
|
|
10
10
|
/**
|
|
11
11
|
* @returns {Promise<Message>}
|
|
12
|
+
* @throws {MessageException}
|
|
12
13
|
* @throws {ClientException}
|
|
13
14
|
*/
|
|
14
15
|
generate(payload: SdkGenerate): Promise<Message>;
|
|
15
16
|
/**
|
|
16
17
|
* @returns {Promise<SdkResponse>}
|
|
18
|
+
* @throws {MessageException}
|
|
17
19
|
* @throws {ClientException}
|
|
18
20
|
*/
|
|
19
21
|
getAll(): Promise<SdkResponse>;
|
|
@@ -5,9 +5,11 @@
|
|
|
5
5
|
import axios from "axios";
|
|
6
6
|
import { TagAbstract } from "sdkgen-client";
|
|
7
7
|
import { ClientException, UnknownStatusCodeException } from "sdkgen-client";
|
|
8
|
+
import { MessageException } from "./MessageException";
|
|
8
9
|
export class SdkTag extends TagAbstract {
|
|
9
10
|
/**
|
|
10
11
|
* @returns {Promise<Message>}
|
|
12
|
+
* @throws {MessageException}
|
|
11
13
|
* @throws {ClientException}
|
|
12
14
|
*/
|
|
13
15
|
async generate(payload) {
|
|
@@ -25,6 +27,10 @@ export class SdkTag extends TagAbstract {
|
|
|
25
27
|
catch (error) {
|
|
26
28
|
if (axios.isAxiosError(error) && error.response) {
|
|
27
29
|
switch (error.response.status) {
|
|
30
|
+
case 401:
|
|
31
|
+
throw new MessageException(error.response.data);
|
|
32
|
+
case 500:
|
|
33
|
+
throw new MessageException(error.response.data);
|
|
28
34
|
default:
|
|
29
35
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
30
36
|
}
|
|
@@ -34,6 +40,7 @@ export class SdkTag extends TagAbstract {
|
|
|
34
40
|
}
|
|
35
41
|
/**
|
|
36
42
|
* @returns {Promise<SdkResponse>}
|
|
43
|
+
* @throws {MessageException}
|
|
37
44
|
* @throws {ClientException}
|
|
38
45
|
*/
|
|
39
46
|
async getAll() {
|
|
@@ -50,6 +57,10 @@ export class SdkTag extends TagAbstract {
|
|
|
50
57
|
catch (error) {
|
|
51
58
|
if (axios.isAxiosError(error) && error.response) {
|
|
52
59
|
switch (error.response.status) {
|
|
60
|
+
case 401:
|
|
61
|
+
throw new MessageException(error.response.data);
|
|
62
|
+
case 500:
|
|
63
|
+
throw new MessageException(error.response.data);
|
|
53
64
|
default:
|
|
54
65
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
55
66
|
}
|
|
@@ -8,51 +8,61 @@ import { StatisticCount } from "./StatisticCount";
|
|
|
8
8
|
export declare class StatisticTag extends TagAbstract {
|
|
9
9
|
/**
|
|
10
10
|
* @returns {Promise<StatisticChart>}
|
|
11
|
+
* @throws {MessageException}
|
|
11
12
|
* @throws {ClientException}
|
|
12
13
|
*/
|
|
13
14
|
getUsedPoints(startIndex?: number, count?: number, search?: string, from?: string, to?: string, routeId?: number, appId?: number, userId?: number, ip?: string, userAgent?: string, method?: string, path?: string, header?: string, body?: string): Promise<StatisticChart>;
|
|
14
15
|
/**
|
|
15
16
|
* @returns {Promise<StatisticChart>}
|
|
17
|
+
* @throws {MessageException}
|
|
16
18
|
* @throws {ClientException}
|
|
17
19
|
*/
|
|
18
20
|
getTimePerRoute(startIndex?: number, count?: number, search?: string, from?: string, to?: string, routeId?: number, appId?: number, userId?: number, ip?: string, userAgent?: string, method?: string, path?: string, header?: string, body?: string): Promise<StatisticChart>;
|
|
19
21
|
/**
|
|
20
22
|
* @returns {Promise<StatisticChart>}
|
|
23
|
+
* @throws {MessageException}
|
|
21
24
|
* @throws {ClientException}
|
|
22
25
|
*/
|
|
23
26
|
getTimeAverage(startIndex?: number, count?: number, search?: string, from?: string, to?: string, routeId?: number, appId?: number, userId?: number, ip?: string, userAgent?: string, method?: string, path?: string, header?: string, body?: string): Promise<StatisticChart>;
|
|
24
27
|
/**
|
|
25
28
|
* @returns {Promise<StatisticChart>}
|
|
29
|
+
* @throws {MessageException}
|
|
26
30
|
* @throws {ClientException}
|
|
27
31
|
*/
|
|
28
32
|
getMostUsedRoutes(startIndex?: number, count?: number, search?: string, from?: string, to?: string, routeId?: number, appId?: number, userId?: number, ip?: string, userAgent?: string, method?: string, path?: string, header?: string, body?: string): Promise<StatisticChart>;
|
|
29
33
|
/**
|
|
30
34
|
* @returns {Promise<StatisticChart>}
|
|
35
|
+
* @throws {MessageException}
|
|
31
36
|
* @throws {ClientException}
|
|
32
37
|
*/
|
|
33
38
|
getMostUsedApps(startIndex?: number, count?: number, search?: string, from?: string, to?: string, routeId?: number, appId?: number, userId?: number, ip?: string, userAgent?: string, method?: string, path?: string, header?: string, body?: string): Promise<StatisticChart>;
|
|
34
39
|
/**
|
|
35
40
|
* @returns {Promise<StatisticChart>}
|
|
41
|
+
* @throws {MessageException}
|
|
36
42
|
* @throws {ClientException}
|
|
37
43
|
*/
|
|
38
44
|
getIssuedTokens(startIndex?: number, count?: number, search?: string, from?: string, to?: string, routeId?: number, appId?: number, userId?: number, ip?: string, userAgent?: string, method?: string, path?: string, header?: string, body?: string): Promise<StatisticChart>;
|
|
39
45
|
/**
|
|
40
46
|
* @returns {Promise<StatisticChart>}
|
|
47
|
+
* @throws {MessageException}
|
|
41
48
|
* @throws {ClientException}
|
|
42
49
|
*/
|
|
43
50
|
getIncomingTransactions(startIndex?: number, count?: number, search?: string, from?: string, to?: string, routeId?: number, appId?: number, userId?: number, ip?: string, userAgent?: string, method?: string, path?: string, header?: string, body?: string): Promise<StatisticChart>;
|
|
44
51
|
/**
|
|
45
52
|
* @returns {Promise<StatisticChart>}
|
|
53
|
+
* @throws {MessageException}
|
|
46
54
|
* @throws {ClientException}
|
|
47
55
|
*/
|
|
48
56
|
getIncomingRequests(startIndex?: number, count?: number, search?: string, from?: string, to?: string, routeId?: number, appId?: number, userId?: number, ip?: string, userAgent?: string, method?: string, path?: string, header?: string, body?: string): Promise<StatisticChart>;
|
|
49
57
|
/**
|
|
50
58
|
* @returns {Promise<StatisticChart>}
|
|
59
|
+
* @throws {MessageException}
|
|
51
60
|
* @throws {ClientException}
|
|
52
61
|
*/
|
|
53
62
|
getErrorsPerRoute(startIndex?: number, count?: number, search?: string, from?: string, to?: string, routeId?: number, appId?: number, userId?: number, ip?: string, userAgent?: string, method?: string, path?: string, header?: string, body?: string): Promise<StatisticChart>;
|
|
54
63
|
/**
|
|
55
64
|
* @returns {Promise<StatisticCount>}
|
|
65
|
+
* @throws {MessageException}
|
|
56
66
|
* @throws {ClientException}
|
|
57
67
|
*/
|
|
58
68
|
getCountRequests(startIndex?: number, count?: number, search?: string, from?: string, to?: string, routeId?: number, appId?: number, userId?: number, ip?: string, userAgent?: string, method?: string, path?: string, header?: string, body?: string): Promise<StatisticCount>;
|