c5f5ca12d77a49606dd95f3088746ad825628e25
[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 _0x63d8=['hook','VoiceQueueReport','setMaxListeners','save','update','remove','emit','hasOwnProperty'];(function(_0x13d07a,_0x41efc3){var _0x5ee0ee=function(_0x4ca94a){while(--_0x4ca94a){_0x13d07a['push'](_0x13d07a['shift']());}};_0x5ee0ee(++_0x41efc3);}(_0x63d8,0x129));var _0x863d=function(_0x17287f,_0x5898a1){_0x17287f=_0x17287f-0x0;var _0x40be7c=_0x63d8[_0x17287f];return _0x40be7c;};'use strict';var EventEmitter=require('events');var VoiceQueueReport=require('../../mysqldb')['db'][_0x863d('0x0')];var VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents[_0x863d('0x1')](0x0);var events={'afterCreate':_0x863d('0x2'),'afterUpdate':_0x863d('0x3'),'afterDestroy':_0x863d('0x4')};function emitEvent(_0x31dbd1){return function(_0x5b5c33,_0x100727,_0x59078f){VoiceQueueReportEvents['emit'](_0x31dbd1+':'+_0x5b5c33['id'],_0x5b5c33);VoiceQueueReportEvents[_0x863d('0x5')](_0x31dbd1,_0x5b5c33);_0x59078f(null);};}for(var e in events){if(events[_0x863d('0x6')](e)){var event=events[e];VoiceQueueReport[_0x863d('0x7')](e,emitEvent(event));}}module['exports']=VoiceQueueReportEvents;