文件
OmniCard/mpuniapp/common/types.uts
wikiboss eec259a3a7 feat: 完成全系统30个功能点开发与E2E全链路验收 (8轮调度32个子代理闭环)
- 模块一: 出海案例作品集、博客动态发布、人名发音语音条、RTL阿语多语言切换
- 模块二: AI顾问人设配置、行业术语库润色、RAG切片沙盒调试、流式会话与意向留资卡片
- 模块三: 全球访客雷达大屏、多维加权意向算分、外部CRM对接推送、团队公海池流转
- 模块四: 移动端NFC安全挂失、NFC动态路由规则配置、动态防伪验签、展会制卡Zip批量导出
- 模块五: 组织架构与名片分配、移动端个人中心设置、离职交接与历史线索迁移、安全审计日志
- 模块六: Stripe国际信用卡订阅Webhook、独立二级域名与SSL检测、坐席配额预警、多币种发票
- 模块七: 纸质名片OCR解析入库、国际商务日程RFC 5545 ICS日历、微官网离线SWR预加载、展会实时排行榜大屏
- 模块八: 全球出海SEO OpenGraph元标签注入与社交爬虫探测、30点端到端全链路业务流集成测试套件
2026-09-20 23:47:47 +08:00

236 行
4.8 KiB
Plaintext

/**
* OmniCard AI (CRMmp) - 用户端跨端核心数据契约与 TypeScript / UTS 类型体系
* 严格遵循 AGENTS.md 规范与出海 SaaS 契约,与 backend / admin 镜像对齐
*/
export type CardStatus = 'draft' | 'published' | 'archived';
export interface CardProfile {
id?: string | number;
tenantId?: string | number;
userId?: string | number;
name: string;
title?: string;
company?: string;
slogan?: string;
avatarUrl?: string;
phone?: string;
email?: string;
whatsapp?: string;
linkedin?: string;
telegram?: string;
twitter?: string;
wechat?: string;
timezone?: string;
audioPronunciationUrl?: string;
audioPronounceUrl?: string;
status?: CardStatus;
themeCode?: string;
url?: string;
address?: string;
city?: string;
country?: string;
[key: string]: any;
}
export type BentoBlockType = 'hero' | 'case' | 'article' | 'social' | 'video' | 'form';
export type BentoColSpan = 1 | 2;
export type BentoRowSpan = 1 | 2;
export interface BentoBlockPublic {
id: number | string;
cardId: number | string;
type: BentoBlockType;
colSpan: BentoColSpan;
rowSpan: BentoRowSpan;
sortOrder: number;
title?: string;
content?: string;
mediaUrl?: string;
linkUrl?: string;
metaJson?: string | Record<string, any>;
}
export interface BrandKit {
logoUrl: string;
primaryColor: string;
}
export interface CardPortalDetail {
id: number | string;
slug?: string;
name: string;
title: string;
company: string;
slogan?: string;
avatarUrl?: string;
phone?: string;
email?: string;
whatsapp?: string;
linkedin?: string;
telegram?: string;
twitter?: string;
wechat?: string;
timezone?: string;
audioPronunciationUrl?: string;
audioPronounceUrl?: string;
themeCode?: string;
status: CardStatus;
bentoBlocks: BentoBlockPublic[];
brandKit?: BrandKit;
cachedAt?: number;
}
export type LeadStatus = 'new' | 'contacted' | 'hot' | 'won' | 'archived';
export type LeadSource = 'nfc' | 'qr' | 'link' | 'ai_chat';
export interface LeadEntity {
id: string | number;
tenantId?: string | number;
cardId: string | number;
visitorId?: string;
name: string;
company?: string;
phone?: string;
email?: string;
status: LeadStatus;
intentScore: number;
source: LeadSource;
notes?: string;
}
export interface SubmitLeadParams {
cardId: string | number;
name: string;
company?: string;
phone?: string;
email?: string;
source?: string;
notes?: string;
visitorId?: string;
[key: string]: any;
}
export type TouchType = 'nfc' | 'qr' | 'link';
export interface RadarTrack {
id: string | number;
tenantId?: string | number;
cardId: string | number;
visitorId: string;
ip?: string;
country?: string;
city?: string;
touchType: TouchType;
stayDurationMs: number;
scrollDepth: number;
viewedBlocks: string[];
createdAt?: string | Date;
}
export interface RecordRadarTrackParams {
cardId: string | number;
visitorId: string;
touchType?: string;
stayDurationMs?: number;
scrollDepth?: number;
viewedBlocks?: string[];
ip?: string;
country?: string;
city?: string;
[key: string]: any;
}
export interface ApiResponse<T> {
code: number;
message: string;
data: T;
}
export type NFCMaterial = 'wood' | 'metal' | 'pvc';
export type NFCStatus = 'active' | 'suspended' | 'unbound';
export type NFCSceneMode = 'business' | 'social';
export interface NFCRecord {
id: string | number;
uid: string;
tenantId: string | number;
cardId?: string | number | null;
batchNo: string;
material: NFCMaterial;
status: NFCStatus;
sceneMode: NFCSceneMode;
lastScannedAt?: string | Date | null;
}
export interface NfcBindParams {
uid: string;
cardId: number;
}
export interface NfcUidParams {
uid: string;
}
export interface OwnerPageQuery {
page: number;
size: number;
keyWord?: string;
status?: LeadStatus;
cardId?: string | number;
visitorId?: string;
}
export interface OwnerPageData<T> {
list: T[];
pagination: {
page: number;
size: number;
total: number;
};
}
export type AiChatRole = 'user' | 'assistant' | 'system';
export type ChatMessageType = 'text' | 'lead_card';
export interface ChatLeadPayload {
title: string;
description: string;
name: string;
contact: string;
submitted: boolean;
submitting?: boolean;
successMessage?: string;
errorMessage?: string;
}
export interface ChatMessage {
role: AiChatRole;
content: string;
type?: ChatMessageType;
cardPayload?: ChatLeadPayload;
}
export interface AiChatMessage {
role: AiChatRole;
content: string;
type?: ChatMessageType;
cardPayload?: ChatLeadPayload;
}
export interface AiChatRequest {
cardId: string | number;
locale?: string;
messages: AiChatMessage[];
}
export interface AiChatReply {
reply: string;
locale: string;
shouldCollectLead: boolean;
}