@anfenn/dync 1.0.1 → 1.0.2

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/dist/index.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- export { A as AfterRemoteAddCallback, a as ApiFunctions, d as BatchFirstLoadResult, b as BatchPushPayload, c as BatchPushResult, B as BatchSync, C as ConflictResolutionStrategy, D as Dync, F as FirstLoadProgress, e as FirstLoadProgressCallback, f as MissingRemoteRecordDuringUpdateCallback, M as MissingRemoteRecordStrategy, g as MutationEvent, S as SyncAction, h as SyncOptions, i as SyncState, j as SyncedRecord, T as TableMap } from './index.shared-YSn6c01d.cjs';
1
+ export { A as AfterRemoteAddCallback, a as ApiFunctions, d as BatchFirstLoadResult, b as BatchPushPayload, c as BatchPushResult, B as BatchSync, C as ConflictResolutionStrategy, D as Dync, F as FirstLoadProgress, e as FirstLoadProgressCallback, f as MissingRemoteRecordDuringUpdateCallback, M as MissingRemoteRecordStrategy, g as MutationEvent, S as SyncAction, h as SyncOptions, i as SyncState, j as SyncedRecord, T as TableMap } from './index.shared-BGwvMH8f.cjs';
2
2
  export { M as MemoryAdapter, a as MemoryQueryContext, S as SQLiteAdapter, b as SqliteQueryContext, c as StorageAdapter } from './dexie-Bv-fV10P.cjs';
3
3
  export { S as SQLiteDatabaseDriver, b as SQLiteQueryResult, a as SQLiteRunResult } from './types-CSbIAfu2.cjs';
4
4
  import 'dexie';
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { A as AfterRemoteAddCallback, a as ApiFunctions, d as BatchFirstLoadResult, b as BatchPushPayload, c as BatchPushResult, B as BatchSync, C as ConflictResolutionStrategy, D as Dync, F as FirstLoadProgress, e as FirstLoadProgressCallback, f as MissingRemoteRecordDuringUpdateCallback, M as MissingRemoteRecordStrategy, g as MutationEvent, S as SyncAction, h as SyncOptions, i as SyncState, j as SyncedRecord, T as TableMap } from './index.shared-CPIge2ZM.js';
1
+ export { A as AfterRemoteAddCallback, a as ApiFunctions, d as BatchFirstLoadResult, b as BatchPushPayload, c as BatchPushResult, B as BatchSync, C as ConflictResolutionStrategy, D as Dync, F as FirstLoadProgress, e as FirstLoadProgressCallback, f as MissingRemoteRecordDuringUpdateCallback, M as MissingRemoteRecordStrategy, g as MutationEvent, S as SyncAction, h as SyncOptions, i as SyncState, j as SyncedRecord, T as TableMap } from './index.shared-CkYsQYyn.js';
2
2
  export { M as MemoryAdapter, a as MemoryQueryContext, S as SQLiteAdapter, b as SqliteQueryContext, c as StorageAdapter } from './dexie-DJFApKsM.js';
3
3
  export { S as SQLiteDatabaseDriver, b as SQLiteQueryResult, a as SQLiteRunResult } from './types-CSbIAfu2.js';
4
4
  import 'dexie';
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  SqliteQueryContext,
7
7
  SyncAction,
8
8
  createLocalId
9
- } from "./chunk-LGHOZECP.js";
9
+ } from "./chunk-66PSQW4D.js";
10
10
  import "./chunk-SQB6E7V2.js";
11
11
  export {
12
12
  Dync,
@@ -79,7 +79,7 @@ interface BatchSync {
79
79
  }
80
80
  type MissingRemoteRecordStrategy = 'ignore' | 'delete-local-record' | 'insert-remote-record';
81
81
  type ConflictResolutionStrategy = 'local-wins' | 'remote-wins' | 'try-shallow-merge';
82
- type AfterRemoteAddCallback = (stateKey: string, item: SyncedRecord) => void;
82
+ type AfterRemoteAddCallback = (tableName: string, item: SyncedRecord) => void;
83
83
  type MissingRemoteRecordDuringUpdateCallback = (strategy: MissingRemoteRecordStrategy, item: SyncedRecord) => void;
84
84
  interface SyncOptions {
85
85
  syncInterval?: number;
@@ -129,7 +129,7 @@ declare enum SyncAction {
129
129
  }
130
130
  interface PendingChange {
131
131
  action: SyncAction;
132
- stateKey: string;
132
+ tableName: string;
133
133
  localId: string;
134
134
  id?: any;
135
135
  version: number;
@@ -138,7 +138,7 @@ interface PendingChange {
138
138
  after?: any;
139
139
  }
140
140
  interface Conflict {
141
- stateKey: string;
141
+ tableName: string;
142
142
  fields: FieldConflict[];
143
143
  }
144
144
  interface FieldConflict {
@@ -79,7 +79,7 @@ interface BatchSync {
79
79
  }
80
80
  type MissingRemoteRecordStrategy = 'ignore' | 'delete-local-record' | 'insert-remote-record';
81
81
  type ConflictResolutionStrategy = 'local-wins' | 'remote-wins' | 'try-shallow-merge';
82
- type AfterRemoteAddCallback = (stateKey: string, item: SyncedRecord) => void;
82
+ type AfterRemoteAddCallback = (tableName: string, item: SyncedRecord) => void;
83
83
  type MissingRemoteRecordDuringUpdateCallback = (strategy: MissingRemoteRecordStrategy, item: SyncedRecord) => void;
84
84
  interface SyncOptions {
85
85
  syncInterval?: number;
@@ -129,7 +129,7 @@ declare enum SyncAction {
129
129
  }
130
130
  interface PendingChange {
131
131
  action: SyncAction;
132
- stateKey: string;
132
+ tableName: string;
133
133
  localId: string;
134
134
  id?: any;
135
135
  version: number;
@@ -138,7 +138,7 @@ interface PendingChange {
138
138
  after?: any;
139
139
  }
140
140
  interface Conflict {
141
- stateKey: string;
141
+ tableName: string;
142
142
  fields: FieldConflict[];
143
143
  }
144
144
  interface FieldConflict {