Skip to content

feat(integration-service): add Elements service#556

Open
maninder-uipath wants to merge 1 commit into
feat/is-connectorsfrom
feat/is-elements
Open

feat(integration-service): add Elements service#556
maninder-uipath wants to merge 1 commit into
feat/is-connectorsfrom
feat/is-elements

Conversation

@maninder-uipath

Copy link
Copy Markdown
Contributor

Summary

PR 3/4 of the Integration Service stack. Adds the Elements service.

  • New service via @uipath/uipath-typescript/is-elements: object/activity/metadata reads and event-object reads at both connector and connection-instance scope
  • ELEMENT_ENDPOINTS constants + ELEMENTS_BASE
  • Unit tests, OAuth scope docs, mkdocs nav

Stack

  • Base: feat/is-connectors — merge the lower PRs first; GitHub will retarget this to main.

🤖 Generated with Claude Code

},
/** Generic HTTP passthrough endpoint for executing a request against a connection instance. */
EXECUTE: (connectionId: string, objectName: string) =>
`${ELEMENTS_BASE}/instances/${encodeURIComponent(connectionId)}/${encodeURIComponent(objectName)}`,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ELEMENT_ENDPOINTS.INSTANCE.EXECUTE is defined here but is never referenced in elements.ts or anywhere else in the codebase. Per convention: "NEVER leave unused code." Either add the service method that uses it, or remove the constant.

);
});
});
});

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only getObjects has an API error-propagation test. Per convention: "Test both success and error scenarios for every public method." The other 8 methods (getActivities, getObjectMetadata, getEventObjects, getEventObjectMetadata, getInstanceObjects, getInstanceObjectMetadata, getInstanceEventObjects, getInstanceEventObjectMetadata) each need at least one mockApiClient.get.mockRejectedValue(...) test.

* const objects = await elements.getObjects('uipath-slack');
* ```
*/
export class ElementsService extends BaseService implements ElementsServiceModel {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No integration test file exists for this service. Per convention: "Every new method must also have an integration test in tests/integration/shared/{domain}/." A tests/integration/shared/integration-service/elements.integration.test.ts is required — even if the test body uses describe.skip while PAT-auth support is being worked out (with an explanatory comment), the file must be present.

@claude

claude Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Review findings (3 issues)

Dead endpoint constantELEMENT_ENDPOINTS.INSTANCE.EXECUTE in src/utils/constants/endpoints/integration-service.ts line 64 is defined but never referenced. Remove it or add the corresponding service method.

Incomplete error-propagation teststests/unit/services/integration-service/elements.test.ts line 189: only getObjects has an API error test. Each of the other 8 public methods needs at least one mockRejectedValue scenario.

Missing integration tests — No tests/integration/shared/integration-service/elements.integration.test.ts file. Per convention every new method requires an integration test.

Adds the Integration Service Elements service (objects, activities,
object metadata, and event-object reads at both connector and connection-
instance scope) exposed via the @uipath/uipath-typescript/is-elements
subpath. Includes ELEMENT_ENDPOINTS constants, unit tests, OAuth scope
docs, and mkdocs nav.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant