import type { CalculatedField } from '../types'; import type { DxAPIResponseObject } from '../case/types'; import { C11nEnv } from '../interpreter/c11n-env'; import type { RefreshAPIOptions } from '../globals'; import type { RefreshPayLoad, RefreshPropertyChange, ReqConfig } from './types'; export declare const refreshTargetViewsList: { [key: string]: { [key: string]: { [key: string]: string; }; }; }; /** * Description : Removes stale container item from refreshList * @param context container name */ export declare const removeViewsFromTargetList: (context: string) => void; /** * [dispatchRefreshData] * Description : Dispatches the REFRESH_DATA action * @param ID CaseID or AssignmentID * @param actionID Action ID either a casewide action or assignment action * @param context Data context * @param caseWideAction Whether the action is a case wide action or not. * @param options options object for actions */ export declare const dispatchRefreshData: (ID: string, actionID: string, objectTypeID: string, context: string | null, caseWideAction: boolean, isObjectType: boolean, isExternalObject: boolean, options: RefreshAPIOptions) => void; /** * [dispatchCaseViewRefresh] * Description : Dispatches the REFRESH_DATA action * @param ID CaseID or AssignmentID * @param viewID View ID * @param context Data context * @param pageReference page reference * @param options Options object for action */ export declare const dispatchCaseViewRefresh: (ID: string, viewID: string, context: string, pageReference: string, options: RefreshAPIOptions) => void; export declare const dispatchRefreshForEmbeddeddataWithAction: (caseID: string, assignmentID: string, actionID: string, context: string, interestPage: string, interestPageActionID: string, isLocalAction: boolean, isMultiRecordData: boolean, editType: string, options?: RefreshAPIOptions) => void; /** * [recordViewForRefresh] * Description : Pushes the view to a list. This list holds all the views which have refresh targets. * @param viewName view name from which the refresh is triggered * @param context Data context * @param pageReference Page reference inside the content */ export declare const recordViewForRefresh: (viewName: string | undefined, context: string, pageReference: string) => void; /** * [shouldViewRefresh] * Description : Returns true if context has any views present in it,else returns false. * Refresh will happen for all the views present in that context. * @param context Data context * @returns boolean */ export declare const shouldViewRefresh: (context: string) => boolean; /** * This function takes c11Env object and datasource parameters and returns whether parameters are * declarative expression or not * @param component C11nEnv object * @param parameters datasource parameters can be object/array * @returns isDeclarativeTarget boolean value */ export declare const checkDataSourceParamForDeclarativeTargets: (component: C11nEnv, parameters: { [key: string]: string; }[] | { [key: string]: string; }, currentClassId?: string) => boolean; /** * [inspectComponentForRefreshTargets] * Description : Inspects the component, checks if there are any refresh targets in it. * If any refresh targets, calls a method which tracks the view for further processing. * @param component C11nEnv object */ export declare const inspectComponentForRefreshTargets: (component: C11nEnv) => void; /** * [inspectChildrenForRefreshTargets] * Description : Inspects the component children, checks if there are any refresh targets in it. * If any refresh targets, calls a method which tracks the view for further processing. * @param component C11nEnv object */ export declare const inspectChildrenForRefreshTargets: (component: C11nEnv) => void; export declare const isParentObjectType: (context: string | null) => boolean; export declare const refreshAssignment: (context: string | null, pageReference: string, options: RefreshAPIOptions) => void; /** * [refreshOnPropertyChange] * Description : This function gets the action type, action/assignment ID and gives a call to dispatch REFRESH_DATA * @param payload * payload.context - Data context * payload.pageReference - Page reference in the content */ export declare const refreshOnPropertyChange: (payload: RefreshPropertyChange) => void; export declare const appendQueryParamsForRefreshAPI: (payload: RefreshPayLoad, restApi?: string) => string | undefined; export declare const shouldCancelRequest: (existingRequest: ReqConfig, incomingRequest: ReqConfig) => boolean | string; export declare const triggerTransformCaseToObject: (response: DxAPIResponseObject, classID: string, isObjectType: boolean) => DxAPIResponseObject; /** * This API will returns fields which configured with declarative target, field and views which are * configured with when condition in the specified context. * @param contextName - name of the context. * @returns */ export declare const getItemsToRecalculate: (contextName: string) => { fieldsWithDeclarativeTargets: CalculatedField[]; whens: CalculatedField[]; };