f466a26926c5caaf33d53827779779e553f4bbfe
[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 _0xbdee=['hook','exports','events','../../mysqldb','VoiceQueueReport','setMaxListeners','save','emit'];(function(_0x5ed781,_0x530807){var _0x45000d=function(_0x281f3a){while(--_0x281f3a){_0x5ed781['push'](_0x5ed781['shift']());}};_0x45000d(++_0x530807);}(_0xbdee,0xaa));var _0xebde=function(_0x5c39ec,_0x324bef){_0x5c39ec=_0x5c39ec-0x0;var _0x1a2a44=_0xbdee[_0x5c39ec];return _0x1a2a44;};'use strict';var EventEmitter=require(_0xebde('0x0'));var VoiceQueueReport=require(_0xebde('0x1'))['db'][_0xebde('0x2')];var VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents[_0xebde('0x3')](0x0);var events={'afterCreate':_0xebde('0x4'),'afterUpdate':'update','afterDestroy':'remove'};function emitEvent(_0x4e7fdc){return function(_0x3e9861,_0x5008c3,_0x1b5c21){VoiceQueueReportEvents[_0xebde('0x5')](_0x4e7fdc+':'+_0x3e9861['id'],_0x3e9861);VoiceQueueReportEvents[_0xebde('0x5')](_0x4e7fdc,_0x3e9861);_0x1b5c21(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];VoiceQueueReport[_0xebde('0x6')](e,emitEvent(event));}}module[_0xebde('0x7')]=VoiceQueueReportEvents;