Add sync conflict detection and resolution system
Implement conflict detection for concurrent reading progress updates from different devices. Adds conflict management endpoints for listing, viewing, and resolving conflicts. - Add ConflictHandler with CRUD endpoints for conflict management - Implement automatic conflict detection in KOReader progress updates - Add WebSocket broadcast for real-time conflict notifications - Add database query for listing user conflicts by status - Add integration tests and Bruno API test collection
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
meta {
|
||||
name: Get Conflict Details
|
||||
type: http
|
||||
seq: 2
|
||||
}
|
||||
|
||||
get {
|
||||
url: {{baseUrl}}/api/conflicts/{{conflict_id}}
|
||||
body: none
|
||||
auth: bearer
|
||||
}
|
||||
|
||||
headers: {
|
||||
Authorization: Bearer {{token}}
|
||||
}
|
||||
|
||||
docs: {
|
||||
Retrieves detailed information about a specific conflict.
|
||||
|
||||
Path Parameters:
|
||||
- conflict_id: UUID of the conflict
|
||||
|
||||
Response includes:
|
||||
- id: Conflict UUID
|
||||
- media_item_id: Associated book UUID
|
||||
- media_item_title: Book title
|
||||
- conflict_type: Type of conflict
|
||||
- conflict_data: Side-by-side comparison with sources:
|
||||
* source: Device/source identifier (koreader, kobo, web, etc.)
|
||||
* timestamp: When this progress was recorded
|
||||
* data: The conflicting data (percentage, epubcfi, chapter, etc.)
|
||||
- resolution_status: Current status
|
||||
- resolution_data: If resolved, includes resolution details
|
||||
- resolved_by: User ID who resolved it (if applicable)
|
||||
- resolved_at: When it was resolved (if applicable)
|
||||
- created_at: When conflict was detected
|
||||
|
||||
Example conflict_data:
|
||||
{
|
||||
"koreader": {
|
||||
"source": "koreader",
|
||||
"timestamp": "2026-01-30T20:10:00Z",
|
||||
"data": {
|
||||
"percentage": 0.45,
|
||||
"epubcfi": "epubcfi(/6/4/2:15)",
|
||||
"chapter": 3
|
||||
}
|
||||
},
|
||||
"kobo": {
|
||||
"source": "kobo",
|
||||
"timestamp": "2026-01-30T20:05:00Z",
|
||||
"data": {
|
||||
"percentage": 0.42,
|
||||
"location": "unknown"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user