import { RangeBase } from './RangeBase'; export declare enum BaseType { CountBase = "COUNT_BASE", HashBase = "HASH_BASE", RangeBase = "RANGE_BASE" } /** * Option types are parameter types for create functions. */ export interface HashBaseOptions { name: string; prefixSize: number; } export interface CountBaseOptions { name: string; bucketSize: number; } export interface RangeBaseOptions { name: string; bucketSize: number; rangeKey: RangeKey; idKey: IdKey; idPrefixLength?: number; } /** * Config types describe the baselet configuration and are saved to the disk. * This allows for baselet type checking and configuration persistence * at runtime. */ export interface CountBaseConfig { type: BaseType.CountBase; bucketSize: number; partitions: { [partitionName: string]: { length: number; }; }; } export interface HashBaseConfig { type: BaseType.HashBase; prefixSize: number; } export interface RangeBaseConfig = RangeBase> { type: BaseType.RangeBase; bucketSize: number; rangeKey: B['rangeKey']; idKey: B['idKey']; idPrefixLength: number; limits: PartitionLimits; sizes: { [partition: string]: number; }; } export declare type BaseletConfig = CountBaseConfig | HashBaseConfig | RangeBaseConfig; interface PartitionLimits { [partition: string]: undefined | PartitionLimit; } interface PartitionLimit { minRange?: number; maxRange?: number; } /** * The data format for baselet dump methods. */ export interface DataDump { config: C; data: D; } export {};