{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Get reading sync progress for a document. Returns the KOSync-compatible progress data.",
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "device": {
              "description": "Device name that last synced",
              "type": "string"
            },
            "device_id": {
              "description": "Device identifier that last synced",
              "type": "string"
            },
            "document": {
              "description": "Document identifier",
              "type": "string"
            },
            "percentage": {
              "description": "Reading progress as a decimal string (0-1, e.g. '0.42')",
              "type": "string"
            },
            "progress": {
              "description": "Reading progress position (KOSync format)",
              "type": "string"
            },
            "timestamp": {
              "description": "Unix timestamp of last sync",
              "type": "integer"
            }
          },
          "required": [
            "document",
            "progress",
            "percentage",
            "device",
            "device_id",
            "timestamp"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "contentHash": {
            "description": "Content hash identifying the document",
            "type": "string"
          }
        },
        "required": [
          "contentHash"
        ],
        "type": "params"
      },
      "type": "query"
    }
  },
  "id": "buzz.bookhive.getSyncProgress",
  "lexicon": 1
}
