Options
All
  • Public
  • Public/Protected
  • All
Menu

Module nim/MessageInterface

Index

Type aliases

NIMMessageAIConfig: { accountId: string; aiStatus?: number }

消息体中的 AI 数字人相关配置

Type declaration

  • accountId: string

    AI 数字人的账号

  • Optional aiStatus?: number

    该 AI 消息的询问和应答标识

    0 表示普通消息
    1 表示是一个艾特数字人的消息
    2 表示是数字人响应艾特的消息

NIMMessageAIConfigParams: { accountId: string; content?: NIMAIModelCallContent; messages?: NIMAIModelCallMessage[]; modelConfigParams?: NIMAIModelConfigParams; promptVariables?: string }

发送消息时,与数字人相关的参数

Type declaration

  • accountId: string

    AI 数字人的账号

  • Optional content?: NIMAIModelCallContent

    请求大模型的内容.

  • Optional messages?: NIMAIModelCallMessage[]

    上下文内容

    注: 当前只支持文本消息

  • Optional modelConfigParams?: NIMAIModelConfigParams

    请求接口模型相关参数配置

  • Optional promptVariables?: string

    提示词变量占位符替换. JSON 序列化的字符串

    注: 如果 NIMAIUser 中的 modelConfig.promptKeys 存在且数组长度不为 0 ,则必填.

NIMMsgAttachAcceptTeamInvite: { account: string; members: NIMTeamMember[]; team: NIMTeam; type: "acceptTeamInvite" | "acceptSuperTeamInvite"; users: NIMUserNameCard[] }

同意群邀请时的通知消息

Type declaration

  • account: string

    邀请人账号

  • members: NIMTeamMember[]

    新加入的成员信息。注意该信息是成员在群里的信息

  • team: NIMTeam

    群信息

  • type: "acceptTeamInvite" | "acceptSuperTeamInvite"
  • users: NIMUserNameCard[]

    邀请人和接受邀请的人的名片

NIMMsgAttachAddTeamManagers: { accounts: string[]; members: NIMTeamMember[]; team: NIMTeam; type: "addTeamManagers" | "addSuperTeamManagers"; users: NIMUserNameCard[] }

添加群管理员时的通知消息

Type declaration

  • accounts: string[]

    新增管理员账号列表

  • members: NIMTeamMember[]

    新增管理员在群里的信息

  • team: NIMTeam

    群信息

  • type: "addTeamManagers" | "addSuperTeamManagers"
  • users: NIMUserNameCard[]

    新增管理员的名片,以及操作者名片

NIMMsgAttachAddTeamMember: { accounts: string[]; members: NIMTeamMember[]; team: NIMTeam; type: "addTeamMembers" | "addSuperTeamMembers"; users: NIMUserNameCard[] }

添加群成员时候的通知消息

Type declaration

  • accounts: string[]

    新加入的成员账号

  • members: NIMTeamMember[]

    新加入的成员信息。注意该信息是成员在群里的信息

  • team: NIMTeam

    群信息

  • type: "addTeamMembers" | "addSuperTeamMembers"
  • users: NIMUserNameCard[]

    操作者和被操作者的名片

NIMMsgAttachDismissTeam: { type: "dismissTeam" | "dismissSuperTeam"; users: NIMUserNameCard[] }

Type declaration

  • type: "dismissTeam" | "dismissSuperTeam"
  • users: NIMUserNameCard[]

    解散者名片信息

NIMMsgAttachLeaveTeam: { team: NIMTeam; type: "leaveTeam" | "leaveSuperTeam"; users: NIMUserNameCard[] }

离开群组时的通知消息

Type declaration

NIMMsgAttachPassTeamApply: { account: string; members: NIMTeamMember[]; team: NIMTeam; type: "passTeamApply" | "passSuperTeamApply"; users: NIMUserNameCard[] }

通过群申请时的通知消息

Type declaration

  • account: string

    申请人账号

  • members: NIMTeamMember[]

    新加入的成员信息。注意该信息是成员在群里的信息

  • team: NIMTeam

    群信息

  • type: "passTeamApply" | "passSuperTeamApply"
  • users: NIMUserNameCard[]

    申请人和同意申请人的名片

