Skip to content

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

Merged
anil-uipath merged 2 commits into
feat/is-connectorsfrom
feat/is-elements
Jul 22, 2026
Merged

feat(integration-service): add Elements service#556
anil-uipath merged 2 commits 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

Comment thread src/utils/constants/endpoints/integration-service.ts
Comment thread tests/unit/services/integration-service/elements.test.ts
* 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>
Comment thread docs/oauth-scopes.md

@ninja-shreyash ninja-shreyash left a comment

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.

Adds the Integration Service Execution passthrough (execute) exposed via
the @uipath/uipath-typescript/is-execution subpath. Executes arbitrary HTTP
operations against a connection instance and returns the full response
envelope without throwing on non-2xx. Includes unit tests and OAuth scope
docs. Reuses ELEMENT_ENDPOINTS.INSTANCE.EXECUTE.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
@anil-uipath
anil-uipath merged commit bb05d8f into feat/is-connectors Jul 22, 2026
5 checks passed
@anil-uipath
anil-uipath deleted the feat/is-elements branch July 22, 2026 09:07
anil-uipath pushed a commit that referenced this pull request Jul 22, 2026
* feat(integration-service): add Elements service [JAR-IS-3]

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>

* feat(integration-service): add Execution passthrough [JAR-IS-4] (#557)

Adds the Integration Service Execution passthrough (execute) exposed via
the @uipath/uipath-typescript/is-execution subpath. Executes arbitrary HTTP
operations against a connection instance and returns the full response
envelope without throwing on non-2xx. Includes unit tests and OAuth scope
docs. Reuses ELEMENT_ENDPOINTS.INSTANCE.EXECUTE.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Comment thread src/services/integration-service/execution/execution.ts
Comment thread tests/unit/services/integration-service/execution.test.ts
* });
* ```
*/
export async function execute(

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 exists for the execute function. Per convention: "Every new method must also have an integration test in tests/integration/shared/{domain}/."

Add tests/integration/shared/integration-service/execution.integration.test.ts. If the endpoint requires OAuth rather than PAT (so it returns 401 under CI credentials), use describe.skip with an explanatory comment, but the file must exist with the full test body in place.

Note: the open thread on elements.ts:48 raises the same gap for the Elements service — both are missing.

@claude

claude Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Review findings (3 new issues)

Inline static array in method bodyexecution.ts:57: ['POST', 'PUT', 'PATCH'] is a static lookup rebuilt on every call. Per convention, move it to a module-level const BODY_METHODS = new Set<ExecuteMethod>([...]).

as unknown as cast in testexecution.test.ts:16: Double-cast to inject getValidToken onto the token manager mock. Per convention, as unknown as is prohibited — the shared test setup should expose this stub on the mock directly.

Missing integration test for executeexecution.ts:146: No tests/integration/shared/integration-service/execution.integration.test.ts file. Same gap as the open Elements thread (elements.ts:48). Both are needed per the post-implementation checklist.


Previously raised (still open): error-propagation tests missing for 8 Elements methods (elements.test.ts:189), and no Elements integration test (elements.ts:48).

Note: ELEMENT_ENDPOINTS.INSTANCE.EXECUTE (flagged as unused in the prior run) is now used by execution.ts:39 — that issue is resolved.

anil-uipath added a commit that referenced this pull request Jul 23, 2026
Execution service (#557):
- Extend BaseService; acquire token via getValidAuthToken() instead of
  reaching into SDKInternalsRegistry for the token manager (config-only
  registry access retained in the constructor).
- Send W3C tracing headers (traceparent / x-uipath-traceparent-id) on
the
  raw passthrough fetch.
- Extract ['POST','PUT','PATCH'] into a module-level BODY_METHODS
constant.
- Drop the `as unknown as` cast in tests; shared mock TokenManager now
  exposes getValidToken.

Connectors + Elements (#555):
- ConnectorGetResponse: single-type alias -> `interface extends` for
TypeDoc.
- Add LifeCycleStage enum (PREVIEW, GA, DEPRECATED, CUSTOM) and type
  Connector.lifeCycleStage / ElementActivity.lifecycleStage with it.
- Add error-propagation tests for getDefaultConnection and
getConnections.
- Add error-propagation tests for the 8 remaining Elements read methods.

OAuth scopes (#556):
- Update docs to the new IS.* scope names (per-service): Connectors ->
  IS.Connectors.Read, Connections -> IS.Connections.Read, Elements ->
  IS.Connector.Export, Execution -> IS.Connections.Read.

Co-Authored-By: Claude Opus 4.8 (1M context) <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.

3 participants