From bcaf8b06f2285a9b6cb3dd2ed168c766a291ffa7 Mon Sep 17 00:00:00 2001 From: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Date: Sat, 21 Dec 2024 02:09:02 +0000 Subject: [PATCH] SDK regeneration --- README.md | 14 +- package.json | 2 +- reference.md | 36 +++-- src/api/resources/admins/client/Client.ts | 25 ++-- src/api/resources/articles/client/Client.ts | 32 +++-- .../client/requests/UpdateArticleRequest.ts | 37 ++++- src/api/resources/companies/client/Client.ts | 55 +++++--- src/api/resources/contacts/client/Client.ts | 75 ++++++---- .../resources/conversations/client/Client.ts | 133 ++++++++++-------- .../ManageConversationPartsRequest.ts | 65 +++++---- .../requests/ReplyToConversationRequest.ts | 75 ++++++---- .../resources/dataAttributes/client/Client.ts | 15 +- src/api/resources/dataExport/client/Client.ts | 20 +-- src/api/resources/events/client/Client.ts | 15 +- .../resources/helpCenters/client/Client.ts | 10 +- .../resources/collections/client/Client.ts | 25 ++-- src/api/resources/messages/client/Client.ts | 5 +- .../news/resources/feeds/client/Client.ts | 15 +- .../news/resources/items/client/Client.ts | 47 ++++--- .../client/requests/UpdateNewsItemRequest.ts | 25 ++-- src/api/resources/notes/client/Client.ts | 15 +- .../phoneCallRedirects/client/Client.ts | 9 +- src/api/resources/segments/client/Client.ts | 10 +- .../subscriptionTypes/client/Client.ts | 5 +- src/api/resources/tags/client/Client.ts | 50 ++++--- src/api/resources/teams/client/Client.ts | 10 +- .../resources/ticketTypes/client/Client.ts | 34 +++-- .../requests/UpdateTicketTypeRequest.ts | 30 +++- .../resources/attributes/client/Client.ts | 18 +-- src/api/resources/tickets/client/Client.ts | 93 ++++++------ .../client/requests/ReplyToTicketRequest.ts | 77 +++++----- src/api/resources/tickets/types/Ticket.ts | 2 +- src/api/resources/visitors/client/Client.ts | 23 +-- src/api/types/TicketList.ts | 2 +- src/api/types/TicketTypeAttributeList.ts | 2 +- src/api/types/TicketTypeList.ts | 2 +- src/api/types/UpdateArticleRequestBody.ts | 37 ----- src/api/types/UpdateTicketTypeRequestBody.ts | 34 ----- src/api/types/index.ts | 2 - src/version.ts | 2 +- yarn.lock | 6 +- 41 files changed, 671 insertions(+), 518 deletions(-) delete mode 100644 src/api/types/UpdateArticleRequestBody.ts delete mode 100644 src/api/types/UpdateTicketTypeRequestBody.ts diff --git a/README.md b/README.md index ef10201..2c5ab5b 100644 --- a/README.md +++ b/README.md @@ -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. @@ -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 @@ -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({ @@ -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 = { ... @@ -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(...); @@ -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(); @@ -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({ ... diff --git a/package.json b/package.json index 3692ca6..8b9712c 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/reference.md b/reference.md index 95db0ac..09ab857 100644 --- a/reference.md +++ b/reference.md @@ -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: "

New gifts in store for the jolly season

", - }, + title: "Christmas is here!", + body: "

New gifts in store for the jolly season

", }); ``` @@ -4626,7 +4624,7 @@ await client.conversations.redactConversationPart({ -
client.conversations.convertToTicket({ ...params }) -> Intercom.Ticket | undefined +
client.conversations.convertToTicket({ ...params }) -> Intercom.Ticket
@@ -5717,7 +5715,7 @@ await client.subscriptionTypes.list(); ## PhoneCallRedirects -
client.phoneCallRedirects.create({ ...params }) -> Intercom.PhoneSwitch | undefined +
client.phoneCallRedirects.create({ ...params }) -> Intercom.PhoneSwitch
@@ -5968,7 +5966,7 @@ await client.ticketTypes.list();
-
client.ticketTypes.create({ ...params }) -> Intercom.TicketType | undefined +
client.ticketTypes.create({ ...params }) -> Intercom.TicketType
@@ -6041,7 +6039,7 @@ await client.ticketTypes.create({
-
client.ticketTypes.get({ ...params }) -> Intercom.TicketType | undefined +
client.ticketTypes.get({ ...params }) -> Intercom.TicketType
@@ -6106,7 +6104,7 @@ await client.ticketTypes.get({
-
client.ticketTypes.update({ ...params }) -> Intercom.TicketType | undefined +
client.ticketTypes.update({ ...params }) -> Intercom.TicketType
@@ -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", }); ``` @@ -6251,7 +6247,7 @@ await client.tickets.reply({
-
client.tickets.create({ ...params }) -> Intercom.Ticket | undefined +
client.tickets.create({ ...params }) -> Intercom.Ticket
@@ -6325,7 +6321,7 @@ await client.tickets.create({
-
client.tickets.get({ ...params }) -> Intercom.Ticket | undefined +
client.tickets.get({ ...params }) -> Intercom.Ticket
@@ -6390,7 +6386,7 @@ await client.tickets.get({
-
client.tickets.update({ ...params }) -> Intercom.Ticket | undefined +
client.tickets.update({ ...params }) -> Intercom.Ticket
@@ -6466,7 +6462,7 @@ await client.tickets.update({
-
client.tickets.search({ ...params }) -> core.Page +
client.tickets.search({ ...params }) -> core.Page
@@ -6629,7 +6625,7 @@ while (page.hasNextPage()) { ## Visitors -
client.visitors.find({ ...params }) -> Intercom.Visitor | undefined +
client.visitors.find({ ...params }) -> Intercom.Visitor
@@ -6694,7 +6690,7 @@ await client.visitors.find({
-
client.visitors.update({ ...params }) -> Intercom.Visitor | undefined +
client.visitors.update({ ...params }) -> Intercom.Visitor
@@ -7686,7 +7682,7 @@ await client.news.feeds.find({ ## TicketTypes Attributes -
client.ticketTypes.attributes.create({ ...params }) -> Intercom.TicketTypeAttribute | undefined +
client.ticketTypes.attributes.create({ ...params }) -> Intercom.TicketTypeAttribute
@@ -7755,7 +7751,7 @@ await client.ticketTypes.attributes.create({
-
client.ticketTypes.attributes.update({ ...params }) -> Intercom.TicketTypeAttribute | undefined +
client.ticketTypes.attributes.update({ ...params }) -> Intercom.TicketTypeAttribute
diff --git a/src/api/resources/admins/client/Client.ts b/src/api/resources/admins/client/Client.ts index aacabfa..c026d6e 100644 --- a/src/api/resources/admins/client/Client.ts +++ b/src/api/resources/admins/client/Client.ts @@ -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, @@ -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, @@ -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, @@ -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, @@ -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, diff --git a/src/api/resources/articles/client/Client.ts b/src/api/resources/articles/client/Client.ts index 354b173..61d3d22 100644 --- a/src/api/resources/articles/client/Client.ts +++ b/src/api/resources/articles/client/Client.ts @@ -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, @@ -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, @@ -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, @@ -368,8 +371,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, @@ -377,7 +381,7 @@ export class Articles { }, 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, @@ -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, @@ -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, diff --git a/src/api/resources/articles/client/requests/UpdateArticleRequest.ts b/src/api/resources/articles/client/requests/UpdateArticleRequest.ts index 62f8764..4714b22 100644 --- a/src/api/resources/articles/client/requests/UpdateArticleRequest.ts +++ b/src/api/resources/articles/client/requests/UpdateArticleRequest.ts @@ -5,6 +5,13 @@ import * as Intercom from "../../../../index"; /** + * @example + * { + * article_id: "123", + * title: "Christmas is here!", + * body: "

New gifts in store for the jolly season

" + * } + * * @example * { * article_id: "123", @@ -12,9 +19,35 @@ import * as Intercom from "../../../../index"; * body: "

New gifts in store for the jolly season

" * } */ -export type UpdateArticleRequest = { +export interface UpdateArticleRequest { /** * The unique identifier for the article which is given by Intercom. */ article_id: string; -} & Intercom.UpdateArticleRequestBody; + /** The title of the article.For multilingual articles, this will be the title of the default language's content. */ + title?: string; + /** The description of the article. For multilingual articles, this will be the description of the default language's content. */ + description?: string; + /** The content of the article. For multilingual articles, this will be the body of the default language's content. */ + body?: string; + /** The id of the author of the article. For multilingual articles, this will be the id of the author of the default language's content. Must be a teammate on the help center's workspace. */ + author_id?: number; + /** Whether the article will be `published` or will be a `draft`. Defaults to draft. For multilingual articles, this will be the state of the default language's content. */ + state?: UpdateArticleRequest.State; + /** The id of the article's parent collection or section. An article without this field stands alone. */ + parent_id?: string; + /** The type of parent, which can either be a `collection` or `section`. */ + parent_type?: string; + translated_content?: Intercom.ArticleTranslatedContent; +} + +export namespace UpdateArticleRequest { + /** + * Whether the article will be `published` or will be a `draft`. Defaults to draft. For multilingual articles, this will be the state of the default language's content. + */ + export type State = "published" | "draft"; + export const State = { + Published: "published", + Draft: "draft", + } as const; +} diff --git a/src/api/resources/companies/client/Client.ts b/src/api/resources/companies/client/Client.ts index 577c968..453ec9e 100644 --- a/src/api/resources/companies/client/Client.ts +++ b/src/api/resources/companies/client/Client.ts @@ -139,8 +139,9 @@ export class Companies { 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, @@ -226,8 +227,9 @@ export class Companies { 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, @@ -301,8 +303,9 @@ export class Companies { 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, @@ -379,8 +382,9 @@ export class Companies { 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, @@ -453,8 +457,9 @@ export class Companies { 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, @@ -536,8 +541,9 @@ export class Companies { 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, @@ -613,8 +619,9 @@ export class Companies { 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, @@ -708,8 +715,9 @@ export class Companies { 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, @@ -807,8 +815,9 @@ export class Companies { 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, @@ -901,8 +910,9 @@ export class Companies { 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, @@ -981,8 +991,9 @@ export class Companies { 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, diff --git a/src/api/resources/contacts/client/Client.ts b/src/api/resources/contacts/client/Client.ts index 552eed9..b321dec 100644 --- a/src/api/resources/contacts/client/Client.ts +++ b/src/api/resources/contacts/client/Client.ts @@ -112,8 +112,9 @@ export class Contacts { 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, @@ -198,8 +199,9 @@ export class Contacts { 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, @@ -280,8 +282,9 @@ export class Contacts { 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, @@ -371,8 +374,9 @@ export class Contacts { 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, @@ -449,8 +453,9 @@ export class Contacts { 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, @@ -525,8 +530,9 @@ export class Contacts { 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, @@ -598,8 +604,9 @@ export class Contacts { 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, @@ -671,8 +678,9 @@ export class Contacts { 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, @@ -743,8 +751,9 @@ export class Contacts { 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, @@ -814,8 +823,9 @@ export class Contacts { 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, @@ -996,8 +1006,9 @@ export class Contacts { 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, @@ -1091,8 +1102,9 @@ export class Contacts { 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, @@ -1169,8 +1181,9 @@ export class Contacts { 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, @@ -1239,8 +1252,9 @@ export class Contacts { 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, @@ -1305,8 +1319,9 @@ export class Contacts { 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, diff --git a/src/api/resources/conversations/client/Client.ts b/src/api/resources/conversations/client/Client.ts index 9ca33df..df42f3c 100644 --- a/src/api/resources/conversations/client/Client.ts +++ b/src/api/resources/conversations/client/Client.ts @@ -116,8 +116,9 @@ export class Conversations { 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, @@ -220,8 +221,9 @@ export class Conversations { 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, @@ -313,8 +315,9 @@ export class Conversations { 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, @@ -410,8 +413,9 @@ export class Conversations { 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, @@ -596,8 +600,9 @@ export class Conversations { 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, @@ -658,44 +663,52 @@ export class Conversations { * @example * await client.conversations.reply({ * conversation_id: "123 or \"last\"", - * message_type: "comment", - * type: "user", - * body: "Thanks again :)", - * intercom_user_id: "667d60f18a68186f43bafdf4" + * body: { + * message_type: "comment", + * type: "user", + * body: "Thanks again :)", + * intercom_user_id: "667d60f18a68186f43bafdf4" + * } * }) * * @example * await client.conversations.reply({ * conversation_id: "123 or \"last\"", - * message_type: "note", - * type: "admin", - * body: "

An Unordered HTML List

  • Coffee
  • Tea
  • Milk

An Ordered HTML List

  1. Coffee
  2. Tea
  3. Milk
", - * admin_id: "3156780" + * body: { + * message_type: "note", + * type: "admin", + * body: "

An Unordered HTML List

  • Coffee
  • Tea
  • Milk

An Ordered HTML List

  1. Coffee
  2. Tea
  3. Milk
", + * admin_id: "3156780" + * } * }) * * @example * await client.conversations.reply({ * conversation_id: "123 or \"last\"", - * message_type: "comment", - * type: "user", - * body: "Thanks again :)", - * intercom_user_id: "667d60f78a68186f43bafdf7" + * body: { + * message_type: "comment", + * type: "user", + * body: "Thanks again :)", + * intercom_user_id: "667d60f78a68186f43bafdf7" + * } * }) * * @example * await client.conversations.reply({ * conversation_id: "123 or \"last\"", - * message_type: "comment", - * type: "user", - * body: "Thanks again :)", - * intercom_user_id: "667d60f98a68186f43bafdf8" + * body: { + * message_type: "comment", + * type: "user", + * body: "Thanks again :)", + * intercom_user_id: "667d60f98a68186f43bafdf8" + * } * }) */ public async reply( request: Intercom.ReplyToConversationRequest, requestOptions?: Conversations.RequestOptions ): Promise { - const { conversation_id: conversationId, ..._body } = request; + const { conversation_id: conversationId, body: _body } = request; const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.IntercomEnvironment.UsProduction, @@ -705,8 +718,9 @@ export class Conversations { 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, @@ -773,29 +787,32 @@ export class Conversations { * @example * await client.conversations.manage({ * conversation_id: "123", - * message_type: "assignment", - * type: "admin", - * admin_id: "12345", - * assignee_id: "4324241", - * body: "Goodbye :)" + * body: { + * message_type: "assignment", + * type: "admin", + * admin_id: "12345", + * assignee_id: "4324241", + * body: "Goodbye :)" + * } * }) * * @example * await client.conversations.manage({ * conversation_id: "123", - * message_type: "assignment", - * type: "admin", - * admin_id: "12345", - * assignee_id: "4324241", - * body: "Let me pass you over to one of my colleagues." - * }) + * body: { + * message_type: "assignment", + * type: "admin", + * admin_id: "12345", + * assignee_id: "4324241", + * body: "Let me pass you over to one of my colleagues." + * } * }) */ public async manage( request: Intercom.ManageConversationPartsRequest, requestOptions?: Conversations.RequestOptions ): Promise { - const { conversation_id: conversationId, ..._body } = request; + const { conversation_id: conversationId, body: _body } = request; const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.IntercomEnvironment.UsProduction, @@ -805,8 +822,9 @@ export class Conversations { 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, @@ -888,8 +906,9 @@ export class Conversations { 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, @@ -985,8 +1004,9 @@ export class Conversations { 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, @@ -1073,8 +1093,9 @@ export class Conversations { 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, @@ -1167,8 +1188,9 @@ export class Conversations { 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, @@ -1237,7 +1259,7 @@ export class Conversations { public async convertToTicket( request: Intercom.ConvertConversationToTicketRequest, requestOptions?: Conversations.RequestOptions - ): Promise { + ): Promise { const { conversation_id: conversationId, ..._body } = request; const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( @@ -1248,8 +1270,9 @@ export class Conversations { 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, @@ -1263,7 +1286,7 @@ export class Conversations { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return _response.body as Intercom.Ticket | undefined; + return _response.body as Intercom.Ticket; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/conversations/client/requests/ManageConversationPartsRequest.ts b/src/api/resources/conversations/client/requests/ManageConversationPartsRequest.ts index f8d95fc..1ad1d15 100644 --- a/src/api/resources/conversations/client/requests/ManageConversationPartsRequest.ts +++ b/src/api/resources/conversations/client/requests/ManageConversationPartsRequest.ts @@ -8,56 +8,67 @@ import * as Intercom from "../../../../index"; * @example * { * conversation_id: "123", - * message_type: "assignment", - * type: "admin", - * admin_id: "12345", - * assignee_id: "4324241", - * body: "Goodbye :)" + * body: { + * message_type: "assignment", + * type: "admin", + * admin_id: "12345", + * assignee_id: "4324241", + * body: "Goodbye :)" + * } * } * * @example * { * conversation_id: "123", - * message_type: "assignment", - * type: "admin", - * admin_id: "12345", - * assignee_id: "4324241", - * body: "Let me pass you over to one of my colleagues." + * body: { + * message_type: "assignment", + * type: "admin", + * admin_id: "12345", + * assignee_id: "4324241", + * body: "Let me pass you over to one of my colleagues." + * } * } * * @example * { * conversation_id: "123", - * message_type: "assignment", - * type: "admin", - * admin_id: "12345", - * assignee_id: "4324241", - * body: "Let me pass you over to one of my colleagues." + * body: { + * message_type: "assignment", + * type: "admin", + * admin_id: "12345", + * assignee_id: "4324241", + * body: "Let me pass you over to one of my colleagues." + * } * } * * @example * { * conversation_id: "123", - * message_type: "assignment", - * type: "admin", - * admin_id: "12345", - * assignee_id: "4324241", - * body: "Let me pass you over to one of my colleagues." + * body: { + * message_type: "assignment", + * type: "admin", + * admin_id: "12345", + * assignee_id: "4324241", + * body: "Let me pass you over to one of my colleagues." + * } * } * * @example * { * conversation_id: "123", - * message_type: "assignment", - * type: "admin", - * admin_id: "12345", - * assignee_id: "4324241", - * body: "Goodbye :)" + * body: { + * message_type: "assignment", + * type: "admin", + * admin_id: "12345", + * assignee_id: "4324241", + * body: "Goodbye :)" + * } * } */ -export type ManageConversationPartsRequest = { +export interface ManageConversationPartsRequest { /** * The identifier for the conversation as given by Intercom. */ conversation_id: string; -} & Intercom.ConversationsManageRequestBody; + body: Intercom.ConversationsManageRequestBody; +} diff --git a/src/api/resources/conversations/client/requests/ReplyToConversationRequest.ts b/src/api/resources/conversations/client/requests/ReplyToConversationRequest.ts index 18f8a92..e9ae597 100644 --- a/src/api/resources/conversations/client/requests/ReplyToConversationRequest.ts +++ b/src/api/resources/conversations/client/requests/ReplyToConversationRequest.ts @@ -8,69 +8,84 @@ import * as Intercom from "../../../../index"; * @example * { * conversation_id: "123 or \"last\"", - * message_type: "comment", - * type: "user", - * body: "Thanks again :)", - * intercom_user_id: "667d60f18a68186f43bafdf4" + * body: { + * message_type: "comment", + * type: "user", + * body: "Thanks again :)", + * intercom_user_id: "667d60f18a68186f43bafdf4" + * } * } * * @example * { * conversation_id: "123 or \"last\"", - * message_type: "note", - * type: "admin", - * body: "

An Unordered HTML List

  • Coffee
  • Tea
  • Milk

An Ordered HTML List

  1. Coffee
  2. Tea
  3. Milk
", - * admin_id: "3156780" + * body: { + * message_type: "note", + * type: "admin", + * body: "

An Unordered HTML List

  • Coffee
  • Tea
  • Milk

An Ordered HTML List

  1. Coffee
  2. Tea
  3. Milk
", + * admin_id: "3156780" + * } * } * * @example * { * conversation_id: "123 or \"last\"", - * message_type: "comment", - * type: "user", - * body: "Thanks again :)", - * intercom_user_id: "667d60f78a68186f43bafdf7" + * body: { + * message_type: "comment", + * type: "user", + * body: "Thanks again :)", + * intercom_user_id: "667d60f78a68186f43bafdf7" + * } * } * * @example * { * conversation_id: "123 or \"last\"", - * message_type: "comment", - * type: "user", - * body: "Thanks again :)", - * intercom_user_id: "667d60f98a68186f43bafdf8" + * body: { + * message_type: "comment", + * type: "user", + * body: "Thanks again :)", + * intercom_user_id: "667d60f98a68186f43bafdf8" + * } * } * * @example * { * conversation_id: "123 or \"last\"", - * message_type: "comment", - * type: "user", - * body: "Thanks again :)", - * intercom_user_id: "667d60f18a68186f43bafdf4" + * body: { + * message_type: "comment", + * type: "user", + * body: "Thanks again :)", + * intercom_user_id: "667d60f18a68186f43bafdf4" + * } * } * * @example * { * conversation_id: "123 or \"last\"", - * message_type: "comment", - * type: "user", - * body: "Thanks again :)", - * intercom_user_id: "667d60f18a68186f43bafdf4" + * body: { + * message_type: "comment", + * type: "user", + * body: "Thanks again :)", + * intercom_user_id: "667d60f18a68186f43bafdf4" + * } * } * * @example * { * conversation_id: "123 or \"last\"", - * message_type: "comment", - * type: "user", - * body: "Thanks again :)", - * intercom_user_id: "667d60f18a68186f43bafdf4" + * body: { + * message_type: "comment", + * type: "user", + * body: "Thanks again :)", + * intercom_user_id: "667d60f18a68186f43bafdf4" + * } * } */ -export type ReplyToConversationRequest = { +export interface ReplyToConversationRequest { /** * The Intercom provisioned identifier for the conversation or the string "last" to reply to the last part of the conversation */ conversation_id: string; -} & Intercom.ReplyConversationRequest; + body: Intercom.ReplyConversationRequest; +} diff --git a/src/api/resources/dataAttributes/client/Client.ts b/src/api/resources/dataAttributes/client/Client.ts index f79dddf..7338558 100644 --- a/src/api/resources/dataAttributes/client/Client.ts +++ b/src/api/resources/dataAttributes/client/Client.ts @@ -107,8 +107,9 @@ export class DataAttributes { 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, @@ -218,8 +219,9 @@ export class DataAttributes { 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, @@ -326,8 +328,9 @@ export class DataAttributes { 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, diff --git a/src/api/resources/dataExport/client/Client.ts b/src/api/resources/dataExport/client/Client.ts index 0db1188..7a78c44 100644 --- a/src/api/resources/dataExport/client/Client.ts +++ b/src/api/resources/dataExport/client/Client.ts @@ -112,8 +112,9 @@ export class DataExport { 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, @@ -181,8 +182,9 @@ export class DataExport { 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, @@ -247,8 +249,9 @@ export class DataExport { 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, @@ -319,8 +322,9 @@ export class DataExport { 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, diff --git a/src/api/resources/events/client/Client.ts b/src/api/resources/events/client/Client.ts index 62ca9b1..11f744f 100644 --- a/src/api/resources/events/client/Client.ts +++ b/src/api/resources/events/client/Client.ts @@ -139,8 +139,9 @@ export class Events { 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, @@ -253,8 +254,9 @@ export class Events { 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, @@ -323,8 +325,9 @@ export class Events { 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, diff --git a/src/api/resources/helpCenters/client/Client.ts b/src/api/resources/helpCenters/client/Client.ts index eabf316..d9673a5 100644 --- a/src/api/resources/helpCenters/client/Client.ts +++ b/src/api/resources/helpCenters/client/Client.ts @@ -105,8 +105,9 @@ export class HelpCenters { 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, @@ -187,8 +188,9 @@ export class HelpCenters { 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, diff --git a/src/api/resources/helpCenters/resources/collections/client/Client.ts b/src/api/resources/helpCenters/resources/collections/client/Client.ts index ad266cb..52328ae 100644 --- a/src/api/resources/helpCenters/resources/collections/client/Client.ts +++ b/src/api/resources/helpCenters/resources/collections/client/Client.ts @@ -106,8 +106,9 @@ export class Collections { 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, @@ -195,8 +196,9 @@ export class Collections { 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, @@ -270,8 +272,9 @@ export class Collections { 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, @@ -347,8 +350,9 @@ export class Collections { 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, @@ -424,8 +428,9 @@ export class Collections { 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, diff --git a/src/api/resources/messages/client/Client.ts b/src/api/resources/messages/client/Client.ts index a3753db..b4aef3e 100644 --- a/src/api/resources/messages/client/Client.ts +++ b/src/api/resources/messages/client/Client.ts @@ -197,8 +197,9 @@ export class Messages { 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, diff --git a/src/api/resources/news/resources/feeds/client/Client.ts b/src/api/resources/news/resources/feeds/client/Client.ts index 7896caf..36f4c66 100644 --- a/src/api/resources/news/resources/feeds/client/Client.ts +++ b/src/api/resources/news/resources/feeds/client/Client.ts @@ -97,8 +97,9 @@ export class Feeds { 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, @@ -163,8 +164,9 @@ export class Feeds { 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, @@ -234,8 +236,9 @@ export class Feeds { 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, diff --git a/src/api/resources/news/resources/items/client/Client.ts b/src/api/resources/news/resources/items/client/Client.ts index 12ea8fc..8cf28c2 100644 --- a/src/api/resources/news/resources/items/client/Client.ts +++ b/src/api/resources/news/resources/items/client/Client.ts @@ -90,8 +90,9 @@ export class Items { 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, @@ -170,8 +171,9 @@ export class Items { 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, @@ -243,8 +245,9 @@ export class Items { 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, @@ -301,26 +304,30 @@ export class Items { * @example * await client.news.items.update({ * news_item_id: "123", - * title: "Christmas is here!", - * body: "

New gifts in store for the jolly season

", - * sender_id: 991267745, - * reactions: ["\uD83D\uDE1D", "\uD83D\uDE02"] + * body: { + * title: "Christmas is here!", + * body: "

New gifts in store for the jolly season

", + * sender_id: 991267745, + * reactions: ["\uD83D\uDE1D", "\uD83D\uDE02"] + * } * }) * * @example * await client.news.items.update({ * news_item_id: "123", - * title: "Christmas is here!", - * body: "

New gifts in store for the jolly season

", - * sender_id: 991267748, - * reactions: ["\uD83D\uDE1D", "\uD83D\uDE02"] + * body: { + * title: "Christmas is here!", + * body: "

New gifts in store for the jolly season

", + * sender_id: 991267748, + * reactions: ["\uD83D\uDE1D", "\uD83D\uDE02"] + * } * }) */ public async update( request: Intercom.news.UpdateNewsItemRequest, requestOptions?: Items.RequestOptions ): Promise { - const { news_item_id: newsItemId, ..._body } = request; + const { news_item_id: newsItemId, body: _body } = request; const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.IntercomEnvironment.UsProduction, @@ -330,8 +337,9 @@ export class Items { 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, @@ -407,8 +415,9 @@ export class Items { 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, diff --git a/src/api/resources/news/resources/items/client/requests/UpdateNewsItemRequest.ts b/src/api/resources/news/resources/items/client/requests/UpdateNewsItemRequest.ts index 52a6da6..ec976bc 100644 --- a/src/api/resources/news/resources/items/client/requests/UpdateNewsItemRequest.ts +++ b/src/api/resources/news/resources/items/client/requests/UpdateNewsItemRequest.ts @@ -8,24 +8,29 @@ import * as Intercom from "../../../../../../index"; * @example * { * news_item_id: "123", - * title: "Christmas is here!", - * body: "

New gifts in store for the jolly season

", - * sender_id: 991267745, - * reactions: ["\uD83D\uDE1D", "\uD83D\uDE02"] + * body: { + * title: "Christmas is here!", + * body: "

New gifts in store for the jolly season

", + * sender_id: 991267745, + * reactions: ["\uD83D\uDE1D", "\uD83D\uDE02"] + * } * } * * @example * { * news_item_id: "123", - * title: "Christmas is here!", - * body: "

New gifts in store for the jolly season

", - * sender_id: 991267748, - * reactions: ["\uD83D\uDE1D", "\uD83D\uDE02"] + * body: { + * title: "Christmas is here!", + * body: "

New gifts in store for the jolly season

", + * sender_id: 991267748, + * reactions: ["\uD83D\uDE1D", "\uD83D\uDE02"] + * } * } */ -export type UpdateNewsItemRequest = { +export interface UpdateNewsItemRequest { /** * The unique identifier for the news item which is given by Intercom. */ news_item_id: string; -} & Intercom.NewsItemRequest; + body: Intercom.NewsItemRequest; +} diff --git a/src/api/resources/notes/client/Client.ts b/src/api/resources/notes/client/Client.ts index 9e7506a..74972f6 100644 --- a/src/api/resources/notes/client/Client.ts +++ b/src/api/resources/notes/client/Client.ts @@ -109,8 +109,9 @@ export class Notes { 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, @@ -194,8 +195,9 @@ export class Notes { 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, @@ -269,8 +271,9 @@ export class Notes { 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, diff --git a/src/api/resources/phoneCallRedirects/client/Client.ts b/src/api/resources/phoneCallRedirects/client/Client.ts index e639c0b..ffe4ab7 100644 --- a/src/api/resources/phoneCallRedirects/client/Client.ts +++ b/src/api/resources/phoneCallRedirects/client/Client.ts @@ -104,7 +104,7 @@ export class PhoneCallRedirects { public async create( request: Intercom.CreatePhoneCallRedirectRequest, requestOptions?: PhoneCallRedirects.RequestOptions - ): Promise { + ): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.IntercomEnvironment.UsProduction, @@ -114,8 +114,9 @@ export class PhoneCallRedirects { 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, @@ -129,7 +130,7 @@ export class PhoneCallRedirects { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return _response.body as Intercom.PhoneSwitch | undefined; + return _response.body as Intercom.PhoneSwitch; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/segments/client/Client.ts b/src/api/resources/segments/client/Client.ts index 637254c..3254892 100644 --- a/src/api/resources/segments/client/Client.ts +++ b/src/api/resources/segments/client/Client.ts @@ -103,8 +103,9 @@ export class Segments { 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, @@ -176,8 +177,9 @@ export class Segments { 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, diff --git a/src/api/resources/subscriptionTypes/client/Client.ts b/src/api/resources/subscriptionTypes/client/Client.ts index 558bbdf..81544fe 100644 --- a/src/api/resources/subscriptionTypes/client/Client.ts +++ b/src/api/resources/subscriptionTypes/client/Client.ts @@ -93,8 +93,9 @@ export class SubscriptionTypes { 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, diff --git a/src/api/resources/tags/client/Client.ts b/src/api/resources/tags/client/Client.ts index e6f68ab..e0de8b5 100644 --- a/src/api/resources/tags/client/Client.ts +++ b/src/api/resources/tags/client/Client.ts @@ -108,8 +108,9 @@ export class Tags { 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, @@ -186,8 +187,9 @@ export class Tags { 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, @@ -264,8 +266,9 @@ export class Tags { 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, @@ -343,8 +346,9 @@ export class Tags { 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, @@ -413,8 +417,9 @@ export class Tags { 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, @@ -518,8 +523,9 @@ export class Tags { 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, @@ -593,8 +599,9 @@ export class Tags { 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, @@ -665,8 +672,9 @@ export class Tags { 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, @@ -743,8 +751,9 @@ export class Tags { 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, @@ -820,8 +829,9 @@ export class Tags { 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, diff --git a/src/api/resources/teams/client/Client.ts b/src/api/resources/teams/client/Client.ts index 69fe058..4af76bd 100644 --- a/src/api/resources/teams/client/Client.ts +++ b/src/api/resources/teams/client/Client.ts @@ -93,8 +93,9 @@ export class Teams { 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, @@ -165,8 +166,9 @@ export class Teams { 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, diff --git a/src/api/resources/ticketTypes/client/Client.ts b/src/api/resources/ticketTypes/client/Client.ts index fb3d0bd..bd9632d 100644 --- a/src/api/resources/ticketTypes/client/Client.ts +++ b/src/api/resources/ticketTypes/client/Client.ts @@ -100,8 +100,9 @@ export class TicketTypes { 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, @@ -167,7 +168,7 @@ export class TicketTypes { public async create( request: Intercom.CreateTicketTypeRequest, requestOptions?: TicketTypes.RequestOptions - ): Promise { + ): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.IntercomEnvironment.UsProduction, @@ -177,8 +178,9 @@ export class TicketTypes { 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, @@ -192,7 +194,7 @@ export class TicketTypes { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return _response.body as Intercom.TicketType | undefined; + return _response.body as Intercom.TicketType; } if (_response.error.reason === "status-code") { @@ -238,7 +240,7 @@ export class TicketTypes { public async get( request: Intercom.FindTicketTypeRequest, requestOptions?: TicketTypes.RequestOptions - ): Promise { + ): Promise { const { ticket_type_id: ticketTypeId } = request; const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( @@ -249,8 +251,9 @@ export class TicketTypes { 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, @@ -263,7 +266,7 @@ export class TicketTypes { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return _response.body as Intercom.TicketType | undefined; + return _response.body as Intercom.TicketType; } if (_response.error.reason === "status-code") { @@ -317,7 +320,7 @@ export class TicketTypes { public async update( request: Intercom.UpdateTicketTypeRequest, requestOptions?: TicketTypes.RequestOptions - ): Promise { + ): Promise { const { ticket_type_id: ticketTypeId, ..._body } = request; const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( @@ -328,8 +331,9 @@ export class TicketTypes { 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, @@ -337,13 +341,13 @@ export class TicketTypes { }, 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, }); if (_response.ok) { - return _response.body as Intercom.TicketType | undefined; + return _response.body as Intercom.TicketType; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/ticketTypes/client/requests/UpdateTicketTypeRequest.ts b/src/api/resources/ticketTypes/client/requests/UpdateTicketTypeRequest.ts index a526fcc..55572eb 100644 --- a/src/api/resources/ticketTypes/client/requests/UpdateTicketTypeRequest.ts +++ b/src/api/resources/ticketTypes/client/requests/UpdateTicketTypeRequest.ts @@ -2,8 +2,6 @@ * This file was auto-generated by Fern from our API Definition. */ -import * as Intercom from "../../../../index"; - /** * @example * { @@ -11,9 +9,33 @@ import * as Intercom from "../../../../index"; * name: "Bug Report 2" * } */ -export type UpdateTicketTypeRequest = { +export interface UpdateTicketTypeRequest { /** * The unique identifier for the ticket type which is given by Intercom. */ ticket_type_id: string; -} & Intercom.UpdateTicketTypeRequestBody; + /** The name of the ticket type. */ + name?: string; + /** The description of the ticket type. */ + description?: string; + /** Category of the Ticket Type. */ + category?: UpdateTicketTypeRequest.Category; + /** The icon of the ticket type. */ + icon?: string; + /** The archived status of the ticket type. */ + archived?: boolean; + /** Whether the tickets associated with this ticket type are intended for internal use only or will be shared with customers. This is currently a limited attribute. */ + is_internal?: boolean; +} + +export namespace UpdateTicketTypeRequest { + /** + * Category of the Ticket Type. + */ + export type Category = "Customer" | "Back-office" | "Tracker"; + export const Category = { + Customer: "Customer", + BackOffice: "Back-office", + Tracker: "Tracker", + } as const; +} diff --git a/src/api/resources/ticketTypes/resources/attributes/client/Client.ts b/src/api/resources/ticketTypes/resources/attributes/client/Client.ts index b7bcacb..a418a33 100644 --- a/src/api/resources/ticketTypes/resources/attributes/client/Client.ts +++ b/src/api/resources/ticketTypes/resources/attributes/client/Client.ts @@ -90,7 +90,7 @@ export class Attributes { public async create( request: Intercom.ticketTypes.CreateTicketTypeAttributeRequest, requestOptions?: Attributes.RequestOptions - ): Promise { + ): Promise { const { ticket_type_id: ticketTypeId, ..._body } = request; const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( @@ -101,8 +101,9 @@ export class Attributes { 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, @@ -116,7 +117,7 @@ export class Attributes { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return _response.body as Intercom.TicketTypeAttribute | undefined; + return _response.body as Intercom.TicketTypeAttribute; } if (_response.error.reason === "status-code") { @@ -166,7 +167,7 @@ export class Attributes { public async update( request: Intercom.ticketTypes.UpdateTicketTypeAttributeRequest, requestOptions?: Attributes.RequestOptions - ): Promise { + ): Promise { const { ticket_type_id: ticketTypeId, attribute_id: attributeId, ..._body } = request; const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( @@ -177,8 +178,9 @@ export class Attributes { 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, @@ -192,7 +194,7 @@ export class Attributes { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return _response.body as Intercom.TicketTypeAttribute | undefined; + return _response.body as Intercom.TicketTypeAttribute; } if (_response.error.reason === "status-code") { diff --git a/src/api/resources/tickets/client/Client.ts b/src/api/resources/tickets/client/Client.ts index 2fbf7be..22cf59e 100644 --- a/src/api/resources/tickets/client/Client.ts +++ b/src/api/resources/tickets/client/Client.ts @@ -86,43 +86,51 @@ export class Tickets { * @example * await client.tickets.reply({ * ticket_id: "123", - * message_type: "comment", - * type: "user", - * body: "Thanks again :)", - * intercom_user_id: "667d619d8a68186f43bafe82" + * body: { + * message_type: "comment", + * type: "user", + * body: "Thanks again :)", + * intercom_user_id: "667d619d8a68186f43bafe82" + * } * }) * * @example * await client.tickets.reply({ * ticket_id: "123", - * message_type: "note", - * type: "admin", - * body: "

An Unordered HTML List

  • Coffee
  • Tea
  • Milk

An Ordered HTML List

  1. Coffee
  2. Tea
  3. Milk
", - * admin_id: "3156780" + * body: { + * message_type: "note", + * type: "admin", + * body: "

An Unordered HTML List

  • Coffee
  • Tea
  • Milk

An Ordered HTML List

  1. Coffee
  2. Tea
  3. Milk
", + * admin_id: "3156780" + * } * }) * * @example * await client.tickets.reply({ * ticket_id: "123", - * message_type: "quick_reply", - * type: "admin", - * admin_id: "3156780", - * reply_options: [{ - * text: "Yes", - * uuid: "22d6d1f4-1a19-41d0-94c2-e54031f78aca" - * }, { - * text: "No", - * uuid: "fbc3dbe0-ec0c-4fb6-826d-e19127191906" - * }] + * body: { + * message_type: "quick_reply", + * type: "admin", + * admin_id: "3156780", + * reply_options: [{ + * text: "Yes", + * uuid: "22d6d1f4-1a19-41d0-94c2-e54031f78aca" + * }, { + * text: "No", + * uuid: "fbc3dbe0-ec0c-4fb6-826d-e19127191906" + * }] + * } * }) * * @example * await client.tickets.reply({ * ticket_id: "123", - * message_type: "comment", - * type: "user", - * body: "Thanks again :)", - * intercom_user_id: "667d61a68a68186f43bafe85" + * body: { + * message_type: "comment", + * type: "user", + * body: "Thanks again :)", + * intercom_user_id: "667d61a68a68186f43bafe85" + * } * }) */ public async reply( @@ -139,8 +147,9 @@ export class Tickets { 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, @@ -211,7 +220,7 @@ export class Tickets { public async create( request: Intercom.CreateTicketRequest, requestOptions?: Tickets.RequestOptions - ): Promise { + ): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.IntercomEnvironment.UsProduction, @@ -221,8 +230,9 @@ export class Tickets { 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, @@ -236,7 +246,7 @@ export class Tickets { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return _response.body as Intercom.Ticket | undefined; + return _response.body as Intercom.Ticket; } if (_response.error.reason === "status-code") { @@ -282,7 +292,7 @@ export class Tickets { public async get( request: Intercom.FindTicketRequest, requestOptions?: Tickets.RequestOptions - ): Promise { + ): Promise { const { ticket_id: ticketId } = request; const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( @@ -293,8 +303,9 @@ export class Tickets { 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, @@ -307,7 +318,7 @@ export class Tickets { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return _response.body as Intercom.Ticket | undefined; + return _response.body as Intercom.Ticket; } if (_response.error.reason === "status-code") { @@ -393,7 +404,7 @@ export class Tickets { public async update( request: Intercom.UpdateTicketRequest, requestOptions?: Tickets.RequestOptions - ): Promise { + ): Promise { const { ticket_id: ticketId, ..._body } = request; const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( @@ -404,8 +415,9 @@ export class Tickets { 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, @@ -419,7 +431,7 @@ export class Tickets { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return _response.body as Intercom.Ticket | undefined; + return _response.body as Intercom.Ticket; } if (_response.error.reason === "status-code") { @@ -535,7 +547,7 @@ export class Tickets { public async search( request: Intercom.SearchRequest, requestOptions?: Tickets.RequestOptions - ): Promise> { + ): Promise> { const list = async (request: Intercom.SearchRequest): Promise => { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( @@ -547,8 +559,9 @@ export class Tickets { 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, @@ -584,7 +597,7 @@ export class Tickets { }); } }; - return new core.Pageable({ + return new core.Pageable({ response: await list(request), hasNextPage: (response) => response?.pages?.next?.starting_after != null, getItems: (response) => response?.tickets ?? [], diff --git a/src/api/resources/tickets/client/requests/ReplyToTicketRequest.ts b/src/api/resources/tickets/client/requests/ReplyToTicketRequest.ts index 0229190..c00dcfd 100644 --- a/src/api/resources/tickets/client/requests/ReplyToTicketRequest.ts +++ b/src/api/resources/tickets/client/requests/ReplyToTicketRequest.ts @@ -8,63 +8,76 @@ import * as Intercom from "../../../../index"; * @example * { * ticket_id: "123", - * message_type: "comment", - * type: "user", - * body: "Thanks again :)", - * intercom_user_id: "667d619d8a68186f43bafe82" + * body: { + * message_type: "comment", + * type: "user", + * body: "Thanks again :)", + * intercom_user_id: "667d619d8a68186f43bafe82" + * } * } * * @example * { * ticket_id: "123", - * message_type: "note", - * type: "admin", - * body: "

An Unordered HTML List

  • Coffee
  • Tea
  • Milk

An Ordered HTML List

  1. Coffee
  2. Tea
  3. Milk
", - * admin_id: "3156780" + * body: { + * message_type: "note", + * type: "admin", + * body: "

An Unordered HTML List

  • Coffee
  • Tea
  • Milk

An Ordered HTML List

  1. Coffee
  2. Tea
  3. Milk
", + * admin_id: "3156780" + * } * } * * @example * { * ticket_id: "123", - * message_type: "quick_reply", - * type: "admin", - * admin_id: "3156780", - * reply_options: [{ - * text: "Yes", - * uuid: "22d6d1f4-1a19-41d0-94c2-e54031f78aca" - * }, { - * text: "No", - * uuid: "fbc3dbe0-ec0c-4fb6-826d-e19127191906" - * }] + * body: { + * message_type: "quick_reply", + * type: "admin", + * admin_id: "3156780", + * reply_options: [{ + * text: "Yes", + * uuid: "22d6d1f4-1a19-41d0-94c2-e54031f78aca" + * }, { + * text: "No", + * uuid: "fbc3dbe0-ec0c-4fb6-826d-e19127191906" + * }] + * } * } * * @example * { * ticket_id: "123", - * message_type: "comment", - * type: "user", - * body: "Thanks again :)", - * intercom_user_id: "667d61a68a68186f43bafe85" + * body: { + * message_type: "comment", + * type: "user", + * body: "Thanks again :)", + * intercom_user_id: "667d61a68a68186f43bafe85" + * } * } * * @example * { * ticket_id: "123", - * message_type: "comment", - * type: "user", - * body: "Thanks again :)", - * intercom_user_id: "667d619d8a68186f43bafe82" + * body: { + * message_type: "comment", + * type: "user", + * body: "Thanks again :)", + * intercom_user_id: "667d619d8a68186f43bafe82" + * } * } * * @example * { * ticket_id: "123", - * message_type: "comment", - * type: "user", - * body: "Thanks again :)", - * intercom_user_id: "667d619d8a68186f43bafe82" + * body: { + * message_type: "comment", + * type: "user", + * body: "Thanks again :)", + * intercom_user_id: "667d619d8a68186f43bafe82" + * } * } */ -export type ReplyToTicketRequest = { +export interface ReplyToTicketRequest { ticket_id: string; -} & Intercom.TicketsReplyRequestBody; + body: Intercom.TicketsReplyRequestBody; +} diff --git a/src/api/resources/tickets/types/Ticket.ts b/src/api/resources/tickets/types/Ticket.ts index ade793c..4962e86 100644 --- a/src/api/resources/tickets/types/Ticket.ts +++ b/src/api/resources/tickets/types/Ticket.ts @@ -19,7 +19,7 @@ export interface Ticket { ticket_attributes: Intercom.TicketCustomAttributes; /** The state the ticket is currently in */ ticket_state: Ticket.TicketState; - ticket_type?: Intercom.TicketType; + ticket_type: Intercom.TicketType; contacts: Intercom.TicketContacts; /** The id representing the admin assigned to the ticket. */ admin_assignee_id?: string; diff --git a/src/api/resources/visitors/client/Client.ts b/src/api/resources/visitors/client/Client.ts index 528f24a..f1c382a 100644 --- a/src/api/resources/visitors/client/Client.ts +++ b/src/api/resources/visitors/client/Client.ts @@ -90,7 +90,7 @@ export class Visitors { public async find( request: Intercom.FindVisitorRequest, requestOptions?: Visitors.RequestOptions - ): Promise { + ): Promise { const { user_id: userId } = request; const _queryParams: Record = {}; _queryParams["user_id"] = userId; @@ -103,8 +103,9 @@ export class Visitors { 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, @@ -118,7 +119,7 @@ export class Visitors { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return _response.body as Intercom.Visitor | undefined; + return _response.body as Intercom.Visitor; } if (_response.error.reason === "status-code") { @@ -178,7 +179,7 @@ export class Visitors { public async update( request: Intercom.UpdateVisitorRequest, requestOptions?: Visitors.RequestOptions - ): Promise { + ): Promise { const _response = await (this._options.fetcher ?? core.fetcher)({ url: urlJoin( (await core.Supplier.get(this._options.environment)) ?? environments.IntercomEnvironment.UsProduction, @@ -188,8 +189,9 @@ export class Visitors { 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, @@ -203,7 +205,7 @@ export class Visitors { abortSignal: requestOptions?.abortSignal, }); if (_response.ok) { - return _response.body as Intercom.Visitor | undefined; + return _response.body as Intercom.Visitor; } if (_response.error.reason === "status-code") { @@ -272,8 +274,9 @@ export class Visitors { 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, diff --git a/src/api/types/TicketList.ts b/src/api/types/TicketList.ts index 12eba82..5cfdf4f 100644 --- a/src/api/types/TicketList.ts +++ b/src/api/types/TicketList.ts @@ -11,7 +11,7 @@ export interface TicketList { /** Always ticket.list */ type: "ticket.list"; /** The list of ticket objects */ - tickets: (Intercom.Ticket | undefined)[]; + tickets: Intercom.Ticket[]; /** A count of the total number of objects. */ total_count: number; pages?: Intercom.CursorPages; diff --git a/src/api/types/TicketTypeAttributeList.ts b/src/api/types/TicketTypeAttributeList.ts index f6034a9..011e3cc 100644 --- a/src/api/types/TicketTypeAttributeList.ts +++ b/src/api/types/TicketTypeAttributeList.ts @@ -11,5 +11,5 @@ export interface TicketTypeAttributeList { /** String representing the object's type. Always has the value `ticket_type_attributes.list`. */ type: "ticket_type_attributes.list"; /** A list of ticket type attributes associated with a given ticket type. */ - ticket_type_attributes: (Intercom.TicketTypeAttribute | undefined)[]; + ticket_type_attributes: Intercom.TicketTypeAttribute[]; } diff --git a/src/api/types/TicketTypeList.ts b/src/api/types/TicketTypeList.ts index 9ec9541..3a4d2b8 100644 --- a/src/api/types/TicketTypeList.ts +++ b/src/api/types/TicketTypeList.ts @@ -11,5 +11,5 @@ export interface TicketTypeList { /** String representing the object's type. Always has the value `ticket_type.list`. */ type: "ticket_type_attributes.list"; /** A list of ticket_types associated with a given workspace. */ - ticket_types: (Intercom.TicketType | undefined)[]; + ticket_types: Intercom.TicketType[]; } diff --git a/src/api/types/UpdateArticleRequestBody.ts b/src/api/types/UpdateArticleRequestBody.ts deleted file mode 100644 index b714ba3..0000000 --- a/src/api/types/UpdateArticleRequestBody.ts +++ /dev/null @@ -1,37 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -import * as Intercom from "../index"; - -/** - * You can Update an Article - */ -export interface UpdateArticleRequestBody { - /** The title of the article.For multilingual articles, this will be the title of the default language's content. */ - title?: string; - /** The description of the article. For multilingual articles, this will be the description of the default language's content. */ - description?: string; - /** The content of the article. For multilingual articles, this will be the body of the default language's content. */ - body?: string; - /** The id of the author of the article. For multilingual articles, this will be the id of the author of the default language's content. Must be a teammate on the help center's workspace. */ - author_id?: number; - /** Whether the article will be `published` or will be a `draft`. Defaults to draft. For multilingual articles, this will be the state of the default language's content. */ - state?: UpdateArticleRequestBody.State; - /** The id of the article's parent collection or section. An article without this field stands alone. */ - parent_id?: string; - /** The type of parent, which can either be a `collection` or `section`. */ - parent_type?: string; - translated_content?: Intercom.ArticleTranslatedContent; -} - -export namespace UpdateArticleRequestBody { - /** - * Whether the article will be `published` or will be a `draft`. Defaults to draft. For multilingual articles, this will be the state of the default language's content. - */ - export type State = "published" | "draft"; - export const State = { - Published: "published", - Draft: "draft", - } as const; -} diff --git a/src/api/types/UpdateTicketTypeRequestBody.ts b/src/api/types/UpdateTicketTypeRequestBody.ts deleted file mode 100644 index 2eca441..0000000 --- a/src/api/types/UpdateTicketTypeRequestBody.ts +++ /dev/null @@ -1,34 +0,0 @@ -/** - * This file was auto-generated by Fern from our API Definition. - */ - -/** - * The request payload for updating a ticket type. - * You can copy the `icon` property for your ticket type from [Twemoji Cheatsheet](https://twemoji-cheatsheet.vercel.app/) - */ -export interface UpdateTicketTypeRequestBody { - /** The name of the ticket type. */ - name?: string; - /** The description of the ticket type. */ - description?: string; - /** Category of the Ticket Type. */ - category?: UpdateTicketTypeRequestBody.Category; - /** The icon of the ticket type. */ - icon?: string; - /** The archived status of the ticket type. */ - archived?: boolean; - /** Whether the tickets associated with this ticket type are intended for internal use only or will be shared with customers. This is currently a limited attribute. */ - is_internal?: boolean; -} - -export namespace UpdateTicketTypeRequestBody { - /** - * Category of the Ticket Type. - */ - export type Category = "Customer" | "Back-office" | "Tracker"; - export const Category = { - Customer: "Customer", - BackOffice: "Back-office", - Tracker: "Tracker", - } as const; -} diff --git a/src/api/types/index.ts b/src/api/types/index.ts index 6bbb3f2..589b9a0 100644 --- a/src/api/types/index.ts +++ b/src/api/types/index.ts @@ -113,8 +113,6 @@ export * from "./TicketTypeAttributeList"; export * from "./TicketTypeList"; export * from "./Translation"; export * from "./UntagCompanyRequest"; -export * from "./UpdateArticleRequestBody"; -export * from "./UpdateTicketTypeRequestBody"; export * from "./UpdateVisitorRequest"; export * from "./Visitor"; export * from "./VisitorDeletedObject"; diff --git a/src/version.ts b/src/version.ts index 7ba3a93..25cf4d2 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const SDK_VERSION = "6.0.0"; +export const SDK_VERSION = "5.0.1"; diff --git a/yarn.lock b/yarn.lock index 2b68228..281e909 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1319,9 +1319,9 @@ emoji-regex@^8.0.0: integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== enhanced-resolve@^5.0.0, enhanced-resolve@^5.17.1: - version "5.17.1" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.17.1.tgz#67bfbbcc2f81d511be77d686a90267ef7f898a15" - integrity sha512-LMHl3dXhTcfv8gM4kEzIUeTQ+7fpdA0l2tUf34BddXPkz2A5xJ5L/Pchd5BL6rdccM9QGvu0sWZzK1Z1t4wwyg== + version "5.18.0" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.18.0.tgz#91eb1db193896b9801251eeff1c6980278b1e404" + integrity sha512-0/r0MySGYG8YqlayBZ6MuCfECmHFdJ5qyPh8s8wa5Hnm6SaFLSK1VYCbj+NKp090Nm1caZhD+QTnmxO7esYGyQ== dependencies: graceful-fs "^4.2.4" tapable "^2.2.0"