Built motion from commit (unavailable).|2.4.18
[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 _0xf272=['events','../../mysqldb','FaxQueue','setMaxListeners','save','remove','emit','hasOwnProperty','hook','exports'];(function(_0x50bb41,_0x4da1d6){var _0x512809=function(_0x5019f8){while(--_0x5019f8){_0x50bb41['push'](_0x50bb41['shift']());}};_0x512809(++_0x4da1d6);}(_0xf272,0xdc));var _0x2f27=function(_0x19c6f1,_0x26d0fb){_0x19c6f1=_0x19c6f1-0x0;var _0x3efe35=_0xf272[_0x19c6f1];return _0x3efe35;};'use strict';var EventEmitter=require(_0x2f27('0x0'));var FaxQueue=require(_0x2f27('0x1'))['db'][_0x2f27('0x2')];var FaxQueueEvents=new EventEmitter();FaxQueueEvents[_0x2f27('0x3')](0x0);var events={'afterCreate':_0x2f27('0x4'),'afterUpdate':'update','afterDestroy':_0x2f27('0x5')};function emitEvent(_0x4756df){return function(_0x215a1e,_0xa9dc81,_0x46b5d2){FaxQueueEvents[_0x2f27('0x6')](_0x4756df+':'+_0x215a1e['id'],_0x215a1e);FaxQueueEvents['emit'](_0x4756df,_0x215a1e);_0x46b5d2(null);};}for(var e in events){if(events[_0x2f27('0x7')](e)){var event=events[e];FaxQueue[_0x2f27('0x8')](e,emitEvent(event));}}module[_0x2f27('0x9')]=FaxQueueEvents;