Built motion from commit (unavailable).|2.5.6
[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 _0xe6ca=['exports','events','../../mysqldb','setMaxListeners','update','remove','emit','hasOwnProperty','hook'];(function(_0x252345,_0x4b8182){var _0x4b0f28=function(_0x327930){while(--_0x327930){_0x252345['push'](_0x252345['shift']());}};_0x4b0f28(++_0x4b8182);}(_0xe6ca,0x12a));var _0xae6c=function(_0x30b4a5,_0x56d08d){_0x30b4a5=_0x30b4a5-0x0;var _0x3dd26c=_0xe6ca[_0x30b4a5];return _0x3dd26c;};'use strict';var EventEmitter=require(_0xae6c('0x0'));var VoiceQueueReport=require(_0xae6c('0x1'))['db']['VoiceQueueReport'];var VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents[_0xae6c('0x2')](0x0);var events={'afterCreate':'save','afterUpdate':_0xae6c('0x3'),'afterDestroy':_0xae6c('0x4')};function emitEvent(_0x354568){return function(_0x592f3a,_0x398c9a,_0x1275cb){VoiceQueueReportEvents['emit'](_0x354568+':'+_0x592f3a['id'],_0x592f3a);VoiceQueueReportEvents[_0xae6c('0x5')](_0x354568,_0x592f3a);_0x1275cb(null);};}for(var e in events){if(events[_0xae6c('0x6')](e)){var event=events[e];VoiceQueueReport[_0xae6c('0x7')](e,emitEvent(event));}}module[_0xae6c('0x8')]=VoiceQueueReportEvents;