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
|
@@ -15,51 +15,61 @@ import { Message } from "./Message";
|
|
|
15
15
|
export declare class EventTag extends TagAbstract {
|
|
16
16
|
/**
|
|
17
17
|
* @returns {Promise<Message>}
|
|
18
|
+
* @throws {MessageException}
|
|
18
19
|
* @throws {ClientException}
|
|
19
20
|
*/
|
|
20
21
|
delete(eventId: string): Promise<Message>;
|
|
21
22
|
/**
|
|
22
23
|
* @returns {Promise<Message>}
|
|
24
|
+
* @throws {MessageException}
|
|
23
25
|
* @throws {ClientException}
|
|
24
26
|
*/
|
|
25
27
|
update(eventId: string, payload: EventUpdate): Promise<Message>;
|
|
26
28
|
/**
|
|
27
29
|
* @returns {Promise<Event>}
|
|
30
|
+
* @throws {MessageException}
|
|
28
31
|
* @throws {ClientException}
|
|
29
32
|
*/
|
|
30
33
|
get(eventId: string): Promise<Event>;
|
|
31
34
|
/**
|
|
32
35
|
* @returns {Promise<Message>}
|
|
36
|
+
* @throws {MessageException}
|
|
33
37
|
* @throws {ClientException}
|
|
34
38
|
*/
|
|
35
39
|
create(payload: EventCreate): Promise<Message>;
|
|
36
40
|
/**
|
|
37
41
|
* @returns {Promise<EventCollection>}
|
|
42
|
+
* @throws {MessageException}
|
|
38
43
|
* @throws {ClientException}
|
|
39
44
|
*/
|
|
40
45
|
getAll(categoryId?: number, startIndex?: number, count?: number, search?: string): Promise<EventCollection>;
|
|
41
46
|
/**
|
|
42
47
|
* @returns {Promise<Message>}
|
|
48
|
+
* @throws {MessageException}
|
|
43
49
|
* @throws {ClientException}
|
|
44
50
|
*/
|
|
45
51
|
deleteSubscription(subscriptionId: string): Promise<Message>;
|
|
46
52
|
/**
|
|
47
53
|
* @returns {Promise<Message>}
|
|
54
|
+
* @throws {MessageException}
|
|
48
55
|
* @throws {ClientException}
|
|
49
56
|
*/
|
|
50
57
|
updateSubscription(subscriptionId: string, payload: EventSubscriptionUpdate): Promise<Message>;
|
|
51
58
|
/**
|
|
52
59
|
* @returns {Promise<EventSubscription>}
|
|
60
|
+
* @throws {MessageException}
|
|
53
61
|
* @throws {ClientException}
|
|
54
62
|
*/
|
|
55
63
|
getSubscription(subscriptionId: string): Promise<EventSubscription>;
|
|
56
64
|
/**
|
|
57
65
|
* @returns {Promise<Message>}
|
|
66
|
+
* @throws {MessageException}
|
|
58
67
|
* @throws {ClientException}
|
|
59
68
|
*/
|
|
60
69
|
createSubscription(payload: EventSubscriptionCreate): Promise<Message>;
|
|
61
70
|
/**
|
|
62
71
|
* @returns {Promise<EventSubscriptionCollection>}
|
|
72
|
+
* @throws {MessageException}
|
|
63
73
|
* @throws {ClientException}
|
|
64
74
|
*/
|
|
65
75
|
getAllSubscriptions(startIndex?: number, count?: number, search?: string): Promise<EventSubscriptionCollection>;
|
|
@@ -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 EventTag extends TagAbstract {
|
|
9
10
|
/**
|
|
10
11
|
* @returns {Promise<Message>}
|
|
12
|
+
* @throws {MessageException}
|
|
11
13
|
* @throws {ClientException}
|
|
12
14
|
*/
|
|
13
15
|
async delete(eventId) {
|
|
@@ -26,6 +28,14 @@ export class EventTag 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 EventTag extends TagAbstract {
|
|
|
35
45
|
}
|
|
36
46
|
/**
|
|
37
47
|
* @returns {Promise<Message>}
|
|
48
|
+
* @throws {MessageException}
|
|
38
49
|
* @throws {ClientException}
|
|
39
50
|
*/
|
|
40
51
|
async update(eventId, payload) {
|
|
@@ -54,6 +65,16 @@ export class EventTag 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 EventTag extends TagAbstract {
|
|
|
63
84
|
}
|
|
64
85
|
/**
|
|
65
86
|
* @returns {Promise<Event>}
|
|
87
|
+
* @throws {MessageException}
|
|
66
88
|
* @throws {ClientException}
|
|
67
89
|
*/
|
|
68
90
|
async get(eventId) {
|
|
@@ -81,6 +103,14 @@ export class EventTag 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 EventTag 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 EventTag 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 EventTag extends TagAbstract {
|
|
|
116
153
|
}
|
|
117
154
|
/**
|
|
118
155
|
* @returns {Promise<EventCollection>}
|
|
156
|
+
* @throws {MessageException}
|
|
119
157
|
* @throws {ClientException}
|
|
120
158
|
*/
|
|
121
159
|
async getAll(categoryId, startIndex, count, search) {
|
|
@@ -137,6 +175,10 @@ export class EventTag extends TagAbstract {
|
|
|
137
175
|
catch (error) {
|
|
138
176
|
if (axios.isAxiosError(error) && error.response) {
|
|
139
177
|
switch (error.response.status) {
|
|
178
|
+
case 401:
|
|
179
|
+
throw new MessageException(error.response.data);
|
|
180
|
+
case 500:
|
|
181
|
+
throw new MessageException(error.response.data);
|
|
140
182
|
default:
|
|
141
183
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
142
184
|
}
|
|
@@ -146,6 +188,7 @@ export class EventTag extends TagAbstract {
|
|
|
146
188
|
}
|
|
147
189
|
/**
|
|
148
190
|
* @returns {Promise<Message>}
|
|
191
|
+
* @throws {MessageException}
|
|
149
192
|
* @throws {ClientException}
|
|
150
193
|
*/
|
|
151
194
|
async deleteSubscription(subscriptionId) {
|
|
@@ -164,6 +207,14 @@ export class EventTag extends TagAbstract {
|
|
|
164
207
|
catch (error) {
|
|
165
208
|
if (axios.isAxiosError(error) && error.response) {
|
|
166
209
|
switch (error.response.status) {
|
|
210
|
+
case 401:
|
|
211
|
+
throw new MessageException(error.response.data);
|
|
212
|
+
case 404:
|
|
213
|
+
throw new MessageException(error.response.data);
|
|
214
|
+
case 410:
|
|
215
|
+
throw new MessageException(error.response.data);
|
|
216
|
+
case 500:
|
|
217
|
+
throw new MessageException(error.response.data);
|
|
167
218
|
default:
|
|
168
219
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
169
220
|
}
|
|
@@ -173,6 +224,7 @@ export class EventTag extends TagAbstract {
|
|
|
173
224
|
}
|
|
174
225
|
/**
|
|
175
226
|
* @returns {Promise<Message>}
|
|
227
|
+
* @throws {MessageException}
|
|
176
228
|
* @throws {ClientException}
|
|
177
229
|
*/
|
|
178
230
|
async updateSubscription(subscriptionId, payload) {
|
|
@@ -192,6 +244,16 @@ export class EventTag extends TagAbstract {
|
|
|
192
244
|
catch (error) {
|
|
193
245
|
if (axios.isAxiosError(error) && error.response) {
|
|
194
246
|
switch (error.response.status) {
|
|
247
|
+
case 400:
|
|
248
|
+
throw new MessageException(error.response.data);
|
|
249
|
+
case 401:
|
|
250
|
+
throw new MessageException(error.response.data);
|
|
251
|
+
case 404:
|
|
252
|
+
throw new MessageException(error.response.data);
|
|
253
|
+
case 410:
|
|
254
|
+
throw new MessageException(error.response.data);
|
|
255
|
+
case 500:
|
|
256
|
+
throw new MessageException(error.response.data);
|
|
195
257
|
default:
|
|
196
258
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
197
259
|
}
|
|
@@ -201,6 +263,7 @@ export class EventTag extends TagAbstract {
|
|
|
201
263
|
}
|
|
202
264
|
/**
|
|
203
265
|
* @returns {Promise<EventSubscription>}
|
|
266
|
+
* @throws {MessageException}
|
|
204
267
|
* @throws {ClientException}
|
|
205
268
|
*/
|
|
206
269
|
async getSubscription(subscriptionId) {
|
|
@@ -219,6 +282,12 @@ export class EventTag extends TagAbstract {
|
|
|
219
282
|
catch (error) {
|
|
220
283
|
if (axios.isAxiosError(error) && error.response) {
|
|
221
284
|
switch (error.response.status) {
|
|
285
|
+
case 401:
|
|
286
|
+
throw new MessageException(error.response.data);
|
|
287
|
+
case 404:
|
|
288
|
+
throw new MessageException(error.response.data);
|
|
289
|
+
case 500:
|
|
290
|
+
throw new MessageException(error.response.data);
|
|
222
291
|
default:
|
|
223
292
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
224
293
|
}
|
|
@@ -228,6 +297,7 @@ export class EventTag extends TagAbstract {
|
|
|
228
297
|
}
|
|
229
298
|
/**
|
|
230
299
|
* @returns {Promise<Message>}
|
|
300
|
+
* @throws {MessageException}
|
|
231
301
|
* @throws {ClientException}
|
|
232
302
|
*/
|
|
233
303
|
async createSubscription(payload) {
|
|
@@ -245,6 +315,12 @@ export class EventTag extends TagAbstract {
|
|
|
245
315
|
catch (error) {
|
|
246
316
|
if (axios.isAxiosError(error) && error.response) {
|
|
247
317
|
switch (error.response.status) {
|
|
318
|
+
case 400:
|
|
319
|
+
throw new MessageException(error.response.data);
|
|
320
|
+
case 401:
|
|
321
|
+
throw new MessageException(error.response.data);
|
|
322
|
+
case 500:
|
|
323
|
+
throw new MessageException(error.response.data);
|
|
248
324
|
default:
|
|
249
325
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
250
326
|
}
|
|
@@ -254,6 +330,7 @@ export class EventTag extends TagAbstract {
|
|
|
254
330
|
}
|
|
255
331
|
/**
|
|
256
332
|
* @returns {Promise<EventSubscriptionCollection>}
|
|
333
|
+
* @throws {MessageException}
|
|
257
334
|
* @throws {ClientException}
|
|
258
335
|
*/
|
|
259
336
|
async getAllSubscriptions(startIndex, count, search) {
|
|
@@ -274,6 +351,10 @@ export class EventTag extends TagAbstract {
|
|
|
274
351
|
catch (error) {
|
|
275
352
|
if (axios.isAxiosError(error) && error.response) {
|
|
276
353
|
switch (error.response.status) {
|
|
354
|
+
case 401:
|
|
355
|
+
throw new MessageException(error.response.data);
|
|
356
|
+
case 500:
|
|
357
|
+
throw new MessageException(error.response.data);
|
|
277
358
|
default:
|
|
278
359
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
279
360
|
}
|
|
@@ -12,21 +12,25 @@ import { Message } from "./Message";
|
|
|
12
12
|
export declare class GeneratorTag extends TagAbstract {
|
|
13
13
|
/**
|
|
14
14
|
* @returns {Promise<GeneratorProviderChangelog>}
|
|
15
|
+
* @throws {MessageException}
|
|
15
16
|
* @throws {ClientException}
|
|
16
17
|
*/
|
|
17
18
|
getChangelog(provider: string, payload: GeneratorProviderConfig): Promise<GeneratorProviderChangelog>;
|
|
18
19
|
/**
|
|
19
20
|
* @returns {Promise<Message>}
|
|
21
|
+
* @throws {MessageException}
|
|
20
22
|
* @throws {ClientException}
|
|
21
23
|
*/
|
|
22
24
|
executeProvider(provider: string, payload: GeneratorProvider): Promise<Message>;
|
|
23
25
|
/**
|
|
24
26
|
* @returns {Promise<FormContainer>}
|
|
27
|
+
* @throws {MessageException}
|
|
25
28
|
* @throws {ClientException}
|
|
26
29
|
*/
|
|
27
30
|
getProviderForm(provider: string): Promise<FormContainer>;
|
|
28
31
|
/**
|
|
29
32
|
* @returns {Promise<GeneratorIndexProviders>}
|
|
33
|
+
* @throws {MessageException}
|
|
30
34
|
* @throws {ClientException}
|
|
31
35
|
*/
|
|
32
36
|
getProviders(): Promise<GeneratorIndexProviders>;
|
|
@@ -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 GeneratorTag extends TagAbstract {
|
|
9
10
|
/**
|
|
10
11
|
* @returns {Promise<GeneratorProviderChangelog>}
|
|
12
|
+
* @throws {MessageException}
|
|
11
13
|
* @throws {ClientException}
|
|
12
14
|
*/
|
|
13
15
|
async getChangelog(provider, payload) {
|
|
@@ -27,6 +29,10 @@ export class GeneratorTag extends TagAbstract {
|
|
|
27
29
|
catch (error) {
|
|
28
30
|
if (axios.isAxiosError(error) && error.response) {
|
|
29
31
|
switch (error.response.status) {
|
|
32
|
+
case 401:
|
|
33
|
+
throw new MessageException(error.response.data);
|
|
34
|
+
case 500:
|
|
35
|
+
throw new MessageException(error.response.data);
|
|
30
36
|
default:
|
|
31
37
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
32
38
|
}
|
|
@@ -36,6 +42,7 @@ export class GeneratorTag extends TagAbstract {
|
|
|
36
42
|
}
|
|
37
43
|
/**
|
|
38
44
|
* @returns {Promise<Message>}
|
|
45
|
+
* @throws {MessageException}
|
|
39
46
|
* @throws {ClientException}
|
|
40
47
|
*/
|
|
41
48
|
async executeProvider(provider, payload) {
|
|
@@ -55,6 +62,10 @@ export class GeneratorTag extends TagAbstract {
|
|
|
55
62
|
catch (error) {
|
|
56
63
|
if (axios.isAxiosError(error) && error.response) {
|
|
57
64
|
switch (error.response.status) {
|
|
65
|
+
case 401:
|
|
66
|
+
throw new MessageException(error.response.data);
|
|
67
|
+
case 500:
|
|
68
|
+
throw new MessageException(error.response.data);
|
|
58
69
|
default:
|
|
59
70
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
60
71
|
}
|
|
@@ -64,6 +75,7 @@ export class GeneratorTag extends TagAbstract {
|
|
|
64
75
|
}
|
|
65
76
|
/**
|
|
66
77
|
* @returns {Promise<FormContainer>}
|
|
78
|
+
* @throws {MessageException}
|
|
67
79
|
* @throws {ClientException}
|
|
68
80
|
*/
|
|
69
81
|
async getProviderForm(provider) {
|
|
@@ -82,6 +94,10 @@ export class GeneratorTag extends TagAbstract {
|
|
|
82
94
|
catch (error) {
|
|
83
95
|
if (axios.isAxiosError(error) && error.response) {
|
|
84
96
|
switch (error.response.status) {
|
|
97
|
+
case 401:
|
|
98
|
+
throw new MessageException(error.response.data);
|
|
99
|
+
case 500:
|
|
100
|
+
throw new MessageException(error.response.data);
|
|
85
101
|
default:
|
|
86
102
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
87
103
|
}
|
|
@@ -91,6 +107,7 @@ export class GeneratorTag extends TagAbstract {
|
|
|
91
107
|
}
|
|
92
108
|
/**
|
|
93
109
|
* @returns {Promise<GeneratorIndexProviders>}
|
|
110
|
+
* @throws {MessageException}
|
|
94
111
|
* @throws {ClientException}
|
|
95
112
|
*/
|
|
96
113
|
async getProviders() {
|
|
@@ -107,6 +124,10 @@ export class GeneratorTag extends TagAbstract {
|
|
|
107
124
|
catch (error) {
|
|
108
125
|
if (axios.isAxiosError(error) && error.response) {
|
|
109
126
|
switch (error.response.status) {
|
|
127
|
+
case 401:
|
|
128
|
+
throw new MessageException(error.response.data);
|
|
129
|
+
case 500:
|
|
130
|
+
throw new MessageException(error.response.data);
|
|
110
131
|
default:
|
|
111
132
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
112
133
|
}
|
|
@@ -10,21 +10,25 @@ import { LogErrorCollection } from "./LogErrorCollection";
|
|
|
10
10
|
export declare class LogTag extends TagAbstract {
|
|
11
11
|
/**
|
|
12
12
|
* @returns {Promise<Log>}
|
|
13
|
+
* @throws {MessageException}
|
|
13
14
|
* @throws {ClientException}
|
|
14
15
|
*/
|
|
15
16
|
get(logId: string): Promise<Log>;
|
|
16
17
|
/**
|
|
17
18
|
* @returns {Promise<LogCollection>}
|
|
19
|
+
* @throws {MessageException}
|
|
18
20
|
* @throws {ClientException}
|
|
19
21
|
*/
|
|
20
22
|
getAll(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<LogCollection>;
|
|
21
23
|
/**
|
|
22
24
|
* @returns {Promise<LogError>}
|
|
25
|
+
* @throws {MessageException}
|
|
23
26
|
* @throws {ClientException}
|
|
24
27
|
*/
|
|
25
28
|
getError(errorId: string): Promise<LogError>;
|
|
26
29
|
/**
|
|
27
30
|
* @returns {Promise<LogErrorCollection>}
|
|
31
|
+
* @throws {MessageException}
|
|
28
32
|
* @throws {ClientException}
|
|
29
33
|
*/
|
|
30
34
|
getAllErrors(startIndex?: number, count?: number, search?: string): Promise<LogErrorCollection>;
|
|
@@ -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 LogTag extends TagAbstract {
|
|
9
10
|
/**
|
|
10
11
|
* @returns {Promise<Log>}
|
|
12
|
+
* @throws {MessageException}
|
|
11
13
|
* @throws {ClientException}
|
|
12
14
|
*/
|
|
13
15
|
async get(logId) {
|
|
@@ -26,6 +28,14 @@ export class LogTag 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 LogTag extends TagAbstract {
|
|
|
35
45
|
}
|
|
36
46
|
/**
|
|
37
47
|
* @returns {Promise<LogCollection>}
|
|
48
|
+
* @throws {MessageException}
|
|
38
49
|
* @throws {ClientException}
|
|
39
50
|
*/
|
|
40
51
|
async getAll(startIndex, count, search, from, to, routeId, appId, userId, ip, userAgent, method, path, header, body) {
|
|
@@ -66,6 +77,10 @@ export class LogTag extends TagAbstract {
|
|
|
66
77
|
catch (error) {
|
|
67
78
|
if (axios.isAxiosError(error) && error.response) {
|
|
68
79
|
switch (error.response.status) {
|
|
80
|
+
case 401:
|
|
81
|
+
throw new MessageException(error.response.data);
|
|
82
|
+
case 500:
|
|
83
|
+
throw new MessageException(error.response.data);
|
|
69
84
|
default:
|
|
70
85
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
71
86
|
}
|
|
@@ -75,6 +90,7 @@ export class LogTag extends TagAbstract {
|
|
|
75
90
|
}
|
|
76
91
|
/**
|
|
77
92
|
* @returns {Promise<LogError>}
|
|
93
|
+
* @throws {MessageException}
|
|
78
94
|
* @throws {ClientException}
|
|
79
95
|
*/
|
|
80
96
|
async getError(errorId) {
|
|
@@ -93,6 +109,10 @@ export class LogTag extends TagAbstract {
|
|
|
93
109
|
catch (error) {
|
|
94
110
|
if (axios.isAxiosError(error) && error.response) {
|
|
95
111
|
switch (error.response.status) {
|
|
112
|
+
case 401:
|
|
113
|
+
throw new MessageException(error.response.data);
|
|
114
|
+
case 500:
|
|
115
|
+
throw new MessageException(error.response.data);
|
|
96
116
|
default:
|
|
97
117
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
98
118
|
}
|
|
@@ -102,6 +122,7 @@ export class LogTag extends TagAbstract {
|
|
|
102
122
|
}
|
|
103
123
|
/**
|
|
104
124
|
* @returns {Promise<LogErrorCollection>}
|
|
125
|
+
* @throws {MessageException}
|
|
105
126
|
* @throws {ClientException}
|
|
106
127
|
*/
|
|
107
128
|
async getAllErrors(startIndex, count, search) {
|
|
@@ -122,6 +143,10 @@ export class LogTag extends TagAbstract {
|
|
|
122
143
|
catch (error) {
|
|
123
144
|
if (axios.isAxiosError(error) && error.response) {
|
|
124
145
|
switch (error.response.status) {
|
|
146
|
+
case 401:
|
|
147
|
+
throw new MessageException(error.response.data);
|
|
148
|
+
case 500:
|
|
149
|
+
throw new MessageException(error.response.data);
|
|
125
150
|
default:
|
|
126
151
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
127
152
|
}
|
|
@@ -10,26 +10,31 @@ import { Message } from "./Message";
|
|
|
10
10
|
export declare class MarketplaceTag extends TagAbstract {
|
|
11
11
|
/**
|
|
12
12
|
* @returns {Promise<Message>}
|
|
13
|
+
* @throws {MessageException}
|
|
13
14
|
* @throws {ClientException}
|
|
14
15
|
*/
|
|
15
16
|
remove(appName: string): Promise<Message>;
|
|
16
17
|
/**
|
|
17
18
|
* @returns {Promise<Message>}
|
|
19
|
+
* @throws {MessageException}
|
|
18
20
|
* @throws {ClientException}
|
|
19
21
|
*/
|
|
20
22
|
update(appName: string): Promise<Message>;
|
|
21
23
|
/**
|
|
22
24
|
* @returns {Promise<MarketplaceLocalApp>}
|
|
25
|
+
* @throws {MessageException}
|
|
23
26
|
* @throws {ClientException}
|
|
24
27
|
*/
|
|
25
28
|
get(appName: string): Promise<MarketplaceLocalApp>;
|
|
26
29
|
/**
|
|
27
30
|
* @returns {Promise<Message>}
|
|
31
|
+
* @throws {MessageException}
|
|
28
32
|
* @throws {ClientException}
|
|
29
33
|
*/
|
|
30
34
|
install(payload: MarketplaceInstall): Promise<Message>;
|
|
31
35
|
/**
|
|
32
36
|
* @returns {Promise<MarketplaceCollection>}
|
|
37
|
+
* @throws {MessageException}
|
|
33
38
|
* @throws {ClientException}
|
|
34
39
|
*/
|
|
35
40
|
getAll(): Promise<MarketplaceCollection>;
|
|
@@ -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 MarketplaceTag extends TagAbstract {
|
|
9
10
|
/**
|
|
10
11
|
* @returns {Promise<Message>}
|
|
12
|
+
* @throws {MessageException}
|
|
11
13
|
* @throws {ClientException}
|
|
12
14
|
*/
|
|
13
15
|
async remove(appName) {
|
|
@@ -26,6 +28,12 @@ export class MarketplaceTag extends TagAbstract {
|
|
|
26
28
|
catch (error) {
|
|
27
29
|
if (axios.isAxiosError(error) && error.response) {
|
|
28
30
|
switch (error.response.status) {
|
|
31
|
+
case 400:
|
|
32
|
+
throw new MessageException(error.response.data);
|
|
33
|
+
case 401:
|
|
34
|
+
throw new MessageException(error.response.data);
|
|
35
|
+
case 500:
|
|
36
|
+
throw new MessageException(error.response.data);
|
|
29
37
|
default:
|
|
30
38
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
31
39
|
}
|
|
@@ -35,6 +43,7 @@ export class MarketplaceTag extends TagAbstract {
|
|
|
35
43
|
}
|
|
36
44
|
/**
|
|
37
45
|
* @returns {Promise<Message>}
|
|
46
|
+
* @throws {MessageException}
|
|
38
47
|
* @throws {ClientException}
|
|
39
48
|
*/
|
|
40
49
|
async update(appName) {
|
|
@@ -53,6 +62,16 @@ export class MarketplaceTag extends TagAbstract {
|
|
|
53
62
|
catch (error) {
|
|
54
63
|
if (axios.isAxiosError(error) && error.response) {
|
|
55
64
|
switch (error.response.status) {
|
|
65
|
+
case 400:
|
|
66
|
+
throw new MessageException(error.response.data);
|
|
67
|
+
case 401:
|
|
68
|
+
throw new MessageException(error.response.data);
|
|
69
|
+
case 404:
|
|
70
|
+
throw new MessageException(error.response.data);
|
|
71
|
+
case 410:
|
|
72
|
+
throw new MessageException(error.response.data);
|
|
73
|
+
case 500:
|
|
74
|
+
throw new MessageException(error.response.data);
|
|
56
75
|
default:
|
|
57
76
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
58
77
|
}
|
|
@@ -62,6 +81,7 @@ export class MarketplaceTag extends TagAbstract {
|
|
|
62
81
|
}
|
|
63
82
|
/**
|
|
64
83
|
* @returns {Promise<MarketplaceLocalApp>}
|
|
84
|
+
* @throws {MessageException}
|
|
65
85
|
* @throws {ClientException}
|
|
66
86
|
*/
|
|
67
87
|
async get(appName) {
|
|
@@ -80,6 +100,14 @@ export class MarketplaceTag extends TagAbstract {
|
|
|
80
100
|
catch (error) {
|
|
81
101
|
if (axios.isAxiosError(error) && error.response) {
|
|
82
102
|
switch (error.response.status) {
|
|
103
|
+
case 401:
|
|
104
|
+
throw new MessageException(error.response.data);
|
|
105
|
+
case 404:
|
|
106
|
+
throw new MessageException(error.response.data);
|
|
107
|
+
case 410:
|
|
108
|
+
throw new MessageException(error.response.data);
|
|
109
|
+
case 500:
|
|
110
|
+
throw new MessageException(error.response.data);
|
|
83
111
|
default:
|
|
84
112
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
85
113
|
}
|
|
@@ -89,6 +117,7 @@ export class MarketplaceTag extends TagAbstract {
|
|
|
89
117
|
}
|
|
90
118
|
/**
|
|
91
119
|
* @returns {Promise<Message>}
|
|
120
|
+
* @throws {MessageException}
|
|
92
121
|
* @throws {ClientException}
|
|
93
122
|
*/
|
|
94
123
|
async install(payload) {
|
|
@@ -106,6 +135,12 @@ export class MarketplaceTag extends TagAbstract {
|
|
|
106
135
|
catch (error) {
|
|
107
136
|
if (axios.isAxiosError(error) && error.response) {
|
|
108
137
|
switch (error.response.status) {
|
|
138
|
+
case 400:
|
|
139
|
+
throw new MessageException(error.response.data);
|
|
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 MarketplaceTag extends TagAbstract {
|
|
|
115
150
|
}
|
|
116
151
|
/**
|
|
117
152
|
* @returns {Promise<MarketplaceCollection>}
|
|
153
|
+
* @throws {MessageException}
|
|
118
154
|
* @throws {ClientException}
|
|
119
155
|
*/
|
|
120
156
|
async getAll() {
|
|
@@ -131,6 +167,10 @@ export class MarketplaceTag extends TagAbstract {
|
|
|
131
167
|
catch (error) {
|
|
132
168
|
if (axios.isAxiosError(error) && error.response) {
|
|
133
169
|
switch (error.response.status) {
|
|
170
|
+
case 401:
|
|
171
|
+
throw new MessageException(error.response.data);
|
|
172
|
+
case 500:
|
|
173
|
+
throw new MessageException(error.response.data);
|
|
134
174
|
default:
|
|
135
175
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
136
176
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MessageException automatically generated by SDKgen please do not edit this file manually
|
|
3
|
+
* {@link https://sdkgen.app}
|
|
4
|
+
*/
|
|
5
|
+
import { KnownStatusCodeException } from "sdkgen-client";
|
|
6
|
+
import { Message } from "./Message";
|
|
7
|
+
export declare class MessageException extends KnownStatusCodeException {
|
|
8
|
+
private payload;
|
|
9
|
+
constructor(payload: Message);
|
|
10
|
+
getPayload(): Message;
|
|
11
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MessageException automatically generated by SDKgen please do not edit this file manually
|
|
3
|
+
* {@link https://sdkgen.app}
|
|
4
|
+
*/
|
|
5
|
+
import { KnownStatusCodeException } from "sdkgen-client";
|
|
6
|
+
export class MessageException extends KnownStatusCodeException {
|
|
7
|
+
constructor(payload) {
|
|
8
|
+
super();
|
|
9
|
+
this.payload = payload;
|
|
10
|
+
}
|
|
11
|
+
getPayload() {
|
|
12
|
+
return this.payload;
|
|
13
|
+
}
|
|
14
|
+
}
|