Built motion from commit (unavailable).|2.5.4
[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 _0x9c53=['../../mysqldb','FaxQueue','setMaxListeners','save','update','remove','emit','hasOwnProperty','hook','exports'];(function(_0x4db631,_0x4a82b6){var _0x46a3a9=function(_0xa2537d){while(--_0xa2537d){_0x4db631['push'](_0x4db631['shift']());}};_0x46a3a9(++_0x4a82b6);}(_0x9c53,0x1ae));var _0x39c5=function(_0x579bdf,_0x570502){_0x579bdf=_0x579bdf-0x0;var _0x15ae27=_0x9c53[_0x579bdf];return _0x15ae27;};'use strict';var EventEmitter=require('events');var FaxQueue=require(_0x39c5('0x0'))['db'][_0x39c5('0x1')];var FaxQueueEvents=new EventEmitter();FaxQueueEvents[_0x39c5('0x2')](0x0);var events={'afterCreate':_0x39c5('0x3'),'afterUpdate':_0x39c5('0x4'),'afterDestroy':_0x39c5('0x5')};function emitEvent(_0x43964f){return function(_0x42fa7a,_0x6beaab,_0x4ae2fd){FaxQueueEvents[_0x39c5('0x6')](_0x43964f+':'+_0x42fa7a['id'],_0x42fa7a);FaxQueueEvents[_0x39c5('0x6')](_0x43964f,_0x42fa7a);_0x4ae2fd(null);};}for(var e in events){if(events[_0x39c5('0x7')](e)){var event=events[e];FaxQueue[_0x39c5('0x8')](e,emitEvent(event));}}module[_0x39c5('0x9')]=FaxQueueEvents;