fusio-sdk 5.1.3 → 5.1.4
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/BackendTag.d.ts +2 -0
- package/dist/BackendTag.js +4 -0
- package/dist/BackendTest.d.ts +13 -0
- package/dist/BackendTest.js +5 -0
- package/dist/BackendTestCollection.d.ts +7 -0
- package/dist/BackendTestCollection.js +5 -0
- package/dist/BackendTestConfig.d.ts +7 -0
- package/dist/BackendTestConfig.js +5 -0
- package/dist/BackendTestTag.d.ts +41 -0
- package/dist/BackendTestTag.js +216 -0
- package/package.json +1 -1
package/dist/BackendTag.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ import { BackendScopeTag } from "./BackendScopeTag";
|
|
|
29
29
|
import { BackendSdkTag } from "./BackendSdkTag";
|
|
30
30
|
import { BackendStatisticTag } from "./BackendStatisticTag";
|
|
31
31
|
import { BackendTenantTag } from "./BackendTenantTag";
|
|
32
|
+
import { BackendTestTag } from "./BackendTestTag";
|
|
32
33
|
import { BackendTokenTag } from "./BackendTokenTag";
|
|
33
34
|
import { BackendTransactionTag } from "./BackendTransactionTag";
|
|
34
35
|
import { BackendTrashTag } from "./BackendTrashTag";
|
|
@@ -40,6 +41,7 @@ export declare class BackendTag extends TagAbstract {
|
|
|
40
41
|
trash(): BackendTrashTag;
|
|
41
42
|
transaction(): BackendTransactionTag;
|
|
42
43
|
token(): BackendTokenTag;
|
|
44
|
+
test(): BackendTestTag;
|
|
43
45
|
tenant(): BackendTenantTag;
|
|
44
46
|
statistic(): BackendStatisticTag;
|
|
45
47
|
sdk(): BackendSdkTag;
|
package/dist/BackendTag.js
CHANGED
|
@@ -29,6 +29,7 @@ import { BackendScopeTag } from "./BackendScopeTag";
|
|
|
29
29
|
import { BackendSdkTag } from "./BackendSdkTag";
|
|
30
30
|
import { BackendStatisticTag } from "./BackendStatisticTag";
|
|
31
31
|
import { BackendTenantTag } from "./BackendTenantTag";
|
|
32
|
+
import { BackendTestTag } from "./BackendTestTag";
|
|
32
33
|
import { BackendTokenTag } from "./BackendTokenTag";
|
|
33
34
|
import { BackendTransactionTag } from "./BackendTransactionTag";
|
|
34
35
|
import { BackendTrashTag } from "./BackendTrashTag";
|
|
@@ -50,6 +51,9 @@ export class BackendTag extends TagAbstract {
|
|
|
50
51
|
token() {
|
|
51
52
|
return new BackendTokenTag(this.httpClient, this.parser);
|
|
52
53
|
}
|
|
54
|
+
test() {
|
|
55
|
+
return new BackendTestTag(this.httpClient, this.parser);
|
|
56
|
+
}
|
|
53
57
|
tenant() {
|
|
54
58
|
return new BackendTenantTag(this.httpClient, this.parser);
|
|
55
59
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* BackendTest automatically generated by SDKgen please do not edit this file manually
|
|
3
|
+
* {@link https://sdkgen.app}
|
|
4
|
+
*/
|
|
5
|
+
import { BackendTestConfig } from "./BackendTestConfig";
|
|
6
|
+
export interface BackendTest {
|
|
7
|
+
id?: number;
|
|
8
|
+
status?: number;
|
|
9
|
+
operationName?: string;
|
|
10
|
+
message?: string;
|
|
11
|
+
response?: string;
|
|
12
|
+
config?: BackendTestConfig;
|
|
13
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* BackendTestCollection automatically generated by SDKgen please do not edit this file manually
|
|
3
|
+
* {@link https://sdkgen.app}
|
|
4
|
+
*/
|
|
5
|
+
import { CommonCollection } from "./CommonCollection";
|
|
6
|
+
import { BackendTest } from "./BackendTest";
|
|
7
|
+
export type BackendTestCollection = CommonCollection<BackendTest>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* BackendTestConfig automatically generated by SDKgen please do not edit this file manually
|
|
3
|
+
* {@link https://sdkgen.app}
|
|
4
|
+
*/
|
|
5
|
+
import { BackendActionExecuteRequest } from "./BackendActionExecuteRequest";
|
|
6
|
+
export interface BackendTestConfig extends BackendActionExecuteRequest {
|
|
7
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* BackendTestTag 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 { BackendTest } from "./BackendTest";
|
|
7
|
+
import { BackendTestCollection } from "./BackendTestCollection";
|
|
8
|
+
import { BackendTestConfig } from "./BackendTestConfig";
|
|
9
|
+
import { CommonMessage } from "./CommonMessage";
|
|
10
|
+
export declare class BackendTestTag extends TagAbstract {
|
|
11
|
+
/**
|
|
12
|
+
* @returns {Promise<CommonMessage>}
|
|
13
|
+
* @throws {CommonMessageExceptionException}
|
|
14
|
+
* @throws {ClientException}
|
|
15
|
+
*/
|
|
16
|
+
update(testId: string, payload: BackendTestConfig): Promise<CommonMessage>;
|
|
17
|
+
/**
|
|
18
|
+
* @returns {Promise<CommonMessage>}
|
|
19
|
+
* @throws {CommonMessageExceptionException}
|
|
20
|
+
* @throws {ClientException}
|
|
21
|
+
*/
|
|
22
|
+
run(): Promise<CommonMessage>;
|
|
23
|
+
/**
|
|
24
|
+
* @returns {Promise<CommonMessage>}
|
|
25
|
+
* @throws {CommonMessageExceptionException}
|
|
26
|
+
* @throws {ClientException}
|
|
27
|
+
*/
|
|
28
|
+
refresh(): Promise<CommonMessage>;
|
|
29
|
+
/**
|
|
30
|
+
* @returns {Promise<BackendTest>}
|
|
31
|
+
* @throws {CommonMessageExceptionException}
|
|
32
|
+
* @throws {ClientException}
|
|
33
|
+
*/
|
|
34
|
+
get(testId: string): Promise<BackendTest>;
|
|
35
|
+
/**
|
|
36
|
+
* @returns {Promise<BackendTestCollection>}
|
|
37
|
+
* @throws {CommonMessageExceptionException}
|
|
38
|
+
* @throws {ClientException}
|
|
39
|
+
*/
|
|
40
|
+
getAll(startIndex?: number, count?: number, search?: string): Promise<BackendTestCollection>;
|
|
41
|
+
}
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* BackendTestTag 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 { CommonMessageException } from "./CommonMessageException";
|
|
9
|
+
export class BackendTestTag extends TagAbstract {
|
|
10
|
+
/**
|
|
11
|
+
* @returns {Promise<CommonMessage>}
|
|
12
|
+
* @throws {CommonMessageExceptionException}
|
|
13
|
+
* @throws {ClientException}
|
|
14
|
+
*/
|
|
15
|
+
async update(testId, payload) {
|
|
16
|
+
const url = this.parser.url('/backend/test/$test_id<[0-9]+>', {
|
|
17
|
+
'test_id': testId,
|
|
18
|
+
});
|
|
19
|
+
let params = {
|
|
20
|
+
url: url,
|
|
21
|
+
method: 'PUT',
|
|
22
|
+
params: this.parser.query({}, []),
|
|
23
|
+
data: payload
|
|
24
|
+
};
|
|
25
|
+
try {
|
|
26
|
+
const response = await this.httpClient.request(params);
|
|
27
|
+
return response.data;
|
|
28
|
+
}
|
|
29
|
+
catch (error) {
|
|
30
|
+
if (error instanceof ClientException) {
|
|
31
|
+
throw error;
|
|
32
|
+
}
|
|
33
|
+
else if (axios.isAxiosError(error) && error.response) {
|
|
34
|
+
switch (error.response.status) {
|
|
35
|
+
case 400:
|
|
36
|
+
throw new CommonMessageException(error.response.data);
|
|
37
|
+
case 401:
|
|
38
|
+
throw new CommonMessageException(error.response.data);
|
|
39
|
+
case 404:
|
|
40
|
+
throw new CommonMessageException(error.response.data);
|
|
41
|
+
case 410:
|
|
42
|
+
throw new CommonMessageException(error.response.data);
|
|
43
|
+
case 500:
|
|
44
|
+
throw new CommonMessageException(error.response.data);
|
|
45
|
+
default:
|
|
46
|
+
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
throw new ClientException('An unknown error occurred: ' + String(error));
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* @returns {Promise<CommonMessage>}
|
|
56
|
+
* @throws {CommonMessageExceptionException}
|
|
57
|
+
* @throws {ClientException}
|
|
58
|
+
*/
|
|
59
|
+
async run() {
|
|
60
|
+
const url = this.parser.url('/backend/test', {});
|
|
61
|
+
let params = {
|
|
62
|
+
url: url,
|
|
63
|
+
method: 'POST',
|
|
64
|
+
params: this.parser.query({}, []),
|
|
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 401:
|
|
77
|
+
throw new CommonMessageException(error.response.data);
|
|
78
|
+
case 404:
|
|
79
|
+
throw new CommonMessageException(error.response.data);
|
|
80
|
+
case 410:
|
|
81
|
+
throw new CommonMessageException(error.response.data);
|
|
82
|
+
case 500:
|
|
83
|
+
throw new CommonMessageException(error.response.data);
|
|
84
|
+
default:
|
|
85
|
+
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
throw new ClientException('An unknown error occurred: ' + String(error));
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* @returns {Promise<CommonMessage>}
|
|
95
|
+
* @throws {CommonMessageExceptionException}
|
|
96
|
+
* @throws {ClientException}
|
|
97
|
+
*/
|
|
98
|
+
async refresh() {
|
|
99
|
+
const url = this.parser.url('/backend/test', {});
|
|
100
|
+
let params = {
|
|
101
|
+
url: url,
|
|
102
|
+
method: 'PUT',
|
|
103
|
+
params: this.parser.query({}, []),
|
|
104
|
+
};
|
|
105
|
+
try {
|
|
106
|
+
const response = await this.httpClient.request(params);
|
|
107
|
+
return response.data;
|
|
108
|
+
}
|
|
109
|
+
catch (error) {
|
|
110
|
+
if (error instanceof ClientException) {
|
|
111
|
+
throw error;
|
|
112
|
+
}
|
|
113
|
+
else if (axios.isAxiosError(error) && error.response) {
|
|
114
|
+
switch (error.response.status) {
|
|
115
|
+
case 401:
|
|
116
|
+
throw new CommonMessageException(error.response.data);
|
|
117
|
+
case 404:
|
|
118
|
+
throw new CommonMessageException(error.response.data);
|
|
119
|
+
case 410:
|
|
120
|
+
throw new CommonMessageException(error.response.data);
|
|
121
|
+
case 500:
|
|
122
|
+
throw new CommonMessageException(error.response.data);
|
|
123
|
+
default:
|
|
124
|
+
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
else {
|
|
128
|
+
throw new ClientException('An unknown error occurred: ' + String(error));
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* @returns {Promise<BackendTest>}
|
|
134
|
+
* @throws {CommonMessageExceptionException}
|
|
135
|
+
* @throws {ClientException}
|
|
136
|
+
*/
|
|
137
|
+
async get(testId) {
|
|
138
|
+
const url = this.parser.url('/backend/test/$test_id<[0-9]+>', {
|
|
139
|
+
'test_id': testId,
|
|
140
|
+
});
|
|
141
|
+
let params = {
|
|
142
|
+
url: url,
|
|
143
|
+
method: 'GET',
|
|
144
|
+
params: this.parser.query({}, []),
|
|
145
|
+
};
|
|
146
|
+
try {
|
|
147
|
+
const response = await this.httpClient.request(params);
|
|
148
|
+
return response.data;
|
|
149
|
+
}
|
|
150
|
+
catch (error) {
|
|
151
|
+
if (error instanceof ClientException) {
|
|
152
|
+
throw error;
|
|
153
|
+
}
|
|
154
|
+
else if (axios.isAxiosError(error) && error.response) {
|
|
155
|
+
switch (error.response.status) {
|
|
156
|
+
case 401:
|
|
157
|
+
throw new CommonMessageException(error.response.data);
|
|
158
|
+
case 404:
|
|
159
|
+
throw new CommonMessageException(error.response.data);
|
|
160
|
+
case 410:
|
|
161
|
+
throw new CommonMessageException(error.response.data);
|
|
162
|
+
case 500:
|
|
163
|
+
throw new CommonMessageException(error.response.data);
|
|
164
|
+
default:
|
|
165
|
+
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
else {
|
|
169
|
+
throw new ClientException('An unknown error occurred: ' + String(error));
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* @returns {Promise<BackendTestCollection>}
|
|
175
|
+
* @throws {CommonMessageExceptionException}
|
|
176
|
+
* @throws {ClientException}
|
|
177
|
+
*/
|
|
178
|
+
async getAll(startIndex, count, search) {
|
|
179
|
+
const url = this.parser.url('/backend/test', {});
|
|
180
|
+
let params = {
|
|
181
|
+
url: url,
|
|
182
|
+
method: 'GET',
|
|
183
|
+
params: this.parser.query({
|
|
184
|
+
'startIndex': startIndex,
|
|
185
|
+
'count': count,
|
|
186
|
+
'search': search,
|
|
187
|
+
}, []),
|
|
188
|
+
};
|
|
189
|
+
try {
|
|
190
|
+
const response = await this.httpClient.request(params);
|
|
191
|
+
return response.data;
|
|
192
|
+
}
|
|
193
|
+
catch (error) {
|
|
194
|
+
if (error instanceof ClientException) {
|
|
195
|
+
throw error;
|
|
196
|
+
}
|
|
197
|
+
else if (axios.isAxiosError(error) && error.response) {
|
|
198
|
+
switch (error.response.status) {
|
|
199
|
+
case 401:
|
|
200
|
+
throw new CommonMessageException(error.response.data);
|
|
201
|
+
case 404:
|
|
202
|
+
throw new CommonMessageException(error.response.data);
|
|
203
|
+
case 410:
|
|
204
|
+
throw new CommonMessageException(error.response.data);
|
|
205
|
+
case 500:
|
|
206
|
+
throw new CommonMessageException(error.response.data);
|
|
207
|
+
default:
|
|
208
|
+
throw new UnknownStatusCodeException('The server returned an unknown status code');
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
else {
|
|
212
|
+
throw new ClientException('An unknown error occurred: ' + String(error));
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
}
|