UNPKG

liveperson-functions-cli

Version:
26 lines (25 loc) 1.44 kB
import { ILpClient } from '../lp-client/LpClient'; import { ConversationContentTypes } from './ConversationContentTypes'; import { IConversation } from './IConversation'; import { IConversationUtil } from './IConversationUtil'; import { IKeywordScannerResult } from './IKeywordScannerResult'; export declare class ConversationUtil implements IConversationUtil { private lpClient; private brandId; constructor(lpClient: ILpClient); getConversationById(conversationId: string, contentToRetrieve?: (ConversationContentTypes | string)[]): Promise<IConversation>; scanConversationForKeywords(conversation: any, keywords: string[]): IKeywordScannerResult[]; /** * Returns messages from a transcript which contain the provided keyword and enriches it with additional information, * about when the message was sent, who it was sent by and because of which keyword it was selected. * @param transcript The message Transcript which should be scanned for the provided keyword. * @param keyword Keyword which the transcript will be scanned for. */ private getMessagesWithCertainKeyword; /** * Checks if a message contains a keyword via RegEx-matching, returns an array containing the results of that search. * @param message Message which should be checked for keywords. * @param keyword Keyword which the message will be checked for. */ private messageContainsKeyword; }