import * as apid from '../../../api' ; export interface RuleWithCnt extends apid . Rule { updateCnt : number ; } export default interface IRuleDB { restore ( items ) : Promise < void > ; insertOnce ( rule ) : Promise < apid . RuleId > ; updateOnce ( rule ) : Promise < void > ; enableOnce ( ruleId ) : Promise < void > ; disableOnce ( ruleId ) : Promise < void > ; deleteOnce ( ruleId ) : Promise < void > ; findId ( ruleId , isNeedCnt ? ) : Promise < apid . Rule | RuleWithCnt | null > ; findAll ( option , isNeedCnt ? ) : Promise < [ apid . Rule [ ] | RuleWithCnt [ ] , number ] > ; findKeyword ( option ) : Promise < apid . RuleKeywordItem [ ] > ; getIds ( ) : Promise < apid . RuleId [ ] > ; }