@vuex-orm/plugin-axios
Version:
Vuex ORM plugin for adding smooth integration with axios.
21 lines • 770 B
TypeScript
import { AxiosRequestConfig, AxiosInstance, AxiosResponse } from 'axios';
import { Model, Record } from '@vuex-orm/core';
export declare type PersistMethods = 'create' | 'insert' | 'update' | 'insertOrUpdate';
export declare type PersistOptions = {
[P in PersistMethods]?: string[];
};
export interface Config extends AxiosRequestConfig {
dataKey?: string;
dataTransformer?: (response: AxiosResponse) => Record | Record[];
save?: boolean;
persistBy?: PersistMethods;
persistOptions?: PersistOptions;
delete?: string | number | ((model: Model) => boolean);
actions?: {
[name: string]: any;
};
}
export interface GlobalConfig extends Config {
axios?: AxiosInstance;
}
//# sourceMappingURL=Config.d.ts.map