docs(api): add KOReader sync protocol documentation
- sync_progress.md - POST /api/sync/koreader/progress - get_metadata.md - GET /api/sync/koreader/metadata/:uuid - get_library.md - GET /api/sync/koreader/library - sync_bookmarks.md - POST /api/sync/koreader/bookmarks KOReader device sync endpoints with device authentication for progress, metadata, library, and bookmarks
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
# Resolve Conflict
|
||||
|
||||
Resolve a specific conflict by choosing which version to keep.
|
||||
|
||||
**Endpoint**: `POST /api/conflicts/:id/resolve`
|
||||
**Auth**: Required
|
||||
**Content-Type**: `application/json`
|
||||
|
||||
## Path Parameters
|
||||
|
||||
| Parameter | Type | Required | Description |
|
||||
|-----------|------|-----------|-------------|
|
||||
| id | string (UUID) | Yes | Conflict UUID |
|
||||
|
||||
## Request Body
|
||||
|
||||
| Field | Type | Required | Description |
|
||||
|--------|------|-----------|-------------|
|
||||
| resolution | string | Yes | Resolution strategy: "device", "server", or "highest_progress" |
|
||||
|
||||
### Example Request
|
||||
|
||||
```json
|
||||
{
|
||||
"resolution": "device"
|
||||
}
|
||||
```
|
||||
|
||||
## Response (200 OK)
|
||||
|
||||
```json
|
||||
{
|
||||
"message": "Conflict resolved successfully",
|
||||
"conflict_id": "uuid",
|
||||
"resolution": "device"
|
||||
}
|
||||
```
|
||||
|
||||
## Error Responses
|
||||
|
||||
| Code | Description |
|
||||
|------|-------------|
|
||||
| 400 | Invalid resolution strategy |
|
||||
| 401 | Invalid or expired token |
|
||||
| 404 | Conflict not found |
|
||||
| 400 | Conflict already resolved |
|
||||
|
||||
## Try It Out
|
||||
|
||||
<!-- API Explorer will be inserted here in Phase 3 -->
|
||||
Reference in New Issue
Block a user