@uipath/maestro-builder-sdk 6.59.0 → 6.59.1
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 +9 -3
- package/dist/api-members.md +39 -17
- package/dist/core/dotnet-types.d.ts +23 -0
- package/dist/core/dotnet-types.js +80 -0
- package/dist/core/refusals.d.ts +5 -0
- package/dist/core/refusals.js +5 -0
- package/dist/nodes/agent/flow/resources.d.ts +0 -9
- package/dist/nodes/agent/flow/resources.js +2 -13
- package/dist/nodes/hitl/flow/action-schema.d.ts +63 -0
- package/dist/nodes/hitl/flow/action-schema.js +228 -0
- package/dist/nodes/hitl/flow/check.js +63 -3
- package/dist/nodes/hitl/flow/node-type.js +22 -0
- package/dist/nodes/hitl/flow/spec.d.ts +99 -0
- package/package.json +2 -2
package/dist/api-index.md
CHANGED
|
@@ -37,10 +37,14 @@ could hand you spans for a version you do not have.
|
|
|
37
37
|
|
|
38
38
|
## `@uipath/maestro-builder-sdk`
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
242 symbol(s). Import from `@uipath/maestro-builder-sdk`.
|
|
41
41
|
|
|
42
42
|
| Symbol | Kind | Declaration | Area | Summary |
|
|
43
43
|
| --- | --- | --- | --- | --- |
|
|
44
|
+
| `ActionSchema` | type | `dist/nodes/hitl/flow/spec.d.ts:283-284` | Supporting types | An Action App's action schema, in either spelling. |
|
|
45
|
+
| `ActionSchemaFile` | interface | `dist/nodes/hitl/flow/spec.d.ts:246-256` | Supporting types | A coded action app's `action-schema.json`. |
|
|
46
|
+
| `ActionSchemaProperty` | interface | `dist/nodes/hitl/flow/spec.d.ts:220-238` | Supporting types | One property of an `action-schema.json` section. |
|
|
47
|
+
| `ActionSchemaSection` | interface | `dist/nodes/hitl/flow/spec.d.ts:239-245` | Supporting types | One section (`inputs`, `outputs`, `inOuts`, `outcomes`) of an `action-schema.json`. |
|
|
44
48
|
| `ActionSpec` | type | `dist/core/actions.d.ts:847-855` | Supporting types | One action step's spec: `{ kind }` plus that kind's body from FlowActionSpecs, for every kind there. |
|
|
45
49
|
| `agent` | function | `dist/nodes/process/flow/factories.d.ts:159-213` | Actions | Invoke an AGENT resource — either one published to Orchestrator or a sibling agent project registered in the same… |
|
|
46
50
|
| `AgentFlavour` | type | `dist/nodes/process/flow/spec.d.ts:260-264` | Supporting types | Which KIND of agent project was published behind a `uipath.core.agent.<key>` resource. |
|
|
@@ -57,7 +61,7 @@ could hand you spans for a version you do not have.
|
|
|
57
61
|
| `AggregationOperation` | type | `dist/nodes/transform/flow/spec.d.ts:35` | Supporting types | |
|
|
58
62
|
| `apiWorkflow` | function | `dist/nodes/process/flow/factories.d.ts:53-87` | Actions | Invoke a deployed API workflow — a coded workflow published to Orchestrator, run as a serverless job rather than by a… |
|
|
59
63
|
| `ApiWorkflowInputs` | interface | `dist/nodes/process/flow/spec.d.ts:70-101` | Option shapes | 5 field(s) |
|
|
60
|
-
| `AppRef` | interface | `dist/nodes/hitl/flow/spec.d.ts:140-
|
|
64
|
+
| `AppRef` | interface | `dist/nodes/hitl/flow/spec.d.ts:140-219` | Supporting types | A deployed Action App that supplies a human task's form — the `'action-app'` variant's subject. |
|
|
61
65
|
| `ArmBuilder` | class | `dist/flow-sdk.d.ts:1364-1387` | Builders | The sub-builder an ARM callback receives — a `StepList` that can also name itself with `.label(...)`. |
|
|
62
66
|
| `AskedField` | interface | `dist/core/actions.d.ts:221-240` | Supporting types | A value the reviewer FILLS IN: read downstream with `out('<step>', '<id>')`. |
|
|
63
67
|
| `at` | function | `dist/flow-sdk.d.ts:693-721` | Flow construction | A node's layout at a canvas position — the short form of a NodeLayout for the `nodes` map of FlowBuilder.layout. |
|
|
@@ -160,7 +164,7 @@ could hand you spans for a version you do not have.
|
|
|
160
164
|
| `HitlAssigneeType` | type | `dist/nodes/hitl/flow/spec.d.ts:16-23` | Supporting types | How the task is assigned, the platform's own vocabulary (canvas `HITL_ASSIGNEE_TYPE`): `'user'` a single user, `'group'`… |
|
|
161
165
|
| `HitlChannel` | type | `dist/nodes/hitl/flow/spec.d.ts:10-15` | Supporting types | Where the task is delivered. |
|
|
162
166
|
| `HitlConnection` | interface | `dist/nodes/hitl/flow/spec.d.ts:24-32` | Supporting types | A per-channel Integration Service connection (Slack / Teams delivery). |
|
|
163
|
-
| `HitlInputs` | interface | `dist/nodes/hitl/flow/spec.d.ts:
|
|
167
|
+
| `HitlInputs` | interface | `dist/nodes/hitl/flow/spec.d.ts:285-389` | Option shapes | 12 field(s) |
|
|
164
168
|
| `HitlRecipient` | interface | `dist/nodes/hitl/flow/spec.d.ts:33-69` | Supporting types | Who gets the task and over which channels. |
|
|
165
169
|
| `HitlVariant` | type | `dist/nodes/hitl/flow/spec.d.ts:114-139` | Supporting types | WHICH human-task node type to emit. |
|
|
166
170
|
| `http` | function | `dist/nodes/http/flow/factories.d.ts:7-14` | Actions | Declare an HTTP request action, explicitly choosing standalone or managed. |
|
|
@@ -204,6 +208,8 @@ could hand you spans for a version you do not have.
|
|
|
204
208
|
| `Outcome` | type | `dist/nodes/hitl/flow/spec.d.ts:94-113` | Supporting types | One completion button. |
|
|
205
209
|
| `OutputColumn` | interface | `dist/nodes/ai-patterns/flow/spec.d.ts:41-47` | Supporting types | One column Batch Transform appends to the CSV. |
|
|
206
210
|
| `ParallelOptions` | interface | `dist/flow-sdk.d.ts:447-470` | Option shapes | The options of `.parallel()`: the join's NodeOptions, plus the fork node when the flow has one. |
|
|
211
|
+
| `PlatformActionSchema` | interface | `dist/nodes/hitl/flow/spec.d.ts:270-282` | Supporting types | The platform's action schema (Apps API, a solution's `spec.actionSchema`). |
|
|
212
|
+
| `PlatformActionSchemaArg` | interface | `dist/nodes/hitl/flow/spec.d.ts:257-269` | Supporting types | One argument of the platform's action schema. |
|
|
207
213
|
| `PortArm` | interface | `dist/flow-sdk.d.ts:380-392` | Supporting types | One arm of a built `.stepSwitch` — the same shape as SwitchArm, but `value` names an exit the ACTION declares (a… |
|
|
208
214
|
| `ProcessLocation` | type | `dist/core/actions.d.ts:260-265` | Supporting types | Where a process resource lives: deployed to an Orchestrator folder (`'published'`, the default) or a sibling project of… |
|
|
209
215
|
| `ProcessToolKind` | type | `dist/core/actions.d.ts:622-635` | Supporting types | The tool kinds that wrap a DEPLOYED tenant resource. |
|
package/dist/api-members.md
CHANGED
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
|
|
6
6
|
# Maestro Builder SDK — member index
|
|
7
7
|
|
|
8
|
-
**A lookup table of
|
|
8
|
+
**A lookup table of 1224 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 —
|
|
14
|
-
|
|
13
|
+
Every field and method of every exported shape — 1224 across
|
|
14
|
+
223 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
|
|
17
17
|
the case: the reference pages are "one line per field", so you arrive holding
|
|
@@ -28,7 +28,7 @@ truncated summary would, for less. Read the span.
|
|
|
28
28
|
Member names repeat across shapes (`name` is declared on 69 of them), so the
|
|
29
29
|
`Declared on` column is what makes a match actionable. For the whole shape
|
|
30
30
|
rather than the one field, look that name up in [`api-index.md`](api-index.md) —
|
|
31
|
-
which is why its span is not repeated on all
|
|
31
|
+
which is why its span is not repeated on all 1224 rows here.
|
|
32
32
|
|
|
33
33
|
**A name that misses both indexes is probably not part of the API.** The one
|
|
34
34
|
that comes up is a RUNTIME output key — a human task's `Action`, a step's
|
|
@@ -50,6 +50,7 @@ not find it either.
|
|
|
50
50
|
| `action` | method | `TaskBuilder` | `dist/case/case-sdk.d.ts:997-1022` |
|
|
51
51
|
| `actionCatalogName` | property | `ActionSpecData` | `dist/case/case-sdk.d.ts:558-563` |
|
|
52
52
|
| `actions` | property | `HumanTaskAppOpts` | `dist/bpmn/bpmn-sdk.d.ts:1403-1412` |
|
|
53
|
+
| `actionSchema` | property | `AppRef` | `dist/nodes/hitl/flow/spec.d.ts:185-209` |
|
|
53
54
|
| `activity` | method | `ScopeBuilder` | `dist/bpmn/bpmn-sdk.d.ts:2966-2999` |
|
|
54
55
|
| `additionalOutputs` | property | `RegistryTypeSpec` | `dist/bpmn/typed-node.d.ts:98-102` |
|
|
55
56
|
| `agent` | property | `FlowActionSpecs` | `dist/nodes/process/flow/spec.d.ts:381-384` |
|
|
@@ -63,7 +64,7 @@ not find it either.
|
|
|
63
64
|
| `apiWorkflow` | property | `FlowActionSpecs` | `dist/nodes/process/flow/spec.d.ts:369-372` |
|
|
64
65
|
| `apiWorkflow` | method | `TaskBuilder` | `dist/case/case-sdk.d.ts:903-912` |
|
|
65
66
|
| `app` | property | `EscalationRef` | `dist/core/actions.d.ts:729-756` |
|
|
66
|
-
| `app` | property | `HitlInputs` | `dist/nodes/hitl/flow/spec.d.ts:
|
|
67
|
+
| `app` | property | `HitlInputs` | `dist/nodes/hitl/flow/spec.d.ts:291-295` |
|
|
67
68
|
| `app` | property | `HumanTaskAppOpts` | `dist/bpmn/bpmn-sdk.d.ts:1397-1398` |
|
|
68
69
|
| `app` | property | `HumanTaskFormOpts` | `dist/bpmn/bpmn-sdk.d.ts:1435-1436` |
|
|
69
70
|
| `appSystemName` | property | `AppRef` | `dist/nodes/hitl/flow/spec.d.ts:170-175` |
|
|
@@ -225,6 +226,7 @@ not find it either.
|
|
|
225
226
|
| `definitions` | method | `FlowBuilder` | `dist/flow-sdk.d.ts:1621-1661` |
|
|
226
227
|
| `delay` | property | `FlowActionSpecs` | `dist/nodes/delay/flow/spec.d.ts:38-41` |
|
|
227
228
|
| `dependsOn` | property | `LookupSpec` | `dist/core/lookups.d.ts:34-35` |
|
|
229
|
+
| `description` | property | `ActionSchemaProperty` | `dist/nodes/hitl/flow/spec.d.ts:230-231` |
|
|
228
230
|
| `description` | property | `AgentMemoryRef` | `dist/core/actions.d.ts:551` |
|
|
229
231
|
| `description` | property | `BuiltCase` | `dist/case/case-sdk.d.ts:768` |
|
|
230
232
|
| `description` | property | `BuiltFlow` | `dist/flow-sdk.d.ts:837-838` |
|
|
@@ -283,7 +285,7 @@ not find it either.
|
|
|
283
285
|
| `displayName` | property | `RegistryInputField` | `dist/bpmn/typed-node.d.ts:65` |
|
|
284
286
|
| `displayName` | property | `SlaOpts` | `dist/case/case-sdk.d.ts:178-183` |
|
|
285
287
|
| `displayName` | property | `TriggerMeta` | `dist/core/connectors.d.ts:127-128` |
|
|
286
|
-
| `document` | property | `HitlInputs` | `dist/nodes/hitl/flow/spec.d.ts:
|
|
288
|
+
| `document` | property | `HitlInputs` | `dist/nodes/hitl/flow/spec.d.ts:384-388` |
|
|
287
289
|
| `documentClassify` | property | `FlowActionSpecs` | `dist/nodes/document/flow/spec.d.ts:152-155` |
|
|
288
290
|
| `documentId` | property | `DocValidationInputs` | `dist/nodes/hitl/flow/spec.d.ts:84-85` |
|
|
289
291
|
| `doWhile` | method | `StepList` | `dist/flow-sdk.d.ts:1198-1222` |
|
|
@@ -359,7 +361,7 @@ not find it either.
|
|
|
359
361
|
| `exitToStage` | property | `ExitOpts` | `dist/case/case-sdk.d.ts:816-830` |
|
|
360
362
|
| `exitWhen` | method | `StageBuilder` | `dist/case/case-sdk.d.ts:1250-1257` |
|
|
361
363
|
| `exponentialBase` | property | `RetrySpec` | `dist/bpmn/bpmn-sdk.d.ts:835-836` |
|
|
362
|
-
| `exposeError` | property | `HitlInputs` | `dist/nodes/hitl/flow/spec.d.ts:
|
|
364
|
+
| `exposeError` | property | `HitlInputs` | `dist/nodes/hitl/flow/spec.d.ts:344-350` |
|
|
363
365
|
| `expression` | property | `BuiltSla` | `dist/case/case-sdk.d.ts:199-200` |
|
|
364
366
|
| `expression` | property | `RuleOpts` | `dist/case/case-sdk.d.ts:83-84` |
|
|
365
367
|
| `expression` | property | `WhenExpression` | `dist/case/case-sdk.d.ts:109-110` |
|
|
@@ -377,7 +379,7 @@ not find it either.
|
|
|
377
379
|
| `field` | property | `LookupResolution` | `dist/core/lookups.d.ts:168` |
|
|
378
380
|
| `fields` | property | `DataFabricReadInputs` | `dist/nodes/data-fabric/flow/spec.d.ts:105-106` |
|
|
379
381
|
| `fields` | property | `EscalationRef` | `dist/core/actions.d.ts:724-728` |
|
|
380
|
-
| `fields` | property | `HitlInputs` | `dist/nodes/hitl/flow/spec.d.ts:
|
|
382
|
+
| `fields` | property | `HitlInputs` | `dist/nodes/hitl/flow/spec.d.ts:300-309` |
|
|
381
383
|
| `fields` | property | `HumanTaskForm` | `dist/bpmn/human-task-form.d.ts:85-86` |
|
|
382
384
|
| `fileExtension` | property | `BuiltinToolRef` | `dist/core/actions.d.ts:579-580` |
|
|
383
385
|
| `fileExtension` | property | `ContextIndexRef` | `dist/core/actions.d.ts:805-806` |
|
|
@@ -438,6 +440,7 @@ not find it either.
|
|
|
438
440
|
| `form` | property | `AgenticProcessInputsBase` | `dist/nodes/process/flow/spec.d.ts:210-217` |
|
|
439
441
|
| `form` | property | `HumanTaskAppOpts` | `dist/bpmn/bpmn-sdk.d.ts:1399-1400` |
|
|
440
442
|
| `form` | property | `HumanTaskFormOpts` | `dist/bpmn/bpmn-sdk.d.ts:1433-1434` |
|
|
443
|
+
| `format` | property | `ActionSchemaProperty` | `dist/nodes/hitl/flow/spec.d.ts:232-233` |
|
|
441
444
|
| `from` | property | `CreateOutgoingCallInputs` | `dist/nodes/agent/flow/spec.d.ts:88-92` |
|
|
442
445
|
| `function` | method | `TaskBuilder` | `dist/case/case-sdk.d.ts:935-950` |
|
|
443
446
|
| `goto` | method | `PathBuilder` | `dist/bpmn/bpmn-sdk.d.ts:3374-3398` |
|
|
@@ -451,7 +454,7 @@ not find it either.
|
|
|
451
454
|
| `height` | property | `StickyNote` | `dist/flow-sdk.d.ts:804-805` |
|
|
452
455
|
| `hidden` | property | `RegistryContextField` | `dist/bpmn/typed-node.d.ts:27` |
|
|
453
456
|
| `hidden` | property | `RegistryInputField` | `dist/bpmn/typed-node.d.ts:68` |
|
|
454
|
-
| `hitl` | property | `FlowActionSpecs` | `dist/nodes/hitl/flow/spec.d.ts:
|
|
457
|
+
| `hitl` | property | `FlowActionSpecs` | `dist/nodes/hitl/flow/spec.d.ts:392-395` |
|
|
455
458
|
| `http` | property | `FlowActionSpecs` | `dist/nodes/http/flow/spec.d.ts:145-148` |
|
|
456
459
|
| `http` | method | `ScopeBuilder` | `dist/bpmn/bpmn-sdk.d.ts:2462-2496` |
|
|
457
460
|
| `humanTask` | method | `ScopeBuilder` | `dist/bpmn/bpmn-sdk.d.ts:2719-2802` |
|
|
@@ -497,6 +500,8 @@ not find it either.
|
|
|
497
500
|
| `inclusive` | property | `ChooseOpts` | `dist/bpmn/bpmn-sdk.d.ts:1906-1910` |
|
|
498
501
|
| `inclusiveGateway` | method | `ScopeBuilder` | `dist/bpmn/bpmn-sdk.d.ts:2362-2369` |
|
|
499
502
|
| `inlineAgent` | property | `FlowActionSpecs` | `dist/nodes/agent/flow/spec.d.ts:443-446` |
|
|
503
|
+
| `inOuts` | property | `ActionSchemaFile` | `dist/nodes/hitl/flow/spec.d.ts:252-253` |
|
|
504
|
+
| `inOuts` | property | `PlatformActionSchema` | `dist/nodes/hitl/flow/spec.d.ts:276-277` |
|
|
500
505
|
| `input` | method | `CaseBuilder` | `dist/case/case-sdk.d.ts:1402-1427` |
|
|
501
506
|
| `input` | method | `FlowBuilder` | `dist/flow-sdk.d.ts:1702-1714` |
|
|
502
507
|
| `input` | property | `HumanTaskAppOpts` | `dist/bpmn/bpmn-sdk.d.ts:1415-1416` |
|
|
@@ -505,6 +510,7 @@ not find it either.
|
|
|
505
510
|
| `inputName` | property | `RegistryTypeSpec` | `dist/bpmn/typed-node.d.ts:92` |
|
|
506
511
|
| `inputPattern` | property | `RegistryTypeSpec` | `dist/bpmn/typed-node.d.ts:91` |
|
|
507
512
|
| `inputRows` | property | `ActivityNodeOpts` | `dist/bpmn/bpmn-sdk.d.ts:1618-1626` |
|
|
513
|
+
| `inputs` | property | `ActionSchemaFile` | `dist/nodes/hitl/flow/spec.d.ts:248-249` |
|
|
508
514
|
| `inputs` | property | `ActionSpecData` | `dist/case/case-sdk.d.ts:564-565` |
|
|
509
515
|
| `inputs` | property | `ActivityNodeOpts` | `dist/bpmn/bpmn-sdk.d.ts:1616-1617` |
|
|
510
516
|
| `inputs` | property | `AgenticProcessInputsBase` | `dist/nodes/process/flow/spec.d.ts:204-209` |
|
|
@@ -518,6 +524,7 @@ not find it either.
|
|
|
518
524
|
| `inputs` | property | `ExternalTaskOptions` | `dist/case/case-sdk.d.ts:455-456` |
|
|
519
525
|
| `inputs` | property | `InlineAgentInputs` | `dist/nodes/agent/flow/spec.d.ts:228-258` |
|
|
520
526
|
| `inputs` | property | `NodeContribution` | `dist/core/node-classes.d.ts:113-117` |
|
|
527
|
+
| `inputs` | property | `PlatformActionSchema` | `dist/nodes/hitl/flow/spec.d.ts:272-273` |
|
|
521
528
|
| `inputs` | property | `ProcessToolRef` | `dist/core/actions.d.ts:661-662` |
|
|
522
529
|
| `inputs` | property | `PublishedFunctionInputs` | `dist/nodes/process/flow/spec.d.ts:150-151` |
|
|
523
530
|
| `inputs` | property | `RegistryTypeSpec` | `dist/bpmn/typed-node.d.ts:95-96` |
|
|
@@ -527,6 +534,7 @@ not find it either.
|
|
|
527
534
|
| `inputs` | method | `TaskBuilder` | `dist/case/case-sdk.d.ts:1112-1124` |
|
|
528
535
|
| `inputs` | property | `VoiceAgentInputs` | `dist/nodes/agent/flow/spec.d.ts:136-141` |
|
|
529
536
|
| `inputSchema` | property | `ActivityNodeOpts` | `dist/bpmn/bpmn-sdk.d.ts:1669-1677` |
|
|
537
|
+
| `inputSchema` | property | `AppRef` | `dist/nodes/hitl/flow/spec.d.ts:210-218` |
|
|
530
538
|
| `inputSchema` | property | `ScriptTaskOpts` | `dist/bpmn/bpmn-sdk.d.ts:953-964` |
|
|
531
539
|
| `inputTarget` | property | `RegistryTypeSpec` | `dist/bpmn/typed-node.d.ts:93` |
|
|
532
540
|
| `intermediateCatchEvent` | method | `ScopeBuilder` | `dist/bpmn/bpmn-sdk.d.ts:2319-2326` |
|
|
@@ -541,9 +549,11 @@ not find it either.
|
|
|
541
549
|
| `isDynamic` | property | `RegistryTypeSpec` | `dist/bpmn/typed-node.d.ts:107-114` |
|
|
542
550
|
| `isInterrupting` | property | `BuiltEntryCondition` | `dist/case/case-sdk.d.ts:322` |
|
|
543
551
|
| `isInterrupting` | property | `EntryOpts` | `dist/case/case-sdk.d.ts:798` |
|
|
552
|
+
| `isList` | property | `PlatformActionSchemaArg` | `dist/nodes/hitl/flow/spec.d.ts:265-266` |
|
|
544
553
|
| `isNot` | property | `FormFieldCondition` | `dist/core/actions.d.ts:123-124` |
|
|
545
554
|
| `item` | property | `QueueItemInputs` | `dist/nodes/queue/flow/spec.d.ts:26-31` |
|
|
546
555
|
| `item` | property | `QueueItemOpts` | `dist/bpmn/bpmn-sdk.d.ts:1342-1343` |
|
|
556
|
+
| `items` | property | `ActionSchemaProperty` | `dist/nodes/hitl/flow/spec.d.ts:234-235` |
|
|
547
557
|
| `itemVar` | property | `LoopSpec` | `dist/bpmn/bpmn-sdk.d.ts:83-84` |
|
|
548
558
|
| `ixpExtract` | property | `FlowActionSpecs` | `dist/nodes/document/flow/spec.d.ts:160-163` |
|
|
549
559
|
| `join` | property | `ChooseOpts` | `dist/bpmn/bpmn-sdk.d.ts:1911-1912` |
|
|
@@ -588,14 +598,14 @@ not find it either.
|
|
|
588
598
|
| `label` | property | `SwitchArm` | `dist/flow-sdk.d.ts:370` |
|
|
589
599
|
| `labels` | property | `ActionSpecData` | `dist/case/case-sdk.d.ts:556-557` |
|
|
590
600
|
| `labels` | property | `EscalationRef` | `dist/core/actions.d.ts:769-770` |
|
|
591
|
-
| `labels` | property | `HitlInputs` | `dist/nodes/hitl/flow/spec.d.ts:
|
|
601
|
+
| `labels` | property | `HitlInputs` | `dist/nodes/hitl/flow/spec.d.ts:327-328` |
|
|
592
602
|
| `labels` | property | `HumanTaskFormOpts` | `dist/bpmn/bpmn-sdk.d.ts:1439-1440` |
|
|
593
603
|
| `lanes` | property | `BuiltStage` | `dist/case/case-sdk.d.ts:639` |
|
|
594
604
|
| `layout` | property | `BuiltCase` | `dist/case/case-sdk.d.ts:783-784` |
|
|
595
605
|
| `layout` | property | `BuiltFlow` | `dist/flow-sdk.d.ts:856-857` |
|
|
596
606
|
| `layout` | method | `CaseBuilder` | `dist/case/case-sdk.d.ts:1381-1401` |
|
|
597
607
|
| `layout` | method | `FlowBuilder` | `dist/flow-sdk.d.ts:1422-1448` |
|
|
598
|
-
| `legacyCompleted` | property | `HitlInputs` | `dist/nodes/hitl/flow/spec.d.ts:
|
|
608
|
+
| `legacyCompleted` | property | `HitlInputs` | `dist/nodes/hitl/flow/spec.d.ts:351-383` |
|
|
599
609
|
| `limit` | property | `DataFabricReadInputs` | `dist/nodes/data-fabric/flow/spec.d.ts:95-100` |
|
|
600
610
|
| `limit` | property | `DoWhileOptions` | `dist/flow-sdk.d.ts:552-553` |
|
|
601
611
|
| `literal` | property | `Expr` | `dist/core/expr.d.ts:18` |
|
|
@@ -718,6 +728,7 @@ not find it either.
|
|
|
718
728
|
| `name` | property | `OutputColumn` | `dist/nodes/ai-patterns/flow/spec.d.ts:43-44` |
|
|
719
729
|
| `name` | property | `PendingExit` | `dist/bpmn/bpmn-sdk.d.ts:2010-2011` |
|
|
720
730
|
| `name` | property | `PlainTaskOpts` | `dist/bpmn/bpmn-sdk.d.ts:1703-1704` |
|
|
731
|
+
| `name` | property | `PlatformActionSchemaArg` | `dist/nodes/hitl/flow/spec.d.ts:259-260` |
|
|
721
732
|
| `name` | property | `ProcessToolRef` | `dist/core/actions.d.ts:651-652` |
|
|
722
733
|
| `name` | property | `PublishedFunctionInputs` | `dist/nodes/process/flow/spec.d.ts:120-121` |
|
|
723
734
|
| `name` | property | `QueueItemOpts` | `dist/bpmn/bpmn-sdk.d.ts:1336-1337` |
|
|
@@ -782,10 +793,12 @@ not find it either.
|
|
|
782
793
|
| `options` | property | `FormFieldSettings` | `dist/core/actions.d.ts:192-196` |
|
|
783
794
|
| `or` | property | `DataFabricFilter` | `dist/nodes/data-fabric/flow/spec.d.ts:38-50` |
|
|
784
795
|
| `origin` | property | `PendingExit` | `dist/bpmn/bpmn-sdk.d.ts:2014-2019` |
|
|
785
|
-
| `outcomePorts` | property | `HitlInputs` | `dist/nodes/hitl/flow/spec.d.ts:
|
|
796
|
+
| `outcomePorts` | property | `HitlInputs` | `dist/nodes/hitl/flow/spec.d.ts:329-343` |
|
|
797
|
+
| `outcomes` | property | `ActionSchemaFile` | `dist/nodes/hitl/flow/spec.d.ts:254-255` |
|
|
786
798
|
| `outcomes` | property | `EscalationRef` | `dist/core/actions.d.ts:759-764` |
|
|
787
|
-
| `outcomes` | property | `HitlInputs` | `dist/nodes/hitl/flow/spec.d.ts:
|
|
799
|
+
| `outcomes` | property | `HitlInputs` | `dist/nodes/hitl/flow/spec.d.ts:310-324` |
|
|
788
800
|
| `outcomes` | property | `HumanTaskForm` | `dist/bpmn/human-task-form.d.ts:87-91` |
|
|
801
|
+
| `outcomes` | property | `PlatformActionSchema` | `dist/nodes/hitl/flow/spec.d.ts:278-279` |
|
|
789
802
|
| `output` | method | `CaseBuilder` | `dist/case/case-sdk.d.ts:1428-1440` |
|
|
790
803
|
| `output` | method | `FlowBuilder` | `dist/flow-sdk.d.ts:1715-1750` |
|
|
791
804
|
| `output` | property | `RegistryTypeSpec` | `dist/bpmn/typed-node.d.ts:97` |
|
|
@@ -794,6 +807,7 @@ not find it either.
|
|
|
794
807
|
| `outputRows` | property | `ActivityNodeOpts` | `dist/bpmn/bpmn-sdk.d.ts:1646-1652` |
|
|
795
808
|
| `outputRows` | property | `ExtensionPayload` | `dist/bpmn/bpmn-sdk.d.ts:616-617` |
|
|
796
809
|
| `outputRows` | property | `ScriptTaskOpts` | `dist/bpmn/bpmn-sdk.d.ts:943-952` |
|
|
810
|
+
| `outputs` | property | `ActionSchemaFile` | `dist/nodes/hitl/flow/spec.d.ts:250-251` |
|
|
797
811
|
| `outputs` | property | `ActionSpecData` | `dist/case/case-sdk.d.ts:566-567` |
|
|
798
812
|
| `outputs` | property | `ActivityNodeOpts` | `dist/bpmn/bpmn-sdk.d.ts:1644-1645` |
|
|
799
813
|
| `outputs` | property | `BuiltFlow` | `dist/flow-sdk.d.ts:848` |
|
|
@@ -805,6 +819,7 @@ not find it either.
|
|
|
805
819
|
| `outputs` | property | `HumanTaskCommonOpts` | `dist/bpmn/bpmn-sdk.d.ts:1372-1382` |
|
|
806
820
|
| `outputs` | property | `NodeContribution` | `dist/core/node-classes.d.ts:118-122` |
|
|
807
821
|
| `outputs` | property | `OrchestratorOpts` | `dist/bpmn/bpmn-sdk.d.ts:1302-1313` |
|
|
822
|
+
| `outputs` | property | `PlatformActionSchema` | `dist/nodes/hitl/flow/spec.d.ts:274-275` |
|
|
808
823
|
| `outputs` | property | `QueueItemOpts` | `dist/bpmn/bpmn-sdk.d.ts:1349-1360` |
|
|
809
824
|
| `outputs` | property | `ReceiveMessageOpts` | `dist/bpmn/bpmn-sdk.d.ts:1475-1490` |
|
|
810
825
|
| `outputs` | property | `ResolvedEventTriggerOpts` | `dist/case/case-sdk.d.ts:296-300` |
|
|
@@ -850,7 +865,7 @@ not find it either.
|
|
|
850
865
|
| `priority` | property | `ActionSpecData` | `dist/case/case-sdk.d.ts:551` |
|
|
851
866
|
| `priority` | property | `ErrorMappingRow` | `dist/bpmn/bpmn-sdk.d.ts:330-331` |
|
|
852
867
|
| `priority` | property | `EscalationRef` | `dist/core/actions.d.ts:767-768` |
|
|
853
|
-
| `priority` | property | `HitlInputs` | `dist/nodes/hitl/flow/spec.d.ts:
|
|
868
|
+
| `priority` | property | `HitlInputs` | `dist/nodes/hitl/flow/spec.d.ts:298-299` |
|
|
854
869
|
| `priority` | property | `HumanTaskFormOpts` | `dist/bpmn/bpmn-sdk.d.ts:1437-1438` |
|
|
855
870
|
| `priority` | property | `QueueItemInputs` | `dist/nodes/queue/flow/spec.d.ts:32-33` |
|
|
856
871
|
| `process` | property | `OrchestratorOpts` | `dist/bpmn/bpmn-sdk.d.ts:1260-1278` |
|
|
@@ -864,6 +879,8 @@ not find it either.
|
|
|
864
879
|
| `projectId` | property | `RpaWorkflowInputs` | `dist/nodes/process/flow/spec.d.ts:39-46` |
|
|
865
880
|
| `prompt` | property | `BatchTransformInputs` | `dist/nodes/ai-patterns/flow/spec.d.ts:54-55` |
|
|
866
881
|
| `prompt` | property | `SummarizeInputs` | `dist/nodes/ai-patterns/flow/spec.d.ts:32-33` |
|
|
882
|
+
| `properties` | property | `ActionSchemaProperty` | `dist/nodes/hitl/flow/spec.d.ts:236-237` |
|
|
883
|
+
| `properties` | property | `ActionSchemaSection` | `dist/nodes/hitl/flow/spec.d.ts:243-244` |
|
|
867
884
|
| `propertyAttribute` | property | `BindingContribution` | `dist/core/node-classes.d.ts:97-98` |
|
|
868
885
|
| `propertyAttribute` | property | `BindingDecl` | `dist/bpmn/bpmn-sdk.d.ts:427-428` |
|
|
869
886
|
| `propertyAttribute` | property | `BindingOpts` | `dist/bpmn/bpmn-sdk.d.ts:1069-1070` |
|
|
@@ -878,7 +895,7 @@ not find it either.
|
|
|
878
895
|
| `race` | method | `ScopeBuilder` | `dist/bpmn/bpmn-sdk.d.ts:3132-3162` |
|
|
879
896
|
| `receiveMessage` | method | `ScopeBuilder` | `dist/bpmn/bpmn-sdk.d.ts:2803-2844` |
|
|
880
897
|
| `recipient` | property | `ActionSpecData` | `dist/case/case-sdk.d.ts:552-555` |
|
|
881
|
-
| `recipient` | property | `HitlInputs` | `dist/nodes/hitl/flow/spec.d.ts:
|
|
898
|
+
| `recipient` | property | `HitlInputs` | `dist/nodes/hitl/flow/spec.d.ts:325-326` |
|
|
882
899
|
| `recipients` | property | `EscalationRef` | `dist/core/actions.d.ts:757-758` |
|
|
883
900
|
| `record` | property | `DataFabricDeleteInputs` | `dist/nodes/data-fabric/flow/spec.d.ts:195-196` |
|
|
884
901
|
| `record` | property | `DataFabricUpdateInputs` | `dist/nodes/data-fabric/flow/spec.d.ts:163-164` |
|
|
@@ -891,6 +908,7 @@ not find it either.
|
|
|
891
908
|
| `render` | property | `DocValidationInputs` | `dist/nodes/hitl/flow/spec.d.ts:86-90` |
|
|
892
909
|
| `requestedVersion` | property | `ContributionContext` | `dist/core/node-classes.d.ts:72-78` |
|
|
893
910
|
| `required` | property | `ActionField` | `dist/case/case-sdk.d.ts:531-532` |
|
|
911
|
+
| `required` | property | `ActionSchemaProperty` | `dist/nodes/hitl/flow/spec.d.ts:228-229` |
|
|
894
912
|
| `required` | property | `AskedField` | `dist/core/actions.d.ts:229-230` |
|
|
895
913
|
| `required` | property | `BpmnVarDecl` | `dist/bpmn/bpmn-sdk.d.ts:406-407` |
|
|
896
914
|
| `required` | property | `BuiltStage` | `dist/case/case-sdk.d.ts:638` |
|
|
@@ -898,6 +916,7 @@ not find it either.
|
|
|
898
916
|
| `required` | property | `HumanTaskAskedField` | `dist/bpmn/human-task-form.d.ts:55-56` |
|
|
899
917
|
| `required` | property | `HumanTaskInOutField` | `dist/bpmn/human-task-form.d.ts:71-72` |
|
|
900
918
|
| `required` | property | `InOutField` | `dist/core/actions.d.ts:256-257` |
|
|
919
|
+
| `required` | property | `PlatformActionSchemaArg` | `dist/nodes/hitl/flow/spec.d.ts:263-264` |
|
|
901
920
|
| `required` | property | `RegistryContextField` | `dist/bpmn/typed-node.d.ts:26` |
|
|
902
921
|
| `required` | property | `RegistryInputField` | `dist/bpmn/typed-node.d.ts:67` |
|
|
903
922
|
| `required` | method | `StageBuilder` | `dist/case/case-sdk.d.ts:1209-1215` |
|
|
@@ -1110,7 +1129,7 @@ not find it either.
|
|
|
1110
1129
|
| `title` | property | `ActionSpecData` | `dist/case/case-sdk.d.ts:550` |
|
|
1111
1130
|
| `title` | property | `CaseAppSection` | `dist/case/case-sdk.d.ts:690-691` |
|
|
1112
1131
|
| `title` | property | `GuardrailFieldReference` | `dist/core/actions.d.ts:298` |
|
|
1113
|
-
| `title` | property | `HitlInputs` | `dist/nodes/hitl/flow/spec.d.ts:
|
|
1132
|
+
| `title` | property | `HitlInputs` | `dist/nodes/hitl/flow/spec.d.ts:296-297` |
|
|
1114
1133
|
| `title` | property | `HumanTaskCommonOpts` | `dist/bpmn/bpmn-sdk.d.ts:1370-1371` |
|
|
1115
1134
|
| `to` | property | `CreateOutgoingCallInputs` | `dist/nodes/agent/flow/spec.d.ts:93-94` |
|
|
1116
1135
|
| `tool` | property | `BuiltinToolRef` | `dist/core/actions.d.ts:569-570` |
|
|
@@ -1130,6 +1149,8 @@ not find it either.
|
|
|
1130
1149
|
| `triggers` | property | `BuiltCase` | `dist/case/case-sdk.d.ts:781-782` |
|
|
1131
1150
|
| `triggers` | property | `CaseLayout` | `dist/case/case-sdk.d.ts:732-733` |
|
|
1132
1151
|
| `type` | property | `ActionField` | `dist/case/case-sdk.d.ts:516-517` |
|
|
1152
|
+
| `type` | property | `ActionSchemaProperty` | `dist/nodes/hitl/flow/spec.d.ts:222-227` |
|
|
1153
|
+
| `type` | property | `ActionSchemaSection` | `dist/nodes/hitl/flow/spec.d.ts:241-242` |
|
|
1133
1154
|
| `type` | property | `AskedField` | `dist/core/actions.d.ts:227` |
|
|
1134
1155
|
| `type` | property | `BindingContribution` | `dist/core/node-classes.d.ts:89-90` |
|
|
1135
1156
|
| `type` | property | `BpmnVarDecl` | `dist/bpmn/bpmn-sdk.d.ts:390-391` |
|
|
@@ -1143,6 +1164,7 @@ not find it either.
|
|
|
1143
1164
|
| `type` | property | `HumanTaskShownField` | `dist/bpmn/human-task-form.d.ts:37-38` |
|
|
1144
1165
|
| `type` | property | `InOutField` | `dist/core/actions.d.ts:252` |
|
|
1145
1166
|
| `type` | property | `JsonSchemaType` | `dist/case/case-sdk.d.ts:650` |
|
|
1167
|
+
| `type` | property | `PlatformActionSchemaArg` | `dist/nodes/hitl/flow/spec.d.ts:261-262` |
|
|
1146
1168
|
| `type` | property | `RegistryContextField` | `dist/bpmn/typed-node.d.ts:25` |
|
|
1147
1169
|
| `type` | property | `RegistryInputField` | `dist/bpmn/typed-node.d.ts:66` |
|
|
1148
1170
|
| `type` | property | `RegistryOutput` | `dist/bpmn/typed-node.d.ts:80` |
|
|
@@ -1198,7 +1220,7 @@ not find it either.
|
|
|
1198
1220
|
| `variableOrder` | property | `BpmnPreservation` | `dist/bpmn/bpmn-sdk.d.ts:480-502` |
|
|
1199
1221
|
| `variables` | property | `BuiltBpmn` | `dist/bpmn/bpmn-sdk.d.ts:513-514` |
|
|
1200
1222
|
| `variant` | property | `EscalationRef` | `dist/core/actions.d.ts:715-723` |
|
|
1201
|
-
| `variant` | property | `HitlInputs` | `dist/nodes/hitl/flow/spec.d.ts:
|
|
1223
|
+
| `variant` | property | `HitlInputs` | `dist/nodes/hitl/flow/spec.d.ts:286-290` |
|
|
1202
1224
|
| `variant` | property | `TransformInputs` | `dist/nodes/transform/flow/spec.d.ts:96-105` |
|
|
1203
1225
|
| `vars` | property | `BuiltCase` | `dist/case/case-sdk.d.ts:775` |
|
|
1204
1226
|
| `vars` | property | `BuiltFlow` | `dist/flow-sdk.d.ts:849` |
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One app argument's JSON Schema, from its .NET type — flow-workbench's
|
|
3
|
+
* `transformArgToSchemaProperty`, key for key: a list wraps its item type in an
|
|
4
|
+
* array, and nothing else of the argument (its nested `properties`, its
|
|
5
|
+
* description) is carried.
|
|
6
|
+
*/
|
|
7
|
+
export declare function dotNetTypeToJsonSchema(type: string, isList?: boolean): Record<string, unknown>;
|
|
8
|
+
/**
|
|
9
|
+
* The .NET type `uip codedapp push` gives an `action-schema.json` property of
|
|
10
|
+
* this `type` and `format` (for an array, its `items`' type and format), or
|
|
11
|
+
* `undefined` for a type it refuses. A `uuid` or `date` format wins over the type.
|
|
12
|
+
*/
|
|
13
|
+
export declare function actionSchemaFileDotNetType(type: unknown, format?: unknown): string | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* The .NET type an agent escalation's Action Center app argument of each field
|
|
16
|
+
* type carries. Studio Web serializes the task payload through
|
|
17
|
+
* `inputSchemaDotnetTypeMapping`, which the platform schema REQUIRES on an
|
|
18
|
+
* `actionCenter` channel; it reads the raw type off the app's action schema,
|
|
19
|
+
* which the SDK does not fetch, so this is the inverse of
|
|
20
|
+
* {@link dotNetTypeToJsonSchema} for the scalars and `System.Object` for the two
|
|
21
|
+
* composite types it has no single answer for.
|
|
22
|
+
*/
|
|
23
|
+
export declare const ESCALATION_DOTNET_TYPE: Readonly<Record<string, string>>;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The .NET type names an Action Center app's arguments carry, and the JSON
|
|
3
|
+
* Schema each one becomes — every direction the SDK converts in, in one place,
|
|
4
|
+
* so the tables cannot drift apart across the two families that use them (the
|
|
5
|
+
* human task's app, nodes/hitl; the agent escalation's app, nodes/agent).
|
|
6
|
+
*
|
|
7
|
+
* Three tables, from three platform sources. They do not agree with each other,
|
|
8
|
+
* and that is the platform's state, not a slip here:
|
|
9
|
+
*
|
|
10
|
+
* - {@link dotNetTypeToJsonSchema} — .NET → JSON Schema, flow-workbench's own
|
|
11
|
+
* (`@uipath/flow-schema` `agents/escalation-utils.ts`), which Studio Web's
|
|
12
|
+
* Action App picker runs to write a task's `inputs.app.inputSchema`. An
|
|
13
|
+
* unmapped type passes through AS the JSON type (`System.Object` →
|
|
14
|
+
* `{ type: 'System.Object' }`); that is the product's emission, so it is ours.
|
|
15
|
+
* - {@link actionSchemaFileDotNetType} — a coded action app's
|
|
16
|
+
* `action-schema.json` type → .NET, uipath-cli's `uip codedapp push`
|
|
17
|
+
* (`packager-tool-webapp/src/action-schema/parse.ts`
|
|
18
|
+
* `mapJsonTypeToSystemType`). `number` is `System.Decimal` and `integer`
|
|
19
|
+
* `System.Int64` there.
|
|
20
|
+
* - {@link ESCALATION_DOTNET_TYPE} — an agent escalation field type → .NET, the
|
|
21
|
+
* SDK's own inverse of the first for the scalars (`number` is `System.Double`
|
|
22
|
+
* and `integer` `System.Int32`), written onto `inputSchemaDotnetTypeMapping`.
|
|
23
|
+
*/
|
|
24
|
+
import { ownEntry } from './own-entry.js';
|
|
25
|
+
const DOTNET_STRING = new Set(['System.String', 'System.Char', 'System.Guid', 'System.Uri', 'System.TimeSpan']);
|
|
26
|
+
const DOTNET_DATE = new Set(['System.DateTime', 'System.DateOnly', 'System.DateTimeOffset']);
|
|
27
|
+
const DOTNET_INTEGER = new Set([
|
|
28
|
+
'System.Int32', 'System.Int64', 'System.Int16', 'System.Byte', 'System.SByte',
|
|
29
|
+
'System.UInt16', 'System.UInt32', 'System.UInt64',
|
|
30
|
+
]);
|
|
31
|
+
const DOTNET_NUMBER = new Set(['System.Double', 'System.Decimal', 'System.Single', 'System.Number']);
|
|
32
|
+
/**
|
|
33
|
+
* One app argument's JSON Schema, from its .NET type — flow-workbench's
|
|
34
|
+
* `transformArgToSchemaProperty`, key for key: a list wraps its item type in an
|
|
35
|
+
* array, and nothing else of the argument (its nested `properties`, its
|
|
36
|
+
* description) is carried.
|
|
37
|
+
*/
|
|
38
|
+
export function dotNetTypeToJsonSchema(type, isList = false) {
|
|
39
|
+
const base = DOTNET_STRING.has(type) ? { type: 'string' }
|
|
40
|
+
: DOTNET_DATE.has(type) ? { type: 'string', format: 'date-time' }
|
|
41
|
+
: DOTNET_INTEGER.has(type) ? { type: 'integer' }
|
|
42
|
+
: DOTNET_NUMBER.has(type) ? { type: 'number' }
|
|
43
|
+
: type === 'System.Boolean' ? { type: 'boolean' }
|
|
44
|
+
: { type };
|
|
45
|
+
return isList && base.type !== 'array' ? { type: 'array', items: { type: base.type } } : base;
|
|
46
|
+
}
|
|
47
|
+
const FILE_TYPE_DOTNET = {
|
|
48
|
+
string: 'System.String',
|
|
49
|
+
integer: 'System.Int64',
|
|
50
|
+
number: 'System.Decimal',
|
|
51
|
+
boolean: 'System.Boolean',
|
|
52
|
+
object: 'System.Object',
|
|
53
|
+
file: 'UiPath.Platform.ResourceHandling.IResource',
|
|
54
|
+
ContentValidationData: 'UiPath.DocumentProcessing.Contracts.Actions.ContentValidationData',
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* The .NET type `uip codedapp push` gives an `action-schema.json` property of
|
|
58
|
+
* this `type` and `format` (for an array, its `items`' type and format), or
|
|
59
|
+
* `undefined` for a type it refuses. A `uuid` or `date` format wins over the type.
|
|
60
|
+
*/
|
|
61
|
+
export function actionSchemaFileDotNetType(type, format) {
|
|
62
|
+
if (format === 'uuid')
|
|
63
|
+
return 'System.Guid';
|
|
64
|
+
if (format === 'date')
|
|
65
|
+
return 'System.DateOnly';
|
|
66
|
+
return typeof type === 'string' ? ownEntry(FILE_TYPE_DOTNET, type) : undefined;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* The .NET type an agent escalation's Action Center app argument of each field
|
|
70
|
+
* type carries. Studio Web serializes the task payload through
|
|
71
|
+
* `inputSchemaDotnetTypeMapping`, which the platform schema REQUIRES on an
|
|
72
|
+
* `actionCenter` channel; it reads the raw type off the app's action schema,
|
|
73
|
+
* which the SDK does not fetch, so this is the inverse of
|
|
74
|
+
* {@link dotNetTypeToJsonSchema} for the scalars and `System.Object` for the two
|
|
75
|
+
* composite types it has no single answer for.
|
|
76
|
+
*/
|
|
77
|
+
export const ESCALATION_DOTNET_TYPE = {
|
|
78
|
+
string: 'System.String', number: 'System.Double', integer: 'System.Int32',
|
|
79
|
+
boolean: 'System.Boolean', object: 'System.Object', array: 'System.Object',
|
|
80
|
+
};
|
package/dist/core/refusals.d.ts
CHANGED
|
@@ -169,7 +169,12 @@ export declare const REFUSALS: {
|
|
|
169
169
|
readonly GUARDRAIL_NO_VALIDATOR: "lint";
|
|
170
170
|
readonly GUARDRAIL_TYPE_UNKNOWN: "lint";
|
|
171
171
|
readonly HITL_APP_INCOMPLETE: "lint";
|
|
172
|
+
readonly HITL_APP_INPUT_REQUIRED: "lint";
|
|
173
|
+
readonly HITL_APP_INPUT_UNKNOWN: "lint";
|
|
172
174
|
readonly HITL_APP_MISSING: "lint";
|
|
175
|
+
readonly HITL_APP_NO_SCHEMA: "lint";
|
|
176
|
+
readonly HITL_APP_OUTCOME_UNKNOWN: "lint";
|
|
177
|
+
readonly HITL_APP_SCHEMA_INVALID: "lint";
|
|
173
178
|
readonly HITL_APP_WITHOUT_VARIANT: "lint";
|
|
174
179
|
readonly HITL_APP_WITH_FIELDS: "lint";
|
|
175
180
|
readonly HITL_CHANNEL_UNKNOWN: "lint";
|
package/dist/core/refusals.js
CHANGED
|
@@ -206,7 +206,12 @@ export const REFUSALS = {
|
|
|
206
206
|
GUARDRAIL_NO_VALIDATOR: 'lint',
|
|
207
207
|
GUARDRAIL_TYPE_UNKNOWN: 'lint',
|
|
208
208
|
HITL_APP_INCOMPLETE: 'lint',
|
|
209
|
+
HITL_APP_INPUT_REQUIRED: 'lint',
|
|
210
|
+
HITL_APP_INPUT_UNKNOWN: 'lint',
|
|
209
211
|
HITL_APP_MISSING: 'lint',
|
|
212
|
+
HITL_APP_NO_SCHEMA: 'lint',
|
|
213
|
+
HITL_APP_OUTCOME_UNKNOWN: 'lint',
|
|
214
|
+
HITL_APP_SCHEMA_INVALID: 'lint',
|
|
210
215
|
HITL_APP_WITHOUT_VARIANT: 'lint',
|
|
211
216
|
HITL_APP_WITH_FIELDS: 'lint',
|
|
212
217
|
HITL_CHANNEL_UNKNOWN: 'lint',
|
|
@@ -174,15 +174,6 @@ export declare function httpRequestToolResourceJson(label: string, inputs: Recor
|
|
|
174
174
|
id: string;
|
|
175
175
|
canvasNodeId: string;
|
|
176
176
|
}): Record<string, unknown>;
|
|
177
|
-
/**
|
|
178
|
-
* The .NET type an Action Center app argument of each field type carries. Studio
|
|
179
|
-
* Web serializes the task payload through `inputSchemaDotnetTypeMapping`, which
|
|
180
|
-
* the platform schema REQUIRES on an `actionCenter` channel; it reads the raw
|
|
181
|
-
* type off the app's action schema, which the SDK does not fetch, so this is
|
|
182
|
-
* the inverse of flow-workbench's `dotNetTypeToJsonSchema` for the scalars and
|
|
183
|
-
* `System.Object` for the two composite types it has no single answer for.
|
|
184
|
-
*/
|
|
185
|
-
export declare const DOTNET_TYPE: Record<string, string>;
|
|
186
177
|
/**
|
|
187
178
|
* The folder an app escalation names: the author's `folderPath`, or
|
|
188
179
|
* `solution_folder` when they gave none — an app that ships in this solution.
|
|
@@ -10,6 +10,7 @@ import ixpDefinition from '../../../core/ixp-definition.json' with { type: 'json
|
|
|
10
10
|
import { JOB_ATTACHMENT_REF, jobAttachmentDefinition } from '../../../core/agent-sidecar.js';
|
|
11
11
|
import { BUILTIN_TOOL_TYPE, CONNECTOR_TOOL_RESOURCE_TYPE, HTTP_REQUEST_TOOL_TYPE, INTERNAL_TOOL_RESOURCE_TYPE, TOOL_RESOURCE_TYPE, } from '../../../core/agent-tool-resources.js';
|
|
12
12
|
import { buildConfiguration } from '../../../core/connector-configuration.js';
|
|
13
|
+
import { ESCALATION_DOTNET_TYPE } from '../../../core/dotnet-types.js';
|
|
13
14
|
import { multipartBodyFieldName, transportHttpMethod } from '../../../core/connector-inputs.js';
|
|
14
15
|
import { CONTEXT_INDEX_DEFAULTS, CONTEXT_INDEX_DEFAULT_FILE_EXTENSION, contextIndexType } from '../../../core/context-index.js';
|
|
15
16
|
import { formFieldJsonSchema } from '../../../core/form-field-type.js';
|
|
@@ -445,18 +446,6 @@ export function httpRequestToolResourceJson(label, inputs, spec) {
|
|
|
445
446
|
properties: { toolType: HTTP_REQUEST_TOOL_TYPE },
|
|
446
447
|
};
|
|
447
448
|
}
|
|
448
|
-
/**
|
|
449
|
-
* The .NET type an Action Center app argument of each field type carries. Studio
|
|
450
|
-
* Web serializes the task payload through `inputSchemaDotnetTypeMapping`, which
|
|
451
|
-
* the platform schema REQUIRES on an `actionCenter` channel; it reads the raw
|
|
452
|
-
* type off the app's action schema, which the SDK does not fetch, so this is
|
|
453
|
-
* the inverse of flow-workbench's `dotNetTypeToJsonSchema` for the scalars and
|
|
454
|
-
* `System.Object` for the two composite types it has no single answer for.
|
|
455
|
-
*/
|
|
456
|
-
export const DOTNET_TYPE = {
|
|
457
|
-
string: 'System.String', number: 'System.Double', integer: 'System.Int32',
|
|
458
|
-
boolean: 'System.Boolean', object: 'System.Object', array: 'System.Object',
|
|
459
|
-
};
|
|
460
449
|
/**
|
|
461
450
|
* The folder an app escalation names: the author's `folderPath`, or
|
|
462
451
|
* `solution_folder` when they gave none — an app that ships in this solution.
|
|
@@ -537,7 +526,7 @@ export function escalationResourceJson(esc, spec) {
|
|
|
537
526
|
}
|
|
538
527
|
else {
|
|
539
528
|
const app = esc.app;
|
|
540
|
-
const mapping = (fields) => Object.fromEntries(Object.entries(fields ?? {}).map(([k, t]) => [k, ownEntry(
|
|
529
|
+
const mapping = (fields) => Object.fromEntries(Object.entries(fields ?? {}).map(([k, t]) => [k, ownEntry(ESCALATION_DOTNET_TYPE, t) ?? 'System.Object']));
|
|
541
530
|
channel = {
|
|
542
531
|
...common,
|
|
543
532
|
type: 'actionCenter',
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { ActionSchema, AppRef } from './spec.js';
|
|
2
|
+
/** One argument of the schema, in JSON Schema terms. */
|
|
3
|
+
export interface ActionSchemaArg {
|
|
4
|
+
name: string;
|
|
5
|
+
schema: Record<string, unknown>;
|
|
6
|
+
required: boolean;
|
|
7
|
+
}
|
|
8
|
+
/** The schema, whichever spelling it came in. */
|
|
9
|
+
export interface NormalizedActionSchema {
|
|
10
|
+
inputs: ActionSchemaArg[];
|
|
11
|
+
outputs: ActionSchemaArg[];
|
|
12
|
+
inOuts: ActionSchemaArg[];
|
|
13
|
+
outcomes: string[];
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* The schema as one shape, or a sentence saying what is wrong with it. Two
|
|
17
|
+
* spellings are accepted, both verbatim:
|
|
18
|
+
*
|
|
19
|
+
* - a coded action app's `action-schema.json` — each section a JSON-Schema-ish
|
|
20
|
+
* `{ type: 'object', properties: { <name>: { type, required? } } }`;
|
|
21
|
+
* - the platform's action schema — each section an array of
|
|
22
|
+
* `{ name, type: 'System.String', required, isList }` (the resource file's
|
|
23
|
+
* `spec.actionSchema`, and what the Apps API returns).
|
|
24
|
+
*/
|
|
25
|
+
export declare function normalizeActionSchema(schema: unknown): NormalizedActionSchema | string;
|
|
26
|
+
/**
|
|
27
|
+
* `inputs.app.inputSchema`: the inputs and the inOuts, with the required ones
|
|
28
|
+
* listed — `createInputSchemaFromAppSchema`'s shape, key for key.
|
|
29
|
+
*/
|
|
30
|
+
export declare function appInputSchema(s: NormalizedActionSchema): Record<string, unknown>;
|
|
31
|
+
/** What the reviewer answers: the outputs and the inOuts, by name. */
|
|
32
|
+
export declare function appAnswerSchemas(s: NormalizedActionSchema): Array<[string, Record<string, unknown>]>;
|
|
33
|
+
/**
|
|
34
|
+
* What a `check` rule needs of an app's contract — the input names, the
|
|
35
|
+
* required ones, the answers and the buttons — from whichever of `actionSchema`
|
|
36
|
+
* and a verbatim `inputSchema` the app carries; `undefined` with neither, a
|
|
37
|
+
* sentence when one is malformed.
|
|
38
|
+
*/
|
|
39
|
+
export declare function appContract(app: AppRef | undefined): {
|
|
40
|
+
inputs: string[];
|
|
41
|
+
required: string[];
|
|
42
|
+
answers: string[];
|
|
43
|
+
outcomes: string[];
|
|
44
|
+
} | string | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* The schema back from a node, as decompile prints it:
|
|
47
|
+
*
|
|
48
|
+
* - `{ actionSchema }`, in the `action-schema.json` spelling, when one
|
|
49
|
+
* reproduces the node's `inputSchema` and typed answer BYTE FOR BYTE — what
|
|
50
|
+
* the SDK and Studio Web's picker write. A property in both the input schema
|
|
51
|
+
* and the answer is an inOut; the rest split by side; outcomes are the task's.
|
|
52
|
+
* - `{ inputSchema }`, verbatim, otherwise — a hand-edited schema (a `title`, a
|
|
53
|
+
* nested object's `properties`) that no action schema lowers to. Recompiling
|
|
54
|
+
* writes it back unchanged.
|
|
55
|
+
*
|
|
56
|
+
* Either way serialize writes the node's `inputSchema` back as it was: the lift
|
|
57
|
+
* is checked against the emission, not assumed to invert it.
|
|
58
|
+
*/
|
|
59
|
+
export declare function liftActionSchema(inputSchema: unknown, answers: Record<string, unknown> | undefined, outcomes: string[]): {
|
|
60
|
+
actionSchema: ActionSchema;
|
|
61
|
+
} | {
|
|
62
|
+
inputSchema: Record<string, unknown>;
|
|
63
|
+
} | undefined;
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An Action App's action schema — the contract of its form: what the task sends
|
|
3
|
+
* it (`inputs`), what the reviewer answers (`outputs`), what goes both ways
|
|
4
|
+
* (`inOuts`) and which buttons complete it (`outcomes`) — read in either of the
|
|
5
|
+
* two spellings an author can hold, and lowered to what the node carries.
|
|
6
|
+
*
|
|
7
|
+
* Why the node needs it: flow-v1's serializer types the task's
|
|
8
|
+
* `HitlTaskArguments` from `inputs.app.inputSchema`, and with none it falls back
|
|
9
|
+
* to `{ type: 'string' }` for every bound input (`hitl-serialization.ts`, the
|
|
10
|
+
* `appInputBindings` fallback). A number or an integer then reaches the app as a
|
|
11
|
+
* string. Studio Web's app picker writes the schema from the app's action schema
|
|
12
|
+
* (`HITLAppPicker.tsx` → `createInputSchemaFromAppSchema`); this SDK is offline,
|
|
13
|
+
* so the author hands it the same schema.
|
|
14
|
+
*
|
|
15
|
+
* The emission is the PRODUCT's, not a reading of JSON Schema: the platform
|
|
16
|
+
* spelling goes through the picker's own `.NET → JSON` table, and the
|
|
17
|
+
* `action-schema.json` spelling first through `uip codedapp push`'s `JSON → .NET`
|
|
18
|
+
* table — the path the same app's schema takes to reach the picker — so one app
|
|
19
|
+
* written either way emits the same bytes (core/dotnet-types.ts). That path
|
|
20
|
+
* keeps only a type: an object input's nested `properties`, a `description`, a
|
|
21
|
+
* `title` do not survive it, and do not survive here.
|
|
22
|
+
*/
|
|
23
|
+
import { actionSchemaFileDotNetType, dotNetTypeToJsonSchema } from '../../../core/dotnet-types.js';
|
|
24
|
+
const FILE_TYPES = 'string, integer, number, boolean, object, file, ContentValidationData or array';
|
|
25
|
+
/** An `action-schema.json` property's JSON Schema, or what is wrong with it. */
|
|
26
|
+
function fileSchema(where, p) {
|
|
27
|
+
const isList = p.type === 'array';
|
|
28
|
+
const item = (isList ? p.items : p);
|
|
29
|
+
if (isList && (!item || typeof item !== 'object'))
|
|
30
|
+
return `"${where}" is an array with no items schema`;
|
|
31
|
+
if (item.type === 'array')
|
|
32
|
+
return `"${where}" is an array of arrays, which uip codedapp push refuses`;
|
|
33
|
+
const dotNet = actionSchemaFileDotNetType(item.type, item.format);
|
|
34
|
+
if (dotNet === undefined) {
|
|
35
|
+
return `"${where}" has the type ${JSON.stringify(item.type)}; an action-schema.json type is one of ${FILE_TYPES}`;
|
|
36
|
+
}
|
|
37
|
+
return dotNetTypeToJsonSchema(dotNet, isList);
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* The schema as one shape, or a sentence saying what is wrong with it. Two
|
|
41
|
+
* spellings are accepted, both verbatim:
|
|
42
|
+
*
|
|
43
|
+
* - a coded action app's `action-schema.json` — each section a JSON-Schema-ish
|
|
44
|
+
* `{ type: 'object', properties: { <name>: { type, required? } } }`;
|
|
45
|
+
* - the platform's action schema — each section an array of
|
|
46
|
+
* `{ name, type: 'System.String', required, isList }` (the resource file's
|
|
47
|
+
* `spec.actionSchema`, and what the Apps API returns).
|
|
48
|
+
*/
|
|
49
|
+
export function normalizeActionSchema(schema) {
|
|
50
|
+
if (!schema || typeof schema !== 'object' || Array.isArray(schema))
|
|
51
|
+
return 'it is not an object';
|
|
52
|
+
const s = schema;
|
|
53
|
+
const section = (key) => {
|
|
54
|
+
const v = s[key];
|
|
55
|
+
if (v === undefined || v === null)
|
|
56
|
+
return [];
|
|
57
|
+
if (Array.isArray(v)) {
|
|
58
|
+
const args = [];
|
|
59
|
+
for (const a of v) {
|
|
60
|
+
if (!a || typeof a.name !== 'string' || a.name === '' || typeof a.type !== 'string') {
|
|
61
|
+
return `"${key}" has an entry without a name and a type`;
|
|
62
|
+
}
|
|
63
|
+
args.push({ name: a.name, schema: dotNetTypeToJsonSchema(a.type, a.isList === true), required: a.required === true });
|
|
64
|
+
}
|
|
65
|
+
return args;
|
|
66
|
+
}
|
|
67
|
+
if (typeof v !== 'object')
|
|
68
|
+
return `"${key}" is neither an array nor an object`;
|
|
69
|
+
const props = v.properties ?? {};
|
|
70
|
+
if (!props || typeof props !== 'object' || Array.isArray(props))
|
|
71
|
+
return `"${key}.properties" is not an object`;
|
|
72
|
+
const args = [];
|
|
73
|
+
for (const [name, p] of Object.entries(props)) {
|
|
74
|
+
if (!p || typeof p !== 'object' || typeof p.type !== 'string')
|
|
75
|
+
return `"${key}.properties.${name}" has no type`;
|
|
76
|
+
// Outcomes are buttons: push flattens them to System.String whatever they say.
|
|
77
|
+
const schema = key === 'outcomes' ? { type: 'string' } : fileSchema(`${key}.properties.${name}`, p);
|
|
78
|
+
if (typeof schema === 'string')
|
|
79
|
+
return schema;
|
|
80
|
+
args.push({ name, schema, required: p.required === true });
|
|
81
|
+
}
|
|
82
|
+
return args;
|
|
83
|
+
};
|
|
84
|
+
const inputs = section('inputs');
|
|
85
|
+
const outputs = section('outputs');
|
|
86
|
+
const inOuts = section('inOuts');
|
|
87
|
+
const outcomes = section('outcomes');
|
|
88
|
+
for (const r of [inputs, outputs, inOuts, outcomes])
|
|
89
|
+
if (typeof r === 'string')
|
|
90
|
+
return r;
|
|
91
|
+
return {
|
|
92
|
+
inputs: inputs,
|
|
93
|
+
outputs: outputs,
|
|
94
|
+
inOuts: inOuts,
|
|
95
|
+
outcomes: outcomes.map((o) => o.name),
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* `inputs.app.inputSchema`: the inputs and the inOuts, with the required ones
|
|
100
|
+
* listed — `createInputSchemaFromAppSchema`'s shape, key for key.
|
|
101
|
+
*/
|
|
102
|
+
export function appInputSchema(s) {
|
|
103
|
+
const all = [...s.inputs, ...s.inOuts];
|
|
104
|
+
const required = all.filter((a) => a.required).map((a) => a.name);
|
|
105
|
+
return {
|
|
106
|
+
type: 'object',
|
|
107
|
+
properties: Object.fromEntries(all.map((a) => [a.name, { ...a.schema }])),
|
|
108
|
+
...(required.length > 0 ? { required } : {}),
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
/** What the reviewer answers: the outputs and the inOuts, by name. */
|
|
112
|
+
export function appAnswerSchemas(s) {
|
|
113
|
+
return [...s.outputs, ...s.inOuts].map((a) => [a.name, { ...a.schema }]);
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* What a `check` rule needs of an app's contract — the input names, the
|
|
117
|
+
* required ones, the answers and the buttons — from whichever of `actionSchema`
|
|
118
|
+
* and a verbatim `inputSchema` the app carries; `undefined` with neither, a
|
|
119
|
+
* sentence when one is malformed.
|
|
120
|
+
*/
|
|
121
|
+
export function appContract(app) {
|
|
122
|
+
if (app?.actionSchema !== undefined && app?.inputSchema !== undefined) {
|
|
123
|
+
return 'it gives both actionSchema and inputSchema; inputSchema is the node\'s verbatim form, for a decompiled flow, so keep one';
|
|
124
|
+
}
|
|
125
|
+
if (app?.actionSchema !== undefined) {
|
|
126
|
+
const s = normalizeActionSchema(app.actionSchema);
|
|
127
|
+
if (typeof s === 'string')
|
|
128
|
+
return s;
|
|
129
|
+
const all = [...s.inputs, ...s.inOuts];
|
|
130
|
+
return {
|
|
131
|
+
inputs: all.map((a) => a.name),
|
|
132
|
+
required: all.filter((a) => a.required).map((a) => a.name),
|
|
133
|
+
answers: [...s.outputs, ...s.inOuts].map((a) => a.name),
|
|
134
|
+
outcomes: s.outcomes,
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
if (app?.inputSchema !== undefined) {
|
|
138
|
+
const i = app.inputSchema;
|
|
139
|
+
if (!i || typeof i !== 'object' || !i.properties || typeof i.properties !== 'object' || Array.isArray(i.properties)) {
|
|
140
|
+
return 'its inputSchema has no properties object';
|
|
141
|
+
}
|
|
142
|
+
return {
|
|
143
|
+
inputs: Object.keys(i.properties),
|
|
144
|
+
required: Array.isArray(i.required) ? i.required.filter((r) => typeof r === 'string') : [],
|
|
145
|
+
answers: [],
|
|
146
|
+
outcomes: [],
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
return undefined;
|
|
150
|
+
}
|
|
151
|
+
/** The `action-schema.json` property a picker-shaped JSON Schema came from, if any. */
|
|
152
|
+
function fileProperty(p) {
|
|
153
|
+
if (!p || typeof p !== 'object' || Array.isArray(p))
|
|
154
|
+
return undefined;
|
|
155
|
+
const { type, format, items, ...rest } = p;
|
|
156
|
+
if (Object.keys(rest).length > 0)
|
|
157
|
+
return undefined;
|
|
158
|
+
if (type === 'array') {
|
|
159
|
+
const item = fileProperty(items);
|
|
160
|
+
return item !== undefined && format === undefined ? { type: 'array', items: item } : undefined;
|
|
161
|
+
}
|
|
162
|
+
if (items !== undefined)
|
|
163
|
+
return undefined;
|
|
164
|
+
if (type === 'string' && format === 'date-time')
|
|
165
|
+
return { type: 'string', format: 'date' };
|
|
166
|
+
if (format !== undefined)
|
|
167
|
+
return undefined;
|
|
168
|
+
const byType = {
|
|
169
|
+
string: 'string', integer: 'integer', number: 'number', boolean: 'boolean',
|
|
170
|
+
'System.Object': 'object',
|
|
171
|
+
'UiPath.Platform.ResourceHandling.IResource': 'file',
|
|
172
|
+
'UiPath.DocumentProcessing.Contracts.Actions.ContentValidationData': 'ContentValidationData',
|
|
173
|
+
};
|
|
174
|
+
return typeof type === 'string' && Object.hasOwn(byType, type) ? { type: byType[type] } : undefined;
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* The schema back from a node, as decompile prints it:
|
|
178
|
+
*
|
|
179
|
+
* - `{ actionSchema }`, in the `action-schema.json` spelling, when one
|
|
180
|
+
* reproduces the node's `inputSchema` and typed answer BYTE FOR BYTE — what
|
|
181
|
+
* the SDK and Studio Web's picker write. A property in both the input schema
|
|
182
|
+
* and the answer is an inOut; the rest split by side; outcomes are the task's.
|
|
183
|
+
* - `{ inputSchema }`, verbatim, otherwise — a hand-edited schema (a `title`, a
|
|
184
|
+
* nested object's `properties`) that no action schema lowers to. Recompiling
|
|
185
|
+
* writes it back unchanged.
|
|
186
|
+
*
|
|
187
|
+
* Either way serialize writes the node's `inputSchema` back as it was: the lift
|
|
188
|
+
* is checked against the emission, not assumed to invert it.
|
|
189
|
+
*/
|
|
190
|
+
export function liftActionSchema(inputSchema, answers, outcomes) {
|
|
191
|
+
if (!inputSchema || typeof inputSchema !== 'object' || Array.isArray(inputSchema))
|
|
192
|
+
return undefined;
|
|
193
|
+
const verbatim = { inputSchema: JSON.parse(JSON.stringify(inputSchema)) };
|
|
194
|
+
const props = (inputSchema.properties ?? {});
|
|
195
|
+
const required = new Set(Array.isArray(inputSchema.required)
|
|
196
|
+
? inputSchema.required.filter((r) => typeof r === 'string') : []);
|
|
197
|
+
const answerProps = Object.fromEntries(Object.entries(answers ?? {}).filter(([k]) => k !== 'Action'));
|
|
198
|
+
const lift = (entries, req) => {
|
|
199
|
+
const out = [];
|
|
200
|
+
for (const [k, p] of entries) {
|
|
201
|
+
const f = fileProperty(p);
|
|
202
|
+
if (f === undefined)
|
|
203
|
+
return undefined;
|
|
204
|
+
out.push([k, { ...f, ...(req(k) ? { required: true } : {}) }]);
|
|
205
|
+
}
|
|
206
|
+
return { type: 'object', properties: Object.fromEntries(out) };
|
|
207
|
+
};
|
|
208
|
+
const ins = lift(Object.entries(props).filter(([k]) => !(k in answerProps)), (k) => required.has(k));
|
|
209
|
+
const ios = lift(Object.entries(props).filter(([k]) => k in answerProps), (k) => required.has(k));
|
|
210
|
+
const outs = lift(Object.entries(answerProps).filter(([k]) => !(k in props)), () => false);
|
|
211
|
+
if (!ins || !ios || !outs)
|
|
212
|
+
return verbatim;
|
|
213
|
+
const actionSchema = {
|
|
214
|
+
inputs: ins,
|
|
215
|
+
...(Object.keys(outs.properties).length > 0 ? { outputs: outs } : {}),
|
|
216
|
+
...(Object.keys(ios.properties).length > 0 ? { inOuts: ios } : {}),
|
|
217
|
+
...(outcomes.length > 0
|
|
218
|
+
? { outcomes: { type: 'object', properties: Object.fromEntries(outcomes.map((o) => [o, { type: 'string' }])) } }
|
|
219
|
+
: {}),
|
|
220
|
+
};
|
|
221
|
+
// Only a lift that serializes back to the same bytes is an action schema.
|
|
222
|
+
const again = normalizeActionSchema(actionSchema);
|
|
223
|
+
if (typeof again === 'string')
|
|
224
|
+
return verbatim;
|
|
225
|
+
const same = JSON.stringify(appInputSchema(again)) === JSON.stringify(inputSchema)
|
|
226
|
+
&& JSON.stringify(Object.fromEntries(appAnswerSchemas(again))) === JSON.stringify(answerProps);
|
|
227
|
+
return same ? { actionSchema } : verbatim;
|
|
228
|
+
}
|
|
@@ -3,6 +3,7 @@ import { nearestName } from '../../../core/edit-distance.js';
|
|
|
3
3
|
import { FORM_FIELD_TYPES, formFieldOptionsProblem, formFieldOptionsWhy, formFieldSettingProblems, formFieldTypeHint, formFieldTypeWhy, validFormFieldTypesText, } from '../../../core/form-field-type.js';
|
|
4
4
|
import { isAnswerField } from '../../../core/hitl-answers.js';
|
|
5
5
|
import { hitlDerivesOutcomeHandles, outcomeIdOf } from '../../../core/hitl-routing.js';
|
|
6
|
+
import { appContract } from './action-schema.js';
|
|
6
7
|
export const HITL_DIAGNOSTICS = {
|
|
7
8
|
HITL_VARIANT_UNKNOWN: { severity: 'error', summary: 'a variant that names no human-task node type' },
|
|
8
9
|
HITL_OUTCOME_PORTS_VARIANT: { severity: 'error', summary: 'exposeError or outcomePorts on a variant that cannot honour it' },
|
|
@@ -19,6 +20,11 @@ export const HITL_DIAGNOSTICS = {
|
|
|
19
20
|
HITL_APP_WITH_FIELDS: { severity: 'error', summary: 'form fields on an app-backed task' },
|
|
20
21
|
HITL_APP_MISSING: { severity: 'error', summary: 'an action-app task that names no app' },
|
|
21
22
|
HITL_APP_INCOMPLETE: { severity: 'error', summary: 'an app reference missing name, key or folderPath' },
|
|
23
|
+
HITL_APP_SCHEMA_INVALID: { severity: 'error', summary: 'an app actionSchema that is not an action schema' },
|
|
24
|
+
HITL_APP_NO_SCHEMA: { severity: 'warning', summary: 'inputs sent to an app with no actionSchema, so every one is a string' },
|
|
25
|
+
HITL_APP_INPUT_UNKNOWN: { severity: 'error', summary: 'an app input the action schema does not declare' },
|
|
26
|
+
HITL_APP_INPUT_REQUIRED: { severity: 'error', summary: 'a required app input left unbound' },
|
|
27
|
+
HITL_APP_OUTCOME_UNKNOWN: { severity: 'error', summary: 'an outcome the app has no button for' },
|
|
22
28
|
HITL_NO_FIELDS: { severity: 'error', summary: 'no fields array' },
|
|
23
29
|
HITL_FIELD_NO_ID: { severity: 'error', summary: 'a form field with no id' },
|
|
24
30
|
HITL_DUP_FIELD: { severity: 'error', summary: 'a form field id declared twice' },
|
|
@@ -183,6 +189,48 @@ export function checkHitl(inputs, ctx) {
|
|
|
183
189
|
return;
|
|
184
190
|
}
|
|
185
191
|
}
|
|
192
|
+
// The app's action schema: what types its inputs, and what it answers.
|
|
193
|
+
const bound = Object.keys(app.inputs ?? {});
|
|
194
|
+
const contract = appContract(app);
|
|
195
|
+
if (contract === undefined) {
|
|
196
|
+
if (bound.length > 0) {
|
|
197
|
+
at('HITL_APP_NO_SCHEMA', `Human task "${step}" sends ${bound.length} input(s) to its Action App but gives no actionSchema. `
|
|
198
|
+
+ `The platform types the task's arguments from the app's schema and falls back to string for every `
|
|
199
|
+
+ `input without one, so a number or a boolean reaches the app as text — and its answer fields `
|
|
200
|
+
+ `cannot be read with out('${step}', …).`, `app: { …, actionSchema: <the app's action-schema.json> }`);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
else if (typeof contract === 'string') {
|
|
204
|
+
at('HITL_APP_SCHEMA_INVALID', `Human task "${step}" gives its Action App a schema that is not usable: ${contract}. `
|
|
205
|
+
+ `Pass the app's action-schema.json verbatim, or the platform's action schema (its `
|
|
206
|
+
+ `inputs/outputs/inOuts/outcomes arrays).`);
|
|
207
|
+
return;
|
|
208
|
+
}
|
|
209
|
+
else {
|
|
210
|
+
const names = contract.inputs;
|
|
211
|
+
for (const k of bound) {
|
|
212
|
+
if (!names.includes(k)) {
|
|
213
|
+
const nearest = nearestName(k, names);
|
|
214
|
+
at('HITL_APP_INPUT_UNKNOWN', `Human task "${step}" sends "${k}" to its Action App, which declares no such input `
|
|
215
|
+
+ `(it takes ${names.length > 0 ? names.join(', ') : 'none'}). The value is dropped.`, nearest !== undefined ? `inputs: { ${JSON.stringify(nearest)}: … }` : undefined);
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
const missing = contract.required.filter((r) => !bound.includes(r));
|
|
219
|
+
if (missing.length > 0) {
|
|
220
|
+
at('HITL_APP_INPUT_REQUIRED', `Human task "${step}" leaves the Action App's required input(s) ${missing.join(', ')} unbound, `
|
|
221
|
+
+ `so the task's arguments fail the app's own schema.`, `inputs: { ${missing.map((m) => `${JSON.stringify(m)}: …`).join(', ')} }`);
|
|
222
|
+
}
|
|
223
|
+
if (contract.outcomes.length > 0) {
|
|
224
|
+
for (const o of Array.isArray(inputs?.outcomes) ? inputs.outcomes : []) {
|
|
225
|
+
const name = typeof o === 'string' ? o : o?.name;
|
|
226
|
+
if (typeof name === 'string' && name !== '' && !contract.outcomes.includes(name)) {
|
|
227
|
+
const nearest = nearestName(name, contract.outcomes);
|
|
228
|
+
at('HITL_APP_OUTCOME_UNKNOWN', `Human task "${step}" routes on the outcome "${name}", but its Action App completes only with `
|
|
229
|
+
+ `${contract.outcomes.join(', ')}. The reviewer can never pick it.`, nearest !== undefined ? `'${nearest}'` : undefined);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
186
234
|
// Outcomes still matter for an app task: the flow's own routing and its
|
|
187
235
|
// `Action`/`status` outputs are derived from them, so fall through to the
|
|
188
236
|
// outcome rules below rather than returning here.
|
|
@@ -389,11 +437,23 @@ export function checkHitlRead({ node: name, field, rest, reader: step }, form, r
|
|
|
389
437
|
return; // `$vars.<name>.output` — the whole object, fine.
|
|
390
438
|
if (answer === 'Action')
|
|
391
439
|
return; // which outcome was pressed.
|
|
392
|
-
const
|
|
393
|
-
|
|
394
|
-
|
|
440
|
+
const appSchema = form?.variant === 'action-app' && form.app?.actionSchema !== undefined
|
|
441
|
+
? appContract({ ...form.app, inputSchema: undefined }) : undefined;
|
|
442
|
+
const appAnswers = typeof appSchema === 'object' ? appSchema.answers : [];
|
|
443
|
+
const answers = [
|
|
444
|
+
...(form?.fields ?? []).filter((f) => isAnswerField(f) && typeof f?.id === 'string').map((f) => f.id),
|
|
445
|
+
...appAnswers,
|
|
446
|
+
];
|
|
395
447
|
if (answers.includes(answer))
|
|
396
448
|
return;
|
|
449
|
+
if (form?.variant === 'action-app') {
|
|
450
|
+
const nearestApp = nearestName(answer, [...answers, 'Action']);
|
|
451
|
+
report('HITL_READ_UNKNOWN_FIELD', `Human task "${name}" has no answer "${answer}" (read as "$vars.${name}.output.${answer}" in `
|
|
452
|
+
+ `"${step}"). Its Action App answers with ${appSchema === undefined
|
|
453
|
+
? 'fields only its actionSchema declares, and it gives none'
|
|
454
|
+
: `its schema's outputs and inOuts (${appAnswers.length > 0 ? appAnswers.join(', ') : 'none'})`} plus "Action".`, nearestApp !== undefined ? `out('${name}', '${nearestApp}')` : `app: { …, actionSchema: <the app's action-schema.json> }`);
|
|
455
|
+
return;
|
|
456
|
+
}
|
|
397
457
|
const shown = (form?.fields ?? [])
|
|
398
458
|
.filter((f) => f?.direction === 'input' && typeof f?.id === 'string')
|
|
399
459
|
.map((f) => f.id);
|
|
@@ -19,6 +19,7 @@ import { OUTCOME_HANDLE_NODE_TYPES, hitlExitModel, outcomeIdOf, outcomeSlug } fr
|
|
|
19
19
|
import { jsonClone } from '../../../core/json-clone.js';
|
|
20
20
|
import { schemaId } from '../../../core/stable-id.js';
|
|
21
21
|
import { wireExprBody } from '../../../core/wire-expr.js';
|
|
22
|
+
import { appAnswerSchemas, appInputSchema, liftActionSchema, normalizeActionSchema } from './action-schema.js';
|
|
22
23
|
import { checkHitl, checkHitlRead } from './check.js';
|
|
23
24
|
import { CompileRefusal } from '../../../core/compile-refusal.js';
|
|
24
25
|
const BASE = 'uipath.human-in-the-loop';
|
|
@@ -107,6 +108,15 @@ function hitlInputs(inputs, nodeType, ctx) {
|
|
|
107
108
|
continue;
|
|
108
109
|
properties[f.id] = { ...formFieldJsonSchema(f.type) };
|
|
109
110
|
}
|
|
111
|
+
// An app's answer is its action schema's outputs and inOuts — the app owns the
|
|
112
|
+
// form, so the schema is the only place they are declared.
|
|
113
|
+
const appSchema = isApp && inputs?.app?.actionSchema !== undefined
|
|
114
|
+
? normalizeActionSchema(inputs.app.actionSchema) : undefined;
|
|
115
|
+
const schema = typeof appSchema === 'object' ? appSchema : undefined;
|
|
116
|
+
if (schema !== undefined) {
|
|
117
|
+
for (const [name, s] of appAnswerSchemas(schema))
|
|
118
|
+
properties[name] = s;
|
|
119
|
+
}
|
|
110
120
|
const names = outcomes.map((o) => o.name).filter((n) => typeof n === 'string');
|
|
111
121
|
if (names.length > 0) {
|
|
112
122
|
properties.Action = { type: 'string', enum: names, default: names[0] };
|
|
@@ -187,6 +197,10 @@ function hitlInputs(inputs, nodeType, ctx) {
|
|
|
187
197
|
key: app.key,
|
|
188
198
|
folderPath: app.folderPath,
|
|
189
199
|
...(app.appSystemName !== undefined ? { appSystemName: app.appSystemName } : {}),
|
|
200
|
+
// What types the task's arguments (see action-schema.ts): lowered
|
|
201
|
+
// from the action schema, or the decompiled node's own, verbatim.
|
|
202
|
+
...(schema !== undefined ? { inputSchema: appInputSchema(schema) }
|
|
203
|
+
: isApp && app.inputSchema !== undefined ? { inputSchema: jsonClone(app.inputSchema) } : {}),
|
|
190
204
|
},
|
|
191
205
|
...(Object.keys(appInputBindings).length > 0 ? { appInputBindings } : {}),
|
|
192
206
|
}
|
|
@@ -406,6 +420,12 @@ function liftHitl(node, typeName, ctx) {
|
|
|
406
420
|
...(app.appSystemName === null ? { appSystemName: null }
|
|
407
421
|
: typeof app.appSystemName === 'string' ? { appSystemName: app.appSystemName } : {}),
|
|
408
422
|
...(appInputs !== undefined ? { inputs: appInputs } : {}),
|
|
423
|
+
// The schema comes back as an action schema when one serializes to the
|
|
424
|
+
// node's exact bytes, else as the node's inputSchema verbatim — either way a
|
|
425
|
+
// recompile writes the same input schema (action-schema.ts).
|
|
426
|
+
...(variant === 'action-app' && app.inputSchema !== undefined
|
|
427
|
+
? liftActionSchema(app.inputSchema, n.outputs?.output?.properties, outcomes.map((o) => (typeof o === 'string' ? o : o.name)))
|
|
428
|
+
: {}),
|
|
409
429
|
};
|
|
410
430
|
// The validation station's own inputs ride as PLAIN `$vars.…` paths. Anything
|
|
411
431
|
// but a `$vars.` reference stays the wire text verbatim.
|
|
@@ -502,6 +522,8 @@ function printHitl({ inputs }, ctx) {
|
|
|
502
522
|
: h.app.appSystemName !== undefined ? ctx.string(h.app.appSystemName) : undefined],
|
|
503
523
|
['inputs', h.app.inputs !== undefined
|
|
504
524
|
? obj(Object.entries(h.app.inputs).map(([k, v]) => [k, val(v)]), ctx) : undefined],
|
|
525
|
+
['actionSchema', h.app.actionSchema !== undefined ? ctx.value(h.app.actionSchema) : undefined],
|
|
526
|
+
['inputSchema', h.app.inputSchema !== undefined ? ctx.value(h.app.inputSchema) : undefined],
|
|
505
527
|
], ctx);
|
|
506
528
|
const document = h.document === undefined ? undefined : obj([
|
|
507
529
|
['extractionResult', val(h.document.extractionResult)],
|
|
@@ -182,7 +182,106 @@ export interface AppRef {
|
|
|
182
182
|
* into the task's `HitlTaskArguments`.
|
|
183
183
|
*/
|
|
184
184
|
inputs?: Record<string, Expr | string>;
|
|
185
|
+
/**
|
|
186
|
+
* The app's action schema, verbatim — what types each input, and what the
|
|
187
|
+
* reviewer answers. For a coded action app that is its `action-schema.json`,
|
|
188
|
+
* so `import schema from './InvoiceReview/action-schema.json'` and pass it;
|
|
189
|
+
* the platform's own spelling (the arrays of `{ name, type: 'System.Decimal',
|
|
190
|
+
* required }` in the solution's `resources/solution_folder/app/codedAction/<app>.json`
|
|
191
|
+
* `spec.actionSchema`) is accepted too.
|
|
192
|
+
*
|
|
193
|
+
* Without it every input reaches the app as a STRING: the platform types the
|
|
194
|
+
* task's arguments from `inputs.app.inputSchema`, which is written from this,
|
|
195
|
+
* and falls back to `string` for each bound input when there is none. It also
|
|
196
|
+
* declares the answer, so `out('<step>', '<output>')` reads are checked.
|
|
197
|
+
*
|
|
198
|
+
* @enforcedBy HITL_APP_NO_SCHEMA Inputs sent to an app without its schema all become strings.
|
|
199
|
+
* @enforcedBy HITL_APP_INPUT_UNKNOWN An input the app does not declare.
|
|
200
|
+
* @enforcedBy HITL_APP_INPUT_REQUIRED A required app input left unbound.
|
|
201
|
+
* @enforcedBy HITL_APP_OUTCOME_UNKNOWN An outcome the app has no button for.
|
|
202
|
+
*
|
|
203
|
+
* Only each argument's TYPE reaches the node, as Studio Web writes it: an
|
|
204
|
+
* object input becomes `{ type: 'System.Object' }` and a `file` input
|
|
205
|
+
* `{ type: 'UiPath.Platform.ResourceHandling.IResource' }` (the platform's .NET
|
|
206
|
+
* names, passed through by its picker), and a nested object's `properties`, a
|
|
207
|
+
* `description` or a `title` are not carried.
|
|
208
|
+
*/
|
|
209
|
+
actionSchema?: ActionSchema;
|
|
210
|
+
/**
|
|
211
|
+
* The node's `inputs.app.inputSchema`, verbatim — what decompile writes for a
|
|
212
|
+
* flow whose schema no {@link AppRef.actionSchema} lowers to (a hand-edited
|
|
213
|
+
* `title`, a nested object's `properties`), so recompiling leaves it as it
|
|
214
|
+
* was. Author new flows with `actionSchema`; give one or the other.
|
|
215
|
+
*
|
|
216
|
+
* @enforcedBy HITL_APP_SCHEMA_INVALID Both forms, or an inputSchema with no properties.
|
|
217
|
+
*/
|
|
218
|
+
inputSchema?: Record<string, unknown>;
|
|
219
|
+
}
|
|
220
|
+
/** One property of an `action-schema.json` section. */
|
|
221
|
+
export interface ActionSchemaProperty {
|
|
222
|
+
/**
|
|
223
|
+
* Its type: `'string'`, `'integer'`, `'number'`, `'boolean'`, `'object'`,
|
|
224
|
+
* `'file'`, `'ContentValidationData'`, or `'array'` with `items` — the set
|
|
225
|
+
* `uip codedapp push` accepts.
|
|
226
|
+
*/
|
|
227
|
+
type: string;
|
|
228
|
+
/** Whether the app needs it. A required input must be bound in `app.inputs`. */
|
|
229
|
+
required?: boolean;
|
|
230
|
+
/** What it is for. Documentation only: it is not emitted. */
|
|
231
|
+
description?: string;
|
|
232
|
+
/** `'date'` (a `System.DateOnly`) or `'uuid'` (a `System.Guid`). */
|
|
233
|
+
format?: string;
|
|
234
|
+
/** An array's item schema, e.g. `{ type: 'string' }`. */
|
|
235
|
+
items?: Record<string, unknown>;
|
|
236
|
+
/** An object's own properties. The app keeps them; the node does not. */
|
|
237
|
+
properties?: Record<string, ActionSchemaProperty>;
|
|
238
|
+
}
|
|
239
|
+
/** One section (`inputs`, `outputs`, `inOuts`, `outcomes`) of an `action-schema.json`. */
|
|
240
|
+
export interface ActionSchemaSection {
|
|
241
|
+
/** Always `'object'`. */
|
|
242
|
+
type?: 'object';
|
|
243
|
+
/** The section's arguments, by the app's own names. */
|
|
244
|
+
properties?: Record<string, ActionSchemaProperty>;
|
|
245
|
+
}
|
|
246
|
+
/** A coded action app's `action-schema.json`. */
|
|
247
|
+
export interface ActionSchemaFile {
|
|
248
|
+
/** What the task sends the app. Becomes `inputs.app.inputSchema`. */
|
|
249
|
+
inputs?: ActionSchemaSection;
|
|
250
|
+
/** What the reviewer answers. Readable as `out('<step>', '<name>')`. */
|
|
251
|
+
outputs?: ActionSchemaSection;
|
|
252
|
+
/** Sent to the app AND answered back. */
|
|
253
|
+
inOuts?: ActionSchemaSection;
|
|
254
|
+
/** The buttons that complete the task. The flow's `outcomes` must be among them. */
|
|
255
|
+
outcomes?: ActionSchemaSection;
|
|
256
|
+
}
|
|
257
|
+
/** One argument of the platform's action schema. */
|
|
258
|
+
export interface PlatformActionSchemaArg {
|
|
259
|
+
/** The argument's name, as the app declares it. */
|
|
260
|
+
name: string;
|
|
261
|
+
/** A .NET type name, e.g. `'System.Decimal'`. */
|
|
262
|
+
type: string;
|
|
263
|
+
/** Whether the app needs it. */
|
|
264
|
+
required?: boolean;
|
|
265
|
+
/** A list of `type`, which lowers to a JSON array. */
|
|
266
|
+
isList?: boolean;
|
|
267
|
+
/** The platform's other keys (`key`, `version`, `typeNamespace`, …), ignored. */
|
|
268
|
+
[field: string]: unknown;
|
|
269
|
+
}
|
|
270
|
+
/** The platform's action schema (Apps API, a solution's `spec.actionSchema`). */
|
|
271
|
+
export interface PlatformActionSchema {
|
|
272
|
+
/** What the task sends the app. */
|
|
273
|
+
inputs?: PlatformActionSchemaArg[];
|
|
274
|
+
/** What the reviewer answers. */
|
|
275
|
+
outputs?: PlatformActionSchemaArg[];
|
|
276
|
+
/** Sent and answered back. */
|
|
277
|
+
inOuts?: PlatformActionSchemaArg[];
|
|
278
|
+
/** The buttons that complete the task. */
|
|
279
|
+
outcomes?: PlatformActionSchemaArg[];
|
|
280
|
+
/** The schema's other keys (`key`, `id`, `name`, …), ignored. */
|
|
281
|
+
[field: string]: unknown;
|
|
185
282
|
}
|
|
283
|
+
/** An Action App's action schema, in either spelling. */
|
|
284
|
+
export type ActionSchema = ActionSchemaFile | PlatformActionSchema;
|
|
186
285
|
export interface HitlInputs {
|
|
187
286
|
/**
|
|
188
287
|
* Which human-task node type to emit. Omit it for today's default — see
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/maestro-builder-sdk",
|
|
3
|
-
"version": "6.59.
|
|
3
|
+
"version": "6.59.1",
|
|
4
4
|
"description": "Build UiPath Flow, Case, and BPMN artifacts by writing TypeScript.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://docs.uipath.com/maestro",
|
|
@@ -96,5 +96,5 @@
|
|
|
96
96
|
"@types/node": "^22.7.0",
|
|
97
97
|
"esbuild": "^0.28.1"
|
|
98
98
|
},
|
|
99
|
-
"gitref": "
|
|
99
|
+
"gitref": "b7b4631f9c98cab1479e0d5ec9495f43651e93f8"
|
|
100
100
|
}
|