Built motion from commit 06a208af.|2.6.26
[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 _0xf9f4=['clientSecret','securityToken','serverUrl','Configurations','moduleSearch','leadId','additionalSearchContact','additionalSearchLead','SalesforceField','Variable','Descriptions','Fields','../../client','Request','GetSalesforceAccount','name','username','password','remoteUri','clientId'];(function(_0x34c177,_0x56a56a){var _0x2039ab=function(_0x42caf0){while(--_0x42caf0){_0x34c177['push'](_0x34c177['shift']());}};_0x2039ab(++_0x56a56a);}(_0xf9f4,0x70));var _0x4f9f=function(_0x32f175,_0x53fb85){_0x32f175=_0x32f175-0x0;var _0x3bf934=_0xf9f4[_0x32f175];return _0x3bf934;};'use strict';var client=require(_0x4f9f('0x0'));exports['getSalesforceAccounts']=function(){return function(_0x1df240){return client[_0x4f9f('0x1')](_0x4f9f('0x2'),{'options':{'raw':![],'attributes':['id',_0x4f9f('0x3'),_0x4f9f('0x4'),_0x4f9f('0x5'),_0x4f9f('0x6'),_0x4f9f('0x7'),_0x4f9f('0x8'),_0x4f9f('0x9'),_0x4f9f('0xa'),'type'],'include':[{'model':'SalesforceConfiguration','as':_0x4f9f('0xb'),'attributes':['id','name',_0x4f9f('0xc'),'moduleCreate','ticketType',_0x4f9f('0xd'),'additionalSearchAccount',_0x4f9f('0xe'),_0x4f9f('0xf')],'include':[{'model':_0x4f9f('0x10'),'as':'Subjects','include':[{'model':_0x4f9f('0x11'),'as':_0x4f9f('0x11'),'attributes':['id',_0x4f9f('0x3')]}]},{'model':_0x4f9f('0x10'),'as':_0x4f9f('0x12'),'include':[{'model':_0x4f9f('0x11'),'as':_0x4f9f('0x11'),'attributes':['id',_0x4f9f('0x3')]}]},{'model':_0x4f9f('0x10'),'as':_0x4f9f('0x13'),'include':[{'model':_0x4f9f('0x11'),'as':'Variable','attributes':['id',_0x4f9f('0x3')]}]}]}]},'log':_0x4f9f('0x2')});};};