Built motion from commit d301b742.|2.6.29
[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 _0x2e99=['remove','emit','hasOwnProperty','hook','exports','events','setMaxListeners','save'];(function(_0xbca1b1,_0x33f0ce){var _0x4e1686=function(_0x58a80c){while(--_0x58a80c){_0xbca1b1['push'](_0xbca1b1['shift']());}};_0x4e1686(++_0x33f0ce);}(_0x2e99,0x195));var _0x92e9=function(_0x42a8bd,_0x4594c4){_0x42a8bd=_0x42a8bd-0x0;var _0x3d5453=_0x2e99[_0x42a8bd];return _0x3d5453;};'use strict';var EventEmitter=require(_0x92e9('0x0'));var VoiceQueueReport=require('../../mysqldb')['db']['VoiceQueueReport'];var VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents[_0x92e9('0x1')](0x0);var events={'afterCreate':_0x92e9('0x2'),'afterUpdate':'update','afterDestroy':_0x92e9('0x3')};function emitEvent(_0x28eed5){return function(_0x3cba67,_0x14287a,_0x26dbdf){VoiceQueueReportEvents[_0x92e9('0x4')](_0x28eed5+':'+_0x3cba67['id'],_0x3cba67);VoiceQueueReportEvents[_0x92e9('0x4')](_0x28eed5,_0x3cba67);_0x26dbdf(null);};}for(var e in events){if(events[_0x92e9('0x5')](e)){var event=events[e];VoiceQueueReport[_0x92e9('0x6')](e,emitEvent(event));}}module[_0x92e9('0x7')]=VoiceQueueReportEvents;