Skip to content

feat: annotate every API method with its required scope - #738

Merged
andrii-bodnar merged 1 commit into
masterfrom
api-scopes
Oct 22, 2026
Merged

andrii-bodnar merged 1 commit into
masterfrom
api-scopes

Conversation

@nazarii-makar

Copy link
Copy Markdown
Collaborator

Every method whose JSDoc links an API operation now carries a @requiredScope block tag: <scope>:read, <scope>:write, or none for endpoints any token may call. Values come from the public API spec for both Crowdin and Crowdin Enterprise; for the project webhooks and Clear TM operations the Enterprise docs omit the line, so the Crowdin value is used (the API enforces the same scope in both editions).

The tag is visible in IDE hover and on the typedoc site (declared in tsdoc.json) and readable by tooling through the TypeScript compiler API from the published .d.ts files. A test guards that every operation-linked method keeps exactly one well-formed tag.

Also corrects the @see link of deleteReportSettingsTemplate, which pointed at a non-existent operation.

Every method whose JSDoc links an API operation now carries a
`@requiredScope` block tag: `<scope>:read`, `<scope>:write`, or `none`
for endpoints any token may call. Values come from the public API spec
for both Crowdin and Crowdin Enterprise; for the project webhooks and
Clear TM operations the Enterprise docs omit the line, so the Crowdin
value is used (the API enforces the same scope in both editions).

The tag is visible in IDE hover and on the typedoc site (declared in
tsdoc.json) and readable by tooling through the TypeScript compiler API
from the published .d.ts files. A test guards that every operation-linked
method keeps exactly one well-formed tag.

Also corrects the @see link of deleteReportSettingsTemplate, which pointed
at a non-existent operation.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@codecov

codecov Bot commented Oct 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.92%. Comparing base (a1bbb1c) to head (d8210b7).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #738   +/-   ##
=======================================
  Coverage   88.92%   88.92%           
=======================================
  Files          47       47           
  Lines        2563     2563           
  Branches      350      350           
=======================================
  Hits         2279     2279           
  Misses         85       85           
  Partials      199      199           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@andrii-bodnar
andrii-bodnar merged commit e415c10 into master Oct 22, 2026
17 checks passed
@andrii-bodnar
andrii-bodnar deleted the api-scopes branch October 22, 2026 12:41
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.

2 participants