import { ObjectFetcher } from "graphql-ts-client-api" ; import { EntityChangeEvent } from ".." ; import { EntityEvictEvent } from "../entities/EntityEvent" ; import { SchemaType } from "../meta/SchemaType" ; export interface StateManager < TSchema extends SchemaType > { save < TName extends ( keyof TSchema [ "entities" ] & string ) | "Query" , T extends object , TVariables extends object = { } > ( fetcher , obj , variables ? ) : void ; save < TName extends keyof TSchema [ "entities" ] & string , T extends object , TVariables extends object = { } > ( fetcher , objs , variables ? ) : void ; delete < TName extends keyof TSchema [ "entities" ] & string > ( typeName , id ) : void ; delete < TName extends keyof TSchema [ "entities" ] & string > ( typeName , ids ) : void ; evict ( typeName ) : void ; evict < TName extends keyof TSchema [ "entities" ] & string > ( typeName , id ) : void ; evict < TName extends keyof TSchema [ "entities" ] & string > ( typeName , ids ) : void ; evict < TName extends keyof TSchema [ "entities" ] , TFieldName extends keyof TSchema [ "entities" ] [ TName ] [ " $associationArgs" ] > ( typeName , id , fieldKey ) : void ; evict < TName extends keyof TSchema [ "entities" ] > ( typeName , id , fieldName ) : void ; evict < TName extends keyof TSchema [ "entities" ] > ( typeName , ids , fieldName ) : void ; evict < TName extends keyof TSchema [ "entities" ] > ( typeName , id , fieldNames ) : void ; evict < TName extends keyof TSchema [ "entities" ] > ( typeName , ids , fieldNames ) : void ; addEntityEvictListener ( listener ) : void ; removeEntityEvictListener ( listener ) : void ; addEntityEvictListeners ( listeners ) : void ; removeEntityEvictListeners ( listeners ) : void ; addEntityChangeListener ( listener ) : void ; removeEntityChangeListener ( listener ) : void ; addEntityChangeListeners ( listeners ) : void ; removeEntityChangeListeners ( listeners ) : void ; suspendBidirectionalAssociationManagement < T > ( action ) : T ; } export type RecursivePartial < T > = T extends object ? { [ P in keyof T ] ? : RecursivePartial < T [ P ] > ; } : T ;