{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Claim a report for review. Transitions status `open` → `underReview` atomically; if the report has already been claimed by another moderator, returns `AlreadyTriaged`. Writes a `reportTriaged` audit row. Requires the caller to be an active moderator.",
      "errors": [
        {
          "description": "Caller is not an active moderator.",
          "name": "Forbidden"
        },
        {
          "name": "NotFound"
        },
        {
          "description": "The report is no longer in the `open` state. Another moderator has claimed it or it has been resolved.",
          "name": "AlreadyTriaged"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "reportId": {
              "minimum": 1,
              "type": "integer"
            }
          },
          "required": [
            "reportId"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "auditEntryId": {
              "minimum": 1,
              "type": "integer"
            },
            "status": {
              "ref": "app.tempomusic.staff.defs#reportStatus",
              "type": "ref"
            }
          },
          "required": [
            "status",
            "auditEntryId"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "app.tempomusic.staff.triageReport",
  "lexicon": 1
}
