tutti-api - v2.1.0
    Preparing search index...

    Class MessagingResource

    Messaging / chat. Live feeds are NDJSON-over-HTTP streams exposed as async iterators (backlog first, then live updates); sends are plain POSTs.

    Index

    Constructors

    Methods

    • Mark the conversation read up to (and including) offset.

      Parameters

      • conversationId: string
      • offset: number

      Returns Promise<void>

    • Start a conversation by replying to a listing. Does NOT return a conversation id — discover the new conversation via streamConversations.

      Parameters

      Returns Promise<{ message: string; publicAccountId: string }>

    • Send a text message. Returns the created message (with server offset).

      Parameters

      • conversationId: string
      • text: string

      Returns Promise<Message>

    • Live stream of conversations. Yields a full conversation object on every change (initial backlog, then updates). Maintain your own map keyed by conversation.id. Runs until the signal aborts or the server closes.

      Parameters

      Returns AsyncGenerator<Conversation>

    • Live stream of messages in a conversation. Yields backlog (from offset, ordered by offset) then new messages as they arrive.

      Parameters

      • conversationId: string
      • options: StreamOptions & { offset?: number } = {}

      Returns AsyncGenerator<Message>