336df47cfae37120ef08babe4b7c87e6c2bb4486
[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 _0x5f3d=['hasOwnProperty','hook','exports','events','../../mysqldb','VoiceQueueReport','save','remove','emit'];(function(_0x1b9d0a,_0x4b42f3){var _0x28a22d=function(_0x5a9aff){while(--_0x5a9aff){_0x1b9d0a['push'](_0x1b9d0a['shift']());}};_0x28a22d(++_0x4b42f3);}(_0x5f3d,0x78));var _0xd5f3=function(_0x4ed814,_0xfbf00a){_0x4ed814=_0x4ed814-0x0;var _0x10e6c9=_0x5f3d[_0x4ed814];return _0x10e6c9;};'use strict';var EventEmitter=require(_0xd5f3('0x0'));var VoiceQueueReport=require(_0xd5f3('0x1'))['db'][_0xd5f3('0x2')];var VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xd5f3('0x3'),'afterUpdate':'update','afterDestroy':_0xd5f3('0x4')};function emitEvent(_0x2abc0b){return function(_0x48455b,_0x8c4771,_0x120cfe){VoiceQueueReportEvents[_0xd5f3('0x5')](_0x2abc0b+':'+_0x48455b['id'],_0x48455b);VoiceQueueReportEvents[_0xd5f3('0x5')](_0x2abc0b,_0x48455b);_0x120cfe(null);};}for(var e in events){if(events[_0xd5f3('0x6')](e)){var event=events[e];VoiceQueueReport[_0xd5f3('0x7')](e,emitEvent(event));}}module[_0xd5f3('0x8')]=VoiceQueueReportEvents;