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 _0x683f=['../../mysqldb','FaxQueue','setMaxListeners','save','update','remove','emit','hook','events'];(function(_0x1a5467,_0x306afe){var _0x69bf05=function(_0x12919c){while(--_0x12919c){_0x1a5467['push'](_0x1a5467['shift']());}};_0x69bf05(++_0x306afe);}(_0x683f,0x19d));var _0xf683=function(_0x3e478c,_0x152670){_0x3e478c=_0x3e478c-0x0;var _0x29ef89=_0x683f[_0x3e478c];return _0x29ef89;};'use strict';var EventEmitter=require(_0xf683('0x0'));var FaxQueue=require(_0xf683('0x1'))['db'][_0xf683('0x2')];var FaxQueueEvents=new EventEmitter();FaxQueueEvents[_0xf683('0x3')](0x0);var events={'afterCreate':_0xf683('0x4'),'afterUpdate':_0xf683('0x5'),'afterDestroy':_0xf683('0x6')};function emitEvent(_0x28d2b4){return function(_0x4d6c7d,_0x2cf613,_0xba964d){FaxQueueEvents[_0xf683('0x7')](_0x28d2b4+':'+_0x4d6c7d['id'],_0x4d6c7d);FaxQueueEvents[_0xf683('0x7')](_0x28d2b4,_0x4d6c7d);_0xba964d(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];FaxQueue[_0xf683('0x8')](e,emitEvent(event));}}module['exports']=FaxQueueEvents;