mortar library

Compatibility entrypoint. Prefer package:mortar_client/mortar_client.dart.

Classes

AccountClient
AccountInfo
AccountTokenResponse
Analytics
APIKeyCreated
APIKeyView
Auth
AuthResponse
AuthSubscription
Returned by Auth.onAuthStateChange — call unsubscribe to stop listening.
BroadcastEvent
Payload handed to a broadcast handler.
Channel
A collaboration channel. Receive over one SSE connection; send over plain HTTP POST/DELETE (keeps Mortar's SSE-not-WebSocket transport). Build it via Realtime.channel.
ClientOptions
Configuration for the project-scope client (uses an API key).
Compute
DatabaseTransactionOperation
One operation in a trusted, cross-table PostgreSQL transaction.
DatabaseTransactionResult
One ordered result returned by DatabaseTransactions.execute.
DatabaseTransactions
Execute row writes across multiple tables, plus PostgreSQL queue enqueue, in one ACID transaction. External effects such as object storage and HTTP calls are intentionally outside this boundary.
FileView
File metadata view.
MeResponse
The current end-user profile, returned by GET /auth/me.
MortarClient
MortarFilterBuilder
Chainable select / update / delete builder. Accumulates PostgREST-style filters + modifiers and runs on await (it is awaitable via then).
MortarInsertBuilder
Chainable insert / upsert builder. await it to run; it resolves to the created flat rows. Construct via from(table).insert(...).
MortarSession
A session — supabase Session shape (the fields Mortar carries).
MortarUser
The signed-in end-user (the fields Mortar carries) — supabase User shape.
OAuthProviderConfiguration
OAuthProviderConnection
OtpStartResponse
Result of an OTP-send (phone/email start).
PostgresChangesPayload
Payload handed to a postgres_changes handler — supabase-shaped. Mortar's row-change event {op, id, data} maps to this {eventType, new, old, schema, table} so AI-generated app code (which reaches for the Supabase shape) runs verbatim.
PresenceDiff
Payload handed to a presence join / leave handler.
PresenceEntry
One member's presence entry as seen by other clients on a channel.
ProjectInfo
Realtime
RealtimeEvent
A change event emitted by the realtime SSE stream.
Row
A row returned by the dynamic-table API.
Storage
StorageBucket
supabase-dart StorageFileApi shape over Mortar storage. Every method returns its data directly and THROWS MortarApiError on error (the supabase-dart idiom — no {data,error} envelope). Build via mortar.storage.from(bucket).
Subscription
Table
Operations on a single table. Constructed via mortar.from(name). Returns FLAT rows (Supabase shape): your fields plus id / created_at / updated_at at the top level.
TopupResponse
UsageSummary
Usage / credit summary returned by /v1/usage/me.

Enums

AuthChangeEvent
Auth-state change events — supabase AuthChangeEvent (the subset Mortar emits).
ChannelStatus
Connection status emitted by a realtime subscription / channel. subscribed fires on each (re)connect, channelError on a connection error, closed when unsubscribed — the Supabase realtime channel-status triad.
MortarTableAction
OAuthProvider

Exceptions / Errors

MortarApiError
Canonical error thrown by Mortar SDK operations.