import { Database, Model as ORMModel } from "@vuex-orm/core"; import ORMInstance from "@vuex-orm/core/lib/data/Instance"; import RootState from "@vuex-orm/core/lib/modules/contracts/RootState"; import { ApolloLink } from "apollo-link"; import { DocumentNode } from "graphql/language/ast"; import Adapter from "../adapters/adapter"; export declare type DispatchFunction = (action: string, data: Data) => Promise; export interface Options { database: Database; url?: string; headers?: { [index: string]: any; }; credentials?: string; useGETForQueries?: boolean; debug?: boolean; link?: ApolloLink; adapter?: Adapter; } export interface ActionParams { commit?: any; dispatch?: DispatchFunction; getters?: any; rootGetters?: any; rootState?: any; state?: RootState; filter?: Filter; id?: number; data?: Data; args?: Arguments; variables?: Arguments; bypassCache?: boolean; query?: string | DocumentNode; multiple?: boolean; name?: string; } export interface Data extends ORMInstance { [index: string]: any; } export interface Filter { [index: string]: any; } export interface Arguments { [index: string]: any; } export interface GraphQLType { description: string; name: string; fields?: Array; inputFields?: Array; } export interface GraphQLField { description: string; name: string; args: Array; type: GraphQLTypeDefinition; } export interface GraphQLTypeDefinition { kind: string; name?: string; ofType: GraphQLTypeDefinition; } export interface GraphQLSchema { types: Array; } export interface Field { related?: typeof ORMModel; parent?: typeof ORMModel; localKey?: string; foreignKey?: string; } export declare class PatchedModel extends ORMModel { static eagerLoad?: Array; static eagerSave?: Array; static eagerSync?: Array; static skipFields?: Array; $isPersisted: boolean; static fetch(filter?: any, bypassCache?: boolean): Promise; static mutate(params: ActionParams): Promise; static customQuery(params: ActionParams): Promise; $mutate(params: ActionParams): Promise; $customQuery(params: ActionParams): Promise; $persist(args?: any): Promise; $push(args?: any): Promise; $destroy(): Promise; $deleteAndDestroy(): Promise; }