cry-synced-db-client 0.1.51 → 0.1.52

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.js CHANGED
@@ -1282,7 +1282,7 @@ class SyncedDb {
1282
1282
  type,
1283
1283
  message,
1284
1284
  error,
1285
- timestamp: new Date
1285
+ timestamp: Date.now()
1286
1286
  });
1287
1287
  } catch (err) {
1288
1288
  console.error("onInfrastructureError callback failed:", err);
@@ -51,8 +51,6 @@ export interface I_DexieDb {
51
51
  deleteOne(collection: string, id: Id): Promise<void>;
52
52
  /** Izbriše več objektov iz kolekcije (batch) */
53
53
  deleteMany(collection: string, ids: Id[]): Promise<void>;
54
- /** Shrani celotno kolekcijo (nadomesti obstoječo) */
55
- saveCollection<T extends LocalDbEntity>(collection: string, data: T[]): Promise<void>;
56
54
  /** Izbriše celotno kolekcijo */
57
55
  deleteCollection(collection: string): Promise<void>;
58
56
  /** Vrne objekt po ID-ju */
@@ -61,8 +59,6 @@ export interface I_DexieDb {
61
59
  getByIds<T extends LocalDbEntity>(collection: string, ids: Id[]): Promise<(T | undefined)[]>;
62
60
  /** Vrne vse objekte v kolekciji */
63
61
  getAll<T extends LocalDbEntity>(collection: string): Promise<T[]>;
64
- /** Vrne število objektov v kolekciji */
65
- count(collection: string): Promise<number>;
66
62
  /** Vrne vse dirty objekte (z lokalnimi spremembami) - returns only changed fields + _id + metadata */
67
63
  getDirty<T extends LocalDbEntity>(collection: string): Promise<Partial<T>[]>;
68
64
  /** Add or accumulate changes for a record */
@@ -4,14 +4,8 @@ import type { Id, DbEntity } from "./DbEntity";
4
4
  * UI samo bere iz te baze, posodablja jo samo sync-db
5
5
  */
6
6
  export interface I_InMemDb {
7
- /** Shrani/posodobi objekt v kolekciji */
8
- save<T extends DbEntity>(collection: string, id: Id, data: Partial<T>): void;
9
7
  /** Shrani/posodobi več objektov naenkrat (bulk upsert) */
10
8
  saveMany<T extends DbEntity>(collection: string, items: T[]): void;
11
- /** Vstavi nov objekt v kolekcijo */
12
- insert<T extends DbEntity>(collection: string, data: T): void;
13
- /** Izbriše objekt iz kolekcije */
14
- deleteOne(collection: string, id: Id): void;
15
9
  /** Izbriše več objektov iz kolekcije po ID-jih */
16
10
  deleteManyByIds(collection: string, ids: Id[]): void;
17
11
  /** Shrani celotno kolekcijo (nadomesti obstoječo) */
@@ -22,6 +16,4 @@ export interface I_InMemDb {
22
16
  getById<T extends DbEntity>(collection: string, id: Id): T | undefined;
23
17
  /** Vrne vse objekte v kolekciji */
24
18
  getAll<T extends DbEntity>(collection: string): T[];
25
- /** Vrne število objektov v kolekciji */
26
- count(collection: string): number;
27
19
  }
@@ -31,8 +31,8 @@ export interface InfrastructureErrorInfo {
31
31
  message: string;
32
32
  /** Original error if available */
33
33
  error?: Error;
34
- /** Timestamp when error occurred */
35
- timestamp: Date;
34
+ /** Timestamp when error occurred (ms since epoch) */
35
+ timestamp: number;
36
36
  }
37
37
  /**
38
38
  * Callback payload for server write requests (before sending)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cry-synced-db-client",
3
- "version": "0.1.51",
3
+ "version": "0.1.52",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",