@dcupl/common 1.7.2 → 1.8.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.
Files changed (144) hide show
  1. package/dist/common.js +1 -0
  2. package/dist/lib-esm/analytics.controller.js +2 -2
  3. package/dist/lib-esm/analytics.controller.js.map +1 -1
  4. package/dist/lib-esm/cache.controller.js +3 -3
  5. package/dist/lib-esm/cache.controller.js.map +1 -1
  6. package/dist/lib-esm/changeDetection.js +1 -1
  7. package/dist/lib-esm/changeDetection.js.map +1 -1
  8. package/dist/lib-esm/dependency-graph.d.ts +18 -0
  9. package/dist/lib-esm/dependency-graph.js +252 -0
  10. package/dist/lib-esm/dependency-graph.js.map +1 -0
  11. package/dist/lib-esm/getAggregation.js +54 -24
  12. package/dist/lib-esm/getAggregation.js.map +1 -1
  13. package/dist/lib-esm/getFacets.js +1 -1
  14. package/dist/lib-esm/getFacets.js.map +1 -1
  15. package/dist/lib-esm/index.d.ts +2 -0
  16. package/dist/lib-esm/index.js +2 -0
  17. package/dist/lib-esm/index.js.map +1 -1
  18. package/dist/lib-esm/indices.controller.js +2 -2
  19. package/dist/lib-esm/indices.controller.js.map +1 -1
  20. package/dist/lib-esm/object-hash.d.ts +1 -0
  21. package/dist/lib-esm/object-hash.js +33 -0
  22. package/dist/lib-esm/object-hash.js.map +1 -0
  23. package/dist/lib-esm/query-builder.js +1 -1
  24. package/dist/lib-esm/query-builder.js.map +1 -1
  25. package/dist/lib-esm/queryData.js +7 -2
  26. package/dist/lib-esm/queryData.js.map +1 -1
  27. package/dist/lib-esm/template-parser.d.ts +6 -0
  28. package/dist/lib-esm/template-parser.js +21 -0
  29. package/dist/lib-esm/template-parser.js.map +1 -0
  30. package/dist/lib-esm/types/workflow/workflow.types.d.ts +27 -1
  31. package/dist/tsconfig.tsbuildinfo +1 -1
  32. package/package.json +6 -8
  33. package/dist/lib-cjs/analytics.controller.d.ts +0 -85
  34. package/dist/lib-cjs/analytics.controller.js +0 -121
  35. package/dist/lib-cjs/analytics.controller.js.map +0 -1
  36. package/dist/lib-cjs/cache.controller.d.ts +0 -11
  37. package/dist/lib-cjs/cache.controller.js +0 -46
  38. package/dist/lib-cjs/cache.controller.js.map +0 -1
  39. package/dist/lib-cjs/changeDetection.d.ts +0 -40
  40. package/dist/lib-cjs/changeDetection.js +0 -148
  41. package/dist/lib-cjs/changeDetection.js.map +0 -1
  42. package/dist/lib-cjs/computeSuggestions.d.ts +0 -3
  43. package/dist/lib-cjs/computeSuggestions.js +0 -79
  44. package/dist/lib-cjs/computeSuggestions.js.map +0 -1
  45. package/dist/lib-cjs/getAggregation.d.ts +0 -3
  46. package/dist/lib-cjs/getAggregation.js +0 -249
  47. package/dist/lib-cjs/getAggregation.js.map +0 -1
  48. package/dist/lib-cjs/getFacets.d.ts +0 -3
  49. package/dist/lib-cjs/getFacets.js +0 -138
  50. package/dist/lib-cjs/getFacets.js.map +0 -1
  51. package/dist/lib-cjs/helper.d.ts +0 -10
  52. package/dist/lib-cjs/helper.js +0 -100
  53. package/dist/lib-cjs/helper.js.map +0 -1
  54. package/dist/lib-cjs/index.d.ts +0 -16
  55. package/dist/lib-cjs/index.js +0 -33
  56. package/dist/lib-cjs/index.js.map +0 -1
  57. package/dist/lib-cjs/indices.controller.d.ts +0 -13
  58. package/dist/lib-cjs/indices.controller.js +0 -171
  59. package/dist/lib-cjs/indices.controller.js.map +0 -1
  60. package/dist/lib-cjs/performance.d.ts +0 -7
  61. package/dist/lib-cjs/performance.js +0 -36
  62. package/dist/lib-cjs/performance.js.map +0 -1
  63. package/dist/lib-cjs/pivot.d.ts +0 -28
  64. package/dist/lib-cjs/pivot.js +0 -292
  65. package/dist/lib-cjs/pivot.js.map +0 -1
  66. package/dist/lib-cjs/property-parser.d.ts +0 -5
  67. package/dist/lib-cjs/property-parser.js +0 -115
  68. package/dist/lib-cjs/property-parser.js.map +0 -1
  69. package/dist/lib-cjs/query-builder.d.ts +0 -27
  70. package/dist/lib-cjs/query-builder.js +0 -252
  71. package/dist/lib-cjs/query-builder.js.map +0 -1
  72. package/dist/lib-cjs/query.helper.d.ts +0 -6
  73. package/dist/lib-cjs/query.helper.js +0 -180
  74. package/dist/lib-cjs/query.helper.js.map +0 -1
  75. package/dist/lib-cjs/queryData.d.ts +0 -18
  76. package/dist/lib-cjs/queryData.js +0 -462
  77. package/dist/lib-cjs/queryData.js.map +0 -1
  78. package/dist/lib-cjs/script.controller.d.ts +0 -14
  79. package/dist/lib-cjs/script.controller.js +0 -82
  80. package/dist/lib-cjs/script.controller.js.map +0 -1
  81. package/dist/lib-cjs/types/aggregation.types.d.ts +0 -48
  82. package/dist/lib-cjs/types/aggregation.types.js +0 -3
  83. package/dist/lib-cjs/types/aggregation.types.js.map +0 -1
  84. package/dist/lib-cjs/types/api/file.types.d.ts +0 -36
  85. package/dist/lib-cjs/types/api/file.types.js +0 -3
  86. package/dist/lib-cjs/types/api/file.types.js.map +0 -1
  87. package/dist/lib-cjs/types/app-loader.types.d.ts +0 -219
  88. package/dist/lib-cjs/types/app-loader.types.js +0 -3
  89. package/dist/lib-cjs/types/app-loader.types.js.map +0 -1
  90. package/dist/lib-cjs/types/data.types.d.ts +0 -21
  91. package/dist/lib-cjs/types/data.types.js +0 -3
  92. package/dist/lib-cjs/types/data.types.js.map +0 -1
  93. package/dist/lib-cjs/types/dcupl.types.d.ts +0 -121
  94. package/dist/lib-cjs/types/dcupl.types.js +0 -3
  95. package/dist/lib-cjs/types/dcupl.types.js.map +0 -1
  96. package/dist/lib-cjs/types/facets.types.d.ts +0 -19
  97. package/dist/lib-cjs/types/facets.types.js +0 -3
  98. package/dist/lib-cjs/types/facets.types.js.map +0 -1
  99. package/dist/lib-cjs/types/filter.types.d.ts +0 -121
  100. package/dist/lib-cjs/types/filter.types.js +0 -3
  101. package/dist/lib-cjs/types/filter.types.js.map +0 -1
  102. package/dist/lib-cjs/types/group-by.types.d.ts +0 -13
  103. package/dist/lib-cjs/types/group-by.types.js +0 -3
  104. package/dist/lib-cjs/types/group-by.types.js.map +0 -1
  105. package/dist/lib-cjs/types/index.d.ts +0 -20
  106. package/dist/lib-cjs/types/index.js +0 -37
  107. package/dist/lib-cjs/types/index.js.map +0 -1
  108. package/dist/lib-cjs/types/internal.types.d.ts +0 -5
  109. package/dist/lib-cjs/types/internal.types.js +0 -3
  110. package/dist/lib-cjs/types/internal.types.js.map +0 -1
  111. package/dist/lib-cjs/types/list.types.d.ts +0 -49
  112. package/dist/lib-cjs/types/list.types.js +0 -3
  113. package/dist/lib-cjs/types/list.types.js.map +0 -1
  114. package/dist/lib-cjs/types/model.types.d.ts +0 -358
  115. package/dist/lib-cjs/types/model.types.js +0 -19
  116. package/dist/lib-cjs/types/model.types.js.map +0 -1
  117. package/dist/lib-cjs/types/projection.types.d.ts +0 -20
  118. package/dist/lib-cjs/types/projection.types.js +0 -3
  119. package/dist/lib-cjs/types/projection.types.js.map +0 -1
  120. package/dist/lib-cjs/types/quality.types.d.ts +0 -72
  121. package/dist/lib-cjs/types/quality.types.js +0 -3
  122. package/dist/lib-cjs/types/quality.types.js.map +0 -1
  123. package/dist/lib-cjs/types/query.types.d.ts +0 -80
  124. package/dist/lib-cjs/types/query.types.js +0 -15
  125. package/dist/lib-cjs/types/query.types.js.map +0 -1
  126. package/dist/lib-cjs/types/rest-api/rest-api.types.d.ts +0 -118
  127. package/dist/lib-cjs/types/rest-api/rest-api.types.js +0 -3
  128. package/dist/lib-cjs/types/rest-api/rest-api.types.js.map +0 -1
  129. package/dist/lib-cjs/types/runner/runner.types.d.ts +0 -22
  130. package/dist/lib-cjs/types/runner/runner.types.js +0 -3
  131. package/dist/lib-cjs/types/runner/runner.types.js.map +0 -1
  132. package/dist/lib-cjs/types/section.types.d.ts +0 -16
  133. package/dist/lib-cjs/types/section.types.js +0 -3
  134. package/dist/lib-cjs/types/section.types.js.map +0 -1
  135. package/dist/lib-cjs/types/suggestion.types.d.ts +0 -28
  136. package/dist/lib-cjs/types/suggestion.types.js +0 -3
  137. package/dist/lib-cjs/types/suggestion.types.js.map +0 -1
  138. package/dist/lib-cjs/types/testing.types.d.ts +0 -68
  139. package/dist/lib-cjs/types/testing.types.js +0 -3
  140. package/dist/lib-cjs/types/testing.types.js.map +0 -1
  141. package/dist/lib-cjs/types/workflow/workflow.types.d.ts +0 -341
  142. package/dist/lib-cjs/types/workflow/workflow.types.js +0 -3
  143. package/dist/lib-cjs/types/workflow/workflow.types.js.map +0 -1
  144. package/dist/tsconfig-cjs.tsbuildinfo +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC;AACpC,qDAAmC;AACnC,+CAA6B;AAC7B,gDAA8B;AAC9B,iDAA+B;AAC/B,iDAA+B;AAC/B,mDAAiC;AACjC,mDAAiC;AACjC,+CAA6B;AAC7B,gDAA8B;AAC9B,qDAAmC;AACnC,kDAAgC;AAChC,gDAA8B;AAC9B,4DAA0C;AAC1C,wDAAsC;AACtC,kDAAgC;AAChC,qDAAmC;AACnC,kDAAgC;AAChC,4DAA0C;AAC1C,mDAAiC"}
