import { ActionsObservable, StateObservable } from 'redux-observable'; import { Observable } from 'rxjs'; import { updateApprovalRules } from '../../../../../entity/approvalRule/approvalRuleReducer'; import { openSnackbar } from '../../../../../entity/snackbar/snackbarReducer'; import { RootState } from '../../../../../rootStateTypes'; import { ZeniAPI } from '../../../../../zeniAPI'; import { fetchBillPaySetupApproverView, reorderBillPayApprovalRules, reorderBillPayApprovalRulesFailure, reorderBillPayApprovalRulesSuccess } from '../billPaySetupApproverViewReducer'; /** * Approval Rules 3.0 — list-page drag-and-drop reorder. * * PUT /bill-pay/approval-rules-v2/reorder with the new ID order in * 'rule_ids'. Returns the updated 'approval_rules' (with refreshed * priorities). The reducer optimistically updated 'approvalRuleIds' * on the trigger action, so: * - on success: dispatch the updated approval rule payloads into * the entity slice, then 'Success' to normalise the slice's * ordered ID list to whatever the server returned. * - on failure: snackbar + dispatch 'fetchBillPaySetupApproverView' * with cacheOverride to roll the optimistic state back to server * truth. */ export type ActionType = ReturnType | ReturnType | ReturnType | ReturnType | ReturnType | ReturnType; export declare const reorderBillPayApprovalRulesEpic: (actions$: ActionsObservable, _state$: StateObservable, zeniAPI: ZeniAPI) => Observable;