{"_id":"@buildinams/contentful-rest","_rev":"9-250bc22a209247baf40c76dc658ee34e","name":"@buildinams/contentful-rest","dist-tags":{"latest":"0.2.1"},"versions":{"0.0.1":{"name":"@buildinams/contentful-rest","version":"0.0.1","keywords":["contentful","REST","fetch"],"author":{"url":"https://www.buildinamsterdam.com/","name":"Build in Amsterdam","email":"development@buildinamsterdam.com"},"license":"MIT","_id":"@buildinams/contentful-rest@0.0.1","maintainers":[{"name":"paulomfj","email":"mfjpaulo@gmail.com"},{"name":"_brunotome_","email":"bruno@buildinamsterdam.com"},{"name":"buildinamsterdam","email":"maikel@buildinamsterdam.com"}],"homepage":"https://github.com/buildinamsterdam/contentful-rest#readme","bugs":{"url":"https://github.com/buildinamsterdam/contentful-rest/issues"},"dist":{"shasum":"ec75921e7e1e92046377b53980a7cfbb78238af6","tarball":"https://registry.npmjs.org/@buildinams/contentful-rest/-/contentful-rest-0.0.1.tgz","fileCount":39,"integrity":"sha512-AR5/7psls1Tl8ehgGMMfy4+sU2zriC2ObYWO1soKApkSswPkTzgQ31qJecp9U8qIdcjalf+Zx/wJjcwprxli8Q==","signatures":[{"sig":"MEYCIQD4uAe3lhyhAS+qFqtL2VMUj7czobjJmHoF6DTWVDaaiwIhAIAYVedfsZu8yn41RJ4qh27rYGjepEdeyBgLNr2PMA0o","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32736},"main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./types":{"types":"./dist/types.d.ts","import":"./dist/types.js"},"./getIndicatorProps":{"types":"./dist/getIndicatorProps.d.ts","import":"./dist/getIndicatorProps.js"}},"gitHead":"e8ff1158fcf3ce6c879dfe8354dc7eb245618319","scripts":{"lint":"eslint \"src/**/*.{ts,tsx,js,jsx}\"","test":"jest","build":"tsc","coverage":"jest --coverage","depcheck":"npx npm-check --update","lint:fix":"eslint --fix \"src/**/*.{ts,tsx,js,jsx}\"","prettier":"prettier --check --ignore-unknown .","test:watch":"jest --watch","build:types":"tsc --emitDeclarationOnly","prettier:fix":"prettier --write --ignore-unknown .","prepublishOnly":"npm run build","lint:type-check":"tsc --noEmit"},"_npmUser":{"name":"paulomfj","email":"mfjpaulo@gmail.com"},"repository":{"url":"git+https://github.com/buildinamsterdam/contentful-rest.git","type":"git"},"_npmVersion":"10.2.3","description":"Contentful REST API","directories":{},"_nodeVersion":"18.19.0","dependencies":{"contentful":"^10.6.16","json-stringify-safe":"^5.0.1","contentful-resolve-response":"^1.8.1","@buildinams/contentful-graphql":"^0.0.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.4.1","babel":"^6.23.0","ts-jest":"^29.0.3","ts-node":"^10.9.1","react-dom":"^18.0.0","typescript":"^4.9.5","@types/jest":"^29.4.0","@types/node":"^18.11.18","npm-run-all":"^4.1.5","@types/react":"^18.0.27","@buildinams/lint":"^0.4.0","@types/react-dom":"^18.0.10","@babel/preset-env":"^7.20.2","@testing-library/react":"^13.4.0","eslint-plugin-prettier":"^5.1.2","jest-environment-jsdom":"^29.4.1","@babel/preset-typescript":"^7.18.6","@types/json-stringify-safe":"^5.0.3","@types/contentful-resolve-response":"^0.1.33"},"peerDependencies":{"react":">=17.0.0 || 18"},"_npmOperationalInternal":{"tmp":"tmp/contentful-rest_0.0.1_1704717453013_0.13671258604403458","host":"s3://npm-registry-packages"}},"0.0.2":{"name":"@buildinams/contentful-rest","version":"0.0.2","keywords":["contentful","REST","fetch"],"author":{"url":"https://www.buildinamsterdam.com/","name":"Build in Amsterdam","email":"development@buildinamsterdam.com"},"license":"MIT","_id":"@buildinams/contentful-rest@0.0.2","maintainers":[{"name":"paulomfj","email":"mfjpaulo@gmail.com"},{"name":"_brunotome_","email":"bruno@buildinamsterdam.com"},{"name":"buildinamsterdam","email":"maikel@buildinamsterdam.com"}],"homepage":"https://github.com/buildinamsterdam/contentful-rest#readme","bugs":{"url":"https://github.com/buildinamsterdam/contentful-rest/issues"},"dist":{"shasum":"95b88d32db5bc059f3f8deb2e402c4a67ccd2b55","tarball":"https://registry.npmjs.org/@buildinams/contentful-rest/-/contentful-rest-0.0.2.tgz","fileCount":42,"integrity":"sha512-MUwmbIhoD6lEwsUALhpp0dHhOtSHlvn0YaMkp7rQ1GK3hMN5LJzmZAAuqeLysIi7Vy/FjTYtEGAmQ5wfqC4Lbg==","signatures":[{"sig":"MEUCIQDSRaYxEgkeFC8H0kNtc3eXDV8T9uX6D2I7+6cykxkW6AIgBcgbS2aE05CEddUyJKn7yPedKokVn9AVstWml5M0xy0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":39380},"main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./types":{"types":"./dist/types.d.ts","import":"./dist/types.js"},"./getIndicatorProps":{"types":"./dist/getIndicatorProps.d.ts","import":"./dist/getIndicatorProps.js"}},"gitHead":"842fb3a0a80b2da5dff8a17e9001ef8d95f2576a","scripts":{"lint":"eslint \"src/**/*.{ts,tsx,js,jsx}\"","test":"jest","build":"tsc","coverage":"jest --coverage","depcheck":"npx npm-check --update","lint:fix":"eslint --fix \"src/**/*.{ts,tsx,js,jsx}\"","prettier":"prettier --check --ignore-unknown .","test:watch":"jest --watch","build:types":"tsc --emitDeclarationOnly","prettier:fix":"prettier --write --ignore-unknown .","prepublishOnly":"npm run build","lint:type-check":"tsc --noEmit"},"_npmUser":{"name":"paulomfj","email":"mfjpaulo@gmail.com"},"repository":{"url":"git+https://github.com/buildinamsterdam/contentful-rest.git","type":"git"},"_npmVersion":"10.2.3","description":"Contentful REST API","directories":{},"_nodeVersion":"18.19.0","dependencies":{"contentful":"^10.6.16","json-stringify-safe":"^5.0.1","contentful-resolve-response":"^1.8.1","@buildinams/contentful-graphql":"^0.0.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.4.1","babel":"^6.23.0","ts-jest":"^29.0.3","ts-node":"^10.9.1","react-dom":"^18.0.0","typescript":"^4.9.5","@types/jest":"^29.4.0","@types/node":"^18.11.18","npm-run-all":"^4.1.5","@types/react":"^18.0.27","@buildinams/lint":"^0.4.0","@types/react-dom":"^18.0.10","@babel/preset-env":"^7.20.2","@testing-library/react":"^13.4.0","eslint-plugin-prettier":"^5.1.2","jest-environment-jsdom":"^29.4.1","@babel/preset-typescript":"^7.18.6","@types/json-stringify-safe":"^5.0.3","@types/contentful-resolve-response":"^0.1.33"},"peerDependencies":{"react":">=17.0.0 || 18"},"_npmOperationalInternal":{"tmp":"tmp/contentful-rest_0.0.2_1704896604674_0.33380563158839216","host":"s3://npm-registry-packages"}},"0.0.3":{"name":"@buildinams/contentful-rest","version":"0.0.3","keywords":["contentful","REST","fetch"],"author":{"url":"https://www.buildinamsterdam.com/","name":"Build in Amsterdam","email":"development@buildinamsterdam.com"},"license":"MIT","_id":"@buildinams/contentful-rest@0.0.3","maintainers":[{"name":"paulomfj","email":"mfjpaulo@gmail.com"},{"name":"_brunotome_","email":"bruno@buildinamsterdam.com"},{"name":"buildinamsterdam","email":"maikel@buildinamsterdam.com"}],"homepage":"https://github.com/buildinamsterdam/contentful-rest#readme","bugs":{"url":"https://github.com/buildinamsterdam/contentful-rest/issues"},"dist":{"shasum":"c7fd7ee3f48c8bf0a911f87253b9452c16e22a28","tarball":"https://registry.npmjs.org/@buildinams/contentful-rest/-/contentful-rest-0.0.3.tgz","fileCount":42,"integrity":"sha512-jZ5JnKuyZBj+tExBW2n4C6KanlmAtcStc+9vdTfO1237vjfImNGXnl89ZsmC9fOM9B6BddwUNp9KBXCfZMJsPA==","signatures":[{"sig":"MEQCIHdPTDn5CQLfKfn9TYdxSygCCxK/CGnzjOm4r8cl3ROBAiAh0CxxDMb6EXb55crJv/g3q3EHY1Xd+EGVZbKW+s+ezw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":39758},"main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./types":{"types":"./dist/types.d.ts","import":"./dist/types.js"},"./getIndicatorProps":{"types":"./dist/getIndicatorProps.d.ts","import":"./dist/getIndicatorProps.js"}},"gitHead":"ed43de8d67688442b9d030ecaf35285c6d05da6b","scripts":{"lint":"eslint \"src/**/*.{ts,tsx,js,jsx}\"","test":"jest","build":"tsc","coverage":"jest --coverage","depcheck":"npx npm-check --update","lint:fix":"eslint --fix \"src/**/*.{ts,tsx,js,jsx}\"","prettier":"prettier --check --ignore-unknown .","test:watch":"jest --watch","build:types":"tsc --emitDeclarationOnly","prettier:fix":"prettier --write --ignore-unknown .","prepublishOnly":"npm run build","lint:type-check":"tsc --noEmit"},"_npmUser":{"name":"paulomfj","email":"mfjpaulo@gmail.com"},"repository":{"url":"git+https://github.com/buildinamsterdam/contentful-rest.git","type":"git"},"_npmVersion":"10.2.3","description":"Contentful REST API","directories":{},"_nodeVersion":"18.19.0","dependencies":{"contentful":"^10.6.16","json-stringify-safe":"^5.0.1","contentful-resolve-response":"^1.8.1","@buildinams/contentful-graphql":"^0.0.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.4.1","babel":"^6.23.0","ts-jest":"^29.0.3","ts-node":"^10.9.1","react-dom":"^18.0.0","typescript":"^4.9.5","@types/jest":"^29.4.0","@types/node":"^18.11.18","npm-run-all":"^4.1.5","@types/react":"^18.0.27","@buildinams/lint":"^0.4.0","@types/react-dom":"^18.0.10","@babel/preset-env":"^7.20.2","@testing-library/react":"^13.4.0","eslint-plugin-prettier":"^5.1.2","jest-environment-jsdom":"^29.4.1","@babel/preset-typescript":"^7.18.6","@types/json-stringify-safe":"^5.0.3","@types/contentful-resolve-response":"^0.1.33"},"peerDependencies":{"react":">=17.0.0 || 18"},"_npmOperationalInternal":{"tmp":"tmp/contentful-rest_0.0.3_1706178545078_0.4566754453008639","host":"s3://npm-registry-packages"}},"0.1.0":{"name":"@buildinams/contentful-rest","version":"0.1.0","keywords":["contentful","REST","fetch"],"author":{"url":"https://www.buildinamsterdam.com/","name":"Build in Amsterdam","email":"development@buildinamsterdam.com"},"license":"MIT","_id":"@buildinams/contentful-rest@0.1.0","maintainers":[{"name":"paulomfj","email":"mfjpaulo@gmail.com"},{"name":"_brunotome_","email":"bruno@buildinamsterdam.com"},{"name":"buildinamsterdam","email":"maikel@buildinamsterdam.com"}],"homepage":"https://github.com/buildinamsterdam/contentful-rest#readme","bugs":{"url":"https://github.com/buildinamsterdam/contentful-rest/issues"},"dist":{"shasum":"1e732283d5252352e30d4312bc05863008e17f70","tarball":"https://registry.npmjs.org/@buildinams/contentful-rest/-/contentful-rest-0.1.0.tgz","fileCount":42,"integrity":"sha512-sDFYA/RL0lE4+8ce+jq8YsRTDzigT2LSXlc1lKOS9L6MXlUUIgrpl0AyACjm1w+xyRwZ1tMPjh+VwZVkFk8Vtw==","signatures":[{"sig":"MEQCIG+atn6Ao/ZaWmYy0iWf2SL6N502C8pQeeHvokG+xpi2AiAd43RC9OYBQjr31Z789nZZsfdFxm+AyupqAQVaDFWnxQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":41286},"main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./types":{"types":"./dist/types.d.ts","import":"./dist/types.js"},"./getIndicatorProps":{"types":"./dist/getIndicatorProps.d.ts","import":"./dist/getIndicatorProps.js"}},"gitHead":"97a22c02c733748743e940848d94f90b68fc90ac","scripts":{"lint":"eslint \"src/**/*.{ts,tsx,js,jsx}\"","test":"jest","build":"tsc","coverage":"jest --coverage","depcheck":"npx npm-check --update","lint:fix":"eslint --fix \"src/**/*.{ts,tsx,js,jsx}\"","prettier":"prettier --check --ignore-unknown .","test:watch":"jest --watch","build:types":"tsc --emitDeclarationOnly","prettier:fix":"prettier --write --ignore-unknown .","prepublishOnly":"npm run build","lint:type-check":"tsc --noEmit"},"_npmUser":{"name":"paulomfj","email":"mfjpaulo@gmail.com"},"repository":{"url":"git+https://github.com/buildinamsterdam/contentful-rest.git","type":"git"},"_npmVersion":"10.2.3","description":"Contentful REST API","directories":{},"_nodeVersion":"18.19.0","dependencies":{"contentful":"^10.6.16","json-stringify-safe":"^5.0.1","contentful-resolve-response":"^1.8.1","@buildinams/contentful-graphql":"^0.0.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.4.1","babel":"^6.23.0","ts-jest":"^29.0.3","ts-node":"^10.9.1","react-dom":"^18.0.0","typescript":"^4.9.5","@types/jest":"^29.4.0","@types/node":"^18.11.18","npm-run-all":"^4.1.5","@types/react":"^18.0.27","@buildinams/lint":"^0.4.0","@types/react-dom":"^18.0.10","@babel/preset-env":"^7.20.2","@testing-library/react":"^13.4.0","eslint-plugin-prettier":"^5.1.2","jest-environment-jsdom":"^29.4.1","@babel/preset-typescript":"^7.18.6","@types/json-stringify-safe":"^5.0.3","@types/contentful-resolve-response":"^0.1.33"},"peerDependencies":{"react":">=17.0.0 || 18"},"_npmOperationalInternal":{"tmp":"tmp/contentful-rest_0.1.0_1707299389197_0.3415879872770822","host":"s3://npm-registry-packages"}},"0.2.0":{"name":"@buildinams/contentful-rest","version":"0.2.0","keywords":["contentful","REST","fetch"],"author":{"url":"https://www.buildinamsterdam.com/","name":"Build in Amsterdam","email":"development@buildinamsterdam.com"},"license":"MIT","_id":"@buildinams/contentful-rest@0.2.0","maintainers":[{"name":"paulomfj","email":"mfjpaulo@gmail.com"},{"name":"_brunotome_","email":"bruno@buildinamsterdam.com"},{"name":"buildinamsterdam","email":"maikel@buildinamsterdam.com"}],"homepage":"https://github.com/buildinamsterdam/contentful-rest#readme","bugs":{"url":"https://github.com/buildinamsterdam/contentful-rest/issues"},"dist":{"shasum":"b82dde113acdbbd9315fb424d215be499d7ba5d0","tarball":"https://registry.npmjs.org/@buildinams/contentful-rest/-/contentful-rest-0.2.0.tgz","fileCount":42,"integrity":"sha512-ZDFt5oCixhjeW/lOesb5goo+okywzLcL9UPBJ/oK/KdMaw4c3Dyp8RKegdfCZ9TlSIBK+387G9zDZ2+Nv2u8eg==","signatures":[{"sig":"MEYCIQDPeMhwsW4LDxvYYG4sQ7shT6SUkryYPMDbv4LyiOEt5QIhAOio/UFTxdRLreItwGzHUL+x72qrwwz5mZclVTQyXhP+","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":43969},"main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./types":{"types":"./dist/types.d.ts","import":"./dist/types.js"},"./getIndicatorProps":{"types":"./dist/getIndicatorProps.d.ts","import":"./dist/getIndicatorProps.js"}},"gitHead":"3f626ee3156c90a1e009141d75ec4730bbac1058","scripts":{"lint":"eslint \"src/**/*.{ts,tsx,js,jsx}\"","test":"jest","build":"tsc","coverage":"jest --coverage","depcheck":"npx npm-check --update","lint:fix":"eslint --fix \"src/**/*.{ts,tsx,js,jsx}\"","prettier":"prettier --check --ignore-unknown .","test:watch":"jest --watch","build:types":"tsc --emitDeclarationOnly","prettier:fix":"prettier --write --ignore-unknown .","prepublishOnly":"npm run build","lint:type-check":"tsc --noEmit"},"_npmUser":{"name":"paulomfj","email":"mfjpaulo@gmail.com"},"repository":{"url":"git+https://github.com/buildinamsterdam/contentful-rest.git","type":"git"},"_npmVersion":"10.2.4","description":"Contentful REST API","directories":{},"_nodeVersion":"18.19.1","dependencies":{"contentful":"^10.6.16","json-stringify-safe":"^5.0.1","contentful-resolve-response":"^1.8.1","@buildinams/contentful-graphql":"^0.0.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.4.1","babel":"^6.23.0","ts-jest":"^29.0.3","ts-node":"^10.9.1","react-dom":"^18.0.0","typescript":"^4.9.5","@types/jest":"^29.4.0","@types/node":"^18.11.18","npm-run-all":"^4.1.5","@types/react":"^18.0.27","@buildinams/lint":"^0.4.0","@types/react-dom":"^18.0.10","@babel/preset-env":"^7.20.2","@testing-library/react":"^13.4.0","eslint-plugin-prettier":"^5.1.2","jest-environment-jsdom":"^29.4.1","@babel/preset-typescript":"^7.18.6","@types/json-stringify-safe":"^5.0.3","@types/contentful-resolve-response":"^0.1.33"},"peerDependencies":{"react":">=17.0.0 || 18"},"_npmOperationalInternal":{"tmp":"tmp/contentful-rest_0.2.0_1711550949197_0.8411916404621864","host":"s3://npm-registry-packages"}},"0.2.1":{"name":"@buildinams/contentful-rest","version":"0.2.1","keywords":["contentful","REST","fetch"],"author":{"url":"https://www.buildinamsterdam.com/","name":"Build in Amsterdam","email":"development@buildinamsterdam.com"},"license":"MIT","_id":"@buildinams/contentful-rest@0.2.1","maintainers":[{"name":"paulomfj","email":"mfjpaulo@gmail.com"},{"name":"_brunotome_","email":"bruno@buildinamsterdam.com"},{"name":"buildinamsterdam","email":"maikel@buildinamsterdam.com"}],"homepage":"https://github.com/buildinamsterdam/contentful-rest#readme","bugs":{"url":"https://github.com/buildinamsterdam/contentful-rest/issues"},"dist":{"shasum":"5d8b9a487a63423499fcf57fb69941d123be341f","tarball":"https://registry.npmjs.org/@buildinams/contentful-rest/-/contentful-rest-0.2.1.tgz","fileCount":42,"integrity":"sha512-Vrn2My+wpd0mB6EricKGdLjBMYkYBfGfmgx1JCl3rV4CboVg5WJ5EpQILqu/0DA8MWNN9CEfCZOJLwAxz1645g==","signatures":[{"sig":"MEUCIG8lrwHAhRYvYaWhZ6gEQuYHYY9u/DOY/fzYmhNWKHkoAiEAwO+lLSCOut/pnb/nxHK6wR/UtzdguxANm69i8mfBxbs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":45830},"main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./types":{"types":"./dist/types.d.ts","import":"./dist/types.js"},"./getIndicatorProps":{"types":"./dist/getIndicatorProps.d.ts","import":"./dist/getIndicatorProps.js"}},"gitHead":"8097ecc4b51d01c1ef0a1cd28d8132a74029989e","scripts":{"lint":"eslint \"src/**/*.{ts,tsx,js,jsx}\"","test":"jest","build":"tsc","coverage":"jest --coverage","depcheck":"npx npm-check --update","lint:fix":"eslint --fix \"src/**/*.{ts,tsx,js,jsx}\"","prettier":"prettier --check --ignore-unknown .","test:watch":"jest --watch","build:types":"tsc --emitDeclarationOnly","prettier:fix":"prettier --write --ignore-unknown .","prepublishOnly":"npm run build","lint:type-check":"tsc --noEmit"},"_npmUser":{"name":"paulomfj","email":"mfjpaulo@gmail.com"},"repository":{"url":"git+https://github.com/buildinamsterdam/contentful-rest.git","type":"git"},"_npmVersion":"10.7.0","description":"Contentful REST API","directories":{},"_nodeVersion":"18.20.3","dependencies":{"contentful":"^10.6.16","json-stringify-safe":"^5.0.1","contentful-resolve-response":"^1.8.1","@buildinams/contentful-graphql":"^0.0.1"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.4.1","babel":"^6.23.0","ts-jest":"^29.0.3","ts-node":"^10.9.1","react-dom":"^18.0.0","typescript":"^4.9.5","@types/jest":"^29.4.0","@types/node":"^18.11.18","npm-run-all":"^4.1.5","@types/react":"^18.0.27","@buildinams/lint":"^0.4.0","@types/react-dom":"^18.0.10","@babel/preset-env":"^7.20.2","@testing-library/react":"^13.4.0","eslint-plugin-prettier":"^5.1.2","jest-environment-jsdom":"^29.4.1","@babel/preset-typescript":"^7.18.6","@types/json-stringify-safe":"^5.0.3","@types/contentful-resolve-response":"^0.1.33"},"peerDependencies":{"react":">=17.0.0 || 18"},"_npmOperationalInternal":{"tmp":"tmp/contentful-rest_0.2.1_1717578328329_0.9266975573620568","host":"s3://npm-registry-packages"}}},"time":{"created":"2024-01-08T12:37:32.896Z","modified":"2025-12-19T15:31:13.101Z","0.0.1":"2024-01-08T12:37:33.180Z","0.0.2":"2024-01-10T14:23:24.830Z","0.0.3":"2024-01-25T10:29:05.220Z","0.1.0":"2024-02-07T09:49:49.328Z","0.2.0":"2024-03-27T14:49:09.372Z","0.2.1":"2024-06-05T09:05:28.493Z"},"bugs":{"url":"https://github.com/buildinamsterdam/contentful-rest/issues"},"author":{"url":"https://www.buildinamsterdam.com/","name":"Build in Amsterdam","email":"development@buildinamsterdam.com"},"license":"MIT","homepage":"https://github.com/buildinamsterdam/contentful-rest#readme","keywords":["contentful","REST","fetch"],"repository":{"url":"git+https://github.com/buildinamsterdam/contentful-rest.git","type":"git"},"description":"Contentful REST API","maintainers":[{"email":"maikel@buildinamsterdam.com","name":"buildinamsterdam"},{"email":"bruno@buildinamsterdam.com","name":"_brunotome_"},{"email":"folkert-jan@buildinamsterdam.com","name":"folkertjan"},{"email":"maarten@obelism.studio","name":"maartenbruggink"}],"readme":"# contentful-rest\n\n[![NPM version][npm-image]][npm-url]\n[![Actions Status][ci-image]][ci-url]\n[![PR Welcome][npm-downloads-image]][npm-downloads-url]\n\nContentful REST API\n\n## Introduction\n\n```typescript\nimport { ContentfulFetcher } from \"@buildinams/contentful-rest\";\n\nexport const cfClient = new ContentfulFetcher();\n```\n\n## Installation\n\nInstall this package with `npm`.\n\n```bash\nnpm i @buildinams/contentful-rest\n```\n\n## Usage\n\n```tsx\nimport {\n\tContentfulFetcher,\n\tContentfulAdaptor,\n} from \"@buildinams/contentful-rest\";\n\nconst Adaptor = new ContentfulAdaptor({});\n\nexport const cfClient = new ContentfulFetcher({\n\tconfig: { spaceId, accessToken, previewToken, environment },\n\tadaptor: Adaptor,\n\tisPreview: IS_DEVELOPMENT,\n});\n\nconst fetchData = async (args: DataTypeArgs) => {\n\tconst data = await cfClient.getEntries({ query, options });\n};\n```\n\n### ContentfulFetcher\n\n```typescript\nimport { createClient } from \"@buildinams/contentful-rest\";\n\nexport const cfClient = new ContentfulFetcher({\n\tconfig: { spaceId, accessToken, previewToken, environment },\n\tadaptor: Adaptor,\n\tisPreview: IS_DEVELOPMENT,\n});\n```\n\nCreate client creates a helper function that is able to send GraphQL queries to your Contentful space. The expected arguments are;\n\n- **config.accessToken** - [Access token](https://www.contentful.com/developers/docs/references/authentication/) of your Contentful space\n- **config.previewToken** - [Preview token](https://www.contentful.com/developers/docs/references/content-preview-api/) to be able to query draft data\n- **config.spaceId** - Space to get data from\n- **config.environment** - Optional; Environment to query, default to; \"master\"\n- **adaptor** - Optional; Modify data to match the structure required for your application\n- **isPreview** - Optional; Flag to fetch all data as preview, convenient for development environments\n\n### ContentfulAdaptor\n\n```typescript\nimport { ContentfulAdaptor } from \"@buildinams/contentful-rest\";\nconst Adaptor = new ContentfulAdaptor({\n\tfieldAdaptors: {\n\t\tAsset: assetAdaptor,\n\t},\n\tcontentAdaptors: {\n\t\tBlockMedia: blockMediaAdaptor,\n\t},\n\tpageAdaptors: {\n\t\tHomepage: homepageAdaptor,\n\t},\n});\n```\n\nThis generates a JavaScript class that gives you the option to adapt the data. Expected arguments;\n\n- **fieldAdaptors** - Adaptors to run on the specific fields, for example the \"Asset\" field.\n- **contentAdaptors** - Content adaptors run recursively over the provided data. When an object matches the pattern: `{ __typename: {key} }` it will run the adaptor with the matching `{key}`.\n- **pageAdaptors** - Page adaptors only run top level. These can be used if you want to format the initial data but you don't want to run to run them when they are referenced. Example; we want a `pageLayout` to contain all data but when referenced in a `cta` we don't want the page adaptor.\n\n#### Adaptors\n\nThe concept of adaptors are generics that modifiy certain data by content type (`__typename`). Often these can follow the structure below;\n\n```typescript\nconst blockMediaAdaptor = (data: ContentfulQueryResponse) => {\n\treturn {\n\t\ttype: data.file.fileType,\n\t\tsrc: data.src,\n\t\tratio: data.height / data.width,\n\t};\n};\n\nexport type BlockMedia = ReturnType<typeof blockMediaAdaptor>;\n```\n\nWithin your application you can then use the `BlockMedia` type to link back to the type of data you expect to receive.\n\n### getIndicatorProps\n\n```typescript\nimport { getIndicatorProps } from \"@buildinams/contentful-rest/getIndicatorProps\";\n<h1 {...getIndicatorProps({ entryId: entry.sys.id, fieldId: \"title\" })}>\n  {entry.title}\n</h1>;\n```\n\nA small helper function to get [indicator mode](https://www.contentful.com/developers/docs/tutorials/general/live-preview/#set-up-inspector-mode) in Contentful preview mode. Expected arugments;\n\n- **entryId** - ID of the linked content entry, usually `entry.sys.id`\n- **fieldId** - Name of the field that's displayed\n- **locale** - Optional; Locale of the displayed entry\n\n## Requests and Contributing\n\nFound an issue? Want a new feature? Get involved! Please contribute using our guideline [here](https://github.com/buildinamsterdam/contentful-graphql/blob/main/CONTRIBUTING.md).\n\n[npm-image]: https://img.shields.io/npm/v/@buildinams/contentful-rest.svg?style=flat-square&logo=react\n[npm-url]: https://npmjs.org/package/@buildinams/contentful-rest\n[ci-image]: https://github.com/buildinamsterdam/contentful-graphql/actions/workflows/test.yml/badge.svg\n[ci-url]: https://github.com/buildinamsterdam/contentful-graphql/actions\n[npm-downloads-image]: https://img.shields.io/npm/dm/@buildinams/contentful-rest.svg\n[npm-downloads-url]: https://npmcharts.com/compare/@buildinams/contentful-rest?minimal=true\n","readmeFilename":"README.md"}