Skip to content

feat(api): complete the smart list filter and source surface - #892

Merged
vladjerca merged 1 commit into
masterfrom
feat/smart-list-filter-parity
Jul 28, 2026
Merged

feat(api): complete the smart list filter and source surface#892
vladjerca merged 1 commit into
masterfrom
feat/smart-list-filter-parity

Conversation

@vladjerca

Copy link
Copy Markdown
Contributor

The contract had drifted behind the API. Seven filter dimensions and two sources are live and callable today, but were missing from the schema, so consumers could not send them in a typed request. This closes that gap.

Filters

Added to smartListFiltersSchema:

Key Type Notes
genres_operator 'and' | 'or' Applies to the include arm only
keywords string[] Leading - on an entry excludes it, same as the other list filters
keywords_operator 'and' | 'or' Applies to the include arm only
letterboxd_ratings [min] or [min, max] 0-5 scale, films only
mal_ratings [min] or [min, max] 0-10 scale, anime
ignore_watching boolean
ignore_unreleased boolean
ignore_released boolean
ignore_ended boolean
ignore_airing boolean
ignore_no_release_date boolean

and requires every included value to be present, or (the default) any of them. Exclusion is always "carries none of", independent of the operator.

Sources

smartListWriteSchema.source gains watchlist and library, bringing the enum to the full set of seven. The create-route docs table is updated to match.

Compatibility

Additive and non-breaking. Every new key is optional, no existing field changes type or shape, and the operators default to or server-side when omitted, so existing payloads behave exactly as before.

Verification

deno fmt and deno lint clean. deno task openapi:validate passes. Parsed a payload carrying every new key through smartListWriteSchema: accepted, while an unknown source and an invalid operator value are still rejected.

Note that deno task test reports 5 pre-existing type errors in src/contracts/sync/HistoryRequest.test.ts, which imports a HistoryRequest type that has since been renamed to HistoryAddRequest. Identical count on master before this branch, so it is untouched by this change and left for a separate fix.

The contract had drifted behind the API: seven filter dimensions and two
sources were live and callable, but absent from the schema, so consumers
could not send them in a typed request.

Adds the two include-arm operators (genres_operator, keywords_operator),
the keywords list filter, the Letterboxd and MAL rating ranges, the six
missing ignore gates, and the watchlist and library sources.

Additive and non-breaking: every new key is optional and no existing
field changes type or shape.
@vladjerca
vladjerca merged commit c1448b8 into master Jul 28, 2026
3 checks passed
@vladjerca
vladjerca deleted the feat/smart-list-filter-parity branch July 28, 2026 23:17
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