Options
All
  • Public
  • Public/Protected
  • All
Menu

NexconnChat - v26.1.0

Index

Classes

Variables

Type Aliases

Enumerations

Interfaces

Functions

Variables

GroupMemberFilterRobotType: { ALL: 0; EXCLUDE_ROBOT: 1; ROBOT_ONLY: 2 } = ...

Type declaration

  • ALL: 0

    Include all members, including robots

  • EXCLUDE_ROBOT: 1

    Exclude robot members

  • ROBOT_ONLY: 2

    Only include robot members

SpeechToTextStatus: { NOT_CONVERTED: 0; CONVERTING: 1; SUCCESS: 2; FAILED: 3 } = ...

Speech-to-text conversion status

Type declaration

  • NOT_CONVERTED: 0

    Not converted

  • CONVERTING: 1

    Converting

  • SUCCESS: 2

    Conversion succeeded

  • FAILED: 3

    Conversion failed

ReferenceMessageStatus: { DEFAULT: number; MODIFIED: number; RECALLED: number; DELETE: number } = ...

Type declaration

  • DEFAULT: number
  • MODIFIED: number
  • RECALLED: number
  • DELETE: number
TranslateMode: { MECHANICAL: 0; INTELLIGENT: 1 } = ...

Translation mode

Type declaration

  • MECHANICAL: 0

    Mechanical translation

  • INTELLIGENT: 1

    Intelligent translation

TranslateStatus: { NONE: 0; TRANSLATING: 1; SUCCESS: 2; FAILED: 3 } = ...

Translation status

Type declaration

  • NONE: 0

    Not translated

  • TRANSLATING: 1

    Translating

  • SUCCESS: 2

    Translation succeeded

  • FAILED: 3

    Translation failed

TranslateStrategy: { DEFAULT: 0; AUTO_ON: 1; AUTO_OFF: 2 } = ...

Auto-translation strategy for a conversation

Type declaration

  • DEFAULT: 0

    Follow the user-level setting (default)

  • AUTO_ON: 1

    Enable auto-translation

  • AUTO_OFF: 2

    Disable auto-translation

AreaCode: { BJ: 1; SG: 2; NA: 3; SA: 5; OM: 6 } = ...

Area code enum value

Type declaration

  • BJ: 1

    China (Beijing) data center

  • SG: 2

    Default value: Singapore data center

  • NA: 3

    North America data center

  • SA: 5

    Regional data center (enum identifier SOUTH_AMERICA; confirm with your deployment docs)

  • OM: 6

    Oman data center

ChannelNoDisturbLevel: { ALL_MESSAGE: -1; DEFAULT: 0; MENTION: 1; MENTION_USERS: 2; MENTION_ALL: 4; MUTED: 5 } = ...

Do-not-disturb level for a specific channel. Controls which messages trigger push notifications.

Type declaration

  • ALL_MESSAGE: -1

    Receive notifications for all messages

  • DEFAULT: 0

    Default notification level (follow global settings)

  • MENTION: 1

    Only receive notifications for mentioned messages (all mention types)

  • MENTION_USERS: 2

    Only receive notifications when specific users are mentioned

  • MENTION_ALL: 4

    Only receive notifications when all members are mentioned

  • MUTED: 5

    Mute all notifications

ChannelType: { DIRECT: 1; GROUP: 3; OPEN: 4; SYSTEM: 6; COMMUNITY: 10 } = ...

Channel type enum

Type declaration

  • DIRECT: 1

    Direct channel

  • GROUP: 3

    Group channel

  • OPEN: 4

    Open channel

  • SYSTEM: 6

    System channel

  • COMMUNITY: 10

    Community channel

CommunitySubChannelType: { PUBLIC: 0; PRIVATE: 1 } = ...

Type of a community sub-channel.

Type declaration

  • PUBLIC: 0

    Public sub-channel, visible and joinable by all community members

  • PRIVATE: 1

    Private sub-channel, only visible and joinable by invited members

LogLevel: { DEBUG: 4; INFO: 3; WARN: 2; ERROR: 1 } = ...

Log level

Type declaration

  • DEBUG: 4
  • INFO: 3
  • WARN: 2
  • ERROR: 1
MessageDirection: { SEND: 1; RECEIVE: 2 } = ...

