fusio-sdk 3.0.9 → 3.1.1
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.js +21 -6
- package/dist/src/generated/backend/ActionTag.js +56 -16
- package/dist/src/generated/backend/AppTag.js +56 -16
- package/dist/src/generated/backend/AuditTag.js +14 -4
- package/dist/src/generated/backend/CategoryTag.js +35 -10
- package/dist/src/generated/backend/Client.d.ts +2 -0
- package/dist/src/generated/backend/Client.js +4 -0
- package/dist/src/generated/backend/ConfigTag.js +21 -6
- package/dist/src/generated/backend/ConnectionTag.js +70 -20
- package/dist/src/generated/backend/CronjobTag.js +35 -10
- package/dist/src/generated/backend/DashboardTag.js +7 -2
- package/dist/src/generated/backend/EventTag.js +70 -20
- package/dist/src/generated/backend/GeneratorTag.js +28 -8
- package/dist/src/generated/backend/Identity.d.ts +21 -0
- package/dist/src/generated/backend/Identity.js +5 -0
- package/dist/src/generated/backend/IdentityCollection.d.ts +7 -0
- package/dist/src/generated/backend/IdentityCollection.js +5 -0
- package/dist/src/generated/backend/IdentityCreate.d.ts +7 -0
- package/dist/src/generated/backend/IdentityCreate.js +5 -0
- package/dist/src/generated/backend/IdentityTag.d.ts +42 -0
- package/dist/src/generated/backend/IdentityTag.js +213 -0
- package/dist/src/generated/backend/IdentityUpdate.d.ts +7 -0
- package/dist/src/generated/backend/IdentityUpdate.js +5 -0
- package/dist/src/generated/backend/LogTag.js +28 -8
- package/dist/src/generated/backend/MarketplaceTag.js +35 -10
- package/dist/src/generated/backend/OperationTag.js +35 -10
- package/dist/src/generated/backend/PageTag.js +35 -10
- package/dist/src/generated/backend/PlanTag.js +35 -10
- package/dist/src/generated/backend/RateTag.js +35 -10
- package/dist/src/generated/backend/RoleTag.js +35 -10
- package/dist/src/generated/backend/SchemaTag.js +49 -14
- package/dist/src/generated/backend/ScopeTag.js +42 -12
- package/dist/src/generated/backend/SdkTag.js +14 -4
- package/dist/src/generated/backend/StatisticTag.js +70 -20
- package/dist/src/generated/backend/TransactionTag.js +14 -4
- package/dist/src/generated/backend/TrashTag.js +21 -6
- package/dist/src/generated/backend/UserTag.js +35 -10
- package/dist/src/generated/consumer/AccountTag.d.ts +0 -7
- package/dist/src/generated/consumer/AccountTag.js +76 -54
- package/dist/src/generated/consumer/AppTag.js +35 -10
- package/dist/src/generated/consumer/Client.d.ts +2 -0
- package/dist/src/generated/consumer/Client.js +4 -0
- package/dist/src/generated/consumer/EventTag.js +7 -2
- package/dist/src/generated/consumer/GrantTag.js +14 -4
- package/dist/src/generated/consumer/IdentityTag.d.ts +26 -0
- package/dist/src/generated/consumer/IdentityTag.js +121 -0
- package/dist/src/generated/consumer/LogTag.js +14 -4
- package/dist/src/generated/consumer/PageTag.js +14 -4
- package/dist/src/generated/consumer/PaymentTag.js +14 -4
- package/dist/src/generated/consumer/PlanTag.js +14 -4
- package/dist/src/generated/consumer/ScopeTag.js +7 -2
- package/dist/src/generated/consumer/SubscriptionTag.js +35 -10
- package/dist/src/generated/consumer/TransactionTag.js +14 -4
- package/package.json +1 -1
- package/dist/src/generated/consumer/UserProvider.d.ts +0 -9
- package/dist/src/generated/consumer/UserProvider.js +0 -5
|
@@ -26,7 +26,10 @@ export class UserTag extends TagAbstract {
|
|
|
26
26
|
return response.data;
|
|
27
27
|
}
|
|
28
28
|
catch (error) {
|
|
29
|
-
if (
|
|
29
|
+
if (error instanceof ClientException) {
|
|
30
|
+
throw error;
|
|
31
|
+
}
|
|
32
|
+
else if (axios.isAxiosError(error) && error.response) {
|
|
30
33
|
switch (error.response.status) {
|
|
31
34
|
case 401:
|
|
32
35
|
throw new MessageException(error.response.data);
|
|
@@ -40,7 +43,9 @@ export class UserTag extends TagAbstract {
|
|
|
40
43
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
41
44
|
}
|
|
42
45
|
}
|
|
43
|
-
|
|
46
|
+
else {
|
|
47
|
+
throw new ClientException('An unknown error occurred: ' + String(error));
|
|
48
|
+
}
|
|
44
49
|
}
|
|
45
50
|
}
|
|
46
51
|
/**
|
|
@@ -63,7 +68,10 @@ export class UserTag extends TagAbstract {
|
|
|
63
68
|
return response.data;
|
|
64
69
|
}
|
|
65
70
|
catch (error) {
|
|
66
|
-
if (
|
|
71
|
+
if (error instanceof ClientException) {
|
|
72
|
+
throw error;
|
|
73
|
+
}
|
|
74
|
+
else if (axios.isAxiosError(error) && error.response) {
|
|
67
75
|
switch (error.response.status) {
|
|
68
76
|
case 400:
|
|
69
77
|
throw new MessageException(error.response.data);
|
|
@@ -79,7 +87,9 @@ export class UserTag extends TagAbstract {
|
|
|
79
87
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
80
88
|
}
|
|
81
89
|
}
|
|
82
|
-
|
|
90
|
+
else {
|
|
91
|
+
throw new ClientException('An unknown error occurred: ' + String(error));
|
|
92
|
+
}
|
|
83
93
|
}
|
|
84
94
|
}
|
|
85
95
|
/**
|
|
@@ -101,7 +111,10 @@ export class UserTag extends TagAbstract {
|
|
|
101
111
|
return response.data;
|
|
102
112
|
}
|
|
103
113
|
catch (error) {
|
|
104
|
-
if (
|
|
114
|
+
if (error instanceof ClientException) {
|
|
115
|
+
throw error;
|
|
116
|
+
}
|
|
117
|
+
else if (axios.isAxiosError(error) && error.response) {
|
|
105
118
|
switch (error.response.status) {
|
|
106
119
|
case 401:
|
|
107
120
|
throw new MessageException(error.response.data);
|
|
@@ -115,7 +128,9 @@ export class UserTag extends TagAbstract {
|
|
|
115
128
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
116
129
|
}
|
|
117
130
|
}
|
|
118
|
-
|
|
131
|
+
else {
|
|
132
|
+
throw new ClientException('An unknown error occurred: ' + String(error));
|
|
133
|
+
}
|
|
119
134
|
}
|
|
120
135
|
}
|
|
121
136
|
/**
|
|
@@ -136,7 +151,10 @@ export class UserTag extends TagAbstract {
|
|
|
136
151
|
return response.data;
|
|
137
152
|
}
|
|
138
153
|
catch (error) {
|
|
139
|
-
if (
|
|
154
|
+
if (error instanceof ClientException) {
|
|
155
|
+
throw error;
|
|
156
|
+
}
|
|
157
|
+
else if (axios.isAxiosError(error) && error.response) {
|
|
140
158
|
switch (error.response.status) {
|
|
141
159
|
case 400:
|
|
142
160
|
throw new MessageException(error.response.data);
|
|
@@ -148,7 +166,9 @@ export class UserTag extends TagAbstract {
|
|
|
148
166
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
149
167
|
}
|
|
150
168
|
}
|
|
151
|
-
|
|
169
|
+
else {
|
|
170
|
+
throw new ClientException('An unknown error occurred: ' + String(error));
|
|
171
|
+
}
|
|
152
172
|
}
|
|
153
173
|
}
|
|
154
174
|
/**
|
|
@@ -172,7 +192,10 @@ export class UserTag extends TagAbstract {
|
|
|
172
192
|
return response.data;
|
|
173
193
|
}
|
|
174
194
|
catch (error) {
|
|
175
|
-
if (
|
|
195
|
+
if (error instanceof ClientException) {
|
|
196
|
+
throw error;
|
|
197
|
+
}
|
|
198
|
+
else if (axios.isAxiosError(error) && error.response) {
|
|
176
199
|
switch (error.response.status) {
|
|
177
200
|
case 401:
|
|
178
201
|
throw new MessageException(error.response.data);
|
|
@@ -182,7 +205,9 @@ export class UserTag extends TagAbstract {
|
|
|
182
205
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
183
206
|
}
|
|
184
207
|
}
|
|
185
|
-
|
|
208
|
+
else {
|
|
209
|
+
throw new ClientException('An unknown error occurred: ' + String(error));
|
|
210
|
+
}
|
|
186
211
|
}
|
|
187
212
|
}
|
|
188
213
|
}
|
|
@@ -14,7 +14,6 @@ import { UserEmail } from "./UserEmail";
|
|
|
14
14
|
import { UserJWT } from "./UserJWT";
|
|
15
15
|
import { UserLogin } from "./UserLogin";
|
|
16
16
|
import { UserPasswordReset } from "./UserPasswordReset";
|
|
17
|
-
import { UserProvider } from "./UserProvider";
|
|
18
17
|
import { UserRefresh } from "./UserRefresh";
|
|
19
18
|
import { UserRegister } from "./UserRegister";
|
|
20
19
|
export declare class AccountTag extends TagAbstract {
|
|
@@ -36,12 +35,6 @@ export declare class AccountTag extends TagAbstract {
|
|
|
36
35
|
* @throws {ClientException}
|
|
37
36
|
*/
|
|
38
37
|
register(payload: UserRegister): Promise<Message>;
|
|
39
|
-
/**
|
|
40
|
-
* @returns {Promise<UserJWT>}
|
|
41
|
-
* @throws {MessageException}
|
|
42
|
-
* @throws {ClientException}
|
|
43
|
-
*/
|
|
44
|
-
provider(provider: string, payload: UserProvider): Promise<UserJWT>;
|
|
45
38
|
/**
|
|
46
39
|
* @returns {Promise<UserJWT>}
|
|
47
40
|
* @throws {MessageException}
|
|
@@ -25,7 +25,10 @@ export class AccountTag extends TagAbstract {
|
|
|
25
25
|
return response.data;
|
|
26
26
|
}
|
|
27
27
|
catch (error) {
|
|
28
|
-
if (
|
|
28
|
+
if (error instanceof ClientException) {
|
|
29
|
+
throw error;
|
|
30
|
+
}
|
|
31
|
+
else if (axios.isAxiosError(error) && error.response) {
|
|
29
32
|
switch (error.response.status) {
|
|
30
33
|
case 400:
|
|
31
34
|
throw new MessageException(error.response.data);
|
|
@@ -35,7 +38,9 @@ export class AccountTag extends TagAbstract {
|
|
|
35
38
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
36
39
|
}
|
|
37
40
|
}
|
|
38
|
-
|
|
41
|
+
else {
|
|
42
|
+
throw new ClientException('An unknown error occurred: ' + String(error));
|
|
43
|
+
}
|
|
39
44
|
}
|
|
40
45
|
}
|
|
41
46
|
/**
|
|
@@ -56,7 +61,10 @@ export class AccountTag extends TagAbstract {
|
|
|
56
61
|
return response.data;
|
|
57
62
|
}
|
|
58
63
|
catch (error) {
|
|
59
|
-
if (
|
|
64
|
+
if (error instanceof ClientException) {
|
|
65
|
+
throw error;
|
|
66
|
+
}
|
|
67
|
+
else if (axios.isAxiosError(error) && error.response) {
|
|
60
68
|
switch (error.response.status) {
|
|
61
69
|
case 400:
|
|
62
70
|
throw new MessageException(error.response.data);
|
|
@@ -66,7 +74,9 @@ export class AccountTag extends TagAbstract {
|
|
|
66
74
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
67
75
|
}
|
|
68
76
|
}
|
|
69
|
-
|
|
77
|
+
else {
|
|
78
|
+
throw new ClientException('An unknown error occurred: ' + String(error));
|
|
79
|
+
}
|
|
70
80
|
}
|
|
71
81
|
}
|
|
72
82
|
/**
|
|
@@ -87,40 +97,10 @@ export class AccountTag extends TagAbstract {
|
|
|
87
97
|
return response.data;
|
|
88
98
|
}
|
|
89
99
|
catch (error) {
|
|
90
|
-
if (
|
|
91
|
-
|
|
92
|
-
case 400:
|
|
93
|
-
throw new MessageException(error.response.data);
|
|
94
|
-
case 500:
|
|
95
|
-
throw new MessageException(error.response.data);
|
|
96
|
-
default:
|
|
97
|
-
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
98
|
-
}
|
|
100
|
+
if (error instanceof ClientException) {
|
|
101
|
+
throw error;
|
|
99
102
|
}
|
|
100
|
-
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
/**
|
|
104
|
-
* @returns {Promise<UserJWT>}
|
|
105
|
-
* @throws {MessageException}
|
|
106
|
-
* @throws {ClientException}
|
|
107
|
-
*/
|
|
108
|
-
async provider(provider, payload) {
|
|
109
|
-
const url = this.parser.url('/consumer/provider/:provider', {
|
|
110
|
-
'provider': provider,
|
|
111
|
-
});
|
|
112
|
-
let params = {
|
|
113
|
-
url: url,
|
|
114
|
-
method: 'POST',
|
|
115
|
-
params: this.parser.query({}),
|
|
116
|
-
data: payload
|
|
117
|
-
};
|
|
118
|
-
try {
|
|
119
|
-
const response = await this.httpClient.request(params);
|
|
120
|
-
return response.data;
|
|
121
|
-
}
|
|
122
|
-
catch (error) {
|
|
123
|
-
if (axios.isAxiosError(error) && error.response) {
|
|
103
|
+
else if (axios.isAxiosError(error) && error.response) {
|
|
124
104
|
switch (error.response.status) {
|
|
125
105
|
case 400:
|
|
126
106
|
throw new MessageException(error.response.data);
|
|
@@ -130,7 +110,9 @@ export class AccountTag extends TagAbstract {
|
|
|
130
110
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
131
111
|
}
|
|
132
112
|
}
|
|
133
|
-
|
|
113
|
+
else {
|
|
114
|
+
throw new ClientException('An unknown error occurred: ' + String(error));
|
|
115
|
+
}
|
|
134
116
|
}
|
|
135
117
|
}
|
|
136
118
|
/**
|
|
@@ -151,7 +133,10 @@ export class AccountTag extends TagAbstract {
|
|
|
151
133
|
return response.data;
|
|
152
134
|
}
|
|
153
135
|
catch (error) {
|
|
154
|
-
if (
|
|
136
|
+
if (error instanceof ClientException) {
|
|
137
|
+
throw error;
|
|
138
|
+
}
|
|
139
|
+
else if (axios.isAxiosError(error) && error.response) {
|
|
155
140
|
switch (error.response.status) {
|
|
156
141
|
case 400:
|
|
157
142
|
throw new MessageException(error.response.data);
|
|
@@ -161,7 +146,9 @@ export class AccountTag extends TagAbstract {
|
|
|
161
146
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
162
147
|
}
|
|
163
148
|
}
|
|
164
|
-
|
|
149
|
+
else {
|
|
150
|
+
throw new ClientException('An unknown error occurred: ' + String(error));
|
|
151
|
+
}
|
|
165
152
|
}
|
|
166
153
|
}
|
|
167
154
|
/**
|
|
@@ -182,7 +169,10 @@ export class AccountTag extends TagAbstract {
|
|
|
182
169
|
return response.data;
|
|
183
170
|
}
|
|
184
171
|
catch (error) {
|
|
185
|
-
if (
|
|
172
|
+
if (error instanceof ClientException) {
|
|
173
|
+
throw error;
|
|
174
|
+
}
|
|
175
|
+
else if (axios.isAxiosError(error) && error.response) {
|
|
186
176
|
switch (error.response.status) {
|
|
187
177
|
case 400:
|
|
188
178
|
throw new MessageException(error.response.data);
|
|
@@ -194,7 +184,9 @@ export class AccountTag extends TagAbstract {
|
|
|
194
184
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
195
185
|
}
|
|
196
186
|
}
|
|
197
|
-
|
|
187
|
+
else {
|
|
188
|
+
throw new ClientException('An unknown error occurred: ' + String(error));
|
|
189
|
+
}
|
|
198
190
|
}
|
|
199
191
|
}
|
|
200
192
|
/**
|
|
@@ -215,7 +207,10 @@ export class AccountTag extends TagAbstract {
|
|
|
215
207
|
return response.data;
|
|
216
208
|
}
|
|
217
209
|
catch (error) {
|
|
218
|
-
if (
|
|
210
|
+
if (error instanceof ClientException) {
|
|
211
|
+
throw error;
|
|
212
|
+
}
|
|
213
|
+
else if (axios.isAxiosError(error) && error.response) {
|
|
219
214
|
switch (error.response.status) {
|
|
220
215
|
case 400:
|
|
221
216
|
throw new MessageException(error.response.data);
|
|
@@ -227,7 +222,9 @@ export class AccountTag extends TagAbstract {
|
|
|
227
222
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
228
223
|
}
|
|
229
224
|
}
|
|
230
|
-
|
|
225
|
+
else {
|
|
226
|
+
throw new ClientException('An unknown error occurred: ' + String(error));
|
|
227
|
+
}
|
|
231
228
|
}
|
|
232
229
|
}
|
|
233
230
|
/**
|
|
@@ -247,7 +244,10 @@ export class AccountTag extends TagAbstract {
|
|
|
247
244
|
return response.data;
|
|
248
245
|
}
|
|
249
246
|
catch (error) {
|
|
250
|
-
if (
|
|
247
|
+
if (error instanceof ClientException) {
|
|
248
|
+
throw error;
|
|
249
|
+
}
|
|
250
|
+
else if (axios.isAxiosError(error) && error.response) {
|
|
251
251
|
switch (error.response.status) {
|
|
252
252
|
case 401:
|
|
253
253
|
throw new MessageException(error.response.data);
|
|
@@ -259,7 +259,9 @@ export class AccountTag extends TagAbstract {
|
|
|
259
259
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
260
260
|
}
|
|
261
261
|
}
|
|
262
|
-
|
|
262
|
+
else {
|
|
263
|
+
throw new ClientException('An unknown error occurred: ' + String(error));
|
|
264
|
+
}
|
|
263
265
|
}
|
|
264
266
|
}
|
|
265
267
|
/**
|
|
@@ -280,7 +282,10 @@ export class AccountTag extends TagAbstract {
|
|
|
280
282
|
return response.data;
|
|
281
283
|
}
|
|
282
284
|
catch (error) {
|
|
283
|
-
if (
|
|
285
|
+
if (error instanceof ClientException) {
|
|
286
|
+
throw error;
|
|
287
|
+
}
|
|
288
|
+
else if (axios.isAxiosError(error) && error.response) {
|
|
284
289
|
switch (error.response.status) {
|
|
285
290
|
case 400:
|
|
286
291
|
throw new MessageException(error.response.data);
|
|
@@ -290,7 +295,9 @@ export class AccountTag extends TagAbstract {
|
|
|
290
295
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
291
296
|
}
|
|
292
297
|
}
|
|
293
|
-
|
|
298
|
+
else {
|
|
299
|
+
throw new ClientException('An unknown error occurred: ' + String(error));
|
|
300
|
+
}
|
|
294
301
|
}
|
|
295
302
|
}
|
|
296
303
|
/**
|
|
@@ -311,7 +318,10 @@ export class AccountTag extends TagAbstract {
|
|
|
311
318
|
return response.data;
|
|
312
319
|
}
|
|
313
320
|
catch (error) {
|
|
314
|
-
if (
|
|
321
|
+
if (error instanceof ClientException) {
|
|
322
|
+
throw error;
|
|
323
|
+
}
|
|
324
|
+
else if (axios.isAxiosError(error) && error.response) {
|
|
315
325
|
switch (error.response.status) {
|
|
316
326
|
case 400:
|
|
317
327
|
throw new MessageException(error.response.data);
|
|
@@ -323,7 +333,9 @@ export class AccountTag extends TagAbstract {
|
|
|
323
333
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
324
334
|
}
|
|
325
335
|
}
|
|
326
|
-
|
|
336
|
+
else {
|
|
337
|
+
throw new ClientException('An unknown error occurred: ' + String(error));
|
|
338
|
+
}
|
|
327
339
|
}
|
|
328
340
|
}
|
|
329
341
|
/**
|
|
@@ -344,7 +356,10 @@ export class AccountTag extends TagAbstract {
|
|
|
344
356
|
return response.data;
|
|
345
357
|
}
|
|
346
358
|
catch (error) {
|
|
347
|
-
if (
|
|
359
|
+
if (error instanceof ClientException) {
|
|
360
|
+
throw error;
|
|
361
|
+
}
|
|
362
|
+
else if (axios.isAxiosError(error) && error.response) {
|
|
348
363
|
switch (error.response.status) {
|
|
349
364
|
case 400:
|
|
350
365
|
throw new MessageException(error.response.data);
|
|
@@ -360,7 +375,9 @@ export class AccountTag extends TagAbstract {
|
|
|
360
375
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
361
376
|
}
|
|
362
377
|
}
|
|
363
|
-
|
|
378
|
+
else {
|
|
379
|
+
throw new ClientException('An unknown error occurred: ' + String(error));
|
|
380
|
+
}
|
|
364
381
|
}
|
|
365
382
|
}
|
|
366
383
|
/**
|
|
@@ -380,7 +397,10 @@ export class AccountTag extends TagAbstract {
|
|
|
380
397
|
return response.data;
|
|
381
398
|
}
|
|
382
399
|
catch (error) {
|
|
383
|
-
if (
|
|
400
|
+
if (error instanceof ClientException) {
|
|
401
|
+
throw error;
|
|
402
|
+
}
|
|
403
|
+
else if (axios.isAxiosError(error) && error.response) {
|
|
384
404
|
switch (error.response.status) {
|
|
385
405
|
case 401:
|
|
386
406
|
throw new MessageException(error.response.data);
|
|
@@ -394,7 +414,9 @@ export class AccountTag extends TagAbstract {
|
|
|
394
414
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
395
415
|
}
|
|
396
416
|
}
|
|
397
|
-
|
|
417
|
+
else {
|
|
418
|
+
throw new ClientException('An unknown error occurred: ' + String(error));
|
|
419
|
+
}
|
|
398
420
|
}
|
|
399
421
|
}
|
|
400
422
|
}
|
|
@@ -26,7 +26,10 @@ export class AppTag extends TagAbstract {
|
|
|
26
26
|
return response.data;
|
|
27
27
|
}
|
|
28
28
|
catch (error) {
|
|
29
|
-
if (
|
|
29
|
+
if (error instanceof ClientException) {
|
|
30
|
+
throw error;
|
|
31
|
+
}
|
|
32
|
+
else if (axios.isAxiosError(error) && error.response) {
|
|
30
33
|
switch (error.response.status) {
|
|
31
34
|
case 401:
|
|
32
35
|
throw new MessageException(error.response.data);
|
|
@@ -40,7 +43,9 @@ export class AppTag extends TagAbstract {
|
|
|
40
43
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
41
44
|
}
|
|
42
45
|
}
|
|
43
|
-
|
|
46
|
+
else {
|
|
47
|
+
throw new ClientException('An unknown error occurred: ' + String(error));
|
|
48
|
+
}
|
|
44
49
|
}
|
|
45
50
|
}
|
|
46
51
|
/**
|
|
@@ -63,7 +68,10 @@ export class AppTag extends TagAbstract {
|
|
|
63
68
|
return response.data;
|
|
64
69
|
}
|
|
65
70
|
catch (error) {
|
|
66
|
-
if (
|
|
71
|
+
if (error instanceof ClientException) {
|
|
72
|
+
throw error;
|
|
73
|
+
}
|
|
74
|
+
else if (axios.isAxiosError(error) && error.response) {
|
|
67
75
|
switch (error.response.status) {
|
|
68
76
|
case 400:
|
|
69
77
|
throw new MessageException(error.response.data);
|
|
@@ -79,7 +87,9 @@ export class AppTag extends TagAbstract {
|
|
|
79
87
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
80
88
|
}
|
|
81
89
|
}
|
|
82
|
-
|
|
90
|
+
else {
|
|
91
|
+
throw new ClientException('An unknown error occurred: ' + String(error));
|
|
92
|
+
}
|
|
83
93
|
}
|
|
84
94
|
}
|
|
85
95
|
/**
|
|
@@ -101,7 +111,10 @@ export class AppTag extends TagAbstract {
|
|
|
101
111
|
return response.data;
|
|
102
112
|
}
|
|
103
113
|
catch (error) {
|
|
104
|
-
if (
|
|
114
|
+
if (error instanceof ClientException) {
|
|
115
|
+
throw error;
|
|
116
|
+
}
|
|
117
|
+
else if (axios.isAxiosError(error) && error.response) {
|
|
105
118
|
switch (error.response.status) {
|
|
106
119
|
case 401:
|
|
107
120
|
throw new MessageException(error.response.data);
|
|
@@ -115,7 +128,9 @@ export class AppTag extends TagAbstract {
|
|
|
115
128
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
116
129
|
}
|
|
117
130
|
}
|
|
118
|
-
|
|
131
|
+
else {
|
|
132
|
+
throw new ClientException('An unknown error occurred: ' + String(error));
|
|
133
|
+
}
|
|
119
134
|
}
|
|
120
135
|
}
|
|
121
136
|
/**
|
|
@@ -136,7 +151,10 @@ export class AppTag extends TagAbstract {
|
|
|
136
151
|
return response.data;
|
|
137
152
|
}
|
|
138
153
|
catch (error) {
|
|
139
|
-
if (
|
|
154
|
+
if (error instanceof ClientException) {
|
|
155
|
+
throw error;
|
|
156
|
+
}
|
|
157
|
+
else if (axios.isAxiosError(error) && error.response) {
|
|
140
158
|
switch (error.response.status) {
|
|
141
159
|
case 400:
|
|
142
160
|
throw new MessageException(error.response.data);
|
|
@@ -148,7 +166,9 @@ export class AppTag extends TagAbstract {
|
|
|
148
166
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
149
167
|
}
|
|
150
168
|
}
|
|
151
|
-
|
|
169
|
+
else {
|
|
170
|
+
throw new ClientException('An unknown error occurred: ' + String(error));
|
|
171
|
+
}
|
|
152
172
|
}
|
|
153
173
|
}
|
|
154
174
|
/**
|
|
@@ -172,7 +192,10 @@ export class AppTag extends TagAbstract {
|
|
|
172
192
|
return response.data;
|
|
173
193
|
}
|
|
174
194
|
catch (error) {
|
|
175
|
-
if (
|
|
195
|
+
if (error instanceof ClientException) {
|
|
196
|
+
throw error;
|
|
197
|
+
}
|
|
198
|
+
else if (axios.isAxiosError(error) && error.response) {
|
|
176
199
|
switch (error.response.status) {
|
|
177
200
|
case 401:
|
|
178
201
|
throw new MessageException(error.response.data);
|
|
@@ -182,7 +205,9 @@ export class AppTag extends TagAbstract {
|
|
|
182
205
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
183
206
|
}
|
|
184
207
|
}
|
|
185
|
-
|
|
208
|
+
else {
|
|
209
|
+
throw new ClientException('An unknown error occurred: ' + String(error));
|
|
210
|
+
}
|
|
186
211
|
}
|
|
187
212
|
}
|
|
188
213
|
}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* {@link https://sdkgen.app}
|
|
4
4
|
*/
|
|
5
5
|
import { ClientAbstract } from "sdkgen-client";
|
|
6
|
+
import { IdentityTag } from "./IdentityTag";
|
|
6
7
|
import { AccountTag } from "./AccountTag";
|
|
7
8
|
import { TransactionTag } from "./TransactionTag";
|
|
8
9
|
import { SubscriptionTag } from "./SubscriptionTag";
|
|
@@ -15,6 +16,7 @@ import { GrantTag } from "./GrantTag";
|
|
|
15
16
|
import { EventTag } from "./EventTag";
|
|
16
17
|
import { AppTag } from "./AppTag";
|
|
17
18
|
export declare class Client extends ClientAbstract {
|
|
19
|
+
identity(): IdentityTag;
|
|
18
20
|
account(): AccountTag;
|
|
19
21
|
transaction(): TransactionTag;
|
|
20
22
|
subscription(): SubscriptionTag;
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
* {@link https://sdkgen.app}
|
|
4
4
|
*/
|
|
5
5
|
import { ClientAbstract } from "sdkgen-client";
|
|
6
|
+
import { IdentityTag } from "./IdentityTag";
|
|
6
7
|
import { AccountTag } from "./AccountTag";
|
|
7
8
|
import { TransactionTag } from "./TransactionTag";
|
|
8
9
|
import { SubscriptionTag } from "./SubscriptionTag";
|
|
@@ -15,6 +16,9 @@ import { GrantTag } from "./GrantTag";
|
|
|
15
16
|
import { EventTag } from "./EventTag";
|
|
16
17
|
import { AppTag } from "./AppTag";
|
|
17
18
|
export class Client extends ClientAbstract {
|
|
19
|
+
identity() {
|
|
20
|
+
return new IdentityTag(this.httpClient, this.parser);
|
|
21
|
+
}
|
|
18
22
|
account() {
|
|
19
23
|
return new AccountTag(this.httpClient, this.parser);
|
|
20
24
|
}
|
|
@@ -28,7 +28,10 @@ export class EventTag extends TagAbstract {
|
|
|
28
28
|
return response.data;
|
|
29
29
|
}
|
|
30
30
|
catch (error) {
|
|
31
|
-
if (
|
|
31
|
+
if (error instanceof ClientException) {
|
|
32
|
+
throw error;
|
|
33
|
+
}
|
|
34
|
+
else if (axios.isAxiosError(error) && error.response) {
|
|
32
35
|
switch (error.response.status) {
|
|
33
36
|
case 401:
|
|
34
37
|
throw new MessageException(error.response.data);
|
|
@@ -38,7 +41,9 @@ export class EventTag extends TagAbstract {
|
|
|
38
41
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
39
42
|
}
|
|
40
43
|
}
|
|
41
|
-
|
|
44
|
+
else {
|
|
45
|
+
throw new ClientException('An unknown error occurred: ' + String(error));
|
|
46
|
+
}
|
|
42
47
|
}
|
|
43
48
|
}
|
|
44
49
|
}
|
|
@@ -26,7 +26,10 @@ export class GrantTag extends TagAbstract {
|
|
|
26
26
|
return response.data;
|
|
27
27
|
}
|
|
28
28
|
catch (error) {
|
|
29
|
-
if (
|
|
29
|
+
if (error instanceof ClientException) {
|
|
30
|
+
throw error;
|
|
31
|
+
}
|
|
32
|
+
else if (axios.isAxiosError(error) && error.response) {
|
|
30
33
|
switch (error.response.status) {
|
|
31
34
|
case 401:
|
|
32
35
|
throw new MessageException(error.response.data);
|
|
@@ -40,7 +43,9 @@ export class GrantTag extends TagAbstract {
|
|
|
40
43
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
41
44
|
}
|
|
42
45
|
}
|
|
43
|
-
|
|
46
|
+
else {
|
|
47
|
+
throw new ClientException('An unknown error occurred: ' + String(error));
|
|
48
|
+
}
|
|
44
49
|
}
|
|
45
50
|
}
|
|
46
51
|
/**
|
|
@@ -64,7 +69,10 @@ export class GrantTag extends TagAbstract {
|
|
|
64
69
|
return response.data;
|
|
65
70
|
}
|
|
66
71
|
catch (error) {
|
|
67
|
-
if (
|
|
72
|
+
if (error instanceof ClientException) {
|
|
73
|
+
throw error;
|
|
74
|
+
}
|
|
75
|
+
else if (axios.isAxiosError(error) && error.response) {
|
|
68
76
|
switch (error.response.status) {
|
|
69
77
|
case 401:
|
|
70
78
|
throw new MessageException(error.response.data);
|
|
@@ -74,7 +82,9 @@ export class GrantTag extends TagAbstract {
|
|
|
74
82
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
75
83
|
}
|
|
76
84
|
}
|
|
77
|
-
|
|
85
|
+
else {
|
|
86
|
+
throw new ClientException('An unknown error occurred: ' + String(error));
|
|
87
|
+
}
|
|
78
88
|
}
|
|
79
89
|
}
|
|
80
90
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IdentityTag automatically generated by SDKgen please do not edit this file manually
|
|
3
|
+
* {@link https://sdkgen.app}
|
|
4
|
+
*/
|
|
5
|
+
import { TagAbstract } from "sdkgen-client";
|
|
6
|
+
import { UserJWT } from "./UserJWT";
|
|
7
|
+
export declare class IdentityTag extends TagAbstract {
|
|
8
|
+
/**
|
|
9
|
+
* @returns {Promise<UserJWT>}
|
|
10
|
+
* @throws {MessageException}
|
|
11
|
+
* @throws {ClientException}
|
|
12
|
+
*/
|
|
13
|
+
redirect(identity: string): Promise<UserJWT>;
|
|
14
|
+
/**
|
|
15
|
+
* @returns {Promise<UserJWT>}
|
|
16
|
+
* @throws {MessageException}
|
|
17
|
+
* @throws {ClientException}
|
|
18
|
+
*/
|
|
19
|
+
exchange(identity: string): Promise<UserJWT>;
|
|
20
|
+
/**
|
|
21
|
+
* @returns {Promise<UserJWT>}
|
|
22
|
+
* @throws {MessageException}
|
|
23
|
+
* @throws {ClientException}
|
|
24
|
+
*/
|
|
25
|
+
getAll(appId?: number): Promise<UserJWT>;
|
|
26
|
+
}
|