700fb562352f9d31076fb693bd14f553cfa14038
[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 _0xbc88=['VoiceQueueReport','emit','hasOwnProperty','hook','exports','events','../../mysqldb'];(function(_0x2112d4,_0x3c863c){var _0x434972=function(_0x477020){while(--_0x477020){_0x2112d4['push'](_0x2112d4['shift']());}};_0x434972(++_0x3c863c);}(_0xbc88,0x67));var _0x8bc8=function(_0x288c5a,_0x3f65f1){_0x288c5a=_0x288c5a-0x0;var _0x28354f=_0xbc88[_0x288c5a];return _0x28354f;};'use strict';var EventEmitter=require(_0x8bc8('0x0'));var VoiceQueueReport=require(_0x8bc8('0x1'))['db'][_0x8bc8('0x2')];var VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':'remove'};function emitEvent(_0x179124){return function(_0x11ccc5,_0x1ae28a,_0x1c23bf){VoiceQueueReportEvents[_0x8bc8('0x3')](_0x179124+':'+_0x11ccc5['id'],_0x11ccc5);VoiceQueueReportEvents['emit'](_0x179124,_0x11ccc5);_0x1c23bf(null);};}for(var e in events){if(events[_0x8bc8('0x4')](e)){var event=events[e];VoiceQueueReport[_0x8bc8('0x5')](e,emitEvent(event));}}module[_0x8bc8('0x6')]=VoiceQueueReportEvents;