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 AccountTag extends TagAbstract {
|
|
9
10
|
/**
|
|
10
11
|
* @returns {Promise<Message>}
|
|
12
|
+
* @throws {MessageException}
|
|
11
13
|
* @throws {ClientException}
|
|
12
14
|
*/
|
|
13
15
|
async executePasswordReset(payload) {
|
|
@@ -25,6 +27,10 @@ export class AccountTag extends TagAbstract {
|
|
|
25
27
|
catch (error) {
|
|
26
28
|
if (axios.isAxiosError(error) && error.response) {
|
|
27
29
|
switch (error.response.status) {
|
|
30
|
+
case 400:
|
|
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 AccountTag extends TagAbstract {
|
|
|
34
40
|
}
|
|
35
41
|
/**
|
|
36
42
|
* @returns {Promise<Message>}
|
|
43
|
+
* @throws {MessageException}
|
|
37
44
|
* @throws {ClientException}
|
|
38
45
|
*/
|
|
39
46
|
async requestPasswordReset(payload) {
|
|
@@ -51,6 +58,10 @@ export class AccountTag extends TagAbstract {
|
|
|
51
58
|
catch (error) {
|
|
52
59
|
if (axios.isAxiosError(error) && error.response) {
|
|
53
60
|
switch (error.response.status) {
|
|
61
|
+
case 400:
|
|
62
|
+
throw new MessageException(error.response.data);
|
|
63
|
+
case 500:
|
|
64
|
+
throw new MessageException(error.response.data);
|
|
54
65
|
default:
|
|
55
66
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
56
67
|
}
|
|
@@ -60,6 +71,7 @@ export class AccountTag extends TagAbstract {
|
|
|
60
71
|
}
|
|
61
72
|
/**
|
|
62
73
|
* @returns {Promise<Message>}
|
|
74
|
+
* @throws {MessageException}
|
|
63
75
|
* @throws {ClientException}
|
|
64
76
|
*/
|
|
65
77
|
async register(payload) {
|
|
@@ -77,6 +89,10 @@ export class AccountTag extends TagAbstract {
|
|
|
77
89
|
catch (error) {
|
|
78
90
|
if (axios.isAxiosError(error) && error.response) {
|
|
79
91
|
switch (error.response.status) {
|
|
92
|
+
case 400:
|
|
93
|
+
throw new MessageException(error.response.data);
|
|
94
|
+
case 500:
|
|
95
|
+
throw new MessageException(error.response.data);
|
|
80
96
|
default:
|
|
81
97
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
82
98
|
}
|
|
@@ -86,6 +102,7 @@ export class AccountTag extends TagAbstract {
|
|
|
86
102
|
}
|
|
87
103
|
/**
|
|
88
104
|
* @returns {Promise<UserJWT>}
|
|
105
|
+
* @throws {MessageException}
|
|
89
106
|
* @throws {ClientException}
|
|
90
107
|
*/
|
|
91
108
|
async provider(provider, payload) {
|
|
@@ -105,6 +122,10 @@ export class AccountTag extends TagAbstract {
|
|
|
105
122
|
catch (error) {
|
|
106
123
|
if (axios.isAxiosError(error) && error.response) {
|
|
107
124
|
switch (error.response.status) {
|
|
125
|
+
case 400:
|
|
126
|
+
throw new MessageException(error.response.data);
|
|
127
|
+
case 500:
|
|
128
|
+
throw new MessageException(error.response.data);
|
|
108
129
|
default:
|
|
109
130
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
110
131
|
}
|
|
@@ -114,6 +135,7 @@ export class AccountTag extends TagAbstract {
|
|
|
114
135
|
}
|
|
115
136
|
/**
|
|
116
137
|
* @returns {Promise<UserJWT>}
|
|
138
|
+
* @throws {MessageException}
|
|
117
139
|
* @throws {ClientException}
|
|
118
140
|
*/
|
|
119
141
|
async refresh(payload) {
|
|
@@ -131,6 +153,10 @@ export class AccountTag extends TagAbstract {
|
|
|
131
153
|
catch (error) {
|
|
132
154
|
if (axios.isAxiosError(error) && error.response) {
|
|
133
155
|
switch (error.response.status) {
|
|
156
|
+
case 400:
|
|
157
|
+
throw new MessageException(error.response.data);
|
|
158
|
+
case 500:
|
|
159
|
+
throw new MessageException(error.response.data);
|
|
134
160
|
default:
|
|
135
161
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
136
162
|
}
|
|
@@ -140,6 +166,7 @@ export class AccountTag extends TagAbstract {
|
|
|
140
166
|
}
|
|
141
167
|
/**
|
|
142
168
|
* @returns {Promise<UserJWT>}
|
|
169
|
+
* @throws {MessageException}
|
|
143
170
|
* @throws {ClientException}
|
|
144
171
|
*/
|
|
145
172
|
async login(payload) {
|
|
@@ -157,6 +184,10 @@ export class AccountTag extends TagAbstract {
|
|
|
157
184
|
catch (error) {
|
|
158
185
|
if (axios.isAxiosError(error) && error.response) {
|
|
159
186
|
switch (error.response.status) {
|
|
187
|
+
case 400:
|
|
188
|
+
throw new MessageException(error.response.data);
|
|
189
|
+
case 500:
|
|
190
|
+
throw new MessageException(error.response.data);
|
|
160
191
|
default:
|
|
161
192
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
162
193
|
}
|
|
@@ -166,6 +197,7 @@ export class AccountTag extends TagAbstract {
|
|
|
166
197
|
}
|
|
167
198
|
/**
|
|
168
199
|
* @returns {Promise<AuthorizeResponse>}
|
|
200
|
+
* @throws {MessageException}
|
|
169
201
|
* @throws {ClientException}
|
|
170
202
|
*/
|
|
171
203
|
async authorize(payload) {
|
|
@@ -183,6 +215,12 @@ export class AccountTag extends TagAbstract {
|
|
|
183
215
|
catch (error) {
|
|
184
216
|
if (axios.isAxiosError(error) && error.response) {
|
|
185
217
|
switch (error.response.status) {
|
|
218
|
+
case 400:
|
|
219
|
+
throw new MessageException(error.response.data);
|
|
220
|
+
case 401:
|
|
221
|
+
throw new MessageException(error.response.data);
|
|
222
|
+
case 500:
|
|
223
|
+
throw new MessageException(error.response.data);
|
|
186
224
|
default:
|
|
187
225
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
188
226
|
}
|
|
@@ -192,6 +230,7 @@ export class AccountTag extends TagAbstract {
|
|
|
192
230
|
}
|
|
193
231
|
/**
|
|
194
232
|
* @returns {Promise<AuthorizeMeta>}
|
|
233
|
+
* @throws {MessageException}
|
|
195
234
|
* @throws {ClientException}
|
|
196
235
|
*/
|
|
197
236
|
async getApp() {
|
|
@@ -208,6 +247,12 @@ export class AccountTag extends TagAbstract {
|
|
|
208
247
|
catch (error) {
|
|
209
248
|
if (axios.isAxiosError(error) && error.response) {
|
|
210
249
|
switch (error.response.status) {
|
|
250
|
+
case 401:
|
|
251
|
+
throw new MessageException(error.response.data);
|
|
252
|
+
case 410:
|
|
253
|
+
throw new MessageException(error.response.data);
|
|
254
|
+
case 500:
|
|
255
|
+
throw new MessageException(error.response.data);
|
|
211
256
|
default:
|
|
212
257
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
213
258
|
}
|
|
@@ -217,6 +262,7 @@ export class AccountTag extends TagAbstract {
|
|
|
217
262
|
}
|
|
218
263
|
/**
|
|
219
264
|
* @returns {Promise<Message>}
|
|
265
|
+
* @throws {MessageException}
|
|
220
266
|
* @throws {ClientException}
|
|
221
267
|
*/
|
|
222
268
|
async activate(payload) {
|
|
@@ -234,6 +280,10 @@ export class AccountTag extends TagAbstract {
|
|
|
234
280
|
catch (error) {
|
|
235
281
|
if (axios.isAxiosError(error) && error.response) {
|
|
236
282
|
switch (error.response.status) {
|
|
283
|
+
case 400:
|
|
284
|
+
throw new MessageException(error.response.data);
|
|
285
|
+
case 500:
|
|
286
|
+
throw new MessageException(error.response.data);
|
|
237
287
|
default:
|
|
238
288
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
239
289
|
}
|
|
@@ -243,6 +293,7 @@ export class AccountTag extends TagAbstract {
|
|
|
243
293
|
}
|
|
244
294
|
/**
|
|
245
295
|
* @returns {Promise<Message>}
|
|
296
|
+
* @throws {MessageException}
|
|
246
297
|
* @throws {ClientException}
|
|
247
298
|
*/
|
|
248
299
|
async changePassword(payload) {
|
|
@@ -260,6 +311,12 @@ export class AccountTag extends TagAbstract {
|
|
|
260
311
|
catch (error) {
|
|
261
312
|
if (axios.isAxiosError(error) && error.response) {
|
|
262
313
|
switch (error.response.status) {
|
|
314
|
+
case 400:
|
|
315
|
+
throw new MessageException(error.response.data);
|
|
316
|
+
case 401:
|
|
317
|
+
throw new MessageException(error.response.data);
|
|
318
|
+
case 500:
|
|
319
|
+
throw new MessageException(error.response.data);
|
|
263
320
|
default:
|
|
264
321
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
265
322
|
}
|
|
@@ -269,6 +326,7 @@ export class AccountTag extends TagAbstract {
|
|
|
269
326
|
}
|
|
270
327
|
/**
|
|
271
328
|
* @returns {Promise<Message>}
|
|
329
|
+
* @throws {MessageException}
|
|
272
330
|
* @throws {ClientException}
|
|
273
331
|
*/
|
|
274
332
|
async update(payload) {
|
|
@@ -286,6 +344,16 @@ export class AccountTag extends TagAbstract {
|
|
|
286
344
|
catch (error) {
|
|
287
345
|
if (axios.isAxiosError(error) && error.response) {
|
|
288
346
|
switch (error.response.status) {
|
|
347
|
+
case 400:
|
|
348
|
+
throw new MessageException(error.response.data);
|
|
349
|
+
case 401:
|
|
350
|
+
throw new MessageException(error.response.data);
|
|
351
|
+
case 404:
|
|
352
|
+
throw new MessageException(error.response.data);
|
|
353
|
+
case 410:
|
|
354
|
+
throw new MessageException(error.response.data);
|
|
355
|
+
case 500:
|
|
356
|
+
throw new MessageException(error.response.data);
|
|
289
357
|
default:
|
|
290
358
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
291
359
|
}
|
|
@@ -295,6 +363,7 @@ export class AccountTag extends TagAbstract {
|
|
|
295
363
|
}
|
|
296
364
|
/**
|
|
297
365
|
* @returns {Promise<UserAccount>}
|
|
366
|
+
* @throws {MessageException}
|
|
298
367
|
* @throws {ClientException}
|
|
299
368
|
*/
|
|
300
369
|
async get() {
|
|
@@ -311,6 +380,14 @@ export class AccountTag extends TagAbstract {
|
|
|
311
380
|
catch (error) {
|
|
312
381
|
if (axios.isAxiosError(error) && error.response) {
|
|
313
382
|
switch (error.response.status) {
|
|
383
|
+
case 401:
|
|
384
|
+
throw new MessageException(error.response.data);
|
|
385
|
+
case 404:
|
|
386
|
+
throw new MessageException(error.response.data);
|
|
387
|
+
case 410:
|
|
388
|
+
throw new MessageException(error.response.data);
|
|
389
|
+
case 500:
|
|
390
|
+
throw new MessageException(error.response.data);
|
|
314
391
|
default:
|
|
315
392
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
316
393
|
}
|
|
@@ -11,26 +11,31 @@ import { Message } from "./Message";
|
|
|
11
11
|
export declare class AppTag extends TagAbstract {
|
|
12
12
|
/**
|
|
13
13
|
* @returns {Promise<Message>}
|
|
14
|
+
* @throws {MessageException}
|
|
14
15
|
* @throws {ClientException}
|
|
15
16
|
*/
|
|
16
17
|
delete(appId: string): Promise<Message>;
|
|
17
18
|
/**
|
|
18
19
|
* @returns {Promise<Message>}
|
|
20
|
+
* @throws {MessageException}
|
|
19
21
|
* @throws {ClientException}
|
|
20
22
|
*/
|
|
21
23
|
update(appId: string, payload: AppUpdate): Promise<Message>;
|
|
22
24
|
/**
|
|
23
25
|
* @returns {Promise<App>}
|
|
26
|
+
* @throws {MessageException}
|
|
24
27
|
* @throws {ClientException}
|
|
25
28
|
*/
|
|
26
29
|
get(appId: string): Promise<App>;
|
|
27
30
|
/**
|
|
28
31
|
* @returns {Promise<Message>}
|
|
32
|
+
* @throws {MessageException}
|
|
29
33
|
* @throws {ClientException}
|
|
30
34
|
*/
|
|
31
35
|
create(payload: AppCreate): Promise<Message>;
|
|
32
36
|
/**
|
|
33
37
|
* @returns {Promise<AppCollection>}
|
|
38
|
+
* @throws {MessageException}
|
|
34
39
|
* @throws {ClientException}
|
|
35
40
|
*/
|
|
36
41
|
getAll(startIndex?: number, count?: number, search?: string): Promise<AppCollection>;
|
|
@@ -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 AppTag extends TagAbstract {
|
|
9
10
|
/**
|
|
10
11
|
* @returns {Promise<Message>}
|
|
12
|
+
* @throws {MessageException}
|
|
11
13
|
* @throws {ClientException}
|
|
12
14
|
*/
|
|
13
15
|
async delete(appId) {
|
|
@@ -26,6 +28,14 @@ export class AppTag 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 AppTag extends TagAbstract {
|
|
|
35
45
|
}
|
|
36
46
|
/**
|
|
37
47
|
* @returns {Promise<Message>}
|
|
48
|
+
* @throws {MessageException}
|
|
38
49
|
* @throws {ClientException}
|
|
39
50
|
*/
|
|
40
51
|
async update(appId, payload) {
|
|
@@ -54,6 +65,16 @@ export class AppTag 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 AppTag extends TagAbstract {
|
|
|
63
84
|
}
|
|
64
85
|
/**
|
|
65
86
|
* @returns {Promise<App>}
|
|
87
|
+
* @throws {MessageException}
|
|
66
88
|
* @throws {ClientException}
|
|
67
89
|
*/
|
|
68
90
|
async get(appId) {
|
|
@@ -81,6 +103,14 @@ export class AppTag 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 AppTag 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 AppTag 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 AppTag extends TagAbstract {
|
|
|
116
153
|
}
|
|
117
154
|
/**
|
|
118
155
|
* @returns {Promise<AppCollection>}
|
|
156
|
+
* @throws {MessageException}
|
|
119
157
|
* @throws {ClientException}
|
|
120
158
|
*/
|
|
121
159
|
async getAll(startIndex, count, search) {
|
|
@@ -136,6 +174,10 @@ export class AppTag 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
|
}
|
|
@@ -7,6 +7,7 @@ import { EventCollection } from "./EventCollection";
|
|
|
7
7
|
export declare class EventTag extends TagAbstract {
|
|
8
8
|
/**
|
|
9
9
|
* @returns {Promise<EventCollection>}
|
|
10
|
+
* @throws {MessageException}
|
|
10
11
|
* @throws {ClientException}
|
|
11
12
|
*/
|
|
12
13
|
getAll(startIndex?: number, count?: number, search?: string): Promise<EventCollection>;
|
|
@@ -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<EventCollection>}
|
|
12
|
+
* @throws {MessageException}
|
|
11
13
|
* @throws {ClientException}
|
|
12
14
|
*/
|
|
13
15
|
async getAll(startIndex, count, search) {
|
|
@@ -28,6 +30,10 @@ export class EventTag extends TagAbstract {
|
|
|
28
30
|
catch (error) {
|
|
29
31
|
if (axios.isAxiosError(error) && error.response) {
|
|
30
32
|
switch (error.response.status) {
|
|
33
|
+
case 401:
|
|
34
|
+
throw new MessageException(error.response.data);
|
|
35
|
+
case 500:
|
|
36
|
+
throw new MessageException(error.response.data);
|
|
31
37
|
default:
|
|
32
38
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
33
39
|
}
|
|
@@ -8,11 +8,13 @@ import { Message } from "./Message";
|
|
|
8
8
|
export declare class GrantTag extends TagAbstract {
|
|
9
9
|
/**
|
|
10
10
|
* @returns {Promise<Message>}
|
|
11
|
+
* @throws {MessageException}
|
|
11
12
|
* @throws {ClientException}
|
|
12
13
|
*/
|
|
13
14
|
delete(grantId: string): Promise<Message>;
|
|
14
15
|
/**
|
|
15
16
|
* @returns {Promise<GrantCollection>}
|
|
17
|
+
* @throws {MessageException}
|
|
16
18
|
* @throws {ClientException}
|
|
17
19
|
*/
|
|
18
20
|
getAll(startIndex?: number, count?: number, search?: string): Promise<GrantCollection>;
|
|
@@ -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 GrantTag extends TagAbstract {
|
|
9
10
|
/**
|
|
10
11
|
* @returns {Promise<Message>}
|
|
12
|
+
* @throws {MessageException}
|
|
11
13
|
* @throws {ClientException}
|
|
12
14
|
*/
|
|
13
15
|
async delete(grantId) {
|
|
@@ -26,6 +28,14 @@ export class GrantTag 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 GrantTag extends TagAbstract {
|
|
|
35
45
|
}
|
|
36
46
|
/**
|
|
37
47
|
* @returns {Promise<GrantCollection>}
|
|
48
|
+
* @throws {MessageException}
|
|
38
49
|
* @throws {ClientException}
|
|
39
50
|
*/
|
|
40
51
|
async getAll(startIndex, count, search) {
|
|
@@ -55,6 +66,10 @@ export class GrantTag extends TagAbstract {
|
|
|
55
66
|
catch (error) {
|
|
56
67
|
if (axios.isAxiosError(error) && error.response) {
|
|
57
68
|
switch (error.response.status) {
|
|
69
|
+
case 401:
|
|
70
|
+
throw new MessageException(error.response.data);
|
|
71
|
+
case 500:
|
|
72
|
+
throw new MessageException(error.response.data);
|
|
58
73
|
default:
|
|
59
74
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
60
75
|
}
|
|
@@ -8,11 +8,13 @@ import { LogCollection } from "./LogCollection";
|
|
|
8
8
|
export declare class LogTag extends TagAbstract {
|
|
9
9
|
/**
|
|
10
10
|
* @returns {Promise<Log>}
|
|
11
|
+
* @throws {MessageException}
|
|
11
12
|
* @throws {ClientException}
|
|
12
13
|
*/
|
|
13
14
|
get(logId: string): Promise<Log>;
|
|
14
15
|
/**
|
|
15
16
|
* @returns {Promise<LogCollection>}
|
|
17
|
+
* @throws {MessageException}
|
|
16
18
|
* @throws {ClientException}
|
|
17
19
|
*/
|
|
18
20
|
getAll(startIndex?: number, count?: number, search?: string): Promise<LogCollection>;
|
|
@@ -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) {
|
|
@@ -55,6 +66,10 @@ export class LogTag extends TagAbstract {
|
|
|
55
66
|
catch (error) {
|
|
56
67
|
if (axios.isAxiosError(error) && error.response) {
|
|
57
68
|
switch (error.response.status) {
|
|
69
|
+
case 401:
|
|
70
|
+
throw new MessageException(error.response.data);
|
|
71
|
+
case 500:
|
|
72
|
+
throw new MessageException(error.response.data);
|
|
58
73
|
default:
|
|
59
74
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
60
75
|
}
|
|
@@ -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
|
+
}
|
|
@@ -8,11 +8,13 @@ import { PageCollection } from "./PageCollection";
|
|
|
8
8
|
export declare class PageTag extends TagAbstract {
|
|
9
9
|
/**
|
|
10
10
|
* @returns {Promise<Page>}
|
|
11
|
+
* @throws {MessageException}
|
|
11
12
|
* @throws {ClientException}
|
|
12
13
|
*/
|
|
13
14
|
get(pageId: string): Promise<Page>;
|
|
14
15
|
/**
|
|
15
16
|
* @returns {Promise<PageCollection>}
|
|
17
|
+
* @throws {MessageException}
|
|
16
18
|
* @throws {ClientException}
|
|
17
19
|
*/
|
|
18
20
|
getAll(startIndex?: number, count?: number, search?: string): Promise<PageCollection>;
|
|
@@ -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 PageTag extends TagAbstract {
|
|
9
10
|
/**
|
|
10
11
|
* @returns {Promise<Page>}
|
|
12
|
+
* @throws {MessageException}
|
|
11
13
|
* @throws {ClientException}
|
|
12
14
|
*/
|
|
13
15
|
async get(pageId) {
|
|
@@ -26,6 +28,14 @@ export class PageTag 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 PageTag extends TagAbstract {
|
|
|
35
45
|
}
|
|
36
46
|
/**
|
|
37
47
|
* @returns {Promise<PageCollection>}
|
|
48
|
+
* @throws {MessageException}
|
|
38
49
|
* @throws {ClientException}
|
|
39
50
|
*/
|
|
40
51
|
async getAll(startIndex, count, search) {
|
|
@@ -55,6 +66,10 @@ export class PageTag extends TagAbstract {
|
|
|
55
66
|
catch (error) {
|
|
56
67
|
if (axios.isAxiosError(error) && error.response) {
|
|
57
68
|
switch (error.response.status) {
|
|
69
|
+
case 401:
|
|
70
|
+
throw new MessageException(error.response.data);
|
|
71
|
+
case 500:
|
|
72
|
+
throw new MessageException(error.response.data);
|
|
58
73
|
default:
|
|
59
74
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
60
75
|
}
|
|
@@ -10,11 +10,13 @@ import { PaymentPortalResponse } from "./PaymentPortalResponse";
|
|
|
10
10
|
export declare class PaymentTag extends TagAbstract {
|
|
11
11
|
/**
|
|
12
12
|
* @returns {Promise<PaymentCheckoutResponse>}
|
|
13
|
+
* @throws {MessageException}
|
|
13
14
|
* @throws {ClientException}
|
|
14
15
|
*/
|
|
15
16
|
checkout(provider: string, payload: PaymentCheckoutRequest): Promise<PaymentCheckoutResponse>;
|
|
16
17
|
/**
|
|
17
18
|
* @returns {Promise<PaymentPortalResponse>}
|
|
19
|
+
* @throws {MessageException}
|
|
18
20
|
* @throws {ClientException}
|
|
19
21
|
*/
|
|
20
22
|
portal(provider: string, payload: PaymentPortalRequest): Promise<PaymentPortalResponse>;
|