genosdb 0.23.3 → 0.24.0

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.
Binary file
package/dist/index.d.ts CHANGED
@@ -100,9 +100,16 @@ declare module "genosdb" {
100
100
  // ── Room (GenosRTC) ────────────────────────────────────────────────
101
101
 
102
102
  export interface RoomChannel<T = any> {
103
- /** Send data to all peers, or to specific peer ids. */
104
- send(data: T, targets?: string | string[]): void
105
- on(event: "message", handler: (data: T, peerId: string) => void): void
103
+ /** Send to all peers or specific ids. `meta` requires a binary payload. */
104
+ send(
105
+ data: T,
106
+ targets?: string | string[],
107
+ meta?: Record<string, any>,
108
+ onProgress?: (fraction: number, peerId: string, meta?: any) => void
109
+ ): void
110
+ on(event: "message", handler: (data: T, peerId: string, meta?: any) => void): void
111
+ /** Incoming payload still arriving. `fraction` runs 0 → 1. */
112
+ on(event: "progress", handler: (fraction: number, peerId: string, meta?: any) => void): void
106
113
  off(event: string, handler: (...args: any[]) => void): void
107
114
  }
108
115
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "genosdb",
3
- "version": "0.23.3",
3
+ "version": "0.24.0",
4
4
  "description": "GenosDB (GDB): distributed graph database in real-time, peer-to-peer, scalable storage - efficient querying of complex relationships.",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",