UNPKG

react-application-core

Version:

A react-based application core for the business applications.

61 lines (60 loc) 1.82 kB
import { AnyT, IAddedFilesWrapper, ICallbackWrapper, IFilePathWrapper, IIdWrapper, IRemovedFilesWrapper } from '../definitions.interface'; /** * @stable [24.09.2019] */ export declare enum StorageEventCategoriesEnum { STORAGE_ERROR = "storage:error" } /** * @stable [24.09.2019] */ export declare enum StorageEventsEnum { SYNC_APP_STATE = "sync:app:state" } /** * @stable [17.11.2019] */ export interface IStorageSettingsEntity { appStateKeyName?: string; appStateSyncEnabled?: boolean; appStateSyncTimeout?: number; authTokenKeyName?: string; versionUuidKeyName?: string; } /** * @stable [17.11.2019] */ export declare const DEFAULT_STORAGE_SETTINGS_ENTITY: Readonly<IStorageSettingsEntity>; /** * @stable [28.07.2019] */ export declare enum StorageTypesEnum { SESSION = 0, LOCAL = 1 } /** * @stable [28.07.2019] */ export interface IStorage<TStorage = Storage> { storage?: TStorage; set(key: string, value: AnyT): Promise<AnyT>; get?(key: string, noPrefix?: boolean): Promise<AnyT>; remove?(key: string, noPrefix?: boolean): Promise<void>; each?(command: (value: AnyT, key: string) => void): void; } /** * @stable [02.10.2019] */ export interface IAddedFileEntity extends IIdWrapper<string>, IFilePathWrapper { } /** * @stable [04.09.2020] */ export interface IMultiEntityStorageSetEntity extends IAddedFilesWrapper<IAddedFileEntity[]>, ICallbackWrapper<() => Promise<void>[]>, IRemovedFilesWrapper<void[]> { } /** * @stable [17.11.2019] */ export declare const $RAC_STORAGE_REGISTER_SYNC_APP_STATE_TASK_ACTION_TYPE: string; export declare const $RAC_STORAGE_SYNC_APP_STATE_ACTION_TYPE: string; export declare const $RAC_STORAGE_UNREGISTER_SYNC_APP_STATE_TASK_ACTION_TYPE: string;