01efe8f091cdff3d3e3507fd1a3e0d7851859889
[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 _0x0d38=['update','emit','hasOwnProperty','events','VoiceQueueReport','save'];(function(_0x588dc2,_0x1f4324){var _0xfb4fcb=function(_0x5a84c8){while(--_0x5a84c8){_0x588dc2['push'](_0x588dc2['shift']());}};_0xfb4fcb(++_0x1f4324);}(_0x0d38,0x111));var _0x80d3=function(_0x5c4fd1,_0xd0c105){_0x5c4fd1=_0x5c4fd1-0x0;var _0x282cc1=_0x0d38[_0x5c4fd1];return _0x282cc1;};'use strict';var EventEmitter=require(_0x80d3('0x0'));var VoiceQueueReport=require('../../mysqldb')['db'][_0x80d3('0x1')];var VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x80d3('0x2'),'afterUpdate':_0x80d3('0x3'),'afterDestroy':'remove'};function emitEvent(_0xe6ecd2){return function(_0x4b1250,_0x4c4b48,_0x2243b7){VoiceQueueReportEvents[_0x80d3('0x4')](_0xe6ecd2+':'+_0x4b1250['id'],_0x4b1250);VoiceQueueReportEvents[_0x80d3('0x4')](_0xe6ecd2,_0x4b1250);_0x2243b7(null);};}for(var e in events){if(events[_0x80d3('0x5')](e)){var event=events[e];VoiceQueueReport['hook'](e,emitEvent(event));}}module['exports']=VoiceQueueReportEvents;