{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "activityRow": {
      "properties": {
        "actionEventId": {
          "type": "integer"
        },
        "activity": {
          "ref": "tools.ozone.report.defs#reportActivityView",
          "type": "ref"
        },
        "createdAt": {
          "format": "datetime",
          "type": "string"
        },
        "createdBy": {
          "format": "did",
          "type": "string"
        },
        "event": {
          "ref": "tools.ozone.moderation.defs#modEventView",
          "type": "ref"
        },
        "id": {
          "type": "integer"
        },
        "reportId": {
          "type": "integer"
        },
        "source": {
          "enum": [
            "event",
            "activity"
          ],
          "type": "string"
        },
        "subject": {
          "type": "string"
        },
        "type": {
          "type": "string"
        }
      },
      "required": [
        "source",
        "id",
        "createdAt",
        "createdBy",
        "type"
      ],
      "type": "object"
    },
    "main": {
      "description": "Read authorized moderator events and report activity in one chronological history.",
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "cursor": {
              "type": "string"
            },
            "rows": {
              "items": {
                "ref": "#activityRow",
                "type": "ref"
              },
              "type": "array"
            }
          },
          "required": [
            "rows"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "createdAfter": {
            "description": "Inclusive UTC lower bound.",
            "format": "datetime",
            "type": "string"
          },
          "createdBefore": {
            "description": "Exclusive UTC upper bound.",
            "format": "datetime",
            "type": "string"
          },
          "cursor": {
            "maxLength": 512,
            "type": "string"
          },
          "limit": {
            "default": 50,
            "maximum": 100,
            "minimum": 1,
            "type": "integer"
          },
          "moderator": {
            "format": "did",
            "type": "string"
          },
          "types": {
            "items": {
              "type": "string"
            },
            "maxLength": 40,
            "type": "array"
          }
        },
        "required": [
          "moderator",
          "createdAfter",
          "createdBefore"
        ],
        "type": "params"
      },
      "type": "query"
    }
  },
  "id": "tools.ozone.report.queryModeratorActivity",
  "lexicon": 1
}
