f28c7ccdcba49a1fd8c898f65839ea014b01f3b9
[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 _0xcb77=['exports','events','../../mysqldb','VoiceQueueReport','save','remove','emit','hasOwnProperty','hook'];(function(_0x47b7c9,_0x3848b2){var _0x435aaf=function(_0x3befc4){while(--_0x3befc4){_0x47b7c9['push'](_0x47b7c9['shift']());}};_0x435aaf(++_0x3848b2);}(_0xcb77,0x157));var _0x7cb7=function(_0x1c0991,_0x4f22d2){_0x1c0991=_0x1c0991-0x0;var _0x5034de=_0xcb77[_0x1c0991];return _0x5034de;};'use strict';var EventEmitter=require(_0x7cb7('0x0'));var VoiceQueueReport=require(_0x7cb7('0x1'))['db'][_0x7cb7('0x2')];var VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x7cb7('0x3'),'afterUpdate':'update','afterDestroy':_0x7cb7('0x4')};function emitEvent(_0x56b81a){return function(_0x1e1ab6,_0x2e1c4e,_0x2627e9){VoiceQueueReportEvents[_0x7cb7('0x5')](_0x56b81a+':'+_0x1e1ab6['id'],_0x1e1ab6);VoiceQueueReportEvents[_0x7cb7('0x5')](_0x56b81a,_0x1e1ab6);_0x2627e9(null);};}for(var e in events){if(events[_0x7cb7('0x6')](e)){var event=events[e];VoiceQueueReport[_0x7cb7('0x7')](e,emitEvent(event));}}module[_0x7cb7('0x8')]=VoiceQueueReportEvents;