Built motion from commit b5996064.|2.6.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 _0xeb60=['save','remove','emit','exports','../../mysqldb','VoiceQueueReport','setMaxListeners'];(function(_0x29d6e6,_0x264220){var _0xc75ff0=function(_0x214f6b){while(--_0x214f6b){_0x29d6e6['push'](_0x29d6e6['shift']());}};_0xc75ff0(++_0x264220);}(_0xeb60,0xf9));var _0x0eb6=function(_0x34fa91,_0x43f1de){_0x34fa91=_0x34fa91-0x0;var _0xca24ad=_0xeb60[_0x34fa91];return _0xca24ad;};'use strict';var EventEmitter=require('events');var VoiceQueueReport=require(_0x0eb6('0x0'))['db'][_0x0eb6('0x1')];var VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents[_0x0eb6('0x2')](0x0);var events={'afterCreate':_0x0eb6('0x3'),'afterUpdate':'update','afterDestroy':_0x0eb6('0x4')};function emitEvent(_0x1b928d){return function(_0x346c48,_0x1dafd3,_0x5bafc7){VoiceQueueReportEvents[_0x0eb6('0x5')](_0x1b928d+':'+_0x346c48['id'],_0x346c48);VoiceQueueReportEvents[_0x0eb6('0x5')](_0x1b928d,_0x346c48);_0x5bafc7(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];VoiceQueueReport['hook'](e,emitEvent(event));}}module[_0x0eb6('0x6')]=VoiceQueueReportEvents;