Skip to content

feat(api): type protocol role records#1482

Open
LiranCohen wants to merge 1 commit into
mainfrom
feat/typed-role-management
Open

feat(api): type protocol role records#1482
LiranCohen wants to merge 1 commit into
mainfrom
feat/typed-role-management

Conversation

@LiranCohen

Copy link
Copy Markdown
Contributor

Summary

  • keep role grant/list/revoke on the existing typed Records create/query/delete lifecycle instead of adding a parallel role API
  • expose exact $role: true paths as ProtocolRolePaths and require recipient for role-record creates at both the type and runtime boundaries
  • document duplicate-assignment, encryption, and best-effort audience-delivery behavior

Closes #1458.

Test plan

  • bun run build (packages/api)
  • bun run --filter @enbox/protocols build && bun run --filter @enbox/browser build
  • bun test tests/typed-protocol.spec.ts -t 'protocol role records'
  • bun test tests/audience-key-delivery.spec.ts -t 'forward recipientRolePublicKey on typed create'
  • bun run lint

Full integration coverage runs in CI.

@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.

feat(api): manage protocol roles through typed Records

1 participant