{"_id":"@azure/cognitiveservices-anomalydetector","_rev":"8-6a9a2bee41bf90fe85f114a8ad4e2ce1","name":"@azure/cognitiveservices-anomalydetector","dist-tags":{"latest":"2.1.0"},"versions":{"1.0.0":{"name":"@azure/cognitiveservices-anomalydetector","version":"1.0.0","keywords":["node","azure","typescript","browser","isomorphic"],"author":{"name":"Microsoft Corporation"},"license":"MIT","_id":"@azure/cognitiveservices-anomalydetector@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/packages/@azure/cognitiveservices-anomalydetector","bugs":{"url":"https://github.com/azure/azure-sdk-for-js/issues"},"dist":{"shasum":"22a905c06d58a424e57c6ae0ac40e0e8195a5664","tarball":"https://registry.npmjs.org/@azure/cognitiveservices-anomalydetector/-/cognitiveservices-anomalydetector-1.0.0.tgz","fileCount":34,"integrity":"sha512-o1LNsdq0AY6WKmF4pNNxn7/hNofIg7hf7bmA4AdQAAR5B/ZVbIWohyj9gCLJJeJIyVr29XPXXTglIY3rB4G2CQ==","signatures":[{"sig":"MEUCIQClymkWSt1RorxPswCUGyeJpsD5t3MDNFXmMoTd8C53WgIgfAaQtBC0khTTQWNvMFKniTLGqx/bKIIsyQTwacebXmQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":132824,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJckVo0CRA9TVsSAnZWagAARakP/0agUm7WMsZiHpcrhq4k\nspDLO0CxkrkE6utmpF4sZUosseIs97fJ4RxBXROqGFylRwqe1phJ5u+jB+YP\nb6uLQr7t1ZHXPydqgcU0e2Vv1q60plbDSD3u7s81tIJ5AnttbLaHIKL827t0\ngcQCOsP8usowMRrag34MsJK7Zx3TOwZGlNrBxDIraORTdH+cSUwiB2TUet+r\nGBNx2X4V9w8SAjljObtRIZxyS+pv28OvA8nzl/lLImn//wxqbUoOCBGnPFdD\nPrONz3cVbMdqEGN2rZmBnJm5lNcAc0JySupnEVoVuQKZ3GB6XDSLgtzq7Tz8\nSUU6VVlYwQqTQcxY5TUOoBGCXUA2FrcLOfqlBywE/qZaeOFHljaQ4+NT7qqz\nY30tohLnysZhlQuI0zNvTAz0XmE8FNjVfTAbuAsdKPlO4DbS8XUpYW3PJGdd\n3N/bIDEAgim2aoh4qyoh15d25oARpBS33mqa6v0y9SodAjw6tN6bRfUJPsGD\nrwEM+LJt1CzfkdwvYRb2f0dQ6nV6RpfEA4GVxqaP07WH75RkTPGgXCTKWvfm\nHU4QWG2Ihv1MEkHf0ZMwZRBI54n1h+shNVgU2/vFPvfigJf/SHDxPt5jraSA\nKORvBVGhG3CRgQmpk/8Plv0yDy4SF/lPtzLTStOVRFOgGZ+nZQ8A/6FJ2GxW\nR9cE\r\n=dUG9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./dist/cognitiveservices-anomalydetector.js","_from":"file:/home/vsts/work/r1/a/_azure-sdk-for-js - build/drop/azure-cognitiveservices-anomalydetector-1.0.0.tgz","types":"./esm/anomalyDetectorClient.d.ts","module":"./esm/anomalyDetectorClient.js","scripts":{"build":"tsc && rollup -c rollup.config.js && npm run minify","minify":"uglifyjs -c -m --comments --source-map \"content='./dist/cognitiveservices-anomalydetector.js.map'\" -o ./dist/cognitiveservices-anomalydetector.min.js ./dist/cognitiveservices-anomalydetector.js","prepack":"npm install && npm run build"},"_npmUser":{"name":"azure-sdk","email":"azure-sdk-npmjs@microsoft.com"},"_resolved":"","_integrity":"","deprecated":"This library is no longer maintained. Please use @azure-rest/ai-anomaly-detector instead.","repository":{"url":"git+https://github.com/azure/azure-sdk-for-js.git","type":"git"},"_npmVersion":"6.4.1","autoPublish":true,"description":"AnomalyDetectorClient 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.6.0"},"_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-anomalydetector_1.0.0_1553029684113_0.3158277804486975","host":"s3://npm-registry-packages"}},"2.0.0":{"name":"@azure/cognitiveservices-anomalydetector","version":"2.0.0","keywords":["node","azure","typescript","browser","isomorphic"],"author":{"name":"Microsoft Corporation"},"license":"MIT","_id":"@azure/cognitiveservices-anomalydetector@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-anomalydetector","bugs":{"url":"https://github.com/Azure/azure-sdk-for-js/issues"},"dist":{"shasum":"ea817ecc88afcc8e53d4591c5ac03dfe3bf32667","tarball":"https://registry.npmjs.org/@azure/cognitiveservices-anomalydetector/-/cognitiveservices-anomalydetector-2.0.0.tgz","fileCount":34,"integrity":"sha512-zFaacKAi7sQmC8FrxlTVqo88s4vWvBPaLr9wRwYB45COOoxZlVI89HfP/Vmq6zZvTV2CCfTn7SXivilH5jahYA==","signatures":[{"sig":"MEUCIQD9IoaKP9Dsq7huQcRJO5e2IqfT20HbxF0F6hiDHVS5NgIgZMJKAI66XcFBQgUlQL5tT5tmUNdY3w5BdF/roJsLGJ4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":135574,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdeS+cCRA9TVsSAnZWagAAnyEQAIqIryvIOudXto00PYsE\nefQgV40CkgLovo3cbJ23YsK9i0d0/1K01/tJS71dow7FpDRk09MATeCM3Dcn\nqcPFBzMiUC9oOFOD0LHYjECpN6m9mB4jYkZQtAjOCDrx4uRg5k6lGZ5HE3Mp\nS3T/cXSC5GxB228eJ2tCXgWNCiro50pWxvblxii4aUBFh/IKKY9rVmyJT3c2\nPIFVmi4zQSaoXBxzZg69wi3TikKKRjFsBFDxEfpMauOrjyI4ZQy/lsuE//H0\nx9+RG0jBMXli6lxSGeJpcm/hgUbV9leTOwVsWGo/JnHF1oMHAQmK/swpGQff\nIY77c7JlS/KhGgUieF6ufFqYulG4hg0SMB+4Hk/3AmYdFiGSSb4mzlUC9PqK\nu69+WgB2XDhHdTiJqugYUCkQR3kXSCkKgZbXhokLNPWgGack2PWe1woYIneS\nOB28nFb1zdwviolvYb3+2vC8nzWl3jnEa3lVdbtkQMw0GvmI/3OuKwG3J9gy\nl8IJnnHlDYfMng8jK0DdTc3mxoFsm430fAnlxASMN0JUMF4IrFIDJyH2Z2iJ\nASx1gUT7jLKWHA2KKoXUukRRFLNB+lZGieLhJfYV0qwP4UXq3foKgDn/E20G\n+30771QECpmEYsxMTYC4dppjrOlYE29fHCtR827e4GH34pEsMaeW+TT+GBNr\nvX80\r\n=8HIT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./dist/cognitiveservices-anomalydetector.js","_from":"file:/home/vsts/work/r1/a/_js - mgmt - ci/drop/azure-cognitiveservices-anomalydetector-2.0.0.tgz","types":"./esm/anomalyDetectorClient.d.ts","module":"./esm/anomalyDetectorClient.js","scripts":{"build":"tsc && rollup -c rollup.config.js && npm run minify","minify":"uglifyjs -c -m --comments --source-map \"content='./dist/cognitiveservices-anomalydetector.js.map'\" -o ./dist/cognitiveservices-anomalydetector.min.js ./dist/cognitiveservices-anomalydetector.js","prepack":"npm install && npm run build"},"_npmUser":{"name":"azure-sdk","email":"azure-sdk-npmjs@microsoft.com"},"_resolved":"","_integrity":"","deprecated":"This library is no longer maintained. Please use @azure-rest/ai-anomaly-detector instead.","repository":{"url":"git+https://github.com/Azure/azure-sdk-for-js.git","type":"git"},"_npmVersion":"6.9.0","autoPublish":true,"description":"AnomalyDetectorClient 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-anomalydetector_2.0.0_1568223132079_0.6276903370935474","host":"s3://npm-registry-packages"}},"2.1.0":{"name":"@azure/cognitiveservices-anomalydetector","version":"2.1.0","keywords":["node","azure","typescript","browser","isomorphic"],"author":{"name":"Microsoft Corporation"},"license":"MIT","_id":"@azure/cognitiveservices-anomalydetector@2.1.0","maintainers":[{"name":"azure-sdk","email":"azure-sdk-npmjs@microsoft.com"}],"homepage":"https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/cognitiveservices/cognitiveservices-anomalydetector","bugs":{"url":"https://github.com/Azure/azure-sdk-for-js/issues"},"dist":{"shasum":"fdc93f1aafe876b7d0bcb0b6cbb90530c862870a","tarball":"https://registry.npmjs.org/@azure/cognitiveservices-anomalydetector/-/cognitiveservices-anomalydetector-2.1.0.tgz","fileCount":34,"integrity":"sha512-k0QniBRLZxchh8QDijNQHJdmIo+EKUtTUi6guIAGf+29mdO2A4AoUJ41xDHibCp+SzsFKBR1xQyUC3TA/mXn/w==","signatures":[{"sig":"MEYCIQDhTnYalyBAXO7tfk7NUQex4joaKrHu1jMNRHRm7FjTFAIhAO82xB9Bd4/kYRKatDA7Z8wY3Ho9a/QPQS6hqIkoWoIC","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":170374,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfH2uKCRA9TVsSAnZWagAAfYEP/jEFsUemH9+kOVlgcXCS\nNaQRIIQ0mps4Z62kTrhvsq7c6FX5r+qU4+3caQrLdodoFx9L5q2iuZvXet4M\ntIkfSsFpNCXsjG3WidEUmjKpvnhkeQlOeyXzlg//jrpk7OaOMZv06kaYoGiD\nXm3lDmGhhYeVWRuyMYZNdzd92XekMkOGri1y3QuaFSd8tqB2TAlV4Oj9BMKk\nYDD02aIUnmpuJWs+BbRooOuWAzmzlOOkuY9EJvxkZ45jsFPCbiyOvzC30lzG\noU1sNl0L8XdvOhCW6Esr06hZ/aFy4vw4sfAZB9xZYEDbVZNT+5tvqpwsHF9H\nmZO9m1XDL+xbrRusJhGNTD0F7wg/jaj42g9EhMRZTx+rvshzSolY25Vp2Xnx\nVfpvqQw6ImOPuZZKMUnaWBXSuvb3I7zOKZ2zEWZthQv8p4mihlNmQcjhLsCk\nQwZGL7HzB2c7WhYAwfSV3BW5A9gbCdJabP5mNRHtCeFxR3QGdBBnlzf+nhKA\nmLIlCeWx/YkpJdn9GFH8nk1AFWcuTbIAxQXmv8n2Owl2mvxKZ17qNi9ONciy\nAyZX6+WumtH9B2lkBVZcdWUgE8CSSXmdipRU7dHDasNuyKYUkOR8Xt/pAxs4\nbWwQm1URszIeC2V7l8/SkzezVzG3oU29ifClAln7ZZTkV28GR1WRybfdozu/\nD2EN\r\n=t3/f\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./dist/cognitiveservices-anomalydetector.js","_from":"file:/home/vsts/work/r1/a/_js - mgmt - ci/drop/azure-cognitiveservices-anomalydetector-2.1.0.tgz","types":"./esm/anomalyDetectorClient.d.ts","module":"./esm/anomalyDetectorClient.js","scripts":{"build":"tsc && rollup -c rollup.config.js && npm run minify","minify":"uglifyjs -c -m --comments --source-map \"content='./dist/cognitiveservices-anomalydetector.js.map'\" -o ./dist/cognitiveservices-anomalydetector.min.js ./dist/cognitiveservices-anomalydetector.js","prepack":"npm install && npm run build"},"_npmUser":{"name":"azure-sdk","email":"azure-sdk-npmjs@microsoft.com"},"_resolved":"","_integrity":"","deprecated":"This library is no longer maintained. Please use @azure-rest/ai-anomaly-detector instead.","repository":{"url":"git+https://github.com/Azure/azure-sdk-for-js.git","type":"git"},"_npmVersion":"6.14.4","autoPublish":true,"description":"AnomalyDetectorClient 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-anomalydetector_2.1.0_1595894665879_0.34457327124237946","host":"s3://npm-registry-packages"}}},"time":{"created":"2019-03-19T21:08:03.941Z","modified":"2026-03-19T20:30:38.845Z","1.0.0":"2019-03-19T21:08:04.281Z","2.0.0":"2019-09-11T17:32:12.169Z","2.1.0":"2020-07-28T00:04:26.030Z"},"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-anomalydetector","keywords":["node","azure","typescript","browser","isomorphic"],"repository":{"url":"git+https://github.com/Azure/azure-sdk-for-js.git","type":"git"},"description":"AnomalyDetectorClient Library with typescript type definitions for node.js and browser.","maintainers":[{"email":"azure-sdk-npmjs@microsoft.com","name":"azure-sdk"},{"email":"npmjs@microsoft.com","name":"microsoft1es"},{"email":"microsoft-oss-publishing@microsoft.com","name":"microsoft-oss-releases"}],"readme":"## An isomorphic javascript sdk for - AnomalyDetectorClient\n\nThis package contains an isomorphic SDK for AnomalyDetectorClient.\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-anomalydetector\n```\n\n### How to use\n\n#### nodejs - Authentication, client creation and entireDetect 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 determines anamolies with the given time series. To know more, refer to the [Azure Documentation on Anomaly Detectors](https://docs.microsoft.com/en-us/azure/cognitive-services/anomaly-detector/)\n\n```javascript\nconst { AnomalyDetectorClient } = require(\"@azure/cognitiveservices-anomalydetector\");\nconst { CognitiveServicesCredentials } = require(\"@azure/ms-rest-azure-js\");\n\nasync function main() {\n  const anomalyDetectorKey = process.env[\"anomalyDetectorKey\"] || \"<anomalyDetectorKey>\";\n  const anomalyDetectorEndPoint =\n    process.env[\"anomalyDetectorEndPoint\"] || \"<anomalyDetectorEndPoint>\";\n\n  const cognitiveServiceCredentials = new CognitiveServicesCredentials(anomalyDetectorKey);\n\n  const client = new AnomalyDetectorClient(cognitiveServiceCredentials, anomalyDetectorEndPoint);\n\n  const body = {\n    series: [\n      {\n        timestamp: new Date(\"December 15, 2018\"),\n        value: 1.01\n      },\n      {\n        timestamp: new Date(\"December 16, 2018\"),\n        value: 1.02\n      },\n      {\n        timestamp: new Date(\"December 17, 2018\"),\n        value: 1.03\n      },\n      {\n        timestamp: new Date(\"December 18, 2018\"),\n        value: 1.04\n      },\n      {\n        timestamp: new Date(\"December 19, 2018\"),\n        value: 1.05\n      },\n      {\n        timestamp: new Date(\"December 20, 2018\"),\n        value: 1.06\n      },\n      {\n        timestamp: new Date(\"December 21, 2018\"),\n        value: 1.07\n      },\n      {\n        timestamp: new Date(\"December 22, 2018\"),\n        value: 1.08\n      },\n      {\n        timestamp: new Date(\"December 23, 2018\"),\n        value: 1.09\n      },\n      {\n        timestamp: new Date(\"December 24, 2018\"),\n        value: 1.1\n      },\n      {\n        timestamp: new Date(\"December 25, 2018\"),\n        value: 1.11\n      },\n      {\n        timestamp: new Date(\"December 26, 2018\"),\n        value: 1.12\n      }\n    ],\n    granularity: \"daily\",\n    customInterval: 1,\n    period: 1,\n    maxAnomalyRatio: 0.3,\n    sensitivity: 1\n  };\n\n  client\n    .entireDetect(body)\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 entireDetect as an example written in JavaScript.\n\n##### Sample code\n\n- index.html\n\n```html\n<!DOCTYPE html>\n<html lang=\"en\">\n  <head>\n    <title>@azure/cognitiveservices-anomalydetector sample</title>\n    <script src=\"node_modules/@azure/ms-rest-js/dist/msRest.browser.js\"></script>\n    <script src=\"node_modules/@azure/cognitiveservices-anomalydetector/dist/cognitiveservices-anomalydetector.js\"></script>\n    <script type=\"text/javascript\">\n      const anomalyDetectorKey = \"<YOUR_ANOMALY_DETECTOR_KEY>\";\n      const anomalyDetectorEndPoint = \"<YOUR_ANOMALY_DETECTOR_ENDPOINT>\";\n      const cognitiveServiceCredentials = new msRest.ApiKeyCredentials({\n        inHeader: {\n          \"Ocp-Apim-Subscription-Key\": anomalyDetectorKey\n        }\n      });\n      const client = new Azure.CognitiveservicesAnomalydetector.AnomalyDetectorClient(\n        cognitiveServiceCredentials,\n        anomalyDetectorEndPoint\n      );\n\n      const body = {\n        series: [\n          {\n            timestamp: new Date(\"December 15, 2018\"),\n            value: 1.01\n          },\n          {\n            timestamp: new Date(\"December 16, 2018\"),\n            value: 1.02\n          },\n          {\n            timestamp: new Date(\"December 17, 2018\"),\n            value: 1.03\n          },\n          {\n            timestamp: new Date(\"December 18, 2018\"),\n            value: 1.04\n          },\n          {\n            timestamp: new Date(\"December 19, 2018\"),\n            value: 1.05\n          },\n          {\n            timestamp: new Date(\"December 20, 2018\"),\n            value: 1.06\n          },\n          {\n            timestamp: new Date(\"December 21, 2018\"),\n            value: 1.07\n          },\n          {\n            timestamp: new Date(\"December 22, 2018\"),\n            value: 1.08\n          },\n          {\n            timestamp: new Date(\"December 23, 2018\"),\n            value: 1.09\n          },\n          {\n            timestamp: new Date(\"December 24, 2018\"),\n            value: 1.1\n          },\n          {\n            timestamp: new Date(\"December 25, 2018\"),\n            value: 1.11\n          },\n          {\n            timestamp: new Date(\"December 26, 2018\"),\n            value: 1.12\n          }\n        ],\n        granularity: \"daily\",\n        customInterval: 1,\n        period: 1,\n        maxAnomalyRatio: 0.3,\n        sensitivity: 1\n      };\n\n      client\n        .entireDetect(body)\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-anomalydetector%2FREADME.png)\n","readmeFilename":"README.md"}