{"_id":"heydoctor-js","_rev":"112-03c1843969a95c68b184c43dc2d9192a","name":"heydoctor-js","dist-tags":{"latest":"3.7.2","canary":"0.0.0-bff8045","prerelease":"3.4.0-c45b5c7"},"versions":{"0.1.1":{"name":"heydoctor-js","version":"0.1.1","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/sappira-inc/heydoctor-js-sdk.git"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"precommit":"lint-staged","bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'npm run build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"npm run docs:build && npm run docs:deploy"},"dependencies":{"axios":"0.18.0","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.11","mitt":"^1.1.3"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"23.6.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^1.18.4","npm-run-all":"4.1.3","parcel-bundler":"^1.10.3","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.{ts}":["tslint --project tsconfig.json --fix","git add"]},"gitHead":"99e8cb3e3a9ffbe0ed4493440a67fa1f7feea092","bugs":{"url":"https://github.com/sappira-inc/heydoctor-js-sdk/issues"},"homepage":"https://github.com/sappira-inc/heydoctor-js-sdk#readme","_id":"heydoctor-js@0.1.1","_npmVersion":"6.4.1","_nodeVersion":"10.15.0","_npmUser":{"name":"kylealwyn","email":"kjalwyn@gmail.com"},"dist":{"integrity":"sha512-22RUdiki/E2xH0phXBTgZfCOSVXdaZ1ywH3HqqkENkhvgkdeIm3TEkSyKBXZxr7u0Ir02FaAdEpr9OsnlXM3ow==","shasum":"292f1ac000ff9c1c47dabf6ddda63c5fa6616c9e","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-0.1.1.tgz","fileCount":29,"unpackedSize":102424,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcLlY/CRA9TVsSAnZWagAAo4UP/i4rOIEOzlT5A/t1yWPN\nogYxa0n8y/1UcLSmxS5c1bxmzfB9omRNbjiplmqMS5G4S/4ngzohLyY8AZ/H\n5fF8nO2kv2j7A1MWlL3b6rRr3rQ7LrYKw3YfPYQpImNo4Qo7IxZesh9imjSd\n3tAtSdI7uOQOLcb5yDiQLGf2B1+UO8IUutrQ6cXabIeN5c6gNLm+gOlLEAL2\nm2aiV0Ei7pA/Kwt4e7kcxmsolGB/l1OsU4SiqO5ud5xbfURpYMljtdsXFvea\nMzKWLZWGhJvcpAojpGRQ2zQXDBT2fKPOF+3m6zV41mRGLQErszKvrYJ1IcnL\n04EolEPUnFidWifsDb0xDyn9NDaL6/S0WsjKPKk2MmT5yF3rtS1i+ov2rgub\nkutQTPgRxmmxbnHQgYtAjf1+7mLh18M1WLhlLllbXMJF4t3AMjJvwDNwvgkE\nKZx3EGVBJTiaBFh0QaVbB5sgNCeDNg2oFyI5MRbGsex9EdJ0JEDOinjpLcWf\nFNLFzDxr13UyxMDMSZw88ro99AYh2W+5IJvpaJo942bKfNoliZhudYC7K9r5\ncj9yePeBIwL1qxtZ5PiwmoGSiESFTr1ICk5wQhoZP+H2gzsHM0mr7KnUK9B0\nI6qrivGMC7cC5LPB5qFyONaKw5GQOApXgrluzbEiyurMdtVDFxxg/b8pybFE\n90Dm\r\n=zit6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCpv23PB5O2T2pqt0xTSOC4aBFaOaY7JfeB7DwmhR2zggIhAKdc6/mhalB47IY+O5XT/5AqaOZku+RIXaJjnrt0ROOw"}]},"maintainers":[{"name":"kylealwyn","email":"kjalwyn@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_0.1.1_1546540606586_0.401606752537099"},"_hasShrinkwrap":false},"0.1.3":{"name":"heydoctor-js","version":"0.1.3","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/sappira-inc/heydoctor-js-sdk.git"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"precommit":"lint-staged","bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'npm run build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"npm run docs:build && npm run docs:deploy"},"dependencies":{"axios":"0.18.0","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.11","mitt":"^1.1.3"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"23.6.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^1.18.4","npm-run-all":"4.1.3","parcel-bundler":"^1.10.3","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"gitHead":"efbbc9963bd3d58a711541653072f584ca4047e1","bugs":{"url":"https://github.com/sappira-inc/heydoctor-js-sdk/issues"},"homepage":"https://github.com/sappira-inc/heydoctor-js-sdk#readme","_id":"heydoctor-js@0.1.3","_npmVersion":"6.4.1","_nodeVersion":"10.15.0","_npmUser":{"name":"kylealwyn","email":"kjalwyn@gmail.com"},"dist":{"integrity":"sha512-IteMzrCu0UC1ZTgFtXL8e46qiAZl8t8kdChgRBIuGe3L5+iXgQ1rOBhe9VGAEtlsiJkgDBrI737LCJHSuya6ow==","shasum":"7760bb2fccfd00d032aec23f61f76b5b9a1c1bdd","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-0.1.3.tgz","fileCount":29,"unpackedSize":104213,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcLpFyCRA9TVsSAnZWagAAgvsP/0U85HX4w3TInZGPH77y\nsFiwaYvOOCb0qM6OlMsC3XHKc0z8eWv1jGrNkPMl518DbjOQ10zA6jCNCOHV\nYtviYHK2QqNNUzXi7EklZPqYYce4PBoQ7mtPnREJn7TwSajVP2Hku0+d9cq4\n7XB7MSVBykuR583TkOYFlzYq5E3ITjXdYduVB6uVT5io84sq3UOSGZ1WTmrs\nk9fric3R/P0Fcyww0qRXn5/GdskgL71Ew8KaMp0kLPtOsgxFlCZKv+RsH7Sf\nbR8qoK/MO9YCcFKxIenuqTKvMi4Mz2WXfoXWZasEc0Rlyrpm0ZC21ZcPd21W\nDKN7q3PB8QVPbzqZ3sZzu1PxVjEzsTS5zzvWIW4s1QbLBvf9ut1BiDgsEjIn\nib8Za8qMszFqABk1WskU6A1qv2QEq7Y4rf/G4Vfu9JrnbGhARviwA/S0ebr2\nN8sZCAv0TvNr4U1lxRN7tR9Mt4JkhOW2U79eqab0cJrPRb1r050ql7pT1nMB\nrJt4+2Tdew3jrJUFfnGGBFjJQIjpidhFpgd0bJmt7lqfHtHbMUtaA+bQV/jY\nMyVb2bg/cLhrowb/+btXmWHEYTns8s4WcNJgIz7DRZjJm1XByGbXeSZBTHmn\nypnU9y6+87YMw1xVgmisRJFPmP9M6V6s8ji2i3jhuzWiiSFsg9pAwlvcr5jc\nkyNW\r\n=Xmih\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGjW4RvjXQfKGte+ri39fyk34j/7m/AaGlN7JnxhIQzkAiEAym9B+ZyUCTPLQ3jKmlQyd36bRZ62k3SXllsNi0r86Ek="}]},"maintainers":[{"name":"kylealwyn","email":"kjalwyn@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_0.1.3_1546555761757_0.9320068839817648"},"_hasShrinkwrap":false},"0.2.0":{"name":"heydoctor-js","version":"0.2.0","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/sappira-inc/heydoctor-js-sdk.git"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"precommit":"lint-staged","bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'npm run build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"npm run docs:build && npm run docs:deploy"},"dependencies":{"axios":"0.18.0","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.11","mitt":"^1.1.3"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"23.6.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^1.18.4","npm-run-all":"4.1.3","parcel-bundler":"^1.10.3","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"gitHead":"4374683463f7959160b07480948de3a299dbd15e","bugs":{"url":"https://github.com/sappira-inc/heydoctor-js-sdk/issues"},"homepage":"https://github.com/sappira-inc/heydoctor-js-sdk#readme","_id":"heydoctor-js@0.2.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.0","_npmUser":{"name":"kylealwyn","email":"kjalwyn@gmail.com"},"dist":{"integrity":"sha512-7FKt5BvuAw5iUh/vlO4xqzROl8JxM12cPEr7LuB9WvysZbYnKjyi3TzFY+zPu5mtAl0Vt0SexZLR5EirqXGUtQ==","shasum":"bc3b6ce1d6416b9131d3e22f3539a137d732e74b","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-0.2.0.tgz","fileCount":29,"unpackedSize":105396,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcLqzBCRA9TVsSAnZWagAA9aMP/iq3JVvdWxKO4TUjL/pT\nC/lCgoQCLK8Zg+qSeMQ0B6IT4BFhMCQ4vmpJvicG+uL/w6s7ejOPkmsFhTIb\nde7bNswO+6RUQlQy5jiPosB8klMiCPWOdUXxI1XBJSI3B4qhjjMrIswdexf3\nOYdcq77kc0Og8VaL8upu9rDK7g3etUnwVB+7Fv07wAsUzU0PrZU+cnRbI7Tr\nhf39KlnalgBTgF5lROOtkUXvC07HfUrYeA1+ycUtUhHia4iWPiRZ4SReKVzq\ng/KteWBAshFKm2IeFNECiVPUN6hHmdIr8IQszDgMXLIvbeELkl5VbOXCMRzd\nDoUk2Fk3SAImifpJVdXux26R79bchqailUG017fiV3upC7LJMOAS1qBA6EgE\nTujOyv/La+esLVhJGbyMCjNwntR0IHdN9KZ/vIQsxdOWLHTJq47VQPDtAycS\naT7cRrdw1W7APtGyXOEs8Ybx36udzgTo7Td6SKbQnRau6TqQiEc74n1WPtd5\n16zZttxgFT4f+OanoiPRjB/dj8y5E0iZVukKegR43ac7NMGI3svUrpOUgoar\nOocr3fl+zvAkhLQ0NOZSBiusST4MqAY+5yd37Mx2t3yKWmWMT61YXIixm3p3\nyIPfmsa0ZLG3SxuWMmU2dFrlSO5+qK3R/5bYIDiQKLsFNQXiOi2/wBx1r86l\nSQad\r\n=Xd4Z\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCWKhiwi0qzYsvoAPLMDvJHN0NxtXYLHgKrEa48mHxELAIhALA4B/Ku6ltpFt86CXz+/0xQvqDpImdasnkDqPg27Jrg"}]},"maintainers":[{"name":"kylealwyn","email":"kjalwyn@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_0.2.0_1546562752875_0.32145002306835235"},"_hasShrinkwrap":false},"0.2.1":{"name":"heydoctor-js","version":"0.2.1","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/sappira-inc/heydoctor-js-sdk.git"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"precommit":"lint-staged","bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'npm run build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"npm run docs:build && npm run docs:deploy"},"dependencies":{"axios":"0.18.0","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.11","mitt":"^1.1.3"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"23.6.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^1.18.4","npm-run-all":"4.1.3","parcel-bundler":"^1.10.3","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"gitHead":"ca62391a864608019cee6caae4f93f27039b2121","bugs":{"url":"https://github.com/sappira-inc/heydoctor-js-sdk/issues"},"homepage":"https://github.com/sappira-inc/heydoctor-js-sdk#readme","_id":"heydoctor-js@0.2.1","_npmVersion":"6.4.1","_nodeVersion":"10.15.0","_npmUser":{"name":"kylealwyn","email":"kjalwyn@gmail.com"},"dist":{"integrity":"sha512-FThJMXjtrEwB6Ha+Dy6BZUC97Y/qgPPonPoibw0KQWsXwI+PW9Nhoj3QtLt4cslhNLze96Jld7PBU9W0/dNNig==","shasum":"82d6570eb1219228cfc3ff134d25c4d9cb1a7e12","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-0.2.1.tgz","fileCount":29,"unpackedSize":106123,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcQLzwCRA9TVsSAnZWagAAnisP/35dFHElAmXQ9kJtSsoE\nvWdfOm5xG3B7Onr0zN6tPnfmfNC0DjLYDkMr03yEkXNZ0GixowDwHzmX3N6f\nAnuXECcVhW+5Yg2cwqvcwKlwP0/8dQ/OOpVzzl69gJxCJvufHwKKkUFbuQs4\nqn09gDI8e0xinz+MkVG9qdboT34ZxCCf7tMXKf5P7nc7T3MN3SAEGhGgVvh6\nKtMLPXm3emUiYFoSSzjfCuUztms42n0USOiNmU89sRlVnr84iyCnfwTtJ3d9\nldxTzNEzXMDVS/HHm0VHNxO9MGi5y9vbUAhxCKmUplSZP5BU449601GC4E2l\nOcTQGyaq4s4LXwUi5NEf0Skmompbffle4qtVG4YcCsENZvvtktbUzC9Yzw5s\n/EnxqjBszPrsj8hjMDxclmbVED8IMtdQZ83Cz0cb63/RUd4jajBY2oPgtVUb\nJNQwrM9HrpN6Oq7af6xsdhh8CbgukBIPHjfIg7i9JuZVGc9G9r5o7aIyElhe\ncmhuLgyYnPd+HntkgdK0KNw+5kPXTwUYnCNqExMuxWm47/kJFjkblRfbhdWC\nTXdfvJsRYfMgKVzz8VkZEOStGCvu2V5dUWFyOUteK9js9O0EEnPfGIbHBFBg\nL+552aSJlJV5S0ZmjClvMOa53ccxarJcJUQYz5UMCFrKrWE9vbsTZpYlACGp\ns8QG\r\n=KKUd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHqJq5mjabQ6/vQ5xrEUvV2/k9pmINOU4k/gmyw0sIiIAiEAiLQqcqCsb9oiklsF3wR65hBBfbNVHPbUf6DIrwti+EU="}]},"maintainers":[{"name":"kylealwyn","email":"kjalwyn@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_0.2.1_1547746544222_0.701069610197609"},"_hasShrinkwrap":false},"1.0.0":{"name":"heydoctor-js","version":"1.0.0","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/sappira-inc/heydoctor-js-sdk.git"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"precommit":"lint-staged","bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'npm run build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"npm run docs:build && npm run docs:deploy"},"dependencies":{"axios":"0.18.0","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.11","mitt":"^1.1.3"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"23.6.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^1.18.4","npm-run-all":"4.1.3","parcel-bundler":"^1.10.3","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"gitHead":"f39a4b63d535027e2b1041db9aca57a199df0c8e","bugs":{"url":"https://github.com/sappira-inc/heydoctor-js-sdk/issues"},"homepage":"https://github.com/sappira-inc/heydoctor-js-sdk#readme","_id":"heydoctor-js@1.0.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.0","_npmUser":{"name":"kylealwyn","email":"kjalwyn@gmail.com"},"dist":{"integrity":"sha512-f+a0QGO3bAYxJtZM+XCSb52RnQNKb9MyflgtPCQAh4R/aV/CLvNGFqbzmUAm52G9sgk7nr5M+rMciYVdHReRRA==","shasum":"940eae5f104c80257c12665be5e2715448978343","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-1.0.0.tgz","fileCount":29,"unpackedSize":108168,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcUPV4CRA9TVsSAnZWagAAXT8P/27nXNVK2ykpqnyHZVTS\nF35k75ILZE8elnH1SVExJ4ysUL+eJgtsakLi0mBMnFpB0+OvSfy24aDAahZ8\nXh3enIxIMYeeYArPELBZXYMvX5rHXqAlt9b9DbamQCqkSq09/OtUmoPqLSnn\nzrtRobl0O8j7TnSuF+241jSBNaaGtFAGgNd7DfraQS+yrf388KaJQ9ja/dDo\nBmTtfJMMklM2huKsMuNQRouJFN8guEVVf8ygNGIYpfBR4RrnU73/3/3TabL/\nSvZ1lUWPr5WFQz9zin+TvBglrNiZXTzQglg/71m+Gm+TRDpFqfOUpnF0DXNQ\nZK/coelJNJ48SLZ86s8rFWyRrx4AytvaDZwZaVC9DjAHIAFzbkzt1LDckJ6J\nfSbXtu9top4HMaCF3hqe8m88VljCkuDsXa21/IRdY0wm42g0wi+FHJuIyRh7\nFxDqWaNErjdFguMjkuE7FFlMX7FfS0pE+AeRPbexj+/FfO6/TSlYOO70cZQV\nvWPR7jMLmSRB9uipo5W75AJT1yIWMKNw+exC9GmCn/lHN9XbOdc5/Gbpa4y/\njxJDJ77SayTcpAitN9XQdKZCZRPSsMHNLTS/GYaDc67GSdXe0fPtLa8OLvd4\nXPM3gmtW84zxQx4OU+/QQx8yParfgypAICw/CfECfP+XAC4Qt8gaFYJ1d7WV\n4v1n\r\n=WiTi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC57fKf/MJsbskvv4kyhL3MgXh/X07/o6MTT13YreW6pwIhAKWVxQMJUx8fYtHmE+KWrRNJY3pXaCULruVUpznGOciF"}]},"maintainers":[{"name":"kylealwyn","email":"kjalwyn@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_1.0.0_1548809591593_0.5048652725825575"},"_hasShrinkwrap":false},"1.0.1":{"name":"heydoctor-js","version":"1.0.1","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/sappira-inc/heydoctor-js-sdk.git"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"precommit":"lint-staged","bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'npm run build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"npm run docs:build && npm run docs:deploy"},"dependencies":{"axios":"0.18.0","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.11","mitt":"^1.1.3"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"23.6.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^1.18.4","npm-run-all":"4.1.3","parcel-bundler":"^1.10.3","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"gitHead":"d43b13794dcd9ce7bfa3a5a773df87ce86e1548b","bugs":{"url":"https://github.com/sappira-inc/heydoctor-js-sdk/issues"},"homepage":"https://github.com/sappira-inc/heydoctor-js-sdk#readme","_id":"heydoctor-js@1.0.1","_nodeVersion":"10.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-gDgBKQtcMvVhBqYel4wZB8EFRYyE/67KsLdlcvtltRTsENVf+U2Hv8C94nqEc0yWLOb7QjUE+wPsZU0/giozsw==","shasum":"419f77d11ca4ff0e8a7cc2895f012b2718f952d0","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-1.0.1.tgz","fileCount":29,"unpackedSize":108471,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcb1R8CRA9TVsSAnZWagAAKRoP/jo2ff6s4g+HsEVxHyHy\nubQaqYqQI5Wkha9WyZrrPj6f9RZKZOUVF+bGAzjK1TcSmG3h/KE1Voe1NK6H\nbpMmwcQHWFMW+FymdQzxE9r0B5u0iXDusv4AyeXK2JHpK4nlVXKthFO5R27k\nVIPFoVTc8QcREI/1PUVHKEsiZydUFnhtaCYpmlSp0XFt3cjH01Hdrcmb6Bj2\n4k7gjrbdPJ6fsBjYLwDBTvUn6sf8yKxvpiUuMQR7wUSTpg0QiGMKWgM9a1RZ\npkNSDru9ChK+RpvcvjD9axWSVMSd4ArO/1OF/sOlGbNsII48Zz/23HoC5et9\n1EFp+z1bdU5c2woH7UYaLmbN1flFFXTI6ByChV7rUf8EFfy5h+YtfQYnZCl6\n9S8RbDEV7NoWUgVGES7w3zRzmHYR8scb8cimNJWSRvFNJvQvw534kCstyljR\nUT+6qmoa58TtaL6rBjNJXR6oUwujX64+ucORnberqo5ofTsaPS1I2KPor7XY\n7kAUJ1pFoA00lhcuMF8qE6QMOgP2gLoCH4UTB50mAwvzjmztulqIc711PpHf\njwANbNHrjPrPOrQH0rY8nuLGOlehSsnysulf7Tois7dBqSZtxbboekQPRejf\nUJKHJZRaWgK4lpcYcGCdqugYkl2+jkqTblGDCBIVXGYQxsgNPMulG8/VnDbT\nhO2J\r\n=Nu0v\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHTpxwM0/DWfgBgnthNCRmhfEPAZ0Ek8fBDIY3pb4g6rAiBivlgUrAbhmFYcLi7cwYe7SYh20vruwSA/Kd17wHbgzQ=="}]},"maintainers":[{"name":"kylealwyn","email":"kjalwyn@gmail.com"}],"_npmUser":{"name":"kylealwyn","email":"kjalwyn@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_1.0.1_1550799996285_0.6413125889784745"},"_hasShrinkwrap":false},"1.0.2":{"name":"heydoctor-js","version":"1.0.2","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/sappira-inc/heydoctor-js.git"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"precommit":"lint-staged","bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'npm run build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"npm run docs:build && npm run docs:deploy"},"dependencies":{"axios":"0.18.0","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.11","mitt":"^1.1.3"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"23.6.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^1.18.4","npm-run-all":"4.1.3","parcel-bundler":"^1.10.3","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"gitHead":"798fde78f93b01854b82050864ff3ca5a4ef1468","bugs":{"url":"https://github.com/sappira-inc/heydoctor-js/issues"},"homepage":"https://github.com/sappira-inc/heydoctor-js#readme","_id":"heydoctor-js@1.0.2","_nodeVersion":"10.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-9nRo/cXo0jNrIwcPNP+CRKfDwSQz6UUE15EqEkVyxr9+RpWgND9rOM52hxOIOyWcTd9IEo4RqeWEDzySu5SHdg==","shasum":"5e1f80f46de31a58617f8cf2d1a6c279b56dbce8","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-1.0.2.tgz","fileCount":29,"unpackedSize":109470,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcmF7zCRA9TVsSAnZWagAAYi4P/i/9G+swL/hQO5WIHk1H\n1nlYUp+CaX8N5nIbj7wGM1rr0nUBueeF9kkTaivZrBEjP2pkmrhHYNLRj/DI\nOFMr75qdhwVpMvviBBVx6QuF0GEXfTsx16YfAcSy7wDBfa0jGBApnCTxNwVW\noljPruWdWFAQqO84yCcZBkYwM9ez4D/VowQs0fpbKfPzN+ry2AUFtU4UJOj4\nHZo8V6d+sQuaMan/4I9hWjU3OBfhUeHFvD8LmkIB38TGi5oSAg3hdxAkxUEz\nO2zjow8bfMw0172Rlxpy2A7EP1955ePFqd70y3g74MxxIHEpgKidBD7k8IE1\njtZ3FDZCMO3xlS3WfR5IY9MASUiR2h6NOMIGgs+3M8lMYZkPjemcAVJulV4u\naOZr9138XNhHjcRIMPxSF7gFla8m/j1TerNLqDdubGvKMjNqbcYBV2/Obzog\n4bYulIkTBiYM7OOJkseRztAb2AVVXnwjtUG38WGD3fx2l3ZY9efu+dBydFbq\nWNiEkY4ezlk1mDOgQtBssfJbkzutkEV+L5Fsx4m0GJt+sJzJk9oum53SKTTn\nwsMVEAUFE/ZEVGXihgpkSE7/K7kaHGR87qNYwCVZKVEoXYuaIPAAXfoGvv5E\n4wvD4eFNmC1mAFauE4C1KlAGhr7iKINKTerriaSlvyy/LKRjuiWK5LZVCCMw\nVEbl\r\n=VqAK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCbIFPvFwGP7VPMY4xBl8lW5YRnlYb4TIXDynbUAFxVSwIgU1+0FJRdt32IXB+S2/2udgWlwhG5hOuxV951LxsRdWM="}]},"maintainers":[{"name":"kylealwyn","email":"kjalwyn@gmail.com"}],"_npmUser":{"name":"kylealwyn","email":"kjalwyn@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_1.0.2_1553489650596_0.07898912771939237"},"_hasShrinkwrap":false},"1.0.3":{"name":"heydoctor-js","version":"1.0.3","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/sappira-inc/heydoctor-js.git"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"precommit":"lint-staged","bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'npm run build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"npm run docs:build && npm run docs:deploy"},"dependencies":{"axios":"0.18.0","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.11","mitt":"^1.1.3"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"23.6.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^1.18.4","npm-run-all":"4.1.3","parcel-bundler":"^1.10.3","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"gitHead":"77d9558090119cc36363090c08df57313b89aa2e","bugs":{"url":"https://github.com/sappira-inc/heydoctor-js/issues"},"homepage":"https://github.com/sappira-inc/heydoctor-js#readme","_id":"heydoctor-js@1.0.3","_nodeVersion":"10.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-A+B6kAU/FDXMbsOAxY/8j4iurf3qmftCOC3AhGZBYvbBK+xTxbuQOeZzNQIrOBwOl49tZqCboHyDtJid95zICw==","shasum":"78efd4bff362d6391534b91ea2dbadf27a2f71bf","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-1.0.3.tgz","fileCount":29,"unpackedSize":109775,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcq5McCRA9TVsSAnZWagAAUugP/0lKvkL+Nn8YyICYbB3h\nB7zQ6i5tb/WTfYxcO44FsnGOS5RKE9ghs1+ftRCQrr6ddrYcfqzrti8MP2pv\nx0j9glZXoopokn+H+conO+FzoDydCN+ftgFnBksMOVDMjWQ4X6zpl5MwQTY/\nb7z6jKR8Zi2FJKbcRpO2L6dEzrxtO1eWLgCadjXWVHzaeTPjlvLDG8dK7fP6\nDTo03rJBNX/an4eNx2BzWGQzUsmY00XPoZgP1mTHbzzJVdLaNG9Xp368x2X9\naP2PY8NNrn8KRGsf4MFH0Q7y3SBvoEaqfVwB1K6R4cTmC8IsRPJywVYjMt7c\nEtxhAsNlVLuFOGIcMoUq7vYhTUUo7q/gUSI/2KcuPPlp9vthDcAWiTKFk2KR\nKblnd0db+ktMwCT3MjaeG52kNq/YB7LBufmG8sXu+F4vP70JnIB8ns4c/Mnk\nprAri6K2BcOcEKarHFazN+X0TfW2QKT5S0pLqdjqiI9ufMeEkGcXLuDxuakc\nyddqit3X6LW3nGVzakNomNFbhq84kEfKPIlid1nWGezXnCoeUl4bZ5G/pecg\nQlIpkvizrMLLBTSKZbxWF1NL0p5ZB6qeIue+Jwh2HIHTMN7skw7GHES7SFRi\n93l6w83XYU48YqTyuoP4Z9f7io5h8NOxUM2PCe9rAVlYEdHR1tuO9EZDwhiM\nGOA2\r\n=F+DK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDISMkhy78UpYoVvMwrW6lOghZdTH/vnGxT19qtL0YhGAiEAsjZc0wIR53QKH44wzPsF1EAHFor2orHqdBOjAXtyl8c="}]},"maintainers":[{"name":"kylealwyn","email":"kjalwyn@gmail.com"}],"_npmUser":{"name":"kylealwyn","email":"kjalwyn@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_1.0.3_1554748187450_0.42089519112589335"},"_hasShrinkwrap":false},"2.0.1":{"name":"heydoctor-js","version":"2.0.1","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/sappira-inc/heydoctor-js.git"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"precommit":"lint-staged","bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'npm run build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"npm run docs:build && npm run docs:deploy","snyk-protect":"snyk protect","prepare":"npm run snyk-protect"},"dependencies":{"axios":"0.18.0","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.11","mitt":"^1.1.3","snyk":"^1.161.1"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"23.6.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^1.18.4","npm-run-all":"4.1.3","parcel-bundler":"^1.10.3","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"gitHead":"f3fddecd673b0bec66febf222e4451b863b659bf","bugs":{"url":"https://github.com/sappira-inc/heydoctor-js/issues"},"homepage":"https://github.com/sappira-inc/heydoctor-js#readme","_id":"heydoctor-js@2.0.1","_nodeVersion":"10.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-uHXTiZy4vx2KO8k6ruQ8f0TmS3TWdQHJOSaWhQXGcbKUs4linjzmpgtXAkj60F1YSBnlsarjBHTwGJygu30+gA==","shasum":"8a396cbf13e0749f5a0d720e89433489a3f8e68e","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-2.0.1.tgz","fileCount":29,"unpackedSize":113509,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdEm+pCRA9TVsSAnZWagAANLkP/Riq8WoqvGCSW+XwTGmd\nDJe88PKZUpw5NkYi+m++L7UnXLHV1aE1s+/E/7howrgGBt9yFloGOmixbCwX\nhytVeLkbmeMNL6od4BfSd5QymUTgdhB/AvGPdqCKPjCYRRE7CdoKAV8H87IA\n+PBKnhl4igSv7vrOmgHpxteYbB0Uqq6l2cGy56eJtBuAT2MCPTaN1OjSNGet\nEO0AoYEWn/ybE+LHJaav6+V9ZEbEOcFgg8QLlqywOJSY4Yt+QDsPeZUysc9r\nr3ybZtC47f9mrXEqebX3sV9YTQiGw470fP8hj5SZSoe1pbTU2ahOdQr1H4gs\n75brqCojB+nknpEOX1zkR67hMumWiy28B9wpPTLh7DSebrYWxCb2xebeyD3f\nBx1krmHBvHwbQ7cH9ctbbYTxyUT0cwV+74RmBJfffA41G/bJuhd9ZqPS8Tup\nBfmOWYYSInf0jWFU/L6N1o6pRB/3CIAehCivcHhRZVTCi2x9euMpUj2k5upk\nDf/eugRH+PgkdCgIjAVqh4fp6QFoRTQtzUGKpRrQXk/fOVO7qe5d8OxNzeGw\nSBgF/IuE5pNtJ7mUma1PiEPjJSfO/Lh3thJEfOUL1Q5y3peOu4Q+SOnuIRnm\n4HYqpkiVSJvzkzGmntcNs3DLQkPZHp5imLVGFCZFF9bOpNbB/GuKmL4foN7x\nvt8f\r\n=4DN7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDGINC/uKhrDU2Qpy1b1XO/w6vzLAr2vD36qDKYDlpW7wIgEt+aw4jgtGPXUrP3yfeIrJCTj26OSILEkDbR1semraw="}]},"maintainers":[{"name":"kylealwyn","email":"kjalwyn@gmail.com"}],"_npmUser":{"name":"kylealwyn","email":"kjalwyn@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_2.0.1_1561489321052_0.6569881578133239"},"_hasShrinkwrap":false},"2.0.2":{"name":"heydoctor-js","version":"2.0.2","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/sappira-inc/heydoctor-js.git"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"precommit":"lint-staged","bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'npm run build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"npm run docs:build && npm run docs:deploy","snyk-protect":"snyk protect","prepare":"npm run snyk-protect"},"dependencies":{"axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3","snyk":"^1.161.1"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"23.6.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^1.18.4","npm-run-all":"4.1.3","parcel-bundler":"^1.10.3","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"gitHead":"71491f961f07cd3b3cee3b37609c28a77ff392c3","bugs":{"url":"https://github.com/sappira-inc/heydoctor-js/issues"},"homepage":"https://github.com/sappira-inc/heydoctor-js#readme","_id":"heydoctor-js@2.0.2","_nodeVersion":"10.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-7+KjLK6HYXQ99qkeEnWv4NBc41jLF3Gz9VzJjYJkNa5E9GEzTwrbtkA9Fqx0jUlGY419EIUzuVqzjkuYU4TeVA==","shasum":"603f90750b5e6f6fdf2ccdda506f4344f9c049de","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-2.0.2.tgz","fileCount":29,"unpackedSize":114090,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdeDt3CRA9TVsSAnZWagAAIVcQAJVFzWq774zhwy9qqOa4\nbY+ZSA2R7Frt24FmtiEcKRDMCyVJvuX8KUAmjPFJc0C6iPa1bKGx1apSebuN\nZSD9XCKMSLWCcskP7Ii9rOqwL+dJZEmEB/aBGht0jox1rWm+MCEQ4AaMLt2q\nFpfr3zxAohFEITsL10bH3SnFEJObKaix+/n69X/kAPGveJ4gPKmJy5c3qoon\njKTIhpaa6sAwrcadYAordokZSNKuQ1YxF+qu/nGFMvMNOnb42RPBGWyaZSIo\nYBaVNgGi96iDE7BLe5ke5lLVlkMQVbUlwP02Bu+FShAxkUhV6XSTg1IBrVjS\nXk5ShqTA/PdYFu+Ks2OT8qJmSywcIE0UVRN9gq6w8kacRhGsu0GezPVzTyAP\ncSDDSXWDbivGbPKH8YNryj70Hnx3OAi+vUIqpoWgcwff6Iz9Jm3NNTPIn6Yp\ndIM5RpfAU5fFemPT271JKaTRjLlppXa7GQ8xSd5sfQVQeS14zXlhMBFJzJX/\ndAMoT8eFQ9U51YHyaiX+z36grl/sIJphaRt1BcZSvWweDxMLcUAwXbA6Fhi2\n6IaBKID1AmTNvqWKXwAqelsYU2R0YgPUL7/dthuOnoqGpt0OlNpXIg16xGep\nOsEDtN7JueRbJftXaJ6uVMAiRnQL5nwWubv/EORuvR0jzeHo7bqyA2pycdk+\nAMmg\r\n=Pn+I\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBsU8aBC2m4p6zIw7iuptdTAQx2Ufx3lVAFw9P0Du8S+AiAE2ibFbhLrrqkQhZIF4U81RfkuC3HsAi8NNqgb3pfr3w=="}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"}],"_npmUser":{"name":"kylealwyn","email":"kjalwyn@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_2.0.2_1568160631177_0.6163580941124442"},"_hasShrinkwrap":false},"2.0.3":{"name":"heydoctor-js","version":"2.0.3","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/sappira-inc/heydoctor-js.git"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"precommit":"lint-staged","bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'npm run build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"npm run docs:build && npm run docs:deploy","snyk-protect":"snyk protect","prepare":"npm run snyk-protect"},"dependencies":{"axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3","snyk":"^1.161.1"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"23.6.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^1.18.4","npm-run-all":"4.1.3","parcel-bundler":"^1.10.3","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"gitHead":"19782d16515a46bc2a0a8342ae54974c6de95d80","bugs":{"url":"https://github.com/sappira-inc/heydoctor-js/issues"},"homepage":"https://github.com/sappira-inc/heydoctor-js#readme","_id":"heydoctor-js@2.0.3","_nodeVersion":"10.15.0","_npmVersion":"6.10.2","dist":{"integrity":"sha512-hNHMYDezNaWgUvkN2bWlYnR2Um+ZfmbNWe2z3p2e/6BIkoE73tqWqRCR1zawGLX9YpPH9rLzoK6uTio+U8RMrg==","shasum":"0c2b7194945e5d05922cfdc22bae984a38c01059","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-2.0.3.tgz","fileCount":29,"unpackedSize":116076,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdhA7VCRA9TVsSAnZWagAAQZwP/0Nl2PyqXqyk2nW46Xcn\nOujLWocF4kZfrBgHAMhbKJHlYgwc+5JhjwSDWGOndPU6qPFJqHeP4ILUdNdT\n1ukLBN7FBwdbJ++r814rTjXk4mutE9Q+kb0pD8s/f4FXVKwxiIRZ1zUbI59D\n+OuiSB1S/aMb1W/ihkhYl/j49nNJzDM2xTBG49ZaKtUsh4nw6803OUuT2Sol\nqjqcbFq9Z4DaMlFFT5rHRuuGKrzy8jYoq+yCh0n7Eaxrnfo0XYz1bVSZBlQK\nM4RmmUGKKrXR5GypPbOd10jvJy6BxavI5bPt40CbYTi/i6hrPAE3wgGObtmS\nUKRFO7KmtFEfEOswI4g0O0D3uryQuQ3zOuo7Wd4sA9W0m9Mg5bZSLHD5oN46\n/Jj1fQfj9rmtE0ZkejcyFqA6Mu3XaSqUg2ysNk8pz+x2OzE34djYFG216xZ2\nrxMJs7PbWNQJG7pWnhRMK/M+tGSI4WhxldjQPLoxKf6HVAyfs/NpmFJJUNMx\nKsWwSTZZkKowZ+6P3ei5lM47T7pM8v56P6AJdMo5iYRFnfXoMw2sAMfn8K3a\n7p9bOyB7MtiKTcsAtYANywzfX5aT6hJymBvWcerlXsyU06i3PVUJiWXuKEUX\n99WzVSdXTHQ6K5RwvNVJKKc7wf4xNY48UwLuQaXde2irDKGiFlpb6HcUWVXA\naVqy\r\n=hEcL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE2rN6pJBl969yGdTJix9PKf7PlvkGbbT7KMjIEIUwtRAiEA0FZcX066GBsCunboAIyprw/7isQT9I9jdqX94qSoyLc="}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"}],"_npmUser":{"name":"choochootrain","email":"hpatel516+services@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_2.0.3_1568935637272_0.25880975714692345"},"_hasShrinkwrap":false},"2.1.0":{"name":"heydoctor-js","version":"2.1.0","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/sappira-inc/heydoctor-js.git"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"precommit":"lint-staged","bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'npm run build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"npm run docs:build && npm run docs:deploy","snyk-protect":"snyk protect","prepare":"npm run snyk-protect"},"dependencies":{"axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3","snyk":"^1.161.1"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"23.6.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^1.18.4","npm-run-all":"4.1.3","parcel-bundler":"^1.10.3","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"gitHead":"dfdf45323a73bddc3ec3730927e9c99695e29692","bugs":{"url":"https://github.com/sappira-inc/heydoctor-js/issues"},"homepage":"https://github.com/sappira-inc/heydoctor-js#readme","_id":"heydoctor-js@2.1.0","_nodeVersion":"10.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-JKS0io+1OfpnAMWJAgXJ8N02CRFKiCSFigkAGl531sD/w6JCKPU78m5ZmddZeDxI4Rh8xVbiUg0UwqADjmtO6w==","shasum":"16f61d29f882c1586cdafbf0f8829d6110b65260","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-2.1.0.tgz","fileCount":29,"unpackedSize":116993,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdsMLwCRA9TVsSAnZWagAAMb8QAJnl/0uD5DIiaULO8lhc\nutNzBjxqUPFTre7FE6+oMtdAczgG0i5v4W7kwX7uamRJgFzlGnPD3RvOmodW\nykz9xbVkiKcWniK4bdn3MGBl+vAOAfK5dgHRUgVpWhao+KgZRQafWWIcHFj1\n0xEj6MjNyGsjsOjwv2p9UJ/GWa+26cCrtwtJc78w2fld3hsmt92A+8nrT2sd\nE5JuCTgo1v3hvk1SgjIca1oE0jwqIDZY/Gq25FV/qD3+pW21BmTQtYjiUIFN\n0nFDaKee7UGe+n7wFAAUxGUEHPA9KWw8qoH1miw2UW29eTkE3fKLWRZItrFN\n1JLxbgoMCVs7DsY3fpa1Xv4EbpBW3BMqcr6CwYHxykmieBWLOrcDqbxaDrHR\n4CGQHPuIQEYbO7J0M6s7/VAsAma0aZwmz4/18/6frqw0lHinuQ2HhycaEt1Y\niPINUUgN9eUrOVssVtjgpTYTHIArGaUmGc2XA9Qp7hWbNpi+T074KebmYxKR\nwgU1q1MQwPMH/X/adI8xoUlsP8hjZcOBl1O6pdXEX76IkA8/DT7hlok0K+NG\njjXyR87mdFytdbnMtiWg2Psqk5gabpoujA1bN/WuwP14l9vo6tPrWaA3ZW1W\ntm3xslXtTJb/+WhYD8mnq9mcTk6q9kjnyHinsTf2bGTg/R0ussXLqnPgYfdf\nUqXN\r\n=BrvQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEYmw6C0SNDZP5xKBc+8ClNab+SVMho38Uw2NuIgnacKAiBqocA8+kf0lop7rDci8ilyDkjUPVPbSDewVRpf5jVvDQ=="}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"}],"_npmUser":{"name":"kylealwyn","email":"kjalwyn@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_2.1.0_1571865327846_0.47246834884225763"},"_hasShrinkwrap":false},"3.0.0":{"name":"heydoctor-js","version":"3.0.0","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/sappira-inc/heydoctor-js.git"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"precommit":"lint-staged","bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'npm run build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"npm run docs:build && npm run docs:deploy"},"dependencies":{"axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3","snyk":"^1.161.1"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"23.6.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^1.18.4","npm-run-all":"4.1.3","parcel-bundler":"^1.10.3","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"gitHead":"953085cd059b1994f8017a35dc5e7f65215c8ad9","bugs":{"url":"https://github.com/sappira-inc/heydoctor-js/issues"},"homepage":"https://github.com/sappira-inc/heydoctor-js#readme","_id":"heydoctor-js@3.0.0","_nodeVersion":"10.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-oVdYp8sW6dpPibOmw9GV7H7W8EWwIHu8YRf1aAix3xLwwQlRs9i25EBHoeW31lroJaaB7iIgU/eWJaMTsB2zvQ==","shasum":"386633f53d272fc23b4929d78e4e8657bb2dc6dd","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-3.0.0.tgz","fileCount":29,"unpackedSize":116588,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdxdTMCRA9TVsSAnZWagAASkwQAIMIeddxO09/F9woKYYM\nWMDKM5ui+mnl/KHLcz/yk6+HiOI+UAnwJR0RtgGaSK3hBk21VqpKteKKqxxb\nhpgB496gnieH8MH3CVkJV7jXTG8pQmif5DQhefRIJZHXtpdpKxFbcSurjl8m\nkPCaegb3cX3FYDwoSZ6KfAq2VbH1m89r1cBJqqUj6qFV9zUsCooy/CCjFDpn\n5CX3MsdbyVJza6oSIRu8pjRbIMYzByIHExu4IwkpMdUW6jfCj6LWkjyUDI4o\nhI7opr7iOhpO7dL06MdXPO67YMkAts/OpnacM+LdPuOolTdlu/HRgGsb3OAZ\naGE8S4vVwDdfmf3Z6RbgGjiv1/YO47hM/DqLyXlGJSYjahNXBODEqpxbkASJ\nmDdLTbJ5E0FT7O3j3aqd1a/PGmg6PBmHzInzrOoGecKprcza62O2pgG9Iz1q\nIRlCwM8m0xtt9ZB5zZalMRhAkFWJSDghEifgX1IcUxD4secnIw2aQpkdObwq\nf6IIR1Zfl5muYLA6qo3vfjwcVB2ZmPi2ZoSLSOHmAkyXz8DeiQDc4qxSBDO4\nHwxRhZAHyqicQ6vVvUEs7hrN+JdClyyAWf3GnFuxtcg2WPF/vKHCmQogq/am\nfkPGfwo1aIovr40XISQ8qFz8epL+1xY7hS0tP//1Q6Cr/MWd9Gx/caGBmn9K\nNs9N\r\n=5all\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDPM3Xna+U6bdBn466G6qXdVPP9pr2+F0+cJ68sHmImsgIhAKiq0dcdzIHTDDEViznNj5B+UhYb4uoIkiNhS/FNcSUn"}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"}],"_npmUser":{"name":"kylealwyn","email":"kjalwyn@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_3.0.0_1573246156437_0.9499305729672567"},"_hasShrinkwrap":false},"3.1.0":{"name":"heydoctor-js","version":"3.1.0","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/sappira-inc/heydoctor-js.git"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"precommit":"lint-staged","bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'npm run build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"npm run docs:build && npm run docs:deploy"},"dependencies":{"axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3","snyk":"^1.161.1"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"23.6.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^1.18.4","npm-run-all":"4.1.3","parcel-bundler":"^1.10.3","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"gitHead":"c7e671d65f11656f6b536756723c02fad3374372","bugs":{"url":"https://github.com/sappira-inc/heydoctor-js/issues"},"homepage":"https://github.com/sappira-inc/heydoctor-js#readme","_id":"heydoctor-js@3.1.0","_nodeVersion":"10.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-AjoWsEHIi8oZWKbarInxE6clZuGoNuz0Y9JGmDWqJH9B3i8340VWMMgk9oeJHXTaIQLOGTMPubIJvxmWbkuEnw==","shasum":"7eea52d8c632569bc6b695928d103e2df0756a57","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-3.1.0.tgz","fileCount":29,"unpackedSize":117270,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd1ehRCRA9TVsSAnZWagAAd5oP/RcRvby6R7NTQ6ZgpIEF\n9d7ZusBnBSYWSx7OYSbUzfy3hXGtP/Tg+9kYyEWl3uG1DdLAGHp5+kSK1F2v\nSRsY9QaK+Hxzd0JPffjcZLiy98n/WVRLx7vEIbxnkfbpdwGExawM41NHVMBT\nPg7uvmL32yrnBdKtbcpz8CwPtGRbQnJsi3zAnCTUVigz8ZKH0e0nDoAyimWp\nI54sX3uLRg1gfRaCjbbVaL7Iqyf+Gtis1aDOw/5NQjrsfe8knMf58mxtx/jy\nsvkyYCJ5tOQQAuLrNT3XUQM9Zp51qdgbIuvxPRCp8B5vpPXsSpIauZUFsqqW\n8dzhZnwh09c2Ufb4UmbX3nvgC5evD0eWFXAOgDmiVyqLNNegFui1ez9IauIq\n2s6euFaxL7fpcw55HQ614MQ9V7m2FCstZaCHEYSNice5I9cBbDyG52DJai8U\nJ4XLfWt8XhtB1LTeM71K4rZP43xfbd4bDtWhjgKkrougPL9SekzdjviG4o4C\n9YJ3m0emAg81Doi4y9IQS2Wu2fXUzYmXt1CBFmT2F4GZMT1rYU+MvZltPP+U\nfBMY+4NPDPbJjtat+mmpq+fPtHtbGQWrB6sFlLZswN/wnBuGcRPdCvbe+GBi\n3KszHOdC4j8LDtG6wlkbbvsIHPtQ9XsJMCttg/CADU8HqSKRaX5DeFUi4Kvk\nrUWn\r\n=r+hH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAOz12K/Q0n3b5EMbLGp+Gz4ITi+GKvlU0FYSLRBRuJUAiAKpSVFyX4ta1bGGFHZZm7OYnRC/8Ni3z7PPA6xpP85fg=="}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"}],"_npmUser":{"name":"kylealwyn","email":"kjalwyn@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_3.1.0_1574299728558_0.06964854628206263"},"_hasShrinkwrap":false},"0.0.0-e4ca38a":{"name":"heydoctor-js","version":"0.0.0-e4ca38a","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/sappira-inc/heydoctor-js.git"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"precommit":"lint-staged","bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'npm run build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"npm run docs:build && npm run docs:deploy"},"dependencies":{"@types/jest":"^24.0.23","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3","snyk":"^1.161.1"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^23.6.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^1.18.4","npm-run-all":"4.1.3","parcel-bundler":"^1.10.3","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"gitHead":"ab05eaf16ac2bed81f4bbff4901ffaf6a30c932c","readme":"# HeyDoctor Javascript SDK\n\nThe HeyDoctor Javascript library provides convenient access to the HeyDoctor API for applications written in JavaScript.\n\n## Documentation\nCheck out our [auto-generated docs](https://sappira-inc.github.io/heydoctor-js/) using [TypeDoc](http://typedoc.org).\n\n## Installation\nYou can install `heydoctor-js` using your favorite package manager.\n\n```sh\n$ yarn add heydoctor-js\n# or\n$ npm install --save heydoctor-js\n```\n\n## Usage\nYou'll first need to create a new client resource. If using the HeyDoctor SaaS platform, you'll need to provide the API key located in the EMR. The client contains the http module that will communicate with the HeyDoctor API, so we'll pass this client to the other resources you'll need.\n\n### Creating the client\n\n```js\nimport { Client, Environments, Visits, OAuth } from 'heydoctor-js';\n\n// The client will hold all configuration options and the http module\n// that communicates to our server\nconst client = new Client({\n  env: Environments.SANDBOX | Environments.PRODUCTION, // determines the API and OAuth endpoints\n});\n\n// Create two resources passing both the client we've just created\n// ** Some resources also take an optional options object as a second argument\nconst visits = new Visits(client;\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n  scope: '*',\n});\n```\n\n### Subscribing to HTTP events\nThe HeyDoctor client also doubles as an event emitter. The client extends from [Mitt](https://github.com/developit/mitt) and complies with standard EventEmitter events.\n\n```js\ninterface HttpCallback {\n  statusCode: number;\n  data: any;\n}\n\nconst client = new Client();\n\nclient.on('http:success', (data: HttpCallback) => void);\nclient.on('http:error', (data: HttpCallback) => void);\n```\n\n### Authorizing via OAuth\n\nPartnering clients will use the HeyDoctor JS SDK to create or link a HeyDoctor account. HeyDoctor conforms to the existing [OAuth2 protocol](https://oauth.net/2/). In the case that HeyDoctor already has the provided email on file, the SDK will open a dialog box, akin to Facebook or Google login, prompting the user to confirm their existing password. In all successful cases, an access token and refresh token will be returned. The resulting payload is outlined below.\n\nWe recommend to store the longstanding refresh token in a persisted data store. You’ll use this token, along with your unique client id and secret key to regenerate short lived access tokens used to authenticate requests to the HeyDoctor API. For security measures, the access token has a one hour TTL, after which the token will expire and new access token will need to be generated.\n\nUpon successful authorization, all subsequent SDK calls will be authenticated using the access token. The access token can also be utilized server-side to call our API directly.\n\n#### Example\n\n```js\nimport { Client, OAuth } from 'heydoctor-js';\n\nconst client = new Client({\n  env: 'production',\n});\n\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n});\n\n// First attempt to create a new HeyDoctor user silently. The method will throw an error in the case that the email already exists,\n// in which case you have the opportunity to present an unobtrusive dialog for the user to confirm their existing HeyDoctor password.\ntry {\n  const { accessToken, refreshToken } = await oauth.createUser({\n    email: 'frank@heydoctor.com',\n    firstName: 'Frank',\n    lastName: 'Sinatra',\n    dob: '1915-12-12',\n    gender: 'male',\n    addressLine1: '123 Somewhere Street',\n    city: 'Hoboken',\n    state: 'NJ',\n    zip: '07030',\n  });\n} catch (error) {\n  if (error.code === 'account_exists') {\n    const { accessToken, refreshToken } = await oauth.launchWebAuthFlow('frank@heydoctor.com');\n  }\n}\n\n// Now that the client has been authorized, we can call call other methods available in the SDK\nconst visit = await visits.create({\n  code: 'hair-loss',\n});\n\n// Excellent, we've just created our first visit. Now, we can upload photos to that visit.\nawait visit.uploadPhoto('photoId1234', 'base64photostring');\n```\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/sappira-inc/heydoctor-js/issues"},"homepage":"https://github.com/sappira-inc/heydoctor-js#readme","_id":"heydoctor-js@0.0.0-e4ca38a","_nodeVersion":"10.17.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-UOMW9T67Lg0R3E0hIzPpT/AZoe9luE2Ium5bR+0hxqBDn8rIDo+BdkHTqkJj/S5xcHrQjYfIIyE6Ia3BOVAoEg==","shasum":"2fdfd10715be815995b90dc55e7f237190ea36dc","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-0.0.0-e4ca38a.tgz","fileCount":30,"unpackedSize":117399,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd1fqHCRA9TVsSAnZWagAAqrMQAIhH1XreHWwso13bsHAx\nPh/PunuKeEk7goeOGOI0fITT7I1w1HjAEiOm6L+gARqmNNprJ80Y3NrHEIrh\nYtTpgrDJZKcOjuS8sFnJ1PaPmp0B9maLHNIHY8LmPaCYquJZeckvTUz4af7X\nSp+eku7+y6l3UI/qY8cHrzMi47qn4cBQLv2CnOBvReWHP0Q/tMr+NqyrqLTR\naD6M6RDNwQljZ6aRl66Lrv3yhFWbbAWBZeqQOgfx3QkDIuAdstob0yRvFO4j\nTWc9ktM6cgyHsvvWPr+vzysiqso2U0ah1qxf/LK8WD4gmuMXRtLfBxq6kEDA\ngg8Pbuks9XEtXcj6HIc9R2KOpvQP/xNIWpnKLlu+96Av/4ed15FxmreEr0Nm\nd2eKNjZAK8PKqr1MW1zC0TIKCRGOZt2nssF9awL2qFP6mcb2mSCMVSvWBS3u\n9p0vlTz1iKQC3i0zXZ503tQJbg4GQPqWtnuIktaUhcLgfbw92joyNwUMSqXT\nuKI2Us/9EBqSJhPeOJebZx28DpEeP+5uKfExcs6Fb+NmrHi8MwBxayu4wYmF\noDCMTdCgZ4/w4R2XrjFLD7IuGWhTotLabkuqTrGVlJO519nx7bz1jis8sbaU\n+8HS7KFbvAgUmpLFkxWQYZ6SOy5qm9okX9nqPgM8Ven+sVt3wwo/SK3Kx/dW\n1vsC\r\n=WK2f\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBhlTEVgz2jiDZX7g1SbZGrEnfxtaaDEnxAvRWtdot2uAiABVpxwhIEhTFD5MeFtIhZGJ4C/xD6ToNW7a9U4cJQEAw=="}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"}],"_npmUser":{"name":"kylealwyn","email":"kjalwyn@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_0.0.0-e4ca38a_1574304391373_0.4838630346397268"},"_hasShrinkwrap":false},"0.0.0-a008194":{"name":"heydoctor-js","version":"0.0.0-a008194","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/sappira-inc/heydoctor-js.git"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"precommit":"lint-staged","bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'npm run build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"npm run docs:build && npm run docs:deploy"},"dependencies":{"@types/jest":"^24.0.23","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3","snyk":"^1.161.1"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^23.6.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^1.18.4","npm-run-all":"4.1.3","parcel-bundler":"^1.10.3","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"readme":"# HeyDoctor Javascript SDK\n\nThe HeyDoctor Javascript library provides convenient access to the HeyDoctor API for applications written in JavaScript.\n\n## Documentation\nCheck out our [auto-generated docs](https://sappira-inc.github.io/heydoctor-js/) using [TypeDoc](http://typedoc.org).\n\n## Installation\nYou can install `heydoctor-js` using your favorite package manager.\n\n```sh\n$ yarn add heydoctor-js\n# or\n$ npm install --save heydoctor-js\n```\n\n## Usage\nYou'll first need to create a new client resource. If using the HeyDoctor SaaS platform, you'll need to provide the API key located in the EMR. The client contains the http module that will communicate with the HeyDoctor API, so we'll pass this client to the other resources you'll need.\n\n### Creating the client\n\n```js\nimport { Client, Environments, Visits, OAuth } from 'heydoctor-js';\n\n// The client will hold all configuration options and the http module\n// that communicates to our server\nconst client = new Client({\n  env: Environments.SANDBOX | Environments.PRODUCTION, // determines the API and OAuth endpoints\n});\n\n// Create two resources passing both the client we've just created\n// ** Some resources also take an optional options object as a second argument\nconst visits = new Visits(client;\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n  scope: '*',\n});\n```\n\n### Subscribing to HTTP events\nThe HeyDoctor client also doubles as an event emitter. The client extends from [Mitt](https://github.com/developit/mitt) and complies with standard EventEmitter events.\n\n```js\ninterface HttpCallback {\n  statusCode: number;\n  data: any;\n}\n\nconst client = new Client();\n\nclient.on('http:success', (data: HttpCallback) => void);\nclient.on('http:error', (data: HttpCallback) => void);\n```\n\n### Authorizing via OAuth\n\nPartnering clients will use the HeyDoctor JS SDK to create or link a HeyDoctor account. HeyDoctor conforms to the existing [OAuth2 protocol](https://oauth.net/2/). In the case that HeyDoctor already has the provided email on file, the SDK will open a dialog box, akin to Facebook or Google login, prompting the user to confirm their existing password. In all successful cases, an access token and refresh token will be returned. The resulting payload is outlined below.\n\nWe recommend to store the longstanding refresh token in a persisted data store. You’ll use this token, along with your unique client id and secret key to regenerate short lived access tokens used to authenticate requests to the HeyDoctor API. For security measures, the access token has a one hour TTL, after which the token will expire and new access token will need to be generated.\n\nUpon successful authorization, all subsequent SDK calls will be authenticated using the access token. The access token can also be utilized server-side to call our API directly.\n\n#### Example\n\n```js\nimport { Client, OAuth } from 'heydoctor-js';\n\nconst client = new Client({\n  env: 'production',\n});\n\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n});\n\n// First attempt to create a new HeyDoctor user silently. The method will throw an error in the case that the email already exists,\n// in which case you have the opportunity to present an unobtrusive dialog for the user to confirm their existing HeyDoctor password.\ntry {\n  const { accessToken, refreshToken } = await oauth.createUser({\n    email: 'frank@heydoctor.com',\n    firstName: 'Frank',\n    lastName: 'Sinatra',\n    dob: '1915-12-12',\n    gender: 'male',\n    addressLine1: '123 Somewhere Street',\n    city: 'Hoboken',\n    state: 'NJ',\n    zip: '07030',\n  });\n} catch (error) {\n  if (error.code === 'account_exists') {\n    const { accessToken, refreshToken } = await oauth.launchWebAuthFlow('frank@heydoctor.com');\n  }\n}\n\n// Now that the client has been authorized, we can call call other methods available in the SDK\nconst visit = await visits.create({\n  code: 'hair-loss',\n});\n\n// Excellent, we've just created our first visit. Now, we can upload photos to that visit.\nawait visit.uploadPhoto('photoId1234', 'base64photostring');\n```\n","readmeFilename":"README.md","gitHead":"7187fd119ff3945c0ce36fc78a77450571c65a9e","bugs":{"url":"https://github.com/sappira-inc/heydoctor-js/issues"},"homepage":"https://github.com/sappira-inc/heydoctor-js#readme","_id":"heydoctor-js@0.0.0-a008194","_nodeVersion":"10.17.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-RaLwXwYTNAJLq52woEXQW4OfDuaUsjJk6l0+s/NnebiCJSrtze6iXHv9I0Sr+ff6hl2x6/mYBS80wtmkPL6itg==","shasum":"67da347000d59f0c81af60f5221457548d2e305a","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-0.0.0-a008194.tgz","fileCount":30,"unpackedSize":115640,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd6CAFCRA9TVsSAnZWagAABo0P/R8uahp4JCf2tCeQAiGT\nTjaM2fMaLsohqgdDcGHZi+OHgLCCq42SVruYixRVfsHdPhJ7MSL9ZacZV1Dw\nFYRoEOh56o2eq/3Hao+ZYZRZuDKupehdDbWf0GA3I0f5FtN+E5e+y/TR5ygF\nnh+Oa69u5jPF6fgw4ioNlilVlDzySbzpK/2bQXbRPyssjYBxE5xWwQuVoWsH\n4geqncF4pDalYasWTqJu4aUPLWawd/VmSFnv0b9ZPePDpYZd7G2RMvwL5EPO\nL3S5SxKEIvYqc/8DOzR0LdXORTnejdXuWQxjzgun4s9GXgTRQcCgqdZdzVMt\n0DDSE6f5b2jzShbrDleF/zX+cmS7BO835cB6hogcbWPw4JalA3ZIrMCJrlp/\npD9BltcBAumR93bXpcBjX0rVdbaKOVBdF7eM+UQ9Gp93Jto5k0tc2oZ7982E\n2duQpn3jYs73ln9Con71i23VEojddd6irq/nXK75Vry49V+Dz9PAukx7UQMR\nJCtpO/P+4TNYmbQomYe6cRLP79tZqsiGGP3am3rx2ZtljLmdPcnJGRumcqow\nXphupdfYH0yg3kfIBQa0slYHTcBtlQW6LdbL1b36s9CdzA1ZMQZ9xCjdmIP1\nVO1kguoFTFVcUAVkvSv8KpMuvKRsyzHCwGhROPxo6Ftr3owWX7NY0Rnp9vK4\nzT7w\r\n=seuI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFZiM0lxyE+YSA8Ge1m2PXiFcb83GRU13J3BLSHdmrl1AiEArhPFiDWZrIwkzhvWVSEJa78XzQfdBVbSH6nrPjRB804="}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"}],"_npmUser":{"name":"kylealwyn","email":"kjalwyn@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_0.0.0-a008194_1575493637054_0.5544234815382558"},"_hasShrinkwrap":false},"3.2.0":{"name":"heydoctor-js","version":"3.2.0","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/sappira-inc/heydoctor-js.git"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"precommit":"lint-staged","bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'npm run build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"npm run docs:build && npm run docs:deploy"},"dependencies":{"@types/jest":"^24.0.23","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3","snyk":"^1.161.1"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^23.6.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^1.18.4","npm-run-all":"4.1.3","parcel-bundler":"^1.10.3","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"gitHead":"a247970c7000b8ad8ccdf2cc2947394ec11653da","bugs":{"url":"https://github.com/sappira-inc/heydoctor-js/issues"},"homepage":"https://github.com/sappira-inc/heydoctor-js#readme","_id":"heydoctor-js@3.2.0","_nodeVersion":"10.15.0","_npmVersion":"6.7.0","dist":{"integrity":"sha512-h+1ftVBuQJFddqpSsTzPhlZfQ18Cp9s+v+IqdgfiW2FFIuit8RU/BCMtRZRkqredM0/B64aHfvZkTDFuRxMWwQ==","shasum":"49b1ce0e75298ab89eebd4d858f6ce2970e40225","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-3.2.0.tgz","fileCount":30,"unpackedSize":115935,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd6CHDCRA9TVsSAnZWagAA1S4P/iHWNuBxNjrxGqeFdeyt\n+8gTM1S4/FURGp498c1M2uxg9ypTMKOlEBlrwEGmMDgysuKQqMITKiacPKLf\nX0zevtsrT2Vq+KyldKfhKP+lOI1SPL73AGw1ajhush9PZLXqaFgK4PN0OyYZ\n3kCE6dGfVJ5mwOKjBXYS0ZvFCyZRPl7HxGKVEPt8/eWPzEW4+G1RDHZpJozK\n1rfrVoYH6aVjVqkCIH0qJ6/5wgF83/twyTsl3FYpSaTM80Igv7S5eMd1eJMs\n2Ab4PXGkenWIAxqPDZ7KLJ7Qf7l6LYrTxwYkWKcGKtmID3QR6pd8tgfOZSJF\nfxRlD1jqkh5uNKNaOCbXRcj/WG3aY6Lor3mYtkDdEKkNxOpmqqgW7lsj5wh2\nWczkBapUmqRPqG4IQ6KrGlzglPqAunJpf+ItUaWVCc+J9qbg8TYtM5C6BVLB\nOWdmM5nSTPyAK/BV8N6r3wpdQ046xROMJksUfRnsYMH+iNcODsi/ZUgypeFi\nq0B3eJxVohl3J24lJ/Ds+utAZOGF6Lsrff1nCh5FADm010Np6RClmg+N+tX9\nU4BpUvETHOXifDkk4VMcY2HDTGEAsPvWMlrcDG7zIuhNVAiEEPh4oPl0COGi\nPe+73s5eUWGXEX0Hl/njAMSN7MyGbfYd9z4N232bwrg/rvMfBo29EUYb3/qO\nlcw6\r\n=o40Y\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH3/WVKfnqlto/bYblLqih7Gq9wj0lGhsWC6WYpVu5nAAiBkOVjKrds5B+Ur9JVFfolyr/CGqp8eWX7ycoSJtX4B4g=="}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"}],"_npmUser":{"name":"kylealwyn","email":"kjalwyn@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_3.2.0_1575494083143_0.21128160443129262"},"_hasShrinkwrap":false},"0.0.0-fb9012e":{"name":"heydoctor-js","version":"0.0.0-fb9012e","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/sappira-inc/heydoctor-js.git"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"precommit":"lint-staged","bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'npm run build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"npm run docs:build && npm run docs:deploy"},"dependencies":{"@types/jest":"^24.0.23","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3","snyk":"^1.161.1"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^23.6.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^1.18.4","npm-run-all":"4.1.3","parcel-bundler":"^1.10.3","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"readme":"# HeyDoctor Javascript SDK\n\nThe HeyDoctor Javascript library provides convenient access to the HeyDoctor API for applications written in JavaScript.\n\n## Documentation\nCheck out our [auto-generated docs](https://sappira-inc.github.io/heydoctor-js/) using [TypeDoc](http://typedoc.org).\n\n## Installation\nYou can install `heydoctor-js` using your favorite package manager.\n\n```sh\n$ yarn add heydoctor-js\n# or\n$ npm install --save heydoctor-js\n```\n\n## Usage\nYou'll first need to create a new client resource. If using the HeyDoctor SaaS platform, you'll need to provide the API key located in the EMR. The client contains the http module that will communicate with the HeyDoctor API, so we'll pass this client to the other resources you'll need.\n\n### Creating the client\n\n```js\nimport { Client, Environments, Visits, OAuth } from 'heydoctor-js';\n\n// The client will hold all configuration options and the http module\n// that communicates to our server\nconst client = new Client({\n  env: Environments.SANDBOX | Environments.PRODUCTION, // determines the API and OAuth endpoints\n});\n\n// Create two resources passing both the client we've just created\n// ** Some resources also take an optional options object as a second argument\nconst visits = new Visits(client;\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n  scope: '*',\n});\n```\n\n### Subscribing to HTTP events\nThe HeyDoctor client also doubles as an event emitter. The client extends from [Mitt](https://github.com/developit/mitt) and complies with standard EventEmitter events.\n\n```js\ninterface HttpCallback {\n  statusCode: number;\n  data: any;\n}\n\nconst client = new Client();\n\nclient.on('http:success', (data: HttpCallback) => void);\nclient.on('http:error', (data: HttpCallback) => void);\n```\n\n### Authorizing via OAuth\n\nPartnering clients will use the HeyDoctor JS SDK to create or link a HeyDoctor account. HeyDoctor conforms to the existing [OAuth2 protocol](https://oauth.net/2/). In the case that HeyDoctor already has the provided email on file, the SDK will open a dialog box, akin to Facebook or Google login, prompting the user to confirm their existing password. In all successful cases, an access token and refresh token will be returned. The resulting payload is outlined below.\n\nWe recommend to store the longstanding refresh token in a persisted data store. You’ll use this token, along with your unique client id and secret key to regenerate short lived access tokens used to authenticate requests to the HeyDoctor API. For security measures, the access token has a one hour TTL, after which the token will expire and new access token will need to be generated.\n\nUpon successful authorization, all subsequent SDK calls will be authenticated using the access token. The access token can also be utilized server-side to call our API directly.\n\n#### Example\n\n```js\nimport { Client, OAuth } from 'heydoctor-js';\n\nconst client = new Client({\n  env: 'production',\n});\n\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n});\n\n// First attempt to create a new HeyDoctor user silently. The method will throw an error in the case that the email already exists,\n// in which case you have the opportunity to present an unobtrusive dialog for the user to confirm their existing HeyDoctor password.\ntry {\n  const { accessToken, refreshToken } = await oauth.createUser({\n    email: 'frank@heydoctor.com',\n    firstName: 'Frank',\n    lastName: 'Sinatra',\n    dob: '1915-12-12',\n    gender: 'male',\n    addressLine1: '123 Somewhere Street',\n    city: 'Hoboken',\n    state: 'NJ',\n    zip: '07030',\n  });\n} catch (error) {\n  if (error.code === 'account_exists') {\n    const { accessToken, refreshToken } = await oauth.launchWebAuthFlow('frank@heydoctor.com');\n  }\n}\n\n// Now that the client has been authorized, we can call call other methods available in the SDK\nconst visit = await visits.create({\n  code: 'hair-loss',\n});\n\n// Excellent, we've just created our first visit. Now, we can upload photos to that visit.\nawait visit.uploadPhoto('photoId1234', 'base64photostring');\n```\n","readmeFilename":"README.md","gitHead":"5d2f041b3f79711c6351dc24f85b2e28a8d6bfd3","bugs":{"url":"https://github.com/sappira-inc/heydoctor-js/issues"},"homepage":"https://github.com/sappira-inc/heydoctor-js#readme","_id":"heydoctor-js@0.0.0-fb9012e","_nodeVersion":"10.17.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-k5jqJSsfR2ubm1yFLUFApIKZOfsKnVBBLfAr/zICksDfGbampdv3tIVM2LeaCD2bmLigb7oG+C2w2evoufTyOA==","shasum":"d26627da22b6655e868bdbe26537fe4d226a0c18","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-0.0.0-fb9012e.tgz","fileCount":30,"unpackedSize":115943,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd6COaCRA9TVsSAnZWagAAC2cQAIa0b+TiQ+k3ai0sQFMA\nEJywkJCtkA3vSyF2IY2YcKm9M+OeIbRW12Y/MsLJY9+TgsIrNceFiJK5nMDE\ngSAVsw3LfcKjqhSyt0Iiq9mwuP/EccYF4Q5sHgC4Wn2L8yi/6rbpV+dDrdjh\n3SEVkZDnvHzuxnQLobwczCJSRVdCZNO/v262sAjXXOMzCoATs1VOw54Q7s6+\nOCaynr52hNmmn3WLD5+VlxvxHWM3aG/rq2FDos3XX3z6Ifjjc/BcNFbbH/oq\n2RETJcqGN8/I5J3E/7cvsoe5A0/4YfQsiGXMsSFc6TVTq/n7pW8H8X6M2PXr\nKWcL2poX0U0ICMuufaais2bWaXzUGR7deLafdaR02df4snfNZ98YaX6hSKzV\nmK3C8L9pTC3T16+j8UGT6ufUPKzMYMq2pXpqobsyggEIjZMcoYGXeZEDVOYP\nb/Z/e25xPsFbgvR8O5I7/k+ks1kx41yUWvqAZe8syOR183ZX/1og/N2QxG9V\nWOxlXe2NkM1UKdMu3Z+FGuB07mU/sFaGk2rRrHJm1KWAobpMjzqSrDXiNGKY\npMncGBwLNGJFtNOvX7Ie8zCvNwIzcJfgu1AYdxfsfOae6gn9XaLCcMA3PdJG\nqhkVBbAc5MOsl0coPDwd6vuGqsnsY+11bzOWvacs/X8/0+IDfSjrv1WthzFG\nPx1v\r\n=Xxxr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA5MfV1ncDi/SePC9BVLTK2LUltPPznagL80B0qdIc3+AiAq3rlREmOoK9KN1nkefrb/O8SKsJPiqpNlH3BnZ2hG4A=="}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"}],"_npmUser":{"name":"kylealwyn","email":"kjalwyn@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_0.0.0-fb9012e_1575494554242_0.8930161201558602"},"_hasShrinkwrap":false},"0.0.0-403f609":{"name":"heydoctor-js","version":"0.0.0-403f609","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/sappira-inc/heydoctor-js.git"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"precommit":"lint-staged","bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'npm run build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"npm run docs:build && npm run docs:deploy"},"dependencies":{"@types/jest":"^24.0.23","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3","snyk":"^1.161.1"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^23.6.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^1.18.4","npm-run-all":"4.1.3","parcel-bundler":"^1.10.3","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"readme":"# HeyDoctor Javascript SDK\n\nThe HeyDoctor Javascript library provides convenient access to the HeyDoctor API for applications written in JavaScript.\n\n## Documentation\nCheck out our [auto-generated docs](https://sappira-inc.github.io/heydoctor-js/) using [TypeDoc](http://typedoc.org).\n\n## Installation\nYou can install `heydoctor-js` using your favorite package manager.\n\n```sh\n$ yarn add heydoctor-js\n# or\n$ npm install --save heydoctor-js\n```\n\n## Usage\nYou'll first need to create a new client resource. If using the HeyDoctor SaaS platform, you'll need to provide the API key located in the EMR. The client contains the http module that will communicate with the HeyDoctor API, so we'll pass this client to the other resources you'll need.\n\n### Creating the client\n\n```js\nimport { Client, Environments, Visits, OAuth } from 'heydoctor-js';\n\n// The client will hold all configuration options and the http module\n// that communicates to our server\nconst client = new Client({\n  env: Environments.SANDBOX | Environments.PRODUCTION, // determines the API and OAuth endpoints\n});\n\n// Create two resources passing both the client we've just created\n// ** Some resources also take an optional options object as a second argument\nconst visits = new Visits(client;\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n  scope: '*',\n});\n```\n\n### Subscribing to HTTP events\nThe HeyDoctor client also doubles as an event emitter. The client extends from [Mitt](https://github.com/developit/mitt) and complies with standard EventEmitter events.\n\n```js\ninterface HttpCallback {\n  statusCode: number;\n  data: any;\n}\n\nconst client = new Client();\n\nclient.on('http:success', (data: HttpCallback) => void);\nclient.on('http:error', (data: HttpCallback) => void);\n```\n\n### Authorizing via OAuth\n\nPartnering clients will use the HeyDoctor JS SDK to create or link a HeyDoctor account. HeyDoctor conforms to the existing [OAuth2 protocol](https://oauth.net/2/). In the case that HeyDoctor already has the provided email on file, the SDK will open a dialog box, akin to Facebook or Google login, prompting the user to confirm their existing password. In all successful cases, an access token and refresh token will be returned. The resulting payload is outlined below.\n\nWe recommend to store the longstanding refresh token in a persisted data store. You’ll use this token, along with your unique client id and secret key to regenerate short lived access tokens used to authenticate requests to the HeyDoctor API. For security measures, the access token has a one hour TTL, after which the token will expire and new access token will need to be generated.\n\nUpon successful authorization, all subsequent SDK calls will be authenticated using the access token. The access token can also be utilized server-side to call our API directly.\n\n#### Example\n\n```js\nimport { Client, OAuth } from 'heydoctor-js';\n\nconst client = new Client({\n  env: 'production',\n});\n\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n});\n\n// First attempt to create a new HeyDoctor user silently. The method will throw an error in the case that the email already exists,\n// in which case you have the opportunity to present an unobtrusive dialog for the user to confirm their existing HeyDoctor password.\ntry {\n  const { accessToken, refreshToken } = await oauth.createUser({\n    email: 'frank@heydoctor.com',\n    firstName: 'Frank',\n    lastName: 'Sinatra',\n    dob: '1915-12-12',\n    gender: 'male',\n    addressLine1: '123 Somewhere Street',\n    city: 'Hoboken',\n    state: 'NJ',\n    zip: '07030',\n  });\n} catch (error) {\n  if (error.code === 'account_exists') {\n    const { accessToken, refreshToken } = await oauth.launchWebAuthFlow('frank@heydoctor.com');\n  }\n}\n\n// Now that the client has been authorized, we can call call other methods available in the SDK\nconst visit = await visits.create({\n  code: 'hair-loss',\n});\n\n// Excellent, we've just created our first visit. Now, we can upload photos to that visit.\nawait visit.uploadPhoto('photoId1234', 'base64photostring');\n```\n","readmeFilename":"README.md","gitHead":"964f737b142279d64736b2259133fdd24189720e","bugs":{"url":"https://github.com/sappira-inc/heydoctor-js/issues"},"homepage":"https://github.com/sappira-inc/heydoctor-js#readme","_id":"heydoctor-js@0.0.0-403f609","_nodeVersion":"10.17.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-b/1Qe0AIQcva9UmdL636fm2PEHa/QioIFRPCHUYmDIAQSn69r05A4iXJ8sN3gxLmcfxVKF04vRfKLYQm4jZRIQ==","shasum":"4e6a14b91974a11b4c6fba982b6c77b8be92c286","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-0.0.0-403f609.tgz","fileCount":30,"unpackedSize":115943,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd6CPyCRA9TVsSAnZWagAA7hEP/is03ezJ4npcmq7CtOL5\nwQzKfNXYfWNNC0XMXgUTTTFIFZfCRUjzpZJzl3XDxWNCq3CZK1fF5y8zBmuv\nUrjEq353Q54XWnaN3cOSvKqgD0dTzUiGTAA6upHsiRmLQCpdjf9NwVhwFaOb\n66HHyx9ljOpnYdZ8fUpJGkOoOebJfVCG/JwfVI/wvXAVZT2zGa4dn6N0kVc3\nyXuoG5WbJqhM0a1+4ZxAKlVsm5gJwHGowr+W029qATL/8GQ0e3CtxmwjOYw3\nOrBLyotlc7gFByJW3ksIO9INBqoSAexRb/7NRNzeMsRtJJIfAeHjZlxNW/Tt\n8gYGl9s8ODpHxGZWKIbHsLSXqEaQMke+q77hQQrZbfkIBcTtN61AQgdVXsXm\nDLn7zxWgVTbV/fIw4fVZjNpfyfOzkukT/OSqlecuEUh4DYpDP7l+SZoLxkMf\nwBqlES7i4tHZqS0xaMOIJAReUHyvlWRufPsldhqsRUW9jgmFPU5ogOkffu/2\nxYeucnzWT+FALIpczlbcDJ3V6zMXHJXRp7iAjP6585mBo01Cw29QUaHypn6h\n8oIyJBjyl09uUNqcajWscTWkqDIqilGVOeNA4M6EgMschcrs7EK/4DneJgaW\nRbNUx/P8L52tFYQvQha6EE37QxXBQgMqil/qI96DM+Vjrrugm63C8GHbVEMP\n10vd\r\n=OZOe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCsIbn2qohGiXTcacAY2+KcVmgfs1dg8HPRnvGNwV5OuQIgHAYpL65XhwnRRDzO9I7Bq9se51D40gzNmzQbv8AYWmM="}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"}],"_npmUser":{"name":"kylealwyn","email":"kjalwyn@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_0.0.0-403f609_1575494642110_0.5057599679783362"},"_hasShrinkwrap":false},"0.0.0-4243757":{"name":"heydoctor-js","version":"0.0.0-4243757","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/sappira-inc/heydoctor-js.git"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"precommit":"lint-staged","bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'npm run build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"npm run docs:build && npm run docs:deploy"},"dependencies":{"@types/jest":"^24.0.23","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3","snyk":"^1.161.1"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^23.6.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^1.18.4","npm-run-all":"4.1.3","parcel-bundler":"^1.10.3","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"readme":"# HeyDoctor Javascript SDK\n\nThe HeyDoctor Javascript library provides convenient access to the HeyDoctor API for applications written in JavaScript.\n\n## Documentation\nCheck out our [auto-generated docs](https://sappira-inc.github.io/heydoctor-js/) using [TypeDoc](http://typedoc.org).\n\n## Installation\nYou can install `heydoctor-js` using your favorite package manager.\n\n```sh\n$ yarn add heydoctor-js\n# or\n$ npm install --save heydoctor-js\n```\n\n## Usage\nYou'll first need to create a new client resource. If using the HeyDoctor SaaS platform, you'll need to provide the API key located in the EMR. The client contains the http module that will communicate with the HeyDoctor API, so we'll pass this client to the other resources you'll need.\n\n### Creating the client\n\n```js\nimport { Client, Environments, Visits, OAuth } from 'heydoctor-js';\n\n// The client will hold all configuration options and the http module\n// that communicates to our server\nconst client = new Client({\n  env: Environments.SANDBOX | Environments.PRODUCTION, // determines the API and OAuth endpoints\n});\n\n// Create two resources passing both the client we've just created\n// ** Some resources also take an optional options object as a second argument\nconst visits = new Visits(client;\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n  scope: '*',\n});\n```\n\n### Subscribing to HTTP events\nThe HeyDoctor client also doubles as an event emitter. The client extends from [Mitt](https://github.com/developit/mitt) and complies with standard EventEmitter events.\n\n```js\ninterface HttpCallback {\n  statusCode: number;\n  data: any;\n}\n\nconst client = new Client();\n\nclient.on('http:success', (data: HttpCallback) => void);\nclient.on('http:error', (data: HttpCallback) => void);\n```\n\n### Authorizing via OAuth\n\nPartnering clients will use the HeyDoctor JS SDK to create or link a HeyDoctor account. HeyDoctor conforms to the existing [OAuth2 protocol](https://oauth.net/2/). In the case that HeyDoctor already has the provided email on file, the SDK will open a dialog box, akin to Facebook or Google login, prompting the user to confirm their existing password. In all successful cases, an access token and refresh token will be returned. The resulting payload is outlined below.\n\nWe recommend to store the longstanding refresh token in a persisted data store. You’ll use this token, along with your unique client id and secret key to regenerate short lived access tokens used to authenticate requests to the HeyDoctor API. For security measures, the access token has a one hour TTL, after which the token will expire and new access token will need to be generated.\n\nUpon successful authorization, all subsequent SDK calls will be authenticated using the access token. The access token can also be utilized server-side to call our API directly.\n\n#### Example\n\n```js\nimport { Client, OAuth } from 'heydoctor-js';\n\nconst client = new Client({\n  env: 'production',\n});\n\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n});\n\n// First attempt to create a new HeyDoctor user silently. The method will throw an error in the case that the email already exists,\n// in which case you have the opportunity to present an unobtrusive dialog for the user to confirm their existing HeyDoctor password.\ntry {\n  const { accessToken, refreshToken } = await oauth.createUser({\n    email: 'frank@heydoctor.com',\n    firstName: 'Frank',\n    lastName: 'Sinatra',\n    dob: '1915-12-12',\n    gender: 'male',\n    addressLine1: '123 Somewhere Street',\n    city: 'Hoboken',\n    state: 'NJ',\n    zip: '07030',\n  });\n} catch (error) {\n  if (error.code === 'account_exists') {\n    const { accessToken, refreshToken } = await oauth.launchWebAuthFlow('frank@heydoctor.com');\n  }\n}\n\n// Now that the client has been authorized, we can call call other methods available in the SDK\nconst visit = await visits.create({\n  code: 'hair-loss',\n});\n\n// Excellent, we've just created our first visit. Now, we can upload photos to that visit.\nawait visit.uploadPhoto('photoId1234', 'base64photostring');\n```\n","readmeFilename":"README.md","gitHead":"c8804351bd834dbdd9d3e4c2800ebd8f7ab93114","bugs":{"url":"https://github.com/sappira-inc/heydoctor-js/issues"},"homepage":"https://github.com/sappira-inc/heydoctor-js#readme","_id":"heydoctor-js@0.0.0-4243757","_nodeVersion":"10.17.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-SUgTKayg1sqERgGikf64YlrIFnyeRV/vInDTzLZ9hIG5DbrlH6JvN0DkTjJym7VdDoy/IN8wRAtl2R0grptESQ==","shasum":"55ccbcacb018b4071b71a84fe2620e776138f585","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-0.0.0-4243757.tgz","fileCount":34,"unpackedSize":133977,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd78lTCRA9TVsSAnZWagAAuesQAJLFAmiM5RWbU5bzZycI\n762jsqMnCNyzhklfZ88A5axOYb2SY+eQjOi5bnIXvsugyK5a5Ct3ufbf9uqR\n9Q0+0D3UdMv2N2YHF4NNT9h3NFveVlPhiodonPbjkVd4aPPEgAIuheZrwx1F\nK4lMzVoDurzdh52IA8L7QCeFlsa/q9NrvGitAp+jjZ/LorNGhvfdXLPFMpDb\n7ay5C7d7uygfxGe8QVGihY0bYm0hMWIS7G5qi8DhXas8NXEaDZ9VnAMx4+i8\nQ/wjZCPrqSsDlqMBy8hvjeOIYugahNbrBq7vnaE3oJxovR6CPoxIz4bZKuSe\n+hmYI10xwaq51A8p/TBUumzh3IaV5N3Adz84L84PxNQle4aUm5MPEQKlZmC5\nbEaTfh0BeRT+iGeS8UoDF0owzkmd/FiRksLNUQfMUkyJjnUdP6bNyHcAigCp\nLZMNzE1fK8cwKvJNFsxCacTg7A4KfAkSjRbWQNhAVchzy4MOi1V3LGKWt2VV\nOW3MfkimaZ1kK/T27RiGXs3IMOnt9q1Cc/qDgtuKSC7eCVUl1ChOmaZBZmIp\n5wnR1zx/fmekpumYpmK9/P9K1r90z84oweDAr/QzsVSaw31/wbEhV3e+Cm0Q\n0t0srJGemI1k9uuY6Mes+9gO7/oUDb7re8faylSJMBSzRiJuTrczRmM28mR4\nLFJL\r\n=f6b3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQClw9HdKpINptmcenfT2uAnzWkLIMkGj4BDsqrqvLkjUAIhANN/b9KJTL5+mobxOg6V46xgkIyQ7SaYdmEOBWS9SX5X"}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"}],"_npmUser":{"name":"kylealwyn","email":"kjalwyn@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_0.0.0-4243757_1575995731347_0.3087835260782881"},"_hasShrinkwrap":false},"0.0.0-13aa944":{"name":"heydoctor-js","version":"0.0.0-13aa944","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/sappira-inc/heydoctor-js.git"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"precommit":"lint-staged","bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'npm run build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"npm run docs:build && npm run docs:deploy"},"dependencies":{"@types/jest":"^24.0.23","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3","snyk":"^1.161.1"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^23.6.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^1.18.4","npm-run-all":"4.1.3","parcel-bundler":"^1.10.3","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"readme":"# HeyDoctor Javascript SDK\n\nThe HeyDoctor Javascript library provides convenient access to the HeyDoctor API for applications written in JavaScript.\n\n## Documentation\nCheck out our [auto-generated docs](https://sappira-inc.github.io/heydoctor-js/) using [TypeDoc](http://typedoc.org).\n\n## Installation\nYou can install `heydoctor-js` using your favorite package manager.\n\n```sh\n$ yarn add heydoctor-js\n# or\n$ npm install --save heydoctor-js\n```\n\n## Usage\nYou'll first need to create a new client resource. If using the HeyDoctor SaaS platform, you'll need to provide the API key located in the EMR. The client contains the http module that will communicate with the HeyDoctor API, so we'll pass this client to the other resources you'll need.\n\n### Creating the client\n\n```js\nimport { Client, Environments, Visits, OAuth } from 'heydoctor-js';\n\n// The client will hold all configuration options and the http module\n// that communicates to our server\nconst client = new Client({\n  env: Environments.SANDBOX | Environments.PRODUCTION, // determines the API and OAuth endpoints\n});\n\n// Create two resources passing both the client we've just created\n// ** Some resources also take an optional options object as a second argument\nconst visits = new Visits(client;\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n  scope: '*',\n});\n```\n\n### Subscribing to HTTP events\nThe HeyDoctor client also doubles as an event emitter. The client extends from [Mitt](https://github.com/developit/mitt) and complies with standard EventEmitter events.\n\n```js\ninterface HttpCallback {\n  statusCode: number;\n  data: any;\n}\n\nconst client = new Client();\n\nclient.on('http:success', (data: HttpCallback) => void);\nclient.on('http:error', (data: HttpCallback) => void);\n```\n\n### Authorizing via OAuth\n\nPartnering clients will use the HeyDoctor JS SDK to create or link a HeyDoctor account. HeyDoctor conforms to the existing [OAuth2 protocol](https://oauth.net/2/). In the case that HeyDoctor already has the provided email on file, the SDK will open a dialog box, akin to Facebook or Google login, prompting the user to confirm their existing password. In all successful cases, an access token and refresh token will be returned. The resulting payload is outlined below.\n\nWe recommend to store the longstanding refresh token in a persisted data store. You’ll use this token, along with your unique client id and secret key to regenerate short lived access tokens used to authenticate requests to the HeyDoctor API. For security measures, the access token has a one hour TTL, after which the token will expire and new access token will need to be generated.\n\nUpon successful authorization, all subsequent SDK calls will be authenticated using the access token. The access token can also be utilized server-side to call our API directly.\n\n#### Example\n\n```js\nimport { Client, OAuth } from 'heydoctor-js';\n\nconst client = new Client({\n  env: 'production',\n});\n\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n});\n\n// First attempt to create a new HeyDoctor user silently. The method will throw an error in the case that the email already exists,\n// in which case you have the opportunity to present an unobtrusive dialog for the user to confirm their existing HeyDoctor password.\ntry {\n  const { accessToken, refreshToken } = await oauth.createUser({\n    email: 'frank@heydoctor.com',\n    firstName: 'Frank',\n    lastName: 'Sinatra',\n    dob: '1915-12-12',\n    gender: 'male',\n    addressLine1: '123 Somewhere Street',\n    city: 'Hoboken',\n    state: 'NJ',\n    zip: '07030',\n  });\n} catch (error) {\n  if (error.code === 'account_exists') {\n    const { accessToken, refreshToken } = await oauth.launchWebAuthFlow('frank@heydoctor.com');\n  }\n}\n\n// Now that the client has been authorized, we can call call other methods available in the SDK\nconst visit = await visits.create({\n  code: 'hair-loss',\n});\n\n// Excellent, we've just created our first visit. Now, we can upload photos to that visit.\nawait visit.uploadPhoto('photoId1234', 'base64photostring');\n```\n","readmeFilename":"README.md","gitHead":"d69dd1863d49f9b1c639f5f2ecd2345ec262ba6d","bugs":{"url":"https://github.com/sappira-inc/heydoctor-js/issues"},"homepage":"https://github.com/sappira-inc/heydoctor-js#readme","_id":"heydoctor-js@0.0.0-13aa944","_nodeVersion":"10.17.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-fmWRrpqV60FK7znWyGg/y37t33bXjlvyB3D7xMoU9NOpG5QDd8ZPX6RMe9t9d8Ejs4CfDbkBEl4aPlArgjCJ+g==","shasum":"e98392c36dfa4ca86ea6f3618320dee5ab1398c9","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-0.0.0-13aa944.tgz","fileCount":34,"unpackedSize":134040,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd78xKCRA9TVsSAnZWagAAJpEP/jmW/BVdKU0xuXs8x2fs\nWITTlBDV2+8Y3FJ9ii42SszBeJKcaUXGlE2FVPjuMluMYWiaYnJgMFX2kTSY\nKNKjhB8TGldE4NieytY1p7b0Ww7U0iBcmRBAQbjFzJ/QZTO/rdKyS8lxMwas\nnwmkZ+LDTq6NtJolv8t2Rt2WKq9LLijoJuRfZEFaZI7Fg5C6eRbbb1NxnMao\nNuWvXfeVHFN8aiv0oyUjjDJYUFEetmsFbY3lhHbBpRLr9gjmD36DPo/X+/q+\nkUmYGylbJkwZJOOhD6x04cjFJtLQd+1Lb8zICAB+I5PxJ+phaFrOQmyjkxtU\n/eXfX5Rr9Eg7yUoipDqoAWoxBSk8ugAf8tUSeIsT59ZYvohIEnP7VxXN1B9s\nKYTrFFZ6dZaP/c7uHwgQfJsX7uuUcTttTvlGj+twxdsh7cvrFV0YxS6jHRSk\nQccCnKgVRAXISzIAQXEEcgDi+5MgHMrlQhaYcBDUIv4dUtRw0j8JvxlL2cQM\naahFm4Ug8WgIIZ+Eeo9Abxl7c9Oqg3MCpvgosqLkwAamFuawOJgoEQfMyU3C\np/6IVJ6TZjeJCKLVYX7gWf3T2eI6S4JnfxPBnaqxJZSsNQ2e9VBGFKFRlo1w\ndyJwFwH/BSed2M6/V2AoDc/rk9Tan7OMlRgtbWYuyfMBvyRL6rKq2lgXg+9+\nZKh5\r\n=QE0K\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFhPDnt8uChXdG9bOu7rOUdjaz0u+2q0aZ6770OdktqTAiBRBufUIQ9OB0qqT3IddKOhCLpvPQffSIyM3hnXh1S9UQ=="}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"}],"_npmUser":{"name":"kylealwyn","email":"kjalwyn@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_0.0.0-13aa944_1575996489641_0.3697419246144682"},"_hasShrinkwrap":false},"3.2.2":{"name":"heydoctor-js","version":"3.2.2","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/sappira-inc/heydoctor-js.git"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"precommit":"lint-staged","bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'npm run build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"npm run docs:build && npm run docs:deploy"},"dependencies":{"@types/jest":"^24.0.23","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3","snyk":"^1.161.1"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^23.6.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^1.18.4","npm-run-all":"4.1.3","parcel-bundler":"^1.10.3","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"gitHead":"b0378b212854f53abc47f7cba89328e56bbb9cc7","bugs":{"url":"https://github.com/sappira-inc/heydoctor-js/issues"},"homepage":"https://github.com/sappira-inc/heydoctor-js#readme","_id":"heydoctor-js@3.2.2","_nodeVersion":"10.17.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-nUKrVoadEIlyvFLJrcIzk8KrRrP+cCo9n8Pp1dO8SYiE8ANE5hRlmDI0zR6rbqF2vwuBxTpcfXlmtcPlCQw5bw==","shasum":"8b99741dfe2f1ff56d979c0b4d53cf18103c0e5a","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-3.2.2.tgz","fileCount":4,"unpackedSize":14418,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd8BnkCRA9TVsSAnZWagAAYf8P/1/wGh3+5SHvzlwCecbV\nZsNycciqbOCFqb79ldbejV/l3uUJE8RJ/hmy9i5/s2ezSbJ+Z8Ya7UVgrxE3\nGhLVKCj24+fdVbQfgKYtSNa5Dx8VNbrvNpfscDXLYrd0zhJ1Tn7JNlKXGx1s\nG+rVlyh9dYQMbHkpoALiOumEtFGYytpH/QUNKqN+98tnCU9XDQOTIpZlOqoN\n0t1IGbLO7Y7PtZII5G7639mBXzg7O7ojZwTnoFoRg9cBe4fuvy/n30cFLAzM\nBrNwm9VVbyOl+JcFzH5UCi3lYXFntADH//8sqVboaAO9RHMjzi+Z57b97h9q\ncXVlnHrOKrpFTQ5dSif4o7nN6fr7pMRGvfc5MZZSG6HeNa8uM26dX+6s6WhX\n97QMb9JFLnnLduKp/pN3cIBfQa8cu/70Du9Sq+iJOlKGtm7uHKk3OoauiJu7\nZoNASv76yq+pXSO6QHGN9fbR5WTOw25xx5Wa4nn9rHiQ+WGBAX0MruJ553B5\nEwi7UrKGEMzJYWt0W2rMTPNHtQy5cUzOXV+EvmxgYRCuyyWvs9KvSDs5IUXE\nXylC2hGFznyMpDThH2Hr/XPuqv+fiwzU3aiRnV2yzyS9w40/rz2D4b1gaV0e\nynxAvWl4ounACJkPRmuXaqQP3vCTYN/ienlNySRbwMajR7URyVfYcatBa1c6\noXBN\r\n=iMwA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHVbpEj291WO7usB6LrDq7ppz03EpXtzvAx4GdiLS/r0AiBaoU/nNjNVSJbfmlrTqZrWeqeXuOqUtY3vvrDl9CKwRQ=="}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"}],"_npmUser":{"name":"kylealwyn","email":"kjalwyn@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_3.2.2_1576016355361_0.6749658715119813"},"_hasShrinkwrap":false},"0.0.0-4369de1":{"name":"heydoctor-js","version":"0.0.0-4369de1","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/sappira-inc/heydoctor-js.git"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"precommit":"lint-staged","bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'npm run build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"npm run docs:build && npm run docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@types/jest":"^24.0.23","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3","snyk":"^1.161.1"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^23.6.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^1.18.4","npm-run-all":"4.1.3","parcel-bundler":"^1.10.3","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"readme":"# HeyDoctor Javascript SDK\n\nThe HeyDoctor Javascript library provides convenient access to the HeyDoctor API for applications written in JavaScript.\n\n## Documentation\nCheck out our [auto-generated docs](https://sappira-inc.github.io/heydoctor-js/) using [TypeDoc](http://typedoc.org).\n\n## Installation\nYou can install `heydoctor-js` using your favorite package manager.\n\n```sh\n$ yarn add heydoctor-js\n# or\n$ npm install --save heydoctor-js\n```\n\n## Usage\nYou'll first need to create a new client resource. If using the HeyDoctor SaaS platform, you'll need to provide the API key located in the EMR. The client contains the http module that will communicate with the HeyDoctor API, so we'll pass this client to the other resources you'll need.\n\n### Creating the client\n\n```js\nimport { Client, Environments, Visits, OAuth } from 'heydoctor-js';\n\n// The client will hold all configuration options and the http module\n// that communicates to our server\nconst client = new Client({\n  env: Environments.SANDBOX | Environments.PRODUCTION, // determines the API and OAuth endpoints\n});\n\n// Create two resources passing both the client we've just created\n// ** Some resources also take an optional options object as a second argument\nconst visits = new Visits(client;\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n  scope: '*',\n});\n```\n\n### Subscribing to HTTP events\nThe HeyDoctor client also doubles as an event emitter. The client extends from [Mitt](https://github.com/developit/mitt) and complies with standard EventEmitter events.\n\n```js\ninterface HttpCallback {\n  statusCode: number;\n  data: any;\n}\n\nconst client = new Client();\n\nclient.on('http:success', (data: HttpCallback) => void);\nclient.on('http:error', (data: HttpCallback) => void);\n```\n\n### Authorizing via OAuth\n\nPartnering clients will use the HeyDoctor JS SDK to create or link a HeyDoctor account. HeyDoctor conforms to the existing [OAuth2 protocol](https://oauth.net/2/). In the case that HeyDoctor already has the provided email on file, the SDK will open a dialog box, akin to Facebook or Google login, prompting the user to confirm their existing password. In all successful cases, an access token and refresh token will be returned. The resulting payload is outlined below.\n\nWe recommend to store the longstanding refresh token in a persisted data store. You’ll use this token, along with your unique client id and secret key to regenerate short lived access tokens used to authenticate requests to the HeyDoctor API. For security measures, the access token has a one hour TTL, after which the token will expire and new access token will need to be generated.\n\nUpon successful authorization, all subsequent SDK calls will be authenticated using the access token. The access token can also be utilized server-side to call our API directly.\n\n#### Example\n\n```js\nimport { Client, OAuth } from 'heydoctor-js';\n\nconst client = new Client({\n  env: 'production',\n});\n\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n});\n\n// First attempt to create a new HeyDoctor user silently. The method will throw an error in the case that the email already exists,\n// in which case you have the opportunity to present an unobtrusive dialog for the user to confirm their existing HeyDoctor password.\ntry {\n  const { accessToken, refreshToken } = await oauth.createUser({\n    email: 'frank@heydoctor.com',\n    firstName: 'Frank',\n    lastName: 'Sinatra',\n    dob: '1915-12-12',\n    gender: 'male',\n    addressLine1: '123 Somewhere Street',\n    city: 'Hoboken',\n    state: 'NJ',\n    zip: '07030',\n  });\n} catch (error) {\n  if (error.code === 'account_exists') {\n    const { accessToken, refreshToken } = await oauth.launchWebAuthFlow('frank@heydoctor.com');\n  }\n}\n\n// Now that the client has been authorized, we can call call other methods available in the SDK\nconst visit = await visits.create({\n  code: 'hair-loss',\n});\n\n// Excellent, we've just created our first visit. Now, we can upload photos to that visit.\nawait visit.uploadPhoto('photoId1234', 'base64photostring');\n```\n","readmeFilename":"README.md","gitHead":"973b907dfccbb31e446bf55afaba0bb0f7d33fac","bugs":{"url":"https://github.com/sappira-inc/heydoctor-js/issues"},"homepage":"https://github.com/sappira-inc/heydoctor-js#readme","_id":"heydoctor-js@0.0.0-4369de1","_nodeVersion":"10.17.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-+TXLs+2bQIaNfZR/ieHYadGNI4gYmYiRX4FJNzuUaM3sqhEPefLIc9GzpuVxhNrYJ/NHmYb4sOFdZW1lE/OXgA==","shasum":"cb8dd7799fe303f6a3bd9400e4d5f36b8dc2b731","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-0.0.0-4369de1.tgz","fileCount":35,"unpackedSize":135923,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd8BvRCRA9TVsSAnZWagAAXWwP/2md2OoHlXhX2P5LuFEy\nUbzLsxLgyRFVUHLPTmhkCTzCMPPhykBMf0jlDs71CUDJMlGaIDfeqkhpplww\nBY2xOkWa7Ry/ci/YHhuoaoy8lYvYXlES661x06pilM0g5ryecN+5Ki/5V8LW\nYMWica6c29lKGnDngT07CHa5tBaM7NcqZfbLyzvkdXWS0OVZnKyrX4LhBbMs\nPstR/5ab3KVwipgGjzxUWsAQjQYRFHBruiCpybARDl7xO4taSsS8hXZxaNWQ\nyf1ydFGM3lcF6avjrrNXIWRK53rhlkiZjhEv+BmVJDjIVnFKUhN1Ix/JB0dP\nUn2/DkECLKBXm1qF9lPEW4Qo/UATc7kqkCXbrQbhILbpndmJWgxiV8sNYXKL\nn2SnHAgI8bfdGG2QHqPAhzZ81fNyKqllUqo4pxgFvu0KrFghnef2XFRwnOxg\nmNquUzlqPMHSQLZix6YFGnkNqTzgc6qeIJGrKtiVj2TXp+EIRm3vwsEUEsaC\ndd2wmwMfJdj+CprWCHISoBKUPUQHDfxf56PtlTvtXFP/cZyVu047Rfj3B5hl\nBnPzb7ErhgjrRHL+jSbqVom3gup+CjaGiQ3qaw7Sv8GPvAb0CcnuWQrlMb6R\noL258l2x6uegOv0YCId2ou4EZWOQtWWeidRKa3U0rKbnFHvRzMM6m4BflBSK\nk1S0\r\n=Lu5+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFSTeiI/UcRsidqJv90xYosA7J+jZ26y9/2DkyFUOHLdAiEA3RPpZVzlCKY+Fpy98J8Nz3gCnY+GuW42u7wMu2aLzjs="}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"}],"_npmUser":{"name":"kylealwyn","email":"kjalwyn@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_0.0.0-4369de1_1576016849034_0.9885375212826408"},"_hasShrinkwrap":false},"0.0.0-40f7249":{"name":"heydoctor-js","version":"0.0.0-40f7249","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/sappira-inc/heydoctor-js.git"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"precommit":"lint-staged","bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'npm run build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"npm run docs:build && npm run docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@types/jest":"^24.0.23","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3","snyk":"^1.161.1"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^23.6.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^1.18.4","npm-run-all":"4.1.3","parcel-bundler":"^1.10.3","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"readme":"# HeyDoctor Javascript SDK\n\nThe HeyDoctor Javascript library provides convenient access to the HeyDoctor API for applications written in JavaScript.\n\n## Documentation\nCheck out our [auto-generated docs](https://sappira-inc.github.io/heydoctor-js/) using [TypeDoc](http://typedoc.org).\n\n## Installation\nYou can install `heydoctor-js` using your favorite package manager.\n\n```sh\n$ yarn add heydoctor-js\n# or\n$ npm install --save heydoctor-js\n```\n\n## Usage\nYou'll first need to create a new client resource. If using the HeyDoctor SaaS platform, you'll need to provide the API key located in the EMR. The client contains the http module that will communicate with the HeyDoctor API, so we'll pass this client to the other resources you'll need.\n\n### Creating the client\n\n```js\nimport { Client, Environments, Visits, OAuth } from 'heydoctor-js';\n\n// The client will hold all configuration options and the http module\n// that communicates to our server\nconst client = new Client({\n  env: Environments.SANDBOX | Environments.PRODUCTION, // determines the API and OAuth endpoints\n});\n\n// Create two resources passing both the client we've just created\n// ** Some resources also take an optional options object as a second argument\nconst visits = new Visits(client;\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n  scope: '*',\n});\n```\n\n### Subscribing to HTTP events\nThe HeyDoctor client also doubles as an event emitter. The client extends from [Mitt](https://github.com/developit/mitt) and complies with standard EventEmitter events.\n\n```js\ninterface HttpCallback {\n  statusCode: number;\n  data: any;\n}\n\nconst client = new Client();\n\nclient.on('http:success', (data: HttpCallback) => void);\nclient.on('http:error', (data: HttpCallback) => void);\n```\n\n### Authorizing via OAuth\n\nPartnering clients will use the HeyDoctor JS SDK to create or link a HeyDoctor account. HeyDoctor conforms to the existing [OAuth2 protocol](https://oauth.net/2/). In the case that HeyDoctor already has the provided email on file, the SDK will open a dialog box, akin to Facebook or Google login, prompting the user to confirm their existing password. In all successful cases, an access token and refresh token will be returned. The resulting payload is outlined below.\n\nWe recommend to store the longstanding refresh token in a persisted data store. You’ll use this token, along with your unique client id and secret key to regenerate short lived access tokens used to authenticate requests to the HeyDoctor API. For security measures, the access token has a one hour TTL, after which the token will expire and new access token will need to be generated.\n\nUpon successful authorization, all subsequent SDK calls will be authenticated using the access token. The access token can also be utilized server-side to call our API directly.\n\n#### Example\n\n```js\nimport { Client, OAuth } from 'heydoctor-js';\n\nconst client = new Client({\n  env: 'production',\n});\n\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n});\n\n// First attempt to create a new HeyDoctor user silently. The method will throw an error in the case that the email already exists,\n// in which case you have the opportunity to present an unobtrusive dialog for the user to confirm their existing HeyDoctor password.\ntry {\n  const { accessToken, refreshToken } = await oauth.createUser({\n    email: 'frank@heydoctor.com',\n    firstName: 'Frank',\n    lastName: 'Sinatra',\n    dob: '1915-12-12',\n    gender: 'male',\n    addressLine1: '123 Somewhere Street',\n    city: 'Hoboken',\n    state: 'NJ',\n    zip: '07030',\n  });\n} catch (error) {\n  if (error.code === 'account_exists') {\n    const { accessToken, refreshToken } = await oauth.launchWebAuthFlow('frank@heydoctor.com');\n  }\n}\n\n// Now that the client has been authorized, we can call call other methods available in the SDK\nconst visit = await visits.create({\n  code: 'hair-loss',\n});\n\n// Excellent, we've just created our first visit. Now, we can upload photos to that visit.\nawait visit.uploadPhoto('photoId1234', 'base64photostring');\n```\n","readmeFilename":"README.md","gitHead":"b541b5d5a026a7571ad95bb4d116f36fe18682d3","bugs":{"url":"https://github.com/sappira-inc/heydoctor-js/issues"},"homepage":"https://github.com/sappira-inc/heydoctor-js#readme","_id":"heydoctor-js@0.0.0-40f7249","_nodeVersion":"10.17.0","_npmVersion":"6.11.3","dist":{"integrity":"sha512-8G4IFC/ArbU6ZSTxxf6rMMsPNvvYwPQNpMmqwQ/BhdoSywkeaYgLW8j7lzbUkQSpBSE6HnOyylqotsGOVZCXfA==","shasum":"19730d476df9d49ae2788d554066c56b615c3964","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-0.0.0-40f7249.tgz","fileCount":37,"unpackedSize":140275,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd8DqlCRA9TVsSAnZWagAAWqYP/3mxhpaROSE8Ix1fuVrA\nL4re68qrSpl7PG2oNUEXJb2iIU7ZJUySeTNkRJvSsuS5KX4g1CH/k0MF11Y1\nCZ/A8FhqqCKHSkzvmXSPjM142zznxXAP3mH14ZssqdGcUOsMUB/54C3ymbYB\nUryWwzhT0tbGr1qCLBILMOGpNr7ISUgrshvwLYKD093wiwEgufQ5OwjUd0wC\n7zDSmAK1bUYe5T+WA+32RphNgn4j6ICmbE057x0INd3m8f/KbKIN9ZnGUy14\nfejyYJu5d0xKVrRoi/4g7siSUBiv8HNsyluGXVo4XGkP/GD6ZgYzhMQJRiut\nBbst5B2PD9RcElhZV5FCGZ4coCruH4Y8Wt1eRF+3ikjYUkWANF3VzcmYsyrR\n2k1dVKiOtoWQHf3+v07t4SAdHJMuASoVta/0/RW3j7ZGHrJZG4Jnmm8BbDTW\ndit7pqvskINxSUAIEXmGyKRtlWPOCEfUSpCx+NAyel7iL7236tby2x83nYHA\nEuVVmbOtLxtHkgDGJcPqVcGycGpzXWT/hWzOhCa7dKpR7waFP4QHClNdWlRq\ndGddlPFcUA8FJdKku5FKr3aaepG9kEsGTtuxI73BcxLuHQI0NcUsrBDgFsDK\nLaf4IqCyloLerYqPDoPOzkf0lK6ekuTGqyFTDfw/dY758po0miaYSbLuGssq\nX6yx\r\n=WVAe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGm+QfWKezP5GwkJlR5KZiFzDEr+bEM1uG8E/7gthqhKAiEAiWllpkjGwsrRAPPahUCmNEowqRJqkUwnH0PD0r7luos="}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"}],"_npmUser":{"name":"kylealwyn","email":"kjalwyn@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_0.0.0-40f7249_1576024740636_0.0400683532163264"},"_hasShrinkwrap":false},"3.3.1":{"name":"heydoctor-js","version":"3.3.1","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/sappira-inc/heydoctor-js.git"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'npm run build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"npm run docs:build && npm run docs:deploy"},"dependencies":{"@types/jest":"^24.0.23","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3","snyk":"^1.161.1"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^23.6.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^1.18.4","npm-run-all":"4.1.3","parcel-bundler":"^1.10.3","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"gitHead":"e0d7bb09630cb5617267b1971792115b873b17bd","bugs":{"url":"https://github.com/sappira-inc/heydoctor-js/issues"},"homepage":"https://github.com/sappira-inc/heydoctor-js#readme","_id":"heydoctor-js@3.3.1","_nodeVersion":"10.12.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-weS5Z8LkX6FDVf70d1XAHxa16Iv7SQZdaAdCm0vzYBFqTF2gmlzIK1MBq3+/CKurw7F+wmnE7DsTlzZ8vqL2wg==","shasum":"26fc948ea43b36b0c0446c5f4e08a10d3c4cad45","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-3.3.1.tgz","fileCount":30,"unpackedSize":116552,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeE8RRCRA9TVsSAnZWagAAMv4QAJZnpzbreMCFmvGjd6/T\nWk+1kk9LY/ozZ0GDdvD+hfRSHqq7LLZqy9fOXvrnIWObQmpCKussJpN3BX9K\nUCeKyOT4YmjoDL0VLI1Vdo7+oUbDq/GPF7qPRFfJGRUp8mgdR19zILa5UzXt\n1IWbd3cSoHBWvfYWR6hNq7fpkeUrPJRpIyU6H01GZIlUNdbjNS8sv/6zmrkW\nJHgo9kPSIKXSUnsl4/ejsY8IQBA87t/OoUA/6yqHrcNn4lNJGnznIcCUOQ0e\nKKr+nnybE2pcuU6D9uoRoI1g5NooC9ANIJNXTh8LgypfNjly6IbJ6iEyl6wr\nr2LTEE5llcnRkWj5Q5qYF4g5N5iYSZ4AapAKMVfYIYVnrrD3hREh0xh0YA4s\nECYAZUEPHVZ9WX3gWApQD8ByGoTNX3F9vWGRw+jimTk/jwKIZqTENtm577aw\nNXYHDgADwqO9sYspgKyo7vNBB8NDVFhNuzlwMOnkGwrDki8twKVLEyrSSSCG\nGKTB5JuDsB5eh3QWB2oJK8xUwKSbNvmrLKZVJnK3sQRk7NL9Y6wjLb9wHaIi\nef0jdlW6BU7UFhjnkm3LYH38cbyYfoSIvCI4h+Xuqag0ayZ/Lh+j+B2gAUUw\n9f1ka21n56IV9sJr2yeuRusaf7VMmOKGhDe/y2YjYYvn5H9b3wr1L47XAcx0\n6su5\r\n=gPUf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDaofNJ+jelu0OgLqt1XGxWDfrxENJeM262QmNpMx4rbAiAudwP3fYEZBlPH+cPNpcoZhJSht/aSzx+c+grx3E3r8w=="}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"}],"_npmUser":{"name":"erikshestopal","email":"shestopalerik@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_3.3.1_1578353744617_0.5149392547077465"},"_hasShrinkwrap":false},"3.4.0":{"name":"heydoctor-js","version":"3.4.0","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/sappira-inc/heydoctor-js.git"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'npm run build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"npm run docs:build && npm run docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"0.0.4","@types/jest":"^24.0.23","axios":"0.19.2","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3","snyk":"^1.161.1"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@rollup/plugin-multi-entry":"^3.0.0","@rollup/plugin-replace":"^2.2.1","@types/faker":"^4.1.11","@types/lodash":"^4.14.117","@wessberg/rollup-plugin-ts":"^1.2.19","babel-core":"7.0.0-bridge.0","babel-plugin-module-resolver":"^3.1.3","cross-env":"5.2.0","enzyme":"3.7.0","eslint-config-heydoctor":"^3.0.0","eslint-import-resolver-babel-module":"^5.0.1","faker":"^4.1.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^24.9.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^1.18.4","npm-run-all":"4.1.3","parcel-bundler":"^1.10.3","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"^1.32.0","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"^6.2.1","rollup-plugin-terser":"^5.1.2","standard-version":"4.4.0","ts-jest":"^24.1.0","tslib":"^1.10.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.8.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"readme":"# HeyDoctor Javascript SDK\n\nThe HeyDoctor Javascript library provides convenient access to the HeyDoctor API for applications written in JavaScript.\n\n## Documentation\nCheck out our [auto-generated docs](https://sappira-inc.github.io/heydoctor-js/) using [TypeDoc](http://typedoc.org).\n\n## Installation\nYou can install `heydoctor-js` using your favorite package manager.\n\n```sh\n$ yarn add heydoctor-js\n# or\n$ npm install --save heydoctor-js\n```\n\n## Usage\nYou'll first need to create a new client resource. If using the HeyDoctor SaaS platform, you'll need to provide the API key located in the EMR. The client contains the http module that will communicate with the HeyDoctor API, so we'll pass this client to the other resources you'll need.\n\n### Creating the client\n\n```js\nimport { Client, Environments, Visits, OAuth } from 'heydoctor-js';\n\n// The client will hold all configuration options and the http module\n// that communicates to our server\nconst client = new Client({\n  env: Environments.SANDBOX | Environments.PRODUCTION, // determines the API and OAuth endpoints\n});\n\n// Create two resources passing both the client we've just created\n// ** Some resources also take an optional options object as a second argument\nconst visits = new Visits(client;\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n  scope: '*',\n});\n```\n\n### Subscribing to HTTP events\nThe HeyDoctor client also doubles as an event emitter. The client extends from [Mitt](https://github.com/developit/mitt) and complies with standard EventEmitter events.\n\n```js\ninterface HttpCallback {\n  statusCode: number;\n  data: any;\n}\n\nconst client = new Client();\n\nclient.on('http:success', (data: HttpCallback) => void);\nclient.on('http:error', (data: HttpCallback) => void);\n```\n\n### Authorizing via OAuth\n\nPartnering clients will use the HeyDoctor JS SDK to create or link a HeyDoctor account. HeyDoctor conforms to the existing [OAuth2 protocol](https://oauth.net/2/). In the case that HeyDoctor already has the provided email on file, the SDK will open a dialog box, akin to Facebook or Google login, prompting the user to confirm their existing password. In all successful cases, an access token and refresh token will be returned. The resulting payload is outlined below.\n\nWe recommend to store the longstanding refresh token in a persisted data store. You’ll use this token, along with your unique client id and secret key to regenerate short lived access tokens used to authenticate requests to the HeyDoctor API. For security measures, the access token has a one hour TTL, after which the token will expire and new access token will need to be generated.\n\nUpon successful authorization, all subsequent SDK calls will be authenticated using the access token. The access token can also be utilized server-side to call our API directly.\n\n#### Example\n\n```js\nimport { Client, OAuth } from 'heydoctor-js';\n\nconst client = new Client({\n  env: 'production',\n});\n\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n});\n\n// First attempt to create a new HeyDoctor user silently. The method will throw an error in the case that the email already exists,\n// in which case you have the opportunity to present an unobtrusive dialog for the user to confirm their existing HeyDoctor password.\ntry {\n  const { accessToken, refreshToken } = await oauth.createUser({\n    email: 'frank@heydoctor.com',\n    firstName: 'Frank',\n    lastName: 'Sinatra',\n    dob: '1915-12-12',\n    gender: 'male',\n    addressLine1: '123 Somewhere Street',\n    city: 'Hoboken',\n    state: 'NJ',\n    zip: '07030',\n  });\n} catch (error) {\n  if (error.code === 'account_exists') {\n    const { accessToken, refreshToken } = await oauth.launchWebAuthFlow('frank@heydoctor.com');\n  }\n}\n\n// Now that the client has been authorized, we can call call other methods available in the SDK\nconst visit = await visits.create({\n  code: 'hair-loss',\n});\n\n// Excellent, we've just created our first visit. Now, we can upload photos to that visit.\nawait visit.uploadPhoto('photoId1234', 'base64photostring');\n```\n","readmeFilename":"README.md","gitHead":"9c395d1cc08e0f77b81ba3ccab6b00c80d46d78e","bugs":{"url":"https://github.com/sappira-inc/heydoctor-js/issues"},"homepage":"https://github.com/sappira-inc/heydoctor-js#readme","_id":"heydoctor-js@3.4.0","_nodeVersion":"12.16.1","_npmVersion":"6.13.4","dist":{"integrity":"sha512-YNem0R65clLQPgYnjgkjTD6TKreGNQnTD4gXcPZTmB3CwiXicWUfx5THJ1frU9Xvw1uelye1FCy3mhQzPrTmsg==","shasum":"e0a0975a15924343d02fb17ceb761411792d0ec3","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-3.4.0.tgz","fileCount":8,"unpackedSize":59914,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJelOERCRA9TVsSAnZWagAAL7cP/i7fnFh8+QiLHonanM8N\naFXwye4EEK5+/D2ZUzg6I2tJi6dK7j/kEZm1vW5wwK2jn9e5yakJnHpIXGXb\njyYud1MMuL3By3fwfoeBj7icF7j7CSD6lj3ZfU/lLlFO++pYwmNpJa5tNqAW\nM2+9GGk49yMAGA1R76Vm/acGJPRwv2TnNPa+1NBm4GQwIpkEZ4PJ9Q4E3t3+\nB0/NaPRrB8sSyVWqlSuxQ/81LxT1TKG9Qhk4RROqbw3b0qJXngON1oNBMbmG\nn0DUHNwUH/i42UZJroihsb22I/Bg2Pps6NlXlY3pEuye2ZNQNzRr37ZJVoBX\nxuv8yqr6OFQsUCjI14wJk04B8EKEzX1QnFkLYX5bJ5NHgq5D+gfFGI6AST58\nRJgFULeG/dYQhTR3K44YiZiLevHoE0tlSQKXrB+TyDTvmjZJeOvaKUbc8RC2\nzcNUGb1WPtzyAC4NTZCYcpI7dsm+nw0Vk6LfJNQ0YVik1MAuyE/rS8RnYvg5\n11/LET5EGhQizeuwKePkcuiWyHJD2q8ru8sDRxCMIGAG4txhvYsb7fOTXyDV\n1NWWoHWvghdsfwRDtDVoP+uZevS6WKXT9y5m+yudAaeSpf35zju/qaylNoCU\nk7+l8bvVAxLGPFeetRRuohmO+J/tPx6Tm7RuPI8dTxejF0sl830IAoleZj7O\nt3lo\r\n=Sng/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCZebk5Zd3LGQV72Dky/O7wE4k1SD3DsMHiOzVQGN1pjQIgNr0sDtFxiXbcV2nREKJFXZE0ReJLz54CBpL9gSYFihM="}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"schlegz76@gmail.com","name":"schlegz"}],"_npmUser":{"name":"schlegz","email":"schlegz76@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_3.4.0_1586815248840_0.5681758696418866"},"_hasShrinkwrap":false},"3.4.0-prerelease":{"name":"heydoctor-js","version":"3.4.0-prerelease","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/sappira-inc/heydoctor-js.git"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'npm run build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"npm run docs:build && npm run docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"0.0.5","@types/jest":"^24.0.23","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3","snyk":"^1.161.1"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@rollup/plugin-multi-entry":"^3.0.0","@rollup/plugin-replace":"^2.2.1","@types/faker":"^4.1.11","@types/lodash":"^4.14.117","@wessberg/rollup-plugin-ts":"^1.2.19","babel-core":"7.0.0-bridge.0","babel-plugin-module-resolver":"^3.1.3","cross-env":"5.2.0","enzyme":"3.7.0","eslint-config-heydoctor":"^3.0.0","eslint-import-resolver-babel-module":"^5.0.1","faker":"^4.1.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^24.3.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^1.18.4","npm-run-all":"4.1.3","parcel-bundler":"^1.10.3","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"^1.32.0","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"^6.2.1","rollup-plugin-terser":"^5.1.2","standard-version":"4.4.0","ts-jest":"^24.1.0","tslib":"^1.10.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.8.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"readme":"# HeyDoctor Javascript SDK\n\nThe HeyDoctor Javascript library provides convenient access to the HeyDoctor API for applications written in JavaScript.\n\n## Documentation\nCheck out our [auto-generated docs](https://sappira-inc.github.io/heydoctor-js/) using [TypeDoc](http://typedoc.org).\n\n## Installation\nYou can install `heydoctor-js` using your favorite package manager.\n\n```sh\n$ yarn add heydoctor-js\n# or\n$ npm install --save heydoctor-js\n```\n\n## Usage\nYou'll first need to create a new client resource. If using the HeyDoctor SaaS platform, you'll need to provide the API key located in the EMR. The client contains the http module that will communicate with the HeyDoctor API, so we'll pass this client to the other resources you'll need.\n\n### Creating the client\n\n```js\nimport { Client, Environments, Visits, OAuth } from 'heydoctor-js';\n\n// The client will hold all configuration options and the http module\n// that communicates to our server\nconst client = new Client({\n  env: Environments.SANDBOX | Environments.PRODUCTION, // determines the API and OAuth endpoints\n});\n\n// Create two resources passing both the client we've just created\n// ** Some resources also take an optional options object as a second argument\nconst visits = new Visits(client;\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n  scope: '*',\n});\n```\n\n### Subscribing to HTTP events\nThe HeyDoctor client also doubles as an event emitter. The client extends from [Mitt](https://github.com/developit/mitt) and complies with standard EventEmitter events.\n\n```js\ninterface HttpCallback {\n  statusCode: number;\n  data: any;\n}\n\nconst client = new Client();\n\nclient.on('http:success', (data: HttpCallback) => void);\nclient.on('http:error', (data: HttpCallback) => void);\n```\n\n### Authorizing via OAuth\n\nPartnering clients will use the HeyDoctor JS SDK to create or link a HeyDoctor account. HeyDoctor conforms to the existing [OAuth2 protocol](https://oauth.net/2/). In the case that HeyDoctor already has the provided email on file, the SDK will open a dialog box, akin to Facebook or Google login, prompting the user to confirm their existing password. In all successful cases, an access token and refresh token will be returned. The resulting payload is outlined below.\n\nWe recommend to store the longstanding refresh token in a persisted data store. You’ll use this token, along with your unique client id and secret key to regenerate short lived access tokens used to authenticate requests to the HeyDoctor API. For security measures, the access token has a one hour TTL, after which the token will expire and new access token will need to be generated.\n\nUpon successful authorization, all subsequent SDK calls will be authenticated using the access token. The access token can also be utilized server-side to call our API directly.\n\n#### Example\n\n```js\nimport { Client, OAuth } from 'heydoctor-js';\n\nconst client = new Client({\n  env: 'production',\n});\n\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n});\n\n// First attempt to create a new HeyDoctor user silently. The method will throw an error in the case that the email already exists,\n// in which case you have the opportunity to present an unobtrusive dialog for the user to confirm their existing HeyDoctor password.\ntry {\n  const { accessToken, refreshToken } = await oauth.createUser({\n    email: 'frank@heydoctor.com',\n    firstName: 'Frank',\n    lastName: 'Sinatra',\n    dob: '1915-12-12',\n    gender: 'male',\n    addressLine1: '123 Somewhere Street',\n    city: 'Hoboken',\n    state: 'NJ',\n    zip: '07030',\n  });\n} catch (error) {\n  if (error.code === 'account_exists') {\n    const { accessToken, refreshToken } = await oauth.launchWebAuthFlow('frank@heydoctor.com');\n  }\n}\n\n// Now that the client has been authorized, we can call call other methods available in the SDK\nconst visit = await visits.create({\n  code: 'hair-loss',\n});\n\n// Excellent, we've just created our first visit. Now, we can upload photos to that visit.\nawait visit.uploadPhoto('photoId1234', 'base64photostring');\n```\n","readmeFilename":"README.md","gitHead":"96dd2168c37ad4ac0aac2c7c1dcaa867c2eeaf1e","bugs":{"url":"https://github.com/sappira-inc/heydoctor-js/issues"},"homepage":"https://github.com/sappira-inc/heydoctor-js#readme","_id":"heydoctor-js@3.4.0-prerelease","_nodeVersion":"10.17.0","_npmVersion":"6.14.2","dist":{"integrity":"sha512-wY4T1HE4fGZmFy9ZGoCWdtNmM4no2CsR7Xp5ub1Qw6B4HxbWvxh2ZjosnbpVNaBya04g+OOMoZA5rK4E/aGI3w==","shasum":"ac9fabea3926fc4ee6bf40daf84f38dd5941216e","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-3.4.0-prerelease.tgz","fileCount":8,"unpackedSize":59763,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJelRCqCRA9TVsSAnZWagAAOw4P/21f8zI3CO30BzsIrdPD\ni7mLCGd2GjPA9c5y1UYOoap0sDSttezBkTXVdW/VZn62276KSUr0Rf8I+Q5F\nFOaw/t3N//650mvPlLq6bS/IYurrHeJQvwiNf8mh8pdsGZxR3i1eHSSE2tID\no8T0DbIqmfVzmP+dQkb0eX4DN9eU/xm+BwY/xjOUjhc1PMkB/S/nk6Gl1hru\nJwRn8nWSzYHFD5XIds+EMv7UDW9cwBKSNwMlkd4DW0WxyzIghaGqGDT/9Mhs\nqqwv/YQ98gZ6JJcqBcGxU07+ctIWBfwjftuak31vwo3yAPL3SmDIk2JGBH6C\nHfaqbWWjQb6hYEbKuhOnKYIELcG9E2/qE1o00YdtWbKHcMYeRw4YixsbF+Xe\nwgHgvUnnfyKkvm5YNmtUPOjDxJ8CJZJ7O664EmLR0Ai6iRVdqE4E8K0G0Ldt\n9j7sZcO95cd1TQg/TAhqrtwJuyNZyto6oDl3pm9/xpQH72VgZ56+UgqekKeQ\nEa9VwNCHrrZxco1gNg4QKlk2/LkmiZYCkiyvGNt5VhrsmYWvsrdOsI840Oe3\nQduQM//6p7mO6LNtBiEcHm9xRySazsB9lj0bEASkgzFO6reEFt56ofoRhV5U\nZzauDfV3Cl3bROjF0isQiUS1zl8rQWiRkpO5ILQWl564nR07Uxx6YBTHJ0UR\nQwrt\r\n=ObCC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHAIvc/nqZWqBJoq/Zy+WG26I4k5ZBQtica6Sfx2Yu8pAiA0fyRUrbZ6GjwLhqmD/7ReayWqx7/tTUAY3AmpkqrzCw=="}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"schlegz76@gmail.com","name":"schlegz"}],"_npmUser":{"name":"schlegz","email":"schlegz76@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_3.4.0-prerelease_1586827434320_0.32580683985084513"},"_hasShrinkwrap":false},"3.4.0-4319646":{"name":"heydoctor-js","version":"3.4.0-4319646","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/sappira-inc/heydoctor-js.git"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'npm run build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"npm run docs:build && npm run docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"0.0.5","@types/jest":"^24.0.23","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3","snyk":"^1.161.1"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@rollup/plugin-multi-entry":"^3.0.0","@rollup/plugin-replace":"^2.2.1","@types/faker":"^4.1.11","@types/lodash":"^4.14.117","@wessberg/rollup-plugin-ts":"^1.2.19","babel-core":"7.0.0-bridge.0","babel-plugin-module-resolver":"^3.1.3","cross-env":"5.2.0","enzyme":"3.7.0","eslint-config-heydoctor":"^3.0.0","eslint-import-resolver-babel-module":"^5.0.1","faker":"^4.1.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^24.3.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^1.18.4","npm-run-all":"4.1.3","parcel-bundler":"^1.10.3","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"^1.32.0","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"^6.2.1","rollup-plugin-terser":"^5.1.2","standard-version":"4.4.0","ts-jest":"^24.1.0","tslib":"^1.10.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.8.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"readme":"# HeyDoctor Javascript SDK\n\nThe HeyDoctor Javascript library provides convenient access to the HeyDoctor API for applications written in JavaScript.\n\n## Documentation\nCheck out our [auto-generated docs](https://sappira-inc.github.io/heydoctor-js/) using [TypeDoc](http://typedoc.org).\n\n## Installation\nYou can install `heydoctor-js` using your favorite package manager.\n\n```sh\n$ yarn add heydoctor-js\n# or\n$ npm install --save heydoctor-js\n```\n\n## Usage\nYou'll first need to create a new client resource. If using the HeyDoctor SaaS platform, you'll need to provide the API key located in the EMR. The client contains the http module that will communicate with the HeyDoctor API, so we'll pass this client to the other resources you'll need.\n\n### Creating the client\n\n```js\nimport { Client, Environments, Visits, OAuth } from 'heydoctor-js';\n\n// The client will hold all configuration options and the http module\n// that communicates to our server\nconst client = new Client({\n  env: Environments.SANDBOX | Environments.PRODUCTION, // determines the API and OAuth endpoints\n});\n\n// Create two resources passing both the client we've just created\n// ** Some resources also take an optional options object as a second argument\nconst visits = new Visits(client;\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n  scope: '*',\n});\n```\n\n### Subscribing to HTTP events\nThe HeyDoctor client also doubles as an event emitter. The client extends from [Mitt](https://github.com/developit/mitt) and complies with standard EventEmitter events.\n\n```js\ninterface HttpCallback {\n  statusCode: number;\n  data: any;\n}\n\nconst client = new Client();\n\nclient.on('http:success', (data: HttpCallback) => void);\nclient.on('http:error', (data: HttpCallback) => void);\n```\n\n### Authorizing via OAuth\n\nPartnering clients will use the HeyDoctor JS SDK to create or link a HeyDoctor account. HeyDoctor conforms to the existing [OAuth2 protocol](https://oauth.net/2/). In the case that HeyDoctor already has the provided email on file, the SDK will open a dialog box, akin to Facebook or Google login, prompting the user to confirm their existing password. In all successful cases, an access token and refresh token will be returned. The resulting payload is outlined below.\n\nWe recommend to store the longstanding refresh token in a persisted data store. You’ll use this token, along with your unique client id and secret key to regenerate short lived access tokens used to authenticate requests to the HeyDoctor API. For security measures, the access token has a one hour TTL, after which the token will expire and new access token will need to be generated.\n\nUpon successful authorization, all subsequent SDK calls will be authenticated using the access token. The access token can also be utilized server-side to call our API directly.\n\n#### Example\n\n```js\nimport { Client, OAuth } from 'heydoctor-js';\n\nconst client = new Client({\n  env: 'production',\n});\n\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n});\n\n// First attempt to create a new HeyDoctor user silently. The method will throw an error in the case that the email already exists,\n// in which case you have the opportunity to present an unobtrusive dialog for the user to confirm their existing HeyDoctor password.\ntry {\n  const { accessToken, refreshToken } = await oauth.createUser({\n    email: 'frank@heydoctor.com',\n    firstName: 'Frank',\n    lastName: 'Sinatra',\n    dob: '1915-12-12',\n    gender: 'male',\n    addressLine1: '123 Somewhere Street',\n    city: 'Hoboken',\n    state: 'NJ',\n    zip: '07030',\n  });\n} catch (error) {\n  if (error.code === 'account_exists') {\n    const { accessToken, refreshToken } = await oauth.launchWebAuthFlow('frank@heydoctor.com');\n  }\n}\n\n// Now that the client has been authorized, we can call call other methods available in the SDK\nconst visit = await visits.create({\n  code: 'hair-loss',\n});\n\n// Excellent, we've just created our first visit. Now, we can upload photos to that visit.\nawait visit.uploadPhoto('photoId1234', 'base64photostring');\n```\n","readmeFilename":"README.md","gitHead":"6015f2f97cea3e24a60ee3ba70cbbbe4d00ebcef","bugs":{"url":"https://github.com/sappira-inc/heydoctor-js/issues"},"homepage":"https://github.com/sappira-inc/heydoctor-js#readme","_id":"heydoctor-js@3.4.0-4319646","_nodeVersion":"10.17.0","_npmVersion":"6.14.2","dist":{"integrity":"sha512-K3aUF4vGJn0bTifuAioGFIr/T2FqeDfHztp7OtTfIzUoPNGAKUM+KeAxpqwxCn9Ws/GYJviF5txbYMfct3/UaA==","shasum":"5fbe909a4046867b56d419e0fe031cb726464094","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-3.4.0-4319646.tgz","fileCount":8,"unpackedSize":59760,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJelRT2CRA9TVsSAnZWagAAnp8P/32v4E9AK5kzQh26fM8I\nTpayiHO8et4zPXBFt30DJbROQQYFvX3N0DhduEwkbrMB5gtCZnu2JxNR8ap3\nw52ljgKjhGmB2pa0R/aXjQL96izaRBmORZH/RXqE9zvnht9W2ROxINYpWNHM\n+HQERA6tailNkltikNkDNPTmORcqtEHGx890VCkFjJ8C03MTYfzeodvR+GDU\niB+AkWNwLlQJb1DW49GKSW5stOlOC3N82+5+5ewy7gAS7MYkC0DJ0lR1TbAD\nTVo6LDQ2Cyc+frVycazewPCz4HOabxwkTambOuH42wbQ/VL7f7/Z1gYNaLGc\nCp5SnY4Oss0GQp22mtT0nME3usms/G11vkAsm7Crv6TROFDKLdnQrQlTJyBG\nAmEv0OvIMvra/enMBtxoHd47FaylF7w1OWqTTQBHGvKT24HG5V7IDlSSwElQ\nW9zO4KjXT/p4SKMU+pEZFwMk/tRDOm/3790QM2dZF0UJfAqonHD6g37buan1\nujGCL/t/uJOInOFbDs90Y8DRtr6pCnJot1RKj63CmTmfUU4M736rBAULculv\nzufkCeA5ZbOrgM/mdgR1LjzC3rbbZ0KcSs2MITx0u9eat3Cqw6jywQJ9zJ9q\n7B0XyszTBeVcJ7On0nN/8MAFTK3JY/5nF2Ib08nCOvCbk4HUCMRRn6rqLNxb\nGdjo\r\n=cQyp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEXo7spIYW8L+EqH2nfJ+cFr/xSTiogDu/c7BVzzcqa5AiB5uJiTX2SdE9RbfQ/Rg50/bxmPG0QSAHxnV7forK2w1g=="}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"schlegz76@gmail.com","name":"schlegz"}],"_npmUser":{"name":"schlegz","email":"schlegz76@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_3.4.0-4319646_1586828534338_0.029614599634698813"},"_hasShrinkwrap":false},"3.4.0-dceb998":{"name":"heydoctor-js","version":"3.4.0-dceb998","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/sappira-inc/heydoctor-js.git"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'npm run build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"npm run docs:build && npm run docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"0.0.5","@types/jest":"^24.0.23","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3","snyk":"^1.161.1"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^23.6.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^1.18.4","npm-run-all":"4.1.3","parcel-bundler":"^1.10.3","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"readme":"# HeyDoctor Javascript SDK\n\nThe HeyDoctor Javascript library provides convenient access to the HeyDoctor API for applications written in JavaScript.\n\n## Documentation\nCheck out our [auto-generated docs](https://sappira-inc.github.io/heydoctor-js/) using [TypeDoc](http://typedoc.org).\n\n## Installation\nYou can install `heydoctor-js` using your favorite package manager.\n\n```sh\n$ yarn add heydoctor-js\n# or\n$ npm install --save heydoctor-js\n```\n\n## Usage\nYou'll first need to create a new client resource. If using the HeyDoctor SaaS platform, you'll need to provide the API key located in the EMR. The client contains the http module that will communicate with the HeyDoctor API, so we'll pass this client to the other resources you'll need.\n\n### Creating the client\n\n```js\nimport { Client, Environments, Visits, OAuth } from 'heydoctor-js';\n\n// The client will hold all configuration options and the http module\n// that communicates to our server\nconst client = new Client({\n  env: Environments.SANDBOX | Environments.PRODUCTION, // determines the API and OAuth endpoints\n});\n\n// Create two resources passing both the client we've just created\n// ** Some resources also take an optional options object as a second argument\nconst visits = new Visits(client;\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n  scope: '*',\n});\n```\n\n### Subscribing to HTTP events\nThe HeyDoctor client also doubles as an event emitter. The client extends from [Mitt](https://github.com/developit/mitt) and complies with standard EventEmitter events.\n\n```js\ninterface HttpCallback {\n  statusCode: number;\n  data: any;\n}\n\nconst client = new Client();\n\nclient.on('http:success', (data: HttpCallback) => void);\nclient.on('http:error', (data: HttpCallback) => void);\n```\n\n### Authorizing via OAuth\n\nPartnering clients will use the HeyDoctor JS SDK to create or link a HeyDoctor account. HeyDoctor conforms to the existing [OAuth2 protocol](https://oauth.net/2/). In the case that HeyDoctor already has the provided email on file, the SDK will open a dialog box, akin to Facebook or Google login, prompting the user to confirm their existing password. In all successful cases, an access token and refresh token will be returned. The resulting payload is outlined below.\n\nWe recommend to store the longstanding refresh token in a persisted data store. You’ll use this token, along with your unique client id and secret key to regenerate short lived access tokens used to authenticate requests to the HeyDoctor API. For security measures, the access token has a one hour TTL, after which the token will expire and new access token will need to be generated.\n\nUpon successful authorization, all subsequent SDK calls will be authenticated using the access token. The access token can also be utilized server-side to call our API directly.\n\n#### Example\n\n```js\nimport { Client, OAuth } from 'heydoctor-js';\n\nconst client = new Client({\n  env: 'production',\n});\n\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n});\n\n// First attempt to create a new HeyDoctor user silently. The method will throw an error in the case that the email already exists,\n// in which case you have the opportunity to present an unobtrusive dialog for the user to confirm their existing HeyDoctor password.\ntry {\n  const { accessToken, refreshToken } = await oauth.createUser({\n    email: 'frank@heydoctor.com',\n    firstName: 'Frank',\n    lastName: 'Sinatra',\n    dob: '1915-12-12',\n    gender: 'male',\n    addressLine1: '123 Somewhere Street',\n    city: 'Hoboken',\n    state: 'NJ',\n    zip: '07030',\n  });\n} catch (error) {\n  if (error.code === 'account_exists') {\n    const { accessToken, refreshToken } = await oauth.launchWebAuthFlow('frank@heydoctor.com');\n  }\n}\n\n// Now that the client has been authorized, we can call call other methods available in the SDK\nconst visit = await visits.create({\n  code: 'hair-loss',\n});\n\n// Excellent, we've just created our first visit. Now, we can upload photos to that visit.\nawait visit.uploadPhoto('photoId1234', 'base64photostring');\n```\n","readmeFilename":"README.md","gitHead":"4b7652537102ed4972dac20722705665b9fe9399","bugs":{"url":"https://github.com/sappira-inc/heydoctor-js/issues"},"homepage":"https://github.com/sappira-inc/heydoctor-js#readme","_id":"heydoctor-js@3.4.0-dceb998","_nodeVersion":"10.17.0","_npmVersion":"6.14.2","dist":{"integrity":"sha512-WgvtU5gLRJ8V5CYzEHXyneeHMBnWNret1a1abc8Ip0ol24OiqwInw9SuvQYeFPhRi1KQbOxxiFdK7RDo62wOKw==","shasum":"78c8b0be23c6c8e85319472bb659313cd91d8d2a","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-3.4.0-dceb998.tgz","fileCount":44,"unpackedSize":148207,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJelSElCRA9TVsSAnZWagAAos8P/3dpf0niKnwMsTZOqBlq\ndKIEuhiAOI30W87Lxh13TBVvx4Zl64UjMOIBmpw79bYzeGvV4M02poa3nbe4\nnzv/o35vh+ykfwWbwfUChdMqV7SeCkPlYA7lEI9G9qzfXwBkjKkkuMNsgKyE\nzpExRknxXfj+R/HX2dKJ2jASMg8xOmAQawR/plqWPlNScQ96IRPrvc+LLjH7\nPIrSifPP2T2qW7o7/jB17tEO3+z6LxZFt1HpiXEHSRMtbV1i5BNKTUmesYYZ\neTn8g7/x9r+QfOLEXntMIa7pwC6d/XAeIFLfkMURZr3POSvUImQ4XeUSJ0Gb\n1PXV02FX7YJWgv54ZVtZGjxbRtr3jZJDVrIYutvKcnW9C3jrtMBxN6hvNJV0\njZoC6XEmeGtnRS8zd1JzFAzC4LIatLZAVk/TRc+Myxcshax0xrk0p15KAlyS\nroOyS6C8kZ0BuVmhwovy+JzR1qn2MtQm0qOLooPnsIQrlukPtUiGk+Y0yB+g\nWJ+qGZfdCk6KBfDOXCkrce2mVClcobA2IogpY1gYjB4tycxqpawb7ANSKAlK\n9nSboKnkoAV380tLBB09PIsASxX0X4Bp9a+jMi3Vvl5rp9wBaQ2eX5S97HKz\nzpPba6FUZnrWWFqRSCJOIUe7kzhnSuzO6e2azrWR8OuA5wsTX9FblCy6NSdX\niA4/\r\n=IJ6/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDxMxW/VDruHkDz3GDqX91QpQk7brooUHBjVBqkqoLCtAIgSOFwtfckTMFIbrBCpKgWwO33PobQ0sCUGAvPbV1/AbY="}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"schlegz76@gmail.com","name":"schlegz"}],"_npmUser":{"name":"schlegz","email":"schlegz76@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_3.4.0-dceb998_1586831653201_0.8029659890738661"},"_hasShrinkwrap":false},"3.4.0-c45b5c7":{"name":"heydoctor-js","version":"3.4.0-c45b5c7","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/sappira-inc/heydoctor-js.git"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'npm run build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"npm run docs:build && npm run docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"0.0.5","@types/jest":"^24.0.23","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^23.6.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^1.18.4","npm-run-all":"4.1.3","parcel-bundler":"^1.10.3","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"readme":"# HeyDoctor Javascript SDK\n\nThe HeyDoctor Javascript library provides convenient access to the HeyDoctor API for applications written in JavaScript.\n\n## Documentation\nCheck out our [auto-generated docs](https://sappira-inc.github.io/heydoctor-js/) using [TypeDoc](http://typedoc.org).\n\n## Installation\nYou can install `heydoctor-js` using your favorite package manager.\n\n```sh\n$ yarn add heydoctor-js\n# or\n$ npm install --save heydoctor-js\n```\n\n## Usage\nYou'll first need to create a new client resource. If using the HeyDoctor SaaS platform, you'll need to provide the API key located in the EMR. The client contains the http module that will communicate with the HeyDoctor API, so we'll pass this client to the other resources you'll need.\n\n### Creating the client\n\n```js\nimport { Client, Environments, Visits, OAuth } from 'heydoctor-js';\n\n// The client will hold all configuration options and the http module\n// that communicates to our server\nconst client = new Client({\n  env: Environments.SANDBOX | Environments.PRODUCTION, // determines the API and OAuth endpoints\n});\n\n// Create two resources passing both the client we've just created\n// ** Some resources also take an optional options object as a second argument\nconst visits = new Visits(client;\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n  scope: '*',\n});\n```\n\n### Subscribing to HTTP events\nThe HeyDoctor client also doubles as an event emitter. The client extends from [Mitt](https://github.com/developit/mitt) and complies with standard EventEmitter events.\n\n```js\ninterface HttpCallback {\n  statusCode: number;\n  data: any;\n}\n\nconst client = new Client();\n\nclient.on('http:success', (data: HttpCallback) => void);\nclient.on('http:error', (data: HttpCallback) => void);\n```\n\n### Authorizing via OAuth\n\nPartnering clients will use the HeyDoctor JS SDK to create or link a HeyDoctor account. HeyDoctor conforms to the existing [OAuth2 protocol](https://oauth.net/2/). In the case that HeyDoctor already has the provided email on file, the SDK will open a dialog box, akin to Facebook or Google login, prompting the user to confirm their existing password. In all successful cases, an access token and refresh token will be returned. The resulting payload is outlined below.\n\nWe recommend to store the longstanding refresh token in a persisted data store. You’ll use this token, along with your unique client id and secret key to regenerate short lived access tokens used to authenticate requests to the HeyDoctor API. For security measures, the access token has a one hour TTL, after which the token will expire and new access token will need to be generated.\n\nUpon successful authorization, all subsequent SDK calls will be authenticated using the access token. The access token can also be utilized server-side to call our API directly.\n\n#### Example\n\n```js\nimport { Client, OAuth } from 'heydoctor-js';\n\nconst client = new Client({\n  env: 'production',\n});\n\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n});\n\n// First attempt to create a new HeyDoctor user silently. The method will throw an error in the case that the email already exists,\n// in which case you have the opportunity to present an unobtrusive dialog for the user to confirm their existing HeyDoctor password.\ntry {\n  const { accessToken, refreshToken } = await oauth.createUser({\n    email: 'frank@heydoctor.com',\n    firstName: 'Frank',\n    lastName: 'Sinatra',\n    dob: '1915-12-12',\n    gender: 'male',\n    addressLine1: '123 Somewhere Street',\n    city: 'Hoboken',\n    state: 'NJ',\n    zip: '07030',\n  });\n} catch (error) {\n  if (error.code === 'account_exists') {\n    const { accessToken, refreshToken } = await oauth.launchWebAuthFlow('frank@heydoctor.com');\n  }\n}\n\n// Now that the client has been authorized, we can call call other methods available in the SDK\nconst visit = await visits.create({\n  code: 'hair-loss',\n});\n\n// Excellent, we've just created our first visit. Now, we can upload photos to that visit.\nawait visit.uploadPhoto('photoId1234', 'base64photostring');\n```\n","readmeFilename":"README.md","gitHead":"11b986ca5eea8fe7bee2a40397ecc0f4894df607","bugs":{"url":"https://github.com/sappira-inc/heydoctor-js/issues"},"homepage":"https://github.com/sappira-inc/heydoctor-js#readme","_id":"heydoctor-js@3.4.0-c45b5c7","_nodeVersion":"10.17.0","_npmVersion":"6.14.2","dist":{"integrity":"sha512-e0ZsDlNKm3FQwk5f845igONd0asj1Bqc0+d9+Jx/WgEJ+yG2ZAV9DEwhCHy5WZVX4biO2IX6S8bYgqYaHZZ+WQ==","shasum":"d38c8c994eb4675ada01dd7bfe2a6a317ea54dd0","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-3.4.0-c45b5c7.tgz","fileCount":44,"unpackedSize":148183,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJelSgFCRA9TVsSAnZWagAAIrAP/226xUYbEsG0BAUCTXw/\nrVi3IleheUGn8oEntVIGQZAafgEKp8OcWAllUMo/NY/kNhY+tKkBLEOlWyrA\nPWvBJLZEraGdz4zvViknSYYqDCsHQQLunIhtP5vUmJ2sYgDQhPA+G8JBcgTW\nONDs0nXu5iJppzGwdr+5026BWydNK5kqwcr2u6NawsA+9VCazrc/czAZEP2D\np9/WXgrOvqOVm9v3vIdKU1tvKNJONloZcNd8nI3kI8iJjYLJgYo1CF4/521s\nDaWDCfdI53sUkOmH/oJ7F3kJ/R2Ox+ONnCEj7t2HcpBm5a7dnlwDcCG54koy\nuRtnbXbeIw8ydFNAhhdM5HmOw6Pr7NpxLpwXnCz1Gs1/KhWqWv7aa96kUfOO\ntr1vYlxQ12aCRULqwxRWw6m9F2H7olT3l5NwdKTQDgiX0JDE8M6s2v/GcjkD\nDW7YLCMSjIx4aOJy+puxZ7XWocdFRpH1hfk/dyU1uNuMvn9HQAhIDfPriiIv\nf2Pu98tQJwEfq+bbuqiGTJJ2AI34R9AY3L3SHnECOiqappDvK64xNnAHHi/j\nbHvPZghdQwtPTznt9Ig6TMjKoxk7o1Kqpys/h3F787pIyILXRXERLVYggEnU\nVOSLIbKMVftpIdcNi5tiLkxEsYefFnV+2OAk+tx6ktPN5KdRlQJk0N9WVFsm\nVlXC\r\n=Fbvf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDD5zjNQeJhyIY897gaPnUmaWh+BbjDgQNglMYlT5BwoQIhAO3G75Yy7WxrYD5nW0nAVjeu9yQkR+dQWuXAepyd8nBa"}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"schlegz76@gmail.com","name":"schlegz"}],"_npmUser":{"name":"schlegz","email":"schlegz76@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_3.4.0-c45b5c7_1586833413356_0.14630574545940211"},"_hasShrinkwrap":false},"0.0.0-canary-1":{"name":"heydoctor-js","version":"0.0.0-canary-1","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/sappira-inc/heydoctor-js.git"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'npm run build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"npm run docs:build && npm run docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"0.0.5","@types/jest":"^24.0.23","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^23.6.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^1.18.4","npm-run-all":"4.1.3","parcel-bundler":"^1.10.3","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"readme":"# HeyDoctor Javascript SDK\n\nThe HeyDoctor Javascript library provides convenient access to the HeyDoctor API for applications written in JavaScript.\n\n## Documentation\nCheck out our [auto-generated docs](https://sappira-inc.github.io/heydoctor-js/) using [TypeDoc](http://typedoc.org).\n\n## Installation\nYou can install `heydoctor-js` using your favorite package manager.\n\n```sh\n$ yarn add heydoctor-js\n# or\n$ npm install --save heydoctor-js\n```\n\n## Usage\nYou'll first need to create a new client resource. If using the HeyDoctor SaaS platform, you'll need to provide the API key located in the EMR. The client contains the http module that will communicate with the HeyDoctor API, so we'll pass this client to the other resources you'll need.\n\n### Creating the client\n\n```js\nimport { Client, Environments, Visits, OAuth } from 'heydoctor-js';\n\n// The client will hold all configuration options and the http module\n// that communicates to our server\nconst client = new Client({\n  env: Environments.SANDBOX | Environments.PRODUCTION, // determines the API and OAuth endpoints\n});\n\n// Create two resources passing both the client we've just created\n// ** Some resources also take an optional options object as a second argument\nconst visits = new Visits(client;\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n  scope: '*',\n});\n```\n\n### Subscribing to HTTP events\nThe HeyDoctor client also doubles as an event emitter. The client extends from [Mitt](https://github.com/developit/mitt) and complies with standard EventEmitter events.\n\n```js\ninterface HttpCallback {\n  statusCode: number;\n  data: any;\n}\n\nconst client = new Client();\n\nclient.on('http:success', (data: HttpCallback) => void);\nclient.on('http:error', (data: HttpCallback) => void);\n```\n\n### Authorizing via OAuth\n\nPartnering clients will use the HeyDoctor JS SDK to create or link a HeyDoctor account. HeyDoctor conforms to the existing [OAuth2 protocol](https://oauth.net/2/). In the case that HeyDoctor already has the provided email on file, the SDK will open a dialog box, akin to Facebook or Google login, prompting the user to confirm their existing password. In all successful cases, an access token and refresh token will be returned. The resulting payload is outlined below.\n\nWe recommend to store the longstanding refresh token in a persisted data store. You’ll use this token, along with your unique client id and secret key to regenerate short lived access tokens used to authenticate requests to the HeyDoctor API. For security measures, the access token has a one hour TTL, after which the token will expire and new access token will need to be generated.\n\nUpon successful authorization, all subsequent SDK calls will be authenticated using the access token. The access token can also be utilized server-side to call our API directly.\n\n#### Example\n\n```js\nimport { Client, OAuth } from 'heydoctor-js';\n\nconst client = new Client({\n  env: 'production',\n});\n\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n});\n\n// First attempt to create a new HeyDoctor user silently. The method will throw an error in the case that the email already exists,\n// in which case you have the opportunity to present an unobtrusive dialog for the user to confirm their existing HeyDoctor password.\ntry {\n  const { accessToken, refreshToken } = await oauth.createUser({\n    email: 'frank@heydoctor.com',\n    firstName: 'Frank',\n    lastName: 'Sinatra',\n    dob: '1915-12-12',\n    gender: 'male',\n    addressLine1: '123 Somewhere Street',\n    city: 'Hoboken',\n    state: 'NJ',\n    zip: '07030',\n  });\n} catch (error) {\n  if (error.code === 'account_exists') {\n    const { accessToken, refreshToken } = await oauth.launchWebAuthFlow('frank@heydoctor.com');\n  }\n}\n\n// Now that the client has been authorized, we can call call other methods available in the SDK\nconst visit = await visits.create({\n  code: 'hair-loss',\n});\n\n// Excellent, we've just created our first visit. Now, we can upload photos to that visit.\nawait visit.uploadPhoto('photoId1234', 'base64photostring');\n```\n","readmeFilename":"README.md","gitHead":"bdc773e2236e469bc8a599cd17aa223f11a8fbd9","bugs":{"url":"https://github.com/sappira-inc/heydoctor-js/issues"},"homepage":"https://github.com/sappira-inc/heydoctor-js#readme","_id":"heydoctor-js@0.0.0-canary-1","_nodeVersion":"10.17.0","_npmVersion":"6.14.2","dist":{"integrity":"sha512-KepvTAQbYwoZ7Im2WfUzkrwLgd16/tzJCmPzDhHb+yk3xELWOP9CtnqVpRTqN0Z9pwg0BnKTamYY0tmX3kNA7Q==","shasum":"f22e7d963c018557bed075e0f903b1d019828350","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-0.0.0-canary-1.tgz","fileCount":44,"unpackedSize":148184,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJelkC7CRA9TVsSAnZWagAAFxIP/3LHYZKwx5BhdbovZcNw\nUPlTkV2Zhp7o3a39/T7nE1RMrmf1kzZtIWzutDDfKPEHYxJzJ+Wc+Pm/5dcu\nLdE/1uSW8t7fmMpn34erBVuVDL83gL8YSU0ZZ+SBgNjymnk9BYSuVTvAjOmV\nz9d4BgH0bT2w+6bNpOf+FjTw3PywCpue5ps20bWbwW8GD5dKtM8TfJjsORhe\nMO62TY/Qo7SET0ZYX/uYnjdTFeMPt2zqw2xzNK7AjsMWTHbE4zM4Hs37E0Rl\n0TK5evODBFQf09Wk5z+3rOATm277qrCBMkdfgkWL3jo+RglqI8w4aIjpv+Lo\nK9Zi7fHb1396Cow1iV4fVXJo9PoHW3I6QoazatyWi8sIvJW2co3FrwNYHPKU\nJIUYbYnEbUrt1DE50WnVEbM8eOZuvPAHIRxVljljiCWj3UEaLNeqLgqbKbhK\nTTWIL2lUyiIjuCyyA4QkUTicYd4Y3fCyDA7UXujidLGgmcTWt477IgMggwO2\nWJgkfRYstKAoRd7Lxg1ZiQgYl2CKF73GvMXST0vvt5qYvBsHl0b+pBZjOa+E\nen8giJsV70ZHdyHEKpRxgouxH2yYRtfV6p5G7q3yPPEawwAMYr+BRsjBlh/q\nwX4cOH0GAgvbobMXlgWFweSvswfiyYje4aVkHop4qAkcRMV08NYHaZfOtlHT\nJjbP\r\n=k4Fw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGHP9bGrTcjtELhr/vHjFNad6nJVzfKJFm/50CjXq1bwAiBdMs54XXdbXVFBaYERXpWdGoocJW9+phD+mlJ9f8G+wg=="}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"schlegz76@gmail.com","name":"schlegz"}],"_npmUser":{"name":"schlegz","email":"schlegz76@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_0.0.0-canary-1_1586905275048_0.8700005006793377"},"_hasShrinkwrap":false},"0.0.0-a952b84":{"name":"heydoctor-js","version":"0.0.0-a952b84","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/sappira-inc/heydoctor-js.git"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'npm run build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"npm run docs:build && npm run docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"0.0.5","@types/jest":"^24.0.23","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^23.6.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^1.18.4","npm-run-all":"4.1.3","parcel-bundler":"^1.10.3","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"readme":"# HeyDoctor Javascript SDK\n\nThe HeyDoctor Javascript library provides convenient access to the HeyDoctor API for applications written in JavaScript.\n\n## Documentation\nCheck out our [auto-generated docs](https://sappira-inc.github.io/heydoctor-js/) using [TypeDoc](http://typedoc.org).\n\n## Installation\nYou can install `heydoctor-js` using your favorite package manager.\n\n```sh\n$ yarn add heydoctor-js\n# or\n$ npm install --save heydoctor-js\n```\n\n## Usage\nYou'll first need to create a new client resource. If using the HeyDoctor SaaS platform, you'll need to provide the API key located in the EMR. The client contains the http module that will communicate with the HeyDoctor API, so we'll pass this client to the other resources you'll need.\n\n### Creating the client\n\n```js\nimport { Client, Environments, Visits, OAuth } from 'heydoctor-js';\n\n// The client will hold all configuration options and the http module\n// that communicates to our server\nconst client = new Client({\n  env: Environments.SANDBOX | Environments.PRODUCTION, // determines the API and OAuth endpoints\n});\n\n// Create two resources passing both the client we've just created\n// ** Some resources also take an optional options object as a second argument\nconst visits = new Visits(client;\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n  scope: '*',\n});\n```\n\n### Subscribing to HTTP events\nThe HeyDoctor client also doubles as an event emitter. The client extends from [Mitt](https://github.com/developit/mitt) and complies with standard EventEmitter events.\n\n```js\ninterface HttpCallback {\n  statusCode: number;\n  data: any;\n}\n\nconst client = new Client();\n\nclient.on('http:success', (data: HttpCallback) => void);\nclient.on('http:error', (data: HttpCallback) => void);\n```\n\n### Authorizing via OAuth\n\nPartnering clients will use the HeyDoctor JS SDK to create or link a HeyDoctor account. HeyDoctor conforms to the existing [OAuth2 protocol](https://oauth.net/2/). In the case that HeyDoctor already has the provided email on file, the SDK will open a dialog box, akin to Facebook or Google login, prompting the user to confirm their existing password. In all successful cases, an access token and refresh token will be returned. The resulting payload is outlined below.\n\nWe recommend to store the longstanding refresh token in a persisted data store. You’ll use this token, along with your unique client id and secret key to regenerate short lived access tokens used to authenticate requests to the HeyDoctor API. For security measures, the access token has a one hour TTL, after which the token will expire and new access token will need to be generated.\n\nUpon successful authorization, all subsequent SDK calls will be authenticated using the access token. The access token can also be utilized server-side to call our API directly.\n\n#### Example\n\n```js\nimport { Client, OAuth } from 'heydoctor-js';\n\nconst client = new Client({\n  env: 'production',\n});\n\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n});\n\n// First attempt to create a new HeyDoctor user silently. The method will throw an error in the case that the email already exists,\n// in which case you have the opportunity to present an unobtrusive dialog for the user to confirm their existing HeyDoctor password.\ntry {\n  const { accessToken, refreshToken } = await oauth.createUser({\n    email: 'frank@heydoctor.com',\n    firstName: 'Frank',\n    lastName: 'Sinatra',\n    dob: '1915-12-12',\n    gender: 'male',\n    addressLine1: '123 Somewhere Street',\n    city: 'Hoboken',\n    state: 'NJ',\n    zip: '07030',\n  });\n} catch (error) {\n  if (error.code === 'account_exists') {\n    const { accessToken, refreshToken } = await oauth.launchWebAuthFlow('frank@heydoctor.com');\n  }\n}\n\n// Now that the client has been authorized, we can call call other methods available in the SDK\nconst visit = await visits.create({\n  code: 'hair-loss',\n});\n\n// Excellent, we've just created our first visit. Now, we can upload photos to that visit.\nawait visit.uploadPhoto('photoId1234', 'base64photostring');\n```\n","readmeFilename":"README.md","gitHead":"52156035c9da6d205d088ee013d81d77c17225b2","bugs":{"url":"https://github.com/sappira-inc/heydoctor-js/issues"},"homepage":"https://github.com/sappira-inc/heydoctor-js#readme","_id":"heydoctor-js@0.0.0-a952b84","_nodeVersion":"10.20.1","_npmVersion":"6.14.4","dist":{"integrity":"sha512-JCFH95/g7FSSHitVqFynCw1WzC/2fGObWLvYgH1CioUytE/aNE2WNJ88rUbmEhO+E21wTOHwMXiNsHeSWolv7Q==","shasum":"b155318ce74cdd24739d438826d18891f181d37f","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-0.0.0-a952b84.tgz","fileCount":44,"unpackedSize":148183,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJel0eICRA9TVsSAnZWagAAT44QAKQ8I3Gy9QtEYwXt6CxW\nwun5QgrvD/QfLF/XPSdkcfqi6BSkGb8iO9DqUkveVm4Yhfc10oiIvZxjIiWN\n0XTcb1x1KXN3nunDYCYVxo/BSRHwjUeHGSduRvvnnxjeVsdd7OTDEI9jXmkF\n9qbYS+p1dtZa+DeYbwfTG1cNT29N7akYCpHTfXRaoME4EdB9rRb0Y0GlHrnk\nF7+181y9MlxeyWcH6JYVfW4YIijIHfaksmSBBx6orky2BiDShhEEH3rBpLuP\nju4XP81rXiG9GGZlLbYoRcpZn8q0HYheyDbfnESDCRftW2LsspBoYAeVFGYY\ntZcI8yn4hLBqWVuiJJ575OcZzp2BgVQ20UnW6wlmwyEOKtuH1CODMnn3ahur\n02hS3NHjO2ps+DgdftE78vwJGjC0ftZno2OivYRTFhoTlkcaJDgi/5kUOEDV\nHQFNfSt4gIUL69Ldy/uryZtOkro177EtqH3V46lYun9sthPMlgCdwGqEGd+0\ngEIDZeNElbG3/mtu9TrCDuf3Fy5DQEtD1CoQdYdgoZvmOq0TmLSiYGJ3jmgD\nY9nUMmapGCFZ7MWGc5YVF4SdM/Pm+l4DisLYGl7eXhCoMC0NUdWbAiTID5xn\nDcEhpFnvzD1HWlZfVV6Bt3qf9ZRLAjkdSVOTQUupququ/zCdGWLEzHgAYWf/\nz9Rs\r\n=g+fW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC8nlO8HNoa6qPJYb3/P5qHA9nagWqsFNV2pLJuTqMncQIgMCksF1uAKwQRfIWhkDan2lbApax/Y20e6SF6nTCHgzE="}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"kalwyn+npmci@goodrx.com","name":"heydoctor-ci"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"schlegz76@gmail.com","name":"schlegz"}],"_npmUser":{"name":"heydoctor-ci","email":"kalwyn+npmci@goodrx.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_0.0.0-a952b84_1586972552536_0.8329213113264975"},"_hasShrinkwrap":false},"0.0.0-5024a3c":{"name":"heydoctor-js","version":"0.0.0-5024a3c","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/sappira-inc/heydoctor-js.git"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'npm run build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"npm run docs:build && npm run docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"0.0.5","@types/jest":"^24.0.23","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^23.6.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^1.18.4","npm-run-all":"4.1.3","parcel-bundler":"^1.10.3","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"readme":"# HeyDoctor Javascript SDK\n\nThe HeyDoctor Javascript library provides convenient access to the HeyDoctor API for applications written in JavaScript.\n\n## Documentation\nCheck out our [auto-generated docs](https://sappira-inc.github.io/heydoctor-js/) using [TypeDoc](http://typedoc.org).\n\n## Installation\nYou can install `heydoctor-js` using your favorite package manager.\n\n```sh\n$ yarn add heydoctor-js\n# or\n$ npm install --save heydoctor-js\n```\n\n## Usage\nYou'll first need to create a new client resource. If using the HeyDoctor SaaS platform, you'll need to provide the API key located in the EMR. The client contains the http module that will communicate with the HeyDoctor API, so we'll pass this client to the other resources you'll need.\n\n### Creating the client\n\n```js\nimport { Client, Environments, Visits, OAuth } from 'heydoctor-js';\n\n// The client will hold all configuration options and the http module\n// that communicates to our server\nconst client = new Client({\n  env: Environments.SANDBOX | Environments.PRODUCTION, // determines the API and OAuth endpoints\n});\n\n// Create two resources passing both the client we've just created\n// ** Some resources also take an optional options object as a second argument\nconst visits = new Visits(client;\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n  scope: '*',\n});\n```\n\n### Subscribing to HTTP events\nThe HeyDoctor client also doubles as an event emitter. The client extends from [Mitt](https://github.com/developit/mitt) and complies with standard EventEmitter events.\n\n```js\ninterface HttpCallback {\n  statusCode: number;\n  data: any;\n}\n\nconst client = new Client();\n\nclient.on('http:success', (data: HttpCallback) => void);\nclient.on('http:error', (data: HttpCallback) => void);\n```\n\n### Authorizing via OAuth\n\nPartnering clients will use the HeyDoctor JS SDK to create or link a HeyDoctor account. HeyDoctor conforms to the existing [OAuth2 protocol](https://oauth.net/2/). In the case that HeyDoctor already has the provided email on file, the SDK will open a dialog box, akin to Facebook or Google login, prompting the user to confirm their existing password. In all successful cases, an access token and refresh token will be returned. The resulting payload is outlined below.\n\nWe recommend to store the longstanding refresh token in a persisted data store. You’ll use this token, along with your unique client id and secret key to regenerate short lived access tokens used to authenticate requests to the HeyDoctor API. For security measures, the access token has a one hour TTL, after which the token will expire and new access token will need to be generated.\n\nUpon successful authorization, all subsequent SDK calls will be authenticated using the access token. The access token can also be utilized server-side to call our API directly.\n\n#### Example\n\n```js\nimport { Client, OAuth } from 'heydoctor-js';\n\nconst client = new Client({\n  env: 'production',\n});\n\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n});\n\n// First attempt to create a new HeyDoctor user silently. The method will throw an error in the case that the email already exists,\n// in which case you have the opportunity to present an unobtrusive dialog for the user to confirm their existing HeyDoctor password.\ntry {\n  const { accessToken, refreshToken } = await oauth.createUser({\n    email: 'frank@heydoctor.com',\n    firstName: 'Frank',\n    lastName: 'Sinatra',\n    dob: '1915-12-12',\n    gender: 'male',\n    addressLine1: '123 Somewhere Street',\n    city: 'Hoboken',\n    state: 'NJ',\n    zip: '07030',\n  });\n} catch (error) {\n  if (error.code === 'account_exists') {\n    const { accessToken, refreshToken } = await oauth.launchWebAuthFlow('frank@heydoctor.com');\n  }\n}\n\n// Now that the client has been authorized, we can call call other methods available in the SDK\nconst visit = await visits.create({\n  code: 'hair-loss',\n});\n\n// Excellent, we've just created our first visit. Now, we can upload photos to that visit.\nawait visit.uploadPhoto('photoId1234', 'base64photostring');\n```\n","readmeFilename":"README.md","gitHead":"03bc0e6f90897eba45a4c661053fa90db3863823","bugs":{"url":"https://github.com/sappira-inc/heydoctor-js/issues"},"homepage":"https://github.com/sappira-inc/heydoctor-js#readme","_id":"heydoctor-js@0.0.0-5024a3c","_nodeVersion":"10.20.1","_npmVersion":"6.14.4","dist":{"integrity":"sha512-C2Tnt2CfY0t9vr+qHdlf5aLQvNuq7JHS9gGRX24TqUdGmA2ZRpS+IW5cR5olxxZo53f7f4n9neS+4DSWuMORtQ==","shasum":"2efcf41f30582f378b7e5adbcd2f0e9adb9531b3","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-0.0.0-5024a3c.tgz","fileCount":44,"unpackedSize":148183,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJel1dVCRA9TVsSAnZWagAABQsP/ApTTHuVIzRblNrij4vE\n7Sqj8zhX/7n37A0bLdF0jOXeoE5lHepDwD+LKudyEnKF0sc5qJ13ZHJu9Y5Y\nG66zSSnoRrxiad/veucmTy5gUhXtBvCifPfCB1cVEv7Qm7oaOHiWc31y4zO+\nUPTD4RU6WqGr4RLxZh9sbKMdMbn26o6IrwpEHtl6psWB6xmS1a4dnHH3SXZ8\nWwtdKxYyhyimSd2wvSgIYah4uUYJ+EP3+eseTXmcapwReOGxi7WfSwxaJ/0I\ncPacP0gkqijWUUJ9zOWpFOVt52TsNNMsfLgvEFsCVYNRl8++otyyaFJpqYtW\nR57MRLErzH5vHiwAg3DnxDvOtdvvuGuru34LTeFSuT6/tiElV+ncUMtCGXph\nOtzbeIAadJSeYPTHFe2kQZS6nboGw56mfzJxTGQ3V7o08SvUr8CVImFlZ+en\naNbhiVcVq3cLc0ZgK8CBxZPRJVs+mQg9XnfHJBkA4iuPV35NEVAGBULUvpYm\nbv4HjKJKM1VgtB214i8RFGg9U+jGH5db9OrMmTW/ZwSUbHj1EkgLxkJhL6xi\nkE1du3mN0QswxX/ou72ilECxn8JjS9gRb+Kvd4glIvDLaALdFFuHfPzmPXRa\nHJOKum6pAfgLkOs1/+XXJR2yk6XZwwe9//RJ/20azMoNTz2xBYx1XWw5Z0CV\nzpgC\r\n=8pU7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGJWzo93ozUEnrFgemwnkfiyPtjY4/wA2M7/5BV1Z99DAiBUUsHN6Sv8Nnq7t7rU/h0nDywJOZJs3AZNYajNlM2rQA=="}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"kalwyn+npmci@goodrx.com","name":"heydoctor-ci"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"schlegz76@gmail.com","name":"schlegz"}],"_npmUser":{"name":"heydoctor-ci","email":"kalwyn+npmci@goodrx.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_0.0.0-5024a3c_1586976597465_0.945819889637957"},"_hasShrinkwrap":false},"0.0.0-5c36d1a":{"name":"heydoctor-js","version":"0.0.0-5c36d1a","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/sappira-inc/heydoctor-js.git"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'npm run build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"npm run docs:build && npm run docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"0.0.6","@types/jest":"^24.0.23","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^23.6.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^1.18.4","npm-run-all":"4.1.3","parcel-bundler":"^1.10.3","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"readme":"# HeyDoctor Javascript SDK\n\nThe HeyDoctor Javascript library provides convenient access to the HeyDoctor API for applications written in JavaScript.\n\n## Documentation\nCheck out our [auto-generated docs](https://sappira-inc.github.io/heydoctor-js/) using [TypeDoc](http://typedoc.org).\n\n## Installation\nYou can install `heydoctor-js` using your favorite package manager.\n\n```sh\n$ yarn add heydoctor-js\n# or\n$ npm install --save heydoctor-js\n```\n\n## Usage\nYou'll first need to create a new client resource. If using the HeyDoctor SaaS platform, you'll need to provide the API key located in the EMR. The client contains the http module that will communicate with the HeyDoctor API, so we'll pass this client to the other resources you'll need.\n\n### Creating the client\n\n```js\nimport { Client, Environments, Visits, OAuth } from 'heydoctor-js';\n\n// The client will hold all configuration options and the http module\n// that communicates to our server\nconst client = new Client({\n  env: Environments.SANDBOX | Environments.PRODUCTION, // determines the API and OAuth endpoints\n});\n\n// Create two resources passing both the client we've just created\n// ** Some resources also take an optional options object as a second argument\nconst visits = new Visits(client;\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n  scope: '*',\n});\n```\n\n### Subscribing to HTTP events\nThe HeyDoctor client also doubles as an event emitter. The client extends from [Mitt](https://github.com/developit/mitt) and complies with standard EventEmitter events.\n\n```js\ninterface HttpCallback {\n  statusCode: number;\n  data: any;\n}\n\nconst client = new Client();\n\nclient.on('http:success', (data: HttpCallback) => void);\nclient.on('http:error', (data: HttpCallback) => void);\n```\n\n### Authorizing via OAuth\n\nPartnering clients will use the HeyDoctor JS SDK to create or link a HeyDoctor account. HeyDoctor conforms to the existing [OAuth2 protocol](https://oauth.net/2/). In the case that HeyDoctor already has the provided email on file, the SDK will open a dialog box, akin to Facebook or Google login, prompting the user to confirm their existing password. In all successful cases, an access token and refresh token will be returned. The resulting payload is outlined below.\n\nWe recommend to store the longstanding refresh token in a persisted data store. You’ll use this token, along with your unique client id and secret key to regenerate short lived access tokens used to authenticate requests to the HeyDoctor API. For security measures, the access token has a one hour TTL, after which the token will expire and new access token will need to be generated.\n\nUpon successful authorization, all subsequent SDK calls will be authenticated using the access token. The access token can also be utilized server-side to call our API directly.\n\n#### Example\n\n```js\nimport { Client, OAuth } from 'heydoctor-js';\n\nconst client = new Client({\n  env: 'production',\n});\n\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n});\n\n// First attempt to create a new HeyDoctor user silently. The method will throw an error in the case that the email already exists,\n// in which case you have the opportunity to present an unobtrusive dialog for the user to confirm their existing HeyDoctor password.\ntry {\n  const { accessToken, refreshToken } = await oauth.createUser({\n    email: 'frank@heydoctor.com',\n    firstName: 'Frank',\n    lastName: 'Sinatra',\n    dob: '1915-12-12',\n    gender: 'male',\n    addressLine1: '123 Somewhere Street',\n    city: 'Hoboken',\n    state: 'NJ',\n    zip: '07030',\n  });\n} catch (error) {\n  if (error.code === 'account_exists') {\n    const { accessToken, refreshToken } = await oauth.launchWebAuthFlow('frank@heydoctor.com');\n  }\n}\n\n// Now that the client has been authorized, we can call call other methods available in the SDK\nconst visit = await visits.create({\n  code: 'hair-loss',\n});\n\n// Excellent, we've just created our first visit. Now, we can upload photos to that visit.\nawait visit.uploadPhoto('photoId1234', 'base64photostring');\n```\n","readmeFilename":"README.md","gitHead":"46c509274490068a78e281a44e1037a91317b863","bugs":{"url":"https://github.com/sappira-inc/heydoctor-js/issues"},"homepage":"https://github.com/sappira-inc/heydoctor-js#readme","_id":"heydoctor-js@0.0.0-5c36d1a","_nodeVersion":"10.20.1","_npmVersion":"6.14.4","dist":{"integrity":"sha512-dKl/ngCcOOHC1vf7KkVKE7RxrAkWsnAfZszyIZvM1lOdReJfwtkEkEMOt53uR52/Axclgt2yx2Q4LVRYfgnYyA==","shasum":"fb1d383a438ed415cda24bfcc33bd5c50b407ecd","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-0.0.0-5c36d1a.tgz","fileCount":44,"unpackedSize":148183,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJemfxGCRA9TVsSAnZWagAAJG0P/j+LcC79tB3fKaqWVOh9\n8PF8z7NmbaoIR7h6hvFRkd05SaVnx10mx2oo7RERvrj88pinQUFdVKtD2wcP\n6yu0OmrTkSWzsECGIKiS0XDeHq/UKa7zlATQxmbSm8YJBQ8/JWLTiktclB6L\nCdTjecVvlKSsDHJNHjz+2v6Acc3wcKDiNjG5HffLXdixfsk7WD/PuXnrkuIk\ng0+RJVDZSldb654vgAOL8EF04H4PF0zKJ5ccE7L19/OjU+DWjztXNeP3id9X\n1CABngy8wgkwFsbc107Zm25T/FHsaSa6gwJMwuuz2wILOhQXxADnAS7iQqp2\nBWdxrofjHSCXBy5tVllnUjs9jCFi+I/YfOI26wv+hjzbJhzZVmeQ525nzy02\neBq3nYjpgFemSpqGARZhO06QOf1ZLReQgugxdSUb6m09UpbOcS8qt3grPC8i\nvAaytM/DEoDzr1XYMPEoJHXcds6HxSIYXkEOuHdqoAZpQH7qYwyDjTfMRl9s\ndFY/IniIK3xBzj29hMFY2lxyCTmymOw9EHjrTYmAxtc2jJpHASib91/rAzZU\nejNCe7Z0ul4yu0V4eEeTEK6GYddYvHK1EZynBZtxKMSSATbYzIZo0Grh0xAO\nB+u2JuyrJAf8IT3aciENWPakJdAxpSej2CYtRHMPEjtl2Z36sGfXVYRJQ+PM\nN2BA\r\n=VV9+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGyEvuqFCYJg1ucaVCg2G4r6bre5HOLTPbf8vOgZgkb9AiEA6fKh4DdtmYu05TIRkfz5KfilMonM9WlO3hoPo+z1BdU="}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"kalwyn+npmci@goodrx.com","name":"heydoctor-ci"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"schlegz76@gmail.com","name":"schlegz"}],"_npmUser":{"name":"heydoctor-ci","email":"kalwyn+npmci@goodrx.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_0.0.0-5c36d1a_1587149893912_0.983087642881677"},"_hasShrinkwrap":false},"0.0.0-717749d":{"name":"heydoctor-js","version":"0.0.0-717749d","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/sappira-inc/heydoctor-js.git"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'npm run build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"npm run docs:build && npm run docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"0.0.6","@types/jest":"^24.0.23","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^23.6.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^1.18.4","npm-run-all":"4.1.3","parcel-bundler":"^1.10.3","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"readme":"# HeyDoctor Javascript SDK\n\nThe HeyDoctor Javascript library provides convenient access to the HeyDoctor API for applications written in JavaScript.\n\n## Documentation\nCheck out our [auto-generated docs](https://sappira-inc.github.io/heydoctor-js/) using [TypeDoc](http://typedoc.org).\n\n## Installation\nYou can install `heydoctor-js` using your favorite package manager.\n\n```sh\n$ yarn add heydoctor-js\n# or\n$ npm install --save heydoctor-js\n```\n\n## Usage\nYou'll first need to create a new client resource. If using the HeyDoctor SaaS platform, you'll need to provide the API key located in the EMR. The client contains the http module that will communicate with the HeyDoctor API, so we'll pass this client to the other resources you'll need.\n\n### Creating the client\n\n```js\nimport { Client, Environments, Visits, OAuth } from 'heydoctor-js';\n\n// The client will hold all configuration options and the http module\n// that communicates to our server\nconst client = new Client({\n  env: Environments.SANDBOX | Environments.PRODUCTION, // determines the API and OAuth endpoints\n});\n\n// Create two resources passing both the client we've just created\n// ** Some resources also take an optional options object as a second argument\nconst visits = new Visits(client;\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n  scope: '*',\n});\n```\n\n### Subscribing to HTTP events\nThe HeyDoctor client also doubles as an event emitter. The client extends from [Mitt](https://github.com/developit/mitt) and complies with standard EventEmitter events.\n\n```js\ninterface HttpCallback {\n  statusCode: number;\n  data: any;\n}\n\nconst client = new Client();\n\nclient.on('http:success', (data: HttpCallback) => void);\nclient.on('http:error', (data: HttpCallback) => void);\n```\n\n### Authorizing via OAuth\n\nPartnering clients will use the HeyDoctor JS SDK to create or link a HeyDoctor account. HeyDoctor conforms to the existing [OAuth2 protocol](https://oauth.net/2/). In the case that HeyDoctor already has the provided email on file, the SDK will open a dialog box, akin to Facebook or Google login, prompting the user to confirm their existing password. In all successful cases, an access token and refresh token will be returned. The resulting payload is outlined below.\n\nWe recommend to store the longstanding refresh token in a persisted data store. You’ll use this token, along with your unique client id and secret key to regenerate short lived access tokens used to authenticate requests to the HeyDoctor API. For security measures, the access token has a one hour TTL, after which the token will expire and new access token will need to be generated.\n\nUpon successful authorization, all subsequent SDK calls will be authenticated using the access token. The access token can also be utilized server-side to call our API directly.\n\n#### Example\n\n```js\nimport { Client, OAuth } from 'heydoctor-js';\n\nconst client = new Client({\n  env: 'production',\n});\n\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n});\n\n// First attempt to create a new HeyDoctor user silently. The method will throw an error in the case that the email already exists,\n// in which case you have the opportunity to present an unobtrusive dialog for the user to confirm their existing HeyDoctor password.\ntry {\n  const { accessToken, refreshToken } = await oauth.createUser({\n    email: 'frank@heydoctor.com',\n    firstName: 'Frank',\n    lastName: 'Sinatra',\n    dob: '1915-12-12',\n    gender: 'male',\n    addressLine1: '123 Somewhere Street',\n    city: 'Hoboken',\n    state: 'NJ',\n    zip: '07030',\n  });\n} catch (error) {\n  if (error.code === 'account_exists') {\n    const { accessToken, refreshToken } = await oauth.launchWebAuthFlow('frank@heydoctor.com');\n  }\n}\n\n// Now that the client has been authorized, we can call call other methods available in the SDK\nconst visit = await visits.create({\n  code: 'hair-loss',\n});\n\n// Excellent, we've just created our first visit. Now, we can upload photos to that visit.\nawait visit.uploadPhoto('photoId1234', 'base64photostring');\n```\n","readmeFilename":"README.md","gitHead":"474d8ff868d83a83765d4971de70c7c6287a0199","bugs":{"url":"https://github.com/sappira-inc/heydoctor-js/issues"},"homepage":"https://github.com/sappira-inc/heydoctor-js#readme","_id":"heydoctor-js@0.0.0-717749d","_nodeVersion":"10.20.1","_npmVersion":"6.14.4","dist":{"integrity":"sha512-gI3WU0nmrrOK/u8jn9BTBERJwoRWypavGmJo1TBGAhkHqeTs2RCGE0glZTkmNIlUMC+pUWZrQpd7zhGWUQwVQw==","shasum":"968f67eed5e5208e330bd9f25bd5fb8ac6c40094","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-0.0.0-717749d.tgz","fileCount":44,"unpackedSize":148342,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJen1L7CRA9TVsSAnZWagAANcIP/1Q1ZAQ2p8q2eFSlPU4s\nCGFhSrBMHzhd9WWMQmL7LH+vIvkwYYNovq9vGwbax6iB8MxC23LgaAYq/kKi\nJP7XrkDmkFG/ihT1EAIrno6ZCuDeO7pB+QnBSnjvPel+C+KuYj3TSEKlkN+L\nfbvZ2RcHcSmUjEB5NPk/g2oR3OxELfxRsSeoo+7tLe0X0kzqiVQSoB7JZ+M7\n0INF6kMUXgnSecutqqsJoq/GhYJrMpFSHa0hzLttYOolG02eOncHGIpw8qrq\n4Ca9Yty/PgQsTTQNs8mnpbXbRGRLiHIW+wuG8RYCtSwUFiaOCDRcAoUmx/l2\ngHpDhv3buVYxfsZ9j7/qDrv9aonzA3/EEDVIZ78BkmP5IS/wrpAL/1D2Ski1\nQx7vovuv5NCKyZ8ALLogAtL6Yf8GHjR9Xu32Lknk5GMLcx3sNEARn0/jB+EH\nt33dupy6ZK1+6iEDX1L9rTXbszAjvcj4Mw4eHIiOewtmTYj7moCzqrMpEt2M\n/6yOBX5BDm5eCqhRHjczETN6R45UKZXcGWByx+1+EqUr2v/tG451Tggn2Ii3\nIAhNCMAniGD7o9KBCDKC+bqcuDsY3HZLnrnZ1sfUgIYqGRGLdy3+ZtwH1waw\nxps1n1sUNjLPuWgRVqO0VxhwBhwFiHxHYBtU01FcQuNqiS56MrjsQwCfQwmi\n9AHp\r\n=gJWv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC4Cdlm2EAQVOv2IOfR4/vSY/ezCxIZFYGfzkZ8pF7VZAIhALgkdwt/ty9M5yYMsb9EIormKm6JMYU2qNLnFnre01Qg"}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"kalwyn+npmci@goodrx.com","name":"heydoctor-ci"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"schlegz76@gmail.com","name":"schlegz"}],"_npmUser":{"name":"heydoctor-ci","email":"kalwyn+npmci@goodrx.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_0.0.0-717749d_1587499771367_0.15084038864878613"},"_hasShrinkwrap":false},"0.0.0-1906a74":{"name":"heydoctor-js","version":"0.0.0-1906a74","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/sappira-inc/heydoctor-js.git"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'npm run build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"npm run docs:build && npm run docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"0.0.6","@types/jest":"^24.0.23","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^23.6.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^1.18.4","npm-run-all":"4.1.3","parcel-bundler":"^1.10.3","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"readme":"# HeyDoctor Javascript SDK\n\nThe HeyDoctor Javascript library provides convenient access to the HeyDoctor API for applications written in JavaScript.\n\n## Documentation\nCheck out our [auto-generated docs](https://sappira-inc.github.io/heydoctor-js/) using [TypeDoc](http://typedoc.org).\n\n## Installation\nYou can install `heydoctor-js` using your favorite package manager.\n\n```sh\n$ yarn add heydoctor-js\n# or\n$ npm install --save heydoctor-js\n```\n\n## Usage\nYou'll first need to create a new client resource. If using the HeyDoctor SaaS platform, you'll need to provide the API key located in the EMR. The client contains the http module that will communicate with the HeyDoctor API, so we'll pass this client to the other resources you'll need.\n\n### Creating the client\n\n```js\nimport { Client, Environments, Visits, OAuth } from 'heydoctor-js';\n\n// The client will hold all configuration options and the http module\n// that communicates to our server\nconst client = new Client({\n  env: Environments.SANDBOX | Environments.PRODUCTION, // determines the API and OAuth endpoints\n});\n\n// Create two resources passing both the client we've just created\n// ** Some resources also take an optional options object as a second argument\nconst visits = new Visits(client;\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n  scope: '*',\n});\n```\n\n### Subscribing to HTTP events\nThe HeyDoctor client also doubles as an event emitter. The client extends from [Mitt](https://github.com/developit/mitt) and complies with standard EventEmitter events.\n\n```js\ninterface HttpCallback {\n  statusCode: number;\n  data: any;\n}\n\nconst client = new Client();\n\nclient.on('http:success', (data: HttpCallback) => void);\nclient.on('http:error', (data: HttpCallback) => void);\n```\n\n### Authorizing via OAuth\n\nPartnering clients will use the HeyDoctor JS SDK to create or link a HeyDoctor account. HeyDoctor conforms to the existing [OAuth2 protocol](https://oauth.net/2/). In the case that HeyDoctor already has the provided email on file, the SDK will open a dialog box, akin to Facebook or Google login, prompting the user to confirm their existing password. In all successful cases, an access token and refresh token will be returned. The resulting payload is outlined below.\n\nWe recommend to store the longstanding refresh token in a persisted data store. You’ll use this token, along with your unique client id and secret key to regenerate short lived access tokens used to authenticate requests to the HeyDoctor API. For security measures, the access token has a one hour TTL, after which the token will expire and new access token will need to be generated.\n\nUpon successful authorization, all subsequent SDK calls will be authenticated using the access token. The access token can also be utilized server-side to call our API directly.\n\n#### Example\n\n```js\nimport { Client, OAuth } from 'heydoctor-js';\n\nconst client = new Client({\n  env: 'production',\n});\n\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n});\n\n// First attempt to create a new HeyDoctor user silently. The method will throw an error in the case that the email already exists,\n// in which case you have the opportunity to present an unobtrusive dialog for the user to confirm their existing HeyDoctor password.\ntry {\n  const { accessToken, refreshToken } = await oauth.createUser({\n    email: 'frank@heydoctor.com',\n    firstName: 'Frank',\n    lastName: 'Sinatra',\n    dob: '1915-12-12',\n    gender: 'male',\n    addressLine1: '123 Somewhere Street',\n    city: 'Hoboken',\n    state: 'NJ',\n    zip: '07030',\n  });\n} catch (error) {\n  if (error.code === 'account_exists') {\n    const { accessToken, refreshToken } = await oauth.launchWebAuthFlow('frank@heydoctor.com');\n  }\n}\n\n// Now that the client has been authorized, we can call call other methods available in the SDK\nconst visit = await visits.create({\n  code: 'hair-loss',\n});\n\n// Excellent, we've just created our first visit. Now, we can upload photos to that visit.\nawait visit.uploadPhoto('photoId1234', 'base64photostring');\n```\n","readmeFilename":"README.md","gitHead":"085b8249a8718fa6181cbe5d22f91182dfe372d4","bugs":{"url":"https://github.com/sappira-inc/heydoctor-js/issues"},"homepage":"https://github.com/sappira-inc/heydoctor-js#readme","_id":"heydoctor-js@0.0.0-1906a74","_nodeVersion":"10.20.1","_npmVersion":"6.14.4","dist":{"integrity":"sha512-ecfa1+r2HSwsTH+n/poxxYjU0fakOhYmw6bl9YNEm2pFPbUueRbK3Okyi3LhS/MtxYHL8rYNv9GLlNER9jxU/g==","shasum":"5ac504e56b49057fc57a6ebd5ed2db6cad03a88f","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-0.0.0-1906a74.tgz","fileCount":44,"unpackedSize":148250,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJen2RzCRA9TVsSAnZWagAA5KoQAJ9gb4irUZJnnojF0Eaq\nzW0ByZW/iLd1zwcXtDfP3WcZXhtLK2ou+uP80SxfgHSXE7CgQL+KO+ID34RB\n5JuQA0XaPukYv1N/26l1zhLRGuKM808HjA0YdInra2jFhBaNeVST9XNtjW4z\noUjcfUjrnWm2Ys6jQZb5trtj2yAUi1VgmcaBXLSRcO+iSuUCmb2HObD6srvz\nhDAl8mlqg8bRyPjCVZg5KT6fZGe1xS/jFoTaUV8VALmMGZ0BSWIcL1pJ16E7\nEQZ3r9vnnGK22YYS+V34nogE6H444R4i+pjLhm6rqzp2wD/5DTKJr6DDBTKn\nzeA1hdxlkPhUZd+KYYCEh7GbIY45FfJs4OfxkksIjw3xcJEjOCniok2BK2BV\n1tYvmwL0Mvs06XDNb0MrXtjRFbSiPa/aRTAipaAAa3/E1EaQxdHzGx/tlyRz\nblimBLP23Ei9nDtE42GFE2JI2Ox8VVFzot9DMNseFzO6pnBrvgrVPeQkaClB\nGmAA1OCm0bxCFTcqDIZpfEqY1nOcIz6yp+clL4IsElROY3lReTXphosvt3Uv\nbpoHCDb0BOWjPQPZ8qLUeftzhEgFIywHZeji4trgoMEQKW+DMCghmI4aJ4Of\nnA5FlQVfq6UXr7qStVcretK/nUEPS7Ya4zCYrUTH6+R+I8eVbq+Hx/c8OERa\nuKUt\r\n=PhEk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDiMVPQ0lMf7IWsRC3kv6cbBcxAvYQdxL6MO7sAr8SQNwIgGdirBBfS0np/DeAPo9pU5zPGT+VPaNaFLt8ch00z7Zk="}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"kalwyn+npmci@goodrx.com","name":"heydoctor-ci"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"schlegz76@gmail.com","name":"schlegz"}],"_npmUser":{"name":"heydoctor-ci","email":"kalwyn+npmci@goodrx.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_0.0.0-1906a74_1587504243159_0.22561694992698844"},"_hasShrinkwrap":false},"0.0.0-dec2378":{"name":"heydoctor-js","version":"0.0.0-dec2378","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/sappira-inc/heydoctor-js.git"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'npm run build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"npm run docs:build && npm run docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"0.0.6","@types/jest":"^24.0.23","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^23.6.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^1.18.4","npm-run-all":"4.1.3","parcel-bundler":"^1.10.3","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"readme":"# HeyDoctor Javascript SDK\n\nThe HeyDoctor Javascript library provides convenient access to the HeyDoctor API for applications written in JavaScript.\n\n## Documentation\nCheck out our [auto-generated docs](https://sappira-inc.github.io/heydoctor-js/) using [TypeDoc](http://typedoc.org).\n\n## Installation\nYou can install `heydoctor-js` using your favorite package manager.\n\n```sh\n$ yarn add heydoctor-js\n# or\n$ npm install --save heydoctor-js\n```\n\n## Usage\nYou'll first need to create a new client resource. If using the HeyDoctor SaaS platform, you'll need to provide the API key located in the EMR. The client contains the http module that will communicate with the HeyDoctor API, so we'll pass this client to the other resources you'll need.\n\n### Creating the client\n\n```js\nimport { Client, Environments, Visits, OAuth } from 'heydoctor-js';\n\n// The client will hold all configuration options and the http module\n// that communicates to our server\nconst client = new Client({\n  env: Environments.SANDBOX | Environments.PRODUCTION, // determines the API and OAuth endpoints\n});\n\n// Create two resources passing both the client we've just created\n// ** Some resources also take an optional options object as a second argument\nconst visits = new Visits(client;\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n  scope: '*',\n});\n```\n\n### Subscribing to HTTP events\nThe HeyDoctor client also doubles as an event emitter. The client extends from [Mitt](https://github.com/developit/mitt) and complies with standard EventEmitter events.\n\n```js\ninterface HttpCallback {\n  statusCode: number;\n  data: any;\n}\n\nconst client = new Client();\n\nclient.on('http:success', (data: HttpCallback) => void);\nclient.on('http:error', (data: HttpCallback) => void);\n```\n\n### Authorizing via OAuth\n\nPartnering clients will use the HeyDoctor JS SDK to create or link a HeyDoctor account. HeyDoctor conforms to the existing [OAuth2 protocol](https://oauth.net/2/). In the case that HeyDoctor already has the provided email on file, the SDK will open a dialog box, akin to Facebook or Google login, prompting the user to confirm their existing password. In all successful cases, an access token and refresh token will be returned. The resulting payload is outlined below.\n\nWe recommend to store the longstanding refresh token in a persisted data store. You’ll use this token, along with your unique client id and secret key to regenerate short lived access tokens used to authenticate requests to the HeyDoctor API. For security measures, the access token has a one hour TTL, after which the token will expire and new access token will need to be generated.\n\nUpon successful authorization, all subsequent SDK calls will be authenticated using the access token. The access token can also be utilized server-side to call our API directly.\n\n#### Example\n\n```js\nimport { Client, OAuth } from 'heydoctor-js';\n\nconst client = new Client({\n  env: 'production',\n});\n\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n});\n\n// First attempt to create a new HeyDoctor user silently. The method will throw an error in the case that the email already exists,\n// in which case you have the opportunity to present an unobtrusive dialog for the user to confirm their existing HeyDoctor password.\ntry {\n  const { accessToken, refreshToken } = await oauth.createUser({\n    email: 'frank@heydoctor.com',\n    firstName: 'Frank',\n    lastName: 'Sinatra',\n    dob: '1915-12-12',\n    gender: 'male',\n    addressLine1: '123 Somewhere Street',\n    city: 'Hoboken',\n    state: 'NJ',\n    zip: '07030',\n  });\n} catch (error) {\n  if (error.code === 'account_exists') {\n    const { accessToken, refreshToken } = await oauth.launchWebAuthFlow('frank@heydoctor.com');\n  }\n}\n\n// Now that the client has been authorized, we can call call other methods available in the SDK\nconst visit = await visits.create({\n  code: 'hair-loss',\n});\n\n// Excellent, we've just created our first visit. Now, we can upload photos to that visit.\nawait visit.uploadPhoto('photoId1234', 'base64photostring');\n```\n","readmeFilename":"README.md","gitHead":"61f104d8a155a95a4b3253f6b62dc7d96f3b0391","bugs":{"url":"https://github.com/sappira-inc/heydoctor-js/issues"},"homepage":"https://github.com/sappira-inc/heydoctor-js#readme","_id":"heydoctor-js@0.0.0-dec2378","_nodeVersion":"10.20.1","_npmVersion":"6.14.4","dist":{"integrity":"sha512-3mZUJjNGmCOlKgowVC9hnkmubprvYl4dataZ8uE9ZR23hv6U+Ufpu/xDiiZRbNqURcFvEqxj27zRuwbtwC71AQ==","shasum":"551ae2707c0f9d1f7322677c7e9eca3de4c7cc39","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-0.0.0-dec2378.tgz","fileCount":44,"unpackedSize":148610,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeoJzjCRA9TVsSAnZWagAAmn4P/1kcODapUScTIX6/zbtp\n40TO/tG0l/vfejmNNSlJZROl4+p0JH10fLzT2NItv7+lYki9bdje7I5fqvti\nQfLKYRCEsqGh/ig9SMCftREwW1RLJjEXuLILvScyHFUys/CzZvpIG4g7qrLY\nWN+Jona2pgFdzjALhMkrp9y+3uyuz4WjbA3QkiyhA0ARciaSy9CwbGJ2LIrF\n0lmZiHsflQnfcZ4pY/dLQZcAfsMGh0hNhWC73Z61yqAMR0n7XEqnNz6B1SDW\nLWqsZD0G62LeHjvXAsooEaUaY1ip6nMe8GypEF+L15oheXvK+e9uBSY+Cz/I\n0KPTrP50hOmj4u0VGXjVqLt9FUwrgJ+WL0wimfboY9RQqM1xrXc6mLPhhshu\n44n0P+7K32lE/k4bLp97ZH+8QPS8a8TfYBixO7ozJNdNxxGP6jQg+6d3+D66\n0JzpNk1bXWzUeNZSPZD5awTdQ3F0G0Wcd97/9d93E8pjsyA8PNcfc3uy91Wg\nS7ReTzlwUG5/bv0cG9LK+VtTnAk+iCWT5dVY1HiC20aZqgkI732gj5EQRUSC\nGSaRqybX9/UTEYf+tczneKlJskLt6xsFDMmvJeAlXQsv4Ft/9ByLL6o0uRvt\nLwPVJUPwKknJ4iSwTZa/G7aTBx90va4MNtwE7e50VIna6EkeVR6tIyEv9J2c\nxgLS\r\n=6g81\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICR2L4Ccq8FG4v5b0xzOsLutAoIYcOv1vA+U5jDPnpwoAiA1p7LF1kE+E4a43bAX+i6UYeCTkkKg+oQCWG18SkuZJQ=="}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"kalwyn+npmci@goodrx.com","name":"heydoctor-ci"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"schlegz76@gmail.com","name":"schlegz"}],"_npmUser":{"name":"heydoctor-ci","email":"kalwyn+npmci@goodrx.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_0.0.0-dec2378_1587584227057_0.5998174251645645"},"_hasShrinkwrap":false},"0.0.0-218f348":{"name":"heydoctor-js","version":"0.0.0-218f348","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/sappira-inc/heydoctor-js.git"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'npm run build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"npm run docs:build && npm run docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"0.0.6","@types/jest":"^24.0.23","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^23.6.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^1.18.4","npm-run-all":"4.1.3","parcel-bundler":"^1.10.3","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"readme":"# HeyDoctor Javascript SDK\n\nThe HeyDoctor Javascript library provides convenient access to the HeyDoctor API for applications written in JavaScript.\n\n## Documentation\nCheck out our [auto-generated docs](https://sappira-inc.github.io/heydoctor-js/) using [TypeDoc](http://typedoc.org).\n\n## Installation\nYou can install `heydoctor-js` using your favorite package manager.\n\n```sh\n$ yarn add heydoctor-js\n# or\n$ npm install --save heydoctor-js\n```\n\n## Usage\nYou'll first need to create a new client resource. If using the HeyDoctor SaaS platform, you'll need to provide the API key located in the EMR. The client contains the http module that will communicate with the HeyDoctor API, so we'll pass this client to the other resources you'll need.\n\n### Creating the client\n\n```js\nimport { Client, Environments, Visits, OAuth } from 'heydoctor-js';\n\n// The client will hold all configuration options and the http module\n// that communicates to our server\nconst client = new Client({\n  env: Environments.SANDBOX | Environments.PRODUCTION, // determines the API and OAuth endpoints\n});\n\n// Create two resources passing both the client we've just created\n// ** Some resources also take an optional options object as a second argument\nconst visits = new Visits(client;\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n  scope: '*',\n});\n```\n\n### Subscribing to HTTP events\nThe HeyDoctor client also doubles as an event emitter. The client extends from [Mitt](https://github.com/developit/mitt) and complies with standard EventEmitter events.\n\n```js\ninterface HttpCallback {\n  statusCode: number;\n  data: any;\n}\n\nconst client = new Client();\n\nclient.on('http:success', (data: HttpCallback) => void);\nclient.on('http:error', (data: HttpCallback) => void);\n```\n\n### Authorizing via OAuth\n\nPartnering clients will use the HeyDoctor JS SDK to create or link a HeyDoctor account. HeyDoctor conforms to the existing [OAuth2 protocol](https://oauth.net/2/). In the case that HeyDoctor already has the provided email on file, the SDK will open a dialog box, akin to Facebook or Google login, prompting the user to confirm their existing password. In all successful cases, an access token and refresh token will be returned. The resulting payload is outlined below.\n\nWe recommend to store the longstanding refresh token in a persisted data store. You’ll use this token, along with your unique client id and secret key to regenerate short lived access tokens used to authenticate requests to the HeyDoctor API. For security measures, the access token has a one hour TTL, after which the token will expire and new access token will need to be generated.\n\nUpon successful authorization, all subsequent SDK calls will be authenticated using the access token. The access token can also be utilized server-side to call our API directly.\n\n#### Example\n\n```js\nimport { Client, OAuth } from 'heydoctor-js';\n\nconst client = new Client({\n  env: 'production',\n});\n\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n});\n\n// First attempt to create a new HeyDoctor user silently. The method will throw an error in the case that the email already exists,\n// in which case you have the opportunity to present an unobtrusive dialog for the user to confirm their existing HeyDoctor password.\ntry {\n  const { accessToken, refreshToken } = await oauth.createUser({\n    email: 'frank@heydoctor.com',\n    firstName: 'Frank',\n    lastName: 'Sinatra',\n    dob: '1915-12-12',\n    gender: 'male',\n    addressLine1: '123 Somewhere Street',\n    city: 'Hoboken',\n    state: 'NJ',\n    zip: '07030',\n  });\n} catch (error) {\n  if (error.code === 'account_exists') {\n    const { accessToken, refreshToken } = await oauth.launchWebAuthFlow('frank@heydoctor.com');\n  }\n}\n\n// Now that the client has been authorized, we can call call other methods available in the SDK\nconst visit = await visits.create({\n  code: 'hair-loss',\n});\n\n// Excellent, we've just created our first visit. Now, we can upload photos to that visit.\nawait visit.uploadPhoto('photoId1234', 'base64photostring');\n```\n","readmeFilename":"README.md","gitHead":"7d70c194affe825e12ba0277f6f0ab79093ed1b0","bugs":{"url":"https://github.com/sappira-inc/heydoctor-js/issues"},"homepage":"https://github.com/sappira-inc/heydoctor-js#readme","_id":"heydoctor-js@0.0.0-218f348","_nodeVersion":"10.20.1","_npmVersion":"6.14.4","dist":{"integrity":"sha512-6MMABvTwIAutaIWB+lbQe73Ug9pxamyj5RUc1tUJrCDSb3p0PP3pkiskbcWJZ9irvCAR61JRhN5L8iujXhEM1Q==","shasum":"62cab8f0b3685da30a5d134655d68fd6cfbbee60","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-0.0.0-218f348.tgz","fileCount":44,"unpackedSize":148598,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeoJ9ECRA9TVsSAnZWagAALwkP/0YTR+5hrrC23KkJ35qh\nx7SZ4PLHNuWvgAw/1tJN7Z6yMjqgor6syguimr//db5/S5mrRlBhM9wlGNJs\n/sjcz3dfPO3GLNOjh/HdgAiVqPaqrGObNKmYBc0a63vekxT29RUwVStnkKsi\nJkylyHeoYpew8lVU3ikGskh5e/s+8AwbzPt934f8iqzXb/WUR426RsmfFmvN\nrs9E6vk5Q9GSoX2ysltCyQOnQxvXe+x/s7NJ8enZa3icSmEttuYZh9Ug7x7u\nEd0nv600bmb43+xX1EQy+9EUXLG5RjHxOIXaJqRv3sznhG4V3DtOtAZZZ07g\nfBeBTBOo2OWHhNTcYQ+RwPvfQvwQecyOn8Hcm6l7FhAn95xAKz9/Wsd6ERp6\ntc+LgJ02U2EetZ5T70sFXL41+Sx8Z/FFJyvHtG/bJYrrc9tXnNR++digr8S4\nNtaOBIDaXLBN0FnZRbgRjJHvWqZBsWjYMVxOHywAajQj3Vtv84GkzXm2u5Aa\nU7SD6pzkKf+oCyiShQHikEm7VAEQpiB/32xUjImkT4R/IDu4rWQ8BH2NHgF0\nKqVMqmg83PazGmRfhre25WS86qflyHlCBlaY7Elr5FyY5LQjhVgo/Ly/sbNA\nH8qvgpmIap5leFe5//kUQY4jhdGg4ye/KruN7tIzu/UBJiEC2dYJCqPDjhl6\nbU37\r\n=YWIY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDSMfc7A+PdlvQSus2dx7DWA6w3gk5CDZHctCyBsX5vkwIgL7Qmpa6X5m3AFEViaVwWHG/Oo7W9IEkxbO+wp68cBq4="}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"kalwyn+npmci@goodrx.com","name":"heydoctor-ci"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"schlegz76@gmail.com","name":"schlegz"}],"_npmUser":{"name":"heydoctor-ci","email":"kalwyn+npmci@goodrx.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_0.0.0-218f348_1587584835571_0.7596399638120437"},"_hasShrinkwrap":false},"0.0.0-68afedd":{"name":"heydoctor-js","version":"0.0.0-68afedd","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/sappira-inc/heydoctor-js.git"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'npm run build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"npm run docs:build && npm run docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"0.0.6","@types/jest":"^24.0.23","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^23.6.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^1.18.4","npm-run-all":"4.1.3","parcel-bundler":"^1.10.3","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"readme":"# HeyDoctor Javascript SDK\n\nThe HeyDoctor Javascript library provides convenient access to the HeyDoctor API for applications written in JavaScript.\n\n## Documentation\nCheck out our [auto-generated docs](https://sappira-inc.github.io/heydoctor-js/) using [TypeDoc](http://typedoc.org).\n\n## Installation\nYou can install `heydoctor-js` using your favorite package manager.\n\n```sh\n$ yarn add heydoctor-js\n# or\n$ npm install --save heydoctor-js\n```\n\n## Usage\nYou'll first need to create a new client resource. If using the HeyDoctor SaaS platform, you'll need to provide the API key located in the EMR. The client contains the http module that will communicate with the HeyDoctor API, so we'll pass this client to the other resources you'll need.\n\n### Creating the client\n\n```js\nimport { Client, Environments, Visits, OAuth } from 'heydoctor-js';\n\n// The client will hold all configuration options and the http module\n// that communicates to our server\nconst client = new Client({\n  env: Environments.SANDBOX | Environments.PRODUCTION, // determines the API and OAuth endpoints\n});\n\n// Create two resources passing both the client we've just created\n// ** Some resources also take an optional options object as a second argument\nconst visits = new Visits(client;\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n  scope: '*',\n});\n```\n\n### Subscribing to HTTP events\nThe HeyDoctor client also doubles as an event emitter. The client extends from [Mitt](https://github.com/developit/mitt) and complies with standard EventEmitter events.\n\n```js\ninterface HttpCallback {\n  statusCode: number;\n  data: any;\n}\n\nconst client = new Client();\n\nclient.on('http:success', (data: HttpCallback) => void);\nclient.on('http:error', (data: HttpCallback) => void);\n```\n\n### Authorizing via OAuth\n\nPartnering clients will use the HeyDoctor JS SDK to create or link a HeyDoctor account. HeyDoctor conforms to the existing [OAuth2 protocol](https://oauth.net/2/). In the case that HeyDoctor already has the provided email on file, the SDK will open a dialog box, akin to Facebook or Google login, prompting the user to confirm their existing password. In all successful cases, an access token and refresh token will be returned. The resulting payload is outlined below.\n\nWe recommend to store the longstanding refresh token in a persisted data store. You’ll use this token, along with your unique client id and secret key to regenerate short lived access tokens used to authenticate requests to the HeyDoctor API. For security measures, the access token has a one hour TTL, after which the token will expire and new access token will need to be generated.\n\nUpon successful authorization, all subsequent SDK calls will be authenticated using the access token. The access token can also be utilized server-side to call our API directly.\n\n#### Example\n\n```js\nimport { Client, OAuth } from 'heydoctor-js';\n\nconst client = new Client({\n  env: 'production',\n});\n\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n});\n\n// First attempt to create a new HeyDoctor user silently. The method will throw an error in the case that the email already exists,\n// in which case you have the opportunity to present an unobtrusive dialog for the user to confirm their existing HeyDoctor password.\ntry {\n  const { accessToken, refreshToken } = await oauth.createUser({\n    email: 'frank@heydoctor.com',\n    firstName: 'Frank',\n    lastName: 'Sinatra',\n    dob: '1915-12-12',\n    gender: 'male',\n    addressLine1: '123 Somewhere Street',\n    city: 'Hoboken',\n    state: 'NJ',\n    zip: '07030',\n  });\n} catch (error) {\n  if (error.code === 'account_exists') {\n    const { accessToken, refreshToken } = await oauth.launchWebAuthFlow('frank@heydoctor.com');\n  }\n}\n\n// Now that the client has been authorized, we can call call other methods available in the SDK\nconst visit = await visits.create({\n  code: 'hair-loss',\n});\n\n// Excellent, we've just created our first visit. Now, we can upload photos to that visit.\nawait visit.uploadPhoto('photoId1234', 'base64photostring');\n```\n","readmeFilename":"README.md","gitHead":"602b3624f2691e41212a5cb495070e30bf14b7bb","bugs":{"url":"https://github.com/sappira-inc/heydoctor-js/issues"},"homepage":"https://github.com/sappira-inc/heydoctor-js#readme","_id":"heydoctor-js@0.0.0-68afedd","_nodeVersion":"10.20.1","_npmVersion":"6.14.4","dist":{"integrity":"sha512-0m27RYAuJinwvELMq1lRIOjj8ppBk5h9DuncxKQUX9Es30gUuPZFRKkIkIrH47wus7ViBkGaKjVbyS4G+60JWw==","shasum":"05e759cf561fdea7ad9fc0cca1142caf3b145b54","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-0.0.0-68afedd.tgz","fileCount":44,"unpackedSize":148583,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeoLJgCRA9TVsSAnZWagAA4hoP/RWw7NxaKGAzeeMSxnMC\nNJI2NModBcwlXyOqfbZsxnDzki7Oq6iwSKhUjnHXFkPudkGJ6q9z73E3cIgm\nGUU0ertJ8P6qJhUpfX+voEc1SPruOQsjq9dq8xPJNPYH6cXZzn+vRVGC6I7V\nyC9paJTSY3DhbJW2FHDeXt73+NVjCnXsLvEjXMAAx6nRXay/KGO9/3eqg32D\n3HnezvIacxknGlzd06PNu/NiBimgqKeHObTB383ARVSIfLRBxeyCrc/cxK1t\n5APQ48Au5TIJjmptF4BIYFXrXhR8OYu1eVTglyaXo+49txPKFvpsp5EZgCye\nVYzEWSt1mT93DUE17h9Vbf0oQ+DElLsRuvIAYi2Tc9ggGwp6dwpYZxz0H23o\n9bz+1p/nF7HLmpA1AaVvVu3L8yFktGC8cdDauMSH9uJkVNXlINqbVygVjq2W\nJvUEFMKgwNbC/TVTa3nQQxt1qFGDZBTBFXU/X/nMwZWeeIw1H6qjtlc4ygf2\npmWRlVcVYSLGt6fqOUBuVdRhdZQ25c+8pDbxD4jsvgAFpyEqawE52PTDWkSl\nH2GRd+q3Gq2a7LRd2mKH+V/6N3oyoaIboQgPVccYqaXVgo+cDms6h0Ajv5BT\nJ6LO9BO2jbYMiVCO2E9bS2py2lzmflSKqT88ABqZ+HkPK6+aRIh9ndSmSxwC\n41+7\r\n=Tli+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDm/g2IAoWIr97JxJBVUuPTpWFklXkN71Sh3Z8wbOc/qwIhAKtZ0wC8LVF540k1+ynoERq+ioyqZRtqB1svZ2JlYRCC"}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"kalwyn+npmci@goodrx.com","name":"heydoctor-ci"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"schlegz76@gmail.com","name":"schlegz"}],"_npmUser":{"name":"heydoctor-ci","email":"kalwyn+npmci@goodrx.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_0.0.0-68afedd_1587589728180_0.4239608700046791"},"_hasShrinkwrap":false},"0.0.0-a72991b":{"name":"heydoctor-js","version":"0.0.0-a72991b","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/sappira-inc/heydoctor-js.git"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'npm run build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"npm run docs:build && npm run docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"0.0.6","@types/jest":"^24.0.23","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^23.6.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^1.18.4","npm-run-all":"4.1.3","parcel-bundler":"^1.10.3","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"readme":"# HeyDoctor Javascript SDK\n\nThe HeyDoctor Javascript library provides convenient access to the HeyDoctor API for applications written in JavaScript.\n\n## Documentation\nCheck out our [auto-generated docs](https://sappira-inc.github.io/heydoctor-js/) using [TypeDoc](http://typedoc.org).\n\n## Installation\nYou can install `heydoctor-js` using your favorite package manager.\n\n```sh\n$ yarn add heydoctor-js\n# or\n$ npm install --save heydoctor-js\n```\n\n## Usage\nYou'll first need to create a new client resource. If using the HeyDoctor SaaS platform, you'll need to provide the API key located in the EMR. The client contains the http module that will communicate with the HeyDoctor API, so we'll pass this client to the other resources you'll need.\n\n### Creating the client\n\n```js\nimport { Client, Environments, Visits, OAuth } from 'heydoctor-js';\n\n// The client will hold all configuration options and the http module\n// that communicates to our server\nconst client = new Client({\n  env: Environments.SANDBOX | Environments.PRODUCTION, // determines the API and OAuth endpoints\n});\n\n// Create two resources passing both the client we've just created\n// ** Some resources also take an optional options object as a second argument\nconst visits = new Visits(client;\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n  scope: '*',\n});\n```\n\n### Subscribing to HTTP events\nThe HeyDoctor client also doubles as an event emitter. The client extends from [Mitt](https://github.com/developit/mitt) and complies with standard EventEmitter events.\n\n```js\ninterface HttpCallback {\n  statusCode: number;\n  data: any;\n}\n\nconst client = new Client();\n\nclient.on('http:success', (data: HttpCallback) => void);\nclient.on('http:error', (data: HttpCallback) => void);\n```\n\n### Authorizing via OAuth\n\nPartnering clients will use the HeyDoctor JS SDK to create or link a HeyDoctor account. HeyDoctor conforms to the existing [OAuth2 protocol](https://oauth.net/2/). In the case that HeyDoctor already has the provided email on file, the SDK will open a dialog box, akin to Facebook or Google login, prompting the user to confirm their existing password. In all successful cases, an access token and refresh token will be returned. The resulting payload is outlined below.\n\nWe recommend to store the longstanding refresh token in a persisted data store. You’ll use this token, along with your unique client id and secret key to regenerate short lived access tokens used to authenticate requests to the HeyDoctor API. For security measures, the access token has a one hour TTL, after which the token will expire and new access token will need to be generated.\n\nUpon successful authorization, all subsequent SDK calls will be authenticated using the access token. The access token can also be utilized server-side to call our API directly.\n\n#### Example\n\n```js\nimport { Client, OAuth } from 'heydoctor-js';\n\nconst client = new Client({\n  env: 'production',\n});\n\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n});\n\n// First attempt to create a new HeyDoctor user silently. The method will throw an error in the case that the email already exists,\n// in which case you have the opportunity to present an unobtrusive dialog for the user to confirm their existing HeyDoctor password.\ntry {\n  const { accessToken, refreshToken } = await oauth.createUser({\n    email: 'frank@heydoctor.com',\n    firstName: 'Frank',\n    lastName: 'Sinatra',\n    dob: '1915-12-12',\n    gender: 'male',\n    addressLine1: '123 Somewhere Street',\n    city: 'Hoboken',\n    state: 'NJ',\n    zip: '07030',\n  });\n} catch (error) {\n  if (error.code === 'account_exists') {\n    const { accessToken, refreshToken } = await oauth.launchWebAuthFlow('frank@heydoctor.com');\n  }\n}\n\n// Now that the client has been authorized, we can call call other methods available in the SDK\nconst visit = await visits.create({\n  code: 'hair-loss',\n});\n\n// Excellent, we've just created our first visit. Now, we can upload photos to that visit.\nawait visit.uploadPhoto('photoId1234', 'base64photostring');\n```\n","readmeFilename":"README.md","gitHead":"428f7516358b0adc4be900b195014ae487965e18","bugs":{"url":"https://github.com/sappira-inc/heydoctor-js/issues"},"homepage":"https://github.com/sappira-inc/heydoctor-js#readme","_id":"heydoctor-js@0.0.0-a72991b","_nodeVersion":"10.20.1","_npmVersion":"6.14.4","dist":{"integrity":"sha512-BzadVm+qVb6zqyR8Hg9vgFTFmFeALX1h6UQrbhyPr71KQ+TPuVmWjclYYf2hLE7PmGsp6JJByytUHQGgscISCg==","shasum":"7ccab041b3a4337d706a8fb6bb7d99157d9d7822","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-0.0.0-a72991b.tgz","fileCount":44,"unpackedSize":148575,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeoLbWCRA9TVsSAnZWagAAdkoP+wc/kUoVbrdTx4HfkR31\n1KzrEoIkRkMFlis2sLLLal93RBN2UNdOEoUL6Wk2zVbIRr2CBAHZ+RzuBFhV\nH9vElLok8LId27xJCsfwn4FyNvec37Yhjbz4dO8JOHqibYSCqNcfV/NEUh5u\npI3N38h7aNmLNbjs/1NoCTutAdb9A1hBFrSXfkwwUtoEkFggHGQIx3+A+afC\nvnrj8EW6KUZSOI90w2B4Dof8yLOCC4jrHyhXUctrJCSatiwCjMErXFEpt6D0\nhPZ6m6dfq92LXHMb6/6DYwEh7gMgv5NnE7FpGPWrNC/d9q57k3Nnfu1rsY7I\n0dRU6bvaRYvacn4MKuB3jyDnvQPVAALeXRj1AIQIDoAL2OFdpcktjdog0V6O\nBier5NBid2VXPVidyjCEdXNJwYBmPNnWXJPx1UeY0agOxPma3xuD7nqdlXBF\nuKt1h1R8gQl5M6GUAuqYK8LRtueX3A3rfZsxvLD7PE+e7zJFyXRgss3fes29\nrf6kVIyx6NxZO+w5rfODrhBq6LPyBXQfM2jisE69MieHYu6qfnhts/NWz49D\nUOK5Rotq5NbdJTBnLEWAAn5jbngCzb4fcbgJ19sMwoh9fFUFNV+2pUcdZLUq\nscGP3pIYH8PYXVWdtVlKEqpphmRdX61RWb5nUC1+sWfn1R2vfHrgQR9WN7nf\n18Af\r\n=/44o\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDYngCtGIyYqNmJGMC/40kTgL6qOnIaSuyzxBqnzF44VAiBTGFZyaNr9vM/agjL/GxVAKmWnGym5zBcrdluyI9DhHQ=="}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"kalwyn+npmci@goodrx.com","name":"heydoctor-ci"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"schlegz76@gmail.com","name":"schlegz"}],"_npmUser":{"name":"heydoctor-ci","email":"kalwyn+npmci@goodrx.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_0.0.0-a72991b_1587590870436_0.6919743225323889"},"_hasShrinkwrap":false},"0.0.0-c3f0706":{"name":"heydoctor-js","version":"0.0.0-c3f0706","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/sappira-inc/heydoctor-js.git"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'npm run build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"npm run docs:build && npm run docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"0.0.6","@types/jest":"^24.0.23","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^23.6.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^1.18.4","npm-run-all":"4.1.3","parcel-bundler":"^1.10.3","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"readme":"# HeyDoctor Javascript SDK\n\nThe HeyDoctor Javascript library provides convenient access to the HeyDoctor API for applications written in JavaScript.\n\n## Documentation\nCheck out our [auto-generated docs](https://sappira-inc.github.io/heydoctor-js/) using [TypeDoc](http://typedoc.org).\n\n## Installation\nYou can install `heydoctor-js` using your favorite package manager.\n\n```sh\n$ yarn add heydoctor-js\n# or\n$ npm install --save heydoctor-js\n```\n\n## Usage\nYou'll first need to create a new client resource. If using the HeyDoctor SaaS platform, you'll need to provide the API key located in the EMR. The client contains the http module that will communicate with the HeyDoctor API, so we'll pass this client to the other resources you'll need.\n\n### Creating the client\n\n```js\nimport { Client, Environments, Visits, OAuth } from 'heydoctor-js';\n\n// The client will hold all configuration options and the http module\n// that communicates to our server\nconst client = new Client({\n  env: Environments.SANDBOX | Environments.PRODUCTION, // determines the API and OAuth endpoints\n});\n\n// Create two resources passing both the client we've just created\n// ** Some resources also take an optional options object as a second argument\nconst visits = new Visits(client;\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n  scope: '*',\n});\n```\n\n### Subscribing to HTTP events\nThe HeyDoctor client also doubles as an event emitter. The client extends from [Mitt](https://github.com/developit/mitt) and complies with standard EventEmitter events.\n\n```js\ninterface HttpCallback {\n  statusCode: number;\n  data: any;\n}\n\nconst client = new Client();\n\nclient.on('http:success', (data: HttpCallback) => void);\nclient.on('http:error', (data: HttpCallback) => void);\n```\n\n### Authorizing via OAuth\n\nPartnering clients will use the HeyDoctor JS SDK to create or link a HeyDoctor account. HeyDoctor conforms to the existing [OAuth2 protocol](https://oauth.net/2/). In the case that HeyDoctor already has the provided email on file, the SDK will open a dialog box, akin to Facebook or Google login, prompting the user to confirm their existing password. In all successful cases, an access token and refresh token will be returned. The resulting payload is outlined below.\n\nWe recommend to store the longstanding refresh token in a persisted data store. You’ll use this token, along with your unique client id and secret key to regenerate short lived access tokens used to authenticate requests to the HeyDoctor API. For security measures, the access token has a one hour TTL, after which the token will expire and new access token will need to be generated.\n\nUpon successful authorization, all subsequent SDK calls will be authenticated using the access token. The access token can also be utilized server-side to call our API directly.\n\n#### Example\n\n```js\nimport { Client, OAuth } from 'heydoctor-js';\n\nconst client = new Client({\n  env: 'production',\n});\n\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n});\n\n// First attempt to create a new HeyDoctor user silently. The method will throw an error in the case that the email already exists,\n// in which case you have the opportunity to present an unobtrusive dialog for the user to confirm their existing HeyDoctor password.\ntry {\n  const { accessToken, refreshToken } = await oauth.createUser({\n    email: 'frank@heydoctor.com',\n    firstName: 'Frank',\n    lastName: 'Sinatra',\n    dob: '1915-12-12',\n    gender: 'male',\n    addressLine1: '123 Somewhere Street',\n    city: 'Hoboken',\n    state: 'NJ',\n    zip: '07030',\n  });\n} catch (error) {\n  if (error.code === 'account_exists') {\n    const { accessToken, refreshToken } = await oauth.launchWebAuthFlow('frank@heydoctor.com');\n  }\n}\n\n// Now that the client has been authorized, we can call call other methods available in the SDK\nconst visit = await visits.create({\n  code: 'hair-loss',\n});\n\n// Excellent, we've just created our first visit. Now, we can upload photos to that visit.\nawait visit.uploadPhoto('photoId1234', 'base64photostring');\n```\n","readmeFilename":"README.md","gitHead":"97220ed42e16b5faaa9e373341e1d803303ec94d","bugs":{"url":"https://github.com/sappira-inc/heydoctor-js/issues"},"homepage":"https://github.com/sappira-inc/heydoctor-js#readme","_id":"heydoctor-js@0.0.0-c3f0706","_nodeVersion":"10.20.1","_npmVersion":"6.14.4","dist":{"integrity":"sha512-zl242NqZ4WxnqvT7oxuVEtk0Xhv4vLYe0Ibjrrw6Lxwh6L265MhWOUa+9Wsp7WclDUgO7lZ2EQXxdpALl3H9tQ==","shasum":"47ee94aad38a1535c12f0a365e907f9ea31fac26","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-0.0.0-c3f0706.tgz","fileCount":44,"unpackedSize":148590,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeoLfKCRA9TVsSAnZWagAAVXUP/13JHOxU0zbc22VxdXgm\nYFuAjVpGeLvNG/SQKuGPdi/kg7HoquT+mODrPhKlJIIUUSmSHCB9QTnPScFy\n7z9ZibRLGhlgG0VFydCbN9epuGmxC1vUIELYDqrIYw6jRqihHP9VIPqrpZvZ\nIz1EpnzZ079Pdb11CF3riMXKooAnm1vu30WBFHBG4tUf6YuZ0kfT3LSI+lDV\nbFGkW1GoYTVzO7r1NKkT3HvABCNQrN2wD+vRJbWyJ1b0OeqQ2w3jd9AUQdNB\nbgyeyvhQAyucYTVe4XFgAW2FRAIMHN4E9qydR2VcKVws6BhrDezOMp8cTs6s\nTf3VVS/4lm/w731t+G1hJspwOOS1yCt1EA9xJjC5Pw6Y0JX0nJog9X/JZ4de\naFMJgbyIY9G5/LriOaWueQHdRgyRxEU1O9yallkI9QLvH5sgt5Qz/rRn+w/f\nM+gnnVTaE2kqc7JUS9york4RaPDKDheEeWuRHdGAPP1/YCwQFGbUV6HTWtmc\nnLrpMqKFqnp8hvFgdtLZ17yMp9BfAqdvhyXcDGhGQtNa5dLnDpltjrDiG06i\ntuN6pYrrcoPymA/WxyuInMwiAC5eRfeseK3BZ4P0NXHem4GyK+W/FCLgP1bn\nCvy5Sm62Vo/0w+OBWshzqoL5iGc2M10h+tCbkRcfj+lWGTYKhqpQ1ATFdyLO\nboQw\r\n=XzAu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICu4Y6dR0gr7r91Z+6UzHdq7t6hwAaB/SFcJ8rERc87gAiArSwiH0Gz1+4tn00fB8O5wZ4sWot6Gk/BKQinmPQEiiQ=="}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"kalwyn+npmci@goodrx.com","name":"heydoctor-ci"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"schlegz76@gmail.com","name":"schlegz"}],"_npmUser":{"name":"heydoctor-ci","email":"kalwyn+npmci@goodrx.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_0.0.0-c3f0706_1587591113788_0.1739994835142209"},"_hasShrinkwrap":false},"0.0.0-14c3536":{"name":"heydoctor-js","version":"0.0.0-14c3536","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/sappira-inc/heydoctor-js.git"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'npm run build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"npm run docs:build && npm run docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"0.0.6","@types/jest":"^24.0.23","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^23.6.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^1.18.4","npm-run-all":"4.1.3","parcel-bundler":"^1.10.3","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"readme":"# HeyDoctor Javascript SDK\n\nThe HeyDoctor Javascript library provides convenient access to the HeyDoctor API for applications written in JavaScript.\n\n## Documentation\nCheck out our [auto-generated docs](https://sappira-inc.github.io/heydoctor-js/) using [TypeDoc](http://typedoc.org).\n\n## Installation\nYou can install `heydoctor-js` using your favorite package manager.\n\n```sh\n$ yarn add heydoctor-js\n# or\n$ npm install --save heydoctor-js\n```\n\n## Usage\nYou'll first need to create a new client resource. If using the HeyDoctor SaaS platform, you'll need to provide the API key located in the EMR. The client contains the http module that will communicate with the HeyDoctor API, so we'll pass this client to the other resources you'll need.\n\n### Creating the client\n\n```js\nimport { Client, Environments, Visits, OAuth } from 'heydoctor-js';\n\n// The client will hold all configuration options and the http module\n// that communicates to our server\nconst client = new Client({\n  env: Environments.SANDBOX | Environments.PRODUCTION, // determines the API and OAuth endpoints\n});\n\n// Create two resources passing both the client we've just created\n// ** Some resources also take an optional options object as a second argument\nconst visits = new Visits(client;\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n  scope: '*',\n});\n```\n\n### Subscribing to HTTP events\nThe HeyDoctor client also doubles as an event emitter. The client extends from [Mitt](https://github.com/developit/mitt) and complies with standard EventEmitter events.\n\n```js\ninterface HttpCallback {\n  statusCode: number;\n  data: any;\n}\n\nconst client = new Client();\n\nclient.on('http:success', (data: HttpCallback) => void);\nclient.on('http:error', (data: HttpCallback) => void);\n```\n\n### Authorizing via OAuth\n\nPartnering clients will use the HeyDoctor JS SDK to create or link a HeyDoctor account. HeyDoctor conforms to the existing [OAuth2 protocol](https://oauth.net/2/). In the case that HeyDoctor already has the provided email on file, the SDK will open a dialog box, akin to Facebook or Google login, prompting the user to confirm their existing password. In all successful cases, an access token and refresh token will be returned. The resulting payload is outlined below.\n\nWe recommend to store the longstanding refresh token in a persisted data store. You’ll use this token, along with your unique client id and secret key to regenerate short lived access tokens used to authenticate requests to the HeyDoctor API. For security measures, the access token has a one hour TTL, after which the token will expire and new access token will need to be generated.\n\nUpon successful authorization, all subsequent SDK calls will be authenticated using the access token. The access token can also be utilized server-side to call our API directly.\n\n#### Example\n\n```js\nimport { Client, OAuth } from 'heydoctor-js';\n\nconst client = new Client({\n  env: 'production',\n});\n\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n});\n\n// First attempt to create a new HeyDoctor user silently. The method will throw an error in the case that the email already exists,\n// in which case you have the opportunity to present an unobtrusive dialog for the user to confirm their existing HeyDoctor password.\ntry {\n  const { accessToken, refreshToken } = await oauth.createUser({\n    email: 'frank@heydoctor.com',\n    firstName: 'Frank',\n    lastName: 'Sinatra',\n    dob: '1915-12-12',\n    gender: 'male',\n    addressLine1: '123 Somewhere Street',\n    city: 'Hoboken',\n    state: 'NJ',\n    zip: '07030',\n  });\n} catch (error) {\n  if (error.code === 'account_exists') {\n    const { accessToken, refreshToken } = await oauth.launchWebAuthFlow('frank@heydoctor.com');\n  }\n}\n\n// Now that the client has been authorized, we can call call other methods available in the SDK\nconst visit = await visits.create({\n  code: 'hair-loss',\n});\n\n// Excellent, we've just created our first visit. Now, we can upload photos to that visit.\nawait visit.uploadPhoto('photoId1234', 'base64photostring');\n```\n","readmeFilename":"README.md","gitHead":"0186273616be8d3785fd41a21366ec48066ed416","bugs":{"url":"https://github.com/sappira-inc/heydoctor-js/issues"},"homepage":"https://github.com/sappira-inc/heydoctor-js#readme","_id":"heydoctor-js@0.0.0-14c3536","_nodeVersion":"10.20.1","_npmVersion":"6.14.4","dist":{"integrity":"sha512-2jz7DfvOIC+vxmxya29z2IFfDf6ZFAq0bARg3EUpCVsCg294gU8CkelZXMdagNRZnRGle6/TIYMlMEZnXyN5bA==","shasum":"c4e70eab269a23325ddb197d4c99ccea6cd94fdf","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-0.0.0-14c3536.tgz","fileCount":44,"unpackedSize":149842,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeoL1sCRA9TVsSAnZWagAA9c4QAJCWZFOPnUOmC68Xrvwk\nYcv5bKr/PxuqoaEeYDZiGFCYCTrVi0gNE3+Qj9+oWFjcH1VKQdEQ9VYl27jg\n6QbeyWZwU5ZDQiE1gwCqknz5dTm1GkXqND5UTB34uSC9x/yCGH4ZwJS/kh1b\nu+hnvhMTJVA8TOMRqU2CSNMUYxIKXBpFqPIDVu8xEYGBxHWXvGACJvBYKbut\nVoRrDj2rwj6CshP0ymaZFpXGsSHCgQU6HQcWtqJoXReJQMxf32USWOIp2zmp\nRueZ/hUF17vlsl0wvbkbOVk5Tqv9VqrVvqshl1TeuyUk+nGKQgAkcRuEmFVA\nqyS9lEt2i3baaHxVpN27yeKpPO8Ve268kQxuuWcUjYRza8dmtTIQvmABR+6r\nAKH/8O5lJ9zp4EZ5K+SrK/FHudgB5/G6e9SnOqoy2ecLugU8u1U2NtVYUsyq\nHfYIfLdllIacMB6Y+n+2b/TsEpjjUeAzG0JhVlmW8OVzYyHxc2qEw7iPnh8f\nA1u35wOUZiJ6IvQ2H+xne2A+BEZuIunFquN0y3UvTmaJ21BJESl0YXkkcp2z\nQ4D5POzbJxM9h6kYIIbFFzgWu4qIYLByeBcwyBP3P+ooBnCQOou58g0tqO6p\nO54dS7M/dA5ffNnM7FgS+4KR+LCR96y2YeQrYH4WSUgeMrzsV8+LlUEKlKrw\nCHuL\r\n=vNAE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIESBh+SqI3ibKRagO/8qbKLlCsu0EIc0cmtMVgzR/WKRAiEAxOY1zx9enYJkRMRLOwzKNhl2sa8iIVX8W+kk/TcyZgQ="}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"kalwyn+npmci@goodrx.com","name":"heydoctor-ci"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"schlegz76@gmail.com","name":"schlegz"}],"_npmUser":{"name":"heydoctor-ci","email":"kalwyn+npmci@goodrx.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_0.0.0-14c3536_1587592556500_0.6622516216297962"},"_hasShrinkwrap":false},"0.0.0-9973cb5":{"name":"heydoctor-js","version":"0.0.0-9973cb5","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/sappira-inc/heydoctor-js.git"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'npm run build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"npm run docs:build && npm run docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"0.0.6","@types/jest":"^24.0.23","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^23.6.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^1.18.4","npm-run-all":"4.1.3","parcel-bundler":"^1.10.3","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"readme":"# HeyDoctor Javascript SDK\n\nThe HeyDoctor Javascript library provides convenient access to the HeyDoctor API for applications written in JavaScript.\n\n## Documentation\nCheck out our [auto-generated docs](https://sappira-inc.github.io/heydoctor-js/) using [TypeDoc](http://typedoc.org).\n\n## Installation\nYou can install `heydoctor-js` using your favorite package manager.\n\n```sh\n$ yarn add heydoctor-js\n# or\n$ npm install --save heydoctor-js\n```\n\n## Usage\nYou'll first need to create a new client resource. If using the HeyDoctor SaaS platform, you'll need to provide the API key located in the EMR. The client contains the http module that will communicate with the HeyDoctor API, so we'll pass this client to the other resources you'll need.\n\n### Creating the client\n\n```js\nimport { Client, Environments, Visits, OAuth } from 'heydoctor-js';\n\n// The client will hold all configuration options and the http module\n// that communicates to our server\nconst client = new Client({\n  env: Environments.SANDBOX | Environments.PRODUCTION, // determines the API and OAuth endpoints\n});\n\n// Create two resources passing both the client we've just created\n// ** Some resources also take an optional options object as a second argument\nconst visits = new Visits(client;\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n  scope: '*',\n});\n```\n\n### Subscribing to HTTP events\nThe HeyDoctor client also doubles as an event emitter. The client extends from [Mitt](https://github.com/developit/mitt) and complies with standard EventEmitter events.\n\n```js\ninterface HttpCallback {\n  statusCode: number;\n  data: any;\n}\n\nconst client = new Client();\n\nclient.on('http:success', (data: HttpCallback) => void);\nclient.on('http:error', (data: HttpCallback) => void);\n```\n\n### Authorizing via OAuth\n\nPartnering clients will use the HeyDoctor JS SDK to create or link a HeyDoctor account. HeyDoctor conforms to the existing [OAuth2 protocol](https://oauth.net/2/). In the case that HeyDoctor already has the provided email on file, the SDK will open a dialog box, akin to Facebook or Google login, prompting the user to confirm their existing password. In all successful cases, an access token and refresh token will be returned. The resulting payload is outlined below.\n\nWe recommend to store the longstanding refresh token in a persisted data store. You’ll use this token, along with your unique client id and secret key to regenerate short lived access tokens used to authenticate requests to the HeyDoctor API. For security measures, the access token has a one hour TTL, after which the token will expire and new access token will need to be generated.\n\nUpon successful authorization, all subsequent SDK calls will be authenticated using the access token. The access token can also be utilized server-side to call our API directly.\n\n#### Example\n\n```js\nimport { Client, OAuth } from 'heydoctor-js';\n\nconst client = new Client({\n  env: 'production',\n});\n\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n});\n\n// First attempt to create a new HeyDoctor user silently. The method will throw an error in the case that the email already exists,\n// in which case you have the opportunity to present an unobtrusive dialog for the user to confirm their existing HeyDoctor password.\ntry {\n  const { accessToken, refreshToken } = await oauth.createUser({\n    email: 'frank@heydoctor.com',\n    firstName: 'Frank',\n    lastName: 'Sinatra',\n    dob: '1915-12-12',\n    gender: 'male',\n    addressLine1: '123 Somewhere Street',\n    city: 'Hoboken',\n    state: 'NJ',\n    zip: '07030',\n  });\n} catch (error) {\n  if (error.code === 'account_exists') {\n    const { accessToken, refreshToken } = await oauth.launchWebAuthFlow('frank@heydoctor.com');\n  }\n}\n\n// Now that the client has been authorized, we can call call other methods available in the SDK\nconst visit = await visits.create({\n  code: 'hair-loss',\n});\n\n// Excellent, we've just created our first visit. Now, we can upload photos to that visit.\nawait visit.uploadPhoto('photoId1234', 'base64photostring');\n```\n","readmeFilename":"README.md","gitHead":"48845903b59d299b6a4e4ace569ba1223aee1231","bugs":{"url":"https://github.com/sappira-inc/heydoctor-js/issues"},"homepage":"https://github.com/sappira-inc/heydoctor-js#readme","_id":"heydoctor-js@0.0.0-9973cb5","_nodeVersion":"10.20.1","_npmVersion":"6.14.4","dist":{"integrity":"sha512-rRUAEBJOUISPDvTSz2ZKnMTy6IkCzPmuPzZfR3iJuzjAWkyNqjY2WPmsz6XICYr0Zyh19PbiybHIthN0wsL8yQ==","shasum":"99e8c07c06f66bcb96512b4f3dc07d56781ba7ef","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-0.0.0-9973cb5.tgz","fileCount":44,"unpackedSize":149900,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeoNNdCRA9TVsSAnZWagAA8HkQAKM2oTgoclXGtWjaRzke\n102612azVVp8UcG80ROhGB39x8XqV2bkFSQ6V2DXdSCXktbLvngPkixfjHIJ\ndbzxGWWuGyiBlx4lhED50JoK2H4W7vJLrmCYRT1Fj+9VoWuYf0/H1dSkMs7v\ntOV2gKkl6/Rx3xh8fiX7ih/xCewslS1g4d1UCbvQZv44eJBvVLtR6m3Cywni\n5HCN08PyYJ2kiZ1hlVTolJ1r95dnxfRAXkcAPGVI4shqHsD59GbTsmKE34Ro\nWZ/GQCwJ5htquIGjuiKX88mNCYAD0ZxLJCGyIGDb1bZzrHbB6SivGRkizp+f\nrmtup23JEVnfOjHR4xFSP4b1A+2Z+9X4v6HZEJGL/beQsVgRwnFs6OZHM0tH\nF8sy7mkaL0DamNb+M607Ax98nt9RXWFLTUMNsjQj3gW433g3bLrluY9ODrZq\nuDG8YxM4Ex4T1CBNM+ndWg7PHP2xymMcNH8uIpNnSgyeccVK1e1hhiz+bGKd\nPA8Cb9/EePuwS0gHs1AAqrQ54cEYfT1Zcfn2eZJ49p4HC1YHLi9GTOFMgKUA\nz61QWZ8CXH0bap4/rCw0iFj2spybnfqYGV0bnVMlkW2XAcSzk5QamRd0rq0Y\nzj9cE9huZm6OalKKeKPqBUE96fEhrV+hUAD+9mm9+DwnQSqJ0yURxMKIk6bL\nX1aD\r\n=oYLA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICY15I7F9DCLaIkBhcODy7jNwC+XrbJ6wlLIWUJW+9nAAiAa2H+QrUcfM/UsuqfiX7AD4BZj5Nm2fs20uNntc0866A=="}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"kalwyn+npmci@goodrx.com","name":"heydoctor-ci"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"schlegz76@gmail.com","name":"schlegz"}],"_npmUser":{"name":"heydoctor-ci","email":"kalwyn+npmci@goodrx.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_0.0.0-9973cb5_1587598172567_0.7913189429659"},"_hasShrinkwrap":false},"0.0.0-50ec30b":{"name":"heydoctor-js","version":"0.0.0-50ec30b","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/sappira-inc/heydoctor-js.git"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'npm run build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"npm run docs:build && npm run docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"0.0.6","@types/jest":"^24.0.23","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^23.6.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^1.18.4","npm-run-all":"4.1.3","parcel-bundler":"^1.10.3","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"readme":"# HeyDoctor Javascript SDK\n\nThe HeyDoctor Javascript library provides convenient access to the HeyDoctor API for applications written in JavaScript.\n\n## Documentation\nCheck out our [auto-generated docs](https://sappira-inc.github.io/heydoctor-js/) using [TypeDoc](http://typedoc.org).\n\n## Installation\nYou can install `heydoctor-js` using your favorite package manager.\n\n```sh\n$ yarn add heydoctor-js\n# or\n$ npm install --save heydoctor-js\n```\n\n## Usage\nYou'll first need to create a new client resource. If using the HeyDoctor SaaS platform, you'll need to provide the API key located in the EMR. The client contains the http module that will communicate with the HeyDoctor API, so we'll pass this client to the other resources you'll need.\n\n### Creating the client\n\n```js\nimport { Client, Environments, Visits, OAuth } from 'heydoctor-js';\n\n// The client will hold all configuration options and the http module\n// that communicates to our server\nconst client = new Client({\n  env: Environments.SANDBOX | Environments.PRODUCTION, // determines the API and OAuth endpoints\n});\n\n// Create two resources passing both the client we've just created\n// ** Some resources also take an optional options object as a second argument\nconst visits = new Visits(client;\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n  scope: '*',\n});\n```\n\n### Subscribing to HTTP events\nThe HeyDoctor client also doubles as an event emitter. The client extends from [Mitt](https://github.com/developit/mitt) and complies with standard EventEmitter events.\n\n```js\ninterface HttpCallback {\n  statusCode: number;\n  data: any;\n}\n\nconst client = new Client();\n\nclient.on('http:success', (data: HttpCallback) => void);\nclient.on('http:error', (data: HttpCallback) => void);\n```\n\n### Authorizing via OAuth\n\nPartnering clients will use the HeyDoctor JS SDK to create or link a HeyDoctor account. HeyDoctor conforms to the existing [OAuth2 protocol](https://oauth.net/2/). In the case that HeyDoctor already has the provided email on file, the SDK will open a dialog box, akin to Facebook or Google login, prompting the user to confirm their existing password. In all successful cases, an access token and refresh token will be returned. The resulting payload is outlined below.\n\nWe recommend to store the longstanding refresh token in a persisted data store. You’ll use this token, along with your unique client id and secret key to regenerate short lived access tokens used to authenticate requests to the HeyDoctor API. For security measures, the access token has a one hour TTL, after which the token will expire and new access token will need to be generated.\n\nUpon successful authorization, all subsequent SDK calls will be authenticated using the access token. The access token can also be utilized server-side to call our API directly.\n\n#### Example\n\n```js\nimport { Client, OAuth } from 'heydoctor-js';\n\nconst client = new Client({\n  env: 'production',\n});\n\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n});\n\n// First attempt to create a new HeyDoctor user silently. The method will throw an error in the case that the email already exists,\n// in which case you have the opportunity to present an unobtrusive dialog for the user to confirm their existing HeyDoctor password.\ntry {\n  const { accessToken, refreshToken } = await oauth.createUser({\n    email: 'frank@heydoctor.com',\n    firstName: 'Frank',\n    lastName: 'Sinatra',\n    dob: '1915-12-12',\n    gender: 'male',\n    addressLine1: '123 Somewhere Street',\n    city: 'Hoboken',\n    state: 'NJ',\n    zip: '07030',\n  });\n} catch (error) {\n  if (error.code === 'account_exists') {\n    const { accessToken, refreshToken } = await oauth.launchWebAuthFlow('frank@heydoctor.com');\n  }\n}\n\n// Now that the client has been authorized, we can call call other methods available in the SDK\nconst visit = await visits.create({\n  code: 'hair-loss',\n});\n\n// Excellent, we've just created our first visit. Now, we can upload photos to that visit.\nawait visit.uploadPhoto('photoId1234', 'base64photostring');\n```\n","readmeFilename":"README.md","gitHead":"643578dca4d54ef0edb75f2afe3ade85cae08610","bugs":{"url":"https://github.com/sappira-inc/heydoctor-js/issues"},"homepage":"https://github.com/sappira-inc/heydoctor-js#readme","_id":"heydoctor-js@0.0.0-50ec30b","_nodeVersion":"10.20.1","_npmVersion":"6.14.4","dist":{"integrity":"sha512-abzuEcVYOb4pYN5vDfbqzqvU+TiEH8lX+uHV+WXb5v4MhpquyZIBnUhKRTtMUDkRWYJYwgItQBIoLx4wmZiPHw==","shasum":"927297dcf0378aa56d2d6658f026ec2b7e4f5db9","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-0.0.0-50ec30b.tgz","fileCount":44,"unpackedSize":151699,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeoyKkCRA9TVsSAnZWagAAOtQQAKDcndNXYC60AgJE10uh\nUrhzxSq1FkY4z2p/jA6N5T2Xkz4zq7hFONAOGb38TUzT2c3GHJls08LSqd0M\nzLd4BKWXj/PqzthlAtYd8XgbMOA74YrKkrmY3ic3IPf00qOTcIvDX830pJil\n7IVoTtsVG74Hpke/enJ3UsP3L6C8rE1jnWJTrrAUXkSUgwpAGtRFgdGISI9e\nqdAUVeG8ZnySRRoLbZT/c61cotTH/EA0O5Ma/30MwHK54mSBq2ogkcmgftY9\nQv6wkU2bOPPw76ub7pF96F8ff7aHCoJu1bEs4/nSSqXyO/BFN2j+jRKlgBu0\nYKpQbRukKEgdxjZocThKD2KBP7EZK7GJt520ZTpg4+KT+HQTzNa3PquIinm7\ndW2Y4bn7jLOwSkXAfD3L1P43vKkkPs0hGQPaXGKFGbJG6+TNtS8ZplBH2VAN\nWiHInDXXFBBUVDs0yAd7MMvw2+6oiujT8g6mtOTjDabDp/ymm4jAJyymjsd3\nJsBEPc+KSoRbVX0GAbRBNc17sCGr7C5tQyAi9DEp0KFImxVGk6Jujzdjy7te\nKCNs2Dnor/7uqxEfU31TENz0zWorB6jIDEAq33+3GibSr1oLTB+4LwjYADnV\nSbN7/hAqQf6eZhNAcYq3sGm0wezpdDOVjGYGDmKwLkzuvjKsVjyYKKgqy49g\nJDrM\r\n=KrRU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEcMLWUMRc0eeJSy7+VmSUcM+23a1ibiO4zBj2F+yyw/AiBAOVt+FahOnA0f1irhBoSbEM73opD9rrf1LvbiLQ1vhA=="}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"kalwyn+npmci@goodrx.com","name":"heydoctor-ci"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"schlegz76@gmail.com","name":"schlegz"}],"_npmUser":{"name":"heydoctor-ci","email":"kalwyn+npmci@goodrx.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_0.0.0-50ec30b_1587749539999_0.8754166884390959"},"_hasShrinkwrap":false},"0.0.0-fd70b2c":{"name":"heydoctor-js","version":"0.0.0-fd70b2c","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/sappira-inc/heydoctor-js.git"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'npm run build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"npm run docs:build && npm run docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"0.0.6","@types/jest":"^24.0.23","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^25.4.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^2.0.3","npm-run-all":"4.1.3","parcel-bundler":"^1.12.4","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"readme":"# HeyDoctor Javascript SDK\n\nThe HeyDoctor Javascript library provides convenient access to the HeyDoctor API for applications written in JavaScript.\n\n## Documentation\nCheck out our [auto-generated docs](https://sappira-inc.github.io/heydoctor-js/) using [TypeDoc](http://typedoc.org).\n\n## Installation\nYou can install `heydoctor-js` using your favorite package manager.\n\n```sh\n$ yarn add heydoctor-js\n# or\n$ npm install --save heydoctor-js\n```\n\n## Usage\nYou'll first need to create a new client resource. If using the HeyDoctor SaaS platform, you'll need to provide the API key located in the EMR. The client contains the http module that will communicate with the HeyDoctor API, so we'll pass this client to the other resources you'll need.\n\n### Creating the client\n\n```js\nimport { Client, Environments, Visits, OAuth } from 'heydoctor-js';\n\n// The client will hold all configuration options and the http module\n// that communicates to our server\nconst client = new Client({\n  env: Environments.SANDBOX | Environments.PRODUCTION, // determines the API and OAuth endpoints\n});\n\n// Create two resources passing both the client we've just created\n// ** Some resources also take an optional options object as a second argument\nconst visits = new Visits(client;\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n  scope: '*',\n});\n```\n\n### Subscribing to HTTP events\nThe HeyDoctor client also doubles as an event emitter. The client extends from [Mitt](https://github.com/developit/mitt) and complies with standard EventEmitter events.\n\n```js\ninterface HttpCallback {\n  statusCode: number;\n  data: any;\n}\n\nconst client = new Client();\n\nclient.on('http:success', (data: HttpCallback) => void);\nclient.on('http:error', (data: HttpCallback) => void);\n```\n\n### Authorizing via OAuth\n\nPartnering clients will use the HeyDoctor JS SDK to create or link a HeyDoctor account. HeyDoctor conforms to the existing [OAuth2 protocol](https://oauth.net/2/). In the case that HeyDoctor already has the provided email on file, the SDK will open a dialog box, akin to Facebook or Google login, prompting the user to confirm their existing password. In all successful cases, an access token and refresh token will be returned. The resulting payload is outlined below.\n\nWe recommend to store the longstanding refresh token in a persisted data store. You’ll use this token, along with your unique client id and secret key to regenerate short lived access tokens used to authenticate requests to the HeyDoctor API. For security measures, the access token has a one hour TTL, after which the token will expire and new access token will need to be generated.\n\nUpon successful authorization, all subsequent SDK calls will be authenticated using the access token. The access token can also be utilized server-side to call our API directly.\n\n#### Example\n\n```js\nimport { Client, OAuth } from 'heydoctor-js';\n\nconst client = new Client({\n  env: 'production',\n});\n\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n});\n\n// First attempt to create a new HeyDoctor user silently. The method will throw an error in the case that the email already exists,\n// in which case you have the opportunity to present an unobtrusive dialog for the user to confirm their existing HeyDoctor password.\ntry {\n  const { accessToken, refreshToken } = await oauth.createUser({\n    email: 'frank@heydoctor.com',\n    firstName: 'Frank',\n    lastName: 'Sinatra',\n    dob: '1915-12-12',\n    gender: 'male',\n    addressLine1: '123 Somewhere Street',\n    city: 'Hoboken',\n    state: 'NJ',\n    zip: '07030',\n  });\n} catch (error) {\n  if (error.code === 'account_exists') {\n    const { accessToken, refreshToken } = await oauth.launchWebAuthFlow('frank@heydoctor.com');\n  }\n}\n\n// Now that the client has been authorized, we can call call other methods available in the SDK\nconst visit = await visits.create({\n  code: 'hair-loss',\n});\n\n// Excellent, we've just created our first visit. Now, we can upload photos to that visit.\nawait visit.uploadPhoto('photoId1234', 'base64photostring');\n```\n","readmeFilename":"README.md","gitHead":"7f9d235d5f2a1dee9e7036e806f04357a81e3f1c","bugs":{"url":"https://github.com/sappira-inc/heydoctor-js/issues"},"homepage":"https://github.com/sappira-inc/heydoctor-js#readme","_id":"heydoctor-js@0.0.0-fd70b2c","_nodeVersion":"10.20.1","_npmVersion":"6.14.4","dist":{"integrity":"sha512-RG5/4LzlIXT41M+ACVxMddLwM0fYL6dIwnJY2JbZP/nFj4jAqGlRPgESgPaANiDSBh9P1U3n9zh2hoYqzPLiYQ==","shasum":"3a633223b370c2111b6a7375189d7d7e865d4d3f","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-0.0.0-fd70b2c.tgz","fileCount":44,"unpackedSize":151698,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeo3Y0CRA9TVsSAnZWagAAg1oQAIqnCamkzHgv7StraTRI\nkRJX4DTcl+MVgUuXdPcunL5Ux1KAszT4JKfgWHabk5+1ti0Hr9r4KUnHiVGR\nkHL0533bGjkpOL1vWd/brmw8GBygB2sPfFKwuUh5rDE8LIC5BYwqB+NBaaZZ\nb5fhBR9Qg539r2Fw5QsT2r0Q29EuqqePBjyFqO2uWgcAnvAzCzzgRCJGLnZs\nE1CUBMivgOfzbd79U/Wf+RYfzd3tedRH1woeX+0aLIQxoZUJ5lWF1OjeZUtk\nYI3bskntQnmWJDDTq84qnjt4wlpiI3wgtjyIhHwZqcpS/q6qHE6rCy8bjc2l\nfBvqVg+BINzMpOgI5bUICv6zFDGsR93vLknN9Wo02aovcX3+DDdjZTUy1C9c\nI3BYeyaoYUo5RJH90fBTHzr7c6/8H/Uum7r1M2uEnGqodhLCo8KGjpCrJoV9\nv73t0Q7e2u9g4yix1QO+6H+PKXEorJEjgR5MYZV4CB1WwlQ0cD2lnBk0NXU+\nDTN/M/5+VVdywYMFITmrmbYxqnpb0xyG+3zSBnRavArFWAqPsnzRYVoXmha9\nYoOHrLPtiTFjVWupEahjlJfpS1LX1faNIQ3w10PudzF91hP3+pO9RBtq78tA\np0v+IJR7jsXbYMWen2DbSLmBx0fLPCzMpJGL7D7pMm3zeUcQGCRYEK7N4Hho\n/x+D\r\n=TQy3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEHvwZWjFnbREHOY3xiYGDg4wfVdyW58oEvry+a9FF3OAiEA2VRK+GAx3v0n4BDsL9Nw86Bl+Iq7HFedw/fBwoZr+X8="}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"kalwyn+npmci@goodrx.com","name":"heydoctor-ci"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"schlegz76@gmail.com","name":"schlegz"}],"_npmUser":{"name":"heydoctor-ci","email":"kalwyn+npmci@goodrx.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_0.0.0-fd70b2c_1587770932485_0.17353406243222347"},"_hasShrinkwrap":false},"0.0.0-44b21ec":{"name":"heydoctor-js","version":"0.0.0-44b21ec","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/sappira-inc/heydoctor-js.git"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'npm run build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"npm run docs:build && npm run docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"0.0.6","@types/jest":"^24.0.23","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^25.4.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^2.0.3","npm-run-all":"4.1.3","parcel-bundler":"^1.12.4","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"readme":"# HeyDoctor Javascript SDK\n\nThe HeyDoctor Javascript library provides convenient access to the HeyDoctor API for applications written in JavaScript.\n\n## Documentation\nCheck out our [auto-generated docs](https://sappira-inc.github.io/heydoctor-js/) using [TypeDoc](http://typedoc.org).\n\n## Installation\nYou can install `heydoctor-js` using your favorite package manager.\n\n```sh\n$ yarn add heydoctor-js\n# or\n$ npm install --save heydoctor-js\n```\n\n## Usage\nYou'll first need to create a new client resource. If using the HeyDoctor SaaS platform, you'll need to provide the API key located in the EMR. The client contains the http module that will communicate with the HeyDoctor API, so we'll pass this client to the other resources you'll need.\n\n### Creating the client\n\n```js\nimport { Client, Environments, Visits, OAuth } from 'heydoctor-js';\n\n// The client will hold all configuration options and the http module\n// that communicates to our server\nconst client = new Client({\n  env: Environments.SANDBOX | Environments.PRODUCTION, // determines the API and OAuth endpoints\n});\n\n// Create two resources passing both the client we've just created\n// ** Some resources also take an optional options object as a second argument\nconst visits = new Visits(client;\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n  scope: '*',\n});\n```\n\n### Subscribing to HTTP events\nThe HeyDoctor client also doubles as an event emitter. The client extends from [Mitt](https://github.com/developit/mitt) and complies with standard EventEmitter events.\n\n```js\ninterface HttpCallback {\n  statusCode: number;\n  data: any;\n}\n\nconst client = new Client();\n\nclient.on('http:success', (data: HttpCallback) => void);\nclient.on('http:error', (data: HttpCallback) => void);\n```\n\n### Authorizing via OAuth\n\nPartnering clients will use the HeyDoctor JS SDK to create or link a HeyDoctor account. HeyDoctor conforms to the existing [OAuth2 protocol](https://oauth.net/2/). In the case that HeyDoctor already has the provided email on file, the SDK will open a dialog box, akin to Facebook or Google login, prompting the user to confirm their existing password. In all successful cases, an access token and refresh token will be returned. The resulting payload is outlined below.\n\nWe recommend to store the longstanding refresh token in a persisted data store. You’ll use this token, along with your unique client id and secret key to regenerate short lived access tokens used to authenticate requests to the HeyDoctor API. For security measures, the access token has a one hour TTL, after which the token will expire and new access token will need to be generated.\n\nUpon successful authorization, all subsequent SDK calls will be authenticated using the access token. The access token can also be utilized server-side to call our API directly.\n\n#### Example\n\n```js\nimport { Client, OAuth } from 'heydoctor-js';\n\nconst client = new Client({\n  env: 'production',\n});\n\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n});\n\n// First attempt to create a new HeyDoctor user silently. The method will throw an error in the case that the email already exists,\n// in which case you have the opportunity to present an unobtrusive dialog for the user to confirm their existing HeyDoctor password.\ntry {\n  const { accessToken, refreshToken } = await oauth.createUser({\n    email: 'frank@heydoctor.com',\n    firstName: 'Frank',\n    lastName: 'Sinatra',\n    dob: '1915-12-12',\n    gender: 'male',\n    addressLine1: '123 Somewhere Street',\n    city: 'Hoboken',\n    state: 'NJ',\n    zip: '07030',\n  });\n} catch (error) {\n  if (error.code === 'account_exists') {\n    const { accessToken, refreshToken } = await oauth.launchWebAuthFlow('frank@heydoctor.com');\n  }\n}\n\n// Now that the client has been authorized, we can call call other methods available in the SDK\nconst visit = await visits.create({\n  code: 'hair-loss',\n});\n\n// Excellent, we've just created our first visit. Now, we can upload photos to that visit.\nawait visit.uploadPhoto('photoId1234', 'base64photostring');\n```\n","readmeFilename":"README.md","gitHead":"05b1d06da01bb7cf4ae9b8b0b90b1db7c245a763","bugs":{"url":"https://github.com/sappira-inc/heydoctor-js/issues"},"homepage":"https://github.com/sappira-inc/heydoctor-js#readme","_id":"heydoctor-js@0.0.0-44b21ec","_nodeVersion":"10.20.1","_npmVersion":"6.14.4","dist":{"integrity":"sha512-D86BLAxfGG1CLnvA//AravYbFSbgReeGdKYJ7QJa28URNO92ZZOmPliPCY2FDps1Q3prkbTGZcdLG/Fmr5lwIg==","shasum":"4aebdab54caba1e29f0cf246de1846d6f70c0546","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-0.0.0-44b21ec.tgz","fileCount":42,"unpackedSize":151439,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJepzpJCRA9TVsSAnZWagAAM+8P/3p1Woi34YHSUi/FAnMj\nTRhdcapw8VFX3pusEBT/kuUIuHiyAYiUCUAGHc0meB24NlIsL8wkmnBX4q+i\nMbpQgLNLKSJ6AiCbI2gAfq8QdNDg+k5hAPiMlDWxZsf0y6+wE2lbVfAQli6M\ncakn1aRLmqFQS4UKGDJjLEylt+JVv3pLbLztid4cyJ3QnvioTjnT8mxq1ESd\nkpsACg5nWTjo9w7AxIBUMsL1MjUgGGdnXFZzmAWLUULItM3KYYNHq5HRGWTu\nood7hryaPcSH6KRGLMFnbJHFUrcdNIEUhEdwWpHy8uS8HrLWuOiKjTAwmuzC\n+kKtwleZ2jKQtpamOAjIeN2zYWEGkP09aJnadWZJ79C0C6LFADRZJWB+gRWt\neaA8Qd2xmTcvQ2j4mDvtZqkEKw5pqGuFESOlTKMU+iFVfPwpmNqXw2AhDcnZ\n1Xrx8fbu9wb+XP4q2e0PQ+u0CIETrYmNy5YmnDReth55jb1oZzaSANyRLd7v\nPUgxMTNAcXfYn/VKxwICL16m8H4m6+0nKTSlA00LqKKgHGrRsciknirQXZc/\nG5e1dMPO8j+FJjol/HalB6qP9dmmfNX+KnL2ebQZCvwdu8r0mZToTy8sXxyD\n+3fH2OtT7C5iGrHGDRMT/8Ztx7Nr2nf06/K2Es84DNW5d8pTg5BY9moPmZpL\nSgcZ\r\n=Qa8y\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDEPcS4w31hBa2dEaxgPZTwR8qM+a1bzIODQcvAm75ksgIgcJSk0wPbEHYK09jGNGRpgjlJNXXjQd41gT/PhVKeC60="}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"kalwyn+npmci@goodrx.com","name":"heydoctor-ci"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"schlegz76@gmail.com","name":"schlegz"}],"_npmUser":{"name":"heydoctor-ci","email":"kalwyn+npmci@goodrx.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_0.0.0-44b21ec_1588017737130_0.9622993954218881"},"_hasShrinkwrap":false},"0.0.0-b07e60d":{"name":"heydoctor-js","version":"0.0.0-b07e60d","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/sappira-inc/heydoctor-js.git"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'npm run build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"npm run docs:build && npm run docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"0.0.6","@types/jest":"^24.0.23","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^25.4.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^2.0.3","npm-run-all":"4.1.3","parcel-bundler":"^1.12.4","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"readme":"# HeyDoctor Javascript SDK\n\nThe HeyDoctor Javascript library provides convenient access to the HeyDoctor API for applications written in JavaScript.\n\n## Documentation\nCheck out our [auto-generated docs](https://sappira-inc.github.io/heydoctor-js/) using [TypeDoc](http://typedoc.org).\n\n## Installation\nYou can install `heydoctor-js` using your favorite package manager.\n\n```sh\n$ yarn add heydoctor-js\n# or\n$ npm install --save heydoctor-js\n```\n\n## Usage\nYou'll first need to create a new client resource. If using the HeyDoctor SaaS platform, you'll need to provide the API key located in the EMR. The client contains the http module that will communicate with the HeyDoctor API, so we'll pass this client to the other resources you'll need.\n\n### Creating the client\n\n```js\nimport { Client, Environments, Visits, OAuth } from 'heydoctor-js';\n\n// The client will hold all configuration options and the http module\n// that communicates to our server\nconst client = new Client({\n  env: Environments.SANDBOX | Environments.PRODUCTION, // determines the API and OAuth endpoints\n});\n\n// Create two resources passing both the client we've just created\n// ** Some resources also take an optional options object as a second argument\nconst visits = new Visits(client;\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n  scope: '*',\n});\n```\n\n### Subscribing to HTTP events\nThe HeyDoctor client also doubles as an event emitter. The client extends from [Mitt](https://github.com/developit/mitt) and complies with standard EventEmitter events.\n\n```js\ninterface HttpCallback {\n  statusCode: number;\n  data: any;\n}\n\nconst client = new Client();\n\nclient.on('http:success', (data: HttpCallback) => void);\nclient.on('http:error', (data: HttpCallback) => void);\n```\n\n### Authorizing via OAuth\n\nPartnering clients will use the HeyDoctor JS SDK to create or link a HeyDoctor account. HeyDoctor conforms to the existing [OAuth2 protocol](https://oauth.net/2/). In the case that HeyDoctor already has the provided email on file, the SDK will open a dialog box, akin to Facebook or Google login, prompting the user to confirm their existing password. In all successful cases, an access token and refresh token will be returned. The resulting payload is outlined below.\n\nWe recommend to store the longstanding refresh token in a persisted data store. You’ll use this token, along with your unique client id and secret key to regenerate short lived access tokens used to authenticate requests to the HeyDoctor API. For security measures, the access token has a one hour TTL, after which the token will expire and new access token will need to be generated.\n\nUpon successful authorization, all subsequent SDK calls will be authenticated using the access token. The access token can also be utilized server-side to call our API directly.\n\n#### Example\n\n```js\nimport { Client, OAuth } from 'heydoctor-js';\n\nconst client = new Client({\n  env: 'production',\n});\n\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n});\n\n// First attempt to create a new HeyDoctor user silently. The method will throw an error in the case that the email already exists,\n// in which case you have the opportunity to present an unobtrusive dialog for the user to confirm their existing HeyDoctor password.\ntry {\n  const { accessToken, refreshToken } = await oauth.createUser({\n    email: 'frank@heydoctor.com',\n    firstName: 'Frank',\n    lastName: 'Sinatra',\n    dob: '1915-12-12',\n    gender: 'male',\n    addressLine1: '123 Somewhere Street',\n    city: 'Hoboken',\n    state: 'NJ',\n    zip: '07030',\n  });\n} catch (error) {\n  if (error.code === 'account_exists') {\n    const { accessToken, refreshToken } = await oauth.launchWebAuthFlow('frank@heydoctor.com');\n  }\n}\n\n// Now that the client has been authorized, we can call call other methods available in the SDK\nconst visit = await visits.create({\n  code: 'hair-loss',\n});\n\n// Excellent, we've just created our first visit. Now, we can upload photos to that visit.\nawait visit.uploadPhoto('photoId1234', 'base64photostring');\n```\n","readmeFilename":"README.md","gitHead":"39e49034983e20b829e92b774857a8588e0e90cd","bugs":{"url":"https://github.com/sappira-inc/heydoctor-js/issues"},"homepage":"https://github.com/sappira-inc/heydoctor-js#readme","_id":"heydoctor-js@0.0.0-b07e60d","_nodeVersion":"10.20.1","_npmVersion":"6.14.4","dist":{"integrity":"sha512-eOZOZQXEDedCrOHfdnC52ff8PGlUZrKTlsk/zsnPyQA15SvX51tzKZsAB570E3WqsU7Q+vJUvj8VOOg/dMaRwg==","shasum":"679e0654196dfa286914a10f25d0b7b102d889a7","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-0.0.0-b07e60d.tgz","fileCount":42,"unpackedSize":151652,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeqbWGCRA9TVsSAnZWagAAFFgP/39TsibSDORAW2WYnNID\noJr0Uu6EEh79Zq5kxO1cuc+gncXoacoL0bQXchvfHakn+hB4MkcPu9ZpNu9Z\naGcr1mqT/9XGiwiAjBeZOxq7pL+jk2D9AyA4XKzyX2d0RUwk/hrC5YB2DYJr\nYj+L+bzstqSFbwJJ1mTpIFO6/9yMr7nnHZDRJEMCWqkjUj9iagwvv8NPyOHZ\nkd+Yke7Ehwk1L9VKYlOvHQMqgYNkTJQt/1igmE5zbcVI1hsdChpxuBhc7fec\nOyuaeulu1gAscCNeLi5xarWpNcbY1rNq/ImvBkpNwLV/r3oV5qyYHZf1e0Xn\nIENhLWchw/J7/E9y1X4hWgJKPw8rKiqDZWoFzkCRoki9WwaQk7+L/qjP1AsO\nNTBXJrBaVFhTCP8QVKv1/mRFvtguyiCzGkz2+x3pOhytY/Oe1eigeUV8h3d4\nGq21uV7BRDPWOy+lg8ecJ0JJ7ZaluWdiuNvAU5ijsFj/4rQRnYWyQXDEZaHU\n48nAzl06oO9qRG8gQ60YXNYdO4KcWfn7pdSEcyiGZggmjtTE5GiM+9trzNwS\nAv1t6MuvOJpJKZwVepsh1KvL+kd7SJrjgtD/aNs0vCOOfrXZlbigbMPeOAxZ\nGmIEWnfegYTc7gL1TsB0TW4oaqcmE1i6yehP9JdwUWc/+1WCKQKCsUAYn81r\nvOFH\r\n=P12G\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFIXMVGLeuYBXF53LXvw5PdHMlnV2V7ygnq9fwWt1ObEAiEA3vzazwrYy4CxSCPjw3WxDuylVi1e1WNLY+QnuPIJr7o="}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"kalwyn+npmci@goodrx.com","name":"heydoctor-ci"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"schlegz76@gmail.com","name":"schlegz"}],"_npmUser":{"name":"heydoctor-ci","email":"kalwyn+npmci@goodrx.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_0.0.0-b07e60d_1588180357782_0.1289465789667339"},"_hasShrinkwrap":false},"0.0.0-48c4cbe":{"name":"heydoctor-js","version":"0.0.0-48c4cbe","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/sappira-inc/heydoctor-js.git"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'npm run build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"npm run docs:build && npm run docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"0.0.8","@types/jest":"^24.0.23","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^25.4.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^2.0.3","npm-run-all":"4.1.3","parcel-bundler":"^1.12.4","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"readme":"# HeyDoctor Javascript SDK\n\nThe HeyDoctor Javascript library provides convenient access to the HeyDoctor API for applications written in JavaScript.\n\n## Documentation\nCheck out our [auto-generated docs](https://sappira-inc.github.io/heydoctor-js/) using [TypeDoc](http://typedoc.org).\n\n## Installation\nYou can install `heydoctor-js` using your favorite package manager.\n\n```sh\n$ yarn add heydoctor-js\n# or\n$ npm install --save heydoctor-js\n```\n\n## Usage\nYou'll first need to create a new client resource. If using the HeyDoctor SaaS platform, you'll need to provide the API key located in the EMR. The client contains the http module that will communicate with the HeyDoctor API, so we'll pass this client to the other resources you'll need.\n\n### Creating the client\n\n```js\nimport { Client, Environments, Visits, OAuth } from 'heydoctor-js';\n\n// The client will hold all configuration options and the http module\n// that communicates to our server\nconst client = new Client({\n  env: Environments.SANDBOX | Environments.PRODUCTION, // determines the API and OAuth endpoints\n});\n\n// Create two resources passing both the client we've just created\n// ** Some resources also take an optional options object as a second argument\nconst visits = new Visits(client;\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n  scope: '*',\n});\n```\n\n### Subscribing to HTTP events\nThe HeyDoctor client also doubles as an event emitter. The client extends from [Mitt](https://github.com/developit/mitt) and complies with standard EventEmitter events.\n\n```js\ninterface HttpCallback {\n  statusCode: number;\n  data: any;\n}\n\nconst client = new Client();\n\nclient.on('http:success', (data: HttpCallback) => void);\nclient.on('http:error', (data: HttpCallback) => void);\n```\n\n### Authorizing via OAuth\n\nPartnering clients will use the HeyDoctor JS SDK to create or link a HeyDoctor account. HeyDoctor conforms to the existing [OAuth2 protocol](https://oauth.net/2/). In the case that HeyDoctor already has the provided email on file, the SDK will open a dialog box, akin to Facebook or Google login, prompting the user to confirm their existing password. In all successful cases, an access token and refresh token will be returned. The resulting payload is outlined below.\n\nWe recommend to store the longstanding refresh token in a persisted data store. You’ll use this token, along with your unique client id and secret key to regenerate short lived access tokens used to authenticate requests to the HeyDoctor API. For security measures, the access token has a one hour TTL, after which the token will expire and new access token will need to be generated.\n\nUpon successful authorization, all subsequent SDK calls will be authenticated using the access token. The access token can also be utilized server-side to call our API directly.\n\n#### Example\n\n```js\nimport { Client, OAuth } from 'heydoctor-js';\n\nconst client = new Client({\n  env: 'production',\n});\n\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n});\n\n// First attempt to create a new HeyDoctor user silently. The method will throw an error in the case that the email already exists,\n// in which case you have the opportunity to present an unobtrusive dialog for the user to confirm their existing HeyDoctor password.\ntry {\n  const { accessToken, refreshToken } = await oauth.createUser({\n    email: 'frank@heydoctor.com',\n    firstName: 'Frank',\n    lastName: 'Sinatra',\n    dob: '1915-12-12',\n    gender: 'male',\n    addressLine1: '123 Somewhere Street',\n    city: 'Hoboken',\n    state: 'NJ',\n    zip: '07030',\n  });\n} catch (error) {\n  if (error.code === 'account_exists') {\n    const { accessToken, refreshToken } = await oauth.launchWebAuthFlow('frank@heydoctor.com');\n  }\n}\n\n// Now that the client has been authorized, we can call call other methods available in the SDK\nconst visit = await visits.create({\n  code: 'hair-loss',\n});\n\n// Excellent, we've just created our first visit. Now, we can upload photos to that visit.\nawait visit.uploadPhoto('photoId1234', 'base64photostring');\n```\n","readmeFilename":"README.md","gitHead":"3f4394dae16854f3086d471072eb2cb645609e29","bugs":{"url":"https://github.com/sappira-inc/heydoctor-js/issues"},"homepage":"https://github.com/sappira-inc/heydoctor-js#readme","_id":"heydoctor-js@0.0.0-48c4cbe","_nodeVersion":"10.20.1","_npmVersion":"6.14.4","dist":{"integrity":"sha512-gUH5m8VF8P5uNG8Auxf3ojZ4XP1Eriptz3KexAMP6tGCWLyC/KmJMnTOURoAkxVt288T9kfEJgdqmPWj6TC7TQ==","shasum":"b69ee9bf1419b5f303eb47e96d4ff4aee6f87313","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-0.0.0-48c4cbe.tgz","fileCount":42,"unpackedSize":151652,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeqbY0CRA9TVsSAnZWagAAlH0P/2/6WtEL0OPyq2eUXNm6\nrfBSYUNJ5hoBpFkWDrWBWw4abzL38Cp6wJMW3BJNudBnN9+vIPhv0nHk7SHT\nw+dmS9cilSEu/cNzOYw/OKwYj+yfv5V837I5SgeIpawkm8Hss5Hpu9pbkLbY\nvFfbGtoJ465WSoZfsHZcQJrBiHDFYn7tzfnQWRZm/nC1ik7rlL0vkdU32veK\nI/rOsDd3oeVIyV87yvpKpAKBdmXiVbVImfW8KhlHR8rMNfMpf8Sf1oSOMIUZ\n7aJ7PNjdfUyyzbU0NNcXfHCy4XHxYAEUVwSUbInF5bGImiDU3VRbHQnnfvxN\nYS/Zs9bQupI03EAbVoTxhVjvVlSQ1FVlyGeyNklfWU74OXaDjxOUBa70zVl5\nU8ZhzDdI44L3ENNZa0ZZ/FHWGgAQa/h/zyOBc7gpo8ALM4TpVUm6fJbGIgf3\n1FSelmOJNVPdf8SsXgI9HzghvsxVljut6ZUbZNsxZz2UfO4889PkOjaRRzJg\nhMaoXZT16F27VKcJnciTyZuF+o0hmI3bVLvU7rV0sVDrcaMxj6J3XsnNcLdH\nwfwrK9PGgalWlR22DnQu9XD0wbXEDcvbsTHfH6nK+FQ6s1IjerhDlgTJ4Bai\nEEXDp0vcloJpY2OpIvkMx4zSD6C5HgpBvT1bhjHt3uFb6MqGCU6FmFu4GR20\nsAr1\r\n=tix2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG4dIfi9lKJrZtS5vUPUewRWtmh2KywvilSh/Wm/I9UcAiEAltSwH8mqahuTMhDKRGWThbjA6wx8tBw9E5QCkMxIzgQ="}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"kalwyn+npmci@goodrx.com","name":"heydoctor-ci"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"schlegz76@gmail.com","name":"schlegz"}],"_npmUser":{"name":"heydoctor-ci","email":"kalwyn+npmci@goodrx.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_0.0.0-48c4cbe_1588180531942_0.18008091413334926"},"_hasShrinkwrap":false},"0.0.0-93a37be":{"name":"heydoctor-js","version":"0.0.0-93a37be","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/sappira-inc/heydoctor-js.git"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'npm run build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"npm run docs:build && npm run docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"0.0.8","@types/jest":"^24.0.23","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^25.4.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^2.0.3","npm-run-all":"4.1.3","parcel-bundler":"^1.12.4","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"readme":"# HeyDoctor Javascript SDK\n\nThe HeyDoctor Javascript library provides convenient access to the HeyDoctor API for applications written in JavaScript.\n\n## Documentation\nCheck out our [auto-generated docs](https://sappira-inc.github.io/heydoctor-js/) using [TypeDoc](http://typedoc.org).\n\n## Installation\nYou can install `heydoctor-js` using your favorite package manager.\n\n```sh\n$ yarn add heydoctor-js\n# or\n$ npm install --save heydoctor-js\n```\n\n## Usage\nYou'll first need to create a new client resource. If using the HeyDoctor SaaS platform, you'll need to provide the API key located in the EMR. The client contains the http module that will communicate with the HeyDoctor API, so we'll pass this client to the other resources you'll need.\n\n### Creating the client\n\n```js\nimport { Client, Environments, Visits, OAuth } from 'heydoctor-js';\n\n// The client will hold all configuration options and the http module\n// that communicates to our server\nconst client = new Client({\n  env: Environments.SANDBOX | Environments.PRODUCTION, // determines the API and OAuth endpoints\n});\n\n// Create two resources passing both the client we've just created\n// ** Some resources also take an optional options object as a second argument\nconst visits = new Visits(client;\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n  scope: '*',\n});\n```\n\n### Subscribing to HTTP events\nThe HeyDoctor client also doubles as an event emitter. The client extends from [Mitt](https://github.com/developit/mitt) and complies with standard EventEmitter events.\n\n```js\ninterface HttpCallback {\n  statusCode: number;\n  data: any;\n}\n\nconst client = new Client();\n\nclient.on('http:success', (data: HttpCallback) => void);\nclient.on('http:error', (data: HttpCallback) => void);\n```\n\n### Authorizing via OAuth\n\nPartnering clients will use the HeyDoctor JS SDK to create or link a HeyDoctor account. HeyDoctor conforms to the existing [OAuth2 protocol](https://oauth.net/2/). In the case that HeyDoctor already has the provided email on file, the SDK will open a dialog box, akin to Facebook or Google login, prompting the user to confirm their existing password. In all successful cases, an access token and refresh token will be returned. The resulting payload is outlined below.\n\nWe recommend to store the longstanding refresh token in a persisted data store. You’ll use this token, along with your unique client id and secret key to regenerate short lived access tokens used to authenticate requests to the HeyDoctor API. For security measures, the access token has a one hour TTL, after which the token will expire and new access token will need to be generated.\n\nUpon successful authorization, all subsequent SDK calls will be authenticated using the access token. The access token can also be utilized server-side to call our API directly.\n\n#### Example\n\n```js\nimport { Client, OAuth } from 'heydoctor-js';\n\nconst client = new Client({\n  env: 'production',\n});\n\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n});\n\n// First attempt to create a new HeyDoctor user silently. The method will throw an error in the case that the email already exists,\n// in which case you have the opportunity to present an unobtrusive dialog for the user to confirm their existing HeyDoctor password.\ntry {\n  const { accessToken, refreshToken } = await oauth.createUser({\n    email: 'frank@heydoctor.com',\n    firstName: 'Frank',\n    lastName: 'Sinatra',\n    dob: '1915-12-12',\n    gender: 'male',\n    addressLine1: '123 Somewhere Street',\n    city: 'Hoboken',\n    state: 'NJ',\n    zip: '07030',\n  });\n} catch (error) {\n  if (error.code === 'account_exists') {\n    const { accessToken, refreshToken } = await oauth.launchWebAuthFlow('frank@heydoctor.com');\n  }\n}\n\n// Now that the client has been authorized, we can call call other methods available in the SDK\nconst visit = await visits.create({\n  code: 'hair-loss',\n});\n\n// Excellent, we've just created our first visit. Now, we can upload photos to that visit.\nawait visit.uploadPhoto('photoId1234', 'base64photostring');\n```\n","readmeFilename":"README.md","gitHead":"758f983f7628616779cd6619e5d25daefae637af","bugs":{"url":"https://github.com/sappira-inc/heydoctor-js/issues"},"homepage":"https://github.com/sappira-inc/heydoctor-js#readme","_id":"heydoctor-js@0.0.0-93a37be","_nodeVersion":"10.20.1","_npmVersion":"6.14.4","dist":{"integrity":"sha512-HCej9/nJydXZi7sjyujjdj9/pKPFx/unq3jn/FrZHCvsX1bMiE+XWhqjNc9MEB3XsrzZUY0BrDqKCt2zEK6RpQ==","shasum":"9c3380fa757fd4005a77edbd8fbf0c81233a1b66","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-0.0.0-93a37be.tgz","fileCount":42,"unpackedSize":151652,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeqbkLCRA9TVsSAnZWagAA8gUQAJhQdlv4I060flmcv4K+\n9EOOz1n3lBFbUTkUMhcRxshiSnrGE0X/ER6XCkuJpxUPV4MQTFeeJmyUELh/\nk2ZZ42uG1d9krW1iRVV4RzIhVpq4UlG0uQsl3x6svqrzqPuf5aJaNuykpVNK\n83GUA5jIDcZhHtU4eDrFCxxxWX4D3VDra234h0D1DoNWSSeFhs+X1UxRmbzu\nQU+MWoQOkK/ln5e/RQX38weQwjbrIhnUklioVT7ok+S1BdM/gYOuJ8yKxeQ/\nrO0MUuKaUJ0vj1lsFCxheNwT9t5IF5+Z3iz6asx9F+UCLgGdGC0JgXphUKgv\nJlmhdmyWqfRI5b8dk76rrBIwqyuONi+STSj59JKy/tLFFmofLPplz586+3NA\nvMmvbqWZCFaHHSrTmRywWxusx5/y9EAbxiTRY3F+M0SEFMxtkGt11sHXQX0G\nGNZxDlXbAoko+OkpnBDQjapVG83YP0Lo9h3U/X4/7NcmHvWZlG9OXY14zJgZ\nnu4598P7RMztPytUxZ8P4DGXeHGE/nFvsuRxDFCHxSY4eN4LgxWRUHje+rDF\nHvUmrnmp/nWQYk01NrDK2Vw2tU/69MM4ooG6FOrJm9OJPimQ1hD8jcahK4OW\nr2l2vosnbOsdfGNrJ1tfPt2J3f8eKC6KiKFVagwO8cGaDrlaY2bmGwDnAdfa\nDkT7\r\n=7wv4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDLIGPzk9dVPJxRo5DR4ibYr8cKdnSOzpKKYZo7iegZBAiEAg8ibiSlajk+JZdQH/VjE/4erQNC/0lyWWbdFF2zxetA="}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"kalwyn+npmci@goodrx.com","name":"heydoctor-ci"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"schlegz76@gmail.com","name":"schlegz"}],"_npmUser":{"name":"heydoctor-ci","email":"kalwyn+npmci@goodrx.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_0.0.0-93a37be_1588181258526_0.9551588103819117"},"_hasShrinkwrap":false},"3.6.0":{"name":"heydoctor-js","version":"3.6.0","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/sappira-inc/heydoctor-js.git"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'npm run build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"npm run docs:build && npm run docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"0.0.8","@types/jest":"^24.0.23","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^25.4.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^2.0.3","npm-run-all":"4.1.3","parcel-bundler":"^1.12.4","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"gitHead":"d7f3789c0c21cc51f08ba48ad8f51ddbcd6cfdf4","bugs":{"url":"https://github.com/sappira-inc/heydoctor-js/issues"},"homepage":"https://github.com/sappira-inc/heydoctor-js#readme","_id":"heydoctor-js@3.6.0","_nodeVersion":"12.16.1","_npmVersion":"6.13.4","dist":{"integrity":"sha512-PjX86oI7wFPxLib747GwtdAgl6tbR7BBw2+y7VfaJ2Zlq1WiVALkfBRBxZK1uQBLZD9kNrBAbIQJtkUC6USvfg==","shasum":"7190a0961ced733fec205451b668fb2f08576531","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-3.6.0.tgz","fileCount":42,"unpackedSize":151909,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeqbmqCRA9TVsSAnZWagAAyqUP/RYyPj4HfpoZHtkmDCbX\nZv9jfC2mSNQQa2QltRD/+hZ4Wb+c59tvOsQhDAxNyQjxIAKN4Lgg7QSiHLJE\nM1FLZ0z+P8UiYyZrTs7zRjRHo5EaLPqjUgHTvJP6bEY5t/NByxnivj31jxxq\nWIsu4GbtrPVUmz89gmNg6kH0n87LSgDbcHjrrJzaD3otCGlw3IYSYfyg0liQ\no077B+I32aYeM3xygJxKbAdn2MslY3sfdDkhiymEiS1B3zehq9MFrDzRm4Jp\n9thwT/lV+GjMRFEUvC/TzTysKEosTlSYKrie0faM6pNTym9L0ev0F6lpva+y\nBdCeso7K4V3H1Niq8RnI4QH9oVkCpU95jJFciYm0IBtYK8ReXn64JJq5RACj\nu+wohu93Nn4b3DOLAVnV2ZWjAAZWvhdnKhSiOeysd3rzR05p/g+x0i79PchQ\nI4q7NubjMSzf5Al/vwBzT7yvjccf1+uh47UWAtCVIuPiIKyNeasuPATLudSA\noUl8s5ubLVTQ757sdSdB0d0SY/1DpCM54FtR5pxtWxPHnLwWHX+rEh1yGVZk\nluEGg3e1UdjcDE93R4+j0y8iZ2aPiHXftQ8wH8iB8P+jTQ5jk7IHY2mY+vUF\nz6RWMC+4nHwP8Mmhj3DxnEcxIbd8JIVv05YE5W0hFURbY4hLbQ31kQLofpB6\nWoN+\r\n=+dP7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHZ19BPwXA3PryyrR4Yz0lbWZue4V1sQqTEZRWpbiftOAiEA1dFReNCPRDdbDujGMzEjyBzlc+Kd3kyGvVEGSbpnKIM="}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"kalwyn+npmci@goodrx.com","name":"heydoctor-ci"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"schlegz76@gmail.com","name":"schlegz"}],"_npmUser":{"name":"schlegz","email":"schlegz76@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_3.6.0_1588181418254_0.4801459111002697"},"_hasShrinkwrap":false},"0.0.0-9e2f75a":{"name":"heydoctor-js","version":"0.0.0-9e2f75a","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/sappira-inc/heydoctor-js.git"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'npm run build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"npm run docs:build && npm run docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"0.0.8","@types/jest":"^24.0.23","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^25.4.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^2.0.3","npm-run-all":"4.1.3","parcel-bundler":"^1.12.4","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"readme":"# HeyDoctor Javascript SDK\n\nThe HeyDoctor Javascript library provides convenient access to the HeyDoctor API for applications written in JavaScript.\n\n## Documentation\nCheck out our [auto-generated docs](https://sappira-inc.github.io/heydoctor-js/) using [TypeDoc](http://typedoc.org).\n\n## Installation\nYou can install `heydoctor-js` using your favorite package manager.\n\n```sh\n$ yarn add heydoctor-js\n# or\n$ npm install --save heydoctor-js\n```\n\n## Usage\nYou'll first need to create a new client resource. If using the HeyDoctor SaaS platform, you'll need to provide the API key located in the EMR. The client contains the http module that will communicate with the HeyDoctor API, so we'll pass this client to the other resources you'll need.\n\n### Creating the client\n\n```js\nimport { Client, Environments, Visits, OAuth } from 'heydoctor-js';\n\n// The client will hold all configuration options and the http module\n// that communicates to our server\nconst client = new Client({\n  env: Environments.SANDBOX | Environments.PRODUCTION, // determines the API and OAuth endpoints\n});\n\n// Create two resources passing both the client we've just created\n// ** Some resources also take an optional options object as a second argument\nconst visits = new Visits(client;\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n  scope: '*',\n});\n```\n\n### Subscribing to HTTP events\nThe HeyDoctor client also doubles as an event emitter. The client extends from [Mitt](https://github.com/developit/mitt) and complies with standard EventEmitter events.\n\n```js\ninterface HttpCallback {\n  statusCode: number;\n  data: any;\n}\n\nconst client = new Client();\n\nclient.on('http:success', (data: HttpCallback) => void);\nclient.on('http:error', (data: HttpCallback) => void);\n```\n\n### Authorizing via OAuth\n\nPartnering clients will use the HeyDoctor JS SDK to create or link a HeyDoctor account. HeyDoctor conforms to the existing [OAuth2 protocol](https://oauth.net/2/). In the case that HeyDoctor already has the provided email on file, the SDK will open a dialog box, akin to Facebook or Google login, prompting the user to confirm their existing password. In all successful cases, an access token and refresh token will be returned. The resulting payload is outlined below.\n\nWe recommend to store the longstanding refresh token in a persisted data store. You’ll use this token, along with your unique client id and secret key to regenerate short lived access tokens used to authenticate requests to the HeyDoctor API. For security measures, the access token has a one hour TTL, after which the token will expire and new access token will need to be generated.\n\nUpon successful authorization, all subsequent SDK calls will be authenticated using the access token. The access token can also be utilized server-side to call our API directly.\n\n#### Example\n\n```js\nimport { Client, OAuth } from 'heydoctor-js';\n\nconst client = new Client({\n  env: 'production',\n});\n\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n});\n\n// First attempt to create a new HeyDoctor user silently. The method will throw an error in the case that the email already exists,\n// in which case you have the opportunity to present an unobtrusive dialog for the user to confirm their existing HeyDoctor password.\ntry {\n  const { accessToken, refreshToken } = await oauth.createUser({\n    email: 'frank@heydoctor.com',\n    firstName: 'Frank',\n    lastName: 'Sinatra',\n    dob: '1915-12-12',\n    gender: 'male',\n    addressLine1: '123 Somewhere Street',\n    city: 'Hoboken',\n    state: 'NJ',\n    zip: '07030',\n  });\n} catch (error) {\n  if (error.code === 'account_exists') {\n    const { accessToken, refreshToken } = await oauth.launchWebAuthFlow('frank@heydoctor.com');\n  }\n}\n\n// Now that the client has been authorized, we can call call other methods available in the SDK\nconst visit = await visits.create({\n  code: 'hair-loss',\n});\n\n// Excellent, we've just created our first visit. Now, we can upload photos to that visit.\nawait visit.uploadPhoto('photoId1234', 'base64photostring');\n```\n","readmeFilename":"README.md","gitHead":"ff1cf47bf97df4a487c37129f19c07e439982789","bugs":{"url":"https://github.com/sappira-inc/heydoctor-js/issues"},"homepage":"https://github.com/sappira-inc/heydoctor-js#readme","_id":"heydoctor-js@0.0.0-9e2f75a","_nodeVersion":"10.20.1","_npmVersion":"6.14.4","dist":{"integrity":"sha512-oVm64FfzmeGNdp9I1dVj3R2Xf/BrDUSfCxtMLDZTrUwWIK7iY7hQ6NnQ7zNiwkC5+cJp/pYaSFoGckSlvLnLLA==","shasum":"532ee097a8f95815139a48c696172f429849e324","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-0.0.0-9e2f75a.tgz","fileCount":42,"unpackedSize":151932,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeqd1/CRA9TVsSAnZWagAAkzoP/R0Pq7lUl+PufWGDn7TE\nUtFG17dROlBK8iBHtrUTMMp1nl51nnrS60WPebU7T+G7b8CUB/Qg6OMac+6O\nUw9PjX9sQEBHEARv6v6ohdJ+Qr01APFxqMSH8nKeV6WqoUUnfEfTnT74Hu95\nOSIcXmNFLNAnxcbgxajwTUnrLhACVhuIqHfrJzU5xfeaKnTU7SMmuQkKzhZi\nOAA26q5r8nrnFuUYNqQU/KAC1p97L6C+4VZFuuo2vaE6pNW2y2Yhtpp2QMy5\nh++U/Yl5mVPvMaY2UAThTnHgGgsgiGbMrTF6UuebxzdnmGE6Lcco4koNr+zp\n1tS3exBChZtrioTklrl8kxdAsqUXQywwo6LC5WehCQBWOqR6z9X3Lzx6HmQa\nH9bkGlBbsHAkoC8yzRQEtMJ1Cq0n85LT/9W8ZK9xGyeyl2fxA2QnEspbvAJu\nkOBAI8hFCpneYSbsBKhahjkqlaITnpIRZRYn1hE2e7X7syol7aM2xj/UmHmm\ngVuvmFLfTDNmM0JojxpuDG+UzwmhO25JMHt1tO3huth1u7Ks+i9Qy8H3RN70\nfaIB7BZdOkM1CHwnHbAPhvHPDOHxlzjmod+7sfpuO1PhU5KLrw1P1W+4XCfi\noGoFNGjHo3CatAxh0PD40nuNPuXT0o/TPnKwbYB9w3RvAUuIkGx1Xrev5qsm\nCipu\r\n=6eCU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDwIISOSea0G1ouWafo2T2cgs59nSTMcCMOmqO3ZQ6DdgIhAMOzPevXzbnAligkoZE2bWIHkLbJfsIHTEMkp+6Rd+Fh"}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"kalwyn+npmci@goodrx.com","name":"heydoctor-ci"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"schlegz76@gmail.com","name":"schlegz"}],"_npmUser":{"name":"heydoctor-ci","email":"kalwyn+npmci@goodrx.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_0.0.0-9e2f75a_1588190591052_0.9637474045888463"},"_hasShrinkwrap":false},"3.6.1":{"name":"heydoctor-js","version":"3.6.1","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/sappira-inc/heydoctor-js.git"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'npm run build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"npm run docs:build && npm run docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"0.0.8","@types/jest":"^24.0.23","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^25.4.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^2.0.3","npm-run-all":"4.1.3","parcel-bundler":"^1.12.4","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"gitHead":"2a3d5dfe327ff77df36fed08dcc7e1b1fceb7edf","bugs":{"url":"https://github.com/sappira-inc/heydoctor-js/issues"},"homepage":"https://github.com/sappira-inc/heydoctor-js#readme","_id":"heydoctor-js@3.6.1","_nodeVersion":"10.15.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-Zt4EwA05S1oJLg79ceoHV9OvPv25dFyc47sBXazecsjytoy48v8uYZvl5fcyUBGy4cf9x/F7YcHX+LaXv6AIfg==","shasum":"0122c6511a0f71306f3487513837914298e7fd0c","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-3.6.1.tgz","fileCount":44,"unpackedSize":148903,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeqd9OCRA9TVsSAnZWagAAra8P/j0fsV7+3teSuNCTyOdh\nWilviV66tIBrY47M0agB7cMp01NtecsDb1W6Su8dl2bm4pjgv4OMSR31w/UI\nrp4/zCxPXTVtqweiTjrZVmHunMnA8+VDc2pZtTBrZ+DuylEvDbDVVTSszeII\nLMx3pi0FW4C381wkuRhwH/i1A0mfotd0D+14mRI34DQIdfuqG1d8Y5o2L0m5\nz6T2qQ+zjlGe9IWqB3fNeaWxhVyBESKlfn90JJ9VNlQ6+ttHeNyDnK+TMM+f\nsDMDt5sskkCrGGDr2SDOKKH3e8HDe3PsVrkZo+1tJM035gb+raIj9z4QJPaR\nRJreISkh0+HbCYGQODpNDm1RLFU1c8dw3P1VPzn9uQGAQ4m7Y/tt/RIH+dw1\npHnSjn8Fs4NNvwuwG4lN4ZKFSmjfGaN5CaKpOs+P0h31jd6nNXnO1y0g8Rch\np1bPwkD4TbWqjTD+W2qk+frP58citsEORHHnWcRVhZwG0vd5oQ545kyBl/Ks\n6v4ZEgoi1XIvDJMf9+1lFKUP/vSSYunP88g5IyRq5fUPK61flQ1pqsG+HEhK\n25kT/tSRNOBFhRLJVoqQrSGQczKt7IuHLC/tNlsjA1Z8K1XvxiW563Yh5/1q\ndZ2tQWx2jxWKz/PdHZ2n0LTZwwqdxUv6pUIIaK1HA3yZRYMYinxY9yQxSX+v\nBXdZ\r\n=Yi8q\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFZwEZvdQOUloKRaA9nKtr1gA+x6hkT4hk9J4S+BD4fyAiBN6T7adg6iLfHUxt04ZsDTf+9c8/lIjKdP5dn3TY7RpA=="}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"kalwyn+npmci@goodrx.com","name":"heydoctor-ci"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"schlegz76@gmail.com","name":"schlegz"}],"_npmUser":{"name":"choochootrain","email":"hpatel516+services@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_3.6.1_1588191054247_0.5614216176734237"},"_hasShrinkwrap":false},"0.0.0-e415929":{"name":"heydoctor-js","version":"0.0.0-e415929","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/sappira-inc/heydoctor-js.git"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'npm run build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"npm run docs:build && npm run docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"0.0.8","@types/jest":"^24.0.23","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^25.4.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^2.0.3","npm-run-all":"4.1.3","parcel-bundler":"^1.12.4","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"gitHead":"8208715ec7b1cfd16d3563c2e24cad99efe53bf2","readme":"# HeyDoctor Javascript SDK\n\nThe HeyDoctor Javascript library provides convenient access to the HeyDoctor API for applications written in JavaScript.\n\n## Documentation\nCheck out our [auto-generated docs](https://sappira-inc.github.io/heydoctor-js/) using [TypeDoc](http://typedoc.org).\n\n## Installation\nYou can install `heydoctor-js` using your favorite package manager.\n\n```sh\n$ yarn add heydoctor-js\n# or\n$ npm install --save heydoctor-js\n```\n\n## Usage\nYou'll first need to create a new client resource. If using the HeyDoctor SaaS platform, you'll need to provide the API key located in the EMR. The client contains the http module that will communicate with the HeyDoctor API, so we'll pass this client to the other resources you'll need.\n\n### Creating the client\n\n```js\nimport { Client, Environments, Visits, OAuth } from 'heydoctor-js';\n\n// The client will hold all configuration options and the http module\n// that communicates to our server\nconst client = new Client({\n  env: Environments.SANDBOX | Environments.PRODUCTION, // determines the API and OAuth endpoints\n});\n\n// Create two resources passing both the client we've just created\n// ** Some resources also take an optional options object as a second argument\nconst visits = new Visits(client;\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n  scope: '*',\n});\n```\n\n### Subscribing to HTTP events\nThe HeyDoctor client also doubles as an event emitter. The client extends from [Mitt](https://github.com/developit/mitt) and complies with standard EventEmitter events.\n\n```js\ninterface HttpCallback {\n  statusCode: number;\n  data: any;\n}\n\nconst client = new Client();\n\nclient.on('http:success', (data: HttpCallback) => void);\nclient.on('http:error', (data: HttpCallback) => void);\n```\n\n### Authorizing via OAuth\n\nPartnering clients will use the HeyDoctor JS SDK to create or link a HeyDoctor account. HeyDoctor conforms to the existing [OAuth2 protocol](https://oauth.net/2/). In the case that HeyDoctor already has the provided email on file, the SDK will open a dialog box, akin to Facebook or Google login, prompting the user to confirm their existing password. In all successful cases, an access token and refresh token will be returned. The resulting payload is outlined below.\n\nWe recommend to store the longstanding refresh token in a persisted data store. You’ll use this token, along with your unique client id and secret key to regenerate short lived access tokens used to authenticate requests to the HeyDoctor API. For security measures, the access token has a one hour TTL, after which the token will expire and new access token will need to be generated.\n\nUpon successful authorization, all subsequent SDK calls will be authenticated using the access token. The access token can also be utilized server-side to call our API directly.\n\n#### Example\n\n```js\nimport { Client, OAuth } from 'heydoctor-js';\n\nconst client = new Client({\n  env: 'production',\n});\n\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n});\n\n// First attempt to create a new HeyDoctor user silently. The method will throw an error in the case that the email already exists,\n// in which case you have the opportunity to present an unobtrusive dialog for the user to confirm their existing HeyDoctor password.\ntry {\n  const { accessToken, refreshToken } = await oauth.createUser({\n    email: 'frank@heydoctor.com',\n    firstName: 'Frank',\n    lastName: 'Sinatra',\n    dob: '1915-12-12',\n    gender: 'male',\n    addressLine1: '123 Somewhere Street',\n    city: 'Hoboken',\n    state: 'NJ',\n    zip: '07030',\n  });\n} catch (error) {\n  if (error.code === 'account_exists') {\n    const { accessToken, refreshToken } = await oauth.launchWebAuthFlow('frank@heydoctor.com');\n  }\n}\n\n// Now that the client has been authorized, we can call call other methods available in the SDK\nconst visit = await visits.create({\n  code: 'hair-loss',\n});\n\n// Excellent, we've just created our first visit. Now, we can upload photos to that visit.\nawait visit.uploadPhoto('photoId1234', 'base64photostring');\n```\n","readmeFilename":"README.md","bugs":{"url":"https://github.com/sappira-inc/heydoctor-js/issues"},"homepage":"https://github.com/sappira-inc/heydoctor-js#readme","_id":"heydoctor-js@0.0.0-e415929","_nodeVersion":"10.20.1","_npmVersion":"6.14.4","dist":{"integrity":"sha512-6VRv82epEDMl8WlUbkt+00VBjnH/vqUYq/z4O6DRkf7zjLQhdpGRwpeNrxy0hv3QHO1dvVOX+m0mjJUyhRe4Kg==","shasum":"48a24c5478f623d441d68ae1692ec340528f0003","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-0.0.0-e415929.tgz","fileCount":42,"unpackedSize":152095,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeqmFVCRA9TVsSAnZWagAA0nwP/AuwYM0SVA5wJk0b/qP+\nvauakUW4FPF6+po+gmc6f7oxI4tf4hRuUdinbcxn813odWhbaNOO1MSsAG2N\nE5K3+vfho/EVvmG3LPeICuZ/lisiRC2CFj1AMqvmf7bCbEb2HUfhjVKccHzb\n1+tw9hyzqE/1YMU/bmZJp/a+CiCdsbcfjzgy17RzAFrtdpq19iEYBMBQSYKW\nxCEYrt4uylDEr/6lRg3C2ZOKogtKJL+2vh+qKVCInHw4v+omjrzxnkSxYXJ1\naxTR0psNSiJi0P4ZBlcQT6PFk86pzCBdDru8bTjxCE3KJ2aLdC0FhXyUMBDh\nsXuMyehy2wnKuqrU1mR1lspwjd+d+/50CaLgT9Bo5iL2VvRnO7BTxghvAZAg\n4JsVNkHrXnWUTzyugIjcldFY+1cjrwWvaoQ1WSP6h4CF9CGEkmwIL4ndnd91\nBKjULbYm0gZ5oInlvu0lnZRqIsIaHnc3li95qKSi4KpfHw06Sp7Fwg4jsow3\njNxYtsFT+s4oKiwUjkBKeYA/loEQfnV+bv+katgIzb9/0rmos+vFzUCgAlix\nGZbEhbEetOYp/AkfUWr57q7/CchC6H9ncGLGY2rD4itzpYHwbMNhW4mzGIWB\nR9mY7vMIpmlU8CvwwMSokpE8qq8X3aBoQ4nn+PVBdaXwSx8bHcDZufBW7czh\nerRv\r\n=PnkM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA7BTYWu0d/d2jS68ivw6GaSTPEVL9hkV+pOO42VzM3KAiEAgB0CatQ5UHMWy7Qrw1qPZlZtgL2Gb5BOHxINUqkEvzU="}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"gerrymibernardo@gmail.com","name":"gerrymi"},{"email":"kalwyn+npmci@goodrx.com","name":"heydoctor-ci"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"schlegz76@gmail.com","name":"schlegz"}],"_npmUser":{"name":"heydoctor-ci","email":"kalwyn+npmci@goodrx.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_0.0.0-e415929_1588224341271_0.7226725662349687"},"_hasShrinkwrap":false},"3.6.2":{"name":"heydoctor-js","version":"3.6.2","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/sappira-inc/heydoctor-js.git"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'npm run build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"npm run docs:build && npm run docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"0.0.8","@types/jest":"^24.0.23","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^25.4.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^2.0.3","npm-run-all":"4.1.3","parcel-bundler":"^1.12.4","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"gitHead":"e41592983700594df0aad7571eac58c02a8540c8","bugs":{"url":"https://github.com/sappira-inc/heydoctor-js/issues"},"homepage":"https://github.com/sappira-inc/heydoctor-js#readme","_id":"heydoctor-js@3.6.2","_nodeVersion":"10.15.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-ZUfXU5A9cpK9hHjyAHNU/YbV989AJUx8TpSR12DmT99dSVnOwML43eQgS4UsQvEn34l5sSCO76Su7pl1hekZaw==","shasum":"deb9ac53043be74c0959f32e23989d66cf1ec2b5","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-3.6.2.tgz","fileCount":42,"unpackedSize":152087,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeqmIUCRA9TVsSAnZWagAA2I8P/1/4ZOzN2RObJ/diB06w\nvCie/vd7gxpJbFnW+Z92vQUuAuKI85X1+BYyRinM2WY8O7zRGwCSV/cdUvyb\nZJwKZ06tZo4GB8Nz0YFQ2TSgRchpsbMv6TWfKVNIqNsEQ3Xb0oMyZQmV7hl9\njHGQI3E6eSSeU5Z6Y4BuDsAsk/eWsRkxrb8g6gXziAgfDa7Sn/oPgceieQtD\nBO4T9JZP/ApXBnPz2XZMLC44O6S1rFdL500in1jj54yqI7CiySoL5symqs1P\nr7tTEGHk0+O0Zqb2gp2YlKJ1itwOMo/DvZkYncTlqLMKiT6igCA2jJGB7SQS\n27Ocgfwuxitf/8y1f43g26Oq40gNZo07/RmQpicDOkdxUvJ6xMBT5vX7hATm\nd0kcSW6kQ2JXpvifGDq8Nsr5DPW2vk2syuopnhP7X1ocysaYB1Tb8uPxV56v\n9LabrFQJg8P0leqpNU/HaN+s5kxSPgMuSktyI8L/s93izFyWzI+p9pjyqLDY\nYr3JZWVRfAVxPFfJmsYUUhvmawam2b9/qi+W75NYhMILGPfIcHsVLvYlNmdM\ny6fjWwbQwFJ77FYzDX71f87WVxotU4ufw/F2QN9HcTTE6sQlSmky68hcUgOD\n3XFTSCgEMBlFpBAcxfoQ/Z1EDJV19KATIxdtQtovI9dVfvxbelW9VVc8WC5D\n2xkJ\r\n=uppQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQChXf5jrUZe/3H7zEOI8bon2dd3vzOg3HiTM1LhP0V32gIhANfDiRX2APKTqjjrwWH1r8HyvbqqPgqkIcy0ttReJn3U"}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"gerrymibernardo@gmail.com","name":"gerrymi"},{"email":"kalwyn+npmci@goodrx.com","name":"heydoctor-ci"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"schlegz76@gmail.com","name":"schlegz"}],"_npmUser":{"name":"choochootrain","email":"hpatel516+services@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_3.6.2_1588224531921_0.7324463279373954"},"_hasShrinkwrap":false},"0.0.0-696f48a":{"name":"heydoctor-js","version":"0.0.0-696f48a","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/sappira-inc/heydoctor-js.git"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'npm run build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"npm run docs:build && npm run docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"0.0.8","@types/jest":"^24.0.23","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^25.4.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^2.0.3","npm-run-all":"4.1.3","parcel-bundler":"^1.12.4","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"readme":"# HeyDoctor Javascript SDK\n\nThe HeyDoctor Javascript library provides convenient access to the HeyDoctor API for applications written in JavaScript.\n\n## Documentation\nCheck out our [auto-generated docs](https://sappira-inc.github.io/heydoctor-js/) using [TypeDoc](http://typedoc.org).\n\n## Installation\nYou can install `heydoctor-js` using your favorite package manager.\n\n```sh\n$ yarn add heydoctor-js\n# or\n$ npm install --save heydoctor-js\n```\n\n## Usage\nYou'll first need to create a new client resource. If using the HeyDoctor SaaS platform, you'll need to provide the API key located in the EMR. The client contains the http module that will communicate with the HeyDoctor API, so we'll pass this client to the other resources you'll need.\n\n### Creating the client\n\n```js\nimport { Client, Environments, Visits, OAuth } from 'heydoctor-js';\n\n// The client will hold all configuration options and the http module\n// that communicates to our server\nconst client = new Client({\n  env: Environments.SANDBOX | Environments.PRODUCTION, // determines the API and OAuth endpoints\n});\n\n// Create two resources passing both the client we've just created\n// ** Some resources also take an optional options object as a second argument\nconst visits = new Visits(client;\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n  scope: '*',\n});\n```\n\n### Subscribing to HTTP events\nThe HeyDoctor client also doubles as an event emitter. The client extends from [Mitt](https://github.com/developit/mitt) and complies with standard EventEmitter events.\n\n```js\ninterface HttpCallback {\n  statusCode: number;\n  data: any;\n}\n\nconst client = new Client();\n\nclient.on('http:success', (data: HttpCallback) => void);\nclient.on('http:error', (data: HttpCallback) => void);\n```\n\n### Authorizing via OAuth\n\nPartnering clients will use the HeyDoctor JS SDK to create or link a HeyDoctor account. HeyDoctor conforms to the existing [OAuth2 protocol](https://oauth.net/2/). In the case that HeyDoctor already has the provided email on file, the SDK will open a dialog box, akin to Facebook or Google login, prompting the user to confirm their existing password. In all successful cases, an access token and refresh token will be returned. The resulting payload is outlined below.\n\nWe recommend to store the longstanding refresh token in a persisted data store. You’ll use this token, along with your unique client id and secret key to regenerate short lived access tokens used to authenticate requests to the HeyDoctor API. For security measures, the access token has a one hour TTL, after which the token will expire and new access token will need to be generated.\n\nUpon successful authorization, all subsequent SDK calls will be authenticated using the access token. The access token can also be utilized server-side to call our API directly.\n\n#### Example\n\n```js\nimport { Client, OAuth } from 'heydoctor-js';\n\nconst client = new Client({\n  env: 'production',\n});\n\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n});\n\n// First attempt to create a new HeyDoctor user silently. The method will throw an error in the case that the email already exists,\n// in which case you have the opportunity to present an unobtrusive dialog for the user to confirm their existing HeyDoctor password.\ntry {\n  const { accessToken, refreshToken } = await oauth.createUser({\n    email: 'frank@heydoctor.com',\n    firstName: 'Frank',\n    lastName: 'Sinatra',\n    dob: '1915-12-12',\n    gender: 'male',\n    addressLine1: '123 Somewhere Street',\n    city: 'Hoboken',\n    state: 'NJ',\n    zip: '07030',\n  });\n} catch (error) {\n  if (error.code === 'account_exists') {\n    const { accessToken, refreshToken } = await oauth.launchWebAuthFlow('frank@heydoctor.com');\n  }\n}\n\n// Now that the client has been authorized, we can call call other methods available in the SDK\nconst visit = await visits.create({\n  code: 'hair-loss',\n});\n\n// Excellent, we've just created our first visit. Now, we can upload photos to that visit.\nawait visit.uploadPhoto('photoId1234', 'base64photostring');\n```\n","readmeFilename":"README.md","gitHead":"af0474a714fd344f666936810f94019a091e0b0b","bugs":{"url":"https://github.com/sappira-inc/heydoctor-js/issues"},"homepage":"https://github.com/sappira-inc/heydoctor-js#readme","_id":"heydoctor-js@0.0.0-696f48a","_nodeVersion":"10.20.1","_npmVersion":"6.14.4","dist":{"integrity":"sha512-aI5swDad/azdYMf+JZQFQCWK4sVUEM1DDHYOvRkb68rslyctphPq31biVhHyd5A5yKmYlDyIZn+6a6lqO+nCCA==","shasum":"716b1f6e1815b008a75c27c9c6697c68e41565de","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-0.0.0-696f48a.tgz","fileCount":42,"unpackedSize":152201,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJesGiFCRA9TVsSAnZWagAANBYP/RPvMV1hex57fmF++TZP\n5kw162mv82FW6xiJNAWXLzyerA++l6Mnfu9ePhku5MQXbqHS+sTPg+Gr3ILk\nRuDSpSYrIG7IaVDTHBU0Cpq3L+aubiQ5Pj6av5TfOh/moK21U3XC5c/SgcxA\nPaxF2hglf9P75/M/yy7GcqWvdhy16saINhXRkHoBlAbjCF+7snbk0kxPt42H\nu7+3ONYdcpfNNIrBxkPXwa+JjQFaW/OI2fmOtToGL16vWAHGEud6bzcCVsBL\nIWZBPoG3XSklHKX7bkQrEgQEtaRtfqycXwBso0x7jJswy/X4I/b0iEBn3B4+\nxiU8psorZGZp2peQdr4b4BQG1Z6okH0A6boSsnBooBlUUjFBtil1xYNftxaj\n5qiIR5ycfvkoeqWnSGXQ9HgKaAW5WknozJgpsfG405s1zLVFO7/AEInOQnIf\ne5ovQIuxi4B2PCyJYu/koFxiZyI8Jw8KmApKRpKGGBh/raRj1YMDj23KCWln\nRNPZ4/J+j9DMyKtM+yFqjVQi7fAZb8BBwTKAHRF0msPxkyGwHZKoB86aJ/ax\nrGZnhv0AS5muof3Gj3QWBu35tlajYWbvU9pr8paXVQh9BnQVqNkxnvDyMvAe\nfy4LAAYyu3UhBvk9+009swWrzHo6iZo+8CtcWDd7nqtO1dEQ9//Gd3gLpbFT\n1Cuq\r\n=XIqV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDYuoNHlKt0No+lI3UgA+kQRE5+xJcCWzO61B0W2DHr/AIgZyki70UYB3TzQwmgB0JdzZhTfklpb4Z58ziCT2RWmik="}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"gerrymibernardo@gmail.com","name":"gerrymi"},{"email":"kalwyn+npmci@goodrx.com","name":"heydoctor-ci"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"schlegz76@gmail.com","name":"schlegz"}],"_npmUser":{"name":"heydoctor-ci","email":"kalwyn+npmci@goodrx.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_0.0.0-696f48a_1588619397147_0.7682797182339736"},"_hasShrinkwrap":false},"3.6.4":{"name":"heydoctor-js","version":"3.6.4","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/sappira-inc/heydoctor-js.git"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'npm run build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"npm run docs:build && npm run docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"0.0.8","@types/jest":"^24.0.23","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^25.4.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^2.0.3","npm-run-all":"4.1.3","parcel-bundler":"^1.12.4","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"gitHead":"5026dda7e31185e6cec02e904c9fa950c8faf9ba","bugs":{"url":"https://github.com/sappira-inc/heydoctor-js/issues"},"homepage":"https://github.com/sappira-inc/heydoctor-js#readme","_id":"heydoctor-js@3.6.4","_nodeVersion":"10.15.0","_npmVersion":"6.9.0","dist":{"integrity":"sha512-ovZa0cnJL+qqnJbPBd/l3zaR6w/VMp3HdabO8NI2LVF2GjPp3GgElhkRdTxsNJHvhUfGRVqqZYSJ1ImZmYsCIQ==","shasum":"b47887a16b2a5efb9ffaf179ac36c2496db600de","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-3.6.4.tgz","fileCount":42,"unpackedSize":152179,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJesHauCRA9TVsSAnZWagAAoagQAIhmKbBR3z3r+MIL/peU\ngvsl12wsrBil70/0ie+ZM9eECVb+BAg9HtncWZFy4IbgO+tXz9ByoaklzI0D\neXku50xQvHvCBlqYBp+assw/vQRBsUKzwXjrdS68c+vi0iXXmCZAKbV/G5hr\n/YO7nulg9O7ImhYbkvgIui6ydPEjl8+eOZmRw7JF7TfXh8twN7KSXFJnJNmD\nR20WSXq5w0RkzDIXnLt/Qc69Ri2FUWNCmXOVulWZ5++kPFZ09LJjvffBPvLG\nV9b9g45LvXnWY5l/eC/DzWqpGUWzGkyunGSCJ/vNpxEXWyT4VIWSFabSmfkk\nVLJA0HqI/qctEqKk1gsrfPy/Ri+3eBVDJl7H0HBp16pXhTkoFHuYAds5gsql\nZvNR00lGdpZz3LuurS5jK5WTH5IG+rPHq4zPWQMMZp+HnT4DmUfvncbwvl+x\nqyCD6tBXv3mxO7Nw2OkqakGk5XUMwq1TOtRaBmGXBsjIgzRvAcLUJyhrMc2d\nM0VZrbAgPFPNXjhqwwppN51XQ8rTdib3uvhwfKA9LYi6s6w+qj6wUhGU5sqA\nHFNRZnERK1oWQvhVOivzy5bNOSigq0PlEl8z4c+OjBZbLtyA9hXlGHZYiGb+\nCUGBTsBt2KNg4H4NXLHmT0ZDGCEJY5yK4W8nLARpq3kXnlBDZ1dPXfjPAtbw\nVte1\r\n=8DZk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDDeJjt7gW8wMtKUpY7Ef7kRPL/sscng01ROAtQWaSi0AIhAOO0Yt9g+jBVZn2H2PkS9ptO3pJ4yT+q1JoNQJo0zAzp"}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"gerrymibernardo@gmail.com","name":"gerrymi"},{"email":"kalwyn+npmci@goodrx.com","name":"heydoctor-ci"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"schlegz76@gmail.com","name":"schlegz"}],"_npmUser":{"name":"choochootrain","email":"hpatel516+services@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_3.6.4_1588623021397_0.8811955026965528"},"_hasShrinkwrap":false},"0.0.0-22b006e":{"name":"heydoctor-js","version":"0.0.0-22b006e","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"git+https://github.com/sappira-inc/heydoctor-js.git"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'npm run build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"npm run docs:build && npm run docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"0.0.8","@types/jest":"^24.0.23","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^25.4.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^2.0.3","npm-run-all":"4.1.3","parcel-bundler":"^1.12.4","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"readme":"# HeyDoctor Javascript SDK\n\nThe HeyDoctor Javascript library provides convenient access to the HeyDoctor API for applications written in JavaScript.\n\n## Documentation\nCheck out our [auto-generated docs](https://sappira-inc.github.io/heydoctor-js/) using [TypeDoc](http://typedoc.org).\n\n## Installation\nYou can install `heydoctor-js` using your favorite package manager.\n\n```sh\n$ yarn add heydoctor-js\n# or\n$ npm install --save heydoctor-js\n```\n\n## Usage\nYou'll first need to create a new client resource. If using the HeyDoctor SaaS platform, you'll need to provide the API key located in the EMR. The client contains the http module that will communicate with the HeyDoctor API, so we'll pass this client to the other resources you'll need.\n\n### Creating the client\n\n```js\nimport { Client, Environments, Visits, OAuth } from 'heydoctor-js';\n\n// The client will hold all configuration options and the http module\n// that communicates to our server\nconst client = new Client({\n  env: Environments.SANDBOX | Environments.PRODUCTION, // determines the API and OAuth endpoints\n});\n\n// Create two resources passing both the client we've just created\n// ** Some resources also take an optional options object as a second argument\nconst visits = new Visits(client;\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n  scope: '*',\n});\n```\n\n### Subscribing to HTTP events\nThe HeyDoctor client also doubles as an event emitter. The client extends from [Mitt](https://github.com/developit/mitt) and complies with standard EventEmitter events.\n\n```js\ninterface HttpCallback {\n  statusCode: number;\n  data: any;\n}\n\nconst client = new Client();\n\nclient.on('http:success', (data: HttpCallback) => void);\nclient.on('http:error', (data: HttpCallback) => void);\n```\n\n### Authorizing via OAuth\n\nPartnering clients will use the HeyDoctor JS SDK to create or link a HeyDoctor account. HeyDoctor conforms to the existing [OAuth2 protocol](https://oauth.net/2/). In the case that HeyDoctor already has the provided email on file, the SDK will open a dialog box, akin to Facebook or Google login, prompting the user to confirm their existing password. In all successful cases, an access token and refresh token will be returned. The resulting payload is outlined below.\n\nWe recommend to store the longstanding refresh token in a persisted data store. You’ll use this token, along with your unique client id and secret key to regenerate short lived access tokens used to authenticate requests to the HeyDoctor API. For security measures, the access token has a one hour TTL, after which the token will expire and new access token will need to be generated.\n\nUpon successful authorization, all subsequent SDK calls will be authenticated using the access token. The access token can also be utilized server-side to call our API directly.\n\n#### Example\n\n```js\nimport { Client, OAuth } from 'heydoctor-js';\n\nconst client = new Client({\n  env: 'production',\n});\n\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n});\n\n// First attempt to create a new HeyDoctor user silently. The method will throw an error in the case that the email already exists,\n// in which case you have the opportunity to present an unobtrusive dialog for the user to confirm their existing HeyDoctor password.\ntry {\n  const { accessToken, refreshToken } = await oauth.createUser({\n    email: 'frank@heydoctor.com',\n    firstName: 'Frank',\n    lastName: 'Sinatra',\n    dob: '1915-12-12',\n    gender: 'male',\n    addressLine1: '123 Somewhere Street',\n    city: 'Hoboken',\n    state: 'NJ',\n    zip: '07030',\n  });\n} catch (error) {\n  if (error.code === 'account_exists') {\n    const { accessToken, refreshToken } = await oauth.launchWebAuthFlow('frank@heydoctor.com');\n  }\n}\n\n// Now that the client has been authorized, we can call call other methods available in the SDK\nconst visit = await visits.create({\n  code: 'hair-loss',\n});\n\n// Excellent, we've just created our first visit. Now, we can upload photos to that visit.\nawait visit.uploadPhoto('photoId1234', 'base64photostring');\n```\n","readmeFilename":"README.md","gitHead":"c6b6a164f56cfeda8417425d0491b02a6f56f95e","bugs":{"url":"https://github.com/sappira-inc/heydoctor-js/issues"},"homepage":"https://github.com/sappira-inc/heydoctor-js#readme","_id":"heydoctor-js@0.0.0-22b006e","_nodeVersion":"10.20.1","_npmVersion":"6.14.4","dist":{"integrity":"sha512-Rv03SFe0O2kBPdOoMr2tuxjEDDls+w8qMap0mYATQfYc3aQHnfrBIyoVWy1Khwt8w8lUjCaiVNQ3GI1vqMM9RQ==","shasum":"f7e0fde832ff307138be0907bbf1a465552266ca","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-0.0.0-22b006e.tgz","fileCount":42,"unpackedSize":152247,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJesH/5CRA9TVsSAnZWagAAmjcQAIo7RYMSjlsLBfJceSTm\nW3EQoBKPSFUi5o4Nlmuvzl8yk8g9Wd0o1Zsd0JhbMfTZQDmyhBEa3p5xXiCm\nQHx0YwsDei3hj2KS1/zaQa9PEeIFWjfsoa7qdgxlp6b3P1j73PSRgMTQsPaM\n9/LGsNSgASgG4E7lSXp2VQUEYRciXiyoVkDH9U88QdSJdejuFUxOSQy0LKX4\nbX5YgAGQKOOMvFaj+lkPgR8Gc1r0SOIiCK3Ewph6Xh1mOj+wWHMwsyZkes8i\ntYvIMFElKN/AxpjOqWUyZrHG20eEkVVSaPLclIGMDn+B+x4fSonfWiLJm7by\nkEoIfPudk5CiHttOYJl0ZFdiW7NkujZCK11RYok20x8TAGWzWjv8eGtm4OSK\nstoNeyB6c5LJaaYJ/bEoZYggg/4L/Lt9LLlws90jTwS8jDLqyQ1Acq5k3rCI\nPgWMw7M43MTw2HkWn6p6iMLP9C0n4GtsqSevNWZMiehcg/2tz89cVLuAbS34\nL822HWmiONUjB0A9mmK1Lw9ZVGOSMwXyTmeP1o04/oYuWQhk/unzfy/S2joV\nPAlE5zSu4TMwBmxM1pFgXEfUBP3jgDQ7m6ua6JBLaIHj1qSmMwqzs/CXrXxB\n+naTB/mYFSxtd2tyevXSdz1cLZ1XaNZ7PJB9bjs9NYz24coo2X3sP+MKDsum\nZNh/\r\n=fxzd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB+JoEqPngS8vlWvwj2tLnoGHjmsTzJ3sMfuH6uu7aYFAiEA1sQHuThgFT6gcVHLgK5gvHNSOcx5Ag24gXwn/A5wlz0="}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"gerrymibernardo@gmail.com","name":"gerrymi"},{"email":"kalwyn+npmci@goodrx.com","name":"heydoctor-ci"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"schlegz76@gmail.com","name":"schlegz"}],"_npmUser":{"name":"heydoctor-ci","email":"kalwyn+npmci@goodrx.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_0.0.0-22b006e_1588625401135_0.33348412644943015"},"_hasShrinkwrap":false},"0.0.0-a872603":{"name":"heydoctor-js","version":"0.0.0-a872603","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"https://github.com/sappira-inc/heydoctor-js"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'yarn build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"yarn docs:build && yarn docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"0.0.8","@types/jest":"^24.0.23","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^25.4.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^2.0.3","npm-run-all":"4.1.3","parcel-bundler":"^1.12.4","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"readmeFilename":"README.md","readme":"# HeyDoctor Javascript SDK\n\nThe HeyDoctor Javascript library provides convenient access to the HeyDoctor API for applications written in JavaScript.\n\n## Documentation\nCheck out our [auto-generated docs](https://sappira-inc.github.io/heydoctor-js/) using [TypeDoc](http://typedoc.org).\n\n## Installation\nYou can install `heydoctor-js` using your favorite package manager.\n\n```sh\n$ yarn add heydoctor-js\n# or\n$ npm install --save heydoctor-js\n```\n\n## Usage\nYou'll first need to create a new client resource. If using the HeyDoctor SaaS platform, you'll need to provide the API key located in the EMR. The client contains the http module that will communicate with the HeyDoctor API, so we'll pass this client to the other resources you'll need.\n\n### Creating the client\n\n```js\nimport { Client, Environments, Visits, OAuth } from 'heydoctor-js';\n\n// The client will hold all configuration options and the http module\n// that communicates to our server\nconst client = new Client({\n  env: Environments.SANDBOX | Environments.PRODUCTION, // determines the API and OAuth endpoints\n});\n\n// Create two resources passing both the client we've just created\n// ** Some resources also take an optional options object as a second argument\nconst visits = new Visits(client;\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n  scope: '*',\n});\n```\n\n### Subscribing to HTTP events\nThe HeyDoctor client also doubles as an event emitter. The client extends from [Mitt](https://github.com/developit/mitt) and complies with standard EventEmitter events.\n\n```js\ninterface HttpCallback {\n  statusCode: number;\n  data: any;\n}\n\nconst client = new Client();\n\nclient.on('http:success', (data: HttpCallback) => void);\nclient.on('http:error', (data: HttpCallback) => void);\n```\n\n### Authorizing via OAuth\n\nPartnering clients will use the HeyDoctor JS SDK to create or link a HeyDoctor account. HeyDoctor conforms to the existing [OAuth2 protocol](https://oauth.net/2/). In the case that HeyDoctor already has the provided email on file, the SDK will open a dialog box, akin to Facebook or Google login, prompting the user to confirm their existing password. In all successful cases, an access token and refresh token will be returned. The resulting payload is outlined below.\n\nWe recommend to store the longstanding refresh token in a persisted data store. You’ll use this token, along with your unique client id and secret key to regenerate short lived access tokens used to authenticate requests to the HeyDoctor API. For security measures, the access token has a one hour TTL, after which the token will expire and new access token will need to be generated.\n\nUpon successful authorization, all subsequent SDK calls will be authenticated using the access token. The access token can also be utilized server-side to call our API directly.\n\n#### Example\n\n```js\nimport { Client, OAuth } from 'heydoctor-js';\n\nconst client = new Client({\n  env: 'production',\n});\n\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n});\n\n// First attempt to create a new HeyDoctor user silently. The method will throw an error in the case that the email already exists,\n// in which case you have the opportunity to present an unobtrusive dialog for the user to confirm their existing HeyDoctor password.\ntry {\n  const { accessToken, refreshToken } = await oauth.createUser({\n    email: 'frank@heydoctor.com',\n    firstName: 'Frank',\n    lastName: 'Sinatra',\n    dob: '1915-12-12',\n    gender: 'male',\n    addressLine1: '123 Somewhere Street',\n    city: 'Hoboken',\n    state: 'NJ',\n    zip: '07030',\n  });\n} catch (error) {\n  if (error.code === 'account_exists') {\n    const { accessToken, refreshToken } = await oauth.launchWebAuthFlow('frank@heydoctor.com');\n  }\n}\n\n// Now that the client has been authorized, we can call call other methods available in the SDK\nconst visit = await visits.create({\n  code: 'hair-loss',\n});\n\n// Excellent, we've just created our first visit. Now, we can upload photos to that visit.\nawait visit.uploadPhoto('photoId1234', 'base64photostring');\n```\n","licenseText":" MIT Licence\n\n Copyright (c) 2016-present, Kyle Alwyn.\n\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n\n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n","_id":"heydoctor-js@0.0.0-a872603","dist":{"shasum":"bd1fdcf1eafa0e62d5a020056e10243a59836e02","integrity":"sha512-1O9aM+XguzSUt9B+TUD76jXRYZRf80OaCN++uhDzLZiK9+NIb9AJ16i/y04HpI0CZMR5zv9yRS8VWpaFFe+9Gg==","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-0.0.0-a872603.tgz","fileCount":48,"unpackedSize":152238,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJesJZ3CRA9TVsSAnZWagAAnBgP/2asj9RPJJL7vSIIsmkV\nnU3H2YCqg4wuBbWLvBAyry7q+ZqcM2wRGsGbzkSBwVFQR/P7QqJa4BEUd+pq\n1yT6wo4jhcoRU2mSv5rQPJhDo+jnFIVAzly2L4A2mNG4OVc9mGJHUtN7kZJO\nz6RpT6uCufdGlZ/FjssY+iM7WPwXsCzlKsU7zXEQ2m0VLqJA6S/XpTg6vtvY\nwQhWFjgUVrWG6JkgL7ww3DM/MRv33ThsV67xJKryne5LNJE3rfgPFab0+g6L\ne438E4Rf0AZElvMmGWcDKdI9TvZ6uB5qK1wznCFzoiTKXbRr4iY21wB5nLb9\n1iyuDCCPEpgejqrw68Zv3pbuY//vxJsrFdN5PHFVsm8kFR3cA/6FRfsOTOrW\niabfaXhYQ7IcKDkRf/uYSLOYlm4QxCuDuwwlTc2Y+CkCZRgu2O35fwGT0+HW\nldYoro8GeOl9/aUCNVjrzfT3H9bWbynq+vNDaVMAdC0jN+Iic0/5IYdqbmby\nk8VqTF7+MYzIpBT8NZCI0qtT3B4iejiGh6Hda6Byse+R2ZZdT05HeYEj4xZ5\n0ckNaTtagZ3bfx9Eve9Ad53jFCTubqDj1YUp9UaMXn81v3OfZK3y4b2RaUqa\nrPjAOms5wT9ER3Jqq1DwKsuOnLuaDbrjclzfVjqYsmjeoJ0UHqS4xkt8rcnq\no0AS\r\n=yWqi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDAG67/qLCwS+DFlMYQwrkBq7lsATPfFcnx6rG8qckqowIhAI7ZSFIVbsYW0Ane3rCvdEW45ftML5WiyHC/2Er6kA+6"}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"gerrymibernardo@gmail.com","name":"gerrymi"},{"email":"kalwyn+npmci@goodrx.com","name":"heydoctor-ci"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"schlegz76@gmail.com","name":"schlegz"}],"_npmUser":{"name":"heydoctor-ci","email":"kalwyn+npmci@goodrx.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_0.0.0-a872603_1588631159160_0.779912187646163"},"_hasShrinkwrap":false},"3.6.5":{"name":"heydoctor-js","version":"3.6.5","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"https://github.com/sappira-inc/heydoctor-js"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'yarn build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"yarn docs:build && yarn docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"0.0.8","@types/jest":"^24.0.23","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^25.4.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^2.0.3","npm-run-all":"4.1.3","parcel-bundler":"^1.12.4","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"licenseText":" MIT Licence\n\n Copyright (c) 2016-present, Kyle Alwyn.\n\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n\n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n","_id":"heydoctor-js@3.6.5","dist":{"shasum":"5dd9fa9746ad3d54413d1802aee2a664be7c14d8","integrity":"sha512-epLKehbgcpXsBRwNixLYlbUELVEsTPUqeU7utpfJcQQj2LM9km1O7dv9gbO8Ps5NM4B2djU57ZQXHMHamQaYyg==","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-3.6.5.tgz","fileCount":48,"unpackedSize":152272,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJesJnxCRA9TVsSAnZWagAAW64P/i3ZwWGVPvjENpKU4Dqe\n0kjFsLiwagrJs2Q2OEKOU09FP3H9a0+zFx61gTsHphVTYjSisdLHdNGo3CoC\nrYN16/GjinJv9dqfIB1gpbdMflpNG2V89BUjD7wq8S81d7XdsRfo5nC0jPIh\nUt9KqlK6vm7Yl14fuJis69TnHXfXp7ca9DvtaJWYmDd4PkC6InMTJ9XL1Qat\n04dz1sQBtBOozNNfEeY56at+Pzjs49sx2c7UCwZGI8TzFtecMH4CJPtIMIC5\naQg8gA8hSjmw5X/Jpr0PFcEsCGG7QbY4QTm/zO6BELX2NjC1ebmCR3Gw3mT3\nZXEeBQmiE6Kkxx9Oi6FiLCtQUXwLcsNplQus3J38dTQrdkWdg2RiMGoy2Fng\nxcbUEPVKWqcxv/oolHmmYxl6vg4+JXW60/OJQz2pytYP23uJ0zhwjnl+DozG\nLu6x8WxbBYE17RtM0+9Rhj7kv4yqGdFRM7lpOZbU59nISG/jHfm0JhdxrV1H\n1lPiEBAGx9X5ykbkVXDaumWCI4SABNaVUKWopuUz/SqGygx1k5XGjEFe5uXc\n9XzUaFUgpoVPh474fn8+IEEymKdYHu9EjsoPCcbTlgHCMljg1oKxXSl1lIt8\nyylVXat/KXgGEN/UnPL/CSTot07XsCJR2d5KJmANrqT7+mOEPzyBpHkuSj3Y\nVONS\r\n=P6S0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDnDZG0BK0J0Prc7TvkcYTCtWKSyFybdLNUzCWIhi+x6gIhALq7jXZi7hcYey6C4wqxrGU/fSo7UIMGKknTJmzSkEn2"}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"gerrymibernardo@gmail.com","name":"gerrymi"},{"email":"kalwyn+npmci@goodrx.com","name":"heydoctor-ci"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"schlegz76@gmail.com","name":"schlegz"}],"_npmUser":{"name":"schlegz","email":"schlegz76@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_3.6.5_1588632049494_0.09233705916828838"},"_hasShrinkwrap":false},"0.0.0-659d805":{"name":"heydoctor-js","version":"0.0.0-659d805","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"https://github.com/sappira-inc/heydoctor-js"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'yarn build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"yarn docs:build && yarn docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"0.0.8","@types/jest":"^24.0.23","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^25.4.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^2.0.3","npm-run-all":"4.1.3","parcel-bundler":"^1.12.4","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"readmeFilename":"README.md","readme":"# HeyDoctor Javascript SDK\n\nThe HeyDoctor Javascript library provides convenient access to the HeyDoctor API for applications written in JavaScript.\n\n## Documentation\nCheck out our [auto-generated docs](https://sappira-inc.github.io/heydoctor-js/) using [TypeDoc](http://typedoc.org).\n\n## Installation\nYou can install `heydoctor-js` using your favorite package manager.\n\n```sh\n$ yarn add heydoctor-js\n# or\n$ npm install --save heydoctor-js\n```\n\n## Usage\nYou'll first need to create a new client resource. If using the HeyDoctor SaaS platform, you'll need to provide the API key located in the EMR. The client contains the http module that will communicate with the HeyDoctor API, so we'll pass this client to the other resources you'll need.\n\n### Creating the client\n\n```js\nimport { Client, Environments, Visits, OAuth } from 'heydoctor-js';\n\n// The client will hold all configuration options and the http module\n// that communicates to our server\nconst client = new Client({\n  env: Environments.SANDBOX | Environments.PRODUCTION, // determines the API and OAuth endpoints\n});\n\n// Create two resources passing both the client we've just created\n// ** Some resources also take an optional options object as a second argument\nconst visits = new Visits(client;\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n  scope: '*',\n});\n```\n\n### Subscribing to HTTP events\nThe HeyDoctor client also doubles as an event emitter. The client extends from [Mitt](https://github.com/developit/mitt) and complies with standard EventEmitter events.\n\n```js\ninterface HttpCallback {\n  statusCode: number;\n  data: any;\n}\n\nconst client = new Client();\n\nclient.on('http:success', (data: HttpCallback) => void);\nclient.on('http:error', (data: HttpCallback) => void);\n```\n\n### Authorizing via OAuth\n\nPartnering clients will use the HeyDoctor JS SDK to create or link a HeyDoctor account. HeyDoctor conforms to the existing [OAuth2 protocol](https://oauth.net/2/). In the case that HeyDoctor already has the provided email on file, the SDK will open a dialog box, akin to Facebook or Google login, prompting the user to confirm their existing password. In all successful cases, an access token and refresh token will be returned. The resulting payload is outlined below.\n\nWe recommend to store the longstanding refresh token in a persisted data store. You’ll use this token, along with your unique client id and secret key to regenerate short lived access tokens used to authenticate requests to the HeyDoctor API. For security measures, the access token has a one hour TTL, after which the token will expire and new access token will need to be generated.\n\nUpon successful authorization, all subsequent SDK calls will be authenticated using the access token. The access token can also be utilized server-side to call our API directly.\n\n#### Example\n\n```js\nimport { Client, OAuth } from 'heydoctor-js';\n\nconst client = new Client({\n  env: 'production',\n});\n\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n});\n\n// First attempt to create a new HeyDoctor user silently. The method will throw an error in the case that the email already exists,\n// in which case you have the opportunity to present an unobtrusive dialog for the user to confirm their existing HeyDoctor password.\ntry {\n  const { accessToken, refreshToken } = await oauth.createUser({\n    email: 'frank@heydoctor.com',\n    firstName: 'Frank',\n    lastName: 'Sinatra',\n    dob: '1915-12-12',\n    gender: 'male',\n    addressLine1: '123 Somewhere Street',\n    city: 'Hoboken',\n    state: 'NJ',\n    zip: '07030',\n  });\n} catch (error) {\n  if (error.code === 'account_exists') {\n    const { accessToken, refreshToken } = await oauth.launchWebAuthFlow('frank@heydoctor.com');\n  }\n}\n\n// Now that the client has been authorized, we can call call other methods available in the SDK\nconst visit = await visits.create({\n  code: 'hair-loss',\n});\n\n// Excellent, we've just created our first visit. Now, we can upload photos to that visit.\nawait visit.uploadPhoto('photoId1234', 'base64photostring');\n```\n","licenseText":" MIT Licence\n\n Copyright (c) 2016-present, Kyle Alwyn.\n\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n\n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n","_id":"heydoctor-js@0.0.0-659d805","dist":{"shasum":"f91599cd11176462236af425ee31665d1e9bc5db","integrity":"sha512-UU/And/Gl45u9joqFrA9zwCVs/7AZQz2MvJvwRam+Usf6fGmCz+/FcCQaN5bMh5W2RoAwXb5P5y7n79+odpSXA==","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-0.0.0-659d805.tgz","fileCount":48,"unpackedSize":152355,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJesJpbCRA9TVsSAnZWagAANIoP/3bXFIqHLMvkUAq0ZY7/\nD0IRywlZJK2ef+UcQGxGyGtKp+3dFQ+yf6+AoHNQw2CvOhivyrB8uNkRQHuY\nAxrDUK5I2nm9r9DG6A+QQf68OFhCYfhM0V7jOnqkvZ2jMOjoXeYcpxmUesvL\nTketioCf0+CMw28tNfFnoCy0pesZeXFjuqCN+R0VLUn4Z2z4wLJR0L+AreJj\n95erkwTJqWrC7/RAZfWPZI0+Zs1KuFX5lQkiijTbP2atJaO9mKgLO9yBC9SD\nUCleMuoZNY6eWjNU7rt+64iu7j+ec5744KNdlnYjAzYUgKUz0oxp6iMiU3iU\ntwJF+R/0eXpDVLe2uVaFkiKBt0A6Z9QMvbn+twGklHbLVmGCc1vE4LX0uMwc\nIDLs7zICVor8rmLEdF7gUBmYm73BlEZqtRmffke4bDCXXuw63g3vGDt8X0rB\nrF8RkCKMm5FAqpHZzWC+3ydqFGu2G4+3eI8zzXiscygfj742SUi0dfOJgnYG\nnbEpOuzerWwaaoZZZoBKk2NWMyILa6bh2TIYzFPgry1WRvqVWM8YL0W/0S4w\nzrF1Hi/fDJz+MzKT2KggD5RAJnH8OFJkv1VlFliEvR5j8wbxPNEOluVQDUVI\nNKzZYAtN5taxu8YkBcJL8oAQ2uHW9E9IYl/q49nPJcQHNcArf239SgEGwKOf\nv+yf\r\n=Ph+e\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICcOZkCx5wtmfbCgURWYKdK/BBCld8Mg35V9aKlBAKsWAiBmnOUfTummmzEItKBULffajrYoEA+UtHu/A3uXwnRtEg=="}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"gerrymibernardo@gmail.com","name":"gerrymi"},{"email":"kalwyn+npmci@goodrx.com","name":"heydoctor-ci"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"schlegz76@gmail.com","name":"schlegz"}],"_npmUser":{"name":"heydoctor-ci","email":"kalwyn+npmci@goodrx.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_0.0.0-659d805_1588632154558_0.32069527858547553"},"_hasShrinkwrap":false},"0.0.0-0e56df4":{"name":"heydoctor-js","version":"0.0.0-0e56df4","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"https://github.com/sappira-inc/heydoctor-js"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'yarn build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"yarn docs:build && yarn docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"0.0.8","@types/jest":"^24.0.23","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^25.4.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^2.0.3","npm-run-all":"4.1.3","parcel-bundler":"^1.12.4","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"readmeFilename":"README.md","readme":"# HeyDoctor Javascript SDK\n\nThe HeyDoctor Javascript library provides convenient access to the HeyDoctor API for applications written in JavaScript.\n\n## Documentation\nCheck out our [auto-generated docs](https://sappira-inc.github.io/heydoctor-js/) using [TypeDoc](http://typedoc.org).\n\n## Installation\nYou can install `heydoctor-js` using your favorite package manager.\n\n```sh\n$ yarn add heydoctor-js\n# or\n$ npm install --save heydoctor-js\n```\n\n## Usage\nYou'll first need to create a new client resource. If using the HeyDoctor SaaS platform, you'll need to provide the API key located in the EMR. The client contains the http module that will communicate with the HeyDoctor API, so we'll pass this client to the other resources you'll need.\n\n### Creating the client\n\n```js\nimport { Client, Environments, Visits, OAuth } from 'heydoctor-js';\n\n// The client will hold all configuration options and the http module\n// that communicates to our server\nconst client = new Client({\n  env: Environments.SANDBOX | Environments.PRODUCTION, // determines the API and OAuth endpoints\n});\n\n// Create two resources passing both the client we've just created\n// ** Some resources also take an optional options object as a second argument\nconst visits = new Visits(client;\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n  scope: '*',\n});\n```\n\n### Subscribing to HTTP events\nThe HeyDoctor client also doubles as an event emitter. The client extends from [Mitt](https://github.com/developit/mitt) and complies with standard EventEmitter events.\n\n```js\ninterface HttpCallback {\n  statusCode: number;\n  data: any;\n}\n\nconst client = new Client();\n\nclient.on('http:success', (data: HttpCallback) => void);\nclient.on('http:error', (data: HttpCallback) => void);\n```\n\n### Authorizing via OAuth\n\nPartnering clients will use the HeyDoctor JS SDK to create or link a HeyDoctor account. HeyDoctor conforms to the existing [OAuth2 protocol](https://oauth.net/2/). In the case that HeyDoctor already has the provided email on file, the SDK will open a dialog box, akin to Facebook or Google login, prompting the user to confirm their existing password. In all successful cases, an access token and refresh token will be returned. The resulting payload is outlined below.\n\nWe recommend to store the longstanding refresh token in a persisted data store. You’ll use this token, along with your unique client id and secret key to regenerate short lived access tokens used to authenticate requests to the HeyDoctor API. For security measures, the access token has a one hour TTL, after which the token will expire and new access token will need to be generated.\n\nUpon successful authorization, all subsequent SDK calls will be authenticated using the access token. The access token can also be utilized server-side to call our API directly.\n\n#### Example\n\n```js\nimport { Client, OAuth } from 'heydoctor-js';\n\nconst client = new Client({\n  env: 'production',\n});\n\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n});\n\n// First attempt to create a new HeyDoctor user silently. The method will throw an error in the case that the email already exists,\n// in which case you have the opportunity to present an unobtrusive dialog for the user to confirm their existing HeyDoctor password.\ntry {\n  const { accessToken, refreshToken } = await oauth.createUser({\n    email: 'frank@heydoctor.com',\n    firstName: 'Frank',\n    lastName: 'Sinatra',\n    dob: '1915-12-12',\n    gender: 'male',\n    addressLine1: '123 Somewhere Street',\n    city: 'Hoboken',\n    state: 'NJ',\n    zip: '07030',\n  });\n} catch (error) {\n  if (error.code === 'account_exists') {\n    const { accessToken, refreshToken } = await oauth.launchWebAuthFlow('frank@heydoctor.com');\n  }\n}\n\n// Now that the client has been authorized, we can call call other methods available in the SDK\nconst visit = await visits.create({\n  code: 'hair-loss',\n});\n\n// Excellent, we've just created our first visit. Now, we can upload photos to that visit.\nawait visit.uploadPhoto('photoId1234', 'base64photostring');\n```\n","licenseText":" MIT Licence\n\n Copyright (c) 2016-present, Kyle Alwyn.\n\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n\n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n","_id":"heydoctor-js@0.0.0-0e56df4","dist":{"shasum":"6ead8a84ff03d70132b8037080a855004c07c7d8","integrity":"sha512-+C1ObFaKtA6sz0u8t4C7rr00zroDL4mlx0CIzG82k7ZZ/YS/Z+ne1yXv3e4W+mORo0AmPsIj0SFznEO0/0u+ig==","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-0.0.0-0e56df4.tgz","fileCount":48,"unpackedSize":152238,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJesJpjCRA9TVsSAnZWagAAz60P/1GXIxkyO27oLadDxzq5\nRvpfupJqM27QiAsMHKQ1xcMy4jxgcJX+FlyJ6Z9gYbn3Ha4JVNIkhpkFu0l4\noHYIby+/JQeFcz/z/qtJdvdG68aJ80VNSPlDdvQTFCnirrkTt5EyFSgnhXBy\nL249VDvLQQTbOl9m8Fvrc6dHbm4cgmRQbvJ6i6ITqm//gAw/OmllqKwR6LLC\nvSBwpo70OMF3PT1JPBdzFfTksfYTXV2JtlUCbcL6TATffZWOS6ClxWnQbx8j\nB68gxYigGdx9M0q5fIcDiUEzM7TLK7h1CVg0MeO9SqcOhtVYj12Qo84JUdqQ\nxvmDhUJcIe/lNA+5eD6Vn1/ibExkjP/A+Cp7HDTp+P/d4ZkOJ2Z9JG71+OOs\na5rlAWeWE1bXTPSylWoSVobWDD1OktdDTsd+OiEIudce2dMIPt+3XJstem8f\nBAZoalYmwmm8M/vLRF7U1+KFsVGX4/B71PUZcutLI6nU2uFdoY7Rfz7wBxU6\n7JqGgfnGOUQiayf/gfp0pfUeJe7GJB36yDPG5MrS+7Rsa/24WfA32zyyLKqz\nB9g9trc/1VNslMZp1pbKU/yWOQXjX+2FiFXGLqCiLQRWo0kl/JIcV/IFXSpT\nSC3PVZ1RsiCR//mUGJ1JJ2cOtFyQ3qHCI9iBPwLW9jAsst9P+9GyKgGRWCWx\nS9o5\r\n=Ee5x\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHvGn8YgIRfvz7NZV1Kh5RtEdbAG0S7n04eibJwEqyS9AiAEbPSUXqzl7ZF7wNhlbW5Ay/iSCiq6AMGIQtGvS/yPwA=="}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"gerrymibernardo@gmail.com","name":"gerrymi"},{"email":"kalwyn+npmci@goodrx.com","name":"heydoctor-ci"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"schlegz76@gmail.com","name":"schlegz"}],"_npmUser":{"name":"heydoctor-ci","email":"kalwyn+npmci@goodrx.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_0.0.0-0e56df4_1588632162813_0.43987195517808164"},"_hasShrinkwrap":false},"3.6.6":{"name":"heydoctor-js","version":"3.6.6","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"https://github.com/sappira-inc/heydoctor-js"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'yarn build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"yarn docs:build && yarn docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"0.0.8","@types/jest":"^24.0.23","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^25.4.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^2.0.3","npm-run-all":"4.1.3","parcel-bundler":"^1.12.4","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"licenseText":" MIT Licence\n\n Copyright (c) 2016-present, Kyle Alwyn.\n\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n\n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n","_id":"heydoctor-js@3.6.6","dist":{"shasum":"cf0a18f5f7461b05f2deb27e730af64450fd9ca5","integrity":"sha512-VChcKqejAaSgtePhbgtuJQfTtpZWONwQb68HuLVW9BypbEcTjtWr1VSzn5gTGeBALJs/AUi85N2FipcaMnpAfw==","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-3.6.6.tgz","fileCount":48,"unpackedSize":152318,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJesJtBCRA9TVsSAnZWagAAZKoP/A34CK9HVdfQC/0hIiYf\n0TKs9WAtpaMt8MpBsYEA2XsPg/b7ZmtQFYYCc8mgQtRjfgI/j0gPu4NqCr+c\no8kP1G0pN4DjFlUZXCMvvcQ8gXR7cQbyru9luc6IK1utMZBoDM3vo1disw21\nvmhPgCAFZ0pfnseQP+NGz8MxG1HHvSAbA0vc4tatb5PeJpNeUeLTup6W6W9c\nyls/TuSCoyzEnpvb60eC+bNk9Ex1w/5smYuAYwN3xNF+VT6QlTAIFY75h6Us\nW0sS/zyS3xA+VcPnMXwNPDS4DByC/UX6RYSMhH8mAiR02+R27Lm+5leYHYtt\nyDeX/nQOWPEuUqNTM3OH4ToJ+okfN6n1OTvbiuDiBRdmbSHFPnYB1J6ESM6K\nKkcrndU6L6yQNnqPuGKMYK+zARVcOk1SWtzUo/ETdw2UnT63KosiERILcPGQ\ntBFz7mVP5yrtk9/LV2iYYEMIpVaXrY1eDNzAaUkZoyEhbvYfB8nJzPT80L5W\n1IjplJYdAehTpzrqIp1wsq1zJfB+jKh6LubdVmKy9lwlzlYvWtDJdtMzQv5J\nmOmqhwXctvSz8oX7ywLmcdV37HP6T0GwCOGwYec8zBkLhsZNqbjdHUf/VAnw\nyL+be0i4M2CngjCsfBZ97dksn+ggzMMKdWMan5mzH7uXYuc3lXyPh+zvRlha\nR+uF\r\n=T0/g\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBcerFV6zGtdfiDxZaPlUR0epVrKqG6udM9JnAqZunr5AiEAlgFlm33dejyz1zoKnPI2alG4zVhJckz2M3H/iOS5VF0="}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"gerrymibernardo@gmail.com","name":"gerrymi"},{"email":"kalwyn+npmci@goodrx.com","name":"heydoctor-ci"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"schlegz76@gmail.com","name":"schlegz"}],"_npmUser":{"name":"schlegz","email":"schlegz76@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_3.6.6_1588632384721_0.08569853339777955"},"_hasShrinkwrap":false},"3.6.7":{"name":"heydoctor-js","version":"3.6.7","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"https://github.com/sappira-inc/heydoctor-js"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'yarn build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"yarn docs:build && yarn docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"0.0.8","@types/jest":"^24.0.23","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^25.4.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^2.0.3","npm-run-all":"4.1.3","parcel-bundler":"^1.12.4","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"licenseText":" MIT Licence\n\n Copyright (c) 2016-present, Kyle Alwyn.\n\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n\n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n","_id":"heydoctor-js@3.6.7","dist":{"shasum":"c56e9ed34264f8e08d3dd90b4df63e0a9619f14d","integrity":"sha512-IIS2M6xJJ8eCNRWvCJtDUcJJaRjDZ9Ta4uSTvyo/cv4CCJYSdtd+HjIiD3r1szuYObdFtvPCgw3580EuF98l6w==","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-3.6.7.tgz","fileCount":48,"unpackedSize":152364,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJesJ0hCRA9TVsSAnZWagAAuTcQAIwV4IF+5eDcSGn/7+KY\nqfWyePUaFuin+RlfY63WS+KhbkmlH+HCUsERaPtQ/QGJRX9E+S6EEMa8UXPj\nVXHfQNpwr4/cXnGHRKNofy4Stz0zOdtrVvlW+EnC532liZ3csY4l1UsQanC4\n2yJ2MURfsl7/x2I4N/7SqYXcr2zqbvK6D+qWPsOebNe53mlXujQ19vRUGyGZ\nF1TDlyzRq1wBqiMFTDWTVO/8uLDsxVEHXFh91y1GKhtjd6AvK8yIWW/9bZMj\nQScL5i0dIIYj9PFtrGlG8gVmHCVC9Yqnzwe1gN4cwpBxzK3WaH2xRqxAncjK\nNfsN3PWQYhgD3fFgHDUfavHxdN6TqOgTC82olTXqE4WeG3GXt6BAzTzhYHwP\neuciYkLiGlbkrHUNF5ARQOFlGLh+NAS/9GN0NxJaHcBB2y0jqxlu7plCnU6K\nLw5zErDe8HMar1TlE8k7MJK1AnIcd8J8f9z0ZqwKdWrsB15R6Pan2RIboIR8\nBrCZYe0pdtznGmeA78b0TCRcivw/AcqogdQVRLZGPoGLspib3RO84E67U5Hz\nZgpm44NkFAatJjSLUjXMjWXQ+j87WYiReSbID6GvYkqR1yXsxiuSPQaPU3RH\nqC7jb4JXyjayR++otTl8hgav7FKgu0ac3HSy2/2xaA+ndJWeNABhEeFQv0fZ\n8irQ\r\n=6cQv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCQC9+yBExCTqgxpIyjUgpNfrIEKMfAM1mlqZSb886hagIgF7Fdg4iUdUlaa03Qu/ODFErQcWXBKlrXqLxiMvSIO5g="}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"gerrymibernardo@gmail.com","name":"gerrymi"},{"email":"kalwyn+npmci@goodrx.com","name":"heydoctor-ci"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"schlegz76@gmail.com","name":"schlegz"}],"_npmUser":{"name":"schlegz","email":"schlegz76@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_3.6.7_1588632865513_0.5606950741130357"},"_hasShrinkwrap":false},"3.6.8":{"name":"heydoctor-js","version":"3.6.8","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"https://github.com/sappira-inc/heydoctor-js"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'yarn build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"yarn docs:build && yarn docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"0.0.8","@types/jest":"^24.0.23","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^25.4.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^2.0.3","npm-run-all":"4.1.3","parcel-bundler":"^1.12.4","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"licenseText":" MIT Licence\n\n Copyright (c) 2016-present, Kyle Alwyn.\n\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n\n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n","_id":"heydoctor-js@3.6.8","dist":{"shasum":"ee845ec684656e312087e4332d960385a48266cd","integrity":"sha512-LsMOnAjJcA6mHGH/jA6kyA1F1BanGVkH/BWYkyXCckpXfxyOrBqq7xQ7suteyPsklic+17CZOVMjVb/3WQkr4Q==","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-3.6.8.tgz","fileCount":48,"unpackedSize":152556,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJesKAACRA9TVsSAnZWagAAbvMQAJFjgYJb8qPlpjLuBeaf\nMxf6C4jxBggmICyY6SqrjtDxudD1zDedlncVHbRUy9uXV8NqQ1f3Q37ap4HY\nZsUWqprG2u4Z7PXKTicNZYm7O+ODRUlYTwSeUglx+mfGfS8r83o6tcwPNUZ3\nCGyA9N+ROZJuqqDm3+DliC+ToT+CUugRtpYt6lHoJWgJvexKfboPnJZfqn6J\n+fQCI/SUasFH3HOogQhHYQDVbBpbr9Rd15en4YNa00pZvyJDIQH9WU6eEO3+\n0CzUZZyEdiKi12LH6Lhr3lUr+I/Q9PEDqkujEekY0H9J+6KfUUWRTvnsT17A\nZ/Gva6C5WPEaQJtwvp0K4LsWXngOjNMZ1J0i8c9ueqnGnpduyKmXN8AihZ/L\n4agumrCpmudC7x16oXPysCuNVoMmD6RjYRsELLjlM38xUMh/kTS1jBfcdLQv\nBX9N6JW2L5u1klAT/krRFR+qhUhwzevBkVeayDtceHoQUnounfCmI13hocRL\nER5YqAmXt9e++ElTZUsqxMPODhVzrl9JD8TiwC9LUIne+/ascwTYQ/2vs+Xv\nQJwAZ4Pb3LxT+nHfpvYtaeU225DFnO2P414Y5lH2bxT6tFjHTT3Ina18451f\nmHyp5jdyUIiQF2jlTKQqIMJMDc4Svpb0lSskXttdAfVpEvjXF3NjzyQkg0vX\nUZgl\r\n=gpNr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD1UDKfdNB4nG/phZjIO1B83SoOCPOoETYmvL4gqxWdNgIgL+TCNZRgjGycAWaB0BbscklQXH84KlyR3a8d3TtfA7Y="}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"gerrymibernardo@gmail.com","name":"gerrymi"},{"email":"kalwyn+npmci@goodrx.com","name":"heydoctor-ci"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"schlegz76@gmail.com","name":"schlegz"}],"_npmUser":{"name":"choochootrain","email":"hpatel516+services@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_3.6.8_1588633599972_0.8772961927104306"},"_hasShrinkwrap":false},"0.0.0-706e360":{"name":"heydoctor-js","version":"0.0.0-706e360","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"https://github.com/sappira-inc/heydoctor-js"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'yarn build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"yarn docs:build && yarn docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"0.0.8","@types/jest":"^24.0.23","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^25.4.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^2.0.3","npm-run-all":"4.1.3","parcel-bundler":"^1.12.4","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"readmeFilename":"README.md","readme":"# HeyDoctor Javascript SDK\n\nThe HeyDoctor Javascript library provides convenient access to the HeyDoctor API for applications written in JavaScript.\n\n## Documentation\nCheck out our [auto-generated docs](https://sappira-inc.github.io/heydoctor-js/) using [TypeDoc](http://typedoc.org).\n\n## Installation\nYou can install `heydoctor-js` using your favorite package manager.\n\n```sh\n$ yarn add heydoctor-js\n# or\n$ npm install --save heydoctor-js\n```\n\n## Usage\nYou'll first need to create a new client resource. If using the HeyDoctor SaaS platform, you'll need to provide the API key located in the EMR. The client contains the http module that will communicate with the HeyDoctor API, so we'll pass this client to the other resources you'll need.\n\n### Creating the client\n\n```js\nimport { Client, Environments, Visits, OAuth } from 'heydoctor-js';\n\n// The client will hold all configuration options and the http module\n// that communicates to our server\nconst client = new Client({\n  env: Environments.SANDBOX | Environments.PRODUCTION, // determines the API and OAuth endpoints\n});\n\n// Create two resources passing both the client we've just created\n// ** Some resources also take an optional options object as a second argument\nconst visits = new Visits(client;\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n  scope: '*',\n});\n```\n\n### Subscribing to HTTP events\nThe HeyDoctor client also doubles as an event emitter. The client extends from [Mitt](https://github.com/developit/mitt) and complies with standard EventEmitter events.\n\n```js\ninterface HttpCallback {\n  statusCode: number;\n  data: any;\n}\n\nconst client = new Client();\n\nclient.on('http:success', (data: HttpCallback) => void);\nclient.on('http:error', (data: HttpCallback) => void);\n```\n\n### Authorizing via OAuth\n\nPartnering clients will use the HeyDoctor JS SDK to create or link a HeyDoctor account. HeyDoctor conforms to the existing [OAuth2 protocol](https://oauth.net/2/). In the case that HeyDoctor already has the provided email on file, the SDK will open a dialog box, akin to Facebook or Google login, prompting the user to confirm their existing password. In all successful cases, an access token and refresh token will be returned. The resulting payload is outlined below.\n\nWe recommend to store the longstanding refresh token in a persisted data store. You’ll use this token, along with your unique client id and secret key to regenerate short lived access tokens used to authenticate requests to the HeyDoctor API. For security measures, the access token has a one hour TTL, after which the token will expire and new access token will need to be generated.\n\nUpon successful authorization, all subsequent SDK calls will be authenticated using the access token. The access token can also be utilized server-side to call our API directly.\n\n#### Example\n\n```js\nimport { Client, OAuth } from 'heydoctor-js';\n\nconst client = new Client({\n  env: 'production',\n});\n\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n});\n\n// First attempt to create a new HeyDoctor user silently. The method will throw an error in the case that the email already exists,\n// in which case you have the opportunity to present an unobtrusive dialog for the user to confirm their existing HeyDoctor password.\ntry {\n  const { accessToken, refreshToken } = await oauth.createUser({\n    email: 'frank@heydoctor.com',\n    firstName: 'Frank',\n    lastName: 'Sinatra',\n    dob: '1915-12-12',\n    gender: 'male',\n    addressLine1: '123 Somewhere Street',\n    city: 'Hoboken',\n    state: 'NJ',\n    zip: '07030',\n  });\n} catch (error) {\n  if (error.code === 'account_exists') {\n    const { accessToken, refreshToken } = await oauth.launchWebAuthFlow('frank@heydoctor.com');\n  }\n}\n\n// Now that the client has been authorized, we can call call other methods available in the SDK\nconst visit = await visits.create({\n  code: 'hair-loss',\n});\n\n// Excellent, we've just created our first visit. Now, we can upload photos to that visit.\nawait visit.uploadPhoto('photoId1234', 'base64photostring');\n```\n","licenseText":" MIT Licence\n\n Copyright (c) 2016-present, Kyle Alwyn.\n\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n\n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n","_id":"heydoctor-js@0.0.0-706e360","dist":{"shasum":"e122c7e9585ae0548316f63b1d540e6127f74ad8","integrity":"sha512-cm+1pIdQV76YU5552R2OMNRLL0eC3Hh3rQTpl55M+GVtslnsPr5KSZRSGSNylx7pPZnbjnwHkc+3P3auz5QSxA==","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-0.0.0-706e360.tgz","fileCount":48,"unpackedSize":152564,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJesKDcCRA9TVsSAnZWagAAhEIQAIweTKQgpruYMZWQh1xs\n3NwkUml9uF5UGzkk26fNZCp9nctcus46sBf0Ee7M988mVBOjDkU5KgYtMXwh\nAIdt8o71oItgy5zaneECkV7hE8cZTY8VfTqPiw6rEryVGYRXaZlZwG8t4ZWX\n1P6HZPyLTYD1bRxKV+Vsg6snZziYRwrbOjEeJrF8QBCzWkDzfFxrvQRa3hJ/\ndSP+WfSFuBbZaiSaHmhHSugPKpAtUue73k9xMxQv7WGSqCivBKtauV3T4cc8\nAf5kCbY1T6WbopQ6b4eKtc0ZywJnVxOHmLYyHHNuihW6fRg+GHxHcPDoAyxp\nqYRb3uA6vQ83MwV1V0iiBuGvtGLPR5LTmCNp0A5MXSeWL276C25QCkSkjuog\ns0V9Rr0SgIH5t9Z6y9Kb34HX6xuJlzTCUf12cF0UDE+VNi7XmBhx5Ly4hZF6\nsvo2L1PfehxlvcSdvUuj2TZLxuq5SPYpx+dUfchsaVHEJMCKh0AsDjHDO9sf\nmMrv0pCnjmXD9xGKBWwYG50jnR5tzColA/sFUalA5IvzkxQ+jzLvoqDKlIhZ\nSAulHoSOO7UgKWh0VXvslxFkEuTBb/HArppiqlMEByY05t0wzV4QLuYR/p3+\nq8QL82IaNBO0lynGRgEnCZrMzy1IEuAgMGfVVPIWmrIVie3wvcruF8mPXI80\nczU/\r\n=xkZ1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDELq7EwyTVrKizWsMBwVKity5Y7V7z4Y5X2sm7P8NpZwIhAKXfJlxC45FEI8nTVqGkbIxwR+MnA4hSn2KOUGrxGP/c"}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"gerrymibernardo@gmail.com","name":"gerrymi"},{"email":"kalwyn+npmci@goodrx.com","name":"heydoctor-ci"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"schlegz76@gmail.com","name":"schlegz"}],"_npmUser":{"name":"heydoctor-ci","email":"kalwyn+npmci@goodrx.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_0.0.0-706e360_1588633819856_0.9936336299781814"},"_hasShrinkwrap":false},"0.0.0-4edaf18":{"name":"heydoctor-js","version":"0.0.0-4edaf18","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"https://github.com/sappira-inc/heydoctor-js"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'yarn build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"yarn docs:build && yarn docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"0.0.8","@types/jest":"^24.0.23","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^25.4.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^2.0.3","npm-run-all":"4.1.3","parcel-bundler":"^1.12.4","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"readmeFilename":"README.md","readme":"# HeyDoctor Javascript SDK\n\nThe HeyDoctor Javascript library provides convenient access to the HeyDoctor API for applications written in JavaScript.\n\n## Documentation\nCheck out our [auto-generated docs](https://sappira-inc.github.io/heydoctor-js/) using [TypeDoc](http://typedoc.org).\n\n## Installation\nYou can install `heydoctor-js` using your favorite package manager.\n\n```sh\n$ yarn add heydoctor-js\n# or\n$ npm install --save heydoctor-js\n```\n\n## Usage\nYou'll first need to create a new client resource. If using the HeyDoctor SaaS platform, you'll need to provide the API key located in the EMR. The client contains the http module that will communicate with the HeyDoctor API, so we'll pass this client to the other resources you'll need.\n\n### Creating the client\n\n```js\nimport { Client, Environments, Visits, OAuth } from 'heydoctor-js';\n\n// The client will hold all configuration options and the http module\n// that communicates to our server\nconst client = new Client({\n  env: Environments.SANDBOX | Environments.PRODUCTION, // determines the API and OAuth endpoints\n});\n\n// Create two resources passing both the client we've just created\n// ** Some resources also take an optional options object as a second argument\nconst visits = new Visits(client;\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n  scope: '*',\n});\n```\n\n### Subscribing to HTTP events\nThe HeyDoctor client also doubles as an event emitter. The client extends from [Mitt](https://github.com/developit/mitt) and complies with standard EventEmitter events.\n\n```js\ninterface HttpCallback {\n  statusCode: number;\n  data: any;\n}\n\nconst client = new Client();\n\nclient.on('http:success', (data: HttpCallback) => void);\nclient.on('http:error', (data: HttpCallback) => void);\n```\n\n### Authorizing via OAuth\n\nPartnering clients will use the HeyDoctor JS SDK to create or link a HeyDoctor account. HeyDoctor conforms to the existing [OAuth2 protocol](https://oauth.net/2/). In the case that HeyDoctor already has the provided email on file, the SDK will open a dialog box, akin to Facebook or Google login, prompting the user to confirm their existing password. In all successful cases, an access token and refresh token will be returned. The resulting payload is outlined below.\n\nWe recommend to store the longstanding refresh token in a persisted data store. You’ll use this token, along with your unique client id and secret key to regenerate short lived access tokens used to authenticate requests to the HeyDoctor API. For security measures, the access token has a one hour TTL, after which the token will expire and new access token will need to be generated.\n\nUpon successful authorization, all subsequent SDK calls will be authenticated using the access token. The access token can also be utilized server-side to call our API directly.\n\n#### Example\n\n```js\nimport { Client, OAuth } from 'heydoctor-js';\n\nconst client = new Client({\n  env: 'production',\n});\n\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n});\n\n// First attempt to create a new HeyDoctor user silently. The method will throw an error in the case that the email already exists,\n// in which case you have the opportunity to present an unobtrusive dialog for the user to confirm their existing HeyDoctor password.\ntry {\n  const { accessToken, refreshToken } = await oauth.createUser({\n    email: 'frank@heydoctor.com',\n    firstName: 'Frank',\n    lastName: 'Sinatra',\n    dob: '1915-12-12',\n    gender: 'male',\n    addressLine1: '123 Somewhere Street',\n    city: 'Hoboken',\n    state: 'NJ',\n    zip: '07030',\n  });\n} catch (error) {\n  if (error.code === 'account_exists') {\n    const { accessToken, refreshToken } = await oauth.launchWebAuthFlow('frank@heydoctor.com');\n  }\n}\n\n// Now that the client has been authorized, we can call call other methods available in the SDK\nconst visit = await visits.create({\n  code: 'hair-loss',\n});\n\n// Excellent, we've just created our first visit. Now, we can upload photos to that visit.\nawait visit.uploadPhoto('photoId1234', 'base64photostring');\n```\n","licenseText":" MIT Licence\n\n Copyright (c) 2016-present, Kyle Alwyn.\n\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n\n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n","_id":"heydoctor-js@0.0.0-4edaf18","dist":{"shasum":"3c7b6fc3801dd0d36d7308ba5e673168d8e90ecf","integrity":"sha512-E8MH8ZEwA00GBHp6MfrAKX4UJL16x42gfDD3/kDQ7DrtUrB9sqN6df66SOukR+4Bscq12DUuHGrGgnAfRG/APw==","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-0.0.0-4edaf18.tgz","fileCount":48,"unpackedSize":155107,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeseF+CRA9TVsSAnZWagAA1QoQAJm4Zk0F5iCrXQu6hZ4i\nF6A50b2T6O+o70CM36KO/PbuJ59/MGLP2a8gwrsWAoEW6g8Mqlub2ujoKW8R\n6D0kqvGfXLmE5bRv2oaL+vxcoMZE3qVgFIe9h/J2h1h3u/tRN6rFisXm+0go\neqHVl5j4gK2CzjLk7gSGoo4lWT+gS0HolZaaiSPHDHqXUTiPwkWSwwOsVWgv\nRmYk/HmOS+Ok4/3twtaAkUA/Pq/I4dX4u0rxE/PuB/RQsI/0hA7CPl5eWwY1\nEjq+XUOhm7shUB1gtbDkfqRqDka2fj9H9uN5qZkRUPKVRHj9ks4Ph2sv9ixQ\n4cnzAXDTR4IKnZEEAVGAPIZXAF0IvYGAJ7hHjVmpjiM7ijNM/5GU0pM0bSwH\nsmOEX73sd6c7NsHTVTKdhZyfQU22LBd5tZzCy14iVDQkJqNv9EXBuE+eSfrY\nHixuc9BF73ekQp32KZ8CDxF/AzaW/dDqeDMSTM7rTlscc7j7eccYP1PE/6q2\nTzgBvgknc698dnQDXQnuwG0woNZdSenfepwe6PnHBtK26mFGUOCWgXSf7M10\nM0O8e128j1M8TY6+sOBKuNhDdKdeHhd1Txx82uIO7Od5zJkHUaeKNPxYwWJE\np1f/SZqKIBB4vidIaVZmUyeDln7ita5i7yceAkWiQcl9IxnMXfMY3esS6GVE\nrODu\r\n=5Pyt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFt+MaOfQDRQ2VF9hHuvTLKiuC/9/TvF0i8+vrXBG8lLAiEApv35moNk/jerxH1q/KLk8w1v/IoUu2DLoVyFpFZ/MdE="}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"gerrymibernardo@gmail.com","name":"gerrymi"},{"email":"kalwyn+npmci@goodrx.com","name":"heydoctor-ci"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"schlegz76@gmail.com","name":"schlegz"}],"_npmUser":{"name":"heydoctor-ci","email":"kalwyn+npmci@goodrx.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_0.0.0-4edaf18_1588715902171_0.31320219473877087"},"_hasShrinkwrap":false},"0.0.0-4cf4a5e":{"name":"heydoctor-js","version":"0.0.0-4cf4a5e","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"https://github.com/sappira-inc/heydoctor-js"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'yarn build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"yarn docs:build && yarn docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"0.0.8","@types/jest":"^24.0.23","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^25.4.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^2.0.3","npm-run-all":"4.1.3","parcel-bundler":"^1.12.4","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"readmeFilename":"README.md","readme":"# HeyDoctor Javascript SDK\n\nThe HeyDoctor Javascript library provides convenient access to the HeyDoctor API for applications written in JavaScript.\n\n## Documentation\nCheck out our [auto-generated docs](https://sappira-inc.github.io/heydoctor-js/) using [TypeDoc](http://typedoc.org).\n\n## Installation\nYou can install `heydoctor-js` using your favorite package manager.\n\n```sh\n$ yarn add heydoctor-js\n# or\n$ npm install --save heydoctor-js\n```\n\n## Usage\nYou'll first need to create a new client resource. If using the HeyDoctor SaaS platform, you'll need to provide the API key located in the EMR. The client contains the http module that will communicate with the HeyDoctor API, so we'll pass this client to the other resources you'll need.\n\n### Creating the client\n\n```js\nimport { Client, Environments, Visits, OAuth } from 'heydoctor-js';\n\n// The client will hold all configuration options and the http module\n// that communicates to our server\nconst client = new Client({\n  env: Environments.SANDBOX | Environments.PRODUCTION, // determines the API and OAuth endpoints\n});\n\n// Create two resources passing both the client we've just created\n// ** Some resources also take an optional options object as a second argument\nconst visits = new Visits(client;\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n  scope: '*',\n});\n```\n\n### Subscribing to HTTP events\nThe HeyDoctor client also doubles as an event emitter. The client extends from [Mitt](https://github.com/developit/mitt) and complies with standard EventEmitter events.\n\n```js\ninterface HttpCallback {\n  statusCode: number;\n  data: any;\n}\n\nconst client = new Client();\n\nclient.on('http:success', (data: HttpCallback) => void);\nclient.on('http:error', (data: HttpCallback) => void);\n```\n\n### Authorizing via OAuth\n\nPartnering clients will use the HeyDoctor JS SDK to create or link a HeyDoctor account. HeyDoctor conforms to the existing [OAuth2 protocol](https://oauth.net/2/). In the case that HeyDoctor already has the provided email on file, the SDK will open a dialog box, akin to Facebook or Google login, prompting the user to confirm their existing password. In all successful cases, an access token and refresh token will be returned. The resulting payload is outlined below.\n\nWe recommend to store the longstanding refresh token in a persisted data store. You’ll use this token, along with your unique client id and secret key to regenerate short lived access tokens used to authenticate requests to the HeyDoctor API. For security measures, the access token has a one hour TTL, after which the token will expire and new access token will need to be generated.\n\nUpon successful authorization, all subsequent SDK calls will be authenticated using the access token. The access token can also be utilized server-side to call our API directly.\n\n#### Example\n\n```js\nimport { Client, OAuth } from 'heydoctor-js';\n\nconst client = new Client({\n  env: 'production',\n});\n\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n});\n\n// First attempt to create a new HeyDoctor user silently. The method will throw an error in the case that the email already exists,\n// in which case you have the opportunity to present an unobtrusive dialog for the user to confirm their existing HeyDoctor password.\ntry {\n  const { accessToken, refreshToken } = await oauth.createUser({\n    email: 'frank@heydoctor.com',\n    firstName: 'Frank',\n    lastName: 'Sinatra',\n    dob: '1915-12-12',\n    gender: 'male',\n    addressLine1: '123 Somewhere Street',\n    city: 'Hoboken',\n    state: 'NJ',\n    zip: '07030',\n  });\n} catch (error) {\n  if (error.code === 'account_exists') {\n    const { accessToken, refreshToken } = await oauth.launchWebAuthFlow('frank@heydoctor.com');\n  }\n}\n\n// Now that the client has been authorized, we can call call other methods available in the SDK\nconst visit = await visits.create({\n  code: 'hair-loss',\n});\n\n// Excellent, we've just created our first visit. Now, we can upload photos to that visit.\nawait visit.uploadPhoto('photoId1234', 'base64photostring');\n```\n","licenseText":" MIT Licence\n\n Copyright (c) 2016-present, Kyle Alwyn.\n\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n\n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n","_id":"heydoctor-js@0.0.0-4cf4a5e","dist":{"shasum":"97db5629e9ec7daebc3527f2752eeee37bd8e6d8","integrity":"sha512-NyFC3voPdGn9uHTlKfv1WxACN1Jj2/Ot+vnjF9HwpwKocAt2eXT9h+nCoGa7H++aI/TdLPwAlcv9eh/OYdSVsA==","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-0.0.0-4cf4a5e.tgz","fileCount":48,"unpackedSize":153476,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJetEa8CRA9TVsSAnZWagAAnRIP/0Nj33BeYgEhvSLQ/Hvl\nwPO2/QO310fX+MvfIrWubuX/YKl5hMTADRyDbwTzb9m4Uu7oBfPI3ucCdyZb\nA8ZMpZDKviibrJzSW8uIU0uBWcyeI75inMVt6nSGMSGdDTYil7+GHh7cFpJO\nqAaAWqXcEcvHGzrZEBmtSoFrQuDL/Dmm3DLTa2nFoYSf2FTvrOzaiM96pePi\nrhjWBYP9H9wcP2qKtuGCbLJ+DeEJBwMYcMG5t1T6/qmcsR1FZd75ZEzDtN0V\nxcXVUTh6gBPM4kchcDkoJ3Q0RAs/WzFflnRIrFDZOgNKZUbjhKsc6FGaj4wz\nlL+BvEHEY0AEm0H8b58gL/2NvUXEL8dCFS/6aq3/nf2D8iBwGxGNS5Lf3R6o\nSSB+TX+B5OFCL+s+OQ2/CMnKRzfqEG9yBOUb7eiRzAm+7CqQSQ0gNutz/d6d\nKNqNjt2q1cA3lOrGJwuNWviPq7i8sbIZ01S3Z4eFlwRTpJP+ezeJVKzr/8a+\nwD/jubtc9UWCc4dW0slYg5W8jjOVrGIiY6IxS2y+wNwxE1/IJ/wWfAZ+MOL/\nPaGFAKHl+ElsUT/tzUKWbhNOd7VsS6QxR8r9ihPTnCMOGxqbT0lMMC3cqTeZ\nKdafD6QqowLEWRRR0r5W7QAsGYrPej9zEI3ViiZQ86paT5lBko2chOFl7ehP\n/gsN\r\n=em8x\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCyroGDRidnrsu569XBZNhyaux2+3WlqsMDZ7MFsNzPuAIgTOLzDXaFGFjpQbuHnLOwDQNrw1tFupsrsvrOUapRW4E="}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"gerrymibernardo@gmail.com","name":"gerrymi"},{"email":"kalwyn+npmci@goodrx.com","name":"heydoctor-ci"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"schlegz76@gmail.com","name":"schlegz"}],"_npmUser":{"name":"heydoctor-ci","email":"kalwyn+npmci@goodrx.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_0.0.0-4cf4a5e_1588872892343_0.28808873479776165"},"_hasShrinkwrap":false},"0.0.0-b067ce5":{"name":"heydoctor-js","version":"0.0.0-b067ce5","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"https://github.com/sappira-inc/heydoctor-js"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'yarn build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"yarn docs:build && yarn docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"0.0.8","@types/jest":"^24.0.23","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^25.4.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^2.0.3","npm-run-all":"4.1.3","parcel-bundler":"^1.12.4","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"readmeFilename":"README.md","readme":"# HeyDoctor Javascript SDK\n\nThe HeyDoctor Javascript library provides convenient access to the HeyDoctor API for applications written in JavaScript.\n\n## Documentation\nCheck out our [auto-generated docs](https://sappira-inc.github.io/heydoctor-js/) using [TypeDoc](http://typedoc.org).\n\n## Installation\nYou can install `heydoctor-js` using your favorite package manager.\n\n```sh\n$ yarn add heydoctor-js\n# or\n$ npm install --save heydoctor-js\n```\n\n## Usage\nYou'll first need to create a new client resource. If using the HeyDoctor SaaS platform, you'll need to provide the API key located in the EMR. The client contains the http module that will communicate with the HeyDoctor API, so we'll pass this client to the other resources you'll need.\n\n### Creating the client\n\n```js\nimport { Client, Environments, Visits, OAuth } from 'heydoctor-js';\n\n// The client will hold all configuration options and the http module\n// that communicates to our server\nconst client = new Client({\n  env: Environments.SANDBOX | Environments.PRODUCTION, // determines the API and OAuth endpoints\n});\n\n// Create two resources passing both the client we've just created\n// ** Some resources also take an optional options object as a second argument\nconst visits = new Visits(client;\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n  scope: '*',\n});\n```\n\n### Subscribing to HTTP events\nThe HeyDoctor client also doubles as an event emitter. The client extends from [Mitt](https://github.com/developit/mitt) and complies with standard EventEmitter events.\n\n```js\ninterface HttpCallback {\n  statusCode: number;\n  data: any;\n}\n\nconst client = new Client();\n\nclient.on('http:success', (data: HttpCallback) => void);\nclient.on('http:error', (data: HttpCallback) => void);\n```\n\n### Authorizing via OAuth\n\nPartnering clients will use the HeyDoctor JS SDK to create or link a HeyDoctor account. HeyDoctor conforms to the existing [OAuth2 protocol](https://oauth.net/2/). In the case that HeyDoctor already has the provided email on file, the SDK will open a dialog box, akin to Facebook or Google login, prompting the user to confirm their existing password. In all successful cases, an access token and refresh token will be returned. The resulting payload is outlined below.\n\nWe recommend to store the longstanding refresh token in a persisted data store. You’ll use this token, along with your unique client id and secret key to regenerate short lived access tokens used to authenticate requests to the HeyDoctor API. For security measures, the access token has a one hour TTL, after which the token will expire and new access token will need to be generated.\n\nUpon successful authorization, all subsequent SDK calls will be authenticated using the access token. The access token can also be utilized server-side to call our API directly.\n\n#### Example\n\n```js\nimport { Client, OAuth } from 'heydoctor-js';\n\nconst client = new Client({\n  env: 'production',\n});\n\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n});\n\n// First attempt to create a new HeyDoctor user silently. The method will throw an error in the case that the email already exists,\n// in which case you have the opportunity to present an unobtrusive dialog for the user to confirm their existing HeyDoctor password.\ntry {\n  const { accessToken, refreshToken } = await oauth.createUser({\n    email: 'frank@heydoctor.com',\n    firstName: 'Frank',\n    lastName: 'Sinatra',\n    dob: '1915-12-12',\n    gender: 'male',\n    addressLine1: '123 Somewhere Street',\n    city: 'Hoboken',\n    state: 'NJ',\n    zip: '07030',\n  });\n} catch (error) {\n  if (error.code === 'account_exists') {\n    const { accessToken, refreshToken } = await oauth.launchWebAuthFlow('frank@heydoctor.com');\n  }\n}\n\n// Now that the client has been authorized, we can call call other methods available in the SDK\nconst visit = await visits.create({\n  code: 'hair-loss',\n});\n\n// Excellent, we've just created our first visit. Now, we can upload photos to that visit.\nawait visit.uploadPhoto('photoId1234', 'base64photostring');\n```\n","licenseText":" MIT Licence\n\n Copyright (c) 2016-present, Kyle Alwyn.\n\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n\n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n","_id":"heydoctor-js@0.0.0-b067ce5","dist":{"shasum":"c7b370f45c17bebb3edf9bef9265fc75341fcc6c","integrity":"sha512-wFA2Z5EyUI1ZO4nYxXU7Q0ZMFO0FnwBU2uCdOL5s0znBvJSUDx5Pbw/I3TCNET/eADEjXGtMZiZ7Ms1lHQ6zTA==","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-0.0.0-b067ce5.tgz","fileCount":48,"unpackedSize":153483,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJetEqhCRA9TVsSAnZWagAAR7QP+gNk10KkAR9ctm8T+SEN\nZRntOBg5SJlgdMGbzmVajddP6D9Qo5FJKvTtmcw0ZR/04OyHFEcqcWMvRBoo\nvenfdg1iCveTFSUxaSLNlNX8eN1sHiUG6vmv1vRyAzLH1ViDHr3W6rjLOUnH\n5MPVz4HwmQV0Kb2r+09PM29Lr6OjuymJuR8rEQUqWaB9aUS1LAsizJNt64nW\nlmJNctq7GKkGnZPJqcw9G88bxRi99M7sLBNnERDGLSoFRBCGy7w67Kp3/0sL\nWBCMwIaOYasz+KW+5s7lX2rrScxaMqeTNwwS9oXFRYCiJA/jX4KPJsPVo1F/\nz16ZbX751HuwIRdK+ybrUvobo65blv9SVBGfQFr+8zqli8tB2CswjOtDgWqO\n1lVBw9a/uli+UXL0d/2iNoJy+mQvEei8mTEmd6YYDU7sq9I3/lPRWpy3mV+5\nfE4OG22DMdMG4h5jr/nm1Ti0tfdHqtQ/J/9+vKHUZXh68Vk+fD1fbLBfFKz+\ncmXPlusy8WFU1wrw6G/r24vyIFvtN9UiX6FFguFKjGLk12j/pYxgpRgR5xd8\nSc/1m+mMyKLeiHMdlAyJWwxduSOzt0Fmf9XvgbBuWBPs6j1y3dS9kOQ1pnvw\nKHG+FiE+5Qcp/c0OxSr1r8EI1s4CM6OWTtRkXuU/teERLwv5P3zZA7ad8yKT\nSc3v\r\n=SFGo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB82PN282Rj5q96ZmhAGkzL3pBVZHR6M/Lgzej5HMutFAiBRWMwBlvnvmZdv6rEdAgEYHTsImxoE+lU5Xkdv1iMFXw=="}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"gerrymibernardo@gmail.com","name":"gerrymi"},{"email":"kalwyn+npmci@goodrx.com","name":"heydoctor-ci"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"schlegz76@gmail.com","name":"schlegz"}],"_npmUser":{"name":"heydoctor-ci","email":"kalwyn+npmci@goodrx.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_0.0.0-b067ce5_1588873889095_0.8736317310291251"},"_hasShrinkwrap":false},"0.0.0-40497a5":{"name":"heydoctor-js","version":"0.0.0-40497a5","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"https://github.com/sappira-inc/heydoctor-js"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'yarn build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"yarn docs:build && yarn docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"0.0.8","@types/jest":"^24.0.23","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^25.4.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^2.0.3","npm-run-all":"4.1.3","parcel-bundler":"^1.12.4","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"readmeFilename":"README.md","readme":"# HeyDoctor Javascript SDK\n\nThe HeyDoctor Javascript library provides convenient access to the HeyDoctor API for applications written in JavaScript.\n\n## Documentation\nCheck out our [auto-generated docs](https://sappira-inc.github.io/heydoctor-js/) using [TypeDoc](http://typedoc.org).\n\n## Installation\nYou can install `heydoctor-js` using your favorite package manager.\n\n```sh\n$ yarn add heydoctor-js\n# or\n$ npm install --save heydoctor-js\n```\n\n## Usage\nYou'll first need to create a new client resource. If using the HeyDoctor SaaS platform, you'll need to provide the API key located in the EMR. The client contains the http module that will communicate with the HeyDoctor API, so we'll pass this client to the other resources you'll need.\n\n### Creating the client\n\n```js\nimport { Client, Environments, Visits, OAuth } from 'heydoctor-js';\n\n// The client will hold all configuration options and the http module\n// that communicates to our server\nconst client = new Client({\n  env: Environments.SANDBOX | Environments.PRODUCTION, // determines the API and OAuth endpoints\n});\n\n// Create two resources passing both the client we've just created\n// ** Some resources also take an optional options object as a second argument\nconst visits = new Visits(client;\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n  scope: '*',\n});\n```\n\n### Subscribing to HTTP events\nThe HeyDoctor client also doubles as an event emitter. The client extends from [Mitt](https://github.com/developit/mitt) and complies with standard EventEmitter events.\n\n```js\ninterface HttpCallback {\n  statusCode: number;\n  data: any;\n}\n\nconst client = new Client();\n\nclient.on('http:success', (data: HttpCallback) => void);\nclient.on('http:error', (data: HttpCallback) => void);\n```\n\n### Authorizing via OAuth\n\nPartnering clients will use the HeyDoctor JS SDK to create or link a HeyDoctor account. HeyDoctor conforms to the existing [OAuth2 protocol](https://oauth.net/2/). In the case that HeyDoctor already has the provided email on file, the SDK will open a dialog box, akin to Facebook or Google login, prompting the user to confirm their existing password. In all successful cases, an access token and refresh token will be returned. The resulting payload is outlined below.\n\nWe recommend to store the longstanding refresh token in a persisted data store. You’ll use this token, along with your unique client id and secret key to regenerate short lived access tokens used to authenticate requests to the HeyDoctor API. For security measures, the access token has a one hour TTL, after which the token will expire and new access token will need to be generated.\n\nUpon successful authorization, all subsequent SDK calls will be authenticated using the access token. The access token can also be utilized server-side to call our API directly.\n\n#### Example\n\n```js\nimport { Client, OAuth } from 'heydoctor-js';\n\nconst client = new Client({\n  env: 'production',\n});\n\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n});\n\n// First attempt to create a new HeyDoctor user silently. The method will throw an error in the case that the email already exists,\n// in which case you have the opportunity to present an unobtrusive dialog for the user to confirm their existing HeyDoctor password.\ntry {\n  const { accessToken, refreshToken } = await oauth.createUser({\n    email: 'frank@heydoctor.com',\n    firstName: 'Frank',\n    lastName: 'Sinatra',\n    dob: '1915-12-12',\n    gender: 'male',\n    addressLine1: '123 Somewhere Street',\n    city: 'Hoboken',\n    state: 'NJ',\n    zip: '07030',\n  });\n} catch (error) {\n  if (error.code === 'account_exists') {\n    const { accessToken, refreshToken } = await oauth.launchWebAuthFlow('frank@heydoctor.com');\n  }\n}\n\n// Now that the client has been authorized, we can call call other methods available in the SDK\nconst visit = await visits.create({\n  code: 'hair-loss',\n});\n\n// Excellent, we've just created our first visit. Now, we can upload photos to that visit.\nawait visit.uploadPhoto('photoId1234', 'base64photostring');\n```\n","licenseText":" MIT Licence\n\n Copyright (c) 2016-present, Kyle Alwyn.\n\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n\n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n","_id":"heydoctor-js@0.0.0-40497a5","dist":{"shasum":"40ef402fbf27fb1cf13b4d45d1753e9d29d28c7a","integrity":"sha512-4hfFVOpiuylKZ7tC0isbX9qYX4hXsvtIR2G5tS++ph5qnXCXnrwKFGzjRwvF8UCCIRDlIZxa1tlLSQ54xNHrPQ==","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-0.0.0-40497a5.tgz","fileCount":48,"unpackedSize":153490,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJetEu1CRA9TVsSAnZWagAA+pwP/jxQOJiVPA3RjD2m7IwR\ndYgHC74M/ec4O11PDzDMgFPNpTE1Nj5iWdES6gMbt2REitdw1M0fJmM07IoL\nLbi3VaNkHY/Chko1YCgjQ3MynP9P9tBAAJyLyjm0y5IYqhE2gBai7hShC4S0\n0CNBJaFtG4PTSQpN4eqApfA0+Hy7lLqVuOtR7zGd1ZYcg1u/No8kMU3jpTto\ndwziIfJSBoI1jZ4ggaBKgbFMG4eW178vB8YfCu+22v5ZQ1et4EkIFweZnJol\nz7zU1LPUstN8TGd5jNC/Eq+rbrKTHRV4zFytqDiu2MzgGo/Pe9B8cm/5J9kx\nPjbU7tGoDyo5/WiReibOMKFa0Y7y0Anlyj3bVB2K5NtejJFuWAcYbik6qTVH\nOawCAkOkM3X9nvPvCBr1rsGS0Oo8j6R1vyXETejy86SKb4uPH/ZFqYngvXmJ\ndJkcHhWEDqGfoVehGR52gODyKVqjyKl4jIRTZ80NkIDIWg31bntDjV7k+uGv\nHCCCBdY/6sdtjZJzu9Nvspj7D9TAo4IFXT8HPyx/+4G0dPGnkvfYfpjbFMhj\nAUsLue0B0ERcnJLT/+A3+PcLOeYZKz8iKQjE73fzxXyc0oD7WDnwRIaUPs5P\nbzprsFSHf1RLTfwpP0q9790fg0aD2MDbHP6JzrlanNEqQRGJsIrzgw/tqFWv\n/4CZ\r\n=JAJ0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDCtvvCNtnsGXXyHtJ6MOoXO8uSbz2jBOCV5jUhXhvoegIhALClWz6ch7UTnrq1o5QxGq/JRvySA90t3AqmWNFH/pKJ"}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"gerrymibernardo@gmail.com","name":"gerrymi"},{"email":"kalwyn+npmci@goodrx.com","name":"heydoctor-ci"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"schlegz76@gmail.com","name":"schlegz"}],"_npmUser":{"name":"heydoctor-ci","email":"kalwyn+npmci@goodrx.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_0.0.0-40497a5_1588874164858_0.8478544005789286"},"_hasShrinkwrap":false},"0.0.0-c8cd40a":{"name":"heydoctor-js","version":"0.0.0-c8cd40a","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"https://github.com/sappira-inc/heydoctor-js"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'yarn build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"yarn docs:build && yarn docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"0.0.8","@types/jest":"^24.0.23","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^25.4.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^2.0.3","npm-run-all":"4.1.3","parcel-bundler":"^1.12.4","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"readmeFilename":"README.md","readme":"# HeyDoctor Javascript SDK\n\nThe HeyDoctor Javascript library provides convenient access to the HeyDoctor API for applications written in JavaScript.\n\n## Documentation\nCheck out our [auto-generated docs](https://sappira-inc.github.io/heydoctor-js/) using [TypeDoc](http://typedoc.org).\n\n## Installation\nYou can install `heydoctor-js` using your favorite package manager.\n\n```sh\n$ yarn add heydoctor-js\n# or\n$ npm install --save heydoctor-js\n```\n\n## Usage\nYou'll first need to create a new client resource. If using the HeyDoctor SaaS platform, you'll need to provide the API key located in the EMR. The client contains the http module that will communicate with the HeyDoctor API, so we'll pass this client to the other resources you'll need.\n\n### Creating the client\n\n```js\nimport { Client, Environments, Visits, OAuth } from 'heydoctor-js';\n\n// The client will hold all configuration options and the http module\n// that communicates to our server\nconst client = new Client({\n  env: Environments.SANDBOX | Environments.PRODUCTION, // determines the API and OAuth endpoints\n});\n\n// Create two resources passing both the client we've just created\n// ** Some resources also take an optional options object as a second argument\nconst visits = new Visits(client;\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n  scope: '*',\n});\n```\n\n### Subscribing to HTTP events\nThe HeyDoctor client also doubles as an event emitter. The client extends from [Mitt](https://github.com/developit/mitt) and complies with standard EventEmitter events.\n\n```js\ninterface HttpCallback {\n  statusCode: number;\n  data: any;\n}\n\nconst client = new Client();\n\nclient.on('http:success', (data: HttpCallback) => void);\nclient.on('http:error', (data: HttpCallback) => void);\n```\n\n### Authorizing via OAuth\n\nPartnering clients will use the HeyDoctor JS SDK to create or link a HeyDoctor account. HeyDoctor conforms to the existing [OAuth2 protocol](https://oauth.net/2/). In the case that HeyDoctor already has the provided email on file, the SDK will open a dialog box, akin to Facebook or Google login, prompting the user to confirm their existing password. In all successful cases, an access token and refresh token will be returned. The resulting payload is outlined below.\n\nWe recommend to store the longstanding refresh token in a persisted data store. You’ll use this token, along with your unique client id and secret key to regenerate short lived access tokens used to authenticate requests to the HeyDoctor API. For security measures, the access token has a one hour TTL, after which the token will expire and new access token will need to be generated.\n\nUpon successful authorization, all subsequent SDK calls will be authenticated using the access token. The access token can also be utilized server-side to call our API directly.\n\n#### Example\n\n```js\nimport { Client, OAuth } from 'heydoctor-js';\n\nconst client = new Client({\n  env: 'production',\n});\n\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n});\n\n// First attempt to create a new HeyDoctor user silently. The method will throw an error in the case that the email already exists,\n// in which case you have the opportunity to present an unobtrusive dialog for the user to confirm their existing HeyDoctor password.\ntry {\n  const { accessToken, refreshToken } = await oauth.createUser({\n    email: 'frank@heydoctor.com',\n    firstName: 'Frank',\n    lastName: 'Sinatra',\n    dob: '1915-12-12',\n    gender: 'male',\n    addressLine1: '123 Somewhere Street',\n    city: 'Hoboken',\n    state: 'NJ',\n    zip: '07030',\n  });\n} catch (error) {\n  if (error.code === 'account_exists') {\n    const { accessToken, refreshToken } = await oauth.launchWebAuthFlow('frank@heydoctor.com');\n  }\n}\n\n// Now that the client has been authorized, we can call call other methods available in the SDK\nconst visit = await visits.create({\n  code: 'hair-loss',\n});\n\n// Excellent, we've just created our first visit. Now, we can upload photos to that visit.\nawait visit.uploadPhoto('photoId1234', 'base64photostring');\n```\n","licenseText":" MIT Licence\n\n Copyright (c) 2016-present, Kyle Alwyn.\n\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n\n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n","_id":"heydoctor-js@0.0.0-c8cd40a","dist":{"shasum":"b3fb79b0d24fd4f3885fec306af451b5ac72e8a2","integrity":"sha512-7En2ig0w8CLtdnVv6IKPMzVG3KfoDpB7Tjo5Mr798xoFVseiDVezdHNdQF3EzWxDrbfN/AETwZZBc6sGyeqTEQ==","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-0.0.0-c8cd40a.tgz","fileCount":48,"unpackedSize":153490,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJetEzJCRA9TVsSAnZWagAA6s4P/0qXnDaosdn6YjkX3BHZ\naD59iNm5mTYwJqd0HzB3McrPJ6km8xDJTFbgHut0HdFmhK4J9GFxnpqYG3pA\nAQo2HQIT0YSmsHDYRVVyWj+RBg913T5DULLfergM8aowD/neZU+wWlQm1TM4\nYIPGBhayXfxSj4/5+Tyul5M3//xZPDtRC2RY3i+uxQjuca6uieeeOIdGXznq\nMeUv4xz/RRY7LIAmtC4dvs0bXpevaA1ovPVBj0uVO81Prnsof3fatRrk7n49\nigL3HgtZR8WLEr6RLQUeBq2L24Bvr4n6I3vr8LjeTV6mOiVyfoXZE/qU6zHE\n/BMncN16hSJ2SdezKiZvk8S3tqQzM8u81kMXbWEl5pt6E4dl16HyKQs97ZsW\nREAvFWCnq9OUzPdf0gaHO2rcwB9KVi9Ls/DwC1SqfjCE0HXKOJSWxGh1ihSE\n637KUV6wDLiSXjkbPmw+biw08lDWlzPjbnQ6Hx3u8tv53EPNdD68B0vfgaJw\nO/Oq8F4ZJUljMAoKNTaP99BpjDAatgaLikhg68AeL5aSKeNFIPQrfOmlkp+v\nHc2sX5jcvc1Ib0ngfGayILO94H/DmIWf6YW+pww1I1W3CQEiCmJzy85qYdrK\nKaAlSLRFp4FYeLr4a6ZTi39dVMdx1dhZW1+UxoctR51LqMnWu4/JYSnSn3e9\nmtcI\r\n=QQHK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGKcn36Zjxui1Py9xKkFBTWA3wUqWjit0YUG6bQo2zfqAiEAjW0xIRd38p0rU/Su81JgINA4pJmFdY128Q+zjjX/Ilo="}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"gerrymibernardo@gmail.com","name":"gerrymi"},{"email":"kalwyn+npmci@goodrx.com","name":"heydoctor-ci"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"schlegz76@gmail.com","name":"schlegz"}],"_npmUser":{"name":"heydoctor-ci","email":"kalwyn+npmci@goodrx.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_0.0.0-c8cd40a_1588874441504_0.49579476163161584"},"_hasShrinkwrap":false},"3.6.10":{"name":"heydoctor-js","version":"3.6.10","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"https://github.com/sappira-inc/heydoctor-js"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'yarn build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"yarn docs:build && yarn docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"0.0.8","@types/jest":"^24.0.23","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^25.4.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^2.0.3","npm-run-all":"4.1.3","parcel-bundler":"^1.12.4","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"licenseText":" MIT Licence\n\n Copyright (c) 2016-present, Kyle Alwyn.\n\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n\n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n","_id":"heydoctor-js@3.6.10","dist":{"shasum":"16e271989c47991035db52abc36512014eb6a3ad","integrity":"sha512-r4Fwtxz5Wj9ERYCmrrGmLft3/MNHASEocQjs/Bc9wTtnv5u8UGCw8FQZuWs9xvkNkTCPk92YsnJlp1L02c53NA==","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-3.6.10.tgz","fileCount":48,"unpackedSize":153718,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJetFPICRA9TVsSAnZWagAAnccP/jQxd+A5Mj0Bms2b5UW1\n3QiBhFqKLx+Dj0S2v8pjDiV3NVCI7/ZCp1W3J+Pqdozu3kE7dGDtlpbtKPhA\njMz3eeJku/eLkjhMOqf8QkXV53pW1EqtC7qJiR1y+mJU/ouZARCfM4BaNXTK\ncPJxTMKx3XiEa0A5LObHs5T3HtYzliy1e5nvrRd0jxOIzFcZIIM6E7pGovB6\ngn5fMg1VMUQR8JM+ZPeUCXxoCFgB1XHIHmc4PbBx/WOUhJKvP3WGCuh79zAt\ng3YGlTPKuzGZOdJQuai0LyGHiH27WoLVv1D5Kbe6yJdRkUQjHd/b4FISaP7Y\ndwHz+7GUeuyNT8XUdPh9bsHGGH+XdkhOe2C7FAF5rSHSxKOXAM0Ilyasl9re\nRpOe9P30oZwONTwzEilLBcYXLgRDgPj5Gy75lhVt6B8i9rvFff6wk3rAGiRX\nedjQeoEYdwDlnNGO9ZanH8sLQKwh4SQ5ia2KCVA6oh1ot6KRtmw+IZwQJCJL\nMD9sshYfLBd2nHA4I0Z+DsiYqXZApvnCLRrJD8lmJ9OxJU2oHgqowyDvcUhN\n6chMg5Z8TCQiQvh7CAS1e0YoNqRupRHAwiF9LOV8DO9TleRObwIUTA830L3h\niU4P4ZhPzx61/qAMz0gNS6U5n9FtxgA72XhGXKkleqhC+OedCzqNl5w1tVtw\nYibT\r\n=m9BV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCJasGtPG/JgDtVP8g8pzpVpjD9U2FEeBiBm2moNHA1mgIgWL0FkCPZG3V8w8M3pgVkRF/+5k/nk3Npy+jA8HebNHo="}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"gerrymibernardo@gmail.com","name":"gerrymi"},{"email":"kalwyn+npmci@goodrx.com","name":"heydoctor-ci"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"schlegz76@gmail.com","name":"schlegz"}],"_npmUser":{"name":"heydoctor-ci","email":"kalwyn+npmci@goodrx.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_3.6.10_1588876232106_0.16267652237006547"},"_hasShrinkwrap":false},"0.0.0-5a3ad18":{"name":"heydoctor-js","version":"0.0.0-5a3ad18","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"https://github.com/sappira-inc/heydoctor-js"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'yarn build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"yarn docs:build && yarn docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"0.0.8","@types/jest":"^24.0.23","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^25.4.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^2.0.3","npm-run-all":"4.1.3","parcel-bundler":"^1.12.4","prettier":"1.14.3","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^5.11.0","tslint-config-prettier":"^1.15.0","tslint-plugin-prettier":"^2.0.0","typedoc":"^0.13.0","typescript":"^3.1.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"readmeFilename":"README.md","readme":"# HeyDoctor Javascript SDK\n\nThe HeyDoctor Javascript library provides convenient access to the HeyDoctor API for applications written in JavaScript.\n\n## Documentation\nCheck out our [auto-generated docs](https://sappira-inc.github.io/heydoctor-js/) using [TypeDoc](http://typedoc.org).\n\n## Installation\nYou can install `heydoctor-js` using your favorite package manager.\n\n```sh\n$ yarn add heydoctor-js\n# or\n$ npm install --save heydoctor-js\n```\n\n## Usage\nYou'll first need to create a new client resource. If using the HeyDoctor SaaS platform, you'll need to provide the API key located in the EMR. The client contains the http module that will communicate with the HeyDoctor API, so we'll pass this client to the other resources you'll need.\n\n### Creating the client\n\n```js\nimport { Client, Environments, Visits, OAuth } from 'heydoctor-js';\n\n// The client will hold all configuration options and the http module\n// that communicates to our server\nconst client = new Client({\n  env: Environments.SANDBOX | Environments.PRODUCTION, // determines the API and OAuth endpoints\n});\n\n// Create two resources passing both the client we've just created\n// ** Some resources also take an optional options object as a second argument\nconst visits = new Visits(client;\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n  scope: '*',\n});\n```\n\n### Subscribing to HTTP events\nThe HeyDoctor client also doubles as an event emitter. The client extends from [Mitt](https://github.com/developit/mitt) and complies with standard EventEmitter events.\n\n```js\ninterface HttpCallback {\n  statusCode: number;\n  data: any;\n}\n\nconst client = new Client();\n\nclient.on('http:success', (data: HttpCallback) => void);\nclient.on('http:error', (data: HttpCallback) => void);\n```\n\n### Authorizing via OAuth\n\nPartnering clients will use the HeyDoctor JS SDK to create or link a HeyDoctor account. HeyDoctor conforms to the existing [OAuth2 protocol](https://oauth.net/2/). In the case that HeyDoctor already has the provided email on file, the SDK will open a dialog box, akin to Facebook or Google login, prompting the user to confirm their existing password. In all successful cases, an access token and refresh token will be returned. The resulting payload is outlined below.\n\nWe recommend to store the longstanding refresh token in a persisted data store. You’ll use this token, along with your unique client id and secret key to regenerate short lived access tokens used to authenticate requests to the HeyDoctor API. For security measures, the access token has a one hour TTL, after which the token will expire and new access token will need to be generated.\n\nUpon successful authorization, all subsequent SDK calls will be authenticated using the access token. The access token can also be utilized server-side to call our API directly.\n\n#### Example\n\n```js\nimport { Client, OAuth } from 'heydoctor-js';\n\nconst client = new Client({\n  env: 'production',\n});\n\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n});\n\n// First attempt to create a new HeyDoctor user silently. The method will throw an error in the case that the email already exists,\n// in which case you have the opportunity to present an unobtrusive dialog for the user to confirm their existing HeyDoctor password.\ntry {\n  const { accessToken, refreshToken } = await oauth.createUser({\n    email: 'frank@heydoctor.com',\n    firstName: 'Frank',\n    lastName: 'Sinatra',\n    dob: '1915-12-12',\n    gender: 'male',\n    addressLine1: '123 Somewhere Street',\n    city: 'Hoboken',\n    state: 'NJ',\n    zip: '07030',\n  });\n} catch (error) {\n  if (error.code === 'account_exists') {\n    const { accessToken, refreshToken } = await oauth.launchWebAuthFlow('frank@heydoctor.com');\n  }\n}\n\n// Now that the client has been authorized, we can call call other methods available in the SDK\nconst visit = await visits.create({\n  code: 'hair-loss',\n});\n\n// Excellent, we've just created our first visit. Now, we can upload photos to that visit.\nawait visit.uploadPhoto('photoId1234', 'base64photostring');\n```\n","licenseText":" MIT Licence\n\n Copyright (c) 2016-present, Kyle Alwyn.\n\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n\n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n","_id":"heydoctor-js@0.0.0-5a3ad18","dist":{"shasum":"28171fa2c138755a3e6374ecd003063aa8f19f51","integrity":"sha512-dbPmNkYdnHuqWEzokD7mDNG+Dz6OCNarY0hfPlyaJUp0lOM5C3csKBe1ioEZliqcrdgLibovDPpT7w1SwpJ/Hg==","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-0.0.0-5a3ad18.tgz","fileCount":48,"unpackedSize":153725,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJetZwnCRA9TVsSAnZWagAAji0P/0sAeYxrqjFDmHpZnFim\ntUcltAYO/PKMQCntKCWTcvFMV3nwx0HJIIyZm7kmCClfAsHMrfTJBIRuhogT\nNXfWaBTlAb3SE91TI2zUMpzGxNu8cMOG3j7SmJn/tamCGodqr5W9RVP5dCdl\n6SomTP4kEbcIZl65r1eAHCc4g0Ln3WozBVoSI4f3t6GyBytKt4e0p1Oj5Gqu\nUzno/+FNMCZ+vkIBr5h4CG06GKoYxK8hX1nbpQ5yVHJjh61XwnzMaKhboYN7\n9JGSQp89VuRmS9/FeSXATC4fWISuYOK0dQGndgl8Qhn20G8EE7DMMlB9U9gS\neB0WN4JCOHoQsUvgWRMDepKp+0i7ImIDHJDbKSxVyOMxHnD1jRgId6m/+1a0\ni4HdPxyJDmU+611B2xKu3DeLgR9BVHzYGRuSHEWY7Td2ioNykRSDxWw4Qv5C\n8qHA6EsG8Vvz3+pi9CmU1s8iHGI7CFHnagTvVzzVrge/O/EFlaVs9z8OSUJk\neQV6EqOhigjYF168SsHobzROAxmFEfnK4XUB6U9JErw27/S9jE6gEc9diNZb\nYYPU2AKEzTgDWVSVAlw1ZPQrJovy/aJXhYEQixqTYHDb+f6nkqerGFqZBwYT\nICduCt25xO2DKC+VBZkV57bq3jQt/GYXKVSZE2jMZpH8vmm7UT9ejsYe86pG\n5nDs\r\n=+riQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEDvbLgdslooDsalEwkb2jsBYqli5KFAEF7CRzbeojcSAiAtt8dwQxOYrjbumABtma60XMjyDLnqWkiqooRCp3GnCA=="}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"gerrymibernardo@gmail.com","name":"gerrymi"},{"email":"kalwyn+npmci@goodrx.com","name":"heydoctor-ci"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"schlegz76@gmail.com","name":"schlegz"}],"_npmUser":{"name":"heydoctor-ci","email":"kalwyn+npmci@goodrx.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_0.0.0-5a3ad18_1588960294892_0.9027503574921325"},"_hasShrinkwrap":false},"0.0.0-4b1a469":{"name":"heydoctor-js","version":"0.0.0-4b1a469","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"https://github.com/sappira-inc/heydoctor-js"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'yarn build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"yarn docs:build && yarn docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"0.0.8","@types/jest":"^24.0.23","@types/node":"^13.13.5","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3","tslib":"^1.11.2"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^25.4.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^2.0.3","npm-run-all":"4.1.3","parcel-bundler":"^1.12.4","prettier":"2.0.5","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^6.1.2","tslint-config-prettier":"^1.18.0","tslint-plugin-prettier":"^2.3.0","typedoc":"^0.13.0","typescript":"^3.8.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"readmeFilename":"README.md","readme":"# HeyDoctor Javascript SDK\n\nThe HeyDoctor Javascript library provides convenient access to the HeyDoctor API for applications written in JavaScript.\n\n## Documentation\nCheck out our [auto-generated docs](https://sappira-inc.github.io/heydoctor-js/) using [TypeDoc](http://typedoc.org).\n\n## Installation\nYou can install `heydoctor-js` using your favorite package manager.\n\n```sh\n$ yarn add heydoctor-js\n# or\n$ npm install --save heydoctor-js\n```\n\n## Usage\nYou'll first need to create a new client resource. If using the HeyDoctor SaaS platform, you'll need to provide the API key located in the EMR. The client contains the http module that will communicate with the HeyDoctor API, so we'll pass this client to the other resources you'll need.\n\n### Creating the client\n\n```js\nimport { Client, Environments, Visits, OAuth } from 'heydoctor-js';\n\n// The client will hold all configuration options and the http module\n// that communicates to our server\nconst client = new Client({\n  env: Environments.SANDBOX | Environments.PRODUCTION, // determines the API and OAuth endpoints\n});\n\n// Create two resources passing both the client we've just created\n// ** Some resources also take an optional options object as a second argument\nconst visits = new Visits(client;\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n  scope: '*',\n});\n```\n\n### Subscribing to HTTP events\nThe HeyDoctor client also doubles as an event emitter. The client extends from [Mitt](https://github.com/developit/mitt) and complies with standard EventEmitter events.\n\n```js\ninterface HttpCallback {\n  statusCode: number;\n  data: any;\n}\n\nconst client = new Client();\n\nclient.on('http:success', (data: HttpCallback) => void);\nclient.on('http:error', (data: HttpCallback) => void);\n```\n\n### Authorizing via OAuth\n\nPartnering clients will use the HeyDoctor JS SDK to create or link a HeyDoctor account. HeyDoctor conforms to the existing [OAuth2 protocol](https://oauth.net/2/). In the case that HeyDoctor already has the provided email on file, the SDK will open a dialog box, akin to Facebook or Google login, prompting the user to confirm their existing password. In all successful cases, an access token and refresh token will be returned. The resulting payload is outlined below.\n\nWe recommend to store the longstanding refresh token in a persisted data store. You’ll use this token, along with your unique client id and secret key to regenerate short lived access tokens used to authenticate requests to the HeyDoctor API. For security measures, the access token has a one hour TTL, after which the token will expire and new access token will need to be generated.\n\nUpon successful authorization, all subsequent SDK calls will be authenticated using the access token. The access token can also be utilized server-side to call our API directly.\n\n#### Example\n\n```js\nimport { Client, OAuth } from 'heydoctor-js';\n\nconst client = new Client({\n  env: 'production',\n});\n\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n});\n\n// First attempt to create a new HeyDoctor user silently. The method will throw an error in the case that the email already exists,\n// in which case you have the opportunity to present an unobtrusive dialog for the user to confirm their existing HeyDoctor password.\ntry {\n  const { accessToken, refreshToken } = await oauth.createUser({\n    email: 'frank@heydoctor.com',\n    firstName: 'Frank',\n    lastName: 'Sinatra',\n    dob: '1915-12-12',\n    gender: 'male',\n    addressLine1: '123 Somewhere Street',\n    city: 'Hoboken',\n    state: 'NJ',\n    zip: '07030',\n  });\n} catch (error) {\n  if (error.code === 'account_exists') {\n    const { accessToken, refreshToken } = await oauth.launchWebAuthFlow('frank@heydoctor.com');\n  }\n}\n\n// Now that the client has been authorized, we can call call other methods available in the SDK\nconst visit = await visits.create({\n  code: 'hair-loss',\n});\n\n// Excellent, we've just created our first visit. Now, we can upload photos to that visit.\nawait visit.uploadPhoto('photoId1234', 'base64photostring');\n```\n","licenseText":" MIT Licence\n\n Copyright (c) 2016-present, Kyle Alwyn.\n\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n\n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n","_id":"heydoctor-js@0.0.0-4b1a469","dist":{"shasum":"a959d7b9dce3bae872820961167cd8e45103c142","integrity":"sha512-ZIaXUR3OEzQ6XrsHPtiJfqHB1O4g/uL/wZBrw3qRfJ5Y5HYMhaMnaqYI2/UUA98QfCKQlE+JQo4/0KgqOCy6MA==","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-0.0.0-4b1a469.tgz","fileCount":48,"unpackedSize":146025,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJetaK3CRA9TVsSAnZWagAADR4QAJYeKgHoyyNfFQBwGHNM\nJNnJrQgqbnXA+y+rWoqLvG8bQAZGVoBEiYln+8qtflMfLP1Abr68Bh+EEnXn\nX265kimwBsfEsCeXoe/E0A5sWKDUJXuDA/kJBLzoWrXbIEd5OpzpgwPnl4I+\n8rNwYQN/dsMiCYI9lCLrnNc6axW9uHGVQZvED7jRp3ilYhh8LOJvc4M8gBr3\nmRPP0PWLb9DBItNZbs6mRzt3eXQbD4P60O84AJGkWBPzzhdwokJaES+cADMV\n7ThFfNxNsqhFyHzH+pL7ACNnGt+zeLhqn5BlAzJ/VxB32zOaRORLuATYcz8d\neJBrEfb3aNlR/Q8CcQK12aC3cKCn3WMNFR9odPOpx8mqd5lTWb5Uu3UMSMBg\nLJxWEX1JlngzgwX6b1LeOAJF4C9B7Z8jXCwdhNAUFd0sRZGkNh/EWOFPDWkX\nO3DQHNth8QmVr6VLKLB8/OL9D2wg8YMJSwTrfOf2lHux/g2HymkLc3BWkEvn\nSe2FqMbUo2gqKdSgKldVRaH2rJN70XHicQuwprjdlp8er9V8Ckv2kKzkSQCw\no9bco30RwtUkx45tKnd3QXY/4nsxmKlfdIaeqlZGyFgaBrOnuOdQsI8bGbx9\nR1YON9PY3NRwQScO9WpU+V+jlfxPBtDz17tC4nPD6udeCS4IkRm8t2aZwAyS\nDC/A\r\n=OyfR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD7ZtYA8z6WHeuBiNLPDMdnqqKQqtiWXuef4udGz/ck/gIgSxy3d2krEdjfsS1cDWhFipkzlQXQmti7ZUzs2mtVxAQ="}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"gerrymibernardo@gmail.com","name":"gerrymi"},{"email":"kalwyn+npmci@goodrx.com","name":"heydoctor-ci"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"schlegz76@gmail.com","name":"schlegz"}],"_npmUser":{"name":"heydoctor-ci","email":"kalwyn+npmci@goodrx.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_0.0.0-4b1a469_1588961974554_0.5568242784781201"},"_hasShrinkwrap":false},"0.0.0-7ec9ede":{"name":"heydoctor-js","version":"0.0.0-7ec9ede","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"https://github.com/sappira-inc/heydoctor-js"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'yarn build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"yarn docs:build && yarn docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"0.0.8","@types/jest":"^24.0.23","@types/node":"^13.13.5","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3","tslib":"^1.11.2"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^25.4.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^2.0.3","npm-run-all":"4.1.3","parcel-bundler":"^1.12.4","prettier":"2.0.5","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^6.1.2","tslint-config-prettier":"^1.18.0","tslint-plugin-prettier":"^2.3.0","typedoc":"^0.13.0","typescript":"^3.8.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"readmeFilename":"README.md","readme":"# HeyDoctor Javascript SDK\n\nThe HeyDoctor Javascript library provides convenient access to the HeyDoctor API for applications written in JavaScript.\n\n## Documentation\nCheck out our [auto-generated docs](https://sappira-inc.github.io/heydoctor-js/) using [TypeDoc](http://typedoc.org).\n\n## Installation\nYou can install `heydoctor-js` using your favorite package manager.\n\n```sh\n$ yarn add heydoctor-js\n# or\n$ npm install --save heydoctor-js\n```\n\n## Usage\nYou'll first need to create a new client resource. If using the HeyDoctor SaaS platform, you'll need to provide the API key located in the EMR. The client contains the http module that will communicate with the HeyDoctor API, so we'll pass this client to the other resources you'll need.\n\n### Creating the client\n\n```js\nimport { Client, Environments, Visits, OAuth } from 'heydoctor-js';\n\n// The client will hold all configuration options and the http module\n// that communicates to our server\nconst client = new Client({\n  env: Environments.SANDBOX | Environments.PRODUCTION, // determines the API and OAuth endpoints\n});\n\n// Create two resources passing both the client we've just created\n// ** Some resources also take an optional options object as a second argument\nconst visits = new Visits(client;\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n  scope: '*',\n});\n```\n\n### Subscribing to HTTP events\nThe HeyDoctor client also doubles as an event emitter. The client extends from [Mitt](https://github.com/developit/mitt) and complies with standard EventEmitter events.\n\n```js\ninterface HttpCallback {\n  statusCode: number;\n  data: any;\n}\n\nconst client = new Client();\n\nclient.on('http:success', (data: HttpCallback) => void);\nclient.on('http:error', (data: HttpCallback) => void);\n```\n\n### Authorizing via OAuth\n\nPartnering clients will use the HeyDoctor JS SDK to create or link a HeyDoctor account. HeyDoctor conforms to the existing [OAuth2 protocol](https://oauth.net/2/). In the case that HeyDoctor already has the provided email on file, the SDK will open a dialog box, akin to Facebook or Google login, prompting the user to confirm their existing password. In all successful cases, an access token and refresh token will be returned. The resulting payload is outlined below.\n\nWe recommend to store the longstanding refresh token in a persisted data store. You’ll use this token, along with your unique client id and secret key to regenerate short lived access tokens used to authenticate requests to the HeyDoctor API. For security measures, the access token has a one hour TTL, after which the token will expire and new access token will need to be generated.\n\nUpon successful authorization, all subsequent SDK calls will be authenticated using the access token. The access token can also be utilized server-side to call our API directly.\n\n#### Example\n\n```js\nimport { Client, OAuth } from 'heydoctor-js';\n\nconst client = new Client({\n  env: 'production',\n});\n\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n});\n\n// First attempt to create a new HeyDoctor user silently. The method will throw an error in the case that the email already exists,\n// in which case you have the opportunity to present an unobtrusive dialog for the user to confirm their existing HeyDoctor password.\ntry {\n  const { accessToken, refreshToken } = await oauth.createUser({\n    email: 'frank@heydoctor.com',\n    firstName: 'Frank',\n    lastName: 'Sinatra',\n    dob: '1915-12-12',\n    gender: 'male',\n    addressLine1: '123 Somewhere Street',\n    city: 'Hoboken',\n    state: 'NJ',\n    zip: '07030',\n  });\n} catch (error) {\n  if (error.code === 'account_exists') {\n    const { accessToken, refreshToken } = await oauth.launchWebAuthFlow('frank@heydoctor.com');\n  }\n}\n\n// Now that the client has been authorized, we can call call other methods available in the SDK\nconst visit = await visits.create({\n  code: 'hair-loss',\n});\n\n// Excellent, we've just created our first visit. Now, we can upload photos to that visit.\nawait visit.uploadPhoto('photoId1234', 'base64photostring');\n```\n","licenseText":" MIT Licence\n\n Copyright (c) 2016-present, Kyle Alwyn.\n\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n\n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n","_id":"heydoctor-js@0.0.0-7ec9ede","dist":{"shasum":"4590769724ad79c3c30cf40fe8abee96363bd97a","integrity":"sha512-BUKUSP88nXWWUto2d/WBQUVRLPRJXsp/6VWU0kvHI1SiVl9zkUrjYIMNgW2t0hAuu+w/ML1de3yPtK9m2qZMxg==","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-0.0.0-7ec9ede.tgz","fileCount":48,"unpackedSize":146025,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJetaWeCRA9TVsSAnZWagAAePwP/jO21Md9nionDyQt5s2b\nAn899yx2SCLEYfcvTLs9L3NpzhX8b7osh3oVvIcuTRSE2fcZztYNYUuK2ZwD\nAz/Sv7q3Ect06G2fb0MciYHmmFkarc5JXSgdeVhp6VoWhv3eGOqOD0/TcfEj\n0vPp63YhJT+1FESVhSUuUAD2yG8uUnwat+V4LMNey9oCm7AoPmKzlRfG1mZf\n774TYTf8vKMowNnDGLTidXvUp9+RE2OIlHGy7fZmZzfbiR3eUMOawtociK8X\nZs9yjwewabJWFoAH+MBD9O6FlanEgfJpY2VHYr0JfK3v1Gz4qAGeJCOMe8aQ\nA/kbCm0J/wOlUwwhEaF1r0ZrN2AsJblLkAbJ4ufFxRHXvRr7BNJ+Uw43030j\nHD56Sa4Y8m6NntwsQIOFx30+kuB6YxF12VP3VC93rbb/ihK9Xy4mrgW+rZRj\nEYYt0egjacn/rYm8AnjUnflcR/1m9N7mF3je5kGuAHrjeeKo0COkMeBoq4i6\nfph9TuIgRcw4FJZjnam0URrvL6JqjQJDBgpJlKJgoIZL7a2684uhQ8YXXfXp\npyQbESyObaMoCpPLej8xmU5VhYz0AwJ0ZruDga1iO2B7G3k86hP/j/808jOM\nNSRz0ZcTYEXeMcReBVkiJ3hLRqCw3jhQsi31Gd9qyIuk+sECREoS5lN7ecSx\nRf84\r\n=jmp+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHHNYP35hTY7aQMahnjyEQ0P3JT99SCtQcG8ghXy2E+UAiEAqkWqi10Vq6pWU4prAW3BHjv/0pBx4HRbuMn8HhY+MTE="}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"gerrymibernardo@gmail.com","name":"gerrymi"},{"email":"kalwyn+npmci@goodrx.com","name":"heydoctor-ci"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"schlegz76@gmail.com","name":"schlegz"}],"_npmUser":{"name":"heydoctor-ci","email":"kalwyn+npmci@goodrx.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_0.0.0-7ec9ede_1588962718107_0.058594363181660336"},"_hasShrinkwrap":false},"3.6.11":{"name":"heydoctor-js","version":"3.6.11","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"https://github.com/sappira-inc/heydoctor-js"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'yarn build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"yarn docs:build && yarn docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"0.0.8","@types/jest":"^24.0.23","@types/node":"^13.13.5","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3","tslib":"^1.11.2"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^25.4.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^2.0.3","npm-run-all":"4.1.3","parcel-bundler":"^1.12.4","prettier":"2.0.5","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^6.1.2","tslint-config-prettier":"^1.18.0","tslint-plugin-prettier":"^2.3.0","typedoc":"^0.13.0","typescript":"^3.8.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"licenseText":" MIT Licence\n\n Copyright (c) 2016-present, Kyle Alwyn.\n\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n\n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n","_id":"heydoctor-js@3.6.11","dist":{"shasum":"c2bab7a52b9791528568ab6161f2181083909b58","integrity":"sha512-GgvJEz0BXcMn9rf8CKFg5dAi4j1QNksDLpZjlauierS8i0pcEkKpiImTYF5gKWI+arixIfqAh8z4z7F/O+D51Q==","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-3.6.11.tgz","fileCount":48,"unpackedSize":146234,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeta0KCRA9TVsSAnZWagAAd/oP/RDbJhUC3baf2dtMb9AL\nd0wEMQOVznXnp1B1MOwK2bbAEO1/oy0NbUgWvcrjxrb3ZfWsQMT788wURdK2\nUBVxFIPhsue0hhSJ7Nx4z3BZGf6zAqTfxdVm3szLKcra9tgBQFq+djvrkZ1x\ncVOQsj5kdK2pOqO3LydN2uIFgJk8dTJRpx1GBOPCj9S57SEvOV88a0IwNaI0\nPELG1UVFHl1ovK8I0PyGDH9i1peb235h+uOp4WCtbxNunx5x4LhsYraOZAIP\nDD3Vzm0G3zbKjj1nas+XhgWthEubMmF0xa/nsCPD3aP8+fGWbatx2+wWmqeE\nWn2j4Zw07E2k+xhFbYQ8F+G4Aw81JGCJ+ReI+AOMRA+4P1YFGi4EEFvL/wa2\nv2ls72hR7gXgvLQcgFoNX+3sBOwQBSnL3LlwG7cH58TAP76U1Ihmbzfn32yO\nis3AGDxwItMSLojuAZyyUNKOfk9kBST0EZxKCRABcNVx94496jMn0rZU4gYI\nXIzEyE4D8k/gcPF+ye5ejGNaHX24BSI0DrFzq3TMV8keV1aIZdQzAbRJPhWf\ndSbh7wsea3s6diNofOhKU5S9ujoif/wO/jI8/bJaY8c2tLuQYcchT6XeVPO4\n/MECcQ7NSnzSg9JIV2D5ghMIdv0S65hN7Yo9qMMgKo6V+QV4Aum0dpD+2UsC\nvotb\r\n=jaJg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFMRIGdWkvz5EBP1pQPOZb4KHwX248z73sZrQpco/romAiBybRxJuW8R2Ssi8+rJYW+17T6DhQ551IowSoqF+ews4A=="}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"gerrymibernardo@gmail.com","name":"gerrymi"},{"email":"kalwyn+npmci@goodrx.com","name":"heydoctor-ci"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"schlegz76@gmail.com","name":"schlegz"}],"_npmUser":{"name":"heydoctor-ci","email":"kalwyn+npmci@goodrx.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_3.6.11_1588964617865_0.1964390237643221"},"_hasShrinkwrap":false},"0.0.0-a9b4573":{"name":"heydoctor-js","version":"0.0.0-a9b4573","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"https://github.com/sappira-inc/heydoctor-js"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'yarn build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"yarn docs:build && yarn docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"0.0.8","@types/jest":"^24.0.23","@types/node":"^13.13.5","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3","tslib":"^1.11.2"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^25.4.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^2.0.3","npm-run-all":"4.1.3","parcel-bundler":"^1.12.4","prettier":"2.0.5","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^6.1.2","tslint-config-prettier":"^1.18.0","tslint-plugin-prettier":"^2.3.0","typedoc":"^0.13.0","typescript":"^3.8.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"readmeFilename":"README.md","readme":"# HeyDoctor Javascript SDK\n\nThe HeyDoctor Javascript library provides convenient access to the HeyDoctor API for applications written in JavaScript.\n\n## Documentation\nCheck out our [auto-generated docs](https://sappira-inc.github.io/heydoctor-js/) using [TypeDoc](http://typedoc.org).\n\n## Installation\nYou can install `heydoctor-js` using your favorite package manager.\n\n```sh\n$ yarn add heydoctor-js\n# or\n$ npm install --save heydoctor-js\n```\n\n## Usage\nYou'll first need to create a new client resource. If using the HeyDoctor SaaS platform, you'll need to provide the API key located in the EMR. The client contains the http module that will communicate with the HeyDoctor API, so we'll pass this client to the other resources you'll need.\n\n### Creating the client\n\n```js\nimport { Client, Environments, Visits, OAuth } from 'heydoctor-js';\n\n// The client will hold all configuration options and the http module\n// that communicates to our server\nconst client = new Client({\n  env: Environments.SANDBOX | Environments.PRODUCTION, // determines the API and OAuth endpoints\n});\n\n// Create two resources passing both the client we've just created\n// ** Some resources also take an optional options object as a second argument\nconst visits = new Visits(client;\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n  scope: '*',\n});\n```\n\n### Subscribing to HTTP events\nThe HeyDoctor client also doubles as an event emitter. The client extends from [Mitt](https://github.com/developit/mitt) and complies with standard EventEmitter events.\n\n```js\ninterface HttpCallback {\n  statusCode: number;\n  data: any;\n}\n\nconst client = new Client();\n\nclient.on('http:success', (data: HttpCallback) => void);\nclient.on('http:error', (data: HttpCallback) => void);\n```\n\n### Authorizing via OAuth\n\nPartnering clients will use the HeyDoctor JS SDK to create or link a HeyDoctor account. HeyDoctor conforms to the existing [OAuth2 protocol](https://oauth.net/2/). In the case that HeyDoctor already has the provided email on file, the SDK will open a dialog box, akin to Facebook or Google login, prompting the user to confirm their existing password. In all successful cases, an access token and refresh token will be returned. The resulting payload is outlined below.\n\nWe recommend to store the longstanding refresh token in a persisted data store. You’ll use this token, along with your unique client id and secret key to regenerate short lived access tokens used to authenticate requests to the HeyDoctor API. For security measures, the access token has a one hour TTL, after which the token will expire and new access token will need to be generated.\n\nUpon successful authorization, all subsequent SDK calls will be authenticated using the access token. The access token can also be utilized server-side to call our API directly.\n\n#### Example\n\n```js\nimport { Client, OAuth } from 'heydoctor-js';\n\nconst client = new Client({\n  env: 'production',\n});\n\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n});\n\n// First attempt to create a new HeyDoctor user silently. The method will throw an error in the case that the email already exists,\n// in which case you have the opportunity to present an unobtrusive dialog for the user to confirm their existing HeyDoctor password.\ntry {\n  const { accessToken, refreshToken } = await oauth.createUser({\n    email: 'frank@heydoctor.com',\n    firstName: 'Frank',\n    lastName: 'Sinatra',\n    dob: '1915-12-12',\n    gender: 'male',\n    addressLine1: '123 Somewhere Street',\n    city: 'Hoboken',\n    state: 'NJ',\n    zip: '07030',\n  });\n} catch (error) {\n  if (error.code === 'account_exists') {\n    const { accessToken, refreshToken } = await oauth.launchWebAuthFlow('frank@heydoctor.com');\n  }\n}\n\n// Now that the client has been authorized, we can call call other methods available in the SDK\nconst visit = await visits.create({\n  code: 'hair-loss',\n});\n\n// Excellent, we've just created our first visit. Now, we can upload photos to that visit.\nawait visit.uploadPhoto('photoId1234', 'base64photostring');\n```\n","licenseText":" MIT Licence\n\n Copyright (c) 2016-present, Kyle Alwyn.\n\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n\n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n","_id":"heydoctor-js@0.0.0-a9b4573","dist":{"shasum":"ac59dfb3e4d137383ff259a0b6ff8bfc752dc3c7","integrity":"sha512-BUjTVPc/ldzFWu7+CJBYZOXovRAMrHhtv9mubA6yqGrkNzI++oT4V0FYn6B7GnawOZEo01vg1R1Jbx5gaeTMKw==","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-0.0.0-a9b4573.tgz","fileCount":48,"unpackedSize":146025,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeta1GCRA9TVsSAnZWagAAXasP/j9x7GGJsAZevF/tDhj0\n9yaikReEdXQFVaDDNYphQwHEEG8MzRZo7SIAo4EBM7Crn0PBvWFIGHj9Q3D3\nUv1NrQel+Zg9Zdv0/Y96NdYjd9/9DONW1bRoinuABFx71uE4x9kHZevgZsPj\n3zj8xZI7hQ9TaojYkWogwq2jbrBeYWJqXqxOGTjH4SupSlRStOh9RrkEQPSO\ntAqeImCEMkBFiwN9q+3y8BejOhnsGyePbIFrf/xdDejHbPiGivBQCuoKE92+\nmio9wkpggjcc5vAv+Iz79nwMC+rFs/xOZ896BvIpSKE/bKXuj6vB1lwwQBG3\n2by5HjOppLglK7Th5KE5SewJjrKjchx8jLBJsOchkrbgkMTCZ3vGZSjv3omP\n93X6TQkb+DMVpiuBpG0I0Mcpt5TwOyevkBPH8CIsjPd7faASPfFLz5elWeqB\nu5EA39NgIJP5vuCcJcOiz5OlTvbfQ2bTS9tKe3fvfiIWR1KH5zQRmDSAFghy\nFSbc01Ywi/O8xXeF80BnuAPrV/tb1L71dp3HToRbNrdfemEWzbS29n7jPFpg\nN2Raw/lfdx27grOwrE2fzIow+fZc6tAKi+Y3d8dZG9EE9EBaErwOmQw1/l52\n2MTd2xYk6E9qzNWMwnUPTXkZAC7xCjdnxMkrjOU0VFbXZsLVdR+oAqCbCKYn\ndX2B\r\n=W97f\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDuBu04CxSIKHJOwtI7ckFZHpQNP89iEi4Jj14STh7zNgIhAOJ9GU/5TdIPFtHN/xJCdAuCDmtCAuU5ZoKKDXnTKS2c"}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"gerrymibernardo@gmail.com","name":"gerrymi"},{"email":"kalwyn+npmci@goodrx.com","name":"heydoctor-ci"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"schlegz76@gmail.com","name":"schlegz"}],"_npmUser":{"name":"heydoctor-ci","email":"kalwyn+npmci@goodrx.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_0.0.0-a9b4573_1588964677712_0.10524571692299944"},"_hasShrinkwrap":false},"0.0.0-db2c811":{"name":"heydoctor-js","version":"0.0.0-db2c811","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"https://github.com/sappira-inc/heydoctor-js"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'yarn build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"yarn docs:build && yarn docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"0.0.8","@types/jest":"^24.0.23","@types/node":"^13.13.5","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3","tslib":"^1.11.2"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^25.4.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^2.0.3","npm-run-all":"4.1.3","parcel-bundler":"^1.12.4","prettier":"2.0.5","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^6.1.2","tslint-config-prettier":"^1.18.0","tslint-plugin-prettier":"^2.3.0","typedoc":"^0.17.6","typescript":"^3.8.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"readmeFilename":"README.md","readme":"# HeyDoctor Javascript SDK\n\nThe HeyDoctor Javascript library provides convenient access to the HeyDoctor API for applications written in JavaScript.\n\n## Documentation\nCheck out our [auto-generated docs](https://sappira-inc.github.io/heydoctor-js/) using [TypeDoc](http://typedoc.org).\n\n## Installation\nYou can install `heydoctor-js` using your favorite package manager.\n\n```sh\n$ yarn add heydoctor-js\n# or\n$ npm install --save heydoctor-js\n```\n\n## Usage\nYou'll first need to create a new client resource. If using the HeyDoctor SaaS platform, you'll need to provide the API key located in the EMR. The client contains the http module that will communicate with the HeyDoctor API, so we'll pass this client to the other resources you'll need.\n\n### Creating the client\n\n```js\nimport { Client, Environments, Visits, OAuth } from 'heydoctor-js';\n\n// The client will hold all configuration options and the http module\n// that communicates to our server\nconst client = new Client({\n  env: Environments.SANDBOX | Environments.PRODUCTION, // determines the API and OAuth endpoints\n});\n\n// Create two resources passing both the client we've just created\n// ** Some resources also take an optional options object as a second argument\nconst visits = new Visits(client;\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n  scope: '*',\n});\n```\n\n### Subscribing to HTTP events\nThe HeyDoctor client also doubles as an event emitter. The client extends from [Mitt](https://github.com/developit/mitt) and complies with standard EventEmitter events.\n\n```js\ninterface HttpCallback {\n  statusCode: number;\n  data: any;\n}\n\nconst client = new Client();\n\nclient.on('http:success', (data: HttpCallback) => void);\nclient.on('http:error', (data: HttpCallback) => void);\n```\n\n### Authorizing via OAuth\n\nPartnering clients will use the HeyDoctor JS SDK to create or link a HeyDoctor account. HeyDoctor conforms to the existing [OAuth2 protocol](https://oauth.net/2/). In the case that HeyDoctor already has the provided email on file, the SDK will open a dialog box, akin to Facebook or Google login, prompting the user to confirm their existing password. In all successful cases, an access token and refresh token will be returned. The resulting payload is outlined below.\n\nWe recommend to store the longstanding refresh token in a persisted data store. You’ll use this token, along with your unique client id and secret key to regenerate short lived access tokens used to authenticate requests to the HeyDoctor API. For security measures, the access token has a one hour TTL, after which the token will expire and new access token will need to be generated.\n\nUpon successful authorization, all subsequent SDK calls will be authenticated using the access token. The access token can also be utilized server-side to call our API directly.\n\n#### Example\n\n```js\nimport { Client, OAuth } from 'heydoctor-js';\n\nconst client = new Client({\n  env: 'production',\n});\n\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n});\n\n// First attempt to create a new HeyDoctor user silently. The method will throw an error in the case that the email already exists,\n// in which case you have the opportunity to present an unobtrusive dialog for the user to confirm their existing HeyDoctor password.\ntry {\n  const { accessToken, refreshToken } = await oauth.createUser({\n    email: 'frank@heydoctor.com',\n    firstName: 'Frank',\n    lastName: 'Sinatra',\n    dob: '1915-12-12',\n    gender: 'male',\n    addressLine1: '123 Somewhere Street',\n    city: 'Hoboken',\n    state: 'NJ',\n    zip: '07030',\n  });\n} catch (error) {\n  if (error.code === 'account_exists') {\n    const { accessToken, refreshToken } = await oauth.launchWebAuthFlow('frank@heydoctor.com');\n  }\n}\n\n// Now that the client has been authorized, we can call call other methods available in the SDK\nconst visit = await visits.create({\n  code: 'hair-loss',\n});\n\n// Excellent, we've just created our first visit. Now, we can upload photos to that visit.\nawait visit.uploadPhoto('photoId1234', 'base64photostring');\n```\n","licenseText":" MIT Licence\n\n Copyright (c) 2016-present, Kyle Alwyn.\n\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n\n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n","_id":"heydoctor-js@0.0.0-db2c811","dist":{"shasum":"dde1fdc9e4d17e5ff89e1fcfcce78b034ee83b63","integrity":"sha512-GYWcxmTS9cc4mNgxdMKBm0ubS2IMMwrUaJSEWzQj1TI5HTeVeM9WQ4Eud3ZvrKa9rECh9DSQgA1M6rVTzyFr8Q==","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-0.0.0-db2c811.tgz","fileCount":48,"unpackedSize":146241,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJevCA8CRA9TVsSAnZWagAAiAAP/iAw9htkmpFhmqO8YHZJ\nCWyjgc5A6+qUR6+DxJaPOiQGMrTqkIMPulrvkxYzXz+2bIRXkpYKkCxLJPcN\nTLLlng01DkZdkesaS3cdMOWg5NLn+MwZERdd9J5ly0tL8zl72dEXGlLBM24f\n+rbpFDE4sM8A4o8+7AWfebhf3aeGWTMmwRs6FrjOoE1ux1e6B6KOSG+jGQse\ndyO/a5cqdKbfdGUg5qrz2Sn3xLGjRDSVcYwVp+e49BIsHKG0BHSghsAXK3JM\ndiJLEfg6+ia7MFvgG+LRibgSWw8vUCEkpmTJ2Na0rTNT8dAJFZxtLMnFLMg5\nHXgETShT70HmyzgA2lTJz5Vw8V4UoNt+FIHaKOPwA3kXwReyNUD6C/4lZXz9\n5X5PXKK7xzTusfJUVtopqClaFdb1ZfF+ytDyhaZhNp+JOjr5OWHXknolwdwi\nhKFskt/myR3GUlSv8kMyPb7fs06/7fuj0u+uODazYt51dEa6+8FWnWpAWShu\nuKusPWJDdqZATf2MQc3YTRxIn9pnQZY6d0F3aeI2s/Qlo52L+OIRV+SWt59C\nVIFMf36n4KCq7z8D5Zx+Vggr+3+wrLm93q0fUfSTalOyIWD6SolCEB6etfvK\nxyzuAPYNozsROdLRD7Nh0IuvSQijFh1s8Pq4Aj2htByByMV39XUQ+wDZQCfO\nOAVh\r\n=fMCo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDWw4lFEH3G41K1EExvJbhxCxDXdtFf1ZuyoiGG7kfTnAIgLy+TiHPjyiV7FzkEgA8zCBPn3pZ71rXUSxwxkw4zoUg="}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"gerrymibernardo@gmail.com","name":"gerrymi"},{"email":"kalwyn+npmci@goodrx.com","name":"heydoctor-ci"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"schlegz76@gmail.com","name":"schlegz"}],"_npmUser":{"name":"heydoctor-ci","email":"kalwyn+npmci@goodrx.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_0.0.0-db2c811_1589387324388_0.7223990783564662"},"_hasShrinkwrap":false},"3.6.12":{"name":"heydoctor-js","version":"3.6.12","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"https://github.com/sappira-inc/heydoctor-js"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'yarn build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"yarn docs:build && yarn docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"0.0.8","@types/jest":"^24.0.23","@types/node":"^13.13.5","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3","tslib":"^1.11.2"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^25.4.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^2.0.3","npm-run-all":"4.1.3","parcel-bundler":"^1.12.4","prettier":"2.0.5","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^6.1.2","tslint-config-prettier":"^1.18.0","tslint-plugin-prettier":"^2.3.0","typedoc":"^0.17.6","typescript":"^3.8.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"licenseText":" MIT Licence\n\n Copyright (c) 2016-present, Kyle Alwyn.\n\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n\n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n","_id":"heydoctor-js@3.6.12","dist":{"shasum":"09fd03706aef5dbafb077e22d12e3232865d8690","integrity":"sha512-tID1Dtg6WZ/RMMe1pn841RVG6NDFBp2lIpQR99EibmTeJyb+6p30wUCGyOgiiwj//HNtBCqCQDBVKBejT3G3/Q==","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-3.6.12.tgz","fileCount":48,"unpackedSize":146282,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJevCNgCRA9TVsSAnZWagAAKdoQAJ0w2eTp0ya3D/8FlcWb\nQQVZo7krANK8BUK2/81kVItK0x0UDmVvNlY3UU9wQsPxLlD+kLnR8T1R0qrZ\ndDLJCV2J5/vLGnpWbG7p8ikAtjMObLhP5K9yY79qwGGuhYby1xMxbiYtCcGY\n0EhzRo517V6bPm3hyCm/cGQXcworILnrQ8GHCXNWN43W17xT1YI/4+S1fWNn\nJWRyjIsuPeCAquvxOmD+RgcgPIOa0NUm5cxoDzDm+iQrHiVznTzsJsWrWW9h\nwvbbephW8JZUmkrHtZ/JXUXjYmLCdD91VreRnW0wC6mh4IgKr1Wl8Son5ML5\nHrfomLqQJ+TLHbn4b2jkWFfp6cNbPFpRJ9v2ZYuY/ZUEe9XX+Gm6RGZwlBRC\n/R9SmfzPCp/oM8OEqhtQSQ7PfuZNiNnSaZK6VK3+JXCdGzPzhKOriyhvXeAW\nvKQqoh70NiVydcg2Eqmvkd3ojiSRA01M89/diRn4q7127UuwEX/8oVa3VEjf\n6II5ZD3PLSHub045lJqETcqmgrq1v3ukLMAorXXbmbg0GR5EmsFQviqrGuPO\nD7POxw3m22VL8nrQ+5ehq6L5Qyo7XnR4wWh4axUZI6JKj6bD7gDLId8RBlu0\nxyt7JGtl2blHELez0lqo2IhiJ5BiDVM8F00Bj1LEaQAVyxRMNF/TRQXRKhBs\nZGyn\r\n=nenL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDivrCi8p9uA9XrRM9mhUp6beDBhjMwdwVgkcJSxWRWUAiEAyGE6gFpTw5pcf9GpwBH+zA55EocSQMRQU8LEfzJgW8k="}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"gerrymibernardo@gmail.com","name":"gerrymi"},{"email":"kalwyn+npmci@goodrx.com","name":"heydoctor-ci"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"schlegz76@gmail.com","name":"schlegz"}],"_npmUser":{"name":"heydoctor-ci","email":"kalwyn+npmci@goodrx.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_3.6.12_1589388127630_0.6838353722861907"},"_hasShrinkwrap":false},"0.0.0-b3b2f1b":{"name":"heydoctor-js","version":"0.0.0-b3b2f1b","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"https://github.com/sappira-inc/heydoctor-js"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'yarn build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"yarn docs:build && yarn docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"0.0.8","@types/jest":"^24.0.23","@types/node":"^13.13.5","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3","tslib":"^1.11.2"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^25.4.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^2.0.3","npm-run-all":"4.1.3","parcel-bundler":"^1.12.4","prettier":"2.0.5","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^6.1.2","tslint-config-prettier":"^1.18.0","tslint-plugin-prettier":"^2.3.0","typedoc":"^0.17.6","typescript":"^3.8.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"readmeFilename":"README.md","readme":"# HeyDoctor Javascript SDK\n\nThe HeyDoctor Javascript library provides convenient access to the HeyDoctor API for applications written in JavaScript.\n\n## Documentation\nCheck out our [auto-generated docs](https://sappira-inc.github.io/heydoctor-js/) using [TypeDoc](http://typedoc.org).\n\n## Installation\nYou can install `heydoctor-js` using your favorite package manager.\n\n```sh\n$ yarn add heydoctor-js\n# or\n$ npm install --save heydoctor-js\n```\n\n## Usage\nYou'll first need to create a new client resource. If using the HeyDoctor SaaS platform, you'll need to provide the API key located in the EMR. The client contains the http module that will communicate with the HeyDoctor API, so we'll pass this client to the other resources you'll need.\n\n### Creating the client\n\n```js\nimport { Client, Environments, Visits, OAuth } from 'heydoctor-js';\n\n// The client will hold all configuration options and the http module\n// that communicates to our server\nconst client = new Client({\n  env: Environments.SANDBOX | Environments.PRODUCTION, // determines the API and OAuth endpoints\n});\n\n// Create two resources passing both the client we've just created\n// ** Some resources also take an optional options object as a second argument\nconst visits = new Visits(client;\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n  scope: '*',\n});\n```\n\n### Subscribing to HTTP events\nThe HeyDoctor client also doubles as an event emitter. The client extends from [Mitt](https://github.com/developit/mitt) and complies with standard EventEmitter events.\n\n```js\ninterface HttpCallback {\n  statusCode: number;\n  data: any;\n}\n\nconst client = new Client();\n\nclient.on('http:success', (data: HttpCallback) => void);\nclient.on('http:error', (data: HttpCallback) => void);\n```\n\n### Authorizing via OAuth\n\nPartnering clients will use the HeyDoctor JS SDK to create or link a HeyDoctor account. HeyDoctor conforms to the existing [OAuth2 protocol](https://oauth.net/2/). In the case that HeyDoctor already has the provided email on file, the SDK will open a dialog box, akin to Facebook or Google login, prompting the user to confirm their existing password. In all successful cases, an access token and refresh token will be returned. The resulting payload is outlined below.\n\nWe recommend to store the longstanding refresh token in a persisted data store. You’ll use this token, along with your unique client id and secret key to regenerate short lived access tokens used to authenticate requests to the HeyDoctor API. For security measures, the access token has a one hour TTL, after which the token will expire and new access token will need to be generated.\n\nUpon successful authorization, all subsequent SDK calls will be authenticated using the access token. The access token can also be utilized server-side to call our API directly.\n\n#### Example\n\n```js\nimport { Client, OAuth } from 'heydoctor-js';\n\nconst client = new Client({\n  env: 'production',\n});\n\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n});\n\n// First attempt to create a new HeyDoctor user silently. The method will throw an error in the case that the email already exists,\n// in which case you have the opportunity to present an unobtrusive dialog for the user to confirm their existing HeyDoctor password.\ntry {\n  const { accessToken, refreshToken } = await oauth.createUser({\n    email: 'frank@heydoctor.com',\n    firstName: 'Frank',\n    lastName: 'Sinatra',\n    dob: '1915-12-12',\n    gender: 'male',\n    addressLine1: '123 Somewhere Street',\n    city: 'Hoboken',\n    state: 'NJ',\n    zip: '07030',\n  });\n} catch (error) {\n  if (error.code === 'account_exists') {\n    const { accessToken, refreshToken } = await oauth.launchWebAuthFlow('frank@heydoctor.com');\n  }\n}\n\n// Now that the client has been authorized, we can call call other methods available in the SDK\nconst visit = await visits.create({\n  code: 'hair-loss',\n});\n\n// Excellent, we've just created our first visit. Now, we can upload photos to that visit.\nawait visit.uploadPhoto('photoId1234', 'base64photostring');\n```\n","licenseText":" MIT Licence\n\n Copyright (c) 2016-present, Kyle Alwyn.\n\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n\n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n","_id":"heydoctor-js@0.0.0-b3b2f1b","dist":{"shasum":"0b81a283a464e90b5ad8ea9d51905a65c17effe1","integrity":"sha512-7YWjqHjNMvg8derz53t1tCjaBB2hq4FKJIgYg4EyJeCBNRo0Z/0RNJrOvwjN+Qs7jqIUj6YW2LFkp19zkjXrrg==","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-0.0.0-b3b2f1b.tgz","fileCount":48,"unpackedSize":146241,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJevCN2CRA9TVsSAnZWagAAXTwP/2PJdeAU3TRHWrzDXs5w\nvcJDb6PyMNVs2Lr6+WlYbMHqwOzPDMETi4yDlacZcUT4echYehKyvOPcrnAa\n+VLvS6oCsxW6i2oO6lBQkN/SDtCGujFH2IsE3y99Rrss7Gf8zLFXnzcPfcrK\nvnxL50OvCYptK4v2lQQ2onr7rXoEMNQYQ5zmtmkHtnjqSG8r0dSdrxtqZo8/\nRfFNFyQLBUvbAJpH8Y0s3awJs1eDr08K8nbkqMOf1RbLMQMc304IQaHe6Ovs\nkybwxoS15zJJYpHwS1fnyhcbQKeXB6kIvziEX7/G09ZT9EYXCK0uQzgGMWbl\nGuB6Q4W5RMhs/te6PzkpHoi5Ym+sEKcnjXVGjzlCipfjD/7X55oWjYZyAmxJ\n5Q2VUnpdQyjLgNSSIbB/RWhdkmvMISTcIFUmHqOmhgiW/v1D9zpNqpk9368T\naldIa1CClycKYymHjTooFB4haMZeHgeaQnjnTbB4Lfys2mWBcDr9Y0QzI+JX\n6ThkoHrbKoJa+gQq2vS3nh6qz9nBdNvZU9fpleHnkFO70l7mwkfsDSkALX0H\nHaXQyZ/vuyR++KBidrXpRG0Myx7RZaN7mIbyujbyhHz0avh+PHOd2avUMztX\nCxaTjP8zRZDZgikl6Ga++YHtoPPOVune5abVVvy7RgM3pTK/zIbLNpcBBqAb\nRvRz\r\n=WdY8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID+DS+ooZ8BzEZxn6cxPVu8aLKwxoNhMrB5BoB8Y6/FtAiBXiwropIzl1z6ZWMWEJH8nT70CKNIMlPm2kiRWT0I2Eg=="}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"gerrymibernardo@gmail.com","name":"gerrymi"},{"email":"kalwyn+npmci@goodrx.com","name":"heydoctor-ci"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"schlegz76@gmail.com","name":"schlegz"}],"_npmUser":{"name":"heydoctor-ci","email":"kalwyn+npmci@goodrx.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_0.0.0-b3b2f1b_1589388149665_0.11124559866462325"},"_hasShrinkwrap":false},"0.0.0-18181be":{"name":"heydoctor-js","version":"0.0.0-18181be","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"https://github.com/sappira-inc/heydoctor-js"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'yarn build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"yarn docs:build && yarn docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"0.0.8","@types/jest":"^24.0.23","@types/node":"^13.13.5","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3","tslib":"^1.11.2"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^25.4.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^2.0.3","npm-run-all":"4.1.3","parcel-bundler":"^1.12.4","prettier":"2.0.5","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^6.1.2","tslint-config-prettier":"^1.18.0","tslint-plugin-prettier":"^2.3.0","typedoc":"^0.17.6","typescript":"^3.8.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"readmeFilename":"README.md","readme":"# HeyDoctor Javascript SDK\n\nThe HeyDoctor Javascript library provides convenient access to the HeyDoctor API for applications written in JavaScript.\n\n## Documentation\nCheck out our [auto-generated docs](https://sappira-inc.github.io/heydoctor-js/) using [TypeDoc](http://typedoc.org).\n\n## Installation\nYou can install `heydoctor-js` using your favorite package manager.\n\n```sh\n$ yarn add heydoctor-js\n# or\n$ npm install --save heydoctor-js\n```\n\n## Usage\nYou'll first need to create a new client resource. If using the HeyDoctor SaaS platform, you'll need to provide the API key located in the EMR. The client contains the http module that will communicate with the HeyDoctor API, so we'll pass this client to the other resources you'll need.\n\n### Creating the client\n\n```js\nimport { Client, Environments, Visits, OAuth } from 'heydoctor-js';\n\n// The client will hold all configuration options and the http module\n// that communicates to our server\nconst client = new Client({\n  env: Environments.SANDBOX | Environments.PRODUCTION, // determines the API and OAuth endpoints\n});\n\n// Create two resources passing both the client we've just created\n// ** Some resources also take an optional options object as a second argument\nconst visits = new Visits(client;\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n  scope: '*',\n});\n```\n\n### Subscribing to HTTP events\nThe HeyDoctor client also doubles as an event emitter. The client extends from [Mitt](https://github.com/developit/mitt) and complies with standard EventEmitter events.\n\n```js\ninterface HttpCallback {\n  statusCode: number;\n  data: any;\n}\n\nconst client = new Client();\n\nclient.on('http:success', (data: HttpCallback) => void);\nclient.on('http:error', (data: HttpCallback) => void);\n```\n\n### Authorizing via OAuth\n\nPartnering clients will use the HeyDoctor JS SDK to create or link a HeyDoctor account. HeyDoctor conforms to the existing [OAuth2 protocol](https://oauth.net/2/). In the case that HeyDoctor already has the provided email on file, the SDK will open a dialog box, akin to Facebook or Google login, prompting the user to confirm their existing password. In all successful cases, an access token and refresh token will be returned. The resulting payload is outlined below.\n\nWe recommend to store the longstanding refresh token in a persisted data store. You’ll use this token, along with your unique client id and secret key to regenerate short lived access tokens used to authenticate requests to the HeyDoctor API. For security measures, the access token has a one hour TTL, after which the token will expire and new access token will need to be generated.\n\nUpon successful authorization, all subsequent SDK calls will be authenticated using the access token. The access token can also be utilized server-side to call our API directly.\n\n#### Example\n\n```js\nimport { Client, OAuth } from 'heydoctor-js';\n\nconst client = new Client({\n  env: 'production',\n});\n\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n});\n\n// First attempt to create a new HeyDoctor user silently. The method will throw an error in the case that the email already exists,\n// in which case you have the opportunity to present an unobtrusive dialog for the user to confirm their existing HeyDoctor password.\ntry {\n  const { accessToken, refreshToken } = await oauth.createUser({\n    email: 'frank@heydoctor.com',\n    firstName: 'Frank',\n    lastName: 'Sinatra',\n    dob: '1915-12-12',\n    gender: 'male',\n    addressLine1: '123 Somewhere Street',\n    city: 'Hoboken',\n    state: 'NJ',\n    zip: '07030',\n  });\n} catch (error) {\n  if (error.code === 'account_exists') {\n    const { accessToken, refreshToken } = await oauth.launchWebAuthFlow('frank@heydoctor.com');\n  }\n}\n\n// Now that the client has been authorized, we can call call other methods available in the SDK\nconst visit = await visits.create({\n  code: 'hair-loss',\n});\n\n// Excellent, we've just created our first visit. Now, we can upload photos to that visit.\nawait visit.uploadPhoto('photoId1234', 'base64photostring');\n```\n","licenseText":" MIT Licence\n\n Copyright (c) 2016-present, Kyle Alwyn.\n\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n\n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n","_id":"heydoctor-js@0.0.0-18181be","dist":{"shasum":"8419da84106288cbae10c3229eb6372d3fdaf933","integrity":"sha512-LmPPhQuELph5s/lwK/motGHNY4sMJF+/+9Ut/R1kqnfWbbammOmOlN9Gvm0uFRO1pF0e4jbU/g5dnHnwurYD5A==","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-0.0.0-18181be.tgz","fileCount":48,"unpackedSize":146289,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJewrNACRA9TVsSAnZWagAAQ/4QAJMlzlKgV8YFBZYLb7UP\nznzoO7Kg22u3rJzdQ1+L23KQLlVnD5AIcYYK6/TyP4W7Pincjc7/o422AGwt\nfS5omlm68ATbGMHBE9nI2GYYyyDCWV6uxwIggzT0hiBTEr3bP80rJtaQzLz3\nO5fi4ImBay0xuMvcbJ6dpfHMXqQDz2R7/CYlPEYIZpMrpQyPAmfRLq1heTqj\nVxslWwMkFDn3pbfSYh7p0Tci8JuHy9yDN+nX6t/MlYOVOu4WI3mNTksxnLU0\nn6s3xubDKXptK5LtSf+xEzMeMocogBug8U2GvWLkOVMvZConyV4vbXmBDGPf\nrERFFhIeFfnnuyhkKX3vH3mlFBrFDr47tQACiEcquBTffajZvqvQ6Q9xOnOj\nd5bHKTGCn1dUcn1TPXLNmVJ0I9dFi1nfqShDFD6tpSpdczVGHfmS6skHknnN\nNoGhtgZoDA23Vv0NmadZOl0CLU78V+7ymEIxQApq/qvTvKly3p7taXKLJfQt\nHBqpNqAHSjbFErEYVcY7Vqey34zNaZUwO+xOHIvj7auDGpn30INtwfP4A/XO\nYVkFKNraOJAagYPtwZ+XApdXfbWaPw7LWvjtjarYl1I5NiVV4n5dNQzivGPp\nT1OLsRQFhMLf12FPyEWZj5/SbLBDxY4MPNwPVe114/OQHB9EuOIBxq8X1aa5\nhCoT\r\n=So9l\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCID8Y6ECjthCbtHvx4hn+xLTp6ZFHAHpIssw3hObXiBRxAiEA0pNhbLGU4DdezXav/XXSMgWdiYss4+EIrNlDxKLX1lM="}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"gerrymibernardo@gmail.com","name":"gerrymi"},{"email":"kalwyn+npmci@goodrx.com","name":"heydoctor-ci"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"schlegz76@gmail.com","name":"schlegz"}],"_npmUser":{"name":"heydoctor-ci","email":"kalwyn+npmci@goodrx.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_0.0.0-18181be_1589818175566_0.8446724103481447"},"_hasShrinkwrap":false},"3.6.13":{"name":"heydoctor-js","version":"3.6.13","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"https://github.com/sappira-inc/heydoctor-js"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'yarn build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"yarn docs:build && yarn docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"0.0.8","@types/jest":"^24.0.23","@types/node":"^13.13.5","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3","tslib":"^1.11.2"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^25.4.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^2.0.3","npm-run-all":"4.1.3","parcel-bundler":"^1.12.4","prettier":"2.0.5","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^6.1.2","tslint-config-prettier":"^1.18.0","tslint-plugin-prettier":"^2.3.0","typedoc":"^0.17.6","typescript":"^3.8.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"licenseText":" MIT Licence\n\n Copyright (c) 2016-present, Kyle Alwyn.\n\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n\n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n","_id":"heydoctor-js@3.6.13","dist":{"shasum":"ae836995bbae9db286d45c084681682809e6096f","integrity":"sha512-q2y2hU4wGSt9M1LUMxM/N7XKG9+HEPLVOd4hpn9ZFKPoKUqx6g8IAdpZYjA1qo7pRi6xfLKJ0TZXaPhhh79+LA==","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-3.6.13.tgz","fileCount":48,"unpackedSize":146330,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJewrbICRA9TVsSAnZWagAAvTUP/RxYwJamaqD5jk21d+kD\nnGzHqrbV1K+iu2UyksfnuGc+0crxkiDNUDaIo8CH02kQnAZiiKuPqd9qf+bc\nEAYfPBVoDdQy/WR0vElh0+YE9kyODcXLhBFuMq4wjUsIyPbfADsRSydwMBYl\ncJ88QYj+8KAaNi5S1u7t+eqZtBf7CofjzC/gCpqOp8WZ9kRvI0aAxuLlVHFP\n4pOOINgj1Ik2TxdGVN2U76XO/RpuhHQK3MG3/MlWn52AImqndMWn++QYfqCY\n1pvzVdE/mQRCpEZnwdcYByz9D96cRvy2w68k1KMVb7UJif3m1LIhMavVmnVE\nc12eJ5ipbOU6mqT4mKg2+0cBjr6zAAPakcppO2idGnN3F4oT3cGlOgjBF7Yz\neD8z+QYLGLCo4hm10z1N4z9JhfhTtpmi3uTxlsd8UTbWAMpgx3j5wJcxgctx\nugzsRL9BB+PuOcjpLlY0YQmzTJxi4rOtdtYjGIvXhFJ+F6lj60aCfNXb1Z1t\nF3cJr5PJrBlny4VBw/fGcftrJu66Is3FhHt2Ng9pdXEGpChT1hA+6JJ6AhZG\nCt0wrcVPr4IOPZKHmMcAFfHHbdten7x6u4D0Qwg6RHA72XuBLqdP0H0RhuRG\nbSy44xQyIFhUPhPtdua16/BFkFbNMllh7ecjVjuJCWp0D2XtrvkCvvZuRxVB\ncHy6\r\n=HKgT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCc8kuMjN5RUWJ4Q8cWqvvQ9C8MN9MZKXdJrznWRS6E0QIgEwpTqeGdOBI7YQeOcn0RFbLsjNui5DKh0tzwGB8n8ao="}]},"maintainers":[{"email":"hpatel516+services@gmail.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"gerrymibernardo@gmail.com","name":"gerrymi"},{"email":"kalwyn+npmci@goodrx.com","name":"heydoctor-ci"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"schlegz76@gmail.com","name":"schlegz"}],"_npmUser":{"name":"heydoctor-ci","email":"kalwyn+npmci@goodrx.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_3.6.13_1589819079945_0.6658322161693502"},"_hasShrinkwrap":false},"0.0.0-b18945c":{"name":"heydoctor-js","version":"0.0.0-b18945c","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"https://github.com/sappira-inc/heydoctor-js"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'yarn build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"yarn docs:build && yarn docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"0.0.8","@types/jest":"^24.0.23","@types/node":"^13.13.5","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3","tslib":"^1.11.2"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^25.4.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^2.0.3","npm-run-all":"4.1.3","parcel-bundler":"^1.12.4","prettier":"2.0.5","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^6.1.2","tslint-config-prettier":"^1.18.0","tslint-plugin-prettier":"^2.3.0","typedoc":"^0.17.6","typescript":"^3.8.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"readmeFilename":"README.md","readme":"# HeyDoctor Javascript SDK\n\nThe HeyDoctor Javascript library provides convenient access to the HeyDoctor API for applications written in JavaScript.\n\n## Documentation\nCheck out our [auto-generated docs](https://sappira-inc.github.io/heydoctor-js/) using [TypeDoc](http://typedoc.org).\n\n## Installation\nYou can install `heydoctor-js` using your favorite package manager.\n\n```sh\n$ yarn add heydoctor-js\n# or\n$ npm install --save heydoctor-js\n```\n\n## Usage\nYou'll first need to create a new client resource. If using the HeyDoctor SaaS platform, you'll need to provide the API key located in the EMR. The client contains the http module that will communicate with the HeyDoctor API, so we'll pass this client to the other resources you'll need.\n\n### Creating the client\n\n```js\nimport { Client, Environments, Visits, OAuth } from 'heydoctor-js';\n\n// The client will hold all configuration options and the http module\n// that communicates to our server\nconst client = new Client({\n  env: Environments.SANDBOX | Environments.PRODUCTION, // determines the API and OAuth endpoints\n});\n\n// Create two resources passing both the client we've just created\n// ** Some resources also take an optional options object as a second argument\nconst visits = new Visits(client;\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n  scope: '*',\n});\n```\n\n### Subscribing to HTTP events\nThe HeyDoctor client also doubles as an event emitter. The client extends from [Mitt](https://github.com/developit/mitt) and complies with standard EventEmitter events.\n\n```js\ninterface HttpCallback {\n  statusCode: number;\n  data: any;\n}\n\nconst client = new Client();\n\nclient.on('http:success', (data: HttpCallback) => void);\nclient.on('http:error', (data: HttpCallback) => void);\n```\n\n### Authorizing via OAuth\n\nPartnering clients will use the HeyDoctor JS SDK to create or link a HeyDoctor account. HeyDoctor conforms to the existing [OAuth2 protocol](https://oauth.net/2/). In the case that HeyDoctor already has the provided email on file, the SDK will open a dialog box, akin to Facebook or Google login, prompting the user to confirm their existing password. In all successful cases, an access token and refresh token will be returned. The resulting payload is outlined below.\n\nWe recommend to store the longstanding refresh token in a persisted data store. You’ll use this token, along with your unique client id and secret key to regenerate short lived access tokens used to authenticate requests to the HeyDoctor API. For security measures, the access token has a one hour TTL, after which the token will expire and new access token will need to be generated.\n\nUpon successful authorization, all subsequent SDK calls will be authenticated using the access token. The access token can also be utilized server-side to call our API directly.\n\n#### Example\n\n```js\nimport { Client, OAuth } from 'heydoctor-js';\n\nconst client = new Client({\n  env: 'production',\n});\n\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n});\n\n// First attempt to create a new HeyDoctor user silently. The method will throw an error in the case that the email already exists,\n// in which case you have the opportunity to present an unobtrusive dialog for the user to confirm their existing HeyDoctor password.\ntry {\n  const { accessToken, refreshToken } = await oauth.createUser({\n    email: 'frank@heydoctor.com',\n    firstName: 'Frank',\n    lastName: 'Sinatra',\n    dob: '1915-12-12',\n    gender: 'male',\n    addressLine1: '123 Somewhere Street',\n    city: 'Hoboken',\n    state: 'NJ',\n    zip: '07030',\n  });\n} catch (error) {\n  if (error.code === 'account_exists') {\n    const { accessToken, refreshToken } = await oauth.launchWebAuthFlow('frank@heydoctor.com');\n  }\n}\n\n// Now that the client has been authorized, we can call call other methods available in the SDK\nconst visit = await visits.create({\n  code: 'hair-loss',\n});\n\n// Excellent, we've just created our first visit. Now, we can upload photos to that visit.\nawait visit.uploadPhoto('photoId1234', 'base64photostring');\n```\n","licenseText":" MIT Licence\n\n Copyright (c) 2016-present, Kyle Alwyn.\n\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n\n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n","_id":"heydoctor-js@0.0.0-b18945c","dist":{"shasum":"b164fc61d456e67d344591e62dc2e8f060faff15","integrity":"sha512-xsEKb5r/bCUdm7FtisQieMIIScUao6qnVdZ8n5eoTM7ngRRhvFYfaXFTp7K8yPcgOiVt6fGCDyePFooO6o71xA==","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-0.0.0-b18945c.tgz","fileCount":48,"unpackedSize":146337,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJezt/QCRA9TVsSAnZWagAAb2EP/253x5iCD7npY8bndL1i\nI4yUdfSdXuYQ4FrGoYPu92PRtjNZPgBd9Dr8XmZiyZCeYfxQIPM0R4CRHFpW\nEK34mppPKM2nBGgc/xOH3hs2Sehk30Q5bqEzzkU2tzBXCrpxHABFDTZ+5w82\nZDJEX3xgpZx4bERRpQYe7hA46HqbVClvvopuEg2OpCWlM4EUgKCaIIK6mu0w\n9D4QOUiC7DacOu9a4ZnRH0IHuMajhhmfwZhkKHkIVHEep9fa9r2T7jFyFpTt\nSmxF8sobuMsGykp3jeZj3jrehMGi+bluWCKUreyOZsVrX1puR0keGYFzSANu\nwGz9v8uQMgaJJtqcS2JQROoaLzRh63aaCW6RNfJlVqVuTM3AbcAAPRKj8koz\ndLSRU9AJRd7EQC5onyPxYlGyPsPQhV6q4jre7lK6wd2EdgqX+LW5psbG8S8R\n8VuKUjG6eWvDm2AeBsIzY4+7Gaij4BKIzbsUvnsaaLta45LdkrRCAu9epUay\nXkuYtT95zeoCrl6Exy6o/B00EiBBHbqgz4Th1m3rp4jNDL4oujpGq1vLatZy\nLXF3gtqDMvavTy5qCMrptGudRkv4HkSwetVscBsC0e/19rdWsqmY+JDBbGNj\n/bKMejcNRAZe+cUNAs6bVzDuVhmc+kFc8EEBk0gqOjI/zeyAXxme+1OBJfEN\nRAhO\r\n=Wt+F\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCbmxjdDpEmOaoRaDAKhcN4rMENS433B4dnOES1V8A8bAIgQkkDWx2nf53n7Swz4a8cItYo1BgrEnQdekexaucTYJE="}]},"maintainers":[{"email":"npm@services.hurshal.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"gerrymibernardo@gmail.com","name":"gerrymi"},{"email":"kalwyn+npmci@goodrx.com","name":"heydoctor-ci"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"rjames@goodrx.com","name":"rosaliejames"},{"email":"schlegz76@gmail.com","name":"schlegz"}],"_npmUser":{"name":"heydoctor-ci","email":"kalwyn+npmci@goodrx.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_0.0.0-b18945c_1590616015655_0.6508699642787017"},"_hasShrinkwrap":false},"0.0.0-1e48472":{"name":"heydoctor-js","version":"0.0.0-1e48472","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"https://github.com/sappira-inc/heydoctor-js"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'yarn build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"yarn docs:build && yarn docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"0.0.8","@types/jest":"^24.0.23","@types/node":"^13.13.5","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3","tslib":"^1.11.2"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^25.4.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^2.0.3","npm-run-all":"4.1.3","parcel-bundler":"^1.12.4","prettier":"2.0.5","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^6.1.2","tslint-config-prettier":"^1.18.0","tslint-plugin-prettier":"^2.3.0","typedoc":"^0.17.6","typescript":"^3.8.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"readmeFilename":"README.md","readme":"# HeyDoctor Javascript SDK\n\nThe HeyDoctor Javascript library provides convenient access to the HeyDoctor API for applications written in JavaScript.\n\n## Documentation\nCheck out our [auto-generated docs](https://sappira-inc.github.io/heydoctor-js/) using [TypeDoc](http://typedoc.org).\n\n## Installation\nYou can install `heydoctor-js` using your favorite package manager.\n\n```sh\n$ yarn add heydoctor-js\n# or\n$ npm install --save heydoctor-js\n```\n\n## Usage\nYou'll first need to create a new client resource. If using the HeyDoctor SaaS platform, you'll need to provide the API key located in the EMR. The client contains the http module that will communicate with the HeyDoctor API, so we'll pass this client to the other resources you'll need.\n\n### Creating the client\n\n```js\nimport { Client, Environments, Visits, OAuth } from 'heydoctor-js';\n\n// The client will hold all configuration options and the http module\n// that communicates to our server\nconst client = new Client({\n  env: Environments.SANDBOX | Environments.PRODUCTION, // determines the API and OAuth endpoints\n});\n\n// Create two resources passing both the client we've just created\n// ** Some resources also take an optional options object as a second argument\nconst visits = new Visits(client;\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n  scope: '*',\n});\n```\n\n### Subscribing to HTTP events\nThe HeyDoctor client also doubles as an event emitter. The client extends from [Mitt](https://github.com/developit/mitt) and complies with standard EventEmitter events.\n\n```js\ninterface HttpCallback {\n  statusCode: number;\n  data: any;\n}\n\nconst client = new Client();\n\nclient.on('http:success', (data: HttpCallback) => void);\nclient.on('http:error', (data: HttpCallback) => void);\n```\n\n### Authorizing via OAuth\n\nPartnering clients will use the HeyDoctor JS SDK to create or link a HeyDoctor account. HeyDoctor conforms to the existing [OAuth2 protocol](https://oauth.net/2/). In the case that HeyDoctor already has the provided email on file, the SDK will open a dialog box, akin to Facebook or Google login, prompting the user to confirm their existing password. In all successful cases, an access token and refresh token will be returned. The resulting payload is outlined below.\n\nWe recommend to store the longstanding refresh token in a persisted data store. You’ll use this token, along with your unique client id and secret key to regenerate short lived access tokens used to authenticate requests to the HeyDoctor API. For security measures, the access token has a one hour TTL, after which the token will expire and new access token will need to be generated.\n\nUpon successful authorization, all subsequent SDK calls will be authenticated using the access token. The access token can also be utilized server-side to call our API directly.\n\n#### Example\n\n```js\nimport { Client, OAuth } from 'heydoctor-js';\n\nconst client = new Client({\n  env: 'production',\n});\n\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n});\n\n// First attempt to create a new HeyDoctor user silently. The method will throw an error in the case that the email already exists,\n// in which case you have the opportunity to present an unobtrusive dialog for the user to confirm their existing HeyDoctor password.\ntry {\n  const { accessToken, refreshToken } = await oauth.createUser({\n    email: 'frank@heydoctor.com',\n    firstName: 'Frank',\n    lastName: 'Sinatra',\n    dob: '1915-12-12',\n    gender: 'male',\n    addressLine1: '123 Somewhere Street',\n    city: 'Hoboken',\n    state: 'NJ',\n    zip: '07030',\n  });\n} catch (error) {\n  if (error.code === 'account_exists') {\n    const { accessToken, refreshToken } = await oauth.launchWebAuthFlow('frank@heydoctor.com');\n  }\n}\n\n// Now that the client has been authorized, we can call call other methods available in the SDK\nconst visit = await visits.create({\n  code: 'hair-loss',\n});\n\n// Excellent, we've just created our first visit. Now, we can upload photos to that visit.\nawait visit.uploadPhoto('photoId1234', 'base64photostring');\n```\n","licenseText":" MIT Licence\n\n Copyright (c) 2016-present, Kyle Alwyn.\n\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n\n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n","_id":"heydoctor-js@0.0.0-1e48472","dist":{"shasum":"965d57e0d83f7bcaf3adc4587d10a84e9ea469c9","integrity":"sha512-dIR4I5bQgeDZvWAyVW7rVlbQ5K9bCPg7IE1ev1H13G91RjTCp0ronMy1inf96nbtPiM2W8/Wo+h24lbEJ7jg7Q==","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-0.0.0-1e48472.tgz","fileCount":48,"unpackedSize":146585,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJezvZaCRA9TVsSAnZWagAAccAP/RI9k7iK4pDEwziYM6Ss\n5mCbtXVcIByOebKx+zRbHcYvjaLLOTDpgBeFJaSZ0/dM6i54ne5vKc/fQqF3\nbhX24fhEpg18VoQgF0IEzM4PIK705dkOomKoNnP43RwaY87ChTPpeilse+Ky\nY5wLGT9284tC1JBkSaWMoqA3x/GN5xsW4+gO6Xyguw5y6HMt+s5Iiu/F484P\nHFWMHbfb2fdvXFvJK31F+Pz0uQfrv37N6noCocX+rR1LxEIdkWu0N3JcA0t0\n+M8hIpU3ep9P+bu8KDAcIfoVgCfRdccQHIGa3K4mFXsB/SqPKSF7idekMipC\nLAwU8UolbIf0aiMrQ94/R8mOC9Qxr1Mjco2+641c9Vam6AvsUvmjWmgB3hBz\nXeJXreYU8RwWcs6UqbThSAr/kbgU+IB4DcMKsKbLlS1ikYlCKdY37OAaRHO2\nnZqRF1UV2AHBKnlSLD2ykEXuMPBsGckCE66b+g6/41WOQJz/15An2hmpjnqq\nYGS+pqr8sWJCiS3scSdCCqQQmy25Hynogmw6F0N9jtYY01598B2flcWIArDh\njmlJ3T479rsGdQ4ATPbUrRq4R6gtANEWfCSIJY7F8Vp6hbR7I+vZ6S65TWOJ\nnNSOdheB3jIXnLn6DdJcl0xpjyMm7UHcVe6KNIPCChICUiWQnqcpfFSCOdzA\nW/5p\r\n=8bfd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGRmsegIq2Ff77PGlI2X7NjcyyOFYBNmAD3Ujzs80SO1AiEAvjho+RwXXVw8CS6+eVZv7qRhb1ttOaji+iJ4bXgvCAE="}]},"maintainers":[{"email":"npm@services.hurshal.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"gerrymibernardo@gmail.com","name":"gerrymi"},{"email":"kalwyn+npmci@goodrx.com","name":"heydoctor-ci"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"rjames@goodrx.com","name":"rosaliejames"},{"email":"schlegz76@gmail.com","name":"schlegz"}],"_npmUser":{"name":"heydoctor-ci","email":"kalwyn+npmci@goodrx.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_0.0.0-1e48472_1590621786207_0.20345654751519415"},"_hasShrinkwrap":false},"3.6.14":{"name":"heydoctor-js","version":"3.6.14","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"https://github.com/sappira-inc/heydoctor-js"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'yarn build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"yarn docs:build && yarn docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"0.0.8","@types/jest":"^24.0.23","@types/node":"^13.13.5","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3","tslib":"^1.11.2"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^25.4.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^2.0.3","npm-run-all":"4.1.3","parcel-bundler":"^1.12.4","prettier":"2.0.5","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^6.1.2","tslint-config-prettier":"^1.18.0","tslint-plugin-prettier":"^2.3.0","typedoc":"^0.17.6","typescript":"^3.8.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"licenseText":" MIT Licence\n\n Copyright (c) 2016-present, Kyle Alwyn.\n\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n\n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n","_id":"heydoctor-js@3.6.14","dist":{"shasum":"c2003477f0e07c83973e623103e48aa74cc32bb9","integrity":"sha512-TzboS7NRxfRsXHsyWRMDVVq5djBNLozRKqvZA2kFXw7HvZi4hWwOpH+KyWFhb+JBnpYsWEvdN/mmW53pIUI8bw==","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-3.6.14.tgz","fileCount":48,"unpackedSize":146626,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJezv1hCRA9TVsSAnZWagAAPwsQAJoXigdY/5nIoj6Pu8yI\nvYNyHARQvz11x90Nk+SK2d49T5AiWZarL+jZX8jLAAsHW9fLJUg1c3686LEo\nrh94uzQP0l6rIv57aCMeyDJC6/ObiZC3VBknrbbEKkD76K/8qKD+BD8UBePm\nftyjE3P29GNKKYq2BPhu4JMf4PTByDX0YFkfbECgg1JqBIuZT4wmC0S63S7A\n6pbzDO/jurDYoAEiQqudhldnBbe1/LPx/abLBBLSNMsongDa1kDrqihPy5hu\nGvHUhJdr4bMuVrkcltXjFUKbQf6wqjWaUKMf7+v08U594RqEjoMQjW2TwHdL\nXJoeBStrd3kUlJH4INLnSnJIJn56+sssCwF+VRXern+0l66gD6vYdlLNQFKi\nIJ1RqSoaqoC8AjAzw2P/EmnZSz8M7D4KV6mK7doxW7V+430BlCrZ2qCAwQtO\nOrag9LSy0YVj1NW/IqeWFFRinqEQC74+YnCz0ms+sY+hbkI2+ZBkcQX9edvL\n8ECG28vEjLjnZ9JO/X8UOv2kLP3Cs2ZwoBfBy0ipEQnl3ZbPU5suoBPIk7T3\nDhdP0qZtRYedc3SCvCTqylMSDd1N6dInFi6btZ0wdItjnDygkpr42N1zIr2s\nAa3uoUVtF7UrcwJmLLwUi+GEmDpiPhVfcN2+bObU84dhuUy+ZEetLbOgedjy\nqs49\r\n=hbDh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFUaRaIpa9YNk8GNtxoGzENKQpLhwXv2XkqWCX4tNsgDAiBmWK6ggYsiqT1IWt4Fs3utDD1f4Ft64fe3AvnG+yMj/Q=="}]},"maintainers":[{"email":"npm@services.hurshal.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"gerrymibernardo@gmail.com","name":"gerrymi"},{"email":"kalwyn+npmci@goodrx.com","name":"heydoctor-ci"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"rjames@goodrx.com","name":"rosaliejames"},{"email":"schlegz76@gmail.com","name":"schlegz"}],"_npmUser":{"name":"heydoctor-ci","email":"kalwyn+npmci@goodrx.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_3.6.14_1590623584916_0.32252853513751756"},"_hasShrinkwrap":false},"0.0.0-3fb4426":{"name":"heydoctor-js","version":"0.0.0-3fb4426","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"https://github.com/sappira-inc/heydoctor-js"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'yarn build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"yarn docs:build && yarn docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"4.0.2","@types/jest":"^24.0.23","@types/node":"^13.13.5","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3","tslib":"^1.11.2"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^25.4.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^2.0.3","npm-run-all":"4.1.3","parcel-bundler":"^1.12.4","prettier":"2.0.5","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^6.1.2","tslint-config-prettier":"^1.18.0","tslint-plugin-prettier":"^2.3.0","typedoc":"^0.17.6","typescript":"^3.8.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"readmeFilename":"README.md","readme":"# HeyDoctor Javascript SDK\n\nThe HeyDoctor Javascript library provides convenient access to the HeyDoctor API for applications written in JavaScript.\n\n## Documentation\nCheck out our [auto-generated docs](https://sappira-inc.github.io/heydoctor-js/) using [TypeDoc](http://typedoc.org).\n\n## Installation\nYou can install `heydoctor-js` using your favorite package manager.\n\n```sh\n$ yarn add heydoctor-js\n# or\n$ npm install --save heydoctor-js\n```\n\n## Usage\nYou'll first need to create a new client resource. If using the HeyDoctor SaaS platform, you'll need to provide the API key located in the EMR. The client contains the http module that will communicate with the HeyDoctor API, so we'll pass this client to the other resources you'll need.\n\n### Creating the client\n\n```js\nimport { Client, Environments, Visits, OAuth } from 'heydoctor-js';\n\n// The client will hold all configuration options and the http module\n// that communicates to our server\nconst client = new Client({\n  env: Environments.SANDBOX | Environments.PRODUCTION, // determines the API and OAuth endpoints\n});\n\n// Create two resources passing both the client we've just created\n// ** Some resources also take an optional options object as a second argument\nconst visits = new Visits(client;\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n  scope: '*',\n});\n```\n\n### Subscribing to HTTP events\nThe HeyDoctor client also doubles as an event emitter. The client extends from [Mitt](https://github.com/developit/mitt) and complies with standard EventEmitter events.\n\n```js\ninterface HttpCallback {\n  statusCode: number;\n  data: any;\n}\n\nconst client = new Client();\n\nclient.on('http:success', (data: HttpCallback) => void);\nclient.on('http:error', (data: HttpCallback) => void);\n```\n\n### Authorizing via OAuth\n\nPartnering clients will use the HeyDoctor JS SDK to create or link a HeyDoctor account. HeyDoctor conforms to the existing [OAuth2 protocol](https://oauth.net/2/). In the case that HeyDoctor already has the provided email on file, the SDK will open a dialog box, akin to Facebook or Google login, prompting the user to confirm their existing password. In all successful cases, an access token and refresh token will be returned. The resulting payload is outlined below.\n\nWe recommend to store the longstanding refresh token in a persisted data store. You’ll use this token, along with your unique client id and secret key to regenerate short lived access tokens used to authenticate requests to the HeyDoctor API. For security measures, the access token has a one hour TTL, after which the token will expire and new access token will need to be generated.\n\nUpon successful authorization, all subsequent SDK calls will be authenticated using the access token. The access token can also be utilized server-side to call our API directly.\n\n#### Example\n\n```js\nimport { Client, OAuth } from 'heydoctor-js';\n\nconst client = new Client({\n  env: 'production',\n});\n\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n});\n\n// First attempt to create a new HeyDoctor user silently. The method will throw an error in the case that the email already exists,\n// in which case you have the opportunity to present an unobtrusive dialog for the user to confirm their existing HeyDoctor password.\ntry {\n  const { accessToken, refreshToken } = await oauth.createUser({\n    email: 'frank@heydoctor.com',\n    firstName: 'Frank',\n    lastName: 'Sinatra',\n    dob: '1915-12-12',\n    gender: 'male',\n    addressLine1: '123 Somewhere Street',\n    city: 'Hoboken',\n    state: 'NJ',\n    zip: '07030',\n  });\n} catch (error) {\n  if (error.code === 'account_exists') {\n    const { accessToken, refreshToken } = await oauth.launchWebAuthFlow('frank@heydoctor.com');\n  }\n}\n\n// Now that the client has been authorized, we can call call other methods available in the SDK\nconst visit = await visits.create({\n  code: 'hair-loss',\n});\n\n// Excellent, we've just created our first visit. Now, we can upload photos to that visit.\nawait visit.uploadPhoto('photoId1234', 'base64photostring');\n```\n","licenseText":" MIT Licence\n\n Copyright (c) 2016-present, Kyle Alwyn.\n\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n\n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n","_id":"heydoctor-js@0.0.0-3fb4426","dist":{"shasum":"f4358cdd513435192e081db394fe6aaea83184d0","integrity":"sha512-IBIT0TKXF5pACtgambUuAw+/TWoFOKMf/dgLPM+NLYRx7BhMmw0v6F7/9KLu9vKhqFWjxS/xTBIlgst6FqxpSw==","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-0.0.0-3fb4426.tgz","fileCount":48,"unpackedSize":146633,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe49L0CRA9TVsSAnZWagAAXL8P/007wNqYtBnid7E5Bf/w\nwWnGmbwZDx+Y8w/Qrvczs/3ZsdRFCghx7G8DGcU/L8AIz5HbAp6EuGM8Hhaq\nIoEWcVhflI5KonVT1XdQIhAVXscMDs79QBWX3a40XlUXKGDv5778HzZ402Ze\n4hOzRP8nHeRaUMbjZqGztQ3mdR4pChZpM0KNMDeoj/oeGnDt6C9fdP0Ns/W9\nOaZT/uHUMtCtxxmcKum5DXN0gt93aQBcfesGI6ZekyVc0xmZ4G2Qmp0EoaPi\nvBhg4OhyC+iDeOygqOuMTNIbPdVB7O/X1xx2zEiMB1fH29f1cJr2GTxja5u2\nBXyh5Kl787mWdGXXumnV9sGDEvAkKFrzbtgWsaLD/kaJ1aLUsKz0zd85UP/n\nrdTxNe0df80lNewl1qUeTy8IQNHqUoJBl8SE77AEIcvXtOLLbmrQLeSim+MJ\nrnvsRRUfj6biwbdb7iQtWmONrgvid1QBf1Csm0vHvcHcUKeG2Qp6bmuYku13\n321TbJS1eXeoAqqG9a4rIMBnagdNqhJyza2JvpnFQ272QB81s+6RhTflaVTb\nI48BKfIB1hQEybavEwLPa/x3y0Q+xGWHmAZEdqWdJWcAG2KXqqMk8WsVaGLI\nfDJv8ao8dvQLKLVZ8PCj+RtFy5QlaXX0uWxEgL0a2+vMxPJQwoU2I67DhodW\nOzBh\r\n=zI5M\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDqWhqPvIJ+w7uf/DH2Uh0+d3VwUDuE2HGVee/xD9sffAIgT/5HOEhYlk6ApnZhq8HoO7S8EW7Dpb8zYzNwDLXi2ko="}]},"maintainers":[{"email":"npm@services.hurshal.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"gerrymibernardo@gmail.com","name":"gerrymi"},{"email":"kalwyn+npmci@goodrx.com","name":"heydoctor-ci"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"rjames@goodrx.com","name":"rosaliejames"},{"email":"schlegz76@gmail.com","name":"schlegz"}],"_npmUser":{"name":"heydoctor-ci","email":"kalwyn+npmci@goodrx.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_0.0.0-3fb4426_1591988979508_0.44688826728334186"},"_hasShrinkwrap":false},"3.6.15":{"name":"heydoctor-js","version":"3.6.15","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"https://github.com/sappira-inc/heydoctor-js"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'yarn build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"yarn docs:build && yarn docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"4.0.2","@types/jest":"^24.0.23","@types/node":"^13.13.5","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3","tslib":"^1.11.2"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^25.4.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^2.0.3","npm-run-all":"4.1.3","parcel-bundler":"^1.12.4","prettier":"2.0.5","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^6.1.2","tslint-config-prettier":"^1.18.0","tslint-plugin-prettier":"^2.3.0","typedoc":"^0.17.6","typescript":"^3.8.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"licenseText":" MIT Licence\n\n Copyright (c) 2016-present, Kyle Alwyn.\n\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n\n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n","_id":"heydoctor-js@3.6.15","dist":{"shasum":"675933bf02823c161f1b39bba8a81196ee4731c9","integrity":"sha512-0A2FraAcPl1Oj5F/wbbQZ+bUR+s1m+bvVJf0Hn+B8ou7/PZT5aCRgukeqlN0FwgQi0fYCviSyhroqgo56QFtTg==","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-3.6.15.tgz","fileCount":48,"unpackedSize":146674,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe49fYCRA9TVsSAnZWagAALmcP/3YRpv2PtmKoApbRO/WC\nQ5AMYbHGVEE4TR8yS2frBxKGpUEGJUFVbCdB7Aa02ivfZwugXLvBY8WGz7Pb\nrIrvL3jo7DgKbbVljIFZtOqVXBtxTOGc32GUCek+dMuXbfHN0yXFVO/sZ47D\n28OC5F8hhOEB+Nf7kKmHFg3SoZeUSuNCt054xhuY+M1wpgwAC26E9CoFKjth\nMMrrLUDMd2rwQ4m4fbnQXqWEpE/1ab2eCy0Q7/GALKKaRfTjVOST1ief2MzI\nwVeVa1nnpvJfKE4lxtDK2k+WS75jBhaE6teaePK1QshvcXBYui1heOBpNZDH\nfoSaDuDvDDugpy5yQlX3MnOiZMkxwrFjhXMKkaCEb+XhXWmCYfzd6MbjnKIg\nIOJpYTPKEyxNiM9dYphhep8HKoLNr2sgxM94yAYJGyOL8RcixgBtRsdux3hU\nV3XHGw05QFjY3a7anOHn1tPPpPVADILKGofvdzSx9gYc5CFKLNxMsqSu353Z\n98IwtSppOn400wqdKwBo4o+xZyQoocywM4bNrwrr1LxMnQdjNfja/AwCPU+E\noBSEIoa6xSKgrzS+wBWHgz9oDCSucvSn+XOd246/AYFtfKkCpOoX8uKwMBEw\nIRwEsJ+3TXuoMkQOfHMJKdXt8EQm+z3tNcV8kG4q4tgXpE2aBxDUZA8cRXI/\n8ebp\r\n=1vy5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDJCLYl37aXuoeoC13PaAg2FnYlzuCBKwIYWge9hKEaZgIhAOT+QRyayaI80Fcxj+MLacxw8yk/9jOlsetMQy/kBAmB"}]},"maintainers":[{"email":"npm@services.hurshal.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"gerrymibernardo@gmail.com","name":"gerrymi"},{"email":"kalwyn+npmci@goodrx.com","name":"heydoctor-ci"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"rjames@goodrx.com","name":"rosaliejames"},{"email":"schlegz76@gmail.com","name":"schlegz"}],"_npmUser":{"name":"heydoctor-ci","email":"kalwyn+npmci@goodrx.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_3.6.15_1591990231912_0.874214269487702"},"_hasShrinkwrap":false},"0.0.0-ce1b23d":{"name":"heydoctor-js","version":"0.0.0-ce1b23d","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"https://github.com/sappira-inc/heydoctor-js"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'yarn build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"yarn docs:build && yarn docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"4.0.2","@types/jest":"^24.0.23","@types/node":"^13.13.5","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3","tslib":"^1.11.2"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^25.4.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^2.0.3","npm-run-all":"4.1.3","parcel-bundler":"^1.12.4","prettier":"2.0.5","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^6.1.2","tslint-config-prettier":"^1.18.0","tslint-plugin-prettier":"^2.3.0","typedoc":"^0.17.6","typescript":"^3.8.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"readmeFilename":"README.md","readme":"# HeyDoctor Javascript SDK\n\nThe HeyDoctor Javascript library provides convenient access to the HeyDoctor API for applications written in JavaScript.\n\n## Documentation\nCheck out our [auto-generated docs](https://sappira-inc.github.io/heydoctor-js/) using [TypeDoc](http://typedoc.org).\n\n## Installation\nYou can install `heydoctor-js` using your favorite package manager.\n\n```sh\n$ yarn add heydoctor-js\n# or\n$ npm install --save heydoctor-js\n```\n\n## Usage\nYou'll first need to create a new client resource. If using the HeyDoctor SaaS platform, you'll need to provide the API key located in the EMR. The client contains the http module that will communicate with the HeyDoctor API, so we'll pass this client to the other resources you'll need.\n\n### Creating the client\n\n```js\nimport { Client, Environments, Visits, OAuth } from 'heydoctor-js';\n\n// The client will hold all configuration options and the http module\n// that communicates to our server\nconst client = new Client({\n  env: Environments.SANDBOX | Environments.PRODUCTION, // determines the API and OAuth endpoints\n});\n\n// Create two resources passing both the client we've just created\n// ** Some resources also take an optional options object as a second argument\nconst visits = new Visits(client;\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n  scope: '*',\n});\n```\n\n### Subscribing to HTTP events\nThe HeyDoctor client also doubles as an event emitter. The client extends from [Mitt](https://github.com/developit/mitt) and complies with standard EventEmitter events.\n\n```js\ninterface HttpCallback {\n  statusCode: number;\n  data: any;\n}\n\nconst client = new Client();\n\nclient.on('http:success', (data: HttpCallback) => void);\nclient.on('http:error', (data: HttpCallback) => void);\n```\n\n### Authorizing via OAuth\n\nPartnering clients will use the HeyDoctor JS SDK to create or link a HeyDoctor account. HeyDoctor conforms to the existing [OAuth2 protocol](https://oauth.net/2/). In the case that HeyDoctor already has the provided email on file, the SDK will open a dialog box, akin to Facebook or Google login, prompting the user to confirm their existing password. In all successful cases, an access token and refresh token will be returned. The resulting payload is outlined below.\n\nWe recommend to store the longstanding refresh token in a persisted data store. You’ll use this token, along with your unique client id and secret key to regenerate short lived access tokens used to authenticate requests to the HeyDoctor API. For security measures, the access token has a one hour TTL, after which the token will expire and new access token will need to be generated.\n\nUpon successful authorization, all subsequent SDK calls will be authenticated using the access token. The access token can also be utilized server-side to call our API directly.\n\n#### Example\n\n```js\nimport { Client, OAuth } from 'heydoctor-js';\n\nconst client = new Client({\n  env: 'production',\n});\n\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n});\n\n// First attempt to create a new HeyDoctor user silently. The method will throw an error in the case that the email already exists,\n// in which case you have the opportunity to present an unobtrusive dialog for the user to confirm their existing HeyDoctor password.\ntry {\n  const { accessToken, refreshToken } = await oauth.createUser({\n    email: 'frank@heydoctor.com',\n    firstName: 'Frank',\n    lastName: 'Sinatra',\n    dob: '1915-12-12',\n    gender: 'male',\n    addressLine1: '123 Somewhere Street',\n    city: 'Hoboken',\n    state: 'NJ',\n    zip: '07030',\n  });\n} catch (error) {\n  if (error.code === 'account_exists') {\n    const { accessToken, refreshToken } = await oauth.launchWebAuthFlow('frank@heydoctor.com');\n  }\n}\n\n// Now that the client has been authorized, we can call call other methods available in the SDK\nconst visit = await visits.create({\n  code: 'hair-loss',\n});\n\n// Excellent, we've just created our first visit. Now, we can upload photos to that visit.\nawait visit.uploadPhoto('photoId1234', 'base64photostring');\n```\n","licenseText":" MIT Licence\n\n Copyright (c) 2016-present, Kyle Alwyn.\n\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n\n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n","_id":"heydoctor-js@0.0.0-ce1b23d","dist":{"shasum":"1067a0a8f81cd959d8e3184eaede2b46f46de886","integrity":"sha512-DtPzADQSDE+w9/d9jUL9Sf8Xt2pPpbpo+vm6uHI7iImMD52yRO4fM4+pxzXBgY1I0A8Q1JSVbqz3Ic0F+mZnZw==","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-0.0.0-ce1b23d.tgz","fileCount":48,"unpackedSize":149276,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe9OmVCRA9TVsSAnZWagAASi4QAKFAC7kgrVObU0i65G4m\nnCIf4AbFryeIvMgdK0sWCEeo83LawXVsjdcDsT5gajLnYzu7qBmIoM9DY0M4\n90JOElziuoaiNrSXspsyy+XY/zDNG79/BDuvg0ffMm082ysyEdQ/f2Ggf5OI\nm+TQUw26uNc5UHEDfvEdeJ6aNgc9P5ZhnHnU0LMc8EMWbK8Q/7YvaO9QMfbd\ngCLu/MZhFrRM5gIHbvwmm17zSiXJjWwTUvQXIAT44wWs8Xn2W8+EXrd4KiQ6\nxDaSve5SsAwr+WTfKoa1n4sLJwPJPkAv8ddjPOqR7bufoNPk4UYvaVTQgjOc\nx6XjmXNmoYth8Pt50wLEJ0CWDJDmoA0Cj/mHFgUC4oiNemTNNt2mlOhfTIQ4\nlsROYAT+y/V57f8flR55EbNMwEDppYCfpTqy7ACx72a8KQ5lyu3I5CN98lSP\nKDW3g/eoJNSKtlx5UxHgV19CGFiEh//kt9Z5wxkwmcjupifNCOVCrzLN5mOs\n70ZYRKEHIwmkuQU3tjslGR5AGNtfIohd9NjYUiion08WUiaWpExaGaOeB33A\nVxMSlFCbnq4j2ONaysAJZXYFxEan1awnnyd6FeiiQlvi5Orr5rKhzKjj6p5N\nIyrqoQgJSvGRNsbp5c50DyAboQ3XMHm7uyRFGq0QGF1F7Rf+fxrg9tJIhKUS\n1yqM\r\n=YxsT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDXT+EbRyavVJK9gAtwgZcDifi16MAeiu+VrMOevuByrgIgIbvJQ/Ge8BRmlYOGTXKqJt3a4krToljr4wOXJGa+Mi4="}]},"maintainers":[{"email":"npm@services.hurshal.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"gerrymibernardo@gmail.com","name":"gerrymi"},{"email":"kalwyn+npmci@goodrx.com","name":"heydoctor-ci"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"rjames@goodrx.com","name":"rosaliejames"},{"email":"schlegz76@gmail.com","name":"schlegz"},{"email":"weston.jossey@gmail.com","name":"wjossey"}],"_npmUser":{"name":"heydoctor-ci","email":"kalwyn+npmci@goodrx.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_0.0.0-ce1b23d_1593108885259_0.38179556959695526"},"_hasShrinkwrap":false},"3.7.0":{"name":"heydoctor-js","version":"3.7.0","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"https://github.com/sappira-inc/heydoctor-js"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'yarn build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"yarn docs:build && yarn docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"4.0.2","@types/jest":"^24.0.23","@types/node":"^13.13.5","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3","tslib":"^1.11.2"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^25.4.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^2.0.3","npm-run-all":"4.1.3","parcel-bundler":"^1.12.4","prettier":"2.0.5","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^6.1.2","tslint-config-prettier":"^1.18.0","tslint-plugin-prettier":"^2.3.0","typedoc":"^0.17.6","typescript":"^3.8.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"licenseText":" MIT Licence\n\n Copyright (c) 2016-present, Kyle Alwyn.\n\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n\n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n","_id":"heydoctor-js@3.7.0","dist":{"shasum":"4e74f4472022a98b593d6f212aacfc0054d64384","integrity":"sha512-24hVfBgww/FdmqS0uE/jnJLnnMiTCk4IIw51rpJUR3exDVVIht+IBsyXX5faEOXKetmnbuxHkQm74ExPyeW0sA==","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-3.7.0.tgz","fileCount":48,"unpackedSize":149494,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe9OvmCRA9TVsSAnZWagAAZ88QAJdYizblZm78M1hQ41Vs\nU5P1RbtuZrFmCud4OuxE3zjLUaYruMPsKfQmioegPDWL9H9F9HB4J69Fy/i3\nFF1i2N3F1ww417A6hCf3ynwrEn5RwnyVcxbBEZh6CWbF0w49yXqfP9tycPMg\nxtbstbzZfNMyjQip+/Ys3VySnMzKswOR6uOGr/WsusDcw3q623PiIuF0tZQ1\nHUa6uZsrOLg/SOJ9TRmbqQBHMgsSXO9+Y2pCKCvzS0uHeYwSI2pE5L8tqvSb\nDXfsAw7Ttgx9xopYMR1UvRyzf04HmgVBqszMA+549xpRRzMU2U1bItkjUiwM\nhv5OXT65YWGAvuuwuB6g+HpAEUetwLSF+4lLps9uuSL02EbuqAxAehT/KHZS\nE+9s9VU+PsPWYwoD4W+3fIWgD3k2BoDXhwIURQam5jH4WkfjGD9VHOq/55eS\nbcyToDGSNYNapnf23NboUyCKzynnJny57zZqVh+Sqm5B1Kg5Ie00vVgXCClR\nc2n0EQeywVFF3HkK9r0lXYUxQxp4QWlb9T/nSxzdDwIKXbrZo/NapOqHTmuV\nfSJgMfHr/wfotXuy9t4E1AYj45hcA/5fQeequYC+X+Hhlu5QUUsy3zhx908y\ny1jVYIFF2GVWsHTm44rWsFyY5yue62kGtSlJIsBXQbfxR+8Pi8MC+GArQMTZ\n3uT3\r\n=y7IC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAWgg+McZaqe4993XwXSjU8rSAvhXNFsv0wXnfA/48c5AiBNHL6ZwvRhlM0lKRyL0bq7+eCRvGuzQatcMrUOhcKo8Q=="}]},"maintainers":[{"email":"npm@services.hurshal.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"gerrymibernardo@gmail.com","name":"gerrymi"},{"email":"kalwyn+npmci@goodrx.com","name":"heydoctor-ci"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"rjames@goodrx.com","name":"rosaliejames"},{"email":"schlegz76@gmail.com","name":"schlegz"},{"email":"weston.jossey@gmail.com","name":"wjossey"}],"_npmUser":{"name":"heydoctor-ci","email":"kalwyn+npmci@goodrx.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_3.7.0_1593109477570_0.2204869417659865"},"_hasShrinkwrap":false},"0.0.0-22fc355":{"name":"heydoctor-js","version":"0.0.0-22fc355","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"https://github.com/sappira-inc/heydoctor-js"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'yarn build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"yarn docs:build && yarn docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"4.0.2","@types/jest":"^24.0.23","@types/node":"^13.13.5","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3","tslib":"^1.11.2"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^25.4.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^2.0.3","npm-run-all":"4.1.3","parcel-bundler":"^1.12.4","prettier":"2.0.5","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^6.1.2","tslint-config-prettier":"^1.18.0","tslint-plugin-prettier":"^2.3.0","typedoc":"^0.17.6","typescript":"^3.8.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"readmeFilename":"README.md","readme":"# HeyDoctor Javascript SDK\n\nThe HeyDoctor Javascript library provides convenient access to the HeyDoctor API for applications written in JavaScript.\n\n## Documentation\nCheck out our [auto-generated docs](https://sappira-inc.github.io/heydoctor-js/) using [TypeDoc](http://typedoc.org).\n\n## Installation\nYou can install `heydoctor-js` using your favorite package manager.\n\n```sh\n$ yarn add heydoctor-js\n# or\n$ npm install --save heydoctor-js\n```\n\n## Usage\nYou'll first need to create a new client resource. If using the HeyDoctor SaaS platform, you'll need to provide the API key located in the EMR. The client contains the http module that will communicate with the HeyDoctor API, so we'll pass this client to the other resources you'll need.\n\n### Creating the client\n\n```js\nimport { Client, Environments, Visits, OAuth } from 'heydoctor-js';\n\n// The client will hold all configuration options and the http module\n// that communicates to our server\nconst client = new Client({\n  env: Environments.SANDBOX | Environments.PRODUCTION, // determines the API and OAuth endpoints\n});\n\n// Create two resources passing both the client we've just created\n// ** Some resources also take an optional options object as a second argument\nconst visits = new Visits(client;\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n  scope: '*',\n});\n```\n\n### Subscribing to HTTP events\nThe HeyDoctor client also doubles as an event emitter. The client extends from [Mitt](https://github.com/developit/mitt) and complies with standard EventEmitter events.\n\n```js\ninterface HttpCallback {\n  statusCode: number;\n  data: any;\n}\n\nconst client = new Client();\n\nclient.on('http:success', (data: HttpCallback) => void);\nclient.on('http:error', (data: HttpCallback) => void);\n```\n\n### Authorizing via OAuth\n\nPartnering clients will use the HeyDoctor JS SDK to create or link a HeyDoctor account. HeyDoctor conforms to the existing [OAuth2 protocol](https://oauth.net/2/). In the case that HeyDoctor already has the provided email on file, the SDK will open a dialog box, akin to Facebook or Google login, prompting the user to confirm their existing password. In all successful cases, an access token and refresh token will be returned. The resulting payload is outlined below.\n\nWe recommend to store the longstanding refresh token in a persisted data store. You’ll use this token, along with your unique client id and secret key to regenerate short lived access tokens used to authenticate requests to the HeyDoctor API. For security measures, the access token has a one hour TTL, after which the token will expire and new access token will need to be generated.\n\nUpon successful authorization, all subsequent SDK calls will be authenticated using the access token. The access token can also be utilized server-side to call our API directly.\n\n#### Example\n\n```js\nimport { Client, OAuth } from 'heydoctor-js';\n\nconst client = new Client({\n  env: 'production',\n});\n\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n});\n\n// First attempt to create a new HeyDoctor user silently. The method will throw an error in the case that the email already exists,\n// in which case you have the opportunity to present an unobtrusive dialog for the user to confirm their existing HeyDoctor password.\ntry {\n  const { accessToken, refreshToken } = await oauth.createUser({\n    email: 'frank@heydoctor.com',\n    firstName: 'Frank',\n    lastName: 'Sinatra',\n    dob: '1915-12-12',\n    gender: 'male',\n    addressLine1: '123 Somewhere Street',\n    city: 'Hoboken',\n    state: 'NJ',\n    zip: '07030',\n  });\n} catch (error) {\n  if (error.code === 'account_exists') {\n    const { accessToken, refreshToken } = await oauth.launchWebAuthFlow('frank@heydoctor.com');\n  }\n}\n\n// Now that the client has been authorized, we can call call other methods available in the SDK\nconst visit = await visits.create({\n  code: 'hair-loss',\n});\n\n// Excellent, we've just created our first visit. Now, we can upload photos to that visit.\nawait visit.uploadPhoto('photoId1234', 'base64photostring');\n```\n","licenseText":" MIT Licence\n\n Copyright (c) 2016-present, Kyle Alwyn.\n\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n\n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n","_id":"heydoctor-js@0.0.0-22fc355","dist":{"shasum":"6fe2038eb2952b24753a0ddbf14f7202545889a0","integrity":"sha512-sDNjoANSCd7/CBmCW8zsvaynmwXNvBfjVB+rGuRP7FnBRCqlslHAy6VqQz7alZ39bfG4tD/laegFFLyIAR4xQA==","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-0.0.0-22fc355.tgz","fileCount":48,"unpackedSize":149523,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJe+jtwCRA9TVsSAnZWagAAA04P/RLrStOa453sIcVjTJ/Q\nJSuDOwgJ7vgvkJlZJeRsFTJsE9QJpEN5dJKePpz/q4dh5KWP/9WsqaNLd2vU\ncBVLvm8Nr79Cx8a+UILewlHscySnbVwNOaJqe+yDtbgMFHlD8zuKz7G8bxXX\n6kfZWeUiS+YpxbwL9yP9jKWlofci+YOftPHc8ZLjj+ogwHBhAZefc+X03qKI\nZzXJABiwmMmS8sR5VBwBFrWjkL8/hYEWlGR0MI09r4epSCkBTFvY4e70xWsw\nSdIHeJp9rL2btd6f1IeFKIwlx8755/xhm/NSSYPpt8BXAphwn8zISNMRNNMO\n/f86kuz4qqU9NKlTAHHFaEInb1xc5g4PDrQUMeALomj2J6T61x3gbpLGgD9U\nSqusfYk7W51bTEZw+k8ajekIp5MvmYMUuZzj3JSQdU58Ls2khrvEVq8haJYF\nHYydSuwaXvmbm0d4Ltt8cdo4I+wnTPS1sMgVAezetF1ZYTqKbslMYcIV52n9\n/GFptsfnh2+pcOJyGi0R//xG/6D2hdmQOqG1Ri/DWDt4BwcfJ60BQMEn/Ct7\nQnbR6HKlTGh+G9i2OANMpAM/eQzX0bcCShGGtwQl0FmNExKHkHpBTvkbwc91\nKIdaGDZ++fDVcAjlDc51zDsGD07Pjo6JSkhxsURr/acibaX6i/nxpcj+qkP0\nezGu\r\n=C5cU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBpPcbzYYNvd3r/lnl9OvG4EHmElEhUS8/L19XQLMY8NAiEA907V/nfTrA3U9IaHdEFRGg6VD9gaDqdLrl5AkoEVZow="}]},"maintainers":[{"email":"npm@services.hurshal.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"gerrymibernardo@gmail.com","name":"gerrymi"},{"email":"kalwyn+npmci@goodrx.com","name":"heydoctor-ci"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"rjames@goodrx.com","name":"rosaliejames"},{"email":"schlegz76@gmail.com","name":"schlegz"},{"email":"weston.jossey@gmail.com","name":"wjossey"}],"_npmUser":{"name":"heydoctor-ci","email":"kalwyn+npmci@goodrx.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_0.0.0-22fc355_1593457519666_0.1457662736359988"},"_hasShrinkwrap":false},"0.0.0-ccf0dea":{"name":"heydoctor-js","version":"0.0.0-ccf0dea","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"https://github.com/sappira-inc/heydoctor-js"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'yarn build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"yarn docs:build && yarn docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"4.0.2","@types/jest":"^24.0.23","@types/node":"^13.13.5","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3","tslib":"^1.11.2"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^25.4.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^2.0.3","npm-run-all":"4.1.3","parcel-bundler":"^1.12.4","prettier":"2.0.5","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"8.0.1","ts-jest":"^24.1.0","tslint":"^6.1.2","tslint-config-prettier":"^1.18.0","tslint-plugin-prettier":"^2.3.0","typedoc":"^0.17.6","typescript":"^3.8.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"readmeFilename":"README.md","readme":"# HeyDoctor Javascript SDK\n\nThe HeyDoctor Javascript library provides convenient access to the HeyDoctor API for applications written in JavaScript.\n\n## Documentation\nCheck out our [auto-generated docs](https://sappira-inc.github.io/heydoctor-js/) using [TypeDoc](http://typedoc.org).\n\n## Installation\nYou can install `heydoctor-js` using your favorite package manager.\n\n```sh\n$ yarn add heydoctor-js\n# or\n$ npm install --save heydoctor-js\n```\n\n## Usage\nYou'll first need to create a new client resource. If using the HeyDoctor SaaS platform, you'll need to provide the API key located in the EMR. The client contains the http module that will communicate with the HeyDoctor API, so we'll pass this client to the other resources you'll need.\n\n### Creating the client\n\n```js\nimport { Client, Environments, Visits, OAuth } from 'heydoctor-js';\n\n// The client will hold all configuration options and the http module\n// that communicates to our server\nconst client = new Client({\n  env: Environments.SANDBOX | Environments.PRODUCTION, // determines the API and OAuth endpoints\n});\n\n// Create two resources passing both the client we've just created\n// ** Some resources also take an optional options object as a second argument\nconst visits = new Visits(client;\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n  scope: '*',\n});\n```\n\n### Subscribing to HTTP events\nThe HeyDoctor client also doubles as an event emitter. The client extends from [Mitt](https://github.com/developit/mitt) and complies with standard EventEmitter events.\n\n```js\ninterface HttpCallback {\n  statusCode: number;\n  data: any;\n}\n\nconst client = new Client();\n\nclient.on('http:success', (data: HttpCallback) => void);\nclient.on('http:error', (data: HttpCallback) => void);\n```\n\n### Authorizing via OAuth\n\nPartnering clients will use the HeyDoctor JS SDK to create or link a HeyDoctor account. HeyDoctor conforms to the existing [OAuth2 protocol](https://oauth.net/2/). In the case that HeyDoctor already has the provided email on file, the SDK will open a dialog box, akin to Facebook or Google login, prompting the user to confirm their existing password. In all successful cases, an access token and refresh token will be returned. The resulting payload is outlined below.\n\nWe recommend to store the longstanding refresh token in a persisted data store. You’ll use this token, along with your unique client id and secret key to regenerate short lived access tokens used to authenticate requests to the HeyDoctor API. For security measures, the access token has a one hour TTL, after which the token will expire and new access token will need to be generated.\n\nUpon successful authorization, all subsequent SDK calls will be authenticated using the access token. The access token can also be utilized server-side to call our API directly.\n\n#### Example\n\n```js\nimport { Client, OAuth } from 'heydoctor-js';\n\nconst client = new Client({\n  env: 'production',\n});\n\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n});\n\n// First attempt to create a new HeyDoctor user silently. The method will throw an error in the case that the email already exists,\n// in which case you have the opportunity to present an unobtrusive dialog for the user to confirm their existing HeyDoctor password.\ntry {\n  const { accessToken, refreshToken } = await oauth.createUser({\n    email: 'frank@heydoctor.com',\n    firstName: 'Frank',\n    lastName: 'Sinatra',\n    dob: '1915-12-12',\n    gender: 'male',\n    addressLine1: '123 Somewhere Street',\n    city: 'Hoboken',\n    state: 'NJ',\n    zip: '07030',\n  });\n} catch (error) {\n  if (error.code === 'account_exists') {\n    const { accessToken, refreshToken } = await oauth.launchWebAuthFlow('frank@heydoctor.com');\n  }\n}\n\n// Now that the client has been authorized, we can call call other methods available in the SDK\nconst visit = await visits.create({\n  code: 'hair-loss',\n});\n\n// Excellent, we've just created our first visit. Now, we can upload photos to that visit.\nawait visit.uploadPhoto('photoId1234', 'base64photostring');\n```\n","licenseText":" MIT Licence\n\n Copyright (c) 2016-present, Kyle Alwyn.\n\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n\n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n","_id":"heydoctor-js@0.0.0-ccf0dea","dist":{"shasum":"8f7ae5d3d2c5a7e51760723389b2bff6c11b3260","integrity":"sha512-ay1eJEzwS/hPbU/p6QYUgHH3DnSSim63L8sDejWagqGJC8fsnYkDmlY5VDR+WcBalcIBLuNNMcmcDSzCWHFXMw==","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-0.0.0-ccf0dea.tgz","fileCount":48,"unpackedSize":149502,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfDOb2CRA9TVsSAnZWagAANHkP/RXj5QYUvAU3qAxBz5kI\nhK/PhAERUCqUZ7DfGI5FcmJbZlpLX/+py7j8gFLdqSIAAKsbwDSh00DbWFeh\nO8aVa/HPQB2YdYwLCGcoIcoeDj+0pFNPrE7cqO8qIgHYpd4yI32kkw3oQlgb\nhE35J6V9sQbS97ytdvkYOv+z7wkPUPo1eAdRUDjRzSijBeihMA/YwMw+uF5B\n2cOxFdc3DB4UYdilKN60zKSNH0s9cMEX/hn35P/1SBe5xlsi1wvHU7+FhRBG\n+ViKYYoROe+WOCjrfkP4zUY2X7x7OXsCms6+c1C/SX9zOc27J2djeECmqLaY\nLXVXMe6bZzvSHu1YNOupiIKWsTWNY4NDckT4cNmaYDV3oBYzdbsfbueTbr2n\nMKeREakmYTvzxfF+GNStJ0Tj18/3hcjzQ+VTh8BBYnhQyQ3yv/FfuRS4OA74\nKz+7zXGN5J2SquX0fEtziEHD8ZgNNVIgqQIlp+aFZjogczKE7teXbWltkjpC\n5QmOSu2id8ck0iHeiE50knIOar1NNhof1LhibqtzM7zraREH85jbD6+fjTfz\njrXFFO8yyyEsKpAnEk++8Tr8GS31Ppk1Sd1RCdBej0dNYmgHbzRBvPdM0Eo8\nvGYnaOyeefIipO/2xRN5fjzN7weW41BGSqxgiBYA5QkPC3tr/Bb4hPi0kXXe\nLKka\r\n=xh1K\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGStlJbp4Y5N6ojG9oFsmOv63MdZKywCi3y9q4XwbTSYAiBtE/9A4hFONaaXQlfYAvnxuxl3trs/k+e9Cpnl/j4uOA=="}]},"maintainers":[{"email":"npm@services.hurshal.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"gerrymibernardo@gmail.com","name":"gerrymi"},{"email":"kalwyn+npmci@goodrx.com","name":"heydoctor-ci"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"rjames@goodrx.com","name":"rosaliejames"},{"email":"schlegz76@gmail.com","name":"schlegz"},{"email":"weston.jossey@gmail.com","name":"wjossey"}],"_npmUser":{"name":"heydoctor-ci","email":"kalwyn+npmci@goodrx.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_0.0.0-ccf0dea_1594681077727_0.6406243215548846"},"_hasShrinkwrap":false},"0.0.0-c84ce83":{"name":"heydoctor-js","version":"0.0.0-c84ce83","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"https://github.com/sappira-inc/heydoctor-js"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'yarn build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"yarn docs:build && yarn docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"4.0.2","@types/jest":"^24.0.23","@types/node":"^13.13.5","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.19","mitt":"^1.1.3","tslib":"^1.11.2"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^25.4.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^2.0.3","npm-run-all":"4.1.3","parcel-bundler":"^1.12.4","prettier":"2.0.5","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^6.1.2","tslint-config-prettier":"^1.18.0","tslint-plugin-prettier":"^2.3.0","typedoc":"^0.17.6","typescript":"^3.8.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"readmeFilename":"README.md","readme":"# HeyDoctor Javascript SDK\n\nThe HeyDoctor Javascript library provides convenient access to the HeyDoctor API for applications written in JavaScript.\n\n## Documentation\nCheck out our [auto-generated docs](https://sappira-inc.github.io/heydoctor-js/) using [TypeDoc](http://typedoc.org).\n\n## Installation\nYou can install `heydoctor-js` using your favorite package manager.\n\n```sh\n$ yarn add heydoctor-js\n# or\n$ npm install --save heydoctor-js\n```\n\n## Usage\nYou'll first need to create a new client resource. If using the HeyDoctor SaaS platform, you'll need to provide the API key located in the EMR. The client contains the http module that will communicate with the HeyDoctor API, so we'll pass this client to the other resources you'll need.\n\n### Creating the client\n\n```js\nimport { Client, Environments, Visits, OAuth } from 'heydoctor-js';\n\n// The client will hold all configuration options and the http module\n// that communicates to our server\nconst client = new Client({\n  env: Environments.SANDBOX | Environments.PRODUCTION, // determines the API and OAuth endpoints\n});\n\n// Create two resources passing both the client we've just created\n// ** Some resources also take an optional options object as a second argument\nconst visits = new Visits(client;\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n  scope: '*',\n});\n```\n\n### Subscribing to HTTP events\nThe HeyDoctor client also doubles as an event emitter. The client extends from [Mitt](https://github.com/developit/mitt) and complies with standard EventEmitter events.\n\n```js\ninterface HttpCallback {\n  statusCode: number;\n  data: any;\n}\n\nconst client = new Client();\n\nclient.on('http:success', (data: HttpCallback) => void);\nclient.on('http:error', (data: HttpCallback) => void);\n```\n\n### Authorizing via OAuth\n\nPartnering clients will use the HeyDoctor JS SDK to create or link a HeyDoctor account. HeyDoctor conforms to the existing [OAuth2 protocol](https://oauth.net/2/). In the case that HeyDoctor already has the provided email on file, the SDK will open a dialog box, akin to Facebook or Google login, prompting the user to confirm their existing password. In all successful cases, an access token and refresh token will be returned. The resulting payload is outlined below.\n\nWe recommend to store the longstanding refresh token in a persisted data store. You’ll use this token, along with your unique client id and secret key to regenerate short lived access tokens used to authenticate requests to the HeyDoctor API. For security measures, the access token has a one hour TTL, after which the token will expire and new access token will need to be generated.\n\nUpon successful authorization, all subsequent SDK calls will be authenticated using the access token. The access token can also be utilized server-side to call our API directly.\n\n#### Example\n\n```js\nimport { Client, OAuth } from 'heydoctor-js';\n\nconst client = new Client({\n  env: 'production',\n});\n\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n});\n\n// First attempt to create a new HeyDoctor user silently. The method will throw an error in the case that the email already exists,\n// in which case you have the opportunity to present an unobtrusive dialog for the user to confirm their existing HeyDoctor password.\ntry {\n  const { accessToken, refreshToken } = await oauth.createUser({\n    email: 'frank@heydoctor.com',\n    firstName: 'Frank',\n    lastName: 'Sinatra',\n    dob: '1915-12-12',\n    gender: 'male',\n    addressLine1: '123 Somewhere Street',\n    city: 'Hoboken',\n    state: 'NJ',\n    zip: '07030',\n  });\n} catch (error) {\n  if (error.code === 'account_exists') {\n    const { accessToken, refreshToken } = await oauth.launchWebAuthFlow('frank@heydoctor.com');\n  }\n}\n\n// Now that the client has been authorized, we can call call other methods available in the SDK\nconst visit = await visits.create({\n  code: 'hair-loss',\n});\n\n// Excellent, we've just created our first visit. Now, we can upload photos to that visit.\nawait visit.uploadPhoto('photoId1234', 'base64photostring');\n```\n","licenseText":" MIT Licence\n\n Copyright (c) 2016-present, Kyle Alwyn.\n\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n\n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n","_id":"heydoctor-js@0.0.0-c84ce83","dist":{"shasum":"2deae28fae20b2c0f6c0dc7427bef5aeeb03cde6","integrity":"sha512-oBJL2TxS+Hkakq9fbo4hfA37dZ/yUygJGmstzbylrgoGXsn+x2pci8WK/QlbhkAqH4NvqzbyxToneduX4P19BA==","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-0.0.0-c84ce83.tgz","fileCount":48,"unpackedSize":149502,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfFasECRA9TVsSAnZWagAAzBMP/1AiCCi0ePsX7Wn994Ob\nb2qptQQJtK8q0tMs0EBICu/u1pwRoOgu/QqdJrpoX9bmbUkxfbIp5z/TtXfW\nJOs5HXKazz9CIYqXbuNMct1ZLTxiF4jTtAcF7Zt4IzSHs7JC11LTQbnlaMZQ\ntDAJ4uxD2mk3nbm52lIx4+xg3TBRyjz08SDeRSv4+RDaf7TwkiIQIfEXZx7a\ncUN8fibQ1Uh7nDeecql7qZh0xIICSQ8/pncwCyoLnVbjNJNCWYIy6WEYBkHj\ngXEYblhn+bxfIYXFwPrJqChWzvHK2EyJeQKXXz8zkTazSENamc82GW0ja7tR\nVZS3t0B6xAgP+F3nYeIGcD+F51ZVpj13Sz0+ejfEP0MT6uujAkT/Ku7eWBLe\nki560KFJTfyMFemo+yQv1bymnrdtOe4bWERh51EJd963F/RmguQgRRuhJSVX\n6xYSJz4ZigpRQWvc038mfpjT7X/pN2pbCBvcEpsO5Rnk3hvFc7uRnWmhFgal\nsVEdHrD+7wf8kFfjEULI9sePI9AtC7S5vU5VsQ7rEPWoeqs+Hb6O039Irjie\nEDXZVxKtprZwPU2zYcc6qS5C/9Gew87a5TQYSBWYAZTXWZDtBt84nK46x9O6\n1zPFSCwAgYvsalRnvllCq6RQjDtpiFjPBflhbT4buLVh9Ty5076a9UI6bRaK\nFe2l\r\n=KEWx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICagobD2lWqQkQdWyAQxVhosWe4FAzotWt0kUUyNZJmsAiEAnQsQZ7pD15p72yZdOdSMdGB9WO7doN1eilu3FAtVCzk="}]},"maintainers":[{"email":"npm@services.hurshal.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"gerrymibernardo@gmail.com","name":"gerrymi"},{"email":"kalwyn+npmci@goodrx.com","name":"heydoctor-ci"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"rjames@goodrx.com","name":"rosaliejames"},{"email":"schlegz76@gmail.com","name":"schlegz"},{"email":"weston.jossey@gmail.com","name":"wjossey"}],"_npmUser":{"name":"heydoctor-ci","email":"kalwyn+npmci@goodrx.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_0.0.0-c84ce83_1595255548939_0.833470610332556"},"_hasShrinkwrap":false},"0.0.0-2daa337":{"name":"heydoctor-js","version":"0.0.0-2daa337","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"https://github.com/sappira-inc/heydoctor-js"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'yarn build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"yarn docs:build && yarn docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"4.0.2","@types/jest":"^24.0.23","@types/node":"^13.13.5","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3","tslib":"^1.11.2"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^25.4.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^2.0.3","npm-run-all":"4.1.3","parcel-bundler":"^1.12.4","prettier":"2.0.5","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^6.1.2","tslint-config-prettier":"^1.18.0","tslint-plugin-prettier":"^2.3.0","typedoc":"^0.17.6","typescript":"^3.8.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"readmeFilename":"README.md","readme":"# HeyDoctor Javascript SDK\n\nThe HeyDoctor Javascript library provides convenient access to the HeyDoctor API for applications written in JavaScript.\n\n## Documentation\nCheck out our [auto-generated docs](https://sappira-inc.github.io/heydoctor-js/) using [TypeDoc](http://typedoc.org).\n\n## Installation\nYou can install `heydoctor-js` using your favorite package manager.\n\n```sh\n$ yarn add heydoctor-js\n# or\n$ npm install --save heydoctor-js\n```\n\n## Usage\nYou'll first need to create a new client resource. If using the HeyDoctor SaaS platform, you'll need to provide the API key located in the EMR. The client contains the http module that will communicate with the HeyDoctor API, so we'll pass this client to the other resources you'll need.\n\n### Creating the client\n\n```js\nimport { Client, Environments, Visits, OAuth } from 'heydoctor-js';\n\n// The client will hold all configuration options and the http module\n// that communicates to our server\nconst client = new Client({\n  env: Environments.SANDBOX | Environments.PRODUCTION, // determines the API and OAuth endpoints\n});\n\n// Create two resources passing both the client we've just created\n// ** Some resources also take an optional options object as a second argument\nconst visits = new Visits(client;\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n  scope: '*',\n});\n```\n\n### Subscribing to HTTP events\nThe HeyDoctor client also doubles as an event emitter. The client extends from [Mitt](https://github.com/developit/mitt) and complies with standard EventEmitter events.\n\n```js\ninterface HttpCallback {\n  statusCode: number;\n  data: any;\n}\n\nconst client = new Client();\n\nclient.on('http:success', (data: HttpCallback) => void);\nclient.on('http:error', (data: HttpCallback) => void);\n```\n\n### Authorizing via OAuth\n\nPartnering clients will use the HeyDoctor JS SDK to create or link a HeyDoctor account. HeyDoctor conforms to the existing [OAuth2 protocol](https://oauth.net/2/). In the case that HeyDoctor already has the provided email on file, the SDK will open a dialog box, akin to Facebook or Google login, prompting the user to confirm their existing password. In all successful cases, an access token and refresh token will be returned. The resulting payload is outlined below.\n\nWe recommend to store the longstanding refresh token in a persisted data store. You’ll use this token, along with your unique client id and secret key to regenerate short lived access tokens used to authenticate requests to the HeyDoctor API. For security measures, the access token has a one hour TTL, after which the token will expire and new access token will need to be generated.\n\nUpon successful authorization, all subsequent SDK calls will be authenticated using the access token. The access token can also be utilized server-side to call our API directly.\n\n#### Example\n\n```js\nimport { Client, OAuth } from 'heydoctor-js';\n\nconst client = new Client({\n  env: 'production',\n});\n\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n});\n\n// First attempt to create a new HeyDoctor user silently. The method will throw an error in the case that the email already exists,\n// in which case you have the opportunity to present an unobtrusive dialog for the user to confirm their existing HeyDoctor password.\ntry {\n  const { accessToken, refreshToken } = await oauth.createUser({\n    email: 'frank@heydoctor.com',\n    firstName: 'Frank',\n    lastName: 'Sinatra',\n    dob: '1915-12-12',\n    gender: 'male',\n    addressLine1: '123 Somewhere Street',\n    city: 'Hoboken',\n    state: 'NJ',\n    zip: '07030',\n  });\n} catch (error) {\n  if (error.code === 'account_exists') {\n    const { accessToken, refreshToken } = await oauth.launchWebAuthFlow('frank@heydoctor.com');\n  }\n}\n\n// Now that the client has been authorized, we can call call other methods available in the SDK\nconst visit = await visits.create({\n  code: 'hair-loss',\n});\n\n// Excellent, we've just created our first visit. Now, we can upload photos to that visit.\nawait visit.uploadPhoto('photoId1234', 'base64photostring');\n```\n","licenseText":" MIT Licence\n\n Copyright (c) 2016-present, Kyle Alwyn.\n\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n\n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n","_id":"heydoctor-js@0.0.0-2daa337","dist":{"shasum":"0a2a6516a05e648d516ffacef9854d0c8c5ca571","integrity":"sha512-4qMTPKS+Xj6VdPn8Jpk2MxBKjxMhMKxy69lVnUIeqsy/c5nd597yIZt/U6qPVNFJoQultuI7yujcIsKXZWCwSw==","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-0.0.0-2daa337.tgz","fileCount":48,"unpackedSize":149502,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfJfqWCRA9TVsSAnZWagAAKmYP/i+m6O4O8Cuh9AkzdbU5\nDluo4AFj06fv3lAIcnVVZt5D2rJVCk3AYmUpbuDqDEP22ReYtZQZFb9ovtTT\nKqFsO9g4AuJIaXR2qlpBJ7V31Uu8sysU8eZC09o0RSr/5PxZyb3deMqrif09\ni5mVjvBazMSCjtJRtpskBpwmd64nnYEoqqScGxZhrBPi9FynNK9z3M4+1LD5\nuyrdX/wNrUyQTTZ1x0RhhSqN2VUJkBrL3Lqnd1uYXSYP2Jfpqe6TgbR8bdLD\nQj+PcDM8PlIoRurR0tL+5TCvZy2dRZ7YC6yI+4HP4SL1Ryckp5dgcg0qheO4\njHPkBNhe3gEkVkvswz/QfHER+MaTqAZKUDQarKufcD8hVAikDL4ihVoz2A43\nFlLZCaz6AihPlJp8p8Rx/G5r8JAnYgBCZqqBp8ZQoqAQZUXhJwXPYuaftdJc\nr99jctdzK5pUMqvHiA7XJz/Q8DQAtMV5mwYT3S15XRGCI8tW6B26dS8mH8qd\ng7WoPoAS8SO/XdAWI06MiynZrXX/ToKl9gvR1ex0eV7e9wIELCp/AwTlSfTp\nojvHp6UnNukUY9PmEoTz+diO02h+cUHON/TJe/Rwcbkg3Yhctorcs4CGqFC+\nyIBefL1Sy2KipZkSLJi+2KKtnoNHO52HgAPPF9eev700To82bX/XXLiIKJNr\nmvif\r\n=Vlco\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEW5lnDYLM+R+zu6bjthvEla7n6uCH8DVpn2SqrYtjgFAiEA1ofbCaT7y9ZEkeFUVjHIWMyhb4jScc4VmgbMGFQiQ+o="}]},"maintainers":[{"email":"npm@services.hurshal.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"gerrymibernardo@gmail.com","name":"gerrymi"},{"email":"kalwyn+npmci@goodrx.com","name":"heydoctor-ci"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"rjames@goodrx.com","name":"rosaliejames"},{"email":"schlegz76@gmail.com","name":"schlegz"},{"email":"weston.jossey@gmail.com","name":"wjossey"}],"_npmUser":{"name":"heydoctor-ci","email":"kalwyn+npmci@goodrx.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_0.0.0-2daa337_1596324501782_0.726842743409376"},"_hasShrinkwrap":false},"0.0.0-d7f75bf":{"name":"heydoctor-js","version":"0.0.0-d7f75bf","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"https://github.com/sappira-inc/heydoctor-js"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'yarn build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"yarn docs:build && yarn docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"4.0.2","@types/jest":"^24.0.23","@types/node":"^13.13.5","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3","tslib":"^1.11.2"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^25.4.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^2.0.3","npm-run-all":"4.1.3","parcel-bundler":"^1.12.4","prettier":"2.0.5","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"8.0.1","ts-jest":"^24.1.0","tslint":"^6.1.2","tslint-config-prettier":"^1.18.0","tslint-plugin-prettier":"^2.3.0","typedoc":"^0.17.6","typescript":"^3.8.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"readmeFilename":"README.md","readme":"# HeyDoctor Javascript SDK\n\nThe HeyDoctor Javascript library provides convenient access to the HeyDoctor API for applications written in JavaScript.\n\n## Documentation\nCheck out our [auto-generated docs](https://sappira-inc.github.io/heydoctor-js/) using [TypeDoc](http://typedoc.org).\n\n## Installation\nYou can install `heydoctor-js` using your favorite package manager.\n\n```sh\n$ yarn add heydoctor-js\n# or\n$ npm install --save heydoctor-js\n```\n\n## Usage\nYou'll first need to create a new client resource. If using the HeyDoctor SaaS platform, you'll need to provide the API key located in the EMR. The client contains the http module that will communicate with the HeyDoctor API, so we'll pass this client to the other resources you'll need.\n\n### Creating the client\n\n```js\nimport { Client, Environments, Visits, OAuth } from 'heydoctor-js';\n\n// The client will hold all configuration options and the http module\n// that communicates to our server\nconst client = new Client({\n  env: Environments.SANDBOX | Environments.PRODUCTION, // determines the API and OAuth endpoints\n});\n\n// Create two resources passing both the client we've just created\n// ** Some resources also take an optional options object as a second argument\nconst visits = new Visits(client;\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n  scope: '*',\n});\n```\n\n### Subscribing to HTTP events\nThe HeyDoctor client also doubles as an event emitter. The client extends from [Mitt](https://github.com/developit/mitt) and complies with standard EventEmitter events.\n\n```js\ninterface HttpCallback {\n  statusCode: number;\n  data: any;\n}\n\nconst client = new Client();\n\nclient.on('http:success', (data: HttpCallback) => void);\nclient.on('http:error', (data: HttpCallback) => void);\n```\n\n### Authorizing via OAuth\n\nPartnering clients will use the HeyDoctor JS SDK to create or link a HeyDoctor account. HeyDoctor conforms to the existing [OAuth2 protocol](https://oauth.net/2/). In the case that HeyDoctor already has the provided email on file, the SDK will open a dialog box, akin to Facebook or Google login, prompting the user to confirm their existing password. In all successful cases, an access token and refresh token will be returned. The resulting payload is outlined below.\n\nWe recommend to store the longstanding refresh token in a persisted data store. You’ll use this token, along with your unique client id and secret key to regenerate short lived access tokens used to authenticate requests to the HeyDoctor API. For security measures, the access token has a one hour TTL, after which the token will expire and new access token will need to be generated.\n\nUpon successful authorization, all subsequent SDK calls will be authenticated using the access token. The access token can also be utilized server-side to call our API directly.\n\n#### Example\n\n```js\nimport { Client, OAuth } from 'heydoctor-js';\n\nconst client = new Client({\n  env: 'production',\n});\n\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n});\n\n// First attempt to create a new HeyDoctor user silently. The method will throw an error in the case that the email already exists,\n// in which case you have the opportunity to present an unobtrusive dialog for the user to confirm their existing HeyDoctor password.\ntry {\n  const { accessToken, refreshToken } = await oauth.createUser({\n    email: 'frank@heydoctor.com',\n    firstName: 'Frank',\n    lastName: 'Sinatra',\n    dob: '1915-12-12',\n    gender: 'male',\n    addressLine1: '123 Somewhere Street',\n    city: 'Hoboken',\n    state: 'NJ',\n    zip: '07030',\n  });\n} catch (error) {\n  if (error.code === 'account_exists') {\n    const { accessToken, refreshToken } = await oauth.launchWebAuthFlow('frank@heydoctor.com');\n  }\n}\n\n// Now that the client has been authorized, we can call call other methods available in the SDK\nconst visit = await visits.create({\n  code: 'hair-loss',\n});\n\n// Excellent, we've just created our first visit. Now, we can upload photos to that visit.\nawait visit.uploadPhoto('photoId1234', 'base64photostring');\n```\n","licenseText":" MIT Licence\n\n Copyright (c) 2016-present, Kyle Alwyn.\n\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n\n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n","_id":"heydoctor-js@0.0.0-d7f75bf","dist":{"shasum":"93a860700abc4fb34f67f58d32e79fb5365b3978","integrity":"sha512-tIGq1UJlIZfnnK6VqXqTG5fYhuSERvhUqQgLRAAFXvJawLgZqQE3kVkgxv1qyf0bUhnTtURLRkGM/ylnjSkDgA==","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-0.0.0-d7f75bf.tgz","fileCount":48,"unpackedSize":149502,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfKDP8CRA9TVsSAnZWagAArWoP/3dR++bGa8ifQthO84z9\nkEheo+iIjIriIr/X2pOOCQQleQSEimYws009lkxFw4qf9c/+jDSu5fUTvdsK\nroGtipO4BlTZHcImdjKzJmBT6pSs/WV6NUjHr7LAUqoM7/GFQCX89Ecf5W9I\nYoiX9K64Mh2NXs3PAJUiHqV+aH3sLBi+qwNwFnWxUspqPtm/xOS8XNLM74ek\ncd+4rDIpZgCNkcC2OJPMqbDU5TfH5eLaLHrCqqEJOGULR4yWizxUyiubLQEE\n95lFvrVgvCuwmu9yunXhmC8ZiTnJz4frDBjuG4LjvZykUsP3hckbIcirTgAU\nSLHMFk3QfjMoK0pKvjBlsTRDLgyka8ZNlIhL1VIDT7Wm7Ar2J58vNHydhfeq\nW+6kgEC2M6qUsfHuEyeUVOgH2BNCplCGigoud7ayKkAsP+0YDemBFIvJcxtD\nvdzNWK6buvRUY92b2LnnO3bCt8Hf/cBota3AS84W/3+FeF+kg/0ge7GRjIWl\nowDrS3F/PDqQz0Fki1EqJS81VBjrG7sU7s+E6WPavfdx0X+XMF6/Kc9DsNku\n1NvQA3RYujX7PEFxiFaq8iiii4ZeZFOpH3kqSEDWU6MLlIGsxzYZLTl/KDbG\nhn9swIMCk+nHKQM0VC4UlJ2UZRFpzmg9SuCzRjjK6AjbAgXnySKzK2HGERzq\nBnmh\r\n=N1QX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFHR4HMAQjAbq/op1WDmAAu4AUhzIBrQ3IRS2Zc6mGT0AiEAg25UFXrkLTAnDoC6Cgug+NVgpOZsMvXPYqMZjmlu6gE="}]},"maintainers":[{"email":"npm@services.hurshal.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"gerrymibernardo@gmail.com","name":"gerrymi"},{"email":"kalwyn+npmci@goodrx.com","name":"heydoctor-ci"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"rjames@goodrx.com","name":"rosaliejames"},{"email":"schlegz76@gmail.com","name":"schlegz"},{"email":"weston.jossey@gmail.com","name":"wjossey"}],"_npmUser":{"name":"heydoctor-ci","email":"kalwyn+npmci@goodrx.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_0.0.0-d7f75bf_1596470268133_0.5007662964393496"},"_hasShrinkwrap":false},"3.7.1":{"name":"heydoctor-js","version":"3.7.1","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"https://github.com/sappira-inc/heydoctor-js"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'yarn build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"yarn docs:build && yarn docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"4.0.2","@types/jest":"^24.0.23","@types/node":"^13.13.5","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.13","mitt":"^1.1.3","tslib":"^1.11.2"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^25.4.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^2.0.3","npm-run-all":"4.1.3","parcel-bundler":"^1.12.4","prettier":"2.0.5","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^6.1.2","tslint-config-prettier":"^1.18.0","tslint-plugin-prettier":"^2.3.0","typedoc":"^0.17.6","typescript":"^3.8.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"licenseText":" MIT Licence\n\n Copyright (c) 2016-present, Kyle Alwyn.\n\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n\n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n","_id":"heydoctor-js@3.7.1","dist":{"shasum":"4498eb712ecdba904ebe88de33790e804c1e9fa1","integrity":"sha512-eWZfOfUX3kEIEHFJ+liJEuchqjd+l67S0lbYlGzmsola9gOiZQvt0747v7DLvqUqEcQ1GHFfJ7SPfqqD4wWPpw==","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-3.7.1.tgz","fileCount":48,"unpackedSize":149540,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfKDRtCRA9TVsSAnZWagAADF8P/jt31ez7JjgMc7TsiLnS\n3gBSNRWE6fAWnSXkYuRpymYGR22KGm9eStW1myINdaWe8jBLFWocTC4ZZm+u\nBp+j6jyzmqR4++Yz4VJ0XopBNOPiIMMlIsYhLprSJlqPdW8vcGe/1FpvkMpH\nm/jrDAWq9z9IFMwW7AUZ+qmWZCvxBffPZyhufGPwL/8NeDo6ALWJLAEqZ4WK\nKFLLZ9mdfzsLJG10OE0eUgbNYI9g0bEM1oWDTrSgpQz1sH5CnPg6SOm2mkj6\n7KoR2Cim8kVmWKiemk9paVFiXQyQGOOpXcztMczyfyZniKN+QnLtS1BaihGv\nD77jxC54ybf7w+CvNTXRCDLYrgRK0MDvTKD8lMP60GweUdQt7b90S16aiUHJ\nTx9n5qEaKsamwtKqcXAIAD1j+HykVBmEJAFPc83c0wRvN2DwgnakM9NuoJb4\n49Bhv6Ji8NqBndpu7+XNl0zb/wfCA9eIWGR+0DoM/scuBza9b4TKJPZrLLEv\nt5GVN0XdJ7V7pf8wkSMmCbKglyBytkTxTm5PAWZubhNW8bLGihgPfdstn7ua\nwmNEZSODmQdcHOy/mGpMNR7lpvB5hSMSyHG0Wl+Qx1qrIkA5k6Ztp1jZfX1e\nGHNXzBZFWrV/gUk2oZM1/IA1hw9xlvyajRIOd8mylRm+/cJonIRk3CWCatrs\nB0hS\r\n=kYKL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDGOX1Ew1/l+DSjcUVimX6BxkOkQxgBXQ3StijevyBQFgIhAKSPJdWW/qqkQnpwCFXpBLtT9sOSjXy+RFARHfS7j3sX"}]},"maintainers":[{"email":"npm@services.hurshal.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"gerrymibernardo@gmail.com","name":"gerrymi"},{"email":"kalwyn+npmci@goodrx.com","name":"heydoctor-ci"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"rjames@goodrx.com","name":"rosaliejames"},{"email":"schlegz76@gmail.com","name":"schlegz"},{"email":"weston.jossey@gmail.com","name":"wjossey"}],"_npmUser":{"name":"heydoctor-ci","email":"kalwyn+npmci@goodrx.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_3.7.1_1596470381185_0.5999910548833869"},"_hasShrinkwrap":false},"0.0.0-bff8045":{"name":"heydoctor-js","version":"0.0.0-bff8045","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"https://github.com/sappira-inc/heydoctor-js"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'yarn build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"yarn docs:build && yarn docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"4.0.2","@types/jest":"^24.0.23","@types/node":"^13.13.5","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.19","mitt":"^1.1.3","tslib":"^1.11.2"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^25.4.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^2.0.3","npm-run-all":"4.1.3","parcel-bundler":"^1.12.4","prettier":"2.0.5","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"8.0.1","ts-jest":"^24.1.0","tslint":"^6.1.2","tslint-config-prettier":"^1.18.0","tslint-plugin-prettier":"^2.3.0","typedoc":"^0.17.6","typescript":"^3.8.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"readmeFilename":"README.md","readme":"# HeyDoctor Javascript SDK\n\nThe HeyDoctor Javascript library provides convenient access to the HeyDoctor API for applications written in JavaScript.\n\n## Documentation\nCheck out our [auto-generated docs](https://sappira-inc.github.io/heydoctor-js/) using [TypeDoc](http://typedoc.org).\n\n## Installation\nYou can install `heydoctor-js` using your favorite package manager.\n\n```sh\n$ yarn add heydoctor-js\n# or\n$ npm install --save heydoctor-js\n```\n\n## Usage\nYou'll first need to create a new client resource. If using the HeyDoctor SaaS platform, you'll need to provide the API key located in the EMR. The client contains the http module that will communicate with the HeyDoctor API, so we'll pass this client to the other resources you'll need.\n\n### Creating the client\n\n```js\nimport { Client, Environments, Visits, OAuth } from 'heydoctor-js';\n\n// The client will hold all configuration options and the http module\n// that communicates to our server\nconst client = new Client({\n  env: Environments.SANDBOX | Environments.PRODUCTION, // determines the API and OAuth endpoints\n});\n\n// Create two resources passing both the client we've just created\n// ** Some resources also take an optional options object as a second argument\nconst visits = new Visits(client;\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n  scope: '*',\n});\n```\n\n### Subscribing to HTTP events\nThe HeyDoctor client also doubles as an event emitter. The client extends from [Mitt](https://github.com/developit/mitt) and complies with standard EventEmitter events.\n\n```js\ninterface HttpCallback {\n  statusCode: number;\n  data: any;\n}\n\nconst client = new Client();\n\nclient.on('http:success', (data: HttpCallback) => void);\nclient.on('http:error', (data: HttpCallback) => void);\n```\n\n### Authorizing via OAuth\n\nPartnering clients will use the HeyDoctor JS SDK to create or link a HeyDoctor account. HeyDoctor conforms to the existing [OAuth2 protocol](https://oauth.net/2/). In the case that HeyDoctor already has the provided email on file, the SDK will open a dialog box, akin to Facebook or Google login, prompting the user to confirm their existing password. In all successful cases, an access token and refresh token will be returned. The resulting payload is outlined below.\n\nWe recommend to store the longstanding refresh token in a persisted data store. You’ll use this token, along with your unique client id and secret key to regenerate short lived access tokens used to authenticate requests to the HeyDoctor API. For security measures, the access token has a one hour TTL, after which the token will expire and new access token will need to be generated.\n\nUpon successful authorization, all subsequent SDK calls will be authenticated using the access token. The access token can also be utilized server-side to call our API directly.\n\n#### Example\n\n```js\nimport { Client, OAuth } from 'heydoctor-js';\n\nconst client = new Client({\n  env: 'production',\n});\n\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n});\n\n// First attempt to create a new HeyDoctor user silently. The method will throw an error in the case that the email already exists,\n// in which case you have the opportunity to present an unobtrusive dialog for the user to confirm their existing HeyDoctor password.\ntry {\n  const { accessToken, refreshToken } = await oauth.createUser({\n    email: 'frank@heydoctor.com',\n    firstName: 'Frank',\n    lastName: 'Sinatra',\n    dob: '1915-12-12',\n    gender: 'male',\n    addressLine1: '123 Somewhere Street',\n    city: 'Hoboken',\n    state: 'NJ',\n    zip: '07030',\n  });\n} catch (error) {\n  if (error.code === 'account_exists') {\n    const { accessToken, refreshToken } = await oauth.launchWebAuthFlow('frank@heydoctor.com');\n  }\n}\n\n// Now that the client has been authorized, we can call call other methods available in the SDK\nconst visit = await visits.create({\n  code: 'hair-loss',\n});\n\n// Excellent, we've just created our first visit. Now, we can upload photos to that visit.\nawait visit.uploadPhoto('photoId1234', 'base64photostring');\n```\n","licenseText":" MIT Licence\n\n Copyright (c) 2016-present, Kyle Alwyn.\n\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n\n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n","_id":"heydoctor-js@0.0.0-bff8045","dist":{"shasum":"4ac74b56c524de8983c11144b4041ecddb5f9eba","integrity":"sha512-oH9+NWyUqEwJE4EPHTTrYYddFAwTsitbR/1T3SFzOg1owmdiBa/oklKCHtBctNO8E+JK/Q+tlOhnnGADEAVqyQ==","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-0.0.0-bff8045.tgz","fileCount":48,"unpackedSize":149548,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfPAELCRA9TVsSAnZWagAAF/UP/jpmbuBTVneBhM0uXINE\nHrqDYYczXycDNG+JUv34H+FcTNQfHAjurEF2NyA9ZEHFsh6XNNjA1/2zLiuf\nErApSUJFZAyJgZHPCuXUfJGvaUYFAifFC4YeY+QKidlJ1IMjMMsOpr0yplyw\n6BP/gvcosUErRmdwO6gILcZNw/LCyF5IVgnBFm/SMDxSu4gwFTRiOvO0zm6d\nFJ2mYa17eGIEEc92jnZQ+lnvwgILRO/bG76wRNxrTbf39RkMn2cnYp6dPDOO\nUa1zB2UaCXXeUxduKenlEtQSmOnsyM1qtRsucgYT9x63vq67Nw+3M//XM2Zn\nVy6tMhWnGMGHkxR/fiwNoqQDYfgoJu34SKQTjYiBQH1BYGGUAxOhUaV00sHK\nP0cLdtzDc2jmIh936Rcb9D7clDDtw1E1BMDjSEh8WZGaJOtQtt5wivPnU4vW\nmy5dkMKOZAZbvVtqo3rT4p7kpFOWy32wOiKYLBlou/3qyIjZAbGHf/GEVQWZ\nY+qTyLreht0DGeFAk2CBfPOjeikf3wS/8xbIlE9kd2PCSkT98amRR7LEYaP6\nD5Xa1q2YoLAH+Ajmqqc2BZzoTHC4eOYvaeQ1oN0JP+/U6HKfos/ClhogLNiK\nWPv14tDYzshbl5vtkVQc69n2dLTrdBfu+oQjEv4LIf5ZnER4wlJZtHkzWpt2\nXVNL\r\n=u65h\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG8/86mvtDncGHhVV/GqKsvqn7wU/oh3Tn7JqQ5xpC08AiBJaa4V59Zpzsc8LArf/8cULOxJn0a1DOV8nZz9mIZcPw=="}]},"maintainers":[{"email":"npm@services.hurshal.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"gerrymibernardo@gmail.com","name":"gerrymi"},{"email":"kalwyn+npmci@goodrx.com","name":"heydoctor-ci"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"rjames@goodrx.com","name":"rosaliejames"},{"email":"schlegz76@gmail.com","name":"schlegz"},{"email":"weston.jossey@gmail.com","name":"wjossey"}],"_npmUser":{"name":"heydoctor-ci","email":"kalwyn+npmci@goodrx.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_0.0.0-bff8045_1597767946623_0.8465122162053083"},"_hasShrinkwrap":false},"3.7.2":{"name":"heydoctor-js","version":"3.7.2","description":"Javascript library for the HeyDoctor Telehealth API.","main":"lib/index.js","source":true,"module":"lib/index.es.js","types":"lib/index.d.ts","repository":{"type":"git","url":"https://github.com/sappira-inc/heydoctor-js"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","private":false,"scripts":{"bump":"standard-version","build":"npm-run-all clean rollup","clean":"rimraf lib","lint":"tslint --project tsconfig.json","test":"jest","rollup":"NODE_ENV=production rollup -c","release":"npm-run-all build bump && git push --follow-tags origin master","example":"NODE_ENV=development parcel example/index.html","dev":"nodemon -e ts --watch src --exec 'yarn build && yalc push'","docs:build":"yarn typedoc --excludePrivate --excludeProtected --excludeNotExported --out docs --theme minimal src/index.ts && touch docs/.nojekyll","docs:deploy":"gh-pages -d docs -t","docs:publish":"yarn docs:build && yarn docs:deploy","preview":"nodemon -w src -x 'yalc publish --push --changed'"},"dependencies":{"@heydoctor/core":"4.0.2","@types/jest":"^24.0.23","@types/node":"^13.13.5","axios":"0.18.1","date-fns":"^1.29.0","js-cookie":"^2.2.0","lodash":"4.17.19","mitt":"^1.1.3","tslib":"^1.11.2"},"devDependencies":{"@babel/core":"7.1.2","@babel/plugin-proposal-object-rest-spread":"7.0.0","@babel/plugin-transform-runtime":"^7.2.0","@babel/preset-typescript":"7.1.0","@types/lodash":"^4.14.117","babel-core":"7.0.0-bridge.0","cross-env":"5.2.0","enzyme":"3.7.0","gh-pages":"^2.0.1","husky":"1.1.2","immer":"1.7.2","jest":"^25.4.0","lint-staged":"7.3.0","molekule":"^2.2.4","nodemon":"^2.0.3","npm-run-all":"4.1.3","parcel-bundler":"^1.12.4","prettier":"2.0.5","react":"^16.6.3","react-dom":"^16.6.3","rimraf":"2.6.2","rollup":"0.66.6","rollup-plugin-commonjs":"^9.2.0","rollup-plugin-filesize":"4.0.1","rollup-plugin-replace":"^2.1.0","rollup-plugin-typescript2":"^0.17.1","standard-version":"4.4.0","ts-jest":"^24.1.0","tslint":"^6.1.2","tslint-config-prettier":"^1.18.0","tslint-plugin-prettier":"^2.3.0","typedoc":"^0.17.6","typescript":"^3.8.3"},"lint-staged":{"**/*.ts":["tslint --project tsconfig.json --fix","git add"]},"snyk":true,"husky":{"hooks":{"pre-commit":"lint-staged"}},"licenseText":" MIT Licence\n\n Copyright (c) 2016-present, Kyle Alwyn.\n\n Permission is hereby granted, free of charge, to any person\n obtaining a copy of this software and associated documentation\n files (the \"Software\"), to deal in the Software without\n restriction, including without limitation the rights to use,\n copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following\n conditions:\n\n The above copyright notice and this permission notice shall be\n included in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n OTHER DEALINGS IN THE SOFTWARE.\n","_id":"heydoctor-js@3.7.2","dist":{"shasum":"45fe54297a1ae97368bafb7cdaf3f26438c6ed6b","integrity":"sha512-n2PaoqgUMps/nz633JH3m2QTNZ5B5RkgPy6hw2seL5Hhuil1LxBo55J+1YwlNRiMtvZhM6MYKMuB4zfg3nzrvg==","tarball":"https://registry.npmjs.org/heydoctor-js/-/heydoctor-js-3.7.2.tgz","fileCount":48,"unpackedSize":149586,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfPAHUCRA9TVsSAnZWagAAbi8P/jamP/P32oToImKdKk3i\n1f65KxitVhLUeHGxhXbB3l28wJmey2K0hq+Eiy4gYyB2pv9hXJTdGFYrd9aA\nUNBSHdVPr3fUiG7JGB8ROuXA3+0YaRRD6T4XrCw8LFrZbrWPHilXb3Fq3/FE\ns1VpOkEhxK1oKL1fXJmM3bjRgdgh4bD0M+rC1pPrpM+OhWiv1Y3nB0bnaTA6\nVX+wnMo7Y1L/RnyjWUPm9ZWUKK9HEzx1YAq5cPNL2VRuLxuBddzsPl2jKCnj\nANG+D/i4r3FPJ+t4xjfXXL+FeWuXf97S9HA92kzOHJtNjFLpbtx8Y6lyrsg+\neS1ln077XGY0EusFJx/WVvjPKb5sYr3zGllEcAvXnV/FxJfuI+8hxKvBbxgj\nkck50eqGJ+WgTeoRJHgTMITpWDJgGptau4hS1FSISxH4vHgt7bZFSlO5QEFd\nt4c15zH2jFbHnsRtezdGc869dmjS4Z+UhFCSd44zJAfES8t+6/D4NV5KXoNK\nehhlbSF9G4YkoPpHJhJlO/3b2ZtO1cZXVzeybPlG6nRbzUarL+uVmyRTWWeJ\nnjTaBo5kGa6oQ8LjwXmkk4aABRtXZseQ75WfPqvrq/FJi5bUHKgjOT/MIbIU\nb/ntlt7oKpDOhJiO3OIl112D4+RA7DCz8My1gVK7ty98OJOP7JUfvX9NRfcO\neL04\r\n=TylM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGiu6O4da4cOUKpl2dTmnKMAbpjxLfK3t5ie+lBkzx56AiAHtPSm9T+Dc8RWtGRato+Y8dklhh6rBbWCd2z3KGGDdQ=="}]},"maintainers":[{"email":"npm@services.hurshal.com","name":"choochootrain"},{"email":"shestopalerik@gmail.com","name":"erikshestopal"},{"email":"gerrymibernardo@gmail.com","name":"gerrymi"},{"email":"kalwyn+npmci@goodrx.com","name":"heydoctor-ci"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"rjames@goodrx.com","name":"rosaliejames"},{"email":"schlegz76@gmail.com","name":"schlegz"},{"email":"weston.jossey@gmail.com","name":"wjossey"}],"_npmUser":{"name":"heydoctor-ci","email":"kalwyn+npmci@goodrx.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/heydoctor-js_3.7.2_1597768148445_0.9727852994875779"},"_hasShrinkwrap":false}},"time":{"created":"2019-01-03T18:36:46.585Z","0.1.1":"2019-01-03T18:36:46.715Z","modified":"2022-12-05T22:52:17.109Z","0.1.3":"2019-01-03T22:49:21.917Z","0.2.0":"2019-01-04T00:45:53.005Z","0.2.1":"2019-01-17T17:35:44.342Z","1.0.0":"2019-01-30T00:53:11.698Z","1.0.1":"2019-02-22T01:46:36.435Z","1.0.2":"2019-03-25T04:54:10.798Z","1.0.3":"2019-04-08T18:29:47.696Z","2.0.0":"2019-06-25T17:27:31.141Z","2.0.1":"2019-06-25T19:02:01.247Z","2.0.2":"2019-09-11T00:10:31.276Z","2.0.3":"2019-09-19T23:27:17.391Z","2.1.0":"2019-10-23T21:15:27.984Z","3.0.0":"2019-11-08T20:49:16.554Z","3.1.0":"2019-11-21T01:28:48.714Z","0.0.0-e4ca38a":"2019-11-21T02:46:31.617Z","0.0.0-a008194":"2019-12-04T21:07:17.276Z","3.2.0":"2019-12-04T21:14:43.289Z","0.0.0-fb9012e":"2019-12-04T21:22:34.453Z","0.0.0-403f609":"2019-12-04T21:24:02.293Z","0.0.0-4243757":"2019-12-10T16:35:31.465Z","0.0.0-13aa944":"2019-12-10T16:48:09.786Z","3.2.2":"2019-12-10T22:19:16.053Z","0.0.0-4369de1":"2019-12-10T22:27:29.176Z","0.0.0-40f7249":"2019-12-11T00:39:00.725Z","3.3.1":"2020-01-06T23:35:44.909Z","3.4.0":"2020-04-13T22:00:49.001Z","3.4.0-prerelease":"2020-04-14T01:23:54.505Z","3.4.0-4319646":"2020-04-14T01:42:14.526Z","3.4.0-dceb998":"2020-04-14T02:34:13.398Z","3.4.0-c45b5c7":"2020-04-14T03:03:33.596Z","0.0.0-canary-1":"2020-04-14T23:01:15.168Z","0.0.0-a952b84":"2020-04-15T17:42:32.681Z","0.0.0-5024a3c":"2020-04-15T18:49:57.681Z","0.0.0-5c36d1a":"2020-04-17T18:58:14.130Z","0.0.0-717749d":"2020-04-21T20:09:31.470Z","0.0.0-1906a74":"2020-04-21T21:24:03.324Z","0.0.0-dec2378":"2020-04-22T19:37:07.160Z","0.0.0-218f348":"2020-04-22T19:47:15.772Z","0.0.0-68afedd":"2020-04-22T21:08:48.370Z","0.0.0-a72991b":"2020-04-22T21:27:50.550Z","0.0.0-c3f0706":"2020-04-22T21:31:53.916Z","0.0.0-14c3536":"2020-04-22T21:55:56.621Z","0.0.0-9973cb5":"2020-04-22T23:29:32.748Z","0.0.0-50ec30b":"2020-04-24T17:32:20.186Z","0.0.0-fd70b2c":"2020-04-24T23:28:52.631Z","0.0.0-44b21ec":"2020-04-27T20:02:17.224Z","0.0.0-b07e60d":"2020-04-29T17:12:37.958Z","0.0.0-48c4cbe":"2020-04-29T17:15:32.076Z","0.0.0-93a37be":"2020-04-29T17:27:38.662Z","3.6.0":"2020-04-29T17:30:18.422Z","0.0.0-9e2f75a":"2020-04-29T20:03:11.229Z","3.6.1":"2020-04-29T20:10:54.470Z","0.0.0-e415929":"2020-04-30T05:25:41.379Z","3.6.2":"2020-04-30T05:28:52.095Z","0.0.0-696f48a":"2020-05-04T19:09:57.294Z","3.6.4":"2020-05-04T20:10:21.561Z","0.0.0-22b006e":"2020-05-04T20:50:01.234Z","0.0.0-a872603":"2020-05-04T22:25:59.264Z","3.6.5":"2020-05-04T22:40:49.592Z","0.0.0-659d805":"2020-05-04T22:42:34.685Z","0.0.0-0e56df4":"2020-05-04T22:42:42.999Z","3.6.6":"2020-05-04T22:46:24.827Z","3.6.7":"2020-05-04T22:54:25.681Z","3.6.8":"2020-05-04T23:06:40.140Z","0.0.0-706e360":"2020-05-04T23:10:19.979Z","0.0.0-4edaf18":"2020-05-05T21:58:22.270Z","0.0.0-4cf4a5e":"2020-05-07T17:34:52.470Z","0.0.0-b067ce5":"2020-05-07T17:51:29.280Z","0.0.0-40497a5":"2020-05-07T17:56:04.987Z","0.0.0-c8cd40a":"2020-05-07T18:00:41.609Z","3.6.10":"2020-05-07T18:30:32.244Z","0.0.0-5a3ad18":"2020-05-08T17:51:34.987Z","0.0.0-4b1a469":"2020-05-08T18:19:34.693Z","0.0.0-7ec9ede":"2020-05-08T18:31:58.242Z","3.6.11":"2020-05-08T19:03:38.043Z","0.0.0-a9b4573":"2020-05-08T19:04:37.826Z","0.0.0-db2c811":"2020-05-13T16:28:44.599Z","3.6.12":"2020-05-13T16:42:07.732Z","0.0.0-b3b2f1b":"2020-05-13T16:42:29.782Z","0.0.0-18181be":"2020-05-18T16:09:35.693Z","3.6.13":"2020-05-18T16:24:40.045Z","0.0.0-b18945c":"2020-05-27T21:46:55.783Z","0.0.0-1e48472":"2020-05-27T23:23:06.340Z","3.6.14":"2020-05-27T23:53:05.021Z","0.0.0-3fb4426":"2020-06-12T19:09:39.687Z","3.6.15":"2020-06-12T19:30:32.049Z","0.0.0-ce1b23d":"2020-06-25T18:14:45.360Z","3.7.0":"2020-06-25T18:24:37.669Z","0.0.0-22fc355":"2020-06-29T19:05:20.118Z","0.0.0-ccf0dea":"2020-07-13T22:57:57.865Z","0.0.0-c84ce83":"2020-07-20T14:32:29.060Z","0.0.0-2daa337":"2020-08-01T23:28:21.951Z","0.0.0-d7f75bf":"2020-08-03T15:57:48.261Z","3.7.1":"2020-08-03T15:59:41.282Z","0.0.0-bff8045":"2020-08-18T16:25:46.786Z","3.7.2":"2020-08-18T16:29:08.549Z"},"maintainers":[{"email":"ltikoyan@goodrx.com","name":"levon-tikoyan"},{"email":"atran@goodrx.com","name":"atrangoodrx"},{"email":"pchaudhary@goodrx.com","name":"pr1ncek"},{"email":"npm@services.hurshal.com","name":"choochootrain"},{"email":"kjalwyn@gmail.com","name":"kylealwyn"},{"email":"kalwyn+npmci@goodrx.com","name":"heydoctor-ci"},{"email":"gerrymibernardo@gmail.com","name":"gerrymi"},{"email":"rjames@goodrx.com","name":"rosaliejames"}],"description":"Javascript library for the HeyDoctor Telehealth API.","repository":{"type":"git","url":"https://github.com/sappira-inc/heydoctor-js"},"author":{"name":"Kyle Alwyn","email":"kjalwyn@gmail.com"},"license":"MIT","readme":"# HeyDoctor Javascript SDK\n\nThe HeyDoctor Javascript library provides convenient access to the HeyDoctor API for applications written in JavaScript.\n\n## Documentation\nCheck out our [auto-generated docs](https://sappira-inc.github.io/heydoctor-js/) using [TypeDoc](http://typedoc.org).\n\n## Installation\nYou can install `heydoctor-js` using your favorite package manager.\n\n```sh\n$ yarn add heydoctor-js\n# or\n$ npm install --save heydoctor-js\n```\n\n## Usage\nYou'll first need to create a new client resource. If using the HeyDoctor SaaS platform, you'll need to provide the API key located in the EMR. The client contains the http module that will communicate with the HeyDoctor API, so we'll pass this client to the other resources you'll need.\n\n### Creating the client\n\n```js\nimport { Client, Environments, Visits, OAuth } from 'heydoctor-js';\n\n// The client will hold all configuration options and the http module\n// that communicates to our server\nconst client = new Client({\n  env: Environments.SANDBOX | Environments.PRODUCTION, // determines the API and OAuth endpoints\n});\n\n// Create two resources passing both the client we've just created\n// ** Some resources also take an optional options object as a second argument\nconst visits = new Visits(client;\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n  scope: '*',\n});\n```\n\n### Subscribing to HTTP events\nThe HeyDoctor client also doubles as an event emitter. The client extends from [Mitt](https://github.com/developit/mitt) and complies with standard EventEmitter events.\n\n```js\ninterface HttpCallback {\n  statusCode: number;\n  data: any;\n}\n\nconst client = new Client();\n\nclient.on('http:success', (data: HttpCallback) => void);\nclient.on('http:error', (data: HttpCallback) => void);\n```\n\n### Authorizing via OAuth\n\nPartnering clients will use the HeyDoctor JS SDK to create or link a HeyDoctor account. HeyDoctor conforms to the existing [OAuth2 protocol](https://oauth.net/2/). In the case that HeyDoctor already has the provided email on file, the SDK will open a dialog box, akin to Facebook or Google login, prompting the user to confirm their existing password. In all successful cases, an access token and refresh token will be returned. The resulting payload is outlined below.\n\nWe recommend to store the longstanding refresh token in a persisted data store. You’ll use this token, along with your unique client id and secret key to regenerate short lived access tokens used to authenticate requests to the HeyDoctor API. For security measures, the access token has a one hour TTL, after which the token will expire and new access token will need to be generated.\n\nUpon successful authorization, all subsequent SDK calls will be authenticated using the access token. The access token can also be utilized server-side to call our API directly.\n\n#### Example\n\n```js\nimport { Client, OAuth } from 'heydoctor-js';\n\nconst client = new Client({\n  env: 'production',\n});\n\nconst oauth = new OAuth(client, {\n  clientId: 'your-provided-client-id',\n});\n\n// First attempt to create a new HeyDoctor user silently. The method will throw an error in the case that the email already exists,\n// in which case you have the opportunity to present an unobtrusive dialog for the user to confirm their existing HeyDoctor password.\ntry {\n  const { accessToken, refreshToken } = await oauth.createUser({\n    email: 'frank@heydoctor.com',\n    firstName: 'Frank',\n    lastName: 'Sinatra',\n    dob: '1915-12-12',\n    gender: 'male',\n    addressLine1: '123 Somewhere Street',\n    city: 'Hoboken',\n    state: 'NJ',\n    zip: '07030',\n  });\n} catch (error) {\n  if (error.code === 'account_exists') {\n    const { accessToken, refreshToken } = await oauth.launchWebAuthFlow('frank@heydoctor.com');\n  }\n}\n\n// Now that the client has been authorized, we can call call other methods available in the SDK\nconst visit = await visits.create({\n  code: 'hair-loss',\n});\n\n// Excellent, we've just created our first visit. Now, we can upload photos to that visit.\nawait visit.uploadPhoto('photoId1234', 'base64photostring');\n```\n","readmeFilename":"README.md"}