@creatio-devkit/common 0.834.0 → 0.1000.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts CHANGED
@@ -89,6 +89,8 @@ import { ɵExpressionParser as ExpressionParser } from '@creatio/base';
89
89
  import { ɵExpressionResolver as ExpressionResolver } from '@creatio/base';
90
90
  import { ɵExpressionType as ExpressionType } from '@creatio/base';
91
91
  import { ɵFilterGroup as FilterGroup } from '@creatio/base';
92
+ import { FilterGroupOrigin } from '@creatio/base';
93
+ import { ɵFilterGroupOriginType as FilterGroupOriginType } from '@creatio/base';
92
94
  import { ɵFilterMock as FilterMock } from '@creatio/base';
93
95
  import { ɵFilterParser as FilterParser } from '@creatio/base';
94
96
  import { ɵFilterResolver as FilterResolver } from '@creatio/base';
@@ -141,6 +143,11 @@ import { ɵRequestRegistrationConfig as RequestRegistrationConfig } from '@creat
141
143
  import { ɵResolveDependencyFn as ResolveDependencyFn } from '@creatio/base';
142
144
  import { ɵSchemaViewMaskRequest as SchemaViewMaskRequest } from '@creatio/base';
143
145
  import { ɵSchemaViewMaskRequestAction as SchemaViewMaskRequestAction } from '@creatio/base';
146
+ import { ɵSegmentFilter as SegmentFilter } from '@creatio/base';
147
+ import { ɵSegmentFilterComparisonType as SegmentFilterComparisonType } from '@creatio/base';
148
+ import { ɵSegmentFilterDto as SegmentFilterDto } from '@creatio/base';
149
+ import { ɵSegmentFilterOptions as SegmentFilterOptions } from '@creatio/base';
150
+ import { ɵSegmentFilterOptionsDto as SegmentFilterOptionsDto } from '@creatio/base';
144
151
  import { ɵSelectLocalizationQuery as SelectLocalizationQuery } from '@creatio/base';
145
152
  import { ɵSingleFilter as SingleFilter } from '@creatio/base';
146
153
  import { ɵSortColumnOptions as SortColumnOptions } from '@creatio/base';
@@ -193,7 +200,6 @@ export { AggregationType }
193
200
  */
