Built motion from commit (unavailable).|2.5.22
[motion2.git] / server / api / faxAccount / faxAccount.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 _0x1d32=['save','update','remove','emit','hasOwnProperty','hook','exports','../../mysqldb','FaxAccount','setMaxListeners'];(function(_0x4a1d96,_0x5c4039){var _0x1d52eb=function(_0x470da5){while(--_0x470da5){_0x4a1d96['push'](_0x4a1d96['shift']());}};_0x1d52eb(++_0x5c4039);}(_0x1d32,0x1bf));var _0x21d3=function(_0x1c76be,_0x4b2c4f){_0x1c76be=_0x1c76be-0x0;var _0x55a252=_0x1d32[_0x1c76be];return _0x55a252;};'use strict';var EventEmitter=require('events');var FaxAccount=require(_0x21d3('0x0'))['db'][_0x21d3('0x1')];var FaxAccountEvents=new EventEmitter();FaxAccountEvents[_0x21d3('0x2')](0x0);var events={'afterCreate':_0x21d3('0x3'),'afterUpdate':_0x21d3('0x4'),'afterDestroy':_0x21d3('0x5')};function emitEvent(_0x2c909b){return function(_0x4775a9,_0x16ba75,_0x538dcd){FaxAccountEvents[_0x21d3('0x6')](_0x2c909b+':'+_0x4775a9['id'],_0x4775a9);FaxAccountEvents['emit'](_0x2c909b,_0x4775a9);_0x538dcd(null);};}for(var e in events){if(events[_0x21d3('0x7')](e)){var event=events[e];FaxAccount[_0x21d3('0x8')](e,emitEvent(event));}}module[_0x21d3('0x9')]=FaxAccountEvents;