@deltachat/jsonrpc-client
    Preparing search index...

    Type Alias EventType

    EventType:
        | { kind: "Info" } & { msg: string }
        | { kind: "SmtpConnected" } & { msg: string }
        | { kind: "ImapConnected" } & { msg: string }
        | { kind: "SmtpMessageSent" } & { msg: string }
        | { kind: "ImapMessageDeleted" } & { msg: string }
        | { kind: "ImapMessageMoved" } & { msg: string }
        | { kind: "ImapInboxIdle" }
        | { kind: "NewBlobFile" } & { file: string }
        | { kind: "DeletedBlobFile" } & { file: string }
        | { kind: "Warning" } & { msg: string }
        | { kind: "Error" } & { msg: string }
        | { kind: "ErrorSelfNotInGroup" } & { msg: string }
        | { kind: "MsgsChanged" } & { chatId: T.U32; msgId: T.U32 }
        | { kind: "ReactionsChanged" } & {
            chatId: T.U32;
            contactId: T.U32;
            msgId: T.U32;
        }
        | { kind: "IncomingReaction" } & {
            chatId: T.U32;
            contactId: T.U32;
            msgId: T.U32;
            reaction: string;
        }
        | { kind: "IncomingWebxdcNotify" } & {
            chatId: T.U32;
            contactId: T.U32;
            href: string | null;
            msgId: T.U32;
            text: string;
        }
        | { kind: "IncomingMsg" } & { chatId: T.U32; msgId: T.U32 }
        | { kind: "IncomingMsgBunch" }
        | { kind: "MsgsNoticed" } & { chatId: T.U32 }
        | { kind: "MsgDelivered" } & { chatId: T.U32; msgId: T.U32 }
        | { kind: "MsgFailed" } & { chatId: T.U32; msgId: T.U32 }
        | { kind: "MsgRead" } & { chatId: T.U32; msgId: T.U32 }
        | { kind: "MsgDeleted" } & { chatId: T.U32; msgId: T.U32 }
        | { kind: "ChatModified" } & { chatId: T.U32 }
        | { kind: "ChatEphemeralTimerModified" } & { chatId: T.U32; timer: T.U32 }
        | { kind: "ChatDeleted" } & { chat_id: T.U32 }
        | { kind: "ContactsChanged" } & { contactId: T.U32 | null }
        | { kind: "LocationChanged" } & { contactId: T.U32 | null }
        | { kind: "ConfigureProgress" } & {
            comment: string | null;
            progress: Usize;
        }
        | { kind: "ImexProgress" } & { progress: Usize }
        | { kind: "ImexFileWritten" } & { path: string }
        | { kind: "SecurejoinInviterProgress" } & {
            contactId: T.U32;
            progress: Usize;
        }
        | { kind: "SecurejoinJoinerProgress" } & {
            contactId: T.U32;
            progress: Usize;
        }
        | { kind: "ConnectivityChanged" }
        | { kind: "SelfavatarChanged" }
        | { kind: "ConfigSynced" } & { key: string }
        | { kind: "WebxdcStatusUpdate" } & {
            msgId: T.U32;
            statusUpdateSerial: T.U32;
        }
        | { kind: "WebxdcRealtimeData" } & { data: U8[]; msgId: T.U32 }
        | { kind: "WebxdcRealtimeAdvertisementReceived" } & { msgId: T.U32 }
        | { kind: "WebxdcInstanceDeleted" } & { msgId: T.U32 }
        | { kind: "AccountsBackgroundFetchDone" }
        | { kind: "ChatlistChanged" }
        | { kind: "ChatlistItemChanged" } & { chatId: T.U32 | null }
        | { kind: "AccountsChanged" }
        | { kind: "AccountsItemChanged" }
        | { kind: "EventChannelOverflow" } & { n: U64 }

    Type declaration

    • { kind: "Info" } & { msg: string }
      • kind: "Info"

        The library-user may write an informational string to the log.

        This event should not be reported to the end-user using a popup or something like that.

      • msg: string
    • { kind: "SmtpConnected" } & { msg: string }
      • kind: "SmtpConnected"

        Emitted when SMTP connection is established and login was successful.

      • msg: string
    • { kind: "ImapConnected" } & { msg: string }
      • kind: "ImapConnected"

        Emitted when IMAP connection is established and login was successful.

      • msg: string
    • { kind: "SmtpMessageSent" } & { msg: string }
      • kind: "SmtpMessageSent"

        Emitted when a message was successfully sent to the SMTP server.

      • msg: string
    • { kind: "ImapMessageDeleted" } & { msg: string }
      • kind: "ImapMessageDeleted"

        Emitted when an IMAP message has been marked as deleted

      • msg: string
    • { kind: "ImapMessageMoved" } & { msg: string }
      • kind: "ImapMessageMoved"

        Emitted when an IMAP message has been moved

      • msg: string
    • { kind: "ImapInboxIdle" }
      • kind: "ImapInboxIdle"

        Emitted before going into IDLE on the Inbox folder.

    • { kind: "NewBlobFile" } & { file: string }
      • kind: "NewBlobFile"

        Emitted when an new file in the $BLOBDIR was created

      • file: string
    • { kind: "DeletedBlobFile" } & { file: string }
      • kind: "DeletedBlobFile"

        Emitted when an file in the $BLOBDIR was deleted

      • file: string
    • { kind: "Warning" } & { msg: string }
      • kind: "Warning"

        The library-user should write a warning string to the log.

        This event should not be reported to the end-user using a popup or something like that.

      • msg: string
    • { kind: "Error" } & { msg: string }
      • kind: "Error"

        The library-user should report an error to the end-user.

        As most things are asynchronous, things may go wrong at any time and the user should not be disturbed by a dialog or so. Instead, use a bubble or so.

        However, for ongoing processes (eg. configure()) or for functions that are expected to fail (eg. autocryptContinueKeyTransfer()) it might be better to delay showing these events until the function has really failed (returned false). It should be sufficient to report only the last error in a message box then.

      • msg: string
    • { kind: "ErrorSelfNotInGroup" } & { msg: string }
      • kind: "ErrorSelfNotInGroup"

        An action cannot be performed because the user is not in the group. Reported eg. after a call to setChatName(), setChatProfileImage(), addContactToChat(), removeContactFromChat(), and messages sending functions.

      • msg: string
    • { kind: "MsgsChanged" } & { chatId: T.U32; msgId: T.U32 }
      • kind: "MsgsChanged"

        Messages or chats changed. One or more messages or chats changed for various reasons in the database:

        • Messages sent, received or removed
        • Chats created, deleted or archived
        • A draft has been set
      • chatId: T.U32

        Set if only a single chat is affected by the changes, otherwise 0.

      • msgId: T.U32

        Set if only a single message is affected by the changes, otherwise 0.

    • { kind: "ReactionsChanged" } & { chatId: T.U32; contactId: T.U32; msgId: T.U32 }
      • kind: "ReactionsChanged"

        Reactions for the message changed.

      • chatId: T.U32

        ID of the chat which the message belongs to.

      • contactId: T.U32

        ID of the contact whose reaction set is changed.

      • msgId: T.U32

        ID of the message for which reactions were changed.

    • { kind: "IncomingReaction" } & {
          chatId: T.U32;
          contactId: T.U32;
          msgId: T.U32;
          reaction: string;
      }
      • kind: "IncomingReaction"

        A reaction to one's own sent message received. Typically, the UI will show a notification for that.

        In addition to this event, ReactionsChanged is emitted.

      • chatId: T.U32

        ID of the chat which the message belongs to.

      • contactId: T.U32

        ID of the contact whose reaction set is changed.

      • msgId: T.U32

        ID of the message for which reactions were changed.

      • reaction: string

        The reaction.

    • { kind: "IncomingWebxdcNotify" } & {
          chatId: T.U32;
          contactId: T.U32;
          href: string | null;
          msgId: T.U32;
          text: string;
      }
      • kind: "IncomingWebxdcNotify"

        Incoming webxdc info or summary update, should be notified.

      • chatId: T.U32

        ID of the chat.

      • contactId: T.U32

        ID of the contact sending.

      • href: string | null

        Link assigned to this notification, if any.

      • msgId: T.U32

        ID of the added info message or webxdc instance in case of summary change.

      • text: string

        Text to notify.

    • { kind: "IncomingMsg" } & { chatId: T.U32; msgId: T.U32 }
      • kind: "IncomingMsg"

        There is a fresh message. Typically, the user will show a notification when receiving this message.

        There is no extra #DC_EVENT_MSGS_CHANGED event sent together with this event.

      • chatId: T.U32

        ID of the chat where the message is assigned.

      • msgId: T.U32

        ID of the message.

    • { kind: "IncomingMsgBunch" }
      • kind: "IncomingMsgBunch"

        Downloading a bunch of messages just finished. This is an event to allow the UI to only show one notification per message bunch, instead of cluttering the user with many notifications.

    • { kind: "MsgsNoticed" } & { chatId: T.U32 }
      • kind: "MsgsNoticed"

        Messages were seen or noticed. chat id is always set.

    • { kind: "MsgDelivered" } & { chatId: T.U32; msgId: T.U32 }
      • kind: "MsgDelivered"

        A single message is sent successfully. State changed from DC_STATE_OUT_PENDING to DC_STATE_OUT_DELIVERED, see Message.state.

      • chatId: T.U32

        ID of the chat which the message belongs to.

      • msgId: T.U32

        ID of the message that was successfully sent.

    • { kind: "MsgFailed" } & { chatId: T.U32; msgId: T.U32 }
      • kind: "MsgFailed"

        A single message could not be sent. State changed from DC_STATE_OUT_PENDING or DC_STATE_OUT_DELIVERED to DC_STATE_OUT_FAILED, see Message.state.

      • chatId: T.U32

        ID of the chat which the message belongs to.

      • msgId: T.U32

        ID of the message that could not be sent.

    • { kind: "MsgRead" } & { chatId: T.U32; msgId: T.U32 }
      • kind: "MsgRead"

        A single message is read by the receiver. State changed from DC_STATE_OUT_DELIVERED to DC_STATE_OUT_MDN_RCVD, see Message.state.

      • chatId: T.U32

        ID of the chat which the message belongs to.

      • msgId: T.U32

        ID of the message that was read.

    • { kind: "MsgDeleted" } & { chatId: T.U32; msgId: T.U32 }
      • kind: "MsgDeleted"

        A single message was deleted.

        This event means that the message will no longer appear in the messagelist. UI should remove the message from the messagelist in response to this event if the message is currently displayed.

        The message may have been explicitly deleted by the user or expired. Internally the message may have been removed from the database, moved to the trash chat or hidden.

        This event does not indicate the message deletion from the server.

      • chatId: T.U32

        ID of the chat where the message was prior to deletion. Never 0.

      • msgId: T.U32

        ID of the deleted message. Never 0.

    • { kind: "ChatModified" } & { chatId: T.U32 }
      • kind: "ChatModified"

        Chat changed. The name or the image of a chat group was changed or members were added or removed. Or the verify state of a chat has changed. See setChatName(), setChatProfileImage(), addContactToChat() and removeContactFromChat().

        This event does not include ephemeral timer modification, which is a separate event.

    • { kind: "ChatEphemeralTimerModified" } & { chatId: T.U32; timer: T.U32 }
      • kind: "ChatEphemeralTimerModified"

        Chat ephemeral timer changed.

      • chatId: T.U32

        Chat ID.

      • timer: T.U32

        New ephemeral timer value.

    • { kind: "ChatDeleted" } & { chat_id: T.U32 }
      • kind: "ChatDeleted"

        Chat deleted.

      • chat_id: T.U32

        Chat ID.

    • { kind: "ContactsChanged" } & { contactId: T.U32 | null }
      • kind: "ContactsChanged"

        Contact(s) created, renamed, blocked or deleted.

      • contactId: T.U32 | null

        If set, this is the contact_id of an added contact that should be selected.

    • { kind: "LocationChanged" } & { contactId: T.U32 | null }
      • kind: "LocationChanged"

        Location of one or more contact has changed.

      • contactId: T.U32 | null

        contact_id of the contact for which the location has changed. If the locations of several contacts have been changed, this parameter is set to None.

    • { kind: "ConfigureProgress" } & { comment: string | null; progress: Usize }
      • kind: "ConfigureProgress"

        Inform about the configuration progress started by configure().

      • comment: string | null

        Progress comment or error, something to display to the user.

      • progress: Usize

        Progress.

        0=error, 1-999=progress in permille, 1000=success and done

    • { kind: "ImexProgress" } & { progress: Usize }
      • kind: "ImexProgress"

        Inform about the import/export progress started by imex().

      • progress: Usize

        0=error, 1-999=progress in permille, 1000=success and done

    • { kind: "ImexFileWritten" } & { path: string }
      • kind: "ImexFileWritten"

        A file has been exported. A file has been written by imex(). This event may be sent multiple times by a single call to imex().

        A typical purpose for a handler of this event may be to make the file public to some system services.

        0

      • path: string
    • { kind: "SecurejoinInviterProgress" } & { contactId: T.U32; progress: Usize }
      • kind: "SecurejoinInviterProgress"

        Progress information of a secure-join handshake from the view of the inviter (Alice, the person who shows the QR code).

        These events are typically sent after a joiner has scanned the QR code generated by getChatSecurejoinQrCodeSvg().

      • contactId: T.U32

        ID of the contact that wants to join.

      • progress: Usize

        Progress as: 300=vg-/vc-request received, typically shown as "bob@addr joins". 600=vg-/vc-request-with-auth received, vg-member-added/vc-contact-confirm sent, typically shown as "bob@addr verified". 800=contact added to chat, shown as "bob@addr securely joined GROUP". Only for the verified-group-protocol. 1000=Protocol finished for this contact.

    • { kind: "SecurejoinJoinerProgress" } & { contactId: T.U32; progress: Usize }
      • kind: "SecurejoinJoinerProgress"

        Progress information of a secure-join handshake from the view of the joiner (Bob, the person who scans the QR code). The events are typically sent while secureJoin(), which may take some time, is executed.

      • contactId: T.U32

        ID of the inviting contact.

      • progress: Usize

        Progress as: 400=vg-/vc-request-with-auth sent, typically shown as "alice@addr verified, introducing myself." (Bob has verified alice and waits until Alice does the same for him) 1000=vg-member-added/vc-contact-confirm received

    • { kind: "ConnectivityChanged" }
      • kind: "ConnectivityChanged"

        The connectivity to the server changed. This means that you should refresh the connectivity view and possibly the connectivtiy HTML; see getConnectivity() and getConnectivityHtml() for details.

    • { kind: "SelfavatarChanged" }
      • kind: "SelfavatarChanged"

        Deprecated by ConfigSynced.

    • { kind: "ConfigSynced" } & { key: string }
      • kind: "ConfigSynced"

        A multi-device synced config value changed. Maybe the app needs to refresh smth. For uniformity this is emitted on the source device too. The value isn't here, otherwise it would be logged which might not be good for privacy.

      • key: string

        Configuration key.

    • { kind: "WebxdcStatusUpdate" } & { msgId: T.U32; statusUpdateSerial: T.U32 }
      • kind: "WebxdcStatusUpdate"
      • msgId: T.U32

        Message ID.

      • statusUpdateSerial: T.U32

        Status update ID.

    • { kind: "WebxdcRealtimeData" } & { data: U8[]; msgId: T.U32 }
      • kind: "WebxdcRealtimeData"

        Data received over an ephemeral peer channel.

      • data: U8[]

        Realtime data.

      • msgId: T.U32

        Message ID.

    • { kind: "WebxdcRealtimeAdvertisementReceived" } & { msgId: T.U32 }
      • kind: "WebxdcRealtimeAdvertisementReceived"

        Advertisement received over an ephemeral peer channel. This can be used by bots to initiate peer-to-peer communication from their side.

      • msgId: T.U32

        Message ID of the webxdc instance.

    • { kind: "WebxdcInstanceDeleted" } & { msgId: T.U32 }
      • kind: "WebxdcInstanceDeleted"

        Inform that a message containing a webxdc instance has been deleted

      • msgId: T.U32

        ID of the deleted message.

    • { kind: "AccountsBackgroundFetchDone" }
      • kind: "AccountsBackgroundFetchDone"

        Tells that the Background fetch was completed (or timed out). This event acts as a marker, when you reach this event you can be sure that all events emitted during the background fetch were processed.

        This event is only emitted by the account manager

    • { kind: "ChatlistChanged" }
      • kind: "ChatlistChanged"

        Inform that set of chats or the order of the chats in the chatlist has changed.

        Sometimes this is emitted together with UIChatlistItemChanged.

    • { kind: "ChatlistItemChanged" } & { chatId: T.U32 | null }
      • kind: "ChatlistItemChanged"

        Inform that a single chat list item changed and needs to be rerendered. If chat_id is set to None, then all currently visible chats need to be rerendered, and all not-visible items need to be cleared from cache if the UI has a cache.

      • chatId: T.U32 | null

        ID of the changed chat

    • { kind: "AccountsChanged" }
      • kind: "AccountsChanged"

        Inform that the list of accounts has changed (an account removed or added or (not yet implemented) the account order changes)

        This event is only emitted by the account manager

    • { kind: "AccountsItemChanged" }
      • kind: "AccountsItemChanged"

        Inform that an account property that might be shown in the account list changed, namely:

        • is_configured (see is_configured())
        • displayname
        • selfavatar
        • private_tag

        This event is emitted from the account whose property changed.

    • { kind: "EventChannelOverflow" } & { n: U64 }
      • kind: "EventChannelOverflow"

        Inform than some events have been skipped due to event channel overflow.

      • n: U64

        Number of events skipped.