@acorex-platform/module-data-management-client 0.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/acorex-platform-module-data-management-client-contracts.mjs +366 -0
- package/fesm2022/acorex-platform-module-data-management-client-contracts.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-data-management-client-index-CMxKYDas.mjs +298 -0
- package/fesm2022/acorex-platform-module-data-management-client-index-CMxKYDas.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-data-management-client-list-agreement-scale-options.query-Dl7jMXp1.mjs +67 -0
- package/fesm2022/acorex-platform-module-data-management-client-list-agreement-scale-options.query-Dl7jMXp1.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-data-management-client-list-availability-options.query-CdaHTgij.mjs +64 -0
- package/fesm2022/acorex-platform-module-data-management-client-list-availability-options.query-CdaHTgij.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-data-management-client-list-frequency-options.query-BvsPPzFj.mjs +52 -0
- package/fesm2022/acorex-platform-module-data-management-client-list-frequency-options.query-BvsPPzFj.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-data-management-client-list-gender-options.query-BA6Bwv66.mjs +55 -0
- package/fesm2022/acorex-platform-module-data-management-client-list-gender-options.query-BA6Bwv66.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-data-management-client-list-nps-scale-options.query-C8Pbp0Ow.mjs +49 -0
- package/fesm2022/acorex-platform-module-data-management-client-list-nps-scale-options.query-C8Pbp0Ow.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-data-management-client-list-priority-options.query-GCuv4lU3.mjs +51 -0
- package/fesm2022/acorex-platform-module-data-management-client-list-priority-options.query-GCuv4lU3.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-data-management-client-list-rating-1-10-options.query-BYBU_yzv.mjs +49 -0
- package/fesm2022/acorex-platform-module-data-management-client-list-rating-1-10-options.query-BYBU_yzv.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-data-management-client-list-rating-scale-options.query-H-jWx7_1.mjs +72 -0
- package/fesm2022/acorex-platform-module-data-management-client-list-rating-scale-options.query-H-jWx7_1.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-data-management-client-list-satisfaction-options.query-BIDjWNP5.mjs +67 -0
- package/fesm2022/acorex-platform-module-data-management-client-list-satisfaction-options.query-BIDjWNP5.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-data-management-client-list-yes-no-maybe-options.query-C90RnQ5A.mjs +50 -0
- package/fesm2022/acorex-platform-module-data-management-client-list-yes-no-maybe-options.query-C90RnQ5A.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-data-management-client-list-yes-no-na-options.query-tz9dR33P.mjs +53 -0
- package/fesm2022/acorex-platform-module-data-management-client-list-yes-no-na-options.query-tz9dR33P.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-data-management-client-list-yes-no-options.query-w2mqJJNZ.mjs +49 -0
- package/fesm2022/acorex-platform-module-data-management-client-list-yes-no-options.query-w2mqJJNZ.mjs.map +1 -0
- package/fesm2022/acorex-platform-module-data-management-client.mjs +8397 -0
- package/fesm2022/acorex-platform-module-data-management-client.mjs.map +1 -0
- package/package.json +28 -0
- package/types/acorex-platform-module-data-management-client-contracts.d.ts +429 -0
- package/types/acorex-platform-module-data-management-client.d.ts +1798 -0
package/package.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@acorex-platform/module-data-management-client",
|
|
3
|
+
"version": "0.0.21",
|
|
4
|
+
"sideEffects": false,
|
|
5
|
+
"peerDependencies": {
|
|
6
|
+
"@angular/common": "^21.0.0",
|
|
7
|
+
"@angular/core": "^21.0.0"
|
|
8
|
+
},
|
|
9
|
+
"dependencies": {
|
|
10
|
+
"tslib": "^2.3.0"
|
|
11
|
+
},
|
|
12
|
+
"module": "fesm2022/acorex-platform-module-data-management-client.mjs",
|
|
13
|
+
"typings": "types/acorex-platform-module-data-management-client.d.ts",
|
|
14
|
+
"exports": {
|
|
15
|
+
"./package.json": {
|
|
16
|
+
"default": "./package.json"
|
|
17
|
+
},
|
|
18
|
+
".": {
|
|
19
|
+
"types": "./types/acorex-platform-module-data-management-client.d.ts",
|
|
20
|
+
"default": "./fesm2022/acorex-platform-module-data-management-client.mjs"
|
|
21
|
+
},
|
|
22
|
+
"./contracts": {
|
|
23
|
+
"types": "./types/acorex-platform-module-data-management-client-contracts.d.ts",
|
|
24
|
+
"default": "./fesm2022/acorex-platform-module-data-management-client-contracts.mjs"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"type": "module"
|
|
28
|
+
}
|
|
@@ -0,0 +1,429 @@
|
|
|
1
|
+
import { AXPMultiLanguageString, AXPOptionsData, AXPMetaDataDefinition, AXPFilterDefinition, AXPCategoryListItem } from '@acorex-platform/framework-shared/core';
|
|
2
|
+
import { AXPEntityModel } from '@acorex-platform/framework-shared/entity';
|
|
3
|
+
|
|
4
|
+
declare const AXM_COLUMN_DEF_WIDGET: {
|
|
5
|
+
type: string;
|
|
6
|
+
mode: string;
|
|
7
|
+
options: {
|
|
8
|
+
direction: string;
|
|
9
|
+
};
|
|
10
|
+
children: ({
|
|
11
|
+
type: string;
|
|
12
|
+
mode: string;
|
|
13
|
+
options: {
|
|
14
|
+
colSpan: number;
|
|
15
|
+
};
|
|
16
|
+
children: {
|
|
17
|
+
type: string;
|
|
18
|
+
mode: string;
|
|
19
|
+
path: string;
|
|
20
|
+
options: {
|
|
21
|
+
placeholder: string;
|
|
22
|
+
required: boolean;
|
|
23
|
+
};
|
|
24
|
+
}[];
|
|
25
|
+
} | {
|
|
26
|
+
type: string;
|
|
27
|
+
options: {
|
|
28
|
+
colSpan: number;
|
|
29
|
+
};
|
|
30
|
+
mode: string;
|
|
31
|
+
children: {
|
|
32
|
+
type: string;
|
|
33
|
+
mode: string;
|
|
34
|
+
path: string;
|
|
35
|
+
options: {
|
|
36
|
+
placeholder: string;
|
|
37
|
+
valueField: string;
|
|
38
|
+
textField: string;
|
|
39
|
+
dataSource: string;
|
|
40
|
+
direction: string;
|
|
41
|
+
multiple: boolean;
|
|
42
|
+
required: boolean;
|
|
43
|
+
};
|
|
44
|
+
}[];
|
|
45
|
+
} | {
|
|
46
|
+
type: string;
|
|
47
|
+
options: {
|
|
48
|
+
colSpan: number;
|
|
49
|
+
};
|
|
50
|
+
mode: string;
|
|
51
|
+
children: {
|
|
52
|
+
type: string;
|
|
53
|
+
mode: string;
|
|
54
|
+
path: string;
|
|
55
|
+
options: {
|
|
56
|
+
tooltip: string;
|
|
57
|
+
label: string;
|
|
58
|
+
};
|
|
59
|
+
triggers: {
|
|
60
|
+
event: string;
|
|
61
|
+
action: string;
|
|
62
|
+
}[];
|
|
63
|
+
}[];
|
|
64
|
+
} | {
|
|
65
|
+
type: string;
|
|
66
|
+
options: {
|
|
67
|
+
colSpan: number;
|
|
68
|
+
};
|
|
69
|
+
mode: string;
|
|
70
|
+
children: {
|
|
71
|
+
type: string;
|
|
72
|
+
mode: string;
|
|
73
|
+
path: string;
|
|
74
|
+
options: {
|
|
75
|
+
tooltip: string;
|
|
76
|
+
label: string;
|
|
77
|
+
};
|
|
78
|
+
}[];
|
|
79
|
+
})[];
|
|
80
|
+
}[];
|
|
81
|
+
|
|
82
|
+
declare const AXMDataManagementFeatureKeys: {
|
|
83
|
+
readonly Queries: "DataManagement:Feature:Queries";
|
|
84
|
+
readonly DataSources: "DataManagement:Feature:DataSources";
|
|
85
|
+
readonly MetaDataDefinitions: "DataManagement:Feature:MetaDataDefinitions";
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
declare const AXPDataManagementMenuKeys: {
|
|
89
|
+
readonly Root: "DataManagement:Menu";
|
|
90
|
+
readonly Queries: "DataManagement:Menu:Queries";
|
|
91
|
+
readonly DataSources: "DataManagement:Menu:DataSources";
|
|
92
|
+
readonly MetaDataDefinitions: "DataManagement:Menu:MetaDataDefinitions";
|
|
93
|
+
readonly Tags: "DataManagement:Menu:Tags";
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
/** Localized or plain string as stored / edited in the builder */
|
|
97
|
+
type AXMMetaDataLocalizedString = string | AXPMultiLanguageString;
|
|
98
|
+
/** Single metadata field within a group */
|
|
99
|
+
interface AXMMetaDataBuilderField {
|
|
100
|
+
id: string;
|
|
101
|
+
name: string;
|
|
102
|
+
title: AXMMetaDataLocalizedString;
|
|
103
|
+
description?: AXMMetaDataLocalizedString;
|
|
104
|
+
interface: string;
|
|
105
|
+
configuration?: {
|
|
106
|
+
isRequired?: boolean;
|
|
107
|
+
placeholder?: string;
|
|
108
|
+
[key: string]: unknown;
|
|
109
|
+
};
|
|
110
|
+
status: 'active' | 'deleted' | 'temporary';
|
|
111
|
+
order: number;
|
|
112
|
+
isNewlyAdded?: boolean;
|
|
113
|
+
}
|
|
114
|
+
/** Group of metadata fields */
|
|
115
|
+
interface AXMMetaDataBuilderGroup {
|
|
116
|
+
id: string;
|
|
117
|
+
name: string;
|
|
118
|
+
title?: AXMMetaDataLocalizedString;
|
|
119
|
+
description?: AXMMetaDataLocalizedString;
|
|
120
|
+
order: number;
|
|
121
|
+
fields: AXMMetaDataBuilderField[];
|
|
122
|
+
isNewlyAdded?: boolean;
|
|
123
|
+
}
|
|
124
|
+
/** Designer state (internal) */
|
|
125
|
+
interface AXMMetaDataBuilderState {
|
|
126
|
+
groups: AXMMetaDataBuilderGroup[];
|
|
127
|
+
mode: 'designer' | 'preview';
|
|
128
|
+
selectedFieldId?: string;
|
|
129
|
+
selectedGroupId?: string;
|
|
130
|
+
}
|
|
131
|
+
/** Value persisted on the entity */
|
|
132
|
+
interface AXMMetaDataBuilderValue {
|
|
133
|
+
groups: Array<{
|
|
134
|
+
name: string;
|
|
135
|
+
title?: AXMMetaDataLocalizedString;
|
|
136
|
+
description?: AXMMetaDataLocalizedString;
|
|
137
|
+
order: number;
|
|
138
|
+
fields: Array<{
|
|
139
|
+
id: string;
|
|
140
|
+
name: string;
|
|
141
|
+
title: AXMMetaDataLocalizedString;
|
|
142
|
+
description?: AXMMetaDataLocalizedString;
|
|
143
|
+
interface: string;
|
|
144
|
+
configuration?: AXPOptionsData;
|
|
145
|
+
order: number;
|
|
146
|
+
}>;
|
|
147
|
+
}>;
|
|
148
|
+
}
|
|
149
|
+
declare function convertValueToState(value: unknown): AXMMetaDataBuilderState;
|
|
150
|
+
declare function convertStateToValue(state: AXMMetaDataBuilderState): AXMMetaDataBuilderValue;
|
|
151
|
+
declare function createDefaultGroup(): AXMMetaDataBuilderGroup;
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Insights & Reporting capabilities used by this module.
|
|
155
|
+
* Domain capability keys for this module. Root groups live in `AXPCommonPermissionGroupKeys` (common contracts).
|
|
156
|
+
*/
|
|
157
|
+
declare const AXPInsightsReportingPermissionKeys: {
|
|
158
|
+
readonly Access: "InsightsReporting:Permission:Access";
|
|
159
|
+
readonly MaintainReports: "InsightsReporting:Permission:MaintainReports";
|
|
160
|
+
readonly MaintainData: "InsightsReporting:Permission:MaintainData";
|
|
161
|
+
readonly ViewActivityInsight: "InsightsReporting:Permission:ViewActivityInsight";
|
|
162
|
+
readonly ManageActivityInsight: "InsightsReporting:Permission:ManageActivityInsight";
|
|
163
|
+
readonly Setup: "InsightsReporting:Permission:Setup";
|
|
164
|
+
};
|
|
165
|
+
/**
|
|
166
|
+
* @deprecated Prefer {@link AXPInsightsReportingPermissionKeys}.
|
|
167
|
+
* Legacy nested shape kept so existing imports compile during migration.
|
|
168
|
+
*/
|
|
169
|
+
declare const AXMPermissionsKeys: {
|
|
170
|
+
readonly DataManagement: {
|
|
171
|
+
readonly Query: {
|
|
172
|
+
readonly Management: "InsightsReporting:Permission:MaintainData";
|
|
173
|
+
};
|
|
174
|
+
readonly DataSource: {
|
|
175
|
+
readonly Management: "InsightsReporting:Permission:MaintainData";
|
|
176
|
+
};
|
|
177
|
+
readonly MetaDataDefinition: {
|
|
178
|
+
readonly Management: "InsightsReporting:Permission:Setup";
|
|
179
|
+
};
|
|
180
|
+
readonly Equipment: {
|
|
181
|
+
readonly Management: "InsightsReporting:Permission:MaintainData";
|
|
182
|
+
};
|
|
183
|
+
readonly Tag: {
|
|
184
|
+
readonly Management: "InsightsReporting:Permission:Setup";
|
|
185
|
+
};
|
|
186
|
+
};
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
declare const RootConfig: {
|
|
190
|
+
readonly config: {
|
|
191
|
+
i18n: string;
|
|
192
|
+
};
|
|
193
|
+
readonly module: {
|
|
194
|
+
readonly route: "data-management";
|
|
195
|
+
readonly name: "DataManagement";
|
|
196
|
+
readonly title: "@data-management:module.title";
|
|
197
|
+
readonly icon: "fa-regular fa-database";
|
|
198
|
+
};
|
|
199
|
+
readonly entities: {
|
|
200
|
+
readonly query: {
|
|
201
|
+
readonly name: "Query";
|
|
202
|
+
readonly title: "@data-management:queries.entities.query.title";
|
|
203
|
+
readonly titlePlural: "@data-management:queries.entities.query.plural";
|
|
204
|
+
readonly icon: "fa-regular fa-nfc-magnifying-glass";
|
|
205
|
+
};
|
|
206
|
+
readonly queryCategory: {
|
|
207
|
+
readonly name: "QueryCategory";
|
|
208
|
+
readonly title: "@data-management:queries.terms.category";
|
|
209
|
+
readonly titlePlural: "@data-management:queries.terms.categories";
|
|
210
|
+
readonly icon: "fa-regular fa-layer-group";
|
|
211
|
+
};
|
|
212
|
+
readonly dataSource: {
|
|
213
|
+
readonly name: "DataSource";
|
|
214
|
+
readonly title: "@data-management:data-sources.entities.data-source.title";
|
|
215
|
+
readonly titlePlural: "@data-management:data-sources.entities.data-source.plural";
|
|
216
|
+
readonly icon: "fa-regular fa-database";
|
|
217
|
+
};
|
|
218
|
+
readonly dataSourceCategory: {
|
|
219
|
+
readonly name: "DataSourceCategory";
|
|
220
|
+
readonly title: "@data-management:data-sources.terms.category";
|
|
221
|
+
readonly titlePlural: "@data-management:data-sources.terms.categories";
|
|
222
|
+
readonly icon: "fa-regular fa-layer-group";
|
|
223
|
+
};
|
|
224
|
+
readonly metaDataDefinition: {
|
|
225
|
+
readonly name: "MetaDataDefinition";
|
|
226
|
+
readonly title: "@data-management:metadata-definitions.entities.metadata-definition.title";
|
|
227
|
+
readonly titlePlural: "@data-management:metadata-definitions.entities.metadata-definition.plural";
|
|
228
|
+
readonly icon: "fa-light fa-server";
|
|
229
|
+
};
|
|
230
|
+
readonly tag: {
|
|
231
|
+
readonly name: "Tag";
|
|
232
|
+
readonly source: "DataManagement.Tag";
|
|
233
|
+
readonly title: "@general:terms.common.tag";
|
|
234
|
+
readonly icon: "fa-light fa-tags";
|
|
235
|
+
};
|
|
236
|
+
readonly equipmentCategory: {
|
|
237
|
+
readonly name: "EquipmentCategory";
|
|
238
|
+
readonly title: "@data-management:equipments.entities.equipment-category.title";
|
|
239
|
+
readonly titlePlural: "@data-management:equipments.entities.equipment-category.plural";
|
|
240
|
+
readonly icon: "fa-light fa-folder-tree";
|
|
241
|
+
};
|
|
242
|
+
readonly equipment: {
|
|
243
|
+
readonly name: "Equipment";
|
|
244
|
+
readonly source: "DataManagement.Equipment";
|
|
245
|
+
readonly title: "@data-management:equipments.entities.equipment.title";
|
|
246
|
+
readonly titlePlural: "@data-management:equipments.entities.equipment.plural";
|
|
247
|
+
readonly icon: "fa-light fa-plug";
|
|
248
|
+
};
|
|
249
|
+
};
|
|
250
|
+
};
|
|
251
|
+
|
|
252
|
+
declare enum AXMDataSourceOutputType {
|
|
253
|
+
Table = "table",
|
|
254
|
+
SingleObject = "single_object",
|
|
255
|
+
Value = "value"
|
|
256
|
+
}
|
|
257
|
+
interface AXMDataSourceOutputTypeOption {
|
|
258
|
+
name: AXMDataSourceOutputType;
|
|
259
|
+
title: string;
|
|
260
|
+
}
|
|
261
|
+
declare enum AXMDataSourceType {
|
|
262
|
+
Static = "static",
|
|
263
|
+
Query = "query"
|
|
264
|
+
}
|
|
265
|
+
interface AXMDataSourceTypeOption {
|
|
266
|
+
name: AXMDataSourceType;
|
|
267
|
+
title: string;
|
|
268
|
+
}
|
|
269
|
+
interface AXMDataSourceFilter {
|
|
270
|
+
columnName: string;
|
|
271
|
+
defaultValue: any;
|
|
272
|
+
isSystemFilter: boolean;
|
|
273
|
+
isRequired: boolean;
|
|
274
|
+
}
|
|
275
|
+
interface AXMDataSourceEntityModel<T = string> extends AXPEntityModel<T> {
|
|
276
|
+
name: string;
|
|
277
|
+
title: string;
|
|
278
|
+
categoryIds?: string[];
|
|
279
|
+
sourceStatic: any[];
|
|
280
|
+
sourceEntity: T;
|
|
281
|
+
sourceType: AXMDataSourceTypeOption;
|
|
282
|
+
outputType: AXMDataSourceOutputTypeOption;
|
|
283
|
+
filters?: AXMDataSourceFilter[];
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
interface AXMMetaDataDefinitionEntityModel<T = string> extends AXPEntityModel<T>, AXPMetaDataDefinition {
|
|
287
|
+
/** Optional entity field (may be localized like `title`). */
|
|
288
|
+
description?: string | AXPMultiLanguageString;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
/**
|
|
292
|
+
* Query output type
|
|
293
|
+
* Defines the expected structure of the query result
|
|
294
|
+
*/
|
|
295
|
+
type AXPQueryOutputType = 'value' | 'table' | 'object';
|
|
296
|
+
/**
|
|
297
|
+
* Sort rule for query builder
|
|
298
|
+
*/
|
|
299
|
+
interface AXPQuerySortRule {
|
|
300
|
+
field: string;
|
|
301
|
+
dir: 'asc' | 'desc';
|
|
302
|
+
}
|
|
303
|
+
/**
|
|
304
|
+
* Aggregate operation in query
|
|
305
|
+
* Represents an aggregate function applied to a field
|
|
306
|
+
* Supports nested aggregates (e.g., CONCAT(MIN(field1), MAX(field2)))
|
|
307
|
+
*/
|
|
308
|
+
interface AXPAggregateOperation {
|
|
309
|
+
/**
|
|
310
|
+
* Field name to aggregate (optional if nestedAggregates is provided)
|
|
311
|
+
*/
|
|
312
|
+
field?: string;
|
|
313
|
+
/**
|
|
314
|
+
* Aggregate function name
|
|
315
|
+
*/
|
|
316
|
+
function: string;
|
|
317
|
+
/**
|
|
318
|
+
* Output alias/name for the aggregated result
|
|
319
|
+
*/
|
|
320
|
+
alias?: string;
|
|
321
|
+
/**
|
|
322
|
+
* Whether to use DISTINCT modifier
|
|
323
|
+
*/
|
|
324
|
+
distinct?: boolean;
|
|
325
|
+
/**
|
|
326
|
+
* Nested aggregate operations (for functions like CONCAT that can contain other aggregates)
|
|
327
|
+
* Example: CONCAT(MIN(price), MAX(price)) would have:
|
|
328
|
+
* - function: 'concat'
|
|
329
|
+
* - nestedAggregates: [
|
|
330
|
+
* { function: 'min', field: 'price' },
|
|
331
|
+
* { function: 'max', field: 'price' }
|
|
332
|
+
* ]
|
|
333
|
+
*/
|
|
334
|
+
nestedAggregates?: AXPAggregateOperation[];
|
|
335
|
+
}
|
|
336
|
+
/**
|
|
337
|
+
* Complete query builder data model
|
|
338
|
+
* Includes all query components: dataSource, columns, where, sort, groupBy, aggregates, and raw query
|
|
339
|
+
*/
|
|
340
|
+
interface AXPQueryBuilderData {
|
|
341
|
+
/**
|
|
342
|
+
* Data source name (optional, can be set from context)
|
|
343
|
+
*/
|
|
344
|
+
dataSource?: string;
|
|
345
|
+
/**
|
|
346
|
+
* Selected column names (array of column keys)
|
|
347
|
+
*/
|
|
348
|
+
columns: string[];
|
|
349
|
+
/**
|
|
350
|
+
* WHERE clause (filter definition with groups and conditions)
|
|
351
|
+
*/
|
|
352
|
+
where: AXPFilterDefinition;
|
|
353
|
+
/**
|
|
354
|
+
* Sort rules (array of field + direction)
|
|
355
|
+
*/
|
|
356
|
+
sort: AXPQuerySortRule[];
|
|
357
|
+
/**
|
|
358
|
+
* Group by columns (array of column keys)
|
|
359
|
+
*/
|
|
360
|
+
groupBy: string[];
|
|
361
|
+
/**
|
|
362
|
+
* Aggregate operations (array of field + function + alias)
|
|
363
|
+
*/
|
|
364
|
+
aggregates: AXPAggregateOperation[];
|
|
365
|
+
/**
|
|
366
|
+
* Raw SQL/query string (optional, used when user wants to write raw query)
|
|
367
|
+
*/
|
|
368
|
+
rawQuery?: string;
|
|
369
|
+
/**
|
|
370
|
+
* Query language/dialect for raw query (e.g., 'mysql', 'postgresql', 'mongodb')
|
|
371
|
+
*/
|
|
372
|
+
queryLanguage?: string;
|
|
373
|
+
/**
|
|
374
|
+
* Expected output type for the query result
|
|
375
|
+
* - 'value': Single value result (e.g., COUNT, SUM, AVG)
|
|
376
|
+
* - 'table': Table result with items array and total
|
|
377
|
+
* - 'object': Custom object structure
|
|
378
|
+
*/
|
|
379
|
+
outputType?: AXPQueryOutputType;
|
|
380
|
+
}
|
|
381
|
+
/**
|
|
382
|
+
* Query execution result
|
|
383
|
+
* Can be:
|
|
384
|
+
* - A single value (for aggregate queries like SUM, COUNT, etc.)
|
|
385
|
+
* - A table with items and total (for regular queries)
|
|
386
|
+
* - An object with custom structure
|
|
387
|
+
*/
|
|
388
|
+
type AXPQueryExecutionResult = {
|
|
389
|
+
/**
|
|
390
|
+
* Table result with items array
|
|
391
|
+
*/
|
|
392
|
+
items: Record<string, unknown>[];
|
|
393
|
+
total: number;
|
|
394
|
+
metadata?: Record<string, unknown>;
|
|
395
|
+
} | {
|
|
396
|
+
/**
|
|
397
|
+
* Single aggregate value result
|
|
398
|
+
*/
|
|
399
|
+
value: unknown;
|
|
400
|
+
metadata?: Record<string, unknown>;
|
|
401
|
+
} | Record<string, unknown> | unknown[];
|
|
402
|
+
interface AXMDataManagementQueryEntityModel extends AXPEntityModel<string> {
|
|
403
|
+
name: string;
|
|
404
|
+
title: string;
|
|
405
|
+
dataSource?: AXMDataSourceEntityModel;
|
|
406
|
+
query?: AXPQueryBuilderData;
|
|
407
|
+
categoryIds?: string[];
|
|
408
|
+
categories?: AXPCategoryListItem[];
|
|
409
|
+
}
|
|
410
|
+
type AXMQueryEntityModel = AXMDataManagementQueryEntityModel;
|
|
411
|
+
|
|
412
|
+
/**
|
|
413
|
+
* Tag entity model
|
|
414
|
+
*/
|
|
415
|
+
interface AXMTag {
|
|
416
|
+
id: string;
|
|
417
|
+
text: string;
|
|
418
|
+
color: string;
|
|
419
|
+
icon?: string;
|
|
420
|
+
description?: string;
|
|
421
|
+
scope: 'system' | 'tenant' | 'user';
|
|
422
|
+
isReadonly?: boolean;
|
|
423
|
+
createdBy?: string;
|
|
424
|
+
createdAt?: Date;
|
|
425
|
+
updatedAt?: Date;
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
export { AXMDataManagementFeatureKeys, AXMDataSourceOutputType, AXMDataSourceType, AXMPermissionsKeys, AXM_COLUMN_DEF_WIDGET, AXPDataManagementMenuKeys, AXPInsightsReportingPermissionKeys, RootConfig, convertStateToValue, convertValueToState, createDefaultGroup };
|
|
429
|
+
export type { AXMDataManagementQueryEntityModel, AXMDataSourceEntityModel, AXMDataSourceFilter, AXMDataSourceOutputTypeOption, AXMDataSourceTypeOption, AXMMetaDataBuilderField, AXMMetaDataBuilderGroup, AXMMetaDataBuilderState, AXMMetaDataBuilderValue, AXMMetaDataDefinitionEntityModel, AXMMetaDataLocalizedString, AXMQueryEntityModel, AXMTag, AXPAggregateOperation, AXPQueryBuilderData, AXPQueryExecutionResult, AXPQueryOutputType, AXPQuerySortRule };
|