{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://hsimc.tech/reality-registry/schemas/eperson-proposal.schema.json",
  "title": "HSIMC Stateless e-Person Address Proposal v0.2",
  "type": "object",
  "required": [
    "schema",
    "eperson_proposal_id",
    "eperson_id_proposal",
    "subject_reality_refs",
    "role_view",
    "state_resolution_policy",
    "authority_resolution",
    "lifecycle_resolution",
    "human_supervisor_resolution",
    "model_resolution",
    "privacy_boundary",
    "activation_authority",
    "state",
    "created_at"
  ],
  "properties": {
    "schema": {
      "const": "hsimc.eperson-proposal.v0.2"
    },
    "eperson_proposal_id": {
      "type": "string"
    },
    "eperson_id_proposal": {
      "type": "string"
    },
    "subject_reality_refs": {
      "type": "array",
      "minItems": 1
    },
    "work_ref": {
      "type": [
        "string",
        "null"
      ]
    },
    "role_view": {
      "enum": [
        "TRUSTEE",
        "AI_WORKER",
        "AI_EMPLOYEE",
        "TASK_SPECIALIST",
        "CUSTOM_WORK_ROLE"
      ]
    },
    "custom_role_label": {
      "type": [
        "string",
        "null"
      ]
    },
    "state_resolution_policy": {
      "const": "STATELESS_RESOLVE_EVERY_ACTION"
    },
    "authority_resolution": {
      "type": "object",
      "required": [
        "policy",
        "current_authority_persisted"
      ],
      "properties": {
        "policy": {
          "const": "RESOLVE_FROM_CURRENT_AUTHORITY_REFS_AT_ACTION_TIME"
        },
        "current_authority_persisted": {
          "const": false
        },
        "authority_refs": {
          "type": "array"
        }
      }
    },
    "lifecycle_resolution": {
      "type": "object",
      "required": [
        "policy",
        "current_lifecycle_persisted"
      ],
      "properties": {
        "policy": {
          "const": "RESOLVE_FROM_CURRENT_REALITY_EVENTS_AT_ACTION_TIME"
        },
        "current_lifecycle_persisted": {
          "const": false
        },
        "event_refs": {
          "type": "array"
        }
      }
    },
    "human_supervisor_resolution": {
      "type": "object",
      "required": [
        "policy"
      ],
      "properties": {
        "policy": {
          "const": "RESOLVE_PER_WORK_SCOPE"
        },
        "supervisor_refs": {
          "type": "array"
        }
      }
    },
    "model_resolution": {
      "type": "object",
      "required": [
        "policy"
      ],
      "properties": {
        "policy": {
          "const": "RESOLVE_CAPABILITY_PER_WORK_NOT_IDENTITY"
        },
        "model_binding_refs": {
          "type": "array"
        }
      }
    },
    "email_alias": {
      "type": "object",
      "required": [
        "state",
        "purpose",
        "private_personal_info_management"
      ],
      "properties": {
        "state": {
          "enum": [
            "NOT_REQUESTED",
            "ALIAS_PROPOSAL_NOT_PROVISIONED",
            "PROVISIONED"
          ]
        },
        "requested_alias": {
          "type": [
            "string",
            "null"
          ]
        },
        "purpose": {
          "const": "HSIMC_ID_BILLING_NOTIFICATION_ROLE_ROUTING_ONLY"
        },
        "private_personal_info_management": {
          "const": false
        }
      }
    },
    "capability_refs": {
      "type": "array"
    },
    "continuity_refs": {
      "type": "array"
    },
    "evidence_refs": {
      "type": "array"
    },
    "privacy_boundary": {
      "const": "NO_PRIVATE_PERSONAL_INFORMATION_MANAGEMENT"
    },
    "activation_authority": {
      "type": "string"
    },
    "state": {
      "const": "EPERSON_ADDRESS_PROPOSAL_NOT_ACTIVATED"
    },
    "created_at": {
      "type": "string"
    }
  }
}
