@sudoplatform/sudo-secure-communications
    Preparing search index...

    Interface MessagingModule

    Messaging management for the Secure Communications Service.

    Each method on this interface takes an input which includes a Recipient parameter representing a "Chat" with either a Direct Chat, Channel or Group.

    interface MessagingModule {
        createPoll(input: CreatePollInput): Promise<void>;
        deleteMessage(input: DeleteMessageInput): Promise<void>;
        editMediaCaption(input: EditMediaCaptionInput): Promise<void>;
        editMessage(input: EditMessageInput): Promise<void>;
        editPoll(input: EditPollInput): Promise<void>;
        endPoll(input: EndPollInput): Promise<void>;
        getChatSummaries(input: GetChatSummariesInput): Promise<ChatSummary[]>;
        getMessage(input: GetMessageInput): Promise<Message | undefined>;
        getMessages(input: GetMessagesInput): Promise<ListOutput<Message>>;
        getPinnedMessages(input: GetPinnedMessagesInput): Promise<Message[]>;
        getPollResponses(input: GetPollResponsesInput): Promise<PollResponses>;
        markAsRead(input: MarkAsReadInput): Promise<void>;
        markAsUnread(input: MarkAsUnreadInput): Promise<void>;
        pinMessage(input: PinMessageInput): Promise<void>;
        registerMessageListener(input: RegisterMessageListenerInput): Promise<void>;
        searchMessages(
            input: SearchMessagesInput,
        ): Promise<ListOutput<SearchMessagesItem>>;
        sendMedia(input: SendMediaInput): Promise<void>;
        sendMessage(input: SendMessageInput): Promise<void>;
        sendPollResponse(input: SendPollResponseInput): Promise<void>;
        sendTypingNotification(input: SendTypingNotificationInput): Promise<void>;
        toggleReaction(input: ToggleReactionInput): Promise<void>;
        unpinMessage(input: UnpinMessageInput): Promise<void>;
        unregisterMessageListener(
            input: UnregisterMessageListenerInput,
        ): Promise<void>;
    }

    Implemented by

    Index

    Methods

    • Creates a poll.

      Parameters

      Returns Promise<void>

    • Deletes an existing message that has been sent to a recipient. The original message is removed for all members of the chat.

      Parameters

      Returns Promise<void>

    • Edits the caption for an existing media attachment that has been sent to a recipient. The original message is replaced by the edited message for all members of the chat.

      Parameters

      Returns Promise<void>

    • Edits an existing message that has been sent to a recipient. The original message is replaced by the edited message for all members of the chat.

      Parameters

      Returns Promise<void>

    • Edits an existing poll.

      Parameters

      Returns Promise<void>

    • Ends a poll.

      Parameters

      Returns Promise<void>

    • Retrieves a chat summary for the supplied set of recipients.

      Parameters

      Returns Promise<ChatSummary[]>

      A list of chat summary items containing the latest message (if available) for each supplied recipient.

    • Retrieve an individual message for a given recipient by the message's identifier.

      Parameters

      Returns Promise<Message | undefined>

      The message matching the input identifier, or undefined if not found.

    • Retrieve a list of messages for a given recipient, ordered from newest message to oldest.

      Parameters

      Returns Promise<ListOutput<Message>>

      A list of message items and a next token to support pagination.

    • Retrieve a list of pinned messages for a given recipient, ordered from newest message to oldest.

      Parameters

      Returns Promise<Message[]>

      A list of pinned message items.

    • Marks the chat with a recipient as read.

      Parameters

      Returns Promise<void>

    • Marks the chat with a recipient as unread.

      Parameters

      Returns Promise<void>

    • Pins an existing message for a given recipient.

      Parameters

      Returns Promise<void>

    • Retrieves a list of messages from all unencrypted channels/groups matching search keywords.

      Parameters

      Returns Promise<ListOutput<SearchMessagesItem>>

      The search results representing a list of message items and a next token to support pagination.

    • Uploads and sends a media message to a recipient. Supported media types are images, videos, audio, and files.

      Parameters

      Returns Promise<void>

    • Sends a message to a recipient.

      Parameters

      • input: SendMessageInput

        Parameters used to send a message including any other associated metadata.

      Returns Promise<void>

    • Sends a response to a poll.

      Parameters

      Returns Promise<void>

    • Sends a typing notification for this handle.

      Parameters

      Returns Promise<void>

    • Toggles a reaction for an existing message. All members of the chat will have visibility of the reaction.

      Parameters

      Returns Promise<void>

    • Unpins an existing message for a given recipient.

      Parameters

      Returns Promise<void>