{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://hsimc.tech/reality-registry/schemas/eperson-role-view.schema.json",
  "title": "HSIMC e-Person Role View v0.1",
  "type": "object",
  "required": [
    "eperson_id",
    "work_ref",
    "role_view",
    "resolved_at",
    "authority_ref",
    "state"
  ],
  "properties": {
    "eperson_id": {
      "type": "string"
    },
    "work_ref": {
      "type": "string"
    },
    "role_view": {
      "enum": [
        "TRUSTEE",
        "AI_WORKER",
        "AI_EMPLOYEE",
        "TASK_SPECIALIST",
        "CUSTOM_WORK_ROLE"
      ]
    },
    "custom_role_label": {
      "type": [
        "string",
        "null"
      ]
    },
    "resolved_at": {
      "type": "string"
    },
    "expires_at": {
      "type": [
        "string",
        "null"
      ]
    },
    "authority_ref": {
      "type": "string"
    },
    "human_supervisor_ref": {
      "type": [
        "string",
        "null"
      ]
    },
    "model_binding_ref": {
      "type": [
        "string",
        "null"
      ]
    },
    "state": {
      "enum": [
        "COMPUTED_ROLE_VIEW",
        "DENIED",
        "EXPIRED",
        "REVOKED"
      ]
    }
  },
  "description": "Computed for one Work and time. It is not a permanent attribute of the e-Person address."
}
