Built motion from commit (unavailable).|2.5.2
[motion2.git] / server / api / intSalesforceAccount / intSalesforceAccount.controller.js
1 // *************************************************************************
2 // *                                                                       *
3 // * xCALLY Motion -  The Omnichannel Contact Center                       *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved                     *
5 // *                                                                       *
6 // *************************************************************************
7 // *                                                                       *
8 // * Email: info@xcally.com                                                *
9 // * Website: https://www.xcally.com                                       *
10 // *                                                                       *
11 // *************************************************************************
12 // *                                                                       *
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.                         *
16 // *                                                                       *
17 // *************************************************************************
18 var _0xcf86=['ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../components/integrations/configuration','jayson/promise','client','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','request','then','info','SalesforceAccount,\x20%s,\x20%s','request\x20sent','debug','SalesforceAccount,\x20%s,\x20%s,\x20%s','error','message','catch','sendStatus','status','json','count','offset','set','Content-Range','apply','reject','save','update','destroy','end','stack','name','send','index','map','SalesforceAccount','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','limit','order','sort','where','pick','VIRTUAL','filter','includeAll','findAll','rows','show','params','include','options','find','create','body','getConfigurations','findOne','SalesforceConfiguration','merge','nolimit','addConfiguration','AccountId','Subjects','getSubjects','channel','Descriptions','getDescriptions','SalesforceField','getFields','remoteUri','clientId','username','password','securityToken','slice','substring','lastIndexOf','Connection','clientSecret','login','concat','isNil','ticketType','sobject','CallDisposition','CallDurationInSeconds','CallObject','CallType','IsArchived','Priority','Status','Case','Type','Origin','Reason','IsEscalated','SuppliedName','SuppliedCompany','custom','label','picklistValues','True','true','test','stringify','Wrong\x20credentials','statusCode','html-pdf','zip-dir','fast-json-patch','moment','bluebird','mustache','util','path','sox','to-csv','squel','crypto','desk.js','querystring','papaparse'];(function(_0x3e072f,_0x13c792){var _0x1db097=function(_0x12a66b){while(--_0x12a66b){_0x3e072f['push'](_0x3e072f['shift']());}};_0x1db097(++_0x13c792);}(_0xcf86,0x7a));var _0x6cf8=function(_0x166d93,_0x301f09){_0x166d93=_0x166d93-0x0;var _0xba708=_0xcf86[_0x166d93];return _0xba708;};'use strict';var pdf=require(_0x6cf8('0x0'));var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0x6cf8('0x1'));var jsonpatch=require(_0x6cf8('0x2'));var rp=require('request-promise');var moment=require(_0x6cf8('0x3'));var BPromise=require(_0x6cf8('0x4'));var Mustache=require(_0x6cf8('0x5'));var util=require(_0x6cf8('0x6'));var path=require(_0x6cf8('0x7'));var sox=require(_0x6cf8('0x8'));var csv=require(_0x6cf8('0x9'));var ejs=require('ejs');var fs=require('fs');var _=require('lodash');var squel=require(_0x6cf8('0xa'));var crypto=require(_0x6cf8('0xb'));var jsforce=require('jsforce');var deskjs=require(_0x6cf8('0xc'));var toCsv=require(_0x6cf8('0x9'));var querystring=require(_0x6cf8('0xd'));var Papa=require(_0x6cf8('0xe'));var Redis=require(_0x6cf8('0xf'));var authService=require(_0x6cf8('0x10'));var qs=require('../../components/parsers/qs');var as=require(_0x6cf8('0x11'));var hardwareService=require(_0x6cf8('0x12'));var logger=require(_0x6cf8('0x13'))(_0x6cf8('0x14'));var utils=require(_0x6cf8('0x15'));var config=require('../../config/environment');var db=require('../../mysqldb')['db'];var integrations=require(_0x6cf8('0x16'));var jayson=require(_0x6cf8('0x17'));var client=jayson[_0x6cf8('0x18')]['http']({'port':0x232a});function checkPasswordPattern(_0x1b9ca3,_0x4fa774,_0x59e1b3){if(_0x59e1b3){var _0x2955fe=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(_0x2955fe['test'](_0x4fa774)){return _0x1b9ca3;}else{throw new db['Sequelize']['ValidationError'](_0x6cf8('0x19'));}}else{return _0x1b9ca3;}}function respondWithRpcPromise(_0x200017,_0x41d649,_0x1cbbbd,_0x4e7823){return new BPromise(function(_0x358a14,_0x5a64cc){var _0x28d48d=_0x4e7823||client;return _0x28d48d[_0x6cf8('0x1a')](_0x200017,_0x1cbbbd)[_0x6cf8('0x1b')](function(_0x29cef1){logger[_0x6cf8('0x1c')](_0x6cf8('0x1d'),_0x41d649,_0x6cf8('0x1e'));logger[_0x6cf8('0x1f')](_0x6cf8('0x20'),_0x41d649,_0x6cf8('0x1e'),JSON['stringify'](_0x29cef1));if(_0x29cef1[_0x6cf8('0x21')]){if(_0x29cef1[_0x6cf8('0x21')]['code']===0x1f4){logger['error'](_0x6cf8('0x1d'),_0x41d649,_0x29cef1[_0x6cf8('0x21')][_0x6cf8('0x22')]);return _0x5a64cc(_0x29cef1['error'][_0x6cf8('0x22')]);}logger[_0x6cf8('0x21')](_0x6cf8('0x1d'),_0x41d649,_0x29cef1['error'][_0x6cf8('0x22')]);return _0x358a14(_0x29cef1[_0x6cf8('0x21')][_0x6cf8('0x22')]);}else{logger[_0x6cf8('0x1c')](_0x6cf8('0x1d'),_0x41d649,_0x6cf8('0x1e'));_0x358a14(_0x29cef1['result'][_0x6cf8('0x22')]);}})[_0x6cf8('0x23')](function(_0x2729b8){logger[_0x6cf8('0x21')](_0x6cf8('0x1d'),_0x41d649,_0x2729b8);_0x5a64cc(_0x2729b8);});});}function respondWithStatusCode(_0x42ea81,_0x328b4d){_0x328b4d=_0x328b4d||0xcc;return function(_0xede59f){if(_0xede59f){return _0x42ea81[_0x6cf8('0x24')](_0x328b4d);}return _0x42ea81[_0x6cf8('0x25')](_0x328b4d)['end']();};}function respondWithResult(_0x5cb891,_0x1545ec){_0x1545ec=_0x1545ec||0xc8;return function(_0x28b065){if(_0x28b065){return _0x5cb891[_0x6cf8('0x25')](_0x1545ec)[_0x6cf8('0x26')](_0x28b065);}};}function respondWithFilteredResult(_0xfe8dc5,_0x3f2dc6){return function(_0x5b2fc7){if(_0x5b2fc7){var _0x5b99ac=_0x5b2fc7[_0x6cf8('0x27')],_0xd26062=_0x3f2dc6[_0x6cf8('0x28')],_0x42c647=_0x3f2dc6[_0x6cf8('0x28')]+_0x3f2dc6['limit'],_0x34937a;if(_0x42c647>=_0x5b99ac){_0x42c647=_0x5b99ac;_0x34937a=0xc8;}else{_0x34937a=0xce;}_0xfe8dc5[_0x6cf8('0x25')](_0x34937a);return _0xfe8dc5[_0x6cf8('0x29')](_0x6cf8('0x2a'),_0xd26062+'-'+_0x42c647+'/'+_0x5b99ac)[_0x6cf8('0x26')](_0x5b2fc7);}return null;};}function patchUpdates(_0x239698){return function(_0x27ba5c){try{jsonpatch[_0x6cf8('0x2b')](_0x27ba5c,_0x239698,!![]);}catch(_0x503551){return BPromise[_0x6cf8('0x2c')](_0x503551);}return _0x27ba5c[_0x6cf8('0x2d')]();};}function saveUpdates(_0x24294c,_0xe84627){return function(_0x5b919d){if(_0x5b919d){return _0x5b919d[_0x6cf8('0x2e')](_0x24294c)['then'](function(_0x290779){return _0x290779;});}return null;};}function removeEntity(_0x342f36,_0x55d949){return function(_0x17d7dc){if(_0x17d7dc){return _0x17d7dc[_0x6cf8('0x2f')]()['then'](function(){_0x342f36[_0x6cf8('0x25')](0xcc)[_0x6cf8('0x30')]();});}};}function handleEntityNotFound(_0xb8ebbe,_0x88c0c4){return function(_0x575a41){if(!_0x575a41){_0xb8ebbe[_0x6cf8('0x24')](0x194);}return _0x575a41;};}function handleError(_0x5bcc11,_0x3a1e28){_0x3a1e28=_0x3a1e28||0x1f4;return function(_0x239462){logger['error'](_0x239462[_0x6cf8('0x31')]);if(_0x239462[_0x6cf8('0x32')]){delete _0x239462[_0x6cf8('0x32')];}_0x5bcc11[_0x6cf8('0x25')](_0x3a1e28)[_0x6cf8('0x33')](_0x239462);};}exports[_0x6cf8('0x34')]=function(_0x388def,_0x404a88){var _0x40d927={},_0x3343c8={},_0x117637={'count':0x0,'rows':[]};var _0x440585=_[_0x6cf8('0x35')](db[_0x6cf8('0x36')][_0x6cf8('0x37')],function(_0x383347){return{'name':_0x383347[_0x6cf8('0x38')],'type':_0x383347[_0x6cf8('0x39')][_0x6cf8('0x3a')]};});_0x3343c8[_0x6cf8('0x3b')]=_[_0x6cf8('0x35')](_0x440585,'name');_0x3343c8[_0x6cf8('0x3c')]=_[_0x6cf8('0x3d')](_0x388def[_0x6cf8('0x3c')]);_0x3343c8[_0x6cf8('0x3e')]=_[_0x6cf8('0x3f')](_0x3343c8[_0x6cf8('0x3b')],_0x3343c8['query']);_0x40d927[_0x6cf8('0x40')]=_[_0x6cf8('0x3f')](_0x3343c8[_0x6cf8('0x3b')],qs[_0x6cf8('0x41')](_0x388def[_0x6cf8('0x3c')][_0x6cf8('0x41')]));_0x40d927['attributes']=_0x40d927[_0x6cf8('0x40')][_0x6cf8('0x42')]?_0x40d927[_0x6cf8('0x40')]:_0x3343c8[_0x6cf8('0x3b')];if(!_0x388def[_0x6cf8('0x3c')][_0x6cf8('0x43')]('nolimit')){_0x40d927[_0x6cf8('0x44')]=qs[_0x6cf8('0x44')](_0x388def['query'][_0x6cf8('0x44')]);_0x40d927[_0x6cf8('0x28')]=qs[_0x6cf8('0x28')](_0x388def['query'][_0x6cf8('0x28')]);}_0x40d927[_0x6cf8('0x45')]=qs['sort'](_0x388def[_0x6cf8('0x3c')][_0x6cf8('0x46')]);_0x40d927[_0x6cf8('0x47')]=qs[_0x6cf8('0x3e')](_[_0x6cf8('0x48')](_0x388def[_0x6cf8('0x3c')],_0x3343c8[_0x6cf8('0x3e')]),_0x440585);if(_0x388def[_0x6cf8('0x3c')]['filter']){_0x40d927[_0x6cf8('0x47')]=_['merge'](_0x40d927[_0x6cf8('0x47')],{'$or':_[_0x6cf8('0x35')](_0x440585,function(_0x52194a){if(_0x52194a['type']!==_0x6cf8('0x49')){var _0x54b3a3={};_0x54b3a3[_0x52194a[_0x6cf8('0x32')]]={'$like':'%'+_0x388def[_0x6cf8('0x3c')][_0x6cf8('0x4a')]+'%'};return _0x54b3a3;}})});}_0x40d927=_['merge']({},_0x40d927,_0x388def['options']);var _0x399ef4={'where':_0x40d927[_0x6cf8('0x47')]};return db[_0x6cf8('0x36')][_0x6cf8('0x27')](_0x399ef4)[_0x6cf8('0x1b')](function(_0x1db895){_0x117637[_0x6cf8('0x27')]=_0x1db895;if(_0x388def[_0x6cf8('0x3c')][_0x6cf8('0x4b')]){_0x40d927['include']=[{'all':!![]}];}return db[_0x6cf8('0x36')][_0x6cf8('0x4c')](_0x40d927);})[_0x6cf8('0x1b')](function(_0x577462){_0x117637[_0x6cf8('0x4d')]=_0x577462;return _0x117637;})[_0x6cf8('0x1b')](respondWithFilteredResult(_0x404a88,_0x40d927))['catch'](handleError(_0x404a88,null));};exports[_0x6cf8('0x4e')]=function(_0x2db00e,_0x102832){var _0x94b833={'raw':![],'where':{'id':_0x2db00e[_0x6cf8('0x4f')]['id']}},_0x5bbc4e={};_0x5bbc4e[_0x6cf8('0x3b')]=_[_0x6cf8('0x3d')](db[_0x6cf8('0x36')][_0x6cf8('0x37')]);_0x5bbc4e[_0x6cf8('0x3c')]=_['keys'](_0x2db00e[_0x6cf8('0x3c')]);_0x5bbc4e[_0x6cf8('0x3e')]=_[_0x6cf8('0x3f')](_0x5bbc4e[_0x6cf8('0x3b')],_0x5bbc4e[_0x6cf8('0x3c')]);_0x94b833[_0x6cf8('0x40')]=_[_0x6cf8('0x3f')](_0x5bbc4e['model'],qs['fields'](_0x2db00e['query'][_0x6cf8('0x41')]));_0x94b833[_0x6cf8('0x40')]=_0x94b833[_0x6cf8('0x40')][_0x6cf8('0x42')]?_0x94b833['attributes']:_0x5bbc4e['model'];if(_0x2db00e[_0x6cf8('0x3c')][_0x6cf8('0x4b')]){_0x94b833[_0x6cf8('0x50')]=[{'all':!![]}];}_0x94b833=_['merge']({},_0x94b833,_0x2db00e[_0x6cf8('0x51')]);return db['SalesforceAccount'][_0x6cf8('0x52')](_0x94b833)[_0x6cf8('0x1b')](handleEntityNotFound(_0x102832,null))[_0x6cf8('0x1b')](respondWithResult(_0x102832,null))[_0x6cf8('0x23')](handleError(_0x102832,null));};exports[_0x6cf8('0x53')]=function(_0x21429e,_0x18cd53){return db['SalesforceAccount'][_0x6cf8('0x53')](_0x21429e[_0x6cf8('0x54')],{})[_0x6cf8('0x1b')](respondWithResult(_0x18cd53,0xc9))[_0x6cf8('0x23')](handleError(_0x18cd53,null));};exports[_0x6cf8('0x2e')]=function(_0x2ec923,_0x27d7e0){if(_0x2ec923[_0x6cf8('0x54')]['id']){delete _0x2ec923[_0x6cf8('0x54')]['id'];}return db[_0x6cf8('0x36')]['find']({'where':{'id':_0x2ec923['params']['id']}})['then'](handleEntityNotFound(_0x27d7e0,null))[_0x6cf8('0x1b')](saveUpdates(_0x2ec923[_0x6cf8('0x54')],null))[_0x6cf8('0x1b')](respondWithResult(_0x27d7e0,null))[_0x6cf8('0x23')](handleError(_0x27d7e0,null));};exports['destroy']=function(_0x253594,_0x463d60){return db[_0x6cf8('0x36')][_0x6cf8('0x52')]({'where':{'id':_0x253594[_0x6cf8('0x4f')]['id']}})['then'](handleEntityNotFound(_0x463d60,null))[_0x6cf8('0x1b')](removeEntity(_0x463d60,null))[_0x6cf8('0x23')](handleError(_0x463d60,null));};exports[_0x6cf8('0x55')]=function(_0x33be35,_0x3ee4b5,_0x2228a1){var _0x349618={};var _0xca271a={};var _0xcb790a;var _0x2ef07a;return db['SalesforceAccount'][_0x6cf8('0x56')]({'where':{'id':_0x33be35[_0x6cf8('0x4f')]['id']}})[_0x6cf8('0x1b')](handleEntityNotFound(_0x3ee4b5,null))['then'](function(_0x55914e){if(_0x55914e){_0xcb790a=_0x55914e;_0xca271a[_0x6cf8('0x3b')]=_['keys'](db[_0x6cf8('0x57')][_0x6cf8('0x37')]);_0xca271a[_0x6cf8('0x3c')]=_[_0x6cf8('0x3d')](_0x33be35[_0x6cf8('0x3c')]);_0xca271a[_0x6cf8('0x3e')]=_[_0x6cf8('0x3f')](_0xca271a[_0x6cf8('0x3b')],_0xca271a[_0x6cf8('0x3c')]);_0x349618['attributes']=_[_0x6cf8('0x3f')](_0xca271a['model'],qs[_0x6cf8('0x41')](_0x33be35[_0x6cf8('0x3c')][_0x6cf8('0x41')]));_0x349618[_0x6cf8('0x40')]=_0x349618['attributes'][_0x6cf8('0x42')]?_0x349618[_0x6cf8('0x40')]:_0xca271a[_0x6cf8('0x3b')];_0x349618[_0x6cf8('0x45')]=qs[_0x6cf8('0x46')](_0x33be35[_0x6cf8('0x3c')]['sort']);_0x349618[_0x6cf8('0x47')]=qs[_0x6cf8('0x3e')](_[_0x6cf8('0x48')](_0x33be35[_0x6cf8('0x3c')],_0xca271a[_0x6cf8('0x3e')]));if(_0x33be35[_0x6cf8('0x3c')]['filter']){_0x349618[_0x6cf8('0x47')]=_['merge'](_0x349618[_0x6cf8('0x47')],{'$or':_[_0x6cf8('0x35')](_0x349618[_0x6cf8('0x40')],function(_0x2834db){var _0x318fdb={};_0x318fdb[_0x2834db]={'$like':'%'+_0x33be35['query'][_0x6cf8('0x4a')]+'%'};return _0x318fdb;})});}_0x349618=_[_0x6cf8('0x58')]({},_0x349618,_0x33be35[_0x6cf8('0x51')]);return _0xcb790a[_0x6cf8('0x55')](_0x349618);}})[_0x6cf8('0x1b')](function(_0x10792a){if(_0x10792a){_0x2ef07a=_0x10792a['length'];if(!_0x33be35['query'][_0x6cf8('0x43')](_0x6cf8('0x59'))){_0x349618[_0x6cf8('0x44')]=qs['limit'](_0x33be35['query'][_0x6cf8('0x44')]);_0x349618['offset']=qs['offset'](_0x33be35['query'][_0x6cf8('0x28')]);}return _0xcb790a[_0x6cf8('0x55')](_0x349618);}})[_0x6cf8('0x1b')](function(_0x38e534){if(_0x38e534){return _0x38e534?{'count':_0x2ef07a,'rows':_0x38e534}:null;}})[_0x6cf8('0x1b')](respondWithResult(_0x3ee4b5,null))['catch'](handleError(_0x3ee4b5,null));};exports[_0x6cf8('0x5a')]=function(_0x5e22da,_0x843641,_0x5f4500){if(_0x5e22da[_0x6cf8('0x54')]['id']){delete _0x5e22da['body']['id'];}return db['SalesforceAccount'][_0x6cf8('0x56')]({'where':{'id':_0x5e22da['params']['id']}})['then'](handleEntityNotFound(_0x843641,null))[_0x6cf8('0x1b')](function(_0x3cbf5e){if(_0x3cbf5e){_0x5e22da['body'][_0x6cf8('0x5b')]=_0x3cbf5e['id'];_0x5e22da[_0x6cf8('0x54')][_0x6cf8('0x5c')]=integrations[_0x6cf8('0x5d')](_0x5e22da['body'][_0x6cf8('0x5e')],_0x5e22da[_0x6cf8('0x54')]['type']);_0x5e22da[_0x6cf8('0x54')][_0x6cf8('0x5f')]=integrations[_0x6cf8('0x60')](_0x5e22da['body'][_0x6cf8('0x5e')],_0x5e22da[_0x6cf8('0x54')][_0x6cf8('0x39')]);return db[_0x6cf8('0x57')][_0x6cf8('0x53')](_0x5e22da[_0x6cf8('0x54')],{'include':[{'model':db[_0x6cf8('0x61')],'as':_0x6cf8('0x5c')},{'model':db['SalesforceField'],'as':_0x6cf8('0x5f')}]});}return null;})[_0x6cf8('0x1b')](respondWithResult(_0x843641,null))[_0x6cf8('0x23')](handleError(_0x843641,null));};exports[_0x6cf8('0x62')]=function(_0x5d0bed,_0x5c76a4,_0x26388d){var _0xa3d4c7;var _0x281a03='';var _0x144b0d='Task';return db[_0x6cf8('0x36')][_0x6cf8('0x56')]({'where':{'id':_0x5d0bed[_0x6cf8('0x4f')]['id']},'attributes':['id',_0x6cf8('0x63'),_0x6cf8('0x64'),'clientSecret',_0x6cf8('0x65'),_0x6cf8('0x66'),_0x6cf8('0x67')]})[_0x6cf8('0x1b')](handleEntityNotFound(_0x5c76a4,null))['then'](function(_0x32b258){if(_0x32b258){_0x281a03=_0x32b258[_0x6cf8('0x63')];var _0x11f769=_0x281a03[_0x6cf8('0x68')](-0x1);if(_0x11f769==='/'){_0x281a03=_0x281a03[_0x6cf8('0x69')](0x0,_0x281a03[_0x6cf8('0x6a')](_0x11f769));}_0xa3d4c7=new jsforce[(_0x6cf8('0x6b'))]({'oauth2':{'loginUrl':_0x281a03,'clientId':_0x32b258[_0x6cf8('0x64')],'clientSecret':_0x32b258[_0x6cf8('0x6c')]}});return _0xa3d4c7[_0x6cf8('0x6d')](_0x32b258['username'],_0x32b258[_0x6cf8('0x66')][_0x6cf8('0x6e')](_0x32b258['securityToken']));}})[_0x6cf8('0x1b')](function(_0x568255){if(_0x568255){if(!_[_0x6cf8('0x6f')](_0x5d0bed[_0x6cf8('0x3c')][_0x6cf8('0x70')])){_0x144b0d=_0x5d0bed['query'][_0x6cf8('0x70')];}return _0xa3d4c7[_0x6cf8('0x71')](_0x144b0d)['describe']();}})[_0x6cf8('0x1b')](function(_0x4d0037){var _0xd28896=[_0x6cf8('0x72'),_0x6cf8('0x73'),_0x6cf8('0x74'),_0x6cf8('0x75'),_0x6cf8('0x76'),_0x6cf8('0x77'),_0x6cf8('0x78'),'Type'];if(!_[_0x6cf8('0x6f')](_0x5d0bed[_0x6cf8('0x3c')][_0x6cf8('0x70')])&&_0x5d0bed[_0x6cf8('0x3c')][_0x6cf8('0x70')]===_0x6cf8('0x79')){_0xd28896=[_0x6cf8('0x7a'),_0x6cf8('0x7b'),_0x6cf8('0x7c'),_0x6cf8('0x78'),_0x6cf8('0x77'),_0x6cf8('0x7d'),_0x6cf8('0x7e'),_0x6cf8('0x7f')];}if(_0x4d0037){_['remove'](_0x4d0037[_0x6cf8('0x41')],function(_0x3f202d){return _0x3f202d[_0x6cf8('0x80')]===![]&&!_0xd28896['includes'](_0x3f202d[_0x6cf8('0x32')]);});return{'count':_0x4d0037[_0x6cf8('0x41')]['length'],'rows':_[_0x6cf8('0x35')](_0x4d0037[_0x6cf8('0x41')],function(_0x433fa4){return{'id':_0x433fa4['name'],'name':_0x433fa4[_0x6cf8('0x81')],'custom':_0x433fa4['custom'],'options':_0x433fa4[_0x6cf8('0x82')]['length']>0x0?_[_0x6cf8('0x35')](_0x433fa4['picklistValues'],function(_0x306c0b){return{'name':_0x306c0b[_0x6cf8('0x81')],'value':_0x306c0b['value']};}):_0x433fa4[_0x6cf8('0x39')]=='boolean'?[{'name':_0x6cf8('0x83'),'value':_0x6cf8('0x84')},{'name':'False','value':'false'}]:[]};})};}})['then'](respondWithResult(_0x5c76a4,null))[_0x6cf8('0x23')](function(_0x5a4bf4){var _0x25a09d=_0x5d0bed[_0x6cf8('0x3c')][_0x6cf8('0x85')]?0x1f4:_0x5a4bf4['statusCode']||0x1f4;logger[_0x6cf8('0x21')]('getFields,\x20%s,\x20%s,\x20%s','getFields',_0x25a09d,JSON[_0x6cf8('0x86')](_0x5a4bf4));delete _0x5a4bf4[_0x6cf8('0x32')];if(_0x25a09d===0x191){_0x25a09d=0x190;}_0x5c76a4[_0x6cf8('0x25')](_0x25a09d)[_0x6cf8('0x33')](_0x5d0bed[_0x6cf8('0x3c')][_0x6cf8('0x85')]?{'message':_0x6cf8('0x87'),'statusCode':_0x5a4bf4[_0x6cf8('0x88')]}:_0x5a4bf4);});};