{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/mencoro-com/json-schema/mencoro-com-project-resource-schema.json",
  "title": "ProjectResource",
  "description": "A project and its headline metrics",
  "x-generated": "2026-11-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/mencoro-com-openapi.json#/components/schemas/ProjectResource",
  "required": [
    "id",
    "name",
    "status",
    "createdAt",
    "trackedQueryCount"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "name": {
      "type": "string"
    },
    "status": {
      "type": "string",
      "enum": [
        "active",
        "archived"
      ]
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "trackedQueryCount": {
      "description": "Number of tracked queries in the project",
      "type": "integer"
    },
    "avgSerpPosition": {
      "description": "Average position in traditional search results. Null when unknown.",
      "type": [
        "number",
        "null"
      ],
      "format": "float"
    },
    "avgShoppingPosition": {
      "description": "Average position in shopping results. Null when unknown.",
      "type": [
        "number",
        "null"
      ],
      "format": "float"
    },
    "avgMentionPosition": {
      "description": "Average position of the brand mention inside AI answers. Null when unknown.",
      "type": [
        "number",
        "null"
      ],
      "format": "float"
    },
    "avgLinkPosition": {
      "description": "Average position of a cited link to the brand. Null when unknown.",
      "type": [
        "number",
        "null"
      ],
      "format": "float"
    },
    "mentionRate": {
      "description": "Share of checks where the brand was mentioned. Null when unknown.",
      "type": [
        "integer",
        "null"
      ]
    },
    "serpRate": {
      "type": [
        "integer",
        "null"
      ]
    },
    "shoppingRate": {
      "type": [
        "integer",
        "null"
      ]
    },
    "positivityIndex": {
      "description": "Sentiment balance of the brand's mentions. Null when unknown.",
      "type": [
        "integer",
        "null"
      ]
    },
    "shareOfVoice": {
      "description": "Share of voice against the tracked competitors. Null when unknown.",
      "type": [
        "number",
        "null"
      ],
      "format": "float"
    },
    "serpPositionStability": {
      "type": [
        "number",
        "null"
      ],
      "format": "float"
    },
    "shoppingPositionStability": {
      "type": [
        "number",
        "null"
      ],
      "format": "float"
    },
    "lastRankDetectedAt": {
      "description": "When a rank was last detected for this project.",
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    }
  },
  "type": "object"
}