Built motion from commit 616d3211.|2.6.4
[motion2.git] / server / api / faxQueue / faxQueue.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 _0x24c1=['save','remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb','FaxQueue'];(function(_0x6c993a,_0x5ea3ab){var _0x27f547=function(_0x22df20){while(--_0x22df20){_0x6c993a['push'](_0x6c993a['shift']());}};_0x27f547(++_0x5ea3ab);}(_0x24c1,0xe7));var _0x124c=function(_0x167cc1,_0x56ef5a){_0x167cc1=_0x167cc1-0x0;var _0x10bc4b=_0x24c1[_0x167cc1];return _0x10bc4b;};'use strict';var EventEmitter=require(_0x124c('0x0'));var FaxQueue=require(_0x124c('0x1'))['db'][_0x124c('0x2')];var FaxQueueEvents=new EventEmitter();FaxQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x124c('0x3'),'afterUpdate':'update','afterDestroy':_0x124c('0x4')};function emitEvent(_0x7ebe3){return function(_0x31258a,_0x36c11e,_0x2047b0){FaxQueueEvents[_0x124c('0x5')](_0x7ebe3+':'+_0x31258a['id'],_0x31258a);FaxQueueEvents[_0x124c('0x5')](_0x7ebe3,_0x31258a);_0x2047b0(null);};}for(var e in events){if(events[_0x124c('0x6')](e)){var event=events[e];FaxQueue[_0x124c('0x7')](e,emitEvent(event));}}module[_0x124c('0x8')]=FaxQueueEvents;