Built motion from commit 639a1a7f.|2.6.19
[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 _0x48e6=['update','remove','emit','hook','../../mysqldb','save'];(function(_0x5c0034,_0x2ab9b7){var _0x59b18f=function(_0x47043b){while(--_0x47043b){_0x5c0034['push'](_0x5c0034['shift']());}};_0x59b18f(++_0x2ab9b7);}(_0x48e6,0x1b4));var _0x648e=function(_0x595a6e,_0x199124){_0x595a6e=_0x595a6e-0x0;var _0x399445=_0x48e6[_0x595a6e];return _0x399445;};'use strict';var EventEmitter=require('events');var VoiceQueueReport=require(_0x648e('0x0'))['db']['VoiceQueueReport'];var VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x648e('0x1'),'afterUpdate':_0x648e('0x2'),'afterDestroy':_0x648e('0x3')};function emitEvent(_0x167709){return function(_0x46500d,_0x3964af,_0x5c47dc){VoiceQueueReportEvents['emit'](_0x167709+':'+_0x46500d['id'],_0x46500d);VoiceQueueReportEvents[_0x648e('0x4')](_0x167709,_0x46500d);_0x5c47dc(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];VoiceQueueReport[_0x648e('0x5')](e,emitEvent(event));}}module['exports']=VoiceQueueReportEvents;