Direction of a message, indicating whether it was sent or received.

Type declaration

  • SEND: 1

    Message sent by the current user

  • RECEIVE: 2

    Message received from another user

MessageReadReceiptStatus: { RESPONDED: 0; UNRESPONDED: 1 } = ...

Read receipt response status for a message.

Type declaration

  • RESPONDED: 0

    The user has responded to the read receipt request

  • UNRESPONDED: 1

    The user has not yet responded to the read receipt request

MessageType: { TEXT: "RC:TxtMsg"; HD_VOICE: "RC:HQVCMsg"; IMAGE: "RC:ImgMsg"; GIF: "RC:GIFMsg"; SHORT_VIDEO: "RC:SightMsg"; LOCATION: "RC:LBSMsg"; FILE: "RC:FileMsg"; REFERENCE: "RC:ReferenceMsg"; COMBINE: "RC:CombineV2Msg"; STREAM: "RC:StreamMsg" } = ...

Built-in message type identifiers. Each value corresponds to a registered message object type name.

Type declaration

  • TEXT: "RC:TxtMsg"

    Plain text message

  • HD_VOICE: "RC:HQVCMsg"

    High-definition voice message

  • IMAGE: "RC:ImgMsg"

    Image message

  • GIF: "RC:GIFMsg"

    GIF image message

  • SHORT_VIDEO: "RC:SightMsg"

    Short video message

  • LOCATION: "RC:LBSMsg"

    Location message

  • FILE: "RC:FileMsg"

    File message

  • REFERENCE: "RC:ReferenceMsg"

    Reference (reply/quote) message

  • COMBINE: "RC:CombineV2Msg"

    Combined/forwarded message

  • STREAM: "RC:StreamMsg"

    Stream message (for real-time AI streaming responses)

NoDisturbTimeLevel: { DEFAULT: 0; MENTION: 1; MUTED: 5 } = ...

Do-not-disturb time period level. Controls notification behavior during quiet hours.

Type declaration

  • DEFAULT: 0

    Default level (follow global settings)

  • MENTION: 1

    Only allow mentioned message notifications during quiet hours

  • MUTED: 5

    Mute all notifications during quiet hours

OpenChannelMetadataOperationType: { UPDATE: 0; REMOVE: 1 } = ...

Type declaration

  • UPDATE: 0
  • REMOVE: 1
Platform: { OTHER: 0; IOS: 1; ANDROID: 2; WEB: 3; PC: 4; MINI_PROGRAM: 5; HARMONY_OS: 6 } = ...

Type declaration

  • OTHER: 0
  • IOS: 1
  • ANDROID: 2
  • WEB: 3
  • PC: 4
  • MINI_PROGRAM: 5
  • HARMONY_OS: 6
OpenChannelMemberActionType: { EXIT: 0; ENTER: 1 } = ...

Action type for open channel member changes (enter/exit).

Type declaration

  • EXIT: 0

    Member exited the open channel

  • ENTER: 1

    Member entered the open channel

OpenChannelSyncStatus: { EXIT: 0; ENTER: 1 } = ...

Multi-device sync status for open channel membership.

Type declaration

  • EXIT: 0

    Exited the open channel on another device

  • ENTER: 1

    Entered the open channel on another device

OpenChannelExitReason: { EXIT_VOLUNTARILY: 1; KICKED_OUT_BY_OTHER_DEVICE: 2 } = ...

Reason why a user exited an open channel.

Type declaration

  • EXIT_VOLUNTARILY: 1

    User voluntarily exited the channel

  • KICKED_OUT_BY_OTHER_DEVICE: 2

    User was kicked out by login on another device

OpenChannelMemberMuteType: { UNMUTE_USERS: 0; MUTE_USERS: 1; UNMUTE_ALL: 2; MUTE_ALL: 3; REMOVE_ALLOW_LIST: 4; ADD_ALLOW_LIST: 5; UNMUTE_GLOBE: 6; MUTE_GLOBE: 7 } = ...

Mute operation type for open channel members.

Type declaration

  • UNMUTE_USERS: 0

    Unmute specific users

  • MUTE_USERS: 1

    Mute specific users

  • UNMUTE_ALL: 2

    Unmute all users

  • MUTE_ALL: 3

    Mute all users

  • REMOVE_ALLOW_LIST: 4

    Remove users from the allow list

  • ADD_ALLOW_LIST: 5

    Add users to the allow list

  • UNMUTE_GLOBE: 6

    Unmute the entire channel globally

  • MUTE_GLOBE: 7

    Mute the entire channel globally

