Built motion from commit (unavailable).|2.5.1
[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 _0xb726=['hasOwnProperty','events','../../mysqldb','VoiceQueueReport','setMaxListeners','update','emit'];(function(_0x28c768,_0x2032aa){var _0x31ab36=function(_0x134170){while(--_0x134170){_0x28c768['push'](_0x28c768['shift']());}};_0x31ab36(++_0x2032aa);}(_0xb726,0x182));var _0x6b72=function(_0x5526c4,_0x4e77eb){_0x5526c4=_0x5526c4-0x0;var _0x165ff8=_0xb726[_0x5526c4];return _0x165ff8;};'use strict';var EventEmitter=require(_0x6b72('0x0'));var VoiceQueueReport=require(_0x6b72('0x1'))['db'][_0x6b72('0x2')];var VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents[_0x6b72('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':_0x6b72('0x4'),'afterDestroy':'remove'};function emitEvent(_0x29991e){return function(_0x5e36dc,_0x112239,_0x47b4eb){VoiceQueueReportEvents[_0x6b72('0x5')](_0x29991e+':'+_0x5e36dc['id'],_0x5e36dc);VoiceQueueReportEvents[_0x6b72('0x5')](_0x29991e,_0x5e36dc);_0x47b4eb(null);};}for(var e in events){if(events[_0x6b72('0x6')](e)){var event=events[e];VoiceQueueReport['hook'](e,emitEvent(event));}}module['exports']=VoiceQueueReportEvents;