85d6ad0b92d8f9a9b62562fabeb498209296dc36
[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 _0x12d8=['remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb','VoiceQueueReport','save','update'];(function(_0x478d72,_0x2d6b7a){var _0x5ef7cf=function(_0x199aea){while(--_0x199aea){_0x478d72['push'](_0x478d72['shift']());}};_0x5ef7cf(++_0x2d6b7a);}(_0x12d8,0xcd));var _0x812d=function(_0x4ce9ac,_0x3a98d8){_0x4ce9ac=_0x4ce9ac-0x0;var _0x34fcb4=_0x12d8[_0x4ce9ac];return _0x34fcb4;};'use strict';var EventEmitter=require(_0x812d('0x0'));var VoiceQueueReport=require(_0x812d('0x1'))['db'][_0x812d('0x2')];var VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x812d('0x3'),'afterUpdate':_0x812d('0x4'),'afterDestroy':_0x812d('0x5')};function emitEvent(_0xe6fc3d){return function(_0x606b62,_0x32b3a1,_0x839fe){VoiceQueueReportEvents[_0x812d('0x6')](_0xe6fc3d+':'+_0x606b62['id'],_0x606b62);VoiceQueueReportEvents['emit'](_0xe6fc3d,_0x606b62);_0x839fe(null);};}for(var e in events){if(events[_0x812d('0x7')](e)){var event=events[e];VoiceQueueReport[_0x812d('0x8')](e,emitEvent(event));}}module[_0x812d('0x9')]=VoiceQueueReportEvents;