Built motion from commit (unavailable).|2.5.30
[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 _0xd81d=['remove','emit','hasOwnProperty','hook','exports','events','setMaxListeners'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xd81d,0x10f));var _0xdd81=function(_0x38b372,_0x3c530d){_0x38b372=_0x38b372-0x0;var _0x562529=_0xd81d[_0x38b372];return _0x562529;};'use strict';var EventEmitter=require(_0xdd81('0x0'));var VoiceQueueReport=require('../../mysqldb')['db']['VoiceQueueReport'];var VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents[_0xdd81('0x1')](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':_0xdd81('0x2')};function emitEvent(_0x717cdd){return function(_0x5b3254,_0x20de58,_0x2bf7a1){VoiceQueueReportEvents[_0xdd81('0x3')](_0x717cdd+':'+_0x5b3254['id'],_0x5b3254);VoiceQueueReportEvents[_0xdd81('0x3')](_0x717cdd,_0x5b3254);_0x2bf7a1(null);};}for(var e in events){if(events[_0xdd81('0x4')](e)){var event=events[e];VoiceQueueReport[_0xdd81('0x5')](e,emitEvent(event));}}module[_0xdd81('0x6')]=VoiceQueueReportEvents;