@uipath/integrationservice-sdk 1.204.0-preview.255 → 1.205.0-preview.256
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/THIRD-PARTY-NOTICES.md +177 -3
- package/dist/index.js +107031 -82604
- package/dist/src/client-factory.d.ts +4 -2
- package/dist/src/connection-lookup.d.ts +18 -0
- package/dist/src/dap/activity-bindings.d.ts +21 -0
- package/dist/src/dap/essential-config.d.ts +22 -7
- package/dist/src/dap/index.d.ts +5 -1
- package/dist/src/dap/resource-field-resolver.d.ts +20 -0
- package/dist/src/dap/solution-resource-configurations.d.ts +30 -0
- package/dist/src/index.d.ts +3 -0
- package/dist/src/metadata/design-actions.d.ts +114 -0
- package/dist/src/metadata/trigger-design-actions.d.ts +45 -0
- package/package.json +3 -3
|
@@ -69,13 +69,15 @@ export interface InstanceDesignActionResult {
|
|
|
69
69
|
* `GenerateSchema`, Salesforce `GenerateQuerySchema`) against the IS Element
|
|
70
70
|
* Service. The caller supplies an already-substituted relative URL and, for
|
|
71
71
|
* POST actions, an already-substituted body map; this helper only handles
|
|
72
|
-
* auth, base-path concatenation, and JSON serialization.
|
|
72
|
+
* auth, base-path concatenation, and JSON serialization. Body values are
|
|
73
|
+
* usually strings, but a solution-resource configuration graph goes as an
|
|
74
|
+
* array of objects.
|
|
73
75
|
*
|
|
74
76
|
* The relative URL is appended to `/instances/<connectionOrInstanceId>` under
|
|
75
77
|
* the same `elements_/v3/element` base used by `getInstanceObjectMetadataAsSchema`.
|
|
76
78
|
* Query strings already present in `relativeUrl` are preserved verbatim.
|
|
77
79
|
*/
|
|
78
|
-
export declare function runInstanceDesignAction(options: CreateApiClientOptions | undefined, connectionOrInstanceId: string, method: string, relativeUrl: string, body?: Record<string,
|
|
80
|
+
export declare function runInstanceDesignAction(options: CreateApiClientOptions | undefined, connectionOrInstanceId: string, method: string, relativeUrl: string, body?: Record<string, unknown> | null): Promise<InstanceDesignActionResult>;
|
|
79
81
|
/**
|
|
80
82
|
* Fetch event operation metadata as JSON Schema (no connection).
|
|
81
83
|
*/
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { type CreateApiClientOptions } from "./client-factory.js";
|
|
2
|
+
/**
|
|
3
|
+
* A connection is addressed two ways: its connection id (UUID) and the
|
|
4
|
+
* element instance id (number) the elements_ service keys it on. Both sit on
|
|
5
|
+
* the same connection record, so either one determines the other.
|
|
6
|
+
*/
|
|
7
|
+
export interface ConnectionInstanceIds {
|
|
8
|
+
connectionId: string;
|
|
9
|
+
elementInstanceId: number;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Fill in whichever of the two connection ids the caller left out. When both
|
|
13
|
+
* are given they are returned as-is, with no request.
|
|
14
|
+
*/
|
|
15
|
+
export declare function resolveConnectionInstanceIds(options: CreateApiClientOptions | undefined, ids: {
|
|
16
|
+
connectionId?: string;
|
|
17
|
+
elementInstanceId?: number;
|
|
18
|
+
}): Promise<ConnectionInstanceIds>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { DesignTimeBindingResource } from "@uipath/integration-service-design-time";
|
|
2
|
+
import type { ResolvedResourceField } from "./resource-field-resolver.js";
|
|
3
|
+
export interface ResourceBindingRow {
|
|
4
|
+
/** The picker itself, or its `_folderKey` companion. */
|
|
5
|
+
field: string;
|
|
6
|
+
propertyAttribute: "name" | "folderKey";
|
|
7
|
+
name: string;
|
|
8
|
+
default: string;
|
|
9
|
+
}
|
|
10
|
+
export interface ResourceBindingPlan {
|
|
11
|
+
resource: string;
|
|
12
|
+
resourceKey: string;
|
|
13
|
+
/** The picker's own row first, then its folder-key row when the folder resolved. */
|
|
14
|
+
rows: ResourceBindingRow[];
|
|
15
|
+
}
|
|
16
|
+
/** What a host stores on the node or task; a trigger's Property bag is kept, since only the activity produces it. */
|
|
17
|
+
export declare function storedActivityBindings<T extends {
|
|
18
|
+
resource: string;
|
|
19
|
+
}>(bindings: readonly T[]): T[];
|
|
20
|
+
/** The rows each resolved picker needs; Flow mints them with real ids, a case task with placeholders. */
|
|
21
|
+
export declare function planResourceBindings(stored: readonly DesignTimeBindingResource[], resolved: readonly ResolvedResourceField[]): ResourceBindingPlan[];
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { DesignTimeFilterTree, IDesignTimeActivityClient } from "@uipath/integration-service-design-time";
|
|
2
|
+
import { type ResolvedResourceField } from "./resource-field-resolver.js";
|
|
2
3
|
import type { ConnectorMethodInfo, CustomFieldsRequestDetails } from "./types.js";
|
|
3
4
|
/**
|
|
4
5
|
* Connector key and version for the managed HTTP node (core.action.http.v2).
|
|
@@ -23,6 +24,22 @@ export declare const MANAGED_HTTP_CONNECTOR_VERSION = "1.4.50";
|
|
|
23
24
|
* parameter coverage — the caller supplies a payload the runtime will accept.
|
|
24
25
|
*/
|
|
25
26
|
export declare function buildActivityEssentialConfiguration(instanceParameters: Record<string, unknown>, methodInfo: ConnectorMethodInfo, savedFilterTrees?: Record<string, DesignTimeFilterTree> | null, customFieldsRequestDetails?: CustomFieldsRequestDetails | null): Record<string, unknown>;
|
|
27
|
+
export interface ConfigureActivityClientOptions {
|
|
28
|
+
instanceParameters: Record<string, unknown>;
|
|
29
|
+
connectionId: string;
|
|
30
|
+
savedFilterTrees?: Record<string, DesignTimeFilterTree> | null;
|
|
31
|
+
customFieldsRequestDetails?: CustomFieldsRequestDetails | null;
|
|
32
|
+
fieldValues?: Record<string, unknown> | null;
|
|
33
|
+
/** The solution resource pickers are referenced into; without it a picker's plain name is not resolved, and the client skips it. */
|
|
34
|
+
solutionDir?: string | null;
|
|
35
|
+
}
|
|
36
|
+
export interface ConfiguredActivityClient {
|
|
37
|
+
client: IDesignTimeActivityClient;
|
|
38
|
+
/** What `solutionDir` resolved, for the caller to write back into its own buckets and bindings. */
|
|
39
|
+
resolvedResources: ResolvedResourceField[];
|
|
40
|
+
}
|
|
41
|
+
/** {@link configureActivityClient} for callers that need only the client. */
|
|
42
|
+
export declare function createConfiguredActivityClient(options: ConfigureActivityClientOptions): Promise<IDesignTimeActivityClient>;
|
|
26
43
|
/**
|
|
27
44
|
* Build a fully-configured design-time activity client and return it for the caller to hold and read
|
|
28
45
|
* from. Fetches the connector's metadata from Integration Service — using the logged-in platform
|
|
@@ -44,6 +61,10 @@ export declare function buildActivityEssentialConfiguration(instanceParameters:
|
|
|
44
61
|
* trigger's event parameters). The activity fills its property grid from them, so reads that depend on
|
|
45
62
|
* field values — required-field validation and a trigger's mandatory filter — see what the caller set.
|
|
46
63
|
* Applied after the custom-field replay so fields that only appear after a `GenerateSchema` fetch exist.
|
|
64
|
+
* A solution-resource picker takes a `DesignTimeResourceSelection` there.
|
|
65
|
+
* - `solutionDir` turns on resource-picker resolution: once the connection is bound, each picker's authored
|
|
66
|
+
* name in `fieldValues` is resolved to a solution resource in that solution, before the replay reads it.
|
|
67
|
+
* `fieldValues` is updated in place: each resolved picker holds its selection and its companion is removed.
|
|
47
68
|
*
|
|
48
69
|
* The caller holds the returned client and reads it through its getters (`getEssentialConfiguration()`),
|
|
49
70
|
* so a single metadata fetch serves every read instead of re-fetching per call. Pass the resulting
|
|
@@ -52,13 +73,7 @@ export declare function buildActivityEssentialConfiguration(instanceParameters:
|
|
|
52
73
|
*
|
|
53
74
|
* Requires a `connectionId` — the connector's metadata cannot be fetched without a connection.
|
|
54
75
|
*/
|
|
55
|
-
export declare function
|
|
56
|
-
instanceParameters: Record<string, unknown>;
|
|
57
|
-
connectionId: string;
|
|
58
|
-
savedFilterTrees?: Record<string, DesignTimeFilterTree> | null;
|
|
59
|
-
customFieldsRequestDetails?: CustomFieldsRequestDetails | null;
|
|
60
|
-
fieldValues?: Record<string, unknown> | null;
|
|
61
|
-
}): Promise<IDesignTimeActivityClient>;
|
|
76
|
+
export declare function configureActivityClient({ instanceParameters, connectionId, savedFilterTrees, customFieldsRequestDetails, fieldValues, solutionDir, }: ConfigureActivityClientOptions): Promise<ConfiguredActivityClient>;
|
|
62
77
|
/**
|
|
63
78
|
* Apply one filter tree to a live client as a FilterBuilder edit — the same edit
|
|
64
79
|
* {@link createConfiguredActivityClient} makes, exposed on its own so a caller can hand the client a
|
package/dist/src/dap/index.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export type { DesignTimeBindingResource, DesignTimeResourceField, DesignTimeResourceSelection, DesignTimeSolutionResourceConfiguration, SolutionResourceConfigurationsProvider, } from "@uipath/integration-service-design-time";
|
|
2
|
+
export { planResourceBindings, type ResourceBindingPlan, type ResourceBindingRow, storedActivityBindings, } from "./activity-bindings.js";
|
|
3
|
+
export { applySavedFilterTree, assertActivityMetadataResolved, buildActivityEssentialConfiguration, buildManagedHttpEssentialConfiguration, type ConfigureActivityClientOptions, type ConfiguredActivityClient, configureActivityClient, createConfiguredActivityClient, MANAGED_HTTP_CONNECTOR_KEY, MANAGED_HTTP_CONNECTOR_VERSION, } from "./essential-config.js";
|
|
2
4
|
export * from "./filter-builder/index.js";
|
|
3
5
|
export { buildInputMetadata, extractMultipartParameters, inlineMultipartFileValues, isListOperation, resolveMultipartOperationMetadata, } from "./input-metadata.js";
|
|
6
|
+
export { type ResolvedResourceField, ResourceFieldResolutionError, resolveResourceFieldValues, resourceFolderKeyFieldName, } from "./resource-field-resolver.js";
|
|
7
|
+
export { createSolutionResourceConfigurationsProvider, type SolutionResourceEngine, } from "./solution-resource-configurations.js";
|
|
4
8
|
export type { ConnectorMethodInfo, CustomFieldsRequestDetails, FieldDesign, FieldReference, InputMetadata, ISField, ISFieldMethod, ISMetadata, ISMetadataParam, MultipartFileField, MultipartOperationMetadata, MultipartParam, TriggerField, TriggerFieldEvent, TriggerObjectMetadata, } from "./types.js";
|
|
5
9
|
export type { ConnectorValidationContext, Issue, IssueType, ValidationRule, } from "./validation/index.js";
|
|
6
10
|
export { DEFAULT_RULES, METHOD_TO_OPERATION, normalizeHttpMethod, OPERATION_TO_METHOD, validateConfiguration, validateConnectionId, validateEndpoint, validateEventMode, validateEventType, validateFolderKey, validateHttpMethod, validateIntSvcNode, validateMethodInMetadata, validateMethodMatchesOperation, validateObjectName, validatePathTemplateParams, validateRequiredEventParameters, validateRequiredFields, validateRequiredParameters, } from "./validation/index.js";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { DesignTimeResourceField, DesignTimeResourceSelection } from "@uipath/integration-service-design-time";
|
|
2
|
+
/** A resource field the resolver settled, with the companion field its folder key travels in. */
|
|
3
|
+
export interface ResolvedResourceField {
|
|
4
|
+
field: string;
|
|
5
|
+
companion: string;
|
|
6
|
+
selection: DesignTimeResourceSelection;
|
|
7
|
+
}
|
|
8
|
+
/** Mirrors the design-time package's companion naming (`NamingHelper.solutionResourceFolderKeyFieldName`). */
|
|
9
|
+
export declare function resourceFolderKeyFieldName(fieldName: string): string;
|
|
10
|
+
/** A resource-picker value the caller already resolved, as opposed to a plain parameter value. */
|
|
11
|
+
export declare function isResourceSelection(value: unknown): value is DesignTimeResourceSelection;
|
|
12
|
+
export declare class ResourceFieldResolutionError extends Error {
|
|
13
|
+
constructor(message: string);
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Replaces each picker field's authored name in `fieldValues` with the selection the design-time client
|
|
17
|
+
* applies. The `<field>_folderKey` companion narrows an ambiguous lookup; the client writes the resolved
|
|
18
|
+
* companion itself, so it is dropped from `fieldValues`.
|
|
19
|
+
*/
|
|
20
|
+
export declare function resolveResourceFieldValues(fieldValues: Record<string, unknown>, resourceFields: DesignTimeResourceField[], solutionDir: string): Promise<ResolvedResourceField[]>;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { SolutionResourceConfigurationsProvider } from "@uipath/integration-service-design-time";
|
|
2
|
+
/**
|
|
3
|
+
* The parts of `@uipath/solution-sdk/resources` the provider uses, opened after the login was
|
|
4
|
+
* refreshed. Declared here so the SDK's published types do not name that dev-only package.
|
|
5
|
+
*/
|
|
6
|
+
export interface SolutionResourceEngine {
|
|
7
|
+
resources: {
|
|
8
|
+
readResourceConfigurationsAsync(services: unknown, builder: unknown, resourceKey: string, options: {
|
|
9
|
+
name?: string;
|
|
10
|
+
}): Promise<{
|
|
11
|
+
resources?: unknown[];
|
|
12
|
+
}>;
|
|
13
|
+
};
|
|
14
|
+
services: {
|
|
15
|
+
getSolutionBuilder(solutionDir: string, readOnly: boolean): Promise<{
|
|
16
|
+
disposeAsync(): Promise<void>;
|
|
17
|
+
}>;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Reads a picked resource's graph the way `uip solution resources get --include-dependencies` does: from
|
|
22
|
+
* the solution at `solutionDir` when it declares the key, otherwise from the tenant's resource catalog.
|
|
23
|
+
* The login is refreshed once, before the first read; each read opens the solution read-only and closes
|
|
24
|
+
* it again. A failed read names the resource and where it looked, and keeps the cause's HTTP status
|
|
25
|
+
* (404 for a key found nowhere). `namesByKey` holds names the caller already resolved, which narrow the
|
|
26
|
+
* catalog search for a key the solution does not declare. A caller that already opened the engine to
|
|
27
|
+
* resolve the pickers passes it as `openedEngine`, so the login is not refreshed and the engine not
|
|
28
|
+
* loaded a second time.
|
|
29
|
+
*/
|
|
30
|
+
export declare function createSolutionResourceConfigurationsProvider(solutionDir?: string | null, namesByKey?: ReadonlyMap<string, string>, openedEngine?: SolutionResourceEngine): SolutionResourceConfigurationsProvider;
|
package/dist/src/index.d.ts
CHANGED
|
@@ -5,9 +5,12 @@ export { ElementsApi } from "../generated/elements/src/apis/index.js";
|
|
|
5
5
|
export * from "../generated/elements/src/models/index.js";
|
|
6
6
|
export { Configuration as ElementsConfiguration } from "../generated/elements/src/runtime.js";
|
|
7
7
|
export { ACTIVITY_VERSION_V4, type ConnectorSummary, type CreateApiClientOptions, createApiClient, createConnectionsConfig, createDesignConnector, createElementsConfig, type DesignConnectorRef, type EventOperationObject, type ExecuteOperationRequestOptions, type ExecuteOperationResult, executeOperation, exportConnectorZip, findDesignConnectorByKey, folderOverride, getConnectorActivityMetadataV4, getConnectorById, getEventObjectMetadataAsSchema, getEventOperationObjects, getHttpRequestPreview, getInstanceEventObjectMetadataAsSchema, getInstanceObjectMetadataAsSchema, getObjectMetadataAsSchema, getPublishStatus, getValidatedAuthContext, getWebhookConfig, type HttpRequestPreviewResult, type ImportedConnector, type InstanceDesignActionResult, importConnectorZip, isV4ActivityConfiguration, listConnectors, type PersistedConnector, type PublishConnectorArgs, type PublishJobResult, type PublishStatusResult, publishConnector, runInstanceDesignAction, SUPPORTED_ACTIVITY_VERSIONS, updateDesignConnector, type WebhookConfigResult, } from "./client-factory.js";
|
|
8
|
+
export { type ConnectionInstanceIds, resolveConnectionInstanceIds, } from "./connection-lookup.js";
|
|
8
9
|
export { normalizeConnectionStatus } from "./connection-state.js";
|
|
9
10
|
export * from "./dap/index.js";
|
|
11
|
+
export { type ApiAction, apiActionRequirements, applyDesignActionRemap, findApiAction, matchApiAction, type RequestPicker, type ResolvedSolutionResource, resourcePickersRequestNeeds, runDesignAction, } from "./metadata/design-actions.js";
|
|
10
12
|
export { buildResourceCompactSummary, buildTriggerCompactSummary, CRUD_OPERATIONS, fetchRawMetadata, fetchTriggerMetadata, fetchTriggerObjects, normalizeObjectsList, } from "./metadata/resource-metadata.js";
|
|
13
|
+
export { applyTriggerDesignActionRemap, findTriggerDesignAction, runTriggerDesignAction, type TriggerEventTarget, triggerEventParameters, } from "./metadata/trigger-design-actions.js";
|
|
11
14
|
export { decodeElementsNextPageToken, ELEMENTS_NEXT_PAGE_DONE, type ElementsNextPage, hasMoreElementsPages, } from "./pagination.js";
|
|
12
15
|
export * from "./runtime/index.js";
|
|
13
16
|
export { SDK_USER_AGENT } from "./user-agent.js";
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Design actions: the api-type ObjectActions a connector exposes to fetch a
|
|
3
|
+
* connection- and parent-field-specific schema at design time (Jira
|
|
4
|
+
* `GenerateSchema`, Salesforce `GenerateQuerySchema`, Data Service V3
|
|
5
|
+
* `FetchObjectMetadataTenant`). Studio Web runs them when parent fields
|
|
6
|
+
* change; these helpers port that logic so CLI commands can do the same.
|
|
7
|
+
*
|
|
8
|
+
* Lives in the SDK because more than one tool runs them (`is resources
|
|
9
|
+
* describe`, `api-workflow registry stub`), and a tool may not import another
|
|
10
|
+
* tool (AGENTS.md Hard Rule #19).
|
|
11
|
+
*/
|
|
12
|
+
import type { DesignTimeResourceField, SolutionResourceConfigurationsProvider } from "@uipath/integration-service-design-time";
|
|
13
|
+
import { type CreateApiClientOptions } from "../client-factory.js";
|
|
14
|
+
export interface ApiAction {
|
|
15
|
+
name: string;
|
|
16
|
+
method: string;
|
|
17
|
+
url: string;
|
|
18
|
+
body: Record<string, string> | null;
|
|
19
|
+
onSuccess: {
|
|
20
|
+
input: string;
|
|
21
|
+
output: string;
|
|
22
|
+
};
|
|
23
|
+
rules: string[];
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Every api-type design action declared for `httpMethod`, with the field
|
|
27
|
+
* names its rules depend on. Lets a caller say which field a schema needs
|
|
28
|
+
* when none of the supplied fields satisfies an action. Same two metadata
|
|
29
|
+
* shapes as {@link findApiAction}.
|
|
30
|
+
*/
|
|
31
|
+
export declare function apiActionRequirements(metadata: Record<string, unknown>, httpMethod: string): Array<{
|
|
32
|
+
name: string;
|
|
33
|
+
refFieldNames: string[];
|
|
34
|
+
}>;
|
|
35
|
+
/**
|
|
36
|
+
* Locate the api-type ObjectAction whose rules are all satisfied by the
|
|
37
|
+
* supplied field values. Checks both new (lowercase `actionType: "api"` under
|
|
38
|
+
* `connectorMethodInfo.design.actions[]`) and old (PascalCase `ActionType: "Api"`
|
|
39
|
+
* under top-level `objectActions[]`) shapes.
|
|
40
|
+
*
|
|
41
|
+
* @param httpMethod The operation's HTTP method (e.g. POST). Used to scope the
|
|
42
|
+
* `connectorMethodInfo` lookup. Top-level `objectActions[]` is searched as a
|
|
43
|
+
* fallback regardless of method.
|
|
44
|
+
* @param fieldValues The field values supplied by the user, by field name
|
|
45
|
+
* (e.g. `{ "fields.project.key": "ENGCE" }`). An empty value is a cleared
|
|
46
|
+
* field, so it satisfies only a rule that asks for one (`isCleared`).
|
|
47
|
+
* @param actionName Optional explicit action name to disambiguate when more than
|
|
48
|
+
* one action matches.
|
|
49
|
+
*/
|
|
50
|
+
export declare function findApiAction(metadata: Record<string, unknown>, httpMethod: string, fieldValues: Record<string, string>, actionName?: string): ApiAction | null;
|
|
51
|
+
/**
|
|
52
|
+
* {@link findApiAction} over a raw list of actions, such as a trigger event
|
|
53
|
+
* object's `design.actions`; other action types (e.g. `reset`) are skipped.
|
|
54
|
+
*/
|
|
55
|
+
export declare function matchApiAction(actions: readonly Record<string, unknown>[], fieldValues: Record<string, string>, actionName?: string): ApiAction | null;
|
|
56
|
+
type DesignTime = typeof import("@uipath/integration-service-design-time");
|
|
57
|
+
export declare const loadDesignTime: () => Promise<DesignTime>;
|
|
58
|
+
/** A solution-resource picker field's resolved resource. */
|
|
59
|
+
export interface ResolvedSolutionResource {
|
|
60
|
+
resourceKey: string;
|
|
61
|
+
}
|
|
62
|
+
/** A solution-resource picker a design action's request reads. */
|
|
63
|
+
export interface RequestPicker {
|
|
64
|
+
/** The picker as the design-time package reports it (`getResourceFieldsFromMetadata`). */
|
|
65
|
+
field: DesignTimeResourceField;
|
|
66
|
+
/** Whether the request reads its key through `{=resourceKey(field)}`. */
|
|
67
|
+
readsKey: boolean;
|
|
68
|
+
/** The companion field its folder key travels in (`solutionResourceFolderKeyFieldName`). */
|
|
69
|
+
folderKeyField: string;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* The pickers among `parameters` this action's request needs resolved, by the design-time package's
|
|
73
|
+
* own rules: a picker is what `getResourceFieldsFromMetadata` reports, and the request reads it when
|
|
74
|
+
* `getCustomFieldsRequestTokens` finds it in the URL or body. A request with a body needs every picker
|
|
75
|
+
* it substitutes (their graphs go in the body); any other only those whose key it reads.
|
|
76
|
+
*/
|
|
77
|
+
export declare function resourcePickersRequestNeeds(action: ApiAction, parameters: ReadonlyArray<{
|
|
78
|
+
name?: unknown;
|
|
79
|
+
design?: unknown;
|
|
80
|
+
}>): Promise<RequestPicker[]>;
|
|
81
|
+
/**
|
|
82
|
+
* Build the action's request with the design-time package — the activity's
|
|
83
|
+
* own token filling, empty-parameter dropping and `{=resourceKey(field)}`
|
|
84
|
+
* resolution — and send it via the IS Element Service (instance-scoped).
|
|
85
|
+
* Returns the parsed response body; the caller merges it into the base
|
|
86
|
+
* metadata via applyDesignActionRemap.
|
|
87
|
+
*
|
|
88
|
+
* `solutionResources` (picker field → resolved resource) fills key tokens. On
|
|
89
|
+
* a POST, PUT or PATCH, `configurationsProvider` reads each resource's graph,
|
|
90
|
+
* which goes in the body under every value the request sends for it: a local
|
|
91
|
+
* solution exists only on disk, so the connector reads the definition from the
|
|
92
|
+
* body. Any other method sends no body, not even a declared one.
|
|
93
|
+
* URL values are encoded; the body keeps them as authored, since the
|
|
94
|
+
* connector looks a graph up by the value it decoded from the URL.
|
|
95
|
+
*/
|
|
96
|
+
export declare function runDesignAction(options: CreateApiClientOptions | undefined, connectionId: string, action: ApiAction, fieldValues: Record<string, string>, solutionResources?: Record<string, ResolvedSolutionResource>, configurationsProvider?: SolutionResourceConfigurationsProvider): Promise<Record<string, unknown>>;
|
|
97
|
+
/**
|
|
98
|
+
* Merge the design-action response into the base metadata according to
|
|
99
|
+
* the independent input and output remap modes. The shape mirrors the raw
|
|
100
|
+
* IS Element schema, so downstream consumers (buildResourceCompactSummary)
|
|
101
|
+
* keep working unchanged.
|
|
102
|
+
*
|
|
103
|
+
* Modes (mirroring SW FieldProcessingMode applied to fields and parameters):
|
|
104
|
+
* - replace → response wins on the selected request or response side.
|
|
105
|
+
* - append → existing fields are kept; response fields are added (response
|
|
106
|
+
* wins on key conflict so re-fetches stay current).
|
|
107
|
+
* - prepend → response fields are added but existing values win on conflict.
|
|
108
|
+
* - noop → that side is kept unchanged. Parameters follow input mode.
|
|
109
|
+
*/
|
|
110
|
+
export declare function applyDesignActionRemap(baseMeta: Record<string, unknown>, responseMeta: Record<string, unknown>, httpMethod: string, onSuccess: {
|
|
111
|
+
input: string;
|
|
112
|
+
output: string;
|
|
113
|
+
}): Record<string, unknown>;
|
|
114
|
+
export {};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parent-field-driven trigger metadata: a trigger event object's api-type
|
|
3
|
+
* design action (e.g. Data Fabric's `FetchObjectMetadataFolder`) and how its
|
|
4
|
+
* fields merge into the event metadata, the way Studio Web's trigger designer
|
|
5
|
+
* does once the parent fields are picked (UiPath/StudioWeb#22270).
|
|
6
|
+
*
|
|
7
|
+
* In the SDK because more than one tool reads a trigger's fields this way
|
|
8
|
+
* (`is triggers describe`, `maestro case spec --type trigger`).
|
|
9
|
+
*/
|
|
10
|
+
import type { SolutionResourceConfigurationsProvider } from "@uipath/integration-service-design-time";
|
|
11
|
+
import type { CreateApiClientOptions } from "../client-factory.js";
|
|
12
|
+
import { type ApiAction, type ResolvedSolutionResource } from "./design-actions.js";
|
|
13
|
+
/** The trigger an event object belongs to. */
|
|
14
|
+
export interface TriggerEventTarget {
|
|
15
|
+
connectorKey: string;
|
|
16
|
+
operation: string;
|
|
17
|
+
objectName: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* The event object's design action the supplied field values satisfy, routed
|
|
21
|
+
* as the design-time package routes it: a `/metadata` URL goes to the event
|
|
22
|
+
* object's metadata route as a GET with no body; any other URL keeps its
|
|
23
|
+
* declared method on the connector's own route. `null` when none matches.
|
|
24
|
+
*/
|
|
25
|
+
export declare function findTriggerDesignAction(eventObject: Record<string, unknown>, fieldValues: Record<string, string>, target: TriggerEventTarget, actionName?: string): Promise<ApiAction | null>;
|
|
26
|
+
/** The event object's raw `parameters`, where a trigger declares its pickers. */
|
|
27
|
+
export declare function triggerEventParameters(eventObject: Record<string, unknown>): Array<{
|
|
28
|
+
name?: unknown;
|
|
29
|
+
design?: unknown;
|
|
30
|
+
}>;
|
|
31
|
+
/**
|
|
32
|
+
* Merge the action's response fields into the event metadata by
|
|
33
|
+
* `onSuccess.remapConfiguration.input`: `replace` (default) keeps only the
|
|
34
|
+
* response's fields, `append` and `prepend` keep both (the later one wins on
|
|
35
|
+
* a name), `noop` keeps the base.
|
|
36
|
+
*/
|
|
37
|
+
export declare function applyTriggerDesignActionRemap(base: Record<string, unknown>, response: Record<string, unknown>, onSuccess: {
|
|
38
|
+
input: string;
|
|
39
|
+
}): Record<string, unknown>;
|
|
40
|
+
/**
|
|
41
|
+
* Run a routed trigger design action and return `baseMetadata` with its
|
|
42
|
+
* fields merged in. `solutionResources` and `configurationsProvider` are as on
|
|
43
|
+
* {@link runDesignAction}.
|
|
44
|
+
*/
|
|
45
|
+
export declare function runTriggerDesignAction(options: CreateApiClientOptions | undefined, connectionId: string, baseMetadata: Record<string, unknown>, action: ApiAction, fieldValues: Record<string, string>, solutionResources?: Record<string, ResolvedSolutionResource>, configurationsProvider?: SolutionResourceConfigurationsProvider): Promise<Record<string, unknown>>;
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@uipath/integrationservice-sdk",
|
|
3
3
|
"author": "UiPath",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
|
-
"version": "1.
|
|
5
|
+
"version": "1.205.0-preview.256",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "https://github.com/UiPath/cli.git",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"dist"
|
|
30
30
|
],
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@uipath/integration-service-design-time": "
|
|
32
|
+
"@uipath/integration-service-design-time": "2.10.0"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "63740c6cbb7ff282fa9118cc16a148eb030b245f"
|
|
35
35
|
}
|