@kurrent/kurrentdb-client
Version:
KurrentDB gRPC NodeJS Client SDK
31 lines (30 loc) • 1.18 kB
TypeScript
import type { ReadableOptions } from "stream";
import type { ReadPosition, AllStreamSubscription, BaseOptions, Filter } from "../types";
export interface SubscribeToAllOptions extends BaseOptions {
/**
* Starts the read at the given position.
* @defaultValue START
*/
fromPosition?: ReadPosition;
/**
* The best way to explain link resolution is when using system projections. When reading the stream `$streams` (which
* contains all streams), each event is actually a link pointing to the first event of a stream. By enabling link
* resolution feature, the server will also return the event targeted by the link.
* @defaultValue false
*/
resolveLinkTos?: boolean;
/**
* Filters events or streams based upon a predicate.
*/
filter?: Filter;
}
declare module "../Client" {
interface Client {
/**
* Subscribe to events on the $all stream.
* @param options - Subscription options.
* @param readableOptions - Readable stream options.
*/
subscribeToAll(options?: SubscribeToAllOptions, readableOptions?: ReadableOptions): AllStreamSubscription;
}
}