{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "externalRef": {
      "description": "One external-provider identity for `sameAs` reconciliation.",
      "properties": {
        "id": {
          "description": "The raw external id, in that provider's own shape (e.g. a v4-UUID GERS id). Not regex-enforced — a provider's schema is not ours to constrain.",
          "type": "string"
        },
        "source": {
          "knownValues": [
            "overture-gers",
            "fsq"
          ],
          "type": "string"
        }
      },
      "required": [
        "source",
        "id"
      ],
      "type": "object"
    },
    "main": {
      "description": "`\"key\": \"any\"` (not `tid`): seed rkeys are the deterministic `\"c\" + base32(sha256(provider_id|stable_key))[..24]` — convergence depends on the rkey being a function of identity, so the key form must permit it. `addCommonsPlace`-created entries use a TID, which `any` also permits.",
      "key": "any",
      "record": {
        "properties": {
          "address": {
            "description": "The place's street address, when it has one.",
            "ref": "community.lexicon.location.address",
            "type": "ref"
          },
          "category": {
            "description": "An Overture `categories.primary` string (e.g. `park`, `cafe`, `community_center`). Never a `LIKE '%park%'` match — consumers of the safety/park ladder use an explicit allow-list over this field.",
            "type": "string"
          },
          "createdAt": {
            "format": "datetime",
            "type": "string"
          },
          "description": {
            "description": "Prose about the place: what it is and what happens there. PUBLIC, like the rest of this record. Text a source allows only behind a permission belongs in the permissioned pub.techne.draft.description, not here.",
            "maxGraphemes": 3000,
            "maxLength": 30000,
            "type": "string"
          },
          "kind": {
            "description": "What kind of directory entry this is.",
            "knownValues": [
              "business",
              "publicSpace",
              "group"
            ],
            "type": "string"
          },
          "location": {
            "description": "The place's coordinate, when it has one (a `group` may have none).",
            "ref": "community.lexicon.location.geo",
            "type": "ref"
          },
          "name": {
            "description": "The place/group's display name.",
            "maxGraphemes": 128,
            "maxLength": 640,
            "type": "string"
          },
          "openingHours": {
            "description": "When the place is open, in OpenStreetMap `opening_hours` syntax (https://wiki.openstreetmap.org/wiki/Key:opening_hours), e.g. `Mo-Fr 09:00-17:00; Sa 10:00-14:00; PH off`. Local time at the place. A source's hours that do not parse as that syntax may be kept as it wrote them; a reader that cannot parse the value shows it as text. Absent when unknown, never a guess.",
            "maxGraphemes": 512,
            "maxLength": 1024,
            "type": "string"
          },
          "sameAs": {
            "description": "External identity reconciliation — an ARRAY so a provider reissuance (e.g. a GERS id change) appends, never destroys. Absent/empty for app-created entries — NEVER a placeholder id.",
            "items": {
              "ref": "pub.techne.draft.place#externalRef",
              "type": "ref"
            },
            "type": "array"
          },
          "uris": {
            "description": "Named links associated with this place, such as its website. Data-source credits belong in a separate attribution record.",
            "items": {
              "ref": "community.lexicon.calendar.event#uri",
              "type": "ref"
            },
            "type": "array"
          }
        },
        "required": [
          "name",
          "kind",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    }
  },
  "description": "SUPERSEDED by `pub.techne.draft.placeV2`: a new writer writes placeV2. An author's `placeV2/<rkey>` replaces that author's own `place/<rkey>`; any other placeV2 is linked to a place by `pub.techne.draft.sameAs`. Existing records stay readable. A place, public space or group in the shared directory. It is a commons directory entry that anyone may reference. PUBLIC content: this collection carries NO PROVENANCE RULE — anyone may author one, and no consumer may condition meaning on who did (default-anonymous is a CUSTODY property of the authoring account, never a schema property; the record body carries no creator field, ever). Convergence is by `sameAs` identity, never by author. Two kinds of record share this collection and this schema: SOURCE places (a mirror's, a person's, the commons collective's), and CURATED places, which the commons curator rule publishes in its own repo, one per cluster of source places that endorsed rules joined with pub.techne.draft.sameAs, under a TID rkey kept through merges, beside a pub.techne.draft.provenance sidecar naming its sources; a place no rule joined to another is a cluster of one and gets a curated place too. A curated event's location names the curated place, never a source place. The record means the same either way; whether it is curated is told by its provenance sidecar (in the author's repo, at sidecar_rkey of the curated record's AT-URI), not by a field.",
  "id": "pub.techne.draft.place",
  "lexicon": 1
}
