{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://openinherit.org/v3/acknowledgement.json",
  "title": "Acknowledgement",
  "description": "Records that a person has acknowledged a role or entitlement in the estate",
  "type": "object",
  "required": [ "id", "entityType", "entityId", "personId", "acknowledgedAt" ],
  "propertyNames": {
    "pattern": "^(x-inherit-[a-z][a-z0-9-]*|[a-z][a-zA-Z0-9]*)$"
  },
  "properties": {
    "id": {
      "description": "Unique identifier",
      "type": "string",
      "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
      "format": "uuid"
    },
    "entityType": {
      "description": "The type of entity being acknowledged",
      "enum": [
        "bequest",
        "executor_appointment",
        "guardian_appointment",
        "other"
      ]
    },
    "entityId": {
      "description": "Reference to the entity being acknowledged",
      "type": "string",
      "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
      "format": "uuid"
    },
    "personId": {
      "description": "Person.id of the person acknowledging",
      "type": "string",
      "pattern": "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$",
      "format": "uuid"
    },
    "personIdDisplay": {
      "description": "Human-readable display name for the referenced person",
      "type": "string",
      "maxLength": 255
    },
    "acknowledgedAt": {
      "description": "When the acknowledgement was given",
      "examples": [ "2026-03-30T10:00:00Z" ],
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}",
      "format": "date-time"
    },
    "method": {
      "description": "How the acknowledgement was communicated",
      "enum": [ "in_app", "email", "verbal", "written", "other" ]
    },
    "notes": {
      "description": "Additional notes",
      "type": "string",
      "maxLength": 2000
    },
    "provenance": {
      "description": "Consolidated provenance metadata — how this entity was created, by whom, and whether a human has verified it",
      "$ref": "common/provenance.json"
    }
  },
  "patternProperties": {
    "^x-inherit-[a-z][a-z0-9-]{1,54}$": {
      "type": "object",
      "maxProperties": 50,
      "propertyNames": {
        "pattern": "^[a-zA-Z_][a-zA-Z0-9_]*$",
        "maxLength": 64
      }
    }
  },
  "unevaluatedProperties": false
}
