@uipath/uipath-typescript 1.4.1 → 1.5.0
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/dist/agent-memory/index.d.ts +4 -1
- package/dist/agents/index.cjs +341 -6
- package/dist/agents/index.d.ts +717 -16
- package/dist/agents/index.mjs +342 -7
- package/dist/assets/index.cjs +25 -9
- package/dist/assets/index.mjs +25 -9
- package/dist/attachments/index.cjs +25 -9
- package/dist/attachments/index.mjs +25 -9
- package/dist/buckets/index.cjs +25 -9
- package/dist/buckets/index.mjs +25 -9
- package/dist/cases/index.cjs +621 -524
- package/dist/cases/index.d.ts +186 -43
- package/dist/cases/index.mjs +621 -524
- package/dist/conversational-agent/index.cjs +25 -9
- package/dist/conversational-agent/index.mjs +25 -9
- package/dist/core/index.cjs +1 -1
- package/dist/core/index.mjs +1 -1
- package/dist/document-understanding/index.cjs +84 -84
- package/dist/document-understanding/index.d.ts +2 -1
- package/dist/document-understanding/index.mjs +1 -1
- package/dist/entities/index.cjs +25 -9
- package/dist/entities/index.mjs +25 -9
- package/dist/feedback/index.cjs +25 -9
- package/dist/feedback/index.mjs +25 -9
- package/dist/index.cjs +332 -62
- package/dist/index.d.ts +827 -89
- package/dist/index.mjs +333 -63
- package/dist/index.umd.js +332 -62
- package/dist/jobs/index.cjs +129 -14
- package/dist/jobs/index.d.ts +10 -5
- package/dist/jobs/index.mjs +129 -14
- package/dist/maestro-processes/index.cjs +198 -100
- package/dist/maestro-processes/index.d.ts +188 -43
- package/dist/maestro-processes/index.mjs +198 -100
- package/dist/processes/index.cjs +25 -9
- package/dist/processes/index.d.ts +6 -1
- package/dist/processes/index.mjs +25 -9
- package/dist/queues/index.cjs +25 -9
- package/dist/queues/index.mjs +25 -9
- package/dist/tasks/index.cjs +25 -9
- package/dist/tasks/index.d.ts +4 -1
- package/dist/tasks/index.mjs +25 -9
- package/dist/traces/index.cjs +2 -2
- package/dist/traces/index.d.ts +3 -3
- package/dist/traces/index.mjs +2 -2
- package/package.json +1 -1
package/dist/feedback/index.cjs
CHANGED
|
@@ -966,7 +966,16 @@ const BUCKET_TOKEN_PARAMS = {
|
|
|
966
966
|
* Returns the original value if parsing fails.
|
|
967
967
|
*/
|
|
968
968
|
/**
|
|
969
|
-
* Transforms data by
|
|
969
|
+
* Transforms data by renaming each key in `data` exactly once, using the
|
|
970
|
+
* mapping (`sourceField → targetField`). Keys not present in the mapping
|
|
971
|
+
* pass through unchanged. The original (pre-rename) key is dropped — the
|
|
972
|
+
* result contains only the renamed key.
|
|
973
|
+
*
|
|
974
|
+
* Each rename is independent. If the mapping happens to contain chained
|
|
975
|
+
* entries (`a → b` and `b → c`), they do NOT compose: a field named `a`
|
|
976
|
+
* in `data` becomes `b` (not `c`), because the renames are applied based
|
|
977
|
+
* on the original data's keys, not the running result.
|
|
978
|
+
*
|
|
970
979
|
* @param data The source data to transform
|
|
971
980
|
* @param fieldMapping Object mapping source field names to target field names
|
|
972
981
|
* @returns Transformed data with mapped field names
|
|
@@ -989,21 +998,28 @@ const BUCKET_TOKEN_PARAMS = {
|
|
|
989
998
|
* // { userId: '123', name: 'john' },
|
|
990
999
|
* // { userId: '456', name: 'jane' }
|
|
991
1000
|
* // ]
|
|
1001
|
+
*
|
|
1002
|
+
* // No chaining — `a → b` does not become `a → c` even if the map has `b → c`.
|
|
1003
|
+
* transformData({ a: 1 }, { a: 'b', b: 'c' });
|
|
1004
|
+
* // result = { b: 1 }
|
|
992
1005
|
* ```
|
|
993
1006
|
*/
|
|
994
1007
|
function transformData(data, fieldMapping) {
|
|
1008
|
+
// Pass null/undefined through unchanged — callers (e.g. AttachmentService.getById)
|
|
1009
|
+
// may invoke this on optional fields that an OData `select` excluded.
|
|
1010
|
+
if (data == null) {
|
|
1011
|
+
return data;
|
|
1012
|
+
}
|
|
995
1013
|
// Handle array of objects
|
|
996
1014
|
if (Array.isArray(data)) {
|
|
997
1015
|
return data.map(item => transformData(item, fieldMapping));
|
|
998
1016
|
}
|
|
999
|
-
//
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
result[targetField] = value;
|
|
1006
|
-
}
|
|
1017
|
+
// Walk the ORIGINAL data's keys, look up each in the mapping. One rename
|
|
1018
|
+
// per data key — no mutation of an in-progress result, so chains can't form.
|
|
1019
|
+
const result = {};
|
|
1020
|
+
for (const [key, value] of Object.entries(data)) {
|
|
1021
|
+
const renamedKey = fieldMapping[key] ?? key;
|
|
1022
|
+
result[renamedKey] = value;
|
|
1007
1023
|
}
|
|
1008
1024
|
return result;
|
|
1009
1025
|
}
|
package/dist/feedback/index.mjs
CHANGED
|
@@ -964,7 +964,16 @@ const BUCKET_TOKEN_PARAMS = {
|
|
|
964
964
|
* Returns the original value if parsing fails.
|
|
965
965
|
*/
|
|
966
966
|
/**
|
|
967
|
-
* Transforms data by
|
|
967
|
+
* Transforms data by renaming each key in `data` exactly once, using the
|
|
968
|
+
* mapping (`sourceField → targetField`). Keys not present in the mapping
|
|
969
|
+
* pass through unchanged. The original (pre-rename) key is dropped — the
|
|
970
|
+
* result contains only the renamed key.
|
|
971
|
+
*
|
|
972
|
+
* Each rename is independent. If the mapping happens to contain chained
|
|
973
|
+
* entries (`a → b` and `b → c`), they do NOT compose: a field named `a`
|
|
974
|
+
* in `data` becomes `b` (not `c`), because the renames are applied based
|
|
975
|
+
* on the original data's keys, not the running result.
|
|
976
|
+
*
|
|
968
977
|
* @param data The source data to transform
|
|
969
978
|
* @param fieldMapping Object mapping source field names to target field names
|
|
970
979
|
* @returns Transformed data with mapped field names
|
|
@@ -987,21 +996,28 @@ const BUCKET_TOKEN_PARAMS = {
|
|
|
987
996
|
* // { userId: '123', name: 'john' },
|
|
988
997
|
* // { userId: '456', name: 'jane' }
|
|
989
998
|
* // ]
|
|
999
|
+
*
|
|
1000
|
+
* // No chaining — `a → b` does not become `a → c` even if the map has `b → c`.
|
|
1001
|
+
* transformData({ a: 1 }, { a: 'b', b: 'c' });
|
|
1002
|
+
* // result = { b: 1 }
|
|
990
1003
|
* ```
|
|
991
1004
|
*/
|
|
992
1005
|
function transformData(data, fieldMapping) {
|
|
1006
|
+
// Pass null/undefined through unchanged — callers (e.g. AttachmentService.getById)
|
|
1007
|
+
// may invoke this on optional fields that an OData `select` excluded.
|
|
1008
|
+
if (data == null) {
|
|
1009
|
+
return data;
|
|
1010
|
+
}
|
|
993
1011
|
// Handle array of objects
|
|
994
1012
|
if (Array.isArray(data)) {
|
|
995
1013
|
return data.map(item => transformData(item, fieldMapping));
|
|
996
1014
|
}
|
|
997
|
-
//
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
result[targetField] = value;
|
|
1004
|
-
}
|
|
1015
|
+
// Walk the ORIGINAL data's keys, look up each in the mapping. One rename
|
|
1016
|
+
// per data key — no mutation of an in-progress result, so chains can't form.
|
|
1017
|
+
const result = {};
|
|
1018
|
+
for (const [key, value] of Object.entries(data)) {
|
|
1019
|
+
const renamedKey = fieldMapping[key] ?? key;
|
|
1020
|
+
result[renamedKey] = value;
|
|
1005
1021
|
}
|
|
1006
1022
|
return result;
|
|
1007
1023
|
}
|