@uipath/maestro-sdk 1.198.0 → 1.199.0-preview.104
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/index.js +96963 -73050
- package/dist/src/bpmn-validation/canvas/canvas-validator.d.ts +37 -0
- package/dist/src/bpmn-validation/canvas/model.d.ts +110 -0
- package/dist/src/bpmn-validation/canvas/rules.d.ts +84 -0
- package/dist/src/bpmn-validation/canvas/test-helpers.d.ts +16 -0
- package/dist/src/bpmn-validation/canvas/types.d.ts +156 -0
- package/dist/src/debug-http-client.d.ts +3 -1
- package/dist/src/debug-service.d.ts +15 -13
- package/dist/src/debug-types.d.ts +4 -0
- package/dist/src/index.d.ts +4 -0
- package/dist/src/registry/node-storage.d.ts +1 -1
- package/dist/src/registry/node-sync-service.d.ts +1 -0
- package/dist/src/registry/registry-service.d.ts +2 -2
- package/dist/src/shared-commands/process.d.ts +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Offline canvas validator for UiPath Maestro BPMN XML.
|
|
3
|
+
*
|
|
4
|
+
* Pipeline (mirrors the Studio Web import + canvas validation path):
|
|
5
|
+
* 1. Strict XML well-formedness gate via sax. bpmn-moddle's SAX parser
|
|
6
|
+
* (saxen) is lenient: it accepts unescaped `&`/`<`, `--` inside comments,
|
|
7
|
+
* and other malformed input that strict parsers — and the Studio Web
|
|
8
|
+
* canvas import — reject. A validator that is more permissive than the
|
|
9
|
+
* real import gives false confidence, so parse strictly first and refuse
|
|
10
|
+
* anything the import would refuse.
|
|
11
|
+
* 2. Parse the BPMN with bpmn-moddle using the UiPath extension descriptor
|
|
12
|
+
* (same getModdle() + fromXML() pattern as PO.Frontend).
|
|
13
|
+
* 3. Reconstruct the PO.Frontend Node[]/Edge[]/CanvasState model (`model.ts`).
|
|
14
|
+
* 4. Run the PO.Frontend validation rules (`rules.ts`) per diagram, plus
|
|
15
|
+
* the whole-model variable-existence and variable-not-set checks.
|
|
16
|
+
*
|
|
17
|
+
* Fully offline: no tenant calls, no filesystem access — callers pass the XML
|
|
18
|
+
* string.
|
|
19
|
+
*/
|
|
20
|
+
import type { CanvasFinding } from "./types";
|
|
21
|
+
export interface CanvasValidationResult {
|
|
22
|
+
/** All rule findings (ERROR + WARNING severities). */
|
|
23
|
+
findings: CanvasFinding[];
|
|
24
|
+
/** Non-blocking bpmn-moddle parse warnings. */
|
|
25
|
+
parseWarnings: string[];
|
|
26
|
+
}
|
|
27
|
+
/** Finding code for input the strict XML parser rejects. */
|
|
28
|
+
export declare const XML_NOT_WELL_FORMED = "XML_NOT_WELL_FORMED";
|
|
29
|
+
/** Finding code for input bpmn-moddle cannot parse as BPMN. */
|
|
30
|
+
export declare const BPMN_PARSE_ERROR = "BPMN_PARSE_ERROR";
|
|
31
|
+
/**
|
|
32
|
+
* Validate a Maestro BPMN document against the full PO.Frontend canvas rule
|
|
33
|
+
* set. Parse failures are returned as ERROR findings (`XML_NOT_WELL_FORMED` /
|
|
34
|
+
* `BPMN_PARSE_ERROR`) rather than thrown, so callers can treat every outcome
|
|
35
|
+
* uniformly.
|
|
36
|
+
*/
|
|
37
|
+
export declare function validateBpmnCanvas(xml: string): Promise<CanvasValidationResult>;
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reconstruct the PO.Frontend Node[]/Edge[]/CanvasState model from a parsed
|
|
3
|
+
* bpmn-moddle tree. This is the integration layer between BPMN XML and the
|
|
4
|
+
* ported rule engine in `rules.ts`. It mirrors
|
|
5
|
+
* PO.Frontend/src/services/serialization/bpmn-from-xml.ts closely enough that
|
|
6
|
+
* the rules see the same fields they see on canvas.
|
|
7
|
+
*
|
|
8
|
+
* Required-field metadata for the RequiredFields rule comes from the SDK's own
|
|
9
|
+
* static spec (`manifest/bpmn-spec.json`) — the same PO.Frontend-extracted
|
|
10
|
+
* catalog the registry commands use — so there is a single spec snapshot in
|
|
11
|
+
* the CLI.
|
|
12
|
+
*/
|
|
13
|
+
import type { CanvasEdge, CanvasNode, CanvasState } from "./types";
|
|
14
|
+
interface ModdleTypeAttr {
|
|
15
|
+
value?: string;
|
|
16
|
+
version?: string;
|
|
17
|
+
}
|
|
18
|
+
interface ModdleUiPathField {
|
|
19
|
+
name?: string;
|
|
20
|
+
displayName?: string;
|
|
21
|
+
type?: string;
|
|
22
|
+
subType?: string;
|
|
23
|
+
value?: unknown;
|
|
24
|
+
target?: string;
|
|
25
|
+
body?: unknown;
|
|
26
|
+
source?: unknown;
|
|
27
|
+
var?: string;
|
|
28
|
+
custom?: unknown;
|
|
29
|
+
required?: unknown;
|
|
30
|
+
originalVar?: string;
|
|
31
|
+
}
|
|
32
|
+
interface ModdleUiPathActivity {
|
|
33
|
+
$type?: string;
|
|
34
|
+
type?: ModdleTypeAttr | string;
|
|
35
|
+
version?: string;
|
|
36
|
+
context?: {
|
|
37
|
+
input?: ModdleUiPathField[];
|
|
38
|
+
};
|
|
39
|
+
input?: ModdleUiPathField[];
|
|
40
|
+
output?: ModdleUiPathField[];
|
|
41
|
+
}
|
|
42
|
+
interface ModdleUiPathError {
|
|
43
|
+
id?: string;
|
|
44
|
+
errorRef?: string;
|
|
45
|
+
priority?: unknown;
|
|
46
|
+
condition?: string;
|
|
47
|
+
detail?: unknown;
|
|
48
|
+
retryable?: unknown;
|
|
49
|
+
}
|
|
50
|
+
interface ModdleUiPathVariable {
|
|
51
|
+
id?: string;
|
|
52
|
+
name?: string;
|
|
53
|
+
type?: string;
|
|
54
|
+
subType?: string;
|
|
55
|
+
canonicalId?: string;
|
|
56
|
+
elementId?: string;
|
|
57
|
+
default?: unknown;
|
|
58
|
+
}
|
|
59
|
+
interface ModdleExtensionElement extends ModdleUiPathActivity {
|
|
60
|
+
error?: ModdleUiPathError[];
|
|
61
|
+
input?: ModdleUiPathField[] & ModdleUiPathVariable[];
|
|
62
|
+
inputOutput?: ModdleUiPathVariable[];
|
|
63
|
+
output?: ModdleUiPathField[] & ModdleUiPathVariable[];
|
|
64
|
+
}
|
|
65
|
+
interface ModdleEventDefinition {
|
|
66
|
+
$type: string;
|
|
67
|
+
id?: string;
|
|
68
|
+
errorRef?: ModdleElement | string;
|
|
69
|
+
messageRef?: ModdleElement | string;
|
|
70
|
+
signalRef?: ModdleElement | string;
|
|
71
|
+
escalationRef?: ModdleElement | string;
|
|
72
|
+
timeDuration?: {
|
|
73
|
+
body?: string;
|
|
74
|
+
} | string;
|
|
75
|
+
timeCycle?: {
|
|
76
|
+
body?: string;
|
|
77
|
+
} | string;
|
|
78
|
+
timeDate?: {
|
|
79
|
+
body?: string;
|
|
80
|
+
} | string;
|
|
81
|
+
}
|
|
82
|
+
export interface ModdleElement {
|
|
83
|
+
$type: string;
|
|
84
|
+
id?: string;
|
|
85
|
+
name?: string;
|
|
86
|
+
rootElements?: ModdleElement[];
|
|
87
|
+
flowElements?: ModdleElement[];
|
|
88
|
+
participants?: ModdleElement[];
|
|
89
|
+
messageFlows?: ModdleElement[];
|
|
90
|
+
processRef?: ModdleElement | string;
|
|
91
|
+
eventDefinitions?: ModdleEventDefinition[];
|
|
92
|
+
triggeredByEvent?: boolean;
|
|
93
|
+
attachedToRef?: ModdleElement | string;
|
|
94
|
+
sourceRef?: ModdleElement | string;
|
|
95
|
+
targetRef?: ModdleElement | string;
|
|
96
|
+
conditionExpression?: {
|
|
97
|
+
body?: string;
|
|
98
|
+
} | string;
|
|
99
|
+
default?: ModdleElement | string;
|
|
100
|
+
extensionElements?: {
|
|
101
|
+
values?: ModdleExtensionElement[];
|
|
102
|
+
};
|
|
103
|
+
errorCode?: string;
|
|
104
|
+
escalationCode?: string;
|
|
105
|
+
}
|
|
106
|
+
export declare function buildModel(definitionsElement: unknown): CanvasState;
|
|
107
|
+
export declare function collectKnownVariableIds(canvasState: CanvasState): Set<string>;
|
|
108
|
+
export declare function allNodes(canvasState: CanvasState): CanvasNode[];
|
|
109
|
+
export declare function allEdges(canvasState: CanvasState): CanvasEdge[];
|
|
110
|
+
export {};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Self-contained Maestro BPMN canvas validation rule engine.
|
|
3
|
+
*
|
|
4
|
+
* This module is a faithful, offline port of the PO.Frontend canvas validation
|
|
5
|
+
* rule engine (PO.Frontend/src/services/validation/bpmn/). It operates on the
|
|
6
|
+
* reconstructed Node[]/Edge[]/CanvasState model (see `model.ts`), which mirrors
|
|
7
|
+
* the frontend's `Node[]`/`Edge[]` derived from the same BPMN XML.
|
|
8
|
+
*
|
|
9
|
+
* Each rule cites the PO.Frontend source it is ported from. Where the port
|
|
10
|
+
* intentionally matches an observable frontend quirk instead of the literal
|
|
11
|
+
* rule text, the divergence is documented inline (see FakeJoinRule).
|
|
12
|
+
*/
|
|
13
|
+
import type { CanvasDiagram, CanvasEdge, CanvasFinding, CanvasNode, CanvasState, ValidateDiagramOptions, ValidateVariableNotSetOptions, ValidationLookupMaps } from "./types";
|
|
14
|
+
import { SEVERITY } from "./types";
|
|
15
|
+
export { SEVERITY };
|
|
16
|
+
export declare function buildValidationLookupMaps(nodes: CanvasNode[], edges: CanvasEdge[]): ValidationLookupMaps;
|
|
17
|
+
/**
|
|
18
|
+
* Port of VariableUtil.validateNoAssignments. Returns true if the expression
|
|
19
|
+
* contains an assignment operator (excluding comparison/arrow operators).
|
|
20
|
+
*/
|
|
21
|
+
export declare function expressionHasAssignment(expression: string | undefined): boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Collect every `vars.X` / `result.X` reference in an expression that does NOT
|
|
24
|
+
* resolve. Mirrors VariableUtil.getVariablesInExpression (the `nonExisting`
|
|
25
|
+
* half) + the result-validity split in validateVariablesInExpression:758-782.
|
|
26
|
+
*
|
|
27
|
+
* - `vars.X` resolves against `knownIds` (variable ids/names/canonicalIds,
|
|
28
|
+
* declared anywhere) — matches `existingIdsSet` semantics in the frontend.
|
|
29
|
+
* - `result.X` resolves ONLY against the referencing element's OWN output
|
|
30
|
+
* identifiers (`resultIds`); a `result.X` that names no output of this
|
|
31
|
+
* element is flagged, exactly like `isResultVariableValidForElement`
|
|
32
|
+
* (VariableUtil.ts:166-178) pushing it onto the non-existing set
|
|
33
|
+
* (VariableUtil.ts:263 treats the unresolved result ref as non-existing).
|
|
34
|
+
*
|
|
35
|
+
* `resultIds` defaults to an empty set: in contexts where result refs are not
|
|
36
|
+
* element-local (e.g. edge conditions, which have no own outputs) every
|
|
37
|
+
* `result.X` is unresolved, matching the frontend.
|
|
38
|
+
*/
|
|
39
|
+
export declare function findUnknownVariableRefs(expression: string | undefined, knownIds: Set<string>, resultIds?: Set<string>): string[];
|
|
40
|
+
export declare function validateConditionalSequenceFlow(nodes: CanvasNode[], _edges: CanvasEdge[], lookupMaps: ValidationLookupMaps): CanvasFinding[];
|
|
41
|
+
export declare function validateConnections(_nodes: CanvasNode[], edges: CanvasEdge[], lookupMaps: ValidationLookupMaps): CanvasFinding[];
|
|
42
|
+
export declare function validateDuplicateErrorEventSubprocess(nodes: CanvasNode[], canvasState: CanvasState, lookupMaps: ValidationLookupMaps): CanvasFinding[];
|
|
43
|
+
export declare function validateEventSubProcessStart(nodes: CanvasNode[], _edges: CanvasEdge[], lookupMaps: ValidationLookupMaps): CanvasFinding[];
|
|
44
|
+
export declare function validateErrorBoundaryEvents(nodes: CanvasNode[]): CanvasFinding[];
|
|
45
|
+
export declare function validateDuplicateErrorBoundaryEvents(nodes: CanvasNode[], canvasState: CanvasState): CanvasFinding[];
|
|
46
|
+
export declare function validateErrorEndEvents(nodes: CanvasNode[]): CanvasFinding[];
|
|
47
|
+
export declare function validateFakeJoins(nodes: CanvasNode[] | undefined, edges: CanvasEdge[] | undefined, lookupMaps: ValidationLookupMaps): CanvasFinding[];
|
|
48
|
+
export declare function validateMessageFlowCrossPool(nodes: CanvasNode[], edges: CanvasEdge[], lookupMaps: ValidationLookupMaps): CanvasFinding[];
|
|
49
|
+
export declare function validateMissingResource(nodes: CanvasNode[]): CanvasFinding[];
|
|
50
|
+
export declare function validateMissingRootVariables(nodes: CanvasNode[], canvasState: CanvasState): CanvasFinding[];
|
|
51
|
+
export declare function validateNoAssignmentsInExpressions(nodes: CanvasNode[] | undefined, edges: CanvasEdge[] | undefined): CanvasFinding[];
|
|
52
|
+
export declare function validateRequiredFields(nodes: CanvasNode[] | undefined): CanvasFinding[];
|
|
53
|
+
export declare function validateSequenceFlowPoolCrossing(nodes: CanvasNode[], edges: CanvasEdge[], lookupMaps: ValidationLookupMaps): CanvasFinding[];
|
|
54
|
+
export declare function validateSequenceFlowSubProcessCrossing(_nodes: CanvasNode[], edges: CanvasEdge[], lookupMaps: ValidationLookupMaps): CanvasFinding[];
|
|
55
|
+
export declare function validateSingleBlankStartEvent(nodes: CanvasNode[] | undefined, edges: CanvasEdge[] | undefined, lookupMaps: ValidationLookupMaps): CanvasFinding[];
|
|
56
|
+
export declare function validateSingleStartEventInEventSubProcess(nodes: CanvasNode[], _edges: CanvasEdge[], lookupMaps: ValidationLookupMaps): CanvasFinding[];
|
|
57
|
+
export declare function validateSuperfluousGateway(nodes: CanvasNode[] | undefined, edges: CanvasEdge[] | undefined, lookupMaps: ValidationLookupMaps): CanvasFinding[];
|
|
58
|
+
export declare function validateTaskTimerRange(nodes: CanvasNode[] | undefined): CanvasFinding[];
|
|
59
|
+
export declare function validateTimerDuration(nodes: CanvasNode[] | undefined): CanvasFinding[];
|
|
60
|
+
/**
|
|
61
|
+
* Flags nodes whose only outgoing sequence flow carries a condition
|
|
62
|
+
* expression. At runtime the flow is taken only when the condition evaluates
|
|
63
|
+
* to true, so a false condition leaves the token with no path forward and the
|
|
64
|
+
* instance silently stops progressing past the node.
|
|
65
|
+
*/
|
|
66
|
+
export declare function validateSingleConditionalOutgoingFlow(nodes: CanvasNode[], _edges: CanvasEdge[], lookupMaps: ValidationLookupMaps): CanvasFinding[];
|
|
67
|
+
/**
|
|
68
|
+
* Validates that timer events have required fields populated based on their
|
|
69
|
+
* timerType: timeDate requires timeDate, timeDuration requires timeDuration,
|
|
70
|
+
* timeCycle requires timeCycle.
|
|
71
|
+
*/
|
|
72
|
+
export declare function validateTimerRequiredFields(nodes: CanvasNode[] | undefined): CanvasFinding[];
|
|
73
|
+
export declare function validateEventObjectFields(canvasState: CanvasState): CanvasFinding[];
|
|
74
|
+
export declare function validateMethodParentheses(allNodesList: CanvasNode[], allEdgesList: CanvasEdge[]): CanvasFinding[];
|
|
75
|
+
/**
|
|
76
|
+
* Literal type mismatches on agent-job inputs are surfaced as warnings, not
|
|
77
|
+
* errors: a value like a stringified JSON object is still a valid literal for
|
|
78
|
+
* some targets, so the likely mistake is flagged without blocking.
|
|
79
|
+
*/
|
|
80
|
+
export declare function validateInputTypeMismatch(allNodesList: CanvasNode[]): CanvasFinding[];
|
|
81
|
+
export declare function validateVariableExistence(allNodesList: CanvasNode[], allEdgesList: CanvasEdge[], knownIds: Set<string>): CanvasFinding[];
|
|
82
|
+
export declare function validateVariableNotSet(allNodesList: CanvasNode[], allEdgesList: CanvasEdge[], knownIds: Set<string>, canvasState: CanvasState | undefined, options?: ValidateVariableNotSetOptions): CanvasFinding[];
|
|
83
|
+
export declare function validateDiagram(diagram: CanvasDiagram, canvasState: CanvasState, options?: ValidateDiagramOptions): CanvasFinding[];
|
|
84
|
+
export declare const RULE_CODES: readonly ["MISSING_CONDITION_EXPRESSION", "INVALID_CONNECTION", "INVALID_CONNECTION_TYPE", "DUPLICATE_ERROR_EVENT_SUBPROCESS", "MULTIPLE_CATCH_ALL_ERROR_EVENT_SUBPROCESS", "START_EVENT_WITHOUT_DEFINITION_IN_EVENT_SUBPROCESS", "INVALID_EVENT_DEFINITION_IN_EVENT_SUBPROCESS", "START_EVENT_WITH_DEFINITION_IN_SUBPROCESS", "ERROR_BOUNDARY_EVENT_EMPTY_ERROR_REF", "MULTIPLE_CATCH_ALL_BOUNDARY_EVENTS_ON_TASK", "DUPLICATE_ERROR_BOUNDARY_EVENT_ON_TASK", "ERROR_END_EVENT_MISSING_EXCEPTION", "FAKE_JOIN", "SAME_POOL_MESSAGE_FLOW", "MISSING_RESOURCE", "MISSING_ROOT_VARIABLE", "ASSIGNMENT_NOT_ALLOWED", "EMPTY_REQUIRED_FIELD", "CROSSING_POOL_BOUNDARY", "CROSSING_SUBPROCESS_BOUNDARY", "MULTIPLE_BLANK_START_EVENTS", "MULTIPLE_START_EVENTS_IN_EVENT_SUBPROCESS", "SUPERFLUOUS_GATEWAY", "TASK_TIMER_OUT_OF_RANGE", "TIMER_DURATION_INVALID", "TIMER_DURATION_WEEK_UNSUPPORTED", "VARIABLE_DOES_NOT_EXIST", "VARIABLE_NOT_SET", "SINGLE_CONDITIONAL_OUTGOING_FLOW", "TIMER_MISSING_REQUIRED_FIELD", "EVENT_OBJECT_EMPTY_REQUIRED_FIELD", "EVENT_OBJECT_DUPLICATE_FIELD", "METHOD_MISSING_PARENTHESES", "INPUT_TYPE_MISMATCH"];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { CanvasEdge, CanvasEdgeData, CanvasErrorObject, CanvasNamedObject, CanvasNode, CanvasNodeData, CanvasState, UiPathVariableGroups, ValidationLookupMaps } from "./types";
|
|
2
|
+
export declare function node(id: string, type: string, data?: CanvasNodeData, extra?: Partial<Pick<CanvasNode, "parentId" | "abstractType">>): CanvasNode;
|
|
3
|
+
export declare function edge(id: string, source: string, target: string, { type, data, }?: {
|
|
4
|
+
type?: string;
|
|
5
|
+
data?: CanvasEdgeData;
|
|
6
|
+
}): CanvasEdge;
|
|
7
|
+
export declare function canvasState({ errors, signals, messages, escalations, rootVariables, diagramNodes, diagramEdges, }?: {
|
|
8
|
+
errors?: CanvasErrorObject[];
|
|
9
|
+
signals?: CanvasNamedObject[];
|
|
10
|
+
messages?: CanvasNamedObject[];
|
|
11
|
+
escalations?: CanvasNamedObject[];
|
|
12
|
+
rootVariables?: UiPathVariableGroups;
|
|
13
|
+
diagramNodes?: CanvasNode[];
|
|
14
|
+
diagramEdges?: CanvasEdge[];
|
|
15
|
+
}): CanvasState;
|
|
16
|
+
export declare function maps(nodes?: CanvasNode[], edges?: CanvasEdge[]): ValidationLookupMaps;
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Types for the canvas validation rule engine — a faithful, offline port of
|
|
3
|
+
* the PO.Frontend canvas validation rules (PO.Frontend/src/services/validation/bpmn/).
|
|
4
|
+
*
|
|
5
|
+
* `CanvasNode` / `CanvasEdge` / `CanvasState` mirror the frontend `Node[]` /
|
|
6
|
+
* `Edge[]` / `CanvasState` model that the frontend derives from BPMN XML, so
|
|
7
|
+
* the ported rules in `rules.ts` see the same fields they see on canvas.
|
|
8
|
+
*/
|
|
9
|
+
export declare const SEVERITY: {
|
|
10
|
+
readonly ERROR: "ERROR";
|
|
11
|
+
readonly WARNING: "WARNING";
|
|
12
|
+
};
|
|
13
|
+
export type CanvasSeverity = (typeof SEVERITY)[keyof typeof SEVERITY];
|
|
14
|
+
export interface CanvasFinding {
|
|
15
|
+
code: string;
|
|
16
|
+
message: string;
|
|
17
|
+
severity: CanvasSeverity;
|
|
18
|
+
elementId?: string;
|
|
19
|
+
sourceId?: string;
|
|
20
|
+
targetId?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface UiPathField {
|
|
23
|
+
name?: string;
|
|
24
|
+
displayName?: string;
|
|
25
|
+
type?: string;
|
|
26
|
+
subType?: string;
|
|
27
|
+
value?: unknown;
|
|
28
|
+
target?: string;
|
|
29
|
+
body?: unknown;
|
|
30
|
+
required?: boolean;
|
|
31
|
+
}
|
|
32
|
+
export interface UiPathOutputField extends UiPathField {
|
|
33
|
+
source?: unknown;
|
|
34
|
+
var?: string;
|
|
35
|
+
custom?: boolean;
|
|
36
|
+
canonicalId?: string;
|
|
37
|
+
/** Original variable id before a user reassignment; serialized to XML. */
|
|
38
|
+
originalVar?: string;
|
|
39
|
+
}
|
|
40
|
+
export interface UiPathVariable {
|
|
41
|
+
id?: string;
|
|
42
|
+
name?: string;
|
|
43
|
+
type?: string;
|
|
44
|
+
subType?: string;
|
|
45
|
+
canonicalId?: string;
|
|
46
|
+
elementId?: string;
|
|
47
|
+
default?: unknown;
|
|
48
|
+
}
|
|
49
|
+
export interface UiPathVariableGroups {
|
|
50
|
+
inputs?: UiPathVariable[];
|
|
51
|
+
inputOutputs?: UiPathVariable[];
|
|
52
|
+
outputs?: UiPathVariable[];
|
|
53
|
+
}
|
|
54
|
+
export interface UiPathErrorMapping {
|
|
55
|
+
id?: string;
|
|
56
|
+
errorRef?: string;
|
|
57
|
+
priority?: unknown;
|
|
58
|
+
condition?: string;
|
|
59
|
+
detail?: unknown;
|
|
60
|
+
retryable?: boolean;
|
|
61
|
+
}
|
|
62
|
+
export interface UiPathNodeData {
|
|
63
|
+
serviceType?: string;
|
|
64
|
+
version?: string;
|
|
65
|
+
context?: UiPathField[];
|
|
66
|
+
inputs?: UiPathField[];
|
|
67
|
+
outputs?: UiPathOutputField[];
|
|
68
|
+
errorMapping?: UiPathErrorMapping[];
|
|
69
|
+
variables?: UiPathVariableGroups;
|
|
70
|
+
requiredFieldNames?: string[];
|
|
71
|
+
}
|
|
72
|
+
export interface CanvasEventDefinition {
|
|
73
|
+
type?: string;
|
|
74
|
+
id?: string;
|
|
75
|
+
errorRef?: string;
|
|
76
|
+
messageRef?: string;
|
|
77
|
+
signalRef?: string;
|
|
78
|
+
escalationRef?: string;
|
|
79
|
+
timerType?: "timeDuration" | "timeCycle" | "timeDate";
|
|
80
|
+
timeDuration?: string;
|
|
81
|
+
timeCycle?: string;
|
|
82
|
+
timeDate?: string;
|
|
83
|
+
}
|
|
84
|
+
export interface CanvasParentRef {
|
|
85
|
+
id: string;
|
|
86
|
+
type: string;
|
|
87
|
+
}
|
|
88
|
+
export interface CanvasNodeData {
|
|
89
|
+
label?: string;
|
|
90
|
+
eventDefinition?: CanvasEventDefinition;
|
|
91
|
+
triggeredByEvent?: boolean;
|
|
92
|
+
attachedToId?: string;
|
|
93
|
+
uipath?: UiPathNodeData;
|
|
94
|
+
parentElement?: CanvasParentRef;
|
|
95
|
+
processRef?: string;
|
|
96
|
+
}
|
|
97
|
+
export interface CanvasNode {
|
|
98
|
+
id: string;
|
|
99
|
+
type: string;
|
|
100
|
+
parentId?: string;
|
|
101
|
+
abstractType?: string;
|
|
102
|
+
data: CanvasNodeData;
|
|
103
|
+
}
|
|
104
|
+
export interface CanvasEdgeData {
|
|
105
|
+
label?: string;
|
|
106
|
+
conditionExpression?: string;
|
|
107
|
+
defaultFlow?: boolean;
|
|
108
|
+
parentElement?: CanvasParentRef;
|
|
109
|
+
}
|
|
110
|
+
export interface CanvasEdge {
|
|
111
|
+
id: string;
|
|
112
|
+
type?: string;
|
|
113
|
+
source?: string;
|
|
114
|
+
target?: string;
|
|
115
|
+
data: CanvasEdgeData;
|
|
116
|
+
}
|
|
117
|
+
export interface CanvasErrorObject {
|
|
118
|
+
id?: string;
|
|
119
|
+
name?: string;
|
|
120
|
+
errorCode?: string;
|
|
121
|
+
}
|
|
122
|
+
export interface CanvasNamedObject {
|
|
123
|
+
id?: string;
|
|
124
|
+
name?: string;
|
|
125
|
+
escalationCode?: string;
|
|
126
|
+
}
|
|
127
|
+
export interface CanvasObjects {
|
|
128
|
+
errors: CanvasErrorObject[];
|
|
129
|
+
messages: CanvasNamedObject[];
|
|
130
|
+
signals: CanvasNamedObject[];
|
|
131
|
+
escalations: CanvasNamedObject[];
|
|
132
|
+
}
|
|
133
|
+
export interface CanvasDiagram {
|
|
134
|
+
diagramId: string;
|
|
135
|
+
root: CanvasParentRef;
|
|
136
|
+
nodes: CanvasNode[];
|
|
137
|
+
edges: CanvasEdge[];
|
|
138
|
+
}
|
|
139
|
+
export interface CanvasState {
|
|
140
|
+
rootDiagramId?: string;
|
|
141
|
+
root: CanvasNode;
|
|
142
|
+
diagramsById: Record<string, CanvasDiagram>;
|
|
143
|
+
objects?: CanvasObjects;
|
|
144
|
+
}
|
|
145
|
+
export interface ValidationLookupMaps {
|
|
146
|
+
nodeById: Map<string, CanvasNode>;
|
|
147
|
+
nodesByParentId: Map<string | undefined, CanvasNode[]>;
|
|
148
|
+
edgesBySource: Map<string | undefined, CanvasEdge[]>;
|
|
149
|
+
edgesByTarget: Map<string | undefined, CanvasEdge[]>;
|
|
150
|
+
}
|
|
151
|
+
export interface ValidateDiagramOptions {
|
|
152
|
+
enableMissingRootVariableValidation?: boolean;
|
|
153
|
+
}
|
|
154
|
+
export interface ValidateVariableNotSetOptions {
|
|
155
|
+
isCaseManagement?: boolean;
|
|
156
|
+
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
import type { OrchestratorApiConfig } from "./debug-types";
|
|
7
7
|
/** Logical service the helper is talking to. Used by callers / formatters
|
|
8
8
|
* to render the failing endpoint with the right URL prefix. */
|
|
9
|
-
export type DebugApiService = "orchestrator" | "pims" | "studio-web";
|
|
9
|
+
export type DebugApiService = "automation-solutions" | "orchestrator" | "pims" | "studio-web";
|
|
10
10
|
/** Structured payload carried by a {@link MaestroHttpError}. Every field
|
|
11
11
|
* except {@link stage} is always populated; {@link stage} is filled in by the
|
|
12
12
|
* caller via the optional `stage` parameter on each helper. */
|
|
@@ -83,6 +83,8 @@ export declare class MaestroHttpError extends Error {
|
|
|
83
83
|
* `FailureOutput.Context`. */
|
|
84
84
|
private static formatMessage;
|
|
85
85
|
}
|
|
86
|
+
/** Make a GET request to the Automation Solutions API. */
|
|
87
|
+
export declare function automationSolutionsGet<T>(config: OrchestratorApiConfig, path: string, stage?: string, signal?: AbortSignal): Promise<T>;
|
|
86
88
|
/**
|
|
87
89
|
* Make a GET request to Orchestrator API.
|
|
88
90
|
* @param stage Optional pipeline stage label (e.g. "get-personal-folder").
|
|
@@ -74,18 +74,19 @@ export interface PrepareForCustomDebugParams {
|
|
|
74
74
|
solutionName: string;
|
|
75
75
|
folderKey: string;
|
|
76
76
|
sessionId?: string;
|
|
77
|
+
provisioningTimeoutMs?: number;
|
|
78
|
+
provisioningPollIntervalMs?: number;
|
|
77
79
|
}
|
|
78
80
|
export interface PrepareForCustomDebugResponse {
|
|
79
81
|
solutionDebugId: string;
|
|
80
82
|
projectDebugId: string;
|
|
81
83
|
}
|
|
82
84
|
/**
|
|
83
|
-
* Prepare
|
|
85
|
+
* Prepare a local workspace project for Studio Web debug.
|
|
84
86
|
*
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
* must use for execution.
|
|
87
|
+
* Studio Web loads the uploaded solution graph, starts resource provisioning,
|
|
88
|
+
* and returns immediately when no work is needed. Pending work is polled via
|
|
89
|
+
* Automation Solutions before execution starts.
|
|
89
90
|
*/
|
|
90
91
|
export declare function prepareForCustomDebug(params: PrepareForCustomDebugParams): Promise<PrepareForCustomDebugResponse>;
|
|
91
92
|
/**
|
|
@@ -228,12 +229,12 @@ export interface UploadAndDebugParams {
|
|
|
228
229
|
name: string;
|
|
229
230
|
}>, solutionId: string) => Promise<SolutionProjectDescriptor[]> | SolutionProjectDescriptor[];
|
|
230
231
|
/**
|
|
231
|
-
* Solution name passed to {@link prepareForCustomDebug}.
|
|
232
|
-
*
|
|
233
|
-
* omitted. Has no effect on routing — Orchestrator only cares that the
|
|
234
|
-
* resource-builder call returned the debug IDs.
|
|
232
|
+
* Solution name passed to {@link prepareForCustomDebug}. Falls back to
|
|
233
|
+
* `projectName` when omitted.
|
|
235
234
|
*/
|
|
236
235
|
solutionName?: string;
|
|
236
|
+
/** Fail instead of falling back when Studio Web debug preparation fails. */
|
|
237
|
+
requireDebugPreparation?: boolean;
|
|
237
238
|
}
|
|
238
239
|
/**
|
|
239
240
|
* Shared upload-and-debug lifecycle used by flow-tool, maestro-tool, and case-tool.
|
|
@@ -241,10 +242,11 @@ export interface UploadAndDebugParams {
|
|
|
241
242
|
* 1. Uploads solution to Studio Web (via caller-provided `upload` fn)
|
|
242
243
|
* 2. Persists solutionId locally (via `onSolutionId` callback)
|
|
243
244
|
* 3. Fetches personal workspace folder
|
|
244
|
-
* 4.
|
|
245
|
-
* 5.
|
|
246
|
-
* 6.
|
|
247
|
-
* 7.
|
|
245
|
+
* 4. Prepares the Studio Web debug mapping and resources
|
|
246
|
+
* 5. Begins debug session in Orchestrator
|
|
247
|
+
* 6. Creates debug instance in PIMS
|
|
248
|
+
* 7. Polls for completion
|
|
249
|
+
* 8. Returns DebugResult with solutionId and studioWebUrl
|
|
248
250
|
*/
|
|
249
251
|
export declare function uploadAndDebugSolution(params: UploadAndDebugParams): Promise<DebugResult>;
|
|
250
252
|
/**
|
|
@@ -62,6 +62,10 @@ export interface InlineAgentDescriptor {
|
|
|
62
62
|
* resolves the path against the deployed package.
|
|
63
63
|
*/
|
|
64
64
|
entryPointPath: string;
|
|
65
|
+
/** Name of the Flow project whose package contains this inline agent. */
|
|
66
|
+
hostProjectName?: string;
|
|
67
|
+
/** Studio Web project id resolved for {@link hostProjectName} after upload. */
|
|
68
|
+
hostProjectId?: string;
|
|
65
69
|
}
|
|
66
70
|
/**
|
|
67
71
|
* Describes an in-solution sibling project (a flow-as-node callee, RPA
|
package/dist/src/index.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
export { BPMN_PARSE_ERROR, type CanvasValidationResult, validateBpmnCanvas, XML_NOT_WELL_FORMED, } from "./bpmn-validation/canvas/canvas-validator";
|
|
2
|
+
export { RULE_CODES } from "./bpmn-validation/canvas/rules";
|
|
3
|
+
export type { CanvasFinding, CanvasSeverity, } from "./bpmn-validation/canvas/types";
|
|
4
|
+
export { SEVERITY as CANVAS_SEVERITY } from "./bpmn-validation/canvas/types";
|
|
1
5
|
export type { BpmnFileValidationContext, BpmnFileValidator, BpmnProjectValidationContext, BpmnProjectValidator, BpmnValidateServiceOptions, BpmnValidationDiagnostic, BpmnValidationFileSystem, BpmnValidationResult, } from "./bpmn-validation/project-validator";
|
|
2
6
|
export { BpmnValidateService } from "./bpmn-validation/project-validator";
|
|
3
7
|
export { pimsGet, pimsPatch, pimsPost, pimsPut } from "./client";
|
|
@@ -23,8 +23,8 @@ import type { BpmnExtensionType, DiscoveredConnector, DiscoveredProcess, Maestro
|
|
|
23
23
|
*
|
|
24
24
|
* This list is a deliberate SUPERSET of flow-core's
|
|
25
25
|
* `ORCHESTRATOR_RESOURCE_TYPES` (`Process`, `Agent`, `ProcessOrchestration`,
|
|
26
|
-
* `Flow`, `Api`, `Function`):
|
|
27
|
-
* exactly, and `
|
|
26
|
+
* `Flow`, `CaseManagement`, `Api`, `Function`): those seven mirror the
|
|
27
|
+
* canvas/node-index exactly, and `BusinessRules` is the bindable extra the
|
|
28
28
|
* canvas does not yet surface but Maestro authoring can reference.
|
|
29
29
|
* orchestrator-tool's `processes list` command filters the same endpoint by
|
|
30
30
|
* these same `ProcessType` values, so they are known-good filters.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/maestro-sdk",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.199.0-preview.104",
|
|
5
5
|
"description": "SDK for the UiPath Maestro (PIMS) API — process instance management.",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"files": [
|
|
43
43
|
"dist"
|
|
44
44
|
],
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "829a8ab8a25bce5b62c284bd1ddc674d2947f647"
|
|
46
46
|
}
|