import { GetterTree, Module, MutationTree } from 'vuex'; import { IVxsOptions, VxsActionTree, VxsExtendedState, VxsMethod } from './types'; import { VuexXhrCreator } from './VuexXhrCreator'; interface IMapResult

{ key: string; payload: P; } export default class VuexXhr implements Module, RS> { readonly state: VxsExtendedState; readonly namespaced: boolean; namespace: string; mutations: MutationTree>; actions: VxsActionTree; getters: GetterTree, RS>; options: IVxsOptions; private vuexXhrCreator?; constructor(options: IVxsOptions); setNamespace: (namespace: string) => void; mapPending: (payload: P) => IMapResult

; mapHasError: (payload: P) => IMapResult

; mapFetched: (payload: P) => IMapResult

; mapData: (payload: P) => IMapResult

; mapResponse: (payload: P) => IMapResult

; pending: (getters: any[], payload: P) => unknown; hasError: (getters: any[], payload?: P | undefined) => unknown; fetched: (getters: any[], payload?: P | undefined) => unknown; data: (getters: any[], payload?: P | undefined) => D; response: (getters: any[], payload?: P | undefined) => unknown; dataNamespace: () => string; fetch: () => string; send: () => string; invalidate: () => string; invalidateAll: () => string; forceFetch: () => string; reset: () => string; setState: (payload: any, mockState: any) => void; setMethod: (stub: VxsMethod) => void; setVuexXhrCreator: (vuexXhrCreator: VuexXhrCreator) => void; /** * Invalidate the cache of the group this method belongs to */ inValidateGroup: () => void; mockCall(_: unknown, data: D): void; private mergeStore; private findGetter; } export {};