Skip to content

Commit 17af7a6

Browse files
SDK regeneration
1 parent 96d63a4 commit 17af7a6

File tree

494 files changed

+19327
-6284
lines changed

Some content is hidden

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

494 files changed

+19327
-6284
lines changed

README.md

Lines changed: 28 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,25 @@
33
[![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-Built%20with%20Fern-brightgreen)](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2Fintercom%2Fintercom-node)
44
[![npm shield](https://img.shields.io/npm/v/intercom-client)](https://www.npmjs.com/package/intercom-client)
55

6-
The Intercom TypeScript library provides convenient access to the Intercom API from TypeScript.
6+
The Intercom TypeScript library provides convenient access to the Intercom APIs from TypeScript.
7+
8+
## Table of Contents
9+
10+
- [Project Updates](#project-updates)
11+
- [Installation](#installation)
12+
- [Reference](#reference)
13+
- [Usage](#usage)
14+
- [Request and Response Types](#request-and-response-types)
15+
- [Exception Handling](#exception-handling)
16+
- [Pagination](#pagination)
17+
- [Advanced](#advanced)
18+
- [Additional Headers](#additional-headers)
19+
- [Retries](#retries)
20+
- [Timeouts](#timeouts)
21+
- [Aborting Requests](#aborting-requests)
22+
- [Access Raw Response Data](#access-raw-response-data)
23+
- [Runtime Compatibility](#runtime-compatibility)
24+
- [Contributing](#contributing)
725

826
## Project Updates
927

@@ -27,16 +45,12 @@ Instantiate and use the client with the following:
2745
import { IntercomClient } from "intercom-client";
2846

2947
const client = new IntercomClient({ token: "YOUR_TOKEN" });
30-
await client.articles.create({
31-
title: "Thanks for everything",
32-
description: "Description of the Article",
33-
body: "Body of the Article",
34-
author_id: 1295,
35-
state: "published",
48+
await client.aiContent.createContentImportSource({
49+
url: "https://www.example.com",
3650
});
3751
```
3852

39-
## Request And Response Types
53+
## Request and Response Types
4054

4155
The SDK exports all request and response types as TypeScript interfaces. Simply import them with the
4256
following namespace:
@@ -58,7 +72,7 @@ will be thrown.
5872
import { IntercomError } from "intercom-client";
5973

6074
try {
61-
await client.articles.create(...);
75+
await client.aiContent.createContentImportSource(...);
6276
} catch (err) {
6377
if (err instanceof IntercomError) {
6478
console.log(err.statusCode);
@@ -96,7 +110,7 @@ while (page.hasNextPage()) {
96110
If you would like to send additional headers as part of the request, use the `headers` request option.
97111

98112
```typescript
99-
const response = await client.articles.create(..., {
113+
const response = await client.aiContent.createContentImportSource(..., {
100114
headers: {
101115
'X-Custom-Header': 'custom value'
102116
}
@@ -118,7 +132,7 @@ A request is deemed retryable when any of the following HTTP status codes is ret
118132
Use the `maxRetries` request option to configure this behavior.
119133

120134
```typescript
121-
const response = await client.articles.create(..., {
135+
const response = await client.aiContent.createContentImportSource(..., {
122136
maxRetries: 0 // override maxRetries at the request level
123137
});
124138
```
@@ -128,7 +142,7 @@ const response = await client.articles.create(..., {
128142
The SDK defaults to a 60 second timeout. Use the `timeoutInSeconds` option to configure this behavior.
129143

130144
```typescript
131-
const response = await client.articles.create(..., {
145+
const response = await client.aiContent.createContentImportSource(..., {
132146
timeoutInSeconds: 30 // override timeout to 30s
133147
});
134148
```
@@ -139,7 +153,7 @@ The SDK allows users to abort requests at any point by passing in an abort signa
139153

140154
```typescript
141155
const controller = new AbortController();
142-
const response = await client.articles.create(..., {
156+
const response = await client.aiContent.createContentImportSource(..., {
143157
abortSignal: controller.signal
144158
});
145159
controller.abort(); // aborts the request
@@ -151,7 +165,7 @@ The SDK provides access to raw response data, including headers, through the `.w
151165
The `.withRawResponse()` method returns a promise that results to an object with a `data` and a `rawResponse` property.
152166

153167
```typescript
154-
const { data, rawResponse } = await client.articles.create(...).withRawResponse();
168+
const { data, rawResponse } = await client.aiContent.createContentImportSource(...).withRawResponse();
155169

156170
console.log(data);
157171
console.log(rawResponse.headers['X-My-Header']);
@@ -192,13 +206,3 @@ a proof of concept, but know that we will not be able to merge it as-is. We sugg
192206
an issue first to discuss with us!
193207

194208
On the other hand, contributions to the README are always very welcome!
195-
196-
## Contributing
197-
198-
While we value open-source contributions to this SDK, this library is generated programmatically.
199-
Additions made directly to this library would have to be moved over to our generation code,
200-
otherwise they would be overwritten upon the next generated release. Feel free to open a PR as
201-
a proof of concept, but know that we will not be able to merge it as-is. We suggest opening
202-
an issue first to discuss with us!
203-
204-
On the other hand, contributions to the README are always very welcome!

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "intercom-client",
3-
"version": "6.4.0",
3+
"version": "6.5.0",
44
"private": false,
55
"repository": "https://github.com/intercom/intercom-node",
66
"main": "./index.js",

0 commit comments

Comments
 (0)