Docs Client library reference JavaScript
v0.2.6-alpha.3JavaScript: Introduction
This reference documents kizunasync, the kizunasync/supabase adapters, and the kizunasync/web browser ports. Together they are the JavaScript surface for local reads, local writes, sync, and attachments against a Supabase project that kizunasync init has provisioned.
Version#
kizunasync 0.2.6-alpha.3 (Alpha). npm package kizunasync, import paths kizunasync, kizunasync/supabase, and kizunasync/web. See Installing.
What this reference covers#
The shortest path through the tree is Initializing, then Fetch data and Insert data. The client syncs on its own from its first use, and Sync covers the few cases that call it directly.
| Section | Pages |
|---|---|
| Config | Define config declares the synced tables, their buckets and attachment columns, and the options every run reads. |
| Database | Fetch data, Insert data, Update data, Delete data, Using filters, Using transforms. |
| Sync | Sync, Pull once, Push once, Set bucket, Checkpoint, Outbox depth, Sync health, Reset. |
| Auth session | Set access token. |
| Rejections | List rejections, Dismiss a rejection. |
| Overwrites | List overwrites, Dismiss an overwrite. |
| Events | Subscribe to events. |
| Attachments | Attach a file, Resolve a download, Get attachment status, Watch an attachment, Retry an attachment, Cancel an attachment, Remove an attachment, Vacuum attachments. |
| Supabase adapters | Create the RPC remote, Create the Storage transfer, Upload with TUS, Create the Realtime wakeup, Create the document foreground, Recover an anonymous session, Wait with a deadline. |
| Browser driver | Open the browser driver, Browser connectivity, Browser file store, Build integration. |
| Inspector | Inspector. |
| Types | Types. |
The React and Vue bindings wrap this same client: see React: Introduction and Vue: Introduction. Expo and React Native replace the browser ports with Expo: Introduction.
What Supabase covers#
| Concern | Use |
|---|---|
| Sign-in, sessions, and JWT refresh | signInWithPassword, whose session the adapters read before every pull and push |
| Row Level Security policies | Row Level Security, applied server-side when a queued write is pushed |
| Realtime channels behind the wake-up doorbell | subscribe, wrapped by Create the Realtime wakeup |
| Storage buckets outside the attachment path | upload, while attachment bytes travel through Create the Storage transfer |
Related reference#
Found a problem? Edit this page on GitHub