{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://sadtech.ir/schemas/sync-response.schema.json", "title": "SyncResponse", "description": "A sync response is a response sent by the server to a device to synchronize its local database with the server's database.", "type": "object", "properties": { "cursor": { "description": "The cursor is a string that represents the last known state of the database on the device. It is used to determine which operations need to be sent to the device.", "type": "integer" }, "operations": { "description": "The operations are the changes that have been made to the database on the device since the last sync. They are sent to the server to be applied to the server's database.", "type": "array", "items": { "$ref": "operation.schema.json" } }, "snapshot": { "description": "The snapshot is a complete copy of the database on the server. It is sent to the device when the device's local database is out of sync with the server's database.", "$ref": "snapshot.schema.json" } }, "required": [ "cursor", "operations" ] }