Skip to content

Commit 31d63d7

Browse files
authored
Microsoft Outlook - update find-email (#19146)
* updates * versions * update alert content
1 parent 29bc1fe commit 31d63d7

File tree

22 files changed

+36
-28
lines changed

22 files changed

+36
-28
lines changed

components/microsoft_outlook/actions/add-label-to-email/add-label-to-email.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default {
55
key: "microsoft_outlook-add-label-to-email",
66
name: "Add Label to Email",
77
description: "Adds a label/category to an email in Microsoft Outlook. [See the documentation](https://learn.microsoft.com/en-us/graph/api/message-update)",
8-
version: "0.0.12",
8+
version: "0.0.13",
99
annotations: {
1010
destructiveHint: true,
1111
openWorldHint: true,

components/microsoft_outlook/actions/approve-workflow/approve-workflow.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "microsoft_outlook-approve-workflow",
55
name: "Approve Workflow",
66
description: "Suspend the workflow until approved by email. [See the documentation](https://pipedream.com/docs/code/nodejs/rerun#flowsuspend)",
7-
version: "0.0.10",
7+
version: "0.0.11",
88
annotations: {
99
destructiveHint: false,
1010
openWorldHint: true,

components/microsoft_outlook/actions/create-contact/create-contact.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import microsoftOutlook from "../../microsoft_outlook.app.mjs";
33
export default {
44
type: "action",
55
key: "microsoft_outlook-create-contact",
6-
version: "0.0.19",
6+
version: "0.0.20",
77
annotations: {
88
destructiveHint: false,
99
openWorldHint: true,

components/microsoft_outlook/actions/create-draft-email/create-draft-email.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import microsoftOutlook from "../../microsoft_outlook.app.mjs";
44
export default {
55
type: "action",
66
key: "microsoft_outlook-create-draft-email",
7-
version: "0.0.19",
7+
version: "0.0.20",
88
annotations: {
99
destructiveHint: false,
1010
openWorldHint: true,

components/microsoft_outlook/actions/download-attachment/download-attachment.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export default {
66
key: "microsoft_outlook-download-attachment",
77
name: "Download Attachment",
88
description: "Downloads an attachment to the /tmp directory. [See the documentation](https://learn.microsoft.com/en-us/graph/api/attachment-get?view=graph-rest-1.0&tabs=http)",
9-
version: "0.0.7",
9+
version: "0.0.8",
1010
annotations: {
1111
destructiveHint: false,
1212
openWorldHint: true,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import microsoftOutlook from "../../microsoft_outlook.app.mjs";
33
export default {
44
type: "action",
55
key: "microsoft_outlook-find-contacts",
6-
version: "0.0.19",
6+
version: "0.0.20",
77
annotations: {
88
destructiveHint: false,
99
openWorldHint: true,

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

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import microsoftOutlook from "../../microsoft_outlook.app.mjs";
2+
import { ConfigurationError } from "@pipedream/platform";
23

34
export default {
45
key: "microsoft_outlook-find-email",
56
name: "Find Email",
67
description: "Search for an email in Microsoft Outlook. [See the documentation](https://learn.microsoft.com/en-us/graph/api/user-list-messages)",
7-
version: "0.0.13",
8+
version: "0.0.14",
89
annotations: {
910
destructiveHint: false,
1011
openWorldHint: true,
@@ -16,7 +17,7 @@ export default {
1617
info: {
1718
type: "alert",
1819
alertType: "info",
19-
content: "When you specify `$filter`, the service infers a sort order for the results. If you use both `$orderby` and `$filter` to get messages, because the server always infers a sort order for the results of a `$filter`, you must [specify properties in certain ways](https://learn.microsoft.com/en-us/graph/api/user-list-messages#using-filter-and-orderby-in-the-same-query).",
20+
content: "**Note:** `$search` cannot be used together with `$filter` or `$orderby`. When you specify `$filter`, the service infers a sort order for the results. If you use both `$orderby` and `$filter` to get messages, because the server always infers a sort order for the results of a `$filter`, you must [specify properties in certain ways](https://learn.microsoft.com/en-us/graph/api/user-list-messages#using-filter-and-orderby-in-the-same-query).",
2021
},
2122
search: {
2223
propDefinition: [
@@ -51,6 +52,10 @@ export default {
5152
},
5253
},
5354
async run({ $ }) {
55+
if (this.search && (this.filter || this.orderBy)) {
56+
throw new ConfigurationError("`$search` not supported when using `$filter` or `$orderby`.");
57+
}
58+
5459
let emails = [];
5560

5661
if (!this.search) {
@@ -73,8 +78,6 @@ export default {
7378
const { value } = await this.microsoftOutlook.listMessages({
7479
$,
7580
params: {
76-
"$filter": this.filter,
77-
"$orderby": this.orderBy,
7881
"$search": this.ensureQuotes(this.search),
7982
"$top": this.maxResults,
8083
},

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import microsoftOutlook from "../../microsoft_outlook.app.mjs";
2+
import { ConfigurationError } from "@pipedream/platform";
23

34
export default {
45
key: "microsoft_outlook-find-shared-folder-email",
56
name: "Find Shared Folder Email",
67
description: "Search for an email in a shared folder in Microsoft Outlook. [See the documentation](https://learn.microsoft.com/en-us/graph/api/user-list-messages)",
7-
version: "0.0.4",
8+
version: "0.0.5",
89
annotations: {
910
destructiveHint: false,
1011
openWorldHint: true,
@@ -31,7 +32,7 @@ export default {
3132
info: {
3233
type: "alert",
3334
alertType: "info",
34-
content: "When you specify `$filter`, the service infers a sort order for the results. If you use both `$orderby` and `$filter` to get messages, because the server always infers a sort order for the results of a `$filter`, you must [specify properties in certain ways](https://learn.microsoft.com/en-us/graph/api/user-list-messages#using-filter-and-orderby-in-the-same-query).",
35+
content: "**Note:** `$search` cannot be used together with `$filter` or `$orderby`. When you specify `$filter`, the service infers a sort order for the results. If you use both `$orderby` and `$filter` to get messages, because the server always infers a sort order for the results of a `$filter`, you must [specify properties in certain ways](https://learn.microsoft.com/en-us/graph/api/user-list-messages#using-filter-and-orderby-in-the-same-query).",
3536
},
3637
search: {
3738
propDefinition: [
@@ -59,6 +60,10 @@ export default {
5960
},
6061
},
6162
async run({ $ }) {
63+
if (this.search && (this.filter || this.orderBy)) {
64+
throw new ConfigurationError("`$search` not supported when using `$filter` or `$orderby`.");
65+
}
66+
6267
const items = this.microsoftOutlook.paginate({
6368
fn: this.microsoftOutlook.listSharedFolderMessages,
6469
args: {

components/microsoft_outlook/actions/list-contacts/list-contacts.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import microsoftOutlook from "../../microsoft_outlook.app.mjs";
33
export default {
44
type: "action",
55
key: "microsoft_outlook-list-contacts",
6-
version: "0.0.19",
6+
version: "0.0.20",
77
annotations: {
88
destructiveHint: false,
99
openWorldHint: true,

components/microsoft_outlook/actions/list-folders/list-folders.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ export default {
44
key: "microsoft_outlook-list-folders",
55
name: "List Folders",
66
description: "Retrieves a list of all folders in Microsoft Outlook. [See the documentation](https://learn.microsoft.com/en-us/graph/api/user-list-mailfolders)",
7-
version: "0.0.10",
7+
version: "0.0.11",
88
annotations: {
99
destructiveHint: false,
1010
openWorldHint: true,

0 commit comments

Comments
 (0)