MultiStreamAppendRequest
API reference for MultiStreamAppendRequest
Type Alias: MultiStreamAppendRequest<EventType, StreamVersion>
Section titled “Type Alias: MultiStreamAppendRequest<EventType, StreamVersion>”MultiStreamAppendRequest<
EventType,StreamVersion> =object
One stream append inside an atomic multi-stream append operation.
Each request targets one stream and carries that stream’s own optimistic concurrency check. Duplicate stream IDs are rejected because the expected version would be ambiguous.
Example
Section titled “Example”{ streamId: 'order-123', events: [{ type: 'order.created', data: { orderId: '123' } }], expectedStreamVersion: 'no_stream'}Type Parameters
Section titled “Type Parameters”EventType
Section titled “EventType”EventType extends Event = Event
StreamVersion
Section titled “StreamVersion”StreamVersion = StreamPosition
Properties
Section titled “Properties”events
Section titled “events”events:
EventType[]
Events to append to this stream, in order.
expectedStreamVersion?
Section titled “expectedStreamVersion?”
optionalexpectedStreamVersion:ExpectedStreamVersion<StreamVersion>
Optimistic concurrency check for this stream only.
streamId
Section titled “streamId”streamId:
StreamId
The stream to append these events to. Cannot be __dcb__.