Skip to content

fix(data-fabric): export roles and directory types from barrels [AGVSOL-3062]#612

Open
dsuresh-ap wants to merge 1 commit into
mainfrom
claude/cli-type-exports-955325
Open

fix(data-fabric): export roles and directory types from barrels [AGVSOL-3062]#612
dsuresh-ap wants to merge 1 commit into
mainfrom
claude/cli-type-exports-955325

Conversation

@dsuresh-ap

Copy link
Copy Markdown
Member

Summary

Follow-up to review comments on UiPath/cli#2891: the DataFabricRoleService and DataFabricDirectoryService classes are exported from the /entities subpath, but their types and enums were not, so the CLI had to derive the principal-type input from the method signature:

// CLI workaround this PR removes the need for
type PrincipalTypeInput = Parameters<
    DataFabricClient["entities"]["directory"]["assignRoles"]
>[1];

This PR re-exports the roles/directory types through the barrels so consumers can import them directly. No new methods or endpoints — export surface only.

Exports Added

Symbol Kind Now importable from
DataFabricDirectoryEntityType enum (runtime) @uipath/uipath-typescript/entities, main entry
DataFabricDirectoryEntityTypeName enum (runtime) @uipath/uipath-typescript/entities, main entry
DataFabricDirectoryEntityTypeInput type @uipath/uipath-typescript/entities, main entry
DataFabricDirectoryRole, DataFabricDirectoryEntry types @uipath/uipath-typescript/entities, main entry
DataFabricDirectoryListOptions, DataFabricDirectoryGetAllOptions, DataFabricDirectoryListResponse types @uipath/uipath-typescript/entities, main entry
DataFabricDirectoryAssignOptions, DataFabricDirectoryAssignmentResult types @uipath/uipath-typescript/entities, main entry
DataFabricDirectoryServiceModel interface @uipath/uipath-typescript/entities, main entry
DataFabricRoleType enum (runtime) @uipath/uipath-typescript/entities, main entry
DataFabricRole, DataFabricRoleGetAllOptions, DataFabricRoleServiceModel types @uipath/uipath-typescript/entities, main entry

All symbols keep their @internal JSDoc tags — excludeInternal: true in typedoc.json keeps them out of the generated docs, matching the "keep it internal for now" decision on the CLI PR. The *.internal-types.ts files remain private.

Example Usage

import {
  DataFabricDirectoryEntityTypeName,
  DataFabricDirectoryService,
  DataFabricRoleService,
} from '@uipath/uipath-typescript/entities';

const roles = new DataFabricRoleService(sdk);
const directory = new DataFabricDirectoryService(sdk);

const dataWriter = (await roles.getAll()).find(role => role.name === 'DataWriter');
await directory.assignRoles('<identity-group-id>', DataFabricDirectoryEntityTypeName.Group, [dataWriter.id]);

Files

Area Files
Barrel exports src/services/data-fabric/index.ts (/entities subpath), src/models/data-fabric/index.ts (main entry)
Unit tests tests/unit/services/data-fabric/exports.test.ts (2 tests — runtime export surface + compile-time type re-export check)

Verification

  • npm run typecheck — clean
  • npm run lint — 0 errors
  • npm run test:unit — 2092 passed
  • npm run build — verified dist/entities/index.d.ts and dist/index.cjs now expose the enums/types

Refs AGVSOL-3062

🤖 Auto-generated using onboarding skills

🤖 Generated with Claude Code

@dsuresh-ap
dsuresh-ap requested a review from a team July 17, 2026 18:46
@claude

claude Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

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

…OL-3062]

The DataFabricRoleService and DataFabricDirectoryService classes were
exported from the /entities subpath, but their option/response types and
enums (e.g. DataFabricDirectoryEntityTypeInput) were not re-exported,
forcing consumers like the CLI to derive them via Parameters<> from
method signatures. Re-export roles/directory types and ServiceModel
interfaces through the entities subpath and main barrels. All symbols
keep their @internal JSDoc tags, so the generated docs are unchanged.

Follow-up to review comments on UiPath/cli#2891.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@dsuresh-ap
dsuresh-ap force-pushed the claude/cli-type-exports-955325 branch from 33b167c to 6348646 Compare July 20, 2026 15:07
@claude

claude Bot commented Jul 20, 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.

3 participants