Dialect provides support for dapps to configure notification types, whose purpose is to let your users opt in or out of specific notification types. These can be anything — product announcements, bid events, liquidation warnings, etc. — it's up to you how to choose to wire them into your logic, or use them from the Creator Tools dashbaord.
You can add new notification types using the logic below.
Create a new notification type
// Create a new notification typeconstdapp=awaitsdk.dapps.find();if (!dapp) {thrownewIllegalStateError("Dapp doesn't exist, please create dapp before using it", );}constnotificationType=awaitdapp.notificationTypes.create({ humanReadableId:'announcements', name:'Announcements', orderingPriority:0, trigger:'Notification description or triggering event/conditions', defaultConfig: { enabled:true, },});