UNPKG

intercom-client

Version:

Official Node bindings to the Intercom API

48 lines (47 loc) 2.02 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 PhoneCallRedirectsClient { interface Options extends BaseClientOptions { } interface RequestOptions extends BaseRequestOptions { } } export declare class PhoneCallRedirectsClient { protected readonly _options: NormalizedClientOptionsWithAuth<PhoneCallRedirectsClient.Options>; constructor(options?: PhoneCallRedirectsClient.Options); /** * You can use the API to deflect phone calls to the Intercom Messenger. * Calling this endpoint will send an SMS with a link to the Messenger to the phone number specified. * * If custom attributes are specified, they will be added to the user or lead's custom data attributes. * * @param {Intercom.CreatePhoneSwitchRequest} request * @param {PhoneCallRedirectsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Intercom.BadRequestError} * @throws {@link Intercom.UnauthorizedError} * @throws {@link Intercom.UnprocessableEntityError} * * @example * await client.phoneCallRedirects.create({ * phone: "+353832345678", * custom_attributes: { * "issue_type": "Billing", * "priority": "High" * } * }) * * @example * await client.phoneCallRedirects.create({ * phone: "+40241100100", * custom_attributes: { * "issue_type": "Billing", * "priority": "High" * } * }) */ create(request?: Intercom.CreatePhoneSwitchRequest, requestOptions?: PhoneCallRedirectsClient.RequestOptions): core.HttpResponsePromise<Intercom.PhoneSwitch | undefined>; private __create; }