@astronautlabs/datastore
Advanced tools
@@ -26,2 +26,6 @@ import { Observable } from 'rxjs'; | ||
| } | ||
| export interface CollectionChange<T> { | ||
| type: 'added' | 'modified' | 'removed'; | ||
| document: T; | ||
| } | ||
| export interface DataStore { | ||
@@ -34,2 +38,3 @@ create<T extends Storable>(collectionPath: string, data: T): Promise<T>; | ||
| watchAll<T extends Storable>(collectionPath: string, params?: CollectionParams): Observable<T[]>; | ||
| watchForChanges<T extends Storable>(collectionPath: string, params?: CollectionParams): Observable<CollectionChange<T>[]>; | ||
| watch<T extends Storable>(docPath: string): Observable<T>; | ||
@@ -36,0 +41,0 @@ set<T extends Storable>(docPath: string, data: T): Promise<void>; |
+1
-1
| { | ||
| "name": "@astronautlabs/datastore", | ||
| "version": "3.0.0", | ||
| "version": "3.1.0", | ||
| "description": "Isomorphic, abstracted, Firestore-compatible NoSQL data storage library", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
+5
-0
@@ -32,2 +32,6 @@ import { Observable } from 'rxjs'; | ||
| export interface CollectionChange<T> { | ||
| type : 'added' | 'modified' | 'removed'; | ||
| document : T; | ||
| } | ||
| export interface DataStore { | ||
@@ -40,2 +44,3 @@ create<T extends Storable>(collectionPath : string, data : T): Promise<T>; | ||
| watchAll<T extends Storable>(collectionPath : string, params? : CollectionParams) : Observable<T[]>; | ||
| watchForChanges<T extends Storable>(collectionPath : string, params? : CollectionParams) : Observable<CollectionChange<T>[]>; | ||
| watch<T extends Storable>(docPath : string) : Observable<T>; | ||
@@ -42,0 +47,0 @@ set<T extends Storable>(docPath: string, data: T): Promise<void>; |
8745
5.72%146
7.35%