feat(integration-service): add Elements service#556
Conversation
| }, | ||
| /** Generic HTTP passthrough endpoint for executing a request against a connection instance. */ | ||
| EXECUTE: (connectionId: string, objectName: string) => | ||
| `${ELEMENTS_BASE}/instances/${encodeURIComponent(connectionId)}/${encodeURIComponent(objectName)}`, |
There was a problem hiding this comment.
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.
| ); | ||
| }); | ||
| }); | ||
| }); |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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.
Review findings (3 issues)Dead endpoint constant — Incomplete error-propagation tests — Missing integration tests — No |
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>
8a85b1f to
393b74d
Compare
Summary
PR 3/4 of the Integration Service stack. Adds the Elements service.
@uipath/uipath-typescript/is-elements: object/activity/metadata reads and event-object reads at both connector and connection-instance scopeELEMENT_ENDPOINTSconstants +ELEMENTS_BASEStack
feat/is-connectors— merge the lower PRs first; GitHub will retarget this tomain.🤖 Generated with Claude Code