{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/lettrove-com/json-schema/lettrove-com-rendered-schema.json",
  "title": "Rendered",
  "description": "An HTML export, without a record: nothing is stored.",
  "x-generated": "2026-11-15",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/lettrove-com-openapi.json#/components/schemas/Rendered",
  "type": "object",
  "properties": {
    "mode": {
      "type": "string",
      "enum": [
        "email",
        "page",
        "popup",
        "document"
      ],
      "description": "What the design is: `email`, `page`, `popup` or `document`. A project makes one mode."
    },
    "html": {
      "type": "string",
      "description": "The whole document, ready to send or serve."
    },
    "chunks": {
      "$ref": "#/$defs/HtmlChunks"
    },
    "text": {
      "type": "string",
      "description": "The plain-text version (the `text/plain` part), merged the same way."
    },
    "subject": {
      "type": "string",
      "description": "The subject line, merged."
    },
    "preheader": {
      "type": "string",
      "description": "The preview text after the subject, merged."
    },
    "mergeTags": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Tags still in the HTML, text, subject or preheader, exactly as written: yours to fill before it goes to anyone."
    },
    "rendererVersion": {
      "type": "integer",
      "description": "Which renderer made it. Goes up when the output changes."
    },
    "bytes": {
      "type": "integer",
      "description": "Size of `html` in bytes."
    },
    "warnings": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Things worth knowing, in words: an email past Gmail's clipping size, an inline image left inline."
    },
    "design": {
      "description": "The design document exported. Store it as it is.",
      "$ref": "#/$defs/DesignDocument"
    }
  },
  "required": [
    "mode",
    "html",
    "chunks",
    "text",
    "subject",
    "preheader",
    "mergeTags",
    "rendererVersion",
    "bytes",
    "warnings",
    "design"
  ],
  "$defs": {
    "DesignDocument": {
      "type": "object",
      "additionalProperties": {},
      "description": "The design document. Store it as it is; what you may rely on inside it is on docs.lettrove.com/docs/1/api/design-document."
    },
    "HtmlChunks": {
      "type": "object",
      "properties": {
        "body": {
          "type": "string",
          "description": "What goes inside `<body>`, its scripts taken out."
        },
        "css": {
          "type": "string",
          "description": "Every stylesheet the design carries, in order."
        },
        "js": {
          "type": "string",
          "description": "Every script it runs, in order; empty for an email."
        },
        "fonts": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The web-font stylesheets it links to, by URL."
        }
      },
      "required": [
        "body",
        "css",
        "js",
        "fonts"
      ],
      "description": "The HTML in pieces, to place it inside a page of your own."
    }
  }
}