feat(sync): paginate Android sync with change tokens
This commit is contained in:
1 parent
0ff94f9b10
commit
97c237be80
76 files changed
+3401
-851
No files matched your search
+16
-6
@@ -86,6 +86,7 @@ type ItemValue struct {
|
||||
|
||||
type SyncRequest struct {
|
||||
LastSyncTimestamp Timestamp `json:"lastSyncTimestamp"`
|
||||
LastSyncToken *int64 `json:"lastSyncToken"`
|
||||
Lists []List `json:"lists"`
|
||||
Fields []Field `json:"fields"`
|
||||
Items []Item `json:"items"`
|
||||
@@ -94,12 +95,21 @@ type SyncRequest struct {
|
||||
}
|
||||
|
||||
type SyncResponse struct {
|
||||
Lists []List `json:"lists"`
|
||||
Fields []Field `json:"fields"`
|
||||
Items []Item `json:"items"`
|
||||
ItemValues []ItemValue `json:"itemValues"`
|
||||
OrphanItemValues []OrphanValue `json:"orphanItemValues"`
|
||||
ServerTimestamp int64 `json:"serverTimestamp"`
|
||||
Lists []List `json:"lists"`
|
||||
Fields []Field `json:"fields"`
|
||||
Items []Item `json:"items"`
|
||||
ItemValues []ItemValue `json:"itemValues"`
|
||||
OrphanItemValues []OrphanValue `json:"orphanItemValues"`
|
||||
ServerTimestamp int64 `json:"serverTimestamp"`
|
||||
ServerChangeToken int64 `json:"serverChangeToken"`
|
||||
NextSyncToken int64 `json:"nextSyncToken"`
|
||||
HasMore bool `json:"hasMore"`
|
||||
}
|
||||
|
||||
type PageResponse[T any] struct {
|
||||
Items []T `json:"items"`
|
||||
NextCursor string `json:"nextCursor"`
|
||||
HasMore bool `json:"hasMore"`
|
||||
}
|
||||
|
||||
type OrphanValue struct {
|
||||
|
||||
Reference in new issue
Block a user