Skip to content

Commit f23c367

Browse files
committed
Merge branch 'master' into 17945-trusted-shops
2 parents 45e508e + a6b99c9 commit f23c367

File tree

58 files changed

+169
-69
lines changed

Some content is hidden

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

58 files changed

+169
-69
lines changed

components/google_my_business/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/google_my_business",
3-
"version": "0.2.1",
3+
"version": "0.2.2",
44
"description": "Pipedream Google My Business Components",
55
"main": "dist/app/google_my_business.app.mjs",
66
"keywords": [

components/google_my_business/sources/common.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ export default {
5353
const currentRun: number = Date.now();
5454
const lastRun: Date = this.getLastRun();
5555
const items: EntityWithCreateTime[] = await this.getItems();
56+
console.log("Number of reviews: ", items.length);
5657
this.setLastRun(currentRun);
5758

5859
const filteredItems = (lastRun

components/google_my_business/sources/new-post-created/new-post-created.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default defineSource({
1010
key: "google_my_business-new-post-created",
1111
name: "New Post Created",
1212
description: `Emit new event for each new local post on a location [See the documentation](${DOCS_LINK})`,
13-
version: "0.0.5",
13+
version: "0.0.6",
1414
type: "source",
1515
dedupe: "unique",
1616
methods: {

components/google_my_business/sources/new-review-created-multiple-locations/new-review-created-multiple-locations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export default defineSource({
1313
key: "google_my_business-new-review-created-multiple-locations",
1414
name: "New Review Created (Multiple Locations)",
1515
description: `Emit new event for each new review on any of the selected locations [See the documentation](${DOCS_LINK})`,
16-
version: "0.0.2",
16+
version: "0.0.3",
1717
type: "source",
1818
dedupe: "unique",
1919
props: {

components/google_my_business/sources/new-review-created/new-review-created.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default defineSource({
1010
key: "google_my_business-new-review-created",
1111
name: "New Review Created",
1212
description: `Emit new event for each new review on a location [See the documentation](${DOCS_LINK})`,
13-
version: "0.0.5",
13+
version: "0.0.6",
1414
type: "source",
1515
dedupe: "unique",
1616
methods: {

components/hubspot/sources/common/common.mjs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,19 +140,22 @@ export default {
140140
}
141141
}
142142
},
143-
async getPaginatedItems(resourceFn, params) {
143+
async getPaginatedItems(resourceFn, params, after = null) {
144144
const items = [];
145+
const maxPages = 10;
146+
let page = 0;
145147
do {
146148
const {
147149
results, paging,
148150
} = await resourceFn(params);
149151
items.push(...results);
150152
if (paging) {
151153
params.after = paging.next.after;
154+
page++;
152155
} else {
153156
delete params.after;
154157
}
155-
} while (params.after);
158+
} while (params.after && after && page < maxPages);
156159
return items;
157160
},
158161
emitEvent(result) {

components/hubspot/sources/delete-blog-article/delete-blog-article.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export default {
66
key: "hubspot-delete-blog-article",
77
name: "Deleted Blog Posts",
88
description: "Emit new event for each deleted blog post.",
9-
version: "0.0.32",
9+
version: "0.0.33",
1010
dedupe: "unique",
1111
type: "source",
1212
methods: {

components/hubspot/sources/new-company-property-change/new-company-property-change.mjs

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default {
77
key: "hubspot-new-company-property-change",
88
name: "New Company Property Change",
99
description: "Emit new event when a specified property is provided or updated on a company. [See the documentation](https://developers.hubspot.com/docs/api/crm/companies)",
10-
version: "0.0.25",
10+
version: "0.0.26",
1111
dedupe: "unique",
1212
type: "source",
1313
props: {
@@ -46,7 +46,7 @@ export default {
4646
return !updatedAfter || this.getTs(company) > updatedAfter;
4747
},
4848
getParams(after) {
49-
return {
49+
const params = {
5050
object: "companies",
5151
data: {
5252
limit: DEFAULT_LIMIT,
@@ -66,16 +66,19 @@ export default {
6666
propertyName: this.property,
6767
operator: "HAS_PROPERTY",
6868
},
69-
{
70-
propertyName: "hs_lastmodifieddate",
71-
operator: "GTE",
72-
value: after,
73-
},
7469
],
7570
},
7671
],
7772
},
7873
};
74+
if (after) {
75+
params.data.filterGroups[0].filters.push({
76+
propertyName: "hs_lastmodifieddate",
77+
operator: "GTE",
78+
value: after,
79+
});
80+
}
81+
return params;
7982
},
8083
batchGetCompanies(inputs) {
8184
return this.hubspot.batchGetObjects({
@@ -104,6 +107,7 @@ export default {
104107
const updatedCompanies = await this.getPaginatedItems(
105108
this.hubspot.searchCRM,
106109
params,
110+
after,
107111
);
108112

109113
if (!updatedCompanies.length) {

components/hubspot/sources/new-contact-added-to-list/new-contact-added-to-list.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default {
1212
name: "New Contact Added to List",
1313
description:
1414
"Emit new event when a contact is added to a HubSpot list. [See the documentation](https://developers.hubspot.com/docs/reference/api/crm/lists#get-%2Fcrm%2Fv3%2Flists%2F%7Blistid%7D%2Fmemberships%2Fjoin-order)",
15-
version: "0.0.4",
15+
version: "0.0.5",
1616
type: "source",
1717
dedupe: "unique",
1818
props: {

components/hubspot/sources/new-contact-property-change/new-contact-property-change.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default {
77
key: "hubspot-new-contact-property-change",
88
name: "New Contact Property Change",
99
description: "Emit new event when a specified property is provided or updated on a contact. [See the documentation](https://developers.hubspot.com/docs/api/crm/contacts)",
10-
version: "0.0.27",
10+
version: "0.0.28",
1111
dedupe: "unique",
1212
type: "source",
1313
props: {
@@ -106,6 +106,7 @@ export default {
106106
const updatedContacts = await this.getPaginatedItems(
107107
this.hubspot.searchCRM,
108108
params,
109+
after,
109110
);
110111

111112
if (!updatedContacts.length) {

0 commit comments

Comments
 (0)