# garden.sylvanus.garden

> Keyed by the save's guid, lower case. The official account keys event gardens by their event's id.

- Kind: record
- Record key: any
- Authority: sylvanus.garden
- Lexicon: 1
- Published by [sylvanus.garden](https://lexicon.garden/identity/did:plc:quasugbmxrvizzcurs2rcs43), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:quasugbmxrvizzcurs2rcs43/garden.sylvanus.garden)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:quasugbmxrvizzcurs2rcs43/garden.sylvanus.garden/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:quasugbmxrvizzcurs2rcs43/garden.sylvanus.garden/analytics)

## Record (`garden.sylvanus.garden`)

Type: record · key any

### Properties

- `biome` (string): The biome's id in the game's biomes.json.
- `copy` (blob): The garden copy: the whole garden, gzipped JSON.
  - Constraints: maxSize: 4194304, accept: application/gzip
- `copyVersion` (integer): The copy file's version. A game that doesn't know it shows the garden as too new.
  - Constraints: minimum: 0
- `createdAt` (string · datetime)
- `gameVersion` (string): The version of the game that wrote it.
- `gifts` (array): The Gifts in the garden, which every visitor gets.
  - `items` (ref)
    - Reference: `#gift`
- `guid` (string): The save's guid, so the owner's game knows which of its gardens this is.
- `location` (string): The real-world location's id within that biome.
- `name` (string): The garden's name, as its owner typed it.
- `picture` (blob): A picture of the garden.
  - Constraints: accept: image/jpeg, image/png
- `plantCount` (integer): How many plants it has, for lists of gardens.
  - Constraints: minimum: 0
- `rules` (ref): Who may plant, when shared. Missing means only the owner.
  - Reference: `#plantRules`
- `shared` (boolean): Friends may garden here, under rules. Otherwise it's for visiting only.
- `size` (integer): Tiles across.
  - Constraints: minimum: 0
- `updatedAt` (string · datetime)

## #gift (`garden.sylvanus.garden#gift`)

Type: object

A Gift in a garden: the plant, and who gave it when.

### Properties

- `givenAt` (string · datetime)
- `giver` (string): The giver's DID, or empty when they weren't signed in.
- `giverName` (string): The giver's name when they gave it.
- `plant` (integer): The plant's id in the game's plants.json.
  - Constraints: minimum: 1

## #plantRules (`garden.sylvanus.garden#plantRules`)

Type: object

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` (array): Allow rules ticked. The owner may always plant; an empty list means only them.
  - `items` (string)
    - Constraints: knownValues: added | mutuals | followers | following | list | starterPack | followersOf | pastGardeners | anyone
- `followersOf` (array): For 'followersOf': the accounts whose followers may plant.
  - `items` (string · did)
- `keepOut` (array): Keep-out rules ticked.
  - `items` (string)
    - Constraints: knownValues: blocked | blockLists | notHere | newAccounts | labelled
- `labels` (array): For 'labelled': the moderation labels that keep an account out.
  - `items` (string)
- `lists` (array): For 'list': the owner's Bluesky lists.
  - `items` (string · at-uri)
- `minAccountDays` (integer): For 'newAccounts': accounts younger than this many days are kept out.
  - Constraints: minimum: 0
- `starterPacks` (array): For 'starterPack': the owner's starter packs.
  - `items` (string · at-uri)

## Schema

```json
{
  "$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
}
```
