import { ActionsObservable, StateObservable } from 'redux-observable'; import { Observable } from 'rxjs'; import { openSnackbar } from '../../../../entity/snackbar/snackbarReducer'; import { updateTransactions } from '../../../../entity/transaction/transactionReducer'; import { RootState } from '../../../../rootStateTypes'; import { ZeniAPI } from '../../../../zeniAPI'; import { bulkUploadAutomatchingTimedOut, bulkUploadReceiptsSuccess, clearBulkUpload, fetchBulkUploadBatchDetails, fetchBulkUploadBatchDetailsSuccess, fetchBulkUploadBatches, pusherBatchStatusUpdate, refreshBatchDetailsForBatchId, restoreBulkUploadMatchingState } from '../../reducers/missingReceiptsViewReducer'; export type ActionType = ReturnType | ReturnType | ReturnType | ReturnType | ReturnType | ReturnType | ReturnType | ReturnType | ReturnType | ReturnType | ReturnType; /** * On Pusher batch completion: refresh the batch list (so summary counts update) and dispatch a * targeted single-batch details refresh for the batch that just completed. Stale-while-revalidate: * we no longer pass `invalidateBatchDetailsCache: true` — existing `batchDetailsById` entries stay * on screen and the just-completed row replaces in place via `storeBatchDetails`. The post-match * tab decision (Unmatched vs Completed) is made client-side in `ExpenseAutomationPage` once fresh * batch details land -- do not dispatch `requestMissingReceiptsTabNavigation` here. * * Pusher resend storms (same batch completing twice within the dedupe window) are throttled in * `refreshBatchDetailsForBatchIdEpic` via `lastBatchDetailRefreshAtById`, so this epic stays * stateless and just forwards the event. */ export declare const pusherBatchStatusCompletionEpic: (actions$: ActionsObservable) => Observable; /** * If Pusher and batch-details are delayed beyond {@link BULK_UPLOAD_AUTOMATCHING_TIMEOUT_MS}, * force `phase` to `completed` (dismiss automatching banner) and refresh the batch list. * Cancels when the batch completes normally, bulk state is cleared, or another upload supersedes. */ export declare const bulkUploadAutomatchingTimeoutEpic: (actions$: ActionsObservable, state$: StateObservable) => Observable; /** * Fallback polling when Pusher is slow or unavailable. Network errors on a poll tick show one * error snackbar per upload session (first failure only) so the user is not spammed every * interval; Pusher or a later successful poll still completes the flow. */ export declare const pollBulkUploadBatchStatusEpic: (actions$: ActionsObservable, _state$: StateObservable, zeniAPI: ZeniAPI) => Observable;