[{"data":1,"prerenderedAt":2192},["ShallowReactive",2],{"navigation_docs":3,"-developers-api":613,"-developers-api-surround":2189},[4,39,101,378,540,562,584,606],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":38},"Start","i-lucide-rocket","\u002Fstart","1.start",[10,14,18,22,26,30,34],{"title":11,"path":12,"stem":13},"Our approach","\u002Fstart\u002Four-approach","1.start\u002F0.our-approach",{"title":15,"path":16,"stem":17},"Introduction","\u002Fstart\u002Fintroduction","1.start\u002F1.introduction",{"title":19,"path":20,"stem":21},"Concepts","\u002Fstart\u002Fconcepts","1.start\u002F2.concepts",{"title":23,"path":24,"stem":25},"Glossary","\u002Fstart\u002Fglossary","1.start\u002F3.glossary",{"title":27,"path":28,"stem":29},"Try it locally","\u002Fstart\u002Ftry-it-locally","1.start\u002F4.try-it-locally",{"title":31,"path":32,"stem":33},"Features","\u002Fstart\u002Ffeatures","1.start\u002F5.features",{"title":35,"path":36,"stem":37},"Questions","\u002Fstart\u002Ffaq","1.start\u002F6.faq",false,{"title":40,"icon":41,"path":42,"stem":43,"children":44,"page":38},"Run SHADE","i-lucide-server","\u002Frun","2.run",[45,49,53,57,61,65,69,73,77,81,85,89,93,97],{"title":46,"path":47,"stem":48},"Setting up an instance (Coolify)","\u002Frun\u002Fcoolify","2.run\u002F1.coolify",{"title":50,"path":51,"stem":52},"Console commands","\u002Frun\u002Fconsole","2.run\u002F10.console",{"title":54,"path":55,"stem":56},"Rotating APP_SECRET","\u002Frun\u002Frotating-app-secret","2.run\u002F11.rotating-app-secret",{"title":58,"path":59,"stem":60},"Checking an instance","\u002Frun\u002Fdoctor","2.run\u002F12.doctor",{"title":62,"path":63,"stem":64},"Self-hosting by hand","\u002Frun\u002Fown-server-by-hand","2.run\u002F13.own-server-by-hand",{"title":66,"path":67,"stem":68},"NixOS (experimental)","\u002Frun\u002Fnixos","2.run\u002F14.nixos",{"title":70,"path":71,"stem":72},"Self-hosting without Coolify","\u002Frun\u002Fown-server","2.run\u002F2.own-server",{"title":74,"path":75,"stem":76},"Hosting the site on a static host","\u002Frun\u002Fstatic-hosts","2.run\u002F3.static-hosts",{"title":78,"path":79,"stem":80},"Licence","\u002Frun\u002Flicence","2.run\u002F4.licence",{"title":82,"path":83,"stem":84},"Updating and backups","\u002Frun\u002Fupdating-and-backups","2.run\u002F5.updating-and-backups",{"title":86,"path":87,"stem":88},"Troubleshooting","\u002Frun\u002Ftroubleshooting","2.run\u002F6.troubleshooting",{"title":90,"path":91,"stem":92},"Logs, request ids, traces and metrics","\u002Frun\u002Flogs","2.run\u002F7.logs",{"title":94,"path":95,"stem":96},"Maintenance mode","\u002Frun\u002Fmaintenance-mode","2.run\u002F8.maintenance-mode",{"title":98,"path":99,"stem":100},"Usage limits","\u002Frun\u002Fusage-limits","2.run\u002F9.usage-limits",{"title":102,"icon":103,"path":104,"stem":105,"children":106},"Guide","i-lucide-book-open","\u002Fguide","3.guide",[107,109,147,192,210,280,310,364],{"title":102,"path":104,"stem":108},"3.guide\u002Findex",{"title":110,"icon":111,"path":112,"stem":113,"children":114,"page":38},"Content","i-lucide-file-text","\u002Fguide\u002Fcontent","3.guide\u002F1.content",[115,119,123,127,131,135,139,143],{"title":116,"path":117,"stem":118},"Collections and entries","\u002Fguide\u002Fcontent\u002Fcollections","3.guide\u002F1.content\u002F1.collections",{"title":120,"path":121,"stem":122},"Field types","\u002Fguide\u002Fcontent\u002Ffields","3.guide\u002F1.content\u002F2.fields",{"title":124,"path":125,"stem":126},"Drafts, publishing and version history","\u002Fguide\u002Fcontent\u002Fversions","3.guide\u002F1.content\u002F3.versions",{"title":128,"path":129,"stem":130},"Languages","\u002Fguide\u002Fcontent\u002Flanguages","3.guide\u002F1.content\u002F4.languages",{"title":132,"path":133,"stem":134},"Data sources","\u002Fguide\u002Fcontent\u002Fdata-sources","3.guide\u002F1.content\u002F5.data-sources",{"title":136,"path":137,"stem":138},"Media","\u002Fguide\u002Fcontent\u002Fmedia","3.guide\u002F1.content\u002F6.media",{"title":140,"path":141,"stem":142},"Search","\u002Fguide\u002Fcontent\u002Fsearch","3.guide\u002F1.content\u002F7.search",{"title":144,"path":145,"stem":146},"Trash","\u002Fguide\u002Fcontent\u002Ftrash","3.guide\u002F1.content\u002F8.trash",{"title":148,"icon":149,"path":150,"stem":151,"children":152,"page":38},"Website","i-lucide-globe","\u002Fguide\u002Fwebsite","3.guide\u002F2.website",[153,156,160,164,168,172,176,180,184,188],{"title":148,"path":154,"stem":155},"\u002Fguide\u002Fwebsite\u002Fwebsite","3.guide\u002F2.website\u002F1.website",{"title":157,"path":158,"stem":159},"Scroll scenes","\u002Fguide\u002Fwebsite\u002Fscroll-scenes","3.guide\u002F2.website\u002F10.scroll-scenes",{"title":161,"path":162,"stem":163},"Pages and posts","\u002Fguide\u002Fwebsite\u002Fpages","3.guide\u002F2.website\u002F2.pages",{"title":165,"path":166,"stem":167},"The visual editor","\u002Fguide\u002Fwebsite\u002Fvisual-editor","3.guide\u002F2.website\u002F3.visual-editor",{"title":169,"path":170,"stem":171},"Roles and locks","\u002Fguide\u002Fwebsite\u002Froles-and-locks","3.guide\u002F2.website\u002F4.roles-and-locks",{"title":173,"path":174,"stem":175},"Header and footer","\u002Fguide\u002Fwebsite\u002Fheader-and-footer","3.guide\u002F2.website\u002F5.header-and-footer",{"title":177,"path":178,"stem":179},"Theme","\u002Fguide\u002Fwebsite\u002Ftheme","3.guide\u002F2.website\u002F6.theme",{"title":181,"path":182,"stem":183},"Redirects","\u002Fguide\u002Fwebsite\u002Fredirects","3.guide\u002F2.website\u002F7.redirects",{"title":185,"path":186,"stem":187},"Site settings","\u002Fguide\u002Fwebsite\u002Fsite-settings","3.guide\u002F2.website\u002F8.site-settings",{"title":189,"path":190,"stem":191},"The site","\u002Fguide\u002Fwebsite\u002Fthe-site","3.guide\u002F2.website\u002F9.the-site",{"title":193,"icon":194,"path":195,"stem":196,"children":197,"page":38},"Publishing","i-lucide-send","\u002Fguide\u002Fpublishing","3.guide\u002F3.publishing",[198,202,206],{"title":199,"path":200,"stem":201},"Publishing and preview","\u002Fguide\u002Fpublishing\u002Fpublishing","3.guide\u002F3.publishing\u002F1.publishing",{"title":203,"path":204,"stem":205},"Builds","\u002Fguide\u002Fpublishing\u002Fbuilds","3.guide\u002F3.publishing\u002F2.builds",{"title":207,"path":208,"stem":209},"CDN caches","\u002Fguide\u002Fpublishing\u002Fcaches","3.guide\u002F3.publishing\u002F3.caches",{"title":211,"icon":212,"path":213,"stem":214,"children":215,"page":38},"People, security and privacy","i-lucide-shield","\u002Fguide\u002Fpeople-and-security","3.guide\u002F4.people-and-security",[216,220,224,228,232,236,240,244,248,252,256,260,264,268,272,276],{"title":217,"path":218,"stem":219},"People in SHADE","\u002Fguide\u002Fpeople-and-security\u002Fpeople-in-shade","3.guide\u002F4.people-and-security\u002F0.people-in-shade",{"title":221,"path":222,"stem":223},"Team and roles","\u002Fguide\u002Fpeople-and-security\u002Fteam","3.guide\u002F4.people-and-security\u002F1.team",{"title":225,"path":226,"stem":227},"Errors and security alerts","\u002Fguide\u002Fpeople-and-security\u002Ferrors","3.guide\u002F4.people-and-security\u002F10.errors",{"title":229,"path":230,"stem":231},"Exporting an instance","\u002Fguide\u002Fpeople-and-security\u002Fexporting","3.guide\u002F4.people-and-security\u002F11.exporting",{"title":233,"path":234,"stem":235},"Organisations","\u002Fguide\u002Fpeople-and-security\u002Forganisations","3.guide\u002F4.people-and-security\u002F12.organisations",{"title":237,"path":238,"stem":239},"Signing in through an identity provider (team)","\u002Fguide\u002Fpeople-and-security\u002Fidentity-providers","3.guide\u002F4.people-and-security\u002F13.identity-providers",{"title":241,"path":242,"stem":243},"System status","\u002Fguide\u002Fpeople-and-security\u002Fsystem-status","3.guide\u002F4.people-and-security\u002F14.system-status",{"title":245,"path":246,"stem":247},"Appearance","\u002Fguide\u002Fpeople-and-security\u002Fappearance","3.guide\u002F4.people-and-security\u002F15.appearance",{"title":249,"path":250,"stem":251},"Accounts and personal pages","\u002Fguide\u002Fpeople-and-security\u002Faccounts","3.guide\u002F4.people-and-security\u002F2.accounts",{"title":253,"path":254,"stem":255},"Signing in (team)","\u002Fguide\u002Fpeople-and-security\u002Fsign-in","3.guide\u002F4.people-and-security\u002F3.sign-in",{"title":257,"path":258,"stem":259},"API tokens","\u002Fguide\u002Fpeople-and-security\u002Fapi-tokens","3.guide\u002F4.people-and-security\u002F4.api-tokens",{"title":261,"path":262,"stem":263},"Audit log","\u002Fguide\u002Fpeople-and-security\u002Faudit","3.guide\u002F4.people-and-security\u002F5.audit",{"title":265,"path":266,"stem":267},"Request protection","\u002Fguide\u002Fpeople-and-security\u002Fprotection","3.guide\u002F4.people-and-security\u002F6.protection",{"title":269,"path":270,"stem":271},"Personal data per person","\u002Fguide\u002Fpeople-and-security\u002Fprivacy","3.guide\u002F4.people-and-security\u002F7.privacy",{"title":273,"path":274,"stem":275},"Data retention","\u002Fguide\u002Fpeople-and-security\u002Fretention","3.guide\u002F4.people-and-security\u002F8.retention",{"title":277,"path":278,"stem":279},"Consent banner","\u002Fguide\u002Fpeople-and-security\u002Fconsent","3.guide\u002F4.people-and-security\u002F9.consent",{"title":281,"icon":282,"path":283,"stem":284,"children":285,"page":38},"Services","i-lucide-plug","\u002Fguide\u002Fservices","3.guide\u002F5.services",[286,290,294,298,302,306],{"title":287,"path":288,"stem":289},"Email","\u002Fguide\u002Fservices\u002Femail","3.guide\u002F5.services\u002F1.email",{"title":291,"path":292,"stem":293},"Opening hours","\u002Fguide\u002Fservices\u002Fopening-hours","3.guide\u002F5.services\u002F4.opening-hours",{"title":295,"path":296,"stem":297},"Webhooks","\u002Fguide\u002Fservices\u002Fwebhooks","3.guide\u002F5.services\u002F5.webhooks",{"title":299,"path":300,"stem":301},"Locations","\u002Fguide\u002Fservices\u002Flocations","3.guide\u002F5.services\u002F6.locations",{"title":303,"path":304,"stem":305},"VAT rates","\u002Fguide\u002Fservices\u002Fvat-rates","3.guide\u002F5.services\u002F7.vat-rates",{"title":307,"path":308,"stem":309},"Channels","\u002Fguide\u002Fservices\u002Fchannels","3.guide\u002F5.services\u002F8.channels",{"title":311,"icon":312,"path":313,"stem":314,"children":315,"page":38},"InstalledModules","i-lucide-puzzle","\u002Fguide\u002Fmodules","3.guide\u002F6.modules",[316,320,324,328,332,336,340,344,348,352,356,360],{"title":317,"path":318,"stem":319},"Modules","\u002Fguide\u002Fmodules\u002Fmanaging","3.guide\u002F6.modules\u002F1.managing",{"title":321,"path":322,"stem":323},"Dutch services (module)","\u002Fguide\u002Fmodules\u002Fnl","3.guide\u002F6.modules\u002F10.nl",{"title":325,"path":326,"stem":327},"Editorial (module)","\u002Fguide\u002Fmodules\u002Feditorial","3.guide\u002F6.modules\u002F11.editorial",{"title":329,"path":330,"stem":331},"Appointments (module)","\u002Fguide\u002Fmodules\u002Fappointments","3.guide\u002F6.modules\u002F2.appointments",{"title":333,"path":334,"stem":335},"Shop (the commerce module)","\u002Fguide\u002Fmodules\u002Fshop","3.guide\u002F6.modules\u002F3.shop",{"title":337,"path":338,"stem":339},"Untrusted modules","\u002Fguide\u002Fmodules\u002Funtrusted","3.guide\u002F6.modules\u002F4.untrusted",{"title":341,"path":342,"stem":343},"Analytics (module)","\u002Fguide\u002Fmodules\u002Fanalytics","3.guide\u002F6.modules\u002F5.analytics",{"title":345,"path":346,"stem":347},"Error forwarding (module)","\u002Fguide\u002Fmodules\u002Ferror-forwarding","3.guide\u002F6.modules\u002F6.error-forwarding",{"title":349,"path":350,"stem":351},"Client programs","\u002Fguide\u002Fmodules\u002Fprograms","3.guide\u002F6.modules\u002F7.programs",{"title":353,"path":354,"stem":355},"Import and export (module)","\u002Fguide\u002Fmodules\u002Fimport","3.guide\u002F6.modules\u002F8.import",{"title":357,"path":358,"stem":359},"Payments (module)","\u002Fguide\u002Fmodules\u002Fpayments","3.guide\u002F6.modules\u002F8.payments",{"title":361,"path":362,"stem":363},"Forms (module)","\u002Fguide\u002Fmodules\u002Fforms","3.guide\u002F6.modules\u002F9.forms",{"title":365,"icon":366,"path":367,"stem":368,"children":369,"page":38},"AI assistants","i-lucide-bot","\u002Fguide\u002Fai","3.guide\u002F7.ai",[370,374],{"title":371,"path":372,"stem":373},"AI assistants (MCP)","\u002Fguide\u002Fai\u002Fassistants","3.guide\u002F7.ai\u002F1.assistants",{"title":375,"path":376,"stem":377},"Connecting an AI assistant","\u002Fguide\u002Fai\u002Fconnecting","3.guide\u002F7.ai\u002F2.connecting",{"title":379,"icon":380,"path":381,"stem":382,"children":383,"page":38},"Developers","i-lucide-code","\u002Fdevelopers","4.developers",[384,388,392,396,400,404,408,412,416,420,424,428,432,435,489,493,497,501,536],{"title":385,"path":386,"stem":387},"Architecture","\u002Fdevelopers\u002Farchitecture","4.developers\u002F1.architecture",{"title":389,"path":390,"stem":391},"Capabilities","\u002Fdevelopers\u002Fcapabilities","4.developers\u002F10.capabilities",{"title":393,"path":394,"stem":395},"Trust","\u002Fdevelopers\u002Ftrust","4.developers\u002F11.trust",{"title":397,"path":398,"stem":399},"Redis and the ports","\u002Fdevelopers\u002Fredis","4.developers\u002F12.redis",{"title":401,"path":402,"stem":403},"The worker container role","\u002Fdevelopers\u002Fworker","4.developers\u002F13.worker",{"title":405,"path":406,"stem":407},"kv: a module's own key-value storage","\u002Fdevelopers\u002Fkv","4.developers\u002F14.kv",{"title":409,"path":410,"stem":411},"Processes: long-running work on the worker","\u002Fdevelopers\u002Fprocesses","4.developers\u002F15.processes",{"title":413,"path":414,"stem":415},"Network: a module's outgoing calls","\u002Fdevelopers\u002Fnetwork","4.developers\u002F16.network",{"title":417,"path":418,"stem":419},"Realtime","\u002Fdevelopers\u002Frealtime","4.developers\u002F17.realtime",{"title":421,"path":422,"stem":423},"Private files","\u002Fdevelopers\u002Ffiles","4.developers\u002F18.files",{"title":425,"path":426,"stem":427},"Notify","\u002Fdevelopers\u002Fnotify","4.developers\u002F19.notify",{"title":429,"path":430,"stem":431},"Collections","\u002Fdevelopers\u002Fcollections","4.developers\u002F2.collections",{"title":337,"path":433,"stem":434},"\u002Fdevelopers\u002Funtrusted","4.developers\u002F20.untrusted",{"title":436,"icon":312,"path":437,"stem":438,"children":439},"Writing a plugin","\u002Fdevelopers\u002Fmodules","4.developers\u002F3.modules\u002Findex",[440,442,446,450,454,458,462,466,470,473,477,481,485],{"title":441,"path":437,"stem":438},"Writing a module",{"title":443,"path":444,"stem":445},"Module SDK and tooling","\u002Fdevelopers\u002Fmodules\u002Fsdk-and-tooling","4.developers\u002F3.modules\u002F1.sdk-and-tooling",{"title":447,"path":448,"stem":449},"Connecting accounts with OAuth2","\u002Fdevelopers\u002Fmodules\u002Foauth","4.developers\u002F3.modules\u002F10.oauth",{"title":451,"path":452,"stem":453},"Calls between modules","\u002Fdevelopers\u002Fmodules\u002Fcalls-between-modules","4.developers\u002F3.modules\u002F11.calls-between-modules",{"title":455,"path":456,"stem":457},"Experimental parts","\u002Fdevelopers\u002Fmodules\u002Fexperimental-parts","4.developers\u002F3.modules\u002F12.experimental-parts",{"title":459,"path":460,"stem":461},"The manifest","\u002Fdevelopers\u002Fmodules\u002Fmanifest","4.developers\u002F3.modules\u002F2.manifest",{"title":463,"path":464,"stem":465},"Routes","\u002Fdevelopers\u002Fmodules\u002Froutes","4.developers\u002F3.modules\u002F3.routes",{"title":467,"path":468,"stem":469},"Admin screens and the site part","\u002Fdevelopers\u002Fmodules\u002Fadmin-and-site","4.developers\u002F3.modules\u002F4.admin-and-site",{"title":110,"path":471,"stem":472},"\u002Fdevelopers\u002Fmodules\u002Fcontent","4.developers\u002F3.modules\u002F5.content",{"title":474,"path":475,"stem":476},"Background work and services","\u002Fdevelopers\u002Fmodules\u002Fbackground-and-services","4.developers\u002F3.modules\u002F6.background-and-services",{"title":478,"path":479,"stem":480},"SDK reference","\u002Fdevelopers\u002Fmodules\u002Fsdk-reference","4.developers\u002F3.modules\u002F7.sdk-reference",{"title":482,"path":483,"stem":484},"The website module's SDK","\u002Fdevelopers\u002Fmodules\u002Fwebsite-sdk","4.developers\u002F3.modules\u002F8.website-sdk",{"title":486,"path":487,"stem":488},"Incoming webhooks","\u002Fdevelopers\u002Fmodules\u002Fincoming-webhooks","4.developers\u002F3.modules\u002F9.incoming-webhooks",{"title":490,"path":491,"stem":492},"Core and the website module","\u002Fdevelopers\u002Fcore-and-website-module","4.developers\u002F4.core-and-website-module",{"title":494,"path":495,"stem":496},"The API","\u002Fdevelopers\u002Fapi","4.developers\u002F6.api",{"title":498,"path":499,"stem":500},"API reference","\u002Fdevelopers\u002Fapi-reference","4.developers\u002F6.api-reference",{"title":502,"icon":503,"path":504,"stem":505,"children":506},"Sites in other frameworks","i-lucide-layout-template","\u002Fdevelopers\u002Fframeworks","4.developers\u002F7.frameworks\u002Findex",[507,508,512,516,520,524,528,532],{"title":502,"path":504,"stem":505},{"title":509,"path":510,"stem":511},"Accounts: sign-in and modules' routes","\u002Fdevelopers\u002Fframeworks\u002Faccounts","4.developers\u002F7.frameworks\u002F1.accounts",{"title":513,"path":514,"stem":515},"`@shadestack\u002Ftree`","\u002Fdevelopers\u002Fframeworks\u002Ftree","4.developers\u002F7.frameworks\u002F2.tree",{"title":517,"path":518,"stem":519},"Expressions and styles","\u002Fdevelopers\u002Fframeworks\u002Fexpressions-and-styles","4.developers\u002F7.frameworks\u002F3.expressions-and-styles",{"title":521,"path":522,"stem":523},"`@shadestack\u002Frender`","\u002Fdevelopers\u002Fframeworks\u002Frender","4.developers\u002F7.frameworks\u002F4.render",{"title":525,"path":526,"stem":527},"`@shadestack\u002Finteractions`","\u002Fdevelopers\u002Fframeworks\u002Finteractions","4.developers\u002F7.frameworks\u002F5.interactions",{"title":529,"path":530,"stem":531},"`@shadestack\u002Fa11y`","\u002Fdevelopers\u002Fframeworks\u002Fa11y","4.developers\u002F7.frameworks\u002F6.a11y",{"title":533,"path":534,"stem":535},"Your own page for SHADE's links","\u002Fdevelopers\u002Fframeworks\u002Flinks","4.developers\u002F7.frameworks\u002F7.links",{"title":537,"path":538,"stem":539},"Build a client module","\u002Fdevelopers\u002Fclient-module","4.developers\u002F9.client-module",{"title":541,"icon":542,"path":543,"stem":544,"children":545,"page":38},"Security","i-lucide-shield-check","\u002Fsecurity","5.security",[546,550,554,558],{"title":547,"path":548,"stem":549},"Reporting a vulnerability","\u002Fsecurity\u002Freporting","5.security\u002F0.reporting",{"title":551,"path":552,"stem":553},"Security testing","\u002Fsecurity\u002Ftesting","5.security\u002F1.testing",{"title":555,"path":556,"stem":557},"Hardening a production instance","\u002Fsecurity\u002Fhardening","5.security\u002F2.hardening",{"title":559,"path":560,"stem":561},"Manual testing with Kali Linux","\u002Fsecurity\u002Fmanual-testing","5.security\u002F3.manual-testing",{"title":563,"icon":564,"path":565,"stem":566,"children":567,"page":38},"Contributing","i-lucide-git-pull-request","\u002Fcontributing","6.contributing",[568,572,576,580],{"title":569,"path":570,"stem":571},"Reading the code","\u002Fcontributing\u002Freading-the-code","6.contributing\u002F1.reading-the-code",{"title":573,"path":574,"stem":575},"Docs site","\u002Fcontributing\u002Fdocs-site","6.contributing\u002F2.docs-site",{"title":577,"path":578,"stem":579},"Releases","\u002Fcontributing\u002Freleases","6.contributing\u002F3.releases",{"title":581,"path":582,"stem":583},"Load tests","\u002Fcontributing\u002Fload-tests","6.contributing\u002F4.load-tests",{"title":585,"icon":586,"path":587,"stem":588,"children":589,"page":38},"Project","i-lucide-map","\u002Fproject","7.project",[590,594,598,602],{"title":591,"path":592,"stem":593},"Roadmap","\u002Fproject\u002Froadmap","7.project\u002F1.roadmap",{"title":595,"path":596,"stem":597},"Known issues","\u002Fproject\u002Fknown-issues","7.project\u002F2.known-issues",{"title":599,"path":600,"stem":601},"Changelog","\u002Fproject\u002Fchangelog","7.project\u002F3.changelog",{"title":603,"path":604,"stem":605},"Decisions","\u002Fproject\u002Fdecisions","7.project\u002F4.decisions",{"title":607,"path":608,"stem":609,"children":610,"icon":612},"Community","\u002Fcommunity","8.community\u002Findex",[611],{"title":607,"path":608,"stem":609},"i-lucide-users",{"id":614,"title":494,"body":615,"description":1033,"extension":2184,"links":2185,"meta":2186,"navigation":1319,"path":495,"seo":2187,"stem":496,"__hash__":2188},"docs\u002F4.developers\u002F6.api.md",{"type":616,"value":617,"toc":2175},"minimark",[618,622,627,698,1017,1021,1027,1112,1115,1232,1239,1244,1276,1868,1874,1878,1892,1918,1922,1932,2005,2099,2103,2171],[619,620,621],"p",{},"SHADE's content is reachable from any framework, or any program, over HTTP. The Astro site is one client of this API;\na Next.js, SvelteKit or Nuxt site, a mobile app or a script uses the same routes.",[623,624,626],"h2",{"id":625},"version-1","Version 1",[628,629,630,646],"table",{},[631,632,633],"thead",{},[634,635,636,640,643],"tr",{},[637,638,639],"th",{},"Path",[637,641,642],{},"For",[637,644,645],{},"Authentication",[647,648,649,672,685],"tbody",{},[634,650,651,658,661],{},[652,653,654],"td",{},[655,656,657],"code",{},"\u002Fapi\u002Fv1\u002Fcontent\u002F…",[652,659,660],{},"Reading published content: the site, pages, entries, media, redirects, data sources",[652,662,663,664,667,668,671],{},"A read token: ",[655,665,666],{},"Authorization: Bearer \u003Ctoken>"," (",[669,670,257],"a",{"href":258},")",[634,673,674,679,682],{},[652,675,676],{},[655,677,678],{},"\u002Fapi\u002Fv1\u002Faccount\u002F…",[652,680,681],{},"Visitors' browsers: signing in, up and out, forms, page views, a user's own data, modules' (the payments module's webhook among them) public and account routes",[652,683,684],{},"None (CORS allows the site's origin); a user's session cookie for their own data, their account and modules' account routes",[634,686,687,692,695],{},[652,688,689],{},[655,690,691],{},"\u002Fapi\u002Fv1\u002Fdata\u002Fcollections\u002F…",[652,693,694],{},"Other systems managing collections: list, read, create, update, delete, publish",[652,696,697],{},"A data token, which reaches only the collections it was given, read or write",[699,700,701,748,758,787,829,897,949,992,1006],"ul",{},[702,703,704,708,709,712,713,716,717,720,721,724,725,727,728,731,732,735,736,739,740,743,744,747],"li",{},[705,706,707],"strong",{},"What the routes take"," is described in an OpenAPI 3.1 document at ",[655,710,711],{},"https:\u002F\u002F\u003Cshade-api>\u002Fapi\u002Fv1\u002Fopenapi.json",", served by\nevery instance without a token. Load it in any OpenAPI tool to browse the routes or generate a client. It includes\nthe public and account routes of the modules that are on, one tag per module (",[655,714,715],{},"InstalledModule: \u003Cname>","); account routes are\nunder the ",[655,718,719],{},"accountSession"," scheme (the ",[655,722,723],{},"shade_account.session_token"," cookie). Untrusted\nmodules' routes are not in it. Asked with a read token (",[655,726,666],{},"), it also describes the\nanswers of ",[655,729,730],{},"\u002Fapi\u002Fv1\u002Fcontent\u002Fcollections\u002F{slug}"," and ",[655,733,734],{},"\u002F{slug}\u002F{idOrSlug}",": the published entry of each collection with\na public API that token may read, told apart by ",[655,737,738],{},"collection",". That answer is never kept by a shared cache, and an\ninvalid token gets 401. Without a token the document shows no instance's collections. ",[655,741,742],{},"shade-types"," writes a\nfrontend's types from it (",[669,745,429],{"href":746},"\u002Fdevelopers\u002Fcollections#using-entries-on-the-site",").",[702,749,750,753,754,757],{},[705,751,752],{},"v1 is a promise",": a breaking change comes as ",[655,755,756],{},"\u002Fapi\u002Fv2",", next to v1. Adding routes or optional fields is not\nbreaking.",[702,759,760,667,763,766,767,770,771,774,775,778,779,782,783,786],{},[705,761,762],{},"The admin's own API",[655,764,765],{},"\u002Fapi\u002F…",", unversioned, for the admin only) keeps one verb per kind of change: ",[655,768,769],{},"PUT"," sends\nthe whole thing (a webhook, a role, an on\u002Foff switch: ",[655,772,773],{},"{ enabled }",", a capability's ",[655,776,777],{},"{ on }","), ",[655,780,781],{},"PATCH"," only the parts\nthat change (the site settings, a team member, retention periods, alert rules). A step confirmed by typing a name\nsends it as ",[655,784,785],{},"confirm"," (installing or removing an untrusted module, turning off, uninstalling, approving).",[702,788,789,792,793,796,797,800,801,804,805,808,809,812,813,816,817,820,821,824,825,828],{},[705,790,791],{},"Previews"," are ",[655,794,795],{},"GET \u002Fapi\u002Fv1\u002Fcontent\u002Fpreview?token=…"," (C14): what a preview link of another frontend shows. The\n",[655,798,799],{},"token"," is the one in the link the frontend's preview route was opened with; the site asks with its read token\n(",[655,802,803],{},"client.contentPreview(token)","). It answers ",[655,806,807],{},"{ kind: 'entry', locale, entry }"," (an entry's version, a draft too, as\na published entry: ",[655,810,811],{},"publishedAt"," is the version's time) or ",[655,814,815],{},"{ kind: 'set', locale, name, entries, removed }","\n(a module's set of versions, such as an editorial release, as it will publish them, and ",[655,818,819],{},"{ collection, id }"," of what it unpublishes), never cached.\n401 when the link expired or was revoked, or its maker may no longer read it; 404 when what it shows is gone. The\nadmin makes the links: ",[655,822,823],{},"POST \u002Fapi\u002Fcollections\u002F:slug\u002F:id\u002Fpreview"," and a module's own route for a set (the editorial module's releases) with\n",[655,826,827],{},"{ frontendId?, locale?, versionId?, shareHours? }"," (signed in, never with a token).",[702,830,831,833,834,837,838,840,841,844,845,731,848,851,852,855,856,859,860,863,864,867,868,871,872,875,876,878,879,882,883,882,886,731,889,892,893,896],{},[705,832,140],{}," is ",[655,835,836],{},"GET \u002Fapi\u002Fv1\u002Fcontent\u002Fsearch?q=&lang=&collections=&limit=&cursor=",": full-text search over published\nentries of collections with a public API (",[669,839,140],{"href":141},"). ",[655,842,843],{},"q"," is up to 200 characters\n(quotes, ",[655,846,847],{},"or",[655,849,850],{},"-word"," work); ",[655,853,854],{},"lang"," one of the site's visible languages; ",[655,857,858],{},"collections"," slugs, comma separated;\n",[655,861,862],{},"limit"," up to 50; ",[655,865,866],{},"cursor"," the ",[655,869,870],{},"next"," of the page before. It answers ",[655,873,874],{},"{ items, next }",", each item with ",[655,877,738],{},",\n",[655,880,881],{},"id",", ",[655,884,885],{},"slug",[655,887,888],{},"title",[655,890,891],{},"highlights: [{ field, text, ranges }]",", the text around the match as plain text with the\nmatched ",[655,894,895],{},"[start, end)"," ranges, never HTML. It is rate limited per token (429), refuses a search that takes more than\n3 seconds (503), and answers 404 while an admin has Search switched off.",[702,898,899,900,667,903,906,907,910,911,914,915,917,918,778,921,924,925,928,929,932,933,936,937,940,941,944,945,948],{},"The TypeScript client ",[655,901,902],{},"@shadestack\u002Fcore\u002Fsdk",[655,904,905],{},"createShadeClient",") uses v1, with ",[655,908,909],{},"search(query, options)",". It is plain ",[655,912,913],{},"fetch"," and works in any\nframework. Given the types ",[655,916,742],{}," writes (",[655,919,920],{},"createShadeClient\u003CShadeCollections>(…)",[655,922,923],{},"collection(slug)"," knows\neach collection's data. It knows no module: a module's read model is ",[655,926,927],{},"read\u003CT>(path, query)","; a site's pages are\n",[655,930,931],{},"@shadestack\u002Fclient\u002Frender","'s ",[655,934,935],{},"createSiteClient",". A request that takes longer than ",[655,938,939],{},"timeoutMs"," (10 seconds by\ndefault) fails with a ",[655,942,943],{},"TimeoutError","; ",[655,946,947],{},"signal"," aborts every request still running.",[702,950,951,952,955,956,959,960,963,964,967,968,971,972,975,976,979,980,983,984,987,988,991],{},"Errors are JSON: ",[655,953,954],{},"{ \"error\": { \"code\", \"message\", \"key\"?, \"params\"?, \"issues\"? } }"," with ",[655,957,958],{},"VALIDATION"," (422),\n",[655,961,962],{},"UNAUTHORIZED"," (401), ",[655,965,966],{},"FORBIDDEN"," (403), ",[655,969,970],{},"NOT_FOUND"," (404), ",[655,973,974],{},"CONFLICT"," (409) or ",[655,977,978],{},"RATE_LIMITED"," (429), and from the\nserver's side ",[655,981,982],{},"UNAVAILABLE"," (503: starting up, maintenance mode, Redis down, too busy, or an outside service it needs\nfailing; try again after ",[655,985,986],{},"Retry-After",") or ",[655,989,990],{},"INTERNAL"," (500: a failure SHADE did not expect, recorded in its error\nlog). The OpenAPI document describes the 4xx, 500 and 503 answers of every route.",[702,993,994,995,997,998,1001,1002,1005],{},"The admin screens' own API (",[655,996,765],{}," without ",[655,999,1000],{},"public"," or ",[655,1003,1004],{},"visitor",") is not part of the contract.",[702,1007,1008,1009,1012,1013,1016],{},"Every instance serves ",[655,1010,1011],{},"\u002F.well-known\u002Fsecurity.txt"," (RFC 9116): where to report a security hole in it\n(",[655,1014,1015],{},"SHADE_SECURITY_CONTACT","; empty, SHADE's maintainers' address), in Dutch or English.",[623,1018,1020],{"id":1019},"examples","Examples",[619,1022,1023,1024,1026],{},"Every route is in the ",[669,1025,498],{"href":499},". With a read token, from any shell:",[1028,1029,1034],"pre",{"className":1030,"code":1031,"language":1032,"meta":1033,"style":1033},"language-sh shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","TOKEN=shd_…   # a read token, from the admin's API tokens screen\ncurl -H \"Authorization: Bearer $TOKEN\" https:\u002F\u002Fadmin.example.com\u002Fapi\u002Fv1\u002Fcontent\u002Fsite\ncurl -H \"Authorization: Bearer $TOKEN\" \\\n  \"https:\u002F\u002Fadmin.example.com\u002Fapi\u002Fv1\u002Fcontent\u002Fcollections\u002F\u003Ccollection>?perPage=10&locale=en\"\n","sh","",[655,1035,1036,1057,1082,1100],{"__ignoreMap":1033},[1037,1038,1041,1045,1049,1053],"span",{"class":1039,"line":1040},"line",1,[1037,1042,1044],{"class":1043},"sTEyZ","TOKEN",[1037,1046,1048],{"class":1047},"sMK4o","=",[1037,1050,1052],{"class":1051},"sfazB","shd_…",[1037,1054,1056],{"class":1055},"sHwdD","   # a read token, from the admin's API tokens screen\n",[1037,1058,1060,1064,1067,1070,1073,1076,1079],{"class":1039,"line":1059},2,[1037,1061,1063],{"class":1062},"sBMFI","curl",[1037,1065,1066],{"class":1051}," -H",[1037,1068,1069],{"class":1047}," \"",[1037,1071,1072],{"class":1051},"Authorization: Bearer ",[1037,1074,1075],{"class":1043},"$TOKEN",[1037,1077,1078],{"class":1047},"\"",[1037,1080,1081],{"class":1051}," https:\u002F\u002Fadmin.example.com\u002Fapi\u002Fv1\u002Fcontent\u002Fsite\n",[1037,1083,1085,1087,1089,1091,1093,1095,1097],{"class":1039,"line":1084},3,[1037,1086,1063],{"class":1062},[1037,1088,1066],{"class":1051},[1037,1090,1069],{"class":1047},[1037,1092,1072],{"class":1051},[1037,1094,1075],{"class":1043},[1037,1096,1078],{"class":1047},[1037,1098,1099],{"class":1043}," \\\n",[1037,1101,1103,1106,1109],{"class":1039,"line":1102},4,[1037,1104,1105],{"class":1047},"  \"",[1037,1107,1108],{"class":1051},"https:\u002F\u002Fadmin.example.com\u002Fapi\u002Fv1\u002Fcontent\u002Fcollections\u002F\u003Ccollection>?perPage=10&locale=en",[1037,1110,1111],{"class":1047},"\"\n",[619,1113,1114],{},"With a data token that may write a collection, another system creates an entry, then publishes it:",[1028,1116,1118],{"className":1030,"code":1117,"language":1032,"meta":1033,"style":1033},"curl -X POST -H \"Authorization: Bearer $DATA_TOKEN\" -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"data\":{\"title\":\"Opening hours changed\",\"slug\":\"opening-hours-changed\"},\"note\":\"From the booking system\"}' \\\n  https:\u002F\u002Fadmin.example.com\u002Fapi\u002Fv1\u002Fdata\u002Fcollections\u002Fwebsite-posts\ncurl -X POST -H \"Authorization: Bearer $DATA_TOKEN\" -H \"Content-Type: application\u002Fjson\" -d '{}' \\\n  https:\u002F\u002Fadmin.example.com\u002Fapi\u002Fv1\u002Fdata\u002Fcollections\u002Fwebsite-posts\u002F\u003Cid>\u002Fpublish\n",[655,1119,1120,1152,1168,1173,1211],{"__ignoreMap":1033},[1037,1121,1122,1124,1127,1130,1132,1134,1136,1139,1141,1143,1145,1148,1150],{"class":1039,"line":1040},[1037,1123,1063],{"class":1062},[1037,1125,1126],{"class":1051}," -X",[1037,1128,1129],{"class":1051}," POST",[1037,1131,1066],{"class":1051},[1037,1133,1069],{"class":1047},[1037,1135,1072],{"class":1051},[1037,1137,1138],{"class":1043},"$DATA_TOKEN",[1037,1140,1078],{"class":1047},[1037,1142,1066],{"class":1051},[1037,1144,1069],{"class":1047},[1037,1146,1147],{"class":1051},"Content-Type: application\u002Fjson",[1037,1149,1078],{"class":1047},[1037,1151,1099],{"class":1043},[1037,1153,1154,1157,1160,1163,1166],{"class":1039,"line":1059},[1037,1155,1156],{"class":1051},"  -d",[1037,1158,1159],{"class":1047}," '",[1037,1161,1162],{"class":1051},"{\"data\":{\"title\":\"Opening hours changed\",\"slug\":\"opening-hours-changed\"},\"note\":\"From the booking system\"}",[1037,1164,1165],{"class":1047},"'",[1037,1167,1099],{"class":1043},[1037,1169,1170],{"class":1039,"line":1084},[1037,1171,1172],{"class":1051},"  https:\u002F\u002Fadmin.example.com\u002Fapi\u002Fv1\u002Fdata\u002Fcollections\u002Fwebsite-posts\n",[1037,1174,1175,1177,1179,1181,1183,1185,1187,1189,1191,1193,1195,1197,1199,1202,1204,1207,1209],{"class":1039,"line":1102},[1037,1176,1063],{"class":1062},[1037,1178,1126],{"class":1051},[1037,1180,1129],{"class":1051},[1037,1182,1066],{"class":1051},[1037,1184,1069],{"class":1047},[1037,1186,1072],{"class":1051},[1037,1188,1138],{"class":1043},[1037,1190,1078],{"class":1047},[1037,1192,1066],{"class":1051},[1037,1194,1069],{"class":1047},[1037,1196,1147],{"class":1051},[1037,1198,1078],{"class":1047},[1037,1200,1201],{"class":1051}," -d",[1037,1203,1159],{"class":1047},[1037,1205,1206],{"class":1051},"{}",[1037,1208,1165],{"class":1047},[1037,1210,1099],{"class":1043},[1037,1212,1214,1217,1220,1223,1226,1229],{"class":1039,"line":1213},5,[1037,1215,1216],{"class":1051},"  https:\u002F\u002Fadmin.example.com\u002Fapi\u002Fv1\u002Fdata\u002Fcollections\u002Fwebsite-posts\u002F",[1037,1218,1219],{"class":1047},"\u003C",[1037,1221,1222],{"class":1051},"i",[1037,1224,1225],{"class":1043},"d",[1037,1227,1228],{"class":1047},">",[1037,1230,1231],{"class":1051},"\u002Fpublish\n",[619,1233,1234,1235,1238],{},"A refusal is JSON with a code: ",[655,1236,1237],{},"{ \"error\": { \"code\": \"VALIDATION\", \"message\": \"…\", \"issues\": [ … ] } }",".",[1240,1241,1243],"h3",{"id":1242},"checking-a-webhooks-signature","Checking a webhook's signature",[619,1245,1246,1247,1253,1254,882,1257,1260,1261,667,1264,1267,1268,1271,1272,1275],{},"SHADE signs every webhook it sends with the ",[669,1248,1252],{"href":1249,"rel":1250},"https:\u002F\u002Fwww.standardwebhooks.com",[1251],"nofollow","Standard Webhooks"," scheme: the headers\n",[655,1255,1256],{},"webhook-id",[655,1258,1259],{},"webhook-timestamp"," (seconds) and ",[655,1262,1263],{},"webhook-signature",[655,1265,1266],{},"v1,"," and a base64 HMAC-SHA256 of\n",[655,1269,1270],{},"\u003Cid>.\u003Ctimestamp>.\u003Cbody>","), keyed with the address's secret (",[655,1273,1274],{},"whsec_…",", shown once when the address is added). The\nStandard Webhooks libraries check it in one call; without one, in Node:",[1028,1277,1281],{"className":1278,"code":1279,"language":1280,"meta":1033,"style":1033},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { createHmac, timingSafeEqual } from 'node:crypto'\n\n\u002F** True when the raw body came from SHADE, signed less than five minutes ago. *\u002F\nexport function fromShade(secret: string, headers: Headers, rawBody: string): boolean {\n  const id = headers.get('webhook-id')\n  const timestamp = headers.get('webhook-timestamp')\n  const signatures = headers.get('webhook-signature')\n  if (!id || !timestamp || !signatures) return false\n  if (Math.abs(Date.now() \u002F 1000 - Number(timestamp)) > 300) return false\n  const key = Buffer.from(secret.replace(\u002F^whsec_\u002F, ''), 'base64')\n  const expected = createHmac('sha256', key).update(`${id}.${timestamp}.${rawBody}`).digest()\n  return signatures.split(' ').some((signature) => {\n    const [version, value = ''] = signature.split(',')\n    const given = Buffer.from(value, 'base64')\n    return version === 'v1' && given.length === expected.length && timingSafeEqual(given, expected)\n  })\n}\n","ts",[655,1282,1283,1315,1321,1326,1380,1410,1436,1462,1501,1560,1617,1688,1728,1771,1802,1854,1862],{"__ignoreMap":1033},[1037,1284,1285,1289,1292,1295,1298,1301,1304,1307,1309,1312],{"class":1039,"line":1040},[1037,1286,1288],{"class":1287},"s7zQu","import",[1037,1290,1291],{"class":1047}," {",[1037,1293,1294],{"class":1043}," createHmac",[1037,1296,1297],{"class":1047},",",[1037,1299,1300],{"class":1043}," timingSafeEqual",[1037,1302,1303],{"class":1047}," }",[1037,1305,1306],{"class":1287}," from",[1037,1308,1159],{"class":1047},[1037,1310,1311],{"class":1051},"node:crypto",[1037,1313,1314],{"class":1047},"'\n",[1037,1316,1317],{"class":1039,"line":1059},[1037,1318,1320],{"emptyLinePlaceholder":1319},true,"\n",[1037,1322,1323],{"class":1039,"line":1084},[1037,1324,1325],{"class":1055},"\u002F** True when the raw body came from SHADE, signed less than five minutes ago. *\u002F\n",[1037,1327,1328,1331,1335,1339,1342,1346,1349,1352,1354,1357,1359,1362,1364,1367,1369,1371,1374,1377],{"class":1039,"line":1102},[1037,1329,1330],{"class":1287},"export",[1037,1332,1334],{"class":1333},"spNyl"," function",[1037,1336,1338],{"class":1337},"s2Zo4"," fromShade",[1037,1340,1341],{"class":1047},"(",[1037,1343,1345],{"class":1344},"sHdIc","secret",[1037,1347,1348],{"class":1047},":",[1037,1350,1351],{"class":1062}," string",[1037,1353,1297],{"class":1047},[1037,1355,1356],{"class":1344}," headers",[1037,1358,1348],{"class":1047},[1037,1360,1361],{"class":1062}," Headers",[1037,1363,1297],{"class":1047},[1037,1365,1366],{"class":1344}," rawBody",[1037,1368,1348],{"class":1047},[1037,1370,1351],{"class":1062},[1037,1372,1373],{"class":1047},"):",[1037,1375,1376],{"class":1062}," boolean",[1037,1378,1379],{"class":1047}," {\n",[1037,1381,1382,1385,1388,1391,1393,1395,1398,1401,1403,1405,1407],{"class":1039,"line":1213},[1037,1383,1384],{"class":1333},"  const",[1037,1386,1387],{"class":1043}," id",[1037,1389,1390],{"class":1047}," =",[1037,1392,1356],{"class":1043},[1037,1394,1238],{"class":1047},[1037,1396,1397],{"class":1337},"get",[1037,1399,1341],{"class":1400},"swJcz",[1037,1402,1165],{"class":1047},[1037,1404,1256],{"class":1051},[1037,1406,1165],{"class":1047},[1037,1408,1409],{"class":1400},")\n",[1037,1411,1413,1415,1418,1420,1422,1424,1426,1428,1430,1432,1434],{"class":1039,"line":1412},6,[1037,1414,1384],{"class":1333},[1037,1416,1417],{"class":1043}," timestamp",[1037,1419,1390],{"class":1047},[1037,1421,1356],{"class":1043},[1037,1423,1238],{"class":1047},[1037,1425,1397],{"class":1337},[1037,1427,1341],{"class":1400},[1037,1429,1165],{"class":1047},[1037,1431,1259],{"class":1051},[1037,1433,1165],{"class":1047},[1037,1435,1409],{"class":1400},[1037,1437,1439,1441,1444,1446,1448,1450,1452,1454,1456,1458,1460],{"class":1039,"line":1438},7,[1037,1440,1384],{"class":1333},[1037,1442,1443],{"class":1043}," signatures",[1037,1445,1390],{"class":1047},[1037,1447,1356],{"class":1043},[1037,1449,1238],{"class":1047},[1037,1451,1397],{"class":1337},[1037,1453,1341],{"class":1400},[1037,1455,1165],{"class":1047},[1037,1457,1263],{"class":1051},[1037,1459,1165],{"class":1047},[1037,1461,1409],{"class":1400},[1037,1463,1465,1468,1470,1473,1475,1478,1481,1484,1486,1488,1491,1494,1497],{"class":1039,"line":1464},8,[1037,1466,1467],{"class":1287},"  if",[1037,1469,667],{"class":1400},[1037,1471,1472],{"class":1047},"!",[1037,1474,881],{"class":1043},[1037,1476,1477],{"class":1047}," ||",[1037,1479,1480],{"class":1047}," !",[1037,1482,1483],{"class":1043},"timestamp",[1037,1485,1477],{"class":1047},[1037,1487,1480],{"class":1047},[1037,1489,1490],{"class":1043},"signatures",[1037,1492,1493],{"class":1400},") ",[1037,1495,1496],{"class":1287},"return",[1037,1498,1500],{"class":1499},"sfNiH"," false\n",[1037,1502,1504,1506,1508,1511,1513,1516,1518,1521,1523,1526,1529,1532,1536,1539,1542,1544,1546,1549,1551,1554,1556,1558],{"class":1039,"line":1503},9,[1037,1505,1467],{"class":1287},[1037,1507,667],{"class":1400},[1037,1509,1510],{"class":1043},"Math",[1037,1512,1238],{"class":1047},[1037,1514,1515],{"class":1337},"abs",[1037,1517,1341],{"class":1400},[1037,1519,1520],{"class":1043},"Date",[1037,1522,1238],{"class":1047},[1037,1524,1525],{"class":1337},"now",[1037,1527,1528],{"class":1400},"() ",[1037,1530,1531],{"class":1047},"\u002F",[1037,1533,1535],{"class":1534},"sbssI"," 1000",[1037,1537,1538],{"class":1047}," -",[1037,1540,1541],{"class":1337}," Number",[1037,1543,1341],{"class":1400},[1037,1545,1483],{"class":1043},[1037,1547,1548],{"class":1400},")) ",[1037,1550,1228],{"class":1047},[1037,1552,1553],{"class":1534}," 300",[1037,1555,1493],{"class":1400},[1037,1557,1496],{"class":1287},[1037,1559,1500],{"class":1499},[1037,1561,1563,1565,1568,1570,1573,1575,1578,1580,1582,1584,1587,1589,1591,1594,1597,1599,1601,1604,1606,1608,1610,1613,1615],{"class":1039,"line":1562},10,[1037,1564,1384],{"class":1333},[1037,1566,1567],{"class":1043}," key",[1037,1569,1390],{"class":1047},[1037,1571,1572],{"class":1043}," Buffer",[1037,1574,1238],{"class":1047},[1037,1576,1577],{"class":1337},"from",[1037,1579,1341],{"class":1400},[1037,1581,1345],{"class":1043},[1037,1583,1238],{"class":1047},[1037,1585,1586],{"class":1337},"replace",[1037,1588,1341],{"class":1400},[1037,1590,1531],{"class":1047},[1037,1592,1593],{"class":1287},"^",[1037,1595,1596],{"class":1051},"whsec_",[1037,1598,1531],{"class":1047},[1037,1600,1297],{"class":1047},[1037,1602,1603],{"class":1047}," ''",[1037,1605,671],{"class":1400},[1037,1607,1297],{"class":1047},[1037,1609,1159],{"class":1047},[1037,1611,1612],{"class":1051},"base64",[1037,1614,1165],{"class":1047},[1037,1616,1409],{"class":1400},[1037,1618,1620,1622,1625,1627,1629,1631,1633,1636,1638,1640,1642,1644,1646,1649,1651,1654,1656,1659,1661,1664,1666,1668,1670,1672,1675,1678,1680,1682,1685],{"class":1039,"line":1619},11,[1037,1621,1384],{"class":1333},[1037,1623,1624],{"class":1043}," expected",[1037,1626,1390],{"class":1047},[1037,1628,1294],{"class":1337},[1037,1630,1341],{"class":1400},[1037,1632,1165],{"class":1047},[1037,1634,1635],{"class":1051},"sha256",[1037,1637,1165],{"class":1047},[1037,1639,1297],{"class":1047},[1037,1641,1567],{"class":1043},[1037,1643,671],{"class":1400},[1037,1645,1238],{"class":1047},[1037,1647,1648],{"class":1337},"update",[1037,1650,1341],{"class":1400},[1037,1652,1653],{"class":1047},"`${",[1037,1655,881],{"class":1043},[1037,1657,1658],{"class":1047},"}",[1037,1660,1238],{"class":1051},[1037,1662,1663],{"class":1047},"${",[1037,1665,1483],{"class":1043},[1037,1667,1658],{"class":1047},[1037,1669,1238],{"class":1051},[1037,1671,1663],{"class":1047},[1037,1673,1674],{"class":1043},"rawBody",[1037,1676,1677],{"class":1047},"}`",[1037,1679,671],{"class":1400},[1037,1681,1238],{"class":1047},[1037,1683,1684],{"class":1337},"digest",[1037,1686,1687],{"class":1400},"()\n",[1037,1689,1691,1694,1696,1698,1701,1703,1705,1707,1709,1711,1714,1716,1718,1721,1723,1726],{"class":1039,"line":1690},12,[1037,1692,1693],{"class":1287},"  return",[1037,1695,1443],{"class":1043},[1037,1697,1238],{"class":1047},[1037,1699,1700],{"class":1337},"split",[1037,1702,1341],{"class":1400},[1037,1704,1165],{"class":1047},[1037,1706,1159],{"class":1047},[1037,1708,671],{"class":1400},[1037,1710,1238],{"class":1047},[1037,1712,1713],{"class":1337},"some",[1037,1715,1341],{"class":1400},[1037,1717,1341],{"class":1047},[1037,1719,1720],{"class":1344},"signature",[1037,1722,671],{"class":1047},[1037,1724,1725],{"class":1333}," =>",[1037,1727,1379],{"class":1047},[1037,1729,1731,1734,1737,1740,1742,1745,1747,1749,1752,1754,1757,1759,1761,1763,1765,1767,1769],{"class":1039,"line":1730},13,[1037,1732,1733],{"class":1333},"    const",[1037,1735,1736],{"class":1047}," [",[1037,1738,1739],{"class":1043},"version",[1037,1741,1297],{"class":1047},[1037,1743,1744],{"class":1043}," value",[1037,1746,1390],{"class":1047},[1037,1748,1603],{"class":1047},[1037,1750,1751],{"class":1047},"]",[1037,1753,1390],{"class":1047},[1037,1755,1756],{"class":1043}," signature",[1037,1758,1238],{"class":1047},[1037,1760,1700],{"class":1337},[1037,1762,1341],{"class":1400},[1037,1764,1165],{"class":1047},[1037,1766,1297],{"class":1051},[1037,1768,1165],{"class":1047},[1037,1770,1409],{"class":1400},[1037,1772,1774,1776,1779,1781,1783,1785,1787,1789,1792,1794,1796,1798,1800],{"class":1039,"line":1773},14,[1037,1775,1733],{"class":1333},[1037,1777,1778],{"class":1043}," given",[1037,1780,1390],{"class":1047},[1037,1782,1572],{"class":1043},[1037,1784,1238],{"class":1047},[1037,1786,1577],{"class":1337},[1037,1788,1341],{"class":1400},[1037,1790,1791],{"class":1043},"value",[1037,1793,1297],{"class":1047},[1037,1795,1159],{"class":1047},[1037,1797,1612],{"class":1051},[1037,1799,1165],{"class":1047},[1037,1801,1409],{"class":1400},[1037,1803,1805,1808,1811,1814,1816,1819,1821,1824,1826,1828,1831,1833,1835,1837,1839,1841,1843,1845,1848,1850,1852],{"class":1039,"line":1804},15,[1037,1806,1807],{"class":1287},"    return",[1037,1809,1810],{"class":1043}," version",[1037,1812,1813],{"class":1047}," ===",[1037,1815,1159],{"class":1047},[1037,1817,1818],{"class":1051},"v1",[1037,1820,1165],{"class":1047},[1037,1822,1823],{"class":1047}," &&",[1037,1825,1778],{"class":1043},[1037,1827,1238],{"class":1047},[1037,1829,1830],{"class":1043},"length",[1037,1832,1813],{"class":1047},[1037,1834,1624],{"class":1043},[1037,1836,1238],{"class":1047},[1037,1838,1830],{"class":1043},[1037,1840,1823],{"class":1047},[1037,1842,1300],{"class":1337},[1037,1844,1341],{"class":1400},[1037,1846,1847],{"class":1043},"given",[1037,1849,1297],{"class":1047},[1037,1851,1624],{"class":1043},[1037,1853,1409],{"class":1400},[1037,1855,1857,1860],{"class":1039,"line":1856},16,[1037,1858,1859],{"class":1047},"  }",[1037,1861,1409],{"class":1400},[1037,1863,1865],{"class":1039,"line":1864},17,[1037,1866,1867],{"class":1047},"}\n",[619,1869,1870,1871,1873],{},"Check the body exactly as it arrived, before parsing it. ",[655,1872,1256],{}," is the same on every try of one message, so a\nreceiver that stores the ids it handled answers a retry without doing the work twice.",[623,1875,1877],{"id":1876},"rendering-pages-in-another-framework","Rendering pages in another framework",[619,1879,1880,1881,1884,1885,1888,1889,747],{},"The website module's pages are trees of elements (",[655,1882,1883],{},"PublishedPage.tree","), which\n",[655,1886,1887],{},"@shadestack\u002Frender"," resolves for every framework (",[669,1890,1891],{"href":504},"Frameworks",[699,1893,1894,1912],{},[702,1895,1896,1899,1900,1903,1904,1907,1908,1911],{},[655,1897,1898],{},"GET \u002Fapi\u002Fv1\u002Fcontent\u002Fwebsite\u002Ftheme.css",": the theme as CSS variables (",[655,1901,1902],{},"--color-primary",", spacing, fonts) with the\nweb fonts' ",[655,1905,1906],{},"@font-face"," rules, the same CSS the Astro site puts in its pages; a read model of the website module,\nunder its prefix (below). The site's styles (",[655,1909,1910],{},"styles.css",", as the last publish compiled them) use these variables\nas their defaults and leave them out, so a site writes them once.",[702,1913,1914,1915,747],{},"Code: the website module's read routes (",[655,1916,1917],{},"server\u002Fread.ts",[623,1919,1921],{"id":1920},"how-the-document-is-made","How the document is made",[619,1923,1924,1925,731,1928,1931],{},"Each route in ",[655,1926,1927],{},"apps\u002Fapi\u002Fsrc\u002Froutes\u002Fcontent.ts",[655,1929,1930],{},"routes\u002Fuser.ts"," carries a description next to\nit, from the same Zod schemas its controller parses with:",[1028,1933,1935],{"className":1278,"code":1934,"language":1280,"meta":1033,"style":1033},"group.get('\u002Fmedia', doc({ summary: 'Media items by id, with their sizes and alt text', query: read.MediaIds }), read.media)\n",[655,1936,1937],{"__ignoreMap":1033},[1037,1938,1939,1942,1944,1946,1948,1950,1953,1955,1957,1960,1962,1965,1968,1970,1972,1975,1977,1979,1982,1984,1987,1989,1992,1994,1996,1998,2000,2002],{"class":1039,"line":1040},[1037,1940,1941],{"class":1043},"group",[1037,1943,1238],{"class":1047},[1037,1945,1397],{"class":1337},[1037,1947,1341],{"class":1043},[1037,1949,1165],{"class":1047},[1037,1951,1952],{"class":1051},"\u002Fmedia",[1037,1954,1165],{"class":1047},[1037,1956,1297],{"class":1047},[1037,1958,1959],{"class":1337}," doc",[1037,1961,1341],{"class":1043},[1037,1963,1964],{"class":1047},"{",[1037,1966,1967],{"class":1400}," summary",[1037,1969,1348],{"class":1047},[1037,1971,1159],{"class":1047},[1037,1973,1974],{"class":1051},"Media items by id, with their sizes and alt text",[1037,1976,1165],{"class":1047},[1037,1978,1297],{"class":1047},[1037,1980,1981],{"class":1400}," query",[1037,1983,1348],{"class":1047},[1037,1985,1986],{"class":1043}," read",[1037,1988,1238],{"class":1047},[1037,1990,1991],{"class":1043},"MediaIds ",[1037,1993,1658],{"class":1047},[1037,1995,671],{"class":1043},[1037,1997,1297],{"class":1047},[1037,1999,1986],{"class":1043},[1037,2001,1238],{"class":1047},[1037,2003,2004],{"class":1043},"media)\n",[699,2006,2007,2020,2030,2064,2078],{},[702,2008,2009,667,2012,2015,2016,2019],{},[655,2010,2011],{},"doc({ summary, description?, query?, body?, bodyType?, auth? })",[655,2013,2014],{},"apps\u002Fapi\u002Fsrc\u002Fhttp\u002Frouter.ts",") is not run as\nmiddleware; a group made with ",[655,2017,2018],{},"routes(app, { document })"," records the route.",[702,2021,2022,2025,2026,2029],{},[655,2023,2024],{},"apps\u002Fapi\u002Fsrc\u002Fhttp\u002Fopenapi.ts"," turns the recorded routes into the document. Zod's own ",[655,2027,2028],{},"z.toJSONSchema"," (input\nside) gives the schemas, so there is no extra dependency and a route cannot drift from its description.",[702,2031,2032,2033,2036,2037,667,2039,882,2042,882,2045,2048,2049,2052,2053,2056,2057,2060,2061,1238],{},"Responses are described in words for now; their shapes are the types in ",[655,2034,2035],{},"@shadestack\u002Fcore\u002Fschema",", and the website\nmodule's pages' in ",[655,2038,1887],{},[655,2040,2041],{},"PublishedPage",[655,2043,2044],{},"PublishedLayout",[655,2046,2047],{},"PublishedTheme","). The collection\nreads are the exception, for a read token only: ",[655,2050,2051],{},"withCollections"," adds each public collection's published entry\n(",[655,2054,2055],{},"publicCollectionSchemas",", from ",[655,2058,2059],{},"publishedDataSchema","); tests in ",[655,2062,2063],{},"apps\u002Fapi\u002Ftest\u002Fhttp\u002Fopenapi.collections.test.ts",[702,2065,2066,2067,2070,2071,2074,2075,1238],{},"Modules' read models are described at the address they are served at, under their module's prefix:\nthe website module's ",[655,2068,2069],{},"\u002Fpages"," as ",[655,2072,2073],{},"\u002Fapi\u002Fv1\u002Fcontent\u002Fwebsite\u002Fpages",". Core adds the prefix from the module's name for\nevery module and knows none of their paths; a path without a module's prefix is 404. Tests: ",[655,2076,2077],{},"apps\u002Fapi\u002Ftest\u002Fhttp\u002Fcontrollers\u002Fcontent.module-read.test.ts",[702,2079,2080,2081,2084,2085,731,2088,2091,2092,731,2095,2098],{},"Tests: ",[655,2082,2083],{},"apps\u002Fapi\u002Ftest\u002Fhttp\u002Fopenapi.versioned.test.ts"," checks the document (paths, path and query parameters, bodies,\nauthentication), that v1 answers and that the unversioned ",[655,2086,2087],{},"\u002Fapi\u002Fpublic",[655,2089,2090],{},"\u002Fapi\u002Fvisitor"," and the\nold ",[655,2093,2094],{},"\u002Fapi\u002Fv1\u002Fpublic",[655,2096,2097],{},"\u002Fapi\u002Fv1\u002Fvisitor"," are 404.",[623,2100,2102],{"id":2101},"details","Details",[699,2104,2105],{},[702,2106,2107,2108,2111,2112,2115,2116,2119,2120,2123,2124,731,2127,2130,2131,2134,2135,2137,2138,2141,2142,2144,2145,2148,2149,2152,2153,667,2155,2158,2159,2162,2163,2166,2167,2170],{},"Site settings in code: ",[655,2109,2110],{},"SiteSettings"," in ",[655,2113,2114],{},"shade\u002Ffeatures\u002Fsettings\u002Fshared\u002Fsettings.ts","; the site's name, URL and\nlanguages are read with ",[655,2117,2118],{},"content.read"," at ",[655,2121,2122],{},"GET \u002Fapi\u002Fsettings\u002Fpublic","; over MCP ",[655,2125,2126],{},"settings.read",[655,2128,2129],{},"settings.update","\nare in the ",[655,2132,2133],{},"admin"," class, which the AI never holds. The admin form sends only the top-level\nsections that changed; saving is a partial update (",[655,2136,781],{},"): only the sections sent change, ",[655,2139,2140],{},"defaultSeo"," is merged\none level deep, then the whole result is validated again; fields not sent are never reset; the route hands the body\nto the service as sent (",[655,2143,1674],{},"), so the partial schema fills in no defaults for what was not sent. Time zone must\nbe an IANA name the server knows, else VALIDATION \"Unknown time zone\"; changing the default language once any\ncollection has an entry is CONFLICT. Per-language name and default SEO live in ",[655,2146,2147],{},"translations",". A stored settings row\nfrom before multi-language (a single ",[655,2150,2151],{},"locale",") is read as that default language. The public site data leaves out\n",[655,2154,2140],{},[655,2156,2157],{},"PublishedSettings","); the defaults are applied on the server when a page is resolved. A settings change\nrequests a rebuild of the frontends after the save commits. On the site the site name is ",[655,2160,2161],{},"og:site_name",", the site URL\nis used for canonical URLs, ",[655,2164,2165],{},"hreflang"," links and the sitemap, and ",[655,2168,2169],{},"\u003Ctitle>"," is the title template.",[2172,2173,2174],"style",{},"html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sfNiH, html code.shiki .sfNiH{--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}",{"title":1033,"searchDepth":1059,"depth":1059,"links":2176},[2177,2178,2181,2182,2183],{"id":625,"depth":1059,"text":626},{"id":1019,"depth":1059,"text":1020,"children":2179},[2180],{"id":1242,"depth":1084,"text":1243},{"id":1876,"depth":1059,"text":1877},{"id":1920,"depth":1059,"text":1921},{"id":2101,"depth":1059,"text":2102},"md",null,{},{"title":494,"description":1033},"tuVxTidBaqmfkF_bNXp_1I5r11y_64n7Pf7NnU2m7RU",[2190,2191],{"title":490,"path":491,"stem":492,"description":1033,"children":-1},{"title":498,"path":499,"stem":500,"description":1033,"children":-1},1796500155217]