File tree Expand file tree Collapse file tree 3 files changed +11
-6
lines changed Expand file tree Collapse file tree 3 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,11 @@ export default {
99 type : "action" ,
1010 props : {
1111 salesloft,
12+ info : {
13+ type : "alert" ,
14+ alertType : "info" ,
15+ content : "Either `Email Address` or both `Phone` and `Last Name` must be provided." ,
16+ } ,
1217 email : {
1318 type : "string" ,
1419 label : "Email" ,
@@ -47,7 +52,6 @@ export default {
4752 } ,
4853 } ,
4954 async run ( { $ } ) {
50- // Either email_address or phone/last_name must be provided as a unique lookup
5155 if ( ! this . email && ! ( this . phone && this . lastName ) ) {
5256 throw new ConfigurationError ( "Either `Email Address` or both `Phone` and `Last Name` must be provided" ) ;
5357 }
@@ -64,7 +68,7 @@ export default {
6468 } ,
6569 } ) ;
6670
67- $ . export ( "$summary" , `Successfully created person " ${ response . first_name || response . email_address || response . id } " ` ) ;
71+ $ . export ( "$summary" , `Successfully created person (ID: ${ response . id } ) ` ) ;
6872
6973 return response ;
7074 } ,
Original file line number Diff line number Diff line change 11{
22 "name" : " @pipedream/salesloft" ,
3- "version" : " 0.0.1 " ,
3+ "version" : " 0.1.0 " ,
44 "description" : " Pipedream Salesloft Components" ,
55 "main" : " salesloft.app.mjs" ,
66 "keywords" : [
1010 "homepage" : " https://pipedream.com/apps/salesloft" ,
1111 "author" :
" Pipedream <[email protected] > (https://pipedream.com/)" ,
1212 "dependencies" : {
13- "@pipedream/platform" : " ^1.5.1 "
13+ "@pipedream/platform" : " ^3.0.3 "
1414 },
1515 "publishConfig" : {
1616 "access" : " public"
Original file line number Diff line number Diff line change @@ -61,18 +61,19 @@ export default {
6161 _apiUrl ( ) {
6262 return "https://api.salesloft.com/v2" ;
6363 } ,
64- _makeRequest ( {
64+ async _makeRequest ( {
6565 $ = this ,
6666 path,
6767 ...args
6868 } ) {
69- return axios ( $ , {
69+ const response = await axios ( $ , {
7070 url : `${ this . _apiUrl ( ) } ${ path } ` ,
7171 headers : {
7272 Authorization : `Bearer ${ this . $auth . api_key } ` ,
7373 } ,
7474 ...args ,
7575 } ) ;
76+ return response . data ;
7677 } ,
7778 async createPerson ( args = { } ) {
7879 return this . _makeRequest ( {
You can’t perform that action at this time.
0 commit comments