{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://sendfire.ai/record-schema/1.0.0/export-manifest.schema.json",
  "$comment": "Copyright (c) 2026 Sendfire Email Inc. Licensed under the MIT License; see LICENSE-MIT.md beside this file.",
  "title": "Sendfire Brand export manifest",
  "description": "manifest.json at the top of a Brand export: the record schema version, when the export was made, and every file in it.",
  "type": "object",
  "additionalProperties": false,
  "required": ["format", "schemaVersion", "recordFormat", "exportedAt", "brand", "files", "counts"],
  "properties": {
    "format": { "const": "sendfire.brand-export" },
    "schemaVersion": { "const": "1.0.0" },
    "recordFormat": { "const": "sendfire.brand-record" },
    "exportedAt": { "type": "string", "format": "date-time" },
    "brand": {
      "type": "object",
      "additionalProperties": false,
      "required": ["id", "name"],
      "properties": { "id": { "type": "string" }, "name": { "type": "string" } }
    },
    "files": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": ["path", "contents"],
        "properties": {
          "path": { "type": "string", "description": "Relative to the export folder." },
          "contents": { "enum": ["markdown", "record"] }
        }
      }
    },
    "counts": {
      "type": "object",
      "additionalProperties": false,
      "required": ["briefRevisions", "memories", "suggestions", "campaigns", "retros", "tests", "reports", "flowRetros", "reviews"],
      "properties": {
        "briefRevisions": { "type": "integer", "minimum": 0 },
        "memories": { "type": "integer", "minimum": 0 },
        "suggestions": { "type": "integer", "minimum": 0 },
        "campaigns": { "type": "integer", "minimum": 0 },
        "retros": { "type": "integer", "minimum": 0 },
        "tests": { "type": "integer", "minimum": 0 },
        "reports": { "type": "integer", "minimum": 0 },
        "flowRetros": { "type": "integer", "minimum": 0 },
        "reviews": { "type": "integer", "minimum": 0 }
      }
    }
  }
}
