Skip to content

Commit 0dabc5d

Browse files
SDK regeneration (#493)
Co-authored-by: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
1 parent 2d61924 commit 0dabc5d

File tree

502 files changed

+36777
-1711
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

502 files changed

+36777
-1711
lines changed

.github/workflows/label-ai-generated-prs.yml

Lines changed: 0 additions & 11 deletions
This file was deleted.

README.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ npm i -s intercom-client
1717

1818
## Reference
1919

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

2222
## Usage
2323

@@ -64,6 +64,7 @@ try {
6464
console.log(err.statusCode);
6565
console.log(err.message);
6666
console.log(err.body);
67+
console.log(err.rawResponse);
6768
}
6869
}
6970
```
@@ -144,6 +145,18 @@ const response = await client.articles.create(..., {
144145
controller.abort(); // aborts the request
145146
```
146147

148+
### Access Raw Response Data
149+
150+
The SDK provides access to raw response data, including headers, through the `.withRawResponse()` method.
151+
The `.withRawResponse()` method returns a promise that results to an object with a `data` and a `rawResponse` property.
152+
153+
```typescript
154+
const { data, rawResponse } = await client.articles.create(...).withRawResponse();
155+
156+
console.log(data);
157+
console.log(rawResponse.headers['X-My-Header']);
158+
```
159+
147160
### Runtime Compatibility
148161

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

159172
### Customizing Fetch Client
160173

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

164177
```typescript

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "intercom-client",
3-
"version": "6.3.0",
3+
"version": "6.4.0",
44
"private": false,
55
"repository": "https://github.com/intercom/intercom-node",
66
"main": "./index.js",
@@ -40,6 +40,7 @@
4040
"os": false,
4141
"path": false
4242
},
43+
"packageManager": "[email protected]",
4344
"license": "Apache-2.0",
4445
"description": "Official Node bindings to the Intercom API",
4546
"homepage": "https://github.com/intercom/intercom-node",

0 commit comments

Comments
 (0)