{"_id":"@acpaas-ui-widgets/nodejs-notification","_rev":"5-f1d25f75c23440311b330fc8d6db1ac2","name":"@acpaas-ui-widgets/nodejs-notification","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@acpaas-ui-widgets/nodejs-notification","version":"1.0.0","author":{"name":"Michiel Gellynck","email":"michiel.gellynck@digipolis.be"},"license":"MIT","_id":"@acpaas-ui-widgets/nodejs-notification@1.0.0","maintainers":[{"name":"vademo","email":"olivier@vademo.be"},{"name":"lievenvg","email":"lievenvg@gmail.com"},{"name":"trianglejuice","email":"trianglejuice@mac.com"},{"name":"jsebrech","email":"joeri@sebrechts.net"}],"homepage":"https://github.com/digipolisantwerp/notification_service_nodejs#readme","bugs":{"url":"https://github.com/digipolisantwerp/notification_service_nodejs/issues"},"dist":{"shasum":"788d1af67b7d18418b1a83ddf5f051680c32128d","tarball":"https://registry.npmjs.org/@acpaas-ui-widgets/nodejs-notification/-/nodejs-notification-1.0.0.tgz","fileCount":25,"integrity":"sha512-k6hXqU6QcGD9JiMBRnQUniZTO96wcn1+wsSXN+inhVIKFtIUgxvn6C6fo3wvtdS518lDyw4C757N8PbDq5ZBtA==","signatures":[{"sig":"MEQCIEKh331m1HJu5ua6HUCy66RA2W1DijrXMBXODGDBuuCCAiBfnx1C5XanxW8RR4RDaUbogDLvfvkQQ3gXHdMsQRQQig==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":103659,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe2lmVCRA9TVsSAnZWagAAricP/39O0yafZrWL4QsRjST/\n9yCBDzxJlhqsk4VzI2Hk8/NdbpAZFs668T9pRP23r/ohMcPgKXtZam9KXuoL\nf8W3FzGdFZHYiGoN5SET85MVpalWyYuuVozE/bwaEI36V77T/5d4CmB7mnqx\nJ06F/FK41sc8THEwxJ2X2C38gSUWmJazhodmgIJ/wc+xpk7a6D3cJcpeUOHm\nnP6GXKVo6g15Iqwtk92FIi7Knb+n0nwKBV2nPdk6THuMZssvC8ATO5wwzb+E\nl7bQqUhD0ypzCC+v9ciN0EDAXhCFubaoiSxoftwzNd3Q738x4tf4xMzZRa/N\nKdm6GhEuyJ0HkSsvCir14BKypl2KUkA/LQ/UhC3EuuNmId49QPxHNmXC16v1\nAmSumNiLVIQgjPD5kFJwt8XfLxRXMR0qmgtVugPnBDpldTXQxW9llyJkPtrv\nrO4xw822h+jsLql2VYRV4w+6a2/CMntcncO0UY6l0wSyy43z8IlG3KNE1ruK\nZtC1oLNOYzLHrmicVJPejLp2p/DDUHyZRQR1Mjyirc4HBGPSzrj5zBbWrkTs\n92/1mTBSVa5hafy1Lye4V5GdWj2GlQI96RvVNVIGSX0Qxb3snL0cOaJWhaEV\naJGWO0atzrimkW3bLBZ77YBaU8SGfFOyoOwYnD6S1SGzf4XMsf9hQCM8yswj\n4JxI\r\n=P2qs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"src/notification/index.js","gitHead":"9c563bdeb7c6cae900ac1110f3db06ccb76e1814","scripts":{"lint":"eslint .","test":"nyc --reporter=html npm run test:jasmine","debug":"nodemon ./bin/www --inspect","start":"nodemon ./bin/www","test:jasmine":"jasmine --config=test/jasmine.json"},"_npmUser":{"name":"jsebrech","email":"joeri@sebrechts.net"},"repository":{"url":"git+https://github.com/digipolisantwerp/notification_service_nodejs.git","type":"git"},"_npmVersion":"6.14.5","description":"Notification Widget BFF package (Node)","directories":{},"_nodeVersion":"12.16.3","dependencies":{"axios":"^0.19.2"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.0.1","sinon":"^9.0.2","dotenv":"^5.0.1","eslint":"^6.0.0","morgan":"^1.9.0","express":"^4.16.3","jasmine":"^3.5.0","nodemon":"^2.0.2","proxyquire":"^2.1.3","body-parser":"^1.18.3","babel-eslint":"^10.1.0","eslint-plugin-import":"^2.20.2","eslint-plugin-jasmine":"^4.1.1","eslint-config-airbnb-base":"^14.1.0"},"peerDependencies":{"express":"^4.16.3"},"_npmOperationalInternal":{"tmp":"tmp/nodejs-notification_1.0.0_1591368082342_0.7126897064764128","host":"s3://npm-registry-packages"}}},"time":{"created":"2020-06-05T14:41:22.176Z","modified":"2025-12-08T10:01:13.098Z","1.0.0":"2020-06-05T14:41:22.467Z"},"bugs":{"url":"https://github.com/digipolisantwerp/notification_service_nodejs/issues"},"author":{"name":"Michiel Gellynck","email":"michiel.gellynck@digipolis.be"},"license":"MIT","homepage":"https://github.com/digipolisantwerp/notification_service_nodejs#readme","repository":{"url":"git+https://github.com/digipolisantwerp/notification_service_nodejs.git","type":"git"},"description":"Notification Widget BFF package (Node)","maintainers":[{"email":"trianglejuice@mac.com","name":"trianglejuice"},{"email":"lievenvg@gmail.com","name":"lievenvg"},{"email":"olivier@vademo.be","name":"vademo"},{"email":"nicolas@yapla.be","name":"yapla"},{"email":"npm@jan-bart.be","name":"jan-bart"}],"readme":"![Node.js CI](https://github.com/digitalrmdy/notification_service_nodejs/workflows/Node.js%20CI/badge.svg?branch=master)\n\n# Notification Widget UI BFF (NodeJS)\n\nThis is a Node.js backend service library to create a BFF service for the Notification Widget. The widget provides a notification. This service is matched by a [corresponding UI](https://github.com/digitalrmdy/notification_widget_angular).\n\nThere is a **demo service**, see below for instructions on running it.\n\n## How to use\n\n### Installing\n\n\nThen install (you will need to be on the digipolis network):\n\n```sh\n> npm install @acpaas-ui-widgets/nodejs-notification\n```\n\n### Using in Express\n#### By loading the router\n\n\n```js\nconst express = require('express');\nconst app = express()\nconst router = express.Router();\n\n/**\n * Import the notification module\n */\nconst notificationModule = require('@acpaas-ui-widgets/nodejs-notification-widget/src/notification');\n\n/**\n * Create the notification router.\n * Get an API key from de API Store\n */\nconst notificationRouter = notificationModule.notificationRouter({\n  API_KEY: process.env.API_KEY,\n  NOTIFICATION_API: process.env.NOTIFICATION_API,\n});\n\n/**\n * Use the router\n */\nrouter.use('/api/v1/notifications', notificationRouter);\n\n\n\napp.use('', router);\n\napp.listen(3000);\n```\n\n\n#### By loading the controller\n\n```js\nconst express = require('express');\nconst app = express()\nconst router = express.Router();\n\n/**\n * Import the notification module\n */\nconst notificationModule = require('@acpaas-ui-widgets/nodejs-notification-widget/src/notification');\n\n/**\n * Create the notification controller.\n * Get an API key from de API Store\n */\nconst notificationController = notificationModule.notificationController({API_KEY:process.env.API_KEY, NOTIFICATION_API: process.env.NOTIFICATION_API});\n\n/**\n * Add the GET requests\n */\nrouter.get(`/`, notificationController.getAllInAppMessages);\nrouter.get(`/overview`, notificationController.getAllInAppMessagesUnreadCount);\n\n/**\n * Add the PATCH requests\n */\nrouter.patch(`/:messageId`, notificationController.setInAppMessageStatus);\n\n\n/**\n * Add the Delete requests\n */\nrouter.delete(`/:messageId`, notificationController.deleteInAppMessage);\n\n\n\n\napp.use('', router);\n\napp.listen(3000);\n```\n\n\n\n## Run the demo app\n\nCreate a .env file containing:\n\n```sh\nPORT=3002\nAPI_KEY=<client id>\nNOTIFICATON_API='https://api-gw-a.antwerpen.be/acpaas/in-app-notification/v2/'\n```\n\n(Remove the -a extension in the URL's to use the production api.)\n\nRun the service:\n\n```sh\n> npm install\n> npm start\n```\n\n\n\nRun the test suite:\n```sh\n> npm run test\n```\n(Coverage file generated in the coverage folder)\n\n## Service Specification\n\nSpecifications described in the [postman collection](Notification%20Widget%20NodeJS.postman_collection.json).\nUse the collection to call the demo api.\n\n## Contributing\n\nWe welcome your bug reports and pull requests.\n\nPlease see our [contribution guide](CONTRIBUTING.md).\n\n## License\n\nThis project is published under the [MIT license](LICENSE.md).\n","readmeFilename":"README.md"}