docs(conflicts,queue): Beam WO5 batch — 13 endpoints backfilled, registry pinned
Beam added frontmatter + provenance + labeled examples to the 7 conflict and 6 queue docs, fixing real field drift on the way (resolve response keys, bulk result shape, dismiss-all deleted count, queue stats counts). Claude registry verification found TWO Beam catches of Claude's own draft: - queue routes use :device_id / :item_id params (registry first draft said :id) - resolve_conflict DOES take a body (ConflictResolutionRequest) — registry first draft said nil Both fixed; gate then surfaced one real Beam defect: example-request used a nonexistent "resolution" field in resolve + bulk-resolve (real contract: winner=<source|manual> with required manual_data for manual; strategy= most_recent|highest_progress|manual). Fixed in the docs. Pinned by type: ConflictListResponse, ConflictDetailResponse, ConflictResolveResponse, BulkResolveRequest/Response, QueueStatsResponse, ConflictResolutionRequest. dismiss-all deleted is an int count.
This commit is contained in:
1 parent
fa00d6d3cb
commit
eacc33bfac
14 files changed
+224
-98
No files matched your search
@@ -1,3 +1,11 @@
|
||||
---
|
||||
method: DELETE
|
||||
path: /api/queue/devices/:device_id/clear
|
||||
auth: jwt
|
||||
area: queue
|
||||
---
|
||||
<!-- source: internal/handlers/queue.go:291 QueueHandler.ClearDeviceQueue -->
|
||||
|
||||
# Clear Device Queue
|
||||
|
||||
Clear all queue items for a specific device.
|
||||
@@ -24,9 +32,13 @@ DELETE /api/queue/devices/550e8400-e29b-41d4-a716-446655440000/clear
|
||||
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
|
||||
```
|
||||
|
||||
## Response (204 No Content)
|
||||
## Response (200 OK)
|
||||
|
||||
Device queue cleared successfully.
|
||||
```json example-response
|
||||
{
|
||||
"message": "queue cleared"
|
||||
}
|
||||
```
|
||||
|
||||
## Error Responses
|
||||
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
---
|
||||
method: DELETE
|
||||
path: /api/queue/items/:item_id
|
||||
auth: jwt
|
||||
area: queue
|
||||
---
|
||||
<!-- source: internal/handlers/queue.go:261 QueueHandler.DeleteQueueItem -->
|
||||
|
||||
# Delete Queue Item
|
||||
|
||||
Delete a specific queue item.
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
---
|
||||
method: GET
|
||||
path: /api/queue/devices/:device_id/stats
|
||||
auth: jwt
|
||||
area: queue
|
||||
---
|
||||
<!-- source: internal/handlers/queue.go:58 QueueHandler.GetDeviceQueueStats -->
|
||||
|
||||
# Get Device Queue Statistics
|
||||
|
||||
Get statistics for a specific device's sync queue.
|
||||
@@ -26,13 +34,13 @@ Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
|
||||
|
||||
## Response (200 OK)
|
||||
|
||||
```json
|
||||
```json example-response
|
||||
{
|
||||
"total_items": 15,
|
||||
"pending_items": 8,
|
||||
"processing_items": 2,
|
||||
"completed_items": 4,
|
||||
"failed_items": 1
|
||||
"pending_count": 8,
|
||||
"processing_count": 2,
|
||||
"failed_count": 1,
|
||||
"completed_count": 4,
|
||||
"total_count": 15
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
---
|
||||
method: GET
|
||||
path: /api/queue/items
|
||||
auth: jwt+admin
|
||||
area: queue
|
||||
---
|
||||
<!-- source: internal/handlers/queue.go:208 QueueHandler.ListAllQueueItems -->
|
||||
|
||||
# List All Queue Items (Admin)
|
||||
|
||||
List all queue items across all devices (admin only).
|
||||
@@ -29,24 +37,24 @@ Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
|
||||
|
||||
## Response (200 OK)
|
||||
|
||||
```json
|
||||
```json example-response
|
||||
{
|
||||
"items": [
|
||||
{
|
||||
"id": "uuid",
|
||||
"device_id": "device-uuid",
|
||||
"device_name": "My Kobo",
|
||||
"media_item_id": "book-uuid",
|
||||
"operation": "sync_progress",
|
||||
"device_type": "kobo",
|
||||
"user_email": "user@example.com",
|
||||
"sync_type": "sync_progress",
|
||||
"priority": 0,
|
||||
"attempts": 0,
|
||||
"max_attempts": 0,
|
||||
"status": "failed",
|
||||
"error_message": "Connection timeout",
|
||||
"created_at": "2026-02-08T10:00:00Z",
|
||||
"updated_at": "2026-02-08T10:05:00Z"
|
||||
"created_at": "2026-02-08T10:00:00Z"
|
||||
}
|
||||
],
|
||||
"total": 45,
|
||||
"limit": 20,
|
||||
"offset": 0
|
||||
"count": 45
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
---
|
||||
method: GET
|
||||
path: /api/queue/devices/:device_id/items
|
||||
auth: jwt
|
||||
area: queue
|
||||
---
|
||||
<!-- source: internal/handlers/queue.go:89 QueueHandler.ListDeviceQueueItems -->
|
||||
|
||||
# List Device Queue Items
|
||||
|
||||
List all queue items for a specific device.
|
||||
@@ -34,22 +42,24 @@ Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
|
||||
|
||||
## Response (200 OK)
|
||||
|
||||
```json
|
||||
```json example-response
|
||||
{
|
||||
"items": [
|
||||
{
|
||||
"id": "uuid",
|
||||
"device_id": "device-uuid",
|
||||
"media_item_id": "book-uuid",
|
||||
"operation": "sync_progress",
|
||||
"device_name": "My Kobo",
|
||||
"device_type": "kobo",
|
||||
"user_email": "user@example.com",
|
||||
"sync_type": "sync_progress",
|
||||
"priority": 0,
|
||||
"attempts": 0,
|
||||
"max_attempts": 0,
|
||||
"status": "pending",
|
||||
"created_at": "2026-02-08T10:00:00Z",
|
||||
"updated_at": "2026-02-08T10:00:00Z"
|
||||
"created_at": "2026-02-08T10:00:00Z"
|
||||
}
|
||||
],
|
||||
"total": 8,
|
||||
"limit": 10,
|
||||
"offset": 0
|
||||
"count": 8
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
---
|
||||
method: POST
|
||||
path: /api/queue/items/:item_id/retry
|
||||
auth: jwt
|
||||
area: queue
|
||||
---
|
||||
<!-- source: internal/handlers/queue.go:220 QueueHandler.RetryQueueItem -->
|
||||
|
||||
# Retry Queue Item
|
||||
|
||||
Retry a failed queue item.
|
||||
@@ -26,10 +34,13 @@ Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
|
||||
|
||||
## Response (200 OK)
|
||||
|
||||
```json
|
||||
```json example-response
|
||||
{
|
||||
"message": "Queue item retry initiated",
|
||||
"item_id": "uuid"
|
||||
"message": "item queued for retry",
|
||||
"item_id": "uuid",
|
||||
"status": "pending",
|
||||
"attempts": 0,
|
||||
"max_attempts": 0
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
Reference in new issue
Block a user