import { ActionsObservable, StateObservable } from 'redux-observable'; import { Observable } from 'rxjs'; import { RootState } from '../../rootStateTypes'; import { ZeniAPI } from '../../zeniAPI'; import { fetchCardPolicyVendorOptions, updateCardPolicyVendorOptions, updateCardPolicyVendorOptionsFailure } from './cardPolicyReducer'; export type ActionType = ReturnType | ReturnType | ReturnType; /** * Card-policy vendor search. * * Listens for `fetchCardPolicyVendorOptions` and hits the same * `/accounting/1.0/vendors` endpoint the Vendors-tab uses, but writes * results onto the dedicated `cardPolicyState.vendorSearch` slice — no * fan-out to the global `vendor` / `account` / `class` / `vendorList` * entities. That isolation is important: the user may be configuring a * card policy in parallel with browsing the Vendors tab, and we don't * want either flow to clobber the other's list state. * * Uses `switchMap` so the latest typed search wins — earlier in-flight * requests are abandoned, which is the right semantics for a * search-as-you-type UX. * * Consumers: * - Manual `CardPolicyCreate / EditScreen` * - AI CFO `CardPolicyInteractiveForm` (vendor step) */ export declare const fetchCardPolicyVendorOptionsEpic: (actions$: ActionsObservable, _state$: StateObservable, zeniAPI: ZeniAPI) => Observable;