Skip to content

Commit

Permalink
SDK regeneration
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed Dec 21, 2024
1 parent 16ee21a commit bcaf8b0
Show file tree
Hide file tree
Showing 41 changed files with 671 additions and 518 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Intercom TypeScript Library

[![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)
[![npm shield](https://img.shields.io/npm/v/)](https://www.npmjs.com/package/)
[![npm shield](https://img.shields.io/npm/v/intercom-client)](https://www.npmjs.com/package/intercom-client)

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

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

```sh
npm i -s
npm i -s intercom-client
```

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

```typescript
import { IntercomClient } from "";
import { IntercomClient } from "intercom-client";

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

```typescript
import { Intercom } from "Intercom";
import { Intercom } from "intercom-client";

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

```typescript
import { IntercomError } from "Intercom";
import { IntercomError } from "intercom-client";

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

```typescript
import { IntercomClient } from "";
import { IntercomClient } from "intercom-client";

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

```typescript
import { IntercomClient } from "Intercom";
import { IntercomClient } from "intercom-client";

const client = new IntercomClient({
...
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "intercom-client",
"version": "6.0.0",
"version": "5.0.1",
"private": false,
"repository": "https://github.com/intercom/intercom-node",
"main": "./index.js",
Expand Down
36 changes: 16 additions & 20 deletions reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -568,10 +568,8 @@ You can update the details of a single article by making a PUT request to `https
```typescript
await client.articles.update({
article_id: "123",
body: {
title: "Christmas is here!",
body: "<p>New gifts in store for the jolly season</p>",
},
title: "Christmas is here!",
body: "<p>New gifts in store for the jolly season</p>",
});
```

Expand Down Expand Up @@ -4626,7 +4624,7 @@ await client.conversations.redactConversationPart({
</dl>
</details>

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

Expand Down Expand Up @@ -5717,7 +5715,7 @@ await client.subscriptionTypes.list();

## PhoneCallRedirects

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

Expand Down Expand Up @@ -5968,7 +5966,7 @@ await client.ticketTypes.list();
</dl>
</details>

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

Expand Down Expand Up @@ -6041,7 +6039,7 @@ await client.ticketTypes.create({
</dl>
</details>

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

Expand Down Expand Up @@ -6106,7 +6104,7 @@ await client.ticketTypes.get({
</dl>
</details>

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

Expand Down Expand Up @@ -6140,9 +6138,7 @@ You can update a ticket type.
```typescript
await client.ticketTypes.update({
ticket_type_id: "ticket_type_id",
body: {
name: "Bug Report 2",
},
name: "Bug Report 2",
});
```

Expand Down Expand Up @@ -6251,7 +6247,7 @@ await client.tickets.reply({
</dl>
</details>

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

Expand Down Expand Up @@ -6325,7 +6321,7 @@ await client.tickets.create({
</dl>
</details>

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

Expand Down Expand Up @@ -6390,7 +6386,7 @@ await client.tickets.get({
</dl>
</details>

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

Expand Down Expand Up @@ -6466,7 +6462,7 @@ await client.tickets.update({
</dl>
</details>

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

Expand Down Expand Up @@ -6629,7 +6625,7 @@ while (page.hasNextPage()) {

## Visitors

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

Expand Down Expand Up @@ -6694,7 +6690,7 @@ await client.visitors.find({
</dl>
</details>

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

Expand Down Expand Up @@ -7686,7 +7682,7 @@ await client.news.feeds.find({

## TicketTypes Attributes

<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>
<details><summary><code>client.ticketTypes.attributes.<a href="/src/api/resources/ticketTypes/resources/attributes/client/Client.ts">create</a>({ ...params }) -> Intercom.TicketTypeAttribute</code></summary>
<dl>
<dd>

Expand Down Expand Up @@ -7755,7 +7751,7 @@ await client.ticketTypes.attributes.create({
</dl>
</details>

<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>
<details><summary><code>client.ticketTypes.attributes.<a href="/src/api/resources/ticketTypes/resources/attributes/client/Client.ts">update</a>({ ...params }) -> Intercom.TicketTypeAttribute</code></summary>
<dl>
<dd>

Expand Down
25 changes: 15 additions & 10 deletions src/api/resources/admins/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,9 @@ export class Admins {
headers: {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "",
"X-Fern-SDK-Version": "6.0.0",
"X-Fern-SDK-Name": "intercom-client",
"X-Fern-SDK-Version": "5.0.1",
"User-Agent": "intercom-client/5.0.1",
"Intercom-Version": requestOptions?.version ?? this._options?.version ?? "2.11",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
Expand Down Expand Up @@ -165,8 +166,9 @@ export class Admins {
headers: {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "",
"X-Fern-SDK-Version": "6.0.0",
"X-Fern-SDK-Name": "intercom-client",
"X-Fern-SDK-Version": "5.0.1",
"User-Agent": "intercom-client/5.0.1",
"Intercom-Version": requestOptions?.version ?? this._options?.version ?? "2.11",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
Expand Down Expand Up @@ -246,8 +248,9 @@ export class Admins {
headers: {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "",
"X-Fern-SDK-Version": "6.0.0",
"X-Fern-SDK-Name": "intercom-client",
"X-Fern-SDK-Version": "5.0.1",
"User-Agent": "intercom-client/5.0.1",
"Intercom-Version": requestOptions?.version ?? this._options?.version ?? "2.11",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
Expand Down Expand Up @@ -311,8 +314,9 @@ export class Admins {
headers: {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "",
"X-Fern-SDK-Version": "6.0.0",
"X-Fern-SDK-Name": "intercom-client",
"X-Fern-SDK-Version": "5.0.1",
"User-Agent": "intercom-client/5.0.1",
"Intercom-Version": requestOptions?.version ?? this._options?.version ?? "2.11",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
Expand Down Expand Up @@ -383,8 +387,9 @@ export class Admins {
headers: {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "",
"X-Fern-SDK-Version": "6.0.0",
"X-Fern-SDK-Name": "intercom-client",
"X-Fern-SDK-Version": "5.0.1",
"User-Agent": "intercom-client/5.0.1",
"Intercom-Version": requestOptions?.version ?? this._options?.version ?? "2.11",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
Expand Down
32 changes: 19 additions & 13 deletions src/api/resources/articles/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,9 @@ export class Articles {
headers: {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "",
"X-Fern-SDK-Version": "6.0.0",
"X-Fern-SDK-Name": "intercom-client",
"X-Fern-SDK-Version": "5.0.1",
"User-Agent": "intercom-client/5.0.1",
"Intercom-Version": requestOptions?.version ?? this._options?.version ?? "2.11",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
Expand Down Expand Up @@ -217,8 +218,9 @@ export class Articles {
headers: {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "",
"X-Fern-SDK-Version": "6.0.0",
"X-Fern-SDK-Name": "intercom-client",
"X-Fern-SDK-Version": "5.0.1",
"User-Agent": "intercom-client/5.0.1",
"Intercom-Version": requestOptions?.version ?? this._options?.version ?? "2.11",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
Expand Down Expand Up @@ -292,8 +294,9 @@ export class Articles {
headers: {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "",
"X-Fern-SDK-Version": "6.0.0",
"X-Fern-SDK-Name": "intercom-client",
"X-Fern-SDK-Version": "5.0.1",
"User-Agent": "intercom-client/5.0.1",
"Intercom-Version": requestOptions?.version ?? this._options?.version ?? "2.11",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
Expand Down Expand Up @@ -368,16 +371,17 @@ export class Articles {
headers: {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "",
"X-Fern-SDK-Version": "6.0.0",
"X-Fern-SDK-Name": "intercom-client",
"X-Fern-SDK-Version": "5.0.1",
"User-Agent": "intercom-client/5.0.1",
"Intercom-Version": requestOptions?.version ?? this._options?.version ?? "2.11",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
...requestOptions?.headers,
},
contentType: "application/json",
requestType: "json",
body: _body != null ? _body : undefined,
body: _body,
timeoutMs: requestOptions?.timeoutInSeconds != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
maxRetries: requestOptions?.maxRetries,
abortSignal: requestOptions?.abortSignal,
Expand Down Expand Up @@ -443,8 +447,9 @@ export class Articles {
headers: {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "",
"X-Fern-SDK-Version": "6.0.0",
"X-Fern-SDK-Name": "intercom-client",
"X-Fern-SDK-Version": "5.0.1",
"User-Agent": "intercom-client/5.0.1",
"Intercom-Version": requestOptions?.version ?? this._options?.version ?? "2.11",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
Expand Down Expand Up @@ -534,8 +539,9 @@ export class Articles {
headers: {
Authorization: await this._getAuthorizationHeader(),
"X-Fern-Language": "JavaScript",
"X-Fern-SDK-Name": "",
"X-Fern-SDK-Version": "6.0.0",
"X-Fern-SDK-Name": "intercom-client",
"X-Fern-SDK-Version": "5.0.1",
"User-Agent": "intercom-client/5.0.1",
"Intercom-Version": requestOptions?.version ?? this._options?.version ?? "2.11",
"X-Fern-Runtime": core.RUNTIME.type,
"X-Fern-Runtime-Version": core.RUNTIME.version,
Expand Down
Loading

0 comments on commit bcaf8b0

Please sign in to comment.