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 _0xcba6=['hook','events','../../mysqldb','update','remove','emit','hasOwnProperty'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0xcba6,0xfd));var _0x6cba=function(_0x9fd887,_0x47f76c){_0x9fd887=_0x9fd887-0x0;var _0x1a54ab=_0xcba6[_0x9fd887];return _0x1a54ab;};'use strict';var EventEmitter=require(_0x6cba('0x0'));var FaxAccount=require(_0x6cba('0x1'))['db']['FaxAccount'];var FaxAccountEvents=new EventEmitter();FaxAccountEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':_0x6cba('0x2'),'afterDestroy':_0x6cba('0x3')};function emitEvent(_0x480106){return function(_0x353002,_0x37baea,_0x8d4bcf){FaxAccountEvents[_0x6cba('0x4')](_0x480106+':'+_0x353002['id'],_0x353002);FaxAccountEvents['emit'](_0x480106,_0x353002);_0x8d4bcf(null);};}for(var e in events){if(events[_0x6cba('0x5')](e)){var event=events[e];FaxAccount[_0x6cba('0x6')](e,emitEvent(event));}}module['exports']=FaxAccountEvents;