{"_id":"@acpaas-ui-widgets/nodejs-contact-picker","_rev":"7-2daf91cccfc464380fd00cb6821d8967","name":"@acpaas-ui-widgets/nodejs-contact-picker","dist-tags":{"latest":"2.1.2"},"versions":{"2.0.0":{"name":"@acpaas-ui-widgets/nodejs-contact-picker","version":"2.0.0","author":{"name":"Joeri Sebrechts","email":"joeri.sebrechts@digipolis.be"},"license":"MIT","_id":"@acpaas-ui-widgets/nodejs-contact-picker@2.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/contact-picker_service_nodejs#readme","bugs":{"url":"https://github.com/digipolisantwerp/contact-picker_service_nodejs/issues"},"dist":{"shasum":"1bc4a08260594702fc1c4ea7fd71ffcd1ddc51d8","tarball":"https://registry.npmjs.org/@acpaas-ui-widgets/nodejs-contact-picker/-/nodejs-contact-picker-2.0.0.tgz","fileCount":28,"integrity":"sha512-HYS7XULSdS29mtKHcFzVbOEZhTSNe2dkXLfEps2Q6NXX9LEv5EkBuK9lbFGBHCuvk0jqpaQFf52wybu59r2wew==","signatures":[{"sig":"MEYCIQDQSbYcjffWGV8SdlJs7v4rUc4xK7L19JcAzp4lTpn3fwIhANQK2eJAej0Xxuc6iJrsdgyP+KeuA3KyOsppRm5eEgVx","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":26906,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNoktCRA9TVsSAnZWagAAc70P/jRxwVXtm5YkfoS1lKMw\no65TFuLymVwr5Qw1h7UD0PcBs9KS+/lHwuBNlRSIU+tZnZA+u+yWBCNEAkEg\nhFfoeY29HlINNLY7yN0400MWhtb/0kn2O+8ragwDpYu3FOIdAarT7PQN5Qxl\nqgtrEHzrMrKkWDXVadJFIdtaT1oQmGhLeRmWheA2/Pu1GMBSNm5QOvd8Snqu\n3OyhekCoYo2WwRCHnjtY1h2nwPCj7pQROTUVumTPe9gJcr/Wtdp99EcGyL7s\ndqlieBz3n8dbrze2zN9SWGRuc7/gkDsfUFhkuNDL3dM12BN+nWh2fg5GtFHA\nGe1Yc2Ez+NwTKsXWKdLoDbiBwnaYWDT4UODmU3oYIhEITaBQPFI2BGsI3arm\nSefvMAdozoYuu60y7PRlvxQyGxA9PBQ9WP5yWI0FtiUI2GGAacZGyfu/LHU4\nRXnzarxF5FvFkBjxv6I93QNAOeDLaLn7FmFm9Pw+BLY5MlY9jIA7cwwxpcV2\nv0B9QDmEEBCR4Bp1lyFc9qjqYtGik3brRZQcF8JixzSXiQldHEa9Y1zKIKE0\n8D4Lnawbm1P452aPM25YyuY/D5/vvvbxc9JMQ2Io52/F2iLV2ebPLhE6TtNB\nmwEVtABtw6IHRao+y6JbAGElt7tu7s9Ujr8mTwB8kaQhRXk99HiEb4OOk1ym\n9zN7\r\n=HjUG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"c0d4243a1ad2984eeec48cfcaacd8f8557c72215","scripts":{"test":"npm run build && npm run test:istanbul","build":"npm run clean && npm run build:ts","clean":"rimraf dist coverage","start":"nodemon","build:ts":"tsc","test:istanbul":"istanbul cover ./node_modules/jasmine-node/bin/jasmine-node test","prepublishOnly":"npm run build"},"_npmUser":{"name":"vademo","email":"olivier@vademo.be"},"repository":{"url":"git+https://github.com/digipolisantwerp/contact-picker_service_nodejs.git","type":"git"},"_npmVersion":"6.14.5","description":"Contact Picker Smart Widget BFF package (Node)","directories":{},"_nodeVersion":"14.5.0","dependencies":{"oauth":"^0.9.15","dotenv":"^5.0.1","express":"^4.16.3","request":"^2.85.0","request-promise":"^4.2.2","request-promise-any":"^1.0.5"},"_hasShrinkwrap":false,"devDependencies":{"hoek":"^5.0.3","rimraf":"^2.6.2","tslint":"^5.9.1","nodemon":"^1.17.5","ts-node":"^6.0.0","istanbul":"^0.4.5","proxyquire":"^2.0.1","typescript":"^2.8.1","@types/node":"^9.6.5","@types/oauth":"^0.9.0","jasmine-node":"^1.14.5","@types/express":"^4.11.1","@types/jasmine":"^2.8.6","@types/proxyquire":"^1.3.28","@types/request-promise":"^4.1.41","jasmine-growl-reporter":"^1.0.1"},"_npmOperationalInternal":{"tmp":"tmp/nodejs-contact-picker_2.0.0_1597409581361_0.7441616890943974","host":"s3://npm-registry-packages"}},"2.1.0":{"name":"@acpaas-ui-widgets/nodejs-contact-picker","version":"2.1.0","author":{"name":"Joeri Sebrechts","email":"joeri.sebrechts@digipolis.be"},"license":"MIT","_id":"@acpaas-ui-widgets/nodejs-contact-picker@2.1.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/contact-picker_service_nodejs#readme","bugs":{"url":"https://github.com/digipolisantwerp/contact-picker_service_nodejs/issues"},"dist":{"shasum":"d0d994bbc5e564d497a8eac19299ae5355748872","tarball":"https://registry.npmjs.org/@acpaas-ui-widgets/nodejs-contact-picker/-/nodejs-contact-picker-2.1.0.tgz","fileCount":28,"integrity":"sha512-vj9WYB7LfO/3aTms8rr/PD1bgVdomcj6H4EX2Q/BPLC0Oagkb9H/nKhC7HmHGIJ8Wp4l/xyQWiAHFvw9EDICwA==","signatures":[{"sig":"MEQCIFEqG1M9m/iaOfATwnwLmzNsT+W3XInmr89xgTfzcnOnAiBC/Y1KhVQ68AXCz984khzPh91NQ2jXthXiRSJ41lObmQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27202,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfYJBqCRA9TVsSAnZWagAAhNEP/37TVHwBbHi0n0ogjeUe\n7O23A2Egp6Jvf5ByXRBloNdbGEhbs7Mo9cFiPHF34JGyWVixBbRbO7+nSpzQ\nK18bMiEqkwrheLP+H00PgacTBBdJMJ/ExSFYgAfuvHzgdkDA971O2z8d1GOW\n/Uo93MyiMKo23UC2kqKOGjdH3n1kXSDdZJeAADM1BYj96bjhD2GMDOhUC0YA\ndPdQkgwgBWA/BoWOxqGp6wpCV92xTCgKxE5/JAgrkEyxcp71ndsqApx/Z9HZ\nKt1+rFj29daVlFb5NZM2ToLIBRW1Qbj5i6RwrkpFovIZ07vgGRP5ZIVpYWjT\nJ05IyF3SHMXOrBLk2Ly8+hW0vZs5obLhz28hk/pC2vGaVNUr/Yhsmg8ZwqHC\npLAybM5k+VbGY0Jf8UXvOoDceqRSqIgrWLooKCx73aNnBk0LIk1Uw235hwRV\nkxvy4ZP0easTFaOYaXANE+fAyln7loSuKi4/u1aG5e/brlQPHWsuy0y4eqy1\nlal0+6iB8yqNP+HqwWoKzEL0W86ATtXrfZ/D4pIp1shHQLIEbl5qNgBvrryR\nAFfnM5YD7DmkfRcqfHengWSJAOH/nd6P+8OBvOuoxlWZC1tv63CMhMG7EihV\nYa2UrwLp7pp+Hj0nnhrfOuGy3JvZAIId73ZzQ8Q5DrIeez5TjhEYI7rALUpB\nXS6n\r\n=UVaK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"dafdbf0f516e627a41e9e0722d1fbb5440fcd819","scripts":{"test":"npm run build && npm run test:istanbul","build":"npm run clean && npm run build:ts","clean":"rimraf dist coverage","start":"nodemon","build:ts":"tsc","test:istanbul":"istanbul cover ./node_modules/jasmine-node/bin/jasmine-node test","prepublishOnly":"npm run build"},"_npmUser":{"name":"vademo","email":"olivier@vademo.be"},"repository":{"url":"git+https://github.com/digipolisantwerp/contact-picker_service_nodejs.git","type":"git"},"_npmVersion":"6.14.5","description":"Contact Picker Smart Widget BFF package (Node)","directories":{},"_nodeVersion":"14.5.0","dependencies":{"oauth":"^0.9.15","dotenv":"^5.0.1","express":"^4.16.3","request":"^2.85.0","request-promise":"^4.2.2","request-promise-any":"^1.0.5"},"_hasShrinkwrap":false,"devDependencies":{"hoek":"^5.0.3","rimraf":"^2.6.2","tslint":"^5.9.1","nodemon":"^1.17.5","ts-node":"^6.0.0","istanbul":"^0.4.5","proxyquire":"^2.0.1","typescript":"^2.8.1","@types/node":"^9.6.5","@types/oauth":"^0.9.0","jasmine-node":"^1.14.5","@types/express":"^4.11.1","@types/jasmine":"^2.8.6","@types/proxyquire":"^1.3.28","@types/request-promise":"^4.1.41","jasmine-growl-reporter":"^1.0.1"},"_npmOperationalInternal":{"tmp":"tmp/nodejs-contact-picker_2.1.0_1600163946081_0.9000175163213946","host":"s3://npm-registry-packages"}},"2.1.2":{"name":"@acpaas-ui-widgets/nodejs-contact-picker","version":"2.1.2","author":{"name":"Joeri Sebrechts","email":"joeri.sebrechts@digipolis.be"},"license":"MIT","_id":"@acpaas-ui-widgets/nodejs-contact-picker@2.1.2","maintainers":[{"name":"jsebrech","email":"joeri@sebrechts.net"},{"name":"trianglejuice","email":"trianglejuice@mac.com"},{"name":"lievenvg","email":"lievenvg@gmail.com"},{"name":"vademo","email":"olivier@vademo.be"}],"homepage":"https://github.com/digipolisantwerp/contact-picker_service_nodejs#readme","bugs":{"url":"https://github.com/digipolisantwerp/contact-picker_service_nodejs/issues"},"dist":{"shasum":"0bf670167ab4b3b4e9684ae1e458e30d401ac975","tarball":"https://registry.npmjs.org/@acpaas-ui-widgets/nodejs-contact-picker/-/nodejs-contact-picker-2.1.2.tgz","fileCount":27,"integrity":"sha512-zyi8XguwZX9wXiQG2kqS8o3/7kCz7CMk//33BNu23+2kJNNeFf3njeZ0FRzCRMPF7ev4bwc88w2BrldRW39ePw==","signatures":[{"sig":"MEUCIA2kiWEZPKQWgooPS4mNsXJgr3zUYpf7aysHppDaME8KAiEAwF6tHFrf9YaQTB4RMdh+SYjv7IElKrD53DdQjfvw5A4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":27116,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjv8buACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqDGA/+LDmCLZMEKercA/sYoPBSWTI7/QkVIDDM3qzA59Ogu93eFbyi\r\n+OMXQEzzJyvXCluCgOwYRzh6f8BHQr9R0KbUFIhB9bzQEBbdQ6UABJwTnxVT\r\n9MjSgkipxaYiabRlpdI0NvOhHDe4XbiU6g3aTS/moC+m3Bab1NiiydAjwjEe\r\nlE3WSKw5tjPvF9qB657EPvdlCJx2o5INXgHDWAl5I1QrEZOUjG/mae2KU/sI\r\nWKm64yXW1Hen80K6+H/gKr+IOMBpyWs8u+KrUpLIs9tPC2Dc42Gxv0l71l1Q\r\nzjMUjHT2fXpzL8dbA6zLZNW6o6DZ16Nx0uMPxnHBCFV79izS9pxq8G/jR9sH\r\naWzWVDdssAM1NElvak6PDyXvEAkzume8TYxoaW73YdI3vmeQCkDzdqnaMu6R\r\npB6EJX25ehi/Yc046EXDcOmJhjzZ1gBSHocL88CEEmsCeg0ZDTyMa8jWliFm\r\nilG+a92i3gkMIaFICRs9SmWME1JqaWCAtl4vd3Z9XppcqAqz245I+APh2bLh\r\nlAETLj5QfBUxwxOgdO52hKwUPEclBKhzVN5DY9VEmEwqLaFZbmjr4e/HCmKZ\r\nHI/7HVq4A2jLuYAungynngIGA6G/3eL/pDQUfyii2YVbXWqa2RHj4FZUVC35\r\n083iSXwp7kZofKpPgVciWp9PELUoiIE2tEw=\r\n=eARl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"68b017cd448f25e0705c135bcde39650897f4d48","scripts":{"test":"npm run build && npm run test:istanbul","build":"npm run clean && npm run build:ts","clean":"rimraf dist coverage","start":"nodemon","build:ts":"tsc","test:istanbul":"istanbul cover jasmine test/*","prepublishOnly":"npm run build"},"_npmUser":{"name":"vademo","email":"olivier@vademo.be"},"repository":{"url":"git+https://github.com/digipolisantwerp/contact-picker_service_nodejs.git","type":"git"},"_npmVersion":"8.19.3","description":"Contact Picker Smart Widget BFF package (Node)","directories":{},"_nodeVersion":"18.13.0","dependencies":{"oauth":"^0.9.15","express":"^4.18.2","request":"^2.85.0","request-promise":"^4.2.6","request-promise-any":"^1.0.8"},"_hasShrinkwrap":false,"devDependencies":{"hoek":"^5.0.3","dotenv":"^5.0.1","rimraf":"^2.6.2","tslint":"^5.9.1","jasmine":"^4.0.2","nodemon":"^2.0.20","ts-node":"^6.0.0","istanbul":"^0.4.5","proxyquire":"^2.0.1","typescript":"^4.9.4","@types/node":"^9.6.5","@types/oauth":"^0.9.0","@types/express":"^4.17.15","@types/jasmine":"^2.8.6","@types/proxyquire":"^1.3.28","@types/request-promise":"^4.1.41"},"_npmOperationalInternal":{"tmp":"tmp/nodejs-contact-picker_2.1.2_1673512686368_0.719681499434462","host":"s3://npm-registry-packages"}}},"time":{"created":"2020-08-14T12:52:54.127Z","modified":"2025-12-08T09:56:38.145Z","2.0.0":"2020-08-14T12:53:01.522Z","2.1.0":"2020-09-15T09:59:06.186Z","2.1.2":"2023-01-12T08:38:06.519Z"},"bugs":{"url":"https://github.com/digipolisantwerp/contact-picker_service_nodejs/issues"},"author":{"name":"Joeri Sebrechts","email":"joeri.sebrechts@digipolis.be"},"license":"MIT","homepage":"https://github.com/digipolisantwerp/contact-picker_service_nodejs#readme","repository":{"url":"git+https://github.com/digipolisantwerp/contact-picker_service_nodejs.git","type":"git"},"description":"Contact Picker Smart 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":"# Contact Picker Smart Widget BFF (Node)\n\nThis is a Node.js backend service library to create a BFF service for the Contact Picker Smart Widget. The widget provides a picker field to choose a person from a list of contacts. This service is matched by a [corresponding UI](https://github.com/digipolisantwerp/contact-picker_widget_angular).\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 @acpaas-ui-widgets/nodejs-contact-picker\n```\n\n### Using\n\nExpress example:\n\n```js\nconst express = require('express');\nconst app = express()\nconst pickerHelper = require('@acpaas-ui-widgets/nodejs-contact-picker');\nconst controller = pickerHelper.mprofiel.createController({\n    clientId: \"<oauth client id>\",\n    clientSecret: \"<oauth client secret>\",\n    oauthUrl: \"https://api-gw-o.antwerpen.be/astad/mprofiel/v1/oauth2/token\",\n    serviceUrl: \"https://api-gw-o.antwerpen.be/astad/mprofiel/v1/profiles\"\n});\napp.get('/api/medewerkers', controller);\napp.listen(3000);\n```\n\nYou can obtain the OAuth credentials by taking a contract on the API in the [API store](https://api-store-o.antwerpen.be).\n\nThe library provides the following interface:\n\n- mprofiel\n  - *createController(config)*: create an express controller that handles the connection to the mprofiel API\n  - *createService(config)*: create a function that accepts a query and returns a promise of the results of the mprofiel API for that query. The createController routine builds on top of this.\n\n## Run the demo app\n\nCreate a .env file containing:\n\n```sh\nPORT=3000\nOAUTH_CLIENT_ID=<client id>\nOAUTH_CLIENT_SECRET=<client secret>\nMPROFIEL_OAUTH_URL=https://api-gw-o.antwerpen.be/astad/mprofiel/v1/oauth2/token\nMPROFIEL_API_URL=https://api-gw-o.antwerpen.be/astad/mprofiel/v1/profiles\n```\n\n* Obtain the client id and client secret by creating a contract on the mprofiel service on [api-store-o.antwerpen.be](https://api-store-o.antwerpen.be).\n\n* Create a service account with the correct permissions: request permissions in the User [Management Engine](https://um.antwerpen.be/) (application Digipolis --> MPROFIEL).\n\n\n(Remove the -o 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\nTest by browsing to [localhost:3000/api/medewerkers?search=aa](http://localhost:3000/api/medewerkers?search=aa).\n\nThe UI demo app expects the service to run on port 3000.\n\n## Service Specification\n\nThe service implements the following protocol:\n\n- GET /path/to/endpoint?search=...\n- search = the text that the user typed on which to match\n- result = JSON-encoded array of [ContactItem](src/mprofiel/types.ts) objects\n\nAn [example swagger description](swagger-example.json) is included.\n\n## Contributing\n\nWe welcome your bug reports and pull requests.\n\nPlease see our [contribution guide](CONTRIBUTING.md).\n\n## Support\n\nJoeri Sebrechts (<joeri.sebrechts@digipolis.be>)\n\n## License\n\nThis project is published under the [MIT license](LICENSE.md).\n","readmeFilename":"README.md"}