From f8f9ba2223809fe3f9457fbf452abfd04451b87a Mon Sep 17 00:00:00 2001 From: github-actions Date: Tue, 19 Dec 2023 20:41:42 +0000 Subject: [PATCH] Automated commit: Latest generated changes from schedule action --- .../airtable/functions/add_record.ts | 35 ++++++ .../airtable/functions/add_record_test.ts | 43 +++++++ .../airtable/functions/delete_record.ts | 45 +++++++ .../airtable/functions/delete_record_test.ts | 45 +++++++ .../airtable/functions/select_record.ts | 47 +++++++ .../airtable/functions/select_record_test.ts | 47 +++++++ .../airtable/functions/update_record.ts | 49 ++++++++ .../airtable/functions/update_record_test.ts | 50 ++++++++ src/connectors/airtable/mod.ts | 28 +++++ .../basecamp/functions/create_project.ts | 40 ++++++ .../basecamp/functions/create_project_test.ts | 41 ++++++ .../basecamp/functions/create_todo.ts | 72 +++++++++++ .../basecamp/functions/create_todo_list.ts | 45 +++++++ .../functions/create_todo_list_test.ts | 44 +++++++ .../basecamp/functions/create_todo_test.ts | 47 +++++++ .../basecamp/functions/mark_todo_complete.ts | 47 +++++++ .../functions/mark_todo_complete_test.ts | 45 +++++++ .../basecamp/functions/mark_todo_pending.ts | 47 +++++++ .../functions/mark_todo_pending_test.ts | 45 +++++++ src/connectors/basecamp/mod.ts | 33 +++++ .../box.core/functions/copy_file.ts | 39 ++++++ .../box.core/functions/copy_file_test.ts | 31 +++++ .../box.core/functions/create_folder.ts | 34 +++++ .../box.core/functions/create_folder_test.ts | 34 +++++ src/connectors/box.core/mod.ts | 18 +++ .../box.sign/functions/create_sign_request.ts | 62 ++++++++++ .../functions/create_sign_request_test.ts | 49 ++++++++ src/connectors/box.sign/mod.ts | 13 ++ src/connectors/dialpad/functions/send_sms.ts | 46 +++++++ .../dialpad/functions/send_sms_test.ts | 44 +++++++ src/connectors/dialpad/mod.ts | 13 ++ .../dropbox.core/functions/copy_document.ts | 67 ++++++++++ .../functions/copy_document_test.ts | 44 +++++++ .../dropbox.core/functions/create_folder.ts | 47 +++++++ .../functions/create_folder_test.ts | 35 ++++++ .../functions/create_share_link.ts | 52 ++++++++ .../functions/create_share_link_test.ts | 45 +++++++ .../dropbox.core/functions/delete_document.ts | 57 +++++++++ .../functions/delete_document_test.ts | 41 ++++++ .../dropbox.core/functions/move_document.ts | 67 ++++++++++ .../functions/move_document_test.ts | 44 +++++++ src/connectors/dropbox.core/mod.ts | 33 +++++ .../send_signature_request_with_template.ts | 110 ++++++++++++++++ ...nd_signature_request_with_template_test.ts | 57 +++++++++ src/connectors/dropbox.sign/mod.ts | 13 ++ .../functions/hire_application.ts | 24 ++++ .../functions/hire_application_test.ts | 41 ++++++ .../functions/list_candidate_activity.ts | 30 +++++ .../functions/list_candidate_activity_test.ts | 33 +++++ .../functions/list_job_candidates.ts | 28 +++++ .../functions/list_job_candidates_test.ts | 31 +++++ .../functions/reject_application.ts | 28 +++++ .../functions/reject_application_test.ts | 35 ++++++ src/connectors/greenhouse.recruiting/mod.ts | 28 +++++ .../create_approval_request_update_flag.ts | 108 ++++++++++++++++ ...reate_approval_request_update_flag_test.ts | 59 +++++++++ .../functions/create_feature_flag.ts | 43 +++++++ .../functions/create_feature_flag_test.ts | 45 +++++++ .../functions/update_feature_flag_state.ts | 86 +++++++++++++ .../update_feature_flag_state_test.ts | 53 ++++++++ .../functions/update_target_feature_flag.ts | 104 ++++++++++++++++ .../update_target_feature_flag_test.ts | 59 +++++++++ .../functions/update_target_segment.ts | 104 ++++++++++++++++ .../functions/update_target_segment_test.ts | 59 +++++++++ src/connectors/launchdarkly/mod.ts | 33 +++++ .../functions/add_worksheet_row.ts | 54 ++++++++ .../functions/add_worksheet_row_test.ts | 44 +++++++ .../functions/delete_worksheet_row.ts | 65 ++++++++++ .../functions/delete_worksheet_row_test.ts | 50 ++++++++ .../functions/select_worksheet_row.ts | 56 +++++++++ .../functions/select_worksheet_row_test.ts | 49 ++++++++ .../functions/update_worksheet_row.ts | 68 ++++++++++ .../functions/update_worksheet_row_test.ts | 54 ++++++++ src/connectors/microsoft.excel/mod.ts | 28 +++++ .../functions/create_page.ts | 36 ++++++ .../functions/create_page_test.ts | 41 ++++++ .../functions/update_page.ts | 34 +++++ .../functions/update_page_test.ts | 39 ++++++ src/connectors/microsoft.onenote/mod.ts | 18 +++ src/connectors/mod.ts | 30 ++++- .../ramp/functions/create_physical_card.ts | 117 ++++++++++++++++++ .../functions/create_physical_card_test.ts | 70 +++++++++++ .../ramp/functions/create_spend_request.ts | 95 ++++++++++++++ .../functions/create_spend_request_test.ts | 58 +++++++++ .../ramp/functions/create_virtual_card.ts | 65 ++++++++++ .../functions/create_virtual_card_test.ts | 49 ++++++++ .../ramp/functions/get_spend_request.ts | 34 +++++ .../ramp/functions/get_spend_request_test.ts | 41 ++++++ src/connectors/ramp/functions/suspend_card.ts | 39 ++++++ .../ramp/functions/suspend_card_test.ts | 39 ++++++ .../ramp/functions/terminate_card.ts | 38 ++++++ .../ramp/functions/terminate_card_test.ts | 39 ++++++ src/connectors/ramp/functions/unlock_card.ts | 38 ++++++ .../ramp/functions/unlock_card_test.ts | 39 ++++++ src/connectors/ramp/mod.ts | 43 +++++++ .../typeform/functions/create_workspace.ts | 30 +++++ .../functions/create_workspace_test.ts | 38 ++++++ .../typeform/functions/duplicate_form.ts | 41 ++++++ .../typeform/functions/duplicate_form_test.ts | 41 ++++++ src/connectors/typeform/functions/get_form.ts | 36 ++++++ .../typeform/functions/get_form_insights.ts | 55 ++++++++ .../functions/get_form_insights_test.ts | 38 ++++++ .../typeform/functions/get_form_test.ts | 40 ++++++ src/connectors/typeform/mod.ts | 28 +++++ .../workast/functions/create_task.ts | 53 ++++++++ .../workast/functions/create_task_test.ts | 41 ++++++ src/connectors/workast/mod.ts | 13 ++ 107 files changed, 4944 insertions(+), 1 deletion(-) create mode 100644 src/connectors/airtable/functions/add_record.ts create mode 100644 src/connectors/airtable/functions/add_record_test.ts create mode 100644 src/connectors/airtable/functions/delete_record.ts create mode 100644 src/connectors/airtable/functions/delete_record_test.ts create mode 100644 src/connectors/airtable/functions/select_record.ts create mode 100644 src/connectors/airtable/functions/select_record_test.ts create mode 100644 src/connectors/airtable/functions/update_record.ts create mode 100644 src/connectors/airtable/functions/update_record_test.ts create mode 100644 src/connectors/airtable/mod.ts create mode 100644 src/connectors/basecamp/functions/create_project.ts create mode 100644 src/connectors/basecamp/functions/create_project_test.ts create mode 100644 src/connectors/basecamp/functions/create_todo.ts create mode 100644 src/connectors/basecamp/functions/create_todo_list.ts create mode 100644 src/connectors/basecamp/functions/create_todo_list_test.ts create mode 100644 src/connectors/basecamp/functions/create_todo_test.ts create mode 100644 src/connectors/basecamp/functions/mark_todo_complete.ts create mode 100644 src/connectors/basecamp/functions/mark_todo_complete_test.ts create mode 100644 src/connectors/basecamp/functions/mark_todo_pending.ts create mode 100644 src/connectors/basecamp/functions/mark_todo_pending_test.ts create mode 100644 src/connectors/basecamp/mod.ts create mode 100644 src/connectors/box.core/functions/copy_file.ts create mode 100644 src/connectors/box.core/functions/copy_file_test.ts create mode 100644 src/connectors/box.core/functions/create_folder.ts create mode 100644 src/connectors/box.core/functions/create_folder_test.ts create mode 100644 src/connectors/box.core/mod.ts create mode 100644 src/connectors/box.sign/functions/create_sign_request.ts create mode 100644 src/connectors/box.sign/functions/create_sign_request_test.ts create mode 100644 src/connectors/box.sign/mod.ts create mode 100644 src/connectors/dialpad/functions/send_sms.ts create mode 100644 src/connectors/dialpad/functions/send_sms_test.ts create mode 100644 src/connectors/dialpad/mod.ts create mode 100644 src/connectors/dropbox.core/functions/copy_document.ts create mode 100644 src/connectors/dropbox.core/functions/copy_document_test.ts create mode 100644 src/connectors/dropbox.core/functions/create_folder.ts create mode 100644 src/connectors/dropbox.core/functions/create_folder_test.ts create mode 100644 src/connectors/dropbox.core/functions/create_share_link.ts create mode 100644 src/connectors/dropbox.core/functions/create_share_link_test.ts create mode 100644 src/connectors/dropbox.core/functions/delete_document.ts create mode 100644 src/connectors/dropbox.core/functions/delete_document_test.ts create mode 100644 src/connectors/dropbox.core/functions/move_document.ts create mode 100644 src/connectors/dropbox.core/functions/move_document_test.ts create mode 100644 src/connectors/dropbox.core/mod.ts create mode 100644 src/connectors/dropbox.sign/functions/send_signature_request_with_template.ts create mode 100644 src/connectors/dropbox.sign/functions/send_signature_request_with_template_test.ts create mode 100644 src/connectors/dropbox.sign/mod.ts create mode 100644 src/connectors/greenhouse.recruiting/functions/hire_application.ts create mode 100644 src/connectors/greenhouse.recruiting/functions/hire_application_test.ts create mode 100644 src/connectors/greenhouse.recruiting/functions/list_candidate_activity.ts create mode 100644 src/connectors/greenhouse.recruiting/functions/list_candidate_activity_test.ts create mode 100644 src/connectors/greenhouse.recruiting/functions/list_job_candidates.ts create mode 100644 src/connectors/greenhouse.recruiting/functions/list_job_candidates_test.ts create mode 100644 src/connectors/greenhouse.recruiting/functions/reject_application.ts create mode 100644 src/connectors/greenhouse.recruiting/functions/reject_application_test.ts create mode 100644 src/connectors/greenhouse.recruiting/mod.ts create mode 100644 src/connectors/launchdarkly/functions/create_approval_request_update_flag.ts create mode 100644 src/connectors/launchdarkly/functions/create_approval_request_update_flag_test.ts create mode 100644 src/connectors/launchdarkly/functions/create_feature_flag.ts create mode 100644 src/connectors/launchdarkly/functions/create_feature_flag_test.ts create mode 100644 src/connectors/launchdarkly/functions/update_feature_flag_state.ts create mode 100644 src/connectors/launchdarkly/functions/update_feature_flag_state_test.ts create mode 100644 src/connectors/launchdarkly/functions/update_target_feature_flag.ts create mode 100644 src/connectors/launchdarkly/functions/update_target_feature_flag_test.ts create mode 100644 src/connectors/launchdarkly/functions/update_target_segment.ts create mode 100644 src/connectors/launchdarkly/functions/update_target_segment_test.ts create mode 100644 src/connectors/launchdarkly/mod.ts create mode 100644 src/connectors/microsoft.excel/functions/add_worksheet_row.ts create mode 100644 src/connectors/microsoft.excel/functions/add_worksheet_row_test.ts create mode 100644 src/connectors/microsoft.excel/functions/delete_worksheet_row.ts create mode 100644 src/connectors/microsoft.excel/functions/delete_worksheet_row_test.ts create mode 100644 src/connectors/microsoft.excel/functions/select_worksheet_row.ts create mode 100644 src/connectors/microsoft.excel/functions/select_worksheet_row_test.ts create mode 100644 src/connectors/microsoft.excel/functions/update_worksheet_row.ts create mode 100644 src/connectors/microsoft.excel/functions/update_worksheet_row_test.ts create mode 100644 src/connectors/microsoft.excel/mod.ts create mode 100644 src/connectors/microsoft.onenote/functions/create_page.ts create mode 100644 src/connectors/microsoft.onenote/functions/create_page_test.ts create mode 100644 src/connectors/microsoft.onenote/functions/update_page.ts create mode 100644 src/connectors/microsoft.onenote/functions/update_page_test.ts create mode 100644 src/connectors/microsoft.onenote/mod.ts create mode 100644 src/connectors/ramp/functions/create_physical_card.ts create mode 100644 src/connectors/ramp/functions/create_physical_card_test.ts create mode 100644 src/connectors/ramp/functions/create_spend_request.ts create mode 100644 src/connectors/ramp/functions/create_spend_request_test.ts create mode 100644 src/connectors/ramp/functions/create_virtual_card.ts create mode 100644 src/connectors/ramp/functions/create_virtual_card_test.ts create mode 100644 src/connectors/ramp/functions/get_spend_request.ts create mode 100644 src/connectors/ramp/functions/get_spend_request_test.ts create mode 100644 src/connectors/ramp/functions/suspend_card.ts create mode 100644 src/connectors/ramp/functions/suspend_card_test.ts create mode 100644 src/connectors/ramp/functions/terminate_card.ts create mode 100644 src/connectors/ramp/functions/terminate_card_test.ts create mode 100644 src/connectors/ramp/functions/unlock_card.ts create mode 100644 src/connectors/ramp/functions/unlock_card_test.ts create mode 100644 src/connectors/ramp/mod.ts create mode 100644 src/connectors/typeform/functions/create_workspace.ts create mode 100644 src/connectors/typeform/functions/create_workspace_test.ts create mode 100644 src/connectors/typeform/functions/duplicate_form.ts create mode 100644 src/connectors/typeform/functions/duplicate_form_test.ts create mode 100644 src/connectors/typeform/functions/get_form.ts create mode 100644 src/connectors/typeform/functions/get_form_insights.ts create mode 100644 src/connectors/typeform/functions/get_form_insights_test.ts create mode 100644 src/connectors/typeform/functions/get_form_test.ts create mode 100644 src/connectors/typeform/mod.ts create mode 100644 src/connectors/workast/functions/create_task.ts create mode 100644 src/connectors/workast/functions/create_task_test.ts create mode 100644 src/connectors/workast/mod.ts diff --git a/src/connectors/airtable/functions/add_record.ts b/src/connectors/airtable/functions/add_record.ts new file mode 100644 index 0000000..6704f87 --- /dev/null +++ b/src/connectors/airtable/functions/add_record.ts @@ -0,0 +1,35 @@ +/** 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: "A05UG04QC4X#/functions/add_record", + title: "Add a record", + input_parameters: { + properties: { + base_id: { + type: Schema.types.string, + description: "Select a base", + title: "Base", + }, + table_id: { + type: Schema.types.string, + description: "Select a table", + title: "Table", + }, + column_values: { type: Schema.types.object, title: "Columns" }, + airtable_access_token: { + type: Schema.slack.types.oauth2, + title: "Airtable access token", + }, + }, + required: ["base_id", "table_id", "column_values", "airtable_access_token"], + }, + output_parameters: { + properties: { + record_id: { type: Schema.types.string, title: "Record ID" }, + record_url: { type: Schema.types.string, title: "Record URL" }, + }, + required: [], + }, +}); diff --git a/src/connectors/airtable/functions/add_record_test.ts b/src/connectors/airtable/functions/add_record_test.ts new file mode 100644 index 0000000..e44b7e9 --- /dev/null +++ b/src/connectors/airtable/functions/add_record_test.ts @@ -0,0 +1,43 @@ +/** 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 AddRecord from "./add_record.ts"; + +Deno.test("AddRecord can be used as a Slack function in a workflow step", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_AddRecord_slack_function", + title: "Test AddRecord", + description: "This is a generated test to test AddRecord", + }); + testWorkflow.addStep(AddRecord, { + base_id: "test", + table_id: "test", + column_values: "test", + airtable_access_token: "test", + }); + const actual = testWorkflow.steps[0].export(); + + assertEquals(actual.function_id, "A05UG04QC4X#/functions/add_record"); + assertEquals(actual.inputs, { + base_id: "test", + table_id: "test", + column_values: "test", + airtable_access_token: "test", + }); +}); + +Deno.test("All outputs of Slack function AddRecord should exist", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_AddRecord_slack_function", + title: "Test AddRecord", + description: "This is a generated test to test AddRecord", + }); + const step = testWorkflow.addStep(AddRecord, { + base_id: "test", + table_id: "test", + column_values: "test", + airtable_access_token: "test", + }); + assertExists(step.outputs.record_id); + assertExists(step.outputs.record_url); +}); diff --git a/src/connectors/airtable/functions/delete_record.ts b/src/connectors/airtable/functions/delete_record.ts new file mode 100644 index 0000000..7d3cfba --- /dev/null +++ b/src/connectors/airtable/functions/delete_record.ts @@ -0,0 +1,45 @@ +/** 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: "A05UG04QC4X#/functions/delete_record", + title: "Delete a record", + input_parameters: { + properties: { + base_id: { + type: Schema.types.string, + description: "Select a base", + title: "Base", + }, + table_id: { + type: Schema.types.string, + description: "Select a table", + title: "Table", + }, + search_column: { + type: Schema.types.string, + description: "Select a column", + title: "Choose a column to search", + }, + search_value: { type: Schema.types.string, title: "Search value" }, + airtable_access_token: { + type: Schema.slack.types.oauth2, + title: "Airtable access token", + }, + }, + required: [ + "base_id", + "table_id", + "search_column", + "search_value", + "airtable_access_token", + ], + }, + output_parameters: { + properties: { + record_id: { type: Schema.types.string, title: "Record ID" }, + }, + required: [], + }, +}); diff --git a/src/connectors/airtable/functions/delete_record_test.ts b/src/connectors/airtable/functions/delete_record_test.ts new file mode 100644 index 0000000..0a4bb4b --- /dev/null +++ b/src/connectors/airtable/functions/delete_record_test.ts @@ -0,0 +1,45 @@ +/** 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 DeleteRecord from "./delete_record.ts"; + +Deno.test("DeleteRecord can be used as a Slack function in a workflow step", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_DeleteRecord_slack_function", + title: "Test DeleteRecord", + description: "This is a generated test to test DeleteRecord", + }); + testWorkflow.addStep(DeleteRecord, { + base_id: "test", + table_id: "test", + search_column: "test", + search_value: "test", + airtable_access_token: "test", + }); + const actual = testWorkflow.steps[0].export(); + + assertEquals(actual.function_id, "A05UG04QC4X#/functions/delete_record"); + assertEquals(actual.inputs, { + base_id: "test", + table_id: "test", + search_column: "test", + search_value: "test", + airtable_access_token: "test", + }); +}); + +Deno.test("All outputs of Slack function DeleteRecord should exist", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_DeleteRecord_slack_function", + title: "Test DeleteRecord", + description: "This is a generated test to test DeleteRecord", + }); + const step = testWorkflow.addStep(DeleteRecord, { + base_id: "test", + table_id: "test", + search_column: "test", + search_value: "test", + airtable_access_token: "test", + }); + assertExists(step.outputs.record_id); +}); diff --git a/src/connectors/airtable/functions/select_record.ts b/src/connectors/airtable/functions/select_record.ts new file mode 100644 index 0000000..bed34ef --- /dev/null +++ b/src/connectors/airtable/functions/select_record.ts @@ -0,0 +1,47 @@ +/** 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: "A05UG04QC4X#/functions/select_record", + title: "Select a record", + input_parameters: { + properties: { + base_id: { + type: Schema.types.string, + description: "Select a base", + title: "Base", + }, + table_id: { + type: Schema.types.string, + description: "Select a table", + title: "Table", + }, + search_column: { + type: Schema.types.string, + description: "Select a column", + title: "Choose a column to search", + }, + search_value: { type: Schema.types.string, title: "Search value" }, + airtable_access_token: { + type: Schema.slack.types.oauth2, + title: "Airtable access token", + }, + }, + required: [ + "base_id", + "table_id", + "search_column", + "search_value", + "airtable_access_token", + ], + }, + output_parameters: { + properties: { + record: { type: Schema.types.object, title: "Column values" }, + record_id: { type: Schema.types.string, title: "Record ID" }, + record_url: { type: Schema.types.string, title: "Record URL" }, + }, + required: ["record", "record_id"], + }, +}); diff --git a/src/connectors/airtable/functions/select_record_test.ts b/src/connectors/airtable/functions/select_record_test.ts new file mode 100644 index 0000000..d631cf4 --- /dev/null +++ b/src/connectors/airtable/functions/select_record_test.ts @@ -0,0 +1,47 @@ +/** 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 SelectRecord from "./select_record.ts"; + +Deno.test("SelectRecord can be used as a Slack function in a workflow step", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_SelectRecord_slack_function", + title: "Test SelectRecord", + description: "This is a generated test to test SelectRecord", + }); + testWorkflow.addStep(SelectRecord, { + base_id: "test", + table_id: "test", + search_column: "test", + search_value: "test", + airtable_access_token: "test", + }); + const actual = testWorkflow.steps[0].export(); + + assertEquals(actual.function_id, "A05UG04QC4X#/functions/select_record"); + assertEquals(actual.inputs, { + base_id: "test", + table_id: "test", + search_column: "test", + search_value: "test", + airtable_access_token: "test", + }); +}); + +Deno.test("All outputs of Slack function SelectRecord should exist", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_SelectRecord_slack_function", + title: "Test SelectRecord", + description: "This is a generated test to test SelectRecord", + }); + const step = testWorkflow.addStep(SelectRecord, { + base_id: "test", + table_id: "test", + search_column: "test", + search_value: "test", + airtable_access_token: "test", + }); + assertExists(step.outputs.record); + assertExists(step.outputs.record_id); + assertExists(step.outputs.record_url); +}); diff --git a/src/connectors/airtable/functions/update_record.ts b/src/connectors/airtable/functions/update_record.ts new file mode 100644 index 0000000..f3d3163 --- /dev/null +++ b/src/connectors/airtable/functions/update_record.ts @@ -0,0 +1,49 @@ +/** 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: "A05UG04QC4X#/functions/update_record", + title: "Update a record", + input_parameters: { + properties: { + base_id: { + type: Schema.types.string, + description: "Select a base", + title: "Base", + }, + table_id: { + type: Schema.types.string, + description: "Select a table", + title: "Table", + }, + search_column: { + type: Schema.types.string, + description: "Select a column", + title: "Choose a column to search", + }, + search_value: { type: Schema.types.string, title: "Search value" }, + column_values: { type: Schema.types.object, title: "Columns" }, + airtable_access_token: { + type: Schema.slack.types.oauth2, + title: "Airtable access token", + }, + }, + required: [ + "base_id", + "table_id", + "search_column", + "search_value", + "column_values", + "airtable_access_token", + ], + }, + output_parameters: { + properties: { + record: { type: Schema.types.object, title: "Column values" }, + record_id: { type: Schema.types.string, title: "Record ID" }, + record_url: { type: Schema.types.string, title: "Record URL" }, + }, + required: [], + }, +}); diff --git a/src/connectors/airtable/functions/update_record_test.ts b/src/connectors/airtable/functions/update_record_test.ts new file mode 100644 index 0000000..c257278 --- /dev/null +++ b/src/connectors/airtable/functions/update_record_test.ts @@ -0,0 +1,50 @@ +/** 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 UpdateRecord from "./update_record.ts"; + +Deno.test("UpdateRecord can be used as a Slack function in a workflow step", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_UpdateRecord_slack_function", + title: "Test UpdateRecord", + description: "This is a generated test to test UpdateRecord", + }); + testWorkflow.addStep(UpdateRecord, { + base_id: "test", + table_id: "test", + search_column: "test", + search_value: "test", + column_values: "test", + airtable_access_token: "test", + }); + const actual = testWorkflow.steps[0].export(); + + assertEquals(actual.function_id, "A05UG04QC4X#/functions/update_record"); + assertEquals(actual.inputs, { + base_id: "test", + table_id: "test", + search_column: "test", + search_value: "test", + column_values: "test", + airtable_access_token: "test", + }); +}); + +Deno.test("All outputs of Slack function UpdateRecord should exist", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_UpdateRecord_slack_function", + title: "Test UpdateRecord", + description: "This is a generated test to test UpdateRecord", + }); + const step = testWorkflow.addStep(UpdateRecord, { + base_id: "test", + table_id: "test", + search_column: "test", + search_value: "test", + column_values: "test", + airtable_access_token: "test", + }); + assertExists(step.outputs.record); + assertExists(step.outputs.record_id); + assertExists(step.outputs.record_url); +}); diff --git a/src/connectors/airtable/mod.ts b/src/connectors/airtable/mod.ts new file mode 100644 index 0000000..fdf5f5e --- /dev/null +++ b/src/connectors/airtable/mod.ts @@ -0,0 +1,28 @@ +/** This file was autogenerated. Follow the steps in src/schema/slack/functions/README.md to rebuild **/ +import AddRecord from "./functions/add_record.ts"; +import DeleteRecord from "./functions/delete_record.ts"; +import SelectRecord from "./functions/select_record.ts"; +import UpdateRecord from "./functions/update_record.ts"; + +const Airtable = { + functions: { + /** + * @see The {@link https://api.slack.com/reference/connectors/airtable/add_record AddRecord} documentation. + */ + AddRecord, + /** + * @see The {@link https://api.slack.com/reference/connectors/airtable/delete_record DeleteRecord} documentation. + */ + DeleteRecord, + /** + * @see The {@link https://api.slack.com/reference/connectors/airtable/select_record SelectRecord} documentation. + */ + SelectRecord, + /** + * @see The {@link https://api.slack.com/reference/connectors/airtable/update_record UpdateRecord} documentation. + */ + UpdateRecord, + }, +} as const; + +export default Airtable; diff --git a/src/connectors/basecamp/functions/create_project.ts b/src/connectors/basecamp/functions/create_project.ts new file mode 100644 index 0000000..2e069e5 --- /dev/null +++ b/src/connectors/basecamp/functions/create_project.ts @@ -0,0 +1,40 @@ +/** 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: "A05UU55CFFA#/functions/create_project", + title: "Create a project", + input_parameters: { + properties: { + domain: { + type: Schema.types.string, + description: "Select an account", + title: "Account", + }, + name: { + type: Schema.types.string, + description: "Enter project name", + title: "Project name", + }, + description: { + type: Schema.types.string, + description: "Enter project description", + title: "Description", + }, + basecamp_access_token: { + type: Schema.slack.types.oauth2, + title: "Basecamp access token", + }, + }, + required: ["domain", "name", "basecamp_access_token"], + }, + output_parameters: { + properties: { + id: { type: Schema.types.string, title: "Project ID" }, + name: { type: Schema.types.string, title: "Project name" }, + url: { type: Schema.types.string, title: "Project URL" }, + }, + required: ["id", "name", "url"], + }, +}); diff --git a/src/connectors/basecamp/functions/create_project_test.ts b/src/connectors/basecamp/functions/create_project_test.ts new file mode 100644 index 0000000..ce31dd1 --- /dev/null +++ b/src/connectors/basecamp/functions/create_project_test.ts @@ -0,0 +1,41 @@ +/** 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 CreateProject from "./create_project.ts"; + +Deno.test("CreateProject can be used as a Slack function in a workflow step", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_CreateProject_slack_function", + title: "Test CreateProject", + description: "This is a generated test to test CreateProject", + }); + testWorkflow.addStep(CreateProject, { + domain: "test", + name: "test", + basecamp_access_token: "test", + }); + const actual = testWorkflow.steps[0].export(); + + assertEquals(actual.function_id, "A05UU55CFFA#/functions/create_project"); + assertEquals(actual.inputs, { + domain: "test", + name: "test", + basecamp_access_token: "test", + }); +}); + +Deno.test("All outputs of Slack function CreateProject should exist", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_CreateProject_slack_function", + title: "Test CreateProject", + description: "This is a generated test to test CreateProject", + }); + const step = testWorkflow.addStep(CreateProject, { + domain: "test", + name: "test", + basecamp_access_token: "test", + }); + assertExists(step.outputs.id); + assertExists(step.outputs.name); + assertExists(step.outputs.url); +}); diff --git a/src/connectors/basecamp/functions/create_todo.ts b/src/connectors/basecamp/functions/create_todo.ts new file mode 100644 index 0000000..f352813 --- /dev/null +++ b/src/connectors/basecamp/functions/create_todo.ts @@ -0,0 +1,72 @@ +/** 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: "A05UU55CFFA#/functions/create_todo", + title: "Create a to-do", + input_parameters: { + properties: { + domain: { + type: Schema.types.string, + description: "Select an account", + title: "Account", + }, + project_id: { + type: Schema.types.string, + description: "Select a project", + title: "Project", + }, + todo_list_id: { + type: Schema.types.string, + description: "Select a to-do list", + title: "To-do list", + }, + content: { + type: Schema.types.string, + description: "Enter text", + title: "To-do", + }, + description: { + type: Schema.types.string, + description: "Enter text", + title: "Description", + }, + assignee_id: { + type: Schema.types.array, + description: "Select a member", + title: "Assignee", + items: { type: Schema.types.string }, + }, + starts_on: { + type: Schema.slack.types.date, + description: "Select a date", + title: "Starts on", + }, + due_on: { + type: Schema.slack.types.date, + description: "Select a date", + title: "Due on", + }, + basecamp_access_token: { + type: Schema.slack.types.oauth2, + title: "Basecamp access token", + }, + }, + required: [ + "domain", + "project_id", + "todo_list_id", + "content", + "basecamp_access_token", + ], + }, + output_parameters: { + properties: { + id: { type: Schema.types.string, title: "To-do ID" }, + content: { type: Schema.types.string, title: "To-do" }, + url: { type: Schema.types.string, title: "To-do URL" }, + }, + required: ["id", "content", "url"], + }, +}); diff --git a/src/connectors/basecamp/functions/create_todo_list.ts b/src/connectors/basecamp/functions/create_todo_list.ts new file mode 100644 index 0000000..80a954e --- /dev/null +++ b/src/connectors/basecamp/functions/create_todo_list.ts @@ -0,0 +1,45 @@ +/** 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: "A05UU55CFFA#/functions/create_todo_list", + title: "Create a to-do list", + input_parameters: { + properties: { + domain: { + type: Schema.types.string, + description: "Select an account", + title: "Account", + }, + project_id: { + type: Schema.types.string, + description: "Select a project", + title: "Project", + }, + name: { + type: Schema.types.string, + description: "Enter text", + title: "To-do list name", + }, + description: { + type: Schema.types.string, + description: "Enter text", + title: "Description", + }, + basecamp_access_token: { + type: Schema.slack.types.oauth2, + title: "Basecamp access token", + }, + }, + required: ["domain", "project_id", "name", "basecamp_access_token"], + }, + output_parameters: { + properties: { + id: { type: Schema.types.string, title: "To-do list ID" }, + name: { type: Schema.types.string, title: "To-do list name" }, + url: { type: Schema.types.string, title: "To-do list URL" }, + }, + required: ["id", "name", "url"], + }, +}); diff --git a/src/connectors/basecamp/functions/create_todo_list_test.ts b/src/connectors/basecamp/functions/create_todo_list_test.ts new file mode 100644 index 0000000..6e25a2b --- /dev/null +++ b/src/connectors/basecamp/functions/create_todo_list_test.ts @@ -0,0 +1,44 @@ +/** 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 CreateTodoList from "./create_todo_list.ts"; + +Deno.test("CreateTodoList can be used as a Slack function in a workflow step", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_CreateTodoList_slack_function", + title: "Test CreateTodoList", + description: "This is a generated test to test CreateTodoList", + }); + testWorkflow.addStep(CreateTodoList, { + domain: "test", + project_id: "test", + name: "test", + basecamp_access_token: "test", + }); + const actual = testWorkflow.steps[0].export(); + + assertEquals(actual.function_id, "A05UU55CFFA#/functions/create_todo_list"); + assertEquals(actual.inputs, { + domain: "test", + project_id: "test", + name: "test", + basecamp_access_token: "test", + }); +}); + +Deno.test("All outputs of Slack function CreateTodoList should exist", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_CreateTodoList_slack_function", + title: "Test CreateTodoList", + description: "This is a generated test to test CreateTodoList", + }); + const step = testWorkflow.addStep(CreateTodoList, { + domain: "test", + project_id: "test", + name: "test", + basecamp_access_token: "test", + }); + assertExists(step.outputs.id); + assertExists(step.outputs.name); + assertExists(step.outputs.url); +}); diff --git a/src/connectors/basecamp/functions/create_todo_test.ts b/src/connectors/basecamp/functions/create_todo_test.ts new file mode 100644 index 0000000..d86d295 --- /dev/null +++ b/src/connectors/basecamp/functions/create_todo_test.ts @@ -0,0 +1,47 @@ +/** 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 CreateTodo from "./create_todo.ts"; + +Deno.test("CreateTodo can be used as a Slack function in a workflow step", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_CreateTodo_slack_function", + title: "Test CreateTodo", + description: "This is a generated test to test CreateTodo", + }); + testWorkflow.addStep(CreateTodo, { + domain: "test", + project_id: "test", + todo_list_id: "test", + content: "test", + basecamp_access_token: "test", + }); + const actual = testWorkflow.steps[0].export(); + + assertEquals(actual.function_id, "A05UU55CFFA#/functions/create_todo"); + assertEquals(actual.inputs, { + domain: "test", + project_id: "test", + todo_list_id: "test", + content: "test", + basecamp_access_token: "test", + }); +}); + +Deno.test("All outputs of Slack function CreateTodo should exist", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_CreateTodo_slack_function", + title: "Test CreateTodo", + description: "This is a generated test to test CreateTodo", + }); + const step = testWorkflow.addStep(CreateTodo, { + domain: "test", + project_id: "test", + todo_list_id: "test", + content: "test", + basecamp_access_token: "test", + }); + assertExists(step.outputs.id); + assertExists(step.outputs.content); + assertExists(step.outputs.url); +}); diff --git a/src/connectors/basecamp/functions/mark_todo_complete.ts b/src/connectors/basecamp/functions/mark_todo_complete.ts new file mode 100644 index 0000000..735769f --- /dev/null +++ b/src/connectors/basecamp/functions/mark_todo_complete.ts @@ -0,0 +1,47 @@ +/** 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: "A05UU55CFFA#/functions/mark_todo_complete", + title: "Mark a to-do complete", + input_parameters: { + properties: { + domain: { + type: Schema.types.string, + description: "Select an account", + title: "Account", + }, + project_id: { + type: Schema.types.string, + description: "Select a project", + title: "Project", + }, + todo_list_id: { + type: Schema.types.string, + description: "Select a to-do list", + title: "To-do list", + }, + todo_id: { + type: Schema.types.string, + description: "Select a to-do", + title: "To-do", + }, + basecamp_access_token: { + type: Schema.slack.types.oauth2, + title: "Basecamp access token", + }, + }, + required: [ + "domain", + "project_id", + "todo_list_id", + "todo_id", + "basecamp_access_token", + ], + }, + output_parameters: { + properties: { id: { type: Schema.types.string, title: "To-do ID" } }, + required: ["id"], + }, +}); diff --git a/src/connectors/basecamp/functions/mark_todo_complete_test.ts b/src/connectors/basecamp/functions/mark_todo_complete_test.ts new file mode 100644 index 0000000..e3cf108 --- /dev/null +++ b/src/connectors/basecamp/functions/mark_todo_complete_test.ts @@ -0,0 +1,45 @@ +/** 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 MarkTodoComplete from "./mark_todo_complete.ts"; + +Deno.test("MarkTodoComplete can be used as a Slack function in a workflow step", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_MarkTodoComplete_slack_function", + title: "Test MarkTodoComplete", + description: "This is a generated test to test MarkTodoComplete", + }); + testWorkflow.addStep(MarkTodoComplete, { + domain: "test", + project_id: "test", + todo_list_id: "test", + todo_id: "test", + basecamp_access_token: "test", + }); + const actual = testWorkflow.steps[0].export(); + + assertEquals(actual.function_id, "A05UU55CFFA#/functions/mark_todo_complete"); + assertEquals(actual.inputs, { + domain: "test", + project_id: "test", + todo_list_id: "test", + todo_id: "test", + basecamp_access_token: "test", + }); +}); + +Deno.test("All outputs of Slack function MarkTodoComplete should exist", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_MarkTodoComplete_slack_function", + title: "Test MarkTodoComplete", + description: "This is a generated test to test MarkTodoComplete", + }); + const step = testWorkflow.addStep(MarkTodoComplete, { + domain: "test", + project_id: "test", + todo_list_id: "test", + todo_id: "test", + basecamp_access_token: "test", + }); + assertExists(step.outputs.id); +}); diff --git a/src/connectors/basecamp/functions/mark_todo_pending.ts b/src/connectors/basecamp/functions/mark_todo_pending.ts new file mode 100644 index 0000000..4e4287a --- /dev/null +++ b/src/connectors/basecamp/functions/mark_todo_pending.ts @@ -0,0 +1,47 @@ +/** 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: "A05UU55CFFA#/functions/mark_todo_pending", + title: "Mark a to-do pending", + input_parameters: { + properties: { + domain: { + type: Schema.types.string, + description: "Select an account", + title: "Account", + }, + project_id: { + type: Schema.types.string, + description: "Select a project", + title: "Project", + }, + todo_list_id: { + type: Schema.types.string, + description: "Select a to-do list", + title: "To-do list", + }, + todo_id: { + type: Schema.types.string, + description: "Select a to-do", + title: "To-do", + }, + basecamp_access_token: { + type: Schema.slack.types.oauth2, + title: "Basecamp access token", + }, + }, + required: [ + "domain", + "project_id", + "todo_list_id", + "todo_id", + "basecamp_access_token", + ], + }, + output_parameters: { + properties: { id: { type: Schema.types.string, title: "To-do ID" } }, + required: ["id"], + }, +}); diff --git a/src/connectors/basecamp/functions/mark_todo_pending_test.ts b/src/connectors/basecamp/functions/mark_todo_pending_test.ts new file mode 100644 index 0000000..70d4561 --- /dev/null +++ b/src/connectors/basecamp/functions/mark_todo_pending_test.ts @@ -0,0 +1,45 @@ +/** 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 MarkTodoPending from "./mark_todo_pending.ts"; + +Deno.test("MarkTodoPending can be used as a Slack function in a workflow step", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_MarkTodoPending_slack_function", + title: "Test MarkTodoPending", + description: "This is a generated test to test MarkTodoPending", + }); + testWorkflow.addStep(MarkTodoPending, { + domain: "test", + project_id: "test", + todo_list_id: "test", + todo_id: "test", + basecamp_access_token: "test", + }); + const actual = testWorkflow.steps[0].export(); + + assertEquals(actual.function_id, "A05UU55CFFA#/functions/mark_todo_pending"); + assertEquals(actual.inputs, { + domain: "test", + project_id: "test", + todo_list_id: "test", + todo_id: "test", + basecamp_access_token: "test", + }); +}); + +Deno.test("All outputs of Slack function MarkTodoPending should exist", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_MarkTodoPending_slack_function", + title: "Test MarkTodoPending", + description: "This is a generated test to test MarkTodoPending", + }); + const step = testWorkflow.addStep(MarkTodoPending, { + domain: "test", + project_id: "test", + todo_list_id: "test", + todo_id: "test", + basecamp_access_token: "test", + }); + assertExists(step.outputs.id); +}); diff --git a/src/connectors/basecamp/mod.ts b/src/connectors/basecamp/mod.ts new file mode 100644 index 0000000..0aef4c1 --- /dev/null +++ b/src/connectors/basecamp/mod.ts @@ -0,0 +1,33 @@ +/** This file was autogenerated. Follow the steps in src/schema/slack/functions/README.md to rebuild **/ +import CreateProject from "./functions/create_project.ts"; +import CreateTodo from "./functions/create_todo.ts"; +import CreateTodoList from "./functions/create_todo_list.ts"; +import MarkTodoComplete from "./functions/mark_todo_complete.ts"; +import MarkTodoPending from "./functions/mark_todo_pending.ts"; + +const Basecamp = { + functions: { + /** + * @see The {@link https://api.slack.com/reference/connectors/basecamp/create_project CreateProject} documentation. + */ + CreateProject, + /** + * @see The {@link https://api.slack.com/reference/connectors/basecamp/create_todo CreateTodo} documentation. + */ + CreateTodo, + /** + * @see The {@link https://api.slack.com/reference/connectors/basecamp/create_todo_list CreateTodoList} documentation. + */ + CreateTodoList, + /** + * @see The {@link https://api.slack.com/reference/connectors/basecamp/mark_todo_complete MarkTodoComplete} documentation. + */ + MarkTodoComplete, + /** + * @see The {@link https://api.slack.com/reference/connectors/basecamp/mark_todo_pending MarkTodoPending} documentation. + */ + MarkTodoPending, + }, +} as const; + +export default Basecamp; diff --git a/src/connectors/box.core/functions/copy_file.ts b/src/connectors/box.core/functions/copy_file.ts new file mode 100644 index 0000000..2f5e437 --- /dev/null +++ b/src/connectors/box.core/functions/copy_file.ts @@ -0,0 +1,39 @@ +/** 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: "A05QNBAB4UA#/functions/copy_file", + title: "Copy a file", + input_parameters: { + properties: { + box_access_token: { + type: Schema.slack.types.oauth2, + title: "Box Access Token", + }, + file_id: { + type: Schema.types.string, + description: "Pick a file to copy", + title: "File to copy", + }, + parent_folder_id: { + type: Schema.types.string, + description: "Select a folder", + title: "Destination folder", + }, + name: { + type: Schema.types.string, + description: "Enter a new name", + title: "Name", + }, + }, + required: ["box_access_token", "file_id"], + }, + output_parameters: { + properties: { + id: { type: Schema.types.string, title: "File ID" }, + web_link: { type: Schema.types.string, title: "File URL" }, + }, + required: ["id", "web_link"], + }, +}); diff --git a/src/connectors/box.core/functions/copy_file_test.ts b/src/connectors/box.core/functions/copy_file_test.ts new file mode 100644 index 0000000..06228b0 --- /dev/null +++ b/src/connectors/box.core/functions/copy_file_test.ts @@ -0,0 +1,31 @@ +/** 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 CopyFile from "./copy_file.ts"; + +Deno.test("CopyFile can be used as a Slack function in a workflow step", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_CopyFile_slack_function", + title: "Test CopyFile", + description: "This is a generated test to test CopyFile", + }); + testWorkflow.addStep(CopyFile, { box_access_token: "test", file_id: "test" }); + const actual = testWorkflow.steps[0].export(); + + assertEquals(actual.function_id, "A05QNBAB4UA#/functions/copy_file"); + assertEquals(actual.inputs, { box_access_token: "test", file_id: "test" }); +}); + +Deno.test("All outputs of Slack function CopyFile should exist", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_CopyFile_slack_function", + title: "Test CopyFile", + description: "This is a generated test to test CopyFile", + }); + const step = testWorkflow.addStep(CopyFile, { + box_access_token: "test", + file_id: "test", + }); + assertExists(step.outputs.id); + assertExists(step.outputs.web_link); +}); diff --git a/src/connectors/box.core/functions/create_folder.ts b/src/connectors/box.core/functions/create_folder.ts new file mode 100644 index 0000000..cfada34 --- /dev/null +++ b/src/connectors/box.core/functions/create_folder.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: "A05QNBAB4UA#/functions/create_folder", + title: "Create a folder", + input_parameters: { + properties: { + box_access_token: { + type: Schema.slack.types.oauth2, + title: "Box Access Token", + }, + name: { + type: Schema.types.string, + description: "Enter a name", + title: "Folder name", + }, + parent_folder_id: { + type: Schema.types.string, + description: "Select a folder", + title: "Parent folder", + }, + }, + required: ["box_access_token", "name"], + }, + output_parameters: { + properties: { + id: { type: Schema.types.string, title: "Folder ID" }, + web_link: { type: Schema.types.string, title: "Folder URL" }, + }, + required: ["id", "web_link"], + }, +}); diff --git a/src/connectors/box.core/functions/create_folder_test.ts b/src/connectors/box.core/functions/create_folder_test.ts new file mode 100644 index 0000000..9005216 --- /dev/null +++ b/src/connectors/box.core/functions/create_folder_test.ts @@ -0,0 +1,34 @@ +/** 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 CreateFolder from "./create_folder.ts"; + +Deno.test("CreateFolder can be used as a Slack function in a workflow step", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_CreateFolder_slack_function", + title: "Test CreateFolder", + description: "This is a generated test to test CreateFolder", + }); + testWorkflow.addStep(CreateFolder, { + box_access_token: "test", + name: "test", + }); + const actual = testWorkflow.steps[0].export(); + + assertEquals(actual.function_id, "A05QNBAB4UA#/functions/create_folder"); + assertEquals(actual.inputs, { box_access_token: "test", name: "test" }); +}); + +Deno.test("All outputs of Slack function CreateFolder should exist", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_CreateFolder_slack_function", + title: "Test CreateFolder", + description: "This is a generated test to test CreateFolder", + }); + const step = testWorkflow.addStep(CreateFolder, { + box_access_token: "test", + name: "test", + }); + assertExists(step.outputs.id); + assertExists(step.outputs.web_link); +}); diff --git a/src/connectors/box.core/mod.ts b/src/connectors/box.core/mod.ts new file mode 100644 index 0000000..c454ab2 --- /dev/null +++ b/src/connectors/box.core/mod.ts @@ -0,0 +1,18 @@ +/** This file was autogenerated. Follow the steps in src/schema/slack/functions/README.md to rebuild **/ +import CopyFile from "./functions/copy_file.ts"; +import CreateFolder from "./functions/create_folder.ts"; + +const BoxCore = { + functions: { + /** + * @see The {@link https://api.slack.com/reference/connectors/box.core/copy_file CopyFile} documentation. + */ + CopyFile, + /** + * @see The {@link https://api.slack.com/reference/connectors/box.core/create_folder CreateFolder} documentation. + */ + CreateFolder, + }, +} as const; + +export default BoxCore; diff --git a/src/connectors/box.sign/functions/create_sign_request.ts b/src/connectors/box.sign/functions/create_sign_request.ts new file mode 100644 index 0000000..410ce76 --- /dev/null +++ b/src/connectors/box.sign/functions/create_sign_request.ts @@ -0,0 +1,62 @@ +/** 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: "A05TC5525DZ#/functions/create_sign_request", + title: "Create a sign request with a template", + input_parameters: { + properties: { + template: { + type: Schema.types.string, + description: "Please select a template", + title: "Template", + }, + parent_folder_id: { + type: Schema.types.string, + description: "Select the parent folder", + title: "Parent folder", + }, + signer_email: { + type: Schema.types.string, + description: "Enter an email address", + title: "Signer email", + }, + name: { + type: Schema.types.string, + description: "Enter text", + title: "Name of the request", + }, + email_subject: { + type: Schema.types.string, + description: "Enter text", + title: "Email subject", + }, + email_message: { + type: Schema.types.string, + description: "Enter text", + title: "Email message", + }, + box_access_token: { + type: Schema.slack.types.oauth2, + title: "Box Access Token", + }, + }, + required: [ + "template", + "parent_folder_id", + "signer_email", + "box_access_token", + ], + }, + output_parameters: { + properties: { + id: { type: Schema.types.string, title: "ID" }, + email_message: { type: Schema.types.string, title: "Email message" }, + email_subject: { type: Schema.types.string, title: "Email subject" }, + name: { type: Schema.types.string, title: "Request name" }, + status: { type: Schema.types.string, title: "Request status" }, + }, + required: ["id"], + }, +}); diff --git a/src/connectors/box.sign/functions/create_sign_request_test.ts b/src/connectors/box.sign/functions/create_sign_request_test.ts new file mode 100644 index 0000000..40e3c77 --- /dev/null +++ b/src/connectors/box.sign/functions/create_sign_request_test.ts @@ -0,0 +1,49 @@ +/** 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 CreateSignRequest from "./create_sign_request.ts"; + +Deno.test("CreateSignRequest can be used as a Slack function in a workflow step", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_CreateSignRequest_slack_function", + title: "Test CreateSignRequest", + description: "This is a generated test to test CreateSignRequest", + }); + testWorkflow.addStep(CreateSignRequest, { + template: "test", + parent_folder_id: "test", + signer_email: "test", + box_access_token: "test", + }); + const actual = testWorkflow.steps[0].export(); + + assertEquals( + actual.function_id, + "A05TC5525DZ#/functions/create_sign_request", + ); + assertEquals(actual.inputs, { + template: "test", + parent_folder_id: "test", + signer_email: "test", + box_access_token: "test", + }); +}); + +Deno.test("All outputs of Slack function CreateSignRequest should exist", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_CreateSignRequest_slack_function", + title: "Test CreateSignRequest", + description: "This is a generated test to test CreateSignRequest", + }); + const step = testWorkflow.addStep(CreateSignRequest, { + template: "test", + parent_folder_id: "test", + signer_email: "test", + box_access_token: "test", + }); + assertExists(step.outputs.id); + assertExists(step.outputs.email_message); + assertExists(step.outputs.email_subject); + assertExists(step.outputs.name); + assertExists(step.outputs.status); +}); diff --git a/src/connectors/box.sign/mod.ts b/src/connectors/box.sign/mod.ts new file mode 100644 index 0000000..600e0b4 --- /dev/null +++ b/src/connectors/box.sign/mod.ts @@ -0,0 +1,13 @@ +/** This file was autogenerated. Follow the steps in src/schema/slack/functions/README.md to rebuild **/ +import CreateSignRequest from "./functions/create_sign_request.ts"; + +const BoxSign = { + functions: { + /** + * @see The {@link https://api.slack.com/reference/connectors/box.sign/create_sign_request CreateSignRequest} documentation. + */ + CreateSignRequest, + }, +} as const; + +export default BoxSign; diff --git a/src/connectors/dialpad/functions/send_sms.ts b/src/connectors/dialpad/functions/send_sms.ts new file mode 100644 index 0000000..f45d2a3 --- /dev/null +++ b/src/connectors/dialpad/functions/send_sms.ts @@ -0,0 +1,46 @@ +/** 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: "A05USRAR873#/functions/send_sms", + title: "Send an SMS", + input_parameters: { + properties: { + from_number: { + type: Schema.types.string, + description: "Enter a phone number", + title: "Sending number", + }, + to_numbers: { + type: Schema.types.array, + description: "Enter phone number(s)", + title: "Receiving numbers", + items: { type: Schema.types.string }, + }, + text: { + type: Schema.types.string, + description: "Enter text", + title: "Text message content", + }, + dialpad_access_token: { + type: Schema.slack.types.oauth2, + description: "Dialpad Credential to use", + title: "Dialpad access token", + }, + }, + required: ["from_number", "to_numbers", "text", "dialpad_access_token"], + }, + output_parameters: { + properties: { + message_status: { type: Schema.types.string, title: "SMS status" }, + from_number: { type: Schema.types.string, title: "Sending number" }, + text: { + type: Schema.types.string, + description: "SMS text content", + title: "SMS text content", + }, + }, + required: ["message_status", "from_number", "text"], + }, +}); diff --git a/src/connectors/dialpad/functions/send_sms_test.ts b/src/connectors/dialpad/functions/send_sms_test.ts new file mode 100644 index 0000000..8906f1c --- /dev/null +++ b/src/connectors/dialpad/functions/send_sms_test.ts @@ -0,0 +1,44 @@ +/** 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 SendSms from "./send_sms.ts"; + +Deno.test("SendSms can be used as a Slack function in a workflow step", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_SendSms_slack_function", + title: "Test SendSms", + description: "This is a generated test to test SendSms", + }); + testWorkflow.addStep(SendSms, { + from_number: "test", + to_numbers: "test", + text: "test", + dialpad_access_token: "test", + }); + const actual = testWorkflow.steps[0].export(); + + assertEquals(actual.function_id, "A05USRAR873#/functions/send_sms"); + assertEquals(actual.inputs, { + from_number: "test", + to_numbers: "test", + text: "test", + dialpad_access_token: "test", + }); +}); + +Deno.test("All outputs of Slack function SendSms should exist", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_SendSms_slack_function", + title: "Test SendSms", + description: "This is a generated test to test SendSms", + }); + const step = testWorkflow.addStep(SendSms, { + from_number: "test", + to_numbers: "test", + text: "test", + dialpad_access_token: "test", + }); + assertExists(step.outputs.message_status); + assertExists(step.outputs.from_number); + assertExists(step.outputs.text); +}); diff --git a/src/connectors/dialpad/mod.ts b/src/connectors/dialpad/mod.ts new file mode 100644 index 0000000..9d1a9ca --- /dev/null +++ b/src/connectors/dialpad/mod.ts @@ -0,0 +1,13 @@ +/** This file was autogenerated. Follow the steps in src/schema/slack/functions/README.md to rebuild **/ +import SendSms from "./functions/send_sms.ts"; + +const Dialpad = { + functions: { + /** + * @see The {@link https://api.slack.com/reference/connectors/dialpad/send_sms SendSms} documentation. + */ + SendSms, + }, +} as const; + +export default Dialpad; diff --git a/src/connectors/dropbox.core/functions/copy_document.ts b/src/connectors/dropbox.core/functions/copy_document.ts new file mode 100644 index 0000000..a027b8b --- /dev/null +++ b/src/connectors/dropbox.core/functions/copy_document.ts @@ -0,0 +1,67 @@ +/** 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: "A05U3EFESFR#/functions/copy_document", + title: "Copy a document", + input_parameters: { + properties: { + document_type: { + type: Schema.types.string, + description: "Select a document type", + title: "Document type", + enum: [ + "folder", + "paper", + "spreadsheet", + "pdf", + "document", + "others", + "audio", + "video", + ], + }, + from_path: { + type: Schema.types.string, + description: "Select source", + title: "Source", + }, + to_path: { + type: Schema.types.string, + description: "Select destination folder", + title: "Destination", + }, + name: { + type: Schema.types.string, + description: "Enter new name", + title: "New name", + }, + dropbox_access_token: { + type: Schema.slack.types.oauth2, + title: "Dropbox access token", + }, + }, + required: ["document_type", "from_path", "name", "dropbox_access_token"], + }, + output_parameters: { + properties: { + id: { + type: Schema.types.string, + description: "Id of the folder", + title: "Folder ID", + }, + name: { + type: Schema.types.string, + description: "Folder name", + title: "Name", + }, + path_display: { + type: Schema.types.string, + description: "Display path", + title: "Display path", + }, + }, + required: [], + }, +}); diff --git a/src/connectors/dropbox.core/functions/copy_document_test.ts b/src/connectors/dropbox.core/functions/copy_document_test.ts new file mode 100644 index 0000000..b76696f --- /dev/null +++ b/src/connectors/dropbox.core/functions/copy_document_test.ts @@ -0,0 +1,44 @@ +/** 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 CopyDocument from "./copy_document.ts"; + +Deno.test("CopyDocument can be used as a Slack function in a workflow step", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_CopyDocument_slack_function", + title: "Test CopyDocument", + description: "This is a generated test to test CopyDocument", + }); + testWorkflow.addStep(CopyDocument, { + document_type: "test", + from_path: "test", + name: "test", + dropbox_access_token: "test", + }); + const actual = testWorkflow.steps[0].export(); + + assertEquals(actual.function_id, "A05U3EFESFR#/functions/copy_document"); + assertEquals(actual.inputs, { + document_type: "test", + from_path: "test", + name: "test", + dropbox_access_token: "test", + }); +}); + +Deno.test("All outputs of Slack function CopyDocument should exist", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_CopyDocument_slack_function", + title: "Test CopyDocument", + description: "This is a generated test to test CopyDocument", + }); + const step = testWorkflow.addStep(CopyDocument, { + document_type: "test", + from_path: "test", + name: "test", + dropbox_access_token: "test", + }); + assertExists(step.outputs.id); + assertExists(step.outputs.name); + assertExists(step.outputs.path_display); +}); diff --git a/src/connectors/dropbox.core/functions/create_folder.ts b/src/connectors/dropbox.core/functions/create_folder.ts new file mode 100644 index 0000000..6532c10 --- /dev/null +++ b/src/connectors/dropbox.core/functions/create_folder.ts @@ -0,0 +1,47 @@ +/** 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: "A05U3EFESFR#/functions/create_folder", + title: "Create a folder", + input_parameters: { + properties: { + name: { + type: Schema.types.string, + description: "Enter folder name", + title: "Folder name", + }, + parent_path: { + type: Schema.types.string, + description: "Select parent folder", + title: "Parent folder", + }, + dropbox_access_token: { + type: Schema.slack.types.oauth2, + title: "Dropbox access token", + }, + }, + required: ["name", "dropbox_access_token"], + }, + output_parameters: { + properties: { + id: { + type: Schema.types.string, + description: "Id of the folder", + title: "Folder ID", + }, + name: { + type: Schema.types.string, + description: "Folder name", + title: "Name", + }, + path_display: { + type: Schema.types.string, + description: "Display path", + title: "Display path", + }, + }, + required: [], + }, +}); diff --git a/src/connectors/dropbox.core/functions/create_folder_test.ts b/src/connectors/dropbox.core/functions/create_folder_test.ts new file mode 100644 index 0000000..77e35aa --- /dev/null +++ b/src/connectors/dropbox.core/functions/create_folder_test.ts @@ -0,0 +1,35 @@ +/** 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 CreateFolder from "./create_folder.ts"; + +Deno.test("CreateFolder can be used as a Slack function in a workflow step", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_CreateFolder_slack_function", + title: "Test CreateFolder", + description: "This is a generated test to test CreateFolder", + }); + testWorkflow.addStep(CreateFolder, { + name: "test", + dropbox_access_token: "test", + }); + const actual = testWorkflow.steps[0].export(); + + assertEquals(actual.function_id, "A05U3EFESFR#/functions/create_folder"); + assertEquals(actual.inputs, { name: "test", dropbox_access_token: "test" }); +}); + +Deno.test("All outputs of Slack function CreateFolder should exist", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_CreateFolder_slack_function", + title: "Test CreateFolder", + description: "This is a generated test to test CreateFolder", + }); + const step = testWorkflow.addStep(CreateFolder, { + name: "test", + dropbox_access_token: "test", + }); + assertExists(step.outputs.id); + assertExists(step.outputs.name); + assertExists(step.outputs.path_display); +}); diff --git a/src/connectors/dropbox.core/functions/create_share_link.ts b/src/connectors/dropbox.core/functions/create_share_link.ts new file mode 100644 index 0000000..ca1ae17 --- /dev/null +++ b/src/connectors/dropbox.core/functions/create_share_link.ts @@ -0,0 +1,52 @@ +/** 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: "A05U3EFESFR#/functions/create_share_link", + title: "Create a shared link", + input_parameters: { + properties: { + path: { + type: Schema.types.string, + description: "Select folder to share", + title: "Folder", + }, + access: { + type: Schema.types.string, + description: "Select access", + title: "Access", + enum: ["viewer", "editor", "max", "default"], + }, + audience: { + type: Schema.types.string, + description: "Select audience permission", + title: "Audience", + enum: ["public", "team", "no_one"], + }, + expires: { type: Schema.slack.types.timestamp, title: "Expires" }, + dropbox_access_token: { + type: Schema.slack.types.oauth2, + title: "Dropbox access token", + }, + }, + required: ["path", "access", "audience", "dropbox_access_token"], + }, + output_parameters: { + properties: { + id: { + type: Schema.types.string, + description: "Id of the folder", + title: "Folder ID", + }, + name: { + type: Schema.types.string, + description: "Folder name", + title: "Name", + }, + path: { type: Schema.types.string, title: "File path" }, + share_url: { type: Schema.types.string, title: "Shared link" }, + }, + required: [], + }, +}); diff --git a/src/connectors/dropbox.core/functions/create_share_link_test.ts b/src/connectors/dropbox.core/functions/create_share_link_test.ts new file mode 100644 index 0000000..0235c09 --- /dev/null +++ b/src/connectors/dropbox.core/functions/create_share_link_test.ts @@ -0,0 +1,45 @@ +/** 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 CreateShareLink from "./create_share_link.ts"; + +Deno.test("CreateShareLink can be used as a Slack function in a workflow step", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_CreateShareLink_slack_function", + title: "Test CreateShareLink", + description: "This is a generated test to test CreateShareLink", + }); + testWorkflow.addStep(CreateShareLink, { + path: "test", + access: "test", + audience: "test", + dropbox_access_token: "test", + }); + const actual = testWorkflow.steps[0].export(); + + assertEquals(actual.function_id, "A05U3EFESFR#/functions/create_share_link"); + assertEquals(actual.inputs, { + path: "test", + access: "test", + audience: "test", + dropbox_access_token: "test", + }); +}); + +Deno.test("All outputs of Slack function CreateShareLink should exist", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_CreateShareLink_slack_function", + title: "Test CreateShareLink", + description: "This is a generated test to test CreateShareLink", + }); + const step = testWorkflow.addStep(CreateShareLink, { + path: "test", + access: "test", + audience: "test", + dropbox_access_token: "test", + }); + assertExists(step.outputs.id); + assertExists(step.outputs.name); + assertExists(step.outputs.path); + assertExists(step.outputs.share_url); +}); diff --git a/src/connectors/dropbox.core/functions/delete_document.ts b/src/connectors/dropbox.core/functions/delete_document.ts new file mode 100644 index 0000000..a59a02d --- /dev/null +++ b/src/connectors/dropbox.core/functions/delete_document.ts @@ -0,0 +1,57 @@ +/** 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: "A05U3EFESFR#/functions/delete_document", + title: "Delete a document", + input_parameters: { + properties: { + document_type: { + type: Schema.types.string, + description: "Select a document type", + title: "Document type", + enum: [ + "folder", + "paper", + "spreadsheet", + "pdf", + "document", + "others", + "audio", + "video", + ], + }, + path: { + type: Schema.types.string, + description: "Select source", + title: "Source", + }, + dropbox_access_token: { + type: Schema.slack.types.oauth2, + title: "Dropbox access token", + }, + }, + required: ["document_type", "path", "dropbox_access_token"], + }, + output_parameters: { + properties: { + id: { + type: Schema.types.string, + description: "Id of the folder", + title: "Folder ID", + }, + name: { + type: Schema.types.string, + description: "Folder name", + title: "Name", + }, + path_display: { + type: Schema.types.string, + description: "Display path", + title: "Display path", + }, + }, + required: [], + }, +}); diff --git a/src/connectors/dropbox.core/functions/delete_document_test.ts b/src/connectors/dropbox.core/functions/delete_document_test.ts new file mode 100644 index 0000000..46a701b --- /dev/null +++ b/src/connectors/dropbox.core/functions/delete_document_test.ts @@ -0,0 +1,41 @@ +/** 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 DeleteDocument from "./delete_document.ts"; + +Deno.test("DeleteDocument can be used as a Slack function in a workflow step", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_DeleteDocument_slack_function", + title: "Test DeleteDocument", + description: "This is a generated test to test DeleteDocument", + }); + testWorkflow.addStep(DeleteDocument, { + document_type: "test", + path: "test", + dropbox_access_token: "test", + }); + const actual = testWorkflow.steps[0].export(); + + assertEquals(actual.function_id, "A05U3EFESFR#/functions/delete_document"); + assertEquals(actual.inputs, { + document_type: "test", + path: "test", + dropbox_access_token: "test", + }); +}); + +Deno.test("All outputs of Slack function DeleteDocument should exist", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_DeleteDocument_slack_function", + title: "Test DeleteDocument", + description: "This is a generated test to test DeleteDocument", + }); + const step = testWorkflow.addStep(DeleteDocument, { + document_type: "test", + path: "test", + dropbox_access_token: "test", + }); + assertExists(step.outputs.id); + assertExists(step.outputs.name); + assertExists(step.outputs.path_display); +}); diff --git a/src/connectors/dropbox.core/functions/move_document.ts b/src/connectors/dropbox.core/functions/move_document.ts new file mode 100644 index 0000000..68a9d5d --- /dev/null +++ b/src/connectors/dropbox.core/functions/move_document.ts @@ -0,0 +1,67 @@ +/** 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: "A05U3EFESFR#/functions/move_document", + title: "Move a document", + input_parameters: { + properties: { + document_type: { + type: Schema.types.string, + description: "Select a document type", + title: "Document type", + enum: [ + "folder", + "paper", + "spreadsheet", + "pdf", + "document", + "others", + "audio", + "video", + ], + }, + from_path: { + type: Schema.types.string, + description: "Select source", + title: "Source", + }, + to_path: { + type: Schema.types.string, + description: "Select destination folder", + title: "Destination", + }, + name: { + type: Schema.types.string, + description: "Enter new name", + title: "New name", + }, + dropbox_access_token: { + type: Schema.slack.types.oauth2, + title: "Dropbox access token", + }, + }, + required: ["document_type", "from_path", "name", "dropbox_access_token"], + }, + output_parameters: { + properties: { + id: { + type: Schema.types.string, + description: "Id of the folder", + title: "Folder ID", + }, + name: { + type: Schema.types.string, + description: "Folder name", + title: "Name", + }, + path_display: { + type: Schema.types.string, + description: "Display path", + title: "Display path", + }, + }, + required: [], + }, +}); diff --git a/src/connectors/dropbox.core/functions/move_document_test.ts b/src/connectors/dropbox.core/functions/move_document_test.ts new file mode 100644 index 0000000..fe6df05 --- /dev/null +++ b/src/connectors/dropbox.core/functions/move_document_test.ts @@ -0,0 +1,44 @@ +/** 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 MoveDocument from "./move_document.ts"; + +Deno.test("MoveDocument can be used as a Slack function in a workflow step", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_MoveDocument_slack_function", + title: "Test MoveDocument", + description: "This is a generated test to test MoveDocument", + }); + testWorkflow.addStep(MoveDocument, { + document_type: "test", + from_path: "test", + name: "test", + dropbox_access_token: "test", + }); + const actual = testWorkflow.steps[0].export(); + + assertEquals(actual.function_id, "A05U3EFESFR#/functions/move_document"); + assertEquals(actual.inputs, { + document_type: "test", + from_path: "test", + name: "test", + dropbox_access_token: "test", + }); +}); + +Deno.test("All outputs of Slack function MoveDocument should exist", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_MoveDocument_slack_function", + title: "Test MoveDocument", + description: "This is a generated test to test MoveDocument", + }); + const step = testWorkflow.addStep(MoveDocument, { + document_type: "test", + from_path: "test", + name: "test", + dropbox_access_token: "test", + }); + assertExists(step.outputs.id); + assertExists(step.outputs.name); + assertExists(step.outputs.path_display); +}); diff --git a/src/connectors/dropbox.core/mod.ts b/src/connectors/dropbox.core/mod.ts new file mode 100644 index 0000000..9ad3622 --- /dev/null +++ b/src/connectors/dropbox.core/mod.ts @@ -0,0 +1,33 @@ +/** This file was autogenerated. Follow the steps in src/schema/slack/functions/README.md to rebuild **/ +import CopyDocument from "./functions/copy_document.ts"; +import CreateFolder from "./functions/create_folder.ts"; +import CreateShareLink from "./functions/create_share_link.ts"; +import DeleteDocument from "./functions/delete_document.ts"; +import MoveDocument from "./functions/move_document.ts"; + +const DropboxCore = { + functions: { + /** + * @see The {@link https://api.slack.com/reference/connectors/dropbox.core/copy_document CopyDocument} documentation. + */ + CopyDocument, + /** + * @see The {@link https://api.slack.com/reference/connectors/dropbox.core/create_folder CreateFolder} documentation. + */ + CreateFolder, + /** + * @see The {@link https://api.slack.com/reference/connectors/dropbox.core/create_share_link CreateShareLink} documentation. + */ + CreateShareLink, + /** + * @see The {@link https://api.slack.com/reference/connectors/dropbox.core/delete_document DeleteDocument} documentation. + */ + DeleteDocument, + /** + * @see The {@link https://api.slack.com/reference/connectors/dropbox.core/move_document MoveDocument} documentation. + */ + MoveDocument, + }, +} as const; + +export default DropboxCore; diff --git a/src/connectors/dropbox.sign/functions/send_signature_request_with_template.ts b/src/connectors/dropbox.sign/functions/send_signature_request_with_template.ts new file mode 100644 index 0000000..350279a --- /dev/null +++ b/src/connectors/dropbox.sign/functions/send_signature_request_with_template.ts @@ -0,0 +1,110 @@ +/** 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: "A060Q1RQSCE#/functions/send_signature_request_with_template", + title: "Send signature request using a template", + input_parameters: { + properties: { + title: { + type: Schema.types.string, + description: "Enter text", + title: "Title of the request", + }, + template_id: { + type: Schema.types.string, + description: "Please select an option", + title: "Template", + }, + signer_role: { + type: Schema.types.string, + description: "Please select an option", + title: "Signer role", + }, + signer_name: { + type: Schema.types.string, + description: "Enter text", + title: "Signer name", + }, + signer_email_address: { + type: Schema.types.string, + description: "Enter text", + title: "Signer email", + }, + email_subject: { + type: Schema.types.string, + description: "Enter text", + title: "Email subject", + }, + email_message: { + type: Schema.types.string, + description: "Enter text", + title: "Email message", + }, + dropbox_sign_access_token: { + type: Schema.slack.types.oauth2, + description: "Dropbox Sign Credential to use", + title: "Dropbox Sign access token", + }, + }, + required: [ + "template_id", + "signer_role", + "signer_name", + "signer_email_address", + "dropbox_sign_access_token", + ], + }, + output_parameters: { + properties: { + signature_request_id: { + type: Schema.types.string, + description: "Signature request ID", + title: "Signature request ID", + }, + title: { + type: Schema.types.string, + description: "Signature request title", + title: "Signature request title", + }, + subject: { + type: Schema.types.string, + description: "Email subject", + title: "Email subject", + }, + message: { + type: Schema.types.string, + description: "Email message", + title: "Email message", + }, + signing_url: { + type: Schema.types.string, + description: "Signature signing URL", + title: "Signature signing URL", + }, + details_url: { + type: Schema.types.string, + description: "Signature details URL", + title: "Signature details URL", + }, + signer_name: { + type: Schema.types.string, + description: "Signer name", + title: "Signer name", + }, + signer_email_address: { + type: Schema.types.string, + description: "Signature request title", + title: "Signature request title", + }, + }, + required: [ + "signature_request_id", + "signing_url", + "details_url", + "signer_name", + "signer_email_address", + ], + }, +}); diff --git a/src/connectors/dropbox.sign/functions/send_signature_request_with_template_test.ts b/src/connectors/dropbox.sign/functions/send_signature_request_with_template_test.ts new file mode 100644 index 0000000..15da5fa --- /dev/null +++ b/src/connectors/dropbox.sign/functions/send_signature_request_with_template_test.ts @@ -0,0 +1,57 @@ +/** 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 SendSignatureRequestWithTemplate from "./send_signature_request_with_template.ts"; + +Deno.test("SendSignatureRequestWithTemplate can be used as a Slack function in a workflow step", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_SendSignatureRequestWithTemplate_slack_function", + title: "Test SendSignatureRequestWithTemplate", + description: + "This is a generated test to test SendSignatureRequestWithTemplate", + }); + testWorkflow.addStep(SendSignatureRequestWithTemplate, { + template_id: "test", + signer_role: "test", + signer_name: "test", + signer_email_address: "test", + dropbox_sign_access_token: "test", + }); + const actual = testWorkflow.steps[0].export(); + + assertEquals( + actual.function_id, + "A060Q1RQSCE#/functions/send_signature_request_with_template", + ); + assertEquals(actual.inputs, { + template_id: "test", + signer_role: "test", + signer_name: "test", + signer_email_address: "test", + dropbox_sign_access_token: "test", + }); +}); + +Deno.test("All outputs of Slack function SendSignatureRequestWithTemplate should exist", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_SendSignatureRequestWithTemplate_slack_function", + title: "Test SendSignatureRequestWithTemplate", + description: + "This is a generated test to test SendSignatureRequestWithTemplate", + }); + const step = testWorkflow.addStep(SendSignatureRequestWithTemplate, { + template_id: "test", + signer_role: "test", + signer_name: "test", + signer_email_address: "test", + dropbox_sign_access_token: "test", + }); + assertExists(step.outputs.signature_request_id); + assertExists(step.outputs.title); + assertExists(step.outputs.subject); + assertExists(step.outputs.message); + assertExists(step.outputs.signing_url); + assertExists(step.outputs.details_url); + assertExists(step.outputs.signer_name); + assertExists(step.outputs.signer_email_address); +}); diff --git a/src/connectors/dropbox.sign/mod.ts b/src/connectors/dropbox.sign/mod.ts new file mode 100644 index 0000000..852c6ab --- /dev/null +++ b/src/connectors/dropbox.sign/mod.ts @@ -0,0 +1,13 @@ +/** This file was autogenerated. Follow the steps in src/schema/slack/functions/README.md to rebuild **/ +import SendSignatureRequestWithTemplate from "./functions/send_signature_request_with_template.ts"; + +const DropboxSign = { + functions: { + /** + * @see The {@link https://api.slack.com/reference/connectors/dropbox.sign/send_signature_request_with_template SendSignatureRequestWithTemplate} documentation. + */ + SendSignatureRequestWithTemplate, + }, +} as const; + +export default DropboxSign; diff --git a/src/connectors/greenhouse.recruiting/functions/hire_application.ts b/src/connectors/greenhouse.recruiting/functions/hire_application.ts new file mode 100644 index 0000000..5963cbc --- /dev/null +++ b/src/connectors/greenhouse.recruiting/functions/hire_application.ts @@ -0,0 +1,24 @@ +/** 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: "A05QS03T4MB#/functions/hire_application", + title: "Hire Application", + input_parameters: { + properties: { + candidate_id: { type: Schema.types.string, title: "Candidate email" }, + application_id: { type: Schema.types.string, title: "Application" }, + close_reason_id: { type: Schema.types.string, title: "Close reason" }, + }, + required: ["candidate_id", "application_id", "close_reason_id"], + }, + output_parameters: { + properties: { + id: { type: Schema.types.string, title: "Application ID" }, + status: { type: Schema.types.string, title: "Status" }, + candidate_id: { type: Schema.types.string, title: "Candidate ID" }, + }, + required: [], + }, +}); diff --git a/src/connectors/greenhouse.recruiting/functions/hire_application_test.ts b/src/connectors/greenhouse.recruiting/functions/hire_application_test.ts new file mode 100644 index 0000000..2052e95 --- /dev/null +++ b/src/connectors/greenhouse.recruiting/functions/hire_application_test.ts @@ -0,0 +1,41 @@ +/** 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 HireApplication from "./hire_application.ts"; + +Deno.test("HireApplication can be used as a Slack function in a workflow step", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_HireApplication_slack_function", + title: "Test HireApplication", + description: "This is a generated test to test HireApplication", + }); + testWorkflow.addStep(HireApplication, { + candidate_id: "test", + application_id: "test", + close_reason_id: "test", + }); + const actual = testWorkflow.steps[0].export(); + + assertEquals(actual.function_id, "A05QS03T4MB#/functions/hire_application"); + assertEquals(actual.inputs, { + candidate_id: "test", + application_id: "test", + close_reason_id: "test", + }); +}); + +Deno.test("All outputs of Slack function HireApplication should exist", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_HireApplication_slack_function", + title: "Test HireApplication", + description: "This is a generated test to test HireApplication", + }); + const step = testWorkflow.addStep(HireApplication, { + candidate_id: "test", + application_id: "test", + close_reason_id: "test", + }); + assertExists(step.outputs.id); + assertExists(step.outputs.status); + assertExists(step.outputs.candidate_id); +}); diff --git a/src/connectors/greenhouse.recruiting/functions/list_candidate_activity.ts b/src/connectors/greenhouse.recruiting/functions/list_candidate_activity.ts new file mode 100644 index 0000000..a1adf14 --- /dev/null +++ b/src/connectors/greenhouse.recruiting/functions/list_candidate_activity.ts @@ -0,0 +1,30 @@ +/** 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: "A05QS03T4MB#/functions/list_candidate_activity", + title: "Candidate activity", + description: "Retrieve a candidate activity feed", + input_parameters: { + properties: { + candidate_id: { type: Schema.types.string, title: "Candidate email" }, + }, + required: ["candidate_id"], + }, + output_parameters: { + properties: { + notes: { + type: Schema.types.array, + title: "Notes", + items: { type: Schema.types.string }, + }, + activities: { + type: Schema.types.array, + title: "Activities", + items: { type: Schema.types.string }, + }, + }, + required: [], + }, +}); diff --git a/src/connectors/greenhouse.recruiting/functions/list_candidate_activity_test.ts b/src/connectors/greenhouse.recruiting/functions/list_candidate_activity_test.ts new file mode 100644 index 0000000..39f3676 --- /dev/null +++ b/src/connectors/greenhouse.recruiting/functions/list_candidate_activity_test.ts @@ -0,0 +1,33 @@ +/** 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 ListCandidateActivity from "./list_candidate_activity.ts"; + +Deno.test("ListCandidateActivity can be used as a Slack function in a workflow step", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_ListCandidateActivity_slack_function", + title: "Test ListCandidateActivity", + description: "This is a generated test to test ListCandidateActivity", + }); + testWorkflow.addStep(ListCandidateActivity, { candidate_id: "test" }); + const actual = testWorkflow.steps[0].export(); + + assertEquals( + actual.function_id, + "A05QS03T4MB#/functions/list_candidate_activity", + ); + assertEquals(actual.inputs, { candidate_id: "test" }); +}); + +Deno.test("All outputs of Slack function ListCandidateActivity should exist", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_ListCandidateActivity_slack_function", + title: "Test ListCandidateActivity", + description: "This is a generated test to test ListCandidateActivity", + }); + const step = testWorkflow.addStep(ListCandidateActivity, { + candidate_id: "test", + }); + assertExists(step.outputs.notes); + assertExists(step.outputs.activities); +}); diff --git a/src/connectors/greenhouse.recruiting/functions/list_job_candidates.ts b/src/connectors/greenhouse.recruiting/functions/list_job_candidates.ts new file mode 100644 index 0000000..aaac4df --- /dev/null +++ b/src/connectors/greenhouse.recruiting/functions/list_job_candidates.ts @@ -0,0 +1,28 @@ +/** 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: "A05QS03T4MB#/functions/list_job_candidates", + title: "List job candidates", + description: "List all candidates for a job request", + input_parameters: { + properties: { job_id: { type: Schema.types.string, title: "Job" } }, + required: ["job_id"], + }, + output_parameters: { + properties: { + candidate_emails: { + type: Schema.types.array, + title: "Candidate emails", + items: { type: Schema.types.string }, + }, + candidate_names: { + type: Schema.types.array, + title: "Candidates names", + items: { type: Schema.types.string }, + }, + }, + required: [], + }, +}); diff --git a/src/connectors/greenhouse.recruiting/functions/list_job_candidates_test.ts b/src/connectors/greenhouse.recruiting/functions/list_job_candidates_test.ts new file mode 100644 index 0000000..c17e92b --- /dev/null +++ b/src/connectors/greenhouse.recruiting/functions/list_job_candidates_test.ts @@ -0,0 +1,31 @@ +/** 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 ListJobCandidates from "./list_job_candidates.ts"; + +Deno.test("ListJobCandidates can be used as a Slack function in a workflow step", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_ListJobCandidates_slack_function", + title: "Test ListJobCandidates", + description: "This is a generated test to test ListJobCandidates", + }); + testWorkflow.addStep(ListJobCandidates, { job_id: "test" }); + const actual = testWorkflow.steps[0].export(); + + assertEquals( + actual.function_id, + "A05QS03T4MB#/functions/list_job_candidates", + ); + assertEquals(actual.inputs, { job_id: "test" }); +}); + +Deno.test("All outputs of Slack function ListJobCandidates should exist", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_ListJobCandidates_slack_function", + title: "Test ListJobCandidates", + description: "This is a generated test to test ListJobCandidates", + }); + const step = testWorkflow.addStep(ListJobCandidates, { job_id: "test" }); + assertExists(step.outputs.candidate_emails); + assertExists(step.outputs.candidate_names); +}); diff --git a/src/connectors/greenhouse.recruiting/functions/reject_application.ts b/src/connectors/greenhouse.recruiting/functions/reject_application.ts new file mode 100644 index 0000000..86fc373 --- /dev/null +++ b/src/connectors/greenhouse.recruiting/functions/reject_application.ts @@ -0,0 +1,28 @@ +/** 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: "A05QS03T4MB#/functions/reject_application", + title: "Reject Application", + input_parameters: { + properties: { + candidate_id: { type: Schema.types.string, title: "Candidate email" }, + application_id: { type: Schema.types.string, title: "Application" }, + rejection_reason_id: { + type: Schema.types.string, + title: "Rejection reason", + }, + notes: { type: Schema.types.string, title: "Notes" }, + }, + required: ["candidate_id", "application_id"], + }, + output_parameters: { + properties: { + id: { type: Schema.types.string, title: "Application ID" }, + status: { type: Schema.types.string, title: "Status" }, + candidate_id: { type: Schema.types.string, title: "Candidate ID" }, + }, + required: [], + }, +}); diff --git a/src/connectors/greenhouse.recruiting/functions/reject_application_test.ts b/src/connectors/greenhouse.recruiting/functions/reject_application_test.ts new file mode 100644 index 0000000..9e6b9a7 --- /dev/null +++ b/src/connectors/greenhouse.recruiting/functions/reject_application_test.ts @@ -0,0 +1,35 @@ +/** 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 RejectApplication from "./reject_application.ts"; + +Deno.test("RejectApplication can be used as a Slack function in a workflow step", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_RejectApplication_slack_function", + title: "Test RejectApplication", + description: "This is a generated test to test RejectApplication", + }); + testWorkflow.addStep(RejectApplication, { + candidate_id: "test", + application_id: "test", + }); + const actual = testWorkflow.steps[0].export(); + + assertEquals(actual.function_id, "A05QS03T4MB#/functions/reject_application"); + assertEquals(actual.inputs, { candidate_id: "test", application_id: "test" }); +}); + +Deno.test("All outputs of Slack function RejectApplication should exist", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_RejectApplication_slack_function", + title: "Test RejectApplication", + description: "This is a generated test to test RejectApplication", + }); + const step = testWorkflow.addStep(RejectApplication, { + candidate_id: "test", + application_id: "test", + }); + assertExists(step.outputs.id); + assertExists(step.outputs.status); + assertExists(step.outputs.candidate_id); +}); diff --git a/src/connectors/greenhouse.recruiting/mod.ts b/src/connectors/greenhouse.recruiting/mod.ts new file mode 100644 index 0000000..6cc4d62 --- /dev/null +++ b/src/connectors/greenhouse.recruiting/mod.ts @@ -0,0 +1,28 @@ +/** This file was autogenerated. Follow the steps in src/schema/slack/functions/README.md to rebuild **/ +import HireApplication from "./functions/hire_application.ts"; +import ListCandidateActivity from "./functions/list_candidate_activity.ts"; +import ListJobCandidates from "./functions/list_job_candidates.ts"; +import RejectApplication from "./functions/reject_application.ts"; + +const GreenhouseRecruiting = { + functions: { + /** + * @see The {@link https://api.slack.com/reference/connectors/greenhouse.recruiting/hire_application HireApplication} documentation. + */ + HireApplication, + /** + * @see The {@link https://api.slack.com/reference/connectors/greenhouse.recruiting/list_candidate_activity ListCandidateActivity} documentation. + */ + ListCandidateActivity, + /** + * @see The {@link https://api.slack.com/reference/connectors/greenhouse.recruiting/list_job_candidates ListJobCandidates} documentation. + */ + ListJobCandidates, + /** + * @see The {@link https://api.slack.com/reference/connectors/greenhouse.recruiting/reject_application RejectApplication} documentation. + */ + RejectApplication, + }, +} as const; + +export default GreenhouseRecruiting; diff --git a/src/connectors/launchdarkly/functions/create_approval_request_update_flag.ts b/src/connectors/launchdarkly/functions/create_approval_request_update_flag.ts new file mode 100644 index 0000000..8b219a1 --- /dev/null +++ b/src/connectors/launchdarkly/functions/create_approval_request_update_flag.ts @@ -0,0 +1,108 @@ +/** 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: "A05RF94AFB3#/functions/create_approval_request_update_flag", + title: "Create approval request to update a feature flag's state", + input_parameters: { + properties: { + project_key: { + type: Schema.types.string, + description: "Please select an option", + title: "Project", + }, + feature_flag_key: { + type: Schema.types.string, + description: "Please select an option", + title: "Feature flag key", + }, + environment_key: { + type: Schema.types.string, + description: "Please select an option", + title: "Environment key", + }, + feature_flag_state: { + type: Schema.types.string, + description: "Please select an option", + title: "Feature flag state", + enum: ["turnFlagOn", "turnFlagOff"], + }, + description: { + type: Schema.types.string, + description: "Add a brief description of the change", + title: "Reason", + }, + notify_teams: { + type: Schema.types.array, + description: "Please select an option", + title: "Notify team", + items: { type: Schema.types.string }, + }, + notify_members: { + type: Schema.types.array, + description: "Enter user IDs", + title: "Notify reviewers", + items: { type: Schema.types.string }, + }, + comment: { + type: Schema.types.string, + description: "Add comments", + title: "Comment", + }, + launchdarkly_access_token: { + type: Schema.slack.types.oauth2, + description: "LaunchDarkly Credential to use", + title: "LaunchDarkly access token", + }, + }, + required: [ + "project_key", + "feature_flag_key", + "environment_key", + "feature_flag_state", + "description", + "launchdarkly_access_token", + ], + }, + output_parameters: { + properties: { + id: { + type: Schema.types.string, + description: "Approval request identifier", + title: "Approval request ID", + }, + review_status: { + type: Schema.types.string, + description: "Approval request review status", + title: "Approval request review status", + }, + key: { + type: Schema.types.string, + description: "Feature flag key", + title: "Feature flag key", + }, + environment_key: { + type: Schema.types.string, + description: "Environment key", + title: "Environment key", + }, + description: { + type: Schema.types.string, + description: "Approval request description", + title: "Approval request description", + }, + comment: { + type: Schema.types.string, + description: "Approval request comment", + title: "Approval request comment", + }, + feature_flag_state: { + type: Schema.types.string, + description: "Feature flag state", + title: "Feature flag state", + }, + }, + required: ["id", "review_status"], + }, +}); diff --git a/src/connectors/launchdarkly/functions/create_approval_request_update_flag_test.ts b/src/connectors/launchdarkly/functions/create_approval_request_update_flag_test.ts new file mode 100644 index 0000000..f0940a5 --- /dev/null +++ b/src/connectors/launchdarkly/functions/create_approval_request_update_flag_test.ts @@ -0,0 +1,59 @@ +/** 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 CreateApprovalRequestUpdateFlag from "./create_approval_request_update_flag.ts"; + +Deno.test("CreateApprovalRequestUpdateFlag can be used as a Slack function in a workflow step", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_CreateApprovalRequestUpdateFlag_slack_function", + title: "Test CreateApprovalRequestUpdateFlag", + description: + "This is a generated test to test CreateApprovalRequestUpdateFlag", + }); + testWorkflow.addStep(CreateApprovalRequestUpdateFlag, { + project_key: "test", + feature_flag_key: "test", + environment_key: "test", + feature_flag_state: "test", + description: "test", + launchdarkly_access_token: "test", + }); + const actual = testWorkflow.steps[0].export(); + + assertEquals( + actual.function_id, + "A05RF94AFB3#/functions/create_approval_request_update_flag", + ); + assertEquals(actual.inputs, { + project_key: "test", + feature_flag_key: "test", + environment_key: "test", + feature_flag_state: "test", + description: "test", + launchdarkly_access_token: "test", + }); +}); + +Deno.test("All outputs of Slack function CreateApprovalRequestUpdateFlag should exist", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_CreateApprovalRequestUpdateFlag_slack_function", + title: "Test CreateApprovalRequestUpdateFlag", + description: + "This is a generated test to test CreateApprovalRequestUpdateFlag", + }); + const step = testWorkflow.addStep(CreateApprovalRequestUpdateFlag, { + project_key: "test", + feature_flag_key: "test", + environment_key: "test", + feature_flag_state: "test", + description: "test", + launchdarkly_access_token: "test", + }); + assertExists(step.outputs.id); + assertExists(step.outputs.review_status); + assertExists(step.outputs.key); + assertExists(step.outputs.environment_key); + assertExists(step.outputs.description); + assertExists(step.outputs.comment); + assertExists(step.outputs.feature_flag_state); +}); diff --git a/src/connectors/launchdarkly/functions/create_feature_flag.ts b/src/connectors/launchdarkly/functions/create_feature_flag.ts new file mode 100644 index 0000000..b9e7cee --- /dev/null +++ b/src/connectors/launchdarkly/functions/create_feature_flag.ts @@ -0,0 +1,43 @@ +/** 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: "A05RF94AFB3#/functions/create_feature_flag", + title: "Create a feature flag", + input_parameters: { + properties: { + project_key: { + type: Schema.types.string, + description: "Please select an option", + title: "Project", + }, + name: { + type: Schema.types.string, + description: "Enter a unique, human-readable name", + title: "Name", + }, + key: { + type: Schema.types.string, + description: "Enter a unique flag key", + title: "Key", + }, + launchdarkly_access_token: { + type: Schema.slack.types.oauth2, + description: "LaunchDarkly Credential to use", + title: "LaunchDarkly access token", + }, + }, + required: ["project_key", "name", "key", "launchdarkly_access_token"], + }, + output_parameters: { + properties: { + name: { + type: Schema.types.string, + description: "Feature flag name", + title: "Name", + }, + }, + required: ["name"], + }, +}); diff --git a/src/connectors/launchdarkly/functions/create_feature_flag_test.ts b/src/connectors/launchdarkly/functions/create_feature_flag_test.ts new file mode 100644 index 0000000..ba51dc9 --- /dev/null +++ b/src/connectors/launchdarkly/functions/create_feature_flag_test.ts @@ -0,0 +1,45 @@ +/** 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 CreateFeatureFlag from "./create_feature_flag.ts"; + +Deno.test("CreateFeatureFlag can be used as a Slack function in a workflow step", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_CreateFeatureFlag_slack_function", + title: "Test CreateFeatureFlag", + description: "This is a generated test to test CreateFeatureFlag", + }); + testWorkflow.addStep(CreateFeatureFlag, { + project_key: "test", + name: "test", + key: "test", + launchdarkly_access_token: "test", + }); + const actual = testWorkflow.steps[0].export(); + + assertEquals( + actual.function_id, + "A05RF94AFB3#/functions/create_feature_flag", + ); + assertEquals(actual.inputs, { + project_key: "test", + name: "test", + key: "test", + launchdarkly_access_token: "test", + }); +}); + +Deno.test("All outputs of Slack function CreateFeatureFlag should exist", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_CreateFeatureFlag_slack_function", + title: "Test CreateFeatureFlag", + description: "This is a generated test to test CreateFeatureFlag", + }); + const step = testWorkflow.addStep(CreateFeatureFlag, { + project_key: "test", + name: "test", + key: "test", + launchdarkly_access_token: "test", + }); + assertExists(step.outputs.name); +}); diff --git a/src/connectors/launchdarkly/functions/update_feature_flag_state.ts b/src/connectors/launchdarkly/functions/update_feature_flag_state.ts new file mode 100644 index 0000000..0eea7cb --- /dev/null +++ b/src/connectors/launchdarkly/functions/update_feature_flag_state.ts @@ -0,0 +1,86 @@ +/** 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: "A05RF94AFB3#/functions/update_feature_flag_state", + title: "Update a feature flag's state", + description: "Set a flag's state to ON or OFF", + input_parameters: { + properties: { + project_key: { + type: Schema.types.string, + description: "Please select an option", + title: "Project", + }, + feature_flag_key: { + type: Schema.types.string, + description: "Please select an option", + title: "Feature flag", + }, + environment_key: { + type: Schema.types.string, + description: "Please select an option", + title: "Environment key", + }, + feature_flag_state: { + type: Schema.types.string, + description: "Please select an option", + title: "Feature flag state", + enum: ["turnFlagOn", "turnFlagOff"], + }, + comment: { + type: Schema.types.string, + description: "Add comments", + title: "Comment", + }, + launchdarkly_access_token: { + type: Schema.slack.types.oauth2, + description: "LaunchDarkly Credential to use", + title: "LaunchDarkly access token", + }, + }, + required: [ + "project_key", + "feature_flag_key", + "environment_key", + "feature_flag_state", + "launchdarkly_access_token", + ], + }, + output_parameters: { + properties: { + name: { + type: Schema.types.string, + description: "Feature flag name", + title: "Feature flag name", + }, + description: { + type: Schema.types.string, + description: "Feature flag description", + title: "Feature flag description", + }, + key: { + type: Schema.types.string, + description: "Feature flag key", + title: "Feature flag key", + }, + environment_key: { + type: Schema.types.string, + description: "Environment key", + title: "Environment key", + }, + comment: { + type: Schema.types.string, + description: "Comment", + title: "Feature flag comment", + }, + feature_flag_state: { + type: Schema.types.string, + description: "Feature flag state", + title: "Feature flag state", + }, + }, + required: ["name"], + }, +}); diff --git a/src/connectors/launchdarkly/functions/update_feature_flag_state_test.ts b/src/connectors/launchdarkly/functions/update_feature_flag_state_test.ts new file mode 100644 index 0000000..b8bfc9b --- /dev/null +++ b/src/connectors/launchdarkly/functions/update_feature_flag_state_test.ts @@ -0,0 +1,53 @@ +/** 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 UpdateFeatureFlagState from "./update_feature_flag_state.ts"; + +Deno.test("UpdateFeatureFlagState can be used as a Slack function in a workflow step", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_UpdateFeatureFlagState_slack_function", + title: "Test UpdateFeatureFlagState", + description: "This is a generated test to test UpdateFeatureFlagState", + }); + testWorkflow.addStep(UpdateFeatureFlagState, { + project_key: "test", + feature_flag_key: "test", + environment_key: "test", + feature_flag_state: "test", + launchdarkly_access_token: "test", + }); + const actual = testWorkflow.steps[0].export(); + + assertEquals( + actual.function_id, + "A05RF94AFB3#/functions/update_feature_flag_state", + ); + assertEquals(actual.inputs, { + project_key: "test", + feature_flag_key: "test", + environment_key: "test", + feature_flag_state: "test", + launchdarkly_access_token: "test", + }); +}); + +Deno.test("All outputs of Slack function UpdateFeatureFlagState should exist", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_UpdateFeatureFlagState_slack_function", + title: "Test UpdateFeatureFlagState", + description: "This is a generated test to test UpdateFeatureFlagState", + }); + const step = testWorkflow.addStep(UpdateFeatureFlagState, { + project_key: "test", + feature_flag_key: "test", + environment_key: "test", + feature_flag_state: "test", + launchdarkly_access_token: "test", + }); + assertExists(step.outputs.name); + assertExists(step.outputs.description); + assertExists(step.outputs.key); + assertExists(step.outputs.environment_key); + assertExists(step.outputs.comment); + assertExists(step.outputs.feature_flag_state); +}); diff --git a/src/connectors/launchdarkly/functions/update_target_feature_flag.ts b/src/connectors/launchdarkly/functions/update_target_feature_flag.ts new file mode 100644 index 0000000..06c5ee8 --- /dev/null +++ b/src/connectors/launchdarkly/functions/update_target_feature_flag.ts @@ -0,0 +1,104 @@ +/** 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: "A05RF94AFB3#/functions/update_target_feature_flag", + title: "Update a target in a feature flag", + description: "Add or remove a target from a feature flag", + input_parameters: { + properties: { + project_key: { + type: Schema.types.string, + description: "Please select an option", + title: "Project", + }, + feature_flag_key: { + type: Schema.types.string, + description: "Please select an option", + title: "Feature flag", + }, + environment_key: { + type: Schema.types.string, + description: "Please select an option", + title: "Environment key", + }, + variation_id: { + type: Schema.types.string, + description: "Please select an option", + title: "Feature flag variation", + }, + kind: { + type: Schema.types.string, + description: "Please select an option", + title: "Target operation", + enum: ["addTargets", "removeTargets"], + }, + context_kind_key: { + type: Schema.types.string, + description: "Please select an option", + title: "Target type", + }, + target_key: { + type: Schema.types.array, + description: "Enter text", + title: "Target key", + items: { type: Schema.types.string }, + }, + comment: { + type: Schema.types.string, + description: "Enter text", + title: "Comment", + }, + launchdarkly_access_token: { + type: Schema.slack.types.oauth2, + description: "LaunchDarkly Credential to use", + title: "LaunchDarkly access token", + }, + }, + required: [ + "project_key", + "feature_flag_key", + "environment_key", + "variation_id", + "kind", + "target_key", + "launchdarkly_access_token", + ], + }, + output_parameters: { + properties: { + name: { + type: Schema.types.string, + description: "Feature flag name", + title: "Feature flag name", + }, + description: { + type: Schema.types.string, + description: "Feature flag description", + title: "Feature flag description", + }, + key: { + type: Schema.types.string, + description: "Feature flag key", + title: "Feature flag key", + }, + environment_key: { + type: Schema.types.string, + description: "Environment key", + title: "Environment key", + }, + comment: { + type: Schema.types.string, + description: "Update target comment", + title: "Update target comment", + }, + kind: { + type: Schema.types.string, + description: "Target operation type", + title: "Target operation", + }, + }, + required: ["name"], + }, +}); diff --git a/src/connectors/launchdarkly/functions/update_target_feature_flag_test.ts b/src/connectors/launchdarkly/functions/update_target_feature_flag_test.ts new file mode 100644 index 0000000..4634637 --- /dev/null +++ b/src/connectors/launchdarkly/functions/update_target_feature_flag_test.ts @@ -0,0 +1,59 @@ +/** 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 UpdateTargetFeatureFlag from "./update_target_feature_flag.ts"; + +Deno.test("UpdateTargetFeatureFlag can be used as a Slack function in a workflow step", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_UpdateTargetFeatureFlag_slack_function", + title: "Test UpdateTargetFeatureFlag", + description: "This is a generated test to test UpdateTargetFeatureFlag", + }); + testWorkflow.addStep(UpdateTargetFeatureFlag, { + project_key: "test", + feature_flag_key: "test", + environment_key: "test", + variation_id: "test", + kind: "test", + target_key: "test", + launchdarkly_access_token: "test", + }); + const actual = testWorkflow.steps[0].export(); + + assertEquals( + actual.function_id, + "A05RF94AFB3#/functions/update_target_feature_flag", + ); + assertEquals(actual.inputs, { + project_key: "test", + feature_flag_key: "test", + environment_key: "test", + variation_id: "test", + kind: "test", + target_key: "test", + launchdarkly_access_token: "test", + }); +}); + +Deno.test("All outputs of Slack function UpdateTargetFeatureFlag should exist", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_UpdateTargetFeatureFlag_slack_function", + title: "Test UpdateTargetFeatureFlag", + description: "This is a generated test to test UpdateTargetFeatureFlag", + }); + const step = testWorkflow.addStep(UpdateTargetFeatureFlag, { + project_key: "test", + feature_flag_key: "test", + environment_key: "test", + variation_id: "test", + kind: "test", + target_key: "test", + launchdarkly_access_token: "test", + }); + assertExists(step.outputs.name); + assertExists(step.outputs.description); + assertExists(step.outputs.key); + assertExists(step.outputs.environment_key); + assertExists(step.outputs.comment); + assertExists(step.outputs.kind); +}); diff --git a/src/connectors/launchdarkly/functions/update_target_segment.ts b/src/connectors/launchdarkly/functions/update_target_segment.ts new file mode 100644 index 0000000..859ca42 --- /dev/null +++ b/src/connectors/launchdarkly/functions/update_target_segment.ts @@ -0,0 +1,104 @@ +/** 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: "A05RF94AFB3#/functions/update_target_segment", + title: "Update a target in a segment", + description: "Add/remove a target to include/exclude in a segment", + input_parameters: { + properties: { + project_key: { + type: Schema.types.string, + description: "Please select an option", + title: "Project", + }, + environment_key: { + type: Schema.types.string, + description: "Please select an option", + title: "Environment key", + }, + segment_key: { + type: Schema.types.string, + description: "Please select an option", + title: "Segment", + }, + kind: { + type: Schema.types.string, + description: "Please select an option", + title: "Target operation", + enum: [ + "addIncludedTargets", + "removeIncludedTargets", + "addExcludedTargets", + "removeExcludedTargets", + ], + }, + context_kind_key: { + type: Schema.types.string, + description: "Please select an option", + title: "Context kind", + }, + target_key: { + type: Schema.types.array, + description: "Enter text", + title: "Target key", + items: { type: Schema.types.string }, + }, + comment: { + type: Schema.types.string, + description: "Enter text", + title: "Comment", + }, + launchdarkly_access_token: { + type: Schema.slack.types.oauth2, + description: "LaunchDarkly Credential to use", + title: "LaunchDarkly access token", + }, + }, + required: [ + "project_key", + "environment_key", + "segment_key", + "kind", + "context_kind_key", + "target_key", + "launchdarkly_access_token", + ], + }, + output_parameters: { + properties: { + name: { + type: Schema.types.string, + description: "Segment name", + title: "Segment name", + }, + description: { + type: Schema.types.string, + description: "Segment description", + title: "Segment description", + }, + key: { + type: Schema.types.string, + description: "Segment key", + title: "Segment key", + }, + environment_key: { + type: Schema.types.string, + description: "Environment key", + title: "Environment key", + }, + comment: { + type: Schema.types.string, + description: "Update target comment", + title: "Update target comment", + }, + kind: { + type: Schema.types.string, + description: "Target operation type", + title: "Target operation", + }, + }, + required: ["name"], + }, +}); diff --git a/src/connectors/launchdarkly/functions/update_target_segment_test.ts b/src/connectors/launchdarkly/functions/update_target_segment_test.ts new file mode 100644 index 0000000..cdc8326 --- /dev/null +++ b/src/connectors/launchdarkly/functions/update_target_segment_test.ts @@ -0,0 +1,59 @@ +/** 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 UpdateTargetSegment from "./update_target_segment.ts"; + +Deno.test("UpdateTargetSegment can be used as a Slack function in a workflow step", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_UpdateTargetSegment_slack_function", + title: "Test UpdateTargetSegment", + description: "This is a generated test to test UpdateTargetSegment", + }); + testWorkflow.addStep(UpdateTargetSegment, { + project_key: "test", + environment_key: "test", + segment_key: "test", + kind: "test", + context_kind_key: "test", + target_key: "test", + launchdarkly_access_token: "test", + }); + const actual = testWorkflow.steps[0].export(); + + assertEquals( + actual.function_id, + "A05RF94AFB3#/functions/update_target_segment", + ); + assertEquals(actual.inputs, { + project_key: "test", + environment_key: "test", + segment_key: "test", + kind: "test", + context_kind_key: "test", + target_key: "test", + launchdarkly_access_token: "test", + }); +}); + +Deno.test("All outputs of Slack function UpdateTargetSegment should exist", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_UpdateTargetSegment_slack_function", + title: "Test UpdateTargetSegment", + description: "This is a generated test to test UpdateTargetSegment", + }); + const step = testWorkflow.addStep(UpdateTargetSegment, { + project_key: "test", + environment_key: "test", + segment_key: "test", + kind: "test", + context_kind_key: "test", + target_key: "test", + launchdarkly_access_token: "test", + }); + assertExists(step.outputs.name); + assertExists(step.outputs.description); + assertExists(step.outputs.key); + assertExists(step.outputs.environment_key); + assertExists(step.outputs.comment); + assertExists(step.outputs.kind); +}); diff --git a/src/connectors/launchdarkly/mod.ts b/src/connectors/launchdarkly/mod.ts new file mode 100644 index 0000000..c6e2ec5 --- /dev/null +++ b/src/connectors/launchdarkly/mod.ts @@ -0,0 +1,33 @@ +/** This file was autogenerated. Follow the steps in src/schema/slack/functions/README.md to rebuild **/ +import CreateApprovalRequestUpdateFlag from "./functions/create_approval_request_update_flag.ts"; +import CreateFeatureFlag from "./functions/create_feature_flag.ts"; +import UpdateFeatureFlagState from "./functions/update_feature_flag_state.ts"; +import UpdateTargetFeatureFlag from "./functions/update_target_feature_flag.ts"; +import UpdateTargetSegment from "./functions/update_target_segment.ts"; + +const Launchdarkly = { + functions: { + /** + * @see The {@link https://api.slack.com/reference/connectors/launchdarkly/create_approval_request_update_flag CreateApprovalRequestUpdateFlag} documentation. + */ + CreateApprovalRequestUpdateFlag, + /** + * @see The {@link https://api.slack.com/reference/connectors/launchdarkly/create_feature_flag CreateFeatureFlag} documentation. + */ + CreateFeatureFlag, + /** + * @see The {@link https://api.slack.com/reference/connectors/launchdarkly/update_feature_flag_state UpdateFeatureFlagState} documentation. + */ + UpdateFeatureFlagState, + /** + * @see The {@link https://api.slack.com/reference/connectors/launchdarkly/update_target_feature_flag UpdateTargetFeatureFlag} documentation. + */ + UpdateTargetFeatureFlag, + /** + * @see The {@link https://api.slack.com/reference/connectors/launchdarkly/update_target_segment UpdateTargetSegment} documentation. + */ + UpdateTargetSegment, + }, +} as const; + +export default Launchdarkly; diff --git a/src/connectors/microsoft.excel/functions/add_worksheet_row.ts b/src/connectors/microsoft.excel/functions/add_worksheet_row.ts new file mode 100644 index 0000000..b460618 --- /dev/null +++ b/src/connectors/microsoft.excel/functions/add_worksheet_row.ts @@ -0,0 +1,54 @@ +/** 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: "A05UVANN1S4#/functions/add_worksheet_row", + title: "Add to worksheet", + description: "Add a row to a Microsoft workbook worksheet", + input_parameters: { + properties: { + workbook: { + type: Schema.types.object, + description: "Select a workbook", + title: "Workbook", + }, + worksheet_name: { + type: Schema.types.string, + description: "Select a worksheet", + title: "Worksheet", + }, + columns: { + type: Schema.types.object, + description: "Columns", + title: "Columns", + }, + excel_access_token: { + type: Schema.slack.types.oauth2, + description: "Access token for Microsoft Graph API", + title: "Microsoft excel access token", + }, + }, + required: ["workbook", "worksheet_name", "columns", "excel_access_token"], + }, + output_parameters: { + properties: { + workbook_id: { + type: Schema.types.string, + description: "Workbook ID", + title: "Workbook ID", + }, + worksheet_url: { + type: Schema.types.string, + description: "Worksheet URL", + title: "Worksheet URL", + }, + worksheet_name: { + type: Schema.types.string, + description: "Worksheet name", + title: "Worksheet name", + }, + }, + required: ["workbook_id", "worksheet_url", "worksheet_name"], + }, +}); diff --git a/src/connectors/microsoft.excel/functions/add_worksheet_row_test.ts b/src/connectors/microsoft.excel/functions/add_worksheet_row_test.ts new file mode 100644 index 0000000..348d4ed --- /dev/null +++ b/src/connectors/microsoft.excel/functions/add_worksheet_row_test.ts @@ -0,0 +1,44 @@ +/** 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 AddWorksheetRow from "./add_worksheet_row.ts"; + +Deno.test("AddWorksheetRow can be used as a Slack function in a workflow step", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_AddWorksheetRow_slack_function", + title: "Test AddWorksheetRow", + description: "This is a generated test to test AddWorksheetRow", + }); + testWorkflow.addStep(AddWorksheetRow, { + workbook: "test", + worksheet_name: "test", + columns: "test", + excel_access_token: "test", + }); + const actual = testWorkflow.steps[0].export(); + + assertEquals(actual.function_id, "A05UVANN1S4#/functions/add_worksheet_row"); + assertEquals(actual.inputs, { + workbook: "test", + worksheet_name: "test", + columns: "test", + excel_access_token: "test", + }); +}); + +Deno.test("All outputs of Slack function AddWorksheetRow should exist", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_AddWorksheetRow_slack_function", + title: "Test AddWorksheetRow", + description: "This is a generated test to test AddWorksheetRow", + }); + const step = testWorkflow.addStep(AddWorksheetRow, { + workbook: "test", + worksheet_name: "test", + columns: "test", + excel_access_token: "test", + }); + assertExists(step.outputs.workbook_id); + assertExists(step.outputs.worksheet_url); + assertExists(step.outputs.worksheet_name); +}); diff --git a/src/connectors/microsoft.excel/functions/delete_worksheet_row.ts b/src/connectors/microsoft.excel/functions/delete_worksheet_row.ts new file mode 100644 index 0000000..eae2e77 --- /dev/null +++ b/src/connectors/microsoft.excel/functions/delete_worksheet_row.ts @@ -0,0 +1,65 @@ +/** 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: "A05UVANN1S4#/functions/delete_worksheet_row", + title: "Delete from a worksheet", + description: "Delete a row in a Microsoft workbook worksheet", + input_parameters: { + properties: { + workbook: { + type: Schema.types.object, + description: "Select a workbook", + title: "Workbook", + }, + worksheet_name: { + type: Schema.types.string, + description: "Select a worksheet", + title: "Worksheet", + }, + column_name: { + type: Schema.types.string, + description: "Select a column", + title: "Choose a column to search", + }, + cell_value: { + type: Schema.types.string, + description: "Add a value", + title: "Cell value to find", + }, + excel_access_token: { + type: Schema.slack.types.oauth2, + description: "Access token for Microsoft Graph API", + title: "Microsoft excel access token", + }, + }, + required: [ + "workbook", + "worksheet_name", + "column_name", + "cell_value", + "excel_access_token", + ], + }, + output_parameters: { + properties: { + worksheet_url: { + type: Schema.types.string, + description: "Worksheet URL", + title: "Worksheet URL", + }, + worksheet_name: { + type: Schema.types.string, + description: "Worksheet name", + title: "Worksheet name", + }, + row_id: { + type: Schema.types.string, + description: "Deleted row ID", + title: "Row ID", + }, + }, + required: ["worksheet_url", "worksheet_name", "row_id"], + }, +}); diff --git a/src/connectors/microsoft.excel/functions/delete_worksheet_row_test.ts b/src/connectors/microsoft.excel/functions/delete_worksheet_row_test.ts new file mode 100644 index 0000000..bb212b5 --- /dev/null +++ b/src/connectors/microsoft.excel/functions/delete_worksheet_row_test.ts @@ -0,0 +1,50 @@ +/** 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 DeleteWorksheetRow from "./delete_worksheet_row.ts"; + +Deno.test("DeleteWorksheetRow can be used as a Slack function in a workflow step", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_DeleteWorksheetRow_slack_function", + title: "Test DeleteWorksheetRow", + description: "This is a generated test to test DeleteWorksheetRow", + }); + testWorkflow.addStep(DeleteWorksheetRow, { + workbook: "test", + worksheet_name: "test", + column_name: "test", + cell_value: "test", + excel_access_token: "test", + }); + const actual = testWorkflow.steps[0].export(); + + assertEquals( + actual.function_id, + "A05UVANN1S4#/functions/delete_worksheet_row", + ); + assertEquals(actual.inputs, { + workbook: "test", + worksheet_name: "test", + column_name: "test", + cell_value: "test", + excel_access_token: "test", + }); +}); + +Deno.test("All outputs of Slack function DeleteWorksheetRow should exist", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_DeleteWorksheetRow_slack_function", + title: "Test DeleteWorksheetRow", + description: "This is a generated test to test DeleteWorksheetRow", + }); + const step = testWorkflow.addStep(DeleteWorksheetRow, { + workbook: "test", + worksheet_name: "test", + column_name: "test", + cell_value: "test", + excel_access_token: "test", + }); + assertExists(step.outputs.worksheet_url); + assertExists(step.outputs.worksheet_name); + assertExists(step.outputs.row_id); +}); diff --git a/src/connectors/microsoft.excel/functions/select_worksheet_row.ts b/src/connectors/microsoft.excel/functions/select_worksheet_row.ts new file mode 100644 index 0000000..7754b30 --- /dev/null +++ b/src/connectors/microsoft.excel/functions/select_worksheet_row.ts @@ -0,0 +1,56 @@ +/** 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: "A05UVANN1S4#/functions/select_worksheet_row", + title: "Select a worksheet row", + description: "Select the first matched row in a worksheet", + input_parameters: { + properties: { + workbook: { + type: Schema.types.object, + description: "Select a workbook", + title: "Workbook", + }, + worksheet_name: { + type: Schema.types.string, + description: "Select a worksheet", + title: "Worksheet", + }, + column_name: { + type: Schema.types.string, + description: "Select a column", + title: "Choose a column to search", + }, + cell_value: { + type: Schema.types.string, + description: "Add a value", + title: "Cell value to find", + }, + excel_access_token: { + type: Schema.slack.types.oauth2, + description: "Access token for Microsoft Graph API", + title: "Microsoft excel access token", + }, + }, + required: [ + "workbook", + "worksheet_name", + "column_name", + "cell_value", + "excel_access_token", + ], + }, + output_parameters: { + properties: { + column_values: { type: Schema.types.object, title: "Column values" }, + row_index: { + type: Schema.types.string, + description: "Row index", + title: "Row index", + }, + }, + required: ["column_values", "row_index"], + }, +}); diff --git a/src/connectors/microsoft.excel/functions/select_worksheet_row_test.ts b/src/connectors/microsoft.excel/functions/select_worksheet_row_test.ts new file mode 100644 index 0000000..debe903 --- /dev/null +++ b/src/connectors/microsoft.excel/functions/select_worksheet_row_test.ts @@ -0,0 +1,49 @@ +/** 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 SelectWorksheetRow from "./select_worksheet_row.ts"; + +Deno.test("SelectWorksheetRow can be used as a Slack function in a workflow step", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_SelectWorksheetRow_slack_function", + title: "Test SelectWorksheetRow", + description: "This is a generated test to test SelectWorksheetRow", + }); + testWorkflow.addStep(SelectWorksheetRow, { + workbook: "test", + worksheet_name: "test", + column_name: "test", + cell_value: "test", + excel_access_token: "test", + }); + const actual = testWorkflow.steps[0].export(); + + assertEquals( + actual.function_id, + "A05UVANN1S4#/functions/select_worksheet_row", + ); + assertEquals(actual.inputs, { + workbook: "test", + worksheet_name: "test", + column_name: "test", + cell_value: "test", + excel_access_token: "test", + }); +}); + +Deno.test("All outputs of Slack function SelectWorksheetRow should exist", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_SelectWorksheetRow_slack_function", + title: "Test SelectWorksheetRow", + description: "This is a generated test to test SelectWorksheetRow", + }); + const step = testWorkflow.addStep(SelectWorksheetRow, { + workbook: "test", + worksheet_name: "test", + column_name: "test", + cell_value: "test", + excel_access_token: "test", + }); + assertExists(step.outputs.column_values); + assertExists(step.outputs.row_index); +}); diff --git a/src/connectors/microsoft.excel/functions/update_worksheet_row.ts b/src/connectors/microsoft.excel/functions/update_worksheet_row.ts new file mode 100644 index 0000000..292cf56 --- /dev/null +++ b/src/connectors/microsoft.excel/functions/update_worksheet_row.ts @@ -0,0 +1,68 @@ +/** 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: "A05UVANN1S4#/functions/update_worksheet_row", + title: "Update a worksheet", + description: "Update a row in a Microsoft workbook worksheet", + input_parameters: { + properties: { + workbook: { + type: Schema.types.object, + description: "Select a workbook", + title: "Workbook", + }, + worksheet_name: { + type: Schema.types.string, + description: "Select a worksheet", + title: "Worksheet", + }, + column_name: { + type: Schema.types.string, + description: "Select a column", + title: "Choose a column to search", + }, + cell_value: { + type: Schema.types.string, + description: "Add a value", + title: "Cell value to find", + }, + excel_access_token: { + type: Schema.slack.types.oauth2, + description: "Access token for Microsoft Graph API", + title: "Microsoft excel access token", + }, + updated_values: { type: Schema.types.object, title: "Updated Values" }, + }, + required: [ + "workbook", + "worksheet_name", + "column_name", + "cell_value", + "excel_access_token", + "updated_values", + ], + }, + output_parameters: { + properties: { + worksheet_url: { + type: Schema.types.string, + description: "Worksheet URL", + title: "Worksheet URL", + }, + worksheet_name: { + type: Schema.types.string, + description: "Worksheet name", + title: "Worksheet name", + }, + row_id: { + type: Schema.types.string, + description: "Deleted row ID", + title: "Row ID", + }, + column_values: { type: Schema.types.object, title: "Column values" }, + }, + required: ["worksheet_url", "worksheet_name", "row_id", "column_values"], + }, +}); diff --git a/src/connectors/microsoft.excel/functions/update_worksheet_row_test.ts b/src/connectors/microsoft.excel/functions/update_worksheet_row_test.ts new file mode 100644 index 0000000..455b1f9 --- /dev/null +++ b/src/connectors/microsoft.excel/functions/update_worksheet_row_test.ts @@ -0,0 +1,54 @@ +/** 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 UpdateWorksheetRow from "./update_worksheet_row.ts"; + +Deno.test("UpdateWorksheetRow can be used as a Slack function in a workflow step", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_UpdateWorksheetRow_slack_function", + title: "Test UpdateWorksheetRow", + description: "This is a generated test to test UpdateWorksheetRow", + }); + testWorkflow.addStep(UpdateWorksheetRow, { + workbook: "test", + worksheet_name: "test", + column_name: "test", + cell_value: "test", + excel_access_token: "test", + updated_values: "test", + }); + const actual = testWorkflow.steps[0].export(); + + assertEquals( + actual.function_id, + "A05UVANN1S4#/functions/update_worksheet_row", + ); + assertEquals(actual.inputs, { + workbook: "test", + worksheet_name: "test", + column_name: "test", + cell_value: "test", + excel_access_token: "test", + updated_values: "test", + }); +}); + +Deno.test("All outputs of Slack function UpdateWorksheetRow should exist", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_UpdateWorksheetRow_slack_function", + title: "Test UpdateWorksheetRow", + description: "This is a generated test to test UpdateWorksheetRow", + }); + const step = testWorkflow.addStep(UpdateWorksheetRow, { + workbook: "test", + worksheet_name: "test", + column_name: "test", + cell_value: "test", + excel_access_token: "test", + updated_values: "test", + }); + assertExists(step.outputs.worksheet_url); + assertExists(step.outputs.worksheet_name); + assertExists(step.outputs.row_id); + assertExists(step.outputs.column_values); +}); diff --git a/src/connectors/microsoft.excel/mod.ts b/src/connectors/microsoft.excel/mod.ts new file mode 100644 index 0000000..4f705c8 --- /dev/null +++ b/src/connectors/microsoft.excel/mod.ts @@ -0,0 +1,28 @@ +/** This file was autogenerated. Follow the steps in src/schema/slack/functions/README.md to rebuild **/ +import AddWorksheetRow from "./functions/add_worksheet_row.ts"; +import DeleteWorksheetRow from "./functions/delete_worksheet_row.ts"; +import SelectWorksheetRow from "./functions/select_worksheet_row.ts"; +import UpdateWorksheetRow from "./functions/update_worksheet_row.ts"; + +const MicrosoftExcel = { + functions: { + /** + * @see The {@link https://api.slack.com/reference/connectors/microsoft.excel/add_worksheet_row AddWorksheetRow} documentation. + */ + AddWorksheetRow, + /** + * @see The {@link https://api.slack.com/reference/connectors/microsoft.excel/delete_worksheet_row DeleteWorksheetRow} documentation. + */ + DeleteWorksheetRow, + /** + * @see The {@link https://api.slack.com/reference/connectors/microsoft.excel/select_worksheet_row SelectWorksheetRow} documentation. + */ + SelectWorksheetRow, + /** + * @see The {@link https://api.slack.com/reference/connectors/microsoft.excel/update_worksheet_row UpdateWorksheetRow} documentation. + */ + UpdateWorksheetRow, + }, +} as const; + +export default MicrosoftExcel; diff --git a/src/connectors/microsoft.onenote/functions/create_page.ts b/src/connectors/microsoft.onenote/functions/create_page.ts new file mode 100644 index 0000000..d36ac0e --- /dev/null +++ b/src/connectors/microsoft.onenote/functions/create_page.ts @@ -0,0 +1,36 @@ +/** 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: "A05UBDPKYP8#/functions/create_page", + title: "Create a page", + input_parameters: { + properties: { + microsoft_access_token: { + type: Schema.slack.types.oauth2, + description: "Microsoft credential to use", + title: "Microsoft access token", + }, + title: { + type: Schema.types.string, + description: "Enter title", + title: "Title", + }, + content: { + type: Schema.slack.types.rich_text, + description: "Enter content", + title: "Content", + }, + }, + required: ["microsoft_access_token", "title", "content"], + }, + output_parameters: { + properties: { + response_code: { type: Schema.types.string, title: "Response code" }, + title: { type: Schema.types.string, title: "Title" }, + onenote_web_url: { type: Schema.types.string, title: "Web URL" }, + }, + required: ["response_code", "title"], + }, +}); diff --git a/src/connectors/microsoft.onenote/functions/create_page_test.ts b/src/connectors/microsoft.onenote/functions/create_page_test.ts new file mode 100644 index 0000000..1786d07 --- /dev/null +++ b/src/connectors/microsoft.onenote/functions/create_page_test.ts @@ -0,0 +1,41 @@ +/** 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 CreatePage from "./create_page.ts"; + +Deno.test("CreatePage can be used as a Slack function in a workflow step", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_CreatePage_slack_function", + title: "Test CreatePage", + description: "This is a generated test to test CreatePage", + }); + testWorkflow.addStep(CreatePage, { + microsoft_access_token: "test", + title: "test", + content: "test", + }); + const actual = testWorkflow.steps[0].export(); + + assertEquals(actual.function_id, "A05UBDPKYP8#/functions/create_page"); + assertEquals(actual.inputs, { + microsoft_access_token: "test", + title: "test", + content: "test", + }); +}); + +Deno.test("All outputs of Slack function CreatePage should exist", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_CreatePage_slack_function", + title: "Test CreatePage", + description: "This is a generated test to test CreatePage", + }); + const step = testWorkflow.addStep(CreatePage, { + microsoft_access_token: "test", + title: "test", + content: "test", + }); + assertExists(step.outputs.response_code); + assertExists(step.outputs.title); + assertExists(step.outputs.onenote_web_url); +}); diff --git a/src/connectors/microsoft.onenote/functions/update_page.ts b/src/connectors/microsoft.onenote/functions/update_page.ts new file mode 100644 index 0000000..9fd8051 --- /dev/null +++ b/src/connectors/microsoft.onenote/functions/update_page.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: "A05UBDPKYP8#/functions/update_page", + title: "Update a page", + input_parameters: { + properties: { + page_id: { + type: Schema.types.string, + description: "Select page", + title: "Page", + }, + content: { + type: Schema.slack.types.rich_text, + description: "Enter content", + title: "Content", + }, + microsoft_access_token: { + type: Schema.slack.types.oauth2, + description: "Microsoft credential to use", + title: "Microsoft access token", + }, + }, + required: ["page_id", "content", "microsoft_access_token"], + }, + output_parameters: { + properties: { + response_code: { type: Schema.types.string, title: "Response code" }, + }, + required: ["response_code"], + }, +}); diff --git a/src/connectors/microsoft.onenote/functions/update_page_test.ts b/src/connectors/microsoft.onenote/functions/update_page_test.ts new file mode 100644 index 0000000..6ab741e --- /dev/null +++ b/src/connectors/microsoft.onenote/functions/update_page_test.ts @@ -0,0 +1,39 @@ +/** 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 UpdatePage from "./update_page.ts"; + +Deno.test("UpdatePage can be used as a Slack function in a workflow step", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_UpdatePage_slack_function", + title: "Test UpdatePage", + description: "This is a generated test to test UpdatePage", + }); + testWorkflow.addStep(UpdatePage, { + page_id: "test", + content: "test", + microsoft_access_token: "test", + }); + const actual = testWorkflow.steps[0].export(); + + assertEquals(actual.function_id, "A05UBDPKYP8#/functions/update_page"); + assertEquals(actual.inputs, { + page_id: "test", + content: "test", + microsoft_access_token: "test", + }); +}); + +Deno.test("All outputs of Slack function UpdatePage should exist", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_UpdatePage_slack_function", + title: "Test UpdatePage", + description: "This is a generated test to test UpdatePage", + }); + const step = testWorkflow.addStep(UpdatePage, { + page_id: "test", + content: "test", + microsoft_access_token: "test", + }); + assertExists(step.outputs.response_code); +}); diff --git a/src/connectors/microsoft.onenote/mod.ts b/src/connectors/microsoft.onenote/mod.ts new file mode 100644 index 0000000..53912e9 --- /dev/null +++ b/src/connectors/microsoft.onenote/mod.ts @@ -0,0 +1,18 @@ +/** This file was autogenerated. Follow the steps in src/schema/slack/functions/README.md to rebuild **/ +import CreatePage from "./functions/create_page.ts"; +import UpdatePage from "./functions/update_page.ts"; + +const MicrosoftOnenote = { + functions: { + /** + * @see The {@link https://api.slack.com/reference/connectors/microsoft.onenote/create_page CreatePage} documentation. + */ + CreatePage, + /** + * @see The {@link https://api.slack.com/reference/connectors/microsoft.onenote/update_page UpdatePage} documentation. + */ + UpdatePage, + }, +} as const; + +export default MicrosoftOnenote; diff --git a/src/connectors/mod.ts b/src/connectors/mod.ts index 499ef1d..cce7a11 100644 --- a/src/connectors/mod.ts +++ b/src/connectors/mod.ts @@ -1,10 +1,17 @@ -/** This file was autogenerated on Mon Dec 18 2023. Follow the steps in src/schema/slack/functions/README.md to rebuild **/ +/** This file was autogenerated on Tue Dec 19 2023. Follow the steps in src/schema/slack/functions/README.md to rebuild **/ +import Airtable from "./airtable/mod.ts"; import Asana from "./asana/mod.ts"; import AtlassianBitbucket from "./atlassian.bitbucket/mod.ts"; +import Basecamp from "./basecamp/mod.ts"; +import BoxCore from "./box.core/mod.ts"; +import BoxSign from "./box.sign/mod.ts"; import Calendly from "./calendly/mod.ts"; import Clickup from "./clickup/mod.ts"; import Deel from "./deel/mod.ts"; +import Dialpad from "./dialpad/mod.ts"; import Docusign from "./docusign/mod.ts"; +import DropboxCore from "./dropbox.core/mod.ts"; +import DropboxSign from "./dropbox.sign/mod.ts"; import Firehydrant from "./firehydrant/mod.ts"; import Giphy from "./giphy/mod.ts"; import GithubCloud from "./github.cloud/mod.ts"; @@ -16,21 +23,26 @@ import GoogleMeet from "./google.meet/mod.ts"; import GoogleSheets from "./google.sheets/mod.ts"; import GoogleTasks from "./google.tasks/mod.ts"; import GreenhouseOnboarding from "./greenhouse.onboarding/mod.ts"; +import GreenhouseRecruiting from "./greenhouse.recruiting/mod.ts"; import Guru from "./guru/mod.ts"; import Intercom from "./intercom/mod.ts"; import JiraCloud from "./jira.cloud/mod.ts"; +import Launchdarkly from "./launchdarkly/mod.ts"; import Lever from "./lever/mod.ts"; import Linear from "./linear/mod.ts"; import Loopio from "./loopio/mod.ts"; import Lucid from "./lucid/mod.ts"; import Mailchimp from "./mailchimp/mod.ts"; +import MicrosoftExcel from "./microsoft.excel/mod.ts"; import MicrosoftOnedrive from "./microsoft.onedrive/mod.ts"; +import MicrosoftOnenote from "./microsoft.onenote/mod.ts"; import MicrosoftOutlookCalendar from "./microsoft.outlook.calendar/mod.ts"; import MicrosoftOutlookEmail from "./microsoft.outlook.email/mod.ts"; import MicrosoftTeams from "./microsoft.teams/mod.ts"; import Miro from "./miro/mod.ts"; import Notion from "./notion/mod.ts"; import Pagerduty from "./pagerduty/mod.ts"; +import Ramp from "./ramp/mod.ts"; import Ringcentral from "./ringcentral/mod.ts"; import Rootly from "./rootly/mod.ts"; import Salesforce from "./salesforce/mod.ts"; @@ -39,17 +51,26 @@ import Smartsheet from "./smartsheet/mod.ts"; import Synk from "./synk/mod.ts"; import Travisci from "./travisci/mod.ts"; import Twilio from "./twilio/mod.ts"; +import Typeform from "./typeform/mod.ts"; import Webex from "./webex/mod.ts"; +import Workast from "./workast/mod.ts"; import Wrike from "./wrike/mod.ts"; import Zoom from "./zoom/mod.ts"; const Connectors = { + Airtable, Asana, AtlassianBitbucket, + Basecamp, + BoxCore, + BoxSign, Calendly, Clickup, Deel, + Dialpad, Docusign, + DropboxCore, + DropboxSign, Firehydrant, Giphy, GithubCloud, @@ -61,21 +82,26 @@ const Connectors = { GoogleSheets, GoogleTasks, GreenhouseOnboarding, + GreenhouseRecruiting, Guru, Intercom, JiraCloud, + Launchdarkly, Lever, Linear, Loopio, Lucid, Mailchimp, + MicrosoftExcel, MicrosoftOnedrive, + MicrosoftOnenote, MicrosoftOutlookCalendar, MicrosoftOutlookEmail, MicrosoftTeams, Miro, Notion, Pagerduty, + Ramp, Ringcentral, Rootly, Salesforce, @@ -84,7 +110,9 @@ const Connectors = { Synk, Travisci, Twilio, + Typeform, Webex, + Workast, Wrike, Zoom, } as const; diff --git a/src/connectors/ramp/functions/create_physical_card.ts b/src/connectors/ramp/functions/create_physical_card.ts new file mode 100644 index 0000000..c1c3a2e --- /dev/null +++ b/src/connectors/ramp/functions/create_physical_card.ts @@ -0,0 +1,117 @@ +/** 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: "A066PC9JKJ7#/functions/create_physical_card", + title: "Create new physical card", + description: "Create an async task to request for new physical card.", + input_parameters: { + properties: { + user_id: { + type: Schema.types.string, + description: "Select a user", + title: "User", + }, + card_name: { + type: Schema.types.string, + description: "Enter text", + title: "Card name", + }, + address1: { + type: Schema.types.string, + description: "Enter text", + title: "Street address", + }, + address2: { + type: Schema.types.string, + description: "Enter text", + title: "Floor/Suite/Office", + }, + city: { + type: Schema.types.string, + description: "Enter text", + title: "City", + }, + country: { + type: Schema.types.string, + description: "Enter text", + title: "Country", + }, + first_name: { + type: Schema.types.string, + description: "Enter text", + title: "First name", + }, + last_name: { + type: Schema.types.string, + description: "Enter text", + title: "Last name", + }, + phone: { + type: Schema.types.string, + description: "Enter text", + title: "Phone number", + }, + postal_code: { + type: Schema.types.string, + description: "Enter text", + title: "Zip code", + }, + state: { + type: Schema.types.string, + description: "Enter text", + title: "State", + }, + amount_limit: { + type: Schema.types.number, + description: "Enter amount", + title: "Amount", + }, + interval: { + type: Schema.types.string, + description: "Select an option", + title: "Frequency", + enum: [ + "ANNUAL", + "DAILY", + "MONTHLY", + "QUARTERLY", + "TERTIARY", + "TOTAL", + "WEEKLY", + "YEARLY", + ], + }, + ramp_access_token: { + type: Schema.slack.types.oauth2, + description: "Ramp Credential to use", + title: "Ramp access token", + }, + }, + required: [ + "user_id", + "card_name", + "address1", + "city", + "country", + "first_name", + "last_name", + "postal_code", + "state", + "amount_limit", + "interval", + "ramp_access_token", + ], + }, + output_parameters: { + properties: { + user_id: { type: Schema.types.string, title: "User ID" }, + deferred_task_id: { + type: Schema.types.string, + title: "Deferred task ID", + }, + }, + required: ["user_id", "deferred_task_id"], + }, +}); diff --git a/src/connectors/ramp/functions/create_physical_card_test.ts b/src/connectors/ramp/functions/create_physical_card_test.ts new file mode 100644 index 0000000..433d2ca --- /dev/null +++ b/src/connectors/ramp/functions/create_physical_card_test.ts @@ -0,0 +1,70 @@ +/** 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 CreatePhysicalCard from "./create_physical_card.ts"; + +Deno.test("CreatePhysicalCard can be used as a Slack function in a workflow step", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_CreatePhysicalCard_slack_function", + title: "Test CreatePhysicalCard", + description: "This is a generated test to test CreatePhysicalCard", + }); + testWorkflow.addStep(CreatePhysicalCard, { + user_id: "test", + card_name: "test", + address1: "test", + city: "test", + country: "test", + first_name: "test", + last_name: "test", + postal_code: "test", + state: "test", + amount_limit: "test", + interval: "test", + ramp_access_token: "test", + }); + const actual = testWorkflow.steps[0].export(); + + assertEquals( + actual.function_id, + "A066PC9JKJ7#/functions/create_physical_card", + ); + assertEquals(actual.inputs, { + user_id: "test", + card_name: "test", + address1: "test", + city: "test", + country: "test", + first_name: "test", + last_name: "test", + postal_code: "test", + state: "test", + amount_limit: "test", + interval: "test", + ramp_access_token: "test", + }); +}); + +Deno.test("All outputs of Slack function CreatePhysicalCard should exist", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_CreatePhysicalCard_slack_function", + title: "Test CreatePhysicalCard", + description: "This is a generated test to test CreatePhysicalCard", + }); + const step = testWorkflow.addStep(CreatePhysicalCard, { + user_id: "test", + card_name: "test", + address1: "test", + city: "test", + country: "test", + first_name: "test", + last_name: "test", + postal_code: "test", + state: "test", + amount_limit: "test", + interval: "test", + ramp_access_token: "test", + }); + assertExists(step.outputs.user_id); + assertExists(step.outputs.deferred_task_id); +}); diff --git a/src/connectors/ramp/functions/create_spend_request.ts b/src/connectors/ramp/functions/create_spend_request.ts new file mode 100644 index 0000000..dbdaf4a --- /dev/null +++ b/src/connectors/ramp/functions/create_spend_request.ts @@ -0,0 +1,95 @@ +/** 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: "A066PC9JKJ7#/functions/create_spend_request", + title: "Create spend request", + input_parameters: { + properties: { + display_name: { + type: Schema.types.string, + description: "Enter text", + title: "Display name", + }, + description: { + type: Schema.types.string, + description: "Enter text", + title: "Description", + }, + icon: { + type: Schema.types.string, + title: "Template icon", + enum: [ + "AdvertisingIcon", + "CardIcon", + "EducationStipendIcon", + "LunchOrderingIcon", + "OnboardingIcon", + "PerDiemCardIcon", + "SaasSubscriptionIcon", + "SoftwareTrialIcon", + "TravelExpensesIcon", + "WellnessIcon", + ], + }, + primary_card_enabled: { + type: Schema.types.boolean, + title: "Allow spending with physical card", + }, + reimbursements_enabled: { + type: Schema.types.boolean, + title: "Allow spending through reimbursement", + }, + issue_physical_card_if_needed: { + type: Schema.types.boolean, + title: "Issue physical card if employee doesn’t have one", + }, + amount_limit: { + type: Schema.types.number, + description: "Enter amount", + title: "Amount", + }, + interval: { + type: Schema.types.string, + description: "Select an interval", + title: "Interval", + enum: [ + "ANNUAL", + "DAILY", + "MONTHLY", + "QUARTERLY", + "TERTIARY", + "TOTAL", + "WEEKLY", + "YEARLY", + ], + }, + ramp_access_token: { + type: Schema.slack.types.oauth2, + description: "Ramp Credential to use", + title: "Ramp access token", + }, + }, + required: [ + "display_name", + "description", + "icon", + "primary_card_enabled", + "reimbursements_enabled", + "amount_limit", + "interval", + "ramp_access_token", + ], + }, + output_parameters: { + properties: { + spend_id: { type: Schema.types.string, title: "Spend ID" }, + spend_program_url: { + type: Schema.types.string, + title: "Spend program url", + }, + }, + required: ["spend_id", "spend_program_url"], + }, +}); diff --git a/src/connectors/ramp/functions/create_spend_request_test.ts b/src/connectors/ramp/functions/create_spend_request_test.ts new file mode 100644 index 0000000..099ab58 --- /dev/null +++ b/src/connectors/ramp/functions/create_spend_request_test.ts @@ -0,0 +1,58 @@ +/** 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 CreateSpendRequest from "./create_spend_request.ts"; + +Deno.test("CreateSpendRequest can be used as a Slack function in a workflow step", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_CreateSpendRequest_slack_function", + title: "Test CreateSpendRequest", + description: "This is a generated test to test CreateSpendRequest", + }); + testWorkflow.addStep(CreateSpendRequest, { + display_name: "test", + description: "test", + icon: "test", + primary_card_enabled: "test", + reimbursements_enabled: "test", + amount_limit: "test", + interval: "test", + ramp_access_token: "test", + }); + const actual = testWorkflow.steps[0].export(); + + assertEquals( + actual.function_id, + "A066PC9JKJ7#/functions/create_spend_request", + ); + assertEquals(actual.inputs, { + display_name: "test", + description: "test", + icon: "test", + primary_card_enabled: "test", + reimbursements_enabled: "test", + amount_limit: "test", + interval: "test", + ramp_access_token: "test", + }); +}); + +Deno.test("All outputs of Slack function CreateSpendRequest should exist", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_CreateSpendRequest_slack_function", + title: "Test CreateSpendRequest", + description: "This is a generated test to test CreateSpendRequest", + }); + const step = testWorkflow.addStep(CreateSpendRequest, { + display_name: "test", + description: "test", + icon: "test", + primary_card_enabled: "test", + reimbursements_enabled: "test", + amount_limit: "test", + interval: "test", + ramp_access_token: "test", + }); + assertExists(step.outputs.spend_id); + assertExists(step.outputs.spend_program_url); +}); diff --git a/src/connectors/ramp/functions/create_virtual_card.ts b/src/connectors/ramp/functions/create_virtual_card.ts new file mode 100644 index 0000000..bb9b9e9 --- /dev/null +++ b/src/connectors/ramp/functions/create_virtual_card.ts @@ -0,0 +1,65 @@ +/** 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: "A066PC9JKJ7#/functions/create_virtual_card", + title: "Create new virtual card", + description: "Create an async task to request for new virtual card.", + input_parameters: { + properties: { + user_id: { + type: Schema.types.string, + description: "Select a user", + title: "User", + }, + card_name: { + type: Schema.types.string, + description: "Enter text", + title: "Card name", + }, + amount_limit: { + type: Schema.types.number, + description: "Enter amount", + title: "Amount", + }, + interval: { + type: Schema.types.string, + description: "Select an option", + title: "Frequency", + enum: [ + "ANNUAL", + "DAILY", + "MONTHLY", + "QUARTERLY", + "TERTIARY", + "TOTAL", + "WEEKLY", + "YEARLY", + ], + }, + ramp_access_token: { + type: Schema.slack.types.oauth2, + description: "Ramp Credential to use", + title: "Ramp access token", + }, + }, + required: [ + "user_id", + "card_name", + "amount_limit", + "interval", + "ramp_access_token", + ], + }, + output_parameters: { + properties: { + user_id: { type: Schema.types.string, title: "User ID" }, + deferred_task_id: { + type: Schema.types.string, + title: "Deferred task ID", + }, + }, + required: ["user_id", "deferred_task_id"], + }, +}); diff --git a/src/connectors/ramp/functions/create_virtual_card_test.ts b/src/connectors/ramp/functions/create_virtual_card_test.ts new file mode 100644 index 0000000..91d45e3 --- /dev/null +++ b/src/connectors/ramp/functions/create_virtual_card_test.ts @@ -0,0 +1,49 @@ +/** 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 CreateVirtualCard from "./create_virtual_card.ts"; + +Deno.test("CreateVirtualCard can be used as a Slack function in a workflow step", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_CreateVirtualCard_slack_function", + title: "Test CreateVirtualCard", + description: "This is a generated test to test CreateVirtualCard", + }); + testWorkflow.addStep(CreateVirtualCard, { + user_id: "test", + card_name: "test", + amount_limit: "test", + interval: "test", + ramp_access_token: "test", + }); + const actual = testWorkflow.steps[0].export(); + + assertEquals( + actual.function_id, + "A066PC9JKJ7#/functions/create_virtual_card", + ); + assertEquals(actual.inputs, { + user_id: "test", + card_name: "test", + amount_limit: "test", + interval: "test", + ramp_access_token: "test", + }); +}); + +Deno.test("All outputs of Slack function CreateVirtualCard should exist", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_CreateVirtualCard_slack_function", + title: "Test CreateVirtualCard", + description: "This is a generated test to test CreateVirtualCard", + }); + const step = testWorkflow.addStep(CreateVirtualCard, { + user_id: "test", + card_name: "test", + amount_limit: "test", + interval: "test", + ramp_access_token: "test", + }); + assertExists(step.outputs.user_id); + assertExists(step.outputs.deferred_task_id); +}); diff --git a/src/connectors/ramp/functions/get_spend_request.ts b/src/connectors/ramp/functions/get_spend_request.ts new file mode 100644 index 0000000..4c51b39 --- /dev/null +++ b/src/connectors/ramp/functions/get_spend_request.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: "A066PC9JKJ7#/functions/get_spend_request", + title: "Get a spend request", + input_parameters: { + properties: { + spend_request_id: { + type: Schema.types.string, + description: "Select a spend request", + title: "Spend request", + }, + ramp_access_token: { + type: Schema.slack.types.oauth2, + description: "Ramp Credential to use", + title: "Ramp access token", + }, + }, + required: ["spend_request_id", "ramp_access_token"], + }, + output_parameters: { + properties: { + id: { type: Schema.types.string, title: "Spend request ID" }, + display_name: { type: Schema.types.string, title: "Display name" }, + description: { type: Schema.types.string, title: "Description" }, + icon: { type: Schema.types.string, title: "Icon" }, + interval: { type: Schema.types.string, title: "Interval" }, + amount_limit: { type: Schema.types.number, title: "Amount limit" }, + }, + required: [], + }, +}); diff --git a/src/connectors/ramp/functions/get_spend_request_test.ts b/src/connectors/ramp/functions/get_spend_request_test.ts new file mode 100644 index 0000000..2fc7dd8 --- /dev/null +++ b/src/connectors/ramp/functions/get_spend_request_test.ts @@ -0,0 +1,41 @@ +/** 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 GetSpendRequest from "./get_spend_request.ts"; + +Deno.test("GetSpendRequest can be used as a Slack function in a workflow step", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_GetSpendRequest_slack_function", + title: "Test GetSpendRequest", + description: "This is a generated test to test GetSpendRequest", + }); + testWorkflow.addStep(GetSpendRequest, { + spend_request_id: "test", + ramp_access_token: "test", + }); + const actual = testWorkflow.steps[0].export(); + + assertEquals(actual.function_id, "A066PC9JKJ7#/functions/get_spend_request"); + assertEquals(actual.inputs, { + spend_request_id: "test", + ramp_access_token: "test", + }); +}); + +Deno.test("All outputs of Slack function GetSpendRequest should exist", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_GetSpendRequest_slack_function", + title: "Test GetSpendRequest", + description: "This is a generated test to test GetSpendRequest", + }); + const step = testWorkflow.addStep(GetSpendRequest, { + spend_request_id: "test", + ramp_access_token: "test", + }); + assertExists(step.outputs.id); + assertExists(step.outputs.display_name); + assertExists(step.outputs.description); + assertExists(step.outputs.icon); + assertExists(step.outputs.interval); + assertExists(step.outputs.amount_limit); +}); diff --git a/src/connectors/ramp/functions/suspend_card.ts b/src/connectors/ramp/functions/suspend_card.ts new file mode 100644 index 0000000..f09e8fc --- /dev/null +++ b/src/connectors/ramp/functions/suspend_card.ts @@ -0,0 +1,39 @@ +/** 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: "A066PC9JKJ7#/functions/suspend_card", + title: "Suspend a card", + description: + "Suspend a card so that it is locked from use. This action is reversible.", + input_parameters: { + properties: { + user_id: { + type: Schema.types.string, + description: "Select a user", + title: "User", + }, + card_id: { + type: Schema.types.string, + description: "Select a card", + title: "Card", + }, + ramp_access_token: { + type: Schema.slack.types.oauth2, + description: "Ramp Credential to use", + title: "Ramp access token", + }, + }, + required: ["user_id", "card_id", "ramp_access_token"], + }, + output_parameters: { + properties: { + deferred_task_id: { + type: Schema.types.string, + title: "Deferred task ID", + }, + }, + required: ["deferred_task_id"], + }, +}); diff --git a/src/connectors/ramp/functions/suspend_card_test.ts b/src/connectors/ramp/functions/suspend_card_test.ts new file mode 100644 index 0000000..0a84066 --- /dev/null +++ b/src/connectors/ramp/functions/suspend_card_test.ts @@ -0,0 +1,39 @@ +/** 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 SuspendCard from "./suspend_card.ts"; + +Deno.test("SuspendCard can be used as a Slack function in a workflow step", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_SuspendCard_slack_function", + title: "Test SuspendCard", + description: "This is a generated test to test SuspendCard", + }); + testWorkflow.addStep(SuspendCard, { + user_id: "test", + card_id: "test", + ramp_access_token: "test", + }); + const actual = testWorkflow.steps[0].export(); + + assertEquals(actual.function_id, "A066PC9JKJ7#/functions/suspend_card"); + assertEquals(actual.inputs, { + user_id: "test", + card_id: "test", + ramp_access_token: "test", + }); +}); + +Deno.test("All outputs of Slack function SuspendCard should exist", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_SuspendCard_slack_function", + title: "Test SuspendCard", + description: "This is a generated test to test SuspendCard", + }); + const step = testWorkflow.addStep(SuspendCard, { + user_id: "test", + card_id: "test", + ramp_access_token: "test", + }); + assertExists(step.outputs.deferred_task_id); +}); diff --git a/src/connectors/ramp/functions/terminate_card.ts b/src/connectors/ramp/functions/terminate_card.ts new file mode 100644 index 0000000..23eca0d --- /dev/null +++ b/src/connectors/ramp/functions/terminate_card.ts @@ -0,0 +1,38 @@ +/** 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: "A066PC9JKJ7#/functions/terminate_card", + title: "Terminate a card", + description: "Terminate a card permanently. This action is irreversible.", + input_parameters: { + properties: { + user_id: { + type: Schema.types.string, + description: "Select a user", + title: "User", + }, + card_id: { + type: Schema.types.string, + description: "Select a card", + title: "Card", + }, + ramp_access_token: { + type: Schema.slack.types.oauth2, + description: "Ramp Credential to use", + title: "Ramp access token", + }, + }, + required: ["user_id", "card_id", "ramp_access_token"], + }, + output_parameters: { + properties: { + deferred_task_id: { + type: Schema.types.string, + title: "Deferred task ID", + }, + }, + required: ["deferred_task_id"], + }, +}); diff --git a/src/connectors/ramp/functions/terminate_card_test.ts b/src/connectors/ramp/functions/terminate_card_test.ts new file mode 100644 index 0000000..db403c1 --- /dev/null +++ b/src/connectors/ramp/functions/terminate_card_test.ts @@ -0,0 +1,39 @@ +/** 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 TerminateCard from "./terminate_card.ts"; + +Deno.test("TerminateCard can be used as a Slack function in a workflow step", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_TerminateCard_slack_function", + title: "Test TerminateCard", + description: "This is a generated test to test TerminateCard", + }); + testWorkflow.addStep(TerminateCard, { + user_id: "test", + card_id: "test", + ramp_access_token: "test", + }); + const actual = testWorkflow.steps[0].export(); + + assertEquals(actual.function_id, "A066PC9JKJ7#/functions/terminate_card"); + assertEquals(actual.inputs, { + user_id: "test", + card_id: "test", + ramp_access_token: "test", + }); +}); + +Deno.test("All outputs of Slack function TerminateCard should exist", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_TerminateCard_slack_function", + title: "Test TerminateCard", + description: "This is a generated test to test TerminateCard", + }); + const step = testWorkflow.addStep(TerminateCard, { + user_id: "test", + card_id: "test", + ramp_access_token: "test", + }); + assertExists(step.outputs.deferred_task_id); +}); diff --git a/src/connectors/ramp/functions/unlock_card.ts b/src/connectors/ramp/functions/unlock_card.ts new file mode 100644 index 0000000..f7a5188 --- /dev/null +++ b/src/connectors/ramp/functions/unlock_card.ts @@ -0,0 +1,38 @@ +/** 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: "A066PC9JKJ7#/functions/unlock_card", + title: "Unlock a card", + description: "Remove a card's suspension so that it may be used again.", + input_parameters: { + properties: { + user_id: { + type: Schema.types.string, + description: "Select a user", + title: "User", + }, + card_id: { + type: Schema.types.string, + description: "Select a card", + title: "Card", + }, + ramp_access_token: { + type: Schema.slack.types.oauth2, + description: "Ramp Credential to use", + title: "Ramp access token", + }, + }, + required: ["user_id", "card_id", "ramp_access_token"], + }, + output_parameters: { + properties: { + deferred_task_id: { + type: Schema.types.string, + title: "Deferred task ID", + }, + }, + required: ["deferred_task_id"], + }, +}); diff --git a/src/connectors/ramp/functions/unlock_card_test.ts b/src/connectors/ramp/functions/unlock_card_test.ts new file mode 100644 index 0000000..6a825cb --- /dev/null +++ b/src/connectors/ramp/functions/unlock_card_test.ts @@ -0,0 +1,39 @@ +/** 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 UnlockCard from "./unlock_card.ts"; + +Deno.test("UnlockCard can be used as a Slack function in a workflow step", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_UnlockCard_slack_function", + title: "Test UnlockCard", + description: "This is a generated test to test UnlockCard", + }); + testWorkflow.addStep(UnlockCard, { + user_id: "test", + card_id: "test", + ramp_access_token: "test", + }); + const actual = testWorkflow.steps[0].export(); + + assertEquals(actual.function_id, "A066PC9JKJ7#/functions/unlock_card"); + assertEquals(actual.inputs, { + user_id: "test", + card_id: "test", + ramp_access_token: "test", + }); +}); + +Deno.test("All outputs of Slack function UnlockCard should exist", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_UnlockCard_slack_function", + title: "Test UnlockCard", + description: "This is a generated test to test UnlockCard", + }); + const step = testWorkflow.addStep(UnlockCard, { + user_id: "test", + card_id: "test", + ramp_access_token: "test", + }); + assertExists(step.outputs.deferred_task_id); +}); diff --git a/src/connectors/ramp/mod.ts b/src/connectors/ramp/mod.ts new file mode 100644 index 0000000..98eccdc --- /dev/null +++ b/src/connectors/ramp/mod.ts @@ -0,0 +1,43 @@ +/** This file was autogenerated. Follow the steps in src/schema/slack/functions/README.md to rebuild **/ +import CreatePhysicalCard from "./functions/create_physical_card.ts"; +import CreateSpendRequest from "./functions/create_spend_request.ts"; +import CreateVirtualCard from "./functions/create_virtual_card.ts"; +import GetSpendRequest from "./functions/get_spend_request.ts"; +import SuspendCard from "./functions/suspend_card.ts"; +import TerminateCard from "./functions/terminate_card.ts"; +import UnlockCard from "./functions/unlock_card.ts"; + +const Ramp = { + functions: { + /** + * @see The {@link https://api.slack.com/reference/connectors/ramp/create_physical_card CreatePhysicalCard} documentation. + */ + CreatePhysicalCard, + /** + * @see The {@link https://api.slack.com/reference/connectors/ramp/create_spend_request CreateSpendRequest} documentation. + */ + CreateSpendRequest, + /** + * @see The {@link https://api.slack.com/reference/connectors/ramp/create_virtual_card CreateVirtualCard} documentation. + */ + CreateVirtualCard, + /** + * @see The {@link https://api.slack.com/reference/connectors/ramp/get_spend_request GetSpendRequest} documentation. + */ + GetSpendRequest, + /** + * @see The {@link https://api.slack.com/reference/connectors/ramp/suspend_card SuspendCard} documentation. + */ + SuspendCard, + /** + * @see The {@link https://api.slack.com/reference/connectors/ramp/terminate_card TerminateCard} documentation. + */ + TerminateCard, + /** + * @see The {@link https://api.slack.com/reference/connectors/ramp/unlock_card UnlockCard} documentation. + */ + UnlockCard, + }, +} as const; + +export default Ramp; diff --git a/src/connectors/typeform/functions/create_workspace.ts b/src/connectors/typeform/functions/create_workspace.ts new file mode 100644 index 0000000..b1b032d --- /dev/null +++ b/src/connectors/typeform/functions/create_workspace.ts @@ -0,0 +1,30 @@ +/** 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: "A05T70HT5E1#/functions/create_workspace", + title: "Create a workspace", + input_parameters: { + properties: { + workspace_name: { + type: Schema.types.string, + description: "Enter text", + title: "Workspace name", + }, + typeform_access_token: { + type: Schema.slack.types.oauth2, + title: "Typeform access token", + }, + }, + required: ["workspace_name", "typeform_access_token"], + }, + output_parameters: { + properties: { + workspace_url: { type: Schema.types.string, title: "Workspace URL" }, + workspace_id: { type: Schema.types.string, title: "Workspace ID" }, + workspace_name: { type: Schema.types.string, title: "Workspace name" }, + }, + required: ["workspace_url", "workspace_id", "workspace_name"], + }, +}); diff --git a/src/connectors/typeform/functions/create_workspace_test.ts b/src/connectors/typeform/functions/create_workspace_test.ts new file mode 100644 index 0000000..48e476d --- /dev/null +++ b/src/connectors/typeform/functions/create_workspace_test.ts @@ -0,0 +1,38 @@ +/** 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 CreateWorkspace from "./create_workspace.ts"; + +Deno.test("CreateWorkspace can be used as a Slack function in a workflow step", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_CreateWorkspace_slack_function", + title: "Test CreateWorkspace", + description: "This is a generated test to test CreateWorkspace", + }); + testWorkflow.addStep(CreateWorkspace, { + workspace_name: "test", + typeform_access_token: "test", + }); + const actual = testWorkflow.steps[0].export(); + + assertEquals(actual.function_id, "A05T70HT5E1#/functions/create_workspace"); + assertEquals(actual.inputs, { + workspace_name: "test", + typeform_access_token: "test", + }); +}); + +Deno.test("All outputs of Slack function CreateWorkspace should exist", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_CreateWorkspace_slack_function", + title: "Test CreateWorkspace", + description: "This is a generated test to test CreateWorkspace", + }); + const step = testWorkflow.addStep(CreateWorkspace, { + workspace_name: "test", + typeform_access_token: "test", + }); + assertExists(step.outputs.workspace_url); + assertExists(step.outputs.workspace_id); + assertExists(step.outputs.workspace_name); +}); diff --git a/src/connectors/typeform/functions/duplicate_form.ts b/src/connectors/typeform/functions/duplicate_form.ts new file mode 100644 index 0000000..7e117bd --- /dev/null +++ b/src/connectors/typeform/functions/duplicate_form.ts @@ -0,0 +1,41 @@ +/** 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: "A05T70HT5E1#/functions/duplicate_form", + title: "Duplicate an existing form", + description: "Creates copy of a form with updated title", + input_parameters: { + properties: { + form_id: { + type: Schema.types.string, + description: "Select a form", + title: "Form to duplicate", + }, + form_title: { + type: Schema.types.string, + description: "Enter text", + title: "Name for new form", + }, + workspace: { + type: Schema.types.string, + description: "Select a workspace", + title: "Workspace", + }, + typeform_access_token: { + type: Schema.slack.types.oauth2, + title: "Typeform access token", + }, + }, + required: ["form_id", "form_title", "typeform_access_token"], + }, + output_parameters: { + properties: { + form_id: { type: Schema.types.string, title: "Form ID" }, + form_title: { type: Schema.types.string, title: "Form name" }, + form_url: { type: Schema.types.string, title: "Form display URL" }, + }, + required: [], + }, +}); diff --git a/src/connectors/typeform/functions/duplicate_form_test.ts b/src/connectors/typeform/functions/duplicate_form_test.ts new file mode 100644 index 0000000..200af6b --- /dev/null +++ b/src/connectors/typeform/functions/duplicate_form_test.ts @@ -0,0 +1,41 @@ +/** 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 DuplicateForm from "./duplicate_form.ts"; + +Deno.test("DuplicateForm can be used as a Slack function in a workflow step", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_DuplicateForm_slack_function", + title: "Test DuplicateForm", + description: "This is a generated test to test DuplicateForm", + }); + testWorkflow.addStep(DuplicateForm, { + form_id: "test", + form_title: "test", + typeform_access_token: "test", + }); + const actual = testWorkflow.steps[0].export(); + + assertEquals(actual.function_id, "A05T70HT5E1#/functions/duplicate_form"); + assertEquals(actual.inputs, { + form_id: "test", + form_title: "test", + typeform_access_token: "test", + }); +}); + +Deno.test("All outputs of Slack function DuplicateForm should exist", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_DuplicateForm_slack_function", + title: "Test DuplicateForm", + description: "This is a generated test to test DuplicateForm", + }); + const step = testWorkflow.addStep(DuplicateForm, { + form_id: "test", + form_title: "test", + typeform_access_token: "test", + }); + assertExists(step.outputs.form_id); + assertExists(step.outputs.form_title); + assertExists(step.outputs.form_url); +}); diff --git a/src/connectors/typeform/functions/get_form.ts b/src/connectors/typeform/functions/get_form.ts new file mode 100644 index 0000000..e47d31c --- /dev/null +++ b/src/connectors/typeform/functions/get_form.ts @@ -0,0 +1,36 @@ +/** 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: "A05T70HT5E1#/functions/get_form", + title: "Get a form", + input_parameters: { + properties: { + form_id: { + type: Schema.types.string, + description: "Select a form", + title: "Select a form", + }, + typeform_access_token: { + type: Schema.slack.types.oauth2, + title: "Typeform access token", + }, + }, + required: ["form_id", "typeform_access_token"], + }, + output_parameters: { + properties: { + form: { type: Schema.types.object, title: "Form" }, + form_id: { type: Schema.types.string, title: "Form ID" }, + form_title: { type: Schema.types.string, title: "Form name" }, + form_url: { type: Schema.types.string, title: "Form display URL" }, + form_fields: { + type: Schema.types.array, + title: "Form fields", + items: { type: undefined }, + }, + }, + required: [], + }, +}); diff --git a/src/connectors/typeform/functions/get_form_insights.ts b/src/connectors/typeform/functions/get_form_insights.ts new file mode 100644 index 0000000..b4d2f1f --- /dev/null +++ b/src/connectors/typeform/functions/get_form_insights.ts @@ -0,0 +1,55 @@ +/** 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: "A05T70HT5E1#/functions/get_form_insights", + title: "Get form insights", + description: "Retrieve form summary (works with Buisness or higher plans)", + input_parameters: { + properties: { + form_id: { + type: Schema.types.string, + description: "Select a form", + title: "Select a form", + }, + typeform_access_token: { + type: Schema.slack.types.oauth2, + title: "Typeform access token", + }, + }, + required: ["form_id", "typeform_access_token"], + }, + output_parameters: { + properties: { + summary: { + type: Schema.types.object, + title: "Form summary", + properties: { + average_time: { type: Schema.types.string, title: "Average time" }, + total_visits: { type: Schema.types.string, title: "Total visits" }, + unique_visits: { type: Schema.types.string, title: "Unique visits" }, + completion_rate: { + type: Schema.types.string, + title: "Completion rate", + }, + responses_count: { + type: Schema.types.string, + title: "Response count", + }, + }, + additionalProperties: true, + required: [], + }, + views_per_question: { + type: Schema.types.object, + title: "Views per question", + }, + dropoffs_per_question: { + type: Schema.types.object, + title: "Drop-offs per question", + }, + }, + required: [], + }, +}); diff --git a/src/connectors/typeform/functions/get_form_insights_test.ts b/src/connectors/typeform/functions/get_form_insights_test.ts new file mode 100644 index 0000000..f314c60 --- /dev/null +++ b/src/connectors/typeform/functions/get_form_insights_test.ts @@ -0,0 +1,38 @@ +/** 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 GetFormInsights from "./get_form_insights.ts"; + +Deno.test("GetFormInsights can be used as a Slack function in a workflow step", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_GetFormInsights_slack_function", + title: "Test GetFormInsights", + description: "This is a generated test to test GetFormInsights", + }); + testWorkflow.addStep(GetFormInsights, { + form_id: "test", + typeform_access_token: "test", + }); + const actual = testWorkflow.steps[0].export(); + + assertEquals(actual.function_id, "A05T70HT5E1#/functions/get_form_insights"); + assertEquals(actual.inputs, { + form_id: "test", + typeform_access_token: "test", + }); +}); + +Deno.test("All outputs of Slack function GetFormInsights should exist", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_GetFormInsights_slack_function", + title: "Test GetFormInsights", + description: "This is a generated test to test GetFormInsights", + }); + const step = testWorkflow.addStep(GetFormInsights, { + form_id: "test", + typeform_access_token: "test", + }); + assertExists(step.outputs.summary); + assertExists(step.outputs.views_per_question); + assertExists(step.outputs.dropoffs_per_question); +}); diff --git a/src/connectors/typeform/functions/get_form_test.ts b/src/connectors/typeform/functions/get_form_test.ts new file mode 100644 index 0000000..96ab442 --- /dev/null +++ b/src/connectors/typeform/functions/get_form_test.ts @@ -0,0 +1,40 @@ +/** 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 GetForm from "./get_form.ts"; + +Deno.test("GetForm can be used as a Slack function in a workflow step", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_GetForm_slack_function", + title: "Test GetForm", + description: "This is a generated test to test GetForm", + }); + testWorkflow.addStep(GetForm, { + form_id: "test", + typeform_access_token: "test", + }); + const actual = testWorkflow.steps[0].export(); + + assertEquals(actual.function_id, "A05T70HT5E1#/functions/get_form"); + assertEquals(actual.inputs, { + form_id: "test", + typeform_access_token: "test", + }); +}); + +Deno.test("All outputs of Slack function GetForm should exist", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_GetForm_slack_function", + title: "Test GetForm", + description: "This is a generated test to test GetForm", + }); + const step = testWorkflow.addStep(GetForm, { + form_id: "test", + typeform_access_token: "test", + }); + assertExists(step.outputs.form); + assertExists(step.outputs.form_id); + assertExists(step.outputs.form_title); + assertExists(step.outputs.form_url); + assertExists(step.outputs.form_fields); +}); diff --git a/src/connectors/typeform/mod.ts b/src/connectors/typeform/mod.ts new file mode 100644 index 0000000..cacf41c --- /dev/null +++ b/src/connectors/typeform/mod.ts @@ -0,0 +1,28 @@ +/** This file was autogenerated. Follow the steps in src/schema/slack/functions/README.md to rebuild **/ +import CreateWorkspace from "./functions/create_workspace.ts"; +import DuplicateForm from "./functions/duplicate_form.ts"; +import GetForm from "./functions/get_form.ts"; +import GetFormInsights from "./functions/get_form_insights.ts"; + +const Typeform = { + functions: { + /** + * @see The {@link https://api.slack.com/reference/connectors/typeform/create_workspace CreateWorkspace} documentation. + */ + CreateWorkspace, + /** + * @see The {@link https://api.slack.com/reference/connectors/typeform/duplicate_form DuplicateForm} documentation. + */ + DuplicateForm, + /** + * @see The {@link https://api.slack.com/reference/connectors/typeform/get_form GetForm} documentation. + */ + GetForm, + /** + * @see The {@link https://api.slack.com/reference/connectors/typeform/get_form_insights GetFormInsights} documentation. + */ + GetFormInsights, + }, +} as const; + +export default Typeform; diff --git a/src/connectors/workast/functions/create_task.ts b/src/connectors/workast/functions/create_task.ts new file mode 100644 index 0000000..e9502e7 --- /dev/null +++ b/src/connectors/workast/functions/create_task.ts @@ -0,0 +1,53 @@ +/** 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: "A0630UXR0AE#/functions/create_task", + title: "Create a task", + description: " ", + input_parameters: { + properties: { + workast_access_token: { + type: Schema.slack.types.oauth2, + title: "Workast Access Token", + }, + space_id: { + type: Schema.types.string, + description: "Select the space where the task is created", + title: "Space", + }, + list_id: { + type: Schema.types.string, + description: "Select which list the task is created in", + title: "List", + }, + summary: { + type: Schema.types.string, + description: "Enter a summary", + title: "Summary", + }, + description: { + type: Schema.types.string, + description: "Enter a description", + title: "Description", + }, + assignees: { + type: Schema.types.array, + description: "Select assignees", + title: "Assign to", + items: { type: Schema.slack.types.user_id }, + }, + due_date: { type: Schema.slack.types.date, title: "Due date" }, + }, + required: ["workast_access_token", "space_id", "summary"], + }, + output_parameters: { + properties: { + id: { type: Schema.types.string, title: "Task ID" }, + task_url: { type: Schema.types.string, title: "Task URL" }, + status: { type: Schema.types.string, title: "Status" }, + }, + required: ["id", "task_url"], + }, +}); diff --git a/src/connectors/workast/functions/create_task_test.ts b/src/connectors/workast/functions/create_task_test.ts new file mode 100644 index 0000000..c5517cf --- /dev/null +++ b/src/connectors/workast/functions/create_task_test.ts @@ -0,0 +1,41 @@ +/** 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 CreateTask from "./create_task.ts"; + +Deno.test("CreateTask can be used as a Slack function in a workflow step", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_CreateTask_slack_function", + title: "Test CreateTask", + description: "This is a generated test to test CreateTask", + }); + testWorkflow.addStep(CreateTask, { + workast_access_token: "test", + space_id: "test", + summary: "test", + }); + const actual = testWorkflow.steps[0].export(); + + assertEquals(actual.function_id, "A0630UXR0AE#/functions/create_task"); + assertEquals(actual.inputs, { + workast_access_token: "test", + space_id: "test", + summary: "test", + }); +}); + +Deno.test("All outputs of Slack function CreateTask should exist", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_CreateTask_slack_function", + title: "Test CreateTask", + description: "This is a generated test to test CreateTask", + }); + const step = testWorkflow.addStep(CreateTask, { + workast_access_token: "test", + space_id: "test", + summary: "test", + }); + assertExists(step.outputs.id); + assertExists(step.outputs.task_url); + assertExists(step.outputs.status); +}); diff --git a/src/connectors/workast/mod.ts b/src/connectors/workast/mod.ts new file mode 100644 index 0000000..3e0d202 --- /dev/null +++ b/src/connectors/workast/mod.ts @@ -0,0 +1,13 @@ +/** This file was autogenerated. Follow the steps in src/schema/slack/functions/README.md to rebuild **/ +import CreateTask from "./functions/create_task.ts"; + +const Workast = { + functions: { + /** + * @see The {@link https://api.slack.com/reference/connectors/workast/create_task CreateTask} documentation. + */ + CreateTask, + }, +} as const; + +export default Workast;