297997203edc28f5b9e340a80b0edf67435dfbd7
[motion2.git] / server / services / ami / rpc / integrations / salesforce.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 _0x0561=['GetSalesforceAccount','../../client','getSalesforceAccounts','Request','name','username','remoteUri','clientId','clientSecret','securityToken','serverUrl','type','moduleSearch','ticketType','leadId','additionalSearchAccount','additionalSearchContact','additionalSearchLead','SalesforceField','Variable','Fields'];(function(_0x5986f0,_0x464a3b){var _0x45a7f2=function(_0xb20a6a){while(--_0xb20a6a){_0x5986f0['push'](_0x5986f0['shift']());}};_0x45a7f2(++_0x464a3b);}(_0x0561,0x1e4));var _0x1056=function(_0x6c6827,_0x3bc809){_0x6c6827=_0x6c6827-0x0;var _0x894425=_0x0561[_0x6c6827];return _0x894425;};'use strict';var client=require(_0x1056('0x0'));exports[_0x1056('0x1')]=function(){return function(_0x36844c){return client[_0x1056('0x2')]('GetSalesforceAccount',{'options':{'raw':![],'attributes':['id',_0x1056('0x3'),_0x1056('0x4'),'password',_0x1056('0x5'),_0x1056('0x6'),_0x1056('0x7'),_0x1056('0x8'),_0x1056('0x9'),_0x1056('0xa')],'include':[{'model':'SalesforceConfiguration','as':'Configurations','attributes':['id',_0x1056('0x3'),_0x1056('0xb'),'moduleCreate',_0x1056('0xc'),_0x1056('0xd'),_0x1056('0xe'),_0x1056('0xf'),_0x1056('0x10')],'include':[{'model':_0x1056('0x11'),'as':'Subjects','include':[{'model':_0x1056('0x12'),'as':'Variable','attributes':['id',_0x1056('0x3')]}]},{'model':_0x1056('0x11'),'as':'Descriptions','include':[{'model':_0x1056('0x12'),'as':_0x1056('0x12'),'attributes':['id','name']}]},{'model':_0x1056('0x11'),'as':_0x1056('0x13'),'include':[{'model':_0x1056('0x12'),'as':_0x1056('0x12'),'attributes':['id',_0x1056('0x3')]}]}]}]},'log':_0x1056('0x14')});};};