feat(integration-service): add Connections service#554
Conversation
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>
|
|
|
||
| it('should throw when the underlying connection has no id', async () => { | ||
| const connection = createConnectionWithMethods( | ||
| createMockConnection({ id: '' as unknown as string }), |
There was a problem hiding this comment.
The as unknown as string cast is unnecessary — '' is already a string. This violates the "NEVER use as unknown as" convention.
| createMockConnection({ id: '' as unknown as string }), | |
| createMockConnection({ id: '' }), |
| * const connections = new Connections(sdk); | ||
| * | ||
| * const status = await connections.ping('<connectionId>'); | ||
| * if (status.status !== 'Enabled') { |
There was a problem hiding this comment.
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:
| * 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.
Review summaryTwo issues found this run: 1. Unnecessary 2. Raw string literal in Note — integration tests: Conventions require an integration test per method in |



Summary
First of a 4-PR stack onboarding the Integration Service to the SDK. Adds the Connections service.
@uipath/uipath-typescript/is-connectionssubpath:getAll,getById,ping,reauthenticateCONNECTION_ENDPOINTS+CONNECTIONS_BASEendpoint constantsIS_TEST_CONSTANTS,createMockConnection)Stack (merge in order)
mainfeat/is-connectionsfeat/is-connectorsfeat/is-elementsmain🤖 Generated with Claude Code