{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "restore-mapping-report.schema.json",
  "title": "RestoreMappingReport",
  "type": "object",
  "required": ["foundations"],
  "properties": {
    "foundations": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["type", "sourceId", "decision"],
        "properties": {
          "type": {
            "type": "string",
            "enum": ["assignmentFilter", "roleScopeTag", "notificationMessageTemplate"]
          },
          "sourceId": { "type": "string" },
          "sourceName": { "type": "string" },
          "decision": {
            "type": "string",
            "enum": ["mapped_existing", "created", "created_copy", "skipped", "failed"]
          },
          "targetId": { "type": ["string", "null"] },
          "targetName": { "type": ["string", "null"] },
          "reason": { "type": ["string", "null"] }
        },
        "additionalProperties": false
      }
    }
  },
  "additionalProperties": true
}