NIMMsgAttachRemoveTeamManagers: { accounts: string[]; members: NIMTeamMember[]; team: NIMTeam; type: "removeTeamManagers" | "removeSuperTeamManagers"; users: NIMUserNameCard[] }

删除群管理员时的通知消息

Type declaration

  • accounts: string[]

    被移除管理员账号列表

  • members: NIMTeamMember[]

    被移除管理员在群里的信息

  • team: NIMTeam

    群信息

  • type: "removeTeamManagers" | "removeSuperTeamManagers"
  • users: NIMUserNameCard[]

    被移除管理员的名片,以及操作者名片

NIMMsgAttachRemoveTeamMembers: { accounts: string[]; team: NIMTeam; type: "removeTeamMembers" | "removeSuperTeamMembers"; users: NIMUserNameCard[] }

删除群成员时候的通知消息

Type declaration

  • accounts: string[]

    被删除的成员账号

  • team: NIMTeam

    群信息

  • type: "removeTeamMembers" | "removeSuperTeamMembers"
  • users: NIMUserNameCard[]

    操作者和被操作者的名片

NIMMsgAttachTransferTeam: { account: string; members: NIMTeamMember[]; team: NIMTeam; type: "transferTeam" | "transferSuperTeam"; users: NIMUserNameCard[] }

转让群组时的通知消息

Type declaration

  • account: string

    原群主

  • members: NIMTeamMember[]

    新老群主在群内信息

  • team: NIMTeam

    群信息

  • type: "transferTeam" | "transferSuperTeam"
  • users: NIMUserNameCard[]

    新老群主名片信息

NIMMsgAttachUpdateSuperTeamMembersMute: { accounts: string[]; members: NIMTeamMember[]; mute: boolean; team: NIMTeam; type: "updateSuperTeamMembersMute"; users: NIMUserNameCard[] }

更新超级群成员禁言状态时的通知消息 (updateSuperTeamMembersMute)

Type declaration

  • accounts: string[]

    被禁言/解除禁言者的账号

  • members: NIMTeamMember[]

    被禁言/解除禁言者的群成员信息

  • mute: boolean

    指定群成员是否被禁言

  • team: NIMTeam

    群信息

  • type: "updateSuperTeamMembersMute"
  • users: NIMUserNameCard[]

    被禁言/解除禁言者的名片 + 操作者的名片

NIMMsgAttachUpdateTeam: { team: Partial<NIMTeam>; type: "updateTeam" | "updateSuperTeam"; users: NIMUserNameCard[] }

更新群,禁言群时的通知消息

Type declaration

NIMMsgAttachUpdateTeamMute: { account: string; members: NIMTeamMember[]; mute: boolean; team: NIMTeam; type: "updateTeamMute"; users: NIMUserNameCard[] }

更新群成员禁言状态时的通知消息 (updateMuteStateInTeam)

Type declaration

  • account: string

    被禁言/解除禁言者的账号

  • members: NIMTeamMember[]

    被禁言/解除禁言者的群成员信息

  • mute: boolean

    指定群成员是否被禁言

  • team: NIMTeam

    群信息

  • type: "updateTeamMute"
  • users: NIMUserNameCard[]

    被禁言/解除禁言者的名片 + 操作者的名片

NIMMsgScene: keyof typeof NIMEnumMsgScene

消息的场景

NIMMsgType: keyof typeof NIMEnumMsgType
NIMP2PMsgReceipt: { idClient: string; msgReceiptTime: number; sessionId: string }

Type declaration

  • idClient: string

    消息的 idServer

  • msgReceiptTime: number

    消息被读时间

  • sessionId: string
NIMTeamMsgReceipt: { account: string; idClient: string; idServer: string; read: number; teamId: string; unread: number }

Type declaration

  • account: string

    当前标记 receipt 者的账号 account ID

  • idClient: string

    消息的 idServer

  • idServer: string

    消息的 idServer

  • read: number

    当前已标记 receipt 的人数

  • teamId: string
  • unread: number

    当前未标记 receipt 的人数