GET /api/notes gains combinable, AND-ed facets alongside the existing filter/date/sort: multiple ?label= (notes with ALL), ?color, ?kind, ?has_reminder, ?has_attachment, and ?q (full-text over title+body, ranked) — so the facet bar's text box searches, not just filters. All optional; invalid color/kind → 400. saved_filters table (migration 0021) + /api/saved-filters CRUD (list / create / rename+repoint / delete, owner-scoped). `params` is a JSON facet dict mirroring the query surface; clean_params() whitelists facet keys so a saved view can't accumulate junk. Tests (DB-free): _truthy, clean_params key-whitelisting, saved-filters auth-guards. UI (facet bar + saved-views sidebar) lands next. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FRgehjoz7Yv8LkUfADxACm
21 lines
382 B
Python
21 lines
382 B
Python
"""Import every model module so Base.metadata is fully populated for Alembic.
|
|
|
|
Imported for side effects only (model registration on Base.metadata).
|
|
"""
|
|
|
|
from . import ( # noqa: F401
|
|
device_token,
|
|
group,
|
|
label,
|
|
note,
|
|
note_attachment,
|
|
note_item,
|
|
note_link,
|
|
note_link_preview,
|
|
note_revision,
|
|
saved_filter,
|
|
settings,
|
|
share,
|
|
user,
|
|
)
|