complexqa_frontend_core 2.2.1 → 2.2.3

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "complexqa_frontend_core",
3
- "version": "2.2.1",
3
+ "version": "2.2.3",
4
4
  "description": "core of web ",
5
5
  "type": "module",
6
6
  "exports": {
@@ -263,7 +263,8 @@ export class ApiAbstractClass
263
263
  api_response: api_response?.data?.api_response,
264
264
  api_code : api_response?.data?.api_code,
265
265
  api_result : api_response?.data?.api_result,
266
- api_error : api_response?.data?.api_error
266
+ api_error : api_response?.data?.api_error,
267
+ hint : api_response?.data?.hint
267
268
  };
268
269
 
269
270
  if (api_response?.data?.api_error?.adapted_message)
package/src/api/index.js CHANGED
@@ -38,6 +38,7 @@ import { TextDocumentApi } from "./text_document_api.js";
38
38
  import { PublicTextDocumentApi } from "./public_text_document_api.js";
39
39
  import { TextDocumentFolderApi } from "./text_document_folder_api.js";
40
40
  import { FileAppApi } from "./file_app_api.js";
41
+ import { McpKeyApi } from "./mcp_key_api.js";
41
42
  import { EventApi } from "./event_api.js";
42
43
  import { AutotestCaseApi } from "./autotest_case_api.js";
43
44
  import { AutotestSuiteApi } from "./autotest_suite_api.js";
@@ -213,6 +214,7 @@ export class Api
213
214
  this.team_domain = new TeamDomainApi(payload);
214
215
  this.url_inspect = new UrlInspectApi(payload);
215
216
  this.file_app = new FileAppApi(payload);
217
+ this.mcp_key = new McpKeyApi(payload);
216
218
  this.text_document = new TextDocumentApi(payload);
217
219
  this.text_document_folder = new TextDocumentFolderApi(payload);
218
220
  this.public_text_document = new PublicTextDocumentApi(payload);
@@ -0,0 +1,100 @@
1
+ import { ApiAbstractClass } from "./api_abstract_class.js";
2
+
3
+
4
+ /**
5
+ * Main App bridge → CQA_MCP key HTTP.
6
+ *
7
+ * POST /web_api/mcp_key/create|search|revoke|catalog|list_projects
8
+ *
9
+ * @version v.1.0 (28/09/2026)
10
+ */
11
+ export class McpKeyApi extends ApiAbstractClass
12
+ {
13
+ module_prefix = 'mcp_key';
14
+ api_prefix = 'web_api';
15
+
16
+
17
+ /**
18
+ * POST /web_api/mcp_key/create
19
+ *
20
+ * @param {object} payload team_id, project_id, grants
21
+ *
22
+ * @returns {Promise<{payload: object, response: object}>}
23
+ */
24
+ async create(payload)
25
+ {
26
+ return this._post('create', payload);
27
+ }
28
+
29
+
30
+ /**
31
+ * POST /web_api/mcp_key/search
32
+ *
33
+ * @param {object} payload пусто — свои ключи; team_id — ключи команды
34
+ *
35
+ * @returns {Promise<{payload: object, response: object}>}
36
+ */
37
+ async search(payload)
38
+ {
39
+ return this._post('search', payload);
40
+ }
41
+
42
+
43
+ /**
44
+ * POST /web_api/mcp_key/revoke
45
+ *
46
+ * @param {object} payload mcp_key_id
47
+ *
48
+ * @returns {Promise<{payload: object, response: object}>}
49
+ */
50
+ async revoke(payload)
51
+ {
52
+ return this._post('revoke', payload);
53
+ }
54
+
55
+
56
+ /**
57
+ * POST /web_api/mcp_key/catalog
58
+ *
59
+ * @param {object} payload
60
+ *
61
+ * @returns {Promise<{payload: object, response: object}>}
62
+ */
63
+ async catalog(payload)
64
+ {
65
+ return this._post('catalog', payload);
66
+ }
67
+
68
+
69
+ /**
70
+ * POST /web_api/mcp_key/list_projects
71
+ *
72
+ * @param {object} payload team_id
73
+ *
74
+ * @returns {Promise<{payload: object, response: object}>}
75
+ */
76
+ async list_projects(payload)
77
+ {
78
+ return this._post('list_projects', payload);
79
+ }
80
+
81
+
82
+ /**
83
+ * @param {string} action
84
+ * @param {object} payload
85
+ *
86
+ * @returns {Promise<{payload: object, response: object}>}
87
+ */
88
+ async _post(action, payload)
89
+ {
90
+ const url = `/${ this.api_prefix }/${ this.module_prefix }/${ action }`;
91
+ payload = this.handle_request_payload(payload);
92
+ let response = this.api_request(url, payload);
93
+ response = await this.handle_response(response, false);
94
+
95
+ return {
96
+ response: response,
97
+ payload : payload,
98
+ };
99
+ }
100
+ }
@@ -13,6 +13,7 @@ export class ApiException extends BaseException
13
13
  api_code = null;
14
14
  api_result = null;
15
15
  api_error = null;
16
+ hint = null;
16
17
 
17
18
 
