7a512616262c4c870bdfd7d757257150ba962076
[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 _0xbbce=['exports','events','../../mysqldb','VoiceQueueReport','setMaxListeners','save','update','emit','hasOwnProperty','hook'];(function(_0x273c39,_0x1052e6){var _0x46d6b5=function(_0x44f1fb){while(--_0x44f1fb){_0x273c39['push'](_0x273c39['shift']());}};_0x46d6b5(++_0x1052e6);}(_0xbbce,0x155));var _0xebbc=function(_0x4b2b42,_0x14ad3f){_0x4b2b42=_0x4b2b42-0x0;var _0x33a973=_0xbbce[_0x4b2b42];return _0x33a973;};'use strict';var EventEmitter=require(_0xebbc('0x0'));var VoiceQueueReport=require(_0xebbc('0x1'))['db'][_0xebbc('0x2')];var VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents[_0xebbc('0x3')](0x0);var events={'afterCreate':_0xebbc('0x4'),'afterUpdate':_0xebbc('0x5'),'afterDestroy':'remove'};function emitEvent(_0x201f5b){return function(_0x833ca3,_0x4c4710,_0xf5f336){VoiceQueueReportEvents[_0xebbc('0x6')](_0x201f5b+':'+_0x833ca3['id'],_0x833ca3);VoiceQueueReportEvents[_0xebbc('0x6')](_0x201f5b,_0x833ca3);_0xf5f336(null);};}for(var e in events){if(events[_0xebbc('0x7')](e)){var event=events[e];VoiceQueueReport[_0xebbc('0x8')](e,emitEvent(event));}}module[_0xebbc('0x9')]=VoiceQueueReportEvents;