{"_id":"@bernierllc/contentful-types","_rev":"6-26d18b41660e35383e334e48c6226a08","name":"@bernierllc/contentful-types","dist-tags":{"latest":"1.5.0"},"versions":{"1.0.4":{"name":"@bernierllc/contentful-types","version":"1.0.4","author":{"name":"Bernier LLC"},"license":"SEE LICENSE IN LICENSE","_id":"@bernierllc/contentful-types@1.0.4","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"dist":{"shasum":"26761ab160ee4aa8da20b7de9f44f9e171a5efa9","tarball":"https://registry.npmjs.org/@bernierllc/contentful-types/-/contentful-types-1.0.4.tgz","fileCount":6,"integrity":"sha512-OQpHHL2J5Th569Yw9orjXrtfT3Mdq/c2l5uGfzp1WyjsepHEDK/h7LDV9gDfV6npoVoZODpaOd4PqX/LgmdOEg==","signatures":[{"sig":"MEUCIQDq6Iky+XAJgS4/6qBwoauEG7lZarszeLqvWKhlJunm4gIgT0L5huiiwv5Vz1sGkvpMh6eR/4kGYIioFzhUkro1+6o=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16483},"main":"dist/index.js","_from":"file:bernierllc-contentful-types-1.0.4.tgz","types":"dist/index.d.ts","scripts":{"lint":"eslint \"{src,test}/**/*.ts\" --max-warnings 0","test":"jest","build":"tsc","test:run":"jest --runInBand --collectCoverage"},"_npmUser":{"name":"mkbernier","email":"mkbernier@gmail.com"},"_resolved":"/private/var/folders/r0/wspnzd1s18sfjy10ffyv2qxw0000gn/T/83962091692e4b9bfd4434bb24243fe4/bernierllc-contentful-types-1.0.4.tgz","_integrity":"sha512-OQpHHL2J5Th569Yw9orjXrtfT3Mdq/c2l5uGfzp1WyjsepHEDK/h7LDV9gDfV6npoVoZODpaOd4PqX/LgmdOEg==","_npmVersion":"11.6.2","description":"TypeScript types and utilities for Contentful data structures and validations.","directories":{},"_nodeVersion":"25.2.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","eslint":"^8.57.0","ts-jest":"^29.1.2","prettier":"^3.2.5","typescript":"^5.4.5","@types/jest":"^29.5.12","@types/node":"^20.12.12","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.1.3","@typescript-eslint/parser":"^7.9.0","@typescript-eslint/eslint-plugin":"^7.9.0"},"_npmOperationalInternal":{"tmp":"tmp/contentful-types_1.0.4_1764695456202_0.3184268866819029","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@bernierllc/contentful-types","version":"1.2.0","author":{"name":"Bernier LLC"},"license":"SEE LICENSE IN LICENSE","_id":"@bernierllc/contentful-types@1.2.0","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"dist":{"shasum":"cafa43c2d732d25e8ebddb4d2968beb969613f2d","tarball":"https://registry.npmjs.org/@bernierllc/contentful-types/-/contentful-types-1.2.0.tgz","fileCount":6,"integrity":"sha512-KU9EegexmQ7OOsxYfSG+3A3Ze57pkXEvxvMQlIFxq/MTsC7jVhrn9rRWtR9eSu22XHBc2TF/LzM+5LEAMmqq/w==","signatures":[{"sig":"MEUCIQC2J7LyDiiyTiI7ntzYnww4HaorNMvnSQuznKTjRnN4qwIgbBevWAl0b3jjO1qQIaDdmAILr95p8uTmQtX0LuWDqhI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16588},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"af7e74b3715d56d3a193e1bb6743b337c2b0df6d","scripts":{"lint":"eslint \"{src,test}/**/*.ts\" --max-warnings 0","test":"jest","build":"tsc","test:run":"jest --runInBand --collectCoverage"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:fc77b5b4-ea99-437c-881c-c401e73e46d0"}},"_npmVersion":"lerna/9.0.3/node@v20.19.6+x64 (linux)","description":"TypeScript types and utilities for Contentful data structures and validations.","directories":{},"_nodeVersion":"20.19.6","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","eslint":"^8.57.0","ts-jest":"^29.1.2","prettier":"^3.2.5","typescript":"^5.4.5","@types/jest":"^29.5.12","@types/node":"^20.12.12","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.1.3","@typescript-eslint/parser":"^7.9.0","@typescript-eslint/eslint-plugin":"^7.9.0"},"_npmOperationalInternal":{"tmp":"tmp/contentful-types_1.2.0_1767642293659_0.3797274669505579","host":"s3://npm-registry-packages-npm-production"}},"1.2.1":{"name":"@bernierllc/contentful-types","version":"1.2.1","author":{"name":"Bernier LLC"},"license":"SEE LICENSE IN LICENSE","_id":"@bernierllc/contentful-types@1.2.1","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"dist":{"shasum":"c0b02e30c6374d1a9aeb0e4e50f7bab1d5f9db54","tarball":"https://registry.npmjs.org/@bernierllc/contentful-types/-/contentful-types-1.2.1.tgz","fileCount":6,"integrity":"sha512-bLU1ZOpIGSODFw+Zduma/PlLJKPLxiDB2jCZuRzotw3alnJTy8LbEkAx/L17oVfNOtmfp6D6s2i4+AnZRfGiQQ==","signatures":[{"sig":"MEYCIQCruo2XoQ9uT+lBZj/Vq/4B4mtfC0Oe9W4Ia6qmwxbIdQIhALa5869dLjLCmaYPxy98fxTZW7Gb2XJHYh8VSXXmuVrB","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16530},"main":"dist/index.js","_from":"file:bernierllc-contentful-types-1.2.1.tgz","types":"dist/index.d.ts","scripts":{"lint":"eslint \"{src,test}/**/*.ts\" --max-warnings 0","test":"jest","build":"tsc","test:run":"jest --runInBand --collectCoverage"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:fc77b5b4-ea99-437c-881c-c401e73e46d0"}},"_resolved":"/tmp/42c24370117d6811c20b268a433e3f00/bernierllc-contentful-types-1.2.1.tgz","_integrity":"sha512-bLU1ZOpIGSODFw+Zduma/PlLJKPLxiDB2jCZuRzotw3alnJTy8LbEkAx/L17oVfNOtmfp6D6s2i4+AnZRfGiQQ==","_npmVersion":"11.11.0","description":"TypeScript types and utilities for Contentful data structures and validations.","directories":{},"_nodeVersion":"20.20.0","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","eslint":"^8.57.0","ts-jest":"^29.1.2","prettier":"^3.2.5","typescript":"^5.4.5","@types/jest":"^29.5.12","@types/node":"^20.12.12","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.1.3","@typescript-eslint/parser":"^7.9.0","@typescript-eslint/eslint-plugin":"^7.9.0"},"_npmOperationalInternal":{"tmp":"tmp/contentful-types_1.2.1_1773077984254_0.2256254655190606","host":"s3://npm-registry-packages-npm-production"}},"1.2.2":{"name":"@bernierllc/contentful-types","version":"1.2.2","author":{"name":"Bernier LLC"},"license":"SEE LICENSE IN LICENSE","_id":"@bernierllc/contentful-types@1.2.2","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"dist":{"shasum":"55efaa4091c447a8f12b1ee33280109224a7d552","tarball":"https://registry.npmjs.org/@bernierllc/contentful-types/-/contentful-types-1.2.2.tgz","fileCount":6,"integrity":"sha512-/UuZl70xeiBzrxXq8jiRte8Ufi/H12bokSSjnpG5V0cOuMD9Vu4P0W62Am+f7gcwq7cCvodPHQMH3tqOPAAndw==","signatures":[{"sig":"MEYCIQC2qS2gxi/ILgh3wxK9XXBusk3fCDDGCG/D84yg6osPtAIhAKtnb95UHegxP3gNyDW6cChwnmnYS1oK7nYbH04ej2+D","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":16530},"main":"dist/index.js","_from":"file:bernierllc-contentful-types-1.2.2.tgz","types":"dist/index.d.ts","scripts":{"lint":"eslint \"{src,test}/**/*.ts\" --max-warnings 0","test":"jest","build":"tsc","test:run":"jest --runInBand --collectCoverage"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:fc77b5b4-ea99-437c-881c-c401e73e46d0"}},"_resolved":"/tmp/dff3781ce1222b8638487a0f8d247b04/bernierllc-contentful-types-1.2.2.tgz","_integrity":"sha512-/UuZl70xeiBzrxXq8jiRte8Ufi/H12bokSSjnpG5V0cOuMD9Vu4P0W62Am+f7gcwq7cCvodPHQMH3tqOPAAndw==","_npmVersion":"11.11.0","description":"TypeScript types and utilities for Contentful data structures and validations.","directories":{},"_nodeVersion":"20.20.0","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","eslint":"^8.57.0","ts-jest":"^29.1.2","prettier":"^3.2.5","typescript":"^5.4.5","@types/jest":"^29.5.12","@types/node":"^20.12.12","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.1.3","@typescript-eslint/parser":"^7.9.0","@typescript-eslint/eslint-plugin":"^7.9.0"},"_npmOperationalInternal":{"tmp":"tmp/contentful-types_1.2.2_1773081152677_0.5419209106283038","host":"s3://npm-registry-packages-npm-production"}},"1.4.0":{"name":"@bernierllc/contentful-types","version":"1.4.0","author":{"name":"Bernier LLC"},"license":"SEE LICENSE IN LICENSE","_id":"@bernierllc/contentful-types@1.4.0","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"dist":{"shasum":"dd4d811eace34bac964466f5dfff8f77c7153ec4","tarball":"https://registry.npmjs.org/@bernierllc/contentful-types/-/contentful-types-1.4.0.tgz","fileCount":8,"integrity":"sha512-5MjLk4h+steaK3cG12/ZV23Zn5mI5VILoWL056kSNrmiqk5Ap4PzVvJrAj3Z0kJvP0VR2y+pvvUO2w/s1qIyyw==","signatures":[{"sig":"MEYCIQC7Xm2UTc6rfMrHmMEHig5AJi3z12qlBSj1nld9DZQAyQIhAKt/lKC6BpXrYwTn7y9ZXWmfkOWD4rA5OerLXhJeAPDp","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":18308},"main":"dist/index.js","_from":"file:bernierllc-contentful-types-1.4.0.tgz","types":"dist/index.d.ts","scripts":{"lint":"eslint \"{src,test}/**/*.ts\" --max-warnings 0","test":"jest","build":"tsc","test:run":"jest --runInBand --collectCoverage"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:fc77b5b4-ea99-437c-881c-c401e73e46d0"}},"_resolved":"/home/runner/work/tools/tools/packages/core/contentful-types/bernierllc-contentful-types-1.4.0.tgz","_integrity":"sha512-5MjLk4h+steaK3cG12/ZV23Zn5mI5VILoWL056kSNrmiqk5Ap4PzVvJrAj3Z0kJvP0VR2y+pvvUO2w/s1qIyyw==","_npmVersion":"11.14.1","description":"TypeScript types and utilities for Contentful data structures and validations.","directories":{},"_nodeVersion":"20.20.2","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","eslint":"^8.57.0","ts-jest":"^29.1.2","prettier":"^3.2.5","typescript":"^5.4.5","@types/jest":"^29.5.12","@types/node":"^20.12.12","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.1.3","@typescript-eslint/parser":"^7.9.0","@typescript-eslint/eslint-plugin":"^7.9.0"},"_npmOperationalInternal":{"tmp":"tmp/contentful-types_1.4.0_1779241062684_0.6112492703976355","host":"s3://npm-registry-packages-npm-production"}},"1.5.0":{"name":"@bernierllc/contentful-types","version":"1.5.0","description":"TypeScript types and utilities for Contentful data structures and validations.","main":"dist/index.js","types":"dist/index.d.ts","author":{"name":"Bernier LLC"},"license":"SEE LICENSE IN LICENSE","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"devDependencies":{"@types/jest":"^29.5.12","@types/node":"^20.12.12","@typescript-eslint/eslint-plugin":"^7.9.0","@typescript-eslint/parser":"^7.9.0","eslint":"^8.57.0","eslint-config-prettier":"^9.1.0","eslint-plugin-prettier":"^5.1.3","jest":"^29.7.0","prettier":"^3.2.5","ts-jest":"^29.1.2","typescript":"^5.4.5"},"scripts":{"build":"tsc","test":"jest","test:run":"jest --runInBand --collectCoverage","lint":"eslint \"{src,test}/**/*.ts\" --max-warnings 0"},"_id":"@bernierllc/contentful-types@1.5.0","_integrity":"sha512-yWgzbIfmf6fxDd2/dOmP9ThrjR80rhJIJrP5/zy71yQlJ3B2J+YdLHORblYre2us3KUeA8mC0z0ETqHUgW0KdA==","_resolved":"/home/runner/work/tools/tools/packages/core/contentful-types/bernierllc-contentful-types-1.5.0.tgz","_from":"file:bernierllc-contentful-types-1.5.0.tgz","_nodeVersion":"20.20.2","_npmVersion":"11.14.1","dist":{"integrity":"sha512-yWgzbIfmf6fxDd2/dOmP9ThrjR80rhJIJrP5/zy71yQlJ3B2J+YdLHORblYre2us3KUeA8mC0z0ETqHUgW0KdA==","shasum":"497d1f401b66fddb849cfbfddc5d93e885cbfac7","tarball":"https://registry.npmjs.org/@bernierllc/contentful-types/-/contentful-types-1.5.0.tgz","fileCount":8,"unpackedSize":18308,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCJIMMHW4j+gM4bzBeEMwmA9wDCoLtD8APqALgfwyJeOQIgeWcdl+48GeUQF/Af4G+Klvw0+KXx1QbkCYCBw43gIhE="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:fc77b5b4-ea99-437c-881c-c401e73e46d0"}},"directories":{},"maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/contentful-types_1.5.0_1779249804869_0.6631774616484114"},"_hasShrinkwrap":false}},"time":{"created":"2025-12-02T17:10:56.111Z","modified":"2026-05-20T04:03:25.183Z","1.0.4":"2025-12-02T17:10:56.426Z","1.2.0":"2026-01-05T19:44:53.804Z","1.2.1":"2026-03-09T17:39:44.414Z","1.2.2":"2026-03-09T18:32:32.831Z","1.4.0":"2026-05-20T01:37:42.827Z","1.5.0":"2026-05-20T04:03:25.042Z"},"author":{"name":"Bernier LLC"},"license":"SEE LICENSE IN LICENSE","description":"TypeScript types and utilities for Contentful data structures and validations.","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"readme":"# @bernierllc/contentful-types\n\nTypeScript definitions and utilities for Contentful content types.\n\nThis package provides a robust and type-safe way to interact with Contentful data within TypeScript projects.\n\n## Installation\n\n```bash\nnpm install @bernierllc/contentful-types\n```\n\n## Usage\n\nImport and use the types in your TypeScript project:\n\n```typescript\nimport {\n  ContentfulEntry,\n  ContentfulAsset,\n  ContentfulSpace,\n  ContentfulContentType,\n  validateContentTypeName,\n  isValidContentType\n} from '@bernierllc/contentful-types';\n\n// Type-safe Contentful entry\nconst entry: ContentfulEntry = {\n  sys: {\n    id: '123',\n    type: 'Entry',\n    contentType: { sys: { id: 'blogPost', type: 'Link', linkType: 'ContentType' } },\n    createdAt: '2025-01-01T00:00:00Z',\n    updatedAt: '2025-01-01T00:00:00Z',\n    space: { sys: { id: 'space-id', type: 'Link', linkType: 'Space' } },\n    environment: { sys: { id: 'master', type: 'Link', linkType: 'Environment' } },\n    revision: 1,\n    locale: 'en-US'\n  },\n  fields: {\n    title: 'Hello World',\n    content: 'This is my first post'\n  },\n  metadata: { tags: [] }\n};\n\n// Validate content type names\nconst isValid = validateContentTypeName('blogPost');\nconsole.log(isValid); // true\n```\n\n## API\n\n### Types\n\n- `ContentfulEntry` - Base entry structure with sys and fields\n- `ContentfulAsset` - Asset type with file metadata\n- `ContentfulSpace` - Space configuration\n- `ContentfulContentType` - Content type schema definition\n- `ContentfulLink` - Link reference structure\n- `ContentfulSys` - System metadata structure\n- `ContentfulLocale` - Locale configuration\n- `ContentfulEnvironment` - Environment settings\n- `ContentfulField` - Field definition structure\n- `ContentfulRichText` - Rich text document structure\n- `ContentfulQueryOptions` - Query parameters for CDA/CMA\n- `ContentfulSyncOptions` - Sync API parameters\n- `ContentfulGraphQLQuery` - GraphQL query structure\n\n### Functions\n\n#### `validateContentTypeName(name: string): boolean`\n\nValidates that a content type name follows Contentful naming conventions (alphanumeric, dashes, underscores, 1-64 characters).\n\n```typescript\nvalidateContentTypeName('blog-post'); // true\nvalidateContentTypeName('Blog Post'); // false (spaces not allowed)\n```\n\n#### `isValidContentType(contentType: any): boolean`\n\nType guard that validates if an object matches the ContentfulContentType interface structure.\n\n```typescript\nconst ct = { sys: { id: 'post', type: 'ContentType' }, name: 'Post', fields: [] };\nif (isValidContentType(ct)) {\n  // TypeScript knows ct is ContentfulContentType\n}\n```\n\n## Integration Documentation\n\n### Logger Integration\n\nThis package does not depend on `@bernierllc/logger` as it is a pure types package with no runtime logging requirements. If you need logging for validation errors in your application, integrate logger at the application level.\n\n### NeverHub Integration\n\nThis package does not require NeverHub integration as it provides static TypeScript types and validation utilities. NeverHub integration should be implemented at the service layer that consumes these types.\n\n### Graceful Degradation\n\nAll validation functions provide fallback behavior:\n- `validateContentTypeName()` returns `false` for invalid inputs rather than throwing\n- Type guards like `isValidContentType()` safely return `false` for malformed data\n- No external service dependencies required for core functionality","readmeFilename":"README.md"}