Built motion from commit (unavailable).|2.5.1
[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 _0xb84d=['exports','events','../../mysqldb','setMaxListeners','save','update','remove','emit','hasOwnProperty','hook'];(function(_0x2dc7ee,_0x5600fc){var _0x29c63a=function(_0x51e84c){while(--_0x51e84c){_0x2dc7ee['push'](_0x2dc7ee['shift']());}};_0x29c63a(++_0x5600fc);}(_0xb84d,0x173));var _0xdb84=function(_0x3054be,_0x1bdc8b){_0x3054be=_0x3054be-0x0;var _0x3df150=_0xb84d[_0x3054be];return _0x3df150;};'use strict';var EventEmitter=require(_0xdb84('0x0'));var FaxQueue=require(_0xdb84('0x1'))['db']['FaxQueue'];var FaxQueueEvents=new EventEmitter();FaxQueueEvents[_0xdb84('0x2')](0x0);var events={'afterCreate':_0xdb84('0x3'),'afterUpdate':_0xdb84('0x4'),'afterDestroy':_0xdb84('0x5')};function emitEvent(_0x507ae1){return function(_0xaf2920,_0x5d0a1e,_0x34e606){FaxQueueEvents['emit'](_0x507ae1+':'+_0xaf2920['id'],_0xaf2920);FaxQueueEvents[_0xdb84('0x6')](_0x507ae1,_0xaf2920);_0x34e606(null);};}for(var e in events){if(events[_0xdb84('0x7')](e)){var event=events[e];FaxQueue[_0xdb84('0x8')](e,emitEvent(event));}}module[_0xdb84('0x9')]=FaxQueueEvents;