{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/modoboa/json-schema/modoboa-paginated-message-list-schema.json",
  "title": "PaginatedMessageList",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/modoboa-amavis-api-openapi.yml#/components/schemas/PaginatedMessageList",
  "type": "object",
  "properties": {
    "count": {
      "type": "integer"
    },
    "first_index": {
      "type": "integer"
    },
    "last_index": {
      "type": "integer"
    },
    "prev_page": {
      "type": "integer"
    },
    "next_page": {
      "type": "integer"
    },
    "results": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/CompactMessage"
      }
    }
  },
  "required": [
    "count",
    "first_index",
    "last_index",
    "next_page",
    "prev_page",
    "results"
  ],
  "$defs": {
    "CompactMessage": {
      "type": "object",
      "properties": {
        "mailid": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "score": {
          "type": "string"
        },
        "to_address": {
          "type": "string"
        },
        "from_address": {
          "type": "string"
        },
        "subject": {
          "type": "string"
        },
        "datetime": {
          "type": "string",
          "format": "date-time"
        },
        "style": {
          "type": "string"
        }
      },
      "required": [
        "datetime",
        "from_address",
        "mailid",
        "score",
        "status",
        "subject",
        "to_address",
        "type"
      ]
    }
  }
}