Built motion from commit (unavailable).|2.5.29
[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 _0xfe04=['remove','emit','hasOwnProperty','hook','../../mysqldb','VoiceQueue','setMaxListeners','save','update'];(function(_0x488198,_0x2d1e64){var _0x4250fe=function(_0x1f1c07){while(--_0x1f1c07){_0x488198['push'](_0x488198['shift']());}};_0x4250fe(++_0x2d1e64);}(_0xfe04,0x1e1));var _0x4fe0=function(_0x41d7a6,_0x3efa77){_0x41d7a6=_0x41d7a6-0x0;var _0x46ddc7=_0xfe04[_0x41d7a6];return _0x46ddc7;};'use strict';var EventEmitter=require('events');var VoiceQueue=require(_0x4fe0('0x0'))['db'][_0x4fe0('0x1')];var VoiceQueueEvents=new EventEmitter();VoiceQueueEvents[_0x4fe0('0x2')](0x0);var events={'afterCreate':_0x4fe0('0x3'),'afterUpdate':_0x4fe0('0x4'),'afterDestroy':_0x4fe0('0x5')};function emitEvent(_0x52fa88){return function(_0x3f7be3,_0x187730,_0x90d6b3){VoiceQueueEvents['emit'](_0x52fa88+':'+_0x3f7be3['id'],_0x3f7be3);VoiceQueueEvents[_0x4fe0('0x6')](_0x52fa88,_0x3f7be3);_0x90d6b3(null);};}for(var e in events){if(events[_0x4fe0('0x7')](e)){var event=events[e];VoiceQueue[_0x4fe0('0x8')](e,emitEvent(event));}}module['exports']=VoiceQueueEvents;