Skip to content

Commit 8c315a8

Browse files
committed
SDK regeneration
1 parent 50a5ec0 commit 8c315a8

File tree

72 files changed

+1382
-367
lines changed

Some content is hidden

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

72 files changed

+1382
-367
lines changed

README.md

Lines changed: 24 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,10 @@
1-
# Intercom TypeScript Library (intercom-client)
1+
# Intercom TypeScript Library
22

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

66
The Intercom TypeScript library provides convenient access to the Intercom API from TypeScript.
77

8-
[![npm](https://img.shields.io/npm/v/intercom-client)](https://www.npmjs.com/package/intercom-client)
9-
![Intercom API Version](https://img.shields.io/badge/Intercom%20API%20Version-2.11-blue)
10-
![Typescript Supported](https://img.shields.io/badge/Typescript-Supported-lightgrey)
11-
128
## Project Updates
139

1410
The TypeScript SDK has been updated to support latest API version (2.11).
@@ -32,9 +28,9 @@ import { IntercomClient } from "intercom-client";
3228

3329
const client = new IntercomClient({ token: "YOUR_TOKEN" });
3430
await client.articles.create({
35-
title: "How to create an account",
36-
description: "Example article about creating an account.",
37-
body: "Here are the steps to create an account.",
31+
title: "Thanks for everything",
32+
description: "Description of the Article",
33+
body: "Body of the Article",
3834
author_id: 1295,
3935
state: "published",
4036
});
@@ -72,6 +68,26 @@ try {
7268
}
7369
```
7470

71+
## Pagination
72+
73+
List endpoints are paginated. The SDK provides an iterator so that you can simply loop over the items:
74+
75+
```typescript
76+
import { IntercomClient } from "intercom-client";
77+
78+
const client = new IntercomClient({ token: "YOUR_TOKEN" });
79+
const response = await client.articles.list();
80+
for await (const item of response) {
81+
console.log(item);
82+
}
83+
84+
// Or you can manually iterate page-by-page
85+
const page = await client.articles.list();
86+
while (page.hasNextPage()) {
87+
page = page.getNextPage();
88+
}
89+
```
90+
7591
## Request Options
7692

7793
This client library also supports passing in [`request` options](https://github.com/axios/axios#request-config):
@@ -94,26 +110,6 @@ client.useRequestOpts({
94110
});
95111
```
96112

97-
## Pagination
98-
99-
List endpoints are paginated. The SDK provides an iterator so that you can simply loop over the items:
100-
101-
```typescript
102-
import { IntercomClient } from "intercom-client";
103-
104-
const client = new IntercomClient({ token: "YOUR_TOKEN" });
105-
const response = await client.articles.list();
106-
for await (const item of response) {
107-
console.log(item);
108-
}
109-
110-
// Or you can manually iterate page-by-page
111-
const page = await client.articles.list();
112-
while (page.hasNextPage()) {
113-
page = page.getNextPage();
114-
}
115-
```
116-
117113
## Advanced
118114

119115
### Additional Headers

package.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "intercom-client",
3-
"version": "6.0.0",
3+
"version": "6.0.1",
44
"private": false,
55
"repository": "https://github.com/intercom/intercom-node",
66
"main": "./index.js",
@@ -39,5 +39,13 @@
3939
"fs": false,
4040
"os": false,
4141
"path": false
42-
}
42+
},
43+
"license": "Apache-2.0",
44+
"description": "Official Node bindings to the Intercom API",
45+
"homepage": "https://github.com/intercom/intercom-node",
46+
"bugs": "https://github.com/intercom/intercom-node/issues",
47+
"keywords": [
48+
"intercom",
49+
"api"
50+
]
4351
}

src/api/resources/admins/client/Client.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ export class Admins {
9797
Authorization: await this._getAuthorizationHeader(),
9898
"X-Fern-Language": "JavaScript",
9999
"X-Fern-SDK-Name": "intercom-client",
100-
"X-Fern-SDK-Version": "6.0.0",
101-
"User-Agent": "intercom-client/6.0.0",
100+
"X-Fern-SDK-Version": "6.0.1",
101+
"User-Agent": "intercom-client/6.0.1",
102102
"Intercom-Version": requestOptions?.version ?? this._options?.version ?? "2.11",
103103
"X-Fern-Runtime": core.RUNTIME.type,
104104
"X-Fern-Runtime-Version": core.RUNTIME.version,
@@ -167,8 +167,8 @@ export class Admins {
167167
Authorization: await this._getAuthorizationHeader(),
168168
"X-Fern-Language": "JavaScript",
169169
"X-Fern-SDK-Name": "intercom-client",
170-
"X-Fern-SDK-Version": "6.0.0",
171-
"User-Agent": "intercom-client/6.0.0",
170+
"X-Fern-SDK-Version": "6.0.1",
171+
"User-Agent": "intercom-client/6.0.1",
172172
"Intercom-Version": requestOptions?.version ?? this._options?.version ?? "2.11",
173173
"X-Fern-Runtime": core.RUNTIME.type,
174174
"X-Fern-Runtime-Version": core.RUNTIME.version,
@@ -249,8 +249,8 @@ export class Admins {
249249
Authorization: await this._getAuthorizationHeader(),
250250
"X-Fern-Language": "JavaScript",
251251
"X-Fern-SDK-Name": "intercom-client",
252-
"X-Fern-SDK-Version": "6.0.0",
253-
"User-Agent": "intercom-client/6.0.0",
252+
"X-Fern-SDK-Version": "6.0.1",
253+
"User-Agent": "intercom-client/6.0.1",
254254
"Intercom-Version": requestOptions?.version ?? this._options?.version ?? "2.11",
255255
"X-Fern-Runtime": core.RUNTIME.type,
256256
"X-Fern-Runtime-Version": core.RUNTIME.version,
@@ -315,8 +315,8 @@ export class Admins {
315315
Authorization: await this._getAuthorizationHeader(),
316316
"X-Fern-Language": "JavaScript",
317317
"X-Fern-SDK-Name": "intercom-client",
318-
"X-Fern-SDK-Version": "6.0.0",
319-
"User-Agent": "intercom-client/6.0.0",
318+
"X-Fern-SDK-Version": "6.0.1",
319+
"User-Agent": "intercom-client/6.0.1",
320320
"Intercom-Version": requestOptions?.version ?? this._options?.version ?? "2.11",
321321
"X-Fern-Runtime": core.RUNTIME.type,
322322
"X-Fern-Runtime-Version": core.RUNTIME.version,
@@ -388,8 +388,8 @@ export class Admins {
388388
Authorization: await this._getAuthorizationHeader(),
389389
"X-Fern-Language": "JavaScript",
390390
"X-Fern-SDK-Name": "intercom-client",
391-
"X-Fern-SDK-Version": "6.0.0",
392-
"User-Agent": "intercom-client/6.0.0",
391+
"X-Fern-SDK-Version": "6.0.1",
392+
"User-Agent": "intercom-client/6.0.1",
393393
"Intercom-Version": requestOptions?.version ?? this._options?.version ?? "2.11",
394394
"X-Fern-Runtime": core.RUNTIME.type,
395395
"X-Fern-Runtime-Version": core.RUNTIME.version,

src/api/resources/articles/client/Client.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ export class Articles {
112112
Authorization: await this._getAuthorizationHeader(),
113113
"X-Fern-Language": "JavaScript",
114114
"X-Fern-SDK-Name": "intercom-client",
115-
"X-Fern-SDK-Version": "6.0.0",
116-
"User-Agent": "intercom-client/6.0.0",
115+
"X-Fern-SDK-Version": "6.0.1",
116+
"User-Agent": "intercom-client/6.0.1",
117117
"Intercom-Version": requestOptions?.version ?? this._options?.version ?? "2.11",
118118
"X-Fern-Runtime": core.RUNTIME.type,
119119
"X-Fern-Runtime-Version": core.RUNTIME.version,
@@ -219,8 +219,8 @@ export class Articles {
219219
Authorization: await this._getAuthorizationHeader(),
220220
"X-Fern-Language": "JavaScript",
221221
"X-Fern-SDK-Name": "intercom-client",
222-
"X-Fern-SDK-Version": "6.0.0",
223-
"User-Agent": "intercom-client/6.0.0",
222+
"X-Fern-SDK-Version": "6.0.1",
223+
"User-Agent": "intercom-client/6.0.1",
224224
"Intercom-Version": requestOptions?.version ?? this._options?.version ?? "2.11",
225225
"X-Fern-Runtime": core.RUNTIME.type,
226226
"X-Fern-Runtime-Version": core.RUNTIME.version,
@@ -295,8 +295,8 @@ export class Articles {
295295
Authorization: await this._getAuthorizationHeader(),
296296
"X-Fern-Language": "JavaScript",
297297
"X-Fern-SDK-Name": "intercom-client",
298-
"X-Fern-SDK-Version": "6.0.0",
299-
"User-Agent": "intercom-client/6.0.0",
298+
"X-Fern-SDK-Version": "6.0.1",
299+
"User-Agent": "intercom-client/6.0.1",
300300
"Intercom-Version": requestOptions?.version ?? this._options?.version ?? "2.11",
301301
"X-Fern-Runtime": core.RUNTIME.type,
302302
"X-Fern-Runtime-Version": core.RUNTIME.version,
@@ -372,8 +372,8 @@ export class Articles {
372372
Authorization: await this._getAuthorizationHeader(),
373373
"X-Fern-Language": "JavaScript",
374374
"X-Fern-SDK-Name": "intercom-client",
375-
"X-Fern-SDK-Version": "6.0.0",
376-
"User-Agent": "intercom-client/6.0.0",
375+
"X-Fern-SDK-Version": "6.0.1",
376+
"User-Agent": "intercom-client/6.0.1",
377377
"Intercom-Version": requestOptions?.version ?? this._options?.version ?? "2.11",
378378
"X-Fern-Runtime": core.RUNTIME.type,
379379
"X-Fern-Runtime-Version": core.RUNTIME.version,
@@ -448,8 +448,8 @@ export class Articles {
448448
Authorization: await this._getAuthorizationHeader(),
449449
"X-Fern-Language": "JavaScript",
450450
"X-Fern-SDK-Name": "intercom-client",
451-
"X-Fern-SDK-Version": "6.0.0",
452-
"User-Agent": "intercom-client/6.0.0",
451+
"X-Fern-SDK-Version": "6.0.1",
452+
"User-Agent": "intercom-client/6.0.1",
453453
"Intercom-Version": requestOptions?.version ?? this._options?.version ?? "2.11",
454454
"X-Fern-Runtime": core.RUNTIME.type,
455455
"X-Fern-Runtime-Version": core.RUNTIME.version,
@@ -540,8 +540,8 @@ export class Articles {
540540
Authorization: await this._getAuthorizationHeader(),
541541
"X-Fern-Language": "JavaScript",
542542
"X-Fern-SDK-Name": "intercom-client",
543-
"X-Fern-SDK-Version": "6.0.0",
544-
"User-Agent": "intercom-client/6.0.0",
543+
"X-Fern-SDK-Version": "6.0.1",
544+
"User-Agent": "intercom-client/6.0.1",
545545
"Intercom-Version": requestOptions?.version ?? this._options?.version ?? "2.11",
546546
"X-Fern-Runtime": core.RUNTIME.type,
547547
"X-Fern-Runtime-Version": core.RUNTIME.version,

src/api/resources/companies/client/Client.ts

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,8 @@ export class Companies {
140140
Authorization: await this._getAuthorizationHeader(),
141141
"X-Fern-Language": "JavaScript",
142142
"X-Fern-SDK-Name": "intercom-client",
143-
"X-Fern-SDK-Version": "6.0.0",
144-
"User-Agent": "intercom-client/6.0.0",
143+
"X-Fern-SDK-Version": "6.0.1",
144+
"User-Agent": "intercom-client/6.0.1",
145145
"Intercom-Version": requestOptions?.version ?? this._options?.version ?? "2.11",
146146
"X-Fern-Runtime": core.RUNTIME.type,
147147
"X-Fern-Runtime-Version": core.RUNTIME.version,
@@ -228,8 +228,8 @@ export class Companies {
228228
Authorization: await this._getAuthorizationHeader(),
229229
"X-Fern-Language": "JavaScript",
230230
"X-Fern-SDK-Name": "intercom-client",
231-
"X-Fern-SDK-Version": "6.0.0",
232-
"User-Agent": "intercom-client/6.0.0",
231+
"X-Fern-SDK-Version": "6.0.1",
232+
"User-Agent": "intercom-client/6.0.1",
233233
"Intercom-Version": requestOptions?.version ?? this._options?.version ?? "2.11",
234234
"X-Fern-Runtime": core.RUNTIME.type,
235235
"X-Fern-Runtime-Version": core.RUNTIME.version,
@@ -304,8 +304,8 @@ export class Companies {
304304
Authorization: await this._getAuthorizationHeader(),
305305
"X-Fern-Language": "JavaScript",
306306
"X-Fern-SDK-Name": "intercom-client",
307-
"X-Fern-SDK-Version": "6.0.0",
308-
"User-Agent": "intercom-client/6.0.0",
307+
"X-Fern-SDK-Version": "6.0.1",
308+
"User-Agent": "intercom-client/6.0.1",
309309
"Intercom-Version": requestOptions?.version ?? this._options?.version ?? "2.11",
310310
"X-Fern-Runtime": core.RUNTIME.type,
311311
"X-Fern-Runtime-Version": core.RUNTIME.version,
@@ -383,8 +383,8 @@ export class Companies {
383383
Authorization: await this._getAuthorizationHeader(),
384384
"X-Fern-Language": "JavaScript",
385385
"X-Fern-SDK-Name": "intercom-client",
386-
"X-Fern-SDK-Version": "6.0.0",
387-
"User-Agent": "intercom-client/6.0.0",
386+
"X-Fern-SDK-Version": "6.0.1",
387+
"User-Agent": "intercom-client/6.0.1",
388388
"Intercom-Version": requestOptions?.version ?? this._options?.version ?? "2.11",
389389
"X-Fern-Runtime": core.RUNTIME.type,
390390
"X-Fern-Runtime-Version": core.RUNTIME.version,
@@ -458,8 +458,8 @@ export class Companies {
458458
Authorization: await this._getAuthorizationHeader(),
459459
"X-Fern-Language": "JavaScript",
460460
"X-Fern-SDK-Name": "intercom-client",
461-
"X-Fern-SDK-Version": "6.0.0",
462-
"User-Agent": "intercom-client/6.0.0",
461+
"X-Fern-SDK-Version": "6.0.1",
462+
"User-Agent": "intercom-client/6.0.1",
463463
"Intercom-Version": requestOptions?.version ?? this._options?.version ?? "2.11",
464464
"X-Fern-Runtime": core.RUNTIME.type,
465465
"X-Fern-Runtime-Version": core.RUNTIME.version,
@@ -542,8 +542,8 @@ export class Companies {
542542
Authorization: await this._getAuthorizationHeader(),
543543
"X-Fern-Language": "JavaScript",
544544
"X-Fern-SDK-Name": "intercom-client",
545-
"X-Fern-SDK-Version": "6.0.0",
546-
"User-Agent": "intercom-client/6.0.0",
545+
"X-Fern-SDK-Version": "6.0.1",
546+
"User-Agent": "intercom-client/6.0.1",
547547
"Intercom-Version": requestOptions?.version ?? this._options?.version ?? "2.11",
548548
"X-Fern-Runtime": core.RUNTIME.type,
549549
"X-Fern-Runtime-Version": core.RUNTIME.version,
@@ -620,8 +620,8 @@ export class Companies {
620620
Authorization: await this._getAuthorizationHeader(),
621621
"X-Fern-Language": "JavaScript",
622622
"X-Fern-SDK-Name": "intercom-client",
623-
"X-Fern-SDK-Version": "6.0.0",
624-
"User-Agent": "intercom-client/6.0.0",
623+
"X-Fern-SDK-Version": "6.0.1",
624+
"User-Agent": "intercom-client/6.0.1",
625625
"Intercom-Version": requestOptions?.version ?? this._options?.version ?? "2.11",
626626
"X-Fern-Runtime": core.RUNTIME.type,
627627
"X-Fern-Runtime-Version": core.RUNTIME.version,
@@ -716,8 +716,8 @@ export class Companies {
716716
Authorization: await this._getAuthorizationHeader(),
717717
"X-Fern-Language": "JavaScript",
718718
"X-Fern-SDK-Name": "intercom-client",
719-
"X-Fern-SDK-Version": "6.0.0",
720-
"User-Agent": "intercom-client/6.0.0",
719+
"X-Fern-SDK-Version": "6.0.1",
720+
"User-Agent": "intercom-client/6.0.1",
721721
"Intercom-Version": requestOptions?.version ?? this._options?.version ?? "2.11",
722722
"X-Fern-Runtime": core.RUNTIME.type,
723723
"X-Fern-Runtime-Version": core.RUNTIME.version,
@@ -816,8 +816,8 @@ export class Companies {
816816
Authorization: await this._getAuthorizationHeader(),
817817
"X-Fern-Language": "JavaScript",
818818
"X-Fern-SDK-Name": "intercom-client",
819-
"X-Fern-SDK-Version": "6.0.0",
820-
"User-Agent": "intercom-client/6.0.0",
819+
"X-Fern-SDK-Version": "6.0.1",
820+
"User-Agent": "intercom-client/6.0.1",
821821
"Intercom-Version": requestOptions?.version ?? this._options?.version ?? "2.11",
822822
"X-Fern-Runtime": core.RUNTIME.type,
823823
"X-Fern-Runtime-Version": core.RUNTIME.version,
@@ -911,8 +911,8 @@ export class Companies {
911911
Authorization: await this._getAuthorizationHeader(),
912912
"X-Fern-Language": "JavaScript",
913913
"X-Fern-SDK-Name": "intercom-client",
914-
"X-Fern-SDK-Version": "6.0.0",
915-
"User-Agent": "intercom-client/6.0.0",
914+
"X-Fern-SDK-Version": "6.0.1",
915+
"User-Agent": "intercom-client/6.0.1",
916916
"Intercom-Version": requestOptions?.version ?? this._options?.version ?? "2.11",
917917
"X-Fern-Runtime": core.RUNTIME.type,
918918
"X-Fern-Runtime-Version": core.RUNTIME.version,
@@ -992,8 +992,8 @@ export class Companies {
992992
Authorization: await this._getAuthorizationHeader(),
993993
"X-Fern-Language": "JavaScript",
994994
"X-Fern-SDK-Name": "intercom-client",
995-
"X-Fern-SDK-Version": "6.0.0",
996-
"User-Agent": "intercom-client/6.0.0",
995+
"X-Fern-SDK-Version": "6.0.1",
996+
"User-Agent": "intercom-client/6.0.1",
997997
"Intercom-Version": requestOptions?.version ?? this._options?.version ?? "2.11",
998998
"X-Fern-Runtime": core.RUNTIME.type,
999999
"X-Fern-Runtime-Version": core.RUNTIME.version,

0 commit comments

Comments
 (0)