mdt-client 31.3.20 → 31.3.21
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/index.d.ts +10 -11
- package/dist/index.js +16 -16
- package/package.json +29 -29
- package/readme.md +15 -15
- package/types/common/Datasource.d.ts +9 -9
- package/types/common/Field.d.ts +51 -51
- package/types/common/FieldSettings.schema.d.ts +8 -8
- package/types/common/MdtField.d.ts +9 -9
- package/types/common/MdtObject.d.ts +7 -7
- package/types/common/Record.d.ts +27 -27
- package/types/common/Table.d.ts +66 -66
- package/types/common/list/group/groupTypes.d.ts +30 -30
- package/types/common/list/hierarchy/hierarchyTypes.d.ts +48 -48
- package/types/common/serverMessage/ServerMessageTypes.d.ts +17 -17
- package/types/components/baseFormControls/input/inputOptions.d.ts +30 -31
- package/types/components/baseFormControls/maskedInput/MaskFormatter.types.d.ts +2 -2
- package/types/components/button/baseButton/buttonOptions.d.ts +12 -12
- package/types/components/buttonGroup/buttonGroupOptions.d.ts +7 -7
- package/types/components/dropdown/menu/item/dropdownInputItemOptions.d.ts +5 -5
- package/types/components/dropdown/menu/item/dropdownItemWrapOptions.d.ts +19 -19
- package/types/components/dropdown/menuActionItem/dropdownMenuItemOptions.d.ts +32 -32
- package/types/components/form/fieldView/fieldViewOptions.d.ts +13 -13
- package/types/components/form/label/labelOptions.d.ts +22 -22
- package/types/components/icon/iconOptions.d.ts +21 -22
- package/types/components/iconButton/iconButtonOptions.d.ts +9 -10
- package/types/components/processPrincipalsList/ProcessPrincipalsListItem.d.ts +5 -5
- package/types/components/resizablePanels/panelTitle/panelTitleOptions.d.ts +16 -16
- package/types/components/resizablePanels/panelToolbar/panelToolbarOptions.d.ts +4 -4
- package/types/components/resizablePanels/resizablePanel/resizablePanelOptions.d.ts +24 -24
- package/types/components/resizablePanels/resizablePanelsOptions.d.ts +22 -22
- package/types/components/toggleablePanels/toggleablePanelsOptions.d.ts +40 -40
- package/types/data/active/ActivationListAdapterTypes.d.ts +6 -6
- package/types/datasources/FetchResult.d.ts +5 -5
- package/types/helpers/IUi.d.ts +2 -2
- package/types/helpers/deleteFromArray.d.ts +1 -1
- package/types/helpers/events/EventEmitter.d.ts +12 -12
- package/types/helpers/fireEvent.d.ts +4 -4
- package/types/helpers/formatOptions.d.ts +14 -14
- package/types/helpers/formattedText.d.ts +8 -8
- package/types/helpers/pipeline/ImmutableArgPipeline.d.ts +7 -7
- package/types/helpers/pipeline/Pipeline.d.ts +20 -20
- package/types/helpers/redraw.d.ts +16 -16
- package/types/helpers/types.d.ts +84 -85
- package/types/helpers/ui/elementModificators/focusableComponent.d.ts +14 -15
- package/types/helpers/ui/elementModificators/modificatorsTypes.d.ts +4 -4
- package/types/helpers/ui/keyboardUtils/getKeySymbol.d.ts +2 -2
- package/types/helpers/ui/keyboardUtils/keyboardUtils.d.ts +23 -23
- package/types/helpers/ui/keyboardUtils/osByUserAgent.d.ts +1 -1
- package/types/helpers/utils/classNames.d.ts +20 -20
- package/types/helpers/utils/keyStorage/KeyStorage.d.ts +6 -6
- package/types/helpers/utils/memoization/memoize.d.ts +18 -18
- package/types/helpers/utils/object.d.ts +4 -4
- package/types/helpers/utils/stringifyControlSize.d.ts +3 -3
- package/types/helpers/utils/valued/getValued.d.ts +18 -18
- package/types/helpers/zone/IZone.d.ts +7 -8
- package/types/security/PermissionLevel.d.ts +40 -40
- package/types/security/User.d.ts +19 -19
- package/types/services/HotkeyManager.d.ts +6 -6
- package/types/services/IFilter.d.ts +322 -322
- package/types/services/ModuleData.d.ts +9 -9
- package/types/services/api/ApiAccessor/apiV1Types.d.ts +266 -266
- package/types/services/api/ApiAccessor/apiV2Types.d.ts +583 -577
- package/types/services/api/ApiAccessor/binding/bindingApiTypes.d.ts +37 -0
- package/types/services/api/ApiAccessorRequestAdapter/handlers/fetch/helpers/count/count.d.ts +10 -10
- package/types/services/api/ApiAccessorRequestAdapter/handlers/fetch/helpers/query/exts/hierarchy/hierarchyQueryHelpersTypes.d.ts +28 -28
- package/types/services/api/ApiAccessorRequestAdapter/handlers/fetch/helpers/query/exts/placeIn/placeInQueryTypes.d.ts +9 -9
- package/types/services/api/ApiAccessorRequestAdapter/handlers/messageTypes.d.ts +37 -37
- package/types/services/api/ApiAccessorRequestAdapter/message/apiV2MessageTypes.d.ts +2 -2
- package/types/services/api/ApiRequestOptions.d.ts +43 -43
- package/types/services/api/BaseQuery.d.ts +23 -23
- package/types/services/api/Query.d.ts +59 -59
- package/types/services/api/QuerySorting.d.ts +18 -18
- package/types/services/api/ServerResonseType.d.ts +2 -2
- package/types/services/commands/Command.d.ts +22 -22
- package/types/services/commands/CommandGroup.d.ts +15 -15
- package/types/services/commands/CommandManager.d.ts +77 -77
- package/types/services/customModules/facades/Form/IFieldControlFacade.d.ts +26 -26
- package/types/services/customModules/facades/Form/IFieldControlManagerFacade.d.ts +36 -36
- package/types/services/customModules/facades/Form/IFieldStateFacade.d.ts +13 -13
- package/types/services/customModules/facades/Form/IFormControlFacade.d.ts +133 -133
- package/types/services/customModules/facades/Form/IFormFacade.d.ts +101 -101
- package/types/services/customModules/facades/IAppFacade.d.ts +38 -38
- package/types/services/customModules/facades/IAuthFacade.d.ts +9 -9
- package/types/services/customModules/facades/ILegacyFacade.d.ts +151 -147
- package/types/services/customModules/facades/IMdtFacade.d.ts +81 -82
- package/types/services/customModules/facades/IModuleRegistryFacade.d.ts +5 -5
- package/types/services/customModules/facades/IPageFacade.d.ts +7 -7
- package/types/services/customModules/facades/List/Column/IColumnFacade.d.ts +7 -7
- package/types/services/customModules/facades/List/IListCellFacade.d.ts +8 -8
- package/types/services/customModules/facades/List/IListComponentFacade.d.ts +10 -10
- package/types/services/customModules/facades/List/IListControlFacade.d.ts +88 -88
- package/types/services/customModules/facades/List/IListRowFacade.d.ts +2 -2
- package/types/services/customModules/facades/List/IListServiceFacade.d.ts +53 -53
- package/types/services/customModules/facades/components/CodeEditorFacade.d.ts +9 -9
- package/types/services/customModules/facades/components/ModalFacade.d.ts +4 -4
- package/types/services/customModules/facades/formDashboard/IFormDashboard.d.ts +15 -15
- package/types/services/customModules/facades/internalModules/importFormCtrl.types.d.ts +76 -76
- package/types/services/customModules/facades/internalModules/importModuleFacade.d.ts +48 -48
- package/types/services/customModules/facades/internalModules/modulesFacadeTypes.d.ts +11 -11
- package/types/services/customModules/facades/internalModules/statusFacade.d.ts +13 -13
- package/types/services/customModules/facades/record/IRecordFacade.d.ts +13 -13
- package/types/services/customModules/facades/record/IRecordManagerFacade.d.ts +5 -5
- package/types/services/customModules/facades/schema/IFieldFacade.d.ts +11 -11
- package/types/services/customModules/facades/schema/IObjectFacade.d.ts +15 -15
- package/types/services/customModules/facades/schema/ISchemaFacade.d.ts +11 -11
- package/types/services/customModules/facades/services/CommandManagerFacade.d.ts +11 -11
- package/types/services/customModules/facades/services/IListButtonExtendPipelineService.d.ts +13 -13
- package/types/services/customModules/facades/services/INavigationFacade.d.ts +87 -87
- package/types/services/customModules/facades/services/ISecurityFacade.d.ts +13 -13
- package/types/services/customModules/facades/utils/IApiFacade.d.ts +91 -92
- package/types/services/customModules/facades/utils/IUiComponentsFacade.d.ts +85 -81
- package/types/services/customModules/facades/utils/IUiFacade.d.ts +83 -84
- package/types/services/customModules/facades/utils/IUtilsFacade.d.ts +26 -26
- package/types/services/customModules/facades/utils/ImUtilsFacade.d.ts +25 -26
- package/types/services/dropdown/IDropDownMenu.d.ts +40 -41
- package/types/services/e2e/e2eServiceType.d.ts +11 -11
- package/types/views/controls/Control.d.ts +7 -7
- package/types/views/controls/panels/panelOptions.d.ts +15 -15
- package/types/views/form/controls/commonControl/ICommonControl.d.ts +28 -29
- package/types/views/form/controls/fileupload/FileInputFacade.types.d.ts +6 -6
- package/types/views/form/controls/monacoEditor/MonacoCodeOptions.schema.d.ts +23 -23
- package/types/views/form/controls/monacoEditor/jsonSchemas/Button.schema.d.ts +70 -70
- package/types/views/form/controls/picker/multiPickerFacade/IMultiPickerFacade.d.ts +36 -36
- package/types/views/form/controls/toggleablePanels/editor/toggleablePanelsEditorFacadeOptions.d.ts +21 -21
- package/types/views/form/formTypes.d.ts +4 -4
- package/types/views/form/schema/FormPageOptions.schema.d.ts +19 -19
- package/types/views/list/IListView.d.ts +70 -71
- package/types/views/list/schema/ListPageOptions.schema.d.ts +116 -116
- package/types/views/page/PageZoneTypes.d.ts +1 -1
- package/types/views/page/charts/ChartControlOptions.schema.d.ts +617 -569
- package/types/views/page/charts/facade/I/320/241hartControlFacade.d.ts +24 -23
|
@@ -1,577 +1,583 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
type
|
|
84
|
-
type
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
type
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
type
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
type
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
};
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
};
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
ticket: string;
|
|
268
|
-
};
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
interface
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
type:
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
}
|
|
441
|
-
interface
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
}
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
export
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
}
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
};
|
|
576
|
-
|
|
577
|
-
|
|
1
|
+
import { BindingExtData, BindingRowTypes } from "./binding/bindingApiTypes";
|
|
2
|
+
import { MessageUiType, UiType } from "mdtScripts/helpers/IUi";
|
|
3
|
+
import { PermissionLevelString } from "mdtScripts/security/PermissionLevel";
|
|
4
|
+
import { HierarchicalRecord, MdtRecord, RecordId } from "../../../../scripts/common/Record";
|
|
5
|
+
import { AnyObject, ColorStyle, FieldPath, LanguageId, Markdown, ModuleId, ObjectCode, ObjectId, ObjectTitle } from "../../../../scripts/helpers/types";
|
|
6
|
+
import { FETCH_COUNT_ALIAS } from "../ApiAccessorRequestAdapter/handlers/fetch/helpers/count/count";
|
|
7
|
+
import { WithExpandedIds } from "../ApiAccessorRequestAdapter/handlers/fetch/helpers/query/exts/hierarchy/hierarchyQueryHelpersTypes";
|
|
8
|
+
import { DataExtraInformation } from "../ApiAccessorRequestAdapter/handlers/messageTypes";
|
|
9
|
+
import { ApiV1 } from "./apiV1Types";
|
|
10
|
+
export declare namespace ApiV2 {
|
|
11
|
+
namespace Request {
|
|
12
|
+
type Common = (Save | AnyObject) & WithMessageAction;
|
|
13
|
+
interface Save {
|
|
14
|
+
updates: Save.Update[];
|
|
15
|
+
exts?: Save.Extenders;
|
|
16
|
+
params?: Save.Params;
|
|
17
|
+
}
|
|
18
|
+
interface WithMessageAction {
|
|
19
|
+
messageAction?: MessageAction | MessageActionForm;
|
|
20
|
+
}
|
|
21
|
+
interface MessageActionForm {
|
|
22
|
+
form: {
|
|
23
|
+
objectCode: string;
|
|
24
|
+
record: Record<string, unknown>;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
interface MessageAction {
|
|
28
|
+
actions?: {
|
|
29
|
+
code: string;
|
|
30
|
+
value: string;
|
|
31
|
+
}[];
|
|
32
|
+
recordActions?: MessageRecordAction[];
|
|
33
|
+
}
|
|
34
|
+
interface MessageRecordAction {
|
|
35
|
+
recordId: RecordId;
|
|
36
|
+
code: string;
|
|
37
|
+
value: string;
|
|
38
|
+
}
|
|
39
|
+
namespace Save {
|
|
40
|
+
type UpdateType = "none" | "createNew" | "delete";
|
|
41
|
+
interface Params {
|
|
42
|
+
formId?: RecordId;
|
|
43
|
+
}
|
|
44
|
+
interface Update {
|
|
45
|
+
record: MdtRecord;
|
|
46
|
+
table: string;
|
|
47
|
+
updateType: Save.UpdateType;
|
|
48
|
+
children?: Update[];
|
|
49
|
+
o2mFkField?: string;
|
|
50
|
+
}
|
|
51
|
+
interface Extenders {
|
|
52
|
+
dataExt?: DataExt;
|
|
53
|
+
status?: StatusExt;
|
|
54
|
+
}
|
|
55
|
+
interface DataExt {
|
|
56
|
+
exts: {
|
|
57
|
+
ID_Language_ext: RecordId;
|
|
58
|
+
[key: string]: any;
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
interface StatusExt {
|
|
62
|
+
statusComment: string;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
/** FETCH */
|
|
66
|
+
interface Fetch {
|
|
67
|
+
table?: string;
|
|
68
|
+
select?: Fetch.Select;
|
|
69
|
+
orderBy?: Fetch.OrderBy;
|
|
70
|
+
groupBy?: Fetch.GroupBy;
|
|
71
|
+
filter?: Filter;
|
|
72
|
+
skip?: number;
|
|
73
|
+
take?: number;
|
|
74
|
+
distinct?: boolean;
|
|
75
|
+
exts?: Fetch.Exts;
|
|
76
|
+
params?: Fetch.Params & Fetch.SPParams;
|
|
77
|
+
}
|
|
78
|
+
namespace Fetch {
|
|
79
|
+
interface Params {
|
|
80
|
+
dataext?: "explicit";
|
|
81
|
+
}
|
|
82
|
+
/** Параметры для передачи в хранимую процедуру */
|
|
83
|
+
type SPParams = AnyObject;
|
|
84
|
+
type Select = SelectItem[];
|
|
85
|
+
type SelectItem = {
|
|
86
|
+
path: string;
|
|
87
|
+
aggregate?: Aggregation;
|
|
88
|
+
alias?: string;
|
|
89
|
+
castType?: CastType;
|
|
90
|
+
};
|
|
91
|
+
type Aggregation = {
|
|
92
|
+
function: ApiV2.AggregationType;
|
|
93
|
+
distinct?: boolean;
|
|
94
|
+
};
|
|
95
|
+
type CastType = "date";
|
|
96
|
+
type OrderByItem = {
|
|
97
|
+
path: string;
|
|
98
|
+
orderType: "asc" | "desc";
|
|
99
|
+
castType?: CastType;
|
|
100
|
+
aggregate?: Aggregation;
|
|
101
|
+
};
|
|
102
|
+
type OrderBy = OrderByItem[];
|
|
103
|
+
type GroupBy = {
|
|
104
|
+
path: string;
|
|
105
|
+
}[];
|
|
106
|
+
interface Exts {
|
|
107
|
+
dataExt?: Exts.DataExt;
|
|
108
|
+
fatLink?: Exts.FatLink;
|
|
109
|
+
group?: Exts.Group;
|
|
110
|
+
hierarchy?: Exts.Hierarchy;
|
|
111
|
+
hierarchyLegacy?: Exts.HierarchyLegacy;
|
|
112
|
+
dependency?: Exts.Dependency;
|
|
113
|
+
placeIn?: Exts.PlaceIn;
|
|
114
|
+
audit?: Exts.Audit;
|
|
115
|
+
tabular?: Exts.Tabular;
|
|
116
|
+
tag?: Exts.Tag;
|
|
117
|
+
workflow?: Exts.Workflow;
|
|
118
|
+
workflowStage?: Exts.WorkflowStage;
|
|
119
|
+
mapping?: Exts.Mapping;
|
|
120
|
+
binding?: Exts.Binding;
|
|
121
|
+
[k: string]: AnyObject | undefined;
|
|
122
|
+
}
|
|
123
|
+
namespace Exts {
|
|
124
|
+
interface Group {
|
|
125
|
+
groups: GroupItem[];
|
|
126
|
+
allParents?: boolean;
|
|
127
|
+
orphans?: boolean;
|
|
128
|
+
toggledValues?: string[][];
|
|
129
|
+
skippedRowsCount?: number;
|
|
130
|
+
}
|
|
131
|
+
interface GroupItem {
|
|
132
|
+
path: FieldPath;
|
|
133
|
+
collapsed?: boolean;
|
|
134
|
+
select?: FieldPath[];
|
|
135
|
+
sorting?: GroupItemSorting[];
|
|
136
|
+
}
|
|
137
|
+
interface GroupItemSorting {
|
|
138
|
+
path: string;
|
|
139
|
+
desc: boolean;
|
|
140
|
+
}
|
|
141
|
+
interface DataExt {
|
|
142
|
+
explicit?: boolean;
|
|
143
|
+
args?: DataExtArgs;
|
|
144
|
+
}
|
|
145
|
+
interface DataExtArgs {
|
|
146
|
+
ID_Language_ext?: LanguageId;
|
|
147
|
+
}
|
|
148
|
+
interface FatLink {
|
|
149
|
+
date?: string;
|
|
150
|
+
limit?: number;
|
|
151
|
+
}
|
|
152
|
+
interface Hierarchy extends WithExpandedIds {
|
|
153
|
+
idField?: string;
|
|
154
|
+
parentIdField?: string;
|
|
155
|
+
parentId?: RecordId;
|
|
156
|
+
}
|
|
157
|
+
interface HierarchyLegacy {
|
|
158
|
+
idField?: string;
|
|
159
|
+
parentIdField?: string;
|
|
160
|
+
mode?: Mode;
|
|
161
|
+
filter?: Filter;
|
|
162
|
+
}
|
|
163
|
+
type Mode = "NA" | "Up" | "Down" | "UpDown";
|
|
164
|
+
type Dependency = FetchDependencyTypes.Request;
|
|
165
|
+
type PlaceIn = {
|
|
166
|
+
queries: {
|
|
167
|
+
query: Fetch;
|
|
168
|
+
name: string;
|
|
169
|
+
fk: string;
|
|
170
|
+
}[];
|
|
171
|
+
};
|
|
172
|
+
type Audit = TicketQuery;
|
|
173
|
+
type Tag = TicketQuery;
|
|
174
|
+
interface Tabular {
|
|
175
|
+
select?: {
|
|
176
|
+
path: FieldPath;
|
|
177
|
+
table: ObjectCode;
|
|
178
|
+
}[];
|
|
179
|
+
groupBy?: {
|
|
180
|
+
path: FieldPath;
|
|
181
|
+
table: ObjectCode;
|
|
182
|
+
}[];
|
|
183
|
+
orderBy?: {
|
|
184
|
+
path: FieldPath;
|
|
185
|
+
table: ObjectCode;
|
|
186
|
+
}[];
|
|
187
|
+
}
|
|
188
|
+
type Workflow = TicketQuery;
|
|
189
|
+
interface WorkflowStage {
|
|
190
|
+
enabled: boolean;
|
|
191
|
+
}
|
|
192
|
+
interface TicketQuery {
|
|
193
|
+
ticket?: string;
|
|
194
|
+
generateTicket?: true;
|
|
195
|
+
}
|
|
196
|
+
interface Mapping {
|
|
197
|
+
flagGetMappedFKs: boolean;
|
|
198
|
+
}
|
|
199
|
+
type Binding = BindingExtData;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
namespace Response {
|
|
204
|
+
export type Main = AnyObject | Error | Save | Fetch;
|
|
205
|
+
type BaseResponse = {
|
|
206
|
+
exts?: Exts;
|
|
207
|
+
};
|
|
208
|
+
interface Exts {
|
|
209
|
+
objectRule?: {
|
|
210
|
+
logs: string[];
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
export interface Error extends BaseResponse {
|
|
214
|
+
message: Markdown;
|
|
215
|
+
code: string;
|
|
216
|
+
debug?: any;
|
|
217
|
+
args?: any;
|
|
218
|
+
error: boolean;
|
|
219
|
+
}
|
|
220
|
+
export interface Save extends BaseResponse, WithMessage {
|
|
221
|
+
stats: Save.SaveStats;
|
|
222
|
+
details: Save.SaveDetails;
|
|
223
|
+
}
|
|
224
|
+
export namespace Save {
|
|
225
|
+
export interface SaveDetails {
|
|
226
|
+
inserted?: SaveDetailsItem[];
|
|
227
|
+
updated?: SaveDetailsItem[];
|
|
228
|
+
deleted?: SaveDetailsItem[];
|
|
229
|
+
}
|
|
230
|
+
interface SaveDetailsItem {
|
|
231
|
+
table: ObjectCode;
|
|
232
|
+
ids: RecordId[];
|
|
233
|
+
}
|
|
234
|
+
export interface SaveStats {
|
|
235
|
+
inserted?: number;
|
|
236
|
+
updated?: number;
|
|
237
|
+
delete?: number;
|
|
238
|
+
}
|
|
239
|
+
export {};
|
|
240
|
+
}
|
|
241
|
+
export interface Fetch {
|
|
242
|
+
message?: DataExtraInformation;
|
|
243
|
+
exts?: Fetch.Exts;
|
|
244
|
+
rows?: Fetch.Row[];
|
|
245
|
+
[k: string]: any;
|
|
246
|
+
}
|
|
247
|
+
/** Fetch */
|
|
248
|
+
export namespace Fetch {
|
|
249
|
+
type Row = MdtRecord & {
|
|
250
|
+
[FETCH_COUNT_ALIAS]?: number;
|
|
251
|
+
$exts?: RecordExt;
|
|
252
|
+
};
|
|
253
|
+
interface RecordExt extends RecordExt.WorkflowStageExt {
|
|
254
|
+
required?: {
|
|
255
|
+
fields: {
|
|
256
|
+
[k: string]: boolean;
|
|
257
|
+
};
|
|
258
|
+
};
|
|
259
|
+
placeIn?: {
|
|
260
|
+
rows: Record<string, Fetch.Row[]>;
|
|
261
|
+
};
|
|
262
|
+
audit?: {
|
|
263
|
+
ticket: string;
|
|
264
|
+
};
|
|
265
|
+
tag?: {
|
|
266
|
+
tags: number[];
|
|
267
|
+
ticket: string;
|
|
268
|
+
};
|
|
269
|
+
workflow?: {
|
|
270
|
+
ticket: string;
|
|
271
|
+
};
|
|
272
|
+
dependency?: FetchDependencyTypes.RecordExtResponse;
|
|
273
|
+
hierarchy?: {
|
|
274
|
+
hasChildren: boolean;
|
|
275
|
+
children?: Row[];
|
|
276
|
+
};
|
|
277
|
+
binding?: {
|
|
278
|
+
status: BindingRowTypes;
|
|
279
|
+
};
|
|
280
|
+
/**
|
|
281
|
+
* Ограничения на действия (CRUD) над записью и её полями, накладываемые функцией безопасности.
|
|
282
|
+
* [Документация](https://ics-it.gram.ax/mdt/security/objectSecurity/sqlFn?l=ru)
|
|
283
|
+
*/
|
|
284
|
+
securityExt?: {
|
|
285
|
+
level: PermissionLevelString;
|
|
286
|
+
baseLevel: PermissionLevelString;
|
|
287
|
+
fields: {
|
|
288
|
+
[fieldId: number]: PermissionLevelString;
|
|
289
|
+
};
|
|
290
|
+
};
|
|
291
|
+
}
|
|
292
|
+
namespace RecordExt {
|
|
293
|
+
interface WorkflowStageExt {
|
|
294
|
+
workflowStage?: WorkflowStage;
|
|
295
|
+
}
|
|
296
|
+
interface WorkflowStage {
|
|
297
|
+
title: string;
|
|
298
|
+
icon?: string;
|
|
299
|
+
labelStyleCode?: ColorStyle;
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
interface Exts {
|
|
303
|
+
hierarchyLegacy?: Exts.HierarchyLegacy;
|
|
304
|
+
group?: Exts.GroupQuery;
|
|
305
|
+
}
|
|
306
|
+
namespace Exts {
|
|
307
|
+
interface HierarchyLegacy {
|
|
308
|
+
rows: HierarchicalRecord[];
|
|
309
|
+
}
|
|
310
|
+
interface GroupQuery {
|
|
311
|
+
groups: OutputGroup[];
|
|
312
|
+
skippedRowsCount?: number;
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
interface OutputGroup {
|
|
316
|
+
count: number;
|
|
317
|
+
object?: {
|
|
318
|
+
[k: string]: any;
|
|
319
|
+
};
|
|
320
|
+
value?: any;
|
|
321
|
+
subGroups?: OutputGroup[];
|
|
322
|
+
isEmpty?: boolean;
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
export interface WithMessage {
|
|
326
|
+
message?: Message;
|
|
327
|
+
}
|
|
328
|
+
export type Message = MessageWithData | MessageWithForm;
|
|
329
|
+
export type MessageWithData = MessageBase & MessageData;
|
|
330
|
+
export type MessageWithForm = MessageBase & MessageForm;
|
|
331
|
+
interface MessageBase {
|
|
332
|
+
type: Message.Type;
|
|
333
|
+
title?: string;
|
|
334
|
+
icon?: string;
|
|
335
|
+
}
|
|
336
|
+
interface MessageData {
|
|
337
|
+
actions?: Message.Action[];
|
|
338
|
+
data: Message.ResponseData[];
|
|
339
|
+
}
|
|
340
|
+
export interface MessageForm {
|
|
341
|
+
form?: {
|
|
342
|
+
layoutCode: string;
|
|
343
|
+
object: {
|
|
344
|
+
Code: string;
|
|
345
|
+
Fields: {
|
|
346
|
+
Code: string;
|
|
347
|
+
Type: string;
|
|
348
|
+
Required: string;
|
|
349
|
+
RefTableCode: string;
|
|
350
|
+
}[];
|
|
351
|
+
Title?: string;
|
|
352
|
+
Description?: string;
|
|
353
|
+
};
|
|
354
|
+
};
|
|
355
|
+
}
|
|
356
|
+
export namespace Message {
|
|
357
|
+
type Type = MessageUiType;
|
|
358
|
+
type UIType = UiType;
|
|
359
|
+
interface Action {
|
|
360
|
+
title: string;
|
|
361
|
+
icon?: string;
|
|
362
|
+
type: Type;
|
|
363
|
+
paramCode: string;
|
|
364
|
+
paramValue: string;
|
|
365
|
+
}
|
|
366
|
+
type ResponseData = ResponseText | ResponseRows | ResponseRef | ResponseRecordAction;
|
|
367
|
+
interface ResponseText {
|
|
368
|
+
type: "Text";
|
|
369
|
+
text: string;
|
|
370
|
+
}
|
|
371
|
+
interface ResponseRows<T extends MdtRecord = MdtRecord> {
|
|
372
|
+
type: "Rows";
|
|
373
|
+
rows: T[];
|
|
374
|
+
}
|
|
375
|
+
interface ResponseRef {
|
|
376
|
+
type: "Refs";
|
|
377
|
+
idObject: number;
|
|
378
|
+
idRecords: RecordId[];
|
|
379
|
+
}
|
|
380
|
+
interface ResponseRecordAction<R = any> {
|
|
381
|
+
type: "RecordAction";
|
|
382
|
+
columns: ResponseRecordActionColumn[];
|
|
383
|
+
rows: ResponseRecordActionRow<R>[];
|
|
384
|
+
}
|
|
385
|
+
interface ResponseRecordActionColumn {
|
|
386
|
+
code: string;
|
|
387
|
+
title: string;
|
|
388
|
+
}
|
|
389
|
+
interface ResponseRecordActionRow<R = any> {
|
|
390
|
+
recordId: RecordId;
|
|
391
|
+
record: R;
|
|
392
|
+
recordActions: ResponseRecordActionAction[];
|
|
393
|
+
}
|
|
394
|
+
interface ResponseRecordActionAction {
|
|
395
|
+
code: string;
|
|
396
|
+
values: {
|
|
397
|
+
title: string;
|
|
398
|
+
value: string;
|
|
399
|
+
}[];
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
export namespace File {
|
|
403
|
+
export interface Upload {
|
|
404
|
+
id: RecordId;
|
|
405
|
+
name: string;
|
|
406
|
+
uid: string;
|
|
407
|
+
shortUid: string;
|
|
408
|
+
size?: number;
|
|
409
|
+
storageProvider?: UploadStorageProvider;
|
|
410
|
+
}
|
|
411
|
+
type UploadStorageProvider = ApiV1.Response.File.StorageProvider;
|
|
412
|
+
export {};
|
|
413
|
+
}
|
|
414
|
+
export namespace Data {
|
|
415
|
+
export interface Import {
|
|
416
|
+
stats: Save.SaveStats;
|
|
417
|
+
details: {
|
|
418
|
+
inserted?: ImportDetail[];
|
|
419
|
+
updated?: ImportDetail[];
|
|
420
|
+
delete?: ImportDetail[];
|
|
421
|
+
};
|
|
422
|
+
}
|
|
423
|
+
interface ImportDetail {
|
|
424
|
+
table: string;
|
|
425
|
+
ids: RecordId[];
|
|
426
|
+
}
|
|
427
|
+
export {};
|
|
428
|
+
}
|
|
429
|
+
export namespace Template {
|
|
430
|
+
interface Preview {
|
|
431
|
+
context: AnyObject;
|
|
432
|
+
script: string;
|
|
433
|
+
header: string;
|
|
434
|
+
text: string;
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
export namespace User {
|
|
438
|
+
interface EntityPermission {
|
|
439
|
+
level: PermissionLevelString;
|
|
440
|
+
}
|
|
441
|
+
interface Permissions {
|
|
442
|
+
listview: User.EntityPermission;
|
|
443
|
+
namedfilters: User.EntityPermission;
|
|
444
|
+
tag: User.EntityPermission;
|
|
445
|
+
object: ObjectPermissions;
|
|
446
|
+
}
|
|
447
|
+
interface ObjectPermissions {
|
|
448
|
+
objects: ObjectPermissionObjects;
|
|
449
|
+
}
|
|
450
|
+
interface ObjectPermissionObjects {
|
|
451
|
+
[objectCode: string]: {
|
|
452
|
+
level: PermissionLevelString;
|
|
453
|
+
fields?: Record<string, User.EntityPermission>;
|
|
454
|
+
};
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
export interface User {
|
|
458
|
+
id: number;
|
|
459
|
+
isAdmin: boolean;
|
|
460
|
+
isAnonymous: boolean;
|
|
461
|
+
isImpersonated: boolean;
|
|
462
|
+
languageId: number;
|
|
463
|
+
roles: string[];
|
|
464
|
+
permissions?: User.Permissions;
|
|
465
|
+
identityName?: string;
|
|
466
|
+
languageCode?: string;
|
|
467
|
+
login?: string;
|
|
468
|
+
fullName?: string;
|
|
469
|
+
email?: string;
|
|
470
|
+
}
|
|
471
|
+
export type Schema = Schema.Object | Schema.Object[];
|
|
472
|
+
export namespace Schema {
|
|
473
|
+
type Object = {
|
|
474
|
+
$id?: ObjectId;
|
|
475
|
+
Code?: ObjectCode;
|
|
476
|
+
DefaultFieldCode?: any;
|
|
477
|
+
Deleted?: boolean;
|
|
478
|
+
Fields?: Field[];
|
|
479
|
+
ID?: ObjectId;
|
|
480
|
+
ID_ObjectType?: string;
|
|
481
|
+
ID_ver_Module?: ModuleId;
|
|
482
|
+
OBJECT_ID?: number;
|
|
483
|
+
tag_Enabled?: boolean;
|
|
484
|
+
Title?: ObjectTitle;
|
|
485
|
+
"Title@"?: ObjectTitle;
|
|
486
|
+
TitlePlural?: string;
|
|
487
|
+
"TitlePlural@"?: string;
|
|
488
|
+
Description?: string;
|
|
489
|
+
Readonly?: boolean;
|
|
490
|
+
Icon?: string;
|
|
491
|
+
audit_Enabled?: boolean;
|
|
492
|
+
inline_AddInRow?: boolean;
|
|
493
|
+
inline_Enabled?: boolean;
|
|
494
|
+
HierarchyParentField?: string;
|
|
495
|
+
HierarchyIDField?: string;
|
|
496
|
+
FlagHierarchy?: boolean;
|
|
497
|
+
FlagConfiguration?: boolean;
|
|
498
|
+
Settings: string;
|
|
499
|
+
AccessLevel: string;
|
|
500
|
+
Parameters?: Parameter[];
|
|
501
|
+
} & Record<string, any>;
|
|
502
|
+
type Field = {
|
|
503
|
+
Code: string;
|
|
504
|
+
Type: string;
|
|
505
|
+
DataType: string;
|
|
506
|
+
$id?: ObjectId;
|
|
507
|
+
ID?: ObjectId;
|
|
508
|
+
Title?: string;
|
|
509
|
+
"Title@"?: string;
|
|
510
|
+
Identity?: boolean;
|
|
511
|
+
RefTableCode?: string;
|
|
512
|
+
SortOreder?: number;
|
|
513
|
+
FlagScriptDfkInline?: boolean;
|
|
514
|
+
Primary?: boolean;
|
|
515
|
+
Readonly?: boolean;
|
|
516
|
+
};
|
|
517
|
+
type Parameter = {
|
|
518
|
+
Code: string;
|
|
519
|
+
DataType: string;
|
|
520
|
+
};
|
|
521
|
+
}
|
|
522
|
+
export {};
|
|
523
|
+
}
|
|
524
|
+
type AggregationType = "sum" | "avg" | "count" | "max" | "min";
|
|
525
|
+
type Filter = Filter.Simple | Filter.List | Filter.SubQuery | Filter.Multi;
|
|
526
|
+
namespace Filter {
|
|
527
|
+
export type MultiOp = "and" | "or";
|
|
528
|
+
export type BinaryOp = "eq" | "ge" | "le" | "gt" | "lt" | "ne" | "contains" | "startsWith" | "endsWith" | "fullText" | "in";
|
|
529
|
+
export interface Multi extends WithNot {
|
|
530
|
+
op: MultiOp;
|
|
531
|
+
groups: Filter[];
|
|
532
|
+
}
|
|
533
|
+
interface WithNot {
|
|
534
|
+
not?: boolean;
|
|
535
|
+
}
|
|
536
|
+
export interface Simple extends WithNot, WithCastType {
|
|
537
|
+
op: BinaryOp;
|
|
538
|
+
path: string;
|
|
539
|
+
value?: any;
|
|
540
|
+
}
|
|
541
|
+
export interface List extends WithNot, WithCastType {
|
|
542
|
+
op: BinaryOp;
|
|
543
|
+
path: string;
|
|
544
|
+
list: string[];
|
|
545
|
+
}
|
|
546
|
+
export interface SubQuery extends WithNot, WithCastType {
|
|
547
|
+
op: BinaryOp;
|
|
548
|
+
path: string;
|
|
549
|
+
query: SubQueryExpression;
|
|
550
|
+
}
|
|
551
|
+
export interface SubQueryExpression {
|
|
552
|
+
table: string;
|
|
553
|
+
field: string;
|
|
554
|
+
filter?: Filter;
|
|
555
|
+
params?: {
|
|
556
|
+
[k: string]: any;
|
|
557
|
+
};
|
|
558
|
+
}
|
|
559
|
+
interface WithCastType {
|
|
560
|
+
castType?: ApiV2.Request.Fetch.CastType;
|
|
561
|
+
}
|
|
562
|
+
export {};
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
/**
|
|
566
|
+
* Расширение позволяет получить информацию о ссылках на текущую запись.
|
|
567
|
+
*/
|
|
568
|
+
declare namespace FetchDependencyTypes {
|
|
569
|
+
/**
|
|
570
|
+
* В запросе указывается таблица и поле, которое ссылается на текущую таблицу
|
|
571
|
+
*/
|
|
572
|
+
type Request = {
|
|
573
|
+
table: string;
|
|
574
|
+
field: string;
|
|
575
|
+
};
|
|
576
|
+
/**
|
|
577
|
+
* В ответе вместе с записью приходит информация есть ли ссылки на эту запись по указанным в запросе данным
|
|
578
|
+
*/
|
|
579
|
+
type RecordExtResponse = {
|
|
580
|
+
hasDependencies: boolean;
|
|
581
|
+
};
|
|
582
|
+
}
|
|
583
|
+
export {};
|