| 28 | import { typedKeys } from "./utils/object"; |
| 29 | |
| 30 | export interface EntityStorePublicMethods<Data, View> { |
| 31 | query: ( |
| 32 | filter: FindInput<Data, View>, |
| 33 | sort?: EntityQuerySortFunction<Data, View> |
| 34 | ) => Collection<Data, View>; |
| 35 | |
| 36 | sort: (sort: EntityQuerySortInput<Data, View>) => Collection<Data, View>; |
| 37 | |
| 38 | findById(id: string): Entity<Data, View> | null; |
| 39 | remove(id: string): boolean; |
| 40 | update(id: string, data: Partial<Data>): EntityUpdatedEvent<Data, View>; |
| 41 | find(filter: FindInput<Data, View>): Entity<Data, View>[]; |
| 42 | findFirst(filter: FindInput<Data, View>): Entity<Data, View> | null; |
| 43 | |
| 44 | readonly all: Entity<Data, View>[]; |
| 45 | } |
| 46 | |
| 47 | export interface EntityStore<Data, View> |
| 48 | extends EntityStorePublicMethods<Data, View> { |
no outgoing calls
no test coverage detected