280f48868b768adf1f95a8cd939075448ba9334a
[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 _0xa516=['VoiceQueueReport','setMaxListeners','update','emit','hasOwnProperty','exports','events','../../mysqldb'];(function(_0x408828,_0x3f348c){var _0x4cbdec=function(_0x61c756){while(--_0x61c756){_0x408828['push'](_0x408828['shift']());}};_0x4cbdec(++_0x3f348c);}(_0xa516,0x1d6));var _0x6a51=function(_0x435627,_0x1405d2){_0x435627=_0x435627-0x0;var _0x553dbe=_0xa516[_0x435627];return _0x553dbe;};'use strict';var EventEmitter=require(_0x6a51('0x0'));var VoiceQueueReport=require(_0x6a51('0x1'))['db'][_0x6a51('0x2')];var VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents[_0x6a51('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':_0x6a51('0x4'),'afterDestroy':'remove'};function emitEvent(_0x153530){return function(_0x629ec7,_0x25e8b1,_0x7d91b4){VoiceQueueReportEvents[_0x6a51('0x5')](_0x153530+':'+_0x629ec7['id'],_0x629ec7);VoiceQueueReportEvents[_0x6a51('0x5')](_0x153530,_0x629ec7);_0x7d91b4(null);};}for(var e in events){if(events[_0x6a51('0x6')](e)){var event=events[e];VoiceQueueReport['hook'](e,emitEvent(event));}}module[_0x6a51('0x7')]=VoiceQueueReportEvents;