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 _0x70e0=['path','rimraf','./faxInteraction.attributes','fax_interactions','changed','closed','closedAt','lodash','util','../../config/logger','bluebird','request-promise'];(function(_0x2449cd,_0x2b4a79){var _0x261497=function(_0x21ff0e){while(--_0x21ff0e){_0x2449cd['push'](_0x2449cd['shift']());}};_0x261497(++_0x2b4a79);}(_0x70e0,0x17b));var _0x070e=function(_0x21bbc5,_0x178958){_0x21bbc5=_0x21bbc5-0x0;var _0x4b6bc1=_0x70e0[_0x21bbc5];return _0x4b6bc1;};'use strict';var _=require(_0x070e('0x0'));var util=require(_0x070e('0x1'));var logger=require(_0x070e('0x2'))('api');var moment=require('moment');var BPromise=require(_0x070e('0x3'));var rp=require(_0x070e('0x4'));var fs=require('fs');var path=require(_0x070e('0x5'));var rimraf=require(_0x070e('0x6'));var config=require('../../config/environment');var attributes=require(_0x070e('0x7'));module['exports']=function(_0x46fe68,_0x4b041d){return _0x46fe68['define']('FaxInteraction',attributes,{'tableName':_0x070e('0x8'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x1e11f0,_0x604664,_0x2611e6){if(_0x1e11f0[_0x070e('0x9')](_0x070e('0xa'))){_0x1e11f0[_0x070e('0xb')]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');}_0x2611e6(null,_0x1e11f0);}}});};