import type { DataModuleSubscription, DataSource, DataStream, DataStreamQuery, SubscriptionResponse, TimeSeriesData } from './types'; import type { DataStreamsStore, CacheSettings } from './data-cache/types'; import type { TimeSeriesDataRequestSettings, Viewport } from './data-cache/requestTypes'; export declare const DEFAULT_CACHE_SETTINGS: { ttlDurationMapping: { [x: number]: number; }; }; interface IotAppKitDataModuleConfiguration { initialDataCache?: DataStreamsStore; cacheSettings?: Partial; } export declare class TimeSeriesDataModule { private dataCache; private subscriptions; private dataSourceStore; private cacheSettings; /** * Create a new data module, optionally with a pre-hydrated data cache. * */ constructor(dataSource: DataSource, configuration?: IotAppKitDataModuleConfiguration); /** * Fulfill query * * Ensure that all requests are initiated required to fulfill the entire query, from start to end. * Takes into account the current state of the cache, to determine which data has already been requested, or has expired * segments within the cache. */ private fulfillQueries; private getAdjustedViewport; getCachedDataStreams: ({ viewport, queries, emitDataStreams, settings, }: { viewport: Viewport; queries: Query[]; emitDataStreams: (dataStreams: DataStream[]) => void; settings?: TimeSeriesDataRequestSettings; }) => Promise; subscribeToDataStreams: ({ queries, request }: DataModuleSubscription, callback: (data: TimeSeriesData) => void) => SubscriptionResponse; private update; private registerRequest; /** * Unsubscribe from the data module. * * Prevents the provided callbacks associated with the given subscription from being called, and prevents * the previously queried data streams from being queried any longer. */ private unsubscribe; } export {}; //# sourceMappingURL=TimeSeriesDataModule.d.ts.map