{
  "$defs": {
    "FilingKind": {
      "description": "Filing kind.",
      "oneOf": [
        {
          "enum": [
            "other"
          ],
          "type": "string"
        },
        {
          "const": "incorporation",
          "description": "Incorporation / formation.",
          "type": "string"
        },
        {
          "const": "amendment",
          "description": "Amendment to articles / charter / partnership agreement.",
          "type": "string"
        },
        {
          "const": "director_change",
          "description": "Director / officer change.",
          "type": "string"
        },
        {
          "const": "shareholder_list",
          "description": "Shareholder list (Gesellschafterliste §40 GmbHG).",
          "type": "string"
        },
        {
          "const": "annual_return",
          "description": "Annual confirmation / return.",
          "type": "string"
        },
        {
          "const": "annual_accounts",
          "description": "Annual accounts / financial statements.",
          "type": "string"
        },
        {
          "const": "tax_return",
          "description": "Tax return (corporate income).",
          "type": "string"
        },
        {
          "const": "vat_return",
          "description": "VAT return.",
          "type": "string"
        },
        {
          "const": "beneficial_ownership",
          "description": "Beneficial-ownership report (UBO/BOI).",
          "type": "string"
        },
        {
          "const": "ma_transaction",
          "description": "Merger / acquisition.",
          "type": "string"
        },
        {
          "const": "dissolution",
          "description": "Dissolution / liquidation.",
          "type": "string"
        },
        {
          "const": "shareholder_notification",
          "description": "Significant-shareholding notification (Stimmrechtsmitteilung).",
          "type": "string"
        },
        {
          "const": "insider_trading",
          "description": "Insider-trading notification (DG, BaFin).",
          "type": "string"
        },
        {
          "const": "ip_registration",
          "description": "Trademark / patent filing.",
          "type": "string"
        },
        {
          "const": "lksg_annual_report",
          "description": "LkSG annual report.",
          "type": "string"
        },
        {
          "const": "csrd_report",
          "description": "CSRD sustainability report.",
          "type": "string"
        }
      ]
    },
    "FilingStatus": {
      "description": "Filing lifecycle.",
      "oneOf": [
        {
          "enum": [
            "draft",
            "submitted",
            "acknowledged",
            "approved",
            "rejected",
            "withdrawn",
            "amendment_requested"
          ],
          "type": "string"
        },
        {
          "const": "late",
          "description": "Late (filed after statutory deadline).",
          "type": "string"
        }
      ]
    },
    "IsoCountry": {
      "description": "ISO 3166-1 alpha-2 country code.",
      "pattern": "^[A-Z]{2}$",
      "type": "string"
    },
    "IsoCurrency": {
      "description": "ISO 4217 currency code.",
      "pattern": "^[A-Z]{3}$",
      "type": "string"
    },
    "IsoDate": {
      "description": "ISO 8601 date (YYYY-MM-DD).",
      "format": "date",
      "type": "string"
    },
    "PathRef": {
      "description": "Path-based cross-reference relative to .corpospec/ root.\nPattern: `^[a-z0-9_-]+(/[a-z0-9_.-]+)+$`",
      "pattern": "^[a-z0-9_-]+(/[a-z0-9_.-]+)+$",
      "type": "string"
    },
    "Registry": {
      "description": "Registry / authority.",
      "oneOf": [
        {
          "enum": [
            "other"
          ],
          "type": "string"
        },
        {
          "const": "de_handelsregister",
          "description": "DE Handelsregister (Amtsgericht commercial register).",
          "type": "string"
        },
        {
          "const": "de_transparenzregister",
          "description": "DE Transparenzregister (GwG §20 — UBO).",
          "type": "string"
        },
        {
          "const": "de_unternehmensregister",
          "description": "DE Unternehmensregister (annual accounts).",
          "type": "string"
        },
        {
          "const": "de_finanzamt",
          "description": "DE Finanzamt.",
          "type": "string"
        },
        {
          "const": "de_ba_fin",
          "description": "DE BaFin (financial supervisory).",
          "type": "string"
        },
        {
          "const": "uk_companies_house",
          "description": "UK Companies House.",
          "type": "string"
        },
        {
          "const": "uk_hmrc",
          "description": "UK HMRC.",
          "type": "string"
        },
        {
          "const": "uk_fca",
          "description": "UK FCA.",
          "type": "string"
        },
        {
          "const": "us_sec_of_state",
          "description": "US Secretary of State.",
          "type": "string"
        },
        {
          "const": "us_irs",
          "description": "US IRS.",
          "type": "string"
        },
        {
          "const": "us_fincen",
          "description": "US FinCEN (BOI under CTA).",
          "type": "string"
        },
        {
          "const": "us_sec",
          "description": "US Securities and Exchange Commission.",
          "type": "string"
        },
        {
          "const": "us_state_tax_authority",
          "description": "US State Tax Authority.",
          "type": "string"
        },
        {
          "const": "fr_rcs",
          "description": "FR Registre du Commerce et des Sociétés.",
          "type": "string"
        },
        {
          "const": "fr_rbe",
          "description": "FR INPI Registre des Bénéficiaires Effectifs.",
          "type": "string"
        },
        {
          "const": "nl_kvk",
          "description": "NL Kamer van Koophandel.",
          "type": "string"
        },
        {
          "const": "at_firmenbuch",
          "description": "AT Firmenbuch.",
          "type": "string"
        },
        {
          "const": "ch_handelsregister",
          "description": "CH Handelsregister (Zefix).",
          "type": "string"
        },
        {
          "const": "eu_euipo",
          "description": "EU Trademark Office (EUIPO).",
          "type": "string"
        },
        {
          "const": "wipo",
          "description": "World IP Organization.",
          "type": "string"
        },
        {
          "const": "eu_dpa",
          "description": "EU Data Protection Authorities portal.",
          "type": "string"
        },
        {
          "const": "de_bafa",
          "description": "LkSG BAFA (Bundesamt für Wirtschaft und Ausfuhrkontrolle).",
          "type": "string"
        }
      ]
    }
  },
  "$id": "https://corpospec.com/schemas/v0.16.0/regulatory-filing.schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "description": "Regulatory filing record.",
  "properties": {
    "accession_number": {
      "description": "Registry's accession / file number after acknowledgement.",
      "type": [
        "string",
        "null"
      ]
    },
    "acknowledgement_ref": {
      "anyOf": [
        {
          "$ref": "#/$defs/PathRef"
        },
        {
          "type": "null"
        }
      ],
      "description": "PathRef to the acknowledgement / receipt from the registry."
    },
    "artefact_ref": {
      "$ref": "#/$defs/PathRef",
      "description": "PathRef to the filed artefact."
    },
    "counsel_ref": {
      "anyOf": [
        {
          "$ref": "#/$defs/PathRef"
        },
        {
          "type": "null"
        }
      ],
      "description": "PathRef to legal counsel who advised on the filing."
    },
    "effective_on": {
      "$ref": "#/$defs/IsoDate",
      "description": "Effective date (often filed_on, sometimes future-dated)."
    },
    "entity": {
      "$ref": "#/$defs/PathRef"
    },
    "fee_amount": {
      "format": "double",
      "type": [
        "number",
        "null"
      ]
    },
    "fee_currency": {
      "anyOf": [
        {
          "$ref": "#/$defs/IsoCurrency"
        },
        {
          "type": "null"
        }
      ],
      "description": "Filing fee paid (in currency of jurisdiction)."
    },
    "filed_on": {
      "$ref": "#/$defs/IsoDate"
    },
    "id": {
      "$ref": "#/$defs/PathRef"
    },
    "jurisdiction": {
      "$ref": "#/$defs/IsoCountry"
    },
    "kind": {
      "$ref": "#/$defs/FilingKind"
    },
    "owner": {
      "$ref": "#/$defs/PathRef",
      "description": "Owner / responsible party internal to the company."
    },
    "registry": {
      "$ref": "#/$defs/Registry"
    },
    "retention_until": {
      "$ref": "#/$defs/IsoDate",
      "description": "Retention until 10 years (HGB §257 / equivalent)."
    },
    "status": {
      "$ref": "#/$defs/FilingStatus"
    },
    "statutory_deadline": {
      "$ref": "#/$defs/IsoDate",
      "description": "Statutory deadline this filing was made against."
    }
  },
  "required": [
    "id",
    "entity",
    "registry",
    "jurisdiction",
    "kind",
    "status",
    "filed_on",
    "effective_on",
    "statutory_deadline",
    "artefact_ref",
    "owner",
    "retention_until"
  ],
  "title": "RegulatoryFiling",
  "type": "object",
  "x-corpospec-pillar": "legal"
}