1 // *************************************************************************
3 // * xCALLY Motion - The Omnichannel Contact Center *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved *
6 // *************************************************************************
8 // * Email: info@xcally.com *
9 // * Website: https://www.xcally.com *
11 // *************************************************************************
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. *
17 // *************************************************************************
18 var _0x7ba7=['../../mysqldb','FaxQueue','setMaxListeners','update','remove','emit','hasOwnProperty','hook','exports','events'];(function(_0x334fea,_0x1f1e18){var _0x3c5829=function(_0x4fd6ac){while(--_0x4fd6ac){_0x334fea['push'](_0x334fea['shift']());}};_0x3c5829(++_0x1f1e18);}(_0x7ba7,0x1e9));var _0x77ba=function(_0x6e17f2,_0xcc4a45){_0x6e17f2=_0x6e17f2-0x0;var _0x1cc6b5=_0x7ba7[_0x6e17f2];return _0x1cc6b5;};'use strict';var EventEmitter=require(_0x77ba('0x0'));var FaxQueue=require(_0x77ba('0x1'))['db'][_0x77ba('0x2')];var FaxQueueEvents=new EventEmitter();FaxQueueEvents[_0x77ba('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':_0x77ba('0x4'),'afterDestroy':_0x77ba('0x5')};function emitEvent(_0x1f834a){return function(_0x4b36eb,_0x5acb41,_0x26f7a7){FaxQueueEvents['emit'](_0x1f834a+':'+_0x4b36eb['id'],_0x4b36eb);FaxQueueEvents[_0x77ba('0x6')](_0x1f834a,_0x4b36eb);_0x26f7a7(null);};}for(var e in events){if(events[_0x77ba('0x7')](e)){var event=events[e];FaxQueue[_0x77ba('0x8')](e,emitEvent(event));}}module[_0x77ba('0x9')]=FaxQueueEvents;