Built motion from commit (unavailable).|2.5.10
[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 _0x39de=['setMaxListeners','save','remove','emit','hasOwnProperty','hook','exports','events','VoiceQueueReport'];(function(_0x45b1ba,_0x5a6a21){var _0x145ddb=function(_0x650d42){while(--_0x650d42){_0x45b1ba['push'](_0x45b1ba['shift']());}};_0x145ddb(++_0x5a6a21);}(_0x39de,0xcd));var _0xe39d=function(_0x3eb450,_0x592b0a){_0x3eb450=_0x3eb450-0x0;var _0x2c4cfd=_0x39de[_0x3eb450];return _0x2c4cfd;};'use strict';var EventEmitter=require(_0xe39d('0x0'));var VoiceQueueReport=require('../../mysqldb')['db'][_0xe39d('0x1')];var VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents[_0xe39d('0x2')](0x0);var events={'afterCreate':_0xe39d('0x3'),'afterUpdate':'update','afterDestroy':_0xe39d('0x4')};function emitEvent(_0x556522){return function(_0x29fe2a,_0x3063bb,_0x2e3bbd){VoiceQueueReportEvents[_0xe39d('0x5')](_0x556522+':'+_0x29fe2a['id'],_0x29fe2a);VoiceQueueReportEvents[_0xe39d('0x5')](_0x556522,_0x29fe2a);_0x2e3bbd(null);};}for(var e in events){if(events[_0xe39d('0x6')](e)){var event=events[e];VoiceQueueReport[_0xe39d('0x7')](e,emitEvent(event));}}module[_0xe39d('0x8')]=VoiceQueueReportEvents;