From 71060b7f906e4afb757f84150dbd30f759ef3f10 Mon Sep 17 00:00:00 2001 From: github-actions Date: Mon, 10 Jun 2024 00:10:18 +0000 Subject: [PATCH] Automated commit: Latest generated changes from schedule action --- .../linear/functions/create_issue.ts | 2 +- .../linear/functions/create_issue_test.ts | 3 - src/connectors/mod.ts | 2 +- .../pagerduty/functions/create_incident.ts | 5 ++ .../salesforce/functions/run_flow.ts | 1 + .../salesforce/functions/run_flow_test.ts | 1 + .../smartsheet/functions/add_row.ts | 1 + .../smartsheet/functions/add_row_test.ts | 1 + .../smartsheet/functions/delete_row.ts | 39 +++++++++++ .../smartsheet/functions/delete_row_test.ts | 40 ++++++++++++ .../smartsheet/functions/select_row.ts | 55 ++++++++++++++++ .../smartsheet/functions/select_row_test.ts | 42 ++++++++++++ .../smartsheet/functions/update_row.ts | 64 +++++++++++++++++++ .../smartsheet/functions/update_row_test.ts | 45 +++++++++++++ src/connectors/smartsheet/mod.ts | 15 +++++ 15 files changed, 311 insertions(+), 5 deletions(-) create mode 100644 src/connectors/smartsheet/functions/delete_row.ts create mode 100644 src/connectors/smartsheet/functions/delete_row_test.ts create mode 100644 src/connectors/smartsheet/functions/select_row.ts create mode 100644 src/connectors/smartsheet/functions/select_row_test.ts create mode 100644 src/connectors/smartsheet/functions/update_row.ts create mode 100644 src/connectors/smartsheet/functions/update_row_test.ts diff --git a/src/connectors/linear/functions/create_issue.ts b/src/connectors/linear/functions/create_issue.ts index 73a95ba..85fd453 100644 --- a/src/connectors/linear/functions/create_issue.ts +++ b/src/connectors/linear/functions/create_issue.ts @@ -42,7 +42,7 @@ export default DefineConnector({ title: "Linear access token", }, }, - required: ["team_id", "title", "description", "linear_access_token"], + required: ["team_id", "title", "linear_access_token"], }, output_parameters: { properties: { diff --git a/src/connectors/linear/functions/create_issue_test.ts b/src/connectors/linear/functions/create_issue_test.ts index 39203c9..7cbf7c3 100644 --- a/src/connectors/linear/functions/create_issue_test.ts +++ b/src/connectors/linear/functions/create_issue_test.ts @@ -12,7 +12,6 @@ Deno.test("CreateIssue can be used as a Slack function in a workflow step", () = testWorkflow.addStep(CreateIssue, { team_id: "test", title: "test", - description: "test", linear_access_token: "test", }); const actual = testWorkflow.steps[0].export(); @@ -21,7 +20,6 @@ Deno.test("CreateIssue can be used as a Slack function in a workflow step", () = assertEquals(actual.inputs, { team_id: "test", title: "test", - description: "test", linear_access_token: "test", }); }); @@ -35,7 +33,6 @@ Deno.test("All outputs of Slack function CreateIssue should exist", () => { const step = testWorkflow.addStep(CreateIssue, { team_id: "test", title: "test", - description: "test", linear_access_token: "test", }); assertExists(step.outputs.issue_id); diff --git a/src/connectors/mod.ts b/src/connectors/mod.ts index 4491845..93435d6 100644 --- a/src/connectors/mod.ts +++ b/src/connectors/mod.ts @@ -1,4 +1,4 @@ -/** This file was autogenerated on Mon Jun 03 2024. Follow the steps in src/schema/slack/functions/README.md to rebuild **/ +/** This file was autogenerated on Mon Jun 10 2024. Follow the steps in src/schema/slack/functions/README.md to rebuild **/ import AdobeSign from "./adobe.sign/mod.ts"; import Airtable from "./airtable/mod.ts"; import Asana from "./asana/mod.ts"; diff --git a/src/connectors/pagerduty/functions/create_incident.ts b/src/connectors/pagerduty/functions/create_incident.ts index 56138b5..6c43c87 100644 --- a/src/connectors/pagerduty/functions/create_incident.ts +++ b/src/connectors/pagerduty/functions/create_incident.ts @@ -18,6 +18,11 @@ export default DefineConnector({ description: "Enter incident details...", title: "Incident details", }, + priority_id: { + type: Schema.types.string, + description: "Priority", + title: "Priority", + }, pagerduty_access_token: { type: Schema.slack.types.oauth2, description: "Pagerduty access token", diff --git a/src/connectors/salesforce/functions/run_flow.ts b/src/connectors/salesforce/functions/run_flow.ts index 3f9f91e..da87282 100644 --- a/src/connectors/salesforce/functions/run_flow.ts +++ b/src/connectors/salesforce/functions/run_flow.ts @@ -26,6 +26,7 @@ export default DefineConnector({ properties: { success: { type: Schema.types.boolean, title: "Response" }, flow_name: { type: Schema.types.string, title: "Flow name" }, + result: { type: Schema.types.object, title: "Flow outputs" }, }, required: [], }, diff --git a/src/connectors/salesforce/functions/run_flow_test.ts b/src/connectors/salesforce/functions/run_flow_test.ts index 2803013..b972b27 100644 --- a/src/connectors/salesforce/functions/run_flow_test.ts +++ b/src/connectors/salesforce/functions/run_flow_test.ts @@ -34,4 +34,5 @@ Deno.test("All outputs of Slack function RunFlow should exist", () => { }); assertExists(step.outputs.success); assertExists(step.outputs.flow_name); + assertExists(step.outputs.result); }); diff --git a/src/connectors/smartsheet/functions/add_row.ts b/src/connectors/smartsheet/functions/add_row.ts index ee9b25b..f2d2cb1 100644 --- a/src/connectors/smartsheet/functions/add_row.ts +++ b/src/connectors/smartsheet/functions/add_row.ts @@ -37,6 +37,7 @@ export default DefineConnector({ description: "Smartsheet ID", title: "Smartsheet ID", }, + row_id: { type: Schema.types.string, title: "Row ID" }, }, required: ["smartsheet_url", "sheet_id"], }, diff --git a/src/connectors/smartsheet/functions/add_row_test.ts b/src/connectors/smartsheet/functions/add_row_test.ts index 875ff99..786360f 100644 --- a/src/connectors/smartsheet/functions/add_row_test.ts +++ b/src/connectors/smartsheet/functions/add_row_test.ts @@ -37,4 +37,5 @@ Deno.test("All outputs of Slack function AddRow should exist", () => { }); assertExists(step.outputs.smartsheet_url); assertExists(step.outputs.sheet_id); + assertExists(step.outputs.row_id); }); diff --git a/src/connectors/smartsheet/functions/delete_row.ts b/src/connectors/smartsheet/functions/delete_row.ts new file mode 100644 index 0000000..4a2c1bb --- /dev/null +++ b/src/connectors/smartsheet/functions/delete_row.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: "A05SEF35LQY#/functions/delete_row", + title: "Delete a row from Smartsheet", + input_parameters: { + properties: { + sheet: { + type: Schema.types.object, + description: "Select a Smartsheet", + title: "Smartsheet", + }, + select_row: { type: Schema.types.string, title: "Select a row" }, + smartsheet_access_token: { + type: Schema.slack.types.oauth2, + description: "Which account should we use to fetch Smartsheets?", + title: "Smartsheet Access Token", + }, + }, + required: ["sheet", "select_row", "smartsheet_access_token"], + }, + output_parameters: { + properties: { + smartsheet_url: { + type: Schema.types.string, + description: "Smartsheet URL", + title: "Smartsheet URL", + }, + sheet_id: { + type: Schema.types.string, + description: "Smartsheet ID", + title: "Smartsheet ID", + }, + }, + required: ["smartsheet_url", "sheet_id"], + }, +}); diff --git a/src/connectors/smartsheet/functions/delete_row_test.ts b/src/connectors/smartsheet/functions/delete_row_test.ts new file mode 100644 index 0000000..aca463c --- /dev/null +++ b/src/connectors/smartsheet/functions/delete_row_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 DeleteRow from "./delete_row.ts"; + +Deno.test("DeleteRow can be used as a Slack function in a workflow step", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_DeleteRow_slack_function", + title: "Test DeleteRow", + description: "This is a generated test to test DeleteRow", + }); + testWorkflow.addStep(DeleteRow, { + sheet: "test", + select_row: "test", + smartsheet_access_token: "test", + }); + const actual = testWorkflow.steps[0].export(); + + assertEquals(actual.function_id, "A05SEF35LQY#/functions/delete_row"); + assertEquals(actual.inputs, { + sheet: "test", + select_row: "test", + smartsheet_access_token: "test", + }); +}); + +Deno.test("All outputs of Slack function DeleteRow should exist", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_DeleteRow_slack_function", + title: "Test DeleteRow", + description: "This is a generated test to test DeleteRow", + }); + const step = testWorkflow.addStep(DeleteRow, { + sheet: "test", + select_row: "test", + smartsheet_access_token: "test", + }); + assertExists(step.outputs.smartsheet_url); + assertExists(step.outputs.sheet_id); +}); diff --git a/src/connectors/smartsheet/functions/select_row.ts b/src/connectors/smartsheet/functions/select_row.ts new file mode 100644 index 0000000..2b9d613 --- /dev/null +++ b/src/connectors/smartsheet/functions/select_row.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: "A05SEF35LQY#/functions/select_row", + title: "Select a Smartsheet row", + input_parameters: { + properties: { + sheet: { + type: Schema.types.object, + description: "Select a Smartsheet", + title: "Smartsheet", + }, + select_row: { + type: Schema.types.string, + description: "Search a row with cell value", + title: "Select a row", + }, + smartsheet_access_token: { + type: Schema.slack.types.oauth2, + description: "Which account should we use to fetch Smartsheets?", + title: "Smartsheet Access Token", + }, + }, + required: ["sheet", "select_row", "smartsheet_access_token"], + }, + output_parameters: { + properties: { + smartsheet_url: { + type: Schema.types.string, + description: "Smartsheet URL", + title: "Smartsheet URL", + }, + sheet_id: { + type: Schema.types.string, + description: "Smartsheet ID", + title: "Smartsheet ID", + }, + row: { + type: Schema.types.object, + description: "Row", + title: "Row", + properties: { + id: { type: Schema.types.integer, title: "Row ID" }, + rowNumber: { type: Schema.types.integer, title: "Row number" }, + }, + additionalProperties: true, + required: [], + }, + column_values: { type: Schema.types.object, title: "Column values" }, + }, + required: ["smartsheet_url", "sheet_id", "row", "column_values"], + }, +}); diff --git a/src/connectors/smartsheet/functions/select_row_test.ts b/src/connectors/smartsheet/functions/select_row_test.ts new file mode 100644 index 0000000..fd42bb0 --- /dev/null +++ b/src/connectors/smartsheet/functions/select_row_test.ts @@ -0,0 +1,42 @@ +/** 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 SelectRow from "./select_row.ts"; + +Deno.test("SelectRow can be used as a Slack function in a workflow step", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_SelectRow_slack_function", + title: "Test SelectRow", + description: "This is a generated test to test SelectRow", + }); + testWorkflow.addStep(SelectRow, { + sheet: "test", + select_row: "test", + smartsheet_access_token: "test", + }); + const actual = testWorkflow.steps[0].export(); + + assertEquals(actual.function_id, "A05SEF35LQY#/functions/select_row"); + assertEquals(actual.inputs, { + sheet: "test", + select_row: "test", + smartsheet_access_token: "test", + }); +}); + +Deno.test("All outputs of Slack function SelectRow should exist", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_SelectRow_slack_function", + title: "Test SelectRow", + description: "This is a generated test to test SelectRow", + }); + const step = testWorkflow.addStep(SelectRow, { + sheet: "test", + select_row: "test", + smartsheet_access_token: "test", + }); + assertExists(step.outputs.smartsheet_url); + assertExists(step.outputs.sheet_id); + assertExists(step.outputs.row); + assertExists(step.outputs.column_values); +}); diff --git a/src/connectors/smartsheet/functions/update_row.ts b/src/connectors/smartsheet/functions/update_row.ts new file mode 100644 index 0000000..c051cb2 --- /dev/null +++ b/src/connectors/smartsheet/functions/update_row.ts @@ -0,0 +1,64 @@ +/** 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: "A05SEF35LQY#/functions/update_row", + title: "Update a row to Smartsheet", + input_parameters: { + properties: { + sheet: { + type: Schema.types.object, + description: "Select a Smartsheet", + title: "Smartsheet", + }, + select_row: { + type: Schema.types.string, + description: "Search a row with cell value", + title: "Select a row", + }, + updated_values: { type: Schema.types.object, title: "Updated values" }, + smartsheet_access_token: { + type: Schema.slack.types.oauth2, + description: "Which account should we use to fetch Smartsheets?", + title: "Smartsheet Access Token", + }, + }, + required: [ + "sheet", + "select_row", + "updated_values", + "smartsheet_access_token", + ], + }, + output_parameters: { + properties: { + smartsheet_url: { + type: Schema.types.string, + description: "Smartsheet URL", + title: "Smartsheet URL", + }, + sheet_id: { + type: Schema.types.string, + description: "Smartsheet ID", + title: "Smartsheet ID", + }, + row: { + type: Schema.types.object, + description: "Row", + title: "Row", + properties: { + id: { type: Schema.types.integer, title: "Row ID" }, + rowNumber: { type: Schema.types.integer, title: "Row number" }, + }, + additionalProperties: true, + required: [], + }, + updated_column_values: { + type: Schema.types.object, + title: "Updated column values", + }, + }, + required: ["smartsheet_url", "sheet_id", "row", "updated_column_values"], + }, +}); diff --git a/src/connectors/smartsheet/functions/update_row_test.ts b/src/connectors/smartsheet/functions/update_row_test.ts new file mode 100644 index 0000000..8ed3a7e --- /dev/null +++ b/src/connectors/smartsheet/functions/update_row_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 UpdateRow from "./update_row.ts"; + +Deno.test("UpdateRow can be used as a Slack function in a workflow step", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_UpdateRow_slack_function", + title: "Test UpdateRow", + description: "This is a generated test to test UpdateRow", + }); + testWorkflow.addStep(UpdateRow, { + sheet: "test", + select_row: "test", + updated_values: "test", + smartsheet_access_token: "test", + }); + const actual = testWorkflow.steps[0].export(); + + assertEquals(actual.function_id, "A05SEF35LQY#/functions/update_row"); + assertEquals(actual.inputs, { + sheet: "test", + select_row: "test", + updated_values: "test", + smartsheet_access_token: "test", + }); +}); + +Deno.test("All outputs of Slack function UpdateRow should exist", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_UpdateRow_slack_function", + title: "Test UpdateRow", + description: "This is a generated test to test UpdateRow", + }); + const step = testWorkflow.addStep(UpdateRow, { + sheet: "test", + select_row: "test", + updated_values: "test", + smartsheet_access_token: "test", + }); + assertExists(step.outputs.smartsheet_url); + assertExists(step.outputs.sheet_id); + assertExists(step.outputs.row); + assertExists(step.outputs.updated_column_values); +}); diff --git a/src/connectors/smartsheet/mod.ts b/src/connectors/smartsheet/mod.ts index ade215f..0efbbf1 100644 --- a/src/connectors/smartsheet/mod.ts +++ b/src/connectors/smartsheet/mod.ts @@ -1,5 +1,8 @@ /** This file was autogenerated. Follow the steps in src/schema/slack/functions/README.md to rebuild **/ import AddRow from "./functions/add_row.ts"; +import DeleteRow from "./functions/delete_row.ts"; +import SelectRow from "./functions/select_row.ts"; +import UpdateRow from "./functions/update_row.ts"; const Smartsheet = { functions: { @@ -7,6 +10,18 @@ const Smartsheet = { * @see The {@link https://api.slack.com/reference/connectors/smartsheet/add_row AddRow} documentation. */ AddRow, + /** + * @see The {@link https://api.slack.com/reference/connectors/smartsheet/delete_row DeleteRow} documentation. + */ + DeleteRow, + /** + * @see The {@link https://api.slack.com/reference/connectors/smartsheet/select_row SelectRow} documentation. + */ + SelectRow, + /** + * @see The {@link https://api.slack.com/reference/connectors/smartsheet/update_row UpdateRow} documentation. + */ + UpdateRow, }, } as const;