{"_id":"azure-iot-digitaltwins-device","_rev":"92-63bded2d87c49aafc13c87d3876886d3","name":"azure-iot-digitaltwins-device","dist-tags":{"pnp-preview":"1.0.0-preview.3","latest":"1.0.0-preview.2","pnp-refresh":"1.0.0-pnp-refresh.0"},"versions":{"1.0.0-preview.1":{"name":"azure-iot-digitaltwins-device","version":"1.0.0-preview.1","description":"Azure IoT Digital Twin Device Client","author":{"name":"Microsoft Corporation"},"license":"MIT","main":"index.js","typings":"index.d.ts","dependencies":{"azure-iot-device":"1.12.0-preview.1","azure-iot-common":"1.12.0-preview.1","azure-iot-mqtt-base":"1.12.0-preview.1","debug":"^4.1.1","lodash":"^4.17.11","traverse":"^0.6.6"},"devDependencies":{"@types/debug":"^4.1.1","@types/node":"^9.3.0","@types/traverse":"^0.6.29","chai":"^4.2.0","es5-shim":"^4.5.12","sinon":"^7.2.7","istanbul":"^0.4.5","mocha":"^5.2.0","tslint":"^5.9.1","typescript":"2.9.2"},"scripts":{"lint":"tslint --project . -c ../../tslint.json","build":"tsc","unittest-min":"istanbul cover --report none ../../node_modules/mocha/bin/_mocha -- --reporter dot \"test/**/_*_test.js\"","alltest-min":"istanbul cover --report none ../../node_modules/mocha/bin/_mocha -- --reporter dot \"test/**/_*_test*.js\"","unittest":"istanbul cover ../../node_modules/mocha/bin/_mocha -- --reporter spec \"test/**/_*_test.js\"","alltest":"istanbul cover ../../node_modules/mocha/bin/_mocha -- --reporter spec \"test/**/_*_test*.js\"","ci":"npm -s run lint && npm -s run build && npm -s run alltest-min && npm -s run check-cover","test":"npm -s run lint && npm -s run build && npm -s run unittest","check-cover":"istanbul check-coverage --statements 97 --branches 86 --lines 98 --functions 96"},"engines":{"node":">= 0.10"},"repository":{"type":"git","url":"git+https://github.com/Azure/azure-iot-sdk-node.git"},"bugs":{"url":"https://github.com/Azure/azure-iot-sdk-node/issues"},"homepage":"https://github.com/Azure/azure-iot-sdk-node#readme","_resolved":"","_integrity":"","_from":"file:azure-iot-digitaltwins-device-1.0.0-preview.1.tgz","_id":"azure-iot-digitaltwins-device@1.0.0-preview.1","_npmVersion":"6.4.1","_nodeVersion":"10.15.3","_npmUser":{"name":"pierreca","email":"pierreca@microsoft.com"},"dist":{"integrity":"sha512-PV+heSJAQ+vcAZokPN9RTaFytIRHvwyieWHFS3BjA3eW41s/U6UkQPUsc0XbT5JMjNC6Hh1nqYtEmtIKbKyOrg==","shasum":"2c0fafaab6a5fabf021453b80ccbc671b7b51304","tarball":"https://registry.npmjs.org/azure-iot-digitaltwins-device/-/azure-iot-digitaltwins-device-1.0.0-preview.1.tgz","fileCount":25,"unpackedSize":122448,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdUkaGCRA9TVsSAnZWagAAhgAP/2NZVKAiSXeHLlyGn9bY\nnw++Mjed928qqaRmLmUPqcvzCal2nSopiLOnf0nEmMYROgHqnSx8frc1vJcd\nzetOShLCuL/Ww6aIKSxep+LkP302kUC72UtYaRoSfCj/qxUm8fUh8FV9nTYR\naEzzTO0zToidkfya1NViMM/SS0s++l6abKK3x/sjRYu21F0fRjBBw4SEPACv\nrjxOgYHzN1cFhOk5SMyKuwY99K5O2AdszXo2+0yP0flYc/HSxtiOmKnpy2Bk\njNibSFIWFKRHRO/Gx7YALyMNMC+/b/v5+z6y6zQODU1DNmAyih6t17IzC8Bw\nm4zhnmgMAM4xnDlpKB2pTpBs/lM3wkZh44QaEdLi6fF+1ZwFZFx/n9JrYCLP\nkqiHdFh56uR3ep041RFaS9bTvqAr7h/5nWjJHFAfePjD88gPqWo8ovEW0WT9\n5LCzaNUXZAeyg1/WrQ0bUc5kSbbPVZfbgsLhsQIWp5903H35n04kQn8fj/QX\n4bwyt9Hm+hb/s+BbU8g2ZMAiCqCgRxtQwHTCVE9dHYdkIPR6w0sJro7yji4E\nt9SrAv/rQc/Dj+uxAkkmZzQl8r87AERB17aJf7a02ymf8uUNzAQe5SteXwIa\nuxqQ8oFjnEhcNrvy1AvuBHfcbcK5O97YJqmBjKyi8fJUc1o3BRZEE5gSVD7B\ngYm/\r\n=84Uc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCMIhQmTgfDNE1DpNFEGelejuNmHXUAISZRb3tLJ42BPwIhAOsy8hCMpeQbJA8jUumKcug2XHjxVHxwKV5uAQIYLmrH"}]},"maintainers":[{"name":"pierreca","email":"pierreca@microsoft.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/azure-iot-digitaltwins-device_1.0.0-preview.1_1565673093551_0.559265711736292"},"_hasShrinkwrap":false,"deprecated":"Incompatible beta test release - should not be used."},"1.0.0-preview.2":{"name":"azure-iot-digitaltwins-device","version":"1.0.0-preview.2","description":"Azure IoT Digital Twin Device Client","author":{"name":"Microsoft Corporation"},"license":"MIT","main":"index.js","typings":"index.d.ts","dependencies":{"azure-iot-device":"1.12.0-preview.1","azure-iot-common":"1.12.0-preview.1","debug":"^4.1.1","lodash":"^4.17.11","traverse":"^0.6.6"},"devDependencies":{"@types/debug":"^4.1.1","@types/node":"^9.3.0","@types/traverse":"^0.6.29","chai":"^4.2.0","es5-shim":"^4.5.12","sinon":"^7.2.7","istanbul":"^0.4.5","mocha":"^5.2.0","tslint":"^5.9.1","typescript":"2.9.2"},"scripts":{"lint":"tslint --project . -c ../../tslint.json","build":"tsc","unittest-min":"istanbul cover --report none ../../node_modules/mocha/bin/_mocha -- --reporter dot \"test/**/_*_test.js\"","alltest-min":"istanbul cover --report none ../../node_modules/mocha/bin/_mocha -- --reporter dot \"test/**/_*_test*.js\"","unittest":"istanbul cover ../../node_modules/mocha/bin/_mocha -- --reporter spec \"test/**/_*_test.js\"","alltest":"istanbul cover ../../node_modules/mocha/bin/_mocha -- --reporter spec \"test/**/_*_test*.js\"","ci":"npm -s run lint && npm -s run build && npm -s run alltest-min && npm -s run check-cover","test":"npm -s run lint && npm -s run build && npm -s run unittest","check-cover":"istanbul check-coverage --statements 97 --branches 86 --lines 98 --functions 96"},"engines":{"node":">= 0.10"},"repository":{"type":"git","url":"git+https://github.com/Azure/azure-iot-sdk-node.git"},"bugs":{"url":"https://github.com/Azure/azure-iot-sdk-node/issues"},"homepage":"https://github.com/Azure/azure-iot-sdk-node#readme","_resolved":"","_integrity":"","_from":"file:azure-iot-digitaltwins-device-1.0.0-preview.2.tgz","_id":"azure-iot-digitaltwins-device@1.0.0-preview.2","_nodeVersion":"10.16.2","_npmVersion":"6.9.0","dist":{"integrity":"sha512-jcwQo2W9oIu47NTM/w0z4XNXFWvLUjwrMGpoVCTUPZ1PTMtC5h2dz1js+G5o5uOW3gx8pJOuqZNWcEHBeRS8xw==","shasum":"aca1a0e5eae831d36701848a5a86e960cca7d4d1","tarball":"https://registry.npmjs.org/azure-iot-digitaltwins-device/-/azure-iot-digitaltwins-device-1.0.0-preview.2.tgz","fileCount":25,"unpackedSize":123334,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdeoQQCRA9TVsSAnZWagAAncwP/2Rfj4AtJBXmd3IquCHn\nxcl0pQLQO7ZfYlGjSNdYjm5ppVeLs4wHLcoCowbmsiEi0D7BR5UBjOPEQD9K\nJzs7iPvJ0rOu3f850EieVTRUAwtJh7p7H58sPhmflhkXksVNWONED8iFVCh9\n6qel7UIxdUDgPcmxwdxrm/A4TIYMtHYHKyjpas/dj9cD0SCcTLpPzZ85VGUJ\nNVKGgvKZRoPdl1tYYfq/FCAThl4dvonBkBu97eNxbrGqFoJVtvQxQzokzM70\nBaRlogMXPSK6x2Yqv6uN2EvNpBo337hdZfwhSAHnbkzGnuKIzSE4/82jOY2P\nZheAoM0K+zCM/HGM698HhEq91NryvMy6caeLc9EOqQjv7qCSQ4/Bq+gs6HQZ\nOCKKqtFBSNk7NbCkzzPiy2sZqCI9G4WcGtbhd9zYVjzgffT4Jcdy/JvJqF4H\n0+6tNgOYCXLD0+d51SLjj4Y80ImTNYXhtAdSFb0BPk+JGM1+j1ziDRrGDBJ2\nZ4NkvbjE/RbrWCIuXCEagNHI6nXKwHs0iVrXVvqqfTd32EfpWFPxJ7P5vO/V\n2LBOewoWfkZAN2eKCO0sT3m94Wz8M0u/9R3exm48VLkcXsJynFySl2tyHyRD\nyE8fy0sOiQrD95sxQvXSOx99xrWTQdrw8bNLuFi4SujesGYWo70FBVUbpLqc\nQl/V\r\n=preb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICJFS/MhOSbExj7edg5P7Gdjdxca5UW96pEOYoH92Ly+AiEAogr5ZtddbQnvdRVkOHGwoLoMAwjrhQGj6raopj2LUig="}]},"maintainers":[{"email":"toercola@microsoft.com","name":"anthonyvercolano"},{"email":"pierreca@microsoft.com","name":"pierreca"},{"email":"yoseph.maguire@gmail.com","name":"yodama"}],"_npmUser":{"name":"anthonyvercolano","email":"toercola@microsoft.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/azure-iot-digitaltwins-device_1.0.0-preview.2_1568310287455_0.1193095265771893"},"_hasShrinkwrap":false,"deprecated":"Incompatible beta test release - should not be used."},"1.0.0-preview.3":{"name":"azure-iot-digitaltwins-device","version":"1.0.0-preview.3","description":"Azure IoT Digital Twin Device Client","author":{"name":"Microsoft Corporation"},"license":"MIT","main":"index.js","typings":"index.d.ts","dependencies":{"azure-iot-device":"1.12.0-preview.2","azure-iot-common":"1.12.0-preview.2","debug":"^4.1.1","lodash":"^4.17.11","traverse":"^0.6.6"},"devDependencies":{"@types/debug":"^4.1.1","@types/node":"^9.3.0","@types/traverse":"^0.6.29","chai":"^4.2.0","es5-shim":"^4.5.12","sinon":"^7.2.7","istanbul":"^0.4.5","mocha":"^5.2.0","tslint":"^5.9.1","typescript":"2.9.2"},"scripts":{"lint":"tslint --project . -c ../../tslint.json","build":"tsc","unittest-min":"istanbul cover --report none ../../node_modules/mocha/bin/_mocha -- --reporter dot \"test/**/_*_test.js\"","alltest-min":"istanbul cover --report none ../../node_modules/mocha/bin/_mocha -- --reporter dot \"test/**/_*_test*.js\"","unittest":"istanbul cover ../../node_modules/mocha/bin/_mocha -- --reporter spec \"test/**/_*_test.js\"","alltest":"istanbul cover ../../node_modules/mocha/bin/_mocha -- --reporter spec \"test/**/_*_test*.js\"","ci":"npm -s run lint && npm -s run build && npm -s run alltest-min && npm -s run check-cover","test":"npm -s run lint && npm -s run build && npm -s run unittest","check-cover":"istanbul check-coverage --statements 97 --branches 86 --lines 98 --functions 96"},"engines":{"node":">= 0.10"},"repository":{"type":"git","url":"git+https://github.com/Azure/azure-iot-sdk-node.git"},"bugs":{"url":"https://github.com/Azure/azure-iot-sdk-node/issues"},"homepage":"https://github.com/Azure/azure-iot-sdk-node#readme","_resolved":"","_integrity":"","_from":"file:azure-iot-digitaltwins-device-1.0.0-preview.3.tgz","readme":"# Azure IoT Digital Twins Device SDK\r\n\r\n**PREVIEW - WILL LIKELY HAVE BREAKING CHANGES**\r\n\r\n[![npm version](https://badge.fury.io/js/azure-iot-digitaltwins-device.svg)](https://badge.fury.io/js/azure-iot-digitaltwins-device)\r\n\r\n## Features\r\n\r\nUse the Azure IoT Digital Twins Device SDK to:\r\n* Register multiple interfaces that a device implements.\r\n* Send Telemetry data to Azure IoT Hub.\r\n* Report property changes to Azure IoT Hub.\r\n* Receive changes to writable properties.\r\n* Handle synchronous and asynchronous commands from IoTHub.\r\n\r\n## Prerequisites\r\nYou need to install the [Node.js][nodejs_lnk] JavaScript runtime environment to run the Azure IoT JavaScript client SDK on your platform. To check if Node.js supports your platform (OS), verify that an install package is available on the [Node.js download page][nodejs_dwld_lnk].\r\n\r\n[npm][npm_lnk] is a command-line package manager that is installed with Node.js is installed, and will be used to install Azure IoT node.js client side SDK.\r\n\r\n## Latest updates\r\n\r\nThe telemetry interface has been adjusted.  We are de-emphasizing the ability to send individual properties.\r\nWe have introduced a new method on the interface instance called sendTelemetry. Its argument is an object that can\r\nsend multiple properties with a single message.\r\n\r\nWe are likely to remove the ability to do a .send in the near future.\r\n\r\nWe are very likely to in a near future update to be changing the names of some Digital Twin client methods.  Stay tuned.\r\n\r\n## Installation\r\n\r\nTo get the latest version you need to install this package as well as the device client and the MQTT transport that support the digital twin client:\r\n\r\n```shell\r\nnpm install azure-iot-digitaltwins-device@pnp-preview\r\nnpm install azure-iot-device@pnp-preview\r\nnpm install azure-iot-device-mqtt@pnp-preview\r\n```\r\n\r\n## Getting started\r\n\r\nYou can use the code below to send telemetry to IoT Hub.\r\n\r\nNote that for this sample to work, you will need to [setup your IoT hub][lnk-setup-iot-hub] and [provision your device and get its credentials][lnk-manage-iot-hub]. In the code, replace '[IoT Hub device connection string]' with the device credentials created in the IoT Hub.\r\n\r\n```javascript\r\nconst DigitalTwinClient = require('azure-iot-digitaltwins-device').DigitalTwinClient;\r\nconst DeviceClient = require('azure-iot-device').Client;\r\nconst Mqtt = require('azure-iot-device-mqtt').Mqtt;\r\n\r\nconst EnvironmentalSensor = require('./environmentalinterface').EnvironmentalSensor;\r\n\r\nconst propertyUpdateHandler = (interfaceInstance, propertyName, reportedValue, desiredValue, version) => {\r\n  console.log('Received an update for ' + propertyName + ': ' + JSON.stringify(desiredValue));\r\n  interfaceInstance[propertyName].report(desiredValue, {\r\n    code: 200,\r\n    description: 'helpful descriptive text',\r\n    version: version\r\n  })\r\n    .then(() => console.log('updated the property'))\r\n    .catch(() => console.log('failed to update the property'));\r\n};\r\n\r\nconst commandHandler = (request, response) => {\r\n  console.log('received command: ' + request.commandName + ' for interfaceInstance: ' + request.interfaceInstanceName);\r\n  response.acknowledge(200, 'helpful response text')\r\n    .then(() => console.log('acknowledgement succeeded.'))\r\n    .catch(() => console.log('acknowledgement failed'));\r\n};\r\n\r\nconst environmentalSensor = new EnvironmentalSensor('environmentalSensor', propertyUpdateHandler, commandHandler);\r\n\r\nconst deviceClient = DeviceClient.fromConnectionString(process.argv[2], Mqtt);\r\n\r\nconst capabilityModel = 'urn:azureiot:samplemodel:1';\r\n\r\nasync function main() {\r\n  const digitalTwinClient = new DigitalTwinClient(capabilityModel, deviceClient);\r\n  digitalTwinClient.addInterfaceInstance(environmentalSensor);\r\n  await digitalTwinClient.register();\r\n  await environmentalSensor.sendTelemetry({temp: 65.5, humid: 12.2});\r\n  console.log('Done sending telemetry.');\r\n};\r\n\r\nmain();\r\n```\r\n\r\n## Read More\r\n\r\n* [Azure IoT Hub dev center][iot-dev-center]\r\n* [Azure IoT Hub documentation][iot-hub-documentation]\r\n* [API reference][node-api-reference]\r\n\r\n[nodejs_lnk]: https://nodejs.org/\r\n[nodejs_dwld_lnk]: https://nodejs.org/en/download/\r\n[npm_lnk]:https://docs.npmjs.com/getting-started/what-is-npm\r\n[lnk-setup-iot-hub]: https://aka.ms/howtocreateazureiothub\r\n[lnk-manage-iot-hub]: https://aka.ms/manageiothub\r\n[devbox-setup]: https://github.com/Azure/azure-iot-sdk-node/blob/master/doc/node-devbox-setup.md\r\n[device-samples]: https://github.com/Azure/azure-iot-sdk-node-digitaltwins/tree/master/digitaltwins/samples/device\r\n[node-api-reference]: https://docs.microsoft.com/en-us/javascript/api/azure-iot-digitaltwins-device/\r\n[iot-dev-center]: http://azure.com/iotdev\r\n[iot-hub-documentation]: https://docs.microsoft.com/en-us/azure/iot-hub/\r\n","readmeFilename":"readme.md","_id":"azure-iot-digitaltwins-device@1.0.0-preview.3","_nodeVersion":"10.16.2","_npmVersion":"6.9.0","dist":{"integrity":"sha512-X8ufaKCv4bDSmv0eYh6wNChJjMoPRAHDEB0rmpHPfV9I6RglC41dHfPfgdiy98ZVRXUMq1auDx1RN9ITcjVvow==","shasum":"e5532d403332c5da7b7d4e7b51a67ec50e437e6b","tarball":"https://registry.npmjs.org/azure-iot-digitaltwins-device/-/azure-iot-digitaltwins-device-1.0.0-preview.3.tgz","fileCount":25,"unpackedSize":133292,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzevUCRA9TVsSAnZWagAAAUUQAIRCRvMj2pMNRy9K15df\nhnGkQbt0+GbH/U5LL6MQpdi2vfdczwwFWkCzig+BffxYv+YWbtH8c44Asie7\ncx3T9/RdBYeSN0m6wx6ZdYTCtpL892LBeh/RfInbkL7rMbfIYn/7vALn2IlK\nuiJb8FwF1fNVpW8o+AUBHNoRNe//9YXdZdVXdbadG3RwyaMGA9sp85rRy4JH\n+63pWIZjkJ1LVMdg6jljKyjCg8qTBlLFLCU/pk5S2ISjxEEJZ4zix2I39R9a\n4G6yIsFyMSWMYOi61A0Yufoxj1FPkM+X2sVG9rqG8/QTZHK2GpPQJq2pNJcF\nEWaeJkdWcoT6dOVgt96FhTeiKX1ul1GdkQUHSScyGT2H7YtgrwpdEZweDKmy\ntOFcjvRzs97+iaIsisWDdjCP1aeWHxhHAonQ40NyBjtUVy4vasM/6KNqGnar\nYlNXjOTTmm+7cZ1pwNpjffAzguga+qQ3iZ3DcBQyaRoDZh+li1rTBeRIVepC\n0akkVt81A+j+3UcnibxVOQ9ejFCfDx/QJ7/omcHVyipvnEb5ZHBoyxtlSTHM\nxYg3NzmDqnBkcDvGFhzTa6a+J70kidzyL5bNBT9mz92tyhomnLk5+T4OFvsP\nZQODiJNt3/g4EQ6p04U+cV+YNAAqZYjZYFqvfdJewnXht0Txqbyk5Z7Tkh0a\nQp6g\r\n=AFKq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDoh9sVufvkAHONuu8+r729BQ4FrTYzuBVkNt6tb6BZywIgQFiyPpt5v4Vk+52Bdi6gJpWgaWtOB76IPycnT3U2Kkk="}]},"maintainers":[{"email":"toercola@microsoft.com","name":"anthonyvercolano"},{"email":"npmjs@microsoft.com","name":"microsoft"},{"email":"pierreca@microsoft.com","name":"pierreca"},{"email":"azuresdk@outlook.com","name":"windowsazure"},{"email":"yoseph.maguire@gmail.com","name":"yodama"}],"_npmUser":{"name":"anthonyvercolano","email":"toercola@microsoft.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/azure-iot-digitaltwins-device_1.0.0-preview.3_1573776340365_0.954999993508423"},"_hasShrinkwrap":false,"deprecated":"Incompatible beta test release - should not be used."},"1.0.0-pnp-refresh.0":{"name":"azure-iot-digitaltwins-device","version":"1.0.0-pnp-refresh.0","description":"Azure IoT Digital Twin Device Client","author":{"name":"Microsoft Corporation"},"license":"MIT","main":"index.js","typings":"index.d.ts","dependencies":{"azure-iot-common":"1.12.0-pnp-refresh.0","azure-iot-device":"1.12.0-pnp-refresh.0","azure-iot-device-mqtt":"1.12.0-pnp-refresh.0","debug":"^4.1.1","lodash":"^4.17.15","traverse":"^0.6.6"},"devDependencies":{"@types/debug":"^4.1.5","@types/node":"^9.6.50","@types/traverse":"^0.6.32","chai":"^4.2.0","es5-shim":"^4.5.12","mocha":"^7.1.1","nyc":"^15.0.0","sinon":"^7.4.1","source-map-support":"^0.5.16","ts-node":"^8.6.2","tslint":"^6.1.0","typescript":"2.9.2"},"scripts":{"lint":"tslint --project . -c ../../tslint.json","build":"tsc","npmlockrefresh":"npm i --package-lock-only","unittest-min":"tsc && nyc --reporter lcov ../../node_modules/mocha/bin/_mocha --reporter dot","alltest-min":"tsc && nyc --reporter lcov ../../node_modules/mocha/bin/_mocha --reporter dot test/_*_test*.js","unittest":"tsc && nyc --reporter lcov --reporter text ../../node_modules/mocha/bin/_mocha","alltest":"tsc && nyc --reporter lcov --reporter text ../../node_modules/mocha/bin/_mocha test/_*_test*.js","ci":"npm -s run lint && npm -s run build && npm -s run alltest-min"},"nyc":{"exclude":["coverage/**","**/*.d.ts","test{,s}/**","test{,-*}.{js,cjs,mjs,ts}","**/*{.,-}test.{js,cjs,mjs,ts}","**/__tests__/**","**/{ava,nyc}.config.{js,cjs,mjs}","**/jest.config.{js,cjs,mjs,ts}","**/{karma,rollup,webpack}.config.js","**/{babel.config,.eslintrc,.mocharc}.{js,cjs}"],"extension":[".ts",".tsx"],"check-coverage":true,"lines":99,"functions":100,"branches":88,"statements":97},"mocha":{"require":["ts-node/register","source-map-support/register"],"full-trace":true,"bail":true,"spec":"test/**/_*_test.js"},"engines":{"node":">= 10.0.0"},"repository":{"type":"git","url":"git+https://github.com/Azure/azure-iot-sdk-node.git"},"bugs":{"url":"https://github.com/Azure/azure-iot-sdk-node/issues"},"homepage":"https://github.com/Azure/azure-iot-sdk-node#readme","_resolved":"","_integrity":"","_from":"file:D:/a/r1/a/artifacts/packages/azure-iot-digitaltwins-device-1.0.0-pnp-refresh.0.tgz","readme":"# Azure IoT Digital Twins Device SDK\r\n\r\n**PREVIEW - WILL LIKELY HAVE BREAKING CHANGES**\r\n\r\n[![npm version](https://badge.fury.io/js/azure-iot-digitaltwins-device.svg)](https://badge.fury.io/js/azure-iot-digitaltwins-device)\r\n\r\n## Features\r\n\r\nUse the Azure IoT Digital Twins Device SDK to:\r\n* Register multiple interfaces that a device implements.\r\n* Send Telemetry data to Azure IoT Hub.\r\n* Report property changes to Azure IoT Hub.\r\n* Receive changes to writable properties.\r\n* Handle synchronous and asynchronous commands from IoTHub.\r\n\r\n## Prerequisites\r\nYou need to install the [Node.js][nodejs_lnk] JavaScript runtime environment to run the Azure IoT JavaScript client SDK on your platform. To check if Node.js supports your platform (OS), verify that an install package is available on the [Node.js download page][nodejs_dwld_lnk].\r\n\r\n[npm][npm_lnk] is a command-line package manager that is installed with Node.js is installed, and will be used to install Azure IoT node.js client side SDK.\r\n\r\n## Latest updates\r\n\r\nThe telemetry interface has been adjusted.  We are de-emphasizing the ability to send individual properties.\r\nWe have introduced a new method on the interface instance called sendTelemetry. Its argument is an object that can\r\nsend multiple properties with a single message.\r\n\r\nWe are likely to remove the ability to do a .send in the near future.\r\n\r\nWe are very likely to in a near future update to be changing the names of some Digital Twin client methods.  Stay tuned.\r\n\r\n## Installation\r\n\r\nTo get the latest version you need to install this package as well as the device client and the MQTT transport that support the digital twin client:\r\n\r\n```shell\r\nnpm install azure-iot-digitaltwins-device@pnp-preview\r\nnpm install azure-iot-device@pnp-preview\r\nnpm install azure-iot-device-mqtt@pnp-preview\r\n```\r\n\r\n## Getting started\r\n\r\nYou can use the code below to send telemetry to IoT Hub.\r\n\r\nNote that for this sample to work, you will need to [setup your IoT hub][lnk-setup-iot-hub] and [provision your device and get its credentials][lnk-manage-iot-hub]. In the code, replace '[IoT Hub device connection string]' with the device credentials created in the IoT Hub.\r\n\r\n```javascript\r\nconst DigitalTwinClient = require('azure-iot-digitaltwins-device').DigitalTwinClient;\r\nconst DeviceClient = require('azure-iot-device').Client;\r\nconst Mqtt = require('azure-iot-device-mqtt').Mqtt;\r\n\r\nconst EnvironmentalSensor = require('./environmentalinterface').EnvironmentalSensor;\r\n\r\nconst propertyUpdateHandler = (component, propertyName, reportedValue, desiredValue, version) => {\r\n  console.log('Received an update for ' + propertyName + ': ' + JSON.stringify(desiredValue));\r\n  component[propertyName].report(desiredValue, {\r\n    code: 200,\r\n    description: 'helpful descriptive text',\r\n    version: version\r\n  })\r\n    .then(() => console.log('updated the property'))\r\n    .catch(() => console.log('failed to update the property'));\r\n};\r\n\r\nconst commandHandler = (request, response) => {\r\n  console.log('received command: ' + request.commandName + ' for component: ' + request.componentName);\r\n  response.acknowledge(200, 'helpful response text')\r\n    .then(() => console.log('acknowledgement succeeded.'))\r\n    .catch(() => console.log('acknowledgement failed'));\r\n};\r\n\r\nconst environmentalSensor = new EnvironmentalSensor('environmentalSensor', propertyUpdateHandler, commandHandler);\r\n\r\nconst deviceClient = DeviceClient.fromConnectionString(process.argv[2], Mqtt);\r\n\r\nconst modelId = 'dtmi:contoso_device_corp:samplemodel;1';\r\n\r\nasync function main() {\r\n  const digitalTwinClient = new DigitalTwinClient(modelId, deviceClient);\r\n  digitalTwinClient.addComponents(environmentalSensor);\r\n  await digitalTwinClient.register();\r\n  await environmentalSensor.sendTelemetry({temp: 65.5, humid: 12.2});\r\n  console.log('Done sending telemetry.');\r\n};\r\n\r\nmain();\r\n```\r\n\r\n## Read More\r\n\r\n* [Azure IoT Hub dev center][iot-dev-center]\r\n* [Azure IoT Hub documentation][iot-hub-documentation]\r\n* [API reference][node-api-reference]\r\n\r\n[nodejs_lnk]: https://nodejs.org/\r\n[nodejs_dwld_lnk]: https://nodejs.org/en/download/\r\n[npm_lnk]:https://docs.npmjs.com/getting-started/what-is-npm\r\n[lnk-setup-iot-hub]: https://aka.ms/howtocreateazureiothub\r\n[lnk-manage-iot-hub]: https://aka.ms/manageiothub\r\n[devbox-setup]: https://github.com/Azure/azure-iot-sdk-node/blob/master/doc/node-devbox-setup.md\r\n[device-samples]: https://github.com/Azure/azure-iot-sdk-node-digitaltwins/tree/master/digitaltwins/samples/device\r\n[node-api-reference]: https://docs.microsoft.com/en-us/javascript/api/azure-iot-digitaltwins-device/\r\n[iot-dev-center]: http://azure.com/iotdev\r\n[iot-hub-documentation]: https://docs.microsoft.com/en-us/azure/iot-hub/\r\n","readmeFilename":"readme.md","_id":"azure-iot-digitaltwins-device@1.0.0-pnp-refresh.0","_nodeVersion":"12.16.3","_npmVersion":"6.14.4","dist":{"integrity":"sha512-7XB4+jjsWlHCLSUmRjN+Ghyjcsv9eV6XhWz1bN8PInTihk/Ze8kvWRce0nfCEhjHvesEjsnB5N9wyrMuub9SZw==","shasum":"564418339eff280fa247a8f72682f0745164ca33","tarball":"https://registry.npmjs.org/azure-iot-digitaltwins-device/-/azure-iot-digitaltwins-device-1.0.0-pnp-refresh.0.tgz","fileCount":25,"unpackedSize":111498,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJes1vwCRA9TVsSAnZWagAAjUoQAJF+lPEakFXsMpvrmGJ6\naVStYkt2m5dv+rgVCVpm6BCEXRoFnTKgIW+ryxMNHrcVsm7pR5Vw7Mcy4JbM\nGj66YXUSP1XCxU0mqeBmo2T4wlSpYLGYphupPiohpW2k/kPWNmm4CHxmVIhJ\ny0BThb78yhWVTeJabUL9qbB0Nkt0nnyKx1W0JRMbcsxC2nYvzpKp22EYgJC6\nQtKnqWGBQpyH64n0No7ZRZMxzrEHxoAnyTzFr31hlEgFpkz5nvVxa7QjHpAX\nnbmJ86w+zcm8voZLLRIpETNGw6Vxv9ogksxu6jq4AKPko1dfvmL/rhAdscTK\nflbDF2+8MvIf3JUj1+upfjJQ1W3h1pU3vHP2RSbkaU1HGAqTlMO/LBAnJF3G\n51Jc2Lr5orpK9q0UKWMXxVS26YkRKhsRdU6WT7Scx8Yx8zfjZyBguw8qHOF8\nIHy9ewlpMzNH1nC3C+6N3YrR3q1gQpp3MCCkCE8z3iLXFFgtZrJGrygxgJd3\n7P37p6WwvqpQBWHIh8c2O/MmX/9u7DxujH/Lp3+0w+zVJcEF9uJnLASOQmxk\njBb8/Mk2+qYWtQl5vcgqb+GudTteYBZNweP8HcdN0rffINmDPCwVTwiA5K9a\nm/9bM5KH8Wz71qPEV8W11qfxkqU0N1QbjIAI2u9sHhYwVmct7osDwxlz6bw8\nGIEv\r\n=MKwz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEwsomxwGZhThoLooAn8ONJDatcRVlctvCLPkYwMdZH2AiAR6qeVPgcWkWKqfehvmdmVQ2GdkASb0k7BcNdHgbDzHg=="}]},"maintainers":[{"email":"toercola@microsoft.com","name":"anthonyvercolano"},{"email":"azure-sdk-npmjs@microsoft.com","name":"azure-sdk"},{"email":"jelani.brandon@microsoft.com","name":"jebrando"},{"email":"npmjs@microsoft.com","name":"microsoft"},{"email":"azuresdk@outlook.com","name":"windowsazure"},{"email":"yoseph.maguire@gmail.com","name":"yodama"},{"email":"zolvarga@microsoft.com","name":"zolvarga"}],"_npmUser":{"name":"azure-sdk","email":"azure-sdk-npmjs@microsoft.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/azure-iot-digitaltwins-device_1.0.0-pnp-refresh.0_1588812784468_0.32683392700210256"},"_hasShrinkwrap":false,"deprecated":"Incompatible beta test release - should not be used."}},"time":{"created":"2019-08-13T05:11:33.550Z","1.0.0-preview.1":"2019-08-13T05:11:33.706Z","modified":"2022-04-11T16:30:05.063Z","1.0.0-preview.2":"2019-09-12T17:44:47.602Z","1.0.0-preview.3":"2019-11-15T00:05:40.514Z","1.0.0-pnp-refresh.0":"2020-05-07T00:53:04.556Z"},"maintainers":[{"email":"zolvarga@microsoft.com","name":"zolvarga"},{"email":"yoseph.maguire@gmail.com","name":"yodama"},{"email":"azuresdk@outlook.com","name":"windowsazure"},{"email":"toercola@microsoft.com","name":"anthonyvercolano"},{"email":"azure-sdk-npmjs@microsoft.com","name":"azure-sdk"},{"email":"jelani.brandon@microsoft.com","name":"jebrando"}],"description":"Azure IoT Digital Twin Device Client","homepage":"https://github.com/Azure/azure-iot-sdk-node#readme","repository":{"type":"git","url":"git+https://github.com/Azure/azure-iot-sdk-node.git"},"author":{"name":"Microsoft Corporation"},"bugs":{"url":"https://github.com/Azure/azure-iot-sdk-node/issues"},"license":"MIT","readme":"","readmeFilename":""}