e12f74597f0421d635b33ad9725786aaed9d12c7
[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 _0x5c09=['VoiceQueueReport','setMaxListeners','update','remove','emit','hasOwnProperty','hook','../../mysqldb'];(function(_0x49bf98,_0x4fb309){var _0x10f771=function(_0x231838){while(--_0x231838){_0x49bf98['push'](_0x49bf98['shift']());}};_0x10f771(++_0x4fb309);}(_0x5c09,0x19f));var _0x95c0=function(_0xb6ddda,_0x180c4c){_0xb6ddda=_0xb6ddda-0x0;var _0x4760e2=_0x5c09[_0xb6ddda];return _0x4760e2;};'use strict';var EventEmitter=require('events');var VoiceQueueReport=require(_0x95c0('0x0'))['db'][_0x95c0('0x1')];var VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents[_0x95c0('0x2')](0x0);var events={'afterCreate':'save','afterUpdate':_0x95c0('0x3'),'afterDestroy':_0x95c0('0x4')};function emitEvent(_0x58b9d8){return function(_0x1815ba,_0x1b558b,_0x4bfb91){VoiceQueueReportEvents[_0x95c0('0x5')](_0x58b9d8+':'+_0x1815ba['id'],_0x1815ba);VoiceQueueReportEvents[_0x95c0('0x5')](_0x58b9d8,_0x1815ba);_0x4bfb91(null);};}for(var e in events){if(events[_0x95c0('0x6')](e)){var event=events[e];VoiceQueueReport[_0x95c0('0x7')](e,emitEvent(event));}}module['exports']=VoiceQueueReportEvents;