added base protocol types that every app in this monorepo import it

This commit is contained in:
2026-08-29 11:04:54 +03:30
parent 5c8310b837
commit fc5267175e
17 changed files with 43 additions and 28 deletions
+2 -2
View File
@@ -2,7 +2,7 @@
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://sadtech.ir/schemas/operation.schema.json",
"title": "Operation",
"description": "An operation is a single action that can be performed on the database by sync protocol.",
"description": "An operation is a single action performed on the database.",
"type": "object",
"properties": {
"id": {
@@ -40,4 +40,4 @@
"type": "string"
}
}
}
}
+2 -2
View File
@@ -2,7 +2,7 @@
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://sadtech.ir/schemas/snapshot.schema.json",
"title": "Snapshot",
"description": "A 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.",
"description": "A snapshot is a complete copy of the database on the server.",
"type": "object",
"properties": {
"id": {
@@ -23,4 +23,4 @@
"format": "int64"
}
}
}
}
+2 -2
View File
@@ -2,7 +2,7 @@
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://sadtech.ir/schemas/sync-request.schema.json",
"title": "SyncRequest",
"description": "A sync request is a request sent by a device to the server to synchronize its local database with the server's database.",
"description": "A sync request is a request sent by a device to the server.",
"type": "object",
"properties": {
"device_id": {
@@ -26,4 +26,4 @@
"cursor",
"operations"
]
}
}
+3 -3
View File
@@ -2,11 +2,11 @@
"$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.",
"description": "A sync response is a response sent by the server.",
"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.",
"description": "The cursor is an integer that represents the last known state of the database.",
"type": "integer"
},
"operations": {
@@ -25,4 +25,4 @@
"cursor",
"operations"
]
}
}