{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/krimskrams-xyz/json-schema/krimskrams-xyz-business-signal-schema.json",
  "title": "BusinessSignal",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/business-signal_krimskrams_xyz_openapi.json#/components/schemas/BusinessSignal",
  "properties": {
    "lei": {
      "type": "string",
      "title": "Lei"
    },
    "signal": {
      "type": "string",
      "enum": [
        "positive",
        "negative"
      ],
      "title": "Signal"
    },
    "lei_status": {
      "type": "string",
      "title": "Lei Status"
    },
    "entity_status": {
      "type": "string",
      "title": "Entity Status"
    },
    "legal_name": {
      "type": "string",
      "title": "Legal Name"
    },
    "legal_address": {
      "$ref": "#/$defs/LegalAddress"
    },
    "jurisdiction": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Jurisdiction"
    },
    "registration_authority_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Registration Authority Id"
    },
    "registration_authority_entity_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Registration Authority Entity Id"
    },
    "last_update": {
      "type": "string",
      "format": "date-time",
      "title": "Last Update"
    },
    "next_renewal": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Next Renewal"
    },
    "retrieved_at": {
      "type": "string",
      "format": "date-time",
      "title": "Retrieved At"
    },
    "observation_age_seconds": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Observation Age Seconds"
    },
    "served_from": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "owned_store",
            "live_source"
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "Served From"
    },
    "source": {
      "type": "string",
      "title": "Source",
      "default": "Global Legal Entity Identifier Foundation (GLEIF)"
    },
    "source_url": {
      "type": "string",
      "title": "Source Url"
    },
    "signal_basis": {
      "type": "string",
      "title": "Signal Basis",
      "default": "The signal is positive only when the GLEIF entity status is ACTIVE and the LEI registration status is ISSUED."
    },
    "limit": {
      "type": "string",
      "title": "Limit",
      "default": "This signal shows LEI record status. It does not prove current trading activity, solvency, or good standing in a national company register."
    }
  },
  "type": "object",
  "required": [
    "lei",
    "signal",
    "lei_status",
    "entity_status",
    "legal_name",
    "legal_address",
    "last_update",
    "retrieved_at",
    "source_url"
  ],
  "$defs": {
    "LegalAddress": {
      "properties": {
        "address_lines": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Address Lines"
        },
        "city": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "City"
        },
        "region": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Region"
        },
        "country": {
          "type": "string",
          "title": "Country"
        },
        "postal_code": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Postal Code"
        }
      },
      "type": "object",
      "required": [
        "address_lines",
        "country"
      ],
      "title": "LegalAddress"
    }
  }
}