Skip to content

Commit

Permalink
Automated commit: Latest generated changes from schedule action (#32)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions <[email protected]>
  • Loading branch information
github-actions[bot] and WilliamBergamin authored Dec 20, 2023
1 parent 61ed7ea commit bb43a4a
Show file tree
Hide file tree
Showing 107 changed files with 4,944 additions and 1 deletion.
35 changes: 35 additions & 0 deletions src/connectors/airtable/functions/add_record.ts
Original file line number Diff line number Diff line change
@@ -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: [],
},
});
43 changes: 43 additions & 0 deletions src/connectors/airtable/functions/add_record_test.ts
Original file line number Diff line number Diff line change
@@ -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);
});
45 changes: 45 additions & 0 deletions src/connectors/airtable/functions/delete_record.ts
Original file line number Diff line number Diff line change
@@ -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: [],
},
});
45 changes: 45 additions & 0 deletions src/connectors/airtable/functions/delete_record_test.ts
Original file line number Diff line number Diff line change
@@ -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);
});
47 changes: 47 additions & 0 deletions src/connectors/airtable/functions/select_record.ts
Original file line number Diff line number Diff line change
@@ -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"],
},
});
47 changes: 47 additions & 0 deletions src/connectors/airtable/functions/select_record_test.ts
Original file line number Diff line number Diff line change
@@ -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);
});
49 changes: 49 additions & 0 deletions src/connectors/airtable/functions/update_record.ts
Original file line number Diff line number Diff line change
@@ -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: [],
},
});
50 changes: 50 additions & 0 deletions src/connectors/airtable/functions/update_record_test.ts
Original file line number Diff line number Diff line change
@@ -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);
});
28 changes: 28 additions & 0 deletions src/connectors/airtable/mod.ts
Original file line number Diff line number Diff line change
@@ -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;
Loading

0 comments on commit bb43a4a

Please sign in to comment.