docs(kobo,koreader,collections): Beam WO5 batch 6 — 12 endpoints

Kobo emulation + KOReader calibre-compatible surface backfilled with
device-token auth; collections reorder + update_rule created.

Claude registry: 12 entries. kobo/koreader emulation endpoints all bind
arbitrary protocol POST bodies (markup/bookmark/gettests/sync-from-server,
koreader progress/bookmarks) — registered as AnyJSONObject, not bodyless as
first drafted. Initialization returns the library sync payload, not the init
response.

Contract correction in update_rule.md: the route is SetRuleEnabled ({enabled}
required -> {collection_id, is_smart}); Beam's draft invented rule-field
updates. Reordered response/status: {item_ids} -> {status: reordered}.

make test 9/9.
This commit is contained in:
John O'Keefe committed 2026-10-24 16:25:00 -04:00
1 parent b77eab7ffd
commit 25ef0d12ba
13 files changed
+268 -57

No files matched your search

+54
View File
@@ -552,4 +552,58 @@ var Schemas = map[string]Schema{
// Delegates to ListMediaItems with library_id injected.
Response: json.RawMessage(`{"data": [{}]}`),
},
// --- Beam batch 6: kobo/koreader (device-token) + collections missing ---
"POST /api/sync/kobo/:token/markup": {
Request: AnyJSONObject{}, // kobo protocol payload (ReadingSync/BookmarkSync)
Response: handlers.KoboSyncStatus{}, // kobo firmware naming: Status/MarkupsSynced
},
"POST /api/sync/kobo/:token/bookmark": {
Request: AnyJSONObject{}, // kobo bookmark payload
Response: handlers.KoboSyncStatus{},
},
"POST /api/sync/kobo/:token/v1/analytics/gettests": {
Request: AnyJSONObject{}, // kobo analytics POST body
// A/B test payload — dynamic keys (tests/features/configuration).
Response: AnyJSONObject{},
},
"GET /api/sync/kobo/:token/v1/initialization": {
// NOTE: returns the library sync payload, not the init response.
Response: handlers.KoboLibraryResponse{},
},
"POST /api/sync/kobo/:token/sync-from-server": {
Request: AnyJSONObject{}, // kobo sync POST body
Response: handlers.KoboServerSyncResponse{},
},
"POST /api/sync/koreader/progress": {
Request: handlers.KOReaderProgressRequest{},
Response: handlers.KOReaderSyncResponse{},
},
"GET /api/sync/koreader/resolve": {
Response: handlers.KOReaderResolveResponse{},
},
"GET /api/sync/koreader/metadata/:uuid": {
// Hand-built map in the handler.
Response: AnyJSONObject{},
},
"GET /api/sync/koreader/library": {
Response: handlers.KOReaderLibraryResponse{},
},
"POST /api/sync/koreader/bookmarks": {
Request: AnyJSONObject{}, // {highlights: [...]} inline struct in handler
Response: AnyJSONObject{}, // hand-built map in the handler
},
"PUT /api/collections/:id/items/order": {
// Inline request {item_ids} — pinned by sample.
Request: json.RawMessage(`{"item_ids": []}`),
Response: json.RawMessage(`{"status": "reordered"}`),
},
"PUT /api/collections/:id/rules/:ruleId": {
// Inline anonymous request struct — pinned by sample.
Request: json.RawMessage(`{"rule": {}}`),
Response: json.RawMessage(`{
"id": "", "collection_id": "", "field": "", "operator": "",
"value": "", "priority": 0, "enabled": false, "is_smart": false
}`),
},
}