a37644e58cf92b277d7598c05b3ab1717f542097
[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 _0xa0fb=['../../mysqldb','VoiceQueueReport','save','update','remove','hook','exports','events'];(function(_0x94ac96,_0x22880d){var _0x3c37d8=function(_0x5101b0){while(--_0x5101b0){_0x94ac96['push'](_0x94ac96['shift']());}};_0x3c37d8(++_0x22880d);}(_0xa0fb,0x1e7));var _0xba0f=function(_0x4f86e4,_0x1fc805){_0x4f86e4=_0x4f86e4-0x0;var _0x48957d=_0xa0fb[_0x4f86e4];return _0x48957d;};'use strict';var EventEmitter=require(_0xba0f('0x0'));var VoiceQueueReport=require(_0xba0f('0x1'))['db'][_0xba0f('0x2')];var VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xba0f('0x3'),'afterUpdate':_0xba0f('0x4'),'afterDestroy':_0xba0f('0x5')};function emitEvent(_0x13e27a){return function(_0x3630c2,_0x15769c,_0x3b43d2){VoiceQueueReportEvents['emit'](_0x13e27a+':'+_0x3630c2['id'],_0x3630c2);VoiceQueueReportEvents['emit'](_0x13e27a,_0x3630c2);_0x3b43d2(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];VoiceQueueReport[_0xba0f('0x6')](e,emitEvent(event));}}module[_0xba0f('0x7')]=VoiceQueueReportEvents;