import { Store as ReduxStore } from 'redux'; import FluxCapacitor from '../flux-capacitor'; import Store from './store'; declare type Observer = (oldState: any, newState: any, path: string) => void; declare namespace Observer { interface Map { [key: string]: Observer | Map; } type Node = Map | Observer | (Observer & Map); const listener: (flux: FluxCapacitor) => (store: ReduxStore) => () => void; function listen(flux: FluxCapacitor, store: ReduxStore): () => void; function resolve(oldState: any, newState: any, observer: Node, path: string): void; function terminal(oldState: any, newState: any, observer: Observer, path: string): void; function indexed(emit: Observer): (oldState: any, newState: any, path: any) => void; function navigations(navigationsEvent: string, selectedRefinementsEvent: string, emit: Function): (oldState: Store.Indexed, newState: Store.Indexed, path: string) => void; function products(moreProductsAddedEvent: string, productsUpdatedEvent: string, emit: Function): (oldState: Store.ProductWithMetadata[], newState: Store.ProductWithMetadata[], path: string) => void; function fetch(fetchEvent: string, doneEvent: string, emit: Function): (oldState: any, newState: any, path: any) => void; function create(flux: FluxCapacitor): { data: { present: { history: (oldState: Store.History, newState: Store.History, path: string) => void; autocomplete: (oldState: Store.Autocomplete, newState: Store.Autocomplete, path: string) => void; collections: { byId: (oldState: any, newState: any, path: any) => void; selected: (_: any, value: any, path: string) => void; }; details: { data: (_: any, value: any, path: string) => void; }; navigations: (oldState: Store.Indexed, newState: Store.Indexed, path: string) => void; page: ((_: any, value: any, path: string) => void) & { current: (_: any, value: any, path: string) => void; sizes: (_: any, value: any, path: string) => void; }; products: (oldState: Store.ProductWithMetadata[], newState: Store.ProductWithMetadata[], path: string) => void; query: { corrected: (_: any, value: any, path: string) => void; didYouMean: (_: any, value: any, path: string) => void; original: (_: any, value: any, path: string) => void; related: (_: any, value: any, path: string) => void; rewrites: (_: any, value: any, path: string) => void; }; recommendations: { suggested: { products: (oldState: any, newState: any, path: any) => void; }; }; pastPurchases: { skus: (_: any, value: any, path: string) => void; products: (oldState: Store.ProductWithMetadata[], newState: Store.ProductWithMetadata[], path: string) => void; saytPastPurchases: (_: any, value: any, path: string) => void; query: (_: any, value: any, path: string) => void; page: ((_: any, value: any, path: string) => void) & { current: (_: any, value: any, path: string) => void; sizes: (_: any, value: any, path: string) => void; }; count: (_: any, value: any, path: string) => void; navigations: (oldState: Store.Indexed, newState: Store.Indexed, path: string) => void; sort: ((_: any, value: any, path: string) => void) & { items: (_: any, value: any, path: string) => void; labels: (_: any, value: any, path: string) => void; selected: (_: any, value: any, path: string) => void; }; template: (_: any, value: any, path: string) => void; }; infiniteScroll: (_: any, value: any, path: string) => void; recordCount: (_: any, value: any, path: string) => void; redirect: (_: any, value: any, path: string) => void; sorts: ((_: any, value: any, path: string) => void) & { items: (_: any, value: any, path: string) => void; labels: (_: any, value: any, path: string) => void; selected: (_: any, value: any, path: string) => void; }; template: (_: any, value: any, path: string) => void; personalization: { _persist: { rehydrated: (oldState: any, newState: any, path: any) => void; }; }; }; }; isFetching: { moreRefinements: (oldState: any, newState: any, path: any) => void; moreProducts: (oldState: any, newState: any, path: any) => void; search: (oldState: any, newState: any, path: any) => void; autocompleteSuggestions: (oldState: any, newState: any, path: any) => void; autocompleteProducts: (oldState: any, newState: any, path: any) => void; details: (oldState: any, newState: any, path: any) => void; }; isRunning: (oldState: any, newState: any, path: any) => void; session: { recallId: (_: any, value: any, path: string) => void; searchId: (_: any, value: any, path: string) => void; detailsId: (_: any, value: any, path: string) => void; pastPurchaseId: (_: any, value: any, path: string) => void; location: (_: any, value: any, path: string) => void; }; ui: (oldState: Store.UI, newState: Store.UI, path: string) => void; }; } export default Observer;