@syncular/tauri 0.15.26 → 0.15.28

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.
package/README.md CHANGED
@@ -28,6 +28,15 @@ for validating the server-authoritative directive, gating subscriptions before
28
28
  the purge, deleting app-owned drafts/files, and removing the corresponding key
29
29
  from the OS secure store after SQLite cleanup succeeds.
30
30
 
31
+ For support-directed projection recovery, the bridge also exposes
32
+ `rebootstrapLocalData({ rebootstrapId })`. It atomically recreates only synced
33
+ projection tables, rewinds retained subscriptions, replays the complete
34
+ outbox, and requests a fresh bootstrap while preserving device identity,
35
+ lease state, outcomes, and protected bookkeeping. The result contains only
36
+ `alreadyApplied`, `retainedCommits`, and `resetSubscriptions`. It is blocked
37
+ during security preflight and an active schema-floor stop; it is not a sign-out
38
+ or secure-erasure API.
39
+
31
40
  ## Secure preflight and native disposal
32
41
 
33
42
  Create with `securityPreflight: true` when authentication, signed device
package/dist/index.d.ts CHANGED
@@ -26,7 +26,7 @@
26
26
  * `invoke`/`listen` either from its ESM entry points, from the ambient
27
27
  * `window.__TAURI__`, or via injected doubles (tests).
28
28
  */
29
- import type { ClientChangeListener, ClientDiagnosticsListener, ClientDiagnosticsRequest, ClientDiagnosticsSnapshot, CommitOutcome, CommitOutcomeQuery, ConflictRecord, EncryptionKeyringConfig, InvalidationListener, LeaseState, LocalDataPurgeInput, LocalDataPurgeResult, MutationInput, PresencePeer, QueryReadSpec, QuerySnapshot, RejectionRecord, ResolveCommitOutcomeInput, SchemaFloor, SecurityLifecycle, SqlRow, SqlValue, SyncStatusSnapshot, WindowBase, WindowState } from '@syncular/client';
29
+ import type { ClientChangeListener, ClientDiagnosticsListener, ClientDiagnosticsRequest, ClientDiagnosticsSnapshot, CommitOutcome, CommitOutcomeQuery, ConflictRecord, EncryptionKeyringConfig, InvalidationListener, LeaseState, LocalDataPurgeInput, LocalDataPurgeResult, LocalDataRebootstrapInput, LocalDataRebootstrapResult, MutationInput, PresencePeer, QueryReadSpec, QuerySnapshot, RejectionRecord, ResolveCommitOutcomeInput, SchemaFloor, SecurityLifecycle, SqlRow, SqlValue, SyncStatusSnapshot, WindowBase, WindowState } from '@syncular/client';
30
30
  /** One event pushed on `syncular://event` (the derived client-observable set). */
31
31
  interface SyncularEvent {
32
32
  readonly type: string;
@@ -101,6 +101,7 @@ export declare class TauriSyncClient {
101
101
  readonly baseVersion?: number;
102
102
  }): Promise<string>;
103
103
  purgeLocalData(input: LocalDataPurgeInput): Promise<LocalDataPurgeResult>;
104
+ rebootstrapLocalData(input: LocalDataRebootstrapInput): Promise<LocalDataRebootstrapResult>;
104
105
  /**
105
106
  * Replace the native transport's request headers at runtime — the auth
106
107
  * rotation path (RFC 0002 §2.3). Pass the FULL header set (it replaces,
package/dist/index.js CHANGED
@@ -370,6 +370,16 @@ export class TauriSyncClient {
370
370
  input,
371
371
  }));
372
372
  }
373
+ async rebootstrapLocalData(input) {
374
+ const result = (await this.#command('rebootstrapLocalData', {
375
+ input,
376
+ }));
377
+ return {
378
+ alreadyApplied: result.alreadyApplied,
379
+ retainedCommits: result.retainedCommits,
380
+ resetSubscriptions: result.resetSubscriptions,
381
+ };
382
+ }
373
383
  /**
374
384
  * Replace the native transport's request headers at runtime — the auth
375
385
  * rotation path (RFC 0002 §2.3). Pass the FULL header set (it replaces,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@syncular/tauri",
3
- "version": "0.15.26",
3
+ "version": "0.15.28",
4
4
  "description": "Tauri integration for the Syncular client",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Benjamin Kniffler",
@@ -48,12 +48,12 @@
48
48
  "test": "bun test"
49
49
  },
50
50
  "dependencies": {
51
- "@syncular/client": "0.15.26"
51
+ "@syncular/client": "0.15.28"
52
52
  },
53
53
  "peerDependencies": {
54
54
  "@tauri-apps/api": ">=2.0.0"
55
55
  },
56
56
  "devDependencies": {
57
- "@syncular/react": "0.15.26"
57
+ "@syncular/react": "0.15.28"
58
58
  }
59
59
  }
package/src/index.ts CHANGED
@@ -42,6 +42,8 @@ import type {
42
42
  LeaseState,
43
43
  LocalDataPurgeInput,
44
44
  LocalDataPurgeResult,
45
+ LocalDataRebootstrapInput,
46
+ LocalDataRebootstrapResult,
45
47
  MutationInput,
46
48
  PresencePeer,
47
49
  QueryReadSpec,
@@ -539,6 +541,19 @@ export class TauriSyncClient {
539
541
  })) as LocalDataPurgeResult;
540
542
  }
541
543
 
544
+ async rebootstrapLocalData(
545
+ input: LocalDataRebootstrapInput,
546
+ ): Promise<LocalDataRebootstrapResult> {
547
+ const result = (await this.#command('rebootstrapLocalData', {
548
+ input,
549
+ })) as LocalDataRebootstrapResult;
550
+ return {
551
+ alreadyApplied: result.alreadyApplied,
552
+ retainedCommits: result.retainedCommits,
553
+ resetSubscriptions: result.resetSubscriptions,
554
+ };
555
+ }
556
+
542
557
  /**
543
558
  * Replace the native transport's request headers at runtime — the auth
544
559
  * rotation path (RFC 0002 §2.3). Pass the FULL header set (it replaces,