{"_id":"@3sy/api-engine","_rev":"13-1bed36e2c02643999e7bed4a1a9f2bcd","name":"@3sy/api-engine","dist-tags":{"latest":"1.1.8"},"versions":{"1.0.0":{"name":"@3sy/api-engine","version":"1.0.0","keywords":["node.js","react","react-native","api","rest","fetch","node-fetch"],"author":{"url":"https://3sy.it/","name":"3SY srl","email":"michael@3sy.dev"},"license":"MIT","_id":"@3sy/api-engine@1.0.0","maintainers":[{"name":"michael-malaspina","email":"michael@3sy.dev"}],"homepage":"https://github.com/3sydev/api_engine#readme","bugs":{"url":"https://github.com/3sydev/api_engine/issues"},"dist":{"shasum":"461f0a2157d9fe9dc722b65962f9f438e5a45d03","tarball":"https://registry.npmjs.org/@3sy/api-engine/-/api-engine-1.0.0.tgz","fileCount":4,"integrity":"sha512-Wx2cHV0132N8mqtz7XqYsLPTr1eTymkQMrhd7qY4snpxpFB5pePKwjujmjVNlJ4BIkDNy52ntlFR/XGM9qxBeg==","signatures":[{"sig":"MEUCIG0I6Fs35UBH5/3/F2K3KYkkCC3zMVOqb3jTyhn2VmzzAiEAjY6TAg8h+AI/DzxsudnBo/7dI8ucSp2rV5Ba0c4bUOk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24246},"main":"lib/index.js","types":"lib/index.d.ts","gitHead":"f2abeeeb4df8c8aab44feddb284f802ce8cc9f63","scripts":{"test":"jest","build":"tsc","prepare":"npm run build"},"_npmUser":{"name":"michael-malaspina","email":"michael@3sy.dev"},"repository":{"url":"git+https://github.com/3sydev/api_engine.git","type":"git"},"_npmVersion":"8.3.0","description":"REST API engine to simplify REST API integration in NodeJS applications.","directories":{},"_nodeVersion":"14.17.0","dependencies":{"node-fetch":"^2.7.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","ts-jest":"^29.1.1","ts-node":"^10.9.1","babel-jest":"^29.7.0","typescript":"^5.3.2","@types/jest":"^29.5.10","@babel/preset-env":"^7.23.5","@types/node-fetch":"^2.6.9"},"_npmOperationalInternal":{"tmp":"tmp/api-engine_1.0.0_1701889747785_0.7804072868427836","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@3sy/api-engine","version":"1.0.1","keywords":["node.js","react","react-native","api","rest","fetch","node-fetch"],"author":{"url":"https://3sy.it/","name":"3SY srl","email":"michael@3sy.dev"},"license":"MIT","_id":"@3sy/api-engine@1.0.1","maintainers":[{"name":"michael-malaspina","email":"michael@3sy.dev"}],"homepage":"https://github.com/3sydev/api_engine#readme","bugs":{"url":"https://github.com/3sydev/api_engine/issues"},"dist":{"shasum":"068d6a03cd9003d7a6941f9e29e205865c1ffc96","tarball":"https://registry.npmjs.org/@3sy/api-engine/-/api-engine-1.0.1.tgz","fileCount":4,"integrity":"sha512-/oIiKHUSxa/DYjwF1IZEwf4U2DLOh0u35Z1mwK9PeJ3rXTIkk6U+NzzjHyF/rgLM5xPmq3tBEN9zZoIEt6ytnA==","signatures":[{"sig":"MEUCIQC5Tb3n8XCNa+1XWX4QM542yvVJ97p/grjAJCFZa8qL+gIgAnyqERtMkPi1MI6KAXavTFS1jqbx9cfG/WCkTyW+0/A=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24246},"main":"lib/index.js","types":"lib/index.d.ts","gitHead":"3627a0bae167220b59649a520d84fda906ca4b14","scripts":{"test":"jest","build":"tsc","prepare":"npm run build"},"_npmUser":{"name":"michael-malaspina","email":"michael@3sy.dev"},"repository":{"url":"git+https://github.com/3sydev/api_engine.git","type":"git"},"_npmVersion":"8.3.0","description":"REST API engine to simplify REST API integration in NodeJS applications.","directories":{},"_nodeVersion":"14.17.0","dependencies":{"node-fetch":"^2.7.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","ts-jest":"^29.1.1","ts-node":"^10.9.1","babel-jest":"^29.7.0","typescript":"^5.3.2","@types/jest":"^29.5.10","@babel/preset-env":"^7.23.5","@types/node-fetch":"^2.6.9"},"_npmOperationalInternal":{"tmp":"tmp/api-engine_1.0.1_1701890207208_0.7979055481322703","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"@3sy/api-engine","version":"1.0.2","keywords":["node.js","react","react-native","api","rest","fetch","node-fetch"],"author":{"url":"https://3sy.it/","name":"3SY srl","email":"michael@3sy.dev"},"license":"MIT","_id":"@3sy/api-engine@1.0.2","maintainers":[{"name":"michael-malaspina","email":"michael@3sy.dev"}],"homepage":"https://github.com/3sydev/api_engine#readme","bugs":{"url":"https://github.com/3sydev/api_engine/issues"},"dist":{"shasum":"a5cd8e8c6ca021f0962b9860e464b786a4e36822","tarball":"https://registry.npmjs.org/@3sy/api-engine/-/api-engine-1.0.2.tgz","fileCount":11,"integrity":"sha512-UrrpPEZUh72cq+rs6JXoFWUUZCjZtQbDl4fgkXmNbjP1IBsNv+lt0s94nIYbqngviiCjskoAhcyHqa4f7NS7Vw==","signatures":[{"sig":"MEUCICOA5OkN3e9hf47nCcEtxFsseykENA7vNITzhLowEtBrAiEAqM+HNAaK/U0Hg2hDSsjnljGelRw72RexpQDN6miQq5g=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":53962},"main":"lib/index.js","types":"lib/index.d.ts","gitHead":"24c7f70ff8e61e675ee74869b952364b14303b29","scripts":{"test":"jest","build":"tsc","prepare":"npm run build"},"_npmUser":{"name":"michael-malaspina","email":"michael@3sy.dev"},"repository":{"url":"git+https://github.com/3sydev/api_engine.git","type":"git"},"_npmVersion":"8.3.0","description":"REST API engine to simplify REST API integration in NodeJS applications.","directories":{},"_nodeVersion":"14.17.0","dependencies":{"node-fetch":"^2.7.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","ts-jest":"^29.1.1","ts-node":"^10.9.1","babel-jest":"^29.7.0","typescript":"^5.3.2","@types/jest":"^29.5.10","@babel/preset-env":"^7.23.5","@types/node-fetch":"^2.6.9"},"_npmOperationalInternal":{"tmp":"tmp/api-engine_1.0.2_1701890452820_0.3733412997905432","host":"s3://npm-registry-packages"}},"1.0.3":{"name":"@3sy/api-engine","version":"1.0.3","keywords":["node.js","react","react-native","api","rest","fetch","node-fetch"],"author":{"url":"https://3sy.it/","name":"3SY srl","email":"michael@3sy.dev"},"license":"MIT","_id":"@3sy/api-engine@1.0.3","maintainers":[{"name":"michael-malaspina","email":"michael@3sy.dev"}],"homepage":"https://github.com/3sydev/api_engine#readme","bugs":{"url":"https://github.com/3sydev/api_engine/issues"},"dist":{"shasum":"41e9c3b1997355c9d9fab44f7ab24b29054ec096","tarball":"https://registry.npmjs.org/@3sy/api-engine/-/api-engine-1.0.3.tgz","fileCount":13,"integrity":"sha512-67kr0T7Va6XIfkYsNny0fDjwULH6LJZwkA5hxzMyd2xUiK6nUM7h3dFcTuXpWB4qeWunXfw0bANn9wAclyuY5A==","signatures":[{"sig":"MEQCIFfSK5JZGrhZIRZMYv80txfP7GgYqtYYvaC6m/F4BrVbAiBXR4jFtiGCJK13hY3xs3vq6AtGN3y5XN5B83TMD6Lz0w==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":55221},"main":"lib/index.js","types":"lib/index.d.ts","gitHead":"c76c853f77a9b8c341db7e0bd8f806e2459ab202","scripts":{"test":"jest","build":"tsc","prepare":"npm run build"},"_npmUser":{"name":"michael-malaspina","email":"michael@3sy.dev"},"repository":{"url":"git+https://github.com/3sydev/api_engine.git","type":"git"},"_npmVersion":"8.3.0","description":"REST API engine to simplify REST API integration in NodeJS applications.","directories":{},"_nodeVersion":"14.17.0","dependencies":{"node-fetch":"^2.7.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","ts-jest":"^29.1.1","ts-node":"^10.9.1","babel-jest":"^29.7.0","typescript":"^5.3.2","@types/jest":"^29.5.10","@babel/preset-env":"^7.23.5","@types/node-fetch":"^2.6.9"},"_npmOperationalInternal":{"tmp":"tmp/api-engine_1.0.3_1701949030279_0.31862645486267027","host":"s3://npm-registry-packages"}},"1.1.0":{"name":"@3sy/api-engine","version":"1.1.0","keywords":["node.js","react","react-native","api","rest","fetch","node-fetch"],"author":{"url":"https://3sy.it/","name":"3SY srl","email":"michael@3sy.dev"},"license":"MIT","_id":"@3sy/api-engine@1.1.0","maintainers":[{"name":"michael-malaspina","email":"michael@3sy.dev"}],"homepage":"https://github.com/3sydev/api_engine#readme","bugs":{"url":"https://github.com/3sydev/api_engine/issues"},"dist":{"shasum":"d68aaf169fde6717bebb3ca7441eb66f82e5d5db","tarball":"https://registry.npmjs.org/@3sy/api-engine/-/api-engine-1.1.0.tgz","fileCount":13,"integrity":"sha512-yEOfUrQFgyyvuoBuGq5LFh34zFx3fAIC+gfKr4fpvshbQyZaGSLCxF6cVqYSKFou5Mo1FBwOUCGozOekTvkxIQ==","signatures":[{"sig":"MEYCIQDSLX9TRkS/MI0Twt7MHeHvhwOAG1232s7+YD6vQhw7QwIhALHyctq7A+qr34KX6M1RyaQr7Gu8ebXj8w06qVRiSUTM","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":61533},"main":"lib/index.js","types":"lib/index.d.ts","gitHead":"23b4712f83b030a6c759c2b5347282a4f9d191bf","scripts":{"test":"jest","build":"tsc","prepare":"npm run build"},"_npmUser":{"name":"michael-malaspina","email":"michael@3sy.dev"},"repository":{"url":"git+https://github.com/3sydev/api_engine.git","type":"git"},"_npmVersion":"8.19.3","description":"REST API engine to simplify REST API integration in NodeJS applications.","directories":{},"_nodeVersion":"18.13.0","dependencies":{"node-fetch":"^2.7.0"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","ts-jest":"^29.1.1","ts-node":"^10.9.1","babel-jest":"^29.7.0","typescript":"^5.3.2","@types/jest":"^29.5.10","@babel/preset-env":"^7.23.5","@types/node-fetch":"^2.6.9"},"_npmOperationalInternal":{"tmp":"tmp/api-engine_1.1.0_1707408366072_0.2137652658992224","host":"s3://npm-registry-packages"}},"1.1.1":{"name":"@3sy/api-engine","version":"1.1.1","keywords":["node.js","react","react-native","api","rest","fetch","node-fetch"],"author":{"url":"https://3sy.it/","name":"3SY srl","email":"michael@3sy.dev"},"license":"MIT","_id":"@3sy/api-engine@1.1.1","maintainers":[{"name":"michael-malaspina","email":"michael@3sy.dev"}],"homepage":"https://github.com/3sydev/api_engine#readme","bugs":{"url":"https://github.com/3sydev/api_engine/issues"},"dist":{"shasum":"5c43b190db572b07b5fce90f866f1fd920610213","tarball":"https://registry.npmjs.org/@3sy/api-engine/-/api-engine-1.1.1.tgz","fileCount":13,"integrity":"sha512-/CKAb/e5Z3+EZiwx53ZiqCUC+44K4AUrMWa4rc0PAjqTuXpy75pco3Hpos1geB920vSOmk+pFV/SGehP8EbSAw==","signatures":[{"sig":"MEUCIQDKaOJfQJqAyHWFWPd/aFrs4/ACYLuKMcbnJ7bHmXKAkQIgJ8PZyl8ZqXmnDXefTkwSnRDWrNcWPtDqYl6omFK1M4s=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":61145},"main":"lib/index.js","types":"lib/index.d.ts","gitHead":"0abd76dd91136d855502623c84b9ad31d86f88a3","scripts":{"test":"jest","build":"tsc","prepare":"npm run build"},"_npmUser":{"name":"michael-malaspina","email":"michael@3sy.dev"},"repository":{"url":"git+https://github.com/3sydev/api_engine.git","type":"git"},"_npmVersion":"8.19.3","description":"REST API engine to simplify REST API integration in NodeJS applications.","directories":{},"_nodeVersion":"18.13.0","dependencies":{"lodash":"^4.17.21","node-fetch":"^2.7.0","@types/lodash":"^4.14.202"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","ts-jest":"^29.1.1","ts-node":"^10.9.1","babel-jest":"^29.7.0","typescript":"^5.3.2","@types/jest":"^29.5.10","@babel/preset-env":"^7.23.5","@types/node-fetch":"^2.6.9"},"_npmOperationalInternal":{"tmp":"tmp/api-engine_1.1.1_1707753601853_0.6695195611623153","host":"s3://npm-registry-packages"}},"1.1.2":{"name":"@3sy/api-engine","version":"1.1.2","keywords":["node.js","react","react-native","api","rest","fetch"],"author":{"url":"https://3sy.it/","name":"3SY srl","email":"michael@3sy.dev"},"license":"MIT","_id":"@3sy/api-engine@1.1.2","maintainers":[{"name":"michael-malaspina","email":"michael@3sy.dev"}],"homepage":"https://github.com/3sydev/api_engine#readme","bugs":{"url":"https://github.com/3sydev/api_engine/issues"},"dist":{"shasum":"48edbc9e1386341671a18f403b76af43de51c3e2","tarball":"https://registry.npmjs.org/@3sy/api-engine/-/api-engine-1.1.2.tgz","fileCount":13,"integrity":"sha512-XKwkfqnWMU5007IqXMA5LlhptZKNkoVuTKGYLVRTcNiT3r/N7FoVyk+NA8qQmyTZNfpDXUKOm5T+Iy4l3ZKJPA==","signatures":[{"sig":"MEUCIDi7XCisfKOyp6/d6k5xeF/f+26VNgtWihRQBLnuADIcAiEA3uFIxnluGP9Q/kpKYsbh01H1alvRrkTNVTJaQWznBcY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":60905},"main":"lib/index.js","types":"lib/index.d.ts","gitHead":"a1d19c618bff25a89b686e7fc01f32fef2a2d604","scripts":{"test":"jest","build":"tsc","prepare":"npm run build"},"_npmUser":{"name":"michael-malaspina","email":"michael@3sy.dev"},"repository":{"url":"git+https://github.com/3sydev/api_engine.git","type":"git"},"_npmVersion":"8.19.3","description":"REST API engine to simplify REST API integration in NodeJS applications.","directories":{},"_nodeVersion":"18.13.0","dependencies":{"lodash":"^4.17.21","@types/lodash":"^4.14.202"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","ts-jest":"^29.1.1","ts-node":"^10.9.1","babel-jest":"^29.7.0","typescript":"^5.3.2","@types/jest":"^29.5.10","@babel/preset-env":"^7.23.5"},"_npmOperationalInternal":{"tmp":"tmp/api-engine_1.1.2_1712585536768_0.3507432921497422","host":"s3://npm-registry-packages"}},"1.1.3":{"name":"@3sy/api-engine","version":"1.1.3","keywords":["node.js","react","react-native","api","rest","fetch"],"author":{"url":"https://3sy.it/","name":"3SY srl","email":"michael@3sy.dev"},"license":"MIT","_id":"@3sy/api-engine@1.1.3","maintainers":[{"name":"michael-malaspina","email":"michael@3sy.dev"}],"homepage":"https://github.com/3sydev/api_engine#readme","bugs":{"url":"https://github.com/3sydev/api_engine/issues"},"dist":{"shasum":"162d0d3f9e6fbe12e8f7c75ee6a5b9e5b5081e6a","tarball":"https://registry.npmjs.org/@3sy/api-engine/-/api-engine-1.1.3.tgz","fileCount":13,"integrity":"sha512-wHsZHegzUbhC/FSBJE1jr8wG4/ZJJ2MphgOeQ2vBXHxXvfhBDvMgYZIn9NfjdYEh87Ke8alnNoZpEm5F+/9PFg==","signatures":[{"sig":"MEYCIQD2Kqg2sxPDlw9Y0WBQbi1535XBYf4KEZmh+3jSbMB6NwIhAOKZ5t/nrEMdA6Kes1MMPSYAmr19Qxx3TKGVRkAXpbYN","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":61300},"main":"lib/index.js","types":"lib/index.d.ts","gitHead":"db338bf8b240af8cff5af14e539c3585e5b6ea45","scripts":{"test":"jest","build":"tsc","prepare":"npm run build"},"_npmUser":{"name":"michael-malaspina","email":"michael@3sy.dev"},"repository":{"url":"git+https://github.com/3sydev/api_engine.git","type":"git"},"_npmVersion":"8.19.3","description":"REST API engine to simplify REST API integration in NodeJS applications.","directories":{},"_nodeVersion":"18.13.0","dependencies":{"lodash":"^4.17.21","@types/lodash":"^4.14.202"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","ts-jest":"^29.1.1","ts-node":"^10.9.1","babel-jest":"^29.7.0","typescript":"^5.3.2","@types/jest":"^29.5.10","@babel/preset-env":"^7.23.5"},"_npmOperationalInternal":{"tmp":"tmp/api-engine_1.1.3_1713809321558_0.7900992087328218","host":"s3://npm-registry-packages"}},"1.1.4":{"name":"@3sy/api-engine","version":"1.1.4","keywords":["node.js","react","react-native","api","rest","fetch"],"author":{"url":"https://3sy.it/","name":"3SY srl","email":"michael@3sy.dev"},"license":"MIT","_id":"@3sy/api-engine@1.1.4","maintainers":[{"name":"michael-malaspina","email":"michael@3sy.dev"}],"homepage":"https://github.com/3sydev/api_engine#readme","bugs":{"url":"https://github.com/3sydev/api_engine/issues"},"dist":{"shasum":"d137729203766bc4eab1fa2969cf3e735791925b","tarball":"https://registry.npmjs.org/@3sy/api-engine/-/api-engine-1.1.4.tgz","fileCount":13,"integrity":"sha512-MzqGIRWiEZVhZoGIyY4Q30rYu7q86W/kzSgYO0zeW8mKMtG2RTBfD+zKA9dhn9DfpU5xOgkwv4452bkgv6Vglw==","signatures":[{"sig":"MEUCIFLVkLVct75JqXXAe4viZJS1yxjeCXjgrC8nq88OEJz5AiEAvJbaDVZyXqym2p23Gf8oB7Ms04rX0bPiqRk3Ao+KfNE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":65153},"main":"lib/index.js","types":"lib/index.d.ts","gitHead":"5ea059575377d20de996a7971fc885ce2fa588b1","scripts":{"test":"jest","build":"tsc","prepare":"npm run build"},"_npmUser":{"name":"michael-malaspina","email":"michael@3sy.dev"},"repository":{"url":"git+https://github.com/3sydev/api_engine.git","type":"git"},"_npmVersion":"8.19.3","description":"REST API engine to simplify REST API integration in NodeJS applications.","directories":{},"_nodeVersion":"18.13.0","dependencies":{"lodash":"^4.17.21","@types/lodash":"^4.14.202"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","ts-jest":"^29.1.1","ts-node":"^10.9.1","babel-jest":"^29.7.0","typescript":"^5.3.2","@types/jest":"^29.5.10","@babel/preset-env":"^7.23.5"},"_npmOperationalInternal":{"tmp":"tmp/api-engine_1.1.4_1714127947511_0.41325158123907335","host":"s3://npm-registry-packages"}},"1.1.5":{"name":"@3sy/api-engine","version":"1.1.5","keywords":["node.js","react","react-native","api","rest","fetch"],"author":{"url":"https://3sy.it/","name":"3SY srl","email":"michael@3sy.dev"},"license":"MIT","_id":"@3sy/api-engine@1.1.5","maintainers":[{"name":"michael-malaspina","email":"michael@3sy.dev"}],"homepage":"https://github.com/3sydev/api_engine#readme","bugs":{"url":"https://github.com/3sydev/api_engine/issues"},"dist":{"shasum":"cb5e55efcdeab1ecfd6832331834e133fa1353cf","tarball":"https://registry.npmjs.org/@3sy/api-engine/-/api-engine-1.1.5.tgz","fileCount":13,"integrity":"sha512-dBW9vKygLJqQzNKJK1k17pFoJZUAVDuNExBY/1SUU5eLWXHPRjib77r5ZMHpMgPPIOxTsBmN57ajo2vYVIv4jw==","signatures":[{"sig":"MEUCIBwrjyv7vjh2ssK1sthhWMu/2TlY20JBciLRmzqMgFd8AiEA2sJmWejZT7yxn60oEK6ax3kPx5YVdx/PvlX1rf5cueY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":65144},"main":"lib/index.js","types":"lib/index.d.ts","gitHead":"5d8df0c6f1497b8194affc9585b06e1eef47f39a","scripts":{"test":"jest","build":"tsc","prepare":"npm run build"},"_npmUser":{"name":"michael-malaspina","email":"michael@3sy.dev"},"repository":{"url":"git+https://github.com/3sydev/api_engine.git","type":"git"},"_npmVersion":"8.19.3","description":"REST API engine to simplify REST API integration in NodeJS applications.","directories":{},"_nodeVersion":"18.13.0","dependencies":{"lodash":"^4.17.21","@types/lodash":"^4.14.202"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","ts-jest":"^29.1.1","ts-node":"^10.9.1","babel-jest":"^29.7.0","typescript":"^5.3.2","@types/jest":"^29.5.10","@babel/preset-env":"^7.23.5"},"_npmOperationalInternal":{"tmp":"tmp/api-engine_1.1.5_1714130559962_0.030822708231666995","host":"s3://npm-registry-packages"}},"1.1.6":{"name":"@3sy/api-engine","version":"1.1.6","keywords":["node.js","react","react-native","api","rest","fetch"],"author":{"url":"https://3sy.it/","name":"3SY srl","email":"michael@3sy.dev"},"license":"MIT","_id":"@3sy/api-engine@1.1.6","maintainers":[{"name":"michael-malaspina","email":"michael@3sy.dev"}],"homepage":"https://github.com/3sydev/api_engine#readme","bugs":{"url":"https://github.com/3sydev/api_engine/issues"},"dist":{"shasum":"3a4a29e8d178406f776e06c168e9a4f579e54cd3","tarball":"https://registry.npmjs.org/@3sy/api-engine/-/api-engine-1.1.6.tgz","fileCount":13,"integrity":"sha512-uqp6ivgUFRLdvlZmE6QKm/P5t2xiDCjZpOIhlb1uz+TNcPQUvhkBNKztLxdhb4d3G7iCqZL+/NpIvcdRArPOoA==","signatures":[{"sig":"MEQCIHWOOOjWCQOmYDiwWrbH8fN+3XckhOiylKFwXxRzwkQxAiB9a6Y/QwZW8pjQjFTIfJYLZbEgHmatAj01z4kIhaZBDg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":65361},"main":"lib/index.js","types":"lib/index.d.ts","gitHead":"4c7480d64df9667828b82c801ca7cd5fc7616e96","scripts":{"test":"jest","build":"tsc","prepare":"npm run build"},"_npmUser":{"name":"michael-malaspina","email":"michael@3sy.dev"},"repository":{"url":"git+https://github.com/3sydev/api_engine.git","type":"git"},"_npmVersion":"8.19.3","description":"REST API engine to simplify REST API integration in NodeJS applications.","directories":{},"_nodeVersion":"18.13.0","dependencies":{"lodash":"^4.17.21","@types/lodash":"^4.14.202"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","ts-jest":"^29.1.1","ts-node":"^10.9.1","babel-jest":"^29.7.0","typescript":"^5.3.2","@types/jest":"^29.5.10","@babel/preset-env":"^7.23.5"},"_npmOperationalInternal":{"tmp":"tmp/api-engine_1.1.6_1718890495862_0.9703551492695275","host":"s3://npm-registry-packages"}},"1.1.7":{"name":"@3sy/api-engine","version":"1.1.7","keywords":["node.js","react","react-native","api","rest","fetch"],"author":{"url":"https://3sy.it/","name":"3SY srl","email":"michael@3sy.dev"},"license":"MIT","_id":"@3sy/api-engine@1.1.7","maintainers":[{"name":"michael-malaspina","email":"michael@3sy.dev"}],"homepage":"https://github.com/3sydev/api_engine#readme","bugs":{"url":"https://github.com/3sydev/api_engine/issues"},"dist":{"shasum":"3f5223f2926588fe84bab122950c0e2daa4ec560","tarball":"https://registry.npmjs.org/@3sy/api-engine/-/api-engine-1.1.7.tgz","fileCount":13,"integrity":"sha512-OtMW2VAXCCx+hAjrJvvf7xt/dKDzU5KwfbRinjS7gaDCWG9wkyEYaveOLwUJxvywlfsNuvnbr+8u+Zh1z7cZrw==","signatures":[{"sig":"MEUCIQC4GQ3RY7daBTzubYnnZGJcLOVfy9vTkOtgS6epFEF0agIgA3SCFDk6sIv6nZYSNrxPBQQI7KoFgPpfzzObV+h2ko0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":66550},"main":"lib/index.js","types":"lib/index.d.ts","gitHead":"b89f2f2f9e3a1dbdb98da8418a96d539d6c11742","scripts":{"test":"jest","build":"tsc","prepare":"npm run build"},"_npmUser":{"name":"michael-malaspina","email":"michael@3sy.dev"},"repository":{"url":"git+https://github.com/3sydev/api_engine.git","type":"git"},"_npmVersion":"8.19.3","description":"REST API engine to simplify REST API integration in NodeJS applications.","directories":{},"_nodeVersion":"18.13.0","dependencies":{"lodash":"^4.17.21","@types/lodash":"^4.14.202"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","ts-jest":"^29.1.1","ts-node":"^10.9.1","babel-jest":"^29.7.0","typescript":"^5.3.2","@types/jest":"^29.5.10","@babel/preset-env":"^7.23.5"},"_npmOperationalInternal":{"tmp":"tmp/api-engine_1.1.7_1725472160052_0.44517591779742127","host":"s3://npm-registry-packages"}},"1.1.8":{"name":"@3sy/api-engine","version":"1.1.8","description":"REST API engine to simplify REST API integration in NodeJS applications.","main":"lib/index.js","types":"lib/index.d.ts","scripts":{"test":"jest","build":"tsc","prepare":"npm run build"},"repository":{"type":"git","url":"git+https://github.com/3sydev/api_engine.git"},"keywords":["node.js","react","react-native","api","rest","fetch"],"author":{"name":"3SY srl","email":"michael@3sy.dev","url":"https://3sy.it/"},"license":"MIT","bugs":{"url":"https://github.com/3sydev/api_engine/issues"},"homepage":"https://github.com/3sydev/api_engine#readme","devDependencies":{"@babel/preset-env":"^7.23.5","@types/jest":"^29.5.10","babel-jest":"^29.7.0","jest":"^29.7.0","ts-jest":"^29.1.1","ts-node":"^10.9.1","typescript":"^5.3.2"},"dependencies":{"@types/lodash":"^4.14.202","lodash":"^4.17.21"},"_id":"@3sy/api-engine@1.1.8","gitHead":"922391720c78d4e62aca56248d48fd277311b5ec","_nodeVersion":"20.17.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-uZpyeoF3TUic/wDqAhayFph9O02z0R5fvlhy9AsD2rr3GYbBBQPNMJ8EOqWgCg1DsxMdJZlmtypcp0/NUQ0V3g==","shasum":"e9d9fd658fb1751672df4047b9ef86915b4032ba","tarball":"https://registry.npmjs.org/@3sy/api-engine/-/api-engine-1.1.8.tgz","fileCount":13,"unpackedSize":68996,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIBn9koVFcSAn5HUmOe03W2Pw77mORLi0XEOmOp8PQCwOAiEAi3dDK2NAvOwmWqzmrNcw74y79khqzQwINfbJ614KcfQ="}]},"_npmUser":{"name":"michael-malaspina","email":"michael@3sy.dev"},"directories":{},"maintainers":[{"name":"michael-malaspina","email":"michael@3sy.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/api-engine_1.1.8_1755096505499_0.33482015721136693"},"_hasShrinkwrap":false}},"time":{"created":"2023-12-06T19:09:07.710Z","modified":"2025-08-13T14:48:25.876Z","1.0.0":"2023-12-06T19:09:08.003Z","1.0.1":"2023-12-06T19:16:47.391Z","1.0.2":"2023-12-06T19:20:53.074Z","1.0.3":"2023-12-07T11:37:10.430Z","1.1.0":"2024-02-08T16:06:06.210Z","1.1.1":"2024-02-12T16:00:02.135Z","1.1.2":"2024-04-08T14:12:16.912Z","1.1.3":"2024-04-22T18:08:41.701Z","1.1.4":"2024-04-26T10:39:07.686Z","1.1.5":"2024-04-26T11:22:40.140Z","1.1.6":"2024-06-20T13:34:55.998Z","1.1.7":"2024-09-04T17:49:20.268Z","1.1.8":"2025-08-13T14:48:25.685Z"},"bugs":{"url":"https://github.com/3sydev/api_engine/issues"},"author":{"name":"3SY srl","email":"michael@3sy.dev","url":"https://3sy.it/"},"license":"MIT","homepage":"https://github.com/3sydev/api_engine#readme","keywords":["node.js","react","react-native","api","rest","fetch"],"repository":{"type":"git","url":"git+https://github.com/3sydev/api_engine.git"},"description":"REST API engine to simplify REST API integration in NodeJS applications.","maintainers":[{"name":"michael-malaspina","email":"michael@3sy.dev"}],"readme":"# Api Engine\n\n## Description\n\nApi Engine is a TypeScript library designed to simplify API interactions in your projects. It provides a clean and efficient way to manage HTTP requests, making it easier to integrate APIs into your NodeJS applications.\n\n## Download and Installation\n\nTo use Api Engine in your project, you can install it via npm. Run the following command:\n\n\"npm install api-engine\" or \"yarn add api-engine\".\n\n## Funtionalities\n\nApi Engine offers the following key functionalities:\n\n1. Configuration Options: Fine-tune Api Engine to fit your project's specific needs;\n2. Initialization: Create an instance of the APIEngine class by providing essential API constants, such as endpoints, request configurations, and global parameters;\n3. HTTP Requests: Utilize the call method to make GET, POST, PUT, and DELETE requests. The method supports various parameters and configurations for flexible API integration;\n4. Global Params: Provide global configuration for all endpoints parameters. This allow you to not rewrite the same configuration for every endpoint;\n5. Retry Mechanism: Implement automatic retries based on configurable conditions, enabling robust handling of transient errors;\n6. Interceptor Support: Intercept and manipulate both request and response dynamically using the interceptor feature;\n7. Stack Trace: track all api calls with request and response data;\n8. Promise-based: Utilize promises for asynchronous handling of API calls.\n\n## Configuration Options\n\nCreating an apiConstants configuration file involves defining the various parameters for your API endpoints, as well as any global parameters that should apply to all endpoints. Here's a step-by-step guide on how to create an apiConstants configuration file:\n\n### 1. Create a TypeScript File:\n\n-   Start by creating a new TypeScript file. You can name it something like apiConstants.ts.\n\n### 2. Import Required Types and Modules:\n\n-   Import the necessary types and modules from your API library or external dependencies. For example:\n\n```typescript\n// Import necessary types and modules\nimport { ApiConstants, ApiEndpointType } from 'api-engine';\n```\n\n### 3. Define Global Parameters:\n\n-   Specify global parameters that will apply to all endpoints. This can include the base URL, default headers, and global retry settings. For example:\n\n```typescript\nconst apiConstants: ApiConstants = {\n    baseUrl: 'https://api.example.com',\n    globalParams: {\n        request: {\n            headers: {\n                Authorization: 'Bearer YOUR_ACCESS_TOKEN',\n                'Content-Type': 'application/json',\n            },\n        },\n        retry: 3,\n        retryCondition: [500, 502],\n        stackTraceLogExtraParams: {\n            extraParam: 'extraParam',\n        }, // Include extra parameters in stack traces\n        requestInterceptor: (requestConfig) => {\n            // Your custom logic for modifying request configuration globally\n            return requestConfig;\n        },\n        responseInterceptor: (response) => {\n            // Your custom logic for handling responses globally\n            return response;\n        },\n    },\n    endpoints: {\n        // Define your endpoints here\n    },\n};\n\nexport default apiConstants;\n```\n\n### 4. Define Endpoint Configurations:\n\n-   Define individual endpoint configurations within the endpoints object. Specify the path, HTTP method, and any endpoint-specific parameters. For example:\n\n```typescript\nconst apiConstants: ApiConstants = {\n    baseUrl: 'https://api.example.com',\n    globalParams: {\n        // ... global parameters\n    },\n    endpoints: {\n        getResource: {\n            path: '/resources/{id}',\n            request: {\n                method: 'GET',\n            },\n            retry: 1,\n            // ... other endpoint parameters\n        },\n        createResource: {\n            path: '/resources',\n            request: {\n                method: 'POST',\n            },\n            // ... other endpoint parameters\n        },\n        // ... other endpoints\n    },\n};\n\nexport default apiConstants;\n```\n\n### 5. Export Configuration:\n\n-   Export the configuration object so that it can be imported and used in your application:\n\n```typescript\nexport default apiConstants;\n```\n\n### 6. Customize as Needed:\n\n-   Customize the configuration based on your specific API requirements. You can add additional parameters like headers, retryCondition, statusCodesActions, errorMessages, etc., to fine-tune the behavior of individual endpoints.\n\n### 7. Use in Your Application:\n\n-   Import and use the apiConstants configuration in your application where you interact with the API:\n\n```typescript\nimport apiConstants from './apiConstants.ts';\n\n// Use the configuration in your API calls\n// ...\n```\n\nBy following these steps, you can create a flexible and organized apiConstants configuration file that serves as the foundation for managing your API interactions. Adjust the parameters based on the specific needs of your project and the capabilities provided by your chosen API library or framework.\n\n## Initilization\n\nTo initialize the `APIEngine` class with the `apiConstants` configuration, you can follow these steps. Assuming you have the `apiConstants` configuration file and the `APIEngine` class:\n\n### 1. import APIEngine class and apiConstants:\n\nImport the APIEngine class and the apiConstants configuration at the beginning of your file where you plan to use the API.\n\n```typescript\nimport { APIEngine } from 'api-engine';\nimport apiConstants from './apiConstants'; // Update the path as needed\n```\n\n### 2. Create an Instance of `APIEngine` Class:\n\nCreate an instance of the `APIEngine` class by passing the `apiConstants` configuration to the constructor.\n\n```typescript\nconst apiInstance = new APIEngine(apiConstants);\n```\n\n### 3. Use the `apiInstance`:\n\nYou can now use the `apiInstance` to make API calls and leverage the functionalities provided by the `APIEngine` class.\n\n```typescript\n// Example: Make a GET request to the \"getResource\" endpoint\nconst getResourceResponse = await apiInstance.call('getResource', { pathQueryParameters: [{ name: 'id', value: '123' }] });\n\nconsole.log('Response:', getResourceResponse);\n```\n\nAdjust the method calls and parameters based on your specific API requirements and the functionalities provided by your `APIEngine` class.\n\nHere's how your code might look in a broader context:\n\n```typescript\nimport { APIEngine } from 'api-engine';\nimport apiConstants from './apiConstants'; // Update the path as needed\n\nconst apiInstance = new APIEngine(apiConstants);\n\n// Example: Make a GET request to the \"getResource\" endpoint\nconst getResourceResponse = await apiInstance.call('getResource', { pathQueryParameters: [{ name: 'id', value: '123' }] });\n\nconsole.log('Response:', getResourceResponse);\n```\n\nMake sure that your `APIEngine` class and the `apiConstants` configuration are appropriately structured and compatible for this initialization process. Adjust paths and import statements based on your project's file structure.\n\n## Get Api Types\n\nThe `getApiTypes` method in your `APIEngine` class returns an object that represents the available endpoint types. Each property of the object corresponds to an endpoint type, and the value is the same as the property name. This method is useful for obtaining a list of available endpoint types dynamically.\n\nHere's how you can use the `getApiTypes` method in your code:\n\nAssuming you have an instance of the `APIEngine` class:\n\n```typescript\nimport { APIEngine } from 'api-engine';\nimport apiConstantsTs from './apiConstantsTs'; // Update the path as needed\n\nconst apiInstance = new API(apiConstantsTs);\n\n// Use the getApiTypes method to get the available endpoint types\nconst apiTypes = apiInstance.getApiTypes();\n\n// Now apiTypes is an object where keys are endpoint types\n// and values are the same as the keys\nconsole.log('Available Endpoint Types:', apiTypes);\n```\n\nIn this example, `apiTypes` will be an object like:\n\n```typescript\n{\n    getResource: 'getResource',\n    createResource: 'createResource',\n    // ... other endpoint types\n}\n```\n\nYou can then use this information dynamically in your application, for example, to generate UI components or to validate user input for endpoint types.\n\nPlease note that the `getApiTypes` method doesn't take any parameters because it relies on the endpoint types defined in your `apiConstants` configuration. If you add or remove endpoint types from your configuration, the `getApiTypes` method will reflect those changes dynamically.\n\n## Global configurations\n\nIn your `APIEngine` class, `globalParams` is a set of configuration parameters that are applied globally to all endpoints unless overridden at the endpoint level. It allows you to define default settings that should be shared across multiple API calls. Here's how it works and how you can create it:\n\n### How `globalParams` Works:\n\n### 1. Request:\n\n-   Request defined in `globalParams.request` will be included in every request made by any endpoint unless overridden at the endpoint level. The params will be merged with the endpoint level params. If there's a conflict (i.e., the same header is defined in both global and endpoint parameters), the endpoint-specific header will override the global one.\n\n### 2. Retry Settings:\n\n-   Retry settings (except for the `retry` parameter) merge with the endpoint level retry settings. If an endpoint specifies its own retry settings, they will merge with the global retry settings, combining `retryCondition`. For the `retry` parameter instead, the endpoint level value will always overwrite the global level value.\n\n### 3. Stack Trace Extra Params:\n\n-   Stack trace extra params defined in `globalParams.stackTraceExtraParams` will merge with the endpoint level `stackTraceExtraParams` parameter;\n\n### 4. Request Interceptor:\n\n-   Request interceptor defined in `globalParams.requestInterceptor` will merge with the endpoint level `requestInterceptor` parameter. Both the methods will be extecuted. The endpoint level method will be executed at least;\n\n### 5. Response Interceptor:\n\n-   Response interceptor defined in `globalParams.responseInterceptor` will merge with the endpoint level `responseInterceptor` parameter. Both the methods will be extecuted. The endpoint level method will be executed at least.\n\n### How to Create `globalParams`:\n\nIn your `apiConstants` configuration file, you can define `globalParams` by providing default values for common parameters that should apply to all endpoints:\n\n```typescript\nconst apiConstants: ApiConstants = {\n    baseUrl: 'https://api.example.com',\n    globalParams: {\n        request: {\n            headers: {\n                Authorization: 'Bearer YOUR_ACCESS_TOKEN',\n                'Content-Type': 'application/json',\n            },\n        },\n        retry: 3,\n        retryCondition: [500, 502],\n        stackTraceLogExtraParams: {\n            extraParam: 'extraParam',\n        },\n        requestInterceptor: (requestConfig) => {\n            return requestConfig;\n        },\n        responseInterceptor: (response) => {\n            return response;\n        },\n    },\n    endpoints: {\n        // Define your endpoints here\n    },\n};\n\nexport default apiConstants;\n```\n\nIn this example:\n\n-   All requests will include an `Authorization` header with a bearer token and a `Content-Type` header with the value `application/json` unless overridden at the endpoint level;\n\n-   All requests will have a maximum of 3 retries, and retries will be attempted for HTTP status codes 500 and 502 unless overridden at the endpoint level;\n\n-   All requests will execute the method defined in `requestInterceptor`, merged with the endpoint level config, before the call is made;\n\n-   All requests will execute the method defined in `responseInterceptor`, merged with the endpoint level config, before the call is made.\n\n### Overriding `globalParams` at the Endpoint Level:\n\nYou can override global parameters at the endpoint level by providing endpoint-specific values in the `baseUrl`, `request`, `retry`, `retryCondition`, `stackTraceLogExtraParams`, `requestInterceptor` and `responseInterceptor` properties:\n\n```typescript\nconst apiConstants: ApiConstants = {\n    baseUrl: 'https://api.example.com',\n    globalParams: {\n        request: {\n            headers: {\n                Authorization: 'Bearer YOUR_ACCESS_TOKEN',\n                'Content-Type': 'application/json',\n            },\n        },\n        retry: 3,\n        retryCondition: [500, 502],\n        stackTraceLogExtraParams: {\n            extraParam: 'extraParam',\n        },\n        requestInterceptor: (requestConfig) => {\n            return requestConfig;\n        },\n        responseInterceptor: (response) => {\n            return response;\n        },\n    },\n    endpoints: {\n        getResource: {\n            path: '/posts/{id}',\n            request: {\n                method: 'GET', // Merges with global header\n                headers: {\n                    'Content-Type': 'application/json', // Overrides global header\n                    'Custom-Header': 'Custom-Value', // Merges with global header\n                },\n            },\n            retry: 1, // Overrides global retry for this endpoint\n            retryCondition: [400], // Merges global retryCondition for this endpoint\n        },\n        createResource: {\n            path: '/posts',\n            request: {\n                method: 'POST',\n            },\n            // ... other endpoint parameters\n            stackTraceLogExtraParams: {\n                extraParam: 'extraParam', // Merges with global stackTraceLogExtraParams\n            },\n            requestInterceptor: (requestConfig) => {\n                // Will be executed after global requestInterceptor\n                return requestConfig;\n            },\n            responseInterceptor: (response) => {\n                // Will be executed after global responseInterceptor\n                return response;\n            },\n        },\n        // ... other endpoints\n    },\n};\n\nexport default apiConstants;\n```\n\nThis flexibility allows you to define default settings globally while providing the option to customize settings for specific endpoints as needed.\n\n### Ignore `globalParams` at the endpoint level:\n\nIn the configuration file you can ignore global parameters for specific endpoints. This can be achieved through the ignoreGlobalParams property in your endpoint. When an endpoint is configured to ignore certain global parameters, it means that the values for those parameters won't be merged or overridden from the global settings into the endpoint-specific settings. Instead, the endpoint will use its own specified values for those parameters.\n\nHere's how to use this feature in your `apiConstants` configuration file:\n\n#### Configuration Example:\n\n```typescript\nconst apiConstants: ApiConstants = {\n    baseUrl: 'https://api.example.com',\n    globalParams: {\n        request: {\n            headers: {\n                Authorization: 'Bearer YOUR_ACCESS_TOKEN',\n                'Content-Type': 'application/json',\n            },\n        },\n        retry: 3,\n        retryCondition: [500, 502],\n    },\n    endpoints: {\n        getResource: {\n            path: '/posts/{id}',\n            request: {\n                method: 'GET',\n                headers: {\n                    'Custom-Header': 'Custom-Value',\n                },\n            },\n            // Ignore global retry settings for this endpoint\n            ignoreGlobalParams: ['retry'],\n        },\n        createResource: {\n            path: '/posts',\n            request: {\n                method: 'POST',\n            },\n            // Use global retry settings for this endpoint\n        },\n        // ... other endpoints\n    },\n};\n\nexport default apiConstants;\n```\n\n## Configure endpoints\n\nTo interact with different API endpoints, you can configure each endpoint in the `endpoints` property of your `apiConstants` configuration file. Each endpoint is defined by a key-value pair, where the key is the endpoint identifier, and the value is an object containing the configuration details.\n\n### Example Configuration:\n\n```typescript\nconst apiConstants: ApiConstants = {\n    baseUrl: 'https://api.example.com',\n    globalParams: {\n        // Global parameters (request, retry, etc.)\n    },\n    endpoints: {\n        getResource: {\n            path: '/posts/{id}', // Relative path, supports path parameters like {id}\n            request: {\n                method: 'GET', // HTTP method (GET, POST, etc.)\n                headers: {\n                    'Custom-Header': 'Custom-Value',\n                },\n            },\n            retry: 3, // Number of retry attempts\n            retryCondition: [500, 502], // Retry conditions (HTTP status codes)\n            ignoreGlobalParams: ['retry'], // Ignore specific global parameters for this endpoint\n            stackTraceExtraParams: {\n                // Will set extra parameters to stack trace logs\n                extraParam: 'extraParam',\n            },\n            requestInterceptor: (requestConfig) => {\n                // Will modify the endpoint configuration before the API is called\n                return requestConfig;\n            },\n            responseInterceptor: (response) => {\n                // Will handle the API response\n                return response;\n            },\n        },\n        createResource: {\n            path: '/posts',\n            request: {\n                method: 'POST',\n                headers: {\n                    'Content-Type': 'application/json',\n                },\n                body: JSON.stringify({\n                    title: 'foo',\n                    body: 'bar',\n                    userId: 1,\n                }),\n            },\n            // ... other endpoint parameters\n        },\n        otherEndpoint: {\n            baseUrl: 'api.custom.com', // Will override global baseUrl\n            path: '/posts',\n            request: {\n                method: 'POST',\n                headers: {\n                    'Content-Type': 'application/json',\n                },\n            },\n            // ... other endpoint parameters\n        },\n        // ... other endpoints\n    },\n};\n\nexport default apiConstants;\n```\n\n### Configurable Endpoint Parameters:\n\n-   **baseUrl**: Ovverride the global baseUrl;\n\n-   **path**: Relative path of the endpoint. Supports path parameters like `{id}`;\n\n-   **request**: Configuration for the HTTP request, including method, headers, and body;\n\n-   **retry**: Number of retry attempts for the endpoint;\n\n-   **retryCondition**: Retry conditions based on HTTP status codes;\n\n-   **ignoreGlobalParams**: Ignore specific global parameters for this endpoint;\n\n-   **stackTraceExtraParams**: Adds extra parameters to stack trace logs;\n\n-   **requestInterceptor**: Modifies the endpoint request configuration;\n\n-   **responseInterceptor**: Handle the response data.\n\n### Using Endpoints in Your Application:\n\nAfter configuring your endpoints, you can use the `call` method of your `APIEngine` class to make API calls using these endpoint configurations. The `call` method takes two parameters:\n\nParameters:\n\n-   **type (string)**: The identifier of the endpoint you want to call.\n\n-   **parameters (ApiParameters | undefined)**: (Optional) Additional parameters for the API call, such as path query parameters, headers, and request body.\n\n```typescript\n// Assuming you have initialized your API instance as apiInstance\nconst getResourceResponse = await apiInstance.call('getResource', { pathQueryParameters: [{ name: 'id', value: '123' }] });\nconsole.log('getResource Response:', getResourceResponse);\n\nconst createResourceResponse = await apiInstance.call('createResource');\nconsole.log('createResource Response:', createResourceResponse);\n```\n\n### `pathQueryParameters` Parameter:\n\n-   **Type**: `Parameter[]`;\n-   **Description**: An array of objects representing path and query parameters to be included in the API call's URL.\n\n#### `PathQueryParameters` Object:\n\n-   **Type**: `{ name: string, value: string }`;\n-   **Description**: An object representing a path or query parameter.\n    -   `name`: The name of the parameter (e.g., `{id}` for a path parameter or `userId` for a query parameter);\n    -   `value`: The value of the parameter.\n\n#### Example Usage:\n\n```typescript\nconst apiParameters: Parameter[] = {\n    pathQueryParameters: [\n        { name: 'id', value: '123' }, // Path parameter\n        { name: 'userId', value: '456' }, // Query parameter\n    ],\n    // ... other parameters\n};\n\nconst getResourceResponse = await apiInstance.call('getResource', apiParameters);\n```\n\nIn this example:\n\n-   The `pathQueryParameters` array includes two objects:\n\n    -   `{ name: 'id', value: '123' }`: A path parameter with the name `id` and value `123`.\n    -   `{ name: 'userId', value: '456' }`: A query parameter with the name `userId` and value `456`.\n\nThese parameters are then used to construct the URL for the API call, with path parameters replacing placeholders in the endpoint's path, and query parameters appended to the URL.\n\n### Per-param encoding control\n\nEach element of `pathQueryParameters` can specify an optional `encode` flag to control URL encoding. The flag defaults to `true` for backward compatibility. When `encode` is set to `false`, the value is injected into the path without applying `encodeURIComponent`.\n\n#### Example\n\n```typescript\n// Previous behaviour (default encoding)\npath: '/api/search/products{queryParams}'\nserviceParams: {\n  pathQueryParameters: [\n    { name: 'queryParams', value: '?a=1&b=2' } // will be URL-encoded\n  ]\n}\n\n// With encode set to false\npath: '/api/search/products{queryParams}'\nserviceParams: {\n  pathQueryParameters: [\n    { name: 'queryParams', value: '?a=1&b=2', encode: false } // raw injection\n  ]\n}\n```\n\nEmpty, undefined or null values remove the related placeholder and the library normalizes the resulting URL to avoid leftover separators. When `encode` is `false` and the value is an array, it will be serialized using `Array.prototype.join(',')` before being injected.\n\n## Stack Trace Functionality\n\nThe stack trace functionality offers a comprehensive logging mechanism for API calls, capturing essential details throughout the request-response lifecycle. This functionality creates a detailed log entry for each API interaction.\n\n### Logged informations\n\nThis functionality constructs a structured log entry, encompassing various aspects of an API call:\n\n-   **Timing Information**: Captures the start and end timestamps of the API call;\n-   **Request Details**: Includes the request URL, headers, body ecc;\n-   **Response Details**: Encompasses response headers, body, HTTP status code ecc;\n-   **Error Handling**: Records any errors that occur during the API call;\n-   **Extra Parameters**: Allows you to include additional context-specific information.\n\n#### Trace data model\n\n```typescript\n[\n    {\n        startTimestamp: string, // The timestamp when the API call started\n        endTimestamp: string, // The timestamp when the API call ended\n        requestUrl: string, // The URL of the API request\n        requestHeaders: HeadersInit, // Headers sent in the API request\n        responseHeaders: Headers, // Headers received in the API response\n        requestBody: BodyInit, // The body of the API request\n        responseBody: BodyInit, // The body of the API response\n        responseStatusCode: number, // The HTTP status code of the API response\n        errorMessage: string | unknown, // Any error that occurred during the API call\n        extraProperties: object, // Extra parameters specific to the stack trace log, as provided by stackTraceLogExtraParams\n    },\n];\n```\n\n### Usage\n\n```typescript\n// Initialize the API class\nconst api = new API(apiConstants);\n\n// Perform API calls\nawait api.call('getResource');\nawait api.call('createResource', {\n    /* parameters */\n});\n\n// Retrieve the stack trace log\nconst stackTraceLog = api.getStackTraceLog();\n\n// Utilize log entries for analysis or debugging\nconsole.log(stackTraceLog);\n```\n\nOr you can also use a callback to save the stack trace logs:\n```typescript\n// Define the stack trace log array\nconst stackTraceLog: StackTrace[] = [];\n\n// Define the stackTraceCallback\nconst stackTraceCallback = (_stackTraceLog: StackTrace) => {\n    stackTraceLog.push(_stackTraceLog);\n}\n\n// Initialize the API class\nconst api = new API(apiConstants, stackTraceCallback);\n\n// Perform API calls\nawait api.call('getResource');\nawait api.call('createResource', {\n    /* parameters */\n});\n\n// Utilize log entries for analysis or debugging\nconsole.log(stackTraceLog);\n```\n\nBy leveraging this stack trace functionality, you can effectively trace the execution flow of API calls, examine request-response details, and diagnose errors, enhancing the overall visibility and debuggability of the API integration process.\n\n## Contributing\n\nVia pull request to this repository.\n\n## To-Do (upcoming changes)\n\nNone\n\n## Licensing\n\n[MIT](https://github.com/3sydev/api_engine?tab=MIT-1-ov-file)\n","readmeFilename":"README.md"}