import { AdapterInterface} from './adapter_interface'; export interface IRecordStore { [index : string] : T; } //this matters because of return types for adapter functions, without this whatever the base adapter class returns //from these methods will be the required return type for all extending classes export interface IAdapter { config? : any; sourceInterface : AdapterInterface; initialize() : void; loadRecords(localRecords? : IRecordStore) : T[]|IRecordStore|Promise|Promise>; addRecord(record : T) : T|Promise; removeRecord(record : T, id : string) : T|Promise; getRecord(id : string, currentRecord : T) : T|Promise; setRecord(id : string, newRecord : T, oldRecord : T) : T|Promise; getRecordId(record : T) : string; recordsEqual(record1 : T, record2 : T) : boolean; addRecordCollection(collection : T[]|IRecordStore) : T[]|IRecordStore|Promise|Promise>; getRecordCollection(ids : Array) : T[]|IRecordStore|Promise|Promise>; removeRecordCollection(collection : T[]|IRecordStore) : T[]|IRecordStore|Promise|Promise>; updateRecordCollection(collection : T[]|IRecordStore) : T[]|IRecordStore|Promise|Promise>; getRecordPage(pageSize : number, pageNumber : number, optionalArgs? : any) : T[]|IRecordStore|Promise|Promise>; getRecordCount() : number|Promise; query(queryId : string, ...args : any[]) : any; action(actionid : string, ...args : any[]) : any; }