{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/mentio-dev/json-schema/mentio-dev-analytics-summary-schema.json",
  "title": "AnalyticsSummary",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/mentio-dev-analytics-api-openapi.yml#/components/schemas/AnalyticsSummary",
  "type": "object",
  "properties": {
    "window": {
      "type": "object",
      "properties": {
        "from": {
          "type": "string",
          "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
          "description": "First day, inclusive."
        },
        "to": {
          "type": "string",
          "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
          "description": "Last day, inclusive."
        },
        "days": {
          "type": "integer",
          "minimum": 0,
          "description": "Length of the window in days."
        },
        "timezone": {
          "type": "string",
          "description": "IANA zone the days were cut in."
        }
      },
      "required": [
        "from",
        "to",
        "days",
        "timezone"
      ],
      "description": "The window the report covers."
    },
    "matched": {
      "type": "integer",
      "minimum": 0,
      "description": "Every match in the window, relevant or not: the number usage counts."
    },
    "relevant": {
      "type": "integer",
      "minimum": 0,
      "description": "Matches scored at or above the relevance threshold."
    },
    "posts": {
      "type": "integer",
      "minimum": 0,
      "description": "Distinct posts behind the matches: a post matching two keywords is two matches, one post."
    },
    "people": {
      "type": "integer",
      "minimum": 0,
      "description": "Distinct authors behind the matches."
    },
    "sentiment": {
      "type": "object",
      "properties": {
        "positive": {
          "type": "integer",
          "minimum": 0,
          "description": "Classified positive."
        },
        "neutral": {
          "type": "integer",
          "minimum": 0,
          "description": "Classified neutral."
        },
        "negative": {
          "type": "integer",
          "minimum": 0,
          "description": "Classified negative."
        },
        "unclassified": {
          "type": "integer",
          "minimum": 0,
          "description": "Not scored: still queued, or the classifier failed on it."
        }
      },
      "required": [
        "positive",
        "neutral",
        "negative",
        "unclassified"
      ],
      "description": "Matched mentions by classifier sentiment."
    },
    "buyIntent": {
      "type": "integer",
      "minimum": 0,
      "description": "Matches carrying the buy_intent intent."
    },
    "questions": {
      "type": "integer",
      "minimum": 0,
      "description": "Matches carrying the question intent."
    },
    "reach": {
      "type": "object",
      "properties": {
        "followers": {
          "type": "integer",
          "minimum": 0,
          "description": "Followers summed over the distinct authors whose count is known: an estimate of the feeds the posts landed in."
        },
        "people": {
          "type": "integer",
          "minimum": 0,
          "description": "How many of `people` have a known follower count."
        }
      },
      "required": [
        "followers",
        "people"
      ],
      "description": "Estimated reach."
    },
    "triage": {
      "type": "object",
      "properties": {
        "open": {
          "type": "integer",
          "minimum": 0,
          "description": "Status open."
        },
        "ignored": {
          "type": "integer",
          "minimum": 0,
          "description": "Status ignored."
        },
        "done": {
          "type": "integer",
          "minimum": 0,
          "description": "Status done."
        },
        "waiting": {
          "type": "integer",
          "minimum": 0,
          "description": "Relevant, still open, and matched more than 24 hours ago."
        },
        "handledRate": {
          "type": [
            "number",
            "null"
          ],
          "description": "done divided by relevant, 0 to 1; null when nothing was relevant."
        },
        "medianTimeToDoneMs": {
          "type": [
            "number",
            "null"
          ],
          "description": "Median milliseconds from match to done; null when nothing was done."
        }
      },
      "required": [
        "open",
        "ignored",
        "done",
        "waiting",
        "handledRate",
        "medianTimeToDoneMs"
      ],
      "description": "Where the matches stand in your inbox."
    },
    "previous": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "matched": {
          "type": "integer",
          "minimum": 0,
          "description": "Every match in the window, relevant or not: the number usage counts."
        },
        "relevant": {
          "type": "integer",
          "minimum": 0,
          "description": "Matches scored at or above the relevance threshold."
        },
        "posts": {
          "type": "integer",
          "minimum": 0,
          "description": "Distinct posts behind the matches: a post matching two keywords is two matches, one post."
        },
        "people": {
          "type": "integer",
          "minimum": 0,
          "description": "Distinct authors behind the matches."
        },
        "sentiment": {
          "type": "object",
          "properties": {
            "positive": {
              "type": "integer",
              "minimum": 0,
              "description": "Classified positive."
            },
            "neutral": {
              "type": "integer",
              "minimum": 0,
              "description": "Classified neutral."
            },
            "negative": {
              "type": "integer",
              "minimum": 0,
              "description": "Classified negative."
            },
            "unclassified": {
              "type": "integer",
              "minimum": 0,
              "description": "Not scored: still queued, or the classifier failed on it."
            }
          },
          "required": [
            "positive",
            "neutral",
            "negative",
            "unclassified"
          ],
          "description": "Matched mentions by classifier sentiment."
        },
        "buyIntent": {
          "type": "integer",
          "minimum": 0,
          "description": "Matches carrying the buy_intent intent."
        },
        "questions": {
          "type": "integer",
          "minimum": 0,
          "description": "Matches carrying the question intent."
        },
        "reach": {
          "type": "object",
          "properties": {
            "followers": {
              "type": "integer",
              "minimum": 0,
              "description": "Followers summed over the distinct authors whose count is known: an estimate of the feeds the posts landed in."
            },
            "people": {
              "type": "integer",
              "minimum": 0,
              "description": "How many of `people` have a known follower count."
            }
          },
          "required": [
            "followers",
            "people"
          ],
          "description": "Estimated reach."
        },
        "triage": {
          "type": "object",
          "properties": {
            "open": {
              "type": "integer",
              "minimum": 0,
              "description": "Status open."
            },
            "ignored": {
              "type": "integer",
              "minimum": 0,
              "description": "Status ignored."
            },
            "done": {
              "type": "integer",
              "minimum": 0,
              "description": "Status done."
            },
            "waiting": {
              "type": "integer",
              "minimum": 0,
              "description": "Relevant, still open, and matched more than 24 hours ago."
            },
            "handledRate": {
              "type": [
                "number",
                "null"
              ],
              "description": "done divided by relevant, 0 to 1; null when nothing was relevant."
            },
            "medianTimeToDoneMs": {
              "type": [
                "number",
                "null"
              ],
              "description": "Median milliseconds from match to done; null when nothing was done."
            }
          },
          "required": [
            "open",
            "ignored",
            "done",
            "waiting",
            "handledRate",
            "medianTimeToDoneMs"
          ],
          "description": "Where the matches stand in your inbox."
        }
      },
      "required": [
        "matched",
        "relevant",
        "posts",
        "people",
        "sentiment",
        "buyIntent",
        "questions",
        "reach",
        "triage"
      ],
      "description": "The same counts over the period of the same length right before the window; null unless compare=true."
    }
  },
  "required": [
    "window",
    "matched",
    "relevant",
    "posts",
    "people",
    "sentiment",
    "buyIntent",
    "questions",
    "reach",
    "triage",
    "previous"
  ]
}