Built motion from commit (unavailable).|2.5.12
[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 _0xdc9a=['VoiceQueue','setMaxListeners','remove','emit','hook','events','../../mysqldb'];(function(_0x502c7d,_0x2f1285){var _0x30b7ed=function(_0x2d92f3){while(--_0x2d92f3){_0x502c7d['push'](_0x502c7d['shift']());}};_0x30b7ed(++_0x2f1285);}(_0xdc9a,0x139));var _0xadc9=function(_0x5efa78,_0x1fe858){_0x5efa78=_0x5efa78-0x0;var _0x1b1be7=_0xdc9a[_0x5efa78];return _0x1b1be7;};'use strict';var EventEmitter=require(_0xadc9('0x0'));var VoiceQueue=require(_0xadc9('0x1'))['db'][_0xadc9('0x2')];var VoiceQueueEvents=new EventEmitter();VoiceQueueEvents[_0xadc9('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':_0xadc9('0x4')};function emitEvent(_0x5d063e){return function(_0x300df3,_0x332d99,_0x3d026f){VoiceQueueEvents[_0xadc9('0x5')](_0x5d063e+':'+_0x300df3['id'],_0x300df3);VoiceQueueEvents[_0xadc9('0x5')](_0x5d063e,_0x300df3);_0x3d026f(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];VoiceQueue[_0xadc9('0x6')](e,emitEvent(event));}}module['exports']=VoiceQueueEvents;