{"_id":"front-sdk","_rev":"112-354a57d3472f94f7e56d86eae15dbd62","name":"front-sdk","dist-tags":{"add-git-secrets-dcebacf8eca0b6f3468d6fe65269e47964c37ef9":"0.7.3-add-git-secrets-dcebacf8eca0b6f3468d6fe65269e47964c37ef9","add-git-secrets-37cdf29c14a924e5fe34bbd679b3727ce5e74d1f":"0.7.3-add-git-secrets-37cdf29c14a924e5fe34bbd679b3727ce5e74d1f","secrets-8768c77dec6c9909e960676721e42f20e02c3c8a":"0.7.3-secrets-8768c77dec6c9909e960676721e42f20e02c3c8a","secrets-3566fa25b97328bd08d9ea953f7123e09c2ae291":"0.7.3-secrets-3566fa25b97328bd08d9ea953f7123e09c2ae291","secrets-7d41df6dc5bb2fea5c7a0fa66f3ef72d2baf3f96":"0.7.3-secrets-7d41df6dc5bb2fea5c7a0fa66f3ef72d2baf3f96","secrets-153e599b195cd10dbb9e5d39ad24e168426a103e":"0.7.3-secrets-153e599b195cd10dbb9e5d39ad24e168426a103e","secrets-f97c14f482d10fedc1fa3cfa81f4a323e5f21230":"0.7.3-secrets-f97c14f482d10fedc1fa3cfa81f4a323e5f21230","secrets-879b8763c29c7f752bac1fbd9f7f04928a9fb56f":"0.7.3-secrets-879b8763c29c7f752bac1fbd9f7f04928a9fb56f","secrets-b4d3db43438155519d8d21255adf06f02136095d":"0.7.3-secrets-b4d3db43438155519d8d21255adf06f02136095d","build-type-declarations-file-7b1c198e76d4915726d2cbedb34a72b78a470766":"0.8.2-build-type-declarations-file-7b1c198e76d4915726d2cbedb34a72b78a470766","build-type-declarations-file-e3fe05c08ef2ddd3d271e0160fccdda1d870b356":"0.8.2-build-type-declarations-file-e3fe05c08ef2ddd3d271e0160fccdda1d870b356","latest":"0.8.2","build-type-declarations-file-9d7e60cf756f288017ec302339373fe25131e217":"0.8.3-build-type-declarations-file-9d7e60cf756f288017ec302339373fe25131e217","build-type-declarations-file-b9dc6ed3bdeed8b920ab0ab55c3fa01bead8b65f":"0.8.3-build-type-declarations-file-b9dc6ed3bdeed8b920ab0ab55c3fa01bead8b65f","build-type-declarations-file-4940aed35c33093a1651b561f58ad513b847b2ef":"0.8.3-build-type-declarations-file-4940aed35c33093a1651b561f58ad513b847b2ef"},"versions":{"0.0.1":{"name":"front-sdk","version":"0.0.1","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.0.1","maintainers":[{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"df5d3b5c1f4b7ae1298b5c1c90e4ea7241a2f377","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.0.1.tgz","integrity":"sha512-gvI25Wusz517C1wiIawkkeVQpw2jCctniNa6Xac5037ujBl4MhipL5nzGK7OovLa9M+Qag8et50Ap1qpdpMIrg==","signatures":[{"sig":"MEUCIQDVYO5eOWH/iWJNcUBDZPWcPE9xTkIHFYl7UIk3sjZvggIgBfWszIOVU1pGo7iOUqIB/XKL7EDXQ1kNnyx3oUh6JzY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"build/index.js","_from":".","types":"src/index.ts","_shasum":"df5d3b5c1f4b7ae1298b5c1c90e4ea7241a2f377","gitHead":"ed62306f0189a472ad980fd773bba7335b23016a","scripts":{"lint":"gulp tslint","test":"gulp tslint && gulp test","build":"gulp build","prepublish":"npm run build"},"_npmUser":{"name":"resin.io","email":"accounts@resin.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"_npmVersion":"3.10.3","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"6.7.0","dependencies":{"lodash":"^4.17.2","request":"^2.79.0","bluebird":"^3.5.0","@types/node":"^6.0.48","typed-error":"^0.1.0","@types/lodash":"^4.14.54","@types/request":"^0.0.41","request-promise":"^4.1.1","@types/bluebird-global":"^3.0.1","@types/request-promise":"^4.1.33"},"devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.3.0","tslint":"^4.5.1","gulp-util":"^3.0.8","gulp-mocha":"^3.0.0","typescript":"^2.3.2","@types/chai":"^3.5.1","gulp-tslint":"^7.1.0","@types/mocha":"^2.2.41","gulp-sourcemaps":"^2.3.1","gulp-typescript":"^3.1.4","chai-as-promised":"^6.0.0","mocha-junit-reporter":"^1.13.0","@types/chai-as-promised":"0.0.30"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk-0.0.1.tgz_1494623298637_0.9229192140046507","host":"packages-18-east.internal.npmjs.com"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.1.0":{"name":"front-sdk","version":"0.1.0","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.1.0","maintainers":[{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"828f9eaf76c4b73873e4426776884d913f4326d1","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.1.0.tgz","integrity":"sha512-DM4gSFdPakDoMYAxInZcdO7SLB0wgV15Zg8JTszJyw+NUaVQwS0G1JZU4IuCYZDdE6LPI5kfVTO2T+HhZvNJPg==","signatures":[{"sig":"MEUCIQDg2JM3EI8lF4w40IAfs4ZFYRqHqCt+PE0nKebULGnCPAIgVOF/pxPmIBTrFXL6pq+yyaZdHTu3vMnkGCR5RQgVVg8=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"build/index.js","_from":".","types":"lib/index.ts","_shasum":"828f9eaf76c4b73873e4426776884d913f4326d1","gitHead":"23cb5218d3dc47534b9cf9f70087e5c433c1b8ad","scripts":{"lint":"gulp tslint","test":"gulp tslint && gulp test","build":"gulp build","prepublish":"npm run build"},"_npmUser":{"name":"resin.io","email":"accounts@resin.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"_npmVersion":"3.10.3","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"6.7.0","dependencies":{"lodash":"^4.17.2","request":"^2.79.0","bluebird":"^3.5.0","@types/node":"^6.0.48","typed-error":"^1.0.0","@types/lodash":"^4.14.54","@types/request":"^0.0.41","request-promise":"^4.1.1","@types/bluebird-global":"^3.0.1","@types/request-promise":"^4.1.33"},"devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.3.0","github":"^9.2.0","tslint":"^4.5.1","gulp-util":"^3.0.8","gulp-mocha":"^3.0.0","typescript":"^2.3.2","@types/chai":"^3.5.1","gulp-tslint":"^7.1.0","@types/mocha":"^2.2.41","gulp-sourcemaps":"^2.3.1","gulp-typescript":"^3.1.4","chai-as-promised":"^6.0.0","mocha-junit-reporter":"^1.13.0","@types/chai-as-promised":"0.0.30"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk-0.1.0.tgz_1495099778452_0.935615669703111","host":"packages-12-west.internal.npmjs.com"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.2.0":{"name":"front-sdk","version":"0.2.0","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.2.0","maintainers":[{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"9798af33424df4367c0abac9c85d2fac92afa12a","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.2.0.tgz","integrity":"sha512-BdFjq3+fSQwvCDA1CoEH8ktwqUYBjehVB0rmjQH16eTxXYyW4pP+tYo/UuaecYjqbBzOobf09Wn0M8Q+s5k8xg==","signatures":[{"sig":"MEYCIQDd8mnCK6zY0HGD9r5elnfu690Zhx4Ez1FKDEeXrqFSAQIhAM3wUqlzfarTBNrfMUCt/QxnFLEKs90dPyE0jOEdaUcl","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"build/index.js","_from":".","types":"lib/index.ts","_shasum":"9798af33424df4367c0abac9c85d2fac92afa12a","gitHead":"ae14de501a028e0fa56adbe4beeb0b74cc1a33b4","scripts":{"lint":"gulp tslint","test":"gulp tslint && gulp test","build":"gulp build","prepublish":"npm run build"},"_npmUser":{"name":"resin.io","email":"accounts@resin.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"_npmVersion":"4.6.1","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"6.7.0","dependencies":{"lodash":"^4.17.2","express":"^4.15.3","request":"^2.79.0","bluebird":"^3.5.0","@types/node":"^6.0.48","body-parser":"^1.17.2","typed-error":"^1.0.1","@types/lodash":"^4.14.54","@types/express":"^4.0.35","@types/request":"^0.0.41","request-promise":"^4.1.1","@types/body-parser":"^1.16.3","@types/bluebird-global":"^3.0.1","@types/request-promise":"^4.1.33"},"devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.3.0","github":"^9.2.0","tslint":"^4.5.1","gulp-util":"^3.0.8","gulp-mocha":"^3.0.0","typescript":"^2.3.2","@types/chai":"^3.5.1","chai-string":"^1.3.0","gulp-tslint":"^7.1.0","@types/mocha":"^2.2.41","gulp-sourcemaps":"^2.3.1","gulp-typescript":"^3.1.4","chai-as-promised":"^6.0.0","@types/chai-string":"^1.1.30","mocha-junit-reporter":"^1.13.0","@types/chai-as-promised":"0.0.30"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk-0.2.0.tgz_1496479641804_0.13813596917316318","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.2.1":{"name":"front-sdk","version":"0.2.1","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.2.1","maintainers":[{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"f4b8f8f3618b003ff8aea24f72862a6772b0b0cd","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.2.1.tgz","integrity":"sha512-a79U54H/AmJNw1rpzDmziyfEdfWb5VtniAatLD0IYmn8ZFOzMd5MBbdqXWs78JKkC9uIaqjdR+9rJsheny6daQ==","signatures":[{"sig":"MEYCIQCJmAn2PLsPh2q7MlPZKklH6wTpMv/ZmGCAP5jyQmx56gIhAJ65UNCdXFuKvtHylyPFQD7inaZ44hx8M6Z5adkQgLWG","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"build/index.js","_from":".","types":"lib/index.ts","_shasum":"f4b8f8f3618b003ff8aea24f72862a6772b0b0cd","gitHead":"db2604982708acb77a4227073c36437f110acd1b","scripts":{"lint":"gulp tslint","test":"gulp tslint && gulp test","build":"gulp build","prepublish":"npm run build"},"_npmUser":{"name":"resin.io","email":"accounts@resin.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"_npmVersion":"4.1.1","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"6.9.4","dependencies":{"lodash":"^4.17.2","express":"^4.15.3","request":"^2.79.0","bluebird":"^3.5.0","@types/node":"^6.0.48","body-parser":"^1.17.2","typed-error":"^1.0.1","@types/lodash":"^4.14.54","@types/express":"^4.0.35","@types/request":"^0.0.41","request-promise":"^4.1.1","@types/body-parser":"^1.16.3","@types/bluebird-global":"^3.0.1","@types/request-promise":"^4.1.33"},"devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.3.0","github":"^9.2.0","tslint":"^4.5.1","gulp-util":"^3.0.8","gulp-mocha":"^3.0.0","typescript":"^2.3.2","@types/chai":"^3.5.1","chai-string":"^1.3.0","gulp-tslint":"^7.1.0","@types/mocha":"^2.2.41","gulp-sourcemaps":"^2.3.1","gulp-typescript":"^3.1.4","chai-as-promised":"^6.0.0","@types/chai-string":"^1.1.30","mocha-junit-reporter":"^1.13.0","@types/chai-as-promised":"0.0.30"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk-0.2.1.tgz_1498568487943_0.7890189585741609","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.2.2":{"name":"front-sdk","version":"0.2.2","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.2.2","maintainers":[{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"a888f002f7f705e8735b47d5c47417c3cf04b961","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.2.2.tgz","integrity":"sha512-GtZ+nvWV2rh2l52G7dOtTsLa2un91lr+Df7CRGbVGPbC9DUP3LKtXtgXfmcEbKVNk2eMYN4MxykFY4FS30d39w==","signatures":[{"sig":"MEYCIQCCqqRS1Ytee1aKLpndzkAoS2vV7e20fTff3P49KDyoewIhAOyHDZD+L0jl+Qi/BwqmBqPb8dsSbZr+zkwl10Jqbsgf","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"build/index.js","_from":".","types":"lib/index.ts","_shasum":"a888f002f7f705e8735b47d5c47417c3cf04b961","gitHead":"2c36163bff0161582e62945c1cd9551408abff48","scripts":{"lint":"gulp tslint","test":"gulp tslint && gulp test","build":"gulp build","prepublish":"npm run build"},"_npmUser":{"name":"resin.io","email":"accounts@resin.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"_npmVersion":"4.1.1","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"6.9.4","dependencies":{"lodash":"^4.17.2","express":"^4.15.3","request":"^2.79.0","bluebird":"^3.5.0","@types/node":"^6.0.48","body-parser":"^1.17.2","typed-error":"^1.0.1","@types/lodash":"^4.14.54","@types/express":"^4.0.35","@types/request":"^0.0.41","request-promise":"^4.1.1","@types/body-parser":"^1.16.3","@types/bluebird-global":"^3.0.1","@types/request-promise":"^4.1.33"},"devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.3.0","github":"^9.2.0","tslint":"^4.5.1","gulp-util":"^3.0.8","gulp-mocha":"^3.0.0","typescript":"^2.3.2","@types/chai":"^3.5.1","chai-string":"^1.3.0","gulp-tslint":"^7.1.0","@types/mocha":"^2.2.41","gulp-sourcemaps":"^2.3.1","gulp-typescript":"^3.1.4","chai-as-promised":"^6.0.0","@types/chai-string":"^1.1.30","mocha-junit-reporter":"^1.13.0","@types/chai-as-promised":"0.0.30"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk-0.2.2.tgz_1499353230266_0.7265675668604672","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.2.3":{"name":"front-sdk","version":"0.2.3","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.2.3","maintainers":[{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"cf35c2be60681b1c7948b5df551aa906bb120ba0","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.2.3.tgz","integrity":"sha512-JNBzlD497o2EiX3An0m8GRuie1abDfA4MhoOJzt8M4lFrL7HDWkycYZlNy1YPbGzX2Xm8db6Yfyp/xc40ILPhw==","signatures":[{"sig":"MEUCIQC6n9Cp2Ip9RJRT2tkH4xaX36mFEDC2fr5zz8oOUg2lnAIgJ+gGqm2k9e71rWfnxEpTPld14K3NCmHC/absPyBLOJM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"build/index.js","types":"lib/index.ts","gitHead":"f477cf7383e95bd011856f6147c0ac0d235408ea","scripts":{"lint":"gulp tslint","test":"gulp tslint && gulp test","build":"gulp build","prepublish":"npm run build"},"_npmUser":{"name":"resin.io","email":"accounts@resin.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"_npmVersion":"5.5.1","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"8.2.0","dependencies":{"lodash":"^4.17.2","express":"^4.15.3","request":"^2.79.0","bluebird":"^3.5.0","@types/node":"^6.0.48","body-parser":"^1.17.2","typed-error":"^1.0.1","@types/lodash":"^4.14.54","@types/express":"^4.0.35","@types/request":"^0.0.41","request-promise":"^4.1.1","@types/body-parser":"^1.16.3","@types/bluebird-global":"^3.0.1","@types/request-promise":"^4.1.33"},"devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.3.0","github":"^9.2.0","tslint":"^4.5.1","gulp-util":"^3.0.8","gulp-mocha":"^3.0.0","typescript":"^2.3.2","@types/chai":"^3.5.1","chai-string":"^1.3.0","gulp-tslint":"^7.1.0","@types/mocha":"^2.2.41","gulp-sourcemaps":"^2.3.1","gulp-typescript":"^3.1.4","chai-as-promised":"^6.0.0","@types/chai-string":"^1.1.30","mocha-junit-reporter":"^1.13.0","@types/chai-as-promised":"0.0.30"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk-0.2.3.tgz_1511206545859_0.14505734108388424","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.3.0":{"name":"front-sdk","version":"0.3.0","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.3.0","maintainers":[{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"d31733511cdd2eb9b187dd73583508f94789157f","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.3.0.tgz","fileCount":36,"integrity":"sha512-g6U9errBLA4/xZSt9+9M1tHxIVmrZ+TMJtU3gXks6wQtz1MqLC2LsuCu/JKUq/o+ftuffJ1Hakrhk7WtKkcRhg==","signatures":[{"sig":"MEQCIDPDax45b7XMFKomw3HIybYvwRno7uMcQ5gPcO0yVj98AiBGA8BHJIZML+osGJEJI28hCnVZxm8LiNJXiufH8+/90w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160702,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa1cQ9CRA9TVsSAnZWagAAz8AP/2A/6iko1Pd8lnvcgowU\n7eDtaWJaUuuJQgRiMCGonSwYyI/MF02NZWtwBzM54YYtDhpC7JzJqHMiIZ42\n81iYjy0e8fnnjL6jyfWXrfQ0bceHGASXRYH5LgMrim1FZic+b54TlFmpeFpN\npsYjU4T+7ViG2EhWQNaTKpi7xE4L2TMt8Cc5+siFKtl30uSi8BZmGrvr0KZs\nR1njc+2otKcNrjt7BJ5gX7sB6Rhq1gxQ4zZ4TzblSuutT+MAUL48cEcIs/OX\nqgFJwMFTbefToGIuKDydWhKtq8kbv0sumQ/6EOZYa5aGnNoJfnpGAHll8XRH\nL0B1dWLzsDnJWQ/E7KDLy6z9+oV7G0zGTyj4YzU6WJgxsgbvpOV+VPdpb8ag\n0s3lgi4hXGbPAtLwTZL6aWSJWgFUCdsXpitzGn/+wVF1owhOcenSokfY1bZb\nVE3wfU0gjR2n70becW4Ej3DrSc6Tt4gSv5QOotyj5oFdj5J5DXzmcMq4afEO\n4Tubpp3Oxk0Quo5ZDklryMM90Pvg/8jAuLwEN/vS0TC4vsS7WqGuySQlD0p9\nNrMhL1hLmWkUzOsewgnnciEmw9zXwxw7mKVu1ZdVEecEMI2oR5ZMmDz/09JH\nE9PqL5XP2tS0sP9Ytx1rLweCglW8Ih82uDceS6ghx+dG96u/6lLxaCPvYHP3\nUady\r\n=Tsqo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"lib/index.ts","gitHead":"ca183a73e863116cd57a3c84c70cc57c1c06bda3","scripts":{"lint":"gulp tslint","test":"gulp tslint && gulp test","build":"gulp build","prepublish":"npm run build"},"_npmUser":{"name":"resin.io","email":"accounts@resin.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"_npmVersion":"5.8.0","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"8.2.0","dependencies":{"lodash":"^4.17.2","express":"^4.15.3","request":"^2.79.0","bluebird":"^3.5.0","@types/node":"^6.0.48","body-parser":"^1.17.2","typed-error":"^1.0.1","@types/lodash":"^4.14.54","@types/express":"^4.0.35","@types/request":"^0.0.41","request-promise":"^4.1.1","@types/body-parser":"^1.16.3","@types/bluebird-global":"^3.0.1","@types/request-promise":"^4.1.33"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.3.0","github":"^9.2.0","tslint":"^4.5.1","gulp-util":"^3.0.8","gulp-mocha":"^3.0.0","typescript":"^2.3.2","@types/chai":"^3.5.1","chai-string":"^1.3.0","gulp-tslint":"^7.1.0","@types/mocha":"^2.2.41","gulp-sourcemaps":"^2.3.1","gulp-typescript":"^3.1.4","chai-as-promised":"^6.0.0","@types/chai-string":"^1.1.30","mocha-junit-reporter":"^1.13.0","@types/chai-as-promised":"0.0.30"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk_0.3.0_1523958844888_0.6963466494781965","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.3.1-20-getFromLink-reduce-slashes-27f84b0095f0d87a57ebf62b3fd33d0e2ee582c2":{"name":"front-sdk","version":"0.3.1-20-getFromLink-reduce-slashes-27f84b0095f0d87a57ebf62b3fd33d0e2ee582c2","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.3.1-20-getFromLink-reduce-slashes-27f84b0095f0d87a57ebf62b3fd33d0e2ee582c2","maintainers":[{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"591aa45dffb93e9172f6da4115975595512415a9","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.3.1-20-getFromLink-reduce-slashes-27f84b0095f0d87a57ebf62b3fd33d0e2ee582c2.tgz","fileCount":36,"integrity":"sha512-MJye4uZtFRKip5YMNTmXtrBNvWcH1ZazwG2a6wgOOpYOxSWift7B8/z1E7ZF+UwpnpOBI35PIdzMBedaccSgsg==","signatures":[{"sig":"MEMCIC53EpepiiBwrnovzj6dy4OV/IIYnTOWVNSc0ogxZy+FAh8tGfdSXb4Q4QKozs8DC+yCnpAMbk9kfTPjFKgFNO+/","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160644,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbn8n4CRA9TVsSAnZWagAAUDMP+gKjUKEZQDmDUim5xRZ0\nUE6EURcYMtXdbtqzB7gsFUKkEPfl199rRRl6IxnjRyFvTonuci3iubkk0aBs\nuT8SlTasU9cxLXDDri3HLfTE1VPH4tKETwjNqTTQTWeXCavMab3yQX1QMv+P\neNI42dMS/VTtcn4dMrWJgvHDnlic24P5osAzC1e2mmd+UIWzSEBg+7mzd7bR\nnftM+P+T2SCvFgxucexi0ZfopHnQROLEqD9QIcPlLiJzdD4lc7/Bc0PpaKlw\n798xYCN1A/jbDWSkkxex4tXYkx6sWpY0RRPDWsxFs3VIKgsFb5sYBojMcd8L\nnVbk/lUZmH9JAtIMyHe/UygPWAgvO2rLZimwlwzLhxx8N2hy/qtcXcTqKONt\nWOGEpt6Ipz5uBDAVAteRlJUjvBE3oSkoAV1varZdeRCj66GePgeu7Jmz1xzO\nTj8mQORT/lb1qGENuXDe3OSfekDysHF5I01Io8OfD6Qy/myw/PK82+JY2h8I\nGN9GSe2nFeqvv3SO9AxK8kwzqCQk3Y+vnbrGvzXUoJ5tYoJksFRimlRgTAG2\n6YDyfMzFZFveS3HaBAC4XUR2nE3ngpuBrclPk/VCGBE6OslUhHc+B77iQOSm\nKLOlnRulQ1mVhwqOxqCcwly8E9XAKtCgn3GWNYZJcVelM2+/n7cKKdE9I4+7\n8pt8\r\n=6DkY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"lib/index.ts","readme":"# front-sdk\nAn SDK for working with Front (https://frontapp.com).\n\n## TypeScript Quickstart\n\nImport in the usual way:\n\n```typescript\nimport { Front } from 'front-sdk';\n```\n\n## JavaScript\n\nRequire in the usual way:\n\n```javascript\nconst Front = require('front-sdk').Front;\n```\n\n## Usage\n\nCreate a new instance of the SDK to use it, passing the API token for Front.\n\n```typescript\nimport { Comment, Front } from 'front-sdk';\nconst front = new Front('abcdef123457890');\n\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}).then((comment: Comment) => {\n    console.log(comment);\n}).catch(FrontError, (err: FrontError) => {\n    console.log(err);\n});\n```\n\nCan also be used as a callback, if required:\n\n```typescript\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}, (err: FrontError, comment: FrontComment) => {\n    if (err) {\n        console.log(err);\n        return;\n    }\n\n    console.log(comment);\n});\n```\n\nClients can register for events, passing an object detailing a port to listen on using a new instance of an Express server, or an instance of an Express server to use. An optional path to install the webhook on can also be passed (this defaults to `/fronthook`).\n\nTo use this functionality, pass the secret shared key in as the second parameter when creating a new Front instance.\n```typescript\n    import { Event, Front } from 'front-sdk';\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    const httpServer = frontInst.registerEvents({ port: 1234, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nYou can also use a pre-existing Express instance, but note that the Front SDK expects that the request body should be an already parsed object or a JSON parseable string. You can easily add this using the `body-parser` library:\n\n```typescript\n    import { Event, Front } from 'front-sdk';\n    import * as bodyParser from 'body-parser';\n\n    const app = express();\n    app.use(bodyParser.json());\n    app.listen(1234);\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    frontInst.registerEvents({ server: app, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nThe SDK will verify that events sent to it are signed by the shared secret key, and will retrieve the entire event rather than just the preview. Events are sent to the client in the order the preview events for them were originally dispatched.\n\n#### Notes\n\nTo post into a Front Inbox, you need to know the correct channels in for it.\nChannels are instances of sources, such as SMTP, Facebook, Front Integrations, etc.\n\nSo to post a new Conversation:\n * Find the Inbox required want\n * List the Channels and find the correct one for the source (Integration channels, in the SDK case)\n * Post a Message to that Channel (which will return a Conversation reference)\n\nTo post a Comment or Message to that Conversation:\n * Use the Conversation reference to post (returns a Comment or Message object)\n","gitHead":"27f84b0095f0d87a57ebf62b3fd33d0e2ee582c2","scripts":{"lint":"gulp tslint","test":"gulp tslint && gulp test","build":"gulp build","prepublish":"npm run build"},"_npmUser":{"name":"resin.io","email":"accounts@resin.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"_npmVersion":"6.1.0","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"10.4.0","dependencies":{"lodash":"^4.17.2","express":"^4.15.3","request":"^2.79.0","bluebird":"^3.5.0","@types/node":"^6.0.48","body-parser":"^1.17.2","typed-error":"^1.0.1","@types/lodash":"^4.14.54","@types/express":"^4.0.35","@types/request":"^0.0.41","request-promise":"^4.1.1","@types/body-parser":"^1.16.3","@types/bluebird-global":"^3.0.1","@types/request-promise":"^4.1.33"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.3.0","github":"^9.2.0","tslint":"^4.5.1","gulp-util":"^3.0.8","gulp-mocha":"^3.0.0","typescript":"^2.3.2","@types/chai":"^3.5.1","chai-string":"^1.3.0","gulp-tslint":"^7.1.0","@types/mocha":"^2.2.41","gulp-sourcemaps":"^2.3.1","gulp-typescript":"^3.1.4","chai-as-promised":"^6.0.0","@types/chai-string":"^1.1.30","mocha-junit-reporter":"^1.13.0","@types/chai-as-promised":"0.0.30"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk_0.3.1-20-getFromLink-reduce-slashes-27f84b0095f0d87a57ebf62b3fd33d0e2ee582c2_1537198583190_0.24368510594311132","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.3.1":{"name":"front-sdk","version":"0.3.1","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.3.1","maintainers":[{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"aae2244f271852db7eb04b9ce160e6ad830569bf","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.3.1.tgz","fileCount":36,"integrity":"sha512-i1X2QNvP8t453Si+EGgFhjwAhwKjyzVGik7dbToP+TnVwsCjgqyyPdadwjSB6WdNuwWosvugcjpy5+vUH9kpng==","signatures":[{"sig":"MEUCIQCyedp5HJ8uQHgfzWBD5BZVWMWauBUC2328O2feZxdXpgIgYHZAcodFrSWHlw1Lrc44zOpe2SQJ7wpxt6Spb0v6pzA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160573,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbn8rPCRA9TVsSAnZWagAAWUYP/jSElb052mQqzUZ56r50\nQtISWd2535RT4/Dm16ku2DUSumWqhESQYHDPEkUzJ9NFuFMYQRuFJ3pQX2cv\nX/T/KIuVUyoR0bw2krTiX8010R5iy3RdlQDqL7AzLaOrS1mAg710uuvQclm+\njeNAk14w3HKmgscW8SXEJqdL4JN1cu6gVLBLrWOw5+PACscxSbHdlGCLeVOM\nXxNadm+nmZA6NtAIDCWd1PeADdhK30JCXPiTbmoEiU0bu8VyUkLlKSSfDH4z\nJgl+w/PiJkqOY3OP1s/SfN787++/3rSsBV3t1hVvnuwO/MENA+eRYc5j8CH0\notxyETVDum0m6Ns/ECfnKslw3Zd0lQPbEkurSrQi4qQ7/jJ78sBhW8W9Lisa\ngQBzKJnwJlAy4LEXduxmUrfAMJgvbugyhSnm/7jGzEqMMjzdf0+1fBXCE9gi\nnbPbslEx/5Qhoop5pypW8AVsAqPKF7i3okKAMvXR6kCt880Y8oy6IP90ISOa\naCa6RigFdNe507LEgY60zpOkWzCfGO43g1y5EA5EoQoiKN77357DZ3S++eYP\naf4ik2mYl3ZWrxBYYA+VnbT0Vt65+ugncmlqZvzv9O80aS1AvpkCxJ/ImVJd\ntjYtY9ctd6hoYpoIDhftfftT12Wge2mA3FBrUZrX+JCXOJOuyWwJEILHlKVK\n/zpL\r\n=GbAN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"lib/index.ts","gitHead":"2e5c7124392667960864e6c57fc0130056da5c1f","scripts":{"lint":"gulp tslint","test":"gulp tslint && gulp test","build":"gulp build","prepublish":"npm run build"},"_npmUser":{"name":"resin.io","email":"accounts@resin.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"_npmVersion":"6.1.0","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"10.4.0","dependencies":{"lodash":"^4.17.2","express":"^4.15.3","request":"^2.79.0","bluebird":"^3.5.0","@types/node":"^6.0.48","body-parser":"^1.17.2","typed-error":"^1.0.1","@types/lodash":"^4.14.54","@types/express":"^4.0.35","@types/request":"^0.0.41","request-promise":"^4.1.1","@types/body-parser":"^1.16.3","@types/bluebird-global":"^3.0.1","@types/request-promise":"^4.1.33"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.3.0","github":"^9.2.0","tslint":"^4.5.1","gulp-util":"^3.0.8","gulp-mocha":"^3.0.0","typescript":"^2.3.2","@types/chai":"^3.5.1","chai-string":"^1.3.0","gulp-tslint":"^7.1.0","@types/mocha":"^2.2.41","gulp-sourcemaps":"^2.3.1","gulp-typescript":"^3.1.4","chai-as-promised":"^6.0.0","@types/chai-string":"^1.1.30","mocha-junit-reporter":"^1.13.0","@types/chai-as-promised":"0.0.30"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk_0.3.1_1537198798580_0.02760217372284024","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.3.2-upgrade-request-types-c9ebbe5d0f59ed644f77d06eda2ed3a735aafd4a":{"name":"front-sdk","version":"0.3.2-upgrade-request-types-c9ebbe5d0f59ed644f77d06eda2ed3a735aafd4a","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.3.2-upgrade-request-types-c9ebbe5d0f59ed644f77d06eda2ed3a735aafd4a","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"resin-ci","email":"accounts+npm-ci@resin.io"},{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"a47a2296bc30c92178a70ba7c56e4f47d029634c","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.3.2-upgrade-request-types-c9ebbe5d0f59ed644f77d06eda2ed3a735aafd4a.tgz","fileCount":36,"integrity":"sha512-F8Kc6eHLgc7uWqxfrhR0w1+MmM3rd6s9Km35D5b3Pt/55M7i+TRDPT8LOuN8vCinSGUsUEf6jpjRkDDnLGGkjQ==","signatures":[{"sig":"MEUCIQChcX2AxkyTwY6GB1khzZ58qa/5dlgIzlMhp05GlQ6VcgIgbxqQX/6Nzk/WXY6v+2mAEyrYcsDvKMI21cT1OhF9VrI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160718,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcEj26CRA9TVsSAnZWagAA2OMP/io4+3mPhJ3/+NYuiK08\nDVfWkvxWOdVpl/MK+J7ZyLxLpVRgoG4kWJWAJ4yhLXTZNTQldsbmgJ7cEsOu\nHajxLvYq5cqnLT/h8EjxlBAgyOplxIJ1A6hsVp4eK/FICIJlpNx/4eTJ4DWn\nhlwCq43QA+m5zbxej1m5673kmmHl2XDszFzQbZuOK2b7jXd10nBAMZy/4cKy\nPgqsHfdmQ2C63gFd0PETNPvTPSRnljTIS7aSXi47T1nwui/DeBgYwMvOmc1z\nmm5ekPpsytmU5kXhVnAG1Lu9qfPRbYLkh7zFjPnIJdSIbQ/ytsfm7tgYi3Ym\nRX9Y/7nXcR9keCEAME87UcH2vlh3gqvu1e1zFhWTh4cJtsxtqpLRvuPFZzoW\nGA6GR8xlSLLgyhEQ7+NkfBdUdHbmDJ2w1wTuU7DM5z6DijSG4BwLzZbMl3ff\n8fJ4imUjp0K3iCAD6yDYeW4w6Z8tqzFxJytUlHBN4Qf7CHddnOUgW85ikYkI\n6YPafLOWi9oFxiL7yHIkU5kI5prHEQeamFx25Xs5JHZNHEYtfWKLygLZxNk1\nxL9G/MRC9b8zp9fQRgM3wOMcv7BUETAGT+doTjqSvvlm3Fk48+vvjftIuZ72\n0PqsSXTDwDCW3R/ihkyqcJf5D0rShaHewUwIz210EFrN5L2fPk8DtdGyll4I\nhKLo\r\n=N1gC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"lib/index.ts","readme":"# front-sdk\nAn SDK for working with Front (https://frontapp.com).\n\n## TypeScript Quickstart\n\nImport in the usual way:\n\n```typescript\nimport { Front } from 'front-sdk';\n```\n\n## JavaScript\n\nRequire in the usual way:\n\n```javascript\nconst Front = require('front-sdk').Front;\n```\n\n## Usage\n\nCreate a new instance of the SDK to use it, passing the API token for Front.\n\n```typescript\nimport { Comment, Front } from 'front-sdk';\nconst front = new Front('abcdef123457890');\n\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}).then((comment: Comment) => {\n    console.log(comment);\n}).catch(FrontError, (err: FrontError) => {\n    console.log(err);\n});\n```\n\nCan also be used as a callback, if required:\n\n```typescript\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}, (err: FrontError, comment: FrontComment) => {\n    if (err) {\n        console.log(err);\n        return;\n    }\n\n    console.log(comment);\n});\n```\n\nClients can register for events, passing an object detailing a port to listen on using a new instance of an Express server, or an instance of an Express server to use. An optional path to install the webhook on can also be passed (this defaults to `/fronthook`).\n\nTo use this functionality, pass the secret shared key in as the second parameter when creating a new Front instance.\n```typescript\n    import { Event, Front } from 'front-sdk';\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    const httpServer = frontInst.registerEvents({ port: 1234, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nYou can also use a pre-existing Express instance, but note that the Front SDK expects that the request body should be an already parsed object or a JSON parseable string. You can easily add this using the `body-parser` library:\n\n```typescript\n    import { Event, Front } from 'front-sdk';\n    import * as bodyParser from 'body-parser';\n\n    const app = express();\n    app.use(bodyParser.json());\n    app.listen(1234);\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    frontInst.registerEvents({ server: app, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nThe SDK will verify that events sent to it are signed by the shared secret key, and will retrieve the entire event rather than just the preview. Events are sent to the client in the order the preview events for them were originally dispatched.\n\n#### Notes\n\nTo post into a Front Inbox, you need to know the correct channels in for it.\nChannels are instances of sources, such as SMTP, Facebook, Front Integrations, etc.\n\nSo to post a new Conversation:\n * Find the Inbox required want\n * List the Channels and find the correct one for the source (Integration channels, in the SDK case)\n * Post a Message to that Channel (which will return a Conversation reference)\n\nTo post a Comment or Message to that Conversation:\n * Use the Conversation reference to post (returns a Comment or Message object)\n","gitHead":"c9ebbe5d0f59ed644f77d06eda2ed3a735aafd4a","scripts":{"lint":"gulp tslint","test":"gulp tslint && gulp test","build":"gulp build","prepublish":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"_npmVersion":"6.1.0","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"10.4.0","dependencies":{"lodash":"^4.17.2","express":"^4.15.3","request":"^2.79.0","bluebird":"^3.5.0","@types/node":"^6.0.48","body-parser":"^1.17.2","typed-error":"^1.0.1","@types/lodash":"^4.14.54","@types/express":"^4.0.35","@types/request":"^2.48.1","request-promise":"^4.2.2","@types/body-parser":"^1.16.3","@types/bluebird-global":"^3.0.1","@types/request-promise":"^4.1.42"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.3.0","github":"^9.2.0","tslint":"^4.5.1","gulp-util":"^3.0.8","gulp-mocha":"^3.0.0","typescript":"^2.3.2","@types/chai":"^3.5.1","chai-string":"^1.3.0","gulp-tslint":"^7.1.0","@types/mocha":"^2.2.41","gulp-sourcemaps":"^2.3.1","gulp-typescript":"^3.1.4","chai-as-promised":"^6.0.0","@types/chai-string":"^1.1.30","mocha-junit-reporter":"^1.13.0","@types/chai-as-promised":"0.0.30"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk_0.3.2-upgrade-request-types-c9ebbe5d0f59ed644f77d06eda2ed3a735aafd4a_1544699321386_0.3357055455041611","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.3.2":{"name":"front-sdk","version":"0.3.2","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.3.2","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"resin-ci","email":"accounts+npm-ci@resin.io"},{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"bf5a6bf5150f5fec78ec6bc81baabdd7db69948a","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.3.2.tgz","fileCount":36,"integrity":"sha512-AxaaSdXeZaAzpSIOUVlVEA8LrdnSOGG+ul/pRkD0YnC+0Zm4MpOp/VSw5qlc+ufvN2k/G4y3o5objH3ujsjupw==","signatures":[{"sig":"MEYCIQDpiMPeF+jtAd7JCEWY50ba/4KXOyoBTqP/XfHlr3dFJQIhAJiu9VtfePH+RUnnz0vUvDJu3cy9JeLFcPasr7lMFdR+","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":160655,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcEj72CRA9TVsSAnZWagAAfpwP/Re5fhbv9k+6+QCKQyqz\n+xpbC8U9wb2b2MtiJDoAj8gGMM4D73Gp4pZIivSke8fp4QBbFiWEKQCWPvFn\nv7N7eH0GI7zzCUX1DmwrS9R8jElGiwiFpGciObC8VXVSm/gPPaNMmhchjasQ\n6noRXMqTIM5x5yk5NsJa3BWgnzeVzZYrvp+km/PZwmWwYKtoPHgeCBsnrQIM\n5hJ4IVMUjw0BnqWTN18qQ5+pa/teumdMeQFOZKVYW3PPHBZzyZFxX2ns7lKy\nnLfzRqK1Nn9j0bVz15Y0NPCpz1wBGhGSn3weiyWjr1Rc/01kYu67hj0w36Dh\nyd7wtBemBBc2xxo/HKxC+PbllDySkLG+0lGCUOuMeQLDSUZxv80ZY0afvBh6\nQB7Eh0Qjls+wm18MYZo+NI4Br4FK4xEfND1DqrnXzzdHCGDa7OBa6wNzjmGG\nbNTcNc7n1hS9Phc/P/sZVIJS1Fqs2fAwY471Xuz7ItAgMqvi5o5qHOIjYg+Z\ns3/TRXoAotooIorWyaceAUdfjNnRfgJbdV7pOFRFHnEADQZcjN64BGCtKDrE\n6gwgd55k50xAw6oqLW0j0Vs/bJPm/mGhGyelJijvtcctsPZPRMgtlFimmhly\nj6EY01p8WO0b2H5Vu56tX/CTGKm9juzoCeDfLxYL9UOHSTUqjLQ/mR4etkxV\nRHw7\r\n=Qcoa\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"lib/index.ts","gitHead":"88a64fd1dc3e3b8fcc5aee64af3f974d1c4e4d88","scripts":{"lint":"gulp tslint","test":"gulp tslint && gulp test","build":"gulp build","prepublish":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"_npmVersion":"6.1.0","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"10.4.0","dependencies":{"lodash":"^4.17.2","express":"^4.15.3","request":"^2.79.0","bluebird":"^3.5.0","@types/node":"^6.0.48","body-parser":"^1.17.2","typed-error":"^1.0.1","@types/lodash":"^4.14.54","@types/express":"^4.0.35","@types/request":"^2.48.1","request-promise":"^4.2.2","@types/body-parser":"^1.16.3","@types/bluebird-global":"^3.0.1","@types/request-promise":"^4.1.42"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.3.0","github":"^9.2.0","tslint":"^4.5.1","gulp-util":"^3.0.8","gulp-mocha":"^3.0.0","typescript":"^2.3.2","@types/chai":"^3.5.1","chai-string":"^1.3.0","gulp-tslint":"^7.1.0","@types/mocha":"^2.2.41","gulp-sourcemaps":"^2.3.1","gulp-typescript":"^3.1.4","chai-as-promised":"^6.0.0","@types/chai-string":"^1.1.30","mocha-junit-reporter":"^1.13.0","@types/chai-as-promised":"0.0.30"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk_0.3.2_1544699637959_0.10925619137309117","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.3.3-front-retries-5xx-b0a551c60baf2bfddf7eb6bdf18830d0e46bbe53":{"name":"front-sdk","version":"0.3.3-front-retries-5xx-b0a551c60baf2bfddf7eb6bdf18830d0e46bbe53","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.3.3-front-retries-5xx-b0a551c60baf2bfddf7eb6bdf18830d0e46bbe53","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"resin-ci","email":"accounts+npm-ci@resin.io"},{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"44b904d78ebab8ec62147c11dc88049ddef85b5b","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.3.3-front-retries-5xx-b0a551c60baf2bfddf7eb6bdf18830d0e46bbe53.tgz","fileCount":36,"integrity":"sha512-m3rDeKouH2ozLIadhSShqmXObUngyw4b+vtIU/5175SgxkLGylIKHOXXieTIW3Sz47FxqnWrobqEi+gSVSvlwQ==","signatures":[{"sig":"MEUCIAqJDE5pdoOjEc/aE8hHptoqB+5Fv4eTk6E5qi8B4QGXAiEA4P3B0nBf6/2CYqW3IQsIrfmRo7puiRxWYUMNYCz+1Fw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":162305,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcEkg2CRA9TVsSAnZWagAA8z0P/1/ez9XiOvOuhCPD+FFk\nh+Ujyhq6GDjYvpMcEjzb5FzhawSNHC78XhL3orWxKvIsA6cevqO14ZcE2xL/\ntfakgfIOBUcBfMkUlWRbeq3AYb5Bg9w8PQ7d5XJyV/J9YjTEi4Uee2SCqxBc\nQmQWntwW0a/QVh52EkDIV/IcT7810SMmsm/4H5mBfOYwXtSikXo99uENpmgv\n3H54UjSB2oyS6tkZXRZ/ZLB37n7A8cTdZ9BfuhOeAoRORtmC3Mek1Xdxxl4s\nGrhfKAir2vcCe0mUBg2VXxtVsBdl9q7StVhqR3XuYu2aUZkUo47IIiha34eu\niBsIXulpZWruj1LeOHRyv7ISubn4YwA0UNZndh4F1oHw9TWkjsQi+Au9NwU+\nfTBE1PR0CWp/Lfr6F++KLyeiy16HXz1MkFbRjjSzFwTacOdWzQqnzgxNuDOR\ne5C3hV4CGcElKOydR8X0zzz8B2dpiz1N8qZ7jFXASB6ogRBna+3xJ2FUnL9Y\nPumqQgZn+R/H8tXbBt5vIjdKa+5esH81a7aeKgZSRohGUo0308cegsXURNUi\nlr215+cI/FHXT9IpJBDom3uOATGeUTxw4dm2i5HlHNwyF+H1g240OBJH64gR\nCLyBhh5d/MVY0cLE53SnjkqyrSrEGwEzIb74fLfJKVb4S9/5cFNXvO584AD/\n/7KB\r\n=wozG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"lib/index.ts","readme":"# front-sdk\nAn SDK for working with Front (https://frontapp.com).\n\n## TypeScript Quickstart\n\nImport in the usual way:\n\n```typescript\nimport { Front } from 'front-sdk';\n```\n\n## JavaScript\n\nRequire in the usual way:\n\n```javascript\nconst Front = require('front-sdk').Front;\n```\n\n## Usage\n\nCreate a new instance of the SDK to use it, passing the API token for Front.\n\n```typescript\nimport { Comment, Front } from 'front-sdk';\nconst front = new Front('abcdef123457890');\n\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}).then((comment: Comment) => {\n    console.log(comment);\n}).catch(FrontError, (err: FrontError) => {\n    console.log(err);\n});\n```\n\nCan also be used as a callback, if required:\n\n```typescript\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}, (err: FrontError, comment: FrontComment) => {\n    if (err) {\n        console.log(err);\n        return;\n    }\n\n    console.log(comment);\n});\n```\n\nClients can register for events, passing an object detailing a port to listen on using a new instance of an Express server, or an instance of an Express server to use. An optional path to install the webhook on can also be passed (this defaults to `/fronthook`).\n\nTo use this functionality, pass the secret shared key in as the second parameter when creating a new Front instance.\n```typescript\n    import { Event, Front } from 'front-sdk';\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    const httpServer = frontInst.registerEvents({ port: 1234, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nYou can also use a pre-existing Express instance, but note that the Front SDK expects that the request body should be an already parsed object or a JSON parseable string. You can easily add this using the `body-parser` library:\n\n```typescript\n    import { Event, Front } from 'front-sdk';\n    import * as bodyParser from 'body-parser';\n\n    const app = express();\n    app.use(bodyParser.json());\n    app.listen(1234);\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    frontInst.registerEvents({ server: app, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nThe SDK will verify that events sent to it are signed by the shared secret key, and will retrieve the entire event rather than just the preview. Events are sent to the client in the order the preview events for them were originally dispatched.\n\n#### Notes\n\nTo post into a Front Inbox, you need to know the correct channels in for it.\nChannels are instances of sources, such as SMTP, Facebook, Front Integrations, etc.\n\nSo to post a new Conversation:\n * Find the Inbox required want\n * List the Channels and find the correct one for the source (Integration channels, in the SDK case)\n * Post a Message to that Channel (which will return a Conversation reference)\n\nTo post a Comment or Message to that Conversation:\n * Use the Conversation reference to post (returns a Comment or Message object)\n","gitHead":"b0a551c60baf2bfddf7eb6bdf18830d0e46bbe53","scripts":{"lint":"gulp tslint","test":"gulp tslint && gulp test","build":"gulp build","prepublish":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"_npmVersion":"6.1.0","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"10.4.0","dependencies":{"lodash":"^4.17.2","express":"^4.15.3","request":"^2.79.0","bluebird":"^3.5.0","@types/node":"^6.0.48","body-parser":"^1.17.2","typed-error":"^1.0.1","@types/lodash":"^4.14.54","@types/express":"^4.0.35","@types/request":"^2.48.1","request-promise":"^4.2.2","@types/body-parser":"^1.16.3","@types/bluebird-global":"^3.0.1","@types/request-promise":"^4.1.42"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.3.0","github":"^9.2.0","tslint":"^4.5.1","gulp-util":"^3.0.8","gulp-mocha":"^3.0.0","typescript":"^2.3.2","@types/chai":"^3.5.1","chai-string":"^1.3.0","gulp-tslint":"^7.1.0","@types/mocha":"^2.2.41","gulp-sourcemaps":"^2.3.1","gulp-typescript":"^3.1.4","chai-as-promised":"^6.0.0","@types/chai-string":"^1.1.30","mocha-junit-reporter":"^1.13.0","@types/chai-as-promised":"0.0.30"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk_0.3.3-front-retries-5xx-b0a551c60baf2bfddf7eb6bdf18830d0e46bbe53_1544702006415_0.2905320359499126","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.3.3-front-retries-5xx-a97ef5b4b045cb2b4d1bd72ff6440a10e7845968":{"name":"front-sdk","version":"0.3.3-front-retries-5xx-a97ef5b4b045cb2b4d1bd72ff6440a10e7845968","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.3.3-front-retries-5xx-a97ef5b4b045cb2b4d1bd72ff6440a10e7845968","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"resin-ci","email":"accounts+npm-ci@resin.io"},{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"e10e4f71e0877f52693d7e3d05b38f8dfd808d1a","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.3.3-front-retries-5xx-a97ef5b4b045cb2b4d1bd72ff6440a10e7845968.tgz","fileCount":36,"integrity":"sha512-kl9OTux68oenGXRV1lgM6lWjDQOh9rPzJn6l2K7k9RQsfds1G3ODUDiNALkfq/UK29pCBVdsDUdSQt4VuqsDKA==","signatures":[{"sig":"MEUCIQCuRgo6Jn3120rgaAF9Cy4u2tQydDzIgnAa1EYSebXcCgIgEEtIDeL2WmmlOE6qS1iMikgXUh6hAo92NtvxTZbjAu0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":162192,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcEkrWCRA9TVsSAnZWagAA3UgQAJ/BJI/G4Ae4JJcKs+jy\nKD+MKbVwUVHksIecXsUePQLn9oqIKJwZq3jnHH/EVtVDuN2VpJ1xJdtjej+P\n4eOdBY0UIgEgaVO8Th+DaOev7ZcoOuPIYaAIfyW5vBWyrXnRMg8rNRweZzjF\nhO5WkNwjOcmzuh3uZxmnPkmq5Juq0RZpxaKbf49n6eTPkTTjsn/WPjjL1vSw\nMvF8Sv1zd7wZzcfm1Y79RXtlZ5vd2HbU0y7Afkf9Y9yaOWNSiuuptvBgLtdN\nedFvgQY9XHBFJQ+ak00nZNlgeS1XkvTQGMja8mOMACT6VB2qREeOKK8/QtbE\nzEJmTU2w6oQU1g21yuJwzzYvXAQLkdVp+ckDzpVTNMF2wSCMQLoshSDzad2e\nNP3vSAQPpFiTDNbpvLj0vdVTZEBUdHlMDalq2szbhreHkHXSIbck0kIdtHzn\nBoGMltXCQ54502EwOeSSjxFvWYXI5DJTNMTL+4HUxpo85nC0QNt6Dm45tWXK\nLTZhEAeTPwxmeAGB865vdsMairGF2qkdfX57haTlKqfD5CTR+dUYyQkvAfkR\nU/6DEYi3nQLXcekTmyu7ZnotG5WSF/H2RF9nQsEF+27zV/3ASOv5i1FGInnI\n9sqcWR4WfsF5+fBJ6rPrzMilEN7Akiv+/lKSleHYz9DM0El5zXbsHOscWDoT\nX6dk\r\n=77jc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"lib/index.ts","readme":"# front-sdk\nAn SDK for working with Front (https://frontapp.com).\n\n## TypeScript Quickstart\n\nImport in the usual way:\n\n```typescript\nimport { Front } from 'front-sdk';\n```\n\n## JavaScript\n\nRequire in the usual way:\n\n```javascript\nconst Front = require('front-sdk').Front;\n```\n\n## Usage\n\nCreate a new instance of the SDK to use it, passing the API token for Front.\n\n```typescript\nimport { Comment, Front } from 'front-sdk';\nconst front = new Front('abcdef123457890');\n\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}).then((comment: Comment) => {\n    console.log(comment);\n}).catch(FrontError, (err: FrontError) => {\n    console.log(err);\n});\n```\n\nCan also be used as a callback, if required:\n\n```typescript\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}, (err: FrontError, comment: FrontComment) => {\n    if (err) {\n        console.log(err);\n        return;\n    }\n\n    console.log(comment);\n});\n```\n\nClients can register for events, passing an object detailing a port to listen on using a new instance of an Express server, or an instance of an Express server to use. An optional path to install the webhook on can also be passed (this defaults to `/fronthook`).\n\nTo use this functionality, pass the secret shared key in as the second parameter when creating a new Front instance.\n```typescript\n    import { Event, Front } from 'front-sdk';\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    const httpServer = frontInst.registerEvents({ port: 1234, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nYou can also use a pre-existing Express instance, but note that the Front SDK expects that the request body should be an already parsed object or a JSON parseable string. You can easily add this using the `body-parser` library:\n\n```typescript\n    import { Event, Front } from 'front-sdk';\n    import * as bodyParser from 'body-parser';\n\n    const app = express();\n    app.use(bodyParser.json());\n    app.listen(1234);\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    frontInst.registerEvents({ server: app, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nThe SDK will verify that events sent to it are signed by the shared secret key, and will retrieve the entire event rather than just the preview. Events are sent to the client in the order the preview events for them were originally dispatched.\n\n#### Notes\n\nTo post into a Front Inbox, you need to know the correct channels in for it.\nChannels are instances of sources, such as SMTP, Facebook, Front Integrations, etc.\n\nSo to post a new Conversation:\n * Find the Inbox required want\n * List the Channels and find the correct one for the source (Integration channels, in the SDK case)\n * Post a Message to that Channel (which will return a Conversation reference)\n\nTo post a Comment or Message to that Conversation:\n * Use the Conversation reference to post (returns a Comment or Message object)\n","gitHead":"a97ef5b4b045cb2b4d1bd72ff6440a10e7845968","scripts":{"lint":"gulp tslint","test":"gulp tslint && gulp test","build":"gulp build","prepublish":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"_npmVersion":"6.1.0","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"10.4.0","dependencies":{"lodash":"^4.17.2","express":"^4.15.3","request":"^2.79.0","bluebird":"^3.5.0","@types/node":"^6.0.48","body-parser":"^1.17.2","typed-error":"^1.0.1","@types/lodash":"^4.14.54","@types/express":"^4.0.35","@types/request":"^2.48.1","request-promise":"^4.2.2","@types/body-parser":"^1.16.3","@types/bluebird-global":"^3.0.1","@types/request-promise":"^4.1.42"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.3.0","github":"^9.2.0","tslint":"^4.5.1","gulp-util":"^3.0.8","gulp-mocha":"^3.0.0","typescript":"^2.3.2","@types/chai":"^3.5.1","chai-string":"^1.3.0","gulp-tslint":"^7.1.0","@types/mocha":"^2.2.41","gulp-sourcemaps":"^2.3.1","gulp-typescript":"^3.1.4","chai-as-promised":"^6.0.0","@types/chai-string":"^1.1.30","mocha-junit-reporter":"^1.13.0","@types/chai-as-promised":"0.0.30"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk_0.3.3-front-retries-5xx-a97ef5b4b045cb2b4d1bd72ff6440a10e7845968_1544702677507_0.995857213398067","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.3.3-front-retries-5xx-36c26683a19a02148af09fa47f29e22ac1a0aaf0":{"name":"front-sdk","version":"0.3.3-front-retries-5xx-36c26683a19a02148af09fa47f29e22ac1a0aaf0","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.3.3-front-retries-5xx-36c26683a19a02148af09fa47f29e22ac1a0aaf0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"resin-ci","email":"accounts+npm-ci@resin.io"},{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"4e62092c31d62d04045828b000308e98e425d124","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.3.3-front-retries-5xx-36c26683a19a02148af09fa47f29e22ac1a0aaf0.tgz","fileCount":36,"integrity":"sha512-TajllOSv/3AnYE4/D0UCJMqGES30107c5/P5o+Xx9ZDr1qvZaqIDIe1ZP3q6bmLseyaokh2Bs33Dw0T2fUNXfw==","signatures":[{"sig":"MEUCIQCKYbD3erXa4iTYW1Qku8HTEmaWCMG6ecOcvutTq0ZZtQIgfWFu9mKTjedoFMZKCchkadPx7BCSHgf2ul5D9B5/eMI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":162155,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcEkvXCRA9TVsSAnZWagAA1bsP/0LHKvmv4JgsBkpJzwRz\nSASMIPGOKpSBSJv7fpy9KX09Pd2fZseS/pVLsc154Hbu/X8rMbOCsulICYQG\nelrV3afX94ZSXUJMsO0/mF8SJTiqWP/sJ8KBsFwStbzEVBVoS3Ra6MHnpJ7j\nju5U96UvnThdg23A/WWr+nFzfPUd6DLLfUBskijJLVrv+pJLLat1rD8pCys0\nIj0vvVpM4wUhoGxVPre6Phf/+y5X7gLp104aBDI4vPSUN1kr/vsjboxutF87\nepvt1eehpZRSlifviPJTXUnuhGW+AH8WdqpSi2mPQNVEcmbEiQpBOVa4wbQc\nFrm+wWZhOz1MDCzUN9vkVxpEQSKXDXrGd3WxzH0koitTFhgQpzNEEB2vj2+k\nU4cndTepXKJvYRaZ4C8vVq/bsqX6PVpgYBvu5xVzcBDy1IkanqWdrE2ihZJN\n6Yim32rW55R2aQZCE6FbgQglk8P6tSut8tn97iSLOIH3tKk0ryslKoABTiDX\nL1GkhAPM/dnZqE8HLIi/yT8Xe97kAktAegfKTc5x5jzKLSe22H3MtmmmI/pj\nUkKmT7HD/INGJ9WtjBiLTEIPCyg5B4epS83YRIEW2g0wriWi6aUQJwFiKQxA\ntB46LnU1O7kINbzkNAvLLYi5httH6ilw2eGlMuoS3h/gdYVRBHKFYx2rB1Z+\nlaSt\r\n=x/sw\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"lib/index.ts","readme":"# front-sdk\nAn SDK for working with Front (https://frontapp.com).\n\n## TypeScript Quickstart\n\nImport in the usual way:\n\n```typescript\nimport { Front } from 'front-sdk';\n```\n\n## JavaScript\n\nRequire in the usual way:\n\n```javascript\nconst Front = require('front-sdk').Front;\n```\n\n## Usage\n\nCreate a new instance of the SDK to use it, passing the API token for Front.\n\n```typescript\nimport { Comment, Front } from 'front-sdk';\nconst front = new Front('abcdef123457890');\n\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}).then((comment: Comment) => {\n    console.log(comment);\n}).catch(FrontError, (err: FrontError) => {\n    console.log(err);\n});\n```\n\nCan also be used as a callback, if required:\n\n```typescript\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}, (err: FrontError, comment: FrontComment) => {\n    if (err) {\n        console.log(err);\n        return;\n    }\n\n    console.log(comment);\n});\n```\n\nClients can register for events, passing an object detailing a port to listen on using a new instance of an Express server, or an instance of an Express server to use. An optional path to install the webhook on can also be passed (this defaults to `/fronthook`).\n\nTo use this functionality, pass the secret shared key in as the second parameter when creating a new Front instance.\n```typescript\n    import { Event, Front } from 'front-sdk';\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    const httpServer = frontInst.registerEvents({ port: 1234, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nYou can also use a pre-existing Express instance, but note that the Front SDK expects that the request body should be an already parsed object or a JSON parseable string. You can easily add this using the `body-parser` library:\n\n```typescript\n    import { Event, Front } from 'front-sdk';\n    import * as bodyParser from 'body-parser';\n\n    const app = express();\n    app.use(bodyParser.json());\n    app.listen(1234);\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    frontInst.registerEvents({ server: app, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nThe SDK will verify that events sent to it are signed by the shared secret key, and will retrieve the entire event rather than just the preview. Events are sent to the client in the order the preview events for them were originally dispatched.\n\n#### Notes\n\nTo post into a Front Inbox, you need to know the correct channels in for it.\nChannels are instances of sources, such as SMTP, Facebook, Front Integrations, etc.\n\nSo to post a new Conversation:\n * Find the Inbox required want\n * List the Channels and find the correct one for the source (Integration channels, in the SDK case)\n * Post a Message to that Channel (which will return a Conversation reference)\n\nTo post a Comment or Message to that Conversation:\n * Use the Conversation reference to post (returns a Comment or Message object)\n","gitHead":"36c26683a19a02148af09fa47f29e22ac1a0aaf0","scripts":{"lint":"gulp tslint","test":"gulp tslint && gulp test","build":"gulp build","prepublish":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"_npmVersion":"6.1.0","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"10.4.0","dependencies":{"lodash":"^4.17.2","express":"^4.15.3","request":"^2.79.0","bluebird":"^3.5.0","@types/node":"^6.0.48","body-parser":"^1.17.2","typed-error":"^1.0.1","@types/lodash":"^4.14.54","@types/express":"^4.0.35","@types/request":"^2.48.1","request-promise":"^4.2.2","@types/body-parser":"^1.16.3","@types/bluebird-global":"^3.0.1","@types/request-promise":"^4.1.42"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.3.0","github":"^9.2.0","tslint":"^4.5.1","gulp-util":"^3.0.8","gulp-mocha":"^3.0.0","typescript":"^2.3.2","@types/chai":"^3.5.1","chai-string":"^1.3.0","gulp-tslint":"^7.1.0","@types/mocha":"^2.2.41","gulp-sourcemaps":"^2.3.1","gulp-typescript":"^3.1.4","chai-as-promised":"^6.0.0","@types/chai-string":"^1.1.30","mocha-junit-reporter":"^1.13.0","@types/chai-as-promised":"0.0.30"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk_0.3.3-front-retries-5xx-36c26683a19a02148af09fa47f29e22ac1a0aaf0_1544702934958_0.7232950680023209","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.3.3":{"name":"front-sdk","version":"0.3.3","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.3.3","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"resin-ci","email":"accounts+npm-ci@resin.io"},{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"e836f1effc3dedf28576cea73a038bb50087d2e2","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.3.3.tgz","fileCount":36,"integrity":"sha512-6szMZ1CS/KdstSc+SEDfu5WfieAJycUC1kLiX+4AZj7QUn6jFdYQOcoQHuQvWlt0wY894Bl3QHpbhKjrpx99gg==","signatures":[{"sig":"MEUCIQCABixho9h/TbjNiHfgbL+lF/b5WFDWCedVDFbloCm7zgIgYhPcng5M1LGqdaDhQE/OWHtWX5avWcKkwZJd5l2cymQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":162096,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcElaaCRA9TVsSAnZWagAA+LIQAJRA+Y+cSNIzObCzyZk5\nm09G8j5U9F6ga1HRaaQ8LFCfBZT8N7LX14ob50nS6t7fFkyQh6fTEyEfDSn3\nhVVp9CAmmN210Xrvihk9+MAiUOHbadXJTMn/G1z4ypithiK/TiTlUl2HtSVK\nZk1Xxz1UdRz0yLUT+V+MAM85TQ9E+0Reg9+/6cceNLbfVa9SzGFLgyS+niez\nzRdKabV8+vNextm1KGgCmfaT/SK0jDGj0vrVVKDCei+ufq9BumRKyCDHsDul\nAIuqUl3rjfLxxAR9NWDUUHazDHETioIKhFT+eL7WI4eHHF2kOCD0iZJqJIBQ\nGE9ituq9FN239nIokwLcphFl+pLE52gZn+DJrE9gxn4nXHa5au742hdsmlp6\nkXGs9ZU8PAsXI5UVdUKaM1gmazDlDbl2gAOmgNSNZKlGKa14rTRnFEGiMhYi\n9Aokl67iHuSeBghmpSIWaSI8tCbRVm3I505UaN3yXeiRGNS7R8XQLo7Wd1OF\nZNzkbIXMV62ZQzAyU4o7kJ1Jjoeo9MYSUsG0aStHhBPIsK7l2gFs22Up9vYM\nyx/6fuhi/NYG/kYgfrOhKQGGs7zQULU4/4li6sCD4utgBCZBwrt0qUgo/B0O\nDLGD/SqTSS9Gk5GpgK3ueUM8LYFijGdvXfhlTgGVwHq9JSS/wJO5zwuXHSYZ\nyEbQ\r\n=bvPG\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"lib/index.ts","gitHead":"50b0029966563fab8a96540e30bdc80eada3247b","scripts":{"lint":"gulp tslint","test":"gulp tslint && gulp test","build":"gulp build","prepublish":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"_npmVersion":"6.1.0","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"10.4.0","dependencies":{"lodash":"^4.17.2","express":"^4.15.3","request":"^2.79.0","bluebird":"^3.5.0","@types/node":"^6.0.48","body-parser":"^1.17.2","typed-error":"^1.0.1","@types/lodash":"^4.14.54","@types/express":"^4.0.35","@types/request":"^2.48.1","request-promise":"^4.2.2","@types/body-parser":"^1.16.3","@types/bluebird-global":"^3.0.1","@types/request-promise":"^4.1.42"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.3.0","github":"^9.2.0","tslint":"^4.5.1","gulp-util":"^3.0.8","gulp-mocha":"^3.0.0","typescript":"^2.3.2","@types/chai":"^3.5.1","chai-string":"^1.3.0","gulp-tslint":"^7.1.0","@types/mocha":"^2.2.41","gulp-sourcemaps":"^2.3.1","gulp-typescript":"^3.1.4","chai-as-promised":"^6.0.0","@types/chai-string":"^1.1.30","mocha-junit-reporter":"^1.13.0","@types/chai-as-promised":"0.0.30"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk_0.3.3_1544705690321_0.6454341271672797","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.3.4-better-errors-b964e3ce591b1c81225fe4eef1d749be36a27aa6":{"name":"front-sdk","version":"0.3.4-better-errors-b964e3ce591b1c81225fe4eef1d749be36a27aa6","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.3.4-better-errors-b964e3ce591b1c81225fe4eef1d749be36a27aa6","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"resin-ci","email":"accounts+npm-ci@resin.io"},{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"806e2c0ae3adf035213d728d781413d9ffd06cbd","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.3.4-better-errors-b964e3ce591b1c81225fe4eef1d749be36a27aa6.tgz","fileCount":36,"integrity":"sha512-avM0pA14WiAICKglESsgbp9yykvPZ3Co+HcatXcfmGfzWs/B3Rno/h73ty9nqFcjgMC6IOqEVN11KQntJ0Jr+w==","signatures":[{"sig":"MEQCIBVI2E2UdxexsqwPOwyDtGFn8X2xnBM3h4K4g3BrlOMzAiBQoBiWIXgG5THmiV8/wodWKZnPaTSwxASOjzqACb2SnQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":162698,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcL6VfCRA9TVsSAnZWagAAuNQP/0g9NDknlZ77ycsmbHMW\nyhN3MpMhxzodW+MEfX94hOH5PwNIvEuOCBauWRUuuuef0OtCigXvng0Fusyr\nHb/85GIY5hqLjQgXti4qcyL+OeetXAGCqAlhhqqrvMB4820JUJZkEC4AU39D\n4HpFc5ypN5+w3sZLd5Ev6MCcrs2AHuCOJHBlIbfndp1ofvIuPb1kf4sHhE0M\nm3HGIlsqskTFWZ2nQPKRvmdxDgwtOXytLWSOm0XGtiYit3kWUzBp17aeUg3X\nCDDT82+KxJQyoxWifLQG5Zh2vqaRPyDLS62Dk+7Je7B/nPdG5bac0nTCo7Qc\nRhpExC/+WaJ5gNhi6WPGi40hEh358UtN3krp5dD7aLDBCO8JBXmRnsqvtaga\nA5vsqN6DlA/ecTe666dgmC/PvbwyHaqMb2nxHHNhtiMc6GcJjidTlCN5ooyn\nvdSwzYgrmsEA+fan29bGVgc9qz56bTqU9RnaHuQLrOEx9unbg1a4BZ3PztFo\npObp6NUWH8cG+6gxX5/KggMWqYoix046CRUid7sA0K6QXK7oTKOeoXOufy5Z\n4WEAfe+EvbiT2SGP9nNlxhKQnSpjJ/YqEnL5ba7LtmBBi+QGSOPuQI2S0m28\nEMSoibLP/OvyTp3w5q9tMik5Q9DbYZUzsPWIYlifrg0ryKXuH3BEmzsbX4pv\nWRAR\r\n=yUlb\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"lib/index.ts","readme":"# front-sdk\nAn SDK for working with Front (https://frontapp.com).\n\n## TypeScript Quickstart\n\nImport in the usual way:\n\n```typescript\nimport { Front } from 'front-sdk';\n```\n\n## JavaScript\n\nRequire in the usual way:\n\n```javascript\nconst Front = require('front-sdk').Front;\n```\n\n## Usage\n\nCreate a new instance of the SDK to use it, passing the API token for Front.\n\n```typescript\nimport { Comment, Front } from 'front-sdk';\nconst front = new Front('abcdef123457890');\n\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}).then((comment: Comment) => {\n    console.log(comment);\n}).catch(FrontError, (err: FrontError) => {\n    console.log(err);\n});\n```\n\nCan also be used as a callback, if required:\n\n```typescript\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}, (err: FrontError, comment: FrontComment) => {\n    if (err) {\n        console.log(err);\n        return;\n    }\n\n    console.log(comment);\n});\n```\n\nClients can register for events, passing an object detailing a port to listen on using a new instance of an Express server, or an instance of an Express server to use. An optional path to install the webhook on can also be passed (this defaults to `/fronthook`).\n\nTo use this functionality, pass the secret shared key in as the second parameter when creating a new Front instance.\n```typescript\n    import { Event, Front } from 'front-sdk';\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    const httpServer = frontInst.registerEvents({ port: 1234, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nYou can also use a pre-existing Express instance, but note that the Front SDK expects that the request body should be an already parsed object or a JSON parseable string. You can easily add this using the `body-parser` library:\n\n```typescript\n    import { Event, Front } from 'front-sdk';\n    import * as bodyParser from 'body-parser';\n\n    const app = express();\n    app.use(bodyParser.json());\n    app.listen(1234);\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    frontInst.registerEvents({ server: app, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nThe SDK will verify that events sent to it are signed by the shared secret key, and will retrieve the entire event rather than just the preview. Events are sent to the client in the order the preview events for them were originally dispatched.\n\n#### Notes\n\nTo post into a Front Inbox, you need to know the correct channels in for it.\nChannels are instances of sources, such as SMTP, Facebook, Front Integrations, etc.\n\nSo to post a new Conversation:\n * Find the Inbox required want\n * List the Channels and find the correct one for the source (Integration channels, in the SDK case)\n * Post a Message to that Channel (which will return a Conversation reference)\n\nTo post a Comment or Message to that Conversation:\n * Use the Conversation reference to post (returns a Comment or Message object)\n","gitHead":"b964e3ce591b1c81225fe4eef1d749be36a27aa6","scripts":{"lint":"gulp tslint","test":"gulp tslint && gulp test","build":"gulp build","prepublish":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"_npmVersion":"6.1.0","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"10.4.0","dependencies":{"lodash":"^4.17.2","express":"^4.15.3","request":"^2.79.0","bluebird":"^3.5.0","@types/node":"^6.0.48","body-parser":"^1.17.2","typed-error":"^1.0.1","@types/lodash":"^4.14.54","@types/express":"^4.0.35","@types/request":"^2.48.1","request-promise":"^4.2.2","@types/body-parser":"^1.16.3","@types/bluebird-global":"^3.0.1","@types/request-promise":"^4.1.42"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.3.0","github":"^9.2.0","tslint":"^4.5.1","gulp-util":"^3.0.8","gulp-mocha":"^3.0.0","typescript":"^2.3.2","@types/chai":"^3.5.1","chai-string":"^1.3.0","gulp-tslint":"^7.1.0","@types/mocha":"^2.2.41","gulp-sourcemaps":"^2.3.1","gulp-typescript":"^3.1.4","chai-as-promised":"^6.0.0","@types/chai-string":"^1.1.30","mocha-junit-reporter":"^1.13.0","@types/chai-as-promised":"0.0.30"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk_0.3.4-better-errors-b964e3ce591b1c81225fe4eef1d749be36a27aa6_1546626398355_0.1312606586281453","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.3.4-better-errors-96b0b739b770af2d9cedd2bf15d11d046055f724":{"name":"front-sdk","version":"0.3.4-better-errors-96b0b739b770af2d9cedd2bf15d11d046055f724","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.3.4-better-errors-96b0b739b770af2d9cedd2bf15d11d046055f724","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"resin-ci","email":"accounts+npm-ci@resin.io"},{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"e4f26be3c98dbc436af599c85192aa0e91e640f0","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.3.4-better-errors-96b0b739b770af2d9cedd2bf15d11d046055f724.tgz","fileCount":36,"integrity":"sha512-P1B3jalGv/bRLN0fAC6ZSeqHmVQyHLj3Lr+Zt8McpnIXsXCy8UuzScy7V3fQ9fMIiW2LAz8tugwM0/1gTGMmkA==","signatures":[{"sig":"MEUCICqtck46NDxV3+Wp6myqTH5NhuK1cTVlaI0KAy6LA2MaAiEA8tM1WuLydk5k0ZVucW9Lxfa2uqU2AALIGlS61/eUjDs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":162704,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcL6d0CRA9TVsSAnZWagAAdwMP/jqvNGWmbz4fQj1fUA8y\nKLZ41yhWC8jb7J7xOWpw3HtJtez4cYxPbDi6K5VSF92Kyx/a0kLFFqGa+7fq\nrJ+ynrraBLUU7F2LlHWlaz3S6HBtUczR1ot9WBeRj3Ak3iFptwDESWe+3C6f\n1quYkhH/jrmbPUDaa5DdQlsMl2JqDZi5RzfHf/TI9zSQyvFtBJLpzshQsfrA\nJ4SffWsVSVzwMerF/Mit6XiMT8bCEj+YS9qD/jKMoqag2zW4XZk0aFrpXGRv\nYUCLruRZuQp08EQIpxOAf/2C2FdV1xbY6qPZxwrhHfxrdirTZU+Oj7TT3+6r\nBS7O6A9vghby6TOMTcb/fK7MQQvsXPgT4jQNTGxD7FMQSUHD6wGhOBMKr+qD\nH75fxVrC8hh0B8ztaTYk3WEbIeaRgvDrGmWNO1jkBmgDxESJlpYvXCDZyx41\naj8YRimmnSzHxaIAOzMAPOytC4ZvDfcT25mD6ngMNqdKP7MuIoOO5Xh5R1cb\n+S8K5g+uvckRiWndKJ2bst5AYdclke//506s6UkfPvJdtlkX01KQ00Su4y9P\nE5tet8KLuniVLphwcvMrh9JipwBrtmgb3NIppAiPdVgcPtVeTeMrzK6q6PRf\nQFGaWR/9dlSXRrsb22dfMZRMYw3dk8NBrUylUOE3A3eW3H9aeU1DjHRZf98n\nR8kw\r\n=ZqaZ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"lib/index.ts","readme":"# front-sdk\nAn SDK for working with Front (https://frontapp.com).\n\n## TypeScript Quickstart\n\nImport in the usual way:\n\n```typescript\nimport { Front } from 'front-sdk';\n```\n\n## JavaScript\n\nRequire in the usual way:\n\n```javascript\nconst Front = require('front-sdk').Front;\n```\n\n## Usage\n\nCreate a new instance of the SDK to use it, passing the API token for Front.\n\n```typescript\nimport { Comment, Front } from 'front-sdk';\nconst front = new Front('abcdef123457890');\n\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}).then((comment: Comment) => {\n    console.log(comment);\n}).catch(FrontError, (err: FrontError) => {\n    console.log(err);\n});\n```\n\nCan also be used as a callback, if required:\n\n```typescript\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}, (err: FrontError, comment: FrontComment) => {\n    if (err) {\n        console.log(err);\n        return;\n    }\n\n    console.log(comment);\n});\n```\n\nClients can register for events, passing an object detailing a port to listen on using a new instance of an Express server, or an instance of an Express server to use. An optional path to install the webhook on can also be passed (this defaults to `/fronthook`).\n\nTo use this functionality, pass the secret shared key in as the second parameter when creating a new Front instance.\n```typescript\n    import { Event, Front } from 'front-sdk';\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    const httpServer = frontInst.registerEvents({ port: 1234, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nYou can also use a pre-existing Express instance, but note that the Front SDK expects that the request body should be an already parsed object or a JSON parseable string. You can easily add this using the `body-parser` library:\n\n```typescript\n    import { Event, Front } from 'front-sdk';\n    import * as bodyParser from 'body-parser';\n\n    const app = express();\n    app.use(bodyParser.json());\n    app.listen(1234);\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    frontInst.registerEvents({ server: app, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nThe SDK will verify that events sent to it are signed by the shared secret key, and will retrieve the entire event rather than just the preview. Events are sent to the client in the order the preview events for them were originally dispatched.\n\n#### Notes\n\nTo post into a Front Inbox, you need to know the correct channels in for it.\nChannels are instances of sources, such as SMTP, Facebook, Front Integrations, etc.\n\nSo to post a new Conversation:\n * Find the Inbox required want\n * List the Channels and find the correct one for the source (Integration channels, in the SDK case)\n * Post a Message to that Channel (which will return a Conversation reference)\n\nTo post a Comment or Message to that Conversation:\n * Use the Conversation reference to post (returns a Comment or Message object)\n","gitHead":"96b0b739b770af2d9cedd2bf15d11d046055f724","scripts":{"lint":"gulp tslint","test":"gulp tslint && gulp test","build":"gulp build","prepublish":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"_npmVersion":"6.1.0","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"10.4.0","dependencies":{"lodash":"^4.17.2","express":"^4.15.3","request":"^2.79.0","bluebird":"^3.5.0","@types/node":"^6.0.48","body-parser":"^1.17.2","typed-error":"^1.0.1","@types/lodash":"^4.14.54","@types/express":"^4.0.35","@types/request":"^2.48.1","request-promise":"^4.2.2","@types/body-parser":"^1.16.3","@types/bluebird-global":"^3.0.1","@types/request-promise":"^4.1.42"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.3.0","github":"^9.2.0","tslint":"^4.5.1","gulp-util":"^3.0.8","gulp-mocha":"^3.0.0","typescript":"^2.3.2","@types/chai":"^3.5.1","chai-string":"^1.3.0","gulp-tslint":"^7.1.0","@types/mocha":"^2.2.41","gulp-sourcemaps":"^2.3.1","gulp-typescript":"^3.1.4","chai-as-promised":"^6.0.0","@types/chai-string":"^1.1.30","mocha-junit-reporter":"^1.13.0","@types/chai-as-promised":"0.0.30"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk_0.3.4-better-errors-96b0b739b770af2d9cedd2bf15d11d046055f724_1546626932024_0.1902448160151764","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.3.4":{"name":"front-sdk","version":"0.3.4","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.3.4","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"resin-ci","email":"accounts+npm-ci@resin.io"},{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"4c4f7f5e7bd5b455148197f354b4419f6e71e906","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.3.4.tgz","fileCount":36,"integrity":"sha512-2Ph9NLmpornnSB/2bQv5r7uzLfzCONel4uZ6tAi+2KyrpkicqV3fZKIvzgGT/LJ650Z7DwKnJtz5m1G477ENmg==","signatures":[{"sig":"MEUCIQDJMAlySHgiUgW7UiY3DhFo3S8H17sG1hAIN/suA/w6+AIgLjsBUVJOImdaivdCUjwDyrEl4yA4o/Dn3z0rfrWmeSg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":162649,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcL6mGCRA9TVsSAnZWagAABycQAJx7fBrV3aot/qdeLBEA\nC/vueZpLzbT3/f0fQNjzJv6MUtqHl+CwbAiKikJJ5l58Y39SDn7c79CzZaag\nTtbjVhtDNUbxKJHjg2+5EDJ/KWSaelD3vFronc3qGRI2s2n/qxOuQnAqHbDK\nzeYMpMaliB85nQL9Remibvd/xXEvccRlKBXkGvWSY9bS0W86cSd7r6cnrZah\nxfz4dHlV1cMQ5ucLWtr1W+OkfERYre/29KlwMDTMZOZxN+S5qxhIOVMGgrwp\nEnBbcaOYHcQCLATgtXQWDqSK5Y8589FjhtyWCqxjb/ZocDVY6RkJ7P2SXhMk\na9WngC9LC0qWfpuQr5A4iZsLo87HM/8014HAbhMeewUrUav8SBu11WOIuVDt\nFHyPXz1FopKHC26fCIu/1uO+Gjn3Sb/RBnARC+S82MaRn3dzIuzNcQSrq2f4\nKhRJXx8VXWg4s8UKdZ2xlVHJrDCS1xpAqd5Dxq1CkezXKJDpvu9Fst/pqsFg\nBy1+uM+Tyyv3T99u7J2V3Mu6FXYymo7Z/kud4nnCI3g3Gxp7RwB3vGGCW6Z2\noijGPx1ZoWhi5P+GITlRlLHIIZ1RfHrmNhkNfL24fmsgQVTNuENRbSYOji+Q\nxNsCQjbVh2DvnSJoxySF3a7P/d7rcKYOg6glCLmdJ1dx3o6zrMtdlFfdqsj5\nt7L4\r\n=BHWC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"lib/index.ts","gitHead":"f890e07fef181b40826920ad34e235d3b8028f31","scripts":{"lint":"gulp tslint","test":"gulp tslint && gulp test","build":"gulp build","prepublish":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"_npmVersion":"6.1.0","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"10.4.0","dependencies":{"lodash":"^4.17.2","express":"^4.15.3","request":"^2.79.0","bluebird":"^3.5.0","@types/node":"^6.0.48","body-parser":"^1.17.2","typed-error":"^1.0.1","@types/lodash":"^4.14.54","@types/express":"^4.0.35","@types/request":"^2.48.1","request-promise":"^4.2.2","@types/body-parser":"^1.16.3","@types/bluebird-global":"^3.0.1","@types/request-promise":"^4.1.42"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.3.0","github":"^9.2.0","tslint":"^4.5.1","gulp-util":"^3.0.8","gulp-mocha":"^3.0.0","typescript":"^2.3.2","@types/chai":"^3.5.1","chai-string":"^1.3.0","gulp-tslint":"^7.1.0","@types/mocha":"^2.2.41","gulp-sourcemaps":"^2.3.1","gulp-typescript":"^3.1.4","chai-as-promised":"^6.0.0","@types/chai-string":"^1.1.30","mocha-junit-reporter":"^1.13.0","@types/chai-as-promised":"0.0.30"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk_0.3.4_1546627462379_0.16434356845352793","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.3.5-correctly-handle-more-error-info-6955f3ec674ca2e4e7948aad2c10f4283f8457b4":{"name":"front-sdk","version":"0.3.5-correctly-handle-more-error-info-6955f3ec674ca2e4e7948aad2c10f4283f8457b4","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.3.5-correctly-handle-more-error-info-6955f3ec674ca2e4e7948aad2c10f4283f8457b4","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"resin-ci","email":"accounts+npm-ci@resin.io"},{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"e0821930a8dc08bc6e62c37c0928b82a86e926e9","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.3.5-correctly-handle-more-error-info-6955f3ec674ca2e4e7948aad2c10f4283f8457b4.tgz","fileCount":36,"integrity":"sha512-HGwOVmr/HbSBlTgS1QKmj4dm5BfWSoklYPswmDGRpBr1LXDYnFMbtu0a+hnyQ+Q/S7aSdjFnG1vEUjf/+1K92w==","signatures":[{"sig":"MEQCIESe8aBuVS0vRWjcqJ0t8gZEg7B8BlTv4xwvUD/0fv/8AiAjN52sXoSg3Q3eqcvxQ29WIL+s+5wXjAIaLbXVIpHudA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":162985,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcNL/OCRA9TVsSAnZWagAAfToQAJAf75eU6lTGDUWRBz+v\nZ92JyvGbM1uVfCjy+ujDdDKsduWdqI4rxHL2+jdJSEmJyEn1GnvPhJUjmWQ+\n2/vHeEUzuGNSadED6i8x9EGcQlKvQJyYllsR0d5/RaXkmx4ElLjXw3JNRVNG\numoiavgEOe7cOUhDxvOPKXY383Tj6sEFOTEPLpZTEqqdwRDYitNtwZm+fCDl\nezqO5qIPibY0GXG2pgCeXsYgueGHr7lzx+Dui/+FZsYwGvpNMEOKM2Fefmol\nowaBAW6UMhehbqs+XJD5lNVXU9/wfOw2ExFkG2pkzKBXGQerr4jk0ER+tOlI\nwVLOrKid0KfKCG92ecWU8X3cPp0kuAjCudGWlGjyVdyOe+RLXUc4IeeGVP23\n8ocUNLqO52mZf3kb/7Y1IVRHoLrPoSCpwdxGxzJwDrvsUkYg2LUVGZcNph4o\nJp6acMX5e5FsQdZvMFwg/9Ab3K5w7pmrsKj1Gfdr/oyVfGLk2FLVnO8h2nt4\nl2fWp4RAfZdiVfwManeJiJ3WrFzYtkClXWLXL+ZvpcXWUnzn8rb0Wjdd4pCj\nXPNmbP5oGblK/Z3DtexwFxiljQnAC3aVP1+Ha3KEEiHX/QYfoPRuQevbQ0TF\nExLxOHv8sPr7ohvl5j0/T8YhfLJl+n5AjoMnsWDyrDcfYD0XgHgd1fUAiyuP\nAcmH\r\n=0nRh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"lib/index.ts","readme":"# front-sdk\nAn SDK for working with Front (https://frontapp.com).\n\n## TypeScript Quickstart\n\nImport in the usual way:\n\n```typescript\nimport { Front } from 'front-sdk';\n```\n\n## JavaScript\n\nRequire in the usual way:\n\n```javascript\nconst Front = require('front-sdk').Front;\n```\n\n## Usage\n\nCreate a new instance of the SDK to use it, passing the API token for Front.\n\n```typescript\nimport { Comment, Front } from 'front-sdk';\nconst front = new Front('abcdef123457890');\n\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}).then((comment: Comment) => {\n    console.log(comment);\n}).catch(FrontError, (err: FrontError) => {\n    console.log(err);\n});\n```\n\nCan also be used as a callback, if required:\n\n```typescript\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}, (err: FrontError, comment: FrontComment) => {\n    if (err) {\n        console.log(err);\n        return;\n    }\n\n    console.log(comment);\n});\n```\n\nClients can register for events, passing an object detailing a port to listen on using a new instance of an Express server, or an instance of an Express server to use. An optional path to install the webhook on can also be passed (this defaults to `/fronthook`).\n\nTo use this functionality, pass the secret shared key in as the second parameter when creating a new Front instance.\n```typescript\n    import { Event, Front } from 'front-sdk';\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    const httpServer = frontInst.registerEvents({ port: 1234, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nYou can also use a pre-existing Express instance, but note that the Front SDK expects that the request body should be an already parsed object or a JSON parseable string. You can easily add this using the `body-parser` library:\n\n```typescript\n    import { Event, Front } from 'front-sdk';\n    import * as bodyParser from 'body-parser';\n\n    const app = express();\n    app.use(bodyParser.json());\n    app.listen(1234);\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    frontInst.registerEvents({ server: app, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nThe SDK will verify that events sent to it are signed by the shared secret key, and will retrieve the entire event rather than just the preview. Events are sent to the client in the order the preview events for them were originally dispatched.\n\n#### Notes\n\nTo post into a Front Inbox, you need to know the correct channels in for it.\nChannels are instances of sources, such as SMTP, Facebook, Front Integrations, etc.\n\nSo to post a new Conversation:\n * Find the Inbox required want\n * List the Channels and find the correct one for the source (Integration channels, in the SDK case)\n * Post a Message to that Channel (which will return a Conversation reference)\n\nTo post a Comment or Message to that Conversation:\n * Use the Conversation reference to post (returns a Comment or Message object)\n","gitHead":"6955f3ec674ca2e4e7948aad2c10f4283f8457b4","scripts":{"lint":"gulp tslint","test":"gulp tslint && gulp test","build":"gulp build","prepublish":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"_npmVersion":"6.1.0","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"10.4.0","dependencies":{"lodash":"^4.17.2","express":"^4.15.3","request":"^2.79.0","bluebird":"^3.5.0","@types/node":"^6.0.48","body-parser":"^1.17.2","typed-error":"^1.0.1","@types/lodash":"^4.14.54","@types/express":"^4.0.35","@types/request":"^2.48.1","request-promise":"^4.2.2","@types/body-parser":"^1.16.3","@types/bluebird-global":"^3.0.1","@types/request-promise":"^4.1.42"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.3.0","github":"^9.2.0","tslint":"^4.5.1","gulp-util":"^3.0.8","gulp-mocha":"^3.0.0","typescript":"^2.3.2","@types/chai":"^3.5.1","chai-string":"^1.3.0","gulp-tslint":"^7.1.0","@types/mocha":"^2.2.41","gulp-sourcemaps":"^2.3.1","gulp-typescript":"^3.1.4","chai-as-promised":"^6.0.0","@types/chai-string":"^1.1.30","mocha-junit-reporter":"^1.13.0","@types/chai-as-promised":"0.0.30"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk_0.3.5-correctly-handle-more-error-info-6955f3ec674ca2e4e7948aad2c10f4283f8457b4_1546960845783_0.11489564636612126","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.3.5":{"name":"front-sdk","version":"0.3.5","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.3.5","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"resin-ci","email":"accounts+npm-ci@resin.io"},{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"7245a4e25437b131cc6bbedf3e01f6ac681f2d3f","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.3.5.tgz","fileCount":36,"integrity":"sha512-PPvfSSpt+5zq0s3iuxpMQ/syheGU/cnLLEgGO75kOfyFurwEAZxumZSVTIYVFH34rIp2wcdX3nrSAfd5DLCjXg==","signatures":[{"sig":"MEQCIDHGW5T5hNK0XwowpSuENDCDYmT7X0MQhc6yeLqe8mU9AiBYGAYPLHQ/rl57eto3BUj0xA8HXQEEotUyJtHZrlKxoQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":162911,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcNMRECRA9TVsSAnZWagAAvCMP/3gscZr8DaSbIB/T9Mz5\n0AsAcV0cmgflQXUKxP3f8b80AkF8lkNv/8fQtjeVqLL5+/q4IOmKCOV3gALG\nGTcrBtj7otxrL+6RsOoIUGzRm+gIb78SWuvHfW18xNeSSuk0VBR8A8u47aa8\n61ehqLiOV0J6yj52zbEzREgN+Ss/wfZ2J6Ya47zCoD9qAfMokH6vvhxvOhFz\nh8C/i+rbsfSs5ov1+ls+Gr8fvVUajvxkfLyoyD+IF8nj7W3P2ROoV+1qSdYs\nSThsaUHiXesN4irl7MXwgL70u0yTSIQhnSx/23sO+6uNdOClT6K2OsBxgKJq\n5MgnoHOYwVkAoKjdqAOASpkayCJzDbHwk21BJp1VrmvOSpmGQwxi5DjGPEg9\nl93SQwVj8iGgifUaMpKkB77avBqM0iBGDEdbQZTX7eMwZARsvKRXPh3eTHwh\nuccx2FHL04j+RCvsSZPTh5tyVMSSfZWZV0kGSVvOcer9MWQhfVHcC6axpdHO\nOwRJM5dJeQ9T+/BWuUZB6X8oiPcak91YELi2rDYm8YXsi20b//drn/D3iMCX\nzTnamudKsmnaj0+4dyfdIRX/jovScBuqWaEHzhsMY/uOBGFkfcHhc1j9TQHK\nlKUZHttBXACOcOorSc3XXIYGhMAutZqwcsUo8Rul6IPNhzC9qBngh/YSLL+t\n8uaj\r\n=9OYt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"lib/index.ts","gitHead":"6641e13c1089782c0bb9dd2689780f4712fd1c19","scripts":{"lint":"gulp tslint","test":"gulp tslint && gulp test","build":"gulp build","prepublish":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"_npmVersion":"6.1.0","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"10.4.0","dependencies":{"lodash":"^4.17.2","express":"^4.15.3","request":"^2.79.0","bluebird":"^3.5.0","@types/node":"^6.0.48","body-parser":"^1.17.2","typed-error":"^1.0.1","@types/lodash":"^4.14.54","@types/express":"^4.0.35","@types/request":"^2.48.1","request-promise":"^4.2.2","@types/body-parser":"^1.16.3","@types/bluebird-global":"^3.0.1","@types/request-promise":"^4.1.42"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.3.0","github":"^9.2.0","tslint":"^4.5.1","gulp-util":"^3.0.8","gulp-mocha":"^3.0.0","typescript":"^2.3.2","@types/chai":"^3.5.1","chai-string":"^1.3.0","gulp-tslint":"^7.1.0","@types/mocha":"^2.2.41","gulp-sourcemaps":"^2.3.1","gulp-typescript":"^3.1.4","chai-as-promised":"^6.0.0","@types/chai-string":"^1.1.30","mocha-junit-reporter":"^1.13.0","@types/chai-as-promised":"0.0.30"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk_0.3.5_1546961987456_0.3022852739931423","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.3.6-fix-messages-and-tags-typing-7f6b03dfd1dc366914d2d4ceb975ef48218df24f":{"name":"front-sdk","version":"0.3.6-fix-messages-and-tags-typing-7f6b03dfd1dc366914d2d4ceb975ef48218df24f","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.3.6-fix-messages-and-tags-typing-7f6b03dfd1dc366914d2d4ceb975ef48218df24f","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"resin-ci","email":"accounts+npm-ci@resin.io"},{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"de0cb974b2e93f93b92c2b9af411ff831b1e6467","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.3.6-fix-messages-and-tags-typing-7f6b03dfd1dc366914d2d4ceb975ef48218df24f.tgz","fileCount":36,"integrity":"sha512-KW8Ac09mOhFX8fBego9ttY5iSIvHYFnYozUW7HYEC1whnusoe37PXMVRvpgHsHP/ycijF8Ef0SUBh/iB2DkLIA==","signatures":[{"sig":"MEQCICbH6yK2sZkrQ87PiUk8muFOrKWiNu+21J1iUBG/kHepAiBFqdiByAZ1tDga4h3Z8L8sI6eU3FJXtAvu+1p8bk7PYw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":163078,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcWaXlCRA9TVsSAnZWagAA1qAP/0XOJBSy1fAWWuclPq5H\nxcfsdLxNSDAhErlzXfA7HKTOI0fgIV+BILeb+U9IuAiHpUI2wr0t6b5sKfFO\nYtDUmF++vcrL1AN1BeRKjcgtsCFWl1F7hW7PhwXNUdClYgSGKsG1hpaAcAKM\nosQ4HxmwMPeokhFthTKUjls2zPDgQ2kTBlY1B3OVY8IHxHvq89I9vEDoY1Vs\nqrgSU0YvYdH1HoPvbRhWyYW3h8ny8cu8ZLbEjzX4ZCO2VnR5BCOogKtIUeVD\nuKC5DkkQ4cHVe8kz27OGm7V5Y87arN57bBdaNcGe6J4N03dXpGbtKzwVQtiK\n0lP7Iz8Ds62rMrzqTWqrywsO2YiE3jbQ1c55lBW811zj0TFKkXNIQgVgxBPF\n1YHuJODBixOck11yUOCwf16bsjZmAtzL/oD48TPPMqBxpAT5jgSSKruqod7W\nRAbXeDCBgmQuS8XT79+d7OMcDNiaws35AgCszvrWAbCyCHvR/dc8JTAn/I2X\nVY0UQx99y2WuI6ugddSPXd5jf5QaXvMFxlM6IqQ8cFup7LOQ+SZL8dpvLH0D\n8rjlP1E/XwYtWESm608l9y3xx7S0Zey6WWWXybpHbK7qJNSsFck1coOQ5TbR\nXyTkZLUnyZF+pItFZ+UDMXX8nU0zZMQ/136PbGar7apbTmCtD4dx9vnbxjwK\nlC0h\r\n=lYF9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"lib/index.ts","readme":"# front-sdk\nAn SDK for working with Front (https://frontapp.com).\n\n## TypeScript Quickstart\n\nImport in the usual way:\n\n```typescript\nimport { Front } from 'front-sdk';\n```\n\n## JavaScript\n\nRequire in the usual way:\n\n```javascript\nconst Front = require('front-sdk').Front;\n```\n\n## Usage\n\nCreate a new instance of the SDK to use it, passing the API token for Front.\n\n```typescript\nimport { Comment, Front } from 'front-sdk';\nconst front = new Front('abcdef123457890');\n\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}).then((comment: Comment) => {\n    console.log(comment);\n}).catch(FrontError, (err: FrontError) => {\n    console.log(err);\n});\n```\n\nCan also be used as a callback, if required:\n\n```typescript\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}, (err: FrontError, comment: FrontComment) => {\n    if (err) {\n        console.log(err);\n        return;\n    }\n\n    console.log(comment);\n});\n```\n\nClients can register for events, passing an object detailing a port to listen on using a new instance of an Express server, or an instance of an Express server to use. An optional path to install the webhook on can also be passed (this defaults to `/fronthook`).\n\nTo use this functionality, pass the secret shared key in as the second parameter when creating a new Front instance.\n```typescript\n    import { Event, Front } from 'front-sdk';\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    const httpServer = frontInst.registerEvents({ port: 1234, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nYou can also use a pre-existing Express instance, but note that the Front SDK expects that the request body should be an already parsed object or a JSON parseable string. You can easily add this using the `body-parser` library:\n\n```typescript\n    import { Event, Front } from 'front-sdk';\n    import * as bodyParser from 'body-parser';\n\n    const app = express();\n    app.use(bodyParser.json());\n    app.listen(1234);\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    frontInst.registerEvents({ server: app, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nThe SDK will verify that events sent to it are signed by the shared secret key, and will retrieve the entire event rather than just the preview. Events are sent to the client in the order the preview events for them were originally dispatched.\n\n#### Notes\n\nTo post into a Front Inbox, you need to know the correct channels in for it.\nChannels are instances of sources, such as SMTP, Facebook, Front Integrations, etc.\n\nSo to post a new Conversation:\n * Find the Inbox required want\n * List the Channels and find the correct one for the source (Integration channels, in the SDK case)\n * Post a Message to that Channel (which will return a Conversation reference)\n\nTo post a Comment or Message to that Conversation:\n * Use the Conversation reference to post (returns a Comment or Message object)\n","gitHead":"7f6b03dfd1dc366914d2d4ceb975ef48218df24f","scripts":{"lint":"gulp tslint","test":"gulp tslint && gulp test","build":"gulp build","prepublish":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"_npmVersion":"6.7.0","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"10.4.0","dependencies":{"lodash":"^4.17.2","express":"^4.15.3","request":"^2.79.0","bluebird":"^3.5.0","@types/node":"^6.0.48","body-parser":"^1.17.2","typed-error":"^1.0.1","@types/lodash":"^4.14.54","@types/express":"^4.0.35","@types/request":"^2.48.1","request-promise":"^4.2.2","@types/body-parser":"^1.16.3","@types/bluebird-global":"^3.0.1","@types/request-promise":"^4.1.42"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.3.0","github":"^9.2.0","tslint":"^4.5.1","gulp-util":"^3.0.8","gulp-mocha":"^3.0.0","typescript":"^2.3.2","@types/chai":"^3.5.1","chai-string":"^1.3.0","gulp-tslint":"^7.1.0","@types/mocha":"^2.2.41","gulp-sourcemaps":"^2.3.1","gulp-typescript":"^3.1.4","chai-as-promised":"^6.0.0","@types/chai-string":"^1.1.30","mocha-junit-reporter":"^1.13.0","@types/chai-as-promised":"0.0.30"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk_0.3.6-fix-messages-and-tags-typing-7f6b03dfd1dc366914d2d4ceb975ef48218df24f_1549379044776_0.3527192941342596","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.3.6":{"name":"front-sdk","version":"0.3.6","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.3.6","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"resin-ci","email":"accounts+npm-ci@resin.io"},{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"1c85ff0c65f6e8fea051af8c92ec670a399afe35","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.3.6.tgz","fileCount":36,"integrity":"sha512-+i1kCVfFzBMkH8LViph6Mawv/s8yo16PUhQBXQXkKX6eLeDquhEqMo07epGPNZNrgW0FknWq/rsOxNaV6Js6tg==","signatures":[{"sig":"MEQCIE1ckxTbm9DFqj4jZ/1CpIVlzs7Jj9wvSBqtDlPi84RrAiBd4L3SYLyyV8YOeMuYLWLaMqbytpmUVUWQ1v8gZ05E8g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":163008,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcXUAtCRA9TVsSAnZWagAACwcP/jFt9tZlIMAF2nU+pHca\nxGVnZfa5J0swXkBpiEKdzV4zQZ8hGrumdeVr0INwyysKYIGSl6DotR3LQhCP\npAP7+tzVvnW3Ao1QUVvufnEB4mvSHxobmK102brpUcrqzqcMSSO1LSpakfC6\n60rTKeNQ63tZf4QF3ZKYn/bHSVYp9s21UXTNCS8pfvGuMnWb3Vo4LgwOjUDT\n32/FyfDJ+q81wQfRTwCGCDwuSMOyH8RstqFpmt7TkfWOchvjQLqxxB9LdY7A\n7F+lgdWDdjaFXRsuTU07v6chY5GCigeD58PkmlGJTgUJy8A2sgrhv/OhF/s7\nOf+mrrsu/Ekthp3IwALlwQ7Y5gwRlpuGbLcnEFYlqE/+9liHVe2nOmypJJLT\nUeUsQAeSRYKKBsKafmVhsqe8g8+a+TDI4RsDu52E1LXcW08cGIqG0DTb+T4/\nGFlCRXQGaGCvKVWhIC4EDC5TNMV2ssAfTVsO1V3q6jbTrsamIyZzHsdELtCF\nhzcGhRdmWXtjHho5S4Jv8obNgCRH+0ClecIWjlVXoHKq+Jnh2CmE8HMGY5cY\nollFzhC+aIQLjtPeFyw9rqGb3mkzntgtAw5Y0ybkvKucMhWdvm3/T/vgIZW4\n54JQMEGGUdrOgmAnKKnC1j+IZUYJb96t7hCRV8MrNoanWaUgki2UE+HljPSM\nMWQ5\r\n=K7iN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"lib/index.ts","gitHead":"75f2b70773757eada1476955816c92dd7b5e7d1c","scripts":{"lint":"gulp tslint","test":"gulp tslint && gulp test","build":"gulp build","prepublish":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"_npmVersion":"6.7.0","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"10.4.0","dependencies":{"lodash":"^4.17.2","express":"^4.15.3","request":"^2.79.0","bluebird":"^3.5.0","@types/node":"^6.0.48","body-parser":"^1.17.2","typed-error":"^1.0.1","@types/lodash":"^4.14.54","@types/express":"^4.0.35","@types/request":"^2.48.1","request-promise":"^4.2.2","@types/body-parser":"^1.16.3","@types/bluebird-global":"^3.0.1","@types/request-promise":"^4.1.42"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.3.0","github":"^9.2.0","tslint":"^4.5.1","gulp-util":"^3.0.8","gulp-mocha":"^3.0.0","typescript":"^2.3.2","@types/chai":"^3.5.1","chai-string":"^1.3.0","gulp-tslint":"^7.1.0","@types/mocha":"^2.2.41","gulp-sourcemaps":"^2.3.1","gulp-typescript":"^3.1.4","chai-as-promised":"^6.0.0","@types/chai-string":"^1.1.30","mocha-junit-reporter":"^1.13.0","@types/chai-as-promised":"0.0.30"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk_0.3.6_1549615148162_0.6696195659885311","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.4.0-29-add-create-channel-6e840a4f9ad13f4fd4c2619e27b569a07465eb60":{"name":"front-sdk","version":"0.4.0-29-add-create-channel-6e840a4f9ad13f4fd4c2619e27b569a07465eb60","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.4.0-29-add-create-channel-6e840a4f9ad13f4fd4c2619e27b569a07465eb60","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"resin-ci","email":"accounts+npm-ci@resin.io"},{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"51e33e3923b125a6527e53416df3fe4edc9a9ffd","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.4.0-29-add-create-channel-6e840a4f9ad13f4fd4c2619e27b569a07465eb60.tgz","fileCount":36,"integrity":"sha512-B3P2VnhrksHA52WvVnLAFwR8mzQF05L9Q+6orDYxZbfNp+m4YoQjBUEZrHUZodMiC9Vu/fS5aFCyYjpiXIhiaw==","signatures":[{"sig":"MEUCIQDOZ1qhi1fymW6xD7m7gVGsdSGH9XBvUxINP8OgGBdFcAIgSyC3dLB28q6YDBYROHiTpjk0yzLO265cbWaE8flw9+o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":164288,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcjn3MCRA9TVsSAnZWagAARPIP/3bQxhsxittCH4GTKgOm\n8qoOaP0xGE7RK5FW1IPt5AstaUOhkrOBypuIShmhAnNIddwAhIXAxogSUPQF\nQth0OHdMTQCymuaXb/gzmkHpL3fKWxqfogToMq23Llgxv/WpTNA99V2+fUmG\nkYI03ipAwLjEZzn8/Rz6/kDz4Fy2UFL4z6NIAbDBee/WW7Djn1xNhH8Z1ZvQ\nUXEB+C700XuObawG1G0zNaV8PJpnmjYA0KISi0SQLOSosHnUipogwEeLwSQC\nGOKIQH8x3HZIB414huiEoS0Wrbhdq/9gLQEvAZJNtASxtPbOr0ia9LZWARmZ\n+wLkzKTmmpMoMyBZBkCwQ1v8dWa2aN3sysKfl3PyObJcphk/uWq94Mre651M\nwqtdl02abNpRg8cDqssVH3TOD4sFFizI20jLtEVkyX12kF1p7JDh6buUu1UC\nE/iPoRZPL7iZ9HqMw9JRuINb7Urfqg6hnAiy4YkKayYInd7v64GEtPnJLAfj\nQN6CfPZjBQ8wz2vjeylZu3/L5GbExOzVE6AjguRuR4Mio9iGC87T8/xMQIgj\n+6JvC8NwZVOC1oaosXU6ADxNkTE9WRld7ZtRbmntDxZqtWm+ZDuQ0cDenUYm\nrFkXxpe1+YVvNUACXkZVM4u1lBP6XxNC8Lpx44e2lLF8I/ICIS0NetW3VuVu\ncv6o\r\n=q+L9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"lib/index.ts","readme":"# front-sdk\nAn SDK for working with Front (https://frontapp.com).\n\n## TypeScript Quickstart\n\nImport in the usual way:\n\n```typescript\nimport { Front } from 'front-sdk';\n```\n\n## JavaScript\n\nRequire in the usual way:\n\n```javascript\nconst Front = require('front-sdk').Front;\n```\n\n## Usage\n\nCreate a new instance of the SDK to use it, passing the API token for Front.\n\n```typescript\nimport { Comment, Front } from 'front-sdk';\nconst front = new Front('abcdef123457890');\n\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}).then((comment: Comment) => {\n    console.log(comment);\n}).catch(FrontError, (err: FrontError) => {\n    console.log(err);\n});\n```\n\nCan also be used as a callback, if required:\n\n```typescript\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}, (err: FrontError, comment: FrontComment) => {\n    if (err) {\n        console.log(err);\n        return;\n    }\n\n    console.log(comment);\n});\n```\n\nClients can register for events, passing an object detailing a port to listen on using a new instance of an Express server, or an instance of an Express server to use. An optional path to install the webhook on can also be passed (this defaults to `/fronthook`).\n\nTo use this functionality, pass the secret shared key in as the second parameter when creating a new Front instance.\n```typescript\n    import { Event, Front } from 'front-sdk';\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    const httpServer = frontInst.registerEvents({ port: 1234, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nYou can also use a pre-existing Express instance, but note that the Front SDK expects that the request body should be an already parsed object or a JSON parseable string. You can easily add this using the `body-parser` library:\n\n```typescript\n    import { Event, Front } from 'front-sdk';\n    import * as bodyParser from 'body-parser';\n\n    const app = express();\n    app.use(bodyParser.json());\n    app.listen(1234);\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    frontInst.registerEvents({ server: app, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nThe SDK will verify that events sent to it are signed by the shared secret key, and will retrieve the entire event rather than just the preview. Events are sent to the client in the order the preview events for them were originally dispatched.\n\n#### Notes\n\nTo post into a Front Inbox, you need to know the correct channels in for it.\nChannels are instances of sources, such as SMTP, Facebook, Front Integrations, etc.\n\nSo to post a new Conversation:\n * Find the Inbox required want\n * List the Channels and find the correct one for the source (Integration channels, in the SDK case)\n * Post a Message to that Channel (which will return a Conversation reference)\n\nTo post a Comment or Message to that Conversation:\n * Use the Conversation reference to post (returns a Comment or Message object)\n","gitHead":"6e840a4f9ad13f4fd4c2619e27b569a07465eb60","scripts":{"lint":"gulp tslint","test":"gulp tslint && gulp test","build":"gulp build","prepublish":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"_npmVersion":"6.7.0","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"10.4.0","dependencies":{"lodash":"^4.17.2","express":"^4.15.3","request":"^2.79.0","bluebird":"^3.5.0","@types/node":"^6.0.48","body-parser":"^1.17.2","typed-error":"^1.0.1","@types/lodash":"^4.14.54","@types/express":"^4.0.35","@types/request":"^2.48.1","request-promise":"^4.2.2","@types/body-parser":"^1.16.3","@types/bluebird-global":"^3.0.1","@types/request-promise":"^4.1.42"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.3.0","github":"^9.2.0","tslint":"^4.5.1","gulp-util":"^3.0.8","gulp-mocha":"^3.0.0","typescript":"^2.3.2","@types/chai":"^3.5.1","chai-string":"^1.3.0","gulp-tslint":"^7.1.0","@types/mocha":"^2.2.41","gulp-sourcemaps":"^2.3.1","gulp-typescript":"^3.1.4","chai-as-promised":"^6.0.0","@types/chai-string":"^1.1.30","mocha-junit-reporter":"^1.13.0","@types/chai-as-promised":"0.0.30"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk_0.4.0-29-add-create-channel-6e840a4f9ad13f4fd4c2619e27b569a07465eb60_1552842186990_0.13492379961083678","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.4.0-29-add-create-channel-e7b1385b573e8c08cdb6e17d76b40624b518d9a2":{"name":"front-sdk","version":"0.4.0-29-add-create-channel-e7b1385b573e8c08cdb6e17d76b40624b518d9a2","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.4.0-29-add-create-channel-e7b1385b573e8c08cdb6e17d76b40624b518d9a2","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"resin-ci","email":"accounts+npm-ci@resin.io"},{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"b5b65cae85d039e7e986cd2a986cdac8eeed62a1","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.4.0-29-add-create-channel-e7b1385b573e8c08cdb6e17d76b40624b518d9a2.tgz","fileCount":36,"integrity":"sha512-A3leObMMxOuP3GEl5QCUyV6CUWhvEsaiAfgG8PmPt3aSaBzKuNRXu20hRroAqKbftGYsSafCPZ2YP1fVeGvRJg==","signatures":[{"sig":"MEYCIQDVTD2tnDhs30kKDLWTgbw5hfPR7hhA4YOou8wPQcpM4wIhAP6S0OuH2705UE44uxUUywamk1JNltBaQ77mYsqPSjGm","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":164288,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcmBEuCRA9TVsSAnZWagAAqdwP/0UounmKCF5sTSLzQYX3\nLUM0WoeyN0TpUdcvCuabpZpXa1KZmRbZAB/+gh5asxa4Cy1wYJ03MbCZh6Xn\nfgJMeWWo5oC9U9KjFb8TE9F5TAETtmqCAFtK08NeXCxHsmpMa1W+RkxGSM7U\n5fkQPJ4tAtiTTb7Mj0sf3XdVjb3fIuJIzI6VkL6SN5IPO9kH7b8OnXJhGYq5\nXwXag0Su0d/TIPovgY4ncgQMP7qJZcHBAXloptK1ABGQpRDGmlHw6hyjrlII\nfcd57kqZ7xUcp6XMm/cKghhU+V5Gv7aLAtWiEd5YCASaCcp/yE5JZTi2V8nc\nyXlSv4NkCYYwL2mGfs4eujcZuybf+C707icgf3DRY1FsDvWEQ0wxg5F/ekBr\nd4jHy0CS5Fg57h+vlPL7ahjRaWR3OIbjda7pIcH9l8Bz9ZBbO6ciWNp8ldTB\npgTLyJWqFKcfxV4hoYzqUUppffOIxaobCt0sdY0MJiVWzgKZCWIW2tdpRvwB\nqHRuXdvpK3c1Xp2HqrUH9T00VPmdf/Gc/nruEL0TmkIz9uWNXyP+k0aRm2T2\nl374E0VD6nyaPNIKSNWKl23lIq8HeM9nBKH/OeSmiFB6EhI8xehmBarBAyJq\naBK5S9IWoxVq2ozR/wB6kmBqbsOzhtD7j1vxeBl6YWafaA9eA9zTO6Q1hzr0\n/5O4\r\n=+4uX\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"lib/index.ts","readme":"# front-sdk\nAn SDK for working with Front (https://frontapp.com).\n\n## TypeScript Quickstart\n\nImport in the usual way:\n\n```typescript\nimport { Front } from 'front-sdk';\n```\n\n## JavaScript\n\nRequire in the usual way:\n\n```javascript\nconst Front = require('front-sdk').Front;\n```\n\n## Usage\n\nCreate a new instance of the SDK to use it, passing the API token for Front.\n\n```typescript\nimport { Comment, Front } from 'front-sdk';\nconst front = new Front('abcdef123457890');\n\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}).then((comment: Comment) => {\n    console.log(comment);\n}).catch(FrontError, (err: FrontError) => {\n    console.log(err);\n});\n```\n\nCan also be used as a callback, if required:\n\n```typescript\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}, (err: FrontError, comment: FrontComment) => {\n    if (err) {\n        console.log(err);\n        return;\n    }\n\n    console.log(comment);\n});\n```\n\nClients can register for events, passing an object detailing a port to listen on using a new instance of an Express server, or an instance of an Express server to use. An optional path to install the webhook on can also be passed (this defaults to `/fronthook`).\n\nTo use this functionality, pass the secret shared key in as the second parameter when creating a new Front instance.\n```typescript\n    import { Event, Front } from 'front-sdk';\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    const httpServer = frontInst.registerEvents({ port: 1234, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nYou can also use a pre-existing Express instance, but note that the Front SDK expects that the request body should be an already parsed object or a JSON parseable string. You can easily add this using the `body-parser` library:\n\n```typescript\n    import { Event, Front } from 'front-sdk';\n    import * as bodyParser from 'body-parser';\n\n    const app = express();\n    app.use(bodyParser.json());\n    app.listen(1234);\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    frontInst.registerEvents({ server: app, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nThe SDK will verify that events sent to it are signed by the shared secret key, and will retrieve the entire event rather than just the preview. Events are sent to the client in the order the preview events for them were originally dispatched.\n\n#### Notes\n\nTo post into a Front Inbox, you need to know the correct channels in for it.\nChannels are instances of sources, such as SMTP, Facebook, Front Integrations, etc.\n\nSo to post a new Conversation:\n * Find the Inbox required want\n * List the Channels and find the correct one for the source (Integration channels, in the SDK case)\n * Post a Message to that Channel (which will return a Conversation reference)\n\nTo post a Comment or Message to that Conversation:\n * Use the Conversation reference to post (returns a Comment or Message object)\n","gitHead":"e7b1385b573e8c08cdb6e17d76b40624b518d9a2","scripts":{"lint":"gulp tslint","test":"gulp tslint && gulp test","build":"gulp build","prepublish":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"_npmVersion":"6.7.0","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"10.4.0","dependencies":{"lodash":"^4.17.2","express":"^4.15.3","request":"^2.79.0","bluebird":"^3.5.0","@types/node":"^6.0.48","body-parser":"^1.17.2","typed-error":"^1.0.1","@types/lodash":"^4.14.54","@types/express":"^4.0.35","@types/request":"^2.48.1","request-promise":"^4.2.2","@types/body-parser":"^1.16.3","@types/bluebird-global":"^3.0.1","@types/request-promise":"^4.1.42"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.3.0","github":"^9.2.0","tslint":"^4.5.1","gulp-util":"^3.0.8","gulp-mocha":"^3.0.0","typescript":"^2.3.2","@types/chai":"^3.5.1","chai-string":"^1.3.0","gulp-tslint":"^7.1.0","@types/mocha":"^2.2.41","gulp-sourcemaps":"^2.3.1","gulp-typescript":"^3.1.4","chai-as-promised":"^6.0.0","@types/chai-string":"^1.1.30","mocha-junit-reporter":"^1.13.0","@types/chai-as-promised":"0.0.30"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk_0.4.0-29-add-create-channel-e7b1385b573e8c08cdb6e17d76b40624b518d9a2_1553469741457_0.3549739145075448","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.4.0-31-add-circleci-config-89be2582eaecaac3e2a19dc94cc572981038d0ff":{"name":"front-sdk","version":"0.4.0-31-add-circleci-config-89be2582eaecaac3e2a19dc94cc572981038d0ff","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.4.0-31-add-circleci-config-89be2582eaecaac3e2a19dc94cc572981038d0ff","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"resin-ci","email":"accounts+npm-ci@resin.io"},{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"5625bb5cfa6e06b97e9a3320f7f113601f8abd75","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.4.0-31-add-circleci-config-89be2582eaecaac3e2a19dc94cc572981038d0ff.tgz","fileCount":38,"integrity":"sha512-W/zFf+h6Oq0Vf0LkC0g/Ej8bzFAlmq2huIW4T32wtnjB6/wGO5qppuLZx+qw5Ci7ZSf8IukfNaqucSap4y9KfQ==","signatures":[{"sig":"MEYCIQD6gHTUVGgZHgnWI3TSZGEHTZ6l9Wz7x72woTWq4/i7ZAIhALK+L3G/AZneGJCDRzeEEG43PWLzhk3ir8CrWUbmAQEL","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":164083,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcmOuyCRA9TVsSAnZWagAAy7IP+gKWx3ugUys7R87A96sS\nbKIjtZ/O/u2aTfydA69M46Eb/qyolimw8Tea+CNNCu7yunHnQLu3dwiTz8FI\nFTdldWcGA1yqZnlISZ6hTU1yKShEga2ADW3zQxm8xb1G9LCb9EQB7LL47d6B\nb39q6DEM5oWTIGaLwG1/w3xmqhVkwJPwdCDUQVfpvrGfJ8BXXdHaPlClpc6E\nUvpsvB7Ouw1vEXpFSV8p1NQUmyMw2yFFhiO1ShA8iynb3XyYufFCfakiP6qx\nTHyxMYcsqTMD3bUtyhMM+GFDCYIND4NKe9rZtwRY5exSVhER9JKFFEtleYRR\n8Qdg/EailG/9UHtnWICqDPjVmFZubD0QD3nEoEYEbxOOFioJjI80gmrrpjlt\nBT94zsnFChId+73lvMFUDpx+7Plzt5xXaMn8cYw8ogIMeTksVFsdeaI0veBo\nXZUc2k9V+s/Eyo98o1k2+fmkG2c+4H0nXtmaapEkAmz0ukpAwkxVhITpbr2p\ng0QFmriDpt8gidgGyxJQ3+TTc4vIBx43gVQRzTU9eZoIRQPQH6Y62ECtyaxs\nGhZyXD1DMlOJjZpIkZ+rnxTocc7RfL581igz9o+XhTyaepsIYLtS5SR4W6Mx\nObjuYcFKm3cVcs4CJH95q5n/3sHHBm/eegjlvNyyjThpcTbL6eaIxsD8/aSQ\n+mjr\r\n=H3c3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"lib/index.ts","readme":"# front-sdk\nAn SDK for working with Front (https://frontapp.com).\n\n## TypeScript Quickstart\n\nImport in the usual way:\n\n```typescript\nimport { Front } from 'front-sdk';\n```\n\n## JavaScript\n\nRequire in the usual way:\n\n```javascript\nconst Front = require('front-sdk').Front;\n```\n\n## Usage\n\nCreate a new instance of the SDK to use it, passing the API token for Front.\n\n```typescript\nimport { Comment, Front } from 'front-sdk';\nconst front = new Front('abcdef123457890');\n\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}).then((comment: Comment) => {\n    console.log(comment);\n}).catch(FrontError, (err: FrontError) => {\n    console.log(err);\n});\n```\n\nCan also be used as a callback, if required:\n\n```typescript\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}, (err: FrontError, comment: FrontComment) => {\n    if (err) {\n        console.log(err);\n        return;\n    }\n\n    console.log(comment);\n});\n```\n\nClients can register for events, passing an object detailing a port to listen on using a new instance of an Express server, or an instance of an Express server to use. An optional path to install the webhook on can also be passed (this defaults to `/fronthook`).\n\nTo use this functionality, pass the secret shared key in as the second parameter when creating a new Front instance.\n```typescript\n    import { Event, Front } from 'front-sdk';\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    const httpServer = frontInst.registerEvents({ port: 1234, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nYou can also use a pre-existing Express instance, but note that the Front SDK expects that the request body should be an already parsed object or a JSON parseable string. You can easily add this using the `body-parser` library:\n\n```typescript\n    import { Event, Front } from 'front-sdk';\n    import * as bodyParser from 'body-parser';\n\n    const app = express();\n    app.use(bodyParser.json());\n    app.listen(1234);\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    frontInst.registerEvents({ server: app, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nThe SDK will verify that events sent to it are signed by the shared secret key, and will retrieve the entire event rather than just the preview. Events are sent to the client in the order the preview events for them were originally dispatched.\n\n#### Notes\n\nTo post into a Front Inbox, you need to know the correct channels in for it.\nChannels are instances of sources, such as SMTP, Facebook, Front Integrations, etc.\n\nSo to post a new Conversation:\n * Find the Inbox required want\n * List the Channels and find the correct one for the source (Integration channels, in the SDK case)\n * Post a Message to that Channel (which will return a Conversation reference)\n\nTo post a Comment or Message to that Conversation:\n * Use the Conversation reference to post (returns a Comment or Message object)\n","gitHead":"89be2582eaecaac3e2a19dc94cc572981038d0ff","scripts":{"lint":"gulp tslint","test":"gulp tslint && gulp test","build":"gulp build","prepublish":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"_npmVersion":"6.7.0","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"10.4.0","dependencies":{"lodash":"^4.17.2","express":"^4.15.3","request":"^2.79.0","bluebird":"^3.5.0","@types/node":"^6.0.48","body-parser":"^1.17.2","typed-error":"^1.0.1","@types/lodash":"^4.14.54","@types/express":"^4.0.35","@types/request":"^2.48.1","request-promise":"^4.2.2","@types/body-parser":"^1.16.3","@types/bluebird-global":"^3.0.1","@types/request-promise":"^4.1.42"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.3.0","github":"^9.2.0","tslint":"^4.5.1","gulp-util":"^3.0.8","gulp-mocha":"^3.0.0","typescript":"^2.3.2","@types/chai":"^3.5.1","chai-string":"^1.3.0","gulp-tslint":"^7.1.0","@types/mocha":"^2.2.41","gulp-sourcemaps":"^2.3.1","gulp-typescript":"^3.1.4","chai-as-promised":"^6.0.0","@types/chai-string":"^1.1.30","mocha-junit-reporter":"^1.13.0","@types/chai-as-promised":"0.0.30"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk_0.4.0-31-add-circleci-config-89be2582eaecaac3e2a19dc94cc572981038d0ff_1553525682127_0.7820105367000201","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.4.0-31-add-circleci-config-65e754bad19f7999882e38f70a3a35539ec1f3c0":{"name":"front-sdk","version":"0.4.0-31-add-circleci-config-65e754bad19f7999882e38f70a3a35539ec1f3c0","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.4.0-31-add-circleci-config-65e754bad19f7999882e38f70a3a35539ec1f3c0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"resin-ci","email":"accounts+npm-ci@resin.io"},{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"60187e3e91b87b670c29ad352d26fd1f24988ef6","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.4.0-31-add-circleci-config-65e754bad19f7999882e38f70a3a35539ec1f3c0.tgz","fileCount":38,"integrity":"sha512-ygdP5TgpgXjgoNKZiyBKo5FkmsVlRRZYGhqV30V/196TR0KyJ2sAngzDdc/lHSp3/Nr+1Kfw8DJiwVnJokPu+w==","signatures":[{"sig":"MEUCIQDu50e2UA1QrskFm2uWTDquAPbW0VkFBYowsnZy4VrMtgIgN0HEqXEz6l/724SehBkdEDWH+WrP9h+76huZeZ6DnYc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":163556,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcmPHyCRA9TVsSAnZWagAAQHwP/RZbSNAbxMugHMcrfbtE\nHSKo86sSFpHkvclJm9e/pagPN2toaC5TSWoxLvfpsjdVckiWQljGeNLSV0wP\n2DH/QH/YTWoliJpYb+mT/F0cBxLdycOFOlsb8z6YPOfth84pBg04BI5yxCxz\nMEbeKD/Wxozgb1C6nS8kc2qXQzqe4xZWEHoPBLRqfBQZ73pIAnibMNGnM6u7\nHq22pnNEx+BSFR8gYMgDByh+Ua5N53dInNMv6lGXMkEHdf0pa8NfB+1ifw1s\n9/HJXQMR06YXm/NH/7RvPPzZd8+nLv2lxB4HMYoHJUhpM9pC13drR4Phwba8\ngMQTaCptDsjGPrs2dtze16zDcN0vc4mX20TcDrizoJiDtu1s5g9AsND5fPR6\nm1SoZ0+W5UvNjnBRDKUZ3Rp3gBMYpW30GUabMQO4ez7RzGcQ4m/YzfiEhKC4\nCZ+VHLcbxkqu2bznhtf/GwTLXwXuQDtFRMBHVuwJaxGDfpoqAEo+8q/dS+b6\nWLN2zTvrX93+49fFFjBAMlTBOMw9HIS9pMw/S+sn/mYmQhphg/G6Y9OT5r17\nyqvMGRV6CYhk4OD/5ntSSlgreCR4p7eFeb31X4ZxyC+wLm/YRMX8gviqf7iy\n4zDiLjMNBEuYftSNyIoWNKsRlb9cclwfD2FwZFtzc8IUDdR/0ykVvK0stPUJ\niZV4\r\n=3AhU\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"lib/index.ts","readme":"# front-sdk\nAn SDK for working with Front (https://frontapp.com).\n\n## TypeScript Quickstart\n\nImport in the usual way:\n\n```typescript\nimport { Front } from 'front-sdk';\n```\n\n## JavaScript\n\nRequire in the usual way:\n\n```javascript\nconst Front = require('front-sdk').Front;\n```\n\n## Usage\n\nCreate a new instance of the SDK to use it, passing the API token for Front.\n\n```typescript\nimport { Comment, Front } from 'front-sdk';\nconst front = new Front('abcdef123457890');\n\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}).then((comment: Comment) => {\n    console.log(comment);\n}).catch(FrontError, (err: FrontError) => {\n    console.log(err);\n});\n```\n\nCan also be used as a callback, if required:\n\n```typescript\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}, (err: FrontError, comment: FrontComment) => {\n    if (err) {\n        console.log(err);\n        return;\n    }\n\n    console.log(comment);\n});\n```\n\nClients can register for events, passing an object detailing a port to listen on using a new instance of an Express server, or an instance of an Express server to use. An optional path to install the webhook on can also be passed (this defaults to `/fronthook`).\n\nTo use this functionality, pass the secret shared key in as the second parameter when creating a new Front instance.\n```typescript\n    import { Event, Front } from 'front-sdk';\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    const httpServer = frontInst.registerEvents({ port: 1234, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nYou can also use a pre-existing Express instance, but note that the Front SDK expects that the request body should be an already parsed object or a JSON parseable string. You can easily add this using the `body-parser` library:\n\n```typescript\n    import { Event, Front } from 'front-sdk';\n    import * as bodyParser from 'body-parser';\n\n    const app = express();\n    app.use(bodyParser.json());\n    app.listen(1234);\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    frontInst.registerEvents({ server: app, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nThe SDK will verify that events sent to it are signed by the shared secret key, and will retrieve the entire event rather than just the preview. Events are sent to the client in the order the preview events for them were originally dispatched.\n\n#### Notes\n\nTo post into a Front Inbox, you need to know the correct channels in for it.\nChannels are instances of sources, such as SMTP, Facebook, Front Integrations, etc.\n\nSo to post a new Conversation:\n * Find the Inbox required want\n * List the Channels and find the correct one for the source (Integration channels, in the SDK case)\n * Post a Message to that Channel (which will return a Conversation reference)\n\nTo post a Comment or Message to that Conversation:\n * Use the Conversation reference to post (returns a Comment or Message object)\n","gitHead":"65e754bad19f7999882e38f70a3a35539ec1f3c0","scripts":{"lint":"gulp tslint","test":"gulp tslint && gulp test","build":"gulp build","prepublish":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"_npmVersion":"6.7.0","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"10.4.0","dependencies":{"lodash":"^4.17.2","express":"^4.15.3","request":"^2.79.0","bluebird":"^3.5.0","@types/node":"^6.0.48","body-parser":"^1.17.2","typed-error":"^1.0.1","@types/lodash":"^4.14.54","@types/express":"^4.0.35","@types/request":"^2.48.1","request-promise":"^4.2.2","@types/body-parser":"^1.16.3","@types/bluebird-global":"^3.0.1","@types/request-promise":"^4.1.42"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.3.0","github":"^9.2.0","tslint":"^4.5.1","gulp-util":"^3.0.8","gulp-mocha":"^3.0.0","typescript":"^2.3.2","@types/chai":"^3.5.1","chai-string":"^1.3.0","gulp-tslint":"^7.1.0","@types/mocha":"^2.2.41","gulp-sourcemaps":"^2.3.1","gulp-typescript":"^3.1.4","chai-as-promised":"^6.0.0","@types/chai-string":"^1.1.30","mocha-junit-reporter":"^1.13.0","@types/chai-as-promised":"0.0.30"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk_0.4.0-31-add-circleci-config-65e754bad19f7999882e38f70a3a35539ec1f3c0_1553527280890_0.3654946129169059","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.4.0-31-add-circleci-config-8fa98781826287e8813792073eb800ce390f3e4b":{"name":"front-sdk","version":"0.4.0-31-add-circleci-config-8fa98781826287e8813792073eb800ce390f3e4b","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.4.0-31-add-circleci-config-8fa98781826287e8813792073eb800ce390f3e4b","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"resin-ci","email":"accounts+npm-ci@resin.io"},{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"54043945d4f17670b795fc68a9dea3742d15097d","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.4.0-31-add-circleci-config-8fa98781826287e8813792073eb800ce390f3e4b.tgz","fileCount":38,"integrity":"sha512-sKAtpMx7YIyCAVptNVbCTX2gHipVD1pS0igzX/z4DOLYCZG1OcwuwwhwmpetAzeYZkUPS9frc7sgyxbh6OLztw==","signatures":[{"sig":"MEUCIH1JVqEflDvcqOtB7HTYExaZQo0A5u1rwr9it+pUgdFbAiEA0hR9kCU0W/yK3mNxoH0GIV6N/Nbfmr5tBtWwSYyqPHY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":163576,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcmPLRCRA9TVsSAnZWagAAdF8P/3i2JYWam6BQqC5t6Zju\nV1eF0s8E5AOXHsVnF1i9dEqLxc91xLduRRyIX6/vbhDM+Q9kruLgAwBZfWFg\nZKO3Qt7rVCy3buXTidmxrq4BPXTpMuB0ZdmwGo8efmfmn2T4dprUO/C1CuPY\nUig/gRG0LJJNbCqrx4KCrONHDSL7U2b8tzM0pvzA2rIG7iXrocewXTYTrOmz\nnbJa5uChmzPhGHu7PQpyo2+E+1mP1h/WEWycOzM2KeqWfI5OgKIvFFGXBB6n\njentsSVKcHfqWj+ww5+4u1jFVZvCgSRo2Gy2OgVQHp1MqCCrfoZPVd6aaTyT\nAM0pnGthk0HXjvP6rzWfK8MPILECWEcQOc70mMuLRrC8wCKJcpHHvFe1zC7C\nm1J39NoPxC8z+MKKiJFRcJ/+GvwkKXnuFrwbvFoy5xX2uFO8UD3ZcArlzecd\nSrXH7Ofu3W2j3N3ud1ifPCM7cZNcB0Ou87jaepHTYB7lB+2xusZ4LxkYQOEg\nOpzesVI+JyHNNhTiYLR3dcez0GdXORXGp/L6kUGWNHWPMtKg1cyUEniID2kd\ntQxfTyczvm33n/x040ELa0fgDjq+Q+1v7zxHxMNmG7rFJ8qTqmWft24RjE34\ndH6zaYo0w6Zzv/K+IA8UwA6TCsDDGdKZGWUZh75Ar5h4xJGclKcI8N/ZiluM\nhpgk\r\n=l51A\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"lib/index.ts","readme":"# front-sdk\nAn SDK for working with Front (https://frontapp.com).\n\n## TypeScript Quickstart\n\nImport in the usual way:\n\n```typescript\nimport { Front } from 'front-sdk';\n```\n\n## JavaScript\n\nRequire in the usual way:\n\n```javascript\nconst Front = require('front-sdk').Front;\n```\n\n## Usage\n\nCreate a new instance of the SDK to use it, passing the API token for Front.\n\n```typescript\nimport { Comment, Front } from 'front-sdk';\nconst front = new Front('abcdef123457890');\n\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}).then((comment: Comment) => {\n    console.log(comment);\n}).catch(FrontError, (err: FrontError) => {\n    console.log(err);\n});\n```\n\nCan also be used as a callback, if required:\n\n```typescript\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}, (err: FrontError, comment: FrontComment) => {\n    if (err) {\n        console.log(err);\n        return;\n    }\n\n    console.log(comment);\n});\n```\n\nClients can register for events, passing an object detailing a port to listen on using a new instance of an Express server, or an instance of an Express server to use. An optional path to install the webhook on can also be passed (this defaults to `/fronthook`).\n\nTo use this functionality, pass the secret shared key in as the second parameter when creating a new Front instance.\n```typescript\n    import { Event, Front } from 'front-sdk';\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    const httpServer = frontInst.registerEvents({ port: 1234, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nYou can also use a pre-existing Express instance, but note that the Front SDK expects that the request body should be an already parsed object or a JSON parseable string. You can easily add this using the `body-parser` library:\n\n```typescript\n    import { Event, Front } from 'front-sdk';\n    import * as bodyParser from 'body-parser';\n\n    const app = express();\n    app.use(bodyParser.json());\n    app.listen(1234);\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    frontInst.registerEvents({ server: app, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nThe SDK will verify that events sent to it are signed by the shared secret key, and will retrieve the entire event rather than just the preview. Events are sent to the client in the order the preview events for them were originally dispatched.\n\n#### Notes\n\nTo post into a Front Inbox, you need to know the correct channels in for it.\nChannels are instances of sources, such as SMTP, Facebook, Front Integrations, etc.\n\nSo to post a new Conversation:\n * Find the Inbox required want\n * List the Channels and find the correct one for the source (Integration channels, in the SDK case)\n * Post a Message to that Channel (which will return a Conversation reference)\n\nTo post a Comment or Message to that Conversation:\n * Use the Conversation reference to post (returns a Comment or Message object)\n","gitHead":"8fa98781826287e8813792073eb800ce390f3e4b","scripts":{"lint":"gulp tslint","test":"gulp tslint && gulp test","build":"gulp build","prepublish":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"_npmVersion":"6.7.0","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"10.4.0","dependencies":{"lodash":"^4.17.2","express":"^4.15.3","request":"^2.79.0","bluebird":"^3.5.0","@types/node":"^6.0.48","body-parser":"^1.17.2","typed-error":"^1.0.1","@types/lodash":"^4.14.54","@types/express":"^4.0.35","@types/request":"^2.48.1","request-promise":"^4.2.2","@types/body-parser":"^1.16.3","@types/bluebird-global":"^3.0.1","@types/request-promise":"^4.1.42"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.3.0","github":"^9.2.0","tslint":"^4.5.1","gulp-util":"^3.0.8","gulp-mocha":"^3.0.0","typescript":"^2.3.2","@types/chai":"^3.5.1","chai-string":"^1.3.0","gulp-tslint":"^7.1.0","@types/mocha":"^2.2.41","gulp-sourcemaps":"^2.3.1","gulp-typescript":"^3.1.4","chai-as-promised":"^6.0.0","@types/chai-string":"^1.1.30","mocha-junit-reporter":"^1.13.0","@types/chai-as-promised":"0.0.30"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk_0.4.0-31-add-circleci-config-8fa98781826287e8813792073eb800ce390f3e4b_1553527504716_0.8036713987173301","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.4.0-31-add-circleci-config-1df652d12546751c2cb6c7b7eff9b2acd189a750":{"name":"front-sdk","version":"0.4.0-31-add-circleci-config-1df652d12546751c2cb6c7b7eff9b2acd189a750","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.4.0-31-add-circleci-config-1df652d12546751c2cb6c7b7eff9b2acd189a750","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"resin-ci","email":"accounts+npm-ci@resin.io"},{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"db1f71b7399a12f82451402dae86a3277a03f0a0","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.4.0-31-add-circleci-config-1df652d12546751c2cb6c7b7eff9b2acd189a750.tgz","fileCount":38,"integrity":"sha512-wCkDAxrTYySXXp8IN0kaUlr9QvYGGeSCUCN266l7KxO0sRhWpfE80d1nru++wPAscYrqjTw2+M+HLeN0frGp4g==","signatures":[{"sig":"MEYCIQD1ugWmjuM3tTrfa+JLNuDhKdrYK+MtUGAXw/KMhzAi1QIhAJJckonlpIafP7wTcyg2qZ13S5Tq5kbu8xFtAU01dC3E","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":164132,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcmPRzCRA9TVsSAnZWagAAVf4P/jAuDqRYnTUOGrqz81fT\n5HqPU6e4uqbqeRQRBqwvwUCv0GyuuUbt4vku2k88Frw/nM+R5Hr3hFkKThBL\nd7fZH3lEQs4G/bbhMbGSSME+NI1Tv74O/YKulG/QfjsS0LuohViKLXMGPcDo\nffo99SbJHumUdyIVLmyK04a94Nydcgug8LwtBRZH6kVhT/VJyhP4Q9VFKdYS\nPnoaA41AzqN3f6+r2zHVxpy8o3kBIrMPTsXoGOM66EkidYFYo5AIHFFj8jUu\nHs/w1zd2HzN5Xspln7RN/9JsaSgw88SAYJtX31E7IsYQr+6TOBcuaMT2f2K5\n1R71aiLrIQBZlxedAan3PNiTMwHs4DzisFfUcTcpvu4xrxf+4eqRBos7I6EW\n152Ewbeq+1FWIXl7OVUPSRdHgOHHLh9z2PCu85qyIS7IGMk7CkzEqaHfLtw1\nEpCK2cvff1VtsAjwu+HCMXXD3fMPXy9YoSgLeAqzxgj8xwxLym46gYw7/xGs\n8ewjDgW1KQ5lh5twbzq24HfZQS2+fokuhdu+s252X5uYxi5ffU9gdXmsrpMM\n5yMPD35tkYwXUlo02PbEOMM5n80rmB/UAopJJfQP8YY1DrBpPUcO2fXWSgyy\n9hrYdnCf3zP9zvxZvCTmSijMGAmQyWvIWerIzrTRSbhtV1XkXlC7Ldcf9VN7\nyi/T\r\n=QzjY\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"lib/index.ts","readme":"# front-sdk\nAn SDK for working with Front (https://frontapp.com).\n\n## TypeScript Quickstart\n\nImport in the usual way:\n\n```typescript\nimport { Front } from 'front-sdk';\n```\n\n## JavaScript\n\nRequire in the usual way:\n\n```javascript\nconst Front = require('front-sdk').Front;\n```\n\n## Usage\n\nCreate a new instance of the SDK to use it, passing the API token for Front.\n\n```typescript\nimport { Comment, Front } from 'front-sdk';\nconst front = new Front('abcdef123457890');\n\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}).then((comment: Comment) => {\n    console.log(comment);\n}).catch(FrontError, (err: FrontError) => {\n    console.log(err);\n});\n```\n\nCan also be used as a callback, if required:\n\n```typescript\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}, (err: FrontError, comment: FrontComment) => {\n    if (err) {\n        console.log(err);\n        return;\n    }\n\n    console.log(comment);\n});\n```\n\nClients can register for events, passing an object detailing a port to listen on using a new instance of an Express server, or an instance of an Express server to use. An optional path to install the webhook on can also be passed (this defaults to `/fronthook`).\n\nTo use this functionality, pass the secret shared key in as the second parameter when creating a new Front instance.\n```typescript\n    import { Event, Front } from 'front-sdk';\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    const httpServer = frontInst.registerEvents({ port: 1234, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nYou can also use a pre-existing Express instance, but note that the Front SDK expects that the request body should be an already parsed object or a JSON parseable string. You can easily add this using the `body-parser` library:\n\n```typescript\n    import { Event, Front } from 'front-sdk';\n    import * as bodyParser from 'body-parser';\n\n    const app = express();\n    app.use(bodyParser.json());\n    app.listen(1234);\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    frontInst.registerEvents({ server: app, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nThe SDK will verify that events sent to it are signed by the shared secret key, and will retrieve the entire event rather than just the preview. Events are sent to the client in the order the preview events for them were originally dispatched.\n\n#### Notes\n\nTo post into a Front Inbox, you need to know the correct channels in for it.\nChannels are instances of sources, such as SMTP, Facebook, Front Integrations, etc.\n\nSo to post a new Conversation:\n * Find the Inbox required want\n * List the Channels and find the correct one for the source (Integration channels, in the SDK case)\n * Post a Message to that Channel (which will return a Conversation reference)\n\nTo post a Comment or Message to that Conversation:\n * Use the Conversation reference to post (returns a Comment or Message object)\n","gitHead":"1df652d12546751c2cb6c7b7eff9b2acd189a750","scripts":{"lint":"gulp tslint","test":"gulp tslint && gulp test","build":"gulp build","prepublish":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"_npmVersion":"6.7.0","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"10.4.0","dependencies":{"lodash":"^4.17.2","express":"^4.15.3","request":"^2.79.0","bluebird":"^3.5.0","@types/node":"^6.0.48","body-parser":"^1.17.2","typed-error":"^1.0.1","@types/lodash":"^4.14.54","@types/express":"^4.0.35","@types/request":"^2.48.1","request-promise":"^4.2.2","@types/body-parser":"^1.16.3","@types/bluebird-global":"^3.0.1","@types/request-promise":"^4.1.42"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.3.0","github":"^9.2.0","tslint":"^4.5.1","gulp-util":"^3.0.8","gulp-mocha":"^3.0.0","typescript":"^2.3.2","@types/chai":"^3.5.1","chai-string":"^1.3.0","gulp-tslint":"^7.1.0","@types/mocha":"^2.2.41","gulp-sourcemaps":"^2.3.1","gulp-typescript":"^3.1.4","chai-as-promised":"^6.0.0","@types/chai-string":"^1.1.30","mocha-junit-reporter":"^1.13.0","@types/chai-as-promised":"0.0.30"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk_0.4.0-31-add-circleci-config-1df652d12546751c2cb6c7b7eff9b2acd189a750_1553527922584_0.8756470724977863","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.4.0-31-add-circleci-config-62adcf144e9e7df856e3a3dedd9bd0a9ba53215f":{"name":"front-sdk","version":"0.4.0-31-add-circleci-config-62adcf144e9e7df856e3a3dedd9bd0a9ba53215f","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.4.0-31-add-circleci-config-62adcf144e9e7df856e3a3dedd9bd0a9ba53215f","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"resin-ci","email":"accounts+npm-ci@resin.io"},{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"48c48eb3c737d50c644e656b85a930888287cbf8","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.4.0-31-add-circleci-config-62adcf144e9e7df856e3a3dedd9bd0a9ba53215f.tgz","fileCount":37,"integrity":"sha512-fZy7VDUcoctZ9xvCTHJzYW0/snFlUjRLJmI9fJcmUODIjgyRENZ4Bhf6axVXv6abdCBDdO2kLlPuPO/6WD9nJQ==","signatures":[{"sig":"MEUCIQCEWL04SaBhwExTJ/vUxSVTRlvfikvc9FboxOpO1pswKwIgEJ+6fGVC9zJxKvjNp2LNckRKy38GmXMwdBGHAY4CW1g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":164020,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcmPR/CRA9TVsSAnZWagAAp8QQAJ7nvjNYvyyn4cgiFBdH\nxYmiueHIKm+86l6e37lLdVAUjSAN7p+LYA8P2gjG3Gv1OqmYrxmG+jtuhvE0\nnmCmOtum5UjC8yVzfARIoCh+9Hxct5Al610kXk2598AFH1hGrDmIb6SRaqFY\nifYuKjTz44P1G19S9xqW/6bHWHgy9OnQrXtOmHZrfffLYVCEcO0KahKmkr6i\nWTQtKIen8QH5JxmW+b11wCXH3g5+xUlMhkcqlIFfEfYxgA5tHgKTzeSz7XVw\nlDUT+FpzyNnzOHpqON0ZdeXP1miXfDDIll5uHyAM3UIHErTsSBucsHwqjs8C\nItLk0dqRRaFCh6ncYIa+EiYMz2R2EQ9ATAQir6Ib8kgaVeV3FwexfrA7N0sI\nKmZhNMX6EceDGeLaqdD5o/D0Mv242DWx5Vb5d/sMFQlbn+Awj1fES6o4jhEh\naMioRprzKi13Rz++5I0FQ1PqUHSxlLtvIrn3/P5HNwwvoin6oyEm6/WIT5Q9\ngwdVrsdBMDQbIKD2hSXncUFtGY67V3c3riMwysAZIKsDRQW5dAW4muT5CBuT\nogXxvlKelS4MpwTijqnZSGdsslVuUpDIJAsWeSE4pg7I1AhqNDV13De+QNsx\ndbvpaz2gjxgc5uAgRWxv0aUgMmcilLgJ2x2Nos/yvxt7j2bZyNRhKAkNyod6\n2shD\r\n=PIzW\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"lib/index.ts","readme":"# front-sdk\nAn SDK for working with Front (https://frontapp.com).\n\n## TypeScript Quickstart\n\nImport in the usual way:\n\n```typescript\nimport { Front } from 'front-sdk';\n```\n\n## JavaScript\n\nRequire in the usual way:\n\n```javascript\nconst Front = require('front-sdk').Front;\n```\n\n## Usage\n\nCreate a new instance of the SDK to use it, passing the API token for Front.\n\n```typescript\nimport { Comment, Front } from 'front-sdk';\nconst front = new Front('abcdef123457890');\n\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}).then((comment: Comment) => {\n    console.log(comment);\n}).catch(FrontError, (err: FrontError) => {\n    console.log(err);\n});\n```\n\nCan also be used as a callback, if required:\n\n```typescript\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}, (err: FrontError, comment: FrontComment) => {\n    if (err) {\n        console.log(err);\n        return;\n    }\n\n    console.log(comment);\n});\n```\n\nClients can register for events, passing an object detailing a port to listen on using a new instance of an Express server, or an instance of an Express server to use. An optional path to install the webhook on can also be passed (this defaults to `/fronthook`).\n\nTo use this functionality, pass the secret shared key in as the second parameter when creating a new Front instance.\n```typescript\n    import { Event, Front } from 'front-sdk';\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    const httpServer = frontInst.registerEvents({ port: 1234, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nYou can also use a pre-existing Express instance, but note that the Front SDK expects that the request body should be an already parsed object or a JSON parseable string. You can easily add this using the `body-parser` library:\n\n```typescript\n    import { Event, Front } from 'front-sdk';\n    import * as bodyParser from 'body-parser';\n\n    const app = express();\n    app.use(bodyParser.json());\n    app.listen(1234);\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    frontInst.registerEvents({ server: app, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nThe SDK will verify that events sent to it are signed by the shared secret key, and will retrieve the entire event rather than just the preview. Events are sent to the client in the order the preview events for them were originally dispatched.\n\n#### Notes\n\nTo post into a Front Inbox, you need to know the correct channels in for it.\nChannels are instances of sources, such as SMTP, Facebook, Front Integrations, etc.\n\nSo to post a new Conversation:\n * Find the Inbox required want\n * List the Channels and find the correct one for the source (Integration channels, in the SDK case)\n * Post a Message to that Channel (which will return a Conversation reference)\n\nTo post a Comment or Message to that Conversation:\n * Use the Conversation reference to post (returns a Comment or Message object)\n","gitHead":"62adcf144e9e7df856e3a3dedd9bd0a9ba53215f","scripts":{"lint":"gulp tslint","test":"gulp tslint && gulp test","build":"gulp build","prepublish":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"_npmVersion":"6.7.0","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"10.4.0","dependencies":{"lodash":"^4.17.2","express":"^4.15.3","request":"^2.79.0","bluebird":"^3.5.0","@types/node":"^6.0.48","body-parser":"^1.17.2","typed-error":"^1.0.1","@types/lodash":"^4.14.54","@types/express":"^4.0.35","@types/request":"^2.48.1","request-promise":"^4.2.2","@types/body-parser":"^1.16.3","@types/bluebird-global":"^3.0.1","@types/request-promise":"^4.1.42"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.3.0","github":"^9.2.0","tslint":"^4.5.1","gulp-util":"^3.0.8","gulp-mocha":"^3.0.0","typescript":"^2.3.2","@types/chai":"^3.5.1","chai-string":"^1.3.0","gulp-tslint":"^7.1.0","@types/mocha":"^2.2.41","gulp-sourcemaps":"^2.3.1","gulp-typescript":"^3.1.4","chai-as-promised":"^6.0.0","@types/chai-string":"^1.1.30","mocha-junit-reporter":"^1.13.0","@types/chai-as-promised":"0.0.30"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk_0.4.0-31-add-circleci-config-62adcf144e9e7df856e3a3dedd9bd0a9ba53215f_1553527934720_0.000561989516935979","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.4.0-31-add-circleci-config-e36868a31c3a4d6f2f4c8aca4bc2298c549b0840":{"name":"front-sdk","version":"0.4.0-31-add-circleci-config-e36868a31c3a4d6f2f4c8aca4bc2298c549b0840","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.4.0-31-add-circleci-config-e36868a31c3a4d6f2f4c8aca4bc2298c549b0840","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"resin-ci","email":"accounts+npm-ci@resin.io"},{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"22a0d9dd48b930cb455a0ceea59ca68b80e7e1b1","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.4.0-31-add-circleci-config-e36868a31c3a4d6f2f4c8aca4bc2298c549b0840.tgz","fileCount":37,"integrity":"sha512-zeppQFHZKnYk42Q94DT4p/jBz+QJxgeWn63lB76efVrR72Utt+tBybpJASn2I2qmjOzxog8O5RTzTp2mAyKIzw==","signatures":[{"sig":"MEUCIDpcGuJcV7vUqrpqMLus5P+S4yqfVjpEdEWynj3HbQa7AiEA7z36aB8TnkxqAOVuoAKqiwTEPy039PGFmcT0nYBr9T0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":164020,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcmPUpCRA9TVsSAnZWagAAk8AP/ioe4X/znEsiIXRceQHY\ntClyyemOzRsZ2ropG7YbOpRpJovl7pB4xnCEtgs3nZbyYUtg8JQStF8fQjxB\nkdDli2zbsBzWPhofonME8qx/1Vy+w/yYU+Nnv3Yno+K9ZrZK7TMuP5DyBP+l\nZft/XYR64uaKJieeIwIUlayNkYu6XCOozi/2OFjKFv6GUdJKfzlbu+R6baw0\nnPtcYSC3urSvw9K+TZwW2OwGjDLX/X3+9PQHRUViHQF+YaCpiNkHx0h4F+3J\n1v5McXXJvfW3ICbgmkCS42ZhssoifzZhXVW0pgKTpm0iRRNhTQ0jL3y9skbd\nEEw8/k5HwEcebK58Nu7HIn+1MRUeZVDk1DeAF1wj46eRwgBPQa3atKkIc5ud\nU1VTL9IfYqsN1HKrfEdCBSMV8EniT3VI5eHQs4/e6Xg4Tn4SZUslPLajAFoG\neM6orOvwQpGRARzxMPFsRQUxtDjc1cxCpba8b0zuemHmc/Icem1t7LcZqPqQ\n1VLtQ0c7v0ttSCKjxI5dYpCKsQq0brn5Qf90G8ozgU+7hAB90Wezf5xuXSYr\nn9ROrs7e9gMBFVE5A+dmTctgkTLsOG/ja0mUWiJmKFV2KKugddbM091Rq1Pm\nX5sv9bLcUM2JdD6YxLhV0lDFeqZAIX6UJbtwARKF1gTCg4u6kG8jFkFFBXgx\nHTvI\r\n=ZSuH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"lib/index.ts","readme":"# front-sdk\nAn SDK for working with Front (https://frontapp.com).\n\n## TypeScript Quickstart\n\nImport in the usual way:\n\n```typescript\nimport { Front } from 'front-sdk';\n```\n\n## JavaScript\n\nRequire in the usual way:\n\n```javascript\nconst Front = require('front-sdk').Front;\n```\n\n## Usage\n\nCreate a new instance of the SDK to use it, passing the API token for Front.\n\n```typescript\nimport { Comment, Front } from 'front-sdk';\nconst front = new Front('abcdef123457890');\n\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}).then((comment: Comment) => {\n    console.log(comment);\n}).catch(FrontError, (err: FrontError) => {\n    console.log(err);\n});\n```\n\nCan also be used as a callback, if required:\n\n```typescript\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}, (err: FrontError, comment: FrontComment) => {\n    if (err) {\n        console.log(err);\n        return;\n    }\n\n    console.log(comment);\n});\n```\n\nClients can register for events, passing an object detailing a port to listen on using a new instance of an Express server, or an instance of an Express server to use. An optional path to install the webhook on can also be passed (this defaults to `/fronthook`).\n\nTo use this functionality, pass the secret shared key in as the second parameter when creating a new Front instance.\n```typescript\n    import { Event, Front } from 'front-sdk';\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    const httpServer = frontInst.registerEvents({ port: 1234, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nYou can also use a pre-existing Express instance, but note that the Front SDK expects that the request body should be an already parsed object or a JSON parseable string. You can easily add this using the `body-parser` library:\n\n```typescript\n    import { Event, Front } from 'front-sdk';\n    import * as bodyParser from 'body-parser';\n\n    const app = express();\n    app.use(bodyParser.json());\n    app.listen(1234);\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    frontInst.registerEvents({ server: app, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nThe SDK will verify that events sent to it are signed by the shared secret key, and will retrieve the entire event rather than just the preview. Events are sent to the client in the order the preview events for them were originally dispatched.\n\n#### Notes\n\nTo post into a Front Inbox, you need to know the correct channels in for it.\nChannels are instances of sources, such as SMTP, Facebook, Front Integrations, etc.\n\nSo to post a new Conversation:\n * Find the Inbox required want\n * List the Channels and find the correct one for the source (Integration channels, in the SDK case)\n * Post a Message to that Channel (which will return a Conversation reference)\n\nTo post a Comment or Message to that Conversation:\n * Use the Conversation reference to post (returns a Comment or Message object)\n","gitHead":"e36868a31c3a4d6f2f4c8aca4bc2298c549b0840","scripts":{"lint":"gulp tslint","test":"gulp tslint && gulp test","build":"gulp build","prepublish":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"_npmVersion":"6.7.0","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"10.4.0","dependencies":{"lodash":"^4.17.2","express":"^4.15.3","request":"^2.79.0","bluebird":"^3.5.0","@types/node":"^6.0.48","body-parser":"^1.17.2","typed-error":"^1.0.1","@types/lodash":"^4.14.54","@types/express":"^4.0.35","@types/request":"^2.48.1","request-promise":"^4.2.2","@types/body-parser":"^1.16.3","@types/bluebird-global":"^3.0.1","@types/request-promise":"^4.1.42"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.3.0","github":"^9.2.0","tslint":"^4.5.1","gulp-util":"^3.0.8","gulp-mocha":"^3.0.0","typescript":"^2.3.2","@types/chai":"^3.5.1","chai-string":"^1.3.0","gulp-tslint":"^7.1.0","@types/mocha":"^2.2.41","gulp-sourcemaps":"^2.3.1","gulp-typescript":"^3.1.4","chai-as-promised":"^6.0.0","@types/chai-string":"^1.1.30","mocha-junit-reporter":"^1.13.0","@types/chai-as-promised":"0.0.30"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk_0.4.0-31-add-circleci-config-e36868a31c3a4d6f2f4c8aca4bc2298c549b0840_1553528105124_0.8554197185572181","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.4.0":{"name":"front-sdk","version":"0.4.0","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.4.0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"resin-ci","email":"accounts+npm-ci@resin.io"},{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"87d67736dc21e589a7d467b99bc937019d0ed09e","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.4.0.tgz","fileCount":37,"integrity":"sha512-I2N7voLoTmch//WNz2j0F4OicK4FjoZwBl6VrBWmrV1jyEjJNu0soQ5hRgSBzOJSwyUGXU3NDM4F/l3HQQHXsA==","signatures":[{"sig":"MEUCIQDD+UhROfUaG2R+qXc1P6xmwqu8Kb8le20RzZmwIksDEAIgNkcPmLQ5cVW9kwtp7HaYQ3WU7y9ewvxEBxGHKC5SgFI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":163956,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcmP7ICRA9TVsSAnZWagAApw8P/3E781NhcNGQ5dP3aj0G\n8397nGB9SHDwvnZXHymyw1H2BYGUtvWrIwmS1JBxODSDo0cM95k6xXFUQdB/\nXWzwPNqHnY/2qz++CVbPUpUJrLpp9JKEBzYZBfMxETZ3p6nFX2mNuTmhZYdS\nqgdy8sCCYBlQZPofGmauI/jlPCSyXAFPnM5dshDY0yiSFF9nqvYZeakxEKfX\nbeYDagFy1FFyCGECPWEj8/xFnnpUEo38kU7zdhhPWSCPvrEl5uMxqGgklLJo\nBgzzPTiHgEFwgkdf+aeftxfT27UAfmeCf5M44TAk4j/T9qd51e5gY7pS8eF7\n6vHIGm0qPkAlgTVgg/dntf9kCqaJ0D0PF0B7hGVKVPCo663xtDOa5YLqlBpj\n/PfyFAxKfHYQWRhc5YOA0oj/ciu/QHJnt2PDshZdjHhnYVoy1g78Uu62fi+J\nZLfPUB84PaWuNAnQc46ZZKgLNEIlxkYRuXv+WWYBJkugtk3lpiI2y+MouC56\nbKcM56DwHZWdi5PvzPSiXmwYRR2hdGe6fWWsb5Ub9FsJ4dE7cbAXsdVb5f/h\nHtwmAZ3Ppo/I+JOw9ehxisZ8dTM8HT+CId/xX8VhDqBzkJve2nOwTZ58utgQ\nVqjgt52OCASlxHdC8ZOzO2u77EdUsH+y53jJT5EuBLI4jXohoyifLmpOHKlI\n6jIu\r\n=KXvo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"lib/index.ts","gitHead":"23e58b4731611dd824f1edfaffac65c2914fb33d","scripts":{"lint":"gulp tslint","test":"gulp tslint && gulp test","build":"gulp build","prepublish":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"_npmVersion":"6.7.0","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"10.4.0","dependencies":{"lodash":"^4.17.2","express":"^4.15.3","request":"^2.79.0","bluebird":"^3.5.0","@types/node":"^6.0.48","body-parser":"^1.17.2","typed-error":"^1.0.1","@types/lodash":"^4.14.54","@types/express":"^4.0.35","@types/request":"^2.48.1","request-promise":"^4.2.2","@types/body-parser":"^1.16.3","@types/bluebird-global":"^3.0.1","@types/request-promise":"^4.1.42"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.3.0","github":"^9.2.0","tslint":"^4.5.1","gulp-util":"^3.0.8","gulp-mocha":"^3.0.0","typescript":"^2.3.2","@types/chai":"^3.5.1","chai-string":"^1.3.0","gulp-tslint":"^7.1.0","@types/mocha":"^2.2.41","gulp-sourcemaps":"^2.3.1","gulp-typescript":"^3.1.4","chai-as-promised":"^6.0.0","@types/chai-string":"^1.1.30","mocha-junit-reporter":"^1.13.0","@types/chai-as-promised":"0.0.30"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk_0.4.0_1553530568252_0.059985309667587305","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.5.0-29-add-create-channel-6de853490355dd3fcfea1c3f484610f784752be5":{"name":"front-sdk","version":"0.5.0-29-add-create-channel-6de853490355dd3fcfea1c3f484610f784752be5","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.5.0-29-add-create-channel-6de853490355dd3fcfea1c3f484610f784752be5","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"resin-ci","email":"accounts+npm-ci@resin.io"},{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"404e5d30e6210177bc2a6b69af461b67247f9957","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.5.0-29-add-create-channel-6de853490355dd3fcfea1c3f484610f784752be5.tgz","fileCount":37,"integrity":"sha512-SHfYnrTyWmb/SZwXxoT+UP6q9CqWl62sw8oI3Y/4Fq4pCYr8jhntvzTjKTx7YqBmd12vu5FjTdO7aJzXB1/fWA==","signatures":[{"sig":"MEYCIQDHHb0vCqAYOfB9trJge4GoA4ShT7MeQGYXh+u8QMmjkQIhAKij1y8vIsSv7hFfvuPHu3gVYWoETf1AZ89L/h50oHE5","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":165236,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcmQBQCRA9TVsSAnZWagAAFg8P/0UlQj78nbWjPJqjegs/\nfhiGOlIsjO6hFJAERFVWsnbAO7Bl8Qs/ZrXIvsa2XthdFOD9DkMsc1GisSlM\nb2Xr9GIzdasrAcjaqA5nLBEQ9CqWjVvaV619paV81O8HJoxul76gF7Fxw3Nu\nVivfRu6NevokBc0FvZGVlbZzdWzO/3xlJvRSf+Leu+avzU3uLaA4kf6QktMU\nhCKKFCg/GLm57u9MYReEKoHKZZlEkS67CGxaicFhz9NOgkfbiYPig0yec6Ev\ne9COXqGgO5DjpxQk9ajVcjgRvLQkjD8XBg9RrHCjMjOV/ky/06ko7MBK6CgV\nSWxY1asb145EBzHMzNQG4xD7jWJF4xrggjaQhuovHgJ4KOnWmgWIymhGLLpt\nv4a6WqRP4wvMWekq40Qx1uBj8jK3PLlLaBev8pVu932n8um2gqjDPZM40EWY\ne5x/ouc9XKzp3HXvgIUaJ0hS4wccuyvKXwyBiDeYorhYElTRhXntiMjqtEdx\nUj0knL0N7FpzcqR01p9ubLS5ZicigP0gqnVyB1FqOKLvjC6Vx0/TVrX9tmbF\n7FM+bXTPMhzuxn8p/fvZdKlSZ/EybhwUt8hbL/NCno0ovcMrBmCMHibFywAa\nn4iZHtlpGO2hFcbTaQYGiyLhMDTWvwdHxgDC6nmXzKGjI5hAQ5g1BSejjx7d\nqxy/\r\n=Yheu\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"lib/index.ts","readme":"# front-sdk\nAn SDK for working with Front (https://frontapp.com).\n\n## TypeScript Quickstart\n\nImport in the usual way:\n\n```typescript\nimport { Front } from 'front-sdk';\n```\n\n## JavaScript\n\nRequire in the usual way:\n\n```javascript\nconst Front = require('front-sdk').Front;\n```\n\n## Usage\n\nCreate a new instance of the SDK to use it, passing the API token for Front.\n\n```typescript\nimport { Comment, Front } from 'front-sdk';\nconst front = new Front('abcdef123457890');\n\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}).then((comment: Comment) => {\n    console.log(comment);\n}).catch(FrontError, (err: FrontError) => {\n    console.log(err);\n});\n```\n\nCan also be used as a callback, if required:\n\n```typescript\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}, (err: FrontError, comment: FrontComment) => {\n    if (err) {\n        console.log(err);\n        return;\n    }\n\n    console.log(comment);\n});\n```\n\nClients can register for events, passing an object detailing a port to listen on using a new instance of an Express server, or an instance of an Express server to use. An optional path to install the webhook on can also be passed (this defaults to `/fronthook`).\n\nTo use this functionality, pass the secret shared key in as the second parameter when creating a new Front instance.\n```typescript\n    import { Event, Front } from 'front-sdk';\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    const httpServer = frontInst.registerEvents({ port: 1234, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nYou can also use a pre-existing Express instance, but note that the Front SDK expects that the request body should be an already parsed object or a JSON parseable string. You can easily add this using the `body-parser` library:\n\n```typescript\n    import { Event, Front } from 'front-sdk';\n    import * as bodyParser from 'body-parser';\n\n    const app = express();\n    app.use(bodyParser.json());\n    app.listen(1234);\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    frontInst.registerEvents({ server: app, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nThe SDK will verify that events sent to it are signed by the shared secret key, and will retrieve the entire event rather than just the preview. Events are sent to the client in the order the preview events for them were originally dispatched.\n\n#### Notes\n\nTo post into a Front Inbox, you need to know the correct channels in for it.\nChannels are instances of sources, such as SMTP, Facebook, Front Integrations, etc.\n\nSo to post a new Conversation:\n * Find the Inbox required want\n * List the Channels and find the correct one for the source (Integration channels, in the SDK case)\n * Post a Message to that Channel (which will return a Conversation reference)\n\nTo post a Comment or Message to that Conversation:\n * Use the Conversation reference to post (returns a Comment or Message object)\n","gitHead":"6de853490355dd3fcfea1c3f484610f784752be5","scripts":{"lint":"gulp tslint","test":"gulp tslint && gulp test","build":"gulp build","prepublish":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"_npmVersion":"6.7.0","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"10.4.0","dependencies":{"lodash":"^4.17.2","express":"^4.15.3","request":"^2.79.0","bluebird":"^3.5.0","@types/node":"^6.0.48","body-parser":"^1.17.2","typed-error":"^1.0.1","@types/lodash":"^4.14.54","@types/express":"^4.0.35","@types/request":"^2.48.1","request-promise":"^4.2.2","@types/body-parser":"^1.16.3","@types/bluebird-global":"^3.0.1","@types/request-promise":"^4.1.42"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.3.0","github":"^9.2.0","tslint":"^4.5.1","gulp-util":"^3.0.8","gulp-mocha":"^3.0.0","typescript":"^2.3.2","@types/chai":"^3.5.1","chai-string":"^1.3.0","gulp-tslint":"^7.1.0","@types/mocha":"^2.2.41","gulp-sourcemaps":"^2.3.1","gulp-typescript":"^3.1.4","chai-as-promised":"^6.0.0","@types/chai-string":"^1.1.30","mocha-junit-reporter":"^1.13.0","@types/chai-as-promised":"0.0.30"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk_0.5.0-29-add-create-channel-6de853490355dd3fcfea1c3f484610f784752be5_1553530959372_0.3238595382057121","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.5.0":{"name":"front-sdk","version":"0.5.0","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.5.0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"resin-ci","email":"accounts+npm-ci@resin.io"},{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"3d61a9495e8450f5b03bb3582120663f4e196e9e","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.5.0.tgz","fileCount":37,"integrity":"sha512-SeYqJ5Prof6y5qksWhgOEZ+DdV8GF4ZUiyyYd1Zyb15UC96yuJS/Y8iOpAnI/Sh+fJRRo8ckCwGd3/ZJ9pFyfg==","signatures":[{"sig":"MEYCIQD4kk7KLuV4LsZoD+OqUgYAF/YxqH+k+Dv9TUmriSuoDAIhAPrw47AWaqnlDU3vel6N+WWCHsd1GOxI8fzJIZq0UMXW","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":165173,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcmQFVCRA9TVsSAnZWagAAwaYP/0bz5x2E4/tCJ7c+aOH1\n26jRQvc7tzZClKB2LvlGDbo3inlLBJeECAuiYReQjbnn3x0mnClp1SsSN/vM\niwQdFvKqsUAm8NYQ6M3nHEIgAEM9Z4z7z1G3stCvla8zqWLlRf7Gqlpi0aM/\nocQmn8J5P+WcVd+6+6eVz2pltxi+0qTzyjTbqoTqH4ugrQJJI64zi/oYASBE\nS6+LCebng9MEns0WtJfL2951w5kNR/c3qKBlcsOENG2tuBSH/5H0WKEfi9/T\nDB++eU7yq/cDBeQVleaZvOHQG8v+4bqBlIH2IPCvUowMBiL8TbUhjKq+E2Eg\n6HKZxo2mHO5+KYrQYNFM4RtfUVTPhqRBssFll+gwFmAv6NKxC0hLjJ96PZII\n2jLy3l762aEallXKe69BG0YT/AimLWwOSx+CkvlH128pKgXTRU7LC+xpN7hr\nmn0d36YUvJbmeaRWzYqpNcaDw8iAv//gTM9OdjK0e0STV0kNQScLyK4kSgtp\ndADVaoCOKEk7dX31LOQsYRcOoRXzpLWwMv3ZnykQAkhMn+NzVtg6zF3N/U43\ntm+pGJTRwNqIktd9ydYU6+054fkL9iOYmhoEJWgD3Wwz7S8e1LZ1EbtcWgUT\n8LQ5f8CfVn8rT+AvMyKqH4eCSlBquTq9xGOwSd8I/D/zRg/+UJZV3qEOguBL\nv0GT\r\n=zbM1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"lib/index.ts","gitHead":"c697d15bf5a1df7c9748ca3fc05e159e00865d0c","scripts":{"lint":"gulp tslint","test":"gulp tslint && gulp test","build":"gulp build","prepublish":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"_npmVersion":"6.7.0","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"10.4.0","dependencies":{"lodash":"^4.17.2","express":"^4.15.3","request":"^2.79.0","bluebird":"^3.5.0","@types/node":"^6.0.48","body-parser":"^1.17.2","typed-error":"^1.0.1","@types/lodash":"^4.14.54","@types/express":"^4.0.35","@types/request":"^2.48.1","request-promise":"^4.2.2","@types/body-parser":"^1.16.3","@types/bluebird-global":"^3.0.1","@types/request-promise":"^4.1.42"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.3.0","github":"^9.2.0","tslint":"^4.5.1","gulp-util":"^3.0.8","gulp-mocha":"^3.0.0","typescript":"^2.3.2","@types/chai":"^3.5.1","chai-string":"^1.3.0","gulp-tslint":"^7.1.0","@types/mocha":"^2.2.41","gulp-sourcemaps":"^2.3.1","gulp-typescript":"^3.1.4","chai-as-promised":"^6.0.0","@types/chai-string":"^1.1.30","mocha-junit-reporter":"^1.13.0","@types/chai-as-promised":"0.0.30"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk_0.5.0_1553531220732_0.5410170314743592","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.6.0-14-pagination-out-of-date-aee73cc66066ddb2791e88b5b99fca25d7459685":{"name":"front-sdk","version":"0.6.0-14-pagination-out-of-date-aee73cc66066ddb2791e88b5b99fca25d7459685","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.6.0-14-pagination-out-of-date-aee73cc66066ddb2791e88b5b99fca25d7459685","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"resin-ci","email":"accounts+npm-ci@resin.io"},{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"2dfdb2a2ec0f271c6b7c8e2209e807758be7a423","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.6.0-14-pagination-out-of-date-aee73cc66066ddb2791e88b5b99fca25d7459685.tgz","fileCount":61,"integrity":"sha512-3oG0BgvrzBKcNpVHXk2NkU610lS4cR6lfdhT6DCqZKarkamxqt9EWbBPeTHSxEL39subVONHPVwRDwpZDqSvFg==","signatures":[{"sig":"MEQCIE6n9iq675H5gSZ67GmsmoC/kq0xBlM1dl1gz8h0mnfKAiA3SiqkDR16FXAdx1FqT8cLvUJNQCaasDbQrc/fT4Vdmw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":304532,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcmSDQCRA9TVsSAnZWagAAeWEP/3rwHewMH7PPEB3LJMEB\nW9HcuvaRuVPhKwTo61wbahlf4lNu2PtQ3Vy45PNE3EuSG2Pc4ibi3IAG5gxm\nKAfRGSipa6hpen/JiW8k70652kpcFT37EdA+2e13njg3Q27pca4pJ1SBuHqD\n+DWSX17xxJHVCGlV9X/KBSUmzjAsYzN23hSnLxhcO2FRO4IBUls1rEMWc8c7\nMEKVfdiB/I1vysRSZ8vjvJTTneYYdtekcUpORMxF0R5QRDk1MElGadvQMoc5\nI8KBV1cTOCiHzIaW6pmd/28W1TwOXoLO9phMgW8msRFO7kKFdcu7WC33YalZ\nYSDu6kZwdFjlf4gUlOvw1W5j5VO1cESbWntfNbF3xF1dp2gwmc5dOp60IAfs\nEXfHVWI3Q0X8RnSUmOKJ95uQbQLlYeXSNF1uE/hvcsuyeAZUr3OB2CJR8nIw\nSTm7p9inA6niRJWiy8Z9JBXjbbcVV3kn/EUSrecB2PsHYvI+hc4g5ihk2Xl6\nJx6qfHvCVNJyLGDWJs1l0X8RWZfuYpUQ92JkvhH/HpNbTvHI/h7F+bXPYVPQ\nd9yLhGlDbsu0lQSwPfTkULo21mdEgha4JAXQMUReW/lGiUoQOcds8RpqqJO3\nNXfKhUHVbiS/AMnFtdwGx9fyD3fLILZEHiSAMRZXXJ0pSdwNtCmwg3meFF+w\n6ZYt\r\n=pNlJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"lib/index.ts","readme":"# front-sdk\nAn SDK for working with Front (https://frontapp.com).\n\n## TypeScript Quickstart\n\nImport in the usual way:\n\n```typescript\nimport { Front } from 'front-sdk';\n```\n\n## JavaScript\n\nRequire in the usual way:\n\n```javascript\nconst Front = require('front-sdk').Front;\n```\n\n## Usage\n\nCreate a new instance of the SDK to use it, passing the API token for Front.\n\n```typescript\nimport { Comment, Front } from 'front-sdk';\nconst front = new Front('abcdef123457890');\n\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}).then((comment: Comment) => {\n    console.log(comment);\n}).catch(FrontError, (err: FrontError) => {\n    console.log(err);\n});\n```\n\nCan also be used as a callback, if required:\n\n```typescript\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}, (err: FrontError, comment: FrontComment) => {\n    if (err) {\n        console.log(err);\n        return;\n    }\n\n    console.log(comment);\n});\n```\n\nClients can register for events, passing an object detailing a port to listen on using a new instance of an Express server, or an instance of an Express server to use. An optional path to install the webhook on can also be passed (this defaults to `/fronthook`).\n\nTo use this functionality, pass the secret shared key in as the second parameter when creating a new Front instance.\n```typescript\n    import { Event, Front } from 'front-sdk';\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    const httpServer = frontInst.registerEvents({ port: 1234, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nYou can also use a pre-existing Express instance, but note that the Front SDK expects that the request body should be an already parsed object or a JSON parseable string. You can easily add this using the `body-parser` library:\n\n```typescript\n    import { Event, Front } from 'front-sdk';\n    import * as bodyParser from 'body-parser';\n\n    const app = express();\n    app.use(bodyParser.json());\n    app.listen(1234);\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    frontInst.registerEvents({ server: app, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nThe SDK will verify that events sent to it are signed by the shared secret key, and will retrieve the entire event rather than just the preview. Events are sent to the client in the order the preview events for them were originally dispatched.\n\n#### Notes\n\nTo post into a Front Inbox, you need to know the correct channels in for it.\nChannels are instances of sources, such as SMTP, Facebook, Front Integrations, etc.\n\nSo to post a new Conversation:\n * Find the Inbox required want\n * List the Channels and find the correct one for the source (Integration channels, in the SDK case)\n * Post a Message to that Channel (which will return a Conversation reference)\n\nTo post a Comment or Message to that Conversation:\n * Use the Conversation reference to post (returns a Comment or Message object)\n","gitHead":"aee73cc66066ddb2791e88b5b99fca25d7459685","scripts":{"lint":"gulp tslint","test":"gulp tslint && gulp test","build":"gulp build","prepublish":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"_npmVersion":"6.7.0","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"10.4.0","dependencies":{"lodash":"^4.17.2","express":"^4.15.3","request":"^2.79.0","bluebird":"^3.5.0","@types/node":"^6.0.48","body-parser":"^1.17.2","typed-error":"^1.0.1","@types/lodash":"^4.14.54","@types/express":"^4.0.35","@types/request":"^2.48.1","request-promise":"^4.2.2","@types/body-parser":"^1.16.3","@types/bluebird-global":"^3.0.1","@types/request-promise":"^4.1.42"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.3.0","tslint":"^4.5.1","gulp-util":"^3.0.8","gulp-mocha":"^3.0.0","typescript":"^3.3.4000","@types/chai":"^3.5.1","chai-string":"^1.3.0","gulp-tslint":"^7.1.0","@types/mocha":"^2.2.41","@octokit/rest":"^16.20.0","gulp-sourcemaps":"^2.3.1","gulp-typescript":"^3.1.4","chai-as-promised":"^6.0.0","@types/chai-string":"^1.1.30","mocha-junit-reporter":"^1.13.0","@types/chai-as-promised":"0.0.30"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk_0.6.0-14-pagination-out-of-date-aee73cc66066ddb2791e88b5b99fca25d7459685_1553539279833_0.20516359793039252","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.6.0-14-pagination-out-of-date-261a9019e49331133df0d7b0b72f9568c834b733":{"name":"front-sdk","version":"0.6.0-14-pagination-out-of-date-261a9019e49331133df0d7b0b72f9568c834b733","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.6.0-14-pagination-out-of-date-261a9019e49331133df0d7b0b72f9568c834b733","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"resin-ci","email":"accounts+npm-ci@resin.io"},{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"beb5e36af139e2245c54d3cbdcaa673de1a37a96","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.6.0-14-pagination-out-of-date-261a9019e49331133df0d7b0b72f9568c834b733.tgz","fileCount":61,"integrity":"sha512-K9Wvi0s5sa07W0a8rbL0J96/3+IN3qQ+uQgPh2LvyzosJX4kthVYFQ4gynEGgferAc4AQ8lnZCzvLZp8X9aSGQ==","signatures":[{"sig":"MEUCICb3C2BQJAho/tRD86H5hHK3dFbg7aPeUFMjhE5z9IjxAiEAk4tnOgItpNW6LH10Ik1CL2vQWm//crfQhpN+dYcCiuQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":304594,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcmSI4CRA9TVsSAnZWagAA1t4QAJLKqHyqnb8baUlxJMhU\n6+3k2JmSO03D8kfbn2LTaiKJ1X+CUlFLaz37k9w1UzLLqszEuuQGhh4eArQ3\nC3b4SH5AuH0VGEY9sw/bQWxjHPaBaYsXguyJ7o25G/iCpwBlfZKZF8lKM9Su\nb4GImrPboV6GZQ1heLoeSO3GYnG+pQygmF+koKJ7tDNlKlLxo358Li0W3/CJ\ndEFptd6VDm7zAiy5bL6htMs+oXAeQcPceR11FVe5njtR3djjiSayxjTZJyzg\naihdfGTEt++lnzxrVb8TV8joki12M1xpDdhvjkG5QGlLPaxr3TOYMftBzEx9\nbmtGuTSsX055kHcFd4pQFrqbOdrVhW1S3xal4t9SIPKlLrRWcfjW2+zci9Wj\nl/b/0MiU4VG/JByGV/yKlgSxqdzmbot62IDVSJJU1PG2BT7zyLFDZ3/naeBt\nvosOI6mdNzL2v8sMWDhIolN2wBwTFjV4TNYuBFRKJFOcONZiEvi792q5zOs6\ninpL6G6/Gx6KyoDgPcIYUCQ0VZXdHPApnKqy0xRe4dKLN87gh8LsZLVdRlT0\nEyTlBosY73HWeZq5igpID2YoMr3EkNKMBT2YKXIgQQ9rvVFIYqq4uEkMZczV\nZrvUqn8WCE4PNU6AfwlwyfPN0kcoIV6Ek6LoxIMdJ0Y05GdmDQY/dmMfQhO+\nBP+T\r\n=8MmH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"lib/index.ts","readme":"# front-sdk\nAn SDK for working with Front (https://frontapp.com).\n\n## TypeScript Quickstart\n\nImport in the usual way:\n\n```typescript\nimport { Front } from 'front-sdk';\n```\n\n## JavaScript\n\nRequire in the usual way:\n\n```javascript\nconst Front = require('front-sdk').Front;\n```\n\n## Usage\n\nCreate a new instance of the SDK to use it, passing the API token for Front.\n\n```typescript\nimport { Comment, Front } from 'front-sdk';\nconst front = new Front('abcdef123457890');\n\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}).then((comment: Comment) => {\n    console.log(comment);\n}).catch(FrontError, (err: FrontError) => {\n    console.log(err);\n});\n```\n\nCan also be used as a callback, if required:\n\n```typescript\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}, (err: FrontError, comment: FrontComment) => {\n    if (err) {\n        console.log(err);\n        return;\n    }\n\n    console.log(comment);\n});\n```\n\nClients can register for events, passing an object detailing a port to listen on using a new instance of an Express server, or an instance of an Express server to use. An optional path to install the webhook on can also be passed (this defaults to `/fronthook`).\n\nTo use this functionality, pass the secret shared key in as the second parameter when creating a new Front instance.\n```typescript\n    import { Event, Front } from 'front-sdk';\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    const httpServer = frontInst.registerEvents({ port: 1234, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nYou can also use a pre-existing Express instance, but note that the Front SDK expects that the request body should be an already parsed object or a JSON parseable string. You can easily add this using the `body-parser` library:\n\n```typescript\n    import { Event, Front } from 'front-sdk';\n    import * as bodyParser from 'body-parser';\n\n    const app = express();\n    app.use(bodyParser.json());\n    app.listen(1234);\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    frontInst.registerEvents({ server: app, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nThe SDK will verify that events sent to it are signed by the shared secret key, and will retrieve the entire event rather than just the preview. Events are sent to the client in the order the preview events for them were originally dispatched.\n\n#### Notes\n\nTo post into a Front Inbox, you need to know the correct channels in for it.\nChannels are instances of sources, such as SMTP, Facebook, Front Integrations, etc.\n\nSo to post a new Conversation:\n * Find the Inbox required want\n * List the Channels and find the correct one for the source (Integration channels, in the SDK case)\n * Post a Message to that Channel (which will return a Conversation reference)\n\nTo post a Comment or Message to that Conversation:\n * Use the Conversation reference to post (returns a Comment or Message object)\n","gitHead":"261a9019e49331133df0d7b0b72f9568c834b733","scripts":{"lint":"gulp tslint","test":"gulp tslint && gulp test","build":"gulp build","prepublish":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"_npmVersion":"6.7.0","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"10.4.0","dependencies":{"lodash":"^4.17.2","express":"^4.15.3","request":"^2.79.0","bluebird":"^3.5.0","@types/node":"^6.0.48","body-parser":"^1.17.2","typed-error":"^1.0.1","@types/lodash":"^4.14.54","@types/express":"^4.0.35","@types/request":"^2.48.1","request-promise":"^4.2.2","@types/body-parser":"^1.16.3","@types/bluebird-global":"^3.0.1","@types/request-promise":"^4.1.42"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.3.0","tslint":"^4.5.1","gulp-util":"^3.0.8","gulp-mocha":"^3.0.0","typescript":"^3.3.4000","@types/chai":"^3.5.1","chai-string":"^1.3.0","gulp-tslint":"^7.1.0","@types/mocha":"^2.2.41","@octokit/rest":"^16.20.0","gulp-sourcemaps":"^2.3.1","gulp-typescript":"^3.1.4","chai-as-promised":"^6.0.0","@types/chai-string":"^1.1.30","mocha-junit-reporter":"^1.13.0","@types/chai-as-promised":"0.0.30"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk_0.6.0-14-pagination-out-of-date-261a9019e49331133df0d7b0b72f9568c834b733_1553539639954_0.8981656384527146","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.6.0":{"name":"front-sdk","version":"0.6.0","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.6.0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"resin-ci","email":"accounts+npm-ci@resin.io"},{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"ade3dea5b8d2e0648ebdcaf54d82df984d767aab","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.6.0.tgz","fileCount":61,"integrity":"sha512-hygZDlDjcHikYo7cGe4M+oSlJ3qYhN6ce35Uie3MCgSzBYCd51Y9rJ2tMYwx98NihzVEIsqDkLzbanwMVArW/w==","signatures":[{"sig":"MEYCIQCJUZ0rCqHLK9mT97e2K3tlB/fbXYtbEKA/ZjgvkS69EgIhAKrn14riUzXM7EOOEqy6T/NpyUAiWANJQ1liQWg50Ize","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":304527,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcnMg+CRA9TVsSAnZWagAAN/kP/jdDgvILoSJ8TT4h9l2b\nTAbB6XMAOjiwu9Ix7ZsKbSXyVPpCHsZBaV76DtWw/g64ii3DS1wX79b+fGNx\nBMRkw9H1isyVlqPV5U8PQCppBnTAy+76cZRWLUXy/IdTepl+mlFlCtAt9Q77\nG/0lwP+z18G5NzcRYu+cq4fwoycmGRl/rqDR8XJTr37yzsENGoelOrEGqewp\nRG+/VzED0fJS6EmHBYEBirOlqtjnpc0GzHWK8JVASHxHLPCJj20CQqoEKjMk\nNWoJHaB9PElpqLI4knxQ9eT8kLKepUpWgCvsRg4a6+52DhSaVbwuCdAqTq23\nzFM8dmnN3HzWue07lqy5DCF1bcG8ZidEFlwgOXiIy0rbypgy78KFW8YxosFW\nRhv1/pHliAfdwBJbRUYTWSPD/0z+6qy/JWo8ATK4hhMHjFvdfe+811cimM8C\n3VbrlnqJkyMqyxuwoVZqFpUGB4Rk97Xxzcox1eqbvf+yiqcJ2bXRb2LNRgXU\nO5bowJlJ0+YbpP1c0s/2HFTyFSvc7SfxLborKQgzYZXG0oCB6o3EsMWk5irv\nfBXtbLf3SyG3lHh6eyRE76t+Z4dm0Exq5O3F1jETSFTEB0RW9ljTriRtZ6RV\nJQ9mGdLcHEZceZvjcjUsC2AJPI9N8JaVGtVmnPz5f7FNLEY0ZpyY3r8t6JfT\n8AIm\r\n=+66h\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"lib/index.ts","gitHead":"204bf88459b1e7fe3130ab5b25e11b3ac872a202","scripts":{"lint":"gulp tslint","test":"gulp tslint && gulp test","build":"gulp build","prepublish":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"_npmVersion":"6.9.0","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"10.4.0","dependencies":{"lodash":"^4.17.2","express":"^4.15.3","request":"^2.79.0","bluebird":"^3.5.0","@types/node":"^6.0.48","body-parser":"^1.17.2","typed-error":"^1.0.1","@types/lodash":"^4.14.54","@types/express":"^4.0.35","@types/request":"^2.48.1","request-promise":"^4.2.2","@types/body-parser":"^1.16.3","@types/bluebird-global":"^3.0.1","@types/request-promise":"^4.1.42"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.3.0","tslint":"^4.5.1","gulp-util":"^3.0.8","gulp-mocha":"^3.0.0","typescript":"^3.3.4000","@types/chai":"^3.5.1","chai-string":"^1.3.0","gulp-tslint":"^7.1.0","@types/mocha":"^2.2.41","@octokit/rest":"^16.20.0","gulp-sourcemaps":"^2.3.1","gulp-typescript":"^3.1.4","chai-as-promised":"^6.0.0","@types/chai-string":"^1.1.30","mocha-junit-reporter":"^1.13.0","@types/chai-as-promised":"0.0.30"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk_0.6.0_1553778750226_0.3276114140222981","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.7.0-34-fix-page-token-typings-9766eba637b7ef3ea286531de9c20055e24cc03e":{"name":"front-sdk","version":"0.7.0-34-fix-page-token-typings-9766eba637b7ef3ea286531de9c20055e24cc03e","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.7.0-34-fix-page-token-typings-9766eba637b7ef3ea286531de9c20055e24cc03e","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"resin-ci","email":"accounts+npm-ci@resin.io"},{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"18021092474410d239245ff1e0a89b0ba0bbf2b9","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.7.0-34-fix-page-token-typings-9766eba637b7ef3ea286531de9c20055e24cc03e.tgz","fileCount":61,"integrity":"sha512-J4UX6YlG93hvCBq1RD2mFXN0IllmLBW22wUU5PMKh0HBp4vYiujOf7i7gxewkSKpS5Z5wi1We1i2ZLf6ZYNgrg==","signatures":[{"sig":"MEUCIQDdvh8S4P4aaY8fBen8sx1gwlCQX4EOGX0S/C9PaxIE5AIgYU8c+v8VpS9ptZkjikWSewyjGdye+M6L3DrltsgWJWI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":304673,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcp9RGCRA9TVsSAnZWagAAboUQAIOzmXcco3uXi0f8rK/x\nYbYl8pljNRiF4OuUhbaP/DQR6TZwpnReDXZgKxZEOH3LWC3f+vclZiznnx03\n0yS171yCSXo7qNmoMOOQgNqE+19JcznkGi7ZBwb5qqNVXEa94ZDDKBnUGVNd\nGTgpzVHxjRzBQsfv7UNAIVFHLjA36tSqs3RlVGLQpg3iPyDZTxo+fIgzd5CX\nhyUKwtwMFnMMnQeRkKtmQzhdfOfbVk6Bl+2D+u0iScwJttlJiQgEM4ic2nLU\njiCBnUrynXVYQAQHRnWvcccgdEuoVG+3wWS4kRWQNWaB2eNoh4hxU/8Aff/J\naW2Khp3N36FqbnJ0iXYWkjVdJAwSBIa1Jr/DsPLuv+eUsGpJJiVflx1yOipi\npwaDkuxTz8HGqOXQP9+yPUzK8Mw/ZV+BET1hbnA4To6f3lXQme5irJ0PAjxp\n+RUzDo677EIhE0/U/oka74vOBp+TwufSEd2oXiVK3tyKYMl0lYh3LmkXYxRX\nFeR+DMSwm16fvDmS4WOvTzAyBjW7MkGxI9kbTIk3hRPnlCMHsg5dJziOhkt8\ngK8f/GvXdQSyigJfgGyOsHOke2zz2EGtDmMi3akXMTmYSiJNJHFOJVWlfbJ8\noPozHjqBQZKGYGuY+pTM0GMMUJ+ebVYVyLSgvfbWKXj+KLAutuUTPhG8t6Er\nT3+y\r\n=Ti0v\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"lib/index.ts","readme":"# front-sdk\nAn SDK for working with Front (https://frontapp.com).\n\n## TypeScript Quickstart\n\nImport in the usual way:\n\n```typescript\nimport { Front } from 'front-sdk';\n```\n\n## JavaScript\n\nRequire in the usual way:\n\n```javascript\nconst Front = require('front-sdk').Front;\n```\n\n## Usage\n\nCreate a new instance of the SDK to use it, passing the API token for Front.\n\n```typescript\nimport { Comment, Front } from 'front-sdk';\nconst front = new Front('abcdef123457890');\n\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}).then((comment: Comment) => {\n    console.log(comment);\n}).catch(FrontError, (err: FrontError) => {\n    console.log(err);\n});\n```\n\nCan also be used as a callback, if required:\n\n```typescript\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}, (err: FrontError, comment: FrontComment) => {\n    if (err) {\n        console.log(err);\n        return;\n    }\n\n    console.log(comment);\n});\n```\n\nClients can register for events, passing an object detailing a port to listen on using a new instance of an Express server, or an instance of an Express server to use. An optional path to install the webhook on can also be passed (this defaults to `/fronthook`).\n\nTo use this functionality, pass the secret shared key in as the second parameter when creating a new Front instance.\n```typescript\n    import { Event, Front } from 'front-sdk';\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    const httpServer = frontInst.registerEvents({ port: 1234, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nYou can also use a pre-existing Express instance, but note that the Front SDK expects that the request body should be an already parsed object or a JSON parseable string. You can easily add this using the `body-parser` library:\n\n```typescript\n    import { Event, Front } from 'front-sdk';\n    import * as bodyParser from 'body-parser';\n\n    const app = express();\n    app.use(bodyParser.json());\n    app.listen(1234);\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    frontInst.registerEvents({ server: app, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nThe SDK will verify that events sent to it are signed by the shared secret key, and will retrieve the entire event rather than just the preview. Events are sent to the client in the order the preview events for them were originally dispatched.\n\n#### Notes\n\nTo post into a Front Inbox, you need to know the correct channels in for it.\nChannels are instances of sources, such as SMTP, Facebook, Front Integrations, etc.\n\nSo to post a new Conversation:\n * Find the Inbox required want\n * List the Channels and find the correct one for the source (Integration channels, in the SDK case)\n * Post a Message to that Channel (which will return a Conversation reference)\n\nTo post a Comment or Message to that Conversation:\n * Use the Conversation reference to post (returns a Comment or Message object)\n","gitHead":"9766eba637b7ef3ea286531de9c20055e24cc03e","scripts":{"lint":"gulp tslint","test":"gulp tslint && gulp test","build":"gulp build","prepublish":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"_npmVersion":"6.9.0","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"10.4.0","dependencies":{"lodash":"^4.17.2","express":"^4.15.3","request":"^2.79.0","bluebird":"^3.5.0","@types/node":"^6.0.48","body-parser":"^1.17.2","typed-error":"^1.0.1","@types/lodash":"^4.14.54","@types/express":"^4.0.35","@types/request":"^2.48.1","request-promise":"^4.2.2","@types/body-parser":"^1.16.3","@types/bluebird-global":"^3.0.1","@types/request-promise":"^4.1.42"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.3.0","tslint":"^4.5.1","gulp-util":"^3.0.8","gulp-mocha":"^3.0.0","typescript":"^3.3.4000","@types/chai":"^3.5.1","chai-string":"^1.3.0","gulp-tslint":"^7.1.0","@types/mocha":"^2.2.41","@octokit/rest":"^16.20.0","gulp-sourcemaps":"^2.3.1","gulp-typescript":"^3.1.4","chai-as-promised":"^6.0.0","@types/chai-string":"^1.1.30","mocha-junit-reporter":"^1.13.0","@types/chai-as-promised":"0.0.30"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk_0.7.0-34-fix-page-token-typings-9766eba637b7ef3ea286531de9c20055e24cc03e_1554502725240_0.13321964725116464","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.7.0":{"name":"front-sdk","version":"0.7.0","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.7.0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"resin-ci","email":"accounts+npm-ci@resin.io"},{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"24fb34f22086cbee921592427979361af6f54a24","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.7.0.tgz","fileCount":61,"integrity":"sha512-G843WGFsLLFG8L6+PyOJqpOBo/uMDlNy+RFGWgZXILVM6Vrv68KgTr+Jh+oAba44YnF+G6J5+A4Lh4DDlhekbQ==","signatures":[{"sig":"MEYCIQDDqg8PjftiIOwdQgOgS0+R04ppVHqhY8xLqkRlIV8AIwIhAPXUEoh7UAwQjWuMjQrjK7kSn3Y7lEeF8c+FgOC/5yM9","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":304606,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcq0FUCRA9TVsSAnZWagAALNMP/1VMpkQYnLCfeoePSkCL\nvyT+dEWNla1H7NROyLmYCbDuFhzoXDiK7UL422WfZV1iaC5tqdm98rphPmec\n0u//BHG21D/Wggthsi1PHm/YQWwq8iUWFRQL6UTd8vh3eBdboaPR+Tb7SLRv\nnkKdIIdcOifNEJnmEGzQD3Qm5QUfLtvk0BW0fBmerBkzvu9axnJ9FyiK3C1M\n3Bpm+98bjdzuJIm66rinDOQCpSZePgV63t/rZnQGtOHLgTze95mVZAaG45D7\nq7698+r3FiUVpru8gWVc6epg6sjlQk+nnUHLYXhQH1QtjJeIXmrnXheOM51Z\nSqp3NHyqLn7NRN28kyMRMZcSjjjqiIUmbYMbAGXAJwN6Jh7UhFy4joWlFrTj\nOKEpbfQptLhQB1Pd1S0L2fPY0660yxc3Zbg6Fb8exT4F2mjjKhlSdUlyWpo0\nafNELV7smc0UrsnksjHqb+zEk1FMd+F1sY56qTcWwYcuvYt//fwEcD/qlgPW\nR6hXVTU4eXLOJdhSZo5ojx4/d0jgHv2wkSR2Izl+7ZSBnuLY/viDQVq3JFLK\na7du74xWrW71QETq4v1IbGvQdwfDVLT09zVJ3Y25mI5jWb/UDYzEC6iY8YcM\nrhcJUtiuEbF+A4ogmHw1MV+Eu72rISxebyhk08MupI6CTyVnRSf+zrMq5m6i\nqcsF\r\n=PeXC\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"lib/index.ts","gitHead":"722efa2771a43a7bdd717695cb70b26bccc1ad93","scripts":{"lint":"gulp tslint","test":"gulp tslint && gulp test","build":"gulp build","prepublish":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"_npmVersion":"6.9.0","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"10.4.0","dependencies":{"lodash":"^4.17.2","express":"^4.15.3","request":"^2.79.0","bluebird":"^3.5.0","@types/node":"^6.0.48","body-parser":"^1.17.2","typed-error":"^1.0.1","@types/lodash":"^4.14.54","@types/express":"^4.0.35","@types/request":"^2.48.1","request-promise":"^4.2.2","@types/body-parser":"^1.16.3","@types/bluebird-global":"^3.0.1","@types/request-promise":"^4.1.42"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.3.0","tslint":"^4.5.1","gulp-util":"^3.0.8","gulp-mocha":"^3.0.0","typescript":"^3.3.4000","@types/chai":"^3.5.1","chai-string":"^1.3.0","gulp-tslint":"^7.1.0","@types/mocha":"^2.2.41","@octokit/rest":"^16.20.0","gulp-sourcemaps":"^2.3.1","gulp-typescript":"^3.1.4","chai-as-promised":"^6.0.0","@types/chai-string":"^1.1.30","mocha-junit-reporter":"^1.13.0","@types/chai-as-promised":"0.0.30"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk_0.7.0_1554727251875_0.3937587008701253","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.7.1-conversation-update-param-0f6d452a2e87d23ecf28181238ca767ffb59d014":{"name":"front-sdk","version":"0.7.1-conversation-update-param-0f6d452a2e87d23ecf28181238ca767ffb59d014","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.7.1-conversation-update-param-0f6d452a2e87d23ecf28181238ca767ffb59d014","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"resin-ci","email":"accounts+npm-ci@resin.io"},{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"7881bcb8daadc5d7c9b02cd71da2fedaa85478c3","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.7.1-conversation-update-param-0f6d452a2e87d23ecf28181238ca767ffb59d014.tgz","fileCount":61,"integrity":"sha512-0lxuh/10BNvSkp93tLUKMs/Kq1z7yZ0yBtCAClFct7kXecbv9JsdyCfiKgyoz4IUdAA1pM96jg7//bxa6+W+nw==","signatures":[{"sig":"MEYCIQCZyqroJvzrs91w+eDw4EvRKk6HN+eG+t+bT/wdORFfhwIhAM5R4p3CDAmN4dr4EewhSa2VjnNV1pGez5DXHExEYkoY","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":304977,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcq0WRCRA9TVsSAnZWagAAETgP/A/B2kfNcPrXauuuDa8r\nvQNV6BZ9guiC0NxcUAg8/ntdFr+MD9dRxrIcy+KWoltD9CxUPsKUD8qBMsOy\nCesnMwvi1iAahkSPYI1XBrf4EDoZQ78q2P/fhjrvRArf6fsCdN0JEiWO972P\nTIolTS7d+Bv0FKcW8RzTjHak1zP0qwwF69TF9WkLoAQ7w7YcXti6mcKHUXn+\n96BoTWR3bDE0QyP37sh20blud75Dfwj01AIbPuypfvbJR9OeS4FuVxphOov5\nyrxtA91xhjLYwxFgBfioeciJzJMJ844clBaGqQyVGvTEgRsmI9ak2tcQC6yr\nIQPaJNNiUmkKasKQYEqZf+hkyQ6pSNM85UYucdcvaxwyv1gzVlZFaGI//ILl\n8O2QqeQC1EMj/law8utJeoFlTDHEUhnkJgFzGpwqhZqtWG8ZQ2y9x7rI0TuL\nqc9VPWWljFr21Brk31WqXmThvbrBo4hWpeTdgHzz90rvhumxLuTNHm/6Z5Wb\nRyVGI6yYDHQKwWYoYBTmQzSO0MCvD1oP9mBtB8sZAfAqKjpjbR8QIttmcKdW\nfFPpVVQ/j74NpkLmQWFZ4iDjCsLha6Nc61MMI9f+cdjUPrtp6YisFnnafTpm\ngLifcQw+4NI7so86eDWlYDsRNKezhnvurEhqvzBYbrjLhCvNSIsKN5nACk1n\nwNJp\r\n=ApDc\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"lib/index.ts","readme":"# front-sdk\nAn SDK for working with Front (https://frontapp.com).\n\n## TypeScript Quickstart\n\nImport in the usual way:\n\n```typescript\nimport { Front } from 'front-sdk';\n```\n\n## JavaScript\n\nRequire in the usual way:\n\n```javascript\nconst Front = require('front-sdk').Front;\n```\n\n## Usage\n\nCreate a new instance of the SDK to use it, passing the API token for Front.\n\n```typescript\nimport { Comment, Front } from 'front-sdk';\nconst front = new Front('abcdef123457890');\n\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}).then((comment: Comment) => {\n    console.log(comment);\n}).catch(FrontError, (err: FrontError) => {\n    console.log(err);\n});\n```\n\nCan also be used as a callback, if required:\n\n```typescript\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}, (err: FrontError, comment: FrontComment) => {\n    if (err) {\n        console.log(err);\n        return;\n    }\n\n    console.log(comment);\n});\n```\n\nClients can register for events, passing an object detailing a port to listen on using a new instance of an Express server, or an instance of an Express server to use. An optional path to install the webhook on can also be passed (this defaults to `/fronthook`).\n\nTo use this functionality, pass the secret shared key in as the second parameter when creating a new Front instance.\n```typescript\n    import { Event, Front } from 'front-sdk';\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    const httpServer = frontInst.registerEvents({ port: 1234, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nYou can also use a pre-existing Express instance, but note that the Front SDK expects that the request body should be an already parsed object or a JSON parseable string. You can easily add this using the `body-parser` library:\n\n```typescript\n    import { Event, Front } from 'front-sdk';\n    import * as bodyParser from 'body-parser';\n\n    const app = express();\n    app.use(bodyParser.json());\n    app.listen(1234);\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    frontInst.registerEvents({ server: app, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nThe SDK will verify that events sent to it are signed by the shared secret key, and will retrieve the entire event rather than just the preview. Events are sent to the client in the order the preview events for them were originally dispatched.\n\n#### Notes\n\nTo post into a Front Inbox, you need to know the correct channels in for it.\nChannels are instances of sources, such as SMTP, Facebook, Front Integrations, etc.\n\nSo to post a new Conversation:\n * Find the Inbox required want\n * List the Channels and find the correct one for the source (Integration channels, in the SDK case)\n * Post a Message to that Channel (which will return a Conversation reference)\n\nTo post a Comment or Message to that Conversation:\n * Use the Conversation reference to post (returns a Comment or Message object)\n","gitHead":"0f6d452a2e87d23ecf28181238ca767ffb59d014","scripts":{"lint":"gulp tslint","test":"gulp tslint && gulp test","build":"gulp build","prepublish":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"_npmVersion":"6.9.0","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"10.4.0","dependencies":{"lodash":"^4.17.2","express":"^4.15.3","request":"^2.79.0","bluebird":"^3.5.0","@types/node":"^6.0.48","body-parser":"^1.17.2","typed-error":"^1.0.1","@types/lodash":"^4.14.54","@types/express":"^4.0.35","@types/request":"^2.48.1","request-promise":"^4.2.2","@types/body-parser":"^1.16.3","@types/bluebird-global":"^3.0.1","@types/request-promise":"^4.1.42"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.3.0","tslint":"^4.5.1","gulp-util":"^3.0.8","gulp-mocha":"^3.0.0","typescript":"^3.3.4000","@types/chai":"^3.5.1","chai-string":"^1.3.0","gulp-tslint":"^7.1.0","@types/mocha":"^2.2.41","@octokit/rest":"^16.20.0","gulp-sourcemaps":"^2.3.1","gulp-typescript":"^3.1.4","chai-as-promised":"^6.0.0","@types/chai-string":"^1.1.30","mocha-junit-reporter":"^1.13.0","@types/chai-as-promised":"0.0.30"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk_0.7.1-conversation-update-param-0f6d452a2e87d23ecf28181238ca767ffb59d014_1554728336716_0.9110573051827255","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.7.1":{"name":"front-sdk","version":"0.7.1","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.7.1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"},{"name":"resin-ci","email":"accounts+npm-ci@resin.io"},{"name":"resin.io","email":"accounts@resin.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"f64c3e13351314ee8c928e302ae88ac05b84a01c","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.7.1.tgz","fileCount":61,"integrity":"sha512-7nsc5mFclOGxxvNBzMymXfdXGAHQW5EDxlyW37awv8hVk2zZVCdAfSOG6Tuuu+NgCZBYmizbj6BMix/pqYY+Bw==","signatures":[{"sig":"MEYCIQCovGCihpusbLAOpdLYcByUO6v6h+NtrGIc5kNZO7tIFQIhAOFszp/nBAsaf16gIu/HuvOqvO82v7U7cHz1NP7eH0gN","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":304910,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcq0aBCRA9TVsSAnZWagAAtfAP/1K8IM4+APAh6qknLgIl\ns61LAy1MIqeQDYlq6pHE8POlcvugt2gL0HszVOAETGMEPjYayE2jHuz8B2sz\npXup4dIamkj6RUu0Q5G9Lg96yjwQoMSA8HNuhQgfscvxD6Gui4KT+JZK05hT\nL8KTOCPMwD8TSmdNPaEfzHGVT9OFkR2RYOn6hh5j6vMlQz9JIE5iczNsGsDE\nm6Ji/sKJTslLlJR4qov5UqWFGf3YIcDAxlGm5vA7cBkrgIn1BFGVPbheej5p\nptg9FdbfenBkTMxq4dsfEGU0Vz8yK6PxCzwVSEV/nG8wPZkNIBlAwdDmCMIM\nPIsy1/ef+uVd8hSjb4Gs4b9vJuBYOt7w2AtCI+/duhQqlymUXJo8Z3PksW/A\nJlTs+ksSWaJjteQiLULCXtYjDiBiH0GjkCSzShfgt/FKuhQC1cl8G3kFefMN\nHlc6YFXQquUJu8vRnWMOFrFUp0osgjVes4VlsYWav3Fwj5V7WtgCh092MEJx\n9PoHDCmsuSQR6oPf6hg0oQ3UioCALrncm0gNJUCptC9sMHYyQJ812P/cKLF9\naLZpAapxoM46Z+sQtKkuEb5uPBl6wQ8RYBCraR0w+YqWIHfTts7nYBZI73b+\nJ+LYWuQaKpPuAQ36H2Y/5WgDFqrdqoLVvjX4397JKEyxvz+Kuyp3A0VLI5iR\nmaJg\r\n=SHRM\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"lib/index.ts","gitHead":"7b28c75d0e18aea984791f6d5d26909529737cac","scripts":{"lint":"gulp tslint","test":"gulp tslint && gulp test","build":"gulp build","prepublish":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"_npmVersion":"6.9.0","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"10.4.0","dependencies":{"lodash":"^4.17.2","express":"^4.15.3","request":"^2.79.0","bluebird":"^3.5.0","@types/node":"^6.0.48","body-parser":"^1.17.2","typed-error":"^1.0.1","@types/lodash":"^4.14.54","@types/express":"^4.0.35","@types/request":"^2.48.1","request-promise":"^4.2.2","@types/body-parser":"^1.16.3","@types/bluebird-global":"^3.0.1","@types/request-promise":"^4.1.42"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.3.0","tslint":"^4.5.1","gulp-util":"^3.0.8","gulp-mocha":"^3.0.0","typescript":"^3.3.4000","@types/chai":"^3.5.1","chai-string":"^1.3.0","gulp-tslint":"^7.1.0","@types/mocha":"^2.2.41","@octokit/rest":"^16.20.0","gulp-sourcemaps":"^2.3.1","gulp-typescript":"^3.1.4","chai-as-promised":"^6.0.0","@types/chai-string":"^1.1.30","mocha-junit-reporter":"^1.13.0","@types/chai-as-promised":"0.0.30"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk_0.7.1_1554728576608_0.6033561427089711","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.8.0-36-fix-contact-create-e0ac0d03c2a0ff1c9b6eab22b0bfd62ab0814b65":{"name":"front-sdk","version":"0.8.0-36-fix-contact-create-e0ac0d03c2a0ff1c9b6eab22b0bfd62ab0814b65","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.8.0-36-fix-contact-create-e0ac0d03c2a0ff1c9b6eab22b0bfd62ab0814b65","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"0fdabc947a841dac48eb173e069d417efee66d2f","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.8.0-36-fix-contact-create-e0ac0d03c2a0ff1c9b6eab22b0bfd62ab0814b65.tgz","fileCount":61,"integrity":"sha512-u4KCs7XalSYHNm9uTO5NvMlOeatJmX1IG22wYpIjxS3wtNGYfghxLXVjcDlH9HITO/QeU3ULSh2RTYD+6cmsOA==","signatures":[{"sig":"MEQCIBhzkrBy3y3qfP3SPRMmisKKs5PwaUxkrHYba3hHFIYvAiBrXVcP0iGeXCqTfBWs7lRlma1j3O0FrQfCZuqh1NrVqA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":305037,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdOE3mCRA9TVsSAnZWagAATmgP/01qeZanLvP4W8of/Ypj\nyQS0cJB3PNPZ3P853OYE4InzhRo4TEXLrLnzTw2zgAf40baRTkOwOdpE6t64\n475zw/gdwvf2yK4DZ/ExvfoS2y/yUzBS0kQRYQbH+xwX/Z45+kY/kD9MkQD2\ntBB8FplAmJ7C6G7hMMUK2ugCODrs/cePQ+pyhmgJzs+7ecTsl85s7M0pK++i\nPJWper1aa6vuVwnGb5l7xribD06sXQkpAkZnIADKnlVyW+++Joylgk5Llbrf\nafL3sv1cyLj27vv964prCDZQiUrkeAmAdDhVN+glci5EhZhFzgOEjBFx2p03\nyXtzIr293OfdJxRq4qNUf+IzLnP++qqdVZvzSm5d48BpIOxF8aRWodAgwK+d\nf6YISlcLoZWaHa+EPVJ6iPuVkNNOgyTWSCwM0yuAhEm2IGjanGsRz1uOfoej\nfq34JnQRY6s+RsGuMngd6YxpxAVyG01PcGOddFjdWtgDAo6ruKSXHW7OeQrY\n1gCTaX5xo0I7maHO4lJkmUfIO10ST4CIjoUKs1fc+l75MATOBYTXIumd9o5r\nSLDQi7931LuarPF51RaRTJandhLUudW3hFuXBUAY4WvA4bzix4SH1uGJSV5K\nIx2jvJMWMva0FZ7KFfVVu5yeM+T3/DES598vR9ltCYpVDpthlpJh3+cflCPw\n/Iya\r\n=Jgvp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"lib/index.ts","readme":"# front-sdk\nAn SDK for working with Front (https://frontapp.com).\n\n## TypeScript Quickstart\n\nImport in the usual way:\n\n```typescript\nimport { Front } from 'front-sdk';\n```\n\n## JavaScript\n\nRequire in the usual way:\n\n```javascript\nconst Front = require('front-sdk').Front;\n```\n\n## Usage\n\nCreate a new instance of the SDK to use it, passing the API token for Front.\n\n```typescript\nimport { Comment, Front } from 'front-sdk';\nconst front = new Front('abcdef123457890');\n\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}).then((comment: Comment) => {\n    console.log(comment);\n}).catch(FrontError, (err: FrontError) => {\n    console.log(err);\n});\n```\n\nCan also be used as a callback, if required:\n\n```typescript\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}, (err: FrontError, comment: FrontComment) => {\n    if (err) {\n        console.log(err);\n        return;\n    }\n\n    console.log(comment);\n});\n```\n\nClients can register for events, passing an object detailing a port to listen on using a new instance of an Express server, or an instance of an Express server to use. An optional path to install the webhook on can also be passed (this defaults to `/fronthook`).\n\nTo use this functionality, pass the secret shared key in as the second parameter when creating a new Front instance.\n```typescript\n    import { Event, Front } from 'front-sdk';\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    const httpServer = frontInst.registerEvents({ port: 1234, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nYou can also use a pre-existing Express instance, but note that the Front SDK expects that the request body should be an already parsed object or a JSON parseable string. You can easily add this using the `body-parser` library:\n\n```typescript\n    import { Event, Front } from 'front-sdk';\n    import * as bodyParser from 'body-parser';\n\n    const app = express();\n    app.use(bodyParser.json());\n    app.listen(1234);\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    frontInst.registerEvents({ server: app, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nThe SDK will verify that events sent to it are signed by the shared secret key, and will retrieve the entire event rather than just the preview. Events are sent to the client in the order the preview events for them were originally dispatched.\n\n#### Notes\n\nTo post into a Front Inbox, you need to know the correct channels in for it.\nChannels are instances of sources, such as SMTP, Facebook, Front Integrations, etc.\n\nSo to post a new Conversation:\n * Find the Inbox required want\n * List the Channels and find the correct one for the source (Integration channels, in the SDK case)\n * Post a Message to that Channel (which will return a Conversation reference)\n\nTo post a Comment or Message to that Conversation:\n * Use the Conversation reference to post (returns a Comment or Message object)\n","gitHead":"e0ac0d03c2a0ff1c9b6eab22b0bfd62ab0814b65","scripts":{"lint":"gulp tslint","test":"gulp tslint && gulp test","build":"gulp build","prepublish":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"_npmVersion":"6.9.0","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"10.4.0","dependencies":{"lodash":"^4.17.2","express":"^4.15.3","request":"^2.79.0","bluebird":"^3.5.0","@types/node":"^6.0.48","body-parser":"^1.17.2","typed-error":"^1.0.1","@types/lodash":"^4.14.54","@types/express":"^4.0.35","@types/request":"^2.48.1","request-promise":"^4.2.2","@types/body-parser":"^1.16.3","@types/bluebird-global":"^3.0.1","@types/request-promise":"^4.1.42"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.3.0","tslint":"^4.5.1","gulp-util":"^3.0.8","gulp-mocha":"^3.0.0","typescript":"^3.3.4000","@types/chai":"^3.5.1","chai-string":"^1.3.0","gulp-tslint":"^7.1.0","@types/mocha":"^2.2.41","@octokit/rest":"^16.20.0","gulp-sourcemaps":"^2.3.1","gulp-typescript":"^3.1.4","chai-as-promised":"^6.0.0","@types/chai-string":"^1.1.30","mocha-junit-reporter":"^1.13.0","@types/chai-as-promised":"0.0.30"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk_0.8.0-36-fix-contact-create-e0ac0d03c2a0ff1c9b6eab22b0bfd62ab0814b65_1563971045806_0.26402235174038724","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.7.2-36-fix-contact-create-9ca2c082c3518e34b4e97a046d75a3cc7c682083":{"name":"front-sdk","version":"0.7.2-36-fix-contact-create-9ca2c082c3518e34b4e97a046d75a3cc7c682083","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.7.2-36-fix-contact-create-9ca2c082c3518e34b4e97a046d75a3cc7c682083","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"0c3aabf09bda0c3ea3d41c2fa364af0da7a51f76","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.7.2-36-fix-contact-create-9ca2c082c3518e34b4e97a046d75a3cc7c682083.tgz","fileCount":61,"integrity":"sha512-g+hDIqfbwmeooxNIm/9OoeF+6DI2u9b5xxjPeoOcvBXfxQE5cDS68y1jx5uaHlE5kVerkrs5069A1m1U1fgWjA==","signatures":[{"sig":"MEUCIQCwtiTc6R+dLBvwXPEB81wk09nh1lVR5rUA1SiGd4ZH3QIgODbJh89FaPM6k9TjdVYXEjc9LYJS/osl8+J9+pvIMOM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":305037,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdOGPbCRA9TVsSAnZWagAAgw0P/i34dVN/5A+3oa5JIQ0N\ns9vLwGQwGIpuwAnaD+2M0U7R1mAkdpBziI6IOdvGs/aKv923L6hCFDil3XXx\nWO7F9ZYSKD8XKU8Sg9DKbSUnmYagX5onTMARrTEV+CECrpOYkHPLOOeAsvOu\nK4KStcjMQk2LV/B9XCbS84dPPgw+FRBzueE1M2cevj9q5snlnkXf7h3pGD12\nX3xhOZ7RdXfH1qSIBJaqrWwAms8P6EEMVpDMDy6bLnswJRHhNhY6bXsjXtw8\nIOyua2CjWFqPu83cgv27oSN/cr4nX312JBSAfP0pzyvXkBQD93EetHqBPNsX\neKsxZbWx5R+kQyz7PPIdK8Hcz94qDWywsRCmXkzsBFunTneaDyp/cJU1LFoi\n2atHnTTe9BjWpv2JEmx5qCZAC8tCLaWewGpgQOEE8tfHSRT+toOVlPUx+ipX\nFwfTqTAG07Syhxlr3N1zMC/cPuE9Etz7LzkRHQAAO+0oq8Cw46dQ/kWuN0dx\nzPH2Z/CiVKz0AwpeAhuEdUMetNH3tht23QjQ9XtqntDfJBmGT0ZiMGq9Hro9\nH8A/oUlTp1Fhz0WSiHxBooK7UqGqpwDFoW3CvZmsCxQi0mNyqmeCUkcakgSo\nEOH+yBwLVezJgKVL19Q5/0Ccq6KJJfN39Hr38vvC9GDfLogi336nZtnmxUmr\ng07S\r\n=lDaH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"lib/index.ts","readme":"# front-sdk\nAn SDK for working with Front (https://frontapp.com).\n\n## TypeScript Quickstart\n\nImport in the usual way:\n\n```typescript\nimport { Front } from 'front-sdk';\n```\n\n## JavaScript\n\nRequire in the usual way:\n\n```javascript\nconst Front = require('front-sdk').Front;\n```\n\n## Usage\n\nCreate a new instance of the SDK to use it, passing the API token for Front.\n\n```typescript\nimport { Comment, Front } from 'front-sdk';\nconst front = new Front('abcdef123457890');\n\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}).then((comment: Comment) => {\n    console.log(comment);\n}).catch(FrontError, (err: FrontError) => {\n    console.log(err);\n});\n```\n\nCan also be used as a callback, if required:\n\n```typescript\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}, (err: FrontError, comment: FrontComment) => {\n    if (err) {\n        console.log(err);\n        return;\n    }\n\n    console.log(comment);\n});\n```\n\nClients can register for events, passing an object detailing a port to listen on using a new instance of an Express server, or an instance of an Express server to use. An optional path to install the webhook on can also be passed (this defaults to `/fronthook`).\n\nTo use this functionality, pass the secret shared key in as the second parameter when creating a new Front instance.\n```typescript\n    import { Event, Front } from 'front-sdk';\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    const httpServer = frontInst.registerEvents({ port: 1234, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nYou can also use a pre-existing Express instance, but note that the Front SDK expects that the request body should be an already parsed object or a JSON parseable string. You can easily add this using the `body-parser` library:\n\n```typescript\n    import { Event, Front } from 'front-sdk';\n    import * as bodyParser from 'body-parser';\n\n    const app = express();\n    app.use(bodyParser.json());\n    app.listen(1234);\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    frontInst.registerEvents({ server: app, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nThe SDK will verify that events sent to it are signed by the shared secret key, and will retrieve the entire event rather than just the preview. Events are sent to the client in the order the preview events for them were originally dispatched.\n\n#### Notes\n\nTo post into a Front Inbox, you need to know the correct channels in for it.\nChannels are instances of sources, such as SMTP, Facebook, Front Integrations, etc.\n\nSo to post a new Conversation:\n * Find the Inbox required want\n * List the Channels and find the correct one for the source (Integration channels, in the SDK case)\n * Post a Message to that Channel (which will return a Conversation reference)\n\nTo post a Comment or Message to that Conversation:\n * Use the Conversation reference to post (returns a Comment or Message object)\n","gitHead":"9ca2c082c3518e34b4e97a046d75a3cc7c682083","scripts":{"lint":"gulp tslint","test":"gulp tslint && gulp test","build":"gulp build","prepublish":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"_npmVersion":"6.9.0","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"10.4.0","dependencies":{"lodash":"^4.17.2","express":"^4.15.3","request":"^2.79.0","bluebird":"^3.5.0","@types/node":"^6.0.48","body-parser":"^1.17.2","typed-error":"^1.0.1","@types/lodash":"^4.14.54","@types/express":"^4.0.35","@types/request":"^2.48.1","request-promise":"^4.2.2","@types/body-parser":"^1.16.3","@types/bluebird-global":"^3.0.1","@types/request-promise":"^4.1.42"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.3.0","tslint":"^4.5.1","gulp-util":"^3.0.8","gulp-mocha":"^3.0.0","typescript":"^3.3.4000","@types/chai":"^3.5.1","chai-string":"^1.3.0","gulp-tslint":"^7.1.0","@types/mocha":"^2.2.41","@octokit/rest":"^16.20.0","gulp-sourcemaps":"^2.3.1","gulp-typescript":"^3.1.4","chai-as-promised":"^6.0.0","@types/chai-string":"^1.1.30","mocha-junit-reporter":"^1.13.0","@types/chai-as-promised":"0.0.30"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk_0.7.2-36-fix-contact-create-9ca2c082c3518e34b4e97a046d75a3cc7c682083_1563976666331_0.9593852408801522","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.7.2":{"name":"front-sdk","version":"0.7.2","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.7.2","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"c9a7a14a304a9cd88de36baf13690e9b5cd7204f","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.7.2.tgz","fileCount":61,"integrity":"sha512-BeiTha+Mr+9v7+6pBRlt5agZaEhva9KaFW4cAA/rjNDyep4px21N7xddFfylNMxgGd84SmGoEA4FxH4hj/XnUQ==","signatures":[{"sig":"MEQCIEEWg3WTEyEz5c1zfPvx4HeE0+Mjm6oS43nqoPeFwkHYAiARGekC2NscCcxNn0X3HzTXErOyqytSgVe/G8R0cvHiHg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":304974,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJdOGXSCRA9TVsSAnZWagAAhCsP/1qw3PYad+mz4H3b9Kpu\nj247KgYSMt4uDEmYj8cb4dxO103cIH2ZKT7MHUm56YlOg1rO/7yonzUaqVEJ\nRboCtYRSbwzKUAsCltVIcV+XGuFYGnULZn3N711FKmnCfGlTHfMw0CzlMM34\nCs+Np81MOfG6QaXMKXLUVdjPLjRaldWsOX/dlE849XzzhrweXW0FIKEWnqwK\nibyomjDHvHGG56Hn/Lx+KaSqc/yKtV5cGA1MxLMZLJZ9p122qzkx9kRI40iw\nUhAcKEHlxmZvfPg1RaG4Gc07cFqAdDpQCr3XxXFDBF+mUF5Qe1Med6XNOueH\n8GbOl3IxgxHY11MBPQhuDZXbpappv7gDWW8oNbJaRgh2SrOx+skLTBtalTPw\nSBmxEemql7Y9GZmDZN3ZaGGutYsvsyzEeIuRXM2zOCemaqf0yUfm9zg9aK9B\nnyrQajQj15cxYxsmTLLoyIEkstoz/EugFFlHwjdqXVG9uiok8SkzKQQEjnME\ngK2c6u6YXchxRo+AijPQQMJgq/rN/Yx5bi5zaUaFoz1grBJhKcA9B0l5XU0E\nCYbc2ChMlz1ovVUARRQNwHo+LNJUsOlo2PiZE6Vj+ReL9YCUshROyrEzbXW+\nWmLcKQWDuM8U5/JwNkcpstybqDrNK7qrGmItMVc9ZKpa2c9cpwtzxaJ9wI+c\nhPQB\r\n=09e7\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"lib/index.ts","gitHead":"4f835bfb2683c9135a475b8d89dc0aae86f9febc","scripts":{"lint":"gulp tslint","test":"gulp tslint && gulp test","build":"gulp build","prepublish":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"_npmVersion":"6.9.0","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"10.4.0","dependencies":{"lodash":"^4.17.2","express":"^4.15.3","request":"^2.79.0","bluebird":"^3.5.0","@types/node":"^6.0.48","body-parser":"^1.17.2","typed-error":"^1.0.1","@types/lodash":"^4.14.54","@types/express":"^4.0.35","@types/request":"^2.48.1","request-promise":"^4.2.2","@types/body-parser":"^1.16.3","@types/bluebird-global":"^3.0.1","@types/request-promise":"^4.1.42"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.3.0","tslint":"^4.5.1","gulp-util":"^3.0.8","gulp-mocha":"^3.0.0","typescript":"^3.3.4000","@types/chai":"^3.5.1","chai-string":"^1.3.0","gulp-tslint":"^7.1.0","@types/mocha":"^2.2.41","@octokit/rest":"^16.20.0","gulp-sourcemaps":"^2.3.1","gulp-typescript":"^3.1.4","chai-as-promised":"^6.0.0","@types/chai-string":"^1.1.30","mocha-junit-reporter":"^1.13.0","@types/chai-as-promised":"0.0.30"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk_0.7.2_1563977169897_0.8215556988374089","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.7.3-update-typed-error-200e1514c3bc1e24ac1de9d5fe5fa8c4979cab25":{"name":"front-sdk","version":"0.7.3-update-typed-error-200e1514c3bc1e24ac1de9d5fe5fa8c4979cab25","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.7.3-update-typed-error-200e1514c3bc1e24ac1de9d5fe5fa8c4979cab25","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"95e06a1a1ee0a15280f42bc84fcb762c5995a3ab","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.7.3-update-typed-error-200e1514c3bc1e24ac1de9d5fe5fa8c4979cab25.tgz","fileCount":61,"integrity":"sha512-Ee+/eS0uKRyAdem69KL91PykPCISCYZo186WZZ2CGNW2P9YPrR4yg1eJTSOQyLcEIDfCULOM6D9GZzl0VBpsAQ==","signatures":[{"sig":"MEUCIQD0sEJWSp9ZH7ONlttdwNJw8XwcNbs4rY1c7qplYBpmDwIgfWyVyDumhweqWTjAZ9BHjOodJei0YVu5Vxw3UialIPc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":310383,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfKsdcCRA9TVsSAnZWagAAAkkP/0Grgx6Oqa6YuHKPW/Cj\nqYCrpSQmFhjQEYJ4ikBA+bK/LxFZJFwVq7aq0+vH1GPPoNlBBjr5kA6Ty29w\nHObZU22pRwwYYtIWRJNupgkHZwTdHSy2eUSGLhdSM4MYcRaXttZShO8y4BKV\nGnE5AnFpLQ2xactdZ37oayzPkBQeVBsHP9nUelOM6ydi8tztYfnOoLyI67FO\nMWmI81p6efDjwvHPiWWQ6PAoOvuUPH8pCX++9LVMpVAS+mAHDZYzd6BQPUKY\n22oWp0oUg2O4dIpwRh74B2yw6z220mKtd3fYAIrgb3Nv6g1gLTG5prnf+dLm\n19OCQ91sQdl5EVbr9sW2hWLiufASxQwxwX69m1DFkDKW8/hX7KrqqwI3bjV7\n8ifr/Ydeh+jXhkQD217jvDBcrTtSIXiGSn2VpgyQDgPJocbIGOTNfQobM9NN\n2sa8+nExxF8583fyNqJ82QMvq01QzZPruzXifamM8FXcBYr/jpiOSg6OfO34\nL+5aLdTQBkfKKpINanUF5dI6zM7fqTcvrbn/F7IgdRbagxBuFU+qTy4Q/VMc\npNkQjngOzFroIP4G60L5lz8Jp3JjP3PxCnbPHvJI/AMLxCOhFUUo9gLC2t87\ne1blj3066QbCfoGiFkUUSqTbDfK7uBq4akpkMtWwJDfT0rfyFZhGwUmxDSaW\nA5d3\r\n=F6fK\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"lib/index.ts","readme":"# front-sdk\nAn SDK for working with Front (https://frontapp.com).\n\n## TypeScript Quickstart\n\nImport in the usual way:\n\n```typescript\nimport { Front } from 'front-sdk';\n```\n\n## JavaScript\n\nRequire in the usual way:\n\n```javascript\nconst Front = require('front-sdk').Front;\n```\n\n## Usage\n\nCreate a new instance of the SDK to use it, passing the API token for Front.\n\n```typescript\nimport { Comment, Front } from 'front-sdk';\nconst front = new Front('abcdef123457890');\n\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}).then((comment: Comment) => {\n    console.log(comment);\n}).catch(FrontError, (err: FrontError) => {\n    console.log(err);\n});\n```\n\nCan also be used as a callback, if required:\n\n```typescript\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}, (err: FrontError, comment: FrontComment) => {\n    if (err) {\n        console.log(err);\n        return;\n    }\n\n    console.log(comment);\n});\n```\n\nClients can register for events, passing an object detailing a port to listen on using a new instance of an Express server, or an instance of an Express server to use. An optional path to install the webhook on can also be passed (this defaults to `/fronthook`).\n\nTo use this functionality, pass the secret shared key in as the second parameter when creating a new Front instance.\n```typescript\n    import { Event, Front } from 'front-sdk';\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    const httpServer = frontInst.registerEvents({ port: 1234, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nYou can also use a pre-existing Express instance, but note that the Front SDK expects that the request body should be an already parsed object or a JSON parseable string. You can easily add this using the `body-parser` library:\n\n```typescript\n    import { Event, Front } from 'front-sdk';\n    import * as bodyParser from 'body-parser';\n\n    const app = express();\n    app.use(bodyParser.json());\n    app.listen(1234);\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    frontInst.registerEvents({ server: app, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nThe SDK will verify that events sent to it are signed by the shared secret key, and will retrieve the entire event rather than just the preview. Events are sent to the client in the order the preview events for them were originally dispatched.\n\n#### Notes\n\nTo post into a Front Inbox, you need to know the correct channels in for it.\nChannels are instances of sources, such as SMTP, Facebook, Front Integrations, etc.\n\nSo to post a new Conversation:\n * Find the Inbox required want\n * List the Channels and find the correct one for the source (Integration channels, in the SDK case)\n * Post a Message to that Channel (which will return a Conversation reference)\n\nTo post a Comment or Message to that Conversation:\n * Use the Conversation reference to post (returns a Comment or Message object)\n","gitHead":"200e1514c3bc1e24ac1de9d5fe5fa8c4979cab25","scripts":{"lint":"gulp tslint","test":"gulp tslint && gulp test","build":"gulp build","prepublish":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"10.20.1","dependencies":{"lodash":"^4.17.2","express":"^4.15.3","request":"^2.79.0","bluebird":"^3.5.0","@types/node":"^10.17.28","body-parser":"^1.19.0","typed-error":"^3.2.1","@types/lodash":"^4.14.54","@types/express":"^4.0.35","@types/request":"^2.48.1","request-promise":"^4.2.2","@types/body-parser":"^1.19.0","@types/bluebird-global":"^3.0.1","@types/request-promise":"^4.1.42"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.3.0","tslint":"^4.5.1","gulp-util":"^3.0.8","gulp-mocha":"^3.0.0","typescript":"^3.9.7","@types/chai":"^3.5.1","chai-string":"^1.3.0","gulp-tslint":"^7.1.0","@types/mocha":"^2.2.41","@octokit/rest":"^16.20.0","gulp-sourcemaps":"^2.3.1","gulp-typescript":"^3.1.4","chai-as-promised":"^6.0.0","@types/chai-string":"^1.1.30","mocha-junit-reporter":"^1.13.0","@types/chai-as-promised":"0.0.30"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk_0.7.3-update-typed-error-200e1514c3bc1e24ac1de9d5fe5fa8c4979cab25_1596639067642_0.2708270617546955","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.7.3-update-typed-error-5dabd34df5a226dc74df987694ad61ce99451056":{"name":"front-sdk","version":"0.7.3-update-typed-error-5dabd34df5a226dc74df987694ad61ce99451056","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.7.3-update-typed-error-5dabd34df5a226dc74df987694ad61ce99451056","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"43345b17bf5bb7b5edd880576beed202ecff75c1","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.7.3-update-typed-error-5dabd34df5a226dc74df987694ad61ce99451056.tgz","fileCount":62,"integrity":"sha512-WEjn8YgZrE3L88QRI6lsFwbfOSAgVaQqQL1z63lCMWh/9dHtKYPWJO1ryFELQ1T+gD8AX0KlEYNN7BSQikmY2w==","signatures":[{"sig":"MEQCIGSSYCUX2To/LaOq7mhYOqk5kTqvUqxzZTymAUy3QFvjAiBUitCLC0Igk1+vi60l8s3gnGgXSIgK/T5TC0wlD5Okeg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":308408,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfMQLDCRA9TVsSAnZWagAARuEP/2MXDCvNqIG/FsTYZZG/\nQG2cDVXhirhIwb7qTrM4neozLItiBQmNZaHqeb1hnaHh2ljkdrBVuBogCnwf\nWw4uzHLI93qx4DeULOyVhj9y26Xu8VMybP2wCcs7wXNAXchtfbk4I/nFclj7\n5fwBuMHHD3LKelyqVPcHDq5ua7A55r6KkXp3wQ0D09/vmVHMdzMk0EV1aP/L\n3vr3nNU2R+1+3O1io5jzdzYel+bWbk8H/JHhGmkvCyn9ZT0FPlN9C9y3mqZY\nVvGAMg//N+GJgdvkd6CvDVNuzlDIvCf6XSmmlakH7vmXmQRnKuVZE7mykcXf\n1RjPUKXn6DEE4gAPCOvFCuop2VrIxK666EAZUCaU8dW2NZrMRvidb7nJWVVr\nUUr/d1g8QOniwThnC54707Gpt9cBoG5y97vOdQGj7Si1+Uya8bNpKA6lzbM/\nN5v807tJBZ87Gjei+2aYFw443fB4q7s7f+4PXTJz/2jG5J/Fp6/Jy7nAV61I\noE50pQ/gsgp0wGy/wn68pwThJBWk+1LUeQLYS14FPOqKer92RIJ2Pl8YJzP0\nmCGhCT+jy7iAkaES9HvGIYKYcupY/Kj3TEHVjsUG2ozv+WKMqs01dPwHFw3j\ne2Ot+TTStQZhn9lnkaCHlodY3WaGS+oRYRIYkTNeg4kOux75Nfs+dFwBRWmt\n2vfj\r\n=1BQV\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"lib/index.ts","readme":"# front-sdk\nAn SDK for working with Front (https://frontapp.com).\n\n## TypeScript Quickstart\n\nImport in the usual way:\n\n```typescript\nimport { Front } from 'front-sdk';\n```\n\n## JavaScript\n\nRequire in the usual way:\n\n```javascript\nconst Front = require('front-sdk').Front;\n```\n\n## Usage\n\nCreate a new instance of the SDK to use it, passing the API token for Front.\n\n```typescript\nimport { Comment, Front } from 'front-sdk';\nconst front = new Front('abcdef123457890');\n\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}).then((comment: Comment) => {\n    console.log(comment);\n}).catch(FrontError, (err: FrontError) => {\n    console.log(err);\n});\n```\n\nCan also be used as a callback, if required:\n\n```typescript\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}, (err: FrontError, comment: FrontComment) => {\n    if (err) {\n        console.log(err);\n        return;\n    }\n\n    console.log(comment);\n});\n```\n\nClients can register for events, passing an object detailing a port to listen on using a new instance of an Express server, or an instance of an Express server to use. An optional path to install the webhook on can also be passed (this defaults to `/fronthook`).\n\nTo use this functionality, pass the secret shared key in as the second parameter when creating a new Front instance.\n```typescript\n    import { Event, Front } from 'front-sdk';\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    const httpServer = frontInst.registerEvents({ port: 1234, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nYou can also use a pre-existing Express instance, but note that the Front SDK expects that the request body should be an already parsed object or a JSON parseable string. You can easily add this using the `body-parser` library:\n\n```typescript\n    import { Event, Front } from 'front-sdk';\n    import * as bodyParser from 'body-parser';\n\n    const app = express();\n    app.use(bodyParser.json());\n    app.listen(1234);\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    frontInst.registerEvents({ server: app, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nThe SDK will verify that events sent to it are signed by the shared secret key, and will retrieve the entire event rather than just the preview. Events are sent to the client in the order the preview events for them were originally dispatched.\n\n#### Notes\n\nTo post into a Front Inbox, you need to know the correct channels in for it.\nChannels are instances of sources, such as SMTP, Facebook, Front Integrations, etc.\n\nSo to post a new Conversation:\n * Find the Inbox required want\n * List the Channels and find the correct one for the source (Integration channels, in the SDK case)\n * Post a Message to that Channel (which will return a Conversation reference)\n\nTo post a Comment or Message to that Conversation:\n * Use the Conversation reference to post (returns a Comment or Message object)\n","gitHead":"5dabd34df5a226dc74df987694ad61ce99451056","scripts":{"lint":"gulp tslint","test":"gulp tslint && gulp test","build":"gulp build","prepublish":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"10.20.1","dependencies":{"lodash":"^4.17.2","express":"^4.15.3","request":"^2.79.0","bluebird":"^3.5.0","@types/node":"^10.17.28","body-parser":"^1.19.0","typed-error":"^3.2.1","@types/lodash":"^4.14.54","@types/express":"^4.0.35","@types/request":"^2.48.1","request-promise":"^4.2.2","@types/body-parser":"^1.19.0","@types/bluebird-global":"^3.0.1","@types/request-promise":"^4.1.42"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.3.0","tslint":"^4.5.1","gulp-util":"^3.0.8","gulp-mocha":"^3.0.0","typescript":"^3.9.7","@types/chai":"^3.5.1","chai-string":"^1.3.0","gulp-tslint":"^7.1.0","@types/mocha":"^2.2.41","@octokit/rest":"^16.20.0","gulp-sourcemaps":"^2.3.1","gulp-typescript":"^3.1.4","chai-as-promised":"^6.0.0","@types/chai-string":"^1.1.30","mocha-junit-reporter":"^1.13.0","@types/chai-as-promised":"0.0.30"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk_0.7.3-update-typed-error-5dabd34df5a226dc74df987694ad61ce99451056_1597047490463_0.12626058593755185","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.7.3-update-typed-error-d44be1a8a71c18aab2a78d29eb101ef99906be83":{"name":"front-sdk","version":"0.7.3-update-typed-error-d44be1a8a71c18aab2a78d29eb101ef99906be83","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.7.3-update-typed-error-d44be1a8a71c18aab2a78d29eb101ef99906be83","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"a1aa1f3b6393ab99c29ae26bdf8a71378f0040e1","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.7.3-update-typed-error-d44be1a8a71c18aab2a78d29eb101ef99906be83.tgz","fileCount":62,"integrity":"sha512-X9akBTo+Uyd5K+esuSoikwR1gq3fgm8RBBAGRF//3MdbNGLCovl2d4gSZ/T/Z7LTlju86Du1BiSKw9XsfjaSBw==","signatures":[{"sig":"MEUCIBAzf7jm2ZGgqa73eagat3pEz4ejAVFw2ENxr7BrFumVAiEA8HQai/jq4DLHIKBpuEg8CatqsK9Gs/bcEoM8M199UQw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":308410,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfMUYsCRA9TVsSAnZWagAAvdMP/RlYxDpDCU9zwL5UiuXn\nfhk3hdoUup5uCVSXf88vMtn4+eAe4x4OeqtHrv3/Ovs+4ceQIW9emkrHp2ok\nBU4eCOhAERzz/64GyZnUFm0StqZks3c8rxauesrCknExmeMruxGjTdst2JLU\nNeo5aQBYV68dmjVK8KN20UwkpD0rP7hxu53LnDWxarqttFIIjVKro0aIN0Rg\n15p40yXcDHTrkh3/vwy/jExTLrdW9N90LCzA6bhUlBzuZFLxCQ5FtS9EBD3N\nCsjQD7ZBCuYFKy5dLkbCj57S8IRUQUBz6HT2oap0XGvsCYVXAr0qi1mV+vsU\nD3r1ZyQ7hlUijm3SyOPOSDYpUU0Qp0eJmFb3hP+FZ0qbdxyt8TVMl7Va4yTO\n9F4eNgddBpV3SecHYE5e0JsJ9GFP3wHYu6kmGUdjLfU/LlPkCorPRSmngYmP\nyWLAvu6toL9JzadVOxfU/9/k7wGWGvKeP9EmjrnT65QtFo5ba5+jllFu03Px\nrLjK36hh4BUMqOC3AcfJ6H6OMaAPw0IB7YsXbtXVFRnJiZYKTyT0ZtnQ+ccU\n6yIGeLohst3osEibYERe0MaPBtJhfUdjoYPgTmQkDuJJd11m3m7+JA6x8NsB\n+q4axA2P4s9iNe/KywpUoTzz1codfFrMOM4MyNkkoPMmSWEMwInNpOJYnhiM\n6I8M\r\n=rpAH\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"lib/index.ts","readme":"# front-sdk\nAn SDK for working with Front (https://frontapp.com).\n\n## TypeScript Quickstart\n\nImport in the usual way:\n\n```typescript\nimport { Front } from 'front-sdk';\n```\n\n## JavaScript\n\nRequire in the usual way:\n\n```javascript\nconst Front = require('front-sdk').Front;\n```\n\n## Usage\n\nCreate a new instance of the SDK to use it, passing the API token for Front.\n\n```typescript\nimport { Comment, Front } from 'front-sdk';\nconst front = new Front('abcdef123457890');\n\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}).then((comment: Comment) => {\n    console.log(comment);\n}).catch(FrontError, (err: FrontError) => {\n    console.log(err);\n});\n```\n\nCan also be used as a callback, if required:\n\n```typescript\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}, (err: FrontError, comment: FrontComment) => {\n    if (err) {\n        console.log(err);\n        return;\n    }\n\n    console.log(comment);\n});\n```\n\nClients can register for events, passing an object detailing a port to listen on using a new instance of an Express server, or an instance of an Express server to use. An optional path to install the webhook on can also be passed (this defaults to `/fronthook`).\n\nTo use this functionality, pass the secret shared key in as the second parameter when creating a new Front instance.\n```typescript\n    import { Event, Front } from 'front-sdk';\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    const httpServer = frontInst.registerEvents({ port: 1234, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nYou can also use a pre-existing Express instance, but note that the Front SDK expects that the request body should be an already parsed object or a JSON parseable string. You can easily add this using the `body-parser` library:\n\n```typescript\n    import { Event, Front } from 'front-sdk';\n    import * as bodyParser from 'body-parser';\n\n    const app = express();\n    app.use(bodyParser.json());\n    app.listen(1234);\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    frontInst.registerEvents({ server: app, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nThe SDK will verify that events sent to it are signed by the shared secret key, and will retrieve the entire event rather than just the preview. Events are sent to the client in the order the preview events for them were originally dispatched.\n\n#### Notes\n\nTo post into a Front Inbox, you need to know the correct channels in for it.\nChannels are instances of sources, such as SMTP, Facebook, Front Integrations, etc.\n\nSo to post a new Conversation:\n * Find the Inbox required want\n * List the Channels and find the correct one for the source (Integration channels, in the SDK case)\n * Post a Message to that Channel (which will return a Conversation reference)\n\nTo post a Comment or Message to that Conversation:\n * Use the Conversation reference to post (returns a Comment or Message object)\n","gitHead":"d44be1a8a71c18aab2a78d29eb101ef99906be83","scripts":{"lint":"gulp tslint","test":"gulp tslint && gulp test","build":"gulp build","prepublish":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"10.20.1","dependencies":{"lodash":"^4.17.2","express":"^4.15.3","request":"^2.79.0","bluebird":"^3.5.0","@types/node":"^10.17.28","body-parser":"^1.19.0","typed-error":"^3.2.1","@types/lodash":"^4.14.54","@types/express":"^4.0.35","@types/request":"^2.48.1","request-promise":"^4.2.2","@types/body-parser":"^1.19.0","@types/bluebird-global":"^3.0.1","@types/request-promise":"^4.1.42"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.3.0","tslint":"^4.5.1","gulp-util":"^3.0.8","gulp-mocha":"^3.0.0","typescript":"^3.9.7","@types/chai":"^3.5.1","chai-string":"^1.3.0","gulp-tslint":"^7.1.0","@types/mocha":"^2.2.41","@octokit/rest":"^16.20.0","gulp-sourcemaps":"^2.3.1","gulp-typescript":"^3.1.4","chai-as-promised":"^6.0.0","@types/chai-string":"^1.1.30","mocha-junit-reporter":"^1.13.0","@types/chai-as-promised":"0.0.30"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk_0.7.3-update-typed-error-d44be1a8a71c18aab2a78d29eb101ef99906be83_1597064748419_0.9968273559538829","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.7.3-add-git-secrets-dcebacf8eca0b6f3468d6fe65269e47964c37ef9":{"name":"front-sdk","version":"0.7.3-add-git-secrets-dcebacf8eca0b6f3468d6fe65269e47964c37ef9","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.7.3-add-git-secrets-dcebacf8eca0b6f3468d6fe65269e47964c37ef9","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"ca0bda66a36a0db8a8a2900dac4edb99b1dc7793","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.7.3-add-git-secrets-dcebacf8eca0b6f3468d6fe65269e47964c37ef9.tgz","fileCount":65,"integrity":"sha512-L8r2hFQqK6siusMr7SnC/Hdy14NhO61668So+MdqbQum9hIxXLrIYTst9QJYG32R/tq61mAb1/Z1/OBQrES4FQ==","signatures":[{"sig":"MEUCIQDZZkFIviemgQtZF+QTKmckB3hwRopDUM33cdjTALFkkAIgAOfxNqSVGQ9yqLWR1e6VIcgYBaWM1SvlYv89QhUeoeQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":313816,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfM8ytCRA9TVsSAnZWagAA4+YQAISo8p8J8EFCrwGz0DHT\nLtkvYhcLGZHlz7Eg47FmvpJtMlmmRfc8rmTD+1ch+cBHdrOuyaiiLT+pfvtj\nYXqa92IdXndUngFJQsojR5IP30Rhg9sTuptUHJbiEdj0WYjnQplf5XTEEbOz\nDdugl+Te1a2uyfGVlToNYqpYsn3Ne+LVphxMj3dDafZKNJ8mMWnQ1tQ8Xobs\nYuOEi4Tt3uMrWLqA6H1ToCkKKQ4wVk6mKpf6tnAKd9mOZKTX6r3THpoAj80v\nDjvg6AxnNS4PxDR1UoqVv4X55ZQ5nMcFXrSiuTLDLuj5q3CqmU0CkohPPT5V\nW1wbOrLrJ6HDfkxzftnIilopw/owZ/IuLGHK5o91IWCIKXbkc6IkxIw3S2iW\nswqGuAAjLBrAlK+mMUJt3+j7uxxenURe5kLmZCTtrHhlmxFV0jzUy67WtRiE\nSu5rlXFUYpraVzst6GcCSQk30qJPHwOAH778vApwC3TwnWUSFCHUZeXlLDLX\nYoOyP9dWPl+Bad1hEJFa70y1B1NWWqL8RqQ5DECHEHqzFU/RiPcCBpYCEYRT\nXVuyYkbrFhxQLe4Kq4d9XS7LL0ME6aFvTBvGpFy2TwcJ/YvEk/1BFmRtyS0P\nFU6HsSKSfZr8TYrb7yAhKgo0xVxocl2uOt1Oy/4xZGYh8r1Oigy7nVo0hOk0\n+iRs\r\n=lG1O\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"lib/index.ts","readme":"# front-sdk\nAn SDK for working with Front (https://frontapp.com).\n\n## TypeScript Quickstart\n\nImport in the usual way:\n\n```typescript\nimport { Front } from 'front-sdk';\n```\n\n## JavaScript\n\nRequire in the usual way:\n\n```javascript\nconst Front = require('front-sdk').Front;\n```\n\n## Usage\n\nCreate a new instance of the SDK to use it, passing the API token for Front.\n\n```typescript\nimport { Comment, Front } from 'front-sdk';\nconst front = new Front('abcdef123457890');\n\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}).then((comment: Comment) => {\n    console.log(comment);\n}).catch(FrontError, (err: FrontError) => {\n    console.log(err);\n});\n```\n\nCan also be used as a callback, if required:\n\n```typescript\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}, (err: FrontError, comment: FrontComment) => {\n    if (err) {\n        console.log(err);\n        return;\n    }\n\n    console.log(comment);\n});\n```\n\nClients can register for events, passing an object detailing a port to listen on using a new instance of an Express server, or an instance of an Express server to use. An optional path to install the webhook on can also be passed (this defaults to `/fronthook`).\n\nTo use this functionality, pass the secret shared key in as the second parameter when creating a new Front instance.\n```typescript\n    import { Event, Front } from 'front-sdk';\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    const httpServer = frontInst.registerEvents({ port: 1234, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nYou can also use a pre-existing Express instance, but note that the Front SDK expects that the request body should be an already parsed object or a JSON parseable string. You can easily add this using the `body-parser` library:\n\n```typescript\n    import { Event, Front } from 'front-sdk';\n    import * as bodyParser from 'body-parser';\n\n    const app = express();\n    app.use(bodyParser.json());\n    app.listen(1234);\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    frontInst.registerEvents({ server: app, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nThe SDK will verify that events sent to it are signed by the shared secret key, and will retrieve the entire event rather than just the preview. Events are sent to the client in the order the preview events for them were originally dispatched.\n\n#### Notes\n\nTo post into a Front Inbox, you need to know the correct channels in for it.\nChannels are instances of sources, such as SMTP, Facebook, Front Integrations, etc.\n\nSo to post a new Conversation:\n * Find the Inbox required want\n * List the Channels and find the correct one for the source (Integration channels, in the SDK case)\n * Post a Message to that Channel (which will return a Conversation reference)\n\nTo post a Comment or Message to that Conversation:\n * Use the Conversation reference to post (returns a Comment or Message object)\n","gitHead":"dcebacf8eca0b6f3468d6fe65269e47964c37ef9","scripts":{"lint":"gulp tslint","test":"gulp tslint && gulp test","build":"gulp build","prepublish":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"10.20.1","dependencies":{"lodash":"^4.17.2","express":"^4.15.3","request":"^2.79.0","bluebird":"^3.5.0","@types/node":"^6.0.48","body-parser":"^1.17.2","typed-error":"^1.0.1","@types/lodash":"^4.14.54","@types/express":"^4.0.35","@types/request":"^2.48.1","request-promise":"^4.2.2","@types/body-parser":"^1.16.3","@types/bluebird-global":"^3.0.1","@types/request-promise":"^4.1.42"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.3.0","tslint":"^4.5.1","gulp-util":"^3.0.8","gulp-mocha":"^3.0.0","typescript":"^3.3.4000","@types/chai":"^3.5.1","chai-string":"^1.3.0","gulp-tslint":"^7.1.0","@types/mocha":"^2.2.41","@octokit/rest":"^16.20.0","gulp-sourcemaps":"^2.3.1","gulp-typescript":"^3.1.4","chai-as-promised":"^6.0.0","@types/chai-string":"^1.1.30","mocha-junit-reporter":"^1.13.0","@types/chai-as-promised":"0.0.30"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk_0.7.3-add-git-secrets-dcebacf8eca0b6f3468d6fe65269e47964c37ef9_1597230253278_0.4359820789105946","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.7.3-add-git-secrets-37cdf29c14a924e5fe34bbd679b3727ce5e74d1f":{"name":"front-sdk","version":"0.7.3-add-git-secrets-37cdf29c14a924e5fe34bbd679b3727ce5e74d1f","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.7.3-add-git-secrets-37cdf29c14a924e5fe34bbd679b3727ce5e74d1f","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"673bdaf0cb7e391d72ddc808dde8015bda3d3ef6","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.7.3-add-git-secrets-37cdf29c14a924e5fe34bbd679b3727ce5e74d1f.tgz","fileCount":65,"integrity":"sha512-+Pa0N+VAjZ4xlKbNQAtZUkpUZueHj85B8MWCLAkx1qA5Ce3vkHZ8eDNW0YFdrKjjTrMXXwoUynar6bdK+lX9WQ==","signatures":[{"sig":"MEUCIQC8HBPm2wucNLqXOCjQqf9iXTYvsLKkH3kT+A9yXvEs1wIgZjTSh4jBk4EI2jNGyWXIhHHT6XBeGeYKZZ1v2egQ26k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":317734,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfNBr6CRA9TVsSAnZWagAAPPsQAIcb5aa8bpTG9ZJDxo6D\nmEXr1Umv3KKbVg+TpkxWhojlH9WN7tmnS8I6zjKvUc0SEcARsMSyUQlJmxJr\nV1PdacQ2fU4wpKrRMQpHWAhvwlH7Iuode2VRo6kYN/b2O08SsZG0r2yjCCzJ\nRoqcS55hvWlsW1z0mWx96KRC/g7aG9Q3zblRJtjFTvF7Y2AkPnq5AL9GKtyI\n2Z9/ZNgcfGA8rIvwKF27+BA5SMMxKoKzVIsPP5GNMCQ34enPGe1jTvgvQSs+\npl9zdYu+M3/c+3LySm3qKF3C0RnmZJbUDrr3hJdAlq+WipYrXilTY5TdDD8f\nXptehMKWbA+U+OsNWB969kevUwtNYBexAgabYmIe2OK2ysbupxEtQnaAoGJP\nKt5WqvO3ArI/S5X70DaxRp6TB95FXDz7Uq8o3YRmq9WVb9NYSPZk0JFxgk1Y\nURsZadNHsKmTxVo9cpVk/l86zaJqGhLX7cHmm8U4CI3Zqh4C3sI5fBjSeUF5\n0Q19NC2yiMgW3U3w7lP/u+cyYP/QA3u+ItlIdyjMLeKnUynMPf/Xiw9wLXkM\n1V4QveXY3/J9IynwkU38kj/VWC5n6M+rmcbeJIt3qWJ+vFvTdgLtwj0lV9X1\nv1RhJ9dJmWkQcmsAze6+1Aei80SpEMXougGmQdskIlvPskDtgnAqvxa34Y2w\npSEe\r\n=4Kua\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"lib/index.ts","readme":"# front-sdk\nAn SDK for working with Front (https://frontapp.com).\n\n## TypeScript Quickstart\n\nImport in the usual way:\n\n```typescript\nimport { Front } from 'front-sdk';\n```\n\n## JavaScript\n\nRequire in the usual way:\n\n```javascript\nconst Front = require('front-sdk').Front;\n```\n\n## Usage\n\nCreate a new instance of the SDK to use it, passing the API token for Front.\n\n```typescript\nimport { Comment, Front } from 'front-sdk';\nconst front = new Front('abcdef123457890');\n\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}).then((comment: Comment) => {\n    console.log(comment);\n}).catch(FrontError, (err: FrontError) => {\n    console.log(err);\n});\n```\n\nCan also be used as a callback, if required:\n\n```typescript\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}, (err: FrontError, comment: FrontComment) => {\n    if (err) {\n        console.log(err);\n        return;\n    }\n\n    console.log(comment);\n});\n```\n\nClients can register for events, passing an object detailing a port to listen on using a new instance of an Express server, or an instance of an Express server to use. An optional path to install the webhook on can also be passed (this defaults to `/fronthook`).\n\nTo use this functionality, pass the secret shared key in as the second parameter when creating a new Front instance.\n```typescript\n    import { Event, Front } from 'front-sdk';\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    const httpServer = frontInst.registerEvents({ port: 1234, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nYou can also use a pre-existing Express instance, but note that the Front SDK expects that the request body should be an already parsed object or a JSON parseable string. You can easily add this using the `body-parser` library:\n\n```typescript\n    import { Event, Front } from 'front-sdk';\n    import * as bodyParser from 'body-parser';\n\n    const app = express();\n    app.use(bodyParser.json());\n    app.listen(1234);\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    frontInst.registerEvents({ server: app, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nThe SDK will verify that events sent to it are signed by the shared secret key, and will retrieve the entire event rather than just the preview. Events are sent to the client in the order the preview events for them were originally dispatched.\n\n#### Notes\n\nTo post into a Front Inbox, you need to know the correct channels in for it.\nChannels are instances of sources, such as SMTP, Facebook, Front Integrations, etc.\n\nSo to post a new Conversation:\n * Find the Inbox required want\n * List the Channels and find the correct one for the source (Integration channels, in the SDK case)\n * Post a Message to that Channel (which will return a Conversation reference)\n\nTo post a Comment or Message to that Conversation:\n * Use the Conversation reference to post (returns a Comment or Message object)\n","gitHead":"37cdf29c14a924e5fe34bbd679b3727ce5e74d1f","scripts":{"lint":"gulp tslint","test":"gulp tslint && gulp test","build":"gulp build","prepublish":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"10.20.1","dependencies":{"lodash":"^4.17.2","express":"^4.15.3","request":"^2.79.0","bluebird":"^3.5.0","@types/node":"^6.0.48","body-parser":"^1.17.2","typed-error":"^1.0.1","@types/lodash":"^4.14.54","@types/express":"^4.0.35","@types/request":"^2.48.1","request-promise":"^4.2.2","@types/body-parser":"^1.16.3","@types/bluebird-global":"^3.0.1","@types/request-promise":"^4.1.42"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^3.5.0","gulp":"^3.9.1","mocha":"^3.3.0","tslint":"^4.5.1","gulp-util":"^3.0.8","gulp-mocha":"^3.0.0","typescript":"^3.3.4000","@types/chai":"^3.5.1","chai-string":"^1.3.0","gulp-tslint":"^7.1.0","@types/mocha":"^2.2.41","@octokit/rest":"^16.20.0","gulp-sourcemaps":"^2.3.1","gulp-typescript":"^3.1.4","chai-as-promised":"^6.0.0","@types/chai-string":"^1.1.30","mocha-junit-reporter":"^1.13.0","@types/chai-as-promised":"0.0.30"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk_0.7.3-add-git-secrets-37cdf29c14a924e5fe34bbd679b3727ce5e74d1f_1597250297960_0.10058784531409826","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.7.3-secrets-8768c77dec6c9909e960676721e42f20e02c3c8a":{"name":"front-sdk","version":"0.7.3-secrets-8768c77dec6c9909e960676721e42f20e02c3c8a","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.7.3-secrets-8768c77dec6c9909e960676721e42f20e02c3c8a","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"8b6520a373ff5fde1e9504bb9237088f066c3952","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.7.3-secrets-8768c77dec6c9909e960676721e42f20e02c3c8a.tgz","fileCount":66,"integrity":"sha512-uf026P7VbGK+aMi1PQQX5SMvi8Tk+KAvlULCWkJ5CMMX6M1Qa2Vl5Xv6Z2FmBNI0pQvZX0t2K6WCY3AC/7n98w==","signatures":[{"sig":"MEUCIC3b+qNKQ6tk9XoAHMPBD/KaSmiOLpUA4IvGnYofpjhLAiEAwVAM67REDu+JqDCdM1CQpfjeIApOjvZo/zQ/HANYCAQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":332775,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfRwBzCRA9TVsSAnZWagAAMc8QAKB3w5szEtl3ECZ/ifq4\nWbyl0qEL4JRuZDTFdYHO0lW6iS1a5la8DSni8/yZySrfK0K0SnRoleQOLmIr\nVl1HQtFTrIvXTLCLb+amWex5rre8nplZqReQL01Ek0WApD/8owD95wJ76lRC\nHURsr0SmkN8d2Ylj2XO7mAhppUaX2ZbVl606HjsO4xddAnXRZhbUyeOaFj/q\n7ldjT1xFrIkSFI4UvSyw0IziPyIz9f2+0FN1hmq+v6d+z0x/1v2Jtt77NxG9\nzRqf8m1Iyc7UNdL/uTBdDc3+QjmjxPeLKm/8DIX212F/xmQD4eJj3rNeRn3v\nZeGSOtoLl8cK8cxLqAvQBjC+fd15LnOiDkQkRkLLHuVJjaDOr8WJ6qWew2oK\nsp2JJCjFREy6j5BQLiYFERln/0VVIP1fq8RC/ucxsSYFESjIuuJGjT5/u0kE\ngdQDykOKpKbJvehUfr8rSEKu8cIOLP1YC33C9r/dcAiqrtR8LqWp+cmlx3Es\n5fHgLGx8x1T7vKPtNPLCjRiHkZZ1f3OhY6gpIysbP+4JqQMADGqvM8biEybo\ngGeAxbcZcuQCIo9uWEW+/xT/IVS+GrYId0xDq+dhBlIMSjdFTh5ApbscFrmq\nghPsKESOEl2oq5SXBb2XC4BqEAk3ieW+5GA6jWNkpuiilJM2CnPMBQnmgv5I\ncl1C\r\n=gODS\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"lib/index.ts","readme":"# front-sdk\nAn SDK for working with Front (https://frontapp.com).\n\n## TypeScript Quickstart\n\nImport in the usual way:\n\n```typescript\nimport { Front } from 'front-sdk';\n```\n\n## JavaScript\n\nRequire in the usual way:\n\n```javascript\nconst Front = require('front-sdk').Front;\n```\n\n## Usage\n\nCreate a new instance of the SDK to use it, passing the API token for Front.\n\n```typescript\nimport { Comment, Front } from 'front-sdk';\nconst front = new Front('abcdef123457890');\n\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}).then((comment: Comment) => {\n    console.log(comment);\n}).catch(FrontError, (err: FrontError) => {\n    console.log(err);\n});\n```\n\nCan also be used as a callback, if required:\n\n```typescript\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}, (err: FrontError, comment: FrontComment) => {\n    if (err) {\n        console.log(err);\n        return;\n    }\n\n    console.log(comment);\n});\n```\n\nClients can register for events, passing an object detailing a port to listen on using a new instance of an Express server, or an instance of an Express server to use. An optional path to install the webhook on can also be passed (this defaults to `/fronthook`).\n\nTo use this functionality, pass the secret shared key in as the second parameter when creating a new Front instance.\n```typescript\n    import { Event, Front } from 'front-sdk';\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    const httpServer = frontInst.registerEvents({ port: 1234, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nYou can also use a pre-existing Express instance, but note that the Front SDK expects that the request body should be an already parsed object or a JSON parseable string. You can easily add this using the `body-parser` library:\n\n```typescript\n    import { Event, Front } from 'front-sdk';\n    import * as bodyParser from 'body-parser';\n\n    const app = express();\n    app.use(bodyParser.json());\n    app.listen(1234);\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    frontInst.registerEvents({ server: app, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nThe SDK will verify that events sent to it are signed by the shared secret key, and will retrieve the entire event rather than just the preview. Events are sent to the client in the order the preview events for them were originally dispatched.\n\n#### Notes\n\nTo post into a Front Inbox, you need to know the correct channels in for it.\nChannels are instances of sources, such as SMTP, Facebook, Front Integrations, etc.\n\nSo to post a new Conversation:\n * Find the Inbox required want\n * List the Channels and find the correct one for the source (Integration channels, in the SDK case)\n * Post a Message to that Channel (which will return a Conversation reference)\n\nTo post a Comment or Message to that Conversation:\n * Use the Conversation reference to post (returns a Comment or Message object)\n\n## Running tests locally\n\nPut [configuration](./test/keeper.ts) in `./test/creds.json` file and then run:\n\n```\nFRONT_TEST_KEYS=`node ./test/encode_keys.js ./test/creds.json` npm run test\n```\n","gitHead":"8768c77dec6c9909e960676721e42f20e02c3c8a","scripts":{"lint":"gulp tslint","test":"gulp tslint && gulp test","build":"gulp build","prepublish":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"10.20.1","dependencies":{"lodash":"^4.17.2","express":"^4.17.1","request":"^2.79.0","bluebird":"^3.5.0","body-parser":"^1.19.0","typed-error":"^1.0.1","@types/lodash":"^4.14.54","@types/request":"^2.48.1","request-promise":"^4.2.2","@types/bluebird-global":"^3.0.1","@types/request-promise":"^4.1.42"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","gulp":"^4.0.2","mocha":"^8.1.2","ngrok":"^3.2.7","tslint":"^4.5.1","gulp-util":"^3.0.8","gulp-mocha":"^7.0.2","typescript":"^3.3.4000","@types/chai":"^4.2.12","@types/node":"^12.12.54","chai-string":"^1.5.0","gulp-tslint":"^8.1.4","@types/mocha":"^8.0.3","@octokit/rest":"^16.20.0","@types/express":"^4.17.7","gulp-sourcemaps":"^2.6.5","gulp-typescript":"^6.0.0-alpha.1","chai-as-promised":"^7.1.1","@types/body-parser":"^1.19.0","@types/chai-string":"^1.4.2","mocha-junit-reporter":"^2.0.0","@types/chai-as-promised":"^7.1.3"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk_0.7.3-secrets-8768c77dec6c9909e960676721e42f20e02c3c8a_1598488691483_0.5562411736902442","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.7.3-secrets-3566fa25b97328bd08d9ea953f7123e09c2ae291":{"name":"front-sdk","version":"0.7.3-secrets-3566fa25b97328bd08d9ea953f7123e09c2ae291","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.7.3-secrets-3566fa25b97328bd08d9ea953f7123e09c2ae291","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"92ed5520c033fcd8ad2e51cb4d3663a8475c2aaa","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.7.3-secrets-3566fa25b97328bd08d9ea953f7123e09c2ae291.tgz","fileCount":66,"integrity":"sha512-4rJ3y9YLv5Z++f+IaEA49MDBk14kZ/+Cfmb1ax1JiRiSt1rmrV7YzhHx/EpVh445dek7OF27V14AOqNYOqI6Xw==","signatures":[{"sig":"MEYCIQCA7m4ebizwM3kFLT4Ih4z4UCIucfGpj5L2vD0kCSc01QIhALytr4JH+U9kgTBDf0AM0vEnQQstD3YMp8/Pvwlc7bYn","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":332515,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfR2XTCRA9TVsSAnZWagAAaD0P/jMFgAeLur4HIKDdv342\nnJEz+mqZqKc55E8O+YEt0/Q/R+T6Zoh88XqIztj/1gBjlFERqyVOOxth+cJQ\nG31403thuIer/K8CmFlDYqBRSfZo+X+/YTelaBYd+3rdn2yTlfIXc5wUCfun\n5RCGXFNh/akqnkeu6N48/c7J+uz5Po3UuhH1m7d6fpC1gh0shpDrfDwXt1ok\nMnAuo9iaD+1oVZQ4uzpicca2gs5UvO19ujNIZre/RLQF5fjMw/F2zkxU5PSA\nbTE60HPbpwrqnCBhElaM4FiGmHM5Rw+feEM1XFVFxiNZQ1gRO+d2JxkHSgqz\nIpTA5NmvulOQzCK6Nft+P78MKbf7YD8+jPlRov3AcL6RsQzM0PwD/CgyIaxX\nk70wq/HQ2a0ZxB9CXklbezsglHvd/11DRjEKRnwn/+YprlU+aMEykQ2+trAb\nqh0HzhkA0O3Y5Z90WVmxa4RrDF+H3MtLu+y4aUxdAeDgR5tXnMio1GjQTdjS\ndtIjLHFhFN3r5sUyHBxKE/QbxjYgOvEAUJGnH7ySMLHPzo/mzBSvAsep7Jif\nFaVTViWnRj11IVjKCmi40hA7rcfN1WKf43Q0b1eSvg/VirTButIeAiX/oLwI\nYl0mBJZz52uSLrjNnlRW0SrJf0m0Uo1rLTXWnsmyVnrELZsNxHtzwOzMgBOc\nfvZQ\r\n=XiNo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"lib/index.ts","readme":"# front-sdk\nAn SDK for working with Front (https://frontapp.com).\n\n## TypeScript Quickstart\n\nImport in the usual way:\n\n```typescript\nimport { Front } from 'front-sdk';\n```\n\n## JavaScript\n\nRequire in the usual way:\n\n```javascript\nconst Front = require('front-sdk').Front;\n```\n\n## Usage\n\nCreate a new instance of the SDK to use it, passing the API token for Front.\n\n```typescript\nimport { Comment, Front } from 'front-sdk';\nconst front = new Front('abcdef123457890');\n\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}).then((comment: Comment) => {\n    console.log(comment);\n}).catch(FrontError, (err: FrontError) => {\n    console.log(err);\n});\n```\n\nCan also be used as a callback, if required:\n\n```typescript\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}, (err: FrontError, comment: FrontComment) => {\n    if (err) {\n        console.log(err);\n        return;\n    }\n\n    console.log(comment);\n});\n```\n\nClients can register for events, passing an object detailing a port to listen on using a new instance of an Express server, or an instance of an Express server to use. An optional path to install the webhook on can also be passed (this defaults to `/fronthook`).\n\nTo use this functionality, pass the secret shared key in as the second parameter when creating a new Front instance.\n```typescript\n    import { Event, Front } from 'front-sdk';\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    const httpServer = frontInst.registerEvents({ port: 1234, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nYou can also use a pre-existing Express instance, but note that the Front SDK expects that the request body should be an already parsed object or a JSON parseable string. You can easily add this using the `body-parser` library:\n\n```typescript\n    import { Event, Front } from 'front-sdk';\n    import * as bodyParser from 'body-parser';\n\n    const app = express();\n    app.use(bodyParser.json());\n    app.listen(1234);\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    frontInst.registerEvents({ server: app, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nThe SDK will verify that events sent to it are signed by the shared secret key, and will retrieve the entire event rather than just the preview. Events are sent to the client in the order the preview events for them were originally dispatched.\n\n#### Notes\n\nTo post into a Front Inbox, you need to know the correct channels in for it.\nChannels are instances of sources, such as SMTP, Facebook, Front Integrations, etc.\n\nSo to post a new Conversation:\n * Find the Inbox required want\n * List the Channels and find the correct one for the source (Integration channels, in the SDK case)\n * Post a Message to that Channel (which will return a Conversation reference)\n\nTo post a Comment or Message to that Conversation:\n * Use the Conversation reference to post (returns a Comment or Message object)\n\n## Running tests locally\n\nPut [configuration](./test/keeper.ts) in `./test/creds.json` file and then run:\n\n```\nFRONT_TEST_KEYS=`node ./test/encode_keys.js ./test/creds.json` npm run test\n```\n","gitHead":"3566fa25b97328bd08d9ea953f7123e09c2ae291","scripts":{"lint":"gulp tslint","test":"gulp tslint && gulp test","build":"gulp build","prepublish":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"10.20.1","dependencies":{"lodash":"^4.17.2","express":"^4.17.1","request":"^2.79.0","bluebird":"^3.5.0","body-parser":"^1.19.0","typed-error":"^1.0.1","@types/lodash":"^4.14.54","@types/request":"^2.48.1","request-promise":"^4.2.2","@types/bluebird-global":"^3.0.1","@types/request-promise":"^4.1.42"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","gulp":"^4.0.2","mocha":"^8.1.2","ngrok":"^3.2.7","tslint":"^4.5.1","gulp-util":"^3.0.8","gulp-mocha":"^7.0.2","typescript":"^3.3.4000","@types/chai":"^4.2.12","@types/node":"^12.12.54","chai-string":"^1.5.0","gulp-tslint":"^8.1.4","@types/mocha":"^8.0.3","@octokit/rest":"^16.20.0","@types/express":"^4.17.7","gulp-sourcemaps":"^2.6.5","gulp-typescript":"^6.0.0-alpha.1","chai-as-promised":"^7.1.1","@types/body-parser":"^1.19.0","@types/chai-string":"^1.4.2","mocha-junit-reporter":"^2.0.0","@types/chai-as-promised":"^7.1.3"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk_0.7.3-secrets-3566fa25b97328bd08d9ea953f7123e09c2ae291_1598514642837_0.7008351928646923","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.7.3-secrets-7d41df6dc5bb2fea5c7a0fa66f3ef72d2baf3f96":{"name":"front-sdk","version":"0.7.3-secrets-7d41df6dc5bb2fea5c7a0fa66f3ef72d2baf3f96","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.7.3-secrets-7d41df6dc5bb2fea5c7a0fa66f3ef72d2baf3f96","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"fa3850b9334b0fd5e84ca565a3c9ba8f30be761f","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.7.3-secrets-7d41df6dc5bb2fea5c7a0fa66f3ef72d2baf3f96.tgz","fileCount":66,"integrity":"sha512-PK9pXxTzkdnOr6QOte5CkGMMC9pPmHDXgtDTEWEsu/3ZsPZX66eNMp7sI+AeitOOE+hk1yAF6pRgOeFL8Bc1IQ==","signatures":[{"sig":"MEYCIQDuBV+kZOzktKRez7zyxUQU10O6UV3ME42g3ZFCytJ6+QIhAPR/L8IJ5KMWmAec4ewNmWXx7WFgLc9opxI5i/kr+N8n","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":333026,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfR+7HCRA9TVsSAnZWagAAVh4P/2Z+1Oq9tRYpVgbbagy0\nKpD+J3zIqsQbmDGdVMwrYTxaHrPR1uxTo/53iLxLK7zkumth0TbnLUnTJ8St\nn/sZEEmWA6BgDyKCBczumgkD2G7kgfBt+WRtQzXaKrXsBlcPzT/1h/gqzsHS\nEOGuIO5Goza7XTHLSRmbC8bzL/ejP05ga/aRKplq3f2Hg8kbav+1kd3+8zME\nqKFhR6LlQsaVePhKp+DR0QicoLBNWl4pT3ZoCHhop6INQxI7re6VgIjSclZn\nCHbdCoaFRQml2khv4MMRe89WXGbSU/pyvF4+BQmwD4gxJZdwxutF+N/6eN6M\njNw59rcK7J3P9GTFzbLrKpqJLYEp9AgAMIjeqGF/6qnX+RXy27j0XPlFrBdS\nA0JoU98wFnwXSaZyPrIf1u+x1/nrUcdECMy1CHSRYayFh67YzlSdbzi+Az0y\n1+AQAxN6iqsLHQfnLEWfrH+4jBiTkSRdTgO1ChbEAb7DKxd4tW3KP5vIDTwZ\nhkSmXFNP2+eKxRC4TODloRIEOEfhlqXcxtb15zzcurg7aay/M2dwSB/6ZLmX\nQLS4WmRy9ecrdxFkKDJaRS2tYdDND+xKnQELlo47+LmUdEsr9YsZYWgkQ4cY\nDw9ve1eBTzlh+75g/NHksik/V101NU0zEwJeySRSqAJHNWQr5JtMM0g6sHbv\nqa3W\r\n=SF1g\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"lib/index.ts","readme":"# front-sdk\nAn SDK for working with Front (https://frontapp.com).\n\n## TypeScript Quickstart\n\nImport in the usual way:\n\n```typescript\nimport { Front } from 'front-sdk';\n```\n\n## JavaScript\n\nRequire in the usual way:\n\n```javascript\nconst Front = require('front-sdk').Front;\n```\n\n## Usage\n\nCreate a new instance of the SDK to use it, passing the API token for Front.\n\n```typescript\nimport { Comment, Front } from 'front-sdk';\nconst front = new Front('abcdef123457890');\n\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}).then((comment: Comment) => {\n    console.log(comment);\n}).catch(FrontError, (err: FrontError) => {\n    console.log(err);\n});\n```\n\nCan also be used as a callback, if required:\n\n```typescript\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}, (err: FrontError, comment: FrontComment) => {\n    if (err) {\n        console.log(err);\n        return;\n    }\n\n    console.log(comment);\n});\n```\n\nClients can register for events, passing an object detailing a port to listen on using a new instance of an Express server, or an instance of an Express server to use. An optional path to install the webhook on can also be passed (this defaults to `/fronthook`).\n\nTo use this functionality, pass the secret shared key in as the second parameter when creating a new Front instance.\n```typescript\n    import { Event, Front } from 'front-sdk';\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    const httpServer = frontInst.registerEvents({ port: 1234, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nYou can also use a pre-existing Express instance, but note that the Front SDK expects that the request body should be an already parsed object or a JSON parseable string. You can easily add this using the `body-parser` library:\n\n```typescript\n    import { Event, Front } from 'front-sdk';\n    import * as bodyParser from 'body-parser';\n\n    const app = express();\n    app.use(bodyParser.json());\n    app.listen(1234);\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    frontInst.registerEvents({ server: app, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nThe SDK will verify that events sent to it are signed by the shared secret key, and will retrieve the entire event rather than just the preview. Events are sent to the client in the order the preview events for them were originally dispatched.\n\n#### Notes\n\nTo post into a Front Inbox, you need to know the correct channels in for it.\nChannels are instances of sources, such as SMTP, Facebook, Front Integrations, etc.\n\nSo to post a new Conversation:\n * Find the Inbox required want\n * List the Channels and find the correct one for the source (Integration channels, in the SDK case)\n * Post a Message to that Channel (which will return a Conversation reference)\n\nTo post a Comment or Message to that Conversation:\n * Use the Conversation reference to post (returns a Comment or Message object)\n\n## Running tests locally\n\nPut [configuration](./test/keeper.ts) in `./test/creds.json` file and then run:\n\n```\nFRONT_TEST_KEYS=`node ./test/encode_keys.js ./test/creds.json` npm run test\n```\n","gitHead":"7d41df6dc5bb2fea5c7a0fa66f3ef72d2baf3f96","scripts":{"lint":"gulp tslint","test":"gulp tslint && gulp test","build":"gulp build","prepublish":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"10.20.1","dependencies":{"lodash":"^4.17.2","express":"^4.17.1","request":"^2.79.0","bluebird":"^3.5.0","body-parser":"^1.19.0","typed-error":"^1.0.1","@types/lodash":"^4.14.54","@types/request":"^2.48.1","request-promise":"^4.2.2","@types/bluebird-global":"^3.0.1","@types/request-promise":"^4.1.42"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","gulp":"^4.0.2","mocha":"^8.1.2","ngrok":"^3.2.7","tslint":"^4.5.1","gulp-util":"^3.0.8","gulp-mocha":"^7.0.2","typescript":"^3.3.4000","@types/chai":"^4.2.12","@types/node":"^12.12.54","chai-string":"^1.5.0","gulp-tslint":"^8.1.4","@types/mocha":"^8.0.3","@octokit/rest":"^16.20.0","@types/express":"^4.17.7","gulp-sourcemaps":"^2.6.5","gulp-typescript":"^6.0.0-alpha.1","chai-as-promised":"^7.1.1","@types/body-parser":"^1.19.0","@types/chai-string":"^1.4.2","mocha-junit-reporter":"^2.0.0","@types/chai-as-promised":"^7.1.3"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk_0.7.3-secrets-7d41df6dc5bb2fea5c7a0fa66f3ef72d2baf3f96_1598549703203_0.9612474425780169","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.7.3-secrets-153e599b195cd10dbb9e5d39ad24e168426a103e":{"name":"front-sdk","version":"0.7.3-secrets-153e599b195cd10dbb9e5d39ad24e168426a103e","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.7.3-secrets-153e599b195cd10dbb9e5d39ad24e168426a103e","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"29fc534dc2a94c5d5802bdee2a3296204fe6626a","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.7.3-secrets-153e599b195cd10dbb9e5d39ad24e168426a103e.tgz","fileCount":66,"integrity":"sha512-HbY/Q6ZKovdCkxOScl+0MR45D4p3WLhawX2oZjTtUS8bKXvsN6jKFNJjqnLBaUP+6X45wyUJOGWaopFQ+hqfIg==","signatures":[{"sig":"MEQCIGvjhwW0WK5G1q7U4A4Jkx/6B/sP+IDfdaEiJsW7sudfAiA0Tc5PVmgVCxkfLT37z7OorWMmclfCDDH9Jz781SS6uA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":333344,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfSLLjCRA9TVsSAnZWagAAzkoP/igjKOkcVEv0AQXHPtND\n4yVoggRMfe+OrmQVcQsImSnDdajoN7A12oavAZPeRt1VQmOaeZ227wksGoK2\n9KAFrcuXC44L1CqOh5VUbpRx3gQFjTYwtcY0XBc/q3ez8ioxlNVB/ZvjXi0d\n7ucZqq3eKuVszU3tANNu2cMbG/iKZt4Rb8IK5PHHxo3ACEujx3GVpvwWaf82\nNTlKqCTk/sJhok8DSAVcGfk32EQ7/xIU/cIBFriHrmwOo0RrFlt5pZwq7uJ2\nKGN9O2Udm5ChZIOqCgJNXRUe4I5Mwd/j2EAQtgl9V3g2oUz1NvMWk7ey8wrG\nv7oDaL1Cb2zGa2j2Li6knAUSAezW+7Cgw5oUqhHWFxAkkOoN0C3NLqZIHD2L\nlQfFPUYpVAYTAhuZplALM72qacj6cOGqEK9go3rBpQAC1L2jWoLKMUS3mRJZ\nm2KbWrWthq4IIZhmL0RTAaoqWqFTtwwqW/IAYulaFqQJ/Sm1lHXbq0JlV0Fp\nmDRtdQkCPAGY2IrALxgNwUFwtXk3xhTC73pFskVnCal1zP/UCzmJYuKdBBDS\nqcT4PaS7FEte9zElXnK4pP+ntGgiuxdNddQuRDGV572vpBwqoaLAmwtcZFTg\narPkR7HSGsrZoDyrH51JTQyPUVTdaULON+RwV0yXymuO3Eaz5miSRSpJgFVV\n9lFj\r\n=a0kE\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"lib/index.ts","readme":"# front-sdk\nAn SDK for working with Front (https://frontapp.com).\n\n## TypeScript Quickstart\n\nImport in the usual way:\n\n```typescript\nimport { Front } from 'front-sdk';\n```\n\n## JavaScript\n\nRequire in the usual way:\n\n```javascript\nconst Front = require('front-sdk').Front;\n```\n\n## Usage\n\nCreate a new instance of the SDK to use it, passing the API token for Front.\n\n```typescript\nimport { Comment, Front } from 'front-sdk';\nconst front = new Front('abcdef123457890');\n\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}).then((comment: Comment) => {\n    console.log(comment);\n}).catch(FrontError, (err: FrontError) => {\n    console.log(err);\n});\n```\n\nCan also be used as a callback, if required:\n\n```typescript\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}, (err: FrontError, comment: FrontComment) => {\n    if (err) {\n        console.log(err);\n        return;\n    }\n\n    console.log(comment);\n});\n```\n\nClients can register for events, passing an object detailing a port to listen on using a new instance of an Express server, or an instance of an Express server to use. An optional path to install the webhook on can also be passed (this defaults to `/fronthook`).\n\nTo use this functionality, pass the secret shared key in as the second parameter when creating a new Front instance.\n```typescript\n    import { Event, Front } from 'front-sdk';\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    const httpServer = frontInst.registerEvents({ port: 1234, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nYou can also use a pre-existing Express instance, but note that the Front SDK expects that the request body should be an already parsed object or a JSON parseable string. You can easily add this using the `body-parser` library:\n\n```typescript\n    import { Event, Front } from 'front-sdk';\n    import * as bodyParser from 'body-parser';\n\n    const app = express();\n    app.use(bodyParser.json());\n    app.listen(1234);\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    frontInst.registerEvents({ server: app, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nThe SDK will verify that events sent to it are signed by the shared secret key, and will retrieve the entire event rather than just the preview. Events are sent to the client in the order the preview events for them were originally dispatched.\n\n#### Notes\n\nTo post into a Front Inbox, you need to know the correct channels in for it.\nChannels are instances of sources, such as SMTP, Facebook, Front Integrations, etc.\n\nSo to post a new Conversation:\n * Find the Inbox required want\n * List the Channels and find the correct one for the source (Integration channels, in the SDK case)\n * Post a Message to that Channel (which will return a Conversation reference)\n\nTo post a Comment or Message to that Conversation:\n * Use the Conversation reference to post (returns a Comment or Message object)\n\n## Running tests locally\n\nPut [configuration](./test/keeper.ts) in `./test/creds.json` file and then run:\n\n```\nFRONT_TEST_KEYS=`node ./test/encode_keys.js ./test/creds.json` npm run test\n```\n","gitHead":"153e599b195cd10dbb9e5d39ad24e168426a103e","scripts":{"lint":"gulp tslint","test":"gulp tslint && gulp test","build":"gulp build","prepublish":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"10.20.1","dependencies":{"lodash":"^4.17.2","express":"^4.17.1","request":"^2.79.0","bluebird":"^3.5.0","body-parser":"^1.19.0","typed-error":"^1.0.1","@types/lodash":"^4.14.54","@types/request":"^2.48.1","request-promise":"^4.2.2","@types/bluebird-global":"^3.0.1","@types/request-promise":"^4.1.42"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","gulp":"^4.0.2","mocha":"^8.1.2","ngrok":"^3.2.7","tslint":"^4.5.1","gulp-util":"^3.0.8","gulp-mocha":"^7.0.2","typescript":"^3.3.4000","@types/chai":"^4.2.12","@types/node":"^12.12.54","chai-string":"^1.5.0","gulp-tslint":"^8.1.4","@types/mocha":"^8.0.3","@octokit/rest":"^16.20.0","@types/express":"^4.17.7","gulp-sourcemaps":"^2.6.5","gulp-typescript":"^6.0.0-alpha.1","chai-as-promised":"^7.1.1","@types/body-parser":"^1.19.0","@types/chai-string":"^1.4.2","mocha-junit-reporter":"^2.0.0","@types/chai-as-promised":"^7.1.3"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk_0.7.3-secrets-153e599b195cd10dbb9e5d39ad24e168426a103e_1598599906909_0.390527928190066","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.7.3-secrets-f97c14f482d10fedc1fa3cfa81f4a323e5f21230":{"name":"front-sdk","version":"0.7.3-secrets-f97c14f482d10fedc1fa3cfa81f4a323e5f21230","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.7.3-secrets-f97c14f482d10fedc1fa3cfa81f4a323e5f21230","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"f0285ae7aa24cccfe2ca8353c2b7c71b8b4704d2","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.7.3-secrets-f97c14f482d10fedc1fa3cfa81f4a323e5f21230.tgz","fileCount":66,"integrity":"sha512-uSkU42d0arKI4dqx0mkd/PlMd5ZLZcsIf/4YM/7MOIcl79qB9VJ7sbjcvQjKIxBEq00F2uhCISH4RuMns7C9ug==","signatures":[{"sig":"MEYCIQDTIjtK77mOLtnc70MGamUps85IcnpsIpBJXSizDwfJ+AIhAL8f2BVAQGtlZ2b0G7C2D1d/BWDuG3VTp+OyQ+wWVq2H","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":333423,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfSLMWCRA9TVsSAnZWagAA96IQAJqZR0/swwPAq7uACazi\na71Ci3a69yJ/p86FnEkMy9g8HsRC/jp5aUs9F/V0yZhQLR5I88MWzDv4yjbt\nf7mL3vwTu6GgzSDfWck47x/1Grk8Ud2E3t3gstbCwfGmyWAWO65K/WPXNt7T\nKQ8SBaPdRuKgRwZnncJtsWv2KSDP7u2K5rWn/KO7SihIb7/rSbDKGgdcSEG7\nB2banilB0U0y4VvDVOFnt4tpCfARiYh1Kno3JTZCI9NIv4fiTEWvTlSOD/08\n03CE9Od3PAvsOqoync3u8QLg5+azxE0e9yOAU05Y2HRRQ+vLh0ni1BEF+7xx\nAi725vOSyKllKdSz8XBplwk/MuJmc5hakl2e4SBxwaHkIcdLngTR0rt+ePnm\n+eKyv3xyFnhEFB8gY92Ny24oVOyK5D4Xmcrzwbw4bF2NYu9hA0kfpjflJwBn\n9oX6PY8Z76/w4+EH3yklykdC/1Oid7RTu2eDBn/UAlzMMYSU/MdQsz8FKdfI\nZ8/FlVNHUYaIf0FDUYzayvBfqFvowDXVE4bLaEDQw2odJb1iNSthRSMPvKch\nkQN2dYakTfiuTb1yy/1v+lxS3Yg4L4JbVlmWxAit2rypIgMHdHMjeAkN6jqX\n93H6W6cqfVjejJavhQMOObSMuZZWxx/KUrMZClZVCtKI93cSnAhhcuzwje5h\nWOyD\r\n=xMPR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"lib/index.ts","readme":"# front-sdk\nAn SDK for working with Front (https://frontapp.com).\n\n## TypeScript Quickstart\n\nImport in the usual way:\n\n```typescript\nimport { Front } from 'front-sdk';\n```\n\n## JavaScript\n\nRequire in the usual way:\n\n```javascript\nconst Front = require('front-sdk').Front;\n```\n\n## Usage\n\nCreate a new instance of the SDK to use it, passing the API token for Front.\n\n```typescript\nimport { Comment, Front } from 'front-sdk';\nconst front = new Front('abcdef123457890');\n\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}).then((comment: Comment) => {\n    console.log(comment);\n}).catch(FrontError, (err: FrontError) => {\n    console.log(err);\n});\n```\n\nCan also be used as a callback, if required:\n\n```typescript\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}, (err: FrontError, comment: FrontComment) => {\n    if (err) {\n        console.log(err);\n        return;\n    }\n\n    console.log(comment);\n});\n```\n\nClients can register for events, passing an object detailing a port to listen on using a new instance of an Express server, or an instance of an Express server to use. An optional path to install the webhook on can also be passed (this defaults to `/fronthook`).\n\nTo use this functionality, pass the secret shared key in as the second parameter when creating a new Front instance.\n```typescript\n    import { Event, Front } from 'front-sdk';\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    const httpServer = frontInst.registerEvents({ port: 1234, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nYou can also use a pre-existing Express instance, but note that the Front SDK expects that the request body should be an already parsed object or a JSON parseable string. You can easily add this using the `body-parser` library:\n\n```typescript\n    import { Event, Front } from 'front-sdk';\n    import * as bodyParser from 'body-parser';\n\n    const app = express();\n    app.use(bodyParser.json());\n    app.listen(1234);\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    frontInst.registerEvents({ server: app, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nThe SDK will verify that events sent to it are signed by the shared secret key, and will retrieve the entire event rather than just the preview. Events are sent to the client in the order the preview events for them were originally dispatched.\n\n#### Notes\n\nTo post into a Front Inbox, you need to know the correct channels in for it.\nChannels are instances of sources, such as SMTP, Facebook, Front Integrations, etc.\n\nSo to post a new Conversation:\n * Find the Inbox required want\n * List the Channels and find the correct one for the source (Integration channels, in the SDK case)\n * Post a Message to that Channel (which will return a Conversation reference)\n\nTo post a Comment or Message to that Conversation:\n * Use the Conversation reference to post (returns a Comment or Message object)\n\n## Running tests locally\n\nPut [configuration](./test/keeper.ts) in `./test/creds.json` file and then run:\n\n```\nFRONT_TEST_KEYS=`node ./test/encode_keys.js ./test/creds.json` npm run test\n```\n","gitHead":"f97c14f482d10fedc1fa3cfa81f4a323e5f21230","scripts":{"lint":"gulp tslint","test":"gulp tslint && gulp test","build":"gulp build","prepublish":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"10.20.1","dependencies":{"lodash":"^4.17.2","express":"^4.17.1","request":"^2.79.0","bluebird":"^3.5.0","body-parser":"^1.19.0","typed-error":"^1.0.1","@types/lodash":"^4.14.54","@types/request":"^2.48.1","request-promise":"^4.2.2","@types/bluebird-global":"^3.0.1","@types/request-promise":"^4.1.42"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","gulp":"^4.0.2","mocha":"^8.1.2","ngrok":"^3.2.7","tslint":"^4.5.1","gulp-util":"^3.0.8","gulp-mocha":"^7.0.2","typescript":"^3.3.4000","@types/chai":"^4.2.12","@types/node":"^12.12.54","chai-string":"^1.5.0","gulp-tslint":"^8.1.4","@types/mocha":"^8.0.3","@octokit/rest":"^16.20.0","@types/express":"^4.17.7","gulp-sourcemaps":"^2.6.5","gulp-typescript":"^6.0.0-alpha.1","chai-as-promised":"^7.1.1","@types/body-parser":"^1.19.0","@types/chai-string":"^1.4.2","mocha-junit-reporter":"^2.0.0","@types/chai-as-promised":"^7.1.3"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk_0.7.3-secrets-f97c14f482d10fedc1fa3cfa81f4a323e5f21230_1598599958062_0.4790404798495289","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.7.3-secrets-879b8763c29c7f752bac1fbd9f7f04928a9fb56f":{"name":"front-sdk","version":"0.7.3-secrets-879b8763c29c7f752bac1fbd9f7f04928a9fb56f","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.7.3-secrets-879b8763c29c7f752bac1fbd9f7f04928a9fb56f","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"b102168de65eadcd10a6c868be6e262d7de5a443","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.7.3-secrets-879b8763c29c7f752bac1fbd9f7f04928a9fb56f.tgz","fileCount":66,"integrity":"sha512-ux7PZYeUFJCBTidiiv4i3o4w7OnXhETx1yABtjt1Pj42oim8NDvbmno108eTrloXs3Bhk8Mni2JqBThEVPQr+Q==","signatures":[{"sig":"MEUCIQC/mALDSA5zAd1L7aq1Qe3sgKCzDK1i1grE7mnlTHARsQIgM/y26NrrnUtq41U3QqbBm0A3xhEboU0SZKMJNESNMMg=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":333687,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfTfMeCRA9TVsSAnZWagAAQuUP/1SbXsOD8BfOgDd0pnx1\n6uRw5Il4ObAv4uA0Z5V1IyXZI+4EzUvPBwLAz0g3SakjOaTQRH1bPKffUn/T\n+7OBBLuvIVMYmiDTYitpaHzCvhlnCbR/Bi7uJ99Vh5mbPVjwv1bYGAFW1AA5\nrPMh5fCwkaBnDyVvvYpOl3/gKNuvqLs+BpwkOD7S1S/pf92HDC4WOwu345x2\neeZIQlAdZhqvcWQHU7aE4+JYLAOSCqxysYazph3eEVthQkX4bPxaQCAbLdgI\nOP2MGObGmBOMoNhTMQ6NctFz/vh9+zZ+UR3RME+kd8D//aMUevB8kbjfpbtv\nBSNwKvDvisW181JmOfbD0327GOY+fLRxv4x/JnvfpQBKkB5qEfEijuT0M0jw\nEtk5Etn2kGyAyo3eNiUDrTo90I/NYxrJ+0xBxl6pWftmeYWnpRpFyKORghjQ\ngA70UTGyNnEqvjY13Pbe8VUZxvJ7QwF7kJkly4wjBOrC9W45SOqQ892POQ90\nMUYo+sqXCU2rlaN+zbXA8cnRTC/Mel2oTQbqY7BHWAcwuDS7xiEctSOyVOoX\nL+HKn5Pu6SDwAB5R85bFBxpPDmwZ6XHh73zbC6KpcNBjAM7Q32sohPpAAYdz\n0oa20ZOW3RcH+ffgBmrvXUTFgDm6eg8tEzv93yhmnhrRHLrXNtCIq0TiHEMW\n6IzF\r\n=ZWXN\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"lib/index.ts","readme":"# front-sdk\nAn SDK for working with Front (https://frontapp.com).\n\n## TypeScript Quickstart\n\nImport in the usual way:\n\n```typescript\nimport { Front } from 'front-sdk';\n```\n\n## JavaScript\n\nRequire in the usual way:\n\n```javascript\nconst Front = require('front-sdk').Front;\n```\n\n## Usage\n\nCreate a new instance of the SDK to use it, passing the API token for Front.\n\n```typescript\nimport { Comment, Front } from 'front-sdk';\nconst front = new Front('abcdef123457890');\n\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}).then((comment: Comment) => {\n    console.log(comment);\n}).catch(FrontError, (err: FrontError) => {\n    console.log(err);\n});\n```\n\nCan also be used as a callback, if required:\n\n```typescript\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}, (err: FrontError, comment: FrontComment) => {\n    if (err) {\n        console.log(err);\n        return;\n    }\n\n    console.log(comment);\n});\n```\n\nClients can register for events, passing an object detailing a port to listen on using a new instance of an Express server, or an instance of an Express server to use. An optional path to install the webhook on can also be passed (this defaults to `/fronthook`).\n\nTo use this functionality, pass the secret shared key in as the second parameter when creating a new Front instance.\n```typescript\n    import { Event, Front } from 'front-sdk';\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    const httpServer = frontInst.registerEvents({ port: 1234, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nYou can also use a pre-existing Express instance, but note that the Front SDK expects that the request body should be an already parsed object or a JSON parseable string. You can easily add this using the `body-parser` library:\n\n```typescript\n    import { Event, Front } from 'front-sdk';\n    import * as bodyParser from 'body-parser';\n\n    const app = express();\n    app.use(bodyParser.json());\n    app.listen(1234);\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    frontInst.registerEvents({ server: app, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nThe SDK will verify that events sent to it are signed by the shared secret key, and will retrieve the entire event rather than just the preview. Events are sent to the client in the order the preview events for them were originally dispatched.\n\n#### Notes\n\nTo post into a Front Inbox, you need to know the correct channels in for it.\nChannels are instances of sources, such as SMTP, Facebook, Front Integrations, etc.\n\nSo to post a new Conversation:\n * Find the Inbox required want\n * List the Channels and find the correct one for the source (Integration channels, in the SDK case)\n * Post a Message to that Channel (which will return a Conversation reference)\n\nTo post a Comment or Message to that Conversation:\n * Use the Conversation reference to post (returns a Comment or Message object)\n\n## Running tests locally\n\nPut [configuration](./test/keeper.ts) in `./test/creds.json` file and then run:\n\n```\nFRONT_TEST_KEYS=`node ./test/encode_keys.js ./test/creds.json` npm run test\n```\n","gitHead":"879b8763c29c7f752bac1fbd9f7f04928a9fb56f","scripts":{"lint":"gulp tslint","test":"gulp tslint && gulp test","build":"gulp build","prepublish":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"10.20.1","dependencies":{"lodash":"^4.17.2","express":"^4.17.1","request":"^2.79.0","bluebird":"^3.5.0","body-parser":"^1.19.0","typed-error":"^1.0.1","@types/lodash":"^4.14.54","@types/request":"^2.48.1","request-promise":"^4.2.2","@types/bluebird-global":"^3.0.1","@types/request-promise":"^4.1.42"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","gulp":"^4.0.2","mocha":"^8.1.2","ngrok":"^3.2.7","tslint":"^4.5.1","gulp-util":"^3.0.8","gulp-mocha":"^7.0.2","typescript":"^3.3.4000","@types/chai":"^4.2.12","@types/node":"^12.12.54","chai-string":"^1.5.0","gulp-tslint":"^8.1.4","@types/mocha":"^8.0.3","@octokit/rest":"^16.20.0","@types/express":"^4.17.7","gulp-sourcemaps":"^2.6.5","gulp-typescript":"^6.0.0-alpha.1","chai-as-promised":"^7.1.1","@types/body-parser":"^1.19.0","@types/chai-string":"^1.4.2","mocha-junit-reporter":"^2.0.0","@types/chai-as-promised":"^7.1.3"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk_0.7.3-secrets-879b8763c29c7f752bac1fbd9f7f04928a9fb56f_1598944029572_0.9210966054921783","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.7.3-secrets-b4d3db43438155519d8d21255adf06f02136095d":{"name":"front-sdk","version":"0.7.3-secrets-b4d3db43438155519d8d21255adf06f02136095d","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.7.3-secrets-b4d3db43438155519d8d21255adf06f02136095d","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"351ad352616110c67c0736ff48c63a1437db791d","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.7.3-secrets-b4d3db43438155519d8d21255adf06f02136095d.tgz","fileCount":66,"integrity":"sha512-+qRoFY3HPO3hWkRf77rMirWdNVR9ZHl6NlPO/0VK8RQGYghLgqNRNcfYaw5K82UiXmqfikcuLjXmj+/jr7spSA==","signatures":[{"sig":"MEUCIQDQJ8UGENrI8IXXx07yfDy0QnOLqCqsnj13ie9pT8cEqwIgbRVgGPH/iJJmhOJ92P9jtpbTiF4ms0WbHwwpVQns4Ag=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":333689,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfTfTpCRA9TVsSAnZWagAAFkUP/3L7VHLLxM1iX4VRn7X9\nV/gCmCK+tKG8HMif5+KWGTmJKrsW0dg95/O5o/mYZSkmPogfLA1RpxQHNKRi\nBGHQAFZmI9iCSbi01btGGbGwZTjWxVnhiUePkEJSwP1kbmOecgN1rVDQ4bTR\nA1uPwpc5VseXRUM7vdrT2k9JEaV6igl00Id2iOAPiN9gtQoT+5naaidGO72M\nOHA6Bxs7z/nFrP+KKdLNi/7BGS4YWMWBVW6/kXlKyxWfE1B+Bo9pqHFI9NEO\n7cE2k2B5NlRj5owz/xlYZwWckgeOCZGApI0LAbfsGs5XnkXd8+l8AKPkzgJc\nQBwt1GUpSbwsoIupsxpNQoxkMavXuTS7coqZ0ArjLSX9GmQxI3qQMovW9+k4\nmeEBm3ATDhlthPU+3nt8WIKu2n3lkt9uvvsRtOaDOi98TZC9PNRjO2eZtToB\nfy//1H3q9ZizC7ErlAZuAH41iwMN0I7tghTWHeESKQmahUrrfYdcFWzueX52\nLoqraklVsh3rT91/48UDp+hqqJjh0IVJARYpaItrper+O/hPXV0f+1ina5nv\nLVM3pxHyx0WqvewmfPXIkxRubNzvh3a9kKZFSQqcqLHI+dco4LT0eWA2+RNZ\n5ilxqed/EqozG362JrkVXQuCViXrWRewI0GLU3DjeOLNvhZY5jkAqkfFOWR3\nTF7n\r\n=j8Rt\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"lib/index.ts","readme":"# front-sdk\nAn SDK for working with Front (https://frontapp.com).\n\n## TypeScript Quickstart\n\nImport in the usual way:\n\n```typescript\nimport { Front } from 'front-sdk';\n```\n\n## JavaScript\n\nRequire in the usual way:\n\n```javascript\nconst Front = require('front-sdk').Front;\n```\n\n## Usage\n\nCreate a new instance of the SDK to use it, passing the API token for Front.\n\n```typescript\nimport { Comment, Front } from 'front-sdk';\nconst front = new Front('abcdef123457890');\n\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}).then((comment: Comment) => {\n    console.log(comment);\n}).catch(FrontError, (err: FrontError) => {\n    console.log(err);\n});\n```\n\nCan also be used as a callback, if required:\n\n```typescript\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}, (err: FrontError, comment: FrontComment) => {\n    if (err) {\n        console.log(err);\n        return;\n    }\n\n    console.log(comment);\n});\n```\n\nClients can register for events, passing an object detailing a port to listen on using a new instance of an Express server, or an instance of an Express server to use. An optional path to install the webhook on can also be passed (this defaults to `/fronthook`).\n\nTo use this functionality, pass the secret shared key in as the second parameter when creating a new Front instance.\n```typescript\n    import { Event, Front } from 'front-sdk';\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    const httpServer = frontInst.registerEvents({ port: 1234, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nYou can also use a pre-existing Express instance, but note that the Front SDK expects that the request body should be an already parsed object or a JSON parseable string. You can easily add this using the `body-parser` library:\n\n```typescript\n    import { Event, Front } from 'front-sdk';\n    import * as bodyParser from 'body-parser';\n\n    const app = express();\n    app.use(bodyParser.json());\n    app.listen(1234);\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    frontInst.registerEvents({ server: app, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nThe SDK will verify that events sent to it are signed by the shared secret key, and will retrieve the entire event rather than just the preview. Events are sent to the client in the order the preview events for them were originally dispatched.\n\n#### Notes\n\nTo post into a Front Inbox, you need to know the correct channels in for it.\nChannels are instances of sources, such as SMTP, Facebook, Front Integrations, etc.\n\nSo to post a new Conversation:\n * Find the Inbox required want\n * List the Channels and find the correct one for the source (Integration channels, in the SDK case)\n * Post a Message to that Channel (which will return a Conversation reference)\n\nTo post a Comment or Message to that Conversation:\n * Use the Conversation reference to post (returns a Comment or Message object)\n\n## Running tests locally\n\nPut [configuration](./test/keeper.ts) in `./test/creds.json` file and then run:\n\n```\nFRONT_TEST_KEYS=`node ./test/encode_keys.js ./test/creds.json` npm run test\n```\n","gitHead":"b4d3db43438155519d8d21255adf06f02136095d","scripts":{"lint":"gulp tslint","test":"gulp tslint && gulp test","build":"gulp build","prepublish":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"10.20.1","dependencies":{"lodash":"^4.17.2","express":"^4.17.1","request":"^2.79.0","bluebird":"^3.5.0","body-parser":"^1.19.0","typed-error":"^1.0.1","@types/lodash":"^4.14.54","@types/request":"^2.48.1","request-promise":"^4.2.2","@types/bluebird-global":"^3.0.1","@types/request-promise":"^4.1.42"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","gulp":"^4.0.2","mocha":"^8.1.2","ngrok":"^3.2.7","tslint":"^4.5.1","gulp-util":"^3.0.8","gulp-mocha":"^7.0.2","typescript":"^3.3.4000","@types/chai":"^4.2.12","@types/node":"^12.12.54","chai-string":"^1.5.0","gulp-tslint":"^8.1.4","@types/mocha":"^8.0.3","@octokit/rest":"^16.20.0","@types/express":"^4.17.7","gulp-sourcemaps":"^2.6.5","gulp-typescript":"^6.0.0-alpha.1","chai-as-promised":"^7.1.1","@types/body-parser":"^1.19.0","@types/chai-string":"^1.4.2","mocha-junit-reporter":"^2.0.0","@types/chai-as-promised":"^7.1.3"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk_0.7.3-secrets-b4d3db43438155519d8d21255adf06f02136095d_1598944488930_0.25168706886994396","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.8.0-circleci-tests-fbcbd84dec9dc989728a06998f7b7b81188a58a6":{"name":"front-sdk","version":"0.8.0-circleci-tests-fbcbd84dec9dc989728a06998f7b7b81188a58a6","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.8.0-circleci-tests-fbcbd84dec9dc989728a06998f7b7b81188a58a6","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"5c923f9b7ebdb90da88a72d7b483e97a9bbf176f","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.8.0-circleci-tests-fbcbd84dec9dc989728a06998f7b7b81188a58a6.tgz","fileCount":61,"integrity":"sha512-AjrhvFwGNEJOUCE5YwVFkmNmTWEuHDV881T0NlAZ1i2nOf2RtAyQHD/R62P0WHSJP6GMVXekh/YDm5sF6+khaQ==","signatures":[{"sig":"MEUCIQDRdv61X7M+pIuZ9TQoYjbvkgatjlcAnL+k+9cjRouR6AIgXAV0OCkJ29YquNjZs5G19hKtWVt2nsrnx6h8L1PnGtk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":316355,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfTfueCRA9TVsSAnZWagAAqQsP/j53LL7WGCqwCp1zF+Hq\njbtyoEfjH+9N1t/CTBgewaQxDB1HCJmVAAqdRXAviNqodhNpBzUS+z1KSE2H\nFvypFZYrAz4ahM8Qdy5j54Gx5SzdcypmDvW8Tl3q+13Ppl5l9XXVAX1fWS1+\nsil1zuUD2gI8TFwIhKRGKCZJSIkS99xD5kbezYBrXGXlmyWTCSwqplJf666T\nUx5+s+avhKyQuuNvOCOCqsBqGdKBMMN7t3c4JLomoQtej5NOMPPydawsTsNQ\nOF8GYnAx9zULVlNVj8ewTL80jGe9ybzJKjY5GP7fS8Ti8pqwhHrFaDXB5EoQ\n5YxvLCdn7HO7tbXOPyarKfitmQTkx6puyc0SByuhOBGIf+Z8FU8ejxFMN8yV\nlckpmYq3+UH2vB9XARXWvnNQj7s1o8NJmSNNwYWLb+5QraogyfkRmowf9eoo\nqB4SMZiAhLQ0ONOESX9qYIQ7mVbzk4zH3mDwpUcqp/ZQvgQ8bOTCRrh593xT\npr4hr/5PfoDBFspZm0IR8wEyQT4Bz0BF8Yn2h0+QUDtokCvsSb/PBAVXOHpn\nY3j9eXNMkMo/ZohsYVudIirKip2I66+o+GLrdSZBSCvztFZMwu46fkZ0wWEj\nbqNEMPDoF3EXqgOJuKrrrRq5FxvQSUThzHVjfM0eWujntnsMOiN/rUt9gy0X\nOY1+\r\n=ApE9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"lib/index.ts","readme":"# front-sdk\nAn SDK for working with Front (https://frontapp.com).\n\n## TypeScript Quickstart\n\nImport in the usual way:\n\n```typescript\nimport { Front } from 'front-sdk';\n```\n\n## JavaScript\n\nRequire in the usual way:\n\n```javascript\nconst Front = require('front-sdk').Front;\n```\n\n## Usage\n\nCreate a new instance of the SDK to use it, passing the API token for Front.\n\n```typescript\nimport { Comment, Front } from 'front-sdk';\nconst front = new Front('abcdef123457890');\n\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}).then((comment: Comment) => {\n    console.log(comment);\n}).catch(FrontError, (err: FrontError) => {\n    console.log(err);\n});\n```\n\nCan also be used as a callback, if required:\n\n```typescript\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}, (err: FrontError, comment: FrontComment) => {\n    if (err) {\n        console.log(err);\n        return;\n    }\n\n    console.log(comment);\n});\n```\n\nClients can register for events, passing an object detailing a port to listen on using a new instance of an Express server, or an instance of an Express server to use. An optional path to install the webhook on can also be passed (this defaults to `/fronthook`).\n\nTo use this functionality, pass the secret shared key in as the second parameter when creating a new Front instance.\n```typescript\n    import { Event, Front } from 'front-sdk';\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    const httpServer = frontInst.registerEvents({ port: 1234, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nYou can also use a pre-existing Express instance, but note that the Front SDK expects that the request body should be an already parsed object or a JSON parseable string. You can easily add this using the `body-parser` library:\n\n```typescript\n    import { Event, Front } from 'front-sdk';\n    import * as bodyParser from 'body-parser';\n\n    const app = express();\n    app.use(bodyParser.json());\n    app.listen(1234);\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    frontInst.registerEvents({ server: app, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nThe SDK will verify that events sent to it are signed by the shared secret key, and will retrieve the entire event rather than just the preview. Events are sent to the client in the order the preview events for them were originally dispatched.\n\n#### Notes\n\nTo post into a Front Inbox, you need to know the correct channels in for it.\nChannels are instances of sources, such as SMTP, Facebook, Front Integrations, etc.\n\nSo to post a new Conversation:\n * Find the Inbox required want\n * List the Channels and find the correct one for the source (Integration channels, in the SDK case)\n * Post a Message to that Channel (which will return a Conversation reference)\n\nTo post a Comment or Message to that Conversation:\n * Use the Conversation reference to post (returns a Comment or Message object)\n\n## Running tests locally\n\nPut [configuration](./test/keeper.ts) in `./test/creds.json` file and then run:\n\n```\nFRONT_TEST_KEYS=`node ./test/encode_keys.js ./test/creds.json` npm run test\n```\n","gitHead":"fbcbd84dec9dc989728a06998f7b7b81188a58a6","scripts":{"lint":"gulp tslint","test":"gulp tslint && gulp test","build":"gulp build","prepublish":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"10.20.1","dependencies":{"lodash":"^4.17.2","express":"^4.17.1","request":"^2.79.0","bluebird":"^3.5.0","body-parser":"^1.19.0","typed-error":"^1.0.1","@types/lodash":"^4.14.54","@types/request":"^2.48.1","request-promise":"^4.2.2","@types/bluebird-global":"^3.0.1","@types/request-promise":"^4.1.42"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","gulp":"^4.0.2","mocha":"^8.1.2","ngrok":"^3.2.7","tslint":"^4.5.1","gulp-util":"^3.0.8","gulp-mocha":"^7.0.2","typescript":"^3.3.4000","@types/chai":"^4.2.12","@types/node":"^12.12.54","chai-string":"^1.5.0","gulp-tslint":"^8.1.4","@types/mocha":"^8.0.3","@octokit/rest":"^16.20.0","@types/express":"^4.17.7","gulp-sourcemaps":"^2.6.5","gulp-typescript":"^6.0.0-alpha.1","chai-as-promised":"^7.1.1","@types/body-parser":"^1.19.0","@types/chai-string":"^1.4.2","mocha-junit-reporter":"^2.0.0","@types/chai-as-promised":"^7.1.3"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk_0.8.0-circleci-tests-fbcbd84dec9dc989728a06998f7b7b81188a58a6_1598946205594_0.5752604735744362","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.8.0-circleci-tests-05c07a173ccc55d93f853282b91232387e3e065c":{"name":"front-sdk","version":"0.8.0-circleci-tests-05c07a173ccc55d93f853282b91232387e3e065c","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.8.0-circleci-tests-05c07a173ccc55d93f853282b91232387e3e065c","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"b5ea5e173acbacd81f71880b9cb31a46c37ecc3e","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.8.0-circleci-tests-05c07a173ccc55d93f853282b91232387e3e065c.tgz","fileCount":61,"integrity":"sha512-trWkc1HGgOmsuPcDIdjlQhk80AP1xBAsHNdZll4vXWepc3HYGKdAcfcAy8T7R9BauQpQRSgkwDbCpCrQgTEmKQ==","signatures":[{"sig":"MEYCIQDJtOD3FA4yB+PT8ukyLZAKV3oOlPDO7gCncTAmFzlRfwIhANr8ZD+nVuVR3zPG9gTEwVX5XT6YRdDvNtR+QUn1xky/","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":316050,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfTgQ9CRA9TVsSAnZWagAAko8P/2iYd3r+L5pLBcMezJUp\nfuRqIpHogU0LPS5p/u1T7TTj0FKqnIP5Q7TZaa5TIZLlMsJ6fu0/76CwDRlQ\nyIy2smLmVVWy6ylHuUL/R+vVqassDDuMhGkoivLTudx/i1gxfev0Bs4k3KA/\nIM0QL0nreDDgnoyQjuGscyxO8UtUHdLUE+a11r3+JbG67P4Zp+yY6yhNFiyc\nlO64fAv8PSayUi1a4QCv3N2Ytm6cUsEOm3cVpkVDkNf1SiGSOTzzaEsrVlVO\nTiKLexnpA4dMRUEDn7Kt/xCjoowJsVC7RJwGQ2HoBegHuEtIwbW57dUlRPyO\n/rGB8TrTwBNF5mupH216ltY5BJAAbk2yjqrQCgBxb6NFUKaLPRKe6Hph6C28\n5OhrzBmm9kHHD8Wrq56UhINc8PmmL/cOy61YlPjAgZihvBYwxIBEHro8wKrd\nbNTtAePgw30QQX9uzSx4CF46vd/V/Hbz9ZBB57oQdMMyb4HH5ydiYp0SnRPM\nT4jazN3qytA4udhD8s1GYvarAjbHudFq/mO/lsf2zP6Xd+L9hBZqva+bO4XB\nIxJROj6K1PTQrAkJ+bZRYBfYBPtdjdsB+mz5QN9SsZIHqXtYiHGIMPO2wCae\nRflzBnivwLHXLeUEOsH8O/2BTzmWagE8AUtlqlP0N7ZvRVah/KtqCnCr7Qx9\ndMwl\r\n=7eg9\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"lib/index.ts","readme":"# front-sdk\nAn SDK for working with Front (https://frontapp.com).\n\n## TypeScript Quickstart\n\nImport in the usual way:\n\n```typescript\nimport { Front } from 'front-sdk';\n```\n\n## JavaScript\n\nRequire in the usual way:\n\n```javascript\nconst Front = require('front-sdk').Front;\n```\n\n## Usage\n\nCreate a new instance of the SDK to use it, passing the API token for Front.\n\n```typescript\nimport { Comment, Front } from 'front-sdk';\nconst front = new Front('abcdef123457890');\n\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}).then((comment: Comment) => {\n    console.log(comment);\n}).catch(FrontError, (err: FrontError) => {\n    console.log(err);\n});\n```\n\nCan also be used as a callback, if required:\n\n```typescript\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}, (err: FrontError, comment: FrontComment) => {\n    if (err) {\n        console.log(err);\n        return;\n    }\n\n    console.log(comment);\n});\n```\n\nClients can register for events, passing an object detailing a port to listen on using a new instance of an Express server, or an instance of an Express server to use. An optional path to install the webhook on can also be passed (this defaults to `/fronthook`).\n\nTo use this functionality, pass the secret shared key in as the second parameter when creating a new Front instance.\n```typescript\n    import { Event, Front } from 'front-sdk';\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    const httpServer = frontInst.registerEvents({ port: 1234, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nYou can also use a pre-existing Express instance, but note that the Front SDK expects that the request body should be an already parsed object or a JSON parseable string. You can easily add this using the `body-parser` library:\n\n```typescript\n    import { Event, Front } from 'front-sdk';\n    import * as bodyParser from 'body-parser';\n\n    const app = express();\n    app.use(bodyParser.json());\n    app.listen(1234);\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    frontInst.registerEvents({ server: app, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nThe SDK will verify that events sent to it are signed by the shared secret key, and will retrieve the entire event rather than just the preview. Events are sent to the client in the order the preview events for them were originally dispatched.\n\n#### Notes\n\nTo post into a Front Inbox, you need to know the correct channels in for it.\nChannels are instances of sources, such as SMTP, Facebook, Front Integrations, etc.\n\nSo to post a new Conversation:\n * Find the Inbox required want\n * List the Channels and find the correct one for the source (Integration channels, in the SDK case)\n * Post a Message to that Channel (which will return a Conversation reference)\n\nTo post a Comment or Message to that Conversation:\n * Use the Conversation reference to post (returns a Comment or Message object)\n\n## Running tests locally\n\nPut [configuration](./test/keeper.ts) in `./test/creds.json` file and then run:\n\n```\nFRONT_TEST_KEYS=`node ./test/encode_keys.js ./test/creds.json` npm run test\n```\n","gitHead":"05c07a173ccc55d93f853282b91232387e3e065c","scripts":{"lint":"gulp tslint","test":"gulp tslint && gulp test","build":"gulp build","prepublish":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"10.20.1","dependencies":{"lodash":"^4.17.2","express":"^4.17.1","request":"^2.79.0","bluebird":"^3.5.0","body-parser":"^1.19.0","typed-error":"^1.0.1","@types/lodash":"^4.14.54","@types/request":"^2.48.1","request-promise":"^4.2.2","@types/bluebird-global":"^3.0.1","@types/request-promise":"^4.1.42"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","gulp":"^4.0.2","mocha":"^8.1.2","ngrok":"^3.2.7","tslint":"^4.5.1","gulp-util":"^3.0.8","gulp-mocha":"^7.0.2","typescript":"^3.3.4000","@types/chai":"^4.2.12","@types/node":"^12.12.54","chai-string":"^1.5.0","gulp-tslint":"^8.1.4","@types/mocha":"^8.0.3","@octokit/rest":"^16.20.0","@types/express":"^4.17.7","gulp-sourcemaps":"^2.6.5","gulp-typescript":"^6.0.0-alpha.1","chai-as-promised":"^7.1.1","@types/body-parser":"^1.19.0","@types/chai-string":"^1.4.2","mocha-junit-reporter":"^2.0.0","@types/chai-as-promised":"^7.1.3"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk_0.8.0-circleci-tests-05c07a173ccc55d93f853282b91232387e3e065c_1598948413321_0.8217981014104141","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.8.0-circleci-tests-cd775eec5427a98782adefecd2cff226d1c50824":{"name":"front-sdk","version":"0.8.0-circleci-tests-cd775eec5427a98782adefecd2cff226d1c50824","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.8.0-circleci-tests-cd775eec5427a98782adefecd2cff226d1c50824","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"c3ddcd94abc8dba8dcead4b45f0ebeece4139772","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.8.0-circleci-tests-cd775eec5427a98782adefecd2cff226d1c50824.tgz","fileCount":61,"integrity":"sha512-KRnMwX2IkrgXggNXXBSsRLj+AA3TYXQ/dHOBB5O1ILwG6KTkPwLgkLaGqYNT+JPL5SEryTYDXfitV/ms9V/tCg==","signatures":[{"sig":"MEQCIAKiCnt/8op8wS3jY6bD2YtUIVupyftpBs9sBYOts6dKAiAREsSJyq2hDePZHkhrisFEcnndXy/dg7JEcOXN+m0rrw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":316050,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfT04bCRA9TVsSAnZWagAAWqEQAJD/du5aRO73f6lmQz1B\ng3q/VM6DsG2GrB6hE5fOWWIYX6J2zj8QMIvTSaa0LPw9SSVcD/6Qv0qSDoX9\nOJTQaZcpUNrJIhjEaAvJh5tKBUadAa1J4sGbMhYGMRNUV1D0g+7n0XIyuK7V\n+CtiXjSa+IZaprENs7W+we5Qc7E+RuaX2pz2Ktw/e0ar3HLukTv7DbQLnC83\nuJ5cZt1TGc5yKvmncq4oJLgqFNsNv5q6dC/fxfj0paf6ato9TEupOgFxH+7s\nP0uwDM4nR9W1zLYy0j/jOOy35wWsgJ56ildvTisxIS6ZDih1K/7Lp4tKHGCT\nS/PL23ae6brNgKt16QYCi+I1MC6wO7A7mFSz4E2FPy9hIXhNZ4rzNEAyCG9B\nNLnhJHwRJs+lIltcQEPBhEmFUztjpcthImYgXTTENEx+X0kkQ+MGJ0k927L9\nMMZIbb0Mi5KZmUF1vTIHuy4PPja3KPgob84Jw0mA3UnxyEaIwqPiDGlg5nzZ\nMVKAoIWMyNkF19UmuQ6/j6AGWkmg5V0PuC4O07PYFieSjPAk9gjZPq0K9iY9\nxia8IT8TecarhYVPSFoDmjs5dZ8IfPorb5mT8w5yRM7+1HZzIJoK9v+mCAM4\nJJS72FOERalC8+BKXRsGGOwDTHIiLH9mjX8l1kljrBZFEDzBpQbxBZZlnZII\n/aQz\r\n=zvrs\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"lib/index.ts","readme":"# front-sdk\nAn SDK for working with Front (https://frontapp.com).\n\n## TypeScript Quickstart\n\nImport in the usual way:\n\n```typescript\nimport { Front } from 'front-sdk';\n```\n\n## JavaScript\n\nRequire in the usual way:\n\n```javascript\nconst Front = require('front-sdk').Front;\n```\n\n## Usage\n\nCreate a new instance of the SDK to use it, passing the API token for Front.\n\n```typescript\nimport { Comment, Front } from 'front-sdk';\nconst front = new Front('abcdef123457890');\n\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}).then((comment: Comment) => {\n    console.log(comment);\n}).catch(FrontError, (err: FrontError) => {\n    console.log(err);\n});\n```\n\nCan also be used as a callback, if required:\n\n```typescript\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}, (err: FrontError, comment: FrontComment) => {\n    if (err) {\n        console.log(err);\n        return;\n    }\n\n    console.log(comment);\n});\n```\n\nClients can register for events, passing an object detailing a port to listen on using a new instance of an Express server, or an instance of an Express server to use. An optional path to install the webhook on can also be passed (this defaults to `/fronthook`).\n\nTo use this functionality, pass the secret shared key in as the second parameter when creating a new Front instance.\n```typescript\n    import { Event, Front } from 'front-sdk';\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    const httpServer = frontInst.registerEvents({ port: 1234, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nYou can also use a pre-existing Express instance, but note that the Front SDK expects that the request body should be an already parsed object or a JSON parseable string. You can easily add this using the `body-parser` library:\n\n```typescript\n    import { Event, Front } from 'front-sdk';\n    import * as bodyParser from 'body-parser';\n\n    const app = express();\n    app.use(bodyParser.json());\n    app.listen(1234);\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    frontInst.registerEvents({ server: app, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nThe SDK will verify that events sent to it are signed by the shared secret key, and will retrieve the entire event rather than just the preview. Events are sent to the client in the order the preview events for them were originally dispatched.\n\n#### Notes\n\nTo post into a Front Inbox, you need to know the correct channels in for it.\nChannels are instances of sources, such as SMTP, Facebook, Front Integrations, etc.\n\nSo to post a new Conversation:\n * Find the Inbox required want\n * List the Channels and find the correct one for the source (Integration channels, in the SDK case)\n * Post a Message to that Channel (which will return a Conversation reference)\n\nTo post a Comment or Message to that Conversation:\n * Use the Conversation reference to post (returns a Comment or Message object)\n\n## Running tests locally\n\nPut [configuration](./test/keeper.ts) in `./test/creds.json` file and then run:\n\n```\nFRONT_TEST_KEYS=`node ./test/encode_keys.js ./test/creds.json` npm run test\n```\n","gitHead":"cd775eec5427a98782adefecd2cff226d1c50824","scripts":{"lint":"gulp tslint","test":"gulp tslint && gulp test","build":"gulp build","prepublish":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"10.20.1","dependencies":{"lodash":"^4.17.2","express":"^4.17.1","request":"^2.79.0","bluebird":"^3.5.0","body-parser":"^1.19.0","typed-error":"^1.0.1","@types/lodash":"^4.14.54","@types/request":"^2.48.1","request-promise":"^4.2.2","@types/bluebird-global":"^3.0.1","@types/request-promise":"^4.1.42"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","gulp":"^4.0.2","mocha":"^8.1.2","ngrok":"^3.2.7","tslint":"^4.5.1","gulp-util":"^3.0.8","gulp-mocha":"^7.0.2","typescript":"^3.3.4000","@types/chai":"^4.2.12","@types/node":"^12.12.54","chai-string":"^1.5.0","gulp-tslint":"^8.1.4","@types/mocha":"^8.0.3","@octokit/rest":"^16.20.0","@types/express":"^4.17.7","gulp-sourcemaps":"^2.6.5","gulp-typescript":"^6.0.0-alpha.1","chai-as-promised":"^7.1.1","@types/body-parser":"^1.19.0","@types/chai-string":"^1.4.2","mocha-junit-reporter":"^2.0.0","@types/chai-as-promised":"^7.1.3"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk_0.8.0-circleci-tests-cd775eec5427a98782adefecd2cff226d1c50824_1599032859425_0.6429141298401357","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.8.0":{"name":"front-sdk","version":"0.8.0","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.8.0","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"c28df4ffd15313ae98332a760e4a523d5070b4b8","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.8.0.tgz","fileCount":61,"integrity":"sha512-g5gmI361O7TyLRYovgnUVvsqrEejtLCw63FmUmC9CZ2uUA+NF53lC+c+rS+/kIhMN0ofqVOrpS9btG6088YGUQ==","signatures":[{"sig":"MEUCIQDWZ3ZOgRPx4ySkBAKro0dx5Ac4AFMB1KDT77S7VXNuJAIgWC7chYAbkRqMLi85FuQ17szYqM0TIKIwAj40Bk/MNNk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":315994,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfT2YPCRA9TVsSAnZWagAAAnAP/AnyowhsSmcGRH/dO4cl\nGJ9hOhozBehOAEElxyYPPp0woS25Wlbn8/CkRUxnp1+EMsWGbh3+bREWUptd\nBuPJLnO6i1jLoI9lmVH82FwFc6XzJE4C7C3UrQ25vDN7zd+L2uOytVuayz94\nqj7hUxIkFq20u4lzhy124JPmv94y1/4oJeVmAzQEFCHHXOxMa72BmjyH9UvK\nQdizOHOLUPf803ukLBLUIP8iX1a1BluNq0uV66vi5/RyUf7Lv3VS9JA+P6+0\n1mpQx10uizA6IOX31hwmDAazJsPi3ggkmigbUSH+kA52M9JME8xrFhussmsR\nVgbNLMu2oh8OXQM71DlSOvi6JMtwR+GFX7uUy3MJ1M2TTgc2AayF97I36g3u\nM/N3HaXJih9IzY23Q5AsuLLLvWLKMkVTOPfglMEA5inz0bIKuk8q1wxhZQw4\nKrVng/Mm0LcfpaPbq2mrCKQ2cMwJni9jeezTdms5Ne0IeiiyVj9TcxTTxLps\njoKSV1/kxC3C045K0bf21u6tM7PEFzwNkniYnuoIZe2qzkb3cxDghUoKOnw+\nVMTDrj6uPllXVJ+QFrXlDL0D7gKLSDcPtaSiieE96yEcfsWUy4afLcAuhA09\nzAEngw1u/vf7yp9we32zIN8ZEsjSygWmoGw0t1oBLn6Jgp9Mmei6BVV4wRf5\n37+Y\r\n=oyp/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"lib/index.ts","gitHead":"4e79f5e9c5f23241ae5e0514c0d69b0e8c951785","scripts":{"lint":"gulp tslint","test":"gulp tslint && gulp test","build":"gulp build","prepublish":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"10.20.1","dependencies":{"lodash":"^4.17.2","express":"^4.17.1","request":"^2.79.0","bluebird":"^3.5.0","body-parser":"^1.19.0","typed-error":"^1.0.1","@types/lodash":"^4.14.54","@types/request":"^2.48.1","request-promise":"^4.2.2","@types/bluebird-global":"^3.0.1","@types/request-promise":"^4.1.42"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.2.0","gulp":"^4.0.2","mocha":"^8.1.2","ngrok":"^3.2.7","tslint":"^4.5.1","gulp-util":"^3.0.8","gulp-mocha":"^7.0.2","typescript":"^3.3.4000","@types/chai":"^4.2.12","@types/node":"^12.12.54","chai-string":"^1.5.0","gulp-tslint":"^8.1.4","@types/mocha":"^8.0.3","@octokit/rest":"^16.20.0","@types/express":"^4.17.7","gulp-sourcemaps":"^2.6.5","gulp-typescript":"^6.0.0-alpha.1","chai-as-promised":"^7.1.1","@types/body-parser":"^1.19.0","@types/chai-string":"^1.4.2","mocha-junit-reporter":"^2.0.0","@types/chai-as-promised":"^7.1.3"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk_0.8.0_1599038991382_0.6193962345159703","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.8.1-update-typed-error-079e32e7bbfe7b85b28a9648a165934f11a9a288":{"name":"front-sdk","version":"0.8.1-update-typed-error-079e32e7bbfe7b85b28a9648a165934f11a9a288","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.8.1-update-typed-error-079e32e7bbfe7b85b28a9648a165934f11a9a288","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"ff6eadcb8ef6d871c17b074d5d21366ab12bd682","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.8.1-update-typed-error-079e32e7bbfe7b85b28a9648a165934f11a9a288.tgz","fileCount":26,"integrity":"sha512-Rv2UeNBzo07o9V121+FVMsLfyCkk+cvg++FNy+QGXEat5ZVU+XphvwSXaG8i0epy78lyrCukhEwX2zmmKWXE+g==","signatures":[{"sig":"MEQCIDNzMnEzOJwMKwF+BcSd7pniC9dix/wxF27ThJuxkqR9AiB7GDbA2Z7H4uZGFJv11cuiXhRYRrWTJUX9/hP8wkydfA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":129862,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfT2u9CRA9TVsSAnZWagAA3xUP/1zpfp+VdQMTxqm8EQIx\njohjDQy5LvMav9QgvOmn4L+ER8AUOdiXu69475ab2cIQBq3Gz0X31Ey3nIIL\nIop4ud3pSlb6faEFveTFH0VGaB444sB9naQYGMGCVwYRE102VWXDQfjJsh12\nLhnVdLmWwE4eeBI/Tf5x5W3ep3Ne9DDqUsUz5VSwzX3kGyvDs/P8adCRXqIm\n0NCJrWx9YCHI8vcPJ+dtBjARk4/ro3htmr3EWkM5zkBAPzAwguNKY0ey2KWN\nFl3n2uboYUmwlvVUMJuiNohPd7MKhQ3sdk2Vl24JV6SKehlo2bshLuPaKGsd\nr2YBtNLEfhqhKG1Gh4IqtzGhIgL2+PwDRRFmhItKdn/hlWXeiLHIidCJiLS5\nkCEEeFjG6GqUbHWvRjXyOS0reHhiA4YjckLDwZB/IvJyw1GtXQWNLHEqaWWa\n8hLkwAapLgFnV/JYqSBuJOCSIOi4KwUUutxejSN5q99i0Duz4l6m9/iRQmDZ\nIT2M9mb7O0mwoCfwB8/KixzCNQbQ+kA1TgRZYc0+XQpzBF1UP2WpU1+EVymM\nedcTOA4xa2lnbvR/2F26fgf7KKHvSSJCv42jbfSDqTY2/x1UQzrHpNuxSko7\nouLx+mbicA2MytCUkP0RfpuyDqfhsU7K3CCezTXoJLKgPiIUNXougDd4olor\nV9Yl\r\n=Vt/S\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"lib/index.ts","readme":"# front-sdk\nAn SDK for working with Front (https://frontapp.com).\n\n## TypeScript Quickstart\n\nImport in the usual way:\n\n```typescript\nimport { Front } from 'front-sdk';\n```\n\n## JavaScript\n\nRequire in the usual way:\n\n```javascript\nconst Front = require('front-sdk').Front;\n```\n\n## Usage\n\nCreate a new instance of the SDK to use it, passing the API token for Front.\n\n```typescript\nimport { Comment, Front } from 'front-sdk';\nconst front = new Front('abcdef123457890');\n\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}).then((comment: Comment) => {\n    console.log(comment);\n}).catch(FrontError, (err: FrontError) => {\n    console.log(err);\n});\n```\n\nCan also be used as a callback, if required:\n\n```typescript\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}, (err: FrontError, comment: FrontComment) => {\n    if (err) {\n        console.log(err);\n        return;\n    }\n\n    console.log(comment);\n});\n```\n\nClients can register for events, passing an object detailing a port to listen on using a new instance of an Express server, or an instance of an Express server to use. An optional path to install the webhook on can also be passed (this defaults to `/fronthook`).\n\nTo use this functionality, pass the secret shared key in as the second parameter when creating a new Front instance.\n```typescript\n    import { Event, Front } from 'front-sdk';\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    const httpServer = frontInst.registerEvents({ port: 1234, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nYou can also use a pre-existing Express instance, but note that the Front SDK expects that the request body should be an already parsed object or a JSON parseable string. You can easily add this using the `body-parser` library:\n\n```typescript\n    import { Event, Front } from 'front-sdk';\n    import * as bodyParser from 'body-parser';\n\n    const app = express();\n    app.use(bodyParser.json());\n    app.listen(1234);\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    frontInst.registerEvents({ server: app, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nThe SDK will verify that events sent to it are signed by the shared secret key, and will retrieve the entire event rather than just the preview. Events are sent to the client in the order the preview events for them were originally dispatched.\n\n#### Notes\n\nTo post into a Front Inbox, you need to know the correct channels in for it.\nChannels are instances of sources, such as SMTP, Facebook, Front Integrations, etc.\n\nSo to post a new Conversation:\n * Find the Inbox required want\n * List the Channels and find the correct one for the source (Integration channels, in the SDK case)\n * Post a Message to that Channel (which will return a Conversation reference)\n\nTo post a Comment or Message to that Conversation:\n * Use the Conversation reference to post (returns a Comment or Message object)\n\n## Running tests locally\n\nPut [configuration](./test/keeper.ts) in `./test/creds.json` file and then run:\n\n```\nFRONT_TEST_KEYS=`node ./test/encode_keys.js ./test/creds.json` npm run test\n```\n","gitHead":"079e32e7bbfe7b85b28a9648a165934f11a9a288","scripts":{"lint":"gulp tslint","test":"gulp tslint && gulp test","build":"gulp build","prepublish":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"10.20.1","dependencies":{"lodash":"^4.17.2","express":"^4.17.1","request":"^2.79.0","bluebird":"^3.5.0","body-parser":"^1.19.0","typed-error":"^3.2.1","@types/lodash":"^4.14.54","@types/request":"^2.48.1","request-promise":"^4.2.2","@types/bluebird-global":"^3.0.1","@types/request-promise":"^4.1.42"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","gulp":"^4.0.2","mocha":"^8.1.2","ngrok":"^3.2.7","tslint":"^4.5.1","gulp-util":"^3.0.8","gulp-mocha":"^7.0.2","typescript":"^3.9.7","@types/chai":"^4.2.12","@types/node":"^12.12.54","chai-string":"^1.5.0","gulp-tslint":"^8.1.4","@types/mocha":"^8.0.3","@octokit/rest":"^16.20.0","@types/express":"^4.17.7","gulp-sourcemaps":"^2.6.5","gulp-typescript":"^6.0.0-alpha.1","chai-as-promised":"^7.1.1","@types/body-parser":"^1.19.0","@types/chai-string":"^1.4.2","mocha-junit-reporter":"^2.0.0","@types/chai-as-promised":"^7.1.3"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk_0.8.1-update-typed-error-079e32e7bbfe7b85b28a9648a165934f11a9a288_1599040445096_0.8735565672398973","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.8.1-update-typed-error-c91cbb6050bfb894fb3ce9c40943c6c60a4d6519":{"name":"front-sdk","version":"0.8.1-update-typed-error-c91cbb6050bfb894fb3ce9c40943c6c60a4d6519","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.8.1-update-typed-error-c91cbb6050bfb894fb3ce9c40943c6c60a4d6519","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"0b3360fe45835ccadf9cdb9690f4f4d403bf97d9","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.8.1-update-typed-error-c91cbb6050bfb894fb3ce9c40943c6c60a4d6519.tgz","fileCount":26,"integrity":"sha512-RUYc3KOcbp5/m41E4XMvVOG5UZL8xOPjgWNI1a53EebUHy3yR+UHd6ppC6MQNS6z0hCqFtzARFjqTTG6LFyzfA==","signatures":[{"sig":"MEYCIQC8oek59D0v1j20XeKLvXyaNn6lNAbAuAjtNuZIX0kKzgIhAJV1aAOULoM3i4Pa9ASZ6mgsQCsfsqY88uvjHJhVo4+z","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":127003,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfT8nMCRA9TVsSAnZWagAAu6kP+wYhJMlekQUzk2QL9+C4\nKjyXcoxxxABFsIFOA120gRNB5z4a/ZyCdIAyvhTC1DNaXSlE+4n0ssR5PpxJ\nJo0ifj7QMQiYVPU7OskTvA+e5DKv9pFL8VjHBejAaw8K8KJrS2MNcmyX/uuC\nUxm/pm+JYpSyTDVRzBCSrUM7f3v9t4sUZ4XdGOV3NkqXKQy4ViME8b+tXRPs\nU4ubTcqyTTzXD95tYIicNiAOLCUT+j72ZiF5KqjJLdJSyE+TQKEMBUbJvOaX\nSKNdgX3bQ9h4f1l7iaa6g33nvJLAbzsbLXDiLHINU/r25grai1z/L1rqcg/d\nFL/hr30hS36DQ3dOuh/814kDXCTBUM5zHOIT1NQcAlgjokAI6sk8ti9AmvRY\nze4HiKPKBeL1TFgNftwinWS84qiTGh4228ZfDfdXjxnTMDnrrIMyjuIBWCPR\nuwGG6jBtvFA3+Vgu4aljrXEUAkSyQfsZMjWuWBNz24N/koRLw2iBitpEXovO\ntkTEb0WSAL3hvNCOwJIW1vgQHWEC7SHqTVVjEa85P0b2KaeiWoI20lwqUh10\nsLlyI3efLch/U1wxYE6LAM/1pGAJz4eGxKkyPnTpriHF224EfRV5xmcEfe3B\nsN+ujYWo2DKU2RasqAZrYqRcS1w2b5j17E37LkM4gFFyPpSdsb23Nrz7u0Pr\nctr8\r\n=uar5\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"lib/index.ts","readme":"# front-sdk\nAn SDK for working with Front (https://frontapp.com).\n\n## TypeScript Quickstart\n\nImport in the usual way:\n\n```typescript\nimport { Front } from 'front-sdk';\n```\n\n## JavaScript\n\nRequire in the usual way:\n\n```javascript\nconst Front = require('front-sdk').Front;\n```\n\n## Usage\n\nCreate a new instance of the SDK to use it, passing the API token for Front.\n\n```typescript\nimport { Comment, Front } from 'front-sdk';\nconst front = new Front('abcdef123457890');\n\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}).then((comment: Comment) => {\n    console.log(comment);\n}).catch(FrontError, (err: FrontError) => {\n    console.log(err);\n});\n```\n\nCan also be used as a callback, if required:\n\n```typescript\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}, (err: FrontError, comment: FrontComment) => {\n    if (err) {\n        console.log(err);\n        return;\n    }\n\n    console.log(comment);\n});\n```\n\nClients can register for events, passing an object detailing a port to listen on using a new instance of an Express server, or an instance of an Express server to use. An optional path to install the webhook on can also be passed (this defaults to `/fronthook`).\n\nTo use this functionality, pass the secret shared key in as the second parameter when creating a new Front instance.\n```typescript\n    import { Event, Front } from 'front-sdk';\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    const httpServer = frontInst.registerEvents({ port: 1234, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nYou can also use a pre-existing Express instance, but note that the Front SDK expects that the request body should be an already parsed object or a JSON parseable string. You can easily add this using the `body-parser` library:\n\n```typescript\n    import { Event, Front } from 'front-sdk';\n    import * as bodyParser from 'body-parser';\n\n    const app = express();\n    app.use(bodyParser.json());\n    app.listen(1234);\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    frontInst.registerEvents({ server: app, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nThe SDK will verify that events sent to it are signed by the shared secret key, and will retrieve the entire event rather than just the preview. Events are sent to the client in the order the preview events for them were originally dispatched.\n\n#### Notes\n\nTo post into a Front Inbox, you need to know the correct channels in for it.\nChannels are instances of sources, such as SMTP, Facebook, Front Integrations, etc.\n\nSo to post a new Conversation:\n * Find the Inbox required want\n * List the Channels and find the correct one for the source (Integration channels, in the SDK case)\n * Post a Message to that Channel (which will return a Conversation reference)\n\nTo post a Comment or Message to that Conversation:\n * Use the Conversation reference to post (returns a Comment or Message object)\n\n## Running tests locally\n\nPut [configuration](./test/keeper.ts) in `./test/creds.json` file and then run:\n\n```\nFRONT_TEST_KEYS=`node ./test/encode_keys.js ./test/creds.json` npm run test\n```\n","gitHead":"c91cbb6050bfb894fb3ce9c40943c6c60a4d6519","scripts":{"lint":"gulp tslint","test":"gulp tslint && gulp test","build":"gulp build","prepublish":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"10.20.1","dependencies":{"lodash":"^4.17.2","express":"^4.17.1","request":"^2.79.0","bluebird":"^3.5.0","body-parser":"^1.19.0","typed-error":"^3.2.1","@types/lodash":"^4.14.54","@types/request":"^2.48.1","request-promise":"^4.2.2","@types/bluebird-global":"^3.0.1","@types/request-promise":"^4.1.42"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","gulp":"^4.0.2","mocha":"^8.1.2","ngrok":"^3.2.7","tslint":"^4.5.1","gulp-util":"^3.0.8","gulp-mocha":"^7.0.2","typescript":"^3.9.7","@types/chai":"^4.2.12","@types/node":"^12.12.54","chai-string":"^1.5.0","gulp-tslint":"^8.1.4","@types/mocha":"^8.0.3","@octokit/rest":"^16.20.0","@types/express":"^4.17.7","gulp-sourcemaps":"^2.6.5","gulp-typescript":"^6.0.0-alpha.1","chai-as-promised":"^7.1.1","@types/body-parser":"^1.19.0","@types/chai-string":"^1.4.2","mocha-junit-reporter":"^2.0.0","@types/chai-as-promised":"^7.1.3"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk_0.8.1-update-typed-error-c91cbb6050bfb894fb3ce9c40943c6c60a4d6519_1599064524365_0.9982587239578529","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.8.1":{"name":"front-sdk","version":"0.8.1","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.8.1","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"d05662f163590ca3aa76e65f085835718fe58d70","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.8.1.tgz","fileCount":26,"integrity":"sha512-Xhfnw06mp+dxik4ylk7rzmo+lKRMFGJH7Rq+BUl3GEi7Jo9lM6OZocqXpQKFSSoWDus2n2H6rhEKxTsDSgW7Tw==","signatures":[{"sig":"MEYCIQC67hC+9ddr4Vn7eCVjF56m9YAsVi09wtYxUk7zmFUvCQIhALQ3a19gnbuQ81NL9Mr9RLucxYaPbjXod2q1MnPMQPw6","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":126943,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfUKoiCRA9TVsSAnZWagAAd2kP/j9KzwRfcZS6NWlqeMr7\n3o9ztdyKYD1mew4PnYpIF+DPNtw+lkm5KBUWv6Mrcg7wlqBTwK7RTSWngvH0\ntCOfw6oEVZ0VLtfm1mmzonjkgVuVs4yMSEvYdlyTyDMz/DQ+LReHb8v7g+63\n6rcKLsQmRDowewYGkNP95uR2Ead7f5J+CcfjpykgOZ/bwvykAHLR8e0nT/eL\n3WFcTCK9bRmPOTYagZwVxH6JUvU6ZtfsViCmpQGIA06lVSzI+adhb9LmMsxZ\nyXzyDHRXoQPme59+DQ9tyIeiZF6T2CwO77XEjm3hmaL6+ShAlQ+6rOK+ngBI\nnv5HjJnp7xo8ZCUiCUfg+kSii2DumgHfM5MaS6rwhFwpwmlv6Z9bKmAi68F6\n7uq84/sJqhikrTOl3gj0S46LFQa5bBoFAlfteB5j3hmhqFg3c6ulaoANW5q5\nHreBWrSYlA7A8VbkRxyoA+50y1UBpR+XHl2Hxn00BZyLpsTqhmP5IUElwTkr\ns06hgSNarfKH3G5tjGIf/LNIlUAT/JjMq8djg3qHje0kmG3SgkzQUMo/J94A\nN2o+KRNyPO/6c8eKdIHR18WMHLmaWk0FGQ9AfVhePjJ4nL5Yjn9BNubNCZe3\n6e52wZmyJL/7TvJhYl0Tr/2Bl8a86U29H+uqahUDFpTS0ee7TUiOHhaKmlC+\nwX1P\r\n=8yoJ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"lib/index.ts","gitHead":"89bb9c323c462b29d1c550d4ce409de511b07a13","scripts":{"lint":"gulp tslint","test":"gulp tslint && gulp test","build":"gulp build","prepublish":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"_npmVersion":"6.14.5","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"10.20.1","dependencies":{"lodash":"^4.17.2","express":"^4.17.1","request":"^2.79.0","bluebird":"^3.5.0","body-parser":"^1.19.0","typed-error":"^3.2.1","@types/lodash":"^4.14.54","@types/request":"^2.48.1","request-promise":"^4.2.2","@types/bluebird-global":"^3.0.1","@types/request-promise":"^4.1.42"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.2.0","gulp":"^4.0.2","mocha":"^8.1.2","ngrok":"^3.2.7","tslint":"^4.5.1","gulp-util":"^3.0.8","gulp-mocha":"^7.0.2","typescript":"^3.9.7","@types/chai":"^4.2.12","@types/node":"^12.12.54","chai-string":"^1.5.0","gulp-tslint":"^8.1.4","@types/mocha":"^8.0.3","@octokit/rest":"^16.20.0","@types/express":"^4.17.7","gulp-sourcemaps":"^2.6.5","gulp-typescript":"^6.0.0-alpha.1","chai-as-promised":"^7.1.1","@types/body-parser":"^1.19.0","@types/chai-string":"^1.4.2","mocha-junit-reporter":"^2.0.0","@types/chai-as-promised":"^7.1.3"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk_0.8.1_1599121953851_0.5967316551607971","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.8.2-build-type-declarations-file-7b1c198e76d4915726d2cbedb34a72b78a470766":{"name":"front-sdk","version":"0.8.2-build-type-declarations-file-7b1c198e76d4915726d2cbedb34a72b78a470766","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.8.2-build-type-declarations-file-7b1c198e76d4915726d2cbedb34a72b78a470766","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"afd967cfbdd502d8df4272f4e9f57e85504b206d","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.8.2-build-type-declarations-file-7b1c198e76d4915726d2cbedb34a72b78a470766.tgz","fileCount":28,"integrity":"sha512-im2i0Ch6ajOXpWJ9Xx5rZL1nD/Cnr8ROijU6kBzxGpO9uPB+/9qMviKb0kZWjEM+6CiIEl2A0kIQWodgc7Cqbg==","signatures":[{"sig":"MEQCIHUq32BjlITGRIY00xT8e3BtFSZikW1cporVMd22YhbdAiATx17zw8oTtkfldjA6uxEAK+FyDtb1R3cfgEh3H7A1bA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":184926,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3T4XCRA9TVsSAnZWagAApUwP/iqHcFQieAGpNDB+/RwK\nyDfK1iR0vGc1b6gDSKMpts3U1EY1kQ7JtrsJ3Q3rl2duB822Auc4KNDSSkYw\nx8XF43Js/3vUNPqdy/CksJSZAXm/TLKxRHOOrbbUQLpN2rri0Pl2ZxRtPpbp\n2vpHxWy2enVZzJ9azQcrY3Tj4f/aKmvMO2HdfAI8bKdgvDbxNW9iHI8A7jFn\nBifASoQedbH72t9s/b/XM1Y7JTnsnitcuYw34agKca4o6eHbMX/PRyfDf9IN\naXnMWk1rGBLurQgqexGhjyAV3RTg4nbzjev14306pxicOMEdcGGrnLrhMMhh\n5ANpC+OlbpQRmkcg7eaGZaA+6WHbWCGm2INPkd3oWJa0lDoCq/tAicziCugN\nS/d7m+sY/r8ws+ryzIZvkUUozSdGnHgzkDrQ2k5JG7QG+ylO0/xKrF0GZ8+t\nRfcT16TsLGVAaHY2y5uU6tadRpUe2SpnJVCDxV/B6hhcE6GFtTnCSwF+Xd68\nrDxr7yJfBcaBYMjkot+JIY5PTYJNgnzFlbSpKHBI0WF4n1CPlYMOSsEhbLRy\nHenjF2D7uvZYB4Bh2E/HKZo8qEAL4UCms5iLDsIFTIiFt+6VOLJJxHRKyUud\n38KGZBDCXKu/UK7f7AIGPADiqlfQULfTFjod/badadWmAW573g/+UEqPwmnr\nO+yc\r\n=9ZZo\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# front-sdk\nAn SDK for working with Front (https://frontapp.com).\n\n## TypeScript Quickstart\n\nImport in the usual way:\n\n```typescript\nimport { Front } from 'front-sdk';\n```\n\n## JavaScript\n\nRequire in the usual way:\n\n```javascript\nconst Front = require('front-sdk').Front;\n```\n\n## Usage\n\nCreate a new instance of the SDK to use it, passing the API token for Front.\n\n```typescript\nimport { Comment, Front } from 'front-sdk';\nconst front = new Front('abcdef123457890');\n\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}).then((comment: Comment) => {\n    console.log(comment);\n}).catch(FrontError, (err: FrontError) => {\n    console.log(err);\n});\n```\n\nCan also be used as a callback, if required:\n\n```typescript\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}, (err: FrontError, comment: FrontComment) => {\n    if (err) {\n        console.log(err);\n        return;\n    }\n\n    console.log(comment);\n});\n```\n\nClients can register for events, passing an object detailing a port to listen on using a new instance of an Express server, or an instance of an Express server to use. An optional path to install the webhook on can also be passed (this defaults to `/fronthook`).\n\nTo use this functionality, pass the secret shared key in as the second parameter when creating a new Front instance.\n```typescript\n    import { Event, Front } from 'front-sdk';\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    const httpServer = frontInst.registerEvents({ port: 1234, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nYou can also use a pre-existing Express instance, but note that the Front SDK expects that the request body should be an already parsed object or a JSON parseable string. You can easily add this using the `body-parser` library:\n\n```typescript\n    import { Event, Front } from 'front-sdk';\n    import * as bodyParser from 'body-parser';\n\n    const app = express();\n    app.use(bodyParser.json());\n    app.listen(1234);\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    frontInst.registerEvents({ server: app, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nThe SDK will verify that events sent to it are signed by the shared secret key, and will retrieve the entire event rather than just the preview. Events are sent to the client in the order the preview events for them were originally dispatched.\n\n#### Notes\n\nTo post into a Front Inbox, you need to know the correct channels in for it.\nChannels are instances of sources, such as SMTP, Facebook, Front Integrations, etc.\n\nSo to post a new Conversation:\n * Find the Inbox required want\n * List the Channels and find the correct one for the source (Integration channels, in the SDK case)\n * Post a Message to that Channel (which will return a Conversation reference)\n\nTo post a Comment or Message to that Conversation:\n * Use the Conversation reference to post (returns a Comment or Message object)\n\n## Running tests locally\n\nPut [configuration](./test/keeper.ts) in `./test/creds.json` file and then run:\n\n```\nFRONT_TEST_KEYS=`node ./test/encode_keys.js ./test/creds.json` npm run test\n```\n","gitHead":"7b1c198e76d4915726d2cbedb34a72b78a470766","scripts":{"lint":"gulp tslint","test":"gulp tslint && gulp test","build":"gulp build","prepublish":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"_npmVersion":"6.14.13","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"14.17.1","dependencies":{"lodash":"^4.17.2","express":"^4.17.1","request":"^2.79.0","bluebird":"^3.5.0","body-parser":"^1.19.0","typed-error":"^3.2.1","@types/lodash":"^4.14.54","@types/request":"^2.48.1","request-promise":"^4.2.2","@types/bluebird-global":"^3.0.1","@types/request-promise":"^4.1.42"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","gulp":"^4.0.2","mocha":"^8.1.2","ngrok":"^3.2.7","tslint":"^4.5.1","gulp-util":"^3.0.8","gulp-mocha":"^7.0.2","typescript":"^3.9.7","@types/chai":"^4.2.12","@types/node":"^12.12.54","chai-string":"^1.5.0","gulp-tslint":"^8.1.4","@types/mocha":"^8.0.3","@octokit/rest":"^16.20.0","@types/express":"^4.17.7","gulp-sourcemaps":"^2.6.5","gulp-typescript":"^6.0.0-alpha.1","chai-as-promised":"^7.1.1","@types/body-parser":"^1.19.0","@types/chai-string":"^1.4.2","mocha-junit-reporter":"^2.0.0","@types/chai-as-promised":"^7.1.3"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk_0.8.2-build-type-declarations-file-7b1c198e76d4915726d2cbedb34a72b78a470766_1625112086496_0.13999173439541868","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.8.2-build-type-declarations-file-e3fe05c08ef2ddd3d271e0160fccdda1d870b356":{"name":"front-sdk","version":"0.8.2-build-type-declarations-file-e3fe05c08ef2ddd3d271e0160fccdda1d870b356","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.8.2-build-type-declarations-file-e3fe05c08ef2ddd3d271e0160fccdda1d870b356","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"c7f9cbb99f2bbdfd06f372e71574f89361bd767e","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.8.2-build-type-declarations-file-e3fe05c08ef2ddd3d271e0160fccdda1d870b356.tgz","fileCount":28,"integrity":"sha512-PrKhkuZ/qluOuhB6BJghnbki36mylHnR2euw9T8+uWJ9tFJMJOAGsxwIZFHBP0znL0hcBQGIz/uQ+S/Nazf15g==","signatures":[{"sig":"MEUCIQCuEDa7/yXFpE9gCgu9ZwC6AtcCXKFmQw4hmwX8MVC0UwIgU2nhYW2gs5tx/EUD4jVm+rzAECFr0zKQYIdbaWGUBBU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":184885,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3UGECRA9TVsSAnZWagAAWM0QAJONecXwZi9QJOMm4PMx\nzHIq/enP+AfXrGLYtUmfXrJEkGUL9QrOGzZRY2F7QTa1xq35v4Itx7hAVTBS\ngCdIzdqalmGb2Y29kgdD9lLSiz8UP/gElzjyvUOG8VooGe6Qa36eDZ23em1n\nBExLh2HL8GM8JSOVDIdeaZXP9z2I0+5gxfgE/BIv6JNn2CsK7ce9lsFlrJa3\nQ3+8dRLkeiZ9DG5+rkCr+7xSt1g5PDhygz06/AE8lzSmpDvTNsd/DY4RQeRc\nCZjmg8vzprHMEe9AYOzcxRNdZ3yDWFr9JzPM0GpNOe8STbzuhUc5r1JjekCM\nKyYeyMHR89N9k7dSpe2ho0QF+qAhBq3Z9C1eNlEOalLgRth1ITItXr2BzE+Z\nypSbzqFb1mUfhcMaUCxEL84S7tPmyAaMWtID+PiwXun/HaXelZaUrpHnxBSm\nh9Ba9EjG/jpfTrOOSkJFm94neRxO/VRZ4JPfJzKYbPNkemyavkJ8wa+vNCq9\n2EWQc1md0cqkU47QqowJFGqbtpl93xwLEFzdzKnNKovi+74NDHTNsbnU7L5j\nsSHclnq0qMa8n+UMOHIjtQYmSqY3E4KBThIkmwF5LqQFoDY83bGSBeRO8JKi\n4vWdnNTxfeIRbwtNJpDCwkDLmluYzRypIWVJYKQ5x4SDvTMTIKfTg/bkeiCH\nSd6j\r\n=2O3B\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# front-sdk\nAn SDK for working with Front (https://frontapp.com).\n\n## TypeScript Quickstart\n\nImport in the usual way:\n\n```typescript\nimport { Front } from 'front-sdk';\n```\n\n## JavaScript\n\nRequire in the usual way:\n\n```javascript\nconst Front = require('front-sdk').Front;\n```\n\n## Usage\n\nCreate a new instance of the SDK to use it, passing the API token for Front.\n\n```typescript\nimport { Comment, Front } from 'front-sdk';\nconst front = new Front('abcdef123457890');\n\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}).then((comment: Comment) => {\n    console.log(comment);\n}).catch(FrontError, (err: FrontError) => {\n    console.log(err);\n});\n```\n\nCan also be used as a callback, if required:\n\n```typescript\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}, (err: FrontError, comment: FrontComment) => {\n    if (err) {\n        console.log(err);\n        return;\n    }\n\n    console.log(comment);\n});\n```\n\nClients can register for events, passing an object detailing a port to listen on using a new instance of an Express server, or an instance of an Express server to use. An optional path to install the webhook on can also be passed (this defaults to `/fronthook`).\n\nTo use this functionality, pass the secret shared key in as the second parameter when creating a new Front instance.\n```typescript\n    import { Event, Front } from 'front-sdk';\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    const httpServer = frontInst.registerEvents({ port: 1234, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nYou can also use a pre-existing Express instance, but note that the Front SDK expects that the request body should be an already parsed object or a JSON parseable string. You can easily add this using the `body-parser` library:\n\n```typescript\n    import { Event, Front } from 'front-sdk';\n    import * as bodyParser from 'body-parser';\n\n    const app = express();\n    app.use(bodyParser.json());\n    app.listen(1234);\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    frontInst.registerEvents({ server: app, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nThe SDK will verify that events sent to it are signed by the shared secret key, and will retrieve the entire event rather than just the preview. Events are sent to the client in the order the preview events for them were originally dispatched.\n\n#### Notes\n\nTo post into a Front Inbox, you need to know the correct channels in for it.\nChannels are instances of sources, such as SMTP, Facebook, Front Integrations, etc.\n\nSo to post a new Conversation:\n * Find the Inbox required want\n * List the Channels and find the correct one for the source (Integration channels, in the SDK case)\n * Post a Message to that Channel (which will return a Conversation reference)\n\nTo post a Comment or Message to that Conversation:\n * Use the Conversation reference to post (returns a Comment or Message object)\n\n## Running tests locally\n\nPut [configuration](./test/keeper.ts) in `./test/creds.json` file and then run:\n\n```\nFRONT_TEST_KEYS=`node ./test/encode_keys.js ./test/creds.json` npm run test\n```\n","gitHead":"e3fe05c08ef2ddd3d271e0160fccdda1d870b356","scripts":{"lint":"gulp tslint","test":"gulp tslint && gulp test","build":"gulp build","prepublish":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"_npmVersion":"6.14.13","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"14.17.1","dependencies":{"lodash":"^4.17.2","express":"^4.17.1","request":"^2.79.0","bluebird":"^3.5.0","body-parser":"^1.19.0","typed-error":"^3.2.1","@types/lodash":"^4.14.54","@types/request":"^2.48.1","request-promise":"^4.2.2","@types/bluebird-global":"^3.0.1","@types/request-promise":"^4.1.42"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","gulp":"^4.0.2","mocha":"^8.1.2","ngrok":"^3.2.7","tslint":"^4.5.1","gulp-util":"^3.0.8","gulp-mocha":"^7.0.2","typescript":"^3.9.7","@types/chai":"^4.2.12","@types/node":"^12.12.54","chai-string":"^1.5.0","gulp-tslint":"^8.1.4","@types/mocha":"^8.0.3","@octokit/rest":"^16.20.0","@types/express":"^4.17.7","gulp-sourcemaps":"^2.6.5","gulp-typescript":"^6.0.0-alpha.1","chai-as-promised":"^7.1.1","@types/body-parser":"^1.19.0","@types/chai-string":"^1.4.2","mocha-junit-reporter":"^2.0.0","@types/chai-as-promised":"^7.1.3"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk_0.8.2-build-type-declarations-file-e3fe05c08ef2ddd3d271e0160fccdda1d870b356_1625112963786_0.7993619616260978","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.8.2-error-constr-e51e1800f99fbd12b0000f75aa7b78517ab077f2":{"name":"front-sdk","version":"0.8.2-error-constr-e51e1800f99fbd12b0000f75aa7b78517ab077f2","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.8.2-error-constr-e51e1800f99fbd12b0000f75aa7b78517ab077f2","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"4d9017a2cce986d33a17c8b499339629111eee0b","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.8.2-error-constr-e51e1800f99fbd12b0000f75aa7b78517ab077f2.tgz","fileCount":26,"integrity":"sha512-Ac67XIHatuvpyBz62yl0JqlpWmqtu6WSVaO8cIWnyEj6GmfZoL5G5RHHz2HnjYH6uMfeglpfFJpAmUBljmZA/A==","signatures":[{"sig":"MEUCIBpjlfHmtB0hGgQs7ZcnAw5iQ+fg35COtnOp9g4nwO3gAiEAy5OC1bR1bGWup+SO2O/sg3O/nZ+tX3natXDzf4Pr/hU=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":127281,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh+5cMCRA9TVsSAnZWagAA7fcQAJM7h4Rp5tX3gS41mhMS\navFsmd81mU3u8pXeREq9XBjFhi7I7Z4SKyCl1Q/MVr46RK4oxY03tUyEC2ku\nGc1yf1bMZm7U0Zy5zDh/3cSBnuExLVpgs0f2bEYAEzOZATQjFJupQCIv9w/x\nInjLltB/oRkeSWukQrb92F9tXhgE2+/1FfyR6kDJbMXoH2w2Z5/PSRIjqgQP\nfQhc+A0j8veNgx2qhNgmoHxTmbbEyc6hYGcAysE2kyrbBCW/OY8BhliZp53s\nsO/9+y76+GvxBGfhP3N2kh0ZbPUEGT464GOCv14hdnu5r8x0X6QFWSJcEi5i\nXBQEK1B9aUipAaqqndh8FDunYuOWcZwhP1dyffJhsz27nj0f7bcQHSYw2p+D\ngO7b3ASMXCDosMzBXwRnVRwJwbGXpIayIHRTAKbvhVEdXZFckQyei0cLJ+nU\nmFcL7H2eAAYyLrfzG0zRVk/A64vh4R8fP5/195jUsuONGc+gYKJMrptNXkj8\nW3gnuM4lb9yECeu6tt6kCEUYSxjHencn0KVfwOxy6aDWZEAvQQhSh4WJ0hl1\nXwKz9EKlhQVK8eq1Y0ymdn7XhZTvxfUSx7pKBdnMShvQkYToFdQ921krRm2C\nZTjS270l4ScvFxiR9SUl7g3WFOLdz3ohNe4v9hG+dtZMJ85IduXZ7UM5ZP2K\nfmmL\r\n=zJkr\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"lib/index.ts","readme":"# front-sdk\nAn SDK for working with Front (https://frontapp.com).\n\n## TypeScript Quickstart\n\nImport in the usual way:\n\n```typescript\nimport { Front } from 'front-sdk';\n```\n\n## JavaScript\n\nRequire in the usual way:\n\n```javascript\nconst Front = require('front-sdk').Front;\n```\n\n## Usage\n\nCreate a new instance of the SDK to use it, passing the API token for Front.\n\n```typescript\nimport { Comment, Front } from 'front-sdk';\nconst front = new Front('abcdef123457890');\n\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}).then((comment: Comment) => {\n    console.log(comment);\n}).catch(FrontError, (err: FrontError) => {\n    console.log(err);\n});\n```\n\nCan also be used as a callback, if required:\n\n```typescript\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}, (err: FrontError, comment: FrontComment) => {\n    if (err) {\n        console.log(err);\n        return;\n    }\n\n    console.log(comment);\n});\n```\n\nClients can register for events, passing an object detailing a port to listen on using a new instance of an Express server, or an instance of an Express server to use. An optional path to install the webhook on can also be passed (this defaults to `/fronthook`).\n\nTo use this functionality, pass the secret shared key in as the second parameter when creating a new Front instance.\n```typescript\n    import { Event, Front } from 'front-sdk';\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    const httpServer = frontInst.registerEvents({ port: 1234, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nYou can also use a pre-existing Express instance, but note that the Front SDK expects that the request body should be an already parsed object or a JSON parseable string. You can easily add this using the `body-parser` library:\n\n```typescript\n    import { Event, Front } from 'front-sdk';\n    import * as bodyParser from 'body-parser';\n\n    const app = express();\n    app.use(bodyParser.json());\n    app.listen(1234);\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    frontInst.registerEvents({ server: app, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nThe SDK will verify that events sent to it are signed by the shared secret key, and will retrieve the entire event rather than just the preview. Events are sent to the client in the order the preview events for them were originally dispatched.\n\n#### Notes\n\nTo post into a Front Inbox, you need to know the correct channels in for it.\nChannels are instances of sources, such as SMTP, Facebook, Front Integrations, etc.\n\nSo to post a new Conversation:\n * Find the Inbox required want\n * List the Channels and find the correct one for the source (Integration channels, in the SDK case)\n * Post a Message to that Channel (which will return a Conversation reference)\n\nTo post a Comment or Message to that Conversation:\n * Use the Conversation reference to post (returns a Comment or Message object)\n\n## Running tests locally\n\nPut [configuration](./test/keeper.ts) in `./test/creds.json` file and then run:\n\n```\nFRONT_TEST_KEYS=`node ./test/encode_keys.js ./test/creds.json` npm run test\n```\n","gitHead":"e51e1800f99fbd12b0000f75aa7b78517ab077f2","scripts":{"lint":"gulp tslint","test":"gulp tslint && gulp test","build":"gulp build","prepublish":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-02-03T08:46:37.253Z"},"_npmVersion":"6.14.15","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"14.17.1","dependencies":{"lodash":"^4.17.2","express":"^4.17.1","request":"^2.79.0","bluebird":"^3.5.0","body-parser":"^1.19.0","typed-error":"^3.2.1","@types/lodash":"^4.14.54","@types/request":"^2.48.1","request-promise":"^4.2.2","@types/bluebird-global":"^3.0.1","@types/request-promise":"^4.1.42"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","gulp":"^4.0.2","mocha":"^8.1.2","ngrok":"^3.2.7","tslint":"^4.5.1","gulp-util":"^3.0.8","gulp-mocha":"^7.0.2","typescript":"^3.9.7","@types/chai":"^4.2.12","@types/node":"^12.12.54","chai-string":"^1.5.0","gulp-tslint":"^8.1.4","@types/mocha":"^8.0.3","@octokit/rest":"^16.20.0","@types/express":"^4.17.7","gulp-sourcemaps":"^2.6.5","gulp-typescript":"^6.0.0-alpha.1","chai-as-promised":"^7.1.1","@types/body-parser":"^1.19.0","@types/chai-string":"^1.4.2","mocha-junit-reporter":"^2.0.0","@types/chai-as-promised":"^7.1.3"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk_0.8.2-error-constr-e51e1800f99fbd12b0000f75aa7b78517ab077f2_1643878156220_0.93547114615416","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.8.2":{"name":"front-sdk","version":"0.8.2","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.8.2","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"1ff6bb8d04a3f90ae84f0068c44697d374eb527d","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.8.2.tgz","fileCount":26,"integrity":"sha512-+61yFPe/eUbzKk3jDNZx6426l3xUE60Pkd3e7YvPFmqUSU8oaEPUMZ5B4POqrJIem0P64v8c1ePM0oy4CRHXaA==","signatures":[{"sig":"MEUCIQCnCc17muod2/R62s0kUKuVkESFexbwDu2E33d8Lev+8gIgZ9AFWgZE/iTPabvklIUYnIJqUrRD4Uxj1L9JxEpq+Ic=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":127227,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh+5fNCRA9TVsSAnZWagAAz2oP/2Z61e+4Bs898aGdGw5h\nXEdNOC2yRVLGO564qtzTp9RfpcyGE3ELpCpEXOayOcaOCZ/GZEUkwPFzNGEQ\njQot/9GIPutgLYKmeIMjQqgZyG4p5Xe9p2vC6DTvyQWPLp3LdWHOWSJOdto4\nhRsCEZHo3C/CgUVkEiAUeRXRTc4OrruzbpoKXqxf2ZI0CkzE8FyVsItjPMAX\nkJu2z5UmJIRHan2a2zanwOSuZSws4nC03MLjgZ0JXTh+Oeu56UYd+PB6YW6i\nXKu9D/tbuCeWy5pwRYiBTVjQYvHhnhGJq4xYKMIZaHg1sVGOtdu2qWJE1Wxm\nXsLRc7Dxf+KtFtSFzua+BrPRxWi4GJDaTwUDvY6SfBfZGeq59YSZSXftklg7\nVdv9RuSSdjK5GeQ5mcUlIagWXf0UWK00Hnd6am79o0AKZn/bfspzpwl64cnT\n275xk97ZgWU7+bipgqTa6tMWFr0v5t288KUUhFjAFI0Uw8P7WIOf6c/I1eyN\n7YWfqIK9T3p2XS0Nj+RJECwub6peYeYV1F1JEIOJx5/O/fMCGs4djCnF3TU2\nTyuKDk2aLlNBqc5F84lo3KWgyH2ToZYK5Fx5L7/wGd7YZf0cdLGlKhT5Vv6X\noLFYy1F2sVAcF4Ovo+PisKxcFd2b3GO3kdiveym3FuA1KTdJWch8cWk+1LlD\nXicH\r\n=NBJh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"lib/index.ts","gitHead":"23aedfd1cdf1af1ea26844a96b57249d4e52c365","scripts":{"lint":"gulp tslint","test":"gulp tslint && gulp test","build":"gulp build","prepublish":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-02-03T08:50:37.076Z"},"_npmVersion":"6.14.15","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"14.17.1","dependencies":{"lodash":"^4.17.2","express":"^4.17.1","request":"^2.79.0","bluebird":"^3.5.0","body-parser":"^1.19.0","typed-error":"^3.2.1","@types/lodash":"^4.14.54","@types/request":"^2.48.1","request-promise":"^4.2.2","@types/bluebird-global":"^3.0.1","@types/request-promise":"^4.1.42"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.2.0","gulp":"^4.0.2","mocha":"^8.1.2","ngrok":"^3.2.7","tslint":"^4.5.1","gulp-util":"^3.0.8","gulp-mocha":"^7.0.2","typescript":"^3.9.7","@types/chai":"^4.2.12","@types/node":"^12.12.54","chai-string":"^1.5.0","gulp-tslint":"^8.1.4","@types/mocha":"^8.0.3","@octokit/rest":"^16.20.0","@types/express":"^4.17.7","gulp-sourcemaps":"^2.6.5","gulp-typescript":"^6.0.0-alpha.1","chai-as-promised":"^7.1.1","@types/body-parser":"^1.19.0","@types/chai-string":"^1.4.2","mocha-junit-reporter":"^2.0.0","@types/chai-as-promised":"^7.1.3"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk_0.8.2_1643878349560_0.9326400344170183","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.8.3-build-type-declarations-file-9d7e60cf756f288017ec302339373fe25131e217":{"name":"front-sdk","version":"0.8.3-build-type-declarations-file-9d7e60cf756f288017ec302339373fe25131e217","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.8.3-build-type-declarations-file-9d7e60cf756f288017ec302339373fe25131e217","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"f3898060462d8634c88ced1f26aabc83b4c1dedc","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.8.3-build-type-declarations-file-9d7e60cf756f288017ec302339373fe25131e217.tgz","fileCount":28,"integrity":"sha512-Kqj2ejbV1/+B4KGtuGA2aFmPyVqbmpdPET6Zv9Yuo2U6jP52Jd30HeRjbXZirPUwvaYEFHCpPmOZQu6OZwb5pA==","signatures":[{"sig":"MEUCIG3vlX9URD+RhuUeON4B0RbhzTGvRYUSLKNUZD1FvQg4AiEAqCczjTk8EtmysUV6tAYXmjDrW5FDC/F/86VCdscXCec=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":185171,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi2YKdACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrbeQ/+Jd8OhOUv/p11RydLHiGTNH0WWksxelcswSwdLWbzENCbYX64\r\n8q3lXRAj2L2WS6CjKYWHdveYCVfutHnOaLpC3xUf5dWC1gVNEpLSHgUH+wob\r\nLHLgBHVwmnYCRP2plfIpgsm8jNbWtX8zOUcBcc89EFqnjcpMOELOr/i1wwvQ\r\nwmSFHHl+lcnLGnfVePSv+5JU2hVeZi0ydOgcnwIjWSLnuQogS6HFfLHXASCT\r\nLWBXSMb+QvjkLHrHHqvU/7O4KQRlHbnH4DIXOpx4J1EFRvuX9mCfp+GvQH6W\r\n4rTRa4jiGoBqs9atMHBPbyuSsvyrNn+BBLSvFtB0I+lLVBaQ7FftWBysvGsX\r\nILPmfwkYyFxbZwj5i+h6jxwkOtHyA4+R1m2LAZM0JkI5JZeWUaYGo62JZo20\r\nzAuOnm51uZJzEnCvCctplOH18IZkvKJSww+hEQcwR4dbU5gEQPHFcn1Q78D1\r\ng0mT6PBWRtFeIzBwc5pLMiYl33XtfO4UDjJKUWQ1f4ZwJYrSO3La5QF6/bAE\r\nHKVRvfG8+5VHhGR3b35VN9A3KweBQQkZGE6rgMGQVQ+MuIl7/Xbg6Ustndz8\r\ntO6EJB9TPnFzJoeB3WYPdc72r+Pdv2VJXouEwqmVIG1wYrahlJr4tcRaNM90\r\nxmeY6zZL2D6AEyr0jo2jPoHtjcqiTvkZl0k=\r\n=9ih/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# front-sdk\nAn SDK for working with Front (https://frontapp.com).\n\n## TypeScript Quickstart\n\nImport in the usual way:\n\n```typescript\nimport { Front } from 'front-sdk';\n```\n\n## JavaScript\n\nRequire in the usual way:\n\n```javascript\nconst Front = require('front-sdk').Front;\n```\n\n## Usage\n\nCreate a new instance of the SDK to use it, passing the API token for Front.\n\n```typescript\nimport { Comment, Front } from 'front-sdk';\nconst front = new Front('abcdef123457890');\n\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}).then((comment: Comment) => {\n    console.log(comment);\n}).catch(FrontError, (err: FrontError) => {\n    console.log(err);\n});\n```\n\nCan also be used as a callback, if required:\n\n```typescript\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}, (err: FrontError, comment: FrontComment) => {\n    if (err) {\n        console.log(err);\n        return;\n    }\n\n    console.log(comment);\n});\n```\n\nClients can register for events, passing an object detailing a port to listen on using a new instance of an Express server, or an instance of an Express server to use. An optional path to install the webhook on can also be passed (this defaults to `/fronthook`).\n\nTo use this functionality, pass the secret shared key in as the second parameter when creating a new Front instance.\n```typescript\n    import { Event, Front } from 'front-sdk';\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    const httpServer = frontInst.registerEvents({ port: 1234, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nYou can also use a pre-existing Express instance, but note that the Front SDK expects that the request body should be an already parsed object or a JSON parseable string. You can easily add this using the `body-parser` library:\n\n```typescript\n    import { Event, Front } from 'front-sdk';\n    import * as bodyParser from 'body-parser';\n\n    const app = express();\n    app.use(bodyParser.json());\n    app.listen(1234);\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    frontInst.registerEvents({ server: app, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nThe SDK will verify that events sent to it are signed by the shared secret key, and will retrieve the entire event rather than just the preview. Events are sent to the client in the order the preview events for them were originally dispatched.\n\n#### Notes\n\nTo post into a Front Inbox, you need to know the correct channels in for it.\nChannels are instances of sources, such as SMTP, Facebook, Front Integrations, etc.\n\nSo to post a new Conversation:\n * Find the Inbox required want\n * List the Channels and find the correct one for the source (Integration channels, in the SDK case)\n * Post a Message to that Channel (which will return a Conversation reference)\n\nTo post a Comment or Message to that Conversation:\n * Use the Conversation reference to post (returns a Comment or Message object)\n\n## Running tests locally\n\nPut [configuration](./test/keeper.ts) in `./test/creds.json` file and then run:\n\n```\nFRONT_TEST_KEYS=`node ./test/encode_keys.js ./test/creds.json` npm run test\n```\n","gitHead":"9d7e60cf756f288017ec302339373fe25131e217","scripts":{"lint":"gulp tslint","test":"gulp tslint && gulp test","build":"gulp build","prepublish":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-07-21T16:36:29.392Z"},"_npmVersion":"6.14.17","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"14.19.3","dependencies":{"lodash":"^4.17.2","express":"^4.17.1","request":"^2.79.0","bluebird":"^3.5.0","body-parser":"^1.19.0","typed-error":"^3.2.1","@types/lodash":"^4.14.54","@types/request":"^2.48.1","request-promise":"^4.2.2","@types/bluebird-global":"^3.0.1","@types/request-promise":"^4.1.42"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","gulp":"^4.0.2","mocha":"^8.1.2","ngrok":"^3.2.7","tslint":"^4.5.1","gulp-util":"^3.0.8","gulp-mocha":"^7.0.2","typescript":"^3.9.7","@types/chai":"^4.2.12","@types/node":"^12.12.54","chai-string":"^1.5.0","gulp-tslint":"^8.1.4","@types/mocha":"^8.0.3","@octokit/rest":"^16.20.0","@types/express":"^4.17.7","gulp-sourcemaps":"^2.6.5","gulp-typescript":"^6.0.0-alpha.1","chai-as-promised":"^7.1.1","@types/body-parser":"^1.19.0","@types/chai-string":"^1.4.2","mocha-junit-reporter":"^2.0.0","@types/chai-as-promised":"^7.1.3"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk_0.8.3-build-type-declarations-file-9d7e60cf756f288017ec302339373fe25131e217_1658421917359_0.8155321118216261","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.8.3-build-type-declarations-file-b9dc6ed3bdeed8b920ab0ab55c3fa01bead8b65f":{"name":"front-sdk","version":"0.8.3-build-type-declarations-file-b9dc6ed3bdeed8b920ab0ab55c3fa01bead8b65f","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.8.3-build-type-declarations-file-b9dc6ed3bdeed8b920ab0ab55c3fa01bead8b65f","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"4dc5af3921601b91f7aa94e1fdd07be2c430e53f","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.8.3-build-type-declarations-file-b9dc6ed3bdeed8b920ab0ab55c3fa01bead8b65f.tgz","fileCount":61,"integrity":"sha512-ECI/5nk6k/FT4AUcSIXZbNm+XP8krtHNXcmvegwDsXy5L3jb1tsJ13Ka+v6PQBgzgbN3+YKxKAIdPqfdC9cgMQ==","signatures":[{"sig":"MEQCIHB1MJquIXVu9tXHjiXRXzliIM/hig5Nyp9TiPxMAC2EAiAO+hvaBizSXWfN3paNnD3QE+UPeGMelayhNZuhDouLgw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":196970,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi2mtUACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqh+g//bMTjtkKhoHc+tJu07ZXBi9LYwpT0vNXmXbkKGI+h/e7urH7a\r\nZ5V2BJEIzKp0mBnPgURUaFvy/MAji2p8ZVG0SpjQidbSkK6Zcb+wEsNy200w\r\nqfHxynIgHVYHvSsybGI2m+hDXMoT3HIygOL9PpCmcVXtzceOaFko2pPySKsm\r\nu95XTMOc6izA3vdFHVWZCHoRyyKZX1NNVisf8EzcO28pbVkerqHvgbWoHSv3\r\npb0pEUyncru5WQ4wBEEsT4Hj+DG7PUhlRYFRFknQoCNoyE6/ygFbmNDYuvTD\r\n1R562aApOnWqBd2P+4KQwiGiVMyiQBT5gNuG3m7f6y/k90SxxFujT0CuVXG4\r\n7psTXSCSiJcdJhTLBeTocgkOVYqr7uHs4VL7RVmIi7yX4HtYSQ5g+GDWnsi0\r\naypM60a7Qb3RCKlb1IquaBo8RVurs9BlDbnxZJxEn5yfc5D603/8Dezuf855\r\nYzT90TwBCz4kknQUwZUJN2EOCRrcBSRWI/gYGCLsH6z3HqFwrsE68518BRUd\r\nxfuur535c7Htua7njRJmzavPB7KyRrpZDtb7xCG5Xe2dG9az16odA3yN2gji\r\nBAlGHW8Lq8OpPvseGL585gTL0YwzCHh5LwgVd2wcXJ3optiLxNpgRb9T0FUO\r\nGjCV/rD/ahJPF/DR+4x1fzVN3DdJZy5A/Ak=\r\n=t/Fq\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# front-sdk\nAn SDK for working with Front (https://frontapp.com).\n\n## TypeScript Quickstart\n\nImport in the usual way:\n\n```typescript\nimport { Front } from 'front-sdk';\n```\n\n## JavaScript\n\nRequire in the usual way:\n\n```javascript\nconst Front = require('front-sdk').Front;\n```\n\n## Usage\n\nCreate a new instance of the SDK to use it, passing the API token for Front.\n\n```typescript\nimport { Comment, Front } from 'front-sdk';\nconst front = new Front('abcdef123457890');\n\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}).then((comment: Comment) => {\n    console.log(comment);\n}).catch(FrontError, (err: FrontError) => {\n    console.log(err);\n});\n```\n\nCan also be used as a callback, if required:\n\n```typescript\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}, (err: FrontError, comment: FrontComment) => {\n    if (err) {\n        console.log(err);\n        return;\n    }\n\n    console.log(comment);\n});\n```\n\nClients can register for events, passing an object detailing a port to listen on using a new instance of an Express server, or an instance of an Express server to use. An optional path to install the webhook on can also be passed (this defaults to `/fronthook`).\n\nTo use this functionality, pass the secret shared key in as the second parameter when creating a new Front instance.\n```typescript\n    import { Event, Front } from 'front-sdk';\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    const httpServer = frontInst.registerEvents({ port: 1234, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nYou can also use a pre-existing Express instance, but note that the Front SDK expects that the request body should be an already parsed object or a JSON parseable string. You can easily add this using the `body-parser` library:\n\n```typescript\n    import { Event, Front } from 'front-sdk';\n    import * as bodyParser from 'body-parser';\n\n    const app = express();\n    app.use(bodyParser.json());\n    app.listen(1234);\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    frontInst.registerEvents({ server: app, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nThe SDK will verify that events sent to it are signed by the shared secret key, and will retrieve the entire event rather than just the preview. Events are sent to the client in the order the preview events for them were originally dispatched.\n\n#### Notes\n\nTo post into a Front Inbox, you need to know the correct channels in for it.\nChannels are instances of sources, such as SMTP, Facebook, Front Integrations, etc.\n\nSo to post a new Conversation:\n * Find the Inbox required want\n * List the Channels and find the correct one for the source (Integration channels, in the SDK case)\n * Post a Message to that Channel (which will return a Conversation reference)\n\nTo post a Comment or Message to that Conversation:\n * Use the Conversation reference to post (returns a Comment or Message object)\n\n## Running tests locally\n\nPut [configuration](./test/keeper.ts) in `./test/creds.json` file and then run:\n\n```\nFRONT_TEST_KEYS=`node ./test/encode_keys.js ./test/creds.json` npm run test\n```\n","gitHead":"b9dc6ed3bdeed8b920ab0ab55c3fa01bead8b65f","scripts":{"lint":"balena-lint lib test && deplint","test":"gulp tslint && gulp test","build":"npm run clean && tsc","clean":"rimraf build","lint:fix":"balena-lint --fix lib test","prepublish":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-07-22T09:14:43.884Z"},"_npmVersion":"6.14.17","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"14.19.3","dependencies":{"lodash":"^4.17.2","express":"^4.18.1","request":"^2.79.0","bluebird":"^3.7.2","typed-error":"^3.2.1","@types/lodash":"^4.14.54","@types/express":"^4.17.13","@types/request":"^2.48.1","@types/bluebird":"^3.5.36","request-promise":"^4.2.2","@types/request-promise":"^4.1.42"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","gulp":"^4.0.2","mocha":"^8.1.2","ngrok":"^3.2.7","rimraf":"^3.0.2","gulp-util":"^3.0.8","gulp-mocha":"^7.0.2","typescript":"^4.7.4","@types/chai":"^4.2.12","@types/node":"^17.0.4","chai-string":"^1.5.0","@balena/lint":"^6.2.0","@types/mocha":"^8.0.3","@octokit/rest":"^16.20.0","gulp-sourcemaps":"^2.6.5","chai-as-promised":"^7.1.1","@types/body-parser":"^1.19.0","@types/chai-string":"^1.4.2","mocha-junit-reporter":"^2.0.0","@types/chai-as-promised":"^7.1.3"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk_0.8.3-build-type-declarations-file-b9dc6ed3bdeed8b920ab0ab55c3fa01bead8b65f_1658481492407_0.7965448797557109","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."},"0.8.3-build-type-declarations-file-4940aed35c33093a1651b561f58ad513b847b2ef":{"name":"front-sdk","version":"0.8.3-build-type-declarations-file-4940aed35c33093a1651b561f58ad513b847b2ef","keywords":["resin","typescript"],"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","_id":"front-sdk@0.8.3-build-type-declarations-file-4940aed35c33093a1651b561f58ad513b847b2ef","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"homepage":"https://github.com/resin-io-modules/front-sdk#readme","bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"dist":{"shasum":"6fe315e0981a2e925b5fb0788b46bc2df93dd346","tarball":"https://registry.npmjs.org/front-sdk/-/front-sdk-0.8.3-build-type-declarations-file-4940aed35c33093a1651b561f58ad513b847b2ef.tgz","fileCount":56,"integrity":"sha512-yQFB9tYrgprjK5cFcUz0sthqlEmhBr/WBQYanlTlD6I4Fj/IvDT1ShMBbvRgSvHTxgBS+bFDUe8PnOALtcJtIA==","signatures":[{"sig":"MEUCIC8jq+e+ylr9HO2R6dqAUSnIO9kd5EqTT+wJ/6PLNoA+AiEAoBDgODMSvqaJynydd7pG2UzaKQ5O2lQY9sddeFU9KhE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":195373,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi2nNEACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo43w/8Cgvc6ebIqtZwzbc88e/kJEwjvIScUKDSESuqqbAHbj+0J6FC\r\ndKjtXJYKQlr8mEZYZqEKzwPlx8Uw3Uu2opGh7JS2PRtf2+NwZHwR6lU6hhzF\r\nLJ/BjFmCAmC+03AaaWh5Ldg6eaNDotKw4+5wcxC8GrCopMP9GFaSh9Fqqq06\r\nh7gOVBjV6ehVKgJXAOIWZG4g1TjG12FnZf59WgtV1gXYIL299XHAxCeEX6NZ\r\nJJ1sbpXgW+86DufAvXEZboP21G9cqMVQXjE6XDM9Vfr2zqhcyHPBgFRKd4MX\r\ngi3+npE9NlIbbgnn2CuUJTCjiCM/CsDbCWd+VMEbJnlqmpOsSBou2F6lrAms\r\nlqbOf5EH1ydD3AWfoKAmbRn8NO8mtO5tLRV7ZTtwI0aJvnIKo2F6FC6PXXxI\r\nvkxyUFM9vgufQ8Yt0Mx4rYiICszyHFxGA4i9LKLub1GtfSqLFY5sGRrAup1r\r\nmYJf/dVVljFmntto+WkVKGXzlowQE4HHpkYvtXnTgP++yPXUGCI8vfiE/nNI\r\nqPcMZlE5cW9xPKIf6T+1HKfrqGGfxmV3kHsV/Zv9HdXzuGu4fMiuGcvIdlQb\r\nLs042DZQSEMBlXOpAw1mrRaOqcP9751DOAKpJKmFKBuz0QXD+wL/A7gH9dtw\r\nafNHF/NbBaDSnEXoktHSYhBEKS0iTbzeWaw=\r\n=lKCn\r\n-----END PGP SIGNATURE-----\r\n"},"main":"build/index.js","types":"build/index.d.ts","readme":"# front-sdk\nAn SDK for working with Front (https://frontapp.com).\n\n## TypeScript Quickstart\n\nImport in the usual way:\n\n```typescript\nimport { Front } from 'front-sdk';\n```\n\n## JavaScript\n\nRequire in the usual way:\n\n```javascript\nconst Front = require('front-sdk').Front;\n```\n\n## Usage\n\nCreate a new instance of the SDK to use it, passing the API token for Front.\n\n```typescript\nimport { Comment, Front } from 'front-sdk';\nconst front = new Front('abcdef123457890');\n\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}).then((comment: Comment) => {\n    console.log(comment);\n}).catch(FrontError, (err: FrontError) => {\n    console.log(err);\n});\n```\n\nCan also be used as a callback, if required:\n\n```typescript\nfront.comment.create({\n    conversation_id: 'cnv_xxxx',\n    author_id: `alt:email:back@tofront`,\n    body: 'It is very important that you see this comment!'\n}, (err: FrontError, comment: FrontComment) => {\n    if (err) {\n        console.log(err);\n        return;\n    }\n\n    console.log(comment);\n});\n```\n\nClients can register for events, passing an object detailing a port to listen on using a new instance of an Express server, or an instance of an Express server to use. An optional path to install the webhook on can also be passed (this defaults to `/fronthook`).\n\nTo use this functionality, pass the secret shared key in as the second parameter when creating a new Front instance.\n```typescript\n    import { Event, Front } from 'front-sdk';\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    const httpServer = frontInst.registerEvents({ port: 1234, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nYou can also use a pre-existing Express instance, but note that the Front SDK expects that the request body should be an already parsed object or a JSON parseable string. You can easily add this using the `body-parser` library:\n\n```typescript\n    import { Event, Front } from 'front-sdk';\n    import * as bodyParser from 'body-parser';\n\n    const app = express();\n    app.use(bodyParser.json());\n    app.listen(1234);\n\n    const frontInst = new Front('abcdef123457890', 'secretkey');\n    frontInst.registerEvents({ server: app, path: '/myhook' }, (err: FrontError, event: Event) => {\n        if (err) {\n            console.log(err);\n        } else {\n            console.log(event);\n        }\n    });\n```\n\nThe SDK will verify that events sent to it are signed by the shared secret key, and will retrieve the entire event rather than just the preview. Events are sent to the client in the order the preview events for them were originally dispatched.\n\n#### Notes\n\nTo post into a Front Inbox, you need to know the correct channels in for it.\nChannels are instances of sources, such as SMTP, Facebook, Front Integrations, etc.\n\nSo to post a new Conversation:\n * Find the Inbox required want\n * List the Channels and find the correct one for the source (Integration channels, in the SDK case)\n * Post a Message to that Channel (which will return a Conversation reference)\n\nTo post a Comment or Message to that Conversation:\n * Use the Conversation reference to post (returns a Comment or Message object)\n\n## Running tests locally\n\nTo run tests locally you will need to provide a Front API token and a test topic issue.\n\n```\nexport GH_TOPIC_ISSUE=123456789\nexport GH_TOPIC_OWNER=\"balena-io-modules\"\nexport GH_TOPIC_REPO=\"front-sdk\"\nexport FRONT_TOKEN=XXXX_MY_TOKEN_XXXXX\nnpm run test\n```\n","gitHead":"4940aed35c33093a1651b561f58ad513b847b2ef","scripts":{"lint":"balena-lint lib test","test":"npm run lint && mocha","build":"npm run clean && tsc","clean":"rimraf build","lint:fix":"balena-lint --fix lib test","prepublish":"npm run build"},"_npmUser":{"name":"balena.io","email":"accounts+npm@balena.io"},"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"versionist":{"publishedAt":"2022-07-22T09:49:05.750Z"},"_npmVersion":"6.14.17","description":"A JavaScript API for Front (https://frontapp.com)","directories":{},"_nodeVersion":"14.19.3","dependencies":{"lodash":"^4.17.2","express":"^4.18.1","request":"^2.79.0","bluebird":"^3.7.2","typed-error":"^3.2.1","@types/lodash":"^4.14.54","@types/express":"^4.17.13","@types/request":"^2.48.1","@types/bluebird":"^3.5.36","request-promise":"^4.2.2","@types/request-promise":"^4.1.42"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","gulp":"^4.0.2","mocha":"^8.1.2","ngrok":"^3.2.7","rimraf":"^3.0.2","gulp-util":"^3.0.8","gulp-mocha":"^7.0.2","typescript":"^4.7.4","@types/chai":"^4.2.12","@types/node":"^17.0.4","chai-string":"^1.5.0","@balena/lint":"^6.2.0","@types/mocha":"^8.0.3","@octokit/rest":"^16.20.0","gulp-sourcemaps":"^2.6.5","chai-as-promised":"^7.1.1","@types/body-parser":"^1.19.0","@types/chai-string":"^1.4.2","mocha-junit-reporter":"^2.0.0","@types/chai-as-promised":"^7.1.3"},"_npmOperationalInternal":{"tmp":"tmp/front-sdk_0.8.3-build-type-declarations-file-4940aed35c33093a1651b561f58ad513b847b2ef_1658483524344_0.9917231893474672","host":"s3://npm-registry-packages"},"deprecated":"Deprecated: no longer maintained. The GitHub repository has been archived and no further releases will be published."}},"time":{"created":"2017-05-12T21:08:19.418Z","modified":"2026-01-29T10:58:58.063Z","0.0.1":"2017-05-12T21:08:19.418Z","0.1.0":"2017-05-18T09:29:40.398Z","0.2.0":"2017-06-03T08:47:22.816Z","0.2.1":"2017-06-27T13:01:28.975Z","0.2.2":"2017-07-06T15:00:31.357Z","0.2.3":"2017-11-20T19:35:46.861Z","0.3.0":"2018-04-17T09:54:04.956Z","0.3.1-20-getFromLink-reduce-slashes-27f84b0095f0d87a57ebf62b3fd33d0e2ee582c2":"2018-09-17T15:36:23.374Z","0.3.1":"2018-09-17T15:39:58.726Z","0.3.2-upgrade-request-types-c9ebbe5d0f59ed644f77d06eda2ed3a735aafd4a":"2018-12-13T11:08:41.560Z","0.3.2":"2018-12-13T11:13:58.102Z","0.3.3-front-retries-5xx-b0a551c60baf2bfddf7eb6bdf18830d0e46bbe53":"2018-12-13T11:53:26.550Z","0.3.3-front-retries-5xx-a97ef5b4b045cb2b4d1bd72ff6440a10e7845968":"2018-12-13T12:04:37.630Z","0.3.3-front-retries-5xx-36c26683a19a02148af09fa47f29e22ac1a0aaf0":"2018-12-13T12:08:55.144Z","0.3.3":"2018-12-13T12:54:50.456Z","0.3.4-better-errors-b964e3ce591b1c81225fe4eef1d749be36a27aa6":"2019-01-04T18:26:38.523Z","0.3.4-better-errors-96b0b739b770af2d9cedd2bf15d11d046055f724":"2019-01-04T18:35:32.119Z","0.3.4":"2019-01-04T18:44:22.501Z","0.3.5-correctly-handle-more-error-info-6955f3ec674ca2e4e7948aad2c10f4283f8457b4":"2019-01-08T15:20:46.351Z","0.3.5":"2019-01-08T15:39:47.592Z","0.3.6-fix-messages-and-tags-typing-7f6b03dfd1dc366914d2d4ceb975ef48218df24f":"2019-02-05T15:04:04.888Z","0.3.6":"2019-02-08T08:39:08.334Z","0.4.0-29-add-create-channel-6e840a4f9ad13f4fd4c2619e27b569a07465eb60":"2019-03-17T17:03:07.164Z","0.4.0-29-add-create-channel-e7b1385b573e8c08cdb6e17d76b40624b518d9a2":"2019-03-24T23:22:21.638Z","0.4.0-31-add-circleci-config-89be2582eaecaac3e2a19dc94cc572981038d0ff":"2019-03-25T14:54:42.308Z","0.4.0-31-add-circleci-config-65e754bad19f7999882e38f70a3a35539ec1f3c0":"2019-03-25T15:21:21.779Z","0.4.0-31-add-circleci-config-8fa98781826287e8813792073eb800ce390f3e4b":"2019-03-25T15:25:04.959Z","0.4.0-31-add-circleci-config-1df652d12546751c2cb6c7b7eff9b2acd189a750":"2019-03-25T15:32:02.737Z","0.4.0-31-add-circleci-config-62adcf144e9e7df856e3a3dedd9bd0a9ba53215f":"2019-03-25T15:32:14.858Z","0.4.0-31-add-circleci-config-e36868a31c3a4d6f2f4c8aca4bc2298c549b0840":"2019-03-25T15:35:05.229Z","0.4.0":"2019-03-25T16:16:08.388Z","0.5.0-29-add-create-channel-6de853490355dd3fcfea1c3f484610f784752be5":"2019-03-25T16:22:39.548Z","0.5.0":"2019-03-25T16:27:01.025Z","0.6.0-14-pagination-out-of-date-aee73cc66066ddb2791e88b5b99fca25d7459685":"2019-03-25T18:41:20.092Z","0.6.0-14-pagination-out-of-date-261a9019e49331133df0d7b0b72f9568c834b733":"2019-03-25T18:47:20.098Z","0.6.0":"2019-03-28T13:12:30.400Z","0.7.0-34-fix-page-token-typings-9766eba637b7ef3ea286531de9c20055e24cc03e":"2019-04-05T22:18:45.389Z","0.7.0":"2019-04-08T12:40:52.011Z","0.7.1-conversation-update-param-0f6d452a2e87d23ecf28181238ca767ffb59d014":"2019-04-08T12:58:56.847Z","0.7.1":"2019-04-08T13:02:56.765Z","0.8.0-36-fix-contact-create-e0ac0d03c2a0ff1c9b6eab22b0bfd62ab0814b65":"2019-07-24T12:24:05.915Z","0.7.2-36-fix-contact-create-9ca2c082c3518e34b4e97a046d75a3cc7c682083":"2019-07-24T13:57:46.484Z","0.7.2":"2019-07-24T14:06:10.143Z","0.7.3-update-typed-error-200e1514c3bc1e24ac1de9d5fe5fa8c4979cab25":"2020-08-05T14:51:07.803Z","0.7.3-update-typed-error-5dabd34df5a226dc74df987694ad61ce99451056":"2020-08-10T08:18:10.682Z","0.7.3-update-typed-error-d44be1a8a71c18aab2a78d29eb101ef99906be83":"2020-08-10T13:05:48.531Z","0.7.3-add-git-secrets-dcebacf8eca0b6f3468d6fe65269e47964c37ef9":"2020-08-12T11:04:13.376Z","0.7.3-add-git-secrets-37cdf29c14a924e5fe34bbd679b3727ce5e74d1f":"2020-08-12T16:38:18.216Z","0.7.3-secrets-8768c77dec6c9909e960676721e42f20e02c3c8a":"2020-08-27T00:38:11.627Z","0.7.3-secrets-3566fa25b97328bd08d9ea953f7123e09c2ae291":"2020-08-27T07:50:43.099Z","0.7.3-secrets-7d41df6dc5bb2fea5c7a0fa66f3ef72d2baf3f96":"2020-08-27T17:35:03.435Z","0.7.3-secrets-153e599b195cd10dbb9e5d39ad24e168426a103e":"2020-08-28T07:31:47.029Z","0.7.3-secrets-f97c14f482d10fedc1fa3cfa81f4a323e5f21230":"2020-08-28T07:32:38.235Z","0.7.3-secrets-879b8763c29c7f752bac1fbd9f7f04928a9fb56f":"2020-09-01T07:07:09.789Z","0.7.3-secrets-b4d3db43438155519d8d21255adf06f02136095d":"2020-09-01T07:14:49.045Z","0.8.0-circleci-tests-fbcbd84dec9dc989728a06998f7b7b81188a58a6":"2020-09-01T07:43:25.792Z","0.8.0-circleci-tests-05c07a173ccc55d93f853282b91232387e3e065c":"2020-09-01T08:20:13.566Z","0.8.0-circleci-tests-cd775eec5427a98782adefecd2cff226d1c50824":"2020-09-02T07:47:39.626Z","0.8.0":"2020-09-02T09:29:51.504Z","0.8.1-update-typed-error-079e32e7bbfe7b85b28a9648a165934f11a9a288":"2020-09-02T09:54:05.364Z","0.8.1-update-typed-error-c91cbb6050bfb894fb3ce9c40943c6c60a4d6519":"2020-09-02T16:35:24.473Z","0.8.1":"2020-09-03T08:32:34.200Z","0.8.2-build-type-declarations-file-7b1c198e76d4915726d2cbedb34a72b78a470766":"2021-07-01T04:01:26.695Z","0.8.2-build-type-declarations-file-e3fe05c08ef2ddd3d271e0160fccdda1d870b356":"2021-07-01T04:16:03.938Z","0.8.2-error-constr-e51e1800f99fbd12b0000f75aa7b78517ab077f2":"2022-02-03T08:49:16.337Z","0.8.2":"2022-02-03T08:52:29.697Z","0.8.3-build-type-declarations-file-9d7e60cf756f288017ec302339373fe25131e217":"2022-07-21T16:45:17.584Z","0.8.3-build-type-declarations-file-b9dc6ed3bdeed8b920ab0ab55c3fa01bead8b65f":"2022-07-22T09:18:12.595Z","0.8.3-build-type-declarations-file-4940aed35c33093a1651b561f58ad513b847b2ef":"2022-07-22T09:52:04.512Z"},"bugs":{"url":"https://github.com/resin-io-modules/front-sdk/issues"},"author":{"name":"Heds Simons","email":"hedley@resin.io"},"license":"Apache-2.0","homepage":"https://github.com/resin-io-modules/front-sdk#readme","keywords":["resin","typescript"],"repository":{"url":"git+https://github.com/resin-io-modules/front-sdk.git","type":"git"},"description":"A JavaScript API for Front (https://frontapp.com)","maintainers":[{"name":"balena.io","email":"accounts+npm@balena.io"}],"readme":"","readmeFilename":""}