@creatio-devkit/common 0.834.0 → 0.1000.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.
@@ -0,0 +1,4523 @@
1
+ import { ɵFilterGroup as _FilterGroup, ɵDataSourceLoadOptions as _DataSourceLoadOptions, ɵGuid as _Guid, ɵDataValueType as _DataValueType, ɵDatePartType as _DatePartType, ɵLookupValue as _LookupValue, ɵType as _Type, ɵAggregationEvalType as _AggregationEvalType, ɵAggregationEval as _AggregationEval, ɵAggregationType as _AggregationType, ɵAggregationFunction as _AggregationFunction, ɵDatePart as _DatePart, ɵFunctionStringType as _FunctionStringType, ɵFunctionType as _FunctionType, ɵSortDirection as _SortDirection, ɵOrderDirection as _OrderDirection, ɵCompatibleAPIs as _CompatibleAPIs, ɵViewModelContext as _ViewModelContext, ɵRequestHandler as _RequestHandler, ɵBaseRequest as _BaseRequest, ɵTeardownLogic as _TeardownLogic, ɵEntityColumnValue as _EntityColumnValue, ɵItemCreationConfig as _ItemCreationConfig, ɵJsonData as _JsonData, ɵViewModelCollection as _ViewModelCollection, ɵDataSourceParameters as _DataSourceParameters, ɵRequestRegistrationConfig as _RequestRegistrationConfig, ɵPlatformAPIOptions as _PlatformAPIOptions, ɵPlatformAPIs as _PlatformAPIs, ɵResolveDependencyFn as _ResolveDependencyFn, ɵLocalizeFn as _LocalizeFn, ɵAbstractType as _AbstractType, ɵBaseDialogService as _BaseDialogService, ɵBaseDialogConfig as _BaseDialogConfig, ɵBaseDialogButtonConfig as _BaseDialogButtonConfig, ɵBaseMessageChannelService as _BaseMessageChannelService, ɵMessageChannelEvent as _MessageChannelEvent, ɵSubscription as _Subscription, ɵMessageChannelType as _MessageChannelType, ɵBaseModel as _BaseModel, ɵDataSchema as _DataSchema, ɵDataSourceAttribute as _DataSourceAttribute, ɵJsonArray as _JsonArray, ɵJsonObject as _JsonObject, ɵDataSourceSaveResult as _DataSourceSaveResult, ɵDataSourceCanExecuteOperationPayload as _DataSourceCanExecuteOperationPayload, ɵDataSourceCanExecuteOperationResult as _DataSourceCanExecuteOperationResult, ɵModelInPageAction as _ModelInPageAction, ɵModelDefaultValue as _ModelDefaultValue, ɵLookupValueWithCode as _LookupValueWithCode } from '@creatio/base';
2
+ export { ɵAbstractType as AbstractType, ɵAggregationEval as AggregationEval, ɵAggregationEvalType as AggregationEvalType, ɵAggregationFunction as AggregationFunction, ɵAggregationFunctionColumn as AggregationFunctionColumn, ɵAggregationFunctionExpression as AggregationFunctionExpression, ɵAggregationFunctionExpressionConfig as AggregationFunctionExpressionConfig, ɵAggregationSubQueryColumn as AggregationSubQueryColumn, ɵAggregationSubQueryExpression as AggregationSubQueryExpression, ɵAggregationSubQueryExpressionConfig as AggregationSubQueryExpressionConfig, ɵAggregationType as AggregationType, ɵArgumentEmptyException as ArgumentEmptyException, ɵArgumentFunctionExpression as ArgumentFunctionExpression, ɵArgumentFunctionExpressionConfig as ArgumentFunctionExpressionConfig, ɵArgumentOutOfRangeException as ArgumentOutOfRangeException, ɵArithmeticExpression as ArithmeticExpression, ɵArithmeticExpressionConfig as ArithmeticExpressionConfig, ɵArithmeticOperation as ArithmeticOperation, ɵArithmeticQueryColumn as ArithmeticQueryColumn, ɵBaseDataSourceParameter as BaseDataSourceParameter, ɵBaseDialogButtonConfig as BaseDialogButtonConfig, ɵBaseDialogConfig as BaseDialogConfig, ɵBaseDialogService as BaseDialogService, ɵBaseExpression as BaseExpression, ɵBaseExpressionParser as BaseExpressionParser, ɵBaseFilter as BaseFilter, ɵBaseFilterParser as BaseFilterParser, ɵBaseFilterableQuery as BaseFilterableQuery, ɵBaseMessageChannelService as BaseMessageChannelService, ɵBaseModel as BaseModel, ɵBaseQuery as BaseQuery, ɵBaseQueryColumn as BaseQueryColumn, ɵBaseRequest as BaseRequest, ɵBetweenFilter as BetweenFilter, ɵButtonColor as ButtonColor, ɵColumnExpression as ColumnExpression, ɵColumnExpressionConfig as ColumnExpressionConfig, ɵCompareFilter as CompareFilter, ɵComparisonType as ComparisonType, ɵConditionalValueItem as ConditionalValueItem, ɵDataSchema as DataSchema, ɵDataSchemaAttribute as DataSchemaAttribute, ɵDataSchemaAttributeAggregationConfig as DataSchemaAttributeAggregationConfig, ɵDataSchemaAttributeAggregationFunctionConfig as DataSchemaAttributeAggregationFunctionConfig, ɵDataSchemaAttributeDatePartFunctionConfig as DataSchemaAttributeDatePartFunctionConfig, ɵDataSchemaAttributeFunctionConfig as DataSchemaAttributeFunctionConfig, ɵDataSchemaAttributeType as DataSchemaAttributeType, ɵDataSchemaAttributeUsageType as DataSchemaAttributeUsageType, ɵDataSchemaAttributeValidatorConfig as DataSchemaAttributeValidatorConfig, ɵDataSchemaAttributeValueMaskingSettings as DataSchemaAttributeValueMaskingSettings, ɵDataSchemaType as DataSchemaType, ɵDataSchemaValidatorConfig as DataSchemaValidatorConfig, ɵDataSourceAggregationConfig as DataSourceAggregationConfig, ɵDataSourceAggregationFunctionConfig as DataSourceAggregationFunctionConfig, ɵDataSourceAttribute as DataSourceAttribute, ɵDataSourceAttributeType as DataSourceAttributeType, ɵDataSourceCanExecuteOperationPayload as DataSourceCanExecuteOperationPayload, ɵDataSourceCanExecuteOperationResult as DataSourceCanExecuteOperationResult, ɵDataSourceConfig as DataSourceConfig, ɵDataSourceDatePartFunctionConfig as DataSourceDatePartFunctionConfig, ɵDataSourceFunctionConfig as DataSourceFunctionConfig, ɵDataSourceInsertResult as DataSourceInsertResult, ɵDataSourceInstanceConfig as DataSourceInstanceConfig, ɵDataSourcePagingConfig as DataSourcePagingConfig, ɵDataSourceParameter as DataSourceParameter, ɵDataSourceParameterRelationConfig as DataSourceParameterRelationConfig, ɵDataSourceParameters as DataSourceParameters, ɵDataSourceSaveResult as DataSourceSaveResult, ɵDataSourceScope as DataSourceScope, ɵDataSourceSortingConfig as DataSourceSortingConfig, ɵDataValueType as DataValueType, ɵDatePart as DatePart, ɵDatePartFunctionColumn as DatePartFunctionColumn, ɵDatePartFunctionExpression as DatePartFunctionExpression, ɵDatePartFunctionExpressionConfig as DatePartFunctionExpressionConfig, ɵDatePartType as DatePartType, ɵDefaultValueSchema as DefaultValueSchema, ɵDefaultValueSource as DefaultValueSource, ɵDeleteQuery as DeleteQuery, ɵEMPTY_GUID as EMPTY_GUID, ɵEntityColumnValue as EntityColumnValue, ɵEntityQueryColumn as EntityQueryColumn, ɵEntitySchemaQuery as EntitySchemaQuery, ɵExistsFilter as ExistsFilter, ɵExpressionConfig as ExpressionConfig, ɵExpressionMock as ExpressionMock, ɵExpressionParser as ExpressionParser, ɵExpressionResolver as ExpressionResolver, ɵExpressionType as ExpressionType, ɵFilterGroup as FilterGroup, FilterGroupOrigin, ɵFilterGroupOriginType as FilterGroupOriginType, ɵFilterMock as FilterMock, ɵFilterParser as FilterParser, ɵFilterResolver as FilterResolver, ɵFilterType as FilterType, ɵFunctionExpression as FunctionExpression, ɵFunctionExpressionConfig as FunctionExpressionConfig, ɵFunctionStringType as FunctionStringType, ɵFunctionType as FunctionType, ɵGuid as Guid, ɵInFilter as InFilter, ɵInsertQuery as InsertQuery, ɵIsNullFilter as IsNullFilter, ɵItemNotFoundException as ItemNotFoundException, ɵJsonArray as JsonArray, ɵJsonData as JsonData, ɵJsonObject as JsonObject, ɵLengthFunctionColumn as LengthFunctionColumn, ɵLengthFunctionExpression as LengthFunctionExpression, ɵLengthFunctionExpressionConfig as LengthFunctionExpressionConfig, ɵLocalizableString as LocalizableString, ɵLocalizeFn as LocalizeFn, ɵLogicalOperatorType as LogicalOperatorType, ɵLookupValue as LookupValue, ɵLookupValueWithCode as LookupValueWithCode, ɵMacrosFunctionColumn as MacrosFunctionColumn, ɵMacrosFunctionExpression as MacrosFunctionExpression, ɵMacrosFunctionExpressionConfig as MacrosFunctionExpressionConfig, ɵMessageChannelEvent as MessageChannelEvent, ɵMessageChannelType as MessageChannelType, ɵMetadataProvider as MetadataProvider, ɵModelDefaultValue as ModelDefaultValue, ɵModelInPageAction as ModelInPageAction, ɵModelInitConfig as ModelInitConfig, ɵModelParameterType as ModelParameterType, ɵNextHandlerAlreadySpecifiedException as NextHandlerAlreadySpecifiedException, ɵOrderDirection as OrderDirection, ɵParameterExpression as ParameterExpression, ɵParameterExpressionConfig as ParameterExpressionConfig, ɵParameterQueryColumn as ParameterQueryColumn, ɵPlatformAPIOptions as PlatformAPIOptions, ɵPlatformAPIs as PlatformAPIs, ɵPrimaryDisplayFilterDataSourceParameter as PrimaryDisplayFilterDataSourceParameter, ɵQueryMacrosType as QueryMacrosType, ɵQueryOperationType as QueryOperationType, ɵRequestHandler as RequestHandler, ɵRequestRegistrationConfig as RequestRegistrationConfig, ɵResolveDependencyFn as ResolveDependencyFn, ɵSchemaViewMaskRequest as SchemaViewMaskRequest, ɵSchemaViewMaskRequestAction as SchemaViewMaskRequestAction, ɵSegmentFilter as SegmentFilter, ɵSegmentFilterComparisonType as SegmentFilterComparisonType, ɵSegmentFilterDto as SegmentFilterDto, ɵSegmentFilterOptions as SegmentFilterOptions, ɵSegmentFilterOptionsDto as SegmentFilterOptionsDto, ɵSelectLocalizationQuery as SelectLocalizationQuery, ɵSingleFilter as SingleFilter, ɵSortColumnOptions as SortColumnOptions, ɵSortDirection as SortDirection, ɵSubQueryColumn as SubQueryColumn, ɵSubQueryExpression as SubQueryExpression, ɵSubQueryExpressionConfig as SubQueryExpressionConfig, ɵSubscription as Subscription, ɵTeardownLogic as TeardownLogic, ɵType as Type, ɵUpdateQuery as UpdateQuery, ɵValidationUtilities as ValidationUtilities, ɵViewModelContext as ViewModelContext, ɵWindowFunctionColumn as WindowFunctionColumn, ɵWindowFunctionExpression as WindowFunctionExpression, ɵWindowFunctionExpressionConfig as WindowFunctionExpressionConfig, ɵencodeDate as encodeDate, ɵgenerateGuid as generateGuid, ɵisEmptyGuid as isEmptyGuid, ɵisGuid as isGuid, ɵtoLocalISOString as toLocalISOString } from '@creatio/base';
3
+
4
+ /**
5
+ * @internal
6
+ */
7
+ declare enum DataSourceLoadType {
8
+ LoadNext = "loadNext",
9
+ Load = "load",
10
+ Reload = "reload"
11
+ }
12
+
13
+ /**
14
+ * @public
15
+ * @description Enum representing the status of a process.
16
+ */
17
+ declare enum ProcessStatus {
18
+ /**
19
+ * The process is inactive.
20
+ */
21
+ Inactive = 0,
22
+ /**
23
+ * The process is currently running.
24
+ */
25
+ Running = 1,
26
+ /**
27
+ * The process has completed successfully.
28
+ */
29
+ Completed = 2,
30
+ /**
31
+ * The process encountered an error.
32
+ */
33
+ Error = 3,
34
+ /**
35
+ * The process was cancelled.
36
+ */
37
+ Cancelled = 4
38
+ }
39
+
40
+ /**
41
+ * @internal
42
+ */
43
+ declare enum ViewElementProperty {
44
+ Readonly = "READONLY_PROPERTY",
45
+ Disabled = "DISABLED_PROPERTY"
46
+ }
47
+
48
+ /**
49
+ * @public
50
+ * @description List of actions which can be performed on collection with a public API.
51
+ */
52
+ declare enum ViewModelCollectionActionType {
53
+ /**
54
+ * @description Create a collection element.
55
+ */
56
+ Add = "add",
57
+ /**
58
+ * @description Remove an element from collection.
59
+ */
60
+ Remove = "remove",
61
+ /**
62
+ * @description Update an element in collection.
63
+ */
64
+ Move = "move",
65
+ /**
66
+ * @description Reload collection with new elements.
67
+ */
68
+ Reload = "reload"
69
+ }
70
+
71
+ /**
72
+ * @public
73
+ * @description Hierarchy state where collapsed nodes are inferred and expanded nodes are listed explicitly.
74
+ * @property {'collapsed'} mode State mode identifier.
75
+ * @property {string[]} expandedIds Identifiers of expanded hierarchy nodes.
76
+ */
77
+ interface HierarchyStateCollapsed {
78
+ /**
79
+ * @description State mode identifier.
80
+ */
81
+ mode: 'collapsed';
82
+ /**
83
+ * @description Identifiers of expanded hierarchy nodes.
84
+ */
85
+ expandedIds: string[];
86
+ }
87
+ /**
88
+ * @public
89
+ * @description Hierarchy state where expanded nodes are inferred and collapsed nodes are listed explicitly.
90
+ * @property {'expanded'} mode State mode identifier.
91
+ * @property {string[]} collapsedIds Identifiers of collapsed hierarchy nodes.
92
+ */
93
+ interface HierarchyStateExpanded {
94
+ /**
95
+ * @description State mode identifier.
96
+ */
97
+ mode: 'expanded';
98
+ /**
99
+ * @description Identifiers of collapsed hierarchy nodes.
100
+ */
101
+ collapsedIds: string[];
102
+ }
103
+ /**
104
+ * @public
105
+ * @description Union type that describes all supported hierarchy row states.
106
+ */
107
+ type HierarchyState = HierarchyStateCollapsed | HierarchyStateExpanded;
108
+ /**
109
+ * @public
110
+ * @description Determines whether the hierarchy node with the specified identifier is expanded
111
+ * based on the provided hierarchy state.
112
+ * @param hierarchyState Hierarchy state object.
113
+ * @param itemId Identifier of the hierarchy node.
114
+ * @returns True if the node is expanded; otherwise, false.
115
+ * @remarks If the hierarchy state is not provided or does not contain necessary information,
116
+ * the function returns false.
117
+ */
118
+ declare function isHierarchicalItemExpanded(hierarchyState: HierarchyState | undefined, itemId: string): boolean;
119
+
120
+ /**
121
+ * @description Common hierarchy options shared between client-side and server-side hierarchy modes.
122
+ * @property {'ClientSide' | 'ServerSide'} type Type of hierarchy handling.
123
+ * @property {string} hierarchicalColumnName Name of the column that defines the hierarchy.
124
+ * @property {string} hierarchicalColumnValue Value of the hierarchical column to start loading from.
125
+ */
126
+ interface BaseDataSourceHierarchyConfig {
127
+ /**
128
+ * @description Type of hierarchy handling.
129
+ */
130
+ type?: 'ClientSide' | 'ServerSide';
131
+ /**
132
+ * @description Name of the column that defines the hierarchy.
133
+ */
134
+ hierarchicalColumnName: string;
135
+ /**
136
+ * @description Value of the hierarchical column to start loading from.
137
+ */
138
+ hierarchicalColumnValue?: string;
139
+ }
140
+ /**
141
+ * @public
142
+ * @description Configuration for client-side hierarchy processing.
143
+ * @property {'ClientSide'} type Type of hierarchy handling.
144
+ * @property {string} hierarchicalColumnName Name of the column that defines the hierarchy.
145
+ * @property {string} hierarchicalColumnValue Value of the hierarchical column to start loading from.
146
+ * @property {string} hierarchicalChildrenCountColumnName Name of the column with children count for a node.
147
+ * @property {HierarchyState} hierarchicalState State of hierarchical rows (expanded/collapsed).
148
+ */
149
+ interface ClientSideDataSourceHierarchyConfig extends BaseDataSourceHierarchyConfig {
150
+ /**
151
+ * @description Type of hierarchy handling.
152
+ */
153
+ type: 'ClientSide';
154
+ /**
155
+ * @description Name of the column with children count for a node.
156
+ */
157
+ hierarchicalChildrenCountColumnName?: string;
158
+ /**
159
+ * @description State of hierarchical rows (expanded/collapsed).
160
+ */
161
+ hierarchicalState?: HierarchyState;
162
+ }
163
+ /**
164
+ * @public
165
+ * @description Configuration for server-side hierarchy processing.
166
+ * @property {'ServerSide'} type Type of hierarchy handling.
167
+ * @property {string} hierarchicalColumnName Name of the column that defines the hierarchy.
168
+ * @property {string} hierarchicalColumnValue Value of the hierarchical column to start loading from.
169
+ * @property {FilterGroup} hierarchicalColumnFiltersValue Filters to be applied on the hierarchical column.
170
+ * @property {number} hierarchicalMaxDepth Maximum depth of the hierarchy to be loaded.
171
+ * @property {boolean} hierarchicalFullDataLoad Whether to load the full hierarchy data.
172
+ */
173
+ interface ServerSideDataSourceHierarchyConfig extends BaseDataSourceHierarchyConfig {
174
+ /**
175
+ * @description Type of hierarchy handling.
176
+ */
177
+ type?: 'ServerSide';
178
+ /**
179
+ * @description Filters to be applied on the hierarchical column.
180
+ */
181
+ hierarchicalColumnFiltersValue?: _FilterGroup;
182
+ /**
183
+ * @description Maximum depth of the hierarchy to be loaded.
184
+ */
185
+ hierarchicalMaxDepth?: number;
186
+ /**
187
+ * @description Whether to load the full hierarchy data.
188
+ */
189
+ hierarchicalFullDataLoad?: boolean;
190
+ }
191
+ /**
192
+ * @public
193
+ * @description Union type describing all supported hierarchy configuration modes.
194
+ */
195
+ type DataSourceHierarchyConfig = ClientSideDataSourceHierarchyConfig | ServerSideDataSourceHierarchyConfig;
196
+ /**
197
+ * @public
198
+ * @description Checks whether hierarchy configuration is client-side.
199
+ * @param hierarchyConfig Hierarchy configuration to check.
200
+ * @returns `true` if configuration is of type `ClientSideDataSourceHierarchyConfig`.
201
+ */
202
+ declare function isClientSideDataSourceHierarchyConfig(hierarchyConfig: DataSourceHierarchyConfig | undefined): hierarchyConfig is ClientSideDataSourceHierarchyConfig;
203
+ /**
204
+ * @public
205
+ * @description Checks whether hierarchy configuration is server-side.
206
+ * @param hierarchyConfig Hierarchy configuration to check.
207
+ * @returns `true` if configuration is of type `ServerSideDataSourceHierarchyConfig`.
208
+ */
209
+ declare function isServerSideDataSourceHierarchyConfig(hierarchyConfig: DataSourceHierarchyConfig | undefined): hierarchyConfig is ServerSideDataSourceHierarchyConfig;
210
+
211
+ /**
212
+ * @public
213
+ * @description Represents a set of loading options.
214
+ * @property {string} pagingConfig - The paging options for loading.
215
+ * @property {string} sortingConfig - The sorting options.
216
+ * @property {DataSourceHierarchyConfig} hierarchyConfig - The hierarchy options.
217
+ */
218
+ interface DataSourceLoadOptions extends _DataSourceLoadOptions {
219
+ /**
220
+ * @description Hierarchy options.
221
+ */
222
+ hierarchyConfig?: DataSourceHierarchyConfig;
223
+ /**
224
+ * @internal
225
+ */
226
+ loadType?: DataSourceLoadType;
227
+ /**
228
+ * @internal
229
+ */
230
+ throttled?: boolean;
231
+ /**
232
+ * @internal
233
+ */
234
+ isDistinct?: boolean;
235
+ }
236
+
237
+ /**
238
+ * @internal
239
+ */
240
+ interface FileViewerOptions {
241
+ zoom?: number;
242
+ [key: string]: unknown;
243
+ }
244
+
245
+ /**
246
+ * @internal
247
+ * @hostPublicApi
248
+ */
249
+ interface AttributeValueConfig {
250
+ uId?: _Guid;
251
+ attributeName: string;
252
+ value: unknown;
253
+ caption?: string;
254
+ dataValueType?: _DataValueType;
255
+ referenceSchemaUId?: _Guid;
256
+ referenceSchemaName?: string;
257
+ }
258
+
259
+ /**
260
+ * @internal
261
+ */
262
+ interface GroupedDateValue {
263
+ value: number;
264
+ datePartType: _DatePartType;
265
+ }
266
+
267
+ /**
268
+ * @internal
269
+ */
270
+ interface FileValue extends _LookupValue {
271
+ url?: string;
272
+ extension?: string;
273
+ fileType?: string;
274
+ size?: number;
275
+ entitySchemaUid?: string;
276
+ }
277
+
278
+ /**
279
+ * @internal
280
+ */
281
+ type OptionsChangeListener = (options: FileViewerOptions) => void;
282
+ /**
283
+ * @internal
284
+ */
285
+ type UnsubscribeFn = () => void;
286
+ /**
287
+ * @internal
288
+ */
289
+ type OptionChangeSubscribeFn = (listener: OptionsChangeListener) => UnsubscribeFn;
290
+ /**
291
+ * @internal
292
+ */
293
+ interface OptionChangeSubscription {
294
+ subscribe: OptionChangeSubscribeFn;
295
+ }
296
+ /**
297
+ * @internal
298
+ */
299
+ declare abstract class FileViewerInstance {
300
+ private readonly _handlerChain;
301
+ private readonly _optionsChangeListeners;
302
+ protected options: FileViewerOptions;
303
+ /**
304
+ * Subscription that notifies when options change.
305
+ */
306
+ readonly optionsChanged: OptionChangeSubscription;
307
+ /**
308
+ * Processes a request.
309
+ * @param requestType Request type.
310
+ * @param payload Request payload.
311
+ */
312
+ protected processRequest(requestType: string, payload: Record<string, unknown>): Promise<unknown>;
313
+ /**
314
+ * Initializes the file viewer instance.
315
+ * @param container DOM element for injection.
316
+ */
317
+ abstract initialize(container: HTMLElement): Promise<unknown>;
318
+ /**
319
+ * Loads a document into the file viewer.
320
+ * @param file File value.
321
+ */
322
+ abstract loadDocument(file: FileValue): Promise<boolean>;
323
+ /**
324
+ * Sets options for the file viewer instance.
325
+ * @param options Options to set.
326
+ */
327
+ setOptions(options: FileViewerOptions): Promise<unknown>;
328
+ /**
329
+ * Cleans up resources used by the instance.
330
+ */
331
+ destroy(): Promise<void>;
332
+ }
333
+
334
+ /**
335
+ * @internal
336
+ */
337
+ declare class FileViewerFactory {
338
+ private static readonly _instances;
339
+ /**
340
+ * Registers a file viewer instance type with a given name.
341
+ * @param name Name.
342
+ * @param instanceType Instance type.
343
+ */
344
+ static registerFileViewer(name: string, instanceType: _Type<FileViewerInstance>): void;
345
+ /**
346
+ * Creates a file viewer instance by name.
347
+ * @param name Name.
348
+ */
349
+ static createFileViewerInstance(name: string): FileViewerInstance | undefined;
350
+ }
351
+
352
+ /**
353
+ * @internal
354
+ */
355
+ declare function toAggregationType(aggregationFunction: _AggregationFunction): _AggregationType;
356
+ /**
357
+ * @internal
358
+ */
359
+ declare function toAggregationFunction(aggregationType: _AggregationType): _AggregationFunction;
360
+ /**
361
+ * @internal
362
+ */
363
+ declare function toAggregationEvalType(aggregationEval: _AggregationEval): _AggregationEvalType;
364
+ /**
365
+ * @internal
366
+ */
367
+ declare function toAggregationEval(aggregationEvalType: _AggregationEvalType): _AggregationEval;
368
+
369
+ /**
370
+ * @internal
371
+ */
372
+ declare function toDatePartType(aggregationFunction: _DatePart): _DatePartType;
373
+ /**
374
+ * @internal
375
+ */
376
+ declare function toDatePart(aggregationType: _DatePartType): _DatePart;
377
+
378
+ /**
379
+ * @internal
380
+ */
381
+ declare function toStringFunctionType(functionType: _FunctionType): _FunctionStringType;
382
+ /**
383
+ * @internal
384
+ */
385
+ declare function toNumericFunctionType(functionType: _FunctionStringType): _FunctionType;
386
+
387
+ /**
388
+ * @internal
389
+ */
390
+ declare function toOrderDirection(sortDirection: _SortDirection): _OrderDirection;
391
+ /**
392
+ * @internal
393
+ */
394
+ declare function toSortDirection(orderDirection: _OrderDirection): _SortDirection;
395
+
396
+ /**
397
+ * @internal
398
+ */
399
+ declare const crtInputPrefix = "crtInput:";
400
+ /**
401
+ * @internal
402
+ */
403
+ declare const crtOutputPrefix = "crtOutput:";
404
+ /**
405
+ * @internal
406
+ */
407
+ declare const crtValidationInputPrefix = "crtValidationInput:";
408
+ /**
409
+ * @internal
410
+ */
411
+ declare const crtInjectPrefix = "crtInject:";
412
+
413
+ /**
414
+ * @internal
415
+ */
416
+ declare const VIEW_ELEMENT_DEFAULT_HEIGHT = "39px";
417
+
418
+ declare abstract class BaseHandlerChainService {
419
+ /**
420
+ * @internal
421
+ */
422
+ abstract readonly requestType: string;
423
+ }
424
+
425
+ /**
426
+ * @internal
427
+ */
428
+ declare function ImplementUsingHandlerChain(config?: {
429
+ requestType?: string;
430
+ methodName?: string;
431
+ omitResult?: boolean;
432
+ }): (target: BaseHandlerChainService | any, method: string, descriptor?: TypedPropertyDescriptor<any>) => void;
433
+
434
+ /**
435
+ * @internal
436
+ * @hostPublicApi
437
+ * @interface BaseInterfaceDesignerItemRegistrationConfig
438
+ * @description Registration config for defining user components in Creatio platform.
439
+ * @property {string} type - type of view element. Used to specify view element in schema.
440
+ *
441
+ * @example
442
+ * const config: BaseInterfaceDesignerItemRegistrationConfig = {
443
+ * type: 'usr.Component',
444
+ * }
445
+ */
446
+ interface BaseInterfaceDesignerItemRegistrationConfig {
447
+ type?: string;
448
+ typeRef?: _Type;
449
+ }
450
+
451
+ /**
452
+ * @internal
453
+ * @hostPublicApi
454
+ */
455
+ declare enum ViewElementGroupType {
456
+ Charts = "Charts",
457
+ Components = "Components",
458
+ LayoutElements = "LayoutElements",
459
+ Inputs = "Inputs",
460
+ CustomElements = "CustomElements"
461
+ }
462
+
463
+ /**
464
+ * @internal
465
+ * @hostPublicApi
466
+ */
467
+ declare enum ViewElementDataGroupType {
468
+ Data = "Data"
469
+ }
470
+ /**
471
+ * @internal
472
+ * @hostPublicApi
473
+ */
474
+ type DesignerToolGroupType = ViewElementDataGroupType | ViewElementGroupType;
475
+ /**
476
+ * @internal
477
+ * @hostPublicApi
478
+ */
479
+ declare const DesignerToolGroupType: {
480
+ Charts: ViewElementGroupType.Charts;
481
+ Components: ViewElementGroupType.Components;
482
+ LayoutElements: ViewElementGroupType.LayoutElements;
483
+ Inputs: ViewElementGroupType.Inputs;
484
+ CustomElements: ViewElementGroupType.CustomElements;
485
+ Data: ViewElementDataGroupType.Data;
486
+ };
487
+
488
+ /**
489
+ * Handler source types in order of call priority.
490
+ * @internal
491
+ * @hostPublicApi
492
+ */
493
+ declare enum HandlerSourceType {
494
+ Schema = 0,
495
+ Remote = 1,
496
+ Host = 2
497
+ }
498
+
499
+ /**
500
+ * @internal
501
+ */
502
+ type InternalToolbarViewElementConfig = BaseToolbarViewElementConfig & ExtraToolbarViewElementConfig;
503
+ /**
504
+ * @internal
505
+ */
506
+ type InternalToolbarViewElementCollectionItemConfig = ToolbarViewElementConfig & ExtraToolbarViewElementConfig;
507
+ /**
508
+ * @internal
509
+ */
510
+ type InternalToolbarViewElementConfigCollection = Array<InternalToolbarViewElementCollectionItemConfig>;
511
+ /**
512
+ * @internal
513
+ */
514
+ type ToolbarViewElementConfigType = InternalToolbarViewElementConfig | InternalToolbarViewElementConfigCollection;
515
+ /**
516
+ * @internal
517
+ * @hostPublicApi
518
+ */
519
+ interface ToolbarViewElementConfig extends BaseToolbarViewElementConfig {
520
+ caption: string;
521
+ }
522
+ /**
523
+ * @internal
524
+ * @hostPublicApi
525
+ */
526
+ interface DefaultSizeForGrid {
527
+ heightPx?: number;
528
+ colSpanPercentage?: number;
529
+ }
530
+ /**
531
+ * @internal
532
+ * @hostPublicApi
533
+ */
534
+ interface ToolbarDefaultSize {
535
+ [container: string]: DefaultSizeForGrid;
536
+ }
537
+ /**
538
+ * @internal
539
+ * @hostPublicApi
540
+ */
541
+ interface ToolbarExtraProps {
542
+ defaultSize?: {
543
+ [element: string]: ToolbarDefaultSize;
544
+ };
545
+ }
546
+ /**
547
+ * @internal
548
+ * @hostPublicApi
549
+ */
550
+ interface BaseToolbarViewElementConfig {
551
+ icon: string;
552
+ hint?: string;
553
+ defaultPropertyValues?: Record<string, unknown>;
554
+ groupType?: DesignerToolGroupType;
555
+ /**
556
+ * Toolbar's element identifier.
557
+ */
558
+ id?: string;
559
+ defaultSize?: ToolbarDefaultSize;
560
+ }
561
+ /**
562
+ * @internal
563
+ */
564
+ interface ExtraToolbarViewElementConfig {
565
+ defaultLocalizableStrings?: Record<string, unknown>;
566
+ addCommandTypeName?: string;
567
+ position?: number;
568
+ requiredPackages?: string[];
569
+ requiredFeatures?: Record<string, boolean>;
570
+ }
571
+
572
+ /**
573
+ * @internal
574
+ * @hostPublicApi
575
+ */
576
+ declare class InterfaceDesignerItemRegistrationConfig implements BaseInterfaceDesignerItemRegistrationConfig {
577
+ toolbarConfig: ToolbarViewElementConfig;
578
+ viewElementGroupType: ViewElementGroupType;
579
+ typeCaption?: string;
580
+ typeRef?: _Type;
581
+ }
582
+
583
+ /**
584
+ * @public
585
+ * @description Render strategy for view element.
586
+ */
587
+ declare enum ViewElementRenderStrategy {
588
+ /**
589
+ * @description Default render strategy.
590
+ * The element is rendered immediately.
591
+ */
592
+ Default = "default",
593
+ /**
594
+ * @description On viewport render strategy.
595
+ * The element is rendered only when it becomes visible in the viewport.
596
+ */
597
+ OnViewport = "on-viewport"
598
+ }
599
+
600
+ /**
601
+ * @internal
602
+ */
603
+ declare enum ViewElementReuseStrategy {
604
+ /**
605
+ * Reuse the previously created view element when its state changes
606
+ * To use this strategy, the view element must meet the following requirements:
607
+ * 1. View element must load data via an external data source or calculated attributes, never on its own
608
+ * 2. State of view element should be fully bound to input properties
609
+ * 3. View element should not depend on input properties setting order
610
+ * 4. View element should not directly use services working with schema and profile
611
+ * (e.g. SchemaService, SchemaPartsService)
612
+ * Details: https://creatio.atlassian.net/wiki/spaces/TER/pages/2878439446/View+Element+Reuse+Strategy
613
+ */
614
+ Reuse = 0,
615
+ /**
616
+ * Rerender (recreate) the view element when its state changes
617
+ */
618
+ Rerender = 1
619
+ }
620
+
621
+ /**
622
+ * @public
623
+ * @description Config to specify view element slot.
624
+ */
625
+ interface ViewElementSlotDefinition {
626
+ /**
627
+ * @description Slot name.
628
+ */
629
+ name: string;
630
+ /**
631
+ * @internal
632
+ * Indicates that slot elements should be wrapped by ng-template.
633
+ */
634
+ lazy: boolean;
635
+ /**
636
+ * @internal
637
+ * Indicates that slot items also should be set into input property.
638
+ * It can be useful to access content item property without passing them via DOM attributes.
639
+ */
640
+ input: boolean;
641
+ }
642
+
643
+ /**
644
+ * @public
645
+ */
646
+ declare class CrtInputRegistrationConfig {
647
+ /**
648
+ * @internal
649
+ */
650
+ propertyBindable?: boolean;
651
+ /**
652
+ * @internal
653
+ */
654
+ defaultValue?: unknown;
655
+ /**
656
+ * @internal
657
+ */
658
+ propertyName?: ViewElementProperty;
659
+ /**
660
+ * @internal
661
+ */
662
+ reuseStrategy?: {
663
+ resetValue: boolean;
664
+ };
665
+ }
666
+
667
+ /**
668
+ * @public
669
+ * @description Registration config for defining user components in Creatio platform.
670
+ * @property {string} type - type of view element. Used to specify view element in schema.
671
+ * @property {Record<string, CrtInputRegistrationConfig>=} inputs {@link CrtInputRegistrationConfig} - map
672
+ * of component inputs. Communication chanel to send update from Creatio platform to component
673
+ * @property {Record<string, unknown>=} outputs - map of component outputs.
674
+ * Communication chanel to send update from component to Creatio platform.
675
+ * @property {Record<string, unknown>=} validationInputs - map of component validationInputs.
676
+ * Communication chanel to receive updates relates to validation.
677
+ * To properly declare validationInfo field:
678
+ * 1. Declare input field inside inputs section. For example `count`
679
+ * 2. In validationInputs section declare same field which ends with ValidationInfo.
680
+ * For previous example `countValidationInfo`
681
+ *
682
+ * @example
683
+ * const config: BaseViewElementRegistrationConfig = {
684
+ * type: 'usr.Component',
685
+ * inputs: {
686
+ * entitySchemaName: {},
687
+ * user: {},
688
+ * count: {}
689
+ * },
690
+ * outputs: {
691
+ * countChange: {}
692
+ * },
693
+ * validationInputs: {
694
+ * countValidationInfo: {}
695
+ * }
696
+ * }
697
+ */
698
+ type BaseViewElementRegistrationConfig = {
699
+ /**
700
+ * @description type of view element. Used to specify view element in schema.
701
+ */
702
+ type: string;
703
+ /**
704
+ * @description Defines the content slots for the view element.
705
+ * The property allows you to project content from a parent component to a child component.
706
+ */
707
+ contentSlots?: Array<string | ViewElementSlotDefinition>;
708
+ /**
709
+ * @description {@link CrtInputRegistrationConfig} map
710
+ * of component inputs. Communication chanel to send update from Creatio platform to component
711
+ */
712
+ inputs?: Record<string, CrtInputRegistrationConfig>;
713
+ /**
714
+ * @description map of component outputs.
715
+ * Communication chanel to send update from component to Creatio platform.
716
+ */
717
+ outputs?: Record<string, unknown>;
718
+ /**
719
+ * @description map of component validationInputs.
720
+ * Communication chanel to receive updates relates to validation.
721
+ * To properly declare validationInfo field:
722
+ * 1. Declare input field inside inputs section. For example `count`
723
+ * 2. In validationInputs section declare same field which ends with ValidationInfo.
724
+ * For previous example `countValidationInfo`
725
+ */
726
+ validationInputs?: Record<string, unknown>;
727
+ /**
728
+ * @internal
729
+ */
730
+ reuseStrategy?: ViewElementReuseStrategy;
731
+ /**
732
+ * @internal
733
+ * @description List of compatible platform APIs.
734
+ */
735
+ compatibleAPIs?: _CompatibleAPIs;
736
+ } & (OnViewportRenderConfig | DefaultRenderConfig);
737
+ /**
738
+ * @public
739
+ * @description Render config for an element with OnViewport render strategy.
740
+ */
741
+ interface OnViewportRenderConfig {
742
+ /**
743
+ * @description Determines that the element should render on entering the viewport.
744
+ */
745
+ renderStrategy: ViewElementRenderStrategy.OnViewport;
746
+ /**
747
+ * @description The size of the placeholder displayed while the element is
748
+ * being rendered.
749
+ */
750
+ placeholderSize: {
751
+ height: string;
752
+ };
753
+ }
754
+ /**
755
+ * @public
756
+ * @description Render config for an element with Default render strategy.
757
+ */
758
+ interface DefaultRenderConfig {
759
+ /**
760
+ * @description Determines that the element should render immediately.
761
+ */
762
+ renderStrategy?: ViewElementRenderStrategy.Default;
763
+ }
764
+
765
+ /**
766
+ * @public
767
+ * @description Config to specify view element options.
768
+ * @extends {BaseViewElementRegistrationConfig} {@link BaseViewElementRegistrationConfig}
769
+ * @property {string} selector - view element tag selector; View element appears in DOM with this selector.
770
+ *
771
+ * @example
772
+ * ```
773
+ * @CrtViewElement({
774
+ * type: 'usr.Example',
775
+ * selector: 'usr-example',
776
+ * })
777
+ * ```
778
+ */
779
+ type ViewElementRegistrationConfig = BaseViewElementRegistrationConfig & {
780
+ /**
781
+ * @description view element tag selector; View element appears in DOM with this selector.
782
+ */
783
+ selector: string;
784
+ };
785
+
786
+ /**
787
+ * @internal
788
+ */
789
+ type InternalInterfaceDesignerItemRegistrationConfig = BaseInterfaceDesignerItemRegistrationConfig & {
790
+ /**
791
+ * @internal
792
+ */
793
+ formControlConfig?: any;
794
+ /**
795
+ * @internal
796
+ */
797
+ toolbarConfig?: ToolbarViewElementConfigType;
798
+ /**
799
+ * @internal
800
+ */
801
+ designControlConfig?: {
802
+ allowDesignContent?: boolean;
803
+ selfSelect?: boolean;
804
+ defaultValues?: Record<string, unknown>;
805
+ };
806
+ /**
807
+ * @internal
808
+ */
809
+ dataValueTypes?: _DataValueType[];
810
+ /**
811
+ * @internal
812
+ */
813
+ designViewItemCommands?: {
814
+ copy?: string;
815
+ update?: string;
816
+ delete?: string;
817
+ create?: string;
818
+ rename?: string;
819
+ };
820
+ /**
821
+ * @internal
822
+ */
823
+ pageDesignerPropertiesPanelSchemaName?: string;
824
+ /**
825
+ * @internal
826
+ */
827
+ propertiesPanel?: string;
828
+ /**
829
+ * @internal
830
+ */
831
+ clientSchemaDeps?: string[];
832
+ /**
833
+ * @internal
834
+ * @deprecated Use contentSlots instead.
835
+ */
836
+ collectionPropertyNames?: string[];
837
+ /**
838
+ * @internal
839
+ */
840
+ viewElementGroupType?: ViewElementGroupType;
841
+ /**
842
+ * @internal
843
+ */
844
+ typeCaption?: string;
845
+ /**
846
+ * @internal
847
+ */
848
+ referenceSchemaNames?: string[];
849
+ /**
850
+ * @internal
851
+ */
852
+ disableElementRename?: boolean;
853
+ } & (OnViewportRenderConfig | DefaultRenderConfig);
854
+
855
+ /**
856
+ * @internal
857
+ */
858
+ type CrtAngularViewElementConfig = BaseViewElementRegistrationConfig & {
859
+ /**
860
+ * @internal
861
+ */
862
+ formControlConfig?: {
863
+ relatesTo: string;
864
+ };
865
+ /**
866
+ * @internal
867
+ */
868
+ valuePropertyName?: string;
869
+ };
870
+ /**
871
+ * @internal
872
+ * @hostPublicApi
873
+ */
874
+ type AngularViewElementRegistrationConfig = CrtAngularViewElementConfig & {
875
+ /**
876
+ * @internal
877
+ */
878
+ typeRef?: _Type;
879
+ };
880
+
881
+ /**
882
+ * @public
883
+ * @description Config used to register converter in Creatio platform.
884
+ * @property {string} type - type of validator
885
+ */
886
+ interface ConverterConfig {
887
+ /**
888
+ * @description type used to register converter in Creatio platform.
889
+ */
890
+ type: string;
891
+ }
892
+
893
+ /**
894
+ * @public
895
+ * @description Config to register request handler.
896
+ * @property {string} type - The type of request handler.
897
+ * @property {string} requestType - The type of request for which the handler will be triggered.
898
+ * @property {string[]} scopes - Scopes of the request for which the handler will be triggered
899
+ */
900
+ interface RequestHandlerDefinition {
901
+ /**
902
+ * The type of request handler.
903
+ * @example
904
+ * 'crt.EventHandlerType'
905
+ */
906
+ readonly type: string;
907
+ /**
908
+ * The type of request for which the handler will be triggered.
909
+ * @example
910
+ * 'crt.EventType'
911
+ */
912
+ readonly requestType: string;
913
+ /**
914
+ * Scopes of the request for which the handler will be triggered
915
+ */
916
+ readonly scopes?: string[];
917
+ }
918
+
919
+ /**
920
+ * @public
921
+ * @description Validation error with message
922
+ * @property {string} message - error message.
923
+ */
924
+ interface CrtValidationError {
925
+ /**
926
+ * @description error message.
927
+ */
928
+ message: string;
929
+ }
930
+ /**
931
+ * @public
932
+ * @description Generic shape of validation errors
933
+ */
934
+ interface CrtValidationErrors {
935
+ [key: string]: CrtValidationError;
936
+ }
937
+
938
+ /**
939
+ * @public
940
+ * @description Information relates validation.
941
+ * Includes fields to customize behavior depends on validation
942
+ * @property {boolean} valid - indicates whether input is valid.
943
+ * @property {CrtValidationErrors | null} errors - validation errors shape. {@link CrtValidationErrors}
944
+ * @property {boolean} dirty - indicates whether input was changed.
945
+ * @property {boolean} touched - indicates whether input was touched.
946
+ */
947
+ interface CrtValidationInfo {
948
+ /**
949
+ * @description indicates whether input is valid.
950
+ */
951
+ readonly valid: boolean;
952
+ /**
953
+ * @description - validation errors shape. {@link CrtValidationErrors}
954
+ */
955
+ readonly errors: CrtValidationErrors | null;
956
+ /**
957
+ * @description indicates whether input was changed.
958
+ */
959
+ readonly dirty: boolean;
960
+ /**
961
+ * @description indicates whether input was touched.
962
+ */
963
+ readonly touched: boolean;
964
+ }
965
+
966
+ /**
967
+ * @public
968
+ * @description Shape for specifying parameters passed to validator
969
+ * @property {string} message - message should be displayed for error;
970
+ */
971
+ interface ValidatorParametersValues {
972
+ [name: string]: unknown;
973
+ message?: string;
974
+ }
975
+
976
+ /**
977
+ * @public
978
+ * @description Control state passed for validators
979
+ * @property {unknown} value - control value
980
+ */
981
+ interface CrtControlState {
982
+ /**
983
+ * @description control value
984
+ */
985
+ value: unknown;
986
+ }
987
+
988
+ /**
989
+ * @public
990
+ * @description Function used for validation
991
+ * @param controlState - {@link CrtControlState}
992
+ * @param params - incoming parameters for validation {@link ValidatorParametersValues}
993
+ */
994
+ type CrtValidatorFn = (controlState: CrtControlState, params?: ValidatorParametersValues) => CrtValidationErrors | null | Promise<CrtValidationErrors | null>;
995
+
996
+ /**
997
+ * @public
998
+ * @description Abstract Base Validator class for designing custom validators.
999
+ * @example
1000
+ * @CrtValidator({
1001
+ * type: 'crt.Required',
1002
+ * })
1003
+ * export class RequiredValidator extends BaseValidator {
1004
+ * protected override async = false;
1005
+ * public validate(controlState: CrtControlState, params?: ValidatorParametersValues): CrtValidationErrors | null {
1006
+ * Implementation here...
1007
+ * }
1008
+ * }
1009
+ */
1010
+ declare abstract class BaseValidator {
1011
+ /**
1012
+ * @internal
1013
+ * @dontChange
1014
+ */
1015
+ private static readonly _instanceOfKey;
1016
+ /**
1017
+ * @abstract
1018
+ * @description indicator to recognize whether validator asynchronous or synchronous
1019
+ */
1020
+ protected abstract async: boolean;
1021
+ /**
1022
+ * @description getter for async/sync indicator
1023
+ */
1024
+ get isAsync(): boolean;
1025
+ /**
1026
+ * @description Function used for validation
1027
+ */
1028
+ get validateFn(): CrtValidatorFn;
1029
+ /**
1030
+ * @internal
1031
+ */
1032
+ static [Symbol.hasInstance](instance: BaseValidator): boolean;
1033
+ /**
1034
+ * @description Method which contains main logic relates validation.
1035
+ * @param controlState - {@link CrtControlState}
1036
+ * @param params - incoming parameters for validation {@link ValidatorParametersValues}
1037
+ */
1038
+ abstract validate(controlState: CrtControlState, params?: ValidatorParametersValues): CrtValidationErrors | null | Promise<CrtValidationErrors | null>;
1039
+ }
1040
+
1041
+ /**
1042
+ * @internal
1043
+ */
1044
+ interface ValidatorParameters {
1045
+ name: string;
1046
+ }
1047
+
1048
+ /**
1049
+ * @public
1050
+ * @description Config used to register validator in Creatio platform.
1051
+ * @property {string} type - type of validator
1052
+ */
1053
+ interface ValidatorConfig {
1054
+ /**
1055
+ * @description Config used to register validator in Creatio platform.
1056
+ */
1057
+ type: string;
1058
+ /**
1059
+ * @internal
1060
+ */
1061
+ params?: ValidatorParameters[];
1062
+ /**
1063
+ * @internal
1064
+ */
1065
+ scope?: string;
1066
+ }
1067
+
1068
+ /**
1069
+ * @internal
1070
+ */
1071
+ interface LazyModuleDefinition {
1072
+ load: () => Promise<_Type>;
1073
+ }
1074
+ /**
1075
+ * @internal
1076
+ */
1077
+ interface LazyModuleMetadata {
1078
+ includes?: LazyModuleMetadata[];
1079
+ viewElements?: CrtAngularViewElementConfig[];
1080
+ validators?: ValidatorConfig[];
1081
+ requestHandlers?: RequestHandlerDefinition[];
1082
+ converters?: ConverterConfig[];
1083
+ }
1084
+ /**
1085
+ * @internal
1086
+ */
1087
+ interface LazyModuleDefinitionWithMetadata extends LazyModuleDefinition, LazyModuleMetadata {
1088
+ }
1089
+
1090
+ /**
1091
+ * @public
1092
+ * @description Shape to implementing Converter.
1093
+ * @template V
1094
+ * @template R
1095
+ */
1096
+ interface Converter<V = unknown, R = unknown> {
1097
+ /**
1098
+ * @description Function which convert incoming value.
1099
+ * @param {V} value - input value.
1100
+ * @param {ViewModelContext} context - view model context.
1101
+ * @param {...unknown[]} arg - arguments rest.
1102
+ * @return {*} {R}
1103
+ */
1104
+ convert(value: V, context: _ViewModelContext, ...args: unknown[]): R;
1105
+ }
1106
+
1107
+ /**
1108
+ * @internal
1109
+ * @hostPublicApi
1110
+ */
1111
+ interface SchemaHandlerSource {
1112
+ type: HandlerSourceType.Schema;
1113
+ schemaName: string;
1114
+ packageName: string;
1115
+ }
1116
+ /**
1117
+ * @internal
1118
+ * @hostPublicApi
1119
+ */
1120
+ interface RemoteHandlerSource {
1121
+ type: HandlerSourceType.Remote;
1122
+ packageName: string;
1123
+ }
1124
+ /**
1125
+ * @internal
1126
+ * @hostPublicApi
1127
+ */
1128
+ interface HostHandlerSource {
1129
+ type: HandlerSourceType.Host;
1130
+ }
1131
+ /**
1132
+ * @internal
1133
+ * @hostPublicApi
1134
+ */
1135
+ type HandlerSource = SchemaHandlerSource | RemoteHandlerSource | HostHandlerSource;
1136
+
1137
+ /**
1138
+ * @internal
1139
+ * @hostPublicApi
1140
+ */
1141
+ interface InjectionContext {
1142
+ id: string;
1143
+ inject(token: unknown): unknown;
1144
+ addLazyModule(type: _Type): void;
1145
+ getLazyModules(source: string): _Type[];
1146
+ connectHostLazyModules(): void;
1147
+ destroy(): void;
1148
+ }
1149
+
1150
+ /**
1151
+ * @internal
1152
+ * @hostPublicApi
1153
+ * @description Factory that produces RequestHandler
1154
+ */
1155
+ type RequestHandlerFactory = (injectionContext?: InjectionContext) => _RequestHandler;
1156
+
1157
+ /**
1158
+ * Represents a deferred feature activation boundary.
1159
+ *
1160
+ * The instance guarantees at-most-once activation per feature while keeping remote-level
1161
+ * activation tracking balanced for the entire activation lifetime.
1162
+ *
1163
+ * @internal
1164
+ */
1165
+ declare class ɵFeatureActivationRef {
1166
+ #private;
1167
+ readonly id: string;
1168
+ readonly sourceName: string;
1169
+ /**
1170
+ * @internal
1171
+ * @dontChange
1172
+ */
1173
+ private static readonly _instanceOfKey;
1174
+ /**
1175
+ * Initializes a feature activation reference.
1176
+ *
1177
+ * @param id - Stable feature identifier.
1178
+ * @param sourceName - Name of the source build that owns the feature.
1179
+ * @param activate - Callback that performs feature activation.
1180
+ */
1181
+ constructor(id: string, sourceName: string, activate: () => Promise<void>);
1182
+ /**
1183
+ * @internal
1184
+ */
1185
+ static [Symbol.hasInstance](instance: unknown): instance is ɵFeatureActivationRef;
1186
+ /**
1187
+ * Indicates whether the activation callback has completed successfully.
1188
+ */
1189
+ get activated(): boolean;
1190
+ /**
1191
+ * Activates the feature if it hasn't been activated yet.
1192
+ */
1193
+ ensureActivated(): Promise<void>;
1194
+ }
1195
+
1196
+ /**
1197
+ * @internal
1198
+ */
1199
+ declare class ɵLazyModuleRef {
1200
+ #private;
1201
+ readonly sourceName: string;
1202
+ get typeRef(): _Type | undefined;
1203
+ /**
1204
+ * Initializes the lazy module reference.
1205
+ *
1206
+ * @param moduleDefinition - Lazy module definition with the loader function.
1207
+ * @param bootstrapFn - Function to call after module is loaded.
1208
+ * @param sourceName - Name of source build ('host' or remote name).
1209
+ */
1210
+ constructor(moduleDefinition: LazyModuleDefinition, bootstrapFn: (type: _Type) => void, sourceName: string);
1211
+ loadAndBootstrap(): Promise<_Type>;
1212
+ }
1213
+
1214
+ /**
1215
+ * Describes a deferred runtime dependency that can be resolved on demand.
1216
+ *
1217
+ * @internal
1218
+ */
1219
+ type ɵLazyLoadRef = ɵLazyModuleRef | ɵFeatureActivationRef;
1220
+ /**
1221
+ * Loads a lazy ref for its side effects.
1222
+ *
1223
+ * @param ref - Lazy reference to resolve.
1224
+ *
1225
+ * @internal
1226
+ */
1227
+ declare function ɵloadLazyRef(ref: ɵLazyLoadRef): Promise<void>;
1228
+ /**
1229
+ * Loads multiple lazy references and collects their resolved module types.
1230
+ *
1231
+ * @param refs - Lazy references to resolve.
1232
+ * @returns List of resolved module types.
1233
+ *
1234
+ * @internal
1235
+ */
1236
+ declare function ɵloadLazyRefs(refs: Iterable<ɵLazyLoadRef>): Promise<_Type[]>;
1237
+
1238
+ /**
1239
+ * @internal
1240
+ */
1241
+ interface LazyRegistryItem {
1242
+ lazy?: boolean;
1243
+ lazyLoadRef?: ɵLazyLoadRef | null;
1244
+ }
1245
+
1246
+ /**
1247
+ * @internal
1248
+ * @hostPublicApi
1249
+ */
1250
+ interface HandlerConfig extends LazyRegistryItem {
1251
+ type?: string;
1252
+ createHandler?: RequestHandlerFactory;
1253
+ requestType: string;
1254
+ scopes?: string[];
1255
+ source: HandlerSource;
1256
+ }
1257
+
1258
+ /**
1259
+ * @public
1260
+ * @class HandlerChainService
1261
+ * @classdesc Service to design handlers in chain.
1262
+ */
1263
+ declare class HandlerChainService {
1264
+ private get _chain();
1265
+ private set _chain(value);
1266
+ private static _instance;
1267
+ static get instance(): HandlerChainService;
1268
+ private constructor();
1269
+ private _createGlobalHandlerChain;
1270
+ /**
1271
+ * @internal
1272
+ */
1273
+ clearContextedHandlersCache(contextId: string): boolean;
1274
+ /**
1275
+ * @internal
1276
+ */
1277
+ register(handlerConfig: HandlerConfig): () => void;
1278
+ /**
1279
+ * @internal
1280
+ */
1281
+ update(handlerConfig: Partial<HandlerConfig>): void;
1282
+ /**
1283
+ * @description Method to process passed request
1284
+ * @param request - {@link ɵBaseRequest}
1285
+ * @return `Promise<unknown>`
1286
+ */
1287
+ process(request: _BaseRequest): Promise<unknown>;
1288
+ /**
1289
+ * @internal
1290
+ * Subscribes to requests.
1291
+ * @param callback A handler function for each request triggered.
1292
+ * @param context (optional) A context in which the requests were triggered.
1293
+ * The `callback` will be called only for requests with specified context.
1294
+ * If not specified, will be called for all requests.
1295
+ * @returns A function to cancel the subscription.
1296
+ */
1297
+ subscribe(callback: (request: _BaseRequest) => void, context?: _ViewModelContext): _TeardownLogic;
1298
+ /**
1299
+ * @internal
1300
+ */
1301
+ clear(): void;
1302
+ }
1303
+
1304
+ /**
1305
+ * @public
1306
+ * @abstract
1307
+ * @classdesc Class for designing request handlers.
1308
+ */
1309
+ declare abstract class BaseRequestHandler<TRequest = _BaseRequest, TResult = unknown> implements _RequestHandler<TRequest, TResult> {
1310
+ /**
1311
+ * @internal
1312
+ * @dontChange
1313
+ */
1314
+ private static readonly _instanceOfKey;
1315
+ private _next?;
1316
+ protected handlerChain: HandlerChainService;
1317
+ protected get next(): _RequestHandler | undefined;
1318
+ /**
1319
+ * @internal
1320
+ */
1321
+ static [Symbol.hasInstance](instance: BaseRequestHandler): boolean;
1322
+ /**
1323
+ * @abstract
1324
+ * @description Abstract async method which contains logic to handle request properly.
1325
+ * @param {TRequest} request - {@link ɵBaseRequest}
1326
+ */
1327
+ abstract handle(request: TRequest): Promise<TResult>;
1328
+ /**
1329
+ * @description Method to set request handler to handler chain.
1330
+ * @param next - link for next request handler - {@link ɵRequestHandler}
1331
+ */
1332
+ setNext(next: _RequestHandler): void;
1333
+ }
1334
+
1335
+ /**
1336
+ * @public
1337
+ * @description Definition of CrtModule. Use this to register elements in Creatio platform.
1338
+ * @property {Type[]} includes - Array of other CrnModules which are included in current.
1339
+ * This allows easily create chains of CrtModules. Bootstrapping will be done through all module chain
1340
+ * @property {Type[]} viewElements - Array of user-defined view elements which will be registered in Creatio platform.
1341
+ * @property {Type[]} validators - Array of user-defined validators which will be registered in Creatio platform.
1342
+ * @property {Type<BaseRequestHandler>[]} requestHandlers - Array of user-defined request handlers
1343
+
1344
+ * which will be registered in Creatio platform.
1345
+ * @example
1346
+ * @CrtModule({
1347
+ * viewElements: [AppComponent, UserComponent],
1348
+ * includes: [NotifyModule],
1349
+ * requestHandlers: [SomeRequestHandler],
1350
+ * })
1351
+ * @NgModule({
1352
+ * declarations: [AppComponent, UserComponent],
1353
+ * imports: [BrowserModule],
1354
+ * providers: [],
1355
+ * })
1356
+ * export class AppModule {}
1357
+ */
1358
+ interface ModuleDefinition {
1359
+ /**
1360
+ * @description Array of other CrtModules which are included in current.
1361
+ * This allows easily create chains of CrtModules. Bootstrapping will be done through all module chain
1362
+ */
1363
+ includes?: _Type[];
1364
+ /**
1365
+ * @description Array of user-defined view elements which will be registered
1366
+ * in Creatio platform.
1367
+ */
1368
+ viewElements?: _Type[];
1369
+ /**
1370
+ * @description Array of user-defined validators which will be registered in Creatio platform
1371
+ */
1372
+ validators?: _Type<BaseValidator>[];
1373
+ /**
1374
+ * @internal
1375
+ */
1376
+ designTimeViewElements?: _Type[];
1377
+ /**
1378
+ * @description Array of user-defined request handlers which will be registered in Creatio platform
1379
+ */
1380
+ requestHandlers?: _Type<BaseRequestHandler>[];
1381
+ /**
1382
+ * @description Array of user-defined converters which will be registered in Creatio platform
1383
+ */
1384
+ converters?: _Type<Converter>[];
1385
+ /**
1386
+ * @internal
1387
+ */
1388
+ handlerChainServices?: _Type<unknown>[];
1389
+ }
1390
+
1391
+ /**
1392
+ * @internal
1393
+ */
1394
+ type InternalModuleDefinition = Omit<ModuleDefinition, 'includes'> & {
1395
+ includes: (_Type | LazyModuleDefinitionWithMetadata)[];
1396
+ };
1397
+
1398
+ /**
1399
+ * @internal
1400
+ * @hostPublicApi
1401
+ */
1402
+ type InterfaceDesignerRegistryItem = (InternalInterfaceDesignerItemRegistrationConfig | InterfaceDesignerItemRegistrationConfig) & {
1403
+ type: string;
1404
+ };
1405
+
1406
+ /**
1407
+ * @internal
1408
+ * @hostPublicApi
1409
+ */
1410
+ type ViewElementRegistryItem = (ViewElementRegistrationConfig | AngularViewElementRegistrationConfig) & LazyRegistryItem;
1411
+
1412
+ /**
1413
+ * @public
1414
+ * A data source exposed by a page context part, grouping records of a single entity schema.
1415
+ */
1416
+ interface ContextDataSourcePart {
1417
+ /** The name of the entity schema the records belong to. */
1418
+ entitySchemaName: string;
1419
+ /** The name of the column used as the display value for each record. */
1420
+ displayColumnName: string;
1421
+ /** Whether the data source represents a collection of records rather than a single record. */
1422
+ isCollection: boolean;
1423
+ /** Whether this is the primary data source of the page. */
1424
+ isPrimary: boolean;
1425
+ /** The records exposed by this data source. */
1426
+ records: Array<ContextDataRecord>;
1427
+ }
1428
+ /**
1429
+ * @public
1430
+ * A single record exposed by a {@link ContextDataSourcePart}.
1431
+ */
1432
+ interface ContextDataRecord {
1433
+ /** The unique identifier of the record. */
1434
+ id: string;
1435
+ /** The display value of the record. */
1436
+ displayColumnValue: string;
1437
+ }
1438
+ /**
1439
+ * @public
1440
+ * Context part describing a Creatio page together with the data sources available on it.
1441
+ */
1442
+ interface CreatioPageContextPart extends BaseContextPart {
1443
+ /** Discriminator identifying the context part as a `CreatioPageContextPart`. */
1444
+ type?: 'CreatioPageContextPart';
1445
+ /** The human-readable title of the page. */
1446
+ title: string;
1447
+ /** The schema name of the page. */
1448
+ pageSchemaName: string;
1449
+ /** The data sources available on the page. */
1450
+ dataSources: Array<ContextDataSourcePart>;
1451
+ }
1452
+ /**
1453
+ * @public
1454
+ * Context part holding a set of constant key/value pairs.
1455
+ */
1456
+ interface ConstantValuesContextPart extends BaseContextPart {
1457
+ /** Discriminator identifying the context part as a `ConstantValuesContextPart`. */
1458
+ type: 'ConstantValuesContextPart';
1459
+ /** Optional human-readable title of the context part. */
1460
+ title?: string;
1461
+ /** The constant values exposed by this context part. */
1462
+ values: Record<string, unknown>;
1463
+ }
1464
+ /**
1465
+ * @public
1466
+ * Base shape shared by all AI context parts.
1467
+ */
1468
+ interface BaseContextPart {
1469
+ /** Discriminator identifying the concrete context part type. */
1470
+ type?: string;
1471
+ /**
1472
+ * The unique identifier of the context part as registered in `AiContextService`.
1473
+ * Populated by `AiContextService.getContext()` for each resolved part.
1474
+ */
1475
+ contextId: string;
1476
+ }
1477
+ /**
1478
+ * @public
1479
+ * A `CreatioPageContextPart` returned from a `ContextProvider`, before the AI context service
1480
+ * attaches the registered `contextId`.
1481
+ */
1482
+ type CreatioPageContextPartInput = Omit<CreatioPageContextPart, 'contextId'>;
1483
+ /**
1484
+ * @public
1485
+ * A `ConstantValuesContextPart` returned from a `ContextProvider`, before the AI context service
1486
+ * attaches the registered `contextId`.
1487
+ */
1488
+ type ConstantValuesContextPartInput = Omit<ConstantValuesContextPart, 'contextId'>;
1489
+ /**
1490
+ * @public
1491
+ * A factory that produces a context part to register in `AiContextService`, synchronously or asynchronously.
1492
+ */
1493
+ type ContextProvider = () => CreatioPageContextPartInput | Promise<CreatioPageContextPartInput> | ConstantValuesContextPartInput | Promise<ConstantValuesContextPartInput>;
1494
+ /**
1495
+ * @public
1496
+ * The action to perform on a context part.
1497
+ */
1498
+ type ContextPartAction = 'set' | 'update' | 'remove';
1499
+ /**
1500
+ * @public
1501
+ * @classdesc Request handler for managing context parts in the AI context service.
1502
+ * This handler processes requests to add, remove, or retrieve context parts.
1503
+ */
1504
+ declare class ContextPartRequest extends _BaseRequest {
1505
+ /** The unique identifier of the context part. */
1506
+ id: string;
1507
+ /** The provider that resolves the context part. */
1508
+ contextPartProvider: ContextProvider;
1509
+ /** The action to perform on the context part. */
1510
+ action: ContextPartAction;
1511
+ }
1512
+
1513
+ /**
1514
+ * @public
1515
+ * @description Shape for detailed error explanation.
1516
+ * @property {string} errorCode - Error code.
1517
+ * @property {string} message - Error message.
1518
+ * @property {string} stackTrace - Stack at the moment of causing an error.
1519
+ */
1520
+ interface ErrorInfo {
1521
+ /**
1522
+ * @description Error code.
1523
+ */
1524
+ errorCode: string;
1525
+ /**
1526
+ * @description Error message.
1527
+ */
1528
+ message: string;
1529
+ /**
1530
+ * @description Stack at the moment of causing an error
1531
+ */
1532
+ stackTrace: string;
1533
+ }
1534
+
1535
+ /**
1536
+ * @public
1537
+ * @description Shape of response
1538
+ * @property {boolean} success - Indicates whether operation was success.
1539
+ * @property {ErrorInfo} errorInfo - detailed error description. {@link ErrorInfo}
1540
+ */
1541
+ interface BaseResponse {
1542
+ /**
1543
+ * @description Indicates whether operation was success.
1544
+ */
1545
+ success: boolean;
1546
+ /**
1547
+ * @description detailed error description. {@link ErrorInfo}
1548
+ */
1549
+ errorInfo?: ErrorInfo;
1550
+ }
1551
+ /**
1552
+ * @public
1553
+ * @description - base response with returned value
1554
+ * @extends {BaseResponse} {@link BaseResponse}
1555
+ * @property {T} value - returned value
1556
+ * @template T
1557
+ */
1558
+ interface ValueResponse<T> extends BaseResponse {
1559
+ value: T;
1560
+ }
1561
+
1562
+ /**
1563
+ * @public
1564
+ * @description A Creatio entity record represented as a map of column names to their values.
1565
+ */
1566
+ interface Entity {
1567
+ /**
1568
+ * @description Value of the entity column addressed by its name (or column path).
1569
+ */
1570
+ [key: string]: _EntityColumnValue;
1571
+ }
1572
+
1573
+ interface SysImageValue extends _LookupValue {
1574
+ url?: string;
1575
+ }
1576
+
1577
+ /**
1578
+ * @public
1579
+ */
1580
+ declare class LocalizableValue {
1581
+ readonly key: string;
1582
+ /**
1583
+ * @internal
1584
+ * @dontChange
1585
+ */
1586
+ private static readonly _instanceOfKey;
1587
+ constructor(key: string);
1588
+ /**
1589
+ * @internal
1590
+ */
1591
+ static [Symbol.hasInstance](instance: LocalizableValue): boolean;
1592
+ }
1593
+
1594
+ /**
1595
+ * @public
1596
+ * @description Config used to register view element options in interface designer.
1597
+ * User-defined view elements will be displayed in Custom Elements group of interface designer.
1598
+ */
1599
+ interface InterfaceDesignerItemDefinition {
1600
+ /**
1601
+ * Config for defining view element options in left panel of Interface designer.
1602
+ */
1603
+ toolbarConfig: {
1604
+ /**
1605
+ * Caption of view element in toolbar.
1606
+ */
1607
+ caption: string | LocalizableValue;
1608
+ /**
1609
+ * @deprecated
1610
+ * Name of view element icon in toolbar.
1611
+ */
1612
+ name?: string;
1613
+ /**
1614
+ * Require path to load icon that will be displayed for view element
1615
+ * in left panel of Interface designer.
1616
+ * @example icon: require(`!!raw-loader?{esModule:false}!../assets/icon.svg`),
1617
+ */
1618
+ icon: string;
1619
+ /**
1620
+ * Hint which will be displayed on hover.
1621
+ */
1622
+ hint?: string;
1623
+ /**
1624
+ * Map of default values which will be set after drag&drop.
1625
+ */
1626
+ defaultPropertyValues?: Record<string, unknown | LocalizableValue>;
1627
+ /**
1628
+ * @internal
1629
+ */
1630
+ groupType?: DesignerToolGroupType;
1631
+ };
1632
+ /**
1633
+ * @internal
1634
+ */
1635
+ viewElementGroupType?: ViewElementGroupType;
1636
+ /**
1637
+ * @internal
1638
+ */
1639
+ typeCaption?: string | LocalizableValue;
1640
+ /**
1641
+ * @internal
1642
+ */
1643
+ typeRef?: _Type;
1644
+ /**
1645
+ * @public
1646
+ * @description Allows to use a custom component for properties panel.
1647
+ * @example propertiesPanel: 'usr.CustomPanelComponent'
1648
+ */
1649
+ propertiesPanel?: string;
1650
+ }
1651
+
1652
+ /**
1653
+ * @public
1654
+ * @description Config to create item in collection.
1655
+ */
1656
+ interface ItemCreationConfig extends _ItemCreationConfig {
1657
+ /**
1658
+ * @description Indicates should business rules execute for created item immediately, default false.
1659
+ */
1660
+ businessRulesActive?: boolean;
1661
+ }
1662
+
1663
+ /**
1664
+ * @public
1665
+ * @description Represents a object describes status of license operations
1666
+ * with keys as operations codes and values as operation statuses.
1667
+ */
1668
+ interface LicenseRestrictionOperationValues {
1669
+ [operation: string]: boolean;
1670
+ }
1671
+
1672
+ /**
1673
+ * @public
1674
+ * @description Settings for displaying mask.
1675
+ * @property {number} delay - The duration in milliseconds until which the mask delaying.
1676
+ */
1677
+ interface MaskSettings {
1678
+ /**
1679
+ * @description The duration in milliseconds until which the mask delaying.
1680
+ */
1681
+ delay: number;
1682
+ }
1683
+
1684
+ /**
1685
+ * @public
1686
+ * @interface
1687
+ * @description Interface representing a process parameter value.
1688
+ * @property {string} name - The name of the process parameter.
1689
+ * @property {string} value - The value of the process parameter.
1690
+ */
1691
+ interface ProcessParameterValue {
1692
+ /**
1693
+ * @description The name of the process parameter.
1694
+ */
1695
+ name: string;
1696
+ /**
1697
+ * @description The value of the process parameter.
1698
+ */
1699
+ value: string;
1700
+ }
1701
+
1702
+ /**
1703
+ * @public
1704
+ * @class
1705
+ * @classdesc Class representing a request to run a process.
1706
+ * @property {Guid} schemaUId - The unique identifier of the process schema.
1707
+ * @property {string} schemaName - The name of the process schema.
1708
+ * @property {ProcessParameterValue[]} parameterValues - The values of the process parameters.
1709
+ * @property {string[]} resultParameterNames - The names of the resulting process parameters.
1710
+ */
1711
+ declare class RunProcessRequest {
1712
+ /**
1713
+ * @description Represents process schema unique identifier to run.
1714
+ */
1715
+ schemaUId?: _Guid;
1716
+ /**
1717
+ * @description Represents process schema name to run.
1718
+ */
1719
+ schemaName?: string;
1720
+ /**
1721
+ * @description Used to pass the parameters to a starting process.
1722
+ */
1723
+ parameterValues?: ProcessParameterValue[];
1724
+ /**
1725
+ * @description Used to specify the names of the result parameters to retrieve on process completion.
1726
+ */
1727
+ resultParameterNames?: string[];
1728
+ }
1729
+
1730
+ /**
1731
+ * @public
1732
+ * @interface
1733
+ * @extends {BaseResponse}
1734
+ * @description Interface representing the response from running a process.
1735
+ * @property {string} message - The message returned from the process execution.
1736
+ * @property {Guid} processId - The unique identifier of the executed process.
1737
+ * @property {Record<string, unknown>} resultParameterValues - The resulting parameter values from the process.
1738
+ */
1739
+ interface RunProcessResponse extends BaseResponse {
1740
+ /**
1741
+ * @description The message returned from the process execution.
1742
+ */
1743
+ message: string;
1744
+ /**
1745
+ * @description The unique identifier of the executed process.
1746
+ */
1747
+ processId: _Guid;
1748
+ /**
1749
+ * @description The status of the executed process.
1750
+ */
1751
+ processStatus: ProcessStatus;
1752
+ /**
1753
+ * @description The resulting parameter values from the process execution.
1754
+ */
1755
+ resultParameterValues?: Record<string, unknown>;
1756
+ }
1757
+
1758
+ /**
1759
+ * Discovery metadata for a remote view element.
1760
+ *
1761
+ * @public
1762
+ */
1763
+ interface RemoteViewElementDiscoveryMetadata {
1764
+ /**
1765
+ * Stable view element type published during discovery.
1766
+ */
1767
+ readonly type: string;
1768
+ }
1769
+ /**
1770
+ * Context passed to remote designer-definition loaders.
1771
+ *
1772
+ * @public
1773
+ */
1774
+ interface RemoteDesignerDefinitionsLoadContext {
1775
+ /**
1776
+ * Current user culture used to localize returned definitions.
1777
+ *
1778
+ * For example, a remote can use this culture name to load the corresponding translation bundle before
1779
+ * returning toolbox captions.
1780
+ */
1781
+ readonly cultureName: string;
1782
+ }
1783
+ /**
1784
+ * Interface-designer metadata exposed by a remote view element.
1785
+ *
1786
+ * Use this payload to register toolbox entries in the interface designer without activating the
1787
+ * remote runtime implementation.
1788
+ *
1789
+ * @example
1790
+ * ```ts
1791
+ * {
1792
+ * type: 'usr.Address',
1793
+ * toolbarConfig: {
1794
+ * caption: 'Address',
1795
+ * icon: '<svg viewBox="0 0 16 16"></svg>'
1796
+ * },
1797
+ * defaultPropertyValues: {
1798
+ * street: 'Main st.',
1799
+ * city: 'Boston'
1800
+ * },
1801
+ * propertiesPanel: 'usr.AddressPropertiesPanel'
1802
+ * }
1803
+ * ```
1804
+ *
1805
+ * @public
1806
+ */
1807
+ interface RemoteViewElementDesignerDefinition {
1808
+ /**
1809
+ * Stable view element type already published through discovery metadata.
1810
+ *
1811
+ * Must match the `type` of a corresponding item from {@link RemoteFeatureDiscoveryMetadata.viewElements} or
1812
+ * {@link RemoteFeatureDiscoveryMetadata.mobileViewElements} published by the same feature.
1813
+ */
1814
+ readonly type: string;
1815
+ /**
1816
+ * Toolbar configuration displayed in the interface designer.
1817
+ */
1818
+ readonly toolbarConfig: {
1819
+ /**
1820
+ * Visible caption in the interface-designer toolbox.
1821
+ */
1822
+ readonly caption: string;
1823
+ /**
1824
+ * Raw SVG markup displayed as the toolbox icon.
1825
+ *
1826
+ * @example
1827
+ * ```ts
1828
+ * icon: '<svg viewBox="0 0 16 16"></svg>'
1829
+ * ```
1830
+ *
1831
+ * @example
1832
+ * ```ts
1833
+ * icon: require(`!!raw-loader?{esModule:false}!../assets/icon.svg`)
1834
+ * ```
1835
+ */
1836
+ readonly icon: string;
1837
+ /**
1838
+ * Optional hint displayed on hover in the interface-designer toolbox.
1839
+ */
1840
+ readonly hint?: string;
1841
+ };
1842
+ /**
1843
+ * Default property values applied when the item is added from the toolbox.
1844
+ *
1845
+ * Keys must match property names expected by the view element.
1846
+ */
1847
+ readonly defaultPropertyValues?: Record<string, _JsonData>;
1848
+ /**
1849
+ * Type name of the properties panel component used for configuring the view element in the interface designer.
1850
+ *
1851
+ * @example
1852
+ * ```ts
1853
+ * propertiesPanel: 'usr.AddressPropertiesPanel'
1854
+ * ```
1855
+ */
1856
+ readonly propertiesPanel?: string;
1857
+ }
1858
+ /**
1859
+ * Discovery metadata for a remote converter.
1860
+ *
1861
+ * @public
1862
+ */
1863
+ interface RemoteConverterDiscoveryMetadata {
1864
+ /**
1865
+ * Stable converter type published during discovery.
1866
+ */
1867
+ readonly type: string;
1868
+ }
1869
+ /**
1870
+ * Discovery metadata for a remote validator.
1871
+ *
1872
+ * @public
1873
+ */
1874
+ interface RemoteValidatorDiscoveryMetadata {
1875
+ /**
1876
+ * Stable validator type published during discovery.
1877
+ */
1878
+ readonly type: string;
1879
+ }
1880
+ /**
1881
+ * Discovery metadata for a remote request handler.
1882
+ *
1883
+ * @public
1884
+ */
1885
+ interface RemoteRequestHandlerDiscoveryMetadata {
1886
+ /**
1887
+ * Stable request-handler type published during discovery.
1888
+ */
1889
+ readonly type: string;
1890
+ /**
1891
+ * Request type handled by the handler.
1892
+ */
1893
+ readonly requestType: string;
1894
+ /**
1895
+ * Optional scope restriction for the handler.
1896
+ *
1897
+ * When specified, the handler is considered only for requests executed inside the listed scopes.
1898
+ */
1899
+ readonly scopes?: string[];
1900
+ }
1901
+ /**
1902
+ * Aggregated discovery metadata for a remote feature.
1903
+ *
1904
+ * Lists the public items exposed by a feature during discovery.
1905
+ * Register their implementations in {@link RemoteFeatureDefinition.activate}.
1906
+ *
1907
+ * @public
1908
+ */
1909
+ interface RemoteFeatureDiscoveryMetadata {
1910
+ /**
1911
+ * View elements exposed by the feature.
1912
+ */
1913
+ readonly viewElements?: readonly RemoteViewElementDiscoveryMetadata[];
1914
+ /**
1915
+ * Mobile view elements exposed by the feature.
1916
+ */
1917
+ readonly mobileViewElements?: readonly RemoteViewElementDiscoveryMetadata[];
1918
+ /**
1919
+ * Converters exposed by the feature.
1920
+ */
1921
+ readonly converters?: readonly RemoteConverterDiscoveryMetadata[];
1922
+ /**
1923
+ * Validators exposed by the feature.
1924
+ */
1925
+ readonly validators?: readonly RemoteValidatorDiscoveryMetadata[];
1926
+ /**
1927
+ * Request handlers exposed by the feature.
1928
+ */
1929
+ readonly requestHandlers?: readonly RemoteRequestHandlerDiscoveryMetadata[];
1930
+ }
1931
+ /**
1932
+ * Interface-designer definitions returned by a remote feature.
1933
+ *
1934
+ * Use this payload to register toolbox entries without activating the remote runtime implementation.
1935
+ *
1936
+ * @example
1937
+ * ```ts
1938
+ * {
1939
+ * viewElements: [
1940
+ * {
1941
+ * type: 'usr.Address',
1942
+ * toolbarConfig: {
1943
+ * caption: 'Address',
1944
+ * icon: '<svg viewBox="0 0 16 16"></svg>'
1945
+ * },
1946
+ * defaultPropertyValues: {
1947
+ * city: 'Boston'
1948
+ * },
1949
+ * propertiesPanel: 'usr.AddressPropertiesPanel'
1950
+ * }
1951
+ * ]
1952
+ * }
1953
+ * ```
1954
+ *
1955
+ * @public
1956
+ */
1957
+ interface RemoteFeatureDesignerDefinitions {
1958
+ /**
1959
+ * Designer metadata for discovered view elements.
1960
+ *
1961
+ * Each `type` should correspond to an item from {@link RemoteFeatureDiscoveryMetadata.viewElements}.
1962
+ */
1963
+ readonly viewElements?: readonly RemoteViewElementDesignerDefinition[];
1964
+ /**
1965
+ * Designer metadata for discovered mobile view elements.
1966
+ *
1967
+ * Each `type` should correspond to an item from {@link RemoteFeatureDiscoveryMetadata.mobileViewElements}.
1968
+ */
1969
+ readonly mobileViewElements?: readonly RemoteViewElementDesignerDefinition[];
1970
+ }
1971
+ /**
1972
+ * Defines a remote feature activated on demand.
1973
+ *
1974
+ * A feature can publish runtime types through {@link RemoteFeatureDefinition.discovery}, expose
1975
+ * interface-designer metadata through {@link RemoteFeatureDefinition.loadDesignerDefinitions}, and load its
1976
+ * implementation only when the runtime requests activation.
1977
+ *
1978
+ * @example
1979
+ * ```ts
1980
+ * const runtimeFeature: RemoteFeatureDefinition = {
1981
+ * id: 'runtime',
1982
+ * discovery: {
1983
+ * viewElements: [{ type: 'usr.Address' }],
1984
+ * requestHandlers: [{ type: 'usr.OpenAddressHandler', requestType: 'usr.OpenAddressRequest' }]
1985
+ * },
1986
+ * activate: async () => {
1987
+ * const { activateRuntimeFeature } = await import('./runtime.feature-activation');
1988
+ * await activateRuntimeFeature();
1989
+ * },
1990
+ * loadDesignerDefinitions: async ({ cultureName }) => {
1991
+ * const { loadRuntimeDesignerDefinitions } = await import('./runtime.designer-definitions');
1992
+ * return loadRuntimeDesignerDefinitions({ cultureName });
1993
+ * }
1994
+ * };
1995
+ * ```
1996
+ *
1997
+ * @public
1998
+ */
1999
+ interface RemoteFeatureDefinition {
2000
+ /**
2001
+ * Stable feature identifier inside the remote entry.
2002
+ */
2003
+ readonly id: string;
2004
+ /**
2005
+ * Discovery metadata published during startup.
2006
+ *
2007
+ * Lists the public items exposed by the feature during discovery.
2008
+ * This field should declare metadata only. Register implementations in
2009
+ * {@link RemoteFeatureDefinition.activate}.
2010
+ */
2011
+ readonly discovery?: RemoteFeatureDiscoveryMetadata;
2012
+ /**
2013
+ * Activates the feature when runtime needs its implementation.
2014
+ *
2015
+ * This callback should load and register the implementations for the items published through
2016
+ * {@link RemoteFeatureDefinition.discovery}.
2017
+ */
2018
+ readonly activate: () => Promise<void>;
2019
+ /**
2020
+ * Loads localized interface-designer definitions exposed by the feature to register view elements
2021
+ * in the designer toolbox.
2022
+ *
2023
+ * This callback should only return metadata. Any returned item `type` should match the discovery metadata
2024
+ * published by the same feature.
2025
+ *
2026
+ * @example
2027
+ * ```ts
2028
+ * async loadDesignerDefinitions({ cultureName }) {
2029
+ * const translations = await loadTranslationsForCulture(cultureName);
2030
+ * return {
2031
+ * viewElements: [
2032
+ * {
2033
+ * type: 'usr.Address',
2034
+ * toolbarConfig: {
2035
+ * caption: translations['address.caption'],
2036
+ * icon: '<svg viewBox="0 0 16 16"></svg>'
2037
+ * },
2038
+ * defaultPropertyValues: {
2039
+ * city: translations['address.defaultCity']
2040
+ * },
2041
+ * propertiesPanel: 'usr.AddressPropertiesPanel'
2042
+ * }
2043
+ * ],
2044
+ * mobileViewElements: [
2045
+ * {
2046
+ * type: 'usr.MobileAddress',
2047
+ * toolbarConfig: {
2048
+ * caption: translations['mobileAddress.caption'],
2049
+ * icon: '<svg viewBox="0 0 16 16"></svg>'
2050
+ * },
2051
+ * propertiesPanel: 'usr.MobileAddressPropertiesPanel'
2052
+ * }
2053
+ * ]
2054
+ * };
2055
+ * }
2056
+ * ```
2057
+ */
2058
+ readonly loadDesignerDefinitions?: (context: RemoteDesignerDefinitionsLoadContext) => Promise<RemoteFeatureDesignerDefinitions>;
2059
+ }
2060
+ /**
2061
+ * Entry-side definition exported by a remote module.
2062
+ *
2063
+ * The host loads this object from the remote entry point to discover the features published by
2064
+ * the remote build.
2065
+ *
2066
+ * @public
2067
+ */
2068
+ interface RemoteEntryDefinition {
2069
+ /**
2070
+ * Stable remote name matching the registered remote build.
2071
+ */
2072
+ readonly remoteName: string;
2073
+ /**
2074
+ * Features published by the remote entry.
2075
+ *
2076
+ * Feature identifiers must be unique within the same remote entry.
2077
+ */
2078
+ readonly features: readonly RemoteFeatureDefinition[];
2079
+ }
2080
+
2081
+ /**
2082
+ * @public
2083
+ * @class DataRequest
2084
+ * @description Definition of data source request.
2085
+ * @extends {ɵBaseRequest} {@link ɵBaseRequest}
2086
+ * @property {string} dataSourceName - name of assigned data source.
2087
+ */
2088
+ declare class DataRequest extends _BaseRequest {
2089
+ /**
2090
+ * @description name of assigned data source.
2091
+ */
2092
+ readonly dataSourceName: string;
2093
+ }
2094
+
2095
+ /**
2096
+ * @public
2097
+ * @description Request payload
2098
+ * @property {string} request - request name.
2099
+ * @property {unknown} params - request parameters.
2100
+ */
2101
+ interface BaseRequestConfig {
2102
+ /**
2103
+ * @description request name.
2104
+ */
2105
+ request: string;
2106
+ /**
2107
+ * @description request parameters.
2108
+ */
2109
+ params?: unknown;
2110
+ }
2111
+
2112
+ /**
2113
+ * TODO: RND-55882
2114
+ */
2115
+ interface ViewModelAttributeChangeEventOptionsType {
2116
+ preventAttributeChangeRequest?: boolean;
2117
+ preventStateChange?: boolean;
2118
+ preventRunBusinessRules?: boolean;
2119
+ /**
2120
+ * @internal
2121
+ */
2122
+ isMaskedValue?: boolean;
2123
+ }
2124
+
2125
+ /**
2126
+ * TODO: RND-55882
2127
+ */
2128
+ interface ChangeAttributeValueEventPayload extends ViewModelAttributeChangeEventOptionsType {
2129
+ attributeName: string;
2130
+ value: any;
2131
+ oldValue: any;
2132
+ /**
2133
+ * @deprecated
2134
+ */
2135
+ silent?: boolean;
2136
+ }
2137
+
2138
+ /**
2139
+ * @hostPublicApi
2140
+ * TODO: RND-55882
2141
+ */
2142
+ declare class HandleViewModelAttributeChangeRequest extends _BaseRequest<ChangeAttributeValueEventPayload> {
2143
+ readonly type = "crt.HandleViewModelAttributeChangeRequest";
2144
+ /**
2145
+ * @hostPublicApi
2146
+ */
2147
+ readonly attributeName: string;
2148
+ /**
2149
+ * @hostPublicApi
2150
+ */
2151
+ readonly value: unknown;
2152
+ /**
2153
+ * @hostPublicApi
2154
+ */
2155
+ readonly oldValue: unknown;
2156
+ /**
2157
+ * @deprecated
2158
+ */
2159
+ readonly silent: boolean;
2160
+ readonly preventAttributeChangeRequest: boolean;
2161
+ readonly preventStateChange: boolean;
2162
+ readonly preventRunBusinessRules: boolean;
2163
+ constructor(payload: ChangeAttributeValueEventPayload);
2164
+ }
2165
+
2166
+ /**
2167
+ * @public
2168
+ * @description Theme definition exposed through handler-chain services and shared runtime APIs.
2169
+ */
2170
+ interface ThemeDefinition {
2171
+ /**
2172
+ * @description Stable theme identifier.
2173
+ */
2174
+ id: string;
2175
+ /**
2176
+ * @description Display caption.
2177
+ */
2178
+ caption: string;
2179
+ /**
2180
+ * @description CSS class applied to the host when the theme is active.
2181
+ */
2182
+ cssClassName: string;
2183
+ /**
2184
+ * @description Resolved theme stylesheet path or URL when external CSS is available.
2185
+ */
2186
+ cssFilePath?: string;
2187
+ }
2188
+
2189
+ /**
2190
+ * @public
2191
+ * @description Represents a consent record.
2192
+ * @property {Guid} id - Unique identifier of the consent record.
2193
+ * @property {string} name - Name of the consent.
2194
+ * @property {string} code - Code of the consent.
2195
+ * @property {string} consentText - Text of the consent.
2196
+ */
2197
+ interface Consent {
2198
+ /**
2199
+ * @description Unique identifier of the consent record.
2200
+ */
2201
+ id: _Guid;
2202
+ /**
2203
+ * @description Name of the consent.
2204
+ */
2205
+ name: string;
2206
+ /**
2207
+ * @description Code of the consent.
2208
+ */
2209
+ code: string;
2210
+ /**
2211
+ * @description Text of the consent.
2212
+ */
2213
+ consentText: string;
2214
+ }
2215
+
2216
+ /**
2217
+ * @public
2218
+ * @description Represents a user consent history record.
2219
+ * @property {Guid} id - Unique identifier of the user consent record.
2220
+ * @property {string} consentCode - Consent code associated with the user consent.
2221
+ * @property {Date} dateOfConsent - Date when the user provided consent.
2222
+ * @property {Date | null} expirationDate - Date when the user consent expires; `null` for perpetual consent.
2223
+ */
2224
+ interface UserConsent {
2225
+ /**
2226
+ * @description Unique identifier of the user consent record.
2227
+ */
2228
+ id: _Guid;
2229
+ /**
2230
+ * @description Consent code associated with the user consent.
2231
+ */
2232
+ consentCode: string;
2233
+ /**
2234
+ * @description Date when the user provided consent.
2235
+ */
2236
+ dateOfConsent: Date;
2237
+ /**
2238
+ * @description Date when the user consent expires. `null` when the consent does not expire.
2239
+ */
2240
+ expirationDate: Date | null;
2241
+ }
2242
+
2243
+ /**
2244
+ * @public
2245
+ * @description Interface describes the model of collection change event.
2246
+ */
2247
+ interface ViewModelCollectionChange<T extends _ViewModelContext> {
2248
+ /**
2249
+ * @description The array of current collection elements.
2250
+ */
2251
+ collection: T[];
2252
+ /**
2253
+ * @description The array of elements affected by the change.
2254
+ */
2255
+ affectedElements: T[];
2256
+ /**
2257
+ * @description The type of action that triggered the change.
2258
+ */
2259
+ action: ViewModelCollectionActionType;
2260
+ /**
2261
+ * @description The index at which the change occurred, if applicable.
2262
+ */
2263
+ index?: number;
2264
+ }
2265
+
2266
+ /**
2267
+ * @public
2268
+ * @description Interface for a view model collection that extends the base collection with
2269
+ * on collection change callbacks registration capabilities.
2270
+ *
2271
+ * @template T - The type of view model context that extends ViewModel
2272
+ */
2273
+ interface ViewModelCollection<T extends _ViewModelContext> extends _ViewModelCollection<T> {
2274
+ /**
2275
+ * @description Registers a handler to be called whenever the collection emits a change event.
2276
+ * @param callback Executes when the collection changes and receives change metadata.
2277
+ * @param action Optional action filter; omit to receive all collection change notifications.
2278
+ */
2279
+ registerOnCollectionChangeCallback: (callback: (changes: ViewModelCollectionChange<T>) => void, action?: ViewModelCollectionActionType) => void;
2280
+ /**
2281
+ * @description Removes a previously registered collection change handler.
2282
+ * @param callback Previously registered callback to detach.
2283
+ * @param action Optional action filter, if provided, only detaches the callback for that action type.
2284
+ */
2285
+ unregisterOnCollectionChangeCallback: (callback: (changes: ViewModelCollectionChange<T>) => void, action?: ViewModelCollectionActionType) => void;
2286
+ /**
2287
+ * @description Registers a handler that fires when attributes of any collection item change.
2288
+ * @param callback Executes with the item whose attributes were updated.
2289
+ */
2290
+ registerOnItemAttributesChangesCallback: (callback: (item: T) => void) => void;
2291
+ /**
2292
+ * @description Removes a previously registered item attribute change handler.
2293
+ * @param callback Callback reference to detach from attribute change notifications.
2294
+ */
2295
+ unregisterOnItemAttributesChangesCallback: (callback: (item: T) => void) => void;
2296
+ }
2297
+
2298
+ /**
2299
+ * @internal
2300
+ */
2301
+ interface RequestHandlerRegistrationConfig extends RequestHandlerDefinition, LazyRegistryItem {
2302
+ /**
2303
+ * @internal
2304
+ */
2305
+ source?: HandlerSource;
2306
+ /**
2307
+ * @internal
2308
+ */
2309
+ createHandler?: (injectionContext?: InjectionContext) => BaseRequestHandler;
2310
+ }
2311
+
2312
+ /**
2313
+ * @internal
2314
+ */
2315
+ interface ContexedHandlerScopeConfig {
2316
+ requestType: string;
2317
+ scope: string;
2318
+ }
2319
+
2320
+ /**
2321
+ * @internal
2322
+ * @class MethodInvokeRequest
2323
+ * @description Definition of invoke method request.
2324
+ * @extends {ɵBaseRequest} {@link ɵBaseRequest}
2325
+ * @property {string} method - method name.
2326
+ * @property {unknown[]} args - arguments passing to the method.
2327
+ */
2328
+ declare class MethodInvokeRequest extends _BaseRequest {
2329
+ /**
2330
+ * @description method name
2331
+ */
2332
+ method: string;
2333
+ /**
2334
+ * @description arguments passing to the method
2335
+ */
2336
+ args?: unknown[];
2337
+ }
2338
+
2339
+ /**
2340
+ * @internal
2341
+ */
2342
+ interface HandlerChainServiceRegistryItem {
2343
+ requestType: string;
2344
+ typeRef: _Type;
2345
+ }
2346
+
2347
+ /**
2348
+ * @internal
2349
+ * @interface DesignTimeViewElementRegistryItem
2350
+ * @hostPublicApi
2351
+ */
2352
+ type DesignTimeViewElementRegistryItem = ViewElementRegistryItem & {
2353
+ overrideType: string;
2354
+ };
2355
+ /**
2356
+ * @internal
2357
+ * @interface InternalDesignTimeViewElementRegistryItem
2358
+ * @hostPublicApi
2359
+ */
2360
+ type InternalDesignTimeViewElementRegistryItem = DesignTimeViewElementRegistryItem & {
2361
+ typeRef: _Type;
2362
+ };
2363
+
2364
+ /**
2365
+ * @internal
2366
+ * @hostPublicApi
2367
+ */
2368
+ interface ValidatorRegistryItem extends ValidatorConfig, LazyRegistryItem {
2369
+ typeRef?: _Type<BaseValidator>;
2370
+ instantiate?: (injectionContext?: InjectionContext) => BaseValidator;
2371
+ }
2372
+
2373
+ /**
2374
+ * @internal
2375
+ */
2376
+ interface ValidatorSchemaConfig extends ValidatorConfig {
2377
+ validator: (config: Record<string, unknown>) => CrtValidatorFn;
2378
+ async: boolean;
2379
+ }
2380
+
2381
+ /**
2382
+ * @internal
2383
+ */
2384
+ declare enum RemoteEntryType {
2385
+ Script = "script",
2386
+ Module = "module"
2387
+ }
2388
+ /**
2389
+ * @internal
2390
+ */
2391
+ interface RemoteBuildInfo {
2392
+ name: string;
2393
+ entry: string;
2394
+ entryType: RemoteEntryType;
2395
+ mainModule: string;
2396
+ /**
2397
+ * @dontChange
2398
+ */
2399
+ packageName: string;
2400
+ maintainer: string;
2401
+ }
2402
+
2403
+ /**
2404
+ * @internal
2405
+ */
2406
+ interface AttributePropertyConfig {
2407
+ name: string;
2408
+ defaultValue: unknown;
2409
+ }
2410
+
2411
+ /**
2412
+ * Interface contains parameters for load data source.
2413
+ * @internal
2414
+ */
2415
+ interface DataSourceLoadParameters {
2416
+ parameters: _DataSourceParameters;
2417
+ options: DataSourceLoadOptions;
2418
+ }
2419
+
2420
+ interface ITransactionOperation<TResult = unknown> {
2421
+ get asyncResult(): Promise<TResult>;
2422
+ /**
2423
+ * @internal
2424
+ */
2425
+ get ready(): Promise<void>;
2426
+ get transactionId(): _Guid;
2427
+ get id(): _Guid;
2428
+ get payload(): Record<string, unknown>;
2429
+ /**
2430
+ * @internal
2431
+ */
2432
+ markAsReady(): void;
2433
+ }
2434
+
2435
+ interface ITransaction {
2436
+ get id(): _Guid;
2437
+ createOperation<TResult>(action: (transactionOperation: ITransactionOperation<TResult>) => Promise<TResult>): ITransactionOperation<TResult>;
2438
+ createFailureOperation<TResult>(reason: TResult): ITransactionOperation<TResult>;
2439
+ commit(): Promise<Record<_Guid, unknown>>;
2440
+ rollback(): Promise<void>;
2441
+ }
2442
+
2443
+ interface ITransactionFactory {
2444
+ /**
2445
+ * @description Method create a transaction.
2446
+ * @returns `Promise<ITransaction>` {@link ITransaction}
2447
+ */
2448
+ create(): Promise<ITransaction>;
2449
+ }
2450
+
2451
+ /**
2452
+ * @internal
2453
+ */
2454
+ interface BaseItemRendererConfig<TItem = unknown> {
2455
+ selector: string;
2456
+ mapInputs?: (item: TItem) => Record<string, unknown>;
2457
+ }
2458
+
2459
+ /**
2460
+ * @internal
2461
+ */
2462
+ declare function CrtDesignTimeViewElement(config: DesignTimeViewElementRegistryItem): (type: _Type) => void;
2463
+
2464
+ /**
2465
+ * @internal
2466
+ */
2467
+ declare function ɵCrtInterfaceDesignerItem(config: InternalInterfaceDesignerItemRegistrationConfig): (type: _Type) => void;
2468
+
2469
+ /**
2470
+ * @internal
2471
+ */
2472
+ declare function ɵCrtMobileInterfaceDesignerItem(config: InternalInterfaceDesignerItemRegistrationConfig): (type: _Type) => void;
2473
+
2474
+ /**
2475
+ * @internal
2476
+ */
2477
+ declare function CrtRequest<T extends _BaseRequest>(config: _RequestRegistrationConfig): (type: _Type<T>) => void;
2478
+
2479
+ /**
2480
+ * @internal
2481
+ */
2482
+ declare function checkTypeNameFormat(type: string, element: string): void;
2483
+ /**
2484
+ * @public
2485
+ * @description For internal use only.
2486
+ */
2487
+ declare function ɵcheckTypeNameFormat(type: string, element: string): void;
2488
+ /**
2489
+ * @internal
2490
+ */
2491
+ declare function checkTypeNamePascalCase(type: string): void;
2492
+ /**
2493
+ * @internal
2494
+ */
2495
+ declare function checkCrtTypeNamePascalCase(type: string): void;
2496
+ /**
2497
+ * @internal
2498
+ */
2499
+ declare function toPascalCase(source: string): string;
2500
+ /**
2501
+ * @internal
2502
+ */
2503
+ declare function checkIfTypeRegistered<T>(type: string, item: (new () => T) | undefined | null): asserts item is new () => T;
2504
+ /**
2505
+ * @internal
2506
+ */
2507
+ declare function checkOnlyOneRegistration<T>(type: string, item: T, map: Map<string, T>): void;
2508
+
2509
+ /**
2510
+ * @internal
2511
+ * @hostPublicApi
2512
+ */
2513
+ type RequestHandlerCtor = new (...args: unknown[]) => _RequestHandler;
2514
+ /**
2515
+ * @internal
2516
+ * @hostPublicApi
2517
+ */
2518
+ interface RequestHandlerMapValue {
2519
+ readonly instanceType?: RequestHandlerCtor;
2520
+ readonly instanceConfig: RequestHandlerRegistrationConfig;
2521
+ }
2522
+ /**
2523
+ * @internal
2524
+ * @hostPublicApi
2525
+ */
2526
+ type AddRequestHandlerListener = (requestType: string, requestMapInfo: RequestHandlerMapValue) => void;
2527
+ /**
2528
+ * @internal
2529
+ * @hostPublicApi
2530
+ */
2531
+ type RemoveRequestHandlerListener = AddRequestHandlerListener;
2532
+ /**
2533
+ * @internal
2534
+ * @hostPublicApi
2535
+ */
2536
+ type UnsubscribeListener = () => void;
2537
+ /**
2538
+ * @internal
2539
+ * @hostPublicApi available through window.creatio.requestHandlerRegistry
2540
+ */
2541
+ declare class InternalRequestHandlerRegistryType {
2542
+ private static readonly _addItemListeners;
2543
+ private static readonly _removeItemListeners;
2544
+ private static readonly _requestHandlersMap;
2545
+ private static readonly _handlersByRequestMap;
2546
+ /**
2547
+ * @publicHostApi
2548
+ */
2549
+ static get requestHandlersMap(): Map<string, RequestHandlerMapValue>;
2550
+ /**
2551
+ * @publicHostApi
2552
+ */
2553
+ static get handlersByRequestMap(): Map<string, Map<string, RequestHandlerMapValue>>;
2554
+ /**
2555
+ * @publicHostApi
2556
+ */
2557
+ static onAddRequestHandler(handler: AddRequestHandlerListener): UnsubscribeListener;
2558
+ /**
2559
+ * @publicHostApi
2560
+ */
2561
+ static onRemoveRequestHandler(handler: RemoveRequestHandlerListener): UnsubscribeListener;
2562
+ /**
2563
+ * @publicHostApi
2564
+ */
2565
+ static addRequestHandler(handlerType: string, config: RequestHandlerMapValue): void;
2566
+ /**
2567
+ * @publicHostApi
2568
+ */
2569
+ static removeRequestHandler(handlerType: string): void;
2570
+ static clear(): void;
2571
+ }
2572
+ /**
2573
+ * @internal
2574
+ */
2575
+ declare const InternalRequestHandlerRegistry: typeof InternalRequestHandlerRegistryType;
2576
+ /**
2577
+ * @internal
2578
+ */
2579
+ declare class RequestHandlerRegistryService {
2580
+ private static readonly _internalRegistry;
2581
+ static find(requestHandlerType: string): RequestHandlerMapValue | undefined;
2582
+ /**
2583
+ * Register request handler class.
2584
+ * @param config Request handler registration config.
2585
+ * @param typeRef Request handler type reference (constructor).
2586
+ */
2587
+ static register(config: RequestHandlerRegistrationConfig, typeRef?: RequestHandlerCtor): void;
2588
+ }
2589
+
2590
+ /**
2591
+ * @internal
2592
+ */
2593
+ type BaseRequestCtor = new () => _BaseRequest;
2594
+ /**
2595
+ * @internal
2596
+ */
2597
+ declare class RequestRegistryService {
2598
+ private static readonly _requestsMap;
2599
+ private static readonly _requestsRegistrationInfos;
2600
+ static get requestsRegistrationInfos(): ReadonlyMap<string, _RequestRegistrationConfig>;
2601
+ /**
2602
+ * Registers a specified request class.
2603
+ * @param config Request registration config.
2604
+ * @param type Request type.
2605
+ */
2606
+ static register(config: _RequestRegistrationConfig, type: BaseRequestCtor): void;
2607
+ /**
2608
+ * Creates request instance by specified registered request type.
2609
+ * @param type Request type.
2610
+ * @returns The instance of registered request.
2611
+ */
2612
+ static get(type: string): _BaseRequest | undefined;
2613
+ }
2614
+
2615
+ /**
2616
+ * @internal
2617
+ * @hostPublicApi
2618
+ */
2619
+ interface ConverterRegistryItem extends ConverterConfig, LazyRegistryItem {
2620
+ typeRef?: _Type<Converter>;
2621
+ instantiate?: (injectionContext?: InjectionContext) => Converter;
2622
+ }
2623
+
2624
+ /**
2625
+ * @public
2626
+ * @description For internal use only.
2627
+ * @hostPublicApi
2628
+ */
2629
+ interface ɵRegistryItemsStore {
2630
+ typeInfos: Map<string, any>;
2631
+ }
2632
+ /**
2633
+ * @public
2634
+ * @description For internal use only.
2635
+ * @hostPublicApi
2636
+ */
2637
+ declare class ɵBaseRegistry {
2638
+ private static readonly _prefix;
2639
+ private static _instance;
2640
+ protected static readonly registryKey: string;
2641
+ protected static get store(): ɵRegistryItemsStore;
2642
+ /**
2643
+ * @hostPubicApi available through window.creatio.registry.<registryKey>.store
2644
+ */
2645
+ protected store: ɵRegistryItemsStore;
2646
+ }
2647
+
2648
+ /**
2649
+ * @internal
2650
+ * @hostPublicApi available through window.creatio.registry.ConverterRegistry
2651
+ */
2652
+ declare class ConverterRegistry extends ɵBaseRegistry {
2653
+ protected static readonly registryKey = "ConverterRegistry";
2654
+ static has(type: string): boolean;
2655
+ static find(type: string): ConverterRegistryItem | undefined;
2656
+ static get(type: string): ConverterRegistryItem;
2657
+ static register(item: ConverterRegistryItem): void;
2658
+ static clear(): void;
2659
+ }
2660
+
2661
+ /**
2662
+ * @internal
2663
+ * @hostPublicApi available through window.creatio.registry.BaseViewElementRegistry
2664
+ */
2665
+ declare class BaseViewElementRegistry extends ɵBaseRegistry {
2666
+ static validate(config: BaseViewElementRegistrationConfig): void;
2667
+ static get viewElements(): Map<string, ViewElementRegistryItem>;
2668
+ static register(config: ViewElementRegistryItem): void;
2669
+ static getFormControlRelatesAttribute(type: string): string | null;
2670
+ static getValuePropertyName(type: string): string | null;
2671
+ static getViewElementInputs(type: string): Record<string, CrtInputRegistrationConfig> | null;
2672
+ static getViewElementOutputs(type: string): Record<string, unknown>;
2673
+ static getViewElementPropertiesDefaultValues(type: string): AttributePropertyConfig[];
2674
+ static getViewElementCompatiblePlatformAPIsOptions<TOptions extends _PlatformAPIOptions>(type: string, platformAPI: _PlatformAPIs): TOptions;
2675
+ static isViewElementAvailableByCompatibleAPIs(type: string, ...availableAPIs: _PlatformAPIs[]): boolean;
2676
+ }
2677
+
2678
+ /**
2679
+ * @internal
2680
+ */
2681
+ declare const viewElementRegistryKey = "ViewElementRegistry";
2682
+ /**
2683
+ * @internal
2684
+ */
2685
+ declare class ViewElementRegistry extends BaseViewElementRegistry {
2686
+ protected static readonly registryKey: string;
2687
+ }
2688
+
2689
+ /**
2690
+ * @internal
2691
+ */
2692
+ declare const mobileViewElementRegistryKey = "MobileViewElementRegistry";
2693
+ /**
2694
+ * @internal
2695
+ * @hostPublicApi available through window.creatio.registry.MobileViewElementRegistry
2696
+ */
2697
+ declare class MobileViewElementRegistry extends BaseViewElementRegistry {
2698
+ protected static readonly registryKey: string;
2699
+ }
2700
+
2701
+ /**
2702
+ * @internal
2703
+ */
2704
+ declare const interfaceDesignerItemRegistryKey = "InterfaceDesignerItemRegistry";
2705
+ /**
2706
+ * @internal
2707
+ * @hostPublicApi available through window.creatio.registry.InterfaceDesignerItemRegistry
2708
+ */
2709
+ declare class BaseInterfaceDesignerItemRegistry extends ɵBaseRegistry {
2710
+ private static get _interfaceDesignerItemRegistrationInfos();
2711
+ static validate(config: InterfaceDesignerRegistryItem): void;
2712
+ static register(typeOrConfig: string | InterfaceDesignerRegistryItem, config?: InterfaceDesignerRegistryItem): void;
2713
+ static get(type: string): InterfaceDesignerRegistryItem;
2714
+ static has(type: string): boolean;
2715
+ static getAll(): Map<string, InterfaceDesignerRegistryItem>;
2716
+ static values(): Array<InterfaceDesignerRegistryItem>;
2717
+ static clear(): void;
2718
+ }
2719
+ /**
2720
+ * @internal
2721
+ */
2722
+ declare class InterfaceDesignerItemRegistry extends BaseInterfaceDesignerItemRegistry {
2723
+ protected static readonly registryKey = "InterfaceDesignerItemRegistry";
2724
+ }
2725
+
2726
+ /**
2727
+ * @internal
2728
+ */
2729
+ declare const mobileInterfaceDesignerItemRegistryKey = "MobileInterfaceDesignerItemRegistry";
2730
+ /**
2731
+ * @internal
2732
+ */
2733
+ declare class MobileInterfaceDesignerItemRegistry extends BaseInterfaceDesignerItemRegistry {
2734
+ protected static readonly registryKey = "MobileInterfaceDesignerItemRegistry";
2735
+ }
2736
+
2737
+ /**
2738
+ * @internal
2739
+ */
2740
+ interface Subscription {
2741
+ unsubscribe: () => void;
2742
+ }
2743
+ /**
2744
+ * @internal
2745
+ */
2746
+ type Subscriber = (moduleType: _Type) => void;
2747
+ /**
2748
+ * @internal
2749
+ */
2750
+ declare class BootstrapNotifier {
2751
+ private readonly _subscribers;
2752
+ static get instance(): BootstrapNotifier;
2753
+ private constructor();
2754
+ notify(moduleType: _Type): void;
2755
+ subscribe(subscriber: Subscriber): Subscription;
2756
+ }
2757
+
2758
+ /**
2759
+ * @internal
2760
+ */
2761
+ declare class HandlerChainServicesRegistry extends ɵBaseRegistry {
2762
+ protected static readonly registryKey = "HandlerChainServicesRegistry";
2763
+ private static validate;
2764
+ private static checkUniqueRequestType;
2765
+ static register(config: HandlerChainServiceRegistryItem): void;
2766
+ static get services(): Map<string, HandlerChainServiceRegistryItem>;
2767
+ }
2768
+
2769
+ /**
2770
+ * @internal
2771
+ */
2772
+ declare const designTimeViewElementRegistryKey = "DesignTimeViewElementRegistry";
2773
+ /**
2774
+ * @internal
2775
+ * @hostPublicApi available through window.creatio.registry.DesignTimeViewElementRegistry
2776
+ */
2777
+ declare class DesignTimeViewElementRegistry extends ɵBaseRegistry {
2778
+ protected static readonly registryKey = "DesignTimeViewElementRegistry";
2779
+ static get infos(): Map<string, InternalDesignTimeViewElementRegistryItem>;
2780
+ static validate(config: InternalDesignTimeViewElementRegistryItem): void;
2781
+ static register(config: InternalDesignTimeViewElementRegistryItem): void;
2782
+ static getByOverriddenType(type: string): InternalDesignTimeViewElementRegistryItem | null;
2783
+ }
2784
+
2785
+ /**
2786
+ * @internal
2787
+ */
2788
+ declare class ValidatorMapValue {
2789
+ instanceType: _Type;
2790
+ instanceConfig: ValidatorConfig;
2791
+ }
2792
+ /**
2793
+ * @internal
2794
+ */
2795
+ declare const validatorRegistryKey = "ValidatorRegistry";
2796
+ /**
2797
+ * @internal
2798
+ * @hostPublicApi available through window.creatio.registry.ValidatorRegistry
2799
+ */
2800
+ declare class ValidatorRegistry extends ɵBaseRegistry {
2801
+ protected static readonly registryKey = "ValidatorRegistry";
2802
+ private static _hasWithAnotherTypeRef;
2803
+ static validate(config: ValidatorRegistryItem): void;
2804
+ static get items(): Map<string, ValidatorRegistryItem>;
2805
+ static register(config: ValidatorRegistryItem): void;
2806
+ }
2807
+
2808
+ /**
2809
+ * @internal
2810
+ */
2811
+ declare class PkgTopology extends ɵBaseRegistry {
2812
+ protected static readonly registryKey = "pkgTopology";
2813
+ static get items(): Map<string, number>;
2814
+ static get(pkgName: string): number;
2815
+ }
2816
+
2817
+ /**
2818
+ * @internal
2819
+ * @dontChange
2820
+ */
2821
+ declare class RemoteEntriesRegistry extends ɵBaseRegistry {
2822
+ /**
2823
+ * @dontChange
2824
+ */
2825
+ protected static registryKey: string;
2826
+ /**
2827
+ * @dontChange
2828
+ */
2829
+ static get items(): Map<string, RemoteBuildInfo>;
2830
+ }
2831
+
2832
+ /**
2833
+ * @internal
2834
+ */
2835
+ declare class LazyLoadRefsManager {
2836
+ #private;
2837
+ lazyLoadingDisabled: boolean;
2838
+ static get instance(): LazyLoadRefsManager;
2839
+ add(ref: ɵLazyLoadRef): void;
2840
+ size(): number;
2841
+ loadAll(): Promise<_Type[]>;
2842
+ clear(): void;
2843
+ }
2844
+
2845
+ /**
2846
+ * @internal
2847
+ */
2848
+ declare const registryKey = "ChatMessageTypeRegistry";
2849
+ /**
2850
+ * @internal
2851
+ * @hostPublicApi available through window.creatio.registry.ChatMessageTypeRegistry
2852
+ */
2853
+ declare class ChatMessageTypeRegistry extends ɵBaseRegistry {
2854
+ protected static readonly registryKey = "ChatMessageTypeRegistry";
2855
+ static get messageTypes(): Map<string, string>;
2856
+ static register(messageType: string, selector: string): void;
2857
+ static getSelector(messageType: string): Record<string, string> | null;
2858
+ }
2859
+
2860
+ /**
2861
+ * @internal
2862
+ */
2863
+ declare abstract class BaseRequestsResolver {
2864
+ abstract get(name: string): _RequestRegistrationConfig | undefined;
2865
+ abstract getAll(): ReadonlyMap<string, _RequestRegistrationConfig>;
2866
+ abstract has(name: string): boolean;
2867
+ }
2868
+
2869
+ /**
2870
+ * @internal
2871
+ */
2872
+ declare class RequestsResolver extends BaseRequestsResolver {
2873
+ get(name: string): _RequestRegistrationConfig | undefined;
2874
+ getAll(): ReadonlyMap<string, _RequestRegistrationConfig>;
2875
+ has(name: string): boolean;
2876
+ }
2877
+
2878
+ /**
2879
+ * @internal
2880
+ * @description Instance-based contract for DI usage. The implementation still uses shared static store internally.
2881
+ */
2882
+ interface IBaseItemRendererRegistry {
2883
+ registerItem(type: string, config: BaseItemRendererConfig): void;
2884
+ getItem<TItem = unknown>(type: string): BaseItemRendererConfig<TItem> | null;
2885
+ }
2886
+
2887
+ /**
2888
+ * @internal
2889
+ * @description DI-friendly instance wrapper over the shared static registry store from base registry.
2890
+ */
2891
+ declare class BaseItemRendererRegistry extends ɵBaseRegistry implements IBaseItemRendererRegistry {
2892
+ protected static readonly registryKey: string;
2893
+ /** Base registry store uses the generic `typeInfos` key for historical reasons. */
2894
+ protected get _rendererConfigs(): Map<string, BaseItemRendererConfig>;
2895
+ /**
2896
+ * @internal
2897
+ * @description Registers renderer config by item type in the registry store.
2898
+ * @param type - Item type key.
2899
+ * @param config - Renderer config for the specified type.
2900
+ */
2901
+ registerItem(type: string, config: BaseItemRendererConfig): void;
2902
+ /**
2903
+ * @internal
2904
+ * @description Returns renderer config by item type or null when no registration exists.
2905
+ * @param type - Item type key.
2906
+ * @returns Renderer config for the type or `null`.
2907
+ */
2908
+ getItem<TItem = unknown>(type: string): BaseItemRendererConfig<TItem> | null;
2909
+ }
2910
+
2911
+ /**
2912
+ * Represents a set of localizable values.
2913
+ * @internal
2914
+ */
2915
+ type LocalizableValues<T> = Record<string, T>;
2916
+ /**
2917
+ * Represents a set of localizable strings.
2918
+ * @internal
2919
+ */
2920
+ type LocalizableStringValues = LocalizableValues<string>;
2921
+
2922
+ /**
2923
+ * @internal
2924
+ * @description Function that takes a injection token
2925
+ * with context to resolve dependency, and returns dependency instance.
2926
+ */
2927
+ type InternalResolveDependencyFn = (token: unknown, context?: {
2928
+ id?: string;
2929
+ }) => unknown;
2930
+
2931
+ /**
2932
+ * @internal
2933
+ */
2934
+ declare function objectDeepKeys(obj: object): Array<Array<string>>;
2935
+
2936
+ /**
2937
+ * @internal
2938
+ */
2939
+ declare class HandlersOrderComparer {
2940
+ private readonly _request;
2941
+ private readonly _scopesOrder;
2942
+ constructor(_request: _BaseRequest);
2943
+ private _getOrderByScopes;
2944
+ private _getOrderByPkgTopology;
2945
+ compare(a: HandlerConfig, b: HandlerConfig): number;
2946
+ }
2947
+
2948
+ /**
2949
+ * @internal
2950
+ */
2951
+ declare function instantiate<T = unknown>(type: _Type<T>, resolveDependency: _ResolveDependencyFn | undefined): T;
2952
+ /**
2953
+ * @public
2954
+ * @description For internal use only.
2955
+ */
2956
+ declare function ɵinstantiate<T = unknown>(type: _Type<T>, resolveDependency: _ResolveDependencyFn | undefined): T;
2957
+
2958
+ /**
2959
+ * @internal
2960
+ */
2961
+ declare function applyLocalizeMetadataFn<T extends object>(obj: object, localizeMetadata: _LocalizeFn | undefined): T;
2962
+
2963
+ /**
2964
+ * @internal
2965
+ */
2966
+ type ViewElementMetadata = ViewElementRegistrationConfig | AngularViewElementRegistrationConfig;
2967
+ /**
2968
+ * @internal
2969
+ */
2970
+ type InterfaceDesignerItemMetadata = InterfaceDesignerItemDefinition | InternalInterfaceDesignerItemRegistrationConfig;
2971
+ /**
2972
+ * @internal
2973
+ */
2974
+ type ValidatorMetadata = ValidatorConfig & {
2975
+ typeRef: _Type<BaseValidator>;
2976
+ };
2977
+ /**
2978
+ * @internal
2979
+ */
2980
+ interface ConverterMetadata {
2981
+ type: string;
2982
+ typeRef: _Type<Converter>;
2983
+ }
2984
+ /**
2985
+ * @internal
2986
+ */
2987
+ declare function setModuleMetadata(metadata: ModuleDefinition | InternalModuleDefinition, type: _Type): void;
2988
+ /**
2989
+ * @internal
2990
+ */
2991
+ declare function getModuleMetadata(type: _Type): ModuleDefinition | InternalModuleDefinition;
2992
+ /**
2993
+ * @internal
2994
+ */
2995
+ declare function setViewElementMetadata(metadata: ViewElementMetadata, type: _Type): void;
2996
+ /**
2997
+ * @internal
2998
+ */
2999
+ declare function setMobileViewElementMetadata(metadata: ViewElementMetadata, type: _Type): void;
3000
+ /**
3001
+ * @internal
3002
+ */
3003
+ declare function getViewElementMetadata(type: _Type): ViewElementMetadata;
3004
+ /**
3005
+ * @internal
3006
+ */
3007
+ declare function getMobileViewElementMetadata(type: _Type): ViewElementMetadata;
3008
+ /**
3009
+ * @internal
3010
+ */
3011
+ declare function setValidatorMetadata(metadata: ValidatorMetadata, type: _Type): void;
3012
+ /**
3013
+ * @internal
3014
+ */
3015
+ declare function getValidatorMetadata(type: _Type): ValidatorMetadata;
3016
+ /**
3017
+ * @internal
3018
+ */
3019
+ declare function setConverterMetadata(metadata: ConverterMetadata, type: _Type): void;
3020
+ /**
3021
+ * @internal
3022
+ */
3023
+ declare function getConverterMetadata(type: _Type): ConverterMetadata;
3024
+ /**
3025
+ * @internal
3026
+ */
3027
+ declare function setInterfaceDesignerItemMetadata(metadata: InterfaceDesignerItemMetadata, type: _Type): void;
3028
+ /**
3029
+ * @internal
3030
+ */
3031
+ declare function setMobileInterfaceDesignerItemMetadata(metadata: InterfaceDesignerItemMetadata, type: _Type): void;
3032
+ /**
3033
+ * @internal
3034
+ */
3035
+ declare function getInterfaceDesignerItemMetadata(type: _Type): InterfaceDesignerItemMetadata;
3036
+ /**
3037
+ * @internal
3038
+ */
3039
+ declare function getMobileInterfaceDesignerItemMetadata(type: _Type): InterfaceDesignerItemMetadata;
3040
+ /**
3041
+ * @internal
3042
+ */
3043
+ declare function setDesignTimeViewElementMetadata(metadata: InternalDesignTimeViewElementRegistryItem, type: _Type): void;
3044
+ /**
3045
+ * @internal
3046
+ */
3047
+ declare function getDesignTimeViewElementMetadata(type: _Type): InternalDesignTimeViewElementRegistryItem;
3048
+ /**
3049
+ * @internal
3050
+ */
3051
+ declare function hasInterfaceDesignerItemMetadata(type: _Type): boolean;
3052
+ /**
3053
+ * @internal
3054
+ */
3055
+ declare function hasMobileInterfaceDesignerItemMetadata(type: _Type): boolean;
3056
+ /**
3057
+ * @internal
3058
+ */
3059
+ declare function setRequestHandlerMetadata(metadata: RequestHandlerDefinition, type: _Type): void;
3060
+ /**
3061
+ * @internal
3062
+ */
3063
+ declare function getRequestHandlerMetadata(type: _Type): RequestHandlerDefinition;
3064
+ /**
3065
+ * @internal
3066
+ */
3067
+ declare function getHandlerChainServiceMetadata(typeRef: _Type): HandlerChainServiceRegistryItem;
3068
+ /**
3069
+ * @internal
3070
+ */
3071
+ declare function getCrtInputsMetadata(type: _Type): Record<string, CrtInputRegistrationConfig>;
3072
+ /**
3073
+ * @internal
3074
+ */
3075
+ declare function getCrtOutputsMetadata(type: _Type): Record<string, unknown>;
3076
+ /**
3077
+ * @internal
3078
+ */
3079
+ declare function getCrtValidationInputsMetadata(type: _Type): Record<string, unknown>;
3080
+ /**
3081
+ * @internal
3082
+ */
3083
+ declare function getTypeDependencies(type: _Type): unknown[];
3084
+
3085
+ /**
3086
+ * @internal
3087
+ */
3088
+ declare function matchScopes(handlerScopes?: string[], requestScopes?: string[]): boolean;
3089
+
3090
+ /**
3091
+ * @internal
3092
+ * Retrieves the deep module dependencies for the given types.
3093
+ *
3094
+ * @param types An array of types.
3095
+ * @returns An array of unique module dependencies.
3096
+ */
3097
+ declare function getDeepModuleDependencies(types: _Type[]): _Type[];
3098
+
3099
+ /**
3100
+ * @public
3101
+ * @description Creatio platform interacts with input's of user-defined component through CrtInput decorator.
3102
+ * @param config {@link CrtInputRegistrationConfig}
3103
+ *
3104
+ * @example
3105
+ * export class AppComponent {
3106
+ * @CrtInput()
3107
+ * public value!: string;
3108
+ * }
3109
+ */
3110
+ declare function CrtInput(config?: CrtInputRegistrationConfig): (target: any, propertyKey: string) => void;
3111
+
3112
+ /**
3113
+ * @public
3114
+ * @description User-defined components could notify Creatio platform about changes through CrtOutput decorator.
3115
+ * @example
3116
+ * export class AppComponent {
3117
+ * @Input()
3118
+ * @CrtOutput()
3119
+ * public valueChange;
3120
+ * }
3121
+ */
3122
+ declare function CrtOutput(): (target: any, propertyKey: string) => void;
3123
+
3124
+ /**
3125
+ * @public
3126
+ * @description User-defined components receive validationInfo changes through CrtValidationInput decorator.
3127
+ * Make sure you have defined input for every validationInfo input.
3128
+ * To properly declare validationInfo field:
3129
+ * 1. Declare input field inside inputs section. For example `value`
3130
+ * 2. In validationInputs section declare same field which ends with ValidationInfo.
3131
+ * For previous example `valueValidationInfo`
3132
+ *
3133
+ * @example
3134
+ * export class AppComponent {
3135
+ * @CrtInput()
3136
+ public value;
3137
+ *
3138
+ * @CrtValidationInput()
3139
+ * public valueValidationInfo;
3140
+ * }
3141
+ */
3142
+ declare function CrtValidationInput(): (target: any, propertyKey: string) => void;
3143
+
3144
+ /**
3145
+ * @public
3146
+ * @description CrtMobileViewElement decorator allows user to declare mobile components in a Creatio platform.
3147
+ * Make sure the component is specified in the viewElements section of CrtModule.
3148
+ * @param config - registration config. {@link ViewElementRegistrationConfig}.
3149
+ *
3150
+ * @example
3151
+ * @CrtMobileViewElement({
3152
+ * type: 'usr.Example',
3153
+ * selector: 'usr-example',
3154
+ * })
3155
+ * export class AppComponent {
3156
+ * @Input()
3157
+ * @CrtInput()
3158
+ * public value!: string;
3159
+ * }
3160
+ */
3161
+ declare function CrtMobileViewElement(config: ViewElementRegistrationConfig): (type: _Type) => void;
3162
+ /**
3163
+ * @internal
3164
+ */
3165
+ declare function CrtMobileViewElement(config: CrtAngularViewElementConfig): (type: _Type) => void;
3166
+
3167
+ /**
3168
+ * @public
3169
+ * @description CrtViewElement decorator allows user to declare components in a Creatio platform.
3170
+ * Make sure the component is specified in the viewElements section of CrtModule.
3171
+ * @param config - registration config. {@link ViewElementRegistrationConfig}.
3172
+ *
3173
+ * @example
3174
+ * @CrtViewElement({
3175
+ * type: 'usr.Example',
3176
+ * selector: 'usr-example',
3177
+ * })
3178
+ * export class AppComponent {
3179
+ * @Input()
3180
+ * @CrtInput()
3181
+ * public value!: string;
3182
+ * }
3183
+ */
3184
+ declare function CrtViewElement(config: ViewElementRegistrationConfig): (type: _Type) => void;
3185
+ /**
3186
+ * @internal
3187
+ */
3188
+ declare function CrtViewElement(config: CrtAngularViewElementConfig): (type: _Type) => void;
3189
+
3190
+ /**
3191
+ * @internal
3192
+ */
3193
+ type Platform = 'web' | 'mobile';
3194
+ /**
3195
+ * @internal
3196
+ */
3197
+ declare function viewElementRegister(config: CrtAngularViewElementConfig | ViewElementRegistrationConfig, platform: Platform): (type: _Type) => void;
3198
+
3199
+ /**
3200
+ * @public
3201
+ * @description CrtModule decorator is a 'container' where user actually setup elements.
3202
+ * In could contain viewElements, definitions of other CrtModules.
3203
+ * @param moduleDefinition - {@link ModuleDefinition}
3204
+ *
3205
+ * @example
3206
+ * @CrtModule({
3207
+ * viewElements: [AppComponent],
3208
+ * requestHandlers: [SomeRequestHandler],
3209
+ * validators: [SomeValidator],
3210
+ * })
3211
+ * @NgModule({
3212
+ * declarations: [AppComponent],
3213
+ * imports: [BrowserModule],
3214
+ * providers: [],
3215
+ * })
3216
+ * export class AppModule {}
3217
+ */
3218
+ declare function CrtModule(moduleDefinition: ModuleDefinition): (type: _Type) => void;
3219
+ /**
3220
+ * @internal
3221
+ */
3222
+ declare function CrtModule(moduleDefinition: InternalModuleDefinition): (type: _Type) => void;
3223
+ /**
3224
+ * @internal
3225
+ */
3226
+ declare function CrtModule(moduleDefinition: ModuleDefinition | InternalModuleDefinition): (type: _Type) => void;
3227
+
3228
+ /**
3229
+ * @public
3230
+ * @description (Deprecated) Decorator to declare design time configuration for a view element that is
3231
+ * registered eagerly during module bootstrap.
3232
+ *
3233
+ * @deprecated For new remote integrations, publish interface-designer metadata through
3234
+ * {@link RemoteFeatureDefinition.loadDesignerDefinitions} instead of using this decorator.
3235
+ * Existing remotes may keep using this decorator for backward compatibility, but should migrate
3236
+ * to {@link RemoteEntryDefinition} and {@link RemoteFeatureDefinition} when updated.
3237
+ *
3238
+ * @param config - registration config {@link InterfaceDesignerItemDefinition}.
3239
+ *
3240
+ * @example
3241
+ * @CrtViewElement({
3242
+ * type: "usr.Example',
3243
+ * selector: 'usr-example',
3244
+ * })
3245
+ * @CrtInterfaceDesignerItem({
3246
+ * toolbarConfig: {
3247
+ * caption: 'usrExampleCaption',
3248
+ * icon: require(`!!raw-loader?{esModule:false}!../assets/icon.svg`)
3249
+ * hint: 'usrExampleHint',
3250
+ * defaultPropertyValues: {
3251
+ * value: 'This is default value',
3252
+ * },
3253
+ * },
3254
+ * })
3255
+ * @Component({
3256
+ * selector: 'usr-example',
3257
+ * templateUrl: './app.component.html',
3258
+ * styleUrls: ['./app.component.scss'],
3259
+ * encapsulation: ViewEncapsulation.ShadowDom,
3260
+ * })
3261
+ * export class AppComponent {
3262
+ * @Input()
3263
+ * @CrtInput()
3264
+ * public value!: string;
3265
+ * }
3266
+ */
3267
+ declare function CrtInterfaceDesignerItem(config: InterfaceDesignerItemDefinition): (type: _Type) => void;
3268
+
3269
+ /**
3270
+ * @internal
3271
+ */
3272
+ declare function interfaceDesignerItemRegister(config: InterfaceDesignerItemDefinition | InternalInterfaceDesignerItemRegistrationConfig, platform: Platform): (type: _Type) => void;
3273
+
3274
+ /**
3275
+ * @public
3276
+ * @description (Deprecated) Decorator to declare design time configuration for a mobile view element that is
3277
+ * registered eagerly during module bootstrap.
3278
+ *
3279
+ * @deprecated For new remote integrations, publish interface-designer metadata through
3280
+ * {@link RemoteFeatureDefinition.loadDesignerDefinitions} instead of using this decorator.
3281
+ * Existing remotes may keep using this decorator for backward compatibility, but should migrate
3282
+ * to {@link RemoteEntryDefinition} and {@link RemoteFeatureDefinition} when updated.
3283
+ *
3284
+ * @param config - registration config {@link InterfaceDesignerItemDefinition}.
3285
+ *
3286
+ * @example
3287
+ * @CrtMobileViewElement({
3288
+ * type: "usr.Example',
3289
+ * selector: 'usr-example',
3290
+ * })
3291
+ * @CrtMobileInterfaceDesignerItem({
3292
+ * toolbarConfig: {
3293
+ * caption: 'usrExampleCaption',
3294
+ * icon: require(`!!raw-loader?{esModule:false}!../assets/icon.svg`)
3295
+ * hint: 'usrExampleHint',
3296
+ * defaultPropertyValues: {
3297
+ * value: 'This is default value',
3298
+ * },
3299
+ * },
3300
+ * })
3301
+ * @Component({
3302
+ * selector: 'usr-example',
3303
+ * templateUrl: './app.component.html',
3304
+ * styleUrls: ['./app.component.scss'],
3305
+ * encapsulation: ViewEncapsulation.ShadowDom,
3306
+ * })
3307
+ * export class AppComponent {
3308
+ * @Input()
3309
+ * @CrtInput()
3310
+ * public value!: string;
3311
+ * }
3312
+ */
3313
+ declare function CrtMobileInterfaceDesignerItem(config: InterfaceDesignerItemDefinition): (type: _Type) => void;
3314
+
3315
+ /**
3316
+ * @public
3317
+ * @description
3318
+ * Constructor parameter decorator.
3319
+ * Mark parameter as dependency that should be obtained by token.
3320
+ * @param token - token by which the dependency instance will be obtained
3321
+ * @example
3322
+ * class MyHandler {
3323
+ * constructor(@CrtInject(USER_NAME_TOKEN) userName: string) {}
3324
+ * }
3325
+ */
3326
+ declare function CrtInject(token: unknown): any;
3327
+
3328
+ /**
3329
+ * @public
3330
+ * @description Decorator to declare validator
3331
+ * @param config - validator config {@link ValidatorConfig}.
3332
+ * If no config is passed, the validator cannot be declared, but can be used as a base class for another validator.
3333
+ *
3334
+ * @example
3335
+ * @CrtValidator({
3336
+ * type: 'crt.Required',
3337
+ * })
3338
+ * export class RequiredValidator extends BaseValidator {
3339
+ * protected override async = false;
3340
+ * public validate(controlState: CrtControlState, params?: ValidatorParametersValues): CrtValidationErrors | null {
3341
+ * Implementation here...
3342
+ * }
3343
+ * }
3344
+ */
3345
+ declare function CrtValidator(config: ValidatorConfig): (type: _Type) => void;
3346
+ declare function CrtValidator(): (type: _Type | _AbstractType) => void;
3347
+
3348
+ /**
3349
+ * @public
3350
+ * @description Decorator to declare request handler
3351
+ * @param config - request handler config {@link RequestHandlerRegistrationConfig}.
3352
+ * If no config is passed, the handler cannot be declared, but can be used as a base class for another handler.
3353
+ *
3354
+ * @example
3355
+ * *@CrtRequestHandler({
3356
+ * requestType: 'crt.SomeRequest',
3357
+ * type: 'crt.SomeRequestHandler',
3358
+ * })
3359
+ * export class SectionInitHandler extends BaseRequestHandler<SomeRequest> {
3360
+ * public async handle(request: SomeRequest): Promise<unknown> {
3361
+ * // Some business logic
3362
+ * return this.next?.handle(request);
3363
+ * }
3364
+ * }
3365
+ */
3366
+ declare function CrtRequestHandler<T extends _RequestHandler>(config: RequestHandlerDefinition): (type: _Type<T>) => void;
3367
+ declare function CrtRequestHandler(): (type: _Type | _AbstractType) => void;
3368
+
3369
+ /**
3370
+ * @public
3371
+ * @description Decorator to declare converter
3372
+ * @param config - converter config {@link ConverterConfig}.
3373
+ * if config is not passed, converter won't be declared,
3374
+ * but still can be used as base class for another converter
3375
+ *
3376
+ * @example
3377
+ * @CrtConverter({
3378
+ * type: 'usr.ToBoolean',
3379
+ * })
3380
+ * export class ToBooleanConverter implements Converter<unknown, boolean> {
3381
+ * public convert(value: unknown): boolean {
3382
+ * return Boolean(value);
3383
+ * }
3384
+ * }
3385
+ */
3386
+ declare function CrtConverter(config: ConverterConfig): (type: _Type) => void;
3387
+ declare function CrtConverter(): (type: _Type | _AbstractType) => void;
3388
+
3389
+ /**
3390
+ * @public
3391
+ * @description Config used to register component as a message type in chat.
3392
+ */
3393
+ interface ChatMessageTypeRegistrationConfig {
3394
+ /**
3395
+ * @description component tag selector; Element appears in DOM with this selector.
3396
+ */
3397
+ selector: string;
3398
+ /**
3399
+ * @description type of message.
3400
+ */
3401
+ messageType: string;
3402
+ }
3403
+ /**
3404
+ * @public
3405
+ * @description CrtChatMessageType decorator allows user to register components as a message type in chat.
3406
+ * @param config - registration config. {@link ChatMessageTypeRegistrationConfig}.
3407
+ *
3408
+ * @example
3409
+ * @CrtChatMessageType({
3410
+ * selector: 'usr-video-message',
3411
+ * messageType: 'video',
3412
+ * })
3413
+ * export class AppComponent { }
3414
+ */
3415
+ declare function CrtChatMessageType(config: ChatMessageTypeRegistrationConfig): (type: _Type) => void;
3416
+
3417
+ /**
3418
+ * @public
3419
+ * @description Function allows to register user-defined component as view element in Creatio platform.
3420
+ * @param config - registration config. {@link ViewElementRegistrationConfig}
3421
+ * @example
3422
+ * sdk.registerViewElement({
3423
+ * type: 'usr.Timeline',
3424
+ * selector: 'usr-timeline',
3425
+ * inputs: {
3426
+ * primaryColumnValue: {},
3427
+ * cardSchemaName: {},
3428
+ * entitySchemaName: {}
3429
+ * }
3430
+ * });
3431
+ */
3432
+ declare function registerViewElement(config: ViewElementRegistrationConfig): void;
3433
+
3434
+ /**
3435
+ * @internal
3436
+ * @description Function allows to register angular component as view element in Creatio platform.
3437
+ */
3438
+ declare function registerAngularViewElement(config: BaseViewElementRegistrationConfig, typeRef: _Type): void;
3439
+
3440
+ /**
3441
+ * @public
3442
+ * @description Module bootstrap options
3443
+ */
3444
+ interface BootstrapOptions {
3445
+ /**
3446
+ * Function to be used to translate localizable values of class metadata
3447
+ */
3448
+ localizeMetadata?: _LocalizeFn;
3449
+ /**
3450
+ * Function to be used to resolve class dependencies
3451
+ */
3452
+ resolveDependency?: _ResolveDependencyFn;
3453
+ /**
3454
+ * @internal
3455
+ */
3456
+ moduleType?: 'host' | 'remote';
3457
+ /**
3458
+ * @internal
3459
+ */
3460
+ featureValues?: {
3461
+ [key: string]: boolean;
3462
+ };
3463
+ /**
3464
+ * @internal
3465
+ * @experimental
3466
+ */
3467
+ onContextCreate?: (context: InjectionContext) => void;
3468
+ /**
3469
+ * @internal
3470
+ * @experimental
3471
+ */
3472
+ onContextUpdate?: (context: InjectionContext) => void;
3473
+ /**
3474
+ * @internal
3475
+ * @experimental
3476
+ */
3477
+ onContextDestroy?: (context: InjectionContext) => void;
3478
+ }
3479
+ /**
3480
+ * @internal
3481
+ */
3482
+ declare function bootstrapCrtModule(type: _Type, options: BootstrapOptions & {
3483
+ moduleType: 'host';
3484
+ }): void;
3485
+ /**
3486
+ * @public
3487
+ * @description Function required to bootstrapping elements defined in CrtModules.
3488
+ * Call this function as soon as possible during bootstrapping your application.
3489
+ * @param type - module type
3490
+ * @param options - {@link BootstrapOptions}
3491
+ *
3492
+ * @example
3493
+ * bootstrapCrtModule(AppModule)
3494
+ */
3495
+ declare function bootstrapCrtModule(remoteName: string, type: _Type, options?: BootstrapOptions): void;
3496
+ /**
3497
+ * @public
3498
+ * @deprecated
3499
+ */
3500
+ declare function bootstrapCrtModule(type: _Type, options?: BootstrapOptions): void;
3501
+
3502
+ /**
3503
+ * @public
3504
+ * @description Use this function in decorators to indicate that a value should be localized.
3505
+ * Note that the "localizeMetadata" bootstrap option should be provided,
3506
+ * otherwise the value cannot be localized.
3507
+ *
3508
+ * @example
3509
+ *
3510
+ * ### Using 'localize' in decorator
3511
+ * ```ts
3512
+ * @CrtInterfaceDesignerItem({
3513
+ * toolbarConfig: {
3514
+ * caption: localize('MyElement.Caption')
3515
+ * }
3516
+ * })
3517
+ * class MyElement {}
3518
+ * ```
3519
+ * ### Passing 'localizeMetadata' bootstrap option
3520
+ * ```ts
3521
+ * bootstrapCrtModule(MyModule, {
3522
+ * localizeMetadata: (key: string) => thirdPartyTranslateService.translate(key)
3523
+ * });
3524
+ * ```
3525
+ */
3526
+ declare function localize(key: string): LocalizableValue;
3527
+
3528
+ /**
3529
+ * @internal
3530
+ */
3531
+ declare function bootstrapCrtModuleHandlerChainServices(type: _Type): void;
3532
+
3533
+ /**
3534
+ * @internal
3535
+ * Clears global registries, resets state of global services.
3536
+ * Can be used in unit tests to clear global registries after bootstrapping module.
3537
+ * @example
3538
+ * beforeEach(() => {
3539
+ * bootstrapCrtModule('test', TestModule);
3540
+ * });
3541
+ *
3542
+ * afterEach(() => {
3543
+ * resetGlobals();
3544
+ * });
3545
+ */
3546
+ declare function resetGlobals(): void;
3547
+
3548
+ /**
3549
+ * @internal
3550
+ */
3551
+ type BootstrappedCrtModules = Map<_Type, {
3552
+ root: boolean;
3553
+ options: BootstrapOptions;
3554
+ source: string;
3555
+ }>;
3556
+ /**
3557
+ * @internal
3558
+ */
3559
+ declare const bootstrappedCrtModules: BootstrappedCrtModules;
3560
+
3561
+ /**
3562
+ * @internal
3563
+ */
3564
+ declare function callOnContextCreateHooks(context: InjectionContext): void;
3565
+ /**
3566
+ * @internal
3567
+ */
3568
+ declare function callOnContextUpdateHooks(context: InjectionContext): void;
3569
+ /**
3570
+ * @internal
3571
+ */
3572
+ declare function callOnContextDestroyHooks(context: InjectionContext): void;
3573
+
3574
+ /**
3575
+ * @internal
3576
+ * @description Defines render configuration for view element.
3577
+ */
3578
+ declare function defineRenderConfig(config: OnViewportRenderConfig | DefaultRenderConfig): void;
3579
+
3580
+ /**
3581
+ * Service for managing AI context parts and providing a unified context.
3582
+ * This service allows adding, retrieving, and removing context parts, which can be
3583
+ * either static values, promises, or dynamically provided through a function.
3584
+ */
3585
+ declare class AiContextService {
3586
+ private _contextParts;
3587
+ /**
3588
+ * Retrieves the singleton instance of the `AiContextService`.
3589
+ * If the instance does not exist, it will be created.
3590
+ */
3591
+ static get instance(): AiContextService;
3592
+ /**
3593
+ * Generates a unique identifier for a context part.
3594
+ * @returns A string representing a unique identifier.
3595
+ */
3596
+ private _generateId;
3597
+ /**
3598
+ * @public
3599
+ * Adds a new context part to the service.
3600
+ * The context part can be a static value, a promise, or a function that provides the value.
3601
+ *
3602
+ * @param value - The context part to add. It can be one of the following:
3603
+ * - `ContextProvider` (a function that provides the context part)
3604
+ * @param id - (Optional) A unique identifier for the context part. If not provided, a new ID will be generated.
3605
+ * @returns The unique identifier of the added context part.
3606
+ */
3607
+ setContextPart(value: ContextProvider, id?: string): string;
3608
+ /**
3609
+ * @public
3610
+ * Retrieves all context parts as an array of resolved values.
3611
+ * If the context parts include promises or functions, they will be resolved.
3612
+ *
3613
+ * @returns A promise that resolves to an array of context parts, which can be
3614
+ * either `CreatioPageContextPart` or `ConstantValuesContextPart`.
3615
+ */
3616
+ getContext(): Promise<(CreatioPageContextPart | ConstantValuesContextPart)[]>;
3617
+ /**
3618
+ * @public
3619
+ * Removes a specific context part by its unique identifier.
3620
+ *
3621
+ * @param id - The unique identifier of the context part to remove.
3622
+ */
3623
+ removeContextPart(id: string): void;
3624
+ /**
3625
+ * @public
3626
+ * Removes all context parts from the service.
3627
+ */
3628
+ removeContext(): void;
3629
+ }
3630
+
3631
+ /**
3632
+ * @public
3633
+ * @classdesc Service to handling a way of tasks execution in Creatio plaform
3634
+ * @extends {BaseHandlerChainService}
3635
+ */
3636
+ declare class CrtZoneService extends BaseHandlerChainService {
3637
+ /**
3638
+ * @internal
3639
+ */
3640
+ readonly requestType = "crt.ZoneService";
3641
+ /**
3642
+ * @description Method designed to run task outside of Creatio zone
3643
+ * @param {Function} callback - task which should be executed outside of tracking CrtZone
3644
+ * @returns `unknown`
3645
+ */
3646
+ runOutside: (callback: () => unknown) => unknown;
3647
+ }
3648
+
3649
+ /**
3650
+ * @public
3651
+ * @classdesc Service to working with dialog using handler chain.
3652
+ * @extends {BaseHandlerChainService}
3653
+ */
3654
+ declare class DialogService extends BaseHandlerChainService implements _BaseDialogService {
3655
+ /**
3656
+ * @internal
3657
+ */
3658
+ readonly requestType = "crt.DialogService";
3659
+ /**
3660
+ * @description Opens dialog window.
3661
+ * @param {BaseDialogConfig<BaseDialogButtonConfig>} config - The configuration of dialog window.
3662
+ * @returns `Promise<string>`.
3663
+ * The result of a user's choice.
3664
+ */
3665
+ open: (config: _BaseDialogConfig<_BaseDialogButtonConfig>) => Promise<string>;
3666
+ }
3667
+
3668
+ /**
3669
+ * @public
3670
+ * @classdesc Service to working with Creatio platform features using handler chain
3671
+ * @extends {BaseHandlerChainService}
3672
+ */
3673
+ declare class FeatureService extends BaseHandlerChainService {
3674
+ /**
3675
+ * @internal
3676
+ */
3677
+ readonly requestType = "crt.FeatureService";
3678
+ /**
3679
+ * @description Method designed to get state for single feature
3680
+ * @param {string} code - feature code
3681
+ * @returns `Promise<boolean>`
3682
+ */
3683
+ getFeatureState: (code: string) => Promise<boolean>;
3684
+ /**
3685
+ * @description Method designed to get feature states
3686
+ * @param {string[]} codes - feature codes
3687
+ * @returns `Promise<boolean[]>`
3688
+ */
3689
+ getFeaturesState: (codes: string[]) => Promise<boolean[]>;
3690
+ }
3691
+
3692
+ /**
3693
+ * @public
3694
+ * @description Key-value shape for HttpHeaders
3695
+ */
3696
+ interface HttpHeaders {
3697
+ [header: string]: string;
3698
+ }
3699
+
3700
+ /**
3701
+ * @public
3702
+ * @description Http response
3703
+ * @template T
3704
+ * @property {HttpHeaders} headers - response headers {@link HttpHeaders}
3705
+ * @property {number} status - response status
3706
+ * @property {string} statusText - text of response
3707
+ * @property {string | null} url - response url
3708
+ * @property {boolean} ok - ok status
3709
+ * @property {T | null} body - response body
3710
+ */
3711
+ interface HttpResponse<T = unknown> {
3712
+ /**
3713
+ * @description response headers {@link HttpHeaders}
3714
+ */
3715
+ headers: HttpHeaders;
3716
+ /**
3717
+ * @description response status
3718
+ */
3719
+ status: number;
3720
+ /**
3721
+ * @description text of response
3722
+ */
3723
+ statusText: string;
3724
+ /**
3725
+ * @description response url
3726
+ */
3727
+ url: string | null;
3728
+ /**
3729
+ * @description ok status
3730
+ */
3731
+ ok: boolean;
3732
+ /**
3733
+ * @description response body
3734
+ */
3735
+ body: T | null;
3736
+ }
3737
+
3738
+ /**
3739
+ * @public
3740
+ * @classdesc Http service to perform Http requests
3741
+ * @extends {BaseHandlerChainService}
3742
+ */
3743
+ declare class HttpClientService extends BaseHandlerChainService {
3744
+ /**
3745
+ * @internal
3746
+ */
3747
+ readonly requestType = "crt.HttpClientService";
3748
+ get(url: string, options: {
3749
+ headers?: HttpHeaders;
3750
+ responseType: 'arraybuffer';
3751
+ }): Promise<HttpResponse<ArrayBuffer>>;
3752
+ get(url: string, options: {
3753
+ headers?: HttpHeaders;
3754
+ responseType: 'blob';
3755
+ }): Promise<HttpResponse<Blob>>;
3756
+ get(url: string, options: {
3757
+ headers?: HttpHeaders;
3758
+ responseType: 'text';
3759
+ }): Promise<HttpResponse<string>>;
3760
+ get(url: string, options: {
3761
+ headers?: HttpHeaders;
3762
+ responseType?: 'json';
3763
+ }): Promise<HttpResponse>;
3764
+ get<T>(url: string, options: {
3765
+ headers?: HttpHeaders;
3766
+ responseType?: 'json';
3767
+ }): Promise<HttpResponse<T>>;
3768
+ post(url: string, body: unknown | null, options: {
3769
+ headers?: HttpHeaders;
3770
+ responseType: 'arraybuffer';
3771
+ }): Promise<HttpResponse<ArrayBuffer>>;
3772
+ post(url: string, body: unknown | null, options: {
3773
+ headers?: HttpHeaders;
3774
+ responseType: 'blob';
3775
+ }): Promise<HttpResponse<Blob>>;
3776
+ post(url: string, body: unknown | null, options: {
3777
+ headers?: HttpHeaders;
3778
+ responseType: 'text';
3779
+ }): Promise<HttpResponse<string>>;
3780
+ post(url: string, body: unknown | null, options: {
3781
+ headers?: HttpHeaders;
3782
+ responseType?: 'json';
3783
+ }): Promise<HttpResponse>;
3784
+ post<T>(url: string, body: unknown | null, options: {
3785
+ headers?: HttpHeaders;
3786
+ responseType?: 'json';
3787
+ }): Promise<HttpResponse<T>>;
3788
+ delete(url: string, options: {
3789
+ headers?: HttpHeaders;
3790
+ responseType: 'arraybuffer';
3791
+ body?: unknown | null;
3792
+ }): Promise<HttpResponse<ArrayBuffer>>;
3793
+ delete(url: string, options: {
3794
+ headers?: HttpHeaders;
3795
+ responseType: 'blob';
3796
+ body?: unknown | null;
3797
+ }): Promise<HttpResponse<Blob>>;
3798
+ delete(url: string, options: {
3799
+ headers?: HttpHeaders;
3800
+ responseType: 'text';
3801
+ body?: unknown | null;
3802
+ }): Promise<HttpResponse<string>>;
3803
+ delete(url: string, options: {
3804
+ headers?: HttpHeaders;
3805
+ responseType?: 'json';
3806
+ body?: unknown | null;
3807
+ }): Promise<HttpResponse>;
3808
+ delete<T>(url: string, options: {
3809
+ headers?: HttpHeaders;
3810
+ responseType?: 'json';
3811
+ body?: unknown | null;
3812
+ }): Promise<HttpResponse<T>>;
3813
+ put(url: string, body: unknown | null, options: {
3814
+ headers?: HttpHeaders;
3815
+ responseType: 'arraybuffer';
3816
+ }): Promise<HttpResponse<ArrayBuffer>>;
3817
+ put(url: string, body: unknown | null, options: {
3818
+ headers?: HttpHeaders;
3819
+ responseType: 'blob';
3820
+ }): Promise<HttpResponse<Blob>>;
3821
+ put(url: string, body: unknown | null, options: {
3822
+ headers?: HttpHeaders;
3823
+ responseType: 'text';
3824
+ }): Promise<HttpResponse<string>>;
3825
+ put(url: string, body: unknown | null, options: {
3826
+ headers?: HttpHeaders;
3827
+ responseType?: 'json';
3828
+ }): Promise<HttpResponse>;
3829
+ put<T>(url: string, body: unknown | null, options: {
3830
+ headers?: HttpHeaders;
3831
+ responseType?: 'json';
3832
+ }): Promise<HttpResponse<T>>;
3833
+ patch(url: string, body: unknown | null, options: {
3834
+ headers?: HttpHeaders;
3835
+ responseType: 'arraybuffer';
3836
+ }): Promise<HttpResponse<ArrayBuffer>>;
3837
+ patch(url: string, body: unknown | null, options: {
3838
+ headers?: HttpHeaders;
3839
+ responseType: 'blob';
3840
+ }): Promise<HttpResponse<Blob>>;
3841
+ patch(url: string, body: unknown | null, options: {
3842
+ headers?: HttpHeaders;
3843
+ responseType: 'text';
3844
+ }): Promise<HttpResponse<string>>;
3845
+ patch(url: string, body: unknown | null, options: {
3846
+ headers?: HttpHeaders;
3847
+ responseType?: 'json';
3848
+ }): Promise<HttpResponse>;
3849
+ patch<T>(url: string, body: unknown | null, options: {
3850
+ headers?: HttpHeaders;
3851
+ responseType?: 'json';
3852
+ }): Promise<HttpResponse<T>>;
3853
+ }
3854
+
3855
+ /**
3856
+ * @public
3857
+ * @classdesc Represents a service to working with license restrictions.
3858
+ * @extends {BaseHandlerChainService}
3859
+ */
3860
+ declare class LicenseService extends BaseHandlerChainService {
3861
+ /**
3862
+ * @internal
3863
+ */
3864
+ readonly requestType = "crt.LicenseService";
3865
+ /**
3866
+ * @description Receives status of license operations by post http request.
3867
+ * @param operationCodes - The license operation names.
3868
+ * @returns `Promise<LicenseRestrictionOperationValues[]>`
3869
+ * An object with keys as operations codes and values as operation statuses.
3870
+ */
3871
+ getLicenseOperationStatuses: (operationCodes: string[]) => Promise<LicenseRestrictionOperationValues>;
3872
+ /**
3873
+ * Receives status of explicit license operations by post http request.
3874
+ * @param operationCodes - The license operation names.
3875
+ * @returns `Promise<LicenseRestrictionOperationValues[]>`
3876
+ * An object with keys as operations codes and values as operation statuses.
3877
+ */
3878
+ getExplicitLicenseOperationStatuses: (operationCodes: string[]) => Promise<LicenseRestrictionOperationValues>;
3879
+ /**
3880
+ * @deprecated Use `getExplicitLicenseOperationStatuses` instead.
3881
+ * @description Loads status of license operations.
3882
+ * @param {string[]} operationCodes - The license operation names.
3883
+ * @returns `Promise<LicenseRestrictionOperationValues>`
3884
+ * An object with keys as operations codes and values as operation statuses.
3885
+ */
3886
+ loadLicenseOperationStatuses: (operationCodes: string[]) => Promise<LicenseRestrictionOperationValues>;
3887
+ }
3888
+
3889
+ /**
3890
+ * @public
3891
+ * @classdesc Service to working with mask using handler chain
3892
+ * @extends {BaseHandlerChainService}
3893
+ */
3894
+ declare class MaskService extends BaseHandlerChainService {
3895
+ /**
3896
+ * @internal
3897
+ */
3898
+ readonly requestType = "crt.MaskService";
3899
+ /**
3900
+ * @description Method to show body mask on the page
3901
+ * @param {MaskSettings} settings - mask settings {@link MaskSettings}
3902
+ */
3903
+ showBodyMask: (settings?: MaskSettings) => Promise<void>;
3904
+ /**
3905
+ * @description Method to hide body mask
3906
+ */
3907
+ hideBodyMask: () => Promise<void>;
3908
+ /**
3909
+ * @internal
3910
+ * @param taskName
3911
+ * @param context
3912
+ */
3913
+ showMask(taskName: string, context: _ViewModelContext): Promise<void>;
3914
+ /**
3915
+ * @internal
3916
+ * @param taskName
3917
+ * @param context
3918
+ */
3919
+ hideMask(taskName: string, context: _ViewModelContext): Promise<void>;
3920
+ }
3921
+
3922
+ /**
3923
+ * @public
3924
+ * @classdesc Service for working with messages sent or received through a server channel.
3925
+ * @extends {BaseHandlerChainService}
3926
+ * @implements {BaseMessageChannelService}
3927
+ */
3928
+ declare class MessageChannelService extends BaseHandlerChainService implements _BaseMessageChannelService {
3929
+ /**
3930
+ * @internal
3931
+ */
3932
+ readonly requestType: string;
3933
+ /**
3934
+ * @public
3935
+ * @description Subscribes on messages from a specific sender.
3936
+ * @param sender String identifier of the sender.
3937
+ * @param callback Callback that should be executed on each message.
3938
+ * @returns A promise to be resolved with a {@link ɵSubscription} object that can be used to unsubscribe.
3939
+ */
3940
+ subscribe: <T>(sender: string, callback: (event: _MessageChannelEvent<T>) => void) => Promise<_Subscription>;
3941
+ /**
3942
+ * @public
3943
+ * @description Sends message to the channel.
3944
+ * @param sender String identifier of the sender, used to distinguish between messages from different senders.
3945
+ * @param body Body of the message that should be sent (payload). Should be JSON-serializable.
3946
+ * @param channelType Type of message channel.
3947
+ */
3948
+ sendMessage: (sender: string, body: unknown, channelType: _MessageChannelType) => Promise<void>;
3949
+ }
3950
+
3951
+ /**
3952
+ * @internal
3953
+ */
3954
+ declare const _from: unique symbol;
3955
+ /**
3956
+ * @public
3957
+ */
3958
+ declare class Model extends BaseHandlerChainService implements _BaseModel<DataSourceLoadOptions> {
3959
+ private static _instance;
3960
+ private readonly _crtModel;
3961
+ /**
3962
+ * @internal
3963
+ */
3964
+ readonly requestType = "crt.ModelGenerator";
3965
+ private constructor();
3966
+ private static get instance();
3967
+ /**
3968
+ * @internal
3969
+ * Gets the model name.
3970
+ */
3971
+ get name(): string;
3972
+ private readonly _create;
3973
+ /**
3974
+ * @internal
3975
+ */
3976
+ static [_from](crtModel?: unknown): Model;
3977
+ static create(dataSchema: string): Promise<Model>;
3978
+ getSchema(): Promise<_DataSchema>;
3979
+ load(config?: {
3980
+ attributes?: string[] | _DataSourceAttribute[];
3981
+ parameters?: _DataSourceParameters;
3982
+ options?: DataSourceLoadOptions;
3983
+ /**
3984
+ * @deprecated Use options instead.
3985
+ */
3986
+ loadOptions?: DataSourceLoadOptions;
3987
+ }): Promise<_JsonArray>;
3988
+ insert(dto: _JsonObject): Promise<_DataSourceSaveResult>;
3989
+ update(dto: _JsonObject, parameters: _DataSourceParameters): Promise<_DataSourceSaveResult>;
3990
+ copy(primaryColumnValue: string, data?: _JsonObject): Promise<_JsonObject>;
3991
+ create(data?: _JsonObject): Promise<_JsonObject>;
3992
+ delete(parameters: _DataSourceParameters): Promise<_DataSourceSaveResult>;
3993
+ canSave(params: _DataSourceCanExecuteOperationPayload): Promise<_DataSourceCanExecuteOperationResult>;
3994
+ canDelete(params: _DataSourceCanExecuteOperationPayload): Promise<_DataSourceCanExecuteOperationResult>;
3995
+ insertInTransaction(transaction: ITransaction, dto: _JsonObject): ITransactionOperation<_DataSourceSaveResult>;
3996
+ updateInTransaction(transaction: ITransaction, dto: _JsonObject, parameters: _DataSourceParameters): ITransactionOperation<_DataSourceSaveResult>;
3997
+ deleteInTransaction(transaction: ITransaction, parameters: _DataSourceParameters): ITransactionOperation<_DataSourceSaveResult>;
3998
+ }
3999
+
4000
+ /**
4001
+ * @public
4002
+ * @class ProcessEngineService
4003
+ * @classdesc Service, used for starting and completing business processes using handler chain
4004
+ * @extends {BaseHandlerChainService}
4005
+ */
4006
+ declare class ProcessEngineService extends BaseHandlerChainService {
4007
+ /**
4008
+ * @internal
4009
+ */
4010
+ readonly requestType = "crt.ProcessEngineService";
4011
+ /**
4012
+ * Executes process by name.
4013
+ * @param processName Process name.
4014
+ * @param parameters Process parameters.
4015
+ * @param resultParameterNames Resulting process parameters.
4016
+ */
4017
+ executeProcessByName: (processName: string, parameters?: Record<string, unknown>, resultParameterNames?: string[]) => Promise<RunProcessResponse>;
4018
+ /**
4019
+ * Completes process element execution.
4020
+ * @param {Guid} processElementUId Process element unique identifier.
4021
+ * @param {Record<string, JsonData>} parameters Process parameters.
4022
+ */
4023
+ completeExecuting: (processElementUId: _Guid, parameters?: Record<string, _JsonData>) => Promise<BaseResponse>;
4024
+ }
4025
+
4026
+ /**
4027
+ * @public
4028
+ * @classdesc Service to working rights using handler chain
4029
+ * @extends {BaseHandlerChainService}
4030
+ */
4031
+ declare class RightsService extends BaseHandlerChainService {
4032
+ /**
4033
+ * @internal
4034
+ */
4035
+ readonly requestType = "crt.RightsService";
4036
+ /**
4037
+ * @description Method to recognize whether user can execute operation
4038
+ * @param {string} operationName - operation name
4039
+ * @returns `Promise<boolean>`
4040
+ */
4041
+ getCanExecuteOperation: (operationName: string) => Promise<boolean>;
4042
+ /**
4043
+ * @description Method to recognize whether user can execute operations
4044
+ * @param {string[]} operationNames - operation names
4045
+ * @returns `Promise<boolean[]>`
4046
+ */
4047
+ getCanExecuteOperations: (operationNames: string[]) => Promise<boolean[]>;
4048
+ }
4049
+
4050
+ /**
4051
+ * @public
4052
+ * @description Configuration interface for schema modal dialogs.
4053
+ * @property {string} schemaName - Name of the schema to be displayed in the modal.
4054
+ * @property {ɵModelInPageAction} action - Action to be performed on the model (e.g., create, edit).
4055
+ * @property {string} recordId - Identifier of the record to be edited or viewed.
4056
+ * @property {Array<ɵModelDefaultValue>} defaultValues - Default values to initialize the model with.
4057
+ * @property {Record<string, ɵJsonData>} parameters - Additional parameters for the schema.
4058
+ * @property {boolean} preventDefaultCloseCommand - Flag to prevent the default close command.
4059
+ * @property {object} appearanceSettings - Settings for the appearance of the modal.
4060
+ */
4061
+ interface SchemaModalConfig {
4062
+ /**
4063
+ * @description Name of the schema to be displayed in the modal.
4064
+ */
4065
+ schemaName: string;
4066
+ /**
4067
+ * @description Action to be performed on the model (e.g., create, edit).
4068
+ */
4069
+ action?: _ModelInPageAction;
4070
+ /**
4071
+ * @description Identifier of the record to be edited or viewed.
4072
+ */
4073
+ recordId?: string;
4074
+ /**
4075
+ * @description Default values to initialize the model with.
4076
+ */
4077
+ defaultValues?: Array<_ModelDefaultValue>;
4078
+ /**
4079
+ * @description Additional parameters for the schema.
4080
+ */
4081
+ parameters?: Record<string, _JsonData>;
4082
+ /**
4083
+ * @description Flag to prevent the default close command.
4084
+ */
4085
+ preventDefaultCloseCommand?: boolean;
4086
+ /**
4087
+ * @description Settings for the appearance of the modal.
4088
+ */
4089
+ appearanceSettings?: {
4090
+ /**
4091
+ * @description CSS classes to be applied to the modal panel.
4092
+ */
4093
+ panelClass?: string[];
4094
+ /**
4095
+ * @description Maximum height of the modal.
4096
+ */
4097
+ maxHeight?: number | string;
4098
+ };
4099
+ }
4100
+
4101
+ /**
4102
+ * @public
4103
+ * @class SchemaModalService
4104
+ * @classdesc Service to work with schema modal windows using handler chain.
4105
+ * @extends {BaseHandlerChainService}
4106
+ */
4107
+ declare class SchemaModalService extends BaseHandlerChainService {
4108
+ /**
4109
+ * @internal
4110
+ */
4111
+ readonly requestType = "crt.SchemaModalService";
4112
+ /**
4113
+ * @description Method to show schema in the modal window.
4114
+ * @param {SchemaModalConfig} config - Configuration object for the schema modal.
4115
+ * @returns `Promise<void>`
4116
+ */
4117
+ show: (config: SchemaModalConfig) => Promise<void>;
4118
+ }
4119
+
4120
+ /**
4121
+ * @public
4122
+ * @class SysSetting
4123
+ * @classdesc Class contains info related system setting
4124
+ * @property {ɵGuid} id - id of system setting.
4125
+ * @property {string} name - name of system setting.
4126
+ * @property {string} code - code of system setting.
4127
+ * @property {isCacheable} boolean - indicator whether system setting is cacheable
4128
+ * @property {any} value - value of system setting
4129
+ * @property {string} displayValue - display value of system setting
4130
+ * @property {ɵDataValueType} ɵDataValueType - system setting {@link ɵDataValueType}
4131
+ */
4132
+ declare class SysSetting {
4133
+ /**
4134
+ * @description id of system setting
4135
+ */
4136
+ id?: _Guid;
4137
+ /**
4138
+ * @description name of system setting
4139
+ */
4140
+ name?: string;
4141
+ /**
4142
+ * @description code of system setting
4143
+ */
4144
+ code?: string;
4145
+ /**
4146
+ * @description indicator whether system setting is cacheable
4147
+ */
4148
+ isCacheable?: boolean;
4149
+ /**
4150
+ * @description value of system setting
4151
+ */
4152
+ value?: any;
4153
+ /**
4154
+ * @description display value of system setting
4155
+ */
4156
+ displayValue?: string;
4157
+ /**
4158
+ * @description system setting {@link ɵDataValueType}
4159
+ */
4160
+ dataValueType?: _DataValueType;
4161
+ }
4162
+ /**
4163
+ * @public
4164
+ * @class SysSettingValue
4165
+ * @classdesc Shape to describe system setting value
4166
+ * @property {string} code - code of system setting
4167
+ * @property {any} value - value of system setting
4168
+ */
4169
+ declare class SysSettingValue {
4170
+ /**
4171
+ * @description code of system setting.
4172
+ */
4173
+ code?: string;
4174
+ /**
4175
+ * @description value of system setting
4176
+ */
4177
+ value?: any;
4178
+ }
4179
+
4180
+ /**
4181
+ * @public
4182
+ * @description Response for querying of system settings
4183
+ * @extends {BaseResponse}
4184
+ * @property {Record<string, SysSetting>} values - system settings values
4185
+ */
4186
+ interface QuerySysSettingsResponse extends BaseResponse {
4187
+ /**
4188
+ * @type {Record<string, SysSetting>}
4189
+ * @description system settings values. {@link SysSetting}
4190
+ */
4191
+ values: Record<string, SysSetting>;
4192
+ /**
4193
+ * @type {Array<string>}
4194
+ * @description not found system settings codes.
4195
+ */
4196
+ notFoundSettings?: Array<string>;
4197
+ }
4198
+ /**
4199
+ * @public
4200
+ * @description Response for saving system settings
4201
+ * @extends {BaseResponse}
4202
+ * @property {Record<string, any>} saveResult - saving result
4203
+ * @property {number} rowsAffected - Count of affected rows
4204
+ */
4205
+ interface SaveSysSettingsResponse extends BaseResponse {
4206
+ /**
4207
+ * @description saving result
4208
+ */
4209
+ saveResult: Record<string, any>;
4210
+ /**
4211
+ * @description Count of affected rows
4212
+ */
4213
+ rowsAffected: number;
4214
+ /**
4215
+ * @internal
4216
+ * @description
4217
+ */
4218
+ nextPrcElReady: boolean;
4219
+ }
4220
+ /**
4221
+ * @public
4222
+ * @description Response for preload cachable system settings.
4223
+ * @extends {BaseResponse}
4224
+ * @property {Record<string, SysSetting>} values - system settings values
4225
+ */
4226
+ interface PreloadSysSettingsResponse extends BaseResponse {
4227
+ /**
4228
+ * @type {Record<string, SysSetting>}
4229
+ * @description system settings values. {@link SysSetting}
4230
+ */
4231
+ values: Record<string, SysSetting>;
4232
+ }
4233
+ /**
4234
+ * @public
4235
+ * @class SysSettingsService
4236
+ * @classdesc Service to working with system settings using handler chain
4237
+ * @extends {BaseHandlerChainService}
4238
+ */
4239
+ declare class SysSettingsService extends BaseHandlerChainService {
4240
+ /**
4241
+ * @internal
4242
+ */
4243
+ readonly requestType = "crt.SysSettingsService";
4244
+ /**
4245
+ * @description Method to get system settings by codes
4246
+ * @param {string[]} sysSettingCodes - system settings codes
4247
+ * @returns `Promise<QuerySysSettingsResponse>` {@link QuerySysSettingsResponse}
4248
+ */
4249
+ getByCodes: (sysSettingCodes: string[]) => Promise<QuerySysSettingsResponse>;
4250
+ /**
4251
+ * @description Method to get system setting by code
4252
+ * @param {string} sysSettingCode - system settings code
4253
+ * @returns `Promise<SysSetting>`
4254
+ */
4255
+ getByCode: (sysSettingCode: string) => Promise<SysSetting>;
4256
+ /**
4257
+ * @description Method to update system setting
4258
+ * @param {SysSettingValue} sysSettingValue - {@link SysSettingValue}
4259
+ * @param {Boolean} isPersonal - Flag that indicates that sysSetting value is personal.
4260
+ * @returns `Promise<SaveSysSettingsResponse>` {@link SaveSysSettingsResponse}
4261
+ */
4262
+ update: (sysSettingValue: SysSettingValue, isPersonal?: boolean) => Promise<SaveSysSettingsResponse>;
4263
+ /**
4264
+ * @description Method to bulk update system settings
4265
+ * @param {SysSettingValue[]} sysSettingValues - system settings values {@link SysSettingValue}
4266
+ * @param {Boolean} isPersonal - Flag that indicates that sysSetting values are personal.
4267
+ * @returns `Promise<SaveSysSettingsResponse>` {@link SaveSysSettingsResponse}
4268
+ */
4269
+ updateMany: (sysSettingValues: SysSettingValue[], isPersonal?: boolean) => Promise<SaveSysSettingsResponse>;
4270
+ }
4271
+
4272
+ /**
4273
+ * @public
4274
+ * @description Shape of system values
4275
+ * @property {LookupValue} maintainer - maintainer
4276
+ * @property {number} moneyDisplayPrecision - precision used for displaying money
4277
+ * @property {number} maxEntitySchemaNameLength - max length of entity schema
4278
+ * @property {LookupValue} workspace - workplace info
4279
+ * @property {LookupValue} userAccount - user info
4280
+ * @property {string} userTimezoneCode - code of user's timezone
4281
+ * @property {number} userTimezoneOffset - offset for user timezone
4282
+ * @property {LookupValue} userContact - user contact info
4283
+ * @property {LookupValueWithCode} primaryLanguage - primary language
4284
+ * @property {LookupValue} primaryCulture - primary culture
4285
+ * @property {LookupValue} userCulture - user culture
4286
+ * @property {string} environmentType - type of the environment
4287
+ */
4288
+ interface SysValues {
4289
+ /**
4290
+ * @description maintainer
4291
+ */
4292
+ maintainer: _LookupValue;
4293
+ /**
4294
+ * @description precision used for displaying money
4295
+ */
4296
+ moneyDisplayPrecision: number;
4297
+ /**
4298
+ * @description max length of entity schema
4299
+ */
4300
+ maxEntitySchemaNameLength: number;
4301
+ /**
4302
+ * @description workplace info
4303
+ */
4304
+ workspace: _LookupValue;
4305
+ /**
4306
+ * @description user info
4307
+ */
4308
+ userAccount: _LookupValue;
4309
+ /**
4310
+ * @description code of user's timezone
4311
+ */
4312
+ userTimezoneCode: string;
4313
+ /**
4314
+ * @description offset for user timezone
4315
+ */
4316
+ userTimezoneOffset: number;
4317
+ /**
4318
+ * @description user contact info
4319
+ */
4320
+ userContact: _LookupValue;
4321
+ /**
4322
+ * @description primary language
4323
+ */
4324
+ primaryLanguage: _LookupValueWithCode;
4325
+ /**
4326
+ * @description primary culture
4327
+ */
4328
+ primaryCulture: _LookupValue;
4329
+ /**
4330
+ * @description user culture
4331
+ */
4332
+ userCulture: _LookupValue;
4333
+ /**
4334
+ * @description user
4335
+ */
4336
+ user: _LookupValue;
4337
+ /**
4338
+ * @description core version
4339
+ */
4340
+ coreVersion: string;
4341
+ /**
4342
+ * @description Freedom UI new schema version
4343
+ */
4344
+ freedomUiSchemaVersion: number;
4345
+ /**
4346
+ * @description environment type
4347
+ */
4348
+ environmentType: string;
4349
+ /**
4350
+ * @description customer
4351
+ */
4352
+ customer: string;
4353
+ }
4354
+
4355
+ /**
4356
+ * @public
4357
+ * @classdesc
4358
+ * @class SysValuesService Service to working with system values using handler chain
4359
+ * @extends {BaseHandlerChainService}
4360
+ */
4361
+ declare class SysValuesService extends BaseHandlerChainService {
4362
+ /**
4363
+ * @internal
4364
+ */
4365
+ readonly requestType = "crt.SysValuesService";
4366
+ /**
4367
+ * @description Method to load system values
4368
+ * @returns `Promise<SysValues>` {@link SysValues}
4369
+ */
4370
+ loadSysValues: () => Promise<SysValues>;
4371
+ }
4372
+
4373
+ /**
4374
+ * @public
4375
+ * @classdesc Service to retrieve available themes using handler chain.
4376
+ * @extends {BaseHandlerChainService}
4377
+ */
4378
+ declare class ThemeService extends BaseHandlerChainService {
4379
+ /**
4380
+ * @internal
4381
+ */
4382
+ readonly requestType = "crt.ThemeService";
4383
+ /**
4384
+ * @description Method designed to get all available themes.
4385
+ * @returns `Promise<ThemeDefinition[]>`
4386
+ */
4387
+ getAvailableThemes: () => Promise<ThemeDefinition[]>;
4388
+ /**
4389
+ * @description Method designed to apply theme by id.
4390
+ * @param {string} themeId - theme identifier
4391
+ * @returns `Promise<void>`
4392
+ */
4393
+ applyTheme: (themeId: string) => Promise<void>;
4394
+ /**
4395
+ * @description Checks whether the current user is allowed to customize branding.
4396
+ * @returns `Promise<boolean>`
4397
+ */
4398
+ canCustomizeBranding: () => Promise<boolean>;
4399
+ /**
4400
+ * @description Checks whether the current user is allowed to change their own theme.
4401
+ * @returns `Promise<boolean>`
4402
+ */
4403
+ canChangeOwnTheme: () => Promise<boolean>;
4404
+ }
4405
+
4406
+ /**
4407
+ * @public
4408
+ * @class TransactionFactoryService
4409
+ * @classdesc Service to working with transaction factory using a handler chain
4410
+ * @extends {BaseHandlerChainService}
4411
+ */
4412
+ declare class TransactionFactoryService extends BaseHandlerChainService implements ITransactionFactory {
4413
+ /**
4414
+ * @internal
4415
+ */
4416
+ private static _instance;
4417
+ /**
4418
+ * @internal
4419
+ */
4420
+ readonly requestType = "crt.TransactionFactoryService";
4421
+ /**
4422
+ * @description Method create a transaction.
4423
+ * @returns `ITransaction` {@link ITransaction}
4424
+ * @public
4425
+ */
4426
+ create: () => Promise<ITransaction>;
4427
+ /**
4428
+ * @internal
4429
+ */
4430
+ private constructor();
4431
+ /**
4432
+ * @internal
4433
+ */
4434
+ private static get instance();
4435
+ static create(): Promise<ITransaction>;
4436
+ }
4437
+
4438
+ /**
4439
+ * @public
4440
+ * @class UserConsentService
4441
+ * @classdesc Service to work with consents of the current user.
4442
+ */
4443
+ declare class UserConsentService {
4444
+ private static _instance;
4445
+ private readonly _consentSchemaName;
4446
+ private readonly _userConsentHistorySchemaName;
4447
+ private readonly _sysValuesService;
4448
+ private _currentUserContactId?;
4449
+ /**
4450
+ * @description Gets shared service instance.
4451
+ * @returns Shared `UserConsentService` instance.
4452
+ */
4453
+ static get instance(): UserConsentService;
4454
+ /**
4455
+ * Retrieves the current user's contact ID.
4456
+ * @returns Current user contact id. Cached after first retrieval.
4457
+ */
4458
+ private _getCurrentUserContactId;
4459
+ /**
4460
+ * Maps a JSON record to a UserConsent object.
4461
+ * @param record - JSON record to map.
4462
+ * @param code - Consent code associated with the user consent.
4463
+ * @returns User consent object.
4464
+ */
4465
+ private _mapToUserConsent;
4466
+ /**
4467
+ * Creates filter parameters for model loading based on the provided filters.
4468
+ * @param filters - Filter values by column name.
4469
+ * @returns Model filter parameters.
4470
+ */
4471
+ private _createFilterParameters;
4472
+ /**
4473
+ * Selects a consent record from the provided JSON records.
4474
+ * @param records - Records to select from.
4475
+ * @param code - Consent code associated with the consent.
4476
+ * @returns Consent object or `null` if not found.
4477
+ */
4478
+ private _selectConsent;
4479
+ /**
4480
+ * Selects a user consent record from the provided JSON records.
4481
+ * @param records - Records to select from.
4482
+ * @param code - Consent code associated with the user consent.
4483
+ * @returns User consent object or `null` if no valid user consent is found.
4484
+ */
4485
+ private _selectUserConsent;
4486
+ /**
4487
+ * Loads the consent model.
4488
+ * @returns Loaded consent model.
4489
+ */
4490
+ private _loadConsentModel;
4491
+ /**
4492
+ * Loads the user consent history model.
4493
+ * @returns Loaded user consent history model.
4494
+ */
4495
+ private _loadUserConsentModel;
4496
+ /**
4497
+ * Creates a new user consent record in the user consent history model.
4498
+ * @param consentId - Identifier of the consent record.
4499
+ * @param expirationDate - Optional expiration date of the user consent.
4500
+ */
4501
+ private _insertUserConsent;
4502
+ /**
4503
+ * @description Gets consent by code.
4504
+ * @param code - Consent code.
4505
+ * @returns Consent record or `null` if not found.
4506
+ */
4507
+ getConsent(code: string): Promise<Consent | null>;
4508
+ /**
4509
+ * @description Gets current user consent by code.
4510
+ * @param code - Consent code.
4511
+ * @returns User consent record or `null` if no active or perpetual consent exists.
4512
+ */
4513
+ getCurrentUserConsent(code: string): Promise<UserConsent | null>;
4514
+ /**
4515
+ * @description Gives current user consent by code.
4516
+ * @param code - Consent code.
4517
+ * @param expirationDate - Optional expiration date for the user consent.
4518
+ */
4519
+ giveCurrentUserConsent(code: string, expirationDate?: Date): Promise<void>;
4520
+ }
4521
+
4522
+ export { AiContextService, BaseInterfaceDesignerItemRegistry, BaseItemRendererRegistry, BaseRequestHandler, BaseRequestsResolver, BaseValidator, BaseViewElementRegistry, BootstrapNotifier, ChatMessageTypeRegistry, ContextPartRequest, ConverterRegistry, CrtChatMessageType, CrtConverter, CrtDesignTimeViewElement, CrtInject, CrtInput, CrtInputRegistrationConfig, CrtInterfaceDesignerItem, CrtMobileInterfaceDesignerItem, CrtMobileViewElement, CrtModule, CrtOutput, CrtRequest, CrtRequestHandler, CrtValidationInput, CrtValidator, CrtViewElement, CrtZoneService, DataRequest, DataSourceLoadType, DesignTimeViewElementRegistry, DesignerToolGroupType, DialogService, FeatureService, FileViewerFactory, FileViewerInstance, HandleViewModelAttributeChangeRequest, HandlerChainService, HandlerChainServicesRegistry, HandlerSourceType, HandlersOrderComparer, HttpClientService, ImplementUsingHandlerChain, InterfaceDesignerItemRegistrationConfig, InterfaceDesignerItemRegistry, InternalRequestHandlerRegistry, InternalRequestHandlerRegistryType, LazyLoadRefsManager, LicenseService, LocalizableValue, MaskService, MessageChannelService, MethodInvokeRequest, MobileInterfaceDesignerItemRegistry, MobileViewElementRegistry, Model, PkgTopology, ProcessEngineService, ProcessStatus, RemoteEntriesRegistry, RemoteEntryType, RequestHandlerRegistryService, RequestRegistryService, RequestsResolver, RightsService, RunProcessRequest, SchemaModalService, SysSetting, SysSettingValue, SysSettingsService, SysValuesService, ThemeService, TransactionFactoryService, UserConsentService, VIEW_ELEMENT_DEFAULT_HEIGHT, ValidatorMapValue, ValidatorRegistry, ViewElementDataGroupType, ViewElementGroupType, ViewElementProperty, ViewElementRegistry, ViewElementRenderStrategy, ViewElementReuseStrategy, ViewModelCollectionActionType, _from, applyLocalizeMetadataFn, bootstrapCrtModule, bootstrapCrtModuleHandlerChainServices, bootstrappedCrtModules, callOnContextCreateHooks, callOnContextDestroyHooks, callOnContextUpdateHooks, checkCrtTypeNamePascalCase, checkIfTypeRegistered, checkOnlyOneRegistration, checkTypeNameFormat, checkTypeNamePascalCase, crtInjectPrefix, crtInputPrefix, crtOutputPrefix, crtValidationInputPrefix, defineRenderConfig, designTimeViewElementRegistryKey, getConverterMetadata, getCrtInputsMetadata, getCrtOutputsMetadata, getCrtValidationInputsMetadata, getDeepModuleDependencies, getDesignTimeViewElementMetadata, getHandlerChainServiceMetadata, getInterfaceDesignerItemMetadata, getMobileInterfaceDesignerItemMetadata, getMobileViewElementMetadata, getModuleMetadata, getRequestHandlerMetadata, getTypeDependencies, getValidatorMetadata, getViewElementMetadata, hasInterfaceDesignerItemMetadata, hasMobileInterfaceDesignerItemMetadata, instantiate, interfaceDesignerItemRegister, interfaceDesignerItemRegistryKey, isClientSideDataSourceHierarchyConfig, isHierarchicalItemExpanded, isServerSideDataSourceHierarchyConfig, localize, matchScopes, mobileInterfaceDesignerItemRegistryKey, mobileViewElementRegistryKey, objectDeepKeys, registerAngularViewElement, registerViewElement, registryKey, resetGlobals, setConverterMetadata, setDesignTimeViewElementMetadata, setInterfaceDesignerItemMetadata, setMobileInterfaceDesignerItemMetadata, setMobileViewElementMetadata, setModuleMetadata, setRequestHandlerMetadata, setValidatorMetadata, setViewElementMetadata, toAggregationEval, toAggregationEvalType, toAggregationFunction, toAggregationType, toDatePart, toDatePartType, toNumericFunctionType, toOrderDirection, toPascalCase, toSortDirection, toStringFunctionType, validatorRegistryKey, viewElementRegister, viewElementRegistryKey, ɵBaseRegistry, ɵCrtInterfaceDesignerItem, ɵCrtMobileInterfaceDesignerItem, ɵFeatureActivationRef, ɵLazyModuleRef, ɵcheckTypeNameFormat, ɵinstantiate, ɵloadLazyRef, ɵloadLazyRefs };
4523
+ export type { AddRequestHandlerListener, AngularViewElementRegistrationConfig, AttributePropertyConfig, AttributeValueConfig, BaseContextPart, BaseInterfaceDesignerItemRegistrationConfig, BaseItemRendererConfig, BaseRequestConfig, BaseRequestCtor, BaseResponse, BaseViewElementRegistrationConfig, BootstrapOptions, ChangeAttributeValueEventPayload, ChatMessageTypeRegistrationConfig, ClientSideDataSourceHierarchyConfig, Consent, ConstantValuesContextPart, ConstantValuesContextPartInput, ContexedHandlerScopeConfig, ContextDataRecord, ContextDataSourcePart, ContextPartAction, ContextProvider, Converter, ConverterConfig, ConverterMetadata, CreatioPageContextPart, CreatioPageContextPartInput, CrtAngularViewElementConfig, CrtControlState, CrtValidationError, CrtValidationErrors, CrtValidationInfo, CrtValidatorFn, DataSourceHierarchyConfig, DataSourceLoadOptions, DataSourceLoadParameters, DefaultRenderConfig, DefaultSizeForGrid, DesignTimeViewElementRegistryItem, Entity, ErrorInfo, ExtraToolbarViewElementConfig, FileValue, FileViewerOptions, GroupedDateValue, HandlerChainServiceRegistryItem, HandlerConfig, HandlerSource, HierarchyState, HierarchyStateCollapsed, HierarchyStateExpanded, HostHandlerSource, HttpHeaders, HttpResponse, IBaseItemRendererRegistry, ITransaction, ITransactionFactory, ITransactionOperation, InjectionContext, InterfaceDesignerItemDefinition, InterfaceDesignerItemMetadata, InterfaceDesignerRegistryItem, InternalDesignTimeViewElementRegistryItem, InternalInterfaceDesignerItemRegistrationConfig, InternalModuleDefinition, InternalResolveDependencyFn, InternalToolbarViewElementCollectionItemConfig, InternalToolbarViewElementConfig, InternalToolbarViewElementConfigCollection, ItemCreationConfig, LazyModuleDefinition, LazyModuleDefinitionWithMetadata, LazyModuleMetadata, LazyRegistryItem, LicenseRestrictionOperationValues, LocalizableStringValues, LocalizableValues, MaskSettings, ModuleDefinition, OnViewportRenderConfig, Platform, PreloadSysSettingsResponse, ProcessParameterValue, QuerySysSettingsResponse, RemoteBuildInfo, RemoteConverterDiscoveryMetadata, RemoteDesignerDefinitionsLoadContext, RemoteEntryDefinition, RemoteFeatureDefinition, RemoteFeatureDesignerDefinitions, RemoteFeatureDiscoveryMetadata, RemoteHandlerSource, RemoteRequestHandlerDiscoveryMetadata, RemoteValidatorDiscoveryMetadata, RemoteViewElementDesignerDefinition, RemoteViewElementDiscoveryMetadata, RemoveRequestHandlerListener, RequestHandlerCtor, RequestHandlerDefinition, RequestHandlerFactory, RequestHandlerMapValue, RequestHandlerRegistrationConfig, RunProcessResponse, SaveSysSettingsResponse, SchemaHandlerSource, SchemaModalConfig, ServerSideDataSourceHierarchyConfig, SysImageValue, SysValues, ThemeDefinition, ToolbarDefaultSize, ToolbarExtraProps, ToolbarViewElementConfig, ToolbarViewElementConfigType, UnsubscribeListener, UserConsent, ValidatorConfig, ValidatorMetadata, ValidatorParameters, ValidatorParametersValues, ValidatorRegistryItem, ValidatorSchemaConfig, ValueResponse, ViewElementMetadata, ViewElementRegistrationConfig, ViewElementRegistryItem, ViewElementSlotDefinition, ViewModelAttributeChangeEventOptionsType, ViewModelCollection, ViewModelCollectionChange, ɵLazyLoadRef };