{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://heartcortex.ai/schemas/1.0/peer.schema.json",
  "title": "peer",
  "type": "object",
  "required": [
    "id",
    "trust"
  ],
  "properties": {
    "id": {
      "type": "string",
      "x-heart-privacy": "public"
    },
    "trust": {
      "enum": [
        "pending",
        "trusted",
        "blocked"
      ],
      "x-heart-privacy": "public"
    },
    "clearance": {
      "$ref": "common.schema.json#/$defs/messageLevel",
      "x-heart-privacy": "internal"
    },
    "lastSeen": {
      "$ref": "common.schema.json#/$defs/timestamp",
      "x-heart-privacy": "internal"
    },
    "types": {
      "description": "The message types the inbox takes from this peer. Missing: any type. Messages stay data either way.",
      "type": "array",
      "maxItems": 64,
      "uniqueItems": true,
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 128
      },
      "x-heart-privacy": "internal"
    },
    "updatedAt": {
      "$ref": "common.schema.json#/$defs/timestamp",
      "x-heart-privacy": "internal"
    },
    "ext": {
      "$ref": "common.schema.json#/$defs/ext",
      "x-heart-privacy": "private"
    }
  }
}
