Built motion from commit 9e1399f3.|2.5.37
[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 _0xda36=['events','../../mysqldb','VoiceQueueReport','update','remove','emit','hasOwnProperty','hook'];(function(_0x54286b,_0x59bf38){var _0x99940f=function(_0x4a5bc2){while(--_0x4a5bc2){_0x54286b['push'](_0x54286b['shift']());}};_0x99940f(++_0x59bf38);}(_0xda36,0x108));var _0x6da3=function(_0x479016,_0x4b36fa){_0x479016=_0x479016-0x0;var _0x5caacf=_0xda36[_0x479016];return _0x5caacf;};'use strict';var EventEmitter=require(_0x6da3('0x0'));var VoiceQueueReport=require(_0x6da3('0x1'))['db'][_0x6da3('0x2')];var VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':_0x6da3('0x3'),'afterDestroy':_0x6da3('0x4')};function emitEvent(_0x119dac){return function(_0x26e7e3,_0x39904e,_0x46f3b2){VoiceQueueReportEvents[_0x6da3('0x5')](_0x119dac+':'+_0x26e7e3['id'],_0x26e7e3);VoiceQueueReportEvents[_0x6da3('0x5')](_0x119dac,_0x26e7e3);_0x46f3b2(null);};}for(var e in events){if(events[_0x6da3('0x6')](e)){var event=events[e];VoiceQueueReport[_0x6da3('0x7')](e,emitEvent(event));}}module['exports']=VoiceQueueReportEvents;