Built motion from commit 4c281f94.|2.6.31
[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 _0x6c56=['update','remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb','FaxQueue','setMaxListeners','save'];(function(_0x55de87,_0x21a0f1){var _0x33ae3a=function(_0x2d61ca){while(--_0x2d61ca){_0x55de87['push'](_0x55de87['shift']());}};_0x33ae3a(++_0x21a0f1);}(_0x6c56,0x74));var _0x66c5=function(_0x2f965f,_0x100aca){_0x2f965f=_0x2f965f-0x0;var _0x73f2b9=_0x6c56[_0x2f965f];return _0x73f2b9;};'use strict';var EventEmitter=require(_0x66c5('0x0'));var FaxQueue=require(_0x66c5('0x1'))['db'][_0x66c5('0x2')];var FaxQueueEvents=new EventEmitter();FaxQueueEvents[_0x66c5('0x3')](0x0);var events={'afterCreate':_0x66c5('0x4'),'afterUpdate':_0x66c5('0x5'),'afterDestroy':_0x66c5('0x6')};function emitEvent(_0x1103fa){return function(_0x45f50d,_0x5bfd2f,_0x1a8e49){FaxQueueEvents[_0x66c5('0x7')](_0x1103fa+':'+_0x45f50d['id'],_0x45f50d);FaxQueueEvents[_0x66c5('0x7')](_0x1103fa,_0x45f50d);_0x1a8e49(null);};}for(var e in events){if(events[_0x66c5('0x8')](e)){var event=events[e];FaxQueue[_0x66c5('0x9')](e,emitEvent(event));}}module[_0x66c5('0xa')]=FaxQueueEvents;