feat(sdk): namespace EntityIdentifier helpers under EntityIdentifiers#916
feat(sdk): namespace EntityIdentifier helpers under EntityIdentifiers#916marythought merged 3 commits intomainfrom
Conversation
Update JS examples to use `EntityIdentifiers.forEmail(...)` instead of bare `forEmail(...)` to match opentdf/web-sdk#916. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…iers Export helpers as `EntityIdentifiers.forEmail(...)` instead of bare `forEmail(...)` to avoid top-level name collisions (e.g. with future TDF recipient helpers) and align with the Java SDK pattern. Closes #915 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Code Review
This pull request refactors the export of entity identifiers by grouping them under a namespaced EntityIdentifiers object instead of individual exports. The changes are reflected in the library's main entry point and the unit tests. Feedback indicates that JSDoc examples in the source file still demonstrate the old non-namespaced usage and should be updated to reflect this breaking change.
2269d1b to
3f83aec
Compare
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
X-Test Failure Report |
X-Test Failure Report |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
Keep the bare named exports (forEmail, forClientId, etc.) with @deprecated JSDoc tags so existing consumers don't break. The namespaced EntityIdentifiers export is the recommended path forward. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
X-Test Failure Report✅ java-main |
Update JS examples to use `EntityIdentifiers.forEmail(...)` instead of bare `forEmail(...)` to match opentdf/web-sdk#916. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
eugenioenko
left a comment
There was a problem hiding this comment.
Code changes look great!
Summary
EntityIdentifierconvenience constructors under a namespacedEntityIdentifiersobject, using the existingexport * aspattern (same asAuthProviders)forEmail,forClientId, etc.) are preserved with@deprecatedJSDoc tags for backwards compatibilityEntityIdentifiers.forEmail(...)patternMigration
Closes #915
Test plan
🤖 Generated with Claude Code