Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Functions

clearRemindTypeForConversation

  • clearRemindTypeForConversation(params: { conversationId: string; type: CONVERSATIONTYPE; error?: any; success?: any }): Promise<AsyncResult<SilentModeType.SilentModeConversationType>>
  • 清除会话的离线推送提醒类型设置。

    connection.clearRemindTypeForConversation({conversationId: '123', type: 'singleChat'})
    

    Parameters

    • params: { conversationId: string; type: CONVERSATIONTYPE; error?: any; success?: any }
      • conversationId: string

        会话 id。

      • type: CONVERSATIONTYPE

        会话类型。

      • error?:function
        • error(error: ErrorEvent): void
        • Parameters

          • error: ErrorEvent

          Returns void

      • success?:function
        • success(res: AsyncResult<SilentModeConversationType>): void
        • Parameters

          Returns void

    Returns Promise<AsyncResult<SilentModeType.SilentModeConversationType>>

getPushPerformLanguage

  • getPushPerformLanguage(params?: { error?: any; success?: any }): Promise<AsyncResult<SilentModeType.TranslationLanguageType>>
  • 获取用户设置的推送翻译语言。

    connection.getPushPerformLanguage()
    

    Parameters

    • Optional params: { error?: any; success?: any }
      • error?:function
        • error(error: ErrorEvent): void
        • Parameters

          • error: ErrorEvent

          Returns void

      • success?:function
        • success(res: AsyncResult<TranslationLanguageType>): void
        • Parameters

          Returns void

    Returns Promise<AsyncResult<SilentModeType.TranslationLanguageType>>

getSilentModeForAll

  • getSilentModeForAll(params?: { error?: any; success?: any }): Promise<AsyncResult<SilentModeType.SilentModeConversationType>>
  • 获取当前用户的免打扰设置。

    connection.getSilentModeForAll()
    

    Parameters

    • Optional params: { error?: any; success?: any }
      • error?:function
        • error(error: ErrorEvent): void
        • Parameters

          • error: ErrorEvent

          Returns void

      • success?:function
        • success(res: AsyncResult<SilentModeConversationType>): void
        • Parameters

          Returns void

    Returns Promise<AsyncResult<SilentModeType.SilentModeConversationType>>

getSilentModeForConversation

  • getSilentModeForConversation(params: { conversationId: string; type: CONVERSATIONTYPE; error?: any; success?: any }): Promise<AsyncResult<SilentModeType.SilentModeConversationType>>
  • 获取会话的免打扰设置。

    connection.getSilentModeForConversation({conversationId: '3333', type: 'singleChat'})
    

    Parameters

    • params: { conversationId: string; type: CONVERSATIONTYPE; error?: any; success?: any }
      • conversationId: string

        会话 id。

      • type: CONVERSATIONTYPE

        会话类型。

      • error?:function
        • error(error: ErrorEvent): void
        • Parameters

          • error: ErrorEvent

          Returns void

      • success?:function
        • success(res: AsyncResult<SilentModeConversationType>): void
        • Parameters

          Returns void

    Returns Promise<AsyncResult<SilentModeType.SilentModeConversationType>>

getSilentModeForConversations

  • getSilentModeForConversations(params: { conversationList: ConversationListType[]; error?: any; success?: any }): Promise<AsyncResult<SilentModeType.ConversationSilentModeType>>
  • 批量获取指定会话的免打扰设置。

    connection.getSilentModeForConversations({conversationList:[{id: 'test', type: 'singleChat'}, {id: '12345', type: 'groupChat'}]})
    

    Parameters

    • params: { conversationList: ConversationListType[]; error?: any; success?: any }
      • conversationList: ConversationListType[]

        会话列表。

      • error?:function
        • error(error: ErrorEvent): void
        • Parameters

          • error: ErrorEvent

          Returns void

      • success?:function
        • success(res: AsyncResult<ConversationSilentModeType>): void
        • Parameters

          Returns void

    Returns Promise<AsyncResult<SilentModeType.ConversationSilentModeType>>

setPushPerformLanguage

  • setPushPerformLanguage(params: { language: string; error?: any; success?: any }): Promise<AsyncResult<SilentModeType.TranslationLanguageType>>
  • 设置用户推送翻译语言。

    connection.setPushPerformLanguage({language: 'EU'})
    

    Parameters

    • params: { language: string; error?: any; success?: any }
      • language: string

        翻译语言

      • error?:function
        • error(error: ErrorEvent): void
        • Parameters

          • error: ErrorEvent

          Returns void

      • success?:function
        • success(res: AsyncResult<TranslationLanguageType>): void
        • Parameters

          Returns void

    Returns Promise<AsyncResult<SilentModeType.TranslationLanguageType>>

setSilentModeForAll

  • setSilentModeForAll(params: { options: SilentModeParamType; error?: any; success?: any }): Promise<AsyncResult<SilentModeType.SilentModeConversationType>>
  • 设置当前登录用户的免打扰设置。

    connection.setSilentModeForAll({options: {paramType: 0, remindType: 'ALL'}})
    

    Parameters

    • params: { options: SilentModeParamType; error?: any; success?: any }
      • options: SilentModeParamType

        参数对象,包含paramType、remindType、duration、startTime、endTime。

      • error?:function
        • error(error: ErrorEvent): void
        • Parameters

          • error: ErrorEvent

          Returns void

      • success?:function
        • success(res: AsyncResult<SilentModeConversationType>): void
        • Parameters

          Returns void

    Returns Promise<AsyncResult<SilentModeType.SilentModeConversationType>>

setSilentModeForConversation

  • setSilentModeForConversation(params: { conversationId: string; options: SilentModeParamType; type: CONVERSATIONTYPE; error?: any; success?: any }): Promise<AsyncResult<SilentModeType.SilentModeConversationType>>
  • 设置会话的免打扰。

    connection.setSilentModeForConversation({conversationId: '100', type: 'singleChat', params: {paramType: 0, remindType: 'ALL'}})
    

    Parameters

    • params: { conversationId: string; options: SilentModeParamType; type: CONVERSATIONTYPE; error?: any; success?: any }
      • conversationId: string

        会话 id。 对于单聊类型,会话 ID 同时也是对方用户的名称。 对于群聊类型,会话 ID 同时也是对方群组的 ID,并不同于群组的名称。 对于聊天室类型,会话 ID 同时也是聊天室的 ID,并不同于聊天室的名称。 对于Help Desk 类型,会话 ID 与单聊类型相同,是对方用户的名称。

      • options: SilentModeParamType

        参数对象,包含paramType、remindType、duration、startTime、endTime。

      • type: CONVERSATIONTYPE

        会话类型。

      • error?:function
        • error(error: ErrorEvent): void
        • Parameters

          • error: ErrorEvent

          Returns void

      • success?:function
        • success(res: AsyncResult<SilentModeConversationType>): void
        • Parameters

          Returns void

    Returns Promise<AsyncResult<SilentModeType.SilentModeConversationType>>

Generated using TypeDoc