{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/normatia-com/json-schema/normatia-com-project-info-response-schema.json",
  "title": "ProjectInfoResponse",
  "description": "Respuesta del endpoint de información de proyecto",
  "x-generated": "2026-11-19",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/normatia-com-openapi.json#/components/schemas/ProjectInfoResponse",
  "properties": {
    "project_id": {
      "type": "string",
      "title": "Project Id"
    },
    "name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Name"
    },
    "is_active": {
      "type": "boolean",
      "title": "Is Active",
      "description": "Si es el proyecto activo del usuario en la web",
      "default": false
    },
    "project_description": {
      "type": "string",
      "title": "Project Description"
    },
    "geo_context": {
      "anyOf": [
        {
          "$ref": "#/$defs/ProjectInfoGeo"
        },
        {
          "type": "null"
        }
      ]
    },
    "collection_count": {
      "type": "integer",
      "title": "Collection Count"
    },
    "file_count": {
      "type": "integer",
      "title": "File Count"
    },
    "files": {
      "items": {
        "type": "string"
      },
      "type": "array",
      "title": "Files",
      "default": []
    },
    "collections": {
      "items": {
        "$ref": "#/$defs/ProjectInfoCollection"
      },
      "type": "array",
      "title": "Collections",
      "default": []
    },
    "unselected_collections": {
      "items": {
        "$ref": "#/$defs/ProjectInfoUnselectedCollection"
      },
      "type": "array",
      "title": "Unselected Collections",
      "default": []
    },
    "generated_documents": {
      "items": {
        "$ref": "#/$defs/ProjectInfoDocument"
      },
      "type": "array",
      "title": "Generated Documents",
      "default": []
    },
    "memory": {
      "items": {
        "$ref": "#/$defs/ProjectInfoMemoryFact"
      },
      "type": "array",
      "title": "Memory",
      "default": []
    },
    "calculations": {
      "items": {
        "$ref": "#/$defs/ProjectInfoCalculation"
      },
      "type": "array",
      "title": "Calculations",
      "default": []
    },
    "available_calculators": {
      "items": {
        "$ref": "#/$defs/ProjectInfoCalculator"
      },
      "type": "array",
      "title": "Available Calculators",
      "default": []
    }
  },
  "type": "object",
  "required": [
    "project_id",
    "project_description",
    "collection_count",
    "file_count"
  ],
  "$defs": {
    "ProjectInfoCalculation": {
      "properties": {
        "calculation_id": {
          "type": "string",
          "title": "Calculation Id"
        },
        "calculator_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Calculator Id"
        },
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Name"
        },
        "summary": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Summary"
        },
        "compliant": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Compliant"
        }
      },
      "type": "object",
      "required": [
        "calculation_id"
      ],
      "title": "ProjectInfoCalculation",
      "description": "Cálculo que el usuario guardó con las calculadoras de Normatia"
    },
    "ProjectInfoCalculator": {
      "properties": {
        "calculator_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Calculator Id"
        },
        "title": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Title"
        }
      },
      "type": "object",
      "title": "ProjectInfoCalculator",
      "description": "Calculadora disponible en Normatia (la rellena el usuario, no el agente)"
    },
    "ProjectInfoCollection": {
      "properties": {
        "slug": {
          "type": "string",
          "title": "Slug"
        },
        "title": {
          "type": "string",
          "title": "Title"
        },
        "scope": {
          "type": "string",
          "title": "Scope"
        },
        "scope_label": {
          "type": "string",
          "title": "Scope Label"
        },
        "version": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Version",
          "description": "Versión vigente de la normativa. Es la única respuesta válida a qué edición se aplica: no debe deducirse de otra fuente."
        }
      },
      "type": "object",
      "required": [
        "slug",
        "title",
        "scope",
        "scope_label"
      ],
      "title": "ProjectInfoCollection",
      "description": "Normativa aplicable al proyecto"
    },
    "ProjectInfoDocument": {
      "properties": {
        "titulo": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Titulo"
        },
        "tipo": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Tipo"
        },
        "version": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Version"
        }
      },
      "type": "object",
      "title": "ProjectInfoDocument",
      "description": "Documento generado por el asistente en el proyecto"
    },
    "ProjectInfoGeo": {
      "properties": {
        "geo_id": {
          "type": "string",
          "title": "Geo Id"
        },
        "name": {
          "type": "string",
          "title": "Name"
        },
        "level": {
          "type": "string",
          "title": "Level"
        },
        "ancestors": {
          "type": "string",
          "title": "Ancestors",
          "default": ""
        },
        "climate_zone": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Climate Zone"
        },
        "tech_data_summary": {
          "type": "string",
          "title": "Tech Data Summary",
          "default": ""
        }
      },
      "type": "object",
      "required": [
        "geo_id",
        "name",
        "level"
      ],
      "title": "ProjectInfoGeo",
      "description": "Contexto geográfico resumido para get_project_info"
    },
    "ProjectInfoMemoryFact": {
      "properties": {
        "key": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Key"
        },
        "label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Label"
        },
        "value": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Value"
        },
        "unit": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Unit"
        },
        "source": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Source"
        }
      },
      "type": "object",
      "title": "ProjectInfoMemoryFact",
      "description": "Dato que el usuario aportó sobre su obra (memoria del proyecto)"
    },
    "ProjectInfoUnselectedCollection": {
      "properties": {
        "slug": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Slug"
        },
        "title": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Title"
        },
        "scope": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Scope"
        }
      },
      "type": "object",
      "title": "ProjectInfoUnselectedCollection",
      "description": "Normativa aplicable al territorio que el proyecto NO tiene seleccionada"
    }
  }
}