import { IntercomSettings } from './core'; declare class Intercom { /** * Calling the update method with a JSON object of user details will update those fields on the current user in addition to logging an impression at the current URL and looking for new messages for the user. * * ## @example * * ```tsx * import { intercom } from `vtex.admin-shell-utils` * // other necessary imports here... * * const App = () => { * const { navigate } = useRuntime() * * return ( *
* { * intercom.update({ * module: 'my-example-app', * 'Custom key': { 'accepts any value': true }, * }) * navigate({ * page: 'admin.my-example-app.previous-page-url', * }) * }} * /> *
* ) *} * ``` * */ update(intercomSettings: IntercomSettings): void; /** * If you have the Inbox product (combined with another product like Messages) you should call the Intercom shutdown method to clear your users’ conversations anytime they logout of your application. * Otherwise, the cookie we use to track who was most recently logged in on a given device or computer will keep these conversations in the Messenger for one week. * This method will effectively clear out any user data that you have been passing through the JS API. * * * ## @example * * ```tsx * import { intercom } from `vtex.admin-shell-utils` * // other necessary imports here... * * const App = () => { * return ( * * ) *} * ``` * */ shutdown(): void; /** * This will hide the main Messenger panel if it is open. It will not hide the Messenger Launcher. * * ## @example * * ```tsx * import { intercom } from `vtex.admin-shell-utils` * // other necessary imports here... * * const App = () => { * return ( * * ) *} * ``` * */ hide(): void; /** * This will show the Messenger. If there are no new conversations, it will open to the Messenger Home. If there are, it will open with the message list. * * ## @example * * ```tsx * import { intercom } from `vtex.admin-shell-utils` * // other necessary imports here... * * const App = () => { * return ( * * ) *} * ``` * */ show(): void; /** * This will open the Messenger with the message list. * * ## @example * * ```tsx * import { intercom } from `vtex.admin-shell-utils` * // other necessary imports here... * * const App = () => { * return ( * * ) *} * ``` * */ showMessages(): void; /** * If you would like to trigger a tour based on an action a user or visitor takes in your site or application, you can use this API method. You need to call this method with the id of the tour you wish to show. The id of the tour can be found in the “Use tour everywhere” section of the tour editor. * Please note that tours shown via this API must be published and the “Use tour everywhere” section must be turned on. If you're calling this API using an invalid tour id, nothing will happen. * * ## @example * * ```tsx * import { intercom } from `vtex.admin-shell-utils` * // other necessary imports here... * * const App = () => { * useEffect(() => { * intercom.startTour(123) * }, []) * * return ( *
Le tour
* ) *} * ``` * */ startTour(tourId: number): void; } /** * Loading the Intercom JavaScript library provides an Intercom JavaScript object that responds to a few methods. * These allow you to update users without a page refresh and interact with the messenger window. * * For more information, see: https://developers.intercom.com/installing-intercom/docs/intercom-javascript */ export declare const intercom: Intercom; export {};