Built motion from commit 25580385.|2.6.2
[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 _0x2994=['VoiceQueueReport','setMaxListeners','save','update','emit','hasOwnProperty','hook','exports','events','../../mysqldb'];(function(_0x48f8b2,_0x45e08c){var _0x3c8a1a=function(_0x277b41){while(--_0x277b41){_0x48f8b2['push'](_0x48f8b2['shift']());}};_0x3c8a1a(++_0x45e08c);}(_0x2994,0xc6));var _0x4299=function(_0x22d202,_0xfcd670){_0x22d202=_0x22d202-0x0;var _0x3cb212=_0x2994[_0x22d202];return _0x3cb212;};'use strict';var EventEmitter=require(_0x4299('0x0'));var VoiceQueueReport=require(_0x4299('0x1'))['db'][_0x4299('0x2')];var VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents[_0x4299('0x3')](0x0);var events={'afterCreate':_0x4299('0x4'),'afterUpdate':_0x4299('0x5'),'afterDestroy':'remove'};function emitEvent(_0x164d84){return function(_0x3a3ba5,_0x1818f1,_0x189274){VoiceQueueReportEvents['emit'](_0x164d84+':'+_0x3a3ba5['id'],_0x3a3ba5);VoiceQueueReportEvents[_0x4299('0x6')](_0x164d84,_0x3a3ba5);_0x189274(null);};}for(var e in events){if(events[_0x4299('0x7')](e)){var event=events[e];VoiceQueueReport[_0x4299('0x8')](e,emitEvent(event));}}module[_0x4299('0x9')]=VoiceQueueReportEvents;