Built motion from commit (unavailable).|2.5.28
[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 _0xa071=['exports','events','VoiceQueueReport','save','update','emit','hasOwnProperty','hook'];(function(_0x158103,_0x4156fc){var _0x533746=function(_0x37a0d1){while(--_0x37a0d1){_0x158103['push'](_0x158103['shift']());}};_0x533746(++_0x4156fc);}(_0xa071,0x179));var _0x1a07=function(_0x57e50b,_0x16e856){_0x57e50b=_0x57e50b-0x0;var _0x4a1016=_0xa071[_0x57e50b];return _0x4a1016;};'use strict';var EventEmitter=require(_0x1a07('0x0'));var VoiceQueueReport=require('../../mysqldb')['db'][_0x1a07('0x1')];var VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x1a07('0x2'),'afterUpdate':_0x1a07('0x3'),'afterDestroy':'remove'};function emitEvent(_0x59b018){return function(_0x5db14e,_0x419d2a,_0x457d5e){VoiceQueueReportEvents[_0x1a07('0x4')](_0x59b018+':'+_0x5db14e['id'],_0x5db14e);VoiceQueueReportEvents[_0x1a07('0x4')](_0x59b018,_0x5db14e);_0x457d5e(null);};}for(var e in events){if(events[_0x1a07('0x5')](e)){var event=events[e];VoiceQueueReport[_0x1a07('0x6')](e,emitEvent(event));}}module[_0x1a07('0x7')]=VoiceQueueReportEvents;