Built motion from commit (unavailable).|2.5.17
[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 _0x2377=['setMaxListeners','save','update','remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb','VoiceQueue'];(function(_0x168f21,_0x70b14){var _0x66dba=function(_0x59e73e){while(--_0x59e73e){_0x168f21['push'](_0x168f21['shift']());}};_0x66dba(++_0x70b14);}(_0x2377,0x19f));var _0x7237=function(_0x3af384,_0x2b2160){_0x3af384=_0x3af384-0x0;var _0x194aad=_0x2377[_0x3af384];return _0x194aad;};'use strict';var EventEmitter=require(_0x7237('0x0'));var VoiceQueue=require(_0x7237('0x1'))['db'][_0x7237('0x2')];var VoiceQueueEvents=new EventEmitter();VoiceQueueEvents[_0x7237('0x3')](0x0);var events={'afterCreate':_0x7237('0x4'),'afterUpdate':_0x7237('0x5'),'afterDestroy':_0x7237('0x6')};function emitEvent(_0x40ced8){return function(_0x7c08d2,_0xf2b5b5,_0x4e8360){VoiceQueueEvents[_0x7237('0x7')](_0x40ced8+':'+_0x7c08d2['id'],_0x7c08d2);VoiceQueueEvents[_0x7237('0x7')](_0x40ced8,_0x7c08d2);_0x4e8360(null);};}for(var e in events){if(events[_0x7237('0x8')](e)){var event=events[e];VoiceQueue[_0x7237('0x9')](e,emitEvent(event));}}module[_0x7237('0xa')]=VoiceQueueEvents;