{"_id":"@gnaudio/jabra-node-sdk","_rev":"88-01a46fc56449bb2fe61ccb81717e2527","name":"@gnaudio/jabra-node-sdk","dist-tags":{"beta":"3.5.1-beta.0","latest":"3.6.2"},"versions":{"2.0.0-beta.1":{"name":"@gnaudio/jabra-node-sdk","version":"2.0.0-beta.1","keywords":["jabra","sdk"],"author":{"name":"GN Audio"},"license":"MIT","_id":"@gnaudio/jabra-node-sdk@2.0.0-beta.1","maintainers":[{"name":"sskjabra","email":"sklausen@jabra.com"},{"name":"extmchristensen","email":"extmchristensen@jabra.com"},{"name":"daniel_vasile_42","email":"fvasile@jabra.com"},{"name":"frederiksen","email":"mrtn.frederiksen@gmail.com"}],"homepage":"https://github.com/gnaudio/jabra-node-sdk/","bugs":{"url":"https://developer.jabra.com/site/global/support/index.gsp"},"dist":{"shasum":"804100f3443941bcc9cdc3adf819d69ca8b5f9ba","tarball":"https://registry.npmjs.org/@gnaudio/jabra-node-sdk/-/jabra-node-sdk-2.0.0-beta.1.tgz","fileCount":141,"integrity":"sha512-SfFxJPLQ/Q+rpqdW2/6yMhURDHZbGdKaf/SXvrwkI1G/a+5HZ5kFzrO0QA6pVdfm1A13oTVnN2ppmKHBDbs81w==","signatures":[{"sig":"MEUCIQDAQHagJCSVP0IGh7yAtyaQHSidQai4+CnyU8vrFGsqcgIgCuPNl0Ub7tEhenDb5nDSBcWfMJAd/BumWcpoTC2llNg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":13414871,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdjKZICRA9TVsSAnZWagAAmFAP/jdFAYWKuN9U7hTPOvp6\n+FH8O9nF9hbh/DG0dzb+wuvqHkdUCOaBQ2LgObee3EAUeBdDYj0eN86UxbIx\nUFTlbAX7ThGKUjox5gwzVIGXu6O5W3DEaza0We5FJ2wllzWITSIXAmJtb15Y\nbLsvKYoNeuRBWtblUJPo5IuqM/HNm0aimarh5btDkFGnEMW3e7BvndSGzpk7\nvDuGz7al+a8/di+g88gotgCJs6WOUnaZYXrlfpL+JuEZ2CATJ0y+8cPBStvu\n1iFfTWLX13FcXQSwEBtBuJ0U0KJAq8lQHBNYMqXGIDvQ0Z4NSyyBVConPnEa\n4ZMzhgnC7bzkfwvTBu+V6YmRC48wRUXAQl9U2RWBS9GDBb4/LcMPR1cDadSs\nGitE66x8OO+ET0YEiwCA2M4GM5P/mtj00huk52UpWlW1MO2ZTeDKOUgfDLd6\nmk8eHpkfUoiTddJjC1ubX1LCl7qyypxwplllU0YXLMJhUdS2IwpYeC48cd8u\nuUex0PX5AiYvgPRnKaZN5qM+mzHdmN5+WVjSWLPeGDoYbStepRWTrBi9lxw/\nknISS1R0H13bWDNetJyLCQnxIZhN4wLRywmUr26Ph7bPo05CkwVp/bhfgfpL\nC4ecA8l1jmLwsszg2kPiJTKTPFxY4OZaN6IjBCKsQEjI7QBPVXyC09YfyKgB\nsyIU\r\n=6ox0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/main/index.js","types":"dist/main/index.d.ts","gypfile":true,"scripts":{"doc":"typedoc --mode file --excludePrivate --out dist/doc src/main","tsc":"tsc && copyfiles -u 1 src/**/*.js dist","build":"npm run build:dev","clean":"node-gyp clean && rimraf dist","install":"node-gyp rebuild","prepare":"npm run tsc && npm run doc && node dist/script/generatemeta.js","example2":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example2.ts","example3":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example3.ts","build:dev":"node-gyp rebuild --debug && npm run tsc","example1a":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example1a.js","example1b":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example1b.ts","manueltest1":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/manueltest/test1.ts","manueltest2":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/manueltest/test2.ts","generatemeta":"ts-node src/script/generatemeta.ts","build:release":"node-gyp rebuild && npm run tsc","pipeline-build-setversion":"node setversion.js"},"_npmUser":{"name":"extmchristensen","email":"extmchristensen@jabra.com"},"devEngines":{"npm":">=5.5.1","node":">=11.0.0"},"repository":{"url":"git+https://github.com/gnaudio/jabra-node-sdk.git","type":"git"},"_npmVersion":"6.7.0","description":"NodeJS SDK for Jabra Devices","directories":{},"_nodeVersion":"11.12.0","dependencies":{"bindings":"1.5.0","node-addon-api":"1.6.3"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"2.6.3","ts-node":"8.4.1","typedoc":"0.15.0","copyfiles":"2.1.0","cross-env":"5.2.0","typescript":"3.6.3","@types/node":"12.7.5","@types/bindings":"1.3.0","replace-in-file":"4.1.3"},"_npmOperationalInternal":{"tmp":"tmp/jabra-node-sdk_2.0.0-beta.1_1569498695158_0.6344597043946143","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"2.0.0-beta.2":{"name":"@gnaudio/jabra-node-sdk","version":"2.0.0-beta.2","keywords":["jabra","sdk"],"author":{"name":"GN Audio"},"license":"MIT","_id":"@gnaudio/jabra-node-sdk@2.0.0-beta.2","maintainers":[{"name":"daniel_vasile_42","email":"fvasile@jabra.com"},{"name":"extmchristensen","email":"extmchristensen@jabra.com"},{"name":"frederiksen","email":"mrtn.frederiksen@gmail.com"},{"name":"sskjabra","email":"sklausen@jabra.com"}],"homepage":"https://github.com/gnaudio/jabra-node-sdk/","bugs":{"url":"https://developer.jabra.com/site/global/support/index.gsp"},"dist":{"shasum":"b3ef5d3eca122f4eb6c1af3dc018df9c93bec4b3","tarball":"https://registry.npmjs.org/@gnaudio/jabra-node-sdk/-/jabra-node-sdk-2.0.0-beta.2.tgz","fileCount":140,"integrity":"sha512-dE1307uI/aO8EryI9ylKdkRcWGQDGWQOvKHzL2OVptshVbMYYWYbnAf30z4KTvVKuengH4GUCQqu8PoAK6XPPw==","signatures":[{"sig":"MEYCIQCsDgMu+OvWRI8CkyMUOIAkiNV9lsmPcpb5wnihRseGQgIhANWRi+h+nIgBJG7yU9NCXgBwGzBfndOy19iyjDVEL+T5","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":13391710,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdlwUrCRA9TVsSAnZWagAAeVwP/iJGycJNWIt4Cw+n1ttS\nAynFxIZr3R+tNFTJIDdGnKYa9Mfx/Yb995PRsW8/D2EpStJWevL6XWWHGm29\nrQTIkLhJzbnId/HyR+uP23cuwijWoITWwZK6yyXwFBWaFgE+G+arSZU31NGy\nHEfIvlFZJTiGpupxcVMDU02KO/GGha6Scqf/ea6vd19a2e1CrUesCF32SdFH\n2idAUbkV5nUuBwRogMg+fK5wBpJuca06fDghQ7NrT02hVf8pblejFdxTOMSI\noQc5z0WUjykR33QDS36VbNWw6zObjAfYScSrgifowD0K/0t1/jLjUqRSdT3j\neYLklxq5+zS3mYN5zWl4y3HZsfgqIstDTw63NBNOrFEL223xWeJNrsMOAAr5\nvs4qxMKVdV0KMrQSMhb0HHpM3B1NiUExUYuuEjZGQly4A1WEh8O4LdvHVdDZ\nM/1c5YpjrICKD95l6JB1TwwNBdsBYnQbp2vhPRob8z2l5Jg2m5BTQtvUqpjD\nw6xReDJVtxlRZUhO8qS7HqGoQ6+6k8c3gIAO6UsvjmUncSw1CXjUfTt1Br5n\ne+0u6bm5PORwufJf+S8sv2bl2Il6dO6yz/lO/Vck5BqO0z6wGjBclNU1M0Dk\n7Ka0v9Ai/hFF9FFzyPVvmDPZ3S3f1dMuNWkkWtsAxrMP+i3rZKz/qGrzQidz\n4gI3\r\n=lzQw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/main/index.js","types":"dist/main/index.d.ts","gypfile":true,"scripts":{"doc":"typedoc --mode file --excludePrivate --excludeExternals --excludeNotExported --out dist/doc src/main","tsc":"tsc && copyfiles -u 1 src/**/*.js dist","build":"npm run build:dev","clean":"node-gyp clean && rimraf dist","install":"node-gyp rebuild","prepare":"npm run tsc && npm run doc && node dist/script/generatemeta.js","example2":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example2.ts","example3":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example3.ts","build:dev":"node-gyp rebuild --debug && npm run tsc","example1a":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example1a.js","example1b":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example1b.ts","manueltest1":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/manueltest/test1.ts","manueltest2":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/manueltest/test2.ts","generatemeta":"ts-node src/script/generatemeta.ts","build:release":"node-gyp rebuild && npm run tsc","pipeline-build-setversion":"node setversion.js"},"_npmUser":{"name":"extmchristensen","email":"extmchristensen@jabra.com"},"devEngines":{"npm":">=5.5.1","node":">=11.0.0"},"repository":{"url":"git+https://github.com/gnaudio/jabra-node-sdk.git","type":"git"},"_npmVersion":"6.7.0","description":"NodeJS SDK for Jabra Devices","directories":{},"_nodeVersion":"11.12.0","dependencies":{"bindings":"1.5.0","node-addon-api":"1.6.3"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"2.6.3","ts-node":"8.4.1","typedoc":"0.15.0","copyfiles":"2.1.1","cross-env":"5.2.0","typescript":"3.6.3","@types/node":"12.7.5","@types/bindings":"1.3.0","replace-in-file":"4.1.3"},"_npmOperationalInternal":{"tmp":"tmp/jabra-node-sdk_2.0.0-beta.2_1570178347133_0.2865015014961805","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"2.0.0-beta.3":{"name":"@gnaudio/jabra-node-sdk","version":"2.0.0-beta.3","keywords":["jabra","sdk"],"author":{"name":"GN Audio"},"license":"MIT","_id":"@gnaudio/jabra-node-sdk@2.0.0-beta.3","maintainers":[{"name":"daniel_vasile_42","email":"fvasile@jabra.com"},{"name":"extmchristensen","email":"extmchristensen@jabra.com"},{"name":"frederiksen","email":"mrtn.frederiksen@gmail.com"},{"name":"sskjabra","email":"sklausen@jabra.com"}],"homepage":"https://github.com/gnaudio/jabra-node-sdk/","bugs":{"url":"https://developer.jabra.com/site/global/support/index.gsp"},"dist":{"shasum":"9c6c0eae090031e74ca200f6df3aabf65048d84d","tarball":"https://registry.npmjs.org/@gnaudio/jabra-node-sdk/-/jabra-node-sdk-2.0.0-beta.3.tgz","fileCount":147,"integrity":"sha512-qA2u5fNaqJ+6q8En5eVzwlNPffHdOuGarerf/8yKGmlgAgwP5RIUwLHYjQSkupYr+QxQBc6cNBIqg0r5v90VyA==","signatures":[{"sig":"MEYCIQD26B/Wn50FCcCKQgaQU1TaDcKFP4G4j3/34Ghe0vi2qAIhALpMnKKaeI0lJp+jTepEeohW/rSTuPrAJe8xBKAEonqR","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":13486320,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdoFuTCRA9TVsSAnZWagAAh+4P+wYP6TKX3lU2uvXMPqxG\nPfPzE5qkyOuz+V8wqTDxETRY/hWfAs2D+0+32u0ILHRSeAOvYwREww7XVLTY\n9euBnSalMHXnp1qh51pa2okyc9G04P7GzHamRDl/FIXVK5Qc1NU67y2wrcbN\nHfyF1hLdpT3nNGrFVJ/VZRk86I5M/QItHpjIr4emji/OTLl9XpvKcQP1SdwM\nZXUC+XT6pf/vGidK93UhbvE/757a/2Ehrpfh4N3FO6yLTaqm1eTlGTM0hogh\nwdt5/vMHwyxA/C7JN1ReSBzwU4PiJbez+1Qqwv/9+4+uYOxSEgnP3hbBt8cr\nnbie17X/Nf05twGGP/0dT+IoGh09JZJbrVX/00LKhaI17ZiBdeKOQZg8qCsp\ncTJN0O5jA2AAjhqfek6CaCbIO0K08+iFbQeyAmMtz2AlsyVQc/rmma448wID\n2YbqF9v6TRMy4uQrM/ZJf+rTPk7X9X80rr736iLuf7DWvht0ldEAu1QLCdB5\nDQHucrstE2J43zbg0jIpJ/FRxpRRLMXXh60nYtfZczf7Kr11FPEafQgN5+bS\noQ8rhm44fv4IpYAU+dSTdAEMABcjKJb76NqWxnJQekxy0x//+hAcUltGRPiT\ni08dRAwWkXVk0NJRc2EcPDV81cFIyCQFxOc7OfzkvSLn17hi5gZtKTIDOSoz\nEdFX\r\n=vBC0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/main/index.js","types":"dist/main/index.d.ts","gypfile":true,"scripts":{"doc":"typedoc --mode file --excludePrivate --excludeExternals --excludeNotExported --out dist/doc src/main","tsc":"tsc","build":"npm run build:dev","clean":"node-gyp clean && rimraf dist","install":"node-gyp rebuild","prepare":"npm run tsc && npm run doc && node dist/script/generatemeta.js","example2":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example2.ts","example3":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example3.ts","build:dev":"node-gyp rebuild --debug && npm run tsc && npm run generatemeta","example1a":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example1a.js","example1b":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example1b.ts","manueltest1":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/manueltest/test1.ts","manueltest2":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/manueltest/test2.ts","generatemeta":"ts-node src/script/generatemeta.ts","build:release":"node-gyp rebuild && npm run tsc && npm run generatemeta","pipeline-build-setversion":"node setversion.js"},"_npmUser":{"name":"extmchristensen","email":"extmchristensen@jabra.com"},"devEngines":{"npm":">=5.5.1","node":">=11.0.0"},"repository":{"url":"git+https://github.com/gnaudio/jabra-node-sdk.git","type":"git"},"_npmVersion":"6.7.0","description":"NodeJS SDK for Jabra Devices","directories":{},"_nodeVersion":"11.12.0","dependencies":{"bindings":"1.5.0","node-addon-api":"1.7.1"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"2.6.3","ts-node":"8.4.1","typedoc":"0.15.0","cross-env":"6.0.3","typescript":"3.6.3","@types/node":"12.7.11","@types/bindings":"1.3.0","replace-in-file":"4.1.3"},"_npmOperationalInternal":{"tmp":"tmp/jabra-node-sdk_2.0.0-beta.3_1570790290993_0.8435273894123949","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"2.0.0-beta.4":{"name":"@gnaudio/jabra-node-sdk","version":"2.0.0-beta.4","keywords":["jabra","sdk"],"author":{"name":"GN Audio"},"license":"MIT","_id":"@gnaudio/jabra-node-sdk@2.0.0-beta.4","maintainers":[{"name":"daniel_vasile_42","email":"fvasile@jabra.com"},{"name":"extmchristensen","email":"extmchristensen@jabra.com"},{"name":"frederiksen","email":"mrtn.frederiksen@gmail.com"},{"name":"sskjabra","email":"sklausen@jabra.com"}],"homepage":"https://github.com/gnaudio/jabra-node-sdk/","bugs":{"url":"https://developer.jabra.com"},"dist":{"shasum":"7be467d97a6623efb70f2409a2c82876c814771f","tarball":"https://registry.npmjs.org/@gnaudio/jabra-node-sdk/-/jabra-node-sdk-2.0.0-beta.4.tgz","fileCount":147,"integrity":"sha512-uKY20d3173bbB8EGjYkOKctIAgS7/rd6BW8NhEitb3Oi3rQG5Z51OF/ORPoN0gZk2ykGk4JUtSeejGEbsthC+A==","signatures":[{"sig":"MEUCIQCzCXj8ecsfx7EGpcF7XvctDZgwQAR1vaJ+H6+pNhSNbQIgbiQE0WciShJFrI9ThpmdX7ko2QVGHi3SuglofuTy/iY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":13490673,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdsCtfCRA9TVsSAnZWagAAGUoP/0JW/AZ8UQWeeT/hO2dZ\n8WYzcCuR91k0I1EpDmv3aFfcY3ZJoEsI9krqkwTr9PIfIjsMH/Ej2t3b1EWi\nRdWuMXXObarjKurBvH2T4OEGS5G/X4KYFH4K8BF0Dl1OX7XVujNqpjo3ywO1\nrkhjS3gCPyxHPJ34a2CLSAJhSlFlnXThsFbLDvggfR2JjF6Of28bUevvnM4S\njPCxqFXS6HOmy9qEPBZWKcCMZgEo/SEc5BbgIZv1Dk5Gvwv+O/t0QaBuGi+l\npndO6NNmrthrHABwG5FDSzx+WCWWitZoMeRLiPzzNn75CeRhUKwr5QGAYhtF\n2obR4wrj80J4FcKyx+bdIjsezEtIQe2WMcJ+iuIXUmDRstS2IUiKCp8KKQUP\nd/VCa9gx9TkyuGbysGTtNLyKbcqMpX+T+gsTWn0Baj8ipczEJvj7GIxLNMYG\n+Rf/jyzYhSKwm6Hy6SikJhkbe+u57BJ+irUDZGdiuao2y+MOo06IM6vMHCiq\nbhesicFZblkQ2g4HZqaYxHm//zNsn0HeQf+8YvyB59I4sr1yfWzL9Lhankix\n8eVI9yZAqt5MTOmeTxtIh8dcjVelAqJi70Gk7a0LyxOZJve5bzkz43vC3ibR\n9qwddpPN++8TUAjFi3BDH47cLFFL38kxJnrZyqNM8/C2zSawy/3l5MiT0eqy\n1gL3\r\n=gp5N\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/main/index.js","types":"dist/main/index.d.ts","gypfile":true,"scripts":{"doc":"typedoc --mode file --excludePrivate --excludeExternals --excludeNotExported --out dist/doc src/main","tsc":"tsc","build":"npm run build:dev","clean":"node-gyp clean && rimraf dist","install":"node-gyp rebuild","prepare":"npm run tsc && npm run doc && node dist/script/generatemeta.js","example2":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example2.ts","example3":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example3.ts","build:dev":"node-gyp rebuild --debug && npm run tsc && npm run generatemeta","example1a":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example1a.js","example1b":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example1b.ts","manueltest1":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/manueltest/test1.ts","manueltest2":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/manueltest/test2.ts","generatemeta":"ts-node src/script/generatemeta.ts","build:release":"node-gyp rebuild && npm run tsc && npm run generatemeta","pipeline-build-setversion":"node setversion.js"},"_npmUser":{"name":"extmchristensen","email":"extmchristensen@jabra.com"},"devEngines":{"npm":">=5.5.1","node":">=10.0.0"},"repository":{"url":"git+https://github.com/gnaudio/jabra-node-sdk.git","type":"git"},"_npmVersion":"6.7.0","description":"NodeJS SDK for Jabra Devices","directories":{},"_nodeVersion":"11.12.0","dependencies":{"bindings":"1.5.0","node-addon-api":"1.7.1"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"2.6.3","ts-node":"8.4.1","typedoc":"0.15.0","cross-env":"6.0.3","typescript":"3.6.3","@types/node":"12.7.11","@types/bindings":"1.3.0","replace-in-file":"4.1.3"},"_npmOperationalInternal":{"tmp":"tmp/jabra-node-sdk_2.0.0-beta.4_1571826526676_0.8421373487263544","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"2.0.0-beta.5":{"name":"@gnaudio/jabra-node-sdk","version":"2.0.0-beta.5","keywords":["jabra","sdk"],"author":{"name":"GN Audio"},"license":"MIT","_id":"@gnaudio/jabra-node-sdk@2.0.0-beta.5","maintainers":[{"name":"daniel_vasile_42","email":"fvasile@jabra.com"},{"name":"extmchristensen","email":"extmchristensen@jabra.com"},{"name":"frederiksen","email":"mrtn.frederiksen@gmail.com"},{"name":"sskjabra","email":"sklausen@jabra.com"}],"homepage":"https://github.com/gnaudio/jabra-node-sdk/","bugs":{"url":"https://developer.jabra.com"},"dist":{"shasum":"bcebc1c4fa28b1da50b5f340837fb050c6c41b1d","tarball":"https://registry.npmjs.org/@gnaudio/jabra-node-sdk/-/jabra-node-sdk-2.0.0-beta.5.tgz","fileCount":147,"integrity":"sha512-OrsybEINyAArsFL2QXkh7gqztmsdiOfoJ6QOk1qUdebBsrsb8GeDdePqUk7yLprZ/9D5IdI0AxgDL7ZH78G+7Q==","signatures":[{"sig":"MEUCIQD7HxjfjLgo2dJptBtolfJwRS0RS9jspzBDrgBthkABzgIgQ7RvRae/hORdmACKQWokGZyQeBU6Pw/2kn+Ax2AR7vA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":13490021,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdsqhXCRA9TVsSAnZWagAAnHcQAIq3Y+h3/cHo9b58Ur12\nhKPPJP9FCNB/bFplPXglP19leu+n0Nkn1tDoU2Ipip2R67djcP7zqarjDxUt\nDO5JD999B8+SAWinAfsiBNpXHTBaN1EWbjSgN4OTHzkTfpQqegFV54RVF6D0\nFV1FyTwkCg9Fm1f57p0poJJ9vfGWosdR6Ph/mNDo8GKNVuaNg7yRZSeIH7nY\nHfMgqGTVTmNggpn1ykO21hIo8LNoJD30sQc7Ip9dwM7X9h7hXKKqf6uXuVfX\nv9Z6Jp1CJkUdpyIUvAS5cI0jMduvkJ1ycMTNOyQ2wOT6S0pyut+Ki/lxHBNg\nHBgEAsuBrl4+t2mR0ekJC51SZKOHfpRquw/Q+d3/MbmUzDiFmUshhaA+1J6p\n/d1OGFQs1oo9B/qRXcFtF/yADfJUruNsjFapLk4UYD9qdQn9HEF1TpWW4O90\neowtqAwFVeuA6ENVJGzBmHH+0Jh/oqiyP9EAU2wkooNmvaDsS/otZlW4BTix\nN9C/0nk01X9V/h0XaGZzIPuJZEDqu9+I0GT83XBzsrx1yea94jkCKW8zrfjq\n1iH35jqTtWeE/Qf4O45niTdK1KLnmrnzu4PVuwRTPm7VgjgrxL2mbY+yCklm\nVW27SLQ35MwzenoLLpGveqHqchEsr71rIHCR8jQeWSnYxeZQMAtCQnxCODaE\nCMWa\r\n=yMMl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/main/index.js","types":"dist/main/index.d.ts","gypfile":true,"scripts":{"doc":"typedoc --mode file --excludePrivate --excludeExternals --excludeNotExported --out dist/doc src/main","tsc":"tsc","build":"npm run build:dev","clean":"node-gyp clean && rimraf dist","install":"node-gyp rebuild","prepare":"npm run tsc && npm run doc && node dist/script/generatemeta.js","example2":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example2.ts","example3":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example3.ts","build:dev":"node-gyp rebuild --debug && npm run tsc && npm run generatemeta","example1a":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example1a.js","example1b":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example1b.ts","manueltest1":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/manueltest/test1.ts","manueltest2":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/manueltest/test2.ts","generatemeta":"ts-node src/script/generatemeta.ts","build:release":"node-gyp rebuild && npm run tsc && npm run generatemeta","pipeline-build-setversion":"node setversion.js"},"_npmUser":{"name":"extmchristensen","email":"extmchristensen@jabra.com"},"devEngines":{"npm":">=5.5.1","node":">=10.0.0"},"repository":{"url":"git+https://github.com/gnaudio/jabra-node-sdk.git","type":"git"},"_npmVersion":"6.7.0","description":"NodeJS SDK for Jabra Devices","directories":{},"_nodeVersion":"11.12.0","dependencies":{"bindings":"1.5.0","node-addon-api":"1.7.1"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"2.6.3","ts-node":"8.4.1","typedoc":"0.15.0","cross-env":"6.0.3","typescript":"3.6.3","@types/node":"12.7.11","@types/bindings":"1.3.0","replace-in-file":"4.1.3"},"_npmOperationalInternal":{"tmp":"tmp/jabra-node-sdk_2.0.0-beta.5_1571989590438_0.8170321714974635","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"2.0.0-beta.6":{"name":"@gnaudio/jabra-node-sdk","version":"2.0.0-beta.6","keywords":["jabra","sdk"],"author":{"name":"GN Audio"},"license":"MIT","_id":"@gnaudio/jabra-node-sdk@2.0.0-beta.6","maintainers":[{"name":"daniel_vasile_42","email":"fvasile@jabra.com"},{"name":"extmchristensen","email":"extmchristensen@jabra.com"},{"name":"frederiksen","email":"mrtn.frederiksen@gmail.com"},{"name":"sskjabra","email":"sklausen@jabra.com"}],"homepage":"https://github.com/gnaudio/jabra-node-sdk/","bugs":{"url":"https://developer.jabra.com"},"dist":{"shasum":"0ba717a84e7f736d0b3c04227c8707a7ca7dc5ea","tarball":"https://registry.npmjs.org/@gnaudio/jabra-node-sdk/-/jabra-node-sdk-2.0.0-beta.6.tgz","fileCount":153,"integrity":"sha512-H37QCBtyBHHB9EZMORb66HWo9suPxx9RrXs7iUUORH06KvBsaKUMkTqgjUBpw83Jrq5XYH3hScWJVZnPRhXtzg==","signatures":[{"sig":"MEUCIEVYAqplzN6nVglQjYWIaQf/1r1Y/BW6dPh/t4FmuAtnAiEAg5jsR+Xynnx7mWZlQHN+ZNlLESDYHTcdlc1oJrMd5CQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":13673110,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJduCZPCRA9TVsSAnZWagAAEiQP/0NX3IWllNB2RHD9vwvY\neeIx4E+pePYBj9ZKkRR0QkGHDIJyxmF5q/XIe0I6mdF4ZtWjvcu5BDsHH+Bw\nvHOFKqoHt9BoYaF79VU5fbqtr8HSmvWC6fK5vk2Moa7oBYYQ6TP5sx8dgg9g\nN5E6a+SzdUkzUXYkAm+TgPO00alRtV8ZTFeXwWAU7k73N0n0CO3HPTQm+NB1\nYf0KzSG294mW7f+XPBo30wL8ptijSNjdQ91Rhyf+EGzDq2U0eRi50jy6WRpW\n8UGtt1mju6IZaBRyWufl6wC0wNp0stI2LUmX5k2SHzFp0KkKPQRcP0REQrGh\nFpz5NpsqQ8HdsrMUC+vGOfQFNaqr9GS9LCLDiUq1dqbQ+CHv80YqziNeyq7c\ncWSu2O+fkr4Vggp9NvtBKLMZmnQvUuf8+lxBYu0jARyGxmiADWuRkbkmHTmQ\n9O5dtI2K4MOU2Bj6Z+XwA9dH/pxzqu/oB/lMHGdsT9nVAGR5eroeS1DHHFC3\np8TQYUBLaaDNq7SyJqaHT87aOSJKsOaaze79iKPAZYywX/W+jyUAfXJCsi9n\ndKW/yeLBVvfvxszNAPntCUvEXdwFYTW3bfaAT+QqOHrYXIyyRtDzrlkrB97r\nM7QP58qHOg1QafWZFprC16vX2bJsro2lkHjsJToKuJhzEoVTH6/qI0qOesHq\nom3N\r\n=slue\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/main/index.js","types":"dist/main/index.d.ts","gypfile":true,"scripts":{"doc":"typedoc --mode file --excludePrivate --excludeExternals --excludeNotExported --out dist/doc src/main","tsc":"tsc","build":"npm run build:dev","clean":"node-gyp clean && rimraf dist","install":"node-gyp rebuild","prepare":"npm run tsc && npm run doc && node dist/script/generatemeta.js","example2":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example2.ts","example3":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example3.ts","build:dev":"node-gyp rebuild --debug && npm run tsc && npm run generatemeta","example1a":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example1a.js","example1b":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example1b.ts","manueltest1":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/manueltest/test1.ts","manueltest2":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/manueltest/test2.ts","generatemeta":"ts-node src/script/generatemeta.ts","build:release":"node-gyp rebuild && npm run tsc && npm run generatemeta","pipeline-build-setversion":"node setversion.js"},"_npmUser":{"name":"extmchristensen","email":"extmchristensen@jabra.com"},"devEngines":{"npm":">=5.5.1","node":">=10.0.0"},"repository":{"url":"git+https://github.com/gnaudio/jabra-node-sdk.git","type":"git"},"_npmVersion":"6.7.0","description":"NodeJS SDK for Jabra Devices","directories":{},"_nodeVersion":"11.12.0","dependencies":{"bindings":"1.5.0","node-addon-api":"1.7.1"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"2.6.3","ts-node":"8.4.1","typedoc":"0.15.0","cross-env":"6.0.3","typescript":"3.6.3","@types/node":"12.7.11","@types/bindings":"1.3.0","replace-in-file":"4.1.3"},"_npmOperationalInternal":{"tmp":"tmp/jabra-node-sdk_2.0.0-beta.6_1572349518558_0.519403918166929","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"2.0.0-beta.7":{"name":"@gnaudio/jabra-node-sdk","version":"2.0.0-beta.7","keywords":["jabra","sdk"],"author":{"name":"GN Audio"},"license":"MIT","_id":"@gnaudio/jabra-node-sdk@2.0.0-beta.7","maintainers":[{"name":"daniel_vasile_42","email":"fvasile@jabra.com"},{"name":"extmchristensen","email":"extmchristensen@jabra.com"},{"name":"frederiksen","email":"mrtn.frederiksen@gmail.com"},{"name":"sskjabra","email":"sklausen@jabra.com"}],"homepage":"https://github.com/gnaudio/jabra-node-sdk/","bugs":{"url":"https://developer.jabra.com"},"dist":{"shasum":"ddbaafc5ed6b30d12a006be101ea42981b249a00","tarball":"https://registry.npmjs.org/@gnaudio/jabra-node-sdk/-/jabra-node-sdk-2.0.0-beta.7.tgz","fileCount":145,"integrity":"sha512-oAmmIsNzst356N1eDFkk3Ejz7KcQu8h4AjL3ByfOw7a02FsaoeFipFsYPSHQfQKyRKsmI75Xh4xJD44IjAmW3g==","signatures":[{"sig":"MEYCIQDXxkdyz+7VMLrNp19go5VKhb74Nq+arEznErh7clYOwAIhAMLFGW8pYTp8PKlJ64S2TFHTbphdkJJ1n2S4DwgC8d4z","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":13606961,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdwC9LCRA9TVsSAnZWagAA/RIQAI6P1WsOHrwd0Ir5dfgf\ngXmaeTYQTKunPGzhxQXcv4M0yeiw6e37a8vq7V19ArESCu/i2EGW/fDYVldG\nsrLonW2ZuMqKsbe1mSYrb7Htv1eZMmrH+emgJ5qI9btI7K8ULyJX8iTdtsIB\ndoEgnyXheaXn4fcXJ8N6PvzV34tdxqH60Qh2mukO6FN23PeIMrJxgFTwJL2w\nGs36dpjH26w8QFsVMXNRQg3CaILnfKfwZ1iAwX/hc4HUytBOz/xUQoG1AhJO\ndNcecWxPhKpiyZLVDsSa5854mWtUymkqPD+qQzGhzu8nCvYpWmAftGhXquFE\nCMd58I6dDaUvaJaNJKvR2/t0ADEdb1Tfj7eYXRdTtvqLrsvhRFR1har3Voth\nE5ppgZUZyVtU5jxpLiev6ibxjnCDiQlS6SwBSVtHrVuqiBQ1xdlaoecQm8xY\njXVy68J51yXejE4No6giffLHLAbcQFQ55AxPCVYITpl5H73eEqUicpErBpGR\nM3V/EIXDGlKIWREXKm2p0nywFyCY4jPTzwB23JOv2ys4FfBOY+nt6EEs/52k\nvlua1OcNUAwM/EX61L38Kde8v8+eFv3crYKKON/nRfxnHaGVQhI0eufySN3x\nHtatXZiprWvuH50KM8C4phRjxwQElcmitMsf6tlYKDGOaXmshGsRGIZ1nm3T\nlTPF\r\n=PnVY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/main/index.js","types":"dist/main/index.d.ts","gypfile":true,"scripts":{"doc":"typedoc --mode file --excludePrivate --excludeExternals --excludeNotExported --out dist/doc src/main","tsc":"tsc","build":"npm run build:dev","clean":"node-gyp clean && rimraf dist","install":"node-gyp rebuild","prepare":"npm run tsc && npm run doc && node dist/script/generatemeta.js","example2":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example2.ts","example3":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example3.ts","build:dev":"node-gyp rebuild --debug && npm run tsc && npm run generatemeta","example1a":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example1a.js","example1b":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example1b.ts","manueltest1":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/manueltest/test1.ts","manueltest2":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/manueltest/test2.ts","generatemeta":"ts-node src/script/generatemeta.ts","build:release":"node-gyp rebuild && npm run tsc && npm run generatemeta","pipeline-build-setversion":"node setversion.js"},"_npmUser":{"name":"extmchristensen","email":"extmchristensen@jabra.com"},"devEngines":{"npm":">=5.5.1","node":">=10.0.0"},"repository":{"url":"git+https://github.com/gnaudio/jabra-node-sdk.git","type":"git","directory":"nodesdk"},"_npmVersion":"6.7.0","description":"NodeJS SDK for Jabra Devices","directories":{},"_nodeVersion":"11.12.0","dependencies":{"bindings":"1.5.0","node-addon-api":"1.7.1"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"2.6.3","ts-node":"8.4.1","typedoc":"0.15.0","cross-env":"6.0.3","typescript":"3.6.3","@types/node":"12.7.11","@types/bindings":"1.3.0","replace-in-file":"4.1.3"},"_npmOperationalInternal":{"tmp":"tmp/jabra-node-sdk_2.0.0-beta.7_1572876107008_0.12461226093099542","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"2.0.0-beta.8":{"name":"@gnaudio/jabra-node-sdk","version":"2.0.0-beta.8","keywords":["jabra","sdk"],"author":{"name":"GN Audio"},"license":"MIT","_id":"@gnaudio/jabra-node-sdk@2.0.0-beta.8","maintainers":[{"name":"daniel_vasile_42","email":"fvasile@jabra.com"},{"name":"extmchristensen","email":"extmchristensen@jabra.com"},{"name":"frederiksen","email":"mrtn.frederiksen@gmail.com"},{"name":"sskjabra","email":"sklausen@jabra.com"}],"homepage":"https://github.com/gnaudio/jabra-node-sdk/","bugs":{"url":"https://developer.jabra.com"},"dist":{"shasum":"6e0b113bd4a561ae62d69e4c9198cfee929fe508","tarball":"https://registry.npmjs.org/@gnaudio/jabra-node-sdk/-/jabra-node-sdk-2.0.0-beta.8.tgz","fileCount":145,"integrity":"sha512-ME+hnehVCKqAXzl8coUkfrBDReSYVEklCO2zvkoBVfW97uhT8eT42ERQUgS36W5eFLnmCG0Z83dpVrYaNpr6dA==","signatures":[{"sig":"MEUCIQDUiWwO9eCtncVu+am9g1gApBM/RegEwQamWdQ1YIz1vwIgatqW/FgGd1l/D5COMknSU+LuvWm+6EIqFwhjBe4UVog=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":13611368,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdxATICRA9TVsSAnZWagAA/ZkP/1t2j40RQXSzoL2KzwVQ\n4PJ+utP9I3Akl4xRJMjSF1fTY4sNK9zJpLGMQSljDrroESC2/LRw8xA+0cry\nW7s0+X8c6U8/DFWcyql2rLuz4wrYf/sd52u/0OQXYr7QaZi1wFI6jG6m5jWx\nztUkDqy/7FuaG8xaek5aykrj/Nz1sKx1XuJB+Vmb5BWjB/oMFizDlJVHTqXV\n99sbCJzVf+rZNBztTkM3+4xeSsl0aMMz2WB4mDAxTCElHzJugTa312LMsFf/\nkZ78VlA/Phr6wf+HZP8BRhFBcwllYDZUAbBlmX5QVrHegNdfcIMUqr6oXnAN\nYPxbeh5eUb6zgzxgoFl0ea0mikk0K8jRlIpJnXbDy5yBQq9QyJyz6usyT/h+\nSY0+3Pyk63J6hs8NnYSK89wrTOj+ccG6vYUliz3/Cp3wHK5xAB4OGZfuHNoD\n0qf5SB8bLrJ4lAJBvnSEsYI4SQupoNID0QR/VtDy3PB3/mW6LtahRpZEAHgg\nl142mQltSOuzbdoiv4D7gLSiHmT0lGc/V74Ld5yKzJYF3JYC5vq5ApO8DDZr\n2RYfD/ItUmcA46/bxQ0kS6KE32Hw6QBFKve4fFbfFssKUr7z+4kVnoiCbDmC\nSB190tZRM6bn8clOYSDWuKaNjn0bxjmSaAMxMGeoIo1onmfXL5IvWQKIXFvE\nZ1tQ\r\n=GESt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/main/index.js","types":"dist/main/index.d.ts","gypfile":true,"scripts":{"doc":"typedoc --mode file --excludePrivate --excludeExternals --excludeNotExported --out dist/doc src/main","tsc":"tsc","build":"npm run build:dev","clean":"node-gyp clean && rimraf dist","install":"node-gyp rebuild","prepare":"npm run tsc && npm run doc && node dist/script/generatemeta.js","example2":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example2.ts","example3":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example3.ts","build:dev":"node-gyp rebuild --debug && npm run tsc && npm run generatemeta","example1a":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example1a.js","example1b":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example1b.ts","manueltest1":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/manueltest/test1.ts","manueltest2":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/manueltest/test2.ts","generatemeta":"ts-node src/script/generatemeta.ts","build:release":"node-gyp rebuild && npm run tsc && npm run generatemeta","pipeline-build-setversion":"node setversion.js"},"_npmUser":{"name":"extmchristensen","email":"extmchristensen@jabra.com"},"devEngines":{"npm":">=5.5.1","node":">=10.0.0"},"repository":{"url":"git+https://github.com/gnaudio/jabra-node-sdk.git","type":"git","directory":"nodesdk"},"_npmVersion":"6.7.0","description":"NodeJS SDK for Jabra Devices","directories":{},"_nodeVersion":"11.12.0","dependencies":{"bindings":"1.5.0","node-addon-api":"1.7.1"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"2.6.3","ts-node":"8.4.1","typedoc":"0.15.0","cross-env":"6.0.3","typescript":"3.6.3","@types/node":"12.7.11","@types/bindings":"1.3.0","replace-in-file":"4.1.3"},"_npmOperationalInternal":{"tmp":"tmp/jabra-node-sdk_2.0.0-beta.8_1573127367838_0.07473277126313516","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"2.0.0-beta.9":{"name":"@gnaudio/jabra-node-sdk","version":"2.0.0-beta.9","keywords":["jabra","sdk"],"author":{"name":"GN Audio"},"license":"MIT","_id":"@gnaudio/jabra-node-sdk@2.0.0-beta.9","maintainers":[{"name":"daniel_vasile_42","email":"fvasile@jabra.com"},{"name":"extmchristensen","email":"extmchristensen@jabra.com"},{"name":"frederiksen","email":"mrtn.frederiksen@gmail.com"},{"name":"sskjabra","email":"sklausen@jabra.com"}],"homepage":"https://github.com/gnaudio/jabra-node-sdk/","bugs":{"url":"https://developer.jabra.com"},"dist":{"shasum":"e1790b4e523d9d1534573e83a984b5634e621ab4","tarball":"https://registry.npmjs.org/@gnaudio/jabra-node-sdk/-/jabra-node-sdk-2.0.0-beta.9.tgz","fileCount":146,"integrity":"sha512-iSimWb0FSA7HD2bZ3PFPBKX1zQ3ZG3roSR9gEh88Rfu0NTAIzGNVVkU8/mk3KiJJDDiqR++yNNcfkvGaS2Lwqw==","signatures":[{"sig":"MEUCIBMDoB+g3SH2QGexO/Y2Hga9xdS/ybeUarBNnFkyLhfuAiEArZAmnxVmJkhfv9ZH8gV03Cn/2tHc4qdX+1fbjzwXNVs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":13644112,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdzRobCRA9TVsSAnZWagAA2h4P/3iVCATTg5ZpSzXcsx4R\nuiF84tGEOZMPdcV0rWIQ29HpEoRoeaAMo+VB7Pn2JqVTNET6dE+2hLCsLuah\n03DffokP6jWyNVwqdnlPChHSySftDRoCXBeB/x7bPz+qpaeTzELTKCSvPovb\nMotashq6OJydogfVz/tKvXq9CdNy7vAiKNs+XEdwhAlnE28QPS3EbooRkSCp\n5hXU26D2XrsOBfMw55d7YDflhx0FamJIeNsL0XEKfqa5I3nGM6axc7Vul7CJ\nKHO6t0QPpq80S6AMmt8E1RNSrb90Vau7+utweqD4xuxRrfSt7f6FZouhkW8b\n/cgBuzxqb8FQUcUrqy+zxoN4ve9QlzkO6b38SkCIAa+QMHS1khhLHFNQm9Nq\nHPINUsiXvKcjDMWu8q21J9HCQMnB4pIo04d6ArvFaA/Pnh+eLmcwlSf3xenZ\nL7UjFRac/Dl0rss+n66mZ5qebqUz1VK3ya3LpFuMfvo7RjPUsMXAsBIA70qs\nn9XjtVDMbHFtE5pSPU9Ps3dyuZozdi2FfxA5obikTNK+7TBgUA778T6dcgzF\ngZylPJiKrMrV1gbqleLlfg46qxvvVflwT5WSVP2I0YZ9nQPNaduGg2kfGTko\nmQmWcYKxml/hAOgok9P2oy0imTMYsDFrt2TjYU1vUypDhzNQM3g3bOcNYafp\ngYn0\r\n=72d9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/main/index.js","types":"dist/main/index.d.ts","gypfile":true,"scripts":{"doc":"typedoc --mode file --excludePrivate --excludeExternals --excludeNotExported --out dist/doc src/main","tsc":"tsc","build":"npm run build:dev","clean":"node-gyp clean && rimraf dist","install":"node-gyp rebuild","prepare":"npm run tsc && npm run doc && node dist/script/generatemeta.js","example2":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example2.ts","example3":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example3.ts","build:dev":"node-gyp rebuild --debug && npm run tsc && npm run generatemeta","example1a":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example1a.js","example1b":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example1b.ts","manueltest1":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/manueltest/test1.ts","manueltest2":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/manueltest/test2.ts","generatemeta":"ts-node src/script/generatemeta.ts","build:release":"node-gyp rebuild && npm run tsc && npm run generatemeta","pipeline-build-setversion":"node setversion.js"},"_npmUser":{"name":"extmchristensen","email":"extmchristensen@jabra.com"},"devEngines":{"npm":">=5.5.1","node":">=10.0.0"},"repository":{"url":"git+https://github.com/gnaudio/jabra-node-sdk.git","type":"git","directory":"nodesdk"},"_npmVersion":"6.7.0","description":"NodeJS SDK for Jabra Devices","directories":{},"_nodeVersion":"11.12.0","dependencies":{"bindings":"1.5.0","node-addon-api":"1.7.1"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"2.6.3","ts-node":"8.4.1","typedoc":"0.15.0","cross-env":"6.0.3","typescript":"3.6.3","@types/node":"12.7.11","@types/bindings":"1.3.0","replace-in-file":"4.1.3"},"_npmOperationalInternal":{"tmp":"tmp/jabra-node-sdk_2.0.0-beta.9_1573722650714_0.1993965851295072","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"2.0.0-beta.10":{"name":"@gnaudio/jabra-node-sdk","version":"2.0.0-beta.10","keywords":["jabra","sdk"],"author":{"name":"GN Audio"},"license":"MIT","_id":"@gnaudio/jabra-node-sdk@2.0.0-beta.10","maintainers":[{"name":"daniel_vasile_42","email":"fvasile@jabra.com"},{"name":"extmchristensen","email":"extmchristensen@jabra.com"},{"name":"frederiksen","email":"mrtn.frederiksen@gmail.com"},{"name":"sskjabra","email":"sklausen@jabra.com"}],"homepage":"https://github.com/gnaudio/jabra-node-sdk/","bugs":{"url":"https://developer.jabra.com"},"dist":{"shasum":"fc8b1206686f2eb55f9e55fd2c3b555b8c80fff8","tarball":"https://registry.npmjs.org/@gnaudio/jabra-node-sdk/-/jabra-node-sdk-2.0.0-beta.10.tgz","fileCount":146,"integrity":"sha512-tl9JeUUYm/ojTd+GrhzqspONBfMCNceKhH+JziEbkjA7xzT7t73ehKuvGLv2QLWW6kEuAfjU+0/9qonsawWrTA==","signatures":[{"sig":"MEUCIQCfREPrS2rfNnSgeQPNhyeYqf3GiOdWKmu1Txz/viuHwgIgdP7lhMDeG7qMX7X1xIByiiU1gw99MPh/lRT/rTfEz5s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":13644211,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd05lvCRA9TVsSAnZWagAAB0cP/jwJUgMpokTV4I5we4CM\nW4sRVLhKUS32L8STjDE7AKWQV8wXUQe91sTMdncCQrv1HBesZlpu6himvp4V\n9Oh0kriM0DKS9jTCMgnaP1b+kdDShXgPmVDMOll/JQ0fFm4ekFTH9SBQugMy\nBZ2KDCL8hYaZRODfq/syrKuq5fun/rebeaZkCuGSllVjkInYQ2Pthxn5v8DN\nu2wFPzCqQQAy9oeJXXq5c+e/Zx16I81POc7x2SKxDsZGeIuSZxfQLsnLE9L1\njFPIIcl8tLIY/Z5BTtjJgrB1mjwa+be2Tkow7p3IehzPKIZiuO43UweRShXi\nCA9k4paH2wQmTNSleUn6yNeVaty1t4bMZ6TA3Amrd1Ok9UkmEFITSdwuHmAG\nfANKHBRr/ooCicePSGKBw8cYyX3GPjXK4zj06/Tg0Ec5U6cf2/pj0Uj5wfUf\ncE5nXH7uccCKMMmhut248ssedUpBOMfquSOfxLZ7G++RbYCQD3XCt5nq1J9D\nWGaHgIO2mHebNRoqQKdecNoV+QeinWsxkaZMBykrmy6vq0OhHAGb7sA+OVVR\nRNSC3YxMYCApc7IQV3PowSBri1PmczZatxnu+K1lE8PJB1bhRcss0qlX/zV4\nT+LIREA4uo63vBd+zT7qEYV5N62s2my+cnmbJsuIu7dm/gTWtsI1a1nHzZvp\nFoFg\r\n=AFyO\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/main/index.js","types":"dist/main/index.d.ts","gypfile":true,"scripts":{"doc":"typedoc --mode file --excludePrivate --excludeExternals --excludeNotExported --out dist/doc src/main","tsc":"tsc","build":"npm run build:dev","clean":"node-gyp clean && rimraf dist","install":"node-gyp rebuild","prepare":"npm run tsc && npm run doc && node dist/script/generatemeta.js","example2":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example2.ts","example3":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example3.ts","build:dev":"node-gyp rebuild --debug && npm run tsc && npm run generatemeta","example1a":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example1a.js","example1b":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example1b.ts","manueltest1":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/manueltest/test1.ts","manueltest2":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/manueltest/test2.ts","generatemeta":"ts-node src/script/generatemeta.ts","build:release":"node-gyp rebuild && npm run tsc && npm run generatemeta","pipeline-build-setversion":"node setversion.js"},"_npmUser":{"name":"extmchristensen","email":"extmchristensen@jabra.com"},"devEngines":{"npm":">=5.5.1","node":">=10.0.0"},"repository":{"url":"git+https://github.com/gnaudio/jabra-node-sdk.git","type":"git","directory":"nodesdk"},"_npmVersion":"6.7.0","description":"NodeJS SDK for Jabra Devices","directories":{},"_nodeVersion":"11.12.0","dependencies":{"bindings":"1.5.0","node-addon-api":"1.7.1"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"2.6.3","ts-node":"8.4.1","typedoc":"0.15.0","cross-env":"6.0.3","typescript":"3.6.3","@types/node":"12.7.11","@types/bindings":"1.3.0","replace-in-file":"4.1.3"},"_npmOperationalInternal":{"tmp":"tmp/jabra-node-sdk_2.0.0-beta.10_1574148462360_0.29442246188738364","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"2.0.0-beta.11":{"name":"@gnaudio/jabra-node-sdk","version":"2.0.0-beta.11","keywords":["jabra","sdk"],"author":{"name":"GN Audio"},"license":"MIT","_id":"@gnaudio/jabra-node-sdk@2.0.0-beta.11","maintainers":[{"name":"daniel_vasile_42","email":"fvasile@jabra.com"},{"name":"extmchristensen","email":"extmchristensen@jabra.com"},{"name":"frederiksen","email":"mrtn.frederiksen@gmail.com"},{"name":"sskjabra","email":"sklausen@jabra.com"}],"homepage":"https://github.com/gnaudio/jabra-node-sdk/","bugs":{"url":"https://developer.jabra.com"},"dist":{"shasum":"61d41c81d7db17aac44dcf9b8484f1eeb2a6d72e","tarball":"https://registry.npmjs.org/@gnaudio/jabra-node-sdk/-/jabra-node-sdk-2.0.0-beta.11.tgz","fileCount":147,"integrity":"sha512-9rH99KEZAkevm96G4AndcaXOCb3rdu2ErS/z+VlkE6XgGQANvmbB4JTAnpucmQazcBAWC4aLO1VB/r8PC6DAww==","signatures":[{"sig":"MEUCICAYMyok4tdiR1ayMy6kb2FodwLMl3t3qaU6zFuqwNouAiEA3/RQz8Xm+387qxiX2b7de8xLmuz8jJ3t72Q8ZRWA63Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":13661215,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd1lBGCRA9TVsSAnZWagAA+08QAJOwcZ/5iidLyLDdIdHi\npw4IMOTIeXhFzKgozwTY467t1K0ApX3xjx0SrU3Uq0oImzoawViQ6XAZFlps\nTZxa1RNuLMe8q/gIVWrJUviNJLjfoIVgrbF+PZR6p0YTVJf93UrkGhctOKap\n0Ctd3vIn8eNkvvXxAHuPjC+6xbWW6igh4ksndKaLwLtJ15jrrBAHp+GfezmU\nuK6QAw88m9JirkA33HT1N5T3VaZfC7sR/RTS0HL+YcdnjuhwecZYzdZsAb5A\nfP0wRYT3vTn9mLT8+pGdVWq36sYET1LR0RgWPlgN+5X/W/Zgu1xcmU8mU0mD\nKPn8zDfxMgQhdR6fNcr2wYv7W96ZDWv/q3TFRC0H+bNWXw+jQXy5qMILi7/J\nc3TB3h266w+qxq2k42t16cEn4s38WG0Xu8hnHRrc96ts6rCdEBn0aUW0tNGN\nZ1MMqECHKOxrgcrwSiwCYAfA8/gOvQSKXLmoctjsZreHnh5oT2nsY3txL+Fd\nARKOsJ64AQaONT7HxFIldwuYzFk7OVBVaH30eHJ6yePnKjG/KLsgTj/6yk8j\ntD2C5Wv+mJZNqgoJ9nRKXF+p8bFcN6GE5wLy91OqqMQIDz+xH2TakxKW6VER\nzB/Gh0O30fj41xJAMlMdQSzXniE3FuuxdIf0cAAfFRNqi0NCXIy1a0O/G+bK\n37GJ\r\n=9Ejc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/main/index.js","types":"dist/main/index.d.ts","gypfile":true,"scripts":{"doc":"typedoc --mode file --excludePrivate --excludeExternals --excludeNotExported --out dist/doc src/main","tsc":"tsc","build":"npm run build:dev","clean":"node-gyp clean && rimraf dist","install":"node-gyp rebuild","prepare":"npm run tsc && npm run doc && node dist/script/generatemeta.js","example2":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example2.ts","example3":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example3.ts","build:dev":"node-gyp rebuild --debug && npm run tsc && npm run generatemeta","example1a":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example1a.js","example1b":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example1b.ts","manueltest1":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/manueltest/test1.ts","manueltest2":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/manueltest/test2.ts","generatemeta":"ts-node src/script/generatemeta.ts","build:release":"node-gyp rebuild && npm run tsc && npm run generatemeta","pipeline-build-setversion":"node setversion.js"},"_npmUser":{"name":"extmchristensen","email":"extmchristensen@jabra.com"},"devEngines":{"npm":">=5.5.1","node":">=10.0.0"},"repository":{"url":"git+https://github.com/gnaudio/jabra-node-sdk.git","type":"git","directory":"nodesdk"},"_npmVersion":"6.7.0","description":"NodeJS SDK for Jabra Devices","directories":{},"_nodeVersion":"11.12.0","dependencies":{"bindings":"1.5.0","node-addon-api":"1.7.1"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"2.6.3","ts-node":"8.4.1","typedoc":"0.15.2","cross-env":"6.0.3","typescript":"3.6.3","@types/node":"12.7.11","@types/bindings":"1.3.0","replace-in-file":"4.1.3"},"_npmOperationalInternal":{"tmp":"tmp/jabra-node-sdk_2.0.0-beta.11_1574326341955_0.4282344060389234","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"2.0.0-beta.12":{"name":"@gnaudio/jabra-node-sdk","version":"2.0.0-beta.12","keywords":["jabra","sdk"],"author":{"name":"GN Audio"},"license":"MIT","_id":"@gnaudio/jabra-node-sdk@2.0.0-beta.12","maintainers":[{"name":"daniel_vasile_42","email":"fvasile@jabra.com"},{"name":"extmchristensen","email":"extmchristensen@jabra.com"},{"name":"frederiksen","email":"mrtn.frederiksen@gmail.com"},{"name":"sskjabra","email":"sklausen@jabra.com"}],"homepage":"https://github.com/gnaudio/jabra-node-sdk/","bugs":{"url":"https://developer.jabra.com"},"dist":{"shasum":"9c363f3e5ed2c799ef80c474a7c56afa87ced913","tarball":"https://registry.npmjs.org/@gnaudio/jabra-node-sdk/-/jabra-node-sdk-2.0.0-beta.12.tgz","fileCount":147,"integrity":"sha512-uUPSsJN+lIApjcHtKkH9i0pnhJSlDRPCFJu+fW78p3YS8lpmu9SUvAUpO5Cgs18bgxTxlW7/EAjZwFXI6oLJog==","signatures":[{"sig":"MEUCIQDoGzeRmDZ2DGd07BGg03O3eMw5y31lpfcBSV6M3vJaZAIgOp4YDi6k1sFoETkiXJrKw0igMBT+8/Z6GQqNZA/osK8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":13662284,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd5lfOCRA9TVsSAnZWagAAbb4P/jTjyuvVeZLxkOuteUy3\nxr9Ufaum8tAUSPfGCk7hNNIDW6hhiDfJMOJBk3p7T4UeGrwbJrSJuVbNaTHI\nC5sDdIu7M5qZqls+Y4lTT6YDpmdDHtwbSumFiyT13pQfd2IpPqHSdiglTxjc\nS8B1RsHaRc+jAh/QoSjT4zGSsMhnzIgDUDV3b9sMk8dq2TSkNHxCj7IKSd8R\n+H25OgrriD2R8SGaR1UXKPm7Cv0A1ihONKPQoxKsz7ccZ81yw2ufGHX9XtZZ\nuZxCDaCYAUYKD16zFOIFqWjqvHYevoLtT7PK3O/Jl0PNnAGDwGa901znFJBR\nT9gvxEnJ5BVj/juwfz1au0RmsOyuWbqThwkUBaGDCv+ABAr29OGpf+mHjUab\nZdH/LQL+wWTSnandCXajT0rJOyzBH8m5y8kuQX646Fyc1ci9hesSeUQpcBt3\nbOXVLrFoi7HK/45g/96G22jQksgi8Upej/OSgPIq5FlKyiz256rfbPwkyzmV\nKdkYo2wsrh3R3rcbC0YFb67nwxjyEF4Q42KBJu04BvOp/8850K7MJN7W5Sfw\nUQAF4Fee6E5uWlZfCtQepVxwwXh4/iz+hlj2hY75tp5FnaOFmt5jqHKWE2rz\nXj5UH6T9tSHlf9KHpMDHuZYlAc2izxpW1l6yo36M2YTUbd43+HeYWjVBEIBN\ncmrC\r\n=tAC0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/main/index.js","types":"dist/main/index.d.ts","gypfile":true,"scripts":{"doc":"typedoc --mode file --excludePrivate --excludeExternals --excludeNotExported --out dist/doc src/main","tsc":"tsc","build":"npm run build:dev","clean":"node-gyp clean && rimraf dist","install":"node-gyp rebuild","prepare":"npm run tsc && npm run doc && node dist/script/generatemeta.js","example2":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example2.ts","example3":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example3.ts","build:dev":"node-gyp rebuild --debug && npm run tsc && npm run generatemeta","example1a":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example1a.js","example1b":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example1b.ts","manueltest1":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/manueltest/test1.ts","manueltest2":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/manueltest/test2.ts","generatemeta":"ts-node src/script/generatemeta.ts","build:release":"node-gyp rebuild && npm run tsc && npm run generatemeta","pipeline-build-setversion":"node setversion.js"},"_npmUser":{"name":"extmchristensen","email":"extmchristensen@jabra.com"},"devEngines":{"npm":">=5.5.1","node":">=10.0.0"},"repository":{"url":"git+https://github.com/gnaudio/jabra-node-sdk.git","type":"git","directory":"nodesdk"},"_npmVersion":"6.7.0","description":"NodeJS SDK for Jabra Devices","directories":{},"_nodeVersion":"11.12.0","dependencies":{"bindings":"1.5.0","node-addon-api":"1.7.1"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"2.6.3","ts-node":"8.4.1","typedoc":"0.15.2","cross-env":"6.0.3","typescript":"3.6.3","@types/node":"12.7.11","@types/bindings":"1.3.0","replace-in-file":"4.1.3"},"_npmOperationalInternal":{"tmp":"tmp/jabra-node-sdk_2.0.0-beta.12_1575376845777_0.3544366806121595","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"2.0.0":{"name":"@gnaudio/jabra-node-sdk","version":"2.0.0","keywords":["jabra","sdk"],"author":{"name":"GN Audio"},"license":"MIT","_id":"@gnaudio/jabra-node-sdk@2.0.0","maintainers":[{"name":"daniel_vasile_42","email":"fvasile@jabra.com"},{"name":"extmchristensen","email":"extmchristensen@jabra.com"},{"name":"frederiksen","email":"mrtn.frederiksen@gmail.com"},{"name":"sskjabra","email":"sklausen@jabra.com"}],"homepage":"https://github.com/gnaudio/jabra-node-sdk/","bugs":{"url":"https://developer.jabra.com"},"dist":{"shasum":"22f58c73f1fc5a1202628a2b6d6f7b8d6f2fc14d","tarball":"https://registry.npmjs.org/@gnaudio/jabra-node-sdk/-/jabra-node-sdk-2.0.0.tgz","fileCount":146,"integrity":"sha512-Emvff3yOYZg5QqqNQXfbgN9AeFb4W74GIMzQFA/ZmtWl2FYw9Rsbl/im9xiwkdwfH/ijsZFbEN438RC2ngjRsg==","signatures":[{"sig":"MEYCIQC84PoAeEiPoYBGZWRkwUN9VRL1TOrlZxlMM7VrZ/2FoQIhAJJOzpXrDGpTPOQXb9iE7R57cX21j38NbHT8eN8Oy0xR","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":13636600,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd71v5CRA9TVsSAnZWagAAQmwP/jNiawZoJz1kESkbhEUj\nYgkofD6hBn5JpbgzjIQYOqSowHuh8tFAPWAEnTAelYoprLkqveQgEQ04ySmn\no7BQdx7SJgiBLE1U3aCmWlBv9HuGPu1fl7EmNpWTwOWUIpsZS4RI4i0F2xTZ\ntef5S0uvd+d5+YGOU2OEc7pUOxi4g4KMX4M9WUTwEFjijbV+CgtnzhUfZwNX\nBO5uj1xBcplE9+ro74nZSTcgNjdof1yNSFtVHinIqnzA0NyntXRJv8DM8E6l\nh3OKtpb9yIXv4Wrcrhd5nxCaXFpWhn4YJ/ULSvbTberA55FExUZT3nNgDPg6\nOmTxYr425yYN2lTvs3b04bB6u0TeclUFiYkZsFMpoAyY/AsGgtmatBTNv8yC\n/G6hexNANg6L2UuNyzayxapMp9gAlp35vcBtvO8AYTA3qHwWEe2RDdzH68l+\nmi1AtN02VFXhooC7dTHwZJwiovG68DjAN7jaEq2JGWvDMfxxa7xPco5lQHYg\nkKO2uPOgW25ZSV7d6hGrrgbcy2U3TD8JMPJhGFmvweLrnAnZ54AuQWUGMvai\nL9xqpgDkQgxTf9bEn7AVWZU5BWxUxb4H5cLVVps+t0MjCLgRsOTx0r8Q6aj3\nEIKoipe4PST3iuF36z/xhMJKxA2MB0Rb8EyXQKyd4YmMG1dfYjk3ooV+zT65\nSRkK\r\n=1aD6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/main/index.js","types":"dist/main/index.d.ts","gypfile":true,"scripts":{"doc":"typedoc --mode file --excludePrivate --excludeExternals --excludeNotExported --out dist/doc src/main","tsc":"tsc","build":"npm run build:dev","clean":"node-gyp clean && rimraf dist","install":"node-gyp rebuild","prepare":"npm run tsc && npm run doc && node dist/script/generatemeta.js","example2":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example2.ts","example3":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example3.ts","build:dev":"node-gyp rebuild --debug && npm run tsc && npm run generatemeta","example1a":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example1a.js","example1b":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example1b.ts","manueltest1":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/manueltest/test1.ts","manueltest2":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/manueltest/test2.ts","generatemeta":"ts-node src/script/generatemeta.ts","build:release":"node-gyp rebuild && npm run tsc && npm run generatemeta","pipeline-build-setversion":"node setversion.js"},"_npmUser":{"name":"extmchristensen","email":"extmchristensen@jabra.com"},"devEngines":{"npm":">=5.5.1","node":">=10.0.0"},"repository":{"url":"git+https://github.com/gnaudio/jabra-node-sdk.git","type":"git","directory":"nodesdk"},"_npmVersion":"6.7.0","description":"NodeJS SDK for Jabra Devices","directories":{},"_nodeVersion":"11.12.0","dependencies":{"bindings":"1.5.0","node-addon-api":"1.7.1"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"2.6.3","ts-node":"8.4.1","typedoc":"0.15.2","cross-env":"6.0.3","typescript":"3.6.3","@types/node":"12.7.11","@types/bindings":"1.3.0","replace-in-file":"4.1.3"},"_npmOperationalInternal":{"tmp":"tmp/jabra-node-sdk_2.0.0_1575967736604_0.4838638039679788","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"3.0.0-beta.1":{"name":"@gnaudio/jabra-node-sdk","version":"3.0.0-beta.1","keywords":["jabra","sdk"],"author":{"name":"GN Audio"},"license":"MIT","_id":"@gnaudio/jabra-node-sdk@3.0.0-beta.1","maintainers":[{"name":"daniel_vasile_42","email":"fvasile@jabra.com"},{"name":"extmchristensen","email":"extmchristensen@jabra.com"},{"name":"frederiksen","email":"mrtn.frederiksen@gmail.com"},{"name":"sskjabra","email":"sklausen@jabra.com"}],"homepage":"https://github.com/gnaudio/jabra-node-sdk/","bugs":{"url":"https://developer.jabra.com"},"dist":{"shasum":"e9b5ce87d2cff713a2cf99d5317510e134a5fdc1","tarball":"https://registry.npmjs.org/@gnaudio/jabra-node-sdk/-/jabra-node-sdk-3.0.0-beta.1.tgz","fileCount":146,"integrity":"sha512-o+YNUqS39iR3Qt9yjvlG6GBoxJj4zDRUV4YuKUAYCuO+NQTwSeZz6ur9LjZFkncAjukZaQlTWQ5C1mkSSuM1Aw==","signatures":[{"sig":"MEUCICK6piNkwKjfijTHlJ5FtPBXtfnNB3qJHOSNDbXHM8/2AiEAxmoqpG0Xx7lSprySPwfiSmrRrBy98niSrC7fw10Ag2U=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14023318,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd76PaCRA9TVsSAnZWagAASL8QAJ0buS0Zl99VN1yBzT4b\nZf//SGuhJRFHv7+SIvhZMMVX6TbYxwDmj+4PVjCcpa3bv2nC8aMk4C5OBLc0\nYpzl31KLDzsz7duaUDs+QvSxocsOTuxwYqWf7QI9vfa+H8sewb5A7WAa93au\n9WCNaErygdjYK8HNSbZ7auJxEZdvrDissLqp6NnKHONoKrOQpc/gsaKOGYYm\nBLuBw5TUBH9qeBjMPk2n4GHA+H7n35cdPCMvD08PVzacXO+duRxzYPl5+7fr\nG10J1fZkceL3EzN2JYFFx53oWE/ZLlnBECqWgZ2ndvxhqOfsWkUpLw/gifqF\n6mM2FcfWN03bh0WJqhnT93mUlRw/wJ19hKXuVQhdO3tWuS7LX3zqdDEAi7tP\n7hgbzCsPJT+ixGNR4HyeaJ9EQLwFf4jwcStDzgbjXn4CJU9LC1I7G/BCnkM/\ndto9iLRn3fJ0SESrlFnggUVUWoVykbtZ4rlO2gfBB4crJzJpvVwrjd8o5Z0+\nRwFUWcqY4zTdtlp0QrunB+dcUo06PDcATyaTWGMRX7dzdPGTCEKBTbyOgBEE\n7n4SISKY3yJTgFpT6UhS0w2P+Bd7B8bvOwlLnjnm6VdMfMS7cEK0ezle3Haj\nD3nk22n32kOrimTpQBNyWEhFMj6k3U0l1sILI5I5+ZGeC7tIz/8dlff2ONNs\nIEfE\r\n=1cj6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/main/index.js","types":"dist/main/index.d.ts","readme":"Jabra Node.js SDK\r\n\r\n# Table of Contents\r\n- [Versions](#versions)\r\n- [Pre-requisite](#pre-requisite)\r\n- [Installation](#installation)\r\n- [Debugging and Logging](#debugging-and-logging)\r\n- [API Reference](#api-reference)\r\n- [Examples](#examples)\r\n    - [Simple Example](#simple-example)\r\n    - [Multiple device management](#multiple-device-management)\r\n- [Bug report](https://github.com/gnaudio/jabra-node-sdk#bug-reports)\r\n- [Changelog](https://github.com/gnaudio/jabra-node-sdk/blob/master/CHANGELOG.md)\r\n- [License](https://github.com/gnaudio/jabra-node-sdk/blob/master/LICENSE.md)\r\n- [FAQ](https://github.com/gnaudio/jabra-node-sdk/blob/master/FAQ.md)\r\n\r\n## Versions\r\nLatest STABLE release is [v2.0.0 distributed on npmjs.com](https://www.npmjs.com/package/@gnaudio/jabra-node-sdk/v/2.0.0) (see [changelog](https://github.com/gnaudio/jabra-node-sdk/blob/master/CHANGELOG.md) for changes and notable defects). \r\n\r\nIn addition, BETA versions may be available on npmjs with a version name ending with \"-beta.X\" specifier. For such BETA versions,the following applies:\r\n\r\n    > Disclaimer for Alpha and Beta Software Release\r\n\r\n    > Please note that this is a copyrighted Jabra Product ((c) 2017 GN Audio A/S) (the “Product”) which is still undergoing final testing before its official release. The Product and all content found on it are provided on an “as is” and “as available” basis. Jabra does not provide any warranties, neither express nor implied, as to the suitability or usability of the Product or any of its content.\r\n\r\n    > Jabra disclaims liability for any loss, whether direct, indirect, special or consequential, suffered by any person as a result of their use of the Product or the software embedded, and for any claim arising from any injury or damage, including but not limited to, any personal or bodily injury or tangible property damage, arising from or resulting in any way from any alleged defects in the material, workmanship, or performance of the Product, and Company shall indemnify Jabra in respect of any such claims. All usage of the Product is at users’ own risk and the user will be solely responsible for any resulting from such activities.\r\n\r\n    > Should you encounter any bugs, glitches, dangers, lack of functionality, lack of comfort or other problems with the Product, please let us know immediately so we can rectify these accordingly. Your help in this regard is greatly appreciated.\r\n\r\n    > The Product is released solely for test use in Company’s organization and must not under any circumstances be distributed to third parties without prior written acceptance from Jabra.\r\n\r\n    > By using the software, I accept and acknowledge the content herein.`\r\n\r\n## Pre-requisite\r\n1. Node.js v8.x or later.\r\n2. **On MacOS:** `xcode` & `python 2.7`. By default, Python is installed on macOS but make sure correct version(2.7.x) is installed. Install Xcode from App store or download it from [here](https://developer.apple.com/xcode/download/).\r\n3. **On Windows:** `Visual C++ Build Tools` & `Python 2.7`. You can install all of these by following any of the below mentioned steps.\r\n\r\n    3.1. **During Node.js installation** By ticking the checkbox when prompted during Node.js installation for `Tools for Native modules`, this installs both `Visual C++ Build Tools` & `Python 2.7`. **Note** This is prompted only for Windows platform. For other platforms like Linux or MAC, C++ compilation tools has to be installed separately as mentioned in other steps.\r\n\r\n    3.2. Both `Visual C++ Build Tools` & `Python 2.7` can also be installed using command `npm install --global --production --add-python-to-path windows-build-tools`. To know more about this tool, see [this link.](https://github.com/felixrieseberg/windows-build-tools). **Note** For executing this command through `Windows Command Prompt` or `Windows PowerShell`, they should be ran in Administrator mode.\r\n4. **On Linux:** `build-essential` package for C++ compilation & `Python 2.7`.\r\n\r\n    4.1. **Udev rules:** To be able to communicate with Jabra devices with non-root privileges it is required to create a udev rule for Jabra devices. Place the udev rule in `/etc/udev/rules.d`, and follow naming guidelines for udev files.              \r\n    \r\n    **Example:** The file name should be something like `80-jabra.rules` where the number before the dash indicates in what order the system reads the rules (e.g. if you had another rules file called `70-someotherrule.rules`, it would read that one first), the word after the dash is just an identifier of sorts (it could be something other than jabra) and the extension must be `.rules`.\r\n\r\n    The contents of the file are:\r\n\r\n    `ATTRS{idVendor}==\"0b0e\", MODE=\"0666\", GROUP=\"users\"`\r\n\r\n    After creating the udev file (as root), reload the udev rules using:\r\n\r\n    `sudo udevadm control --reload`\r\n\r\n    Reattach your Jabra device in order to get new permissions assigned.\r\n\r\n5. **All Platforms:** `node-gyp`. You can install this using command `npm install -g node-gyp`. To know more about this, see [this link](https://www.npmjs.com/package/node-gyp)\r\n\r\n6. **For Electron.JS:** If you are using `asar` packaging then you may need to `unpack` some of the resources used in this module. These resources are native library files i.e `libjabra.dll`, `libjabra.dylib` & `libjabra.so`, which is stored in a `build\\Release` folder. By default latest electron builder will automatically unpack, but if it does not work then you can provide below option to your build process. To know more, see [this link](https://www.electron.build/configuration/configuration)\r\n\r\n    ```\r\n    \"build\": {\r\n        \"asarUnpack\": [\"node_modules/@gnaudio/jabra-node-sdk\"]\r\n    }\r\n    ```\r\n\r\n## Installation\r\nThis release is published to [npm](https://www.npmjs.com/package/@gnaudio/jabra-node-sdk) and can be installed via below command.\r\n```\r\nnpm install --save @gnaudio/jabra-node-sdk\r\n```\r\n\r\n## Debugging and Logging\r\nBelow environment variables are defined for logging and debugging purpose. User can change the values as per preference.\r\n\r\nEnvironment Variable | Value | Description\r\n--- | --- | ---\r\nLIBJABRA_TRACE_LEVEL | fatal, error, warning(default), info, debug | Log levels\r\nLIBJABRA_RESOURCE_PATH | **On Mac:** ~/Library/Application Support/JabraSDK/ **On Windows:** %appdata%/Roaming/JabraSDK  | This determine the system path where logs and device related files are written.\r\n\r\n## API Reference\r\nAPI doc is in html format. See doc folder inside installed module `node_modules\\@gnaudio\\jabra-node-sdk\\dist\\doc` and open `index.html`.\r\n\r\n## Examples\r\n\r\nFor all examples, user should first register the app on [Jabra developer site](https://developer.jabra.com/) to get appID. User should pass this appID to `createJabraApplication` in order to initialize the jabra module:\r\n\r\n### Simple button events example using javascript and plain promises\r\n\r\n```javascript\r\nconst j = require(\"@gnaudio/jabra-node-sdk\");\r\nj.createJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        console.log('Press any key on Jabra device ' + device.deviceName);\r\n        \r\n        // If you are creating a softphone, consider using GN protocol when device supports it\r\n        // in order to receive all events. E.g. device.setHidWorkingStateAsync(j.enumHidState.GN_HID);\r\n        device.on('btnPress', (btnType, btnValue) => {\r\n          console.log('New input from device is received: ', j.enumDeviceBtnType[btnType], btnValue);\r\n        });\r\n    });    \r\n});\r\n```\r\n\r\n### Simple button events example using typescript and plain promises\r\n\r\n```typescript\r\nimport { createJabraApplication, enumDeviceBtnType, enumHidState } from '@gnaudio/jabra-node-sdk';\r\ncreateJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        console.log('Press any key on Jabra device ' + device.deviceName);\r\n\r\n        // If you are creating a softphone, consider using GN protocol when device supports it\r\n        // in order to receive all events. E.g. device.setHidWorkingStateAsync(enumHidState.GN_HID);\r\n        device.on('btnPress', (btnType, btnValue) => {\r\n          console.log('New input from device is received: ', enumDeviceBtnType[btnType], btnValue);\r\n        });\r\n    });    \r\n});\r\n```\r\n\r\n### Ring example using typescript and plain promises\r\nThis example shows how to ring a Jabra device\r\n\r\n```typescript\r\nimport { createJabraApplication, JabraError } from '@gnaudio/jabra-node-sdk';\r\n\r\ncreateJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        device.isRingerSupportedAsync().then( (supported) => {\r\n            if (supported) {\r\n              device.ringAsync().then ( () => {\r\n                console.log('ringing');\r\n              }).catch ((err: JabraError) => {\r\n                console.log('ring failed with error ' + err);\r\n              }); // ring the device\r\n              setTimeout(() => {\r\n                device.unringAsync().then(() => {\r\n                    console.log('stopped ringing');\r\n                }).catch ((err: JabraError) => {\r\n                    console.log('unring failed with error ' + err);\r\n                });\r\n              }, 5000); // stop ringing the device after 5 second\r\n            }          \r\n        }).catch( (err: JabraError) => {\r\n            console.error('Jabra call failed with error ' + err)\r\n        });\r\n    });\r\n    \r\n    jabra.on('detach', (device) => {\r\n        console.log('Device detached with deviceID:', device.deviceID);\r\n\r\n        // In this demo example, we will auto shutdown once all jabra devices are removed:\r\n        let remainingAttachedDevices = jabra.getAttachedDevices();\r\n        if (remainingAttachedDevices.length == 0) {\r\n            jabra.disposeAsync().then (() => {}); // Cleanup and allow node process to exit.\r\n        }\r\n    });\r\n});\r\n```\r\n\r\n### Multiple device management with typescript and async/await\r\n\r\n```typescript\r\nimport { createJabraApplication } from '@gnaudio/jabra-node-sdk';\r\n\r\n(async () => {\r\n    let jabra = await createJabraApplication('123'); // 123 is appID here\r\n\r\n    await jabra.scanForDevicesDoneAsync(); // Wait for all pre-attached devices to be scanned.\r\n\r\n    const deviceInstanceList = jabra.getAttachedDevices();\r\n    if (deviceInstanceList.length<2) {\r\n        throw new Error('Please make sure 2 jabra devices are attached');\r\n    }\r\n\r\n    const firstDevice = deviceInstanceList[0];\r\n    await firstDevice.ringAsync();\r\n\r\n    const secondDevice = deviceInstanceList[1];\r\n    await secondDevice.ringAsync();\r\n\r\n    // Dispose jabra sdk to enable node process to shutdown.\r\n    await jabra.disposeAsync();\r\n})();\r\n```\r\n\r\n## Sequence diagrams\r\n\r\nThese sequence diagrams shows typical use of the Node.js sdk:\r\n\r\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/outgoing-call-then-end-call.png)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/incoming-call-then-accept-on-device-then-end-call.png)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/incoming-call-then-user-rejects.png)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/mute-unmute-from-device.png)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/hold-resume-from-device.png)\r\n\r\n","gypfile":true,"scripts":{"doc":"typedoc --mode file --excludePrivate --excludeExternals --excludeNotExported --out dist/doc src/main","tsc":"tsc","build":"npm run build:dev","clean":"node-gyp clean && rimraf dist","install":"node-gyp rebuild","prepare":"npm run tsc && npm run doc && node dist/script/generatemeta.js","example2":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example2.ts","example3":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example3.ts","build:dev":"node-gyp rebuild --debug && npm run tsc && npm run generatemeta","example1a":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example1a.js","example1b":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example1b.ts","manueltest1":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/manueltest/test1.ts","manueltest2":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/manueltest/test2.ts","generatemeta":"ts-node src/script/generatemeta.ts","build:release":"node-gyp rebuild && npm run tsc && npm run generatemeta","pipeline-build-setversion":"node setversion.js"},"_npmUser":{"name":"extmchristensen","email":"extmchristensen@jabra.com"},"devEngines":{"npm":">=5.5.1","node":">=10.0.0"},"repository":{"url":"git+https://github.com/gnaudio/jabra-node-sdk.git","type":"git","directory":"nodesdk"},"_npmVersion":"6.7.0","description":"NodeJS SDK for Jabra Devices","directories":{},"_nodeVersion":"11.12.0","dependencies":{"bindings":"1.5.0","node-addon-api":"1.7.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"rimraf":"2.6.3","ts-node":"8.4.1","typedoc":"0.15.2","cross-env":"6.0.3","typescript":"3.6.3","@types/node":"12.7.11","@types/bindings":"1.3.0","replace-in-file":"4.1.3"},"_npmOperationalInternal":{"tmp":"tmp/jabra-node-sdk_3.0.0-beta.1_1575986137864_0.5244469139134404","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"3.0.0":{"name":"@gnaudio/jabra-node-sdk","version":"3.0.0","keywords":["jabra","sdk"],"author":{"name":"GN Audio"},"license":"MIT","_id":"@gnaudio/jabra-node-sdk@3.0.0","maintainers":[{"name":"daniel_vasile_42","email":"fvasile@jabra.com"},{"name":"extmchristensen","email":"extmchristensen@jabra.com"},{"name":"frederiksen","email":"mrtn.frederiksen@gmail.com"},{"name":"sskjabra","email":"sklausen@jabra.com"}],"homepage":"https://github.com/gnaudio/jabra-node-sdk/","bugs":{"url":"https://developer.jabra.com"},"dist":{"shasum":"415a5997bfdf0144711a80dad7bbabd98444a511","tarball":"https://registry.npmjs.org/@gnaudio/jabra-node-sdk/-/jabra-node-sdk-3.0.0.tgz","fileCount":146,"integrity":"sha512-MJPTO/ImHyeN9Ei/Pta4hVcVw8JIFBaXIIZXs8mo4/dhs2pe1AYacKWFqNj3BnLxH1R6+CIJx6BnOf+6M2+vlw==","signatures":[{"sig":"MEQCIFzDuLz6e+0NUDsI47yj/WURwSrpI09Zqqcj2ZY3g0A5AiBg9Ba4xtVM6qo2s4qWkWuoVIdl6ZMVjh2hPXEjNnzSww==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14024587,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeWPnxCRA9TVsSAnZWagAAfU4P/207QVvLVsENL2NbUXfs\n0Fd1tu0xG0Nz7YgTUEJKtbTwxEYqyjKWmBlDS+zalqxXWJ5zHPqrfBY5Giwu\nNfuSDMAThj5sw4kIG8krCV5GIeZIpmk5fhnlTK2FudVCUu0cj/EIIno02I37\n/eLmF5nvDCmhLTgHymC3d05WnRSCiMkrStDu3zUOUdJujPFqjSti/cs/uuke\n+yKzuMcGDKl1YDCyn/XhlhoTe9Q5xupGTATsJ4q/tyD+gEr2nzJ5DeQqDphn\n2ppHvHA5ONdP6lqUk2+tk67byHbdFQBRMLwuDmKjG9404HxVQa6b/PTiL8FI\nZR3gvO3ytgp47goUED3ymteco+LcBcPhiImOZLytHKjQiULzsTLGco4STN1N\nl1aRXUm1QwFNbofiK06Tpi9UE+92EC5A4hiddL73m+neU1k9DjTgIJCTMFde\nTvdXwGy8QAO1ARMOAI4SMnC3fLzUJxpmR2wKSoP6XgBFMNyZnQnGWoNbqVMO\nIurQOemYkK/E6voyZWzkqtZnzzSmoZoWy4mALB8k/SfFWlVVfKbZ3e6IfQaN\nbS+Y30XsVH8recKt3ozzUkk9zMJ3HWQQeesf3DJHUYRPsCWcI04cKhdsLPCc\njfiMNaWmjhJVFPolRPUxv8qiHgIj8DXQxY43nKktwkhaZ4y9fz/iKxLEHKL4\nwp1i\r\n=Hxj0\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/main/index.js","types":"dist/main/index.d.ts","gypfile":true,"scripts":{"doc":"typedoc --mode file --excludePrivate --excludeExternals --excludeNotExported --out dist/doc src/main","tsc":"tsc","build":"npm run build:dev","clean":"node-gyp clean && rimraf dist","install":"node-gyp rebuild","prepare":"npm run tsc && npm run doc && node dist/script/generatemeta.js","example2":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example2.ts","example3":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example3.ts","build:dev":"node-gyp rebuild --debug && npm run tsc && npm run generatemeta","example1a":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example1a.js","example1b":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example1b.ts","manueltest1":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/manueltest/test1.ts","manueltest2":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/manueltest/test2.ts","generatemeta":"ts-node src/script/generatemeta.ts","build:release":"node-gyp rebuild && npm run tsc && npm run generatemeta","pipeline-build-setversion":"node setversion.js"},"_npmUser":{"name":"extmchristensen","email":"extmchristensen@jabra.com"},"devEngines":{"npm":">=5.5.1","node":">=10.0.0"},"repository":{"url":"git+https://github.com/gnaudio/jabra-node-sdk.git","type":"git","directory":"nodesdk"},"_npmVersion":"6.13.4","description":"NodeJS SDK for Jabra Devices","directories":{},"_nodeVersion":"11.12.0","dependencies":{"bindings":"1.5.0","node-addon-api":"1.7.1"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"2.6.3","ts-node":"8.4.1","typedoc":"0.15.2","cross-env":"6.0.3","typescript":"3.6.3","@types/node":"12.7.11","@types/bindings":"1.3.0","replace-in-file":"4.1.3"},"_npmOperationalInternal":{"tmp":"tmp/jabra-node-sdk_3.0.0_1582889456809_0.248446245030997","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"3.1.0-beta.1":{"name":"@gnaudio/jabra-node-sdk","version":"3.1.0-beta.1","keywords":["jabra","sdk"],"author":{"name":"GN Audio"},"license":"MIT","_id":"@gnaudio/jabra-node-sdk@3.1.0-beta.1","maintainers":[{"name":"daniel_vasile_42","email":"fvasile@jabra.com"},{"name":"extmchristensen","email":"extmchristensen@jabra.com"},{"name":"frederiksen","email":"mrtn.frederiksen@gmail.com"},{"name":"sskjabra","email":"sklausen@jabra.com"}],"homepage":"https://github.com/gnaudio/jabra-node-sdk/","bugs":{"url":"https://developer.jabra.com"},"dist":{"shasum":"20752b5c1e16365cbe8db4841bd95b3cdfba2580","tarball":"https://registry.npmjs.org/@gnaudio/jabra-node-sdk/-/jabra-node-sdk-3.1.0-beta.1.tgz","fileCount":147,"integrity":"sha512-akE0vJPqzHDzNNvwvpas4zUd5fwQrxggx7TUAf0SCWxS6W5anhzfM7LCK19rhkPvPywCl9e0KvlM31wVgaUZ2Q==","signatures":[{"sig":"MEUCIC3i1QybYI63uIpSZI2MYNB48wGGgj5i6ASYcJJ+WsFhAiEAlLZ+CqfWydI2uGZuAeiBbzOcAwvoi6cys8E7JDiOz74=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14410377,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeZ34MCRA9TVsSAnZWagAA8f4QAJ4KU9BOtQ+Oz5qmxATX\n9dN44Nq8luLET/svvmhZiM2YPcKkLq0HRfV/i+Q5Mmeq079C8wsqAYcUX24t\nvmyDeVAwS8WNt6LsumMd6nYZYScgp8fUcCUgVS2to2M0paj3mfxUQKcIcZ25\nNdpW5rv5x+zKsCVCIJObWdf+oMwzu2+e35Mfzj8/9DCAA/RPSzFdA9ORPnJb\nA6KbJJysJ6HEJWGTNsGYYdjNtSxxWjnqIbMT4uEC6bbQZ/YFYlXrYhMFpcUt\nFND6AMFlUrPKnXLOromPVrRukAvcrAkXl9HqKowcWnBNJMhDiGStJE5qNcwj\ny8ZRzc3lsHyPbjNbdVPV8CWWbeqB/LuapkjPmuUqNM2C0YCVAAq1RQgbvyre\nikE0VPWoBYw83VyVSnjHv4ZB7sMn2vISuGCXB2PW/ABmjtDvAc5O53ER6wuc\nUQISdUvB9cY9rFBQOHUWqnolNyBwEJ1WGMsV5cx9R7tcEWcFs9mrcoaTe3H2\nhPU18r12Ug868+wGcwcpa+eo2Cy+V8ntOaidC+GzobPUEytWcYVqSgUr22n2\n/OGBkEWoaCNHNO5IBjKPapIt/tO5JWCsVPmAgG3rc6hBX9yPNy6gsr9+6XZB\nEDCYaWvtcJoLu2uwx0QIQT+vAwdmunOmL2npku30CBmse+Si1B7dgqjeUgrW\ndB3d\r\n=fXCA\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/main/index.js","types":"dist/main/index.d.ts","readme":"Jabra Node.js SDK\r\n\r\n# Table of Contents\r\n- [Versions](#versions)\r\n- [Pre-requisite](#pre-requisite)\r\n- [Installation](#installation)\r\n- [Debugging and Logging](#debugging-and-logging)\r\n- [API Reference](#api-reference)\r\n- [Examples](#examples)\r\n    - [Simple Example](#simple-example)\r\n    - [Multiple device management](#multiple-device-management)\r\n- [Bug report](https://github.com/gnaudio/jabra-node-sdk#bug-reports)\r\n- [Changelog](https://github.com/gnaudio/jabra-node-sdk/blob/master/CHANGELOG.md)\r\n- [License](https://github.com/gnaudio/jabra-node-sdk/blob/master/LICENSE.md)\r\n- [FAQ](https://github.com/gnaudio/jabra-node-sdk/blob/master/FAQ.md)\r\n\r\n## Versions\r\n\r\nLatest STABLE Windows(!) release is [v3.0.0 distributed on npmjs.com](https://www.npmjs.com/package/@gnaudio/jabra-node-sdk/v/3.0.0) (see [changelog](https://github.com/gnaudio/jabra-node-sdk/blob/master/CHANGELOG.md) for changes and notable defects). \r\n\r\nExceptionally, this v3.0.0 release is aimed only at Windows in order to fix a 100% CPU utilisation issue. Mac and Linux core library versions do not suffer from this issue. We therefore recommend that you for production use stay on v2.0.0 for those platforms, until the next general relase is made for all platforms. See changelog for details.\r\n\r\nLatest STABLE cross platform release is [v2.0.0 distributed on npmjs.com](https://www.npmjs.com/package/@gnaudio/jabra-node-sdk/v/2.0.0) (see [changelog](https://github.com/gnaudio/jabra-node-sdk/blob/master/CHANGELOG.md) for changes and notable defects). \r\n\r\nIn addition, BETA versions may be available on npmjs with a version name ending with \"-beta.X\" specifier. For such BETA versions,the following applies:\r\n\r\n    > Disclaimer for Alpha and Beta Software Release\r\n\r\n    > Please note that this is a copyrighted Jabra Product ((c) 2017 GN Audio A/S) (the “Product”) which is still undergoing final testing before its official release. The Product and all content found on it are provided on an “as is” and “as available” basis. Jabra does not provide any warranties, neither express nor implied, as to the suitability or usability of the Product or any of its content.\r\n\r\n    > Jabra disclaims liability for any loss, whether direct, indirect, special or consequential, suffered by any person as a result of their use of the Product or the software embedded, and for any claim arising from any injury or damage, including but not limited to, any personal or bodily injury or tangible property damage, arising from or resulting in any way from any alleged defects in the material, workmanship, or performance of the Product, and Company shall indemnify Jabra in respect of any such claims. All usage of the Product is at users’ own risk and the user will be solely responsible for any resulting from such activities.\r\n\r\n    > Should you encounter any bugs, glitches, dangers, lack of functionality, lack of comfort or other problems with the Product, please let us know immediately so we can rectify these accordingly. Your help in this regard is greatly appreciated.\r\n\r\n    > The Product is released solely for test use in Company’s organization and must not under any circumstances be distributed to third parties without prior written acceptance from Jabra.\r\n\r\n    > By using the software, I accept and acknowledge the content herein.`\r\n\r\n## Pre-requisite\r\n1. Node.js v8.x or later.\r\n2. **On MacOS:** `xcode` & `python 2.7`. By default, Python is installed on macOS but make sure correct version(2.7.x) is installed. Install Xcode from App store or download it from [here](https://developer.apple.com/xcode/download/).\r\n3. **On Windows:** `Visual C++ Build Tools` & `Python 2.7`. You can install all of these by following any of the below mentioned steps.\r\n\r\n    3.1. **During Node.js installation** By ticking the checkbox when prompted during Node.js installation for `Tools for Native modules`, this installs both `Visual C++ Build Tools` & `Python 2.7`. **Note** This is prompted only for Windows platform. For other platforms like Linux or MAC, C++ compilation tools has to be installed separately as mentioned in other steps.\r\n\r\n    3.2. Both `Visual C++ Build Tools` & `Python 2.7` can also be installed using command `npm install --global --production --add-python-to-path windows-build-tools`. To know more about this tool, see [this link.](https://github.com/felixrieseberg/windows-build-tools). **Note** For executing this command through `Windows Command Prompt` or `Windows PowerShell`, they should be ran in Administrator mode.\r\n4. **On Linux:** `build-essential` package for C++ compilation & `Python 2.7`.\r\n\r\n    4.1. **Udev rules:** To be able to communicate with Jabra devices with non-root privileges it is required to create a udev rule for Jabra devices. Place the udev rule in `/etc/udev/rules.d`, and follow naming guidelines for udev files.              \r\n    \r\n    **Example:** The file name should be something like `80-jabra.rules` where the number before the dash indicates in what order the system reads the rules (e.g. if you had another rules file called `70-someotherrule.rules`, it would read that one first), the word after the dash is just an identifier of sorts (it could be something other than jabra) and the extension must be `.rules`.\r\n\r\n    The contents of the file are:\r\n\r\n    `ATTRS{idVendor}==\"0b0e\", MODE=\"0666\", GROUP=\"users\"`\r\n\r\n    After creating the udev file (as root), reload the udev rules using:\r\n\r\n    `sudo udevadm control --reload`\r\n\r\n    Reattach your Jabra device in order to get new permissions assigned.\r\n\r\n5. **All Platforms:** `node-gyp`. You can install this using command `npm install -g node-gyp`. To know more about this, see [this link](https://www.npmjs.com/package/node-gyp)\r\n\r\n6. **For Electron.JS:** If you are using `asar` packaging then you may need to `unpack` some of the resources used in this module. These resources are native library files i.e `libjabra.dll`, `libjabra.dylib` & `libjabra.so`, which is stored in a `build\\Release` folder. By default latest electron builder will automatically unpack, but if it does not work then you can provide below option to your build process. To know more, see [this link](https://www.electron.build/configuration/configuration)\r\n\r\n    ```\r\n    \"build\": {\r\n        \"asarUnpack\": [\"node_modules/@gnaudio/jabra-node-sdk\"]\r\n    }\r\n    ```\r\n\r\n## Installation\r\nThis release is published to [npm](https://www.npmjs.com/package/@gnaudio/jabra-node-sdk) and can be installed via below command.\r\n```\r\nnpm install --save @gnaudio/jabra-node-sdk\r\n```\r\n\r\n## Debugging and Logging\r\nBelow environment variables are defined for logging and debugging purpose. User can change the values as per preference.\r\n\r\nEnvironment Variable | Value | Description\r\n--- | --- | ---\r\nLIBJABRA_TRACE_LEVEL | fatal, error, warning(default), info, debug | Log levels\r\nLIBJABRA_RESOURCE_PATH | **On Mac:** ~/Library/Application Support/JabraSDK/ **On Windows:** %appdata%/Roaming/JabraSDK  | This determine the system path where logs and device related files are written.\r\n\r\n## API Reference\r\nAPI doc is in html format. See doc folder inside installed module `node_modules\\@gnaudio\\jabra-node-sdk\\dist\\doc` and open `index.html`.\r\n\r\n## Examples\r\n\r\nFor all examples, user should first register the app on [Jabra developer site](https://developer.jabra.com/) to get appID. User should pass this appID to `createJabraApplication` in order to initialize the jabra module:\r\n\r\n### Simple button events example using javascript and plain promises\r\n\r\n```javascript\r\nconst j = require(\"@gnaudio/jabra-node-sdk\");\r\nj.createJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        console.log('Press any key on Jabra device ' + device.deviceName);\r\n        \r\n        // If you are creating a softphone, consider using GN protocol when device supports it\r\n        // in order to receive all events. E.g. device.setHidWorkingStateAsync(j.enumHidState.GN_HID);\r\n        device.on('btnPress', (btnType, btnValue) => {\r\n          console.log('New input from device is received: ', j.enumDeviceBtnType[btnType], btnValue);\r\n        });\r\n    });    \r\n});\r\n```\r\n\r\n### Simple button events example using typescript and plain promises\r\n\r\n```typescript\r\nimport { createJabraApplication, enumDeviceBtnType, enumHidState } from '@gnaudio/jabra-node-sdk';\r\ncreateJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        console.log('Press any key on Jabra device ' + device.deviceName);\r\n\r\n        // If you are creating a softphone, consider using GN protocol when device supports it\r\n        // in order to receive all events. E.g. device.setHidWorkingStateAsync(enumHidState.GN_HID);\r\n        device.on('btnPress', (btnType, btnValue) => {\r\n          console.log('New input from device is received: ', enumDeviceBtnType[btnType], btnValue);\r\n        });\r\n    });    \r\n});\r\n```\r\n\r\n### Ring example using typescript and plain promises\r\nThis example shows how to ring a Jabra device\r\n\r\n```typescript\r\nimport { createJabraApplication, JabraError } from '@gnaudio/jabra-node-sdk';\r\n\r\ncreateJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        device.isRingerSupportedAsync().then( (supported) => {\r\n            if (supported) {\r\n              device.ringAsync().then ( () => {\r\n                console.log('ringing');\r\n              }).catch ((err: JabraError) => {\r\n                console.log('ring failed with error ' + err);\r\n              }); // ring the device\r\n              setTimeout(() => {\r\n                device.unringAsync().then(() => {\r\n                    console.log('stopped ringing');\r\n                }).catch ((err: JabraError) => {\r\n                    console.log('unring failed with error ' + err);\r\n                });\r\n              }, 5000); // stop ringing the device after 5 second\r\n            }          \r\n        }).catch( (err: JabraError) => {\r\n            console.error('Jabra call failed with error ' + err)\r\n        });\r\n    });\r\n    \r\n    jabra.on('detach', (device) => {\r\n        console.log('Device detached with deviceID:', device.deviceID);\r\n\r\n        // In this demo example, we will auto shutdown once all jabra devices are removed:\r\n        let remainingAttachedDevices = jabra.getAttachedDevices();\r\n        if (remainingAttachedDevices.length == 0) {\r\n            jabra.disposeAsync().then (() => {}); // Cleanup and allow node process to exit.\r\n        }\r\n    });\r\n});\r\n```\r\n\r\n### Multiple device management with typescript and async/await\r\n\r\n```typescript\r\nimport { createJabraApplication } from '@gnaudio/jabra-node-sdk';\r\n\r\n(async () => {\r\n    let jabra = await createJabraApplication('123'); // 123 is appID here\r\n\r\n    await jabra.scanForDevicesDoneAsync(); // Wait for all pre-attached devices to be scanned.\r\n\r\n    const deviceInstanceList = jabra.getAttachedDevices();\r\n    if (deviceInstanceList.length<2) {\r\n        throw new Error('Please make sure 2 jabra devices are attached');\r\n    }\r\n\r\n    const firstDevice = deviceInstanceList[0];\r\n    await firstDevice.ringAsync();\r\n\r\n    const secondDevice = deviceInstanceList[1];\r\n    await secondDevice.ringAsync();\r\n\r\n    // Dispose jabra sdk to enable node process to shutdown.\r\n    await jabra.disposeAsync();\r\n})();\r\n```\r\n\r\n## Sequence diagrams\r\n\r\nThese sequence diagrams shows typical use of the Node.js sdk:\r\n\r\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/outgoing-call-then-end-call.png)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/incoming-call-then-accept-on-device-then-end-call.png)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/incoming-call-then-user-rejects.png)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/mute-unmute-from-device.png)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/hold-resume-from-device.png)\r\n\r\n","gypfile":true,"scripts":{"doc":"typedoc --mode file --excludePrivate --excludeExternals --excludeNotExported --out dist/doc src/main","tsc":"tsc","build":"npm run build:dev","clean":"node-gyp clean && rimraf dist","install":"node-gyp rebuild","prepare":"npm run tsc && npm run doc && node dist/script/generatemeta.js","example2":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example2.ts","example3":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example3.ts","build:dev":"node-gyp rebuild --debug && npm run tsc && npm run generatemeta","example1a":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example1a.js","example1b":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example1b.ts","manueltest1":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/manueltest/test1.ts","manueltest2":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/manueltest/test2.ts","generatemeta":"ts-node src/script/generatemeta.ts","build:release":"node-gyp rebuild && npm run tsc && npm run generatemeta","pipeline-build-setversion":"node setversion.js"},"_npmUser":{"name":"extmchristensen","email":"extmchristensen@jabra.com"},"devEngines":{"npm":">=5.5.1","node":">=10.0.0"},"repository":{"url":"git+https://github.com/gnaudio/jabra-node-sdk.git","type":"git","directory":"nodesdk"},"_npmVersion":"6.13.4","description":"NodeJS SDK for Jabra Devices","directories":{},"_nodeVersion":"11.12.0","dependencies":{"bindings":"1.5.0","node-addon-api":"1.7.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"rimraf":"2.6.3","ts-node":"8.4.1","typedoc":"0.15.2","cross-env":"6.0.3","typescript":"3.6.3","@types/node":"12.7.11","@types/bindings":"1.3.0","replace-in-file":"4.1.3"},"_npmOperationalInternal":{"tmp":"tmp/jabra-node-sdk_3.1.0-beta.1_1583840780030_0.7369769918378468","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"3.1.0-beta.2":{"name":"@gnaudio/jabra-node-sdk","version":"3.1.0-beta.2","keywords":["jabra","sdk"],"author":{"name":"GN Audio"},"license":"MIT","_id":"@gnaudio/jabra-node-sdk@3.1.0-beta.2","maintainers":[{"name":"daniel_vasile_42","email":"fvasile@jabra.com"},{"name":"extmchristensen","email":"extmchristensen@jabra.com"},{"name":"frederiksen","email":"mrtn.frederiksen@gmail.com"},{"name":"sskjabra","email":"sklausen@jabra.com"}],"homepage":"https://github.com/gnaudio/jabra-node-sdk/","bugs":{"url":"https://developer.jabra.com"},"dist":{"shasum":"9795bfecda761854e08a5881b530010a48eba2b5","tarball":"https://registry.npmjs.org/@gnaudio/jabra-node-sdk/-/jabra-node-sdk-3.1.0-beta.2.tgz","fileCount":147,"integrity":"sha512-QnTgS3pR7ffdwa+tbMRAjDc7nfYUwUAXle7xAHv0ibPmtEFW2nFFju/20rBNNUMryZCOwj6BM0m9bPZ/rYqp2A==","signatures":[{"sig":"MEQCIApcIRK6jGayoUQQWOA6/duRxGpesy/NeHpw18phjx2xAiAJ68JFlAxbzLiyBz14vYygxYrxVIIw9P7Yt8A7KtGDKw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14204116,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeluKZCRA9TVsSAnZWagAAoqIQAIwqjJLk+2I8MxWofHr2\n4c/9XxJvOpQwezfcQa2C2wFcra8eVNc30ooOSwE4FdGFaLftC1jiNuXFOvIk\nb5Eo7nKq0rJTMi+KzjFnip7RAtYg41kFSBfM2Y4tlgFrj8ptJXrrqIZm7A7f\nHCc4HFbkl/RRg3xZSlEZdPTwE0iZTK3jSVzqIcOUy7tXQLlZeA0RiuxLfNHm\nLXTtYBm07XynaQtXqw/MZNmGX5LfRgSO9YDBGQQrOC+ALi/UGiSbkfnTKJAq\ni7GDvaSjewx8Ku0klmvJUOiLyOzXYxjAoRu6c/JOGnDowcv9asM7d+x416NJ\nopZZjZrwoG/ZLayMRd3ad6OcEhimPf++/dWMkwzQxNN2zqH+5mifhRZ294TJ\nHLmVFcSgumdAgGT5iyutfegFMI9lJRUNaF2ohzZCSDEb+l1ze7ZYCAj3DtS9\npFKP1i/RF7MZuHYB0ukwI/UKBWVJ43pq9ARE5slrkrfl3z3tl4dqOFJm+2a/\nd5FNnRJMMm8cHYOhT+U10bLYlwjiBr76sti/Xwa1/Ly/fq0Slzm4jyXGl5dO\nGLX4kEC8NFQajOlSldnCfnrSisfnlT99RDeEi4oHZ9Rm85GvWKMwVG1wTViy\n6xBH9XpvIM+BDhWUryWyrGrKH1nM9sJn5j2+OZJ5vrw0niHX2HF2JeocvDsK\nuriW\r\n=+7M2\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/main/index.js","types":"dist/main/index.d.ts","readme":"Jabra Node.js SDK\r\n\r\n# Table of Contents\r\n- [Versions](#versions)\r\n- [Pre-requisite](#pre-requisite)\r\n- [Installation](#installation)\r\n- [Debugging and Logging](#debugging-and-logging)\r\n- [API Reference](#api-reference)\r\n- [Examples](#examples)\r\n    - [Simple Example](#simple-example)\r\n    - [Multiple device management](#multiple-device-management)\r\n- [Bug report](https://github.com/gnaudio/jabra-node-sdk#bug-reports)\r\n- [Changelog](https://github.com/gnaudio/jabra-node-sdk/blob/master/CHANGELOG.md)\r\n- [License](https://github.com/gnaudio/jabra-node-sdk/blob/master/LICENSE.md)\r\n- [FAQ](https://github.com/gnaudio/jabra-node-sdk/blob/master/FAQ.md)\r\n\r\n## Versions\r\n\r\nLatest STABLE Windows(!) release is [v3.0.0 distributed on npmjs.com](https://www.npmjs.com/package/@gnaudio/jabra-node-sdk/v/3.0.0) (see [changelog](https://github.com/gnaudio/jabra-node-sdk/blob/master/CHANGELOG.md) for changes and notable defects). \r\n\r\nExceptionally, this v3.0.0 release is aimed only at Windows in order to fix a 100% CPU utilisation issue. Mac and Linux core library versions do not suffer from this issue. We therefore recommend that you for production use stay on v2.0.0 for those platforms, until the next general relase is made for all platforms. See changelog for details.\r\n\r\nLatest STABLE cross platform release is [v2.0.0 distributed on npmjs.com](https://www.npmjs.com/package/@gnaudio/jabra-node-sdk/v/2.0.0) (see [changelog](https://github.com/gnaudio/jabra-node-sdk/blob/master/CHANGELOG.md) for changes and notable defects). \r\n\r\nIn addition, BETA versions may be available on npmjs with a version name ending with \"-beta.X\" specifier. For such BETA versions,the following applies:\r\n\r\n    > Disclaimer for Alpha and Beta Software Release\r\n\r\n    > Please note that this is a copyrighted Jabra Product ((c) 2017 GN Audio A/S) (the “Product”) which is still undergoing final testing before its official release. The Product and all content found on it are provided on an “as is” and “as available” basis. Jabra does not provide any warranties, neither express nor implied, as to the suitability or usability of the Product or any of its content.\r\n\r\n    > Jabra disclaims liability for any loss, whether direct, indirect, special or consequential, suffered by any person as a result of their use of the Product or the software embedded, and for any claim arising from any injury or damage, including but not limited to, any personal or bodily injury or tangible property damage, arising from or resulting in any way from any alleged defects in the material, workmanship, or performance of the Product, and Company shall indemnify Jabra in respect of any such claims. All usage of the Product is at users’ own risk and the user will be solely responsible for any resulting from such activities.\r\n\r\n    > Should you encounter any bugs, glitches, dangers, lack of functionality, lack of comfort or other problems with the Product, please let us know immediately so we can rectify these accordingly. Your help in this regard is greatly appreciated.\r\n\r\n    > The Product is released solely for test use in Company’s organization and must not under any circumstances be distributed to third parties without prior written acceptance from Jabra.\r\n\r\n    > By using the software, I accept and acknowledge the content herein.`\r\n\r\n## Pre-requisite\r\n1. Node.js v8.x or later.\r\n2. **On MacOS:** `xcode` & `python 2.7`. By default, Python is installed on macOS but make sure correct version(2.7.x) is installed. Install Xcode from App store or download it from [here](https://developer.apple.com/xcode/download/).\r\n3. **On Windows:** `Visual C++ Build Tools` & `Python 2.7`. You can install all of these by following any of the below mentioned steps.\r\n\r\n    3.1. **During Node.js installation** By ticking the checkbox when prompted during Node.js installation for `Tools for Native modules`, this installs both `Visual C++ Build Tools` & `Python 2.7`. **Note** This is prompted only for Windows platform. For other platforms like Linux or MAC, C++ compilation tools has to be installed separately as mentioned in other steps.\r\n\r\n    3.2. Both `Visual C++ Build Tools` & `Python 2.7` can also be installed using command `npm install --global --production --add-python-to-path windows-build-tools`. To know more about this tool, see [this link.](https://github.com/felixrieseberg/windows-build-tools). **Note** For executing this command through `Windows Command Prompt` or `Windows PowerShell`, they should be ran in Administrator mode.\r\n4. **On Linux:** `build-essential` package for C++ compilation & `Python 2.7`.\r\n\r\n    4.1. **Udev rules:** To be able to communicate with Jabra devices with non-root privileges it is required to create a udev rule for Jabra devices. Place the udev rule in `/etc/udev/rules.d`, and follow naming guidelines for udev files.              \r\n    \r\n    **Example:** The file name should be something like `80-jabra.rules` where the number before the dash indicates in what order the system reads the rules (e.g. if you had another rules file called `70-someotherrule.rules`, it would read that one first), the word after the dash is just an identifier of sorts (it could be something other than jabra) and the extension must be `.rules`.\r\n\r\n    The contents of the file are:\r\n\r\n    `ATTRS{idVendor}==\"0b0e\", MODE=\"0666\", GROUP=\"users\"`\r\n\r\n    After creating the udev file (as root), reload the udev rules using:\r\n\r\n    `sudo udevadm control --reload`\r\n\r\n    Reattach your Jabra device in order to get new permissions assigned.\r\n\r\n5. **All Platforms:** `node-gyp`. You can install this using command `npm install -g node-gyp`. To know more about this, see [this link](https://www.npmjs.com/package/node-gyp)\r\n\r\n6. **For Electron.JS:** If you are using `asar` packaging then you may need to `unpack` some of the resources used in this module. These resources are native library files i.e `libjabra.dll`, `libjabra.dylib` & `libjabra.so`, which is stored in a `build\\Release` folder. By default latest electron builder will automatically unpack, but if it does not work then you can provide below option to your build process. To know more, see [this link](https://www.electron.build/configuration/configuration)\r\n\r\n    ```\r\n    \"build\": {\r\n        \"asarUnpack\": [\"node_modules/@gnaudio/jabra-node-sdk\"]\r\n    }\r\n    ```\r\n\r\n## Installation\r\nThis release is published to [npm](https://www.npmjs.com/package/@gnaudio/jabra-node-sdk) and can be installed via below command.\r\n```\r\nnpm install --save @gnaudio/jabra-node-sdk\r\n```\r\n\r\n## Debugging and Logging\r\nBelow environment variables are defined for logging and debugging purpose. User can change the values as per preference.\r\n\r\nEnvironment Variable | Value | Description\r\n--- | --- | ---\r\nLIBJABRA_TRACE_LEVEL | fatal, error, warning(default), info, debug | Log levels\r\nLIBJABRA_RESOURCE_PATH | **On Mac:** ~/Library/Application Support/JabraSDK/ **On Windows:** %appdata%/Roaming/JabraSDK  | This determine the system path where logs and device related files are written.\r\n\r\n## API Reference\r\nAPI doc is in html format. See doc folder inside installed module `node_modules\\@gnaudio\\jabra-node-sdk\\dist\\doc` and open `index.html`.\r\n\r\n## Examples\r\n\r\nFor all examples, user should first register the app on [Jabra developer site](https://developer.jabra.com/) to get appID. User should pass this appID to `createJabraApplication` in order to initialize the jabra module:\r\n\r\n### Simple button events example using javascript and plain promises\r\n\r\n```javascript\r\nconst j = require(\"@gnaudio/jabra-node-sdk\");\r\nj.createJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        console.log('Press any key on Jabra device ' + device.deviceName);\r\n        \r\n        // If you are creating a softphone, consider using GN protocol when device supports it\r\n        // in order to receive all events. E.g. device.setHidWorkingStateAsync(j.enumHidState.GN_HID);\r\n        device.on('btnPress', (btnType, btnValue) => {\r\n          console.log('New input from device is received: ', j.enumDeviceBtnType[btnType], btnValue);\r\n        });\r\n    });    \r\n});\r\n```\r\n\r\n### Simple button events example using typescript and plain promises\r\n\r\n```typescript\r\nimport { createJabraApplication, enumDeviceBtnType, enumHidState } from '@gnaudio/jabra-node-sdk';\r\ncreateJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        console.log('Press any key on Jabra device ' + device.deviceName);\r\n\r\n        // If you are creating a softphone, consider using GN protocol when device supports it\r\n        // in order to receive all events. E.g. device.setHidWorkingStateAsync(enumHidState.GN_HID);\r\n        device.on('btnPress', (btnType, btnValue) => {\r\n          console.log('New input from device is received: ', enumDeviceBtnType[btnType], btnValue);\r\n        });\r\n    });    \r\n});\r\n```\r\n\r\n### Ring example using typescript and plain promises\r\nThis example shows how to ring a Jabra device\r\n\r\n```typescript\r\nimport { createJabraApplication, JabraError } from '@gnaudio/jabra-node-sdk';\r\n\r\ncreateJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        device.isRingerSupportedAsync().then( (supported) => {\r\n            if (supported) {\r\n              device.ringAsync().then ( () => {\r\n                console.log('ringing');\r\n              }).catch ((err: JabraError) => {\r\n                console.log('ring failed with error ' + err);\r\n              }); // ring the device\r\n              setTimeout(() => {\r\n                device.unringAsync().then(() => {\r\n                    console.log('stopped ringing');\r\n                }).catch ((err: JabraError) => {\r\n                    console.log('unring failed with error ' + err);\r\n                });\r\n              }, 5000); // stop ringing the device after 5 second\r\n            }          \r\n        }).catch( (err: JabraError) => {\r\n            console.error('Jabra call failed with error ' + err)\r\n        });\r\n    });\r\n    \r\n    jabra.on('detach', (device) => {\r\n        console.log('Device detached with deviceID:', device.deviceID);\r\n\r\n        // In this demo example, we will auto shutdown once all jabra devices are removed:\r\n        let remainingAttachedDevices = jabra.getAttachedDevices();\r\n        if (remainingAttachedDevices.length == 0) {\r\n            jabra.disposeAsync().then (() => {}); // Cleanup and allow node process to exit.\r\n        }\r\n    });\r\n});\r\n```\r\n\r\n### Multiple device management with typescript and async/await\r\n\r\n```typescript\r\nimport { createJabraApplication } from '@gnaudio/jabra-node-sdk';\r\n\r\n(async () => {\r\n    let jabra = await createJabraApplication('123'); // 123 is appID here\r\n\r\n    await jabra.scanForDevicesDoneAsync(); // Wait for all pre-attached devices to be scanned.\r\n\r\n    const deviceInstanceList = jabra.getAttachedDevices();\r\n    if (deviceInstanceList.length<2) {\r\n        throw new Error('Please make sure 2 jabra devices are attached');\r\n    }\r\n\r\n    const firstDevice = deviceInstanceList[0];\r\n    await firstDevice.ringAsync();\r\n\r\n    const secondDevice = deviceInstanceList[1];\r\n    await secondDevice.ringAsync();\r\n\r\n    // Dispose jabra sdk to enable node process to shutdown.\r\n    await jabra.disposeAsync();\r\n})();\r\n```\r\n\r\n## Sequence diagrams\r\n\r\nThese sequence diagrams shows typical use of the Node.js sdk:\r\n\r\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/outgoing-call-then-end-call.png)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/incoming-call-then-accept-on-device-then-end-call.png)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/incoming-call-then-user-rejects.png)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/mute-unmute-from-device.png)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/hold-resume-from-device.png)\r\n\r\n","gypfile":true,"scripts":{"doc":"typedoc --mode file --excludePrivate --excludeExternals --excludeNotExported --out dist/doc src/main","tsc":"tsc","build":"npm run build:dev","clean":"node-gyp clean && rimraf dist","install":"node-gyp rebuild","prepare":"npm run tsc && npm run doc && node dist/script/generatemeta.js","example2":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example2.ts","example3":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example3.ts","build:dev":"node-gyp rebuild --debug && npm run tsc && npm run generatemeta","example1a":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example1a.js","example1b":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example1b.ts","manueltest1":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/manueltest/test1.ts","manueltest2":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/manueltest/test2.ts","generatemeta":"ts-node src/script/generatemeta.ts","build:release":"node-gyp rebuild && npm run tsc && npm run generatemeta","pipeline-build-setversion":"node setversion.js"},"_npmUser":{"name":"extmchristensen","email":"extmchristensen@jabra.com"},"devEngines":{"npm":">=5.5.1","node":">=10.0.0"},"repository":{"url":"git+https://github.com/gnaudio/jabra-node-sdk.git","type":"git","directory":"nodesdk"},"_npmVersion":"6.13.4","description":"NodeJS SDK for Jabra Devices","directories":{},"_nodeVersion":"11.12.0","dependencies":{"bindings":"1.5.0","node-addon-api":"1.7.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"rimraf":"3.0.2","ts-node":"8.8.2","typedoc":"0.17.4","cross-env":"7.0.2","typescript":"3.8.3","@types/node":"13.11.1","@types/bindings":"1.3.0","replace-in-file":"5.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jabra-node-sdk_3.1.0-beta.2_1586946713163_0.5593643246528339","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"3.1.0-beta.3":{"name":"@gnaudio/jabra-node-sdk","version":"3.1.0-beta.3","keywords":["jabra","sdk"],"author":{"name":"GN Audio"},"license":"MIT","_id":"@gnaudio/jabra-node-sdk@3.1.0-beta.3","maintainers":[{"name":"daniel_vasile_42","email":"fvasile@jabra.com"},{"name":"extmchristensen","email":"extmchristensen@jabra.com"},{"name":"frederiksen","email":"mrtn.frederiksen@gmail.com"},{"name":"sskjabra","email":"sklausen@jabra.com"},{"name":"theisjabra","email":"tfroehlich@jabra.com"}],"homepage":"https://github.com/gnaudio/jabra-node-sdk/","bugs":{"url":"https://developer.jabra.com"},"dist":{"shasum":"2db38dcd49f2d6d4983a4ce0d69f20d6938af338","tarball":"https://registry.npmjs.org/@gnaudio/jabra-node-sdk/-/jabra-node-sdk-3.1.0-beta.3.tgz","fileCount":152,"integrity":"sha512-QOUF8PEe8e0/lIjN83spaQHcccZ6yl+meFNf8pD4DnPcKgmzKW/1jrKX6pz1UIIkm8VKcwuUFbMxLAN6YxJU5w==","signatures":[{"sig":"MEUCIC4XkmPLji1EI/FU0yRGto+XnQEqzKBXPu2XUVo0g21TAiEA8GX5liGZXEygRnUwf9F+3tukOCBihVjSydXC3dYOdj8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14312023,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeziB7CRA9TVsSAnZWagAAngMP/0tDSxgRL8iuIgVDk9Ns\nsUAvwj7EZ5RnEAtAz/BS7+lpCfVX9Swhn3JSmeFfiddXs6Wc9BnQZ6CU7e7s\nx9TZSDCVmLZ7wlNmEV1ZKvXUCvC2OUxvRBTk9P5DZ62pz9N1vQ7vRhfWqPW2\nMLTf5Of7bwTbDve50tu2IuDbt9UaauTm386ZvZ9RWt/lS8Xjy9NfE2Bkg/ER\nH0SQqfmGwMNpfRwA7AgMqPtuEixTOjOxEyVB95VRD4WGkrvWMXu38LpvTwSm\nAwmGs+NLY7dJimKUAA+8VeOjFnvvoJbE8LFmpZrZLor7+GecjEowmlvluZdj\nK0XUSOYscHkZKyUThWHqorq8W3WgLaKkYdaAS889Fx/jo3eZ3T7LjH2bXN7a\ndquT4hk1+z6FvAMp91urilEUaGfAgQGq8Lqi2EYY1Ainqzw7HvBTWVZFZvwu\nt2N1zcof0xp9Cb4UlBlfZmKqSqNYMl5J3X2vHueJQBgbVE5EYDhORp0Fv7Zg\n7AOmBTknnTZ19AQW0YYlfV3dga4t5BKY5R+IE4y9DFmzyru48DlmUD0s5h0n\n46VUOjvIGT6TGdKo7pUGk/LZn9yV8MtuyfYInef8BPwf7swsroDdPhUoQr61\nVjDn2WUIVTELdNiqXM26Tp4qeBj1BxayXUVrvpu5RgDRGKISksyVeA96bxdt\neHmJ\r\n=PS6M\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/main/index.js","types":"dist/main/index.d.ts","readme":"Jabra Node.js SDK\r\n\r\n# Table of Contents\r\n- [Versions](#versions)\r\n- [Pre-requisite](#pre-requisite)\r\n- [Installation](#installation)\r\n- [Debugging and Logging](#debugging-and-logging)\r\n- [API Reference](#api-reference)\r\n- [Examples](#examples)\r\n    - [Simple Example](#simple-example)\r\n    - [Multiple device management](#multiple-device-management)\r\n- [Sequence Diagrams](#sequence-diagrams)\r\n- [Setup VSCode](#setup-vsCode)\r\n- [Bug report](https://github.com/gnaudio/jabra-node-sdk#bug-reports)\r\n- [Changelog](https://github.com/gnaudio/jabra-node-sdk/blob/master/CHANGELOG.md)\r\n- [License](https://github.com/gnaudio/jabra-node-sdk/blob/master/LICENSE.md)\r\n- [FAQ](https://github.com/gnaudio/jabra-node-sdk/blob/master/FAQ.md)\r\n\r\n## Versions\r\n\r\nLatest STABLE Windows(!) release is [v3.0.0 distributed on npmjs.com](https://www.npmjs.com/package/@gnaudio/jabra-node-sdk/v/3.0.0) (see [changelog](https://github.com/gnaudio/jabra-node-sdk/blob/master/CHANGELOG.md) for changes and notable defects). \r\n\r\nExceptionally, this v3.0.0 release is aimed only at Windows in order to fix a 100% CPU utilisation issue. Mac and Linux core library versions do not suffer from this issue. We therefore recommend that you for production use stay on v2.0.0 for those platforms, until the next general relase is made for all platforms. See changelog for details.\r\n\r\nLatest STABLE cross platform release is [v2.0.0 distributed on npmjs.com](https://www.npmjs.com/package/@gnaudio/jabra-node-sdk/v/2.0.0) (see [changelog](https://github.com/gnaudio/jabra-node-sdk/blob/master/CHANGELOG.md) for changes and notable defects). \r\n\r\nIn addition, BETA versions may be available on npmjs with a version name ending with \"-beta.X\" specifier. For such BETA versions,the following applies:\r\n\r\n    > Disclaimer for Alpha and Beta Software Release\r\n\r\n    > Please note that this is a copyrighted Jabra Product ((c) 2017 GN Audio A/S) (the “Product”) which is still undergoing final testing before its official release. The Product and all content found on it are provided on an “as is” and “as available” basis. Jabra does not provide any warranties, neither express nor implied, as to the suitability or usability of the Product or any of its content.\r\n\r\n    > Jabra disclaims liability for any loss, whether direct, indirect, special or consequential, suffered by any person as a result of their use of the Product or the software embedded, and for any claim arising from any injury or damage, including but not limited to, any personal or bodily injury or tangible property damage, arising from or resulting in any way from any alleged defects in the material, workmanship, or performance of the Product, and Company shall indemnify Jabra in respect of any such claims. All usage of the Product is at users’ own risk and the user will be solely responsible for any resulting from such activities.\r\n\r\n    > Should you encounter any bugs, glitches, dangers, lack of functionality, lack of comfort or other problems with the Product, please let us know immediately so we can rectify these accordingly. Your help in this regard is greatly appreciated.\r\n\r\n    > The Product is released solely for test use in Company’s organization and must not under any circumstances be distributed to third parties without prior written acceptance from Jabra.\r\n\r\n    > By using the software, I accept and acknowledge the content herein.`\r\n\r\n## Pre-requisite\r\n1. Node.js v8.x or later.\r\n2. **On MacOS:** `xcode` & `python 2.7`. By default, Python is installed on macOS but make sure correct version(2.7.x) is installed. Install Xcode from App store or download it from [here](https://developer.apple.com/xcode/download/).\r\n3. **On Windows:** `Visual C++ Build Tools` & `Python 2.7`. You can install all of these by following any of the below mentioned steps.\r\n\r\n    3.1. **During Node.js installation** By ticking the checkbox when prompted during Node.js installation for `Tools for Native modules`, this installs both `Visual C++ Build Tools` & `Python 2.7`. **Note** This is prompted only for Windows platform. For other platforms like Linux or MAC, C++ compilation tools has to be installed separately as mentioned in other steps.\r\n\r\n    3.2. Both `Visual C++ Build Tools` & `Python 2.7` can also be installed using command `npm install --global --production --add-python-to-path windows-build-tools`. To know more about this tool, see [this link.](https://github.com/felixrieseberg/windows-build-tools). **Note** For executing this command through `Windows Command Prompt` or `Windows PowerShell`, they should be ran in Administrator mode.\r\n4. **On Linux:** `build-essential` package for C++ compilation & `Python 2.7`.\r\n\r\n    4.1. **Udev rules:** To be able to communicate with Jabra devices with non-root privileges it is required to create a udev rule for Jabra devices. Place the udev rule in `/etc/udev/rules.d`, and follow naming guidelines for udev files.              \r\n    \r\n    **Example:** The file name should be something like `80-jabra.rules` where the number before the dash indicates in what order the system reads the rules (e.g. if you had another rules file called `70-someotherrule.rules`, it would read that one first), the word after the dash is just an identifier of sorts (it could be something other than jabra) and the extension must be `.rules`.\r\n\r\n    The contents of the file are:\r\n\r\n    `ATTRS{idVendor}==\"0b0e\", MODE=\"0666\", GROUP=\"users\"`\r\n\r\n    After creating the udev file (as root), reload the udev rules using:\r\n\r\n    `sudo udevadm control --reload`\r\n\r\n    Reattach your Jabra device in order to get new permissions assigned.\r\n\r\n5. **All Platforms:** `node-gyp`. You can install this using command `npm install -g node-gyp`. To know more about this, see [this link](https://www.npmjs.com/package/node-gyp)\r\n\r\n6. **For Electron.JS:** If you are using `asar` packaging then you may need to `unpack` some of the resources used in this module. These resources are native library files i.e `libjabra.dll`, `libjabra.dylib` & `libjabra.so`, which is stored in a `build\\Release` folder. By default latest electron builder will automatically unpack, but if it does not work then you can provide below option to your build process. To know more, see [this link](https://www.electron.build/configuration/configuration)\r\n\r\n    ```\r\n    \"build\": {\r\n        \"asarUnpack\": [\"node_modules/@gnaudio/jabra-node-sdk\"]\r\n    }\r\n    ```\r\n\r\n## Installation\r\nThis release is published to [npm](https://www.npmjs.com/package/@gnaudio/jabra-node-sdk) and can be installed via below command.\r\n```\r\nnpm install --save @gnaudio/jabra-node-sdk\r\n```\r\n\r\n## Debugging and Logging\r\nBelow environment variables are defined for logging and debugging purpose. User can change the values as per preference.\r\n\r\nEnvironment Variable | Value | Description\r\n--- | --- | ---\r\nLIBJABRA_TRACE_LEVEL | fatal, error, warning(default), info, debug | Log levels\r\nLIBJABRA_RESOURCE_PATH | **On Mac:** ~/Library/Application Support/JabraSDK/ **On Windows:** %appdata%/Roaming/JabraSDK  | This determine the system path where logs and device related files are written.\r\n\r\n## API Reference\r\nAPI doc is in html format. See doc folder inside installed module `node_modules\\@gnaudio\\jabra-node-sdk\\dist\\doc` and open `index.html`.\r\n\r\n## Examples\r\n\r\nFor all examples, user should first register the app on [Jabra developer site](https://developer.jabra.com/) to get appID. User should pass this appID to `createJabraApplication` in order to initialize the jabra module:\r\n\r\n### Simple button events example using javascript and plain promises\r\n\r\n```javascript\r\nconst j = require(\"@gnaudio/jabra-node-sdk\");\r\nj.createJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        console.log('Press any key on Jabra device ' + device.deviceName);\r\n        \r\n        device.on('btnPress', (btnType, btnValue) => {\r\n          console.log('New input from device is received: ', j.enumDeviceBtnType[btnType], btnValue);\r\n        });\r\n    });    \r\n});\r\n```\r\n\r\n### Simple button events example using typescript and plain promises\r\n\r\n```typescript\r\nimport { createJabraApplication, enumDeviceBtnType, enumHidState } from '@gnaudio/jabra-node-sdk';\r\ncreateJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        console.log('Press any key on Jabra device ' + device.deviceName);\r\n\r\n        device.on('btnPress', (btnType, btnValue) => {\r\n          console.log('New input from device is received: ', enumDeviceBtnType[btnType], btnValue);\r\n        });\r\n    });    \r\n});\r\n```\r\n\r\n### Ring example using typescript and plain promises\r\nThis example shows how to ring a Jabra device\r\n\r\n```typescript\r\nimport { createJabraApplication, JabraError } from '@gnaudio/jabra-node-sdk';\r\n\r\ncreateJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        device.isRingerSupportedAsync().then( (supported) => {\r\n            if (supported) {\r\n              device.ringAsync().then ( () => {\r\n                console.log('ringing');\r\n              }).catch ((err: JabraError) => {\r\n                console.log('ring failed with error ' + err);\r\n              }); // ring the device\r\n              setTimeout(() => {\r\n                device.unringAsync().then(() => {\r\n                    console.log('stopped ringing');\r\n                }).catch ((err: JabraError) => {\r\n                    console.log('unring failed with error ' + err);\r\n                });\r\n              }, 5000); // stop ringing the device after 5 second\r\n            }          \r\n        }).catch( (err: JabraError) => {\r\n            console.error('Jabra call failed with error ' + err)\r\n        });\r\n    });\r\n    \r\n    jabra.on('detach', (device) => {\r\n        console.log('Device detached with deviceID:', device.deviceID);\r\n\r\n        // In this demo example, we will auto shutdown once all jabra devices are removed:\r\n        let remainingAttachedDevices = jabra.getAttachedDevices();\r\n        if (remainingAttachedDevices.length == 0) {\r\n            jabra.disposeAsync().then (() => {}); // Cleanup and allow node process to exit.\r\n        }\r\n    });\r\n});\r\n```\r\n\r\n### Multiple device management with typescript and async/await\r\n\r\n```typescript\r\nimport { createJabraApplication } from '@gnaudio/jabra-node-sdk';\r\n\r\n(async () => {\r\n    let jabra = await createJabraApplication('123'); // 123 is appID here\r\n\r\n    await jabra.scanForDevicesDoneAsync(); // Wait for all pre-attached devices to be scanned.\r\n\r\n    const deviceInstanceList = jabra.getAttachedDevices();\r\n    if (deviceInstanceList.length<2) {\r\n        throw new Error('Please make sure 2 jabra devices are attached');\r\n    }\r\n\r\n    const firstDevice = deviceInstanceList[0];\r\n    await firstDevice.ringAsync();\r\n\r\n    const secondDevice = deviceInstanceList[1];\r\n    await secondDevice.ringAsync();\r\n\r\n    // Dispose jabra sdk to enable node process to shutdown.\r\n    await jabra.disposeAsync();\r\n})();\r\n```\r\n\r\n## Sequence diagrams\r\n\r\nThese sequence diagrams shows typical use of the Node.js sdk:\r\n\r\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/outgoing-call-then-end-call.png)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/incoming-call-then-accept-on-device-then-end-call.png)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/incoming-call-then-user-rejects.png)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/mute-unmute-from-device.png)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/hold-resume-from-device.png)\r\n\r\n## Setup VSCode\r\n\r\nThe project includes config-files for debugging typescript and C++ source files in [Visual Studio Code](https://code.visualstudio.com/) for Windows. To setup, install the C++ extension and compiler toolset as described in [this guide](https://code.visualstudio.com/docs/cpp/config-msvc), make sure all project [pre-requisites](#pre-requisite) are installed correctly, and set the following environment variables. \r\n\r\nEnvironment Variable | Value | Description\r\n--- | --- | ---\r\nLIBJABRA_WIN_NODE_GYP_CACHE_PATH | eg. %appdata%\\Local\\node-gyp\\Cache\\12.16.3\\include\\node | Used by the C/C++ extension to resolve include paths\r\nLIBJABRA_WIN_CPP_COMPILER_PATH | eg. C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x64/cl.exe | Used by the C/C++ extension to infer the path to the C++ standard library header files\r\n\r\nTo debug a C++ file, open a typescript file referencing the C++ file and start the debugger (Running the debugger on C++ files directly won't work). Make sure the \"Run\"-dropdown at the top of the debugging-sidebar is set to \"Current TS File - native code only (windows)\" \r\n","gypfile":true,"scripts":{"doc":"typedoc --mode file --excludePrivate --excludeExternals --excludeNotExported --out dist/doc src/main","tsc":"tsc","build":"npm run build:dev","clean":"node-gyp clean && rimraf dist","install":"node-gyp rebuild","prepare":"npm run tsc && npm run doc && node dist/script/generatemeta.js","example2":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example2.ts","example3":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example3.ts","build:dev":"node-gyp rebuild --debug && npm run tsc && npm run generatemeta","example1a":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example1a.js","example1b":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example1b.ts","manueltest1":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/manueltest/test1.ts","manueltest2":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/manueltest/test2.ts","generatemeta":"ts-node src/script/generatemeta.ts","build:release":"node-gyp rebuild && npm run tsc && npm run generatemeta","pipeline-build-setversion":"node setversion.js"},"_npmUser":{"name":"theisjabra","email":"tfroehlich@jabra.com"},"devEngines":{"npm":">=5.5.1","node":">=10.0.0"},"repository":{"url":"git+https://github.com/gnaudio/jabra-node-sdk.git","type":"git","directory":"nodesdk"},"_npmVersion":"6.14.4","description":"NodeJS SDK for Jabra Devices","directories":{},"_nodeVersion":"12.16.3","dependencies":{"bindings":"1.5.0","node-addon-api":"1.7.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"rimraf":"3.0.2","ts-node":"8.8.2","typedoc":"0.17.4","cross-env":"7.0.2","typescript":"3.8.3","@types/node":"13.11.1","@types/bindings":"1.3.0","replace-in-file":"5.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jabra-node-sdk_3.1.0-beta.3_1590567034114_0.3556936820837857","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"3.1.0-beta.4":{"name":"@gnaudio/jabra-node-sdk","version":"3.1.0-beta.4","keywords":["jabra","sdk"],"author":{"name":"GN Audio"},"license":"MIT","_id":"@gnaudio/jabra-node-sdk@3.1.0-beta.4","maintainers":[{"name":"daniel_vasile_42","email":"fvasile@jabra.com"},{"name":"extmchristensen","email":"extmchristensen@jabra.com"},{"name":"frederiksen","email":"mrtn.frederiksen@gmail.com"},{"name":"sskjabra","email":"sklausen@jabra.com"},{"name":"theisjabra","email":"tfroehlich@jabra.com"}],"homepage":"https://github.com/gnaudio/jabra-node-sdk/","bugs":{"url":"https://developer.jabra.com"},"dist":{"shasum":"9f98058c421466ad922cc4fe9e89b2f8f342d4c8","tarball":"https://registry.npmjs.org/@gnaudio/jabra-node-sdk/-/jabra-node-sdk-3.1.0-beta.4.tgz","fileCount":152,"integrity":"sha512-ILyoZvnrhnUNy2GEs+mU7WkopKvwqHTa7k1s+IE4kB1lfBzwzhTUmg5oaHyOHzlVbgycMTUwu9wJjHBSX37nYw==","signatures":[{"sig":"MEUCIQCYFXcdIfBZthhQejq1Wa1fQKpK45qm6R367jwBsbNyKAIgLDbHRZhVoFMBcONF5vlmytUuoylmlA0OFUr/X6eIVSU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14364224,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe2K3nCRA9TVsSAnZWagAAZLwP/jLTfHpESKVlntR7tikD\nLpSU4WEnun2XhMfTFZuaTDwbEcq7nx9ykgfT8WDJ2QNOlHTvOJDmxeFtxKL6\nW+F05hj/VcQGBj+iWUp2c8XcGDSBywIwSb3GCzaNeCux+EtjpWTIUBiXe5l2\n0QU1s9rpxdFTSHdmHUvfUe3FcRhKCD2UtnBUWX/ghm4LORzSrNrc7MMoojJs\nCglznMXXAvhjek8Bt6tSH9ym7fTprkqPgNj6Br8InBekYTQKjLYSXipVhzla\nQZXrgUpd25MGrrmzCHDbvj/qVX95YMka9g/54yYuEeCuHVhd8o331F7xOPPe\njCi6PT9sTflVMr0kTKupsj/f+LOz0YQiorB5DCnP4l/C9czL26dz8pSKWJfC\nGl+LkvH66s8FdQgHvEVz+ni4AxBJisxyVdHZc4FyBRiWBBus8t1Db6OI9Ti/\nZp0pTAzah8bahP5ahVWdYzPfg0i7msXee3WtBQFEeEPXFykzn8Q0XSV8w3a9\nDPmVofbWRYELiWBN3yTbyEWF/occm/mJbEHI4bPrGq2Dcn4F4z6eZABoei8h\nZgEFVRFXf0Rw4c7XfJhEOq6w58DZXN8GqJjYRYHRhOOxXIRPOeN8IymPgFD8\nhtyYRMd5XtZeDCDx41tCV89NOrzHK/sQFQ8EAmf3l3M423lGykIDrxOb0E32\nS+9e\r\n=t+lR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/main/index.js","types":"dist/main/index.d.ts","readme":"Jabra Node.js SDK\r\n\r\n# Table of Contents\r\n- [Versions](#versions)\r\n- [Pre-requisite](#pre-requisite)\r\n- [Installation](#installation)\r\n- [Debugging and Logging](#debugging-and-logging)\r\n- [API Reference](#api-reference)\r\n- [Examples](#examples)\r\n    - [Simple Example](#simple-button-events-example-using-javascript-and-plain-promises)\r\n    - [Multiple device management](#multiple-device-management-with-typescript-and-asyncawait)\r\n- [Sequence Diagrams](#sequence-diagrams)\r\n- [Setup VSCode](#setup-vsCode)\r\n- [Bug report](https://github.com/gnaudio/jabra-node-sdk#bug-reports)\r\n- [Changelog](https://github.com/gnaudio/jabra-node-sdk/blob/master/CHANGELOG.md)\r\n- [License](https://github.com/gnaudio/jabra-node-sdk/blob/master/LICENSE.md)\r\n- [FAQ](https://github.com/gnaudio/jabra-node-sdk/blob/master/FAQ.md)\r\n\r\n## Versions\r\n\r\nLatest STABLE Windows(!) release is [v3.0.0 distributed on npmjs.com](https://www.npmjs.com/package/@gnaudio/jabra-node-sdk/v/3.0.0) (see [changelog](https://github.com/gnaudio/jabra-node-sdk/blob/master/CHANGELOG.md) for changes and notable defects). \r\n\r\nExceptionally, this v3.0.0 release is aimed only at Windows in order to fix a 100% CPU utilisation issue. Mac and Linux core library versions do not suffer from this issue. We therefore recommend that you for production use stay on v2.0.0 for those platforms, until the next general relase is made for all platforms. See changelog for details.\r\n\r\nLatest STABLE cross platform release is [v2.0.0 distributed on npmjs.com](https://www.npmjs.com/package/@gnaudio/jabra-node-sdk/v/2.0.0) (see [changelog](https://github.com/gnaudio/jabra-node-sdk/blob/master/CHANGELOG.md) for changes and notable defects). \r\n\r\nIn addition, BETA versions may be available on npmjs with a version name ending with \"-beta.X\" specifier. For such BETA versions,the following applies:\r\n\r\n    > Disclaimer for Alpha and Beta Software Release\r\n\r\n    > Please note that this is a copyrighted Jabra Product ((c) 2017 GN Audio A/S) (the “Product”) which is still undergoing final testing before its official release. The Product and all content found on it are provided on an “as is” and “as available” basis. Jabra does not provide any warranties, neither express nor implied, as to the suitability or usability of the Product or any of its content.\r\n\r\n    > Jabra disclaims liability for any loss, whether direct, indirect, special or consequential, suffered by any person as a result of their use of the Product or the software embedded, and for any claim arising from any injury or damage, including but not limited to, any personal or bodily injury or tangible property damage, arising from or resulting in any way from any alleged defects in the material, workmanship, or performance of the Product, and Company shall indemnify Jabra in respect of any such claims. All usage of the Product is at users’ own risk and the user will be solely responsible for any resulting from such activities.\r\n\r\n    > Should you encounter any bugs, glitches, dangers, lack of functionality, lack of comfort or other problems with the Product, please let us know immediately so we can rectify these accordingly. Your help in this regard is greatly appreciated.\r\n\r\n    > The Product is released solely for test use in Company’s organization and must not under any circumstances be distributed to third parties without prior written acceptance from Jabra.\r\n\r\n    > By using the software, I accept and acknowledge the content herein.`\r\n\r\n## Pre-requisite\r\n1. Node.js v8.x or later.\r\n2. **On MacOS:** `xcode` & `python 2.7`. By default, Python is installed on macOS but make sure correct version(2.7.x) is installed. Install Xcode from App store or download it from [here](https://developer.apple.com/xcode/download/).\r\n3. **On Windows:** `Visual C++ Build Tools` & `Python 2.7`. You can install all of these by following any of the below mentioned steps.\r\n\r\n    3.1. **During Node.js installation** By ticking the checkbox when prompted during Node.js installation for `Tools for Native modules`, this installs both `Visual C++ Build Tools` & `Python 2.7`. **Note** This is prompted only for Windows platform. For other platforms like Linux or MAC, C++ compilation tools has to be installed separately as mentioned in other steps.\r\n\r\n    3.2. Both `Visual C++ Build Tools` & `Python 2.7` can also be installed using command `npm install --global --production --add-python-to-path windows-build-tools`. To know more about this tool, see [this link.](https://github.com/felixrieseberg/windows-build-tools). **Note** For executing this command through `Windows Command Prompt` or `Windows PowerShell`, they should be ran in Administrator mode.\r\n4. **On Linux:** `build-essential` package for C++ compilation & `Python 2.7`.\r\n\r\n    4.1. **Udev rules:** To be able to communicate with Jabra devices with non-root privileges it is required to create a udev rule for Jabra devices. Place the udev rule in `/etc/udev/rules.d`, and follow naming guidelines for udev files.              \r\n    \r\n    **Example:** The file name should be something like `80-jabra.rules` where the number before the dash indicates in what order the system reads the rules (e.g. if you had another rules file called `70-someotherrule.rules`, it would read that one first), the word after the dash is just an identifier of sorts (it could be something other than jabra) and the extension must be `.rules`.\r\n\r\n    The contents of the file are:\r\n\r\n    `ATTRS{idVendor}==\"0b0e\", MODE=\"0666\", GROUP=\"users\"`\r\n\r\n    After creating the udev file (as root), reload the udev rules using:\r\n\r\n    `sudo udevadm control --reload`\r\n\r\n    Reattach your Jabra device in order to get new permissions assigned.\r\n\r\n5. **All Platforms:** `node-gyp`. You can install this using command `npm install -g node-gyp`. To know more about this, see [this link](https://www.npmjs.com/package/node-gyp)\r\n\r\n6. **For Electron.JS:** If you are using `asar` packaging then you may need to `unpack` some of the resources used in this module. These resources are native library files i.e `libjabra.dll`, `libjabra.dylib` & `libjabra.so`, which is stored in a `build\\Release` folder. By default latest electron builder will automatically unpack, but if it does not work then you can provide below option to your build process. To know more, see [this link](https://www.electron.build/configuration/configuration)\r\n\r\n    ```\r\n    \"build\": {\r\n        \"asarUnpack\": [\"node_modules/@gnaudio/jabra-node-sdk\"]\r\n    }\r\n    ```\r\n\r\n## Installation\r\nThis release is published to [npm](https://www.npmjs.com/package/@gnaudio/jabra-node-sdk) and can be installed via below command.\r\n```\r\nnpm install --save @gnaudio/jabra-node-sdk\r\n```\r\n\r\n## Debugging and Logging\r\nBelow environment variables are defined for logging and debugging purpose. User can change the values as per preference.\r\n\r\nEnvironment Variable | Value | Description\r\n--- | --- | ---\r\nLIBJABRA_TRACE_LEVEL | fatal, error, warning(default), info, debug | Log levels\r\nLIBJABRA_RESOURCE_PATH | **On Mac:** ~/Library/Application Support/JabraSDK/ **On Windows:** %appdata%/Roaming/JabraSDK  | This determine the system path where logs and device related files are written.\r\n\r\n## API Reference\r\nAPI doc is in html format. See doc folder inside installed module `node_modules\\@gnaudio\\jabra-node-sdk\\dist\\doc` and open `index.html`.\r\n\r\n## Examples\r\n\r\nFor all examples, user should first register the app on [Jabra developer site](https://developer.jabra.com/) to get appID. User should pass this appID to `createJabraApplication` in order to initialize the jabra module:\r\n\r\n### Simple button events example using javascript and plain promises\r\n\r\n```javascript\r\nconst j = require(\"@gnaudio/jabra-node-sdk\");\r\nj.createJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        console.log('Press any key on Jabra device ' + device.deviceName);\r\n        \r\n        device.on('btnPress', (btnType, btnValue) => {\r\n          console.log('New input from device is received: ', j.enumDeviceBtnType[btnType], btnValue);\r\n        });\r\n    });    \r\n});\r\n```\r\n\r\n### Simple button events example using typescript and plain promises\r\n\r\n```typescript\r\nimport { createJabraApplication, enumDeviceBtnType, enumHidState } from '@gnaudio/jabra-node-sdk';\r\ncreateJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        console.log('Press any key on Jabra device ' + device.deviceName);\r\n\r\n        device.on('btnPress', (btnType, btnValue) => {\r\n          console.log('New input from device is received: ', enumDeviceBtnType[btnType], btnValue);\r\n        });\r\n    });    \r\n});\r\n```\r\n\r\n### Ring example using typescript and plain promises\r\nThis example shows how to ring a Jabra device\r\n\r\n```typescript\r\nimport { createJabraApplication, JabraError } from '@gnaudio/jabra-node-sdk';\r\n\r\ncreateJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        device.isRingerSupportedAsync().then( (supported) => {\r\n            if (supported) {\r\n              device.ringAsync().then ( () => {\r\n                console.log('ringing');\r\n              }).catch ((err: JabraError) => {\r\n                console.log('ring failed with error ' + err);\r\n              }); // ring the device\r\n              setTimeout(() => {\r\n                device.unringAsync().then(() => {\r\n                    console.log('stopped ringing');\r\n                }).catch ((err: JabraError) => {\r\n                    console.log('unring failed with error ' + err);\r\n                });\r\n              }, 5000); // stop ringing the device after 5 second\r\n            }          \r\n        }).catch( (err: JabraError) => {\r\n            console.error('Jabra call failed with error ' + err)\r\n        });\r\n    });\r\n    \r\n    jabra.on('detach', (device) => {\r\n        console.log('Device detached with deviceID:', device.deviceID);\r\n\r\n        // In this demo example, we will auto shutdown once all jabra devices are removed:\r\n        let remainingAttachedDevices = jabra.getAttachedDevices();\r\n        if (remainingAttachedDevices.length == 0) {\r\n            jabra.disposeAsync().then (() => {}); // Cleanup and allow node process to exit.\r\n        }\r\n    });\r\n});\r\n```\r\n\r\n### Multiple device management with typescript and async/await\r\n\r\n```typescript\r\nimport { createJabraApplication } from '@gnaudio/jabra-node-sdk';\r\n\r\n(async () => {\r\n    let jabra = await createJabraApplication('123'); // 123 is appID here\r\n\r\n    await jabra.scanForDevicesDoneAsync(); // Wait for all pre-attached devices to be scanned.\r\n\r\n    const deviceInstanceList = jabra.getAttachedDevices();\r\n    if (deviceInstanceList.length<2) {\r\n        throw new Error('Please make sure 2 jabra devices are attached');\r\n    }\r\n\r\n    const firstDevice = deviceInstanceList[0];\r\n    await firstDevice.ringAsync();\r\n\r\n    const secondDevice = deviceInstanceList[1];\r\n    await secondDevice.ringAsync();\r\n\r\n    // Dispose jabra sdk to enable node process to shutdown.\r\n    await jabra.disposeAsync();\r\n})();\r\n```\r\n\r\n## Sequence diagrams\r\n\r\nThese sequence diagrams shows typical use of the Node.js sdk:\r\n\r\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/outgoing-call-then-end-call.png)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/incoming-call-then-accept-on-device-then-end-call.png)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/incoming-call-then-user-rejects.png)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/mute-unmute-from-device.png)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/hold-resume-from-device.png)\r\n\r\n## Setup VSCode\r\n\r\nThe project includes config-files for debugging typescript and C++ source files in [Visual Studio Code](https://code.visualstudio.com/) for Windows. To setup, install the C++ extension and compiler toolset as described in [this guide](https://code.visualstudio.com/docs/cpp/config-msvc), make sure all project [pre-requisites](#pre-requisite) are installed correctly, and set the following environment variables. \r\n\r\nEnvironment Variable | Value | Description\r\n--- | --- | ---\r\nLIBJABRA_WIN_NODE_GYP_CACHE_PATH | eg. %appdata%\\Local\\node-gyp\\Cache\\12.16.3\\include\\node | Used by the C/C++ extension to resolve include paths\r\nLIBJABRA_WIN_CPP_COMPILER_PATH | eg. C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x64/cl.exe | Used by the C/C++ extension to infer the path to the C++ standard library header files\r\n\r\nTo debug a C++ file, open a typescript file referencing the C++ file and start the debugger (Running the debugger on C++ files directly won't work). Make sure the \"Run\"-dropdown at the top of the debugging-sidebar is set to \"Current TS File - native code only (windows)\" \r\n","gypfile":true,"scripts":{"doc":"typedoc --mode file --excludePrivate --excludeExternals --excludeNotExported --out dist/doc src/main","tsc":"tsc","build":"npm run build:dev","clean":"node-gyp clean && rimraf dist","install":"node-gyp rebuild","prepare":"npm run tsc && npm run doc && node dist/script/generatemeta.js","example2":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example2.ts","example3":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example3.ts","build:dev":"node-gyp rebuild --debug && npm run tsc && npm run generatemeta","example1a":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example1a.js","example1b":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example1b.ts","manueltest1":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/manueltest/test1.ts","manueltest2":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/manueltest/test2.ts","generatemeta":"ts-node src/script/generatemeta.ts","build:release":"node-gyp rebuild && npm run tsc && npm run generatemeta","pipeline-build-setversion":"node setversion.js"},"_npmUser":{"name":"extmchristensen","email":"extmchristensen@jabra.com"},"devEngines":{"npm":">=5.5.1","node":">=10.0.0"},"repository":{"url":"git+https://github.com/gnaudio/jabra-node-sdk.git","type":"git","directory":"nodesdk"},"_npmVersion":"6.13.4","description":"NodeJS SDK for Jabra Devices","directories":{},"_nodeVersion":"11.12.0","dependencies":{"bindings":"1.5.0","node-addon-api":"1.7.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"rimraf":"3.0.2","ts-node":"8.8.2","typedoc":"0.17.4","cross-env":"7.0.2","typescript":"3.8.3","@types/node":"13.11.1","@types/bindings":"1.3.0","replace-in-file":"5.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jabra-node-sdk_3.1.0-beta.4_1591258598664_0.621663576837926","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"3.1.0":{"name":"@gnaudio/jabra-node-sdk","version":"3.1.0","keywords":["jabra","sdk"],"author":{"name":"GN Audio"},"license":"MIT","_id":"@gnaudio/jabra-node-sdk@3.1.0","maintainers":[{"name":"daniel_vasile_42","email":"fvasile@jabra.com"},{"name":"extmchristensen","email":"extmchristensen@jabra.com"},{"name":"frederiksen","email":"mrtn.frederiksen@gmail.com"},{"name":"sskjabra","email":"sklausen@jabra.com"},{"name":"theisjabra","email":"tfroehlich@jabra.com"}],"homepage":"https://github.com/gnaudio/jabra-node-sdk/","bugs":{"url":"https://developer.jabra.com"},"dist":{"shasum":"2784398028016ebb01f0a398c897ecc2ab2a3b46","tarball":"https://registry.npmjs.org/@gnaudio/jabra-node-sdk/-/jabra-node-sdk-3.1.0.tgz","fileCount":152,"integrity":"sha512-qHXVBV+w50nWP42Os4AZ6DhCIVAi2bz1FucldVujY7Cyb5FLTujvFbJkoEFFRZAWIIGkGbxX5FVX1m+OiXf3aQ==","signatures":[{"sig":"MEUCIQD0KbxzWboURNPoajvMcSx3e1fAeQf9EOViaCB2K5pxbQIgN3gnU+AmJve3yUfdZ1HsROY/PN1hZqaFP/Cxp6r2T+Q=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14363006,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe6GY9CRA9TVsSAnZWagAAALUP/RfAcXL5AfEzH9rAJrGe\n+I8IY51J/QbfBMiW/minTrLvyus66EvWhsb93u0J8L1dilaayPjQqiPRrIht\niCg5RRCOILTIMxUFgJBatxtVXnvhiXXy+qsNs6ToXsxI9NCq5W4J+9kYCmjA\nLrjSCV67rxuFXuxbn1w2IOmumie9439TjU5vX2hyd1hpC/QN/WAMjYUfPsHQ\nG++XBbOvm7XTaML81/DRTryjR5+0kxYicwDqdmt+B8HDG9hfdCf9Im/fSqKh\npVy7WlPDmeqm38Tg1N7/UCDCAOVJYgGosBdsFcYECZjrTyqxHe0XcXmPwGPI\nhHTCoS1IYk4KkH50zehKVHoVe5Z6qIS78p+WCyh6oNocV7tGUyqFuU1OL+B/\nubIwrpTu2IOwdQD3vPcvQ+E40nZwfo69gfmkaFg2SOUxMRyV+uKKfpUe10lB\nsuMtZUDnZARJASaFWIdaZL8RRD9CL75sUIgCYxMCcaWGCyIVpQ70Uw9YwKj8\n2TOcWCx/tTk9vqpQLXJQus1iqFaagr2Rq/IYtiUJsYcBrYt8h+ft7pRthyXa\n0cGr4zEt7R/G9bPMQph/vvb8wl6ESEQCX3YrVIY7Zzox9sK+M+cWSDy6yCHZ\nMNaktcympy/pXnJcNcbQswhfMIvnrmJewD6BJjEcmtBM6fRyj0qZgFnW2kUf\nRdwZ\r\n=X09x\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/main/index.js","types":"dist/main/index.d.ts","gypfile":true,"scripts":{"doc":"typedoc --mode file --excludePrivate --excludeExternals --excludeNotExported --out dist/doc src/main","tsc":"tsc","build":"npm run build:dev","clean":"node-gyp clean && rimraf dist","install":"node-gyp rebuild","prepare":"npm run tsc && npm run doc && node dist/script/generatemeta.js","example2":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example2.ts","example3":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example3.ts","build:dev":"node-gyp rebuild --debug && npm run tsc && npm run generatemeta","example1a":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example1a.js","example1b":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example1b.ts","manueltest1":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/manueltest/test1.ts","manueltest2":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/manueltest/test2.ts","generatemeta":"ts-node src/script/generatemeta.ts","build:release":"node-gyp rebuild && npm run tsc && npm run generatemeta","pipeline-build-setversion":"node setversion.js"},"_npmUser":{"name":"theisjabra","email":"tfroehlich@jabra.com"},"devEngines":{"npm":">=5.5.1","node":">=10.0.0"},"repository":{"url":"git+https://github.com/gnaudio/jabra-node-sdk.git","type":"git","directory":"nodesdk"},"_npmVersion":"6.14.4","description":"NodeJS SDK for Jabra Devices","directories":{},"_nodeVersion":"12.16.3","dependencies":{"bindings":"1.5.0","node-addon-api":"1.7.1"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"3.0.2","ts-node":"8.8.2","typedoc":"0.17.4","cross-env":"7.0.2","typescript":"3.8.3","@types/node":"13.11.1","@types/bindings":"1.3.0","replace-in-file":"5.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jabra-node-sdk_3.1.0_1592288828665_0.04313785137157611","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"3.2.0-beta.1":{"name":"@gnaudio/jabra-node-sdk","version":"3.2.0-beta.1","keywords":["jabra","sdk"],"author":{"name":"GN Audio"},"license":"MIT","_id":"@gnaudio/jabra-node-sdk@3.2.0-beta.1","maintainers":[{"name":"daniel_vasile_42","email":"fvasile@jabra.com"},{"name":"extmchristensen","email":"extmchristensen@jabra.com"},{"name":"frederiksen","email":"mrtn.frederiksen@gmail.com"},{"name":"sskjabra","email":"sklausen@jabra.com"},{"name":"theisjabra","email":"tfroehlich@jabra.com"}],"homepage":"https://github.com/gnaudio/jabra-node-sdk/","bugs":{"url":"https://developer.jabra.com"},"dist":{"shasum":"2bb80106196a32d35a6273617d74a333d5ee0570","tarball":"https://registry.npmjs.org/@gnaudio/jabra-node-sdk/-/jabra-node-sdk-3.2.0-beta.1.tgz","fileCount":156,"integrity":"sha512-tSZZyum3Nj72lLMqyMobjNBTgb1MdSC3eIN6vlvRW89F6z1gKV7LVvRhEh3/a0TjDNPlvFRHxv4mDPG6bWBT8A==","signatures":[{"sig":"MEYCIQDTMGvuhY9W2xnItU2ll5U2zn2yfhbK2dg2jAwHADOpfgIhAPSWpOv5/g7u0lb8YA6HmJqfzNgKAKUNuXykqrttEGbI","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14440032,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe+t9ACRA9TVsSAnZWagAAG9UP/10STKCnI3jfs2S2XjHb\nTrWiSe2ql7VPjoruTyX7ku7KCpcUZCH/NPNbMme3veJFHLuWlUWZAC83lVFi\njact01hSDhkxbAE+JpJi4ss34sxFkGcezKZZVWb3oFGJ2NaeVPxat54K8LpC\nsXaqEmEncs/HKJL4E/G5MwAAi6evfAEH4MZmpmlLsEVPnWiX94NN/hP63dvp\ng0GClrcwNP9/E6WFxN0wc9kka011L+DpbqWIthlzblzQvEZRAAa3zfvwa9Bd\nRDRiLgvJupWGEa+1MVVX+g0qyUAc0J6j/KZEPcDn2Z4AemPKHPGk7+Pd3Rww\nPgR/AkxFTyxqcUyEOMWnxVc3STTkt4PEZ4K9xfrFY4uq+OjAH570RAvdGxZk\nIRkTWIbFPWJUdxJvissIQ5i0vniQL5a299oR8lsnxMqMiri9k7QnoGWs+y61\nZMXdCH6rclLk3YIorxsTsH5oGLOrtVE0FnqjgKmPbpkWq2cfyHTPSuW3t2Lz\nDPNCymTk71uABrCofk5G2FLLRF5sstsEHsmM2lWJhfwhJt1/r/apJb2wZBy6\nv5nVrSVyK8DgEq9lDNT5WwmlvYu0jE7xAzrEdhYTruE6EAlRIJIZ71nkMp3v\n9yBc3y0/SNzwIy6nRPyeqKytNntLUYQrzSsbHFMQRQVarS+yEDPA0PB4r1Ah\n0ldq\r\n=cP6f\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/main/index.js","types":"dist/main/index.d.ts","readme":"Jabra Node.js SDK\r\n\r\n# Table of Contents\r\n- [Versions](#versions)\r\n- [Pre-requisite](#pre-requisite)\r\n- [Installation](#installation)\r\n- [Debugging and Logging](#debugging-and-logging)\r\n- [API Reference](#api-reference)\r\n- [Examples](#examples)\r\n    - [Simple Example](#simple-button-events-example-using-javascript-and-plain-promises)\r\n    - [Multiple device management](#multiple-device-management-with-typescript-and-asyncawait)\r\n- [Sequence Diagrams](#sequence-diagrams)\r\n- [Setup VSCode](#setup-vsCode)\r\n- [Bug report](https://github.com/gnaudio/jabra-node-sdk#bug-reports)\r\n- [Changelog](https://github.com/gnaudio/jabra-node-sdk/blob/master/CHANGELOG.md)\r\n- [License](https://github.com/gnaudio/jabra-node-sdk/blob/master/LICENSE.md)\r\n- [FAQ](https://github.com/gnaudio/jabra-node-sdk/blob/master/FAQ.md)\r\n\r\n## Versions\r\n\r\nLatest **STABLE** release is **v3.1.0** [distributed on npmjs.com](https://www.npmjs.com/package/@gnaudio/jabra-node-sdk/v/3.1.0) (see [changelog](https://github.com/gnaudio/jabra-node-sdk/blob/master/CHANGELOG.md) for changes and notable defects). \r\n\r\nIn addition, **BETA** versions may be available on npmjs with a version name ending with \"-beta.X\" specifier. For such BETA versions,the following applies:\r\n\r\n    > Disclaimer for Alpha and Beta Software Release\r\n\r\n    > Please note that this is a copyrighted Jabra Product ((c) 2017 GN Audio A/S) (the “Product”) which is still undergoing final testing before its official release. The Product and all content found on it are provided on an “as is” and “as available” basis. Jabra does not provide any warranties, neither express nor implied, as to the suitability or usability of the Product or any of its content.\r\n\r\n    > Jabra disclaims liability for any loss, whether direct, indirect, special or consequential, suffered by any person as a result of their use of the Product or the software embedded, and for any claim arising from any injury or damage, including but not limited to, any personal or bodily injury or tangible property damage, arising from or resulting in any way from any alleged defects in the material, workmanship, or performance of the Product, and Company shall indemnify Jabra in respect of any such claims. All usage of the Product is at users’ own risk and the user will be solely responsible for any resulting from such activities.\r\n\r\n    > Should you encounter any bugs, glitches, dangers, lack of functionality, lack of comfort or other problems with the Product, please let us know immediately so we can rectify these accordingly. Your help in this regard is greatly appreciated.\r\n\r\n    > The Product is released solely for test use in Company’s organization and must not under any circumstances be distributed to third parties without prior written acceptance from Jabra.\r\n\r\n    > By using the software, I accept and acknowledge the content herein.`\r\n\r\n## Pre-requisite\r\n1. Node.js v8.x or later.\r\n2. **On MacOS:** `xcode` & `python 2.7`. By default, Python is installed on macOS but make sure correct version(2.7.x) is installed. Install Xcode from App store or download it from [here](https://developer.apple.com/xcode/download/).\r\n3. **On Windows:** `Visual C++ Build Tools` & `Python 2.7`. You can install all of these by following any of the below mentioned steps.\r\n\r\n    3.1. **During Node.js installation** By ticking the checkbox when prompted during Node.js installation for `Tools for Native modules`, this installs both `Visual C++ Build Tools` & `Python 2.7`. **Note** This is prompted only for Windows platform. For other platforms like Linux or MAC, C++ compilation tools has to be installed separately as mentioned in other steps.\r\n\r\n    3.2. Both `Visual C++ Build Tools` & `Python 2.7` can also be installed using command `npm install --global --production --add-python-to-path windows-build-tools`. To know more about this tool, see [this link.](https://github.com/felixrieseberg/windows-build-tools). **Note** For executing this command through `Windows Command Prompt` or `Windows PowerShell`, they should be ran in Administrator mode.\r\n4. **On Linux:** `build-essential` package for C++ compilation & `Python 2.7`.\r\n\r\n    4.1. **Udev rules:** To be able to communicate with Jabra devices with non-root privileges it is required to create a udev rule for Jabra devices. Place the udev rule in `/etc/udev/rules.d`, and follow naming guidelines for udev files.              \r\n    \r\n    **Example:** The file name should be something like `80-jabra.rules` where the number before the dash indicates in what order the system reads the rules (e.g. if you had another rules file called `70-someotherrule.rules`, it would read that one first), the word after the dash is just an identifier of sorts (it could be something other than jabra) and the extension must be `.rules`.\r\n\r\n    The contents of the file are:\r\n\r\n    `ATTRS{idVendor}==\"0b0e\", MODE=\"0666\", GROUP=\"users\"`\r\n\r\n    After creating the udev file (as root), reload the udev rules using:\r\n\r\n    `sudo udevadm control --reload`\r\n\r\n    Reattach your Jabra device in order to get new permissions assigned.\r\n\r\n5. **All Platforms:** `node-gyp`. You can install this using command `npm install -g node-gyp`. To know more about this, see [this link](https://www.npmjs.com/package/node-gyp)\r\n\r\n6. **For Electron.JS:** If you are using `asar` packaging then you may need to `unpack` some of the resources used in this module. These resources are native library files i.e `libjabra.dll`, `libjabra.dylib` & `libjabra.so`, which is stored in a `build\\Release` folder. By default latest electron builder will automatically unpack, but if it does not work then you can provide below option to your build process. To know more, see [this link](https://www.electron.build/configuration/configuration)\r\n\r\n    ```\r\n    \"build\": {\r\n        \"asarUnpack\": [\"node_modules/@gnaudio/jabra-node-sdk\"]\r\n    }\r\n    ```\r\n\r\n## Installation\r\nThis release is published to [npm](https://www.npmjs.com/package/@gnaudio/jabra-node-sdk) and can be installed via below command.\r\n```\r\nnpm install --save @gnaudio/jabra-node-sdk\r\n```\r\n\r\n## Debugging and Logging\r\nBelow environment variables are defined for logging and debugging purpose. User can change the values as per preference.\r\n\r\nEnvironment Variable | Value | Description\r\n--- | --- | ---\r\nLIBJABRA_TRACE_LEVEL | fatal, error, warning(default), info, debug | Log levels\r\nLIBJABRA_RESOURCE_PATH | **On Mac:** ~/Library/Application Support/JabraSDK/ **On Windows:** %appdata%/Roaming/JabraSDK  | This determine the system path where logs and device related files are written.\r\n\r\n## API Reference\r\nAPI doc is in html format. See doc folder inside installed module `node_modules\\@gnaudio\\jabra-node-sdk\\dist\\doc` and open `index.html`.\r\n\r\n## Examples\r\n\r\nFor all examples, user should first register the app on [Jabra developer site](https://developer.jabra.com/) to get appID. User should pass this appID to `createJabraApplication` in order to initialize the jabra module:\r\n\r\n### Simple button events example using javascript and plain promises\r\n\r\n```javascript\r\nconst j = require(\"@gnaudio/jabra-node-sdk\");\r\nj.createJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        console.log('Press any key on Jabra device ' + device.deviceName);\r\n        \r\n        device.on('btnPress', (btnType, btnValue) => {\r\n          console.log('New input from device is received: ', j.enumDeviceBtnType[btnType], btnValue);\r\n        });\r\n    });    \r\n});\r\n```\r\n\r\n### Simple button events example using typescript and plain promises\r\n\r\n```typescript\r\nimport { createJabraApplication, enumDeviceBtnType, enumHidState } from '@gnaudio/jabra-node-sdk';\r\ncreateJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        console.log('Press any key on Jabra device ' + device.deviceName);\r\n\r\n        device.on('btnPress', (btnType, btnValue) => {\r\n          console.log('New input from device is received: ', enumDeviceBtnType[btnType], btnValue);\r\n        });\r\n    });    \r\n});\r\n```\r\n\r\n### Ring example using typescript and plain promises\r\nThis example shows how to ring a Jabra device\r\n\r\n```typescript\r\nimport { createJabraApplication, JabraError } from '@gnaudio/jabra-node-sdk';\r\n\r\ncreateJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        device.isRingerSupportedAsync().then( (supported) => {\r\n            if (supported) {\r\n              device.ringAsync().then ( () => {\r\n                console.log('ringing');\r\n              }).catch ((err: JabraError) => {\r\n                console.log('ring failed with error ' + err);\r\n              }); // ring the device\r\n              setTimeout(() => {\r\n                device.unringAsync().then(() => {\r\n                    console.log('stopped ringing');\r\n                }).catch ((err: JabraError) => {\r\n                    console.log('unring failed with error ' + err);\r\n                });\r\n              }, 5000); // stop ringing the device after 5 second\r\n            }          \r\n        }).catch( (err: JabraError) => {\r\n            console.error('Jabra call failed with error ' + err)\r\n        });\r\n    });\r\n    \r\n    jabra.on('detach', (device) => {\r\n        console.log('Device detached with deviceID:', device.deviceID);\r\n\r\n        // In this demo example, we will auto shutdown once all jabra devices are removed:\r\n        let remainingAttachedDevices = jabra.getAttachedDevices();\r\n        if (remainingAttachedDevices.length == 0) {\r\n            jabra.disposeAsync().then (() => {}); // Cleanup and allow node process to exit.\r\n        }\r\n    });\r\n});\r\n```\r\n\r\n### Multiple device management with typescript and async/await\r\n\r\n```typescript\r\nimport { createJabraApplication } from '@gnaudio/jabra-node-sdk';\r\n\r\n(async () => {\r\n    let jabra = await createJabraApplication('123'); // 123 is appID here\r\n\r\n    await jabra.scanForDevicesDoneAsync(); // Wait for all pre-attached devices to be scanned.\r\n\r\n    const deviceInstanceList = jabra.getAttachedDevices();\r\n    if (deviceInstanceList.length<2) {\r\n        throw new Error('Please make sure 2 jabra devices are attached');\r\n    }\r\n\r\n    const firstDevice = deviceInstanceList[0];\r\n    await firstDevice.ringAsync();\r\n\r\n    const secondDevice = deviceInstanceList[1];\r\n    await secondDevice.ringAsync();\r\n\r\n    // Dispose jabra sdk to enable node process to shutdown.\r\n    await jabra.disposeAsync();\r\n})();\r\n```\r\n\r\n## Sequence diagrams\r\n\r\nThese sequence diagrams shows typical use of the Node.js sdk:\r\n\r\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/outgoing-call-then-end-call.png)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/incoming-call-then-accept-on-device-then-end-call.png)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/incoming-call-then-user-rejects.png)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/mute-unmute-from-device.png)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/hold-resume-from-device.png)\r\n\r\n## Setup VSCode\r\n\r\nThe project includes config-files for debugging typescript and C++ source files in [Visual Studio Code](https://code.visualstudio.com/) for Windows. To setup, install the C++ extension and compiler toolset as described in [this guide](https://code.visualstudio.com/docs/cpp/config-msvc), make sure all project [pre-requisites](#pre-requisite) are installed correctly, and set the following environment variables. \r\n\r\nEnvironment Variable | Value | Description\r\n--- | --- | ---\r\nLIBJABRA_WIN_NODE_GYP_CACHE_PATH | eg. %appdata%\\Local\\node-gyp\\Cache\\12.16.3\\include\\node | Used by the C/C++ extension to resolve include paths\r\nLIBJABRA_WIN_CPP_COMPILER_PATH | eg. C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x64/cl.exe | Used by the C/C++ extension to infer the path to the C++ standard library header files\r\n\r\nTo debug a C++ file, open a typescript file referencing the C++ file and start the debugger (Running the debugger on C++ files directly won't work). Make sure the \"Run\"-dropdown at the top of the debugging-sidebar is set to \"Current TS File - native code only (windows)\" \r\n","gypfile":true,"scripts":{"doc":"typedoc --mode file --excludePrivate --excludeExternals --excludeNotExported --out dist/doc src/main","tsc":"tsc","build":"npm run build:dev","clean":"node-gyp clean && rimraf dist","install":"node-gyp rebuild","prepare":"npm run tsc && npm run doc && node dist/script/generatemeta.js","example2":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example2.ts","example3":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example3.ts","build:dev":"node-gyp rebuild --debug && npm run tsc && npm run generatemeta","example1a":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example1a.js","example1b":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example1b.ts","manueltest1":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/manueltest/test1.ts","manueltest2":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/manueltest/test2.ts","generatemeta":"ts-node src/script/generatemeta.ts","build:release":"node-gyp rebuild && npm run tsc && npm run generatemeta","pipeline-build-setversion":"node setversion.js"},"_npmUser":{"name":"theisjabra","email":"tfroehlich@jabra.com"},"devEngines":{"npm":">=5.5.1","node":">=10.0.0"},"repository":{"url":"git+https://github.com/gnaudio/jabra-node-sdk.git","type":"git","directory":"nodesdk"},"_npmVersion":"6.14.4","description":"NodeJS SDK for Jabra Devices","directories":{},"_nodeVersion":"12.16.3","dependencies":{"bindings":"1.5.0","node-addon-api":"1.7.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"rimraf":"3.0.2","ts-node":"8.8.2","typedoc":"0.17.4","cross-env":"7.0.2","typescript":"3.8.3","@types/node":"13.11.1","@types/bindings":"1.3.0","replace-in-file":"5.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jabra-node-sdk_3.2.0-beta.1_1593499455715_0.5950495376925244","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"3.2.0":{"name":"@gnaudio/jabra-node-sdk","version":"3.2.0","keywords":["jabra","sdk"],"author":{"name":"GN Audio"},"license":"MIT","_id":"@gnaudio/jabra-node-sdk@3.2.0","maintainers":[{"name":"daniel_vasile_42","email":"fvasile@jabra.com"},{"name":"extmchristensen","email":"extmchristensen@jabra.com"},{"name":"frederiksen","email":"mrtn.frederiksen@gmail.com"},{"name":"sskjabra","email":"sklausen@jabra.com"},{"name":"theisjabra","email":"tfroehlich@jabra.com"}],"homepage":"https://github.com/gnaudio/jabra-node-sdk/","bugs":{"url":"https://developer.jabra.com"},"dist":{"shasum":"6a01e6c0c503718cdc39b74f6a548cf5a375c30f","tarball":"https://registry.npmjs.org/@gnaudio/jabra-node-sdk/-/jabra-node-sdk-3.2.0.tgz","fileCount":156,"integrity":"sha512-Y1lV5pJl7ks72tkmAqGgKwfGLwQhr3eqPfYnXYoHJcZk/OHMhNS5GT+bFtRv+buXUxYzrvV7Wk1PBsfwZFjWRg==","signatures":[{"sig":"MEUCIQDGI1JnbQ985fvnKZ+I/jkP9HuCB+ofCfg6jVywzqic3AIgJYvmkaKG51SMojEKvP7a7LY/1OmueLYJbXZboXcr9II=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14440025,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfBwxKCRA9TVsSAnZWagAAhmkQAJXQbUPCyPuwCNruUxeh\nZ9GPMl4wjoEUJo05eLnF0lHClwakre9FhYboaCB+k1JGtlRSk5uiiP6o/ZKf\nLUYp0yKvStlBoY38jpk9txxxRJRfrQnly8BzlT1rnvqWonfgNcsgHNEX+PwB\ntMhQJLQYwf48rEqVUm40yOZ1E/qKpHjd0bYFYJXFFbXeFXwKT5HiqCJaklrv\nGMo9cNcVgVgZ4BcVc5M6/eq/eTKt6eM15nJcZYEPAMGcRCUGTXJlm86/JUdr\nZkQWQi2fT4ofjCXJp37kIIM3v2gSaaSp3M6aMCMFyT702LhlWFBrCLYgg+Mb\nvhVRvXwC13bL9zhQykQj2lTehfWjlUMFkqHC8qepE2MIVO1zZMEjffGa2cVi\nCIPpbayM/CXiWiJsWarmN9rlQeRuOlRHdcWcMhecz+gZ7DQxkXQeQRd4DaGR\n0p09WaIqwafNnrZuyTZRaN3de2X49ryk4YzDswqj94L26z0/n+/CPLPYM3aZ\n2JOuL4mKEkw5dknP8mryf/D/lF6feaCm03HyN1naLgQVUonrs7vHK3+5+Dg9\nP/4rHA5ebnxUGHFjZpkctDdR6KSBVapjD002BwPAE/sOG1imhCEFMagqXh9b\nLgZJB1edW/NBAJ4rTlReA6kgF69eybTmC97TxWF38Ih0dc8CKsZca7L4eyQe\nLKZo\r\n=SF7p\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/main/index.js","types":"dist/main/index.d.ts","gypfile":true,"scripts":{"doc":"typedoc --mode file --excludePrivate --excludeExternals --excludeNotExported --out dist/doc src/main","tsc":"tsc","build":"npm run build:dev","clean":"node-gyp clean && rimraf dist","install":"node-gyp rebuild","prepare":"npm run tsc && npm run doc && node dist/script/generatemeta.js","example2":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example2.ts","example3":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example3.ts","build:dev":"node-gyp rebuild --debug && npm run tsc && npm run generatemeta","example1a":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example1a.js","example1b":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/example/example1b.ts","manueltest1":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/manueltest/test1.ts","manueltest2":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/manueltest/test3.ts","generatemeta":"ts-node src/script/generatemeta.ts","build:release":"node-gyp rebuild && npm run tsc && npm run generatemeta","pipeline-build-setversion":"node setversion.js"},"_npmUser":{"name":"theisjabra","email":"tfroehlich@jabra.com"},"devEngines":{"npm":">=5.5.1","node":">=10.0.0"},"repository":{"url":"git+https://github.com/gnaudio/jabra-node-sdk.git","type":"git","directory":"nodesdk"},"_npmVersion":"6.14.4","description":"NodeJS SDK for Jabra Devices","directories":{},"_nodeVersion":"12.16.3","dependencies":{"bindings":"1.5.0","node-addon-api":"1.7.1"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"3.0.2","ts-node":"8.8.2","typedoc":"0.17.4","cross-env":"7.0.2","typescript":"3.8.3","@types/node":"13.11.1","@types/bindings":"1.3.0","replace-in-file":"5.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jabra-node-sdk_3.2.0_1594297418036_0.9666819357286411","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"3.3.0-beta.1":{"name":"@gnaudio/jabra-node-sdk","version":"3.3.0-beta.1","keywords":["jabra","sdk"],"author":{"name":"GN Audio"},"license":"MIT","_id":"@gnaudio/jabra-node-sdk@3.3.0-beta.1","maintainers":[{"name":"daniel_vasile_42","email":"fvasile@jabra.com"},{"name":"dlaezza-jabra","email":"dlaezza@jabra.com"},{"name":"extmchristensen","email":"extmchristensen@jabra.com"},{"name":"frederiksen","email":"mrtn.frederiksen@gmail.com"},{"name":"sskjabra","email":"sklausen@jabra.com"},{"name":"theisjabra","email":"tfroehlich@jabra.com"}],"homepage":"https://github.com/gnaudio/jabra-node-sdk/","bugs":{"url":"https://developer.jabra.com"},"dist":{"shasum":"24a1af472ade75b272f7c89269f57e91ae7228bf","tarball":"https://registry.npmjs.org/@gnaudio/jabra-node-sdk/-/jabra-node-sdk-3.3.0-beta.1.tgz","fileCount":158,"integrity":"sha512-4bRWfQ+dtZJJm52b4967UveLy3+UbY/rhDO7KBmRySltvZxKFkBDANZNG2yzk6KwfJR1iuQZaVi496mDyArtFg==","signatures":[{"sig":"MEYCIQC5Ya4BX/0mwbO1fCcWxYuxUARrXTOne3/tG7gjohPfBwIhAKUTnwNJuvaqZexvHynzuW0BA0MKRjWOhW7xdkhegH3g","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":13906146,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfIrfICRA9TVsSAnZWagAAH30P/2VBguPlG53EyA8ial6G\nz62pLAhLN3XUZGqdFYVpzp1WwB/HaRk2YHXvr96RHn+N4EuGEcJ11uTjf7dz\n4RjynKEz7puexQhCYOzmnZDsDV2twXMKecMacpoY17x38kr7H3bXxdRrKbTd\nXA/sKZPrdTorrwW6jaMMxqAbyIsREaq1/iyEXUncoCb0zpwRTv8an1sWSpnJ\nAFq5puSvFIwsMIfGZmMihHmXgQ5KsKd1B0Ow0NDOIersitX4/KAjCn1acW5v\nYdTPL6jQqhEi8bhVEehBb+av9cIWvRggEi1jx3lGetrO9ayX95xFM2sohLOo\nVNbHjNJoHxpSypYxhAgO1wal+D4NT1gdzqV2qHXQiGYq5sS6ZA8XbKLd/qRA\ndQV6eMAL1/vFdhgxs4pieU9OgW8DZUtHTLrWSy3YefUEWUsytv2EGEuM6Wfz\nzcIh0e8y4g9DoNN4iNN40v8Wc6FrK81LFqQV+c9ltFq1W/F9MA/g2KgDVlpn\nGWkQNSpObGWzxxcONDkrACb9fY/2Tntm4HWEDf31rWBeKGKR5rxwlDSDycvn\neiht1Hzg8glMdeS/ZFgsuTBIyTQXkr5XlpQrFeYpmp+KVrqebqwnPaFC2eIo\nYTS59VxSpwOhLddeJ3/lnSQApdKYqYSZJaYqeM+kjfdAsiI38GhH6er2WN/W\nwR4q\r\n=S7rw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/main/index.js","types":"dist/main/index.d.ts","readme":"Jabra Node.js SDK\n\n# Table of Contents\n- [Versions](#versions)\n- [Pre-requisite](#pre-requisite)\n- [Installation](#installation)\n- [Debugging and Logging](#debugging-and-logging)\n- [API Reference](#api-reference)\n- [Examples](#examples)\n    - [Simple Example](#simple-button-events-example-using-javascript-and-plain-promises)\n    - [Multiple device management](#multiple-device-management-with-typescript-and-asyncawait)\n- [Sequence Diagrams](#sequence-diagrams)\n- [Setup VSCode](#setup-vsCode)\n    - [Windows](#windows)\n    - [Linux](#linux)\n- [Bug report](https://github.com/gnaudio/jabra-node-sdk#bug-reports)\n- [Changelog](https://github.com/gnaudio/jabra-node-sdk/blob/master/CHANGELOG.md)\n- [License](https://github.com/gnaudio/jabra-node-sdk/blob/master/LICENSE.md)\n- [FAQ](https://github.com/gnaudio/jabra-node-sdk/blob/master/FAQ.md)\n\n## Versions\n\n[![npm version](https://badge.fury.io/js/%40gnaudio%2Fjabra-node-sdk.svg)](https://badge.fury.io/js/%40gnaudio%2Fjabra-node-sdk)\n\nLatest **STABLE** release is  [distributed on npmjs.com](https://www.npmjs.com/package/@gnaudio/jabra-node-sdk/v/3.1.0) (see [changelog](https://github.com/gnaudio/jabra-node-sdk/blob/master/CHANGELOG.md) for changes and notable defects). \n\nIn addition, **BETA** versions may be available on npmjs with a version name ending with \"-beta.X\" specifier. For such BETA versions,the following applies:\n\n    > Disclaimer for Alpha and Beta Software Release\n\n    > Please note that this is a copyrighted Jabra Product ((c) 2017 GN Audio A/S) (the “Product”) which is still undergoing final testing before its official release. The Product and all content found on it are provided on an “as is” and “as available” basis. Jabra does not provide any warranties, neither express nor implied, as to the suitability or usability of the Product or any of its content.\n\n    > Jabra disclaims liability for any loss, whether direct, indirect, special or consequential, suffered by any person as a result of their use of the Product or the software embedded, and for any claim arising from any injury or damage, including but not limited to, any personal or bodily injury or tangible property damage, arising from or resulting in any way from any alleged defects in the material, workmanship, or performance of the Product, and Company shall indemnify Jabra in respect of any such claims. All usage of the Product is at users’ own risk and the user will be solely responsible for any resulting from such activities.\n\n    > Should you encounter any bugs, glitches, dangers, lack of functionality, lack of comfort or other problems with the Product, please let us know immediately so we can rectify these accordingly. Your help in this regard is greatly appreciated.\n\n    > The Product is released solely for test use in Company’s organization and must not under any circumstances be distributed to third parties without prior written acceptance from Jabra.\n\n    > By using the software, I accept and acknowledge the content herein.`\n\n## Pre-requisite\n1. Node.js v8.x or later.\n2. **On MacOS:** `xcode` & `python 2.7`. By default, Python is installed on macOS but make sure correct version(2.7.x) is installed. Install Xcode from App store or download it from [here](https://developer.apple.com/xcode/download/).\n3. **On Windows:** `Visual C++ Build Tools` & `Python 2.7`. You can install all of these by following any of the below mentioned steps.\n\n    3.1. **During Node.js installation** By ticking the checkbox when prompted during Node.js installation for `Tools for Native modules`, this installs both `Visual C++ Build Tools` & `Python 2.7`. **Note** This is prompted only for Windows platform. For other platforms like Linux or MAC, C++ compilation tools has to be installed separately as mentioned in other steps.\n\n    3.2. Both `Visual C++ Build Tools` & `Python 2.7` can also be installed using command `npm install --global --production --add-python-to-path windows-build-tools`. To know more about this tool, see [this link.](https://github.com/felixrieseberg/windows-build-tools). **Note** For executing this command through `Windows Command Prompt` or `Windows PowerShell`, they should be ran in Administrator mode.\n4. **On Linux:** `build-essential` package for C++ compilation & `Python 2.7`.\n\n    4.1. **Udev rules:** To be able to communicate with Jabra devices with non-root privileges it is required to create a udev rule for Jabra devices. Place the udev rule in `/etc/udev/rules.d`, and follow naming guidelines for udev files.              \n    \n    **Example:** The file name should be something like `80-jabra.rules` where the number before the dash indicates in what order the system reads the rules (e.g. if you had another rules file called `70-someotherrule.rules`, it would read that one first), the word after the dash is just an identifier of sorts (it could be something other than jabra) and the extension must be `.rules`.\n\n    The contents of the file are:\n\n    `ATTRS{idVendor}==\"0b0e\", MODE=\"0666\", GROUP=\"users\"`\n\n    After creating the udev file (as root), reload the udev rules using:\n\n    `sudo udevadm control --reload`\n\n    Reattach your Jabra device in order to get new permissions assigned.\n\n5. **All Platforms:** `node-gyp`. You can install this using command `npm install -g node-gyp`. To know more about this, see [this link](https://www.npmjs.com/package/node-gyp)\n\n6. **For Electron.JS:** If you are using `asar` packaging then you may need to `unpack` some of the resources used in this module. These resources are native library files i.e `libjabra.dll`, `libjabra.dylib` & `libjabra.so`, which is stored in a `build\\Release` folder. By default latest electron builder will automatically unpack, but if it does not work then you can provide below option to your build process. To know more, see [this link](https://www.electron.build/configuration/configuration)\n\n    ```\n    \"build\": {\n        \"asarUnpack\": [\"node_modules/@gnaudio/jabra-node-sdk\"]\n    }\n    ```\n\n## Installation\nThis release is published to [npm](https://www.npmjs.com/package/@gnaudio/jabra-node-sdk) and can be installed via below command.\n```\nnpm install --save @gnaudio/jabra-node-sdk\n```\n\n## Debugging and Logging\nBelow environment variables are defined for logging and debugging purpose. User can change the values as per preference.\n\nEnvironment Variable | Value | Description\n--- | --- | ---\nLIBJABRA_TRACE_LEVEL | fatal, error, warning(default), info, debug | Log levels\nLIBJABRA_RESOURCE_PATH | **On Mac:** ~/Library/Application Support/JabraSDK/ **On Windows:** %appdata%/Roaming/JabraSDK  | This determine the system path where logs and device related files are written.\n\n## API Reference\nAPI doc is in html format. See doc folder inside installed module `node_modules\\@gnaudio\\jabra-node-sdk\\dist\\doc` and open `index.html`.\n\n## Examples\n\nFor all examples, user should first register the app on [Jabra developer site](https://developer.jabra.com/) to get appID. User should pass this appID to `createJabraApplication` in order to initialize the jabra module:\n\n### Simple button events example using javascript and plain promises\n\n```javascript\nconst j = require(\"@gnaudio/jabra-node-sdk\");\nj.createJabraApplication('123').then((jabra) => { // 123 is appID here\n    jabra.on('attach', (device) => {\n        console.log('Press any key on Jabra device ' + device.deviceName);\n        \n        device.on('btnPress', (btnType, btnValue) => {\n          console.log('New input from device is received: ', j.enumDeviceBtnType[btnType], btnValue);\n        });\n    });    \n});\n```\n\n### Simple button events example using typescript and plain promises\n\n```typescript\nimport { createJabraApplication, enumDeviceBtnType, enumHidState } from '@gnaudio/jabra-node-sdk';\ncreateJabraApplication('123').then((jabra) => { // 123 is appID here\n    jabra.on('attach', (device) => {\n        console.log('Press any key on Jabra device ' + device.deviceName);\n\n        device.on('btnPress', (btnType, btnValue) => {\n          console.log('New input from device is received: ', enumDeviceBtnType[btnType], btnValue);\n        });\n    });    \n});\n```\n\n### Ring example using typescript and plain promises\nThis example shows how to ring a Jabra device\n\n```typescript\nimport { createJabraApplication, JabraError } from '@gnaudio/jabra-node-sdk';\n\ncreateJabraApplication('123').then((jabra) => { // 123 is appID here\n    jabra.on('attach', (device) => {\n        device.isRingerSupportedAsync().then( (supported) => {\n            if (supported) {\n              device.ringAsync().then ( () => {\n                console.log('ringing');\n              }).catch ((err: JabraError) => {\n                console.log('ring failed with error ' + err);\n              }); // ring the device\n              setTimeout(() => {\n                device.unringAsync().then(() => {\n                    console.log('stopped ringing');\n                }).catch ((err: JabraError) => {\n                    console.log('unring failed with error ' + err);\n                });\n              }, 5000); // stop ringing the device after 5 second\n            }          \n        }).catch( (err: JabraError) => {\n            console.error('Jabra call failed with error ' + err)\n        });\n    });\n    \n    jabra.on('detach', (device) => {\n        console.log('Device detached with deviceID:', device.deviceID);\n\n        // In this demo example, we will auto shutdown once all jabra devices are removed:\n        let remainingAttachedDevices = jabra.getAttachedDevices();\n        if (remainingAttachedDevices.length == 0) {\n            jabra.disposeAsync().then (() => {}); // Cleanup and allow node process to exit.\n        }\n    });\n});\n```\n\n### Multiple device management with typescript and async/await\n\n```typescript\nimport { createJabraApplication } from '@gnaudio/jabra-node-sdk';\n\n(async () => {\n    let jabra = await createJabraApplication('123'); // 123 is appID here\n\n    await jabra.scanForDevicesDoneAsync(); // Wait for all pre-attached devices to be scanned.\n\n    const deviceInstanceList = jabra.getAttachedDevices();\n    if (deviceInstanceList.length<2) {\n        throw new Error('Please make sure 2 jabra devices are attached');\n    }\n\n    const firstDevice = deviceInstanceList[0];\n    await firstDevice.ringAsync();\n\n    const secondDevice = deviceInstanceList[1];\n    await secondDevice.ringAsync();\n\n    // Dispose jabra sdk to enable node process to shutdown.\n    await jabra.disposeAsync();\n})();\n```\n\n## Sequence diagrams\n\nThese sequence diagrams shows typical use of the Node.js sdk:\n\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/outgoing-call-then-end-call.png)\n\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/incoming-call-then-accept-on-device-then-end-call.png)\n\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/incoming-call-then-user-rejects.png)\n\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/mute-unmute-from-device.png)\n\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/hold-resume-from-device.png)\n\n## Setup VSCode\n\nThe project includes config files for debugging typescript and C++ source files\nin [Visual Studio Code](https://code.visualstudio.com/) via the\n[C++ extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools),\nfor both Windows and Linux. The configuration files work without any\nmodification, provided that you set up your environment first, by installing\nthe necessary tools and defining some environment variable.\n\nTo debug a C++ file, open a typescript file referencing the C++ file and start\nthe debugger (Running the debugger on C++ files directly won't work). Make sure\nthe \"Run\"-dropdown at the top of the debugging-sidebar is set to \"Current TS\nFile - native code only (&lt;your operating system&gt;)\"\n\nBelow, the setup steps for Windows and Linux.\n\n### Windows\nYou can more or less follow the instruction in\n[the VSCode C++ extension guide](https://code.visualstudio.com/docs/cpp/config-msvc).\nThen, you need to make sure all project [pre-requisites](#pre-requisite) are\ninstalled correctly, and finally set the following environment variables:\n\nEnvironment Variable | Value | Description\n--- | --- | ---\nLIBJABRA_WIN_NODE_GYP_CACHE_PATH | eg. %appdata%\\Local\\node-gyp\\Cache\\12.16.3\\include\\node | Used by the C/C++ extension to resolve include paths\nLIBJABRA_WIN_CPP_COMPILER_PATH | eg. C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x64/cl.exe | Used by the C/C++ extension to infer the path to the C++ standard library header files\n\n\n### Linux\nYou can read a more detailed guide on\n[the VSCode C++ extension page](https://code.visualstudio.com/docs/cpp/config-linux).\nThe important part is to install a C++ compiler and debugger. The easiest way\nis to install `build-essential` and `gdb`, this way:\n\n```sh\nsudo apt-get install build-essential gdb\n```\n\nThis maks your C++ compiler GCC, and you would likely use the `g++` command to\ncompile.\n\nThen, you need to install the project [pre-requisites](#pre-requisite), and\nfinally export the following environment variables:\n\nEnvironment Variable | Likely value | Description\n--- | --- | ---\nJABRA_NODESDK_CPP_COMPILER_PATH | /usr/bin/g++ | Used by the C/C++ extension to infer the path to the C++ standard library header files\nJABRA_NODESDK_NODE_GYP_CACHE_PATH | $HOME/.cache/node-gyp/14.4.0 | Used by the C/C++ extension to resolve include paths. **NOTE**: The final `include/node` is added by the configuration and it's not necessary\n","gypfile":true,"scripts":{"doc":"typedoc --mode file --excludePrivate --excludeExternals --excludeNotExported --out dist/doc src/main","tsc":"tsc","build":"npm run build:dev","clean":"node-gyp clean && rimraf dist","install":"node-gyp rebuild","prepare":"npm run tsc && npm run doc && node dist/script/generatemeta.js","build:dev":"node-gyp rebuild --debug && npm run tsc && npm run generatemeta","manualtest":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/manualtest/misc.ts","generatemeta":"ts-node src/script/generatemeta.ts","build:release":"node-gyp rebuild && npm run tsc && npm run generatemeta","example-btn-press-js":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/examples/button-press.js","example-btn-press-ts":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/examples/button-press.ts","example-ringer-sequence":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/examples/ringer-sequence.ts","pipeline-build-setversion":"node setversion.js"},"_npmUser":{"name":"dlaezza-jabra","email":"dlaezza@jabra.com"},"devEngines":{"npm":">=5.5.1","node":">=10.0.0"},"repository":{"url":"git+https://github.com/gnaudio/jabra-node-sdk.git","type":"git","directory":"nodesdk"},"_npmVersion":"6.14.5","description":"NodeJS SDK for Jabra Devices","directories":{},"_nodeVersion":"14.4.0","dependencies":{"bindings":"1.5.0","node-addon-api":"1.7.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"rimraf":"3.0.2","ts-node":"8.8.2","typedoc":"0.17.4","cross-env":"7.0.2","typescript":"3.8.3","@types/node":"13.11.1","@types/bindings":"1.3.0","replace-in-file":"5.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jabra-node-sdk_3.3.0-beta.1_1596110791675_0.37644091550314984","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"3.3.0-beta.2":{"name":"@gnaudio/jabra-node-sdk","version":"3.3.0-beta.2","keywords":["jabra","sdk"],"author":{"name":"GN Audio"},"license":"MIT","_id":"@gnaudio/jabra-node-sdk@3.3.0-beta.2","maintainers":[{"name":"daniel_vasile_42","email":"fvasile@jabra.com"},{"name":"dlaezza-jabra","email":"dlaezza@jabra.com"},{"name":"extmchristensen","email":"extmchristensen@jabra.com"},{"name":"frederiksen","email":"mrtn.frederiksen@gmail.com"},{"name":"sskjabra","email":"sklausen@jabra.com"},{"name":"theisjabra","email":"tfroehlich@jabra.com"}],"homepage":"https://github.com/gnaudio/jabra-node-sdk/","bugs":{"url":"https://developer.jabra.com"},"dist":{"shasum":"be11cfdc123a5b17c83f19f6e65158ec782a30fb","tarball":"https://registry.npmjs.org/@gnaudio/jabra-node-sdk/-/jabra-node-sdk-3.3.0-beta.2.tgz","fileCount":158,"integrity":"sha512-O7dtVZRDPBS944WfzDwRAOJXYYoHZ1IkrgjX76OTzczhqM9pEiTeYkM3OEOc30dPAZuJNb03ukRV0Q+RWKvUOw==","signatures":[{"sig":"MEUCIQCbaCFvFC9Fj3h9cUPoPmOCzsMJrm+dcJLfNrgreVlMdgIgV0EYluNXKZ4r5nQE+qAlZm7Jz6+G79IlfIJYQkRTHj4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":15740258,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfKQUJCRA9TVsSAnZWagAAN9oP/i8tBY4GGRSlHGmKETpn\nEChKphQf+H0ZhNtXUH1laCCe6uZ/c0azvunMsldoCuamB3S0/TIG7eYUI2A1\n+Gly9srw1/lQx37w8F9+euollgMgG+hrNlpQxNvlDN7M12suopMd6Y8HHwNy\neIPWjTRWMD0690ORSHhD3xjqOKy0TpIXKcnNNg74vvxs/5YCKKyowAasfPcZ\nLOQO8+oVXhiK6T0cpQ8zjmufRndIMrz7KlnYs55ZnVXAFl+mmM2fNvvJLBAu\n3IA2KqHmr+GQLGnmhelAYXaYR+w9v3kx6rkOlFFK1pvoWZPHkP8/f4k0ZZFf\nNgal1pI2mspqYS7LF6wLPvOo5MomBsGps9kI9XsSRCkFm+xDyE1ydLJpJ81K\n5b1HMFYrHncrXq8XcZPEcWOPgmgU+gHSvdcz0vGLIfrpy1GomuikhtKkl2Eb\nDI9CvtR8XibArISW4oAiJ//pX6F5FQgZ4DpQUi7bEFjXGW2i6zAr8yxJEmPM\nY3z8huRL+YjUr037QEd8c/kg776JY7BT3ZdrXflvvDXPLC0pjdvqb1L9O14p\nnmyhXWO7Y7NFW0noR0j3ic2wcqPE4ooyTGZG0d22c2l4EeaSecCQVaiyMmBP\n6WbeN0TfZ9Ewye+jf0+A7cMIwbopxIf56HLi1b2pRwKoBCvG7PTRQPTV4sWE\nSR5D\r\n=R3JI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/main/index.js","types":"dist/main/index.d.ts","readme":"Jabra Node.js SDK\n\n# Table of Contents\n- [Versions](#versions)\n- [Pre-requisite](#pre-requisite)\n- [Installation](#installation)\n- [Debugging and Logging](#debugging-and-logging)\n- [API Reference](#api-reference)\n- [Examples](#examples)\n    - [Simple Example](#simple-button-events-example-using-javascript-and-plain-promises)\n    - [Multiple device management](#multiple-device-management-with-typescript-and-asyncawait)\n- [Sequence Diagrams](#sequence-diagrams)\n- [Setup VSCode](#setup-vsCode)\n    - [Windows](#windows)\n    - [Linux](#linux)\n- [Bug report](https://github.com/gnaudio/jabra-node-sdk#bug-reports)\n- [Changelog](https://github.com/gnaudio/jabra-node-sdk/blob/master/CHANGELOG.md)\n- [License](https://github.com/gnaudio/jabra-node-sdk/blob/master/LICENSE.md)\n- [FAQ](https://github.com/gnaudio/jabra-node-sdk/blob/master/FAQ.md)\n\n## Versions\n\n[![npm version](https://badge.fury.io/js/%40gnaudio%2Fjabra-node-sdk.svg)](https://badge.fury.io/js/%40gnaudio%2Fjabra-node-sdk)\n\nLatest **STABLE** release is  [distributed on npmjs.com](https://www.npmjs.com/package/@gnaudio/jabra-node-sdk/v/3.1.0) (see [changelog](https://github.com/gnaudio/jabra-node-sdk/blob/master/CHANGELOG.md) for changes and notable defects). \n\nIn addition, **BETA** versions may be available on npmjs with a version name ending with \"-beta.X\" specifier. For such BETA versions,the following applies:\n\n    > Disclaimer for Alpha and Beta Software Release\n\n    > Please note that this is a copyrighted Jabra Product ((c) 2017 GN Audio A/S) (the “Product”) which is still undergoing final testing before its official release. The Product and all content found on it are provided on an “as is” and “as available” basis. Jabra does not provide any warranties, neither express nor implied, as to the suitability or usability of the Product or any of its content.\n\n    > Jabra disclaims liability for any loss, whether direct, indirect, special or consequential, suffered by any person as a result of their use of the Product or the software embedded, and for any claim arising from any injury or damage, including but not limited to, any personal or bodily injury or tangible property damage, arising from or resulting in any way from any alleged defects in the material, workmanship, or performance of the Product, and Company shall indemnify Jabra in respect of any such claims. All usage of the Product is at users’ own risk and the user will be solely responsible for any resulting from such activities.\n\n    > Should you encounter any bugs, glitches, dangers, lack of functionality, lack of comfort or other problems with the Product, please let us know immediately so we can rectify these accordingly. Your help in this regard is greatly appreciated.\n\n    > The Product is released solely for test use in Company’s organization and must not under any circumstances be distributed to third parties without prior written acceptance from Jabra.\n\n    > By using the software, I accept and acknowledge the content herein.`\n\n## Pre-requisite\n1. Node.js v8.x or later.\n2. **On MacOS:** `xcode` & `python 2.7`. By default, Python is installed on macOS but make sure correct version(2.7.x) is installed. Install Xcode from App store or download it from [here](https://developer.apple.com/xcode/download/).\n3. **On Windows:** `Visual C++ Build Tools` & `Python 2.7`. You can install all of these by following any of the below mentioned steps.\n\n    3.1. **During Node.js installation** By ticking the checkbox when prompted during Node.js installation for `Tools for Native modules`, this installs both `Visual C++ Build Tools` & `Python 2.7`. **Note** This is prompted only for Windows platform. For other platforms like Linux or MAC, C++ compilation tools has to be installed separately as mentioned in other steps.\n\n    3.2. Both `Visual C++ Build Tools` & `Python 2.7` can also be installed using command `npm install --global --production --add-python-to-path windows-build-tools`. To know more about this tool, see [this link.](https://github.com/felixrieseberg/windows-build-tools). **Note** For executing this command through `Windows Command Prompt` or `Windows PowerShell`, they should be ran in Administrator mode.\n4. **On Linux:** `build-essential` package for C++ compilation & `Python 2.7`.\n\n    4.1. **Udev rules:** To be able to communicate with Jabra devices with non-root privileges it is required to create a udev rule for Jabra devices. Place the udev rule in `/etc/udev/rules.d`, and follow naming guidelines for udev files.              \n    \n    **Example:** The file name should be something like `80-jabra.rules` where the number before the dash indicates in what order the system reads the rules (e.g. if you had another rules file called `70-someotherrule.rules`, it would read that one first), the word after the dash is just an identifier of sorts (it could be something other than jabra) and the extension must be `.rules`.\n\n    The contents of the file are:\n\n    `ATTRS{idVendor}==\"0b0e\", MODE=\"0666\", GROUP=\"users\"`\n\n    After creating the udev file (as root), reload the udev rules using:\n\n    `sudo udevadm control --reload`\n\n    Reattach your Jabra device in order to get new permissions assigned.\n\n5. **All Platforms:** `node-gyp`. You can install this using command `npm install -g node-gyp`. To know more about this, see [this link](https://www.npmjs.com/package/node-gyp)\n\n6. **For Electron.JS:** If you are using `asar` packaging then you may need to `unpack` some of the resources used in this module. These resources are native library files i.e `libjabra.dll`, `libjabra.dylib` & `libjabra.so`, which is stored in a `build\\Release` folder. By default latest electron builder will automatically unpack, but if it does not work then you can provide below option to your build process. To know more, see [this link](https://www.electron.build/configuration/configuration)\n\n    ```\n    \"build\": {\n        \"asarUnpack\": [\"node_modules/@gnaudio/jabra-node-sdk\"]\n    }\n    ```\n\n## Installation\nThis release is published to [npm](https://www.npmjs.com/package/@gnaudio/jabra-node-sdk) and can be installed via below command.\n```\nnpm install --save @gnaudio/jabra-node-sdk\n```\n\n## Debugging and Logging\nBelow environment variables are defined for logging and debugging purpose. User can change the values as per preference.\n\nEnvironment Variable | Value | Description\n--- | --- | ---\nLIBJABRA_TRACE_LEVEL | fatal, error, warning(default), info, debug | Log levels\nLIBJABRA_RESOURCE_PATH | **On Mac:** ~/Library/Application Support/JabraSDK/ **On Windows:** %appdata%/Roaming/JabraSDK  | This determine the system path where logs and device related files are written.\n\n## API Reference\nAPI doc is in html format. See doc folder inside installed module `node_modules\\@gnaudio\\jabra-node-sdk\\dist\\doc` and open `index.html`.\n\n## Examples\n\nFor all examples, user should first register the app on [Jabra developer site](https://developer.jabra.com/) to get appID. User should pass this appID to `createJabraApplication` in order to initialize the jabra module:\n\n### Simple button events example using javascript and plain promises\n\n```javascript\nconst j = require(\"@gnaudio/jabra-node-sdk\");\nj.createJabraApplication('123').then((jabra) => { // 123 is appID here\n    jabra.on('attach', (device) => {\n        console.log('Press any key on Jabra device ' + device.deviceName);\n        \n        device.on('btnPress', (btnType, btnValue) => {\n          console.log('New input from device is received: ', j.enumDeviceBtnType[btnType], btnValue);\n        });\n    });    \n});\n```\n\n### Simple button events example using typescript and plain promises\n\n```typescript\nimport { createJabraApplication, enumDeviceBtnType, enumHidState } from '@gnaudio/jabra-node-sdk';\ncreateJabraApplication('123').then((jabra) => { // 123 is appID here\n    jabra.on('attach', (device) => {\n        console.log('Press any key on Jabra device ' + device.deviceName);\n\n        device.on('btnPress', (btnType, btnValue) => {\n          console.log('New input from device is received: ', enumDeviceBtnType[btnType], btnValue);\n        });\n    });    \n});\n```\n\n### Ring example using typescript and plain promises\nThis example shows how to ring a Jabra device\n\n```typescript\nimport { createJabraApplication, JabraError } from '@gnaudio/jabra-node-sdk';\n\ncreateJabraApplication('123').then((jabra) => { // 123 is appID here\n    jabra.on('attach', (device) => {\n        device.isRingerSupportedAsync().then( (supported) => {\n            if (supported) {\n              device.ringAsync().then ( () => {\n                console.log('ringing');\n              }).catch ((err: JabraError) => {\n                console.log('ring failed with error ' + err);\n              }); // ring the device\n              setTimeout(() => {\n                device.unringAsync().then(() => {\n                    console.log('stopped ringing');\n                }).catch ((err: JabraError) => {\n                    console.log('unring failed with error ' + err);\n                });\n              }, 5000); // stop ringing the device after 5 second\n            }          \n        }).catch( (err: JabraError) => {\n            console.error('Jabra call failed with error ' + err)\n        });\n    });\n    \n    jabra.on('detach', (device) => {\n        console.log('Device detached with deviceID:', device.deviceID);\n\n        // In this demo example, we will auto shutdown once all jabra devices are removed:\n        let remainingAttachedDevices = jabra.getAttachedDevices();\n        if (remainingAttachedDevices.length == 0) {\n            jabra.disposeAsync().then (() => {}); // Cleanup and allow node process to exit.\n        }\n    });\n});\n```\n\n### Multiple device management with typescript and async/await\n\n```typescript\nimport { createJabraApplication } from '@gnaudio/jabra-node-sdk';\n\n(async () => {\n    let jabra = await createJabraApplication('123'); // 123 is appID here\n\n    await jabra.scanForDevicesDoneAsync(); // Wait for all pre-attached devices to be scanned.\n\n    const deviceInstanceList = jabra.getAttachedDevices();\n    if (deviceInstanceList.length<2) {\n        throw new Error('Please make sure 2 jabra devices are attached');\n    }\n\n    const firstDevice = deviceInstanceList[0];\n    await firstDevice.ringAsync();\n\n    const secondDevice = deviceInstanceList[1];\n    await secondDevice.ringAsync();\n\n    // Dispose jabra sdk to enable node process to shutdown.\n    await jabra.disposeAsync();\n})();\n```\n\n## Sequence diagrams\n\nThese sequence diagrams shows typical use of the Node.js sdk:\n\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/outgoing-call-then-end-call.png)\n\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/incoming-call-then-accept-on-device-then-end-call.png)\n\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/incoming-call-then-user-rejects.png)\n\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/mute-unmute-from-device.png)\n\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/hold-resume-from-device.png)\n\n## Setup VSCode\n\nThe project includes config files for debugging typescript and C++ source files\nin [Visual Studio Code](https://code.visualstudio.com/) via the\n[C++ extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools),\nfor both Windows and Linux. The configuration files work without any\nmodification, provided that you set up your environment first, by installing\nthe necessary tools and defining some environment variable.\n\nTo debug a C++ file, open a typescript file referencing the C++ file and start\nthe debugger (Running the debugger on C++ files directly won't work). Make sure\nthe \"Run\"-dropdown at the top of the debugging-sidebar is set to \"Current TS\nFile - native code only (&lt;your operating system&gt;)\"\n\nBelow, the setup steps for Windows and Linux.\n\n### Windows\nYou can more or less follow the instruction in\n[the VSCode C++ extension guide](https://code.visualstudio.com/docs/cpp/config-msvc).\nThen, you need to make sure all project [pre-requisites](#pre-requisite) are\ninstalled correctly, and finally set the following environment variables:\n\nEnvironment Variable | Value | Description\n--- | --- | ---\nLIBJABRA_WIN_NODE_GYP_CACHE_PATH | eg. %appdata%\\Local\\node-gyp\\Cache\\12.16.3\\include\\node | Used by the C/C++ extension to resolve include paths\nLIBJABRA_WIN_CPP_COMPILER_PATH | eg. C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x64/cl.exe | Used by the C/C++ extension to infer the path to the C++ standard library header files\n\n\n### Linux\nYou can read a more detailed guide on\n[the VSCode C++ extension page](https://code.visualstudio.com/docs/cpp/config-linux).\nThe important part is to install a C++ compiler and debugger. The easiest way\nis to install `build-essential` and `gdb`, this way:\n\n```sh\nsudo apt-get install build-essential gdb\n```\n\nThis maks your C++ compiler GCC, and you would likely use the `g++` command to\ncompile.\n\nThen, you need to install the project [pre-requisites](#pre-requisite), and\nfinally export the following environment variables:\n\nEnvironment Variable | Likely value | Description\n--- | --- | ---\nJABRA_NODESDK_CPP_COMPILER_PATH | /usr/bin/g++ | Used by the C/C++ extension to infer the path to the C++ standard library header files\nJABRA_NODESDK_NODE_GYP_CACHE_PATH | $HOME/.cache/node-gyp/14.4.0 | Used by the C/C++ extension to resolve include paths. **NOTE**: The final `include/node` is added by the configuration and it's not necessary\n","gypfile":true,"scripts":{"doc":"typedoc --mode file --excludePrivate --excludeExternals --excludeNotExported --out dist/doc src/main","tsc":"tsc","build":"npm run build:dev","clean":"node-gyp clean && rimraf dist","install":"node-gyp rebuild","prepare":"npm run tsc && npm run doc && node dist/script/generatemeta.js","build:dev":"node-gyp rebuild --debug && npm run tsc && npm run generatemeta","manualtest":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/manualtest/misc.ts","generatemeta":"ts-node src/script/generatemeta.ts","build:release":"node-gyp rebuild && npm run tsc && npm run generatemeta","example-btn-press-js":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/examples/button-press.js","example-btn-press-ts":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/examples/button-press.ts","example-ringer-sequence":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/examples/ringer-sequence.ts","pipeline-build-setversion":"node setversion.js"},"_npmUser":{"name":"dlaezza-jabra","email":"dlaezza@jabra.com"},"devEngines":{"npm":">=5.5.1","node":">=10.0.0"},"repository":{"url":"git+https://github.com/gnaudio/jabra-node-sdk.git","type":"git","directory":"nodesdk"},"_npmVersion":"6.14.5","description":"NodeJS SDK for Jabra Devices","directories":{},"_nodeVersion":"14.4.0","dependencies":{"bindings":"1.5.0","node-addon-api":"1.7.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"rimraf":"3.0.2","ts-node":"8.8.2","typedoc":"0.17.4","cross-env":"7.0.2","typescript":"3.8.3","@types/node":"13.11.1","@types/bindings":"1.3.0","replace-in-file":"5.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jabra-node-sdk_3.3.0-beta.2_1596523785268_0.5247499730680782","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"3.2.1-beta.1":{"name":"@gnaudio/jabra-node-sdk","version":"3.2.1-beta.1","keywords":["jabra","sdk"],"author":{"name":"GN Audio"},"license":"MIT","_id":"@gnaudio/jabra-node-sdk@3.2.1-beta.1","maintainers":[{"name":"ifmladenov","email":"ifmladenov@jabra.com"},{"name":"sanchen","email":"sanchen@jabra.com"},{"name":"dlaezza-jabra","email":"dlaezza@jabra.com"},{"name":"theisjabra","email":"tfroehlich@jabra.com"},{"name":"sskjabra","email":"sklausen@jabra.com"},{"name":"daniel_vasile_42","email":"fvasile@jabra.com"},{"name":"frederiksen","email":"mrtn.frederiksen@gmail.com"}],"homepage":"https://github.com/gnaudio/jabra-node-sdk/","bugs":{"url":"https://developer.jabra.com"},"dist":{"shasum":"59343d80b5ed40d3c8fc64aa063d75fd56e29536","tarball":"https://registry.npmjs.org/@gnaudio/jabra-node-sdk/-/jabra-node-sdk-3.2.1-beta.1.tgz","fileCount":156,"integrity":"sha512-2Lr0O8ayKYykL1+AZsaP7AF4UYJraG6J4X3LPI2PT5J06OZUYVDlJ5/ZgmHaV2NfAfNLlSESjSLIHxM+G+/Qvw==","signatures":[{"sig":"MEYCIQCE4oze8MCb7kM1yq+kI6pqSlPkMsis+y8AaIOYcTUUsQIhAIw+fv+nXIxtSnwwvzjmfUsuvI+HFfzTbKqqj+c12LVZ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":13406278,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfsn4WCRA9TVsSAnZWagAAqAkQAIY9Wkfe3qPTTmq9P/EX\nuxBcvRKKucU9ja7xlAG7JqjJJCDrI2MBTHmyUcZb6Kyft9SDz1bquIJAbM4a\nit7hHfWybEQx3FxeZXO1COExOEAWjdi/+eGBdcFpTVta2hoizLW0wXXsV5GX\nNezYMMhRKJlVbJnW6gTJblPNKrODxtckYZGMbCn0Zt/RWxs+tWH0YizKPveS\n2koyKSNYVvo4eXS8j9YJAnxQaiDfzb/M0k05mgpSYH7uRd4A3okg1/2Myc5w\nvbiNdjfxWxSVIfWNdwi8rGjJESZ9BxEppWKoI8l+PIJU/J2Tl1/2lQgDgZwL\ndAciOx6Z/dBQe2ZiX8COPgfWVUwTEVHLMZiZVqjxnPpz5nrNFz5JhPRUE/JY\npwKC6mjp0EZ7hqQZ+zjQ2vqE/0GJDf+xSUC30D7TH45brpcBQfSYt11LkbXu\nmL91eyC45RkRNt4QrDj4dqHHVNsncQW6GQuAtphcwgLNeTJZAYqpyrfjXNHk\n4I0XddSPXpuTUcvg/qyfuXfBzP0ryxZ3R/fT2bE+cuNHLx4jiYvq4Xsoq4xJ\n65hrYb03NpvL8InhwWacbHv6WeS1k7HICcsZRrPUgjB5oqFRfwF4s4o7lfRc\nqxJSZfvNAgLymeFFpZ8qqieUiorajdNmDx9eDH7+v0M4YL3HghwVRErzz9BC\nPOXS\r\n=lZWr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/main/index.js","types":"dist/main/index.d.ts","readme":"Jabra Node.js SDK\r\n\r\n# Table of Contents\r\n- [Versions](#versions)\r\n- [Pre-requisite](#pre-requisite)\r\n- [Installation](#installation)\r\n- [Debugging and Logging](#debugging-and-logging)\r\n- [API Reference](#api-reference)\r\n- [Examples](#examples)\r\n    - [Simple Example](#simple-button-events-example-using-javascript-and-plain-promises)\r\n    - [Multiple device management](#multiple-device-management-with-typescript-and-asyncawait)\r\n- [Sequence Diagrams](#sequence-diagrams)\r\n- [Setup VSCode](#setup-vsCode)\r\n    - [Windows](#windows)\r\n    - [Linux](#linux)\r\n- [Bug report](https://github.com/gnaudio/jabra-node-sdk#bug-reports)\r\n- [Changelog](https://github.com/gnaudio/jabra-node-sdk/blob/master/CHANGELOG.md)\r\n- [License](https://github.com/gnaudio/jabra-node-sdk/blob/master/LICENSE.md)\r\n- [FAQ](https://github.com/gnaudio/jabra-node-sdk/blob/master/FAQ.md)\r\n\r\n## Versions\r\n\r\n[![npm version](https://badge.fury.io/js/%40gnaudio%2Fjabra-node-sdk.svg)](https://badge.fury.io/js/%40gnaudio%2Fjabra-node-sdk)\r\n\r\nLatest **STABLE** release is  [distributed on npmjs.com](https://www.npmjs.com/package/@gnaudio/jabra-node-sdk/v/3.1.0) (see [changelog](https://github.com/gnaudio/jabra-node-sdk/blob/master/CHANGELOG.md) for changes and notable defects). \r\n\r\nIn addition, **BETA** versions may be available on npmjs with a version name ending with \"-beta.X\" specifier. For such BETA versions,the following applies:\r\n\r\n    > Disclaimer for Alpha and Beta Software Release\r\n\r\n    > Please note that this is a copyrighted Jabra Product ((c) 2017 GN Audio A/S) (the “Product”) which is still undergoing final testing before its official release. The Product and all content found on it are provided on an “as is” and “as available” basis. Jabra does not provide any warranties, neither express nor implied, as to the suitability or usability of the Product or any of its content.\r\n\r\n    > Jabra disclaims liability for any loss, whether direct, indirect, special or consequential, suffered by any person as a result of their use of the Product or the software embedded, and for any claim arising from any injury or damage, including but not limited to, any personal or bodily injury or tangible property damage, arising from or resulting in any way from any alleged defects in the material, workmanship, or performance of the Product, and Company shall indemnify Jabra in respect of any such claims. All usage of the Product is at users’ own risk and the user will be solely responsible for any resulting from such activities.\r\n\r\n    > Should you encounter any bugs, glitches, dangers, lack of functionality, lack of comfort or other problems with the Product, please let us know immediately so we can rectify these accordingly. Your help in this regard is greatly appreciated.\r\n\r\n    > The Product is released solely for test use in Company’s organization and must not under any circumstances be distributed to third parties without prior written acceptance from Jabra.\r\n\r\n    > By using the software, I accept and acknowledge the content herein.`\r\n\r\n## Pre-requisite\r\n1. Node.js v8.x or later.\r\n2. **On MacOS:** `xcode` & `python 2.7`. By default, Python is installed on macOS but make sure correct version(2.7.x) is installed. Install Xcode from App store or download it from [here](https://developer.apple.com/xcode/download/).\r\n3. **On Windows:** `Visual C++ Build Tools` & `Python 2.7`. You can install all of these by following any of the below mentioned steps.\r\n\r\n    3.1. **During Node.js installation** By ticking the checkbox when prompted during Node.js installation for `Tools for Native modules`, this installs both `Visual C++ Build Tools` & `Python 2.7`. **Note** This is prompted only for Windows platform. For other platforms like Linux or MAC, C++ compilation tools has to be installed separately as mentioned in other steps.\r\n\r\n    3.2. Both `Visual C++ Build Tools` & `Python 2.7` can also be installed using command `npm install --global --production --add-python-to-path windows-build-tools`. To know more about this tool, see [this link.](https://github.com/felixrieseberg/windows-build-tools). **Note** For executing this command through `Windows Command Prompt` or `Windows PowerShell`, they should be ran in Administrator mode.\r\n4. **On Linux:** `build-essential` package for C++ compilation & `Python 2.7`.\r\n\r\n    4.1. **Udev rules:** To be able to communicate with Jabra devices with non-root privileges it is required to create a udev rule for Jabra devices. Place the udev rule in `/etc/udev/rules.d`, and follow naming guidelines for udev files.              \r\n    \r\n    **Example:** The file name should be something like `80-jabra.rules` where the number before the dash indicates in what order the system reads the rules (e.g. if you had another rules file called `70-someotherrule.rules`, it would read that one first), the word after the dash is just an identifier of sorts (it could be something other than jabra) and the extension must be `.rules`.\r\n\r\n    The contents of the file are:\r\n\r\n    `ATTRS{idVendor}==\"0b0e\", MODE=\"0666\", GROUP=\"users\"`\r\n\r\n    After creating the udev file (as root), reload the udev rules using:\r\n\r\n    `sudo udevadm control --reload`\r\n\r\n    Reattach your Jabra device in order to get new permissions assigned.\r\n\r\n5. **All Platforms:** `node-gyp`. You can install this using command `npm install -g node-gyp`. To know more about this, see [this link](https://www.npmjs.com/package/node-gyp)\r\n\r\n6. **For Electron.JS:** If you are using `asar` packaging then you may need to `unpack` some of the resources used in this module. These resources are native library files i.e `libjabra.dll`, `libjabra.dylib` & `libjabra.so`, which is stored in a `build\\Release` folder. By default latest electron builder will automatically unpack, but if it does not work then you can provide below option to your build process. To know more, see [this link](https://www.electron.build/configuration/configuration)\r\n\r\n    ```\r\n    \"build\": {\r\n        \"asarUnpack\": [\"node_modules/@gnaudio/jabra-node-sdk\"]\r\n    }\r\n    ```\r\n\r\n## Installation\r\nThis release is published to [npm](https://www.npmjs.com/package/@gnaudio/jabra-node-sdk) and can be installed via below command.\r\n```\r\nnpm install --save @gnaudio/jabra-node-sdk\r\n```\r\n\r\n## Debugging and Logging\r\nBelow environment variables are defined for logging and debugging purpose. User can change the values as per preference.\r\n\r\nEnvironment Variable | Value | Description\r\n--- | --- | ---\r\nLIBJABRA_TRACE_LEVEL | fatal, error, warning(default), info, debug | Log levels\r\nLIBJABRA_RESOURCE_PATH | **On Mac:** ~/Library/Application Support/JabraSDK/ **On Windows:** %appdata%/Roaming/JabraSDK  | This determine the system path where logs and device related files are written.\r\n\r\n## API Reference\r\nAPI doc is in html format. See doc folder inside installed module `node_modules\\@gnaudio\\jabra-node-sdk\\dist\\doc` and open `index.html`.\r\n\r\n## Examples\r\n\r\nFor all examples, user should first register the app on [Jabra developer site](https://developer.jabra.com/) to get appID. User should pass this appID to `createJabraApplication` in order to initialize the jabra module:\r\n\r\n### Simple button events example using javascript and plain promises\r\n\r\n```javascript\r\nconst j = require(\"@gnaudio/jabra-node-sdk\");\r\nj.createJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        console.log('Press any key on Jabra device ' + device.deviceName);\r\n        \r\n        device.on('btnPress', (btnType, btnValue) => {\r\n          console.log('New input from device is received: ', j.enumDeviceBtnType[btnType], btnValue);\r\n        });\r\n    });    \r\n});\r\n```\r\n\r\n### Simple button events example using typescript and plain promises\r\n\r\n```typescript\r\nimport { createJabraApplication, enumDeviceBtnType, enumHidState } from '@gnaudio/jabra-node-sdk';\r\ncreateJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        console.log('Press any key on Jabra device ' + device.deviceName);\r\n\r\n        device.on('btnPress', (btnType, btnValue) => {\r\n          console.log('New input from device is received: ', enumDeviceBtnType[btnType], btnValue);\r\n        });\r\n    });    \r\n});\r\n```\r\n\r\n### Ring example using typescript and plain promises\r\nThis example shows how to ring a Jabra device\r\n\r\n```typescript\r\nimport { createJabraApplication, JabraError } from '@gnaudio/jabra-node-sdk';\r\n\r\ncreateJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        device.isRingerSupportedAsync().then( (supported) => {\r\n            if (supported) {\r\n              device.ringAsync().then ( () => {\r\n                console.log('ringing');\r\n              }).catch ((err: JabraError) => {\r\n                console.log('ring failed with error ' + err);\r\n              }); // ring the device\r\n              setTimeout(() => {\r\n                device.unringAsync().then(() => {\r\n                    console.log('stopped ringing');\r\n                }).catch ((err: JabraError) => {\r\n                    console.log('unring failed with error ' + err);\r\n                });\r\n              }, 5000); // stop ringing the device after 5 second\r\n            }          \r\n        }).catch( (err: JabraError) => {\r\n            console.error('Jabra call failed with error ' + err)\r\n        });\r\n    });\r\n    \r\n    jabra.on('detach', (device) => {\r\n        console.log('Device detached with deviceID:', device.deviceID);\r\n\r\n        // In this demo example, we will auto shutdown once all jabra devices are removed:\r\n        let remainingAttachedDevices = jabra.getAttachedDevices();\r\n        if (remainingAttachedDevices.length == 0) {\r\n            jabra.disposeAsync().then (() => {}); // Cleanup and allow node process to exit.\r\n        }\r\n    });\r\n});\r\n```\r\n\r\n### Multiple device management with typescript and async/await\r\n\r\n```typescript\r\nimport { createJabraApplication } from '@gnaudio/jabra-node-sdk';\r\n\r\n(async () => {\r\n    let jabra = await createJabraApplication('123'); // 123 is appID here\r\n\r\n    await jabra.scanForDevicesDoneAsync(); // Wait for all pre-attached devices to be scanned.\r\n\r\n    const deviceInstanceList = jabra.getAttachedDevices();\r\n    if (deviceInstanceList.length<2) {\r\n        throw new Error('Please make sure 2 jabra devices are attached');\r\n    }\r\n\r\n    const firstDevice = deviceInstanceList[0];\r\n    await firstDevice.ringAsync();\r\n\r\n    const secondDevice = deviceInstanceList[1];\r\n    await secondDevice.ringAsync();\r\n\r\n    // Dispose jabra sdk to enable node process to shutdown.\r\n    await jabra.disposeAsync();\r\n})();\r\n```\r\n\r\n## Sequence diagrams\r\n\r\nThese sequence diagrams shows typical use of the Node.js sdk:\r\n\r\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/outgoing-call-then-end-call.png)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/incoming-call-then-accept-on-device-then-end-call.png)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/incoming-call-then-user-rejects.png)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/mute-unmute-from-device.png)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/hold-resume-from-device.png)\r\n\r\n## Setup VSCode\r\n\r\nThe project includes config files for debugging typescript and C++ source files\r\nin [Visual Studio Code](https://code.visualstudio.com/) via the\r\n[C++ extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools),\r\nfor both Windows and Linux. The configuration files work without any\r\nmodification, provided that you set up your environment first, by installing\r\nthe necessary tools and defining some environment variable.\r\n\r\nTo debug a C++ file, open a typescript file referencing the C++ file and start\r\nthe debugger (Running the debugger on C++ files directly won't work). Make sure\r\nthe \"Run\"-dropdown at the top of the debugging-sidebar is set to \"Current TS\r\nFile - native code only (&lt;your operating system&gt;)\"\r\n\r\nBelow, the setup steps for Windows and Linux.\r\n\r\n### Windows\r\nYou can more or less follow the instruction in\r\n[the VSCode C++ extension guide](https://code.visualstudio.com/docs/cpp/config-msvc).\r\nThen, you need to make sure all project [pre-requisites](#pre-requisite) are\r\ninstalled correctly, and finally set the following environment variables:\r\n\r\nEnvironment Variable | Value | Description\r\n--- | --- | ---\r\nLIBJABRA_WIN_NODE_GYP_CACHE_PATH | eg. %appdata%\\Local\\node-gyp\\Cache\\12.16.3\\include\\node | Used by the C/C++ extension to resolve include paths\r\nLIBJABRA_WIN_CPP_COMPILER_PATH | eg. C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x64/cl.exe | Used by the C/C++ extension to infer the path to the C++ standard library header files\r\n\r\n\r\n### Linux\r\nYou can read a more detailed guide on\r\n[the VSCode C++ extension page](https://code.visualstudio.com/docs/cpp/config-linux).\r\nThe important part is to install a C++ compiler and debugger. The easiest way\r\nis to install `build-essential` and `gdb`, this way:\r\n\r\n```sh\r\nsudo apt-get install build-essential gdb\r\n```\r\n\r\nThis maks your C++ compiler GCC, and you would likely use the `g++` command to\r\ncompile.\r\n\r\nThen, you need to install the project [pre-requisites](#pre-requisite), and\r\nfinally export the following environment variables:\r\n\r\nEnvironment Variable | Likely value | Description\r\n--- | --- | ---\r\nJABRA_NODESDK_CPP_COMPILER_PATH | /usr/bin/g++ | Used by the C/C++ extension to infer the path to the C++ standard library header files\r\nJABRA_NODESDK_NODE_GYP_CACHE_PATH | $HOME/.cache/node-gyp/14.4.0 | Used by the C/C++ extension to resolve include paths. **NOTE**: The final `include/node` is added by the configuration and it's not necessary\r\n","gypfile":true,"scripts":{"doc":"typedoc --mode file --excludePrivate --excludeExternals --excludeNotExported --out dist/doc src/main","tsc":"tsc","build":"npm run build:dev","clean":"node-gyp clean && rimraf dist","install":"node-gyp rebuild","prepare":"npm run tsc && npm run doc && node dist/script/generatemeta.js","build:dev":"node-gyp rebuild --debug && npm run tsc && npm run generatemeta","manualtest":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/manualtest/misc.ts","generatemeta":"ts-node src/script/generatemeta.ts","build:release":"node-gyp rebuild && npm run tsc && npm run generatemeta","example-btn-press-js":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/examples/button-press.js","example-btn-press-ts":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/examples/button-press.ts","example-ringer-sequence":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/examples/ringer-sequence.ts","pipeline-build-setversion":"node setversion.js"},"_npmUser":{"name":"theisjabra","email":"tfroehlich@jabra.com"},"devEngines":{"npm":">=5.5.1","node":">=10.0.0"},"repository":{"url":"git+https://github.com/gnaudio/jabra-node-sdk.git","type":"git","directory":"nodesdk"},"_npmVersion":"6.14.8","description":"NodeJS SDK for Jabra Devices","directories":{},"_nodeVersion":"14.13.0","dependencies":{"bindings":"1.5.0","node-addon-api":"1.7.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"rimraf":"3.0.2","ts-node":"8.8.2","typedoc":"0.17.4","cross-env":"7.0.2","typescript":"3.8.3","@types/node":"13.11.1","@types/bindings":"1.3.0","replace-in-file":"5.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jabra-node-sdk_3.2.1-beta.1_1605533205433_0.8564125856383438","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"3.2.0-beta.2":{"name":"@gnaudio/jabra-node-sdk","version":"3.2.0-beta.2","keywords":["jabra","sdk"],"author":{"name":"GN Audio"},"license":"MIT","_id":"@gnaudio/jabra-node-sdk@3.2.0-beta.2","maintainers":[{"name":"ifmladenov","email":"ifmladenov@jabra.com"},{"name":"sanchen","email":"sanchen@jabra.com"},{"name":"dlaezza-jabra","email":"dlaezza@jabra.com"},{"name":"theisjabra","email":"tfroehlich@jabra.com"},{"name":"sskjabra","email":"sklausen@jabra.com"},{"name":"daniel_vasile_42","email":"fvasile@jabra.com"},{"name":"frederiksen","email":"mrtn.frederiksen@gmail.com"}],"homepage":"https://github.com/gnaudio/jabra-node-sdk/","bugs":{"url":"https://developer.jabra.com"},"dist":{"shasum":"43f8546294295e79983a06d37ee089e8407c8351","tarball":"https://registry.npmjs.org/@gnaudio/jabra-node-sdk/-/jabra-node-sdk-3.2.0-beta.2.tgz","fileCount":156,"integrity":"sha512-9GAL82ZDkzkaKRaDs6GZV39zuhUvpAi05aBYXcx/wLzmH1NDe0vP7HBmPMdiJuU7LV1z4RP1umlgbqQmq7nzyA==","signatures":[{"sig":"MEQCIEw6zoKyjwW9hMZg2k9Ei9/HT8tDZZfgoruAZD3Wf/PJAiBG1cxz+WiTDxz0X6acJrVo5xIobQtecYSx0PcoE8I0nA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":13459608,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfu405CRA9TVsSAnZWagAAWD0P/2intM/RVa/iHm6LGSzU\nyghAVP8d8/RK03Aq1pj1+TBPDIElrARX4g+U9KWmCFclQNPhctiaN4fqn0Tt\nsXg2+feJPACe0MMjSLbe4ZFcgJ5hDkjjVxL67KvxreaRGcPnh8nibuWqgGqj\nh/QMunkB6hWkVQDvIzXufNxjgnv4cSmCoOVG84RJUz6xH6wCNusXN7pUTxHt\nLv0cpB3R4XZ0YfghA7CsKz5vIhrauKWqGxOMt1jzK/QX3rqwQu9Q31p/2DIf\nMzO8vX1ykYsWoeVyAScG+DtDmUcmXBQieh3huZyAdUgrWdwnZNwjPgwU8pO5\npa2NVja0GYXr9agN+y8akmyDUyOw35a6woNCOp2clv7gZFqC+lb6XofPjjHQ\nMC5dRLv3WYMFK3QfUnfut8ZJj0AWnsCDpXApO/7HqQwQwWuIsV6snEchZRRM\nCP4RNn3WZ7CnDtGuwU0jKzdTRUf+qWo/ht3mwU4glv/ar/Cj6bZYcVfTI+zW\n1p++jFo/xNMt22D3Mh9XvF+TX3XFod70EUpt4CCMjCu10vkUiVbWlOUsGYkc\nyyxSUESkt6rUai1KEnOUEiqsPOqbanfAG+twCl37PJs0BR9mpp/0tgASpaIR\nqmSXHeQntaNotg9l0B1BQYzWQlxeFgzYAB8xbVMU0silBWUcsITd/F6US1Ft\nFeFL\r\n=BNnz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/main/index.js","types":"dist/main/index.d.ts","readme":"Jabra Node.js SDK\r\n\r\n# Table of Contents\r\n- [Versions](#versions)\r\n- [Pre-requisite](#pre-requisite)\r\n- [Installation](#installation)\r\n- [Debugging and Logging](#debugging-and-logging)\r\n- [API Reference](#api-reference)\r\n- [Examples](#examples)\r\n    - [Simple Example](#simple-button-events-example-using-javascript-and-plain-promises)\r\n    - [Multiple device management](#multiple-device-management-with-typescript-and-asyncawait)\r\n- [Sequence Diagrams](#sequence-diagrams)\r\n- [Setup VSCode](#setup-vsCode)\r\n    - [Windows](#windows)\r\n    - [Linux](#linux)\r\n- [Bug report](https://github.com/gnaudio/jabra-node-sdk#bug-reports)\r\n- [Changelog](https://github.com/gnaudio/jabra-node-sdk/blob/master/CHANGELOG.md)\r\n- [License](https://github.com/gnaudio/jabra-node-sdk/blob/master/LICENSE.md)\r\n- [FAQ](https://github.com/gnaudio/jabra-node-sdk/blob/master/FAQ.md)\r\n\r\n## Versions\r\n\r\n[![npm version](https://badge.fury.io/js/%40gnaudio%2Fjabra-node-sdk.svg)](https://badge.fury.io/js/%40gnaudio%2Fjabra-node-sdk)\r\n\r\nLatest **STABLE** release is  [distributed on npmjs.com](https://www.npmjs.com/package/@gnaudio/jabra-node-sdk/v/3.1.0) (see [changelog](https://github.com/gnaudio/jabra-node-sdk/blob/master/CHANGELOG.md) for changes and notable defects). \r\n\r\nIn addition, **BETA** versions may be available on npmjs with a version name ending with \"-beta.X\" specifier. For such BETA versions,the following applies:\r\n\r\n    > Disclaimer for Alpha and Beta Software Release\r\n\r\n    > Please note that this is a copyrighted Jabra Product ((c) 2017 GN Audio A/S) (the “Product”) which is still undergoing final testing before its official release. The Product and all content found on it are provided on an “as is” and “as available” basis. Jabra does not provide any warranties, neither express nor implied, as to the suitability or usability of the Product or any of its content.\r\n\r\n    > Jabra disclaims liability for any loss, whether direct, indirect, special or consequential, suffered by any person as a result of their use of the Product or the software embedded, and for any claim arising from any injury or damage, including but not limited to, any personal or bodily injury or tangible property damage, arising from or resulting in any way from any alleged defects in the material, workmanship, or performance of the Product, and Company shall indemnify Jabra in respect of any such claims. All usage of the Product is at users’ own risk and the user will be solely responsible for any resulting from such activities.\r\n\r\n    > Should you encounter any bugs, glitches, dangers, lack of functionality, lack of comfort or other problems with the Product, please let us know immediately so we can rectify these accordingly. Your help in this regard is greatly appreciated.\r\n\r\n    > The Product is released solely for test use in Company’s organization and must not under any circumstances be distributed to third parties without prior written acceptance from Jabra.\r\n\r\n    > By using the software, I accept and acknowledge the content herein.`\r\n\r\n## Pre-requisite\r\n1. Node.js v8.x or later.\r\n2. **On MacOS:** `xcode` & `python 2.7`. By default, Python is installed on macOS but make sure correct version(2.7.x) is installed. Install Xcode from App store or download it from [here](https://developer.apple.com/xcode/download/).\r\n3. **On Windows:** `Visual C++ Build Tools` & `Python 2.7`. You can install all of these by following any of the below mentioned steps.\r\n\r\n    3.1. **During Node.js installation** By ticking the checkbox when prompted during Node.js installation for `Tools for Native modules`, this installs both `Visual C++ Build Tools` & `Python 2.7`. **Note** This is prompted only for Windows platform. For other platforms like Linux or MAC, C++ compilation tools has to be installed separately as mentioned in other steps.\r\n\r\n    3.2. Both `Visual C++ Build Tools` & `Python 2.7` can also be installed using command `npm install --global --production --add-python-to-path windows-build-tools`. To know more about this tool, see [this link.](https://github.com/felixrieseberg/windows-build-tools). **Note** For executing this command through `Windows Command Prompt` or `Windows PowerShell`, they should be ran in Administrator mode.\r\n4. **On Linux:** `build-essential` package for C++ compilation & `Python 2.7`.\r\n\r\n    4.1. **Udev rules:** To be able to communicate with Jabra devices with non-root privileges it is required to create a udev rule for Jabra devices. Place the udev rule in `/etc/udev/rules.d`, and follow naming guidelines for udev files.              \r\n    \r\n    **Example:** The file name should be something like `80-jabra.rules` where the number before the dash indicates in what order the system reads the rules (e.g. if you had another rules file called `70-someotherrule.rules`, it would read that one first), the word after the dash is just an identifier of sorts (it could be something other than jabra) and the extension must be `.rules`.\r\n\r\n    The contents of the file are:\r\n\r\n    `ATTRS{idVendor}==\"0b0e\", MODE=\"0666\", GROUP=\"users\"`\r\n\r\n    After creating the udev file (as root), reload the udev rules using:\r\n\r\n    `sudo udevadm control --reload`\r\n\r\n    Reattach your Jabra device in order to get new permissions assigned.\r\n\r\n5. **All Platforms:** `node-gyp`. You can install this using command `npm install -g node-gyp`. To know more about this, see [this link](https://www.npmjs.com/package/node-gyp)\r\n\r\n6. **For Electron.JS:** If you are using `asar` packaging then you may need to `unpack` some of the resources used in this module. These resources are native library files i.e `libjabra.dll`, `libjabra.dylib` & `libjabra.so`, which is stored in a `build\\Release` folder. By default latest electron builder will automatically unpack, but if it does not work then you can provide below option to your build process. To know more, see [this link](https://www.electron.build/configuration/configuration)\r\n\r\n    ```\r\n    \"build\": {\r\n        \"asarUnpack\": [\"node_modules/@gnaudio/jabra-node-sdk\"]\r\n    }\r\n    ```\r\n\r\n## Installation\r\nThis release is published to [npm](https://www.npmjs.com/package/@gnaudio/jabra-node-sdk) and can be installed via below command.\r\n```\r\nnpm install --save @gnaudio/jabra-node-sdk\r\n```\r\n\r\n## Debugging and Logging\r\nBelow environment variables are defined for logging and debugging purpose. User can change the values as per preference.\r\n\r\nEnvironment Variable | Value | Description\r\n--- | --- | ---\r\nLIBJABRA_TRACE_LEVEL | fatal, error, warning(default), info, debug | Log levels\r\nLIBJABRA_RESOURCE_PATH | **On Mac:** ~/Library/Application Support/JabraSDK/ **On Windows:** %appdata%/Roaming/JabraSDK  | This determine the system path where logs and device related files are written.\r\n\r\n## API Reference\r\nAPI doc is in html format. See doc folder inside installed module `node_modules\\@gnaudio\\jabra-node-sdk\\dist\\doc` and open `index.html`.\r\n\r\n## Examples\r\n\r\nFor all examples, user should first register the app on [Jabra developer site](https://developer.jabra.com/) to get appID. User should pass this appID to `createJabraApplication` in order to initialize the jabra module:\r\n\r\n### Simple button events example using javascript and plain promises\r\n\r\n```javascript\r\nconst j = require(\"@gnaudio/jabra-node-sdk\");\r\nj.createJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        console.log('Press any key on Jabra device ' + device.deviceName);\r\n        \r\n        device.on('btnPress', (btnType, btnValue) => {\r\n          console.log('New input from device is received: ', j.enumDeviceBtnType[btnType], btnValue);\r\n        });\r\n    });    \r\n});\r\n```\r\n\r\n### Simple button events example using typescript and plain promises\r\n\r\n```typescript\r\nimport { createJabraApplication, enumDeviceBtnType, enumHidState } from '@gnaudio/jabra-node-sdk';\r\ncreateJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        console.log('Press any key on Jabra device ' + device.deviceName);\r\n\r\n        device.on('btnPress', (btnType, btnValue) => {\r\n          console.log('New input from device is received: ', enumDeviceBtnType[btnType], btnValue);\r\n        });\r\n    });    \r\n});\r\n```\r\n\r\n### Ring example using typescript and plain promises\r\nThis example shows how to ring a Jabra device\r\n\r\n```typescript\r\nimport { createJabraApplication, JabraError } from '@gnaudio/jabra-node-sdk';\r\n\r\ncreateJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        device.isRingerSupportedAsync().then( (supported) => {\r\n            if (supported) {\r\n              device.ringAsync().then ( () => {\r\n                console.log('ringing');\r\n              }).catch ((err: JabraError) => {\r\n                console.log('ring failed with error ' + err);\r\n              }); // ring the device\r\n              setTimeout(() => {\r\n                device.unringAsync().then(() => {\r\n                    console.log('stopped ringing');\r\n                }).catch ((err: JabraError) => {\r\n                    console.log('unring failed with error ' + err);\r\n                });\r\n              }, 5000); // stop ringing the device after 5 second\r\n            }          \r\n        }).catch( (err: JabraError) => {\r\n            console.error('Jabra call failed with error ' + err)\r\n        });\r\n    });\r\n    \r\n    jabra.on('detach', (device) => {\r\n        console.log('Device detached with deviceID:', device.deviceID);\r\n\r\n        // In this demo example, we will auto shutdown once all jabra devices are removed:\r\n        let remainingAttachedDevices = jabra.getAttachedDevices();\r\n        if (remainingAttachedDevices.length == 0) {\r\n            jabra.disposeAsync().then (() => {}); // Cleanup and allow node process to exit.\r\n        }\r\n    });\r\n});\r\n```\r\n\r\n### Multiple device management with typescript and async/await\r\n\r\n```typescript\r\nimport { createJabraApplication } from '@gnaudio/jabra-node-sdk';\r\n\r\n(async () => {\r\n    let jabra = await createJabraApplication('123'); // 123 is appID here\r\n\r\n    await jabra.scanForDevicesDoneAsync(); // Wait for all pre-attached devices to be scanned.\r\n\r\n    const deviceInstanceList = jabra.getAttachedDevices();\r\n    if (deviceInstanceList.length<2) {\r\n        throw new Error('Please make sure 2 jabra devices are attached');\r\n    }\r\n\r\n    const firstDevice = deviceInstanceList[0];\r\n    await firstDevice.ringAsync();\r\n\r\n    const secondDevice = deviceInstanceList[1];\r\n    await secondDevice.ringAsync();\r\n\r\n    // Dispose jabra sdk to enable node process to shutdown.\r\n    await jabra.disposeAsync();\r\n})();\r\n```\r\n\r\n## Sequence diagrams\r\n\r\nThese sequence diagrams shows typical use of the Node.js sdk:\r\n\r\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/outgoing-call-then-end-call.png)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/incoming-call-then-accept-on-device-then-end-call.png)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/incoming-call-then-user-rejects.png)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/mute-unmute-from-device.png)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/hold-resume-from-device.png)\r\n\r\n## Setup VSCode\r\n\r\nThe project includes config files for debugging typescript and C++ source files\r\nin [Visual Studio Code](https://code.visualstudio.com/) via the\r\n[C++ extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools),\r\nfor both Windows and Linux. The configuration files work without any\r\nmodification, provided that you set up your environment first, by installing\r\nthe necessary tools and defining some environment variable.\r\n\r\nTo debug a C++ file, open a typescript file referencing the C++ file and start\r\nthe debugger (Running the debugger on C++ files directly won't work). Make sure\r\nthe \"Run\"-dropdown at the top of the debugging-sidebar is set to \"Current TS\r\nFile - native code only (&lt;your operating system&gt;)\"\r\n\r\nBelow, the setup steps for Windows and Linux.\r\n\r\n### Windows\r\nYou can more or less follow the instruction in\r\n[the VSCode C++ extension guide](https://code.visualstudio.com/docs/cpp/config-msvc).\r\nThen, you need to make sure all project [pre-requisites](#pre-requisite) are\r\ninstalled correctly, and finally set the following environment variables:\r\n\r\nEnvironment Variable | Value | Description\r\n--- | --- | ---\r\nLIBJABRA_WIN_NODE_GYP_CACHE_PATH | eg. %appdata%\\Local\\node-gyp\\Cache\\12.16.3\\include\\node | Used by the C/C++ extension to resolve include paths\r\nLIBJABRA_WIN_CPP_COMPILER_PATH | eg. C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x64/cl.exe | Used by the C/C++ extension to infer the path to the C++ standard library header files\r\n\r\n\r\n### Linux\r\nYou can read a more detailed guide on\r\n[the VSCode C++ extension page](https://code.visualstudio.com/docs/cpp/config-linux).\r\nThe important part is to install a C++ compiler and debugger. The easiest way\r\nis to install `build-essential` and `gdb`, this way:\r\n\r\n```sh\r\nsudo apt-get install build-essential gdb\r\n```\r\n\r\nThis maks your C++ compiler GCC, and you would likely use the `g++` command to\r\ncompile.\r\n\r\nThen, you need to install the project [pre-requisites](#pre-requisite), and\r\nfinally export the following environment variables:\r\n\r\nEnvironment Variable | Likely value | Description\r\n--- | --- | ---\r\nJABRA_NODESDK_CPP_COMPILER_PATH | /usr/bin/g++ | Used by the C/C++ extension to infer the path to the C++ standard library header files\r\nJABRA_NODESDK_NODE_GYP_CACHE_PATH | $HOME/.cache/node-gyp/14.4.0 | Used by the C/C++ extension to resolve include paths. **NOTE**: The final `include/node` is added by the configuration and it's not necessary\r\n","gypfile":true,"scripts":{"doc":"typedoc --mode file --excludePrivate --excludeExternals --excludeNotExported --out dist/doc src/main","tsc":"tsc","build":"npm run build:dev","clean":"node-gyp clean && rimraf dist","install":"node-gyp rebuild","prepare":"npm run tsc && npm run doc && node dist/script/generatemeta.js","build:dev":"node-gyp rebuild --debug && npm run tsc && npm run generatemeta","manualtest":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/manualtest/misc.ts","generatemeta":"ts-node src/script/generatemeta.ts","build:release":"node-gyp rebuild && npm run tsc && npm run generatemeta","example-btn-press-js":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/examples/button-press.js","example-btn-press-ts":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/examples/button-press.ts","example-ringer-sequence":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/examples/ringer-sequence.ts","pipeline-build-setversion":"node setversion.js"},"_npmUser":{"name":"theisjabra","email":"tfroehlich@jabra.com"},"devEngines":{"npm":">=5.5.1","node":">=10.0.0"},"repository":{"url":"git+https://github.com/gnaudio/jabra-node-sdk.git","type":"git","directory":"nodesdk"},"_npmVersion":"6.14.8","description":"NodeJS SDK for Jabra Devices","directories":{},"_nodeVersion":"14.13.0","dependencies":{"bindings":"1.5.0","node-addon-api":"1.7.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"rimraf":"3.0.2","ts-node":"8.8.2","typedoc":"0.17.4","cross-env":"7.0.2","typescript":"3.8.3","@types/node":"13.11.1","@types/bindings":"1.3.0","replace-in-file":"5.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jabra-node-sdk_3.2.0-beta.2_1606126905090_0.8557517579066107","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"3.2.1-beta.2":{"name":"@gnaudio/jabra-node-sdk","version":"3.2.1-beta.2","keywords":["jabra","sdk"],"author":{"name":"GN Audio"},"license":"MIT","_id":"@gnaudio/jabra-node-sdk@3.2.1-beta.2","maintainers":[{"name":"ifmladenov","email":"ifmladenov@jabra.com"},{"name":"sanchen","email":"sanchen@jabra.com"},{"name":"dlaezza-jabra","email":"dlaezza@jabra.com"},{"name":"theisjabra","email":"tfroehlich@jabra.com"},{"name":"sskjabra","email":"sklausen@jabra.com"},{"name":"daniel_vasile_42","email":"fvasile@jabra.com"},{"name":"frederiksen","email":"mrtn.frederiksen@gmail.com"}],"homepage":"https://github.com/gnaudio/jabra-node-sdk/","bugs":{"url":"https://developer.jabra.com"},"dist":{"shasum":"30721b91c19375e915230af789a12d4f318241a7","tarball":"https://registry.npmjs.org/@gnaudio/jabra-node-sdk/-/jabra-node-sdk-3.2.1-beta.2.tgz","fileCount":156,"integrity":"sha512-KsD8uhZunWLK1VVsEmPLIC/qkN8YK7lrWOwrxhslHMy0YNtGfL8y5lJilJDOClopeQ+/uftehdj8ew9hZhTrSg==","signatures":[{"sig":"MEMCHyj+RQMR9Y/Wih33/gFQA1x9kWCwUy5V7xQCO5fxy8UCIGatHB9YyC41IHhV32QM8lLVnluWJpj00fTYFAS4X7Z6","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":13459608,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfu42lCRA9TVsSAnZWagAAF2YP/34hjHOk8ENplf2VVIRR\ngdMAfrK6rpHdOwOdGIn/228IfdhE38dVewgKYPYJDNLIWEdpGjKzwjiBwWIe\nZyLSrz9rrl5Mzjuhl2ltfDeaijD9U28d6Jezgvj+s1XACHWbYNs3xmO7JeL+\n1Mwkp8C1O2fwMvl10nYS7gCU5Ph0bnhLJl8WFPckDFsw9ltbqDRGXXZ7OZ9H\nZ2MQBsrMkzOuJs29M7CszTE217nQgnm3341BgstBrUXgvw1ijIWdImchPL2I\n58VypxGZBxZOgiib94O+ddbsPpdX/CGqdlaeIodmkjbgOw6H4gccdfjmx5OG\nUFEfuLV0kbcDe0JeSIWLC3WRqJ3KfUQw/xnL33M2ElhYz/dvkE+gJdNRuir5\ngmLM4nbYT7/hSDV6zITxIXcevZi8LDf7SdINvnYZNK6Yyyk+KW6/iuI93RPY\nOzWOwGNutQfcEhf9F5B47kUeeVbBJwVnkg7Vi8g4i6/UPq0dMB3LOT1JtSFU\n3agT4DPCCUuX8DYdRyKJDW069bul6Gi9G1KRsh4gHf5prEiBHv+V5Nb5MlJn\nmCxpLErI4kfcZcC7MSzha3TmQSoipl7wyCQ9hxhXbOJVjlHun/UKQDuBKHvg\nTIrCfiaYi6tAYtzkY7i5M6MUo8qtu3egH1aOLZDjsQViRPGhZlAWlBUe1+Rv\nnTWD\r\n=UsFl\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/main/index.js","types":"dist/main/index.d.ts","readme":"Jabra Node.js SDK\r\n\r\n# Table of Contents\r\n- [Versions](#versions)\r\n- [Pre-requisite](#pre-requisite)\r\n- [Installation](#installation)\r\n- [Debugging and Logging](#debugging-and-logging)\r\n- [API Reference](#api-reference)\r\n- [Examples](#examples)\r\n    - [Simple Example](#simple-button-events-example-using-javascript-and-plain-promises)\r\n    - [Multiple device management](#multiple-device-management-with-typescript-and-asyncawait)\r\n- [Sequence Diagrams](#sequence-diagrams)\r\n- [Setup VSCode](#setup-vsCode)\r\n    - [Windows](#windows)\r\n    - [Linux](#linux)\r\n- [Bug report](https://github.com/gnaudio/jabra-node-sdk#bug-reports)\r\n- [Changelog](https://github.com/gnaudio/jabra-node-sdk/blob/master/CHANGELOG.md)\r\n- [License](https://github.com/gnaudio/jabra-node-sdk/blob/master/LICENSE.md)\r\n- [FAQ](https://github.com/gnaudio/jabra-node-sdk/blob/master/FAQ.md)\r\n\r\n## Versions\r\n\r\n[![npm version](https://badge.fury.io/js/%40gnaudio%2Fjabra-node-sdk.svg)](https://badge.fury.io/js/%40gnaudio%2Fjabra-node-sdk)\r\n\r\nLatest **STABLE** release is  [distributed on npmjs.com](https://www.npmjs.com/package/@gnaudio/jabra-node-sdk/v/3.1.0) (see [changelog](https://github.com/gnaudio/jabra-node-sdk/blob/master/CHANGELOG.md) for changes and notable defects). \r\n\r\nIn addition, **BETA** versions may be available on npmjs with a version name ending with \"-beta.X\" specifier. For such BETA versions,the following applies:\r\n\r\n    > Disclaimer for Alpha and Beta Software Release\r\n\r\n    > Please note that this is a copyrighted Jabra Product ((c) 2017 GN Audio A/S) (the “Product”) which is still undergoing final testing before its official release. The Product and all content found on it are provided on an “as is” and “as available” basis. Jabra does not provide any warranties, neither express nor implied, as to the suitability or usability of the Product or any of its content.\r\n\r\n    > Jabra disclaims liability for any loss, whether direct, indirect, special or consequential, suffered by any person as a result of their use of the Product or the software embedded, and for any claim arising from any injury or damage, including but not limited to, any personal or bodily injury or tangible property damage, arising from or resulting in any way from any alleged defects in the material, workmanship, or performance of the Product, and Company shall indemnify Jabra in respect of any such claims. All usage of the Product is at users’ own risk and the user will be solely responsible for any resulting from such activities.\r\n\r\n    > Should you encounter any bugs, glitches, dangers, lack of functionality, lack of comfort or other problems with the Product, please let us know immediately so we can rectify these accordingly. Your help in this regard is greatly appreciated.\r\n\r\n    > The Product is released solely for test use in Company’s organization and must not under any circumstances be distributed to third parties without prior written acceptance from Jabra.\r\n\r\n    > By using the software, I accept and acknowledge the content herein.`\r\n\r\n## Pre-requisite\r\n1. Node.js v8.x or later.\r\n2. **On MacOS:** `xcode` & `python 2.7`. By default, Python is installed on macOS but make sure correct version(2.7.x) is installed. Install Xcode from App store or download it from [here](https://developer.apple.com/xcode/download/).\r\n3. **On Windows:** `Visual C++ Build Tools` & `Python 2.7`. You can install all of these by following any of the below mentioned steps.\r\n\r\n    3.1. **During Node.js installation** By ticking the checkbox when prompted during Node.js installation for `Tools for Native modules`, this installs both `Visual C++ Build Tools` & `Python 2.7`. **Note** This is prompted only for Windows platform. For other platforms like Linux or MAC, C++ compilation tools has to be installed separately as mentioned in other steps.\r\n\r\n    3.2. Both `Visual C++ Build Tools` & `Python 2.7` can also be installed using command `npm install --global --production --add-python-to-path windows-build-tools`. To know more about this tool, see [this link.](https://github.com/felixrieseberg/windows-build-tools). **Note** For executing this command through `Windows Command Prompt` or `Windows PowerShell`, they should be ran in Administrator mode.\r\n4. **On Linux:** `build-essential` package for C++ compilation & `Python 2.7`.\r\n\r\n    4.1. **Udev rules:** To be able to communicate with Jabra devices with non-root privileges it is required to create a udev rule for Jabra devices. Place the udev rule in `/etc/udev/rules.d`, and follow naming guidelines for udev files.              \r\n    \r\n    **Example:** The file name should be something like `80-jabra.rules` where the number before the dash indicates in what order the system reads the rules (e.g. if you had another rules file called `70-someotherrule.rules`, it would read that one first), the word after the dash is just an identifier of sorts (it could be something other than jabra) and the extension must be `.rules`.\r\n\r\n    The contents of the file are:\r\n\r\n    `ATTRS{idVendor}==\"0b0e\", MODE=\"0666\", GROUP=\"users\"`\r\n\r\n    After creating the udev file (as root), reload the udev rules using:\r\n\r\n    `sudo udevadm control --reload`\r\n\r\n    Reattach your Jabra device in order to get new permissions assigned.\r\n\r\n5. **All Platforms:** `node-gyp`. You can install this using command `npm install -g node-gyp`. To know more about this, see [this link](https://www.npmjs.com/package/node-gyp)\r\n\r\n6. **For Electron.JS:** If you are using `asar` packaging then you may need to `unpack` some of the resources used in this module. These resources are native library files i.e `libjabra.dll`, `libjabra.dylib` & `libjabra.so`, which is stored in a `build\\Release` folder. By default latest electron builder will automatically unpack, but if it does not work then you can provide below option to your build process. To know more, see [this link](https://www.electron.build/configuration/configuration)\r\n\r\n    ```\r\n    \"build\": {\r\n        \"asarUnpack\": [\"node_modules/@gnaudio/jabra-node-sdk\"]\r\n    }\r\n    ```\r\n\r\n## Installation\r\nThis release is published to [npm](https://www.npmjs.com/package/@gnaudio/jabra-node-sdk) and can be installed via below command.\r\n```\r\nnpm install --save @gnaudio/jabra-node-sdk\r\n```\r\n\r\n## Debugging and Logging\r\nBelow environment variables are defined for logging and debugging purpose. User can change the values as per preference.\r\n\r\nEnvironment Variable | Value | Description\r\n--- | --- | ---\r\nLIBJABRA_TRACE_LEVEL | fatal, error, warning(default), info, debug | Log levels\r\nLIBJABRA_RESOURCE_PATH | **On Mac:** ~/Library/Application Support/JabraSDK/ **On Windows:** %appdata%/Roaming/JabraSDK  | This determine the system path where logs and device related files are written.\r\n\r\n## API Reference\r\nAPI doc is in html format. See doc folder inside installed module `node_modules\\@gnaudio\\jabra-node-sdk\\dist\\doc` and open `index.html`.\r\n\r\n## Examples\r\n\r\nFor all examples, user should first register the app on [Jabra developer site](https://developer.jabra.com/) to get appID. User should pass this appID to `createJabraApplication` in order to initialize the jabra module:\r\n\r\n### Simple button events example using javascript and plain promises\r\n\r\n```javascript\r\nconst j = require(\"@gnaudio/jabra-node-sdk\");\r\nj.createJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        console.log('Press any key on Jabra device ' + device.deviceName);\r\n        \r\n        device.on('btnPress', (btnType, btnValue) => {\r\n          console.log('New input from device is received: ', j.enumDeviceBtnType[btnType], btnValue);\r\n        });\r\n    });    \r\n});\r\n```\r\n\r\n### Simple button events example using typescript and plain promises\r\n\r\n```typescript\r\nimport { createJabraApplication, enumDeviceBtnType, enumHidState } from '@gnaudio/jabra-node-sdk';\r\ncreateJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        console.log('Press any key on Jabra device ' + device.deviceName);\r\n\r\n        device.on('btnPress', (btnType, btnValue) => {\r\n          console.log('New input from device is received: ', enumDeviceBtnType[btnType], btnValue);\r\n        });\r\n    });    \r\n});\r\n```\r\n\r\n### Ring example using typescript and plain promises\r\nThis example shows how to ring a Jabra device\r\n\r\n```typescript\r\nimport { createJabraApplication, JabraError } from '@gnaudio/jabra-node-sdk';\r\n\r\ncreateJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        device.isRingerSupportedAsync().then( (supported) => {\r\n            if (supported) {\r\n              device.ringAsync().then ( () => {\r\n                console.log('ringing');\r\n              }).catch ((err: JabraError) => {\r\n                console.log('ring failed with error ' + err);\r\n              }); // ring the device\r\n              setTimeout(() => {\r\n                device.unringAsync().then(() => {\r\n                    console.log('stopped ringing');\r\n                }).catch ((err: JabraError) => {\r\n                    console.log('unring failed with error ' + err);\r\n                });\r\n              }, 5000); // stop ringing the device after 5 second\r\n            }          \r\n        }).catch( (err: JabraError) => {\r\n            console.error('Jabra call failed with error ' + err)\r\n        });\r\n    });\r\n    \r\n    jabra.on('detach', (device) => {\r\n        console.log('Device detached with deviceID:', device.deviceID);\r\n\r\n        // In this demo example, we will auto shutdown once all jabra devices are removed:\r\n        let remainingAttachedDevices = jabra.getAttachedDevices();\r\n        if (remainingAttachedDevices.length == 0) {\r\n            jabra.disposeAsync().then (() => {}); // Cleanup and allow node process to exit.\r\n        }\r\n    });\r\n});\r\n```\r\n\r\n### Multiple device management with typescript and async/await\r\n\r\n```typescript\r\nimport { createJabraApplication } from '@gnaudio/jabra-node-sdk';\r\n\r\n(async () => {\r\n    let jabra = await createJabraApplication('123'); // 123 is appID here\r\n\r\n    await jabra.scanForDevicesDoneAsync(); // Wait for all pre-attached devices to be scanned.\r\n\r\n    const deviceInstanceList = jabra.getAttachedDevices();\r\n    if (deviceInstanceList.length<2) {\r\n        throw new Error('Please make sure 2 jabra devices are attached');\r\n    }\r\n\r\n    const firstDevice = deviceInstanceList[0];\r\n    await firstDevice.ringAsync();\r\n\r\n    const secondDevice = deviceInstanceList[1];\r\n    await secondDevice.ringAsync();\r\n\r\n    // Dispose jabra sdk to enable node process to shutdown.\r\n    await jabra.disposeAsync();\r\n})();\r\n```\r\n\r\n## Sequence diagrams\r\n\r\nThese sequence diagrams shows typical use of the Node.js sdk:\r\n\r\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/outgoing-call-then-end-call.png)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/incoming-call-then-accept-on-device-then-end-call.png)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/incoming-call-then-user-rejects.png)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/mute-unmute-from-device.png)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/hold-resume-from-device.png)\r\n\r\n## Setup VSCode\r\n\r\nThe project includes config files for debugging typescript and C++ source files\r\nin [Visual Studio Code](https://code.visualstudio.com/) via the\r\n[C++ extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools),\r\nfor both Windows and Linux. The configuration files work without any\r\nmodification, provided that you set up your environment first, by installing\r\nthe necessary tools and defining some environment variable.\r\n\r\nTo debug a C++ file, open a typescript file referencing the C++ file and start\r\nthe debugger (Running the debugger on C++ files directly won't work). Make sure\r\nthe \"Run\"-dropdown at the top of the debugging-sidebar is set to \"Current TS\r\nFile - native code only (&lt;your operating system&gt;)\"\r\n\r\nBelow, the setup steps for Windows and Linux.\r\n\r\n### Windows\r\nYou can more or less follow the instruction in\r\n[the VSCode C++ extension guide](https://code.visualstudio.com/docs/cpp/config-msvc).\r\nThen, you need to make sure all project [pre-requisites](#pre-requisite) are\r\ninstalled correctly, and finally set the following environment variables:\r\n\r\nEnvironment Variable | Value | Description\r\n--- | --- | ---\r\nLIBJABRA_WIN_NODE_GYP_CACHE_PATH | eg. %appdata%\\Local\\node-gyp\\Cache\\12.16.3\\include\\node | Used by the C/C++ extension to resolve include paths\r\nLIBJABRA_WIN_CPP_COMPILER_PATH | eg. C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x64/cl.exe | Used by the C/C++ extension to infer the path to the C++ standard library header files\r\n\r\n\r\n### Linux\r\nYou can read a more detailed guide on\r\n[the VSCode C++ extension page](https://code.visualstudio.com/docs/cpp/config-linux).\r\nThe important part is to install a C++ compiler and debugger. The easiest way\r\nis to install `build-essential` and `gdb`, this way:\r\n\r\n```sh\r\nsudo apt-get install build-essential gdb\r\n```\r\n\r\nThis maks your C++ compiler GCC, and you would likely use the `g++` command to\r\ncompile.\r\n\r\nThen, you need to install the project [pre-requisites](#pre-requisite), and\r\nfinally export the following environment variables:\r\n\r\nEnvironment Variable | Likely value | Description\r\n--- | --- | ---\r\nJABRA_NODESDK_CPP_COMPILER_PATH | /usr/bin/g++ | Used by the C/C++ extension to infer the path to the C++ standard library header files\r\nJABRA_NODESDK_NODE_GYP_CACHE_PATH | $HOME/.cache/node-gyp/14.4.0 | Used by the C/C++ extension to resolve include paths. **NOTE**: The final `include/node` is added by the configuration and it's not necessary\r\n","gypfile":true,"scripts":{"doc":"typedoc --mode file --excludePrivate --excludeExternals --excludeNotExported --out dist/doc src/main","tsc":"tsc","build":"npm run build:dev","clean":"node-gyp clean && rimraf dist","install":"node-gyp rebuild","prepare":"npm run tsc && npm run doc && node dist/script/generatemeta.js","build:dev":"node-gyp rebuild --debug && npm run tsc && npm run generatemeta","manualtest":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/manualtest/misc.ts","generatemeta":"ts-node src/script/generatemeta.ts","build:release":"node-gyp rebuild && npm run tsc && npm run generatemeta","example-btn-press-js":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/examples/button-press.js","example-btn-press-ts":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/examples/button-press.ts","example-ringer-sequence":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/examples/ringer-sequence.ts","pipeline-build-setversion":"node setversion.js"},"_npmUser":{"name":"theisjabra","email":"tfroehlich@jabra.com"},"devEngines":{"npm":">=5.5.1","node":">=10.0.0"},"repository":{"url":"git+https://github.com/gnaudio/jabra-node-sdk.git","type":"git","directory":"nodesdk"},"_npmVersion":"6.14.8","description":"NodeJS SDK for Jabra Devices","directories":{},"_nodeVersion":"14.13.0","dependencies":{"bindings":"1.5.0","node-addon-api":"1.7.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"rimraf":"3.0.2","ts-node":"8.8.2","typedoc":"0.17.4","cross-env":"7.0.2","typescript":"3.8.3","@types/node":"13.11.1","@types/bindings":"1.3.0","replace-in-file":"5.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jabra-node-sdk_3.2.1-beta.2_1606127013248_0.05042085023570797","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"3.2.1-beta.3":{"name":"@gnaudio/jabra-node-sdk","version":"3.2.1-beta.3","keywords":["jabra","sdk"],"author":{"name":"GN Audio"},"license":"MIT","_id":"@gnaudio/jabra-node-sdk@3.2.1-beta.3","maintainers":[{"name":"thammond","email":"thammond@jabra.com"},{"name":"ifmladenov","email":"ifmladenov@jabra.com"},{"name":"sanchen","email":"sanchen@jabra.com"},{"name":"dlaezza-jabra","email":"dlaezza@jabra.com"},{"name":"theisjabra","email":"tfroehlich@jabra.com"},{"name":"sskjabra","email":"sklausen@jabra.com"},{"name":"daniel_vasile_42","email":"fvasile@jabra.com"},{"name":"frederiksen","email":"mrtn.frederiksen@gmail.com"}],"homepage":"https://github.com/gnaudio/jabra-node-sdk/","bugs":{"url":"https://developer.jabra.com"},"dist":{"shasum":"d23c0203c0ee81b7afce5ce4469715ccf8dd80ee","tarball":"https://registry.npmjs.org/@gnaudio/jabra-node-sdk/-/jabra-node-sdk-3.2.1-beta.3.tgz","fileCount":156,"integrity":"sha512-Sc8MHYIEzQWk/WjHZ9BLdi2UHHh581GmqdLISEdkAA3WbU8j6Pyf1B4lf1aBMPmfXOTTEqLQ41gcxrtwDP+jtg==","signatures":[{"sig":"MEYCIQCNOSUATDBPNVMXM0As8Cb/aUFf4r1KaPk8FVbx2BE16wIhAM8O1XOeJGCuk19QmN0jH9cHRRe1BpaoYduZ6RuFXlDN","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":13459608,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfwLmBCRA9TVsSAnZWagAAOXkP/3bSdJfBsuUheF6DSyfT\nD2Qo8PbPQCqUKaiKITu/3EYUCTygYjT5qPSwri7D+YF0ibG0wJSEhvVf6eah\n49m2iLZXlGJDNZ5ilaiJArKd8MaT3MTQPsNaZ2y45vIDtzBrVbRq7pkVl9fL\n0yyn2BYCtI/n5c1OuTzeg8KA2aB7PRG46PfRwxNRsrx4OWiXjMJ1HZhz63BG\nk7YKAFqFvgJlXDEXPb/LMYpr2b5xDPkWUd2e6Kw4+hzNEHqwB/AqVx9ev+0+\ngbopABz+ccq9L5oFy0AAmXpW3151CcBbOH0LKmgekoiWMDv3YmPqNIrKy7YB\nRg4gye0IEgVsn3Hh+t/xtjoSz0VzC3w0kw3FrPQntzQXTy4B68nUHJQ+QHVx\n+8o/2WYzHO5hwdhSFV68SGK4rQZurdqvS0XJ4Siwi8k62ucTiaDvvA9EgJf9\nt7Qve9grMHVZEIIijxfDBAYcm7BNEPXR2dDzTKEf91+2QmhUk4u5E7oLmm+c\n5RgBpyecI1aX2pgXum4Mx56zhaBmVlc2ox/tDZludUc5z/L/yq2++2H0DDE5\nInKddrPo+zCZeD/sniX9cZ/LutkLx5oxcYr3d4cAGFhniE/AWceXQaVsgDYF\nJYlbVRYMX975h68VMusdL33tmYztbZCge4wCf8KJbO8zkIkx5bxMd8f+tADT\nzELs\r\n=/pix\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/main/index.js","types":"dist/main/index.d.ts","readme":"Jabra Node.js SDK\r\n\r\n# Table of Contents\r\n- [Versions](#versions)\r\n- [Pre-requisite](#pre-requisite)\r\n- [Installation](#installation)\r\n- [Debugging and Logging](#debugging-and-logging)\r\n- [API Reference](#api-reference)\r\n- [Examples](#examples)\r\n    - [Simple Example](#simple-button-events-example-using-javascript-and-plain-promises)\r\n    - [Multiple device management](#multiple-device-management-with-typescript-and-asyncawait)\r\n- [Sequence Diagrams](#sequence-diagrams)\r\n- [Setup VSCode](#setup-vsCode)\r\n    - [Windows](#windows)\r\n    - [Linux](#linux)\r\n- [Bug report](https://github.com/gnaudio/jabra-node-sdk#bug-reports)\r\n- [Changelog](https://github.com/gnaudio/jabra-node-sdk/blob/master/CHANGELOG.md)\r\n- [License](https://github.com/gnaudio/jabra-node-sdk/blob/master/LICENSE.md)\r\n- [FAQ](https://github.com/gnaudio/jabra-node-sdk/blob/master/FAQ.md)\r\n\r\n## Versions\r\n\r\n[![npm version](https://badge.fury.io/js/%40gnaudio%2Fjabra-node-sdk.svg)](https://badge.fury.io/js/%40gnaudio%2Fjabra-node-sdk)\r\n\r\nLatest **STABLE** release is  [distributed on npmjs.com](https://www.npmjs.com/package/@gnaudio/jabra-node-sdk/v/3.1.0) (see [changelog](https://github.com/gnaudio/jabra-node-sdk/blob/master/CHANGELOG.md) for changes and notable defects). \r\n\r\nIn addition, **BETA** versions may be available on npmjs with a version name ending with \"-beta.X\" specifier. For such BETA versions,the following applies:\r\n\r\n    > Disclaimer for Alpha and Beta Software Release\r\n\r\n    > Please note that this is a copyrighted Jabra Product ((c) 2017 GN Audio A/S) (the “Product”) which is still undergoing final testing before its official release. The Product and all content found on it are provided on an “as is” and “as available” basis. Jabra does not provide any warranties, neither express nor implied, as to the suitability or usability of the Product or any of its content.\r\n\r\n    > Jabra disclaims liability for any loss, whether direct, indirect, special or consequential, suffered by any person as a result of their use of the Product or the software embedded, and for any claim arising from any injury or damage, including but not limited to, any personal or bodily injury or tangible property damage, arising from or resulting in any way from any alleged defects in the material, workmanship, or performance of the Product, and Company shall indemnify Jabra in respect of any such claims. All usage of the Product is at users’ own risk and the user will be solely responsible for any resulting from such activities.\r\n\r\n    > Should you encounter any bugs, glitches, dangers, lack of functionality, lack of comfort or other problems with the Product, please let us know immediately so we can rectify these accordingly. Your help in this regard is greatly appreciated.\r\n\r\n    > The Product is released solely for test use in Company’s organization and must not under any circumstances be distributed to third parties without prior written acceptance from Jabra.\r\n\r\n    > By using the software, I accept and acknowledge the content herein.`\r\n\r\n## Pre-requisite\r\n1. Node.js v8.x or later.\r\n2. **On MacOS:** `xcode` & `python 2.7`. By default, Python is installed on macOS but make sure correct version(2.7.x) is installed. Install Xcode from App store or download it from [here](https://developer.apple.com/xcode/download/).\r\n3. **On Windows:** `Visual C++ Build Tools` & `Python 2.7`. You can install all of these by following any of the below mentioned steps.\r\n\r\n    3.1. **During Node.js installation** By ticking the checkbox when prompted during Node.js installation for `Tools for Native modules`, this installs both `Visual C++ Build Tools` & `Python 2.7`. **Note** This is prompted only for Windows platform. For other platforms like Linux or MAC, C++ compilation tools has to be installed separately as mentioned in other steps.\r\n\r\n    3.2. Both `Visual C++ Build Tools` & `Python 2.7` can also be installed using command `npm install --global --production --add-python-to-path windows-build-tools`. To know more about this tool, see [this link.](https://github.com/felixrieseberg/windows-build-tools). **Note** For executing this command through `Windows Command Prompt` or `Windows PowerShell`, they should be ran in Administrator mode.\r\n4. **On Linux:** `build-essential` package for C++ compilation & `Python 2.7`.\r\n\r\n    4.1. **Udev rules:** To be able to communicate with Jabra devices with non-root privileges it is required to create a udev rule for Jabra devices. Place the udev rule in `/etc/udev/rules.d`, and follow naming guidelines for udev files.              \r\n    \r\n    **Example:** The file name should be something like `80-jabra.rules` where the number before the dash indicates in what order the system reads the rules (e.g. if you had another rules file called `70-someotherrule.rules`, it would read that one first), the word after the dash is just an identifier of sorts (it could be something other than jabra) and the extension must be `.rules`.\r\n\r\n    The contents of the file are:\r\n\r\n    `ATTRS{idVendor}==\"0b0e\", MODE=\"0666\", GROUP=\"users\"`\r\n\r\n    After creating the udev file (as root), reload the udev rules using:\r\n\r\n    `sudo udevadm control --reload`\r\n\r\n    Reattach your Jabra device in order to get new permissions assigned.\r\n\r\n5. **All Platforms:** `node-gyp`. You can install this using command `npm install -g node-gyp`. To know more about this, see [this link](https://www.npmjs.com/package/node-gyp)\r\n\r\n6. **For Electron.JS:** If you are using `asar` packaging then you may need to `unpack` some of the resources used in this module. These resources are native library files i.e `libjabra.dll`, `libjabra.dylib` & `libjabra.so`, which is stored in a `build\\Release` folder. By default latest electron builder will automatically unpack, but if it does not work then you can provide below option to your build process. To know more, see [this link](https://www.electron.build/configuration/configuration)\r\n\r\n    ```\r\n    \"build\": {\r\n        \"asarUnpack\": [\"node_modules/@gnaudio/jabra-node-sdk\"]\r\n    }\r\n    ```\r\n\r\n## Installation\r\nThis release is published to [npm](https://www.npmjs.com/package/@gnaudio/jabra-node-sdk) and can be installed via below command.\r\n```\r\nnpm install --save @gnaudio/jabra-node-sdk\r\n```\r\n\r\n## Debugging and Logging\r\nBelow environment variables are defined for logging and debugging purpose. User can change the values as per preference.\r\n\r\nEnvironment Variable | Value | Description\r\n--- | --- | ---\r\nLIBJABRA_TRACE_LEVEL | fatal, error, warning(default), info, debug | Log levels\r\nLIBJABRA_RESOURCE_PATH | **On Mac:** ~/Library/Application Support/JabraSDK/ **On Windows:** %appdata%/Roaming/JabraSDK  | This determine the system path where logs and device related files are written.\r\n\r\n## API Reference\r\nAPI doc is in html format. See doc folder inside installed module `node_modules\\@gnaudio\\jabra-node-sdk\\dist\\doc` and open `index.html`.\r\n\r\n## Examples\r\n\r\nFor all examples, user should first register the app on [Jabra developer site](https://developer.jabra.com/) to get appID. User should pass this appID to `createJabraApplication` in order to initialize the jabra module:\r\n\r\n### Simple button events example using javascript and plain promises\r\n\r\n```javascript\r\nconst j = require(\"@gnaudio/jabra-node-sdk\");\r\nj.createJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        console.log('Press any key on Jabra device ' + device.deviceName);\r\n        \r\n        device.on('btnPress', (btnType, btnValue) => {\r\n          console.log('New input from device is received: ', j.enumDeviceBtnType[btnType], btnValue);\r\n        });\r\n    });    \r\n});\r\n```\r\n\r\n### Simple button events example using typescript and plain promises\r\n\r\n```typescript\r\nimport { createJabraApplication, enumDeviceBtnType, enumHidState } from '@gnaudio/jabra-node-sdk';\r\ncreateJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        console.log('Press any key on Jabra device ' + device.deviceName);\r\n\r\n        device.on('btnPress', (btnType, btnValue) => {\r\n          console.log('New input from device is received: ', enumDeviceBtnType[btnType], btnValue);\r\n        });\r\n    });    \r\n});\r\n```\r\n\r\n### Ring example using typescript and plain promises\r\nThis example shows how to ring a Jabra device\r\n\r\n```typescript\r\nimport { createJabraApplication, JabraError } from '@gnaudio/jabra-node-sdk';\r\n\r\ncreateJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        device.isRingerSupportedAsync().then( (supported) => {\r\n            if (supported) {\r\n              device.ringAsync().then ( () => {\r\n                console.log('ringing');\r\n              }).catch ((err: JabraError) => {\r\n                console.log('ring failed with error ' + err);\r\n              }); // ring the device\r\n              setTimeout(() => {\r\n                device.unringAsync().then(() => {\r\n                    console.log('stopped ringing');\r\n                }).catch ((err: JabraError) => {\r\n                    console.log('unring failed with error ' + err);\r\n                });\r\n              }, 5000); // stop ringing the device after 5 second\r\n            }          \r\n        }).catch( (err: JabraError) => {\r\n            console.error('Jabra call failed with error ' + err)\r\n        });\r\n    });\r\n    \r\n    jabra.on('detach', (device) => {\r\n        console.log('Device detached with deviceID:', device.deviceID);\r\n\r\n        // In this demo example, we will auto shutdown once all jabra devices are removed:\r\n        let remainingAttachedDevices = jabra.getAttachedDevices();\r\n        if (remainingAttachedDevices.length == 0) {\r\n            jabra.disposeAsync().then (() => {}); // Cleanup and allow node process to exit.\r\n        }\r\n    });\r\n});\r\n```\r\n\r\n### Multiple device management with typescript and async/await\r\n\r\n```typescript\r\nimport { createJabraApplication } from '@gnaudio/jabra-node-sdk';\r\n\r\n(async () => {\r\n    let jabra = await createJabraApplication('123'); // 123 is appID here\r\n\r\n    await jabra.scanForDevicesDoneAsync(); // Wait for all pre-attached devices to be scanned.\r\n\r\n    const deviceInstanceList = jabra.getAttachedDevices();\r\n    if (deviceInstanceList.length<2) {\r\n        throw new Error('Please make sure 2 jabra devices are attached');\r\n    }\r\n\r\n    const firstDevice = deviceInstanceList[0];\r\n    await firstDevice.ringAsync();\r\n\r\n    const secondDevice = deviceInstanceList[1];\r\n    await secondDevice.ringAsync();\r\n\r\n    // Dispose jabra sdk to enable node process to shutdown.\r\n    await jabra.disposeAsync();\r\n})();\r\n```\r\n\r\n## Sequence diagrams\r\n\r\nThese sequence diagrams shows typical use of the Node.js sdk:\r\n\r\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/outgoing-call-then-end-call.png)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/incoming-call-then-accept-on-device-then-end-call.png)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/incoming-call-then-user-rejects.png)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/mute-unmute-from-device.png)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/hold-resume-from-device.png)\r\n\r\n## Setup VSCode\r\n\r\nThe project includes config files for debugging typescript and C++ source files\r\nin [Visual Studio Code](https://code.visualstudio.com/) via the\r\n[C++ extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools),\r\nfor both Windows and Linux. The configuration files work without any\r\nmodification, provided that you set up your environment first, by installing\r\nthe necessary tools and defining some environment variable.\r\n\r\nTo debug a C++ file, open a typescript file referencing the C++ file and start\r\nthe debugger (Running the debugger on C++ files directly won't work). Make sure\r\nthe \"Run\"-dropdown at the top of the debugging-sidebar is set to \"Current TS\r\nFile - native code only (&lt;your operating system&gt;)\"\r\n\r\nBelow, the setup steps for Windows and Linux.\r\n\r\n### Windows\r\nYou can more or less follow the instruction in\r\n[the VSCode C++ extension guide](https://code.visualstudio.com/docs/cpp/config-msvc).\r\nThen, you need to make sure all project [pre-requisites](#pre-requisite) are\r\ninstalled correctly, and finally set the following environment variables:\r\n\r\nEnvironment Variable | Value | Description\r\n--- | --- | ---\r\nLIBJABRA_WIN_NODE_GYP_CACHE_PATH | eg. %appdata%\\Local\\node-gyp\\Cache\\12.16.3\\include\\node | Used by the C/C++ extension to resolve include paths\r\nLIBJABRA_WIN_CPP_COMPILER_PATH | eg. C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x64/cl.exe | Used by the C/C++ extension to infer the path to the C++ standard library header files\r\n\r\n\r\n### Linux\r\nYou can read a more detailed guide on\r\n[the VSCode C++ extension page](https://code.visualstudio.com/docs/cpp/config-linux).\r\nThe important part is to install a C++ compiler and debugger. The easiest way\r\nis to install `build-essential` and `gdb`, this way:\r\n\r\n```sh\r\nsudo apt-get install build-essential gdb\r\n```\r\n\r\nThis maks your C++ compiler GCC, and you would likely use the `g++` command to\r\ncompile.\r\n\r\nThen, you need to install the project [pre-requisites](#pre-requisite), and\r\nfinally export the following environment variables:\r\n\r\nEnvironment Variable | Likely value | Description\r\n--- | --- | ---\r\nJABRA_NODESDK_CPP_COMPILER_PATH | /usr/bin/g++ | Used by the C/C++ extension to infer the path to the C++ standard library header files\r\nJABRA_NODESDK_NODE_GYP_CACHE_PATH | $HOME/.cache/node-gyp/14.4.0 | Used by the C/C++ extension to resolve include paths. **NOTE**: The final `include/node` is added by the configuration and it's not necessary\r\n","gypfile":true,"scripts":{"doc":"typedoc --mode file --excludePrivate --excludeExternals --excludeNotExported --out dist/doc src/main","tsc":"tsc","build":"npm run build:dev","clean":"node-gyp clean && rimraf dist","install":"node-gyp rebuild","prepare":"npm run tsc && npm run doc && node dist/script/generatemeta.js","build:dev":"node-gyp rebuild --debug && npm run tsc && npm run generatemeta","manualtest":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/manualtest/misc.ts","generatemeta":"ts-node src/script/generatemeta.ts","build:release":"node-gyp rebuild && npm run tsc && npm run generatemeta","example-btn-press-js":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/examples/button-press.js","example-btn-press-ts":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/examples/button-press.ts","example-ringer-sequence":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/examples/ringer-sequence.ts","pipeline-build-setversion":"node setversion.js"},"_npmUser":{"name":"theisjabra","email":"tfroehlich@jabra.com"},"devEngines":{"npm":">=5.5.1","node":">=10.0.0"},"repository":{"url":"git+https://github.com/gnaudio/jabra-node-sdk.git","type":"git","directory":"nodesdk"},"_npmVersion":"6.14.8","description":"NodeJS SDK for Jabra Devices","directories":{},"_nodeVersion":"14.13.0","dependencies":{"bindings":"1.5.0","node-addon-api":"1.7.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"rimraf":"3.0.2","ts-node":"8.8.2","typedoc":"0.17.4","cross-env":"7.0.2","typescript":"3.8.3","@types/node":"13.11.1","@types/bindings":"1.3.0","replace-in-file":"5.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jabra-node-sdk_3.2.1-beta.3_1606465920838_0.46477838750983835","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"3.2.1-beta.4":{"name":"@gnaudio/jabra-node-sdk","version":"3.2.1-beta.4","keywords":["jabra","sdk"],"author":{"name":"GN Audio"},"license":"MIT","_id":"@gnaudio/jabra-node-sdk@3.2.1-beta.4","maintainers":[{"name":"thammond","email":"thammond@jabra.com"},{"name":"ifmladenov","email":"ifmladenov@jabra.com"},{"name":"sanchen","email":"sanchen@jabra.com"},{"name":"dlaezza-jabra","email":"dlaezza@jabra.com"},{"name":"theisjabra","email":"tfroehlich@jabra.com"},{"name":"sskjabra","email":"sklausen@jabra.com"},{"name":"daniel_vasile_42","email":"fvasile@jabra.com"},{"name":"frederiksen","email":"mrtn.frederiksen@gmail.com"}],"homepage":"https://github.com/gnaudio/jabra-node-sdk/","bugs":{"url":"https://developer.jabra.com"},"dist":{"shasum":"a91650e0fde0178b2b5357aabcd4018b800e5eb8","tarball":"https://registry.npmjs.org/@gnaudio/jabra-node-sdk/-/jabra-node-sdk-3.2.1-beta.4.tgz","fileCount":156,"integrity":"sha512-emVoqidOPPsXNhftrjihLtu0S5NYbKHkXGphPullrWfkuX2UbbmY/VZdnj7940yrFuxANyJUvcSV47fsR9ztfA==","signatures":[{"sig":"MEUCIQDQ7y+qvzP8Pk1xZcaIUL7dTk+ATMqpOGnwtTgz4f3SrQIgaMDb2jdQ2TC+HunzHcZYo/v2xAS67ukKNsH9vmHtnfc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":13446791,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfyKFrCRA9TVsSAnZWagAAWuAP/1y5DxgvOVBo+SA5NwmX\nXfwPcuFQu1TjP8APEJoRMzJbirLehMUY+LV64BcNFIY+xdqhv2HqLeSFpwaB\nBIgk3JmlB8JvImsUSKsIv8YCOUJENMeIb1nmifH6wlq6+mUnwyft0vqEWeZW\nkUK7eqMNckUtNLkD9kc/POb+ot9J/ZgH4A1WXCgFk7jaKs0+RwezLrmohGlT\ntBSt8zFlQbSLtiomy+tTVP6Q6vGD6zeiYkPeEDlLyc8pVCAhi9AnbgsGij2X\n84dr0fioqJrNHQgMlP5k/MMmuntuKYAO8KBgY0FNTeg0/pgNiBvXNCGk2i5k\nyswCgMeUe7I4ecT39+LDCbJ9bokY4kI6oPB+hhm0Ew0ILX9pvRhMc9nc3M6O\namVezhfP0/FITAlgPjlL0h4WzjngcgJD1u2w0rOhKVBAPL6glJ/B4NuchKfm\ntV11haDiDOOQu73GD4LbtD6FhMMLSI1qlueUMFyRKvuvxBjb+TZRNUnDSPZE\nzodgUNq/WcNwEyUA3yCEOsdJCCq+UIDu8h3kkmeVcjE7gbRAiQoHXGN3ABLZ\nKCcjMQAM+YscFcTzHllABHnT6YVIyPIfEYsIYjFCqkqJpWC6DwZCpufWOm5s\ndq6vYWYIY3C8qqdpoJ0H4yKsphaNoIM9rq3DEVAl3s4PBTj/6bCCHXGjlqgH\nGilg\r\n=l93D\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/main/index.js","types":"dist/main/index.d.ts","readme":"Jabra Node.js SDK\r\n\r\n# Table of Contents\r\n- [Versions](#versions)\r\n- [Pre-requisite](#pre-requisite)\r\n- [Installation](#installation)\r\n- [Debugging and Logging](#debugging-and-logging)\r\n- [API Reference](#api-reference)\r\n- [Examples](#examples)\r\n    - [Simple Example](#simple-button-events-example-using-javascript-and-plain-promises)\r\n    - [Multiple device management](#multiple-device-management-with-typescript-and-asyncawait)\r\n- [Sequence Diagrams](#sequence-diagrams)\r\n- [Setup VSCode](#setup-vsCode)\r\n    - [Windows](#windows)\r\n    - [Linux](#linux)\r\n- [Bug report](https://github.com/gnaudio/jabra-node-sdk#bug-reports)\r\n- [Changelog](https://github.com/gnaudio/jabra-node-sdk/blob/master/CHANGELOG.md)\r\n- [License](https://github.com/gnaudio/jabra-node-sdk/blob/master/LICENSE.md)\r\n- [FAQ](https://github.com/gnaudio/jabra-node-sdk/blob/master/FAQ.md)\r\n\r\n## Versions\r\n\r\n[![npm version](https://badge.fury.io/js/%40gnaudio%2Fjabra-node-sdk.svg)](https://badge.fury.io/js/%40gnaudio%2Fjabra-node-sdk)\r\n\r\nLatest **STABLE** release is  [distributed on npmjs.com](https://www.npmjs.com/package/@gnaudio/jabra-node-sdk/v/3.1.0) (see [changelog](https://github.com/gnaudio/jabra-node-sdk/blob/master/CHANGELOG.md) for changes and notable defects). \r\n\r\nIn addition, **BETA** versions may be available on npmjs with a version name ending with \"-beta.X\" specifier. For such BETA versions,the following applies:\r\n\r\n    > Disclaimer for Alpha and Beta Software Release\r\n\r\n    > Please note that this is a copyrighted Jabra Product ((c) 2017 GN Audio A/S) (the “Product”) which is still undergoing final testing before its official release. The Product and all content found on it are provided on an “as is” and “as available” basis. Jabra does not provide any warranties, neither express nor implied, as to the suitability or usability of the Product or any of its content.\r\n\r\n    > Jabra disclaims liability for any loss, whether direct, indirect, special or consequential, suffered by any person as a result of their use of the Product or the software embedded, and for any claim arising from any injury or damage, including but not limited to, any personal or bodily injury or tangible property damage, arising from or resulting in any way from any alleged defects in the material, workmanship, or performance of the Product, and Company shall indemnify Jabra in respect of any such claims. All usage of the Product is at users’ own risk and the user will be solely responsible for any resulting from such activities.\r\n\r\n    > Should you encounter any bugs, glitches, dangers, lack of functionality, lack of comfort or other problems with the Product, please let us know immediately so we can rectify these accordingly. Your help in this regard is greatly appreciated.\r\n\r\n    > The Product is released solely for test use in Company’s organization and must not under any circumstances be distributed to third parties without prior written acceptance from Jabra.\r\n\r\n    > By using the software, I accept and acknowledge the content herein.`\r\n\r\n## Pre-requisite\r\n1. Node.js v8.x or later.\r\n2. **On MacOS:** `xcode` & `python 2.7`. By default, Python is installed on macOS but make sure correct version(2.7.x) is installed. Install Xcode from App store or download it from [here](https://developer.apple.com/xcode/download/).\r\n3. **On Windows:** `Visual C++ Build Tools` & `Python 2.7`. You can install all of these by following any of the below mentioned steps.\r\n\r\n    3.1. **During Node.js installation** By ticking the checkbox when prompted during Node.js installation for `Tools for Native modules`, this installs both `Visual C++ Build Tools` & `Python 2.7`. **Note** This is prompted only for Windows platform. For other platforms like Linux or MAC, C++ compilation tools has to be installed separately as mentioned in other steps.\r\n\r\n    3.2. Both `Visual C++ Build Tools` & `Python 2.7` can also be installed using command `npm install --global --production --add-python-to-path windows-build-tools`. To know more about this tool, see [this link.](https://github.com/felixrieseberg/windows-build-tools). **Note** For executing this command through `Windows Command Prompt` or `Windows PowerShell`, they should be ran in Administrator mode.\r\n4. **On Linux:** `build-essential` package for C++ compilation & `Python 2.7`.\r\n\r\n    4.1. **Udev rules:** To be able to communicate with Jabra devices with non-root privileges it is required to create a udev rule for Jabra devices. Place the udev rule in `/etc/udev/rules.d`, and follow naming guidelines for udev files.              \r\n    \r\n    **Example:** The file name should be something like `80-jabra.rules` where the number before the dash indicates in what order the system reads the rules (e.g. if you had another rules file called `70-someotherrule.rules`, it would read that one first), the word after the dash is just an identifier of sorts (it could be something other than jabra) and the extension must be `.rules`.\r\n\r\n    The contents of the file are:\r\n\r\n    `ATTRS{idVendor}==\"0b0e\", MODE=\"0666\", GROUP=\"users\"`\r\n\r\n    After creating the udev file (as root), reload the udev rules using:\r\n\r\n    `sudo udevadm control --reload`\r\n\r\n    Reattach your Jabra device in order to get new permissions assigned.\r\n\r\n5. **All Platforms:** `node-gyp`. You can install this using command `npm install -g node-gyp`. To know more about this, see [this link](https://www.npmjs.com/package/node-gyp)\r\n\r\n6. **For Electron.JS:** If you are using `asar` packaging then you may need to `unpack` some of the resources used in this module. These resources are native library files i.e `libjabra.dll`, `libjabra.dylib` & `libjabra.so`, which is stored in a `build\\Release` folder. By default latest electron builder will automatically unpack, but if it does not work then you can provide below option to your build process. To know more, see [this link](https://www.electron.build/configuration/configuration)\r\n\r\n    ```\r\n    \"build\": {\r\n        \"asarUnpack\": [\"node_modules/@gnaudio/jabra-node-sdk\"]\r\n    }\r\n    ```\r\n\r\n## Installation\r\nThis release is published to [npm](https://www.npmjs.com/package/@gnaudio/jabra-node-sdk) and can be installed via below command.\r\n```\r\nnpm install --save @gnaudio/jabra-node-sdk\r\n```\r\n\r\n## Debugging and Logging\r\nBelow environment variables are defined for logging and debugging purpose. User can change the values as per preference.\r\n\r\nEnvironment Variable | Value | Description\r\n--- | --- | ---\r\nLIBJABRA_TRACE_LEVEL | fatal, error, warning(default), info, debug | Log levels\r\nLIBJABRA_RESOURCE_PATH | **On Mac:** ~/Library/Application Support/JabraSDK/ **On Windows:** %appdata%/Roaming/JabraSDK  | This determine the system path where logs and device related files are written.\r\n\r\n## API Reference\r\nAPI doc is in html format. See doc folder inside installed module `node_modules\\@gnaudio\\jabra-node-sdk\\dist\\doc` and open `index.html`.\r\n\r\n## Examples\r\n\r\nFor all examples, user should first register the app on [Jabra developer site](https://developer.jabra.com/) to get appID. User should pass this appID to `createJabraApplication` in order to initialize the jabra module:\r\n\r\n### Simple button events example using javascript and plain promises\r\n\r\n```javascript\r\nconst j = require(\"@gnaudio/jabra-node-sdk\");\r\nj.createJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        console.log('Press any key on Jabra device ' + device.deviceName);\r\n        \r\n        device.on('btnPress', (btnType, btnValue) => {\r\n          console.log('New input from device is received: ', j.enumDeviceBtnType[btnType], btnValue);\r\n        });\r\n    });    \r\n});\r\n```\r\n\r\n### Simple button events example using typescript and plain promises\r\n\r\n```typescript\r\nimport { createJabraApplication, enumDeviceBtnType, enumHidState } from '@gnaudio/jabra-node-sdk';\r\ncreateJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        console.log('Press any key on Jabra device ' + device.deviceName);\r\n\r\n        device.on('btnPress', (btnType, btnValue) => {\r\n          console.log('New input from device is received: ', enumDeviceBtnType[btnType], btnValue);\r\n        });\r\n    });    \r\n});\r\n```\r\n\r\n### Ring example using typescript and plain promises\r\nThis example shows how to ring a Jabra device\r\n\r\n```typescript\r\nimport { createJabraApplication, JabraError } from '@gnaudio/jabra-node-sdk';\r\n\r\ncreateJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        device.isRingerSupportedAsync().then( (supported) => {\r\n            if (supported) {\r\n              device.ringAsync().then ( () => {\r\n                console.log('ringing');\r\n              }).catch ((err: JabraError) => {\r\n                console.log('ring failed with error ' + err);\r\n              }); // ring the device\r\n              setTimeout(() => {\r\n                device.unringAsync().then(() => {\r\n                    console.log('stopped ringing');\r\n                }).catch ((err: JabraError) => {\r\n                    console.log('unring failed with error ' + err);\r\n                });\r\n              }, 5000); // stop ringing the device after 5 second\r\n            }          \r\n        }).catch( (err: JabraError) => {\r\n            console.error('Jabra call failed with error ' + err)\r\n        });\r\n    });\r\n    \r\n    jabra.on('detach', (device) => {\r\n        console.log('Device detached with deviceID:', device.deviceID);\r\n\r\n        // In this demo example, we will auto shutdown once all jabra devices are removed:\r\n        let remainingAttachedDevices = jabra.getAttachedDevices();\r\n        if (remainingAttachedDevices.length == 0) {\r\n            jabra.disposeAsync().then (() => {}); // Cleanup and allow node process to exit.\r\n        }\r\n    });\r\n});\r\n```\r\n\r\n### Multiple device management with typescript and async/await\r\n\r\n```typescript\r\nimport { createJabraApplication } from '@gnaudio/jabra-node-sdk';\r\n\r\n(async () => {\r\n    let jabra = await createJabraApplication('123'); // 123 is appID here\r\n\r\n    await jabra.scanForDevicesDoneAsync(); // Wait for all pre-attached devices to be scanned.\r\n\r\n    const deviceInstanceList = jabra.getAttachedDevices();\r\n    if (deviceInstanceList.length<2) {\r\n        throw new Error('Please make sure 2 jabra devices are attached');\r\n    }\r\n\r\n    const firstDevice = deviceInstanceList[0];\r\n    await firstDevice.ringAsync();\r\n\r\n    const secondDevice = deviceInstanceList[1];\r\n    await secondDevice.ringAsync();\r\n\r\n    // Dispose jabra sdk to enable node process to shutdown.\r\n    await jabra.disposeAsync();\r\n})();\r\n```\r\n\r\n## Sequence diagrams\r\n\r\nThese sequence diagrams shows typical use of the Node.js sdk:\r\n\r\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/outgoing-call-then-end-call.png)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/incoming-call-then-accept-on-device-then-end-call.png)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/incoming-call-then-user-rejects.png)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/mute-unmute-from-device.png)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/hold-resume-from-device.png)\r\n\r\n## Setup VSCode\r\n\r\nThe project includes config files for debugging typescript and C++ source files\r\nin [Visual Studio Code](https://code.visualstudio.com/) via the\r\n[C++ extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools),\r\nfor both Windows and Linux. The configuration files work without any\r\nmodification, provided that you set up your environment first, by installing\r\nthe necessary tools and defining some environment variable.\r\n\r\nTo debug a C++ file, open a typescript file referencing the C++ file and start\r\nthe debugger (Running the debugger on C++ files directly won't work). Make sure\r\nthe \"Run\"-dropdown at the top of the debugging-sidebar is set to \"Current TS\r\nFile - native code only (&lt;your operating system&gt;)\"\r\n\r\nBelow, the setup steps for Windows and Linux.\r\n\r\n### Windows\r\nYou can more or less follow the instruction in\r\n[the VSCode C++ extension guide](https://code.visualstudio.com/docs/cpp/config-msvc).\r\nThen, you need to make sure all project [pre-requisites](#pre-requisite) are\r\ninstalled correctly, and finally set the following environment variables:\r\n\r\nEnvironment Variable | Value | Description\r\n--- | --- | ---\r\nLIBJABRA_WIN_NODE_GYP_CACHE_PATH | eg. %appdata%\\Local\\node-gyp\\Cache\\12.16.3\\include\\node | Used by the C/C++ extension to resolve include paths\r\nLIBJABRA_WIN_CPP_COMPILER_PATH | eg. C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x64/cl.exe | Used by the C/C++ extension to infer the path to the C++ standard library header files\r\n\r\n\r\n### Linux\r\nYou can read a more detailed guide on\r\n[the VSCode C++ extension page](https://code.visualstudio.com/docs/cpp/config-linux).\r\nThe important part is to install a C++ compiler and debugger. The easiest way\r\nis to install `build-essential` and `gdb`, this way:\r\n\r\n```sh\r\nsudo apt-get install build-essential gdb\r\n```\r\n\r\nThis maks your C++ compiler GCC, and you would likely use the `g++` command to\r\ncompile.\r\n\r\nThen, you need to install the project [pre-requisites](#pre-requisite), and\r\nfinally export the following environment variables:\r\n\r\nEnvironment Variable | Likely value | Description\r\n--- | --- | ---\r\nJABRA_NODESDK_CPP_COMPILER_PATH | /usr/bin/g++ | Used by the C/C++ extension to infer the path to the C++ standard library header files\r\nJABRA_NODESDK_NODE_GYP_CACHE_PATH | $HOME/.cache/node-gyp/14.4.0 | Used by the C/C++ extension to resolve include paths. **NOTE**: The final `include/node` is added by the configuration and it's not necessary\r\n","gypfile":true,"scripts":{"doc":"typedoc --mode file --excludePrivate --excludeExternals --excludeNotExported --out dist/doc src/main","tsc":"tsc","build":"npm run build:dev","clean":"node-gyp clean && rimraf dist","install":"node-gyp rebuild","prepare":"npm run tsc && npm run doc && node dist/script/generatemeta.js","build:dev":"node-gyp rebuild --debug && npm run tsc && npm run generatemeta","manualtest":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/manualtest/misc.ts","generatemeta":"ts-node src/script/generatemeta.ts","build:release":"node-gyp rebuild && npm run tsc && npm run generatemeta","example-btn-press-js":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/examples/button-press.js","example-btn-press-ts":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/examples/button-press.ts","example-ringer-sequence":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/examples/ringer-sequence.ts","pipeline-build-setversion":"node setversion.js"},"_npmUser":{"name":"theisjabra","email":"tfroehlich@jabra.com"},"devEngines":{"npm":">=5.5.1","node":">=10.0.0"},"repository":{"url":"git+https://github.com/gnaudio/jabra-node-sdk.git","type":"git","directory":"nodesdk"},"_npmVersion":"6.14.8","description":"NodeJS SDK for Jabra Devices","directories":{},"_nodeVersion":"14.13.0","dependencies":{"bindings":"1.5.0","node-addon-api":"1.7.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"rimraf":"3.0.2","ts-node":"8.8.2","typedoc":"0.17.4","cross-env":"7.0.2","typescript":"3.8.3","@types/node":"13.11.1","@types/bindings":"1.3.0","replace-in-file":"5.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jabra-node-sdk_3.2.1-beta.4_1606984042756_0.32847596592320705","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"3.2.1-beta.5":{"name":"@gnaudio/jabra-node-sdk","version":"3.2.1-beta.5","keywords":["jabra","sdk"],"author":{"name":"GN Audio"},"license":"MIT","_id":"@gnaudio/jabra-node-sdk@3.2.1-beta.5","maintainers":[{"name":"thammond","email":"thammond@jabra.com"},{"name":"ifmladenov","email":"ifmladenov@jabra.com"},{"name":"sanchen","email":"sanchen@jabra.com"},{"name":"dlaezza-jabra","email":"dlaezza@jabra.com"},{"name":"theisjabra","email":"tfroehlich@jabra.com"},{"name":"sskjabra","email":"sklausen@jabra.com"},{"name":"daniel_vasile_42","email":"fvasile@jabra.com"},{"name":"frederiksen","email":"mrtn.frederiksen@gmail.com"}],"homepage":"https://github.com/gnaudio/jabra-node-sdk/","bugs":{"url":"https://developer.jabra.com"},"dist":{"shasum":"65955ed7c4523d436e363d432745d19770be1cc7","tarball":"https://registry.npmjs.org/@gnaudio/jabra-node-sdk/-/jabra-node-sdk-3.2.1-beta.5.tgz","fileCount":156,"integrity":"sha512-TSarmhbUVl8pywJbIaCyN1XFQ9KfBPUoRIAOC+jfcuTaE2zvsFev0fxyvGgTG4pNEmE5nW8EAafrniga2icp7Q==","signatures":[{"sig":"MEUCIQCgTF4aPi+nlSyFl/V9yITtoeG9+gQ7I9CV+p7dKi7AOQIgepZjtwQ5ukN9m+flUEm8Oq/TAttghN/PbJsx28FIbHg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14443626,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfyfyPCRA9TVsSAnZWagAA94kP/1s/Rsb9z6sy5VN0b1f2\n1fWIDQpHmZdbzP0wbC6vtbsqjRSXFvmy9IPLO40cbd6eL3SGPkZX3oZ1LFx/\nYLgk/W9VQh3VX6aWBhlVP5PKdP8gfOiIbj1ytTPqpwVZ/cG0/CN/JfC58D63\n5/xvPGeTAcWLj1ByVhmaQxwR0TM1MkCuhyP0AM3RiAsC3NzJjzx4Cdh7uauT\niSPsNdRbSJnO+hVHkEyhke5vl6LOW0vO/2cYCAN26GmpggwE3cnGs1thIcbZ\nnQaC5WwrdG7b8TdHgt/fXDaYMPOEeqNL4XxQqfcYVk6AZ/GdE/kP1tFcw8y2\nB9b7vBAn/KluiljQZGPbUnCbcd9iL5+RPFZfkPpXCbpV+RwopY2GYP/sartn\ni6/iowik/PBORRZ8B42NwM8neTEnDRn7H62ZuH+T9WpczrRfpmKldM1Qp7ux\nPayHe9Pl1mh4hj982MzelPer+/manwwgJIZY5mgCnhcP3JlciEAbyl0gskG8\nBPiDA8UDPClQ8/N9Lj1RP/s8GdKxMrEDxvAkhHbd0FfpNdeMSDvjBkBtk4gZ\nVfhDN2HJoil/pqYYSoWFdPIn0ns+C0UO3mCKlaRAwywg8B8n06yrKAryusdU\nmzwmsYLnSIV8W3E9g9ooe/BMT2CVQhiinNEXyfivIHcgeIu5+wFARdEzt7n0\niGKB\r\n=62I4\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/main/index.js","types":"dist/main/index.d.ts","readme":"Jabra Node.js SDK\r\n\r\n# Table of Contents\r\n- [Versions](#versions)\r\n- [Pre-requisite](#pre-requisite)\r\n- [Installation](#installation)\r\n- [Debugging and Logging](#debugging-and-logging)\r\n- [API Reference](#api-reference)\r\n- [Examples](#examples)\r\n    - [Simple Example](#simple-button-events-example-using-javascript-and-plain-promises)\r\n    - [Multiple device management](#multiple-device-management-with-typescript-and-asyncawait)\r\n- [Sequence Diagrams](#sequence-diagrams)\r\n- [Setup VSCode](#setup-vsCode)\r\n    - [Windows](#windows)\r\n    - [Linux](#linux)\r\n- [Bug report](https://github.com/gnaudio/jabra-node-sdk#bug-reports)\r\n- [Changelog](https://github.com/gnaudio/jabra-node-sdk/blob/master/CHANGELOG.md)\r\n- [License](https://github.com/gnaudio/jabra-node-sdk/blob/master/LICENSE.md)\r\n- [FAQ](https://github.com/gnaudio/jabra-node-sdk/blob/master/FAQ.md)\r\n\r\n## Versions\r\n\r\n[![npm version](https://badge.fury.io/js/%40gnaudio%2Fjabra-node-sdk.svg)](https://badge.fury.io/js/%40gnaudio%2Fjabra-node-sdk)\r\n\r\nLatest **STABLE** release is  [distributed on npmjs.com](https://www.npmjs.com/package/@gnaudio/jabra-node-sdk/v/3.1.0) (see [changelog](https://github.com/gnaudio/jabra-node-sdk/blob/master/CHANGELOG.md) for changes and notable defects). \r\n\r\nIn addition, **BETA** versions may be available on npmjs with a version name ending with \"-beta.X\" specifier. For such BETA versions,the following applies:\r\n\r\n    > Disclaimer for Alpha and Beta Software Release\r\n\r\n    > Please note that this is a copyrighted Jabra Product ((c) 2017 GN Audio A/S) (the “Product”) which is still undergoing final testing before its official release. The Product and all content found on it are provided on an “as is” and “as available” basis. Jabra does not provide any warranties, neither express nor implied, as to the suitability or usability of the Product or any of its content.\r\n\r\n    > Jabra disclaims liability for any loss, whether direct, indirect, special or consequential, suffered by any person as a result of their use of the Product or the software embedded, and for any claim arising from any injury or damage, including but not limited to, any personal or bodily injury or tangible property damage, arising from or resulting in any way from any alleged defects in the material, workmanship, or performance of the Product, and Company shall indemnify Jabra in respect of any such claims. All usage of the Product is at users’ own risk and the user will be solely responsible for any resulting from such activities.\r\n\r\n    > Should you encounter any bugs, glitches, dangers, lack of functionality, lack of comfort or other problems with the Product, please let us know immediately so we can rectify these accordingly. Your help in this regard is greatly appreciated.\r\n\r\n    > The Product is released solely for test use in Company’s organization and must not under any circumstances be distributed to third parties without prior written acceptance from Jabra.\r\n\r\n    > By using the software, I accept and acknowledge the content herein.`\r\n\r\n## Pre-requisite\r\n1. Node.js v8.x or later.\r\n2. **On MacOS:** `xcode` & `python 2.7`. By default, Python is installed on macOS but make sure correct version(2.7.x) is installed. Install Xcode from App store or download it from [here](https://developer.apple.com/xcode/download/).\r\n3. **On Windows:** `Visual C++ Build Tools` & `Python 2.7`. You can install all of these by following any of the below mentioned steps.\r\n\r\n    3.1. **During Node.js installation** By ticking the checkbox when prompted during Node.js installation for `Tools for Native modules`, this installs both `Visual C++ Build Tools` & `Python 2.7`. **Note** This is prompted only for Windows platform. For other platforms like Linux or MAC, C++ compilation tools has to be installed separately as mentioned in other steps.\r\n\r\n    3.2. Both `Visual C++ Build Tools` & `Python 2.7` can also be installed using command `npm install --global --production --add-python-to-path windows-build-tools`. To know more about this tool, see [this link.](https://github.com/felixrieseberg/windows-build-tools). **Note** For executing this command through `Windows Command Prompt` or `Windows PowerShell`, they should be ran in Administrator mode.\r\n4. **On Linux:** `build-essential` package for C++ compilation & `Python 2.7`.\r\n\r\n    4.1. **Udev rules:** To be able to communicate with Jabra devices with non-root privileges it is required to create a udev rule for Jabra devices. Place the udev rule in `/etc/udev/rules.d`, and follow naming guidelines for udev files.              \r\n    \r\n    **Example:** The file name should be something like `80-jabra.rules` where the number before the dash indicates in what order the system reads the rules (e.g. if you had another rules file called `70-someotherrule.rules`, it would read that one first), the word after the dash is just an identifier of sorts (it could be something other than jabra) and the extension must be `.rules`.\r\n\r\n    The contents of the file are:\r\n\r\n    `ATTRS{idVendor}==\"0b0e\", MODE=\"0666\", GROUP=\"users\"`\r\n\r\n    After creating the udev file (as root), reload the udev rules using:\r\n\r\n    `sudo udevadm control --reload`\r\n\r\n    Reattach your Jabra device in order to get new permissions assigned.\r\n\r\n5. **All Platforms:** `node-gyp`. You can install this using command `npm install -g node-gyp`. To know more about this, see [this link](https://www.npmjs.com/package/node-gyp)\r\n\r\n6. **For Electron.JS:** If you are using `asar` packaging then you may need to `unpack` some of the resources used in this module. These resources are native library files i.e `libjabra.dll`, `libjabra.dylib` & `libjabra.so`, which is stored in a `build\\Release` folder. By default latest electron builder will automatically unpack, but if it does not work then you can provide below option to your build process. To know more, see [this link](https://www.electron.build/configuration/configuration)\r\n\r\n    ```\r\n    \"build\": {\r\n        \"asarUnpack\": [\"node_modules/@gnaudio/jabra-node-sdk\"]\r\n    }\r\n    ```\r\n\r\n## Installation\r\nThis release is published to [npm](https://www.npmjs.com/package/@gnaudio/jabra-node-sdk) and can be installed via below command.\r\n```\r\nnpm install --save @gnaudio/jabra-node-sdk\r\n```\r\n\r\n## Debugging and Logging\r\nBelow environment variables are defined for logging and debugging purpose. User can change the values as per preference.\r\n\r\nEnvironment Variable | Value | Description\r\n--- | --- | ---\r\nLIBJABRA_TRACE_LEVEL | fatal, error, warning(default), info, debug | Log levels\r\nLIBJABRA_RESOURCE_PATH | **On Mac:** ~/Library/Application Support/JabraSDK/ **On Windows:** %appdata%/Roaming/JabraSDK  | This determine the system path where logs and device related files are written.\r\n\r\n## API Reference\r\nAPI doc is in html format. See doc folder inside installed module `node_modules\\@gnaudio\\jabra-node-sdk\\dist\\doc` and open `index.html`.\r\n\r\n## Examples\r\n\r\nFor all examples, user should first register the app on [Jabra developer site](https://developer.jabra.com/) to get appID. User should pass this appID to `createJabraApplication` in order to initialize the jabra module:\r\n\r\n### Simple button events example using javascript and plain promises\r\n\r\n```javascript\r\nconst j = require(\"@gnaudio/jabra-node-sdk\");\r\nj.createJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        console.log('Press any key on Jabra device ' + device.deviceName);\r\n        \r\n        device.on('btnPress', (btnType, btnValue) => {\r\n          console.log('New input from device is received: ', j.enumDeviceBtnType[btnType], btnValue);\r\n        });\r\n    });    \r\n});\r\n```\r\n\r\n### Simple button events example using typescript and plain promises\r\n\r\n```typescript\r\nimport { createJabraApplication, enumDeviceBtnType, enumHidState } from '@gnaudio/jabra-node-sdk';\r\ncreateJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        console.log('Press any key on Jabra device ' + device.deviceName);\r\n\r\n        device.on('btnPress', (btnType, btnValue) => {\r\n          console.log('New input from device is received: ', enumDeviceBtnType[btnType], btnValue);\r\n        });\r\n    });    \r\n});\r\n```\r\n\r\n### Ring example using typescript and plain promises\r\nThis example shows how to ring a Jabra device\r\n\r\n```typescript\r\nimport { createJabraApplication, JabraError } from '@gnaudio/jabra-node-sdk';\r\n\r\ncreateJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        device.isRingerSupportedAsync().then( (supported) => {\r\n            if (supported) {\r\n              device.ringAsync().then ( () => {\r\n                console.log('ringing');\r\n              }).catch ((err: JabraError) => {\r\n                console.log('ring failed with error ' + err);\r\n              }); // ring the device\r\n              setTimeout(() => {\r\n                device.unringAsync().then(() => {\r\n                    console.log('stopped ringing');\r\n                }).catch ((err: JabraError) => {\r\n                    console.log('unring failed with error ' + err);\r\n                });\r\n              }, 5000); // stop ringing the device after 5 second\r\n            }          \r\n        }).catch( (err: JabraError) => {\r\n            console.error('Jabra call failed with error ' + err)\r\n        });\r\n    });\r\n    \r\n    jabra.on('detach', (device) => {\r\n        console.log('Device detached with deviceID:', device.deviceID);\r\n\r\n        // In this demo example, we will auto shutdown once all jabra devices are removed:\r\n        let remainingAttachedDevices = jabra.getAttachedDevices();\r\n        if (remainingAttachedDevices.length == 0) {\r\n            jabra.disposeAsync().then (() => {}); // Cleanup and allow node process to exit.\r\n        }\r\n    });\r\n});\r\n```\r\n\r\n### Multiple device management with typescript and async/await\r\n\r\n```typescript\r\nimport { createJabraApplication } from '@gnaudio/jabra-node-sdk';\r\n\r\n(async () => {\r\n    let jabra = await createJabraApplication('123'); // 123 is appID here\r\n\r\n    await jabra.scanForDevicesDoneAsync(); // Wait for all pre-attached devices to be scanned.\r\n\r\n    const deviceInstanceList = jabra.getAttachedDevices();\r\n    if (deviceInstanceList.length<2) {\r\n        throw new Error('Please make sure 2 jabra devices are attached');\r\n    }\r\n\r\n    const firstDevice = deviceInstanceList[0];\r\n    await firstDevice.ringAsync();\r\n\r\n    const secondDevice = deviceInstanceList[1];\r\n    await secondDevice.ringAsync();\r\n\r\n    // Dispose jabra sdk to enable node process to shutdown.\r\n    await jabra.disposeAsync();\r\n})();\r\n```\r\n\r\n## Sequence diagrams\r\n\r\nThese sequence diagrams shows typical use of the Node.js sdk:\r\n\r\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/outgoing-call-then-end-call.png)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/incoming-call-then-accept-on-device-then-end-call.png)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/incoming-call-then-user-rejects.png)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/mute-unmute-from-device.png)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/gnaudio.github.io/raw/master/jabra-node-sdk/docs/hold-resume-from-device.png)\r\n\r\n## Setup VSCode\r\n\r\nThe project includes config files for debugging typescript and C++ source files\r\nin [Visual Studio Code](https://code.visualstudio.com/) via the\r\n[C++ extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools),\r\nfor both Windows and Linux. The configuration files work without any\r\nmodification, provided that you set up your environment first, by installing\r\nthe necessary tools and defining some environment variable.\r\n\r\nTo debug a C++ file, open a typescript file referencing the C++ file and start\r\nthe debugger (Running the debugger on C++ files directly won't work). Make sure\r\nthe \"Run\"-dropdown at the top of the debugging-sidebar is set to \"Current TS\r\nFile - native code only (&lt;your operating system&gt;)\"\r\n\r\nBelow, the setup steps for Windows and Linux.\r\n\r\n### Windows\r\nYou can more or less follow the instruction in\r\n[the VSCode C++ extension guide](https://code.visualstudio.com/docs/cpp/config-msvc).\r\nThen, you need to make sure all project [pre-requisites](#pre-requisite) are\r\ninstalled correctly, and finally set the following environment variables:\r\n\r\nEnvironment Variable | Value | Description\r\n--- | --- | ---\r\nLIBJABRA_WIN_NODE_GYP_CACHE_PATH | eg. %appdata%\\Local\\node-gyp\\Cache\\12.16.3\\include\\node | Used by the C/C++ extension to resolve include paths\r\nLIBJABRA_WIN_CPP_COMPILER_PATH | eg. C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x64/cl.exe | Used by the C/C++ extension to infer the path to the C++ standard library header files\r\n\r\n\r\n### Linux\r\nYou can read a more detailed guide on\r\n[the VSCode C++ extension page](https://code.visualstudio.com/docs/cpp/config-linux).\r\nThe important part is to install a C++ compiler and debugger. The easiest way\r\nis to install `build-essential` and `gdb`, this way:\r\n\r\n```sh\r\nsudo apt-get install build-essential gdb\r\n```\r\n\r\nThis maks your C++ compiler GCC, and you would likely use the `g++` command to\r\ncompile.\r\n\r\nThen, you need to install the project [pre-requisites](#pre-requisite), and\r\nfinally export the following environment variables:\r\n\r\nEnvironment Variable | Likely value | Description\r\n--- | --- | ---\r\nJABRA_NODESDK_CPP_COMPILER_PATH | /usr/bin/g++ | Used by the C/C++ extension to infer the path to the C++ standard library header files\r\nJABRA_NODESDK_NODE_GYP_CACHE_PATH | $HOME/.cache/node-gyp/14.4.0 | Used by the C/C++ extension to resolve include paths. **NOTE**: The final `include/node` is added by the configuration and it's not necessary\r\n","gypfile":true,"scripts":{"doc":"typedoc --mode file --excludePrivate --excludeExternals --excludeNotExported --out dist/doc src/main","tsc":"tsc","build":"npm run build:dev","clean":"node-gyp clean && rimraf dist","install":"node-gyp rebuild","prepare":"npm run tsc && npm run doc && node dist/script/generatemeta.js","build:dev":"node-gyp rebuild --debug && npm run tsc && npm run generatemeta","manualtest":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/manualtest/misc.ts","generatemeta":"ts-node src/script/generatemeta.ts","build:release":"node-gyp rebuild && npm run tsc && npm run generatemeta","example-btn-press-js":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/examples/button-press.js","example-btn-press-ts":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/examples/button-press.ts","example-ringer-sequence":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/examples/ringer-sequence.ts","pipeline-build-setversion":"node setversion.js"},"_npmUser":{"name":"theisjabra","email":"tfroehlich@jabra.com"},"devEngines":{"npm":">=5.5.1","node":">=10.0.0"},"repository":{"url":"git+https://github.com/gnaudio/jabra-node-sdk.git","type":"git","directory":"nodesdk"},"_npmVersion":"6.14.8","description":"NodeJS SDK for Jabra Devices","directories":{},"_nodeVersion":"14.13.0","dependencies":{"bindings":"1.5.0","node-addon-api":"1.7.1"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"rimraf":"3.0.2","ts-node":"8.8.2","typedoc":"0.17.4","cross-env":"7.0.2","typescript":"3.8.3","@types/node":"13.11.1","@types/bindings":"1.3.0","replace-in-file":"5.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jabra-node-sdk_3.2.1-beta.5_1607072910783_0.5060562142777407","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"3.2.1":{"name":"@gnaudio/jabra-node-sdk","version":"3.2.1","keywords":["jabra","sdk"],"author":{"name":"GN Audio"},"license":"MIT","_id":"@gnaudio/jabra-node-sdk@3.2.1","maintainers":[{"name":"thammond","email":"thammond@jabra.com"},{"name":"ifmladenov","email":"ifmladenov@jabra.com"},{"name":"sanchen","email":"sanchen@jabra.com"},{"name":"dlaezza-jabra","email":"dlaezza@jabra.com"},{"name":"theisjabra","email":"tfroehlich@jabra.com"},{"name":"sskjabra","email":"sklausen@jabra.com"},{"name":"daniel_vasile_42","email":"fvasile@jabra.com"},{"name":"frederiksen","email":"mrtn.frederiksen@gmail.com"}],"homepage":"https://github.com/gnaudio/jabra-node-sdk/","bugs":{"url":"https://developer.jabra.com"},"dist":{"shasum":"697aa9cf58fb2d4b55aa60a4e09ae42953acc1bb","tarball":"https://registry.npmjs.org/@gnaudio/jabra-node-sdk/-/jabra-node-sdk-3.2.1.tgz","fileCount":156,"integrity":"sha512-KSrKLHAfqUYjhdsP4P63CBoXfaCOK32dC4iIyrw2h2amrp6EhWmxHxbM0IGW4f2/SkYMKXaFmVJEw9jG8UYJ5A==","signatures":[{"sig":"MEUCIQC6gH4SYvWWTCqplyO6dym89p1LESDqJDUwn20Vadg8owIgRpP+0LpvAHbjccvAHoC6t0+XEXS/X76amMFsjLXiRWs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14443605,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfzhzWCRA9TVsSAnZWagAAfMgP/39qa6kYGOFYH79oNPgb\nBtguc4NzK8mZ9FYIcmFeUTzN5kpbclzRRhoN2xOI8pfhnpTDcysxlUs6K9sO\n5Zh90hJ8YO9OvFqFV5enxKdcT7t3AqiNboHrnjSLgnIxcgyvhukXkhGorjhh\nZAJAyWVBDVhUsN4FSG5tSlIf9amKaPx8e8XPfnBERvk24Zeb3o6j/Jt0cuWK\nnQJBPEb53DSY1l2e20LVKgOBEpfk1y1imeG2L9X30ytU5QnMweUcqyYyGoR/\nu0J5mxXZ9z/LTla79su85PwconTDCYVJbp8sNmbd6HQLihz5TwI5+kGiJK3W\nwGOuELrb/YvwOqz49dPFnq5SAsd83tVbOZFQgTfhdMiqTvYyH5xvPvWEavC2\nCXy/OenrNJAQS8HvopTPo5XawGnK5aphBaan7JAeq6Sx5Ppi5FUZB11tqfvN\nnuR7rAyk3VF0Ir2BEBQrEOfT+uNsyTpm7iBLrr5yROAjUH7kPnYZaytQ0aL0\nGE+/8JZuHhPMkTuuENCNYSH/01Ac39OPF2GYj9E658TVA7yZ32wRTGyYc7Si\n5BwZuGGkT2Yys1ohDilAEW/F2kaNAMZxU3UIZM7J9fKYLIe2bRnBcsSdWCPx\n49X3hFFxGJLzqPbt9XvXQ0E3ieYmqOvXocXEmtB51+tAsPwJ0PXC3pXg1OxY\nYo2q\r\n=O8u5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/main/index.js","types":"dist/main/index.d.ts","gypfile":true,"scripts":{"doc":"typedoc --mode file --excludePrivate --excludeExternals --excludeNotExported --out dist/doc src/main","tsc":"tsc","build":"npm run build:dev","clean":"node-gyp clean && rimraf dist","install":"node-gyp rebuild","prepare":"npm run tsc && npm run doc && node dist/script/generatemeta.js","build:dev":"node-gyp rebuild --debug && npm run tsc && npm run generatemeta","manualtest":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/manualtest/misc.ts","generatemeta":"ts-node src/script/generatemeta.ts","build:release":"node-gyp rebuild && npm run tsc && npm run generatemeta","example-btn-press-js":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/examples/button-press.js","example-btn-press-ts":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/examples/button-press.ts","example-ringer-sequence":"cross-env LIBJABRA_TRACE_LEVEL=trace ts-node src/examples/ringer-sequence.ts","pipeline-build-setversion":"node setversion.js"},"_npmUser":{"name":"theisjabra","email":"tfroehlich@jabra.com"},"devEngines":{"npm":">=5.5.1","node":">=10.0.0"},"repository":{"url":"git+https://github.com/gnaudio/jabra-node-sdk.git","type":"git","directory":"nodesdk"},"_npmVersion":"6.14.8","description":"NodeJS SDK for Jabra Devices","directories":{},"_nodeVersion":"14.13.0","dependencies":{"bindings":"1.5.0","node-addon-api":"1.7.1"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"3.0.2","ts-node":"8.8.2","typedoc":"0.17.4","cross-env":"7.0.2","typescript":"3.8.3","@types/node":"13.11.1","@types/bindings":"1.3.0","replace-in-file":"5.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jabra-node-sdk_3.2.1_1607343318349_0.9765056935778005","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"3.2.2-beta.1":{"name":"@gnaudio/jabra-node-sdk","version":"3.2.2-beta.1","keywords":["jabra","sdk"],"author":{"name":"GN Audio"},"license":"MIT","_id":"@gnaudio/jabra-node-sdk@3.2.2-beta.1","maintainers":[{"name":"martinjabra","email":"extmosoerensen@jabra.com"},{"name":"asalvatucci","email":"asalvatucci@gmail.com"},{"name":"jdv85","email":"jvesterheden@jabra.com"},{"name":"frederiksen","email":"mrtn.frederiksen@gmail.com"},{"name":"daniel_vasile_42","email":"fvasile@jabra.com"},{"name":"sskjabra","email":"sklausen@jabra.com"},{"name":"theisjabra","email":"tfroehlich@jabra.com"},{"name":"dlaezza-jabra","email":"dlaezza@jabra.com"},{"name":"sanchen","email":"sanchen@jabra.com"},{"name":"ifmladenov","email":"ifmladenov@jabra.com"},{"name":"thammond","email":"thammond@jabra.com"}],"homepage":"https://github.com/gnaudio/jabra-node-sdk/","bugs":{"url":"https://developer.jabra.com"},"dist":{"shasum":"19ef635a1a0cb78a787b758bbca5a1cc28c2c234","tarball":"https://registry.npmjs.org/@gnaudio/jabra-node-sdk/-/jabra-node-sdk-3.2.2-beta.1.tgz","fileCount":159,"integrity":"sha512-SS8j0dJQrtN1eAgzwsbwA5621EFvHX7NQbvBPPGd7GUq77nb+XclKAdnBBeERmrA/JgZu6Nm1yTZAcwrMOTbLA==","signatures":[{"sig":"MEUCIQCOlmdEKiBgq+uBnwawYR0KVm09Iht6HUGdhHL3IStiNgIgNs+ANE3ZvFoVSt39WsI53ZQPEWrfbQm86/1Nx+aZXg0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16675888,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgN7rgCRA9TVsSAnZWagAA4FAP/jU6R6B8w4d3UdRo4IQz\ndl7yeFcCK81VQHjnVbbcS3pzkK8rRPTRXcB5lA32CEGMHBx56rUzF8NsLF3Z\nF2CgwVrM6zEON5VyxzjwYga6eBwROGcqU4WqJS89Jcbz2tg7gu6zp/mcbHe4\nCf6oUajtvV1r4zBgSQ5j/0eOhjwDvnHlfKX6hkOUG+Um9vvlOcsuUK8YaCe3\nZRtmXAF2Ohtb1esRwvW736Fi8IU/q4/Qh1y6oAijpKjW8zF7HnFhcDiwc+6R\nECevL8VInYOcAMyreaDlp8LPUq4j9l6pKGBN7sp+VirE8B5RQnQvL/N5zUmW\ntNcHDfB13NVwsLl1vUnwAaaRMDM6Idnd/ZAtrkPwehqsCGuDi65Tcz6CfPrG\n4WB3Anwf6iPjTy1WQsWlf2FSdNN8r7ieHxT9wyyjtu/M5fhzZvNP+1jd7dbk\nfqfJMv0lwLpskDtx2e0BT/yecPfOG3pHsjUnIRwgWu05g4M6+czYLo4gIm9Q\nloUUkOILz7BhwKG/87Kp7hoLyiGcAPH86/Rl8sYmGo+faPyfrEGPyCWJIst8\nmRao4hwfEKTr1DjZ37+/G7gPVmIKDpgv/0MqkuNEIbgxJARa6Fwd2Dk0ombz\nwjc+irEvFBsPXxObQFfImhXVFZzHQGfTQOwCBfHxMr96jt9xDmNBUBqm2N0m\njQar\r\n=pmyI\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/main/index.js","types":"dist/main/index.d.ts","readme":"Jabra Node.js SDK\r\n\r\n# Table of Contents\r\n- [Versions](#versions)\r\n- [Pre-requisite](#pre-requisite)\r\n- [Installation](#installation)\r\n- [Debugging and Logging](#debugging-and-logging)\r\n- [API Reference](#api-reference)\r\n- [Examples](#examples)\r\n    - [Simple Example](#simple-button-events-example-using-javascript-and-plain-promises)\r\n    - [Multiple device management](#multiple-device-management-with-typescript-and-asyncawait)\r\n- [Sequence Diagrams](#sequence-diagrams)\r\n- [Setup VSCode](#setup-vsCode)\r\n    - [Windows](#windows)\r\n    - [Linux](#linux)\r\n- [Bug report](https://github.com/gnaudio/jabra-node-sdk#bug-reports)\r\n- [Changelog](https://github.com/gnaudio/jabra-node-sdk/blob/master/CHANGELOG.md)\r\n- [License](https://github.com/gnaudio/jabra-node-sdk/blob/master/LICENSE.md)\r\n- [FAQ](https://github.com/gnaudio/jabra-node-sdk/blob/master/FAQ.md)\r\n\r\n## Versions\r\n\r\n[![npm version](https://badge.fury.io/js/%40gnaudio%2Fjabra-node-sdk.svg)](https://badge.fury.io/js/%40gnaudio%2Fjabra-node-sdk)\r\n\r\nLatest **STABLE** release is  [distributed on npmjs.com](https://www.npmjs.com/package/@gnaudio/jabra-node-sdk/v/3.1.0) (see [changelog](https://github.com/gnaudio/jabra-node-sdk/blob/master/CHANGELOG.md) for changes and notable defects). \r\n\r\nIn addition, **BETA** versions may be available on npmjs with a version name ending with \"-beta.X\" specifier. For such BETA versions,the following applies:\r\n\r\n    > Disclaimer for Alpha and Beta Software Release\r\n\r\n    > Please note that this is a copyrighted Jabra Product ((c) 2017 GN Audio A/S) (the “Product”) which is still undergoing final testing before its official release. The Product and all content found on it are provided on an “as is” and “as available” basis. Jabra does not provide any warranties, neither express nor implied, as to the suitability or usability of the Product or any of its content.\r\n\r\n    > Jabra disclaims liability for any loss, whether direct, indirect, special or consequential, suffered by any person as a result of their use of the Product or the software embedded, and for any claim arising from any injury or damage, including but not limited to, any personal or bodily injury or tangible property damage, arising from or resulting in any way from any alleged defects in the material, workmanship, or performance of the Product, and Company shall indemnify Jabra in respect of any such claims. All usage of the Product is at users’ own risk and the user will be solely responsible for any resulting from such activities.\r\n\r\n    > Should you encounter any bugs, glitches, dangers, lack of functionality, lack of comfort or other problems with the Product, please let us know immediately so we can rectify these accordingly. Your help in this regard is greatly appreciated.\r\n\r\n    > The Product is released solely for test use in Company’s organization and must not under any circumstances be distributed to third parties without prior written acceptance from Jabra.\r\n\r\n    > By using the software, I accept and acknowledge the content herein.`\r\n\r\n## Pre-requisite\r\n1. Node.js v8.x or later.\r\n2. **On MacOS:** `xcode` & `python 2.7`. By default, Python is installed on macOS but make sure correct version(2.7.x) is installed. Install Xcode from App store or download it from [here](https://developer.apple.com/xcode/download/).\r\n3. **On Windows:** `Visual C++ Build Tools` & `Python 2.7`. You can install all of these by following any of the below mentioned steps.\r\n\r\n    3.1. **During Node.js installation** By ticking the checkbox when prompted during Node.js installation for `Tools for Native modules`, this installs both `Visual C++ Build Tools` & `Python 2.7`. **Note** This is prompted only for Windows platform. For other platforms like Linux or MAC, C++ compilation tools has to be installed separately as mentioned in other steps.\r\n\r\n    3.2. Both `Visual C++ Build Tools` & `Python 2.7` can also be installed using command `npm install --global --production --add-python-to-path windows-build-tools`. To know more about this tool, see [this link.](https://github.com/felixrieseberg/windows-build-tools). **Note** For executing this command through `Windows Command Prompt` or `Windows PowerShell`, they should be ran in Administrator mode.\r\n4. **On Linux:** `build-essential` package for C++ compilation & `Python 2.7`.\r\n\r\n    4.1. **Udev rules:** To be able to communicate with Jabra devices with non-root privileges it is required to create a udev rule for Jabra devices. Place the udev rule in `/etc/udev/rules.d`, and follow naming guidelines for udev files.              \r\n    \r\n    **Example:** The file name should be something like `80-jabra.rules` where the number before the dash indicates in what order the system reads the rules (e.g. if you had another rules file called `70-someotherrule.rules`, it would read that one first), the word after the dash is just an identifier of sorts (it could be something other than jabra) and the extension must be `.rules`.\r\n\r\n    The contents of the file are:\r\n\r\n    `ATTRS{idVendor}==\"0b0e\", MODE=\"0666\", GROUP=\"users\"`\r\n\r\n    After creating the udev file (as root), reload the udev rules using:\r\n\r\n    `sudo udevadm control --reload`\r\n\r\n    Reattach your Jabra device in order to get new permissions assigned.\r\n\r\n5. **All Platforms:** `node-gyp`. You can install this using command `npm install -g node-gyp`. To know more about this, see [this link](https://www.npmjs.com/package/node-gyp)\r\n\r\n6. **For Electron.JS:** If you are using `asar` packaging then you may need to `unpack` some of the resources used in this module. These resources are native library files i.e `libjabra.dll`, `libjabra.dylib` & `libjabra.so`, which is stored in a `build\\Release` folder. By default latest electron builder will automatically unpack, but if it does not work then you can provide below option to your build process. To know more, see [this link](https://www.electron.build/configuration/configuration)\r\n\r\n    ```\r\n    \"build\": {\r\n        \"asarUnpack\": [\"node_modules/@gnaudio/jabra-node-sdk\"]\r\n    }\r\n    ```\r\n\r\n## Installation\r\nThis release is published to [npm](https://www.npmjs.com/package/@gnaudio/jabra-node-sdk) and can be installed via below command.\r\n```\r\nnpm install --save @gnaudio/jabra-node-sdk\r\n```\r\n\r\n## Debugging and Logging\r\nBelow environment variables are defined for logging and debugging purpose. User can change the values as per preference.\r\n\r\nEnvironment Variable | Value | Description\r\n--- | --- | ---\r\nLIBJABRA_TRACE_LEVEL | fatal, error, warning(default), info, debug | Log levels\r\nLIBJABRA_RESOURCE_PATH | **On Mac:** ~/Library/Application Support/JabraSDK/ **On Windows:** %appdata%/Roaming/JabraSDK  | This determine the system path where logs and device related files are written.\r\n\r\n## API Reference\r\nAPI doc is in html format. See doc folder inside installed module `node_modules\\@gnaudio\\jabra-node-sdk\\dist\\doc` and open `index.html`.\r\n\r\n## Examples\r\n\r\nFor all examples, user should first register the app on [Jabra developer site](https://developer.jabra.com/) to get appID. User should pass this appID to `createJabraApplication` in order to initialize the jabra module:\r\n\r\n### Simple button events example using javascript and plain promises\r\n\r\n```javascript\r\nconst j = require(\"@gnaudio/jabra-node-sdk\");\r\nj.createJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        console.log('Press any key on Jabra device ' + device.deviceName);\r\n        \r\n        device.on('btnPress', (btnType, btnValue) => {\r\n          console.log('New input from device is received: ', j.enumDeviceBtnType[btnType], btnValue);\r\n        });\r\n    });    \r\n});\r\n```\r\n\r\n### Simple button events example using typescript and plain promises\r\n\r\n```typescript\r\nimport { createJabraApplication, enumDeviceBtnType, enumHidState } from '@gnaudio/jabra-node-sdk';\r\ncreateJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        console.log('Press any key on Jabra device ' + device.deviceName);\r\n\r\n        device.on('btnPress', (btnType, btnValue) => {\r\n          console.log('New input from device is received: ', enumDeviceBtnType[btnType], btnValue);\r\n        });\r\n    });    \r\n});\r\n```\r\n\r\n### Ring example using typescript and plain promises\r\nThis example shows how to ring a Jabra device\r\n\r\n```typescript\r\nimport { createJabraApplication, JabraError } from '@gnaudio/jabra-node-sdk';\r\n\r\ncreateJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        device.isRingerSupportedAsync().then( (supported) => {\r\n            if (supported) {\r\n              device.ringAsync().then ( () => {\r\n                console.log('ringing');\r\n              }).catch ((err: JabraError) => {\r\n                console.log('ring failed with error ' + err);\r\n              }); // ring the device\r\n              setTimeout(() => {\r\n                device.unringAsync().then(() => {\r\n                    console.log('stopped ringing');\r\n                }).catch ((err: JabraError) => {\r\n                    console.log('unring failed with error ' + err);\r\n                });\r\n              }, 5000); // stop ringing the device after 5 second\r\n            }          \r\n        }).catch( (err: JabraError) => {\r\n            console.error('Jabra call failed with error ' + err)\r\n        });\r\n    });\r\n    \r\n    jabra.on('detach', (device) => {\r\n        console.log('Device detached with deviceID:', device.deviceID);\r\n\r\n        // In this demo example, we will auto shutdown once all jabra devices are removed:\r\n        let remainingAttachedDevices = jabra.getAttachedDevices();\r\n        if (remainingAttachedDevices.length == 0) {\r\n            jabra.disposeAsync().then (() => {}); // Cleanup and allow node process to exit.\r\n        }\r\n    });\r\n});\r\n```\r\n\r\n### Multiple device management with typescript and async/await\r\n\r\n```typescript\r\nimport { createJabraApplication } from '@gnaudio/jabra-node-sdk';\r\n\r\n(async () => {\r\n    let jabra = await createJabraApplication('123'); // 123 is appID here\r\n\r\n    await jabra.scanForDevicesDoneAsync(); // Wait for all pre-attached devices to be scanned.\r\n\r\n    const deviceInstanceList = jabra.getAttachedDevices();\r\n    if (deviceInstanceList.length<2) {\r\n        throw new Error('Please make sure 2 jabra devices are attached');\r\n    }\r\n\r\n    const firstDevice = deviceInstanceList[0];\r\n    await firstDevice.ringAsync();\r\n\r\n    const secondDevice = deviceInstanceList[1];\r\n    await secondDevice.ringAsync();\r\n\r\n    // Dispose jabra sdk to enable node process to shutdown.\r\n    await jabra.disposeAsync();\r\n})();\r\n```\r\n\r\n## Sequence diagrams\r\n\r\nThese sequence diagrams shows typical uses of the Node.js sdk:\r\n\r\n![Sequence diagram](docs/outgoing-call-then-end-call.png)\r\n\r\n![Sequence diagram](docs/incoming-call-then-accept-on-device-then-end-call.png)\r\n\r\n![Sequence diagram](docs/incoming-call-then-user-rejects.png)\r\n\r\n![Sequence diagram](docs/mute-unmute-from-device.png)\r\n\r\n![Sequence diagram](docs/hold-resume-from-device.png)\r\n\r\n## Setup VSCode\r\n\r\nThe project includes config files for debugging typescript and C++ source files\r\nin [Visual Studio Code](https://code.visualstudio.com/) via the\r\n[C++ extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools),\r\nfor both Windows and Linux. The configuration files work without any\r\nmodification, provided that you set up your environment first, by installing\r\nthe necessary tools and defining some environment variable.\r\n\r\nTo debug a C++ file, open a typescript file referencing the C++ file and start\r\nthe debugger (Running the debugger on C++ files directly won't work). Make sure\r\nthe \"Run\"-dropdown at the top of the debugging-sidebar is set to \"Current TS\r\nFile - native code only (&lt;your operating system&gt;)\"\r\n\r\nBelow, the setup steps for Windows and Linux.\r\n\r\n### Windows\r\nYou can more or less follow the instruction in\r\n[the VSCode C++ extension guide](https://code.visualstudio.com/docs/cpp/config-msvc).\r\nThen, you need to make sure all project [pre-requisites](#pre-requisite) are\r\ninstalled correctly, and finally set the following environment variables:\r\n\r\nEnvironment Variable | Value | Description\r\n--- | --- | ---\r\nLIBJABRA_WIN_NODE_GYP_CACHE_PATH | eg. %appdata%\\Local\\node-gyp\\Cache\\12.16.3\\include\\node | Used by the C/C++ extension to resolve include paths\r\nLIBJABRA_WIN_CPP_COMPILER_PATH | eg. C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x64/cl.exe | Used by the C/C++ extension to infer the path to the C++ standard library header files\r\n\r\n\r\n### Linux\r\nYou can read a more detailed guide on\r\n[the VSCode C++ extension page](https://code.visualstudio.com/docs/cpp/config-linux).\r\nThe important part is to install a C++ compiler and debugger. The easiest way\r\nis to install `build-essential` and `gdb`, this way:\r\n\r\n```sh\r\nsudo apt-get install build-essential gdb\r\n```\r\n\r\nThis maks your C++ compiler GCC, and you would likely use the `g++` command to\r\ncompile.\r\n\r\nThen, you need to install the project [pre-requisites](#pre-requisite), and\r\nfinally export the following environment variables:\r\n\r\nEnvironment Variable | Likely value | Description\r\n--- | --- | ---\r\nJABRA_NODESDK_CPP_COMPILER_PATH | /usr/bin/g++ | Used by the C/C++ extension to infer the path to the C++ standard library header files\r\nJABRA_NODESDK_NODE_GYP_CACHE_PATH | $HOME/.cache/node-gyp/14.4.0 | Used by the C/C++ extension to resolve include paths. **NOTE**: The final `include/node` is added by the configuration and it's not necessary\r\n","gypfile":true,"scripts":{"doc":"typedoc --mode file --excludePrivate --excludeExternals --excludeNotExported --out dist/doc src/main","tsc":"tsc","build":"npm run build:dev","clean":"node-gyp clean && rimraf dist","install":"node-gyp rebuild","prepare":"npm run tsc && npm run doc && node dist/script/generatemeta.js","build:dev":"node-gyp rebuild --debug && npm run tsc && npm run generatemeta","manualtest":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/manualtest/misc.ts","generatemeta":"ts-node src/script/generatemeta.ts","build:release":"node-gyp rebuild && npm run tsc && npm run generatemeta","example-btn-press-js":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/examples/button-press.js","example-btn-press-ts":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/examples/button-press.ts","example-ringer-sequence":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/examples/ringer-sequence.ts","pipeline-build-setversion":"node setversion.js"},"_npmUser":{"name":"martinjabra","email":"extmosoerensen@jabra.com"},"devEngines":{"npm":">=5.5.1","node":">=10.0.0"},"repository":{"url":"git+https://github.com/gnaudio/jabra-node-sdk.git","type":"git","directory":"nodesdk"},"_npmVersion":"6.14.6","description":"NodeJS SDK for Jabra Devices","directories":{},"_nodeVersion":"12.18.4","dependencies":{"bindings":"1.5.0","node-addon-api":"^3.0.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"rimraf":"3.0.2","ts-node":"8.8.2","typedoc":"0.17.4","cross-env":"7.0.2","typescript":"3.8.3","@types/node":"13.11.1","@types/bindings":"1.3.0","replace-in-file":"5.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jabra-node-sdk_3.2.2-beta.1_1614265055426_0.6357575834052391","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"3.2.2-beta.2":{"name":"@gnaudio/jabra-node-sdk","version":"3.2.2-beta.2","keywords":["jabra","sdk"],"author":{"name":"GN Audio"},"license":"MIT","_id":"@gnaudio/jabra-node-sdk@3.2.2-beta.2","maintainers":[{"name":"martinjabra","email":"extmosoerensen@jabra.com"},{"name":"jdv85","email":"jvesterheden@jabra.com"},{"name":"frederiksen","email":"mrtn.frederiksen@gmail.com"},{"name":"daniel_vasile_42","email":"fvasile@jabra.com"},{"name":"sskjabra","email":"sklausen@jabra.com"},{"name":"theisjabra","email":"tfroehlich@jabra.com"},{"name":"dlaezza-jabra","email":"dlaezza@jabra.com"},{"name":"ifmladenov","email":"ifmladenov@jabra.com"},{"name":"thammond","email":"thammond@jabra.com"}],"homepage":"https://github.com/gnaudio/jabra-node-sdk/","bugs":{"url":"https://developer.jabra.com"},"dist":{"shasum":"98462923332ed6a7889c9bdee740a28679d9cdbb","tarball":"https://registry.npmjs.org/@gnaudio/jabra-node-sdk/-/jabra-node-sdk-3.2.2-beta.2.tgz","fileCount":159,"integrity":"sha512-j5VU8Fp6kjP+wiPSQQjC+JSXh1Ti9if7uLpYpLvro0LatniML25LCSB+Uhmish7fUlXfzdOQri177fOSCxqeTA==","signatures":[{"sig":"MEUCIQCicj0pRNMjhmWbeNJC1eAdQ7MBnWh1j3X5fzOCTy6udgIgDQUFT4YnARtXIuohEa+qJs1bVn3bJKwEx7/dNpUGqKc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":12244424,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgTJoCCRA9TVsSAnZWagAAChUP/jUVVvH6+KJe2A/BQk8o\nLREDF6Uzh3lG8c3O1w0ngTIGdeuIceDkocWN5c/DnWRcdTDApX1GLjZRZoKi\n0Kuqikp5q7L8j7bfTPUmYs8ASKBldf/4jt4qEohSUXtrsZROsm4ufG33LuTF\nXE6B67D6AmIrx4+E9po1hRGeOdZMczO+x8sAmuEBUDPa/xjAz+bvPLaUKvdq\n3ZCEg/G+wCM12yj2BDXUqaF9m0nYT10sDdlrCWztCbm6mpg/iJa801bkopK+\nJSXta/lUCivUOdNztzrktqojmq8wjA2QzQEA57AL0WwScVoEliwn6rV9nwtQ\nof7FNJlE9TpHZ3XV69/cWz4XuxmQlFeQ713thXSrCGOlI/sorgEksik8+//8\ngp8Y4Vd5rXVLfIvV3WNPoGRY/dRVOYOdXY1zH/e0nflxyzrv5D4DPsKpcbDg\nIg16Pc4IdelYyw7AxTKdBW6GcpFNBcRlC6BY+s0B+aO02wADvQGNqi2D9xzM\nPpgrXdM/kodNRUmKwZzzq6mDFHai0h592PTtUFxAIMTvORgeUWiQdfjZDEu0\nNArlQSNrOZxZpHS+NhAs3f8gbs4KES32lqqPlsymM6zcU0z8JNzErAUo4TNW\nbj/pKMl5asLdIrA3CladCSV0ujqVnD72rf9kMg1vYlK/3b7lyqJVv02U7rfx\nYeGe\r\n=Wagk\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/main/index.js","types":"dist/main/index.d.ts","readme":"Jabra Node.js SDK\r\n\r\n# Table of Contents\r\n- [Versions](#versions)\r\n- [Pre-requisite](#pre-requisite)\r\n- [Installation](#installation)\r\n- [Debugging and Logging](#debugging-and-logging)\r\n- [API Reference](#api-reference)\r\n- [Examples](#examples)\r\n    - [Simple Example](#simple-button-events-example-using-javascript-and-plain-promises)\r\n    - [Multiple device management](#multiple-device-management-with-typescript-and-asyncawait)\r\n- [Sequence Diagrams](#sequence-diagrams)\r\n- [Setup VSCode](#setup-vsCode)\r\n    - [Windows](#windows)\r\n    - [Linux](#linux)\r\n- [Bug report](https://github.com/gnaudio/jabra-node-sdk#bug-reports)\r\n- [Changelog](https://github.com/gnaudio/jabra-node-sdk/blob/master/CHANGELOG.md)\r\n- [License](https://github.com/gnaudio/jabra-node-sdk/blob/master/LICENSE.md)\r\n- [FAQ](https://github.com/gnaudio/jabra-node-sdk/blob/master/FAQ.md)\r\n\r\n## Versions\r\n\r\n[![npm version](https://badge.fury.io/js/%40gnaudio%2Fjabra-node-sdk.svg)](https://badge.fury.io/js/%40gnaudio%2Fjabra-node-sdk)\r\n\r\nLatest **STABLE** release is  [distributed on npmjs.com](https://www.npmjs.com/package/@gnaudio/jabra-node-sdk/v/3.1.0) (see [changelog](https://github.com/gnaudio/jabra-node-sdk/blob/master/CHANGELOG.md) for changes and notable defects). \r\n\r\nIn addition, **BETA** versions may be available on npmjs with a version name ending with \"-beta.X\" specifier. For such BETA versions,the following applies:\r\n\r\n    > Disclaimer for Alpha and Beta Software Release\r\n\r\n    > Please note that this is a copyrighted Jabra Product ((c) 2017 GN Audio A/S) (the “Product”) which is still undergoing final testing before its official release. The Product and all content found on it are provided on an “as is” and “as available” basis. Jabra does not provide any warranties, neither express nor implied, as to the suitability or usability of the Product or any of its content.\r\n\r\n    > Jabra disclaims liability for any loss, whether direct, indirect, special or consequential, suffered by any person as a result of their use of the Product or the software embedded, and for any claim arising from any injury or damage, including but not limited to, any personal or bodily injury or tangible property damage, arising from or resulting in any way from any alleged defects in the material, workmanship, or performance of the Product, and Company shall indemnify Jabra in respect of any such claims. All usage of the Product is at users’ own risk and the user will be solely responsible for any resulting from such activities.\r\n\r\n    > Should you encounter any bugs, glitches, dangers, lack of functionality, lack of comfort or other problems with the Product, please let us know immediately so we can rectify these accordingly. Your help in this regard is greatly appreciated.\r\n\r\n    > The Product is released solely for test use in Company’s organization and must not under any circumstances be distributed to third parties without prior written acceptance from Jabra.\r\n\r\n    > By using the software, I accept and acknowledge the content herein.`\r\n\r\n## Pre-requisite\r\n1. Node.js v8.x or later.\r\n2. **On MacOS:** `xcode` & `python 2.7`. By default, Python is installed on macOS but make sure correct version(2.7.x) is installed. Install Xcode from App store or download it from [here](https://developer.apple.com/xcode/download/).\r\n3. **On Windows:** `Visual C++ Build Tools` & `Python 2.7`. You can install all of these by following any of the below mentioned steps.\r\n\r\n    3.1. **During Node.js installation** By ticking the checkbox when prompted during Node.js installation for `Tools for Native modules`, this installs both `Visual C++ Build Tools` & `Python 2.7`. **Note** This is prompted only for Windows platform. For other platforms like Linux or MAC, C++ compilation tools has to be installed separately as mentioned in other steps.\r\n\r\n    3.2. Both `Visual C++ Build Tools` & `Python 2.7` can also be installed using command `npm install --global --production --add-python-to-path windows-build-tools`. To know more about this tool, see [this link.](https://github.com/felixrieseberg/windows-build-tools). **Note** For executing this command through `Windows Command Prompt` or `Windows PowerShell`, they should be ran in Administrator mode.\r\n4. **On Linux:** `build-essential` package for C++ compilation & `Python 2.7`.\r\n\r\n    4.1. **Udev rules:** To be able to communicate with Jabra devices with non-root privileges it is required to create a udev rule for Jabra devices. Place the udev rule in `/etc/udev/rules.d`, and follow naming guidelines for udev files.              \r\n    \r\n    **Example:** The file name should be something like `80-jabra.rules` where the number before the dash indicates in what order the system reads the rules (e.g. if you had another rules file called `70-someotherrule.rules`, it would read that one first), the word after the dash is just an identifier of sorts (it could be something other than jabra) and the extension must be `.rules`.\r\n\r\n    The contents of the file are:\r\n\r\n    `ATTRS{idVendor}==\"0b0e\", MODE=\"0666\", GROUP=\"users\"`\r\n\r\n    After creating the udev file (as root), reload the udev rules using:\r\n\r\n    `sudo udevadm control --reload`\r\n\r\n    Reattach your Jabra device in order to get new permissions assigned.\r\n\r\n5. **All Platforms:** `node-gyp`. You can install this using command `npm install -g node-gyp`. To know more about this, see [this link](https://www.npmjs.com/package/node-gyp)\r\n\r\n6. **For Electron.JS:** If you are using `asar` packaging then you may need to `unpack` some of the resources used in this module. These resources are native library files i.e `libjabra.dll`, `libjabra.dylib` & `libjabra.so`, which is stored in a `build\\Release` folder. By default latest electron builder will automatically unpack, but if it does not work then you can provide below option to your build process. To know more, see [this link](https://www.electron.build/configuration/configuration)\r\n\r\n    ```\r\n    \"build\": {\r\n        \"asarUnpack\": [\"node_modules/@gnaudio/jabra-node-sdk\"]\r\n    }\r\n    ```\r\n\r\n## Installation\r\nThis release is published to [npm](https://www.npmjs.com/package/@gnaudio/jabra-node-sdk) and can be installed via below command.\r\n```\r\nnpm install --save @gnaudio/jabra-node-sdk\r\n```\r\n\r\n## Debugging and Logging\r\nBelow environment variables are defined for logging and debugging purpose. User can change the values as per preference.\r\n\r\nEnvironment Variable | Value | Description\r\n--- | --- | ---\r\nLIBJABRA_TRACE_LEVEL | fatal, error, warning(default), info, debug | Log levels\r\nLIBJABRA_RESOURCE_PATH | **On Mac:** ~/Library/Application Support/JabraSDK/ **On Windows:** %appdata%/Roaming/JabraSDK  | This determine the system path where logs and device related files are written.\r\n\r\n## API Reference\r\nAPI doc is in html format. See doc folder inside installed module `node_modules\\@gnaudio\\jabra-node-sdk\\dist\\doc` and open `index.html`.\r\n\r\n## Examples\r\n\r\nFor all examples, user should first register the app on [Jabra developer site](https://developer.jabra.com/) to get appID. User should pass this appID to `createJabraApplication` in order to initialize the jabra module:\r\n\r\n### Simple button events example using javascript and plain promises\r\n\r\n```javascript\r\nconst j = require(\"@gnaudio/jabra-node-sdk\");\r\nj.createJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        console.log('Press any key on Jabra device ' + device.deviceName);\r\n        \r\n        device.on('btnPress', (btnType, btnValue) => {\r\n          console.log('New input from device is received: ', j.enumDeviceBtnType[btnType], btnValue);\r\n        });\r\n    });    \r\n});\r\n```\r\n\r\n### Simple button events example using typescript and plain promises\r\n\r\n```typescript\r\nimport { createJabraApplication, enumDeviceBtnType, enumHidState } from '@gnaudio/jabra-node-sdk';\r\ncreateJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        console.log('Press any key on Jabra device ' + device.deviceName);\r\n\r\n        device.on('btnPress', (btnType, btnValue) => {\r\n          console.log('New input from device is received: ', enumDeviceBtnType[btnType], btnValue);\r\n        });\r\n    });    \r\n});\r\n```\r\n\r\n### Ring example using typescript and plain promises\r\nThis example shows how to ring a Jabra device\r\n\r\n```typescript\r\nimport { createJabraApplication, JabraError } from '@gnaudio/jabra-node-sdk';\r\n\r\ncreateJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        device.isRingerSupportedAsync().then( (supported) => {\r\n            if (supported) {\r\n              device.ringAsync().then ( () => {\r\n                console.log('ringing');\r\n              }).catch ((err: JabraError) => {\r\n                console.log('ring failed with error ' + err);\r\n              }); // ring the device\r\n              setTimeout(() => {\r\n                device.unringAsync().then(() => {\r\n                    console.log('stopped ringing');\r\n                }).catch ((err: JabraError) => {\r\n                    console.log('unring failed with error ' + err);\r\n                });\r\n              }, 5000); // stop ringing the device after 5 second\r\n            }          \r\n        }).catch( (err: JabraError) => {\r\n            console.error('Jabra call failed with error ' + err)\r\n        });\r\n    });\r\n    \r\n    jabra.on('detach', (device) => {\r\n        console.log('Device detached with deviceID:', device.deviceID);\r\n\r\n        // In this demo example, we will auto shutdown once all jabra devices are removed:\r\n        let remainingAttachedDevices = jabra.getAttachedDevices();\r\n        if (remainingAttachedDevices.length == 0) {\r\n            jabra.disposeAsync().then (() => {}); // Cleanup and allow node process to exit.\r\n        }\r\n    });\r\n});\r\n```\r\n\r\n### Multiple device management with typescript and async/await\r\n\r\n```typescript\r\nimport { createJabraApplication } from '@gnaudio/jabra-node-sdk';\r\n\r\n(async () => {\r\n    let jabra = await createJabraApplication('123'); // 123 is appID here\r\n\r\n    await jabra.scanForDevicesDoneAsync(); // Wait for all pre-attached devices to be scanned.\r\n\r\n    const deviceInstanceList = jabra.getAttachedDevices();\r\n    if (deviceInstanceList.length<2) {\r\n        throw new Error('Please make sure 2 jabra devices are attached');\r\n    }\r\n\r\n    const firstDevice = deviceInstanceList[0];\r\n    await firstDevice.ringAsync();\r\n\r\n    const secondDevice = deviceInstanceList[1];\r\n    await secondDevice.ringAsync();\r\n\r\n    // Dispose jabra sdk to enable node process to shutdown.\r\n    await jabra.disposeAsync();\r\n})();\r\n```\r\n\r\n## Sequence diagrams\r\n\r\nThese sequence diagrams shows typical uses of the Node.js sdk:\r\n\r\n![Sequence diagram](docs/outgoing-call-then-end-call.png)\r\n\r\n![Sequence diagram](docs/incoming-call-then-accept-on-device-then-end-call.png)\r\n\r\n![Sequence diagram](docs/incoming-call-then-user-rejects.png)\r\n\r\n![Sequence diagram](docs/mute-unmute-from-device.png)\r\n\r\n![Sequence diagram](docs/hold-resume-from-device.png)\r\n\r\n## Setup VSCode\r\n\r\nThe project includes config files for debugging typescript and C++ source files\r\nin [Visual Studio Code](https://code.visualstudio.com/) via the\r\n[C++ extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools),\r\nfor both Windows and Linux. The configuration files work without any\r\nmodification, provided that you set up your environment first, by installing\r\nthe necessary tools and defining some environment variable.\r\n\r\nTo debug a C++ file, open a typescript file referencing the C++ file and start\r\nthe debugger (Running the debugger on C++ files directly won't work). Make sure\r\nthe \"Run\"-dropdown at the top of the debugging-sidebar is set to \"Current TS\r\nFile - native code only (&lt;your operating system&gt;)\"\r\n\r\nBelow, the setup steps for Windows and Linux.\r\n\r\n### Windows\r\nYou can more or less follow the instruction in\r\n[the VSCode C++ extension guide](https://code.visualstudio.com/docs/cpp/config-msvc).\r\nThen, you need to make sure all project [pre-requisites](#pre-requisite) are\r\ninstalled correctly, and finally set the following environment variables:\r\n\r\nEnvironment Variable | Value | Description\r\n--- | --- | ---\r\nLIBJABRA_WIN_NODE_GYP_CACHE_PATH | eg. %appdata%\\Local\\node-gyp\\Cache\\12.16.3\\include\\node | Used by the C/C++ extension to resolve include paths\r\nLIBJABRA_WIN_CPP_COMPILER_PATH | eg. C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x64/cl.exe | Used by the C/C++ extension to infer the path to the C++ standard library header files\r\n\r\n\r\n### Linux\r\nYou can read a more detailed guide on\r\n[the VSCode C++ extension page](https://code.visualstudio.com/docs/cpp/config-linux).\r\nThe important part is to install a C++ compiler and debugger. The easiest way\r\nis to install `build-essential` and `gdb`, this way:\r\n\r\n```sh\r\nsudo apt-get install build-essential gdb\r\n```\r\n\r\nThis maks your C++ compiler GCC, and you would likely use the `g++` command to\r\ncompile.\r\n\r\nThen, you need to install the project [pre-requisites](#pre-requisite), and\r\nfinally export the following environment variables:\r\n\r\nEnvironment Variable | Likely value | Description\r\n--- | --- | ---\r\nJABRA_NODESDK_CPP_COMPILER_PATH | /usr/bin/g++ | Used by the C/C++ extension to infer the path to the C++ standard library header files\r\nJABRA_NODESDK_NODE_GYP_CACHE_PATH | $HOME/.cache/node-gyp/14.4.0 | Used by the C/C++ extension to resolve include paths. **NOTE**: The final `include/node` is added by the configuration and it's not necessary\r\n","gypfile":true,"scripts":{"doc":"typedoc --mode file --excludePrivate --excludeExternals --excludeNotExported --out dist/doc src/main","tsc":"tsc","build":"npm run build:dev","clean":"node-gyp clean && rimraf dist","install":"node-gyp rebuild","prepare":"npm run tsc && npm run doc && node dist/script/generatemeta.js","build:dev":"node-gyp rebuild --debug && npm run tsc && npm run generatemeta","manualtest":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/manualtest/misc.ts","generatemeta":"ts-node src/script/generatemeta.ts","build:release":"node-gyp rebuild && npm run tsc && npm run generatemeta","example-btn-press-js":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/examples/button-press.js","example-btn-press-ts":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/examples/button-press.ts","example-ringer-sequence":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/examples/ringer-sequence.ts","pipeline-build-setversion":"node setversion.js"},"_npmUser":{"name":"martinjabra","email":"extmosoerensen@jabra.com"},"devEngines":{"npm":">=5.5.1","node":">=10.0.0"},"repository":{"url":"git+https://github.com/gnaudio/jabra-node-sdk.git","type":"git","directory":"nodesdk"},"_npmVersion":"6.14.6","description":"NodeJS SDK for Jabra Devices","directories":{},"_nodeVersion":"12.18.4","dependencies":{"bindings":"1.5.0","node-addon-api":"^3.0.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"rimraf":"3.0.2","ts-node":"8.8.2","typedoc":"0.17.4","cross-env":"7.0.2","typescript":"3.8.3","@types/node":"13.11.1","@types/bindings":"1.3.0","replace-in-file":"5.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jabra-node-sdk_3.2.2-beta.2_1615632898169_0.3935432497812301","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"3.2.2-beta.3":{"name":"@gnaudio/jabra-node-sdk","version":"3.2.2-beta.3","keywords":["jabra","sdk"],"author":{"name":"GN Audio"},"license":"MIT","_id":"@gnaudio/jabra-node-sdk@3.2.2-beta.3","maintainers":[{"name":"martinjabra","email":"extmosoerensen@jabra.com"},{"name":"jdv85","email":"jvesterheden@jabra.com"},{"name":"frederiksen","email":"mrtn.frederiksen@gmail.com"},{"name":"daniel_vasile_42","email":"fvasile@jabra.com"},{"name":"sskjabra","email":"sklausen@jabra.com"},{"name":"theisjabra","email":"tfroehlich@jabra.com"},{"name":"dlaezza-jabra","email":"dlaezza@jabra.com"},{"name":"ifmladenov","email":"ifmladenov@jabra.com"},{"name":"thammond","email":"thammond@jabra.com"}],"homepage":"https://github.com/gnaudio/jabra-node-sdk/","bugs":{"url":"https://developer.jabra.com"},"dist":{"shasum":"3d866694751998bf6713179b3d4b0a80a61ea9c9","tarball":"https://registry.npmjs.org/@gnaudio/jabra-node-sdk/-/jabra-node-sdk-3.2.2-beta.3.tgz","fileCount":159,"integrity":"sha512-63Iffb/MpN4qo6zOgZELBco8/IVZcWzcsdmAPyRmuqvzh/aMgRYs8a9Fh5xzGCFJEuRAe73N97mCx3Xy8jYTYw==","signatures":[{"sig":"MEUCIHPV/znFhVmkaySoyweGopO5zLb8uDjZKND0bbr3jwlbAiEA4EN0EN1huKS/6AWFbBuF32wAzA8ZELf6cS1icJkDUWg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":12243286,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgUfkMCRA9TVsSAnZWagAABAwP/RaRRbi2OpchxQmYsyLZ\no99kyHIRP77+QAY6hh4WsbrCu2/BCBgMubuOweZIE5dBekXvXJ7z+al7zTnV\naIi0J5mAU7pIVgxDGp0WL78ZM6pPjDWCyapa+TfEkWA4VwUfAPeOIfDNQO8k\ns/77ly3X3phauBnLwVldVgh9XeADuggwZONvtSwDIT24AX6dwTmDkPLztyEQ\nKjhaSFZPGSsQBVkB5WSUDHSShKPbnut+cs6Rk5lrkqo37VaADlZqZHROfjdm\n6lly0rOnwWpAt2/nbc9kgZ7mdYm2ypJdXjARNSxKvN0735CI3NrDAGWqnZot\nFSI3b3IC2aFLfb5zJHRbc2fox1FlstlgGtS+j3ZxmFjAzvsav+vfkwaZQeTk\n1RXWakqY+1o/RoB/Ie12q4BVqwAalveMsRqf6Qzqhu7OMGCbUGi8N2MddxTR\nLsxpeZ/6EldOuZkggfoXgfXkDGGPuw5bf6M8gET0XolqrW8+g3ZvW+5HQfyM\nakOq0Nj12yfoT1TE01zLqfrd9ffsgkuOCVITP+HkU86bB/BDCgl5MDVjGx4l\ns2HAN01WSiH8wBSwZr5KV6r54KfAkR6m0q94//XVjD++1IzBGSoA7KX58Ac/\n6UC4hBuyBoheeUy/Vs2CzqE9tDL4Xq+HUaA2iyPvyj7qFsqwsNhnWI+/BMOq\n2l42\r\n=vWMa\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/main/index.js","types":"dist/main/index.d.ts","readme":"Jabra Node.js SDK\r\n\r\n# Table of Contents\r\n- [Versions](#versions)\r\n- [Pre-requisite](#pre-requisite)\r\n- [Installation](#installation)\r\n- [Debugging and Logging](#debugging-and-logging)\r\n- [API Reference](#api-reference)\r\n- [Examples](#examples)\r\n    - [Simple Example](#simple-button-events-example-using-javascript-and-plain-promises)\r\n    - [Multiple device management](#multiple-device-management-with-typescript-and-asyncawait)\r\n- [Sequence Diagrams](#sequence-diagrams)\r\n- [Setup VSCode](#setup-vsCode)\r\n    - [Windows](#windows)\r\n    - [Linux](#linux)\r\n- [Bug report](https://github.com/gnaudio/jabra-node-sdk#bug-reports)\r\n- [Changelog](https://github.com/gnaudio/jabra-node-sdk/blob/master/CHANGELOG.md)\r\n- [License](https://github.com/gnaudio/jabra-node-sdk/blob/master/LICENSE.md)\r\n- [FAQ](https://github.com/gnaudio/jabra-node-sdk/blob/master/FAQ.md)\r\n\r\n## Versions\r\n\r\n[![npm version](https://badge.fury.io/js/%40gnaudio%2Fjabra-node-sdk.svg)](https://badge.fury.io/js/%40gnaudio%2Fjabra-node-sdk)\r\n\r\nLatest **STABLE** release is  [distributed on npmjs.com](https://www.npmjs.com/package/@gnaudio/jabra-node-sdk/v/3.1.0) (see [changelog](https://github.com/gnaudio/jabra-node-sdk/blob/master/CHANGELOG.md) for changes and notable defects). \r\n\r\nIn addition, **BETA** versions may be available on npmjs with a version name ending with \"-beta.X\" specifier. For such BETA versions,the following applies:\r\n\r\n    > Disclaimer for Alpha and Beta Software Release\r\n\r\n    > Please note that this is a copyrighted Jabra Product ((c) 2017 GN Audio A/S) (the “Product”) which is still undergoing final testing before its official release. The Product and all content found on it are provided on an “as is” and “as available” basis. Jabra does not provide any warranties, neither express nor implied, as to the suitability or usability of the Product or any of its content.\r\n\r\n    > Jabra disclaims liability for any loss, whether direct, indirect, special or consequential, suffered by any person as a result of their use of the Product or the software embedded, and for any claim arising from any injury or damage, including but not limited to, any personal or bodily injury or tangible property damage, arising from or resulting in any way from any alleged defects in the material, workmanship, or performance of the Product, and Company shall indemnify Jabra in respect of any such claims. All usage of the Product is at users’ own risk and the user will be solely responsible for any resulting from such activities.\r\n\r\n    > Should you encounter any bugs, glitches, dangers, lack of functionality, lack of comfort or other problems with the Product, please let us know immediately so we can rectify these accordingly. Your help in this regard is greatly appreciated.\r\n\r\n    > The Product is released solely for test use in Company’s organization and must not under any circumstances be distributed to third parties without prior written acceptance from Jabra.\r\n\r\n    > By using the software, I accept and acknowledge the content herein.`\r\n\r\n## Pre-requisite\r\n1. Node.js v8.x or later.\r\n2. **On MacOS:** `xcode` & `python 2.7`. By default, Python is installed on macOS but make sure correct version(2.7.x) is installed. Install Xcode from App store or download it from [here](https://developer.apple.com/xcode/download/).\r\n3. **On Windows:** `Visual C++ Build Tools` & `Python 2.7`. You can install all of these by following any of the below mentioned steps.\r\n\r\n    3.1. **During Node.js installation** By ticking the checkbox when prompted during Node.js installation for `Tools for Native modules`, this installs both `Visual C++ Build Tools` & `Python 2.7`. **Note** This is prompted only for Windows platform. For other platforms like Linux or MAC, C++ compilation tools has to be installed separately as mentioned in other steps.\r\n\r\n    3.2. Both `Visual C++ Build Tools` & `Python 2.7` can also be installed using command `npm install --global --production --add-python-to-path windows-build-tools`. To know more about this tool, see [this link.](https://github.com/felixrieseberg/windows-build-tools). **Note** For executing this command through `Windows Command Prompt` or `Windows PowerShell`, they should be ran in Administrator mode.\r\n4. **On Linux:** `build-essential` package for C++ compilation & `Python 2.7`.\r\n\r\n    4.1. **Udev rules:** To be able to communicate with Jabra devices with non-root privileges it is required to create a udev rule for Jabra devices. Place the udev rule in `/etc/udev/rules.d`, and follow naming guidelines for udev files.              \r\n    \r\n    **Example:** The file name should be something like `80-jabra.rules` where the number before the dash indicates in what order the system reads the rules (e.g. if you had another rules file called `70-someotherrule.rules`, it would read that one first), the word after the dash is just an identifier of sorts (it could be something other than jabra) and the extension must be `.rules`.\r\n\r\n    The contents of the file are:\r\n\r\n    `ATTRS{idVendor}==\"0b0e\", MODE=\"0666\", GROUP=\"users\"`\r\n\r\n    After creating the udev file (as root), reload the udev rules using:\r\n\r\n    `sudo udevadm control --reload`\r\n\r\n    Reattach your Jabra device in order to get new permissions assigned.\r\n\r\n5. **All Platforms:** `node-gyp`. You can install this using command `npm install -g node-gyp`. To know more about this, see [this link](https://www.npmjs.com/package/node-gyp)\r\n\r\n6. **For Electron.JS:** If you are using `asar` packaging then you may need to `unpack` some of the resources used in this module. These resources are native library files i.e `libjabra.dll`, `libjabra.dylib` & `libjabra.so`, which is stored in a `build\\Release` folder. By default latest electron builder will automatically unpack, but if it does not work then you can provide below option to your build process. To know more, see [this link](https://www.electron.build/configuration/configuration)\r\n\r\n    ```\r\n    \"build\": {\r\n        \"asarUnpack\": [\"node_modules/@gnaudio/jabra-node-sdk\"]\r\n    }\r\n    ```\r\n\r\n## Installation\r\nThis release is published to [npm](https://www.npmjs.com/package/@gnaudio/jabra-node-sdk) and can be installed via below command.\r\n```\r\nnpm install --save @gnaudio/jabra-node-sdk\r\n```\r\n\r\n## Debugging and Logging\r\nBelow environment variables are defined for logging and debugging purpose. User can change the values as per preference.\r\n\r\nEnvironment Variable | Value | Description\r\n--- | --- | ---\r\nLIBJABRA_TRACE_LEVEL | fatal, error, warning(default), info, debug | Log levels\r\nLIBJABRA_RESOURCE_PATH | **On Mac:** ~/Library/Application Support/JabraSDK/ **On Windows:** %appdata%/Roaming/JabraSDK  | This determine the system path where logs and device related files are written.\r\n\r\n## API Reference\r\nAPI doc is in html format. See doc folder inside installed module `node_modules\\@gnaudio\\jabra-node-sdk\\dist\\doc` and open `index.html`.\r\n\r\n## Examples\r\n\r\nFor all examples, user should first register the app on [Jabra developer site](https://developer.jabra.com/) to get appID. User should pass this appID to `createJabraApplication` in order to initialize the jabra module:\r\n\r\n### Simple button events example using javascript and plain promises\r\n\r\n```javascript\r\nconst j = require(\"@gnaudio/jabra-node-sdk\");\r\nj.createJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        console.log('Press any key on Jabra device ' + device.deviceName);\r\n        \r\n        device.on('btnPress', (btnType, btnValue) => {\r\n          console.log('New input from device is received: ', j.enumDeviceBtnType[btnType], btnValue);\r\n        });\r\n    });    \r\n});\r\n```\r\n\r\n### Simple button events example using typescript and plain promises\r\n\r\n```typescript\r\nimport { createJabraApplication, enumDeviceBtnType, enumHidState } from '@gnaudio/jabra-node-sdk';\r\ncreateJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        console.log('Press any key on Jabra device ' + device.deviceName);\r\n\r\n        device.on('btnPress', (btnType, btnValue) => {\r\n          console.log('New input from device is received: ', enumDeviceBtnType[btnType], btnValue);\r\n        });\r\n    });    \r\n});\r\n```\r\n\r\n### Ring example using typescript and plain promises\r\nThis example shows how to ring a Jabra device\r\n\r\n```typescript\r\nimport { createJabraApplication, JabraError } from '@gnaudio/jabra-node-sdk';\r\n\r\ncreateJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        device.isRingerSupportedAsync().then( (supported) => {\r\n            if (supported) {\r\n              device.ringAsync().then ( () => {\r\n                console.log('ringing');\r\n              }).catch ((err: JabraError) => {\r\n                console.log('ring failed with error ' + err);\r\n              }); // ring the device\r\n              setTimeout(() => {\r\n                device.unringAsync().then(() => {\r\n                    console.log('stopped ringing');\r\n                }).catch ((err: JabraError) => {\r\n                    console.log('unring failed with error ' + err);\r\n                });\r\n              }, 5000); // stop ringing the device after 5 second\r\n            }          \r\n        }).catch( (err: JabraError) => {\r\n            console.error('Jabra call failed with error ' + err)\r\n        });\r\n    });\r\n    \r\n    jabra.on('detach', (device) => {\r\n        console.log('Device detached with deviceID:', device.deviceID);\r\n\r\n        // In this demo example, we will auto shutdown once all jabra devices are removed:\r\n        let remainingAttachedDevices = jabra.getAttachedDevices();\r\n        if (remainingAttachedDevices.length == 0) {\r\n            jabra.disposeAsync().then (() => {}); // Cleanup and allow node process to exit.\r\n        }\r\n    });\r\n});\r\n```\r\n\r\n### Multiple device management with typescript and async/await\r\n\r\n```typescript\r\nimport { createJabraApplication } from '@gnaudio/jabra-node-sdk';\r\n\r\n(async () => {\r\n    let jabra = await createJabraApplication('123'); // 123 is appID here\r\n\r\n    await jabra.scanForDevicesDoneAsync(); // Wait for all pre-attached devices to be scanned.\r\n\r\n    const deviceInstanceList = jabra.getAttachedDevices();\r\n    if (deviceInstanceList.length<2) {\r\n        throw new Error('Please make sure 2 jabra devices are attached');\r\n    }\r\n\r\n    const firstDevice = deviceInstanceList[0];\r\n    await firstDevice.ringAsync();\r\n\r\n    const secondDevice = deviceInstanceList[1];\r\n    await secondDevice.ringAsync();\r\n\r\n    // Dispose jabra sdk to enable node process to shutdown.\r\n    await jabra.disposeAsync();\r\n})();\r\n```\r\n\r\n## Sequence diagrams\r\n\r\nThese sequence diagrams shows typical uses of the Node.js sdk:\r\n\r\n![Sequence diagram](docs/outgoing-call-then-end-call.png)\r\n\r\n![Sequence diagram](docs/incoming-call-then-accept-on-device-then-end-call.png)\r\n\r\n![Sequence diagram](docs/incoming-call-then-user-rejects.png)\r\n\r\n![Sequence diagram](docs/mute-unmute-from-device.png)\r\n\r\n![Sequence diagram](docs/hold-resume-from-device.png)\r\n\r\n## Setup VSCode\r\n\r\nThe project includes config files for debugging typescript and C++ source files\r\nin [Visual Studio Code](https://code.visualstudio.com/) via the\r\n[C++ extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools),\r\nfor both Windows and Linux. The configuration files work without any\r\nmodification, provided that you set up your environment first, by installing\r\nthe necessary tools and defining some environment variable.\r\n\r\nTo debug a C++ file, open a typescript file referencing the C++ file and start\r\nthe debugger (Running the debugger on C++ files directly won't work). Make sure\r\nthe \"Run\"-dropdown at the top of the debugging-sidebar is set to \"Current TS\r\nFile - native code only (&lt;your operating system&gt;)\"\r\n\r\nBelow, the setup steps for Windows and Linux.\r\n\r\n### Windows\r\nYou can more or less follow the instruction in\r\n[the VSCode C++ extension guide](https://code.visualstudio.com/docs/cpp/config-msvc).\r\nThen, you need to make sure all project [pre-requisites](#pre-requisite) are\r\ninstalled correctly, and finally set the following environment variables:\r\n\r\nEnvironment Variable | Value | Description\r\n--- | --- | ---\r\nLIBJABRA_WIN_NODE_GYP_CACHE_PATH | eg. %appdata%\\Local\\node-gyp\\Cache\\12.16.3\\include\\node | Used by the C/C++ extension to resolve include paths\r\nLIBJABRA_WIN_CPP_COMPILER_PATH | eg. C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x64/cl.exe | Used by the C/C++ extension to infer the path to the C++ standard library header files\r\n\r\n\r\n### Linux\r\nYou can read a more detailed guide on\r\n[the VSCode C++ extension page](https://code.visualstudio.com/docs/cpp/config-linux).\r\nThe important part is to install a C++ compiler and debugger. The easiest way\r\nis to install `build-essential` and `gdb`, this way:\r\n\r\n```sh\r\nsudo apt-get install build-essential gdb\r\n```\r\n\r\nThis maks your C++ compiler GCC, and you would likely use the `g++` command to\r\ncompile.\r\n\r\nThen, you need to install the project [pre-requisites](#pre-requisite), and\r\nfinally export the following environment variables:\r\n\r\nEnvironment Variable | Likely value | Description\r\n--- | --- | ---\r\nJABRA_NODESDK_CPP_COMPILER_PATH | /usr/bin/g++ | Used by the C/C++ extension to infer the path to the C++ standard library header files\r\nJABRA_NODESDK_NODE_GYP_CACHE_PATH | $HOME/.cache/node-gyp/14.4.0 | Used by the C/C++ extension to resolve include paths. **NOTE**: The final `include/node` is added by the configuration and it's not necessary\r\n","gypfile":true,"scripts":{"doc":"typedoc --mode file --excludePrivate --excludeExternals --excludeNotExported --out dist/doc src/main","tsc":"tsc","build":"npm run build:dev","clean":"node-gyp clean && rimraf dist","install":"node-gyp rebuild","prepare":"npm run tsc && npm run doc && node dist/script/generatemeta.js","build:dev":"node-gyp rebuild --debug && npm run tsc && npm run generatemeta","manualtest":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/manualtest/misc.ts","generatemeta":"ts-node src/script/generatemeta.ts","build:release":"node-gyp rebuild && npm run tsc && npm run generatemeta","example-btn-press-js":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/examples/button-press.js","example-btn-press-ts":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/examples/button-press.ts","example-ringer-sequence":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/examples/ringer-sequence.ts","pipeline-build-setversion":"node setversion.js"},"_npmUser":{"name":"martinjabra","email":"extmosoerensen@jabra.com"},"devEngines":{"npm":">=5.5.1","node":">=10.0.0"},"repository":{"url":"git+https://github.com/gnaudio/jabra-node-sdk.git","type":"git","directory":"nodesdk"},"_npmVersion":"6.14.6","description":"NodeJS SDK for Jabra Devices","directories":{},"_nodeVersion":"12.18.4","dependencies":{"bindings":"1.5.0","node-addon-api":"^3.0.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"rimraf":"3.0.2","ts-node":"8.8.2","typedoc":"0.17.4","cross-env":"7.0.2","typescript":"3.8.3","@types/node":"13.11.1","@types/bindings":"1.3.0","replace-in-file":"5.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jabra-node-sdk_3.2.2-beta.3_1615984907338_0.22970043209348012","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"3.2.2-beta.4":{"name":"@gnaudio/jabra-node-sdk","version":"3.2.2-beta.4","keywords":["jabra","sdk"],"author":{"name":"GN Audio"},"license":"MIT","_id":"@gnaudio/jabra-node-sdk@3.2.2-beta.4","maintainers":[{"name":"martinjabra","email":"extmosoerensen@jabra.com"},{"name":"jdv85","email":"jvesterheden@jabra.com"},{"name":"frederiksen","email":"mrtn.frederiksen@gmail.com"},{"name":"daniel_vasile_42","email":"fvasile@jabra.com"},{"name":"sskjabra","email":"sklausen@jabra.com"},{"name":"theisjabra","email":"tfroehlich@jabra.com"},{"name":"dlaezza-jabra","email":"dlaezza@jabra.com"},{"name":"ifmladenov","email":"ifmladenov@jabra.com"},{"name":"thammond","email":"thammond@jabra.com"}],"homepage":"https://github.com/gnaudio/jabra-node-sdk/","bugs":{"url":"https://developer.jabra.com"},"dist":{"shasum":"73bd94ddd7ce19c29aee117b96f5ca470d329fc8","tarball":"https://registry.npmjs.org/@gnaudio/jabra-node-sdk/-/jabra-node-sdk-3.2.2-beta.4.tgz","fileCount":159,"integrity":"sha512-sf5MW1128OcvHZR3qIWZjNGRiM98B3wVmH4DxedF57hZLadCkZ3Z+c9MYMafNIxrUbxNu82Yrk/JSG7w5N92sQ==","signatures":[{"sig":"MEQCIGaVKWpzGO5TRYycqDBOxxkDhvvCXuQc5k4s59Ac4n89AiA6YO0geQ16BETmtVdZg3b9+WuojPAtluUcD38CsAcr3g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":12247721,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgWar9CRA9TVsSAnZWagAApuUP/2mL/BjyBga47ncKiPdK\n5ww7rb+QAT5uoJTimvazUCVzCN7ZtBJlSN6k2z+rEoD0YXQXl7qeBtYxv7U/\n+UxmLEqTffHgRSz4aat+fktpM0HsiBIMETpa+htWJwiqDlo9ZLREYl+JWHZN\nm5KAGz7RpXND6nR4X6dQFmruVDLzcUjRzrENbhE9vlidK/xawU/cb2KKtO9N\nb5zl76kf62Orsh1J84w/Dm8nffyQyOVUBjrT2gmWYcvMlDd+UBLzDa/86QtL\noCxIJmfe/tYqfQmO1yfdIV4iad7dBPvf963VRrvhay+ZMq9R2k6NSSUjoHzx\nP0aXmrj/uWazwvS0qEcyPnHl47NIPe2Z9dJ8C8EIsKTELijySlqqZZcvB5O0\nNHVfnpteRbgwWgpsSBuUANFrJQa765W4zKm+whzOAwiPfnR8au6zFf+QncD7\n3PXHjixpiEIAwBT3x8XmMRad3dImUhHi0S02c3YbFn6qw9AYlxQ6vHcxaNb/\nGFB3JWYuINFt2h72zW7egJ2srURTe+InsKpWJ5HKTVfON0IAPWiuJt6+lall\n6QQkTnybodwcS1Z1nj6EjjOtMWM+XwAjmaCLQgWO5WjqqqabnvBSZzsAZW/O\ncQNNShm+dLrrgE+Dok/FmknnAqJwFOn3a8m7sOtdMKUXwtn/xp+ST/65Q7w6\nyiEV\r\n=mujT\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/main/index.js","types":"dist/main/index.d.ts","readme":"Jabra Node.js SDK\r\n\r\n# Table of Contents\r\n- [Versions](#versions)\r\n- [Pre-requisite](#pre-requisite)\r\n- [Installation](#installation)\r\n- [Debugging and Logging](#debugging-and-logging)\r\n- [API Reference](#api-reference)\r\n- [Examples](#examples)\r\n    - [Simple Example](#simple-button-events-example-using-javascript-and-plain-promises)\r\n    - [Multiple device management](#multiple-device-management-with-typescript-and-asyncawait)\r\n- [Sequence Diagrams](#sequence-diagrams)\r\n- [Setup VSCode](#setup-vsCode)\r\n    - [Windows](#windows)\r\n    - [Linux](#linux)\r\n- [Bug report](https://github.com/gnaudio/jabra-node-sdk#bug-reports)\r\n- [Changelog](https://github.com/gnaudio/jabra-node-sdk/blob/master/CHANGELOG.md)\r\n- [License](https://github.com/gnaudio/jabra-node-sdk/blob/master/LICENSE.md)\r\n- [FAQ](https://github.com/gnaudio/jabra-node-sdk/blob/master/FAQ.md)\r\n\r\n## Versions\r\n\r\n[![npm version](https://badge.fury.io/js/%40gnaudio%2Fjabra-node-sdk.svg)](https://badge.fury.io/js/%40gnaudio%2Fjabra-node-sdk)\r\n\r\nLatest **STABLE** release is  [distributed on npmjs.com](https://www.npmjs.com/package/@gnaudio/jabra-node-sdk/v/3.1.0) (see [changelog](https://github.com/gnaudio/jabra-node-sdk/blob/master/CHANGELOG.md) for changes and notable defects). \r\n\r\nIn addition, **BETA** versions may be available on npmjs with a version name ending with \"-beta.X\" specifier. For such BETA versions,the following applies:\r\n\r\n    > Disclaimer for Alpha and Beta Software Release\r\n\r\n    > Please note that this is a copyrighted Jabra Product ((c) 2017 GN Audio A/S) (the “Product”) which is still undergoing final testing before its official release. The Product and all content found on it are provided on an “as is” and “as available” basis. Jabra does not provide any warranties, neither express nor implied, as to the suitability or usability of the Product or any of its content.\r\n\r\n    > Jabra disclaims liability for any loss, whether direct, indirect, special or consequential, suffered by any person as a result of their use of the Product or the software embedded, and for any claim arising from any injury or damage, including but not limited to, any personal or bodily injury or tangible property damage, arising from or resulting in any way from any alleged defects in the material, workmanship, or performance of the Product, and Company shall indemnify Jabra in respect of any such claims. All usage of the Product is at users’ own risk and the user will be solely responsible for any resulting from such activities.\r\n\r\n    > Should you encounter any bugs, glitches, dangers, lack of functionality, lack of comfort or other problems with the Product, please let us know immediately so we can rectify these accordingly. Your help in this regard is greatly appreciated.\r\n\r\n    > The Product is released solely for test use in Company’s organization and must not under any circumstances be distributed to third parties without prior written acceptance from Jabra.\r\n\r\n    > By using the software, I accept and acknowledge the content herein.`\r\n\r\n## Pre-requisite\r\n1. Node.js v8.x or later.\r\n2. **On MacOS:** `xcode` & `python 2.7`. By default, Python is installed on macOS but make sure correct version(2.7.x) is installed. Install Xcode from App store or download it from [here](https://developer.apple.com/xcode/download/).\r\n3. **On Windows:** `Visual C++ Build Tools` & `Python 2.7`. You can install all of these by following any of the below mentioned steps.\r\n\r\n    3.1. **During Node.js installation** By ticking the checkbox when prompted during Node.js installation for `Tools for Native modules`, this installs both `Visual C++ Build Tools` & `Python 2.7`. **Note** This is prompted only for Windows platform. For other platforms like Linux or MAC, C++ compilation tools has to be installed separately as mentioned in other steps.\r\n\r\n    3.2. Both `Visual C++ Build Tools` & `Python 2.7` can also be installed using command `npm install --global --production --add-python-to-path windows-build-tools`. To know more about this tool, see [this link.](https://github.com/felixrieseberg/windows-build-tools). **Note** For executing this command through `Windows Command Prompt` or `Windows PowerShell`, they should be ran in Administrator mode.\r\n4. **On Linux:** `build-essential` package for C++ compilation & `Python 2.7`.\r\n\r\n    4.1. **Udev rules:** To be able to communicate with Jabra devices with non-root privileges it is required to create a udev rule for Jabra devices. Place the udev rule in `/etc/udev/rules.d`, and follow naming guidelines for udev files.              \r\n    \r\n    **Example:** The file name should be something like `80-jabra.rules` where the number before the dash indicates in what order the system reads the rules (e.g. if you had another rules file called `70-someotherrule.rules`, it would read that one first), the word after the dash is just an identifier of sorts (it could be something other than jabra) and the extension must be `.rules`.\r\n\r\n    The contents of the file are:\r\n\r\n    `ATTRS{idVendor}==\"0b0e\", MODE=\"0666\", GROUP=\"users\"`\r\n\r\n    After creating the udev file (as root), reload the udev rules using:\r\n\r\n    `sudo udevadm control --reload`\r\n\r\n    Reattach your Jabra device in order to get new permissions assigned.\r\n\r\n5. **All Platforms:** `node-gyp`. You can install this using command `npm install -g node-gyp`. To know more about this, see [this link](https://www.npmjs.com/package/node-gyp)\r\n\r\n6. **For Electron.JS:** If you are using `asar` packaging then you may need to `unpack` some of the resources used in this module. These resources are native library files i.e `libjabra.dll`, `libjabra.dylib` & `libjabra.so`, which is stored in a `build\\Release` folder. By default latest electron builder will automatically unpack, but if it does not work then you can provide below option to your build process. To know more, see [this link](https://www.electron.build/configuration/configuration)\r\n\r\n    ```\r\n    \"build\": {\r\n        \"asarUnpack\": [\"node_modules/@gnaudio/jabra-node-sdk\"]\r\n    }\r\n    ```\r\n\r\n## Installation\r\nThis release is published to [npm](https://www.npmjs.com/package/@gnaudio/jabra-node-sdk) and can be installed via below command.\r\n```\r\nnpm install --save @gnaudio/jabra-node-sdk\r\n```\r\n\r\n## Debugging and Logging\r\nBelow environment variables are defined for logging and debugging purpose. User can change the values as per preference.\r\n\r\nEnvironment Variable | Value | Description\r\n--- | --- | ---\r\nLIBJABRA_TRACE_LEVEL | fatal, error, warning(default), info, debug | Log levels\r\nLIBJABRA_RESOURCE_PATH | **On Mac:** ~/Library/Application Support/JabraSDK/ **On Windows:** %appdata%/Roaming/JabraSDK  | This determine the system path where logs and device related files are written.\r\n\r\n## API Reference\r\nAPI doc is in html format. See doc folder inside installed module `node_modules\\@gnaudio\\jabra-node-sdk\\dist\\doc` and open `index.html`.\r\n\r\n## Examples\r\n\r\nFor all examples, user should first register the app on [Jabra developer site](https://developer.jabra.com/) to get appID. User should pass this appID to `createJabraApplication` in order to initialize the jabra module:\r\n\r\n### Simple button events example using javascript and plain promises\r\n\r\n```javascript\r\nconst j = require(\"@gnaudio/jabra-node-sdk\");\r\nj.createJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        console.log('Press any key on Jabra device ' + device.deviceName);\r\n        \r\n        device.on('btnPress', (btnType, btnValue) => {\r\n          console.log('New input from device is received: ', j.enumDeviceBtnType[btnType], btnValue);\r\n        });\r\n    });    \r\n});\r\n```\r\n\r\n### Simple button events example using typescript and plain promises\r\n\r\n```typescript\r\nimport { createJabraApplication, enumDeviceBtnType, enumHidState } from '@gnaudio/jabra-node-sdk';\r\ncreateJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        console.log('Press any key on Jabra device ' + device.deviceName);\r\n\r\n        device.on('btnPress', (btnType, btnValue) => {\r\n          console.log('New input from device is received: ', enumDeviceBtnType[btnType], btnValue);\r\n        });\r\n    });    \r\n});\r\n```\r\n\r\n### Ring example using typescript and plain promises\r\nThis example shows how to ring a Jabra device\r\n\r\n```typescript\r\nimport { createJabraApplication, JabraError } from '@gnaudio/jabra-node-sdk';\r\n\r\ncreateJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        device.isRingerSupportedAsync().then( (supported) => {\r\n            if (supported) {\r\n              device.ringAsync().then ( () => {\r\n                console.log('ringing');\r\n              }).catch ((err: JabraError) => {\r\n                console.log('ring failed with error ' + err);\r\n              }); // ring the device\r\n              setTimeout(() => {\r\n                device.unringAsync().then(() => {\r\n                    console.log('stopped ringing');\r\n                }).catch ((err: JabraError) => {\r\n                    console.log('unring failed with error ' + err);\r\n                });\r\n              }, 5000); // stop ringing the device after 5 second\r\n            }          \r\n        }).catch( (err: JabraError) => {\r\n            console.error('Jabra call failed with error ' + err)\r\n        });\r\n    });\r\n    \r\n    jabra.on('detach', (device) => {\r\n        console.log('Device detached with deviceID:', device.deviceID);\r\n\r\n        // In this demo example, we will auto shutdown once all jabra devices are removed:\r\n        let remainingAttachedDevices = jabra.getAttachedDevices();\r\n        if (remainingAttachedDevices.length == 0) {\r\n            jabra.disposeAsync().then (() => {}); // Cleanup and allow node process to exit.\r\n        }\r\n    });\r\n});\r\n```\r\n\r\n### Multiple device management with typescript and async/await\r\n\r\n```typescript\r\nimport { createJabraApplication } from '@gnaudio/jabra-node-sdk';\r\n\r\n(async () => {\r\n    let jabra = await createJabraApplication('123'); // 123 is appID here\r\n\r\n    await jabra.scanForDevicesDoneAsync(); // Wait for all pre-attached devices to be scanned.\r\n\r\n    const deviceInstanceList = jabra.getAttachedDevices();\r\n    if (deviceInstanceList.length<2) {\r\n        throw new Error('Please make sure 2 jabra devices are attached');\r\n    }\r\n\r\n    const firstDevice = deviceInstanceList[0];\r\n    await firstDevice.ringAsync();\r\n\r\n    const secondDevice = deviceInstanceList[1];\r\n    await secondDevice.ringAsync();\r\n\r\n    // Dispose jabra sdk to enable node process to shutdown.\r\n    await jabra.disposeAsync();\r\n})();\r\n```\r\n\r\n## Sequence diagrams\r\n\r\nThese sequence diagrams shows typical uses of the Node.js sdk:\r\n\r\n![Sequence diagram](docs/outgoing-call-then-end-call.png)\r\n\r\n![Sequence diagram](docs/incoming-call-then-accept-on-device-then-end-call.png)\r\n\r\n![Sequence diagram](docs/incoming-call-then-user-rejects.png)\r\n\r\n![Sequence diagram](docs/mute-unmute-from-device.png)\r\n\r\n![Sequence diagram](docs/hold-resume-from-device.png)\r\n\r\n## Setup VSCode\r\n\r\nThe project includes config files for debugging typescript and C++ source files\r\nin [Visual Studio Code](https://code.visualstudio.com/) via the\r\n[C++ extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools),\r\nfor both Windows and Linux. The configuration files work without any\r\nmodification, provided that you set up your environment first, by installing\r\nthe necessary tools and defining some environment variable.\r\n\r\nTo debug a C++ file, open a typescript file referencing the C++ file and start\r\nthe debugger (Running the debugger on C++ files directly won't work). Make sure\r\nthe \"Run\"-dropdown at the top of the debugging-sidebar is set to \"Current TS\r\nFile - native code only (&lt;your operating system&gt;)\"\r\n\r\nBelow, the setup steps for Windows and Linux.\r\n\r\n### Windows\r\nYou can more or less follow the instruction in\r\n[the VSCode C++ extension guide](https://code.visualstudio.com/docs/cpp/config-msvc).\r\nThen, you need to make sure all project [pre-requisites](#pre-requisite) are\r\ninstalled correctly, and finally set the following environment variables:\r\n\r\nEnvironment Variable | Value | Description\r\n--- | --- | ---\r\nLIBJABRA_WIN_NODE_GYP_CACHE_PATH | eg. %appdata%\\Local\\node-gyp\\Cache\\12.16.3\\include\\node | Used by the C/C++ extension to resolve include paths\r\nLIBJABRA_WIN_CPP_COMPILER_PATH | eg. C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x64/cl.exe | Used by the C/C++ extension to infer the path to the C++ standard library header files\r\n\r\n\r\n### Linux\r\nYou can read a more detailed guide on\r\n[the VSCode C++ extension page](https://code.visualstudio.com/docs/cpp/config-linux).\r\nThe important part is to install a C++ compiler and debugger. The easiest way\r\nis to install `build-essential` and `gdb`, this way:\r\n\r\n```sh\r\nsudo apt-get install build-essential gdb\r\n```\r\n\r\nThis maks your C++ compiler GCC, and you would likely use the `g++` command to\r\ncompile.\r\n\r\nThen, you need to install the project [pre-requisites](#pre-requisite), and\r\nfinally export the following environment variables:\r\n\r\nEnvironment Variable | Likely value | Description\r\n--- | --- | ---\r\nJABRA_NODESDK_CPP_COMPILER_PATH | /usr/bin/g++ | Used by the C/C++ extension to infer the path to the C++ standard library header files\r\nJABRA_NODESDK_NODE_GYP_CACHE_PATH | $HOME/.cache/node-gyp/14.4.0 | Used by the C/C++ extension to resolve include paths. **NOTE**: The final `include/node` is added by the configuration and it's not necessary\r\n","gypfile":true,"scripts":{"doc":"typedoc --mode file --excludePrivate --excludeExternals --excludeNotExported --out dist/doc src/main","tsc":"tsc","build":"npm run build:dev","clean":"node-gyp clean && rimraf dist","install":"node-gyp rebuild","prepare":"npm run tsc && npm run doc && node dist/script/generatemeta.js","build:dev":"node-gyp rebuild --debug && npm run tsc && npm run generatemeta","manualtest":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/manualtest/misc.ts","generatemeta":"ts-node src/script/generatemeta.ts","build:release":"node-gyp rebuild && npm run tsc && npm run generatemeta","example-btn-press-js":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/examples/button-press.js","example-btn-press-ts":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/examples/button-press.ts","example-ringer-sequence":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/examples/ringer-sequence.ts","pipeline-build-setversion":"node setversion.js"},"_npmUser":{"name":"martinjabra","email":"extmosoerensen@jabra.com"},"devEngines":{"npm":">=5.5.1","node":">=10.0.0"},"repository":{"url":"git+https://github.com/gnaudio/jabra-node-sdk.git","type":"git","directory":"nodesdk"},"_npmVersion":"6.14.6","description":"NodeJS SDK for Jabra Devices","directories":{},"_nodeVersion":"12.18.4","dependencies":{"bindings":"1.5.0","node-addon-api":"^3.0.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"rimraf":"3.0.2","ts-node":"8.8.2","typedoc":"0.17.4","cross-env":"7.0.2","typescript":"3.8.3","@types/node":"13.11.1","@types/bindings":"1.3.0","replace-in-file":"5.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jabra-node-sdk_3.2.2-beta.4_1616489212446_0.3941626367916833","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"3.2.2-beta.5":{"name":"@gnaudio/jabra-node-sdk","version":"3.2.2-beta.5","keywords":["jabra","sdk"],"author":{"name":"GN Audio"},"license":"MIT","_id":"@gnaudio/jabra-node-sdk@3.2.2-beta.5","maintainers":[{"name":"martinjabra","email":"extmosoerensen@jabra.com"},{"name":"jdv85","email":"jvesterheden@jabra.com"},{"name":"frederiksen","email":"mrtn.frederiksen@gmail.com"},{"name":"daniel_vasile_42","email":"fvasile@jabra.com"},{"name":"sskjabra","email":"sklausen@jabra.com"},{"name":"theisjabra","email":"tfroehlich@jabra.com"},{"name":"dlaezza-jabra","email":"dlaezza@jabra.com"},{"name":"ifmladenov","email":"ifmladenov@jabra.com"},{"name":"thammond","email":"thammond@jabra.com"}],"homepage":"https://github.com/gnaudio/jabra-node-sdk/","bugs":{"url":"https://developer.jabra.com"},"dist":{"shasum":"2cdd7ff20baaeb9738bda099dac60bfc7c18b5a2","tarball":"https://registry.npmjs.org/@gnaudio/jabra-node-sdk/-/jabra-node-sdk-3.2.2-beta.5.tgz","fileCount":159,"integrity":"sha512-4vXL69HEsSg7pyYTG2azJTnSyxQbB/fZ/tWFcvnU6075aXTXrgFNaKGJ4qdy9ok8PzzQOpytrDiffYU7VmyREQ==","signatures":[{"sig":"MEYCIQDzHtLeblXeHovJ7VoGenluivP7Yc+KcBlRC+dC/LziRQIhAJ1YtFukU558b0eBy3acHR+o4Xi4DD0KJuP5pUsmgwVE","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":12247752,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgWwYiCRA9TVsSAnZWagAArkEQAJ+r0LBjA5+b9YVdDJtA\nJZqKdYymqFKQ3Ucrcsk/N1orFXa7fCPh5oXbvXwXpCk315s5UJMqE/LcRrq5\nA/coBAA1d2SmpybxxnIpuqo+maE00jqrACtAYT57NcJhVh0/pBcDV7VQbn/e\nnEF7RS9MDnv9Qw1SLqiYUF4BUaK9p/Y4C//IVkVHaG482uPeOHOP7WykQTin\n14U1UewBDMVgQKe6YNhZGZRfoEyMVfNyuYla3cXKVsG+IVJFo4u1Ew0cOAXB\nNoiL9eiJwAnOd5G3pK6kwFRjJvAaZY91QK9avvFfjb71zM+DIwc9TvSVdKmm\n+L3BNrSRyQCyES5LBDue6cVhioBCtwloqSvBm1NwAZ5F1UnUgIeZmzGVR1R3\nCnYQbQ4NAiJOZBfntNN3VCuMM0Evz4ptiN7TWDnDza2Cdcj/wG1v/ZyMJJwi\n9vK67PXGCHxHfxB1A+hn9YYbQnkRbuouqHbSoKVGrM8Ig8ANN7PgQedRwpUq\nJzV0VJ+VkFC6Hng6cT5nMgD0Ca7T7H8u6MBeMxJU6TySMausp3MUkNboQHMs\nvsq9f2w9UXGzV9wbPbp5AH+r3bXoE82pLJDr1NE4JXgu9vaJS8lYzoIvW8a8\nbywvZfFzTNV5KECWLDs2RhLe3j447IOepOLriH+Dm3UxKXqLQZmB2S94wbSg\nJUBo\r\n=/7lQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/main/index.js","types":"dist/main/index.d.ts","readme":"Jabra Node.js SDK\r\n\r\n# Table of Contents\r\n\r\n- [Table of Contents](#table-of-contents)\r\n  - [Versions](#versions)\r\n  - [Pre-requisite](#pre-requisite)\r\n  - [Installation](#installation)\r\n  - [Debugging and Logging](#debugging-and-logging)\r\n  - [API Reference](#api-reference)\r\n  - [Examples](#examples)\r\n    - [Simple button events example using javascript and plain promises](#simple-button-events-example-using-javascript-and-plain-promises)\r\n    - [Simple button events example using typescript and plain promises](#simple-button-events-example-using-typescript-and-plain-promises)\r\n    - [Ring example using typescript and plain promises](#ring-example-using-typescript-and-plain-promises)\r\n    - [Multiple device management with typescript and async/await](#multiple-device-management-with-typescript-and-asyncawait)\r\n  - [Sequence diagrams](#sequence-diagrams)\r\n  - [Setup VSCode](#setup-vscode)\r\n    - [Windows](#windows)\r\n    - [Linux](#linux)\r\n\r\n## Versions\r\n\r\n[![npm version](https://badge.fury.io/js/%40gnaudio%2Fjabra-node-sdk.svg)](https://badge.fury.io/js/%40gnaudio%2Fjabra-node-sdk)\r\n\r\nLatest **STABLE** release is  [distributed on npmjs.com](https://www.npmjs.com/package/@gnaudio/jabra-node-sdk/) (see [changelog](../CHANGELOG.md) for changes and notable defects).\r\n\r\nIn addition, **BETA** versions may be available on npmjs with a version name ending with \"-beta.X\" specifier. For such BETA versions,the following applies:\r\n\r\n    > Disclaimer for Alpha and Beta Software Release\r\n\r\n    > Please note that this is a copyrighted Jabra Product ((c) 2017 GN Audio A/S) (the “Product”) which is still undergoing final testing before its official release. The Product and all content found on it are provided on an “as is” and “as available” basis. Jabra does not provide any warranties, neither express nor implied, as to the suitability or usability of the Product or any of its content.\r\n\r\n    > Jabra disclaims liability for any loss, whether direct, indirect, special or consequential, suffered by any person as a result of their use of the Product or the software embedded, and for any claim arising from any injury or damage, including but not limited to, any personal or bodily injury or tangible property damage, arising from or resulting in any way from any alleged defects in the material, workmanship, or performance of the Product, and Company shall indemnify Jabra in respect of any such claims. All usage of the Product is at users’ own risk and the user will be solely responsible for any resulting from such activities.\r\n\r\n    > Should you encounter any bugs, glitches, dangers, lack of functionality, lack of comfort or other problems with the Product, please let us know immediately so we can rectify these accordingly. Your help in this regard is greatly appreciated.\r\n\r\n    > The Product is released solely for test use in Company’s organization and must not under any circumstances be distributed to third parties without prior written acceptance from Jabra.\r\n\r\n    > By using the software, I accept and acknowledge the content herein.`\r\n\r\n## Pre-requisite\r\n\r\n1. Node.js v8.x or later.\r\n2. **On MacOS:** `xcode` & `python 2.7`. By default, Python is installed on macOS but make sure correct version(2.7.x) is installed. Install Xcode from App store or download it from [here](https://developer.apple.com/xcode/download/).\r\n3. **On Windows:** `Visual C++ Build Tools` & `Python 2.7`. You can install all of these by following any of the below mentioned steps.\r\n\r\n    3.1. **During Node.js installation** By ticking the checkbox when prompted during Node.js installation for `Tools for Native modules`, this installs both `Visual C++ Build Tools` & `Python 2.7`. **Note** This is prompted only for Windows platform. For other platforms like Linux or MAC, C++ compilation tools has to be installed separately as mentioned in other steps.\r\n\r\n    3.2. Both `Visual C++ Build Tools` & `Python 2.7` can also be installed using command `npm install --global --production --add-python-to-path windows-build-tools`. To know more about this tool, see [this link.](https://github.com/felixrieseberg/windows-build-tools). **Note** For executing this command through `Windows Command Prompt` or `Windows PowerShell`, they should be ran in Administrator mode.\r\n4. **On Linux:** `build-essential` package for C++ compilation & `Python 2.7`.\r\n\r\n    4.1. **Udev rules:** To be able to communicate with Jabra devices with non-root privileges it is required to create a udev rule for Jabra devices. Place the udev rule in `/etc/udev/rules.d`, and follow naming guidelines for udev files.\r\n\r\n    **Example:** The file name should be something like `80-jabra.rules` where the number before the dash indicates in what order the system reads the rules (e.g. if you had another rules file called `70-someotherrule.rules`, it would read that one first), the word after the dash is just an identifier of sorts (it could be something other than jabra) and the extension must be `.rules`.\r\n\r\n    The contents of the file are:\r\n\r\n    `ATTRS{idVendor}==\"0b0e\", MODE=\"0666\", GROUP=\"users\"`\r\n\r\n    After creating the udev file (as root), reload the udev rules using:\r\n\r\n    `sudo udevadm control --reload`\r\n\r\n    Reattach your Jabra device in order to get new permissions assigned.\r\n\r\n5. **All Platforms:** `node-gyp`. You can install this using command `npm install -g node-gyp`. To know more about this, see [this link](https://www.npmjs.com/package/node-gyp)\r\n\r\n6. **For Electron.JS:** If you are using `asar` packaging then you may need to `unpack` some of the resources used in this module. These resources are native library files i.e `libjabra.dll`, `libjabra.dylib` & `libjabra.so`, which is stored in a `build\\Release` folder. By default latest electron builder will automatically unpack, but if it does not work then you can provide below option to your build process. To know more, see [this link](https://www.electron.build/configuration/configuration)\r\n\r\n```javascript\r\n\"build\": {\r\n    \"asarUnpack\": [\"node_modules/@gnaudio/jabra-node-sdk\"]\r\n}\r\n```\r\n\r\n## Installation\r\n\r\nThis release is published to [npm](https://www.npmjs.com/package/@gnaudio/jabra-node-sdk) and can be installed via below command.\r\n\r\n```sh\r\nnpm install --save @gnaudio/jabra-node-sdk\r\n```\r\n\r\n## Debugging and Logging\r\n\r\nBelow environment variables are defined for logging and debugging purpose. User can change the values as per preference.\r\n\r\nEnvironment Variable | Value | Description\r\n--- | --- | ---\r\nLIBJABRA_TRACE_LEVEL | fatal, error, warning(default), info, debug | Log levels\r\nLIBJABRA_RESOURCE_PATH | **On Mac:** ~/Library/Application Support/JabraSDK/ **On Windows:** %appdata%/Roaming/JabraSDK  | This determine the system path where logs and device related files are written.\r\n\r\n## API Reference\r\n\r\nAPI doc is in html format. See doc folder inside installed module `node_modules\\@gnaudio\\jabra-node-sdk\\dist\\doc` and open `index.html`.\r\n\r\n## Examples\r\n\r\nFor all examples, user should first register the app on [Jabra developer site](https://developer.jabra.com/) to get appID. User should pass this appID to `createJabraApplication` in order to initialize the jabra module:\r\n\r\n### Simple button events example using javascript and plain promises\r\n\r\n```javascript\r\nconst j = require(\"@gnaudio/jabra-node-sdk\");\r\nj.createJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        console.log('Press any key on Jabra device ' + device.deviceName);\r\n        \r\n        device.on('btnPress', (btnType, btnValue) => {\r\n          console.log('New input from device is received: ', j.enumDeviceBtnType[btnType], btnValue);\r\n        });\r\n    });    \r\n});\r\n```\r\n\r\n### Simple button events example using typescript and plain promises\r\n\r\n```typescript\r\nimport { createJabraApplication, enumDeviceBtnType, enumHidState } from '@gnaudio/jabra-node-sdk';\r\ncreateJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        console.log('Press any key on Jabra device ' + device.deviceName);\r\n\r\n        device.on('btnPress', (btnType, btnValue) => {\r\n          console.log('New input from device is received: ', enumDeviceBtnType[btnType], btnValue);\r\n        });\r\n    });    \r\n});\r\n```\r\n\r\n### Ring example using typescript and plain promises\r\n\r\nThis example shows how to ring a Jabra device\r\n\r\n```typescript\r\nimport { createJabraApplication, JabraError } from '@gnaudio/jabra-node-sdk';\r\n\r\ncreateJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        device.isRingerSupportedAsync().then( (supported) => {\r\n            if (supported) {\r\n              device.ringAsync().then ( () => {\r\n                console.log('ringing');\r\n              }).catch ((err: JabraError) => {\r\n                console.log('ring failed with error ' + err);\r\n              }); // ring the device\r\n              setTimeout(() => {\r\n                device.unringAsync().then(() => {\r\n                    console.log('stopped ringing');\r\n                }).catch ((err: JabraError) => {\r\n                    console.log('unring failed with error ' + err);\r\n                });\r\n              }, 5000); // stop ringing the device after 5 second\r\n            }          \r\n        }).catch( (err: JabraError) => {\r\n            console.error('Jabra call failed with error ' + err)\r\n        });\r\n    });\r\n    \r\n    jabra.on('detach', (device) => {\r\n        console.log('Device detached with deviceID:', device.deviceID);\r\n\r\n        // In this demo example, we will auto shutdown once all jabra devices are removed:\r\n        let remainingAttachedDevices = jabra.getAttachedDevices();\r\n        if (remainingAttachedDevices.length == 0) {\r\n            jabra.disposeAsync().then (() => {}); // Cleanup and allow node process to exit.\r\n        }\r\n    });\r\n});\r\n```\r\n\r\n### Multiple device management with typescript and async/await\r\n\r\n```typescript\r\nimport { createJabraApplication } from '@gnaudio/jabra-node-sdk';\r\n\r\n(async () => {\r\n    let jabra = await createJabraApplication('123'); // 123 is appID here\r\n\r\n    await jabra.scanForDevicesDoneAsync(); // Wait for all pre-attached devices to be scanned.\r\n\r\n    const deviceInstanceList = jabra.getAttachedDevices();\r\n    if (deviceInstanceList.length<2) {\r\n        throw new Error('Please make sure 2 jabra devices are attached');\r\n    }\r\n\r\n    const firstDevice = deviceInstanceList[0];\r\n    await firstDevice.ringAsync();\r\n\r\n    const secondDevice = deviceInstanceList[1];\r\n    await secondDevice.ringAsync();\r\n\r\n    // Dispose jabra sdk to enable node process to shutdown.\r\n    await jabra.disposeAsync();\r\n})();\r\n```\r\n\r\n## Sequence diagrams\r\n\r\nThese sequence diagrams shows typical uses of the Node.js sdk:\r\n\r\n![Sequence diagram](docs/outgoing-call-then-end-call.png)\r\n\r\n![Sequence diagram](docs/incoming-call-then-accept-on-device-then-end-call.png)\r\n\r\n![Sequence diagram](docs/incoming-call-then-user-rejects.png)\r\n\r\n![Sequence diagram](docs/mute-unmute-from-device.png)\r\n\r\n![Sequence diagram](docs/hold-resume-from-device.png)\r\n\r\n## Setup VSCode\r\n\r\nThe project includes config files for debugging typescript and C++ source files\r\nin [Visual Studio Code](https://code.visualstudio.com/) via the\r\n[C++ extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools),\r\nfor both Windows and Linux. The configuration files work without any\r\nmodification, provided that you set up your environment first, by installing\r\nthe necessary tools and defining some environment variable.\r\n\r\nTo debug a C++ file, open a typescript file referencing the C++ file and start\r\nthe debugger (Running the debugger on C++ files directly won't work). Make sure\r\nthe \"Run\"-dropdown at the top of the debugging-sidebar is set to \"Current TS\r\nFile - native code only (&lt;your operating system&gt;)\"\r\n\r\nBelow, the setup steps for Windows and Linux.\r\n\r\n### Windows\r\n\r\nYou can more or less follow the instruction in\r\n[the VSCode C++ extension guide](https://code.visualstudio.com/docs/cpp/config-msvc).\r\nThen, you need to make sure all project [pre-requisites](#pre-requisite) are\r\ninstalled correctly, and finally set the following environment variables:\r\n\r\nEnvironment Variable | Value | Description\r\n--- | --- | ---\r\nLIBJABRA_WIN_NODE_GYP_CACHE_PATH | eg. %appdata%\\Local\\node-gyp\\Cache\\12.16.3\\include\\node | Used by the C/C++ extension to resolve include paths\r\nLIBJABRA_WIN_CPP_COMPILER_PATH | eg. C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x64/cl.exe | Used by the C/C++ extension to infer the path to the C++ standard library header files\r\n\r\n### Linux\r\n\r\nYou can read a more detailed guide on\r\n[the VSCode C++ extension page](https://code.visualstudio.com/docs/cpp/config-linux).\r\nThe important part is to install a C++ compiler and debugger. The easiest way\r\nis to install `build-essential` and `gdb`, this way:\r\n\r\n```sh\r\nsudo apt-get install build-essential gdb\r\n```\r\n\r\nThis maks your C++ compiler GCC, and you would likely use the `g++` command to\r\ncompile.\r\n\r\nThen, you need to install the project [pre-requisites](#pre-requisite), and\r\nfinally export the following environment variables:\r\n\r\nEnvironment Variable | Likely value | Description\r\n--- | --- | ---\r\nJABRA_NODESDK_CPP_COMPILER_PATH | /usr/bin/g++ | Used by the C/C++ extension to infer the path to the C++ standard library header files\r\nJABRA_NODESDK_NODE_GYP_CACHE_PATH | $HOME/.cache/node-gyp/14.4.0 | Used by the C/C++ extension to resolve include paths. **NOTE**: The final `include/node` is added by the configuration and it's not necessary\r\n","gypfile":true,"scripts":{"doc":"typedoc --mode file --excludePrivate --excludeExternals --excludeNotExported --out dist/doc src/main","tsc":"tsc","build":"npm run build:dev","clean":"node-gyp clean && rimraf dist","install":"node-gyp rebuild","prepare":"npm run tsc && npm run doc && node dist/script/generatemeta.js","build:dev":"node-gyp rebuild --debug && npm run tsc && npm run generatemeta","manualtest":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/manualtest/misc.ts","generatemeta":"ts-node src/script/generatemeta.ts","build:release":"node-gyp rebuild && npm run tsc && npm run generatemeta","example-btn-press-js":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/examples/button-press.js","example-btn-press-ts":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/examples/button-press.ts","example-ringer-sequence":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/examples/ringer-sequence.ts","pipeline-build-setversion":"node setversion.js"},"_npmUser":{"name":"martinjabra","email":"extmosoerensen@jabra.com"},"devEngines":{"npm":">=5.5.1","node":">=10.0.0"},"repository":{"url":"git+https://github.com/gnaudio/jabra-node-sdk.git","type":"git","directory":"nodesdk"},"_npmVersion":"6.14.11","description":"NodeJS SDK for Jabra Devices","directories":{},"_nodeVersion":"12.21.0","dependencies":{"bindings":"1.5.0","node-addon-api":"^3.0.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"rimraf":"3.0.2","ts-node":"8.8.2","typedoc":"0.17.4","cross-env":"7.0.2","typescript":"3.8.3","@types/node":"13.11.1","@types/bindings":"1.3.0","replace-in-file":"5.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jabra-node-sdk_3.2.2-beta.5_1616578081857_0.6505172464994842","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"3.2.2-beta.6":{"name":"@gnaudio/jabra-node-sdk","version":"3.2.2-beta.6","keywords":["jabra","sdk"],"author":{"name":"GN Audio"},"license":"MIT","_id":"@gnaudio/jabra-node-sdk@3.2.2-beta.6","maintainers":[{"name":"martinjabra","email":"extmosoerensen@jabra.com"},{"name":"jdv85","email":"jvesterheden@jabra.com"},{"name":"frederiksen","email":"mrtn.frederiksen@gmail.com"},{"name":"daniel_vasile_42","email":"fvasile@jabra.com"},{"name":"sskjabra","email":"sklausen@jabra.com"},{"name":"theisjabra","email":"tfroehlich@jabra.com"},{"name":"dlaezza-jabra","email":"dlaezza@jabra.com"},{"name":"ifmladenov","email":"ifmladenov@jabra.com"},{"name":"thammond","email":"thammond@jabra.com"}],"homepage":"https://github.com/gnaudio/jabra-node-sdk/","bugs":{"url":"https://developer.jabra.com"},"dist":{"shasum":"9707d575581c25244a8f9c048b5d770bd23349be","tarball":"https://registry.npmjs.org/@gnaudio/jabra-node-sdk/-/jabra-node-sdk-3.2.2-beta.6.tgz","fileCount":159,"integrity":"sha512-nDu5zP6yi6BSYCtz4wFuxN5bfXx7SP1mG7URQpxd9hfwoM5El8C8csIM8k0pIuzdurYb1y6OYZ1CN8KAr+CQsA==","signatures":[{"sig":"MEUCIFhV9ul0qmddVmM4L2VzGYexc/KH8IcpTz0iBnWIUKLkAiEAgHZNZLGGmFV21RLGFmOeNpDMLzwl7K5NIMd0dBEEZIU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":12246499,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgbF6/CRA9TVsSAnZWagAA0+4P/RDwxFoKRuSNr1xULy6H\nfS4fMflb5+IQhPbHb/1EOK6tZ2PlGAPw5/pVv5jgfNjL0GldXEw3MvsGdXXl\n2RqJd+R9ZT1r6czuy+C3PhWy2sqpECD+0EAkmlEB4xU2lDLFWjvQRvbOHbMi\n7l7LF2S2QToMT14qvjiJgnm19f+eYcAr1uqhjLOpKC597y4QyyzeIxf0zB9D\n3gFaSG30TRelf6Z61WYq4oNcQnwLOvmsVQGMvpXfzlO7i9aIcQP4P4d1778c\nV7XrHJMksx+aNTd7rXH2BaFNZgaI32RwXUPUAXCNWpXIUuUUNSHvYfX0JnNQ\n709J/XyU5vbSdjXgGO/Dc1glytWYjSXPbVQbHhDCiTYLHds25bGGcB/aIxM/\n6vZ0BSxLDVJwleXVsxRdwOc8LkdZjsIe/HgwbCgdLUvj7flMD1wMJbtglrOC\n1xwyNugL7yrPtVnviPkdcFq9rK5r08Vw04PBUytGCxKCFBWn1GGNk4tANe4y\nwLCpnXD9WBAqOs1wi2G4faPutMVmemA1q+hNErI3ao8ZxHivAmCWYSQHkLTG\n2MgCcLvJl28CUQJQ23Enot8qRDQgoV7EbarrbWkPgv4u6F7r6nBlzRoHDFoV\nM/LyfcOg8Tw9CR5tFvfPxWdIZvPOIk5H/sUDtA2eHJqyxmxzrrJP+/OSzJL8\nODn1\r\n=x6ep\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/main/index.js","types":"dist/main/index.d.ts","readme":"Jabra Node.js SDK\r\n\r\n# Table of Contents\r\n\r\n- [Table of Contents](#table-of-contents)\r\n  - [Versions](#versions)\r\n  - [Pre-requisite](#pre-requisite)\r\n  - [Installation](#installation)\r\n  - [Debugging and Logging](#debugging-and-logging)\r\n  - [API Reference](#api-reference)\r\n  - [Examples](#examples)\r\n    - [Simple button events example using javascript and plain promises](#simple-button-events-example-using-javascript-and-plain-promises)\r\n    - [Simple button events example using typescript and plain promises](#simple-button-events-example-using-typescript-and-plain-promises)\r\n    - [Ring example using typescript and plain promises](#ring-example-using-typescript-and-plain-promises)\r\n    - [Multiple device management with typescript and async/await](#multiple-device-management-with-typescript-and-asyncawait)\r\n  - [Sequence diagrams](#sequence-diagrams)\r\n  - [Setup VSCode](#setup-vscode)\r\n    - [Windows](#windows)\r\n    - [Linux](#linux)\r\n\r\n## Versions\r\n\r\n[![npm version](https://badge.fury.io/js/%40gnaudio%2Fjabra-node-sdk.svg)](https://badge.fury.io/js/%40gnaudio%2Fjabra-node-sdk)\r\n\r\nLatest **STABLE** release is  [distributed on npmjs.com](https://www.npmjs.com/package/@gnaudio/jabra-node-sdk/) (see [changelog](../CHANGELOG.md) for changes and notable defects).\r\n\r\nIn addition, **BETA** versions may be available on npmjs with a version name ending with \"-beta.X\" specifier. For such BETA versions,the following applies:\r\n\r\n    > Disclaimer for Alpha and Beta Software Release\r\n\r\n    > Please note that this is a copyrighted Jabra Product ((c) 2017 GN Audio A/S) (the “Product”) which is still undergoing final testing before its official release. The Product and all content found on it are provided on an “as is” and “as available” basis. Jabra does not provide any warranties, neither express nor implied, as to the suitability or usability of the Product or any of its content.\r\n\r\n    > Jabra disclaims liability for any loss, whether direct, indirect, special or consequential, suffered by any person as a result of their use of the Product or the software embedded, and for any claim arising from any injury or damage, including but not limited to, any personal or bodily injury or tangible property damage, arising from or resulting in any way from any alleged defects in the material, workmanship, or performance of the Product, and Company shall indemnify Jabra in respect of any such claims. All usage of the Product is at users’ own risk and the user will be solely responsible for any resulting from such activities.\r\n\r\n    > Should you encounter any bugs, glitches, dangers, lack of functionality, lack of comfort or other problems with the Product, please let us know immediately so we can rectify these accordingly. Your help in this regard is greatly appreciated.\r\n\r\n    > The Product is released solely for test use in Company’s organization and must not under any circumstances be distributed to third parties without prior written acceptance from Jabra.\r\n\r\n    > By using the software, I accept and acknowledge the content herein.`\r\n\r\n## Pre-requisite\r\n\r\n1. Node.js v8.x or later.\r\n2. **On MacOS:** `xcode` & `python 2.7`. By default, Python is installed on macOS but make sure correct version(2.7.x) is installed. Install Xcode from App store or download it from [here](https://developer.apple.com/xcode/download/).\r\n3. **On Windows:** `Visual C++ Build Tools` & `Python 2.7`. You can install all of these by following any of the below mentioned steps.\r\n\r\n    3.1. **During Node.js installation** By ticking the checkbox when prompted during Node.js installation for `Tools for Native modules`, this installs both `Visual C++ Build Tools` & `Python 2.7`. **Note** This is prompted only for Windows platform. For other platforms like Linux or MAC, C++ compilation tools has to be installed separately as mentioned in other steps.\r\n\r\n    3.2. Both `Visual C++ Build Tools` & `Python 2.7` can also be installed using command `npm install --global --production --add-python-to-path windows-build-tools`. To know more about this tool, see [this link.](https://github.com/felixrieseberg/windows-build-tools). **Note** For executing this command through `Windows Command Prompt` or `Windows PowerShell`, they should be ran in Administrator mode.\r\n4. **On Linux:** `build-essential` package for C++ compilation & `Python 2.7`.\r\n\r\n    4.1. **Udev rules:** To be able to communicate with Jabra devices with non-root privileges it is required to create a udev rule for Jabra devices. Place the udev rule in `/etc/udev/rules.d`, and follow naming guidelines for udev files.\r\n\r\n    **Example:** The file name should be something like `80-jabra.rules` where the number before the dash indicates in what order the system reads the rules (e.g. if you had another rules file called `70-someotherrule.rules`, it would read that one first), the word after the dash is just an identifier of sorts (it could be something other than jabra) and the extension must be `.rules`.\r\n\r\n    The contents of the file are:\r\n\r\n    `ATTRS{idVendor}==\"0b0e\", MODE=\"0666\", GROUP=\"users\"`\r\n\r\n    After creating the udev file (as root), reload the udev rules using:\r\n\r\n    `sudo udevadm control --reload`\r\n\r\n    Reattach your Jabra device in order to get new permissions assigned.\r\n\r\n5. **All Platforms:** `node-gyp`. You can install this using command `npm install -g node-gyp`. To know more about this, see [this link](https://www.npmjs.com/package/node-gyp)\r\n\r\n6. **For Electron.JS:** If you are using `asar` packaging then you may need to `unpack` some of the resources used in this module. These resources are native library files i.e `libjabra.dll`, `libjabra.dylib` & `libjabra.so`, which is stored in a `build\\Release` folder. By default latest electron builder will automatically unpack, but if it does not work then you can provide below option to your build process. To know more, see [this link](https://www.electron.build/configuration/configuration)\r\n\r\n```javascript\r\n\"build\": {\r\n    \"asarUnpack\": [\"node_modules/@gnaudio/jabra-node-sdk\"]\r\n}\r\n```\r\n\r\n## Installation\r\n\r\nThis release is published to [npm](https://www.npmjs.com/package/@gnaudio/jabra-node-sdk) and can be installed via below command.\r\n\r\n```sh\r\nnpm install --save @gnaudio/jabra-node-sdk\r\n```\r\n\r\n## Debugging and Logging\r\n\r\nBelow environment variables are defined for logging and debugging purpose. User can change the values as per preference.\r\n\r\nEnvironment Variable | Value | Description\r\n--- | --- | ---\r\nLIBJABRA_TRACE_LEVEL | fatal, error, warning(default), info, debug | Log levels\r\nLIBJABRA_RESOURCE_PATH | **On Mac:** ~/Library/Application Support/JabraSDK/ **On Windows:** %appdata%/Roaming/JabraSDK  | This determine the system path where logs and device related files are written.\r\n\r\n## API Reference\r\n\r\nAPI doc is in html format. See doc folder inside installed module `node_modules\\@gnaudio\\jabra-node-sdk\\dist\\doc` and open `index.html`.\r\n\r\n## Examples\r\n\r\nFor all examples, user should first register the app on [Jabra developer site](https://developer.jabra.com/) to get appID. User should pass this appID to `createJabraApplication` in order to initialize the jabra module:\r\n\r\n### Simple button events example using javascript and plain promises\r\n\r\n```javascript\r\nconst j = require(\"@gnaudio/jabra-node-sdk\");\r\nj.createJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        console.log('Press any key on Jabra device ' + device.deviceName);\r\n        \r\n        device.on('btnPress', (btnType, btnValue) => {\r\n          console.log('New input from device is received: ', j.enumDeviceBtnType[btnType], btnValue);\r\n        });\r\n    });    \r\n});\r\n```\r\n\r\n### Simple button events example using typescript and plain promises\r\n\r\n```typescript\r\nimport { createJabraApplication, enumDeviceBtnType, enumHidState } from '@gnaudio/jabra-node-sdk';\r\ncreateJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        console.log('Press any key on Jabra device ' + device.deviceName);\r\n\r\n        device.on('btnPress', (btnType, btnValue) => {\r\n          console.log('New input from device is received: ', enumDeviceBtnType[btnType], btnValue);\r\n        });\r\n    });    \r\n});\r\n```\r\n\r\n### Ring example using typescript and plain promises\r\n\r\nThis example shows how to ring a Jabra device\r\n\r\n```typescript\r\nimport { createJabraApplication, JabraError } from '@gnaudio/jabra-node-sdk';\r\n\r\ncreateJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        device.isRingerSupportedAsync().then( (supported) => {\r\n            if (supported) {\r\n              device.ringAsync().then ( () => {\r\n                console.log('ringing');\r\n              }).catch ((err: JabraError) => {\r\n                console.log('ring failed with error ' + err);\r\n              }); // ring the device\r\n              setTimeout(() => {\r\n                device.unringAsync().then(() => {\r\n                    console.log('stopped ringing');\r\n                }).catch ((err: JabraError) => {\r\n                    console.log('unring failed with error ' + err);\r\n                });\r\n              }, 5000); // stop ringing the device after 5 second\r\n            }          \r\n        }).catch( (err: JabraError) => {\r\n            console.error('Jabra call failed with error ' + err)\r\n        });\r\n    });\r\n    \r\n    jabra.on('detach', (device) => {\r\n        console.log('Device detached with deviceID:', device.deviceID);\r\n\r\n        // In this demo example, we will auto shutdown once all jabra devices are removed:\r\n        let remainingAttachedDevices = jabra.getAttachedDevices();\r\n        if (remainingAttachedDevices.length == 0) {\r\n            jabra.disposeAsync().then (() => {}); // Cleanup and allow node process to exit.\r\n        }\r\n    });\r\n});\r\n```\r\n\r\n### Multiple device management with typescript and async/await\r\n\r\n```typescript\r\nimport { createJabraApplication } from '@gnaudio/jabra-node-sdk';\r\n\r\n(async () => {\r\n    let jabra = await createJabraApplication('123'); // 123 is appID here\r\n\r\n    await jabra.scanForDevicesDoneAsync(); // Wait for all pre-attached devices to be scanned.\r\n\r\n    const deviceInstanceList = jabra.getAttachedDevices();\r\n    if (deviceInstanceList.length<2) {\r\n        throw new Error('Please make sure 2 jabra devices are attached');\r\n    }\r\n\r\n    const firstDevice = deviceInstanceList[0];\r\n    await firstDevice.ringAsync();\r\n\r\n    const secondDevice = deviceInstanceList[1];\r\n    await secondDevice.ringAsync();\r\n\r\n    // Dispose jabra sdk to enable node process to shutdown.\r\n    await jabra.disposeAsync();\r\n})();\r\n```\r\n\r\n## Sequence diagrams\r\n\r\nThese sequence diagrams shows typical uses of the Node.js sdk:\r\n\r\n![Sequence diagram](https://github.com/gnaudio/jabra-node-sdk/raw/master/nodesdk/docs/outgoing-call-then-end-call.svg)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/jabra-node-sdk/raw/master/nodesdk/docs/incoming-call-then-accept-on-device-then-end-call.svg)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/jabra-node-sdk/raw/master/nodesdk/docs/incoming-call-then-user-rejects.svg)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/jabra-node-sdk/raw/master/nodesdk/docs/mute-unmute-from-device.svg)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/jabra-node-sdk/raw/master/nodesdk/docs/hold-resume-from-device.svg)\r\n\r\n## Setup VSCode\r\n\r\nThe project includes config files for debugging typescript and C++ source files\r\nin [Visual Studio Code](https://code.visualstudio.com/) via the\r\n[C++ extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools),\r\nfor both Windows and Linux. The configuration files work without any\r\nmodification, provided that you set up your environment first, by installing\r\nthe necessary tools and defining some environment variable.\r\n\r\nTo debug a C++ file, open a typescript file referencing the C++ file and start\r\nthe debugger (Running the debugger on C++ files directly won't work). Make sure\r\nthe \"Run\"-dropdown at the top of the debugging-sidebar is set to \"Current TS\r\nFile - native code only (&lt;your operating system&gt;)\"\r\n\r\nBelow, the setup steps for Windows and Linux.\r\n\r\n### Windows\r\n\r\nYou can more or less follow the instruction in\r\n[the VSCode C++ extension guide](https://code.visualstudio.com/docs/cpp/config-msvc).\r\nThen, you need to make sure all project [pre-requisites](#pre-requisite) are\r\ninstalled correctly, and finally set the following environment variables:\r\n\r\nEnvironment Variable | Value | Description\r\n--- | --- | ---\r\nLIBJABRA_WIN_NODE_GYP_CACHE_PATH | eg. %appdata%\\Local\\node-gyp\\Cache\\12.16.3\\include\\node | Used by the C/C++ extension to resolve include paths\r\nLIBJABRA_WIN_CPP_COMPILER_PATH | eg. C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x64/cl.exe | Used by the C/C++ extension to infer the path to the C++ standard library header files\r\n\r\n### Linux\r\n\r\nYou can read a more detailed guide on\r\n[the VSCode C++ extension page](https://code.visualstudio.com/docs/cpp/config-linux).\r\nThe important part is to install a C++ compiler and debugger. The easiest way\r\nis to install `build-essential` and `gdb`, this way:\r\n\r\n```sh\r\nsudo apt-get install build-essential gdb\r\n```\r\n\r\nThis maks your C++ compiler GCC, and you would likely use the `g++` command to\r\ncompile.\r\n\r\nThen, you need to install the project [pre-requisites](#pre-requisite), and\r\nfinally export the following environment variables:\r\n\r\nEnvironment Variable | Likely value | Description\r\n--- | --- | ---\r\nJABRA_NODESDK_CPP_COMPILER_PATH | /usr/bin/g++ | Used by the C/C++ extension to infer the path to the C++ standard library header files\r\nJABRA_NODESDK_NODE_GYP_CACHE_PATH | $HOME/.cache/node-gyp/14.4.0 | Used by the C/C++ extension to resolve include paths. **NOTE**: The final `include/node` is added by the configuration and it's not necessary\r\n","gypfile":true,"scripts":{"doc":"typedoc --mode file --excludePrivate --excludeExternals --excludeNotExported --out dist/doc src/main","tsc":"tsc","build":"npm run build:dev","clean":"node-gyp clean && rimraf dist","install":"node-gyp rebuild","prepare":"npm run tsc && npm run doc && node dist/script/generatemeta.js","build:dev":"node-gyp rebuild --debug && npm run tsc && npm run generatemeta","manualtest":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/manualtest/misc.ts","generatemeta":"ts-node src/script/generatemeta.ts","build:release":"node-gyp rebuild && npm run tsc && npm run generatemeta","example-btn-press-js":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/examples/button-press.js","example-btn-press-ts":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/examples/button-press.ts","example-ringer-sequence":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/examples/ringer-sequence.ts","pipeline-build-setversion":"node setversion.js"},"_npmUser":{"name":"martinjabra","email":"extmosoerensen@jabra.com"},"devEngines":{"npm":">=5.5.1","node":">=10.0.0"},"repository":{"url":"git+https://github.com/gnaudio/jabra-node-sdk.git","type":"git","directory":"nodesdk"},"_npmVersion":"6.14.11","description":"NodeJS SDK for Jabra Devices","directories":{},"_nodeVersion":"12.22.0","dependencies":{"bindings":"1.5.0","node-addon-api":"^3.0.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"rimraf":"3.0.2","ts-node":"8.8.2","typedoc":"0.17.4","cross-env":"7.0.2","typescript":"3.8.3","@types/node":"13.11.1","@types/bindings":"1.3.0","replace-in-file":"5.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jabra-node-sdk_3.2.2-beta.6_1617714878821_0.923910909106489","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"3.2.2":{"name":"@gnaudio/jabra-node-sdk","version":"3.2.2","keywords":["jabra","sdk"],"author":{"name":"GN Audio"},"license":"MIT","_id":"@gnaudio/jabra-node-sdk@3.2.2","maintainers":[{"name":"martinjabra","email":"extmosoerensen@jabra.com"},{"name":"jdv85","email":"jvesterheden@jabra.com"},{"name":"frederiksen","email":"mrtn.frederiksen@gmail.com"},{"name":"daniel_vasile_42","email":"fvasile@jabra.com"},{"name":"sskjabra","email":"sklausen@jabra.com"},{"name":"theisjabra","email":"tfroehlich@jabra.com"},{"name":"dlaezza-jabra","email":"dlaezza@jabra.com"},{"name":"ifmladenov","email":"ifmladenov@jabra.com"},{"name":"thammond","email":"thammond@jabra.com"}],"homepage":"https://github.com/gnaudio/jabra-node-sdk/","bugs":{"url":"https://developer.jabra.com"},"dist":{"shasum":"9c6fb78a48ba42bf19657bde04043ffb045add02","tarball":"https://registry.npmjs.org/@gnaudio/jabra-node-sdk/-/jabra-node-sdk-3.2.2.tgz","fileCount":159,"integrity":"sha512-INvBgGWWTnnVzg8LHisrqNTHY5AKKv6hYZlA4lGHb/kAO397lG/0waP6ZqTT0gd/jes33kx48XneaFCQjpWLLg==","signatures":[{"sig":"MEYCIQCxSxbdXQULwGcw8G3BmhX/PkBsrxcHvJuBtxqV37/KUgIhAP8AGMLWhgNJElcXzFJYj8yWo89FdvVV61LCndfZQ+Wu","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":12246981,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgbwewCRA9TVsSAnZWagAA1fMQAJfeQSbeYZfdraDUV1O7\nkf9hU+LXoE1gGKPKhCO1NmLS3WVpfOT4zzbvkZyNf1hbJ2qxycO+l4pZK8bl\n9ITC2Ne00Z4M4jdQUsP1Q35/hsk8qdYNkFEiOP1gZQNSPCdEbbSumoBIsLKp\nd+q//ZPiHWiTkvaqHQI907w0J8UIr923WM+LdowQo92nwCXRXFxTjmanX+Ja\nb2PQ/NKAhKW6lsWUkNzDaPTEHStoT1hbnibF8cP3XHiw2m/WceL6parxZ18T\nfRFIjx8of/OTF4pdrBNHAZYqC1JptMFfrx0zFleBcPKL7EzbMbrv8lKkziVg\noSOpnaZ7zzJuWxu2xcIs/1c+H22KSKCpHIhoQkTF6fXh6SObty5leHou09qU\nok59CwnUTEWkD1smGsC4TX7NK+Dv7N7XT0DsUUMcTaSFXgVUarAR4kvKAe1h\n82F05WxMhkiAfPsNRo5chYEujnMMnMqEoIJRnGFeqoMschWx4XKapTck9oZa\niORlc0mz8VGZjVmWA9vebgr1wzZHY9QjXXaiJeOsWixOn5UuQ+rC3xjDVFS9\njyu2Br8XPvmD/ld/BmB5OVcurPKdjymwW4tRe4dlvIV+VMGlEfJsPp9jUhBV\noWR0Z9a4aldLb2qKEUbsUaF+5qQjOxt6DRzGQpHPQ6IgL33sOY9bioOYMhro\nLT3C\r\n=NZ/I\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/main/index.js","types":"dist/main/index.d.ts","gypfile":true,"scripts":{"doc":"typedoc --mode file --excludePrivate --excludeExternals --excludeNotExported --out dist/doc src/main","tsc":"tsc","build":"npm run build:dev","clean":"node-gyp clean && rimraf dist","install":"node-gyp rebuild","prepare":"npm run tsc && npm run doc && node dist/script/generatemeta.js","build:dev":"node-gyp rebuild --debug && npm run tsc && npm run generatemeta","manualtest":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/manualtest/misc.ts","generatemeta":"ts-node src/script/generatemeta.ts","build:release":"node-gyp rebuild && npm run tsc && npm run generatemeta","example-btn-press-js":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/examples/button-press.js","example-btn-press-ts":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/examples/button-press.ts","example-ringer-sequence":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/examples/ringer-sequence.ts","pipeline-build-setversion":"node setversion.js"},"_npmUser":{"name":"martinjabra","email":"extmosoerensen@jabra.com"},"devEngines":{"npm":">=5.5.1","node":">=10.0.0"},"repository":{"url":"git+https://github.com/gnaudio/jabra-node-sdk.git","type":"git","directory":"nodesdk"},"_npmVersion":"6.14.11","description":"NodeJS SDK for Jabra Devices","directories":{},"_nodeVersion":"12.22.0","dependencies":{"bindings":"1.5.0","node-addon-api":"^3.0.2"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"3.0.2","ts-node":"8.8.2","typedoc":"0.17.4","cross-env":"7.0.2","typescript":"3.8.3","@types/node":"13.11.1","@types/bindings":"1.3.0","replace-in-file":"5.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jabra-node-sdk_3.2.2_1617889199836_0.2478867918548151","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"3.2.3-beta.1":{"name":"@gnaudio/jabra-node-sdk","version":"3.2.3-beta.1","keywords":["jabra","sdk"],"author":{"name":"GN Audio"},"license":"MIT","_id":"@gnaudio/jabra-node-sdk@3.2.3-beta.1","maintainers":[{"name":"martinjabra","email":"extmosoerensen@jabra.com"},{"name":"jdv85","email":"jvesterheden@jabra.com"},{"name":"frederiksen","email":"mrtn.frederiksen@gmail.com"},{"name":"daniel_vasile_42","email":"fvasile@jabra.com"},{"name":"sskjabra","email":"sklausen@jabra.com"},{"name":"theisjabra","email":"tfroehlich@jabra.com"},{"name":"dlaezza-jabra","email":"dlaezza@jabra.com"},{"name":"ifmladenov","email":"ifmladenov@jabra.com"},{"name":"thammond","email":"thammond@jabra.com"}],"homepage":"https://github.com/gnaudio/jabra-node-sdk/","bugs":{"url":"https://developer.jabra.com"},"dist":{"shasum":"c217bf2219a372f476dba75eaca455ce5774b031","tarball":"https://registry.npmjs.org/@gnaudio/jabra-node-sdk/-/jabra-node-sdk-3.2.3-beta.1.tgz","fileCount":159,"integrity":"sha512-+8n5ro+wsQKWWuE10fbK1dnYF8JUMID8sLA1L+gaoHQnVzEdVYZsZKBBP1GsbYHsthPkjHaiI/2RpXYKMyS2Ew==","signatures":[{"sig":"MEUCIQD/PVG3FIs1+WQNARsxeek+zNrP2sEeu6DIWSFGmQYMHgIgdytXNLn+XBRnq85AFOmskpKU0prJ6Fpb8XsdqJE6g1E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":11591978,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgiU7sCRA9TVsSAnZWagAAwxoP/348xB4NS9CyLfxQVVWb\nMqGnKjuLhsjwkUN/1+HhYURIUoD10L3tu7rGJRfGrrmEDkuOiZECcJc8BHSu\n9YWVXB1RnA9VRqFM4RlxOmL8+mRY9FN5L+LJu22hT4bVS1jWFAgb68xzanj/\nfPMh5RLhGR1Gvve/kfogWWpEMAW+b/8AoLwX8SUqv+O1KXk4LNjyQxlazxDe\ncnKestlEvEP1n51y4TvxUXzKtfA9gF6vXYKVnbSpHVYRPOxXPSkuaYOEnli9\n69Pg6ZFb64s+iCGUIeMeoExiGWt9xPhLc6gLv02wQhrT9mhYEjwyiY0Stqf4\nmp8Wn8dhCaY5Ll/M00YxZiJLLMr+Yr8nAVVsQzYGcWMfdcRFXoAFoROYPwF5\n+jyrovBZ3NF/tZIC84napJhbPAu7VpGv6VCqpV4Ma0ZAjUrDJ1duPAnZ4DK7\nnyRPLQ/vvGNOS4RVwaN/tMUPUw0ea5yPscLDNDuUvl3vvZVwIAvinAt2HSFK\nvOz5caxqUPAOJW9ZGfgVQWW/pZnAB3UXaaaNdq5lafG1oGRz3DS6gM8HIXJs\n52IKKSmnW1VMv9uXOqWzUXSHarpGy6SuyckL6TVA2cFbrafr06oQcDLyfij/\nn5Nt5eKUhQW+yCbRx+R/AQvFQRbhPe8hAEehwhN+vkixlr87OakmklO8L7XO\nA5Gr\r\n=bGWz\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/main/index.js","types":"dist/main/index.d.ts","readme":"Jabra Node.js SDK\r\n\r\n# Table of Contents\r\n\r\n- [Table of Contents](#table-of-contents)\r\n  - [Versions](#versions)\r\n  - [Pre-requisite](#pre-requisite)\r\n  - [Installation](#installation)\r\n  - [Debugging and Logging](#debugging-and-logging)\r\n  - [API Reference](#api-reference)\r\n  - [Examples](#examples)\r\n    - [Simple button events example using javascript and plain promises](#simple-button-events-example-using-javascript-and-plain-promises)\r\n    - [Simple button events example using typescript and plain promises](#simple-button-events-example-using-typescript-and-plain-promises)\r\n    - [Ring example using typescript and plain promises](#ring-example-using-typescript-and-plain-promises)\r\n    - [Multiple device management with typescript and async/await](#multiple-device-management-with-typescript-and-asyncawait)\r\n  - [Sequence diagrams](#sequence-diagrams)\r\n  - [Setup VSCode](#setup-vscode)\r\n    - [Windows](#windows)\r\n    - [Linux](#linux)\r\n\r\n## Versions\r\n\r\n[![npm version](https://badge.fury.io/js/%40gnaudio%2Fjabra-node-sdk.svg)](https://badge.fury.io/js/%40gnaudio%2Fjabra-node-sdk)\r\n\r\nLatest **STABLE** release is  [distributed on npmjs.com](https://www.npmjs.com/package/@gnaudio/jabra-node-sdk/) (see [changelog](../CHANGELOG.md) for changes and notable defects).\r\n\r\nIn addition, **BETA** versions may be available on npmjs with a version name ending with \"-beta.X\" specifier. For such BETA versions,the following applies:\r\n\r\n    > Disclaimer for Alpha and Beta Software Release\r\n\r\n    > Please note that this is a copyrighted Jabra Product ((c) 2017 GN Audio A/S) (the “Product”) which is still undergoing final testing before its official release. The Product and all content found on it are provided on an “as is” and “as available” basis. Jabra does not provide any warranties, neither express nor implied, as to the suitability or usability of the Product or any of its content.\r\n\r\n    > Jabra disclaims liability for any loss, whether direct, indirect, special or consequential, suffered by any person as a result of their use of the Product or the software embedded, and for any claim arising from any injury or damage, including but not limited to, any personal or bodily injury or tangible property damage, arising from or resulting in any way from any alleged defects in the material, workmanship, or performance of the Product, and Company shall indemnify Jabra in respect of any such claims. All usage of the Product is at users’ own risk and the user will be solely responsible for any resulting from such activities.\r\n\r\n    > Should you encounter any bugs, glitches, dangers, lack of functionality, lack of comfort or other problems with the Product, please let us know immediately so we can rectify these accordingly. Your help in this regard is greatly appreciated.\r\n\r\n    > The Product is released solely for test use in Company’s organization and must not under any circumstances be distributed to third parties without prior written acceptance from Jabra.\r\n\r\n    > By using the software, I accept and acknowledge the content herein.`\r\n\r\n## Pre-requisite\r\n\r\n1. Node.js v8.x or later.\r\n2. **On MacOS:** `xcode` & `python 2.7`. By default, Python is installed on macOS but make sure correct version(2.7.x) is installed. Install Xcode from App store or download it from [here](https://developer.apple.com/xcode/download/).\r\n3. **On Windows:** `Visual C++ Build Tools` & `Python 2.7`. You can install all of these by following any of the below mentioned steps.\r\n\r\n    3.1. **During Node.js installation** By ticking the checkbox when prompted during Node.js installation for `Tools for Native modules`, this installs both `Visual C++ Build Tools` & `Python 2.7`. **Note** This is prompted only for Windows platform. For other platforms like Linux or MAC, C++ compilation tools has to be installed separately as mentioned in other steps.\r\n\r\n    3.2. Both `Visual C++ Build Tools` & `Python 2.7` can also be installed using command `npm install --global --production --add-python-to-path windows-build-tools`. To know more about this tool, see [this link.](https://github.com/felixrieseberg/windows-build-tools). **Note** For executing this command through `Windows Command Prompt` or `Windows PowerShell`, they should be ran in Administrator mode.\r\n4. **On Linux:** `build-essential` package for C++ compilation & `Python 2.7`.\r\n\r\n    4.1. **Udev rules:** To be able to communicate with Jabra devices with non-root privileges it is required to create a udev rule for Jabra devices. Place the udev rule in `/etc/udev/rules.d`, and follow naming guidelines for udev files.\r\n\r\n    **Example:** The file name should be something like `80-jabra.rules` where the number before the dash indicates in what order the system reads the rules (e.g. if you had another rules file called `70-someotherrule.rules`, it would read that one first), the word after the dash is just an identifier of sorts (it could be something other than jabra) and the extension must be `.rules`.\r\n\r\n    The contents of the file are:\r\n\r\n    `ATTRS{idVendor}==\"0b0e\", MODE=\"0666\", GROUP=\"users\"`\r\n\r\n    After creating the udev file (as root), reload the udev rules using:\r\n\r\n    `sudo udevadm control --reload`\r\n\r\n    Reattach your Jabra device in order to get new permissions assigned.\r\n\r\n5. **All Platforms:** `node-gyp`. You can install this using command `npm install -g node-gyp`. To know more about this, see [this link](https://www.npmjs.com/package/node-gyp)\r\n\r\n6. **For Electron.JS:** If you are using `asar` packaging then you may need to `unpack` some of the resources used in this module. These resources are native library files i.e `libjabra.dll`, `libjabra.dylib` & `libjabra.so`, which is stored in a `build\\Release` folder. By default latest electron builder will automatically unpack, but if it does not work then you can provide below option to your build process. To know more, see [this link](https://www.electron.build/configuration/configuration)\r\n\r\n```javascript\r\n\"build\": {\r\n    \"asarUnpack\": [\"node_modules/@gnaudio/jabra-node-sdk\"]\r\n}\r\n```\r\n\r\n## Installation\r\n\r\nThis release is published to [npm](https://www.npmjs.com/package/@gnaudio/jabra-node-sdk) and can be installed via below command.\r\n\r\n```sh\r\nnpm install --save @gnaudio/jabra-node-sdk\r\n```\r\n\r\n## Debugging and Logging\r\n\r\nBelow environment variables are defined for logging and debugging purpose. User can change the values as per preference.\r\n\r\nEnvironment Variable | Value | Description\r\n--- | --- | ---\r\nLIBJABRA_TRACE_LEVEL | fatal, error, warning(default), info, debug | Log levels\r\nLIBJABRA_RESOURCE_PATH | **On Mac:** ~/Library/Application Support/JabraSDK/ **On Windows:** %appdata%/Roaming/JabraSDK  | This determine the system path where logs and device related files are written.\r\n\r\n## API Reference\r\n\r\nAPI doc is in html format. See doc folder inside installed module `node_modules\\@gnaudio\\jabra-node-sdk\\dist\\doc` and open `index.html`.\r\n\r\n## Examples\r\n\r\nFor all examples, user should first register the app on [Jabra developer site](https://developer.jabra.com/) to get appID. User should pass this appID to `createJabraApplication` in order to initialize the jabra module:\r\n\r\n### Simple button events example using javascript and plain promises\r\n\r\n```javascript\r\nconst j = require(\"@gnaudio/jabra-node-sdk\");\r\nj.createJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        console.log('Press any key on Jabra device ' + device.deviceName);\r\n        \r\n        device.on('btnPress', (btnType, btnValue) => {\r\n          console.log('New input from device is received: ', j.enumDeviceBtnType[btnType], btnValue);\r\n        });\r\n    });    \r\n});\r\n```\r\n\r\n### Simple button events example using typescript and plain promises\r\n\r\n```typescript\r\nimport { createJabraApplication, enumDeviceBtnType, enumHidState } from '@gnaudio/jabra-node-sdk';\r\ncreateJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        console.log('Press any key on Jabra device ' + device.deviceName);\r\n\r\n        device.on('btnPress', (btnType, btnValue) => {\r\n          console.log('New input from device is received: ', enumDeviceBtnType[btnType], btnValue);\r\n        });\r\n    });    \r\n});\r\n```\r\n\r\n### Ring example using typescript and plain promises\r\n\r\nThis example shows how to ring a Jabra device\r\n\r\n```typescript\r\nimport { createJabraApplication, JabraError } from '@gnaudio/jabra-node-sdk';\r\n\r\ncreateJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        device.isRingerSupportedAsync().then( (supported) => {\r\n            if (supported) {\r\n              device.ringAsync().then ( () => {\r\n                console.log('ringing');\r\n              }).catch ((err: JabraError) => {\r\n                console.log('ring failed with error ' + err);\r\n              }); // ring the device\r\n              setTimeout(() => {\r\n                device.unringAsync().then(() => {\r\n                    console.log('stopped ringing');\r\n                }).catch ((err: JabraError) => {\r\n                    console.log('unring failed with error ' + err);\r\n                });\r\n              }, 5000); // stop ringing the device after 5 second\r\n            }          \r\n        }).catch( (err: JabraError) => {\r\n            console.error('Jabra call failed with error ' + err)\r\n        });\r\n    });\r\n    \r\n    jabra.on('detach', (device) => {\r\n        console.log('Device detached with deviceID:', device.deviceID);\r\n\r\n        // In this demo example, we will auto shutdown once all jabra devices are removed:\r\n        let remainingAttachedDevices = jabra.getAttachedDevices();\r\n        if (remainingAttachedDevices.length == 0) {\r\n            jabra.disposeAsync().then (() => {}); // Cleanup and allow node process to exit.\r\n        }\r\n    });\r\n});\r\n```\r\n\r\n### Multiple device management with typescript and async/await\r\n\r\n```typescript\r\nimport { createJabraApplication } from '@gnaudio/jabra-node-sdk';\r\n\r\n(async () => {\r\n    let jabra = await createJabraApplication('123'); // 123 is appID here\r\n\r\n    await jabra.scanForDevicesDoneAsync(); // Wait for all pre-attached devices to be scanned.\r\n\r\n    const deviceInstanceList = jabra.getAttachedDevices();\r\n    if (deviceInstanceList.length<2) {\r\n        throw new Error('Please make sure 2 jabra devices are attached');\r\n    }\r\n\r\n    const firstDevice = deviceInstanceList[0];\r\n    await firstDevice.ringAsync();\r\n\r\n    const secondDevice = deviceInstanceList[1];\r\n    await secondDevice.ringAsync();\r\n\r\n    // Dispose jabra sdk to enable node process to shutdown.\r\n    await jabra.disposeAsync();\r\n})();\r\n```\r\n\r\n## Sequence diagrams\r\n\r\nThese sequence diagrams shows typical uses of the Node.js sdk:\r\n\r\n![Sequence diagram](https://github.com/gnaudio/jabra-node-sdk/raw/master/nodesdk/docs/outgoing-call-then-end-call.svg)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/jabra-node-sdk/raw/master/nodesdk/docs/incoming-call-then-accept-on-device-then-end-call.svg)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/jabra-node-sdk/raw/master/nodesdk/docs/incoming-call-then-user-rejects.svg)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/jabra-node-sdk/raw/master/nodesdk/docs/mute-unmute-from-device.svg)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/jabra-node-sdk/raw/master/nodesdk/docs/hold-resume-from-device.svg)\r\n\r\n## Setup VSCode\r\n\r\nThe project includes config files for debugging typescript and C++ source files\r\nin [Visual Studio Code](https://code.visualstudio.com/) via the\r\n[C++ extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools),\r\nfor both Windows and Linux. The configuration files work without any\r\nmodification, provided that you set up your environment first, by installing\r\nthe necessary tools and defining some environment variable.\r\n\r\nTo debug a C++ file, open a typescript file referencing the C++ file and start\r\nthe debugger (Running the debugger on C++ files directly won't work). Make sure\r\nthe \"Run\"-dropdown at the top of the debugging-sidebar is set to \"Current TS\r\nFile - native code only (&lt;your operating system&gt;)\"\r\n\r\nBelow, the setup steps for Windows and Linux.\r\n\r\n### Windows\r\n\r\nYou can more or less follow the instruction in\r\n[the VSCode C++ extension guide](https://code.visualstudio.com/docs/cpp/config-msvc).\r\nThen, you need to make sure all project [pre-requisites](#pre-requisite) are\r\ninstalled correctly, and finally set the following environment variables:\r\n\r\nEnvironment Variable | Value | Description\r\n--- | --- | ---\r\nLIBJABRA_WIN_NODE_GYP_CACHE_PATH | eg. %appdata%\\Local\\node-gyp\\Cache\\12.16.3\\include\\node | Used by the C/C++ extension to resolve include paths\r\nLIBJABRA_WIN_CPP_COMPILER_PATH | eg. C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x64/cl.exe | Used by the C/C++ extension to infer the path to the C++ standard library header files\r\n\r\n### Linux\r\n\r\nYou can read a more detailed guide on\r\n[the VSCode C++ extension page](https://code.visualstudio.com/docs/cpp/config-linux).\r\nThe important part is to install a C++ compiler and debugger. The easiest way\r\nis to install `build-essential` and `gdb`, this way:\r\n\r\n```sh\r\nsudo apt-get install build-essential gdb\r\n```\r\n\r\nThis maks your C++ compiler GCC, and you would likely use the `g++` command to\r\ncompile.\r\n\r\nThen, you need to install the project [pre-requisites](#pre-requisite), and\r\nfinally export the following environment variables:\r\n\r\nEnvironment Variable | Likely value | Description\r\n--- | --- | ---\r\nJABRA_NODESDK_CPP_COMPILER_PATH | /usr/bin/g++ | Used by the C/C++ extension to infer the path to the C++ standard library header files\r\nJABRA_NODESDK_NODE_GYP_CACHE_PATH | $HOME/.cache/node-gyp/14.4.0 | Used by the C/C++ extension to resolve include paths. **NOTE**: The final `include/node` is added by the configuration and it's not necessary\r\n","gypfile":true,"scripts":{"doc":"typedoc --mode file --excludePrivate --excludeExternals --excludeNotExported --out dist/doc src/main","tsc":"tsc","build":"npm run build:dev","clean":"node-gyp clean && rimraf dist","install":"node-gyp rebuild","prepare":"npm run tsc && npm run doc && node dist/script/generatemeta.js","build:dev":"node-gyp rebuild --debug && npm run tsc && npm run generatemeta","manualtest":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/manualtest/misc.ts","generatemeta":"ts-node src/script/generatemeta.ts","build:release":"node-gyp rebuild && npm run tsc && npm run generatemeta","example-btn-press-js":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/examples/button-press.js","example-btn-press-ts":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/examples/button-press.ts","example-ringer-sequence":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/examples/ringer-sequence.ts","pipeline-build-setversion":"node setversion.js"},"_npmUser":{"name":"martinjabra","email":"extmosoerensen@jabra.com"},"devEngines":{"npm":">=5.5.1","node":">=10.0.0"},"repository":{"url":"git+https://github.com/gnaudio/jabra-node-sdk.git","type":"git","directory":"nodesdk"},"_npmVersion":"6.14.12","description":"NodeJS SDK for Jabra Devices","directories":{},"_nodeVersion":"12.22.1","dependencies":{"bindings":"1.5.0","node-addon-api":"^3.0.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"rimraf":"3.0.2","ts-node":"8.8.2","typedoc":"0.17.4","cross-env":"7.0.2","typescript":"3.8.3","@types/node":"13.11.1","@types/bindings":"1.3.0","replace-in-file":"5.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jabra-node-sdk_3.2.3-beta.1_1619611371204_0.5859992788490014","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"3.2.3":{"name":"@gnaudio/jabra-node-sdk","version":"3.2.3","keywords":["jabra","sdk"],"author":{"name":"GN Audio"},"license":"MIT","_id":"@gnaudio/jabra-node-sdk@3.2.3","maintainers":[{"name":"martinjabra","email":"extmosoerensen@jabra.com"},{"name":"jdv85","email":"jvesterheden@jabra.com"},{"name":"daniel_vasile_42","email":"fvasile@jabra.com"},{"name":"sskjabra","email":"sklausen@jabra.com"},{"name":"theisjabra","email":"tfroehlich@jabra.com"},{"name":"dlaezza-jabra","email":"dlaezza@jabra.com"},{"name":"ifmladenov","email":"ifmladenov@jabra.com"},{"name":"thammond","email":"thammond@jabra.com"}],"homepage":"https://github.com/gnaudio/jabra-node-sdk/","bugs":{"url":"https://developer.jabra.com"},"dist":{"shasum":"e57ba1c918a0fde2e379eda1f2733cd8cc882172","tarball":"https://registry.npmjs.org/@gnaudio/jabra-node-sdk/-/jabra-node-sdk-3.2.3.tgz","fileCount":159,"integrity":"sha512-hk3dh59dtqfyNhP3mr4PM3oow0l2ahvQhA0Q/TJvwgecBRWN7dTzIx7fj0leyTsZpq+G9SHRO7zFtgm38ITV3w==","signatures":[{"sig":"MEQCIB+s6EU2pZMluFJMP+RcjRNI7WyxlSI3s05MaPJLTY26AiBZczKGvTzWxeJsAmlX0jGbG0GSaQaffu6RxZK3OqLW0A==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":11591971,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgmTyICRA9TVsSAnZWagAAyhkP/iOaLL5WrPF8iH5mgi9B\ntXerz76NlP3gFUSkP3byp7LPKTneCCDC6RUfKAGOpvSONJN6BV2j48VdYiuz\n3CeFOvPcyFV6dwVeHF7dbfEjIMV3FqksdVFAx1Z9vnYYVJ0qkaYjUcQ9dH/z\nVJpsLp1U2U4hdzHnFTktOw//QHAc6uAyZym2TeJaljUeG2/Rpi9lYceqJzHb\nS51awU7Koz9cLBjMC43ewOWC4QS7SJXe/lEVl7kyKvHzc9MZ31kOIZ7LrKAm\n+J+TTgB/XdbmTNJ/ktPUe3jHETlpKecTLlwLW4zuJhUqSRy5WRFh7InJx58g\nEHUHXfn5VjOePCbD/tOdh8XnztlE4QN13fu6P8V5slZ/o5qLexNMMxQ50fGU\nrwpm3QNey2Jp7Ro+PWn0lBejw/jjkKblxf8dBpUXiOcPfdoroVfZ3WMvxq3D\ndox4DZeiIhDNMFX5z6t81jEMPyelPwC8j+pMEgOQqtlEGa9ZTnaBncgZkOO0\n4XuF4rheTta6DMO8coSo61vC28+YRZMxRJFK1q97bK2u+R8SARGsu4M9Vl4C\nvenbAd2JNshtakk+kjrlrVQPazSP0EeiUfa541EA8LhT+OhnJfo/9GnLqQot\nc9s1zcULHGcekg6PC7Px9ojH712Q1+hubMnUQtdYYsjX1JInrPI8QgjVujGs\nm5Bt\r\n=Lc5r\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/main/index.js","types":"dist/main/index.d.ts","gypfile":true,"scripts":{"doc":"typedoc --mode file --excludePrivate --excludeExternals --excludeNotExported --out dist/doc src/main","tsc":"tsc","build":"npm run build:dev","clean":"node-gyp clean && rimraf dist","install":"node-gyp rebuild","prepare":"npm run tsc && npm run doc && node dist/script/generatemeta.js","build:dev":"node-gyp rebuild --debug && npm run tsc && npm run generatemeta","manualtest":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/manualtest/misc.ts","generatemeta":"ts-node src/script/generatemeta.ts","build:release":"node-gyp rebuild && npm run tsc && npm run generatemeta","example-btn-press-js":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/examples/button-press.js","example-btn-press-ts":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/examples/button-press.ts","example-ringer-sequence":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/examples/ringer-sequence.ts","pipeline-build-setversion":"node setversion.js"},"_npmUser":{"name":"martinjabra","email":"extmosoerensen@jabra.com"},"devEngines":{"npm":">=5.5.1","node":">=10.0.0"},"repository":{"url":"git+https://github.com/gnaudio/jabra-node-sdk.git","type":"git","directory":"nodesdk"},"_npmVersion":"6.14.12","description":"NodeJS SDK for Jabra Devices","directories":{},"_nodeVersion":"12.22.1","dependencies":{"bindings":"1.5.0","node-addon-api":"^3.0.2"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"3.0.2","ts-node":"8.8.2","typedoc":"0.17.4","cross-env":"7.0.2","typescript":"3.8.3","@types/node":"13.11.1","@types/bindings":"1.3.0","replace-in-file":"5.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jabra-node-sdk_3.2.3_1620655239169_0.9524586470171021","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"3.3.0":{"name":"@gnaudio/jabra-node-sdk","version":"3.3.0","keywords":["jabra","sdk"],"author":{"name":"GN Audio"},"license":"MIT","_id":"@gnaudio/jabra-node-sdk@3.3.0","maintainers":[{"name":"martinjabra","email":"extmosoerensen@jabra.com"},{"name":"jdv85","email":"jvesterheden@jabra.com"},{"name":"daniel_vasile_42","email":"fvasile@jabra.com"},{"name":"sskjabra","email":"sklausen@jabra.com"},{"name":"theisjabra","email":"tfroehlich@jabra.com"},{"name":"dlaezza-jabra","email":"dlaezza@jabra.com"},{"name":"ifmladenov","email":"ifmladenov@jabra.com"},{"name":"thammond","email":"thammond@jabra.com"}],"homepage":"https://github.com/gnaudio/jabra-node-sdk/","bugs":{"url":"https://developer.jabra.com"},"dist":{"shasum":"afd7739d31a26205cb65469cef52de71a46f66dd","tarball":"https://registry.npmjs.org/@gnaudio/jabra-node-sdk/-/jabra-node-sdk-3.3.0.tgz","fileCount":186,"integrity":"sha512-OgHuxPI6kk6TuEbIPzXvJa2z+8rVJcqX5KJdrl73xPWiq06rc7t2LepBQgJxPby8djC65AlEY45g2ZZzdZHq4g==","signatures":[{"sig":"MEUCIDVpQeEbHFMQb4fyGfdyYEwO5XGWG/wkF5cqrmdquNZaAiEA3RyQ/vQ3Ff1Lhg/5p4QvGl8Bd1A4mTMU5XQcVtCL9Q0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":18034638,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgvi+VCRA9TVsSAnZWagAAYakQAJ72jiLAYggHYNJqxYqa\nFXu1TiiGDYXnQ9SL1I+Mgx412v7blhDbsSAD/zSW4LkVrqEPoZg3psZg/bAx\ncGCMouPxFGnmjMj8VDMxWmVXaRuoh8w6KPG3ejgs+mITUHgLBqcw6BJrVaLF\nGpXy1N/b+Gnih8VX/S/u97QhAvjDdDASfxHCrcZByrKjmwC9sJq2zpZ9ePaa\nDJmddzEWlO4WOPHUOMgRku/wvRKfbKzU8QMX9uM4UGY1fcHzswBTMBwmAYTI\nLqjHZa5i2WxzYMbbIeeqZs0w7au1ZCN3kA2KaS/ZzsEVUA5IPpqQ6PqNjk2I\ncAvllsxkSXetWAxM5Yelc+KDuFxHpZyOaftGki7hChxofTn1217cq2TY0U1I\nJBmaPC8DSmUM2VK8ImPaKC6B9C0koRcZo/46tjo9tI68bWeH6M4Zu2gO3RzB\ni5XOPDg0re0KwPbml6+PpTzArLKw6ma8HrnGcEPYgv4JHRkR1lSZQgkBTuf1\n89VM6s5Hp5N5Nd/4m47VbVxLUkpHxD6iHg6HwDYf9t1YmlPK54TT6rj7TFbZ\nbzr0+hMZU3JnY2Jh2ECCUuuBLqQQNGRUZzlvBR1VYN1uMEFtu36a2iDAyoUY\n4GA2pnQ1wko1e9l73at/u+0cCmh7tYgcqPxluMZ5klgMua7Dz9v+tu4HmeWa\nXulh\r\n=Zza7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/main/index.js","types":"dist/main/index.d.ts","gypfile":true,"scripts":{"doc":"typedoc --mode file --excludePrivate --excludeExternals --excludeNotExported --out dist/doc src/main","tsc":"tsc","build":"npm run build:dev","clean":"node-gyp clean && rimraf dist","install":"node-gyp rebuild","prepare":"npm run tsc && npm run doc && node dist/script/generatemeta.js","build:dev":"node-gyp rebuild --debug && npm run tsc && npm run generatemeta","manualtest":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/manualtest/misc.ts","generatemeta":"ts-node src/script/generatemeta.ts","build:release":"node-gyp rebuild && npm run tsc && npm run generatemeta","example-btn-press-js":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/examples/button-press.js","example-btn-press-ts":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/examples/button-press.ts","example-ringer-sequence":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/examples/ringer-sequence.ts","pipeline-build-setversion":"node setversion.js"},"_npmUser":{"name":"martinjabra","email":"extmosoerensen@jabra.com"},"devEngines":{"npm":">=5.5.1","node":">=10.0.0"},"repository":{"url":"git+https://github.com/gnaudio/jabra-node-sdk.git","type":"git","directory":"nodesdk"},"_npmVersion":"6.14.12","description":"NodeJS SDK for Jabra Devices","directories":{},"_nodeVersion":"12.22.1","dependencies":{"bindings":"1.5.0","node-addon-api":"^3.0.2"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"3.0.2","ts-node":"8.8.2","typedoc":"0.17.4","cross-env":"7.0.2","typescript":"3.8.3","@types/node":"13.11.1","@types/bindings":"1.3.0","replace-in-file":"5.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jabra-node-sdk_3.3.0_1623076757117_0.8309248231390263","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"3.4.0-beta.1":{"name":"@gnaudio/jabra-node-sdk","version":"3.4.0-beta.1","keywords":["jabra","sdk"],"author":{"name":"GN Audio"},"license":"MIT","_id":"@gnaudio/jabra-node-sdk@3.4.0-beta.1","maintainers":[{"name":"martinjabra","email":"extmosoerensen@jabra.com"},{"name":"jdv85","email":"jvesterheden@jabra.com"},{"name":"daniel_vasile_42","email":"fvasile@jabra.com"},{"name":"sskjabra","email":"sklausen@jabra.com"},{"name":"theisjabra","email":"tfroehlich@jabra.com"},{"name":"dlaezza-jabra","email":"dlaezza@jabra.com"},{"name":"ifmladenov","email":"ifmladenov@jabra.com"},{"name":"thammond","email":"thammond@jabra.com"}],"homepage":"https://github.com/gnaudio/jabra-node-sdk/","bugs":{"url":"https://developer.jabra.com"},"dist":{"shasum":"ccf74b8903fe3a5d32b57ea0f88fe704220ac51d","tarball":"https://registry.npmjs.org/@gnaudio/jabra-node-sdk/-/jabra-node-sdk-3.4.0-beta.1.tgz","fileCount":190,"integrity":"sha512-58h+Fl0gLYO2XRiH0PcB06CfBh6f9oC9RiRLNPwE49HUAz8+hXTkge0u7lqsYe6rxdkQSYZigHXtKN24QlAk1A==","signatures":[{"sig":"MEUCIGi9u1CAU8ZMD6igExDQnpBH+2T7t42THb6FPLvQy3sIAiEAkbp0DjFMDYZa48kQXTwc/Om9fpeZbqaYjlWilLXaS8Y=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14261241,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3YjnCRA9TVsSAnZWagAAcj4P/iC+cs1/DgEwleTAVph2\n/WPgoDmB1TQkmIPVGwNQD0C0IvA/1pAMfJFi4jXx6LQd4WTZ3ZBbVfugMO3V\nQCueHo1H+21N7CCAtP3uQge6JbowURiZdWrxtFX7iK9obBlWvcJLgR8nBmnb\n+pqzXJ5rbtPBD92lxL18OXS4DkjjnogM3q6o2hKxSPEsf7RyjWtkg3OZjGli\nb+EZ/o/649XmjcYyv0LODGHbQy6bBS7s9+3YF1+G8s+2fV+650i3yrgrt9jr\nGzYZd6AZipxkxuV8HqlCbccbDvsIcOrjCqlOXbLqLrOAl7/NKwTkHJXLDsLs\nIMy2SpSe1Ho1w6i70QgaiYPxn6HopWOJNdgCSGKcuI9Y7vf39lYxt8KbTj+M\nHIwBz26SBYecd1VFVKfmPhRiEkj8AdN70PLgCtrorhanJ+rmoBlV7zxjNr2v\nVnkSNYaI77kjVLJb7Eker5D9dD93LOiYQjyLRaCzhgttqgN03cbHbRlxFRb6\nLRYtkw/ekOesmH9Ax12905OQqmx7lymxGF66YGqsq5NvFNKEE8MYzz93gZCj\nb1BVLRDRG0qUT528FvpjGWIdCwLAihK3ruXPgVtEFXGcM+ZYLdXNf+k9E/jG\nNGlyN8he2Q+xLlALzO52YlYWandaO30F+iDF5bQr5bC5NoWSbtrZMsgzez7c\nBAUj\r\n=s1lK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/main/index.js","types":"dist/main/index.d.ts","readme":"Jabra Node.js SDK\r\n\r\n# Table of Contents\r\n\r\n- [Table of Contents](#table-of-contents)\r\n  - [Versions](#versions)\r\n  - [Pre-requisite](#pre-requisite)\r\n  - [Installation](#installation)\r\n  - [Debugging and Logging](#debugging-and-logging)\r\n  - [API Reference](#api-reference)\r\n  - [Examples](#examples)\r\n    - [Simple button events example using javascript and plain promises](#simple-button-events-example-using-javascript-and-plain-promises)\r\n    - [Simple button events example using typescript and plain promises](#simple-button-events-example-using-typescript-and-plain-promises)\r\n    - [Ring example using typescript and plain promises](#ring-example-using-typescript-and-plain-promises)\r\n    - [Multiple device management with typescript and async/await](#multiple-device-management-with-typescript-and-asyncawait)\r\n  - [Sequence diagrams](#sequence-diagrams)\r\n  - [Setup VSCode](#setup-vscode)\r\n    - [Windows](#windows)\r\n    - [Linux](#linux)\r\n\r\n## Versions\r\n\r\n[![npm version](https://badge.fury.io/js/%40gnaudio%2Fjabra-node-sdk.svg)](https://badge.fury.io/js/%40gnaudio%2Fjabra-node-sdk)\r\n\r\nLatest **STABLE** release is  [distributed on npmjs.com](https://www.npmjs.com/package/@gnaudio/jabra-node-sdk/) (see [changelog](https://github.com/gnaudio/jabra-node-sdk/blob/master/CHANGELOG.md) for changes and notable defects).\r\n\r\nIn addition, **BETA** versions may be available on npmjs with a version name ending with \"-beta.X\" specifier. For such BETA versions,the following applies:\r\n\r\n    > Disclaimer for Alpha and Beta Software Release\r\n\r\n    > Please note that this is a copyrighted Jabra Product ((c) 2017 GN Audio A/S) (the “Product”) which is still undergoing final testing before its official release. The Product and all content found on it are provided on an “as is” and “as available” basis. Jabra does not provide any warranties, neither express nor implied, as to the suitability or usability of the Product or any of its content.\r\n\r\n    > Jabra disclaims liability for any loss, whether direct, indirect, special or consequential, suffered by any person as a result of their use of the Product or the software embedded, and for any claim arising from any injury or damage, including but not limited to, any personal or bodily injury or tangible property damage, arising from or resulting in any way from any alleged defects in the material, workmanship, or performance of the Product, and Company shall indemnify Jabra in respect of any such claims. All usage of the Product is at users’ own risk and the user will be solely responsible for any resulting from such activities.\r\n\r\n    > Should you encounter any bugs, glitches, dangers, lack of functionality, lack of comfort or other problems with the Product, please let us know immediately so we can rectify these accordingly. Your help in this regard is greatly appreciated.\r\n\r\n    > The Product is released solely for test use in Company’s organization and must not under any circumstances be distributed to third parties without prior written acceptance from Jabra.\r\n\r\n    > By using the software, I accept and acknowledge the content herein.`\r\n\r\n## Pre-requisite\r\n\r\n1. Node.js v8.x or later.\r\n2. **On MacOS:** `xcode` & `python 2.7`. By default, Python is installed on macOS but make sure correct version(2.7.x) is installed. Install Xcode from App store or download it from [here](https://developer.apple.com/xcode/download/).\r\n3. **On Windows:** `Visual C++ Build Tools` & `Python 2.7`. You can install all of these by following any of the below mentioned steps.\r\n\r\n    3.1. **During Node.js installation** By ticking the checkbox when prompted during Node.js installation for `Tools for Native modules`, this installs both `Visual C++ Build Tools` & `Python 2.7`. **Note** This is prompted only for Windows platform. For other platforms like Linux or MAC, C++ compilation tools has to be installed separately as mentioned in other steps.\r\n\r\n    3.2. Both `Visual C++ Build Tools` & `Python 2.7` can also be installed using command `npm install --global --production --add-python-to-path windows-build-tools`. To know more about this tool, see [this link.](https://github.com/felixrieseberg/windows-build-tools). **Note** For executing this command through `Windows Command Prompt` or `Windows PowerShell`, they should be ran in Administrator mode.\r\n4. **On Linux:** `build-essential` package for C++ compilation & `Python 2.7`.\r\n\r\n    4.1. **Udev rules:** To be able to communicate with Jabra devices with non-root privileges it is required to create a udev rule for Jabra devices. Place the udev rule in `/etc/udev/rules.d`, and follow naming guidelines for udev files.\r\n\r\n    **Example:** The file name should be something like `80-jabra.rules` where the number before the dash indicates in what order the system reads the rules (e.g. if you had another rules file called `70-someotherrule.rules`, it would read that one first), the word after the dash is just an identifier of sorts (it could be something other than jabra) and the extension must be `.rules`.\r\n\r\n    The contents of the file are:\r\n\r\n    `ATTRS{idVendor}==\"0b0e\", MODE=\"0666\", GROUP=\"users\"`\r\n\r\n    After creating the udev file (as root), reload the udev rules using:\r\n\r\n    `sudo udevadm control --reload`\r\n\r\n    Reattach your Jabra device in order to get new permissions assigned.\r\n\r\n5. **All Platforms:** `node-gyp`. You can install this using command `npm install -g node-gyp`. To know more about this, see [this link](https://www.npmjs.com/package/node-gyp)\r\n\r\n6. **For Electron.JS:** If you are using `asar` packaging then you may need to `unpack` some of the resources used in this module. These resources are native library files i.e `libjabra.dll`, `libjabra.dylib` & `libjabra.so`, which is stored in a `build\\Release` folder. By default latest electron builder will automatically unpack, but if it does not work then you can provide below option to your build process. To know more, see [this link](https://www.electron.build/configuration/configuration)\r\n\r\n```javascript\r\n\"build\": {\r\n    \"asarUnpack\": [\"node_modules/@gnaudio/jabra-node-sdk\"]\r\n}\r\n```\r\n\r\n## Installation\r\n\r\nThis release is published to [npm](https://www.npmjs.com/package/@gnaudio/jabra-node-sdk) and can be installed via below command.\r\n\r\n```sh\r\nnpm install --save @gnaudio/jabra-node-sdk\r\n```\r\n\r\n## Debugging and Logging\r\n\r\nBelow environment variables are defined for logging and debugging purpose. User can change the values as per preference.\r\n\r\nEnvironment Variable | Value | Description\r\n--- | --- | ---\r\nLIBJABRA_TRACE_LEVEL | fatal, error, warning(default), info, debug | Log levels\r\nLIBJABRA_RESOURCE_PATH | **On Mac:** ~/Library/Application Support/JabraSDK/ **On Windows:** %appdata%/Roaming/JabraSDK  | This determine the system path where logs and device related files are written.\r\n\r\n## API Reference\r\n\r\nAPI doc is in html format. See doc folder inside installed module `node_modules\\@gnaudio\\jabra-node-sdk\\dist\\doc` and open `index.html`.\r\n\r\n## Examples\r\n\r\nFor all examples, user should first register the app on [Jabra developer site](https://developer.jabra.com/) to get appID. User should pass this appID to `createJabraApplication` in order to initialize the jabra module:\r\n\r\n### Simple button events example using javascript and plain promises\r\n\r\n```javascript\r\nconst j = require(\"@gnaudio/jabra-node-sdk\");\r\nj.createJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        console.log('Press any key on Jabra device ' + device.deviceName);\r\n        \r\n        device.on('btnPress', (btnType, btnValue) => {\r\n          console.log('New input from device is received: ', j.enumDeviceBtnType[btnType], btnValue);\r\n        });\r\n    });    \r\n});\r\n```\r\n\r\n### Simple button events example using typescript and plain promises\r\n\r\n```typescript\r\nimport { createJabraApplication, enumDeviceBtnType, enumHidState } from '@gnaudio/jabra-node-sdk';\r\ncreateJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        console.log('Press any key on Jabra device ' + device.deviceName);\r\n\r\n        device.on('btnPress', (btnType, btnValue) => {\r\n          console.log('New input from device is received: ', enumDeviceBtnType[btnType], btnValue);\r\n        });\r\n    });    \r\n});\r\n```\r\n\r\n### Ring example using typescript and plain promises\r\n\r\nThis example shows how to ring a Jabra device\r\n\r\n```typescript\r\nimport { createJabraApplication, JabraError } from '@gnaudio/jabra-node-sdk';\r\n\r\ncreateJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        device.isRingerSupportedAsync().then( (supported) => {\r\n            if (supported) {\r\n              device.ringAsync().then ( () => {\r\n                console.log('ringing');\r\n              }).catch ((err: JabraError) => {\r\n                console.log('ring failed with error ' + err);\r\n              }); // ring the device\r\n              setTimeout(() => {\r\n                device.unringAsync().then(() => {\r\n                    console.log('stopped ringing');\r\n                }).catch ((err: JabraError) => {\r\n                    console.log('unring failed with error ' + err);\r\n                });\r\n              }, 5000); // stop ringing the device after 5 second\r\n            }          \r\n        }).catch( (err: JabraError) => {\r\n            console.error('Jabra call failed with error ' + err)\r\n        });\r\n    });\r\n    \r\n    jabra.on('detach', (device) => {\r\n        console.log('Device detached with deviceID:', device.deviceID);\r\n\r\n        // In this demo example, we will auto shutdown once all jabra devices are removed:\r\n        let remainingAttachedDevices = jabra.getAttachedDevices();\r\n        if (remainingAttachedDevices.length == 0) {\r\n            jabra.disposeAsync().then (() => {}); // Cleanup and allow node process to exit.\r\n        }\r\n    });\r\n});\r\n```\r\n\r\n### Multiple device management with typescript and async/await\r\n\r\n```typescript\r\nimport { createJabraApplication } from '@gnaudio/jabra-node-sdk';\r\n\r\n(async () => {\r\n    let jabra = await createJabraApplication('123'); // 123 is appID here\r\n\r\n    await jabra.scanForDevicesDoneAsync(); // Wait for all pre-attached devices to be scanned.\r\n\r\n    const deviceInstanceList = jabra.getAttachedDevices();\r\n    if (deviceInstanceList.length<2) {\r\n        throw new Error('Please make sure 2 jabra devices are attached');\r\n    }\r\n\r\n    const firstDevice = deviceInstanceList[0];\r\n    await firstDevice.ringAsync();\r\n\r\n    const secondDevice = deviceInstanceList[1];\r\n    await secondDevice.ringAsync();\r\n\r\n    // Dispose jabra sdk to enable node process to shutdown.\r\n    await jabra.disposeAsync();\r\n})();\r\n```\r\n\r\n## Sequence diagrams\r\n\r\nThese sequence diagrams shows typical uses of the Node.js sdk:\r\n\r\n![Sequence diagram](https://github.com/gnaudio/jabra-node-sdk/raw/master/nodesdk/docs/start-outgoing-call-then-end-call.svg)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/jabra-node-sdk/raw/master/nodesdk/docs/incoming-call-accepted-on-device-then-ended-on-device.svg)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/jabra-node-sdk/raw/master/nodesdk/docs/incoming-call-rejected-on-device.svg)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/jabra-node-sdk/raw/master/nodesdk/docs/mute-and-unmute-call-by-user.svg)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/jabra-node-sdk/raw/master/nodesdk/docs/hold-and-resume-by-user.svg)\r\n\r\n## Setup VSCode\r\n\r\nThe project includes config files for debugging typescript and C++ source files\r\nin [Visual Studio Code](https://code.visualstudio.com/) via the\r\n[C++ extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools),\r\nfor both Windows and Linux. The configuration files work without any\r\nmodification, provided that you set up your environment first, by installing\r\nthe necessary tools and defining some environment variable.\r\n\r\nTo debug a C++ file, open a typescript file referencing the C++ file and start\r\nthe debugger (Running the debugger on C++ files directly won't work). Make sure\r\nthe \"Run\"-dropdown at the top of the debugging-sidebar is set to \"Current TS\r\nFile - native code only (&lt;your operating system&gt;)\"\r\n\r\nBelow, the setup steps for Windows and Linux.\r\n\r\n### Windows\r\n\r\nYou can more or less follow the instruction in\r\n[the VSCode C++ extension guide](https://code.visualstudio.com/docs/cpp/config-msvc).\r\nThen, you need to make sure all project [pre-requisites](#pre-requisite) are\r\ninstalled correctly, and finally set the following environment variables:\r\n\r\nEnvironment Variable | Value | Description\r\n--- | --- | ---\r\nLIBJABRA_WIN_NODE_GYP_CACHE_PATH | eg. %appdata%\\Local\\node-gyp\\Cache\\12.16.3\\include\\node | Used by the C/C++ extension to resolve include paths\r\nLIBJABRA_WIN_CPP_COMPILER_PATH | eg. C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x64/cl.exe | Used by the C/C++ extension to infer the path to the C++ standard library header files\r\n\r\n### Linux\r\n\r\nYou can read a more detailed guide on\r\n[the VSCode C++ extension page](https://code.visualstudio.com/docs/cpp/config-linux).\r\nThe important part is to install a C++ compiler and debugger. The easiest way\r\nis to install `build-essential` and `gdb`, this way:\r\n\r\n```sh\r\nsudo apt-get install build-essential gdb\r\n```\r\n\r\nThis maks your C++ compiler GCC, and you would likely use the `g++` command to\r\ncompile.\r\n\r\nThen, you need to install the project [pre-requisites](#pre-requisite), and\r\nfinally export the following environment variables:\r\n\r\nEnvironment Variable | Likely value | Description\r\n--- | --- | ---\r\nJABRA_NODESDK_CPP_COMPILER_PATH | /usr/bin/g++ | Used by the C/C++ extension to infer the path to the C++ standard library header files\r\nJABRA_NODESDK_NODE_GYP_CACHE_PATH | $HOME/.cache/node-gyp/14.4.0 | Used by the C/C++ extension to resolve include paths. **NOTE**: The final `include/node` is added by the configuration and it's not necessary\r\n","gypfile":true,"scripts":{"doc":"typedoc --mode file --excludePrivate --excludeExternals --excludeNotExported --out dist/doc src/main","tsc":"tsc","build":"npm run build:dev","clean":"node-gyp clean && rimraf dist","install":"node-gyp rebuild","prepare":"npm run tsc && npm run doc && node dist/script/generatemeta.js","build:dev":"node-gyp rebuild --debug && npm run tsc && npm run generatemeta","manualtest":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/manualtest/misc.ts","generatemeta":"ts-node src/script/generatemeta.ts","build:release":"node-gyp rebuild && npm run tsc && npm run generatemeta","example-btn-press-js":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/examples/button-press.js","example-btn-press-ts":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/examples/button-press.ts","example-ringer-sequence":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/examples/ringer-sequence.ts","pipeline-build-setversion":"node setversion.js"},"_npmUser":{"name":"martinjabra","email":"extmosoerensen@jabra.com"},"devEngines":{"npm":">=5.5.1","node":">=10.0.0"},"repository":{"url":"git+https://github.com/gnaudio/jabra-node-sdk.git","type":"git","directory":"nodesdk"},"_npmVersion":"6.14.12","description":"NodeJS SDK for Jabra Devices","directories":{},"_nodeVersion":"12.22.1","dependencies":{"bindings":"1.5.0","node-addon-api":"^3.0.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"rimraf":"3.0.2","ts-node":"8.8.2","typedoc":"0.17.4","cross-env":"7.0.2","typescript":"3.8.3","@types/node":"13.11.1","@types/bindings":"1.3.0","replace-in-file":"5.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jabra-node-sdk_3.4.0-beta.1_1625131238722_0.3461571978801201","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"3.4.0-beta.2":{"name":"@gnaudio/jabra-node-sdk","version":"3.4.0-beta.2","keywords":["jabra","sdk"],"author":{"name":"GN Audio"},"license":"MIT","_id":"@gnaudio/jabra-node-sdk@3.4.0-beta.2","maintainers":[{"name":"martinjabra","email":"extmosoerensen@jabra.com"},{"name":"jdv85","email":"jvesterheden@jabra.com"},{"name":"daniel_vasile_42","email":"fvasile@jabra.com"},{"name":"sskjabra","email":"sklausen@jabra.com"},{"name":"theisjabra","email":"tfroehlich@jabra.com"},{"name":"dlaezza-jabra","email":"dlaezza@jabra.com"},{"name":"ifmladenov","email":"ifmladenov@jabra.com"},{"name":"thammond","email":"thammond@jabra.com"}],"homepage":"https://github.com/gnaudio/jabra-node-sdk/","bugs":{"url":"https://developer.jabra.com"},"dist":{"shasum":"6a8cd43bfb8654ee6a4d3552615ebb0436245f2a","tarball":"https://registry.npmjs.org/@gnaudio/jabra-node-sdk/-/jabra-node-sdk-3.4.0-beta.2.tgz","fileCount":189,"integrity":"sha512-9YhUS20x5ajqhoqx6Ae94EKQV/7Jl8Q0g4vRH75+lJHC/918cSpn2M3d0RRntjVHwJQO+YQqz8rCZwar42+11w==","signatures":[{"sig":"MEYCIQDp3YLEUAtctPqPOOw5CpCuPHhoK1NEwt32584+MZ3VtgIhALz7u7O70HPViMaqivj/LD9EIJuC+aWjdttQwMRWV3Qt","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14206878,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg7vztCRA9TVsSAnZWagAA0/EP+QAO0TboxL23QmgVxdMz\nyQywROGYj1JxteNk8IhQOp77YfHX6VRdVsrQqEuGp+3LTqceRpYkBuw4oekv\nsNpUgoqJmDWbq77ibftGuX5kP907Xo71R4HocjXhYM0C0V1dx8ec7EMH09WG\nqEOZUMH0c4PKVt/ytH2PchXTREw43kYHJfgXZI34MGlWflb4MN1xY33BDOkQ\nAk8/PZduPiK/Xlp+U3NEHufRhJvGYyzR07gxACOnMmC/UoU78Ln0sqFg1AZ9\nXo44VCa38t8aol8m2uP2l7Xdzave6/HH4f2we2nq43Txreb8enFcgIYpE/CN\nehwrQEolgVYAx7/LuEBeTFL88vrSj8OlrhNzvXFcJVauRIQxVNm4xmoQ3oPC\nrcsVMO88lpglds62eoCklljc2CeJY//1v6qQDiyxsqBraprgNlQGp6z+cW3N\nForXlhYIgFjsfyUTLBf0uAUpxH+g+BcQHwXmpUY4MbrmUgDgGzxNTr/DKKy6\nLsfZ5KSUgAp3YsUWPp6hnVul86jbXFRDkucp9oKRXgaNSe1zlGIfMNQeFKbz\nxPAMD2MiFgPi3wr40JVP/vPZUQu2NjG3dtL0vLiScD6B4gUvoEGfJ8lp4l2m\nYUMkpUFxKpIP+AHkD7c+2+ClDjz9qbT6iz+pLO6LiMO/HwkCsnQXseEpcAVE\nMTba\r\n=Stbt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/main/index.js","types":"dist/main/index.d.ts","readme":"Jabra Node.js SDK\r\n\r\n# Table of Contents\r\n\r\n- [Table of Contents](#table-of-contents)\r\n  - [Versions](#versions)\r\n  - [Pre-requisite](#pre-requisite)\r\n  - [Installation](#installation)\r\n  - [Debugging and Logging](#debugging-and-logging)\r\n  - [API Reference](#api-reference)\r\n  - [Examples](#examples)\r\n    - [Simple button events example using javascript and plain promises](#simple-button-events-example-using-javascript-and-plain-promises)\r\n    - [Simple button events example using typescript and plain promises](#simple-button-events-example-using-typescript-and-plain-promises)\r\n    - [Ring example using typescript and plain promises](#ring-example-using-typescript-and-plain-promises)\r\n    - [Multiple device management with typescript and async/await](#multiple-device-management-with-typescript-and-asyncawait)\r\n  - [Sequence diagrams](#sequence-diagrams)\r\n  - [Setup VSCode](#setup-vscode)\r\n    - [Windows](#windows)\r\n    - [Linux](#linux)\r\n\r\n## Versions\r\n\r\n[![npm version](https://badge.fury.io/js/%40gnaudio%2Fjabra-node-sdk.svg)](https://badge.fury.io/js/%40gnaudio%2Fjabra-node-sdk)\r\n\r\nLatest **STABLE** release is  [distributed on npmjs.com](https://www.npmjs.com/package/@gnaudio/jabra-node-sdk/) (see [changelog](https://github.com/gnaudio/jabra-node-sdk/blob/master/CHANGELOG.md) for changes and notable defects).\r\n\r\nIn addition, **BETA** versions may be available on npmjs with a version name ending with \"-beta.X\" specifier. For such BETA versions,the following applies:\r\n\r\n    > Disclaimer for Alpha and Beta Software Release\r\n\r\n    > Please note that this is a copyrighted Jabra Product ((c) 2017 GN Audio A/S) (the “Product”) which is still undergoing final testing before its official release. The Product and all content found on it are provided on an “as is” and “as available” basis. Jabra does not provide any warranties, neither express nor implied, as to the suitability or usability of the Product or any of its content.\r\n\r\n    > Jabra disclaims liability for any loss, whether direct, indirect, special or consequential, suffered by any person as a result of their use of the Product or the software embedded, and for any claim arising from any injury or damage, including but not limited to, any personal or bodily injury or tangible property damage, arising from or resulting in any way from any alleged defects in the material, workmanship, or performance of the Product, and Company shall indemnify Jabra in respect of any such claims. All usage of the Product is at users’ own risk and the user will be solely responsible for any resulting from such activities.\r\n\r\n    > Should you encounter any bugs, glitches, dangers, lack of functionality, lack of comfort or other problems with the Product, please let us know immediately so we can rectify these accordingly. Your help in this regard is greatly appreciated.\r\n\r\n    > The Product is released solely for test use in Company’s organization and must not under any circumstances be distributed to third parties without prior written acceptance from Jabra.\r\n\r\n    > By using the software, I accept and acknowledge the content herein.`\r\n\r\n## Pre-requisite\r\n\r\n1. Node.js v8.x or later.\r\n2. **On MacOS:** `xcode` & `python 2.7`. By default, Python is installed on macOS but make sure correct version(2.7.x) is installed. Install Xcode from App store or download it from [here](https://developer.apple.com/xcode/download/).\r\n3. **On Windows:** `Visual C++ Build Tools` & `Python 2.7`. You can install all of these by following any of the below mentioned steps.\r\n\r\n    3.1. **During Node.js installation** By ticking the checkbox when prompted during Node.js installation for `Tools for Native modules`, this installs both `Visual C++ Build Tools` & `Python 2.7`. **Note** This is prompted only for Windows platform. For other platforms like Linux or MAC, C++ compilation tools has to be installed separately as mentioned in other steps.\r\n\r\n    3.2. Both `Visual C++ Build Tools` & `Python 2.7` can also be installed using command `npm install --global --production --add-python-to-path windows-build-tools`. To know more about this tool, see [this link.](https://github.com/felixrieseberg/windows-build-tools). **Note** For executing this command through `Windows Command Prompt` or `Windows PowerShell`, they should be ran in Administrator mode.\r\n4. **On Linux:** `build-essential` package for C++ compilation & `Python 2.7`.\r\n\r\n    4.1. **Udev rules:** To be able to communicate with Jabra devices with non-root privileges it is required to create a udev rule for Jabra devices. Place the udev rule in `/etc/udev/rules.d`, and follow naming guidelines for udev files.\r\n\r\n    **Example:** The file name should be something like `80-jabra.rules` where the number before the dash indicates in what order the system reads the rules (e.g. if you had another rules file called `70-someotherrule.rules`, it would read that one first), the word after the dash is just an identifier of sorts (it could be something other than jabra) and the extension must be `.rules`.\r\n\r\n    The contents of the file are:\r\n\r\n    `ATTRS{idVendor}==\"0b0e\", MODE=\"0666\", GROUP=\"users\"`\r\n\r\n    After creating the udev file (as root), reload the udev rules using:\r\n\r\n    `sudo udevadm control --reload`\r\n\r\n    Reattach your Jabra device in order to get new permissions assigned.\r\n\r\n5. **All Platforms:** `node-gyp`. You can install this using command `npm install -g node-gyp`. To know more about this, see [this link](https://www.npmjs.com/package/node-gyp)\r\n\r\n6. **For Electron.JS:** If you are using `asar` packaging then you may need to `unpack` some of the resources used in this module. These resources are native library files i.e `libjabra.dll`, `libjabra.dylib` & `libjabra.so`, which is stored in a `build\\Release` folder. By default latest electron builder will automatically unpack, but if it does not work then you can provide below option to your build process. To know more, see [this link](https://www.electron.build/configuration/configuration)\r\n\r\n```javascript\r\n\"build\": {\r\n    \"asarUnpack\": [\"node_modules/@gnaudio/jabra-node-sdk\"]\r\n}\r\n```\r\n\r\n## Installation\r\n\r\nThis release is published to [npm](https://www.npmjs.com/package/@gnaudio/jabra-node-sdk) and can be installed via below command.\r\n\r\n```sh\r\nnpm install --save @gnaudio/jabra-node-sdk\r\n```\r\n\r\n## Debugging and Logging\r\n\r\nBelow environment variables are defined for logging and debugging purpose. User can change the values as per preference.\r\n\r\nEnvironment Variable | Value | Description\r\n--- | --- | ---\r\nLIBJABRA_TRACE_LEVEL | fatal, error, warning(default), info, debug | Log levels\r\nLIBJABRA_RESOURCE_PATH | **On Mac:** ~/Library/Application Support/JabraSDK/ **On Windows:** %appdata%/Roaming/JabraSDK  | This determine the system path where logs and device related files are written.\r\n\r\n## API Reference\r\n\r\nAPI doc is in html format. See doc folder inside installed module `node_modules\\@gnaudio\\jabra-node-sdk\\dist\\doc` and open `index.html`.\r\n\r\n## Examples\r\n\r\nFor all examples, user should first register the app on [Jabra developer site](https://developer.jabra.com/) to get appID. User should pass this appID to `createJabraApplication` in order to initialize the jabra module:\r\n\r\n### Simple button events example using javascript and plain promises\r\n\r\n```javascript\r\nconst j = require(\"@gnaudio/jabra-node-sdk\");\r\nj.createJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        console.log('Press any key on Jabra device ' + device.deviceName);\r\n        \r\n        device.on('btnPress', (btnType, btnValue) => {\r\n          console.log('New input from device is received: ', j.enumDeviceBtnType[btnType], btnValue);\r\n        });\r\n    });    \r\n});\r\n```\r\n\r\n### Simple button events example using typescript and plain promises\r\n\r\n```typescript\r\nimport { createJabraApplication, enumDeviceBtnType, enumHidState } from '@gnaudio/jabra-node-sdk';\r\ncreateJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        console.log('Press any key on Jabra device ' + device.deviceName);\r\n\r\n        device.on('btnPress', (btnType, btnValue) => {\r\n          console.log('New input from device is received: ', enumDeviceBtnType[btnType], btnValue);\r\n        });\r\n    });    \r\n});\r\n```\r\n\r\n### Ring example using typescript and plain promises\r\n\r\nThis example shows how to ring a Jabra device\r\n\r\n```typescript\r\nimport { createJabraApplication, JabraError } from '@gnaudio/jabra-node-sdk';\r\n\r\ncreateJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        device.isRingerSupportedAsync().then( (supported) => {\r\n            if (supported) {\r\n              device.ringAsync().then ( () => {\r\n                console.log('ringing');\r\n              }).catch ((err: JabraError) => {\r\n                console.log('ring failed with error ' + err);\r\n              }); // ring the device\r\n              setTimeout(() => {\r\n                device.unringAsync().then(() => {\r\n                    console.log('stopped ringing');\r\n                }).catch ((err: JabraError) => {\r\n                    console.log('unring failed with error ' + err);\r\n                });\r\n              }, 5000); // stop ringing the device after 5 second\r\n            }          \r\n        }).catch( (err: JabraError) => {\r\n            console.error('Jabra call failed with error ' + err)\r\n        });\r\n    });\r\n    \r\n    jabra.on('detach', (device) => {\r\n        console.log('Device detached with deviceID:', device.deviceID);\r\n\r\n        // In this demo example, we will auto shutdown once all jabra devices are removed:\r\n        let remainingAttachedDevices = jabra.getAttachedDevices();\r\n        if (remainingAttachedDevices.length == 0) {\r\n            jabra.disposeAsync().then (() => {}); // Cleanup and allow node process to exit.\r\n        }\r\n    });\r\n});\r\n```\r\n\r\n### Multiple device management with typescript and async/await\r\n\r\n```typescript\r\nimport { createJabraApplication } from '@gnaudio/jabra-node-sdk';\r\n\r\n(async () => {\r\n    let jabra = await createJabraApplication('123'); // 123 is appID here\r\n\r\n    await jabra.scanForDevicesDoneAsync(); // Wait for all pre-attached devices to be scanned.\r\n\r\n    const deviceInstanceList = jabra.getAttachedDevices();\r\n    if (deviceInstanceList.length<2) {\r\n        throw new Error('Please make sure 2 jabra devices are attached');\r\n    }\r\n\r\n    const firstDevice = deviceInstanceList[0];\r\n    await firstDevice.ringAsync();\r\n\r\n    const secondDevice = deviceInstanceList[1];\r\n    await secondDevice.ringAsync();\r\n\r\n    // Dispose jabra sdk to enable node process to shutdown.\r\n    await jabra.disposeAsync();\r\n})();\r\n```\r\n\r\n## Sequence diagrams\r\n\r\nThese sequence diagrams shows typical uses of the Node.js sdk:\r\n\r\n![Sequence diagram](https://github.com/gnaudio/jabra-node-sdk/raw/master/nodesdk/docs/start-outgoing-call-then-end-call.svg)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/jabra-node-sdk/raw/master/nodesdk/docs/incoming-call-accepted-on-device-then-ended-on-device.svg)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/jabra-node-sdk/raw/master/nodesdk/docs/incoming-call-rejected-on-device.svg)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/jabra-node-sdk/raw/master/nodesdk/docs/mute-and-unmute-call-by-user.svg)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/jabra-node-sdk/raw/master/nodesdk/docs/hold-and-resume-by-user.svg)\r\n\r\n## Setup VSCode\r\n\r\nThe project includes config files for debugging typescript and C++ source files\r\nin [Visual Studio Code](https://code.visualstudio.com/) via the\r\n[C++ extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools),\r\nfor both Windows and Linux. The configuration files work without any\r\nmodification, provided that you set up your environment first, by installing\r\nthe necessary tools and defining some environment variable.\r\n\r\nTo debug a C++ file, open a typescript file referencing the C++ file and start\r\nthe debugger (Running the debugger on C++ files directly won't work). Make sure\r\nthe \"Run\"-dropdown at the top of the debugging-sidebar is set to \"Current TS\r\nFile - native code only (&lt;your operating system&gt;)\"\r\n\r\nBelow, the setup steps for Windows and Linux.\r\n\r\n### Windows\r\n\r\nYou can more or less follow the instruction in\r\n[the VSCode C++ extension guide](https://code.visualstudio.com/docs/cpp/config-msvc).\r\nThen, you need to make sure all project [pre-requisites](#pre-requisite) are\r\ninstalled correctly, and finally set the following environment variables:\r\n\r\nEnvironment Variable | Value | Description\r\n--- | --- | ---\r\nLIBJABRA_WIN_NODE_GYP_CACHE_PATH | eg. %appdata%\\Local\\node-gyp\\Cache\\12.16.3\\include\\node | Used by the C/C++ extension to resolve include paths\r\nLIBJABRA_WIN_CPP_COMPILER_PATH | eg. C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x64/cl.exe | Used by the C/C++ extension to infer the path to the C++ standard library header files\r\n\r\n### Linux\r\n\r\nYou can read a more detailed guide on\r\n[the VSCode C++ extension page](https://code.visualstudio.com/docs/cpp/config-linux).\r\nThe important part is to install a C++ compiler and debugger. The easiest way\r\nis to install `build-essential` and `gdb`, this way:\r\n\r\n```sh\r\nsudo apt-get install build-essential gdb\r\n```\r\n\r\nThis maks your C++ compiler GCC, and you would likely use the `g++` command to\r\ncompile.\r\n\r\nThen, you need to install the project [pre-requisites](#pre-requisite), and\r\nfinally export the following environment variables:\r\n\r\nEnvironment Variable | Likely value | Description\r\n--- | --- | ---\r\nJABRA_NODESDK_CPP_COMPILER_PATH | /usr/bin/g++ | Used by the C/C++ extension to infer the path to the C++ standard library header files\r\nJABRA_NODESDK_NODE_GYP_CACHE_PATH | $HOME/.cache/node-gyp/14.4.0 | Used by the C/C++ extension to resolve include paths. **NOTE**: The final `include/node` is added by the configuration and it's not necessary\r\n","gypfile":true,"scripts":{"doc":"typedoc --mode file --excludePrivate --excludeExternals --excludeNotExported --out dist/doc src/main","tsc":"tsc","build":"npm run build:dev","clean":"node-gyp clean && rimraf dist","install":"node-gyp rebuild","prepare":"npm run tsc && npm run doc && node dist/script/generatemeta.js","build:dev":"node-gyp rebuild --debug && npm run tsc && npm run generatemeta","manualtest":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/manualtest/misc.ts","generatemeta":"ts-node src/script/generatemeta.ts","build:release":"node-gyp rebuild && npm run tsc && npm run generatemeta","example-btn-press-js":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/examples/button-press.js","example-btn-press-ts":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/examples/button-press.ts","example-ringer-sequence":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/examples/ringer-sequence.ts","pipeline-build-setversion":"node setversion.js"},"_npmUser":{"name":"martinjabra","email":"extmosoerensen@jabra.com"},"devEngines":{"npm":">=5.5.1","node":">=10.0.0"},"repository":{"url":"git+https://github.com/gnaudio/jabra-node-sdk.git","type":"git","directory":"nodesdk"},"_npmVersion":"6.14.13","description":"NodeJS SDK for Jabra Devices","directories":{},"_nodeVersion":"12.22.3","dependencies":{"bindings":"1.5.0","node-addon-api":"^3.0.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"rimraf":"3.0.2","ts-node":"8.8.2","typedoc":"0.17.4","cross-env":"7.0.2","typescript":"3.8.3","@types/node":"13.11.1","@types/bindings":"1.3.0","replace-in-file":"5.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jabra-node-sdk_3.4.0-beta.2_1626275052967_0.5452650982713079","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"3.4.0":{"name":"@gnaudio/jabra-node-sdk","version":"3.4.0","keywords":["jabra","sdk"],"author":{"name":"GN Audio"},"license":"MIT","_id":"@gnaudio/jabra-node-sdk@3.4.0","maintainers":[{"name":"daniel_vasile_42","email":"fvasile@jabra.com"},{"name":"sskjabra","email":"sklausen@jabra.com"},{"name":"theisjabra","email":"tfroehlich@jabra.com"},{"name":"dlaezza-jabra","email":"dlaezza@jabra.com"},{"name":"ifmladenov","email":"ifmladenov@jabra.com"},{"name":"thammond","email":"thammond@jabra.com"},{"name":"jdv85","email":"jvesterheden@jabra.com"},{"name":"martinjabra","email":"extmosoerensen@jabra.com"}],"homepage":"https://github.com/gnaudio/jabra-node-sdk/","bugs":{"url":"https://developer.jabra.com"},"dist":{"shasum":"62b4d60d123b530685ab63e3b6f84338a98d68ad","tarball":"https://registry.npmjs.org/@gnaudio/jabra-node-sdk/-/jabra-node-sdk-3.4.0.tgz","fileCount":189,"integrity":"sha512-izHMQPBPA4IcNjoUWoxfJUq0ppGMeU7khrEeK47MKcnYJm7/wrXpqOwZjnzQq/r4alnfJ24TxnqZgcb9FqqRPA==","signatures":[{"sig":"MEUCICasqKCKs8ru1cy9YVo13CvzkMdJMaO8/zA1ZewdYh7MAiEAwUKHKUpnS+Dq+lqSfB39jXF2X3RSQg62tmNKpqvLoFY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14206871,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2JCNCRA9TVsSAnZWagAAroIP/iDJBl7Nc5gTLpgYw5Pv\npo13mtdhxINJEnK9GLwArtQqxgKH4dfft2AbGrHf4RhEUqC0zh214P2t9saY\n5Y2AvCrVcnCxpusAqkCyUtOyocLA02kbvDqUdt6rq63xHkuQw2D/dEDTloMk\ndEc08b/6YJ4qLn6YoouD2gDTOmzYggTpxfgiXnXau67mXRBjCraXr3jpdYJl\nh9SqFU03RyBqegBqkW2fvOp+QjT/XM+e0NmJq6M9L8lb9o1MSOXk4buVyvtr\nI4CW5yx9VyjECUw1KzC2mjtg4AXbfE9b+/ENtS5786KvQ4SvYgTBiuu9/Fjf\n/o9NIu1XIDTE+vV1j0kwiGqOBpuzE04IlltiJ3qCPlofVUq2s/4Z0qqqbGud\nRRLwoEdTu14uUz8gcz47e744NDNnb1SvYq4bwzZ22OwHZYjqOZhMwGyxcPUJ\nQJBjze1bGJG+eCz9vPtNw9nkUtAcVUlzZOxrYBA7npHsClOkBUwvYCeyq+L5\nwQMWR36tfmWrhVDBjuclcrhXfMaIJrOGW3Jr+dUEVuBf57OS9zy3n7b/15mp\nQMLWxdegGD/5Uc7ebuS+Gk4Ggk4xHiA7eVTpogWfOgfx0l2NJjDswY55KggA\ngmcClVoO5pybMSqHEIwn1MVyeGQ9cMz0BZfptrAdUkB5iTBqiKud3YgpPzWf\nKP/9\r\n=dKXi\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/main/index.js","types":"dist/main/index.d.ts","gypfile":true,"scripts":{"doc":"typedoc --mode file --excludePrivate --excludeExternals --excludeNotExported --out dist/doc src/main","tsc":"tsc","build":"npm run build:dev","clean":"node-gyp clean && rimraf dist","install":"node-gyp rebuild","prepare":"npm run tsc && npm run doc && node dist/script/generatemeta.js","build:dev":"node-gyp rebuild --debug && npm run tsc && npm run generatemeta","manualtest":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/manualtest/misc.ts","generatemeta":"ts-node src/script/generatemeta.ts","build:release":"node-gyp rebuild && npm run tsc && npm run generatemeta","example-btn-press-js":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/examples/button-press.js","example-btn-press-ts":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/examples/button-press.ts","example-ringer-sequence":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/examples/ringer-sequence.ts","pipeline-build-setversion":"node setversion.js"},"_npmUser":{"name":"martinjabra","email":"extmosoerensen@jabra.com"},"devEngines":{"npm":">=5.5.1","node":">=10.0.0"},"repository":{"url":"git+https://github.com/gnaudio/jabra-node-sdk.git","type":"git","directory":"nodesdk"},"_npmVersion":"6.14.13","description":"NodeJS SDK for Jabra Devices","directories":{},"_nodeVersion":"12.22.3","dependencies":{"bindings":"1.5.0","node-addon-api":"^3.0.2"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"3.0.2","ts-node":"8.8.2","typedoc":"0.17.4","cross-env":"7.0.2","typescript":"3.8.3","@types/node":"13.11.1","@types/bindings":"1.3.0","replace-in-file":"5.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jabra-node-sdk_3.4.0_1627030389260_0.6337916560054571","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"3.5.0-beta.1":{"name":"@gnaudio/jabra-node-sdk","version":"3.5.0-beta.1","keywords":["jabra","sdk"],"author":{"name":"GN Audio"},"license":"MIT","_id":"@gnaudio/jabra-node-sdk@3.5.0-beta.1","maintainers":[{"name":"daniel_vasile_42","email":"fvasile@jabra.com"},{"name":"sskjabra","email":"sklausen@jabra.com"},{"name":"theisjabra","email":"tfroehlich@jabra.com"},{"name":"dlaezza-jabra","email":"dlaezza@jabra.com"},{"name":"ifmladenov","email":"ifmladenov@jabra.com"},{"name":"thammond","email":"thammond@jabra.com"},{"name":"jdv85","email":"jvesterheden@jabra.com"},{"name":"martinjabra","email":"extmosoerensen@jabra.com"}],"homepage":"https://github.com/gnaudio/jabra-node-sdk/","bugs":{"url":"https://developer.jabra.com"},"dist":{"shasum":"c9bfc4fe72c867d2b7a17a949f1a73c9524e2db3","tarball":"https://registry.npmjs.org/@gnaudio/jabra-node-sdk/-/jabra-node-sdk-3.5.0-beta.1.tgz","fileCount":156,"integrity":"sha512-wABSBmaO3WIBow6AgPSs0yECNQUtTaQ4OvLQ1p6yEpPI2DKlOvhp4/GfQVfA1qD8iJly+DWiQygsOJDTC2yMZQ==","signatures":[{"sig":"MEQCIDcX6yBb+XPpqDsmN4jYhVU9YN2nno994i2Ocf7eIoTMAiB+wWIr4NWR3SBUom/PsySBfZWis0a66gXzNSWYOAb1DQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":13858533,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhQ4mICRA9TVsSAnZWagAAgJgP+wfrqutU2A20XqtlhjNO\nP/967s+z0cb8GmhTYFd1CqvacEmDR4nwFHt+0ZMIVbQNbmrA/YKIZoXtZGX4\nPDD43Snn3o0Z0FAhSOwU4DHUCim4IfAgQPwd6f9n3Uf98LxNfAQdXy9FXcmb\nA8+ViQhlW433EIrNoV192DDQuIdaMFU4CTvtZ5NX62akv7J+DYztVvfcyya1\nbR7U8FwwiplCpNMYZJCbe29bZZT/BvOdjPDbV0I7X0Ox5tAFue6a+2J9oaio\nXqN9hOowXbg0kMIe0xHZGUR/PbzPxZJEET3QeL01jlX47kyY5BiOdFXE7L0O\nwfosAnjic3J8Y2lLlL+KmklZK4nI6AfgyzVFGeG3PD/n4h6zZrrJ/lJfHL/6\nUtEIs06R2Qu0xInclag6Wk93f28eXNPqzZtLIwNSXnWfmpW03XxdXy9l1HaT\n30VdqORaxNkvrKLuuTekm+lQbzjH3wcMZS8TePStMvI/U9iXcZeuAQce5o7l\n/SeBH/rGvXz5FIoj/mXfwV/DklkisDBQVeGOL+P5yteL2LyztInJoCdzrR/5\nz07VPMwS4pNTAZMuBeQUgeqwc2LHW6w89fInwEQj+W558yDxoRE0CdYDDND1\nMGG3B5ajPKMxbRji8yXLFezRQ7anmo3kAk0+RyYcnTHkXEo8zOS0JBWxdn5N\njudf\r\n=DcTw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/main/index.js","types":"dist/main/index.d.ts","readme":"Jabra Node.js SDK\r\n\r\n# Table of Contents\r\n\r\n- [Table of Contents](#table-of-contents)\r\n  - [Versions](#versions)\r\n  - [Pre-requisite](#pre-requisite)\r\n  - [Installation](#installation)\r\n  - [Debugging and Logging](#debugging-and-logging)\r\n  - [API Reference](#api-reference)\r\n  - [Examples](#examples)\r\n    - [Simple button events example using javascript and plain promises](#simple-button-events-example-using-javascript-and-plain-promises)\r\n    - [Simple button events example using typescript and plain promises](#simple-button-events-example-using-typescript-and-plain-promises)\r\n    - [Ring example using typescript and plain promises](#ring-example-using-typescript-and-plain-promises)\r\n    - [Multiple device management with typescript and async/await](#multiple-device-management-with-typescript-and-asyncawait)\r\n  - [Sequence diagrams](#sequence-diagrams)\r\n  - [Setup VSCode](#setup-vscode)\r\n    - [Windows](#windows)\r\n    - [Linux](#linux)\r\n\r\n## Versions\r\n\r\n[![npm version](https://badge.fury.io/js/%40gnaudio%2Fjabra-node-sdk.svg)](https://badge.fury.io/js/%40gnaudio%2Fjabra-node-sdk)\r\n\r\nLatest **STABLE** release is  [distributed on npmjs.com](https://www.npmjs.com/package/@gnaudio/jabra-node-sdk/) (see [changelog](https://github.com/gnaudio/jabra-node-sdk/blob/master/CHANGELOG.md) for changes and notable defects).\r\n\r\nIn addition, **BETA** versions may be available on npmjs with a version name ending with \"-beta.X\" specifier. For such BETA versions,the following applies:\r\n\r\n    > Disclaimer for Alpha and Beta Software Release\r\n\r\n    > Please note that this is a copyrighted Jabra Product ((c) 2017 GN Audio A/S) (the “Product”) which is still undergoing final testing before its official release. The Product and all content found on it are provided on an “as is” and “as available” basis. Jabra does not provide any warranties, neither express nor implied, as to the suitability or usability of the Product or any of its content.\r\n\r\n    > Jabra disclaims liability for any loss, whether direct, indirect, special or consequential, suffered by any person as a result of their use of the Product or the software embedded, and for any claim arising from any injury or damage, including but not limited to, any personal or bodily injury or tangible property damage, arising from or resulting in any way from any alleged defects in the material, workmanship, or performance of the Product, and Company shall indemnify Jabra in respect of any such claims. All usage of the Product is at users’ own risk and the user will be solely responsible for any resulting from such activities.\r\n\r\n    > Should you encounter any bugs, glitches, dangers, lack of functionality, lack of comfort or other problems with the Product, please let us know immediately so we can rectify these accordingly. Your help in this regard is greatly appreciated.\r\n\r\n    > The Product is released solely for test use in Company’s organization and must not under any circumstances be distributed to third parties without prior written acceptance from Jabra.\r\n\r\n    > By using the software, I accept and acknowledge the content herein.`\r\n\r\n## Pre-requisite\r\n\r\n1. Node.js v8.x or later.\r\n2. **On MacOS:** `xcode` & `python 2.7`. By default, Python is installed on macOS but make sure correct version(2.7.x) is installed. Install Xcode from App store or download it from [here](https://developer.apple.com/xcode/download/).\r\n3. **On Windows:** `Visual C++ Build Tools` & `Python 2.7`. You can install all of these by following any of the below mentioned steps.\r\n\r\n    3.1. **During Node.js installation** By ticking the checkbox when prompted during Node.js installation for `Tools for Native modules`, this installs both `Visual C++ Build Tools` & `Python 2.7`. **Note** This is prompted only for Windows platform. For other platforms like Linux or MAC, C++ compilation tools has to be installed separately as mentioned in other steps.\r\n\r\n    3.2. Both `Visual C++ Build Tools` & `Python 2.7` can also be installed using command `npm install --global --production --add-python-to-path windows-build-tools`. To know more about this tool, see [this link.](https://github.com/felixrieseberg/windows-build-tools). **Note** For executing this command through `Windows Command Prompt` or `Windows PowerShell`, they should be ran in Administrator mode.\r\n4. **On Linux:** `build-essential` package for C++ compilation & `Python 2.7`.\r\n\r\n    4.1. **Udev rules:** To be able to communicate with Jabra devices with non-root privileges it is required to create a udev rule for Jabra devices. Place the udev rule in `/etc/udev/rules.d`, and follow naming guidelines for udev files.\r\n\r\n    **Example:** The file name should be something like `80-jabra.rules` where the number before the dash indicates in what order the system reads the rules (e.g. if you had another rules file called `70-someotherrule.rules`, it would read that one first), the word after the dash is just an identifier of sorts (it could be something other than jabra) and the extension must be `.rules`.\r\n\r\n    The contents of the file are:\r\n\r\n    `ATTRS{idVendor}==\"0b0e\", MODE=\"0666\", GROUP=\"users\"`\r\n\r\n    After creating the udev file (as root), reload the udev rules using:\r\n\r\n    `sudo udevadm control --reload`\r\n\r\n    Reattach your Jabra device in order to get new permissions assigned.\r\n\r\n5. **All Platforms:** `node-gyp`. You can install this using command `npm install -g node-gyp`. To know more about this, see [this link](https://www.npmjs.com/package/node-gyp)\r\n\r\n6. **For Electron.JS:** If you are using `asar` packaging then you may need to `unpack` some of the resources used in this module. These resources are native library files i.e `libjabra.dll`, `libjabra.dylib` & `libjabra.so`, which is stored in a `build\\Release` folder. By default latest electron builder will automatically unpack, but if it does not work then you can provide below option to your build process. To know more, see [this link](https://www.electron.build/configuration/configuration)\r\n\r\n```javascript\r\n\"build\": {\r\n    \"asarUnpack\": [\"node_modules/@gnaudio/jabra-node-sdk\"]\r\n}\r\n```\r\n\r\n## Installation\r\n\r\nThis release is published to [npm](https://www.npmjs.com/package/@gnaudio/jabra-node-sdk) and can be installed via below command.\r\n\r\n```sh\r\nnpm install --save @gnaudio/jabra-node-sdk\r\n```\r\n\r\n## Debugging and Logging\r\n\r\nBelow environment variables are defined for logging and debugging purpose. User can change the values as per preference.\r\n\r\nEnvironment Variable | Value | Description\r\n--- | --- | ---\r\nLIBJABRA_TRACE_LEVEL | fatal, error, warning(default), info, debug | Log levels\r\nLIBJABRA_RESOURCE_PATH | **On Mac:** ~/Library/Application Support/JabraSDK/ **On Windows:** %appdata%/Roaming/JabraSDK  | This determine the system path where logs and device related files are written.\r\n\r\n## API Reference\r\n\r\nAPI doc is in html format. See doc folder inside installed module `node_modules\\@gnaudio\\jabra-node-sdk\\dist\\doc` and open `index.html`.\r\n\r\n## Examples\r\n\r\nFor all examples, user should first register the app on [Jabra developer site](https://developer.jabra.com/) to get appID. User should pass this appID to `createJabraApplication` in order to initialize the jabra module:\r\n\r\n### Simple button events example using javascript and plain promises\r\n\r\n```javascript\r\nconst j = require(\"@gnaudio/jabra-node-sdk\");\r\nj.createJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        console.log('Press any key on Jabra device ' + device.deviceName);\r\n        \r\n        device.on('btnPress', (btnType, btnValue) => {\r\n          console.log('New input from device is received: ', j.enumDeviceBtnType[btnType], btnValue);\r\n        });\r\n    });    \r\n});\r\n```\r\n\r\n### Simple button events example using typescript and plain promises\r\n\r\n```typescript\r\nimport { createJabraApplication, enumDeviceBtnType, enumHidState } from '@gnaudio/jabra-node-sdk';\r\ncreateJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        console.log('Press any key on Jabra device ' + device.deviceName);\r\n\r\n        device.on('btnPress', (btnType, btnValue) => {\r\n          console.log('New input from device is received: ', enumDeviceBtnType[btnType], btnValue);\r\n        });\r\n    });    \r\n});\r\n```\r\n\r\n### Ring example using typescript and plain promises\r\n\r\nThis example shows how to ring a Jabra device\r\n\r\n```typescript\r\nimport { createJabraApplication, JabraError } from '@gnaudio/jabra-node-sdk';\r\n\r\ncreateJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        device.isRingerSupportedAsync().then( (supported) => {\r\n            if (supported) {\r\n              device.ringAsync().then ( () => {\r\n                console.log('ringing');\r\n              }).catch ((err: JabraError) => {\r\n                console.log('ring failed with error ' + err);\r\n              }); // ring the device\r\n              setTimeout(() => {\r\n                device.unringAsync().then(() => {\r\n                    console.log('stopped ringing');\r\n                }).catch ((err: JabraError) => {\r\n                    console.log('unring failed with error ' + err);\r\n                });\r\n              }, 5000); // stop ringing the device after 5 second\r\n            }          \r\n        }).catch( (err: JabraError) => {\r\n            console.error('Jabra call failed with error ' + err)\r\n        });\r\n    });\r\n    \r\n    jabra.on('detach', (device) => {\r\n        console.log('Device detached with deviceID:', device.deviceID);\r\n\r\n        // In this demo example, we will auto shutdown once all jabra devices are removed:\r\n        let remainingAttachedDevices = jabra.getAttachedDevices();\r\n        if (remainingAttachedDevices.length == 0) {\r\n            jabra.disposeAsync().then (() => {}); // Cleanup and allow node process to exit.\r\n        }\r\n    });\r\n});\r\n```\r\n\r\n### Multiple device management with typescript and async/await\r\n\r\n```typescript\r\nimport { createJabraApplication } from '@gnaudio/jabra-node-sdk';\r\n\r\n(async () => {\r\n    let jabra = await createJabraApplication('123'); // 123 is appID here\r\n\r\n    await jabra.scanForDevicesDoneAsync(); // Wait for all pre-attached devices to be scanned.\r\n\r\n    const deviceInstanceList = jabra.getAttachedDevices();\r\n    if (deviceInstanceList.length<2) {\r\n        throw new Error('Please make sure 2 jabra devices are attached');\r\n    }\r\n\r\n    const firstDevice = deviceInstanceList[0];\r\n    await firstDevice.ringAsync();\r\n\r\n    const secondDevice = deviceInstanceList[1];\r\n    await secondDevice.ringAsync();\r\n\r\n    // Dispose jabra sdk to enable node process to shutdown.\r\n    await jabra.disposeAsync();\r\n})();\r\n```\r\n\r\n## Sequence diagrams\r\n\r\nThese sequence diagrams shows typical uses of the Node.js sdk:\r\n\r\n![Sequence diagram](https://github.com/gnaudio/jabra-node-sdk/raw/master/nodesdk/docs/start-outgoing-call-then-end-call.svg)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/jabra-node-sdk/raw/master/nodesdk/docs/incoming-call-accepted-on-device-then-ended-on-device.svg)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/jabra-node-sdk/raw/master/nodesdk/docs/incoming-call-rejected-on-device.svg)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/jabra-node-sdk/raw/master/nodesdk/docs/mute-and-unmute-call-by-user.svg)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/jabra-node-sdk/raw/master/nodesdk/docs/hold-and-resume-by-user.svg)\r\n\r\n## Setup VSCode\r\n\r\nThe project includes config files for debugging typescript and C++ source files\r\nin [Visual Studio Code](https://code.visualstudio.com/) via the\r\n[C++ extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools),\r\nfor both Windows and Linux. The configuration files work without any\r\nmodification, provided that you set up your environment first, by installing\r\nthe necessary tools and defining some environment variable.\r\n\r\nTo debug a C++ file, open a typescript file referencing the C++ file and start\r\nthe debugger (Running the debugger on C++ files directly won't work). Make sure\r\nthe \"Run\"-dropdown at the top of the debugging-sidebar is set to \"Current TS\r\nFile - native code only (&lt;your operating system&gt;)\"\r\n\r\nBelow, the setup steps for Windows and Linux.\r\n\r\n### Windows\r\n\r\nYou can more or less follow the instruction in\r\n[the VSCode C++ extension guide](https://code.visualstudio.com/docs/cpp/config-msvc).\r\nThen, you need to make sure all project [pre-requisites](#pre-requisite) are\r\ninstalled correctly, and finally set the following environment variables:\r\n\r\nEnvironment Variable | Value | Description\r\n--- | --- | ---\r\nLIBJABRA_WIN_NODE_GYP_CACHE_PATH | eg. %appdata%\\Local\\node-gyp\\Cache\\12.16.3\\include\\node | Used by the C/C++ extension to resolve include paths\r\nLIBJABRA_WIN_CPP_COMPILER_PATH | eg. C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x64/cl.exe | Used by the C/C++ extension to infer the path to the C++ standard library header files\r\n\r\n### Linux\r\n\r\nYou can read a more detailed guide on\r\n[the VSCode C++ extension page](https://code.visualstudio.com/docs/cpp/config-linux).\r\nThe important part is to install a C++ compiler and debugger. The easiest way\r\nis to install `build-essential` and `gdb`, this way:\r\n\r\n```sh\r\nsudo apt-get install build-essential gdb\r\n```\r\n\r\nThis maks your C++ compiler GCC, and you would likely use the `g++` command to\r\ncompile.\r\n\r\nThen, you need to install the project [pre-requisites](#pre-requisite), and\r\nfinally export the following environment variables:\r\n\r\nEnvironment Variable | Likely value | Description\r\n--- | --- | ---\r\nJABRA_NODESDK_CPP_COMPILER_PATH | /usr/bin/g++ | Used by the C/C++ extension to infer the path to the C++ standard library header files\r\nJABRA_NODESDK_NODE_GYP_CACHE_PATH | $HOME/.cache/node-gyp/14.4.0 | Used by the C/C++ extension to resolve include paths. **NOTE**: The final `include/node` is added by the configuration and it's not necessary\r\n","gypfile":true,"scripts":{"doc":"typedoc --mode file --excludePrivate --excludeExternals --excludeNotExported --out dist/doc src/main","tsc":"tsc","build":"npm run build:dev","clean":"node-gyp clean && rimraf dist","install":"node-gyp rebuild","prepare":"npm run tsc && npm run doc && node dist/script/generatemeta.js","build:dev":"node-gyp rebuild --debug && npm run tsc && npm run generatemeta","manualtest":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/manualtest/misc.ts","generatemeta":"ts-node src/script/generatemeta.ts","build:release":"node-gyp rebuild && npm run tsc && npm run generatemeta","example-btn-press-js":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/examples/button-press.js","example-btn-press-ts":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/examples/button-press.ts","example-ringer-sequence":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/examples/ringer-sequence.ts","pipeline-build-setversion":"node setversion.js"},"_npmUser":{"name":"martinjabra","email":"extmosoerensen@jabra.com"},"devEngines":{"npm":">=5.5.1","node":">=10.0.0"},"repository":{"url":"git+https://github.com/gnaudio/jabra-node-sdk.git","type":"git","directory":"nodesdk"},"_npmVersion":"6.14.15","description":"NodeJS SDK for Jabra Devices","directories":{},"_nodeVersion":"12.22.6","dependencies":{"bindings":"1.5.0","node-addon-api":"^3.0.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"rimraf":"3.0.2","ts-node":"8.8.2","typedoc":"0.17.4","cross-env":"7.0.2","typescript":"3.8.3","@types/node":"13.11.1","@types/bindings":"1.3.0","replace-in-file":"5.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jabra-node-sdk_3.5.0-beta.1_1631816071887_0.03309976434064632","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"3.5.0-beta.2":{"name":"@gnaudio/jabra-node-sdk","version":"3.5.0-beta.2","keywords":["jabra","sdk"],"author":{"name":"GN Audio"},"license":"MIT","_id":"@gnaudio/jabra-node-sdk@3.5.0-beta.2","maintainers":[{"name":"daniel_vasile_42","email":"fvasile@jabra.com"},{"name":"sskjabra","email":"sklausen@jabra.com"},{"name":"theisjabra","email":"tfroehlich@jabra.com"},{"name":"dlaezza-jabra","email":"dlaezza@jabra.com"},{"name":"ifmladenov","email":"ifmladenov@jabra.com"},{"name":"thammond","email":"thammond@jabra.com"},{"name":"jdv85","email":"jvesterheden@jabra.com"},{"name":"martinjabra","email":"extmosoerensen@jabra.com"}],"homepage":"https://github.com/gnaudio/jabra-node-sdk/","bugs":{"url":"https://developer.jabra.com"},"dist":{"shasum":"d4f256c9ab7424863352b7c75cabf8117d785a4d","tarball":"https://registry.npmjs.org/@gnaudio/jabra-node-sdk/-/jabra-node-sdk-3.5.0-beta.2.tgz","fileCount":195,"integrity":"sha512-0CSfCseMyyYnOHhKsF1sZDDy/wu/gYy7gQz1asqcTKaMkmlfVKx1tiX8H7r9Qwi574RU6NEWQqkWpvsUvHnocQ==","signatures":[{"sig":"MEYCIQDcT/WzJH5DF6DAPaPpZLtxALqj11LCzmclzeDjE/77nwIhAO7mnTHRtJ5MFxlRHzM+R9wwlmG8DQrsrl1oZ6dSdIeO","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14543755},"main":"dist/main/index.js","types":"dist/main/index.d.ts","readme":"Jabra Node.js SDK\r\n\r\n# Table of Contents\r\n\r\n- [Table of Contents](#table-of-contents)\r\n  - [Versions](#versions)\r\n  - [Pre-requisite](#pre-requisite)\r\n  - [Installation](#installation)\r\n  - [Debugging and Logging](#debugging-and-logging)\r\n  - [API Reference](#api-reference)\r\n  - [Examples](#examples)\r\n    - [Simple button events example using javascript and plain promises](#simple-button-events-example-using-javascript-and-plain-promises)\r\n    - [Simple button events example using typescript and plain promises](#simple-button-events-example-using-typescript-and-plain-promises)\r\n    - [Ring example using typescript and plain promises](#ring-example-using-typescript-and-plain-promises)\r\n    - [Multiple device management with typescript and async/await](#multiple-device-management-with-typescript-and-asyncawait)\r\n  - [Sequence diagrams](#sequence-diagrams)\r\n  - [Setup VSCode](#setup-vscode)\r\n    - [Windows](#windows)\r\n    - [Linux](#linux)\r\n\r\n## Versions\r\n\r\n[![npm version](https://badge.fury.io/js/%40gnaudio%2Fjabra-node-sdk.svg)](https://badge.fury.io/js/%40gnaudio%2Fjabra-node-sdk)\r\n\r\nLatest **STABLE** release is  [distributed on npmjs.com](https://www.npmjs.com/package/@gnaudio/jabra-node-sdk/) (see [changelog](https://github.com/gnaudio/jabra-node-sdk/blob/master/CHANGELOG.md) for changes and notable defects).\r\n\r\nIn addition, **BETA** versions may be available on npmjs with a version name ending with \"-beta.X\" specifier. For such BETA versions,the following applies:\r\n\r\n    > Disclaimer for Alpha and Beta Software Release\r\n\r\n    > Please note that this is a copyrighted Jabra Product ((c) 2017 GN Audio A/S) (the “Product”) which is still undergoing final testing before its official release. The Product and all content found on it are provided on an “as is” and “as available” basis. Jabra does not provide any warranties, neither express nor implied, as to the suitability or usability of the Product or any of its content.\r\n\r\n    > Jabra disclaims liability for any loss, whether direct, indirect, special or consequential, suffered by any person as a result of their use of the Product or the software embedded, and for any claim arising from any injury or damage, including but not limited to, any personal or bodily injury or tangible property damage, arising from or resulting in any way from any alleged defects in the material, workmanship, or performance of the Product, and Company shall indemnify Jabra in respect of any such claims. All usage of the Product is at users’ own risk and the user will be solely responsible for any resulting from such activities.\r\n\r\n    > Should you encounter any bugs, glitches, dangers, lack of functionality, lack of comfort or other problems with the Product, please let us know immediately so we can rectify these accordingly. Your help in this regard is greatly appreciated.\r\n\r\n    > The Product is released solely for test use in Company’s organization and must not under any circumstances be distributed to third parties without prior written acceptance from Jabra.\r\n\r\n    > By using the software, I accept and acknowledge the content herein.`\r\n\r\n## Pre-requisite\r\n\r\n1. Node.js v8.x or later.\r\n2. **On MacOS:** `xcode` & `python 2.7`. By default, Python is installed on macOS but make sure correct version(2.7.x) is installed. Install Xcode from App store or download it from [here](https://developer.apple.com/xcode/download/).\r\n3. **On Windows:** `Visual C++ Build Tools` & `Python 2.7`. You can install all of these by following any of the below mentioned steps.\r\n\r\n    3.1. **During Node.js installation** By ticking the checkbox when prompted during Node.js installation for `Tools for Native modules`, this installs both `Visual C++ Build Tools` & `Python 2.7`. **Note** This is prompted only for Windows platform. For other platforms like Linux or MAC, C++ compilation tools has to be installed separately as mentioned in other steps.\r\n\r\n    3.2. Both `Visual C++ Build Tools` & `Python 2.7` can also be installed using command `npm install --global --production --add-python-to-path windows-build-tools`. To know more about this tool, see [this link.](https://github.com/felixrieseberg/windows-build-tools). **Note** For executing this command through `Windows Command Prompt` or `Windows PowerShell`, they should be ran in Administrator mode.\r\n4. **On Linux:** `build-essential` package for C++ compilation & `Python 2.7`.\r\n\r\n    4.1. **Udev rules:** To be able to communicate with Jabra devices with non-root privileges it is required to create a udev rule for Jabra devices. Place the udev rule in `/etc/udev/rules.d`, and follow naming guidelines for udev files.\r\n\r\n    **Example:** The file name should be something like `80-jabra.rules` where the number before the dash indicates in what order the system reads the rules (e.g. if you had another rules file called `70-someotherrule.rules`, it would read that one first), the word after the dash is just an identifier of sorts (it could be something other than jabra) and the extension must be `.rules`.\r\n\r\n    The contents of the file are:\r\n\r\n    `ATTRS{idVendor}==\"0b0e\", MODE=\"0666\", GROUP=\"users\"`\r\n\r\n    After creating the udev file (as root), reload the udev rules using:\r\n\r\n    `sudo udevadm control --reload`\r\n\r\n    Reattach your Jabra device in order to get new permissions assigned.\r\n\r\n5. **All Platforms:** `node-gyp`. You can install this using command `npm install -g node-gyp`. To know more about this, see [this link](https://www.npmjs.com/package/node-gyp)\r\n\r\n6. **For Electron.JS:** If you are using `asar` packaging then you may need to `unpack` some of the resources used in this module. These resources are native library files i.e `libjabra.dll`, `libjabra.dylib` & `libjabra.so`, which is stored in a `build\\Release` folder. By default latest electron builder will automatically unpack, but if it does not work then you can provide below option to your build process. To know more, see [this link](https://www.electron.build/configuration/configuration)\r\n\r\n```javascript\r\n\"build\": {\r\n    \"asarUnpack\": [\"node_modules/@gnaudio/jabra-node-sdk\"]\r\n}\r\n```\r\n\r\n## Installation\r\n\r\nThis release is published to [npm](https://www.npmjs.com/package/@gnaudio/jabra-node-sdk) and can be installed via below command.\r\n\r\n```sh\r\nnpm install --save @gnaudio/jabra-node-sdk\r\n```\r\n\r\n## Debugging and Logging\r\n\r\nBelow environment variables are defined for logging and debugging purpose. User can change the values as per preference.\r\n\r\nEnvironment Variable | Value | Description\r\n--- | --- | ---\r\nLIBJABRA_TRACE_LEVEL | fatal, error, warning(default), info, debug | Log levels\r\nLIBJABRA_RESOURCE_PATH | **On Mac:** ~/Library/Application Support/JabraSDK/ **On Windows:** %appdata%/Roaming/JabraSDK  | This determine the system path where logs and device related files are written.\r\n\r\n## API Reference\r\n\r\nAPI doc is in html format. See doc folder inside installed module `node_modules\\@gnaudio\\jabra-node-sdk\\dist\\doc` and open `index.html`.\r\n\r\n## Examples\r\n\r\nFor all examples, user should first register the app on [Jabra developer site](https://developer.jabra.com/) to get appID. User should pass this appID to `createJabraApplication` in order to initialize the jabra module:\r\n\r\n### Simple button events example using javascript and plain promises\r\n\r\n```javascript\r\nconst j = require(\"@gnaudio/jabra-node-sdk\");\r\nj.createJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        console.log('Press any key on Jabra device ' + device.deviceName);\r\n        \r\n        device.on('btnPress', (btnType, btnValue) => {\r\n          console.log('New input from device is received: ', j.enumDeviceBtnType[btnType], btnValue);\r\n        });\r\n    });    \r\n});\r\n```\r\n\r\n### Simple button events example using typescript and plain promises\r\n\r\n```typescript\r\nimport { createJabraApplication, enumDeviceBtnType, enumHidState } from '@gnaudio/jabra-node-sdk';\r\ncreateJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        console.log('Press any key on Jabra device ' + device.deviceName);\r\n\r\n        device.on('btnPress', (btnType, btnValue) => {\r\n          console.log('New input from device is received: ', enumDeviceBtnType[btnType], btnValue);\r\n        });\r\n    });    \r\n});\r\n```\r\n\r\n### Ring example using typescript and plain promises\r\n\r\nThis example shows how to ring a Jabra device\r\n\r\n```typescript\r\nimport { createJabraApplication, JabraError } from '@gnaudio/jabra-node-sdk';\r\n\r\ncreateJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        device.isRingerSupportedAsync().then( (supported) => {\r\n            if (supported) {\r\n              device.ringAsync().then ( () => {\r\n                console.log('ringing');\r\n              }).catch ((err: JabraError) => {\r\n                console.log('ring failed with error ' + err);\r\n              }); // ring the device\r\n              setTimeout(() => {\r\n                device.unringAsync().then(() => {\r\n                    console.log('stopped ringing');\r\n                }).catch ((err: JabraError) => {\r\n                    console.log('unring failed with error ' + err);\r\n                });\r\n              }, 5000); // stop ringing the device after 5 second\r\n            }          \r\n        }).catch( (err: JabraError) => {\r\n            console.error('Jabra call failed with error ' + err)\r\n        });\r\n    });\r\n    \r\n    jabra.on('detach', (device) => {\r\n        console.log('Device detached with deviceID:', device.deviceID);\r\n\r\n        // In this demo example, we will auto shutdown once all jabra devices are removed:\r\n        let remainingAttachedDevices = jabra.getAttachedDevices();\r\n        if (remainingAttachedDevices.length == 0) {\r\n            jabra.disposeAsync().then (() => {}); // Cleanup and allow node process to exit.\r\n        }\r\n    });\r\n});\r\n```\r\n\r\n### Multiple device management with typescript and async/await\r\n\r\n```typescript\r\nimport { createJabraApplication } from '@gnaudio/jabra-node-sdk';\r\n\r\n(async () => {\r\n    let jabra = await createJabraApplication('123'); // 123 is appID here\r\n\r\n    await jabra.scanForDevicesDoneAsync(); // Wait for all pre-attached devices to be scanned.\r\n\r\n    const deviceInstanceList = jabra.getAttachedDevices();\r\n    if (deviceInstanceList.length<2) {\r\n        throw new Error('Please make sure 2 jabra devices are attached');\r\n    }\r\n\r\n    const firstDevice = deviceInstanceList[0];\r\n    await firstDevice.ringAsync();\r\n\r\n    const secondDevice = deviceInstanceList[1];\r\n    await secondDevice.ringAsync();\r\n\r\n    // Dispose jabra sdk to enable node process to shutdown.\r\n    await jabra.disposeAsync();\r\n})();\r\n```\r\n\r\n## Sequence diagrams\r\n\r\nThese sequence diagrams shows typical uses of the Node.js sdk:\r\n\r\n![Sequence diagram](https://github.com/gnaudio/jabra-node-sdk/raw/master/nodesdk/docs/start-outgoing-call-then-end-call.svg)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/jabra-node-sdk/raw/master/nodesdk/docs/incoming-call-accepted-on-device-then-ended-on-device.svg)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/jabra-node-sdk/raw/master/nodesdk/docs/incoming-call-rejected-on-device.svg)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/jabra-node-sdk/raw/master/nodesdk/docs/mute-and-unmute-call-by-user.svg)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/jabra-node-sdk/raw/master/nodesdk/docs/hold-and-resume-by-user.svg)\r\n\r\n## Setup VSCode\r\n\r\nThe project includes config files for debugging typescript and C++ source files\r\nin [Visual Studio Code](https://code.visualstudio.com/) via the\r\n[C++ extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools),\r\nfor both Windows and Linux. The configuration files work without any\r\nmodification, provided that you set up your environment first, by installing\r\nthe necessary tools and defining some environment variable.\r\n\r\nTo debug a C++ file, open a typescript file referencing the C++ file and start\r\nthe debugger (Running the debugger on C++ files directly won't work). Make sure\r\nthe \"Run\"-dropdown at the top of the debugging-sidebar is set to \"Current TS\r\nFile - native code only (&lt;your operating system&gt;)\"\r\n\r\nBelow, the setup steps for Windows and Linux.\r\n\r\n### Windows\r\n\r\nYou can more or less follow the instruction in\r\n[the VSCode C++ extension guide](https://code.visualstudio.com/docs/cpp/config-msvc).\r\nThen, you need to make sure all project [pre-requisites](#pre-requisite) are\r\ninstalled correctly, and finally set the following environment variables:\r\n\r\nEnvironment Variable | Value | Description\r\n--- | --- | ---\r\nLIBJABRA_WIN_NODE_GYP_CACHE_PATH | eg. %appdata%\\Local\\node-gyp\\Cache\\12.16.3\\include\\node | Used by the C/C++ extension to resolve include paths\r\nLIBJABRA_WIN_CPP_COMPILER_PATH | eg. C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x64/cl.exe | Used by the C/C++ extension to infer the path to the C++ standard library header files\r\n\r\n### Linux\r\n\r\nYou can read a more detailed guide on\r\n[the VSCode C++ extension page](https://code.visualstudio.com/docs/cpp/config-linux).\r\nThe important part is to install a C++ compiler and debugger. The easiest way\r\nis to install `build-essential` and `gdb`, this way:\r\n\r\n```sh\r\nsudo apt-get install build-essential gdb\r\n```\r\n\r\nThis maks your C++ compiler GCC, and you would likely use the `g++` command to\r\ncompile.\r\n\r\nThen, you need to install the project [pre-requisites](#pre-requisite), and\r\nfinally export the following environment variables:\r\n\r\nEnvironment Variable | Likely value | Description\r\n--- | --- | ---\r\nJABRA_NODESDK_CPP_COMPILER_PATH | /usr/bin/g++ | Used by the C/C++ extension to infer the path to the C++ standard library header files\r\nJABRA_NODESDK_NODE_GYP_CACHE_PATH | $HOME/.cache/node-gyp/14.4.0 | Used by the C/C++ extension to resolve include paths. **NOTE**: The final `include/node` is added by the configuration and it's not necessary\r\n","gypfile":true,"scripts":{"doc":"typedoc --mode file --excludePrivate --excludeExternals --excludeNotExported --out dist/doc src/main","tsc":"tsc","build":"npm run build:dev","clean":"node-gyp clean && rimraf dist","install":"node-gyp rebuild","prepare":"npm run tsc && npm run doc && node dist/script/generatemeta.js","build:dev":"node-gyp rebuild --debug && npm run tsc && npm run generatemeta","manualtest":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/manualtest/misc.ts","generatemeta":"ts-node src/script/generatemeta.ts","build:release":"node-gyp rebuild && npm run tsc && npm run generatemeta","example-btn-press-js":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/examples/button-press.js","example-btn-press-ts":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/examples/button-press.ts","example-ringer-sequence":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/examples/ringer-sequence.ts","pipeline-build-setversion":"node setversion.js"},"_npmUser":{"name":"martinjabra","email":"extmosoerensen@jabra.com"},"devEngines":{"npm":">=5.5.1","node":">=10.0.0"},"repository":{"url":"git+https://github.com/gnaudio/jabra-node-sdk.git","type":"git","directory":"nodesdk"},"_npmVersion":"6.14.15","description":"NodeJS SDK for Jabra Devices","directories":{},"_nodeVersion":"12.22.6","dependencies":{"bindings":"1.5.0","node-addon-api":"^3.0.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"rimraf":"3.0.2","ts-node":"8.8.2","typedoc":"0.17.4","cross-env":"7.0.2","typescript":"3.8.3","@types/node":"13.11.1","@types/bindings":"1.3.0","replace-in-file":"5.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jabra-node-sdk_3.5.0-beta.2_1632195404492_0.06527824876831256","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"3.5.0-beta.3":{"name":"@gnaudio/jabra-node-sdk","version":"3.5.0-beta.3","keywords":["jabra","sdk"],"author":{"name":"GN Audio"},"license":"MIT","_id":"@gnaudio/jabra-node-sdk@3.5.0-beta.3","maintainers":[{"name":"daniel_vasile_42","email":"fvasile@jabra.com"},{"name":"sskjabra","email":"sklausen@jabra.com"},{"name":"theisjabra","email":"tfroehlich@jabra.com"},{"name":"dlaezza-jabra","email":"dlaezza@jabra.com"},{"name":"ifmladenov","email":"ifmladenov@jabra.com"},{"name":"thammond","email":"thammond@jabra.com"},{"name":"jdv85","email":"jvesterheden@jabra.com"},{"name":"martinjabra","email":"extmosoerensen@jabra.com"}],"homepage":"https://github.com/gnaudio/jabra-node-sdk/","bugs":{"url":"https://developer.jabra.com"},"dist":{"shasum":"004bc5b0ebe24542e341f24d3736b433baae94d0","tarball":"https://registry.npmjs.org/@gnaudio/jabra-node-sdk/-/jabra-node-sdk-3.5.0-beta.3.tgz","fileCount":198,"integrity":"sha512-poOmphOsde2OoP1FtgIYAyj833BiX7y3Jgz6E7Fj1sk8KjuNfcq4kX4zTtn1fTsXkpmfTMiNCMFAcZ/CstpuOg==","signatures":[{"sig":"MEUCIQCvc6Bf3jOC+/mx/inJlx3BtPEf86V6O+hh1xw16FEaRwIgafuSOq3/rfAh+Cj8vmjJUeXdL5ugkYBLWwDXOEIUJCQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17633659},"main":"dist/main/index.js","types":"dist/main/index.d.ts","readme":"Jabra Node.js SDK\r\n\r\n# Table of Contents\r\n\r\n- [Table of Contents](#table-of-contents)\r\n  - [Versions](#versions)\r\n  - [Pre-requisite](#pre-requisite)\r\n  - [Installation](#installation)\r\n  - [Debugging and Logging](#debugging-and-logging)\r\n  - [API Reference](#api-reference)\r\n  - [Examples](#examples)\r\n    - [Simple button events example using javascript and plain promises](#simple-button-events-example-using-javascript-and-plain-promises)\r\n    - [Simple button events example using typescript and plain promises](#simple-button-events-example-using-typescript-and-plain-promises)\r\n    - [Ring example using typescript and plain promises](#ring-example-using-typescript-and-plain-promises)\r\n    - [Multiple device management with typescript and async/await](#multiple-device-management-with-typescript-and-asyncawait)\r\n  - [Sequence diagrams](#sequence-diagrams)\r\n  - [Setup VSCode](#setup-vscode)\r\n    - [Windows](#windows)\r\n    - [Linux](#linux)\r\n\r\n## Versions\r\n\r\n[![npm version](https://badge.fury.io/js/%40gnaudio%2Fjabra-node-sdk.svg)](https://badge.fury.io/js/%40gnaudio%2Fjabra-node-sdk)\r\n\r\nLatest **STABLE** release is  [distributed on npmjs.com](https://www.npmjs.com/package/@gnaudio/jabra-node-sdk/) (see [changelog](https://github.com/gnaudio/jabra-node-sdk/blob/master/CHANGELOG.md) for changes and notable defects).\r\n\r\nIn addition, **BETA** versions may be available on npmjs with a version name ending with \"-beta.X\" specifier. For such BETA versions,the following applies:\r\n\r\n    > Disclaimer for Alpha and Beta Software Release\r\n\r\n    > Please note that this is a copyrighted Jabra Product ((c) 2017 GN Audio A/S) (the “Product”) which is still undergoing final testing before its official release. The Product and all content found on it are provided on an “as is” and “as available” basis. Jabra does not provide any warranties, neither express nor implied, as to the suitability or usability of the Product or any of its content.\r\n\r\n    > Jabra disclaims liability for any loss, whether direct, indirect, special or consequential, suffered by any person as a result of their use of the Product or the software embedded, and for any claim arising from any injury or damage, including but not limited to, any personal or bodily injury or tangible property damage, arising from or resulting in any way from any alleged defects in the material, workmanship, or performance of the Product, and Company shall indemnify Jabra in respect of any such claims. All usage of the Product is at users’ own risk and the user will be solely responsible for any resulting from such activities.\r\n\r\n    > Should you encounter any bugs, glitches, dangers, lack of functionality, lack of comfort or other problems with the Product, please let us know immediately so we can rectify these accordingly. Your help in this regard is greatly appreciated.\r\n\r\n    > The Product is released solely for test use in Company’s organization and must not under any circumstances be distributed to third parties without prior written acceptance from Jabra.\r\n\r\n    > By using the software, I accept and acknowledge the content herein.`\r\n\r\n## Pre-requisite\r\n\r\n1. Node.js v8.x or later.\r\n2. **On MacOS:** `xcode` & `python 2.7`. By default, Python is installed on macOS but make sure correct version(2.7.x) is installed. Install Xcode from App store or download it from [here](https://developer.apple.com/xcode/download/).\r\n3. **On Windows:** `Visual C++ Build Tools` & `Python 2.7`. You can install all of these by following any of the below mentioned steps.\r\n\r\n    3.1. **During Node.js installation** By ticking the checkbox when prompted during Node.js installation for `Tools for Native modules`, this installs both `Visual C++ Build Tools` & `Python 2.7`. **Note** This is prompted only for Windows platform. For other platforms like Linux or MAC, C++ compilation tools has to be installed separately as mentioned in other steps.\r\n\r\n    3.2. Both `Visual C++ Build Tools` & `Python 2.7` can also be installed using command `npm install --global --production --add-python-to-path windows-build-tools`. To know more about this tool, see [this link.](https://github.com/felixrieseberg/windows-build-tools). **Note** For executing this command through `Windows Command Prompt` or `Windows PowerShell`, they should be ran in Administrator mode.\r\n4. **On Linux:** `build-essential` package for C++ compilation & `Python 2.7`.\r\n\r\n    4.1. **Udev rules:** To be able to communicate with Jabra devices with non-root privileges it is required to create a udev rule for Jabra devices. Place the udev rule in `/etc/udev/rules.d`, and follow naming guidelines for udev files.\r\n\r\n    **Example:** The file name should be something like `80-jabra.rules` where the number before the dash indicates in what order the system reads the rules (e.g. if you had another rules file called `70-someotherrule.rules`, it would read that one first), the word after the dash is just an identifier of sorts (it could be something other than jabra) and the extension must be `.rules`.\r\n\r\n    The contents of the file are:\r\n\r\n    `ATTRS{idVendor}==\"0b0e\", MODE=\"0666\", GROUP=\"users\"`\r\n\r\n    After creating the udev file (as root), reload the udev rules using:\r\n\r\n    `sudo udevadm control --reload`\r\n\r\n    Reattach your Jabra device in order to get new permissions assigned.\r\n\r\n5. **All Platforms:** `node-gyp`. You can install this using command `npm install -g node-gyp`. To know more about this, see [this link](https://www.npmjs.com/package/node-gyp)\r\n\r\n6. **For Electron.JS:** If you are using `asar` packaging then you may need to `unpack` some of the resources used in this module. These resources are native library files i.e `libjabra.dll`, `libjabra.dylib` & `libjabra.so`, which is stored in a `build\\Release` folder. By default latest electron builder will automatically unpack, but if it does not work then you can provide below option to your build process. To know more, see [this link](https://www.electron.build/configuration/configuration)\r\n\r\n```javascript\r\n\"build\": {\r\n    \"asarUnpack\": [\"node_modules/@gnaudio/jabra-node-sdk\"]\r\n}\r\n```\r\n\r\n## Installation\r\n\r\nThis release is published to [npm](https://www.npmjs.com/package/@gnaudio/jabra-node-sdk) and can be installed via below command.\r\n\r\n```sh\r\nnpm install --save @gnaudio/jabra-node-sdk\r\n```\r\n\r\n## Debugging and Logging\r\n\r\nBelow environment variables are defined for logging and debugging purpose. User can change the values as per preference.\r\n\r\nEnvironment Variable | Value | Description\r\n--- | --- | ---\r\nLIBJABRA_TRACE_LEVEL | fatal, error, warning(default), info, debug | Log levels\r\nLIBJABRA_RESOURCE_PATH | **On Mac:** ~/Library/Application Support/JabraSDK/ **On Windows:** %appdata%/Roaming/JabraSDK  | This determine the system path where logs and device related files are written.\r\n\r\n## API Reference\r\n\r\nAPI doc is in html format. See doc folder inside installed module `node_modules\\@gnaudio\\jabra-node-sdk\\dist\\doc` and open `index.html`.\r\n\r\n## Examples\r\n\r\nFor all examples, user should first register the app on [Jabra developer site](https://developer.jabra.com/) to get appID. User should pass this appID to `createJabraApplication` in order to initialize the jabra module:\r\n\r\n### Simple button events example using javascript and plain promises\r\n\r\n```javascript\r\nconst j = require(\"@gnaudio/jabra-node-sdk\");\r\nj.createJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        console.log('Press any key on Jabra device ' + device.deviceName);\r\n        \r\n        device.on('btnPress', (btnType, btnValue) => {\r\n          console.log('New input from device is received: ', j.enumDeviceBtnType[btnType], btnValue);\r\n        });\r\n    });    \r\n});\r\n```\r\n\r\n### Simple button events example using typescript and plain promises\r\n\r\n```typescript\r\nimport { createJabraApplication, enumDeviceBtnType, enumHidState } from '@gnaudio/jabra-node-sdk';\r\ncreateJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        console.log('Press any key on Jabra device ' + device.deviceName);\r\n\r\n        device.on('btnPress', (btnType, btnValue) => {\r\n          console.log('New input from device is received: ', enumDeviceBtnType[btnType], btnValue);\r\n        });\r\n    });    \r\n});\r\n```\r\n\r\n### Ring example using typescript and plain promises\r\n\r\nThis example shows how to ring a Jabra device\r\n\r\n```typescript\r\nimport { createJabraApplication, JabraError } from '@gnaudio/jabra-node-sdk';\r\n\r\ncreateJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        device.isRingerSupportedAsync().then( (supported) => {\r\n            if (supported) {\r\n              device.ringAsync().then ( () => {\r\n                console.log('ringing');\r\n              }).catch ((err: JabraError) => {\r\n                console.log('ring failed with error ' + err);\r\n              }); // ring the device\r\n              setTimeout(() => {\r\n                device.unringAsync().then(() => {\r\n                    console.log('stopped ringing');\r\n                }).catch ((err: JabraError) => {\r\n                    console.log('unring failed with error ' + err);\r\n                });\r\n              }, 5000); // stop ringing the device after 5 second\r\n            }          \r\n        }).catch( (err: JabraError) => {\r\n            console.error('Jabra call failed with error ' + err)\r\n        });\r\n    });\r\n    \r\n    jabra.on('detach', (device) => {\r\n        console.log('Device detached with deviceID:', device.deviceID);\r\n\r\n        // In this demo example, we will auto shutdown once all jabra devices are removed:\r\n        let remainingAttachedDevices = jabra.getAttachedDevices();\r\n        if (remainingAttachedDevices.length == 0) {\r\n            jabra.disposeAsync().then (() => {}); // Cleanup and allow node process to exit.\r\n        }\r\n    });\r\n});\r\n```\r\n\r\n### Multiple device management with typescript and async/await\r\n\r\n```typescript\r\nimport { createJabraApplication } from '@gnaudio/jabra-node-sdk';\r\n\r\n(async () => {\r\n    let jabra = await createJabraApplication('123'); // 123 is appID here\r\n\r\n    await jabra.scanForDevicesDoneAsync(); // Wait for all pre-attached devices to be scanned.\r\n\r\n    const deviceInstanceList = jabra.getAttachedDevices();\r\n    if (deviceInstanceList.length<2) {\r\n        throw new Error('Please make sure 2 jabra devices are attached');\r\n    }\r\n\r\n    const firstDevice = deviceInstanceList[0];\r\n    await firstDevice.ringAsync();\r\n\r\n    const secondDevice = deviceInstanceList[1];\r\n    await secondDevice.ringAsync();\r\n\r\n    // Dispose jabra sdk to enable node process to shutdown.\r\n    await jabra.disposeAsync();\r\n})();\r\n```\r\n\r\n## Sequence diagrams\r\n\r\nThese sequence diagrams shows typical uses of the Node.js sdk:\r\n\r\n![Sequence diagram](https://github.com/gnaudio/jabra-node-sdk/raw/master/nodesdk/docs/start-outgoing-call-then-end-call.svg)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/jabra-node-sdk/raw/master/nodesdk/docs/incoming-call-accepted-on-device-then-ended-on-device.svg)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/jabra-node-sdk/raw/master/nodesdk/docs/incoming-call-rejected-on-device.svg)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/jabra-node-sdk/raw/master/nodesdk/docs/mute-and-unmute-call-by-user.svg)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/jabra-node-sdk/raw/master/nodesdk/docs/hold-and-resume-by-user.svg)\r\n\r\n## Setup VSCode\r\n\r\nThe project includes config files for debugging typescript and C++ source files\r\nin [Visual Studio Code](https://code.visualstudio.com/) via the\r\n[C++ extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools),\r\nfor both Windows and Linux. The configuration files work without any\r\nmodification, provided that you set up your environment first, by installing\r\nthe necessary tools and defining some environment variable.\r\n\r\nTo debug a C++ file, open a typescript file referencing the C++ file and start\r\nthe debugger (Running the debugger on C++ files directly won't work). Make sure\r\nthe \"Run\"-dropdown at the top of the debugging-sidebar is set to \"Current TS\r\nFile - native code only (&lt;your operating system&gt;)\"\r\n\r\nBelow, the setup steps for Windows and Linux.\r\n\r\n### Windows\r\n\r\nYou can more or less follow the instruction in\r\n[the VSCode C++ extension guide](https://code.visualstudio.com/docs/cpp/config-msvc).\r\nThen, you need to make sure all project [pre-requisites](#pre-requisite) are\r\ninstalled correctly, and finally set the following environment variables:\r\n\r\nEnvironment Variable | Value | Description\r\n--- | --- | ---\r\nLIBJABRA_WIN_NODE_GYP_CACHE_PATH | eg. %appdata%\\Local\\node-gyp\\Cache\\12.16.3\\include\\node | Used by the C/C++ extension to resolve include paths\r\nLIBJABRA_WIN_CPP_COMPILER_PATH | eg. C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x64/cl.exe | Used by the C/C++ extension to infer the path to the C++ standard library header files\r\n\r\n### Linux\r\n\r\nYou can read a more detailed guide on\r\n[the VSCode C++ extension page](https://code.visualstudio.com/docs/cpp/config-linux).\r\nThe important part is to install a C++ compiler and debugger. The easiest way\r\nis to install `build-essential` and `gdb`, this way:\r\n\r\n```sh\r\nsudo apt-get install build-essential gdb\r\n```\r\n\r\nThis maks your C++ compiler GCC, and you would likely use the `g++` command to\r\ncompile.\r\n\r\nThen, you need to install the project [pre-requisites](#pre-requisite), and\r\nfinally export the following environment variables:\r\n\r\nEnvironment Variable | Likely value | Description\r\n--- | --- | ---\r\nJABRA_NODESDK_CPP_COMPILER_PATH | /usr/bin/g++ | Used by the C/C++ extension to infer the path to the C++ standard library header files\r\nJABRA_NODESDK_NODE_GYP_CACHE_PATH | $HOME/.cache/node-gyp/14.4.0 | Used by the C/C++ extension to resolve include paths. **NOTE**: The final `include/node` is added by the configuration and it's not necessary\r\n","gypfile":true,"scripts":{"doc":"typedoc --mode file --excludePrivate --excludeExternals --excludeNotExported --out dist/doc src/main","tsc":"tsc","build":"npm run build:dev","clean":"node-gyp clean && rimraf dist","install":"node-gyp rebuild","prepare":"npm run tsc && npm run doc && node dist/script/generatemeta.js","build:dev":"node-gyp rebuild --debug && npm run tsc && npm run generatemeta","manualtest":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/manualtest/misc.ts","generatemeta":"ts-node src/script/generatemeta.ts","build:release":"node-gyp rebuild && npm run tsc && npm run generatemeta","example-btn-press-js":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/examples/button-press.js","example-btn-press-ts":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/examples/button-press.ts","example-ringer-sequence":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/examples/ringer-sequence.ts","pipeline-build-setversion":"node setversion.js"},"_npmUser":{"name":"martinjabra","email":"extmosoerensen@jabra.com"},"devEngines":{"npm":">=5.5.1","node":">=10.0.0"},"repository":{"url":"git+https://github.com/gnaudio/jabra-node-sdk.git","type":"git","directory":"nodesdk"},"_npmVersion":"6.14.15","description":"NodeJS SDK for Jabra Devices","directories":{},"_nodeVersion":"12.22.6","dependencies":{"bindings":"1.5.0","node-addon-api":"^3.0.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"rimraf":"3.0.2","ts-node":"8.8.2","typedoc":"0.17.4","cross-env":"7.0.2","typescript":"3.8.3","@types/node":"13.11.1","@types/bindings":"1.3.0","replace-in-file":"5.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jabra-node-sdk_3.5.0-beta.3_1632481511510_0.2531683086378471","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"3.5.0-beta.4":{"name":"@gnaudio/jabra-node-sdk","version":"3.5.0-beta.4","keywords":["jabra","sdk"],"author":{"name":"GN Audio"},"license":"MIT","_id":"@gnaudio/jabra-node-sdk@3.5.0-beta.4","maintainers":[{"name":"daniel_vasile_42","email":"fvasile@jabra.com"},{"name":"sskjabra","email":"sklausen@jabra.com"},{"name":"theisjabra","email":"tfroehlich@jabra.com"},{"name":"dlaezza-jabra","email":"dlaezza@jabra.com"},{"name":"ifmladenov","email":"ifmladenov@jabra.com"},{"name":"thammond","email":"thammond@jabra.com"},{"name":"jdv85","email":"jvesterheden@jabra.com"},{"name":"martinjabra","email":"extmosoerensen@jabra.com"}],"homepage":"https://github.com/gnaudio/jabra-node-sdk/","bugs":{"url":"https://developer.jabra.com"},"dist":{"shasum":"9f939e2e9364031dffb98ba7f817ec6dbae6e036","tarball":"https://registry.npmjs.org/@gnaudio/jabra-node-sdk/-/jabra-node-sdk-3.5.0-beta.4.tgz","fileCount":198,"integrity":"sha512-Trykxmd3OWiMnnsPKMy/QISXO6xUZbshEfTfRdzf1/rwBYtoSkNx3mPW5TdrhkBg9UTGzAb2KC8rm0PQm0hEPg==","signatures":[{"sig":"MEYCIQD7P3/xCuJ6Dl4G2SIaac2VJ4RE4Cwo3nl7e1D1pzc2pgIhAIeS14UPvezE5Tmh5F88O/XFtf2nQHUoHW+S9Bw66sIJ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17626679},"main":"dist/main/index.js","types":"dist/main/index.d.ts","readme":"Jabra Node.js SDK\r\n\r\n# Table of Contents\r\n\r\n- [Table of Contents](#table-of-contents)\r\n  - [Versions](#versions)\r\n  - [Pre-requisite](#pre-requisite)\r\n  - [Installation](#installation)\r\n  - [Debugging and Logging](#debugging-and-logging)\r\n  - [API Reference](#api-reference)\r\n  - [Examples](#examples)\r\n    - [Simple button events example using javascript and plain promises](#simple-button-events-example-using-javascript-and-plain-promises)\r\n    - [Simple button events example using typescript and plain promises](#simple-button-events-example-using-typescript-and-plain-promises)\r\n    - [Ring example using typescript and plain promises](#ring-example-using-typescript-and-plain-promises)\r\n    - [Multiple device management with typescript and async/await](#multiple-device-management-with-typescript-and-asyncawait)\r\n  - [Sequence diagrams](#sequence-diagrams)\r\n  - [Setup VSCode](#setup-vscode)\r\n    - [Windows](#windows)\r\n    - [Linux](#linux)\r\n\r\n## Versions\r\n\r\n[![npm version](https://badge.fury.io/js/%40gnaudio%2Fjabra-node-sdk.svg)](https://badge.fury.io/js/%40gnaudio%2Fjabra-node-sdk)\r\n\r\nLatest **STABLE** release is  [distributed on npmjs.com](https://www.npmjs.com/package/@gnaudio/jabra-node-sdk/) (see [changelog](https://github.com/gnaudio/jabra-node-sdk/blob/master/CHANGELOG.md) for changes and notable defects).\r\n\r\nIn addition, **BETA** versions may be available on npmjs with a version name ending with \"-beta.X\" specifier. For such BETA versions,the following applies:\r\n\r\n    > Disclaimer for Alpha and Beta Software Release\r\n\r\n    > Please note that this is a copyrighted Jabra Product ((c) 2017 GN Audio A/S) (the “Product”) which is still undergoing final testing before its official release. The Product and all content found on it are provided on an “as is” and “as available” basis. Jabra does not provide any warranties, neither express nor implied, as to the suitability or usability of the Product or any of its content.\r\n\r\n    > Jabra disclaims liability for any loss, whether direct, indirect, special or consequential, suffered by any person as a result of their use of the Product or the software embedded, and for any claim arising from any injury or damage, including but not limited to, any personal or bodily injury or tangible property damage, arising from or resulting in any way from any alleged defects in the material, workmanship, or performance of the Product, and Company shall indemnify Jabra in respect of any such claims. All usage of the Product is at users’ own risk and the user will be solely responsible for any resulting from such activities.\r\n\r\n    > Should you encounter any bugs, glitches, dangers, lack of functionality, lack of comfort or other problems with the Product, please let us know immediately so we can rectify these accordingly. Your help in this regard is greatly appreciated.\r\n\r\n    > The Product is released solely for test use in Company’s organization and must not under any circumstances be distributed to third parties without prior written acceptance from Jabra.\r\n\r\n    > By using the software, I accept and acknowledge the content herein.`\r\n\r\n## Pre-requisite\r\n\r\n1. Node.js v8.x or later.\r\n2. **On MacOS:** `xcode` & `python 2.7`. By default, Python is installed on macOS but make sure correct version(2.7.x) is installed. Install Xcode from App store or download it from [here](https://developer.apple.com/xcode/download/).\r\n3. **On Windows:** `Visual C++ Build Tools` & `Python 2.7`. You can install all of these by following any of the below mentioned steps.\r\n\r\n    3.1. **During Node.js installation** By ticking the checkbox when prompted during Node.js installation for `Tools for Native modules`, this installs both `Visual C++ Build Tools` & `Python 2.7`. **Note** This is prompted only for Windows platform. For other platforms like Linux or MAC, C++ compilation tools has to be installed separately as mentioned in other steps.\r\n\r\n    3.2. Both `Visual C++ Build Tools` & `Python 2.7` can also be installed using command `npm install --global --production --add-python-to-path windows-build-tools`. To know more about this tool, see [this link.](https://github.com/felixrieseberg/windows-build-tools). **Note** For executing this command through `Windows Command Prompt` or `Windows PowerShell`, they should be ran in Administrator mode.\r\n4. **On Linux:** `build-essential` package for C++ compilation & `Python 2.7`.\r\n\r\n    4.1. **Udev rules:** To be able to communicate with Jabra devices with non-root privileges it is required to create a udev rule for Jabra devices. Place the udev rule in `/etc/udev/rules.d`, and follow naming guidelines for udev files.\r\n\r\n    **Example:** The file name should be something like `80-jabra.rules` where the number before the dash indicates in what order the system reads the rules (e.g. if you had another rules file called `70-someotherrule.rules`, it would read that one first), the word after the dash is just an identifier of sorts (it could be something other than jabra) and the extension must be `.rules`.\r\n\r\n    The contents of the file are:\r\n\r\n    `ATTRS{idVendor}==\"0b0e\", MODE=\"0666\", GROUP=\"users\"`\r\n\r\n    After creating the udev file (as root), reload the udev rules using:\r\n\r\n    `sudo udevadm control --reload`\r\n\r\n    Reattach your Jabra device in order to get new permissions assigned.\r\n\r\n5. **All Platforms:** `node-gyp`. You can install this using command `npm install -g node-gyp`. To know more about this, see [this link](https://www.npmjs.com/package/node-gyp)\r\n\r\n6. **For Electron.JS:** If you are using `asar` packaging then you may need to `unpack` some of the resources used in this module. These resources are native library files i.e `libjabra.dll`, `libjabra.dylib` & `libjabra.so`, which is stored in a `build\\Release` folder. By default latest electron builder will automatically unpack, but if it does not work then you can provide below option to your build process. To know more, see [this link](https://www.electron.build/configuration/configuration)\r\n\r\n```javascript\r\n\"build\": {\r\n    \"asarUnpack\": [\"node_modules/@gnaudio/jabra-node-sdk\"]\r\n}\r\n```\r\n\r\n## Installation\r\n\r\nThis release is published to [npm](https://www.npmjs.com/package/@gnaudio/jabra-node-sdk) and can be installed via below command.\r\n\r\n```sh\r\nnpm install --save @gnaudio/jabra-node-sdk\r\n```\r\n\r\n## Debugging and Logging\r\n\r\nBelow environment variables are defined for logging and debugging purpose. User can change the values as per preference.\r\n\r\nEnvironment Variable | Value | Description\r\n--- | --- | ---\r\nLIBJABRA_TRACE_LEVEL | fatal, error, warning(default), info, debug | Log levels\r\nLIBJABRA_RESOURCE_PATH | **On Mac:** ~/Library/Application Support/JabraSDK/ **On Windows:** %appdata%/Roaming/JabraSDK  | This determine the system path where logs and device related files are written.\r\n\r\n## API Reference\r\n\r\nAPI doc is in html format. See doc folder inside installed module `node_modules\\@gnaudio\\jabra-node-sdk\\dist\\doc` and open `index.html`.\r\n\r\n## Examples\r\n\r\nFor all examples, user should first register the app on [Jabra developer site](https://developer.jabra.com/) to get appID. User should pass this appID to `createJabraApplication` in order to initialize the jabra module:\r\n\r\n### Simple button events example using javascript and plain promises\r\n\r\n```javascript\r\nconst j = require(\"@gnaudio/jabra-node-sdk\");\r\nj.createJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        console.log('Press any key on Jabra device ' + device.deviceName);\r\n        \r\n        device.on('btnPress', (btnType, btnValue) => {\r\n          console.log('New input from device is received: ', j.enumDeviceBtnType[btnType], btnValue);\r\n        });\r\n    });    \r\n});\r\n```\r\n\r\n### Simple button events example using typescript and plain promises\r\n\r\n```typescript\r\nimport { createJabraApplication, enumDeviceBtnType, enumHidState } from '@gnaudio/jabra-node-sdk';\r\ncreateJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        console.log('Press any key on Jabra device ' + device.deviceName);\r\n\r\n        device.on('btnPress', (btnType, btnValue) => {\r\n          console.log('New input from device is received: ', enumDeviceBtnType[btnType], btnValue);\r\n        });\r\n    });    \r\n});\r\n```\r\n\r\n### Ring example using typescript and plain promises\r\n\r\nThis example shows how to ring a Jabra device\r\n\r\n```typescript\r\nimport { createJabraApplication, JabraError } from '@gnaudio/jabra-node-sdk';\r\n\r\ncreateJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        device.isRingerSupportedAsync().then( (supported) => {\r\n            if (supported) {\r\n              device.ringAsync().then ( () => {\r\n                console.log('ringing');\r\n              }).catch ((err: JabraError) => {\r\n                console.log('ring failed with error ' + err);\r\n              }); // ring the device\r\n              setTimeout(() => {\r\n                device.unringAsync().then(() => {\r\n                    console.log('stopped ringing');\r\n                }).catch ((err: JabraError) => {\r\n                    console.log('unring failed with error ' + err);\r\n                });\r\n              }, 5000); // stop ringing the device after 5 second\r\n            }          \r\n        }).catch( (err: JabraError) => {\r\n            console.error('Jabra call failed with error ' + err)\r\n        });\r\n    });\r\n    \r\n    jabra.on('detach', (device) => {\r\n        console.log('Device detached with deviceID:', device.deviceID);\r\n\r\n        // In this demo example, we will auto shutdown once all jabra devices are removed:\r\n        let remainingAttachedDevices = jabra.getAttachedDevices();\r\n        if (remainingAttachedDevices.length == 0) {\r\n            jabra.disposeAsync().then (() => {}); // Cleanup and allow node process to exit.\r\n        }\r\n    });\r\n});\r\n```\r\n\r\n### Multiple device management with typescript and async/await\r\n\r\n```typescript\r\nimport { createJabraApplication } from '@gnaudio/jabra-node-sdk';\r\n\r\n(async () => {\r\n    let jabra = await createJabraApplication('123'); // 123 is appID here\r\n\r\n    await jabra.scanForDevicesDoneAsync(); // Wait for all pre-attached devices to be scanned.\r\n\r\n    const deviceInstanceList = jabra.getAttachedDevices();\r\n    if (deviceInstanceList.length<2) {\r\n        throw new Error('Please make sure 2 jabra devices are attached');\r\n    }\r\n\r\n    const firstDevice = deviceInstanceList[0];\r\n    await firstDevice.ringAsync();\r\n\r\n    const secondDevice = deviceInstanceList[1];\r\n    await secondDevice.ringAsync();\r\n\r\n    // Dispose jabra sdk to enable node process to shutdown.\r\n    await jabra.disposeAsync();\r\n})();\r\n```\r\n\r\n## Sequence diagrams\r\n\r\nThese sequence diagrams shows typical uses of the Node.js sdk:\r\n\r\n![Sequence diagram](https://github.com/gnaudio/jabra-node-sdk/raw/master/nodesdk/docs/start-outgoing-call-then-end-call.svg)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/jabra-node-sdk/raw/master/nodesdk/docs/incoming-call-accepted-on-device-then-ended-on-device.svg)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/jabra-node-sdk/raw/master/nodesdk/docs/incoming-call-rejected-on-device.svg)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/jabra-node-sdk/raw/master/nodesdk/docs/mute-and-unmute-call-by-user.svg)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/jabra-node-sdk/raw/master/nodesdk/docs/hold-and-resume-by-user.svg)\r\n\r\n## Setup VSCode\r\n\r\nThe project includes config files for debugging typescript and C++ source files\r\nin [Visual Studio Code](https://code.visualstudio.com/) via the\r\n[C++ extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools),\r\nfor both Windows and Linux. The configuration files work without any\r\nmodification, provided that you set up your environment first, by installing\r\nthe necessary tools and defining some environment variable.\r\n\r\nTo debug a C++ file, open a typescript file referencing the C++ file and start\r\nthe debugger (Running the debugger on C++ files directly won't work). Make sure\r\nthe \"Run\"-dropdown at the top of the debugging-sidebar is set to \"Current TS\r\nFile - native code only (&lt;your operating system&gt;)\"\r\n\r\nBelow, the setup steps for Windows and Linux.\r\n\r\n### Windows\r\n\r\nYou can more or less follow the instruction in\r\n[the VSCode C++ extension guide](https://code.visualstudio.com/docs/cpp/config-msvc).\r\nThen, you need to make sure all project [pre-requisites](#pre-requisite) are\r\ninstalled correctly, and finally set the following environment variables:\r\n\r\nEnvironment Variable | Value | Description\r\n--- | --- | ---\r\nLIBJABRA_WIN_NODE_GYP_CACHE_PATH | eg. %appdata%\\Local\\node-gyp\\Cache\\12.16.3\\include\\node | Used by the C/C++ extension to resolve include paths\r\nLIBJABRA_WIN_CPP_COMPILER_PATH | eg. C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x64/cl.exe | Used by the C/C++ extension to infer the path to the C++ standard library header files\r\n\r\n### Linux\r\n\r\nYou can read a more detailed guide on\r\n[the VSCode C++ extension page](https://code.visualstudio.com/docs/cpp/config-linux).\r\nThe important part is to install a C++ compiler and debugger. The easiest way\r\nis to install `build-essential` and `gdb`, this way:\r\n\r\n```sh\r\nsudo apt-get install build-essential gdb\r\n```\r\n\r\nThis maks your C++ compiler GCC, and you would likely use the `g++` command to\r\ncompile.\r\n\r\nThen, you need to install the project [pre-requisites](#pre-requisite), and\r\nfinally export the following environment variables:\r\n\r\nEnvironment Variable | Likely value | Description\r\n--- | --- | ---\r\nJABRA_NODESDK_CPP_COMPILER_PATH | /usr/bin/g++ | Used by the C/C++ extension to infer the path to the C++ standard library header files\r\nJABRA_NODESDK_NODE_GYP_CACHE_PATH | $HOME/.cache/node-gyp/14.4.0 | Used by the C/C++ extension to resolve include paths. **NOTE**: The final `include/node` is added by the configuration and it's not necessary\r\n","gypfile":true,"scripts":{"doc":"typedoc --mode file --excludePrivate --excludeExternals --excludeNotExported --out dist/doc src/main","tsc":"tsc","build":"npm run build:dev","clean":"node-gyp clean && rimraf dist","install":"node-gyp rebuild","prepare":"npm run tsc && npm run doc && node dist/script/generatemeta.js","build:dev":"node-gyp rebuild --debug && npm run tsc && npm run generatemeta","manualtest":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/manualtest/misc.ts","generatemeta":"ts-node src/script/generatemeta.ts","build:release":"node-gyp rebuild && npm run tsc && npm run generatemeta","example-btn-press-js":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/examples/button-press.js","example-btn-press-ts":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/examples/button-press.ts","example-ringer-sequence":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/examples/ringer-sequence.ts","pipeline-build-setversion":"node setversion.js"},"_npmUser":{"name":"martinjabra","email":"extmosoerensen@jabra.com"},"devEngines":{"npm":">=5.5.1","node":">=10.0.0"},"repository":{"url":"git+https://github.com/gnaudio/jabra-node-sdk.git","type":"git","directory":"nodesdk"},"_npmVersion":"6.14.15","description":"NodeJS SDK for Jabra Devices","directories":{},"_nodeVersion":"12.22.6","dependencies":{"bindings":"1.5.0","node-addon-api":"^3.0.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"rimraf":"3.0.2","ts-node":"8.8.2","typedoc":"0.17.4","cross-env":"7.0.2","typescript":"3.8.3","@types/node":"13.11.1","@types/bindings":"1.3.0","replace-in-file":"5.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jabra-node-sdk_3.5.0-beta.4_1632904941510_0.708262878206358","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"3.5.0-beta.5":{"name":"@gnaudio/jabra-node-sdk","version":"3.5.0-beta.5","keywords":["jabra","sdk"],"author":{"name":"GN Audio"},"license":"MIT","_id":"@gnaudio/jabra-node-sdk@3.5.0-beta.5","maintainers":[{"name":"daniel_vasile_42","email":"fvasile@jabra.com"},{"name":"sskjabra","email":"sklausen@jabra.com"},{"name":"theisjabra","email":"tfroehlich@jabra.com"},{"name":"dlaezza-jabra","email":"dlaezza@jabra.com"},{"name":"ifmladenov","email":"ifmladenov@jabra.com"},{"name":"thammond","email":"thammond@jabra.com"},{"name":"jdv85","email":"jvesterheden@jabra.com"},{"name":"martinjabra","email":"extmosoerensen@jabra.com"}],"homepage":"https://github.com/gnaudio/jabra-node-sdk/","bugs":{"url":"https://developer.jabra.com"},"dist":{"shasum":"5d7d59e77058ca9120089f0f22b63b5b86d7becd","tarball":"https://registry.npmjs.org/@gnaudio/jabra-node-sdk/-/jabra-node-sdk-3.5.0-beta.5.tgz","fileCount":198,"integrity":"sha512-vcsI/o556+3TMVHUQMTtsAxjZW3I0eqC8/RJmjIv8g4npyo3qCp+XEPBuPX553/z5nCN1mGbUJG9hLs/Qph+7Q==","signatures":[{"sig":"MEUCIQD5Yd73WIW9hUxN5+96h/lRwWuGz79bcTqxF2cGHGSOGwIgVwzbn97hswXOgPSWbYGmTmC/neMjGjhd3feWjimX4vc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17700160},"main":"dist/main/index.js","types":"dist/main/index.d.ts","readme":"Jabra Node.js SDK\r\n\r\n# Table of Contents\r\n\r\n- [Table of Contents](#table-of-contents)\r\n  - [Versions](#versions)\r\n  - [Pre-requisite](#pre-requisite)\r\n  - [Installation](#installation)\r\n  - [Debugging and Logging](#debugging-and-logging)\r\n  - [API Reference](#api-reference)\r\n  - [Examples](#examples)\r\n    - [Simple button events example using javascript and plain promises](#simple-button-events-example-using-javascript-and-plain-promises)\r\n    - [Simple button events example using typescript and plain promises](#simple-button-events-example-using-typescript-and-plain-promises)\r\n    - [Ring example using typescript and plain promises](#ring-example-using-typescript-and-plain-promises)\r\n    - [Multiple device management with typescript and async/await](#multiple-device-management-with-typescript-and-asyncawait)\r\n  - [Sequence diagrams](#sequence-diagrams)\r\n  - [Setup VSCode](#setup-vscode)\r\n    - [Windows](#windows)\r\n    - [Linux](#linux)\r\n\r\n## Versions\r\n\r\n[![npm version](https://badge.fury.io/js/%40gnaudio%2Fjabra-node-sdk.svg)](https://badge.fury.io/js/%40gnaudio%2Fjabra-node-sdk)\r\n\r\nLatest **STABLE** release is  [distributed on npmjs.com](https://www.npmjs.com/package/@gnaudio/jabra-node-sdk/) (see [changelog](https://github.com/gnaudio/jabra-node-sdk/blob/master/CHANGELOG.md) for changes and notable defects).\r\n\r\nIn addition, **BETA** versions may be available on npmjs with a version name ending with \"-beta.X\" specifier. For such BETA versions,the following applies:\r\n\r\n    > Disclaimer for Alpha and Beta Software Release\r\n\r\n    > Please note that this is a copyrighted Jabra Product ((c) 2017 GN Audio A/S) (the “Product”) which is still undergoing final testing before its official release. The Product and all content found on it are provided on an “as is” and “as available” basis. Jabra does not provide any warranties, neither express nor implied, as to the suitability or usability of the Product or any of its content.\r\n\r\n    > Jabra disclaims liability for any loss, whether direct, indirect, special or consequential, suffered by any person as a result of their use of the Product or the software embedded, and for any claim arising from any injury or damage, including but not limited to, any personal or bodily injury or tangible property damage, arising from or resulting in any way from any alleged defects in the material, workmanship, or performance of the Product, and Company shall indemnify Jabra in respect of any such claims. All usage of the Product is at users’ own risk and the user will be solely responsible for any resulting from such activities.\r\n\r\n    > Should you encounter any bugs, glitches, dangers, lack of functionality, lack of comfort or other problems with the Product, please let us know immediately so we can rectify these accordingly. Your help in this regard is greatly appreciated.\r\n\r\n    > The Product is released solely for test use in Company’s organization and must not under any circumstances be distributed to third parties without prior written acceptance from Jabra.\r\n\r\n    > By using the software, I accept and acknowledge the content herein.`\r\n\r\n## Pre-requisite\r\n\r\n1. Node.js v8.x or later.\r\n2. **On MacOS:** `xcode` & `python 2.7`. By default, Python is installed on macOS but make sure correct version(2.7.x) is installed. Install Xcode from App store or download it from [here](https://developer.apple.com/xcode/download/).\r\n3. **On Windows:** `Visual C++ Build Tools` & `Python 2.7`. You can install all of these by following any of the below mentioned steps.\r\n\r\n    3.1. **During Node.js installation** By ticking the checkbox when prompted during Node.js installation for `Tools for Native modules`, this installs both `Visual C++ Build Tools` & `Python 2.7`. **Note** This is prompted only for Windows platform. For other platforms like Linux or MAC, C++ compilation tools has to be installed separately as mentioned in other steps.\r\n\r\n    3.2. Both `Visual C++ Build Tools` & `Python 2.7` can also be installed using command `npm install --global --production --add-python-to-path windows-build-tools`. To know more about this tool, see [this link.](https://github.com/felixrieseberg/windows-build-tools). **Note** For executing this command through `Windows Command Prompt` or `Windows PowerShell`, they should be ran in Administrator mode.\r\n4. **On Linux:** `build-essential` package for C++ compilation & `Python 2.7`.\r\n\r\n    4.1. **Udev rules:** To be able to communicate with Jabra devices with non-root privileges it is required to create a udev rule for Jabra devices. Place the udev rule in `/etc/udev/rules.d`, and follow naming guidelines for udev files.\r\n\r\n    **Example:** The file name should be something like `80-jabra.rules` where the number before the dash indicates in what order the system reads the rules (e.g. if you had another rules file called `70-someotherrule.rules`, it would read that one first), the word after the dash is just an identifier of sorts (it could be something other than jabra) and the extension must be `.rules`.\r\n\r\n    The contents of the file are:\r\n\r\n    `ATTRS{idVendor}==\"0b0e\", MODE=\"0666\", GROUP=\"users\"`\r\n\r\n    After creating the udev file (as root), reload the udev rules using:\r\n\r\n    `sudo udevadm control --reload`\r\n\r\n    Reattach your Jabra device in order to get new permissions assigned.\r\n\r\n5. **All Platforms:** `node-gyp`. You can install this using command `npm install -g node-gyp`. To know more about this, see [this link](https://www.npmjs.com/package/node-gyp)\r\n\r\n6. **For Electron.JS:** If you are using `asar` packaging then you may need to `unpack` some of the resources used in this module. These resources are native library files i.e `libjabra.dll`, `libjabra.dylib` & `libjabra.so`, which is stored in a `build\\Release` folder. By default latest electron builder will automatically unpack, but if it does not work then you can provide below option to your build process. To know more, see [this link](https://www.electron.build/configuration/configuration)\r\n\r\n```javascript\r\n\"build\": {\r\n    \"asarUnpack\": [\"node_modules/@gnaudio/jabra-node-sdk\"]\r\n}\r\n```\r\n\r\n## Installation\r\n\r\nThis release is published to [npm](https://www.npmjs.com/package/@gnaudio/jabra-node-sdk) and can be installed via below command.\r\n\r\n```sh\r\nnpm install --save @gnaudio/jabra-node-sdk\r\n```\r\n\r\n## Debugging and Logging\r\n\r\nBelow environment variables are defined for logging and debugging purpose. User can change the values as per preference.\r\n\r\nEnvironment Variable | Value | Description\r\n--- | --- | ---\r\nLIBJABRA_TRACE_LEVEL | fatal, error, warning(default), info, debug | Log levels\r\nLIBJABRA_RESOURCE_PATH | **On Mac:** ~/Library/Application Support/JabraSDK/ **On Windows:** %appdata%/Roaming/JabraSDK  | This determine the system path where logs and device related files are written.\r\n\r\n## API Reference\r\n\r\nAPI doc is in html format. See doc folder inside installed module `node_modules\\@gnaudio\\jabra-node-sdk\\dist\\doc` and open `index.html`.\r\n\r\n## Examples\r\n\r\nFor all examples, user should first register the app on [Jabra developer site](https://developer.jabra.com/) to get appID. User should pass this appID to `createJabraApplication` in order to initialize the jabra module:\r\n\r\n### Simple button events example using javascript and plain promises\r\n\r\n```javascript\r\nconst j = require(\"@gnaudio/jabra-node-sdk\");\r\nj.createJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        console.log('Press any key on Jabra device ' + device.deviceName);\r\n        \r\n        device.on('btnPress', (btnType, btnValue) => {\r\n          console.log('New input from device is received: ', j.enumDeviceBtnType[btnType], btnValue);\r\n        });\r\n    });    \r\n});\r\n```\r\n\r\n### Simple button events example using typescript and plain promises\r\n\r\n```typescript\r\nimport { createJabraApplication, enumDeviceBtnType, enumHidState } from '@gnaudio/jabra-node-sdk';\r\ncreateJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        console.log('Press any key on Jabra device ' + device.deviceName);\r\n\r\n        device.on('btnPress', (btnType, btnValue) => {\r\n          console.log('New input from device is received: ', enumDeviceBtnType[btnType], btnValue);\r\n        });\r\n    });    \r\n});\r\n```\r\n\r\n### Ring example using typescript and plain promises\r\n\r\nThis example shows how to ring a Jabra device\r\n\r\n```typescript\r\nimport { createJabraApplication, JabraError } from '@gnaudio/jabra-node-sdk';\r\n\r\ncreateJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        device.isRingerSupportedAsync().then( (supported) => {\r\n            if (supported) {\r\n              device.ringAsync().then ( () => {\r\n                console.log('ringing');\r\n              }).catch ((err: JabraError) => {\r\n                console.log('ring failed with error ' + err);\r\n              }); // ring the device\r\n              setTimeout(() => {\r\n                device.unringAsync().then(() => {\r\n                    console.log('stopped ringing');\r\n                }).catch ((err: JabraError) => {\r\n                    console.log('unring failed with error ' + err);\r\n                });\r\n              }, 5000); // stop ringing the device after 5 second\r\n            }          \r\n        }).catch( (err: JabraError) => {\r\n            console.error('Jabra call failed with error ' + err)\r\n        });\r\n    });\r\n    \r\n    jabra.on('detach', (device) => {\r\n        console.log('Device detached with deviceID:', device.deviceID);\r\n\r\n        // In this demo example, we will auto shutdown once all jabra devices are removed:\r\n        let remainingAttachedDevices = jabra.getAttachedDevices();\r\n        if (remainingAttachedDevices.length == 0) {\r\n            jabra.disposeAsync().then (() => {}); // Cleanup and allow node process to exit.\r\n        }\r\n    });\r\n});\r\n```\r\n\r\n### Multiple device management with typescript and async/await\r\n\r\n```typescript\r\nimport { createJabraApplication } from '@gnaudio/jabra-node-sdk';\r\n\r\n(async () => {\r\n    let jabra = await createJabraApplication('123'); // 123 is appID here\r\n\r\n    await jabra.scanForDevicesDoneAsync(); // Wait for all pre-attached devices to be scanned.\r\n\r\n    const deviceInstanceList = jabra.getAttachedDevices();\r\n    if (deviceInstanceList.length<2) {\r\n        throw new Error('Please make sure 2 jabra devices are attached');\r\n    }\r\n\r\n    const firstDevice = deviceInstanceList[0];\r\n    await firstDevice.ringAsync();\r\n\r\n    const secondDevice = deviceInstanceList[1];\r\n    await secondDevice.ringAsync();\r\n\r\n    // Dispose jabra sdk to enable node process to shutdown.\r\n    await jabra.disposeAsync();\r\n})();\r\n```\r\n\r\n## Sequence diagrams\r\n\r\nThese sequence diagrams shows typical uses of the Node.js sdk:\r\n\r\n![Sequence diagram](https://github.com/gnaudio/jabra-node-sdk/raw/master/nodesdk/docs/start-outgoing-call-then-end-call.svg)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/jabra-node-sdk/raw/master/nodesdk/docs/incoming-call-accepted-on-device-then-ended-on-device.svg)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/jabra-node-sdk/raw/master/nodesdk/docs/incoming-call-rejected-on-device.svg)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/jabra-node-sdk/raw/master/nodesdk/docs/mute-and-unmute-call-by-user.svg)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/jabra-node-sdk/raw/master/nodesdk/docs/hold-and-resume-by-user.svg)\r\n\r\n## Setup VSCode\r\n\r\nThe project includes config files for debugging typescript and C++ source files\r\nin [Visual Studio Code](https://code.visualstudio.com/) via the\r\n[C++ extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools),\r\nfor both Windows and Linux. The configuration files work without any\r\nmodification, provided that you set up your environment first, by installing\r\nthe necessary tools and defining some environment variable.\r\n\r\nTo debug a C++ file, open a typescript file referencing the C++ file and start\r\nthe debugger (Running the debugger on C++ files directly won't work). Make sure\r\nthe \"Run\"-dropdown at the top of the debugging-sidebar is set to \"Current TS\r\nFile - native code only (&lt;your operating system&gt;)\"\r\n\r\nBelow, the setup steps for Windows and Linux.\r\n\r\n### Windows\r\n\r\nYou can more or less follow the instruction in\r\n[the VSCode C++ extension guide](https://code.visualstudio.com/docs/cpp/config-msvc).\r\nThen, you need to make sure all project [pre-requisites](#pre-requisite) are\r\ninstalled correctly, and finally set the following environment variables:\r\n\r\nEnvironment Variable | Value | Description\r\n--- | --- | ---\r\nLIBJABRA_WIN_NODE_GYP_CACHE_PATH | eg. %appdata%\\Local\\node-gyp\\Cache\\12.16.3\\include\\node | Used by the C/C++ extension to resolve include paths\r\nLIBJABRA_WIN_CPP_COMPILER_PATH | eg. C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x64/cl.exe | Used by the C/C++ extension to infer the path to the C++ standard library header files\r\n\r\n### Linux\r\n\r\nYou can read a more detailed guide on\r\n[the VSCode C++ extension page](https://code.visualstudio.com/docs/cpp/config-linux).\r\nThe important part is to install a C++ compiler and debugger. The easiest way\r\nis to install `build-essential` and `gdb`, this way:\r\n\r\n```sh\r\nsudo apt-get install build-essential gdb\r\n```\r\n\r\nThis maks your C++ compiler GCC, and you would likely use the `g++` command to\r\ncompile.\r\n\r\nThen, you need to install the project [pre-requisites](#pre-requisite), and\r\nfinally export the following environment variables:\r\n\r\nEnvironment Variable | Likely value | Description\r\n--- | --- | ---\r\nJABRA_NODESDK_CPP_COMPILER_PATH | /usr/bin/g++ | Used by the C/C++ extension to infer the path to the C++ standard library header files\r\nJABRA_NODESDK_NODE_GYP_CACHE_PATH | $HOME/.cache/node-gyp/14.4.0 | Used by the C/C++ extension to resolve include paths. **NOTE**: The final `include/node` is added by the configuration and it's not necessary\r\n","gypfile":true,"scripts":{"doc":"typedoc --mode file --excludePrivate --excludeExternals --excludeNotExported --out dist/doc src/main","tsc":"tsc","build":"npm run build:dev","clean":"node-gyp clean && rimraf dist","install":"node-gyp rebuild","prepare":"npm run tsc && npm run doc && node dist/script/generatemeta.js","build:dev":"node-gyp rebuild --debug && npm run tsc && npm run generatemeta","manualtest":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/manualtest/misc.ts","generatemeta":"ts-node src/script/generatemeta.ts","build:release":"node-gyp rebuild && npm run tsc && npm run generatemeta","example-btn-press-js":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/examples/button-press.js","example-btn-press-ts":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/examples/button-press.ts","example-ringer-sequence":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/examples/ringer-sequence.ts","pipeline-build-setversion":"node setversion.js"},"_npmUser":{"name":"martinjabra","email":"extmosoerensen@jabra.com"},"devEngines":{"npm":">=5.5.1","node":">=10.0.0"},"repository":{"url":"git+https://github.com/gnaudio/jabra-node-sdk.git","type":"git","directory":"nodesdk"},"_npmVersion":"6.14.15","description":"NodeJS SDK for Jabra Devices","directories":{},"_nodeVersion":"12.22.6","dependencies":{"bindings":"1.5.0","node-addon-api":"^3.0.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"rimraf":"3.0.2","ts-node":"8.8.2","typedoc":"0.17.4","cross-env":"7.0.2","typescript":"3.8.3","@types/node":"13.11.1","@types/bindings":"1.3.0","replace-in-file":"5.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jabra-node-sdk_3.5.0-beta.5_1633693081988_0.7392454123862031","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"3.5.1-beta.0":{"name":"@gnaudio/jabra-node-sdk","version":"3.5.1-beta.0","keywords":["jabra","sdk"],"author":{"name":"GN Audio"},"license":"MIT","_id":"@gnaudio/jabra-node-sdk@3.5.1-beta.0","maintainers":[{"name":"daniel_vasile_42","email":"fvasile@jabra.com"},{"name":"sskjabra","email":"sklausen@jabra.com"},{"name":"theisjabra","email":"tfroehlich@jabra.com"},{"name":"dlaezza-jabra","email":"dlaezza@jabra.com"},{"name":"ifmladenov","email":"ifmladenov@jabra.com"},{"name":"thammond","email":"thammond@jabra.com"},{"name":"martinjabra","email":"extmosoerensen@jabra.com"}],"homepage":"https://github.com/gnaudio/jabra-node-sdk/","bugs":{"url":"https://developer.jabra.com"},"dist":{"shasum":"e3cbcde9e8c9eb6b6ad6cfe617d0d90455177a48","tarball":"https://registry.npmjs.org/@gnaudio/jabra-node-sdk/-/jabra-node-sdk-3.5.1-beta.0.tgz","fileCount":198,"integrity":"sha512-JnQFj3SoYUtzQGzruaRilsjm30/ZV7WbjZ1WhmcJWAz+QU3LXjxcRI0Dr0bBadGL1BID8y4tKbvjk6/fvUq1gA==","signatures":[{"sig":"MEYCIQCkkhGSJAKasyqEKP0Lou4Q/+noK6u9oXqEvo16C27+igIhANta0DXgTUbGlG4yVgt2X+nFe+2rca8bgaruxt7KunuA","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":17630967},"main":"dist/main/index.js","types":"dist/main/index.d.ts","readme":"Jabra Node.js SDK\r\n\r\n# Table of Contents\r\n\r\n- [Table of Contents](#table-of-contents)\r\n  - [Versions](#versions)\r\n  - [Pre-requisite](#pre-requisite)\r\n  - [Installation](#installation)\r\n  - [Debugging and Logging](#debugging-and-logging)\r\n  - [API Reference](#api-reference)\r\n  - [Examples](#examples)\r\n    - [Simple button events example using javascript and plain promises](#simple-button-events-example-using-javascript-and-plain-promises)\r\n    - [Simple button events example using typescript and plain promises](#simple-button-events-example-using-typescript-and-plain-promises)\r\n    - [Ring example using typescript and plain promises](#ring-example-using-typescript-and-plain-promises)\r\n    - [Multiple device management with typescript and async/await](#multiple-device-management-with-typescript-and-asyncawait)\r\n  - [Sequence diagrams](#sequence-diagrams)\r\n  - [Setup VSCode](#setup-vscode)\r\n    - [Windows](#windows)\r\n    - [Linux](#linux)\r\n\r\n## Versions\r\n\r\n[![npm version](https://badge.fury.io/js/%40gnaudio%2Fjabra-node-sdk.svg)](https://badge.fury.io/js/%40gnaudio%2Fjabra-node-sdk)\r\n\r\nLatest **STABLE** release is  [distributed on npmjs.com](https://www.npmjs.com/package/@gnaudio/jabra-node-sdk/) (see [changelog](https://github.com/gnaudio/jabra-node-sdk/blob/master/CHANGELOG.md) for changes and notable defects).\r\n\r\nIn addition, **BETA** versions may be available on npmjs with a version name ending with \"-beta.X\" specifier. For such BETA versions,the following applies:\r\n\r\n    > Disclaimer for Alpha and Beta Software Release\r\n\r\n    > Please note that this is a copyrighted Jabra Product ((c) 2017 GN Audio A/S) (the “Product”) which is still undergoing final testing before its official release. The Product and all content found on it are provided on an “as is” and “as available” basis. Jabra does not provide any warranties, neither express nor implied, as to the suitability or usability of the Product or any of its content.\r\n\r\n    > Jabra disclaims liability for any loss, whether direct, indirect, special or consequential, suffered by any person as a result of their use of the Product or the software embedded, and for any claim arising from any injury or damage, including but not limited to, any personal or bodily injury or tangible property damage, arising from or resulting in any way from any alleged defects in the material, workmanship, or performance of the Product, and Company shall indemnify Jabra in respect of any such claims. All usage of the Product is at users’ own risk and the user will be solely responsible for any resulting from such activities.\r\n\r\n    > Should you encounter any bugs, glitches, dangers, lack of functionality, lack of comfort or other problems with the Product, please let us know immediately so we can rectify these accordingly. Your help in this regard is greatly appreciated.\r\n\r\n    > The Product is released solely for test use in Company’s organization and must not under any circumstances be distributed to third parties without prior written acceptance from Jabra.\r\n\r\n    > By using the software, I accept and acknowledge the content herein.`\r\n\r\n## Pre-requisite\r\n\r\n1. Node.js v8.x or later.\r\n2. **On MacOS:** `xcode` & `python 2.7`. By default, Python is installed on macOS but make sure correct version(2.7.x) is installed. Install Xcode from App store or download it from [here](https://developer.apple.com/xcode/download/).\r\n3. **On Windows:** `Visual C++ Build Tools` & `Python 2.7`. You can install all of these by following any of the below mentioned steps.\r\n\r\n    3.1. **During Node.js installation** By ticking the checkbox when prompted during Node.js installation for `Tools for Native modules`, this installs both `Visual C++ Build Tools` & `Python 2.7`. **Note** This is prompted only for Windows platform. For other platforms like Linux or MAC, C++ compilation tools has to be installed separately as mentioned in other steps.\r\n\r\n    3.2. Both `Visual C++ Build Tools` & `Python 2.7` can also be installed using command `npm install --global --production --add-python-to-path windows-build-tools`. To know more about this tool, see [this link.](https://github.com/felixrieseberg/windows-build-tools). **Note** For executing this command through `Windows Command Prompt` or `Windows PowerShell`, they should be ran in Administrator mode.\r\n4. **On Linux:** `build-essential` package for C++ compilation & `Python 2.7`.\r\n\r\n    4.1. **Udev rules:** To be able to communicate with Jabra devices with non-root privileges it is required to create a udev rule for Jabra devices. Place the udev rule in `/etc/udev/rules.d`, and follow naming guidelines for udev files.\r\n\r\n    **Example:** The file name should be something like `80-jabra.rules` where the number before the dash indicates in what order the system reads the rules (e.g. if you had another rules file called `70-someotherrule.rules`, it would read that one first), the word after the dash is just an identifier of sorts (it could be something other than jabra) and the extension must be `.rules`.\r\n\r\n    The contents of the file are:\r\n\r\n    `ATTRS{idVendor}==\"0b0e\", MODE=\"0666\", GROUP=\"users\"`\r\n\r\n    After creating the udev file (as root), reload the udev rules using:\r\n\r\n    `sudo udevadm control --reload`\r\n\r\n    Reattach your Jabra device in order to get new permissions assigned.\r\n\r\n5. **All Platforms:** `node-gyp`. You can install this using command `npm install -g node-gyp`. To know more about this, see [this link](https://www.npmjs.com/package/node-gyp)\r\n\r\n6. **For Electron.JS:** If you are using `asar` packaging then you may need to `unpack` some of the resources used in this module. These resources are native library files i.e `libjabra.dll`, `libjabra.dylib` & `libjabra.so`, which is stored in a `build\\Release` folder. By default latest electron builder will automatically unpack, but if it does not work then you can provide below option to your build process. To know more, see [this link](https://www.electron.build/configuration/configuration)\r\n\r\n```javascript\r\n\"build\": {\r\n    \"asarUnpack\": [\"node_modules/@gnaudio/jabra-node-sdk\"]\r\n}\r\n```\r\n\r\n## Installation\r\n\r\nThis release is published to [npm](https://www.npmjs.com/package/@gnaudio/jabra-node-sdk) and can be installed via below command.\r\n\r\n```sh\r\nnpm install --save @gnaudio/jabra-node-sdk\r\n```\r\n\r\n## Debugging and Logging\r\n\r\nBelow environment variables are defined for logging and debugging purpose. User can change the values as per preference.\r\n\r\nEnvironment Variable | Value | Description\r\n--- | --- | ---\r\nLIBJABRA_TRACE_LEVEL | fatal, error, warning(default), info, debug | Log levels\r\nLIBJABRA_RESOURCE_PATH | **On Mac:** ~/Library/Application Support/JabraSDK/ **On Windows:** %appdata%/Roaming/JabraSDK  | This determine the system path where logs and device related files are written.\r\n\r\n## API Reference\r\n\r\nAPI doc is in html format. See doc folder inside installed module `node_modules\\@gnaudio\\jabra-node-sdk\\dist\\doc` and open `index.html`.\r\n\r\n## Examples\r\n\r\nFor all examples, user should first register the app on [Jabra developer site](https://developer.jabra.com/) to get appID. User should pass this appID to `createJabraApplication` in order to initialize the jabra module:\r\n\r\n### Simple button events example using javascript and plain promises\r\n\r\n```javascript\r\nconst j = require(\"@gnaudio/jabra-node-sdk\");\r\nj.createJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        console.log('Press any key on Jabra device ' + device.deviceName);\r\n        \r\n        device.on('btnPress', (btnType, btnValue) => {\r\n          console.log('New input from device is received: ', j.enumDeviceBtnType[btnType], btnValue);\r\n        });\r\n    });    \r\n});\r\n```\r\n\r\n### Simple button events example using typescript and plain promises\r\n\r\n```typescript\r\nimport { createJabraApplication, enumDeviceBtnType, enumHidState } from '@gnaudio/jabra-node-sdk';\r\ncreateJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        console.log('Press any key on Jabra device ' + device.deviceName);\r\n\r\n        device.on('btnPress', (btnType, btnValue) => {\r\n          console.log('New input from device is received: ', enumDeviceBtnType[btnType], btnValue);\r\n        });\r\n    });    \r\n});\r\n```\r\n\r\n### Ring example using typescript and plain promises\r\n\r\nThis example shows how to ring a Jabra device\r\n\r\n```typescript\r\nimport { createJabraApplication, JabraError } from '@gnaudio/jabra-node-sdk';\r\n\r\ncreateJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        device.isRingerSupportedAsync().then( (supported) => {\r\n            if (supported) {\r\n              device.ringAsync().then ( () => {\r\n                console.log('ringing');\r\n              }).catch ((err: JabraError) => {\r\n                console.log('ring failed with error ' + err);\r\n              }); // ring the device\r\n              setTimeout(() => {\r\n                device.unringAsync().then(() => {\r\n                    console.log('stopped ringing');\r\n                }).catch ((err: JabraError) => {\r\n                    console.log('unring failed with error ' + err);\r\n                });\r\n              }, 5000); // stop ringing the device after 5 second\r\n            }          \r\n        }).catch( (err: JabraError) => {\r\n            console.error('Jabra call failed with error ' + err)\r\n        });\r\n    });\r\n    \r\n    jabra.on('detach', (device) => {\r\n        console.log('Device detached with deviceID:', device.deviceID);\r\n\r\n        // In this demo example, we will auto shutdown once all jabra devices are removed:\r\n        let remainingAttachedDevices = jabra.getAttachedDevices();\r\n        if (remainingAttachedDevices.length == 0) {\r\n            jabra.disposeAsync().then (() => {}); // Cleanup and allow node process to exit.\r\n        }\r\n    });\r\n});\r\n```\r\n\r\n### Multiple device management with typescript and async/await\r\n\r\n```typescript\r\nimport { createJabraApplication } from '@gnaudio/jabra-node-sdk';\r\n\r\n(async () => {\r\n    let jabra = await createJabraApplication('123'); // 123 is appID here\r\n\r\n    await jabra.scanForDevicesDoneAsync(); // Wait for all pre-attached devices to be scanned.\r\n\r\n    const deviceInstanceList = jabra.getAttachedDevices();\r\n    if (deviceInstanceList.length<2) {\r\n        throw new Error('Please make sure 2 jabra devices are attached');\r\n    }\r\n\r\n    const firstDevice = deviceInstanceList[0];\r\n    await firstDevice.ringAsync();\r\n\r\n    const secondDevice = deviceInstanceList[1];\r\n    await secondDevice.ringAsync();\r\n\r\n    // Dispose jabra sdk to enable node process to shutdown.\r\n    await jabra.disposeAsync();\r\n})();\r\n```\r\n\r\n## Sequence diagrams\r\n\r\nThese sequence diagrams shows typical uses of the Node.js sdk:\r\n\r\n![Sequence diagram](https://github.com/gnaudio/jabra-node-sdk/raw/master/nodesdk/docs/start-outgoing-call-then-end-call.svg)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/jabra-node-sdk/raw/master/nodesdk/docs/incoming-call-accepted-on-device-then-ended-on-device.svg)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/jabra-node-sdk/raw/master/nodesdk/docs/incoming-call-rejected-on-device.svg)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/jabra-node-sdk/raw/master/nodesdk/docs/mute-and-unmute-call-by-user.svg)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/jabra-node-sdk/raw/master/nodesdk/docs/hold-and-resume-by-user.svg)\r\n\r\n## Setup VSCode\r\n\r\nThe project includes config files for debugging typescript and C++ source files\r\nin [Visual Studio Code](https://code.visualstudio.com/) via the\r\n[C++ extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools),\r\nfor both Windows and Linux. The configuration files work without any\r\nmodification, provided that you set up your environment first, by installing\r\nthe necessary tools and defining some environment variable.\r\n\r\nTo debug a C++ file, open a typescript file referencing the C++ file and start\r\nthe debugger (Running the debugger on C++ files directly won't work). Make sure\r\nthe \"Run\"-dropdown at the top of the debugging-sidebar is set to \"Current TS\r\nFile - native code only (&lt;your operating system&gt;)\"\r\n\r\nBelow, the setup steps for Windows and Linux.\r\n\r\n### Windows\r\n\r\nYou can more or less follow the instruction in\r\n[the VSCode C++ extension guide](https://code.visualstudio.com/docs/cpp/config-msvc).\r\nThen, you need to make sure all project [pre-requisites](#pre-requisite) are\r\ninstalled correctly, and finally set the following environment variables:\r\n\r\nEnvironment Variable | Value | Description\r\n--- | --- | ---\r\nLIBJABRA_WIN_NODE_GYP_CACHE_PATH | eg. %appdata%\\Local\\node-gyp\\Cache\\12.16.3\\include\\node | Used by the C/C++ extension to resolve include paths\r\nLIBJABRA_WIN_CPP_COMPILER_PATH | eg. C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x64/cl.exe | Used by the C/C++ extension to infer the path to the C++ standard library header files\r\n\r\n### Linux\r\n\r\nYou can read a more detailed guide on\r\n[the VSCode C++ extension page](https://code.visualstudio.com/docs/cpp/config-linux).\r\nThe important part is to install a C++ compiler and debugger. The easiest way\r\nis to install `build-essential` and `gdb`, this way:\r\n\r\n```sh\r\nsudo apt-get install build-essential gdb\r\n```\r\n\r\nThis maks your C++ compiler GCC, and you would likely use the `g++` command to\r\ncompile.\r\n\r\nThen, you need to install the project [pre-requisites](#pre-requisite), and\r\nfinally export the following environment variables:\r\n\r\nEnvironment Variable | Likely value | Description\r\n--- | --- | ---\r\nJABRA_NODESDK_CPP_COMPILER_PATH | /usr/bin/g++ | Used by the C/C++ extension to infer the path to the C++ standard library header files\r\nJABRA_NODESDK_NODE_GYP_CACHE_PATH | $HOME/.cache/node-gyp/14.4.0 | Used by the C/C++ extension to resolve include paths. **NOTE**: The final `include/node` is added by the configuration and it's not necessary\r\n","gypfile":true,"scripts":{"doc":"typedoc --mode file --excludePrivate --excludeExternals --excludeNotExported --out dist/doc src/main","tsc":"tsc","build":"npm run build:dev","clean":"node-gyp clean && rimraf dist","install":"node-gyp rebuild","prepare":"npm run tsc && npm run doc && node dist/script/generatemeta.js","build:dev":"node-gyp rebuild --debug && npm run tsc && npm run generatemeta","manualtest":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/manualtest/misc.ts","generatemeta":"ts-node src/script/generatemeta.ts","build:release":"node-gyp rebuild && npm run tsc && npm run generatemeta","example-btn-press-js":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/examples/button-press.js","example-btn-press-ts":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/examples/button-press.ts","example-ringer-sequence":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/examples/ringer-sequence.ts","pipeline-build-setversion":"node setversion.js"},"_npmUser":{"name":"martinjabra","email":"extmosoerensen@jabra.com"},"devEngines":{"npm":">=5.5.1","node":">=10.0.0"},"repository":{"url":"git+https://github.com/gnaudio/jabra-node-sdk.git","type":"git","directory":"nodesdk"},"_npmVersion":"6.14.15","description":"NodeJS SDK for Jabra Devices","directories":{},"_nodeVersion":"12.22.7","dependencies":{"bindings":"1.5.0","node-addon-api":"^3.0.2"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"rimraf":"3.0.2","ts-node":"8.8.2","typedoc":"0.17.4","cross-env":"7.0.2","typescript":"3.8.3","@types/node":"13.11.1","@types/bindings":"1.3.0","replace-in-file":"5.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jabra-node-sdk_3.5.1-beta.0_1636056176712_0.4930571988114172","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."},"3.6.2":{"name":"@gnaudio/jabra-node-sdk","version":"3.6.2","keywords":["jabra","sdk"],"author":{"name":"GN Audio"},"license":"MIT","_id":"@gnaudio/jabra-node-sdk@3.6.2","maintainers":[{"name":"daniel_vasile_42","email":"fvasile@jabra.com"},{"name":"sskjabra","email":"sklausen@jabra.com"},{"name":"theisjabra","email":"tfroehlich@jabra.com"},{"name":"dlaezza-jabra","email":"dlaezza@jabra.com"},{"name":"ifmladenov","email":"ifmladenov@jabra.com"},{"name":"thammond","email":"thammond@jabra.com"},{"name":"martinjabra","email":"extmosoerensen@jabra.com"}],"homepage":"https://github.com/gnaudio/jabra-node-sdk/","bugs":{"url":"https://developer.jabra.com"},"dist":{"shasum":"58636fc3c1286667050654ded6c40fe1222c0f48","tarball":"https://registry.npmjs.org/@gnaudio/jabra-node-sdk/-/jabra-node-sdk-3.6.2.tgz","fileCount":216,"integrity":"sha512-7FZphfdWWIqRxj9j3uKS3opzRq+6/o+mhZjp/aiG6+YeginyUuDjoEyygd16E+3+gJlUBnlvHgUDaTQo9esJPQ==","signatures":[{"sig":"MEUCIQCEG1nhHSnihgOcS5aQEeZbdTANGHtSGmnVGX9iMtrcUgIgJdkFZTnxyb2cij07SenAPJz3t7rd3srszwDQez4fu+g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":16436406,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiuWJiACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo/MQ//WLQpmtc8vLySEp/ItQwgG+W6ZMPKiebc4uSy4K3Gnlr3Ss+k\r\nm3KmIpdznNDP3BdHYh9HyaAeUHCL6hd9bAv/Oz5HqX+OrB4hTPQIXzxd80y5\r\n3nVK7ouftoTvJ228KLw6jXUe25D6IjhJ0DHxQm7Vq2NsQna/utd9dy9v8Ct1\r\niCAsJWp99XQ+oxwYEA/HNBmoPMwojBAX3IGOgmjvBSFd7FscbwyRc49Wc24i\r\ni5Pra9cxbo+yDOLQRuRo0XnrSzqUfBs9Hw6EJl3bZ+IrkRR4+Hu4ejB1Xta2\r\nlIEKlBuqZBTdIwWQDYHmhEj5UoENhE2UxDW1yop6Q2WVutXZMOzfpFZCvUc4\r\ncYXFY/GXQLlWSk8xMOoxf8JmSj4EcouvX9xLf1OL9HFk8dmCUpLdnhYZzqd8\r\n198wNkT6izRqNEmS8JjGY3gVBzYjQjQsDRPzutk05xoxgILkYhPlBECeqXcT\r\nEh3YAsVpSJtTVPfL02nJS+xG9W+aBwTffEkvmWdsaxBuqT5c0kDYMwbTHIfy\r\nb6/HXt/2i1Ii2Gs3uCF6TfAP46gkjLsYSMdfTkhrVUAiuzV8gaP6XHAwn6u2\r\nVJI5eD2AoB3OxiV9zW8lApq4rI5buC3dI3kxTkc91fMdU9tLMOjQ2H6orGzN\r\niZTk7Hxy6VbYUUa1rg8cAifnwJ7taaI5hzE=\r\n=U7St\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/main/index.js","types":"dist/main/index.d.ts","gypfile":true,"scripts":{"doc":"typedoc --mode file --excludePrivate --excludeExternals --excludeNotExported --out dist/doc src/main","tsc":"tsc","build":"npm run build:dev","clean":"node-gyp clean && rimraf dist","install":"node-gyp rebuild","prepare":"npm run tsc && npm run doc && node dist/script/generatemeta.js","build:dev":"node-gyp rebuild --debug && npm run tsc && npm run generatemeta","manualtest":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/manualtest/misc.ts","generatemeta":"ts-node src/script/generatemeta.ts","build:release":"node-gyp rebuild && npm run tsc && npm run generatemeta","example-btn-press-js":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/examples/button-press.js","example-btn-press-ts":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/examples/button-press.ts","example-ringer-sequence":"cross-env LIBJABRA_TRACE_LEVEL=${LIBJABRA_TRACE_LEVEL:-trace} ts-node src/examples/ringer-sequence.ts","pipeline-build-setversion":"node setversion.js"},"_npmUser":{"name":"martinjabra","email":"extmosoerensen@jabra.com"},"devEngines":{"npm":">=5.5.1","node":">=10.0.0"},"repository":{"url":"git+https://github.com/gnaudio/jabra-node-sdk.git","type":"git","directory":"nodesdk"},"_npmVersion":"6.14.16","description":"NodeJS SDK for Jabra Devices","directories":{},"_nodeVersion":"12.22.12","dependencies":{"bindings":"1.5.0","node-gyp":"^8.4.1","node-addon-api":"^3.0.2"},"_hasShrinkwrap":false,"devDependencies":{"rimraf":"3.0.2","ts-node":"8.8.2","typedoc":"0.17.4","cross-env":"7.0.2","typescript":"3.8.3","@types/node":"^17.0.8","@types/bindings":"1.3.0","replace-in-file":"5.0.2"},"_npmOperationalInternal":{"tmp":"tmp/jabra-node-sdk_3.6.2_1656316514290_0.749841744689677","host":"s3://npm-registry-packages"},"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."}},"time":{"created":"2019-09-26T11:51:34.937Z","modified":"2026-06-24T11:04:12.743Z","2.0.0-beta.1":"2019-09-26T11:51:35.521Z","2.0.0-beta.2":"2019-10-04T08:39:07.375Z","2.0.0-beta.3":"2019-10-11T10:38:11.369Z","2.0.0-beta.4":"2019-10-23T10:28:47.004Z","2.0.0-beta.5":"2019-10-25T07:46:30.784Z","2.0.0-beta.6":"2019-10-29T11:45:19.035Z","2.0.0-beta.7":"2019-11-04T14:01:47.393Z","2.0.0-beta.8":"2019-11-07T11:49:28.119Z","2.0.0-beta.9":"2019-11-14T09:10:51.037Z","2.0.0-beta.10":"2019-11-19T07:27:42.664Z","2.0.0-beta.11":"2019-11-21T08:52:22.246Z","2.0.0-beta.12":"2019-12-03T12:40:46.187Z","2.0.0":"2019-12-10T08:48:56.924Z","3.0.0-beta.1":"2019-12-10T13:55:38.201Z","3.0.0":"2020-02-28T11:30:57.147Z","3.1.0-beta.1":"2020-03-10T11:46:20.377Z","3.1.0-beta.2":"2020-04-15T10:31:53.567Z","3.1.0-beta.3":"2020-05-27T08:10:34.620Z","3.1.0-beta.4":"2020-06-04T08:16:39.003Z","3.1.0":"2020-06-16T06:27:08.891Z","3.2.0-beta.1":"2020-06-30T06:44:16.033Z","3.2.0":"2020-07-09T12:23:38.318Z","3.3.0-beta.1":"2020-07-30T12:06:31.956Z","3.3.0-beta.2":"2020-08-04T06:49:45.628Z","3.2.1-beta.1":"2020-11-16T13:26:45.721Z","3.2.0-beta.2":"2020-11-23T10:21:45.410Z","3.2.1-beta.2":"2020-11-23T10:23:33.734Z","3.2.1-beta.3":"2020-11-27T08:32:01.152Z","3.2.1-beta.4":"2020-12-03T08:27:23.063Z","3.2.1-beta.5":"2020-12-04T09:08:31.098Z","3.2.1":"2020-12-07T12:15:18.618Z","3.2.2-beta.1":"2021-02-25T14:57:35.784Z","3.2.2-beta.2":"2021-03-13T10:54:58.452Z","3.2.2-beta.3":"2021-03-17T12:41:47.609Z","3.2.2-beta.4":"2021-03-23T08:46:52.721Z","3.2.2-beta.5":"2021-03-24T09:28:02.175Z","3.2.2-beta.6":"2021-04-06T13:14:39.025Z","3.2.2":"2021-04-08T13:40:00.135Z","3.2.3-beta.1":"2021-04-28T12:02:51.944Z","3.2.3":"2021-05-10T14:00:39.544Z","3.3.0":"2021-06-07T14:39:17.425Z","3.4.0-beta.1":"2021-07-01T09:20:38.977Z","3.4.0-beta.2":"2021-07-14T15:04:13.226Z","3.4.0":"2021-07-23T08:53:09.596Z","3.5.0-beta.1":"2021-09-16T18:14:32.361Z","3.5.0-beta.2":"2021-09-21T03:36:44.841Z","3.5.0-beta.3":"2021-09-24T11:05:12.116Z","3.5.0-beta.4":"2021-09-29T08:42:21.854Z","3.5.0-beta.5":"2021-10-08T11:38:02.338Z","3.5.1-beta.0":"2021-11-04T20:02:57.040Z","3.6.2":"2022-06-27T07:55:14.655Z"},"bugs":{"url":"https://developer.jabra.com"},"author":{"name":"GN Audio"},"license":"MIT","homepage":"https://github.com/gnaudio/jabra-node-sdk/","keywords":["jabra","sdk"],"repository":{"url":"git+https://github.com/gnaudio/jabra-node-sdk.git","type":"git","directory":"nodesdk"},"description":"NodeJS SDK for Jabra Devices","maintainers":[{"name":"amilylin","email":"amlin@jabra.com"},{"name":"jabra-sdk-team","email":"sdk@jabra.com"},{"name":"jpoplavski","email":"jpoplavski@jabra.com"},{"name":"leix","email":"lexian@jabra.com"},{"name":"lemvigh-jabra","email":"mlemvigh@jabra.com"},{"name":"pehandersen-jabra","email":"pehandersen@jabra.com"},{"name":"sorenkrabbe","email":"sk@sokr.dk"}],"readme":"Jabra Node.js SDK\r\n\r\n# Table of Contents\r\n\r\n- [Table of Contents](#table-of-contents)\r\n  - [Versions](#versions)\r\n  - [Pre-requisite](#pre-requisite)\r\n  - [Installation](#installation)\r\n  - [Debugging and Logging](#debugging-and-logging)\r\n  - [API Reference](#api-reference)\r\n  - [Examples](#examples)\r\n    - [Simple button events example using javascript and plain promises](#simple-button-events-example-using-javascript-and-plain-promises)\r\n    - [Simple button events example using typescript and plain promises](#simple-button-events-example-using-typescript-and-plain-promises)\r\n    - [Ring example using typescript and plain promises](#ring-example-using-typescript-and-plain-promises)\r\n    - [Multiple device management with typescript and async/await](#multiple-device-management-with-typescript-and-asyncawait)\r\n  - [Sequence diagrams](#sequence-diagrams)\r\n  - [Setup VSCode](#setup-vscode)\r\n    - [Windows](#windows)\r\n    - [Linux](#linux)\r\n\r\n## Versions\r\n\r\n[![npm version](https://badge.fury.io/js/%40gnaudio%2Fjabra-node-sdk.svg)](https://badge.fury.io/js/%40gnaudio%2Fjabra-node-sdk)\r\n\r\nLatest **STABLE** release is  [distributed on npmjs.com](https://www.npmjs.com/package/@gnaudio/jabra-node-sdk/) (see [changelog](https://github.com/gnaudio/jabra-node-sdk/blob/master/CHANGELOG.md) for changes and notable defects).\r\n\r\nAlthough this package also contains a library for Windows ARM64, this should be considered as Beta for the moment since it has not received full testing.\r\n\r\nIn addition, **BETA** versions may be available on npmjs with a version name ending with \"-beta.X\" specifier. For such BETA versions,the following applies:\r\n\r\n    > Disclaimer for Alpha and Beta Software Release\r\n\r\n    > Please note that this is a copyrighted Jabra Product ((c) 2022 GN Audio A/S) (the “Product”) which is still undergoing final testing before its official release. The Product and all content found on it are provided on an “as is” and “as available” basis. Jabra does not provide any warranties, neither express nor implied, as to the suitability or usability of the Product or any of its content.\r\n\r\n    > Jabra disclaims liability for any loss, whether direct, indirect, special or consequential, suffered by any person as a result of their use of the Product or the software embedded, and for any claim arising from any injury or damage, including but not limited to, any personal or bodily injury or tangible property damage, arising from or resulting in any way from any alleged defects in the material, workmanship, or performance of the Product, and Company shall indemnify Jabra in respect of any such claims. All usage of the Product is at users’ own risk and the user will be solely responsible for any resulting from such activities.\r\n\r\n    > Should you encounter any bugs, glitches, dangers, lack of functionality, lack of comfort or other problems with the Product, please let us know immediately so we can rectify these accordingly. Your help in this regard is greatly appreciated.\r\n\r\n    > The Product is released solely for test use in Company’s organization and must not under any circumstances be distributed to third parties without prior written acceptance from Jabra.\r\n\r\n    > By using the software, I accept and acknowledge the content herein.`\r\n\r\n## Pre-requisite\r\n\r\n1. Node.js v10.x through v16.x. Currently, Node.js is not officially supported for Windows ARM64 so in order to use the native ARM64 library on this platform, Node.js should be installed from one of the unofficial builds, e.g. [here](https://unofficial-builds.nodejs.org/download/release/v16.9.1/).\r\n2. **On MacOS:** `xcode` & `python 3.7`. By default, Python is installed on macOS but make sure correct version(3.7+) is installed. Install Xcode from App store or download it from [here](https://developer.apple.com/xcode/download/).\r\n3. **On Windows:** `Visual C++ Build Tools` & `Python 3.7`. You can install all of these by following any of the below mentioned steps.\r\n\r\n    3.1. **During Node.js installation** By ticking the checkbox when prompted during Node.js installation for `Tools for Native modules`, this installs both `Visual C++ Build Tools` & `Python 3.7`. **Note** This is prompted only for Windows platform. For other platforms like Linux or MAC, C++ compilation tools has to be installed separately as mentioned in other steps.\r\n\r\n    3.2. Both `Visual C++ Build Tools` & `Python 3.7` can also be installed using command `npm install --global --production --add-python-to-path windows-build-tools`. To know more about this tool, see [this link.](https://github.com/felixrieseberg/windows-build-tools). **Note** For executing this command through `Windows Command Prompt` or `Windows PowerShell`, they should be ran in Administrator mode.\r\n4. **On Linux:** `build-essential` package for C++ compilation & `Python 3.7`.\r\n\r\n    4.1. **Udev rules:** To be able to communicate with Jabra devices with non-root privileges it is required to create a udev rule for Jabra devices. Place the udev rule in `/etc/udev/rules.d`, and follow naming guidelines for udev files.\r\n\r\n    **Example:** The file name should be something like `80-jabra.rules` where the number before the dash indicates in what order the system reads the rules (e.g. if you had another rules file called `70-someotherrule.rules`, it would read that one first), the word after the dash is just an identifier of sorts (it could be something other than jabra) and the extension must be `.rules`.\r\n\r\n    The contents of the file are:\r\n\r\n    `ATTRS{idVendor}==\"0b0e\", MODE=\"0666\", GROUP=\"users\"`\r\n\r\n    After creating the udev file (as root), reload the udev rules using:\r\n\r\n    `sudo udevadm control --reload`\r\n\r\n    Reattach your Jabra device in order to get new permissions assigned.\r\n\r\n5. **All Platforms:** `node-gyp`. You can install this using command `npm install -g node-gyp`. To know more about this, see [this link](https://www.npmjs.com/package/node-gyp)\r\n\r\n6. **For Electron.JS:** If you are using `asar` packaging then you may need to `unpack` some of the resources used in this module. These resources are native library files i.e `libjabra.dll`, `libjabra.dylib` & `libjabra.so`, which is stored in a `build\\Release` folder. By default latest electron builder will automatically unpack, but if it does not work then you can provide below option to your build process. To know more, see [this link](https://www.electron.build/configuration/configuration)\r\n\r\n```javascript\r\n\"build\": {\r\n    \"asarUnpack\": [\"node_modules/@gnaudio/jabra-node-sdk\"]\r\n}\r\n```\r\n\r\n## Installation\r\n\r\nThis release is published to [npm](https://www.npmjs.com/package/@gnaudio/jabra-node-sdk) and can be installed via below command.\r\n\r\n```sh\r\nnpm install --save @gnaudio/jabra-node-sdk\r\n```\r\n\r\n## Debugging and Logging\r\n\r\nBelow environment variables are defined for logging and debugging purpose. User can change the values as per preference.\r\n\r\nEnvironment Variable | Value | Description\r\n--- | --- | ---\r\nLIBJABRA_TRACE_LEVEL | fatal, error, warning(default), info, debug | Log levels\r\nLIBJABRA_RESOURCE_PATH | **On Mac:** ~/Library/Application Support/JabraSDK/ **On Windows:** %appdata%/Roaming/JabraSDK  | This determine the system path where logs and device related files are written.\r\n\r\n## API Reference\r\n\r\nAPI doc is in html format. See doc folder inside installed module `node_modules\\@gnaudio\\jabra-node-sdk\\dist\\doc` and open `index.html`.\r\n\r\n## Examples\r\n\r\nFor all examples, user should first register the app on [Jabra developer site](https://developer.jabra.com/) to get appID. User should pass this appID to `createJabraApplication` in order to initialize the jabra module:\r\n\r\n### Simple button events example using javascript and plain promises\r\n\r\n```javascript\r\nconst j = require(\"@gnaudio/jabra-node-sdk\");\r\nj.createJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        console.log('Press any key on Jabra device ' + device.deviceName);\r\n        \r\n        device.on('btnPress', (btnType, btnValue) => {\r\n          console.log('New input from device is received: ', j.enumDeviceBtnType[btnType], btnValue);\r\n        });\r\n    });    \r\n});\r\n```\r\n\r\n### Simple button events example using typescript and plain promises\r\n\r\n```typescript\r\nimport { createJabraApplication, enumDeviceBtnType, enumHidState } from '@gnaudio/jabra-node-sdk';\r\ncreateJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        console.log('Press any key on Jabra device ' + device.deviceName);\r\n\r\n        device.on('btnPress', (btnType, btnValue) => {\r\n          console.log('New input from device is received: ', enumDeviceBtnType[btnType], btnValue);\r\n        });\r\n    });    \r\n});\r\n```\r\n\r\n### Ring example using typescript and plain promises\r\n\r\nThis example shows how to ring a Jabra device\r\n\r\n```typescript\r\nimport { createJabraApplication, JabraError } from '@gnaudio/jabra-node-sdk';\r\n\r\ncreateJabraApplication('123').then((jabra) => { // 123 is appID here\r\n    jabra.on('attach', (device) => {\r\n        device.isRingerSupportedAsync().then( (supported) => {\r\n            if (supported) {\r\n              device.ringAsync().then ( () => {\r\n                console.log('ringing');\r\n              }).catch ((err: JabraError) => {\r\n                console.log('ring failed with error ' + err);\r\n              }); // ring the device\r\n              setTimeout(() => {\r\n                device.unringAsync().then(() => {\r\n                    console.log('stopped ringing');\r\n                }).catch ((err: JabraError) => {\r\n                    console.log('unring failed with error ' + err);\r\n                });\r\n              }, 5000); // stop ringing the device after 5 second\r\n            }          \r\n        }).catch( (err: JabraError) => {\r\n            console.error('Jabra call failed with error ' + err)\r\n        });\r\n    });\r\n    \r\n    jabra.on('detach', (device) => {\r\n        console.log('Device detached with deviceID:', device.deviceID);\r\n\r\n        // In this demo example, we will auto shutdown once all jabra devices are removed:\r\n        let remainingAttachedDevices = jabra.getAttachedDevices();\r\n        if (remainingAttachedDevices.length == 0) {\r\n            jabra.disposeAsync().then (() => {}); // Cleanup and allow node process to exit.\r\n        }\r\n    });\r\n});\r\n```\r\n\r\n### Multiple device management with typescript and async/await\r\n\r\n```typescript\r\nimport { createJabraApplication } from '@gnaudio/jabra-node-sdk';\r\n\r\n(async () => {\r\n    let jabra = await createJabraApplication('123'); // 123 is appID here\r\n\r\n    await jabra.scanForDevicesDoneAsync(); // Wait for all pre-attached devices to be scanned.\r\n\r\n    const deviceInstanceList = jabra.getAttachedDevices();\r\n    if (deviceInstanceList.length<2) {\r\n        throw new Error('Please make sure 2 jabra devices are attached');\r\n    }\r\n\r\n    const firstDevice = deviceInstanceList[0];\r\n    await firstDevice.ringAsync();\r\n\r\n    const secondDevice = deviceInstanceList[1];\r\n    await secondDevice.ringAsync();\r\n\r\n    // Dispose jabra sdk to enable node process to shutdown.\r\n    await jabra.disposeAsync();\r\n})();\r\n```\r\n\r\n## Sequence diagrams\r\n\r\nThese sequence diagrams shows typical uses of the Node.js sdk:\r\n\r\n![Sequence diagram](https://github.com/gnaudio/jabra-node-sdk/raw/master/nodesdk/docs/start-outgoing-call-then-end-call.svg)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/jabra-node-sdk/raw/master/nodesdk/docs/incoming-call-accepted-on-device-then-ended-on-device.svg)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/jabra-node-sdk/raw/master/nodesdk/docs/incoming-call-rejected-on-device.svg)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/jabra-node-sdk/raw/master/nodesdk/docs/mute-and-unmute-call-by-user.svg)\r\n\r\n![Sequence diagram](https://github.com/gnaudio/jabra-node-sdk/raw/master/nodesdk/docs/hold-and-resume-by-user.svg)\r\n\r\n## Setup VSCode\r\n\r\nThe project includes config files for debugging typescript and C++ source files\r\nin [Visual Studio Code](https://code.visualstudio.com/) via the\r\n[C++ extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools),\r\nfor both Windows and Linux. The configuration files work without any\r\nmodification, provided that you set up your environment first, by installing\r\nthe necessary tools and defining some environment variable.\r\n\r\nTo debug a C++ file, open a typescript file referencing the C++ file and start\r\nthe debugger (Running the debugger on C++ files directly won't work). Make sure\r\nthe \"Run\"-dropdown at the top of the debugging-sidebar is set to \"Current TS\r\nFile - native code only (&lt;your operating system&gt;)\"\r\n\r\nBelow, the setup steps for Windows and Linux.\r\n\r\n### Windows\r\n\r\nYou can more or less follow the instruction in\r\n[the VSCode C++ extension guide](https://code.visualstudio.com/docs/cpp/config-msvc).\r\nThen, you need to make sure all project [pre-requisites](#pre-requisite) are\r\ninstalled correctly, and finally set the following environment variables:\r\n\r\nEnvironment Variable | Value | Description\r\n--- | --- | ---\r\nLIBJABRA_WIN_NODE_GYP_CACHE_PATH | eg. %appdata%\\Local\\node-gyp\\Cache\\12.16.3\\include\\node | Used by the C/C++ extension to resolve include paths\r\nLIBJABRA_WIN_CPP_COMPILER_PATH | eg. C:/Program Files (x86)/Microsoft Visual Studio/2019/Professional/VC/Tools/MSVC/14.25.28610/bin/Hostx64/x64/cl.exe | Used by the C/C++ extension to infer the path to the C++ standard library header files\r\n\r\n### Linux\r\n\r\nYou can read a more detailed guide on\r\n[the VSCode C++ extension page](https://code.visualstudio.com/docs/cpp/config-linux).\r\nThe important part is to install a C++ compiler and debugger. The easiest way\r\nis to install `build-essential` and `gdb`, this way:\r\n\r\n```sh\r\nsudo apt-get install build-essential gdb\r\n```\r\n\r\nThis maks your C++ compiler GCC, and you would likely use the `g++` command to\r\ncompile.\r\n\r\nThen, you need to install the project [pre-requisites](#pre-requisite), and\r\nfinally export the following environment variables:\r\n\r\nEnvironment Variable | Likely value | Description\r\n--- | --- | ---\r\nJABRA_NODESDK_CPP_COMPILER_PATH | /usr/bin/g++ | Used by the C/C++ extension to infer the path to the C++ standard library header files\r\nJABRA_NODESDK_NODE_GYP_CACHE_PATH | $HOME/.cache/node-gyp/14.4.0 | Used by the C/C++ extension to resolve include paths. **NOTE**: The final `include/node` is added by the configuration and it's not necessary\r\n","readmeFilename":"README.md"}