declare var module ; declare var require ; declare var Object ; import * as async from 'async' ; const LoopBackContext = require ( 'loopback-context' ) ; module author Jonathan Casarrubias <@johncasarrubias>
 *  description class FireLoopMixin { constructor ( Model , options ) { options = Object . assign ( { filters : { } } , options ) ; Model . observe ( 'after save' , ( ctx , next ) => { Model . app . mx . IO . driver . server . to ( 'flint' ) . emit ( 'create-hook' , { modelName : ctx . Model . modelName , data : ctx . instance , created : ctx . isNewInstance } ) ; next ( ) ; } ) ; Model . observe ( 'after delete' , ( ctx , next ) => { Model . app . mx . IO . driver . server . to ( 'flint' ) . emit ( 'delete-hook' , { modelName : ctx . Model . modelName , data : ctx . where } ) ; next ( ) ; } ) ; } ; } module . exports = FireLoopMixin ;