@uipath/integrationservice-sdk 0.9.1 → 1.1.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.
@@ -23,6 +23,24 @@ export declare function getObjectMetadataAsSchema(options: CreateApiClientOption
23
23
  * Fetch object metadata as JSON Schema (with connection — enriched fields including custom).
24
24
  */
25
25
  export declare function getInstanceObjectMetadataAsSchema(options: CreateApiClientOptions | undefined, connectionOrInstanceId: string, elementKey: string, objectName: string): Promise<unknown>;
26
+ export interface InstanceDesignActionResult {
27
+ ok: boolean;
28
+ status: number;
29
+ statusText: string;
30
+ body: unknown;
31
+ }
32
+ /**
33
+ * Invoke a connector activity's design-time api-type ObjectAction (e.g. Jira
34
+ * `GenerateSchema`, Salesforce `GenerateQuerySchema`) against the IS Element
35
+ * Service. The caller supplies an already-substituted relative URL and, for
36
+ * POST actions, an already-substituted body map; this helper only handles
37
+ * auth, base-path concatenation, and JSON serialization.
38
+ *
39
+ * The relative URL is appended to `/instances/<connectionOrInstanceId>` under
40
+ * the same `elements_/v3/element` base used by `getInstanceObjectMetadataAsSchema`.
41
+ * Query strings already present in `relativeUrl` are preserved verbatim.
42
+ */
43
+ export declare function runInstanceDesignAction(options: CreateApiClientOptions | undefined, connectionOrInstanceId: string, method: string, relativeUrl: string, body?: Record<string, string> | null): Promise<InstanceDesignActionResult>;
26
44
  /**
27
45
  * Fetch event operation metadata as JSON Schema (no connection).
28
46
  */
@@ -31,4 +49,43 @@ export declare function getEventObjectMetadataAsSchema(options: CreateApiClientO
31
49
  * Fetch event operation metadata as JSON Schema (with connection — enriched event fields).
32
50
  */
33
51
  export declare function getInstanceEventObjectMetadataAsSchema(options: CreateApiClientOptions | undefined, connectionOrInstanceId: string, elementKey: string, operationName: string, objectName: string): Promise<unknown>;
52
+ /**
53
+ * Fetch the webhook configuration URL for an Integration Service trigger
54
+ * that uses eventMode "webhooks".
55
+ *
56
+ * Endpoint: GET {baseUrl}/{org}/{tenant}/elements_/v1/webhooks/subscribers/{connectionId}/webhook/config
57
+ * ?connectionInstanceId={elementInstanceId}&connectorKey={connectorKey}
58
+ */
59
+ export declare function getWebhookConfig(options: CreateApiClientOptions | undefined, connectionId: string, elementInstanceId: number, connectorKey: string): Promise<WebhookConfigResult>;
60
+ export interface WebhookConfigResult {
61
+ webhookUrl: string;
62
+ }
63
+ export interface HttpRequestPreviewResult {
64
+ url: string;
65
+ }
66
+ /**
67
+ * Fetch the resolved base URL for a connection's HTTP Request activity.
68
+ *
69
+ * Endpoint: POST {baseUrl}/{org}/{tenant}/elements_/v3/element/instances/{connectionId}/http-request-preview
70
+ */
71
+ export declare function getHttpRequestPreview(options: CreateApiClientOptions | undefined, connectionId: string): Promise<HttpRequestPreviewResult>;
72
+ /**
73
+ * Fetch event operations for a connector instance to check flags like
74
+ * byoaConnection and isWebhookUrlVisible.
75
+ *
76
+ * Endpoint: GET {baseUrl}/{org}/{tenant}/elements_/v3/element/instances/{elementInstanceId}/elements/{connectorKey}/events/operations/{eventOperation}/objects
77
+ */
78
+ export declare function getEventOperationObjects(options: CreateApiClientOptions | undefined, elementInstanceId: number, connectorKey: string, eventOperation: string): Promise<EventOperationObject[]>;
79
+ export interface EventOperationObject {
80
+ name?: string;
81
+ displayName?: string;
82
+ eventMode?: string;
83
+ hideEventIDField?: boolean;
84
+ debugDisabled?: boolean;
85
+ isWebhookUrlVisible?: boolean;
86
+ byoaConnection?: boolean;
87
+ hasStaticLeftOperandFilterBuilder?: boolean;
88
+ isHidden?: boolean;
89
+ supportedAuths?: string[];
90
+ }
34
91
  export declare function folderOverride(folderKey?: string): InitOverrideFunction | undefined;
@@ -1,5 +1,5 @@
1
1
  import type { FilterTree } from "./filter-builder/filter-tree.js";
2
- import type { ConnectorMethodInfo } from "./types.js";
2
+ import type { ConnectorMethodInfo, CustomFieldsRequestDetails } from "./types.js";
3
3
  /**
4
4
  * Connector key and version for the managed HTTP node (core.action.http.v2).
5
5
  * The managed HTTP node proxies requests through this connector, using the
@@ -10,8 +10,22 @@ export declare const MANAGED_HTTP_CONNECTOR_VERSION = "1.4.50";
10
10
  /**
11
11
  * Build the essential-only configuration blob for an activity connector node.
12
12
  * DAP re-fetches optional data (fieldsContainer, caches) on open.
13
+ *
14
+ * `savedFilterTrees` is a map keyed by the connector's filter input
15
+ * parameter name (e.g. `"where"` for IS List All Records) and valued by
16
+ * the structured filter tree the user authored. The compiled CEQL string
17
+ * lives separately on `inputs.detail.queryParameters[<paramName>]`;
18
+ * persisting both halves keeps the activity round-trippable in Studio Web,
19
+ * which reads the tree to render the filter widget and re-derives the
20
+ * CEQL expression on save.
21
+ *
22
+ * `customFieldsRequestDetails` is the design-time inputs for a
23
+ * connector's "fetch custom fields" ObjectAction (e.g. Jira's GenerateSchema).
24
+ * The CLI does not validate ObjectAction existence or parameter coverage —
25
+ * the caller is responsible for supplying a payload that the runtime will
26
+ * accept.
13
27
  */
14
- export declare function buildActivityEssentialConfiguration(instanceParameters: Record<string, unknown>, methodInfo: ConnectorMethodInfo): Record<string, unknown>;
28
+ export declare function buildActivityEssentialConfiguration(instanceParameters: Record<string, unknown>, methodInfo: ConnectorMethodInfo, savedFilterTrees?: Record<string, FilterTree> | null, customFieldsRequestDetails?: CustomFieldsRequestDetails | null): Record<string, unknown>;
15
29
  /**
16
30
  * Build the essential-only configuration blob for a managed HTTP node
17
31
  * (core.action.http.v2). The managed HTTP node always proxies through the
@@ -23,7 +37,10 @@ export declare function buildManagedHttpEssentialConfiguration(): Record<string,
23
37
  * Trigger essentials include filter (user-configured, not recoverable from connector)
24
38
  * but omit operation, httpMethod, path (not applicable to triggers).
25
39
  *
26
- * The `filter` tree is the design-time source of truth for the trigger's
27
- * conditions;
40
+ * The `filter` tree is the design-time source of truth for the user's filter
41
+ * conditions. The mandatory filter (from required event parameters) is NOT
42
+ * persisted in essentialConfiguration — it's computed fresh from event parameters
43
+ * and combined with the user filter expression at configure-time to produce
44
+ * detail.filterExpression.
28
45
  */
29
46
  export declare function buildTriggerEssentialConfiguration(instanceParameters: Record<string, unknown>, filter?: FilterTree | null): Record<string, unknown>;
@@ -10,6 +10,13 @@ export type FilterFieldType = "string" | "number" | "integer" | "boolean" | "dat
10
10
  export type FilterFieldMetadata = {
11
11
  name: string;
12
12
  type: FilterFieldType;
13
+ /**
14
+ * Connector-side aliases for the field. When present, the CEQL compiler
15
+ * emits `searchableNames[0]` as the field identifier instead of `name`
16
+ * (Studio Web parity — some connectors expose a friendlier `name` but
17
+ * require the alias in the query string).
18
+ */
19
+ searchableNames?: readonly string[];
13
20
  };
14
21
  /** Result of building a filter: both the normalized tree and derived JMESPath. */
15
22
  export type BuiltFilter = {
@@ -23,6 +23,11 @@ export { getUuid } from "./uuid.js";
23
23
  export { WorkflowValue } from "./workflow-value.js";
24
24
  import type { BuiltFilter, FilterFieldMetadata } from "./field-metadata.js";
25
25
  import type { FilterTree } from "./filter-tree.js";
26
+ export type BuiltCeqlFilter = {
27
+ filter: FilterTree;
28
+ ceqlExpression: string;
29
+ isLiteral: boolean;
30
+ };
26
31
  /**
27
32
  * Raised when the caller hands the builder a filter feature we haven't
28
33
  * ported yet (array fields, expression/non-literal values, enum arrays, etc.).
@@ -45,3 +50,13 @@ export declare function buildFilter(tree: FilterTree, fields: readonly FilterFie
45
50
  * Prefer `buildFilter` when the normalized tree is also needed.
46
51
  */
47
52
  export declare function buildFilterExpression(tree: FilterTree, fields: readonly FilterFieldMetadata[]): string;
53
+ /**
54
+ * Build the paired `filter` tree and CEQL expression for an IS connector
55
+ * activity (List All Records and similar list/query operations).
56
+ *
57
+ * Parallel to {@link buildFilter} for triggers — same input shape, same
58
+ * normalization + field-existence checks; the only difference is the
59
+ * compiled output is a CEQL string (delegated to `CeqlHelper`, a verbatim
60
+ * port of Studio Web's `ceql-helper.ts`).
61
+ */
62
+ export declare function buildCeqlFilter(tree: FilterTree, fields: readonly FilterFieldMetadata[]): BuiltCeqlFilter;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Local shim for SW's `ActivityConfigurationExtensions` (mirrors
3
+ * `@sw/.../runtime/extensions/activity-configuration-extensions`). Only the
4
+ * `getMandatoryFilterFields` selector consumed by `mandatory-filter-builder`
5
+ * is ported; SW exposes additional helpers the CLI does not yet exercise.
6
+ */
7
+ import type { ConfigurationField } from "./configuration-field.js";
8
+ export declare class ActivityConfigurationExtensions {
9
+ /**
10
+ * Mirrors SW `getMandatoryFilterFields(activityConfiguration)`:
11
+ *
12
+ * activityConfiguration.fieldsContainer.inputFields
13
+ * .filter(f => f.fieldLocation !== Path && f.fieldLocation !== Query);
14
+ *
15
+ * The CLI lifts the input arg to a free `ConfigurationField[]` since the
16
+ * `TriggerActivityConfiguration` wrapper is not yet ported. Path/Query
17
+ * parameters are never mandatory filter sources because they shape the
18
+ * connector request URL, not the event subscription body.
19
+ */
20
+ static getMandatoryFilterFields(inputFields: readonly ConfigurationField[]): ConfigurationField[];
21
+ }
@@ -15,3 +15,7 @@ export declare class ClrTypeMock {
15
15
  constructor(name: string, isArray?: boolean);
16
16
  isSame(other: ClrTypeMock | string | null | undefined): boolean;
17
17
  }
18
+ /**
19
+ * Map IS field type strings to ClrTypeMock instances for mandatory filter building.
20
+ */
21
+ export declare function toClrType(rawType: string | undefined): ClrTypeMock;
@@ -0,0 +1,25 @@
1
+ import { ClrTypeMock } from "./clr-type-mock.js";
2
+ import { FieldLocation } from "./field-location.js";
3
+ /**
4
+ * Local shim for SW's `ConfigurationField` (mirrors
5
+ * `@sw/.../runtime/models/configuration-field`). SW's class carries the full
6
+ * activity-configuration field descriptor; this shim keeps the members the
7
+ * filter-builder + mandatory-filter helpers read (`name`, `id`, `clrType`,
8
+ * `mask`, `fieldLocation`).
9
+ *
10
+ * `id` is the **sanitized** field identifier (post `NamingHelper.getValidDesignPropertyName`,
11
+ * e.g. `ParentFolders[*].ID` → `ParentFolders_array_ID`). Mandatory-filter
12
+ * `FieldObject` lookups go through `id`, never `name` — see SW PR #18040.
13
+ *
14
+ * `fieldLocation` mirrors SW's `FieldLocation` enum and is consumed by
15
+ * `ActivityConfigurationExtensions.getMandatoryFilterFields`, which excludes
16
+ * `Path` and `Query` parameters from the mandatory-filter set.
17
+ */
18
+ export declare class ConfigurationField {
19
+ readonly name: string;
20
+ readonly id: string;
21
+ readonly clrType: ClrTypeMock;
22
+ readonly mask: string | null;
23
+ readonly fieldLocation: FieldLocation;
24
+ constructor(name: string, clrType?: ClrTypeMock, mask?: string | null, id?: string, fieldLocation?: FieldLocation);
25
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Local shim for SW's `FieldLocation` (mirrors
3
+ * `@sw/.../runtime/models/connector-metadata/field-location`). Used by
4
+ * `ActivityConfigurationExtensions.getMandatoryFilterFields` to filter
5
+ * inputFields to those located in the request body — path/query parameters
6
+ * are never mandatory filter sources.
7
+ */
8
+ export declare const FieldLocation: {
9
+ readonly Body: "Body";
10
+ readonly Path: "Path";
11
+ readonly Query: "Query";
12
+ readonly Header: "Header";
13
+ };
14
+ export type FieldLocation = (typeof FieldLocation)[keyof typeof FieldLocation];
@@ -0,0 +1,16 @@
1
+ import type { FieldObject } from "./field-object.js";
2
+ /**
3
+ * Local shim for SW's `FieldObjectHelpers` (mirrors
4
+ * `@sw/.../design-time/helpers/field-object-helpers`). Only the lookup helper
5
+ * used by mandatory-filter assembly is ported; SW carries additional helpers
6
+ * that the CLI does not yet exercise.
7
+ */
8
+ export declare class FieldObjectHelpers {
9
+ /**
10
+ * Returns the first `FieldArgument` or `FieldLiteral` entry with `id ===
11
+ * fieldId`, or `undefined`. Lookup is by **sanitized** id only — callers
12
+ * passing `field.name` for array/dotted paths will miss (this is the bug
13
+ * fixed in SW PR #18040).
14
+ */
15
+ static getFieldArgumentOrLiteral(fieldObjects: readonly FieldObject[], fieldId: string): FieldObject | undefined;
16
+ }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Local shim for SW's `FieldObjectType` (mirrors
3
+ * `@sw/.../runtime/models/field-object-type`). Used by `FieldObjectHelpers` to
4
+ * filter mandatory-filter sources to argument or literal entries (resolved at
5
+ * design time) and skip expressions resolved at runtime.
6
+ */
7
+ export declare const FieldObjectType: {
8
+ readonly FieldArgument: "FieldArgument";
9
+ readonly FieldLiteral: "FieldLiteral";
10
+ readonly FieldExpression: "FieldExpression";
11
+ };
12
+ export type FieldObjectType = (typeof FieldObjectType)[keyof typeof FieldObjectType];
@@ -0,0 +1,18 @@
1
+ import type { WorkflowValue } from "../filter-builder/workflow-value.js";
2
+ import type { FieldObjectType } from "./field-object-type.js";
3
+ /**
4
+ * Local shim for SW's `FieldObject` (mirrors
5
+ * `@sw/.../runtime/models/field-object`). Represents a single field entry on
6
+ * an activity's design-time state — keyed by the **sanitized** field id (post
7
+ * `NamingHelper.getValidDesignPropertyName`).
8
+ *
9
+ * Mandatory-filter assembly inspects `type` to keep `FieldArgument` /
10
+ * `FieldLiteral` entries (see SW PR #18040 — FieldLiteral was previously
11
+ * dropped) and reads `value.value` only when `value.isLiteral` is true.
12
+ */
13
+ export declare class FieldObject {
14
+ readonly id: string;
15
+ readonly value: WorkflowValue | null;
16
+ readonly type: FieldObjectType;
17
+ constructor(id: string, value: WorkflowValue | null, type: FieldObjectType);
18
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Local shim for SW's `FieldTypeHelper` (mirrors
3
+ * `@sw/.../runtime/helpers/field-type-helper`). Only the name-based array
4
+ * detection used by `JmesHelper.buildMandatoryFilterExpression` is ported.
5
+ */
6
+ export declare class FieldTypeHelper {
7
+ /** Returns true when the field name carries the `[*]` array marker. */
8
+ static isArrayType(name: string): boolean;
9
+ }
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Ported verbatim from Studio Web:
3
+ * src/Client/app/packages/connector-activity/is-activities/runtime/helpers/filter-builder/ceql-helper.ts
4
+ *
5
+ * Only import paths are rewritten to point at local shims / models. Method
6
+ * bodies are kept identical to SW. The CLI filter-builder does not currently
7
+ * emit CEQL (the JMESPath path is used for triggers); this file is carried
8
+ * alongside for parity with SW so future CEQL work can reuse it.
9
+ */
10
+ import { FilterGroupOperator } from "../../filter-builder/filter-group-operator.js";
11
+ import { FilterOperator } from "../../filter-builder/filter-operator.js";
12
+ import type { FilterTree } from "../../filter-builder/filter-tree.js";
13
+ import { ClrTypeMock } from "../clr-type-mock.js";
14
+ /**
15
+ * TEMP no-op shim for SW's `ConfigurationField`. The CEQL path is not yet
16
+ * used by the CLI filter-builder; this carries just the fields `ceql-helper`
17
+ * reads so the verbatim port compiles.
18
+ */
19
+ export type ConfigurationField = {
20
+ id: string;
21
+ name: string;
22
+ clrType: ClrTypeMock;
23
+ enum?: unknown[];
24
+ searchableNames?: string[];
25
+ mask?: string | null;
26
+ };
27
+ export declare class CeqlHelper {
28
+ static readonly operatorMappings: Map<FilterOperator, string>;
29
+ static readonly functionMappings: Map<FilterOperator, string>;
30
+ static readonly logicalOperatorMappings: Map<FilterGroupOperator, string>;
31
+ static buildCeqlFilterExpression(filters: FilterTree, filterCriteria: ConfigurationField[]): {
32
+ ceqlExpression: string;
33
+ isLiteral: boolean;
34
+ };
35
+ private static _composeCeqlPathExpression;
36
+ private static _isStringValue;
37
+ private static _getCeqlValueFromEnumValue;
38
+ private static _composeSingleValueExpression;
39
+ }
@@ -12,6 +12,7 @@ import { FilterOperator } from "../../filter-builder/filter-operator.js";
12
12
  import type { FilterTree } from "../../filter-builder/filter-tree.js";
13
13
  import type { WorkflowValue } from "../../filter-builder/workflow-value.js";
14
14
  import { ClrTypeMock } from "../clr-type-mock.js";
15
+ import type { ConfigurationField } from "../configuration-field.js";
15
16
  import { EventField } from "../event-field.js";
16
17
  import { type TranslationConfiguration } from "../translation.js";
17
18
  /**
@@ -31,7 +32,36 @@ export declare class JmesHelper {
31
32
  static readonly operatorMappings: Map<FilterOperator, string>;
32
33
  static readonly functionMappings: Map<FilterOperator, string>;
33
34
  static readonly logicalOperatorMappings: Map<FilterGroupOperator, string>;
34
- static buildMandatoryFilterExpression(fieldArguments: Map<string, unknown>): string;
35
+ /**
36
+ * Builds the mandatory filter JMES expression for trigger inputs that participate in event matching.
37
+ * Array-shaped fields (name contains `[*]`) are routed through {@link composeArrayJmesPathExpression}
38
+ * so curated event fields like `ParentFolders[*].ID` emit filter-projection syntax
39
+ * (`ParentFolders[?ID=='INBOX']`) instead of an invalid scalar comparison.
40
+ *
41
+ * Mandatory values may be non-literal (workflow expressions). Non-literal RHS is wrapped via
42
+ * {@link addExpressionWrapper} and embedded in JMES as a single-quoted string — same shape as
43
+ * {@link composeJmesPathExpression}. The returned `isLiteral` flag is `false` whenever any
44
+ * scalar entry is non-literal, so callers can decide whether to wrap the combined expression in
45
+ * a runtime template literal.
46
+ */
47
+ static buildMandatoryFilterExpression(fieldArguments: Map<ConfigurationField, WorkflowValue>, translationConfiguration?: TranslationConfiguration): {
48
+ jmesExpression: string;
49
+ isLiteral: boolean;
50
+ };
51
+ /**
52
+ * Format a literal scalar value as a JMES expression fragment.
53
+ * Boolean and numeric types use backtick-wrapped JSON literals so JMES compares against the
54
+ * underlying primitive; everything else falls back to single-quoted strings.
55
+ * DateTimeOffset is handled by callers that also rewrite the LHS with `to_number(...)`.
56
+ */
57
+ private static readonly _booleanType;
58
+ /**
59
+ * Format a literal scalar value as a JMES expression fragment.
60
+ * Boolean and numeric types use backtick-wrapped JSON literals so JMES compares against the
61
+ * underlying primitive; everything else falls back to single-quoted strings.
62
+ * DateTimeOffset is handled by callers that also rewrite the LHS with `to_number(...)`.
63
+ */
64
+ private static _formatLiteral;
35
65
  /** Convert the filter tree to JMES string */
36
66
  static buildFilterExpression(filters: FilterTree, filterCriteria: EventField[], translationConfiguration?: TranslationConfiguration, options?: BuildFilterExpressionOptions): {
37
67
  jmesExpression: string;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Ported from Studio Web:
3
+ * src/Client/app/packages/connector-activity/is-activities/design-time/view-models/connector-trigger-view-model.ts
4
+ * `_setMandatoryFilterExpression()`
5
+ *
6
+ * SW's caller is an instance method on `ConnectorTriggerViewModel`; the CLI
7
+ * has no view-model layer, so the body is exposed as a free function with the
8
+ * inputs (`mandatoryFields`, `fieldObjects`) lifted to parameters. The lookup
9
+ * + literal-acceptance semantics are kept identical so future CLI callers
10
+ * inherit the SW PR #18040 fix.
11
+ */
12
+ import type { ConfigurationField } from "./configuration-field.js";
13
+ import type { FieldObject } from "./field-object.js";
14
+ /**
15
+ * Build the trigger's mandatory-filter JMES expression, or `null` when no
16
+ * mandatory field resolves to a value.
17
+ *
18
+ * Mirrors SW `_setMandatoryFilterExpression` (post PR #18081):
19
+ * - looks up `FieldObject` by sanitized `field.id` (not raw `field.name`);
20
+ * - accepts `FieldArgument` and `FieldLiteral`, skips `FieldExpression`;
21
+ * - passes `WorkflowValue` objects to `JmesHelper.buildMandatoryFilterExpression`,
22
+ * which handles both literal values and workflow expressions.
23
+ */
24
+ export declare function buildMandatoryFilterExpression(mandatoryFields: readonly ConfigurationField[], fieldObjects: readonly FieldObject[]): string | null;
@@ -1,11 +1,16 @@
1
1
  /**
2
- * TEMP no-op shims for SW translation utilities:
2
+ * Shims for SW translation utilities (ported for PR #18081 support):
3
3
  * - `TranslationConfiguration` from `@uipath/studio-web-unified-build`
4
4
  * - `addExpressionWrapper` from `@sw/translation/translators/utils-translators`
5
5
  *
6
- * The CLI filter-builder only emits literal-value expressions, so the
7
- * wrapper used by SW for non-literal (expression) values is never required.
8
- * Revisit if/when expression-value support is ported.
6
+ * Post PR #18081, the CLI filter-builder supports non-literal (workflow expression)
7
+ * values in mandatory filters, which require wrapping for runtime template literal
8
+ * substitution.
9
9
  */
10
10
  export type TranslationConfiguration = unknown;
11
+ /**
12
+ * Wrap a workflow expression for runtime template literal evaluation.
13
+ * SW's real implementation uses translator-specific syntax; the CLI default
14
+ * matches SW's template-literal format: `${expression}`.
15
+ */
11
16
  export declare function addExpressionWrapper(value: string | undefined, _translationConfiguration?: TranslationConfiguration): string;
@@ -1,6 +1,14 @@
1
1
  export { buildActivityEssentialConfiguration, buildManagedHttpEssentialConfiguration, buildTriggerEssentialConfiguration, MANAGED_HTTP_CONNECTOR_KEY, MANAGED_HTTP_CONNECTOR_VERSION, } from "./essential-config.js";
2
2
  export * from "./filter-builder/index.js";
3
- export { buildInputMetadata, extractMultipartParameters, } from "./input-metadata.js";
4
- export type { ConnectorMethodInfo, FieldReference, InputMetadata, ISField, ISFieldMethod, ISMetadata, ISMetadataParam, MultipartParam, TriggerField, TriggerFieldEvent, TriggerObjectMetadata, } from "./types.js";
3
+ export { ActivityConfigurationExtensions } from "./helpers/activity-configuration-extensions.js";
4
+ export { ClrTypeMock, toClrType } from "./helpers/clr-type-mock.js";
5
+ export { ConfigurationField } from "./helpers/configuration-field.js";
6
+ export { FieldLocation } from "./helpers/field-location.js";
7
+ export { FieldObject } from "./helpers/field-object.js";
8
+ export { FieldObjectHelpers } from "./helpers/field-object-helpers.js";
9
+ export { FieldObjectType } from "./helpers/field-object-type.js";
10
+ export { buildMandatoryFilterExpression } from "./helpers/mandatory-filter-builder.js";
11
+ export { buildInputMetadata, extractMultipartParameters, inlineMultipartFileValues, } from "./input-metadata.js";
12
+ export type { ConnectorMethodInfo, CustomFieldsRequestDetails, FieldDesign, FieldReference, InputMetadata, ISField, ISFieldMethod, ISMetadata, ISMetadataParam, MultipartParam, TriggerField, TriggerFieldEvent, TriggerObjectMetadata, } from "./types.js";
5
13
  export type { ConnectorValidationContext, Issue, IssueType, ValidationRule, } from "./validation/index.js";
6
- export { DEFAULT_RULES, validateConfiguration, validateConnectionId, validateEndpoint, validateEventMode, validateEventType, validateFolderKey, validateHttpMethod, validateIntSvcNode, validateMethodInMetadata, validateObjectName, validatePathTemplateParams, validateRequiredEventParameters, validateRequiredFields, validateRequiredParameters, } from "./validation/index.js";
14
+ 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";
@@ -3,11 +3,40 @@ import type { InputMetadata, ISMetadataParam, MultipartParam } from "./types.js"
3
3
  * Extract multipart parameters from IS metadata parameters.
4
4
  * These are fields with type "multipart" (e.g. file attachments).
5
5
  *
6
- * TODO: file-type multipart params can carry a `value` binding
7
- * (e.g. "=js:($vars.start.output.fileToAdd)") for attachments.
8
- * Currently not supported cli debug may not support file params either.
6
+ * Returns declarations only (`name`, `dataType`). File-typed entries can
7
+ * carry an inline `value` binding (`=js:$vars.x.output`) per Studio Web's
8
+ * on-wire shapepopulate it with `inlineMultipartFileValues` after this
9
+ * call.
9
10
  */
10
11
  export declare function extractMultipartParameters(params: ISMetadataParam[]): MultipartParam[];
12
+ /**
13
+ * Move file-typed multipart values from `bodyParameters` into the matching
14
+ * multipart entry's inline `value` slot, matching Studio Web's on-wire shape.
15
+ *
16
+ * Background: flow-workbench's BPMN emitter
17
+ * (`packages/services/src/serialization/uipath-extension.ts`
18
+ * `convertMultipartParametersToInputs`) reads `param.value` from each
19
+ * `multipartParameters[i]` entry where `dataType === "file"`. Values left in
20
+ * `bodyParameters` are not emitted as BPMN file inputs and are lost on
21
+ * round-trip. This helper aligns CLI-authored `.flow` files with that shape.
22
+ *
23
+ * Rules:
24
+ * - For each `multipartParams` entry with `dataType === "file"`, if
25
+ * `bodyParameters[name]` is a string, move it to the entry's `.value` slot
26
+ * and delete the key from the returned `bodyParameters`.
27
+ * - String-typed multipart entries are left untouched — the body aggregator
28
+ * keeps its content in `bodyParameters[bodyFieldName]` (Studio Web's BPMN
29
+ * emitter reads it from there regardless).
30
+ * - Non-string `bodyParameters` values (objects, unexpected shapes) are left
31
+ * in place so callers can detect and handle them.
32
+ * - Returns new array / object — does not mutate inputs. Returns
33
+ * `bodyParameters: undefined` when the cleaned object is empty so callers
34
+ * can drop the bucket cleanly.
35
+ */
36
+ export declare function inlineMultipartFileValues(multipartParams: MultipartParam[], bodyParameters: Record<string, unknown> | undefined): {
37
+ multipartParams: MultipartParam[];
38
+ bodyParameters: Record<string, unknown> | undefined;
39
+ };
11
40
  /**
12
41
  * Build inputMetadata from multipart params and operation type.
13
42
  *
@@ -5,6 +5,18 @@
5
5
  * and are used by essential configuration builders across multiple tools
6
6
  * (flow-tool, case-tool, coded-apps, etc.).
7
7
  */
8
+ /**
9
+ * Design-time hints for a field or parameter.
10
+ *
11
+ * The only consumer right now is the CEQL filter builder, which looks for
12
+ * a parameter with `component === "FilterBuilder"` to decide where the
13
+ * compiled CEQL string should land in `queryParameters`. The parameter
14
+ * name is connector-specific (often `where`, but not always — Salesforce
15
+ * uses `q`, some connectors use `filter`, etc.).
16
+ */
17
+ export type FieldDesign = {
18
+ component?: string;
19
+ };
8
20
  export type ISMetadataParam = {
9
21
  name: string;
10
22
  description: string;
@@ -16,10 +28,12 @@ export type ISMetadataParam = {
16
28
  displayName: string;
17
29
  reference?: Record<string, unknown>;
18
30
  defaultValue?: unknown;
31
+ design?: FieldDesign;
19
32
  };
20
33
  export type MultipartParam = {
21
34
  name: string;
22
35
  dataType: string;
36
+ value?: string;
23
37
  };
24
38
  export type InputMetadata = {
25
39
  type?: string;
@@ -65,6 +79,21 @@ export type ISField = {
65
79
  method: Record<string, ISFieldMethod>;
66
80
  enum?: unknown[];
67
81
  reference?: FieldReference;
82
+ /** Field is filterable in CEQL queries (List All Records and similar). */
83
+ searchable?: boolean;
84
+ /**
85
+ * Operators (CEQL tokens) the connector permits for this field.
86
+ * Empty / undefined means the connector did not constrain the operator set.
87
+ */
88
+ searchableOperators?: string[];
89
+ /**
90
+ * Alternative names the connector accepts for this field in CEQL. The
91
+ * filter compiler emits `searchableNames[0]` when present, falling back
92
+ * to `name` otherwise. Some connectors expose user-friendly display
93
+ * names but require a different identifier in the query string.
94
+ */
95
+ searchableNames?: string[];
96
+ design?: FieldDesign;
68
97
  };
69
98
  export type ISMetadata = {
70
99
  fields?: Record<string, ISField> | ISField[];
@@ -103,3 +132,14 @@ export type TriggerObjectMetadata = {
103
132
  custom: string;
104
133
  fields: Record<string, TriggerField>;
105
134
  };
135
+ /**
136
+ * Design-time inputs for a connector's "fetch custom fields" ObjectAction.
137
+ * Mirrors the shape Studio Web's TS port emits (camelCase keys, parameterValues
138
+ * as an array of [key, value] tuples — see Solution 386 / Jira Create Issue
139
+ * empirical sample). The runtime replays the ObjectAction on each invocation
140
+ * with these values to fetch the connector-specific custom fields schema.
141
+ */
142
+ export type CustomFieldsRequestDetails = {
143
+ objectActionName: string;
144
+ parameterValues: Array<[string, string | null]>;
145
+ };
@@ -1,4 +1,4 @@
1
- export { validateConfiguration, validateConnectionId, validateEndpoint, validateEventMode, validateEventType, validateFolderKey, validateHttpMethod, validateMethodInMetadata, validateObjectName, validatePathTemplateParams, validateRequiredEventParameters, validateRequiredFields, validateRequiredParameters, } from "./rules.js";
1
+ export { METHOD_TO_OPERATION, normalizeHttpMethod, OPERATION_TO_METHOD, validateConfiguration, validateConnectionId, validateEndpoint, validateEventMode, validateEventType, validateFolderKey, validateHttpMethod, validateMethodInMetadata, validateMethodMatchesOperation, validateObjectName, validatePathTemplateParams, validateRequiredEventParameters, validateRequiredFields, validateRequiredParameters, } from "./rules.js";
2
2
  export type { ConnectorValidationContext, Issue, IssueType, ValidationRule, } from "./types.js";
3
3
  import type { ConnectorValidationContext, Issue, ValidationRule } from "./types.js";
4
4
  /**
@@ -3,8 +3,45 @@ import type { ConnectorValidationContext, Issue } from "./types.js";
3
3
  export declare function validateConnectionId(context: ConnectorValidationContext): Issue[];
4
4
  /** FolderKey must be present and non-empty. */
5
5
  export declare function validateFolderKey(context: ConnectorValidationContext): Issue[];
6
+ /**
7
+ * IS-side method label → operation name (e.g. `"GETBYID" → "Retrieve"`).
8
+ * Authoritative source for the IS method lexicon. Use {@link normalizeHttpMethod}
9
+ * to convert these labels to standard HTTP verbs before serializing to a flow.
10
+ */
11
+ export declare const METHOD_TO_OPERATION: Record<string, string>;
12
+ /**
13
+ * Operation name → IS-side method label (e.g. `"RETRIEVE" → "GETBYID"`).
14
+ * Keys are uppercased; both operation names ("LIST", "RETRIEVE", …) and HTTP
15
+ * verbs ("GET", "POST", …) are accepted as input for tolerant lookup.
16
+ */
17
+ export declare const OPERATION_TO_METHOD: Record<string, string>;
18
+ /**
19
+ * Normalize an IS-side method label to a standard HTTP verb.
20
+ *
21
+ * IS metadata synthesizes `"GETBYID"` for path-parameterized retrieve
22
+ * operations — the only non-HTTP-verb in the IS method lexicon (see
23
+ * {@link METHOD_TO_OPERATION}). The .flow validator and BPMN runtime expect
24
+ * standard HTTP verbs only; call this before serializing to
25
+ * `inputs.detail.method`.
26
+ *
27
+ * Method-map lookups against the IS metadata must keep the original label —
28
+ * `methodMap["GETBYID"]` and `methodMap["GET"]` resolve to different
29
+ * operations on connectors that expose both List and Retrieve.
30
+ */
31
+ export declare function normalizeHttpMethod(rawMethod: string): string;
6
32
  /** Activity nodes must have a valid HTTP method. Maps to DAP-RT-1100. */
7
33
  export declare function validateHttpMethod(context: ConnectorValidationContext): Issue[];
34
+ /**
35
+ * Cross-validate `httpMethod` against the operation declared in the
36
+ * configuration blob's `essentialConfiguration.instanceParameters.operation`.
37
+ *
38
+ * Catches typos and copy-paste errors at configure time (e.g. `method: "POST"`
39
+ * on a Retrieve activity). Skips when configuration is missing/malformed,
40
+ * httpMethod is missing, or instanceParameters.operation is absent — those
41
+ * cases are caught by other rules. Maps operations to expected HTTP verbs via
42
+ * {@link OPERATION_TO_METHOD} + {@link normalizeHttpMethod}.
43
+ */
44
+ export declare function validateMethodMatchesOperation(context: ConnectorValidationContext): Issue[];
8
45
  /** Activity nodes must have an endpoint starting with "/". */
9
46
  export declare function validateEndpoint(context: ConnectorValidationContext): Issue[];
10
47
  /** ObjectName must be present for both activities and triggers. Maps to DAP-RT-1053. */
@@ -16,6 +53,12 @@ export declare function validateEventType(context: ConnectorValidationContext):
16
53
  /**
17
54
  * Configuration blob must exist and be parseable JSON
18
55
  * with an essentialConfiguration envelope. Maps to DAP-RT-1000.
56
+ *
57
+ * Error titles include a one-line shape hint so agents and humans see what
58
+ * the validator expects without consulting external docs. Eval runs prior
59
+ * to this hint showed agents looping 3-4 times on bare "Configuration is
60
+ * missing or empty." before discovering the `=jsonString:{essentialConfiguration:{...}}`
61
+ * envelope.
19
62
  */
20
63
  export declare function validateConfiguration(context: ConnectorValidationContext): Issue[];
21
64
  /**
@@ -2,5 +2,5 @@ export * from "../generated/connections/src/index.js";
2
2
  export { ElementsApi } from "../generated/elements/src/apis/index.js";
3
3
  export * from "../generated/elements/src/models/index.js";
4
4
  export { Configuration as ElementsConfiguration } from "../generated/elements/src/runtime.js";
5
- export { type CreateApiClientOptions, createApiClient, createConnectionsConfig, createElementsConfig, type ExecuteOperationResult, executeOperation, folderOverride, getEventObjectMetadataAsSchema, getInstanceEventObjectMetadataAsSchema, getInstanceObjectMetadataAsSchema, getObjectMetadataAsSchema, } from "./client-factory.js";
5
+ export { type CreateApiClientOptions, createApiClient, createConnectionsConfig, createElementsConfig, type EventOperationObject, type ExecuteOperationResult, executeOperation, folderOverride, getEventObjectMetadataAsSchema, getEventOperationObjects, getHttpRequestPreview, getInstanceEventObjectMetadataAsSchema, getInstanceObjectMetadataAsSchema, getObjectMetadataAsSchema, getWebhookConfig, type HttpRequestPreviewResult, type InstanceDesignActionResult, runInstanceDesignAction, type WebhookConfigResult, } from "./client-factory.js";
6
6
  export * from "./dap/index.js";
@@ -0,0 +1 @@
1
+ export declare const SDK_USER_AGENT: string;