Built motion from commit 9b156c94.|2.6.22
[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 _0x4cc9=['hook','exports','events','../../mysqldb','VoiceQueueReport','setMaxListeners','update','emit'];(function(_0x5b825e,_0x10f033){var _0x29f4f2=function(_0x533e5f){while(--_0x533e5f){_0x5b825e['push'](_0x5b825e['shift']());}};_0x29f4f2(++_0x10f033);}(_0x4cc9,0x15a));var _0x94cc=function(_0x545266,_0x440488){_0x545266=_0x545266-0x0;var _0x3d454e=_0x4cc9[_0x545266];return _0x3d454e;};'use strict';var EventEmitter=require(_0x94cc('0x0'));var VoiceQueueReport=require(_0x94cc('0x1'))['db'][_0x94cc('0x2')];var VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents[_0x94cc('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':_0x94cc('0x4'),'afterDestroy':'remove'};function emitEvent(_0x51d675){return function(_0x5c6739,_0x540439,_0x40bd02){VoiceQueueReportEvents[_0x94cc('0x5')](_0x51d675+':'+_0x5c6739['id'],_0x5c6739);VoiceQueueReportEvents[_0x94cc('0x5')](_0x51d675,_0x5c6739);_0x40bd02(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];VoiceQueueReport[_0x94cc('0x6')](e,emitEvent(event));}}module[_0x94cc('0x7')]=VoiceQueueReportEvents;