You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(network): restructure sync JSON return format with nested send/receive keys
Change the flat JSON return format of network functions to a nested
structure with "send" and "receive" top-level keys, rename
"rowsReceived" to "rows" for conciseness, and add a "tables" array
field to the receive section listing affected table names.
Before: {"status":"synced","localVersion":5,"serverVersion":5,"rowsReceived":3}
After: {"send":{"status":"synced","localVersion":5,"serverVersion":5},"receive":{"rows":3,"tables":["tasks"]}}
Update integration tests to use SQLite's ->> operator for JSON field
extraction, and add db_expect_str helper for string assertions.
{"status":"synced|syncing|out-of-sync|error", "localVersion": N, "serverVersion": N}
369
+
{"send": {"status":"synced|syncing|out-of-sync|error", "localVersion": N, "serverVersion": N}}
370
370
```
371
371
372
-
-`status`: The current sync state — `"synced"` (all changes confirmed), `"syncing"` (changes sent but not yet confirmed), `"out-of-sync"` (local changes pending or gaps detected), or `"error"`.
373
-
-`localVersion`: The latest local database version.
374
-
-`serverVersion`: The latest version confirmed by the server.
372
+
-`send.status`: The current sync state — `"synced"` (all changes confirmed), `"syncing"` (changes sent but not yet confirmed), `"out-of-sync"` (local changes pending or gaps detected), or `"error"`.
373
+
-`send.localVersion`: The latest local database version.
374
+
-`send.serverVersion`: The latest version confirmed by the server.
0 commit comments