Built motion from commit 3e059bc2.|2.5.32
[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 _0x33b9=['update','emit','hasOwnProperty','hook','exports','events','VoiceQueueReport','save'];(function(_0x42e1b5,_0x2cc4da){var _0x56848a=function(_0xcaae86){while(--_0xcaae86){_0x42e1b5['push'](_0x42e1b5['shift']());}};_0x56848a(++_0x2cc4da);}(_0x33b9,0x18d));var _0x933b=function(_0x14afd3,_0xdf0150){_0x14afd3=_0x14afd3-0x0;var _0xb0fb4d=_0x33b9[_0x14afd3];return _0xb0fb4d;};'use strict';var EventEmitter=require(_0x933b('0x0'));var VoiceQueueReport=require('../../mysqldb')['db'][_0x933b('0x1')];var VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x933b('0x2'),'afterUpdate':_0x933b('0x3'),'afterDestroy':'remove'};function emitEvent(_0xf9af25){return function(_0x221bd0,_0x1b0beb,_0x741e69){VoiceQueueReportEvents[_0x933b('0x4')](_0xf9af25+':'+_0x221bd0['id'],_0x221bd0);VoiceQueueReportEvents[_0x933b('0x4')](_0xf9af25,_0x221bd0);_0x741e69(null);};}for(var e in events){if(events[_0x933b('0x5')](e)){var event=events[e];VoiceQueueReport[_0x933b('0x6')](e,emitEvent(event));}}module[_0x933b('0x7')]=VoiceQueueReportEvents;