convokit_flutter 0.4.0
convokit_flutter: ^0.4.0 copied to clipboard
Flutter SDK for ConvoKit - real-time messaging integration.
0.4.0 #
- Add private
onInboxChanged(appId)signals on mutations and verified subscription/reconnect, sharing the app presence channel. - Replace the unimplemented
onConversationUpdate()placeholder with that explicit inbox API. This requires the matching backend/UI release. - Generate and preserve
clientMessageIdthrough REST, history and live rows; exposecreateClientMessageId()for custom optimistic UIs and accept the backend's HTTP 200 result for an identical retry.
0.3.1 #
- Include the minimum-Flutter test lint correction. The 0.3.0 publishing run stopped at validation; its tag is retained without moving or replacing it.
-
Automatically discover rotating private Broadcast topics and rejoin remaining room/app listeners after membership removal or reconnect. Requires the matching backend cutover; no retired-topic fallback or customer Supabase configuration.
-
Preserve optional server
Message.updatedAtrevisions for consistent reconciliation of REST responses and Realtime edits. Creation timestamps and device-local display behavior are unchanged. -
Add value-based
beforeCreatedAt/beforeIdhistory cursors so pagination stays stable when rows are inserted or the previous page's last row is deleted. -
Own a dedicated Supabase client per connected user. Do not initialize or modify the host app's global Supabase instance.
-
Coordinate proactive and 401-triggered renewal of both user and Realtime tokens, with single-flight refresh, bounded backoff and independent expiry.
-
Reject pending work on logout/reconfiguration/user switching; bind all upload stages to their initiating session and never retry storage PUTs implicitly.
-
Share private room channels across typing/read listeners and release channels when their final listener cancels. Refresh credentials after delayed joins.
-
Serialize channel cleanup/re-entry and recover unexpected provider channel closes without losing listeners; discard paused events after session retirement.
-
Keep Realtime authentication explicitly owned by ConvoKit, avoiding a provider async-callback bug that resends pending joins with empty references. Preserve the Supabase HTTP user-token callback and never substitute a project key.
-
Expose sanitized session/Realtime errors and per-topic connection events for reconnect reconciliation. HTTP 403/5xx/network failures do not replay writes.
-
Breaking: replace
MessageChangeType.deletewith the separateonMessageDeleted()/MessageDeletedEvent(id, conversationId)contract. Receive only the backend's private ID-only deletion broadcast, validate its room, and share typing/read channel lifecycle, errors and session disposal. Never subscribe to raw Postgres DELETE or fabricate old Message records. Explicit message deletion requires the coordinated backend release; missed events need REST reconciliation; cascade inbox discovery requires refresh/reopen. -
Require
supabase_flutter >=2.14.0 <3.0.0, Flutter >=3.19, and Dart >=3.3. The former dependency floor admitted releases missing the SDK's auth APIs. -
Validate minimum and current Flutter/dependency resolutions in CI and before publishing, including loopback tests using the actual Supabase WebSocket client. Live security smoke tests still require explicit staging fixtures.
0.2.0 #
- Use the Supabase publishable key discovered from the ConvoKit token service.
- Authenticate Realtime before joining private message, typing, read-receipt, and presence channels.
- Keep
connectUser, token-provider, and managed API endpoint interfaces unchanged.
0.0.4 #
- Use the managed
https://api.convokit.appendpoint by default. - Keep
backendUrlas an optional override for local testing and self-hosting.
0.0.3 #
- Breaking:
RealtimeService.onMessage()now returnsStream<MessageEvent>instead ofStream<Message>, and deliversUPDATE/DELETEevents onMessagein addition toINSERT. Switch onMessageEvent.typeand readMessageEvent.message. - Added automatic session keep-alive: the SDK refreshes the session proactively ahead of token expiry, and reactively (refresh-and-retry once) on any REST call that comes back 401.
- Added a typed error hierarchy:
ConvoKitExceptionis now a base type withConvoKitAuthException,ConvoKitNotFoundException,ConvoKitValidationException,ConvoKitServerException, andConvoKitNetworkExceptionsubtypes. - Added
ConvoKit.getUser()/ConvoKit.getUsers()and a newAppUsermodel for looking up app user profiles, includinglastSeenAt. - Added
ConvoKit.getMessage()to fetch a single message by id.
0.0.2 #
- Finalize R2 uploads with the backend before returning media URLs.
- Validate signed-upload object keys and surface upload-completion failures.
0.0.1 #
- Initial release of the ConvoKit Flutter SDK.
- Added SDK configuration, user connection, and token exchange helpers.
- Added conversation, message, realtime, presence, read receipt, typing, and media upload APIs.