import { FetchStateAndError, FetchedState, ID } from '../../../../commonStateTypes/common'; import { AttributeType } from '../../../../entity/approvalRule/approvalRuleState'; import { ApproverViewUpdateData } from './types/commonState'; export interface BillPaySetupApproverViewState extends FetchedState { approvalRuleIds: ID[]; approvalRulesDeleteStatusById: Record; approverListState: { approverIds: ID[]; attributes: AttributeType[]; fetchStatus: FetchStateAndError; }; /** * Tracks the in-flight status of the list-page reorder PUT * (approval-rules-v2/reorder). The reducer optimistically updates * 'approvalRuleIds' on the trigger action. On Failure the reducer * restores the snapshot below before the epic's safety-net refetch * fires, so the UI bounces back to the user's last good order * without waiting for a network roundtrip. */ reorderStatus: FetchStateAndError; affectedEntityIds?: ID[]; billPaySetupApproverViewUpdateData?: ApproverViewUpdateData; listeningToPusherEvent?: boolean; newApprovalRuleId?: ID; /** * Pre-reorder snapshot of 'approvalRuleIds'. Stashed on the trigger * reducer right before the optimistic mutation and consumed on * Failure to restore the previous order. Cleared on Success so the * next reorder starts from a clean slate. */ reorderRollbackIds?: ID[]; }