{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "List all synced documents for the authenticated user.",
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "documents": {
              "items": {
                "ref": "#syncDocumentView",
                "type": "ref"
              },
              "type": "array"
            }
          },
          "required": [
            "documents"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {},
        "type": "params"
      },
      "type": "query"
    },
    "syncDocumentView": {
      "properties": {
        "authors": {
          "description": "Authors of the document",
          "type": "string"
        },
        "device": {
          "description": "Device name that last synced",
          "type": "string"
        },
        "device_id": {
          "description": "Device identifier that last synced",
          "type": "string"
        },
        "dismissed": {
          "description": "True when the user marked this document as having no BookHive counterpart",
          "type": "boolean"
        },
        "documentHash": {
          "description": "Hash identifying the document",
          "type": "string"
        },
        "filename": {
          "description": "Original filename of the document",
          "type": "string"
        },
        "hiveId": {
          "description": "Linked BookHive catalog entry ID",
          "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"
        },
        "title": {
          "description": "Title of the document",
          "type": "string"
        }
      },
      "required": [
        "documentHash",
        "progress",
        "percentage",
        "device",
        "device_id",
        "timestamp"
      ],
      "type": "object"
    }
  },
  "id": "buzz.bookhive.listSyncDocuments",
  "lexicon": 1
}
