{ "lexicon": 1, "id": "sh.weaver.domain.generateDocument", "defs": { "main": { "type": "query", "description": "Generate a site.standard.document record from a weaver entry. Returns a ready-to-write record with fully hydrated BookEntryView in content.", "parameters": { "type": "params", "required": [ "entry", "publication" ], "properties": { "entry": { "type": "string", "description": "AT-URI of the sh.weaver.notebook.entry to convert.", "format": "at-uri" }, "entryRecord": { "type": "unknown", "description": "The entry record data to use (avoids staleness from index cache)." }, "path": { "type": "string", "description": "URL path for the document. Defaults to entry's path if not provided." }, "publication": { "type": "string", "description": "AT-URI of the site.standard.publication this document belongs to.", "format": "at-uri" } } }, "output": { "encoding": "application/json", "schema": { "type": "object", "required": [ "record" ], "properties": { "record": { "type": "ref", "ref": "site.standard.document" } } } }, "errors": [ { "name": "PublicationNotFound" }, { "name": "EntryNotFound" }, { "name": "NotebookNotLinked" } ] } } }