Skip to content

Commit 4ed143b

Browse files
committed
feat: add storage specification abstract class
1 parent e018910 commit 4ed143b

File tree

2 files changed

+43
-0
lines changed

2 files changed

+43
-0
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/**
2+
* SPECIFICATION
3+
*
4+
* Baseline Storage Specification, used for storing and managing logs
5+
*/
6+
7+
export declare class StorageSpec<T, K> {
8+
/**
9+
* Build a new storage driver
10+
*
11+
* @param {...any[]} props
12+
* @returns Promise<StorageSpec>
13+
*/
14+
15+
public static build<T, K>(...props: any[]): Promise<StorageSpec<T, K>>;
16+
17+
/**
18+
* Create a new entry in the storage
19+
*
20+
* @param body
21+
* @returns Promise<K>
22+
*/
23+
24+
public create(body: T): Promise<K>;
25+
26+
/**
27+
* Find one entry in the storage using partial of K
28+
*
29+
* @param {Partial<K>} options
30+
* @returns Promise<K>
31+
*/
32+
33+
public findOne(options: Partial<K>): Promise<K>;
34+
35+
/**
36+
* Find many entities in the storage using partial of K
37+
*
38+
* @param {Partial<K>} options
39+
* @returns Promise<K[]>
40+
*/
41+
42+
public findMany(options: Partial<K>): Promise<K[]>;
43+
}

infrastructure/w3id/src/logs/store.ts

Whitespace-only changes.

0 commit comments

Comments
 (0)