{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "gift": {
      "description": "A Gift in a garden: the plant, and who gave it when.",
      "properties": {
        "givenAt": {
          "format": "datetime",
          "type": "string"
        },
        "giver": {
          "description": "The giver's DID, or empty when they weren't signed in.",
          "type": "string"
        },
        "giverName": {
          "description": "The giver's name when they gave it.",
          "type": "string"
        },
        "plant": {
          "description": "The plant's id in the game's plants.json.",
          "minimum": 1,
          "type": "integer"
        }
      },
      "type": "object"
    },
    "main": {
      "description": "Keyed by the save's guid, lower case. The official account keys event gardens by their event's id.",
      "key": "any",
      "record": {
        "properties": {
          "biome": {
            "description": "The biome's id in the game's biomes.json.",
            "type": "string"
          },
          "copy": {
            "accept": [
              "application/gzip"
            ],
            "description": "The garden copy: the whole garden, gzipped JSON.",
            "maxSize": 4194304,
            "type": "blob"
          },
          "copyVersion": {
            "description": "The copy file's version. A game that doesn't know it shows the garden as too new.",
            "minimum": 0,
            "type": "integer"
          },
          "createdAt": {
            "format": "datetime",
            "type": "string"
          },
          "gameVersion": {
            "description": "The version of the game that wrote it.",
            "type": "string"
          },
          "gifts": {
            "description": "The Gifts in the garden, which every visitor gets.",
            "items": {
              "ref": "#gift",
              "type": "ref"
            },
            "type": "array"
          },
          "guid": {
            "description": "The save's guid, so the owner's game knows which of its gardens this is.",
            "type": "string"
          },
          "location": {
            "description": "The real-world location's id within that biome.",
            "type": "string"
          },
          "name": {
            "description": "The garden's name, as its owner typed it.",
            "type": "string"
          },
          "picture": {
            "accept": [
              "image/jpeg",
              "image/png"
            ],
            "description": "A picture of the garden.",
            "type": "blob"
          },
          "plantCount": {
            "description": "How many plants it has, for lists of gardens.",
            "minimum": 0,
            "type": "integer"
          },
          "rules": {
            "description": "Who may plant, when shared. Missing means only the owner.",
            "ref": "#plantRules",
            "type": "ref"
          },
          "shared": {
            "description": "Friends may garden here, under rules. Otherwise it's for visiting only.",
            "type": "boolean"
          },
          "size": {
            "description": "Tiles across.",
            "minimum": 0,
            "type": "integer"
          },
          "updatedAt": {
            "format": "datetime",
            "type": "string"
          }
        },
        "type": "object"
      },
      "type": "record"
    },
    "plantRules": {
      "description": "Who may plant in a shared garden. Anyone matching an allow rule may plant unless a keep-out rule matches them; blocked accounts are always kept out. An unknown allow rule is ignored; an unknown keep-out rule keeps everyone out.",
      "properties": {
        "allow": {
          "description": "Allow rules ticked. The owner may always plant; an empty list means only them.",
          "items": {
            "knownValues": [
              "added",
              "mutuals",
              "followers",
              "following",
              "list",
              "starterPack",
              "followersOf",
              "pastGardeners",
              "anyone"
            ],
            "type": "string"
          },
          "type": "array"
        },
        "followersOf": {
          "description": "For 'followersOf': the accounts whose followers may plant.",
          "items": {
            "format": "did",
            "type": "string"
          },
          "type": "array"
        },
        "keepOut": {
          "description": "Keep-out rules ticked.",
          "items": {
            "knownValues": [
              "blocked",
              "blockLists",
              "notHere",
              "newAccounts",
              "labelled"
            ],
            "type": "string"
          },
          "type": "array"
        },
        "labels": {
          "description": "For 'labelled': the moderation labels that keep an account out.",
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        "lists": {
          "description": "For 'list': the owner's Bluesky lists.",
          "items": {
            "format": "at-uri",
            "type": "string"
          },
          "type": "array"
        },
        "minAccountDays": {
          "description": "For 'newAccounts': accounts younger than this many days are kept out.",
          "minimum": 0,
          "type": "integer"
        },
        "starterPacks": {
          "description": "For 'starterPack': the owner's starter packs.",
          "items": {
            "format": "at-uri",
            "type": "string"
          },
          "type": "array"
        }
      },
      "type": "object"
    }
  },
  "description": "A Sylvanus garden on someone's account. The garden itself is the copy file it points to; this record stays small, for lists of gardens and visits.",
  "id": "garden.sylvanus.garden",
  "lexicon": 1
}
