{"_id":"@azure/digitaltwins","_rev":"7-2ecbae6f547c082a8c999f1af6316d0a","name":"@azure/digitaltwins","dist-tags":{"dev":"1.0.0-alpha.20200903.1","latest":"1.0.0-alpha.20200903.1"},"versions":{"1.0.0-alpha.20200903.1":{"name":"@azure/digitaltwins","version":"1.0.0-alpha.20200903.1","keywords":["azure","iot","digitaltwins","twins","node","typescript","browser","isomorphic"],"author":{"name":"Microsoft Corporation"},"license":"MIT","_id":"@azure/digitaltwins@1.0.0-alpha.20200903.1","maintainers":[{"name":"azure-sdk","email":"azure-sdk-npmjs@microsoft.com"},{"name":"southpolesteve","email":"southpolesteve@gmail.com"},{"name":"christopheranderson","email":"chrande@outlook.com"}],"homepage":"https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/digitaltwins/","bugs":{"url":"https://github.com/azure/azure-sdk-for-js/issues"},"dist":{"shasum":"338d4f4120c501a3be7f22fc861506b0b7018c39","tarball":"https://registry.npmjs.org/@azure/digitaltwins/-/digitaltwins-1.0.0-alpha.20200903.1.tgz","fileCount":33,"integrity":"sha512-G/HpNfeCKdNCzt20OR3McGXglt0qvX57YrtVxyQgeebCH0JpfZ1mVdq7MAkIKQFrdIz4wt+6HrxNnbYPiGDJqw==","signatures":[{"sig":"MEUCIB9KGjOHbZrhwh5r64eVszMSKl+MxzhgO7yeNpEiUFQbAiEA+J8+arshjlP81Oj7SVa0rqIVB3+foO6JPpyy7wmoTTU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":560434,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUV47CRA9TVsSAnZWagAAsWkQAIBp8Ofewj2Rj6i5LuXb\nrfwyMdKisy5Y1PD24ctjNXWO8ojGVAO0ukiOdeSwvobel6PIwtcDiKFISxn2\n6qZ4w1uQ1xdHfTWOlJEu6mR42gb4Cq1eykksai+GJYql2Z9OUohbW9PcPunR\n70HFMJiw1S4ZahKmnS+Y/ROmO0H1epsXifkzYR473zkHyMeAkCFPIjnmcdTV\nPWrPGjghIjwbzkj1XG4mINVP8oaFwdalPxk8Ocle5WFHriKvozDyA+gHSkCu\nJTHeKkcQcD1m5UEEA1SYsWAeiBIkdJeKKQKMXxMwk4JA7uK1DAW5FIPLcyYZ\nIiEOUMVCQoEeJRPIuf6J9MtTIe6lvWOcf0GHC73JPGXt662pyiMV6WtzWLfz\n3bIMbLPN/b73n7INq6QbwZvAa0JQKF7OBCfX1iVPwRmKSZWq4XoaT5N+e5O/\nhJPIpP64EwIpfZv/wbjcO7H8CoLV8GSDuR4XgVJMwYmoStrkCxcDouEbIhrr\nFfWGpxhd88TqoOc39DyuLVSfZP4vCyb6rShB2tGE+imdwpmrDLD2NmJFdjly\nwT5rCMB8va0XVn6KTQSPrlV3kmHZ3aaRcKUYdayBdcD1rUqA574IgJYnIFNy\nfKo18s1tb7cMopoxVRdE9MOBFKdhsZotG8OnARiJhG1ATpqN4jsb9TEGrYO9\nmZbz\r\n=XGsQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","_from":"file:/home/vsts/work/1/packages/azure-digitaltwins-1.0.0-alpha.20200903.1.tgz","types":"types/digitalTwinsClient.d.ts","module":"dist-esm/src/index.js","scripts":{"lint":"eslint package.json api-extractor.json src test --ext .ts -f html -o search-lintReport.html || exit 0","pack":"npm pack 2>&1","test":"npm run clean && npm run build:test && npm run unit-test","audit":"node ../../../common/scripts/rush-audit.js && rimraf node_modules package-lock.json && npm i --package-lock-only 2>&1 && npm audit","build":"npm run build:node && npm run build:browser","clean":"rimraf dist dist-esm dist-browser test-dist test-browser types *.tgz *.log","format":"prettier --write --config ../../.prettierrc.json --ignore-path ../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"","coverage":"nyc --reporter=lcov --exclude-after-remap=false mocha -t 120000 dist-test/index.node.js --reporter ../../../common/tools/mocha-multi-reporter.js","lint:fix":"eslint package.json api-extractor.json src test --ext .ts --fix --fix-type [problem,suggestion]","prebuild":"npm run clean","test:node":"npm run clean && npm run build:test:node && npm run unit-test:node","unit-test":"npm run unit-test:node && npm run unit-test:browser","build:node":"tsc -p . && cross-env ONLY_NODE=true rollup -c 2>&1 && npm run extract-api","build:test":"npm run build:test:node && npm run build:test:browser","extract-api":"tsc -p . && api-extractor run --local","check-format":"prettier --list-different --config ../../.prettierrc.json --ignore-path ../../.prettierignore \"src/**/*.ts\" \"test/**/*.ts\" \"*.{js,json}\"","test:browser":"npm run clean && npm run build:test:browser && npm run unit-test:browser","build:browser":"tsc -p . && cross-env ONLY_BROWSER=true rollup -c 2>&1","unit-test:node":"mocha --require source-map-support/register --reporter ../../../common/tools/mocha-multi-reporter.js --timeout 180000 --full-trace dist-test/index.node.js","build:test:node":"tsc -p . && cross-env ONLY_NODE=true rollup -c rollup.test.config.js 2>&1","execute:samples":"npm run build:samples && npm run execute:js-samples && npm run execute:ts-samples","integration-test":"npm run integration-test:node && npm run integration-test:browser","unit-test:browser":"karma start --single-run","build:test:browser":"tsc -p . && cross-env ONLY_BROWSER=true rollup -c rollup.test.config.js 2>&1","execute:js-samples":"node ../../../common/scripts/run-samples.js samples/javascript/","integration-test:node":"npm run build:test:node && nyc mocha -r esm --require source-map-support/register --reporter ../../../common/tools/mocha-multi-reporter.js --timeout 180000 --full-trace dist-esm/test/*.spec.js dist-esm/test/**/*.spec.js","integration-test:browser":"npm run build:test:browser && cross-env TEST_MODE=live karma start --single-run"},"_npmUser":{"name":"azure-sdk","email":"azure-sdk-npmjs@microsoft.com"},"sdk-type":"client","_resolved":"","_integrity":"","deprecated":"This package is deprecated in favor of @azure/digital-twins-core.","repository":{"url":"git+https://github.com/azure/azure-sdk-for-js.git","type":"git"},"_npmVersion":"6.14.8","description":"An isomorphic client library for Azure Digital Twins","directories":{},"sideEffects":false,"_nodeVersion":"12.18.3","dependencies":{"tslib":"^2.0.0","@azure/logger":"^1.0.0","@azure/core-http":"^1.1.6","@azure/core-paging":"^1.1.1","@opentelemetry/api":"^0.10.2"},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^14.0.0","chai":"^4.2.0","util":"^0.12.1","karma":"^5.1.0","mocha":"^7.1.1","sinon":"^9.0.2","dotenv":"^8.2.0","eslint":"^6.1.0","rimraf":"^3.0.0","rollup":"^1.16.3","inherits":"^2.0.3","prettier":"^1.16.4","cross-env":"^7.0.2","typescript":"~3.9.3","@types/chai":"^4.1.6","@types/node":"^8.0.0","karma-mocha":"^2.0.1","@types/mocha":"^7.0.2","@types/sinon":"^9.0.4","karma-coverage":"^2.0.0","@azure/identity":"^1.1.0-alpha","karma-ie-launcher":"^1.0.0","rollup-plugin-shim":"^1.0.0","@rollup/plugin-json":"^4.0.0","karma-edge-launcher":"^0.4.2","karma-junit-reporter":"^2.0.1","karma-mocha-reporter":"^2.2.5","karma-remap-istanbul":"^0.6.0","mocha-junit-reporter":"^1.18.0","rollup-plugin-terser":"^5.1.1","eslint-plugin-no-null":"^1.0.2","eslint-plugin-promise":"^4.1.1","karma-chrome-launcher":"^3.0.0","@rollup/plugin-replace":"^2.2.0","eslint-config-prettier":"^6.0.0","karma-env-preprocessor":"^0.1.1","karma-firefox-launcher":"^1.1.0","@rollup/plugin-commonjs":"11.0.2","karma-json-preprocessor":"^0.3.3","@microsoft/api-extractor":"7.7.11","rollup-plugin-sourcemaps":"^0.4.2","rollup-plugin-visualizer":"^4.0.4","@typescript-eslint/parser":"^2.0.0","@azure/test-utils-recorder":"^1.0.0-alpha","@rollup/plugin-multi-entry":"^3.0.0","@rollup/plugin-node-resolve":"^8.0.0","eslint-plugin-no-only-tests":"^2.3.0","karma-json-to-file-reporter":"^1.0.1","@azure/eslint-plugin-azure-sdk":"^3.0.0-alpha","@typescript-eslint/eslint-plugin":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/digitaltwins_1.0.0-alpha.20200903.1_1599168058792_0.23058653128941686","host":"s3://npm-registry-packages"}}},"time":{"created":"2020-09-03T21:20:58.580Z","modified":"2026-03-19T19:52:51.946Z","1.0.0-alpha.20200903.1":"2020-09-03T21:20:58.925Z"},"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/digitaltwins/","keywords":["azure","iot","digitaltwins","twins","node","typescript","browser","isomorphic"],"repository":{"url":"git+https://github.com/azure/azure-sdk-for-js.git","type":"git"},"description":"An isomorphic client library for Azure Digital Twins","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":"# Azure Azure DigitalTwins client library for JavaScript\n\nThis package contains an isomorphic SDK for Azure DigitalTwins API to provide access to the Azure Digital Twins service for managing twins, models, relationships, etc.\n\n## Getting started\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/digitaltwins\n```\n\n### How to use\n\n#### nodejs - Authentication, client creation and list digitalTwinModels as an example written in TypeScript.\n\n##### Install @azure/ms-rest-nodeauth\n\n```bash\nnpm install @azure/ms-rest-nodeauth\n```\n\n##### Sample code\n\n```typescript\nimport * as coreHttp from \"@azure/core-http\";\nimport * as coreArm from \"@azure/core-arm\";\nimport * as msRestNodeAuth from \"@azure/ms-rest-nodeauth\";\nimport {\n  AzureDigitalTwinsAPI,\n  AzureDigitalTwinsAPIModels,\n  AzureDigitalTwinsAPIMappers\n} from \"@azure/digitaltwins\";\nconst subscriptionId = process.env[\"AZURE_SUBSCRIPTION_ID\"];\nmsRestNodeAuth\n  .interactiveLogin()\n  .then((creds) => {\n    const client = new AzureDigitalTwinsAPI(creds, subscriptionId);\n    const dependenciesFor = [\"testdependenciesFor\"];\n    const includeModelDefinition = true;\n    const maxItemCount = 1;\n    client.digitalTwinModels\n      .list(dependenciesFor, includeModelDefinition, maxItemCount)\n      .then((result) => {\n        console.log(\"The result is:\");\n        console.log(result);\n      });\n  }\n  .catch((err) => {\n    console.error(err);\n  })\n```\n\n#### browser - Authentication, client creation and list digitalTwinModels as an example written in JavaScript.\n\n##### Install @azure/ms-rest-browserauth\n\n```bash\nnpm install @azure/ms-rest-browserauth\n```\n\n##### Sample code\n\nSee https://github.com/Azure/ms-rest-browserauth to learn how to authenticate to Azure in the browser.\n\n- index.html\n\n```html\n<!DOCTYPE html>\n<html lang=\"en\">\n  <head>\n    <title>@azure/digitaltwins sample</title>\n    <script src=\"node_modules/@azure/core-http/dist/coreHttp.browser.js\"></script>\n    <script src=\"node_modules/@azure/core-arm/dist/coreArm.js\"></script>\n    <script src=\"node_modules/@azure/ms-rest-browserauth/dist/msAuth.js\"></script>\n    <script src=\"node_modules/@azure/digitaltwins/dist/digitaltwins.js\"></script>\n    <script type=\"text/javascript\">\n      const subscriptionId = \"<Subscription_Id>\";\n      const authManager = new msAuth.AuthManager({\n        clientId: \"<client id for your Azure AD app>\",\n        tenant: \"<optional tenant for your organization>\"\n      });\n      authManager.finalizeLogin().then((res) => {\n        if (!res.isLoggedIn) {\n          // may cause redirects\n          authManager.login();\n        }\n        const client = new Azure.Digitaltwins.AzureDigitalTwinsAPI(res.creds, subscriptionId);\n        const dependenciesFor = [\"testdependenciesFor\"];\n        const includeModelDefinition = true;\n        const maxItemCount = 1;\n        client.digitalTwinModels\n          .list(dependenciesFor, includeModelDefinition, maxItemCount)\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    </script>\n  </head>\n  <body></body>\n</html\n```\n\n## Key concepts\n\nAzure Digital Twins Preview is an Azure IoT service that creates comprehensive models of the physical environment. It can create spatial intelligence graphs to model the relationships and interactions between people, spaces, and devices.\nYou can learn more about Azure Digital Twins by visiting [Azure Digital Twins Documentation](https://docs.microsoft.com/en-us/azure/digital-twins/)\n\n## Examples\n\nPlease take a look at the Readme file in\n[samples](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/digitaltwins/digitaltwins/samples)\ndirectory for detailed examples on how to use this library.\n\n## Troubleshooting\n\n### Enable logs\n\nYou can set the following environment variable to get the debug logging output when using this library.\n\n```bash\nexport AZURE_LOG_LEVEL=verbose\n```\n\nFor more detailed instructions on how to enable logs, you can look at the [@azure/logger package docs](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/core/logger).\n\n## Next steps\n\nPlease take a look at the\n[samples](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/digitaltwins/digitaltwins/samples)\ndirectory for detailed examples on how to use this library.\n\n## Contributing\n\nIf you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/blob/master/CONTRIBUTING.md) to learn more about how to build and test the code.\n\n## Related projects\n\n- [Microsoft Azure SDK for Javascript](https://github.com/Azure/azure-sdk-for-js)\n  ![Impressions](https://github.com/Azure/azure-sdk-for-js/tree/master/sdk/digitaltwins/digitaltwins/README.md)\n","readmeFilename":"README.md"}