{"_id":"@aopslabs/api-client","_rev":"4-0fb1aba900006b5060753a69ce7bf959","name":"@aopslabs/api-client","dist-tags":{"latest":"0.2.3"},"versions":{"0.2.0":{"name":"@aopslabs/api-client","version":"0.2.0","license":"SEE LICENSE IN LICENSE","_id":"@aopslabs/api-client@0.2.0","maintainers":[{"name":"mzsonmez","email":"mzsonmez2@hotmail.com"}],"homepage":"https://github.com/eeemzs/aops-platform#readme","bugs":{"url":"https://github.com/eeemzs/aops-platform/issues"},"dist":{"shasum":"0d4bc038c0d7e599cdbc0ea940e2b726ee12f8c5","tarball":"https://registry.npmjs.org/@aopslabs/api-client/-/api-client-0.2.0.tgz","fileCount":6,"integrity":"sha512-68HPC4oHY2XiM7ygd4Fe+0zAzBppCFvcRe/OfevTiz8ulzMrI69Dd0dDYd0we9zFDRoc0cFGXj5IJRct2BxCdw==","signatures":[{"sig":"MEUCID0OSsZbJSDhVITM18PpPmOPzIcKqzXgCS2Cu2zbNyRxAiEA1nNNz3xbORtiT2T4PFDQDhDU9bkF+oAuZsLEaDzi/ZM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":23003},"main":"./dist/index.js","type":"module","_from":"file:S:/dev-js2/tmp/aops-public-closure-20260804-rr6/aopslabs-api-client-0.2.0.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./package.json":"./package.json"},"private":false,"scripts":{"build":"tsc -b tsconfig.lib.json"},"_npmUser":{"name":"mzsonmez","email":"mzsonmez2@hotmail.com"},"_resolved":"S:\\dev-js2\\tmp\\aops-public-closure-20260804-rr6\\aopslabs-api-client-0.2.0.tgz","_integrity":"sha512-68HPC4oHY2XiM7ygd4Fe+0zAzBppCFvcRe/OfevTiz8ulzMrI69Dd0dDYd0we9zFDRoc0cFGXj5IJRct2BxCdw==","repository":{"url":"git+https://github.com/eeemzs/aops-platform.git","type":"git","directory":"apps/aops/packages/aops-api-client"},"_npmVersion":"11.6.4","description":"Shared HTTP client for `aops-server` API (used by `aops-cli` + `aops-mcp`).","directories":{},"_nodeVersion":"22.18.0","publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/api-client_0.2.0_1785880854324_0.7189575695942056","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@aopslabs/api-client","version":"0.2.1","license":"SEE LICENSE IN LICENSE","_id":"@aopslabs/api-client@0.2.1","maintainers":[{"name":"mzsonmez","email":"mzsonmez2@hotmail.com"}],"homepage":"https://github.com/eeemzs/aops-platform#readme","bugs":{"url":"https://github.com/eeemzs/aops-platform/issues"},"dist":{"shasum":"08cc2692184f4687fe23250ee9a6d6c2146d0432","tarball":"https://registry.npmjs.org/@aopslabs/api-client/-/api-client-0.2.1.tgz","fileCount":6,"integrity":"sha512-hAZDMRJdBJbb9ajTleCzAiLB+cHqaZi04cwRCEm3aYlKM1ZlT1SsLg/EKY6aI848mhjYKaRgEVdfdinX2d41dw==","signatures":[{"sig":"MEUCIGAD7mmyYMaQQsbMTeprJv5SbOIQLwR5E2DXlIMmyj3VAiEAnNKD2+LNaQUjb2WwPiki3k315tUfn8U1IAzI/f7I2Mg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":26191},"main":"./dist/index.js","type":"module","_from":"file:S:/dev-js2/apps/aops-platform/.aops/review-artifacts/task198/leaf-candidates/91f44c05f59f776e83e8790a3d615e29203d4121/aopslabs-api-client-0.2.1.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./package.json":"./package.json"},"private":false,"scripts":{"build":"tsc -b tsconfig.lib.json"},"_npmUser":{"name":"mzsonmez","email":"mzsonmez2@hotmail.com"},"_resolved":"S:\\dev-js2\\apps\\aops-platform\\.aops\\review-artifacts\\task198\\leaf-candidates\\91f44c05f59f776e83e8790a3d615e29203d4121\\aopslabs-api-client-0.2.1.tgz","_integrity":"sha512-hAZDMRJdBJbb9ajTleCzAiLB+cHqaZi04cwRCEm3aYlKM1ZlT1SsLg/EKY6aI848mhjYKaRgEVdfdinX2d41dw==","repository":{"url":"git+https://github.com/eeemzs/aops-platform.git","type":"git","directory":"apps/aops/packages/aops-api-client"},"_npmVersion":"11.6.4","description":"Shared HTTP client for `aops-server` API (used by `aops-cli` + `aops-mcp`).","directories":{},"_nodeVersion":"22.18.0","publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/api-client_0.2.1_1786229388581_0.0856038010784661","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"name":"@aopslabs/api-client","version":"0.2.2","license":"SEE LICENSE IN LICENSE","_id":"@aopslabs/api-client@0.2.2","maintainers":[{"name":"mzsonmez","email":"mzsonmez2@hotmail.com"}],"homepage":"https://github.com/eeemzs/aops-platform#readme","bugs":{"url":"https://github.com/eeemzs/aops-platform/issues"},"dist":{"shasum":"e97aa587d73dc5e88b30e379236e4bf03b4eb00e","tarball":"https://registry.npmjs.org/@aopslabs/api-client/-/api-client-0.2.2.tgz","fileCount":6,"integrity":"sha512-5boPEDmznYFiRG2/2ocI8KhuCczbIyo9nlfysvxPs7Ht+qNBKZ1xEBHhGtbD0KbbejEy18pHSj+Up+MZG/bq7g==","signatures":[{"sig":"MEYCIQCS9pFhhVYWP1PBcMXEVljJKvpwqGCdXDRGdvNg2EbnfwIhANJ9U5F66fehAKyWLm7wJmTAeeGUNi0AVtX9GoM3+DV3","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":26426},"main":"./dist/index.js","type":"module","_from":"file:/home/runner/work/_temp/public-aops-accepted/aopslabs-api-client-0.2.2.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./package.json":"./package.json"},"private":false,"scripts":{"test":"node --eval \"const { rmSync } = require('node:fs'); rmSync('dist-test', { recursive: true, force: true });\" && tsc -p tsconfig.test.json && node --test dist-test/__tests__/index.test.js","build":"tsc -b tsconfig.lib.json","prepack":"npm run build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:d5d7beaa-6329-4e4c-8187-0ae2659c011f"}},"_resolved":"/home/runner/work/_temp/public-aops-accepted/aopslabs-api-client-0.2.2.tgz","_integrity":"sha512-5boPEDmznYFiRG2/2ocI8KhuCczbIyo9nlfysvxPs7Ht+qNBKZ1xEBHhGtbD0KbbejEy18pHSj+Up+MZG/bq7g==","repository":{"url":"git+https://github.com/eeemzs/aops-platform.git","type":"git","directory":"apps/aops/packages/aops-api-client"},"_npmVersion":"11.9.0","description":"Shared HTTP client for `aops-server` API (used by `aops-cli` + `aops-mcp`).","directories":{},"_nodeVersion":"22.18.0","publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/api-client_0.2.2_1787060658325_0.6483857828937734","host":"s3://npm-registry-packages-npm-production"}},"0.2.3":{"name":"@aopslabs/api-client","version":"0.2.3","type":"module","private":false,"main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{"./package.json":"./package.json",".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"license":"SEE LICENSE IN LICENSE","repository":{"type":"git","url":"git+https://github.com/eeemzs/tsapps.git","directory":"apps/aops-platform/apps/aops/packages/aops-api-client"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"devDependencies":{"@types/node":"^25.3.0","typescript":"5.9.3"},"scripts":{"build":"tsc -b tsconfig.lib.json","test":"node --eval \"const { rmSync } = require('node:fs'); rmSync('dist-test', { recursive: true, force: true });\" && tsc -p tsconfig.test.json && node --test dist-test/__tests__/index.test.js","typecheck":"tsc -p tsconfig.lib.json --noEmit --incremental false --composite false"},"_id":"@aopslabs/api-client@0.2.3","description":"Shared HTTP client for `aops-server` API (used by `aops-cli` + `aops-mcp`).","bugs":{"url":"https://github.com/eeemzs/tsapps/issues"},"homepage":"https://github.com/eeemzs/tsapps#readme","_integrity":"sha512-Oy9fb29RTifM3albnjUh5L12eFPhyVOrZpLpRptQ2iabYNZ2Su1Hwm4ni139RVbBoL73ZqpBzd1+fbGVrEAovA==","_resolved":"/tmp/tsapps-aops-publish-kxBErE/packs/aopslabs-api-client-0.2.3.tgz","_from":"file:/tmp/tsapps-aops-publish-kxBErE/packs/aopslabs-api-client-0.2.3.tgz","_nodeVersion":"24.19.0","_npmVersion":"11.9.0","dist":{"integrity":"sha512-Oy9fb29RTifM3albnjUh5L12eFPhyVOrZpLpRptQ2iabYNZ2Su1Hwm4ni139RVbBoL73ZqpBzd1+fbGVrEAovA==","shasum":"f4886c8ae7694f77cbac28137ccb0cd737f06da5","tarball":"https://registry.npmjs.org/@aopslabs/api-client/-/api-client-0.2.3.tgz","fileCount":6,"unpackedSize":26677,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIDL63mn0a1qv6O/Ewo+wK8umjb6/2losJcN5NM9A+/eRAiEA/pRibuTp/eb95pu4GoPH3AFXktJIWcYHiR3SDwZ4EBg="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:39b894b2-d876-4ca5-8353-950d96403288"}},"directories":{},"maintainers":[{"name":"mzsonmez","email":"mzsonmez2@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/api-client_0.2.3_1787777456264_0.48800398035714165"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-04T22:00:54.120Z","modified":"2026-08-26T20:50:56.553Z","0.2.0":"2026-08-04T22:00:54.455Z","0.2.1":"2026-08-08T22:49:48.710Z","0.2.2":"2026-08-18T13:44:18.503Z","0.2.3":"2026-08-26T20:50:56.389Z"},"bugs":{"url":"https://github.com/eeemzs/tsapps/issues"},"license":"SEE LICENSE IN LICENSE","homepage":"https://github.com/eeemzs/tsapps#readme","repository":{"type":"git","url":"git+https://github.com/eeemzs/tsapps.git","directory":"apps/aops-platform/apps/aops/packages/aops-api-client"},"description":"Shared HTTP client for `aops-server` API (used by `aops-cli` + `aops-mcp`).","maintainers":[{"name":"mzsonmez","email":"mzsonmez2@hotmail.com"}],"readme":"# @aopslabs/api-client\n\nShared HTTP client for `aops-server` API (used by `aops-cli` + `aops-mcp`).\n\n## What it provides\n- `joinUrl(baseUrl, path)` + `resolveApiBaseUrl(input?)`\n- `requestXfJson` / `postXfJson` (XfResult parsing + timeout)\n- `createAopsApiClient(...)` (Bearer auth header + optional refresh-on-401)\n- `runRemoteSessionDeviceLogin(...)` (same-origin OAuth device flow with PKCE)\n\n## Example\n```ts\nimport { createAopsApiClient } from '@aopslabs/api-client'\n\nconst api = createAopsApiClient({\n  baseUrl: 'http://localhost:5900',\n  getAccessToken: () => process.env.AOPS_API_ACCESS_TOKEN,\n  getRefreshToken: () => process.env.AOPS_API_REFRESH_TOKEN,\n  onTokenRefresh: async (tokens) => {\n    // persist tokens (config file, vault, etc)\n    console.log('refreshed', tokens.userId)\n  },\n})\n\nconst tooling = await api.fetchJson('/api/agent/tools')\nconsole.log(tooling)\n```\n","readmeFilename":"README.md"}