@syncular/client 0.15.48 → 0.16.1

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.
@@ -20,13 +20,11 @@ import type { WakeReason } from '@syncular/core';
20
20
  import type { BlobRef, CachedBlob } from './blob';
21
21
  import type {
22
22
  ConflictRecord,
23
- LeaseState,
23
+ ClientSnapshotMethods,
24
24
  MutationInput,
25
25
  PresencePeer,
26
26
  QueryReadSpec,
27
27
  QuerySnapshot,
28
- RejectionRecord,
29
- SchemaFloor,
30
28
  SecurityLifecycle,
31
29
  SubscribeInput,
32
30
  SyncClientLimits,
@@ -34,27 +32,15 @@ import type {
34
32
  WindowState,
35
33
  } from './client';
36
34
  import type { SqlRow, SqlValue } from './database';
37
- import type {
38
- ClientDiagnosticsRequest,
39
- ClientDiagnosticsSnapshot,
40
- } from './diagnostics';
35
+ import type { ClientDiagnosticsSnapshot } from './diagnostics';
41
36
  import type { EncryptionKeyringConfig } from './encryption';
42
- import type {
43
- ClientChangeBatch,
44
- LocalRevision,
45
- SyncStatusSnapshot,
46
- } from './invalidation';
37
+ import type { ClientChangeBatch, LocalRevision } from './invalidation';
47
38
  import type { LocalDataPurgeInput, LocalDataPurgeResult } from './local-purge';
48
39
  import type {
49
40
  LocalDataRebootstrapInput,
50
41
  LocalDataRebootstrapResult,
51
42
  } from './local-rebootstrap';
52
43
  import type { OutboxCommit } from './outbox';
53
- import type {
54
- CommitOutcome,
55
- CommitOutcomeQuery,
56
- ResolveCommitOutcomeInput,
57
- } from './outcomes';
58
44
  import type { ClientSchema } from './schema';
59
45
  import type { SubscriptionRecord } from './state';
60
46
  import type { WindowBase } from './window';
@@ -137,7 +123,10 @@ export interface WorkerSecurityActivation {
137
123
  // The logical API — the one shared shape (worker implements, handle projects)
138
124
  // ---------------------------------------------------------------------------
139
125
 
140
- export interface WorkerApi {
126
+ export interface WorkerApi extends Omit<
127
+ ClientSnapshotMethods,
128
+ 'querySnapshot'
129
+ > {
141
130
  securityLifecycle(): SecurityLifecycle;
142
131
  beginSecurityPreflight(): Promise<void>;
143
132
  activateSecurity(options?: WorkerSecurityActivation): Promise<void>;
@@ -166,21 +155,6 @@ export interface WorkerApi {
166
155
  query(sql: string, params?: readonly SqlValue[]): SqlRow[];
167
156
  querySnapshot(spec: QueryReadSpec): QuerySnapshot;
168
157
  localRevision(): LocalRevision;
169
- statusSnapshot(): SyncStatusSnapshot;
170
- diagnosticsSnapshot(
171
- request?: ClientDiagnosticsRequest,
172
- ): ClientDiagnosticsSnapshot;
173
- conflicts(): readonly ConflictRecord[];
174
- rejections(): readonly RejectionRecord[];
175
- commitOutcome(clientCommitId: string): CommitOutcome | undefined;
176
- commitOutcomes(query?: CommitOutcomeQuery): readonly CommitOutcome[];
177
- resolveCommitOutcome(input: ResolveCommitOutcomeInput): CommitOutcome;
178
- schemaFloor(): SchemaFloor | undefined;
179
- /** §7.3.5: the opaque auth-lease state, or undefined. */
180
- leaseState(): LeaseState | undefined;
181
- /** §7.4.5: true while a schema-bump reset + first re-bootstrap runs. */
182
- upgrading(): boolean;
183
- syncNeeded(): boolean;
184
158
  pendingCommits(): OutboxCommit[];
185
159
  subscriptions(): SubscriptionRecord[];
186
160
  subscription(id: string): SubscriptionRecord | undefined;
@@ -1,8 +0,0 @@
1
- /**
2
- * Preserve supervisor observation across a facade without transferring
3
- * transport ownership or exposing the source client. Binding packages use
4
- * this when they normalize a client into another object identity.
5
- */
6
- export declare function linkRealtimeSupervisorObservation<Target extends object>(target: Target, source: object): Target;
7
- /** @internal Resolve one facade hop for the supervisor attachment lookup. */
8
- export declare function realtimeSupervisorObservationSource(target: object): object | undefined;
@@ -1,15 +0,0 @@
1
- const observationSources = new WeakMap();
2
- /**
3
- * Preserve supervisor observation across a facade without transferring
4
- * transport ownership or exposing the source client. Binding packages use
5
- * this when they normalize a client into another object identity.
6
- */
7
- export function linkRealtimeSupervisorObservation(target, source) {
8
- if (target !== source)
9
- observationSources.set(target, source);
10
- return target;
11
- }
12
- /** @internal Resolve one facade hop for the supervisor attachment lookup. */
13
- export function realtimeSupervisorObservationSource(target) {
14
- return observationSources.get(target);
15
- }
@@ -1,21 +0,0 @@
1
- const observationSources = new WeakMap<object, object>();
2
-
3
- /**
4
- * Preserve supervisor observation across a facade without transferring
5
- * transport ownership or exposing the source client. Binding packages use
6
- * this when they normalize a client into another object identity.
7
- */
8
- export function linkRealtimeSupervisorObservation<Target extends object>(
9
- target: Target,
10
- source: object,
11
- ): Target {
12
- if (target !== source) observationSources.set(target, source);
13
- return target;
14
- }
15
-
16
- /** @internal Resolve one facade hop for the supervisor attachment lookup. */
17
- export function realtimeSupervisorObservationSource(
18
- target: object,
19
- ): object | undefined {
20
- return observationSources.get(target);
21
- }