Built motion from commit b0a9a629.|2.6.33
[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 _0xb6a9=['events','../../mysqldb','setMaxListeners','update','remove','emit','exports'];(function(_0x2da357,_0x1f9b2f){var _0x138fdd=function(_0xe3077d){while(--_0xe3077d){_0x2da357['push'](_0x2da357['shift']());}};_0x138fdd(++_0x1f9b2f);}(_0xb6a9,0x165));var _0x9b6a=function(_0x580576,_0x2f107d){_0x580576=_0x580576-0x0;var _0x3f55a0=_0xb6a9[_0x580576];return _0x3f55a0;};'use strict';var EventEmitter=require(_0x9b6a('0x0'));var VoiceQueueReport=require(_0x9b6a('0x1'))['db']['VoiceQueueReport'];var VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents[_0x9b6a('0x2')](0x0);var events={'afterCreate':'save','afterUpdate':_0x9b6a('0x3'),'afterDestroy':_0x9b6a('0x4')};function emitEvent(_0x5efbdf){return function(_0x542605,_0x520df4,_0x58acff){VoiceQueueReportEvents[_0x9b6a('0x5')](_0x5efbdf+':'+_0x542605['id'],_0x542605);VoiceQueueReportEvents[_0x9b6a('0x5')](_0x5efbdf,_0x542605);_0x58acff(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];VoiceQueueReport['hook'](e,emitEvent(event));}}module[_0x9b6a('0x6')]=VoiceQueueReportEvents;