4f21f4d1dd67000ce61c1f481eeff677951fa0a9
[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 _0xe47c=['VoiceQueueReport','save','update','remove','emit','hasOwnProperty','../../mysqldb'];(function(_0x517699,_0x33f88d){var _0x2cb34a=function(_0x3f2beb){while(--_0x3f2beb){_0x517699['push'](_0x517699['shift']());}};_0x2cb34a(++_0x33f88d);}(_0xe47c,0xd8));var _0xce47=function(_0x50bf4b,_0x2295f4){_0x50bf4b=_0x50bf4b-0x0;var _0x292031=_0xe47c[_0x50bf4b];return _0x292031;};'use strict';var EventEmitter=require('events');var VoiceQueueReport=require(_0xce47('0x0'))['db'][_0xce47('0x1')];var VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xce47('0x2'),'afterUpdate':_0xce47('0x3'),'afterDestroy':_0xce47('0x4')};function emitEvent(_0xf2abce){return function(_0x1cc0ff,_0x154b8e,_0x2e31fb){VoiceQueueReportEvents['emit'](_0xf2abce+':'+_0x1cc0ff['id'],_0x1cc0ff);VoiceQueueReportEvents[_0xce47('0x5')](_0xf2abce,_0x1cc0ff);_0x2e31fb(null);};}for(var e in events){if(events[_0xce47('0x6')](e)){var event=events[e];VoiceQueueReport['hook'](e,emitEvent(event));}}module['exports']=VoiceQueueReportEvents;