09e09ead7b3f7452ba77e8b2bb149a85986a7e97
[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 _0x1de0=['events','../../mysqldb','VoiceQueueReport','setMaxListeners','save','update','remove','emit','hasOwnProperty','hook'];(function(_0x3bf83f,_0x181cac){var _0x22c4a9=function(_0xb3ff0d){while(--_0xb3ff0d){_0x3bf83f['push'](_0x3bf83f['shift']());}};_0x22c4a9(++_0x181cac);}(_0x1de0,0x104));var _0x01de=function(_0x477491,_0x5ca700){_0x477491=_0x477491-0x0;var _0xac6aec=_0x1de0[_0x477491];return _0xac6aec;};'use strict';var EventEmitter=require(_0x01de('0x0'));var VoiceQueueReport=require(_0x01de('0x1'))['db'][_0x01de('0x2')];var VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents[_0x01de('0x3')](0x0);var events={'afterCreate':_0x01de('0x4'),'afterUpdate':_0x01de('0x5'),'afterDestroy':_0x01de('0x6')};function emitEvent(_0xf7c702){return function(_0x5b8878,_0x4a8095,_0x7f77fa){VoiceQueueReportEvents[_0x01de('0x7')](_0xf7c702+':'+_0x5b8878['id'],_0x5b8878);VoiceQueueReportEvents['emit'](_0xf7c702,_0x5b8878);_0x7f77fa(null);};}for(var e in events){if(events[_0x01de('0x8')](e)){var event=events[e];VoiceQueueReport[_0x01de('0x9')](e,emitEvent(event));}}module['exports']=VoiceQueueReportEvents;