Built motion from commit 994c64e1.|2.6.1
[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 _0xe564=['setMaxListeners','save','update','remove','emit','hook','exports','events','../../mysqldb','VoiceQueueReport'];(function(_0x4b369d,_0x265eb8){var _0x571a98=function(_0x56341a){while(--_0x56341a){_0x4b369d['push'](_0x4b369d['shift']());}};_0x571a98(++_0x265eb8);}(_0xe564,0x179));var _0x4e56=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xe564[_0x3dd15e];return _0x231fd0;};'use strict';var EventEmitter=require(_0x4e56('0x0'));var VoiceQueueReport=require(_0x4e56('0x1'))['db'][_0x4e56('0x2')];var VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents[_0x4e56('0x3')](0x0);var events={'afterCreate':_0x4e56('0x4'),'afterUpdate':_0x4e56('0x5'),'afterDestroy':_0x4e56('0x6')};function emitEvent(_0x379fe6){return function(_0x369ba7,_0x1cfca1,_0x419af3){VoiceQueueReportEvents[_0x4e56('0x7')](_0x379fe6+':'+_0x369ba7['id'],_0x369ba7);VoiceQueueReportEvents['emit'](_0x379fe6,_0x369ba7);_0x419af3(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];VoiceQueueReport[_0x4e56('0x8')](e,emitEvent(event));}}module[_0x4e56('0x9')]=VoiceQueueReportEvents;