diff --git a/src/connectors/google.meet/functions/start_meeting.ts b/src/connectors/google.meet/functions/start_meeting.ts index a419348..849ff8f 100644 --- a/src/connectors/google.meet/functions/start_meeting.ts +++ b/src/connectors/google.meet/functions/start_meeting.ts @@ -4,9 +4,21 @@ import { Schema } from "../../../deps.ts"; export default DefineConnector({ callback_id: "A05A1NP97K6#/functions/start_meeting", - title: "Start a meeting - BETA", + title: "Start a meeting", input_parameters: { properties: { + access_type: { + type: Schema.types.string, + description: "Access type", + title: "Access type", + enum: ["OPEN", "TRUSTED", "RESTRICTED"], + }, + entry_point_access: { + type: Schema.types.string, + description: "Entry point access", + title: "Entry point access", + enum: ["ALL", "CREATOR_APP_ONLY"], + }, google_access_token: { type: Schema.slack.types.oauth2, title: "Google Access Token", diff --git a/src/connectors/google.sheets/functions/delete_spreadsheet_row.ts b/src/connectors/google.sheets/functions/delete_spreadsheet_row.ts index c99e377..1b115b4 100644 --- a/src/connectors/google.sheets/functions/delete_spreadsheet_row.ts +++ b/src/connectors/google.sheets/functions/delete_spreadsheet_row.ts @@ -36,5 +36,24 @@ export default DefineConnector({ }, required: ["spreadsheet_id", "sheet", "column_name", "google_access_token"], }, - output_parameters: { properties: {}, required: [] }, + output_parameters: { + properties: { + spreadsheet_url: { + type: Schema.types.string, + description: "Spreadsheet URL", + title: "Spreadsheet URL", + }, + timestamp_started: { + type: Schema.slack.types.timestamp, + description: "Time when step started", + title: "Time when step started", + }, + timestamp_completed: { + type: Schema.slack.types.timestamp, + description: "Time when step ended", + title: "Time when step ended", + }, + }, + required: ["spreadsheet_url", "timestamp_started", "timestamp_completed"], + }, }); diff --git a/src/connectors/google.sheets/functions/delete_spreadsheet_row_test.ts b/src/connectors/google.sheets/functions/delete_spreadsheet_row_test.ts index 2ca1ae5..6faba4e 100644 --- a/src/connectors/google.sheets/functions/delete_spreadsheet_row_test.ts +++ b/src/connectors/google.sheets/functions/delete_spreadsheet_row_test.ts @@ -1,5 +1,5 @@ /** This file was autogenerated. Follow the steps in src/schema/slack/functions/README.md to rebuild **/ -import { assertEquals } from "../../../dev_deps.ts"; +import { assertEquals, assertExists } from "../../../dev_deps.ts"; import { DefineWorkflow } from "../../../dev_deps.ts"; import DeleteSpreadsheetRow from "./delete_spreadsheet_row.ts"; @@ -28,3 +28,20 @@ Deno.test("DeleteSpreadsheetRow can be used as a Slack function in a workflow st google_access_token: "test", }); }); + +Deno.test("All outputs of Slack function DeleteSpreadsheetRow should exist", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_DeleteSpreadsheetRow_slack_function", + title: "Test DeleteSpreadsheetRow", + description: "This is a generated test to test DeleteSpreadsheetRow", + }); + const step = testWorkflow.addStep(DeleteSpreadsheetRow, { + spreadsheet_id: "test", + sheet: "test", + column_name: "test", + google_access_token: "test", + }); + assertExists(step.outputs.spreadsheet_url); + assertExists(step.outputs.timestamp_started); + assertExists(step.outputs.timestamp_completed); +}); diff --git a/src/connectors/google.sheets/functions/select_spreadsheet_row.ts b/src/connectors/google.sheets/functions/select_spreadsheet_row.ts index 10c0aab..4d444db 100644 --- a/src/connectors/google.sheets/functions/select_spreadsheet_row.ts +++ b/src/connectors/google.sheets/functions/select_spreadsheet_row.ts @@ -49,7 +49,28 @@ export default DefineConnector({ description: "Row index", title: "Row index", }, + spreadsheet_url: { + type: Schema.types.string, + description: "Spreadsheet URL", + title: "Spreadsheet URL", + }, + timestamp_started: { + type: Schema.slack.types.timestamp, + description: "Time when step started", + title: "Time when step started", + }, + timestamp_completed: { + type: Schema.slack.types.timestamp, + description: "Time when step ended", + title: "Time when step ended", + }, }, - required: ["column_values", "row_index"], + required: [ + "column_values", + "row_index", + "spreadsheet_url", + "timestamp_started", + "timestamp_completed", + ], }, }); diff --git a/src/connectors/google.sheets/functions/select_spreadsheet_row_test.ts b/src/connectors/google.sheets/functions/select_spreadsheet_row_test.ts index 215fed7..5c93d74 100644 --- a/src/connectors/google.sheets/functions/select_spreadsheet_row_test.ts +++ b/src/connectors/google.sheets/functions/select_spreadsheet_row_test.ts @@ -43,4 +43,7 @@ Deno.test("All outputs of Slack function SelectSpreadsheetRow should exist", () }); assertExists(step.outputs.column_values); assertExists(step.outputs.row_index); + assertExists(step.outputs.spreadsheet_url); + assertExists(step.outputs.timestamp_started); + assertExists(step.outputs.timestamp_completed); }); diff --git a/src/connectors/google.sheets/functions/update_spreadsheet_row.ts b/src/connectors/google.sheets/functions/update_spreadsheet_row.ts index d890d0f..e19120a 100644 --- a/src/connectors/google.sheets/functions/update_spreadsheet_row.ts +++ b/src/connectors/google.sheets/functions/update_spreadsheet_row.ts @@ -46,7 +46,27 @@ export default DefineConnector({ output_parameters: { properties: { column_values: { type: Schema.types.object, title: "Column values" }, + spreadsheet_url: { + type: Schema.types.string, + description: "Spreadsheet URL", + title: "Spreadsheet URL", + }, + timestamp_started: { + type: Schema.slack.types.timestamp, + description: "Time when step started", + title: "Time when step started", + }, + timestamp_completed: { + type: Schema.slack.types.timestamp, + description: "Time when step ended", + title: "Time when step ended", + }, }, - required: ["column_values"], + required: [ + "column_values", + "spreadsheet_url", + "timestamp_started", + "timestamp_completed", + ], }, }); diff --git a/src/connectors/google.sheets/functions/update_spreadsheet_row_test.ts b/src/connectors/google.sheets/functions/update_spreadsheet_row_test.ts index ed4dbd6..a83111f 100644 --- a/src/connectors/google.sheets/functions/update_spreadsheet_row_test.ts +++ b/src/connectors/google.sheets/functions/update_spreadsheet_row_test.ts @@ -45,4 +45,7 @@ Deno.test("All outputs of Slack function UpdateSpreadsheetRow should exist", () google_access_token: "test", }); assertExists(step.outputs.column_values); + assertExists(step.outputs.spreadsheet_url); + assertExists(step.outputs.timestamp_started); + assertExists(step.outputs.timestamp_completed); }); diff --git a/src/connectors/mod.ts b/src/connectors/mod.ts index 12a9fae..4491845 100644 --- a/src/connectors/mod.ts +++ b/src/connectors/mod.ts @@ -1,4 +1,4 @@ -/** This file was autogenerated on Mon May 27 2024. Follow the steps in src/schema/slack/functions/README.md to rebuild **/ +/** This file was autogenerated on Mon Jun 03 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/salesforce/functions/delete_record.ts b/src/connectors/salesforce/functions/delete_record.ts new file mode 100644 index 0000000..44d2ca5 --- /dev/null +++ b/src/connectors/salesforce/functions/delete_record.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: "A04T99UKKQE#/functions/delete_record", + title: "Delete a record", + description: "Delete a Salesforce record", + input_parameters: { + properties: { + salesforce_object_name: { + type: Schema.types.string, + description: "Salesforce Object", + title: "Salesforce object", + }, + record_id: { + type: Schema.types.string, + description: "Ex: 1000000000Abcd", + title: "Record ID", + }, + salesforce_access_token: { + type: Schema.slack.types.oauth2, + title: "Salesforce Access Token", + }, + }, + required: [ + "salesforce_object_name", + "record_id", + "salesforce_access_token", + ], + }, + output_parameters: { + properties: { + code: { type: Schema.types.integer, title: "Response" }, + record_id: { type: Schema.types.string, title: "Record ID" }, + }, + required: [], + }, +}); diff --git a/src/connectors/salesforce/functions/delete_record_test.ts b/src/connectors/salesforce/functions/delete_record_test.ts new file mode 100644 index 0000000..9eb3dcc --- /dev/null +++ b/src/connectors/salesforce/functions/delete_record_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 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, { + salesforce_object_name: "test", + record_id: "test", + salesforce_access_token: "test", + }); + const actual = testWorkflow.steps[0].export(); + + assertEquals(actual.function_id, "A04T99UKKQE#/functions/delete_record"); + assertEquals(actual.inputs, { + salesforce_object_name: "test", + record_id: "test", + salesforce_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, { + salesforce_object_name: "test", + record_id: "test", + salesforce_access_token: "test", + }); + assertExists(step.outputs.code); + assertExists(step.outputs.record_id); +}); diff --git a/src/connectors/salesforce/functions/read_record.ts b/src/connectors/salesforce/functions/read_record.ts new file mode 100644 index 0000000..8c4c7f4 --- /dev/null +++ b/src/connectors/salesforce/functions/read_record.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: "A04T99UKKQE#/functions/read_record", + title: "Read a record", + description: "Read a Salesforce record", + input_parameters: { + properties: { + salesforce_object_name: { + type: Schema.types.string, + description: "Salesforce Object", + title: "Salesforce object", + }, + record_id: { + type: Schema.types.string, + description: "Ex: 1000000000Abcd", + title: "Record ID", + }, + salesforce_access_token: { + type: Schema.slack.types.oauth2, + title: "Salesforce Access Token", + }, + }, + required: [ + "salesforce_object_name", + "record_id", + "salesforce_access_token", + ], + }, + output_parameters: { + properties: { + record: { + type: Schema.types.object, + title: "Record", + properties: { + Id: { type: Schema.types.string }, + Name: { type: Schema.types.string }, + CreatedById: { type: Schema.types.string }, + CreatedDate: { type: Schema.types.string }, + Description: { type: Schema.types.string }, + }, + additionalProperties: true, + required: ["Id"], + }, + salesforce_object_type: { + type: Schema.types.string, + title: "Salesforce Object Type", + }, + record_url: { type: Schema.types.string, title: "Record URL" }, + }, + required: [], + }, +}); diff --git a/src/connectors/salesforce/functions/read_record_test.ts b/src/connectors/salesforce/functions/read_record_test.ts new file mode 100644 index 0000000..1be7c3b --- /dev/null +++ b/src/connectors/salesforce/functions/read_record_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 ReadRecord from "./read_record.ts"; + +Deno.test("ReadRecord can be used as a Slack function in a workflow step", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_ReadRecord_slack_function", + title: "Test ReadRecord", + description: "This is a generated test to test ReadRecord", + }); + testWorkflow.addStep(ReadRecord, { + salesforce_object_name: "test", + record_id: "test", + salesforce_access_token: "test", + }); + const actual = testWorkflow.steps[0].export(); + + assertEquals(actual.function_id, "A04T99UKKQE#/functions/read_record"); + assertEquals(actual.inputs, { + salesforce_object_name: "test", + record_id: "test", + salesforce_access_token: "test", + }); +}); + +Deno.test("All outputs of Slack function ReadRecord should exist", () => { + const testWorkflow = DefineWorkflow({ + callback_id: "test_ReadRecord_slack_function", + title: "Test ReadRecord", + description: "This is a generated test to test ReadRecord", + }); + const step = testWorkflow.addStep(ReadRecord, { + salesforce_object_name: "test", + record_id: "test", + salesforce_access_token: "test", + }); + assertExists(step.outputs.record); + assertExists(step.outputs.salesforce_object_type); + assertExists(step.outputs.record_url); +}); diff --git a/src/connectors/salesforce/mod.ts b/src/connectors/salesforce/mod.ts index 32ba595..dd5b8bc 100644 --- a/src/connectors/salesforce/mod.ts +++ b/src/connectors/salesforce/mod.ts @@ -1,5 +1,7 @@ /** This file was autogenerated. Follow the steps in src/schema/slack/functions/README.md to rebuild **/ import CreateRecord from "./functions/create_record.ts"; +import DeleteRecord from "./functions/delete_record.ts"; +import ReadRecord from "./functions/read_record.ts"; import RunFlow from "./functions/run_flow.ts"; import UpdateRecord from "./functions/update_record.ts"; @@ -9,6 +11,14 @@ const Salesforce = { * @see The {@link https://api.slack.com/reference/connectors/salesforce/create_record CreateRecord} documentation. */ CreateRecord, + /** + * @see The {@link https://api.slack.com/reference/connectors/salesforce/delete_record DeleteRecord} documentation. + */ + DeleteRecord, + /** + * @see The {@link https://api.slack.com/reference/connectors/salesforce/read_record ReadRecord} documentation. + */ + ReadRecord, /** * @see The {@link https://api.slack.com/reference/connectors/salesforce/run_flow RunFlow} documentation. */