From 62a98d397ad002df0df886ed63c628625779ca72 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 31 Jul 2024 10:22:44 -0400 Subject: [PATCH] Automated commit: Latest generated changes from schedule action (#55) Co-authored-by: github-actions --- .../asana/functions/add_task_to_section.ts | 34 +++++++++++++ .../functions/add_task_to_section_test.ts | 48 +++++++++++++++++++ src/connectors/asana/mod.ts | 5 ++ .../google.mail/functions/send_email.ts | 6 +++ src/connectors/mod.ts | 2 +- .../monday/functions/archive_board.ts | 1 + .../monday/functions/archive_board_test.ts | 1 + .../monday/functions/create_board.ts | 1 + .../monday/functions/create_board_test.ts | 1 + 9 files changed, 98 insertions(+), 1 deletion(-) create mode 100644 src/connectors/asana/functions/add_task_to_section.ts create mode 100644 src/connectors/asana/functions/add_task_to_section_test.ts diff --git a/src/connectors/asana/functions/add_task_to_section.ts b/src/connectors/asana/functions/add_task_to_section.ts new file mode 100644 index 0000000..bcb0432 --- /dev/null +++ b/src/connectors/asana/functions/add_task_to_section.ts @@ -0,0 +1,34 @@ +/** This file was autogenerated. Follow the steps in src/schema/slack/functions/README.md to rebuild **/ +import { DefineConnector } from "../../../deps.ts"; +import { Schema } from "../../../deps.ts"; + +export default DefineConnector({ + callback_id: "A05KUFPF86S#/functions/add_task_to_section", + title: "Add task to a section", + input_parameters: { + properties: { + asana_access_token: { + type: Schema.slack.types.oauth2, + description: "Asana credential to use", + title: "Asana Access Token", + }, + workspace_gid: { type: Schema.types.string, title: "Workspace" }, + project: { type: Schema.types.string, title: "Project" }, + section_gid: { type: Schema.types.string, title: "Section" }, + task_gid: { type: Schema.types.string, title: "Task" }, + }, + required: [ + "asana_access_token", + "workspace_gid", + "project", + "section_gid", + "task_gid", + ], + }, + output_parameters: { + properties: { + response_code: { type: Schema.types.string, title: "Response code" }, + }, + required: ["response_code"], + }, +}); diff --git a/src/connectors/asana/functions/add_task_to_section_test.ts b/src/connectors/asana/functions/add_task_to_section_test.ts new file mode 100644 index 0000000..60bb893 --- /dev/null +++ b/src/connectors/asana/functions/add_task_to_section_test.ts @@ -0,0 +1,48 @@ +/** This file was autogenerated. Follow the steps in src/schema/slack/functions/README.md to rebuild **/ +import { assertEquals, assertExists } from "../../../dev_deps.ts"; +import { DefineWorkflow } from "../../../dev_deps.ts"; +import AddTaskToSection from "./add_task_to_section.ts"; + +Deno.test("AddTaskToSection can be used as a Slack function in a workflow step", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_AddTaskToSection_slack_function", + title: "Test AddTaskToSection", + description: "This is a generated test to test AddTaskToSection", + }); + testWorkflow.addStep(AddTaskToSection, { + asana_access_token: "test", + workspace_gid: "test", + project: "test", + section_gid: "test", + task_gid: "test", + }); + const actual = testWorkflow.steps[0].export(); + + assertEquals( + actual.function_id, + "A05KUFPF86S#/functions/add_task_to_section", + ); + assertEquals(actual.inputs, { + asana_access_token: "test", + workspace_gid: "test", + project: "test", + section_gid: "test", + task_gid: "test", + }); +}); + +Deno.test("All outputs of Slack function AddTaskToSection should exist", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_AddTaskToSection_slack_function", + title: "Test AddTaskToSection", + description: "This is a generated test to test AddTaskToSection", + }); + const step = testWorkflow.addStep(AddTaskToSection, { + asana_access_token: "test", + workspace_gid: "test", + project: "test", + section_gid: "test", + task_gid: "test", + }); + assertExists(step.outputs.response_code); +}); diff --git a/src/connectors/asana/mod.ts b/src/connectors/asana/mod.ts index a650453..cfe1264 100644 --- a/src/connectors/asana/mod.ts +++ b/src/connectors/asana/mod.ts @@ -1,4 +1,5 @@ /** This file was autogenerated. Follow the steps in src/schema/slack/functions/README.md to rebuild **/ +import AddTaskToSection from "./functions/add_task_to_section.ts"; import CreateComment from "./functions/create_comment.ts"; import CreateProject from "./functions/create_project.ts"; import CreateTask from "./functions/create_task.ts"; @@ -6,6 +7,10 @@ import UpdateTask from "./functions/update_task.ts"; const Asana = { functions: { + /** + * @see The {@link https://api.slack.com/reference/connectors/asana/add_task_to_section AddTaskToSection} documentation. + */ + AddTaskToSection, /** * @see The {@link https://api.slack.com/reference/connectors/asana/create_comment CreateComment} documentation. */ diff --git a/src/connectors/google.mail/functions/send_email.ts b/src/connectors/google.mail/functions/send_email.ts index ec54940..73acbac 100644 --- a/src/connectors/google.mail/functions/send_email.ts +++ b/src/connectors/google.mail/functions/send_email.ts @@ -17,6 +17,12 @@ export default DefineConnector({ description: "Enter text", title: "Email body", }, + html: { + type: Schema.types.boolean, + description: + "Select this if your content looks like this: This text is bold", + title: "Email body contains HTML text formatting", + }, recipients: { type: Schema.types.array, description: "Search all people...", diff --git a/src/connectors/mod.ts b/src/connectors/mod.ts index 0b0da0b..f515b6a 100644 --- a/src/connectors/mod.ts +++ b/src/connectors/mod.ts @@ -1,4 +1,4 @@ -/** This file was autogenerated on Mon Jul 15 2024. Follow the steps in src/schema/slack/functions/README.md to rebuild **/ +/** This file was autogenerated on Mon Jul 29 2024. Follow the steps in src/schema/slack/functions/README.md to rebuild **/ import AdobeSign from "./adobe.sign/mod.ts"; import Airtable from "./airtable/mod.ts"; import Asana from "./asana/mod.ts"; diff --git a/src/connectors/monday/functions/archive_board.ts b/src/connectors/monday/functions/archive_board.ts index 909b5fc..1660a1e 100644 --- a/src/connectors/monday/functions/archive_board.ts +++ b/src/connectors/monday/functions/archive_board.ts @@ -23,6 +23,7 @@ export default DefineConnector({ properties: { board_id: { type: Schema.types.string, title: "Board ID" }, board_name: { type: Schema.types.string, title: "Board name" }, + board_url: { type: Schema.types.string, title: "Board URL" }, }, required: [], }, diff --git a/src/connectors/monday/functions/archive_board_test.ts b/src/connectors/monday/functions/archive_board_test.ts index 1b0e716..513b43f 100644 --- a/src/connectors/monday/functions/archive_board_test.ts +++ b/src/connectors/monday/functions/archive_board_test.ts @@ -34,4 +34,5 @@ Deno.test("All outputs of Slack function ArchiveBoard should exist", () => { }); assertExists(step.outputs.board_id); assertExists(step.outputs.board_name); + assertExists(step.outputs.board_url); }); diff --git a/src/connectors/monday/functions/create_board.ts b/src/connectors/monday/functions/create_board.ts index 576b47d..1395398 100644 --- a/src/connectors/monday/functions/create_board.ts +++ b/src/connectors/monday/functions/create_board.ts @@ -33,6 +33,7 @@ export default DefineConnector({ properties: { board_id: { type: Schema.types.string, title: "Board ID" }, board_name: { type: Schema.types.string, title: "Board name" }, + board_url: { type: Schema.types.string, title: "Board URL" }, }, required: [], }, diff --git a/src/connectors/monday/functions/create_board_test.ts b/src/connectors/monday/functions/create_board_test.ts index a8d16b2..e1eb960 100644 --- a/src/connectors/monday/functions/create_board_test.ts +++ b/src/connectors/monday/functions/create_board_test.ts @@ -37,4 +37,5 @@ Deno.test("All outputs of Slack function CreateBoard should exist", () => { }); assertExists(step.outputs.board_id); assertExists(step.outputs.board_name); + assertExists(step.outputs.board_url); });