Built motion from commit (unavailable).|2.5.21
[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 _0x50d6=['update','remove','emit','hook','exports','events'];(function(_0x4e74b5,_0xfed21a){var _0x2b4a5=function(_0x36fe52){while(--_0x36fe52){_0x4e74b5['push'](_0x4e74b5['shift']());}};_0x2b4a5(++_0xfed21a);}(_0x50d6,0x161));var _0x650d=function(_0x16acb7,_0x23f034){_0x16acb7=_0x16acb7-0x0;var _0x39bf39=_0x50d6[_0x16acb7];return _0x39bf39;};'use strict';var EventEmitter=require(_0x650d('0x0'));var VoiceQueueReport=require('../../mysqldb')['db']['VoiceQueueReport'];var VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':_0x650d('0x1'),'afterDestroy':_0x650d('0x2')};function emitEvent(_0x45e5ec){return function(_0x3a629c,_0x39ad43,_0x5b8d17){VoiceQueueReportEvents[_0x650d('0x3')](_0x45e5ec+':'+_0x3a629c['id'],_0x3a629c);VoiceQueueReportEvents[_0x650d('0x3')](_0x45e5ec,_0x3a629c);_0x5b8d17(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];VoiceQueueReport[_0x650d('0x4')](e,emitEvent(event));}}module[_0x650d('0x5')]=VoiceQueueReportEvents;