@schemeless/event-store-types 3.0.0 → 3.0.4
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/Repo.types.d.ts +12 -0
- package/package.json +2 -2
package/dist/Repo.types.d.ts
CHANGED
|
@@ -26,12 +26,24 @@ export interface ISnapshotEntity<STATE = any> {
|
|
|
26
26
|
sequence: number;
|
|
27
27
|
created: Date;
|
|
28
28
|
}
|
|
29
|
+
export interface IEventStoreRepoCapabilities {
|
|
30
|
+
/**
|
|
31
|
+
* Supports aggregate reconstruction through eventStore.getAggregate().
|
|
32
|
+
* Requires getStreamEvents(domain, identifier, fromSequence).
|
|
33
|
+
*/
|
|
34
|
+
aggregate?: boolean;
|
|
35
|
+
}
|
|
29
36
|
export interface IEventStoreRepo<PAYLOAD = any, META = any> {
|
|
30
37
|
init: () => Promise<void>;
|
|
31
38
|
getAllEvents: (pageSize: number, startFromId?: string) => Promise<AsyncIterableIterator<Array<IEventStoreEntity<PAYLOAD, META>>>>;
|
|
32
39
|
createEventEntity: (event: CreatedEvent<any>) => IEventStoreEntity<PAYLOAD, META>;
|
|
33
40
|
storeEvents: (events: CreatedEvent<any>[], options?: StoreEventsOptions) => Promise<void>;
|
|
34
41
|
resetStore: () => Promise<void>;
|
|
42
|
+
/**
|
|
43
|
+
* Optional explicit capability declaration.
|
|
44
|
+
* If omitted, runtime infers support from implemented methods for backwards compatibility.
|
|
45
|
+
*/
|
|
46
|
+
capabilities?: IEventStoreRepoCapabilities;
|
|
35
47
|
/**
|
|
36
48
|
* Get events for a specific stream (domain + identifier).
|
|
37
49
|
* MUST use efficient index-based query (e.g., DynamoDB Query, SQL WHERE).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@schemeless/event-store-types",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.4",
|
|
4
4
|
"typescript:main": "src/index.ts",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -34,5 +34,5 @@
|
|
|
34
34
|
"publishConfig": {
|
|
35
35
|
"access": "public"
|
|
36
36
|
},
|
|
37
|
-
"gitHead": "
|
|
37
|
+
"gitHead": "b18c969cc721123da4e58f75885448d3cd697afd"
|
|
38
38
|
}
|