UNPKG

intercom-client

Version:

Official Node bindings to the Intercom API

98 lines (97 loc) 3.95 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 CallsClient { interface Options extends BaseClientOptions { } interface RequestOptions extends BaseRequestOptions { } } /** * Everything about your Calls */ export declare class CallsClient { protected readonly _options: NormalizedClientOptionsWithAuth<CallsClient.Options>; constructor(options?: CallsClient.Options); /** * Retrieve a paginated list of calls. * * @param {Intercom.ListCallsRequest} request * @param {CallsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Intercom.UnauthorizedError} * * @example * await client.calls.listCalls({ * page: 1, * per_page: 1 * }) */ listCalls(request?: Intercom.ListCallsRequest, requestOptions?: CallsClient.RequestOptions): core.HttpResponsePromise<Intercom.CallList>; private __listCalls; /** * Retrieve a single call by id. * * @param {Intercom.ShowCallRequest} request * @param {CallsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Intercom.UnauthorizedError} * @throws {@link Intercom.NotFoundError} * * @example * await client.calls.showCall({ * call_id: "call_id" * }) */ showCall(request: Intercom.ShowCallRequest, requestOptions?: CallsClient.RequestOptions): core.HttpResponsePromise<Intercom.Call>; private __showCall; /** * Redirects to a signed URL for the call's recording if it exists. * * @param {Intercom.ShowCallRecordingRequest} request * @param {CallsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Intercom.UnauthorizedError} * @throws {@link Intercom.NotFoundError} * * @example * await client.calls.showCallRecording({ * call_id: "call_id" * }) */ showCallRecording(request: Intercom.ShowCallRecordingRequest, requestOptions?: CallsClient.RequestOptions): core.HttpResponsePromise<void>; private __showCallRecording; /** * Returns the transcript for the specified call as a downloadable text file. * * @param {Intercom.ShowCallTranscriptRequest} request * @param {CallsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Intercom.NotFoundError} * * @example * await client.calls.showCallTranscript({ * call_id: "call_id" * }) */ showCallTranscript(request: Intercom.ShowCallTranscriptRequest, requestOptions?: CallsClient.RequestOptions): core.HttpResponsePromise<string>; private __showCallTranscript; /** * Retrieve calls by a list of conversation ids and include transcripts when available. * A maximum of 20 `conversation_ids` can be provided. If none are provided or more than 20 are provided, a 400 error is returned. * * @param {Intercom.ListCallsWithTranscriptsRequest} request * @param {CallsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Intercom.BadRequestError} * @throws {@link Intercom.UnauthorizedError} * * @example * await client.calls.listCallsWithTranscripts({ * conversation_ids: ["64619700005694", "64619700005695"] * }) */ listCallsWithTranscripts(request: Intercom.ListCallsWithTranscriptsRequest, requestOptions?: CallsClient.RequestOptions): core.HttpResponsePromise<Intercom.ListCallsWithTranscriptsResponse>; private __listCallsWithTranscripts; }