{"_id":"@avoladecision/avola-client","_rev":"8-9a09a0d268ae7f5e31c2931364026c7e","time":{"1.0.2":"2018-06-18T12:05:34.030Z","created":"2018-06-18T12:07:32.053Z","1.0.3":"2018-06-18T12:07:32.220Z","modified":"2022-04-04T16:48:46.571Z"},"name":"@avoladecision/avola-client","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.3":{"name":"@avoladecision/avola-client","version":"1.0.3","description":"Avola Decision client to execute and synchronize your decisions","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsc","test":"mocha --reporter spec","buildtest":"cls && tsc && mocha --reporter spec"},"repository":{"type":"git","url":"git+https://github.com/Avola/avola-client-npm.git"},"author":{"name":"Avola Decision"},"license":"ISC","bugs":{"url":"https://github.com/Avola/avola-client-npm/issues"},"homepage":"https://github.com/Avola/avola-client-npm#readme","devDependencies":{"@types/promise":"^7.1.30","@types/request":"^2.47.0","chai":"^4.1.2","mocha":"^5.2.0","typescript":"^2.9.1"},"dependencies":{"@types/simple-oauth2":"^1.1.1","promise":"^8.0.1","request":"^2.87.0","simple-oauth2":"^2.2.0"},"gitHead":"5c673970ea48de1f50558e5d2796d300b67c5afa","_id":"@avoladecision/avola-client@1.0.3","_npmVersion":"5.6.0","_nodeVersion":"9.8.0","_npmUser":{"name":"davn","email":"davy.daenen@avo.la"},"dist":{"integrity":"sha512-DtfDt5H5985xK3GpsKG/NBsKD9T+CMFfOSMvPd8p0QkKsMu7ZLxAv2u9M1UmrlndXBq3VXwTwy7ZP9MHLCrJBQ==","shasum":"dd5b5e5ff60c8cac3088ee2ceab8d8bff298fa93","tarball":"https://registry.npmjs.org/@avoladecision/avola-client/-/avola-client-1.0.3.tgz","fileCount":8,"unpackedSize":23744,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbJ6CFCRA9TVsSAnZWagAAh9UP/jsO4NFp6wxkjVILRAsP\n15gsrS+62pEcdpAcNz/I7B/4hT27vO1ORxs5pPCffp4VWzoeFTiPLjBJqPAv\nAqU9kGWrn1blcF/I0/MOUGrA+HUuOGEiZkN5ZH0Gim7RBAZgiv8QvBmDzDTE\nNJUVJspmp+nMKyi0iBiDj90YqkBeU28XiyVvLEaU4QvugcO+bSiheIT28J28\nq1PhcbHZMK0s/Bv7pQoAVa2y9pq3YluKR/HsuLOU7aljlz41rw7T+M1udRrp\nA7BN1sdlCLpSCjy6fvdKAdOaysoW+hAty3ZDRiGbCH0TgvZ3KIaN1yorCh1j\nB2JtNhyffAF7PTIdQBzOGWBaXbm5sQ4zR7vSWXO7gvYul1DcEg+62ZmQ6Cc+\nj6M69xrh6ZdcngmpDLu51qV+8TaP8Z6uEv4toURneLfKIGmEkI2Tt27VlbTj\nKlMcR2IzLexx+wBoaO8o3d5CfzEQDs2C0vY+gAfTl19hFoAvAUdRcP2Rg1Iu\nNZxQRiZCWbulm5T0ua6cQto4c+xTGlYDRInFUwoDX2HEmyazRrQmC1+evPrh\noxZ10edudFXU6xKGllUPTZj8+7VEZSwTm/T26XDF2FCsb/xod8DwHd60pHjP\nQYakX93ye+PkziLTispH7B1A2p6+IKEGV4VFo/FXhZY9qe0hWCAgZcZ/Sfrq\nzpeb\r\n=EX3u\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA734uo9joCzyZUpI1aDWgn0P7kN4zs6apyNMn4Y77DkAiBwZ8RqX3aHrXPcrWe2tQQ6J5cNpk64O5f804hNOV6Cvg=="}]},"maintainers":[{"name":"davn","email":"davy.daenen@avo.la"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/avola-client_1.0.3_1529323652140_0.635594008593962"},"_hasShrinkwrap":false}},"maintainers":[{"name":"davn","email":"davy.daenen@avo.la"}],"description":"Avola Decision client to execute and synchronize your decisions","homepage":"https://github.com/Avola/avola-client-npm#readme","repository":{"type":"git","url":"git+https://github.com/Avola/avola-client-npm.git"},"author":{"name":"Avola Decision"},"bugs":{"url":"https://github.com/Avola/avola-client-npm/issues"},"license":"ISC","readme":"<img src=\"https://upload.wikimedia.org/wikipedia/commons/thumb/d/db/Npm-logo.svg/2000px-Npm-logo.svg.png\" alt=\"npm logo\" width=\"150\" height=\"50\" /> [![Build Status](https://travis-ci.org/Avola/avola-client-npm.svg?branch=master)](https://travis-ci.org/Avola/avola-client-npm)\r\n\r\n# avola-client :package: \r\nAvola Decision client package to execute and synchronize your decisions with an ease. This package is for any developer looking for an easy solution to connect Avola Decision with their software. Also check out our other packages and definitely [read our api documentation](https://docs.avo.la) if something is not clear.\r\n\r\n## Requirements\r\n* A valid Avola Decision account - don't have an account? Find out the very basics [by creating a free account](https://free.avo.la)\r\n* In Avola, you need to create an API account (save the clientid and secret) - For free user check the my account page\r\n* Your custom company endpoint ex: https://companyxyz.api.avo.la - For free user: https://free.api.avo.la\r\n* Your token host: you can find this at /api/settings on your custom company api endpoint - For free user it is optional and already defaults to https://free.auth.avo.la\r\n\r\n## Installation \r\n```sh\r\nnpm install @avoladecision/avola-client --save\r\n```\r\ntodo:\r\nyarn add avola-client\r\nbower install avola-client --save\r\n## Usage\r\n### Javascript\r\n```javascript\r\nvar Avola = require('@avoladecision/avola-client');\r\n\r\n// Create client with base url of the Avola Decision api and your apikey\r\nvar avolaclient = new avola.AvolaClient('https://free.api.avo.la', 'replacewithclientid', \r\n                                               'replacewithclientsecret', 'optionaltokenhost');\r\n\r\nclient.getSettings().then((settings) => {\r\n  console.log(\"settings\", settings);\r\n  var mysettings = settings;\r\n});\r\n```\r\n\r\n### TypeScript\r\n```typescript\r\nimport { AvolaClient } from '@avoladecision/avola-client';\r\n\r\nlet avolaclient = new Avolaclient('https://free.api.avo.la', 'replacewithclientid',\r\n                                              'replacewithclientsecret', 'optionaltokenhost');\r\n\r\navolaclient.getSettings().then((settings) => {\r\n  console.log(\"settings\", settings);\r\n  let mysettings = settings;\r\n});\r\n```\r\n\r\n```sh\r\nOutput should be the settings of the Api\r\n```\r\n### Available methods\r\n\r\n| name          | description   | In Free?  |\r\n| ------------- |:-------------:| ---------:|\r\n| getSettings()      | Will return the settings of the API. This describes certain endpoints and info. |  :white_check_mark:    |\r\n| getDecisionServices(decisionServiceId?: number)      | Will return you the list and details of all decision services and their version without parameters. With decisionServiceId: will return you the versions and details of a specific decision service.      |        |\r\n| getDecisionServiceVersions(decisionServiceId: number, version: number) | Will return you the details of a specific decision service version.      |        |\r\n| executeDecisionServiceVersion(executionRequest: Execution.ApiExecutionRequest)      | Execute a descision service version, this returns all conclusions, from all decisions in the decision service. |      |\r\n| executeDecisionFree(freerequest: Execution.FreeExecutionRequest)      | Execute a decision. This function is only available if you are a Free user and doesn't support the full power of versioned execution. |  :white_check_mark:    |\r\n\r\n## Contribute :star: :star: :star:\r\nWant to contribute to this package?\r\n1) Clone the repo\r\n\r\n2) Install dependencies\r\n```sh\r\nnpm install\r\n```\r\n3) Edit files in lib/\r\n\r\n4) Build\r\n```sh\r\nnpm run build\r\n```\r\n5) Create a pull request\r\n\r\n### Test & Build\r\n```sh\r\nnpm run test\r\n```\r\n\r\nTo build and run the tests\r\n```sh\r\nnpm run buildtest\r\n```","readmeFilename":"README.md"}