Interface: EffectPaginator<TItem>
The Effect API is an opt-in subpath (@camunda8/orchestration-cluster-api/effect) and requires the optional effect peer dependency. The main . entry stays Promise-based and pulls in zero Effect at runtime.
The Effect-flavoured counterpart of a Paginator: the same three views
(pages / items / toArray) over a multi-page search, as Streams and an
Effect rather than async iterables and a Promise.
Every view is lazy — a page is fetched only when pulled — and interruptible: interrupting the fiber cancels the in-flight page request rather than leaving it to settle unobserved.
Type Parameters
TItem
TItem
Methods
items()
items(): Stream<TItem, DomainError>;
A Stream of individual items, flattened across all pages.
Returns
Stream<TItem, DomainError>
pages()
pages(): Stream<SearchResponse<TItem>, DomainError>;
A Stream of whole pages, each fetched lazily as it is pulled.
Returns
Stream<SearchResponse<TItem>, DomainError>
toArray()
toArray(): Effect<TItem[], DomainError>;
Eagerly drains every item into an array. Bounded result sets only.
Returns
Effect<TItem[], DomainError>