{"_id":"sla4oai-tools","_rev":"26-ac66222443d5fdb4e9e116d2fbe5f897","name":"sla4oai-tools","dist-tags":{"latest":"1.2.8"},"versions":{"1.0.0":{"name":"sla4oai-tools","version":"1.0.0","keywords":["oai","sla","swagger"],"license":"MIT","_id":"sla4oai-tools@1.0.0","maintainers":[{"name":"isagroup","email":"isagroup.us@gmail.com"}],"homepage":"https://github.com/isa-group/SLA4OAI-node","bugs":{"url":"https://github.com/isa-group/SLA4OAI-node/issues"},"dist":{"shasum":"d043faee8b3d5628dde8962f220ed998d3696ca4","tarball":"https://registry.npmjs.org/sla4oai-tools/-/sla4oai-tools-1.0.0.tgz","integrity":"sha512-7jUQoTYd53ZYU5qqIEnFk/jbqDpGPIFx7Wk0AKQLqOgPDcRtigE/Bwk5VaMfRtQM8HQqE1qx/4apo/EewgfpHA==","signatures":[{"sig":"MEQCIH901Wm2WgALZL645x0b/RCHN4DyH1w7EFPz+Z25OBlJAiBMQKd0tQK49XjULbglFwE/6Cc6GuxbIhW3U8aq/B75gA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./lib","_from":".","_shasum":"d043faee8b3d5628dde8962f220ed998d3696ca4","engines":{"npm":"3.x","node":"5.x"},"gitHead":"af7935df175bd83350016cd9db137ebc5a206178","scripts":{"test":"mocha --reporter spec --require test/bootstrap/node test/*.test.js test/**/*.test.js","eslint":"eslint lib/**/*.js test/**/*.js","sampleserver":"nodemon test/sampleServer/server.js"},"_npmUser":{"name":"isagroup","email":"isagroup.us@gmail.com"},"licenses":[{"url":"http://opensource.org/licenses/MIT","type":"MIT"}],"deprecated":"portal generation had some bugs in previous versions. please consider upgrading","repository":{"url":"git+https://github.com/isa-group/SLA4OAI-node.git","type":"git"},"_npmVersion":"3.10.3","description":"SLA for Open API Initiative Library","directories":{},"_nodeVersion":"6.5.0","dependencies":{"express":"^4.13.4","winston":"^2.2.0","passport-github2":"^0.1.10","passport-facebook":"^2.1.1","passport-windowslive":"^1.0.2","passport-google-oauth":"^1.0.0"},"devDependencies":{"chai":"^3.5.0","mocha":"^2.5.3","chai-connect-middleware":"^0.3.1"},"_npmOperationalInternal":{"tmp":"tmp/sla4oai-tools-1.0.0.tgz_1473842269520_0.7384235931094736","host":"packages-16-east.internal.npmjs.com"}},"1.0.1":{"name":"sla4oai-tools","version":"1.0.1","keywords":["oai","sla","swagger"],"license":"MIT","_id":"sla4oai-tools@1.0.1","maintainers":[{"name":"isagroup","email":"isagroup.us@gmail.com"}],"homepage":"https://github.com/isa-group/SLA4OAI-node","bugs":{"url":"https://github.com/isa-group/SLA4OAI-node/issues"},"dist":{"shasum":"c4acf963de3a2ab7a235606e2146e3f86679eecd","tarball":"https://registry.npmjs.org/sla4oai-tools/-/sla4oai-tools-1.0.1.tgz","integrity":"sha512-tQYNtWPOQmlD/WUhkCLDvpdnU7C4l/bw5PFb/6J1lI/kGojoY4OidNBXCi84sLdvoIm5mI/ZuXfqCKWHCo+YUw==","signatures":[{"sig":"MEYCIQDhqlzjekreThpSLpN0toHJX8ydXZ9Cnf/3HM/oezLD3AIhALGh3TsWEnmtWX0oQT6DrvpUDgD2l5hbozTx7X5asDeE","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./lib","_from":".","_shasum":"c4acf963de3a2ab7a235606e2146e3f86679eecd","engines":{"npm":"3.x","node":"5.x"},"gitHead":"e419fc4ff54c10d764e4a99488e2913706561013","scripts":{"test":"mocha --reporter spec --require test/bootstrap/node test/*.test.js test/**/*.test.js","eslint":"eslint lib/**/*.js test/**/*.js","sampleserver":"nodemon test/sampleServer/server.js"},"_npmUser":{"name":"isagroup","email":"isagroup.us@gmail.com"},"licenses":[{"url":"http://opensource.org/licenses/MIT","type":"MIT"}],"deprecated":"portal generation had some bugs in previous versions. please consider upgrading","repository":{"url":"git+https://github.com/isa-group/SLA4OAI-node.git","type":"git"},"_npmVersion":"3.10.3","description":"SLA for Open API Initiative Library","directories":{},"_nodeVersion":"6.5.0","dependencies":{"express":"^4.13.4","winston":"^2.2.0","passport-github2":"^0.1.10","passport-facebook":"^2.1.1","passport-windowslive":"^1.0.2","passport-google-oauth":"^1.0.0"},"devDependencies":{"chai":"^3.5.0","mocha":"^2.5.3","chai-connect-middleware":"^0.3.1"},"_npmOperationalInternal":{"tmp":"tmp/sla4oai-tools-1.0.1.tgz_1473842899240_0.44649008475244045","host":"packages-12-west.internal.npmjs.com"}},"1.0.2":{"name":"sla4oai-tools","version":"1.0.2","keywords":["oai","sla","swagger"],"license":"MIT","_id":"sla4oai-tools@1.0.2","maintainers":[{"name":"isagroup","email":"isagroup.us@gmail.com"}],"homepage":"https://github.com/isa-group/SLA4OAI-node","bugs":{"url":"https://github.com/isa-group/SLA4OAI-node/issues"},"dist":{"shasum":"1237b4ca6d191a961b0f49cc09df6f0b2ef057b6","tarball":"https://registry.npmjs.org/sla4oai-tools/-/sla4oai-tools-1.0.2.tgz","integrity":"sha512-sYGSoymXYEIC9XSTAyOEDAlrIK0SROXKAvOMd+SxF3qLUirJryUhsTKXlKyCh6jva0JHqW4GONKlE9SYpYIDAA==","signatures":[{"sig":"MEUCIQDHFJaNfDMDAjmPNusTvCKxgxavwm9cEOysV2z9kJOEEgIgY4R9DmHwwgiDURGMa2H1O1dg4SVl5LI5GQlRdh3zW6k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./lib","_from":".","_shasum":"1237b4ca6d191a961b0f49cc09df6f0b2ef057b6","engines":{"npm":"3.x","node":"5.x"},"gitHead":"1c8d7720a34b5f5eaafc53b28a416235065f207b","scripts":{"test":"mocha --reporter spec --require test/bootstrap/node test/*.test.js test/**/*.test.js","eslint":"eslint lib/**/*.js test/**/*.js","sampleserver":"nodemon test/sampleServer/server.js"},"_npmUser":{"name":"isagroup","email":"isagroup.us@gmail.com"},"licenses":[{"url":"http://opensource.org/licenses/MIT","type":"MIT"}],"deprecated":"portal generation had some bugs in previous versions. please consider upgrading","repository":{"url":"git+https://github.com/isa-group/SLA4OAI-node.git","type":"git"},"_npmVersion":"3.10.3","description":"SLA for Open API Initiative Library","directories":{},"_nodeVersion":"6.3.1","dependencies":{"express":"^4.13.4","winston":"^2.2.0","passport-github2":"^0.1.10","passport-facebook":"^2.1.1","passport-windowslive":"^1.0.2","passport-google-oauth":"^1.0.0"},"devDependencies":{"chai":"^3.5.0","mocha":"^2.5.3","chai-connect-middleware":"^0.3.1"},"_npmOperationalInternal":{"tmp":"tmp/sla4oai-tools-1.0.2.tgz_1473854886358_0.03091035271063447","host":"packages-16-east.internal.npmjs.com"}},"1.0.3":{"name":"sla4oai-tools","version":"1.0.3","keywords":["oai","sla","swagger"],"license":"MIT","_id":"sla4oai-tools@1.0.3","maintainers":[{"name":"isagroup","email":"isagroup.us@gmail.com"}],"homepage":"https://github.com/isa-group/SLA4OAI-node","bugs":{"url":"https://github.com/isa-group/SLA4OAI-node/issues"},"dist":{"shasum":"13730412691276a57d56b8c42554f1b3eada8898","tarball":"https://registry.npmjs.org/sla4oai-tools/-/sla4oai-tools-1.0.3.tgz","integrity":"sha512-VM4oZWJ/NUiIiGkG29gYxsrku/SbZ4bwoSGCEP07jaZ0OR+fkN3P4YE+eaT3qBMw0vejwLt9miOaSUjSjBjfGg==","signatures":[{"sig":"MEYCIQC9IAATIAfZi64kAlw+HtxRLDVx5mPAeZezGXR1br32tgIhAOI0Q0caMviUtyazaoz4Q/upxMCi+nRg+emox7UmM3yA","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./lib","_from":".","_shasum":"13730412691276a57d56b8c42554f1b3eada8898","engines":{"npm":"3.x","node":"5.x"},"gitHead":"a39a2b456c79f902777b54c1ec790e62a35c9178","scripts":{"test":"mocha --reporter spec --require test/bootstrap/node test/*.test.js test/**/*.test.js","eslint":"eslint lib/**/*.js test/**/*.js","sampleserver":"nodemon test/sampleServer/server.js"},"_npmUser":{"name":"isagroup","email":"isagroup.us@gmail.com"},"licenses":[{"url":"http://opensource.org/licenses/MIT","type":"MIT"}],"deprecated":"portal generation had some bugs in previous versions. please consider upgrading","repository":{"url":"git+https://github.com/isa-group/SLA4OAI-node.git","type":"git"},"_npmVersion":"3.10.3","description":"SLA for Open API Initiative Library","directories":{},"_nodeVersion":"6.3.1","dependencies":{"express":"^4.13.4","winston":"^2.2.0","passport-github2":"^0.1.10","passport-facebook":"^2.1.1","passport-windowslive":"^1.0.2","passport-google-oauth":"^1.0.0"},"devDependencies":{"chai":"^3.5.0","mocha":"^2.5.3","chai-connect-middleware":"^0.3.1"},"_npmOperationalInternal":{"tmp":"tmp/sla4oai-tools-1.0.3.tgz_1473953605334_0.6202416596934199","host":"packages-12-west.internal.npmjs.com"}},"1.1.0":{"name":"sla4oai-tools","version":"1.1.0","keywords":["oai","sla","swagger"],"license":"MIT","_id":"sla4oai-tools@1.1.0","maintainers":[{"name":"isagroup","email":"isagroup.us@gmail.com"}],"homepage":"https://github.com/isa-group/SLA4OAI-node","bugs":{"url":"https://github.com/isa-group/SLA4OAI-node/issues"},"dist":{"shasum":"68352fe9a26c128feeaacad6d991a88c7162738b","tarball":"https://registry.npmjs.org/sla4oai-tools/-/sla4oai-tools-1.1.0.tgz","integrity":"sha512-It0Il+zSYDiy5TZDYAjs+HBuAJsqAmODaskAIn6+Gq9ITIyEXvkoZlGZnN7zxT3phGanKYbS1ArT0arvPp9YNQ==","signatures":[{"sig":"MEUCIQDZ9HMD+zaHen3kJHP54UNDK2NizWp30AvwF5S+ZfiGNAIgEmLb4QbfN+5w2DHl2b32m0SLBxS6o6OJKQCDSrTbwpM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./lib","_from":".","_shasum":"68352fe9a26c128feeaacad6d991a88c7162738b","engines":{"npm":"3.x","node":"5.x"},"gitHead":"9d39a2ed07a0f09549031e3ac329358fb2db8d04","scripts":{"test":"mocha --reporter spec --require test/bootstrap/node test/*.test.js test/**/*.test.js","eslint":"eslint lib/**/*.js test/**/*.js","sampleserver":"nodemon test/sampleServer/server.js"},"_npmUser":{"name":"isagroup","email":"isagroup.us@gmail.com"},"licenses":[{"url":"http://opensource.org/licenses/MIT","type":"MIT"}],"deprecated":"portal generation had some bugs in previous versions. please consider upgrading","repository":{"url":"git+https://github.com/isa-group/SLA4OAI-node.git","type":"git"},"_npmVersion":"3.10.3","description":"SLA for Open API Initiative Library","directories":{},"_nodeVersion":"6.5.0","dependencies":{"express":"^4.13.4","js-yaml":"^3.6.1","request":"^2.75.0","winston":"^2.2.0","passport-github2":"^0.1.10","passport-facebook":"^2.1.1","passport-windowslive":"^1.0.2","passport-google-oauth":"^1.0.0"},"devDependencies":{"chai":"^3.5.0","mocha":"^2.5.3","chai-connect-middleware":"^0.3.1"},"_npmOperationalInternal":{"tmp":"tmp/sla4oai-tools-1.1.0.tgz_1476362308533_0.5862759239971638","host":"packages-16-east.internal.npmjs.com"}},"1.1.1":{"name":"sla4oai-tools","version":"1.1.1","keywords":["oai","sla","swagger"],"license":"MIT","_id":"sla4oai-tools@1.1.1","maintainers":[{"name":"isagroup","email":"isagroup.us@gmail.com"}],"homepage":"https://github.com/isa-group/SLA4OAI-node","bugs":{"url":"https://github.com/isa-group/SLA4OAI-node/issues"},"dist":{"shasum":"7640c625e5d163372ed9d0d491c6b6c5c38b4e91","tarball":"https://registry.npmjs.org/sla4oai-tools/-/sla4oai-tools-1.1.1.tgz","integrity":"sha512-Tmw33WbQuh6iY73pnX7rOcOOtgdfzC0dDEysyH6+d38wnysLcaiEZqxqbMo5ONIQBPhgzpFtGIqUyv546iwmEQ==","signatures":[{"sig":"MEUCIFE8PtTIaawe8IKsE0TnE4Lywxm7CTJ+SpyxaT43X5IQAiEAtH5WljHXBjVTB4EerdmyLGgD9Y0IQAVv78I91EijOGw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./lib","_from":".","_shasum":"7640c625e5d163372ed9d0d491c6b6c5c38b4e91","engines":{"npm":"3.x","node":"5.x"},"gitHead":"9d39a2ed07a0f09549031e3ac329358fb2db8d04","scripts":{"test":"mocha --reporter spec --require test/bootstrap/node test/*.test.js test/**/*.test.js","eslint":"eslint lib/**/*.js test/**/*.js","sampleserver":"nodemon test/sampleServer/server.js"},"_npmUser":{"name":"isagroup","email":"isagroup.us@gmail.com"},"licenses":[{"url":"http://opensource.org/licenses/MIT","type":"MIT"}],"deprecated":"portal generation had some bugs in previous versions. please consider upgrading","repository":{"url":"git+https://github.com/isa-group/SLA4OAI-node.git","type":"git"},"_npmVersion":"3.10.3","description":"SLA for Open API Initiative Library","directories":{},"_nodeVersion":"6.5.0","dependencies":{"express":"^4.13.4","js-yaml":"^3.6.1","request":"^2.75.0","winston":"^2.2.0","passport-github2":"^0.1.10","passport-facebook":"^2.1.1","passport-windowslive":"^1.0.2","passport-google-oauth":"^1.0.0"},"devDependencies":{"chai":"^3.5.0","mocha":"^2.5.3","chai-connect-middleware":"^0.3.1"},"_npmOperationalInternal":{"tmp":"tmp/sla4oai-tools-1.1.1.tgz_1478174091203_0.1965904354583472","host":"packages-12-west.internal.npmjs.com"}},"1.2.0":{"name":"sla4oai-tools","version":"1.2.0","keywords":["oai","sla","swagger"],"license":"MIT","_id":"sla4oai-tools@1.2.0","maintainers":[{"name":"isagroup","email":"isagroup.us@gmail.com"}],"homepage":"https://github.com/isa-group/SLA4OAI-node","bugs":{"url":"https://github.com/isa-group/SLA4OAI-node/issues"},"dist":{"shasum":"db336a16fa47ea722227c51b3ac2f7cc5d9cf652","tarball":"https://registry.npmjs.org/sla4oai-tools/-/sla4oai-tools-1.2.0.tgz","integrity":"sha512-/QwAfc2dS3E887KWoEO4jzbtjvJ4oXbmTEvGu/4Qd2yuyYchmdc0Juc/em19s708vmUGHXgDKeQTOXKL96LrTA==","signatures":[{"sig":"MEQCIDVLMXkEuC4swp4sfSHD+9fQ130BX6H6mfk495dPeAEzAiArXjK6JzKuuKXdJHfDZe6yPXR6nWrCH+7CK/fXWzihJA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./lib","_from":".","_shasum":"db336a16fa47ea722227c51b3ac2f7cc5d9cf652","engines":{"npm":"3.x","node":"5.x"},"gitHead":"1e034dca6537de5c9ef384b693f42c656f50336f","scripts":{"test":"mocha --reporter spec --require test/bootstrap/node test/*.test.js test/**/*.test.js","eslint":"eslint lib/**/*.js test/**/*.js","sampleserver":"nodemon test/sampleServer/server.js"},"_npmUser":{"name":"isagroup","email":"isagroup.us@gmail.com"},"licenses":[{"url":"http://opensource.org/licenses/MIT","type":"MIT"}],"deprecated":"portal generation had some bugs in previous versions. please consider upgrading","repository":{"url":"git+https://github.com/isa-group/SLA4OAI-node.git","type":"git"},"_npmVersion":"3.10.3","description":"SLA for Open API Initiative Library","directories":{},"_nodeVersion":"6.5.0","dependencies":{"express":"^4.13.4","js-yaml":"^3.6.1","request":"^2.75.0","winston":"^2.2.0","passport-github2":"^0.1.10","passport-facebook":"^2.1.1","passport-windowslive":"^1.0.2","passport-google-oauth":"^1.0.0"},"devDependencies":{"chai":"^3.5.0","mocha":"^2.5.3","chai-connect-middleware":"^0.3.1"},"_npmOperationalInternal":{"tmp":"tmp/sla4oai-tools-1.2.0.tgz_1480599254200_0.2407566870097071","host":"packages-12-west.internal.npmjs.com"}},"1.2.1":{"name":"sla4oai-tools","version":"1.2.1","keywords":["oai","sla","swagger"],"license":"MIT","_id":"sla4oai-tools@1.2.1","maintainers":[{"name":"isagroup","email":"isagroup.us@gmail.com"}],"homepage":"https://github.com/isa-group/SLA4OAI-node","bugs":{"url":"https://github.com/isa-group/SLA4OAI-node/issues"},"dist":{"shasum":"d53d80ab20a356db1c15f2bb9de559b1c80d84cf","tarball":"https://registry.npmjs.org/sla4oai-tools/-/sla4oai-tools-1.2.1.tgz","integrity":"sha512-pabvYMcmsFbdOmdrQUUbjykYAFNs3nbLqsS1qN+HSD1LsZWM6syINAjf0T1HwHE6VriauZ0xzt19hadCIFQLaw==","signatures":[{"sig":"MEYCIQCcM//amo8Rwxq54zLm6SphyJ0HFKseSgSefmACJTVa9QIhAIZNJzEaurlMryIH8cPK6DJwT5KDgZRiLW/FM++Vp2ZS","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./lib","_from":".","_shasum":"d53d80ab20a356db1c15f2bb9de559b1c80d84cf","engines":{"npm":"3.x","node":"5.x"},"gitHead":"9a6f122b2a69a87673db3a0d3d982b89a300aedc","scripts":{"test":"mocha --reporter spec --require test/bootstrap/node test/*.test.js test/**/*.test.js","eslint":"eslint lib/**/*.js test/**/*.js","sampleserver":"nodemon test/sampleServer/server.js"},"_npmUser":{"name":"isagroup","email":"isagroup.us@gmail.com"},"licenses":[{"url":"http://opensource.org/licenses/MIT","type":"MIT"}],"deprecated":"portal generation had some bugs in previous versions. please consider upgrading","repository":{"url":"git+https://github.com/isa-group/SLA4OAI-node.git","type":"git"},"_npmVersion":"3.10.3","description":"SLA for Open API Initiative Library","directories":{},"_nodeVersion":"6.5.0","dependencies":{"express":"^4.13.4","js-yaml":"^3.6.1","request":"^2.75.0","winston":"^2.2.0","passport-github2":"^0.1.10","passport-facebook":"^2.1.1","passport-windowslive":"^1.0.2","passport-google-oauth":"^1.0.0"},"devDependencies":{"chai":"^3.5.0","mocha":"^2.5.3","chai-connect-middleware":"^0.3.1"},"_npmOperationalInternal":{"tmp":"tmp/sla4oai-tools-1.2.1.tgz_1495019081207_0.7537685269489884","host":"packages-18-east.internal.npmjs.com"}},"1.2.2":{"name":"sla4oai-tools","version":"1.2.2","keywords":["oai","sla","swagger"],"license":"MIT","_id":"sla4oai-tools@1.2.2","maintainers":[{"name":"isagroup","email":"isagroup.us@gmail.com"}],"homepage":"https://github.com/isa-group/SLA4OAI-node","bugs":{"url":"https://github.com/isa-group/SLA4OAI-node/issues"},"dist":{"shasum":"4a2190f5e8602f1063f9b9c0346a91e70916bc46","tarball":"https://registry.npmjs.org/sla4oai-tools/-/sla4oai-tools-1.2.2.tgz","integrity":"sha512-QvNEs8p4T/Uh917+4eW5mIjpRudVxrAu5yINaX00rF365zxRCR6v6mWCzQ9zoqHaAnsudVvyWP/vRMnpGJdroA==","signatures":[{"sig":"MEUCIH21bIw2if6ZY4iXAzIRiw5cQu9UOEl6GVpgdVnpUYAbAiEAykXpHGdolTxWljcFhLcENSvYmsEKGDza/IaNAlgaAoA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./lib","_from":".","_shasum":"4a2190f5e8602f1063f9b9c0346a91e70916bc46","engines":{"npm":"3.x","node":"5.x"},"gitHead":"40d9365005123c59571ffae07919ae661c72975e","scripts":{"test":"mocha --reporter spec --require test/bootstrap/node test/*.test.js test/**/*.test.js","eslint":"eslint lib/**/*.js test/**/*.js","sampleserver":"nodemon test/sampleServer/server.js"},"_npmUser":{"name":"isagroup","email":"isagroup.us@gmail.com"},"licenses":[{"url":"http://opensource.org/licenses/MIT","type":"MIT"}],"deprecated":"portal generation had some bugs in previous versions. please consider upgrading","repository":{"url":"git+https://github.com/isa-group/SLA4OAI-node.git","type":"git"},"_npmVersion":"3.10.3","description":"SLA for Open API Initiative Library","directories":{},"_nodeVersion":"6.5.0","dependencies":{"express":"^4.13.4","js-yaml":"^3.6.1","request":"^2.75.0","winston":"^2.2.0","passport-github2":"^0.1.10","passport-facebook":"^2.1.1","passport-windowslive":"^1.0.2","passport-google-oauth":"^1.0.0"},"devDependencies":{"chai":"^3.5.0","mocha":"^2.5.3","chai-connect-middleware":"^0.3.1"},"_npmOperationalInternal":{"tmp":"tmp/sla4oai-tools-1.2.2.tgz_1495020618960_0.4539900117088109","host":"packages-18-east.internal.npmjs.com"}},"1.2.3":{"name":"sla4oai-tools","version":"1.2.3","keywords":["oai","sla","swagger"],"license":"MIT","_id":"sla4oai-tools@1.2.3","maintainers":[{"name":"isagroup","email":"isagroup.us@gmail.com"}],"homepage":"https://github.com/isa-group/SLA4OAI-node","bugs":{"url":"https://github.com/isa-group/SLA4OAI-node/issues"},"dist":{"shasum":"98600b40f7127b1e1b3f278644d8303d4fb3554c","tarball":"https://registry.npmjs.org/sla4oai-tools/-/sla4oai-tools-1.2.3.tgz","integrity":"sha512-al/1tYDt1ti1/MTKIgQtqMHTfT/3mxJQPqWx5bvtNkuuU2gWOdYK8Ue/WUCc1xwijZ1ctroDMwOgiGgUD94WNw==","signatures":[{"sig":"MEUCIGXMDq8jhtvA3Rqmv9qxFpULIHATo0DoNgDmtc+EPSP0AiEAym6wdWEkIhfON0GZrsbG+WTtSdcSa0xSAM3lwsiGEbs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"./lib","_from":".","_shasum":"98600b40f7127b1e1b3f278644d8303d4fb3554c","engines":{"npm":"3.x","node":"5.x"},"gitHead":"40d9365005123c59571ffae07919ae661c72975e","scripts":{"test":"mocha --reporter spec --require test/bootstrap/node test/*.test.js test/**/*.test.js","eslint":"eslint lib/**/*.js test/**/*.js","sampleserver":"nodemon test/sampleServer/server.js"},"_npmUser":{"name":"isagroup","email":"isagroup.us@gmail.com"},"licenses":[{"url":"http://opensource.org/licenses/MIT","type":"MIT"}],"deprecated":"portal generation had some bugs in previous versions. please consider upgrading","repository":{"url":"git+https://github.com/isa-group/SLA4OAI-node.git","type":"git"},"_npmVersion":"3.10.3","description":"SLA for Open API Initiative Library","directories":{},"_nodeVersion":"6.5.0","dependencies":{"express":"^4.13.4","js-yaml":"^3.6.1","request":"^2.75.0","winston":"^2.2.0","passport-github2":"^0.1.10","passport-facebook":"^2.1.1","passport-windowslive":"^1.0.2","passport-google-oauth":"^1.0.0"},"devDependencies":{"chai":"^3.5.0","mocha":"^2.5.3","chai-connect-middleware":"^0.3.1"},"_npmOperationalInternal":{"tmp":"tmp/sla4oai-tools-1.2.3.tgz_1495021726981_0.2914371720980853","host":"packages-12-west.internal.npmjs.com"}},"1.2.4":{"name":"sla4oai-tools","version":"1.2.4","keywords":["oai","sla","swagger"],"license":"MIT","_id":"sla4oai-tools@1.2.4","maintainers":[{"name":"isa-tecnico","email":"isagroup.us@gmail.com"},{"name":"isagroup_user","email":"isagroup.us@gmail.com"}],"homepage":"https://github.com/isa-group/SLA4OAI-node","bugs":{"url":"https://github.com/isa-group/SLA4OAI-node/issues"},"dist":{"shasum":"1f6a31f4901e4783d313d28b34e0e31217aa42d2","tarball":"https://registry.npmjs.org/sla4oai-tools/-/sla4oai-tools-1.2.4.tgz","fileCount":38,"integrity":"sha512-gavqEkxo61wbCw5ekOwSjqmEDCj2RAry0q0v1eNU2C5n4dRL4kq2Ciu9QyOah/O99Rp2VWTmrIUMCPJIoPXu7Q==","signatures":[{"sig":"MEUCIFPmj3JTPwYwGu+yC6SFSE1XaOyuin01YhZYk4CO7vfBAiEAyrONwxnyfwj2l0RZtJ0jdRU5Jxf5jaGiWZiEzi2v9dA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":170373},"main":"./lib","engines":{"npm":"3.x","node":"5.x"},"gitHead":"8dcc4a340edeaf22b2e466851bea322c83112f98","scripts":{"test":"mocha --reporter spec --require test/bootstrap/node test/*.test.js test/**/*.test.js","eslint":"eslint lib/**/*.js test/**/*.js","sampleserver":"nodemon test/sampleServer/server.js"},"_npmUser":{"name":"isagroup_user","email":"isagroup.us@gmail.com"},"licenses":[{"url":"http://opensource.org/licenses/MIT","type":"MIT"}],"deprecated":"portal generation had some bugs in previous versions. please consider upgrading","repository":{"url":"git+https://github.com/isa-group/SLA4OAI-node.git","type":"git"},"_npmVersion":"5.8.0","description":"SLA for Open API Initiative Library","directories":{},"_nodeVersion":"9.2.0","dependencies":{"express":"^4.16.3","js-yaml":"^3.11.0","request":"^2.85.0","winston":"^2.4.1","passport-github2":"^0.1.11","passport-facebook":"^2.1.1","passport-windowslive":"^1.0.2","passport-google-oauth":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.1.2","mocha":"^5.0.5","chai-connect-middleware":"^0.3.1"},"_npmOperationalInternal":{"tmp":"tmp/sla4oai-tools_1.2.4_1522173377573_0.14148386231912058","host":"s3://npm-registry-packages"}},"1.2.6":{"name":"sla4oai-tools","version":"1.2.6","keywords":["oai","sla","swagger"],"license":"MIT","_id":"sla4oai-tools@1.2.6","maintainers":[{"name":"isa-tecnico","email":"isagroup.us@gmail.com"},{"name":"isagroup_user","email":"isagroup.us@gmail.com"}],"homepage":"https://github.com/isa-group/SLA4OAI-node","bugs":{"url":"https://github.com/isa-group/SLA4OAI-node/issues"},"dist":{"shasum":"a8562b30e58c4eb5d2f86bcc01c7bb1bb8cf3c1f","tarball":"https://registry.npmjs.org/sla4oai-tools/-/sla4oai-tools-1.2.6.tgz","fileCount":38,"integrity":"sha512-uUnYTuhVlEyMU4b/ZIQcGJf14WudaCYGZr6RjSu+Gsrlwmgv/co7o2RoTfy5qGlONjlnyllcIg2HtboEt1pE8g==","signatures":[{"sig":"MEYCIQDGTVLj2ARfy9BSSxyJq8dn0Di193x634IKlqcncDRUfAIhAOEYpoihGJ5ahvLmPf0lv2qJgRldxZyfvbMm/fpjhVV+","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":170705},"main":"./lib","engines":{"npm":"3.x","node":"5.x"},"gitHead":"1840c13709786ef55a9ad9758d1173e0acfaadb5","scripts":{"test":"mocha --reporter spec --require test/bootstrap/node test/*.test.js test/**/*.test.js","eslint":"eslint lib/**/*.js test/**/*.js","sampleserver":"nodemon test/sampleServer/server.js"},"_npmUser":{"name":"isagroup_user","email":"isagroup.us@gmail.com"},"licenses":[{"url":"http://opensource.org/licenses/MIT","type":"MIT"}],"deprecated":"portal generation had some bugs in previous versions. please consider upgrading","repository":{"url":"git+https://github.com/isa-group/SLA4OAI-node.git","type":"git"},"_npmVersion":"5.8.0","description":"SLA for Open API Initiative Library","directories":{},"_nodeVersion":"9.2.0","dependencies":{"express":"^4.16.3","js-yaml":"^3.11.0","request":"^2.85.0","winston":"^2.4.1","passport-github2":"^0.1.11","passport-facebook":"^2.1.1","passport-windowslive":"^1.0.2","passport-google-oauth":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.1.2","mocha":"^5.0.5","chai-connect-middleware":"^0.3.1"},"_npmOperationalInternal":{"tmp":"tmp/sla4oai-tools_1.2.6_1522747767298_0.7527770094064477","host":"s3://npm-registry-packages"}},"1.2.7":{"name":"sla4oai-tools","version":"1.2.7","keywords":["oai","sla","swagger"],"license":"MIT","_id":"sla4oai-tools@1.2.7","maintainers":[{"name":"isa-tecnico","email":"isagroup.us@gmail.com"},{"name":"isagroup_user","email":"isagroup.us@gmail.com"}],"homepage":"https://github.com/isa-group/SLA4OAI-node","bugs":{"url":"https://github.com/isa-group/SLA4OAI-node/issues"},"dist":{"shasum":"c86fc5df3aecd92be112c59b102c679fd9b322f9","tarball":"https://registry.npmjs.org/sla4oai-tools/-/sla4oai-tools-1.2.7.tgz","fileCount":38,"integrity":"sha512-6YiIxYlAR+z88Z87/vvMjSUjW+/kHOcdpV8Xmspd1GrPF52qBFKeJuCATJ4ijrr3YcGpNAh25Bi0egTt4UVsjg==","signatures":[{"sig":"MEUCIQDdGQLqPACzm08f2GGZjRXIcJYDnm7LiyLUXDdPEA9omQIgQYvSGdjTbCzbtZI6Uw8OAuYr2x86Tb6utn9cIE6jCg0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":172784},"main":"./lib","engines":{"npm":"3.x","node":"5.x"},"gitHead":"016201831aca07c4c0ad2d10c8521f2c938f8250","scripts":{"test":"mocha --reporter spec --require test/bootstrap/node test/*.test.js test/**/*.test.js","eslint":"eslint lib/**/*.js test/**/*.js","sampleserver":"nodemon test/sampleServer/server.js"},"_npmUser":{"name":"isagroup_user","email":"isagroup.us@gmail.com"},"licenses":[{"url":"http://opensource.org/licenses/MIT","type":"MIT"}],"deprecated":"portal generation had some bugs in previous versions. please consider upgrading","repository":{"url":"git+https://github.com/isa-group/SLA4OAI-node.git","type":"git"},"_npmVersion":"5.8.0","description":"SLA for Open API Initiative Library","directories":{},"_nodeVersion":"9.2.0","dependencies":{"express":"^4.16.3","js-yaml":"^3.11.0","request":"^2.85.0","winston":"^2.4.1","passport-github2":"^0.1.11","passport-facebook":"^2.1.1","passport-windowslive":"^1.0.2","passport-google-oauth":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.1.2","mocha":"^5.0.5","chai-connect-middleware":"^0.3.1"},"_npmOperationalInternal":{"tmp":"tmp/sla4oai-tools_1.2.7_1522748642423_0.039759979362024245","host":"s3://npm-registry-packages"}},"1.2.8":{"name":"sla4oai-tools","version":"1.2.8","keywords":["oai","sla","swagger"],"license":"MIT","_id":"sla4oai-tools@1.2.8","maintainers":[{"name":"isa-tecnico","email":"isagroup.us@gmail.com"},{"name":"isagroup_user","email":"isagroup.us@gmail.com"}],"homepage":"https://github.com/isa-group/SLA4OAI-node","bugs":{"url":"https://github.com/isa-group/SLA4OAI-node/issues"},"dist":{"shasum":"d753ed4d39b17a5ef0ecb186d857f160c4d53634","tarball":"https://registry.npmjs.org/sla4oai-tools/-/sla4oai-tools-1.2.8.tgz","fileCount":38,"integrity":"sha512-j7zQQXNah+NEzRaVEdOt8v3vR0H5hjEQyz5zXfhV+g0uvYhaqZ2gOfR/Fbcf52Fcx26eNzlS2OByS/bVF37bvg==","signatures":[{"sig":"MEUCIQC+pUDr8vYgQg1kGR/23nGxlNUnbdysMAnSaz4EwlyhpAIgD89pxuIXVl69UWFSuQhK3H4/jyLr4vRGuJTx/BOb4pc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":172781},"main":"./lib","engines":{"npm":"3.x","node":"5.x"},"gitHead":"19d571b41d0256186c48c7b654664047cd8833b2","scripts":{"test":"mocha --reporter spec --require test/bootstrap/node test/*.test.js test/**/*.test.js","eslint":"eslint lib/**/*.js test/**/*.js","sampleserver":"nodemon test/sampleServer/server.js"},"_npmUser":{"name":"isagroup_user","email":"isagroup.us@gmail.com"},"licenses":[{"url":"http://opensource.org/licenses/MIT","type":"MIT"}],"repository":{"url":"git+https://github.com/isa-group/SLA4OAI-node.git","type":"git"},"_npmVersion":"5.8.0","description":"SLA for Open API Initiative Library","directories":{},"_nodeVersion":"9.2.0","dependencies":{"express":"^4.16.3","js-yaml":"^3.11.0","request":"^2.85.0","winston":"^2.4.1","passport-github2":"^0.1.11","passport-facebook":"^2.1.1","passport-windowslive":"^1.0.2","passport-google-oauth":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^4.1.2","mocha":"^5.0.5","chai-connect-middleware":"^0.3.1"},"_npmOperationalInternal":{"tmp":"tmp/sla4oai-tools_1.2.8_1522749083076_0.9092859743526407","host":"s3://npm-registry-packages"}}},"time":{"created":"2016-09-14T08:37:50.439Z","modified":"2024-07-25T10:38:10.917Z","1.0.0":"2016-09-14T08:37:50.439Z","1.0.1":"2016-09-14T08:48:20.977Z","1.0.2":"2016-09-14T12:08:07.288Z","1.0.3":"2016-09-15T15:33:27.558Z","1.1.0":"2016-10-13T12:38:29.599Z","1.1.1":"2016-11-03T11:54:53.318Z","1.2.0":"2016-12-01T13:34:16.238Z","1.2.1":"2017-05-17T11:04:42.773Z","1.2.2":"2017-05-17T11:30:19.723Z","1.2.3":"2017-05-17T11:48:48.876Z","1.2.4":"2018-03-27T17:56:17.672Z","1.2.5":"2018-04-03T09:15:46.833Z","1.2.6":"2018-04-03T09:29:27.376Z","1.2.7":"2018-04-03T09:44:02.534Z","1.2.8":"2018-04-03T09:51:23.167Z"},"bugs":{"url":"https://github.com/isa-group/SLA4OAI-node/issues"},"license":"MIT","homepage":"https://github.com/isa-group/SLA4OAI-node","keywords":["oai","sla","swagger"],"repository":{"url":"git+https://github.com/isa-group/SLA4OAI-node.git","type":"git"},"description":"SLA for Open API Initiative Library","maintainers":[{"email":"mimbrero.alberto@gmail.com","name":"mimbrero"},{"email":"pafmon@gmail.com","name":"pafmon"},{"email":"isagroup.us@gmail.com","name":"isa-tecnico"},{"email":"isagroup.us@gmail.com","name":"isagroup_user"}],"readme":"# SLA4OAI (SLA for Open API Initiative) Library\r\n**SLA4OAI** is an open source library for applying SLA in your node application.\r\n\r\n**SLA4OAI** is [Express](http://expressjs.com/)-compatible SLA Checking and Monitoring middleware for [Node.js](http://nodejs.org/).\r\n\r\n**SLA4OAI** is based on [SLA for Open API Initiative Specification](https://github.com/isa-group/SLA4OAI-Specification/blob/master/README.md).\r\nAnd follows the [Basic SLA Management Service](https://github.com/isa-group/SLA4OAI-Specification/blob/master/operationalServices.md) proposal.\r\n\r\n## Install\r\n\r\n```javascript\r\n$ npm install sla4oai-tools --save\r\n```\r\n\r\n## Basic Usage\r\nYou can simply use the library by registering it with the Express app with your plans file as local:\r\n\r\n```javascript\r\nvar sla4oaiTools = require('sla4oai-tools'); //import\r\nvar slaManager = new sla4oaiTools(); //create a instance of slaManager\r\nvar app = express();\r\n\r\nvar configObj = {\r\n    sla4oai: __dirname + \"/petstore-plans.yaml\"\r\n};\r\n\r\nslaManager.initialize(app, configObj, function(slaManager, error){\r\n    //any callback actions\r\n    if(!error){\r\n        app.listen(9000);\r\n    }else{\r\n        console.log(error.toString());\r\n    }\r\n});\r\n```\r\n\r\n## API Reference\r\n## 1. SlaManager\r\n\r\n### initialize\r\nInitialize all library components as express middlewares. Called once when the server getting up.\r\n\r\n#### Parameters:\r\n\r\n| Name      | Type                                          | Description                                                                                                                                      |\r\n| :-------- | :-------------------------------------------- | :----------------------------------------------------------------------------------------------------------------------------------------------- |\r\n| app       | `Express`                                     | **Required** - The express app.                                                                                                                  |\r\n| configObj | [`ConfigurationObject`](#configurationObject) | **Required** - The configuration details for each components.                                                                                    |\r\n| callback  | `Function`                                    | **Required** - The callback function to be execute, it will recive two parameters: `slaManager` for post-configuration and `error` if it exists. |\r\n\r\n#### ConfigurationObject:\r\n\r\n| Name                 | Type                                    | Description                                                                                                                  |\r\n| :------------------- | :-------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------- |\r\n| sla4oai              | `string`                                | **Required** The URL or file path to the sla4oai document                                                                    |\r\n| sla4oaiUI            | [`Sla4oaiUIObject`](#sla4oaiUIObject)   | **Optional** Object which contains the Sla4oaiUI component configuration                                                     |\r\n| supervisorConnection | [`ConnectionObject`](#connectionObject) | **Optional** The connection details for Supervisor and ScopeResolver. By default it get the connection from Sla4oai document |\r\n| monitorConnection    | [`ConnectionObject`](#connectionObject) | **Optional** The connection details for Monitor component. By default it get the connection from Sla4oai document            |\r\n\r\n#### ConnectionObject:\r\n\r\n| Name | Type     | Description |\r\n| :--- | :------- | :---------- |\r\n| url  | `string` | Host url.   |\r\n\r\n#### Sla4oaiUIOptions:\r\n\r\n| Name                  | Type     | Description                                                                                            |\r\n| :-------------------- | :------- | :----------------------------------------------------------------------------------------------------- |\r\n| path                  | `string` | **Optional**  Middleware will be allocated on this path.  By default `/plans`.                         |\r\n| portalSuccessRedirect | `string` | **Optional** URL where UI will redirect when result is successful. `/docs` by default.                 |\r\n| portalURL             | `string` | **Optional** In case you have a own portal that is served in other server, URL where portal is served. |\r\n\r\n**Example:**\r\n\r\n```javascript\r\nvar sla4oaiTools = require('sla4oai-tools'); //import\r\nvar slaManager = new sla4oaiTools(); //create a instance of slaManager\r\nvar app = express();\r\n\r\nvar configObj = {\r\n    sla4oai: __dirname + \"/petstore-plans.yaml\",\r\n    sla4oaiUI: {\r\n        path: \"/plans\",\r\n        portalSuccessRedirect: \"/pets\",\r\n        portalUrl: null\r\n    },\r\n    supervisorConnection: {\r\n        url: 'http://supervisor.oai.governify.io/api/v2'\r\n    },\r\n    monitorConnection: {\r\n        url: 'http://monitor.oai.governify.io/api/v1'\r\n    }\r\n}\r\n\r\nslaManager.initialize(app, configObj, function(slaManager, error){\r\n    //any callback actions\r\n    if(!error){\r\n        app.listen(9000);\r\n    }else{\r\n        console.log(error.toString());\r\n    }\r\n});\r\n```\r\n\r\n## 2. Scope Resolver\r\n\r\n### configure\r\nUse this method to set the configuration parameters of the Scope Resolver.\r\n\r\n#### Configuration parameters:\r\n\r\n| Name                 | Type                                                  | Description                                                                                                         |\r\n| :------------------- | :---------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------ |\r\n| notCheckByDefault    | `boolean`                                             | Decides if it uses a list of default paths that don't need checking. By default `true` and `[\"/docs\", \"/api-docs\"]` |\r\n| defaultOAuthProvider | `string`                                              | The default provider when **oauthprovider** is missing in the request header.                                       |\r\n| config               | [`<provider, OAuthConfigObject>`](#oauthconfigobject) | OAuth provider configurations.                                                                                      |\r\n\r\n#### OAuthConfigObject:\r\n\r\n| Name         | Type     | Description                                          |\r\n| :----------- | :------- | :--------------------------------------------------- |\r\n| clientId     | `string` | The provider application id.                         |\r\n| clientSecret | `string` | The provider application secret.                     |\r\n| callbackURL  | `string` | The callback registered in the provider application. |\r\n\r\n**Example:**\r\n\r\n```javascript\r\nvar options = {\r\n\tdefaultOAuthProvider: 'google',\r\n    config: {\r\n        google: {\r\n\t        clientId: '6076-d1m.apps.googleusercontent.com',\r\n            clientSecret: '1lWx9DDDaPo9kxF4yu6t_loJ',\r\n            callbackURL: 'https://app.myservice.com/google/callback'\r\n        }\r\n    }\r\n};\r\nslaManager.scopeResolver.configure(options);\r\n```\r\n\r\n### getAccountName\r\nUse this method to get the account name from the OAuth provider by the specified token.\r\n\r\n**Example:**\r\n\r\n```javascript\r\nslaManager.scopeResolver.getAccountName(oauthProvider, token, function (err, accountName) {\r\n    // get accountName\r\n});\r\n```\r\n\r\n### getAccountScope\r\nUsing this method to get the scope object from the supervisor by the specifying the apikey or the account name.\r\n\r\n**Example:**\r\n\r\n```javascript\r\nslaManager.scopeResolver.getAccountScope('apikey', 'NbfiS7wjwjwb=', function (err, result) {\r\n\t// get result.scope\r\n});\r\n//or\r\nslaManager.scopeResolver.getAccountScope('account', 'john@tenant.com', function (err, result) {\r\n\t// get result.scope\r\n});\r\n```\r\n\r\n### OAuth Providers\r\nUsing the powerful PassportJS framework and family of plugins **SLA4OAI** can be configured to support the following providers:\r\n\r\n- [Google](https://console.developers.google.com)\r\n- [Facebook](https://developers.facebook.com)\r\n- [WindowsLive](https://account.live.com/developers/applications/index)\r\n- [Github](https://github.com/settings/developers)\r\n\r\n## 3. Bouncer\r\n\r\n### configure\r\nUse this method to set the configuration parameters of the Bouncer.\r\n\r\n#### Configuration parameters:\r\n\r\n| Name              | Type      | Description                                                                                                         |\r\n| :---------------- | :-------- | :------------------------------------------------------------------------------------------------------------------ |\r\n| environment       | `string`  | The deploying environment (devel, qa, or production).                                                               |\r\n| notCheckByDefault | `boolean` | Decides if it uses a list of default paths that don't need checking. By default `true` and `[\"/docs\", \"/api-docs\"]` |\r\n**Example:**\r\n\r\n```javascript\r\nvar options = {\r\n\tenvironment: 'qa'\r\n};\r\nslaManager.bouncer.configure(options);\r\n```\r\n\r\n### needChecking\r\nBy default, all incoming requests are verified by SLA Check, but you can customize this behaviour and specify which requests need checking in both bouncer and scopeResolver components.\r\n\r\n**Example:**\r\n\r\n```javascript\r\nslaManager.bouncer.needChecking = function(req) {\r\n    if (req.originalUrl.startsWith('/api/')) {\r\n        return true;\r\n    }\r\n    return false;\r\n}\r\n\r\nslaManager.scopeResolver.needChecking = function(req) {\r\n     if (req.originalUrl.startsWith('/api/')) {\r\n        return true;\r\n    }\r\n    return false;\r\n}\r\n```\r\n\r\n### decline\r\nBy default, bouncer declines all not accepted requested with status code `403` and the body that comes from the Supervisor. But you can customize the decline response message.\r\n\r\n**Example:**\r\n\r\n```javascript\r\nslaManager.bouncer.decline = function(req, res, next, supervisorPayload) {\r\n    if(supervisorPayload.reason === 'Too many requests') {\r\n        res.status(429).json(supervisorPayload.reason).end();\r\n    }\r\n    else {\r\n        res.status(403).json(supervisorPayload).end();\r\n    }\r\n}\r\n```\r\n\r\n### resolveMetrics\r\nIn order to resolve the required metrics for the check API, you need to define `resolveMetrics` function and return all metrics in single object.\r\n\r\n**Example:**\r\n\r\n```javascript\r\nslaManager.bouncer.resolveMetrics = function (requestedMetrics, req) {\r\n    return {\r\n        nameLegth: 12\r\n    };\r\n};\r\n```\r\n\r\n## 3. Reporter\r\n\r\n### configure\r\nUse this method to set the configuration parameters of the Reporter.\r\n\r\n#### Configuration parameters:\r\n\r\n| Name              | Type      | Description                                                                                                                                                                                              |\r\n| :---------------- | :-------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\r\n| autoReport        | `boolean` | In case of `true`, all API calls will be reported one by one, else the developer can aggregate multiple API calls in one report (default = true).                                                        |\r\n| aggregate         | `boolean` | Aggregate multiple measures in one report, this aggregated measures will be frequently sended based on the `aggregationPeriod` (default = false). *This features is disabled if the autoReport = false*. |\r\n| aggregationPeriod | `double`  | All requests during this period will be aggregated in one report. It is calculated in milliseconds.                                                                                                      |\r\n| cluster           | `string`  | The cluster that process this API.                                                                                                                                                                       |\r\n| environment       | `string`  | The deploying environment (devel, qa, or production).                                                                                                                                                    |\r\n\r\n**Example:**\r\n\r\n```javascript\r\nvar options = {\r\n\tautoReport: true,\r\n\taggregate: true,\r\n\taggregationPeriod: 100,\r\n\tcluster: 'cl1.acme.com',\r\n    environment: 'qa'\r\n};\r\n\r\nslaManager.reporter.configure(options);\r\n```\r\n\r\n### reportMetrics\r\nIn case of `autoReport=false`, the developer will have the responsibility to call this method to report the aggregated metrics.\r\n\r\n**Example:**\r\n\r\n```javascript\r\nslaManager.reporter.reportMetrics();\r\n```\r\n\r\n### setMetric\r\nAt any stage of the API logic, the developer can set a custom metric by simply passing its name and value.\r\n\r\n**Example:**\r\n\r\n```javascript\r\nslaManager.reporter.setMetric(req, 'animalTypes', records.length);\r\n```\r\n\r\n### preCalculateMetrics\r\nThis method enables the developer to set the metrics that need to be calculated **before** the API logic.\r\n\r\n**Example:**\r\n\r\n```javascript\r\nslaManager.reporter.preCalculateMetrics = function(requestedMetrics, req, next) {\r\n    req.sla.metrics['x-origin'] = req.headers['origin'];\r\n    next();\r\n};\r\n```\r\n\r\n### postCalculateMetrics\r\nThis method enables the developer to set the metrics that need to be calculated **after** the API logic.\r\n\r\n**Example:**\r\n\r\n```javascript\r\nslaManager.reporter.postCalculateMetrics = function(requestedMetrics, req, res, next) {\r\n    req.sla.metrics['x-animalType'] = getAnimalTypes(res.Body);\r\n    next();\r\n};\r\n```\r\n\r\n## Predefined metrics\r\n\r\n- **responseTime**: The API processing time.\r\n- **requestBody**: The body of the request.\r\n- **responseHeaders**: The headers of the request.\r\n- **responseBody**: The body of the response.\r\n- **userAgent**: Some information about the browser and operating system of the API consumer.\r\n\r\n## 4. Sla4oaiUI\r\nThis component makes UI where `plans.yaml` document is represented on an user interface way.\r\n\r\n**Example**\r\n\r\n```javascript\r\n\r\nvar configObj = {\r\n    sla4oai: __dirname + \"/petstore-plans.yaml\",\r\n    sla4oaiUI: {\r\n        portalSuccessRedirect: \"/pets\"\r\n    }\r\n}\r\n\r\n\r\nslaManager.initialize(app, configObj, function(slaManager, error){\r\n    //any callback actions\r\n    if(!error){\r\n        app.listen(9000);\r\n    }else{\r\n        console.log(error.toString());\r\n    }\r\n});\r\n\r\n```\r\n\r\n## 5. Winston\r\n\r\n**SLA4OAI** uses [Winston](https://github.com/winstonjs/winston) to log all SLA connection activities.\r\nYou can customize the Winston logging behaviour by accessing `slaManager.winston` object.\r\n\r\n**Example:**\r\nIn the following example we change the logging from the Console to the file system:\r\n\r\n```\r\nslaManager.winston.add(slaManager.winston.transports.File, { filename: 'somefile.log' });\r\nslaManager.winston.remove(slaManager.winston.transports.Console);\r\n```\r\n","readmeFilename":"README.md"}