Skip to content

Commit 5ca3955

Browse files
committed
Adjustments
1 parent 156cb18 commit 5ca3955

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

components/salesloft/actions/create-person/create-person.mjs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff 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
},

components/salesloft/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
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": [
@@ -10,7 +10,7 @@
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"

components/salesloft/salesloft.app.mjs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff 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({

0 commit comments

Comments
 (0)