{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Mia Peters website catalog v1",
  "type": "object",
  "required": [
    "$schema",
    "schemaVersion",
    "language",
    "title",
    "contentStatus",
    "updatedAt",
    "siteUrl",
    "usageNotes",
    "author",
    "series",
    "books",
    "endorsements",
    "newsletter",
    "pages"
  ],
  "properties": {
    "$schema": {
      "type": "string"
    },
    "schemaVersion": {
      "const": "1.0.0"
    },
    "language": {
      "const": "de"
    },
    "title": {
      "type": "string"
    },
    "contentStatus": {
      "enum": [
        "editorial-draft",
        "published"
      ]
    },
    "updatedAt": {
      "type": "string",
      "format": "date"
    },
    "siteUrl": {
      "type": [
        "string",
        "null"
      ]
    },
    "usageNotes": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "author": {
      "type": "object",
      "required": [
        "id",
        "name",
        "positioning",
        "shortBio",
        "biography",
        "awards"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "positioning": {
          "type": "string"
        },
        "shortBio": {
          "type": "string"
        },
        "biography": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "awards": {
          "type": "array",
          "items": {
            "type": "object"
          }
        }
      }
    },
    "series": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "title",
          "url",
          "intro",
          "themes",
          "characters",
          "places",
          "faq",
          "seriesBible",
          "seriesBibleStatus",
          "books"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "intro": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "themes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "books": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "uniqueItems": true
          },
          "characters": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "name",
                "summary"
              ],
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "role": {
                  "type": "string"
                },
                "summary": {
                  "type": "string"
                }
              }
            }
          },
          "places": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "name",
                "kind",
                "summary",
                "bookVolumes"
              ],
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "kind": {
                  "enum": [
                    "fictional",
                    "real-region"
                  ]
                },
                "summary": {
                  "type": "string"
                },
                "bookVolumes": {
                  "type": "array",
                  "items": {
                    "type": "integer",
                    "minimum": 1
                  }
                }
              }
            }
          },
          "faq": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "question",
                "answer"
              ],
              "properties": {
                "question": {
                  "type": "string"
                },
                "answer": {
                  "type": "string"
                }
              }
            }
          },
          "seriesBible": {
            "type": [
              "object",
              "null"
            ]
          },
          "seriesBibleStatus": {
            "enum": [
              "not-provided",
              "draft",
              "published"
            ]
          }
        }
      }
    },
    "books": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "seriesId",
          "volume",
          "title",
          "slug",
          "url",
          "description",
          "status",
          "cover",
          "source",
          "publicationDate",
          "isbn",
          "audio",
          "formats"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "seriesId": {
            "type": "string"
          },
          "volume": {
            "type": "integer",
            "minimum": 1
          },
          "title": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "description": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "status": {
            "enum": [
              "available",
              "preorder"
            ]
          },
          "publicationDate": {
            "type": [
              "string",
              "null"
            ],
            "format": "date"
          },
          "isbn": {
            "type": [
              "string",
              "null"
            ]
          },
          "cover": {
            "type": "object",
            "required": [
              "url",
              "width",
              "height",
              "alt",
              "sourceUrl"
            ],
            "properties": {
              "url": {
                "type": "string"
              },
              "width": {
                "type": "integer"
              },
              "height": {
                "type": "integer"
              },
              "alt": {
                "type": "string"
              },
              "sourceUrl": {
                "type": "string"
              }
            }
          },
          "audio": {
            "type": [
              "object",
              "null"
            ],
            "required": [
              "status",
              "links",
              "sourceUrl",
              "checkedAt"
            ],
            "properties": {
              "status": {
                "const": "available"
              },
              "sourceUrl": {
                "type": "string"
              },
              "checkedAt": {
                "type": "string",
                "format": "date"
              },
              "links": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "provider",
                    "url",
                    "scope"
                  ],
                  "properties": {
                    "provider": {
                      "type": "string"
                    },
                    "url": {
                      "type": "string"
                    },
                    "scope": {
                      "enum": [
                        "book",
                        "series"
                      ]
                    }
                  }
                }
              }
            }
          },
          "formats": {
            "type": "object",
            "required": [
              "ebook",
              "audiobook",
              "print"
            ],
            "properties": {}
          },
          "source": {
            "type": "object",
            "required": [
              "url",
              "checkedAt"
            ],
            "properties": {
              "url": {
                "type": "string"
              },
              "checkedAt": {
                "type": "string",
                "format": "date"
              }
            }
          }
        }
      }
    },
    "endorsements": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "id",
          "quote",
          "name",
          "kind",
          "rating",
          "sourceUrl"
        ],
        "properties": {}
      }
    },
    "newsletter": {
      "type": "object",
      "required": [
        "name",
        "url",
        "bonus",
        "doubleOptIn",
        "confirmationPage",
        "successPage"
      ],
      "properties": {}
    },
    "pages": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "title",
          "url"
        ],
        "properties": {
          "title": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        }
      }
    }
  },
  "additionalProperties": false
}