1 // *************************************************************************
3 // * xCALLY Motion - The Omnichannel Contact Center *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved *
6 // *************************************************************************
8 // * Email: info@xcally.com *
9 // * Website: https://www.xcally.com *
11 // *************************************************************************
13 // * The SOFTWARE PRODUCT is protected by copyright laws and international *
14 // * copyright treaties, as well as other intellectual property laws and *
15 // * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
17 // *************************************************************************
18 var _0xd5bf=['save','update','remove','emit','hasOwnProperty','events','../../mysqldb','FaxAccount','setMaxListeners'];(function(_0x122096,_0x60c295){var _0x3d1966=function(_0x3d569e){while(--_0x3d569e){_0x122096['push'](_0x122096['shift']());}};_0x3d1966(++_0x60c295);}(_0xd5bf,0x1eb));var _0xfd5b=function(_0x10255f,_0x125b63){_0x10255f=_0x10255f-0x0;var _0x5ac535=_0xd5bf[_0x10255f];return _0x5ac535;};'use strict';var EventEmitter=require(_0xfd5b('0x0'));var FaxAccount=require(_0xfd5b('0x1'))['db'][_0xfd5b('0x2')];var FaxAccountEvents=new EventEmitter();FaxAccountEvents[_0xfd5b('0x3')](0x0);var events={'afterCreate':_0xfd5b('0x4'),'afterUpdate':_0xfd5b('0x5'),'afterDestroy':_0xfd5b('0x6')};function emitEvent(_0x3e038c){return function(_0x1eff53,_0x442f25,_0x278bdd){FaxAccountEvents[_0xfd5b('0x7')](_0x3e038c+':'+_0x1eff53['id'],_0x1eff53);FaxAccountEvents[_0xfd5b('0x7')](_0x3e038c,_0x1eff53);_0x278bdd(null);};}for(var e in events){if(events[_0xfd5b('0x8')](e)){var event=events[e];FaxAccount['hook'](e,emitEvent(event));}}module['exports']=FaxAccountEvents;