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 _0xe631=['closedAt','format','lodash','../../config/logger','api','moment','bluebird','request-promise','../../config/environment','./whatsappInteraction.attributes','exports','define','WhatsappInteraction','changed','closed'];(function(_0x157117,_0x396150){var _0x4e1e24=function(_0x10d70e){while(--_0x10d70e){_0x157117['push'](_0x157117['shift']());}};_0x4e1e24(++_0x396150);}(_0xe631,0x1a6));var _0x1e63=function(_0x39a2d6,_0x477459){_0x39a2d6=_0x39a2d6-0x0;var _0x23af66=_0xe631[_0x39a2d6];return _0x23af66;};'use strict';var _=require(_0x1e63('0x0'));var util=require('util');var logger=require(_0x1e63('0x1'))(_0x1e63('0x2'));var moment=require(_0x1e63('0x3'));var BPromise=require(_0x1e63('0x4'));var rp=require(_0x1e63('0x5'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x1e63('0x6'));var attributes=require(_0x1e63('0x7'));module[_0x1e63('0x8')]=function(_0x21df33,_0x2a01a2){return _0x21df33[_0x1e63('0x9')](_0x1e63('0xa'),attributes,{'tableName':'whatsapp_interactions','paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x56fb95,_0x3e185e,_0x3472a7){if(_0x56fb95[_0x1e63('0xb')](_0x1e63('0xc'))){_0x56fb95[_0x1e63('0xd')]=moment()[_0x1e63('0xe')]('YYYY-MM-DD\x20HH:mm:ss');}_0x3472a7(null,_0x56fb95);}}});};