Options
All
  • Public
  • Public/Protected
  • All
Menu

Module EventServiceInterface

Index

Type Aliases

MsgEventSubscribe: { sync: boolean; time: number; to: string; type: number; vaildTime: number }

Type declaration

  • sync: boolean

    是否同步

  • time: number

    订阅此事件的时间戳

  • to: string

    被订阅人(也就是事件发布人)的 accid

  • type: number

    事件类型

  • vaildTime: number

    订阅有效期,秒为单位

PublishEventOptions: { broadcastType?: number; ext?: string; sync?: boolean; type: number; vaildTime?: number; value: number }

Type declaration

  • Optional broadcastType?: number

    广播类型 1:仅在线 2:在线和离线

  • Optional ext?: string

    用户自定义事件扩展属性,最长256字节

  • Optional sync?: boolean

    是否同步给自己

  • type: number

    事件类型, 须向 IM 服务器开通。测试请填写 1

  • Optional vaildTime?: number

    发布事件的有效时间 单位秒 60s~7天(604800s),默认7天

  • value: number

    事件状态/事件内容,由上层做自定义映射,value为10000以上(1-9999为云信预定义值,开发者不可使用)

PublishEventResult: { idClient: string; idServer: string; time: number }

Type declaration

  • idClient: string
  • idServer: string
  • time: number
PushEvent: { account: string; clientType: EClientType; ext: string; idClient: string; idServer: string; time: number; type: number; value: number }

Type declaration

  • account: string
  • clientType: EClientType
  • ext: string
  • idClient: string
  • idServer: string
  • time: number
  • type: number
  • value: number
QuerySubscribeEventsOptions: { accounts?: string[]; type: number }

Type declaration

  • Optional accounts?: string[]
  • type: number

    事件类型, 必须指定100000以上

SubscribeEventOptions: { accounts: string[]; subscribeTime?: number; sync?: boolean; type: number }

Type declaration

  • accounts: string[]

    订阅账户列表

  • Optional subscribeTime?: number

    订阅关系有效期

  • Optional sync?: boolean

    同步订阅事件

  • type: number

    事件类型, 必须指定100000以上

SubscribeEventResult: { failedAccounts: string[] }

Type declaration

  • failedAccounts: string[]
UnSubscribeEventsOptions: { accounts?: string[]; type: number }

Type declaration

  • Optional accounts?: string[]
  • type: number

    事件类型, 必须指定100000以上

UnSubscribeEventsResult: { failedAccounts: string[] }

Type declaration

  • failedAccounts: string[]