import type { ActionObject } from '../globals'; /** * The Action Manager object provides access to methods * that are used by Actions (ex: as found in Actions-Api or ContainerManager) * to track promises that are returned by the action. */ declare class ActionManager { private actionMgrActions; private counterActionMgrId; /** * Constructor - Not for use outside of Core! Included for reference only. */ constructor(); /** * Returns a unique (for this session) actionMgrId that should * be provided in the payload to StateManager.dispatch so the * ActionManager can use it * @returns the next actionMgrID * @private */ getNextActionMgrId(): string; /** * Registers the given Promise with the given actionMgrID * @param theActionMgrID the actionMgrID that is associated with the given Promise * @param thePromise the Promise associated with the given actionMgrID * @param theResolve the function called when the promise resolves * @param theReject the function called when the promise rejects * @param theActionType the type of action associated with this Promise * @param actionConfig the action config which has the context information * @param enableLoadingIndicator a boolean flag which tells if the actions need a loading indicator or not * @returns returns the registered ID if register succeeded or null if it failed (ex: ID already been used) * @private */ register(theActionMgrID: string, thePromise: Promise, theResolve: Function, theReject: Function, theActionType?: string, actionConfig?: ActionObject, enableLoadingIndicator?: boolean): string | null; /** * Create a promise for an action and return an object containing the promise * and the ActionManager actionMgrID associated with that promise * @param theActionType the action type for which we're creating a promise * @param theActionMgrID the Action Manager ID associated with the promise. If provided, * the given ID is used when then promise is registered with the ActionManager. If not provided, we get the * ID and use the ID we get. * @returns object with actionMgrID and promise keys: { actionMgrID: , promise: } * @function */ actionManagerPromise: (theActionType: string, theActionMgrID?: string) => { actionMgrID: string; promise: Promise; }; /** * resolve the promise associated with the given ID * @param theActionMgrID the ID of the Action Manager entry that should be resolved * @param data metadata info about the view * @param allowDispatch flag that dictates if Reset_Loading redux action should be dispatched or not * @returns returns the resolved ID if resolve was called or null if problem was encountered * @private */ resolveActionByID(theActionMgrID: string | number, data?: any, allowDispatch?: boolean): string | number | null; /** * reject the promise associated with the given ID * @param theActionMgrID the ID of the Action Manager entry that should be resolved * @returns returns the rejected ID if reject was called or null if problem was encountered * @param allowDispatch flag that dictates if Reset_Loading redux action should be dispatched or not * @param error that gives the type of information about the error * @private */ rejectActionByID(theActionMgrID: string | number, allowDispatch?: boolean, error?: { type?: string; } | undefined): string | number | null; } declare const ActionManagerInstance: ActionManager; export { ActionManagerInstance };