@pipedream/microsoft_outlook 1.7.3 → 1.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@ export default {
|
|
|
6
6
|
key: "microsoft_outlook-new-email-in-shared-folder",
|
|
7
7
|
name: "New Email in Shared Folder Event",
|
|
8
8
|
description: "Emit new event when an email is received in specified shared folders.",
|
|
9
|
-
version: "0.0.
|
|
9
|
+
version: "0.0.4",
|
|
10
10
|
type: "source",
|
|
11
11
|
dedupe: "unique",
|
|
12
12
|
props: {
|
|
@@ -47,8 +47,8 @@ export default {
|
|
|
47
47
|
fn: this.microsoftOutlook.listSharedFolderMessages,
|
|
48
48
|
args: {
|
|
49
49
|
params: {
|
|
50
|
-
$orderBy: "
|
|
51
|
-
$filter: `
|
|
50
|
+
$orderBy: "sentDateTime desc",
|
|
51
|
+
$filter: `sentDateTime gt ${lastDate}`,
|
|
52
52
|
},
|
|
53
53
|
sharedFolderId: this.sharedFolderId,
|
|
54
54
|
userId: this.userId,
|
|
@@ -61,15 +61,18 @@ export default {
|
|
|
61
61
|
for await (const item of items) {
|
|
62
62
|
responseArray.push(item);
|
|
63
63
|
}
|
|
64
|
-
if (responseArray.length)
|
|
64
|
+
if (responseArray.length) {
|
|
65
|
+
this._setLastDate(responseArray[0].sentDateTime);
|
|
66
|
+
}
|
|
65
67
|
|
|
66
68
|
for (const item of responseArray.reverse()) {
|
|
69
|
+
const ts = Date.parse(item.sentDateTime);
|
|
67
70
|
this.$emit(
|
|
68
71
|
item,
|
|
69
72
|
{
|
|
70
|
-
id: item.
|
|
71
|
-
summary: `A new email with
|
|
72
|
-
ts
|
|
73
|
+
id: item.id,
|
|
74
|
+
summary: `A new email with subject ${item.subject} was received!`,
|
|
75
|
+
ts,
|
|
73
76
|
},
|
|
74
77
|
);
|
|
75
78
|
}
|