import { RecordStatus } from "../types" ; export interface StorageProxy < T extends { id : string ; last_modified ? : number ; _status ? : RecordStatus ; } > { create : ( record : T ) => void ; update : ( record : T & { id : string ; } ) => any ; delete : ( id : string ) => void ; get : ( id : string ) => T | undefined ; } export abstract class AbstractBaseAdapter < B extends { id : string ; last_modified ? : number ; _status ? : RecordStatus ; } > { abstract clear ( ) ; abstract execute < T > ( callback , options ) ; abstract get ( id ) ; abstract list ( params ) ; abstract saveLastModified ( lastModified ? ) ; abstract getLastModified ( ) ; abstract importBulk ( records ) ; abstract loadDump ( records ) ; abstract saveMetadata ( metadata ) ; abstract getMetadata < T > ( ) ; } abstract export default class BaseAdapter < B extends { id : string ; last_modified ? : number ; _status ? : RecordStatus ; } > implements AbstractBaseAdapter < B > { abstract return { Promise } clear ( ) { throw new Error ( "Not Implemented." ) ; } abstract param { Function } callback param { Object } options return { Promise } execute < T > ( callback , options = { preload : [ ] } ) { throw new Error ( "Not Implemented." ) ; } abstract param { String } id return { Promise } get ( id ) { throw new Error ( "Not Implemented." ) ; } abstract param { Object } params return { Promise } list ( params = { filters : { } , order : "" , } ) { throw new Error ( "Not Implemented." ) ; } abstract param { Number } lastModified return { Promise } saveLastModified ( lastModified ? ) { throw new Error ( "Not Implemented." ) ; } abstract return { Promise } getLastModified ( ) { throw new Error ( "Not Implemented." ) ; } abstract param { Array } records return { Promise } importBulk ( records ) { throw new Error ( "Not Implemented." ) ; } deprecated Use  importBulk instead.
     *  abstract param { Array } records return { Promise } loadDump ( records ) { throw new Error ( "Not Implemented." ) ; } saveMetadata ( metadata ) { throw new Error ( "Not Implemented." ) ; } getMetadata < T > ( ) { throw new Error ( "Not Implemented." ) ; } }