Built motion from commit da617fac.|2.6.6
[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 _0x86ae=['setMaxListeners','save','update','emit','hook','exports','events','../../mysqldb','FaxQueue'];(function(_0x461d50,_0x2adb3c){var _0x47547a=function(_0x5b4d58){while(--_0x5b4d58){_0x461d50['push'](_0x461d50['shift']());}};_0x47547a(++_0x2adb3c);}(_0x86ae,0xe7));var _0xe86a=function(_0x50d9d5,_0x363c39){_0x50d9d5=_0x50d9d5-0x0;var _0xc578db=_0x86ae[_0x50d9d5];return _0xc578db;};'use strict';var EventEmitter=require(_0xe86a('0x0'));var FaxQueue=require(_0xe86a('0x1'))['db'][_0xe86a('0x2')];var FaxQueueEvents=new EventEmitter();FaxQueueEvents[_0xe86a('0x3')](0x0);var events={'afterCreate':_0xe86a('0x4'),'afterUpdate':_0xe86a('0x5'),'afterDestroy':'remove'};function emitEvent(_0x4c43cf){return function(_0x3cad83,_0x43ba80,_0x346694){FaxQueueEvents[_0xe86a('0x6')](_0x4c43cf+':'+_0x3cad83['id'],_0x3cad83);FaxQueueEvents[_0xe86a('0x6')](_0x4c43cf,_0x3cad83);_0x346694(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];FaxQueue[_0xe86a('0x7')](e,emitEvent(event));}}module[_0xe86a('0x8')]=FaxQueueEvents;