import { ConversationItem } from "@droppii-org/wasm-client-sdk"; import { DChatApplicationType } from "./chat"; import { BOT_TYPE } from "../constants/botFlow"; export type BotType = (typeof BOT_TYPE)[keyof typeof BOT_TYPE]; export declare enum ChatType { SINGLE = "SINGLE", GROUP = "GROUP" } export declare enum ChatCategory { BIZ_BIZ = "BIZ_BIZ", BIZ_MALL = "BIZ_MALL", GROUP = "GROUP", BIZ_BOT_PDP = "BIZ_BOT_PDP", BIZ_BOT_CRM = "BIZ_BOT_CRM" } export declare enum PeerType { USER = "USER", GROUP = "GROUP", BOT = "BOT", CUSTOMER = "CUSTOMER" } export interface ConversationExtra { applicationType: DChatApplicationType; chatCategory: ChatCategory; } export interface ConversationListItem extends ConversationItem { peerType: PeerType; } export interface ConversationMember { userId: string; memberRole: string; } /** The peer behind a conversation, from chat-service. `avartar` is spelled as BE sends it. */ export interface ConversationPeerTarget { id: string; name: string; avartar: string; isActive: boolean; type: string; } export interface CreateConversationData { conversationId: string; groupId: string; groupName: string; chatCategory: ChatCategory; chatType: ChatType; applicationType: DChatApplicationType; members: ConversationMember[]; } export declare enum BotFlowNodeType { Start = "start", Group = "group" } export declare enum BotBlockType { BubbleText = "bubble-text", BubbleImage = "bubble-image", InputButtons = "input-buttons", InputText = "input-text", LogicCsTeam = "logic-cs-team" } export interface BotButtonOption { id: string; label: string; } interface BotBlockBase { id: string; parentId?: string; } export interface BotBubbleTextBlock extends BotBlockBase { type: BotBlockType.BubbleText; data: { content: string; plainText: string; }; } export interface BotBubbleImageBlock extends BotBlockBase { type: BotBlockType.BubbleImage; data: { url: string; sourceType: string; }; } export interface BotInputButtonsBlock extends BotBlockBase { type: BotBlockType.InputButtons; data: { buttons: BotButtonOption[]; }; } export interface BotInputTextBlock extends BotBlockBase { type: BotBlockType.InputText; data: { longText: boolean; buttonLabel: string; placeholder: string; }; } export interface BotLogicCsTeamBlock extends BotBlockBase { type: BotBlockType.LogicCsTeam; data: { csTeamId: string; }; } export type BotBlock = BotBubbleTextBlock | BotBubbleImageBlock | BotInputButtonsBlock | BotInputTextBlock | BotLogicCsTeamBlock; export interface BotFlowNode { id: string; type: BotFlowNodeType; data: { label: string | null; children: BotBlock[]; }; } export interface BotConversationDetail { conversationId: string; chatCategory: ChatCategory; chatType: ChatType; applicationType: DChatApplicationType; flowCurrentStep: BotFlowNode; flowIsEnd: boolean; } export interface RunBotFlowResponse { flowNextStep: BotFlowNode; isEnd: boolean; havingBotMessage: boolean; } export type BotMainMenuItem = BotButtonOption; export declare enum BotStatus { ACTIVE = "ACTIVE", INACTIVE = "INACTIVE" } export interface BotDetailAvatar { streamId: string; containerName: string; contentType: string; baseUrl: string; fullUrl: string; } export interface BotDetail { id: string; name: string; avatar: BotDetailAvatar | null; applicationType: DChatApplicationType; status: BotStatus; type: BotType; botSupportPlatform: string; } export {}; //# sourceMappingURL=conversation.d.ts.map