@uipath/maestro-builder-sdk 6.117.3 → 6.118.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 +2 -2
- package/dist/api-members.md +23 -19
- package/dist/case/decompile.d.ts +2 -1
- package/dist/case/decompile.js +7 -2
- package/dist/case/intsvc-activity-config.d.ts +33 -0
- package/dist/case/intsvc-activity-config.js +137 -0
- package/dist/case/preserve.d.ts +11 -2
- package/dist/case/preserve.js +10 -0
- package/dist/case/serialize.d.ts +1 -1
- package/dist/case/serialize.js +11 -43
- package/dist/compile-cli.js +37 -7
- package/dist/core/json-file.d.ts +3 -1
- package/dist/core/json-file.js +4 -2
- package/dist/core/refusals.d.ts +1 -0
- package/dist/core/refusals.js +1 -0
- package/dist/core-definitions.json +34 -36
- package/dist/idp-processor-files.d.ts +21 -0
- package/dist/idp-processor-files.js +251 -0
- package/dist/nodes/document/flow/family.d.ts +5 -0
- package/dist/nodes/document/flow/family.js +5 -0
- package/dist/nodes/document/flow/idp-processor.d.ts +122 -0
- package/dist/nodes/document/flow/idp-processor.js +560 -0
- package/dist/nodes/document/flow/node-type.js +127 -18
- package/dist/nodes/document/flow/spec.d.ts +49 -9
- package/package.json +2 -2
package/dist/api-index.md
CHANGED
|
@@ -136,7 +136,7 @@ could hand you spans for a version you do not have.
|
|
|
136
136
|
| `DocValidationInputs` | interface | `dist/nodes/hitl/flow/spec.d.ts:76-99` | Option shapes | The Document Validation task's subject — `variant: 'document-validation'` only. |
|
|
137
137
|
| `DoWhileOptions` | interface | `dist/flow-sdk.d.ts:451-460` | Option shapes | Do-while options. |
|
|
138
138
|
| `dynamicExtract` | function | `dist/nodes/document/flow/factories.d.ts:20-30` | Actions | Extract fields from a document with an INLINE schema — Dynamic Extract (`uipath.ixp.extract-document-builder`), the… |
|
|
139
|
-
| `DynamicExtractInputs` | interface | `dist/nodes/document/flow/spec.d.ts:56-
|
|
139
|
+
| `DynamicExtractInputs` | interface | `dist/nodes/document/flow/spec.d.ts:56-131` | Option shapes | What `dynamicExtract()` takes: the document and the fields to extract from it. |
|
|
140
140
|
| `EdgeRoute` | interface | `dist/flow-sdk.d.ts:651-665` | Supporting types | One edge's route: user-dragged bends and/or the auto-router's waypoints. |
|
|
141
141
|
| `endCall` | function | `dist/nodes/agent/flow/factories.d.ts:32-39` | Actions | Hang up (`uipath.conversational.voice.end-call`). |
|
|
142
142
|
| `EndCallInputs` | interface | `dist/nodes/agent/flow/spec.d.ts:113-121` | Option shapes | What `endCall()` takes: the call to hang up. |
|
|
@@ -198,7 +198,7 @@ could hand you spans for a version you do not have.
|
|
|
198
198
|
| `input` | function | `dist/core/expr.d.ts:44-61` | Expressions and types | Reference a flow input by name → `$vars.<triggerId>.output.<name>`. |
|
|
199
199
|
| `isLookupToken` | function | `dist/core/lookups.d.ts:53-54` | Generated descriptors | True when `v` is an unresolved LookupToken. |
|
|
200
200
|
| `ixpExtract` | function | `dist/nodes/document/flow/factories.d.ts:31-85` | Actions | Extract fields from a document with a published IxP project — the platform's **Extract** node (`uipath.ixp.*`, service… |
|
|
201
|
-
| `IxpExtractInputs` | interface | `dist/nodes/document/flow/spec.d.ts:
|
|
201
|
+
| `IxpExtractInputs` | interface | `dist/nodes/document/flow/spec.d.ts:149-224` | Option shapes | What `ixpExtract()` takes: the IxP project's extractor, its identity on the tenant, and the document. |
|
|
202
202
|
| `IxpToolRef` | interface | `dist/core/actions.d.ts:789-827` | Supporting types | A published IxP (Intelligent eXtraction Platform) project as a tool — the agent decides when to extract a document and… |
|
|
203
203
|
| `js` | function | `dist/core/expr.d.ts:247-282` | Expressions and types | Build a raw JS *expression* (a condition or computation). |
|
|
204
204
|
| `lit` | function | `dist/core/expr.d.ts:22-28` | Expressions and types | A constant value baked directly into a node input. |
|
package/dist/api-members.md
CHANGED
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
|
|
6
6
|
# Maestro Builder SDK — member index
|
|
7
7
|
|
|
8
|
-
**A lookup table of
|
|
8
|
+
**A lookup table of 1356 rows — match one name in it, do not read it.**
|
|
9
9
|
Grep or search for the member you have; the row it lands on is the whole
|
|
10
10
|
answer. Reading top to bottom costs ~20x what the one row does and tells you
|
|
11
11
|
nothing you asked for.
|
|
12
12
|
|
|
13
|
-
Every field and method of every exported shape —
|
|
13
|
+
Every field and method of every exported shape — 1356 across
|
|
14
14
|
250 interfaces and classes — keyed by the MEMBER's own name.
|
|
15
15
|
|
|
16
16
|
**Use this when the name you have is a field or a method**, which is usually
|
|
@@ -32,7 +32,7 @@ truncated summary would, for less. Read the span.
|
|
|
32
32
|
Member names repeat across shapes (`name` is declared on 69 of them), so the
|
|
33
33
|
`Declared on` column is what makes a match actionable. For the whole shape
|
|
34
34
|
rather than the one field, look that name up in [`api-index.md`](api-index.md) —
|
|
35
|
-
which is why its span is not repeated on all
|
|
35
|
+
which is why its span is not repeated on all 1356 rows here.
|
|
36
36
|
|
|
37
37
|
**A name that misses both indexes is probably not part of the API.** The one
|
|
38
38
|
that comes up is a RUNTIME output key — a human task's `Action`, a step's
|
|
@@ -275,7 +275,7 @@ not find it either.
|
|
|
275
275
|
| `description` | method | `FlowBuilder` | `dist/flow-sdk.d.ts:1323-1330` |
|
|
276
276
|
| `description` | property | `FormFieldSettings` | `dist/core/actions.d.ts:219-220` |
|
|
277
277
|
| `description` | property | `HttpRequestToolRef` | `dist/core/actions.d.ts:569` |
|
|
278
|
-
| `description` | property | `IxpExtractInputs` | `dist/nodes/document/flow/spec.d.ts:
|
|
278
|
+
| `description` | property | `IxpExtractInputs` | `dist/nodes/document/flow/spec.d.ts:216-223` |
|
|
279
279
|
| `description` | property | `IxpToolRef` | `dist/core/actions.d.ts:814-815` |
|
|
280
280
|
| `description` | property | `ManualTriggerOpts` | `dist/case/case-sdk.d.ts:297` |
|
|
281
281
|
| `description` | property | `McpToolRef` | `dist/core/actions.d.ts:491` |
|
|
@@ -317,7 +317,7 @@ not find it either.
|
|
|
317
317
|
| `displayName` | property | `TriggerMeta` | `dist/core/connectors.d.ts:140-141` |
|
|
318
318
|
| `displayPrompt` | property | `StartingPrompt` | `dist/nodes/trigger/flow/spec.d.ts:57-58` |
|
|
319
319
|
| `document` | property | `HitlInputs` | `dist/nodes/hitl/flow/spec.d.ts:419-423` |
|
|
320
|
-
| `documentClassify` | property | `FlowActionSpecs` | `dist/nodes/document/flow/spec.d.ts:
|
|
320
|
+
| `documentClassify` | property | `FlowActionSpecs` | `dist/nodes/document/flow/spec.d.ts:227-230` |
|
|
321
321
|
| `documentExtraction` | property | `BuiltTask` | `dist/case/case-sdk.d.ts:1004-1005` |
|
|
322
322
|
| `documentExtraction` | method | `TaskBuilder` | `dist/case/case-sdk.d.ts:1521-1539` |
|
|
323
323
|
| `documentExtractionSaved` | property | `BuiltTask` | `dist/case/case-sdk.d.ts:1006-1007` |
|
|
@@ -327,7 +327,7 @@ not find it either.
|
|
|
327
327
|
| `draft` | property | `StepOptions` | `dist/flow-sdk.d.ts:318-332` |
|
|
328
328
|
| `dueDate` | property | `QueueItemInputs` | `dist/nodes/queue/flow/spec.d.ts:50-51` |
|
|
329
329
|
| `duration` | property | `TimerSpec` | `dist/bpmn/bpmn-sdk.d.ts:35-36` |
|
|
330
|
-
| `dynamicExtract` | property | `FlowActionSpecs` | `dist/nodes/document/flow/spec.d.ts:
|
|
330
|
+
| `dynamicExtract` | property | `FlowActionSpecs` | `dist/nodes/document/flow/spec.d.ts:231-234` |
|
|
331
331
|
| `dynamicFewShotLearning` | property | `AgentMemoryRef` | `dist/core/actions.d.ts:605-606` |
|
|
332
332
|
| `edges` | property | `FlowLayout` | `dist/flow-sdk.d.ts:724-725` |
|
|
333
333
|
| `effects` | property | `FormFieldRule` | `dist/core/actions.d.ts:176-177` |
|
|
@@ -434,7 +434,7 @@ not find it either.
|
|
|
434
434
|
| `fileExtension` | property | `ContextIndexRef` | `dist/core/actions.d.ts:928-929` |
|
|
435
435
|
| `fileRef` | property | `DocumentClassifyInputs` | `dist/nodes/document/flow/spec.d.ts:12-13` |
|
|
436
436
|
| `fileRef` | property | `DynamicExtractInputs` | `dist/nodes/document/flow/spec.d.ts:58-59` |
|
|
437
|
-
| `fileRef` | property | `IxpExtractInputs` | `dist/nodes/document/flow/spec.d.ts:
|
|
437
|
+
| `fileRef` | property | `IxpExtractInputs` | `dist/nodes/document/flow/spec.d.ts:190-204` |
|
|
438
438
|
| `filter` | property | `ConnectorEventOpts` | `dist/bpmn/bpmn-sdk.d.ts:1682-1697` |
|
|
439
439
|
| `filters` | property | `ConnectorEventOpts` | `dist/bpmn/bpmn-sdk.d.ts:1698-1713` |
|
|
440
440
|
| `filters` | property | `DataFabricReadInputs` | `dist/nodes/data-fabric/flow/spec.d.ts:85-86` |
|
|
@@ -475,7 +475,7 @@ not find it either.
|
|
|
475
475
|
| `folderKey` | property | `OrchestratorOpts` | `dist/bpmn/bpmn-sdk.d.ts:1438-1446` |
|
|
476
476
|
| `folderKey` | property | `RemoteA2aToolRef` | `dist/core/actions.d.ts:526` |
|
|
477
477
|
| `FolderKey` | property | `FlowMetadata` | `dist/nodes/script/flow/spec.d.ts:85-86` |
|
|
478
|
-
| `folderName` | property | `IxpExtractInputs` | `dist/nodes/document/flow/spec.d.ts:
|
|
478
|
+
| `folderName` | property | `IxpExtractInputs` | `dist/nodes/document/flow/spec.d.ts:183-189` |
|
|
479
479
|
| `folderPath` | property | `AgenticProcessInputsBase` | `dist/nodes/process/flow/spec.d.ts:340-347` |
|
|
480
480
|
| `folderPath` | property | `AgentInputs` | `dist/nodes/process/flow/spec.d.ts:476-487` |
|
|
481
481
|
| `folderPath` | property | `ApiWorkflowInputs` | `dist/nodes/process/flow/spec.d.ts:153-160` |
|
|
@@ -483,7 +483,7 @@ not find it either.
|
|
|
483
483
|
| `folderPath` | property | `ConnectorEventOpts` | `dist/bpmn/bpmn-sdk.d.ts:1663-1669` |
|
|
484
484
|
| `folderPath` | property | `ContextIndexRef` | `dist/core/actions.d.ts:912-913` |
|
|
485
485
|
| `folderPath` | property | `HitlConnection` | `dist/nodes/hitl/flow/spec.d.ts:30-31` |
|
|
486
|
-
| `folderPath` | property | `IxpExtractInputs` | `dist/nodes/document/flow/spec.d.ts:
|
|
486
|
+
| `folderPath` | property | `IxpExtractInputs` | `dist/nodes/document/flow/spec.d.ts:209-215` |
|
|
487
487
|
| `folderPath` | property | `McpToolRef` | `dist/core/actions.d.ts:492-493` |
|
|
488
488
|
| `folderPath` | property | `ProcessToolRef` | `dist/core/actions.d.ts:772-773` |
|
|
489
489
|
| `folderPath` | property | `PublishedFunctionInputs` | `dist/nodes/process/flow/spec.d.ts:250-260` |
|
|
@@ -625,7 +625,7 @@ not find it either.
|
|
|
625
625
|
| `item` | property | `QueueItemOpts` | `dist/bpmn/bpmn-sdk.d.ts:1492-1493` |
|
|
626
626
|
| `items` | property | `ActionSchemaProperty` | `dist/nodes/hitl/flow/spec.d.ts:269-270` |
|
|
627
627
|
| `itemVar` | property | `LoopSpec` | `dist/bpmn/bpmn-sdk.d.ts:83-84` |
|
|
628
|
-
| `ixpExtract` | property | `FlowActionSpecs` | `dist/nodes/document/flow/spec.d.ts:
|
|
628
|
+
| `ixpExtract` | property | `FlowActionSpecs` | `dist/nodes/document/flow/spec.d.ts:235-238` |
|
|
629
629
|
| `join` | property | `ChooseOpts` | `dist/bpmn/bpmn-sdk.d.ts:2082-2083` |
|
|
630
630
|
| `join` | property | `SplitOpts` | `dist/bpmn/bpmn-sdk.d.ts:2089-2090` |
|
|
631
631
|
| `js` | property | `Expr` | `dist/core/expr.d.ts:17` |
|
|
@@ -741,15 +741,15 @@ not find it either.
|
|
|
741
741
|
| `mode` | property | `InlineAgentInputs` | `dist/nodes/agent/flow/spec.d.ts:318-324` |
|
|
742
742
|
| `model` | property | `CaseDocumentExtractionSpec` | `dist/case/case-sdk.d.ts:637-638` |
|
|
743
743
|
| `model` | property | `ConversationalAgentInputs` | `dist/nodes/agent/flow/spec.d.ts:63-64` |
|
|
744
|
-
| `model` | property | `DynamicExtractInputs` | `dist/nodes/document/flow/spec.d.ts:60-
|
|
744
|
+
| `model` | property | `DynamicExtractInputs` | `dist/nodes/document/flow/spec.d.ts:60-84` |
|
|
745
745
|
| `model` | property | `InlineAgentInputs` | `dist/nodes/agent/flow/spec.d.ts:186-193` |
|
|
746
746
|
| `model` | property | `VoiceSettings` | `dist/nodes/agent/flow/spec.d.ts:134-135` |
|
|
747
747
|
| `modelConfig` | property | `DocumentClassifyInputs` | `dist/nodes/document/flow/spec.d.ts:18-19` |
|
|
748
|
-
| `modelConfig` | property | `DynamicExtractInputs` | `dist/nodes/document/flow/spec.d.ts:
|
|
748
|
+
| `modelConfig` | property | `DynamicExtractInputs` | `dist/nodes/document/flow/spec.d.ts:96-97` |
|
|
749
749
|
| `modelMaxTokens` | property | `ConversationalAgentInputs` | `dist/nodes/agent/flow/spec.d.ts:85-91` |
|
|
750
750
|
| `modelMaxTokens` | property | `InlineAgentInputs` | `dist/nodes/agent/flow/spec.d.ts:308-315` |
|
|
751
751
|
| `modelMaxTokens` | property | `VoiceSettings` | `dist/nodes/agent/flow/spec.d.ts:142-143` |
|
|
752
|
-
| `modelName` | property | `IxpExtractInputs` | `dist/nodes/document/flow/spec.d.ts:
|
|
752
|
+
| `modelName` | property | `IxpExtractInputs` | `dist/nodes/document/flow/spec.d.ts:165-176` |
|
|
753
753
|
| `mustClose` | property | `ScopeStorage` | `dist/bpmn/bpmn-sdk.d.ts:2202-2206` |
|
|
754
754
|
| `name` | property | `ActionAppRef` | `dist/case/case-sdk.d.ts:834-835` |
|
|
755
755
|
| `name` | property | `ActionField` | `dist/case/case-sdk.d.ts:795-796` |
|
|
@@ -803,7 +803,7 @@ not find it either.
|
|
|
803
803
|
| `name` | property | `HttpOpts` | `dist/bpmn/bpmn-sdk.d.ts:1310-1311` |
|
|
804
804
|
| `name` | property | `HttpRequestToolRef` | `dist/core/actions.d.ts:567-568` |
|
|
805
805
|
| `name` | property | `HumanTaskCommonOpts` | `dist/bpmn/bpmn-sdk.d.ts:1523-1524` |
|
|
806
|
-
| `name` | property | `IxpExtractInputs` | `dist/nodes/document/flow/spec.d.ts:
|
|
806
|
+
| `name` | property | `IxpExtractInputs` | `dist/nodes/document/flow/spec.d.ts:177-182` |
|
|
807
807
|
| `name` | property | `IxpToolRef` | `dist/core/actions.d.ts:812-813` |
|
|
808
808
|
| `name` | property | `JoinOpts` | `dist/bpmn/bpmn-sdk.d.ts:2070-2071` |
|
|
809
809
|
| `name` | property | `ManualTriggerOpts` | `dist/case/case-sdk.d.ts:296` |
|
|
@@ -928,8 +928,8 @@ not find it either.
|
|
|
928
928
|
| `outputVar` | property | `ReceiveMessageOpts` | `dist/bpmn/bpmn-sdk.d.ts:1626-1627` |
|
|
929
929
|
| `pageRange` | property | `CaseDocumentExtractionSpec` | `dist/case/case-sdk.d.ts:663-664` |
|
|
930
930
|
| `pageRange` | property | `DocumentClassifyInputs` | `dist/nodes/document/flow/spec.d.ts:14-15` |
|
|
931
|
-
| `pageRange` | property | `DynamicExtractInputs` | `dist/nodes/document/flow/spec.d.ts:
|
|
932
|
-
| `pageRange` | property | `IxpExtractInputs` | `dist/nodes/document/flow/spec.d.ts:
|
|
931
|
+
| `pageRange` | property | `DynamicExtractInputs` | `dist/nodes/document/flow/spec.d.ts:94-95` |
|
|
932
|
+
| `pageRange` | property | `IxpExtractInputs` | `dist/nodes/document/flow/spec.d.ts:205-206` |
|
|
933
933
|
| `parallel` | property | `LoopOptions` | `dist/flow-sdk.d.ts:438-439` |
|
|
934
934
|
| `parallel` | method | `StepList` | `dist/flow-sdk.d.ts:1052-1094` |
|
|
935
935
|
| `parallelGateway` | method | `ScopeBuilder` | `dist/bpmn/bpmn-sdk.d.ts:2525-2534` |
|
|
@@ -967,10 +967,14 @@ not find it either.
|
|
|
967
967
|
| `process` | method | `TaskBuilder` | `dist/case/case-sdk.d.ts:1288-1297` |
|
|
968
968
|
| `processId` | property | `SugarRegistry` | `dist/bpmn/bpmn-sdk.d.ts:2226-2231` |
|
|
969
969
|
| `ProcessKey` | property | `FlowMetadata` | `dist/nodes/script/flow/spec.d.ts:89-90` |
|
|
970
|
+
| `processorFolderPath` | property | `DynamicExtractInputs` | `dist/nodes/document/flow/spec.d.ts:123-130` |
|
|
971
|
+
| `processorKey` | property | `DynamicExtractInputs` | `dist/nodes/document/flow/spec.d.ts:98-109` |
|
|
972
|
+
| `processorName` | property | `DynamicExtractInputs` | `dist/nodes/document/flow/spec.d.ts:110-116` |
|
|
973
|
+
| `processorReadOnly` | property | `DynamicExtractInputs` | `dist/nodes/document/flow/spec.d.ts:117-122` |
|
|
970
974
|
| `project` | property | `AgenticProcessInputsBase` | `dist/nodes/process/flow/spec.d.ts:321-339` |
|
|
971
975
|
| `project` | property | `AgentInputs` | `dist/nodes/process/flow/spec.d.ts:457-475` |
|
|
972
976
|
| `project` | property | `ApiWorkflowInputs` | `dist/nodes/process/flow/spec.d.ts:134-152` |
|
|
973
|
-
| `project` | property | `IxpExtractInputs` | `dist/nodes/document/flow/spec.d.ts:
|
|
977
|
+
| `project` | property | `IxpExtractInputs` | `dist/nodes/document/flow/spec.d.ts:151-164` |
|
|
974
978
|
| `project` | property | `PublishedFunctionInputs` | `dist/nodes/process/flow/spec.d.ts:231-249` |
|
|
975
979
|
| `project` | property | `RpaWorkflowInputs` | `dist/nodes/process/flow/spec.d.ts:39-57` |
|
|
976
980
|
| `projectId` | property | `AgenticProcessInputsBase` | `dist/nodes/process/flow/spec.d.ts:348-357` |
|
|
@@ -1097,7 +1101,7 @@ not find it either.
|
|
|
1097
1101
|
| `schema` | method | `BpmnBuilder` | `dist/bpmn/bpmn-sdk.d.ts:3837-3862` |
|
|
1098
1102
|
| `schema` | property | `BpmnVarDecl` | `dist/bpmn/bpmn-sdk.d.ts:449-450` |
|
|
1099
1103
|
| `schema` | property | `DataServiceOpts` | `dist/bpmn/bpmn-sdk.d.ts:1291-1296` |
|
|
1100
|
-
| `schema` | property | `DynamicExtractInputs` | `dist/nodes/document/flow/spec.d.ts:
|
|
1104
|
+
| `schema` | property | `DynamicExtractInputs` | `dist/nodes/document/flow/spec.d.ts:85-93` |
|
|
1101
1105
|
| `schema` | property | `TypedOutputRow` | `dist/bpmn/typed-node.d.ts:300-301` |
|
|
1102
1106
|
| `schema` | property | `VarDecl` | `dist/flow-sdk.d.ts:75-76` |
|
|
1103
1107
|
| `schema` | property | `VarOpts` | `dist/bpmn/bpmn-sdk.d.ts:1929-1942` |
|
|
@@ -1369,7 +1373,7 @@ not find it either.
|
|
|
1369
1373
|
| `version` | property | `TriggerMeta` | `dist/core/connectors.d.ts:139` |
|
|
1370
1374
|
| `version` | property | `TriggerOptions` | `dist/core/actions.d.ts:1178-1179` |
|
|
1371
1375
|
| `versions` | method | `NodeCatalog` | `dist/core/node-catalog.d.ts:15-16` |
|
|
1372
|
-
| `versionTag` | property | `IxpExtractInputs` | `dist/nodes/document/flow/spec.d.ts:
|
|
1376
|
+
| `versionTag` | property | `IxpExtractInputs` | `dist/nodes/document/flow/spec.d.ts:207-208` |
|
|
1373
1377
|
| `versionTag` | property | `IxpToolRef` | `dist/core/actions.d.ts:816-817` |
|
|
1374
1378
|
| `voice` | property | `VoiceAgentInputs` | `dist/nodes/agent/flow/spec.d.ts:169-170` |
|
|
1375
1379
|
| `voiceAgent` | property | `FlowActionSpecs` | `dist/nodes/agent/flow/spec.d.ts:456-459` |
|
package/dist/case/decompile.d.ts
CHANGED
|
@@ -254,7 +254,7 @@ type Preservation = {
|
|
|
254
254
|
name: string;
|
|
255
255
|
trigger: string;
|
|
256
256
|
}>;
|
|
257
|
-
omitMetadata?: Array<'caseAppEnabled' | 'caseIdentifierType' | 'publishVersion'>;
|
|
257
|
+
omitMetadata?: Array<'caseAppEnabled' | 'caseIdentifierType' | 'publishVersion' | 'intsvcActivityConfig'>;
|
|
258
258
|
publishVersion?: number;
|
|
259
259
|
nodeFields?: Record<string, Record<string, unknown>>;
|
|
260
260
|
variableFields?: Partial<Record<'inputs' | 'outputs' | 'inputOutputs', Record<string, Record<string, unknown>>>>;
|
|
@@ -281,6 +281,7 @@ type Preservation = {
|
|
|
281
281
|
metadata: Record<string, unknown>;
|
|
282
282
|
}>;
|
|
283
283
|
connectorContexts?: PreservedConnectorContext[];
|
|
284
|
+
connectorConfigV2?: string[];
|
|
284
285
|
connectorRows?: PreservedConnectorRows[];
|
|
285
286
|
subscriptionFilters?: Array<{
|
|
286
287
|
owner: string;
|
package/dist/case/decompile.js
CHANGED
|
@@ -9,6 +9,7 @@ import { isScriptOwnOutput, liftScript } from './decompile-script.js';
|
|
|
9
9
|
import { isHttpRequestOwnOutput, liftHttpRequest } from './decompile-http-request.js';
|
|
10
10
|
import { savedHttpRequestMetadata } from './http-request.js';
|
|
11
11
|
import { caseConnectorOwners, savedConnectorContext } from './connector-saved-context.js';
|
|
12
|
+
import { elementConfigV2Owners } from './intsvc-activity-config.js';
|
|
12
13
|
import { caseConnectorRowOwners, savedConnectorRows } from './connector-saved-rows.js';
|
|
13
14
|
import { builtChainSource, chainStatements } from '../core/builder-chain.js';
|
|
14
15
|
import { literalSource } from './literal.js';
|
|
@@ -2656,10 +2657,11 @@ export function collectPreservation(plan) {
|
|
|
2656
2657
|
const metadata = Object.fromEntries(Object.entries(plan.metadata ?? {}).filter(([name]) => !metadataKnown.has(name)));
|
|
2657
2658
|
if (Object.keys(metadata).length)
|
|
2658
2659
|
preservation.metadata = metadata;
|
|
2659
|
-
// The serializer always writes these
|
|
2660
|
+
// The serializer always writes these four; a source that left one out keeps
|
|
2660
2661
|
// it out (see `omitMetadata` in preserve.ts). `publishVersion` is a platform
|
|
2661
2662
|
// stamp the builder does not author, so a different source value is carried.
|
|
2662
|
-
|
|
2663
|
+
// `intsvcActivityConfig` absent is a V1 plan, which must stay V1.
|
|
2664
|
+
const omitMetadata = ['caseAppEnabled', 'caseIdentifierType', 'publishVersion', 'intsvcActivityConfig']
|
|
2663
2665
|
.filter((name) => !Object.prototype.hasOwnProperty.call(plan.metadata ?? {}, name));
|
|
2664
2666
|
if (omitMetadata.length)
|
|
2665
2667
|
preservation.omitMetadata = [...omitMetadata];
|
|
@@ -2915,6 +2917,9 @@ export function collectPreservation(plan) {
|
|
|
2915
2917
|
.filter((entry) => entry !== undefined);
|
|
2916
2918
|
if (connectorContexts.length)
|
|
2917
2919
|
preservation.connectorContexts = connectorContexts;
|
|
2920
|
+
const connectorConfigV2 = elementConfigV2Owners(plan);
|
|
2921
|
+
if (connectorConfigV2.length)
|
|
2922
|
+
preservation.connectorConfigV2 = connectorConfigV2;
|
|
2918
2923
|
const connectorRows = caseConnectorRowOwners(plan)
|
|
2919
2924
|
.map(({ key, bag }) => savedConnectorRows(key, bag))
|
|
2920
2925
|
.filter((entry) => entry !== undefined);
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { CaseJsonPreservation } from './preserve.js';
|
|
2
|
+
/** The marker's name in `metadata`. */
|
|
3
|
+
export declare const INTSVC_ACTIVITY_CONFIG = "intsvcActivityConfig";
|
|
4
|
+
/** The warning {@link defaultIntsvcActivityConfig} gives. */
|
|
5
|
+
export interface IntsvcConfigWarning {
|
|
6
|
+
code: 'CONNECTOR_CONFIG_V2_DEFAULT';
|
|
7
|
+
message: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Write `metadata.intsvcActivityConfig: "v2"` when the source does not say
|
|
11
|
+
* otherwise (see the module comment). Runs after preservation, which carries a
|
|
12
|
+
* saved value or the saved absence.
|
|
13
|
+
*/
|
|
14
|
+
export declare function defaultIntsvcActivityConfig(result: Record<string, unknown>, preservation: CaseJsonPreservation | undefined, warn?: (warning: IntsvcConfigWarning) => void): void;
|
|
15
|
+
/**
|
|
16
|
+
* V2 plans: mark each connector task's and event trigger's context that is
|
|
17
|
+
* bound to a connection `activityConfigurationVersion: v2`, as the Designer and
|
|
18
|
+
* CLI do. A context that already carries the row keeps it.
|
|
19
|
+
*/
|
|
20
|
+
export declare function stampConnectorConfigVersion(result: Record<string, unknown>): Record<string, unknown>;
|
|
21
|
+
/**
|
|
22
|
+
* The connector elements of a plan with no `"v2"` marker whose own context
|
|
23
|
+
* carries the V2 row, by {@link elementKey}: the Designer reads that row
|
|
24
|
+
* before the marker, so decompile records them (`connectorConfigV2`).
|
|
25
|
+
*/
|
|
26
|
+
export declare function elementConfigV2Owners(plan: Record<string, any>): string[];
|
|
27
|
+
/**
|
|
28
|
+
* For a plan whose settled marker is not `"v2"` (see `applyPreservation`):
|
|
29
|
+
* each connector element keeps the V2 row only when the saved plan had it on
|
|
30
|
+
* that element (`keep`, the `connectorConfigV2` element keys). The others lose
|
|
31
|
+
* it, and a kept one that lacks it gets it back, last in its context.
|
|
32
|
+
*/
|
|
33
|
+
export declare function unstampConnectorConfigVersion(result: Record<string, unknown>, keep?: readonly string[]): void;
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `metadata.intsvcActivityConfig`: which Integration Service activity
|
|
3
|
+
* configuration a case's connector elements use. The Case Designer and
|
|
4
|
+
* `uip maestro case init` write `"v2"` on a new case. With no marker, the CLI's
|
|
5
|
+
* BPMN rule (`isIntsvcActivityExecutionV1`) reads an absent version as V1, and
|
|
6
|
+
* the Designer still opens a connector element in its V2 panel when that
|
|
7
|
+
* element's own context says `activityConfigurationVersion: v2`. How the Case
|
|
8
|
+
* runtime reads a plan with no marker is not verified, so compile keeps a
|
|
9
|
+
* decompiled plan's marker, or its absence, as it was.
|
|
10
|
+
*
|
|
11
|
+
* Compile writes `"v2"` on a case whose source does not say otherwise:
|
|
12
|
+
* - a value `preserveCaseJson` carries (`metadata.intsvcActivityConfig`) stays;
|
|
13
|
+
* - a decompiled plan that had no marker records that
|
|
14
|
+
* (`omitMetadata: ['intsvcActivityConfig']`) and stays without one, so a V1
|
|
15
|
+
* plan stays V1;
|
|
16
|
+
* - else compile writes `"v2"`. When the source is a decompiled plan from an SDK
|
|
17
|
+
* that did not yet record the absence, and the plan has a connector element,
|
|
18
|
+
* compile cannot tell a V1 plan from a new one, so it warns
|
|
19
|
+
* (`CONNECTOR_CONFIG_V2_DEFAULT`).
|
|
20
|
+
*
|
|
21
|
+
* Then each connector element of a `"v2"` plan gets its
|
|
22
|
+
* `activityConfigurationVersion: v2` context row, as the Designer and CLI write.
|
|
23
|
+
*/
|
|
24
|
+
import { CASE_FORMAT_PROFILE } from './format-profile.js';
|
|
25
|
+
import { caseConnectorOwners } from './connector-saved-context.js';
|
|
26
|
+
/** The marker's name in `metadata`. */
|
|
27
|
+
export const INTSVC_ACTIVITY_CONFIG = 'intsvcActivityConfig';
|
|
28
|
+
/** The task types whose `data.context[]` carries an Integration Service activity configuration. */
|
|
29
|
+
const CONNECTOR_CONFIG_TASK_TYPES = new Set([
|
|
30
|
+
'execute-connector-activity',
|
|
31
|
+
'wait-for-connector',
|
|
32
|
+
'external-agent',
|
|
33
|
+
'external-workflow',
|
|
34
|
+
]);
|
|
35
|
+
const V2_CONFIG_ROW = { name: 'activityConfigurationVersion', value: 'v2', type: 'string' };
|
|
36
|
+
/**
|
|
37
|
+
* Each connector task's and event trigger's context that is bound to a
|
|
38
|
+
* connection. A placeholder bag (`connectorKey` + `operation`, or a trigger's
|
|
39
|
+
* lone `objectName`) has no configuration panel to pick, so it is left out.
|
|
40
|
+
*/
|
|
41
|
+
function boundConnectorContexts(result) {
|
|
42
|
+
const contexts = [];
|
|
43
|
+
const take = (context) => {
|
|
44
|
+
if (Array.isArray(context) && context.some((row) => row?.name === 'connection'))
|
|
45
|
+
contexts.push(context);
|
|
46
|
+
};
|
|
47
|
+
for (const node of result.nodes ?? []) {
|
|
48
|
+
if (node?.type === 'case-management:Trigger' || node?.type === 'uipath.case.trigger')
|
|
49
|
+
take(node.data?.[CASE_FORMAT_PROFILE.triggerBagField]?.context);
|
|
50
|
+
for (const lane of node?.data?.tasks ?? []) {
|
|
51
|
+
for (const task of Array.isArray(lane) ? lane : []) {
|
|
52
|
+
if (CONNECTOR_CONFIG_TASK_TYPES.has(task?.type))
|
|
53
|
+
take(task.data?.context);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return contexts;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Write `metadata.intsvcActivityConfig: "v2"` when the source does not say
|
|
61
|
+
* otherwise (see the module comment). Runs after preservation, which carries a
|
|
62
|
+
* saved value or the saved absence.
|
|
63
|
+
*/
|
|
64
|
+
export function defaultIntsvcActivityConfig(result, preservation, warn) {
|
|
65
|
+
const metadata = result.metadata;
|
|
66
|
+
if (!metadata || Object.prototype.hasOwnProperty.call(metadata, INTSVC_ACTIVITY_CONFIG))
|
|
67
|
+
return;
|
|
68
|
+
if (preservation?.omitMetadata?.includes(INTSVC_ACTIVITY_CONFIG))
|
|
69
|
+
return;
|
|
70
|
+
metadata[INTSVC_ACTIVITY_CONFIG] = 'v2';
|
|
71
|
+
if (preservation && boundConnectorContexts(result).length) {
|
|
72
|
+
warn?.({
|
|
73
|
+
code: 'CONNECTOR_CONFIG_V2_DEFAULT',
|
|
74
|
+
message: 'compile wrote metadata.intsvcActivityConfig "v2", the Integration Service configuration the Case Designer writes on a new case. '
|
|
75
|
+
+ 'This source has a preserveCaseJson(...) payload, as a decompiled plan does, but the payload does not say whether the plan had the marker, and the plan has connector elements. '
|
|
76
|
+
+ 'If the plan had no marker, add "intsvcActivityConfig" to omitMetadata in the payload to keep it that way, or decompile the plan again with this SDK, which records it. '
|
|
77
|
+
+ 'If the case is meant to be V2, add metadata: { intsvcActivityConfig: "v2" } to the payload, and this warning stops.',
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* V2 plans: mark each connector task's and event trigger's context that is
|
|
83
|
+
* bound to a connection `activityConfigurationVersion: v2`, as the Designer and
|
|
84
|
+
* CLI do. A context that already carries the row keeps it.
|
|
85
|
+
*/
|
|
86
|
+
export function stampConnectorConfigVersion(result) {
|
|
87
|
+
const metadata = result.metadata;
|
|
88
|
+
if (metadata?.[INTSVC_ACTIVITY_CONFIG] !== 'v2')
|
|
89
|
+
return result;
|
|
90
|
+
for (const context of boundConnectorContexts(result))
|
|
91
|
+
if (!context.some((row) => row?.name === V2_CONFIG_ROW.name))
|
|
92
|
+
context.push({ ...V2_CONFIG_ROW });
|
|
93
|
+
return result;
|
|
94
|
+
}
|
|
95
|
+
/** Whether `context` holds the `activityConfigurationVersion: v2` row. */
|
|
96
|
+
const hasV2Row = (context) => Array.isArray(context) && context.some((row) => row?.name === V2_CONFIG_ROW.name && row?.value === V2_CONFIG_ROW.value);
|
|
97
|
+
/**
|
|
98
|
+
* An element's key without its stage: `task:<task id>`, `rule:<rule id>` or
|
|
99
|
+
* `trigger:<node id>`. A task moved to another stage keeps its id, so this key
|
|
100
|
+
* finds it where the owner key (`task:<stage id>:<task id>`) does not.
|
|
101
|
+
*/
|
|
102
|
+
function elementKey(owner) {
|
|
103
|
+
const parts = owner.split(':');
|
|
104
|
+
return `${parts[0]}:${parts[parts.length - 1]}`;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* The connector elements of a plan with no `"v2"` marker whose own context
|
|
108
|
+
* carries the V2 row, by {@link elementKey}: the Designer reads that row
|
|
109
|
+
* before the marker, so decompile records them (`connectorConfigV2`).
|
|
110
|
+
*/
|
|
111
|
+
export function elementConfigV2Owners(plan) {
|
|
112
|
+
if (plan?.metadata?.[INTSVC_ACTIVITY_CONFIG] === 'v2')
|
|
113
|
+
return [];
|
|
114
|
+
return caseConnectorOwners(plan).filter(({ bag }) => hasV2Row(bag?.context)).map(({ key }) => elementKey(key));
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* For a plan whose settled marker is not `"v2"` (see `applyPreservation`):
|
|
118
|
+
* each connector element keeps the V2 row only when the saved plan had it on
|
|
119
|
+
* that element (`keep`, the `connectorConfigV2` element keys). The others lose
|
|
120
|
+
* it, and a kept one that lacks it gets it back, last in its context.
|
|
121
|
+
*/
|
|
122
|
+
export function unstampConnectorConfigVersion(result, keep = []) {
|
|
123
|
+
const kept = new Set(keep);
|
|
124
|
+
for (const { key, bag } of caseConnectorOwners(result)) {
|
|
125
|
+
const context = bag?.context;
|
|
126
|
+
if (!Array.isArray(context))
|
|
127
|
+
continue;
|
|
128
|
+
if (kept.has(elementKey(key))) {
|
|
129
|
+
if (!hasV2Row(context))
|
|
130
|
+
context.push({ ...V2_CONFIG_ROW });
|
|
131
|
+
continue;
|
|
132
|
+
}
|
|
133
|
+
const at = context.findIndex((row) => row?.name === V2_CONFIG_ROW.name && row?.value === V2_CONFIG_ROW.value);
|
|
134
|
+
if (at >= 0)
|
|
135
|
+
context.splice(at, 1);
|
|
136
|
+
}
|
|
137
|
+
}
|
package/dist/case/preserve.d.ts
CHANGED
|
@@ -385,7 +385,8 @@ export interface CaseJsonPreservation {
|
|
|
385
385
|
omitInputDefaults?: string[];
|
|
386
386
|
/**
|
|
387
387
|
* Metadata keys the serializer always writes that the source document did not
|
|
388
|
-
* carry (only `caseAppEnabled`, `caseIdentifierType`, `publishVersion
|
|
388
|
+
* carry (only `caseAppEnabled`, `caseIdentifierType`, `publishVersion`,
|
|
389
|
+
* `intsvcActivityConfig`).
|
|
389
390
|
* Compile drops such a key while it still holds what the platform reads for
|
|
390
391
|
* an absent one: the Case Designer's in-memory to canvas converter fills
|
|
391
392
|
* `caseAppEnabled ?? true` and `caseIdentifierType ?? "constant"`, and
|
|
@@ -437,6 +438,14 @@ export interface CaseJsonPreservation {
|
|
|
437
438
|
* (`case/connector-saved-context.ts`).
|
|
438
439
|
*/
|
|
439
440
|
connectorContexts?: PreservedConnectorContext[];
|
|
441
|
+
/**
|
|
442
|
+
* The connector elements (`task:<task id>`, `rule:<rule id>` or
|
|
443
|
+
* `trigger:<node id>`, with no stage, so a task moved to another stage still
|
|
444
|
+
* matches) whose own context said `activityConfigurationVersion: v2` in a plan with no
|
|
445
|
+
* `intsvcActivityConfig: "v2"` marker. The Designer reads that row before the
|
|
446
|
+
* marker, so compile writes it back on them (`case/intsvc-activity-config.ts`).
|
|
447
|
+
*/
|
|
448
|
+
connectorConfigV2?: string[];
|
|
440
449
|
/**
|
|
441
450
|
* Each Designer-saved connector element's own io rows (an event trigger, a
|
|
442
451
|
* wait-for-connector task or rule, a connector activity task): its request
|
|
@@ -645,7 +654,7 @@ export declare function caseJsonPreservation(built: BuiltCase): CaseJsonPreserva
|
|
|
645
654
|
export declare function preservedBindings(bindings: Bindings | undefined, payload: CaseJsonPreservation | undefined): Bindings | undefined;
|
|
646
655
|
export declare function preservedBindings(bindings: BindingsView | undefined, payload: CaseJsonPreservation | undefined): BindingsView | undefined;
|
|
647
656
|
/** A metadata key whose absence {@link CaseJsonPreservation.omitMetadata} records. */
|
|
648
|
-
export type PreservedMetadataKey = 'caseAppEnabled' | 'caseIdentifierType' | 'publishVersion';
|
|
657
|
+
export type PreservedMetadataKey = 'caseAppEnabled' | 'caseIdentifierType' | 'publishVersion' | 'intsvcActivityConfig';
|
|
649
658
|
/**
|
|
650
659
|
* @internal
|
|
651
660
|
* What the platform reads for each {@link PreservedMetadataKey} the document
|
package/dist/case/preserve.js
CHANGED
|
@@ -184,6 +184,10 @@ export const METADATA_ABSENT_READING = {
|
|
|
184
184
|
caseAppEnabled: true,
|
|
185
185
|
caseIdentifierType: 'constant',
|
|
186
186
|
publishVersion: undefined,
|
|
187
|
+
// Absent reads as the older V1 Integration Service configuration, and compile
|
|
188
|
+
// writes "v2" on a new case (intsvc-activity-config.ts): a plan saved with
|
|
189
|
+
// none keeps none.
|
|
190
|
+
intsvcActivityConfig: undefined,
|
|
187
191
|
};
|
|
188
192
|
const TOP_LEVEL_KEYS = new Set([
|
|
189
193
|
'id', 'name', 'description', 'version', 'bindings', 'variables', 'metadata', 'nodes', 'edges', 'layout',
|
|
@@ -272,6 +276,9 @@ export function caseJsonPreservationErrors(payload) {
|
|
|
272
276
|
errors.push('preserved publishVersion must be a number');
|
|
273
277
|
if (payload.publishVersion !== undefined && payload.omitMetadata?.includes('publishVersion'))
|
|
274
278
|
errors.push('preserved publishVersion cannot also be recorded as omitted');
|
|
279
|
+
if (payload.metadata !== undefined && Object.prototype.hasOwnProperty.call(payload.metadata, 'intsvcActivityConfig')
|
|
280
|
+
&& payload.omitMetadata?.includes('intsvcActivityConfig'))
|
|
281
|
+
errors.push('preserved metadata.intsvcActivityConfig cannot also be recorded as omitted: keep the value, or the omitMetadata entry, not both');
|
|
275
282
|
for (const name of Object.keys(payload.caseAppConfigFields?.fields ?? {}))
|
|
276
283
|
if (!PRESERVED_CASE_APP_CONFIG_KEYS.has(name))
|
|
277
284
|
errors.push(`caseAppConfig field "${name}" is not an allowed preserved platform field`);
|
|
@@ -474,6 +481,9 @@ export function caseJsonPreservationErrors(payload) {
|
|
|
474
481
|
errors.push(`preserved http-request metadata of task "${entry?.task}" must be an object`);
|
|
475
482
|
}
|
|
476
483
|
errors.push(...connectorContextErrors(payload.connectorContexts));
|
|
484
|
+
if (payload.connectorConfigV2 !== undefined
|
|
485
|
+
&& (!Array.isArray(payload.connectorConfigV2) || payload.connectorConfigV2.some((key) => typeof key !== 'string' || !key)))
|
|
486
|
+
errors.push('preserved connectorConfigV2 must be a list of connector element keys (task:<id>, rule:<id> or trigger:<id>)');
|
|
477
487
|
errors.push(...connectorRowErrors(payload.connectorRows));
|
|
478
488
|
for (const index of payload.manualTriggerServiceTypeNone ?? [])
|
|
479
489
|
if (!Number.isInteger(index) || index < 0)
|
package/dist/case/serialize.d.ts
CHANGED
|
@@ -62,7 +62,7 @@ export interface CaseSerializeOpts {
|
|
|
62
62
|
}
|
|
63
63
|
/** A warning `serialize` reports through {@link CaseSerializeOpts.warn}. */
|
|
64
64
|
export interface CaseSerializeWarning {
|
|
65
|
-
code: 'CONNECTION_STUB' | 'SLA_PIN_DROPPED';
|
|
65
|
+
code: 'CONNECTION_STUB' | 'SLA_PIN_DROPPED' | 'CONNECTOR_CONFIG_V2_DEFAULT';
|
|
66
66
|
message: string;
|
|
67
67
|
}
|
|
68
68
|
/**
|
package/dist/case/serialize.js
CHANGED
|
@@ -26,6 +26,7 @@ import { CASE_FILTER_SPELLING, caseSubscriptionBody, caseSubscriptionOwners, res
|
|
|
26
26
|
import { dedupeConditionNames } from './rule-names.js';
|
|
27
27
|
import { EXTERNAL_TASK_DESCRIPTOR_CONTRACT, externalDescriptorRefusal, externalExecution, externalServiceType, } from './external.js';
|
|
28
28
|
import { CASE_FORMAT_PROFILE, CASE_SCHEMA_VERSIONS, caseVersionMismatch } from './format-profile.js';
|
|
29
|
+
import { defaultIntsvcActivityConfig, INTSVC_ACTIVITY_CONFIG, stampConnectorConfigVersion, unstampConnectorConfigVersion } from './intsvc-activity-config.js';
|
|
29
30
|
import { isInSolutionKey, isResourceLabelRefusal, resolveResourceRef, resourceIdentity, SOLUTION_FOLDER } from './resource-identity.js';
|
|
30
31
|
import { bindingRefId, readBindingIds, resourceBindingOf, resourceBindingRow, resourceBindingSeed, savedResourceWire, typedFolder, } from './resource-wire.js';
|
|
31
32
|
import { ownEntry } from '../core/own-entry.js';
|
|
@@ -430,7 +431,11 @@ function serializeCase(built, opts) {
|
|
|
430
431
|
};
|
|
431
432
|
ELEMENT_SEEDED_IDS.set(result, resolver.elementSeededIds);
|
|
432
433
|
WRITTEN_SUBSCRIPTIONS.set(result, resolver.subscriptions);
|
|
433
|
-
const
|
|
434
|
+
const preservation = caseJsonPreservation(built);
|
|
435
|
+
const plan = applyAuthorLayout(applyPreservation(result, preservation, opts.warn ? { warn: opts.warn } : {}), built.layout);
|
|
436
|
+
// After preservation, which carries a saved marker or its saved absence.
|
|
437
|
+
defaultIntsvcActivityConfig(plan, preservation, opts.warn);
|
|
438
|
+
stampConnectorConfigVersion(plan);
|
|
434
439
|
// Last, over the finished document: V32 requires case-unique condition names,
|
|
435
440
|
// and an author (or a decompiled pre-V32 plan) can repeat one. Rename the
|
|
436
441
|
// repeats the way the platform's V31/V32.0.1 migrations would, so the file is
|
|
@@ -476,48 +481,6 @@ function lowerPlanTaskOutputRefs(plan) {
|
|
|
476
481
|
};
|
|
477
482
|
walk(plan);
|
|
478
483
|
}
|
|
479
|
-
/** The task types whose `data.context[]` carries an Integration Service activity configuration. */
|
|
480
|
-
const CONNECTOR_CONFIG_TASK_TYPES = new Set([
|
|
481
|
-
'execute-connector-activity',
|
|
482
|
-
'wait-for-connector',
|
|
483
|
-
'external-agent',
|
|
484
|
-
'external-workflow',
|
|
485
|
-
]);
|
|
486
|
-
const V2_CONFIG_ROW = { name: 'activityConfigurationVersion', value: 'v2', type: 'string' };
|
|
487
|
-
/**
|
|
488
|
-
* Flagged-V2 plans: mark each connector task's and event trigger's context
|
|
489
|
-
* `activityConfigurationVersion: v2`, as the Designer and CLI do. Runs
|
|
490
|
-
* post-preservation because the flag is preserved metadata.
|
|
491
|
-
*
|
|
492
|
-
* Only a context bound to a connection is marked. A placeholder bag
|
|
493
|
-
* (`connectorKey` + `operation`, or a trigger's lone `objectName`) has no
|
|
494
|
-
* configuration panel to pick. A context that already carries the row keeps it.
|
|
495
|
-
*/
|
|
496
|
-
function stampConnectorConfigVersion(result) {
|
|
497
|
-
const metadata = result.metadata;
|
|
498
|
-
if (metadata?.intsvcActivityConfig !== 'v2')
|
|
499
|
-
return result;
|
|
500
|
-
const stamp = (context) => {
|
|
501
|
-
if (!Array.isArray(context))
|
|
502
|
-
return;
|
|
503
|
-
if (!context.some((row) => row?.name === 'connection'))
|
|
504
|
-
return;
|
|
505
|
-
if (context.some((row) => row?.name === V2_CONFIG_ROW.name))
|
|
506
|
-
return;
|
|
507
|
-
context.push({ ...V2_CONFIG_ROW });
|
|
508
|
-
};
|
|
509
|
-
for (const node of result.nodes ?? []) {
|
|
510
|
-
if (node?.type === 'case-management:Trigger' || node?.type === 'uipath.case.trigger')
|
|
511
|
-
stamp(node.data?.[CASE_FORMAT_PROFILE.triggerBagField]?.context);
|
|
512
|
-
for (const lane of node?.data?.tasks ?? []) {
|
|
513
|
-
for (const task of Array.isArray(lane) ? lane : []) {
|
|
514
|
-
if (CONNECTOR_CONFIG_TASK_TYPES.has(task?.type))
|
|
515
|
-
stamp(task.data?.context);
|
|
516
|
-
}
|
|
517
|
-
}
|
|
518
|
-
}
|
|
519
|
-
return result;
|
|
520
|
-
}
|
|
521
484
|
export { CASE_NODE_LAYOUT_FIELDS };
|
|
522
485
|
/**
|
|
523
486
|
* Resolve author-level layout names only after preservation has restored foreign
|
|
@@ -602,6 +565,11 @@ export function applyPreservation(result, preservation, options = {}) {
|
|
|
602
565
|
if (absent === undefined || metadata[name] === absent)
|
|
603
566
|
delete metadata[name];
|
|
604
567
|
}
|
|
568
|
+
// The V2 context rows follow the settled marker. `mergeCase` lays this over
|
|
569
|
+
// a plan compile already stamped, so when the original has no marker the rows
|
|
570
|
+
// go too, except on the elements that carried their own (`connectorConfigV2`).
|
|
571
|
+
if (metadata[INTSVC_ACTIVITY_CONFIG] !== 'v2')
|
|
572
|
+
unstampConnectorConfigVersion(result, preservation.connectorConfigV2);
|
|
605
573
|
const caseAppConfig = result.metadata.caseAppConfig;
|
|
606
574
|
if (caseAppConfig && preservation.caseAppConfigFields) {
|
|
607
575
|
for (const [field, value] of Object.entries(preservation.caseAppConfigFields.fields ?? {})) {
|