Skip to content

Commit bcaf8b0

Browse files
committed
SDK regeneration
1 parent 16ee21a commit bcaf8b0

File tree

41 files changed

+671
-518
lines changed

Some content is hidden

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

41 files changed

+671
-518
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# 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)
4-
[![npm shield](https://img.shields.io/npm/v/)](https://www.npmjs.com/package/)
4+
[![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

@@ -25,7 +25,7 @@ The Node SDK has been updated to support latest API version (2.6). The update al
2525
## Installation
2626

2727
```sh
28-
npm i -s
28+
npm i -s intercom-client
2929
```
3030

3131
## Reference
@@ -37,7 +37,7 @@ A full reference for this library is available [here](./reference.md).
3737
Instantiate and use the client with the following:
3838

3939
```typescript
40-
import { IntercomClient } from "";
40+
import { IntercomClient } from "intercom-client";
4141

4242
const client = new IntercomClient({ token: "YOUR_TOKEN" });
4343
await client.articles.create({
@@ -55,7 +55,7 @@ The SDK exports all request and response types as TypeScript interfaces. Simply
5555
following namespace:
5656

5757
```typescript
58-
import { Intercom } from "Intercom";
58+
import { Intercom } from "intercom-client";
5959

6060
const request: Intercom.ConfigureAwayAdminRequest = {
6161
...
@@ -68,7 +68,7 @@ When the API returns a non-success status code (4xx or 5xx response), a subclass
6868
will be thrown.
6969

7070
```typescript
71-
import { IntercomError } from "Intercom";
71+
import { IntercomError } from "intercom-client";
7272

7373
try {
7474
await client.articles.create(...);
@@ -1330,7 +1330,7 @@ yarn prepublish
13301330
List endpoints are paginated. The SDK provides an iterator so that you can simply loop over the items:
13311331

13321332
```typescript
1333-
import { IntercomClient } from "";
1333+
import { IntercomClient } from "intercom-client";
13341334

13351335
const client = new IntercomClient({ token: "YOUR_TOKEN" });
13361336
const response = await client.articles.list();
@@ -1419,7 +1419,7 @@ The SDK provides a way for your to customize the underlying HTTP client / Fetch
14191419
unsupported environment, this provides a way for you to break glass and ensure the SDK works.
14201420

14211421
```typescript
1422-
import { IntercomClient } from "Intercom";
1422+
import { IntercomClient } from "intercom-client";
14231423

14241424
const client = new IntercomClient({
14251425
...

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.0.0",
3+
"version": "5.0.1",
44
"private": false,
55
"repository": "https://github.com/intercom/intercom-node",
66
"main": "./index.js",

reference.md

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -568,10 +568,8 @@ You can update the details of a single article by making a PUT request to `https
568568
```typescript
569569
await client.articles.update({
570570
article_id: "123",
571-
body: {
572-
title: "Christmas is here!",
573-
body: "<p>New gifts in store for the jolly season</p>",
574-
},
571+
title: "Christmas is here!",
572+
body: "<p>New gifts in store for the jolly season</p>",
575573
});
576574
```
577575

@@ -4626,7 +4624,7 @@ await client.conversations.redactConversationPart({
46264624
</dl>
46274625
</details>
46284626

4629-
<details><summary><code>client.conversations.<a href="/src/api/resources/conversations/client/Client.ts">convertToTicket</a>({ ...params }) -> Intercom.Ticket | undefined</code></summary>
4627+
<details><summary><code>client.conversations.<a href="/src/api/resources/conversations/client/Client.ts">convertToTicket</a>({ ...params }) -> Intercom.Ticket</code></summary>
46304628
<dl>
46314629
<dd>
46324630

@@ -5717,7 +5715,7 @@ await client.subscriptionTypes.list();
57175715

57185716
## PhoneCallRedirects
57195717

5720-
<details><summary><code>client.phoneCallRedirects.<a href="/src/api/resources/phoneCallRedirects/client/Client.ts">create</a>({ ...params }) -> Intercom.PhoneSwitch | undefined</code></summary>
5718+
<details><summary><code>client.phoneCallRedirects.<a href="/src/api/resources/phoneCallRedirects/client/Client.ts">create</a>({ ...params }) -> Intercom.PhoneSwitch</code></summary>
57215719
<dl>
57225720
<dd>
57235721

@@ -5968,7 +5966,7 @@ await client.ticketTypes.list();
59685966
</dl>
59695967
</details>
59705968

5971-
<details><summary><code>client.ticketTypes.<a href="/src/api/resources/ticketTypes/client/Client.ts">create</a>({ ...params }) -> Intercom.TicketType | undefined</code></summary>
5969+
<details><summary><code>client.ticketTypes.<a href="/src/api/resources/ticketTypes/client/Client.ts">create</a>({ ...params }) -> Intercom.TicketType</code></summary>
59725970
<dl>
59735971
<dd>
59745972

@@ -6041,7 +6039,7 @@ await client.ticketTypes.create({
60416039
</dl>
60426040
</details>
60436041

6044-
<details><summary><code>client.ticketTypes.<a href="/src/api/resources/ticketTypes/client/Client.ts">get</a>({ ...params }) -> Intercom.TicketType | undefined</code></summary>
6042+
<details><summary><code>client.ticketTypes.<a href="/src/api/resources/ticketTypes/client/Client.ts">get</a>({ ...params }) -> Intercom.TicketType</code></summary>
60456043
<dl>
60466044
<dd>
60476045

@@ -6106,7 +6104,7 @@ await client.ticketTypes.get({
61066104
</dl>
61076105
</details>
61086106

6109-
<details><summary><code>client.ticketTypes.<a href="/src/api/resources/ticketTypes/client/Client.ts">update</a>({ ...params }) -> Intercom.TicketType | undefined</code></summary>
6107+
<details><summary><code>client.ticketTypes.<a href="/src/api/resources/ticketTypes/client/Client.ts">update</a>({ ...params }) -> Intercom.TicketType</code></summary>
61106108
<dl>
61116109
<dd>
61126110

@@ -6140,9 +6138,7 @@ You can update a ticket type.
61406138
```typescript
61416139
await client.ticketTypes.update({
61426140
ticket_type_id: "ticket_type_id",
6143-
body: {
6144-
name: "Bug Report 2",
6145-
},
6141+
name: "Bug Report 2",
61466142
});
61476143
```
61486144

@@ -6251,7 +6247,7 @@ await client.tickets.reply({
62516247
</dl>
62526248
</details>
62536249

6254-
<details><summary><code>client.tickets.<a href="/src/api/resources/tickets/client/Client.ts">create</a>({ ...params }) -> Intercom.Ticket | undefined</code></summary>
6250+
<details><summary><code>client.tickets.<a href="/src/api/resources/tickets/client/Client.ts">create</a>({ ...params }) -> Intercom.Ticket</code></summary>
62556251
<dl>
62566252
<dd>
62576253

@@ -6325,7 +6321,7 @@ await client.tickets.create({
63256321
</dl>
63266322
</details>
63276323

6328-
<details><summary><code>client.tickets.<a href="/src/api/resources/tickets/client/Client.ts">get</a>({ ...params }) -> Intercom.Ticket | undefined</code></summary>
6324+
<details><summary><code>client.tickets.<a href="/src/api/resources/tickets/client/Client.ts">get</a>({ ...params }) -> Intercom.Ticket</code></summary>
63296325
<dl>
63306326
<dd>
63316327

@@ -6390,7 +6386,7 @@ await client.tickets.get({
63906386
</dl>
63916387
</details>
63926388

6393-
<details><summary><code>client.tickets.<a href="/src/api/resources/tickets/client/Client.ts">update</a>({ ...params }) -> Intercom.Ticket | undefined</code></summary>
6389+
<details><summary><code>client.tickets.<a href="/src/api/resources/tickets/client/Client.ts">update</a>({ ...params }) -> Intercom.Ticket</code></summary>
63946390
<dl>
63956391
<dd>
63966392

@@ -6466,7 +6462,7 @@ await client.tickets.update({
64666462
</dl>
64676463
</details>
64686464

6469-
<details><summary><code>client.tickets.<a href="/src/api/resources/tickets/client/Client.ts">search</a>({ ...params }) -> core.Page<Intercom.Ticket | undefined></code></summary>
6465+
<details><summary><code>client.tickets.<a href="/src/api/resources/tickets/client/Client.ts">search</a>({ ...params }) -> core.Page<Intercom.Ticket></code></summary>
64706466
<dl>
64716467
<dd>
64726468

@@ -6629,7 +6625,7 @@ while (page.hasNextPage()) {
66296625

66306626
## Visitors
66316627

6632-
<details><summary><code>client.visitors.<a href="/src/api/resources/visitors/client/Client.ts">find</a>({ ...params }) -> Intercom.Visitor | undefined</code></summary>
6628+
<details><summary><code>client.visitors.<a href="/src/api/resources/visitors/client/Client.ts">find</a>({ ...params }) -> Intercom.Visitor</code></summary>
66336629
<dl>
66346630
<dd>
66356631

@@ -6694,7 +6690,7 @@ await client.visitors.find({
66946690
</dl>
66956691
</details>
66966692

6697-
<details><summary><code>client.visitors.<a href="/src/api/resources/visitors/client/Client.ts">update</a>({ ...params }) -> Intercom.Visitor | undefined</code></summary>
6693+
<details><summary><code>client.visitors.<a href="/src/api/resources/visitors/client/Client.ts">update</a>({ ...params }) -> Intercom.Visitor</code></summary>
66986694
<dl>
66996695
<dd>
67006696

@@ -7686,7 +7682,7 @@ await client.news.feeds.find({
76867682

76877683
## TicketTypes Attributes
76887684

7689-
<details><summary><code>client.ticketTypes.attributes.<a href="/src/api/resources/ticketTypes/resources/attributes/client/Client.ts">create</a>({ ...params }) -> Intercom.TicketTypeAttribute | undefined</code></summary>
7685+
<details><summary><code>client.ticketTypes.attributes.<a href="/src/api/resources/ticketTypes/resources/attributes/client/Client.ts">create</a>({ ...params }) -> Intercom.TicketTypeAttribute</code></summary>
76907686
<dl>
76917687
<dd>
76927688

@@ -7755,7 +7751,7 @@ await client.ticketTypes.attributes.create({
77557751
</dl>
77567752
</details>
77577753

7758-
<details><summary><code>client.ticketTypes.attributes.<a href="/src/api/resources/ticketTypes/resources/attributes/client/Client.ts">update</a>({ ...params }) -> Intercom.TicketTypeAttribute | undefined</code></summary>
7754+
<details><summary><code>client.ticketTypes.attributes.<a href="/src/api/resources/ticketTypes/resources/attributes/client/Client.ts">update</a>({ ...params }) -> Intercom.TicketTypeAttribute</code></summary>
77597755
<dl>
77607756
<dd>
77617757

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

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,9 @@ export class Admins {
9696
headers: {
9797
Authorization: await this._getAuthorizationHeader(),
9898
"X-Fern-Language": "JavaScript",
99-
"X-Fern-SDK-Name": "",
100-
"X-Fern-SDK-Version": "6.0.0",
99+
"X-Fern-SDK-Name": "intercom-client",
100+
"X-Fern-SDK-Version": "5.0.1",
101+
"User-Agent": "intercom-client/5.0.1",
101102
"Intercom-Version": requestOptions?.version ?? this._options?.version ?? "2.11",
102103
"X-Fern-Runtime": core.RUNTIME.type,
103104
"X-Fern-Runtime-Version": core.RUNTIME.version,
@@ -165,8 +166,9 @@ export class Admins {
165166
headers: {
166167
Authorization: await this._getAuthorizationHeader(),
167168
"X-Fern-Language": "JavaScript",
168-
"X-Fern-SDK-Name": "",
169-
"X-Fern-SDK-Version": "6.0.0",
169+
"X-Fern-SDK-Name": "intercom-client",
170+
"X-Fern-SDK-Version": "5.0.1",
171+
"User-Agent": "intercom-client/5.0.1",
170172
"Intercom-Version": requestOptions?.version ?? this._options?.version ?? "2.11",
171173
"X-Fern-Runtime": core.RUNTIME.type,
172174
"X-Fern-Runtime-Version": core.RUNTIME.version,
@@ -246,8 +248,9 @@ export class Admins {
246248
headers: {
247249
Authorization: await this._getAuthorizationHeader(),
248250
"X-Fern-Language": "JavaScript",
249-
"X-Fern-SDK-Name": "",
250-
"X-Fern-SDK-Version": "6.0.0",
251+
"X-Fern-SDK-Name": "intercom-client",
252+
"X-Fern-SDK-Version": "5.0.1",
253+
"User-Agent": "intercom-client/5.0.1",
251254
"Intercom-Version": requestOptions?.version ?? this._options?.version ?? "2.11",
252255
"X-Fern-Runtime": core.RUNTIME.type,
253256
"X-Fern-Runtime-Version": core.RUNTIME.version,
@@ -311,8 +314,9 @@ export class Admins {
311314
headers: {
312315
Authorization: await this._getAuthorizationHeader(),
313316
"X-Fern-Language": "JavaScript",
314-
"X-Fern-SDK-Name": "",
315-
"X-Fern-SDK-Version": "6.0.0",
317+
"X-Fern-SDK-Name": "intercom-client",
318+
"X-Fern-SDK-Version": "5.0.1",
319+
"User-Agent": "intercom-client/5.0.1",
316320
"Intercom-Version": requestOptions?.version ?? this._options?.version ?? "2.11",
317321
"X-Fern-Runtime": core.RUNTIME.type,
318322
"X-Fern-Runtime-Version": core.RUNTIME.version,
@@ -383,8 +387,9 @@ export class Admins {
383387
headers: {
384388
Authorization: await this._getAuthorizationHeader(),
385389
"X-Fern-Language": "JavaScript",
386-
"X-Fern-SDK-Name": "",
387-
"X-Fern-SDK-Version": "6.0.0",
390+
"X-Fern-SDK-Name": "intercom-client",
391+
"X-Fern-SDK-Version": "5.0.1",
392+
"User-Agent": "intercom-client/5.0.1",
388393
"Intercom-Version": requestOptions?.version ?? this._options?.version ?? "2.11",
389394
"X-Fern-Runtime": core.RUNTIME.type,
390395
"X-Fern-Runtime-Version": core.RUNTIME.version,

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

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,9 @@ export class Articles {
111111
headers: {
112112
Authorization: await this._getAuthorizationHeader(),
113113
"X-Fern-Language": "JavaScript",
114-
"X-Fern-SDK-Name": "",
115-
"X-Fern-SDK-Version": "6.0.0",
114+
"X-Fern-SDK-Name": "intercom-client",
115+
"X-Fern-SDK-Version": "5.0.1",
116+
"User-Agent": "intercom-client/5.0.1",
116117
"Intercom-Version": requestOptions?.version ?? this._options?.version ?? "2.11",
117118
"X-Fern-Runtime": core.RUNTIME.type,
118119
"X-Fern-Runtime-Version": core.RUNTIME.version,
@@ -217,8 +218,9 @@ export class Articles {
217218
headers: {
218219
Authorization: await this._getAuthorizationHeader(),
219220
"X-Fern-Language": "JavaScript",
220-
"X-Fern-SDK-Name": "",
221-
"X-Fern-SDK-Version": "6.0.0",
221+
"X-Fern-SDK-Name": "intercom-client",
222+
"X-Fern-SDK-Version": "5.0.1",
223+
"User-Agent": "intercom-client/5.0.1",
222224
"Intercom-Version": requestOptions?.version ?? this._options?.version ?? "2.11",
223225
"X-Fern-Runtime": core.RUNTIME.type,
224226
"X-Fern-Runtime-Version": core.RUNTIME.version,
@@ -292,8 +294,9 @@ export class Articles {
292294
headers: {
293295
Authorization: await this._getAuthorizationHeader(),
294296
"X-Fern-Language": "JavaScript",
295-
"X-Fern-SDK-Name": "",
296-
"X-Fern-SDK-Version": "6.0.0",
297+
"X-Fern-SDK-Name": "intercom-client",
298+
"X-Fern-SDK-Version": "5.0.1",
299+
"User-Agent": "intercom-client/5.0.1",
297300
"Intercom-Version": requestOptions?.version ?? this._options?.version ?? "2.11",
298301
"X-Fern-Runtime": core.RUNTIME.type,
299302
"X-Fern-Runtime-Version": core.RUNTIME.version,
@@ -368,16 +371,17 @@ export class Articles {
368371
headers: {
369372
Authorization: await this._getAuthorizationHeader(),
370373
"X-Fern-Language": "JavaScript",
371-
"X-Fern-SDK-Name": "",
372-
"X-Fern-SDK-Version": "6.0.0",
374+
"X-Fern-SDK-Name": "intercom-client",
375+
"X-Fern-SDK-Version": "5.0.1",
376+
"User-Agent": "intercom-client/5.0.1",
373377
"Intercom-Version": requestOptions?.version ?? this._options?.version ?? "2.11",
374378
"X-Fern-Runtime": core.RUNTIME.type,
375379
"X-Fern-Runtime-Version": core.RUNTIME.version,
376380
...requestOptions?.headers,
377381
},
378382
contentType: "application/json",
379383
requestType: "json",
380-
body: _body != null ? _body : undefined,
384+
body: _body,
381385
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
382386
maxRetries: requestOptions?.maxRetries,
383387
abortSignal: requestOptions?.abortSignal,
@@ -443,8 +447,9 @@ export class Articles {
443447
headers: {
444448
Authorization: await this._getAuthorizationHeader(),
445449
"X-Fern-Language": "JavaScript",
446-
"X-Fern-SDK-Name": "",
447-
"X-Fern-SDK-Version": "6.0.0",
450+
"X-Fern-SDK-Name": "intercom-client",
451+
"X-Fern-SDK-Version": "5.0.1",
452+
"User-Agent": "intercom-client/5.0.1",
448453
"Intercom-Version": requestOptions?.version ?? this._options?.version ?? "2.11",
449454
"X-Fern-Runtime": core.RUNTIME.type,
450455
"X-Fern-Runtime-Version": core.RUNTIME.version,
@@ -534,8 +539,9 @@ export class Articles {
534539
headers: {
535540
Authorization: await this._getAuthorizationHeader(),
536541
"X-Fern-Language": "JavaScript",
537-
"X-Fern-SDK-Name": "",
538-
"X-Fern-SDK-Version": "6.0.0",
542+
"X-Fern-SDK-Name": "intercom-client",
543+
"X-Fern-SDK-Version": "5.0.1",
544+
"User-Agent": "intercom-client/5.0.1",
539545
"Intercom-Version": requestOptions?.version ?? this._options?.version ?? "2.11",
540546
"X-Fern-Runtime": core.RUNTIME.type,
541547
"X-Fern-Runtime-Version": core.RUNTIME.version,

0 commit comments

Comments
 (0)