import { SearchRecords } from '../models/SearchRecords'; import { IInteraction } from '../models/Interactions'; /** * Apps with interactions(phone calls, chats, etc..) should call this every time an interactions is added, removed, or modified. * * This is important as it allows for screenpops, activities to be saved in CRM, and statistics. * Calling setIntraction results in a change to the Interaction Sequence ID of the interaction, and a reset of the Interaction Sequence Update ID. * Screenpops should not be performed if they are disabled: [[registerScreenpopControlChanged]] * * - See [[registerOnInteraction]] * @param interaction */ export declare function setInteraction(interaction: IInteraction): Promise; /** * This registers the app to handle interaction events, which is triggered each time an interaction changes. * * - See [[setInteraction]] * * @param callback This will be called each time an interaction is added or has its state changed. * Apps that are integrated with a CRM should preform a screenpop when a new interaction occurs. */ export declare function registerOnInteraction(callback: (interaction: IInteraction) => Promise): Promise; /** * This registers the app to handle interaction events. While similar to [[setInteraction]], this is meant to be used * by apps that do not need to return a value to the framework as a result of the interaction. * Rather, this is meant to be used by apps that need to perform some action or asynchronous processing of an interaction. * If the results of this processing is an update of the interaction data, then a call to [[updateInteraction]] * with the new data should be done. This emplyes a push model of interaction processing instead of awaiting a response. * * - See [[updateInteraction]] * * @param callback This will be called each time an interaction is added or has its state changed. */ export declare function registerProcessInteraction(callback: (interaction: IInteraction) => Promise): Promise; /** * Apps which are registered to process interactions should call this to update the interaction data by using * the [[registerProcessInteraction]] method, should call this method to inform the framework of the updated interaction. * If a update is not required, i.e., the processor did not process, or there is not change, then this method should not be called. * Calling this method results in a change to the Interaction Sequence Update ID of the interaction. * * - See [[registerProcessInteraction]] * * @param callback This will be called each time an interaction is added or has its state changed. */ export declare function updateInteraction(interaction: IInteraction): Promise;