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
|
@@ -27,7 +27,10 @@ export class GeneratorTag extends TagAbstract {
|
|
|
27
27
|
return response.data;
|
|
28
28
|
}
|
|
29
29
|
catch (error) {
|
|
30
|
-
if (
|
|
30
|
+
if (error instanceof ClientException) {
|
|
31
|
+
throw error;
|
|
32
|
+
}
|
|
33
|
+
else if (axios.isAxiosError(error) && error.response) {
|
|
31
34
|
switch (error.response.status) {
|
|
32
35
|
case 401:
|
|
33
36
|
throw new MessageException(error.response.data);
|
|
@@ -37,7 +40,9 @@ export class GeneratorTag extends TagAbstract {
|
|
|
37
40
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
38
41
|
}
|
|
39
42
|
}
|
|
40
|
-
|
|
43
|
+
else {
|
|
44
|
+
throw new ClientException('An unknown error occurred: ' + String(error));
|
|
45
|
+
}
|
|
41
46
|
}
|
|
42
47
|
}
|
|
43
48
|
/**
|
|
@@ -60,7 +65,10 @@ export class GeneratorTag extends TagAbstract {
|
|
|
60
65
|
return response.data;
|
|
61
66
|
}
|
|
62
67
|
catch (error) {
|
|
63
|
-
if (
|
|
68
|
+
if (error instanceof ClientException) {
|
|
69
|
+
throw error;
|
|
70
|
+
}
|
|
71
|
+
else if (axios.isAxiosError(error) && error.response) {
|
|
64
72
|
switch (error.response.status) {
|
|
65
73
|
case 401:
|
|
66
74
|
throw new MessageException(error.response.data);
|
|
@@ -70,7 +78,9 @@ export class GeneratorTag extends TagAbstract {
|
|
|
70
78
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
71
79
|
}
|
|
72
80
|
}
|
|
73
|
-
|
|
81
|
+
else {
|
|
82
|
+
throw new ClientException('An unknown error occurred: ' + String(error));
|
|
83
|
+
}
|
|
74
84
|
}
|
|
75
85
|
}
|
|
76
86
|
/**
|
|
@@ -92,7 +102,10 @@ export class GeneratorTag extends TagAbstract {
|
|
|
92
102
|
return response.data;
|
|
93
103
|
}
|
|
94
104
|
catch (error) {
|
|
95
|
-
if (
|
|
105
|
+
if (error instanceof ClientException) {
|
|
106
|
+
throw error;
|
|
107
|
+
}
|
|
108
|
+
else if (axios.isAxiosError(error) && error.response) {
|
|
96
109
|
switch (error.response.status) {
|
|
97
110
|
case 401:
|
|
98
111
|
throw new MessageException(error.response.data);
|
|
@@ -102,7 +115,9 @@ export class GeneratorTag extends TagAbstract {
|
|
|
102
115
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
103
116
|
}
|
|
104
117
|
}
|
|
105
|
-
|
|
118
|
+
else {
|
|
119
|
+
throw new ClientException('An unknown error occurred: ' + String(error));
|
|
120
|
+
}
|
|
106
121
|
}
|
|
107
122
|
}
|
|
108
123
|
/**
|
|
@@ -122,7 +137,10 @@ export class GeneratorTag extends TagAbstract {
|
|
|
122
137
|
return response.data;
|
|
123
138
|
}
|
|
124
139
|
catch (error) {
|
|
125
|
-
if (
|
|
140
|
+
if (error instanceof ClientException) {
|
|
141
|
+
throw error;
|
|
142
|
+
}
|
|
143
|
+
else if (axios.isAxiosError(error) && error.response) {
|
|
126
144
|
switch (error.response.status) {
|
|
127
145
|
case 401:
|
|
128
146
|
throw new MessageException(error.response.data);
|
|
@@ -132,7 +150,9 @@ export class GeneratorTag extends TagAbstract {
|
|
|
132
150
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
133
151
|
}
|
|
134
152
|
}
|
|
135
|
-
|
|
153
|
+
else {
|
|
154
|
+
throw new ClientException('An unknown error occurred: ' + String(error));
|
|
155
|
+
}
|
|
136
156
|
}
|
|
137
157
|
}
|
|
138
158
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Identity automatically generated by SDKgen please do not edit this file manually
|
|
3
|
+
* {@link https://sdkgen.app}
|
|
4
|
+
*/
|
|
5
|
+
export interface Identity {
|
|
6
|
+
id?: number;
|
|
7
|
+
appId?: number;
|
|
8
|
+
roleId?: number;
|
|
9
|
+
name?: string;
|
|
10
|
+
icon?: string;
|
|
11
|
+
class?: string;
|
|
12
|
+
clientId?: string;
|
|
13
|
+
clientSecret?: string;
|
|
14
|
+
authorizationUri?: string;
|
|
15
|
+
tokenUri?: string;
|
|
16
|
+
userInfoUri?: string;
|
|
17
|
+
idProperty?: string;
|
|
18
|
+
nameProperty?: string;
|
|
19
|
+
emailProperty?: string;
|
|
20
|
+
allowCreate?: boolean;
|
|
21
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IdentityCollection automatically generated by SDKgen please do not edit this file manually
|
|
3
|
+
* {@link https://sdkgen.app}
|
|
4
|
+
*/
|
|
5
|
+
import { Collection } from "./Collection";
|
|
6
|
+
import { Identity } from "./Identity";
|
|
7
|
+
export declare type IdentityCollection = Collection<Identity>;
|
|
@@ -0,0 +1,42 @@
|
|
|
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 { Identity } from "./Identity";
|
|
7
|
+
import { IdentityCollection } from "./IdentityCollection";
|
|
8
|
+
import { IdentityCreate } from "./IdentityCreate";
|
|
9
|
+
import { IdentityUpdate } from "./IdentityUpdate";
|
|
10
|
+
import { Message } from "./Message";
|
|
11
|
+
export declare class IdentityTag extends TagAbstract {
|
|
12
|
+
/**
|
|
13
|
+
* @returns {Promise<Message>}
|
|
14
|
+
* @throws {MessageException}
|
|
15
|
+
* @throws {ClientException}
|
|
16
|
+
*/
|
|
17
|
+
delete(identityId: string): Promise<Message>;
|
|
18
|
+
/**
|
|
19
|
+
* @returns {Promise<Message>}
|
|
20
|
+
* @throws {MessageException}
|
|
21
|
+
* @throws {ClientException}
|
|
22
|
+
*/
|
|
23
|
+
update(identityId: string, payload: IdentityUpdate): Promise<Message>;
|
|
24
|
+
/**
|
|
25
|
+
* @returns {Promise<Identity>}
|
|
26
|
+
* @throws {MessageException}
|
|
27
|
+
* @throws {ClientException}
|
|
28
|
+
*/
|
|
29
|
+
get(identityId: string): Promise<Identity>;
|
|
30
|
+
/**
|
|
31
|
+
* @returns {Promise<Message>}
|
|
32
|
+
* @throws {MessageException}
|
|
33
|
+
* @throws {ClientException}
|
|
34
|
+
*/
|
|
35
|
+
create(payload: IdentityCreate): Promise<Message>;
|
|
36
|
+
/**
|
|
37
|
+
* @returns {Promise<IdentityCollection>}
|
|
38
|
+
* @throws {MessageException}
|
|
39
|
+
* @throws {ClientException}
|
|
40
|
+
*/
|
|
41
|
+
getAll(startIndex?: number, count?: number, search?: string): Promise<IdentityCollection>;
|
|
42
|
+
}
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IdentityTag automatically generated by SDKgen please do not edit this file manually
|
|
3
|
+
* {@link https://sdkgen.app}
|
|
4
|
+
*/
|
|
5
|
+
import axios from "axios";
|
|
6
|
+
import { TagAbstract } from "sdkgen-client";
|
|
7
|
+
import { ClientException, UnknownStatusCodeException } from "sdkgen-client";
|
|
8
|
+
import { MessageException } from "./MessageException";
|
|
9
|
+
export class IdentityTag extends TagAbstract {
|
|
10
|
+
/**
|
|
11
|
+
* @returns {Promise<Message>}
|
|
12
|
+
* @throws {MessageException}
|
|
13
|
+
* @throws {ClientException}
|
|
14
|
+
*/
|
|
15
|
+
async delete(identityId) {
|
|
16
|
+
const url = this.parser.url('/backend/identity/$identity_id<[0-9]+|^~>', {
|
|
17
|
+
'identity_id': identityId,
|
|
18
|
+
});
|
|
19
|
+
let params = {
|
|
20
|
+
url: url,
|
|
21
|
+
method: 'DELETE',
|
|
22
|
+
params: this.parser.query({}),
|
|
23
|
+
};
|
|
24
|
+
try {
|
|
25
|
+
const response = await this.httpClient.request(params);
|
|
26
|
+
return response.data;
|
|
27
|
+
}
|
|
28
|
+
catch (error) {
|
|
29
|
+
if (error instanceof ClientException) {
|
|
30
|
+
throw error;
|
|
31
|
+
}
|
|
32
|
+
else if (axios.isAxiosError(error) && error.response) {
|
|
33
|
+
switch (error.response.status) {
|
|
34
|
+
case 401:
|
|
35
|
+
throw new MessageException(error.response.data);
|
|
36
|
+
case 404:
|
|
37
|
+
throw new MessageException(error.response.data);
|
|
38
|
+
case 410:
|
|
39
|
+
throw new MessageException(error.response.data);
|
|
40
|
+
case 500:
|
|
41
|
+
throw new MessageException(error.response.data);
|
|
42
|
+
default:
|
|
43
|
+
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
else {
|
|
47
|
+
throw new ClientException('An unknown error occurred: ' + String(error));
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* @returns {Promise<Message>}
|
|
53
|
+
* @throws {MessageException}
|
|
54
|
+
* @throws {ClientException}
|
|
55
|
+
*/
|
|
56
|
+
async update(identityId, payload) {
|
|
57
|
+
const url = this.parser.url('/backend/identity/$identity_id<[0-9]+|^~>', {
|
|
58
|
+
'identity_id': identityId,
|
|
59
|
+
});
|
|
60
|
+
let params = {
|
|
61
|
+
url: url,
|
|
62
|
+
method: 'PUT',
|
|
63
|
+
params: this.parser.query({}),
|
|
64
|
+
data: payload
|
|
65
|
+
};
|
|
66
|
+
try {
|
|
67
|
+
const response = await this.httpClient.request(params);
|
|
68
|
+
return response.data;
|
|
69
|
+
}
|
|
70
|
+
catch (error) {
|
|
71
|
+
if (error instanceof ClientException) {
|
|
72
|
+
throw error;
|
|
73
|
+
}
|
|
74
|
+
else if (axios.isAxiosError(error) && error.response) {
|
|
75
|
+
switch (error.response.status) {
|
|
76
|
+
case 400:
|
|
77
|
+
throw new MessageException(error.response.data);
|
|
78
|
+
case 401:
|
|
79
|
+
throw new MessageException(error.response.data);
|
|
80
|
+
case 404:
|
|
81
|
+
throw new MessageException(error.response.data);
|
|
82
|
+
case 410:
|
|
83
|
+
throw new MessageException(error.response.data);
|
|
84
|
+
case 500:
|
|
85
|
+
throw new MessageException(error.response.data);
|
|
86
|
+
default:
|
|
87
|
+
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
throw new ClientException('An unknown error occurred: ' + String(error));
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* @returns {Promise<Identity>}
|
|
97
|
+
* @throws {MessageException}
|
|
98
|
+
* @throws {ClientException}
|
|
99
|
+
*/
|
|
100
|
+
async get(identityId) {
|
|
101
|
+
const url = this.parser.url('/backend/identity/$identity_id<[0-9]+|^~>', {
|
|
102
|
+
'identity_id': identityId,
|
|
103
|
+
});
|
|
104
|
+
let params = {
|
|
105
|
+
url: url,
|
|
106
|
+
method: 'GET',
|
|
107
|
+
params: this.parser.query({}),
|
|
108
|
+
};
|
|
109
|
+
try {
|
|
110
|
+
const response = await this.httpClient.request(params);
|
|
111
|
+
return response.data;
|
|
112
|
+
}
|
|
113
|
+
catch (error) {
|
|
114
|
+
if (error instanceof ClientException) {
|
|
115
|
+
throw error;
|
|
116
|
+
}
|
|
117
|
+
else if (axios.isAxiosError(error) && error.response) {
|
|
118
|
+
switch (error.response.status) {
|
|
119
|
+
case 401:
|
|
120
|
+
throw new MessageException(error.response.data);
|
|
121
|
+
case 404:
|
|
122
|
+
throw new MessageException(error.response.data);
|
|
123
|
+
case 410:
|
|
124
|
+
throw new MessageException(error.response.data);
|
|
125
|
+
case 500:
|
|
126
|
+
throw new MessageException(error.response.data);
|
|
127
|
+
default:
|
|
128
|
+
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
throw new ClientException('An unknown error occurred: ' + String(error));
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* @returns {Promise<Message>}
|
|
138
|
+
* @throws {MessageException}
|
|
139
|
+
* @throws {ClientException}
|
|
140
|
+
*/
|
|
141
|
+
async create(payload) {
|
|
142
|
+
const url = this.parser.url('/backend/identity', {});
|
|
143
|
+
let params = {
|
|
144
|
+
url: url,
|
|
145
|
+
method: 'POST',
|
|
146
|
+
params: this.parser.query({}),
|
|
147
|
+
data: payload
|
|
148
|
+
};
|
|
149
|
+
try {
|
|
150
|
+
const response = await this.httpClient.request(params);
|
|
151
|
+
return response.data;
|
|
152
|
+
}
|
|
153
|
+
catch (error) {
|
|
154
|
+
if (error instanceof ClientException) {
|
|
155
|
+
throw error;
|
|
156
|
+
}
|
|
157
|
+
else if (axios.isAxiosError(error) && error.response) {
|
|
158
|
+
switch (error.response.status) {
|
|
159
|
+
case 400:
|
|
160
|
+
throw new MessageException(error.response.data);
|
|
161
|
+
case 401:
|
|
162
|
+
throw new MessageException(error.response.data);
|
|
163
|
+
case 500:
|
|
164
|
+
throw new MessageException(error.response.data);
|
|
165
|
+
default:
|
|
166
|
+
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
else {
|
|
170
|
+
throw new ClientException('An unknown error occurred: ' + String(error));
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* @returns {Promise<IdentityCollection>}
|
|
176
|
+
* @throws {MessageException}
|
|
177
|
+
* @throws {ClientException}
|
|
178
|
+
*/
|
|
179
|
+
async getAll(startIndex, count, search) {
|
|
180
|
+
const url = this.parser.url('/backend/identity', {});
|
|
181
|
+
let params = {
|
|
182
|
+
url: url,
|
|
183
|
+
method: 'GET',
|
|
184
|
+
params: this.parser.query({
|
|
185
|
+
'startIndex': startIndex,
|
|
186
|
+
'count': count,
|
|
187
|
+
'search': search,
|
|
188
|
+
}),
|
|
189
|
+
};
|
|
190
|
+
try {
|
|
191
|
+
const response = await this.httpClient.request(params);
|
|
192
|
+
return response.data;
|
|
193
|
+
}
|
|
194
|
+
catch (error) {
|
|
195
|
+
if (error instanceof ClientException) {
|
|
196
|
+
throw error;
|
|
197
|
+
}
|
|
198
|
+
else if (axios.isAxiosError(error) && error.response) {
|
|
199
|
+
switch (error.response.status) {
|
|
200
|
+
case 401:
|
|
201
|
+
throw new MessageException(error.response.data);
|
|
202
|
+
case 500:
|
|
203
|
+
throw new MessageException(error.response.data);
|
|
204
|
+
default:
|
|
205
|
+
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
else {
|
|
209
|
+
throw new ClientException('An unknown error occurred: ' + String(error));
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|
|
@@ -26,7 +26,10 @@ export class LogTag 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 LogTag 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
|
/**
|
|
@@ -75,7 +80,10 @@ export class LogTag extends TagAbstract {
|
|
|
75
80
|
return response.data;
|
|
76
81
|
}
|
|
77
82
|
catch (error) {
|
|
78
|
-
if (
|
|
83
|
+
if (error instanceof ClientException) {
|
|
84
|
+
throw error;
|
|
85
|
+
}
|
|
86
|
+
else if (axios.isAxiosError(error) && error.response) {
|
|
79
87
|
switch (error.response.status) {
|
|
80
88
|
case 401:
|
|
81
89
|
throw new MessageException(error.response.data);
|
|
@@ -85,7 +93,9 @@ export class LogTag extends TagAbstract {
|
|
|
85
93
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
86
94
|
}
|
|
87
95
|
}
|
|
88
|
-
|
|
96
|
+
else {
|
|
97
|
+
throw new ClientException('An unknown error occurred: ' + String(error));
|
|
98
|
+
}
|
|
89
99
|
}
|
|
90
100
|
}
|
|
91
101
|
/**
|
|
@@ -107,7 +117,10 @@ export class LogTag extends TagAbstract {
|
|
|
107
117
|
return response.data;
|
|
108
118
|
}
|
|
109
119
|
catch (error) {
|
|
110
|
-
if (
|
|
120
|
+
if (error instanceof ClientException) {
|
|
121
|
+
throw error;
|
|
122
|
+
}
|
|
123
|
+
else if (axios.isAxiosError(error) && error.response) {
|
|
111
124
|
switch (error.response.status) {
|
|
112
125
|
case 401:
|
|
113
126
|
throw new MessageException(error.response.data);
|
|
@@ -117,7 +130,9 @@ export class LogTag extends TagAbstract {
|
|
|
117
130
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
118
131
|
}
|
|
119
132
|
}
|
|
120
|
-
|
|
133
|
+
else {
|
|
134
|
+
throw new ClientException('An unknown error occurred: ' + String(error));
|
|
135
|
+
}
|
|
121
136
|
}
|
|
122
137
|
}
|
|
123
138
|
/**
|
|
@@ -141,7 +156,10 @@ export class LogTag extends TagAbstract {
|
|
|
141
156
|
return response.data;
|
|
142
157
|
}
|
|
143
158
|
catch (error) {
|
|
144
|
-
if (
|
|
159
|
+
if (error instanceof ClientException) {
|
|
160
|
+
throw error;
|
|
161
|
+
}
|
|
162
|
+
else if (axios.isAxiosError(error) && error.response) {
|
|
145
163
|
switch (error.response.status) {
|
|
146
164
|
case 401:
|
|
147
165
|
throw new MessageException(error.response.data);
|
|
@@ -151,7 +169,9 @@ export class LogTag extends TagAbstract {
|
|
|
151
169
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
152
170
|
}
|
|
153
171
|
}
|
|
154
|
-
|
|
172
|
+
else {
|
|
173
|
+
throw new ClientException('An unknown error occurred: ' + String(error));
|
|
174
|
+
}
|
|
155
175
|
}
|
|
156
176
|
}
|
|
157
177
|
}
|
|
@@ -26,7 +26,10 @@ export class MarketplaceTag 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 400:
|
|
32
35
|
throw new MessageException(error.response.data);
|
|
@@ -38,7 +41,9 @@ export class MarketplaceTag 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
|
/**
|
|
@@ -60,7 +65,10 @@ export class MarketplaceTag extends TagAbstract {
|
|
|
60
65
|
return response.data;
|
|
61
66
|
}
|
|
62
67
|
catch (error) {
|
|
63
|
-
if (
|
|
68
|
+
if (error instanceof ClientException) {
|
|
69
|
+
throw error;
|
|
70
|
+
}
|
|
71
|
+
else if (axios.isAxiosError(error) && error.response) {
|
|
64
72
|
switch (error.response.status) {
|
|
65
73
|
case 400:
|
|
66
74
|
throw new MessageException(error.response.data);
|
|
@@ -76,7 +84,9 @@ export class MarketplaceTag extends TagAbstract {
|
|
|
76
84
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
77
85
|
}
|
|
78
86
|
}
|
|
79
|
-
|
|
87
|
+
else {
|
|
88
|
+
throw new ClientException('An unknown error occurred: ' + String(error));
|
|
89
|
+
}
|
|
80
90
|
}
|
|
81
91
|
}
|
|
82
92
|
/**
|
|
@@ -98,7 +108,10 @@ export class MarketplaceTag extends TagAbstract {
|
|
|
98
108
|
return response.data;
|
|
99
109
|
}
|
|
100
110
|
catch (error) {
|
|
101
|
-
if (
|
|
111
|
+
if (error instanceof ClientException) {
|
|
112
|
+
throw error;
|
|
113
|
+
}
|
|
114
|
+
else if (axios.isAxiosError(error) && error.response) {
|
|
102
115
|
switch (error.response.status) {
|
|
103
116
|
case 401:
|
|
104
117
|
throw new MessageException(error.response.data);
|
|
@@ -112,7 +125,9 @@ export class MarketplaceTag extends TagAbstract {
|
|
|
112
125
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
113
126
|
}
|
|
114
127
|
}
|
|
115
|
-
|
|
128
|
+
else {
|
|
129
|
+
throw new ClientException('An unknown error occurred: ' + String(error));
|
|
130
|
+
}
|
|
116
131
|
}
|
|
117
132
|
}
|
|
118
133
|
/**
|
|
@@ -133,7 +148,10 @@ export class MarketplaceTag extends TagAbstract {
|
|
|
133
148
|
return response.data;
|
|
134
149
|
}
|
|
135
150
|
catch (error) {
|
|
136
|
-
if (
|
|
151
|
+
if (error instanceof ClientException) {
|
|
152
|
+
throw error;
|
|
153
|
+
}
|
|
154
|
+
else if (axios.isAxiosError(error) && error.response) {
|
|
137
155
|
switch (error.response.status) {
|
|
138
156
|
case 400:
|
|
139
157
|
throw new MessageException(error.response.data);
|
|
@@ -145,7 +163,9 @@ export class MarketplaceTag extends TagAbstract {
|
|
|
145
163
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
146
164
|
}
|
|
147
165
|
}
|
|
148
|
-
|
|
166
|
+
else {
|
|
167
|
+
throw new ClientException('An unknown error occurred: ' + String(error));
|
|
168
|
+
}
|
|
149
169
|
}
|
|
150
170
|
}
|
|
151
171
|
/**
|
|
@@ -165,7 +185,10 @@ export class MarketplaceTag extends TagAbstract {
|
|
|
165
185
|
return response.data;
|
|
166
186
|
}
|
|
167
187
|
catch (error) {
|
|
168
|
-
if (
|
|
188
|
+
if (error instanceof ClientException) {
|
|
189
|
+
throw error;
|
|
190
|
+
}
|
|
191
|
+
else if (axios.isAxiosError(error) && error.response) {
|
|
169
192
|
switch (error.response.status) {
|
|
170
193
|
case 401:
|
|
171
194
|
throw new MessageException(error.response.data);
|
|
@@ -175,7 +198,9 @@ export class MarketplaceTag extends TagAbstract {
|
|
|
175
198
|
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
176
199
|
}
|
|
177
200
|
}
|
|
178
|
-
|
|
201
|
+
else {
|
|
202
|
+
throw new ClientException('An unknown error occurred: ' + String(error));
|
|
203
|
+
}
|
|
179
204
|
}
|
|
180
205
|
}
|
|
181
206
|
}
|