Skip to content

fix(api): match API Blueprint port types to the live API - #1082

Merged
StefanFriptu merged 7 commits into
masterfrom
fix/api-apib-port-response-shapes
Nov 19, 2026
Merged

StefanFriptu merged 7 commits into
masterfrom
fix/api-apib-port-response-shapes

Conversation

@kevincador

Copy link
Copy Markdown
Contributor

Corrects routes from the API Blueprint port (732a903) whose request or response types do not match what the live API sends. Each fix is its own commit, checked against the live route's behavior. No routes are added or removed.

These are breaking type changes for consumers of these routes, so they ship separately from the PUT /sync/watchlist fix (#1081).

Fixes

Route Was Now
GET /comments/{trending,recent,updates} bare comment array {type, comment, movie?, show?, season?, episode?, list?} (commentActivityResponseSchema)
GET /comments/:id/item z.union of bare media objects flat {type, <media key>?} object (commentItemResponseSchema), no union per schemas.md
GET /shows/:id/certifications a single certification string array of {certification, country} (showCertificationEntryResponseSchema)
POST /users/hidden/:section + /remove routes history body (watched_at, episodes), deleted.{movies, episodes}, added.season hiddenItemsRequestSchema (hidden_at, movies, shows, seasons, users); deleted / added with movies, shows, seasons, users
GET /users/hidden/:section shows only {hidden_at, type, movie?, show?, season?, user?} (hiddenItemResponseSchema)
GET /users/:id/notes/:type flat note {attached_to, type, <media>?, note} (userNoteResponseSchema)
POST /notes body nested item key media key at the top level, optional attached_to, notes, privacy, spoiler

Known gaps, not in this PR

  • GET /users/:id/notes/:type?extended=min returns a smaller shape than the default one typed here.
  • noteResponseSchema and the PUT /notes/:id body still carry an unused item field.
  • comment_type / type are optional on the live comment activity routes but required path params here.
  • The get and dropped hidden routes still use hiddenShowResponseSchema.

Checks

  • bun run check, bun run test
  • bun run lint (same warnings as master), bun run format:check
  • bun run openapi:validate
  • bun run publish:check

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-19T07:52:13.561594Z 3a75f41 Manual request
ℹ️ 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.

@kevincador

Copy link
Copy Markdown
Contributor Author

@codex review

@kevincador
kevincador force-pushed the fix/api-apib-port-response-shapes branch from 43eaa72 to 3a75f41 Compare November 19, 2026 07:50
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: 3a75f41618

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@StefanFriptu
StefanFriptu force-pushed the fix/api-apib-port-response-shapes branch from 3a75f41 to 4f72119 Compare November 19, 2026 12:37
@StefanFriptu

Copy link
Copy Markdown
Collaborator

Folded two fixups into the matching commits:

  • POST /notes body (top-level note media commit): movie, show, season, episode and person now require ids.trakt. The live API rejects slug-only, IMDb-only or TMDB-only IDs with a 400 invalid_request_body, so the type no longer allows them. The description and table now say ids.trakt.
  • Hidden not_found (hidden add/remove commit): added episodes, typed like the sync history not_found, because the live API echoes missing episodes there. Left people out: it's always empty for hidden, and no other not_found schema types it.

@StefanFriptu
StefanFriptu merged commit 6db8684 into master Nov 19, 2026
9 checks passed
@StefanFriptu
StefanFriptu deleted the fix/api-apib-port-response-shapes branch November 19, 2026 12:39
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