{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "addressEntry": {
      "description": "An address item that groups a purpose label, a postal address, tags and whether it is the primary one.",
      "properties": {
        "address": {
          "description": "The postal address.",
          "ref": "ai.newnal.mydata.defs#postalAddress",
          "type": "ref"
        },
        "coordinates": {
          "description": "The coordinates of this address.",
          "ref": "ai.newnal.mydata.defs#geoCoordinates",
          "type": "ref"
        },
        "label": {
          "description": "A label for what the address is used as.",
          "knownValues": [
            "home",
            "work",
            "mailing",
            "shipping",
            "billing"
          ],
          "maxGraphemes": 64,
          "maxLength": 640,
          "type": "string"
        },
        "primary": {
          "description": "Whether this is the item to use first among items of the same kind.",
          "type": "boolean"
        },
        "tags": {
          "description": "List of the tags for the meaning, traits or context the user gave to or adopted for this address. 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 this address.",
            "knownValues": [
              "home",
              "shipping",
              "billing",
              "official_mail"
            ],
            "maxGraphemes": 64,
            "maxLength": 640,
            "type": "string"
          },
          "maxLength": 100,
          "type": "array"
        }
      },
      "type": "object"
    },
    "archiveEntry": {
      "description": "One archive record held in an archive section. It is made of a subtype, a title, an issuer, a time, tags and open content.",
      "properties": {
        "content": {
          "description": "An open object for storage. It holds content that differs from record to record, such as text, JSON and nested blobs. A file or document is uploaded as a blob and placed inside content as a blob object (`$type` `blob`); a bare CID link (`$link`) does not attach the blob to the record. The top-level content itself cannot be a CID link (`$link`) or a blob. Checked by the MyData domain validator, not by the Lexicon.",
          "type": "unknown"
        },
        "issuer": {
          "description": "The issuer or provider of the record. self when the user wrote it.",
          "knownValues": [
            "self"
          ],
          "maxGraphemes": 64,
          "maxLength": 640,
          "type": "string"
        },
        "recordType": {
          "description": "The subtype of the archive record.",
          "maxGraphemes": 64,
          "maxLength": 640,
          "type": "string"
        },
        "tags": {
          "description": "List of the tags for the meaning, traits or context the user gave to or adopted for this record. 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 this record.",
            "knownValues": [
              "housing",
              "tax",
              "immigration",
              "family",
              "health",
              "finance",
              "business",
              "travel"
            ],
            "maxGraphemes": 64,
            "maxLength": 640,
            "type": "string"
          },
          "maxLength": 100,
          "type": "array"
        },
        "time": {
          "closed": true,
          "description": "The point in time the record was issued or written, or the period it covers.",
          "refs": [
            "ai.newnal.mydata.defs#instantTime",
            "ai.newnal.mydata.defs#intervalTime"
          ],
          "type": "union"
        },
        "title": {
          "description": "The title of the record.",
          "maxGraphemes": 256,
          "maxLength": 2560,
          "type": "string"
        }
      },
      "type": "object"
    },
    "coding": {
      "description": "A code from a standard classification, given next to the free-text value it classifies: the code system, the code and its display name.",
      "properties": {
        "code": {
          "description": "The code in that code system.",
          "maxGraphemes": 64,
          "maxLength": 640,
          "type": "string"
        },
        "display": {
          "description": "The human-readable name of the code in that code system.",
          "maxGraphemes": 256,
          "maxLength": 2560,
          "type": "string"
        },
        "system": {
          "description": "The code system the code belongs to, as its URI or well-known name (for example http://snomed.info/sct, ICD-10, LOINC, RxNorm, ATC, ISCO-08, ISCED 2011).",
          "maxGraphemes": 256,
          "maxLength": 2560,
          "type": "string"
        }
      },
      "type": "object"
    },
    "contactPoint": {
      "description": "An item for one contact point, such as an email address, a phone number or an account.",
      "properties": {
        "identifier": {
          "description": "The actual identifier of the contact point.",
          "maxGraphemes": 256,
          "maxLength": 2560,
          "type": "string"
        },
        "identifierKind": {
          "description": "The kind of identifier, telling whether it is an address or an account handle.",
          "knownValues": [
            "address",
            "handle",
            "number"
          ],
          "maxGraphemes": 64,
          "maxLength": 640,
          "type": "string"
        },
        "label": {
          "description": "A display name for the contact point.",
          "maxGraphemes": 256,
          "maxLength": 2560,
          "type": "string"
        },
        "primary": {
          "description": "Whether this is the item to use first among items of the same kind.",
          "type": "boolean"
        },
        "provider": {
          "description": "The provider of the contact point, such as a mail service or a carrier.",
          "maxGraphemes": 256,
          "maxLength": 2560,
          "type": "string"
        },
        "tags": {
          "description": "List of the tags for the meaning, traits or context the user gave to or adopted for this contact point. 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 this contact point.",
            "knownValues": [
              "personal",
              "work",
              "billing"
            ],
            "maxGraphemes": 64,
            "maxLength": 640,
            "type": "string"
          },
          "maxLength": 100,
          "type": "array"
        },
        "type": {
          "description": "The type of contact point, such as email, phone or messaging.",
          "knownValues": [
            "email",
            "phone",
            "messaging",
            "social_account",
            "did",
            "wallet"
          ],
          "maxGraphemes": 64,
          "maxLength": 640,
          "type": "string"
        },
        "uri": {
          "description": "A URI form of the contact point, such as a mailto: or tel: URI or a profile URL.",
          "format": "uri",
          "type": "string"
        }
      },
      "type": "object"
    },
    "date": {
      "description": "A calendar date in YYYY-MM-DD form. Checked by the MyData domain validator, not by the Lexicon.",
      "maxLength": 10,
      "type": "string"
    },
    "decimal": {
      "description": "A canonical decimal string with no unnecessary leading zeros, no trailing zeros in the fraction, no exponent and no plus sign. `-0` is not allowed. Grammar `^(?!-0$)-?(0|[1-9][0-9]*)(\\.[0-9]*[1-9])?$`. Checked by the MyData domain validator, not by the Lexicon.",
      "maxLength": 64,
      "type": "string"
    },
    "geoCoordinates": {
      "description": "A point given as WGS 84 latitude and longitude (decimal degrees) with an accuracy radius. Latitude and longitude are present together or absent together, and the accuracy cannot be present alone. The ranges and the pairing are checked by the MyData domain validator, not by the Lexicon.",
      "properties": {
        "accuracy": {
          "description": "The accuracy radius of the coordinates (metres). It means the actual position is within this distance of the coordinates; for coordinates that stand for an area, such as the representative point of an administrative area, write the approximate radius of that area. Must be 0 or greater. When absent, the accuracy is unknown (it does not mean an exact point).",
          "ref": "ai.newnal.mydata.defs#decimal",
          "type": "ref"
        },
        "latitude": {
          "description": "Latitude (decimal degrees, north positive). The range is from -90 to 90 (both ends inclusive).",
          "ref": "ai.newnal.mydata.defs#decimal",
          "type": "ref"
        },
        "longitude": {
          "description": "Longitude (decimal degrees, east positive). The range is from -180 to 180 (both ends inclusive).",
          "ref": "ai.newnal.mydata.defs#decimal",
          "type": "ref"
        }
      },
      "type": "object"
    },
    "instantTime": {
      "description": "The time union variant for a single point in time.",
      "properties": {
        "pointAt": {
          "description": "The date and time of the point in time.",
          "format": "datetime",
          "type": "string"
        },
        "precision": {
          "description": "The precision of the time value.",
          "knownValues": [
            "minute",
            "day",
            "month",
            "year"
          ],
          "maxGraphemes": 64,
          "maxLength": 640,
          "type": "string"
        },
        "timezone": {
          "description": "The IANA time zone name (for example Asia/Seoul).",
          "maxGraphemes": 64,
          "maxLength": 640,
          "type": "string"
        }
      },
      "required": [
        "pointAt"
      ],
      "type": "object"
    },
    "intervalTime": {
      "description": "The time union variant for a period from a start time to an end time.",
      "properties": {
        "endAt": {
          "description": "The time the period ends. Omit the key when the period is ongoing or the end time is not stored.",
          "format": "datetime",
          "type": "string"
        },
        "precision": {
          "description": "The precision of the time value.",
          "knownValues": [
            "minute",
            "day",
            "month",
            "year"
          ],
          "maxGraphemes": 64,
          "maxLength": 640,
          "type": "string"
        },
        "startAt": {
          "description": "The date and time the period starts.",
          "format": "datetime",
          "type": "string"
        },
        "timezone": {
          "description": "The IANA time zone name (for example Asia/Seoul).",
          "maxGraphemes": 64,
          "maxLength": 640,
          "type": "string"
        }
      },
      "required": [
        "startAt"
      ],
      "type": "object"
    },
    "localTime": {
      "description": "A time of day in 24-hour HH:MM form. Grammar `^([01][0-9]|2[0-3]):[0-5][0-9]$`. Checked by the MyData domain validator, not by the Lexicon.",
      "maxLength": 5,
      "type": "string"
    },
    "measuredAmount": {
      "description": "A measured quantity, given as an amount and a unit.",
      "properties": {
        "amount": {
          "description": "The measured amount.",
          "ref": "ai.newnal.mydata.defs#decimal",
          "type": "ref"
        },
        "unit": {
          "description": "The unit of measurement.",
          "knownValues": [
            "cm",
            "kg",
            "g"
          ],
          "maxGraphemes": 64,
          "maxLength": 640,
          "type": "string"
        }
      },
      "type": "object"
    },
    "money": {
      "description": "An amount of money, given as a currency and an amount.",
      "properties": {
        "amount": {
          "description": "The amount of money.",
          "ref": "ai.newnal.mydata.defs#decimal",
          "type": "ref"
        },
        "currency": {
          "description": "The currency of the amount, as an ISO 4217 code (for example KRW).",
          "maxGraphemes": 64,
          "maxLength": 640,
          "type": "string"
        }
      },
      "type": "object"
    },
    "moneyRange": {
      "description": "A money range given as a currency and minimum and maximum amounts. When both the minimum and the maximum are present, the minimum is at most the maximum: checked by the MyData domain validator, not by the Lexicon.",
      "properties": {
        "currency": {
          "description": "The currency of the amount, as an ISO 4217 code (for example KRW).",
          "maxGraphemes": 64,
          "maxLength": 640,
          "type": "string"
        },
        "max": {
          "description": "The upper bound of the range. When min is also present, it cannot be less than min.",
          "ref": "ai.newnal.mydata.defs#decimal",
          "type": "ref"
        },
        "min": {
          "description": "The lower bound of the range. When max is also present, it cannot be greater than max.",
          "ref": "ai.newnal.mydata.defs#decimal",
          "type": "ref"
        }
      },
      "type": "object"
    },
    "postalAddress": {
      "description": "A postal address made of a street address, city and administrative area, postal code and country.",
      "properties": {
        "adminArea": {
          "description": "The first-level administrative area below the country.",
          "maxGraphemes": 256,
          "maxLength": 2560,
          "type": "string"
        },
        "country": {
          "description": "The country, as an ISO 3166-1 alpha-2 code (for example KR).",
          "maxGraphemes": 64,
          "maxLength": 640,
          "type": "string"
        },
        "locality": {
          "description": "The city or locality of the address.",
          "maxGraphemes": 256,
          "maxLength": 2560,
          "type": "string"
        },
        "postalCode": {
          "description": "The postal code.",
          "maxGraphemes": 256,
          "maxLength": 2560,
          "type": "string"
        },
        "streetAddress": {
          "description": "The street address, including the street name, building number and the like.",
          "maxGraphemes": 256,
          "maxLength": 2560,
          "type": "string"
        }
      },
      "type": "object"
    },
    "recordMeta": {
      "properties": {
        "createdAt": {
          "description": "The time this record was first created. The first value is kept when the record is updated.",
          "format": "datetime",
          "type": "string"
        }
      },
      "required": [
        "createdAt"
      ],
      "type": "object"
    },
    "weekday": {
      "description": "The weekday code a recurring time window applies to.",
      "enum": [
        "mon",
        "tue",
        "wed",
        "thu",
        "fri",
        "sat",
        "sun"
      ],
      "type": "string"
    }
  },
  "description": "The shared defs of the mydata-core Lexicons.",
  "id": "ai.newnal.mydata.defs",
  "lexicon": 1
}
