{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://thesoftwarelens.com/saacip/0.1/schemas/inbox.schema.json",
  "$comment": "SaaCIP 0.1 (https://thesoftwarelens.com/saacip/). Licensed under the Apache License 2.0.",
  "title": "SaaCIP 0.1 Resident binding: inbox",
  "description": "200 response to GET <base>/inbox/: decisions and judgements not yet acknowledged, and whether the hirer asked for release.",
  "type": "object",
  "required": [
    "approvals",
    "outcomes",
    "release_requested"
  ],
  "properties": {
    "approvals": {
      "type": "array",
      "items": {
        "allOf": [
          {
            "$ref": "approval.schema.json"
          },
          {
            "properties": {
              "status": {
                "enum": [
                  "approved",
                  "rejected"
                ]
              }
            }
          }
        ]
      }
    },
    "outcomes": {
      "type": "array",
      "items": {
        "$ref": "outcome.schema.json"
      }
    },
    "release_requested": {
      "type": "boolean"
    }
  }
}
