Built motion from commit da617fac.|2.6.6
[motion2.git] / server / api / openchannelQueue / openchannelQueue.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 _0xb4c9=['../../mysqldb','OpenchannelQueue','setMaxListeners','save','update','remove','emit','hook','exports','events'];(function(_0x2ffb2f,_0x59fc10){var _0x51d5a2=function(_0x5795aa){while(--_0x5795aa){_0x2ffb2f['push'](_0x2ffb2f['shift']());}};_0x51d5a2(++_0x59fc10);}(_0xb4c9,0x1e9));var _0x9b4c=function(_0x510070,_0x1514d2){_0x510070=_0x510070-0x0;var _0x41fa45=_0xb4c9[_0x510070];return _0x41fa45;};'use strict';var EventEmitter=require(_0x9b4c('0x0'));var OpenchannelQueue=require(_0x9b4c('0x1'))['db'][_0x9b4c('0x2')];var OpenchannelQueueEvents=new EventEmitter();OpenchannelQueueEvents[_0x9b4c('0x3')](0x0);var events={'afterCreate':_0x9b4c('0x4'),'afterUpdate':_0x9b4c('0x5'),'afterDestroy':_0x9b4c('0x6')};function emitEvent(_0x31d3a4){return function(_0x3a8377,_0x4f1736,_0xb5414f){OpenchannelQueueEvents['emit'](_0x31d3a4+':'+_0x3a8377['id'],_0x3a8377);OpenchannelQueueEvents[_0x9b4c('0x7')](_0x31d3a4,_0x3a8377);_0xb5414f(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];OpenchannelQueue[_0x9b4c('0x8')](e,emitEvent(event));}}module[_0x9b4c('0x9')]=OpenchannelQueueEvents;