{
  "lexicon": 1,
  "id": "org.tangled.temp.focus.beginSession",
  "defs": {
    "main": {
      "type": "procedure",
      "description": "Activate focus mode. Returns the oldest unread work notification so the client can navigate to it.",
      "output": {
        "encoding": "application/json",
        "schema": {
          "type": "object",
          "properties": {
            "notificationId": {
              "type": "integer",
              "description": "ID of the first notification to address. Absent if the queue is empty."
            },
            "repoDid": {
              "type": "string",
              "format": "did",
              "description": "DID of the repository the item belongs to. Absent if the queue is empty."
            },
            "issueAt": {
              "type": "string",
              "format": "at-uri",
              "description": "AT-URI of the issue to navigate to, if the item is an issue."
            },
            "pullAt": {
              "type": "string",
              "format": "at-uri",
              "description": "AT-URI of the pull to navigate to, if the item is a pull."
            }
          }
        }
      },
      "errors": [
        {
          "name": "NoFocusItems",
          "description": "There are no unread work notifications to focus on."
        }
      ]
    }
  }
}
