80dc1081c61dcf48dbcb780ab29f878f91d7e0b0
[motion2.git] / server / api / voiceQueueReport / voiceQueueReport.events.js
1 // *************************************************************************
2 // *                                                                       *
3 // * xCALLY Motion -  The Omnichannel Contact Center                       *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved                     *
5 // *                                                                       *
6 // *************************************************************************
7 // *                                                                       *
8 // * Email: info@xcally.com                                                *
9 // * Website: https://www.xcally.com                                       *
10 // *                                                                       *
11 // *************************************************************************
12 // *                                                                       *
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.                         *
16 // *                                                                       *
17 // *************************************************************************
18 var _0xd024=['remove','emit','hasOwnProperty','events','../../mysqldb','VoiceQueueReport','save'];(function(_0x4e3c7d,_0x44c1c7){var _0x1f5735=function(_0x131a70){while(--_0x131a70){_0x4e3c7d['push'](_0x4e3c7d['shift']());}};_0x1f5735(++_0x44c1c7);}(_0xd024,0x114));var _0x4d02=function(_0x19aea4,_0x38fe97){_0x19aea4=_0x19aea4-0x0;var _0x5cfcad=_0xd024[_0x19aea4];return _0x5cfcad;};'use strict';var EventEmitter=require(_0x4d02('0x0'));var VoiceQueueReport=require(_0x4d02('0x1'))['db'][_0x4d02('0x2')];var VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x4d02('0x3'),'afterUpdate':'update','afterDestroy':_0x4d02('0x4')};function emitEvent(_0x29a1aa){return function(_0xd1b806,_0x585b9a,_0x4f5a04){VoiceQueueReportEvents[_0x4d02('0x5')](_0x29a1aa+':'+_0xd1b806['id'],_0xd1b806);VoiceQueueReportEvents['emit'](_0x29a1aa,_0xd1b806);_0x4f5a04(null);};}for(var e in events){if(events[_0x4d02('0x6')](e)){var event=events[e];VoiceQueueReport['hook'](e,emitEvent(event));}}module['exports']=VoiceQueueReportEvents;