complexqa_frontend_core 1.9.2 → 1.10.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.
- package/package.json +1 -1
- package/publish/api/index.js +2 -0
- package/publish/api/test_case_step_api.js +43 -0
- package/publish/api/user_profile_api.js +33 -0
- package/publish/types/family_elements/0_familyGeneralElement.js +36 -2
- package/publish/types/family_elements/typeTeamMember.js +46 -4
- package/publish/types/family_elements/typeTestCase.js +29 -1
- package/publish/types/family_elements/typeTestCaseStep.js +112 -1
- package/publish/types/family_elements/typeUser.js +33 -12
package/package.json
CHANGED
package/publish/api/index.js
CHANGED
|
@@ -8,6 +8,7 @@ import { TeamManagementApi } from "./team_management_api.js";
|
|
|
8
8
|
import { TeamMemberApi } from "./team_member_api.js";
|
|
9
9
|
import { TestRunApi } from "./test_run_api.js";
|
|
10
10
|
import { TestRunResultApi } from "./test_run_result_api.js";
|
|
11
|
+
import { UserProfileApi } from "./user_profile_api.js";
|
|
11
12
|
|
|
12
13
|
/**
|
|
13
14
|
* Обертка над axios
|
|
@@ -132,5 +133,6 @@ export class Api
|
|
|
132
133
|
this.test_suite = new TestSuiteApi(payload);
|
|
133
134
|
this.test_run = new TestRunApi(payload);
|
|
134
135
|
this.test_run_result = new TestRunResultApi(payload);
|
|
136
|
+
this.user_profile = new UserProfileApi(payload);
|
|
135
137
|
}
|
|
136
138
|
}
|
|
@@ -15,4 +15,47 @@ export class TestCaseStepApi extends ApiAbstractElementClass
|
|
|
15
15
|
super(options);
|
|
16
16
|
this.set_element_class_instance(typeTestCaseStep);
|
|
17
17
|
}
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
/******************************************************************************************/
|
|
22
|
+
/******************************************************************************************/
|
|
23
|
+
/******************************************************************************************/
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
* @version v.1.0 (14/03/2026)
|
|
29
|
+
*/
|
|
30
|
+
async increase_sort_order(payload)
|
|
31
|
+
{
|
|
32
|
+
let url = `/${ this.api_prefix }/${ this.module_prefix }/increase_sort_order`;
|
|
33
|
+
|
|
34
|
+
payload = this.handle_request_payload(payload);
|
|
35
|
+
let response = this.api_request(url, payload);
|
|
36
|
+
response = this.handle_response(response);
|
|
37
|
+
|
|
38
|
+
return {
|
|
39
|
+
response: response,
|
|
40
|
+
payload : payload
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
*
|
|
46
|
+
* @version v.1.0 (14/03/2026)
|
|
47
|
+
*/
|
|
48
|
+
async decrease_sort_order(payload)
|
|
49
|
+
{
|
|
50
|
+
let url = `/${ this.api_prefix }/${ this.module_prefix }/decrease_sort_order`;
|
|
51
|
+
|
|
52
|
+
payload = this.handle_request_payload(payload);
|
|
53
|
+
let response = this.api_request(url, payload);
|
|
54
|
+
response = this.handle_response(response);
|
|
55
|
+
|
|
56
|
+
return {
|
|
57
|
+
response: response,
|
|
58
|
+
payload : payload
|
|
59
|
+
};
|
|
60
|
+
}
|
|
18
61
|
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ApiAbstractElementClass } from "./api_abstract_element_class.js";
|
|
2
|
+
import { typeUser } from "../types/family_elements/typeUser.js";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
*
|
|
6
|
+
* @version v.0.1 (14/03/2026)
|
|
7
|
+
*/
|
|
8
|
+
export class UserProfileApi extends ApiAbstractElementClass
|
|
9
|
+
{
|
|
10
|
+
|
|
11
|
+
module_prefix = 'user_profile';
|
|
12
|
+
|
|
13
|
+
constructor(options)
|
|
14
|
+
{
|
|
15
|
+
super(options);
|
|
16
|
+
this.set_element_class_instance(typeUser);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
/******************************************************************************************/
|
|
21
|
+
/******************************************************************************************/
|
|
22
|
+
/******************************************************************************************/
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
search = false;
|
|
26
|
+
find = false;
|
|
27
|
+
create = false;
|
|
28
|
+
clone_element = false;
|
|
29
|
+
update = false;
|
|
30
|
+
// update_property
|
|
31
|
+
delete = false;
|
|
32
|
+
|
|
33
|
+
}
|
|
@@ -12,6 +12,10 @@ export class familyGeneralElement
|
|
|
12
12
|
structure_scheme = false;
|
|
13
13
|
available_enum_values = false;
|
|
14
14
|
api_key = false;
|
|
15
|
+
attribute_name_translate_matrix = {
|
|
16
|
+
en:{},
|
|
17
|
+
ru:{}
|
|
18
|
+
}
|
|
15
19
|
|
|
16
20
|
|
|
17
21
|
/***********************************************/
|
|
@@ -37,6 +41,24 @@ export class familyGeneralElement
|
|
|
37
41
|
}
|
|
38
42
|
|
|
39
43
|
|
|
44
|
+
/**
|
|
45
|
+
*
|
|
46
|
+
* @version v.0.1 (14/03/2026)
|
|
47
|
+
* @return {string|false}
|
|
48
|
+
*/
|
|
49
|
+
get_primary_key_value()
|
|
50
|
+
{
|
|
51
|
+
if (this.get_primary_key())
|
|
52
|
+
{
|
|
53
|
+
return this[this.get_primary_key()];
|
|
54
|
+
}
|
|
55
|
+
else
|
|
56
|
+
{
|
|
57
|
+
return false;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
|
|
40
62
|
/**
|
|
41
63
|
*
|
|
42
64
|
* @version v.0.1 (27/06/2024)
|
|
@@ -187,7 +209,7 @@ export class familyGeneralElement
|
|
|
187
209
|
|
|
188
210
|
/**
|
|
189
211
|
*
|
|
190
|
-
* @version v.0
|
|
212
|
+
* @version v.1.0 (14/03/2026)
|
|
191
213
|
*
|
|
192
214
|
* @param {string} attribute_name
|
|
193
215
|
* @param {string} lang
|
|
@@ -196,7 +218,19 @@ export class familyGeneralElement
|
|
|
196
218
|
*/
|
|
197
219
|
get_attribute_name_translate(attribute_name, lang)
|
|
198
220
|
{
|
|
199
|
-
|
|
221
|
+
let response = attribute_name
|
|
222
|
+
|
|
223
|
+
if (!lang)
|
|
224
|
+
{
|
|
225
|
+
lang = 'en';
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
if (this.attribute_name_translate_matrix?.[lang]?.[attribute_name])
|
|
229
|
+
{
|
|
230
|
+
response = this.attribute_name_translate_matrix?.[lang]?.[attribute_name];
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
return response;
|
|
200
234
|
}
|
|
201
235
|
|
|
202
236
|
/***********************************************/
|
|
@@ -17,24 +17,49 @@ export class typeTeamMember extends familyGeneralElement
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
primary_key = 'team_member_id';
|
|
20
|
-
api_key
|
|
20
|
+
api_key = 'team_member';
|
|
21
21
|
|
|
22
22
|
structure_scheme = {
|
|
23
23
|
team_member_id : 'integer | require',
|
|
24
24
|
team_id : 'integer | require',
|
|
25
25
|
user_id : 'integer | require',
|
|
26
26
|
team_member_status: 'string | enum | require',
|
|
27
|
-
member_role: 'string | enum | require',
|
|
27
|
+
member_role : 'string | enum | require',
|
|
28
28
|
created_at : 'timestamp | require',
|
|
29
29
|
updated_at : 'timestamp | optional',
|
|
30
30
|
};
|
|
31
31
|
|
|
32
32
|
available_enum_values = {
|
|
33
33
|
team_member_status: [ 'PENDING', 'ACCEPTED', 'BANNED', 'REJECTED' ],
|
|
34
|
-
member_role
|
|
34
|
+
member_role : [ 'ROOT', 'ADMINISTRATOR', 'MEMBER' ]
|
|
35
35
|
};
|
|
36
36
|
|
|
37
37
|
|
|
38
|
+
attribute_name_translate_matrix = {
|
|
39
|
+
en: {
|
|
40
|
+
team_member_id : 'ID',
|
|
41
|
+
team_id : 'team',
|
|
42
|
+
team_member_status: 'status',
|
|
43
|
+
member_role : 'role',
|
|
44
|
+
created_at : 'created at',
|
|
45
|
+
updated_at : 'updated at',
|
|
46
|
+
},
|
|
47
|
+
ru: {
|
|
48
|
+
team_member_id : 'ID',
|
|
49
|
+
team_id : 'команда',
|
|
50
|
+
team_member_status: 'статус',
|
|
51
|
+
member_role : 'роль',
|
|
52
|
+
created_at : 'создано',
|
|
53
|
+
updated_at : 'обновлено',
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
/******************************************************************************************/
|
|
59
|
+
/******************************************************************************************/
|
|
60
|
+
/******************************************************************************************/
|
|
61
|
+
|
|
62
|
+
|
|
38
63
|
/**
|
|
39
64
|
*
|
|
40
65
|
* @param {object|false|undefined} data
|
|
@@ -58,6 +83,23 @@ export class typeTeamMember extends familyGeneralElement
|
|
|
58
83
|
}
|
|
59
84
|
|
|
60
85
|
|
|
86
|
+
/******************************************************************************************/
|
|
87
|
+
/******************************************************************************************/
|
|
88
|
+
/******************************************************************************************/
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
clone_element = false;
|
|
92
|
+
delete_mass = false;
|
|
93
|
+
update_properties = false;
|
|
94
|
+
update = false;
|
|
95
|
+
clone_element_mass = false;
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
/******************************************************************************************/
|
|
99
|
+
/******************************************************************************************/
|
|
100
|
+
|
|
101
|
+
/******************************************************************************************/
|
|
102
|
+
|
|
61
103
|
/**
|
|
62
104
|
*
|
|
63
105
|
* @version v.1.0 (08/01/2026)
|
|
@@ -76,7 +118,7 @@ export class typeTeamMember extends familyGeneralElement
|
|
|
76
118
|
callback?.before({ payload });
|
|
77
119
|
}
|
|
78
120
|
|
|
79
|
-
return ApiService[this.api_key].invite_emails(payload).then((response) =>
|
|
121
|
+
return ApiService[ this.api_key ].invite_emails(payload).then((response) =>
|
|
80
122
|
{
|
|
81
123
|
if (typeof callback?.success === 'function')
|
|
82
124
|
{
|
|
@@ -59,6 +59,35 @@ export class typeTestCase extends familyTestDocumentation
|
|
|
59
59
|
};
|
|
60
60
|
|
|
61
61
|
|
|
62
|
+
attribute_name_translate_matrix = {
|
|
63
|
+
en: {
|
|
64
|
+
test_case_id : 'id',
|
|
65
|
+
test_suite_id : 'suite',
|
|
66
|
+
project_id : 'project',
|
|
67
|
+
team_id : 'team',
|
|
68
|
+
test_case_title : 'title',
|
|
69
|
+
test_case_descriptions : 'descriptions',
|
|
70
|
+
test_case_time_to_execute: 'time to execute',
|
|
71
|
+
test_case_complexity : 'complexity',
|
|
72
|
+
test_case_importance : 'importance',
|
|
73
|
+
created_at : 'created at',
|
|
74
|
+
updated_at : 'updated at',
|
|
75
|
+
},
|
|
76
|
+
ru: {
|
|
77
|
+
test_case_id : 'id',
|
|
78
|
+
test_suite_id : 'набор',
|
|
79
|
+
project_id : 'проект',
|
|
80
|
+
team_id : 'команда',
|
|
81
|
+
test_case_title : 'название',
|
|
82
|
+
test_case_descriptions : 'описание',
|
|
83
|
+
test_case_time_to_execute: 'время выполнения',
|
|
84
|
+
test_case_complexity : 'сложность',
|
|
85
|
+
test_case_importance : 'важность',
|
|
86
|
+
created_at : 'создано',
|
|
87
|
+
updated_at : 'обновлено',
|
|
88
|
+
},
|
|
89
|
+
};
|
|
90
|
+
|
|
62
91
|
/**
|
|
63
92
|
*
|
|
64
93
|
* @param {object|false|undefined} data
|
|
@@ -98,5 +127,4 @@ export class typeTestCase extends familyTestDocumentation
|
|
|
98
127
|
return this.test_case_title;
|
|
99
128
|
}
|
|
100
129
|
|
|
101
|
-
|
|
102
130
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { is_object } from "../../utils/utils";
|
|
1
|
+
import { echo, is_object } from "../../utils/utils";
|
|
2
2
|
import { familyTestDocumentation } from "./1_familyTestDocumentation.js";
|
|
3
3
|
|
|
4
4
|
|
|
@@ -41,6 +41,30 @@ export class typeTestCaseStep extends familyTestDocumentation
|
|
|
41
41
|
test_case_step_type: [ 'TEST_CASE_STEP', 'TEST_CASE_PRESTEP' ],
|
|
42
42
|
};
|
|
43
43
|
|
|
44
|
+
attribute_name_translate_matrix = {
|
|
45
|
+
en: {
|
|
46
|
+
test_case_step_id : 'id',
|
|
47
|
+
test_case_step_type : 'step type',
|
|
48
|
+
team_id : 'team',
|
|
49
|
+
test_case_id : 'test case',
|
|
50
|
+
sort_order : 'sort order',
|
|
51
|
+
step_text : 'text',
|
|
52
|
+
step_element : 'element',
|
|
53
|
+
step_element_action : 'element action',
|
|
54
|
+
step_excepted_result: 'excepted result',
|
|
55
|
+
},
|
|
56
|
+
ru: {
|
|
57
|
+
test_case_step_id : 'id',
|
|
58
|
+
test_case_step_type : 'тип',
|
|
59
|
+
team_id : 'команда',
|
|
60
|
+
test_case_id : 'тест кейс',
|
|
61
|
+
sort_order : 'порядковый номер',
|
|
62
|
+
step_text : 'текст',
|
|
63
|
+
step_element : 'элемент',
|
|
64
|
+
step_element_action : 'действие',
|
|
65
|
+
step_excepted_result: 'ожидаемый результат',
|
|
66
|
+
},
|
|
67
|
+
};
|
|
44
68
|
|
|
45
69
|
/******************************************************************************************/
|
|
46
70
|
/******************************************************************************************/
|
|
@@ -87,4 +111,91 @@ export class typeTestCaseStep extends familyTestDocumentation
|
|
|
87
111
|
{
|
|
88
112
|
return this.test_suite_name;
|
|
89
113
|
}
|
|
114
|
+
|
|
115
|
+
/******************************************************************************************/
|
|
116
|
+
/******************************************************************************************/
|
|
117
|
+
/******************************************************************************************/
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
*
|
|
121
|
+
* @version v.1.0 (14/03/2026)
|
|
122
|
+
* @param element
|
|
123
|
+
* @param callback
|
|
124
|
+
*/
|
|
125
|
+
increase_sort_order(element = false, callback)
|
|
126
|
+
{
|
|
127
|
+
if (!element)
|
|
128
|
+
{
|
|
129
|
+
element = this;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
let payload = element
|
|
133
|
+
if (typeof callback?.before === 'function')
|
|
134
|
+
{
|
|
135
|
+
callback?.before({ payload });
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
return ApiService[ this.api_key ].increase_sort_order(payload).then((response) =>
|
|
139
|
+
{
|
|
140
|
+
if (typeof callback?.success === 'function')
|
|
141
|
+
{
|
|
142
|
+
callback?.success({ response, payload })
|
|
143
|
+
}
|
|
144
|
+
}).catch((error) =>
|
|
145
|
+
{
|
|
146
|
+
echo({ error });
|
|
147
|
+
if (typeof callback?.error === 'function')
|
|
148
|
+
{
|
|
149
|
+
callback?.error({ error, payload })
|
|
150
|
+
}
|
|
151
|
+
}).finally((response) =>
|
|
152
|
+
{
|
|
153
|
+
if (typeof callback?.final === 'function')
|
|
154
|
+
{
|
|
155
|
+
callback?.final({ response, payload })
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
*
|
|
163
|
+
* @version v.1.0 (14/03/2026)
|
|
164
|
+
* @param element
|
|
165
|
+
* @param callback
|
|
166
|
+
*/
|
|
167
|
+
decrease_sort_order(element = false, callback)
|
|
168
|
+
{
|
|
169
|
+
if (!element)
|
|
170
|
+
{
|
|
171
|
+
element = this;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
let payload = element
|
|
175
|
+
if (typeof callback?.before === 'function')
|
|
176
|
+
{
|
|
177
|
+
callback?.before({ payload });
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
return ApiService[ this.api_key ].decrease_sort_order(payload).then((response) =>
|
|
181
|
+
{
|
|
182
|
+
if (typeof callback?.success === 'function')
|
|
183
|
+
{
|
|
184
|
+
callback?.success({ response, payload })
|
|
185
|
+
}
|
|
186
|
+
}).catch((error) =>
|
|
187
|
+
{
|
|
188
|
+
echo({ error });
|
|
189
|
+
if (typeof callback?.error === 'function')
|
|
190
|
+
{
|
|
191
|
+
callback?.error({ error, payload })
|
|
192
|
+
}
|
|
193
|
+
}).finally((response) =>
|
|
194
|
+
{
|
|
195
|
+
if (typeof callback?.final === 'function')
|
|
196
|
+
{
|
|
197
|
+
callback?.final({ response, payload })
|
|
198
|
+
}
|
|
199
|
+
});
|
|
200
|
+
}
|
|
90
201
|
}
|
|
@@ -8,23 +8,20 @@ import { is_object } from "../../utils/utils";
|
|
|
8
8
|
export class typeUser extends familyGeneralElement
|
|
9
9
|
{
|
|
10
10
|
user_id;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
first_name;
|
|
12
|
+
last_name;
|
|
13
|
+
email;
|
|
14
14
|
user_status;
|
|
15
|
-
user_email;
|
|
16
|
-
user_phone;
|
|
17
15
|
|
|
16
|
+
api_key = 'user_profile';
|
|
18
17
|
primary_key = 'user_id';
|
|
19
18
|
|
|
20
19
|
structure_scheme = {
|
|
21
|
-
user_id
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
user_status
|
|
26
|
-
user_email : 'string | email | require',
|
|
27
|
-
user_phone_number: 'string | phone_number | optional',
|
|
20
|
+
user_id : 'integer | require',
|
|
21
|
+
first_name : 'string | require',
|
|
22
|
+
last_name : 'string | protected | require',
|
|
23
|
+
email : 'string | email | require',
|
|
24
|
+
user_status: 'string | enum| require',
|
|
28
25
|
};
|
|
29
26
|
|
|
30
27
|
available_enum_values = {
|
|
@@ -32,6 +29,11 @@ export class typeUser extends familyGeneralElement
|
|
|
32
29
|
};
|
|
33
30
|
|
|
34
31
|
|
|
32
|
+
/******************************************************************************************/
|
|
33
|
+
/******************************************************************************************/
|
|
34
|
+
/******************************************************************************************/
|
|
35
|
+
|
|
36
|
+
|
|
35
37
|
/**
|
|
36
38
|
*
|
|
37
39
|
* @param {object|false|undefined} data
|
|
@@ -53,4 +55,23 @@ export class typeUser extends familyGeneralElement
|
|
|
53
55
|
|
|
54
56
|
return this;
|
|
55
57
|
}
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
/******************************************************************************************/
|
|
61
|
+
/******************************************************************************************/
|
|
62
|
+
/******************************************************************************************/
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
clone_element = false;
|
|
66
|
+
delete_mass = false;
|
|
67
|
+
update_properties = false;
|
|
68
|
+
update = false;
|
|
69
|
+
clone_element_mass = false;
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
/******************************************************************************************/
|
|
73
|
+
/******************************************************************************************/
|
|
74
|
+
/******************************************************************************************/
|
|
75
|
+
|
|
76
|
+
|
|
56
77
|
}
|