aquabase library

Classes

Aquabase
Entry point for the Aquabase SDK.
AquabaseAuth
AquabaseLogs
Client-side log collector with auto-batching over WebSocket.
AquabaseStorage
File operations for an Aquabase project. Buckets materialize automatically on the first authorized upload — there is no explicit createBucket. Whether a path is publicly readable is determined entirely by your storage rules.
AuthSession
BacklogError
Collection
Document
E2EClient
E2EFileEnvelope
FlushResult
Result of a queue flush attempt — tells the caller what happened.
IncomingRef
One dependent observed by the referential guard.
LocalSync
Device-to-device sync over the local network.
LogEntry
A log entry to push to the server.
LogQueryOptions
Query filter options for retrieving logs.
LogRecord
A log record returned from a query.
OAuthPairing
Hosted sign-in handed to the browser: url is what the user opens, secret is what redeems the resulting session. Only the digest of the secret travels, so nothing in the URL can claim the session.
QueryBuilder
QueryMeta
QueryPage
One page plus the cursor that reaches the next.
QuerySnapshot
The matching documents in plan order, plus the provenance of the answer. docs is unmodifiable: a watcher keeps the same snapshot it emitted, and a consumer mutating it would corrupt the comparison against the next one.
ReadError
A live observation the server never registered: this collection receives no events until it is accepted, and the next reconnect replays the request.
UploadResult
Result after uploading a file.
WriteError
A background write the server never accepted — unreachable, or rejected by the rules. The local value stands, except on a denial, which is reverted before this is reported.

Enums

BacklogErrorReason
LogLevel
Log severity levels matching the server's encoding.
OAuthProvider
QuerySource
Where a result came from. cache never means "the server said nothing", and local is not a cache at all: a local-only collection has no authority above the device, so its answer is complete by definition.
QueryState
RefPolicy
Referential policies declared in _console.indexes.

Extension Types

DocData
Typed reads over a decoded document. The representation is the decoded map — the wrapper is erased at compile time, so nothing is copied and no object is allocated to obtain one.
DocEntry
A document with its id. The id is the key a result is stored under, not a field, so it is lost once the document travels alone. Erased like DocData.

Constants

aquabaseDefaultServerUrl → const String
Central SDK configuration. Change the server URL here once — all clients (Aquabase, Auth, Storage, Logs) pick it up automatically.
e2eMaxFileBytes → const int
Default per-blob cap aligned with the server (1 GiB).
maxValueBytes → const int

Exceptions / Errors

AuthException
BacklogOverflowException
Thrown when a write cannot fit in the offline backlog. dropped reports how many writes were left out; nothing was partially queued.
GoogleNativeSignInException
Native Google sign-in could not run: the project has no Google provider enabled, the platform has no native sheet, or Google rejected the attempt. The message says which. Callers wanting a plan B can still drive the hosted flow themselves with startOAuthPairing / awaitOAuthPairing.
IndexFailedException
The backfill reached a terminal failure; the field will not become ready.
IndexRequiredException
The project schema does not declare an index the query needs.
RefGuardException
Thrown when a delete is blocked by ref_restrict dependents on the target.
StorageException
UniqueException
Thrown when a write would repeat a value a unique group already holds. holder is the key of the document that has it, fields the group in the order the manifest declares — the order its values were hashed in.
WsDeniedException
Thrown when the server denies access due to security rules. Permanent rejection — retrying is pointless for the current session.
WsException
WsOfflineException
The transport is down. The only remote failure a local scan may stand in for.