{"_id":"@adobe/spacecat-shared-aa-api-client","_rev":"17-ed65fc06882dca671bb30ef93702d7af","name":"@adobe/spacecat-shared-aa-api-client","dist-tags":{"latest":"1.0.0-test.2"},"versions":{"1.0.0-test":{"name":"@adobe/spacecat-shared-aa-api-client","version":"1.0.0-test","author":"","license":"Apache-2.0","_id":"@adobe/spacecat-shared-aa-api-client@1.0.0-test","maintainers":[{"name":"djaeggi","email":"djaeggi@adobe.com"},{"name":"adobehalls","email":"halls@adobe.com"},{"name":"fullcolorcoder","email":"bradjohn@adobe.com"},{"name":"marbec","email":"mabecker@adobe.com"},{"name":"tripod","email":"tripod@bocanegra.ch"},{"name":"garthdb","email":"garthdb@gmail.com"},{"name":"lazd","email":"lazdnet@gmail.com"},{"name":"adobe-admin","email":"grp-opensourceoffice@adobe.com"},{"name":"patrickfulton","email":"patrickfulton@gmail.com"},{"name":"trieloff","email":"lars@trieloff.net"},{"name":"shazron","email":"shazron@gmail.com"},{"name":"krisnye","email":"krisnye@gmail.com"},{"name":"dcpfsdk","email":"dcpfsdk@adobe.com"},{"name":"natebaldwin","email":"natebaldwindesign@gmail.com"},{"name":"devongovett","email":"devongovett@gmail.com"},{"name":"aspro83","email":"danniintheus@gmail.com"},{"name":"symanovi","email":"symanovi@adobe.com"},{"name":"dpfister","email":"dominique.pfister@gmail.com"},{"name":"stefan-guggisberg","email":"sg@adobe.com"},{"name":"korra","email":"npmjs.karo@cupdev.net"},{"name":"rofe","email":"npm@rofe.com"},{"name":"kptdobe","email":"kptdobe@gmail.com"}],"homepage":"https://github.com/adobe/spacecat-shared#readme","bugs":{"url":"https://github.com/adobe/spacecat-shared/issues"},"dist":{"shasum":"3df793643992fcf3857e7ac3ff1ecac1deaa9930","tarball":"https://registry.npmjs.org/@adobe/spacecat-shared-aa-api-client/-/spacecat-shared-aa-api-client-1.0.0-test.tgz","fileCount":10,"integrity":"sha512-kJtxs0q92mDjrWV5RIxi0f8nyADrFnkusl3X/c61JlhMVKPnuBMC/ytensnt0lEDAZQEmPbL9CGMNcIK/AI1/w==","signatures":[{"sig":"MEUCIBtegi62quCz2qn3f1HtmiPCii/nTMnz3cVpio6ST6osAiEA3A7FzUuJbLoZmWWd9bGostAc+4EG5K2jN3k9Ne9tc5E=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":36979},"main":"src/index.js","type":"module","mocha":{"spec":"test/*.test.js","require":"test/setup-env.js","reporter":"mocha-multi-reporters","reporter-options":"configFile=.mocha-multi.json"},"types":"src/index.d.ts","gitHead":"8c8ec2691785d629ff04a94873d160cf7ec0c9d3","scripts":{"lint":"eslint .","test":"c8 mocha","clean":"rm -rf package-lock.json node_modules"},"_npmUser":{"name":"djaeggi","email":"djaeggi@adobe.com"},"repository":{"url":"git+https://github.com/adobe/spacecat-shared.git","type":"git"},"_npmVersion":"10.2.4","description":"Shared modules of the Spacecat Services - Adobe Ananlytics API client","directories":{},"_nodeVersion":"20.11.0","dependencies":{"aws4":"1.12.0","@adobe/fetch":"4.1.1","@adobe/helix-universal":"4.4.1","@adobe/helix-shared-wrap":"2.0.1","@adobe/spacecat-shared-utils":"1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"chai":"4.4.1","nock":"13.5.1","sinon":"17.0.1","sinon-chai":"3.7.0","typescript":"5.3.3","chai-as-promised":"7.1.1"},"_npmOperationalInternal":{"tmp":"tmp/spacecat-shared-aa-api-client_1.0.0-test_1707300739418_0.7585055219846446","host":"s3://npm-registry-packages"}},"1.0.0-test.2":{"name":"@adobe/spacecat-shared-aa-api-client","version":"1.0.0-test.2","author":"","license":"Apache-2.0","_id":"@adobe/spacecat-shared-aa-api-client@1.0.0-test.2","maintainers":[{"name":"djaeggi","email":"djaeggi@adobe.com"},{"name":"adobehalls","email":"halls@adobe.com"},{"name":"fullcolorcoder","email":"bradjohn@adobe.com"},{"name":"marbec","email":"mabecker@adobe.com"},{"name":"tripod","email":"tripod@bocanegra.ch"},{"name":"garthdb","email":"garthdb@gmail.com"},{"name":"lazd","email":"lazdnet@gmail.com"},{"name":"adobe-admin","email":"grp-opensourceoffice@adobe.com"},{"name":"patrickfulton","email":"patrickfulton@gmail.com"},{"name":"trieloff","email":"lars@trieloff.net"},{"name":"shazron","email":"shazron@gmail.com"},{"name":"krisnye","email":"krisnye@gmail.com"},{"name":"dcpfsdk","email":"dcpfsdk@adobe.com"},{"name":"natebaldwin","email":"natebaldwindesign@gmail.com"},{"name":"devongovett","email":"devongovett@gmail.com"},{"name":"aspro83","email":"danniintheus@gmail.com"},{"name":"symanovi","email":"symanovi@adobe.com"},{"name":"dpfister","email":"dominique.pfister@gmail.com"},{"name":"stefan-guggisberg","email":"sg@adobe.com"},{"name":"korra","email":"npmjs.karo@cupdev.net"},{"name":"rofe","email":"npm@rofe.com"},{"name":"kptdobe","email":"kptdobe@gmail.com"}],"homepage":"https://github.com/adobe/spacecat-shared#readme","bugs":{"url":"https://github.com/adobe/spacecat-shared/issues"},"dist":{"shasum":"475a9eee77adf1fdd246594fcee8a613b72aaff7","tarball":"https://registry.npmjs.org/@adobe/spacecat-shared-aa-api-client/-/spacecat-shared-aa-api-client-1.0.0-test.2.tgz","fileCount":10,"integrity":"sha512-yVEyUHXtlfgn2qsc2yeQgUbSUoINjp2lEeEme6t/dBfmhw5lV6ublHOybEBbO+20OHgVpTs0d0K17o0oQftUvA==","signatures":[{"sig":"MEUCIHkUKEgfR4bDzbSkSL9T/Mp0odQQnTfdzSBaYgQSMclcAiEAw1g/YoobT2Q0Z/hJ2DSCFgtXbXdU2zX1Qtd9NtWHQfk=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":35678},"main":"src/index.js","type":"module","mocha":{"spec":"test/*.test.js","require":"test/setup-env.js","reporter":"mocha-multi-reporters","reporter-options":"configFile=.mocha-multi.json"},"types":"src/index.d.ts","gitHead":"41b306c8e3c71d5b1e2a56065c62866577cb94b2","scripts":{"lint":"eslint .","test":"c8 mocha","clean":"rm -rf package-lock.json node_modules"},"_npmUser":{"name":"djaeggi","email":"djaeggi@adobe.com"},"repository":{"url":"git+https://github.com/adobe/spacecat-shared.git","type":"git"},"_npmVersion":"10.2.4","description":"Shared modules of the Spacecat Services - Adobe Ananlytics API client","directories":{},"_nodeVersion":"20.11.0","dependencies":{"aws4":"1.12.0","node-fetch":"^3.3.2","@adobe/fetch":"4.1.1","@adobe/helix-universal":"4.4.1","@adobe/helix-shared-wrap":"2.0.1","@adobe/spacecat-shared-utils":"1.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"chai":"4.4.1","nock":"13.5.1","sinon":"17.0.1","sinon-chai":"3.7.0","typescript":"5.3.3","chai-as-promised":"7.1.1"},"_npmOperationalInternal":{"tmp":"tmp/spacecat-shared-aa-api-client_1.0.0-test.2_1707407159653_0.43913309311159954","host":"s3://npm-registry-packages"}}},"time":{"created":"2024-02-07T10:12:19.312Z","modified":"2026-07-08T08:13:12.815Z","1.0.0-test":"2024-02-07T10:12:19.582Z","1.0.0-test.2":"2024-02-08T15:45:59.854Z"},"bugs":{"url":"https://github.com/adobe/spacecat-shared/issues"},"license":"Apache-2.0","homepage":"https://github.com/adobe/spacecat-shared#readme","repository":{"url":"git+https://github.com/adobe/spacecat-shared.git","type":"git"},"description":"Shared modules of the Spacecat Services - Adobe Ananlytics API client","maintainers":[{"email":"mabecker@adobe.com","name":"marbec"},{"email":"tripod@bocanegra.ch","name":"tripod"},{"email":"garthdb@gmail.com","name":"garthdb"},{"email":"lazdnet@gmail.com","name":"lazd"},{"email":"grp-opensourceoffice@adobe.com","name":"adobe-admin"},{"email":"patrickfulton@gmail.com","name":"patrickfulton"},{"email":"lars@trieloff.net","name":"trieloff"},{"email":"krisnye@gmail.com","name":"krisnye"},{"email":"dcpfsdk@adobe.com","name":"dcpfsdk"},{"email":"natebaldwindesign@gmail.com","name":"natebaldwin"},{"email":"devongovett@gmail.com","name":"devongovett"},{"email":"danniintheus@gmail.com","name":"aspro83"},{"email":"symanovi@adobe.com","name":"symanovi"},{"email":"dominique.pfister@gmail.com","name":"dpfister"},{"email":"sg@adobe.com","name":"stefan-guggisberg"},{"email":"npm@rofe.com","name":"rofe"},{"email":"kptdobe@gmail.com","name":"kptdobe"},{"email":"halls@adobe.com","name":"adobehalls"},{"email":"bradjohn@adobe.com","name":"fullcolorcoder"},{"email":"djaeggi@adobe.com","name":"djaeggi"},{"email":"dylandepass@gmail.com","name":"dylandepass"},{"email":"mhaack@adobe.com","name":"mhaack"},{"email":"amol@adobe.com","name":"amol-anand"},{"email":"stopp@adobe.com","name":"stopp-adobe"},{"email":"namarora@adobe.com","name":"namarora"},{"email":"doten@adobe.com","name":"doten"},{"email":"schmidt@adobe.com","name":"duh_schmidt"},{"email":"astha.bhargava23@gmail.com","name":"asthabh23"},{"email":"zouhir.dahbi@outlook.com","name":"zdahbi"},{"email":"tuicu@adobe.com","name":"tuicu"},{"email":"fmeschbe@adobe.com","name":"fmeschbe"}],"readme":"# Spacecat Shared - ADobe Analytics API Client\n\nA JavaScript client for Adobe Analytics API, part of the SpaceCat Shared library.\n\n## Installation\n\nInstall the package using npm:\n\n```bash\nnpm install @adobe/spacecat-shared-aa-api-client\n```\n\n## Usage\n\n### Creating and instance from Helix UniversalContext\n\n```js\nconst context = {}; // Your AWS Lambda context object\nconst aaApiClient = AAAPIClient.createFrom(context);\n\n```\n\n### Constructor\n\n`AAAPIClient` class needs AA API domain key to be instantiated:\n\n```js\nconst domainKey = \"your-domain-key\";\nconst aaApiClient = new AAAPIClient(domainKey);\n```\n\n### Creating a AA Backlink\n\n```js\nconst url = \"https://example.com\";\nconst expiryInDays = 7;\n\nconst backlink = await aaApiClient.createRUMBacklink(url, expiryInDays);\nconsole.log(`Backlink created: ${backlink}`)\n```\n\n### Creating a 404 Report Backlink\n\n```js\nconst url = \"https://example.com\";\nconst expiryInDays = 7;\n\nconst backlink = await aaApiClient.create404Backlink(url, expiryInDays);\nconsole.log(`Backlink created: ${backlink}`)\n```\n\n### Getting RUM Dashboard Data\n\n```js\nconst url = \"example.com\";\n\nconst rumData = await rumApiClient.getRUMDashboard({ url });\nconsole.log(`RUM data: ${rumData}`)\n```\n\n### Getting 404 checkpoints\n\n```js\nconst url = \"example.com\";\n\nconst backlink = await rumApiClient.get404Sources({ url });\nconsole.log(`404 Checkpoints: ${backlink}`)\n```\n\n### Getting Edge Delivery Services Domains\n\n```js\nconst url = \"all\";\n\nconst domains = await rumApiClient.getDomainList({}, url);\nconsole.log(`Backlink created: ${backlink}`)\n```\n\n## Testing\nRun the included tests with the following command:\n```\nnpm test\n```\n\n## Linting\nLint the codebase using:\n```\nnpm run lint\n```\n\n## Cleaning\nTo clean the package (remove `node_modules` and `package-lock.json`):\n```\nnpm run clean\n```\n\n## Repository\nFind the source code and contribute [here](https://github.com/adobe/spacecat-shared.git).\n\n## Issues\nReport issues or bugs [here](https://github.com/adobe/spacecat-shared/issues).\n\n## License\nThis project is licensed under the Apache-2.0 License.\n","readmeFilename":"README.md"}