OpenChannelMemberBanType: { UNBAN: 0; BAN: 1 } = ...

Ban operation type for open channel members.

Type declaration

  • UNBAN: 0

    Unban the member

  • BAN: 1

    Ban the member

MentionedType: { ALL: 1; USERS: 2 } = ...

Whether an @mention targets everyone in the channel or specific users.

Type declaration

  • ALL: 1

    Mention all participants

  • USERS: 2

    Mention listed user IDs only

TranslateSourceType: { MESSAGE: 0; CUSTOM_TEXT: 1 } = ...

Source of text passed to translation APIs (message body vs custom string).

Type declaration

  • MESSAGE: 0

    Translate content attached to a chat message

  • CUSTOM_TEXT: 1

    Translate arbitrary user-entered text

Helper: { createSendFileMessageParams: ((file: File) => Promise<NCResult<SendFileMessageParams>>); createSendGIFMessageParams: ((file: File) => Promise<NCResult<SendGIFMessageParams>>); createSendHDVoiceMessageParams: ((file: File) => Promise<NCResult<SendHDVoiceMessageParams>>); createSendImageMessageParams: ((file: File) => Promise<NCResult<SendImageMessageParams>>) } = ...

Helpers that construct media SendFileMessageParams, SendImageMessageParams, SendGIFMessageParams, and SendHDVoiceMessageParams from browser {@link File} objects. On success, pass result.data to BaseChannel.sendMediaMessage.

Type declaration

  • createSendFileMessageParams: ((file: File) => Promise<NCResult<SendFileMessageParams>>)
      • Builds file message send parameters from a local file (name, size, and inferred file type suffix).

        example
        const r = await Helper.createSendFileMessageParams(file);
        if (r.isOk) await channel.sendMediaMessage(r.data);

        Parameters

        • file: File

          The file to upload and send

        Returns Promise<NCResult<SendFileMessageParams>>

        A result containing SendFileMessageParams with file set, or an error if validation fails

  • createSendGIFMessageParams: ((file: File) => Promise<NCResult<SendGIFMessageParams>>)
      • Builds GIF message send parameters by loading the image to read width and height.

        example
        const r = await Helper.createSendGIFMessageParams(file);
        if (r.isOk) await channel.sendMediaMessage(r.data);

        Parameters

        • file: File

          The GIF file to upload and send

        Returns Promise<NCResult<SendGIFMessageParams>>

        A result containing SendGIFMessageParams with file set, or an error if the GIF cannot be loaded

  • createSendHDVoiceMessageParams: ((file: File) => Promise<NCResult<SendHDVoiceMessageParams>>)
      • Builds HD voice message send parameters by decoding audio to obtain duration, sample rate, and channel count (expects 16 kHz decode context).

        example
        const r = await Helper.createSendHDVoiceMessageParams(file);
        if (r.isOk) await channel.sendMediaMessage(r.data);

        Parameters

        • file: File

          The audio file to upload and send

        Returns Promise<NCResult<SendHDVoiceMessageParams>>

        A result containing SendHDVoiceMessageParams with file set, or an error if decoding fails

  • createSendImageMessageParams: ((file: File) => Promise<NCResult<SendImageMessageParams>>)
      • Builds image message send parameters by drawing a scaled thumbnail (max 160px) and JPEG base64 payload within size limits.

        example
        const r = await Helper.createSendImageMessageParams(file);
        if (r.isOk) await channel.sendMediaMessage(r.data);

        Parameters

        • file: File

          The image file to upload and send

        Returns Promise<NCResult<SendImageMessageParams>>

        A result containing SendImageMessageParams with file set, or an error if the image cannot be loaded

Type Aliases

GroupMemberFilterRobotType: typeof GroupMemberFilterRobotType[keyof typeof GroupMemberFilterRobotType]
SpeechToTextStatus: typeof SpeechToTextStatus[keyof typeof SpeechToTextStatus]
CombinedMessageInfo: { fromUserId: string; targetId: string; timestamp: number; objectName: string; content: any }

Data structure of an individual message within a combined (forwarded) message

