Built motion from commit (unavailable).|2.5.27
[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 _0x18c3=['events','../../mysqldb','FaxQueue','setMaxListeners','save','update','remove','emit','hasOwnProperty','hook'];(function(_0x42145e,_0x4f1f4f){var _0x4493a1=function(_0x137f00){while(--_0x137f00){_0x42145e['push'](_0x42145e['shift']());}};_0x4493a1(++_0x4f1f4f);}(_0x18c3,0xaa));var _0x318c=function(_0x168c4b,_0x12457b){_0x168c4b=_0x168c4b-0x0;var _0x1126fe=_0x18c3[_0x168c4b];return _0x1126fe;};'use strict';var EventEmitter=require(_0x318c('0x0'));var FaxQueue=require(_0x318c('0x1'))['db'][_0x318c('0x2')];var FaxQueueEvents=new EventEmitter();FaxQueueEvents[_0x318c('0x3')](0x0);var events={'afterCreate':_0x318c('0x4'),'afterUpdate':_0x318c('0x5'),'afterDestroy':_0x318c('0x6')};function emitEvent(_0x37d190){return function(_0x1bdf55,_0x3e3552,_0x476163){FaxQueueEvents[_0x318c('0x7')](_0x37d190+':'+_0x1bdf55['id'],_0x1bdf55);FaxQueueEvents[_0x318c('0x7')](_0x37d190,_0x1bdf55);_0x476163(null);};}for(var e in events){if(events[_0x318c('0x8')](e)){var event=events[e];FaxQueue[_0x318c('0x9')](e,emitEvent(event));}}module['exports']=FaxQueueEvents;