Built motion from commit (unavailable).|2.0.76
[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 _0x5a08=['../../mysqldb','VoiceQueueReport','setMaxListeners','save','update','emit','hasOwnProperty','hook','exports','events'];(function(_0x4fb260,_0x3f502a){var _0x17f5df=function(_0x16095c){while(--_0x16095c){_0x4fb260['push'](_0x4fb260['shift']());}};_0x17f5df(++_0x3f502a);}(_0x5a08,0x117));var _0x85a0=function(_0x1b2b81,_0x301414){_0x1b2b81=_0x1b2b81-0x0;var _0x27cc3a=_0x5a08[_0x1b2b81];return _0x27cc3a;};'use strict';var EventEmitter=require(_0x85a0('0x0'));var VoiceQueueReport=require(_0x85a0('0x1'))['db'][_0x85a0('0x2')];var VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents[_0x85a0('0x3')](0x0);var events={'afterCreate':_0x85a0('0x4'),'afterUpdate':_0x85a0('0x5'),'afterDestroy':'remove'};function emitEvent(_0x52f0f9){return function(_0x3c4cb7,_0x1d4d13,_0x3f731d){VoiceQueueReportEvents[_0x85a0('0x6')](_0x52f0f9+':'+_0x3c4cb7['id'],_0x3c4cb7);VoiceQueueReportEvents[_0x85a0('0x6')](_0x52f0f9,_0x3c4cb7);_0x3f731d(null);};}for(var e in events){if(events[_0x85a0('0x7')](e)){var event=events[e];VoiceQueueReport[_0x85a0('0x8')](e,emitEvent(event));}}module[_0x85a0('0x9')]=VoiceQueueReportEvents;