{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "entry": {
      "description": "One person the user has a relationship with.",
      "properties": {
        "addresses": {
          "description": "List of the addresses related to the person.",
          "items": {
            "description": "One item of the list of the addresses related to the person.",
            "ref": "ai.newnal.mydata.defs#addressEntry",
            "type": "ref"
          },
          "maxLength": 100,
          "type": "array"
        },
        "birthDate": {
          "description": "The person's date of birth.",
          "ref": "ai.newnal.mydata.defs#date",
          "type": "ref"
        },
        "contactPoints": {
          "description": "List of the ways to contact the person.",
          "items": {
            "description": "One item of the list of the ways to contact the person.",
            "ref": "ai.newnal.mydata.defs#contactPoint",
            "type": "ref"
          },
          "maxLength": 100,
          "type": "array"
        },
        "name": {
          "description": "The name of the person the user has a relationship with.",
          "maxGraphemes": 256,
          "maxLength": 2560,
          "type": "string"
        },
        "notes": {
          "description": "An additional note.",
          "maxGraphemes": 3000,
          "maxLength": 30000,
          "type": "string"
        },
        "relationshipTypes": {
          "description": "List of the types of relationship with the person.",
          "items": {
            "description": "One item of the list of the types of relationship with the person.",
            "knownValues": [
              "spouse",
              "parent",
              "friend",
              "coworker",
              "mentor",
              "partner",
              "child",
              "sibling"
            ],
            "maxGraphemes": 64,
            "maxLength": 640,
            "type": "string"
          },
          "maxLength": 100,
          "type": "array"
        },
        "tags": {
          "description": "List of the tags for the meaning, traits or context the user gave to or adopted for the relationship with this person. A tag itself does not decide visibility or access rights: disclosure is decided by a separate user permission policy.",
          "items": {
            "description": "One item of the list of the tags for the meaning, traits or context the user gave to or adopted for the relationship with this person.",
            "knownValues": [
              "family",
              "work"
            ],
            "maxGraphemes": 64,
            "maxLength": 640,
            "type": "string"
          },
          "maxLength": 100,
          "type": "array"
        }
      },
      "type": "object"
    },
    "main": {
      "description": "People the user has a relationship with, such as family and acquaintances. These are other people's personal data — names, dates of birth, addresses and contact points — recorded by the user, not by them. A service or an agent is given only what its purpose needs: the relationship type is often enough, and identifying details are passed on only where the task cannot be done without them.",
      "key": "tid",
      "record": {
        "properties": {
          "_meta": {
            "ref": "ai.newnal.mydata.defs#recordMeta",
            "type": "ref"
          },
          "data": {
            "closed": true,
            "refs": [
              "#entry"
            ],
            "type": "union"
          }
        },
        "required": [
          "data",
          "_meta"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "id": "ai.newnal.mydata.relationshipsPeople",
  "lexicon": 1
}
