Built motion from commit (unavailable).|2.5.12
[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 _0x190c=['exports','events','../../mysqldb','FaxQueue','save','update','remove','emit','hook'];(function(_0x14b8ee,_0x26d31a){var _0x50ef2b=function(_0x27d7bc){while(--_0x27d7bc){_0x14b8ee['push'](_0x14b8ee['shift']());}};_0x50ef2b(++_0x26d31a);}(_0x190c,0xfd));var _0xc190=function(_0x43a6cd,_0x503d1a){_0x43a6cd=_0x43a6cd-0x0;var _0x5acb36=_0x190c[_0x43a6cd];return _0x5acb36;};'use strict';var EventEmitter=require(_0xc190('0x0'));var FaxQueue=require(_0xc190('0x1'))['db'][_0xc190('0x2')];var FaxQueueEvents=new EventEmitter();FaxQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xc190('0x3'),'afterUpdate':_0xc190('0x4'),'afterDestroy':_0xc190('0x5')};function emitEvent(_0x5d043b){return function(_0x1fe644,_0x4903f4,_0x399146){FaxQueueEvents[_0xc190('0x6')](_0x5d043b+':'+_0x1fe644['id'],_0x1fe644);FaxQueueEvents[_0xc190('0x6')](_0x5d043b,_0x1fe644);_0x399146(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];FaxQueue[_0xc190('0x7')](e,emitEvent(event));}}module[_0xc190('0x8')]=FaxQueueEvents;