@acuris/eventstore-api
Advanced tools
Comparing version 1.1.2 to 1.1.3
import { Observable } from "rxjs"; | ||
export interface EventSource { | ||
storeReader: EventReader; | ||
streamReader: EventStreamReader; | ||
streamWriter: EventStreamWriter; | ||
readonly storeReader: EventReader; | ||
readonly streamReader: EventStreamReader; | ||
readonly streamWriter: EventStreamWriter; | ||
} | ||
export interface EventReader { | ||
readAllForwards(positionExclusive?: Position): Observable<ResolvedEvent>; | ||
emptyStorePosition: Position; | ||
positionCodec: PositionCodec; | ||
readonly emptyStorePosition: Position; | ||
readonly positionCodec: PositionCodec; | ||
} | ||
export interface EventStreamReader { | ||
readStreamForwards(streamId: StreamId, after?: number): Observable<ResolvedEvent>; | ||
positionCodec: PositionCodec; | ||
readonly positionCodec: PositionCodec; | ||
} | ||
@@ -25,16 +25,16 @@ export interface EventStreamWriter { | ||
export interface EventRecord { | ||
streamId: StreamId; | ||
eventNumber: number; | ||
timestamp: Date; | ||
type: string; | ||
data: any; | ||
readonly streamId: StreamId; | ||
readonly eventNumber: number; | ||
readonly timestamp: Date; | ||
readonly type: string; | ||
readonly data: any; | ||
} | ||
export declare const EmptyStreamEventNumber = -1; | ||
export interface ResolvedEvent { | ||
position: Position; | ||
event: EventRecord; | ||
readonly position: Position; | ||
readonly event: EventRecord; | ||
} | ||
export interface NewEvent { | ||
type: string; | ||
data: any; | ||
readonly type: string; | ||
readonly data: any; | ||
} | ||
@@ -44,4 +44,4 @@ export interface Position { | ||
export interface StreamId { | ||
category: string; | ||
id: string; | ||
readonly category: string; | ||
readonly id: string; | ||
} |
{ | ||
"name": "@acuris/eventstore-api", | ||
"private": false, | ||
"version": "1.1.2", | ||
"version": "1.1.3", | ||
"description": "API for accessing event stores", | ||
@@ -6,0 +6,0 @@ "keywords": [ |
9686