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 _0xe8a3=['request-promise','path','rimraf','../../config/environment','exports','define','FaxInteraction','fax_interactions','changed','closed','closedAt','format','YYYY-MM-DD\x20HH:mm:ss','../../config/logger','moment','bluebird'];(function(_0x21a9d9,_0x4d5ac8){var _0x46adce=function(_0xfdd336){while(--_0xfdd336){_0x21a9d9['push'](_0x21a9d9['shift']());}};_0x46adce(++_0x4d5ac8);}(_0xe8a3,0x19d));var _0x3e8a=function(_0x3041ce,_0x382f98){_0x3041ce=_0x3041ce-0x0;var _0x68a7f9=_0xe8a3[_0x3041ce];return _0x68a7f9;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x3e8a('0x0'))('api');var moment=require(_0x3e8a('0x1'));var BPromise=require(_0x3e8a('0x2'));var rp=require(_0x3e8a('0x3'));var fs=require('fs');var path=require(_0x3e8a('0x4'));var rimraf=require(_0x3e8a('0x5'));var config=require(_0x3e8a('0x6'));var attributes=require('./faxInteraction.attributes');module[_0x3e8a('0x7')]=function(_0x1e74da,_0x4bfea2){return _0x1e74da[_0x3e8a('0x8')](_0x3e8a('0x9'),attributes,{'tableName':_0x3e8a('0xa'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x5d7c1d,_0x1f64a5,_0x45ca6e){if(_0x5d7c1d[_0x3e8a('0xb')](_0x3e8a('0xc'))){_0x5d7c1d[_0x3e8a('0xd')]=moment()[_0x3e8a('0xe')](_0x3e8a('0xf'));}_0x45ca6e(null,_0x5d7c1d);}}});};