{
	"lexicon": 1,
	"id": "pub.byline.book",
	"defs": {
		"main": {
			"type": "record",
			"key": "tid",
			"description": "An author-authoritative record of a published or forthcoming work, signed by the author's own repository.",
			"record": {
				"type": "object",
				"required": ["title", "createdAt"],
				"properties": {
					"title": {
						"type": "string",
						"minLength": 1,
						"maxLength": 512
					},
					"subtitle": {
						"type": "string",
						"maxLength": 512
					},
					"authors": {
						"type": "array",
						"description": "Credited contributors. The repo owner is presumed primary author unless roles say otherwise.",
						"items": {
							"type": "ref",
							"ref": "pub.byline.defs#contributor"
						}
					},
					"description": {
						"type": "string",
						"maxGraphemes": 5000,
						"description": "Blurb / marketing copy."
					},
					"cover": {
						"type": "blob",
						"accept": ["image/png", "image/jpeg", "image/webp"],
						"maxSize": 2000000,
						"description": "Cover image, stored as a blob in the author's own repository."
					},
					"status": {
						"type": "string",
						"knownValues": [
							"pub.byline.defs#published",
							"pub.byline.defs#forthcoming",
							"pub.byline.defs#draft",
							"pub.byline.defs#outOfPrint"
						]
					},
					"publicationDate": {
						"type": "string",
						"format": "datetime",
						"description": "Actual or planned first-publication date."
					},
					"language": {
						"type": "string",
						"description": "BCP-47 language tag, e.g. en, en-CA."
					},
					"series": {
						"type": "object",
						"description": "Series membership, if any. Book points at the series; the series record never points back.",
						"properties": {
							"ref": {
								"type": "ref",
								"ref": "com.atproto.repo.strongRef",
								"description": "strongRef to a pub.byline.series record."
							},
							"name": {
								"type": "string",
								"maxLength": 256,
								"description": "Series name, denormalized for display."
							},
							"position": {
								"type": "integer",
								"minimum": 1,
								"description": "Reading order within the series."
							}
						}
					},
					"editions": {
						"type": "array",
						"items": {
							"type": "ref",
							"ref": "pub.byline.defs#edition"
						}
					},
					"identifiers": {
						"type": "ref",
						"ref": "pub.byline.defs#identifiers"
					},
					"links": {
						"type": "array",
						"description": "Work-level links not tied to a specific edition.",
						"items": {
							"type": "ref",
							"ref": "pub.byline.defs#link"
						}
					},
					"tags": {
						"type": "array",
						"items": {
							"type": "string",
							"maxLength": 128,
							"maxGraphemes": 128
						},
						"description": "Freeform genres / descriptors."
					},
					"createdAt": {
						"type": "string",
						"format": "datetime"
					},
					"updatedAt": {
						"type": "string",
						"format": "datetime"
					}
				}
			}
		}
	}
}
