Skip to content

Commit b4ab376

Browse files
authored
Merge branch 'master' into add-quickbooks-missing-actions
2 parents 98347b0 + ce38964 commit b4ab376

File tree

72 files changed

+969
-95
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+969
-95
lines changed
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
import { defineApp } from "@pipedream/types";
2-
3-
export default defineApp({
1+
export default {
42
type: "app",
5-
app: "whatconverts",
3+
app: "adtraction",
64
propDefinitions: {},
75
methods: {
86
// this.$auth contains connected account data
97
authKeys() {
108
console.log(Object.keys(this.$auth));
119
},
1210
},
13-
});
11+
};

components/adtraction/package.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "@pipedream/adtraction",
3+
"version": "0.0.1",
4+
"description": "Pipedream Adtraction Components",
5+
"main": "adtraction.app.mjs",
6+
"keywords": [
7+
"pipedream",
8+
"adtraction"
9+
],
10+
"homepage": "https://pipedream.com/apps/adtraction",
11+
"author": "Pipedream <[email protected]> (https://pipedream.com/)",
12+
"publishConfig": {
13+
"access": "public"
14+
}
15+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
export default {
2+
type: "app",
3+
app: "dolibarr",
4+
propDefinitions: {},
5+
methods: {
6+
// this.$auth contains connected account data
7+
authKeys() {
8+
console.log(Object.keys(this.$auth));
9+
},
10+
},
11+
};

components/dolibarr/package.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "@pipedream/dolibarr",
3+
"version": "0.0.1",
4+
"description": "Pipedream Dolibarr Components",
5+
"main": "dolibarr.app.mjs",
6+
"keywords": [
7+
"pipedream",
8+
"dolibarr"
9+
],
10+
"homepage": "https://pipedream.com/apps/dolibarr",
11+
"author": "Pipedream <[email protected]> (https://pipedream.com/)",
12+
"publishConfig": {
13+
"access": "public"
14+
}
15+
}

components/hubspot/actions/search-crm/search-crm.mjs