@@ -1,5 +0,0 @@
1
- import { ListItem } from './data.types';
2
- export type InverseIndexReferenceMap = Map<string, InverseIndexValuesMap>;
3
- export type InverseIndexValuesMap = Map<string, string[]>;
4
- export type InverseIndexDataMap = Map<string, InverseIndexDataValuesMap>;
5
- export type InverseIndexDataValuesMap = Map<string, ListItem>;
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=internal.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"internal.types.js","sourceRoot":"","sources":["../../../src/types/internal.types.ts"],"names":[],"mappings":""}
@@ -1,49 +0,0 @@
1
- import { DcuplGlobalQueryOptions } from './query.types';
2
- import { ViewDefinition, ModelAttribute } from './model.types';
3
- import { Projection, SortingProjection } from './projection.types';
4
- import { ListItem } from './data.types';
5
- export type DcuplItemsOptions<T> = {
6
- start?: number;
7
- count?: number;
8
- projection?: Projection<T>;
9
- sort?: SortingProjection<T>;
10
- };
11
- export type DcuplItemOptions<T> = {
12
- projection?: Projection<T>;
13
- itemKey: string;
14
- };
15
- export type DcuplManyItemsOptions<T> = {
16
- projection?: Projection<T>;
17
- itemKeys: string[];
18
- };
19
- export type DcuplFilterOptions = CatalogApiOptions & {
20
- calculateFacets?: boolean;
21
- excludeZeros?: boolean;
22
- excludeUndefineds?: boolean;
23
- excludeUnresolved?: boolean;
24
- count?: number;
25
- };
26
- export type DcuplFiltersOptions = DcuplFilterOptions & {
27
- filterKeys?: string[];
28
- };
29
- export type DcuplListOptions<ModelNames extends string = string> = {
30
- modelKey: ModelNames;
31
- listKey?: string;
32
- listItemKeys?: string[];
33
- query?: DcuplGlobalQueryOptions<ListItem>;
34
- };
35
- export type DcuplRangeOptions = {
36
- propertyKey: string;
37
- filterKey?: string;
38
- };
39
- export type ListMetadata = {
40
- key: string;
41
- currentSize: number;
42
- initialSize: number;
43
- appliedQuery: DcuplGlobalQueryOptions<any>;
44
- attributes: ModelAttribute[];
45
- views: ViewDefinition[];
46
- };
47
- export type CatalogApiOptions = {
48
- skipProcessing?: boolean;
49
- };
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=list.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"list.types.js","sourceRoot":"","sources":["../../../src/types/list.types.ts"],"names":[],"mappings":""}
@@ -1,358 +0,0 @@
1
- import { AggregationOptions, RawItem } from '.';
2
- import { PivotOptions } from '../pivot';
3
- type AggregationOptionsModel = Omit<AggregationOptions, 'attribute'>;
4
- export type PropertyType = 'any' | 'Array<date>' | 'Array<float>' | 'Array<int>' | 'Array<string>' | 'boolean' | 'date' | 'float' | 'int' | 'json' | 'string';
5
- export declare const PropertyTypesAsArray: PropertyType[];
6
- export declare const NumberPropertyTypes: PropertyType[];
7
- export declare const DatePropertyTypes: PropertyType[];
8
- /**
9
- * must be singleValued or multiValued
10
- * singleValued contains only one key to an object
11
- * multiValued contains multiple key of objects
12
- *
13
- * @minLength 1
14
- * @chance {
15
- * "pickone": [ [ "singleValued", "multiValued" ] ]
16
- * }
17
- * @ignoreThis 2
18
- * @important
19
- */
20
- export type ReferenceType = 'singleValued' | 'multiValued';
21
- export type AttributeType = PropertyType | ReferenceType;
22
- export type ModelMetadata = {
23
- name: string;
24
- description?: string;
25
- [key: string]: any;
26
- };
27
- export type FilterComparisonType = 'equal' | 'equalIgnoreCase' | 'contains' | 'containsIgnoreCase' | 'containsIgnoreCaseAndWhitespace';
28
- export type PropertyAggregate = (PropertyNumber | PropertyString) & {
29
- aggregate: true;
30
- };
31
- export type FilterStringArray = {
32
- key: string;
33
- comparisonType: FilterComparisonType;
34
- };
35
- export type FilterStringSingle = {
36
- comparisonType?: FilterComparisonType;
37
- };
38
- /**
39
- * A property is a quality or characteristic belonging an object.
40
- * @defaultSnippets {"label":"Property", "properties":["key","type"]}
41
- *
42
- */
43
- export type PropertyBase = {
44
- /**
45
- * A key is an unique identifier overall properties in this model.
46
- *
47
- * @minLength 1
48
- * @important
49
- */
50
- key: string;
51
- type: PropertyType;
52
- expression?: string;
53
- derive?: {
54
- localReference: string;
55
- remoteProperty: string;
56
- separator?: string;
57
- };
58
- origin?: string;
59
- filter?: boolean | FilterStringSingle | FilterStringArray[] | FilterNumberArray[];
60
- aggregate?: boolean | AggregationOptionsModel;
61
- meta?: ModelMetadata;
62
- index?: boolean;
63
- quality?: AttributeQualityConfig;
64
- };
65
- /**
66
- * @defaultSnippets { "label": "String Property", "properties": ["key", "type:string:boolean"] }
67
- */
68
- export type PropertyBoolean = PropertyBase & {
69
- type: 'boolean';
70
- aggregate?: boolean | AggregationOptionsModel;
71
- filter?: boolean;
72
- };
73
- /**
74
- * @defaultSnippets { "label": "Int Property", "properties": ["key", "type:int"] }
75
- */
76
- export type PropertyInt = PropertyBase & {
77
- type: 'int' | 'Array<int>';
78
- aggregate?: boolean | AggregationOptionsModel;
79
- filter?: boolean | FilterNumberArray[];
80
- };
81
- /**
82
- * @defaultSnippets { "label": "Float Property", "properties": ["key", "type:float"] }
83
- */
84
- export type PropertyFloat = PropertyBase & {
85
- type: 'float' | 'Array<float>';
86
- aggregate?: boolean | AggregationOptionsModel;
87
- fractionDigits?: number;
88
- filter?: boolean | FilterNumberArray[];
89
- };
90
- export type FilterNumberArray = {
91
- key: string;
92
- };
93
- /**
94
- * @defaultSnippets { "label": "Json Property", "properties": ["key", "type:string:json"] }
95
- */
96
- export type PropertyJson = PropertyBase & {
97
- type: 'json' | 'Array<json>';
98
- filter?: boolean;
99
- };
100
- /**
101
- * @defaultSnippets { "label": "Any Property", "properties": ["key", "type:any"] }
102
- */
103
- export type PropertyAny = PropertyBase & {
104
- type: 'any' | 'Array<any>';
105
- };
106
- /**
107
- * Example: 'yyyy-MM-dd' | 'dd.MM.yyyy' | ...
108
- */
109
- export type PropertyDateInputFormat = string;
110
- /**
111
- * @defaultSnippets { "label": "Date Property", "properties": ["key", "type:date"] }
112
- */
113
- export type PropertyDate = PropertyBase & {
114
- type: 'date' | 'Array<date>';
115
- inputFormat?: PropertyDateInputFormat;
116
- UTC?: boolean;
117
- filter?: boolean;
118
- };
119
- /**
120
- * @defaultSnippets { "label": "String Property", "properties": ["key", "type:string:string"] }
121
- */
122
- export type PropertyString = PropertyBase & {
123
- type: 'string' | 'Array<string>';
124
- filter?: boolean | FilterStringSingle | FilterStringArray[];
125
- };
126
- export type PropertyNumber = PropertyFloat | PropertyInt;
127
- export type Property = PropertyString | PropertyInt | PropertyFloat | PropertyDate | PropertyJson | PropertyBoolean | PropertyAny;
128
- /**
129
- * Facet calculation is disabled by default
130
- */
131
- export type ReferenceFilterDefinition = {
132
- calculateFacets?: boolean;
133
- excludeZeros?: boolean;
134
- excludeUndefineds?: boolean;
135
- };
136
- export type BooleanFilterDefinition = {
137
- calculateFacets?: boolean;
138
- excludeUndefineds?: boolean;
139
- };
140
- export type ReferenceValidity = 'loose' | 'strict';
141
- /**
142
- * @defaultSnippets { "label": "Default Reference", "properties": ["key", "type:singleValued", "model"] }
143
- */
144
- export type ReferenceBase = {
145
- /**
146
- * A key is an unique identifier for all reference in this model.
147
- *
148
- * @minLength 1
149
- * @important
150
- */
151
- key: string;
152
- type: ReferenceType;
153
- /**
154
- * The Model this reference is pointing to.
155
- *
156
- * @minLength 1
157
- * @important
158
- */
159
- model: string;
160
- origin?: string;
161
- filter?: boolean | ReferenceFilterDefinition;
162
- aggregate?: boolean | AggregationOptionsModel;
163
- meta?: ModelMetadata;
164
- index?: boolean;
165
- validity?: ReferenceValidity;
166
- quality?: AttributeQualityConfig;
167
- };
168
- export type AggregatedReference = ReferenceBase & {
169
- aggregate: true;
170
- };
171
- /**
172
- * Resolves a Reference from a foreign model
173
- *
174
- * @defaultSnippets { "label": "Resolved Reference", "properties": ["key", "type:multiValued", "model", "resolve:json:{\"reference\":\"\", \"model\":\"\" }"] }
175
- */
176
- export type ResolvedReference = ReferenceBase & {
177
- /**
178
- * Resolve a Relationship to an foreign model
179
- *
180
- * @defaultSnippets {"label":"Resolve Relationship", "properties":["reference","model"]}
181
- */
182
- resolve: {
183
- /**
184
- * The reference on the foreign object which should be used for resolve the relation.
185
- *
186
- * @minLength 1
187
- * @important
188
- */
189
- reference: string;
190
- /**
191
- * The model of the foreign object reference.
192
- *
193
- * @minLength 1
194
- * @important
195
- */
196
- model: string;
197
- };
198
- };
199
- /**
200
- * Derives a References for a specific value from an other model
201
- *
202
- * @defaultSnippets { "label": "Derived Reference", "properties": ["key", "type:singleValued", "model", "derive:json:{\"localReference\":\"\", \"remoteReference\":\"\"}"] }
203
- */
204
- export type DerivedReference = ReferenceBase & {
205
- type: ReferenceType;
206
- /**
207
- * Derive a specific value from an other object/entity
208
- * @defaultSnippets {"label":"Derive Values", "properties": ["localReference","remoteReference"]}
209
- */
210
- derive: {
211
- /**
212
- * The reference on the foreign object which should be used for resolve the relation.
213
- *
214
- * @minLength 1
215
- * @important
216
- */
217
- localReference: string;
218
- /**
219
- * The reference on the foreign object which should be derived.
220
- *
221
- * @minLength 1
222
- * @important
223
- */
224
- remoteReference: string;
225
- };
226
- };
227
- /**
228
- * Groups a Reference by a specific value from an other model
229
- *
230
- * @defaultSnippets { "label": "Grouped Reference", "properties": ["key", "type:singleValued", "model", "groupBy:json:{\"reference\":\"\" }", "includeSelfInGroup:boolean"] }
231
- */
232
- export type GroupedRefeference = ReferenceBase & {
233
- type: ReferenceType;
234
- /**
235
- * Group by a specific reference
236
- * @defaultSnippets {"label":"Grouped Values", "properties": ["reference","includeSelfInGroup"]}
237
- */
238
- groupBy: {
239
- /**
240
- * The reference that groups are generated from
241
- *
242
- * @minLength 1
243
- * @important
244
- */
245
- reference: string;
246
- includeSelfInGroup?: boolean;
247
- };
248
- };
249
- export type Reference = ResolvedReference | DerivedReference | GroupedRefeference | ReferenceBase;
250
- export type ValueMappingValue = string | '$dcupl_falsy';
251
- export type ValueMappingValues = {
252
- from: ValueMappingValue[];
253
- to: any;
254
- };
255
- export type ValueMappingConfig = {
256
- attributes: string[];
257
- values: ValueMappingValues[];
258
- };
259
- export type ModelAttribute = Property | Reference;
260
- export type ModelQualityConfig = {
261
- enabled?: boolean;
262
- attributes?: AttributeQualityConfig;
263
- };
264
- export type ValidatorErrorType = 'loose' | 'strict';
265
- export type ValidatorConfig = {
266
- value?: any;
267
- };
268
- export type CustomValidatorConfig = {
269
- key: string;
270
- value?: any;
271
- validatorHandling?: ValidatorErrorType;
272
- };
273
- export type AttributeValidatorConfig = {
274
- email?: ValidatorConfig;
275
- endsWith?: ValidatorConfig;
276
- enum?: ValidatorConfig;
277
- includes?: ValidatorConfig;
278
- max?: ValidatorConfig;
279
- maxLength?: ValidatorConfig;
280
- min?: ValidatorConfig;
281
- minLength?: ValidatorConfig;
282
- pattern?: ValidatorConfig;
283
- unique?: ValidatorConfig;
284
- startsWith?: ValidatorConfig;
285
- };
286
- export type AttributeQualityConfig = {
287
- required?: boolean;
288
- nullable?: boolean;
289
- forceStrictDataType?: boolean;
290
- validators?: AttributeValidatorConfig;
291
- validatorHandling?: ValidatorErrorType;
292
- };
293
- /**
294
- * A model describes a real world object and hols attributes.
295
- *
296
- * @defaultSnippets {"label":"Model Definition", "properties":["key:string:myModel", "properties:json:[{\"key\":\"my_property\", \"type\": \"string\"}]", "references:array"]}
297
- */
298
- export type ModelDefinition<ModelNames extends string = string> = {
299
- /**
300
- * The key is an unique identifier overall models in the application.
301
- *
302
- * @minLength 1
303
- */
304
- key: ModelNames;
305
- properties?: Property[];
306
- references?: Reference[];
307
- data?: RawItem[];
308
- supportsAutoCreation?: boolean;
309
- autoGenerateKey?: boolean;
310
- autoGenerateProperties?: boolean;
311
- keyProperty?: string;
312
- valueMappings?: ValueMappingConfig[];
313
- meta?: ModelMetadata;
314
- quality?: ModelQualityConfig;
315
- };
316
- export type DcuplViewType = 'section' | 'pivot';
317
- export type ViewDefinitionBase = {
318
- /**
319
- * The key is an unique identifier overall models in the application.
320
- *
321
- * @minLength 1
322
- */
323
- key: string;
324
- /**
325
- * @minLength 1
326
- */
327
- model: string;
328
- /**
329
- * @minLength 1
330
- */
331
- type: DcuplViewType;
332
- meta?: ModelMetadata;
333
- };
334
- /**
335
- * @defaultSnippets { "label": "Dcupl Section View", "properties": ["key", "model", "type:section", "primaryAttribute", "aggregates:array"] }
336
- */
337
- export type ViewDefinitionSection = ViewDefinitionBase & {
338
- type: 'section';
339
- /**
340
- * @minLength 1
341
- */
342
- primaryAttribute: string;
343
- aggregates: AggregationOptions[];
344
- };
345
- /**
346
- * @defaultSnippets { "label": "Dcupl Pivot View", "properties": ["key", "model", "type:pivot", "options:json:{\"rows\":[{\"attribute\": \"\"}], \"columns\":[{\"attribute\": \"\"}], \"values\":[{\"attribute\": \"\", \"types\": [\"sum\"]}]}"] }
347
- */
348
- export type ViewDefinitionPivot = ViewDefinitionBase & {
349
- type: 'pivot';
350
- options: PivotOptions;
351
- };
352
- export type ViewDefinition = ViewDefinitionSection | ViewDefinitionPivot;
353
- /**
354
- * Container for ModelDescriptions & Views
355
- *
356
- */
357
- export type Model = ViewDefinition | ModelDefinition | Array<ModelDefinition | ViewDefinition>;
358
- export {};
@@ -1,19 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DatePropertyTypes = exports.NumberPropertyTypes = exports.PropertyTypesAsArray = void 0;
4
- exports.PropertyTypesAsArray = [
5
- 'any',
6
- 'Array<date>',
7
- 'Array<float>',
8
- 'Array<int>',
9
- 'Array<string>',
10
- 'boolean',
11
- 'date',
12
- 'float',
13
- 'int',
14
- 'json',
15
- 'string',
16
- ];
17
- exports.NumberPropertyTypes = ['int', 'float', 'Array<int>', 'Array<float>'];
18
- exports.DatePropertyTypes = ['date', 'Array<date>'];
19
- //# sourceMappingURL=model.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"model.types.js","sourceRoot":"","sources":["../../../src/types/model.types.ts"],"names":[],"mappings":";;;AAkBa,QAAA,oBAAoB,GAAmB;IAClD,KAAK;IACL,aAAa;IACb,cAAc;IACd,YAAY;IACZ,eAAe;IACf,SAAS;IACT,MAAM;IACN,OAAO;IACP,KAAK;IACL,MAAM;IACN,QAAQ;CACT,CAAC;AAEW,QAAA,mBAAmB,GAAmB,CAAC,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,cAAc,CAAC,CAAC;AACrF,QAAA,iBAAiB,GAAmB,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC"}
@@ -1,20 +0,0 @@
1
- type ArrayOfProperties<T, P extends keyof T> = Exclude<P, 'filterables'>[];
2
- type WildCard = {
3
- $?: boolean;
4
- $$?: boolean;
5
- };
6
- type CleanResultItem<T> = Omit<T, 'filterables'>;
7
- export type ProjectionAdvanced<T> = {
8
- [P in keyof CleanResultItem<T>]?: boolean | WildCard | ProjectionAdvanced<T[P]>;
9
- };
10
- export type Projection<T> = WildCard | ProjectionAdvanced<T>;
11
- export type SortDirection = 'ASC' | 'DESC';
12
- export type SortingProjection<T> = {
13
- attributes: ArrayOfProperties<T, keyof T>;
14
- order: SortDirection[];
15
- script?: {
16
- key: string;
17
- options: any;
18
- };
19
- };
20
- export {};
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=projection.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"projection.types.js","sourceRoot":"","sources":["../../../src/types/projection.types.ts"],"names":[],"mappings":""}
@@ -1,72 +0,0 @@
1
- export declare namespace QualityAnalyzer {
2
- type ModelErrorGroup = 'ReferenceDataError' | 'PropertyDataError' | 'DataContainerError' | 'ModelDefinitionError';
3
- type ModelErrorType = 'UndefinedAttribute' | 'InvalidValidator' | 'UndefinedValue' | 'NullValue' | 'WrongDataType' | 'NonUniqueKey' | 'MissingModel' | 'MissingProperty' | 'MissingReference' | 'UnknownExpressionVariable' | 'RemoteReferenceKeyNotFound' | 'InvalidModelDefinition';
4
- type DcuplErrorType = 'model' | 'loader';
5
- type DcuplErrorBase = {
6
- key?: string;
7
- errorGroup: string;
8
- errorType: string;
9
- title: string;
10
- type: DcuplErrorType;
11
- description?: string;
12
- meta?: any;
13
- };
14
- type InternalModelError = DcuplErrorBase & {
15
- type: 'model';
16
- errorGroup: ModelErrorGroup;
17
- errorType: ModelErrorType;
18
- model?: string;
19
- itemKey?: string;
20
- attribute?: string;
21
- };
22
- type LoaderErrorGroup = 'LoaderConfigError' | 'ResourceError';
23
- type LoaderErrorType = 'InvalidConfig' | 'InvalidResource';
24
- type LoaderErrors = DcuplErrorBase & {
25
- type: 'loader';
26
- errorGroup: LoaderErrorGroup;
27
- errorType: LoaderErrorType;
28
- model?: string;
29
- };
30
- type DcuplError = InternalModelError | LoaderErrors;
31
- /**
32
- * Analytics Values
33
- */
34
- type AnalyticsValues = {
35
- loading: number;
36
- processing: number;
37
- startup: number;
38
- sizes?: {
39
- totalEncoded?: number;
40
- totalDecoded?: number;
41
- unusedDecoded?: number;
42
- models?: Array<{
43
- model: string;
44
- encodedBodySize: number;
45
- decodedBodySize: number;
46
- }>;
47
- };
48
- unusedAttributes?: UnusedAttribute[];
49
- errors?: {
50
- size?: number;
51
- UndefinedValue?: number;
52
- UndefinedAttribute?: number;
53
- WrongDataType?: number;
54
- MissingModel?: number;
55
- InvalidModelDescription?: number;
56
- RemoteReferenceKeyNotFound?: number;
57
- };
58
- counts?: {
59
- resources?: number;
60
- modelFiles?: number;
61
- dataFiles?: number;
62
- models?: number;
63
- rows?: number;
64
- attributes?: number;
65
- dataEntries?: number;
66
- };
67
- };
68
- type UnusedAttribute = {
69
- model: string;
70
- attribute: string;
71
- };
72
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=quality.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"quality.types.js","sourceRoot":"","sources":["../../../src/types/quality.types.ts"],"names":[],"mappings":""}
@@ -1,80 +0,0 @@
1
- import { ListItem } from './data.types';
2
- import { Projection, SortingProjection } from './projection.types';
3
- export type DcuplQueryTransformOptions = 'lowercase' | 'trim' | 'removeWhitespace';
4
- export declare const DcuplQueryOperatorsAsArray: readonly ["eq", "find", "gt", "gte", "lt", "lte", "typeof", "isTruthy", "size"];
5
- export type DcuplQueryOperator = (typeof DcuplQueryOperatorsAsArray)[number];
6
- export type DcuplQueryType = 'and' | 'or';
7
- type DcuplQueryBase = {
8
- attribute: string;
9
- queryKey?: any;
10
- options?: {
11
- transform?: DcuplQueryTransformOptions[];
12
- invert?: boolean;
13
- arrayValueHandling?: 'some' | 'every';
14
- };
15
- };
16
- type DcuplQueryEq = DcuplQueryBase & {
17
- operator: 'eq';
18
- /**
19
- * You may search for any value but
20
- * only values of type string and { key:string } may be used for indexed search
21
- */
22
- value: any;
23
- };
24
- type DcuplQueryFind = DcuplQueryBase & {
25
- operator: 'find';
26
- value: Record<string, unknown> | string;
27
- };
28
- type DcuplQueryNumbers = DcuplQueryBase & {
29
- operator: 'gt' | 'lt' | 'gte' | 'lte';
30
- value: string | number | Date;
31
- };
32
- type DcuplQueryTypeOf = DcuplQueryBase & {
33
- operator: 'typeof';
34
- value: string;
35
- };
36
- type DcuplQueryIsTruthy = DcuplQueryBase & {
37
- operator: 'isTruthy';
38
- value: boolean;
39
- };
40
- type DcuplQuerySize = DcuplQueryBase & {
41
- operator: 'size';
42
- value: number;
43
- };
44
- export type DcuplQuery = DcuplQueryEq | DcuplQueryNumbers | DcuplQueryTypeOf | DcuplQueryIsTruthy | DcuplQuerySize | DcuplQueryFind;
45
- export type DcuplQueryGroup<ChildQuery extends DcuplQuery | DcuplQueryGroup = any> = {
46
- groupType?: DcuplQueryType;
47
- groupKey?: string;
48
- queries: Array<ChildQuery>;
49
- };
50
- type DcuplItemOptions<T> = {
51
- start?: number;
52
- count?: number;
53
- projection?: Projection<T>;
54
- sort?: SortingProjection<T>;
55
- };
56
- export type DcuplGlobalQueryOptions<T> = {
57
- modelKey: string;
58
- } & DcuplItemOptions<T> & DcuplQueryGroup;
59
- export type DcuplGlobalItemOptions<T> = {
60
- modelKey: string;
61
- itemKey: string;
62
- projection?: Projection<T>;
63
- };
64
- export type DcuplGlobalManyItemOptions<T> = {
65
- modelKey: string;
66
- itemKeys: string[];
67
- projection?: Projection<T>;
68
- };
69
- export type DcuplListQueryOptions<T> = DcuplItemOptions<T> & DcuplQueryGroup;
70
- export type DcuplListItemOptions<T> = DcuplItemOptions<T> & {
71
- itemKey: string;
72
- };
73
- export type CustomOperatorFn = (query: DcuplQuery, listItem: ListItem) => boolean;
74
- export type CustomOperatorFnMap = Map<string, CustomOperatorFn>;
75
- export type DcuplQueryStatement<T = any> = DcuplItemOptions<T> & {
76
- modelKey: string;
77
- groupType?: DcuplQueryType;
78
- queries: DcuplQuery[] | DcuplQueryGroup<DcuplQuery>[] | DcuplQueryGroup<DcuplQueryGroup<DcuplQuery>>[];
79
- };
80
- export {};
@@ -1,15 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DcuplQueryOperatorsAsArray = void 0;
4
- exports.DcuplQueryOperatorsAsArray = [
5
- 'eq',
6
- 'find',
7
- 'gt',
8
- 'gte',
9
- 'lt',
10
- 'lte',
11
- 'typeof',
12
- 'isTruthy',
13
- 'size',
14
- ];
15
- //# sourceMappingURL=query.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"query.types.js","sourceRoot":"","sources":["../../../src/types/query.types.ts"],"names":[],"mappings":";;;AAKa,QAAA,0BAA0B,GAAG;IACxC,IAAI;IACJ,MAAM;IACN,IAAI;IACJ,KAAK;IACL,IAAI;IACJ,KAAK;IACL,QAAQ;IACR,UAAU;IACV,MAAM;CACE,CAAC"}