c42786e45d102248e1d6532982891d24aedea894
[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 _0xe821=['VoiceQueueReport','setMaxListeners','save','update','emit','hasOwnProperty','hook','exports','events','../../mysqldb'];(function(_0x4cc526,_0x5bb92b){var _0x22051a=function(_0x4dcc72){while(--_0x4dcc72){_0x4cc526['push'](_0x4cc526['shift']());}};_0x22051a(++_0x5bb92b);}(_0xe821,0x1d4));var _0x1e82=function(_0x43724a,_0x5ae8fe){_0x43724a=_0x43724a-0x0;var _0x27ce5b=_0xe821[_0x43724a];return _0x27ce5b;};'use strict';var EventEmitter=require(_0x1e82('0x0'));var VoiceQueueReport=require(_0x1e82('0x1'))['db'][_0x1e82('0x2')];var VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents[_0x1e82('0x3')](0x0);var events={'afterCreate':_0x1e82('0x4'),'afterUpdate':_0x1e82('0x5'),'afterDestroy':'remove'};function emitEvent(_0x5e904a){return function(_0x373ddf,_0x1d80ea,_0x2c60d7){VoiceQueueReportEvents[_0x1e82('0x6')](_0x5e904a+':'+_0x373ddf['id'],_0x373ddf);VoiceQueueReportEvents[_0x1e82('0x6')](_0x5e904a,_0x373ddf);_0x2c60d7(null);};}for(var e in events){if(events[_0x1e82('0x7')](e)){var event=events[e];VoiceQueueReport[_0x1e82('0x8')](e,emitEvent(event));}}module[_0x1e82('0x9')]=VoiceQueueReportEvents;