import { ActionsObservable, StateObservable } from 'redux-observable'; import { updateJESchedules, updateJESchedulesDetails } from '../../../../entity/jeSchedules/jeSchedulesReducer'; import { JEScheduleKey, JEScheduleTransactionKey } from '../../../../entity/jeSchedules/jeSchedulesTypes'; import { openSnackbar } from '../../../../entity/snackbar/snackbarReducer'; import { RootState } from '../../../../reducer'; import { clearAll } from '../../../../rootActions'; import { ZeniAPI } from '../../../../zeniAPI'; import { fetchMonthEndCloseChecks } from '../../../monthEndCloseChecksView/monthEndCloseChecksViewReducer'; import { removeJeAccruedScheduleKey, removeJeScheduleTransactionKey, revertJeSchedule, revertJeScheduleFailure, revertJeScheduleSuccess } from '../../reducers/jeSchedulesViewReducer'; export type ActionType = ReturnType | ReturnType | ReturnType | ReturnType | ReturnType | ReturnType | ReturnType | ReturnType | ReturnType | ReturnType; /** * Undo a posted prepaid / fixed-asset / accrued schedule: deletes its posted QBO journal entry, then * soft-deletes the scheduled entries and the schedule itself. * * Two or more posted journal entries answer 409 and leave the schedule intact, so the failure is * surfaced rather than swallowed. Accrued has one extra rejection of its own — the endpoint refuses * once a bill has been linked, because the reversal is already on the books — and that arrives the * same way, as an error on the row. * * A one-time accrual is not this action: it is a Mongo row behind the accruals gateway, and goes * through revertOneTimeAccrual instead. So `accrued_expenses` here always means an accrued * *schedule*, which is what makes it a safe discriminator for the removal below. */ export declare const revertJeScheduleEpic: (actions$: ActionsObservable, state$: StateObservable, zeniAPI: ZeniAPI) => import("rxjs").Observable<{ payload: { messageSection: import("../../../..").SnackbarMessageSections; messageText: import("../../../..").SnackbarMessageSectionTexts; type: import("../../../..").SnackbarMessageType; showStatusIcon?: boolean; variables?: { variableName: string; variableValue: string; }[]; }; type: "snackbar/openSnackbar"; } | { payload: { period: import("../../../..").MonthYearPeriod; refreshViewInBackground: boolean; tenantId: import("../../../..").ID; }; type: "monthEndCloseChecksView/fetchMonthEndCloseChecks"; } | { payload: { jeScheduleKey: `${string}_expense_${string}` | `${string}_check_${string}` | `${string}_invoice_${string}` | `${string}_payment_${string}` | `${string}_credit_memo_${string}` | `${string}_sales_receipt_${string}` | `${string}_delayed_credit_${string}` | `${string}_delayed_charge_${string}` | `${string}_refund_${string}` | `${string}_bill_${string}` | `${string}_bill_payment_${string}` | `${string}_bill_payment_check_${string}` | `${string}_bill_payment_credit_card_${string}` | `${string}_vendor_credit_${string}` | `${string}_credit_card_credit_${string}` | `${string}_transfer_${string}` | `${string}_credit_card_payment_${string}` | `${string}_deposit_${string}` | `${string}_journal_entry_${string}`; selectedPeriod: import("../../../..").MonthYearPeriod; }; type: "expenseAutomationJESchedulesView/removeJeScheduleTransactionKey"; } | { payload: { jeAccruedScheduleKey: `${string}_${string}`; }; type: "expenseAutomationJESchedulesView/removeJeAccruedScheduleKey"; } | { payload: { jeScheduleTransactionKey: JEScheduleKey | JEScheduleTransactionKey; status: import("../../../../zeniAPIStatus").ZeniAPIStatus; }; type: "expenseAutomationJESchedulesView/revertJeScheduleFailure"; } | { payload: { jeScheduleTransactionKey: JEScheduleKey | JEScheduleTransactionKey; }; type: "expenseAutomationJESchedulesView/revertJeScheduleSuccess"; }>;