@uipath/integrationservice-sdk 1.201.0 → 1.202.0-preview.136
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/README.md +10 -1
- package/dist/index.js +29309 -18861
- package/dist/src/client-factory.d.ts +30 -1
- package/dist/src/dap/index.d.ts +2 -2
- package/dist/src/dap/input-metadata.d.ts +17 -1
- package/dist/src/dap/types.d.ts +8 -0
- package/dist/src/index.d.ts +2 -1
- package/dist/src/metadata/resource-metadata.d.ts +39 -0
- package/package.json +2 -2
|
@@ -7,6 +7,9 @@ export interface ExecuteOperationResult {
|
|
|
7
7
|
body: unknown;
|
|
8
8
|
headers: Record<string, string>;
|
|
9
9
|
}
|
|
10
|
+
export interface ExecuteOperationRequestOptions {
|
|
11
|
+
multipartBodyField?: string;
|
|
12
|
+
}
|
|
10
13
|
export interface CreateApiClientOptions {
|
|
11
14
|
tenant?: string;
|
|
12
15
|
loginValidity?: number;
|
|
@@ -20,11 +23,37 @@ export declare function getValidatedAuthContext(options?: CreateApiClientOptions
|
|
|
20
23
|
export declare function createConnectionsConfig(options?: CreateApiClientOptions): Promise<ConnectionsConfiguration>;
|
|
21
24
|
export declare function createElementsConfig(options?: CreateApiClientOptions): Promise<ElementsConfiguration>;
|
|
22
25
|
export declare function createApiClient<T>(ApiClass: new (config: ConnectionsConfiguration | ElementsConfiguration) => T, options?: CreateApiClientOptions): Promise<T>;
|
|
23
|
-
export declare function executeOperation(options: CreateApiClientOptions | undefined, connectionId: string, objectName: string, httpMethod?: "GET" | "POST" | "PUT" | "PATCH" | "DELETE", body?: unknown, queryParams?: Record<string, string
|
|
26
|
+
export declare function executeOperation(options: CreateApiClientOptions | undefined, connectionId: string, objectName: string, httpMethod?: "GET" | "POST" | "PUT" | "PATCH" | "DELETE", body?: unknown, queryParams?: Record<string, string>, requestOptions?: ExecuteOperationRequestOptions): Promise<ExecuteOperationResult>;
|
|
24
27
|
/**
|
|
25
28
|
* Fetch object metadata as JSON Schema (no connection — base/standard fields only).
|
|
26
29
|
*/
|
|
27
30
|
export declare function getObjectMetadataAsSchema(options: CreateApiClientOptions | undefined, elementKey: string, objectName: string): Promise<unknown>;
|
|
31
|
+
/**
|
|
32
|
+
* Activity metadata versions accepted by `--activity-version` (is resources
|
|
33
|
+
* describe). Single source of truth — consumers import these instead of
|
|
34
|
+
* re-declaring the literals. (maestro flow registry get reads the version from
|
|
35
|
+
* the node's own config, so it exposes no flag.)
|
|
36
|
+
*/
|
|
37
|
+
export declare const ACTIVITY_VERSION_V1 = "1.0.0";
|
|
38
|
+
export declare const ACTIVITY_VERSION_V4 = "4.0.0";
|
|
39
|
+
export declare const SUPPORTED_ACTIVITY_VERSIONS: readonly string[];
|
|
40
|
+
/**
|
|
41
|
+
* Whether a connector activity configuration (the parsed `configuration` JSON
|
|
42
|
+
* from a node definition / manifest, aka instanceParameters) identifies a
|
|
43
|
+
* 4.0.0 activity. Single source of truth for the v4 predicate: the version
|
|
44
|
+
* says 4.0.0.
|
|
45
|
+
*/
|
|
46
|
+
export declare function isV4ActivityConfiguration(instanceParameters: Record<string, unknown> | null | undefined): boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Fetch activity metadata from the v4 elements endpoints (4.0.0 activities).
|
|
49
|
+
*
|
|
50
|
+
* v4 activities are addressed by activity name (the `activityName` in the
|
|
51
|
+
* activity's configuration JSON), not by object name, and the v4 route has no
|
|
52
|
+
* `/instances/{connectionId}` prefix — the instance segment was removed in v4.
|
|
53
|
+
*
|
|
54
|
+
* Endpoint: GET {baseUrl}/{org}/{tenant}/elements_/v4/element/connectors/{connectorKey}/activities/{activityName}/metadata
|
|
55
|
+
*/
|
|
56
|
+
export declare function getConnectorActivityMetadataV4(options: CreateApiClientOptions | undefined, connectorKey: string, activityName: string): Promise<Record<string, unknown>>;
|
|
28
57
|
/**
|
|
29
58
|
* Fetch object metadata as JSON Schema (with connection — enriched fields including custom).
|
|
30
59
|
*/
|
package/dist/src/dap/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { applySavedFilterTree, assertActivityMetadataResolved, buildActivityEssentialConfiguration, buildManagedHttpEssentialConfiguration, createConfiguredActivityClient, MANAGED_HTTP_CONNECTOR_KEY, MANAGED_HTTP_CONNECTOR_VERSION, } from "./essential-config.js";
|
|
2
2
|
export * from "./filter-builder/index.js";
|
|
3
|
-
export { buildInputMetadata, extractMultipartParameters, inlineMultipartFileValues, } from "./input-metadata.js";
|
|
4
|
-
export type { ConnectorMethodInfo, CustomFieldsRequestDetails, FieldDesign, FieldReference, InputMetadata, ISField, ISFieldMethod, ISMetadata, ISMetadataParam, MultipartParam, TriggerField, TriggerFieldEvent, TriggerObjectMetadata, } from "./types.js";
|
|
3
|
+
export { buildInputMetadata, extractMultipartParameters, inlineMultipartFileValues, isListOperation, resolveMultipartOperationMetadata, } from "./input-metadata.js";
|
|
4
|
+
export type { ConnectorMethodInfo, CustomFieldsRequestDetails, FieldDesign, FieldReference, InputMetadata, ISField, ISFieldMethod, ISMetadata, ISMetadataParam, MultipartFileField, MultipartOperationMetadata, MultipartParam, TriggerField, TriggerFieldEvent, TriggerObjectMetadata, } from "./types.js";
|
|
5
5
|
export type { ConnectorValidationContext, Issue, IssueType, ValidationRule, } from "./validation/index.js";
|
|
6
6
|
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";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { InputMetadata, ISMetadataParam, MultipartParam } from "./types.js";
|
|
1
|
+
import type { InputMetadata, ISMetadataParam, MultipartOperationMetadata, MultipartParam } from "./types.js";
|
|
2
2
|
/**
|
|
3
3
|
* Extract multipart parameters from IS metadata parameters.
|
|
4
4
|
* These are fields with type "multipart" (e.g. file attachments).
|
|
@@ -9,6 +9,14 @@ import type { InputMetadata, ISMetadataParam, MultipartParam } from "./types.js"
|
|
|
9
9
|
* call.
|
|
10
10
|
*/
|
|
11
11
|
export declare function extractMultipartParameters(params: ISMetadataParam[]): MultipartParam[];
|
|
12
|
+
/**
|
|
13
|
+
* Resolve the request fields declared by an Integration Service operation.
|
|
14
|
+
*
|
|
15
|
+
* Direct callers need the exact metadata: this helper never invents a JSON
|
|
16
|
+
* body field when the connector declares only file parts. That lets callers
|
|
17
|
+
* reject request shapes they cannot send instead of falling back to JSON.
|
|
18
|
+
*/
|
|
19
|
+
export declare function resolveMultipartOperationMetadata(params: ISMetadataParam[]): MultipartOperationMetadata | undefined;
|
|
12
20
|
/**
|
|
13
21
|
* Move file-typed multipart values from `bodyParameters` into the matching
|
|
14
22
|
* multipart entry's inline `value` slot, matching Studio Web's on-wire shape.
|
|
@@ -37,6 +45,14 @@ export declare function inlineMultipartFileValues(multipartParams: MultipartPara
|
|
|
37
45
|
multipartParams: MultipartParam[];
|
|
38
46
|
bodyParameters: Record<string, unknown> | undefined;
|
|
39
47
|
};
|
|
48
|
+
/**
|
|
49
|
+
* True when an IS method is a `list` operation (search / query / list-all):
|
|
50
|
+
* its `=result.response` is the bare ARRAY of records, not an envelope. IS
|
|
51
|
+
* spells the operation `List` in `connectorMethodInfo` and `list` in
|
|
52
|
+
* `essentialConfiguration`; compare case-insensitively. The single predicate
|
|
53
|
+
* behind `inputMetadata.operation` and the configure-time output-type patch.
|
|
54
|
+
*/
|
|
55
|
+
export declare function isListOperation(operation: unknown): boolean;
|
|
40
56
|
/**
|
|
41
57
|
* Build inputMetadata from multipart params and operation type.
|
|
42
58
|
*
|
package/dist/src/dap/types.d.ts
CHANGED
|
@@ -35,6 +35,14 @@ export type MultipartParam = {
|
|
|
35
35
|
dataType: string;
|
|
36
36
|
value?: string;
|
|
37
37
|
};
|
|
38
|
+
export type MultipartFileField = {
|
|
39
|
+
name: string;
|
|
40
|
+
required: boolean;
|
|
41
|
+
};
|
|
42
|
+
export type MultipartOperationMetadata = {
|
|
43
|
+
bodyField?: string;
|
|
44
|
+
fileFields: MultipartFileField[];
|
|
45
|
+
};
|
|
38
46
|
export type InputMetadata = {
|
|
39
47
|
type?: string;
|
|
40
48
|
multipart?: {
|
package/dist/src/index.d.ts
CHANGED
|
@@ -4,8 +4,9 @@ export * from "../generated/connections/src/index.js";
|
|
|
4
4
|
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
|
-
export { type ConnectorSummary, type CreateApiClientOptions, createApiClient, createConnectionsConfig, createDesignConnector, createElementsConfig, type DesignConnectorRef, type EventOperationObject, type ExecuteOperationResult, executeOperation, exportConnectorZip, findDesignConnectorByKey, folderOverride, getConnectorById, getEventObjectMetadataAsSchema, getEventOperationObjects, getHttpRequestPreview, getInstanceEventObjectMetadataAsSchema, getInstanceObjectMetadataAsSchema, getObjectMetadataAsSchema, getPublishStatus, getValidatedAuthContext, getWebhookConfig, type HttpRequestPreviewResult, type ImportedConnector, type InstanceDesignActionResult, importConnectorZip, listConnectors, type PersistedConnector, type PublishConnectorArgs, type PublishJobResult, type PublishStatusResult, publishConnector, runInstanceDesignAction, updateDesignConnector, type WebhookConfigResult, } from "./client-factory.js";
|
|
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
8
|
export { normalizeConnectionStatus } from "./connection-state.js";
|
|
9
9
|
export * from "./dap/index.js";
|
|
10
|
+
export { buildResourceCompactSummary, buildTriggerCompactSummary, CRUD_OPERATIONS, fetchRawMetadata, fetchTriggerMetadata, fetchTriggerObjects, normalizeObjectsList, } from "./metadata/resource-metadata.js";
|
|
10
11
|
export { decodeElementsNextPageToken, ELEMENTS_NEXT_PAGE_DONE, type ElementsNextPage, hasMoreElementsPages, } from "./pagination.js";
|
|
11
12
|
export { SDK_USER_AGENT } from "./user-agent.js";
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared Integration Service resource/trigger metadata fetch + agent-friendly
|
|
3
|
+
* compact-summary logic.
|
|
4
|
+
*
|
|
5
|
+
* Single source of truth for `uip is resources describe`, `uip is triggers
|
|
6
|
+
* describe`, and Maestro BPMN registry enrichment (`registry get` on connector
|
|
7
|
+
* activity / event types). Keep these here — do not re-implement per tool — so
|
|
8
|
+
* every surface returns the same shape for the same connector object/event.
|
|
9
|
+
*/
|
|
10
|
+
import type { ElementsApi } from "../../generated/elements/src/apis/index.js";
|
|
11
|
+
/**
|
|
12
|
+
* Fetch raw object metadata for a connector activity. With a connection id the
|
|
13
|
+
* instance-scoped endpoint returns enriched (custom) fields; without one the
|
|
14
|
+
* base endpoint returns standard fields only.
|
|
15
|
+
*/
|
|
16
|
+
export declare function fetchRawMetadata(api: ElementsApi, connectorKey: string, objectName: string, connectionId?: string): Promise<Record<string, unknown>>;
|
|
17
|
+
/**
|
|
18
|
+
* Build an agent-friendly compact summary from raw object metadata.
|
|
19
|
+
*
|
|
20
|
+
* With `operation`: returns requestFields, responseFields, parameters for that
|
|
21
|
+
* operation. Without: returns the availableOperations list plus a hint.
|
|
22
|
+
*/
|
|
23
|
+
export declare function buildResourceCompactSummary(metadata: Record<string, unknown>, operation?: string): Record<string, unknown>;
|
|
24
|
+
/**
|
|
25
|
+
* Operations that require an intermediate "objects" step before metadata.
|
|
26
|
+
*/
|
|
27
|
+
export declare const CRUD_OPERATIONS: Set<string>;
|
|
28
|
+
export declare function fetchTriggerObjects(api: ElementsApi, connectorKey: string, operationName: string, connectionId?: string): Promise<[Error, undefined] | [undefined, unknown]>;
|
|
29
|
+
export declare function fetchTriggerMetadata(api: ElementsApi, connectorKey: string, operationName: string, objectName: string, connectionId?: string): Promise<[Error, undefined] | [undefined, unknown]>;
|
|
30
|
+
export declare function normalizeObjectsList(objects: unknown): unknown[];
|
|
31
|
+
/**
|
|
32
|
+
* Build a structured, agent-friendly summary from raw trigger metadata.
|
|
33
|
+
*
|
|
34
|
+
* Categories:
|
|
35
|
+
* - eventParameters: fields where events[operationName] exists (required if .required === true)
|
|
36
|
+
* - filterFields: fields where order === 1 or isCuratedEventField === true
|
|
37
|
+
* - outputFields: all fields
|
|
38
|
+
*/
|
|
39
|
+
export declare function buildTriggerCompactSummary(metadata: Record<string, unknown>, operationName: string): Record<string, unknown>;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/integrationservice-sdk",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.202.0-preview.136",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/UiPath/cli.git",
|
|
@@ -30,5 +30,5 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@uipath/integration-service-design-time": "0.25.2"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "f6270de2c7c04f4c43b2f5187b0c3d3c314c2610"
|
|
34
34
|
}
|