convokit_flutter library

Classes

AppUser
An app user's profile, as returned by GET /api/v1/user and GET /api/v1/user/:id.
ClearUnreadResult
The result of ConvoKit.clearConversationUnread (DELETE /conversations/:id/unread): the private state after the request plus whether this request effected a clear.
Conversation
ConversationMembership
The caller's own membership row for one conversation, the self-only membership sibling of GET /api/v1/conversations/:id.
ConversationPrivateState
The caller's private "mark unread" state for one conversation, as returned by ConvoKit.markConversationUnread (POST /conversations/:id/unread).
ConvoKit
InboxEntry
One row of GET /api/v1/inbox: the conversation plus its InboxSummary.
InboxPage
One page of GET /api/v1/inbox, ordered by activity time then conversation id, both descending.
InboxSummary
The caller's view of one conversation in GET /api/v1/inbox: the preview, the unread count and the caller's own read state.
Message
MessageContextPage
One window of GET /api/v1/conversations/:id/context, as returned by ConvoKit.getMessageContext: the rows around a jump target, or the page immediately older or newer than a cursor.
MessageDeletedEvent
An authorized deletion notification, not a fabricated old message record.
MessageEvent
Participant
PresenceEvent
ReadEvent
ReadPosition
The newest message a participant has confirmed reading, as the server's (createdAt, id) message cursor.
RealtimeConnectionEvent
RealtimeService
Private, reference-counted Realtime streams owned by one connected user.
ReplyPreview
A bounded preview of a quoted message, as returned by ConvoKit.getReplyPreviews (GET /api/v1/conversations/:id/reply-previews?ids=).
TypingEvent

Functions

createClientMessageId() → String
Create once before an optimistic insert and retain for retries of that send.
readThrough(Message message, {ReadPosition? readPosition, DateTime? lastReadAt}) → bool
The unified read rule shared by every ConvoKit client.
throwConvoKitError(int statusCode, String action, String body) → Never
Maps a non-2xx HTTP response to the appropriate ConvoKitException subtype and throws it, carrying the body's code when present.

Exceptions / Errors

ConvoKitAuthException
The backend rejected the request as unauthenticated or unauthorized (HTTP 401/403). Only 401 responses can trigger one token-refresh retry. A 403 means insufficient permission and is never implicitly retried.
ConvoKitException
Base exception type for all errors thrown by the ConvoKit SDK.
ConvoKitNetworkException
The request failed at the network layer. A timeout or lost response does not prove the backend did not complete a mutation; automatic replay is unsafe.
ConvoKitNotFoundException
The requested resource does not exist, or the current user is not an active participant of it (HTTP 404).
ConvoKitServerException
The backend failed unexpectedly (HTTP 5xx). A mutation may already have completed; do not blindly retry it without an idempotency guarantee.
ConvoKitSessionException
Session lifecycle failure without credentials or provider response bodies.
ConvoKitValidationException
The request was malformed or rejected (other HTTP 4xx). Retrying the same request unchanged will fail again.