New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@pipedream/pipedrive

Package Overview
Dependencies
Maintainers
8
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pipedream/pipedrive - npm Package Compare versions

Comparing version
0.11.0
to
0.11.1
+1
-1
actions/add-activity/add-activity.mjs

@@ -10,3 +10,3 @@ import { ConfigurationError } from "@pipedream/platform";

description: "Adds a new activity. Includes `more_activities_scheduled_in_context` property in response's `additional_data` which indicates whether there are more undone activities scheduled with the same deal, person or organization (depending on the supplied data). See the Pipedrive API docs for Activities [here](https://developers.pipedrive.com/docs/api/v1/#!/Activities). For info on [adding an activity in Pipedrive](https://developers.pipedrive.com/docs/api/v1/Activities#addActivity)",
version: "0.1.20",
version: "0.1.21",
annotations: {

@@ -13,0 +13,0 @@ destructiveHint: false,

@@ -9,3 +9,3 @@ import { ConfigurationError } from "@pipedream/platform";

description: "Adds a new deal. See the Pipedrive API docs for Deals [here](https://developers.pipedrive.com/docs/api/v1/Deals#addDeal)",
version: "0.1.21",
version: "0.1.22",
annotations: {

@@ -12,0 +12,0 @@ destructiveHint: false,

@@ -9,3 +9,3 @@ import { ConfigurationError } from "@pipedream/platform";

description: "Create a new lead in Pipedrive. [See the documentation](https://developers.pipedrive.com/docs/api/v1/Leads#addLead)",
version: "0.0.14",
version: "0.0.15",
annotations: {

@@ -12,0 +12,0 @@ destructiveHint: false,

@@ -9,3 +9,3 @@ import { ConfigurationError } from "@pipedream/platform";

description: "Adds a new person. See the Pipedrive API docs for People [here](https://developers.pipedrive.com/docs/api/v1/Persons#addPerson)",
version: "0.1.20",
version: "0.1.21",
annotations: {

@@ -12,0 +12,0 @@ destructiveHint: false,

@@ -11,3 +11,3 @@ import { ConfigurationError } from "@pipedream/platform";

description: "Searches all Persons by `name`, `email`, `phone`, `notes` and/or custom fields. This endpoint is a wrapper of `/v1/itemSearch` with a narrower OAuth scope. Found Persons can be filtered by Organization ID. See the Pipedrive API docs [here](https://developers.pipedrive.com/docs/api/v1/Persons#searchPersons)",
version: "0.1.20",
version: "0.1.21",
annotations: {

@@ -14,0 +14,0 @@ destructiveHint: false,

@@ -8,3 +8,3 @@ import { parseObject } from "../../common/utils.mjs";

description: "Updates a lead in Pipedrive. [See the documentation](https://developers.pipedrive.com/docs/api/v1/Leads#updateLead)",
version: "0.0.1",
version: "0.0.2",
annotations: {

@@ -11,0 +11,0 @@ destructiveHint: true,

@@ -9,3 +9,3 @@ import { ConfigurationError } from "@pipedream/platform";

description: "Updates an existing person in Pipedrive. [See the documentation](https://developers.pipedrive.com/docs/api/v1/Persons#updatePerson)",
version: "0.0.12",
version: "0.0.13",
annotations: {

@@ -12,0 +12,0 @@ destructiveHint: true,

@@ -59,2 +59,18 @@ export const parseObject = (obj) => {

const getCustomFieldData = async (fn) => {
const { data: personFields } = await fn();
const customFields = personFields.filter((field) => field.created_by_user_id);
const customFieldNames = {};
customFields.forEach((field) => {
customFieldNames[field.key] = {
name: field.name,
type: field.field_type,
options: field?.options?.length
? field.options
: undefined,
};
});
return customFieldNames;
};
export const formatCustomFields = async (resp, getResourcesFn, getFieldsFn) => {

@@ -95,7 +111,3 @@ const { data: persons } = await getResourcesFn({

export const formatCustomFieldDataFromSource = async ({
body, customFieldFn, resourceFn,
}) => {
const customFieldNames = await getCustomFieldNames(customFieldFn);
const { data } = await resourceFn(body.data.id);
const formatCustomSelectFields = (customFieldNames, data, body, isPrevious = false) => {
const formattedCustomFields = {};

@@ -106,16 +118,32 @@ for (const [

] of Object.entries(customFieldNames)) {
formattedCustomFields[value] = data[key] ?? data?.custom_fields?.[key] ?? null;
}
const formattedPreviousCustomFields = {};
if (body?.previous?.custom_fields) {
for (const [
key,
value,
] of Object.entries(customFieldNames)) {
if (body.previous.custom_fields[key]) {
formattedPreviousCustomFields[value] = body.previous.custom_fields[key];
let fieldValue = isPrevious
? body.previous.custom_fields[key]
: data[key] ?? data?.custom_fields?.[key] ?? null;
if (fieldValue && value.options?.length) {
if (value.type === "enum") {
fieldValue = value.options
.find((option) => option.id === (fieldValue.id || fieldValue))
?.label;
}
if (value.type === "set") {
const selectedOptions = isPrevious
? fieldValue.values
: fieldValue.split(",");
fieldValue = selectedOptions.map((option) => value.options.find((o) => o.id == (option.id || option))?.label).join(", ");
}
}
formattedCustomFields[value.name] = fieldValue?.value ?? fieldValue;
}
return formattedCustomFields;
};
export const formatCustomFieldDataFromSource = async ({
body, customFieldFn, resourceFn,
}) => {
const customFieldNames = await getCustomFieldData(customFieldFn);
const { data } = await resourceFn(body.data.id);
const formattedCustomFields = await formatCustomSelectFields(customFieldNames, data, body);
const formattedPreviousCustomFields
= await formatCustomSelectFields(customFieldNames, data, body, true);
return {

@@ -122,0 +150,0 @@ ...body,

{
"name": "@pipedream/pipedrive",
"version": "0.11.0",
"version": "0.11.1",
"description": "Pipedream Pipedrive Components",

@@ -5,0 +5,0 @@ "main": "pipedrive.app.mjs",

@@ -10,3 +10,3 @@ import { parseData } from "../../common/utils.mjs";

description: "Emit new event when a deal is updated.",
version: "0.1.9",
version: "0.1.10",
type: "source",

@@ -13,0 +13,0 @@ dedupe: "unique",

@@ -10,3 +10,3 @@ import { formatCustomFieldDataFromSource } from "../../common/utils.mjs";

description: "Emit new event when a lead is updated.",
version: "0.1.9",
version: "0.1.10",
type: "source",

@@ -13,0 +13,0 @@ dedupe: "unique",

@@ -10,3 +10,3 @@ import { formatCustomFieldDataFromSource } from "../../common/utils.mjs";

description: "Emit new event when a person is updated.",
version: "0.1.9",
version: "0.1.10",
type: "source",

@@ -13,0 +13,0 @@ dedupe: "unique",