Built motion from commit 0900f080.|2.5.45
[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 _0x40ff=['remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb','VoiceQueueReport','setMaxListeners','update'];(function(_0x1a6b60,_0x1532fa){var _0x35a681=function(_0x1e5c37){while(--_0x1e5c37){_0x1a6b60['push'](_0x1a6b60['shift']());}};_0x35a681(++_0x1532fa);}(_0x40ff,0xe1));var _0xf40f=function(_0x2207fe,_0x52adbb){_0x2207fe=_0x2207fe-0x0;var _0x2bbe48=_0x40ff[_0x2207fe];return _0x2bbe48;};'use strict';var EventEmitter=require(_0xf40f('0x0'));var VoiceQueueReport=require(_0xf40f('0x1'))['db'][_0xf40f('0x2')];var VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents[_0xf40f('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':_0xf40f('0x4'),'afterDestroy':_0xf40f('0x5')};function emitEvent(_0xc55b82){return function(_0x3b51d7,_0x58952f,_0x14766){VoiceQueueReportEvents['emit'](_0xc55b82+':'+_0x3b51d7['id'],_0x3b51d7);VoiceQueueReportEvents[_0xf40f('0x6')](_0xc55b82,_0x3b51d7);_0x14766(null);};}for(var e in events){if(events[_0xf40f('0x7')](e)){var event=events[e];VoiceQueueReport[_0xf40f('0x8')](e,emitEvent(event));}}module[_0xf40f('0x9')]=VoiceQueueReportEvents;