Built motion from commit 9d0783e6.|2.6.13
[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 _0xd053=['hook','exports','events','../../mysqldb','FaxQueue','setMaxListeners','save','remove','emit'];(function(_0x1e2321,_0x3ae1c5){var _0x1d346d=function(_0x24f171){while(--_0x24f171){_0x1e2321['push'](_0x1e2321['shift']());}};_0x1d346d(++_0x3ae1c5);}(_0xd053,0xe3));var _0x3d05=function(_0x324f55,_0x2e6ca4){_0x324f55=_0x324f55-0x0;var _0x284952=_0xd053[_0x324f55];return _0x284952;};'use strict';var EventEmitter=require(_0x3d05('0x0'));var FaxQueue=require(_0x3d05('0x1'))['db'][_0x3d05('0x2')];var FaxQueueEvents=new EventEmitter();FaxQueueEvents[_0x3d05('0x3')](0x0);var events={'afterCreate':_0x3d05('0x4'),'afterUpdate':'update','afterDestroy':_0x3d05('0x5')};function emitEvent(_0x451568){return function(_0x49c0a7,_0x28d9a1,_0x376d7b){FaxQueueEvents[_0x3d05('0x6')](_0x451568+':'+_0x49c0a7['id'],_0x49c0a7);FaxQueueEvents[_0x3d05('0x6')](_0x451568,_0x49c0a7);_0x376d7b(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];FaxQueue[_0x3d05('0x7')](e,emitEvent(event));}}module[_0x3d05('0x8')]=FaxQueueEvents;