Skip to content

feat(integration-service): add Connections service#554

Open
maninder-uipath wants to merge 1 commit into
mainfrom
feat/is-connections
Open

feat(integration-service): add Connections service#554
maninder-uipath wants to merge 1 commit into
mainfrom
feat/is-connections

Conversation

@maninder-uipath

Copy link
Copy Markdown
Contributor

Summary

First of a 4-PR stack onboarding the Integration Service to the SDK. Adds the Connections service.

  • New service exposed via the @uipath/uipath-typescript/is-connections subpath: getAll, getById, ping, reauthenticate
  • CONNECTION_ENDPOINTS + CONNECTIONS_BASE endpoint constants
  • Unit + model tests, shared IS test fixtures (IS_TEST_CONSTANTS, createMockConnection)
  • OAuth scope docs + mkdocs nav

Stack (merge in order)

  1. ➡️ Connections (this PR)main
  2. Connectors → base feat/is-connections
  3. Elements → base feat/is-connectors
  4. Execution → base feat/is-elements
  5. Integration tests (draft) → main

Version bump (1.5.0-beta.1) intentionally excluded per the repo's separate-PR release rule.

🤖 Generated with Claude Code

Adds the Integration Service Connections service (getAll, getById, ping,
reauthenticate) exposed via the @uipath/uipath-typescript/is-connections
subpath, with unit + model tests, endpoint constants, OAuth scope docs,
and mkdocs nav.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@maninder-uipath maninder-uipath requested a review from a team June 29, 2026 08:55
@sonarqubecloud

Copy link
Copy Markdown


it('should throw when the underlying connection has no id', async () => {
const connection = createConnectionWithMethods(
createMockConnection({ id: '' as unknown as string }),

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.

The as unknown as string cast is unnecessary — '' is already a string. This violates the "NEVER use as unknown as" convention.

Suggested change
createMockConnection({ id: '' as unknown as string }),
createMockConnection({ id: '' }),

* const connections = new Connections(sdk);
*
* const status = await connections.ping('<connectionId>');
* if (status.status !== 'Enabled') {

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.

JSDoc examples should use the enum rather than a raw string literal — per convention "Use enums for fixed value sets — NEVER leave raw strings/numbers" and "JSDoc @example blocks that reference named types must include the import statement." Update the import and comparison:

Suggested change
* if (status.status !== 'Enabled') {
* if (status.status !== ConnectionState.Enabled) {

Also update the import line at the top of this example block (line 122) to add ConnectionState:

 * import { Connections, ConnectionState } from '@uipath/uipath-typescript/is-connections';

The same fix is needed in the identical example in src/services/integration-service/connections/connections.ts.

@claude

claude Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Review summary

Two issues found this run:

1. Unnecessary as unknown as cast in model test (line 56)
'' is already a string; the cast is redundant and violates the "NEVER use as unknown as" rule. Fix: createMockConnection({ id: '' }).

2. Raw string literal in ping JSDoc example (line 128)
status.status !== 'Enabled' should use the enum (ConnectionState.Enabled) and the example import should be updated to include ConnectionState. The identical example in connections.ts (around line 142) needs the same fix.

Note — integration tests: Conventions require an integration test per method in tests/integration/shared/{domain}/. The PR description intentionally defers this to a 5th stack PR — flagging so the draft PR isn't overlooked before merge.

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