@acuris/eventstore-api
Advanced tools
Comparing version 1.3.8 to 2.0.0
{ | ||
"name": "@acuris/eventstore-api", | ||
"private": false, | ||
"version": "1.3.8", | ||
"version": "2.0.0", | ||
"description": "API for accessing event stores", | ||
@@ -30,3 +30,3 @@ "keywords": [ | ||
"jest": "^26.4.2", | ||
"rxjs": "^6.6.6", | ||
"rxjs": "^7.1.0", | ||
"ts-jest": "^26.5.0", | ||
@@ -36,3 +36,3 @@ "typescript": "^4.0.3" | ||
"peerDependencies": { | ||
"rxjs": ">= 6.6.6" | ||
"rxjs": ">= 7.1.0" | ||
}, | ||
@@ -39,0 +39,0 @@ "jest": { |
@@ -14,5 +14,6 @@ # Eventstore API | ||
async function listTransactionHistory(transactionId: string, eventSource: EventSource): Promise<{timestamp: Date, data: Transaction}> { | ||
return eventSource.streamReader.readStreamForwards({category: "transaction", id: transactionId}) | ||
.pipe(toArray(), map(re => ({timestamp: re.event.timestamp, data: re.event.data as Transaction}))) | ||
.toPromise() | ||
return lastValueFrom( | ||
eventSource.streamReader.readStreamForwards({category: "transaction", id: transactionId}) | ||
.pipe(toArray(), map(re => ({timestamp: re.event.timestamp, data: re.event.data as Transaction}))) | ||
) | ||
} | ||
@@ -19,0 +20,0 @@ ``` |
18976
36