at main 63 lines 1.7 kB view raw
1{ 2 "lexicon": 1, 3 "id": "sh.weaver.domain.generateDocument", 4 "defs": { 5 "main": { 6 "type": "query", 7 "description": "Generate a site.standard.document record from a weaver entry. Returns a ready-to-write record with fully hydrated BookEntryView in content.", 8 "parameters": { 9 "type": "params", 10 "required": [ 11 "entry", 12 "publication" 13 ], 14 "properties": { 15 "entry": { 16 "type": "string", 17 "description": "AT-URI of the sh.weaver.notebook.entry to convert.", 18 "format": "at-uri" 19 }, 20 "entryRecord": { 21 "type": "unknown", 22 "description": "The entry record data to use (avoids staleness from index cache)." 23 }, 24 "path": { 25 "type": "string", 26 "description": "URL path for the document. Defaults to entry's path if not provided." 27 }, 28 "publication": { 29 "type": "string", 30 "description": "AT-URI of the site.standard.publication this document belongs to.", 31 "format": "at-uri" 32 } 33 } 34 }, 35 "output": { 36 "encoding": "application/json", 37 "schema": { 38 "type": "object", 39 "required": [ 40 "record" 41 ], 42 "properties": { 43 "record": { 44 "type": "ref", 45 "ref": "site.standard.document" 46 } 47 } 48 } 49 }, 50 "errors": [ 51 { 52 "name": "PublicationNotFound" 53 }, 54 { 55 "name": "EntryNotFound" 56 }, 57 { 58 "name": "NotebookNotLinked" 59 } 60 ] 61 } 62 } 63}