6d54b7212427e664affedca1d4cff4847846958f
[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 _0xe61b=['setMaxListeners','save','emit','hook','exports','events','../../mysqldb','VoiceQueueReport'];(function(_0x1c078a,_0x2207bd){var _0x47a80a=function(_0x58aa5d){while(--_0x58aa5d){_0x1c078a['push'](_0x1c078a['shift']());}};_0x47a80a(++_0x2207bd);}(_0xe61b,0x19d));var _0xbe61=function(_0x39e84d,_0x11931d){_0x39e84d=_0x39e84d-0x0;var _0x1991bc=_0xe61b[_0x39e84d];return _0x1991bc;};'use strict';var EventEmitter=require(_0xbe61('0x0'));var VoiceQueueReport=require(_0xbe61('0x1'))['db'][_0xbe61('0x2')];var VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents[_0xbe61('0x3')](0x0);var events={'afterCreate':_0xbe61('0x4'),'afterUpdate':'update','afterDestroy':'remove'};function emitEvent(_0x35005f){return function(_0xab1bc,_0x3691e1,_0x129c2f){VoiceQueueReportEvents[_0xbe61('0x5')](_0x35005f+':'+_0xab1bc['id'],_0xab1bc);VoiceQueueReportEvents[_0xbe61('0x5')](_0x35005f,_0xab1bc);_0x129c2f(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];VoiceQueueReport[_0xbe61('0x6')](e,emitEvent(event));}}module[_0xbe61('0x7')]=VoiceQueueReportEvents;