Skip to content

🌿 Fern Regeneration -- June 24, 2025 #492

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
11 changes: 0 additions & 11 deletions .github/workflows/label-ai-generated-prs.yml

This file was deleted.

17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ npm i -s intercom-client

## Reference

A full reference for this library is available [here](./reference.md).
A full reference for this library is available [here](https://github.com/intercom/intercom-node/blob/HEAD/./reference.md).

## Usage

Expand Down Expand Up @@ -64,6 +64,7 @@ try {
console.log(err.statusCode);
console.log(err.message);
console.log(err.body);
console.log(err.rawResponse);
}
}
```
Expand Down Expand Up @@ -144,6 +145,18 @@ const response = await client.articles.create(..., {
controller.abort(); // aborts the request
```

### Access Raw Response Data

The SDK provides access to raw response data, including headers, through the `.withRawResponse()` method.
The `.withRawResponse()` method returns a promise that results to an object with a `data` and a `rawResponse` property.

```typescript
const { data, rawResponse } = await client.articles.create(...).withRawResponse();

console.log(data);
console.log(rawResponse.headers['X-My-Header']);
```

### Runtime Compatibility

The SDK defaults to `node-fetch` but will use the global fetch client if present. The SDK works in the following
Expand All @@ -158,7 +171,7 @@ runtimes:

### Customizing Fetch Client

The SDK provides a way for your to customize the underlying HTTP client / Fetch function. If you're running in an
The SDK provides a way for you to customize the underlying HTTP client / Fetch function. If you're running in an
unsupported environment, this provides a way for you to break glass and ensure the SDK works.

```typescript
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "intercom-client",
"version": "6.3.0",
"version": "v6.4.0",
"private": false,
"repository": "https://github.com/intercom/intercom-node",
"main": "./index.js",
Expand Down Expand Up @@ -40,6 +40,7 @@
"os": false,
"path": false
},
"packageManager": "[email protected]",
"license": "Apache-2.0",
"description": "Official Node bindings to the Intercom API",
"homepage": "https://github.com/intercom/intercom-node",
Expand Down
Loading