{"_id":"@azure/cognitiveservices-personalizer","_rev":"8-34608ca9f79de6014634e8d7cedc33e2","name":"@azure/cognitiveservices-personalizer","dist-tags":{"latest":"2.0.1"},"versions":{"1.0.0":{"name":"@azure/cognitiveservices-personalizer","version":"1.0.0","keywords":["node","azure","typescript","browser","isomorphic"],"author":{"name":"Microsoft Corporation"},"license":"MIT","_id":"@azure/cognitiveservices-personalizer@1.0.0","maintainers":[{"name":"mikeharder","email":"mharder@microsoft.com"},{"name":"azure-sdk","email":"azure-sdk-npmjs@microsoft.com"}],"homepage":"https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/cognitiveservices/cognitiveservices-personalizer","bugs":{"url":"https://github.com/Azure/azure-sdk-for-js/issues"},"dist":{"shasum":"97f5b4323bef9de7ffedf0b40dc517cbd4e70d35","tarball":"https://registry.npmjs.org/@azure/cognitiveservices-personalizer/-/cognitiveservices-personalizer-1.0.0.tgz","fileCount":49,"integrity":"sha512-O30mTsCJlAgUfNWnCHyHZLWpOB5UBtVaRiBAD+bioziq1z5JXk2S+JyybJJYrNU0/SiKlnQ/4zdnV/dNd95X6w==","signatures":[{"sig":"MEYCIQCRdjU8e224WAdqRCOkKbMn6OXKM2U70fa/1632cAZm+AIhALvBp4LL8jueWsvz/2SqbfSaKiv323XFIsRkVv+EDwBM","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":143006,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc7XDWCRA9TVsSAnZWagAAtOgP/RVjXsWlMeJaBAwtwB1W\nhIOJQlKeeFSJycd9G8c11bWJvGv8+jbNk2zuAcqgZ0TAb4PYq0ttxC18Mniz\nq1fR6bPieP+qbGkaeFoahJH9RfccSlUaJScLryaZPOufPa9/EBeYfJL1VgjD\ntrh2WZ+SHJvnlGs3YP56o7l0Y+wXHeyW+9XUQeeaXDmmGyHcc3CxNw6MCwFP\nhvjPH4qo5AzRXc1jrMghAy5s1ZuWBK0gjlToDu371L8+KuG6JpJsJU/4ynVM\n8YpiVxuvXoNqTCAYCs6bS11fKSggjbHN5PYJZwiA/WqF4fCLvjRfEsJvk2DZ\nIc3TLF0zZOzQdci/YSy6G26rsFRGuO3q9ANxO014KEA0nrd4UMh/ImMunXmS\n16o+3YAEAuJtVQJPCM2EE2WaexTAhhs2FghX+MgAyu1BEsu3uqeOdJXM7EXO\nGC7vuE2fx1tuS66gHTbvwM5c1QBpNlaUtdlDqwK5xLry25VcSAlDm+FQhTuX\nsp1F7Xjmkxx8iAnwqyvP9/SJTJZUcTkB3cvbBcdlFynETh/5D62FhzTL2B2W\nbqRGgIDyoU5LQ/qcsLbzxn+alAV35Hz4/z1Eun/J8CEMbtneHvBZjJPm1aKE\nHwSdhW2OG2lmP8eyz61rz1SDiotszoQTerss+3tteNLMFcEpfA8IuzVjdc0b\n4zxm\r\n=twwo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./dist/cognitiveservices-personalizer.js","_from":"file:/home/vsts/work/r1/a/_azure-sdk-for-js - build/drop/azure-cognitiveservices-personalizer-1.0.0.tgz","types":"./esm/personalizerClient.d.ts","module":"./esm/personalizerClient.js","scripts":{"build":"tsc && rollup -c rollup.config.js && npm run minify","minify":"uglifyjs -c -m --comments --source-map \"content='./dist/cognitiveservices-personalizer.js.map'\" -o ./dist/cognitiveservices-personalizer.min.js ./dist/cognitiveservices-personalizer.js","prepack":"npm install && npm run build"},"_npmUser":{"name":"azure-sdk","email":"azure-sdk-npmjs@microsoft.com"},"_resolved":"","_integrity":"","repository":{"url":"git+https://github.com/Azure/azure-sdk-for-js.git","type":"git"},"_npmVersion":"6.4.1","autoPublish":true,"description":"PersonalizerClient Library with typescript type definitions for node.js and browser.","directories":{},"sideEffects":false,"_nodeVersion":"10.15.3","dependencies":{"tslib":"^1.9.3","@azure/ms-rest-js":"^1.8.1"},"_hasShrinkwrap":false,"devDependencies":{"rollup":"^0.66.2","uglify-js":"^3.4.9","typescript":"^3.1.1","rollup-plugin-sourcemaps":"^0.4.2","rollup-plugin-node-resolve":"^3.4.0"},"_npmOperationalInternal":{"tmp":"tmp/cognitiveservices-personalizer_1.0.0_1559064789723_0.4271989674214989","host":"s3://npm-registry-packages"},"deprecated":"This package has been deprecated. For more information, please see: https://azure.microsoft.com/en-us/updates?id=ai-services-personalizer-will-be-retired-on-1-october-2026"},"2.0.0":{"name":"@azure/cognitiveservices-personalizer","version":"2.0.0","keywords":["node","azure","typescript","browser","isomorphic"],"author":{"name":"Microsoft Corporation"},"license":"MIT","_id":"@azure/cognitiveservices-personalizer@2.0.0","maintainers":[{"name":"azure-sdk","email":"azure-sdk-npmjs@microsoft.com"},{"name":"mikeharder","email":"mharder@microsoft.com"}],"homepage":"https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/cognitiveservices/cognitiveservices-personalizer","bugs":{"url":"https://github.com/Azure/azure-sdk-for-js/issues"},"dist":{"shasum":"bba088ccda750a08367ccb688c97afbfbc1885cf","tarball":"https://registry.npmjs.org/@azure/cognitiveservices-personalizer/-/cognitiveservices-personalizer-2.0.0.tgz","fileCount":49,"integrity":"sha512-mugj11DgBonAoi2vi7fN14sg6fTfzg3xtpshj5/9QDRVDyiC1OK3MsF4A7SYWEt28JcnbSVPajb8JRAJvkfbXA==","signatures":[{"sig":"MEYCIQDsqTUVnH+3yEVpK2m7TYe7cFPrApimR/n8DitWYF7GxQIhANGODO4a1UTMx249bz7jBaQLCBaNe29iUwU3hNKttd81","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":145075,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdeS/nCRA9TVsSAnZWagAAOp0P/AzBO0lrEOV4bRDI1oYE\nhZBfnwj7rUoL/u2Tgn/K7/hkAbKEFXUvOUX0gUBgI87jT/NqYQawfzLslatD\nrIlTvSM//v5b38KKFLTR9/paTxP6uw2LWx8TOrCQ+JC2lbmVwP83YifceNAy\nHMKBTTE0cLROKhz8M/da97n3wxq6plFgST7Q8S30CrmLW/R6aqFYN3PVQ8Tu\n7f0/Yw+Vvec/d8YdseftVEIkOmti9GIMoyZiwEPfmyPjvpGJQrZiPfEz2UwG\nv/vlWtMs3fUCdI9TmOsloNj+LMIeYqBgJY/n+5IHuky9J5uCxSWF7BR/liIM\nRPC/F2vIxdOSw95eZGchNeJ7WAFtRHbXhn8cDBX3aaINWPX9josMKQ62VoQv\nAaZo/1BqG19NZdHuCgqoK508oipiBzUMUejSkDBvV9s8perc0b1OeDyDbrNY\nUSc06nJdSUwFx6L30Y6HMcpzlHkRa39mp4CAvZ7bUT94QvvJ6IU5zHa9LbAA\n+Wb8IkwCgecVuZwJtrNdBTdqs/G92PSy+nEAcMzoijpaiVJ2OzNRJU8i834V\nJD/h1NxKRl4ruqQhzacklpIQvZmJIFQN2sKdlXT4KPW1SFMVV40V+w0R0jYf\nClSCjKN+ZYvqfJmOZs7O/LU3u4GqEUPFa7YJJq8VZMFpb2gndbJP9fsJul+t\nhD8H\r\n=IH/c\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./dist/cognitiveservices-personalizer.js","_from":"file:/home/vsts/work/r1/a/_js - mgmt - ci/drop/azure-cognitiveservices-personalizer-2.0.0.tgz","types":"./esm/personalizerClient.d.ts","module":"./esm/personalizerClient.js","scripts":{"build":"tsc && rollup -c rollup.config.js && npm run minify","minify":"uglifyjs -c -m --comments --source-map \"content='./dist/cognitiveservices-personalizer.js.map'\" -o ./dist/cognitiveservices-personalizer.min.js ./dist/cognitiveservices-personalizer.js","prepack":"npm install && npm run build"},"_npmUser":{"name":"azure-sdk","email":"azure-sdk-npmjs@microsoft.com"},"_resolved":"","_integrity":"","repository":{"url":"git+https://github.com/Azure/azure-sdk-for-js.git","type":"git"},"_npmVersion":"6.9.0","autoPublish":true,"description":"PersonalizerClient Library with typescript type definitions for node.js and browser.","directories":{},"sideEffects":false,"_nodeVersion":"10.16.3","dependencies":{"tslib":"^1.10.0","@azure/ms-rest-js":"^2.0.4"},"_hasShrinkwrap":false,"devDependencies":{"rollup":"^1.18.0","uglify-js":"^3.6.0","typescript":"^3.5.3","rollup-plugin-sourcemaps":"^0.4.2","rollup-plugin-node-resolve":"^5.2.0"},"_npmOperationalInternal":{"tmp":"tmp/cognitiveservices-personalizer_2.0.0_1568223207228_0.10046245261747178","host":"s3://npm-registry-packages"},"deprecated":"This package has been deprecated. For more information, please see: https://azure.microsoft.com/en-us/updates?id=ai-services-personalizer-will-be-retired-on-1-october-2026"},"2.0.1":{"name":"@azure/cognitiveservices-personalizer","version":"2.0.1","keywords":["node","azure","typescript","browser","isomorphic"],"author":{"name":"Microsoft Corporation"},"license":"MIT","_id":"@azure/cognitiveservices-personalizer@2.0.1","maintainers":[{"name":"azure-sdk","email":"azure-sdk-npmjs@microsoft.com"}],"homepage":"https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/cognitiveservices/cognitiveservices-personalizer","bugs":{"url":"https://github.com/Azure/azure-sdk-for-js/issues"},"dist":{"shasum":"5809c742a39436c8f329691f968b92d8cd841e9f","tarball":"https://registry.npmjs.org/@azure/cognitiveservices-personalizer/-/cognitiveservices-personalizer-2.0.1.tgz","fileCount":49,"integrity":"sha512-ajVeg5DNWLiElmX8wmNeEnqDzGyYgT2UEdshAuuF1QMgnfhsdx4ibYDmKAuF6mkCaEr9wwzZL+QXs1892j+afA==","signatures":[{"sig":"MEUCIHaq9I9RZU66MVvQPuMyRDvEW14uYR45V5PyqxbHCtZIAiEAliiEeIqICJNQxs2sqxuFdg2kbPHzTi9ZuAQQ24Mcvzw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":146048,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfH2cMCRA9TVsSAnZWagAAgOYP/1AgOrLDTO+CzoKCREKb\n+JUPDbBwxTvErNTxuD1WNkYJ3hX7FNRQ9Nb6mggkNfaYucTyPGL0qbY3EkQO\n5yTsNHHJCQyI3/H2JXVnOxgveHicBVFo5VgHYg/m+dbZDtrQBOA7F9+NJWJC\nVaLh8ufY2dXbyRQxA1UZyRcUEr/+DELKBEBsTo4ZWO13Fnym69hlXRnH34Rg\nARd+bbQrfxjwDlc8H+eGFJR0d1jYCR3Lw2qVwH6hyxkKrrVGi98AllZrofht\nvKIesprfm4g+rt71PQNwFOc0okAMQA5b1U33KrlRf2fTaQsw4fa77sXIoOQs\nlT+v7/KsobiEWSUxB9RgxUjEh9SS4GoU3TvYyl15XuzzV0c1tXXw7JTjODve\nYj0Ho9CznTzmatp3CFkxF8ZsiwI9V6cfv7df7cWFDzSQnGFMuQU/qGHK2vwK\n8rPXF/gEnp0CZ/X+lRru7Kd3IBeM8amG0mwuNjmRj4ZSZrR0UQh8kXo1j9Es\n1QmqI/Fr4WJEHaJCb5cPPQMElrzsR+onVmAtl0SswD81FMO1JHEycbPMOUYh\n6DNsaEldsZbhjP0CgaBYU3SgIlaAiOAE5Ws4oIETzxG5B9JKfnMAYpVnkBDU\nylS33iiYhfBllRQicCKQDTFgBRq0uFR3PxAVKG3gPWAvJD9oNkLLlGJPwTUB\nPCf0\r\n=Fr45\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./dist/cognitiveservices-personalizer.js","_from":"file:/home/vsts/work/r1/a/_js - mgmt - ci/drop/azure-cognitiveservices-personalizer-2.0.1.tgz","types":"./esm/personalizerClient.d.ts","module":"./esm/personalizerClient.js","scripts":{"build":"tsc && rollup -c rollup.config.js && npm run minify","minify":"uglifyjs -c -m --comments --source-map \"content='./dist/cognitiveservices-personalizer.js.map'\" -o ./dist/cognitiveservices-personalizer.min.js ./dist/cognitiveservices-personalizer.js","prepack":"npm install && npm run build"},"_npmUser":{"name":"azure-sdk","email":"azure-sdk-npmjs@microsoft.com"},"_resolved":"","_integrity":"","repository":{"url":"git+https://github.com/Azure/azure-sdk-for-js.git","type":"git"},"_npmVersion":"6.14.4","autoPublish":true,"description":"PersonalizerClient Library with typescript type definitions for node.js and browser.","directories":{},"sideEffects":false,"_nodeVersion":"10.21.0","dependencies":{"tslib":"^1.10.0","@azure/ms-rest-js":"^2.0.4"},"_hasShrinkwrap":false,"devDependencies":{"rollup":"^1.18.0","uglify-js":"^3.6.0","typescript":"^3.5.3","rollup-plugin-sourcemaps":"^0.4.2","rollup-plugin-node-resolve":"^5.2.0"},"_npmOperationalInternal":{"tmp":"tmp/cognitiveservices-personalizer_2.0.1_1595893515840_0.43677278361646943","host":"s3://npm-registry-packages"},"deprecated":"This package has been deprecated. For more information, please see: https://azure.microsoft.com/en-us/updates?id=ai-services-personalizer-will-be-retired-on-1-october-2026"}},"time":{"created":"2019-05-28T17:33:09.550Z","modified":"2026-04-03T21:10:36.246Z","1.0.0":"2019-05-28T17:33:09.882Z","2.0.0":"2019-09-11T17:33:27.423Z","2.0.1":"2020-07-27T23:45:15.984Z"},"bugs":{"url":"https://github.com/Azure/azure-sdk-for-js/issues"},"author":{"name":"Microsoft Corporation"},"license":"MIT","homepage":"https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/cognitiveservices/cognitiveservices-personalizer","keywords":["node","azure","typescript","browser","isomorphic"],"repository":{"url":"git+https://github.com/Azure/azure-sdk-for-js.git","type":"git"},"description":"PersonalizerClient Library with typescript type definitions for node.js and browser.","maintainers":[{"name":"azure-sdk","email":"azure-sdk-npmjs@microsoft.com"},{"name":"microsoft-oss-releases","email":"microsoft-oss-publishing@microsoft.com"},{"name":"microsoft1es","email":"npmjs@microsoft.com"}],"readme":"## An isomorphic javascript sdk for - PersonalizerClient\n\nThis package contains an isomorphic SDK for PersonalizerClient.\n\n### Currently supported environments\n\n- Node.js version 6.x.x or higher\n- Browser JavaScript\n\n### How to Install\n\n```bash\nnpm install @azure/cognitiveservices-personalizer\n```\n\n### How to use\n\n#### nodejs - Authentication, client creation and reward events as an example written in TypeScript.\n\n##### Install @azure/ms-rest-azure-js\n\n```bash\nnpm install @azure/ms-rest-azure-js\n```\n\n##### Sample code\nThe following sample ranks a personalized request object. To know more, refer to the [Azure Documentation on Personalizer](https://docs.microsoft.com/en-us/azure/cognitive-services/personalizer/)\n\n```javascript\nconst { PersonalizerClient } = require(\"@azure/cognitiveservices-personalizer\");\nconst { CognitiveServicesCredentials } = require(\"@azure/ms-rest-azure-js\");\n\nasync function main() {\n  const personalizerKey = process.env[\"personalizerKey\"] || \"<personalizerKey>\";\n  const personalizerEndPoint =\n    process.env[\"personalizerEndPoint\"] || \"<personalizerEndPoint>\";\n  const cognitiveServiceCredentials = new CognitiveServicesCredentials(\n    personalizerKey\n  );\n\n  const client = new PersonalizerClient(\n    cognitiveServiceCredentials,\n    personalizerEndPoint\n  );\n\n  const rankRequest = {\n    contextFeatures: [\n      {\n        timeOfDay: \"Morning\"\n      }\n    ],\n    actions: [\n      {\n        id: \"NewsArticle\",\n        features: [\n          {\n            type: \"News\"\n          }\n        ]\n      },\n      {\n        id: \"SportsArticle\",\n        features: [\n          {\n            type: \"Sports\"\n          }\n        ]\n      },\n      {\n        id: \"EntertainmentArticle\",\n        features: [\n          {\n            type: \"Entertainment\"\n          }\n        ]\n      }\n    ],\n    excludedActions: [\"SportsArticle\"],\n    eventId: \"75269AD0-BFEE-4598-8196-C57383D38E10\",\n    deferActivation: false\n  };\n\n  client\n    .rank(rankRequest)\n    .then(result => {\n      console.log(\"The result is: \");\n      console.log(result);\n    })\n    .catch(err => {\n      console.log(\"An error occurred:\");\n      console.error(err);\n    });\n}\n\nmain();\n```\n\n#### browser - Authentication, client creation and reward events as an example written in JavaScript.\n\n##### Sample code\n\n- index.html\n```html\n<!DOCTYPE html>\n<html lang=\"en\">\n  <head>\n    <title>@azure/cognitiveservices-personalizer sample</title>\n    <script src=\"node_modules/@azure/ms-rest-js/dist/msRest.browser.js\"></script>\n    <script src=\"node_modules/@azure/cognitiveservices-personalizer/dist/cognitiveservices-personalizer.js\"></script>\n    <script type=\"text/javascript\">\n      const personalizerKey = \"<YOUR_PERSONALIZER_KEY>\";\n      const personalizerEndPoint = \"<YOUR_PERSONALIZER_ENDPOINT>\";\n      const cognitiveServiceCredentials = new msRest.ApiKeyCredentials({\n        inHeader: {\n          \"Ocp-Apim-Subscription-Key\": personalizerKey\n        }\n      });\n      const client = new Azure.CognitiveservicesPersonalizer.PersonalizerClient(\n        cognitiveServiceCredentials,\n        personalizerEndPoint\n      );\n\n      const rankRequest = {\n        contextFeatures: [\n          {\n            timeOfDay: \"Morning\"\n          }\n        ],\n        actions: [\n          {\n            id: \"NewsArticle\",\n            features: [\n              {\n                type: \"News\"\n              }\n            ]\n          },\n          {\n            id: \"SportsArticle\",\n            features: [\n              {\n                type: \"Sports\"\n              }\n            ]\n          },\n          {\n            id: \"EntertainmentArticle\",\n            features: [\n              {\n                type: \"Entertainment\"\n              }\n            ]\n          }\n        ],\n        excludedActions: [\"SportsArticle\"],\n        eventId: \"75269AD0-BFEE-4598-8196-C57383D38E10\",\n        deferActivation: false\n      };\n\n      client\n        .rank(rankRequest)\n        .then(result => {\n          console.log(\"The result is: \");\n          console.log(result);\n        })\n        .catch(err => {\n          console.log(\"An error occurred:\");\n          console.error(err);\n        });\n    </script>\n  </head>\n  <body></body>\n</html>\n```\n\n## Related projects\n\n- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js)\n\n![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-js%2Fsdk%2Fcognitiveservices%2Fcognitiveservices-personalizer%2FREADME.png)\n","readmeFilename":"README.md"}