import { ActionTree, GetterTree, MutationTree } from 'vuex'; export interface IVxsResponse { data: D; } export interface IVxsPromise extends Promise> { } export interface IVxsOptions { method: VxsMethod; default?: D; store?: IVxsExtendedStore; cache?: boolean; alwaysRefetch?: boolean; } export declare type VxsMethod = (_: P) => IVxsPromise | D; export interface IVxsExtendedStore { actions?: ActionTree, RS>; mutations?: MutationTree>; getters?: GetterTree, RS>; state?: S; } export interface IVxsState { PENDING: { [_: string]: boolean; }; ERROR: { [_: string]: boolean; }; FETCHED: { [_: string]: boolean; }; DEFAULT?: D; RESPONSE: { [_: string]: IVxsResponse; }; } export interface IVxsModuleState { [_: string]: IVxsState; } export interface IMockState { error?: boolean; pending?: boolean; response?: IVxsResponse; data?: D; } export declare type VxsExtendedState = IVxsState & S; interface IVxsActionTreeExtension { method: VxsMethod; } export declare type VxsActionTree = IVxsActionTreeExtension & ActionTree, RS>; export interface IVxsMutationPayload { key: string; response: object; catched: boolean; } export interface IVxsPayload { errorHandler?: (_: any) => boolean; } export {};