Built motion from commit (unavailable).|2.3.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 _0x5c12=['../../mysqldb','FaxQueue','save','update','remove','emit','hasOwnProperty','hook'];(function(_0x47ad8d,_0x5d8a17){var _0x1364b2=function(_0x44f113){while(--_0x44f113){_0x47ad8d['push'](_0x47ad8d['shift']());}};_0x1364b2(++_0x5d8a17);}(_0x5c12,0x188));var _0x25c1=function(_0x2642cb,_0x4b917f){_0x2642cb=_0x2642cb-0x0;var _0xe6e41=_0x5c12[_0x2642cb];return _0xe6e41;};'use strict';var EventEmitter=require('events');var FaxQueue=require(_0x25c1('0x0'))['db'][_0x25c1('0x1')];var FaxQueueEvents=new EventEmitter();FaxQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x25c1('0x2'),'afterUpdate':_0x25c1('0x3'),'afterDestroy':_0x25c1('0x4')};function emitEvent(_0x10f10c){return function(_0x2c5df0,_0x21ec20,_0x3f0f35){FaxQueueEvents['emit'](_0x10f10c+':'+_0x2c5df0['id'],_0x2c5df0);FaxQueueEvents[_0x25c1('0x5')](_0x10f10c,_0x2c5df0);_0x3f0f35(null);};}for(var e in events){if(events[_0x25c1('0x6')](e)){var event=events[e];FaxQueue[_0x25c1('0x7')](e,emitEvent(event));}}module['exports']=FaxQueueEvents;