Repository navigation
feat(api): add Qira'at content API v4 endpoints - #93
Merged
Merged
Conversation
Add client.qiraat and content.v4.qiraat covering readers, transmitters, junctures, readings and matrix. Qira'at routes request the qiraat.read client-credentials scope. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Contributor
size-limit report 📦
|
basit3407
added a commit
that referenced
this pull request
Oct 16, 2026
…95) The `Release` job on `main` failed its `check:operation-catalogs` gate after #91 merged: the catalog was missing the Qira'at v4 operations added by #93. #91 was branched before #93 landed, so its catalog was regenerated against the older base and still passed on the PR, where the check only compares against that branch. The drift only became visible once both were on `main`. Regenerated with `pnpm --filter @quranjs/api generate:operation-catalogs`. Additive only: 55 lines covering the Qira'at readers, transmitters and junctures operations. No existing entry changed. Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds first-class SDK support for the Qira'at Content API v4 endpoints, following the same layout as the Answers and Hadith References endpoints: an SDK class, camelCase response types, a
content.v4facade, a public-client server-only guard, mocks, tests, docs, README and a changeset.QuranQiraatclass (packages/api/src/sdk/qiraat.ts), exposed asclient.qiraatandclient.content.v4.qiraat.packages/api/src/types/api/Qiraat.ts, mirrored from the Rails controllers and jbuilder views. The fetcher camelizes keys, so types are camelCase like the other content types.Invalid verse key/Invalid chapter id), same as the other endpoints.apps/docs/content/docs/qiraat.mdx, README section, and a minor changeset.Routes (all GET, under
/content/api/v4/qiraat/)findAllReaders(options?)readers(include:transmitters,bio)findReaderById(id)readers/:idfindAllTransmitters(options?)transmitters(readerIdbecomesreader_id)findTransmitterById(id)transmitters/:idfindJuncturesByVerse(key, options?)junctures/by_verse/:verse_key(category,include=readings)findJuncturesByChapter(chapter, options?)junctures/by_chapter/:chapter_number(page,perPage,category)findJunctureById(id)junctures/:idfindReadingById(id)readings/:idfindMatrixByVerse(key, options?)matrix/by_verse/:verse_key(textField)findMatrixByChapter(chapter, options?)matrix/by_chapter/:chapter_number(page,perPage,textField)countMatrixWithinRange(from, to)matrix/count_within_range?from=1:1&to=2:10The facade mirrors these as
content.v4.qiraat.{readers,transmitters,junctures,readings,matrix}.{list,get,byVerse,byChapter,countWithinRange}.matrix/by_versereturns a 404 when a verse has no variations, which surfaces as aQuranHttpErrorwith status 404.Scope note
These endpoints require the OAuth scope
qiraat.read(theqiraatscope is also accepted). The server client's app-token resolver now requestsqiraat.readfor any/api/v4/qiraat/path, the same way it already requestspost.read/comment.readfor QuranReflect routes. Docs and README state that the client must be granted this scope. The legacyQuranClient(fixedcontent searchscope) is intentionally not extended.Not done / caveats
src/generated/specs/*operation-catalog.jsonwere not regenerated. They are generated from the OpenAPI specs inquran/qf-api-docs, and that script was not run here.🤖 Generated with Claude Code