@halix/action-sdk 1.0.27 → 1.0.29
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/lib/cjs/data-aggregate.js +174 -4
- package/lib/cjs/data-crud.js +1 -1
- package/lib/cjs/index.js +3 -1
- package/lib/cjs/types/data-aggregate.d.ts +139 -11
- package/lib/cjs/types/data-aggregate.d.ts.map +1 -1
- package/lib/cjs/types/data-crud.d.ts +3 -4
- package/lib/cjs/types/data-crud.d.ts.map +1 -1
- package/lib/cjs/types/index.d.ts +1 -2
- package/lib/cjs/types/index.d.ts.map +1 -1
- package/lib/cjs/types/lists.d.ts +2 -3
- package/lib/cjs/types/lists.d.ts.map +1 -1
- package/lib/esm/data-aggregate.js +173 -4
- package/lib/esm/data-aggregate.js.map +1 -1
- package/lib/esm/data-crud.js +1 -1
- package/lib/esm/data-crud.js.map +1 -1
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/index.mjs +2 -0
- package/lib/esm/lists.js.map +1 -1
- package/lib/esm/types/data-aggregate.d.ts +139 -11
- package/lib/esm/types/data-crud.d.ts +3 -4
- package/lib/esm/types/index.d.ts +1 -2
- package/lib/esm/types/lists.d.ts +2 -3
- package/package.json +1 -1
- package/lib/cjs/filter-expressions.js +0 -10
- package/lib/cjs/types/filter-expressions.d.ts +0 -82
- package/lib/cjs/types/filter-expressions.d.ts.map +0 -1
- package/lib/esm/filter-expressions.js +0 -10
- package/lib/esm/filter-expressions.js.map +0 -1
- package/lib/esm/types/filter-expressions.d.ts +0 -81
|
@@ -20,6 +20,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
20
20
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
21
21
|
};
|
|
22
22
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
+
exports.AggregationResponse = void 0;
|
|
23
24
|
exports.getAggregateData = getAggregateData;
|
|
24
25
|
exports.getAggregateDataAsObservable = getAggregateDataAsObservable;
|
|
25
26
|
/**
|
|
@@ -39,6 +40,164 @@ exports.getAggregateDataAsObservable = getAggregateDataAsObservable;
|
|
|
39
40
|
const axios_1 = __importDefault(require("axios"));
|
|
40
41
|
const rxjs_1 = require("rxjs");
|
|
41
42
|
const sdk_general_1 = require("./sdk-general");
|
|
43
|
+
/**
|
|
44
|
+
* AggregationResponse provides structured access to aggregated data results.
|
|
45
|
+
* Each row contains:
|
|
46
|
+
* - Group fields named after their groupField property
|
|
47
|
+
* - Aggregation fields named as {aggregationType}_{aggregationField} (e.g., "count_objKey", "sum_totalAmount")
|
|
48
|
+
*/
|
|
49
|
+
class AggregationResponse {
|
|
50
|
+
constructor(data) {
|
|
51
|
+
this.rawData = data || [];
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Get the raw data array.
|
|
55
|
+
* @returns Array of aggregation result rows
|
|
56
|
+
*/
|
|
57
|
+
getData() {
|
|
58
|
+
return this.rawData;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Get the number of rows in the aggregated results.
|
|
62
|
+
*/
|
|
63
|
+
get length() {
|
|
64
|
+
return this.rawData.length;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Get a specific row by index.
|
|
68
|
+
* @param index - The row index
|
|
69
|
+
* @returns The row at the specified index, or undefined if out of bounds
|
|
70
|
+
*/
|
|
71
|
+
getRow(index) {
|
|
72
|
+
return this.rawData[index];
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Get a group field value from a specific row.
|
|
76
|
+
* @param row - The aggregation row
|
|
77
|
+
* @param groupField - The name of the group field
|
|
78
|
+
* @returns The group field value
|
|
79
|
+
*/
|
|
80
|
+
getGroup(row, groupField) {
|
|
81
|
+
return row[groupField];
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Get an aggregation value from a specific row.
|
|
85
|
+
* Handles case-insensitive aggregation type matching.
|
|
86
|
+
* @param row - The aggregation row
|
|
87
|
+
* @param aggregationType - The aggregation type (case-insensitive: 'Count', 'Sum', 'Average', etc.)
|
|
88
|
+
* @param aggregationField - The field that was aggregated
|
|
89
|
+
* @returns The aggregation value
|
|
90
|
+
*/
|
|
91
|
+
getAggregation(row, aggregationType, aggregationField) {
|
|
92
|
+
const fieldName = this.getAggregationFieldName(aggregationType, aggregationField);
|
|
93
|
+
return row[fieldName];
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Build the aggregation field name from type and field.
|
|
97
|
+
* @param aggregationType - The aggregation type (case-insensitive)
|
|
98
|
+
* @param field - The field name
|
|
99
|
+
* @returns The aggregation field name in the format {type}_{field}
|
|
100
|
+
*/
|
|
101
|
+
getAggregationFieldName(aggregationType, field) {
|
|
102
|
+
return `${aggregationType.toLowerCase()}_${field}`;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Find rows matching specific group values.
|
|
106
|
+
* @param groupFilters - Object with group field names as keys and desired values
|
|
107
|
+
* @returns Array of matching rows
|
|
108
|
+
*
|
|
109
|
+
* @example
|
|
110
|
+
* // Find all rows where status is "Draft"
|
|
111
|
+
* response.findByGroups({ status: 'Draft' })
|
|
112
|
+
*
|
|
113
|
+
* @example
|
|
114
|
+
* // Find rows where status is "Draft" and homeLanguage is "English"
|
|
115
|
+
* response.findByGroups({ status: 'Draft', homeLanguage: 'English' })
|
|
116
|
+
*/
|
|
117
|
+
findByGroups(groupFilters) {
|
|
118
|
+
return this.rawData.filter(row => {
|
|
119
|
+
return Object.entries(groupFilters).every(([field, value]) => row[field] === value);
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Get a specific aggregation value for rows matching group filters.
|
|
124
|
+
* @param groupFilters - Object with group field names as keys and desired values
|
|
125
|
+
* @param aggregationType - The aggregation type (case-insensitive)
|
|
126
|
+
* @param aggregationField - The field that was aggregated
|
|
127
|
+
* @returns The aggregation value from the first matching row, or undefined if no match
|
|
128
|
+
*
|
|
129
|
+
* @example
|
|
130
|
+
* // Get count of objKey for Draft status and English homeLanguage
|
|
131
|
+
* response.getAggregationValue(
|
|
132
|
+
* { status: 'Draft', homeLanguage: 'English' },
|
|
133
|
+
* 'Count',
|
|
134
|
+
* 'objKey'
|
|
135
|
+
* )
|
|
136
|
+
*/
|
|
137
|
+
getAggregationValue(groupFilters, aggregationType, aggregationField) {
|
|
138
|
+
const row = this.findByGroups(groupFilters)[0];
|
|
139
|
+
return row ? this.getAggregation(row, aggregationType, aggregationField) : undefined;
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* Iterate over all rows with a callback function.
|
|
143
|
+
* @param callback - Function to execute for each row
|
|
144
|
+
*/
|
|
145
|
+
forEach(callback) {
|
|
146
|
+
this.rawData.forEach(callback);
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Map aggregation rows to a new array.
|
|
150
|
+
* @param callback - Function to transform each row
|
|
151
|
+
* @returns New array of transformed values
|
|
152
|
+
*/
|
|
153
|
+
map(callback) {
|
|
154
|
+
return this.rawData.map(callback);
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Filter aggregation rows.
|
|
158
|
+
* @param predicate - Function to test each row
|
|
159
|
+
* @returns New array of rows that pass the test
|
|
160
|
+
*/
|
|
161
|
+
filter(predicate) {
|
|
162
|
+
return this.rawData.filter(predicate);
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Make the response iterable for use in for...of loops.
|
|
166
|
+
*/
|
|
167
|
+
[Symbol.iterator]() {
|
|
168
|
+
return this.rawData[Symbol.iterator]();
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Get all unique values for a specific group field across all rows.
|
|
172
|
+
* @param groupField - The group field name
|
|
173
|
+
* @returns Array of unique values (excluding null/undefined)
|
|
174
|
+
*/
|
|
175
|
+
getUniqueGroupValues(groupField) {
|
|
176
|
+
const values = new Set();
|
|
177
|
+
this.rawData.forEach(row => {
|
|
178
|
+
const value = row[groupField];
|
|
179
|
+
if (value !== null && value !== undefined) {
|
|
180
|
+
values.add(value);
|
|
181
|
+
}
|
|
182
|
+
});
|
|
183
|
+
return Array.from(values);
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Calculate the sum of a specific aggregation across all rows.
|
|
187
|
+
* Useful for totaling aggregated values.
|
|
188
|
+
* @param aggregationType - The aggregation type
|
|
189
|
+
* @param aggregationField - The field that was aggregated
|
|
190
|
+
* @returns Sum of the aggregation values, or 0 if no valid values
|
|
191
|
+
*/
|
|
192
|
+
sumAggregation(aggregationType, aggregationField) {
|
|
193
|
+
const fieldName = this.getAggregationFieldName(aggregationType, aggregationField);
|
|
194
|
+
return this.rawData.reduce((sum, row) => {
|
|
195
|
+
const value = row[fieldName];
|
|
196
|
+
return sum + (typeof value === 'number' ? value : 0);
|
|
197
|
+
}, 0);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
exports.AggregationResponse = AggregationResponse;
|
|
42
201
|
// ================================================================================
|
|
43
202
|
// DATA AGGREGATION FUNCTIONS
|
|
44
203
|
// ================================================================================
|
|
@@ -47,10 +206,10 @@ const sdk_general_1 = require("./sdk-general");
|
|
|
47
206
|
* Supports filtering, grouping with transforms, sorting, and multiple aggregations.
|
|
48
207
|
*
|
|
49
208
|
* @param request - Aggregation configuration including dataElementId, parent scope, groups, aggregations
|
|
50
|
-
* @returns Promise<AggregationResponse>
|
|
209
|
+
* @returns Promise<AggregationResponse> - A class instance providing structured access to aggregated data
|
|
51
210
|
*
|
|
52
211
|
* @example
|
|
53
|
-
* const
|
|
212
|
+
* const result = await getAggregateData({
|
|
54
213
|
* dataElementId: 'order',
|
|
55
214
|
* parentDataElementId: 'company',
|
|
56
215
|
* parentKey: orgProxyKey,
|
|
@@ -66,6 +225,14 @@ const sdk_general_1 = require("./sdk-general");
|
|
|
66
225
|
* aggregationField: 'totalAmount'
|
|
67
226
|
* }]
|
|
68
227
|
* });
|
|
228
|
+
*
|
|
229
|
+
* // Access aggregation values
|
|
230
|
+
* const count = result.getAggregationValue({ status: 'Draft' }, 'Count', 'objKey');
|
|
231
|
+
*
|
|
232
|
+
* // Iterate over results
|
|
233
|
+
* for (const row of result) {
|
|
234
|
+
* console.log(row.status, result.getAggregation(row, 'Sum', 'totalAmount'));
|
|
235
|
+
* }
|
|
69
236
|
*/
|
|
70
237
|
function getAggregateData(request) {
|
|
71
238
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -83,7 +250,7 @@ function getAggregateData(request) {
|
|
|
83
250
|
console.log("Sending POST request to " + url + " with token " + authToken);
|
|
84
251
|
// Make the API request
|
|
85
252
|
let response = yield axios_1.default.post(url, request, { headers });
|
|
86
|
-
return response.data;
|
|
253
|
+
return new AggregationResponse(response.data.data);
|
|
87
254
|
});
|
|
88
255
|
}
|
|
89
256
|
/**
|
|
@@ -94,7 +261,10 @@ function getAggregateData(request) {
|
|
|
94
261
|
* dataElementId: 'order',
|
|
95
262
|
* groups: [{ groupField: 'status', groupDirection: 'asc' }],
|
|
96
263
|
* aggregations: [{ aggregation: 'Count', aggregationField: 'objKey' }]
|
|
97
|
-
* }).subscribe(
|
|
264
|
+
* }).subscribe(result => {
|
|
265
|
+
* console.log('Total rows:', result.length);
|
|
266
|
+
* result.forEach(row => console.log(result.getAggregation(row, 'Count', 'objKey')));
|
|
267
|
+
* });
|
|
98
268
|
*/
|
|
99
269
|
function getAggregateDataAsObservable(request) {
|
|
100
270
|
return (0, rxjs_1.from)(getAggregateData(request));
|
package/lib/cjs/data-crud.js
CHANGED
|
@@ -90,7 +90,7 @@ function getObjectAsObservable(dataElementId, key, fetchedRelationships) {
|
|
|
90
90
|
* @param parentElementId - Parent element ID
|
|
91
91
|
* @param parentKey - Parent object key
|
|
92
92
|
* @param elementId - Child element ID
|
|
93
|
-
* @param filter - Optional filter
|
|
93
|
+
* @param filter - Optional filter; call `dataexpr_agent` to generate the filter expression.
|
|
94
94
|
* @param fetchedRelationships - Optional relationships to include as nested objects
|
|
95
95
|
* @returns Promise<any[]>
|
|
96
96
|
*/
|
package/lib/cjs/index.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
// Unauthorized use outside the Halix platform is prohibited.
|
|
9
9
|
// Full license terms available in the LICENSE file.
|
|
10
10
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
-
exports.debounceFn = exports.getValueFromObject = exports.compareValues = exports.sortObjectArray = exports.getAggregateDataAsObservable = exports.getAggregateData = exports.massDeleteAsObservable = exports.massDelete = exports.massEditAsObservable = exports.massEdit = exports.getListDataAsObservable = exports.getListData = exports.getPreferenceAsObservable = exports.getPreference = exports.sendMessageAsObservable = exports.sendMessage = exports.MessageMethod = exports.createOrUpdateResourceAsObservable = exports.createOrUpdateResource = exports.sendFileContentsAsObservable = exports.sendFileContents = exports.saveResourceAsObservable = exports.saveResource = exports.getOrCreateResourceAsObservable = exports.getOrCreateResource = exports.deleteRelatedObjectsAsObservable = exports.deleteRelatedObjects = exports.deleteRelatedObjectAsObservable = exports.deleteRelatedObject = exports.saveRelatedObjectAsObservable = exports.saveRelatedObject = exports.getRelatedObjectsAsObservable = exports.getRelatedObjects = exports.getObjectAsObservable = exports.getObject = exports.prepareErrorResponse = exports.prepareSuccessResponse = exports.initialize = exports.useBody = exports.params = exports.userContext = exports.actionSubject = exports.serviceAddress = exports.sandboxKey = exports.getAuthToken = void 0;
|
|
11
|
+
exports.debounceFn = exports.getValueFromObject = exports.compareValues = exports.sortObjectArray = exports.getAggregateDataAsObservable = exports.getAggregateData = exports.AggregationResponse = exports.massDeleteAsObservable = exports.massDelete = exports.massEditAsObservable = exports.massEdit = exports.getListDataAsObservable = exports.getListData = exports.getPreferenceAsObservable = exports.getPreference = exports.sendMessageAsObservable = exports.sendMessage = exports.MessageMethod = exports.createOrUpdateResourceAsObservable = exports.createOrUpdateResource = exports.sendFileContentsAsObservable = exports.sendFileContents = exports.saveResourceAsObservable = exports.saveResource = exports.getOrCreateResourceAsObservable = exports.getOrCreateResource = exports.deleteRelatedObjectsAsObservable = exports.deleteRelatedObjects = exports.deleteRelatedObjectAsObservable = exports.deleteRelatedObject = exports.saveRelatedObjectAsObservable = exports.saveRelatedObject = exports.getRelatedObjectsAsObservable = exports.getRelatedObjects = exports.getObjectAsObservable = exports.getObject = exports.prepareErrorResponse = exports.prepareSuccessResponse = exports.initialize = exports.useBody = exports.params = exports.userContext = exports.actionSubject = exports.serviceAddress = exports.sandboxKey = exports.getAuthToken = void 0;
|
|
12
12
|
/**
|
|
13
13
|
* @module @halix/action-sdk
|
|
14
14
|
* @description Halix Platform action SDK for developing NodeJS Lambda-based actions on the Halix
|
|
@@ -92,6 +92,8 @@ Object.defineProperty(exports, "massDeleteAsObservable", { enumerable: true, get
|
|
|
92
92
|
// DATA AGGREGATE FUNCTIONS
|
|
93
93
|
// ================================================================================
|
|
94
94
|
var data_aggregate_1 = require("./data-aggregate");
|
|
95
|
+
// Classes
|
|
96
|
+
Object.defineProperty(exports, "AggregationResponse", { enumerable: true, get: function () { return data_aggregate_1.AggregationResponse; } });
|
|
95
97
|
// Functions
|
|
96
98
|
Object.defineProperty(exports, "getAggregateData", { enumerable: true, get: function () { return data_aggregate_1.getAggregateData; } });
|
|
97
99
|
Object.defineProperty(exports, "getAggregateDataAsObservable", { enumerable: true, get: function () { return data_aggregate_1.getAggregateDataAsObservable; } });
|
|
@@ -62,20 +62,20 @@ export interface AggregationRequest {
|
|
|
62
62
|
* The ID of the parent data element that defines the overall scope of records.
|
|
63
63
|
* The dataElementId must be related to this through a foreign key or key array.
|
|
64
64
|
*/
|
|
65
|
-
parentDataElementId
|
|
65
|
+
parentDataElementId: string;
|
|
66
66
|
/**
|
|
67
67
|
* The key of a parent object that all records must be related to.
|
|
68
68
|
* Works with parentDataElementId to scope results.
|
|
69
69
|
*/
|
|
70
|
-
parentKey
|
|
70
|
+
parentKey: string;
|
|
71
71
|
/**
|
|
72
72
|
* Optional field to specify the foreign key field on the data element that defines
|
|
73
73
|
* the relationship to the parent. If omitted, a derived key is assumed.
|
|
74
74
|
*/
|
|
75
75
|
parentKeyField?: string;
|
|
76
76
|
/**
|
|
77
|
-
* Filter expression to limit records before aggregation.
|
|
78
|
-
*
|
|
77
|
+
* Filter expression to limit records before aggregation. Call `dataexpr_agent` to generate the
|
|
78
|
+
* filter expression.
|
|
79
79
|
*/
|
|
80
80
|
filter?: string;
|
|
81
81
|
/**
|
|
@@ -94,21 +94,138 @@ export interface AggregationRequest {
|
|
|
94
94
|
aggregations: Aggregation[];
|
|
95
95
|
}
|
|
96
96
|
/**
|
|
97
|
-
*
|
|
97
|
+
* AggregationRow represents a single row in the aggregated results.
|
|
98
|
+
* Contains dynamic fields for groups and aggregations.
|
|
98
99
|
*/
|
|
99
|
-
export interface
|
|
100
|
-
|
|
101
|
-
|
|
100
|
+
export interface AggregationRow {
|
|
101
|
+
[key: string]: any;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* AggregationResponse provides structured access to aggregated data results.
|
|
105
|
+
* Each row contains:
|
|
106
|
+
* - Group fields named after their groupField property
|
|
107
|
+
* - Aggregation fields named as {aggregationType}_{aggregationField} (e.g., "count_objKey", "sum_totalAmount")
|
|
108
|
+
*/
|
|
109
|
+
export declare class AggregationResponse {
|
|
110
|
+
private rawData;
|
|
111
|
+
constructor(data: AggregationRow[]);
|
|
112
|
+
/**
|
|
113
|
+
* Get the raw data array.
|
|
114
|
+
* @returns Array of aggregation result rows
|
|
115
|
+
*/
|
|
116
|
+
getData(): AggregationRow[];
|
|
117
|
+
/**
|
|
118
|
+
* Get the number of rows in the aggregated results.
|
|
119
|
+
*/
|
|
120
|
+
get length(): number;
|
|
121
|
+
/**
|
|
122
|
+
* Get a specific row by index.
|
|
123
|
+
* @param index - The row index
|
|
124
|
+
* @returns The row at the specified index, or undefined if out of bounds
|
|
125
|
+
*/
|
|
126
|
+
getRow(index: number): AggregationRow | undefined;
|
|
127
|
+
/**
|
|
128
|
+
* Get a group field value from a specific row.
|
|
129
|
+
* @param row - The aggregation row
|
|
130
|
+
* @param groupField - The name of the group field
|
|
131
|
+
* @returns The group field value
|
|
132
|
+
*/
|
|
133
|
+
getGroup(row: AggregationRow, groupField: string): any;
|
|
134
|
+
/**
|
|
135
|
+
* Get an aggregation value from a specific row.
|
|
136
|
+
* Handles case-insensitive aggregation type matching.
|
|
137
|
+
* @param row - The aggregation row
|
|
138
|
+
* @param aggregationType - The aggregation type (case-insensitive: 'Count', 'Sum', 'Average', etc.)
|
|
139
|
+
* @param aggregationField - The field that was aggregated
|
|
140
|
+
* @returns The aggregation value
|
|
141
|
+
*/
|
|
142
|
+
getAggregation(row: AggregationRow, aggregationType: AggregationType | string, aggregationField: string): any;
|
|
143
|
+
/**
|
|
144
|
+
* Build the aggregation field name from type and field.
|
|
145
|
+
* @param aggregationType - The aggregation type (case-insensitive)
|
|
146
|
+
* @param field - The field name
|
|
147
|
+
* @returns The aggregation field name in the format {type}_{field}
|
|
148
|
+
*/
|
|
149
|
+
private getAggregationFieldName;
|
|
150
|
+
/**
|
|
151
|
+
* Find rows matching specific group values.
|
|
152
|
+
* @param groupFilters - Object with group field names as keys and desired values
|
|
153
|
+
* @returns Array of matching rows
|
|
154
|
+
*
|
|
155
|
+
* @example
|
|
156
|
+
* // Find all rows where status is "Draft"
|
|
157
|
+
* response.findByGroups({ status: 'Draft' })
|
|
158
|
+
*
|
|
159
|
+
* @example
|
|
160
|
+
* // Find rows where status is "Draft" and homeLanguage is "English"
|
|
161
|
+
* response.findByGroups({ status: 'Draft', homeLanguage: 'English' })
|
|
162
|
+
*/
|
|
163
|
+
findByGroups(groupFilters: {
|
|
164
|
+
[groupField: string]: any;
|
|
165
|
+
}): AggregationRow[];
|
|
166
|
+
/**
|
|
167
|
+
* Get a specific aggregation value for rows matching group filters.
|
|
168
|
+
* @param groupFilters - Object with group field names as keys and desired values
|
|
169
|
+
* @param aggregationType - The aggregation type (case-insensitive)
|
|
170
|
+
* @param aggregationField - The field that was aggregated
|
|
171
|
+
* @returns The aggregation value from the first matching row, or undefined if no match
|
|
172
|
+
*
|
|
173
|
+
* @example
|
|
174
|
+
* // Get count of objKey for Draft status and English homeLanguage
|
|
175
|
+
* response.getAggregationValue(
|
|
176
|
+
* { status: 'Draft', homeLanguage: 'English' },
|
|
177
|
+
* 'Count',
|
|
178
|
+
* 'objKey'
|
|
179
|
+
* )
|
|
180
|
+
*/
|
|
181
|
+
getAggregationValue(groupFilters: {
|
|
182
|
+
[groupField: string]: any;
|
|
183
|
+
}, aggregationType: AggregationType | string, aggregationField: string): any;
|
|
184
|
+
/**
|
|
185
|
+
* Iterate over all rows with a callback function.
|
|
186
|
+
* @param callback - Function to execute for each row
|
|
187
|
+
*/
|
|
188
|
+
forEach(callback: (row: AggregationRow, index: number) => void): void;
|
|
189
|
+
/**
|
|
190
|
+
* Map aggregation rows to a new array.
|
|
191
|
+
* @param callback - Function to transform each row
|
|
192
|
+
* @returns New array of transformed values
|
|
193
|
+
*/
|
|
194
|
+
map<T>(callback: (row: AggregationRow, index: number) => T): T[];
|
|
195
|
+
/**
|
|
196
|
+
* Filter aggregation rows.
|
|
197
|
+
* @param predicate - Function to test each row
|
|
198
|
+
* @returns New array of rows that pass the test
|
|
199
|
+
*/
|
|
200
|
+
filter(predicate: (row: AggregationRow, index: number) => boolean): AggregationRow[];
|
|
201
|
+
/**
|
|
202
|
+
* Make the response iterable for use in for...of loops.
|
|
203
|
+
*/
|
|
204
|
+
[Symbol.iterator](): Iterator<AggregationRow>;
|
|
205
|
+
/**
|
|
206
|
+
* Get all unique values for a specific group field across all rows.
|
|
207
|
+
* @param groupField - The group field name
|
|
208
|
+
* @returns Array of unique values (excluding null/undefined)
|
|
209
|
+
*/
|
|
210
|
+
getUniqueGroupValues(groupField: string): any[];
|
|
211
|
+
/**
|
|
212
|
+
* Calculate the sum of a specific aggregation across all rows.
|
|
213
|
+
* Useful for totaling aggregated values.
|
|
214
|
+
* @param aggregationType - The aggregation type
|
|
215
|
+
* @param aggregationField - The field that was aggregated
|
|
216
|
+
* @returns Sum of the aggregation values, or 0 if no valid values
|
|
217
|
+
*/
|
|
218
|
+
sumAggregation(aggregationType: AggregationType | string, aggregationField: string): number;
|
|
102
219
|
}
|
|
103
220
|
/**
|
|
104
221
|
* Performs data aggregation operations (count, sum, average, etc.) on grouped data.
|
|
105
222
|
* Supports filtering, grouping with transforms, sorting, and multiple aggregations.
|
|
106
223
|
*
|
|
107
224
|
* @param request - Aggregation configuration including dataElementId, parent scope, groups, aggregations
|
|
108
|
-
* @returns Promise<AggregationResponse>
|
|
225
|
+
* @returns Promise<AggregationResponse> - A class instance providing structured access to aggregated data
|
|
109
226
|
*
|
|
110
227
|
* @example
|
|
111
|
-
* const
|
|
228
|
+
* const result = await getAggregateData({
|
|
112
229
|
* dataElementId: 'order',
|
|
113
230
|
* parentDataElementId: 'company',
|
|
114
231
|
* parentKey: orgProxyKey,
|
|
@@ -124,6 +241,14 @@ export interface AggregationResponse {
|
|
|
124
241
|
* aggregationField: 'totalAmount'
|
|
125
242
|
* }]
|
|
126
243
|
* });
|
|
244
|
+
*
|
|
245
|
+
* // Access aggregation values
|
|
246
|
+
* const count = result.getAggregationValue({ status: 'Draft' }, 'Count', 'objKey');
|
|
247
|
+
*
|
|
248
|
+
* // Iterate over results
|
|
249
|
+
* for (const row of result) {
|
|
250
|
+
* console.log(row.status, result.getAggregation(row, 'Sum', 'totalAmount'));
|
|
251
|
+
* }
|
|
127
252
|
*/
|
|
128
253
|
export declare function getAggregateData(request: AggregationRequest): Promise<AggregationResponse>;
|
|
129
254
|
/**
|
|
@@ -134,7 +259,10 @@ export declare function getAggregateData(request: AggregationRequest): Promise<A
|
|
|
134
259
|
* dataElementId: 'order',
|
|
135
260
|
* groups: [{ groupField: 'status', groupDirection: 'asc' }],
|
|
136
261
|
* aggregations: [{ aggregation: 'Count', aggregationField: 'objKey' }]
|
|
137
|
-
* }).subscribe(
|
|
262
|
+
* }).subscribe(result => {
|
|
263
|
+
* console.log('Total rows:', result.length);
|
|
264
|
+
* result.forEach(row => console.log(result.getAggregation(row, 'Count', 'objKey')));
|
|
265
|
+
* });
|
|
138
266
|
*/
|
|
139
267
|
export declare function getAggregateDataAsObservable(request: AggregationRequest): Observable<AggregationResponse>;
|
|
140
268
|
//# sourceMappingURL=data-aggregate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-aggregate.d.ts","sourceRoot":"","sources":["../../../src/data-aggregate.ts"],"names":[],"mappings":"AAyBA,OAAO,EAAQ,UAAU,EAAiB,MAAM,MAAM,CAAC;AAOvD;;GAEG;AACH,MAAM,MAAM,aAAa,GACnB,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,KAAK,GAAG,MAAM,GAAG,QAAQ,GACrD,WAAW,CAAC;AAElB;;GAEG;AACH,MAAM,MAAM,eAAe,GACrB,SAAS,GAAG,OAAO,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,QAAQ,CAAC;AAE7D;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACtC,2CAA2C;IAC3C,SAAS,EAAE,aAAa,CAAC;IACzB,gDAAgD;IAChD,IAAI,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;CACjC;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC7B,iGAAiG;IACjG,UAAU,EAAE,MAAM,CAAC;IACnB,sDAAsD;IACtD,cAAc,EAAE,KAAK,GAAG,MAAM,CAAC;IAC/B,yDAAyD;IACzD,UAAU,CAAC,EAAE,yBAAyB,EAAE,CAAC;CAC5C;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC5B,sEAAsE;IACtE,SAAS,EAAE,MAAM,CAAC;IAClB,uCAAuC;IACvC,aAAa,EAAE,KAAK,GAAG,MAAM,CAAC;IAC9B,iFAAiF;IACjF,eAAe,EAAE,eAAe,CAAC;CACpC;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IACxB,4FAA4F;IAC5F,WAAW,EAAE,eAAe,CAAC;I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E;IAMlF;;;;;;;;;;;;;;OAcG;IACI,mBAAmB,CACtB,YAAY,EAAE;QAAE,CAAC,UAAU,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,EAC3C,eAAe,EAAE,eAAe,GAAG,MAAM,EACzC,gBAAgB,EAAE,MAAM,GACzB,GAAG;IAKN;;;OAGG;IACI,OAAO,CAAC,QAAQ,EAAE,CAAC,GAAG,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,GAAG,IAAI;IAI5E;;;;OAIG;IACI,GAAG,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,GAAG,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,KAAK,CAAC,GAAG,CAAC,EAAE;IAIvE;;;;OAIG;IACI,MAAM,CAAC,SAAS,EAAE,CAAC,GAAG,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,GAAG,cAAc,EAAE;IAI3F;;OAEG;IACI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,cAAc,CAAC;IAIpD;;;;OAIG;IACI,oBAAoB,CAAC,UAAU,EAAE,MAAM,GAAG,GAAG,EAAE;IAWtD;;;;;;OAMG;IACI,cAAc,CAAC,eAAe,EAAE,eAAe,GAAG,MAAM,EAAE,gBAAgB,EAAE,MAAM,GAAG,MAAM;CAOrG;AAMD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAqBhG;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,kBAAkB,GAAG,UAAU,CAAC,mBAAmB,CAAC,CAEzG"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
|
-
import { FilterExpression } from './filter-expressions';
|
|
3
2
|
/**
|
|
4
3
|
* SaveOptions is an interface for specifying save operation options.
|
|
5
4
|
*/
|
|
@@ -23,15 +22,15 @@ export declare function getObjectAsObservable(dataElementId: string, key: string
|
|
|
23
22
|
* @param parentElementId - Parent element ID
|
|
24
23
|
* @param parentKey - Parent object key
|
|
25
24
|
* @param elementId - Child element ID
|
|
26
|
-
* @param filter - Optional filter
|
|
25
|
+
* @param filter - Optional filter; call `dataexpr_agent` to generate the filter expression.
|
|
27
26
|
* @param fetchedRelationships - Optional relationships to include as nested objects
|
|
28
27
|
* @returns Promise<any[]>
|
|
29
28
|
*/
|
|
30
|
-
export declare function getRelatedObjects(parentElementId: string, parentKey: string, elementId: string, filter?:
|
|
29
|
+
export declare function getRelatedObjects(parentElementId: string, parentKey: string, elementId: string, filter?: string, fetchedRelationships?: string[]): Promise<any[]>;
|
|
31
30
|
/**
|
|
32
31
|
* Observable version of getRelatedObjects. See getRelatedObjects for details.
|
|
33
32
|
*/
|
|
34
|
-
export declare function getRelatedObjectsAsObservable(parentElementId: string, parentKey: string, elementId: string, filter?:
|
|
33
|
+
export declare function getRelatedObjectsAsObservable(parentElementId: string, parentKey: string, elementId: string, filter?: string, fetchedRelationships?: string[]): Observable<any[]>;
|
|
35
34
|
/**
|
|
36
35
|
* Saves a related object and establishes relationship to parent. Returns saved object with any server-assigned values (objKey, calculated fields).
|
|
37
36
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-crud.d.ts","sourceRoot":"","sources":["../../../src/data-crud.ts"],"names":[],"mappings":"AAuBA,OAAO,EAAQ,UAAU,EAAiB,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"data-crud.d.ts","sourceRoot":"","sources":["../../../src/data-crud.ts"],"names":[],"mappings":"AAuBA,OAAO,EAAQ,UAAU,EAAiB,MAAM,MAAM,CAAC;AAOvD;;GAEG;AACH,MAAM,WAAW,WAAW;IACxB,mCAAmC;IACnC,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAMD;;;;GAIG;AACH,wBAAsB,SAAS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AM,GAAG,OAAO,CAAC,OAAO,CAAC,CAsBhJ;AAED;;GAEG;AACH,wBAAgB,+BAA+B,CAAC,eAAe,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,UAAU,CAAC,OAAO,CAAC,CAEzJ;AAED;;;;;GAKG;AACH,wBAAsB,oBAAoB,CAAC,eAAe,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAuBpJ;AAED;;GAEG;AACH,wBAAgB,gCAAgC,CAAC,eAAe,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,UAAU,CAAC,OAAO,CAAC,CAE7J"}
|
package/lib/cjs/types/index.d.ts
CHANGED
|
@@ -8,8 +8,7 @@ export { type SaveOptions, getObject, getObjectAsObservable, getRelatedObjects,
|
|
|
8
8
|
export { type ContentResource, getOrCreateResource, getOrCreateResourceAsObservable, saveResource, saveResourceAsObservable, sendFileContents, sendFileContentsAsObservable, createOrUpdateResource, createOrUpdateResourceAsObservable } from './content';
|
|
9
9
|
export { MessageMethod, type MessageRequest, sendMessage, sendMessageAsObservable } from './messaging';
|
|
10
10
|
export { getPreference, getPreferenceAsObservable } from './preferences';
|
|
11
|
-
export { type FilterExpression } from './filter-expressions';
|
|
12
11
|
export { type SortField, type DataSortField, type BaseListDataRequest, type PagedListDataRequest, type ListDataResponse, type ListDataOptions, type ListDataSearchOptions, type MassEditValueType, type MassEditRequest, type MassDeleteRequest, type MassChangeResponse, getListData, getListDataAsObservable, massEdit, massEditAsObservable, massDelete, massDeleteAsObservable } from './lists';
|
|
13
|
-
export { type AggregationRequest, type
|
|
12
|
+
export { AggregationResponse, type AggregationRequest, type AggregationRow, type AggregationGroup, type AggregationSort, type Aggregation, type AggregationGroupTransform, type TransformType, type AggregationType, getAggregateData, getAggregateDataAsObservable } from './data-aggregate';
|
|
14
13
|
export { sortObjectArray, compareValues, getValueFromObject, debounceFn } from './utilities';
|
|
15
14
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AASA;;;;GAIG;AAMH,OAAO,EAEH,YAAY,EACZ,UAAU,EACV,cAAc,EACd,aAAa,EACb,WAAW,EACX,MAAM,EACN,OAAO,EAGP,UAAU,EAGV,KAAK,WAAW,EAChB,KAAK,iBAAiB,EAGtB,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,0BAA0B,EAC/B,KAAK,0BAA0B,EAC/B,KAAK,wBAAwB,EAC7B,KAAK,6BAA6B,EAClC,KAAK,yBAAyB,EAC9B,KAAK,aAAa,EAGlB,sBAAsB,EACtB,oBAAoB,EACvB,MAAM,eAAe,CAAC;AAMvB,OAAO,EAEH,KAAK,WAAW,EAGhB,SAAS,EACT,qBAAqB,EACrB,iBAAiB,EACjB,6BAA6B,EAG7B,iBAAiB,EACjB,6BAA6B,EAG7B,mBAAmB,EACnB,+BAA+B,EAC/B,oBAAoB,EACpB,gCAAgC,EACnC,MAAM,aAAa,CAAC;AAMrB,OAAO,EAEH,KAAK,eAAe,EAGpB,mBAAmB,EACnB,+BAA+B,EAC/B,YAAY,EACZ,wBAAwB,EACxB,gBAAgB,EAChB,4BAA4B,EAC5B,sBAAsB,EACtB,kCAAkC,EACrC,MAAM,WAAW,CAAC;AAMnB,OAAO,EAEH,aAAa,EAGb,KAAK,cAAc,EAGnB,WAAW,EACX,uBAAuB,EAC1B,MAAM,aAAa,CAAC;AAMrB,OAAO,EAEH,aAAa,EACb,yBAAyB,EAC5B,MAAM,eAAe,CAAC;AAMvB,OAAO,
|
|
1
|
+
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AAkB,EAGvB,WAAW,EACX,uBAAuB,EACvB,QAAQ,EACR,oBAAoB,EACpB,UAAU,EACV,sBAAsB,EACzB,MAAM,SAAS,CAAC;AAMjB,OAAO,EAEH,mBAAmB,EAGnB,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,yBAAyB,EAC9B,KAAK,aAAa,EAClB,KAAK,eAAe,EAGpB,gBAAgB,EAChB,4BAA4B,EAC/B,MAAM,kBAAkB,CAAC;AAM1B,OAAO,EACH,eAAe,EACf,aAAa,EACb,kBAAkB,EAClB,UAAU,EACb,MAAM,aAAa,CAAC"}
|
package/lib/cjs/types/lists.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
|
-
import { FilterExpression } from './filter-expressions';
|
|
3
2
|
/**
|
|
4
3
|
* SortField is an interface for specifying sort fields.
|
|
5
4
|
*/
|
|
@@ -60,9 +59,9 @@ export interface BaseListDataRequest {
|
|
|
60
59
|
childKeysField?: string;
|
|
61
60
|
/**
|
|
62
61
|
* Filter expression to limit results. Evaluated within the parent key scope.
|
|
63
|
-
*
|
|
62
|
+
* Call `dataexpr_agent` to generate the filter expression.
|
|
64
63
|
*/
|
|
65
|
-
filter?:
|
|
64
|
+
filter?: string;
|
|
66
65
|
/**
|
|
67
66
|
* List of fields being displayed on the list. Only these fields are populated in
|
|
68
67
|
* returned objects to reduce payload size. If fields include relationship paths,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lists.d.ts","sourceRoot":"","sources":["../../../src/lists.ts"],"names":[],"mappings":"AA2BA,OAAO,EAAQ,UAAU,EAAiB,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"lists.d.ts","sourceRoot":"","sources":["../../../src/lists.ts"],"names":[],"mappings":"AA2BA,OAAO,EAAQ,UAAU,EAAiB,MAAM,MAAM,CAAC;AA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