{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "LifeisLive · Lote de leads v1.0",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "version",
    "leads"
  ],
  "properties": {
    "version": {
      "const": "1.0"
    },
    "leads": {
      "type": "array",
      "minItems": 1,
      "maxItems": 100,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "empresa",
          "responsable"
        ],
        "properties": {
          "empresa": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1000
          },
          "responsable": {
            "type": "string",
            "minLength": 1,
            "maxLength": 1000
          },
          "cargo": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 1000
          },
          "web": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 1000
          },
          "email": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 1000
          },
          "observaciones": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 12000
          },
          "sector": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 1000
          },
          "subsector": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 1000
          },
          "facturacion_estimada": {
            "type": [
              "number",
              "null"
            ],
            "minimum": 0,
            "description": "Estimación en EUR. null si se desconoce; nunca confundir con el ingreso previsto de una oportunidad."
          },
          "linkedin": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 1000,
            "description": "Perfil personal https://www.linkedin.com/in/identificador. Se normalizan dominio regional, mayúsculas, barra final y parámetros."
          },
          "mensaje": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 12000
          },
          "estado": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "Sin contactar",
              "Solicitud enviada",
              "Conexión aceptada",
              "Mensaje enviado",
              "Seguimiento enviado",
              "Ha respondido",
              "Le interesa",
              "No le interesa",
              "",
              null
            ]
          },
          "fecha_solicitud_conexion": {
            "anyOf": [
              {
                "type": "string",
                "format": "date",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              {
                "type": "null"
              },
              {
                "const": ""
              }
            ]
          },
          "fecha_envio_mensaje": {
            "anyOf": [
              {
                "type": "string",
                "format": "date",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              {
                "type": "null"
              },
              {
                "const": ""
              }
            ]
          },
          "proximo_seguimiento": {
            "anyOf": [
              {
                "type": "string",
                "format": "date",
                "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
              },
              {
                "type": "null"
              },
              {
                "const": ""
              }
            ]
          },
          "fuente": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 12000
          }
        }
      }
    }
  }
}
