@uipath/maestro-sdk 0.2.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +119727 -8807
- package/dist/src/client-factory.d.ts +2 -0
- package/dist/src/client.d.ts +3 -0
- package/dist/src/debug-http-client.d.ts +30 -0
- package/dist/src/debug-service.d.ts +99 -0
- package/dist/src/debug-types.d.ts +92 -0
- package/dist/src/flags/manifest-flags.d.ts +4 -0
- package/dist/src/index.d.ts +23 -0
- package/dist/src/manifest/bpmn-spec.d.ts +22 -0
- package/dist/src/manifest/types.d.ts +135 -0
- package/dist/src/query-string.d.ts +1 -0
- package/dist/src/registry/command.d.ts +12 -0
- package/dist/src/registry/filter-engine.d.ts +11 -0
- package/dist/src/registry/filter-parser.d.ts +18 -0
- package/dist/src/registry/index.d.ts +11 -0
- package/dist/src/registry/integration-service-fetcher.d.ts +34 -0
- package/dist/src/registry/integration-service-metadata.types.d.ts +68 -0
- package/dist/src/registry/node-storage.d.ts +51 -0
- package/dist/src/registry/node-sync-service.d.ts +84 -0
- package/dist/src/registry/registry-service.d.ts +56 -0
- package/dist/src/registry/solution-discovery.d.ts +31 -0
- package/dist/src/registry/storage.d.ts +28 -0
- package/dist/src/registry/types.d.ts +23 -0
- package/dist/src/shared-commands/incidents.d.ts +6 -0
- package/dist/src/shared-commands/instances.d.ts +14 -0
- package/dist/src/shared-commands/processes.d.ts +8 -0
- package/dist/src/shared-utils.d.ts +11 -0
- package/dist/src/types.d.ts +126 -0
- package/dist/src/with-pims-call.d.ts +2 -0
- package/package.json +18 -6
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { PimsApiConfig, PimsRequestOptions } from "./types";
|
|
2
|
+
export declare function pimsGet<T>(config: PimsApiConfig, path: string, options?: PimsRequestOptions): Promise<T>;
|
|
3
|
+
export declare function pimsPost<T>(config: PimsApiConfig, path: string, body?: unknown, options?: PimsRequestOptions): Promise<T>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared HTTP client for Studio Web debug workflows.
|
|
3
|
+
* Provides Orchestrator, PIMS, and Studio Web API helpers.
|
|
4
|
+
* Used by flow-tool, case-tool, and maestro-tool.
|
|
5
|
+
*/
|
|
6
|
+
import type { OrchestratorApiConfig } from "./debug-types";
|
|
7
|
+
/**
|
|
8
|
+
* Make a GET request to Orchestrator API
|
|
9
|
+
*/
|
|
10
|
+
export declare function orchestratorGet<T>(config: OrchestratorApiConfig, path: string): Promise<T>;
|
|
11
|
+
/**
|
|
12
|
+
* Make a POST request to Orchestrator API
|
|
13
|
+
*/
|
|
14
|
+
export declare function orchestratorPost<T>(config: OrchestratorApiConfig, path: string, body: unknown): Promise<T>;
|
|
15
|
+
/**
|
|
16
|
+
* Make a GET request to PIMS API (debug path, not /api/v1)
|
|
17
|
+
*/
|
|
18
|
+
export declare function debugPimsGet<T>(config: OrchestratorApiConfig, path: string): Promise<T>;
|
|
19
|
+
/**
|
|
20
|
+
* Make a POST request to PIMS API (debug path, not /api/v1)
|
|
21
|
+
*/
|
|
22
|
+
export declare function debugPimsPost<T>(config: OrchestratorApiConfig, path: string, body: unknown): Promise<T>;
|
|
23
|
+
/**
|
|
24
|
+
* Make a POST request to Studio Web backend API
|
|
25
|
+
*/
|
|
26
|
+
export declare function studioWebPost<T>(config: OrchestratorApiConfig, organizationName: string, path: string, body: FormData | unknown, extraHeaders?: Record<string, string>): Promise<T>;
|
|
27
|
+
/**
|
|
28
|
+
* Make a DELETE request to Studio Web backend API
|
|
29
|
+
*/
|
|
30
|
+
export declare function studioWebDelete(config: OrchestratorApiConfig, organizationName: string, path: string): Promise<void>;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared debug service utilities for Studio Web debug workflows.
|
|
3
|
+
* Provides common methods used by flow-tool, case-tool, and maestro-tool.
|
|
4
|
+
*/
|
|
5
|
+
import type { IFileSystem } from "@uipath/filesystem";
|
|
6
|
+
import type { BeginSessionResponse, DebugCallbacks, DebugInstanceResponse, DebugInstanceStatusResponse, DebugResult, OrchestratorApiConfig } from "./debug-types";
|
|
7
|
+
/**
|
|
8
|
+
* Extract the first bpmn:startEvent id from BPMN XML.
|
|
9
|
+
* Falls back to "start" if no start event is found.
|
|
10
|
+
*/
|
|
11
|
+
export declare function extractStartEventId(bpmnXml: string): string;
|
|
12
|
+
/**
|
|
13
|
+
* Fetch the personal workspace folder from Orchestrator.
|
|
14
|
+
*/
|
|
15
|
+
export declare function getPersonalFolderKey(config: OrchestratorApiConfig): Promise<{
|
|
16
|
+
key: string;
|
|
17
|
+
id: number;
|
|
18
|
+
}>;
|
|
19
|
+
export interface PersonalFolderInfo {
|
|
20
|
+
key: string;
|
|
21
|
+
id: number;
|
|
22
|
+
displayName: string;
|
|
23
|
+
fullyQualifiedName: string;
|
|
24
|
+
parentKey: string | null;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Fetch detailed personal workspace folder info from Orchestrator.
|
|
28
|
+
* Returns key, id, display name, fully qualified name, and parent key.
|
|
29
|
+
*/
|
|
30
|
+
export declare function getPersonalFolderInfo(config: OrchestratorApiConfig): Promise<PersonalFolderInfo>;
|
|
31
|
+
/**
|
|
32
|
+
* Begin a debug session in Orchestrator.
|
|
33
|
+
*/
|
|
34
|
+
export declare function beginDebugSession(config: OrchestratorApiConfig, inputArguments?: string): Promise<BeginSessionResponse>;
|
|
35
|
+
/**
|
|
36
|
+
* Create a debug instance in PIMS.
|
|
37
|
+
* @param processType - "Flow" for flow-tool, "case" for case-tool, "processOrchestration" for maestro-tool
|
|
38
|
+
*/
|
|
39
|
+
export declare function createDebugInstance(config: OrchestratorApiConfig, jobKey: string, solutionId: string, studioWebProjectId: string, entryPoint: string, processType?: string): Promise<DebugInstanceResponse>;
|
|
40
|
+
/**
|
|
41
|
+
* Poll PIMS debug instance element-executions until terminal status.
|
|
42
|
+
*/
|
|
43
|
+
export declare function pollDebugInstanceStatus(config: OrchestratorApiConfig, instanceId: string, callbacks?: DebugCallbacks, pollInterval?: number, maxPolls?: number, jobKey?: string): Promise<DebugInstanceStatusResponse>;
|
|
44
|
+
/**
|
|
45
|
+
* Parameters for the shared upload-and-debug lifecycle.
|
|
46
|
+
* Callers are responsible for building the .uis package and resolving
|
|
47
|
+
* the existing solution ID — this function handles the upload, session
|
|
48
|
+
* creation, polling, and result mapping.
|
|
49
|
+
*/
|
|
50
|
+
export interface UploadAndDebugParams {
|
|
51
|
+
/** Upload the .uis buffer/path to Studio Web. Callers provide this so
|
|
52
|
+
* maestro-sdk doesn't need to depend on solution-sdk. */
|
|
53
|
+
upload: () => Promise<{
|
|
54
|
+
id: string;
|
|
55
|
+
projects: Array<{
|
|
56
|
+
id: string;
|
|
57
|
+
name: string;
|
|
58
|
+
}>;
|
|
59
|
+
}>;
|
|
60
|
+
/** Callback to persist the returned solutionId locally (e.g. update .uipx). */
|
|
61
|
+
onSolutionId?: (solutionId: string) => Promise<void>;
|
|
62
|
+
projectName: string;
|
|
63
|
+
entryPoint: string;
|
|
64
|
+
projectType: string;
|
|
65
|
+
apiConfig: OrchestratorApiConfig;
|
|
66
|
+
organizationName: string;
|
|
67
|
+
callbacks?: DebugCallbacks;
|
|
68
|
+
pollInterval?: number;
|
|
69
|
+
maxPolls?: number;
|
|
70
|
+
beginSessionPayload?: string;
|
|
71
|
+
/** Pre-fetched folder key+id. When supplied, skips the getPersonalFolderKey
|
|
72
|
+
* call — avoids a redundant round-trip if the caller already has it. */
|
|
73
|
+
folder?: {
|
|
74
|
+
key: string;
|
|
75
|
+
id: number;
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Shared upload-and-debug lifecycle used by flow-tool, maestro-tool, and case-tool.
|
|
80
|
+
*
|
|
81
|
+
* 1. Uploads solution to Studio Web (via caller-provided `upload` fn)
|
|
82
|
+
* 2. Persists solutionId locally (via `onSolutionId` callback)
|
|
83
|
+
* 3. Fetches personal workspace folder
|
|
84
|
+
* 4. Begins debug session in Orchestrator
|
|
85
|
+
* 5. Creates debug instance in PIMS
|
|
86
|
+
* 6. Polls for completion
|
|
87
|
+
* 7. Returns DebugResult with solutionId and studioWebUrl
|
|
88
|
+
*/
|
|
89
|
+
export declare function uploadAndDebugSolution(params: UploadAndDebugParams): Promise<DebugResult>;
|
|
90
|
+
/**
|
|
91
|
+
* Register connection resources on Studio Web after solution upload.
|
|
92
|
+
* Reads connection resource files from the solution directory and calls
|
|
93
|
+
* POST /resources/reference for each one, which registers the resource
|
|
94
|
+
* AND sets the debug overwrite in one call.
|
|
95
|
+
*
|
|
96
|
+
* This resolves the "Resource is not configured" warning in Studio Web
|
|
97
|
+
* for both activity and trigger connector connections.
|
|
98
|
+
*/
|
|
99
|
+
export declare function patchConnectionOverwrites(config: OrchestratorApiConfig, organizationName: string, solutionId: string, solutionDir: string, folder: PersonalFolderInfo, fs: IFileSystem): Promise<number>;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared type definitions for Studio Web debug workflows.
|
|
3
|
+
* Used by flow-tool, case-tool, and maestro-tool.
|
|
4
|
+
*/
|
|
5
|
+
export interface OrchestratorApiConfig {
|
|
6
|
+
baseUrl: string;
|
|
7
|
+
organizationId: string;
|
|
8
|
+
tenantName: string;
|
|
9
|
+
tenantId?: string;
|
|
10
|
+
authToken: string;
|
|
11
|
+
organizationUnitId?: number;
|
|
12
|
+
folderKey?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface StudioWebDebugConfig {
|
|
15
|
+
baseUrl: string;
|
|
16
|
+
organizationId: string;
|
|
17
|
+
tenantId: string;
|
|
18
|
+
tenantName: string;
|
|
19
|
+
authToken: string;
|
|
20
|
+
organizationUnitId?: number;
|
|
21
|
+
organizationName: string;
|
|
22
|
+
}
|
|
23
|
+
export interface BeginSessionResponse {
|
|
24
|
+
vncTunnelUri: string | null;
|
|
25
|
+
jobKey: string;
|
|
26
|
+
}
|
|
27
|
+
export interface ElementExecution {
|
|
28
|
+
elementId: string;
|
|
29
|
+
elementType?: string;
|
|
30
|
+
extensionType?: string;
|
|
31
|
+
status: string;
|
|
32
|
+
startedAt?: string;
|
|
33
|
+
completedAt?: string;
|
|
34
|
+
}
|
|
35
|
+
export interface DebugResult {
|
|
36
|
+
jobKey: string;
|
|
37
|
+
instanceId: string;
|
|
38
|
+
runId: string;
|
|
39
|
+
finalStatus: string;
|
|
40
|
+
elementExecutions: ElementExecution[];
|
|
41
|
+
solutionId?: string;
|
|
42
|
+
studioWebUrl?: string;
|
|
43
|
+
variables?: DebugVariablesResponse;
|
|
44
|
+
}
|
|
45
|
+
export interface DebugVariablesResponse {
|
|
46
|
+
instanceId: string;
|
|
47
|
+
parentElementId: string | null;
|
|
48
|
+
globalVariables: Array<{
|
|
49
|
+
id: string;
|
|
50
|
+
name: string;
|
|
51
|
+
type: string;
|
|
52
|
+
value: unknown;
|
|
53
|
+
elementId: string;
|
|
54
|
+
source: string;
|
|
55
|
+
}>;
|
|
56
|
+
elements: Array<{
|
|
57
|
+
elementId: string;
|
|
58
|
+
elementRunId: string;
|
|
59
|
+
inputDefinitions: Record<string, unknown>;
|
|
60
|
+
inputs: Record<string, unknown>;
|
|
61
|
+
outputs: Record<string, unknown>;
|
|
62
|
+
isMarker: boolean;
|
|
63
|
+
}>;
|
|
64
|
+
}
|
|
65
|
+
export interface DebugCallbacks {
|
|
66
|
+
onStatusChange?: (status: string, executions: ElementExecution[]) => void;
|
|
67
|
+
onIncident?: (incidents: unknown[]) => void;
|
|
68
|
+
}
|
|
69
|
+
export interface DebugInstanceResponse {
|
|
70
|
+
instanceId: string;
|
|
71
|
+
runId: string;
|
|
72
|
+
}
|
|
73
|
+
export interface DebugInstanceStatusResponse {
|
|
74
|
+
instanceId: string;
|
|
75
|
+
status: string;
|
|
76
|
+
startedTimeUtc: string;
|
|
77
|
+
completedTimeUtc: string | null;
|
|
78
|
+
traceId: string | null;
|
|
79
|
+
elementExecutions: Array<{
|
|
80
|
+
elementId: string;
|
|
81
|
+
elementType: string;
|
|
82
|
+
status: string;
|
|
83
|
+
startedTimeUtc: string;
|
|
84
|
+
completedTimeUtc: string | null;
|
|
85
|
+
elementRuns: Array<{
|
|
86
|
+
status: string;
|
|
87
|
+
startedTimeUtc: string;
|
|
88
|
+
completedTimeUtc: string | null;
|
|
89
|
+
elementRunId: string;
|
|
90
|
+
}>;
|
|
91
|
+
}>;
|
|
92
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** flow-core feature-flag constants — each gates a node category in ManifestClient. */
|
|
2
|
+
export declare const FLAG_CONNECTOR_NODES = "canvas.mfe.dap-component";
|
|
3
|
+
/** Returns a `getFeatureFlag` callback that enables the given flags. */
|
|
4
|
+
export declare function buildFeatureFlagResolver(flags: readonly string[]): (flag: string) => boolean;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export { pimsGet, pimsPost } from "./client";
|
|
2
|
+
export { createPimsConfig } from "./client-factory";
|
|
3
|
+
export { debugPimsGet, debugPimsPost, orchestratorGet, orchestratorPost, studioWebDelete, studioWebPost, } from "./debug-http-client";
|
|
4
|
+
export type { PersonalFolderInfo, UploadAndDebugParams } from "./debug-service";
|
|
5
|
+
export { beginDebugSession, createDebugInstance, extractStartEventId, getPersonalFolderInfo, getPersonalFolderKey, patchConnectionOverwrites, pollDebugInstanceStatus, uploadAndDebugSolution, } from "./debug-service";
|
|
6
|
+
export type { BeginSessionResponse, DebugCallbacks, DebugInstanceResponse, DebugInstanceStatusResponse, DebugResult, DebugVariablesResponse, ElementExecution, OrchestratorApiConfig, StudioWebDebugConfig, } from "./debug-types";
|
|
7
|
+
export { BPMN_SPEC } from "./manifest/bpmn-spec";
|
|
8
|
+
export type { BpmnExtensionType, DiscoveredConnector, DiscoveredProcess, MaestroRegistry, RegistryMetadata, } from "./manifest/types";
|
|
9
|
+
export { buildQueryString } from "./query-string";
|
|
10
|
+
export type { CompactField, ConnectorInfo, ConnectorMethodInfo, ContextEntry, FieldReference, FilterCondition, FilterField, FilterOperator, ISField, ISFieldMethod, ISMetadata, ISMetadataParam, ParsedFilters, SyncMetadata, TriggerField, TriggerFieldEvent, TriggerObjectMetadata, } from "./registry/index.js";
|
|
11
|
+
export { buildActivityEssentialConfiguration, buildInputMetadata, buildManagedHttpEssentialConfiguration, buildTriggerEssentialConfiguration, enrichConnectorNode, extractMultipartParameters, extractTriggerFilterFields, FilterParseError, fetchConnectionInfo, fetchConnectorMetadata, fetchConnectorTriggerMetadata, filterNodes, getConnectorConfiguration, getConnectorInfo, getNode, getNodeEnriched, hashContent, isConnectorNode, isConnectorTriggerNode, listNodes, loadIndexMetadata, loadNodeIndex, MANAGED_HTTP_CONNECTOR_KEY, parseFilterString, pullNodes, pullRemoteNodes, registerRegistryCommand, resolveNodeStorageDir, saveIndexMetadata, saveNodeIndex, searchNodes, searchNodesWithFilters, searchWithFilters, } from "./registry/index.js";
|
|
12
|
+
export { getEnrichedActivityMetadata, getExtensionType, getRegistry, pullRegistry, searchRegistry, } from "./registry/registry-service";
|
|
13
|
+
export { CACHE_EXPIRATION_MS, loadRegistry, loadRegistryMetadata, saveRegistry, } from "./registry/storage";
|
|
14
|
+
export type { IncidentCommandsConfig } from "./shared-commands/incidents";
|
|
15
|
+
export { registerSharedIncidentCommands } from "./shared-commands/incidents";
|
|
16
|
+
export type { InstanceCommandsConfig } from "./shared-commands/instances";
|
|
17
|
+
export { registerSharedInstanceCommands } from "./shared-commands/instances";
|
|
18
|
+
export type { ProcessesCommandsConfig } from "./shared-commands/processes";
|
|
19
|
+
export { registerSharedProcessesCommands } from "./shared-commands/processes";
|
|
20
|
+
export type { TraceEvent } from "./shared-utils";
|
|
21
|
+
export { formatTraceLine, formatTraceStatus, readStdin, VALID_PACKAGE_NAME_REGEX, VALID_PROJECT_NAME_REGEX, } from "./shared-utils";
|
|
22
|
+
export type { ElementExecutionApi, ElementMetaData, GetInstanceElementExecutionsResponse, GlobalVariableMetaData, GoToCursorsResponse, GoToTransition, MaestroProcessSummary, PimsApiConfig, PimsRequestOptions, ProcessIncidentGetAllResponse, ProcessIncidentGetResponse, ProcessInstance, ProcessInstanceGetVariablesResponse, ProcessInstanceOperationResponse, ProcessInstanceRun, } from "./types";
|
|
23
|
+
export { withPimsCall } from "./with-pims-call";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Static BPMN spec — OOTB extension types, BPMN elements, and serialization rules.
|
|
3
|
+
*
|
|
4
|
+
* The raw JSON is extracted from the PO.Frontend canvas and checked in as
|
|
5
|
+
* `bpmn-spec.json`. This module re-exports it as a typed constant so the
|
|
6
|
+
* rest of the registry layer can consume it without additional parsing.
|
|
7
|
+
*/
|
|
8
|
+
import type { BpmnExtensionType } from "./types.js";
|
|
9
|
+
export interface BpmnSpec {
|
|
10
|
+
version: string;
|
|
11
|
+
source: string;
|
|
12
|
+
extractedFrom?: Record<string, string>;
|
|
13
|
+
extensionTypes: Record<string, BpmnExtensionType>;
|
|
14
|
+
bpmnElements: Record<string, unknown>;
|
|
15
|
+
serializationRules: Record<string, unknown>;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The static BPMN spec as a typed constant.
|
|
19
|
+
* Contains all OOTB extension types, BPMN element definitions, and
|
|
20
|
+
* serialization rules extracted from the frontend codebase.
|
|
21
|
+
*/
|
|
22
|
+
export declare const BPMN_SPEC: BpmnSpec;
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type definitions for the Maestro BPMN registry.
|
|
3
|
+
*
|
|
4
|
+
* The registry combines a static BPMN spec (OOTB extension types, elements,
|
|
5
|
+
* serialization rules) with dynamically discovered resources (IS connectors,
|
|
6
|
+
* Orchestrator processes) into a single queryable cache.
|
|
7
|
+
*/
|
|
8
|
+
/** Describes a single field in contextFields or inputFields. */
|
|
9
|
+
export interface BpmnFieldDefinition {
|
|
10
|
+
/** Field name as it appears in BPMN XML context/input */
|
|
11
|
+
name: string;
|
|
12
|
+
/** Human-readable display name */
|
|
13
|
+
displayName?: string;
|
|
14
|
+
/** Data type: "string", "number", "json", "object", "boolean", "duration" */
|
|
15
|
+
type: string;
|
|
16
|
+
/** Whether the field is required for validation */
|
|
17
|
+
required: boolean;
|
|
18
|
+
/** Whether the field is hidden from the UI (present in XML but not shown) */
|
|
19
|
+
hidden: boolean;
|
|
20
|
+
/** Whether this field is the primary key that identifies the selected resource */
|
|
21
|
+
isPrimaryKey: boolean;
|
|
22
|
+
/** Whether this field references a binding (value uses =bindings.<bindingId> pattern) */
|
|
23
|
+
binding: boolean;
|
|
24
|
+
/** Default value if any */
|
|
25
|
+
defaultValue?: string | number | boolean | Record<string, unknown> | null;
|
|
26
|
+
/** Allowed enum values */
|
|
27
|
+
enum?: string[];
|
|
28
|
+
/** Brief description of the field's purpose */
|
|
29
|
+
description?: string | null;
|
|
30
|
+
/** Target attribute for serialization (e.g. "body", "bodyField") */
|
|
31
|
+
target?: string;
|
|
32
|
+
/** Binding info for resource-linked fields (process, queue, connection) */
|
|
33
|
+
bindingInfo?: {
|
|
34
|
+
resource: string;
|
|
35
|
+
resourceKeyPattern: string;
|
|
36
|
+
propertyAttribute?: string;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
/** Describes a single UiPath BPMN extension type (e.g. Orchestrator.StartJob). */
|
|
40
|
+
export interface BpmnExtensionType {
|
|
41
|
+
extensionType: string;
|
|
42
|
+
label: string;
|
|
43
|
+
bpmnElement: string;
|
|
44
|
+
placements: Record<string, {
|
|
45
|
+
type: string;
|
|
46
|
+
eventDefinition?: {
|
|
47
|
+
type: string;
|
|
48
|
+
};
|
|
49
|
+
}>;
|
|
50
|
+
extensionTag: "uipath:activity" | "uipath:event" | "uipath:mapping";
|
|
51
|
+
contextFields: BpmnFieldDefinition[];
|
|
52
|
+
inputPattern: "mergedBody" | "separateInputs" | "splitInputsItemData" | "scriptArgs" | "none";
|
|
53
|
+
inputName?: string;
|
|
54
|
+
inputTarget?: string;
|
|
55
|
+
outputSource?: string | null;
|
|
56
|
+
outputType?: string | null;
|
|
57
|
+
outputName?: string;
|
|
58
|
+
bindingPattern: "connection" | "process" | "queue" | "businessRule" | "none";
|
|
59
|
+
bindingInfo?: {
|
|
60
|
+
resource: string;
|
|
61
|
+
resourceKeyPattern: string;
|
|
62
|
+
propertyAttribute: string;
|
|
63
|
+
contextField: string;
|
|
64
|
+
};
|
|
65
|
+
requiresDiscovery: boolean;
|
|
66
|
+
discoveryNotes?: string;
|
|
67
|
+
isDynamic?: boolean;
|
|
68
|
+
designSchemaSharedWith?: string;
|
|
69
|
+
useRelativeSource?: boolean;
|
|
70
|
+
/** Minimal but complete XML snippet for this extension type (moddle-validated) */
|
|
71
|
+
xmlTemplate?: string | null;
|
|
72
|
+
inputFields?: BpmnFieldDefinition[];
|
|
73
|
+
inputNotes?: string;
|
|
74
|
+
contextFieldNotes?: string;
|
|
75
|
+
extensionTagNotes?: string;
|
|
76
|
+
bpmnElementNotes?: string;
|
|
77
|
+
outputNotes?: string;
|
|
78
|
+
inputFieldNotes?: string;
|
|
79
|
+
}
|
|
80
|
+
/** A connector discovered from Integration Service. */
|
|
81
|
+
export interface DiscoveredConnector {
|
|
82
|
+
key: string;
|
|
83
|
+
name: string;
|
|
84
|
+
connections: Array<{
|
|
85
|
+
id: string;
|
|
86
|
+
name: string;
|
|
87
|
+
state: string;
|
|
88
|
+
folder: string;
|
|
89
|
+
folderKey: string;
|
|
90
|
+
}>;
|
|
91
|
+
activities: Array<{
|
|
92
|
+
name: string;
|
|
93
|
+
displayName: string;
|
|
94
|
+
objectName: string;
|
|
95
|
+
method: string;
|
|
96
|
+
operation: string;
|
|
97
|
+
}>;
|
|
98
|
+
triggers: Array<{
|
|
99
|
+
name: string;
|
|
100
|
+
displayName: string;
|
|
101
|
+
objectName: string;
|
|
102
|
+
}>;
|
|
103
|
+
}
|
|
104
|
+
/** A process / agent / API workflow discovered from Orchestrator. */
|
|
105
|
+
export interface DiscoveredProcess {
|
|
106
|
+
key: string;
|
|
107
|
+
name: string;
|
|
108
|
+
processKey: string;
|
|
109
|
+
type: string;
|
|
110
|
+
folder: string;
|
|
111
|
+
folderKey: string;
|
|
112
|
+
}
|
|
113
|
+
/** The complete cached registry object. */
|
|
114
|
+
export interface MaestroRegistry {
|
|
115
|
+
version: string;
|
|
116
|
+
lastSync: number;
|
|
117
|
+
hash: string;
|
|
118
|
+
static: {
|
|
119
|
+
extensionTypes: Record<string, BpmnExtensionType>;
|
|
120
|
+
bpmnElements: Record<string, unknown>;
|
|
121
|
+
serializationRules: Record<string, unknown>;
|
|
122
|
+
};
|
|
123
|
+
discovered: {
|
|
124
|
+
connectors: DiscoveredConnector[];
|
|
125
|
+
processes: DiscoveredProcess[];
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
/** Lightweight metadata stored alongside the full registry cache. */
|
|
129
|
+
export interface RegistryMetadata {
|
|
130
|
+
lastSync: number;
|
|
131
|
+
hash: string;
|
|
132
|
+
extensionTypeCount: number;
|
|
133
|
+
connectorCount: number;
|
|
134
|
+
processCount: number;
|
|
135
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function buildQueryString(params: Record<string, string | number | undefined>): string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Command } from "commander";
|
|
2
|
+
/**
|
|
3
|
+
* Register the 'registry' resource command with nested actions.
|
|
4
|
+
*
|
|
5
|
+
* The registry is shared across UiPath workflow surfaces (flow, maestro, …).
|
|
6
|
+
* Each tool exposes the same actions under its own command prefix, e.g.
|
|
7
|
+
* `uip flow registry pull` or `uip maestro registry pull`.
|
|
8
|
+
*
|
|
9
|
+
* @param program Parent commander program/command to attach to
|
|
10
|
+
* @param commandPrefix Tool prefix (e.g. "maestro flow" or "maestro bpmn") used in help text
|
|
11
|
+
*/
|
|
12
|
+
export declare const registerRegistryCommand: (program: Command, commandPrefix: string) => void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { NodeManifest } from "@uipath/flow-core";
|
|
2
|
+
import type { ParsedFilters } from "./types";
|
|
3
|
+
/**
|
|
4
|
+
* Filter nodes based on provided filter conditions
|
|
5
|
+
*/
|
|
6
|
+
export declare function filterNodes(nodes: NodeManifest[], parsedFilters: ParsedFilters): NodeManifest[];
|
|
7
|
+
/**
|
|
8
|
+
* Advanced search with filters and keyword
|
|
9
|
+
* Combines filter conditions with keyword search
|
|
10
|
+
*/
|
|
11
|
+
export declare function searchWithFilters(nodes: NodeManifest[], keyword?: string, filters?: ParsedFilters): NodeManifest[];
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ParsedFilters } from "./types";
|
|
2
|
+
type FilterParseErrorCode = "INVALID_FORMAT" | "INVALID_FIELD" | "INVALID_OPERATOR";
|
|
3
|
+
export declare class FilterParseError extends Error {
|
|
4
|
+
readonly code: FilterParseErrorCode;
|
|
5
|
+
readonly token: string;
|
|
6
|
+
constructor(message: string, code: FilterParseErrorCode, token: string);
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Parse filter string into structured filter conditions
|
|
10
|
+
*
|
|
11
|
+
* Simple approach: Split on commas that are followed by a field name pattern
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* parseFilterString("category=connector,displayname=slack")
|
|
15
|
+
* parseFilterString("category:in=connector,agent,process")
|
|
16
|
+
*/
|
|
17
|
+
export declare function parseFilterString(filterString: string): ParsedFilters;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { buildFeatureFlagResolver, FLAG_CONNECTOR_NODES, } from "../flags/manifest-flags.js";
|
|
2
|
+
export { registerRegistryCommand } from "./command.js";
|
|
3
|
+
export { filterNodes, searchWithFilters, } from "./filter-engine.js";
|
|
4
|
+
export { FilterParseError, parseFilterString } from "./filter-parser.js";
|
|
5
|
+
export { buildActivityEssentialConfiguration, buildInputMetadata, buildManagedHttpEssentialConfiguration, buildTriggerEssentialConfiguration, enrichConnectorNode, extractMultipartParameters, extractTriggerFilterFields, fetchConnectionInfo, fetchConnectorMetadata, fetchConnectorTriggerMetadata, getConnectorConfiguration, getConnectorInfo, isConnectorNode, isConnectorTriggerNode, MANAGED_HTTP_CONNECTOR_KEY, } from "./integration-service-fetcher.js";
|
|
6
|
+
export type { CompactField, ConnectorInfo, ConnectorMethodInfo, ContextEntry, FieldReference, ISField, ISFieldMethod, ISMetadata, ISMetadataParam, TriggerField, TriggerFieldEvent, TriggerObjectMetadata, } from "./integration-service-metadata.types";
|
|
7
|
+
export { hashContent, loadIndexMetadata, loadNodeIndex, resolveNodeStorageDir, type SyncMetadata, saveIndexMetadata, saveNodeIndex, } from "./node-storage.js";
|
|
8
|
+
export { getNode, getNodeEnriched, listNodes, pullNodes, pullRemoteNodes, searchNodes, searchNodesWithFilters, } from "./node-sync-service.js";
|
|
9
|
+
export type { SolutionContext } from "./solution-discovery.js";
|
|
10
|
+
export { buildInSolutionNodeManifests, findSolutionFromCwd, readProjectEntryPointIO, } from "./solution-discovery.js";
|
|
11
|
+
export type { FilterCondition, FilterField, FilterOperator, ParsedFilters, } from "./types";
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { NodeManifest } from "@uipath/flow-core";
|
|
2
|
+
import type { CompactField, ConnectorConfiguration, ConnectorInfo, ISMetadata, TriggerObjectMetadata } from "./integration-service-metadata.types";
|
|
3
|
+
export { buildActivityEssentialConfiguration, buildInputMetadata, buildManagedHttpEssentialConfiguration, buildTriggerEssentialConfiguration, extractMultipartParameters, MANAGED_HTTP_CONNECTOR_KEY, } from "@uipath/integrationservice-sdk";
|
|
4
|
+
export declare function isConnectorNode(node: NodeManifest): boolean;
|
|
5
|
+
export declare function isConnectorTriggerNode(node: NodeManifest): boolean;
|
|
6
|
+
export declare function extractTriggerFilterFields(metadata: TriggerObjectMetadata): CompactField[];
|
|
7
|
+
export declare function fetchConnectorTriggerMetadata(connectorKey: string, operationName: string, objectName: string, connectionId: string): Promise<TriggerObjectMetadata>;
|
|
8
|
+
export declare function getConnectorConfiguration(node: NodeManifest): ConnectorConfiguration | null;
|
|
9
|
+
export declare function getConnectorInfo(node: NodeManifest): ConnectorInfo | null;
|
|
10
|
+
/**
|
|
11
|
+
* Fetches metadata from Integration Service for a connector node.
|
|
12
|
+
* When connectionId is provided, uses the instance-specific endpoint
|
|
13
|
+
* which returns custom fields tied to that connection/account.
|
|
14
|
+
* Without connectionId, returns only standard/base fields.
|
|
15
|
+
*/
|
|
16
|
+
export interface ConnectionInfo {
|
|
17
|
+
id: string;
|
|
18
|
+
name: string;
|
|
19
|
+
connectorKey: string;
|
|
20
|
+
connectorName: string;
|
|
21
|
+
connectorVersion: string | null;
|
|
22
|
+
pollingInterval: number | null;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Fetch connection details by ID from Integration Service.
|
|
26
|
+
*/
|
|
27
|
+
export declare function fetchConnectionInfo(connectionId: string): Promise<ConnectionInfo>;
|
|
28
|
+
export declare function fetchConnectorMetadata(connectorKey: string, objectName: string, connectionId?: string): Promise<ISMetadata>;
|
|
29
|
+
/**
|
|
30
|
+
* Unified enrichment entry point for connector nodes.
|
|
31
|
+
* Non-connector nodes are returned as-is.
|
|
32
|
+
* Connector nodes are enriched with live IS metadata (trigger or activity).
|
|
33
|
+
*/
|
|
34
|
+
export declare function enrichConnectorNode(node: NodeManifest, connectionId?: string): Promise<NodeManifest>;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
export type { ConnectorMethodInfo, FieldReference, InputMetadata, ISField, ISFieldMethod, ISMetadata, ISMetadataParam, MultipartParam, } from "@uipath/integrationservice-sdk";
|
|
2
|
+
export type ContextEntry = {
|
|
3
|
+
name: string;
|
|
4
|
+
value?: string;
|
|
5
|
+
type?: string;
|
|
6
|
+
};
|
|
7
|
+
export type CompactField = {
|
|
8
|
+
name: string;
|
|
9
|
+
displayName: string;
|
|
10
|
+
type: string;
|
|
11
|
+
required: boolean;
|
|
12
|
+
description?: string;
|
|
13
|
+
responseOnly?: true;
|
|
14
|
+
enum?: unknown[];
|
|
15
|
+
reference?: FieldReference;
|
|
16
|
+
};
|
|
17
|
+
export type ConnectorConfiguration = {
|
|
18
|
+
connectorKey: string;
|
|
19
|
+
objectName: string;
|
|
20
|
+
activityType: string;
|
|
21
|
+
version: string;
|
|
22
|
+
supportsStreaming: boolean;
|
|
23
|
+
/** Present on activity nodes (e.g. "POST", "GET"). Absent on trigger nodes. */
|
|
24
|
+
httpMethod?: string;
|
|
25
|
+
/** Present on activity nodes (e.g. "standard"). Absent on trigger nodes. */
|
|
26
|
+
subType?: string;
|
|
27
|
+
/** Present on trigger nodes (e.g. "EMAIL_SENT"). Absent on activity nodes. */
|
|
28
|
+
eventOperation?: string;
|
|
29
|
+
/** Present on trigger nodes (e.g. "polling", "webhooks"). Absent on activity nodes. */
|
|
30
|
+
eventMode?: string;
|
|
31
|
+
};
|
|
32
|
+
export type ConnectorInfo = {
|
|
33
|
+
connectorKey: string;
|
|
34
|
+
objectName: string;
|
|
35
|
+
method: string;
|
|
36
|
+
activityType: string;
|
|
37
|
+
};
|
|
38
|
+
export type TriggerFieldEvent = {
|
|
39
|
+
name: string;
|
|
40
|
+
curated: boolean;
|
|
41
|
+
required: boolean;
|
|
42
|
+
designOverrides?: {
|
|
43
|
+
displayName?: string;
|
|
44
|
+
description?: string;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
export type TriggerField = {
|
|
48
|
+
name: string;
|
|
49
|
+
type: string;
|
|
50
|
+
displayName: string;
|
|
51
|
+
custom?: string;
|
|
52
|
+
events?: Record<string, TriggerFieldEvent>;
|
|
53
|
+
isCuratedEventField?: boolean;
|
|
54
|
+
reference?: FieldReference;
|
|
55
|
+
enum?: unknown[];
|
|
56
|
+
order?: number;
|
|
57
|
+
description?: string;
|
|
58
|
+
};
|
|
59
|
+
export type TriggerObjectMetadata = {
|
|
60
|
+
name: string;
|
|
61
|
+
path: string;
|
|
62
|
+
type: string;
|
|
63
|
+
subType: string;
|
|
64
|
+
elementKey: string;
|
|
65
|
+
eventMode: string;
|
|
66
|
+
custom: string;
|
|
67
|
+
fields: Record<string, TriggerField>;
|
|
68
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { NodeManifest } from "@uipath/flow-core";
|
|
2
|
+
/**
|
|
3
|
+
* Metadata about a node source sync operation
|
|
4
|
+
*/
|
|
5
|
+
export interface SyncMetadata {
|
|
6
|
+
lastSync: number;
|
|
7
|
+
nodeCount: number;
|
|
8
|
+
hash: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Resolve the absolute path to the nodes storage directory.
|
|
12
|
+
* Default location: ~/.uipath/nodes/
|
|
13
|
+
*
|
|
14
|
+
* @returns Absolute path to the nodes directory
|
|
15
|
+
*/
|
|
16
|
+
export declare function resolveNodeStorageDir(): Promise<string>;
|
|
17
|
+
/**
|
|
18
|
+
* Generate SHA-256 hash of content for change detection
|
|
19
|
+
*
|
|
20
|
+
* @param content - String content to hash
|
|
21
|
+
* @returns Hex string of the hash
|
|
22
|
+
*/
|
|
23
|
+
export declare function hashContent(content: string): Promise<string>;
|
|
24
|
+
/**
|
|
25
|
+
* Save nodes directly to the index file
|
|
26
|
+
* Bypasses the source aggregation and saves nodes directly
|
|
27
|
+
* Also updates the index metadata
|
|
28
|
+
*
|
|
29
|
+
* @param nodes - Array of nodes to save
|
|
30
|
+
* @returns Number of nodes saved
|
|
31
|
+
*/
|
|
32
|
+
export declare function saveNodeIndex(nodes: NodeManifest[]): Promise<number>;
|
|
33
|
+
/**
|
|
34
|
+
* Load the aggregated node index
|
|
35
|
+
*
|
|
36
|
+
* @returns Array of all nodes from all sources
|
|
37
|
+
* @throws Error if no index exists (user needs to run pull first)
|
|
38
|
+
*/
|
|
39
|
+
export declare function loadNodeIndex(): Promise<NodeManifest[]>;
|
|
40
|
+
/**
|
|
41
|
+
* Save sync metadata for the aggregated node index
|
|
42
|
+
*
|
|
43
|
+
* @param metadata - Metadata to save (lastSync, nodeCount, hash)
|
|
44
|
+
*/
|
|
45
|
+
export declare function saveIndexMetadata(metadata: SyncMetadata): Promise<void>;
|
|
46
|
+
/**
|
|
47
|
+
* Load sync metadata for the aggregated node index
|
|
48
|
+
*
|
|
49
|
+
* @returns Metadata if exists, null otherwise
|
|
50
|
+
*/
|
|
51
|
+
export declare function loadIndexMetadata(): Promise<SyncMetadata | null>;
|