async def _generate_contact_entities(
        self, client: httpx.AsyncClient
    ) -> AsyncGenerator[ChunkEntity, None]:
        """Generate Contact entities from Intercom.

        Using the Contacts endpoint:
          GET https://api.intercom.io/contacts
        """
        url = "https://api.intercom.io/contacts"
        while url:
            data = await self._get_with_auth(client, url)
            for contact in data.get("data", []):
                yield IntercomContactEntity(
                    entity_id=contact.get("id"),
                    role=contact.get("role"),
                    external_id=contact.get("external_id"),
                    email=contact.get("email"),
                    phone=contact.get("phone"),
                    name=contact.get("name"),
                    avatar=contact.get("avatar", {}).get("image_url"),
                    created_at=contact.get("created_at"),
                    updated_at=contact.get("updated_at"),
                    archived=contact.get("archived", False),
                )

            # Handle pagination
            pages = data.get("pages", {})
            next_link = pages.get("next")
            url = next_link if next_link else None
Generate Contact entities from Intercom.

        Using the Contacts endpoint:
          GET https://api.intercom.io/contacts
        
backend/airweave/platform/sources/intercom.py