{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "authorItem": {
      "properties": {
        "author": {
          "type": "string"
        },
        "avgRating": {
          "description": "Average rating * 10 (e.g. 42 = 4.2 stars)",
          "maximum": 50,
          "minimum": 0,
          "type": "integer"
        },
        "bookCount": {
          "minimum": 0,
          "type": "integer"
        },
        "thumbnail": {
          "type": "string"
        }
      },
      "required": [
        "author",
        "bookCount"
      ],
      "type": "object"
    },
    "genreItem": {
      "properties": {
        "count": {
          "minimum": 0,
          "type": "integer"
        },
        "genre": {
          "type": "string"
        }
      },
      "required": [
        "genre",
        "count"
      ],
      "type": "object"
    },
    "main": {
      "description": "Get featured genres and top authors for the explore hub.",
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "genres": {
              "items": {
                "ref": "buzz.bookhive.getExplore#genreItem",
                "type": "ref"
              },
              "type": "array"
            },
            "topAuthors": {
              "items": {
                "ref": "buzz.bookhive.getExplore#authorItem",
                "type": "ref"
              },
              "type": "array"
            }
          },
          "required": [
            "genres",
            "topAuthors"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {},
        "type": "params"
      },
      "type": "query"
    }
  },
  "id": "buzz.bookhive.getExplore",
  "lexicon": 1
}
