@uipath/maestro-builder-sdk 6.6.0 → 6.7.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/api-index.md +51 -44
- package/dist/api-members.md +55 -38
- package/dist/check.js +195 -8
- package/dist/core/actions.d.ts +258 -49
- package/dist/core/actions.js +81 -34
- package/dist/core/library.js +23 -4
- package/dist/core-definitions.json +1774 -1073
- package/dist/decompile.js +77 -13
- package/dist/serialize.js +157 -24
- package/package.json +2 -2
package/dist/core/actions.js
CHANGED
|
@@ -891,71 +891,118 @@ export function dynamicExtract(inputs) {
|
|
|
891
891
|
return builtinActionSpec({ kind: 'dynamicExtract', inputs });
|
|
892
892
|
}
|
|
893
893
|
/**
|
|
894
|
-
*
|
|
894
|
+
* Query entity records from Data Fabric (`core.datafabric.read`). The result
|
|
895
895
|
* publishes to the step's `output`; downstream references re-fetch fresh data
|
|
896
896
|
* at activation time (the engine re-runs the query rather than caching).
|
|
897
897
|
*
|
|
898
898
|
* @remarks
|
|
899
|
-
*
|
|
900
|
-
* `
|
|
901
|
-
*
|
|
902
|
-
*
|
|
903
|
-
*
|
|
904
|
-
*
|
|
899
|
+
* This node is **read-one AND query-many**, on its 1.4 definition: `resultMode:
|
|
900
|
+
* 'multiple'` publishes the matching records under `output.results`, and the
|
|
901
|
+
* platform renames the node "Query entity records" to say so. The SDK still
|
|
902
|
+
* pins 1.0 — read-one — as the no-`{ version }` default, so passing
|
|
903
|
+
* `resultMode` is what selects 1.4; see {@link DataFabricReadInputs.resultMode}.
|
|
904
|
+
*
|
|
905
|
+
* The native family covers all four CRUD verbs: this one,
|
|
906
|
+
* {@link dataFabricCreate}, {@link dataFabricUpdate} and
|
|
907
|
+
* {@link dataFabricDelete}. What it does NOT cover is get-by-id, a query row
|
|
908
|
+
* limit, file record fields, and entity events — those are operations on the
|
|
909
|
+
* SAME product reached through its Integration Service connector,
|
|
905
910
|
* `uipath-uipath-dataservice` (the tenant displays it as **UiPath Data
|
|
906
|
-
* Fabric**)
|
|
907
|
-
*
|
|
908
|
-
* Taking this node for the one verb that has a native form leaves the rest of
|
|
909
|
-
* the same entity on the connector — two connection bindings and two payload
|
|
910
|
-
* shapes in one flow. So route entity work through the connector unless the
|
|
911
|
-
* scenario names these nodes; native forms for the remaining verbs are the
|
|
912
|
-
* direction of travel, and this guidance changes when they land. `check` does
|
|
913
|
-
* not reject a native node — this is a routing default, not a rule:
|
|
911
|
+
* Fabric**). So a flow that needs one of those still straddles two surfaces,
|
|
912
|
+
* and the connector remains the one surface that covers everything:
|
|
914
913
|
*
|
|
915
914
|
* ```ts
|
|
916
|
-
* .step('
|
|
917
|
-
* { entityName: 'Contracts',
|
|
915
|
+
* .step('byId', connector('uipath-uipath-dataservice', 'get-entity-record-by-id',
|
|
916
|
+
* { entityName: 'Contracts', recordId: input('id') }, { connection: 'df' }))
|
|
918
917
|
* ```
|
|
919
918
|
*
|
|
920
|
-
*
|
|
921
|
-
* carry them: run `npx flow-sdk registry prepare uipath-uipath-dataservice
|
|
922
|
-
*
|
|
923
|
-
* prepare …` is the same command when you are driving through the UiPath CLI).
|
|
924
|
-
* the `data-fabric.md` reference and the parent-field
|
|
925
|
-
* `connector-params.md` — cited by name rather than linked, because this
|
|
919
|
+
* A connector operation's body fields come from the entity, so the library
|
|
920
|
+
* cannot carry them: run `npx flow-sdk registry prepare uipath-uipath-dataservice
|
|
921
|
+
* get-entity-record-by-id -f entityName=<Entity>` first (`uip maestro registry
|
|
922
|
+
* prepare …` is the same command when you are driving through the UiPath CLI).
|
|
923
|
+
* The routing table is in the `data-fabric.md` reference and the parent-field
|
|
924
|
+
* loop in `connector-params.md` — cited by name rather than linked, because this
|
|
926
925
|
* comment renders both into the flat corpus, where those files sit alongside
|
|
927
926
|
* it, and onto the site, where each symbol is its own page and a relative
|
|
928
927
|
* `./data-fabric` resolves to nothing.
|
|
929
928
|
*
|
|
930
|
-
* @param inputs - The entity, optional filter rows, and folder scope.
|
|
929
|
+
* @param inputs - The entity, optional filter rows, result mode, and folder scope.
|
|
931
930
|
* @returns An action spec to pass to `.step(name, …)`.
|
|
932
931
|
*/
|
|
933
932
|
export function dataFabricRead(inputs) {
|
|
934
933
|
return builtinActionSpec({ kind: 'dataFabricRead', inputs });
|
|
935
934
|
}
|
|
935
|
+
/**
|
|
936
|
+
* Create an entity record in Data Fabric (`core.datafabric.create`). The new
|
|
937
|
+
* record publishes to the step's `output`, so a following
|
|
938
|
+
* {@link dataFabricUpdate} or {@link dataFabricDelete} can read its id.
|
|
939
|
+
*
|
|
940
|
+
* @remarks
|
|
941
|
+
* `values` must name at least one column — the node's schema rejects an empty
|
|
942
|
+
* field list rather than inserting a blank row, and `check` says so before the
|
|
943
|
+
* platform does. Field names are the ENTITY's, so copy them from the scenario
|
|
944
|
+
* or the tenant; nothing offline can tell a real column from a typo.
|
|
945
|
+
*
|
|
946
|
+
* See {@link dataFabricRead} for what the native family still does not cover
|
|
947
|
+
* and which connector operation covers it.
|
|
948
|
+
*
|
|
949
|
+
* @param inputs - The entity, the columns the record starts with, and folder scope.
|
|
950
|
+
* @returns An action spec to pass to `.step(name, …)`.
|
|
951
|
+
*/
|
|
952
|
+
export function dataFabricCreate(inputs) {
|
|
953
|
+
return builtinActionSpec({ kind: 'dataFabricCreate', inputs });
|
|
954
|
+
}
|
|
936
955
|
/**
|
|
937
956
|
* Update an entity record in Data Fabric (`core.datafabric.update`). Target the
|
|
938
957
|
* record by id or through an earlier {@link dataFabricRead} step; downstream
|
|
939
958
|
* reads of this step observe the record AFTER the write.
|
|
940
959
|
*
|
|
941
960
|
* @remarks
|
|
942
|
-
*
|
|
943
|
-
*
|
|
944
|
-
*
|
|
945
|
-
*
|
|
946
|
-
*
|
|
947
|
-
* one surface.
|
|
961
|
+
* `set` must write at least one column: an empty `set` is a no-op the platform
|
|
962
|
+
* reports as success, so `check` rejects it.
|
|
963
|
+
*
|
|
964
|
+
* See {@link dataFabricRead} for what the native family still does not cover
|
|
965
|
+
* and which connector operation covers it.
|
|
948
966
|
*
|
|
949
967
|
* @param inputs - The entity, the record selector, and the columns to write.
|
|
950
968
|
* @returns An action spec to pass to `.step(name, …)`.
|
|
951
969
|
*/
|
|
952
970
|
export function dataFabricUpdate(inputs) {
|
|
953
|
-
|
|
954
|
-
|
|
971
|
+
assertOneRecordRef(inputs.record, 'dataFabricUpdate');
|
|
972
|
+
return builtinActionSpec({ kind: 'dataFabricUpdate', inputs });
|
|
973
|
+
}
|
|
974
|
+
/**
|
|
975
|
+
* Delete an entity record from Data Fabric (`core.datafabric.delete`). Target
|
|
976
|
+
* the record by id or through an earlier {@link dataFabricRead} step, exactly
|
|
977
|
+
* as {@link dataFabricUpdate} does.
|
|
978
|
+
*
|
|
979
|
+
* @remarks
|
|
980
|
+
* A delete **publishes nothing** — its definition declares no output — so
|
|
981
|
+
* `$vars.<step>.output` is undefined at run time and `check` rejects a read of
|
|
982
|
+
* it. Take what you need off the read step that found the record, before the
|
|
983
|
+
* delete.
|
|
984
|
+
*
|
|
985
|
+
* See {@link dataFabricRead} for what the native family still does not cover
|
|
986
|
+
* and which connector operation covers it.
|
|
987
|
+
*
|
|
988
|
+
* @param inputs - The entity, the record selector, and folder scope.
|
|
989
|
+
* @returns An action spec to pass to `.step(name, …)`.
|
|
990
|
+
*/
|
|
991
|
+
export function dataFabricDelete(inputs) {
|
|
992
|
+
assertOneRecordRef(inputs.record, 'dataFabricDelete');
|
|
993
|
+
return builtinActionSpec({ kind: 'dataFabricDelete', inputs });
|
|
994
|
+
}
|
|
995
|
+
/**
|
|
996
|
+
* `record` names exactly ONE of `{ byId }` / `{ fromRead }`. Both forms are
|
|
997
|
+
* optional properties on the same object type, so TypeScript alone cannot
|
|
998
|
+
* refuse `{}` — and an empty selector compiles into a write with no target.
|
|
999
|
+
*/
|
|
1000
|
+
function assertOneRecordRef(record, factory) {
|
|
1001
|
+
const byId = record?.byId !== undefined;
|
|
1002
|
+
const fromRead = typeof record?.fromRead === 'string';
|
|
955
1003
|
if (byId === fromRead) {
|
|
956
|
-
throw new Error(
|
|
1004
|
+
throw new Error(`${factory}() targets exactly ONE of record: { byId } or record: { fromRead: '<step>' }.`);
|
|
957
1005
|
}
|
|
958
|
-
return builtinActionSpec({ kind: 'dataFabricUpdate', inputs });
|
|
959
1006
|
}
|
|
960
1007
|
/**
|
|
961
1008
|
* Declare an Orchestrator QUEUE ITEM step.
|
package/dist/core/library.js
CHANGED
|
@@ -688,8 +688,7 @@ export class Library {
|
|
|
688
688
|
build(dir, e, nodeType, opts = {}) {
|
|
689
689
|
const entryPath = join(dir, e.path);
|
|
690
690
|
const entry = JSON.parse(readFileSync(entryPath, 'utf8'));
|
|
691
|
-
const
|
|
692
|
-
const v1def = Array.isArray(v1defRaw) ? v1defRaw[0] : v1defRaw;
|
|
691
|
+
const v1def = readV1def(entryPath);
|
|
693
692
|
// A stamped object (case 4) reaches here with the index entry's `objectName`
|
|
694
693
|
// replaced but the sibling's FILE on disk — so restate the object and derive
|
|
695
694
|
// the endpoint from the sibling's own template, rather than shipping a node
|
|
@@ -805,10 +804,30 @@ function deriveObjectPath(operation, objectName) {
|
|
|
805
804
|
}
|
|
806
805
|
return out;
|
|
807
806
|
}
|
|
808
|
-
/**
|
|
807
|
+
/**
|
|
808
|
+
* Read the `.v1def.json` sidecar beside a library entry file, with a connection
|
|
809
|
+
* definition's `model.bindings.resource` in the designer's canonical casing.
|
|
810
|
+
*
|
|
811
|
+
* The registry serves raw node data in two casings — `uipath-microsoft-outlook365`
|
|
812
|
+
* `trigger-email-received` says `Connection`, its siblings `connection` — and the
|
|
813
|
+
* sidecar keeps whatever it was given. The designer never ships the raw value: its
|
|
814
|
+
* connector mapper builds every definition with `CONNECTION_BINDING_RESOURCE`
|
|
815
|
+
* (`'connection'`, flow-v1 `flow-schema/src/connection-binding.ts`), and the v1.1→v1.2
|
|
816
|
+
* migration lowercased every `.flow` on disk. Studio Web's unresolved-binding check
|
|
817
|
+
* (`matchContextBindings`) filters the flow's `bindings[]` by that string EXACTLY, and
|
|
818
|
+
* since MST-15010 an unresolved placeholder blocks publish. A `Connection` definition
|
|
819
|
+
* beside our `connection` registry entries therefore matched nothing, and the node
|
|
820
|
+
* reported both its connection and `FolderKey` as "not configured" (UV-16774) while
|
|
821
|
+
* validate and debug — which fold the case — passed.
|
|
822
|
+
*/
|
|
809
823
|
function readV1def(entryPath) {
|
|
810
824
|
const raw = JSON.parse(readFileSync(entryPath.replace(/\.json$/, '.v1def.json'), 'utf8'));
|
|
811
|
-
|
|
825
|
+
const v1def = Array.isArray(raw) ? raw[0] : raw;
|
|
826
|
+
const bindings = v1def?.model?.bindings;
|
|
827
|
+
if (typeof bindings?.resource === 'string' && bindings.resource.toLowerCase() === 'connection') {
|
|
828
|
+
bindings.resource = 'connection';
|
|
829
|
+
}
|
|
830
|
+
return v1def;
|
|
812
831
|
}
|
|
813
832
|
/**
|
|
814
833
|
* The platform's `connectorDetail.configuration` blob — the designer's own
|