Built motion from commit da24aabd.|2.6.20
[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 _0xf5da=['VoiceQueueReport','setMaxListeners','save','remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb'];(function(_0x31cb5f,_0x2df766){var _0x586042=function(_0x53c807){while(--_0x53c807){_0x31cb5f['push'](_0x31cb5f['shift']());}};_0x586042(++_0x2df766);}(_0xf5da,0xf8));var _0xaf5d=function(_0x3f670b,_0x10f414){_0x3f670b=_0x3f670b-0x0;var _0x1c0978=_0xf5da[_0x3f670b];return _0x1c0978;};'use strict';var EventEmitter=require(_0xaf5d('0x0'));var VoiceQueueReport=require(_0xaf5d('0x1'))['db'][_0xaf5d('0x2')];var VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents[_0xaf5d('0x3')](0x0);var events={'afterCreate':_0xaf5d('0x4'),'afterUpdate':'update','afterDestroy':_0xaf5d('0x5')};function emitEvent(_0x1b1cba){return function(_0x4472f3,_0x30f49c,_0x48082f){VoiceQueueReportEvents[_0xaf5d('0x6')](_0x1b1cba+':'+_0x4472f3['id'],_0x4472f3);VoiceQueueReportEvents[_0xaf5d('0x6')](_0x1b1cba,_0x4472f3);_0x48082f(null);};}for(var e in events){if(events[_0xaf5d('0x7')](e)){var event=events[e];VoiceQueueReport[_0xaf5d('0x8')](e,emitEvent(event));}}module[_0xaf5d('0x9')]=VoiceQueueReportEvents;