Skip to content

Commit

Permalink
some adjusts
Browse files Browse the repository at this point in the history
  • Loading branch information
luancazarine committed Feb 19, 2025
1 parent 5df6447 commit e06a9a5
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 28 deletions.
7 changes: 0 additions & 7 deletions components/pipedrive/actions/add-deal/add-deal.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,6 @@ export default {
"dealCurrency",
],
},
addTime: {
propDefinition: [
pipedriveApp,
"addTime",
],
},
status: {
propDefinition: [
pipedriveApp,
Expand Down Expand Up @@ -101,7 +95,6 @@ export default {
stage_id: this.stageId,
value: this.value,
currency: this.currency,
add_time: this.addTime,
status: this.status,
probability: this.probability,
lost_reason: this.lostReason,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,13 @@ export default {
],
description: "Visibility of the organization. If omitted, visibility will be set to the default visibility setting of this item type for the authorized user.",
},
addTime: {
propDefinition: [
pipedriveApp,
"addTime",
],
description: "Optional creation date & time of the organization in UTC. Requires admin user API token. Format: `YYYY-MM-DDTHH:MM:SSZ`",
},
},
async run({ $ }) {
try {
const resp = await this.pipedriveApp.addOrganization({
name: this.name,
owner_id: this.ownerId,
visible_to: this.visibleTo,
add_time: this.addTime,
});

$.export("$summary", "Successfully added organization");
Expand Down
12 changes: 2 additions & 10 deletions components/pipedrive/actions/add-person/add-person.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ export default {
},
emails: {
type: "string[]",
label: "Email",
label: "Emails",
description: "Email addresses (one or more) associated with the person, presented in the same manner as received by GET request of a person. **Example: {\"value\":\"[email protected]\", \"primary\":true, \"label\":\"work\"}**",
optional: true,
},
phones: {
type: "string[]",
label: "Phone",
label: "Phones",
description: "Phone numbers (one or more) associated with the person, presented in the same manner as received by GET request of a person. **Example: {\"value\":\"12345\", \"primary\":true, \"label\":\"work\"}**",
optional: true,
},
Expand All @@ -49,13 +49,6 @@ export default {
],
description: "Visibility of the person. If omitted, visibility will be set to the default visibility setting of this item type for the authorized user.",
},
addTime: {
propDefinition: [
pipedriveApp,
"addTime",
],
description: "Optional creation date & time of the person in UTC. Requires admin user API token. Format: `YYYY-MM-DDTHH:MM:SSZ`",
},
},
async run({ $ }) {
try {
Expand All @@ -64,7 +57,6 @@ export default {
name: this.name,
owner_id: this.ownerId,
org_id: this.organizationId,
add_time: this.addTime,
emails: parseObject(this.emails),
phones: parseObject(this.phones),
visible_to: this.visibleTo,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { ConfigurationError } from "@pipedream/platform";
import constants from "../../common/constants.mjs";
import { parseObject } from "../../common/utils.mjs";
import pipedriveApp from "../../pipedrive.app.mjs";

export default {
Expand All @@ -16,9 +17,9 @@ export default {
description: "The search term to look for. Minimum 2 characters (or 1 if using exact_match).",
},
fields: {
type: "string",
type: "string[]",
label: "Search fields",
description: "A comma-separated string array. The fields to perform the search from. Defaults to all of them.",
description: "An array containing fields to perform the search from. Defaults to all of them.",
optional: true,
options: constants.FIELD_OPTIONS,
},
Expand Down Expand Up @@ -60,7 +61,7 @@ export default {
const resp =
await this.pipedriveApp.searchPersons({
term: this.term,
fields: this.fields,
fields: parseObject(this.fields),
exact_match: this.exactMatch,
org_id: this.organizationId,
include_fields: this.includeFields,
Expand Down

0 comments on commit e06a9a5

Please sign in to comment.