Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions docs/oauth-scopes.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,20 @@ This page lists the specific OAuth scopes required in external app for each SDK
| `ping()` | `ConnectionService` or `ConnectionServiceUser` |
| `reauthenticate()` | `ConnectionService` |

## Integration Service — Elements

| Method | OAuth Scope |
|--------|-------------|
| `getObjects()` | `ConnectionService` or `ConnectionServiceUser` |
| `getActivities()` | `ConnectionService` or `ConnectionServiceUser` |
| `getObjectMetadata()` | `ConnectionService` or `ConnectionServiceUser` |
| `getEventObjects()` | `ConnectionService` or `ConnectionServiceUser` |
| `getEventObjectMetadata()` | `ConnectionService` or `ConnectionServiceUser` |
| `getInstanceObjects()` | `ConnectionService` or `ConnectionServiceUser` |
| `getInstanceObjectMetadata()` | `ConnectionService` or `ConnectionServiceUser` |
| `getInstanceEventObjects()` | `ConnectionService` or `ConnectionServiceUser` |
| `getInstanceEventObjectMetadata()` | `ConnectionService` or `ConnectionServiceUser` |

## Assets

| Method | OAuth Scope |
Expand Down
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ nav:
- Integration Service:
- Connectors: api/interfaces/ConnectorsServiceModel.md
- Connections: api/interfaces/ConnectionsServiceModel.md
- Elements: api/interfaces/ElementsServiceModel.md
- Maestro:
- Processes: api/interfaces/MaestroProcessesServiceModel.md
- Process Instances: api/interfaces/ProcessInstancesServiceModel.md
Expand Down
10 changes: 10 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,16 @@
"default": "./dist/is-connectors/index.cjs"
}
},
"./is-elements": {
"import": {
"types": "./dist/is-elements/index.d.ts",
"default": "./dist/is-elements/index.mjs"
},
"require": {
"types": "./dist/is-elements/index.d.ts",
"default": "./dist/is-elements/index.cjs"
}
},
"./is-connections": {
"import": {
"types": "./dist/is-connections/index.d.ts",
Expand Down
5 changes: 5 additions & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,11 @@ const serviceEntries = [
input: 'src/services/integration-service/connectors/index.ts',
output: 'is-connectors/index'
},
{
name: 'is-elements',
input: 'src/services/integration-service/elements/index.ts',
output: 'is-elements/index'
},
{
name: 'is-connections',
input: 'src/services/integration-service/connections/index.ts',
Expand Down
241 changes: 241 additions & 0 deletions src/models/integration-service/elements.models.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,241 @@
/**
* Integration Service — Elements models
*
* Read-only catalog/metadata APIs — no entity binding.
*/

import {
ElementObject,
ElementActivity,
ElementObjectMetadataResponse,
ElementEventObject,
ElementEventObjectMetadataResponse,
ElementObjectsGetOptions,
ElementActivitiesGetOptions,
ElementObjectMetadataGetOptions,
ElementEventObjectsGetOptions,
ElementEventObjectMetadataGetOptions,
} from './elements.types';

/**
* Service for inspecting connector elements (objects, activities, trigger events,
* field schemas) on UiPath Integration Service.
*
* The Elements API powers design-time tooling — every connector exposes a
* catalog of *objects* (resources like `contacts`, `messages`), *activities*
* (curated operations like `Send Email`), and *event objects* (trigger sources
* like `New Message`). Each can be inspected statically (connector-only) or
* scoped to a connection instance (which enriches the response with custom
* fields discovered from the live system).
*
* ### Usage
*
* Prerequisites: Initialize the SDK first - see [Getting Started](/uipath-typescript/getting-started/#import-initialize)
*
* ```typescript
* import { Elements } from '@uipath/uipath-typescript/is-elements';
*
* const elements = new Elements(sdk);
* const objects = await elements.getObjects('uipath-slack');
* ```
*/
export interface ElementsServiceModel {
/**
* List objects (resources) exposed by a connector.
*
* @param elementKey - Connector key (e.g. `uipath-slack`)
* @param options - Filtering options (type, subtype, hasEvents, hasBulk)
* @returns Promise resolving to an array of {@link ElementObject}
* @example
* ```typescript
* import { Elements } from '@uipath/uipath-typescript/is-elements';
*
* const elements = new Elements(sdk);
*
* const objects = await elements.getObjects('uipath-slack');
* for (const obj of objects) {
* console.log(`${obj.name} — ${obj.displayName}`);
* }
* ```
*
* @example
* ```typescript
* // Only objects that support events
* const eventCapable = await elements.getObjects('uipath-slack', { hasEvents: true });
* ```
*/
getObjects(elementKey: string, options?: ElementObjectsGetOptions): Promise<ElementObject[]>;

/**
* List curated activities exposed by a connector.
*
* @param elementKey - Connector key
* @param options - Optional `version` to pin to a specific connector schema
* @returns Promise resolving to an array of {@link ElementActivity}
* @example
* ```typescript
* const activities = await elements.getActivities('uipath-slack');
* for (const activity of activities) {
* console.log(`${activity.name}: ${activity.operation} on ${activity.objectName}`);
* }
* ```
*/
getActivities(elementKey: string, options?: ElementActivitiesGetOptions): Promise<ElementActivity[]>;

/**
* Get metadata for a single connector object (field schema, supported methods,
* parameters). Connection-independent — returns the standard schema only.
*
* @param elementKey - Connector key
* @param objectName - Object name (e.g. `messages`)
* @param options - Optional `version`, `hydrateParameters`, `includeParentArray`
* @returns Promise resolving to an {@link ElementObjectMetadataResponse}
* @example
* ```typescript
* const meta = await elements.getObjectMetadata('uipath-slack', 'messages');
* console.log(`Fields: ${Object.keys(meta.fields ?? {}).length}`);
* ```
*/
getObjectMetadata(
elementKey: string,
objectName: string,
options?: ElementObjectMetadataGetOptions,
): Promise<ElementObjectMetadataResponse>;

/**
* List event objects (trigger sources) for a connector's event operation.
*
* @param elementKey - Connector key
* @param operationName - Event operation name (e.g. `INDEX_COMPLETED`)
* @param options - Optional `version`
* @returns Promise resolving to an array of {@link ElementEventObject}
* @example
* ```typescript
* const events = await elements.getEventObjects('uipath-slack', 'NEW_MESSAGE');
* ```
*/
getEventObjects(
elementKey: string,
operationName: string,
options?: ElementEventObjectsGetOptions,
): Promise<ElementEventObject[]>;

/**
* Get metadata for a single event object.
*
* @param elementKey - Connector key
* @param operationName - Event operation name
* @param objectName - Event object name
* @param options - Optional `version`, `allFields`, `includeParentArray`
* @returns Promise resolving to an {@link ElementEventObjectMetadataResponse}
* @example
* ```typescript
* const meta = await elements.getEventObjectMetadata(
* 'uipath-slack',
* 'NEW_MESSAGE',
* 'channels',
* );
* ```
*/
getEventObjectMetadata(
elementKey: string,
operationName: string,
objectName: string,
options?: ElementEventObjectMetadataGetOptions,
): Promise<ElementEventObjectMetadataResponse>;

/**
* List objects exposed by a connection instance (includes connector custom
* fields discovered from the live system).
*
* @param connectionId - Connection GUID
* @param elementKey - Connector key
* @param options - Filtering options
* @returns Promise resolving to an array of {@link ElementObject}
* @example
* ```typescript
* const objects = await elements.getInstanceObjects('<connectionId>', 'uipath-slack');
* ```
*/
getInstanceObjects(
connectionId: string,
elementKey: string,
options?: ElementObjectsGetOptions,
): Promise<ElementObject[]>;

/**
* Get instance-scoped metadata for a single object — includes connector
* custom fields discovered from the live system.
*
* @param connectionId - Connection GUID
* @param elementKey - Connector key
* @param objectName - Object name
* @param options - Optional `version`, `hydrateParameters`, `includeParentArray`
* @returns Promise resolving to an {@link ElementObjectMetadataResponse}
* @example
* ```typescript
* const meta = await elements.getInstanceObjectMetadata(
* '<connectionId>',
* 'uipath-salesforce',
* 'Account',
* );
* ```
*/
getInstanceObjectMetadata(
connectionId: string,
elementKey: string,
objectName: string,
options?: ElementObjectMetadataGetOptions,
): Promise<ElementObjectMetadataResponse>;

/**
* List event objects for a connection instance.
*
* @param connectionId - Connection GUID
* @param elementKey - Connector key
* @param operationName - Event operation name
* @param options - Optional `version`
* @returns Promise resolving to an array of {@link ElementEventObject}
* @example
* ```typescript
* const events = await elements.getInstanceEventObjects(
* '<connectionId>',
* 'uipath-slack',
* 'NEW_MESSAGE',
* );
* ```
*/
getInstanceEventObjects(
connectionId: string,
elementKey: string,
operationName: string,
options?: ElementEventObjectsGetOptions,
): Promise<ElementEventObject[]>;

/**
* Get instance-scoped metadata for a single event object.
*
* @param connectionId - Connection GUID
* @param elementKey - Connector key
* @param operationName - Event operation name
* @param objectName - Event object name
* @param options - Optional `version`, `allFields`, `includeParentArray`
* @returns Promise resolving to an {@link ElementEventObjectMetadataResponse}
* @example
* ```typescript
* const meta = await elements.getInstanceEventObjectMetadata(
* '<connectionId>',
* 'uipath-slack',
* 'NEW_MESSAGE',
* 'channels',
* );
* ```
*/
getInstanceEventObjectMetadata(
connectionId: string,
elementKey: string,
operationName: string,
objectName: string,
options?: ElementEventObjectMetadataGetOptions,
): Promise<ElementEventObjectMetadataResponse>;
}
Loading
Loading