Built motion from commit 85328c08.|2.5.50
[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 _0xc864=['VoiceQueueReport','setMaxListeners','save','update','remove','emit','hook','exports','events'];(function(_0x34d57c,_0x114150){var _0x2b01ad=function(_0xd77311){while(--_0xd77311){_0x34d57c['push'](_0x34d57c['shift']());}};_0x2b01ad(++_0x114150);}(_0xc864,0x1a6));var _0x4c86=function(_0xc62010,_0x18db7d){_0xc62010=_0xc62010-0x0;var _0x5777bf=_0xc864[_0xc62010];return _0x5777bf;};'use strict';var EventEmitter=require(_0x4c86('0x0'));var VoiceQueueReport=require('../../mysqldb')['db'][_0x4c86('0x1')];var VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents[_0x4c86('0x2')](0x0);var events={'afterCreate':_0x4c86('0x3'),'afterUpdate':_0x4c86('0x4'),'afterDestroy':_0x4c86('0x5')};function emitEvent(_0x57620d){return function(_0x103bf7,_0x277834,_0x239172){VoiceQueueReportEvents[_0x4c86('0x6')](_0x57620d+':'+_0x103bf7['id'],_0x103bf7);VoiceQueueReportEvents['emit'](_0x57620d,_0x103bf7);_0x239172(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];VoiceQueueReport[_0x4c86('0x7')](e,emitEvent(event));}}module[_0x4c86('0x8')]=VoiceQueueReportEvents;