Built motion from commit (unavailable).|2.3.1
[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 _0x6b7b=['setMaxListeners','save','remove','emit','hasOwnProperty','hook','events','../../mysqldb','VoiceQueue'];(function(_0x228641,_0x25d636){var _0x5d5d78=function(_0x4d5c6c){while(--_0x4d5c6c){_0x228641['push'](_0x228641['shift']());}};_0x5d5d78(++_0x25d636);}(_0x6b7b,0xe7));var _0xb6b7=function(_0x32efa2,_0x57e59b){_0x32efa2=_0x32efa2-0x0;var _0x2d603d=_0x6b7b[_0x32efa2];return _0x2d603d;};'use strict';var EventEmitter=require(_0xb6b7('0x0'));var VoiceQueue=require(_0xb6b7('0x1'))['db'][_0xb6b7('0x2')];var VoiceQueueEvents=new EventEmitter();VoiceQueueEvents[_0xb6b7('0x3')](0x0);var events={'afterCreate':_0xb6b7('0x4'),'afterUpdate':'update','afterDestroy':_0xb6b7('0x5')};function emitEvent(_0x53d507){return function(_0x35db2d,_0x43a736,_0x12a5cc){VoiceQueueEvents[_0xb6b7('0x6')](_0x53d507+':'+_0x35db2d['id'],_0x35db2d);VoiceQueueEvents[_0xb6b7('0x6')](_0x53d507,_0x35db2d);_0x12a5cc(null);};}for(var e in events){if(events[_0xb6b7('0x7')](e)){var event=events[e];VoiceQueue[_0xb6b7('0x8')](e,emitEvent(event));}}module['exports']=VoiceQueueEvents;