[{"data":1,"prerenderedAt":4046},["ShallowReactive",2],{"navigation_docs":3,"-modules-communication-notify":732,"-modules-communication-notify-surround":4041},[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":356,"body":734,"description":4035,"extension":4036,"links":4037,"meta":4038,"navigation":1784,"path":357,"seo":4039,"stem":358,"__hash__":4040},"docs\u002F3.modules\u002F6.communication\u002F1.notify.md",{"type":735,"value":736,"toc":4008},"minimark",[737,745,762,767,818,822,867,871,1094,1110,1114,1121,1265,1276,1279,1290,1454,1457,1461,1494,1516,1523,1575,1586,1590,1593,1692,2017,2055,2058,2084,2100,2104,2123,2127,2138,2948,2952,2955,3038,3047,3062,3106,3164,3168,3193,3196,3206,3268,3272,3289,3499,3554,3557,3561,3775,3802,3818,3822,3828,3912,3922,3925,3930,3983,3987,4004],[738,739,740,741,744],"p",{},"Modules send email, such as a sign-in link or a receipt, without choosing an email service. Notify is where your app\npicks how email, SMS, push and simple notifications are delivered, per environment. For emails designed with Vue components,\nadd ",[742,743,360],"a",{"href":361}," on top.",[738,746,747,748,752,753,761],{},"The package is ",[749,750,751],"code",{},"@frigear-nu\u002Fnotify",". In-app toasts are not part of it: use\n",[742,754,758],{"href":755,"rel":756},"https:\u002F\u002Fui.nuxt.com\u002Fcomposables\u002Fuse-toast",[757],"nofollow",[749,759,760],{},"useToast()"," from Nuxt UI.",[763,764,766],"h2",{"id":765},"what-you-get","What you get",[768,769,770,812],"ul",{},[771,772,773,777],"li",{},[774,775,776],"strong",{},"Composables and helpers.",[768,778,779,786,793,796,802],{},[771,780,781,782,785],{},"Server functions that send an email, an SMS, a push notification or a simple notification, auto-imported in\n",[742,783,784],{"href":91},"Nitro",".",[771,787,788,789,792],{},"A ",[749,790,791],{},"log"," driver that prints each notification instead of sending it. On by default.",[771,794,795],{},"Email drivers for Resend, Amazon SES and Cloudflare Email Service, or a driver file of your own. Opt-in.",[771,797,798,799,801],{},"A push driver slot that ",[742,800,377],{"href":378}," fills when it is installed (FCM and APNs to the\nusers' devices).",[771,803,804,807,808,785],{},[749,805,806],{},"notifyUser",", which sends one user a message on the channels they chose for its topic, and the topic registry\nmodules declare those topics in. See ",[742,809,811],{"href":810},"#notifying-a-user","Notifying a user",[771,813,814,817],{},[774,815,816],{},"Emails."," None of its own. It sends what other modules build.",[819,820],"module-runtime",{":server":821},"true",[823,824,825,828,829,832,833,836,837,839,840,842,843,842,845,847,848,850,851,853,854,857,858,860,861,863,864,866],"note",{},[774,826,827],{},"Installed for you:"," nothing.\n",[774,830,831],{},"You add:"," nothing, unless you configure drivers; then add it to ",[749,834,835],{},"modules",". ",[742,838,172],{"href":173}," (server\nmode), ",[742,841,199],{"href":200},", ",[742,844,229],{"href":230},[742,846,324],{"href":325},",\n",[742,849,275],{"href":276},", Email Templates and the modules that send with ",[749,852,806],{}," install\nNotify.\n",[774,855,856],{},"Optional:"," ",[742,859,360],{"href":361},", to render emails from Vue templates.\n",[742,862,377],{"href":378},", to deliver push notifications to the users' devices.\n",[742,865,229],{"href":230},", so users choose their channels per topic.",[763,868,870],{"id":869},"quick-setup","Quick setup",[872,873,874,879,904,911,917,1068,1079,1083],"steps",{},[875,876,878],"h3",{"id":877},"install-the-module","Install the module",[880,881,886],"pre",{"className":882,"code":883,"language":884,"meta":885,"style":885},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","pnpm add @frigear-nu\u002Fnotify\n","bash","",[749,887,888],{"__ignoreMap":885},[889,890,893,897,901],"span",{"class":891,"line":892},"line",1,[889,894,896],{"class":895},"sBMFI","pnpm",[889,898,900],{"class":899},"sfazB"," add",[889,902,903],{"class":899}," @frigear-nu\u002Fnotify\n",[875,905,907,908],{"id":906},"configure-it-in-nuxtconfigts","Configure it in ",[749,909,910],{},"nuxt.config.ts",[738,912,913,914,916],{},"List Notify in ",[749,915,835],{}," only to configure it. This setup sends email through Resend and SMS through your own driver:",[880,918,922],{"className":919,"code":920,"filename":910,"language":921,"meta":885,"style":885},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","export default defineNuxtConfig({\n  modules: ['@frigear-nu\u002Fnotify'],\n  notify: {\n    email: { driver: 'resend' },\n    sms: { driver: '~\u002Fserver\u002Futils\u002Ftwilio-sms-driver' },\n    simple: { driver: 'log' },\n  },\n})\n","ts",[749,923,924,945,970,981,1008,1031,1053,1059],{"__ignoreMap":885},[889,925,926,930,933,937,941],{"class":891,"line":892},[889,927,929],{"class":928},"s7zQu","export",[889,931,932],{"class":928}," default",[889,934,936],{"class":935},"s2Zo4"," defineNuxtConfig",[889,938,940],{"class":939},"sTEyZ","(",[889,942,944],{"class":943},"sMK4o","{\n",[889,946,948,952,955,958,961,963,965,968],{"class":891,"line":947},2,[889,949,951],{"class":950},"swJcz","  modules",[889,953,954],{"class":943},":",[889,956,957],{"class":939}," [",[889,959,960],{"class":943},"'",[889,962,751],{"class":899},[889,964,960],{"class":943},[889,966,967],{"class":939},"]",[889,969,847],{"class":943},[889,971,973,976,978],{"class":891,"line":972},3,[889,974,975],{"class":950},"  notify",[889,977,954],{"class":943},[889,979,980],{"class":943}," {\n",[889,982,984,987,989,992,995,997,1000,1003,1005],{"class":891,"line":983},4,[889,985,986],{"class":950},"    email",[889,988,954],{"class":943},[889,990,991],{"class":943}," {",[889,993,994],{"class":950}," driver",[889,996,954],{"class":943},[889,998,999],{"class":943}," '",[889,1001,1002],{"class":899},"resend",[889,1004,960],{"class":943},[889,1006,1007],{"class":943}," },\n",[889,1009,1011,1014,1016,1018,1020,1022,1024,1027,1029],{"class":891,"line":1010},5,[889,1012,1013],{"class":950},"    sms",[889,1015,954],{"class":943},[889,1017,991],{"class":943},[889,1019,994],{"class":950},[889,1021,954],{"class":943},[889,1023,999],{"class":943},[889,1025,1026],{"class":899},"~\u002Fserver\u002Futils\u002Ftwilio-sms-driver",[889,1028,960],{"class":943},[889,1030,1007],{"class":943},[889,1032,1034,1037,1039,1041,1043,1045,1047,1049,1051],{"class":891,"line":1033},6,[889,1035,1036],{"class":950},"    simple",[889,1038,954],{"class":943},[889,1040,991],{"class":943},[889,1042,994],{"class":950},[889,1044,954],{"class":943},[889,1046,999],{"class":943},[889,1048,791],{"class":899},[889,1050,960],{"class":943},[889,1052,1007],{"class":943},[889,1054,1056],{"class":891,"line":1055},7,[889,1057,1058],{"class":943},"  },\n",[889,1060,1062,1065],{"class":891,"line":1061},8,[889,1063,1064],{"class":943},"}",[889,1066,1067],{"class":939},")\n",[1069,1070,1071,1072,1075,1076,1078],"caution",{},"Store the API tokens and keys as secrets of your ",[742,1073,1074],{"href":91},"hosting platform",", never in\n",[749,1077,910],{},". Anyone who has them can send email as you.",[875,1080,1082],{"id":1081},"set-the-environment-variables","Set the environment variables",[738,1084,1085,1086,1089,1090,785],{},"Set ",[749,1087,1088],{},"NUXT_NOTIFY_EMAIL_FROM"," and the credentials of your email driver, listed under\n",[742,1091,1093],{"href":1092},"#environment-variables","Environment variables",[1095,1096,1099,1102,1103,1105,1106,1109],"callout",{"color":1097,"icon":1098},"success","i-lucide-check",[774,1100,1101],{},"What you should see:"," with the ",[749,1104,791],{}," driver, the server console prints ",[749,1107,1108],{},"[notify] Dispatching notification:"," and\nthe notification. With a real driver, the email arrives.",[763,1111,1113],{"id":1112},"options","Options",[738,1115,1116,1117,1120],{},"Options go under the ",[749,1118,1119],{},"notify"," key. Each notification type has its own driver, and only the configured driver is\nloaded.",[1122,1123,1124,1143],"table",{},[1125,1126,1127],"thead",{},[1128,1129,1130,1134,1137,1140],"tr",{},[1131,1132,1133],"th",{},"Option",[1131,1135,1136],{},"Type",[1131,1138,1139],{},"Default",[1131,1141,1142],{},"Purpose",[1144,1145,1146,1170,1218,1241],"tbody",{},[1128,1147,1148,1154,1159,1164],{},[1149,1150,1151],"td",{},[749,1152,1153],{},"email.driver",[1149,1155,1156],{},[749,1157,1158],{},"'log' | 'resend' | 'ses' | 'cloudflare' | 'cloudflare-binding' | string",[1149,1160,1161],{},[749,1162,1163],{},"'log'",[1149,1165,1166,1167,785],{},"A built-in name, or a path to a file whose default export is an ",[749,1168,1169],{},"EmailDriver",[1128,1171,1172,1177,1182,1186],{},[1149,1173,1174],{},[749,1175,1176],{},"sms.driver",[1149,1178,1179],{},[749,1180,1181],{},"'log' | string",[1149,1183,1184],{},[749,1185,1163],{},[1149,1187,1188,1190,1191,1194,1195,1197,1198,836,1201,1203,1204,1207,1208,1211,1212,1215,1216,785],{},[749,1189,1163],{},", or a path to a file whose default export is an ",[749,1192,1193],{},"SMSDriver",". With ",[742,1196,393],{"href":394}," installed the default is its ",[749,1199,1200],{},"sendSms",[749,1202,806],{}," passes ",[749,1205,1206],{},"meta.source"," (the topic's module) and ",[749,1209,1210],{},"meta.topic","; a direct ",[749,1213,1214],{},"dispatchSMSNotification"," should pass its own ",[749,1217,1206],{},[1128,1219,1220,1225,1229,1233],{},[1149,1221,1222],{},[749,1223,1224],{},"simple.driver",[1149,1226,1227],{},[749,1228,1181],{},[1149,1230,1231],{},[749,1232,1163],{},[1149,1234,1235,1237,1238,785],{},[749,1236,1163],{},", or a path to a file whose default export is a ",[749,1239,1240],{},"SimpleDriver",[1128,1242,1243,1248,1252,1257],{},[1149,1244,1245],{},[749,1246,1247],{},"push.driver",[1149,1249,1250],{},[749,1251,1181],{},[1149,1253,1254,1256],{},[749,1255,1163],{},", or Push's driver when Push is installed",[1149,1258,1259,1237,1261,1264],{},[749,1260,1163],{},[749,1262,1263],{},"PushDriver",". A value you set wins over Push's.",[738,1266,1267,1271,1272,1275],{},[774,1268,1269],{},[749,1270,1153],{}," set to a built-in name only sets the default. ",[749,1273,1274],{},"NUXT_NOTIFY_EMAIL_DRIVER"," overrides it at runtime. A\npath to a file is fixed at build time.",[875,1277,1093],{"id":1278},"environment-variables",[738,1280,1281,1282,1285,1286,1289],{},"The built-in email drivers are read from ",[749,1283,1284],{},"runtimeConfig.notify.email"," at runtime, so each environment can use another\nservice without a rebuild. They use plain ",[749,1287,1288],{},"fetch",", with no dependencies. SES requests are signed with AWS Signature\nVersion 4 through Web Crypto.",[1122,1291,1292,1304],{},[1125,1293,1294],{},[1128,1295,1296,1299,1302],{},[1131,1297,1298],{},"Variable",[1131,1300,1301],{},"Used by",[1131,1303,1142],{},[1144,1305,1306,1333,1348,1360,1376,1388,1400,1412,1424,1435],{},[1128,1307,1308,1312,1315],{},[1149,1309,1310],{},[749,1311,1274],{},[1149,1313,1314],{},"all",[1149,1316,1317,1319,1320,842,1322,842,1325,1328,1329,1332],{},[749,1318,791],{}," (default), ",[749,1321,1002],{},[749,1323,1324],{},"ses",[749,1326,1327],{},"cloudflare"," or ",[749,1330,1331],{},"cloudflare-binding",". Any other value throws when sending.",[1128,1334,1335,1339,1342],{},[1149,1336,1337],{},[749,1338,1088],{},[1149,1340,1341],{},"resend, ses, cloudflare, cloudflare-binding",[1149,1343,1344,1345,785],{},"The sender, such as ",[749,1346,1347],{},"Frigear \u003Cno-reply@frigear.nu>",[1128,1349,1350,1355,1357],{},[1149,1351,1352],{},[749,1353,1354],{},"NUXT_NOTIFY_EMAIL_RESEND_API_TOKEN",[1149,1356,1002],{},[1149,1358,1359],{},"API token.",[1128,1361,1362,1367,1369],{},[1149,1363,1364],{},[749,1365,1366],{},"NUXT_NOTIFY_EMAIL_SES_REGION",[1149,1368,1324],{},[1149,1370,1371,1372,1375],{},"AWS region, such as ",[749,1373,1374],{},"eu-west-1",". Uses the SES v2 API.",[1128,1377,1378,1383,1385],{},[1149,1379,1380],{},[749,1381,1382],{},"NUXT_NOTIFY_EMAIL_SES_ACCESS_KEY_ID",[1149,1384,1324],{},[1149,1386,1387],{},"Access key id.",[1128,1389,1390,1395,1397],{},[1149,1391,1392],{},[749,1393,1394],{},"NUXT_NOTIFY_EMAIL_SES_SECRET_ACCESS_KEY",[1149,1396,1324],{},[1149,1398,1399],{},"Secret access key.",[1128,1401,1402,1407,1409],{},[1149,1403,1404],{},[749,1405,1406],{},"NUXT_NOTIFY_EMAIL_SES_SESSION_TOKEN",[1149,1408,1324],{},[1149,1410,1411],{},"Optional, for temporary credentials.",[1128,1413,1414,1419,1421],{},[1149,1415,1416],{},[749,1417,1418],{},"NUXT_NOTIFY_EMAIL_CLOUDFLARE_ACCOUNT_ID",[1149,1420,1327],{},[1149,1422,1423],{},"Cloudflare account id (Email Service).",[1128,1425,1426,1431,1433],{},[1149,1427,1428],{},[749,1429,1430],{},"NUXT_NOTIFY_EMAIL_CLOUDFLARE_API_TOKEN",[1149,1432,1327],{},[1149,1434,1359],{},[1128,1436,1437,1442,1444],{},[1149,1438,1439],{},[749,1440,1441],{},"NUXT_NOTIFY_EMAIL_BINDING_NAME",[1149,1443,1331],{},[1149,1445,1446,1447,1450,1451,785],{},"The name of the Worker's ",[749,1448,1449],{},"send_email"," binding. Defaults to ",[749,1452,1453],{},"SEND_EMAIL",[738,1455,1456],{},"A missing credential fails the send, with an error that names the variable to set.",[875,1458,1460],{"id":1459},"cloudflare-workers-binding","Cloudflare Workers binding",[738,1462,1463,1464,1466,1467,1469,1470,1473,1474,1477,1478,1481,1482,1485,1486,1489,1490,1493],{},"The ",[749,1465,1331],{}," driver sends through a ",[749,1468,1449],{}," binding of the Worker, with no API token: it builds the\nraw MIME message itself (UTF-8, base64 bodies, RFC 2047 encoded names and subjects) and hands it to\n",[749,1471,1472],{},"env.\u003Cbinding>.send(new EmailMessage(from, to, raw))"," of ",[749,1475,1476],{},"cloudflare:email",", once per ",[749,1479,1480],{},"to"," and ",[749,1483,1484],{},"cc"," recipient. Because\nit writes the message, it sets the ",[749,1487,1488],{},"Message-ID"," (",[749,1491,1492],{},"\u003Crandom>@\u003Csender domain>",") and returns it, so a caller can thread\nanswers by it (the inbox does). It runs only on Cloudflare Workers; elsewhere the send fails.",[880,1495,1500],{"className":1496,"code":1497,"filename":1498,"language":1499,"meta":885,"style":885},"language-jsonc shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{\n  \"send_email\": [{ \"name\": \"SEND_EMAIL\" }]\n}\n","wrangler.jsonc","jsonc",[749,1501,1502,1506,1511],{"__ignoreMap":885},[889,1503,1504],{"class":891,"line":892},[889,1505,944],{},[889,1507,1508],{"class":891,"line":947},[889,1509,1510],{},"  \"send_email\": [{ \"name\": \"SEND_EMAIL\" }]\n",[889,1512,1513],{"class":891,"line":972},[889,1514,1515],{},"}\n",[738,1517,1518,1519,1522],{},"With Nitro, add the binding under ",[749,1520,1521],{},"nitro.cloudflare.wrangler.send_email",". What Cloudflare lets the binding send to:",[768,1524,1525,1539,1558],{},[771,1526,1527,1530,1531,1534,1535,1538],{},[774,1528,1529],{},"Verified destinations only",", unless the sender's domain is onboarded to Cloudflare Email Service (Email Sending).\nWithout it, a recipient that is not a verified destination address of Email Routing is refused\n(",[749,1532,1533],{},"E_RECIPIENT_NOT_ALLOWED","), and some plans only ever allow verified destinations (",[749,1536,1537],{},"E_RECIPIENT_PLAN_RESTRICTED",").",[771,1540,1541,1544,1545,847,1548,1551,1552,842,1555,1538],{},[774,1542,1543],{},"The sender's domain"," must be set up for Email Sending on the account (",[749,1546,1547],{},"E_SENDER_DOMAIN_NOT_AVAILABLE",[749,1549,1550],{},"E_SENDER_DOMAIN_NOT_CONFIGURED"," otherwise). The binding can restrict senders and recipients itself\n(",[749,1553,1554],{},"allowed_sender_addresses",[749,1556,1557],{},"allowed_destination_addresses",[771,1559,1560,1561,1566,1567,1570,1571,1574],{},"See ",[742,1562,1565],{"href":1563,"rel":1564},"https:\u002F\u002Fdevelopers.cloudflare.com\u002Femail-routing\u002Femail-workers\u002Fsend-email-workers\u002F",[757],"Send emails from Workers","\nfor the current rules. Cloudflare recommends its structured ",[749,1568,1569],{},"send()"," for new code; this driver keeps the raw\n",[749,1572,1573],{},"EmailMessage"," form, which Cloudflare still supports, so that the message carries its own Message-ID and threading\nheaders.",[738,1576,1577,1578,1581,1582,1585],{},"To send only some mail through it, pick it per send: ",[749,1579,1580],{},"dispatchEmailNotification(notification, { driver: 'cloudflare-binding' })"," (the inbox's ",[749,1583,1584],{},"email.outbound"," does this for its replies).",[763,1587,1589],{"id":1588},"server","Server",[738,1591,1592],{},"The dispatch functions and the definers are auto-imported in server code wherever the module is installed.",[1122,1594,1595,1605],{},[1125,1596,1597],{},[1128,1598,1599,1602],{},[1131,1600,1601],{},"Function",[1131,1603,1604],{},"Signature",[1144,1606,1607,1619,1630,1642,1654,1673],{},[1128,1608,1609,1614],{},[1149,1610,1611],{},[749,1612,1613],{},"dispatchEmailNotification",[1149,1615,1616],{},[749,1617,1618],{},"(notification: EmailNotification, options?: { driver? }) => Promise\u003CEmailSendResult | undefined>",[1128,1620,1621,1625],{},[1149,1622,1623],{},[749,1624,1214],{},[1149,1626,1627],{},[749,1628,1629],{},"(notification: SMSNotification) => Promise\u003Cvoid>",[1128,1631,1632,1637],{},[1149,1633,1634],{},[749,1635,1636],{},"dispatchSimpleNotification",[1149,1638,1639],{},[749,1640,1641],{},"(notification: SimpleNotification) => Promise\u003Cvoid>",[1128,1643,1644,1649],{},[1149,1645,1646],{},[749,1647,1648],{},"dispatchPushNotification",[1149,1650,1651],{},[749,1652,1653],{},"(notification: PushNotification) => Promise\u003CPushDispatchResult | undefined>",[1128,1655,1656,1670],{},[1149,1657,1658,842,1661,842,1664,842,1667],{},[749,1659,1660],{},"defineEmailNotification",[749,1662,1663],{},"defineSMSNotification",[749,1665,1666],{},"defineSimpleNotification",[749,1668,1669],{},"definePushNotification",[1149,1671,1672],{},"Typed helpers that return the notification unchanged.",[1128,1674,1675,1689],{},[1149,1676,1677,842,1680,842,1683,842,1686],{},[749,1678,1679],{},"defineEmailDriver",[749,1681,1682],{},"defineSMSDriver",[749,1684,1685],{},"defineSimpleDriver",[749,1687,1688],{},"definePushDriver",[1149,1690,1691],{},"Typed helpers that return the driver unchanged.",[880,1693,1695],{"className":919,"code":1694,"language":921,"meta":885,"style":885},"await dispatchEmailNotification({\n  to: user.email,\n  subject: 'Welcome!',\n  body: '\u003Cp>Thanks for signing up.\u003C\u002Fp>',\n  text: 'Thanks for signing up.',\n})\n\nawait dispatchSMSNotification({\n  to: user.phone,\n  body: 'Your verification code is 123456.',\n})\n\nawait dispatchSimpleNotification({\n  title: 'New signup',\n  text: `${user.email} just signed up.`,\n})\n\nawait dispatchPushNotification({\n  userIds: [user.id],\n  title: { da: 'Ny besked', en: 'New message' },\n  body: 'Open the app to read it.',\n  url: '\u002Finbox',\n})\n",[749,1696,1697,1709,1726,1742,1758,1774,1780,1786,1797,1813,1829,1836,1841,1853,1870,1897,1904,1909,1921,1939,1977,1993,2010],{"__ignoreMap":885},[889,1698,1699,1702,1705,1707],{"class":891,"line":892},[889,1700,1701],{"class":928},"await",[889,1703,1704],{"class":935}," dispatchEmailNotification",[889,1706,940],{"class":939},[889,1708,944],{"class":943},[889,1710,1711,1714,1716,1719,1721,1724],{"class":891,"line":947},[889,1712,1713],{"class":950},"  to",[889,1715,954],{"class":943},[889,1717,1718],{"class":939}," user",[889,1720,785],{"class":943},[889,1722,1723],{"class":939},"email",[889,1725,847],{"class":943},[889,1727,1728,1731,1733,1735,1738,1740],{"class":891,"line":972},[889,1729,1730],{"class":950},"  subject",[889,1732,954],{"class":943},[889,1734,999],{"class":943},[889,1736,1737],{"class":899},"Welcome!",[889,1739,960],{"class":943},[889,1741,847],{"class":943},[889,1743,1744,1747,1749,1751,1754,1756],{"class":891,"line":983},[889,1745,1746],{"class":950},"  body",[889,1748,954],{"class":943},[889,1750,999],{"class":943},[889,1752,1753],{"class":899},"\u003Cp>Thanks for signing up.\u003C\u002Fp>",[889,1755,960],{"class":943},[889,1757,847],{"class":943},[889,1759,1760,1763,1765,1767,1770,1772],{"class":891,"line":1010},[889,1761,1762],{"class":950},"  text",[889,1764,954],{"class":943},[889,1766,999],{"class":943},[889,1768,1769],{"class":899},"Thanks for signing up.",[889,1771,960],{"class":943},[889,1773,847],{"class":943},[889,1775,1776,1778],{"class":891,"line":1033},[889,1777,1064],{"class":943},[889,1779,1067],{"class":939},[889,1781,1782],{"class":891,"line":1055},[889,1783,1785],{"emptyLinePlaceholder":1784},true,"\n",[889,1787,1788,1790,1793,1795],{"class":891,"line":1061},[889,1789,1701],{"class":928},[889,1791,1792],{"class":935}," dispatchSMSNotification",[889,1794,940],{"class":939},[889,1796,944],{"class":943},[889,1798,1800,1802,1804,1806,1808,1811],{"class":891,"line":1799},9,[889,1801,1713],{"class":950},[889,1803,954],{"class":943},[889,1805,1718],{"class":939},[889,1807,785],{"class":943},[889,1809,1810],{"class":939},"phone",[889,1812,847],{"class":943},[889,1814,1816,1818,1820,1822,1825,1827],{"class":891,"line":1815},10,[889,1817,1746],{"class":950},[889,1819,954],{"class":943},[889,1821,999],{"class":943},[889,1823,1824],{"class":899},"Your verification code is 123456.",[889,1826,960],{"class":943},[889,1828,847],{"class":943},[889,1830,1832,1834],{"class":891,"line":1831},11,[889,1833,1064],{"class":943},[889,1835,1067],{"class":939},[889,1837,1839],{"class":891,"line":1838},12,[889,1840,1785],{"emptyLinePlaceholder":1784},[889,1842,1844,1846,1849,1851],{"class":891,"line":1843},13,[889,1845,1701],{"class":928},[889,1847,1848],{"class":935}," dispatchSimpleNotification",[889,1850,940],{"class":939},[889,1852,944],{"class":943},[889,1854,1856,1859,1861,1863,1866,1868],{"class":891,"line":1855},14,[889,1857,1858],{"class":950},"  title",[889,1860,954],{"class":943},[889,1862,999],{"class":943},[889,1864,1865],{"class":899},"New signup",[889,1867,960],{"class":943},[889,1869,847],{"class":943},[889,1871,1873,1875,1877,1880,1883,1885,1887,1889,1892,1895],{"class":891,"line":1872},15,[889,1874,1762],{"class":950},[889,1876,954],{"class":943},[889,1878,1879],{"class":943}," `${",[889,1881,1882],{"class":939},"user",[889,1884,785],{"class":943},[889,1886,1723],{"class":939},[889,1888,1064],{"class":943},[889,1890,1891],{"class":899}," just signed up.",[889,1893,1894],{"class":943},"`",[889,1896,847],{"class":943},[889,1898,1900,1902],{"class":891,"line":1899},16,[889,1901,1064],{"class":943},[889,1903,1067],{"class":939},[889,1905,1907],{"class":891,"line":1906},17,[889,1908,1785],{"emptyLinePlaceholder":1784},[889,1910,1912,1914,1917,1919],{"class":891,"line":1911},18,[889,1913,1701],{"class":928},[889,1915,1916],{"class":935}," dispatchPushNotification",[889,1918,940],{"class":939},[889,1920,944],{"class":943},[889,1922,1924,1927,1929,1932,1934,1937],{"class":891,"line":1923},19,[889,1925,1926],{"class":950},"  userIds",[889,1928,954],{"class":943},[889,1930,1931],{"class":939}," [user",[889,1933,785],{"class":943},[889,1935,1936],{"class":939},"id]",[889,1938,847],{"class":943},[889,1940,1942,1944,1946,1948,1951,1953,1955,1958,1960,1963,1966,1968,1970,1973,1975],{"class":891,"line":1941},20,[889,1943,1858],{"class":950},[889,1945,954],{"class":943},[889,1947,991],{"class":943},[889,1949,1950],{"class":950}," da",[889,1952,954],{"class":943},[889,1954,999],{"class":943},[889,1956,1957],{"class":899},"Ny besked",[889,1959,960],{"class":943},[889,1961,1962],{"class":943},",",[889,1964,1965],{"class":950}," en",[889,1967,954],{"class":943},[889,1969,999],{"class":943},[889,1971,1972],{"class":899},"New message",[889,1974,960],{"class":943},[889,1976,1007],{"class":943},[889,1978,1980,1982,1984,1986,1989,1991],{"class":891,"line":1979},21,[889,1981,1746],{"class":950},[889,1983,954],{"class":943},[889,1985,999],{"class":943},[889,1987,1988],{"class":899},"Open the app to read it.",[889,1990,960],{"class":943},[889,1992,847],{"class":943},[889,1994,1996,1999,2001,2003,2006,2008],{"class":891,"line":1995},22,[889,1997,1998],{"class":950},"  url",[889,2000,954],{"class":943},[889,2002,999],{"class":943},[889,2004,2005],{"class":899},"\u002Finbox",[889,2007,960],{"class":943},[889,2009,847],{"class":943},[889,2011,2013,2015],{"class":891,"line":2012},23,[889,2014,1064],{"class":943},[889,2016,1067],{"class":939},[738,2018,2019,2021,2022,2025,2026,842,2028,2031,2032,2035,2036,842,2038,842,2040,847,2042,842,2044,2046,2047,2050,2051,2054],{},[749,2020,1613],{}," resolves to what the driver reports: ",[749,2023,2024],{},"{ messageId }"," from ",[749,2027,1331],{},[749,2029,2030],{},"undefined","\nfrom the others. ",[749,2033,2034],{},"options.driver"," sends this one email through another built-in driver (",[749,2037,791],{},[749,2039,1002],{},[749,2041,1324],{},[749,2043,1327],{},[749,2045,1331],{},"), configured from the same ",[749,2048,2049],{},"NUXT_NOTIFY_EMAIL_*"," variables; the ",[749,2052,2053],{},"notify:email"," hook\nruns as always.",[875,2056,377],{"id":2057},"push",[738,2059,2060,2062,2063,2066,2067,2069,2070,2073,2074,2076,2077,2079,2080,2083],{},[749,2061,1648],{}," sends to every device of ",[749,2064,2065],{},"userIds"," that the push driver knows. Notify stores no devices:\nwith ",[742,2068,377],{"href":378}," installed, Push is the driver (FCM and APNs to the devices it stores), and the\nresult says how many devices took it (",[749,2071,2072],{},"{ sent, failed, revoked }","). With the ",[749,2075,791],{}," driver the notification is only\nlogged and the result is ",[749,2078,2030],{},". A list of no users resolves to ",[749,2081,2082],{},"{ sent: 0, failed: 0 }"," without calling the\ndriver. A driver error reaches the caller.",[738,2085,2086,1481,2089,2092,2093,2096,2097,785],{},[749,2087,2088],{},"title",[749,2090,2091],{},"body"," are a text, or one text per locale (",[749,2094,2095],{},"{ da, en }","); a driver that knows each device's locale picks\nit, Push falls back to ",[749,2098,2099],{},"en",[875,2101,2103],{"id":2102},"templates","Templates",[738,2105,2106,2107,2109,2110,2112,2113,2116,2117,1481,2120,2122],{},"Notify renders no templates itself. ",[749,2108,1613],{}," calls the ",[749,2111,2053],{}," hook before the driver runs,\nwhere Email Templates renders ",[749,2114,2115],{},"notification.template",". Without a renderer, ",[749,2118,2119],{},"subject",[749,2121,2091],{}," are sent as built.",[875,2124,2126],{"id":2125},"types","Types",[738,2128,2129,2130,2133,2134,2137],{},"The types are exported from ",[749,2131,2132],{},"@frigear-nu\u002Fnotify\u002Ftypes",". The package root re-exports the notification, driver and\n",[749,2135,2136],{},"ModuleOptions"," types.",[880,2139,2141],{"className":919,"code":2140,"language":921,"meta":885,"style":885},"interface EmailNotification\u003CM = NotificationMeta> {\n  to: string | string[]\n  subject: string\n  \u002F** HTML body. *\u002F\n  body: string\n  \u002F** Optional plain-text body. *\u002F\n  text?: string\n  \u002F** The sender of this email, instead of the configured `from`. *\u002F\n  from?: string\n  \u002F** Address replies go to (the `Reply-To` header). *\u002F\n  replyTo?: string\n  \u002F** `Cc` recipients. *\u002F\n  cc?: string | string[]\n  \u002F** Extra headers, such as `List-Unsubscribe`. *\u002F\n  headers?: Record\u003Cstring, string>\n  \u002F** Template to render instead of subject\u002Fbody\u002Ftext, when a renderer is installed. *\u002F\n  template?: { name: string, props?: Record\u003Cstring, unknown>, locale?: string }\n  meta?: M\n}\n\ninterface SMSNotification\u003CM = NotificationMeta> {\n  to: string | string[]\n  body: string\n  meta?: M\n}\n\ninterface PushNotification\u003CM = NotificationMeta> {\n  userIds: number[]\n  \u002F** A text, or one text per locale. *\u002F\n  title: string | Record\u003Cstring, string>\n  body: string | Record\u003Cstring, string>\n  \u002F** Where the app goes when the notification is opened. *\u002F\n  url?: string\n  \u002F** Extra string data delivered with the notification. *\u002F\n  data?: Record\u003Cstring, string>\n  meta?: M\n}\n\n\u002F** What a push driver may answer; the `log` driver answers nothing. *\u002F\ntype PushDispatchResult = { sent: number, failed: number, revoked?: number }\n\ninterface SimpleNotification\u003CM = Record\u003Cstring, unknown>> {\n  title: string\n  text: string\n  \u002F** Optional URL to open when the notification is clicked. *\u002F\n  url?: string\n  meta?: M\n}\n\ntype NotificationMeta\u003CAdditionalMeta = Record\u003Cstring, unknown>> = { driver?: string } & AdditionalMeta\n\n\u002F** What an email driver may report; `void` is fine. `messageId` is the Message-ID header it set, without brackets. *\u002F\ntype EmailSendResult = { messageId?: string }\n\ntype EmailDriver = (notification: EmailNotification) => Promise\u003CEmailSendResult | void> | EmailSendResult | void\ntype SMSDriver = (notification: SMSNotification) => Promise\u003Cvoid> | void\ntype SimpleDriver = (notification: SimpleNotification) => Promise\u003Cvoid> | void\ntype PushDriver = (notification: PushNotification) => Promise\u003CPushDispatchResult | void> | PushDispatchResult | void\n",[749,2142,2143,2169,2186,2195,2201,2209,2214,2223,2228,2237,2242,2251,2256,2271,2276,2298,2303,2350,2360,2364,2368,2387,2401,2409,2418,2423,2428,2448,2460,2466,2489,2512,2518,2527,2533,2553,2562,2567,2572,2578,2618,2623,2652,2661,2670,2676,2685,2694,2699,2704,2749,2754,2760,2781,2786,2836,2871,2905],{"__ignoreMap":885},[889,2144,2145,2149,2152,2155,2158,2161,2164,2167],{"class":891,"line":892},[889,2146,2148],{"class":2147},"spNyl","interface",[889,2150,2151],{"class":895}," EmailNotification",[889,2153,2154],{"class":943},"\u003C",[889,2156,2157],{"class":895},"M",[889,2159,2160],{"class":943}," =",[889,2162,2163],{"class":895}," NotificationMeta",[889,2165,2166],{"class":943},">",[889,2168,980],{"class":943},[889,2170,2171,2173,2175,2178,2181,2183],{"class":891,"line":947},[889,2172,1713],{"class":950},[889,2174,954],{"class":943},[889,2176,2177],{"class":895}," string",[889,2179,2180],{"class":943}," |",[889,2182,2177],{"class":895},[889,2184,2185],{"class":939},"[]\n",[889,2187,2188,2190,2192],{"class":891,"line":972},[889,2189,1730],{"class":950},[889,2191,954],{"class":943},[889,2193,2194],{"class":895}," string\n",[889,2196,2197],{"class":891,"line":983},[889,2198,2200],{"class":2199},"sHwdD","  \u002F** HTML body. *\u002F\n",[889,2202,2203,2205,2207],{"class":891,"line":1010},[889,2204,1746],{"class":950},[889,2206,954],{"class":943},[889,2208,2194],{"class":895},[889,2210,2211],{"class":891,"line":1033},[889,2212,2213],{"class":2199},"  \u002F** Optional plain-text body. *\u002F\n",[889,2215,2216,2218,2221],{"class":891,"line":1055},[889,2217,1762],{"class":950},[889,2219,2220],{"class":943},"?:",[889,2222,2194],{"class":895},[889,2224,2225],{"class":891,"line":1061},[889,2226,2227],{"class":2199},"  \u002F** The sender of this email, instead of the configured `from`. *\u002F\n",[889,2229,2230,2233,2235],{"class":891,"line":1799},[889,2231,2232],{"class":950},"  from",[889,2234,2220],{"class":943},[889,2236,2194],{"class":895},[889,2238,2239],{"class":891,"line":1815},[889,2240,2241],{"class":2199},"  \u002F** Address replies go to (the `Reply-To` header). *\u002F\n",[889,2243,2244,2247,2249],{"class":891,"line":1831},[889,2245,2246],{"class":950},"  replyTo",[889,2248,2220],{"class":943},[889,2250,2194],{"class":895},[889,2252,2253],{"class":891,"line":1838},[889,2254,2255],{"class":2199},"  \u002F** `Cc` recipients. *\u002F\n",[889,2257,2258,2261,2263,2265,2267,2269],{"class":891,"line":1843},[889,2259,2260],{"class":950},"  cc",[889,2262,2220],{"class":943},[889,2264,2177],{"class":895},[889,2266,2180],{"class":943},[889,2268,2177],{"class":895},[889,2270,2185],{"class":939},[889,2272,2273],{"class":891,"line":1855},[889,2274,2275],{"class":2199},"  \u002F** Extra headers, such as `List-Unsubscribe`. *\u002F\n",[889,2277,2278,2281,2283,2286,2288,2291,2293,2295],{"class":891,"line":1872},[889,2279,2280],{"class":950},"  headers",[889,2282,2220],{"class":943},[889,2284,2285],{"class":895}," Record",[889,2287,2154],{"class":943},[889,2289,2290],{"class":895},"string",[889,2292,1962],{"class":943},[889,2294,2177],{"class":895},[889,2296,2297],{"class":943},">\n",[889,2299,2300],{"class":891,"line":1899},[889,2301,2302],{"class":2199},"  \u002F** Template to render instead of subject\u002Fbody\u002Ftext, when a renderer is installed. *\u002F\n",[889,2304,2305,2308,2310,2312,2315,2317,2319,2321,2324,2326,2328,2330,2332,2334,2337,2340,2343,2345,2347],{"class":891,"line":1906},[889,2306,2307],{"class":950},"  template",[889,2309,2220],{"class":943},[889,2311,991],{"class":943},[889,2313,2314],{"class":950}," name",[889,2316,954],{"class":943},[889,2318,2177],{"class":895},[889,2320,1962],{"class":943},[889,2322,2323],{"class":950}," props",[889,2325,2220],{"class":943},[889,2327,2285],{"class":895},[889,2329,2154],{"class":943},[889,2331,2290],{"class":895},[889,2333,1962],{"class":943},[889,2335,2336],{"class":895}," unknown",[889,2338,2339],{"class":943},">,",[889,2341,2342],{"class":950}," locale",[889,2344,2220],{"class":943},[889,2346,2177],{"class":895},[889,2348,2349],{"class":943}," }\n",[889,2351,2352,2355,2357],{"class":891,"line":1911},[889,2353,2354],{"class":950},"  meta",[889,2356,2220],{"class":943},[889,2358,2359],{"class":895}," M\n",[889,2361,2362],{"class":891,"line":1923},[889,2363,1515],{"class":943},[889,2365,2366],{"class":891,"line":1941},[889,2367,1785],{"emptyLinePlaceholder":1784},[889,2369,2370,2372,2375,2377,2379,2381,2383,2385],{"class":891,"line":1979},[889,2371,2148],{"class":2147},[889,2373,2374],{"class":895}," SMSNotification",[889,2376,2154],{"class":943},[889,2378,2157],{"class":895},[889,2380,2160],{"class":943},[889,2382,2163],{"class":895},[889,2384,2166],{"class":943},[889,2386,980],{"class":943},[889,2388,2389,2391,2393,2395,2397,2399],{"class":891,"line":1995},[889,2390,1713],{"class":950},[889,2392,954],{"class":943},[889,2394,2177],{"class":895},[889,2396,2180],{"class":943},[889,2398,2177],{"class":895},[889,2400,2185],{"class":939},[889,2402,2403,2405,2407],{"class":891,"line":2012},[889,2404,1746],{"class":950},[889,2406,954],{"class":943},[889,2408,2194],{"class":895},[889,2410,2412,2414,2416],{"class":891,"line":2411},24,[889,2413,2354],{"class":950},[889,2415,2220],{"class":943},[889,2417,2359],{"class":895},[889,2419,2421],{"class":891,"line":2420},25,[889,2422,1515],{"class":943},[889,2424,2426],{"class":891,"line":2425},26,[889,2427,1785],{"emptyLinePlaceholder":1784},[889,2429,2431,2433,2436,2438,2440,2442,2444,2446],{"class":891,"line":2430},27,[889,2432,2148],{"class":2147},[889,2434,2435],{"class":895}," PushNotification",[889,2437,2154],{"class":943},[889,2439,2157],{"class":895},[889,2441,2160],{"class":943},[889,2443,2163],{"class":895},[889,2445,2166],{"class":943},[889,2447,980],{"class":943},[889,2449,2451,2453,2455,2458],{"class":891,"line":2450},28,[889,2452,1926],{"class":950},[889,2454,954],{"class":943},[889,2456,2457],{"class":895}," number",[889,2459,2185],{"class":939},[889,2461,2463],{"class":891,"line":2462},29,[889,2464,2465],{"class":2199},"  \u002F** A text, or one text per locale. *\u002F\n",[889,2467,2469,2471,2473,2475,2477,2479,2481,2483,2485,2487],{"class":891,"line":2468},30,[889,2470,1858],{"class":950},[889,2472,954],{"class":943},[889,2474,2177],{"class":895},[889,2476,2180],{"class":943},[889,2478,2285],{"class":895},[889,2480,2154],{"class":943},[889,2482,2290],{"class":895},[889,2484,1962],{"class":943},[889,2486,2177],{"class":895},[889,2488,2297],{"class":943},[889,2490,2492,2494,2496,2498,2500,2502,2504,2506,2508,2510],{"class":891,"line":2491},31,[889,2493,1746],{"class":950},[889,2495,954],{"class":943},[889,2497,2177],{"class":895},[889,2499,2180],{"class":943},[889,2501,2285],{"class":895},[889,2503,2154],{"class":943},[889,2505,2290],{"class":895},[889,2507,1962],{"class":943},[889,2509,2177],{"class":895},[889,2511,2297],{"class":943},[889,2513,2515],{"class":891,"line":2514},32,[889,2516,2517],{"class":2199},"  \u002F** Where the app goes when the notification is opened. *\u002F\n",[889,2519,2521,2523,2525],{"class":891,"line":2520},33,[889,2522,1998],{"class":950},[889,2524,2220],{"class":943},[889,2526,2194],{"class":895},[889,2528,2530],{"class":891,"line":2529},34,[889,2531,2532],{"class":2199},"  \u002F** Extra string data delivered with the notification. *\u002F\n",[889,2534,2536,2539,2541,2543,2545,2547,2549,2551],{"class":891,"line":2535},35,[889,2537,2538],{"class":950},"  data",[889,2540,2220],{"class":943},[889,2542,2285],{"class":895},[889,2544,2154],{"class":943},[889,2546,2290],{"class":895},[889,2548,1962],{"class":943},[889,2550,2177],{"class":895},[889,2552,2297],{"class":943},[889,2554,2556,2558,2560],{"class":891,"line":2555},36,[889,2557,2354],{"class":950},[889,2559,2220],{"class":943},[889,2561,2359],{"class":895},[889,2563,2565],{"class":891,"line":2564},37,[889,2566,1515],{"class":943},[889,2568,2570],{"class":891,"line":2569},38,[889,2571,1785],{"emptyLinePlaceholder":1784},[889,2573,2575],{"class":891,"line":2574},39,[889,2576,2577],{"class":2199},"\u002F** What a push driver may answer; the `log` driver answers nothing. *\u002F\n",[889,2579,2581,2584,2587,2589,2591,2594,2596,2598,2600,2603,2605,2607,2609,2612,2614,2616],{"class":891,"line":2580},40,[889,2582,2583],{"class":2147},"type",[889,2585,2586],{"class":895}," PushDispatchResult",[889,2588,2160],{"class":943},[889,2590,991],{"class":943},[889,2592,2593],{"class":950}," sent",[889,2595,954],{"class":943},[889,2597,2457],{"class":895},[889,2599,1962],{"class":943},[889,2601,2602],{"class":950}," failed",[889,2604,954],{"class":943},[889,2606,2457],{"class":895},[889,2608,1962],{"class":943},[889,2610,2611],{"class":950}," revoked",[889,2613,2220],{"class":943},[889,2615,2457],{"class":895},[889,2617,2349],{"class":943},[889,2619,2621],{"class":891,"line":2620},41,[889,2622,1785],{"emptyLinePlaceholder":1784},[889,2624,2626,2628,2631,2633,2635,2637,2639,2641,2643,2645,2647,2650],{"class":891,"line":2625},42,[889,2627,2148],{"class":2147},[889,2629,2630],{"class":895}," SimpleNotification",[889,2632,2154],{"class":943},[889,2634,2157],{"class":895},[889,2636,2160],{"class":943},[889,2638,2285],{"class":895},[889,2640,2154],{"class":943},[889,2642,2290],{"class":895},[889,2644,1962],{"class":943},[889,2646,2336],{"class":895},[889,2648,2649],{"class":943},">>",[889,2651,980],{"class":943},[889,2653,2655,2657,2659],{"class":891,"line":2654},43,[889,2656,1858],{"class":950},[889,2658,954],{"class":943},[889,2660,2194],{"class":895},[889,2662,2664,2666,2668],{"class":891,"line":2663},44,[889,2665,1762],{"class":950},[889,2667,954],{"class":943},[889,2669,2194],{"class":895},[889,2671,2673],{"class":891,"line":2672},45,[889,2674,2675],{"class":2199},"  \u002F** Optional URL to open when the notification is clicked. *\u002F\n",[889,2677,2679,2681,2683],{"class":891,"line":2678},46,[889,2680,1998],{"class":950},[889,2682,2220],{"class":943},[889,2684,2194],{"class":895},[889,2686,2688,2690,2692],{"class":891,"line":2687},47,[889,2689,2354],{"class":950},[889,2691,2220],{"class":943},[889,2693,2359],{"class":895},[889,2695,2697],{"class":891,"line":2696},48,[889,2698,1515],{"class":943},[889,2700,2702],{"class":891,"line":2701},49,[889,2703,1785],{"emptyLinePlaceholder":1784},[889,2705,2707,2709,2711,2713,2716,2718,2720,2722,2724,2726,2728,2730,2732,2734,2736,2738,2740,2743,2746],{"class":891,"line":2706},50,[889,2708,2583],{"class":2147},[889,2710,2163],{"class":895},[889,2712,2154],{"class":943},[889,2714,2715],{"class":895},"AdditionalMeta",[889,2717,2160],{"class":943},[889,2719,2285],{"class":895},[889,2721,2154],{"class":943},[889,2723,2290],{"class":895},[889,2725,1962],{"class":943},[889,2727,2336],{"class":895},[889,2729,2649],{"class":943},[889,2731,2160],{"class":943},[889,2733,991],{"class":943},[889,2735,994],{"class":950},[889,2737,2220],{"class":943},[889,2739,2177],{"class":895},[889,2741,2742],{"class":943}," }",[889,2744,2745],{"class":943}," &",[889,2747,2748],{"class":895}," AdditionalMeta\n",[889,2750,2752],{"class":891,"line":2751},51,[889,2753,1785],{"emptyLinePlaceholder":1784},[889,2755,2757],{"class":891,"line":2756},52,[889,2758,2759],{"class":2199},"\u002F** What an email driver may report; `void` is fine. `messageId` is the Message-ID header it set, without brackets. *\u002F\n",[889,2761,2763,2765,2768,2770,2772,2775,2777,2779],{"class":891,"line":2762},53,[889,2764,2583],{"class":2147},[889,2766,2767],{"class":895}," EmailSendResult",[889,2769,2160],{"class":943},[889,2771,991],{"class":943},[889,2773,2774],{"class":950}," messageId",[889,2776,2220],{"class":943},[889,2778,2177],{"class":895},[889,2780,2349],{"class":943},[889,2782,2784],{"class":891,"line":2783},54,[889,2785,1785],{"emptyLinePlaceholder":1784},[889,2787,2789,2791,2794,2796,2798,2802,2804,2806,2809,2812,2815,2817,2820,2822,2825,2827,2829,2831,2833],{"class":891,"line":2788},55,[889,2790,2583],{"class":2147},[889,2792,2793],{"class":895}," EmailDriver",[889,2795,2160],{"class":943},[889,2797,1489],{"class":943},[889,2799,2801],{"class":2800},"sHdIc","notification",[889,2803,954],{"class":943},[889,2805,2151],{"class":895},[889,2807,2808],{"class":943},")",[889,2810,2811],{"class":2147}," =>",[889,2813,2814],{"class":895}," Promise",[889,2816,2154],{"class":943},[889,2818,2819],{"class":895},"EmailSendResult",[889,2821,2180],{"class":943},[889,2823,2824],{"class":895}," void",[889,2826,2166],{"class":943},[889,2828,2180],{"class":943},[889,2830,2767],{"class":895},[889,2832,2180],{"class":943},[889,2834,2835],{"class":895}," void\n",[889,2837,2839,2841,2844,2846,2848,2850,2852,2854,2856,2858,2860,2862,2865,2867,2869],{"class":891,"line":2838},56,[889,2840,2583],{"class":2147},[889,2842,2843],{"class":895}," SMSDriver",[889,2845,2160],{"class":943},[889,2847,1489],{"class":943},[889,2849,2801],{"class":2800},[889,2851,954],{"class":943},[889,2853,2374],{"class":895},[889,2855,2808],{"class":943},[889,2857,2811],{"class":2147},[889,2859,2814],{"class":895},[889,2861,2154],{"class":943},[889,2863,2864],{"class":895},"void",[889,2866,2166],{"class":943},[889,2868,2180],{"class":943},[889,2870,2835],{"class":895},[889,2872,2874,2876,2879,2881,2883,2885,2887,2889,2891,2893,2895,2897,2899,2901,2903],{"class":891,"line":2873},57,[889,2875,2583],{"class":2147},[889,2877,2878],{"class":895}," SimpleDriver",[889,2880,2160],{"class":943},[889,2882,1489],{"class":943},[889,2884,2801],{"class":2800},[889,2886,954],{"class":943},[889,2888,2630],{"class":895},[889,2890,2808],{"class":943},[889,2892,2811],{"class":2147},[889,2894,2814],{"class":895},[889,2896,2154],{"class":943},[889,2898,2864],{"class":895},[889,2900,2166],{"class":943},[889,2902,2180],{"class":943},[889,2904,2835],{"class":895},[889,2906,2908,2910,2913,2915,2917,2919,2921,2923,2925,2927,2929,2931,2934,2936,2938,2940,2942,2944,2946],{"class":891,"line":2907},58,[889,2909,2583],{"class":2147},[889,2911,2912],{"class":895}," PushDriver",[889,2914,2160],{"class":943},[889,2916,1489],{"class":943},[889,2918,2801],{"class":2800},[889,2920,954],{"class":943},[889,2922,2435],{"class":895},[889,2924,2808],{"class":943},[889,2926,2811],{"class":2147},[889,2928,2814],{"class":895},[889,2930,2154],{"class":943},[889,2932,2933],{"class":895},"PushDispatchResult",[889,2935,2180],{"class":943},[889,2937,2824],{"class":895},[889,2939,2166],{"class":943},[889,2941,2180],{"class":943},[889,2943,2586],{"class":895},[889,2945,2180],{"class":943},[889,2947,2835],{"class":895},[875,2949,2951],{"id":2950},"custom-driver","Custom driver",[738,2953,2954],{},"A driver is a function that delivers one notification. Point the driver option at a file whose default export is that\nfunction:",[880,2956,2959],{"className":919,"code":2957,"filename":2958,"language":921,"meta":885,"style":885},"import type { EmailDriver } from '@frigear-nu\u002Fnotify\u002Ftypes'\n\nconst sendWithResend: EmailDriver = async (notification) => {\n  \u002F\u002F call your provider with notification.to \u002F cc \u002F from \u002F subject \u002F body \u002F text \u002F replyTo\n}\n\nexport default sendWithResend\n","server\u002Futils\u002Fresend-email-driver.ts",[749,2960,2961,2985,2989,3016,3021,3025,3029],{"__ignoreMap":885},[889,2962,2963,2966,2969,2971,2973,2975,2978,2980,2982],{"class":891,"line":892},[889,2964,2965],{"class":928},"import",[889,2967,2968],{"class":928}," type",[889,2970,991],{"class":943},[889,2972,2793],{"class":939},[889,2974,2742],{"class":943},[889,2976,2977],{"class":928}," from",[889,2979,999],{"class":943},[889,2981,2132],{"class":899},[889,2983,2984],{"class":943},"'\n",[889,2986,2987],{"class":891,"line":947},[889,2988,1785],{"emptyLinePlaceholder":1784},[889,2990,2991,2994,2997,2999,3001,3003,3006,3008,3010,3012,3014],{"class":891,"line":972},[889,2992,2993],{"class":2147},"const",[889,2995,2996],{"class":939}," sendWithResend",[889,2998,954],{"class":943},[889,3000,2793],{"class":895},[889,3002,2160],{"class":943},[889,3004,3005],{"class":2147}," async",[889,3007,1489],{"class":943},[889,3009,2801],{"class":2800},[889,3011,2808],{"class":943},[889,3013,2811],{"class":2147},[889,3015,980],{"class":943},[889,3017,3018],{"class":891,"line":983},[889,3019,3020],{"class":2199},"  \u002F\u002F call your provider with notification.to \u002F cc \u002F from \u002F subject \u002F body \u002F text \u002F replyTo\n",[889,3022,3023],{"class":891,"line":1010},[889,3024,1515],{"class":943},[889,3026,3027],{"class":891,"line":1033},[889,3028,1785],{"emptyLinePlaceholder":1784},[889,3030,3031,3033,3035],{"class":891,"line":1055},[889,3032,929],{"class":928},[889,3034,932],{"class":928},[889,3036,3037],{"class":939}," sendWithResend\n",[738,3039,3040,3041,3043,3044,3046],{},"A driver may return ",[749,3042,2024],{},", the ",[749,3045,1488],{}," header it set itself (only that, never a provider's own id), or\nnothing. Returning nothing stays valid, so existing drivers need no change.",[738,3048,3049,3051,3052,842,3054,1481,3056,3058,3059,3061],{},[749,3050,1484],{}," is optional. The built-in ",[749,3053,1002],{},[749,3055,1324],{},[749,3057,1327],{}," drivers send it as the provider's cc list (a single\naddress becomes a list), and ",[749,3060,791],{}," logs it with the rest. A driver whose transport has no cc may ignore it; say so where\nyou document the driver, because callers such as the inbox use it to keep the people a person copied in the reply.",[738,3063,3064,3067,3068,3070,3071,3074,3075,3078,3079,3081,3082,3084,3085,3088,3089,3092,3093,3095,3096,3099,3100,3102,3103,3105],{},[749,3065,3066],{},"from"," is optional. It replaces the configured sender (",[749,3069,1088],{},") for one email, as a bare address\n(",[749,3072,3073],{},"support@inbox.example.org",") or with a display name (",[749,3076,3077],{},"\"Support\" \u003Csupport@inbox.example.org>","). The built-in ",[749,3080,1002],{},"\ndriver sends it as it is, ",[749,3083,1324],{}," with a non-ASCII display name RFC 2047 encoded (",[749,3086,3087],{},"Støtte"," becomes\n",[749,3090,3091],{},"=?UTF-8?B?...?=","), ",[749,3094,1327],{}," sends a display name as its ",[749,3097,3098],{},"{ address, name }"," form, ",[749,3101,1331],{}," writes it\ninto the message, and ",[749,3104,791],{}," logs it. The provider must have the address's domain verified for sending, or it refuses the email. The inbox uses it to\nanswer from a mailbox's own address. A custom driver that cannot change the sender may ignore it; say so where you\ndocument the driver.",[738,3107,3108,3111,3112,3115,3116,3119,3120,3122,3123,1481,3126,3129,3130,842,3133,842,3136,842,3139,842,3141,3144,3145,3148,3149,842,3152,3155,3156,842,3158,842,3160,3163],{},[749,3109,3110],{},"headers"," is optional too. The built-in drivers send it as the provider's custom headers (SES as ",[749,3113,3114],{},"Name","\u002F",[749,3117,3118],{},"Value"," pairs of\nthe simple content), and ",[749,3121,791],{}," logs it. Use it for headers such as ",[749,3124,3125],{},"List-Unsubscribe",[749,3127,3128],{},"List-Unsubscribe-Post","\n(one-click unsubscribe, RFC 8058), which mailbox providers expect on bulk mail. A provider never lets you set the\nheaders it sets itself (",[749,3131,3132],{},"From",[749,3134,3135],{},"To",[749,3137,3138],{},"Subject",[749,3140,1488],{},[749,3142,3143],{},"Date","), and Cloudflare accepts only the headers on its\nallowlist plus ",[749,3146,3147],{},"X-"," headers: any other header makes it reject the whole send. The allowlist has the threading headers\n(",[749,3150,3151],{},"In-Reply-To",[749,3153,3154],{},"References",") and the list headers (",[749,3157,3125],{},[749,3159,3128],{},[749,3161,3162],{},"List-Id",", ...). A driver whose transport has no custom\nheaders may ignore them.",[875,3165,3167],{"id":3166},"store-types","Store types",[738,3169,3170,3172,3173,1481,3176,3179,3180,842,3183,847,3186,1481,3189,3192],{},[749,3171,2132],{}," also exports ",[749,3174,3175],{},"StoredNotification",[749,3177,3178],{},"NotificationStore",", a contract with ",[749,3181,3182],{},"put",[749,3184,3185],{},"get",[749,3187,3188],{},"list",[749,3190,3191],{},"delete"," for keeping notifications. Nothing in the module uses a store yet, and dispatch records nothing.",[763,3194,811],{"id":3195},"notifying-a-user",[738,3197,3198,3199,3201,3202,3205],{},"The dispatchers above send what you address. ",[749,3200,806],{}," sends one user a message on the channels they chose for its\n",[774,3203,3204],{},"topic",": email, SMS and push, each through the dispatcher of that channel.",[1122,3207,3208,3216],{},[1125,3209,3210],{},[1128,3211,3212,3214],{},[1131,3213,1601],{},[1131,3215,1604],{},[1144,3217,3218,3229,3242,3255],{},[1128,3219,3220,3224],{},[1149,3221,3222],{},[749,3223,806],{},[1149,3225,3226],{},[749,3227,3228],{},"(userId: number, input: NotifyUserInput) => Promise\u003CNotifyUserResult>",[1128,3230,3231,3239],{},[1149,3232,3233,842,3236],{},[749,3234,3235],{},"registeredNotificationTopics",[749,3237,3238],{},"findNotificationTopic",[1149,3240,3241],{},"The registered topics, and one by id.",[1128,3243,3244,3249],{},[1149,3245,3246],{},[749,3247,3248],{},"readNotificationChannels",[1149,3250,3251,3254],{},[749,3252,3253],{},"(userId) => Promise\u003CNotificationChannelsDto>",": every topic with what applies to the user.",[1128,3256,3257,3262],{},[1149,3258,3259],{},[749,3260,3261],{},"saveNotificationChannels",[1149,3263,3264,3267],{},[749,3265,3266],{},"(userId, changes) => Promise\u003Cvoid>",": stores the channels set, per topic and channel; channels never set follow the topic's defaults.",[875,3269,3271],{"id":3270},"declare-your-topics","Declare your topics",[738,3273,3274,3275,3278,3279,2025,3282,3285,3286,954],{},"A topic is one kind of message a user can choose channels for, such as shift reminders. Register yours in your\nmodule's ",[749,3276,3277],{},"setup()"," with ",[749,3280,3281],{},"extendNotificationTopics",[749,3283,3284],{},"@frigear-nu\u002Fnotify\u002Futils",", and list Notify in\n",[749,3287,3288],{},"moduleDependencies",[880,3290,3293],{"className":919,"code":3291,"filename":3292,"language":921,"meta":885,"style":885},"import { extendNotificationTopics } from '@frigear-nu\u002Fnotify\u002Futils'\n\nextendNotificationTopics(nuxt, [{\n  id: 'shifts.reminder',\n  label: { da: 'Vagtpåmindelser', en: 'Shift reminders' },\n  description: { da: 'En påmindelse før dine vagter starter.', en: 'A reminder before your shifts start.' },\n  defaults: { email: true, sms: false, push: true },\n  channels: ['email', 'sms', 'push'],\n}])\n","src\u002Fmodule.ts",[749,3294,3295,3314,3318,3331,3347,3382,3417,3456,3492],{"__ignoreMap":885},[889,3296,3297,3299,3301,3304,3306,3308,3310,3312],{"class":891,"line":892},[889,3298,2965],{"class":928},[889,3300,991],{"class":943},[889,3302,3303],{"class":939}," extendNotificationTopics",[889,3305,2742],{"class":943},[889,3307,2977],{"class":928},[889,3309,999],{"class":943},[889,3311,3284],{"class":899},[889,3313,2984],{"class":943},[889,3315,3316],{"class":891,"line":947},[889,3317,1785],{"emptyLinePlaceholder":1784},[889,3319,3320,3322,3325,3327,3329],{"class":891,"line":972},[889,3321,3281],{"class":935},[889,3323,3324],{"class":939},"(nuxt",[889,3326,1962],{"class":943},[889,3328,957],{"class":939},[889,3330,944],{"class":943},[889,3332,3333,3336,3338,3340,3343,3345],{"class":891,"line":983},[889,3334,3335],{"class":950},"  id",[889,3337,954],{"class":943},[889,3339,999],{"class":943},[889,3341,3342],{"class":899},"shifts.reminder",[889,3344,960],{"class":943},[889,3346,847],{"class":943},[889,3348,3349,3352,3354,3356,3358,3360,3362,3365,3367,3369,3371,3373,3375,3378,3380],{"class":891,"line":1010},[889,3350,3351],{"class":950},"  label",[889,3353,954],{"class":943},[889,3355,991],{"class":943},[889,3357,1950],{"class":950},[889,3359,954],{"class":943},[889,3361,999],{"class":943},[889,3363,3364],{"class":899},"Vagtpåmindelser",[889,3366,960],{"class":943},[889,3368,1962],{"class":943},[889,3370,1965],{"class":950},[889,3372,954],{"class":943},[889,3374,999],{"class":943},[889,3376,3377],{"class":899},"Shift reminders",[889,3379,960],{"class":943},[889,3381,1007],{"class":943},[889,3383,3384,3387,3389,3391,3393,3395,3397,3400,3402,3404,3406,3408,3410,3413,3415],{"class":891,"line":1033},[889,3385,3386],{"class":950},"  description",[889,3388,954],{"class":943},[889,3390,991],{"class":943},[889,3392,1950],{"class":950},[889,3394,954],{"class":943},[889,3396,999],{"class":943},[889,3398,3399],{"class":899},"En påmindelse før dine vagter starter.",[889,3401,960],{"class":943},[889,3403,1962],{"class":943},[889,3405,1965],{"class":950},[889,3407,954],{"class":943},[889,3409,999],{"class":943},[889,3411,3412],{"class":899},"A reminder before your shifts start.",[889,3414,960],{"class":943},[889,3416,1007],{"class":943},[889,3418,3419,3422,3424,3426,3429,3431,3435,3437,3440,3442,3445,3447,3450,3452,3454],{"class":891,"line":1055},[889,3420,3421],{"class":950},"  defaults",[889,3423,954],{"class":943},[889,3425,991],{"class":943},[889,3427,3428],{"class":950}," email",[889,3430,954],{"class":943},[889,3432,3434],{"class":3433},"sfNiH"," true",[889,3436,1962],{"class":943},[889,3438,3439],{"class":950}," sms",[889,3441,954],{"class":943},[889,3443,3444],{"class":3433}," false",[889,3446,1962],{"class":943},[889,3448,3449],{"class":950}," push",[889,3451,954],{"class":943},[889,3453,3434],{"class":3433},[889,3455,1007],{"class":943},[889,3457,3458,3461,3463,3465,3467,3469,3471,3473,3475,3478,3480,3482,3484,3486,3488,3490],{"class":891,"line":1061},[889,3459,3460],{"class":950},"  channels",[889,3462,954],{"class":943},[889,3464,957],{"class":939},[889,3466,960],{"class":943},[889,3468,1723],{"class":899},[889,3470,960],{"class":943},[889,3472,1962],{"class":943},[889,3474,999],{"class":943},[889,3476,3477],{"class":899},"sms",[889,3479,960],{"class":943},[889,3481,1962],{"class":943},[889,3483,999],{"class":943},[889,3485,2057],{"class":899},[889,3487,960],{"class":943},[889,3489,967],{"class":939},[889,3491,847],{"class":943},[889,3493,3494,3496],{"class":891,"line":1799},[889,3495,1064],{"class":943},[889,3497,3498],{"class":939},"])\n",[768,3500,3501,3516,3532,3538],{},[771,3502,3503,3506,3507,842,3509,1328,3512,3515],{},[749,3504,3505],{},"id"," is lower case words joined by ",[749,3508,785],{},[749,3510,3511],{},"_",[749,3513,3514],{},"-",", at most 100 characters. The choices are stored under it.",[771,3517,3518,3521,3522,3524,3525,3527,3528,785],{},[749,3519,3520],{},"defaults"," says what applies until the user chooses, one boolean per channel. All three are required. A user's\nchoices store only the channels they changed; every other channel of the topic follows ",[749,3523,3520],{},", so changing a\ndefault later reaches everyone who never touched that channel. Keep ",[749,3526,3477],{}," off by default: a text costs money and goes\nonly to people who turned it on. Every topic of the platform's modules does so, so an SMS reaches a user only after\nthey chose it on the ",[742,3529,3531],{"href":3530},"\u002Fmodules\u002Fidentity\u002Fpreferences#notification-channels","account page",[771,3533,3534,3537],{},[749,3535,3536],{},"channels"," lists the channels the topic offers (all three when left out). A channel it does not offer is never sent.",[771,3539,3540,1481,3543,3546,3547,1481,3550,3553],{},[749,3541,3542],{},"label",[749,3544,3545],{},"description"," are a text or one text per locale; ",[749,3548,3549],{},"labelKey",[749,3551,3552],{},"descriptionKey"," name i18n keys tried\nfirst.",[738,3555,3556],{},"The order between modules does not matter: the registry is read once every module is set up. A topic registered again\nunder the same id replaces the earlier one. A malformed topic fails the build.",[875,3558,3560],{"id":3559},"send","Send",[880,3562,3564],{"className":919,"code":3563,"language":921,"meta":885,"style":885},"const result = await notifyUser(userId, {\n  topic: 'shifts.reminder',\n  email: { subject: 'Shift tomorrow', body: '\u003Cp>You work at 18:00.\u003C\u002Fp>', template: { name: 'shifts-reminder', props } }, \u002F\u002F also text, from, replyTo, headers, meta\n  sms: { body: { da: 'Vagt i morgen kl. 18', en: 'Shift tomorrow at 18:00' } },\n  push: { title: 'Shift tomorrow', body: 'You work at 18:00.', url: '\u002Fshifts\u002F1' },\n})\n\u002F\u002F { channels: ['email', 'push'], skipped: { sms: 'disabled' } }\n",[749,3565,3566,3589,3604,3672,3715,3764,3770],{"__ignoreMap":885},[889,3567,3568,3570,3573,3576,3579,3582,3585,3587],{"class":891,"line":892},[889,3569,2993],{"class":2147},[889,3571,3572],{"class":939}," result ",[889,3574,3575],{"class":943},"=",[889,3577,3578],{"class":928}," await",[889,3580,3581],{"class":935}," notifyUser",[889,3583,3584],{"class":939},"(userId",[889,3586,1962],{"class":943},[889,3588,980],{"class":943},[889,3590,3591,3594,3596,3598,3600,3602],{"class":891,"line":947},[889,3592,3593],{"class":950},"  topic",[889,3595,954],{"class":943},[889,3597,999],{"class":943},[889,3599,3342],{"class":899},[889,3601,960],{"class":943},[889,3603,847],{"class":943},[889,3605,3606,3609,3611,3613,3616,3618,3620,3623,3625,3627,3630,3632,3634,3637,3639,3641,3644,3646,3648,3650,3652,3654,3657,3659,3661,3664,3666,3669],{"class":891,"line":972},[889,3607,3608],{"class":950},"  email",[889,3610,954],{"class":943},[889,3612,991],{"class":943},[889,3614,3615],{"class":950}," subject",[889,3617,954],{"class":943},[889,3619,999],{"class":943},[889,3621,3622],{"class":899},"Shift tomorrow",[889,3624,960],{"class":943},[889,3626,1962],{"class":943},[889,3628,3629],{"class":950}," body",[889,3631,954],{"class":943},[889,3633,999],{"class":943},[889,3635,3636],{"class":899},"\u003Cp>You work at 18:00.\u003C\u002Fp>",[889,3638,960],{"class":943},[889,3640,1962],{"class":943},[889,3642,3643],{"class":950}," template",[889,3645,954],{"class":943},[889,3647,991],{"class":943},[889,3649,2314],{"class":950},[889,3651,954],{"class":943},[889,3653,999],{"class":943},[889,3655,3656],{"class":899},"shifts-reminder",[889,3658,960],{"class":943},[889,3660,1962],{"class":943},[889,3662,3663],{"class":939}," props ",[889,3665,1064],{"class":943},[889,3667,3668],{"class":943}," },",[889,3670,3671],{"class":2199}," \u002F\u002F also text, from, replyTo, headers, meta\n",[889,3673,3674,3677,3679,3681,3683,3685,3687,3689,3691,3693,3696,3698,3700,3702,3704,3706,3709,3711,3713],{"class":891,"line":983},[889,3675,3676],{"class":950},"  sms",[889,3678,954],{"class":943},[889,3680,991],{"class":943},[889,3682,3629],{"class":950},[889,3684,954],{"class":943},[889,3686,991],{"class":943},[889,3688,1950],{"class":950},[889,3690,954],{"class":943},[889,3692,999],{"class":943},[889,3694,3695],{"class":899},"Vagt i morgen kl. 18",[889,3697,960],{"class":943},[889,3699,1962],{"class":943},[889,3701,1965],{"class":950},[889,3703,954],{"class":943},[889,3705,999],{"class":943},[889,3707,3708],{"class":899},"Shift tomorrow at 18:00",[889,3710,960],{"class":943},[889,3712,2742],{"class":943},[889,3714,1007],{"class":943},[889,3716,3717,3720,3722,3724,3727,3729,3731,3733,3735,3737,3739,3741,3743,3746,3748,3750,3753,3755,3757,3760,3762],{"class":891,"line":1010},[889,3718,3719],{"class":950},"  push",[889,3721,954],{"class":943},[889,3723,991],{"class":943},[889,3725,3726],{"class":950}," title",[889,3728,954],{"class":943},[889,3730,999],{"class":943},[889,3732,3622],{"class":899},[889,3734,960],{"class":943},[889,3736,1962],{"class":943},[889,3738,3629],{"class":950},[889,3740,954],{"class":943},[889,3742,999],{"class":943},[889,3744,3745],{"class":899},"You work at 18:00.",[889,3747,960],{"class":943},[889,3749,1962],{"class":943},[889,3751,3752],{"class":950}," url",[889,3754,954],{"class":943},[889,3756,999],{"class":943},[889,3758,3759],{"class":899},"\u002Fshifts\u002F1",[889,3761,960],{"class":943},[889,3763,1007],{"class":943},[889,3765,3766,3768],{"class":891,"line":1033},[889,3767,1064],{"class":943},[889,3769,1067],{"class":939},[889,3771,3772],{"class":891,"line":1055},[889,3773,3774],{"class":2199},"\u002F\u002F { channels: ['email', 'push'], skipped: { sms: 'disabled' } }\n",[738,3776,3777,3778,836,3780,3783,3784,3787,3788,842,3791,3794,3795,3798,3799,3801],{},"A channel goes out when the topic offers it, the user's choice (or the topic's default) has it on, you gave content for\nit and the user can be reached on it. The email goes to the user's address, the SMS to their number, and the push to\ntheir devices through ",[749,3779,1648],{},[749,3781,3782],{},"skipped"," says why a channel did not go out: ",[749,3785,3786],{},"disabled"," (off for the\ntopic), ",[749,3789,3790],{},"no_content",[749,3792,3793],{},"unavailable"," (no address, no number, no device took the push) or ",[749,3796,3797],{},"failed",". A driver that reports\nnothing, such as ",[749,3800,791],{},", counts as sent.",[738,3803,3804,3805,3807,3808,1328,3811,3814,3815,3817],{},"An error on one channel is logged and does not stop the others; ",[749,3806,806],{}," does not throw for it. An unknown topic\nthrows, and so does a store that fails: when ",[749,3809,3810],{},"findRecipient",[749,3812,3813],{},"readChoices"," throws (a database error), ",[749,3816,806],{},"\nrejects before any channel is sent, rather than send on defaults the user may have turned off. Catch and log it where\nyou call it from a hook or a task, so your own work goes on.",[875,3819,3821],{"id":3820},"where-contacts-and-choices-come-from","Where contacts and choices come from",[738,3823,3824,3825,3827],{},"Notify stores neither. Two modules register them, and Notify reads them through these interfaces (exported from\n",[749,3826,2132],{},"):",[1122,3829,3830,3848],{},[1125,3831,3832],{},[1128,3833,3834,3836,3839,3845],{},[1131,3835,397],{},[1131,3837,3838],{},"Registered by",[1131,3840,3841,3842],{},"With ",[749,3843,3844],{},"setX(nuxt, path)",[1131,3846,3847],{},"Without one",[1144,3849,3850,3882],{},[1128,3851,3852,3868,3872,3877],{},[1149,3853,3854,3857,3858,3861,3862,1328,3865],{},[749,3855,3856],{},"NotifyRecipientStore",": ",[749,3859,3860],{},"findRecipient(userId)"," answers ",[749,3863,3864],{},"{ email, phone, locale }",[749,3866,3867],{},"null",[1149,3869,3870],{},[742,3871,199],{"href":200},[1149,3873,3874],{},[749,3875,3876],{},"setNotifyRecipientStore",[1149,3878,3879,3881],{},[749,3880,806],{}," sends nothing and logs a warning.",[1128,3883,3884,3900,3904,3909],{},[1149,3885,3886,3857,3889,842,3892,3895,3896,3899],{},[749,3887,3888],{},"NotifyChoicesStore",[749,3890,3891],{},"readChoices(userId)",[749,3893,3894],{},"writeChoices(userId, choices)","; ",[749,3897,3898],{},"writeChoices"," merges the channels given per channel into what it reads right before writing",[1149,3901,3902],{},[742,3903,229],{"href":230},[1149,3905,3906],{},[749,3907,3908],{},"setNotifyChoicesStore",[1149,3910,3911],{},"The topics' defaults apply to everyone, and choices cannot be saved.",[738,3913,3914,3917,3918,3921],{},[749,3915,3916],{},"path"," is a file whose default export is the store. The first registration wins. The recipient's ",[749,3919,3920],{},"locale"," picks the SMS\ntext and fills in the email template's locale when it has none.",[763,3923,242],{"id":3924},"hooks",[738,3926,3927,3928,785],{},"A renderer such as Email Templates listens to these ",[742,3929,3924],{"href":91},[1122,3931,3932,3945],{},[1125,3933,3934],{},[1128,3935,3936,3939,3942],{},[1131,3937,3938],{},"Hook",[1131,3940,3941],{},"When",[1131,3943,3944],{},"Payload",[1144,3946,3947,3963],{},[1128,3948,3949,3954,3957],{},[1149,3950,3951,3953],{},[749,3952,2053],{}," (Nitro)",[1149,3955,3956],{},"An email is about to go to the driver.",[1149,3958,3959,3962],{},[749,3960,3961],{},"{ notification }",", replaceable",[1128,3964,3965,3971,3974],{},[1149,3966,3967,3970],{},[749,3968,3969],{},"notify:email:templates"," (Nuxt)",[1149,3972,3973],{},"A renderer collects the template folders that modules ship.",[1149,3975,3976,3979,3980],{},[749,3977,3978],{},"EmailTemplateSource[]",": push ",[749,3981,3982],{},"{ dir }",[763,3984,3986],{"id":3985},"next-steps","Next steps",[768,3988,3989,3994,3999],{},[771,3990,3991,3993],{},[742,3992,360],{"href":361}," – render your emails from Vue components with your branding.",[771,3995,3996,3998],{},[742,3997,604],{"href":605}," – send your first email from a server route.",[771,4000,4001,4003],{},[742,4002,45],{"href":46}," – set the driver's secrets on your hosting platform.",[4005,4006,4007],"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 .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}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 .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .sfNiH, html code.shiki .sfNiH{--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC}",{"title":885,"searchDepth":947,"depth":947,"links":4009},[4010,4011,4017,4021,4028,4033,4034],{"id":765,"depth":947,"text":766},{"id":869,"depth":947,"text":870,"children":4012},[4013,4014,4016],{"id":877,"depth":972,"text":878},{"id":906,"depth":972,"text":4015},"Configure it in nuxt.config.ts",{"id":1081,"depth":972,"text":1082},{"id":1112,"depth":947,"text":1113,"children":4018},[4019,4020],{"id":1278,"depth":972,"text":1093},{"id":1459,"depth":972,"text":1460},{"id":1588,"depth":947,"text":1589,"children":4022},[4023,4024,4025,4026,4027],{"id":2057,"depth":972,"text":377},{"id":2102,"depth":972,"text":2103},{"id":2125,"depth":972,"text":2126},{"id":2950,"depth":972,"text":2951},{"id":3166,"depth":972,"text":3167},{"id":3195,"depth":947,"text":811,"children":4029},[4030,4031,4032],{"id":3270,"depth":972,"text":3271},{"id":3559,"depth":972,"text":3560},{"id":3820,"depth":972,"text":3821},{"id":3924,"depth":947,"text":242},{"id":3985,"depth":947,"text":3986},"Send email, SMS, push and simple notifications from any module, with the delivery service chosen once by your app.","md",null,{},{"title":356,"description":4035},"gAa6PAZuQIeBwgzfdwzExxYFmgiBH61YerczII1jogI",[4042,4044],{"title":347,"path":348,"stem":349,"description":4043,"children":-1},"Let AI agents use your app on a user's behalf, seeing only the tools and data that user's token allows.",{"title":177,"path":361,"stem":362,"description":4045,"children":-1},"Design your app's emails, and the emails modules send, as Vue components with your own branding.",1796157340819]