Built motion from commit (unavailable).|2.5.4
[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 _0x5446=['hasOwnProperty','hook','exports','events','VoiceQueueReport','setMaxListeners','save','emit'];(function(_0x8cdd88,_0x3deacb){var _0x28d8c0=function(_0x30ba55){while(--_0x30ba55){_0x8cdd88['push'](_0x8cdd88['shift']());}};_0x28d8c0(++_0x3deacb);}(_0x5446,0xab));var _0x6544=function(_0x164e90,_0xd685e1){_0x164e90=_0x164e90-0x0;var _0x3a04c0=_0x5446[_0x164e90];return _0x3a04c0;};'use strict';var EventEmitter=require(_0x6544('0x0'));var VoiceQueueReport=require('../../mysqldb')['db'][_0x6544('0x1')];var VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents[_0x6544('0x2')](0x0);var events={'afterCreate':_0x6544('0x3'),'afterUpdate':'update','afterDestroy':'remove'};function emitEvent(_0xbf177b){return function(_0x5484da,_0x4652cc,_0xe69c2a){VoiceQueueReportEvents[_0x6544('0x4')](_0xbf177b+':'+_0x5484da['id'],_0x5484da);VoiceQueueReportEvents[_0x6544('0x4')](_0xbf177b,_0x5484da);_0xe69c2a(null);};}for(var e in events){if(events[_0x6544('0x5')](e)){var event=events[e];VoiceQueueReport[_0x6544('0x6')](e,emitEvent(event));}}module[_0x6544('0x7')]=VoiceQueueReportEvents;