Preferences
Per-user key-value preference store with list and scalar support.
List all preference keys (paginated)
Returns a cursor-paginated list of all preference keys for the acting end-user. Each item carries the first (lowest-position) value for that key. Reads are not cached — the result set is unbounded.
Delete a preference key
Deletes the preference key and all its items. Returns 404 when the key does not exist. The delete is applied synchronously.
Get a preference value by key
Returns the first (lowest-position) item value for the given key. Served from Redis cache when warm. Returns 404 when the key does not exist.
Set a preference key (destructive replace)
Replaces the preference key with a single value. If the key held multiple items (from prior pushes) they are deleted. The write is enqueued — the response reflects intent, not committed DB state.
List all items in a preference list
Returns all items for the given preference key ordered by position. Served from Redis cache when warm. Returns 404 when the key does not exist.
Remove a specific preference list item
Removes the item identified by `itemId`. Returns 404 when the item does not exist under the given key for this user. The write is enqueued.
Update a specific preference list item
Replaces the value of the item at `itemId`. Returns 404 when the item does not exist under the given key for this user. The write is enqueued.
Get the number of items in a preference list
Returns the item count for the given key. Returns `{ length: 0 }` when the key does not exist — no 404. Not cached.
Pop the last item from a preference list
Removes the item at the highest position. Returns 404 when the key does not exist. The write is enqueued — the response reflects intent, not committed DB state.
Push a value onto a preference list
Appends a new item to the preference key list at the highest position + 1. The item id is pre-generated and returned immediately — the caller can reference it before the consumer commits the row. The write is enqueued.
Search preference list items by value
Returns items whose JSON value contains the query value (`@>` containment). `value` is a URL-encoded JSON string. Exact JSON equality for v1. Not cached. `limit` caps the result set (default 100, max 100).