Skip to content

Commit 9453d44

Browse files
committed
Merge branch '18109-microsoft-outlook' of https://github.com/PipedreamHQ/pipedream into 18109-microsoft-outlook
2 parents 5b2c240 + 0c8c1d4 commit 9453d44

File tree

74 files changed

+1169
-116
lines changed

Some content is hidden

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

74 files changed

+1169
-116
lines changed

components/devin/devin.app.mjs

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: "devin",
4+
propDefinitions: {},
5+
methods: {
6+
// this.$auth contains connected account data
7+
authKeys() {
8+
console.log(Object.keys(this.$auth));
9+
},
10+
},
11+
};

components/devin/package.json

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

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.6.2",
3+
"version": "1.6.3",
44
"description": "Pipedream Hubspot Components",
55
"main": "hubspot.app.mjs",
66
"keywords": [

components/hubspot/sources/new-or-updated-contact/new-or-updated-contact.mjs

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default {
1010
key: "hubspot-new-or-updated-contact",
1111
name: "New or Updated Contact",
1212
description: "Emit new event for each new or updated contact in Hubspot.",
13-
version: "0.0.14",
13+
version: "0.0.15",
1414
dedupe: "unique",
1515
type: "source",
1616
props: {
@@ -96,16 +96,21 @@ export default {
9696
}
9797
return true;
9898
},
99-
getParams() {
99+
getParams(after) {
100100
const { properties = [] } = this;
101-
return {
101+
const dateProperty = this.newOnly
102+
? "createdate"
103+
: "lastmodifieddate";
104+
const isFirstRun = !this.db.get("after");
105+
106+
const params = {
102107
data: {
103-
limit: DEFAULT_LIMIT,
108+
limit: isFirstRun
109+
? 100
110+
: DEFAULT_LIMIT,
104111
sorts: [
105112
{
106-
propertyName: this.newOnly
107-
? "createdate"
108-
: "lastmodifieddate",
113+
propertyName: dateProperty,
109114
direction: "DESCENDING",
110115
},
111116
],
@@ -116,6 +121,22 @@ export default {
116121
},
117122
object: "contacts",
118123
};
124+
125+
if (after) {
126+
params.data.filterGroups = [
127+
{
128+
filters: [
129+
{
130+
propertyName: dateProperty,
131+
operator: "GT",
132+
value: after,
133+
},
134+
],
135+
},
136+
];
137+
}
138+
139+
return params;
119140
},
120141
async processResults(after, params) {
121142
await this.searchCRM(params, after);

components/microsoft_outlook/actions/find-email/find-email.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ export default {
4444
args: {
4545
$,
4646
params: {
47-
"$search": this.search,
4847
"$filter": this.filter,
4948
"$orderby": this.orderBy,
5049
},

components/microsoft_outlook/sources/common/common-new-email.mjs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,5 +54,22 @@ export default {
5454
const draftsFolderId = this.db.get("draftsFolderId");
5555
return item.parentFolderId !== sentItemFolderId && item.parentFolderId !== draftsFolderId;
5656
},
57+
async getMessageAttachments(message) {
58+
const { value: attachments } = await this.microsoftOutlook.listAttachments({
59+
messageId: message.id,
60+
});
61+
if (!attachments?.length) {
62+
return [];
63+
}
64+
return attachments.map((attachment) => ({
65+
...attachment,
66+
messageId: message.id,
67+
messageSubject: message.subject,
68+
messageSender: message.sender,
69+
messageReceivedDateTime: message.receivedDateTime,
70+
parentFolderId: message.parentFolderId,
71+
contentBytes: undefined,
72+
}));
73+
},
5774
},
5875
};

components/microsoft_outlook/sources/new-attachment-received/new-attachment-received.mjs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -36,23 +36,6 @@ export default {
3636
}
3737
return attachments;
3838
},
39-
async getMessageAttachments(message) {
40-
const { value: attachments } = await this.microsoftOutlook.listAttachments({
41-
messageId: message.id,
42-
});
43-
if (!attachments?.length) {
44-
return [];
45-
}
46-
return attachments.map((attachment) => ({
47-
...attachment,
48-
messageId: message.id,
49-
messageSubject: message.subject,
50-
messageSender: message.sender,
51-
messageReceivedDateTime: message.receivedDateTime,
52-
parentFolderId: message.parentFolderId,
53-
contentBytes: undefined,
54-
}));
55-
},
5639
emitEvent(item) {
5740
if (this.isRelevant(item)) {
5841
this.$emit(item, this.generateMeta(item));

components/microsoft_outlook/sources/new-email/new-email.mjs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default {
77
key: "microsoft_outlook-new-email",
88
name: "New Email Event (Instant)",
99
description: "Emit new event when an email is received in specified folders.",
10-
version: "0.0.21",
10+
version: "0.1.0",
1111
type: "source",
1212
dedupe: "unique",
1313
methods: {
@@ -66,6 +66,10 @@ export default {
6666
resource: folder,
6767
messageId: resourceId,
6868
});
69+
if (item.hasAttachments) {
70+
const attachments = await this.getMessageAttachments(item);
71+
item.attachments = attachments;
72+
}
6973
this.emitEvent(item);
7074
} catch {
7175
console.log(`Could not fetch message with ID: ${resourceId}`);

components/notion/actions/append-block/append-block.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default {
77
name: "Append Block to Parent",
88
description:
99
"Append new and/or existing blocks to the specified parent. [See the documentation](https://developers.notion.com/reference/patch-block-children)",
10-
version: "0.3.6",
10+
version: "0.3.7",
1111
type: "action",
1212
props: {
1313
notion,

components/notion/actions/complete-file-upload/complete-file-upload.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export default {
66
key: "notion-complete-file-upload",
77
name: "Complete File Upload",
88
description: "Use this action to finalize a `mode=multi_part` file upload after all of the parts have been sent successfully. [See the documentation](https://developers.notion.com/reference/complete-a-file-upload)",
9-
version: "0.0.1",
9+
version: "0.0.2",
1010
type: "action",
1111
props: {
1212
notion,

0 commit comments

Comments
 (0)