Built motion from commit 1fa89557.|2.6.10
[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 _0x4e0c=['hasOwnProperty','events','VoiceQueueReport','setMaxListeners','update','emit'];(function(_0x304d38,_0x339cf1){var _0x20901a=function(_0x15334f){while(--_0x15334f){_0x304d38['push'](_0x304d38['shift']());}};_0x20901a(++_0x339cf1);}(_0x4e0c,0x1d5));var _0xc4e0=function(_0x5d30b4,_0x199248){_0x5d30b4=_0x5d30b4-0x0;var _0x1acfb8=_0x4e0c[_0x5d30b4];return _0x1acfb8;};'use strict';var EventEmitter=require(_0xc4e0('0x0'));var VoiceQueueReport=require('../../mysqldb')['db'][_0xc4e0('0x1')];var VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents[_0xc4e0('0x2')](0x0);var events={'afterCreate':'save','afterUpdate':_0xc4e0('0x3'),'afterDestroy':'remove'};function emitEvent(_0x58b476){return function(_0x279fd9,_0x5332c9,_0x30de80){VoiceQueueReportEvents[_0xc4e0('0x4')](_0x58b476+':'+_0x279fd9['id'],_0x279fd9);VoiceQueueReportEvents[_0xc4e0('0x4')](_0x58b476,_0x279fd9);_0x30de80(null);};}for(var e in events){if(events[_0xc4e0('0x5')](e)){var event=events[e];VoiceQueueReport['hook'](e,emitEvent(event));}}module['exports']=VoiceQueueReportEvents;