chore(history): import initial web product snapshot
This commit is contained in:
@@ -0,0 +1,85 @@
|
||||
import type { IntentLevel, Sentiment } from './common'
|
||||
|
||||
/** 渠道类型(含渠道中心全部可连接类型) */
|
||||
export type ChannelType =
|
||||
| 'whatsapp'
|
||||
| 'telegram'
|
||||
| 'messenger'
|
||||
| 'email'
|
||||
| 'gmail'
|
||||
| 'outlook'
|
||||
| 'webform'
|
||||
| 'website'
|
||||
| 'landing'
|
||||
| 'social'
|
||||
| 'exhibition'
|
||||
| 'api'
|
||||
| 'webhook'
|
||||
|
||||
export type MessageType = 'text' | 'image' | 'file' | 'audio' | 'product'
|
||||
export type MessageStatus = 'sending' | 'sent' | 'delivered' | 'read' | 'failed'
|
||||
export type MessageSender = 'customer' | 'agent' | 'system'
|
||||
|
||||
export interface Message {
|
||||
id: string
|
||||
conversationId: string
|
||||
sender: MessageSender
|
||||
senderName?: string
|
||||
type: MessageType
|
||||
originalText: string
|
||||
translatedText?: string
|
||||
originalLang: string
|
||||
status: MessageStatus
|
||||
createdAt: string
|
||||
isImportant?: boolean
|
||||
internalNote?: string
|
||||
attachmentName?: string
|
||||
productCard?: { name: string; sku: string; price: string }
|
||||
}
|
||||
|
||||
export interface Conversation {
|
||||
id: string
|
||||
customerId: string
|
||||
channel: ChannelType
|
||||
unreadCount: number
|
||||
status: 'pending' | 'replied' | 'closed'
|
||||
assigneeId: string | null
|
||||
intentLevel: IntentLevel
|
||||
sentiment: Sentiment
|
||||
hasRisk: boolean
|
||||
lastMessage?: Message
|
||||
summary: string
|
||||
updatedAt: string
|
||||
}
|
||||
|
||||
export type ChannelStatus = 'connected' | 'disconnected' | 'error' | 'paused' | 'unconnected'
|
||||
|
||||
export interface ChannelConnection {
|
||||
id: string
|
||||
type: ChannelType
|
||||
name: string
|
||||
status: ChannelStatus
|
||||
account?: string
|
||||
lastSyncAt?: string
|
||||
todayMessages: number
|
||||
errorMessage?: string
|
||||
autoReply: boolean
|
||||
defaultOwnerId?: string
|
||||
}
|
||||
|
||||
export interface ChannelSyncLog {
|
||||
id: string
|
||||
channelId: string
|
||||
action: string
|
||||
detail: string
|
||||
status: 'success' | 'failed'
|
||||
createdAt: string
|
||||
}
|
||||
|
||||
/** 发送消息请求 */
|
||||
export interface SendMessagePayload {
|
||||
text: string
|
||||
replyToId?: string
|
||||
type?: MessageType
|
||||
attachmentName?: string
|
||||
}
|
||||
Reference in New Issue
Block a user