text: (window.webpackJsonp=window.webpackJsonp||[]).push([[48],{103:function(e,t,n){"use strict";n.r(t),n.d(t,"frontMatter",(function(){return o})),n.d(t,"metadata",(function(){return c})),n.d(t,"rightToc",(function(){return l})),n.d(t,"default",(function(){return b}));var a=n(2),i=n(6),r=(n(0),n(153)),o={id:"notifications-spa",title:"Notifications",sidebar_label:"Notifications",slug:"/apps/internal/notifications"},c={unversionedId:"apps/internal/notifications/notifications-spa",id:"apps/internal/notifications/notifications-spa",isDocsHomePage:!1,title:"Notifications",description:"* * *",source:"@site/docs/apps/internal/notifications/notifications-spa.md",slug:"/apps/internal/notifications",permalink:"/get-started/docs/apps/internal/notifications",editUrl:"https://github.com/1-platform/one-platform/edit/master/packages/documentation-spa/docs/apps/internal/notifications/notifications-spa.md",version:"current",sidebar_label:"Notifications",sidebar:"someSidebar",previous:{title:"Lighthouse",permalink:"/get-started/docs/apps/internal/lighthouse"},next:{title:"User Groups",permalink:"/get-started/docs/apps/internal/user-groups"}},l=[{value:"Target Audience",id:"target-audience",children:[]},{value:"Developers",id:"developers",children:[{value:"Component Contributors",id:"component-contributors",children:[]},{value:"Getting Started",id:"getting-started",children:[]},{value:"Usage",id:"usage",children:[]},{value:"Supported Features",id:"supported-features",children:[]},{value:"API Reference",id:"api-reference",children:[]},{value:"Other Details Pages",id:"other-details-pages",children:[]}]},{value:"FAQs",id:"faqs",children:[]}],p={rightToc:l};function b(e){var t=e.components,o=Object(i.a)(e,["components"]);return Object(r.b)("wrapper",Object(a.a)({},p,o,{components:t,mdxType:"MDXLayout"}),Object(r.b)("hr",null),Object(r.b)("h2",{id:"target-audience"},"Target Audience"),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},Object(r.b)("p",{parentName:"li"},"SPA Developers for One Platform")),Object(r.b)("li",{parentName:"ul"},Object(r.b)("p",{parentName:"li"},"SPA Owners for One Platform")),Object(r.b)("li",{parentName:"ul"},Object(r.b)("p",{parentName:"li"},"SPA Users for One Platform"))),Object(r.b)("h2",{id:"developers"},"Developers"),Object(r.b)("h3",{id:"component-contributors"},"Component Contributors"),Object(r.b)("ol",null,Object(r.b)("li",{parentName:"ol"},Object(r.b)("p",{parentName:"li"},"Deepesh Nair - ",Object(r.b)("a",{parentName:"p",href:"mailto:denair@redhat.com"},"denair@redhat.com")," - @Github  ",Object(r.b)("a",{parentName:"p",href:"https://git.io/dnair"},"https://git.io/dnair"))),Object(r.b)("li",{parentName:"ol"},Object(r.b)("p",{parentName:"li"},"Sumeet Ingole - ",Object(r.b)("a",{parentName:"p",href:"mailto:singole@redhat.com"},"singole@redhat.com")," - @Github ",Object(r.b)("a",{parentName:"p",href:"https://github.com/gisumit/"},"https://github.com/gisumit/")))),Object(r.b)("h3",{id:"getting-started"},"Getting Started"),Object(r.b)("p",null,"The Notification Management Dashboard enables SPA-owners to create multiple notification templates for their Applications. It also allows the SPA owners to manage different notification types, such as Email, pop-up, and Banner notifications."),Object(r.b)("h3",{id:"usage"},"Usage"),Object(r.b)("h4",{id:"development-server"},Object(r.b)("strong",{parentName:"h4"},"Development server")),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},Object(r.b)("p",{parentName:"li"},"Clone the project from ",Object(r.b)("a",{parentName:"p",href:"https://github.com/1-platform/one-platform"},"https://github.com/1-platform/one-platform")),Object(r.b)("pre",{parentName:"li"},Object(r.b)("code",{parentName:"pre",className:"language-sh"},"git clone git@github.com:1-Platform/one-platform.git\n"))),Object(r.b)("li",{parentName:"ul"},Object(r.b)("p",{parentName:"li"},"Go to the home-spa folder"),Object(r.b)("pre",{parentName:"li"},Object(r.b)("code",{parentName:"pre",className:"language-sh"},"cd one-platform/packages/notifications-spa/\n"))),Object(r.b)("li",{parentName:"ul"},Object(r.b)("p",{parentName:"li"},"Rename ",Object(r.b)("inlineCode",{parentName:"p"},".env.example")," to ",Object(r.b)("inlineCode",{parentName:"p"},".env"),".")),Object(r.b)("li",{parentName:"ul"},Object(r.b)("p",{parentName:"li"},"Add URL to API_URL in .env file (API_URL=",Object(r.b)("a",{parentName:"p",href:"https://example.com/graphql"},"https://example.com/graphql"),")"),Object(r.b)("ul",{parentName:"li"},Object(r.b)("li",{parentName:"ul"},"Application requires following schema"))),Object(r.b)("li",{parentName:"ul"},Object(r.b)("p",{parentName:"li"},"Start development server"),Object(r.b)("pre",{parentName:"li"},Object(r.b)("code",{parentName:"pre",className:"language-sh"},"npm run start\n"))),Object(r.b)("li",{parentName:"ul"},Object(r.b)("p",{parentName:"li"},"Run test cases"),Object(r.b)("pre",{parentName:"li"},Object(r.b)("code",{parentName:"pre",className:"language-sh"},"npm run test\n")))),Object(r.b)("h3",{id:"supported-features"},"Supported Features"),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},"Create notification",Object(r.b)("ul",{parentName:"li"},Object(r.b)("li",{parentName:"ul"},"To create a new notification",Object(r.b)("ul",{parentName:"li"},Object(r.b)("li",{parentName:"ul"},"Go to",Object(r.b)("inlineCode",{parentName:"li"},"notifications/manage/new"),Object(r.b)("ul",{parentName:"li"},Object(r.b)("li",{parentName:"ul"},"You should be able to see a screen like below\n",Object(r.b)("img",{alt:"Notifications Configuration",src:n(221).default})),Object(r.b)("li",{parentName:"ul"},"Here you can",Object(r.b)("ul",{parentName:"li"},Object(r.b)("li",{parentName:"ul"},"Select a Notification Channel",Object(r.b)("ul",{parentName:"li"},Object(r.b)("li",{parentName:"ul"},"Email"),Object(r.b)("li",{parentName:"ul"},"Push notification"),Object(r.b)("li",{parentName:"ul"},"Banner"))),Object(r.b)("li",{parentName:"ul"},"Select a Notification Trigger",Object(r.b)("ul",{parentName:"li"},Object(r.b)("li",{parentName:"ul"},"Scheduled"),Object(r.b)("li",{parentName:"ul"},"Triggered Notification"))),Object(r.b)("li",{parentName:"ul"},"Add notification target names"))))))))),Object(r.b)("li",{parentName:"ul"},"Edit notification",Object(r.b)("ul",{parentName:"li"},Object(r.b)("li",{parentName:"ul"},"Here you can",Object(r.b)("ul",{parentName:"li"},Object(r.b)("li",{parentName:"ul"},"Select a Notification Channel",Object(r.b)("ul",{parentName:"li"},Object(r.b)("li",{parentName:"ul"},"Email"),Object(r.b)("li",{parentName:"ul"},"Push notification"),Object(r.b)("li",{parentName:"ul"},"Banner"))),Object(r.b)("li",{parentName:"ul"},"Select a Notification Trigger",Object(r.b)("ul",{parentName:"li"},Object(r.b)("li",{parentName:"ul"},"Scheduled"),Object(r.b)("li",{parentName:"ul"},"Triggered Notification"))),Object(r.b)("li",{parentName:"ul"},"Add notification target names"))))),Object(r.b)("li",{parentName:"ul"},"Delete notification",Object(r.b)("ul",{parentName:"li"},Object(r.b)("li",{parentName:"ul"},"Delete a notification by ID")))),Object(r.b)("h3",{id:"api-reference"},"API Reference"),Object(r.b)("p",null,"The following are the APIs that are being used by the Notification-SPA. All the queries are graphql queries"),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},"Fragment used for notification-spa for notification-service")),Object(r.b)("pre",null,Object(r.b)("code",{parentName:"pre",className:"language-js"},"fragment notification on NotificationConfigRaw {\n id\n configID\n template\n defaultLink\n channel\n type\n action\n targets\n source {\n   _id\n   name\n   icon\n   active\n   owners {\n     _id\n     name\n   }\n }\n createdBy\n createdOn\n updatedBy\n updatedOn\n}\n")),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},"Fragment used for home-service")),Object(r.b)("pre",null,Object(r.b)("code",{parentName:"pre",className:"language-js"},"fragment home on HomeType {\n _id\n name\n}\n")),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},"API used for creation of a notification configuration")),Object(r.b)("pre",null,Object(r.b)("code",{parentName:"pre",className:"language-js"},"mutation CreateNotificationConfig($input: NotificationConfigInput!) {\n createNotificationConfig(notificationConfig: $input) {\n   ...notification\n }\n}\n")),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},"API used updating notification configuration")),Object(r.b)("pre",null,Object(r.b)("code",{parentName:"pre",className:"language-js"},"mutation UpdateNotificationConfig($input: NotificationConfigInput!) {\n updateNotificationConfig(notificationConfig: $input) {\n   ...notification\n }\n}\n")),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},"API used to delete notification config")),Object(r.b)("pre",null,Object(r.b)("code",{parentName:"pre",className:"language-js"},"mutation DeleteNotificationConfig ($id: String!) {\n deleteNotificationConfig(id: $id) {\n   ...notification\n }\n}\n")),Object(r.b)("h4",{id:"microservices-being-used-by-the-application"},"Microservices being used by the Application"),Object(r.b)("ol",null,Object(r.b)("li",{parentName:"ol"},Object(r.b)("p",{parentName:"li"},"Notification Microservice")),Object(r.b)("li",{parentName:"ol"},Object(r.b)("p",{parentName:"li"},"Home Microservice"))),Object(r.b)("h3",{id:"other-details-pages"},"Other Details Pages"),Object(r.b)("p",null," ",Object(r.b)("img",{alt:"Notifications Setup Page",src:n(222).default})),Object(r.b)("p",null," ",Object(r.b)("img",{alt:"Notifications Dashboard",src:n(223).default})),Object(r.b)("h2",{id:"faqs"},"FAQs"),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},Object(r.b)("p",{parentName:"li"},Object(r.b)("strong",{parentName:"p"},"What is notification-spa?")),Object(r.b)("p",{parentName:"li"},"The Notification Management Dashboard enables SPA-owners to create multiple notification templates for their Applications. It also allows the SPA owners to manage different notification types, such as Email, pop-up, and Banner notifications.")),Object(r.b)("li",{parentName:"ul"},Object(r.b)("p",{parentName:"li"},Object(r.b)("strong",{parentName:"p"},"I am a SPA-Owner. How will it help me?")),Object(r.b)("p",{parentName:"li"},"You can create a notification (recurrent/non-recurrent) for you users in the form of a banner, pop-up or email which would help your users get notified of (example)  a new feature, deprecations or trigger based events which could be linked to an Outage for your SPA"))))}b.isMDXComponent=!0},153:function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return f}));var a=n(0),i=n.n(a);function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,a)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t){if(null==e)return{};var n,a,i=function(e,t){if(null==e)return{};var n,a,i={},r=Object.keys(e);for(a=0;a<r.length;a++)n=r[a],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a<r.length;a++)n=r[a],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var p=i.a.createContext({}),b=function(e){var t=i.a.useContext(p),n=t;return e&&(n="function"==typeof e?e(t):c(c({},t),e)),n},s=function(e){var t=b(e.components);return i.a.createElement(p.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return i.a.createElement(i.a.Fragment,{},t)}},m=i.a.forwardRef((function(e,t){var n=e.components,a=e.mdxType,r=e.originalType,o=e.parentName,p=l(e,["components","mdxType","originalType","parentName"]),s=b(n),m=a,f=s["".concat(o,".").concat(m)]||s[m]||u[m]||r;return n?i.a.createElement(f,c(c({ref:t},p),{},{components:n})):i.a.createElement(f,c({ref:t},p))}));function f(e,t){var n=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var r=n.length,o=new Array(r);o[0]=m;var c={};for(var l in t)hasOwnProperty.call(t,l)&&(c[l]=t[l]);c.originalType=e,c.mdxType="string"==typeof e?e:a,o[1]=c;for(var p=2;p<r;p++)o[p]=n[p];return i.a.createElement.apply(null,o)}return i.a.createElement.apply(null,n)}m.displayName="MDXCreateElement"},221:function(e,t,n){"use strict";n.r(t),t.default=n.p+"assets/images/notifications-configuration-494da17d585ad9b929300d3b808bbc57.png"},222:function(e,t,n){"use strict";n.r(t),t.default=n.p+"assets/images/notifications-setup-page-68352661ed0309dcafc3412127e8249b.png"},223:function(e,t,n){"use strict";n.r(t),t.default=n.p+"assets/images/notifications-dashboard-0a38f797dd8da511eaf7c513d4376156.png"}}]);