Skip to content

Commit 8046596

Browse files
committed
new components
1 parent d57c8f6 commit 8046596

File tree

16 files changed

+142
-30
lines changed

16 files changed

+142
-30
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
@@ -4,7 +4,7 @@ export default {
44
key: "microsoft_outlook-add-label-to-email",
55
name: "Add Label to Email",
66
description: "Adds a label/category to an email in Microsoft Outlook. [See the documentation](https://learn.microsoft.com/en-us/graph/api/message-update)",
7-
version: "0.0.1",
7+
version: "0.0.2",
88
type: "action",
99
props: {
1010
microsoftOutlook,

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.8",
6+
version: "0.0.9",
77
name: "Create Contact",
88
description: "Add a contact to the root Contacts folder, [See the docs](https://docs.microsoft.com/en-us/graph/api/user-post-contacts)",
99
props: {

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
@@ -3,7 +3,7 @@ import microsoftOutlook from "../../microsoft_outlook.app.mjs";
33
export default {
44
type: "action",
55
key: "microsoft_outlook-create-draft-email",
6-
version: "0.0.8",
6+
version: "0.0.9",
77
name: "Create Draft Email",
88
description: "Create a draft email, [See the docs](https://docs.microsoft.com/en-us/graph/api/user-post-messages)",
99
props: {

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.8",
6+
version: "0.0.9",
77
name: "Find Contacts",
88
description: "Finds contacts with given search string",
99
props: {
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
import microsoftOutlook from "../../microsoft_outlook.app.mjs";
2+
3+
export default {
4+
key: "microsoft_outlook-find-email",
5+
name: "Find Email",
6+
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.1",
8+
type: "action",
9+
props: {
10+
microsoftOutlook,
11+
filter: {
12+
type: "string",
13+
label: "Filter",
14+
description: "Filters results. For example, `contains(subject, 'meet for lunch?')` will include messages whose subject contains ‘meet for lunch?’. [See documentation](https://learn.microsoft.com/en-us/graph/filter-query-parameter) for the full list of operations.",
15+
optional: true,
16+
},
17+
maxResults: {
18+
type: "integer",
19+
label: "Max Results",
20+
description: "The maximum number of results to return",
21+
optional: true,
22+
},
23+
},
24+
async run({ $ }) {
25+
const { value } = await this.microsoftOutlook.listMessages({
26+
$,
27+
params: {
28+
"$filter": this.filter,
29+
"$top": this.maxResults,
30+
},
31+
});
32+
$.export("$summary", `Successfully retrieved ${value.length} message${value.length != 1
33+
? "s"
34+
: ""}.`);
35+
return value;
36+
},
37+
};

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.8",
6+
version: "0.0.9",
77
name: "List Contacts",
88
description: "Get a contact collection from the default contacts folder, [See the docs](https://docs.microsoft.com/en-us/graph/api/user-list-contacts)",
99
props: {
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import microsoftOutlook from "../../microsoft_outlook.app.mjs";
2+
3+
export default {
4+
key: "microsoft_outlook-list-folders",
5+
name: "List Folders",
6+
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.1",
8+
type: "action",
9+
props: {
10+
microsoftOutlook,
11+
},
12+
async run({ $ }) {
13+
const { value } = await this.microsoftOutlook.listFolders({
14+
$,
15+
});
16+
$.export("$summary", `Successfully retrieved ${value.length} folder${value.length != 1
17+
? "s"
18+
: ""}.`);
19+
return value;
20+
},
21+
};

components/microsoft_outlook/actions/list-labels/list-labels.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-labels",
55
name: "List Labels",
66
description: "Get all the labels/categories that have been defined for a user. [See the documentation](https://learn.microsoft.com/en-us/graph/api/outlookuser-list-mastercategories)",
7-
version: "0.0.1",
7+
version: "0.0.2",
88
type: "action",
99
props: {
1010
microsoftOutlook,
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
import microsoftOutlook from "../../microsoft_outlook.app.mjs";
2+
3+
export default {
4+
key: "microsoft_outlook-move-email-to-folder",
5+
name: "Move Email to Folder",
6+
description: "Moves an email to the specified folder in Microsoft Outlook. [See the documentation](https://learn.microsoft.com/en-us/graph/api/message-move)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
microsoftOutlook,
11+
messageId: {
12+
propDefinition: [
13+
microsoftOutlook,
14+
"messageId",
15+
],
16+
},
17+
folderId: {
18+
propDefinition: [
19+
microsoftOutlook,
20+
"folderIds",
21+
],
22+
type: "string",
23+
label: "Folder ID",
24+
description: "The identifier of the folder to move the selected message to",
25+
},
26+
},
27+
async run({ $ }) {
28+
const response = await this.microsoftOutlook.moveMessage({
29+
$,
30+
messageId: this.messageId,
31+
data: {
32+
destinationId: this.folderId,
33+
},
34+
});
35+
$.export("$summary", `Successfully moved email to folder with ID: ${this.folderId}`);
36+
return response;
37+
},
38+
};

components/microsoft_outlook/actions/remove-label-from-email/remove-label-from-email.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-remove-label-from-email",
55
name: "Remove Label from Email",
66
description: "Removes a label/category from an email in Microsoft Outlook. [See the documentation](https://learn.microsoft.com/en-us/graph/api/message-update)",
7-
version: "0.0.1",
7+
version: "0.0.2",
88
type: "action",
99
props: {
1010
microsoftOutlook,

0 commit comments

Comments
 (0)