intercom-sdk-patterns

Featured

Apply production-ready intercom-client SDK patterns for TypeScript. Use when implementing Intercom integrations, refactoring SDK usage, or establishing team coding standards for Intercom API calls. Trigger with phrases like "intercom SDK patterns", "intercom best practices", "intercom code patterns", "idiomatic intercom", "intercom typescript".

AI & Automation 2,944 stars 440 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Intercom SDK Patterns ## Overview Production-ready patterns for the `intercom-client` TypeScript SDK covering client initialization, pagination, error handling, and type safety. ## Prerequisites - `intercom-client` package installed - TypeScript 5.0+ project - Familiarity with async/await and generators ## Instructions ### Step 1: Type-Safe Client Wrapper ```typescript // src/intercom/client.ts import { IntercomClient } from "intercom-client"; import { Intercom } from "intercom-client"; let instance: IntercomClient | null = null; export function getClient(): IntercomClient { if (!instance) { instance = new IntercomClient({ token: process.env.INTERCOM_ACCESS_TOKEN!, }); } return instance; } // Type-safe contact creation helper export async function createContact( params: Intercom.CreateContactRequest ): Promise<Intercom.Contact> { return getClient().contacts.create(params); } // Type-safe search helper export async function searchContacts( query: Intercom.SearchRequest ): Promise<Intercom.ContactList> { return getClient().contacts.search(query); } ``` ### Step 2: Cursor-Based Pagination Intercom uses cursor-based pagination. The `starting_after` parameter points to the next page. ```typescript // Generic paginator for any list endpoint async function* paginateContacts( client: IntercomClient, perPage = 50 ): AsyncGenerator<Intercom.Contact> { let startingAfter: string | undefined; do { const page = await client.contacts....

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
1 years ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category