[{"data":1,"prerenderedAt":1539},["ShallowReactive",2],{"docs:/docs/high-level-sdks/notify":3},{"id":4,"title":5,"body":6,"description":17,"extension":1533,"meta":1534,"navigation":219,"path":1535,"seo":1536,"stem":1537,"__hash__":1538},"docs/docs/high-level-sdks/notify.md","Notify SDK",{"type":7,"value":8,"toc":1519},"minimark",[9,14,18,23,45,50,72,76,101,139,148,178,351,355,379,402,406,927,931,934,937,942,1062,1173,1177,1295,1298,1305,1425,1458,1462,1515],[10,11,13],"h1",{"id":12},"nolagnotify","@nolag/notify",[15,16,17],"p",{},"Real-time notifications with channels, read/unread tracking, and badge counts.",[19,20,22],"h2",{"id":21},"overview","Overview",[15,24,25,28,29,32,33,36,37,40,41,44],{},[26,27,13],"code",{}," delivers real-time notifications to your users with full read/unread lifecycle management. Notifications are organised into channels (logical groupings like ",[26,30,31],{},"'alerts'",", ",[26,34,35],{},"'mentions'",", or ",[26,38,39],{},"'system'",") and each channel tracks its own unread count independently. Your app owns one core NoLag client and injects it into ",[26,42,43],{},"NoLagNotify","; the wrapper attaches its behaviour to that connection.",[46,47,49],"h3",{"id":48},"key-features","Key Features",[51,52,53,57,60,63,66,69],"ul",{},[54,55,56],"li",{},"Channel-based notification delivery with independent unread counts",[54,58,59],{},"Per-notification and bulk read/unread tracking",[54,61,62],{},"Global badge counts aggregated across all subscribed channels",[54,64,65],{},"Rich notification payloads with title, body, icon, and custom data",[54,67,68],{},"Per-user or per-segment delivery through subscription filters",[54,70,71],{},"Automatic reconnection with channel subscriptions restored",[19,73,75],{"id":74},"how-it-works","How It Works",[15,77,78,80,81,84,85,88,89,92,93,96,97,100],{},[26,79,43],{}," attaches to an injected ",[26,82,83],{},"@nolag/js-sdk"," client. Each channel you subscribe to creates a ",[26,86,87],{},"NotifyChannel"," instance that subscribes to two topics: ",[26,90,91],{},"notifications"," for notification delivery and ",[26,94,95],{},"_read"," for read-receipt signals. A ",[26,98,99],{},"NotificationStore"," inside each channel accumulates notifications and tracks read state, while the main class aggregates badge counts across all channels. The app owns the socket lifecycle; the wrapper never opens or closes it.",[102,103,104,117],"table",{},[105,106,107],"thead",{},[108,109,110,114],"tr",{},[111,112,113],"th",{},"Topic",[111,115,116],{},"Purpose",[118,119,120,130],"tbody",{},[108,121,122,127],{},[123,124,125],"td",{},[26,126,91],{},[123,128,129],{},"Notification payloads: title, body, icon, and custom data",[108,131,132,136],{},[123,133,134],{},[26,135,95],{},[123,137,138],{},"Read receipt signals",[15,140,141,142,147],{},"A notification reaches the users who are connected and subscribed when it is published. A fresh subscribe or an ordinary reconnect never replays history; see ",[143,144,146],"a",{"href":145},"/docs/concepts/replay","Replay"," for the one case where the broker replays messages.",[149,150,152],"callout",{"type":151},"info",[15,153,154,158,159,162,163,32,166,169,170,173,174,177],{},[155,156,157],"strong",{},"Before you start."," Create an app from the ",[26,160,161],{},"nolag-notify-sdk"," blueprint. That seeds the rooms this SDK expects (",[26,164,165],{},"alerts",[26,167,168],{},"updates",") and the ",[26,171,172],{},"online"," lobby, and returns an app slug with a random suffix. That slug is the ",[26,175,176],{},"appName"," you pass to the wrapper. You can also do this in the portal: Apps, New App, pick the blueprint.",[179,180,181],"code-tabs",{},[182,183,189],"pre",{"className":184,"code":185,"filename":186,"language":187,"meta":188,"style":188},"language-typescript shiki shiki-themes github-light github-dark","import { NoLagApi } from \"@nolag/js-sdk\";\n\nconst api = new NoLagApi(process.env.NOLAG_API_KEY); // nlg_live_...\nconst app = await api.apps.create({ name: \"My App\", blueprintId: \"nolag-notify-sdk\" });\nconsole.log(app.slug); // e.g. \"my-app-a3f9\": this is your appName\n\nconst actor = await api.actors.create({ name: \"web-client\", actorType: \"user\" });\nconsole.log(actor.accessToken); // shown once; keep it\n","Setup (server side, once)","typescript","",[26,190,191,214,221,254,288,303,308,338],{"__ignoreMap":188},[192,193,196,200,204,207,211],"span",{"class":194,"line":195},"line",1,[192,197,199],{"class":198},"szBVR","import",[192,201,203],{"class":202},"sVt8B"," { NoLagApi } ",[192,205,206],{"class":198},"from",[192,208,210],{"class":209},"sZZnC"," \"@nolag/js-sdk\"",[192,212,213],{"class":202},";\n",[192,215,217],{"class":194,"line":216},2,[192,218,220],{"emptyLinePlaceholder":219},true,"\n",[192,222,224,227,231,234,237,241,244,247,250],{"class":194,"line":223},3,[192,225,226],{"class":198},"const",[192,228,230],{"class":229},"sj4cs"," api",[192,232,233],{"class":198}," =",[192,235,236],{"class":198}," new",[192,238,240],{"class":239},"sScJk"," NoLagApi",[192,242,243],{"class":202},"(process.env.",[192,245,246],{"class":229},"NOLAG_API_KEY",[192,248,249],{"class":202},"); ",[192,251,253],{"class":252},"sJ8bj","// nlg_live_...\n",[192,255,257,259,262,264,267,270,273,276,279,282,285],{"class":194,"line":256},4,[192,258,226],{"class":198},[192,260,261],{"class":229}," app",[192,263,233],{"class":198},[192,265,266],{"class":198}," await",[192,268,269],{"class":202}," api.apps.",[192,271,272],{"class":239},"create",[192,274,275],{"class":202},"({ name: ",[192,277,278],{"class":209},"\"My App\"",[192,280,281],{"class":202},", blueprintId: ",[192,283,284],{"class":209},"\"nolag-notify-sdk\"",[192,286,287],{"class":202}," });\n",[192,289,291,294,297,300],{"class":194,"line":290},5,[192,292,293],{"class":202},"console.",[192,295,296],{"class":239},"log",[192,298,299],{"class":202},"(app.slug); ",[192,301,302],{"class":252},"// e.g. \"my-app-a3f9\": this is your appName\n",[192,304,306],{"class":194,"line":305},6,[192,307,220],{"emptyLinePlaceholder":219},[192,309,311,313,316,318,320,323,325,327,330,333,336],{"class":194,"line":310},7,[192,312,226],{"class":198},[192,314,315],{"class":229}," actor",[192,317,233],{"class":198},[192,319,266],{"class":198},[192,321,322],{"class":202}," api.actors.",[192,324,272],{"class":239},[192,326,275],{"class":202},[192,328,329],{"class":209},"\"web-client\"",[192,331,332],{"class":202},", actorType: ",[192,334,335],{"class":209},"\"user\"",[192,337,287],{"class":202},[192,339,341,343,345,348],{"class":194,"line":340},8,[192,342,293],{"class":202},[192,344,296],{"class":239},[192,346,347],{"class":202},"(actor.accessToken); ",[192,349,350],{"class":252},"// shown once; keep it\n",[19,352,354],{"id":353},"installation","Installation",[179,356,357],{},[182,358,363],{"className":359,"code":360,"filename":361,"language":362,"meta":188,"style":188},"language-bash shiki shiki-themes github-light github-dark","npm install @nolag/notify @nolag/js-sdk\n","Terminal","bash",[26,364,365],{"__ignoreMap":188},[192,366,367,370,373,376],{"class":194,"line":195},[192,368,369],{"class":239},"npm",[192,371,372],{"class":209}," install",[192,374,375],{"class":209}," @nolag/notify",[192,377,378],{"class":209}," @nolag/js-sdk\n",[149,380,381],{"type":151},[15,382,383,386,387,389,390,393,394,397,398,401],{},[155,384,385],{},"Shared connection."," One core NoLag client can back several wrapper SDKs at once, for example notify, chat, and a dashboard on a single socket, as long as each wrapper uses a distinct ",[26,388,176],{},". Each wrapper attaches its handlers on construction and releases them with ",[26,391,392],{},"detach()",", and never touches the socket itself. Your app owns ",[26,395,396],{},"connect()"," and ",[26,399,400],{},"disconnect()",".",[19,403,405],{"id":404},"quick-start","Quick Start",[179,407,408],{},[182,409,412],{"className":184,"code":410,"filename":411,"language":187,"meta":188,"style":188},"import { NoLag } from '@nolag/js-sdk'\nimport { NoLagNotify } from '@nolag/notify'\n\n// The app owns one core client. In a browser, pass a token provider so the\n// SDK can mint fresh short-lived client tokens from your backend.\nconst client = NoLag(async () => (await (await fetch('/api/nolag-token')).json()).token)\n\n// Inject the client into the notify wrapper\nconst notify = new NoLagNotify({\n  client,\n  appName: APP_SLUG, // the slug returned when you created the app\n  metadata: { name: 'Alice' },\n})\n\nawait client.connect()   // the app owns the connection\nawait notify.ready()     // wrapper setup complete\n\n// Subscribe to a seeded channel\nconst channel = notify.subscribe('alerts')\n\n// Listen for new notifications and mark each one read once it is shown\nchannel.on('notification', (n) => {\n  console.log(`[${n.title}]: ${n.body}`)\n  console.log('Unread:', channel.getUnread().length)\n  channel.markRead(n.id)\n})\n\n// Mark everything in the channel as read\nchannel.markAllRead()\n\n// Get global badge counts across all channels\nconst badges = notify.getBadgeCounts()\nconsole.log('Total unread:', badges.total, badges.byChannel)\n\n// Mark all channels read at once\nnotify.markAllRead()\n\n// Publish a notification (typically from a server-side actor on the same app).\n// Publishers never receive their own notifications back, so the sender's\n// local store and badge counts are not updated by its own send.\nchannel.send('Deploy finished', { body: 'v2.4.0 is live', data: { version: '2.4.0' } })\n\n// Teardown: the wrapper releases its handlers; the app closes the socket.\nnotify.detach()\nclient.disconnect()\n","TypeScript",[26,413,414,426,438,442,447,452,503,507,512,530,536,550,562,568,573,590,607,612,618,640,645,651,680,715,741,753,758,763,769,780,785,791,808,823,828,834,844,849,855,861,867,895,900,906,916],{"__ignoreMap":188},[192,415,416,418,421,423],{"class":194,"line":195},[192,417,199],{"class":198},[192,419,420],{"class":202}," { NoLag } ",[192,422,206],{"class":198},[192,424,425],{"class":209}," '@nolag/js-sdk'\n",[192,427,428,430,433,435],{"class":194,"line":216},[192,429,199],{"class":198},[192,431,432],{"class":202}," { NoLagNotify } ",[192,434,206],{"class":198},[192,436,437],{"class":209}," '@nolag/notify'\n",[192,439,440],{"class":194,"line":223},[192,441,220],{"emptyLinePlaceholder":219},[192,443,444],{"class":194,"line":256},[192,445,446],{"class":252},"// The app owns one core client. In a browser, pass a token provider so the\n",[192,448,449],{"class":194,"line":290},[192,450,451],{"class":252},"// SDK can mint fresh short-lived client tokens from your backend.\n",[192,453,454,456,459,461,464,467,470,473,476,479,482,484,486,489,491,494,497,500],{"class":194,"line":305},[192,455,226],{"class":198},[192,457,458],{"class":229}," client",[192,460,233],{"class":198},[192,462,463],{"class":239}," NoLag",[192,465,466],{"class":202},"(",[192,468,469],{"class":198},"async",[192,471,472],{"class":202}," () ",[192,474,475],{"class":198},"=>",[192,477,478],{"class":202}," (",[192,480,481],{"class":198},"await",[192,483,478],{"class":202},[192,485,481],{"class":198},[192,487,488],{"class":239}," fetch",[192,490,466],{"class":202},[192,492,493],{"class":209},"'/api/nolag-token'",[192,495,496],{"class":202},")).",[192,498,499],{"class":239},"json",[192,501,502],{"class":202},"()).token)\n",[192,504,505],{"class":194,"line":310},[192,506,220],{"emptyLinePlaceholder":219},[192,508,509],{"class":194,"line":340},[192,510,511],{"class":252},"// Inject the client into the notify wrapper\n",[192,513,515,517,520,522,524,527],{"class":194,"line":514},9,[192,516,226],{"class":198},[192,518,519],{"class":229}," notify",[192,521,233],{"class":198},[192,523,236],{"class":198},[192,525,526],{"class":239}," NoLagNotify",[192,528,529],{"class":202},"({\n",[192,531,533],{"class":194,"line":532},10,[192,534,535],{"class":202},"  client,\n",[192,537,539,542,545,547],{"class":194,"line":538},11,[192,540,541],{"class":202},"  appName: ",[192,543,544],{"class":229},"APP_SLUG",[192,546,32],{"class":202},[192,548,549],{"class":252},"// the slug returned when you created the app\n",[192,551,553,556,559],{"class":194,"line":552},12,[192,554,555],{"class":202},"  metadata: { name: ",[192,557,558],{"class":209},"'Alice'",[192,560,561],{"class":202}," },\n",[192,563,565],{"class":194,"line":564},13,[192,566,567],{"class":202},"})\n",[192,569,571],{"class":194,"line":570},14,[192,572,220],{"emptyLinePlaceholder":219},[192,574,576,578,581,584,587],{"class":194,"line":575},15,[192,577,481],{"class":198},[192,579,580],{"class":202}," client.",[192,582,583],{"class":239},"connect",[192,585,586],{"class":202},"()   ",[192,588,589],{"class":252},"// the app owns the connection\n",[192,591,593,595,598,601,604],{"class":194,"line":592},16,[192,594,481],{"class":198},[192,596,597],{"class":202}," notify.",[192,599,600],{"class":239},"ready",[192,602,603],{"class":202},"()     ",[192,605,606],{"class":252},"// wrapper setup complete\n",[192,608,610],{"class":194,"line":609},17,[192,611,220],{"emptyLinePlaceholder":219},[192,613,615],{"class":194,"line":614},18,[192,616,617],{"class":252},"// Subscribe to a seeded channel\n",[192,619,621,623,626,628,630,633,635,637],{"class":194,"line":620},19,[192,622,226],{"class":198},[192,624,625],{"class":229}," channel",[192,627,233],{"class":198},[192,629,597],{"class":202},[192,631,632],{"class":239},"subscribe",[192,634,466],{"class":202},[192,636,31],{"class":209},[192,638,639],{"class":202},")\n",[192,641,643],{"class":194,"line":642},20,[192,644,220],{"emptyLinePlaceholder":219},[192,646,648],{"class":194,"line":647},21,[192,649,650],{"class":252},"// Listen for new notifications and mark each one read once it is shown\n",[192,652,654,657,660,662,665,668,672,675,677],{"class":194,"line":653},22,[192,655,656],{"class":202},"channel.",[192,658,659],{"class":239},"on",[192,661,466],{"class":202},[192,663,664],{"class":209},"'notification'",[192,666,667],{"class":202},", (",[192,669,671],{"class":670},"s4XuR","n",[192,673,674],{"class":202},") ",[192,676,475],{"class":198},[192,678,679],{"class":202}," {\n",[192,681,683,686,688,690,693,695,697,700,703,705,707,710,713],{"class":194,"line":682},23,[192,684,685],{"class":202},"  console.",[192,687,296],{"class":239},[192,689,466],{"class":202},[192,691,692],{"class":209},"`[${",[192,694,671],{"class":202},[192,696,401],{"class":209},[192,698,699],{"class":202},"title",[192,701,702],{"class":209},"}]: ${",[192,704,671],{"class":202},[192,706,401],{"class":209},[192,708,709],{"class":202},"body",[192,711,712],{"class":209},"}`",[192,714,639],{"class":202},[192,716,718,720,722,724,727,730,733,736,739],{"class":194,"line":717},24,[192,719,685],{"class":202},[192,721,296],{"class":239},[192,723,466],{"class":202},[192,725,726],{"class":209},"'Unread:'",[192,728,729],{"class":202},", channel.",[192,731,732],{"class":239},"getUnread",[192,734,735],{"class":202},"().",[192,737,738],{"class":229},"length",[192,740,639],{"class":202},[192,742,744,747,750],{"class":194,"line":743},25,[192,745,746],{"class":202},"  channel.",[192,748,749],{"class":239},"markRead",[192,751,752],{"class":202},"(n.id)\n",[192,754,756],{"class":194,"line":755},26,[192,757,567],{"class":202},[192,759,761],{"class":194,"line":760},27,[192,762,220],{"emptyLinePlaceholder":219},[192,764,766],{"class":194,"line":765},28,[192,767,768],{"class":252},"// Mark everything in the channel as read\n",[192,770,772,774,777],{"class":194,"line":771},29,[192,773,656],{"class":202},[192,775,776],{"class":239},"markAllRead",[192,778,779],{"class":202},"()\n",[192,781,783],{"class":194,"line":782},30,[192,784,220],{"emptyLinePlaceholder":219},[192,786,788],{"class":194,"line":787},31,[192,789,790],{"class":252},"// Get global badge counts across all channels\n",[192,792,794,796,799,801,803,806],{"class":194,"line":793},32,[192,795,226],{"class":198},[192,797,798],{"class":229}," badges",[192,800,233],{"class":198},[192,802,597],{"class":202},[192,804,805],{"class":239},"getBadgeCounts",[192,807,779],{"class":202},[192,809,811,813,815,817,820],{"class":194,"line":810},33,[192,812,293],{"class":202},[192,814,296],{"class":239},[192,816,466],{"class":202},[192,818,819],{"class":209},"'Total unread:'",[192,821,822],{"class":202},", badges.total, badges.byChannel)\n",[192,824,826],{"class":194,"line":825},34,[192,827,220],{"emptyLinePlaceholder":219},[192,829,831],{"class":194,"line":830},35,[192,832,833],{"class":252},"// Mark all channels read at once\n",[192,835,837,840,842],{"class":194,"line":836},36,[192,838,839],{"class":202},"notify.",[192,841,776],{"class":239},[192,843,779],{"class":202},[192,845,847],{"class":194,"line":846},37,[192,848,220],{"emptyLinePlaceholder":219},[192,850,852],{"class":194,"line":851},38,[192,853,854],{"class":252},"// Publish a notification (typically from a server-side actor on the same app).\n",[192,856,858],{"class":194,"line":857},39,[192,859,860],{"class":252},"// Publishers never receive their own notifications back, so the sender's\n",[192,862,864],{"class":194,"line":863},40,[192,865,866],{"class":252},"// local store and badge counts are not updated by its own send.\n",[192,868,870,872,875,877,880,883,886,889,892],{"class":194,"line":869},41,[192,871,656],{"class":202},[192,873,874],{"class":239},"send",[192,876,466],{"class":202},[192,878,879],{"class":209},"'Deploy finished'",[192,881,882],{"class":202},", { body: ",[192,884,885],{"class":209},"'v2.4.0 is live'",[192,887,888],{"class":202},", data: { version: ",[192,890,891],{"class":209},"'2.4.0'",[192,893,894],{"class":202}," } })\n",[192,896,898],{"class":194,"line":897},42,[192,899,220],{"emptyLinePlaceholder":219},[192,901,903],{"class":194,"line":902},43,[192,904,905],{"class":252},"// Teardown: the wrapper releases its handlers; the app closes the socket.\n",[192,907,909,911,914],{"class":194,"line":908},44,[192,910,839],{"class":202},[192,912,913],{"class":239},"detach",[192,915,779],{"class":202},[192,917,919,922,925],{"class":194,"line":918},45,[192,920,921],{"class":202},"client.",[192,923,924],{"class":239},"disconnect",[192,926,779],{"class":202},[19,928,930],{"id":929},"api-reference","API Reference",[46,932,43],{"id":933},"nolagnotify-1",[15,935,936],{},"The main class. Attaches to the injected core client, manages channel subscriptions, and global badge counts.",[938,939,941],"h4",{"id":940},"constructor-options","Constructor Options",[102,943,944,957],{},[105,945,946],{},[108,947,948,951,954],{},[111,949,950],{},"Option",[111,952,953],{},"Type",[111,955,956],{},"Description",[118,958,959,977,992,1010,1025,1044],{},[108,960,961,966,971],{},[123,962,963],{},[26,964,965],{},"client",[123,967,968],{},[26,969,970],{},"NoLagSocket",[123,972,973,976],{},[155,974,975],{},"Required."," The injected core NoLag client the app owns and connects.",[108,978,979,984,989],{},[123,980,981],{},[26,982,983],{},"metadata",[123,985,986],{},[26,987,988],{},"Record\u003Cstring, unknown>",[123,990,991],{},"Optional custom user data attached to presence.",[108,993,994,998,1003],{},[123,995,996],{},[26,997,176],{},[123,999,1000],{},[26,1001,1002],{},"string",[123,1004,1005,1006,1009],{},"The app slug returned when you created the app (default ",[26,1007,1008],{},"'notify'",", which only works if an app with exactly that slug exists).",[108,1011,1012,1017,1022],{},[123,1013,1014],{},[26,1015,1016],{},"channels",[123,1018,1019],{},[26,1020,1021],{},"string[]",[123,1023,1024],{},"Channels to subscribe to once the wrapper is ready.",[108,1026,1027,1032,1037],{},[123,1028,1029],{},[26,1030,1031],{},"maxNotificationCache",[123,1033,1034],{},[26,1035,1036],{},"number",[123,1038,1039,1040,1043],{},"Max notifications kept in memory per channel (default ",[26,1041,1042],{},"500",").",[108,1045,1046,1051,1056],{},[123,1047,1048],{},[26,1049,1050],{},"debug",[123,1052,1053],{},[26,1054,1055],{},"boolean",[123,1057,1058,1059,1043],{},"Enable wrapper debug logging (default ",[26,1060,1061],{},"false",[102,1063,1064,1076],{},[105,1065,1066],{},[108,1067,1068,1071,1074],{},[111,1069,1070],{},"Method",[111,1072,1073],{},"Returns",[111,1075,956],{},[118,1077,1078,1093,1107,1127,1141,1159],{},[108,1079,1080,1085,1090],{},[123,1081,1082],{},[26,1083,1084],{},"ready()",[123,1086,1087],{},[26,1088,1089],{},"Promise\u003Cvoid>",[123,1091,1092],{},"Resolves once wrapper setup completed",[108,1094,1095,1099,1104],{},[123,1096,1097],{},[26,1098,392],{},[123,1100,1101],{},[26,1102,1103],{},"void",[123,1105,1106],{},"Release this wrapper's handlers and topics; terminal, never closes the socket",[108,1108,1109,1114,1118],{},[123,1110,1111],{},[26,1112,1113],{},"subscribe(channel, opts?)",[123,1115,1116],{},[26,1117,87],{},[123,1119,1120,1121,1124,1125],{},"Subscribe to a notification channel; ",[26,1122,1123],{},"opts.filters"," limits delivery to matching notifications; throws before ",[26,1126,1084],{},[108,1128,1129,1134,1138],{},[123,1130,1131],{},[26,1132,1133],{},"unsubscribe(channel)",[123,1135,1136],{},[26,1137,1103],{},[123,1139,1140],{},"Unsubscribe from a channel and remove it from badge tracking",[108,1142,1143,1148,1153],{},[123,1144,1145],{},[26,1146,1147],{},"getBadgeCounts()",[123,1149,1150],{},[26,1151,1152],{},"BadgeCounts",[123,1154,1155,1158],{},[26,1156,1157],{},"{ total, byChannel }",": unread counts per subscribed channel plus the aggregate",[108,1160,1161,1166,1170],{},[123,1162,1163],{},[26,1164,1165],{},"markAllRead()",[123,1167,1168],{},[26,1169,1103],{},[123,1171,1172],{},"Mark all notifications across all subscribed channels as read",[46,1174,1176],{"id":1175},"events-nolagnotify","Events: NoLagNotify",[102,1178,1179,1191],{},[105,1180,1181],{},[108,1182,1183,1186,1189],{},[111,1184,1185],{},"Event",[111,1187,1188],{},"Payload",[111,1190,956],{},[118,1192,1193,1206,1221,1233,1245,1260,1279],{},[108,1194,1195,1200,1203],{},[123,1196,1197],{},[26,1198,1199],{},"connected",[123,1201,1202],{},"none",[123,1204,1205],{},"Wrapper setup completed on a fresh connection",[108,1207,1208,1213,1218],{},[123,1209,1210],{},[26,1211,1212],{},"disconnected",[123,1214,1215],{},[26,1216,1217],{},"reason: string",[123,1219,1220],{},"Connection closed",[108,1222,1223,1228,1230],{},[123,1224,1225],{},[26,1226,1227],{},"reconnecting",[123,1229,1202],{},[123,1231,1232],{},"The client is attempting to reconnect",[108,1234,1235,1240,1242],{},[123,1236,1237],{},[26,1238,1239],{},"reconnected",[123,1241,1202],{},[123,1243,1244],{},"Reconnection successful; channels are restored automatically",[108,1246,1247,1252,1257],{},[123,1248,1249],{},[26,1250,1251],{},"error",[123,1253,1254],{},[26,1255,1256],{},"error: Error",[123,1258,1259],{},"Unrecoverable error occurred",[108,1261,1262,1267,1272],{},[123,1263,1264],{},[26,1265,1266],{},"notification",[123,1268,1269],{},[26,1270,1271],{},"Notification",[123,1273,1274,1275,1278],{},"A new notification arrived on any subscribed channel (",[26,1276,1277],{},"notification.channel"," says which)",[108,1280,1281,1286,1290],{},[123,1282,1283],{},[26,1284,1285],{},"badgeUpdated",[123,1287,1288],{},[26,1289,1152],{},[123,1291,1292,1293],{},"Unread counts changed; ",[26,1294,1157],{},[46,1296,87],{"id":1297},"notifychannel",[15,1299,1300,1301,1304],{},"Returned by ",[26,1302,1303],{},"subscribe()",". Scoped to a single channel; handles notification delivery, storage, and read state.",[102,1306,1307,1317],{},[105,1308,1309],{},[108,1310,1311,1313,1315],{},[111,1312,1070],{},[111,1314,1073],{},[111,1316,956],{},[118,1318,1319,1351,1365,1378,1393,1407],{},[108,1320,1321,1326,1330],{},[123,1322,1323],{},[26,1324,1325],{},"send(title, opts?)",[123,1327,1328],{},[26,1329,1103],{},[123,1331,1332,1333,1336,1337,32,1339,32,1342,32,1345,32,1348],{},"Publish a notification to this channel; ",[26,1334,1335],{},"opts"," accepts ",[26,1338,709],{},[26,1340,1341],{},"icon",[26,1343,1344],{},"data",[26,1346,1347],{},"filter",[26,1349,1350],{},"filters",[108,1352,1353,1358,1362],{},[123,1354,1355],{},[26,1356,1357],{},"markRead(id)",[123,1359,1360],{},[26,1361,1103],{},[123,1363,1364],{},"Mark a single notification as read by ID",[108,1366,1367,1371,1375],{},[123,1368,1369],{},[26,1370,1165],{},[123,1372,1373],{},[26,1374,1103],{},[123,1376,1377],{},"Mark every notification in this channel as read",[108,1379,1380,1385,1390],{},[123,1381,1382],{},[26,1383,1384],{},"getNotifications()",[123,1386,1387],{},[26,1388,1389],{},"Notification[]",[123,1391,1392],{},"All notifications in the local store",[108,1394,1395,1400,1404],{},[123,1396,1397],{},[26,1398,1399],{},"getUnread()",[123,1401,1402],{},[26,1403,1389],{},[123,1405,1406],{},"Only unread notifications",[108,1408,1409,1414,1418],{},[123,1410,1411],{},[26,1412,1413],{},"setFilters(values)",[123,1415,1416],{},[26,1417,1103],{},[123,1419,1420,1421],{},"Replace this channel's subscription filters; see ",[143,1422,1424],{"href":1423},"/docs/concepts/filters","Filters",[15,1426,1427,1428,1430,1431,32,1434,32,1437,32,1439,32,1442,32,1445,32,1448,32,1451,1454,1455,401],{},"A ",[26,1429,1271],{}," has ",[26,1432,1433],{},"id",[26,1435,1436],{},"channel",[26,1438,699],{},[26,1440,1441],{},"body?",[26,1443,1444],{},"icon?",[26,1446,1447],{},"data?",[26,1449,1450],{},"timestamp",[26,1452,1453],{},"read",", and ",[26,1456,1457],{},"isReplay",[46,1459,1461],{"id":1460},"events-notifychannel","Events: NotifyChannel",[102,1463,1464,1474],{},[105,1465,1466],{},[108,1467,1468,1470,1472],{},[111,1469,1185],{},[111,1471,1188],{},[111,1473,956],{},[118,1475,1476,1489,1503],{},[108,1477,1478,1482,1486],{},[123,1479,1480],{},[26,1481,1266],{},[123,1483,1484],{},[26,1485,1271],{},[123,1487,1488],{},"A new notification arrived on this channel",[108,1490,1491,1495,1500],{},[123,1492,1493],{},[26,1494,1453],{},[123,1496,1497],{},[26,1498,1499],{},"id: string",[123,1501,1502],{},"A notification was marked as read",[108,1504,1505,1510,1512],{},[123,1506,1507],{},[26,1508,1509],{},"readAll",[123,1511,1202],{},[123,1513,1514],{},"All notifications in this channel were marked as read",[1516,1517,1518],"style",{},"html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}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 .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}",{"title":188,"searchDepth":216,"depth":216,"links":1520},[1521,1524,1525,1526,1527],{"id":21,"depth":216,"text":22,"children":1522},[1523],{"id":48,"depth":223,"text":49},{"id":74,"depth":216,"text":75},{"id":353,"depth":216,"text":354},{"id":404,"depth":216,"text":405},{"id":929,"depth":216,"text":930,"children":1528},[1529,1530,1531,1532],{"id":933,"depth":223,"text":43},{"id":1175,"depth":223,"text":1176},{"id":1297,"depth":223,"text":87},{"id":1460,"depth":223,"text":1461},"md",{},"/docs/high-level-sdks/notify",{"title":5,"description":17},"docs/high-level-sdks/notify","9pSOl-QtT39voWzbYil4TSLnJTjRFraktZOlftxfPos",1789869420455]