import { ActionsObservable, StateObservable } from 'redux-observable'; import { Observable } from 'rxjs'; import { RootState } from '../../rootStateTypes'; import { fetchCardPolicyRecommendationFromUpload, updatePolicyDocumentExtractionSuccess } from './cardPolicyReducer'; export type ActionType = ReturnType | ReturnType; /** * Bridge epic — chains the AI CFO `upload`-mode flow's two API hops. * * The first hop (`extractPolicyDocument` → multipart POST to * `policy-documents/extract`) lives on the cardPolicy slice and is * shared with the manual `CardPolicyCreatePage`. The second hop * (`fetchCardPolicyRecommendationFromUpload` → JSON POST to * `ai-cfo/policy-recommendation-from-upload`) is AI-CFO only. * * The chain is gated on `policyDocumentExtraction.aiCfoAnswerId` being * populated — manual callers leave it undefined, so the bridge is a * silent no-op there. * * Splitting this off from `policyRecommendationFromUploadEpic` keeps * the wizard component a pure renderer: it dispatches * `extractPolicyDocument(files, answerId, chatSessionId)` once, then * subscribes to `cardPolicyState` lifecycle flags to drive its * "Extracting…" / "Recommending…" pill. */ export declare const policyDocumentExtractionToRecommendationBridgeEpic: (actions$: ActionsObservable, state$: StateObservable) => Observable;