{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "browseAccount": {
      "description": "A box to open another account's repo, to look at its public records.",
      "properties": {},
      "type": "object"
    },
    "collectionRecords": {
      "description": "A list of records from one collection, in your repo or another account's, sorted as chosen.",
      "properties": {
        "collection": {
          "description": "The collection to list records from, such as app.bsky.feed.post.",
          "format": "nsid",
          "type": "string"
        },
        "descending": {
          "default": true,
          "description": "Whether the largest comes first: newest for dates, highest for numbers, Z to A for text. Records without the field always come last.",
          "type": "boolean"
        },
        "limit": {
          "default": 5,
          "description": "How many records to show.",
          "maximum": 50,
          "minimum": 1,
          "type": "integer"
        },
        "repo": {
          "description": "The account whose records are listed, by handle or DID. Absent: the repo the dashboard is showing (yours, or the one being browsed).",
          "format": "at-identifier",
          "type": "string"
        },
        "sortBy": {
          "description": "A field of the records to sort by, or a path into one such as 'embed.external.uri'. Dates sort by time and numbers by value. Absent: by record key, which is time order for records keyed by time.",
          "maxGraphemes": 64,
          "maxLength": 640,
          "type": "string"
        }
      },
      "required": [
        "collection"
      ],
      "type": "object"
    },
    "main": {
      "description": "A box on Skywrite's dashboard: what it shows, and its settings. Skywrite's built-in widgets are records in skywritecms.bsky.social's repo; widgets someone adds are records in their own repo. The dashboard in us.polhem.skywrite.preferences.app places widgets by their AT URIs.",
      "key": "any",
      "record": {
        "properties": {
          "content": {
            "description": "What the box shows.",
            "refs": [
              "#quickCompose",
              "#recentDrafts",
              "#repoOverview",
              "#browseAccount",
              "#namespaceCollections",
              "#collectionRecords"
            ],
            "type": "union"
          },
          "description": {
            "description": "What the box is for, shown when choosing one to add.",
            "maxGraphemes": 300,
            "maxLength": 3000,
            "type": "string"
          },
          "name": {
            "description": "The box's heading. Absent: one made from its content, such as 'Quick Compose: Document'.",
            "maxGraphemes": 64,
            "maxLength": 640,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "content"
        ],
        "type": "object"
      },
      "type": "record"
    },
    "namespaceCollections": {
      "description": "The repo's collections in a namespace, such as every bsky.app collection (app.bsky) or just app.bsky.feed, each with how many records it has.",
      "properties": {
        "namespace": {
          "description": "An NSID prefix, such as 'app.bsky' or 'app.bsky.feed'. Collections whose NSID is the prefix or starts with it and a dot are listed.",
          "maxLength": 317,
          "type": "string"
        }
      },
      "required": [
        "namespace"
      ],
      "type": "object"
    },
    "quickCompose": {
      "description": "A box to write a new record in, publish straight away or keep as a draft to finish in the editor. Only on your own dashboard.",
      "properties": {
        "collection": {
          "description": "The collection new records are written to, such as app.bsky.feed.post or site.standard.document.",
          "format": "nsid",
          "type": "string"
        }
      },
      "required": [
        "collection"
      ],
      "type": "object"
    },
    "recentDrafts": {
      "description": "The drafts saved on this device most recently, to pick up again. Only on your own dashboard.",
      "properties": {},
      "type": "object"
    },
    "repoOverview": {
      "description": "Every app in the repo, with how many collections each has, and your drafts.",
      "properties": {},
      "type": "object"
    }
  },
  "id": "us.polhem.skywrite.preferences.widget",
  "lexicon": 1
}
