UNPKG

react-application-core

Version:

A react-based application core for the business applications.

69 lines (68 loc) 2.47 kB
import { IEffectsAction } from 'redux-effects-promise'; import { AnyT } from '../definitions.interface'; import { ISettingsEntity } from '../settings'; import { IAuth, IRoutesEntity, IStorage, ITransportResponseAccessor, IUniversalStoreEntity, IVersionProcessor } from '../definition'; import { BaseEffects } from '../store/effects/base.effects'; export declare class UniversalApplicationEffects<TApi> extends BaseEffects<TApi> { private static readonly logger; protected readonly auth: IAuth; protected notVersionedPersistentStorage: IStorage; protected readonly routes: IRoutesEntity; protected readonly settings: ISettingsEntity; protected responseAccessor: ITransportResponseAccessor; protected readonly versionProcessor: IVersionProcessor; /** * @stable - 25.04.2018 * @returns {Promise<IEffectsAction[]> | IEffectsAction[]} */ $onInit(): Promise<IEffectsAction[]>; /** * @stable [17.11.2019] * @param {IEffectsAction} _ * @returns {Promise<IEffectsAction[]>} */ $onAfterInit(_: IEffectsAction): Promise<IEffectsAction[]>; /** * @stable [13.11.2019] * @returns {Promise<AnyT> | IEffectsAction[] | IEffectsAction} */ $onPrepare(action: IEffectsAction, state: IUniversalStoreEntity): Promise<AnyT> | IEffectsAction[] | IEffectsAction; /** * @stable [18.11.2019] * @param {IEffectsAction} action * @returns {IEffectsAction} */ $onPrepareError(action: IEffectsAction): IEffectsAction; /** * @stable [17.03.2020] * @param {IEffectsAction} action * @returns {IEffectsAction[]} */ $onAfterLogin(action: IEffectsAction): IEffectsAction[]; $onLogout(): Promise<IEffectsAction[]>; /** * @stable [17.11.2019] * @returns {Promise<IEffectsAction[]>} */ $onAfterLogout(): Promise<IEffectsAction[]>; /** * @stable [16.03.2020] * @param {IEffectsAction} action * @returns {Promise<void>} */ $onAuthorized(action: IEffectsAction): Promise<void>; /** * @stable [17.11.2019] */ $onUnauthorized(): Promise<void>; /** * @stable [17.11.2019] * @returns {Promise<IEffectsAction[]>} */ protected checkIfNewVersionThenReload(): Promise<IEffectsAction[]>; /** * @stable [17.11.2019] * @returns {string} */ protected get authTokenKeyName(): string; }