Skip to content

feat(data-fabric): tag DF service requests with x-uipath-source - #694

Draft
AditiGoyalUipath wants to merge 2 commits into
mainfrom
feat/sdk-datafabric-source-header
Draft

feat(data-fabric): tag DF service requests with x-uipath-source#694
AditiGoyalUipath wants to merge 2 commits into
mainfrom
feat/sdk-datafabric-source-header

Conversation

@AditiGoyalUipath

Copy link
Copy Markdown
Contributor

Set x-uipath-source: uipath-typescript-sdk on every request from the four DataFabric services (Entities, ChoiceSets, Directory, Roles) via BaseService's constructor headers arg, so the DF backend can distinguish SDK-originated traffic. Unit tests assert the header lands on the ApiClient config.

Set x-uipath-source: uipath-typescript-sdk on every request from
the four DataFabric services (Entities, ChoiceSets, Directory,
Roles) via BaseService's constructor headers arg, so the DF
backend can distinguish SDK-originated traffic. Unit tests assert
the header lands on the ApiClient config.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@AditiGoyalUipath
AditiGoyalUipath requested a review from a team August 26, 2026 13:48
@AditiGoyalUipath
AditiGoyalUipath marked this pull request as draft August 26, 2026 13:49
Comment thread src/utils/constants/headers.ts
Comment thread tests/unit/services/data-fabric/choicesets.test.ts Outdated
@claude

claude Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Review summary

Two issues found:

1. Missing @internal on UIPATH_SOURCE (headers.ts#L17)
CONVERSATIONAL_SURFACE_NAME and CONVERSATIONAL_SURFACE_VERSION in the same file are both @internal because they are SDK-internal headers consumers should never set. UIPATH_SOURCE is identical in purpose and should follow the same pattern; without it, TypeDoc will include it in public API docs.

2. Hardcoded header name string in all four test files (choicesets.test.ts#L61)
'x-uipath-source' is duplicated as a string literal in choicesets.test.ts, directory.test.ts, entities.test.ts, and roles.test.ts instead of importing the UIPATH_SOURCE constant. Per conventions, hardcoded test values drift silently when the underlying constant changes.

…alue constant

Tag UIPATH_SOURCE with @internal (matches CONVERSATIONAL_SURFACE_*
pattern) so TypeDoc excludes it from public docs, and extract the
'uipath-typescript-sdk' value to UIPATH_TYPESCRIPT_SDK. Update the
four DF service constructors and their unit tests to reference the
constants instead of hardcoding the strings.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@claude

claude Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

✅ No issues found. Checked for bugs and CLAUDE.md compliance.

@sonarqubecloud

Copy link
Copy Markdown

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