Built motion from commit (unavailable).|2.5.2
[motion2.git] / server / api / voiceQueue / voiceQueue.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 _0xd129=['setMaxListeners','save','update','remove','emit','hook','exports','events','../../mysqldb','VoiceQueue'];(function(_0x5c87de,_0x400de7){var _0x23bb9a=function(_0x3ae7c4){while(--_0x3ae7c4){_0x5c87de['push'](_0x5c87de['shift']());}};_0x23bb9a(++_0x400de7);}(_0xd129,0x93));var _0x9d12=function(_0x47a5e1,_0x314685){_0x47a5e1=_0x47a5e1-0x0;var _0x3daa48=_0xd129[_0x47a5e1];return _0x3daa48;};'use strict';var EventEmitter=require(_0x9d12('0x0'));var VoiceQueue=require(_0x9d12('0x1'))['db'][_0x9d12('0x2')];var VoiceQueueEvents=new EventEmitter();VoiceQueueEvents[_0x9d12('0x3')](0x0);var events={'afterCreate':_0x9d12('0x4'),'afterUpdate':_0x9d12('0x5'),'afterDestroy':_0x9d12('0x6')};function emitEvent(_0x1955fd){return function(_0x379dcf,_0x6c8e23,_0x425351){VoiceQueueEvents['emit'](_0x1955fd+':'+_0x379dcf['id'],_0x379dcf);VoiceQueueEvents[_0x9d12('0x7')](_0x1955fd,_0x379dcf);_0x425351(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];VoiceQueue[_0x9d12('0x8')](e,emitEvent(event));}}module[_0x9d12('0x9')]=VoiceQueueEvents;