Built motion from commit (unavailable).|2.5.18
[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 _0xe3ca=['setMaxListeners','save','update','hasOwnProperty','exports','events','../../mysqldb'];(function(_0x2ccf68,_0x1d41df){var _0x2793f7=function(_0x3351af){while(--_0x3351af){_0x2ccf68['push'](_0x2ccf68['shift']());}};_0x2793f7(++_0x1d41df);}(_0xe3ca,0x91));var _0xae3c=function(_0x173441,_0x26b0d9){_0x173441=_0x173441-0x0;var _0x2423a8=_0xe3ca[_0x173441];return _0x2423a8;};'use strict';var EventEmitter=require(_0xae3c('0x0'));var VoiceQueueReport=require(_0xae3c('0x1'))['db']['VoiceQueueReport'];var VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents[_0xae3c('0x2')](0x0);var events={'afterCreate':_0xae3c('0x3'),'afterUpdate':_0xae3c('0x4'),'afterDestroy':'remove'};function emitEvent(_0x3cf20b){return function(_0x445543,_0x169f7e,_0x57f3f8){VoiceQueueReportEvents['emit'](_0x3cf20b+':'+_0x445543['id'],_0x445543);VoiceQueueReportEvents['emit'](_0x3cf20b,_0x445543);_0x57f3f8(null);};}for(var e in events){if(events[_0xae3c('0x5')](e)){var event=events[e];VoiceQueueReport['hook'](e,emitEvent(event));}}module[_0xae3c('0x6')]=VoiceQueueReportEvents;