/// /// import WdkService from './Service/WdkService'; /** * Configuration of available preferences used by the system. * * A preference is a value that gets persisted across application runs. * The persistence level can be configured (see PersistenceLevel). */ export declare const preferences: { navigationVisible: ((recordClassUrlSegment: string) => Preference<"navigationVisible", boolean>) & import("lodash").MemoizedFunction; openedStrategiesVisibility: (() => Preference<"openedStrategiesVisibility", boolean>) & import("lodash").MemoizedFunction; openedStrategies: (() => Preference<"openedStrategies", number[]>) & import("lodash").MemoizedFunction; saveAsSort: (() => Preference<"saveAsSort", { columnKey: string; } & { direction: "desc" | "asc"; }>) & import("lodash").MemoizedFunction; }; /** * Persistence levels */ export declare const enum PersistenceLevel { /** Browsing session lifetime */ Session = "session", /** BrowseinghHistory lifetime */ Local = "local", Project = "project", Global = "global" } export interface Preference { /** identifies the type of preference */ type: T; /** Key used to get value from persistence store. */ persistenceKey: string; /** Level of persistence. Determines the persistence store. */ persistenceLevel: PersistenceLevel; /** Parse string value into javascript value */ parse: (rawValue: string) => S; } export declare type Preferences = typeof preferences; export declare type PreferenceEntry = ReturnType; export declare type PreferenceType = T extends Preference ? S : never; export declare function getValue(wdkService: WdkService, preference: T): Promise | undefined>; export declare function setValue(wdkService: WdkService, preference: T, value: PreferenceType): Promise; /** React hook to use preferences in components */ export declare function usePreference(preference: T, defaultValue?: PreferenceType): [PreferenceType | undefined, import("react").Dispatch | undefined>>]; //# sourceMappingURL=Preferences.d.ts.map