[{"data":1,"prerenderedAt":7245},["ShallowReactive",2],{"navigation_docs":3,"-modules-communication-inbox":732,"-modules-communication-inbox-surround":7240},[4,54,159,535,608,651],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":53},"Get Started","i-lucide-rocket","\u002Fget-started","1.get-started",[10,15,20,24,29,34,39,44,48],{"title":11,"path":12,"stem":13,"icon":14},"Introduction","\u002Fget-started\u002Fintroduction","1.get-started\u002F1.introduction","i-lucide-house",{"title":16,"path":17,"stem":18,"icon":19},"Installation","\u002Fget-started\u002Finstallation","1.get-started\u002F2.installation","i-lucide-download",{"title":21,"path":22,"stem":23},"Project Structure","\u002Fget-started\u002Fproject-structure","1.get-started\u002F3.project-structure",{"title":25,"path":26,"stem":27,"icon":28},"Configuration","\u002Fget-started\u002Fconfiguration","1.get-started\u002F4.configuration","i-lucide-settings",{"title":30,"path":31,"stem":32,"icon":33},"Authentication","\u002Fget-started\u002Fauthentication","1.get-started\u002F5.authentication","i-lucide-lock",{"title":35,"path":36,"stem":37,"icon":38},"Adding modules","\u002Fget-started\u002Fadding-modules","1.get-started\u002F6.adding-modules","i-lucide-puzzle",{"title":40,"path":41,"stem":42,"icon":43},"Database","\u002Fget-started\u002Fdatabase","1.get-started\u002F7.database","i-lucide-database",{"title":45,"path":46,"stem":47,"icon":6},"Deployment","\u002Fget-started\u002Fdeployment","1.get-started\u002F8.deployment",{"title":49,"path":50,"stem":51,"icon":52},"Upgrading","\u002Fget-started\u002Fupgrading","1.get-started\u002F9.upgrading","i-lucide-circle-arrow-up",false,{"title":55,"icon":56,"path":57,"stem":58,"children":59,"page":53},"Guide","i-lucide-book-open","\u002Fguide","2.guide",[60,94,119,129],{"title":61,"icon":53,"path":62,"stem":63,"children":64,"page":53},"Concepts","\u002Fguide\u002Fconcepts","2.guide\u002F1.concepts",[65,70,75,80,84,89],{"title":66,"path":67,"stem":68,"icon":69},"Architecture","\u002Fguide\u002Fconcepts\u002Farchitecture","2.guide\u002F1.concepts\u002F1.architecture","i-lucide-blocks",{"title":71,"path":72,"stem":73,"icon":74},"Access control","\u002Fguide\u002Fconcepts\u002Fauth-and-scopes","2.guide\u002F1.concepts\u002F2.auth-and-scopes","i-lucide-shield-check",{"title":76,"path":77,"stem":78,"icon":79},"Extension points","\u002Fguide\u002Fconcepts\u002Fextension-points","2.guide\u002F1.concepts\u002F3.extension-points","i-lucide-plug",{"title":81,"path":82,"stem":83,"icon":43},"Database extensions","\u002Fguide\u002Fconcepts\u002Fdatabase-extensions","2.guide\u002F1.concepts\u002F4.database-extensions",{"title":85,"path":86,"stem":87,"icon":88},"Identity","\u002Fguide\u002Fconcepts\u002Fidentity","2.guide\u002F1.concepts\u002F5.identity","i-lucide-fingerprint",{"title":90,"path":91,"stem":92,"icon":93},"Glossary","\u002Fguide\u002Fconcepts\u002Fglossary","2.guide\u002F1.concepts\u002F6.glossary","i-lucide-book-a",{"title":95,"icon":53,"path":96,"stem":97,"children":98,"page":53},"UX patterns","\u002Fguide\u002Fux-patterns","2.guide\u002F2.ux-patterns",[99,104,109,114],{"title":100,"path":101,"stem":102,"icon":103},"Layouts and navigation","\u002Fguide\u002Fux-patterns\u002Flayouts-and-navigation","2.guide\u002F2.ux-patterns\u002F1.layouts-and-navigation","i-lucide-layout-template",{"title":105,"path":106,"stem":107,"icon":108},"Pages","\u002Fguide\u002Fux-patterns\u002Fpages","2.guide\u002F2.ux-patterns\u002F2.pages","i-lucide-table",{"title":110,"path":111,"stem":112,"icon":113},"Forms and actions","\u002Fguide\u002Fux-patterns\u002Fforms-and-actions","2.guide\u002F2.ux-patterns\u002F3.forms-and-actions","i-lucide-square-pen",{"title":115,"path":116,"stem":117,"icon":118},"Text and formatting","\u002Fguide\u002Fux-patterns\u002Ftext-and-formatting","2.guide\u002F2.ux-patterns\u002F4.text-and-formatting","i-lucide-type",{"title":120,"icon":53,"path":121,"stem":122,"children":123,"page":53},"Best practices","\u002Fguide\u002Fbest-practices","2.guide\u002F3.best-practices",[124],{"title":125,"path":126,"stem":127,"icon":128},"HTTP routes","\u002Fguide\u002Fbest-practices\u002Fhttp-routes","2.guide\u002F3.best-practices\u002F1.http-routes","i-lucide-route",{"title":130,"icon":53,"path":131,"stem":132,"children":133,"page":53},"Going further","\u002Fguide\u002Fgoing-further","2.guide\u002F4.going-further",[134,139,144,149,154],{"title":135,"path":136,"stem":137,"icon":138},"Use your own OAuth server","\u002Fguide\u002Fgoing-further\u002Fown-oauth-server","2.guide\u002F4.going-further\u002F1.own-oauth-server","i-lucide-key-round",{"title":140,"path":141,"stem":142,"icon":143},"Create an OAuth application","\u002Fguide\u002Fgoing-further\u002Foauth-application","2.guide\u002F4.going-further\u002F2.oauth-application","i-lucide-app-window",{"title":145,"path":146,"stem":147,"icon":148},"Signing keys","\u002Fguide\u002Fgoing-further\u002Fsigning-keys","2.guide\u002F4.going-further\u002F3.signing-keys","i-lucide-key-square",{"title":150,"path":151,"stem":152,"icon":153},"Stripe setup","\u002Fguide\u002Fgoing-further\u002Fstripe-setup","2.guide\u002F4.going-further\u002F4.stripe-setup","i-lucide-credit-card",{"title":155,"path":156,"stem":157,"icon":158},"Migrate to the permission model","\u002Fguide\u002Fgoing-further\u002Fmigrate-access-control","2.guide\u002F4.going-further\u002F5.migrate-access-control","i-lucide-arrow-right-left",{"title":160,"icon":161,"path":162,"stem":163,"children":164},"Modules","i-lucide-boxes","\u002Fmodules","3.modules",[165,167,252,261,290,303,350,396,473,518],{"title":160,"path":162,"stem":166},"3.modules\u002Findex",{"title":85,"icon":53,"path":168,"stem":169,"children":170,"page":53},"\u002Fmodules\u002Fidentity","3.modules\u002F1.identity",[171,198,202,206,228,232,248],{"title":172,"path":173,"stem":174,"children":175},"Auth","\u002Fmodules\u002Fidentity\u002Fauth","3.modules\u002F1.identity\u002F1.auth\u002Findex",[176,178,182,186,190,194],{"title":177,"path":173,"stem":174},"Overview",{"title":179,"path":180,"stem":181},"Server API","\u002Fmodules\u002Fidentity\u002Fauth\u002Fserver","3.modules\u002F1.identity\u002F1.auth\u002F2.server",{"title":183,"path":184,"stem":185},"Reference","\u002Fmodules\u002Fidentity\u002Fauth\u002Freference","3.modules\u002F1.identity\u002F1.auth\u002F3.reference",{"title":187,"path":188,"stem":189},"Client mode","\u002Fmodules\u002Fidentity\u002Fauth\u002Fclient-mode","3.modules\u002F1.identity\u002F1.auth\u002F4.client-mode",{"title":191,"path":192,"stem":193},"OAuth providers","\u002Fmodules\u002Fidentity\u002Fauth\u002Foauth-providers","3.modules\u002F1.identity\u002F1.auth\u002F5.oauth-providers",{"title":195,"path":196,"stem":197},"Resource mode","\u002Fmodules\u002Fidentity\u002Fauth\u002Fresource-mode","3.modules\u002F1.identity\u002F1.auth\u002F6.resource-mode",{"title":199,"path":200,"stem":201},"Users","\u002Fmodules\u002Fidentity\u002Fusers","3.modules\u002F1.identity\u002F2.users",{"title":203,"path":204,"stem":205},"Account","\u002Fmodules\u002Fidentity\u002Faccount","3.modules\u002F1.identity\u002F3.account",{"title":207,"path":208,"stem":209,"children":210},"Authorization","\u002Fmodules\u002Fidentity\u002Fauthorization","3.modules\u002F1.identity\u002F4.authorization\u002Findex",[211,212,216,220,224],{"title":177,"path":208,"stem":209},{"title":213,"path":214,"stem":215},"Roles and requirements","\u002Fmodules\u002Fidentity\u002Fauthorization\u002Froles-and-requirements","3.modules\u002F1.identity\u002F4.authorization\u002F2.roles-and-requirements",{"title":217,"path":218,"stem":219},"Policies","\u002Fmodules\u002Fidentity\u002Fauthorization\u002Fpolicies","3.modules\u002F1.identity\u002F4.authorization\u002F3.policies",{"title":221,"path":222,"stem":223},"Client","\u002Fmodules\u002Fidentity\u002Fauthorization\u002Fclient","3.modules\u002F1.identity\u002F4.authorization\u002F4.client",{"title":225,"path":226,"stem":227},"Admin","\u002Fmodules\u002Fidentity\u002Fauthorization\u002Fadmin","3.modules\u002F1.identity\u002F4.authorization\u002F5.admin",{"title":229,"path":230,"stem":231},"Preferences","\u002Fmodules\u002Fidentity\u002Fpreferences","3.modules\u002F1.identity\u002F5.preferences",{"title":233,"path":234,"stem":235,"children":236},"OAuth Server","\u002Fmodules\u002Fidentity\u002Foauth-server","3.modules\u002F1.identity\u002F6.oauth-server\u002Findex",[237,238,241,245],{"title":177,"path":234,"stem":235},{"title":179,"path":239,"stem":240},"\u002Fmodules\u002Fidentity\u002Foauth-server\u002Fserver","3.modules\u002F1.identity\u002F6.oauth-server\u002F2.server",{"title":242,"path":243,"stem":244},"Hooks","\u002Fmodules\u002Fidentity\u002Foauth-server\u002Fhooks","3.modules\u002F1.identity\u002F6.oauth-server\u002F3.hooks",{"title":183,"path":246,"stem":247},"\u002Fmodules\u002Fidentity\u002Foauth-server\u002Froutes-and-clients","3.modules\u002F1.identity\u002F6.oauth-server\u002F4.routes-and-clients",{"title":249,"path":250,"stem":251},"OAuth Resource","\u002Fmodules\u002Fidentity\u002Foauth-resource","3.modules\u002F1.identity\u002F8.oauth-resource",{"title":253,"icon":53,"path":254,"stem":255,"children":256,"page":53},"Organisation","\u002Fmodules\u002Forganisation","3.modules\u002F2.organisation",[257],{"title":258,"path":259,"stem":260},"Teams","\u002Fmodules\u002Forganisation\u002Fteams","3.modules\u002F2.organisation\u002F1.teams",{"title":262,"icon":53,"path":263,"stem":264,"children":265,"page":53},"Commerce","\u002Fmodules\u002Fcommerce","3.modules\u002F3.commerce",[266,270,274],{"title":267,"path":268,"stem":269},"Stripe","\u002Fmodules\u002Fcommerce\u002Fstripe","3.modules\u002F3.commerce\u002F1.stripe",{"title":271,"path":272,"stem":273},"Payments","\u002Fmodules\u002Fcommerce\u002Fpayments","3.modules\u002F3.commerce\u002F2.payments",{"title":275,"path":276,"stem":277,"children":278},"Subscriptions","\u002Fmodules\u002Fcommerce\u002Fsubscriptions","3.modules\u002F3.commerce\u002F3.subscriptions\u002Findex",[279,280,283,287],{"title":177,"path":276,"stem":277},{"title":179,"path":281,"stem":282},"\u002Fmodules\u002Fcommerce\u002Fsubscriptions\u002Fserver","3.modules\u002F3.commerce\u002F3.subscriptions\u002F2.server",{"title":284,"path":285,"stem":286},"App","\u002Fmodules\u002Fcommerce\u002Fsubscriptions\u002Fapp","3.modules\u002F3.commerce\u002F3.subscriptions\u002F3.app",{"title":183,"path":288,"stem":289},"\u002Fmodules\u002Fcommerce\u002Fsubscriptions\u002Freference","3.modules\u002F3.commerce\u002F3.subscriptions\u002F4.reference",{"title":291,"icon":53,"path":292,"stem":293,"children":294,"page":53},"Content","\u002Fmodules\u002Fcontent","3.modules\u002F4.content",[295,299],{"title":296,"path":297,"stem":298},"Help center","\u002Fmodules\u002Fcontent\u002Fhelp-center","3.modules\u002F4.content\u002F2.help-center",{"title":300,"path":301,"stem":302},"Documents","\u002Fmodules\u002Fcontent\u002Fdocuments","3.modules\u002F4.content\u002F3.documents",{"title":304,"icon":53,"path":305,"stem":306,"children":307,"page":53},"Features","\u002Fmodules\u002Ffeatures","3.modules\u002F5.features",[308,323,342,346],{"title":309,"path":310,"stem":311,"children":312},"Events","\u002Fmodules\u002Ffeatures\u002Fevents","3.modules\u002F5.features\u002F1.events\u002Findex",[313,314,317,320],{"title":177,"path":310,"stem":311},{"title":179,"path":315,"stem":316},"\u002Fmodules\u002Ffeatures\u002Fevents\u002Fserver","3.modules\u002F5.features\u002F1.events\u002F2.server",{"title":284,"path":318,"stem":319},"\u002Fmodules\u002Ffeatures\u002Fevents\u002Fapp","3.modules\u002F5.features\u002F1.events\u002F3.app",{"title":183,"path":321,"stem":322},"\u002Fmodules\u002Ffeatures\u002Fevents\u002Freference","3.modules\u002F5.features\u002F1.events\u002F4.reference",{"title":324,"path":325,"stem":326,"children":327},"Forms","\u002Fmodules\u002Ffeatures\u002Fforms","3.modules\u002F5.features\u002F2.forms\u002Findex",[328,329,333,336,339],{"title":177,"path":325,"stem":326},{"title":330,"path":331,"stem":332},"Definition","\u002Fmodules\u002Ffeatures\u002Fforms\u002Fdefinition","3.modules\u002F5.features\u002F2.forms\u002F2.definition",{"title":179,"path":334,"stem":335},"\u002Fmodules\u002Ffeatures\u002Fforms\u002Fserver","3.modules\u002F5.features\u002F2.forms\u002F3.server",{"title":284,"path":337,"stem":338},"\u002Fmodules\u002Ffeatures\u002Fforms\u002Fapp","3.modules\u002F5.features\u002F2.forms\u002F4.app",{"title":183,"path":340,"stem":341},"\u002Fmodules\u002Ffeatures\u002Fforms\u002Freference","3.modules\u002F5.features\u002F2.forms\u002F5.reference",{"title":343,"path":344,"stem":345},"Cookie Consent","\u002Fmodules\u002Ffeatures\u002Fcookie-consent","3.modules\u002F5.features\u002F3.cookie-consent",{"title":347,"path":348,"stem":349},"MCP","\u002Fmodules\u002Ffeatures\u002Fmcp","3.modules\u002F5.features\u002F4.mcp",{"title":351,"icon":53,"path":352,"stem":353,"children":354,"page":53},"Communication","\u002Fmodules\u002Fcommunication","3.modules\u002F6.communication",[355,359,376,380,384,388,392],{"title":356,"path":357,"stem":358},"Notify","\u002Fmodules\u002Fcommunication\u002Fnotify","3.modules\u002F6.communication\u002F1.notify",{"title":360,"path":361,"stem":362,"children":363},"Email Templates","\u002Fmodules\u002Fcommunication\u002Femail-templates","3.modules\u002F6.communication\u002F2.email-templates\u002Findex",[364,365,369,372],{"title":177,"path":361,"stem":362},{"title":366,"path":367,"stem":368},"Email components","\u002Fmodules\u002Fcommunication\u002Femail-templates\u002Fcomponents","3.modules\u002F6.communication\u002F2.email-templates\u002F2.components",{"title":179,"path":370,"stem":371},"\u002Fmodules\u002Fcommunication\u002Femail-templates\u002Fserver","3.modules\u002F6.communication\u002F2.email-templates\u002F3.server",{"title":373,"path":374,"stem":375},"Module emails","\u002Fmodules\u002Fcommunication\u002Femail-templates\u002Fmodule-emails","3.modules\u002F6.communication\u002F2.email-templates\u002F4.module-emails",{"title":377,"path":378,"stem":379},"Push","\u002Fmodules\u002Fcommunication\u002Fpush","3.modules\u002F6.communication\u002F3.push",{"title":381,"path":382,"stem":383},"Inbox","\u002Fmodules\u002Fcommunication\u002Finbox","3.modules\u002F6.communication\u002F4.inbox",{"title":385,"path":386,"stem":387},"Short links","\u002Fmodules\u002Fcommunication\u002Fshort-links","3.modules\u002F6.communication\u002F5.short-links",{"title":389,"path":390,"stem":391},"Campaigns","\u002Fmodules\u002Fcommunication\u002Fcampaigns","3.modules\u002F6.communication\u002F6.campaigns",{"title":393,"path":394,"stem":395},"SMS","\u002Fmodules\u002Fcommunication\u002Fsms","3.modules\u002F6.communication\u002F7.sms",{"title":397,"icon":53,"path":398,"stem":399,"children":400,"page":53},"Interface","\u002Fmodules\u002Finterface","3.modules\u002F7.interface",[401,426,429,433,437,451,455,469],{"title":402,"path":403,"stem":404,"children":405},"UI","\u002Fmodules\u002Finterface\u002Fui","3.modules\u002F7.interface\u002F1.ui\u002Findex",[406,407,411,415,419,423],{"title":177,"path":403,"stem":404},{"title":408,"path":409,"stem":410},"Page components","\u002Fmodules\u002Finterface\u002Fui\u002Fpage-components","3.modules\u002F7.interface\u002F1.ui\u002F2.page-components",{"title":412,"path":413,"stem":414},"App shell","\u002Fmodules\u002Finterface\u002Fui\u002Fapp-shell","3.modules\u002F7.interface\u002F1.ui\u002F3.app-shell",{"title":416,"path":417,"stem":418},"Form inputs","\u002Fmodules\u002Finterface\u002Fui\u002Fform-inputs","3.modules\u002F7.interface\u002F1.ui\u002F4.form-inputs",{"title":420,"path":421,"stem":422},"Composables and helpers","\u002Fmodules\u002Finterface\u002Fui\u002Fcomposables","3.modules\u002F7.interface\u002F1.ui\u002F5.composables",{"title":183,"path":424,"stem":425},"\u002Fmodules\u002Finterface\u002Fui\u002Freference","3.modules\u002F7.interface\u002F1.ui\u002F6.reference",{"title":225,"path":427,"stem":428},"\u002Fmodules\u002Finterface\u002Fadmin","3.modules\u002F7.interface\u002F2.admin",{"title":430,"path":431,"stem":432},"Menu","\u002Fmodules\u002Finterface\u002Fmenu","3.modules\u002F7.interface\u002F3.menu",{"title":434,"path":435,"stem":436},"Widget","\u002Fmodules\u002Finterface\u002Fwidget","3.modules\u002F7.interface\u002F4.widget",{"title":438,"path":439,"stem":440,"children":441},"Mobile","\u002Fmodules\u002Finterface\u002Fmobile","3.modules\u002F7.interface\u002F5.mobile\u002Findex",[442,443,447],{"title":177,"path":439,"stem":440},{"title":444,"path":445,"stem":446},"CLI and devices","\u002Fmodules\u002Finterface\u002Fmobile\u002Fcli-and-devices","3.modules\u002F7.interface\u002F5.mobile\u002F2.cli-and-devices",{"title":448,"path":449,"stem":450},"Splash screen","\u002Fmodules\u002Finterface\u002Fmobile\u002Fsplash-screen","3.modules\u002F7.interface\u002F5.mobile\u002F3.splash-screen",{"title":452,"path":453,"stem":454},"Dashboard","\u002Fmodules\u002Finterface\u002Fdashboard","3.modules\u002F7.interface\u002F6.dashboard",{"title":456,"path":457,"stem":458,"children":459},"Desktop","\u002Fmodules\u002Finterface\u002Fdesktop","3.modules\u002F7.interface\u002F7.desktop\u002Findex",[460,461,465],{"title":177,"path":457,"stem":458},{"title":462,"path":463,"stem":464},"CLI","\u002Fmodules\u002Finterface\u002Fdesktop\u002Fcli","3.modules\u002F7.interface\u002F7.desktop\u002F2.cli",{"title":466,"path":467,"stem":468},"Local mode","\u002Fmodules\u002Finterface\u002Fdesktop\u002Flocal-mode","3.modules\u002F7.interface\u002F7.desktop\u002F3.local-mode",{"title":470,"path":471,"stem":472},"Maps","\u002Fmodules\u002Finterface\u002Fmaps","3.modules\u002F7.interface\u002F8.maps",{"title":474,"icon":53,"path":475,"stem":476,"children":477,"page":53},"Platform","\u002Fmodules\u002Fplatform","3.modules\u002F8.platform",[478,500],{"title":479,"path":480,"stem":481,"children":482},"Module Kit","\u002Fmodules\u002Fplatform\u002Fmodule-kit","3.modules\u002F8.platform\u002F1.module-kit\u002Findex",[483,484,488,492,496],{"title":177,"path":480,"stem":481},{"title":485,"path":486,"stem":487},"Server toolkit","\u002Fmodules\u002Fplatform\u002Fmodule-kit\u002Fserver-toolkit","3.modules\u002F8.platform\u002F1.module-kit\u002F2.server-toolkit",{"title":489,"path":490,"stem":491},"Registries and menus","\u002Fmodules\u002Fplatform\u002Fmodule-kit\u002Fregistries-and-menus","3.modules\u002F8.platform\u002F1.module-kit\u002F3.registries-and-menus",{"title":493,"path":494,"stem":495},"Translations","\u002Fmodules\u002Fplatform\u002Fmodule-kit\u002Fi18n","3.modules\u002F8.platform\u002F1.module-kit\u002F4.i18n",{"title":497,"path":498,"stem":499},"Database helpers","\u002Fmodules\u002Fplatform\u002Fmodule-kit\u002Fdatabase","3.modules\u002F8.platform\u002F1.module-kit\u002F5.database",{"title":501,"path":502,"stem":503,"children":504},"Base Layer","\u002Fmodules\u002Fplatform\u002Fbase-layer","3.modules\u002F8.platform\u002F2.base-layer\u002Findex",[505,506,510,514],{"title":177,"path":502,"stem":503},{"title":507,"path":508,"stem":509},"Content collections","\u002Fmodules\u002Fplatform\u002Fbase-layer\u002Fcontent-collections","3.modules\u002F8.platform\u002F2.base-layer\u002F2.content-collections",{"title":511,"path":512,"stem":513},"Layouts and routing","\u002Fmodules\u002Fplatform\u002Fbase-layer\u002Flayouts-and-routing","3.modules\u002F8.platform\u002F2.base-layer\u002F3.layouts-and-routing",{"title":515,"path":516,"stem":517},"Composables and utils","\u002Fmodules\u002Fplatform\u002Fbase-layer\u002Fcomposables-and-utils","3.modules\u002F8.platform\u002F2.base-layer\u002F4.composables-and-utils",{"title":519,"icon":53,"path":520,"stem":521,"children":522,"page":53},"Volunteering","\u002Fmodules\u002Fvolunteering","3.modules\u002F9.volunteering",[523,527,531],{"title":524,"path":525,"stem":526},"Operations","\u002Fmodules\u002Fvolunteering\u002Foperations","3.modules\u002F9.volunteering\u002F1.operations",{"title":528,"path":529,"stem":530},"Crew","\u002Fmodules\u002Fvolunteering\u002Fcrew","3.modules\u002F9.volunteering\u002F2.crew",{"title":532,"path":533,"stem":534},"Shifts","\u002Fmodules\u002Fvolunteering\u002Fshifts","3.modules\u002F9.volunteering\u002F3.shifts",{"title":536,"icon":537,"path":538,"stem":539,"children":540,"page":53},"Examples","i-lucide-code-xml","\u002Fexamples","4.examples",[541,570,580],{"title":542,"icon":53,"path":543,"stem":544,"children":545,"page":53},"Starters","\u002Fexamples\u002Fstarters","4.examples\u002F1.starters",[546,550,555,560,565],{"title":547,"path":548,"stem":549},"Workspace","\u002Fexamples\u002Fstarters\u002Fworkspace","4.examples\u002F1.starters\u002F1.workspace",{"title":551,"path":552,"stem":553,"icon":554},"Mobile starter","\u002Fexamples\u002Fstarters\u002Fmobile","4.examples\u002F1.starters\u002F2.mobile","i-lucide-smartphone",{"title":556,"path":557,"stem":558,"icon":559},"Standalone mobile starter","\u002Fexamples\u002Fstarters\u002Fmobile-standalone","4.examples\u002F1.starters\u002F3.mobile-standalone","i-lucide-tablet-smartphone",{"title":561,"path":562,"stem":563,"icon":564},"Desktop starter","\u002Fexamples\u002Fstarters\u002Fdesktop","4.examples\u002F1.starters\u002F4.desktop","i-lucide-monitor",{"title":566,"path":567,"stem":568,"icon":569},"Multi-platform starter","\u002Fexamples\u002Fstarters\u002Fmulti-platform","4.examples\u002F1.starters\u002F5.multi-platform","i-lucide-layers",{"title":571,"icon":53,"path":572,"stem":573,"children":574,"page":53},"Apps","\u002Fexamples\u002Fapps","4.examples\u002F2.apps",[575],{"title":576,"path":577,"stem":578,"icon":579},"Frigear website app","\u002Fexamples\u002Fapps\u002Ffrigear-nu-website","4.examples\u002F2.apps\u002F1.frigear-nu-website","i-lucide-layout-dashboard",{"title":581,"icon":53,"path":582,"stem":583,"children":584,"page":53},"Tasks","\u002Fexamples\u002Ftasks","4.examples\u002F3.tasks",[585,589,593,598,603],{"title":586,"path":587,"stem":588,"icon":74},"Protect a route","\u002Fexamples\u002Ftasks\u002Fprotect-a-route","4.examples\u002F3.tasks\u002F1.protect-a-route",{"title":590,"path":591,"stem":592,"icon":579},"Add an admin page","\u002Fexamples\u002Ftasks\u002Fadd-an-admin-page","4.examples\u002F3.tasks\u002F2.add-an-admin-page",{"title":594,"path":595,"stem":596,"icon":597},"Sell event tickets","\u002Fexamples\u002Ftasks\u002Fsell-event-tickets","4.examples\u002F3.tasks\u002F3.sell-event-tickets","i-lucide-ticket",{"title":599,"path":600,"stem":601,"icon":602},"Build a form","\u002Fexamples\u002Ftasks\u002Fbuild-a-form","4.examples\u002F3.tasks\u002F4.build-a-form","i-lucide-clipboard-list",{"title":604,"path":605,"stem":606,"icon":607},"Send an email","\u002Fexamples\u002Ftasks\u002Fsend-an-email","4.examples\u002F3.tasks\u002F5.send-an-email","i-lucide-mail",{"title":462,"icon":609,"path":610,"stem":611,"children":612,"page":53},"i-lucide-square-terminal","\u002Fcli","5.cli",[613,616,621,625,630,633,638,642,647],{"title":177,"path":614,"stem":615,"icon":609},"\u002Fcli\u002Foverview","5.cli\u002F1.overview",{"title":617,"path":618,"stem":619,"icon":620},"Create a project","\u002Fcli\u002Fcreate-a-project","5.cli\u002F2.create-a-project","i-lucide-folder-plus",{"title":622,"path":623,"stem":624,"icon":569},"Platforms","\u002Fcli\u002Fplatforms","5.cli\u002F3.platforms",{"title":626,"path":627,"stem":628,"icon":629},"Custom platforms","\u002Fcli\u002Fcustom-platforms","5.cli\u002F4.custom-platforms","i-lucide-monitor-cog",{"title":160,"path":631,"stem":632,"icon":161},"\u002Fcli\u002Fmodules","5.cli\u002F5.modules",{"title":634,"path":635,"stem":636,"icon":637},"Refactoring","\u002Fcli\u002Frefactoring","5.cli\u002F6.refactoring","i-lucide-folder-tree",{"title":639,"path":640,"stem":641,"icon":52},"Upgrade","\u002Fcli\u002Fupgrade","5.cli\u002F7.upgrade",{"title":643,"path":644,"stem":645,"icon":646},"From code","\u002Fcli\u002Ffrom-code","5.cli\u002F8.from-code","i-lucide-code",{"title":648,"path":649,"stem":650,"icon":138},"Environment files","\u002Fcli\u002Fenvironment","5.cli\u002F9.environment",{"title":652,"icon":653,"path":654,"stem":655,"children":656,"page":53},"Contribute","i-lucide-git-pull-request","\u002Fcontribute","6.contribute",[657,660,665,691,696,699,703,716],{"title":177,"path":658,"stem":659,"icon":653},"\u002Fcontribute\u002Foverview","6.contribute\u002F1.overview",{"title":661,"path":662,"stem":663,"icon":664},"Local development","\u002Fcontribute\u002Flocal-development","6.contribute\u002F2.local-development","i-lucide-terminal",{"title":666,"icon":53,"path":667,"stem":668,"children":669,"page":53},"Writing a module","\u002Fcontribute\u002Fwriting-a-module","6.contribute\u002F3.writing-a-module",[670,674,679,683,688],{"title":671,"path":672,"stem":673,"icon":38},"Scaffold a module","\u002Fcontribute\u002Fwriting-a-module\u002Fscaffold","6.contribute\u002F3.writing-a-module\u002F1.scaffold",{"title":675,"path":676,"stem":677,"icon":678},"Setup checklist","\u002Fcontribute\u002Fwriting-a-module\u002Fsetup-checklist","6.contribute\u002F3.writing-a-module\u002F2.setup-checklist","i-lucide-list-checks",{"title":680,"path":681,"stem":682,"icon":43},"Database tables","\u002Fcontribute\u002Fwriting-a-module\u002Fdatabase-tables","6.contribute\u002F3.writing-a-module\u002F3.database-tables",{"title":684,"path":685,"stem":686,"icon":687},"Testing","\u002Fcontribute\u002Fwriting-a-module\u002Ftesting","6.contribute\u002F3.writing-a-module\u002F4.testing","i-lucide-flask-conical",{"title":71,"path":689,"stem":690,"icon":74},"\u002Fcontribute\u002Fwriting-a-module\u002Faccess-control","6.contribute\u002F3.writing-a-module\u002F5.access-control",{"title":692,"path":693,"stem":694,"icon":695},"Publishing","\u002Fcontribute\u002Fpublishing","6.contribute\u002F4.publishing","i-lucide-package-check",{"title":542,"path":697,"stem":698,"icon":6},"\u002Fcontribute\u002Fstarters","6.contribute\u002F5.starters",{"title":700,"path":701,"stem":702,"icon":56},"Documentation","\u002Fcontribute\u002Fdocumentation","6.contribute\u002F6.documentation",{"title":704,"icon":53,"path":705,"stem":706,"children":707,"page":53},"Tooling","\u002Fcontribute\u002Ftooling","6.contribute\u002F7.tooling",[708,711],{"title":462,"path":709,"stem":710,"icon":609},"\u002Fcontribute\u002Ftooling\u002Fcli","6.contribute\u002F7.tooling\u002F1.cli",{"title":712,"path":713,"stem":714,"icon":715},"ESLint config","\u002Fcontribute\u002Ftooling\u002Feslint-config","6.contribute\u002F7.tooling\u002F2.eslint-config","i-lucide-spell-check",{"title":717,"icon":53,"path":718,"stem":719,"children":720},"Decisions","\u002Fcontribute\u002Fdecisions","6.contribute\u002F8.decisions\u002Findex",[721,723,728],{"title":717,"path":718,"stem":719,"icon":722},"i-lucide-scale",{"title":724,"path":725,"stem":726,"icon":727},"Session lifetimes per OAuth client","\u002Fcontribute\u002Fdecisions\u002Foauth-token-lifetimes","6.contribute\u002F8.decisions\u002F1.oauth-token-lifetimes","i-lucide-timer",{"title":729,"path":730,"stem":731,"icon":74},"One permission model","\u002Fcontribute\u002Fdecisions\u002Fpermission-model","6.contribute\u002F8.decisions\u002F2.permission-model",{"id":733,"title":381,"body":734,"description":7234,"extension":7235,"links":7236,"meta":7237,"navigation":4505,"path":382,"seo":7238,"stem":383,"__hash__":7239},"docs\u002F3.modules\u002F6.communication\u002F4.inbox.md",{"type":735,"value":736,"toc":7204},"minimark",[737,741,757,762,887,891,927,931,1435,1447,1451,1458,1999,2012,2016,2021,2148,2165,2173,2187,2191,2194,2197,2232,2285,2289,2310,2314,2334,2345,2348,2478,2507,2537,2550,2591,2627,2648,2652,2657,2662,2674,2699,2702,2716,2720,2727,2751,2761,2765,2768,2804,2807,2814,2816,2821,2905,2923,2937,2949,2975,2989,2993,2999,3170,3274,3281,3306,3311,3318,3346,3371,3394,3397,3400,3436,3443,3467,3471,3478,3570,3614,3617,3692,3706,3709,3722,3745,3899,3915,3930,3943,3947,3953,4302,4321,4335,4341,4402,4412,4416,4438,4459,4473,4650,4744,4748,4759,4776,4780,4786,4835,4850,4856,4920,4924,4936,5092,5730,5741,5781,5784,5966,5969,5993,6034,6040,6043,6069,6073,6076,6208,6211,6217,6309,6313,6354,6357,6363,6470,6474,6484,6869,6872,6878,7160,7163,7173,7177,7200],[738,739,740],"p",{},"Inbox gives your staff shared mailboxes for the messages people send you: the website contact form, email, WhatsApp,\nMessenger and Instagram. A message lands in a thread. Staff assign the thread, write internal notes, hide it from\nlower roles and reply. The reply goes out through the channel the message came in on. Every view and reply goes into\nan audit log. Closed threads are deleted after a retention period, and a contact's data can be exported or erased.",[738,742,743,744,748,749,753,754,756],{},"The package is ",[745,746,747],"code",{},"@frigear-nu\u002Finbox",". Its mailboxes are owned by the platform or a team, and read by\n",[750,751,752],"a",{"href":91},"staff",". To send email or SMS without expecting an answer, use\n",[750,755,356],{"href":357}," instead.",[758,759,761],"h2",{"id":760},"what-you-get","What you get",[763,764,765,806,833,848,866,877],"ul",{},[766,767,768,772,773,775,776],"li",{},[769,770,771],"strong",{},"Admin area"," (opt-in, needs ",[750,774,225],{"href":427},"):\n",[763,777,778,784,794,800],{},[766,779,780,783],{},[745,781,782],{},"\u002Fadmin\u002Finbox",", the thread list, filtered by mailbox, status, assignee and channel.",[766,785,786,789,790,793],{},[745,787,788],{},"\u002Fadmin\u002Finbox\u002Fthreads\u002F:id",", a thread with the conversation, a reply box and notes. It also has status, hide, the\ncontact panel and an assignee picker that lists everyone with access to the thread. Contact details and email cc\nrecipients need ",[745,791,792],{},"inbox:pii",".",[766,795,796,799],{},[745,797,798],{},"\u002Fadmin\u002Finbox\u002Fsettings",", the mailboxes and the channels connected to them.",[766,801,802,803,805],{},"An \"Inbox\" item in the admin sidebar, when ",[750,804,430],{"href":431}," is installed.",[766,807,808,811,812,815,816,815,819,815,822,825,826,829,830,793],{},[769,809,810],{},"Channels:"," ",[745,813,814],{},"form",", ",[745,817,818],{},"email",[745,820,821],{},"whatsapp",[745,823,824],{},"messenger"," and ",[745,827,828],{},"instagram",". Modules add their own with ",[745,831,832],{},"extendInbox",[766,834,835,811,838,841,842,825,845,793],{},[769,836,837],{},"Webhooks:",[745,839,840],{},"POST \u002Fapi\u002Finbox\u002Fwebhooks\u002Femail",", and ",[745,843,844],{},"GET",[745,846,847],{},"POST \u002Fapi\u002Finbox\u002Fwebhooks\u002Fmeta",[766,849,850,811,853,825,856,859,860,863,864,805],{},[769,851,852],{},"Dashboard items",[745,854,855],{},"inbox.unassigned",[745,857,858],{},"inbox.mine"," on ",[745,861,862],{},"crew.home"," and the hub's dashboard, when\n",[750,865,452],{"href":453},[766,867,868,811,871,874,875,805],{},[769,869,870],{},"Push topic",[745,872,873],{},"inbox.message"," for the assignee, when ",[750,876,377],{"href":378},[766,878,879,882,883,886],{},[769,880,881],{},"Retention:"," the Nitro task ",[745,884,885],{},"inbox:retention",", run every night.",[888,889],"module-runtime",{":client":890,":server":890},"true",[892,893,894,910],"note",{},[738,895,896,899,900,811,903,906,907],{},[769,897,898],{},"Installed for you:"," Auth, Users, Notify, UI and Module Kit.\n",[769,901,902],{},"You add:",[750,904,905],{"href":91},"NuxtHub"," with a database.\n",[769,908,909],{},"Optional:",[763,911,912,915,918,921,924],{},[766,913,914],{},"Admin, Menu and Widget: the staff pages and the sidebar item.",[766,916,917],{},"Forms: the contact form channel.",[766,919,920],{},"Teams: team mailboxes read by the team's leads.",[766,922,923],{},"Push: notifications for the assignee.",[766,925,926],{},"Dashboard: the two items.",[758,928,930],{"id":929},"quick-setup","Quick setup",[932,933,934,939,964,971,1315,1318,1375,1379,1383,1390,1408,1412,1418],"steps",{},[935,936,938],"h3",{"id":937},"install-inbox","Install Inbox",[940,941,946],"pre",{"className":942,"code":943,"language":944,"meta":945,"style":945},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","pnpm add @frigear-nu\u002Finbox\n","bash","",[745,947,948],{"__ignoreMap":945},[949,950,953,957,961],"span",{"class":951,"line":952},"line",1,[949,954,956],{"class":955},"sBMFI","pnpm",[949,958,960],{"class":959},"sfazB"," add",[949,962,963],{"class":959}," @frigear-nu\u002Finbox\n",[935,965,967,968],{"id":966},"add-it-to-nuxtconfigts","Add it to ",[745,969,970],{},"nuxt.config.ts",[940,972,976],{"className":973,"code":974,"filename":970,"language":975,"meta":945,"style":945},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","export default defineNuxtConfig({\n  \u002F\u002F Authorization brings the `role` grant kind the mailbox below uses.\n  modules: ['@nuxthub\u002Fcore', '@frigear-nu\u002Fusers', '@frigear-nu\u002Fauthorization', '@frigear-nu\u002Fforms', '@frigear-nu\u002Finbox'],\n  hub: { db: 'sqlite' },\n  inbox: {\n    mailboxes: [\n      { key: 'support', name: { da: 'Support', en: 'Support' }, grants: [{ kind: 'role', role: 'coordinator' }] },\n    ],\n    \u002F\u002F Channel secrets are declared here, empty, and set from the environment.\n    secrets: { WHATSAPP_TOKEN: '' },\n    settings: { pages: { admin: true, adminThread: true, adminSettings: true } },\n  },\n})\n","ts",[745,977,978,999,1006,1070,1096,1107,1118,1218,1226,1232,1252,1300,1306],{"__ignoreMap":945},[949,979,980,984,987,991,995],{"class":951,"line":952},[949,981,983],{"class":982},"s7zQu","export",[949,985,986],{"class":982}," default",[949,988,990],{"class":989},"s2Zo4"," defineNuxtConfig",[949,992,994],{"class":993},"sTEyZ","(",[949,996,998],{"class":997},"sMK4o","{\n",[949,1000,1002],{"class":951,"line":1001},2,[949,1003,1005],{"class":1004},"sHwdD","  \u002F\u002F Authorization brings the `role` grant kind the mailbox below uses.\n",[949,1007,1009,1013,1016,1019,1022,1025,1027,1030,1033,1036,1038,1040,1042,1045,1047,1049,1051,1054,1056,1058,1060,1062,1064,1067],{"class":951,"line":1008},3,[949,1010,1012],{"class":1011},"swJcz","  modules",[949,1014,1015],{"class":997},":",[949,1017,1018],{"class":993}," [",[949,1020,1021],{"class":997},"'",[949,1023,1024],{"class":959},"@nuxthub\u002Fcore",[949,1026,1021],{"class":997},[949,1028,1029],{"class":997},",",[949,1031,1032],{"class":997}," '",[949,1034,1035],{"class":959},"@frigear-nu\u002Fusers",[949,1037,1021],{"class":997},[949,1039,1029],{"class":997},[949,1041,1032],{"class":997},[949,1043,1044],{"class":959},"@frigear-nu\u002Fauthorization",[949,1046,1021],{"class":997},[949,1048,1029],{"class":997},[949,1050,1032],{"class":997},[949,1052,1053],{"class":959},"@frigear-nu\u002Fforms",[949,1055,1021],{"class":997},[949,1057,1029],{"class":997},[949,1059,1032],{"class":997},[949,1061,747],{"class":959},[949,1063,1021],{"class":997},[949,1065,1066],{"class":993},"]",[949,1068,1069],{"class":997},",\n",[949,1071,1073,1076,1078,1081,1084,1086,1088,1091,1093],{"class":951,"line":1072},4,[949,1074,1075],{"class":1011},"  hub",[949,1077,1015],{"class":997},[949,1079,1080],{"class":997}," {",[949,1082,1083],{"class":1011}," db",[949,1085,1015],{"class":997},[949,1087,1032],{"class":997},[949,1089,1090],{"class":959},"sqlite",[949,1092,1021],{"class":997},[949,1094,1095],{"class":997}," },\n",[949,1097,1099,1102,1104],{"class":951,"line":1098},5,[949,1100,1101],{"class":1011},"  inbox",[949,1103,1015],{"class":997},[949,1105,1106],{"class":997}," {\n",[949,1108,1110,1113,1115],{"class":951,"line":1109},6,[949,1111,1112],{"class":1011},"    mailboxes",[949,1114,1015],{"class":997},[949,1116,1117],{"class":993}," [\n",[949,1119,1121,1124,1127,1129,1131,1134,1136,1138,1141,1143,1145,1148,1150,1152,1155,1157,1159,1162,1164,1166,1168,1170,1173,1176,1178,1180,1183,1186,1188,1190,1193,1195,1197,1200,1202,1204,1207,1209,1212,1215],{"class":951,"line":1120},7,[949,1122,1123],{"class":997},"      {",[949,1125,1126],{"class":1011}," key",[949,1128,1015],{"class":997},[949,1130,1032],{"class":997},[949,1132,1133],{"class":959},"support",[949,1135,1021],{"class":997},[949,1137,1029],{"class":997},[949,1139,1140],{"class":1011}," name",[949,1142,1015],{"class":997},[949,1144,1080],{"class":997},[949,1146,1147],{"class":1011}," da",[949,1149,1015],{"class":997},[949,1151,1032],{"class":997},[949,1153,1154],{"class":959},"Support",[949,1156,1021],{"class":997},[949,1158,1029],{"class":997},[949,1160,1161],{"class":1011}," en",[949,1163,1015],{"class":997},[949,1165,1032],{"class":997},[949,1167,1154],{"class":959},[949,1169,1021],{"class":997},[949,1171,1172],{"class":997}," },",[949,1174,1175],{"class":1011}," grants",[949,1177,1015],{"class":997},[949,1179,1018],{"class":993},[949,1181,1182],{"class":997},"{",[949,1184,1185],{"class":1011}," kind",[949,1187,1015],{"class":997},[949,1189,1032],{"class":997},[949,1191,1192],{"class":959},"role",[949,1194,1021],{"class":997},[949,1196,1029],{"class":997},[949,1198,1199],{"class":1011}," role",[949,1201,1015],{"class":997},[949,1203,1032],{"class":997},[949,1205,1206],{"class":959},"coordinator",[949,1208,1021],{"class":997},[949,1210,1211],{"class":997}," }",[949,1213,1214],{"class":993},"] ",[949,1216,1217],{"class":997},"},\n",[949,1219,1221,1224],{"class":951,"line":1220},8,[949,1222,1223],{"class":993},"    ]",[949,1225,1069],{"class":997},[949,1227,1229],{"class":951,"line":1228},9,[949,1230,1231],{"class":1004},"    \u002F\u002F Channel secrets are declared here, empty, and set from the environment.\n",[949,1233,1235,1238,1240,1242,1245,1247,1250],{"class":951,"line":1234},10,[949,1236,1237],{"class":1011},"    secrets",[949,1239,1015],{"class":997},[949,1241,1080],{"class":997},[949,1243,1244],{"class":1011}," WHATSAPP_TOKEN",[949,1246,1015],{"class":997},[949,1248,1249],{"class":997}," ''",[949,1251,1095],{"class":997},[949,1253,1255,1258,1260,1262,1265,1267,1269,1272,1274,1278,1280,1283,1285,1287,1289,1292,1294,1296,1298],{"class":951,"line":1254},11,[949,1256,1257],{"class":1011},"    settings",[949,1259,1015],{"class":997},[949,1261,1080],{"class":997},[949,1263,1264],{"class":1011}," pages",[949,1266,1015],{"class":997},[949,1268,1080],{"class":997},[949,1270,1271],{"class":1011}," admin",[949,1273,1015],{"class":997},[949,1275,1277],{"class":1276},"sfNiH"," true",[949,1279,1029],{"class":997},[949,1281,1282],{"class":1011}," adminThread",[949,1284,1015],{"class":997},[949,1286,1277],{"class":1276},[949,1288,1029],{"class":997},[949,1290,1291],{"class":1011}," adminSettings",[949,1293,1015],{"class":997},[949,1295,1277],{"class":1276},[949,1297,1211],{"class":997},[949,1299,1095],{"class":997},[949,1301,1303],{"class":951,"line":1302},12,[949,1304,1305],{"class":997},"  },\n",[949,1307,1309,1312],{"class":951,"line":1308},13,[949,1310,1311],{"class":997},"}",[949,1313,1314],{"class":993},")\n",[738,1316,1317],{},"Set the webhook and channel secrets as environment variables, never in the config file:",[940,1319,1322],{"className":942,"code":1320,"filename":1321,"language":944,"meta":945,"style":945},"NUXT_INBOX_EMAIL_WEBHOOK_SECRET=a-long-random-string\nNUXT_INBOX_DOMAINS=inbox.example.org\nNUXT_INBOX_META_APP_SECRET=the-meta-app-secret\nNUXT_INBOX_META_VERIFY_TOKEN=a-token-you-also-enter-at-meta\nNUXT_INBOX_SECRETS_WHATSAPP_TOKEN=the-whatsapp-access-token\n",".env",[745,1323,1324,1335,1345,1355,1365],{"__ignoreMap":945},[949,1325,1326,1329,1332],{"class":951,"line":952},[949,1327,1328],{"class":993},"NUXT_INBOX_EMAIL_WEBHOOK_SECRET",[949,1330,1331],{"class":997},"=",[949,1333,1334],{"class":959},"a-long-random-string\n",[949,1336,1337,1340,1342],{"class":951,"line":1001},[949,1338,1339],{"class":993},"NUXT_INBOX_DOMAINS",[949,1341,1331],{"class":997},[949,1343,1344],{"class":959},"inbox.example.org\n",[949,1346,1347,1350,1352],{"class":951,"line":1008},[949,1348,1349],{"class":993},"NUXT_INBOX_META_APP_SECRET",[949,1351,1331],{"class":997},[949,1353,1354],{"class":959},"the-meta-app-secret\n",[949,1356,1357,1360,1362],{"class":951,"line":1072},[949,1358,1359],{"class":993},"NUXT_INBOX_META_VERIFY_TOKEN",[949,1361,1331],{"class":997},[949,1363,1364],{"class":959},"a-token-you-also-enter-at-meta\n",[949,1366,1367,1370,1372],{"class":951,"line":1098},[949,1368,1369],{"class":993},"NUXT_INBOX_SECRETS_WHATSAPP_TOKEN",[949,1371,1331],{"class":997},[949,1373,1374],{"class":959},"the-whatsapp-access-token\n",[1376,1377,1378],"warning",{},"Without a migration, every inbox request fails: the tables do not exist yet.",[935,1380,1382],{"id":1381},"generate-and-commit-a-migration","Generate and commit a migration",[738,1384,1385,1386,1389],{},"Inbox adds seven tables. Generate a ",[750,1387,1388],{"href":498},"migration"," and commit it.",[940,1391,1393],{"className":942,"code":1392,"language":944,"meta":945,"style":945},"npx nuxt db generate\n",[745,1394,1395],{"__ignoreMap":945},[949,1396,1397,1400,1403,1405],{"class":951,"line":952},[949,1398,1399],{"class":955},"npx",[949,1401,1402],{"class":959}," nuxt",[949,1404,1083],{"class":959},[949,1406,1407],{"class":959}," generate\n",[935,1409,1411],{"id":1410},"connect-the-channels","Connect the channels",[738,1413,1414,1415,1417],{},"Open ",[745,1416,798],{}," as an admin and connect each channel to a mailbox:",[763,1419,1420,1423,1426,1429,1432],{},[766,1421,1422],{},"the contact form by its slug;",[766,1424,1425],{},"the email address people write to;",[766,1427,1428],{},"the WhatsApp phone number id;",[766,1430,1431],{},"the Facebook page id;",[766,1433,1434],{},"the Instagram account id.",[1436,1437,1440,1443,1444,1446],"callout",{"color":1438,"icon":1439},"success","i-lucide-check",[769,1441,1442],{},"What you should see:"," a contact form submission or an email shows up in ",[745,1445,782],{},". A reply from the thread\npage reaches the person by email.",[758,1448,1450],{"id":1449},"options","Options",[738,1452,1453,1454,1457],{},"Options go under the ",[745,1455,1456],{},"inbox"," key. The secrets also take environment variables, as above.",[1459,1460,1461,1480],"table",{},[1462,1463,1464],"thead",{},[1465,1466,1467,1471,1474,1477],"tr",{},[1468,1469,1470],"th",{},"Option",[1468,1472,1473],{},"Type",[1468,1475,1476],{},"Default",[1468,1478,1479],{},"Purpose",[1481,1482,1483,1504,1525,1546,1571,1623,1650,1675,1697,1715,1740,1760,1787,1813,1836,1856,1882,1901,1919,1942,1961,1977],"tbody",{},[1465,1484,1485,1491,1496,1501],{},[1486,1487,1488],"td",{},[745,1489,1490],{},"mailboxes",[1486,1492,1493],{},[745,1494,1495],{},"InboxMailboxSeed[]",[1486,1497,1498],{},[745,1499,1500],{},"[]",[1486,1502,1503],{},"Mailboxes created on the first request when their key does not exist. They are never changed afterwards.",[1465,1505,1506,1511,1516,1520],{},[1486,1507,1508],{},[745,1509,1510],{},"channels",[1486,1512,1513],{},[745,1514,1515],{},"InboxChannelDefinition[]",[1486,1517,1518],{},[745,1519,1500],{},[1486,1521,1522,1523,793],{},"The host's own channels, the same as ",[745,1524,832],{},[1465,1526,1527,1532,1537,1540],{},[1486,1528,1529],{},[745,1530,1531],{},"email.webhookSecret",[1486,1533,1534],{},[745,1535,1536],{},"string",[1486,1538,1539],{},"none",[1486,1541,1542,1543,793],{},"The HMAC secret of the email webhook. Without it, the webhook answers 501 ",[745,1544,1545],{},"not_configured",[1465,1547,1548,1553,1558,1560],{},[1486,1549,1550],{},[745,1551,1552],{},"email.domains",[1486,1554,1555],{},[745,1556,1557],{},"string[]",[1486,1559,1539],{},[1486,1561,1562,1563,1567,1568,1570],{},"The ",[750,1564,1566],{"href":1565},"#inbox-domains","inbox domains",". ",[745,1569,1339],{}," (comma separated) replaces them at run time.",[1465,1572,1573,1578,1583,1588],{},[1486,1574,1575],{},[745,1576,1577],{},"email.inbound",[1486,1579,1580],{},[745,1581,1582],{},"{ webhook?, cloudflare?, resend?, gmail?, imap? }",[1486,1584,1585],{},[745,1586,1587],{},"{ webhook: true }",[1486,1589,1590,1591,1595,1596,1599,1600,815,1603,1606,1607,815,1610,1606,1613,825,1616,1606,1619,1622],{},"The built-in ",[750,1592,1594],{"href":1593},"#inbound-drivers","inbound email drivers"," to install. ",[745,1597,1598],{},"cloudflare"," also takes ",[745,1601,1602],{},"{ authservIds, entry }",[745,1604,1605],{},"resend"," takes ",[745,1608,1609],{},"{ webhookSecret, apiKey, apiBase }",[745,1611,1612],{},"gmail",[745,1614,1615],{},"{ clientEmail, privateKey, topic, audience, pushServiceAccount, apiBase, cron }",[745,1617,1618],{},"imap",[745,1620,1621],{},"{ cron }","; the secrets are also set at run time (see each driver).",[1465,1624,1625,1630,1635,1638],{},[1486,1626,1627],{},[745,1628,1629],{},"email.outbound",[1486,1631,1632],{},[745,1633,1634],{},"'cloudflare-binding' | 'resend' | 'ses' | 'cloudflare' | 'log'",[1486,1636,1637],{},"Notify's driver",[1486,1639,1640,1641,1645,1646,1649],{},"The Notify driver ",[750,1642,1644],{"href":1643},"#replies","replies"," go out through, for inbox replies only. ",[745,1647,1648],{},"NUXT_INBOX_EMAIL_OUTBOUND"," sets it at run time.",[1465,1651,1652,1657,1662,1666],{},[1486,1653,1654],{},[745,1655,1656],{},"email.drivers",[1486,1658,1659],{},[745,1660,1661],{},"InboxEmailDriverDefinition[]",[1486,1663,1664],{},[745,1665,1500],{},[1486,1667,1668,1669,1671,1672,793],{},"The host's own inbound email drivers, the same as ",[745,1670,832],{},"'s ",[745,1673,1674],{},"emailDrivers",[1465,1676,1677,1682,1686,1688],{},[1486,1678,1679],{},[745,1680,1681],{},"meta.appSecret",[1486,1683,1684],{},[745,1685,1536],{},[1486,1687,1539],{},[1486,1689,1690,1691,1694,1695,793],{},"The Meta app secret that ",[745,1692,1693],{},"X-Hub-Signature-256"," is checked with. Without it, the Meta webhook answers 501 ",[745,1696,1545],{},[1465,1698,1699,1704,1708,1710],{},[1486,1700,1701],{},[745,1702,1703],{},"meta.verifyToken",[1486,1705,1706],{},[745,1707,1536],{},[1486,1709,1539],{},[1486,1711,1712,1713,793],{},"The verify token Meta's subscription check sends. Without it, the check answers 501 ",[745,1714,1545],{},[1465,1716,1717,1725,1729,1737],{},[1486,1718,1719,815,1722],{},[745,1720,1721],{},"meta.apiBase",[745,1723,1724],{},"meta.apiVersion",[1486,1726,1727],{},[745,1728,1536],{},[1486,1730,1731,815,1734],{},[745,1732,1733],{},"https:\u002F\u002Fgraph.facebook.com",[745,1735,1736],{},"v21.0",[1486,1738,1739],{},"The Graph API that replies go to.",[1465,1741,1742,1747,1752,1757],{},[1486,1743,1744],{},[745,1745,1746],{},"meta.timeoutMs",[1486,1748,1749],{},[745,1750,1751],{},"number",[1486,1753,1754],{},[745,1755,1756],{},"10000",[1486,1758,1759],{},"How long a Graph API call may take.",[1465,1761,1762,1767,1772,1777],{},[1486,1763,1764],{},[745,1765,1766],{},"secrets",[1486,1768,1769],{},[745,1770,1771],{},"Record\u003Cstring, string>",[1486,1773,1774],{},[745,1775,1776],{},"{}",[1486,1778,1779,1780,1783,1784,793],{},"Channel account secrets by ",[745,1781,1782],{},"secretRef",". Declare each ref empty and set it with ",[745,1785,1786],{},"NUXT_INBOX_SECRETS_\u003CREF>",[1465,1788,1789,1794,1799,1803],{},[1486,1790,1791],{},[745,1792,1793],{},"shortLinks",[1486,1795,1796],{},[745,1797,1798],{},"boolean",[1486,1800,1801],{},[745,1802,890],{},[1486,1804,1805,1806,1808,1809,1812],{},"Offer to send the links of a reply as short links, when ",[750,1807,385],{"href":386}," is installed. ",[745,1810,1811],{},"false"," turns it off.",[1465,1814,1815,1820,1825,1830],{},[1486,1816,1817],{},[745,1818,1819],{},"retention.days",[1486,1821,1822],{},[745,1823,1824],{},"number | false",[1486,1826,1827],{},[745,1828,1829],{},"365",[1486,1831,1832,1833,1835],{},"Days a closed thread is kept when its mailbox sets none. ",[745,1834,1811],{}," keeps them.",[1465,1837,1838,1843,1848,1853],{},[1486,1839,1840],{},[745,1841,1842],{},"retention.mode",[1486,1844,1845],{},[745,1846,1847],{},"'delete' | 'anonymise'",[1486,1849,1850],{},[745,1851,1852],{},"'delete'",[1486,1854,1855],{},"Delete old threads, or keep them with their messages blanked.",[1465,1857,1858,1863,1868,1873],{},[1486,1859,1860],{},[745,1861,1862],{},"retention.cron",[1486,1864,1865],{},[745,1866,1867],{},"string | false",[1486,1869,1870],{},[745,1871,1872],{},"'30 3 * * *'",[1486,1874,1875,1876,1878,1879,1881],{},"When ",[745,1877,885],{}," runs. ",[745,1880,1811],{}," registers it without a schedule.",[1465,1883,1884,1889,1893,1898],{},[1486,1885,1886],{},[745,1887,1888],{},"retention.batch",[1486,1890,1891],{},[745,1892,1751],{},[1486,1894,1895],{},[745,1896,1897],{},"500",[1486,1899,1900],{},"The most threads one run handles, shared fairly between the mailboxes.",[1465,1902,1903,1908,1912,1916],{},[1486,1904,1905],{},[745,1906,1907],{},"retention.tombstoneDays",[1486,1909,1910],{},[745,1911,1751],{},[1486,1913,1914],{},[745,1915,1829],{},[1486,1917,1918],{},"Days the provider ids of messages retention removed are remembered, so a replayed webhook is not stored again. An erase's are kept for good.",[1465,1920,1921,1926,1931,1934],{},[1486,1922,1923],{},[745,1924,1925],{},"settings.pages.admin",[1486,1927,1928],{},[745,1929,1930],{},"string | boolean",[1486,1932,1933],{},"off",[1486,1935,1936,1937,1939,1940,793],{},"The thread list. ",[745,1938,890],{}," is ",[745,1941,782],{},[1465,1943,1944,1949,1953,1955],{},[1486,1945,1946],{},[745,1947,1948],{},"settings.pages.adminThread",[1486,1950,1951],{},[745,1952,1930],{},[1486,1954,1933],{},[1486,1956,1957,1958,793],{},"The thread page. It must contain ",[745,1959,1960],{},":id",[1465,1962,1963,1968,1972,1974],{},[1486,1964,1965],{},[745,1966,1967],{},"settings.pages.adminSettings",[1486,1969,1970],{},[745,1971,1930],{},[1486,1973,1933],{},[1486,1975,1976],{},"Mailbox and channel settings.",[1465,1978,1979,1984,1988,1993],{},[1486,1980,1981],{},[745,1982,1983],{},"settings.dashboard",[1486,1985,1986],{},[745,1987,1867],{},[1486,1989,1990,1992],{},[745,1991,862],{}," and the hub's",[1486,1994,1995,1996,1998],{},"The dashboard the two items go on. A name puts them there only; ",[745,1997,1811],{}," adds none.",[738,2000,2001,2004,2005,2008,2009,2011],{},[769,2002,2003],{},"Retention."," Each mailbox can set its own ",[745,2006,2007],{},"retentionDays",". A mailbox without one uses ",[745,2010,1819],{},". Inbox has no\nretention table: a per-mailbox column and the module default cover it.",[758,2013,2015],{"id":2014},"permissions","Permissions",[738,2017,2018,2019,793],{},"Inbox registers these permissions with ",[750,2020,207],{"href":208},[1459,2022,2023,2036],{},[1462,2024,2025],{},[1465,2026,2027,2030,2033],{},[1468,2028,2029],{},"Name",[1468,2031,2032],{},"Who holds it",[1468,2034,2035],{},"What it covers",[1481,2037,2038,2051,2063,2078,2092,2106,2120,2134],{},[1465,2039,2040,2045,2048],{},[1486,2041,2042],{},[745,2043,2044],{},"inbox:read",[1486,2046,2047],{},"Every signed-in user (implicit)",[1486,2049,2050],{},"Threads of the mailboxes the policy lets them read.",[1465,2052,2053,2058,2060],{},[1486,2054,2055],{},[745,2056,2057],{},"inbox:reply",[1486,2059,2047],{},[1486,2061,2062],{},"Replies, notes and status, in the same mailboxes.",[1465,2064,2065,2070,2075],{},[1486,2066,2067],{},[745,2068,2069],{},"inbox:assign",[1486,2071,2072],{},[745,2073,2074],{},"admin",[1486,2076,2077],{},"Assigning threads.",[1465,2079,2080,2085,2089],{},[1486,2081,2082],{},[745,2083,2084],{},"inbox:hide",[1486,2086,2087],{},[745,2088,2074],{},[1486,2090,2091],{},"Hiding a thread from people below a role.",[1465,2093,2094,2099,2103],{},[1486,2095,2096],{},[745,2097,2098],{},"inbox:manage",[1486,2100,2101],{},[745,2102,2074],{},[1486,2104,2105],{},"Every mailbox; creating, editing and deleting mailboxes; erasing contacts.",[1465,2107,2108,2112,2117],{},[1486,2109,2110],{},[745,2111,792],{},[1486,2113,2114,2116],{},[745,2115,2074],{}," (sensitive)",[1486,2118,2119],{},"Contact email, phone and channel id; contact exports and erasure.",[1465,2121,2122,2127,2131],{},[1486,2123,2124],{},[745,2125,2126],{},"inbox:channels",[1486,2128,2129],{},[745,2130,2074],{},[1486,2132,2133],{},"Connecting channels and naming their secrets.",[1465,2135,2136,2141,2145],{},[1486,2137,2138],{},[745,2139,2140],{},"inbox-audit:pii",[1486,2142,2143,2116],{},[745,2144,2074],{},[1486,2146,2147],{},"The audit log.",[738,2149,2150,2153,2154,2157,2158,2161,2162,2164],{},[769,2151,2152],{},"Session only."," Every inbox permission is ",[745,2155,2156],{},"sessionOnly",": platform and team mailboxes hold outsiders' messages, so\nthey are never exposed to API tokens or OAuth apps, and every staff route answers a bearer with\n",[745,2159,2160],{},"403 session_required",". There is no ",[745,2163,1456],{}," scope.",[738,2166,2167,2168,825,2170,2172],{},"The policy of ",[745,2169,2044],{},[745,2171,2057],{}," allows:",[763,2174,2175,2181,2184],{},[766,2176,2177,2178,2180],{},"staff with ",[745,2179,2098],{},";",[766,2182,2183],{},"a team mailbox's leads;",[766,2185,2186],{},"anyone the mailbox's grants admit.",[758,2188,2190],{"id":2189},"server","Server",[738,2192,2193],{},"How mailboxes, threads and channels behave, and the utils other modules call.",[935,2195,2196],{"id":1490},"Mailboxes",[738,2198,2199,2200,815,2203,2206,2207,2210,2211,2215,2216,2219,2220,2223,2224,2227,2228,2231],{},"A mailbox has an owner: the platform, or a team (",[745,2201,2202],{},"ownerType: 'team'",[745,2204,2205],{},"ownerId"," the team id, checked through Teams'\n",[745,2208,2209],{},"teams:owner:resolve","). Who reads it besides staff is a grant list (Auth's ",[750,2212,2214],{"href":2213},"\u002Fcontribute\u002Fwriting-a-module\u002Faccess-control#record-audiences","record audiences",") in\n",[745,2217,2218],{},"grants",": any one grant admits, such as ",[745,2221,2222],{},"{ kind: 'role', role: 'coordinator' }"," (with\n",[750,2225,207],{"href":2226},"\u002Fmodules\u002Fidentity\u002Fauthorization#role-grants",") or a ",[745,2229,2230],{},"team"," grant with a minimum role. A configured\nmailbox whose grants name a kind no installed module registers stops the seeding, which is logged and retried.",[763,2233,2234,2252,2258,2271],{},[766,2235,2236,2239,2240,2243,2244,2247,2248,2251],{},[769,2237,2238],{},"Never public, never everyone with an account."," A mailbox holds outsiders' messages, so a ",[745,2241,2242],{},"public"," grant and a\n",[745,2245,2246],{},"signed-in"," grant are refused (on create, on update and in ",[745,2249,2250],{},"inbox.mailboxes","), and one stored anyway counts for\nnobody.",[766,2253,2254,2257],{},[769,2255,2256],{},"A platform mailbox must name who reads it."," An empty list is refused for it. If a stored one is empty anyway,\nnobody but staff reads the mailbox: an empty list admits nobody.",[766,2259,2260,2263,2264,2267,2268,2270],{},[769,2261,2262],{},"A team mailbox"," is read by the team's leads (",[745,2265,2266],{},"isTeamLead"," of ",[750,2269,258],{"href":259},"). Its\ngrants may add others.",[766,2272,2273,2276,2277,2280,2281,2284],{},[769,2274,2275],{},"Checked on write."," An unknown kind, an invalid grant or a team or operation that does not exist is a ",[745,2278,2279],{},"400","\n(",[745,2282,2283],{},"grantsValidate",").",[935,2286,2288],{"id":2287},"hidden-threads","Hidden threads",[738,2290,2291,2294,2295,2298,2299,2302,2303,2305,2306,2309],{},[745,2292,2293],{},"POST ...\u002Fhide"," with ",[745,2296,2297],{},"{ role }"," sets ",[745,2300,2301],{},"hiddenBelow",". From then on, only people who hold that global\nrole see the thread. Roles inherit along your role chain, so an admin who inherits ",[745,2304,1206],{}," sees threads hidden\nbelow it. The role must be one the caller holds. Anyone else gets the same 404 as for an unknown thread, and the\nthread is missing from their list. An assignee without the role is unassigned. ",[745,2307,2308],{},"{ role: null }"," shows the thread\nagain.",[935,2311,2313],{"id":2312},"assignees","Assignees",[738,2315,2316,2317,2319,2320,2322,2323,2325,2326,2329,2330,2333],{},"An assignee must be able to read and answer the thread themselves. The rule is evaluated for them, not\nfor the caller: they hold ",[745,2318,2057],{}," and the thread's ",[745,2321,2301],{}," role, and they hold ",[745,2324,2098],{},", lead the\nteam of a team mailbox, or are admitted by the mailbox's grants as themselves (",[745,2327,2328],{},"grantsMatch"," with their own roles and teams). Anyone else is a\n409 ",[745,2331,2332],{},"assignee_no_access"," (an unknown user is a 400).",[738,2335,2336,2337,2340,2341,2344],{},"The thread page's assignee picker lists those people: ",[745,2338,2339],{},"GET ...\u002Fthreads\u002F:id\u002Fassignees"," evaluates the same rule for each\nuser, by name, and answers at most 50 (",[745,2342,2343],{},"?q"," narrows by name). It looks at no more than 1,000 users per call, so on a\nlarge user base search by name.",[935,2346,2347],{"id":1510},"Channels",[1459,2349,2350,2366],{},[1462,2351,2352],{},[1465,2353,2354,2357,2360,2363],{},[1468,2355,2356],{},"Channel",[1468,2358,2359],{},"Address",[1468,2361,2362],{},"Inbound",[1468,2364,2365],{},"Replies",[1481,2367,2368,2401,2431,2449,2464],{},[1465,2369,2370,2374,2377,2387],{},[1486,2371,2372],{},[745,2373,814],{},[1486,2375,2376],{},"The form's slug",[1486,2378,2379,2380,2383,2384,2386],{},"A listener on ",[745,2381,2382],{},"forms:submitted"," for forms with a ",[745,2385,814],{}," account",[1486,2388,2389,2390,2393,2394,2397,2398,2400],{},"By email to the address the person gave, ",[745,2391,2392],{},"Reply-To"," the account's ",[745,2395,2396],{},"config.replyTo"," or the mailbox's email address (see ",[750,2399,2365],{"href":1643},")",[1465,2402,2403,2407,2410,2414],{},[1486,2404,2405],{},[745,2406,818],{},[1486,2408,2409],{},"The address people write to",[1486,2411,1562,2412],{},[750,2413,1594],{"href":1593},[1486,2415,2416,2419,2420,815,2422,825,2425,2428,2429,2400],{},[745,2417,2418],{},"dispatchEmailNotification"," with the thread's reply address or the mailbox address as ",[745,2421,2392],{},[745,2423,2424],{},"In-Reply-To",[745,2426,2427],{},"[ibt_...]"," in the subject (see ",[750,2430,2365],{"href":1643},[1465,2432,2433,2437,2440,2446],{},[1486,2434,2435],{},[745,2436,821],{},[1486,2438,2439],{},"The WhatsApp phone number id",[1486,2441,2442,825,2444],{},[745,2443,844],{},[745,2445,847],{},[1486,2447,2448],{},"The Graph API with the account's token",[1465,2450,2451,2455,2458,2461],{},[1486,2452,2453],{},[745,2454,824],{},[1486,2456,2457],{},"The Facebook page id",[1486,2459,2460],{},"The Meta webhook",[1486,2462,2463],{},"The Graph API with the page access token",[1465,2465,2466,2470,2473,2475],{},[1486,2467,2468],{},[745,2469,828],{},[1486,2471,2472],{},"The Instagram professional account id",[1486,2474,2460],{},[1486,2476,2477],{},"The Graph API with the token",[738,2479,2480,2483,2484,2486,2487,2490,2491,2494,2495,2498,2499,2502,2503,2506],{},[769,2481,2482],{},"Secrets never go into the database."," A channel account's ",[745,2485,1782],{}," names a secret, such as ",[745,2488,2489],{},"WHATSAPP_TOKEN",". The\nserver reads it from the runtime config only, ",[745,2492,2493],{},"inbox.secrets.WHATSAPP_TOKEN",", never from ",[745,2496,2497],{},"process.env"," directly. A ref\nis upper case letters, digits and ",[745,2500,2501],{},"_",", so it can only name an inbox secret. A ",[745,2504,2505],{},"config"," key that looks like a secret is\nrefused. Set the value with an environment variable that overrides the runtime config:",[763,2508,2509,2525],{},[766,2510,2511,2515,2516,2518,2519,2521,2522,793],{},[769,2512,2513],{},[745,2514,1786],{},", such as ",[745,2517,1369],{},". Nuxt only overrides keys that exist when\nthe app is built, so declare each ref in ",[745,2520,970],{}," with an empty value: ",[745,2523,2524],{},"inbox: { secrets: { WHATSAPP_TOKEN: '' } }",[766,2526,2527,2532,2533,2536],{},[769,2528,2529],{},[745,2530,2531],{},"NUXT_INBOX_SECRETS",", a JSON object of refs and values, such as ",[745,2534,2535],{},"{\"WHATSAPP_TOKEN\":\"...\"}",". It adds refs that were\nnot declared.",[892,2538,2539,2542,2543,2546,2547,2549],{},[769,2540,2541],{},"Cloudflare Workers."," A Worker has no environment at build time: set the variables as Worker secrets\n(",[745,2544,2545],{},"wrangler secret put NUXT_INBOX_SECRETS_WHATSAPP_TOKEN",") and declare the ref empty in ",[745,2548,970],{}," as above. The\ninbox reads the runtime config per request, where the Worker's secrets are applied.",[738,2551,2552,2555,2556,815,2559,815,2561,1069,2564,825,2567,2570,2571,2574,2575,859,2578,2580,2581,2584,2585,2587,2588,2590],{},[769,2553,2554],{},"The contact form."," Connect a form by its slug. Its answers are read from the fields ",[745,2557,2558],{},"name",[745,2560,818],{},[745,2562,2563],{},"phone",[745,2565,2566],{},"subject",[745,2568,2569],{},"message",". Change the keys with ",[745,2572,2573],{},"config.fields",". Answers show the form's labels in the submission's\nlanguage, so a select shows its option's label, not its value. The thread is titled with the subject's label, or with\nthe text of a field shown only for that subject (an \"Other, please specify\" field with ",[745,2576,2577],{},"showIf",[745,2579,2566],{},"). The\nmessage is followed by every other answered field as ",[745,2582,2583],{},"Label: value"," lines, so a submission that joins an open thread\nkeeps its subject. A form without a ",[745,2586,2569],{}," field lists every answer.\nSubmissions only come in through Forms' own submit route, with the form's access rules, and the ",[745,2589,2382],{},"\nhook: the inbox has no webhook for the form channel.",[738,2592,2593,2596,2597,2599,2600,2603,2604,2607,2608,2611,2612,2615,2616,2618,2619,2622,2623,2626],{},[769,2594,2595],{},"Short links in replies."," With ",[750,2598,385],{"href":386}," installed, a reply that contains\n",[745,2601,2602],{},"http(s)"," links shows a ",[769,2605,2606],{},"Shorten links"," switch. It starts on for WhatsApp, Messenger and Instagram, where people read\nlinks on a phone, and off for email and the contact form. A channel of your own sets its default with ",[745,2609,2610],{},"shortenLinks","\non its registration. Staff can switch it for each reply. When it is on, the server swaps each link for the inbox's\nshort link of that URL (",[745,2613,2614],{},"findOrCreateShortLink",", owner ",[745,2617,1456],{},"): one link per URL for the whole inbox, so the same URL\nin another reply reuses it and its click counter adds up, and changing its target on ",[745,2620,2621],{},"\u002Fadmin\u002Fshort-links"," changes it\nin every reply that sent it. The links never expire, so old replies keep working. The reply is stored as it was sent,\nwith the short links in it. Links that already are short links stay as they are. Without ",[745,2624,2625],{},"shortLinks.baseUrl"," or a site\nURL there is no absolute short URL to send, and links go out as written; they also do when shortening fails. Clicks\nare counted per link, not per reply or person: a short link has no subject that ties it to a thread.",[738,2628,2629,2632,2633,815,2635,2637,2638,2640,2641,2644,2645,2647],{},[769,2630,2631],{},"Channels fail closed."," Every inbound route needs its secret, and there is no unauthenticated default. Without\n",[745,2634,1531],{},[745,2636,1681],{}," or ",[745,2639,1703],{},", or a module channel's ",[745,2642,2643],{},"inboundSecret",", the route answers\n501 ",[745,2646,1545],{}," before it reads the request.",[2649,2650,2651],"h4",{"id":818},"Email",[738,2653,2654,2655,793],{},"Email reaches the inbox through one or more inbound drivers. Replies go out through Notify. An email account is an\naddress connected to a mailbox at ",[745,2656,798],{},[2658,2659,2661],"h5",{"id":2660},"inbox-domains","Inbox domains",[738,2663,2664,2665,2668,2669,2637,2671,2673],{},"An inbox domain is a domain whose mail all goes to the inbox, such as ",[745,2666,2667],{},"inbox.example.org",". Set them with\n",[745,2670,1552],{},[745,2672,1339],{},", a comma separated list that also replaces them at run time. The package has\nno default. On an inbox domain:",[763,2675,2676,2690],{},[766,2677,2678,2681,2682,2685,2686,2689],{},[769,2679,2680],{},"Replies carry a reply address."," A reply from an account at ",[745,2683,2684],{},"support@inbox.example.org"," goes out with\n",[745,2687,2688],{},"Reply-To: support+ibt_...@inbox.example.org",", the thread's own address. The answer finds its thread even when the\nperson changed the subject or their client dropped the marker.",[766,2691,2692,2695,2696,793],{},[769,2693,2694],{},"Unknown addresses bounce."," An address on an inbox domain that no account has is unknown. A driver that can\nbounces it (Cloudflare), the others answer ",[745,2697,2698],{},"ignored",[738,2700,2701],{},"The settings page warns about a mailbox that is answered by email (it has an email or contact form channel) but has\nno email address on an inbox domain.",[940,2703,2705],{"className":942,"code":2704,"filename":1321,"language":944,"meta":945,"style":945},"NUXT_INBOX_DOMAINS=inbox.example.org,volunteer.example.org\n",[745,2706,2707],{"__ignoreMap":945},[949,2708,2709,2711,2713],{"class":951,"line":952},[949,2710,1339],{"class":993},[949,2712,1331],{"class":997},[949,2714,2715],{"class":959},"inbox.example.org,volunteer.example.org\n",[2658,2717,2719],{"id":2718},"routing","Routing",[738,2721,2722,2723,2726],{},"Every inbound driver routes a recipient with ",[745,2724,2725],{},"inboxRouteRecipient(address)",", in this order:",[2728,2729,2730,2733,2748],"ol",{},[766,2731,2732],{},"The email account with exactly this address.",[766,2734,2735,2736,2739,2740,2743,2744,2747],{},"A plus address ",[745,2737,2738],{},"local+\u003Ctag>@domain"," whose ",[745,2741,2742],{},"local@domain"," is an account. A tag in the shape of a thread id\n(",[745,2745,2746],{},"ibt_"," and 8 to 64 lower case letters or digits) is a thread hint. Any other tag routes to the account without a\nhint.",[766,2749,2750],{},"Any other address on an inbox domain is unknown. An address on another domain is not ours.",[738,2752,2753,2754,825,2757,2760],{},"The recipients are ",[745,2755,2756],{},"to",[745,2758,2759],{},"cc"," (or the envelope recipient, for Cloudflare). Every email account among them gets the\nmessage, so a mailbox that is only copied still receives it, and one email to two connected mailboxes is stored in each\n(two threads). An account is reached once, however many of its addresses the email names.",[2658,2762,2764],{"id":2763},"threading","Threading",[738,2766,2767],{},"Only an authenticated email joins an existing thread. It tries these threads in order, and the first that passes the\nchecks wins:",[2728,2769,2770,2776,2796,2801],{},[766,2771,2772,2773,2284],{},"The thread its reply address names (",[745,2774,2775],{},"support+ibt_...@",[766,2777,2778,2779,2781,2782,2785,2786,2789,2790,2793,2794,2284],{},"The thread of a stored message it answers: ",[745,2780,2424],{},", then ",[745,2783,2784],{},"References"," from the newest back, matched against\nthe ",[745,2787,2788],{},"email:\u003CMessage-ID>"," provider ids of the same account, and against our own replies in the same mailbox when they\nwent out with a Message-ID of ours (",[745,2791,2792],{},"email:out:\u003CMessage-ID>",", see ",[750,2795,2365],{"href":1643},[766,2797,1562,2798,2800],{},[745,2799,2427],{}," marker in the subject.",[766,2802,2803],{},"The contact's latest email thread that is not closed.",[738,2805,2806],{},"Steps 1 to 3 check that the thread is in the same mailbox and that the sender is its contact or has the contact's\nemail address. That is how an emailed answer to a contact form thread lands in that thread. A thread that fails the\nchecks is skipped. A thread that retention or an erase anonymised is never joined: the answer starts a new thread,\nbecause a blanked thread never takes new content. An email that is not authenticated always starts a new thread, so a\nforged sender cannot write into someone else's conversation, whatever address, headers or subject it uses.",[738,2808,2809,2810,2813],{},"A channel whose sender address is a caller ID (SMS) sets ",[745,2811,2812],{},"callerId"," on the message: without being authenticated, it\njoins the sender's latest open or pending thread on the same channel account, and nothing more (no named thread, no\nrename, no account link).",[2658,2815,2365],{"id":1644},[738,2817,2818,2819,1015],{},"A reply by email goes to the contact through Notify's ",[745,2820,2418],{},[763,2822,2823,2833,2845,2854,2881],{},[766,2824,2825,811,2830,793],{},[769,2826,2827,1015],{},[745,2828,2829],{},"Subject",[745,2831,2832],{},"Re: \u003Csubject> [ibt_...]",[766,2834,2835,2393,2839,2841,2842,2844],{},[769,2836,2837,1015],{},[745,2838,2392],{},[745,2840,2396],{},", else its address. When that is on an inbox domain, the reply uses\nthe thread's reply address on it instead. A contact form thread starts from the form account's ",[745,2843,2396],{},", else\nthe mailbox's first enabled email account on an inbox domain, else its first enabled email account.",[766,2846,2847,2853],{},[769,2848,2849,825,2851,1015],{},[745,2850,2424],{},[745,2852,2784],{}," the Message-ID of the person's latest email in the thread, so their mail client\nfiles the reply with it. A contact form thread has none. Cloudflare Email Sending allows both headers.",[766,2855,2856,2861,2862,2865,2866,2869,2870,2280,2873,2876,2877,2880],{},[769,2857,2858,1015],{},[745,2859,2860],{},"From"," Notify's ",[745,2863,2864],{},"from"," (",[745,2867,2868],{},"NUXT_NOTIFY_EMAIL_FROM","). Turn on ",[769,2871,2872],{},"Send replies from this address",[745,2874,2875],{},"config.sendFromAddress",") on an email account to send from ",[745,2878,2879],{},"\"\u003CMailbox name>\" \u003Caddress>"," instead; a contact form\nthread uses the setting of the email account above.",[766,2882,2883,2888,2889,2895,2896,2898,2899,2901,2902,2904],{},[769,2884,2885,1015],{},[745,2886,2887],{},"Message-ID"," the provider's own, unless the Notify driver reports the one it set. Notify's\n",[750,2890,2892],{"href":2891},"\u002Fmodules\u002Fcommunication\u002Fnotify#cloudflare-workers-binding",[745,2893,2894],{},"cloudflare-binding"," driver builds the message itself\nand does: the reply is then stored with ",[745,2897,2792],{},", and an answer that names it in ",[745,2900,2424],{}," or\n",[745,2903,2784],{}," finds the thread by its headers alone, a contact form thread too.",[738,2906,2907,2910,2911,2914,2915,2280,2917,2919,2920,2922],{},[769,2908,2909],{},"The driver of replies."," Replies go out through Notify's driver (",[745,2912,2913],{},"NUXT_NOTIFY_EMAIL_DRIVER","). Set ",[745,2916,1629],{},[745,2918,1648],{},") to a built-in Notify driver to send only the inbox's replies through it, with Notify's\nsettings (",[745,2921,2864],{},", credentials, binding name), while every other email of the app keeps Notify's driver:",[940,2924,2926],{"className":942,"code":2925,"filename":1321,"language":944,"meta":945,"style":945},"NUXT_INBOX_EMAIL_OUTBOUND=cloudflare-binding\n",[745,2927,2928],{"__ignoreMap":945},[949,2929,2930,2932,2934],{"class":951,"line":952},[949,2931,1648],{"class":993},[949,2933,1331],{"class":997},[949,2935,2936],{"class":959},"cloudflare-binding\n",[1376,2938,2939,2945,2946,793],{},[769,2940,2941,2942,793],{},"Verify the domain before you turn on ",[745,2943,2944],{},"sendFromAddress"," The provider Notify sends through (Resend, SES, Cloudflare\nEmail Sending) must have the address's domain verified for sending. Otherwise it refuses every reply, and the reply\nfails with 502 ",[745,2947,2948],{},"delivery_failed",[738,2950,2951,2954,2955,2957,2958,2960,2961,825,2963,2965,2966,2969,2970,2972,2973,793],{},[769,2952,2953],{},"Cc."," A reply copies (Notify's ",[745,2956,2759],{},") the people that the contact's latest authenticated email in the thread copied, as\na reply-all would. The cc of an email that is not authenticated is kept and shown, but never sent to: a forged sender\ncannot make your replies copy a list of strangers. Our own addresses are left out: every email account's address and\n",[745,2959,2396],{},", any address on an inbox domain, the reply's ",[745,2962,2392],{},[745,2964,2860],{},", Notify's sender and the contact's\nown address. When that email copied nobody, the reply has no cc. Only valid email addresses are kept: a malformed ",[745,2967,2968],{},"Cc","\nentry is dropped from the inbound message and so never copied. The inbound ",[745,2971,2759],{}," is stored with the message, without the\nmailbox's own address. The reply stores who it copied. The thread page shows both only to people with ",[745,2974,792],{},[738,2976,2977,2980,2981,2984,2985,2988],{},[769,2978,2979],{},"The reply address is checked the same way."," A reply by email (an email or contact form thread) goes only to one\nplain, valid address. A contact whose address is not one (",[745,2982,2983],{},"a@x.org, b@y.org",", a value with a line break) cannot be\nanswered by email: the reply is refused with 409 ",[745,2986,2987],{},"no_reply_address",", as for a contact with no address.",[2658,2990,2992],{"id":2991},"inbound-drivers","Inbound drivers",[738,2994,2995,2996,2998],{},"Turn the built-in drivers on with ",[745,2997,1577],{},". Several can be on at once.",[1459,3000,3001,3019],{},[1462,3002,3003],{},[1465,3004,3005,3008,3010,3013,3016],{},[1468,3006,3007],{},"Driver",[1468,3009,1470],{},[1468,3011,3012],{},"URL",[1468,3014,3015],{},"Verified by",[1468,3017,3018],{},"Sender authenticated when",[1481,3020,3021,3051,3079,3107,3140],{},[1465,3022,3023,3028,3034,3038,3045],{},[1486,3024,3025],{},[745,3026,3027],{},"webhook",[1486,3029,3030,3033],{},[745,3031,3032],{},"email.inbound.webhook"," (on by default)",[1486,3035,3036],{},[745,3037,840],{},[1486,3039,3040,2294,3043],{},[745,3041,3042],{},"X-Inbox-Signature",[745,3044,1531],{},[1486,3046,3047,3048,2400],{},"The provider's verdict says so (",[745,3049,3050],{},"authenticated",[1465,3052,3053,3057,3062,3069,3072],{},[1486,3054,3055],{},[745,3056,1598],{},[1486,3058,3059],{},[745,3060,3061],{},"email.inbound.cloudflare",[1486,3063,3064,3065,3068],{},"None: the ",[745,3066,3067],{},"cloudflare:email"," hook of the Worker",[1486,3070,3071],{},"Cloudflare delivers it to the Worker",[1486,3073,3074,3075,3078],{},"Cloudflare's ",[745,3076,3077],{},"Authentication-Results"," pass DMARC, or aligned DKIM or SPF, for the From domain",[1465,3080,3081,3085,3090,3095,3101],{},[1486,3082,3083],{},[745,3084,1605],{},[1486,3086,3087],{},[745,3088,3089],{},"email.inbound.resend",[1486,3091,3092],{},[745,3093,3094],{},"POST \u002Fapi\u002Finbox\u002Femail\u002Fresend",[1486,3096,3097,3098],{},"The Svix signature with ",[745,3099,3100],{},"NUXT_INBOX_RESEND_WEBHOOK_SECRET",[1486,3102,3103,3104],{},"Resend reports DMARC or DKIM ",[745,3105,3106],{},"pass",[1465,3108,3109,3113,3118,3128,3131],{},[1486,3110,3111],{},[745,3112,1612],{},[1486,3114,3115],{},[745,3116,3117],{},"email.inbound.gmail",[1486,3119,3120,3123,3124,3127],{},[745,3121,3122],{},"POST \u002Fapi\u002Finbox\u002Femail\u002Fgmail"," (Pub\u002FSub push), and the ",[745,3125,3126],{},"inbox:gmail"," task",[1486,3129,3130],{},"Google's OIDC token on the push",[1486,3132,3133,3134,2865,3136,3139],{},"Gmail's ",[745,3135,3077],{},[745,3137,3138],{},"mx.google.com",") pass DMARC, or aligned DKIM or SPF",[1465,3141,3142,3146,3151,3157,3160],{},[1486,3143,3144],{},[745,3145,1618],{},[1486,3147,3148],{},[745,3149,3150],{},"email.inbound.imap",[1486,3152,3064,3153,3156],{},[745,3154,3155],{},"inbox:imap"," task polls",[1486,3158,3159],{},"The IMAP login",[1486,3161,3162,3163,3165,3166,3169],{},"The server's ",[745,3164,3077],{}," of the account's ",[745,3167,3168],{},"authservIds"," (none by default: unauthenticated)",[940,3171,3173],{"className":973,"code":3172,"filename":970,"language":975,"meta":945,"style":945},"export default defineNuxtConfig({\n  inbox: {\n    email: {\n      domains: ['inbox.example.org'],\n      inbound: { webhook: true, cloudflare: true, resend: true },\n    },\n  },\n})\n",[745,3174,3175,3187,3195,3204,3223,3259,3264,3268],{"__ignoreMap":945},[949,3176,3177,3179,3181,3183,3185],{"class":951,"line":952},[949,3178,983],{"class":982},[949,3180,986],{"class":982},[949,3182,990],{"class":989},[949,3184,994],{"class":993},[949,3186,998],{"class":997},[949,3188,3189,3191,3193],{"class":951,"line":1001},[949,3190,1101],{"class":1011},[949,3192,1015],{"class":997},[949,3194,1106],{"class":997},[949,3196,3197,3200,3202],{"class":951,"line":1008},[949,3198,3199],{"class":1011},"    email",[949,3201,1015],{"class":997},[949,3203,1106],{"class":997},[949,3205,3206,3209,3211,3213,3215,3217,3219,3221],{"class":951,"line":1072},[949,3207,3208],{"class":1011},"      domains",[949,3210,1015],{"class":997},[949,3212,1018],{"class":993},[949,3214,1021],{"class":997},[949,3216,2667],{"class":959},[949,3218,1021],{"class":997},[949,3220,1066],{"class":993},[949,3222,1069],{"class":997},[949,3224,3225,3228,3230,3232,3235,3237,3239,3241,3244,3246,3248,3250,3253,3255,3257],{"class":951,"line":1098},[949,3226,3227],{"class":1011},"      inbound",[949,3229,1015],{"class":997},[949,3231,1080],{"class":997},[949,3233,3234],{"class":1011}," webhook",[949,3236,1015],{"class":997},[949,3238,1277],{"class":1276},[949,3240,1029],{"class":997},[949,3242,3243],{"class":1011}," cloudflare",[949,3245,1015],{"class":997},[949,3247,1277],{"class":1276},[949,3249,1029],{"class":997},[949,3251,3252],{"class":1011}," resend",[949,3254,1015],{"class":997},[949,3256,1277],{"class":1276},[949,3258,1095],{"class":997},[949,3260,3261],{"class":951,"line":1109},[949,3262,3263],{"class":997},"    },\n",[949,3265,3266],{"class":951,"line":1120},[949,3267,1305],{"class":997},[949,3269,3270,3272],{"class":951,"line":1220},[949,3271,1311],{"class":997},[949,3273,1314],{"class":993},[738,3275,3276,3277,3280],{},"Every driver stores a message once per Message-ID and channel account, and answers a redelivery as ",[745,3278,3279],{},"duplicate",".\nControl characters in subjects become spaces.",[738,3282,3283,3286,3287,3293,3294,3297,3298,3301,3302,3305],{},[769,3284,3285],{},"Files."," The Cloudflare, Resend, Gmail and IMAP drivers store attachments in ",[750,3288,3292],{"href":3289,"rel":3290},"https:\u002F\u002Fhub.nuxt.com\u002Fdocs\u002Fblob",[3291],"nofollow","NuxtHub Blob","\nwhen the app has it, under ",[745,3295,3296],{},"inbox\u002Femail\u002F\u003Chash of the Message-ID>\u002F",", and keep the ",[745,3299,3300],{},"pathname"," on the message. Without Blob\nonly the file name, type and size are kept. Files of a message that is already stored, or that retention or an erase\nremoved, are not stored again. Retention and an erase delete the stored files with their messages. The\nwebhook keeps the metadata and the provider's ",[745,3303,3304],{},"url"," it was sent, never the bytes.",[3307,3308,3310],"h6",{"id":3309},"cloudflare-email-routing","Cloudflare Email Routing",[738,3312,3313,3314,3317],{},"The app must run as a Worker with the ",[745,3315,3316],{},"cloudflare-module"," preset.",[2728,3319,3320,3323,3338],{},[766,3321,3322],{},"Add each inbox domain to Cloudflare and turn on Email Routing for it.",[766,3324,3325,3326,3329,3330,3333,3334,3337],{},"Under ",[769,3327,3328],{},"Routing rules",", set the ",[769,3331,3332],{},"Catch-all address"," action to ",[769,3335,3336],{},"Send to a Worker"," and pick the app's Worker. To\nroute single addresses instead, add a custom address per account.",[766,3339,3340,3341,3343,3344,793],{},"Set ",[745,3342,1339],{}," and turn on ",[745,3345,3061],{},[738,3347,3348,3349,3352,3353,3356,3357,3359,3360,3363,3364,2637,3367,3370],{},"Each recipient arrives on its own. An address that is not routed to an account is rejected with ",[745,3350,3351],{},"Unknown address",",\nand the sender gets a bounce. The raw message is parsed with ",[745,3354,3355],{},"postal-mime",". Only the topmost ",[745,3358,3077],{},"\nheader counts, and only when Cloudflare wrote it: headers further down came with the message. Its authserv-id is\n",[745,3361,3362],{},"mx.cloudflare.net","; set others with ",[745,3365,3366],{},"email.inbound.cloudflare.authservIds",[745,3368,3369],{},"NUXT_INBOX_CLOUDFLARE_AUTHSERV_IDS","\n(comma separated). The message is then stored through the driver's own route in the same Worker, with a token that\nlives only in the Worker's memory. Called from outside, that route answers 404.",[738,3372,3373,3376,3377,3379,3380,3382,3383,3386,3387,3389,3390,3393],{},[769,3374,3375],{},"Bounces need the inbox's Worker entry."," Nitro 2's ",[745,3378,3316],{}," entry runs the ",[745,3381,3067],{}," hook in\n",[745,3384,3385],{},"waitUntil"," and returns at once, so Cloudflare has accepted the email before any hook could reject it. With the\nCloudflare driver on, the inbox builds the Worker from a small entry around the preset's own that waits for the hook,\nso ",[745,3388,3351],{}," reaches Cloudflare as a bounce. Nothing else of the preset changes. It is skipped (with a warning\nat build time) when another module or the app replaced the entry, and turned off with\n",[745,3391,3392],{},"email.inbound.cloudflare.entry: false",": unknown recipients are then accepted and dropped, with a log line.",[892,3395,3396],{},"An email routed to a mailbox that fails to store (the database is down) is logged, not bounced: the sender is not told.",[3307,3398,3399],{"id":1605},"Resend",[2728,3401,3402,3409,3419,3431],{},[766,3403,3404,3405,3408],{},"Add a receiving domain at Resend (or use your ",[745,3406,3407],{},"*.resend.app"," address) and point its MX records at Resend.",[766,3410,3411,3412,3415,3416,793],{},"Add a webhook for the ",[745,3413,3414],{},"email.received"," event with the URL ",[745,3417,3418],{},"https:\u002F\u002F\u003Cyour app>\u002Fapi\u002Finbox\u002Femail\u002Fresend",[766,3420,3421,3422,3424,3425,3428,3429,793],{},"Set its signing secret as ",[745,3423,3100],{},", and an API key that can read received emails as\n",[745,3426,3427],{},"NUXT_INBOX_RESEND_API_KEY",". Without both, the webhook answers 501 ",[745,3430,1545],{},[766,3432,3433,3434,793],{},"Turn on ",[745,3435,3089],{},[738,3437,3438,3439,3442],{},"The webhook only names the email. The driver fetches it from the Resend API (",[745,3440,3441],{},"GET \u002Femails\u002Freceiving\u002F:id",") with its\ntext, headers and Resend's SPF, DKIM and DMARC verdicts, and its files when it reaches a mailbox. The driver answers:",[763,3444,3445,3451,3457],{},[766,3446,3447,3450],{},[769,3448,3449],{},"401"," for a bad signature, or a timestamp more than five minutes off;",[766,3452,3453,3456],{},[769,3454,3455],{},"502"," when the Resend API fails, so Resend retries;",[766,3458,3459,3462,3463,1939,3465,793],{},[769,3460,3461],{},"200"," otherwise. An event other than ",[745,3464,3414],{},[745,3466,2698],{},[3307,3468,3470],{"id":3469},"google-workspace-gmail","Google Workspace (Gmail)",[738,3472,3473,3474,3477],{},"The Gmail driver reads Google Workspace mailboxes through the Gmail API, so the mail stays in Gmail and the inbox gets\na copy. It runs on Workers and on Node: it uses ",[745,3475,3476],{},"fetch"," and WebCrypto only.",[2728,3479,3480,3504,3518,3539,3557],{},[766,3481,3482,3485,3486,3489,3490,825,3493,3489,3496,3499,3500,3503],{},[769,3483,3484],{},"A service account."," In a Google Cloud project, turn on the Gmail API and Pub\u002FSub, create a service account and a\nJSON key. Set ",[745,3487,3488],{},"client_email"," as ",[745,3491,3492],{},"NUXT_INBOX_GMAIL_CLIENT_EMAIL",[745,3494,3495],{},"private_key",[745,3497,3498],{},"NUXT_INBOX_GMAIL_PRIVATE_KEY","\n(escaped ",[745,3501,3502],{},"\\n"," line breaks are fine).",[766,3505,3506,3509,3510,3513,3514,3517],{},[769,3507,3508],{},"Domain-wide delegation."," In the Workspace Admin console (",[769,3511,3512],{},"Security > API controls > Domain-wide delegation","),\nadd the service account's client id with the scope ",[745,3515,3516],{},"https:\u002F\u002Fwww.googleapis.com\u002Fauth\u002Fgmail.readonly",". The driver acts\nas each watched mailbox, read only.",[766,3519,3520,3523,3524,2865,3527,3530,3531,3534,3535,3538],{},[769,3521,3522],{},"A topic."," Create a Pub\u002FSub topic, set it as ",[745,3525,3526],{},"NUXT_INBOX_GMAIL_TOPIC",[745,3528,3529],{},"projects\u002F\u003Cproject>\u002Ftopics\u002F\u003Ctopic>","), and\ngive ",[745,3532,3533],{},"gmail-api-push@system.gserviceaccount.com"," the ",[769,3536,3537],{},"Pub\u002FSub Publisher"," role on it.",[766,3540,3541,3544,3545,3548,3549,3552,3553,3556],{},[769,3542,3543],{},"A push subscription"," on the topic, to ",[745,3546,3547],{},"https:\u002F\u002F\u003Cyour app>\u002Fapi\u002Finbox\u002Femail\u002Fgmail",", with authentication on: pick a\nservice account and an audience (the URL itself is fine). Set the audience as ",[745,3550,3551],{},"NUXT_INBOX_GMAIL_AUDIENCE",", and that\nservice account's email as ",[745,3554,3555],{},"NUXT_INBOX_GMAIL_PUSH_SERVICE_ACCOUNT"," (checked when set).",[766,3558,3559,3562,3563,3565,3566,3569],{},[769,3560,3561],{},"The accounts."," Turn on ",[745,3564,3117],{},", and connect each mailbox's address as an email account with\n",[745,3567,3568],{},"config: { inbound: 'gmail' }",". The address must be the Workspace user the driver acts as.",[940,3571,3573],{"className":973,"code":3572,"filename":970,"language":975,"meta":945,"style":945},"inbox: {\n  email: { inbound: { gmail: true } },\n},\n",[745,3574,3575,3583,3610],{"__ignoreMap":945},[949,3576,3577,3579,3581],{"class":951,"line":952},[949,3578,1456],{"class":955},[949,3580,1015],{"class":997},[949,3582,1106],{"class":997},[949,3584,3585,3588,3590,3592,3595,3597,3599,3602,3604,3606,3608],{"class":951,"line":1001},[949,3586,3587],{"class":955},"  email",[949,3589,1015],{"class":997},[949,3591,1080],{"class":997},[949,3593,3594],{"class":955}," inbound",[949,3596,1015],{"class":997},[949,3598,1080],{"class":997},[949,3600,3601],{"class":955}," gmail",[949,3603,1015],{"class":997},[949,3605,1277],{"class":1276},[949,3607,1211],{"class":997},[949,3609,1095],{"class":997},[949,3611,3612],{"class":951,"line":1008},[949,3613,1217],{"class":997},[738,3615,3616],{},"How it runs:",[763,3618,3619,3644,3661,3673,3686],{},[766,3620,3621,3624,3625,3627,3628,3631,3632,3635,3636,3639,3640,3643],{},[769,3622,3623],{},"Watches."," The ",[745,3626,3126],{}," task (",[745,3629,3630],{},"email.inbound.gmail.cron",", daily at ",[745,3633,3634],{},"15 4 * * *",") calls ",[745,3637,3638],{},"users.watch"," for\nevery Gmail account whose watch has less than two days left (a watch lasts seven days), then catches up on anything a\npush missed. An account takes in nothing before its first watch: run the task once after connecting one (Nitro's\n",[745,3641,3642],{},"runTask('inbox:gmail')","), or wait for its next run.",[766,3645,3646,3649,3650,3653,3654,3657,3658,793],{},[769,3647,3648],{},"Pushes."," A push carries the mailbox and its new history id. The driver checks the OIDC token (Google's signature,\nthe audience, the service account), lists what was added to the inbox since the stored history id\n(",[745,3651,3652],{},"users.history.list","), fetches each new message raw (",[745,3655,3656],{},"users.messages.get?format=raw",") and stores it. Sent mail,\ndrafts and spam are skipped. The history id is stored per account in ",[745,3659,3660],{},"inbox_email_cursors",[766,3662,3663,3666,3667,3669,3670,3672],{},[769,3664,3665],{},"Answers."," 501 ",[745,3668,1545],{}," without the service account or the audience, 401 for a bad token, 200 once handled\n(an unknown mailbox is ",[745,3671,2698],{},"), 502 when the Gmail API fails, so Pub\u002FSub retries. A message is stored once per\nMessage-ID, so a retry or a catch-up never stores it twice.",[766,3674,3675,3678,3679,3682,3683,3685],{},[769,3676,3677],{},"Recipients."," A message is stored for the account it was fetched for (its ",[745,3680,3681],{},"To","\u002F",[745,3684,2968],{}," plus addresses of it keep their\nthread hint). Other inbox accounts it names get it through their own mailbox.",[766,3687,3688,3691],{},[769,3689,3690],{},"The start."," Mail older than the first watch is not imported. When Gmail no longer has the stored history (about a\nweek without pushes or task runs), the driver starts over from now.",[3693,3694,3695,3698,3699,3702,3703,3705],"tip",{},[769,3696,3697],{},"No code at all:"," forward the mail to an inbox domain instead. In the Workspace Admin console (",[769,3700,3701],{},"Apps > Google\nWorkspace > Gmail > Routing","), add a routing rule for the address that adds a recipient (or changes the envelope\nrecipient) on an inbox domain handled by Cloudflare Email Routing, such as ",[745,3704,2684],{},". The mail then\narrives through the Cloudflare driver, and the original stays in Gmail. Replies need the same address to be on the\ninbox domain to carry the thread's reply address.",[3307,3707,3708],{"id":1618},"IMAP",[738,3710,3711,3712,3717,3718,3721],{},"The IMAP driver polls any IMAP mailbox with ",[750,3713,3716],{"href":3714,"rel":3715},"https:\u002F\u002Fimapflow.com",[3291],"imapflow",". It runs on Node and on Cloudflare Workers:\nthere it connects over ",[745,3719,3720],{},"cloudflare:sockets",", which also handles STARTTLS.",[2728,3723,3724,3728],{},[766,3725,3433,3726,793],{},[745,3727,3150],{},[766,3729,3730,3731,3734,3735,3738,3739,3741,3742,3744],{},"Connect the address as an email account with ",[745,3732,3733],{},"config.inbound: 'imap'"," and its connection in ",[745,3736,3737],{},"config.imap",", and the\npassword's name in ",[745,3740,1782],{},". Set the password as ",[745,3743,1786],{},": it never goes in the config or the\ndatabase.",[940,3746,3750],{"className":3747,"code":3748,"language":3749,"meta":945,"style":945},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{\n  \"inbound\": \"imap\",\n  \"imap\": { \"host\": \"imap.example.org\", \"port\": 993, \"secure\": true, \"user\": \"support@example.org\", \"mailbox\": \"INBOX\", \"authservIds\": [\"mx.example.org\"] }\n}\n","json",[745,3751,3752,3756,3779,3894],{"__ignoreMap":945},[949,3753,3754],{"class":951,"line":952},[949,3755,998],{"class":997},[949,3757,3758,3761,3765,3768,3770,3773,3775,3777],{"class":951,"line":1001},[949,3759,3760],{"class":997},"  \"",[949,3762,3764],{"class":3763},"spNyl","inbound",[949,3766,3767],{"class":997},"\"",[949,3769,1015],{"class":997},[949,3771,3772],{"class":997}," \"",[949,3774,1618],{"class":959},[949,3776,3767],{"class":997},[949,3778,1069],{"class":997},[949,3780,3781,3783,3785,3787,3789,3791,3793,3796,3798,3800,3802,3805,3807,3809,3811,3814,3816,3818,3822,3824,3826,3829,3831,3833,3836,3838,3841,3843,3845,3847,3850,3852,3854,3856,3859,3861,3863,3865,3868,3870,3872,3874,3876,3878,3880,3882,3884,3887,3889,3891],{"class":951,"line":1008},[949,3782,3760],{"class":997},[949,3784,1618],{"class":3763},[949,3786,3767],{"class":997},[949,3788,1015],{"class":997},[949,3790,1080],{"class":997},[949,3792,3772],{"class":997},[949,3794,3795],{"class":955},"host",[949,3797,3767],{"class":997},[949,3799,1015],{"class":997},[949,3801,3772],{"class":997},[949,3803,3804],{"class":959},"imap.example.org",[949,3806,3767],{"class":997},[949,3808,1029],{"class":997},[949,3810,3772],{"class":997},[949,3812,3813],{"class":955},"port",[949,3815,3767],{"class":997},[949,3817,1015],{"class":997},[949,3819,3821],{"class":3820},"sbssI"," 993",[949,3823,1029],{"class":997},[949,3825,3772],{"class":997},[949,3827,3828],{"class":955},"secure",[949,3830,3767],{"class":997},[949,3832,1015],{"class":997},[949,3834,3835],{"class":997}," true,",[949,3837,3772],{"class":997},[949,3839,3840],{"class":955},"user",[949,3842,3767],{"class":997},[949,3844,1015],{"class":997},[949,3846,3772],{"class":997},[949,3848,3849],{"class":959},"support@example.org",[949,3851,3767],{"class":997},[949,3853,1029],{"class":997},[949,3855,3772],{"class":997},[949,3857,3858],{"class":955},"mailbox",[949,3860,3767],{"class":997},[949,3862,1015],{"class":997},[949,3864,3772],{"class":997},[949,3866,3867],{"class":959},"INBOX",[949,3869,3767],{"class":997},[949,3871,1029],{"class":997},[949,3873,3772],{"class":997},[949,3875,3168],{"class":955},[949,3877,3767],{"class":997},[949,3879,1015],{"class":997},[949,3881,1018],{"class":997},[949,3883,3767],{"class":997},[949,3885,3886],{"class":959},"mx.example.org",[949,3888,3767],{"class":997},[949,3890,1066],{"class":997},[949,3892,3893],{"class":997}," }\n",[949,3895,3896],{"class":951,"line":1072},[949,3897,3898],{"class":997},"}\n",[738,3900,3901,3903,3904,3906,3907,3909,3910,3912,3913,793],{},[745,3902,3813],{}," defaults to 993 with ",[745,3905,3828],{}," (implicit TLS, the default) and 143 without (STARTTLS when the server offers it).\n",[745,3908,3840],{}," defaults to the address, ",[745,3911,3858],{}," to ",[745,3914,3867],{},[738,3916,1562,3917,3627,3919,3922,3923,3926,3927,3929],{},[745,3918,3155],{},[745,3920,3921],{},"email.inbound.imap.cron",", every five minutes) opens each mailbox read-only, and fetches the\nmessages with a UID above the last one it saw with ",[745,3924,3925],{},"BODY.PEEK[]",", so nothing is marked read or changed. It stores at most\n50 messages per account and run, and keeps the last UID and the mailbox's UIDVALIDITY in ",[745,3928,3660],{}," after\neach one. The first poll of a mailbox, and the first after its UIDVALIDITY changed, imports nothing and starts after the\nnewest message. A failing account is logged; the others still run.",[738,3931,3932,3933,3935,3936,3939,3940,3942],{},"Authentication comes from the server's own ",[745,3934,3077],{}," header, when the account names its authserv-ids\nin ",[745,3937,3938],{},"config.imap.authservIds"," (Gmail and Workspace: ",[745,3941,3138],{},"). Without them every message is unauthenticated and\nstarts a new thread: set them for answers to thread.",[3307,3944,3946],{"id":3945},"the-signed-json-webhook","The signed JSON webhook",[738,3948,3949,3950,3952],{},"Point any other provider's inbound webhook (Postmark, Mailgun, SendGrid, ...) at ",[745,3951,840],{},"\nand map its payload to this JSON:",[940,3954,3956],{"className":3747,"code":3955,"language":3749,"meta":945,"style":945},"{\n  \"messageId\": \"\u003CCAF1234@mail.example.org>\",\n  \"from\": { \"email\": \"kari@example.org\", \"name\": \"Kari Nordmann\" },\n  \"to\": \"support@example.com\",\n  \"cc\": [{ \"email\": \"ola@example.org\", \"name\": \"Ola\" }],\n  \"subject\": \"Where is my ticket?\",\n  \"text\": \"Hello, I never got my ticket.\",\n  \"html\": \"\u003Cp>Hello, …\u003C\u002Fp>\",\n  \"inReplyTo\": \"\u003Creply-1@example.com>\",\n  \"references\": [\"\u003Cfirst@mail.example.org>\", \"\u003Creply-1@example.com>\"],\n  \"attachments\": [{ \"filename\": \"ticket.pdf\", \"contentType\": \"application\u002Fpdf\", \"size\": 1200, \"url\": \"https:\u002F\u002F…\" }],\n  \"authenticated\": true\n}\n",[745,3957,3958,3962,3982,4028,4047,4095,4114,4134,4154,4174,4205,4285,4298],{"__ignoreMap":945},[949,3959,3960],{"class":951,"line":952},[949,3961,998],{"class":997},[949,3963,3964,3966,3969,3971,3973,3975,3978,3980],{"class":951,"line":1001},[949,3965,3760],{"class":997},[949,3967,3968],{"class":3763},"messageId",[949,3970,3767],{"class":997},[949,3972,1015],{"class":997},[949,3974,3772],{"class":997},[949,3976,3977],{"class":959},"\u003CCAF1234@mail.example.org>",[949,3979,3767],{"class":997},[949,3981,1069],{"class":997},[949,3983,3984,3986,3988,3990,3992,3994,3996,3998,4000,4002,4004,4007,4009,4011,4013,4015,4017,4019,4021,4024,4026],{"class":951,"line":1008},[949,3985,3760],{"class":997},[949,3987,2864],{"class":3763},[949,3989,3767],{"class":997},[949,3991,1015],{"class":997},[949,3993,1080],{"class":997},[949,3995,3772],{"class":997},[949,3997,818],{"class":955},[949,3999,3767],{"class":997},[949,4001,1015],{"class":997},[949,4003,3772],{"class":997},[949,4005,4006],{"class":959},"kari@example.org",[949,4008,3767],{"class":997},[949,4010,1029],{"class":997},[949,4012,3772],{"class":997},[949,4014,2558],{"class":955},[949,4016,3767],{"class":997},[949,4018,1015],{"class":997},[949,4020,3772],{"class":997},[949,4022,4023],{"class":959},"Kari Nordmann",[949,4025,3767],{"class":997},[949,4027,1095],{"class":997},[949,4029,4030,4032,4034,4036,4038,4040,4043,4045],{"class":951,"line":1072},[949,4031,3760],{"class":997},[949,4033,2756],{"class":3763},[949,4035,3767],{"class":997},[949,4037,1015],{"class":997},[949,4039,3772],{"class":997},[949,4041,4042],{"class":959},"support@example.com",[949,4044,3767],{"class":997},[949,4046,1069],{"class":997},[949,4048,4049,4051,4053,4055,4057,4060,4062,4064,4066,4068,4070,4073,4075,4077,4079,4081,4083,4085,4087,4090,4092],{"class":951,"line":1098},[949,4050,3760],{"class":997},[949,4052,2759],{"class":3763},[949,4054,3767],{"class":997},[949,4056,1015],{"class":997},[949,4058,4059],{"class":997}," [{",[949,4061,3772],{"class":997},[949,4063,818],{"class":955},[949,4065,3767],{"class":997},[949,4067,1015],{"class":997},[949,4069,3772],{"class":997},[949,4071,4072],{"class":959},"ola@example.org",[949,4074,3767],{"class":997},[949,4076,1029],{"class":997},[949,4078,3772],{"class":997},[949,4080,2558],{"class":955},[949,4082,3767],{"class":997},[949,4084,1015],{"class":997},[949,4086,3772],{"class":997},[949,4088,4089],{"class":959},"Ola",[949,4091,3767],{"class":997},[949,4093,4094],{"class":997}," }],\n",[949,4096,4097,4099,4101,4103,4105,4107,4110,4112],{"class":951,"line":1109},[949,4098,3760],{"class":997},[949,4100,2566],{"class":3763},[949,4102,3767],{"class":997},[949,4104,1015],{"class":997},[949,4106,3772],{"class":997},[949,4108,4109],{"class":959},"Where is my ticket?",[949,4111,3767],{"class":997},[949,4113,1069],{"class":997},[949,4115,4116,4118,4121,4123,4125,4127,4130,4132],{"class":951,"line":1120},[949,4117,3760],{"class":997},[949,4119,4120],{"class":3763},"text",[949,4122,3767],{"class":997},[949,4124,1015],{"class":997},[949,4126,3772],{"class":997},[949,4128,4129],{"class":959},"Hello, I never got my ticket.",[949,4131,3767],{"class":997},[949,4133,1069],{"class":997},[949,4135,4136,4138,4141,4143,4145,4147,4150,4152],{"class":951,"line":1220},[949,4137,3760],{"class":997},[949,4139,4140],{"class":3763},"html",[949,4142,3767],{"class":997},[949,4144,1015],{"class":997},[949,4146,3772],{"class":997},[949,4148,4149],{"class":959},"\u003Cp>Hello, …\u003C\u002Fp>",[949,4151,3767],{"class":997},[949,4153,1069],{"class":997},[949,4155,4156,4158,4161,4163,4165,4167,4170,4172],{"class":951,"line":1228},[949,4157,3760],{"class":997},[949,4159,4160],{"class":3763},"inReplyTo",[949,4162,3767],{"class":997},[949,4164,1015],{"class":997},[949,4166,3772],{"class":997},[949,4168,4169],{"class":959},"\u003Creply-1@example.com>",[949,4171,3767],{"class":997},[949,4173,1069],{"class":997},[949,4175,4176,4178,4181,4183,4185,4187,4189,4192,4194,4196,4198,4200,4202],{"class":951,"line":1234},[949,4177,3760],{"class":997},[949,4179,4180],{"class":3763},"references",[949,4182,3767],{"class":997},[949,4184,1015],{"class":997},[949,4186,1018],{"class":997},[949,4188,3767],{"class":997},[949,4190,4191],{"class":959},"\u003Cfirst@mail.example.org>",[949,4193,3767],{"class":997},[949,4195,1029],{"class":997},[949,4197,3772],{"class":997},[949,4199,4169],{"class":959},[949,4201,3767],{"class":997},[949,4203,4204],{"class":997},"],\n",[949,4206,4207,4209,4212,4214,4216,4218,4220,4223,4225,4227,4229,4232,4234,4236,4238,4241,4243,4245,4247,4250,4252,4254,4256,4259,4261,4263,4266,4268,4270,4272,4274,4276,4278,4281,4283],{"class":951,"line":1254},[949,4208,3760],{"class":997},[949,4210,4211],{"class":3763},"attachments",[949,4213,3767],{"class":997},[949,4215,1015],{"class":997},[949,4217,4059],{"class":997},[949,4219,3772],{"class":997},[949,4221,4222],{"class":955},"filename",[949,4224,3767],{"class":997},[949,4226,1015],{"class":997},[949,4228,3772],{"class":997},[949,4230,4231],{"class":959},"ticket.pdf",[949,4233,3767],{"class":997},[949,4235,1029],{"class":997},[949,4237,3772],{"class":997},[949,4239,4240],{"class":955},"contentType",[949,4242,3767],{"class":997},[949,4244,1015],{"class":997},[949,4246,3772],{"class":997},[949,4248,4249],{"class":959},"application\u002Fpdf",[949,4251,3767],{"class":997},[949,4253,1029],{"class":997},[949,4255,3772],{"class":997},[949,4257,4258],{"class":955},"size",[949,4260,3767],{"class":997},[949,4262,1015],{"class":997},[949,4264,4265],{"class":3820}," 1200",[949,4267,1029],{"class":997},[949,4269,3772],{"class":997},[949,4271,3304],{"class":955},[949,4273,3767],{"class":997},[949,4275,1015],{"class":997},[949,4277,3772],{"class":997},[949,4279,4280],{"class":959},"https:\u002F\u002F…",[949,4282,3767],{"class":997},[949,4284,4094],{"class":997},[949,4286,4287,4289,4291,4293,4295],{"class":951,"line":1302},[949,4288,3760],{"class":997},[949,4290,3050],{"class":3763},[949,4292,3767],{"class":997},[949,4294,1015],{"class":997},[949,4296,4297],{"class":997}," true\n",[949,4299,4300],{"class":951,"line":1308},[949,4301,3898],{"class":997},[738,4303,4304,825,4306,4308,4309,4311,4312,4315,4316,825,4318,4320],{},[745,4305,4160],{},[745,4307,4180],{}," are optional. ",[745,4310,4180],{}," is one header value or a list. Instead of these two fields,\nyou can pass the raw headers in ",[745,4313,4314],{},"headers",", an object keyed by header name. Only ",[745,4317,2424],{},[745,4319,2784],{}," are read\nfrom it.",[1376,4322,4323,4328,4329,4331,4332,4334],{},[769,4324,4325,4326,793],{},"Pass the provider's sender verdict as ",[745,4327,3050],{}," Set it to ",[745,4330,890],{}," only when the email passed SPF, DKIM or\nDMARC at your provider; inbound providers report it, for example in an ",[745,4333,3077],{}," header. An email\nwithout it is treated as unverified: it always starts a new thread and never renames a contact.",[738,4336,4337,4338,793],{},"Sign the raw body with ",[745,4339,4340],{},"X-Inbox-Signature: sha256=\u003CHMAC-SHA256 of the body with email.webhookSecret>",[763,4342,4343,4349,4359,4365],{},[766,4344,4345,4348],{},[769,4346,4347],{},"Wrong signature:"," 401.",[766,4350,4351,4354,4355,4358],{},[769,4352,4353],{},"Larger than 1 MB:"," 413 ",[745,4356,4357],{},"payload_too_large"," (the same limit applies to the Meta and module webhooks).",[766,4360,4361,4364],{},[769,4362,4363],{},"Not an email:"," 400.",[766,4366,4367,4370,4371],{},[769,4368,4369],{},"Every other case:"," 200, so the provider stops retrying.\n",[763,4372,4373,4379,4389,4395],{},[766,4374,4375,4376,793],{},"A new message: ",[745,4377,4378],{},"{ status: 'received', threadId, messageId }",[766,4380,4381,4382,4385,4386,4388],{},"A redelivery: ",[745,4383,4384],{},"{ status: 'duplicate' }",". A message is stored once per ",[745,4387,3968],{}," and channel account.",[766,4390,4391,4392,793],{},"An address no account has: ",[745,4393,4394],{},"{ status: 'ignored', reason: 'no_account' }",[766,4396,4397,4398,4401],{},"A message retention or an erase removed: ",[745,4399,4400],{},"{ status: 'ignored', reason: 'removed' }"," (see Replays below).",[738,4403,4404,4405,4408,4409,793],{},"The answer describes the first account's delivery. When more than one account matched, ",[745,4406,4407],{},"deliveries"," lists each, with\nits ",[745,4410,4411],{},"mailboxId",[3307,4413,4415],{"id":4414},"a-driver-of-your-own","A driver of your own",[738,4417,4418,4419,4422,4423,4426,4427,4429,4430,4433,4434,4437],{},"A driver is a server file that default-exports ",[745,4420,4421],{},"defineInboxEmailDriver"," (from ",[745,4424,4425],{},"@frigear-nu\u002Finbox\u002Futils","). It has a\n",[745,4428,2558],{}," and a ",[745,4431,4432],{},"handler",", a ",[745,4435,4436],{},"setup",", or both:",[763,4439,4440,4451],{},[766,4441,4442,4446,4447,4450],{},[769,4443,4444],{},[745,4445,4432],{}," is mounted at ",[745,4448,4449],{},"POST \u002Fapi\u002Finbox\u002Femail\u002F\u003Cname>",". Verify the request there first.",[766,4452,4453,4458],{},[769,4454,4455],{},[745,4456,4457],{},"setup(nitroApp)"," runs once in a Nitro plugin, to register runtime hooks.",[738,4460,4461,4462,4465,4466,4468,4469,4472],{},"Map what the provider sends to the payload above and hand it to ",[745,4463,4464],{},"inboxIngestEmail(event, payload, options?)",". It routes,\nthreads and stores the email like the built-in drivers. Register the driver with ",[745,4467,1656],{}," or a module's\n",[745,4470,4471],{},"extendInbox(nuxt, { emailDrivers })",". A later driver with the same name replaces an earlier one.",[940,4474,4477],{"className":973,"code":4475,"filename":4476,"language":975,"meta":945,"style":945},"import { defineInboxEmailDriver } from '@frigear-nu\u002Finbox\u002Futils'\n\nexport default defineInboxEmailDriver({\n  name: 'acme',\n  async handler(event) {\n    const raw = await inboxReadRawBody(event)\n    \u002F\u002F ...verify Acme's signature over `raw`, then map its JSON to the inbox payload.\n    const payload = toInboxEmailPayload(JSON.parse(raw))\n    return (await inboxIngestEmail(event, payload)).response\n  },\n})\n","server\u002Finbox\u002Facme-mail.ts",[745,4478,4479,4501,4507,4519,4535,4553,4576,4581,4611,4640,4644],{"__ignoreMap":945},[949,4480,4481,4484,4486,4489,4491,4494,4496,4498],{"class":951,"line":952},[949,4482,4483],{"class":982},"import",[949,4485,1080],{"class":997},[949,4487,4488],{"class":993}," defineInboxEmailDriver",[949,4490,1211],{"class":997},[949,4492,4493],{"class":982}," from",[949,4495,1032],{"class":997},[949,4497,4425],{"class":959},[949,4499,4500],{"class":997},"'\n",[949,4502,4503],{"class":951,"line":1001},[949,4504,4506],{"emptyLinePlaceholder":4505},true,"\n",[949,4508,4509,4511,4513,4515,4517],{"class":951,"line":1008},[949,4510,983],{"class":982},[949,4512,986],{"class":982},[949,4514,4488],{"class":989},[949,4516,994],{"class":993},[949,4518,998],{"class":997},[949,4520,4521,4524,4526,4528,4531,4533],{"class":951,"line":1072},[949,4522,4523],{"class":1011},"  name",[949,4525,1015],{"class":997},[949,4527,1032],{"class":997},[949,4529,4530],{"class":959},"acme",[949,4532,1021],{"class":997},[949,4534,1069],{"class":997},[949,4536,4537,4540,4543,4545,4549,4551],{"class":951,"line":1098},[949,4538,4539],{"class":3763},"  async",[949,4541,4542],{"class":1011}," handler",[949,4544,994],{"class":997},[949,4546,4548],{"class":4547},"sHdIc","event",[949,4550,2400],{"class":997},[949,4552,1106],{"class":997},[949,4554,4555,4558,4561,4564,4567,4570,4572,4574],{"class":951,"line":1109},[949,4556,4557],{"class":3763},"    const",[949,4559,4560],{"class":993}," raw",[949,4562,4563],{"class":997}," =",[949,4565,4566],{"class":982}," await",[949,4568,4569],{"class":989}," inboxReadRawBody",[949,4571,994],{"class":1011},[949,4573,4548],{"class":993},[949,4575,1314],{"class":1011},[949,4577,4578],{"class":951,"line":1120},[949,4579,4580],{"class":1004},"    \u002F\u002F ...verify Acme's signature over `raw`, then map its JSON to the inbox payload.\n",[949,4582,4583,4585,4588,4590,4593,4595,4598,4600,4603,4605,4608],{"class":951,"line":1220},[949,4584,4557],{"class":3763},[949,4586,4587],{"class":993}," payload",[949,4589,4563],{"class":997},[949,4591,4592],{"class":989}," toInboxEmailPayload",[949,4594,994],{"class":1011},[949,4596,4597],{"class":993},"JSON",[949,4599,793],{"class":997},[949,4601,4602],{"class":989},"parse",[949,4604,994],{"class":1011},[949,4606,4607],{"class":993},"raw",[949,4609,4610],{"class":1011},"))\n",[949,4612,4613,4616,4618,4621,4624,4626,4628,4630,4632,4635,4637],{"class":951,"line":1228},[949,4614,4615],{"class":982},"    return",[949,4617,2865],{"class":1011},[949,4619,4620],{"class":982},"await",[949,4622,4623],{"class":989}," inboxIngestEmail",[949,4625,994],{"class":1011},[949,4627,4548],{"class":993},[949,4629,1029],{"class":997},[949,4631,4587],{"class":993},[949,4633,4634],{"class":1011},"))",[949,4636,793],{"class":997},[949,4638,4639],{"class":993},"response\n",[949,4641,4642],{"class":951,"line":1234},[949,4643,1305],{"class":997},[949,4645,4646,4648],{"class":951,"line":1254},[949,4647,1311],{"class":997},[949,4649,1314],{"class":993},[940,4651,4653],{"className":973,"code":4652,"filename":970,"language":975,"meta":945,"style":945},"inbox: {\n  email: { drivers: [{ name: 'acme', driver: fileURLToPath(new URL('.\u002Fserver\u002Finbox\u002Facme-mail.ts', import.meta.url)) }] },\n},\n",[745,4654,4655,4663,4740],{"__ignoreMap":945},[949,4656,4657,4659,4661],{"class":951,"line":952},[949,4658,1456],{"class":955},[949,4660,1015],{"class":997},[949,4662,1106],{"class":997},[949,4664,4665,4667,4669,4671,4674,4676,4678,4680,4682,4684,4686,4688,4690,4692,4695,4697,4700,4702,4705,4708,4710,4712,4715,4717,4719,4722,4724,4727,4729,4731,4734,4736,4738],{"class":951,"line":1001},[949,4666,3587],{"class":955},[949,4668,1015],{"class":997},[949,4670,1080],{"class":997},[949,4672,4673],{"class":955}," drivers",[949,4675,1015],{"class":997},[949,4677,1018],{"class":1011},[949,4679,1182],{"class":997},[949,4681,1140],{"class":1011},[949,4683,1015],{"class":997},[949,4685,1032],{"class":997},[949,4687,4530],{"class":959},[949,4689,1021],{"class":997},[949,4691,1029],{"class":997},[949,4693,4694],{"class":1011}," driver",[949,4696,1015],{"class":997},[949,4698,4699],{"class":989}," fileURLToPath",[949,4701,994],{"class":1011},[949,4703,4704],{"class":997},"new",[949,4706,4707],{"class":989}," URL",[949,4709,994],{"class":1011},[949,4711,1021],{"class":997},[949,4713,4714],{"class":959},".\u002Fserver\u002Finbox\u002Facme-mail.ts",[949,4716,1021],{"class":997},[949,4718,1029],{"class":997},[949,4720,4721],{"class":982}," import",[949,4723,793],{"class":997},[949,4725,4726],{"class":993},"meta",[949,4728,793],{"class":997},[949,4730,3304],{"class":993},[949,4732,4733],{"class":1011},")) ",[949,4735,1311],{"class":997},[949,4737,1214],{"class":1011},[949,4739,1217],{"class":997},[949,4741,4742],{"class":951,"line":1008},[949,4743,1217],{"class":997},[2658,4745,4747],{"id":4746},"senders-and-contacts","Senders and contacts",[738,4749,4750,4751,4754,4755,2284],{},"Each inbound message records the contact who sent it (",[745,4752,4753],{},"contactId"," on the message) and whether it was authenticated.\nAn emailed answer filed in a contact form thread belongs to the form's contact, but its sender is the email contact;\nexport and erase find it by that (see ",[750,4756,4758],{"href":4757},"#privacy","Privacy",[738,4760,4761,4764,4765,4768,4769,4771,4772,4775],{},[769,4762,4763],{},"Contact form senders are verified only by their own address."," Anybody can type someone else's email address into a\nform, so a submission counts as verified only when a signed-in user typed their own account email. Then it may join\nthat contact's open thread, rename it and link it to the account (",[745,4766,4767],{},"userId","). Anything else, a submission without a\nsigned-in user or a signed-in user who typed another address, is unverified: it always starts a new thread, never\nrenames the contact and never sets its ",[745,4770,4767],{},". A signed-in user who typed no address is keyed on their account\n(",[745,4773,4774],{},"user:\u003Cid>","). A typed value that is not one valid address is not stored as the contact's email.",[2649,4777,4779],{"id":4778},"meta-whatsapp-messenger-and-instagram","Meta: WhatsApp, Messenger and Instagram",[738,4781,4782,4783,793],{},"One webhook URL serves all three: ",[745,4784,4785],{},"\u002Fapi\u002Finbox\u002Fwebhooks\u002Fmeta",[763,4787,4788,4806],{},[766,4789,4790,4794,4795,4798,4799,4802,4803,4805],{},[769,4791,4792],{},[745,4793,844],{}," is Meta's subscription check. It echoes ",[745,4796,4797],{},"hub.challenge"," when ",[745,4800,4801],{},"hub.verify_token"," matches\n",[745,4804,1703],{},", and answers 403 otherwise. The token is compared in constant time: both sides are HMAC-ed\nwith a random key and the digests compared, so neither its length nor where it differs shows in the timing.",[766,4807,4808,4813,4814,4816,4817],{},[769,4809,4810],{},[745,4811,4812],{},"POST"," is checked against ",[745,4815,1693],{}," with the app secret.\n",[763,4818,4819,4822,4829,4832],{},[766,4820,4821],{},"A wrong signature gets a 401.",[766,4823,4824,4825,4828],{},"Otherwise it always answers 200 with counts: ",[745,4826,4827],{},"{ received, duplicates, ignored, failed }",". Meta retries and backs\noff on errors, so a duplicate or an unknown account never gets an error.",[766,4830,4831],{},"Each message goes to the account at the phone number id, page id or Instagram id it was sent to.\nMeta's signature vouches for the sender, so a message joins the contact's latest thread that is not closed.",[766,4833,4834],{},"Read and delivery statuses and echoes of your own replies are skipped. Media arrives as a placeholder with the\nmedia id or link.",[738,4836,4837,4838,4840,4841,4843,4844,4846,4847,793],{},"Replies call the Graph API with ",[745,4839,3476],{}," and stop after ",[745,4842,1746],{},". When delivery fails, nothing is stored and\nthe caller gets a 502 ",[745,4845,2948],{},". A missing token gives a 409 ",[745,4848,4849],{},"channel_not_configured",[738,4851,4852,4855],{},[769,4853,4854],{},"Meta prerequisites."," These take weeks, so start early:",[763,4857,4858,4864,4872,4898,4908],{},[766,4859,4860,4863],{},[769,4861,4862],{},"Business verification"," of your Meta Business account.",[766,4865,4866,4869,4870,793],{},[769,4867,4868],{},"A WhatsApp Business number"," in the Cloud API, and its phone number id. WhatsApp only delivers free text within\n24 hours of the person's last message. Outside that window it needs an approved template, so a late reply fails\nwith ",[745,4871,2948],{},[766,4873,4874,4877,4878],{},[769,4875,4876],{},"App review"," of a Meta app for the permissions that read and send messages:\n",[763,4879,4880,4886,4892],{},[766,4881,4882,4883,2180],{},"Messenger: ",[745,4884,4885],{},"pages_messaging",[766,4887,4888,4889,2180],{},"Instagram: ",[745,4890,4891],{},"instagram_manage_messages",[766,4893,4894,4895,793],{},"WhatsApp: ",[745,4896,4897],{},"whatsapp_business_messaging",[766,4899,4900,4903,4904,4907],{},[769,4901,4902],{},"A webhook subscription"," in the app: the URL above, your verify token, and the ",[745,4905,4906],{},"messages"," fields of the WhatsApp,\nPage and Instagram products.",[766,4909,4910,4913,4914,4916,4917,793],{},[769,4911,4912],{},"A long-lived token"," per account (a system user token for WhatsApp, a page access token for Messenger and\nInstagram), set as ",[745,4915,1786],{}," with the ref declared in ",[745,4918,4919],{},"inbox.secrets",[2649,4921,4923],{"id":4922},"a-channel-of-your-own","A channel of your own",[738,4925,4926,4927,4929,4930,4932,4933,1015],{},"A module adds a channel with ",[745,4928,832],{}," from ",[745,4931,4425],{},". The adapter file default-exports\n",[745,4934,4935],{},"defineInboxChannel",[940,4937,4940],{"className":973,"code":4938,"filename":4939,"language":975,"meta":945,"style":945},"import { extendInbox } from '@frigear-nu\u002Finbox\u002Futils'\n\nextendInbox(nuxt, {\n  channels: [{ id: 'acme.sms', label: { da: 'SMS', en: 'Text message' }, icon: 'i-lucide-message-square', adapter: resolver.resolve('.\u002Fruntime\u002Finbox\u002Fsms'), shortenLinks: true }],\n})\n","module.ts",[745,4941,4942,4961,4965,4976,5086],{"__ignoreMap":945},[949,4943,4944,4946,4948,4951,4953,4955,4957,4959],{"class":951,"line":952},[949,4945,4483],{"class":982},[949,4947,1080],{"class":997},[949,4949,4950],{"class":993}," extendInbox",[949,4952,1211],{"class":997},[949,4954,4493],{"class":982},[949,4956,1032],{"class":997},[949,4958,4425],{"class":959},[949,4960,4500],{"class":997},[949,4962,4963],{"class":951,"line":1001},[949,4964,4506],{"emptyLinePlaceholder":4505},[949,4966,4967,4969,4972,4974],{"class":951,"line":1008},[949,4968,832],{"class":989},[949,4970,4971],{"class":993},"(nuxt",[949,4973,1029],{"class":997},[949,4975,1106],{"class":997},[949,4977,4978,4981,4983,4985,4987,4990,4992,4994,4997,4999,5001,5004,5006,5008,5010,5012,5014,5016,5018,5020,5022,5024,5026,5029,5031,5033,5036,5038,5040,5043,5045,5047,5050,5052,5055,5057,5060,5062,5064,5067,5069,5071,5073,5076,5078,5080,5082,5084],{"class":951,"line":1072},[949,4979,4980],{"class":1011},"  channels",[949,4982,1015],{"class":997},[949,4984,1018],{"class":993},[949,4986,1182],{"class":997},[949,4988,4989],{"class":1011}," id",[949,4991,1015],{"class":997},[949,4993,1032],{"class":997},[949,4995,4996],{"class":959},"acme.sms",[949,4998,1021],{"class":997},[949,5000,1029],{"class":997},[949,5002,5003],{"class":1011}," label",[949,5005,1015],{"class":997},[949,5007,1080],{"class":997},[949,5009,1147],{"class":1011},[949,5011,1015],{"class":997},[949,5013,1032],{"class":997},[949,5015,393],{"class":959},[949,5017,1021],{"class":997},[949,5019,1029],{"class":997},[949,5021,1161],{"class":1011},[949,5023,1015],{"class":997},[949,5025,1032],{"class":997},[949,5027,5028],{"class":959},"Text message",[949,5030,1021],{"class":997},[949,5032,1172],{"class":997},[949,5034,5035],{"class":1011}," icon",[949,5037,1015],{"class":997},[949,5039,1032],{"class":997},[949,5041,5042],{"class":959},"i-lucide-message-square",[949,5044,1021],{"class":997},[949,5046,1029],{"class":997},[949,5048,5049],{"class":1011}," adapter",[949,5051,1015],{"class":997},[949,5053,5054],{"class":993}," resolver",[949,5056,793],{"class":997},[949,5058,5059],{"class":989},"resolve",[949,5061,994],{"class":993},[949,5063,1021],{"class":997},[949,5065,5066],{"class":959},".\u002Fruntime\u002Finbox\u002Fsms",[949,5068,1021],{"class":997},[949,5070,2400],{"class":993},[949,5072,1029],{"class":997},[949,5074,5075],{"class":1011}," shortenLinks",[949,5077,1015],{"class":997},[949,5079,1277],{"class":1276},[949,5081,1211],{"class":997},[949,5083,1066],{"class":993},[949,5085,1069],{"class":997},[949,5087,5088,5090],{"class":951,"line":1098},[949,5089,1311],{"class":997},[949,5091,1314],{"class":993},[940,5093,5096],{"className":973,"code":5094,"filename":5095,"language":975,"meta":945,"style":945},"import { z } from 'zod'\nimport { defineInboxChannel, secretsEqual } from '@frigear-nu\u002Finbox\u002Futils'\n\nconst smsWebhook = z.object({ id: z.string(), from: z.string(), to: z.string(), text: z.string() })\n\nexport default defineInboxChannel({\n  id: 'acme.sms',\n  \u002F\u002F The `inbox.secrets` entry the webhook is verified with. Declare it empty and set NUXT_INBOX_SECRETS_ACME_SMS_WEBHOOK.\n  inboundSecret: 'ACME_SMS_WEBHOOK',\n  \u002F\u002F POST \u002Fapi\u002Finbox\u002Fwebhooks\u002Facme.sms: verify the request with the secret, then return the messages in it. The inbox\n  \u002F\u002F has read the body already, within its 1 MB limit, and passes it as `rawBody`.\n  async inbound(event, { secret, rawBody }) {\n    if (!(await secretsEqual(getRequestHeader(event, 'x-acme-token') ?? '', secret))) {\n      throw createError({ statusCode: 401, statusMessage: 'Bad token' })\n    }\n    const body = smsWebhook.parse(JSON.parse(rawBody))\n    \u002F\u002F `authenticated`: the provider vouches for the sender, so the message may join the sender's open thread.\n    return [{ address: body.to, contact: { externalId: body.from, phone: body.from }, externalId: body.id, body: body.text, authenticated: true }]\n  },\n  \u002F\u002F Deliver a reply; throw to fail it (nothing is stored then).\n  async send({ contact, message, secret }) {\n    const sent = await $fetch\u003C{ id: string }>('https:\u002F\u002Fsms.example\u002Fsend', { method: 'POST', headers: { authorization: `Bearer ${secret}` }, body: { to: contact.phone, text: message.body } })\n    return { externalId: sent.id }\n  },\n})\n","runtime\u002Finbox\u002Fsms.ts",[745,5097,5098,5118,5142,5146,5229,5233,5245,5260,5265,5281,5286,5291,5318,5369,5408,5414,5446,5452,5544,5549,5555,5581,5699,5718,5723],{"__ignoreMap":945},[949,5099,5100,5102,5104,5107,5109,5111,5113,5116],{"class":951,"line":952},[949,5101,4483],{"class":982},[949,5103,1080],{"class":997},[949,5105,5106],{"class":993}," z",[949,5108,1211],{"class":997},[949,5110,4493],{"class":982},[949,5112,1032],{"class":997},[949,5114,5115],{"class":959},"zod",[949,5117,4500],{"class":997},[949,5119,5120,5122,5124,5127,5129,5132,5134,5136,5138,5140],{"class":951,"line":1001},[949,5121,4483],{"class":982},[949,5123,1080],{"class":997},[949,5125,5126],{"class":993}," defineInboxChannel",[949,5128,1029],{"class":997},[949,5130,5131],{"class":993}," secretsEqual",[949,5133,1211],{"class":997},[949,5135,4493],{"class":982},[949,5137,1032],{"class":997},[949,5139,4425],{"class":959},[949,5141,4500],{"class":997},[949,5143,5144],{"class":951,"line":1008},[949,5145,4506],{"emptyLinePlaceholder":4505},[949,5147,5148,5151,5154,5156,5158,5160,5163,5165,5167,5169,5171,5173,5175,5177,5180,5182,5184,5186,5188,5190,5192,5194,5196,5199,5201,5203,5205,5207,5209,5211,5214,5216,5218,5220,5222,5225,5227],{"class":951,"line":1072},[949,5149,5150],{"class":3763},"const",[949,5152,5153],{"class":993}," smsWebhook ",[949,5155,1331],{"class":997},[949,5157,5106],{"class":993},[949,5159,793],{"class":997},[949,5161,5162],{"class":989},"object",[949,5164,994],{"class":993},[949,5166,1182],{"class":997},[949,5168,4989],{"class":1011},[949,5170,1015],{"class":997},[949,5172,5106],{"class":993},[949,5174,793],{"class":997},[949,5176,1536],{"class":989},[949,5178,5179],{"class":993},"()",[949,5181,1029],{"class":997},[949,5183,4493],{"class":1011},[949,5185,1015],{"class":997},[949,5187,5106],{"class":993},[949,5189,793],{"class":997},[949,5191,1536],{"class":989},[949,5193,5179],{"class":993},[949,5195,1029],{"class":997},[949,5197,5198],{"class":1011}," to",[949,5200,1015],{"class":997},[949,5202,5106],{"class":993},[949,5204,793],{"class":997},[949,5206,1536],{"class":989},[949,5208,5179],{"class":993},[949,5210,1029],{"class":997},[949,5212,5213],{"class":1011}," text",[949,5215,1015],{"class":997},[949,5217,5106],{"class":993},[949,5219,793],{"class":997},[949,5221,1536],{"class":989},[949,5223,5224],{"class":993},"() ",[949,5226,1311],{"class":997},[949,5228,1314],{"class":993},[949,5230,5231],{"class":951,"line":1098},[949,5232,4506],{"emptyLinePlaceholder":4505},[949,5234,5235,5237,5239,5241,5243],{"class":951,"line":1109},[949,5236,983],{"class":982},[949,5238,986],{"class":982},[949,5240,5126],{"class":989},[949,5242,994],{"class":993},[949,5244,998],{"class":997},[949,5246,5247,5250,5252,5254,5256,5258],{"class":951,"line":1120},[949,5248,5249],{"class":1011},"  id",[949,5251,1015],{"class":997},[949,5253,1032],{"class":997},[949,5255,4996],{"class":959},[949,5257,1021],{"class":997},[949,5259,1069],{"class":997},[949,5261,5262],{"class":951,"line":1220},[949,5263,5264],{"class":1004},"  \u002F\u002F The `inbox.secrets` entry the webhook is verified with. Declare it empty and set NUXT_INBOX_SECRETS_ACME_SMS_WEBHOOK.\n",[949,5266,5267,5270,5272,5274,5277,5279],{"class":951,"line":1228},[949,5268,5269],{"class":1011},"  inboundSecret",[949,5271,1015],{"class":997},[949,5273,1032],{"class":997},[949,5275,5276],{"class":959},"ACME_SMS_WEBHOOK",[949,5278,1021],{"class":997},[949,5280,1069],{"class":997},[949,5282,5283],{"class":951,"line":1234},[949,5284,5285],{"class":1004},"  \u002F\u002F POST \u002Fapi\u002Finbox\u002Fwebhooks\u002Facme.sms: verify the request with the secret, then return the messages in it. The inbox\n",[949,5287,5288],{"class":951,"line":1254},[949,5289,5290],{"class":1004},"  \u002F\u002F has read the body already, within its 1 MB limit, and passes it as `rawBody`.\n",[949,5292,5293,5295,5297,5299,5301,5303,5305,5308,5310,5313,5316],{"class":951,"line":1302},[949,5294,4539],{"class":3763},[949,5296,3594],{"class":1011},[949,5298,994],{"class":997},[949,5300,4548],{"class":4547},[949,5302,1029],{"class":997},[949,5304,1080],{"class":997},[949,5306,5307],{"class":4547}," secret",[949,5309,1029],{"class":997},[949,5311,5312],{"class":4547}," rawBody",[949,5314,5315],{"class":997}," })",[949,5317,1106],{"class":997},[949,5319,5320,5323,5325,5328,5330,5332,5334,5336,5339,5341,5343,5345,5347,5350,5352,5355,5358,5360,5362,5364,5367],{"class":951,"line":1308},[949,5321,5322],{"class":982},"    if",[949,5324,2865],{"class":1011},[949,5326,5327],{"class":997},"!",[949,5329,994],{"class":1011},[949,5331,4620],{"class":982},[949,5333,5131],{"class":989},[949,5335,994],{"class":1011},[949,5337,5338],{"class":989},"getRequestHeader",[949,5340,994],{"class":1011},[949,5342,4548],{"class":993},[949,5344,1029],{"class":997},[949,5346,1032],{"class":997},[949,5348,5349],{"class":959},"x-acme-token",[949,5351,1021],{"class":997},[949,5353,5354],{"class":1011},") ",[949,5356,5357],{"class":997},"??",[949,5359,1249],{"class":997},[949,5361,1029],{"class":997},[949,5363,5307],{"class":993},[949,5365,5366],{"class":1011},"))) ",[949,5368,998],{"class":997},[949,5370,5372,5375,5378,5380,5382,5385,5387,5390,5392,5395,5397,5399,5402,5404,5406],{"class":951,"line":5371},14,[949,5373,5374],{"class":982},"      throw",[949,5376,5377],{"class":989}," createError",[949,5379,994],{"class":1011},[949,5381,1182],{"class":997},[949,5383,5384],{"class":1011}," statusCode",[949,5386,1015],{"class":997},[949,5388,5389],{"class":3820}," 401",[949,5391,1029],{"class":997},[949,5393,5394],{"class":1011}," statusMessage",[949,5396,1015],{"class":997},[949,5398,1032],{"class":997},[949,5400,5401],{"class":959},"Bad token",[949,5403,1021],{"class":997},[949,5405,1211],{"class":997},[949,5407,1314],{"class":1011},[949,5409,5411],{"class":951,"line":5410},15,[949,5412,5413],{"class":997},"    }\n",[949,5415,5417,5419,5422,5424,5427,5429,5431,5433,5435,5437,5439,5441,5444],{"class":951,"line":5416},16,[949,5418,4557],{"class":3763},[949,5420,5421],{"class":993}," body",[949,5423,4563],{"class":997},[949,5425,5426],{"class":993}," smsWebhook",[949,5428,793],{"class":997},[949,5430,4602],{"class":989},[949,5432,994],{"class":1011},[949,5434,4597],{"class":993},[949,5436,793],{"class":997},[949,5438,4602],{"class":989},[949,5440,994],{"class":1011},[949,5442,5443],{"class":993},"rawBody",[949,5445,4610],{"class":1011},[949,5447,5449],{"class":951,"line":5448},17,[949,5450,5451],{"class":1004},"    \u002F\u002F `authenticated`: the provider vouches for the sender, so the message may join the sender's open thread.\n",[949,5453,5455,5457,5459,5461,5464,5466,5468,5470,5472,5474,5477,5479,5481,5484,5486,5488,5490,5492,5494,5497,5499,5501,5503,5505,5507,5509,5511,5513,5515,5518,5520,5522,5524,5526,5528,5530,5532,5535,5537,5539,5541],{"class":951,"line":5454},18,[949,5456,4615],{"class":982},[949,5458,1018],{"class":1011},[949,5460,1182],{"class":997},[949,5462,5463],{"class":1011}," address",[949,5465,1015],{"class":997},[949,5467,5421],{"class":993},[949,5469,793],{"class":997},[949,5471,2756],{"class":993},[949,5473,1029],{"class":997},[949,5475,5476],{"class":1011}," contact",[949,5478,1015],{"class":997},[949,5480,1080],{"class":997},[949,5482,5483],{"class":1011}," externalId",[949,5485,1015],{"class":997},[949,5487,5421],{"class":993},[949,5489,793],{"class":997},[949,5491,2864],{"class":993},[949,5493,1029],{"class":997},[949,5495,5496],{"class":1011}," phone",[949,5498,1015],{"class":997},[949,5500,5421],{"class":993},[949,5502,793],{"class":997},[949,5504,2864],{"class":993},[949,5506,1172],{"class":997},[949,5508,5483],{"class":1011},[949,5510,1015],{"class":997},[949,5512,5421],{"class":993},[949,5514,793],{"class":997},[949,5516,5517],{"class":993},"id",[949,5519,1029],{"class":997},[949,5521,5421],{"class":1011},[949,5523,1015],{"class":997},[949,5525,5421],{"class":993},[949,5527,793],{"class":997},[949,5529,4120],{"class":993},[949,5531,1029],{"class":997},[949,5533,5534],{"class":1011}," authenticated",[949,5536,1015],{"class":997},[949,5538,1277],{"class":1276},[949,5540,1211],{"class":997},[949,5542,5543],{"class":1011},"]\n",[949,5545,5547],{"class":951,"line":5546},19,[949,5548,1305],{"class":997},[949,5550,5552],{"class":951,"line":5551},20,[949,5553,5554],{"class":1004},"  \u002F\u002F Deliver a reply; throw to fail it (nothing is stored then).\n",[949,5556,5558,5560,5563,5566,5568,5570,5573,5575,5577,5579],{"class":951,"line":5557},21,[949,5559,4539],{"class":3763},[949,5561,5562],{"class":1011}," send",[949,5564,5565],{"class":997},"({",[949,5567,5476],{"class":4547},[949,5569,1029],{"class":997},[949,5571,5572],{"class":4547}," message",[949,5574,1029],{"class":997},[949,5576,5307],{"class":4547},[949,5578,5315],{"class":997},[949,5580,1106],{"class":997},[949,5582,5584,5586,5589,5591,5593,5596,5599,5601,5603,5606,5609,5611,5613,5616,5618,5620,5622,5625,5627,5629,5631,5633,5635,5638,5640,5642,5645,5647,5650,5653,5656,5659,5662,5664,5666,5668,5670,5672,5674,5676,5678,5680,5682,5684,5686,5688,5690,5693,5695,5697],{"class":951,"line":5583},22,[949,5585,4557],{"class":3763},[949,5587,5588],{"class":993}," sent",[949,5590,4563],{"class":997},[949,5592,4566],{"class":982},[949,5594,5595],{"class":989}," $fetch",[949,5597,5598],{"class":997},"\u003C{",[949,5600,4989],{"class":1011},[949,5602,1015],{"class":997},[949,5604,5605],{"class":955}," string",[949,5607,5608],{"class":997}," }>",[949,5610,994],{"class":1011},[949,5612,1021],{"class":997},[949,5614,5615],{"class":959},"https:\u002F\u002Fsms.example\u002Fsend",[949,5617,1021],{"class":997},[949,5619,1029],{"class":997},[949,5621,1080],{"class":997},[949,5623,5624],{"class":1011}," method",[949,5626,1015],{"class":997},[949,5628,1032],{"class":997},[949,5630,4812],{"class":959},[949,5632,1021],{"class":997},[949,5634,1029],{"class":997},[949,5636,5637],{"class":1011}," headers",[949,5639,1015],{"class":997},[949,5641,1080],{"class":997},[949,5643,5644],{"class":1011}," authorization",[949,5646,1015],{"class":997},[949,5648,5649],{"class":997}," `",[949,5651,5652],{"class":959},"Bearer ",[949,5654,5655],{"class":997},"${",[949,5657,5658],{"class":993},"secret",[949,5660,5661],{"class":997},"}`",[949,5663,1172],{"class":997},[949,5665,5421],{"class":1011},[949,5667,1015],{"class":997},[949,5669,1080],{"class":997},[949,5671,5198],{"class":1011},[949,5673,1015],{"class":997},[949,5675,5476],{"class":993},[949,5677,793],{"class":997},[949,5679,2563],{"class":993},[949,5681,1029],{"class":997},[949,5683,5213],{"class":1011},[949,5685,1015],{"class":997},[949,5687,5572],{"class":993},[949,5689,793],{"class":997},[949,5691,5692],{"class":993},"body",[949,5694,1211],{"class":997},[949,5696,1211],{"class":997},[949,5698,1314],{"class":1011},[949,5700,5702,5704,5706,5708,5710,5712,5714,5716],{"class":951,"line":5701},23,[949,5703,4615],{"class":982},[949,5705,1080],{"class":997},[949,5707,5483],{"class":1011},[949,5709,1015],{"class":997},[949,5711,5588],{"class":993},[949,5713,793],{"class":997},[949,5715,5517],{"class":993},[949,5717,3893],{"class":997},[949,5719,5721],{"class":951,"line":5720},24,[949,5722,1305],{"class":997},[949,5724,5726,5728],{"class":951,"line":5725},25,[949,5727,1311],{"class":997},[949,5729,1314],{"class":993},[738,5731,5732,5735,5736,5738,5739,793],{},[745,5733,5734],{},"send"," may also return ",[745,5737,2759],{},", the email addresses it copied: they are stored on the reply (invalid ones are dropped)\nand shown with ",[745,5740,792],{},[738,5742,5743,5744,5746,5747,5749,5750,5752,5753,5756,5757,5759,5760,5762,5763,5765,5766,5769,5770,5772,5773,5776,5777,5780],{},"An adapter with ",[745,5745,3764],{}," must name its ",[745,5748,2643],{},", an ",[745,5751,4919],{}," entry, and verify the request with it\n(",[745,5754,5755],{},"ctx.secret","). Until that secret is set, the webhook answers 501 ",[745,5758,1545],{}," and never calls ",[745,5761,3764],{},", so a channel\nis never open by default. The inbox reads the body before it calls ",[745,5764,3764],{},", at most 1 MB whether or not the request\ndeclares a ",[745,5767,5768],{},"content-length"," (413 ",[745,5771,4357],{}," otherwise), and passes it as ",[745,5774,5775],{},"ctx.rawBody",": verify a signature\nover it and parse it rather than reading the request again. A message without ",[745,5778,5779],{},"authenticated: true"," always starts a new thread. A registration with the\nid of a built-in channel replaces it, so a host can swap an adapter.",[935,5782,4758],{"id":5783},"privacy",[763,5785,5786,5813,5823,5836,5870,5893,5902,5905],{},[766,5787,5788,5791,5792,5803,5806,5809,5810,5812],{},[769,5789,5790],{},"Audit log."," These go in the log, with who did them:",[763,5793,5794,5797,5800],{},[766,5795,5796],{},"views (once per person and thread in 15 minutes);",[766,5798,5799],{},"replies, notes, assignments, status changes and hiding;",[766,5801,5802],{},"exports, erasures and retention runs.",[5804,5805],"br",{},[745,5807,5808],{},"GET ...\u002Faudit"," lists only the entries whose subject the caller could see, as in the thread list. A thread's entries\nneed its mailbox and its ",[745,5811,2301],{}," role (a deleted thread's, the mailbox recorded with the entry). A retention\nrun needs its mailbox. An export or erase needs at least one of the contact's threads.",[766,5814,5815,5818,5819,5822],{},[769,5816,5817],{},"One person, several contacts."," A contact is one identity on one channel, so a person who used the contact form\nand then answered by email is two contacts, and the email answer sits in the form contact's thread. Export and erase\ntherefore cover the contact, every other contact with the same email address (",[745,5820,5821],{},"related"," in the export), and the\nmessages any of them sent in other contacts' threads (found by the message's sending contact).",[766,5824,5825,2865,5828,5831,5832,5835],{},[769,5826,5827],{},"Export",[745,5829,5830],{},"GET ...\u002Fcontacts\u002F:id\u002Fexport",") returns the details of the contact and its related contacts, every\nmessage sent or received in their threads, without internal notes, and from other contacts' threads only the\nmessages they sent there. A partial export would answer an access request incompletely, so the caller must see every\none of those threads, as for an erase: mailboxes they read, and no thread hidden below a role they lack. A contact\nnone of whose threads they see is a 404. A contact with a thread hidden from them is refused with a 409\n",[745,5833,5834],{},"contact_threads_hidden",", and nothing of the contact is returned: someone who sees all of the threads exports it.",[766,5837,5838,2865,5841,5844,5845,5848,5849,815,5852,5854,5855,5858,5859],{},[769,5839,5840],{},"Erase",[745,5842,5843],{},"POST ...\u002Fcontacts\u002F:id\u002Ferase",") removes the name, email, phone and channel id of the contact and its\nrelated contacts. Every thread of theirs is closed and its messages blanked: bodies, attachments, cc recipients and\nprovider ids (",[745,5846,5847],{},"erased:\u003Cid>","). The messages they sent in other contacts' threads are blanked the same way, and those\nthreads' previews refreshed. The threads stay, empty, as a record that something was answered. The answer counts\n",[745,5850,5851],{},"threads",[745,5853,4906],{}," (in other threads) and ",[745,5856,5857],{},"contacts",". A new message from the same person starts a new contact.",[763,5860,5861],{},[766,5862,5863,5866,5867,5869],{},[769,5864,5865],{},"All or nothing."," The contact's details belong to all their threads, so the caller must see every one of them. A\ncontact with a thread hidden from the caller is refused with a 409 ",[745,5868,5834],{},", and nothing is erased:\nsomeone who sees all of the threads erases the contact.",[766,5871,5872,5875,5876,2865,5878,5881,5882],{},[769,5873,5874],{},"Replays."," Webhook signatures carry no time, and an email payload has no reliable one, so a replayed request\ncannot be judged by its age. Instead, when retention or an erase removes a message, its provider id is kept as a\ntombstone: a SHA-256 of the channel account and the provider id, never the id itself, with the id of the contact who\nsent it. A webhook that delivers it again answers ",[745,5877,2698],{},[745,5879,5880],{},"reason: 'removed'",") and stores nothing.",[763,5883,5884,5890],{},[766,5885,5886,5887,5889],{},"Retention's tombstones are pruned by the retention run ",[745,5888,1907],{}," (365) after the removal. A replay\nafter that is stored as a new message.",[766,5891,5892],{},"An erase's tombstones are kept for good, and an erase also keeps the tombstones of what retention removed of the\nperson earlier: nothing erased comes back, however late the replay.",[766,5894,5895,5898,5899,5901],{},[769,5896,5897],{},"Form submissions and their files"," are stored by ",[750,5900,324],{"href":325},", not by the inbox, and are\nerased there. The inbox keeps only the submission's text and the files' names and Blob pathnames.",[766,5903,5904],{},"Export and erase are session only, like every inbox route: no API token can call them.",[766,5906,5907,5910,5911,5913,5914,5916,5917],{},[769,5908,5909],{},"Retention"," runs as the task ",[745,5912,885],{},", every night at 03:30 unless ",[745,5915,1862],{}," says otherwise.",[763,5918,5919,5922,5928,5934,5940,5947,5953,5960],{},[766,5920,5921],{},"It handles closed threads whose last message is older than their mailbox keeps them.",[766,5923,5924,5927],{},[745,5925,5926],{},"delete"," removes them with their messages, and contacts left without a thread or a message go too.",[766,5929,5930,5933],{},[745,5931,5932],{},"anonymise"," keeps them, closed, with their messages blanked as on erase. A contact left with only anonymised threads\n(their own and the ones they wrote in) is erased.",[766,5935,5936,5937,5939],{},"A run handles at most ",[745,5938,1888],{}," threads, and deletes in chunks of 90 ids to stay within D1's limits. A\nbacklog is worked off over several nights.",[766,5941,5942,5943,5946],{},"The batch is shared fairly: every mailbox with a retention period first gets an equal share, and what the others\nleft goes to the mailboxes with more to do, so one busy mailbox never starves the rest. The result says ",[745,5944,5945],{},"more: true"," when a mailbox had more than the run could handle.",[766,5948,5949,5950,5952],{},"It also prunes retention's tombstones older than ",[745,5951,1907],{}," (an erase's stay).",[766,5954,5955,5956,5959],{},"On Cloudflare the cron is added to ",[745,5957,5958],{},"wrangler.json"," for you.",[766,5961,5962,5963,793],{},"Run it by hand with ",[745,5964,5965],{},"runTask('inbox:retention', { payload: { now, mode, batch } })",[935,5967,852],{"id":5968},"dashboard-items",[738,5970,5971,5972,5974,5975,5977,5978,5980,5981,5985,5986,5988,5989,5992],{},"With ",[750,5973,452],{"href":453}," installed and the thread page on, Inbox adds two items to the dashboard\nnamed by ",[745,5976,1983],{}," (by default ",[745,5979,862],{}," and the ",[750,5982,5984],{"href":5983},"\u002Fmodules\u002Finterface\u002Fdashboard#the-hub","hub's dashboard","). Both need ",[745,5987,2044],{},", show on the\nweb only and read ",[745,5990,5991],{},"GET \u002Fapi\u002Fadmin\u002Finbox\u002Fsummary",". They render nothing for someone who reads no mailbox. Each is a stat\ncard two columns wide, without a label of its own: the item's title is its heading.",[1459,5994,5995,6008],{},[1462,5996,5997],{},[1465,5998,5999,6002,6005],{},[1468,6000,6001],{},"Item",[1468,6003,6004],{},"Order",[1468,6006,6007],{},"Shows",[1481,6009,6010,6022],{},[1465,6011,6012,6016,6019],{},[1486,6013,6014],{},[745,6015,855],{},[1486,6017,6018],{},"80",[1486,6020,6021],{},"Open threads nobody is assigned to, with a link to the filtered list.",[1465,6023,6024,6028,6031],{},[1486,6025,6026],{},[745,6027,858],{},[1486,6029,6030],{},"81",[1486,6032,6033],{},"Open threads assigned to me, with a link to the filtered list.",[738,6035,6036,6037,793],{},"Texts are under ",[745,6038,6039],{},"inbox.dashboard",[935,6041,870],{"id":6042},"push-topic",[738,6044,6045,6046,2294,6048,6051,6052,6055,6056,6059,6060,6062,6063,6065,6066,793],{},"Inbox registers the topic ",[745,6047,873],{},[750,6049,356],{"href":6050},"\u002Fmodules\u002Fcommunication\u002Fnotify#notifying-a-user"," (push on by\ndefault, email off, no SMS). When a message comes in on a thread with an assignee, the assignee hears about it through\n",[745,6053,6054],{},"notifyUser",", with a link to the thread page, in the assignee's language (",[745,6057,6058],{},"users.locale",", English without one). The\ntext names neither the sender nor the message. An assignee who can no longer read and answer the thread (they lost\nthe mailbox's grant, ",[745,6061,2057],{}," or the role it is hidden below) hears nothing; the thread keeps them as its\nassignee until someone reassigns it. The push reaches phones\nwith ",[750,6064,377],{"href":378}," installed, and the assignee can turn the email on (or the push off) on the\naccount page of ",[750,6067,229],{"href":6068},"\u002Fmodules\u002Fidentity\u002Fpreferences#notification-channels",[935,6070,6072],{"id":6071},"server-utils","Server utils",[738,6074,6075],{},"Server utils for modules:",[1459,6077,6078,6088],{},[1462,6079,6080],{},[1465,6081,6082,6085],{},[1468,6083,6084],{},"Util",[1468,6086,6087],{},"What it does",[1481,6089,6090,6103,6126,6136,6150,6160,6170,6188,6198],{},[1465,6091,6092,6097],{},[1486,6093,6094],{},[745,6095,6096],{},"inboxIngestEmail(event, payload, { recipients?, attachments? })",[1486,6098,6099,6100,793],{},"Stores an inbound email for every mailbox it reaches: routes the recipients, threads and stores it. What every inbound email driver calls. Answers ",[745,6101,6102],{},"{ response, deliveries, unknown }",[1465,6104,6105,6109],{},[1486,6106,6107],{},[745,6108,2725],{},[1486,6110,6111,6112,6115,6116,815,6119,6122,6123,793],{},"Where an email to ",[745,6113,6114],{},"address"," goes: ",[745,6117,6118],{},"{ kind: 'account', account, threadId }",[745,6120,6121],{},"unknown"," (an inbox domain address nobody has) or ",[745,6124,6125],{},"foreign",[1465,6127,6128,6133],{},[1486,6129,6130],{},[745,6131,6132],{},"inboxDomains()",[1486,6134,6135],{},"The inbox domains, read per request.",[1465,6137,6138,6143],{},[1486,6139,6140],{},[745,6141,6142],{},"inboxReceive(event, channel, message, account?)",[1486,6144,6145,6146,6149],{},"Stores one ",[745,6147,6148],{},"InboxInboundMessage",": finds the account, the contact and the thread, stores the message once per provider id and channel account (never one that retention or an erase removed) and fires the hooks.",[1465,6151,6152,6157],{},[1486,6153,6154],{},[745,6155,6156],{},"inboxRunRetention({ now?, mode?, batch? })",[1486,6158,6159],{},"One retention run, as the task does it.",[1465,6161,6162,6167],{},[1486,6163,6164],{},[745,6165,6166],{},"inboxDeliverRawEmail({ driver, raw, recipients, authservIds, event? })",[1486,6168,6169],{},"Parses a raw RFC 5322 email, stores its files and stores it, from a request or (through the driver's route) from a task. For a driver that receives raw mail.",[1465,6171,6172,6180],{},[1486,6173,6174,815,6177],{},[745,6175,6176],{},"inboxGmailRun()",[745,6178,6179],{},"inboxImapRun({ limit? })",[1486,6181,6182,6183,825,6185,6187],{},"One run of the ",[745,6184,3126],{},[745,6186,3155],{}," tasks.",[1465,6189,6190,6195],{},[1486,6191,6192],{},[745,6193,6194],{},"inboxEraseContact(contactId)",[1486,6196,6197],{},"Erases a contact with its related contacts (same email address) and blanks their messages, also those they sent in other contacts' threads.",[1465,6199,6200,6205],{},[1486,6201,6202],{},[745,6203,6204],{},"setInboxTeamLeadResolver(fn)",[1486,6206,6207],{},"Decides who leads a team mailbox. Teams sets it when installed.",[758,6209,284],{"id":6210},"app",[738,6212,6213,6214,6216],{},"The pages use the ",[750,6215,402],{"href":403}," building blocks. Composables, auto-imported:",[1459,6218,6219,6228],{},[1462,6220,6221],{},[1465,6222,6223,6226],{},[1468,6224,6225],{},"Composable",[1468,6227,6087],{},[1481,6229,6230,6257,6278,6299],{},[1465,6231,6232,6237],{},[1486,6233,6234],{},[745,6235,6236],{},"useInboxThreadActions()",[1486,6238,6239,815,6242,815,6245,815,6248,815,6251,815,6254,793],{},[745,6240,6241],{},"setStatus",[745,6243,6244],{},"assign",[745,6246,6247],{},"hide",[745,6249,6250],{},"exportContact",[745,6252,6253],{},"eraseContact",[745,6255,6256],{},"menu(thread)",[1465,6258,6259,6264],{},[1486,6260,6261],{},[745,6262,6263],{},"useInboxMailboxActions()",[1486,6265,6266,815,6269,815,6272,815,6275,793],{},[745,6267,6268],{},"create",[745,6270,6271],{},"edit",[745,6273,6274],{},"remove",[745,6276,6277],{},"menu(mailbox)",[1465,6279,6280,6285],{},[1486,6281,6282],{},[745,6283,6284],{},"useInboxChannelActions()",[1486,6286,6287,815,6289,815,6291,815,6294,815,6296,793],{},[745,6288,6268],{},[745,6290,6271],{},[745,6292,6293],{},"toggle",[745,6295,6274],{},[745,6297,6298],{},"menu(account)",[1465,6300,6301,6306],{},[1486,6302,6303],{},[745,6304,6305],{},"useInboxLinks()",[1486,6307,6308],{},"Locale-aware links to the staff pages.",[935,6310,6312],{"id":6311},"thread-actions-of-other-modules","Thread actions of other modules",[738,6314,6315,6316,811,6319,6321,6322,6325,6326,6329,6330,815,6333,6336,6337,6339,6340,6342,6343,6346,6347,1671,6350,6353],{},"The thread page renders the ",[745,6317,6318],{},"inbox.thread.actions",[750,6320,434],{"href":435}," area in the contact card (not for\nan erased contact). Another module adds a button there with ",[745,6323,6324],{},"extendWidgets(nuxt, 'inbox.thread.actions', { component, permission })",", without depending on inbox. Each widget gets ",[745,6327,6328],{},"InboxThreadActionContext"," as props: ",[745,6331,6332],{},"threadId",[745,6334,6335],{},"contact","\n(details only with ",[745,6338,792],{},"; ",[745,6341,4767],{}," is the account of a verified contact) and ",[745,6344,6345],{},"onChanged",", which refreshes the page.\n",[750,6348,528],{"href":6349},"\u002Fmodules\u002Fvolunteering\u002Fcrew#add-to-crew-from-the-inbox",[769,6351,6352],{},"Add to crew"," is one. Widget is a required module of\ninbox for this.",[758,6355,242],{"id":6356},"hooks",[738,6358,6359,6360,2284],{},"Your app answers these Nitro hooks from a server plugin (",[745,6361,6362],{},"server\u002Fplugins\u002F*.ts",[1459,6364,6365,6378],{},[1462,6366,6367],{},[1465,6368,6369,6372,6375],{},[1468,6370,6371],{},"Hook",[1468,6373,6374],{},"Context",[1468,6376,6377],{},"When",[1481,6379,6380,6395,6409,6428,6443],{},[1465,6381,6382,6387,6392],{},[1486,6383,6384],{},[745,6385,6386],{},"inbox:message:received",[1486,6388,6389],{},[745,6390,6391],{},"{ event, thread, message }",[1486,6393,6394],{},"A message came in on a channel and was stored. A duplicate fires nothing.",[1465,6396,6397,6402,6406],{},[1486,6398,6399],{},[745,6400,6401],{},"inbox:message:sent",[1486,6403,6404],{},[745,6405,6391],{},[1486,6407,6408],{},"A reply went out and was stored. Notes fire nothing.",[1465,6410,6411,6416,6421],{},[1486,6412,6413],{},[745,6414,6415],{},"inbox:thread:assigned",[1486,6417,6418],{},[745,6419,6420],{},"{ event, thread, assigneeId, previous }",[1486,6422,6423,6424,6427],{},"A thread got another assignee (",[745,6425,6426],{},"null"," unassigns).",[1465,6429,6430,6435,6440],{},[1486,6431,6432],{},[745,6433,6434],{},"inbox:thread:status-changed",[1486,6436,6437],{},[745,6438,6439],{},"{ event, thread, from, to }",[1486,6441,6442],{},"Staff changed the status, or a message reopened a pending or closed thread.",[1465,6444,6445,6450,6455],{},[1486,6446,6447],{},[745,6448,6449],{},"inbox:thread:linked",[1486,6451,6452],{},[745,6453,6454],{},"{ event, threadId, actorId, module, kind, label?, url?, userId? }",[1486,6456,6457,6458,6461,6462,6465,6466,6469],{},"Another module did something for the thread's person from the thread. Inbox listens itself: it writes a ",[745,6459,6460],{},"linked"," audit entry when ",[745,6463,6464],{},"actorId"," can read and answer the thread. Call it by name (",[745,6467,6468],{},"useNitroApp().hooks.callHook","); nothing listens without inbox.",[758,6471,6473],{"id":6472},"routes","Routes",[738,6475,6476,6477,2865,6480,6483],{},"Path builders come from ",[745,6478,6479],{},"@frigear-nu\u002Finbox\u002Fapi",[745,6481,6482],{},"inboxApi","). A thread the caller may not read answers the same 404\nas an unknown one.",[1459,6485,6486,6499],{},[1462,6487,6488],{},[1465,6489,6490,6493,6496],{},[1468,6491,6492],{},"Route",[1468,6494,6495],{},"Who",[1468,6497,6498],{},"What",[1481,6500,6501,6514,6532,6556,6594,6608,6626,6643,6660,6674,6690,6706,6722,6736,6753,6770,6788,6803,6832,6848],{},[1465,6502,6503,6507,6511],{},[1486,6504,6505],{},[745,6506,5991],{},[1486,6508,6509],{},[745,6510,2044],{},[1486,6512,6513],{},"Unassigned and own open threads, for the dashboard items.",[1465,6515,6516,6523,6529],{},[1486,6517,6518,815,6520],{},[745,6519,844],{},[745,6521,6522],{},"POST \u002Fapi\u002Fadmin\u002Finbox\u002Fmailboxes",[1486,6524,6525,815,6527],{},[745,6526,2044],{},[745,6528,2098],{},[1486,6530,6531],{},"The mailboxes the caller reads; creates one.",[1465,6533,6534,6544,6550],{},[1486,6535,6536,815,6538,815,6541],{},[745,6537,844],{},[745,6539,6540],{},"PATCH",[745,6542,6543],{},"DELETE \u002Fapi\u002Fadmin\u002Finbox\u002Fmailboxes\u002F:id",[1486,6545,6546,815,6548],{},[745,6547,2044],{},[745,6549,2098],{},[1486,6551,6552,6553,793],{},"One mailbox. Deleting one with threads is a 409 ",[745,6554,6555],{},"mailbox_not_empty",[1465,6557,6558,6563,6567],{},[1486,6559,6560],{},[745,6561,6562],{},"GET \u002Fapi\u002Fadmin\u002Finbox\u002Fthreads",[1486,6564,6565],{},[745,6566,2044],{},[1486,6568,6569,6570,1567,6573,6576,6577,6580,6581,6584,6585,1939,6588,815,6591,6593],{},"Paginated threads, ",[745,6571,6572],{},"?mailbox&status&assignee&channel&q",[745,6574,6575],{},"status"," defaults to ",[745,6578,6579],{},"active"," (open or pending); ",[745,6582,6583],{},"all"," lists every status. ",[745,6586,6587],{},"assignee",[745,6589,6590],{},"me",[745,6592,1539],{}," or a user id.",[1465,6595,6596,6601,6605],{},[1486,6597,6598],{},[745,6599,6600],{},"GET \u002Fapi\u002Fadmin\u002Finbox\u002Fthreads\u002F:id",[1486,6602,6603],{},[745,6604,2044],{},[1486,6606,6607],{},"The thread, its messages and notes, and what the caller may do. In the audit log.",[1465,6609,6610,6615,6623],{},[1486,6611,6612],{},[745,6613,6614],{},"PATCH \u002Fapi\u002Fadmin\u002Finbox\u002Fthreads\u002F:id",[1486,6616,6617,6619,6620,6622],{},[745,6618,2057],{}," (status), ",[745,6621,2069],{}," (assignee)",[1486,6624,6625],{},"Changes the status or the assignee.",[1465,6627,6628,6633,6637],{},[1486,6629,6630],{},[745,6631,6632],{},"GET \u002Fapi\u002Fadmin\u002Finbox\u002Fthreads\u002F:id\u002Fassignees",[1486,6634,6635],{},[745,6636,2069],{},[1486,6638,6639,6640,6642],{},"Up to 50 people who could be assigned the thread, ",[745,6641,2343],{}," by name.",[1465,6644,6645,6650,6654],{},[1486,6646,6647],{},[745,6648,6649],{},"POST \u002Fapi\u002Fadmin\u002Finbox\u002Fthreads\u002F:id\u002Fmessages",[1486,6651,6652],{},[745,6653,2057],{},[1486,6655,6656,6657,793],{},"Replies through the thread's channel, ",[745,6658,6659],{},"{ body, status?, shortenLinks? }",[1465,6661,6662,6667,6671],{},[1486,6663,6664],{},[745,6665,6666],{},"POST \u002Fapi\u002Fadmin\u002Finbox\u002Fthreads\u002F:id\u002Fnotes",[1486,6668,6669],{},[745,6670,2057],{},[1486,6672,6673],{},"An internal note.",[1465,6675,6676,6681,6685],{},[1486,6677,6678],{},[745,6679,6680],{},"POST \u002Fapi\u002Fadmin\u002Finbox\u002Fthreads\u002F:id\u002Fhide",[1486,6682,6683],{},[745,6684,2084],{},[1486,6686,6687,6689],{},[745,6688,2297],{},": hides the thread below a role, or shows it again.",[1465,6691,6692,6699,6703],{},[1486,6693,6694,815,6696],{},[745,6695,844],{},[745,6697,6698],{},"POST \u002Fapi\u002Fadmin\u002Finbox\u002Fchannels",[1486,6700,6701],{},[745,6702,2126],{},[1486,6704,6705],{},"Channel accounts.",[1465,6707,6708,6715,6719],{},[1486,6709,6710,815,6712],{},[745,6711,6540],{},[745,6713,6714],{},"DELETE \u002Fapi\u002Fadmin\u002Finbox\u002Fchannels\u002F:id",[1486,6716,6717],{},[745,6718,2126],{},[1486,6720,6721],{},"One channel account.",[1465,6723,6724,6729,6733],{},[1486,6725,6726],{},[745,6727,6728],{},"GET \u002Fapi\u002Fadmin\u002Finbox\u002Femail",[1486,6730,6731],{},[745,6732,2126],{},[1486,6734,6735],{},"The inbox domains and the installed inbound email drivers.",[1465,6737,6738,6743,6747],{},[1486,6739,6740],{},[745,6741,6742],{},"GET \u002Fapi\u002Fadmin\u002Finbox\u002Faudit",[1486,6744,6745],{},[745,6746,2140],{},[1486,6748,6749,6750,793],{},"The audit log entries the caller may see, ",[745,6751,6752],{},"?threadId&contactId&action",[1465,6754,6755,6760,6764],{},[1486,6756,6757],{},[745,6758,6759],{},"GET \u002Fapi\u002Fadmin\u002Finbox\u002Fcontacts\u002F:id\u002Fexport",[1486,6761,6762],{},[745,6763,792],{},[1486,6765,6766,6767,6769],{},"Everything stored about a contact, without internal notes. A 409 ",[745,6768,5834],{}," when a thread of theirs is hidden from the caller.",[1465,6771,6772,6777,6783],{},[1486,6773,6774],{},[745,6775,6776],{},"POST \u002Fapi\u002Fadmin\u002Finbox\u002Fcontacts\u002F:id\u002Ferase",[1486,6778,6779,825,6781],{},[745,6780,2098],{},[745,6782,792],{},[1486,6784,6785,6786,6769],{},"Erases the contact: details removed, messages blanked, threads kept. A 409 ",[745,6787,5834],{},[1465,6789,6790,6794,6797],{},[1486,6791,6792],{},[745,6793,840],{},[1486,6795,6796],{},"The HMAC signature",[1486,6798,6799,6800,6802],{},"Inbound email (the ",[745,6801,3027],{}," driver).",[1465,6804,6805,6810,6813],{},[1486,6806,6807],{},[745,6808,6809],{},"POST \u002Fapi\u002Finbox\u002Femail\u002F:driver",[1486,6811,6812],{},"The driver's check",[1486,6814,6815,6816,2865,6818,6820,6821,6823,6824,6826,6827,825,6829,6831],{},"The webhook of an inbound email driver with a ",[745,6817,4432],{},[745,6819,1605],{},": the Svix signature, ",[745,6822,1612],{},": Google's OIDC token). 501 ",[745,6825,1545],{}," without its secret, 404 for a driver without a handler (",[745,6828,1598],{},[745,6830,1618],{}," only take the server's own requests).",[1465,6833,6834,6840,6845],{},[1486,6835,6836,815,6838],{},[745,6837,844],{},[745,6839,847],{},[1486,6841,6842,6843],{},"The verify token, ",[745,6844,1693],{},[1486,6846,6847],{},"WhatsApp, Messenger and Instagram.",[1465,6849,6850,6855,6860],{},[1486,6851,6852],{},[745,6853,6854],{},"POST \u002Fapi\u002Finbox\u002Fwebhooks\u002F:channel",[1486,6856,6857,6858],{},"The channel's check with its ",[745,6859,2643],{},[1486,6861,6862,6863,6865,6866,6868],{},"A module channel with an ",[745,6864,3764],{}," reader. 501 ",[745,6867,1545],{}," without the secret.",[758,6870,40],{"id":6871},"database",[738,6873,6874,6875,6877],{},"Tables the module adds. Generate and commit a ",[750,6876,1388],{"href":498}," after installing.",[1459,6879,6880,6890],{},[1462,6881,6882],{},[1465,6883,6884,6887],{},[1468,6885,6886],{},"Table",[1468,6888,6889],{},"What it holds",[1481,6891,6892,6926,6955,6985,7029,7083,7112,7134],{},[1465,6893,6894,6899],{},[1486,6895,6896],{},[745,6897,6898],{},"inbox_mailboxes",[1486,6900,6901,2865,6903,6906,6907,6910,6911,815,6914,815,6916,815,6918,6920,6921,6923,6924,793],{},[745,6902,5517],{},[745,6904,6905],{},"ibx_","), ",[745,6908,6909],{},"key"," (unique), ",[745,6912,6913],{},"ownerType",[745,6915,2205],{},[745,6917,2558],{},[745,6919,2218],{}," (JSON, ",[745,6922,1500],{}," by default), ",[745,6925,2007],{},[1465,6927,6928,6933],{},[1486,6929,6930],{},[745,6931,6932],{},"inbox_channel_accounts",[1486,6934,6935,2865,6937,6906,6940,815,6942,815,6945,6947,6948,815,6950,815,6952,793],{},[745,6936,5517],{},[745,6938,6939],{},"ica_",[745,6941,4411],{},[745,6943,6944],{},"channel",[745,6946,6114],{}," (unique per channel), ",[745,6949,2505],{},[745,6951,1782],{},[745,6953,6954],{},"enabled",[1465,6956,6957,6962],{},[1486,6958,6959],{},[745,6960,6961],{},"inbox_contacts",[1486,6963,6964,2865,6966,6906,6969,815,6971,6947,6974,815,6976,815,6978,815,6980,815,6982,793],{},[745,6965,5517],{},[745,6967,6968],{},"icn_",[745,6970,6944],{},[745,6972,6973],{},"externalId",[745,6975,2558],{},[745,6977,818],{},[745,6979,2563],{},[745,6981,4767],{},[745,6983,6984],{},"erasedAt",[1465,6986,6987,6992],{},[1486,6988,6989],{},[745,6990,6991],{},"inbox_threads",[1486,6993,6994,2865,6996,6906,6998,815,7000,815,7002,815,7005,815,7007,815,7009,7012,7013,815,7015,815,7018,815,7020,815,7023,815,7026,793],{},[745,6995,5517],{},[745,6997,2746],{},[745,6999,4411],{},[745,7001,4753],{},[745,7003,7004],{},"channelAccountId",[745,7006,6944],{},[745,7008,2566],{},[745,7010,7011],{},"searchText"," (the subject folded for search), ",[745,7014,6575],{},[745,7016,7017],{},"assigneeId",[745,7019,2301],{},[745,7021,7022],{},"preview",[745,7024,7025],{},"lastMessageAt",[745,7027,7028],{},"anonymisedAt",[1465,7030,7031,7036],{},[1486,7032,7033],{},[745,7034,7035],{},"inbox_messages",[1486,7037,7038,2865,7040,6906,7043,815,7045,2865,7048,815,7051,815,7054,6906,7056,815,7059,815,7061,815,7063,815,7065,815,7067,2865,7069,7072,7073,6906,7075,7077,7078,815,7080,793],{},[745,7039,5517],{},[745,7041,7042],{},"ibm_",[745,7044,6332],{},[745,7046,7047],{},"direction",[745,7049,7050],{},"in",[745,7052,7053],{},"out",[745,7055,892],{},[745,7057,7058],{},"authorId",[745,7060,5692],{},[745,7062,4211],{},[745,7064,2759],{},[745,7066,7004],{},[745,7068,6973],{},[745,7070,7071],{},"\u003Cchannel>:\u003Cprovider id>",", unique per ",[745,7074,7004],{},[745,7076,4753],{}," (the sender of an inbound message, indexed), ",[745,7079,3050],{},[745,7081,7082],{},"createdAtMs",[1465,7084,7085,7090],{},[1486,7086,7087],{},[745,7088,7089],{},"inbox_audit",[1486,7091,7092,2865,7094,6906,7097,815,7099,825,7101,7103,7104,815,7106,815,7109,793],{},[745,7093,5517],{},[745,7095,7096],{},"iba_",[745,7098,6332],{},[745,7100,4411],{},[745,7102,4753],{}," (all indexed), ",[745,7105,6464],{},[745,7107,7108],{},"action",[745,7110,7111],{},"data",[1465,7113,7114,7119],{},[1486,7115,7116],{},[745,7117,7118],{},"inbox_tombstones",[1486,7120,7121,7123,7124,7126,7127,7130,7131,793],{},[745,7122,6909],{}," (a SHA-256 of a channel account and a provider id that was removed), ",[745,7125,4753],{}," (who sent it, indexed), ",[745,7128,7129],{},"permanent"," (written or kept by an erase: never pruned), ",[745,7132,7133],{},"createdAt",[1465,7135,7136,7140],{},[1486,7137,7138],{},[745,7139,3660],{},[1486,7141,7142,2865,7144,6906,7147,7149,7150,815,7153,7156,7157,793],{},[745,7143,6909],{},[745,7145,7146],{},"\u003Cdriver>:\u003Cchannel account id>",[745,7148,7004],{}," (deleted with the account), ",[745,7151,7152],{},"driver",[745,7154,7155],{},"state"," (the Gmail history id and watch expiry, or the IMAP UIDVALIDITY and last UID), ",[745,7158,7159],{},"updatedAt",[758,7161,493],{"id":7162},"translations",[738,7164,7165,7166,7169,7170,7172],{},"Override any string in your app's ",[745,7167,7168],{},"i18n\u002Flocales\u002F\u003Ccode>.json",", under the ",[745,7171,1456],{}," key. Inbox ships Danish and English.",[758,7174,7176],{"id":7175},"next-steps","Next steps",[763,7178,7179,7185,7190,7195],{},[766,7180,7181,7184],{},[750,7182,7183],{"href":2213},"Record audiences"," – the grant lists that say who reads a mailbox.",[766,7186,7187,7189],{},[750,7188,258],{"href":259}," – the teams whose leads read a team mailbox.",[766,7191,7192,7194],{},[750,7193,324],{"href":325}," – the forms the contact form channel reads.",[766,7196,7197,7199],{},[750,7198,356],{"href":357}," – the email driver replies go out through.",[7201,7202,7203],"style",{},"html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}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 .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}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 .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 .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 .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}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}",{"title":945,"searchDepth":1001,"depth":1001,"links":7205},[7206,7207,7214,7215,7216,7226,7229,7230,7231,7232,7233],{"id":760,"depth":1001,"text":761},{"id":929,"depth":1001,"text":930,"children":7208},[7209,7210,7212,7213],{"id":937,"depth":1008,"text":938},{"id":966,"depth":1008,"text":7211},"Add it to nuxt.config.ts",{"id":1381,"depth":1008,"text":1382},{"id":1410,"depth":1008,"text":1411},{"id":1449,"depth":1001,"text":1450},{"id":2014,"depth":1001,"text":2015},{"id":2189,"depth":1001,"text":2190,"children":7217},[7218,7219,7220,7221,7222,7223,7224,7225],{"id":1490,"depth":1008,"text":2196},{"id":2287,"depth":1008,"text":2288},{"id":2312,"depth":1008,"text":2313},{"id":1510,"depth":1008,"text":2347},{"id":5783,"depth":1008,"text":4758},{"id":5968,"depth":1008,"text":852},{"id":6042,"depth":1008,"text":870},{"id":6071,"depth":1008,"text":6072},{"id":6210,"depth":1001,"text":284,"children":7227},[7228],{"id":6311,"depth":1008,"text":6312},{"id":6356,"depth":1001,"text":242},{"id":6472,"depth":1001,"text":6473},{"id":6871,"depth":1001,"text":40},{"id":7162,"depth":1001,"text":493},{"id":7175,"depth":1001,"text":7176},"Shared support inboxes. Staff read and answer messages from the contact form, email, WhatsApp, Messenger and Instagram in one place.","md",null,{},{"title":381,"description":7234},"vE3It-DVNgFMnxkTgcuAmhg4OVPfIXHOSyX8pOUFQLw",[7241,7243],{"title":377,"path":378,"stem":379,"description":7242,"children":-1},"Register phones and deliver push notifications to them, as the push driver of Notify.",{"title":385,"path":386,"stem":387,"description":7244,"children":-1},"Short, trackable links for emails and SMS that any module can make, with click counts and a hook that tells the owner who clicked.",1796157344572]