UNPKG

intercom-client

Version:

Official Node bindings to the Intercom API

126 lines (125 loc) 6.84 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 CustomChannelEventsClient { interface Options extends BaseClientOptions { } interface RequestOptions extends BaseRequestOptions { } } /** * With the "Custom Channel" integration, you can bring Fin and Intercom capabilities to your own platform via API, enabling powerful custom integrations. * * Intercom treats your integration like any other Intercom channel, allowing your application and Intercom to exchange events seamlessly. This makes it possible, for example, for your users to interact with Fin directly within your own application’s UI. * * > **Note:** "Fin over API" is currently under managed availability. Please reach out to your accounts team to discuss access and tailored, hands-on support. */ export declare class CustomChannelEventsClient { protected readonly _options: NormalizedClientOptionsWithAuth<CustomChannelEventsClient.Options>; constructor(options?: CustomChannelEventsClient.Options); /** * Notifies Intercom that a new conversation was created in your custom channel/platform. This triggers conversation creation and workflow automations within Intercom for your custom channel integration. * > **Note:** This endpoint is currently under managed availability. Please reach out to your accounts team to discuss access and tailored, hands-on support. * * @param {Intercom.CustomChannelBaseEvent} request * @param {CustomChannelEventsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Intercom.BadRequestError} * @throws {@link Intercom.UnauthorizedError} * @throws {@link Intercom.NotFoundError} * @throws {@link Intercom.UnprocessableEntityError} * * @example * await client.customChannelEvents.notifyNewConversation({ * event_id: "event_id", * external_conversation_id: "external_conversation_id", * contact: { * type: "user", * external_id: "external_id" * } * }) */ notifyNewConversation(request: Intercom.CustomChannelBaseEvent, requestOptions?: CustomChannelEventsClient.RequestOptions): core.HttpResponsePromise<Intercom.CustomChannelNotificationResponse>; private __notifyNewConversation; /** * Notifies Intercom that a new message was sent in a conversation on your custom channel/platform. This allows Intercom to process the message and trigger any relevant workflow automations. * > **Note:** This endpoint is currently under managed availability. Please reach out to your accounts team to discuss access and tailored, hands-on support. * * @param {Intercom.NotifyNewMessageRequest} request * @param {CustomChannelEventsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Intercom.BadRequestError} * @throws {@link Intercom.UnauthorizedError} * @throws {@link Intercom.NotFoundError} * @throws {@link Intercom.UnprocessableEntityError} * * @example * await client.customChannelEvents.notifyNewMessage({ * body: "body", * event_id: "event_id", * external_conversation_id: "external_conversation_id", * contact: { * type: "user", * external_id: "external_id" * } * }) */ notifyNewMessage(request: Intercom.NotifyNewMessageRequest, requestOptions?: CustomChannelEventsClient.RequestOptions): core.HttpResponsePromise<Intercom.CustomChannelNotificationResponse>; private __notifyNewMessage; /** * Notifies Intercom that a user selected a quick reply option in your custom channel/platform. This allows Intercom to process the response and trigger any relevant workflow automations. * > **Note:** This endpoint is currently under managed availability. Please reach out to your accounts team to discuss access and tailored, hands-on support. * * @param {Intercom.NotifyQuickReplySelectedRequest} request * @param {CustomChannelEventsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Intercom.BadRequestError} * @throws {@link Intercom.UnauthorizedError} * @throws {@link Intercom.NotFoundError} * @throws {@link Intercom.UnprocessableEntityError} * * @example * await client.customChannelEvents.notifyQuickReplySelected({ * event_id: "evt_67890", * external_conversation_id: "conv_13579", * contact: { * type: "user", * external_id: "user_003", * name: "Alice Example", * email: "alice@example.com" * }, * quick_reply_option_id: "1234" * }) */ notifyQuickReplySelected(request: Intercom.NotifyQuickReplySelectedRequest, requestOptions?: CustomChannelEventsClient.RequestOptions): core.HttpResponsePromise<Intercom.CustomChannelNotificationResponse>; private __notifyQuickReplySelected; /** * Notifies Intercom that a user provided a response to an attribute collector in your custom channel/platform. This allows Intercom to process the attribute and trigger any relevant workflow automations. * > **Note:** This endpoint is currently under managed availability. Please reach out to your accounts team to discuss access and tailored, hands-on support. * * @param {Intercom.NotifyAttributeCollectedRequest} request * @param {CustomChannelEventsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Intercom.BadRequestError} * @throws {@link Intercom.UnauthorizedError} * @throws {@link Intercom.NotFoundError} * @throws {@link Intercom.UnprocessableEntityError} * * @example * await client.customChannelEvents.notifyAttributeCollected({ * attribute: { * id: "id", * value: "value" * }, * event_id: "event_id", * external_conversation_id: "external_conversation_id", * contact: { * type: "user", * external_id: "external_id" * } * }) */ notifyAttributeCollected(request: Intercom.NotifyAttributeCollectedRequest, requestOptions?: CustomChannelEventsClient.RequestOptions): core.HttpResponsePromise<Intercom.CustomChannelNotificationResponse>; private __notifyAttributeCollected; }