Type declaration

  • fromUserId: string

    User ID of the message sender

  • targetId: string

    Conversation target ID

  • timestamp: number

    Message send time

  • objectName: string

    Message type identifier

  • content: any

    Message content

ReferenceMessageStatus: typeof ReferenceMessageStatus[keyof typeof ReferenceMessageStatus]
IErrorKeys: { errorKeys?: string[] }

Error keys information

Type declaration

  • Optional errorKeys?: string[]

    Array of keys that failed to update

TranslateMode: typeof TranslateMode[keyof typeof TranslateMode]
TranslateStatus: typeof TranslateStatus[keyof typeof TranslateStatus]
TranslateStrategy: typeof TranslateStrategy[keyof typeof TranslateStrategy]
MessageReadReceiptUser: { userId: string; timestamp: number; isMentioned: boolean }

Read receipt user information

Type declaration

  • userId: string

    User ID

  • timestamp: number

    The time the user read the message. 0 indicates the user has not sent a read receipt.

  • isMentioned: boolean

    Whether the user was mentioned in the message

NoDisturbTimeParams: NoDisturbTimeInfo
UnsubscribeEventParams: GetSubscribeEventParams

Same fields as GetSubscribeEventParams; used when unsubscribing from those users and type.

AreaCode: typeof AreaCode[keyof typeof AreaCode]
ChannelNoDisturbLevel: typeof ChannelNoDisturbLevel[keyof typeof ChannelNoDisturbLevel]

Do-not-disturb level type for a specific channel.

ChannelType: typeof ChannelType[keyof typeof ChannelType]
CommunitySubChannelType: typeof CommunitySubChannelType[keyof typeof CommunitySubChannelType]

Community sub-channel type.

LogLevel: typeof LogLevel[keyof typeof LogLevel]

Log level

MessageDirection: typeof MessageDirection[keyof typeof MessageDirection]

Message direction type.

MessageReadReceiptStatus: typeof MessageReadReceiptStatus[keyof typeof MessageReadReceiptStatus]

Message read receipt status type.

MessageType: typeof MessageType[keyof typeof MessageType]

Built-in message type.

NoDisturbTimeLevel: typeof NoDisturbTimeLevel[keyof typeof NoDisturbTimeLevel]

Do-not-disturb time period level type.

OpenChannelMetadataOperationType: typeof OpenChannelMetadataOperationType[keyof typeof OpenChannelMetadataOperationType]
Platform: typeof Platform[keyof typeof Platform]
OpenChannelMemberActionType: typeof OpenChannelMemberActionType[keyof typeof OpenChannelMemberActionType]

Open channel member action type.

OpenChannelSyncStatus: typeof OpenChannelSyncStatus[keyof typeof OpenChannelSyncStatus]

Open channel sync status type.

OpenChannelExitReason: typeof OpenChannelExitReason[keyof typeof OpenChannelExitReason]

Open channel exit reason type.

OpenChannelMemberMuteType: typeof OpenChannelMemberMuteType[keyof typeof OpenChannelMemberMuteType]

Open channel member mute operation type.

OpenChannelMemberBanType: typeof OpenChannelMemberBanType[keyof typeof OpenChannelMemberBanType]

Open channel member ban type.

MentionedType: typeof MentionedType[keyof typeof MentionedType]
TranslateSourceType: typeof TranslateSourceType[keyof typeof TranslateSourceType]
GroupMemberInfoChangedEvent: IGroupMemberInfoChanged

Payload when a member's group-related attributes change.

GroupFavoritesChangedSyncEvent: IGroupFollowsChangedSync

Payload when group favorites (follows) sync across devices.

SubscribeChangeEvent: ISubscribeRelationInfo

Subscription relationship change as synced from the server (e.g. another device).

Functions

  • Installs an engine plugin after the SDK is initialized. Returns null if {@link init} has not been called.

    example
    NCEngine.initialize({ appKey: 'your-app-key' });
    const plugin = __install__(myPluginFactory, { option: true });

    Type Parameters

    • T

    • O

    Parameters

    • plugin: PluginGenerator<T, O>

      Engine plugin factory ({@link IPluginGenerator})

    • options: O

      Options passed to the plugin factory

    Returns null | T

    The plugin instance, or null when the global context is unavailable