Skip to content

Commit

Permalink
Automated commit: Latest generated changes from schedule action
Browse files Browse the repository at this point in the history
  • Loading branch information
WilliamBergamin committed Jun 3, 2024
1 parent c0e2965 commit 63796bb
Show file tree
Hide file tree
Showing 13 changed files with 286 additions and 6 deletions.
14 changes: 13 additions & 1 deletion src/connectors/google.meet/functions/start_meeting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
21 changes: 20 additions & 1 deletion src/connectors/google.sheets/functions/delete_spreadsheet_row.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
},
});
Original file line number Diff line number Diff line change
@@ -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";

Expand Down Expand Up @@ -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);
});
23 changes: 22 additions & 1 deletion src/connectors/google.sheets/functions/select_spreadsheet_row.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
],
},
});
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
22 changes: 21 additions & 1 deletion src/connectors/google.sheets/functions/update_spreadsheet_row.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
],
},
});
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
2 changes: 1 addition & 1 deletion src/connectors/mod.ts
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
39 changes: 39 additions & 0 deletions src/connectors/salesforce/functions/delete_record.ts
Original file line number Diff line number Diff line change
@@ -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: [],
},
});
40 changes: 40 additions & 0 deletions src/connectors/salesforce/functions/delete_record_test.ts
Original file line number Diff line number Diff line change
@@ -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);
});
55 changes: 55 additions & 0 deletions src/connectors/salesforce/functions/read_record.ts
Original file line number Diff line number Diff line change
@@ -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: [],
},
});
41 changes: 41 additions & 0 deletions src/connectors/salesforce/functions/read_record_test.ts
Original file line number Diff line number Diff line change
@@ -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);
});
10 changes: 10 additions & 0 deletions src/connectors/salesforce/mod.ts
Original file line number Diff line number Diff line change
@@ -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";

Expand All @@ -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.
*/
Expand Down

0 comments on commit 63796bb

Please sign in to comment.