UNPKG

@microsoft/omnichannel-chat-sdk

Version:
61 lines (60 loc) 2.83 kB
import IChatConfig from "./core/IChatConfig"; import IChatSDKConfig from "./core/IChatSDKConfig"; import IChatSDKMessage from "./core/IChatSDKMessage"; import IChatToken from "./external/IC3Adapter/IChatToken"; import IChatTranscriptBody from "./core/IChatTranscriptBody"; import IFileInfo from "@microsoft/omnichannel-ic3core/lib/interfaces/IFileInfo"; import IFileMetadata from "@microsoft/omnichannel-ic3core/lib/model/IFileMetadata"; import ILiveChatContext from "./core/ILiveChatContext"; import IMessage from "@microsoft/omnichannel-ic3core/lib/model/IMessage"; import IOmnichannelConfig from "./core/IOmnichannelConfig"; import IRawMessage from "@microsoft/omnichannel-ic3core/lib/model/IRawMessage"; import IRawThread from "@microsoft/omnichannel-ic3core/lib/interfaces/IRawThread"; import IStartChatOptionalParams from "./core/IStartChatOptionalParams"; declare class OmnichannelChatSDK { private debug; OCSDKProvider: unknown; IC3SDKProvider: unknown; OCClient: any; IC3Client: any; omnichannelConfig: IOmnichannelConfig; chatSDKConfig: IChatSDKConfig; requestId: string; private chatToken; private liveChatConfig; private dataMaskingRules; private authSettings; private authenticatedUserToken; private preChatSurvey; private conversation; private callingOption; constructor(omnichannelConfig: IOmnichannelConfig, chatSDKConfig?: IChatSDKConfig); setDebug(flag: boolean): void; initialize(): Promise<IChatConfig>; startChat(optionalParams?: IStartChatOptionalParams): Promise<void>; endChat(): Promise<void>; getCurrentLiveChatContext(): Promise<ILiveChatContext | {}>; /** * Gets PreChat Survey. * @param parse Whether to parse PreChatSurvey to JSON or not. */ getPreChatSurvey(parse?: boolean): Promise<any>; getLiveChatConfig(cached?: boolean): Promise<IChatConfig>; getChatToken(cached?: boolean): Promise<IChatToken>; getMessages(): Promise<IMessage[] | undefined>; getDataMaskingRules(): Promise<any>; sendMessage(message: IChatSDKMessage): Promise<void>; onNewMessage(onNewMessageCallback: CallableFunction): void; sendTypingEvent(): Promise<void>; onTypingEvent(onTypingEventCallback: CallableFunction): Promise<void>; onAgentEndSession(onAgentEndSessionCallback: (message: IRawThread) => void): Promise<void>; uploadFileAttachment(fileInfo: IFileInfo): Promise<IRawMessage>; downloadFileAttachment(fileMetadata: IFileMetadata): Promise<Blob>; emailLiveChatTranscript(body: IChatTranscriptBody): Promise<any>; getLiveChatTranscript(): Promise<any>; createChatAdapter(protocol?: string): Promise<unknown>; getVoiceVideoCalling(params?: any): Promise<any>; private getIC3Client; private getChatConfig; } export default OmnichannelChatSDK;