{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/agentline-nz/json-schema/agentline-nz-email-summary-schema.json",
  "title": "EmailSummary",
  "x-generated": "2026-11-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/agentline-nz-api-openapi.json#/components/schemas/EmailSummary",
  "type": "object",
  "required": [
    "id",
    "direction",
    "from",
    "to",
    "subject",
    "snippet",
    "code",
    "status",
    "read",
    "hasAttachments",
    "createdAt"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "direction": {
      "type": "string",
      "enum": [
        "in",
        "out"
      ]
    },
    "from": {
      "type": "string"
    },
    "to": {
      "type": "string"
    },
    "subject": {
      "type": [
        "string",
        "null"
      ]
    },
    "snippet": {
      "type": [
        "string",
        "null"
      ],
      "description": "First 280 characters of the text body."
    },
    "code": {
      "type": [
        "string",
        "null"
      ],
      "description": "One-time code detected in the email, if any."
    },
    "status": {
      "type": "string"
    },
    "read": {
      "type": "boolean"
    },
    "hasAttachments": {
      "type": "boolean"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    }
  }
}