export type ZcaFriend = { userId: string; displayName: string; avatar?: string; }; export type ZaloGroup = { groupId: string; name: string; memberCount?: number; }; export type ZaloGroupMember = { userId: string; displayName: string; avatar?: string; }; export type ZaloEventMessage = { msgId: string; cliMsgId: string; uidFrom: string; idTo: string; msgType: string; st: number; at: number; cmd: number; ts: string | number; }; export type ZaloInboundMessage = { threadId: string; isGroup: boolean; senderId: string; senderName?: string; groupName?: string; content: string; timestampMs: number; msgId?: string; cliMsgId?: string; hasAnyMention?: boolean; wasExplicitlyMentioned?: boolean; canResolveExplicitMention?: boolean; implicitMention?: boolean; eventMessage?: ZaloEventMessage; raw: unknown; }; export type ZcaUserInfo = { userId: string; displayName: string; avatar?: string; }; export type ZaloSendOptions = { profile?: string; mediaUrl?: string; caption?: string; isGroup?: boolean; mediaLocalRoots?: readonly string[]; }; export type ZaloSendResult = { ok: boolean; messageId?: string; error?: string; }; export type ZaloGroupContext = { groupId: string; name?: string; members?: string[]; }; export type ZaloAuthStatus = { connected: boolean; message: string; }; export type ZalouserToolConfig = { allow?: string[]; deny?: string[] }; export type ZalouserGroupConfig = { allow?: boolean; enabled?: boolean; requireMention?: boolean; tools?: ZalouserToolConfig; }; type ZalouserSharedConfig = { enabled?: boolean; name?: string; profile?: string; dmPolicy?: "pairing" | "allowlist" | "open" | "disabled"; allowFrom?: Array; groupPolicy?: "open" | "allowlist" | "disabled"; groups?: Record; messagePrefix?: string; responsePrefix?: string; }; export type ZalouserAccountConfig = ZalouserSharedConfig; export type ZalouserConfig = ZalouserSharedConfig & { defaultAccount?: string; accounts?: Record; }; export type ResolvedZalouserAccount = { accountId: string; name?: string; enabled: boolean; profile: string; authenticated: boolean; config: ZalouserAccountConfig; };