194
201
  export declare class AiContextService {
195
202
  private _contextParts;
196
- private static _instance;
197
203
  /**
198
204
  * Retrieves the singleton instance of the `AiContextService`.
199
205
  * If the instance does not exist, it will be created.
@@ -263,9 +269,16 @@ export { ArithmeticQueryColumn }
263
269
 
264
270
  /**
265
271
  * @public
272
+ * Base shape shared by all AI context parts.
266
273
  */
267
274
  export declare interface BaseContextPart {
275
+ /** Discriminator identifying the concrete context part type. */
268
276
  type?: string;
277
+ /**
278
+ * The unique identifier of the context part as registered in `AiContextService`.
279
+ * Populated by `AiContextService.getContext()` for each resolved part.
280
+ */
281
+ contextId: string;
269
282
  }
270
283
 
271
284
  /**
@@ -655,35 +668,57 @@ export declare interface Consent {
655
668
 
656
669
  /**
657
670
  * @public
671
+ * Context part holding a set of constant key/value pairs.
658
672
  */
659
673
  export declare interface ConstantValuesContextPart extends BaseContextPart {
674
+ /** Discriminator identifying the context part as a `ConstantValuesContextPart`. */
660
675
  type: 'ConstantValuesContextPart';
676
+ /** Optional human-readable title of the context part. */
677
+ title?: string;
678
+ /** The constant values exposed by this context part. */
661
679
  values: Record<string, unknown>;
662
680
  }
663
681
 
682
+ /**
683
+ * @public
684
+ * A `ConstantValuesContextPart` returned from a `ContextProvider`, before the AI context service
685
+ * attaches the registered `contextId`.
686
+ */
687
+ export declare type ConstantValuesContextPartInput = Omit<ConstantValuesContextPart, 'contextId'>;
688
+
664
689
  /* Excluded from this release type: ContexedHandlerScopeConfig */
665
690
 
666
691
  /**
667
692
  * @public
693
+ * A single record exposed by a {@link ContextDataSourcePart}.
668
694
  */
669
695
  export declare interface ContextDataRecord {
696
+ /** The unique identifier of the record. */
670
697
  id: string;
698
+ /** The display value of the record. */
671
699
  displayColumnValue: string;
672
700
  }
673
701
 
674
702
  /**
675
703
  * @public
704
+ * A data source exposed by a page context part, grouping records of a single entity schema.
676
705
  */
677
706
  export declare interface ContextDataSourcePart {
707
+ /** The name of the entity schema the records belong to. */
678
708
  entitySchemaName: string;
709
+ /** The name of the column used as the display value for each record. */
679
710
  displayColumnName: string;
711
+ /** Whether the data source represents a collection of records rather than a single record. */
680
712
  isCollection: boolean;
713
+ /** Whether this is the primary data source of the page. */
681
714
  isPrimary: boolean;
715
+ /** The records exposed by this data source. */
682
716
  records: Array<ContextDataRecord>;
683
717
  }
684
718
 
685
719
  /**
686
720
  * @public
721
+ * The action to perform on a context part.
687
722
  */
688
723
  export declare type ContextPartAction = 'set' | 'update' | 'remove';
689
724
 
@@ -693,15 +728,19 @@ export declare type ContextPartAction = 'set' | 'update' | 'remove';
693
728
  * This handler processes requests to add, remove, or retrieve context parts.
694
729
  */
695
730
  export declare class ContextPartRequest extends BaseRequest {
731
+ /** The unique identifier of the context part. */
696
732
  id: string;
733
+ /** The provider that resolves the context part. */
697
734
  contextPartProvider: ContextProvider;
735
+ /** The action to perform on the context part. */
698
736
  action: ContextPartAction;
699
737
  }
700
738
 
701
739
  /**
702
740
  * @public
741
+ * A factory that produces a context part to register in `AiContextService`, synchronously or asynchronously.
703
742
  */
704
- export declare type ContextProvider = () => CreatioPageContextPart | Promise<CreatioPageContextPart> | ConstantValuesContextPart | Promise<ConstantValuesContextPart>;
743
+ export declare type ContextProvider = () => CreatioPageContextPartInput | Promise<CreatioPageContextPartInput> | ConstantValuesContextPartInput | Promise<ConstantValuesContextPartInput>;
705
744
 
706
745
  /**
707
746
  * @public
@@ -740,13 +779,26 @@ export declare interface ConverterConfig {
740
779
 
741
780
  /**
742
781
  * @public
782
+ * Context part describing a Creatio page together with the data sources available on it.
743
783
  */
744
784
  export declare interface CreatioPageContextPart extends BaseContextPart {
785
+ /** Discriminator identifying the context part as a `CreatioPageContextPart`. */
745
786
  type?: 'CreatioPageContextPart';
787
+ /** The human-readable title of the page. */
788
+ title: string;
789
+ /** The schema name of the page. */
746
790
  pageSchemaName: string;
791
+ /** The data sources available on the page. */
747
792
  dataSources: Array<ContextDataSourcePart>;
748
793
  }
749
794
 
795
+ /**
796
+ * @public
797
+ * A `CreatioPageContextPart` returned from a `ContextProvider`, before the AI context service
798
+ * attaches the registered `contextId`.
799
+ */
800
+ export declare type CreatioPageContextPartInput = Omit<CreatioPageContextPart, 'contextId'>;
801
+
750
802
  /* Excluded from this release type: CrtAngularViewElementConfig */
751
803
 
752
804
  /**
@@ -1374,6 +1426,10 @@ export declare class FeatureService extends BaseHandlerChainService {
1374
1426
  /* Excluded from this release type: FileViewerOptions */
1375
1427
  export { FilterGroup }
1376
1428
 
1429
+ export { FilterGroupOrigin }
1430
+
1431
+ export { FilterGroupOriginType }
1432
+
1377
1433
  export { FilterMock }
1378
1434
 
1379
1435
  export { FilterParser }
@@ -2866,6 +2922,16 @@ export { SchemaViewMaskRequest }
2866
2922
 
2867
2923
  export { SchemaViewMaskRequestAction }
2868
2924
 
2925
+ export { SegmentFilter }
2926
+
2927
+ export { SegmentFilterComparisonType }
2928
+
2929
+ export { SegmentFilterDto }
2930
+
2931
+ export { SegmentFilterOptions }
2932
+
2933
+ export { SegmentFilterOptionsDto }
2934
+
2869
2935
  export { SelectLocalizationQuery }
2870
2936
 
2871
2937
  /**
@@ -3132,6 +3198,59 @@ export declare class SysValuesService extends BaseHandlerChainService {
3132
3198
 
3133
3199
  export { TeardownLogic }
3134
3200
 
3201
+ /**
3202
+ * @public
3203
+ * @description Theme definition exposed through handler-chain services and shared runtime APIs.
3204
+ */
3205
+ export declare interface ThemeDefinition {
3206
+ /**
3207
+ * @description Stable theme identifier.
3208
+ */
3209
+ id: string;
3210
+ /**
3211
+ * @description Display caption.
3212
+ */
3213
+ caption: string;
3214
+ /**
3215
+ * @description CSS class applied to the host when the theme is active.
3216
+ */
3217
+ cssClassName: string;
3218
+ /**
3219
+ * @description Resolved theme stylesheet path or URL when external CSS is available.
3220
+ */
3221
+ cssFilePath?: string;
3222
+ }
3223
+
3224
+ /**
3225
+ * @public
3226
+ * @classdesc Service to retrieve available themes using handler chain.
3227
+ * @extends {BaseHandlerChainService}
3228
+ */
3229
+ export declare class ThemeService extends BaseHandlerChainService {
3230
+ /* Excluded from this release type: requestType */
3231
+ /**
3232
+ * @description Method designed to get all available themes.
3233
+ * @returns `Promise<ThemeDefinition[]>`
3234
+ */
3235
+ getAvailableThemes: () => Promise<ThemeDefinition[]>;
3236
+ /**
3237
+ * @description Method designed to apply theme by id.
3238
+ * @param {string} themeId - theme identifier
3239
+ * @returns `Promise<void>`
3240
+ */
3241
+ applyTheme: (themeId: string) => Promise<void>;
3242
+ /**
3243
+ * @description Checks whether the current user is allowed to customize branding.
3244
+ * @returns `Promise<boolean>`
3245
+ */
3246
+ canCustomizeBranding: () => Promise<boolean>;
3247
+ /**
3248
+ * @description Checks whether the current user is allowed to change their own theme.
3249
+ * @returns `Promise<boolean>`
3250
+ */
3251
+ canChangeOwnTheme: () => Promise<boolean>;
3252
+ }
3253
+
3135
3254
  /* Excluded from this release type: toAggregationEval */
3136
3255
 
3137
3256
  /* Excluded from this release type: toAggregationEvalType */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@creatio-devkit/common",
3
- "version": "0.834.0",
3
+ "version": "0.1000.1",
4
4
  "description": "Allows developers to create customizations and integrate them to Creatio platform.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "keywords": [
@@ -11,31 +11,20 @@
11
11
  "dependencies": {
12
12
  "reflect-metadata": "^0.1.13",
13
13
  "lodash": "^4.17.21",
14
- "@creatio/base": "0.834.0",
14
+ "@creatio/base": "0.1000.1",
15
15
  "tslib": "^2.3.0"
16
16
  },
17
17
  "sideEffects": false,
18
- "overrides": [
19
- {
20
- "files": [
21
- "*.ts"
22
- ],
23
- "parserOptions": {
24
- "project": [
25
- "libs/devkit/common/tsconfig.*?.json"
26
- ]
27
- }
28
- }
29
- ],
30
18
  "module": "fesm2022/creatio-devkit-common.mjs",
31
- "typings": "index.d.ts",
19
+ "typings": "types/creatio-devkit-common.d.ts",
32
20
  "exports": {
33
21
  "./package.json": {
34
22
  "default": "./package.json"
35
23
  },
36
24
  ".": {
37
- "types": "./index.d.ts",
25
+ "types": "./types/creatio-devkit-common.d.ts",
38
26
  "default": "./fesm2022/creatio-devkit-common.mjs"
39
27
  }
40
- }
28
+ },
29
+ "type": "module"
41
30
  }