{"_id":"@ecolytiq-team/ecolytiq-sdk","_rev":"6-0f64f9732f2fb8500dac94ce76b387bd","name":"@ecolytiq-team/ecolytiq-sdk","dist-tags":{"beta":"0.0.2-beta.5","latest":"2.3.2"},"versions":{"0.0.2-beta.5":{"name":"@ecolytiq-team/ecolytiq-sdk","version":"0.0.2-beta.5","description":"Ecolytiq Transaction API SDK","license":"Apache-2.0","author":{"name":"celloon","email":"info@ecolytiq.com"},"repository":{"type":"git","url":"git://github.com/ecolytiq-team/ecolytiq-SDK-npm.git"},"main":"./dist/umd/index.js","module":"./dist/esm/index.js","types":"./dist/typings/index.d.ts","scripts":{"test":"echo \"Error: no test specified\" && exit 1","tsc-check":"node node_modules/typescript/bin/tsc --noEmit","lint":"node node_modules/eslint/bin/eslint.js --ext js,jsx,ts,tsx src/index.ts src/","check-formatting":"node ./node_modules/.bin/prettier --check \"src/**/*.{js,jsx,ts,tsx,json,css,scss,md}\"","check":"npm run check-formatting && npm run tsc-check && npm run lint","format":"node ./node_modules/.bin/prettier --write \"src/**/*.{js,jsx,ts,tsx,json,css,scss,md}\"","build":"tsc && webpack --mode=production","build-dev":"tsc && webpack --mode=development","clean":"rm -rf dist/","prepare":"npm run build"},"devDependencies":{"@babel/core":"^7.13.16","@babel/plugin-transform-runtime":"^7.13.15","@babel/preset-env":"^7.13.15","@typescript-eslint/eslint-plugin":"^4.22.0","@typescript-eslint/parser":"^4.22.0","babel-loader":"^8.2.2","eslint":"^7.25.0","isomorphic-fetch":"^3.0.0","prettier":"^2.2.1","typescript":"^4.2.4","webpack":"^4.46.0","webpack-cli":"^4.6.0"},"eslintConfig":{"parser":"@typescript-eslint/parser","plugins":["@typescript-eslint"],"extends":["eslint:recommended","plugin:@typescript-eslint/recommended"],"rules":{"@typescript-eslint/no-inferrable-types":[0]}},"gitHead":"dbfe9611db916e66a2d60b77a58c8e99f8b51f90","bugs":{"url":"https://github.com/ecolytiq-team/ecolytiq-SDK-npm/issues"},"homepage":"https://github.com/ecolytiq-team/ecolytiq-SDK-npm#readme","_id":"@ecolytiq-team/ecolytiq-sdk@0.0.2-beta.5","_nodeVersion":"14.17.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-QJiimFrE19jQq9sdu/rrLr9+4VhADAeuBZ3zCtDaJaX7U8afy4niVoCh7hDn5oZvBDSIBP6KMDGO6PaU4QsEew==","shasum":"abeb41ae5d8a5e51950106cd5adbc4947d99a384","tarball":"https://registry.npmjs.org/@ecolytiq-team/ecolytiq-sdk/-/ecolytiq-sdk-0.0.2-beta.5.tgz","fileCount":81,"unpackedSize":280020,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg5qRyCRA9TVsSAnZWagAAZeAP/RkYRMHc0vm5sohQ4mCM\nosAEcIlx/VZiqq73iwPoz9af8dlmkSFJkYDHKBTnFx0QLP63g0tNNHYE6csa\nIpxZtwFGNYUfPdGqoYJGUskwp2eHvhB71jyWnEg8EfkATgFwT/CW1ES6FFWN\n3xTnLWdazIbLr4adgkJfvkiHsrOoHl2HeH169o0LiPj7+mTYjGJ36sOHBxeQ\nKYUArzLuuWigWNWHDOZMh2eBaKEDti0B3NkWUhu0qzfPPBL3C29A66SJ6ay5\n7tq1zmkDGLHPKAe0HjBlfAad7aGbC9wLf4tFVsVUtoDyRDLNvClGCQlLUK/z\nDK71sRczF+HmPfAfIFi11hpj67ygH2e7cCB5JHHzoHsDOkIKwZleAuSHlQP2\nGdHS34NnQ6ruOQO/DgeJp2Me3erIfZAz0JBXIW9PV32BBemC+gB4ZV20npWT\nrkE/J14RPFFoMds+meWoV1MeGdDSrog4ft4w588UY7lnvLXfMhFuqO8GD1L/\nDXE53eQM8F3pL+dCSqqEiCjEW5ACmiI2DuS83/WRt+kYv+/jfcozQx1lwCiI\nu1wOS7kng2W9A50eMXUah1lYuRXKXeGpLvCNBwjjTNBK8qD7nggLjpMLamCH\nNzsRrIuO6FLXR7sgvLBkvSu8huk4HlXPYhL6DKi/ftVemsbhrXpmQJG4kjHo\nIWzw\r\n=zKXN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCHVydnuwAmrMCmkKmw22W+ZmDrReqADP3MGzdDd+q0MwIhAKxVrTip+QQ4yTd8niVaxmG9/QxX4sQfPhg8/sukRtO5"}]},"_npmUser":{"name":"thomas.thephasdin.ecolytiq","email":"thomas.thephasdin@ecolytiq.com"},"directories":{},"maintainers":[{"name":"thomas.thephasdin.ecolytiq","email":"thomas.thephasdin@ecolytiq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ecolytiq-sdk_0.0.2-beta.5_1625728113874_0.35038507926883855"},"_hasShrinkwrap":false},"2.3.0":{"name":"@ecolytiq-team/ecolytiq-sdk","version":"2.3.0","description":"Ecolytiq Transaction API SDK","license":"Apache-2.0","author":{"name":"celloon","email":"info@ecolytiq.com"},"repository":{"type":"git","url":"git://github.com/ecolytiq-team/ecolytiq-SDK-npm.git"},"main":"./dist/umd/index.js","module":"./dist/esm/index.js","types":"./dist/typings/index.d.ts","scripts":{"test":"echo \"Error: no test specified\" && exit 1","tsc-check":"node node_modules/typescript/bin/tsc --noEmit","lint":"node node_modules/eslint/bin/eslint.js --ext js,jsx,ts,tsx src/index.ts src/","check-formatting":"node ./node_modules/.bin/prettier --check \"src/**/*.{js,jsx,ts,tsx,json,css,scss,md}\"","check":"npm run check-formatting && npm run tsc-check && npm run lint","format":"node ./node_modules/.bin/prettier --write \"src/**/*.{js,jsx,ts,tsx,json,css,scss,md}\"","build":"tsc && webpack --mode=production","build-dev":"tsc && webpack --mode=development","clean":"rm -rf dist/","prepare":"npm run build"},"devDependencies":{"@babel/core":"^7.13.16","@babel/plugin-transform-runtime":"^7.13.15","@babel/preset-env":"^7.13.15","@typescript-eslint/eslint-plugin":"^4.22.0","@typescript-eslint/parser":"^4.22.0","babel-loader":"^8.2.2","eslint":"^7.25.0","isomorphic-fetch":"^3.0.0","prettier":"^2.2.1","typescript":"^4.2.4","webpack":"^4.46.0","webpack-cli":"^4.6.0"},"eslintConfig":{"parser":"@typescript-eslint/parser","plugins":["@typescript-eslint"],"extends":["eslint:recommended","plugin:@typescript-eslint/recommended"],"rules":{"@typescript-eslint/no-inferrable-types":[0]}},"gitHead":"053c9870526533c8b0809474322f800983d242c7","bugs":{"url":"https://github.com/ecolytiq-team/ecolytiq-SDK-npm/issues"},"homepage":"https://github.com/ecolytiq-team/ecolytiq-SDK-npm#readme","_id":"@ecolytiq-team/ecolytiq-sdk@2.3.0","_nodeVersion":"14.17.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-Ei4elPCjKEnhWT2zyhFXdwOBIy5I3kOX+WZfOjNY7bYJ/A5bSocZVnu6x7DzdpHt6Nvza0NDLjp5+CNe43jWIQ==","shasum":"0f14aa5a04176792b9f875959d051bf7b9b16560","tarball":"https://registry.npmjs.org/@ecolytiq-team/ecolytiq-sdk/-/ecolytiq-sdk-2.3.0.tgz","fileCount":81,"unpackedSize":280055,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg5r8TCRA9TVsSAnZWagAAVSIP/1clxNqeGgGPnfxzj8jx\n8pwj40hbZaRWI/Ha/urTgU0DiL+J2Bl3MnWcIJqsIHoQbywZhgmpvlU9W1Ln\ntqSeo4jR3rKI0eluaUQwRH+lKkz2cEyhsxg/sqY+t3V25ilD6aEjlO9S/EbB\nd9NT6GInLwMJIdtxzHlUzkMnNJ146q+IqWJKMFU19e9rHZsPAl4nh6ljqRiS\nRWQN2+0mCsH3gCAHjqfSa4JRzpKaimc86R/T8VNcHrPd+uxouDK5kHI9jQOO\nNZvPqjfslHBAv6RHp2+j3h6APuQSglWaKrlmusVdXQdB9IfsiTmaZxYOfJez\nwP8unfn5iTKGPWU/lRfONV1FX4xzhYuhz2/Er+MfufXO/uq/sJzOQQ43m9z/\nxdI1iRCu9CBFXquWboNKhmMKhY99LxgPXixh70DsUhjQisD03blhQ58d6lqj\n/QXS5dwmJRdz546jQEaiWcVghjgBUPWRUSa43BOBvWQpa0f4lVqlYdy5Ravk\nkZ4T96TPEeZGKgSzt2qeZPfI63HC5SKPE9v8D65aIooIatlx2l+iWca6sOv6\nK9wBrmiuS8xa9EVPmTB5ed7UBSqGLnDujDNdX+i/zqgKElBIoIV9YRs3Zpbl\nk6KlbxozQOiXPHRNvtm5MRm5baTFOHWlir99UKqRXYKXVMImli83nU1kD0FY\n+gH+\r\n=55HV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCg/vW25f+J6kOhg24lF86TJWRstkQlWDo9zrBmd9D5lAIgDuq4odgKbOteDs66aeUr/ulLV1ufDXXOROkwgLHU/QY="}]},"_npmUser":{"name":"thomas.thephasdin.ecolytiq","email":"thomas.thephasdin@ecolytiq.com"},"directories":{},"maintainers":[{"name":"daqua","email":"daniel.quanz@ecolytiq.com"},{"name":"thomas.thephasdin.ecolytiq","email":"thomas.thephasdin@ecolytiq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ecolytiq-sdk_2.3.0_1625734930666_0.52849615567393"},"_hasShrinkwrap":false},"2.3.1":{"name":"@ecolytiq-team/ecolytiq-sdk","version":"2.3.1","description":"Ecolytiq Transaction API SDK","license":"Apache-2.0","author":{"name":"celloon","email":"info@ecolytiq.com"},"repository":{"type":"git","url":"git://github.com/ecolytiq-team/ecolytiq-SDK-npm.git"},"main":"./dist/umd/index.js","module":"./dist/esm/index.js","types":"./dist/typings/index.d.ts","scripts":{"test":"echo \"Error: no test specified\" && exit 1","tsc-check":"node node_modules/typescript/bin/tsc --noEmit","lint":"node node_modules/eslint/bin/eslint.js --ext js,jsx,ts,tsx src/index.ts src/","check-formatting":"node ./node_modules/.bin/prettier --check \"src/**/*.{js,jsx,ts,tsx,json,css,scss,md}\"","check":"npm run check-formatting && npm run tsc-check && npm run lint","format":"node ./node_modules/.bin/prettier --write \"src/**/*.{js,jsx,ts,tsx,json,css,scss,md}\"","build":"tsc && webpack --mode=production","build-dev":"tsc && webpack --mode=development","clean":"rm -rf dist/","prepare":"npm run build"},"devDependencies":{"@babel/core":"^7.13.16","@babel/plugin-transform-runtime":"^7.13.15","@babel/preset-env":"^7.13.15","@typescript-eslint/eslint-plugin":"^4.22.0","@typescript-eslint/parser":"^4.22.0","babel-loader":"^8.2.2","eslint":"^7.25.0","isomorphic-fetch":"^3.0.0","prettier":"^2.2.1","typescript":"^4.2.4","webpack":"^4.46.0","webpack-cli":"^4.6.0"},"eslintConfig":{"parser":"@typescript-eslint/parser","plugins":["@typescript-eslint"],"extends":["eslint:recommended","plugin:@typescript-eslint/recommended"],"rules":{"@typescript-eslint/no-inferrable-types":[0]}},"gitHead":"48ba669a54c8ec7b908c345add4d05ad20a25711","bugs":{"url":"https://github.com/ecolytiq-team/ecolytiq-SDK-npm/issues"},"homepage":"https://github.com/ecolytiq-team/ecolytiq-SDK-npm#readme","_id":"@ecolytiq-team/ecolytiq-sdk@2.3.1","_nodeVersion":"14.17.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-RmvS6v6LRHYTraYEpuM0QQLJYJX0tyBA1HQchQa12BW+ME6FDB7e4uVGiKmMhnQwfplNE8moO5f/iDKjp1VKgw==","shasum":"366af82932e31a0db6e63f978328b37a0da154d2","tarball":"https://registry.npmjs.org/@ecolytiq-team/ecolytiq-sdk/-/ecolytiq-sdk-2.3.1.tgz","fileCount":82,"unpackedSize":280918,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg7XACCRA9TVsSAnZWagAAr7oP/3qvPe2Ge5KY7eC8ynDi\n9aQGrhuoHcTgRVSejOSn17Jqg6SkvELZbJxwXMdykoMXhjlq66FhxvnMNb51\nIU6orwCruGobEgLppeT0k0Gxof9piUHwXUMEROHtl4g0D917tbBjZTBv6vjF\nIJRmZB5fSGtYYh9+kWb+VOlYuEJ8+X5KIhEq/Kk6fsXICPCiXloP1UpTeHKY\nufDGnsdxvYppMBnBlSFASIh0KdGwH9UycSYIP+0Z2+8ajXe5QxmfdVAyhOvL\nMi3JCZeLD8DiFPk+7hDgvZcDmwof+KxLKz9I/2BxFvImpfgrKxo75qtf2aNm\ndOCBYJRGHtUFpMvseSOAWCI35v3+kMY73dmda4E2MCHN77lSPJ4urpUuUrhQ\ni3Yf9kikjq6o1pJnFPnpxaeWRuWZm9O8X51oly3DggfNLekfkdRQ+rL3w8ae\n/yWXCZtdw5E/9/supETFq0HTdTjYuoqMy6AUfbrJr1B8hBWHZpIVhBC9i1+s\nx9/sjiSDtQla77/MJv0CuKj3Ts1RvWjEa16ExlFk+nKT1+8VATGJPT4zpjkX\nvSUUdpkidBydK4ihyU2xKO6pwuGfWEw51m41sTBm1Y53Oeg1st8Yx+Y6DHKH\nxMXX+z+/BDfRj8pyUOg29FKVELCJbTjiC4u4Hu3ut7CjYbQtJ51949/+KcXA\nZtH6\r\n=RiO8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDi5VgqoSb7ZwhAYWy66podi8it8NW6XvwEcAy6S8972AIgNXOpC2ACPKlbCIUbUpScrPHgDYnOVgZ/oaJAZcM8BdM="}]},"_npmUser":{"name":"thomas.thephasdin.ecolytiq","email":"thomas.thephasdin@ecolytiq.com"},"directories":{},"maintainers":[{"name":"makadev","email":"sigsegv@makadev.de"},{"name":"daqua","email":"daniel.quanz@ecolytiq.com"},{"name":"thomas.thephasdin.ecolytiq","email":"thomas.thephasdin@ecolytiq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ecolytiq-sdk_2.3.1_1626173441692_0.7409455425420246"},"_hasShrinkwrap":false},"2.3.2":{"name":"@ecolytiq-team/ecolytiq-sdk","version":"2.3.2","description":"Ecolytiq Transaction API SDK","license":"Apache-2.0","author":{"name":"celloon","email":"info@ecolytiq.com"},"repository":{"type":"git","url":"git://github.com/ecolytiq-team/ecolytiq-SDK-npm.git"},"main":"./dist/umd/index.js","module":"./dist/esm/index.js","types":"./dist/typings/index.d.ts","scripts":{"test":"echo \"Error: no test specified\" && exit 1","update-readme":"npx markdown-toc-gen insert README.md","tsc-check":"node node_modules/typescript/bin/tsc --noEmit","lint":"node node_modules/eslint/bin/eslint.js --ext js,jsx,ts,tsx src/index.ts src/","check-formatting":"node ./node_modules/.bin/prettier --check \"src/**/*.{js,jsx,ts,tsx,json,css,scss,md}\"","check":"npm run check-formatting && npm run tsc-check && npm run lint","format":"node ./node_modules/.bin/prettier --write \"src/**/*.{js,jsx,ts,tsx,json,css,scss,md}\"","build":"tsc && webpack --mode=production","build-dev":"tsc && webpack --mode=development","clean":"rm -rf dist/","prepare":"npm run build"},"devDependencies":{"@babel/core":"^7.13.16","@babel/plugin-transform-runtime":"^7.13.15","@babel/preset-env":"^7.13.15","@types/node":"^16.3.2","@typescript-eslint/eslint-plugin":"^4.22.0","@typescript-eslint/parser":"^4.22.0","babel-loader":"^8.2.2","eslint":"^7.25.0","isomorphic-fetch":"^3.0.0","prettier":"^2.2.1","typescript":"^4.2.4","webpack":"^4.46.0","webpack-cli":"^4.6.0"},"eslintConfig":{"parser":"@typescript-eslint/parser","plugins":["@typescript-eslint"],"extends":["eslint:recommended","plugin:@typescript-eslint/recommended"],"rules":{"@typescript-eslint/no-inferrable-types":[0]}},"gitHead":"ef2edaf8e81f2bffbed679b247c7bca12f056bba","bugs":{"url":"https://github.com/ecolytiq-team/ecolytiq-SDK-npm/issues"},"homepage":"https://github.com/ecolytiq-team/ecolytiq-SDK-npm#readme","_id":"@ecolytiq-team/ecolytiq-sdk@2.3.2","_nodeVersion":"14.17.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-5dG58TaZfzrE3P5U0FDGwdYQbP+ZvgKdgq9veuXLP76NDVbb1CLFh8FdPvFQGwcA+0P/QAcZSj80w9Sj+zW0MQ==","shasum":"a104788eb654e4df7a3cf5ab3751ee04728ede39","tarball":"https://registry.npmjs.org/@ecolytiq-team/ecolytiq-sdk/-/ecolytiq-sdk-2.3.2.tgz","fileCount":90,"unpackedSize":336409,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg7y00CRA9TVsSAnZWagAANQsP/3tZ+k8txMzswMdrnwc5\n8rYvdDZlD/j4FNISJos60EfE70m7LY2jD3qkN2Ktwm4O+zj51/ocT8KkIQ/J\nHrQpvLetK4P6/6yEFRjsxdxuWRAD9EDgO5HVugB9aC4Dlbnjzp4Cjek2a8b6\nhFbvyNl0Ewikh/T3Ozo1qYA13FlnN3So+HeFEPGfMxf2vsguCdNPOcpRsClG\nEGd/qzcGej1jVz8BDrjDw3nzoHBEGBhI00/kJ1NugkIFt0Ki3670GCVxQUaF\nsj2NaVi1V2rxmhrQT3u9puNKaYbRAHQ+OYEg6LRKDf3b+MDkDFuuBLDhNnrw\nxri2+kcY2Ze/FAgZlPFaSy6aNZoyFRVQwJdF/iLw1RJzLuLrEFGklOliIpxF\nEsGBEN2SxfxUw8hkPGYX5BufHjiTmX0FMM86mJt2ypzQDRzQvf3AJSrFGxMD\nRjK/8YTodO7qsRpHr3uh6TByvR3DzneT5eEcm6Z5F4rMJbwQD2ENp4lICCEL\nSUOBGkiZtqX7LesMd44Kdl8R11hVbcDWNkOl4Xy3Tox5LqI/cJcjf0dHlrGS\nkXh9SijqEPCkam1daf54Fny5NJjfCFqhVOtw8BxAg23gRcQ6CXWeMFSRXgdI\n415uVSySqb9gcY53glyAFwgjTa8P7I/P45Gvl44NwZ+xzFOzWYd8cuYn1VmL\n2FGO\r\n=aDjX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDOnbVOHX9GR0pU8HavRzRfSThqUorHRYPDPKiy1Y93+gIgDPjXktxiGYstaC3U2RegUhNpC+edmB0sQFWEJvWbajs="}]},"_npmUser":{"name":"thomas.thephasdin.ecolytiq","email":"thomas.thephasdin@ecolytiq.com"},"directories":{},"maintainers":[{"name":"makadev","email":"sigsegv@makadev.de"},{"name":"daqua","email":"daniel.quanz@ecolytiq.com"},{"name":"thomas.thephasdin.ecolytiq","email":"thomas.thephasdin@ecolytiq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/ecolytiq-sdk_2.3.2_1626287411960_0.42480564605006643"},"_hasShrinkwrap":false}},"time":{"created":"2021-07-08T07:08:33.309Z","0.0.2-beta.5":"2021-07-08T07:08:34.002Z","modified":"2022-04-05T06:37:59.594Z","2.3.0":"2021-07-08T09:02:10.820Z","2.3.1":"2021-07-13T10:50:41.812Z","2.3.2":"2021-07-14T18:30:12.081Z"},"maintainers":[{"name":"makadev","email":"sigsegv@makadev.de"},{"name":"daqua","email":"daniel.quanz@ecolytiq.com"},{"name":"thomas.thephasdin.ecolytiq","email":"thomas.thephasdin@ecolytiq.com"}],"description":"Ecolytiq Transaction API SDK","homepage":"https://github.com/ecolytiq-team/ecolytiq-SDK-npm#readme","repository":{"type":"git","url":"git://github.com/ecolytiq-team/ecolytiq-SDK-npm.git"},"author":{"name":"celloon","email":"info@ecolytiq.com"},"bugs":{"url":"https://github.com/ecolytiq-team/ecolytiq-SDK-npm/issues"},"license":"Apache-2.0","readme":"# ecolytiq-sdk-npm\n\n[![Node.js Package](https://github.com/ecolytiq-team/ecolytiq-SDK-npm/actions/workflows/default.yaml/badge.svg)](https://github.com/ecolytiq-team/ecolytiq-SDK-npm/actions/workflows/default.yaml)\n\n<!-- toc -->\n\n-   [Usage](#usage)\n-   [Helper Functions](#helper-functions)\n    -   [`apiAuth` Helper](#apiauth-helper)\n    -   [`getApiConfiguration`](#getapiconfiguration)\n    -   [`apiRequestEnrichment` for batch TXItem Enrichment](#apirequestenrichment-for-batch-txitem-enrichment)\n    -   [`apiRequestRangeEnrichment` for batch TXItem Enrichment](#apirequestrangeenrichment-for-batch-txitem-enrichment)\n    -   [pinging the server with `apiGetHealth`](#pinging-the-server-with-apigethealth)\n-   [Using the OpenAPI Generated Client (typescript-fetch)](#using-the-openapi-generated-client-typescript-fetch)\n\n<!-- tocstop -->\n\n## Usage\n\n```bash\nnpm install @ecolytiq-team/ecolytiq-sdk\n```\n\nGet an Access Token from the ecolytiq Auth Server, either via agreed method of token retrival like OAuth2 or the `apiAuth` helper.\n\nSetup an API Configuration f.e. with `getApiConfiguration` and use the API either using one of the helper functions `api*` or the OpenAPI generated client code.\n\n## Helper Functions\n\nThis package contains several helper functions which are mainly meant to abstract away some of the default complexity and settings of the generated API client. The `api*` helper also wrap errors into either:\n\n-   `APIUnavailable` if the server is not reachable,\n-   `APIUnexpectedResponse` for a response status outside 200-299\n-   `APIInvalidResponse` if the result did return successfull but could not be interpreted by the helper\n\n### `apiAuth` Helper\n\nCurrently the Auth Helper `apiAuth` can handle 2 cases. The request of an accessToken for given client credentials for a typical Serverside M2M Authentication Flow.\n\n```typescript\nimport { apiAuth } from \"@ecolytiq-team/ecolytiq-sdk\";\n\nconst token = await apiAuth({\n    authUrl: apiEndpoint,\n    scope: \"all\",\n    grantType: \"token\",\n    clientCredentials: {\n        clientId: \"id\",\n        clientSecret: \"secret\",\n    },\n});\n```\n\nThe second method is to use a username and password combination for a typical frontend login approach (f.e. for a SPA).\n\n```typescript\nimport { apiAuth } from \"@ecolytiq-team/ecolytiq-sdk\";\n\nconst token = await apiAuth({\n    authUrl: apiEndpoint,\n    scope: \"all\",\n    grantType: \"password\",\n    passwordCredentials: {\n        username: \"user\",\n        password: \"pass\",\n    },\n});\n```\n\nWhen run in non Browser context like NodeJS or Apache Cordova, the usage might lead to an \"Invalid Reference Error\" because the generated client will try to access `window.fetch`. As a workaround one can set the fetchApi explicitly (and polyfill if needed) like this:\n\n```typescript\nimport { apiAuth } from \"@ecolytiq-team/ecolytiq-sdk\";\nimport fetchApi from \"isomorphic-fetch\";\n\nconst token = await apiAuth({\n    authUrl: apiEndpoint,\n    scope: \"all\",\n    grantType: \"password\",\n    passwordCredentials: {\n        username: \"user\",\n        password: \"pass\",\n    },\n    // override typescript-fetch specific settings\n    // for f.e. NodeJS (or Node/Browser use) something like \"isomorphic-fetch\" can be used\n    // for f.e. NextJS getStaticProps: extendedConfig: { fetchApi: fetch } is enough\n    // for f.e. Cordova you need to install a fetch replacement like whatwg-fetch\n    extendedConfig: { fetchApi: fetchApi },\n});\n```\n\n_Note: The auth helper currently only allows selected methods and does not return any token expiration time or other information. For production, this should be replaced with an OAuth2 client connecting to the Ecolytiq Auth Server._\n\n### `getApiConfiguration`\n\nThis helper can be used to setup a Configuration Object for the API with given token and specified (prod/staging/sandbox/..) api endpoint.\n\n```typescript\nconst apiConfig = getApiConfiguration({\n    // token returned by either OAuth2 client or apiAuth helper\n    authToken: token,\n    apiUrl: apiEndpoint,\n});\n\n// for the generated client code\nconst enrichmentService = new EnrichmentServiceApi(apiConfig);\nconst greenTXItems = await enrichmentService.txpTransactionRangePost({ ... })\n\n// for the helper\nconst greenTXItems = await apiRequestRangeEnrichment(apiConfig, txItems, \"DE\");\n```\n\nWhen run in non Browser context like NodeJS or Apache Cordova, the usage might lead to an \"Invalid Reference Error\" because the generated client will try to access `window.fetch`. As a workaround one can set the fetchApi explicitly:\n\n```typescript\nimport { getApiConfiguration } from \"@ecolytiq-team/ecolytiq-sdk\";\nimport fetchApi from \"isomorphic-fetch\";\n\nconst apiConfig = getApiConfiguration({\n    // token returned by either OAuth2 client or apiAuth helper\n    authToken: token,\n    apiUrl: apiEndpoint,\n    // override typescript-fetch specific settings\n    // for f.e. NodeJS (or Node/Browser use) something like \"isomorphic-fetch\" can be used\n    // for f.e. NextJS getStaticProps: extendedConfig: { fetchApi: fetch } is enough\n    // for f.e. Cordova you need to install a fetch replacement like whatwg-fetch\n    fetchApi: fetchApi,\n});\n```\n\n### `apiRequestEnrichment` for batch TXItem Enrichment\n\nThis helper can be used for enrichment of a single TXItem. It is based on the `/txp/transaction` specification.\n\n```typescript\nconst greenTXItem = await apiRequestEnrichment(apiConfig, txitem, \"DE\");\n```\n\n### `apiRequestRangeEnrichment` for batch TXItem Enrichment\n\nThis helper can be used for enrichment of multiple TXItems. It is based on the `/txp/transaction/range` specification.\n\n```typescript\nconst greenTXItems = await apiRequestRangeEnrichment(apiConfig, txitems, \"DE\");\n```\n\n### pinging the server with `apiGetHealth`\n\nThis helper can be used to check the Servers health info. It is based on the `/txp/ping` specification.\n\n```typescript\ntry {\n    const pingResponse = await apiGetHealth(apiConfig);\n    // just checking if a specific name is in the response, otherwise\n    // it could also return {}\n    if (`PONG_date` in pingResponse) {\n        console.log(\"Server pinged, up and running\");\n    }\n} catch (e) {\n    if (e instanceof APIUnavailable) {\n        // Server down or broken route\n        console.warning(\"Server did not respond at all.\");\n    } else {\n        // Server responded but without PONG, might be a problem\n        // or\n        console.warning(\"Server did not respond as expected.\");\n    }\n}\n```\n\n## Using the OpenAPI Generated Client (typescript-fetch)\n\nThis package contains the complete generated code for the Ecolytiq Transaction API as specified, generated with OpenAPI Generator and typescript-fetch template. It will expose the the tags and operations as follows:\n\n-   tags create an API Class for example: `enrichment-service` will be `EnrichmentServiceApi`\n-   either a name operationId or path + http method will be mangled into a method name like: `/txp/transaction/range` into `txpTransactionRangePost` which will only return a result if possible and `txpTransactionRangePostRaw` which will return more information for custom error handling.\n\nThis makes it moderately easy to find the respective method used for a specified api method. Any modern IDE should provide that much information. With this the generated code can be used directly without additional handling and error wrappers if needed:\n\nExample for JavaScript:\n\n```javascript\nimport { EnrichmentServiceApi, getApiConfiguration } from \"@ecolytiq-team/ecolytiq-sdk\";\n\nasync function getEnrichedItems(apiEndpoint, token, txitems) {\n    const apiConfig = getApiConfiguration({\n        authToken: token,\n        apiUrl: apiEndpoint,\n    });\n    const enrichmentService = new EnrichmentServiceApi(apiConfig);\n    return await enrichmentService.txpTransactionRangePost({\n        modelRegionCode: \"DE\",\n        body: {\n            txItems: txitems,\n        },\n    });\n}\n```\n\nExample for TypeScript:\n\n```typescript\nimport { EnrichmentServiceApi, getApiConfiguration, GreenTXItem, TXItem } from \"@ecolytiq-team/ecolytiq-sdk\";\n\nasync function getEnrichedItems(apiEndpoint: string, token: string, txitems: TXItem[]): Promise<GreenTXItem[]> {\n    const apiConfig = getApiConfiguration({\n        authToken: token,\n        apiUrl: apiEndpoint,\n    });\n    const enrichmentService = new EnrichmentServiceApi(apiConfig);\n    return await enrichmentService.txpTransactionRangePost({\n        modelRegionCode: \"DE\",\n        body: {\n            txItems: txitems,\n        },\n    });\n}\n```\n","readmeFilename":"README.md"}