complexqa_frontend_core 1.22.3 → 1.24.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/package.json +1 -1
- package/publish/api/event_api.js +20 -0
- package/publish/api/index.js +34 -21
- package/publish/api/tag/tag_color_api.js +16 -0
- package/publish/api/tag/tag_template_api.js +16 -0
- package/publish/api/tag_api.js +52 -0
- package/publish/api/tag_relation_api.js +57 -0
- package/publish/app_configuration/table/helpers/table_element_models.js +6 -0
- package/publish/app_configuration/table/sections/bug.js +7 -1
- package/publish/app_configuration/table/sections/event.js +76 -0
- package/publish/app_configuration/table/sections/tag.js +84 -0
- package/publish/app_configuration/table/sections/tag_relation.js +309 -0
- package/publish/app_configuration/table/sections/test_account.js +7 -1
- package/publish/app_configuration/table/sections/test_case.js +7 -1
- package/publish/app_configuration/table/sections/test_run.js +7 -1
- package/publish/app_configuration/table/sections/test_run_result.js +7 -1
- package/publish/app_configuration/table/sections/text_document.js +7 -1
- package/publish/app_configuration/table/table_configuration.js +6 -0
- package/publish/index.js +5 -0
- package/publish/types/core/0_familyGeneralElement.js +2 -2
- package/publish/types/core/1_familyTestDocumentation.js +9 -1
- package/publish/types/element_translate/typeBug.i18n.js +11 -0
- package/publish/types/element_translate/typeEvent.i18n.js +493 -0
- package/publish/types/element_translate/typeTag.i18n.js +69 -0
- package/publish/types/element_translate/typeTagRelation.i18n.js +74 -0
- package/publish/types/element_translate/typeTestAccount.i18n.js +11 -0
- package/publish/types/element_translate/typeTestCase.i18n.js +11 -0
- package/publish/types/element_translate/typeTestRun.i18n.js +11 -0
- package/publish/types/element_translate/typeTestRunResult.i18n.js +11 -0
- package/publish/types/element_translate/typeTextDocument.i18n.js +11 -0
- package/publish/types/family_elements/typeBug.js +0 -2
- package/publish/types/family_elements/typeTag.js +84 -0
- package/publish/types/family_elements/typeTestAccount.js +2 -0
- package/publish/types/family_events/familyEvent.js +72 -0
- package/publish/types/family_events/typeEvent.js +95 -0
- package/publish/types/family_files/typeTextDocument.js +2 -0
- package/publish/types/family_relation/typeTagRelation.js +123 -0
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { familyEvent } from "./familyEvent.js";
|
|
2
|
+
import { is_object } from "../../utils/utils.js";
|
|
3
|
+
import { typeEvent_i18n } from "../element_translate/typeEvent.i18n.js";
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Иммутабельный факт CUD-события (конверт event-service).
|
|
8
|
+
*
|
|
9
|
+
* Только чтение: ApiService.event.search({ filters, options }).
|
|
10
|
+
* Create / update / delete с клиента не поддерживаются.
|
|
11
|
+
* options.add: subjects | actors | projects | field_changes (гидрация на main).
|
|
12
|
+
* @version v.1.3 (26/07/2026)
|
|
13
|
+
*/
|
|
14
|
+
export class typeEvent extends familyEvent
|
|
15
|
+
{
|
|
16
|
+
event_id;
|
|
17
|
+
event_uuid;
|
|
18
|
+
type;
|
|
19
|
+
producer;
|
|
20
|
+
source;
|
|
21
|
+
subject_type;
|
|
22
|
+
subject_id;
|
|
23
|
+
action;
|
|
24
|
+
outcome;
|
|
25
|
+
failure_code;
|
|
26
|
+
failure_reason;
|
|
27
|
+
actor_type;
|
|
28
|
+
actor_id;
|
|
29
|
+
team_id;
|
|
30
|
+
project_id;
|
|
31
|
+
occurred_at;
|
|
32
|
+
received_at;
|
|
33
|
+
correlation_id;
|
|
34
|
+
schema_version;
|
|
35
|
+
field_changes;
|
|
36
|
+
|
|
37
|
+
primary_key = 'event_id';
|
|
38
|
+
api_key = 'event';
|
|
39
|
+
|
|
40
|
+
structure_scheme = {
|
|
41
|
+
event_id : 'integer | require',
|
|
42
|
+
event_uuid : 'string | require',
|
|
43
|
+
type : 'string | require',
|
|
44
|
+
producer : 'string | optional',
|
|
45
|
+
source : 'string | optional',
|
|
46
|
+
subject_type : 'string | enum | require',
|
|
47
|
+
subject_id : 'mixed | require',
|
|
48
|
+
action : 'string | enum | require',
|
|
49
|
+
outcome : 'string | enum | require',
|
|
50
|
+
failure_code : 'integer | optional',
|
|
51
|
+
failure_reason : 'string | optional',
|
|
52
|
+
actor_type : 'string | enum | optional',
|
|
53
|
+
actor_id : 'mixed | optional',
|
|
54
|
+
team_id : 'integer | optional',
|
|
55
|
+
project_id : 'mixed | optional',
|
|
56
|
+
occurred_at : 'timestamp | require',
|
|
57
|
+
received_at : 'timestamp | require',
|
|
58
|
+
correlation_id : 'string | optional',
|
|
59
|
+
schema_version : 'integer | optional',
|
|
60
|
+
field_changes : 'array | optional',
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
available_enum_values = {
|
|
64
|
+
action : familyEvent.get_action_values(),
|
|
65
|
+
outcome : familyEvent.get_outcome_values(),
|
|
66
|
+
actor_type : familyEvent.get_actor_type_values(),
|
|
67
|
+
subject_type : familyEvent.get_subject_type_values(),
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
attribute_name_translate_matrix = typeEvent_i18n.attribute_name_translate_matrix;
|
|
71
|
+
|
|
72
|
+
enum_value_translate_matrix = typeEvent_i18n.enum_value_translate_matrix;
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* @param {object|false|undefined} data
|
|
77
|
+
*/
|
|
78
|
+
constructor(data = false)
|
|
79
|
+
{
|
|
80
|
+
super();
|
|
81
|
+
|
|
82
|
+
if (data && is_object(data))
|
|
83
|
+
{
|
|
84
|
+
_.mapObject(data, (value, key) =>
|
|
85
|
+
{
|
|
86
|
+
if (this.hasOwnProperty(key))
|
|
87
|
+
{
|
|
88
|
+
this[key] = value;
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
return this;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { is_object } from '../../utils/utils.js';
|
|
2
|
+
import _ from 'underscore';
|
|
3
|
+
import { familyRelation } from '../core/1_familyRelation.js';
|
|
4
|
+
import { typeTagRelation_i18n } from '../element_translate/typeTagRelation.i18n.js';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Связь tag с элементом проекта (полиморфная junction).
|
|
8
|
+
*
|
|
9
|
+
* @see docs/Tags/tag-relation-docs.MD
|
|
10
|
+
*
|
|
11
|
+
* @version v.0.1 (12/08/2026)
|
|
12
|
+
*/
|
|
13
|
+
export class typeTagRelation extends familyRelation
|
|
14
|
+
{
|
|
15
|
+
tag_relation_id;
|
|
16
|
+
tag_id;
|
|
17
|
+
element_type;
|
|
18
|
+
element_id;
|
|
19
|
+
|
|
20
|
+
source_key = 'tag_id';
|
|
21
|
+
target_key = 'element_id';
|
|
22
|
+
relation_type_key = 'element_type';
|
|
23
|
+
|
|
24
|
+
primary_key = 'tag_relation_id';
|
|
25
|
+
api_key = 'tag_relation';
|
|
26
|
+
|
|
27
|
+
static relation_target_map = {
|
|
28
|
+
test_suite_id : { type_token: 'typeTestSuite', primary_key: 'test_suite_id', api_key: 'test_suite' },
|
|
29
|
+
test_case_id : { type_token: 'typeTestCase', primary_key: 'test_case_id', api_key: 'test_case' },
|
|
30
|
+
test_run_id : { type_token: 'typeTestRun', primary_key: 'test_run_id', api_key: 'test_run' },
|
|
31
|
+
test_run_result_id : {
|
|
32
|
+
type_token : 'typeTestRunResult',
|
|
33
|
+
primary_key: 'test_run_result_id',
|
|
34
|
+
api_key : 'test_run_result',
|
|
35
|
+
},
|
|
36
|
+
test_account_id : {
|
|
37
|
+
type_token : 'typeTestAccount',
|
|
38
|
+
primary_key: 'test_account_id',
|
|
39
|
+
api_key : 'test_account',
|
|
40
|
+
},
|
|
41
|
+
bug_id : { type_token: 'typeBug', primary_key: 'bug_id', api_key: 'bug' },
|
|
42
|
+
text_document_id : {
|
|
43
|
+
type_token : 'typeTextDocument',
|
|
44
|
+
primary_key: 'text_document_id',
|
|
45
|
+
api_key : 'text_document',
|
|
46
|
+
},
|
|
47
|
+
text_document_folder_id: {
|
|
48
|
+
type_token : 'typeTextDocumentFolder',
|
|
49
|
+
primary_key: 'text_document_folder_id',
|
|
50
|
+
api_key : 'text_document_folder',
|
|
51
|
+
},
|
|
52
|
+
execution_context_id : {
|
|
53
|
+
type_token : 'typeExecutionContext',
|
|
54
|
+
primary_key: 'execution_context_id',
|
|
55
|
+
api_key : 'execution_context',
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
structure_scheme = {
|
|
60
|
+
tag_relation_id: 'integer | require',
|
|
61
|
+
tag_id : 'integer | typeTag | require',
|
|
62
|
+
element_type : 'string | enum | require',
|
|
63
|
+
element_id : 'integer | require',
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
create_scheme = [
|
|
67
|
+
'tag_id',
|
|
68
|
+
'element_type',
|
|
69
|
+
'element_id',
|
|
70
|
+
];
|
|
71
|
+
|
|
72
|
+
available_enum_values = {
|
|
73
|
+
element_type: typeTagRelation.get_relation_type_values(),
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
enum_value_translate_matrix = typeTagRelation_i18n.enum_value_translate_matrix;
|
|
77
|
+
|
|
78
|
+
attribute_name_translate_matrix = typeTagRelation_i18n.attribute_name_translate_matrix;
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
static get_relation_type_values()
|
|
82
|
+
{
|
|
83
|
+
return Object.keys(typeTagRelation.relation_target_map);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
static get_relation_target_map()
|
|
88
|
+
{
|
|
89
|
+
return typeTagRelation.relation_target_map;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* @param {object|false|undefined} data
|
|
95
|
+
* @returns {typeTagRelation}
|
|
96
|
+
*/
|
|
97
|
+
constructor(data = false)
|
|
98
|
+
{
|
|
99
|
+
super();
|
|
100
|
+
|
|
101
|
+
if (data && is_object(data))
|
|
102
|
+
{
|
|
103
|
+
_.mapObject(data, (value, key) =>
|
|
104
|
+
{
|
|
105
|
+
if (this.hasOwnProperty(key))
|
|
106
|
+
{
|
|
107
|
+
this[ key ] = value;
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
return this;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* @returns {object|false}
|
|
118
|
+
*/
|
|
119
|
+
get_relation_target_meta()
|
|
120
|
+
{
|
|
121
|
+
return typeTagRelation.resolve_relation_target(this.element_type);
|
|
122
|
+
}
|
|
123
|
+
}
|