Built motion from commit (unavailable).|2.5.0
[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 _0xfb9a=['update','remove','emit','hasOwnProperty','hook','events','../../mysqldb','VoiceQueueReport','setMaxListeners'];(function(_0x31a576,_0x424419){var _0x30b1d3=function(_0x4710e8){while(--_0x4710e8){_0x31a576['push'](_0x31a576['shift']());}};_0x30b1d3(++_0x424419);}(_0xfb9a,0x1f4));var _0xafb9=function(_0x1104b5,_0x2cab74){_0x1104b5=_0x1104b5-0x0;var _0x1ed491=_0xfb9a[_0x1104b5];return _0x1ed491;};'use strict';var EventEmitter=require(_0xafb9('0x0'));var VoiceQueueReport=require(_0xafb9('0x1'))['db'][_0xafb9('0x2')];var VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents[_0xafb9('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':_0xafb9('0x4'),'afterDestroy':_0xafb9('0x5')};function emitEvent(_0xd6a89d){return function(_0x2a358e,_0x1c4692,_0x4bc3d3){VoiceQueueReportEvents[_0xafb9('0x6')](_0xd6a89d+':'+_0x2a358e['id'],_0x2a358e);VoiceQueueReportEvents[_0xafb9('0x6')](_0xd6a89d,_0x2a358e);_0x4bc3d3(null);};}for(var e in events){if(events[_0xafb9('0x7')](e)){var event=events[e];VoiceQueueReport[_0xafb9('0x8')](e,emitEvent(event));}}module['exports']=VoiceQueueReportEvents;