@syncular/client 0.15.45 → 0.15.47

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,6 @@
1
+ import { openBunDatabase } from './bun-database';
2
+ import type { ClientDatabase } from './database';
3
+
4
+ export function openSqliteDatabase(path = ':memory:'): ClientDatabase {
5
+ return openBunDatabase(path);
6
+ }
@@ -0,0 +1,6 @@
1
+ import type { ClientDatabase } from './database';
2
+ import { openNodeDatabase } from './node-database';
3
+
4
+ export function openSqliteDatabase(path = ':memory:'): ClientDatabase {
5
+ return openNodeDatabase(path);
6
+ }
package/src/transport.ts CHANGED
@@ -8,6 +8,25 @@
8
8
  /** One combined push+pull round trip: SSP2 request bytes → response bytes. */
9
9
  export type SyncTransport = (request: Uint8Array) => Promise<Uint8Array>;
10
10
 
11
+ /** One registered authoritative query or command request. */
12
+ export type RemoteOperationTransport = (
13
+ request: Uint8Array,
14
+ ) => Promise<Uint8Array>;
15
+
16
+ export interface RemoteOperationRealtimeHandlers {
17
+ onMessage(bytes: Uint8Array): void;
18
+ onClose?(): void;
19
+ }
20
+
21
+ export interface RemoteOperationRealtimeSocket {
22
+ send(bytes: Uint8Array): void;
23
+ close(): void;
24
+ }
25
+
26
+ export type RemoteOperationRealtimeConnector = (
27
+ handlers: RemoteOperationRealtimeHandlers,
28
+ ) => RemoteOperationRealtimeSocket | Promise<RemoteOperationRealtimeSocket>;
29
+
11
30
  export interface SegmentFetchRequest {
12
31
  readonly segmentId: string;
13
32
  readonly table: string;