@ceramicnetwork/core
Version:
Typescript implementation of the Ceramic protocol
31 lines • 1.38 kB
TypeScript
import { ObjectStore } from './object-store.js';
import { StreamID } from '@ceramicnetwork/streamid';
import type { IKVFactory, IKVStoreFindResult, StoreSearchParams } from './ikv-store.js';
import { TaskQueue } from '../ancillary/task-queue.js';
import type { DiagnosticsLogger } from '@ceramicnetwork/common';
export declare type AggregationStoreEntry = {
resumeToken: string;
streamID: StreamID;
};
export declare class MonotonicKey {
#private;
next(now?: number): string;
}
export declare class FeedAggregationStore extends ObjectStore<string, StreamID> {
#private;
private readonly logger;
protected useCaseName: string;
readonly staleDuration: number;
readonly cleanupInterval: number | null;
readonly tasks: TaskQueue;
private readonly onWrite;
constructor(logger: DiagnosticsLogger, staleDuration?: number, cleanupInterval?: number | null);
findKeys(params?: Partial<StoreSearchParams>): Promise<Array<string>>;
find(params?: Partial<StoreSearchParams>): Promise<Array<IKVStoreFindResult>>;
deleteStale(lessThanMs: number): Promise<number>;
put(streamId: StreamID, key?: string): Promise<void>;
open(factory: Pick<IKVFactory, 'open'>): Promise<void>;
streamIDs(gt?: string): ReadableStream<AggregationStoreEntry>;
close(): Promise<void>;
}
//# sourceMappingURL=feed-aggregation-store.d.ts.map