Skip to content

MultiStreamAppendRequest

API reference for MultiStreamAppendRequest

@delta-base/toolkit


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.

{
streamId: 'order-123',
events: [{ type: 'order.created', data: { orderId: '123' } }],
expectedStreamVersion: 'no_stream'
}

EventType extends Event = Event

StreamVersion = StreamPosition

events: EventType[]

Events to append to this stream, in order.


optional expectedStreamVersion: ExpectedStreamVersion<StreamVersion>

Optimistic concurrency check for this stream only.


streamId: StreamId

The stream to append these events to. Cannot be __dcb__.