Built motion from commit d5e4af8c.|2.6.23
[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 _0x4d92=['VoiceQueueReport','setMaxListeners','save','update','emit','exports','events','../../mysqldb'];(function(_0x36dfbd,_0x5bfe2d){var _0x4ecad9=function(_0x5230da){while(--_0x5230da){_0x36dfbd['push'](_0x36dfbd['shift']());}};_0x4ecad9(++_0x5bfe2d);}(_0x4d92,0x1ee));var _0x24d9=function(_0xc4001c,_0x1bf8f0){_0xc4001c=_0xc4001c-0x0;var _0x49f7bc=_0x4d92[_0xc4001c];return _0x49f7bc;};'use strict';var EventEmitter=require(_0x24d9('0x0'));var VoiceQueueReport=require(_0x24d9('0x1'))['db'][_0x24d9('0x2')];var VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents[_0x24d9('0x3')](0x0);var events={'afterCreate':_0x24d9('0x4'),'afterUpdate':_0x24d9('0x5'),'afterDestroy':'remove'};function emitEvent(_0x5b2066){return function(_0x1103f1,_0x2e8423,_0x1ae8dc){VoiceQueueReportEvents[_0x24d9('0x6')](_0x5b2066+':'+_0x1103f1['id'],_0x1103f1);VoiceQueueReportEvents['emit'](_0x5b2066,_0x1103f1);_0x1ae8dc(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];VoiceQueueReport['hook'](e,emitEvent(event));}}module[_0x24d9('0x7')]=VoiceQueueReportEvents;