Skip to content

feat(api): add optional sourceApp to QuranReflectPost (DO NOT MERGE until backend sends it in production) - #91

Open
basit3407 wants to merge 1 commit into
mainfrom
feat/quran-reflect-post-source-app
Open

basit3407 wants to merge 1 commit into
mainfrom
feat/quran-reflect-post-source-app

Conversation

@basit3407

Copy link
Copy Markdown
Collaborator

Do not merge until the backend sends sourceApp in production. The field is invisible to clients until then, so this is safe to review now but must not be released early.

What

Adds the optional sourceApp object to the QuranReflectPost response type, with a new exported QuranReflectPostSourceApp type ({ name: string; url: string }).

  • Source contract: PostSourceAppDto and PostSerialized.sourceApp in quran/quran.com-users-backend (PR #1891, ported in #1920 main, #1921 pre-live, #1922 staging, #1923 testing).
  • Wire behavior: sourceApp is present only when the creating partner app is configured for attribution and was verified as a Gateway-authenticated OAuth client at creation. It is omitted, never null, for native, unverified, and unconfigured posts. The type is therefore sourceApp?: QuranReflectPostSourceApp, and a test asserts null is rejected by the type.
  • Applies to post responses returned by the quranReflect.v1.posts facade (get, create, update) and wherever QuranReflectPost is used.
  • Additive and optional, so it is a minor changeset for @quranjs/api. No runtime code changes; responses already pass unknown fields through.

Checks run

  • vitest run test/quran-reflect-post-types.test.ts passes (type surface compile check covering the new type, an attributed post, a native post, and a @ts-expect-error for null).
  • eslint on the touched files is clean. The full suite was not run (loaded machine); CI will.

Release notes

Changeset added: .changeset/quran-reflect-post-source-app.md.

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
dist/index.min.js 7.85 KB (0%)
dist/index.min.mjs 7.85 KB (0%)
dist/server.min.js 15.05 KB (0%)
dist/public.min.js 10.04 KB (0%)

@basit3407
basit3407 marked this pull request as ready for review October 13, 2026 07:33
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-13T07:35:52.993447Z 095ad6a Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

This branch has not been deployed

No deployments
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.

1 participant