18
19
  /**
@@ -43,6 +44,11 @@ export class ApiException extends BaseException
43
44
  {
44
45
  this.api_error = options?.api_error;
45
46
  }
47
+
48
+ if (options?.hint)
49
+ {
50
+ this.hint = options.hint;
51
+ }
46
52
  }
47
53
 
48
54
  }
@@ -16,6 +16,8 @@ export class typeProject extends familyGeneralElement
16
16
  project_description; // some comment
17
17
  project_status; // enum
18
18
  team_id; // foreign key + owner
19
+ summary; // options.add = summary, не колонка projects
20
+ autotest_manual_test_coverage; // options.add = autotest_manual_test_coverage, не колонка projects
19
21
  reference_document_ids; // IDS документов по функционалу (к примеру confluence)
20
22
  // хосты/домены будут отдельно храниться, их может быть множество
21
23
 
@@ -35,14 +37,14 @@ export class typeProject extends familyGeneralElement
35
37
  'project_name'
36
38
  ];
37
39
 
38
- /** @type {Record<string, string[]>} */
40
+ /** @type {Record<string, string[]>} */
39
41
  available_enum_values = {
40
42
  project_status: [ 'OPEN', 'CLOSED' ]
41
43
  };
42
44
 
43
45
  enum_value_translate_matrix = typeProject_i18n.enum_value_translate_matrix;
44
46
 
45
- /** @type {Record<string, string>} */
47
+ /** @type {Record<string, string>} */
46
48
  status_color = {
47
49
  OPEN : '#009688',
48
50
  CLOSED : '#E0E0E0',
@@ -73,6 +73,7 @@ export class Api {
73
73
  team_domain: TeamDomainApi;
74
74
  url_inspect: UrlInspectApi;
75
75
  file_app: FileAppApi;
76
+ mcp_key: McpKeyApi;
76
77
  text_document: TextDocumentApi;
77
78
  text_document_folder: TextDocumentFolderApi;
78
79
  public_text_document: PublicTextDocumentApi;
@@ -140,6 +141,7 @@ import { BrowserToolsScreenshotMultiApi } from "./util/browser_tools_screenshot_
140
141
  import { TeamDomainApi } from "./team_domain_api.js";
141
142
  import { UrlInspectApi } from "./util/url_inspect_api.js";
142
143
  import { FileAppApi } from "./file_app_api.js";
144
+ import { McpKeyApi } from "./mcp_key_api.js";
143
145
  import { TextDocumentApi } from "./text_document_api.js";
144
146
  import { TextDocumentFolderApi } from "./text_document_folder_api.js";
145
147
  import { PublicTextDocumentApi } from "./public_text_document_api.js";
@@ -0,0 +1,76 @@
1
+ /**
2
+ * Main App bridge → CQA_MCP key HTTP.
3
+ *
4
+ * POST /web_api/mcp_key/create|search|revoke|catalog|list_projects
5
+ *
6
+ * @version v.1.0 (28/09/2026)
7
+ */
8
+ export class McpKeyApi extends ApiAbstractClass {
9
+ module_prefix: string;
10
+ /**
11
+ * POST /web_api/mcp_key/create
12
+ *
13
+ * @param {object} payload team_id, project_id, grants
14
+ *
15
+ * @returns {Promise<{payload: object, response: object}>}
16
+ */
17
+ create(payload: object): Promise<{
18
+ payload: object;
19
+ response: object;
20
+ }>;
21
+ /**
22
+ * POST /web_api/mcp_key/search
23
+ *
24
+ * @param {object} payload пусто — свои ключи; team_id — ключи команды
25
+ *
26
+ * @returns {Promise<{payload: object, response: object}>}
27
+ */
28
+ search(payload: object): Promise<{
29
+ payload: object;
30
+ response: object;
31
+ }>;
32
+ /**
33
+ * POST /web_api/mcp_key/revoke
34
+ *
35
+ * @param {object} payload mcp_key_id
36
+ *
37
+ * @returns {Promise<{payload: object, response: object}>}
38
+ */
39
+ revoke(payload: object): Promise<{
40
+ payload: object;
41
+ response: object;
42
+ }>;
43
+ /**
44
+ * POST /web_api/mcp_key/catalog
45
+ *
46
+ * @param {object} payload
47
+ *
48
+ * @returns {Promise<{payload: object, response: object}>}
49
+ */
50
+ catalog(payload: object): Promise<{
51
+ payload: object;
52
+ response: object;
53
+ }>;
54
+ /**
55
+ * POST /web_api/mcp_key/list_projects
56
+ *
57
+ * @param {object} payload team_id
58
+ *
59
+ * @returns {Promise<{payload: object, response: object}>}
60
+ */
61
+ list_projects(payload: object): Promise<{
62
+ payload: object;
63
+ response: object;
64
+ }>;
65
+ /**
66
+ * @param {string} action
67
+ * @param {object} payload
68
+ *
69
+ * @returns {Promise<{payload: object, response: object}>}
70
+ */
71
+ _post(action: string, payload: object): Promise<{
72
+ payload: object;
73
+ response: object;
74
+ }>;
75
+ }
76
+ import { ApiAbstractClass } from "./api_abstract_class.js";
@@ -12,5 +12,6 @@ export class ApiException extends BaseException {
12
12
  api_code: any;
13
13
  api_result: any;
14
14
  api_error: any;
15
+ hint: any;
15
16
  }
16
17
  import { BaseException } from './0_BaseException.js';