/**
 * Pluggable Storage Drivers
 * You can create plugins for TeDB to provide different mediums of storage. Below you'll find methods that TeDB will
 * expect in your plugin. Storage plugins implement a simple key-value store.
 */ export interface IStorageDriver { param key getItem ( key ) : Promise < any > ; param key param value setItem ( key , value ) : Promise < any > ; param key removeItem ( key ) : Promise < null > ; param key param index storeIndex ( key , index ) : Promise < any > ; param key fetchIndex ( key ) : Promise < any [ ] > ; param key removeIndex ( key ) : Promise < null > ; param iteratorCallback iterate ( iteratorCallback ) : Promise < any > ; /**
     * Retrieve all keys - _ids of all documents for this
     */ keys ( ) : Promise < string [ ] > ; param { Isanitize } obj param index param { string } fieldName returns { Promise < Iexist > } exists ( obj , index , fieldName ) : Promise < Iexist > ; param { string [ ] } keys returns { Promise < any > } collectionSanitize ( keys ) : Promise < null > ; /**
     * Clear the entire datastore
     */ clear ( ) : Promise < null > ; } /**
 * Used to insert object into exists -> Key needs to be the search term and value needs t be the values of that
 * search term
 */ export interface Isanitize { key : any ; value : any ; } /**
 * Return object interface for the exists method of the storage driver.
 */ export interface Iexist { key : any ; value : string ; doesExist : boolean ; index : any ; fieldName : string ; }