{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Structured facts about legal identity, such as legal name, nationality and date of birth. Archive records such as contracts and legal evidence are kept in profile.legalRecords; the same fact being in both places is not duplication, and these facts can be kept without an evidence record.",
      "key": "literal:self",
      "record": {
        "properties": {
          "_meta": {
            "ref": "ai.newnal.mydata.defs#recordMeta",
            "type": "ref"
          },
          "data": {
            "closed": true,
            "refs": [
              "#section"
            ],
            "type": "union"
          }
        },
        "required": [
          "data",
          "_meta"
        ],
        "type": "object"
      },
      "type": "record"
    },
    "section": {
      "description": "Structured facts about legal identity, such as legal name, nationality and date of birth. Archive records such as contracts and legal evidence are kept in profile.legalRecords; the same fact being in both places is not duplication, and these facts can be kept without an evidence record.",
      "properties": {
        "birthDate": {
          "description": "The date of birth.",
          "ref": "ai.newnal.mydata.defs#date",
          "type": "ref"
        },
        "legalFamilyName": {
          "description": "The family name part of the legal name.",
          "maxGraphemes": 256,
          "maxLength": 2560,
          "type": "string"
        },
        "legalGivenName": {
          "description": "The given name part of the legal name.",
          "maxGraphemes": 256,
          "maxLength": 2560,
          "type": "string"
        },
        "legalName": {
          "description": "The full legal name, as written on official documents.",
          "maxGraphemes": 256,
          "maxLength": 2560,
          "type": "string"
        },
        "nationalities": {
          "description": "List of the countries of nationality or citizenship, as ISO 3166-1 alpha-2 codes (for example KR).",
          "items": {
            "description": "One item of the list of the countries of nationality or citizenship, as ISO 3166-1 alpha-2 codes (for example KR).",
            "maxGraphemes": 64,
            "maxLength": 640,
            "type": "string"
          },
          "maxLength": 100,
          "type": "array"
        }
      },
      "type": "object"
    }
  },
  "id": "ai.newnal.mydata.profileLegalIdentity",
  "lexicon": 1
}
