{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://homie.rocks/schemas/brand-package-v1.json",
  "title": "Homie white-label brand package",
  "type": "object",
  "required": ["schemaVersion", "id", "version", "product", "identity", "colours", "logo", "touchIcon", "wording", "catalogue", "installer"],
  "properties": {
    "schemaVersion": { "const": 1 },
    "id": { "type": "string", "pattern": "^[a-z][a-z0-9-]{1,31}$" },
    "version": { "type": "integer", "minimum": 1 },
    "siteHost": { "type": "string" },
    "product": {
      "type": "object",
      "required": ["name", "tagline"],
      "properties": { "name": { "type": "string", "pattern": "^[A-Za-z][A-Za-z0-9 .'-]{0,47}$" }, "tagline": { "type": "string" } }
    },
    "identity": {
      "type": "object",
      "required": ["domain", "senderName", "senderEmail", "supportUrl", "catalogueUrl"],
      "properties": {
        "domain": { "type": "string" }, "senderName": { "type": "string", "pattern": "^[^\\r\\n]+$" },
        "senderEmail": { "type": "string" }, "supportUrl": { "type": "string" }, "catalogueUrl": { "type": "string" }
      }
    },
    "colours": {
      "type": "object", "required": ["ink", "accent", "paper"],
      "properties": { "ink": { "type": "string" }, "accent": { "type": "string" }, "paper": { "type": "string" } }
    },
    "logo": { "type": "string" },
    "touchIcon": { "type": "string" },
    "wording": {
      "type": "object", "required": ["setup", "phone", "tv", "website", "share", "emailSubject"],
      "properties": {
        "setup": { "type": "string" }, "phone": { "type": "string" }, "tv": { "type": "string" },
        "website": { "type": "string" }, "share": { "type": "string" }, "emailSubject": { "type": "string", "pattern": "^[^\\r\\n]+$" }
      }
    },
    "catalogue": { "type": "array", "minItems": 1, "items": { "type": "object", "required": ["id", "title", "href"], "properties": { "id": { "type": "string" }, "title": { "type": "string" }, "href": { "type": "string", "pattern": "^/(?!/)" } } } },
    "installer": {
      "type": "object", "required": ["bundleId", "packageName", "updateFeed"],
      "properties": { "bundleId": { "type": "string" }, "packageName": { "type": "string" }, "updateFeed": { "type": "string" } }
    }
  }
}
