{"_id":"@elevantiq/storyblok-deep-relations-resolver","_rev":"1-c1e2937eb1a14569610a5a34edf60553","name":"@elevantiq/storyblok-deep-relations-resolver","dist-tags":{"latest":"2.2.1"},"versions":{"2.2.0":{"name":"@elevantiq/storyblok-deep-relations-resolver","version":"2.2.0","author":{"name":"David Höck","email":"d.hoeck@elevantiq.com"},"license":"MIT","_id":"@elevantiq/storyblok-deep-relations-resolver@2.2.0","maintainers":[{"name":"elevantiq_team","email":"engineering@elevantiq.com"}],"homepage":"https://github.com/elevantiq/storyblok-storyblok-deep-relations-resolver#readme","bugs":{"url":"https://github.com/elevantiq/storyblok-storyblok-deep-relations-resolver/issues"},"dist":{"shasum":"2cdb2a714f9843bfa5de2bac1737a2b7cb4a2643","tarball":"https://registry.npmjs.org/@elevantiq/storyblok-deep-relations-resolver/-/storyblok-deep-relations-resolver-2.2.0.tgz","fileCount":6,"integrity":"sha512-mFfVAlz2c/YwgDF0dFobdGhqDynNGqJrRLHRHi2frjwXdv654FsgHEfka0a2xFihVsYgNfKvD7yi03bd3Fanmg==","signatures":[{"sig":"MEQCIDphlLMGv9WNiI+tcyYgEWOTV21DypM3A+/TglsZ8AsoAiBHhaoGA+HLEip4Yc9FoCo44Xh3U773y+0MQoO0fOcvyA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":6034},"main":"./dist/index.js","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"gitHead":"d0715c0c62ba8de3e0b2dcb0992d6ef8d53d06aa","release":{"branches":["main"]},"scripts":{"build":"vite build","publish":"npm publish --access public --scope @elevantiq"},"_npmUser":{"name":"elevantiq_team","email":"engineering@elevantiq.com"},"repository":{"url":"git+https://github.com/elevantiq/storyblok-storyblok-deep-relations-resolver.git"},"_npmVersion":"10.8.3","description":"Resolve relations more than 2 levels deep","directories":{},"_nodeVersion":"22.9.0","_hasShrinkwrap":false,"packageManager":"pnpm@8.15.6","devDependencies":{"path":"^0.12.7","vite":"^5.2","@types/node":"^20.14.2","vite-plugin-dts":"^4.3.0","@tsconfig/recommended":"^1.0.2","@alpin11/eslint-config":"^0.6.2"},"peerDependencies":{"react":"^17.0.0 || ^18.0.0","react-dom":"^17.0.0 || ^18.0.0","@storyblok/react":"^3.0.0 || ^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/storyblok-deep-relations-resolver_2.2.0_1733931359846_0.7918626378126801","host":"s3://npm-registry-packages-npm-production"}},"2.2.1":{"name":"@elevantiq/storyblok-deep-relations-resolver","version":"2.2.1","repository":{"url":"git+https://github.com/elevantiq/storyblok-storyblok-deep-relations-resolver.git"},"author":{"name":"David Höck","email":"d.hoeck@elevantiq.com"},"license":"MIT","description":"Resolve relations more than 2 levels deep","main":"./dist/index.js","module":"./dist/index.mjs","types":"./dist/index.d.ts","packageManager":"pnpm@8.15.6","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"}},"scripts":{"build":"rm -rf dist && vite build","publish":"npm publish --access public --scope @elevantiq"},"release":{"branches":["main"]},"peerDependencies":{"@storyblok/react":"^4.0.0"},"devDependencies":{"@alpin11/eslint-config":"^0.6.2","@tsconfig/recommended":"^1.0.2","@types/node":"^20.14.2","path":"^0.12.7","vite":"^5.2","vite-plugin-dts":"^4.3.0","@storyblok/react":"^4.4.0"},"_id":"@elevantiq/storyblok-deep-relations-resolver@2.2.1","gitHead":"721456fb45188c2428f5029089a9978ee5d12bdb","bugs":{"url":"https://github.com/elevantiq/storyblok-storyblok-deep-relations-resolver/issues"},"homepage":"https://github.com/elevantiq/storyblok-storyblok-deep-relations-resolver#readme","_nodeVersion":"23.6.0","_npmVersion":"10.9.2","dist":{"integrity":"sha512-8wfCUd9kGVB3+wMMG8xBisdINpvrGRRNz/kusGILXA6KZ1jHM6hMdIU5ASfYLQAXovWsvbn3GxzujM1OSmR6iQ==","shasum":"7fa2f122040033af3d7a06a96f2faec89f47f4e3","tarball":"https://registry.npmjs.org/@elevantiq/storyblok-deep-relations-resolver/-/storyblok-deep-relations-resolver-2.2.1.tgz","fileCount":6,"unpackedSize":6826,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQD/XZ8G4+a/xubtTEOtBXxiaj/HAl9qZcZI/gRG6DSgKwIgCrwng/kmkenTtnfBI6RTa4u6Xk3iiYXbHsWpgdCh7LE="}]},"_npmUser":{"name":"elevantiq_team","email":"engineering@elevantiq.com"},"directories":{},"maintainers":[{"name":"elevantiq_team","email":"engineering@elevantiq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/storyblok-deep-relations-resolver_2.2.1_1741005014433_0.04986683032108563"},"_hasShrinkwrap":false}},"time":{"created":"2024-12-11T15:35:59.742Z","modified":"2025-03-03T12:30:14.770Z","2.2.0":"2024-12-11T15:36:00.036Z","2.2.1":"2025-03-03T12:30:14.602Z"},"bugs":{"url":"https://github.com/elevantiq/storyblok-storyblok-deep-relations-resolver/issues"},"author":{"name":"David Höck","email":"d.hoeck@elevantiq.com"},"license":"MIT","homepage":"https://github.com/elevantiq/storyblok-storyblok-deep-relations-resolver#readme","repository":{"url":"git+https://github.com/elevantiq/storyblok-storyblok-deep-relations-resolver.git"},"description":"Resolve relations more than 2 levels deep","maintainers":[{"name":"elevantiq_team","email":"engineering@elevantiq.com"}],"readme":"<p align=\"center\">\n  <a href=\"https://www.elevantiq.com\">\n  <picture >\n    <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://github.com/elevantiq/.github/raw/main/brand/logo-light.png\">\n    <source  media=\"(prefers-color-scheme: light)\" srcset=\"https://github.com/elevantiq/.github/raw/main/brand/logo-dark.png\">\n    <img height=\"40\" width=\"auto\" alt=\"Elevantiq Logo\" src=\"https://github.com/elevantiq/.github/raw/main/brand/logo-dark.png\">\n    </picture>\n  </a>\n</p>\n\n<h1 align=\"center\">\n  Storyblok Deep Relations Resolver\n</h1>\n\n<p align=\"center\">\nThe Storyblok Deep Relations Resolver is a TypeScript library that resolves relations on <i>more than 2 levels</i> in Storyblok's API responses. It enables developers to \neasily access nested data from the API responses, making it easier to\nwork with complex data structures.\n</p>\n<p align=\"center\">\n    <img src=\"https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat\" alt=\"PRs welcome!\" />\n  <a href=\"https://x.com/intent/follow?screen_name=elevantiq\">\n    <img src=\"https://img.shields.io/twitter/follow/elevantiq.svg?label=Follow%20@elevantiq\" alt=\"Follow @elevantiq\" />\n  </a>\n</p> \n\n## Installation\n\nTo install the package, run the following command:\n\n```bash\nnpm install @elevantiq/storyblok-deep-relations-resolver\n\n# or with yarn\n\nyarn add @elevantiq/storyblok-deep-relations-resolver\n```\n\n## Usage\n\nTo use the package, simply import it into your project and use the resolve function to resolve the deep relations in\nyour Storyblok API responses.\n\n```typescript\nimport {resolveRelationsDeep} from '@elevantiq/storyblok-deep-relations-resolver'\n\nconst storyblokApi = getStoryblokApi()\n\n// format: <component>.<field>\nexport const deepRelations = [\n    'articlesTeaser.articles',\n    'article.author',\n    'article.category',\n    'primaryContactTeaser.contactPerson',\n]\n\nconst {data: preResolveData} = await storyblokApi.get(`cdn/stories/${slug}`, sbParams)\n\nconst deepResolvedData = await resolveRelationsDeep(storyblokApi, preResolveData, deepRelations)\n```\n\nFor more information on how to use the package, see the documentation.\n\n## Contributing\n\nIf you would like to contribute to the project, please follow these steps:\n\n- Fork the repository\n- Create a new branch for your changes\n- Make your changes and commit them with clear commit messages\n- Push your changes to your forked repository\n- Submit a pull request\n\n## License\n\nThis project is licensed under the [MIT License](./LICENSE.md).\n\n## Reporting Bugs\n\nIf you find any bugs or issues with the package, please report them by creating a new issue on the GitHub issue tracker.\n\n## Contact\n\nIf you have any questions or feedback, feel free to contact us at our GitHub profile.\n","readmeFilename":"README.md"}