{"_id":"@acpaas-ui-widgets/nodejs-chatbot","_rev":"11-b93ac0d53b88c7afd4a0ef6e24a9ede9","name":"@acpaas-ui-widgets/nodejs-chatbot","dist-tags":{"latest":"2.3.1"},"versions":{"2.2.3":{"name":"@acpaas-ui-widgets/nodejs-chatbot","version":"2.2.3","author":{"name":"Jasper Van Proeyen","email":"jasper.vanproeyen@digipolis.be"},"license":"MIT","_id":"@acpaas-ui-widgets/nodejs-chatbot@2.2.3","maintainers":[{"name":"vademo","email":"olivier@vademo.be"},{"name":"lievenvg","email":"lievenvg@gmail.com"},{"name":"tomvandenbroeck","email":"tom.vandenbroeck@digipolis.be"},{"name":"trianglejuice","email":"trianglejuice@mac.com"},{"name":"jsebrech","email":"joeri@sebrechts.net"}],"homepage":"https://github.com/trianglejuice/chatbot_service_angular#readme","bugs":{"url":"https://github.com/trianglejuice/chatbot_service_angular/issues"},"dist":{"shasum":"9a61cb4c35c4b4a8b2c3b3b4094456367b9823cf","tarball":"https://registry.npmjs.org/@acpaas-ui-widgets/nodejs-chatbot/-/nodejs-chatbot-2.2.3.tgz","fileCount":41,"integrity":"sha512-o/DiZfjUWey0ahwXEdgQo++L5ONrYKI95iBsQny4DpC/YB+oqJTzfRfQ52D+AFEDEWs9IAP1tyiJolnHpHqk2A==","signatures":[{"sig":"MEYCIQDBTTXsvgL0J8yb9DljoaFSf/2YiPE2FtpXvdMBbTtkYgIhAOJ+jb4KmeuuaJEEzh1kOilvdg6fDgCI1OAq6LPt0uoI","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":46071,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcYY/nCRA9TVsSAnZWagAAxuEP/1e8RsZbi6WCeR8mJq6M\nfEeRJvn/S5O6Cwz8nbxa+YwQXru3UIO+H3QEnOb3Tg2RU9J+xsvdeOK5EJrb\ngUCvbjuhxVzh2R/+AuxMgBSAL7ng57MUIHDDzzhp9dWGKg3caE6V7Xf2XYWB\nKjYmdVyU0DCPUcJhvc1hLcLP8yB95CdldYQlvnzT0D1nEGDLRLgMq0naghk7\noAR+BBa8qLll27AgJrlVTeoDkyAecJ7ka0n2CnrPzIVe1pDBXB3NpC0ZxigX\ngUzi4F0RnPrXgZMc8+lloPHx2o2oIb2uudD0xPemqO2z2PWEEumUhxXQK8d6\nIX5UopM/cQJiBOxVm7fe3hye4Eum1OSOoXrMgMHwYR26sxf7yRZjsrLoZJJo\nKQgGkdX/DwhxSQ3CxUnLJRIYrOnt1TIxMCFNgYoYAdNrdKUOJeeotsbiA2/g\nokwKr7Dq066s4YTnHUKNsXgrDM6NNTBrD6n8XZRTBdQo2hIz2p25ib7m3E3D\nJNueGXWgH3/ECLznIvEj6DPm1RzTTladDgBABJGWb6gZnFB8npuTyKxJTC6z\n6qngvGltwtpFO6fuRZoNiIKXKeIF4Mvc/jjson0kVKnXnM/OOl97u14uZSbX\nVJsZazT5CfFifkiV50Fh9NUg11C7WUtb754PyCmVRDNAtrxTp946Ye7ZkWo7\nPlqQ\r\n=tcdL\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"roots":["<rootDir>","<rootDir>/tests/"],"notify":false,"verbose":true,"testRegex":"/tests/.*\\.(ts|tsx|js)$","transform":{"\\.(ts|tsx)$":"<rootDir>/node_modules/ts-jest/preprocessor.js"},"setupFiles":["<rootDir>/tests/test.config.ts"],"moduleFileExtensions":["ts","tsx","js","json"],"testPathIgnorePatterns":["/node_modules/","<rootDir>/tests/__mocks__/*","tests/test.config.ts"],"coveragePathIgnorePatterns":["/node_modules/","src/app.ts","src/server.ts","src/lib/logger.ts","src/config"]},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"f141a8ab1e47f401d3cf6cca43d6bbf1873c3871","scripts":{"lint":"tslint -c tslint.json 'src/**/**/*.ts'","test":"jest --coverage","build":"npm run clean && npm run build:ts","clean":"rimraf dist coverage","start":"nodemon","build:ts":"tsc","prepublishOnly":"npm run build"},"_npmUser":{"name":"vademo","email":"olivier@vademo.be"},"repository":{"url":"git+https://github.com/trianglejuice/chatbot_service_angular.git","type":"git"},"_npmVersion":"6.7.0","description":"Chatbot Smart Widget BFF package (Node)","directories":{},"_nodeVersion":"10.15.0","dependencies":{"axios":"^0.18.0","express":"^4.16.3","typescript":"^2.8.3"},"_hasShrinkwrap":false,"devDependencies":{"joi":"^13.3.0","cors":"^2.8.4","jest":"^23.6.0","tslint":"^5.11.0","nodemon":"^1.17.5","request":"^2.85.0","ts-jest":"^22.4.6","ts-node":"^6.0.0","supertest":"^3.1.0","@types/joi":"^13.0.8","@types/cors":"~2.8.3","@types/jest":"23.3.2","@types/node":"^9.6.5","body-parser":"^1.18.3","dotenv-safe":"^5.0.1","@types/express":"^4.11.1","@types/supertest":"^2.0.4","@types/dotenv-safe":"~4.0.1","tslint-config-airbnb":"^5.9.2","jasmine-growl-reporter":"^1.0.1"},"_npmOperationalInternal":{"tmp":"tmp/nodejs-chatbot_2.2.3_1549897703100_0.46069358535830696","host":"s3://npm-registry-packages"}},"2.3.0":{"name":"@acpaas-ui-widgets/nodejs-chatbot","version":"2.3.0","license":"MIT","_id":"@acpaas-ui-widgets/nodejs-chatbot@2.3.0","maintainers":[{"name":"jsebrech","email":"joeri@sebrechts.net"},{"name":"lievenvg","email":"lievenvg@gmail.com"},{"name":"tomvandenbroeck","email":"tom.vandenbroeck@digipolis.be"},{"name":"trianglejuice","email":"trianglejuice@mac.com"},{"name":"vademo","email":"olivier@vademo.be"}],"contributors":[{"name":"Jasper Van Proeyen","email":"jasper.vanproeyen@digipolis.be"},{"name":"Joeri Sebrechts","email":"Joeri.Sebrechts@digipolis.be"},{"name":"Olivier Van den Mooter","email":"olivier@vademo.be"}],"homepage":"https://github.com/digipolisantwerp/chatbot_service_nodejs#readme","bugs":{"url":"https://github.com/digipolisantwerp/chatbot_service_nodejs/issues"},"dist":{"shasum":"607c501290202b952329684e20fb976a34f2e959","tarball":"https://registry.npmjs.org/@acpaas-ui-widgets/nodejs-chatbot/-/nodejs-chatbot-2.3.0.tgz","fileCount":42,"integrity":"sha512-wV124Y8XWr5keMGAogNJsO66h1jj5AWuwf/jjaFXVnWb2E0swNIPAVfPnJy/0ets/z050iHTm5R0NHzPIPzutQ==","signatures":[{"sig":"MEUCIQDhO/kYBSck/zPgpG+QFxGL71HWuzYt7B3/wbLF21XtcgIgaqmiS3YsvkfhGV0B39ym55v06LQuG76kVcxKE2mTHGg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":47875,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc0/MtCRA9TVsSAnZWagAAb/4P/2sXyioGVdgMdEF1D/rr\nX8iNDnsIPvp1fksMlFs4pivB/cHlDYOFeWvqiYVtOyQmcCZlDjAx9izSgEvg\n/VXKPwefpfv2qKA8MRWCEShikfgqrupBve/EK4tk6WHSiXtQmHrjX4G8ySY7\njOdyIYw/g0Mx5fSblnPZ0+XG8C+iIr3t/zdvAxqJbhYI15pQrd7DJu8waA7u\n5ylWslRdLk7iQkx++OzNMSQPXMKmjcR3fKCm9VSd58BfUED4MYvYWsAk37j4\n67LdQ/7aVDyCanmV5+zHuM7ZfCBIj/jaEkj7KzhjPaYB/O5yJ9TMefC25CU8\nNoSY+97aDnUNVg01I3764pRHohHFktm/3yLPW8dW2L9dgEiH/teNNF6pwuxi\n+rQo1vwJRny5jhZPxNLApab+VCC9WL8/aPBKvTiE4+ipTV2L5FCNxzznCZEx\nSvLJyd9u3nJ0Sg4TuypuIVK8o0gUoIaD4OE1VwI/iWSxYz53JB4WhzJJH4pR\nw3paESTq0AEOxg3as3Bsx1WFaDnH9NPRXlqWCq14QxDI/TAn6H7XUX12j9Z6\n5+BunszHq4F/R6hUM6u5zwJrcaol8F5YSRvyzOSOu5MbnOijDbAQvn2UWIB8\nl45ajKgCwN5OZYKuas277iUC55Wz0wg0fOaBdQTHqPHPzaj+eqdkz07blcMI\nOrd+\r\n=U/Hp\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"roots":["<rootDir>","<rootDir>/tests/"],"notify":false,"verbose":true,"testRegex":"/tests/.*\\.(ts|tsx|js)$","transform":{"\\.(ts|tsx)$":"<rootDir>/node_modules/ts-jest/preprocessor.js"},"setupFiles":["<rootDir>/tests/test.config.ts"],"moduleFileExtensions":["ts","tsx","js","json"],"testPathIgnorePatterns":["/node_modules/","<rootDir>/tests/__mocks__/*","tests/test.config.ts"],"coveragePathIgnorePatterns":["/node_modules/","src/app.ts","src/server.ts","src/lib/logger.ts","src/config"]},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"0ff29b1c7b60c5bf52dd48449f12245bf6cd264f","scripts":{"lint":"tslint -c tslint.json 'src/**/**/*.ts'","test":"jest --coverage","build":"npm run clean && npm run build:ts","clean":"rimraf dist coverage","start":"nodemon","build:ts":"tsc","prepublishOnly":"npm run build"},"_npmUser":{"name":"vademo","email":"olivier@vademo.be"},"repository":{"url":"git+https://github.com/digipolisantwerp/chatbot_service_nodejs.git","type":"git"},"_npmVersion":"6.7.0","description":"Chatbot Smart Widget BFF package (Node)","directories":{},"_nodeVersion":"10.15.0","dependencies":{"axios":"^0.18.0","express":"^4.16.3","typescript":"^2.8.3"},"_hasShrinkwrap":false,"devDependencies":{"joi":"^13.3.0","cors":"^2.8.4","jest":"^23.6.0","tslint":"^5.11.0","nodemon":"^1.17.5","request":"^2.85.0","ts-jest":"^22.4.6","ts-node":"^6.0.0","supertest":"^3.1.0","@types/joi":"^13.0.8","@types/cors":"~2.8.3","@types/jest":"23.3.2","@types/node":"^9.6.5","body-parser":"^1.18.3","dotenv-safe":"^5.0.1","@types/express":"^4.11.1","@types/supertest":"^2.0.4","@types/dotenv-safe":"~4.0.1","tslint-config-airbnb":"^5.9.2","jasmine-growl-reporter":"^1.0.1"},"_npmOperationalInternal":{"tmp":"tmp/nodejs-chatbot_2.3.0_1557394220820_0.8551312885351063","host":"s3://npm-registry-packages"}},"2.3.1":{"name":"@acpaas-ui-widgets/nodejs-chatbot","version":"2.3.1","license":"MIT","_id":"@acpaas-ui-widgets/nodejs-chatbot@2.3.1","maintainers":[{"name":"jsebrech","email":"joeri@sebrechts.net"},{"name":"lievenvg","email":"lievenvg@gmail.com"},{"name":"trianglejuice","email":"trianglejuice@mac.com"},{"name":"vademo","email":"olivier@vademo.be"}],"contributors":[{"name":"Jasper Van Proeyen","email":"jasper.vanproeyen@digipolis.be"},{"name":"Joeri Sebrechts","email":"Joeri.Sebrechts@digipolis.be"},{"name":"Olivier Van den Mooter","email":"olivier@vademo.be"}],"homepage":"https://github.com/digipolisantwerp/chatbot_service_nodejs#readme","bugs":{"url":"https://github.com/digipolisantwerp/chatbot_service_nodejs/issues"},"dist":{"shasum":"2486d9ead9555d0d86c42b7a646b9fc5eae98fe2","tarball":"https://registry.npmjs.org/@acpaas-ui-widgets/nodejs-chatbot/-/nodejs-chatbot-2.3.1.tgz","fileCount":42,"integrity":"sha512-lt3MdzN5DsEUUMVTOYdXodjanfC91mvygGO2SE99ijHv62xplKtrnyyEjjF4zB+06qn7Gj1vFpcYruLHDTEnKg==","signatures":[{"sig":"MEUCIQDprfrmoiZ+qHPETSLJxfaGrIybRyuKbPU1Djiu4GKIOAIgJZDs5CJCafGTZPgP2HEPdclip/cbwA/6fACvT4cJ7Sc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":48180,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd7hrjCRA9TVsSAnZWagAA6G4QAIaQ8RnQFR43qPNBRxAg\nj/o+Vd09+I2Gs48Qo+SS1nK61MpIEW15Hh5sftj6GYt3Jk3oCvZRUoYggxvd\n8gg2OZfdhRzoyqFuTyRo5pu9mqyhIJvrf4NS1ijfyPb/PH1yfVTPlsJzTkNL\nAB6NWFjmEG8nfuZjHqCB/51XejVrk+YIvofKN2cSl2nDCSR3uX8rFMHuVgtH\nUmt8UNAFnRlsGTdfB3GM+xWTvre70jG84F4I1jV68/8fgWKidCcuYc/1zIf7\n/KarLjjfuMnRX171/NLMkZQC/QKxNgfXfeMAkMDe+0raf6c9khAVzQKkz8CC\niHhJFmDTgx+TaBpMwksM5Swz6YbcmSHCZDEc/0CW+PCcr1NXHFS3jLKUdujn\n/PLs4+0MRAAwxmsr0o7ROOhRi6kLHSOLt9/rERDAHrfWrPSuWrGKHjM75sK6\ngZtVqvgiSPuXPNQXfrmllDNm+QXEP4PWj7urTai9sU8d5qZQYiIvhGJSNmRt\nCYMGJ/j9o4aJypanFK7dg6lVL9FAG/sTQwIH/GDBAC3Z7E3775JG4ff42eax\nAvFBfxJUorsr+0jLtOlSwAwZwKVmtd0156xFl61S7WWC9WEu4Y/hoMaPP5ae\nsVKisubfgv81ZeIFIGy47cVl3Jrdgdh6eOpPVhsBj8n5KB7CZT22GeM73q8N\nAfFD\r\n=EigY\r\n-----END PGP SIGNATURE-----\r\n"},"jest":{"roots":["<rootDir>","<rootDir>/tests/"],"notify":false,"verbose":true,"testRegex":"/tests/.*\\.(ts|tsx|js)$","transform":{"\\.(ts|tsx)$":"<rootDir>/node_modules/ts-jest/preprocessor.js"},"setupFiles":["<rootDir>/tests/test.config.ts"],"moduleFileExtensions":["ts","tsx","js","json"],"testPathIgnorePatterns":["/node_modules/","<rootDir>/tests/__mocks__/*","tests/test.config.ts"],"coveragePathIgnorePatterns":["/node_modules/","src/app.ts","src/server.ts","src/lib/logger.ts","src/config"]},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"79ea76589cb95c3dfd2b516605d0689e508a6998","scripts":{"lint":"tslint -c tslint.json 'src/**/**/*.ts'","test":"jest --coverage","build":"npm run clean && npm run build:ts","clean":"rimraf dist coverage","start":"nodemon","build:ts":"tsc","prepublishOnly":"npm run build"},"_npmUser":{"name":"vademo","email":"olivier@vademo.be"},"repository":{"url":"git+https://github.com/digipolisantwerp/chatbot_service_nodejs.git","type":"git"},"_npmVersion":"6.13.2","description":"Chatbot Smart Widget BFF package (Node)","directories":{},"_nodeVersion":"12.13.0","dependencies":{"joi":"^13.3.0","axios":"^0.18.0","express":"^4.16.3","@types/joi":"^13.0.8","typescript":"^2.8.3"},"_hasShrinkwrap":false,"devDependencies":{"cors":"^2.8.4","jest":"^23.6.0","tslint":"^5.11.0","nodemon":"^1.17.5","request":"^2.85.0","ts-jest":"^22.4.6","ts-node":"^6.0.0","supertest":"^3.1.0","@types/cors":"~2.8.3","@types/jest":"23.3.2","@types/node":"^9.6.5","body-parser":"^1.18.3","dotenv-safe":"^5.0.1","@types/express":"^4.11.1","@types/supertest":"^2.0.4","@types/dotenv-safe":"~4.0.1","tslint-config-airbnb":"^5.9.2","jasmine-growl-reporter":"^1.0.1"},"_npmOperationalInternal":{"tmp":"tmp/nodejs-chatbot_2.3.1_1575885539078_0.7124928061961253","host":"s3://npm-registry-packages"}}},"time":{"created":"2019-02-11T15:08:22.922Z","modified":"2025-12-08T09:56:37.566Z","2.2.2":"2019-02-11T14:04:16.260Z","2.2.3":"2019-02-11T15:08:23.244Z","2.3.0":"2019-05-09T09:30:20.936Z","2.3.1":"2019-12-09T09:58:59.328Z"},"bugs":{"url":"https://github.com/digipolisantwerp/chatbot_service_nodejs/issues"},"license":"MIT","homepage":"https://github.com/digipolisantwerp/chatbot_service_nodejs#readme","repository":{"url":"git+https://github.com/digipolisantwerp/chatbot_service_nodejs.git","type":"git"},"description":"Chatbot Smart Widget BFF package (Node)","contributors":[{"name":"Jasper Van Proeyen","email":"jasper.vanproeyen@digipolis.be"},{"name":"Joeri Sebrechts","email":"Joeri.Sebrechts@digipolis.be"},{"name":"Olivier Van den Mooter","email":"olivier@vademo.be"}],"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":"[![Build Status](https://travis-ci.com/digipolisantwerp/chatbot_service_nodejs.svg?branch=master)](https://travis-ci.com/digipolisantwerp/chatbot_service_nodejs)\n[![Coverage Status](https://coveralls.io/repos/github/digipolisantwerp/chatbot_service_nodejs/badge.svg?branch=master)](https://coveralls.io/github/digipolisantwerp/chatbot_service_nodejs?branch=master)\n# Chatbot Smart Widget BFF (Node)\n\nThis is a Node.js backend service library to create a BFF service for the Chatbot Smart Widget. The widget provides a chat interface.\n\nThere is a **demo service**, see below for instructions on running it.\n\n## How to use\n\n### Installing\n\nCopy the .npmrc file from this repo to your application's folder.\n\nThen install (you will need to be on the digipolis network):\n\n```sh\n> npm install --save @acpaas-ui-widgets/nodejs-chatbot\n```\n\n### Using\n\n#### Express example:\n\n```js\nconst express = require('express');\nconst chatbotService = require('@acpaas-ui-widgets/nodejs-chatbot-service');\n\nconst app = express();\n\nconst controller = chatbotService.chatbot.createController({\n  accessToken: <ACCESS_TOKEN> (you can find this in the chatbot interface under 'Instellingen'),\n  chatbot: <CHATBOT> the Id of the chatbot you want to address,\n  chatbotenv: <CHATBOT_ENV> test | production,\n  serviceUrl: <SERVICEURL> endpoint (api-store),\n  responseHandler: (optional) true(default) | false. The package needs to handle the http response or call 'next()'\n  apikey: <APIKEY> the apikey from the api-store\n});\n\napp.post('/api/chatbot', controller);\napp.listen(3000);\n```\n\n#### Typescript example:\n\n```js\nimport * as express from 'express';\nimport chatbotService from '@acpaas-ui-widgets/nodejs-chatbot';\n\nconst app = express();\n\nconst controller = chatbotService.createController({\n  accessToken: <ACCESS_TOKEN> (you can find this in the chatbot interface under 'Instellingen'),\n  chatbot: <CHATBOT> the Id of the chatbot you want to address,\n  chatbotenv: <CHATBOT_ENV> test | production,\n  serviceUrl: <SERVICEURL> endpoint (api-store),\n  apikey: <APIKEY> the apikey from the api-store\n});\n\napp.post('/api/chatbot', controller);\napp.listen(3000);\n```\n\n## Run the demo app\n\nCreate a .env file containing:\n\n```sh\nACCESS_TOKEN=\nCHATBOT=\nCHATBOT_ENV=\nPORT=(optional, defaults to 3000)\nSERVICEURL=\nTOKEN=\nAPIKEY=\n```\n\nObtain the APIKEY by taking out a contract on the `chatbot-api` service on [api-store.antwerpen.be](https://api-store.antwerpen.be). The ACCESS_TOKEN value can be obtained at the bottom of the settings screen (\"API token\") on [chatbots.antwerpen.be](https://chatbots.antwerpen.be).\n\n(Add `-o` or `-a` extensions where needed to the host names to access the development or acceptance environments.)\n\nRun the service:\n\n```sh\n> npm install\n> npm start\n```\n\n## Service Specification\n\n```sh\nPOST: /chats/{botId}/message?access_token={access_token}\n{\n  \"message\": \"Hello World\",\n  \"session_id\": \"<your session id>\",\n  \"type\": \"message\",\n  \"send\": \"true\",\n  \"metadata\": {\n    \"firstname\": \"Example\",\n    \"lastname:\": \"name\",\n    \"...\" : \"...\"\n  }\n}\n```\n\n- **message:** Your message to the bot,\n- **session_id:** The chatsession\n- **type:** message\n- **send:** true\n- **metadata:**: Metadata to be passed along, this has to be an object.\n\n### ResponseHandler\nIf the responseHandler is set to false the package will not send the http response. Instead it will call the next function and put the response on `req.chatbotResponse`.\nThis feature can be used if you would like to modify / filter the message before it's sent to the client.\n\nAn [example swagger description](swagger.yml) is included.\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"}