@microsoft/omnichannel-chat-sdk
Version:
Microsoft Omnichannel Chat SDK
85 lines (84 loc) • 2.31 kB
TypeScript
import LiveChatVersion from "../LiveChatVersion";
export declare class MessageContentType {
static readonly RichText = "RichText";
static readonly Text = "Text";
}
export declare class DeliveryMode {
static readonly Bridged = "bridged";
static readonly Unbridged = "unbridged";
}
export declare class MessageType {
static readonly UserMessage = "UserMessage";
static readonly SwiftCard = "SwiftCard";
static readonly Typing = "Control/Typing";
static readonly ClearTyping = "Control/ClearTyping";
static readonly LiveState = "Control/LiveState";
}
export declare enum PersonType {
Unknown = 0,
User = 1,
Bot = 2
}
export declare enum Role {
Bot = "bot",
Agent = "agent",
System = "system",
User = "user",
Unknown = "unknown"
}
export interface IPerson {
displayName: string;
id: string;
type: PersonType;
}
export interface IMessageProperties {
OriginalMessageId?: string;
[id: string]: string | undefined;
}
export declare enum FileSharingProtocolType {
AmsBasedFileSharing = 0
}
export interface IFileMetadata {
id: string;
name: string;
type: string;
size: number;
url: string;
fileSharingProtocolType?: FileSharingProtocolType;
}
export declare class ResourceType {
static readonly NewMessage = "NewMessage";
static readonly MessageUpdate = "MessageUpdate";
static readonly UserPresence = "UserPresence";
static readonly ConversationUpdate = "ConversationUpdate";
static readonly ThreadUpdate = "ThreadUpdate";
}
interface OmnichannelMessage {
id: string;
liveChatVersion: LiveChatVersion;
clientmessageid?: string;
messageid?: string;
content: string;
contentType: string;
deliveryMode: DeliveryMode | undefined;
messageType: MessageType;
sender: IPerson;
timestamp: Date;
properties?: IMessageProperties;
tags?: string[];
fileMetadata?: IFileMetadata;
resourceType?: ResourceType;
role?: string;
customEvent?: {
isCustomEvent: boolean;
customEventName: string;
customEventValue: string;
};
citations?: {
text: string;
"pva:gpt-feedback": string;
"feedbackLoop"?: string;
"deliveryMode"?: string;
};
}
export default OmnichannelMessage;