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 _0x7f7b=['util','api','bluebird','rimraf','../../config/environment','exports','define','FaxInteraction','fax_interactions','closedAt','format','lodash'];(function(_0x5b9241,_0x3c4594){var _0x10c66e=function(_0x18dc4a){while(--_0x18dc4a){_0x5b9241['push'](_0x5b9241['shift']());}};_0x10c66e(++_0x3c4594);}(_0x7f7b,0x1d3));var _0xb7f7=function(_0x2160fc,_0x10432b){_0x2160fc=_0x2160fc-0x0;var _0x562307=_0x7f7b[_0x2160fc];return _0x562307;};'use strict';var _=require(_0xb7f7('0x0'));var util=require(_0xb7f7('0x1'));var logger=require('../../config/logger')(_0xb7f7('0x2'));var moment=require('moment');var BPromise=require(_0xb7f7('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0xb7f7('0x4'));var config=require(_0xb7f7('0x5'));var attributes=require('./faxInteraction.attributes');module[_0xb7f7('0x6')]=function(_0x507fa8,_0x46707e){return _0x507fa8[_0xb7f7('0x7')](_0xb7f7('0x8'),attributes,{'tableName':_0xb7f7('0x9'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x572443,_0x55939f,_0x4ae205){if(_0x572443['changed']('closed')){_0x572443[_0xb7f7('0xa')]=moment()[_0xb7f7('0xb')]('YYYY-MM-DD\x20HH:mm:ss');}_0x4ae205(null,_0x572443);}}});};