Built motion from commit 5b761a7b.|2.5.36
[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 _0x66f7=['save','update','remove','emit','hasOwnProperty','hook','exports','events'];(function(_0x30a58f,_0x3c8348){var _0x1aa112=function(_0x56bfc4){while(--_0x56bfc4){_0x30a58f['push'](_0x30a58f['shift']());}};_0x1aa112(++_0x3c8348);}(_0x66f7,0x107));var _0x766f=function(_0x3b58c9,_0x1f46c3){_0x3b58c9=_0x3b58c9-0x0;var _0x5b653a=_0x66f7[_0x3b58c9];return _0x5b653a;};'use strict';var EventEmitter=require(_0x766f('0x0'));var VoiceQueueReport=require('../../mysqldb')['db']['VoiceQueueReport'];var VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x766f('0x1'),'afterUpdate':_0x766f('0x2'),'afterDestroy':_0x766f('0x3')};function emitEvent(_0x3e2b1f){return function(_0x28ca11,_0x50c24a,_0x328c95){VoiceQueueReportEvents[_0x766f('0x4')](_0x3e2b1f+':'+_0x28ca11['id'],_0x28ca11);VoiceQueueReportEvents[_0x766f('0x4')](_0x3e2b1f,_0x28ca11);_0x328c95(null);};}for(var e in events){if(events[_0x766f('0x5')](e)){var event=events[e];VoiceQueueReport[_0x766f('0x6')](e,emitEvent(event));}}module[_0x766f('0x7')]=VoiceQueueReportEvents;