{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Create a new personal shelf for organizing books in the personal library.",
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "description": {
              "description": "Optional description of the shelf",
              "maxLength": 500,
              "type": "string"
            },
            "name": {
              "description": "Name of the shelf",
              "maxLength": 100,
              "minLength": 1,
              "type": "string"
            }
          },
          "required": [
            "name"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "shelf": {
              "ref": "#personalShelfView",
              "type": "ref"
            }
          },
          "required": [
            "shelf"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    },
    "personalShelfView": {
      "properties": {
        "bookCount": {
          "description": "Number of books on this shelf",
          "minimum": 0,
          "type": "integer"
        },
        "createdAt": {
          "description": "When the shelf was created",
          "format": "datetime",
          "type": "string"
        },
        "description": {
          "description": "Description of the shelf",
          "type": "string"
        },
        "id": {
          "description": "Unique shelf identifier",
          "type": "integer"
        },
        "name": {
          "description": "Name of the shelf",
          "type": "string"
        },
        "updatedAt": {
          "description": "When the shelf was last updated",
          "format": "datetime",
          "type": "string"
        }
      },
      "required": [
        "id",
        "name",
        "bookCount",
        "createdAt",
        "updatedAt"
      ],
      "type": "object"
    }
  },
  "id": "buzz.bookhive.createPersonalShelf",
  "lexicon": 1
}
