{"id":15143832,"url":"https://github.com/stackbit/contentful-listener","last_synced_at":"2026-01-26T20:57:32.953Z","repository":{"id":57162340,"uuid":"439152262","full_name":"stackbit/contentful-listener","owner":"stackbit","description":"Contentful's content listener based on Contentful's sync API","archived":false,"fork":false,"pushed_at":"2021-12-20T12:51:40.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-08T22:49:41.772Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stackbit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-12-16T23:17:30.000Z","updated_at":"2023-03-24T19:28:33.000Z","dependencies_parsed_at":"2022-09-10T06:52:18.040Z","dependency_job_id":null,"html_url":"https://github.com/stackbit/contentful-listener","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/stackbit/contentful-listener","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackbit%2Fcontentful-listener","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackbit%2Fcontentful-listener/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackbit%2Fcontentful-listener/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackbit%2Fcontentful-listener/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stackbit","download_url":"https://codeload.github.com/stackbit/contentful-listener/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackbit%2Fcontentful-listener/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28787830,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T13:55:28.044Z","status":"ssl_error","status_checked_at":"2026-01-26T13:55:26.068Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-09-26T10:04:40.305Z","updated_at":"2026-01-26T20:57:32.939Z","avatar_url":"https://github.com/stackbit.png","language":"TypeScript","readme":"# Contentful Listener\n\nThe Contentful listener listens for content changes in Contentful and invokes the provided callback when such changes occur.\n\nYou can use this listener with [Nextjs Hot Content Reload](https://github.com/stackbit/nextjs-hot-content-reload) package when working locally to \"hot reload\" your browser with fresh content.\n\nUsage:\n\n```typescript\nimport { ContentfulListener } from '@stackbit/contentful-listener';\n\nconst contentfulListener = new ContentfulListener({\n    spaceId: process.env.CONTENTFUL_SPACE_ID,\n    accessToken: process.env.CONTENTFUL_PREVIEW_API_KEY,\n    environment: 'master',\n    host: 'preview.contentful.com',\n    pollingIntervalMs: 1000,\n    callback: (result: CallbackResponse) =\u003e {\n        // Do something\n    }\n});\n\ncontentfulListener.start();\n```\n\nThe `result` is a an object having the following interface, very similar to Contentful's [Sync API response](https://contentful.github.io/contentful.js/contentful/9.1.5/Sync.html#.SyncCollection):\n\n```typescript\nexport interface CallbackResponse {\n    entries: Array\u003cEntry\u003cany\u003e\u003e;\n    assets: Array\u003cAsset\u003e;\n    deletedEntries: Array\u003cEntry\u003cany\u003e\u003e;\n    deletedAssets: Array\u003cAsset\u003e;\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstackbit%2Fcontentful-listener","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstackbit%2Fcontentful-listener","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstackbit%2Fcontentful-listener/lists"}