{
  "lexicon": 1,
  "id": "net.bisks.yourspace.widget",
  "defs": {
    "main": {
      "type": "record",
      "description": "A widget that any yourspace page owner can embed. The embedUrl renders in a sandboxed iframe on pages that reference this record's at:// URI. Key is tid, so one author can publish many widgets.",
      "key": "tid",
      "record": {
        "type": "object",
        "required": [
          "name",
          "embedUrl",
          "createdAt"
        ],
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 320,
            "maxGraphemes": 80,
            "description": "Widget name."
          },
          "description": {
            "type": "string",
            "maxLength": 2000,
            "maxGraphemes": 500,
            "description": "What the widget does."
          },
          "embedUrl": {
            "type": "string",
            "format": "uri",
            "maxLength": 2000,
            "description": "https URL loaded in the iframe. The placeholders {did} and {handle} are replaced with the page owner's DID and handle."
          },
          "height": {
            "type": "integer",
            "minimum": 60,
            "maximum": 800,
            "description": "Frame height in pixels. Defaults to 200."
          },
          "createdAt": {
            "type": "string",
            "format": "datetime"
          }
        }
      }
    }
  }
}