Lines changed: 43 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
DEFAULT_PRODUCT_PROPERTIES,
99
DEFAULT_LINE_ITEM_PROPERTIES,
1010
DEFAULT_LEAD_PROPERTIES,
11+
DEFAULT_LIMIT,
1112
} from "../../common/constants.mjs";
1213
import common from "../common/common-create.mjs";
1314
import { ConfigurationError } from "@pipedream/platform";
@@ -16,7 +17,7 @@ export default {
1617
key: "hubspot-search-crm",
1718
name: "Search CRM",
1819
description: "Search companies, contacts, deals, feedback submissions, products, tickets, line-items, quotes, leads, or custom objects. [See the documentation](https://developers.hubspot.com/docs/api/crm/search)",
19-
version: "1.0.3",
20+
version: "1.0.4",
2021
type: "action",
2122
props: {
2223
hubspot,
@@ -33,6 +34,13 @@ export default {
3334
],
3435
reloadProps: true,
3536
},
37+
exactMatch: {
38+
type: "boolean",
39+
label: "Exact Match",
40+
description: "Set to `true` to search for an exact match of the search value. If `false`, partial matches will be returned. Default: `true`",
41+
default: true,
42+
optional: true,
43+
},
3644
createIfNotFound: {
3745
type: "boolean",
3846
label: "Create if not found?",
@@ -97,7 +105,7 @@ export default {
97105
props.searchValue = {
98106
type: "string",
99107
label: "Search Value",
100-
description: "Search for objects where the specified search field/property contains an exact match of the search value",
108+
description: "Search for objects where the specified search field/property contains a match of the search value",
101109
};
102110
const defaultProperties = this.getDefaultProperties();
103111
if (defaultProperties?.length) {
@@ -201,6 +209,23 @@ export default {
201209
label: labels.plural,
202210
})) || [];
203211
},
212+
async paginate(params) {
213+
let results;
214+
const items = [];
215+
while (!results || params.after) {
216+
results = await this.hubspot.searchCRM(params);
217+
if (results.paging) {
218+
params.after = results.paging.next.after;
219+
} else {
220+
delete params.after;
221+
}
222+
results = results.results;
223+
for (const result of results) {
224+
items.push(result);
225+
}
226+
}
227+
return items;
228+
},
204229
},
205230
async run({ $ }) {
206231
const {
@@ -210,6 +235,7 @@ export default {
210235
additionalProperties = [],
211236
searchProperty,
212237
searchValue,
238+
exactMatch,
213239
/* eslint-disable no-unused-vars */
214240
info,
215241
createIfNotFound,
@@ -242,20 +268,30 @@ export default {
242268
...defaultProperties,
243269
...additionalProperties,
244270
],
245-
filters: [
271+
};
272+
if (exactMatch) {
273+
data.filters = [
246274
{
247275
propertyName: searchProperty,
248276
operator: "EQ",
249277
value: searchValue,
250278
},
251-
],
252-
};
253-
const { results } = await hubspot.searchCRM({
279+
];
280+
} else {
281+
data.limit = DEFAULT_LIMIT;
282+
}
283+
284+
let results = await this.paginate({
254285
object: actualObjectType,
255286
data,
256-
$,
257287
});
258288

289+
if (!exactMatch) {
290+
results = results.filter((result) =>
291+
result.properties[searchProperty]
292+
&& result.properties[searchProperty].toLowerCase().includes(searchValue.toLowerCase()));
293+
}
294+
259295
if (!results?.length && createIfNotFound) {
260296
const response = await hubspot.createObject({
261297
$,

components/hubspot/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/hubspot",
3-
"version": "1.2.2",
3+
"version": "1.2.3",
44
"description": "Pipedream Hubspot Components",
55
"main": "hubspot.app.mjs",
66
"keywords": [

components/pinghome/package.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "@pipedream/pinghome",
3+
"version": "0.0.1",
4+
"description": "Pipedream Pinghome Components",
5+
"main": "pinghome.app.mjs",
6+
"keywords": [
7+
"pipedream",
8+
"pinghome"
9+
],
10+
"homepage": "https://pipedream.com/apps/pinghome",
11+
"author": "Pipedream <[email protected]> (https://pipedream.com/)",
12+
"publishConfig": {
13+
"access": "public"
14+
}
15+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
export default {
2+
type: "app",
3+
app: "pinghome",
4+
propDefinitions: {},
5+
methods: {
6+
// this.$auth contains connected account data
7+
authKeys() {
8+
console.log(Object.keys(this.$auth));
9+
},
10+
},
11+
};

components/pipedrive/actions/update-deal/update-deal.mjs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default {
55
key: "pipedrive-update-deal",
66
name: "Update Deal",
77
description: "Updates the properties of a deal. See the Pipedrive API docs for Deals [here](https://developers.pipedrive.com/docs/api/v1/Deals#updateDeal)",
8-
version: "0.1.10",
8+
version: "0.1.11",
99
type: "action",
1010
props: {
1111
pipedriveApp,
@@ -91,6 +91,12 @@ export default {
9191
"visibleTo",
9292
],
9393
},
94+
note: {
95+
type: "string",
96+
label: "Note",
97+
description: "A note to add to the deal",
98+
optional: true,
99+
},
94100
},
95101
async run({ $ }) {
96102
try {
@@ -110,6 +116,13 @@ export default {
110116
visible_to: this.visibleTo,
111117
});
112118

119+
if (this.note) {
120+
await this.pipedriveApp.addNote({
121+
content: this.note,
122+
deal_id: this.dealId,
123+
});
124+
}
125+
113126
$.export("$summary", "Successfully updated deal");
114127

115128
return resp;

components/pipedrive/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/pipedrive",
3-
"version": "0.5.0",
3+
"version": "0.5.1",
44
"description": "Pipedream Pipedrive Components",
55
"main": "pipedrive.app.mjs",
66
"keywords": [

0 commit comments

Comments
 (0)