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 _0xfa46=['hook','events','../../mysqldb','FaxQueue','setMaxListeners','save','update','remove','emit','hasOwnProperty'];(function(_0x127795,_0x4f7c02){var _0x2782aa=function(_0x10ffd2){while(--_0x10ffd2){_0x127795['push'](_0x127795['shift']());}};_0x2782aa(++_0x4f7c02);}(_0xfa46,0x191));var _0x6fa4=function(_0x21a9d9,_0x4d5ac8){_0x21a9d9=_0x21a9d9-0x0;var _0x46adce=_0xfa46[_0x21a9d9];return _0x46adce;};'use strict';var EventEmitter=require(_0x6fa4('0x0'));var FaxQueue=require(_0x6fa4('0x1'))['db'][_0x6fa4('0x2')];var FaxQueueEvents=new EventEmitter();FaxQueueEvents[_0x6fa4('0x3')](0x0);var events={'afterCreate':_0x6fa4('0x4'),'afterUpdate':_0x6fa4('0x5'),'afterDestroy':_0x6fa4('0x6')};function emitEvent(_0x103d69){return function(_0x2cfd43,_0x1c9a05,_0x2cc889){FaxQueueEvents['emit'](_0x103d69+':'+_0x2cfd43['id'],_0x2cfd43);FaxQueueEvents[_0x6fa4('0x7')](_0x103d69,_0x2cfd43);_0x2cc889(null);};}for(var e in events){if(events[_0x6fa4('0x8')](e)){var event=events[e];FaxQueue[_0x6fa4('0x9')](e,emitEvent(event));}}module['exports']=FaxQueueEvents;