UNPKG

intercom-client

Version:

Official Node bindings to the Intercom API

122 lines (121 loc) 5.68 kB
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js"; import * as core from "../../../../core/index.js"; import * as Intercom from "../../../index.js"; export declare namespace InternalArticlesClient { interface Options extends BaseClientOptions { } interface RequestOptions extends BaseRequestOptions { } } /** * Everything about your Internal Articles */ export declare class InternalArticlesClient { protected readonly _options: NormalizedClientOptionsWithAuth<InternalArticlesClient.Options>; constructor(options?: InternalArticlesClient.Options); /** * You can fetch a list of all internal articles by making a GET request to `https://api.intercom.io/internal_articles`. * * @param {InternalArticlesClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Intercom.UnauthorizedError} * * @example * await client.internalArticles.listInternalArticles() */ listInternalArticles(requestOptions?: InternalArticlesClient.RequestOptions): core.HttpResponsePromise<Intercom.InternalArticleList>; private __listInternalArticles; /** * You can create a new internal article by making a POST request to `https://api.intercom.io/internal_articles`. * * @param {Intercom.CreateInternalArticleRequest} request * @param {InternalArticlesClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Intercom.BadRequestError} * @throws {@link Intercom.UnauthorizedError} * * @example * await client.internalArticles.createInternalArticle({ * title: "Thanks for everything", * body: "Body of the Article", * author_id: 991266252, * owner_id: 991266252 * }) * * @example * await client.internalArticles.createInternalArticle({ * title: "Thanks for everything", * body: "Body of the Internal Article", * author_id: 1295, * owner_id: 1295 * }) */ createInternalArticle(request?: Intercom.CreateInternalArticleRequest, requestOptions?: InternalArticlesClient.RequestOptions): core.HttpResponsePromise<Intercom.InternalArticle>; private __createInternalArticle; /** * You can fetch the details of a single internal article by making a GET request to `https://api.intercom.io/internal_articles/<id>`. * * @param {Intercom.RetrieveInternalArticleRequest} request * @param {InternalArticlesClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Intercom.UnauthorizedError} * @throws {@link Intercom.NotFoundError} * * @example * await client.internalArticles.retrieveInternalArticle({ * internal_article_id: 1 * }) */ retrieveInternalArticle(request: Intercom.RetrieveInternalArticleRequest, requestOptions?: InternalArticlesClient.RequestOptions): core.HttpResponsePromise<Intercom.InternalArticle>; private __retrieveInternalArticle; /** * You can update the details of a single internal article by making a PUT request to `https://api.intercom.io/internal_articles/<id>`. * * @param {Intercom.UpdateInternalArticleRequestBody} request * @param {InternalArticlesClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Intercom.UnauthorizedError} * @throws {@link Intercom.NotFoundError} * * @example * await client.internalArticles.updateInternalArticle({ * internal_article_id: 1, * title: "Christmas is here!", * body: "<p>New gifts in store for the jolly season</p>" * }) */ updateInternalArticle(request: Intercom.UpdateInternalArticleRequestBody, requestOptions?: InternalArticlesClient.RequestOptions): core.HttpResponsePromise<Intercom.InternalArticle>; private __updateInternalArticle; /** * You can delete a single internal article by making a DELETE request to `https://api.intercom.io/internal_articles/<id>`. * * @param {Intercom.DeleteInternalArticleRequest} request * @param {InternalArticlesClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Intercom.UnauthorizedError} * @throws {@link Intercom.NotFoundError} * * @example * await client.internalArticles.deleteInternalArticle({ * internal_article_id: 1 * }) */ deleteInternalArticle(request: Intercom.DeleteInternalArticleRequest, requestOptions?: InternalArticlesClient.RequestOptions): core.HttpResponsePromise<Intercom.DeletedInternalArticleObject>; private __deleteInternalArticle; /** * You can search for internal articles by making a GET request to `https://api.intercom.io/internal_articles/search`. * * @param {Intercom.SearchInternalArticlesRequest} request * @param {InternalArticlesClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Intercom.UnauthorizedError} * * @example * await client.internalArticles.searchInternalArticles({ * folder_id: "folder_id" * }) */ searchInternalArticles(request?: Intercom.SearchInternalArticlesRequest, requestOptions?: InternalArticlesClient.RequestOptions): core.HttpResponsePromise<Intercom.InternalArticleSearchResponse>; private __searchInternalArticles; }