@wshcmx/types 11.0.0-rc.1 → 11.0.9
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/VERSIONING.md +12 -0
- package/lib/core/index.d.ts +10 -4
- package/lib/env/index.d.ts +3 -0
- package/lib/eslint.config.js +3 -2
- package/lib/http_request/index.d.ts +6 -0
- package/lib/screen/index.d.ts +1 -1
- package/lib/thread/index.d.ts +11 -0
- package/lib/tools/index.d.ts +1 -1
- package/lib/tools_web/index.d.ts +211 -126
- package/lib/xml/remote_action/index.d.ts +6 -1
- package/package.json +1 -1
- package/scripts/check-version.sh +0 -3
package/VERSIONING.md
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Версионирование типов
|
|
2
|
+
|
|
3
|
+
## Мажорная версия
|
|
4
|
+
Является индикатором глобальных изменений в типах:
|
|
5
|
+
- обновление типов из новой версии коробки;
|
|
6
|
+
- глобальные изменения структуры типов;
|
|
7
|
+
|
|
8
|
+
## Минорная версия
|
|
9
|
+
Является обычным регулярным релизом, содержащим набор изменений, которые были накоплены с предыдущего релиза.
|
|
10
|
+
|
|
11
|
+
## Патч версия
|
|
12
|
+
Версионирование в рамках PR
|
package/lib/core/index.d.ts
CHANGED
|
@@ -2219,7 +2219,7 @@ declare function DeleteUrl(url: string): undefined;
|
|
|
2219
2219
|
* AbsoluteUrl("zz/1.htm") == "x-app://rcr/zz/1.htm" // вызванный в библиотеке x-app://rcr/rcr_lib_recruit.js
|
|
2220
2220
|
* ```
|
|
2221
2221
|
*/
|
|
2222
|
-
declare function AbsoluteUrl(url: string, baseUrl
|
|
2222
|
+
declare function AbsoluteUrl(url: string, baseUrl?: string): string;
|
|
2223
2223
|
|
|
2224
2224
|
/**
|
|
2225
2225
|
* Преобразует заданный url (схемы "x-app") в url, пригодный для использования во встроенном браузере (элемент HYPER).
|
|
@@ -2388,10 +2388,10 @@ declare function UrlQuery(url: string): Object;
|
|
|
2388
2388
|
/**
|
|
2389
2389
|
* Возвращает схему URL (file, http, mailto, ftp, x-local).
|
|
2390
2390
|
* @param {string} url - Url.
|
|
2391
|
-
* @returns {string}
|
|
2392
|
-
* UrlSchema(
|
|
2391
|
+
* @returns {string} - Результат.
|
|
2392
|
+
* @example UrlSchema("http://news.websoft.ru/"); // http
|
|
2393
2393
|
*/
|
|
2394
|
-
declare function
|
|
2394
|
+
declare function UrlSchema(url: string): string;
|
|
2395
2395
|
|
|
2396
2396
|
/**
|
|
2397
2397
|
* Функция UrlOrFilePathToFilePath() проверяет, является ли строка урлом либо путем в файловой системе.
|
|
@@ -4374,6 +4374,12 @@ declare function EvalRichCodePageUrl(): unknown;
|
|
|
4374
4374
|
*/
|
|
4375
4375
|
declare function FetchAppModule(moduleName: string): undefined;
|
|
4376
4376
|
|
|
4377
|
+
/**
|
|
4378
|
+
* Возвращает количество потребляемой процессом памяти в байтах
|
|
4379
|
+
* @returns {number} Результат
|
|
4380
|
+
*/
|
|
4381
|
+
declare function GetCurProcessUsedMemorySize(): number;
|
|
4382
|
+
|
|
4377
4383
|
/**
|
|
4378
4384
|
* Редко используемая фукнция.
|
|
4379
4385
|
* @returns {unknown} -
|
package/lib/env/index.d.ts
CHANGED
|
@@ -2,7 +2,10 @@ interface Env extends Object {
|
|
|
2
2
|
curWebDesignID: number;
|
|
3
3
|
curWebDesignUrl: string;
|
|
4
4
|
curLngID: string;
|
|
5
|
+
curLng: unknown;
|
|
6
|
+
curLngWeb: unknown;
|
|
5
7
|
curSiteID: number;
|
|
8
|
+
curSite: SiteDocumentTopElem;
|
|
6
9
|
curHostID: number;
|
|
7
10
|
curHostSettings: {
|
|
8
11
|
default_web_design: string;
|
package/lib/eslint.config.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import eslint from
|
|
2
|
-
import tseslint from
|
|
1
|
+
import eslint from "@eslint/js";
|
|
2
|
+
import tseslint from "typescript-eslint";
|
|
3
3
|
import jsdoc from "eslint-plugin-jsdoc";
|
|
4
4
|
|
|
5
5
|
export default tseslint.config(
|
|
@@ -10,6 +10,7 @@ export default tseslint.config(
|
|
|
10
10
|
"jsdoc": jsdoc
|
|
11
11
|
},
|
|
12
12
|
rules: {
|
|
13
|
+
"quotes": ["error", "double"],
|
|
13
14
|
"@typescript-eslint/no-wrapper-object-types": "off",
|
|
14
15
|
"jsdoc/check-alignment": "error",
|
|
15
16
|
"jsdoc/check-indentation": "error",
|
|
@@ -116,6 +116,12 @@ interface Request {
|
|
|
116
116
|
*/
|
|
117
117
|
Session: Session;
|
|
118
118
|
|
|
119
|
+
/**
|
|
120
|
+
* Возвращает время начала запроса в миллисекундах, прошедшее с момента запуска операционной системы.
|
|
121
|
+
* @example alert(GetCurTicks() - Request.StartTicks)
|
|
122
|
+
*/
|
|
123
|
+
StartTicks: number;
|
|
124
|
+
|
|
119
125
|
/**
|
|
120
126
|
* Возвращает запрашиваемый url текущего HTTP-запроса.
|
|
121
127
|
*/
|
package/lib/screen/index.d.ts
CHANGED
|
@@ -51,7 +51,7 @@ declare namespace Screen {
|
|
|
51
51
|
* );
|
|
52
52
|
* ```
|
|
53
53
|
*/
|
|
54
|
-
function MsgBox(message: string, subject?: string, type?: "error" | "
|
|
54
|
+
function MsgBox(message: string, subject?: string, type?: "error" | "question" | "info", titles?: string): boolean;
|
|
55
55
|
|
|
56
56
|
function Navigate(): void;
|
|
57
57
|
function Print(): void;
|
package/lib/thread/index.d.ts
CHANGED
|
@@ -34,6 +34,17 @@ interface Thread {
|
|
|
34
34
|
* ```
|
|
35
35
|
*/
|
|
36
36
|
EvalCodeUrl(url: string): unknown;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Запускает в потоке указанный код после завершения выполнения кода, запущенного методом {@link EvalCode}
|
|
40
|
+
* @example
|
|
41
|
+
* ```
|
|
42
|
+
* const thread = new Thread;
|
|
43
|
+
* thread.EvalCode("lib_backup.run_backup()");
|
|
44
|
+
* thread.SetPostCode("if ((tools.sys_db_capability & tools.UNI_CAP_BASIC) != 0) tools.spxml_unibridge.Object.provider.CleanUpThreadResources()");
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
SetPostCode(code: string): void;
|
|
37
48
|
}
|
|
38
49
|
|
|
39
50
|
interface ThreadConstructor {
|
package/lib/tools/index.d.ts
CHANGED
|
@@ -2306,7 +2306,7 @@ declare namespace tools {
|
|
|
2306
2306
|
* @param {object} [params] -
|
|
2307
2307
|
* @returns {XmlDocument} Каталожная запись руководителя указанного объекта.
|
|
2308
2308
|
*/
|
|
2309
|
-
function get_uni_user_boss(objectParam: number | XmlTopElem, params?: Object):
|
|
2309
|
+
function get_uni_user_boss(objectParam: number | XmlTopElem, params?: Object): CollaboratorDocument;
|
|
2310
2310
|
|
|
2311
2311
|
/**
|
|
2312
2312
|
* Вызов эскалации по документообороту.
|
package/lib/tools_web/index.d.ts
CHANGED
|
@@ -37,79 +37,96 @@ declare namespace tools_web {
|
|
|
37
37
|
*/
|
|
38
38
|
function get_sum_sid(id: string, sessionId: number): number;
|
|
39
39
|
|
|
40
|
-
function check_sum_sid(id: string, sum: string, sessionId: number):
|
|
40
|
+
function check_sum_sid(id: string, sum: string, sessionId: number): boolean;
|
|
41
41
|
|
|
42
|
-
function custom_elems_filling(fldTarget: unknown, source: Object, arrCustomElems: unknown[], params: Object):
|
|
42
|
+
function custom_elems_filling(fldTarget: unknown, source: Object, arrCustomElems: null | unknown[], params: Object): {
|
|
43
|
+
error: 0 | 1;
|
|
44
|
+
error_text: string;
|
|
45
|
+
title: string;
|
|
46
|
+
mandatory_fields: unknown[];
|
|
47
|
+
condition_fields: unknown[]
|
|
48
|
+
};
|
|
43
49
|
|
|
44
|
-
function web_custom_elems_filling(catalog:
|
|
50
|
+
function web_custom_elems_filling(catalog: string, topId: number, source: unknown, requestForm: unknown, valueFlag?: boolean, charset?: string, arrFields?: null | unknown[]): true | ReturnType<typeof custom_elems_filling>;
|
|
45
51
|
|
|
46
|
-
function update_object_from_context(object:
|
|
52
|
+
function update_object_from_context(object: XmlDocument, context: Object, arrFieldNames: unknown[], prefix: string): void;
|
|
47
53
|
|
|
48
|
-
function get_query_string_from_url(url: string, flag:
|
|
54
|
+
function get_query_string_from_url(url: string, flag: boolean, params: string | string[]): string;
|
|
49
55
|
|
|
50
|
-
function get_query_string(flag:
|
|
56
|
+
function get_query_string(flag: boolean, params: unknown): ReturnType<typeof get_query_string_from_url>;
|
|
51
57
|
|
|
52
|
-
function get_url_protocol(url: string):
|
|
58
|
+
function get_url_protocol(url: string): string;
|
|
53
59
|
|
|
54
|
-
function set_url_protocol(url: string):
|
|
60
|
+
function set_url_protocol(url: string): string;
|
|
55
61
|
|
|
56
62
|
function get_cur_lng_name(text: string, shortId: string): string;
|
|
57
63
|
|
|
58
|
-
function check_access(source:
|
|
64
|
+
function check_access(source: XmlTopElem, personDocId: number, personDoc?: CollaboratorDocumentTopElem, session?: Session): boolean;
|
|
59
65
|
|
|
60
|
-
function get_web_param(listParamsTarget: unknown, paramName: string, defaultValue: string, emptyFlag: boolean, overrideWebTemplateId: string):
|
|
66
|
+
function get_web_param(listParamsTarget: unknown, paramName: string, defaultValue: string, emptyFlag: boolean, overrideWebTemplateId: string): string;
|
|
61
67
|
|
|
62
|
-
function set_web_params(listParamsTarget: unknown, listWvars: unknown, rewriteFlag: boolean, overrideWebTemplateId: number):
|
|
68
|
+
function set_web_params(listParamsTarget: unknown, listWvars: unknown, rewriteFlag: boolean, overrideWebTemplateId: number): void;
|
|
63
69
|
|
|
64
|
-
function write_custom_web_template(customWebTemplate: Object):
|
|
70
|
+
function write_custom_web_template(customWebTemplate: Object): true;
|
|
65
71
|
|
|
66
|
-
function get_override_web_template(overrideWebTemplateId: number, session: Session, curUserId: number, curUser: CurUser, curAnonymousAccess: unknown, activeWebTemplateTopElem: XmlTopElem, adding: boolean):
|
|
72
|
+
function get_override_web_template(overrideWebTemplateId: number, session: Session, curUserId: number, curUser: CurUser, curAnonymousAccess: unknown, activeWebTemplateTopElem: XmlTopElem, adding: boolean): OverrideWebTemplateDocument | undefined;
|
|
67
73
|
|
|
68
|
-
function get_override_web_templates(session: Session, zone: Object, curActiveWebTemplate: unknown, addWebTemplate: boolean, envObj: Object):
|
|
74
|
+
function get_override_web_templates(session: Session, zone: Object, curActiveWebTemplate: unknown, addWebTemplate: boolean, envObj: Object): OverrideWebTemplateDocument[];
|
|
69
75
|
|
|
70
|
-
function place_zone(zone: string, createFCache
|
|
76
|
+
function place_zone(zone: string, createFCache?: boolean, lpePreview?: boolean): string;
|
|
71
77
|
|
|
72
|
-
function place_override_web_template(overrideWebTemplateId: number, insertCustomCodeParams
|
|
78
|
+
function place_override_web_template(overrideWebTemplateId: number, insertCustomCodeParams?: Object): ReturnType<typeof insert_custom_code>;
|
|
73
79
|
|
|
74
|
-
function get_operation_script(
|
|
80
|
+
function get_operation_script(operationId: number, scriptType: string, params?: Object): string;
|
|
75
81
|
|
|
76
|
-
function eval_operation_script(
|
|
82
|
+
function eval_operation_script(operationId: number, scriptType: string, params: Object): unknown;
|
|
77
83
|
|
|
78
|
-
function is_moderator_forum(forumId: number, userId: number, forumTopElem
|
|
84
|
+
function is_moderator_forum(forumId: number, userId: number, forumTopElem?: ForumDocumentTopElem): boolean;
|
|
79
85
|
|
|
80
|
-
function is_privilege_collaborator(forumEntryId: number, userTopElem:
|
|
86
|
+
function is_privilege_collaborator(forumEntryId: number, userTopElem: CollaboratorDocumentTopElem, userId: number, forumEntryTopElem?: ForumEntryDocumentTopElem): boolean;
|
|
81
87
|
|
|
82
|
-
function is_forum_readed(forumId: number, userId: number):
|
|
88
|
+
function is_forum_readed(forumId: number, userId: number): boolean;
|
|
83
89
|
|
|
84
|
-
function check_forum_entry_access(
|
|
90
|
+
function check_forum_entry_access(formEntryTopElem: ForumEntryDocumentTopElem, userTopElem: CollaboratorDocumentTopElem, userId: number, forumTopElem?: ForumDocumentTopElem): ReturnType<typeof is_moderator_forum>;
|
|
85
91
|
|
|
86
|
-
function remove_forum_entry(forumEntryId: number):
|
|
92
|
+
function remove_forum_entry(forumEntryId: number): boolean;
|
|
87
93
|
|
|
88
|
-
function close_forum_entry(forumEntryId: number,
|
|
94
|
+
function close_forum_entry(forumEntryId: number, forumEntryTopElem?: ForumEntryDocumentTopElem): boolean;
|
|
89
95
|
|
|
90
|
-
function draw_calendar(objectName:
|
|
96
|
+
function draw_calendar(objectName: string, objectValue: unknown, format: string): string;
|
|
91
97
|
|
|
92
|
-
function web_files_process(sourceFiles
|
|
98
|
+
function web_files_process(sourceFiles?: XmlDocument): void;
|
|
93
99
|
|
|
94
|
-
function convert_xhttp_res(textArea:
|
|
100
|
+
function convert_xhttp_res(textArea: string, sourceDesc: string): string;
|
|
95
101
|
|
|
96
|
-
function get_my_person_object_link_card(
|
|
102
|
+
function get_my_person_object_link_card(catalog?: string, userId?: number, docHimself?: boolean, makeNewOnAbsence?: boolean): undefined | PersonObjectLinkDocument | PersonObjectLinkDocumentTopElem;
|
|
97
103
|
|
|
98
|
-
function get_person_object_info(catalog: string, userId: number, userTopElem
|
|
104
|
+
function get_person_object_info(catalog: string, userId: number, userTopElem?: CollaboratorDocumentTopElem): {
|
|
105
|
+
can_create: boolean;
|
|
106
|
+
can_edit: boolean;
|
|
107
|
+
can_delete: boolean;
|
|
108
|
+
max_amount: null | number;
|
|
109
|
+
max_total_size: null | number;
|
|
110
|
+
max_object_size: null | number;
|
|
111
|
+
};
|
|
99
112
|
|
|
100
|
-
function set_person_object_info(catalog: string, userId: number, userTopElem:
|
|
113
|
+
function set_person_object_info(catalog: string, userId: number, userTopElem: CollaboratorDocumentTopElem | null, objectsMeta: unknown[]): void;
|
|
101
114
|
|
|
102
|
-
function get_object_owners(objectId: number, catalog: string):
|
|
115
|
+
function get_object_owners(objectId: number, catalog: string): {
|
|
116
|
+
person_id: number;
|
|
117
|
+
can_edit: boolean;
|
|
118
|
+
can_delete: boolean;
|
|
119
|
+
}[];
|
|
103
120
|
|
|
104
|
-
function insert_custom_code(customWebTemplateId: number, customWebTemplateTopElem:
|
|
121
|
+
function insert_custom_code(customWebTemplateId: number, customWebTemplateTopElem: CustomWebTemplateDocumentTopElem | null, eval: boolean, naked: boolean, depth: number, ofFldNativeParamsArr: unknown[] | undefined, externalEnvelope: boolean): string;
|
|
105
122
|
|
|
106
|
-
function place_xaml(customWebTemplateId: number,
|
|
123
|
+
function place_xaml(customWebTemplateId: number, customWebTemplateTopElem?: CustomWebTemplateDocumentTopElem, placeXamlParams?: Object): ReturnType<typeof insert_custom_code>;
|
|
107
124
|
|
|
108
|
-
function place_xaml_player(customWebTemplate: number, curWebDesign:
|
|
125
|
+
function place_xaml_player(customWebTemplate: number, curWebDesign: WebDesignDocumentTopElem, request: Request, placeXamlParams: Object): unknown;
|
|
109
126
|
|
|
110
127
|
function convert_xss(text: string, type?: string): string;
|
|
111
128
|
|
|
112
|
-
function xss_neutralize(text: string):
|
|
129
|
+
function xss_neutralize(text: string): string;
|
|
113
130
|
|
|
114
131
|
/**
|
|
115
132
|
* Возврат экземпляра библиотеки regexp
|
|
@@ -120,37 +137,78 @@ declare namespace tools_web {
|
|
|
120
137
|
*/
|
|
121
138
|
function reg_exp_init(): Websoft.RegExp.RegExp;
|
|
122
139
|
|
|
123
|
-
function convert_bbcode_to_html(messageSource: string, objRegExp
|
|
124
|
-
|
|
125
|
-
function convert_html_to_bbcode(messageSource: string, objRegExp: unknown): string;
|
|
126
|
-
|
|
127
|
-
function convert_bbtags_to_html(messageSource: string, objRegExp: unknown): unknown;
|
|
140
|
+
function convert_bbcode_to_html(messageSource: string, objRegExp?: Websoft.RegExp.RegExp): string;
|
|
128
141
|
|
|
129
|
-
function
|
|
142
|
+
function convert_html_to_bbcode(messageSource: string, objRegExp?: Websoft.RegExp.RegExp): string;
|
|
130
143
|
|
|
131
|
-
function
|
|
144
|
+
function convert_bbtags_to_html(messageSource: string, objRegExp?: Websoft.RegExp.RegExp): string;
|
|
132
145
|
|
|
133
|
-
function
|
|
146
|
+
function get_bbcode_tag_ids(messageSource: string, objRegExp?: Websoft.RegExp.RegExp): Object;
|
|
134
147
|
|
|
135
|
-
function
|
|
148
|
+
function clear_bbcode_from_html(messageSource: string, objRegExp?: Websoft.RegExp.RegExp): string;
|
|
136
149
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
function
|
|
150
|
+
/**
|
|
151
|
+
* Cоздание новой заявки на основе входных параметров объекта Request.
|
|
152
|
+
* @returns {RequestDocumentTopElem} Новый объект заявки.
|
|
153
|
+
*/
|
|
154
|
+
function get_new_request_by_query(): RequestDocumentTopElem;
|
|
155
|
+
|
|
156
|
+
function update_community_authors(objectId: number, vAuthors: number | number[], nbDelete?: boolean): true;
|
|
157
|
+
|
|
158
|
+
function evaluate_remote_action(vRemoteActionDoc: number | RemoteActionCatalogDocumentTopElem, request: Request): ReturnType<RemoteActionDocumentTopElem["evaluate"]>;
|
|
159
|
+
|
|
160
|
+
function Unsqueeze(txt: string, idx: number): string;
|
|
161
|
+
|
|
162
|
+
function get_collection_param(): {
|
|
163
|
+
catalog_name: string;
|
|
164
|
+
xquery_qual: string;
|
|
165
|
+
view_type: string;
|
|
166
|
+
external_eval: string;
|
|
167
|
+
check_access: boolean;
|
|
168
|
+
open_doc : boolean;
|
|
169
|
+
disp_array: boolean;
|
|
170
|
+
array: string;
|
|
171
|
+
array_selected: string;
|
|
172
|
+
list_columns: string;
|
|
173
|
+
list_headers: string;
|
|
174
|
+
col_headers: string;
|
|
175
|
+
col_cells: string;
|
|
176
|
+
disp_sort: boolean;
|
|
177
|
+
sort_index: null;
|
|
178
|
+
sort_direct: string;
|
|
179
|
+
disp_link: string;
|
|
180
|
+
link_field_index: number;
|
|
181
|
+
link_object_field: string;
|
|
182
|
+
link_action: string;
|
|
183
|
+
link_mode: string;
|
|
184
|
+
link_prop: string;
|
|
185
|
+
disp_check_box: boolean;
|
|
186
|
+
is_data_grid: boolean;
|
|
187
|
+
filter_id: string;
|
|
188
|
+
filter_conditions: string;
|
|
189
|
+
search: string;
|
|
190
|
+
};
|
|
142
191
|
|
|
143
|
-
function external_eval(command: string, params: Object, env:
|
|
192
|
+
function external_eval(command: string, params: Object, env: Env): unknown;
|
|
144
193
|
|
|
145
|
-
function env_to_script(env:
|
|
194
|
+
function env_to_script(env: Env): string;
|
|
146
195
|
|
|
147
|
-
function object_init(sessionTarget:
|
|
196
|
+
function object_init(sessionTarget: Request["Session"], query: Request["Query"], objectEnvSave: boolean): Env;
|
|
148
197
|
|
|
149
|
-
function get_column_width(type: string, mode: string):
|
|
198
|
+
function get_column_width(type: string, mode: string): string;
|
|
150
199
|
|
|
151
|
-
function get_catalog_list_arrays(collection:
|
|
200
|
+
function get_catalog_list_arrays(collection: ReturnType<typeof get_collection_param>, env: Env, envLngCommon: Env["curLngWeb"]): {
|
|
201
|
+
arrData: unknown[];
|
|
202
|
+
arrColumns: unknown[];
|
|
203
|
+
arrHeaders: unknown[];
|
|
204
|
+
iDataTotalCount: number;
|
|
205
|
+
iDispFieldIndex: number;
|
|
206
|
+
iLinkFieldIndex: number;
|
|
207
|
+
sSortDataFieldName: string;
|
|
208
|
+
sQuery: string;
|
|
209
|
+
};
|
|
152
210
|
|
|
153
|
-
function check_session_user(request:
|
|
211
|
+
function check_session_user(request: Request, userId: number): boolean;
|
|
154
212
|
|
|
155
213
|
/**
|
|
156
214
|
* Возвращает значение true/false в завимости от передаваемого параметра.
|
|
@@ -159,19 +217,19 @@ declare namespace tools_web {
|
|
|
159
217
|
*/
|
|
160
218
|
function is_true(o: unknown): boolean;
|
|
161
219
|
|
|
162
|
-
function init_cur_active_web_template(env:
|
|
220
|
+
function init_cur_active_web_template(env: Env, create: boolean): ActiveWebTemplateDocument;
|
|
163
221
|
|
|
164
|
-
function save_cur_active_web_template(activeWebTemplateDocTopElem:
|
|
222
|
+
function save_cur_active_web_template(activeWebTemplateDocTopElem: ActiveWebTemplateDocument, finishSave: boolean): boolean;
|
|
165
223
|
|
|
166
|
-
function drop_active_web_templates():
|
|
224
|
+
function drop_active_web_templates(): number;
|
|
167
225
|
|
|
168
226
|
function get_session_lng(session: Session): unknown;
|
|
169
227
|
|
|
170
|
-
function check_site_access(personTopElem:
|
|
228
|
+
function check_site_access(personTopElem: CollaboratorDocument, site: SiteDocumentTopElem | number): boolean;
|
|
171
229
|
|
|
172
|
-
function get_resource_url(objectId: number, session: Session):
|
|
230
|
+
function get_resource_url(objectId: number, session: Session): ReturnType<typeof get_object_source_url>;
|
|
173
231
|
|
|
174
|
-
function get_custom_web_template_url(templateId: number):
|
|
232
|
+
function get_custom_web_template_url(templateId: number): ReturnType<typeof get_object_source_url>;
|
|
175
233
|
|
|
176
234
|
/**
|
|
177
235
|
* Получение url ссылки объекта по Id.
|
|
@@ -180,21 +238,34 @@ declare namespace tools_web {
|
|
|
180
238
|
* @param {unknown} params - Параметры для определения хоста/сессии/etc.
|
|
181
239
|
* @returns {string} Url.
|
|
182
240
|
*/
|
|
183
|
-
function get_object_source_url(catalogType: string, objectId: number, params
|
|
184
|
-
|
|
185
|
-
function GetTalentPoolObjectsList(personId: number, addFuncSubordinates: boolean,
|
|
186
|
-
|
|
187
|
-
function GetRequiredQualificationsList(personId: number, searchList: string, catalogList
|
|
188
|
-
|
|
189
|
-
|
|
241
|
+
function get_object_source_url(catalogType: string, objectId: number, params?: Object | string): string;
|
|
242
|
+
|
|
243
|
+
function GetTalentPoolObjectsList(personId: number, addFuncSubordinates: boolean, hideDissmissed: boolean, vBossType: unknown, careerReserveType: number): PersonnelReserveCatalogDocumentTopElem[];
|
|
244
|
+
|
|
245
|
+
function GetRequiredQualificationsList(personId: number, searchList: string, catalogList?: boolean): {
|
|
246
|
+
id: number;
|
|
247
|
+
name: string;
|
|
248
|
+
status: string;
|
|
249
|
+
expiration_date: Date;
|
|
250
|
+
base: string;
|
|
251
|
+
}[];
|
|
252
|
+
|
|
253
|
+
function get_recommended_materials(personId: number, searchList: string, catalogList?: boolean, rootId?: number): {
|
|
254
|
+
id: number;
|
|
255
|
+
name: string;
|
|
256
|
+
status: string;
|
|
257
|
+
section_id: string;
|
|
258
|
+
last_viewing_date: Date;
|
|
259
|
+
base: string;
|
|
260
|
+
}[];
|
|
190
261
|
|
|
191
262
|
function set_var_eval(varNama: string, curVars: unknown, eval: Object, evalType: string): unknown;
|
|
192
263
|
|
|
193
|
-
function get_var_eval(varNama: string, curVars: unknown, eval: Object, evalType: string):
|
|
264
|
+
function get_var_eval(varNama: string, curVars: unknown, eval: Object, evalType: string): ReturnType<typeof set_var_eval>;
|
|
194
265
|
|
|
195
|
-
function convert_desc_to_html(desc: string):
|
|
266
|
+
function convert_desc_to_html(desc: string): string;
|
|
196
267
|
|
|
197
|
-
function get_user_recommended_learning(userId: number, userTopElem
|
|
268
|
+
function get_user_recommended_learning(userId: number, userTopElem?: CollaboratorDocumentTopElem): unknown;
|
|
198
269
|
|
|
199
270
|
/**
|
|
200
271
|
* Создание кэша по коду.
|
|
@@ -204,50 +275,53 @@ declare namespace tools_web {
|
|
|
204
275
|
* @param {string} listName - Данные.
|
|
205
276
|
* @returns {unknown} -
|
|
206
277
|
*/
|
|
207
|
-
function set_user_data(conditions: string, value: unknown, duration: number, listName?: string):
|
|
278
|
+
function set_user_data(conditions: string, value: unknown, duration: number, listName?: string): true;
|
|
208
279
|
|
|
209
280
|
/**
|
|
210
281
|
* Получение кэша по коду.
|
|
211
282
|
* @param {string} conditions - Код кэша.
|
|
212
283
|
* @returns {T | null} Значение кэша.
|
|
213
284
|
*/
|
|
214
|
-
function get_user_data<T>(conditions: string): T | null;
|
|
285
|
+
function get_user_data<T>(conditions: unknown[] | string): T | null;
|
|
215
286
|
|
|
216
|
-
function remove_user_data(key: string, listName
|
|
287
|
+
function remove_user_data(key: string, listName?: string): boolean;
|
|
217
288
|
|
|
218
|
-
function remove_user_data_by_prefix(key: string):
|
|
289
|
+
function remove_user_data_by_prefix(key: string): true;
|
|
219
290
|
|
|
220
|
-
function obtain_text_area(docId: number, docTargetTopElem: XmlTopElem):
|
|
291
|
+
function obtain_text_area(docId: number, docTargetTopElem: XmlTopElem): XmlTopElem;
|
|
221
292
|
|
|
222
293
|
function get_host_name(url: string): string;
|
|
223
294
|
|
|
224
|
-
function get_cur_host_name(hostTopElem: XmlTopElem, request:
|
|
295
|
+
function get_cur_host_name(hostTopElem: XmlTopElem, request: Request): string;
|
|
225
296
|
|
|
226
|
-
function get_cur_host_path(hostTopElem: XmlTopElem, request:
|
|
297
|
+
function get_cur_host_path(hostTopElem: XmlTopElem, request: Request): ReturnType<typeof get_cur_host_path_by_url>;
|
|
227
298
|
|
|
228
|
-
function get_cur_host_path_by_url(hostTopElem: XmlTopElem, url: string):
|
|
299
|
+
function get_cur_host_path_by_url(hostTopElem: XmlTopElem, url: string): string;
|
|
229
300
|
|
|
230
|
-
function get_cur_hosts(request: Object):
|
|
301
|
+
function get_cur_hosts(request: Object): HostCatalogDocumentTopElem[];
|
|
231
302
|
|
|
232
|
-
function get_cur_host(request: Object):
|
|
303
|
+
function get_cur_host(request: Object): HostDocumentTopElem | null;
|
|
233
304
|
|
|
234
|
-
function is_correct_question(fldquestion: unknown, itemTopElem: XmlTopElem):
|
|
305
|
+
function is_correct_question(fldquestion: unknown, itemTopElem: XmlTopElem): number | boolean | null;
|
|
235
306
|
|
|
236
|
-
function save_cur_object_doc(object:
|
|
307
|
+
function save_cur_object_doc(object: XmlDocument, env: Env): void;
|
|
237
308
|
|
|
238
|
-
function build_query_url(url: string, hostAndPath: string):
|
|
309
|
+
function build_query_url(url: string, hostAndPath: string): string;
|
|
239
310
|
|
|
240
|
-
function build_relative_url(url: string):
|
|
311
|
+
function build_relative_url(url: string): string;
|
|
241
312
|
|
|
242
|
-
function set_modified_response_status(requestTarget:
|
|
313
|
+
function set_modified_response_status(requestTarget: Request, url: string, dtLastModified?: Date): {
|
|
314
|
+
FilePathExists: boolean | null;
|
|
315
|
+
ResponseStatus: number;
|
|
316
|
+
};
|
|
243
317
|
|
|
244
|
-
function str_utc_mime_date(
|
|
318
|
+
function str_utc_mime_date(date: Date): string;
|
|
245
319
|
|
|
246
|
-
function get_tracking_url(fldLocation:
|
|
320
|
+
function get_tracking_url(fldLocation: ExchangeListsBase["locations"], curHostPath: string): string;
|
|
247
321
|
|
|
248
|
-
function create_resource_from_attacment(attachment: Object, personId: number, personTopElem: XmlTopElem):
|
|
322
|
+
function create_resource_from_attacment(attachment: Object, personId: number, personTopElem: XmlTopElem): ResourceDocument;
|
|
249
323
|
|
|
250
|
-
function get_key_positions_list(personId: number, struct: Object): unknown;
|
|
324
|
+
function get_key_positions_list(personId: number, struct: Object): unknown[];
|
|
251
325
|
|
|
252
326
|
/**
|
|
253
327
|
* Формирует content-type из Url файла.
|
|
@@ -279,9 +353,9 @@ declare namespace tools_web {
|
|
|
279
353
|
|
|
280
354
|
function decrypt_launch_id(launchId: string): unknown;
|
|
281
355
|
|
|
282
|
-
function get_valid_url(url: string):
|
|
356
|
+
function get_valid_url(url: string): string;
|
|
283
357
|
|
|
284
|
-
function get_active_web_template_hash(mode: string, accessLevel: string, accessRole: string, siteId: string, webDesignId: string):
|
|
358
|
+
function get_active_web_template_hash(mode: string, accessLevel: string, accessRole: string, siteId: string, webDesignId: string): string;
|
|
285
359
|
|
|
286
360
|
function build_submatched_string(sourceString: string, realString: string, destString: string): unknown;
|
|
287
361
|
|
|
@@ -411,73 +485,84 @@ declare namespace tools_web {
|
|
|
411
485
|
|
|
412
486
|
function get_language_desc(desc: string, env: Object): string;
|
|
413
487
|
|
|
414
|
-
function set_override_web_params(curParamsTarget: unknown, catOverrIdeWebTemplate: unknown):
|
|
488
|
+
function set_override_web_params(curParamsTarget: unknown, catOverrIdeWebTemplate: unknown): boolean;
|
|
415
489
|
|
|
416
|
-
function access_exists(fldAccess: unknown):
|
|
490
|
+
function access_exists(fldAccess: unknown): boolean;
|
|
417
491
|
|
|
418
|
-
function str_period_date(
|
|
492
|
+
function str_period_date(date: Date, curLngWeb: Env["curLngWeb"]): string;
|
|
419
493
|
|
|
420
494
|
let web_rules_obj: XmlElem<unknown | null>;
|
|
421
495
|
|
|
422
|
-
function get_enabled_web_rules():
|
|
496
|
+
function get_enabled_web_rules(): WebRuleCatalogDocumentTopElem[];
|
|
423
497
|
|
|
424
|
-
function get_std_web_rules():
|
|
498
|
+
function get_std_web_rules(): ReturnType<typeof get_enabled_web_rules>;
|
|
425
499
|
|
|
426
|
-
function clear_std_web_rules():
|
|
500
|
+
function clear_std_web_rules(): true;
|
|
427
501
|
|
|
428
|
-
function get_mode_clean_url(mode: string, objectId
|
|
502
|
+
function get_mode_clean_url(mode: string, objectId?: number, params?: Object): string;
|
|
429
503
|
|
|
430
|
-
function get_web_mode_clean_url(webMode: Object, objectId
|
|
504
|
+
function get_web_mode_clean_url(webMode: Object, objectId?: number, params?: Object): ReturnType<typeof get_mode_clean_url>;
|
|
431
505
|
|
|
432
|
-
function convert_mode_clean_url(url: string):
|
|
506
|
+
function convert_mode_clean_url(url: string): ReturnType<typeof get_mode_clean_url>;
|
|
433
507
|
|
|
434
|
-
function get_clean_url_exc_query(url: string, excParams: string, params: Object):
|
|
508
|
+
function get_clean_url_exc_query(url: string, excParams: string, params: Object): ReturnType<typeof get_mode_clean_url>;
|
|
435
509
|
|
|
436
|
-
function obtain_shared_temp_file(suffix: string):
|
|
510
|
+
function obtain_shared_temp_file(suffix: string): string;
|
|
437
511
|
|
|
438
|
-
function encode_url_reserved(url: string):
|
|
512
|
+
function encode_url_reserved(url: string): string;
|
|
439
513
|
|
|
440
|
-
function decode_url_reserved(url: string):
|
|
514
|
+
function decode_url_reserved(url: string): string;
|
|
441
515
|
|
|
442
|
-
function get_remote_action_param(
|
|
516
|
+
function get_remote_action_param(paramNames: string[], topElem: RemoteActionDocumentTopElem): unknown;
|
|
443
517
|
|
|
444
|
-
function check_collection_access(curUser: Object, object: Object, personAccessType: string):
|
|
518
|
+
function check_collection_access(curUser: Object, object: Object, personAccessType: string): boolean;
|
|
445
519
|
|
|
446
|
-
function get_empty_env():
|
|
520
|
+
function get_empty_env(): Env;
|
|
447
521
|
|
|
448
|
-
function get_empty_request():
|
|
522
|
+
function get_empty_request(): Session;
|
|
449
523
|
|
|
450
|
-
function get_admin_request():
|
|
524
|
+
function get_admin_request(): Request;
|
|
451
525
|
|
|
452
|
-
function parse_multiple_parameter(param: unknown): unknown;
|
|
526
|
+
function parse_multiple_parameter(param: Object | unknown[] | string): unknown[];
|
|
453
527
|
|
|
454
|
-
function get_md5_id(hashStr: string):
|
|
528
|
+
function get_md5_id(hashStr: string): string;
|
|
455
529
|
|
|
456
|
-
function check_object(xmCurObject: unknown
|
|
530
|
+
function check_object(xmCurObject: XmlElem<unknown>, type: string): boolean;
|
|
457
531
|
|
|
458
|
-
function check_redirect_url(url: string, requestUrl: string):
|
|
532
|
+
function check_redirect_url(url: string, requestUrl: string): boolean;
|
|
459
533
|
|
|
460
|
-
function check_web_rule_by_url(url: string, request:
|
|
534
|
+
function check_web_rule_by_url(url: string, request: Request): boolean;
|
|
461
535
|
|
|
462
|
-
function check_learning_schedule(learning:
|
|
536
|
+
function check_learning_schedule(learning: number | XmlTopElem, objectTopElem?: XmlTopElem): {
|
|
537
|
+
error: 0 | 1;
|
|
538
|
+
error_text: string;
|
|
539
|
+
};
|
|
463
540
|
|
|
464
|
-
function set_user_status(curUserId: number, status:
|
|
541
|
+
function set_user_status<T>(curUserId: number, status: T): ReturnType<typeof get_user_data> | T;
|
|
465
542
|
|
|
466
|
-
function get_user_status(curUserId: number):
|
|
543
|
+
function get_user_status(curUserId: number): ReturnType<typeof get_user_data>;
|
|
467
544
|
|
|
468
|
-
function terminate_learning_connection(objectId: number):
|
|
545
|
+
function terminate_learning_connection(objectId: number): boolean;
|
|
469
546
|
|
|
470
|
-
function create_learning_connection(objectTopElem: XmlTopElem, userTopElem: XmlTopElem, partCode: string):
|
|
547
|
+
function create_learning_connection(objectTopElem: XmlTopElem, userTopElem: XmlTopElem, partCode: string | null | undefined): number;
|
|
471
548
|
|
|
472
|
-
function log_learning_connection(type: string, connection:
|
|
549
|
+
function log_learning_connection(type: string, connection: {
|
|
550
|
+
id: unknown;
|
|
551
|
+
active_learning_id: unknown;
|
|
552
|
+
course_id: unknown;
|
|
553
|
+
user_id: unknown;
|
|
554
|
+
user_code: unknown;
|
|
555
|
+
user_fullname: unknown;
|
|
556
|
+
part_code: unknown;
|
|
557
|
+
}): void;
|
|
473
558
|
|
|
474
|
-
function set_data_cache(key: string, value: Object, duration: number):
|
|
559
|
+
function set_data_cache(key: string, value: Object, duration: number): boolean;
|
|
475
560
|
|
|
476
|
-
function get_data_cache(key: string):
|
|
561
|
+
function get_data_cache<T>(key: string): T | null;
|
|
477
562
|
|
|
478
|
-
function get_data_cache_by_pattern(pattern: string): unknown;
|
|
563
|
+
function get_data_cache_by_pattern(pattern: string): unknown | null | [];
|
|
479
564
|
|
|
480
|
-
function remove_data_cache(key: string): unknown;
|
|
565
|
+
function remove_data_cache(key: string): unknown | null;
|
|
481
566
|
|
|
482
|
-
function is_json(text: string):
|
|
567
|
+
function is_json(text: string): boolean;
|
|
483
568
|
}
|
|
@@ -64,7 +64,12 @@ I18nBase & {
|
|
|
64
64
|
view: XmlElem<RemoteActionDocumentView | null>;
|
|
65
65
|
/** @temp */
|
|
66
66
|
converter: XmlElem<boolean | null>;
|
|
67
|
-
evaluate(resultType: string, request: Request, argVars: Object, configuration: string):
|
|
67
|
+
evaluate(resultType: string, request: Request, argVars: Object, configuration: string): {
|
|
68
|
+
error: 1 | 0;
|
|
69
|
+
messageText: string;
|
|
70
|
+
result: unknown;
|
|
71
|
+
type: string;
|
|
72
|
+
};
|
|
68
73
|
/** Категория */
|
|
69
74
|
role_id: XmlMultiElemObject<number | null, RoleCatalogDocumentTopElem>;
|
|
70
75
|
};
|
package/package.json
CHANGED
package/scripts/check-version.sh
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
localVersion=$(cat package.json | jq -r '.version')
|
|
2
|
-
masterVersion=$(git show origin/main:package.json | jq -r '.version')
|
|
3
|
-
[ "${localVersion}" = "`echo -e "${localVersion}\n${masterVersion}" | sort -V | head -n1`" ] && echo 'Package version should be upgraded' && exit 1 || exit 0
|