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 _0x934e=['changed','closed','closedAt','format','lodash','util','bluebird','request-promise','path','rimraf','../../config/environment','./whatsappInteraction.attributes','exports','whatsapp_interactions'];(function(_0x5a120a,_0x549591){var _0x3b94b4=function(_0x21d60c){while(--_0x21d60c){_0x5a120a['push'](_0x5a120a['shift']());}};_0x3b94b4(++_0x549591);}(_0x934e,0x1c4));var _0xe934=function(_0x4e46c8,_0x4d5b49){_0x4e46c8=_0x4e46c8-0x0;var _0x50e1ff=_0x934e[_0x4e46c8];return _0x50e1ff;};'use strict';var _=require(_0xe934('0x0'));var util=require(_0xe934('0x1'));var logger=require('../../config/logger')('api');var moment=require('moment');var BPromise=require(_0xe934('0x2'));var rp=require(_0xe934('0x3'));var fs=require('fs');var path=require(_0xe934('0x4'));var rimraf=require(_0xe934('0x5'));var config=require(_0xe934('0x6'));var attributes=require(_0xe934('0x7'));module[_0xe934('0x8')]=function(_0x49a2a6,_0x228014){return _0x49a2a6['define']('WhatsappInteraction',attributes,{'tableName':_0xe934('0x9'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x149e2e,_0x179e3c,_0x5e80d6){if(_0x149e2e[_0xe934('0xa')](_0xe934('0xb'))){_0x149e2e[_0xe934('0xc')]=moment()[_0xe934('0xd')]('YYYY-MM-DD\x20HH:mm:ss');}_0x5e80d6(null,_0x149e2e);}}});};