fusio-sdk 5.1.0 → 5.1.2
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.
|
@@ -39,7 +39,7 @@ export declare class BackendDatabaseTag extends TagAbstract {
|
|
|
39
39
|
* @throws {CommonMessageExceptionException}
|
|
40
40
|
* @throws {ClientException}
|
|
41
41
|
*/
|
|
42
|
-
getRows(connectionId: string, tableName: string): Promise<BackendDatabaseRows>;
|
|
42
|
+
getRows(connectionId: string, tableName: string, startIndex?: number, count?: number, filterBy?: string, filterOp?: string, filterValue?: string, sortBy?: string, sortOrder?: string, columns?: string): Promise<BackendDatabaseRows>;
|
|
43
43
|
/**
|
|
44
44
|
* @returns {Promise<CommonMessage>}
|
|
45
45
|
* @throws {CommonMessageExceptionException}
|
|
@@ -33,8 +33,12 @@ export class BackendDatabaseTag extends TagAbstract {
|
|
|
33
33
|
}
|
|
34
34
|
else if (axios.isAxiosError(error) && error.response) {
|
|
35
35
|
switch (error.response.status) {
|
|
36
|
+
case 400:
|
|
37
|
+
throw new CommonMessageException(error.response.data);
|
|
36
38
|
case 401:
|
|
37
39
|
throw new CommonMessageException(error.response.data);
|
|
40
|
+
case 404:
|
|
41
|
+
throw new CommonMessageException(error.response.data);
|
|
38
42
|
case 500:
|
|
39
43
|
throw new CommonMessageException(error.response.data);
|
|
40
44
|
default:
|
|
@@ -73,8 +77,12 @@ export class BackendDatabaseTag extends TagAbstract {
|
|
|
73
77
|
}
|
|
74
78
|
else if (axios.isAxiosError(error) && error.response) {
|
|
75
79
|
switch (error.response.status) {
|
|
80
|
+
case 400:
|
|
81
|
+
throw new CommonMessageException(error.response.data);
|
|
76
82
|
case 401:
|
|
77
83
|
throw new CommonMessageException(error.response.data);
|
|
84
|
+
case 404:
|
|
85
|
+
throw new CommonMessageException(error.response.data);
|
|
78
86
|
case 500:
|
|
79
87
|
throw new CommonMessageException(error.response.data);
|
|
80
88
|
default:
|
|
@@ -112,8 +120,12 @@ export class BackendDatabaseTag extends TagAbstract {
|
|
|
112
120
|
}
|
|
113
121
|
else if (axios.isAxiosError(error) && error.response) {
|
|
114
122
|
switch (error.response.status) {
|
|
123
|
+
case 400:
|
|
124
|
+
throw new CommonMessageException(error.response.data);
|
|
115
125
|
case 401:
|
|
116
126
|
throw new CommonMessageException(error.response.data);
|
|
127
|
+
case 404:
|
|
128
|
+
throw new CommonMessageException(error.response.data);
|
|
117
129
|
case 500:
|
|
118
130
|
throw new CommonMessageException(error.response.data);
|
|
119
131
|
default:
|
|
@@ -153,6 +165,8 @@ export class BackendDatabaseTag extends TagAbstract {
|
|
|
153
165
|
switch (error.response.status) {
|
|
154
166
|
case 401:
|
|
155
167
|
throw new CommonMessageException(error.response.data);
|
|
168
|
+
case 404:
|
|
169
|
+
throw new CommonMessageException(error.response.data);
|
|
156
170
|
case 500:
|
|
157
171
|
throw new CommonMessageException(error.response.data);
|
|
158
172
|
default:
|
|
@@ -169,7 +183,7 @@ export class BackendDatabaseTag extends TagAbstract {
|
|
|
169
183
|
* @throws {CommonMessageExceptionException}
|
|
170
184
|
* @throws {ClientException}
|
|
171
185
|
*/
|
|
172
|
-
async getRows(connectionId, tableName) {
|
|
186
|
+
async getRows(connectionId, tableName, startIndex, count, filterBy, filterOp, filterValue, sortBy, sortOrder, columns) {
|
|
173
187
|
const url = this.parser.url('/backend/database/:connection_id/:table_name/rows', {
|
|
174
188
|
'connection_id': connectionId,
|
|
175
189
|
'table_name': tableName,
|
|
@@ -177,7 +191,16 @@ export class BackendDatabaseTag extends TagAbstract {
|
|
|
177
191
|
let params = {
|
|
178
192
|
url: url,
|
|
179
193
|
method: 'GET',
|
|
180
|
-
params: this.parser.query({
|
|
194
|
+
params: this.parser.query({
|
|
195
|
+
'startIndex': startIndex,
|
|
196
|
+
'count': count,
|
|
197
|
+
'filterBy': filterBy,
|
|
198
|
+
'filterOp': filterOp,
|
|
199
|
+
'filterValue': filterValue,
|
|
200
|
+
'sortBy': sortBy,
|
|
201
|
+
'sortOrder': sortOrder,
|
|
202
|
+
'columns': columns,
|
|
203
|
+
}, []),
|
|
181
204
|
};
|
|
182
205
|
try {
|
|
183
206
|
const response = await this.httpClient.request(params);
|
|
@@ -191,6 +214,8 @@ export class BackendDatabaseTag extends TagAbstract {
|
|
|
191
214
|
switch (error.response.status) {
|
|
192
215
|
case 401:
|
|
193
216
|
throw new CommonMessageException(error.response.data);
|
|
217
|
+
case 404:
|
|
218
|
+
throw new CommonMessageException(error.response.data);
|
|
194
219
|
case 500:
|
|
195
220
|
throw new CommonMessageException(error.response.data);
|
|
196
221
|
default:
|
|
@@ -227,8 +252,12 @@ export class BackendDatabaseTag extends TagAbstract {
|
|
|
227
252
|
}
|
|
228
253
|
else if (axios.isAxiosError(error) && error.response) {
|
|
229
254
|
switch (error.response.status) {
|
|
255
|
+
case 400:
|
|
256
|
+
throw new CommonMessageException(error.response.data);
|
|
230
257
|
case 401:
|
|
231
258
|
throw new CommonMessageException(error.response.data);
|
|
259
|
+
case 404:
|
|
260
|
+
throw new CommonMessageException(error.response.data);
|
|
232
261
|
case 500:
|
|
233
262
|
throw new CommonMessageException(error.response.data);
|
|
234
263
|
default:
|
|
@@ -266,8 +295,12 @@ export class BackendDatabaseTag extends TagAbstract {
|
|
|
266
295
|
}
|
|
267
296
|
else if (axios.isAxiosError(error) && error.response) {
|
|
268
297
|
switch (error.response.status) {
|
|
298
|
+
case 400:
|
|
299
|
+
throw new CommonMessageException(error.response.data);
|
|
269
300
|
case 401:
|
|
270
301
|
throw new CommonMessageException(error.response.data);
|
|
302
|
+
case 404:
|
|
303
|
+
throw new CommonMessageException(error.response.data);
|
|
271
304
|
case 500:
|
|
272
305
|
throw new CommonMessageException(error.response.data);
|
|
273
306
|
default:
|
|
@@ -304,8 +337,12 @@ export class BackendDatabaseTag extends TagAbstract {
|
|
|
304
337
|
}
|
|
305
338
|
else if (axios.isAxiosError(error) && error.response) {
|
|
306
339
|
switch (error.response.status) {
|
|
340
|
+
case 400:
|
|
341
|
+
throw new CommonMessageException(error.response.data);
|
|
307
342
|
case 401:
|
|
308
343
|
throw new CommonMessageException(error.response.data);
|
|
344
|
+
case 404:
|
|
345
|
+
throw new CommonMessageException(error.response.data);
|
|
309
346
|
case 500:
|
|
310
347
|
throw new CommonMessageException(error.response.data);
|
|
311
348
|
default:
|
|
@@ -344,6 +381,8 @@ export class BackendDatabaseTag extends TagAbstract {
|
|
|
344
381
|
switch (error.response.status) {
|
|
345
382
|
case 401:
|
|
346
383
|
throw new CommonMessageException(error.response.data);
|
|
384
|
+
case 404:
|
|
385
|
+
throw new CommonMessageException(error.response.data);
|
|
347
386
|
case 500:
|
|
348
387
|
throw new CommonMessageException(error.response.data);
|
|
349
388
|
default:
|
|
@@ -381,6 +420,8 @@ export class BackendDatabaseTag extends TagAbstract {
|
|
|
381
420
|
switch (error.response.status) {
|
|
382
421
|
case 401:
|
|
383
422
|
throw new CommonMessageException(error.response.data);
|
|
423
|
+
case 404:
|
|
424
|
+
throw new CommonMessageException(error.response.data);
|
|
384
425
|
case 500:
|
|
385
426
|
throw new CommonMessageException(error.response.data);
|
|
386
427
|
default:
|
package/dist/BackendSdkTag.d.ts
CHANGED
|
@@ -4,15 +4,15 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { TagAbstract } from "sdkgen-client";
|
|
6
6
|
import { BackendSdkGenerate } from "./BackendSdkGenerate";
|
|
7
|
+
import { BackendSdkMessage } from "./BackendSdkMessage";
|
|
7
8
|
import { BackendSdkResponse } from "./BackendSdkResponse";
|
|
8
|
-
import { CommonMessage } from "./CommonMessage";
|
|
9
9
|
export declare class BackendSdkTag extends TagAbstract {
|
|
10
10
|
/**
|
|
11
|
-
* @returns {Promise<
|
|
11
|
+
* @returns {Promise<BackendSdkMessage>}
|
|
12
12
|
* @throws {CommonMessageExceptionException}
|
|
13
13
|
* @throws {ClientException}
|
|
14
14
|
*/
|
|
15
|
-
generate(payload: BackendSdkGenerate): Promise<
|
|
15
|
+
generate(payload: BackendSdkGenerate): Promise<BackendSdkMessage>;
|
|
16
16
|
/**
|
|
17
17
|
* @returns {Promise<BackendSdkResponse>}
|
|
18
18
|
* @throws {CommonMessageExceptionException}
|
package/dist/BackendSdkTag.js
CHANGED
|
@@ -8,7 +8,7 @@ import { ClientException, UnknownStatusCodeException } from "sdkgen-client";
|
|
|
8
8
|
import { CommonMessageException } from "./CommonMessageException";
|
|
9
9
|
export class BackendSdkTag extends TagAbstract {
|
|
10
10
|
/**
|
|
11
|
-
* @returns {Promise<
|
|
11
|
+
* @returns {Promise<BackendSdkMessage>}
|
|
12
12
|
* @throws {CommonMessageExceptionException}
|
|
13
13
|
* @throws {ClientException}
|
|
14
14
|
*/
|
|
@@ -30,6 +30,8 @@ export class BackendSdkTag extends TagAbstract {
|
|
|
30
30
|
}
|
|
31
31
|
else if (axios.isAxiosError(error) && error.response) {
|
|
32
32
|
switch (error.response.status) {
|
|
33
|
+
case 400:
|
|
34
|
+
throw new CommonMessageException(error.response.data);
|
|
33
35
|
case 401:
|
|
34
36
|
throw new CommonMessageException(error.response.data);
|
|
35
37
|
case 500:
|