Built motion from commit (unavailable).|2.3.1
[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 _0xd67b=['hasOwnProperty','hook','exports','../../mysqldb','setMaxListeners','save','update','emit'];(function(_0x65df34,_0x33e342){var _0x3c915f=function(_0x5c789d){while(--_0x5c789d){_0x65df34['push'](_0x65df34['shift']());}};_0x3c915f(++_0x33e342);}(_0xd67b,0x133));var _0xbd67=function(_0x13370f,_0x79c028){_0x13370f=_0x13370f-0x0;var _0x27b61d=_0xd67b[_0x13370f];return _0x27b61d;};'use strict';var EventEmitter=require('events');var FaxQueue=require(_0xbd67('0x0'))['db']['FaxQueue'];var FaxQueueEvents=new EventEmitter();FaxQueueEvents[_0xbd67('0x1')](0x0);var events={'afterCreate':_0xbd67('0x2'),'afterUpdate':_0xbd67('0x3'),'afterDestroy':'remove'};function emitEvent(_0x40e384){return function(_0x50da5a,_0x1bf96,_0x5a827b){FaxQueueEvents[_0xbd67('0x4')](_0x40e384+':'+_0x50da5a['id'],_0x50da5a);FaxQueueEvents[_0xbd67('0x4')](_0x40e384,_0x50da5a);_0x5a827b(null);};}for(var e in events){if(events[_0xbd67('0x5')](e)){var event=events[e];FaxQueue[_0xbd67('0x6')](e,emitEvent(event));}}module[_0xbd67('0x7')]=FaxQueueEvents;