89e71616348854b65d0c77c4ee5ce9c5987ade35
[motion2.git] / server / services / ami / rpc / integrations / freshsales.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 _0x0f4d=['remoteUri','serverUrl','FreshsalesConfiguration','Configurations','Subjects','type','variableName','Variable','FreshsalesField','content','key','GetFreshsalesccount','Request','name','username','apiKey'];(function(_0x2070da,_0x45e586){var _0x4f9fe1=function(_0x5b6f2a){while(--_0x5b6f2a){_0x2070da['push'](_0x2070da['shift']());}};_0x4f9fe1(++_0x45e586);}(_0x0f4d,0x12c));var _0xd0f4=function(_0x586959,_0x30eef0){_0x586959=_0x586959-0x0;var _0x21093e=_0x0f4d[_0x586959];return _0x21093e;};'use strict';var client=require('../../client');exports['getFreshsalesAccounts']=function(){return function(_0x54da22){return client[_0xd0f4('0x0')]('GetFreshsalesAccount',{'options':{'raw':![],'attributes':['id',_0xd0f4('0x1'),_0xd0f4('0x2'),_0xd0f4('0x3'),_0xd0f4('0x4'),_0xd0f4('0x5')],'include':[{'model':_0xd0f4('0x6'),'as':_0xd0f4('0x7'),'attributes':['id',_0xd0f4('0x1')],'include':[{'model':'FreshsalesField','as':_0xd0f4('0x8'),'attributes':['id',_0xd0f4('0x9'),'content',_0xd0f4('0xa')],'include':[{'model':_0xd0f4('0xb'),'as':'Variable','attributes':['id',_0xd0f4('0x1')]}]},{'model':_0xd0f4('0xc'),'as':'Descriptions','attributes':['id',_0xd0f4('0x9'),_0xd0f4('0xd'),_0xd0f4('0xe'),'keyType','keyContent',_0xd0f4('0xa')],'include':[{'model':_0xd0f4('0xb'),'as':_0xd0f4('0xb'),'attributes':['id',_0xd0f4('0x1')]}]}]}]},'log':_0xd0f4('0xf')});};};