Skip to content

[ECO-5682] Add missing token capability ops for objects and annotations#2160

Merged
VeskeR merged 1 commit intomainfrom
ECO-5682/fix-token-capabilities
Jan 30, 2026
Merged

[ECO-5682] Add missing token capability ops for objects and annotations#2160
VeskeR merged 1 commit intomainfrom
ECO-5682/fix-token-capabilities

Conversation

@VeskeR
Copy link
Contributor

@VeskeR VeskeR commented Jan 30, 2026

Updated to match the docs https://ably.com/docs/auth/capabilities?lang=javascript#capability-operations

Resolves ECO-5682

Summary by CodeRabbit

  • New Features
    • Added four new capability types for permission configuration: object-subscribe, object-publish, annotation-subscribe, and annotation-publish — enabling more granular access control and finer permission assignment across applications.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 30, 2026

Walkthrough

The TypeScript declarations in ably.d.ts expand the capabilityOp union to include four new literals: object-subscribe, object-publish, annotation-subscribe, and annotation-publish. The CapabilityOp alias now reflects the expanded union without renaming.

Changes

Cohort / File(s) Summary
Type Definition Expansion
ably.d.ts
Extended the capabilityOp union type by adding four literals: object-subscribe, object-publish, annotation-subscribe, and annotation-publish. export type CapabilityOp = capabilityOp; remains, now referencing the expanded union.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 I hopped through types with a twitchy nose,
Four new ops sprouted where the meadow grows,
Objects and annotations now sing and play,
Publish and subscribe have joined the day,
Tokens cheer — the rabbit hops away! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding missing token capability operations for objects and annotations to the TypeScript type definitions.
Linked Issues check ✅ Passed The PR implementation directly addresses ECO-5682 by adding the four missing capability operations (object-subscribe, object-publish, annotation-subscribe, annotation-publish) to the capabilityOp union type, resolving TypeScript errors when using valid capabilities.
Out of Scope Changes check ✅ Passed All changes are scoped to updating the capabilityOp union type with the missing capability literals; no unrelated modifications are present.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ECO-5682/fix-token-capabilities

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot temporarily deployed to staging/pull/2160/features January 30, 2026 11:51 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/2160/bundle-report January 30, 2026 11:51 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/2160/typedoc January 30, 2026 11:51 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

TypeScript capabilities definition missing valid capabilities (eg annotation-publish)

2 participants