Skip to content

Commit

Permalink
Automated commit: Latest generated changes from schedule action (#72)
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 Jan 28, 2025
1 parent 01cea80 commit f662e53
Show file tree
Hide file tree
Showing 28 changed files with 770 additions and 39 deletions.
4 changes: 2 additions & 2 deletions src/connectors/atlassian.bitbucket/functions/create_issue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Schema } from "../../../deps.ts";
export default DefineConnector({
callback_id: "A05Q8KLHEHJ#/functions/create_issue",
title: "Create an issue",
description: "Create a bitbucket cloud issue",
description: "Create a Bitbucket Cloud issue",
input_parameters: {
properties: {
workspace: {
Expand Down Expand Up @@ -38,7 +38,7 @@ export default DefineConnector({
type: Schema.types.string,
description: "Priority of the issue",
title: "Priority",
enum: ["trivial", "minior", "major", "critical", "blocker"],
enum: ["trivial", "minor", "major", "critical", "blocker"],
},
assignee_uuid: {
type: Schema.types.string,
Expand Down
44 changes: 44 additions & 0 deletions src/connectors/atlassian.bitbucket/functions/update_issue.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/** 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: "A05Q8KLHEHJ#/functions/update_issue",
title: "Update an issue",
description: "Update a Bitbucket Cloud issue",
input_parameters: {
properties: {
workspace: {
type: Schema.types.string,
description: "Enter bitbucket workspace",
title: "Bitbucket workspace",
},
repo_slug: {
type: Schema.types.string,
description: "Enter repository name",
title: "Repository",
},
issue_id: { type: Schema.types.string, title: "Issue to update" },
description: { type: Schema.types.string, title: "Description" },
title: { type: Schema.types.string, title: "Title" },
priority: {
type: Schema.types.string,
title: "Priority",
enum: ["trivial", "minor", "major", "critical", "blocker"],
},
assignee_uuid: { type: Schema.types.string, title: "Assignee" },
bitbucket_access_token: {
type: Schema.slack.types.oauth2,
title: "bitbucket access token",
},
},
required: ["workspace", "repo_slug", "issue_id", "description"],
},
output_parameters: {
properties: {
issue_id: { type: Schema.types.string, title: "Issue ID" },
issue_url: { type: Schema.types.string, title: "Issue URL" },
},
required: [],
},
});
43 changes: 43 additions & 0 deletions src/connectors/atlassian.bitbucket/functions/update_issue_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 UpdateIssue from "./update_issue.ts";

Deno.test("UpdateIssue can be used as a Slack function in a workflow step", () => {
const testWorkflow = DefineWorkflow({
callback_id: "test_UpdateIssue_slack_function",
title: "Test UpdateIssue",
description: "This is a generated test to test UpdateIssue",
});
testWorkflow.addStep(UpdateIssue, {
workspace: "test",
repo_slug: "test",
issue_id: "test",
description: "test",
});
const actual = testWorkflow.steps[0].export();

assertEquals(actual.function_id, "A05Q8KLHEHJ#/functions/update_issue");
assertEquals(actual.inputs, {
workspace: "test",
repo_slug: "test",
issue_id: "test",
description: "test",
});
});

Deno.test("All outputs of Slack function UpdateIssue should exist", () => {
const testWorkflow = DefineWorkflow({
callback_id: "test_UpdateIssue_slack_function",
title: "Test UpdateIssue",
description: "This is a generated test to test UpdateIssue",
});
const step = testWorkflow.addStep(UpdateIssue, {
workspace: "test",
repo_slug: "test",
issue_id: "test",
description: "test",
});
assertExists(step.outputs.issue_id);
assertExists(step.outputs.issue_url);
});
5 changes: 5 additions & 0 deletions src/connectors/atlassian.bitbucket/mod.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/** This file was autogenerated. Follow the steps in src/schema/slack/functions/README.md to rebuild **/
import CreateIssue from "./functions/create_issue.ts";
import MergePullRequest from "./functions/merge_pull_request.ts";
import UpdateIssue from "./functions/update_issue.ts";

const AtlassianBitbucket = {
functions: {
Expand All @@ -12,6 +13,10 @@ const AtlassianBitbucket = {
* @see The {@link https://api.slack.com/reference/connectors/atlassian.bitbucket/merge_pull_request MergePullRequest} documentation.
*/
MergePullRequest,
/**
* @see The {@link https://api.slack.com/reference/connectors/atlassian.bitbucket/update_issue UpdateIssue} documentation.
*/
UpdateIssue,
},
} as const;

Expand Down
45 changes: 45 additions & 0 deletions src/connectors/clickup/functions/update_task.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: "A05S54578AE#/functions/update_task",
title: "Update a task in a folder",
input_parameters: {
properties: {
team_id: { type: Schema.types.integer, title: "Team" },
space_id: { type: Schema.types.integer, title: "Space" },
folder_id: { type: Schema.types.integer, title: "Folder" },
list_id: { type: Schema.types.integer, title: "List" },
task_id: { type: Schema.types.string, title: "Task to update" },
name: { type: Schema.types.string, title: "Task name" },
description: { type: Schema.types.string, title: "Description" },
status: { type: Schema.types.string, title: "Status" },
clickup_access_token: {
type: Schema.slack.types.oauth2,
title: "Clickup Access Token",
},
},
required: [
"team_id",
"space_id",
"folder_id",
"list_id",
"task_id",
"clickup_access_token",
],
},
output_parameters: {
properties: {
task_id: { type: Schema.types.string, title: "Task ID" },
task_name: { type: Schema.types.string, title: "Task name" },
start_date: { type: Schema.types.string, title: "Start at" },
due_date: { type: Schema.types.string, title: "Due at" },
description: { type: Schema.types.string, title: "Description" },
date_created: { type: Schema.types.string, title: "Created at" },
url: { type: Schema.types.string, title: "Link to task" },
status: { type: Schema.types.string, title: "Task status" },
},
required: ["task_name", "url", "status"],
},
});
55 changes: 55 additions & 0 deletions src/connectors/clickup/functions/update_task_test.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 { assertEquals, assertExists } from "../../../dev_deps.ts";
import { DefineWorkflow } from "../../../dev_deps.ts";
import UpdateTask from "./update_task.ts";

Deno.test("UpdateTask can be used as a Slack function in a workflow step", () => {
const testWorkflow = DefineWorkflow({
callback_id: "test_UpdateTask_slack_function",
title: "Test UpdateTask",
description: "This is a generated test to test UpdateTask",
});
testWorkflow.addStep(UpdateTask, {
team_id: "test",
space_id: "test",
folder_id: "test",
list_id: "test",
task_id: "test",
clickup_access_token: "test",
});
const actual = testWorkflow.steps[0].export();

assertEquals(actual.function_id, "A05S54578AE#/functions/update_task");
assertEquals(actual.inputs, {
team_id: "test",
space_id: "test",
folder_id: "test",
list_id: "test",
task_id: "test",
clickup_access_token: "test",
});
});

Deno.test("All outputs of Slack function UpdateTask should exist", () => {
const testWorkflow = DefineWorkflow({
callback_id: "test_UpdateTask_slack_function",
title: "Test UpdateTask",
description: "This is a generated test to test UpdateTask",
});
const step = testWorkflow.addStep(UpdateTask, {
team_id: "test",
space_id: "test",
folder_id: "test",
list_id: "test",
task_id: "test",
clickup_access_token: "test",
});
assertExists(step.outputs.task_id);
assertExists(step.outputs.task_name);
assertExists(step.outputs.start_date);
assertExists(step.outputs.due_date);
assertExists(step.outputs.description);
assertExists(step.outputs.date_created);
assertExists(step.outputs.url);
assertExists(step.outputs.status);
});
5 changes: 5 additions & 0 deletions src/connectors/clickup/mod.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
/** This file was autogenerated. Follow the steps in src/schema/slack/functions/README.md to rebuild **/
import CreateTask from "./functions/create_task.ts";
import UpdateTask from "./functions/update_task.ts";

const Clickup = {
functions: {
/**
* @see The {@link https://api.slack.com/reference/connectors/clickup/create_task CreateTask} documentation.
*/
CreateTask,
/**
* @see The {@link https://api.slack.com/reference/connectors/clickup/update_task UpdateTask} documentation.
*/
UpdateTask,
},
} as const;

Expand Down
38 changes: 38 additions & 0 deletions src/connectors/github.cloud/functions/update_issue.ts
Original file line number Diff line number Diff line change
@@ -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: "A050QFW22F5#/functions/update_issue",
title: "Update an issue",
description: "Update a GitHub cloud issue",
input_parameters: {
properties: {
repository: { type: Schema.types.string, title: "Repository" },
issue_number: { type: Schema.types.string, title: "Issue number" },
title: { type: Schema.types.string, title: "Issue title" },
description: { type: Schema.types.string, title: "Description" },
state: {
type: Schema.types.string,
description: "State",
title: "State",
enum: ["open", "closed"],
},
github_access_token: {
type: Schema.slack.types.oauth2,
description: "GitHub Credential to use",
title: "Github Access Token",
},
},
required: ["repository", "issue_number", "github_access_token"],
},
output_parameters: {
properties: {
issue_number: { type: Schema.types.string, title: "Issue number" },
issue_url: { type: Schema.types.string, title: "Issue URL" },
title: { type: Schema.types.string, title: "Issue title" },
description: { type: Schema.types.string, title: "Issue Description" },
},
required: ["issue_number", "issue_url", "title"],
},
});
42 changes: 42 additions & 0 deletions src/connectors/github.cloud/functions/update_issue_test.ts
Original file line number Diff line number Diff line change
@@ -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 UpdateIssue from "./update_issue.ts";

Deno.test("UpdateIssue can be used as a Slack function in a workflow step", () => {
const testWorkflow = DefineWorkflow({
callback_id: "test_UpdateIssue_slack_function",
title: "Test UpdateIssue",
description: "This is a generated test to test UpdateIssue",
});
testWorkflow.addStep(UpdateIssue, {
repository: "test",
issue_number: "test",
github_access_token: "test",
});
const actual = testWorkflow.steps[0].export();

assertEquals(actual.function_id, "A050QFW22F5#/functions/update_issue");
assertEquals(actual.inputs, {
repository: "test",
issue_number: "test",
github_access_token: "test",
});
});

Deno.test("All outputs of Slack function UpdateIssue should exist", () => {
const testWorkflow = DefineWorkflow({
callback_id: "test_UpdateIssue_slack_function",
title: "Test UpdateIssue",
description: "This is a generated test to test UpdateIssue",
});
const step = testWorkflow.addStep(UpdateIssue, {
repository: "test",
issue_number: "test",
github_access_token: "test",
});
assertExists(step.outputs.issue_number);
assertExists(step.outputs.issue_url);
assertExists(step.outputs.title);
assertExists(step.outputs.description);
});
5 changes: 5 additions & 0 deletions src/connectors/github.cloud/mod.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
/** This file was autogenerated. Follow the steps in src/schema/slack/functions/README.md to rebuild **/
import CreateIssue from "./functions/create_issue.ts";
import UpdateIssue from "./functions/update_issue.ts";

const GithubCloud = {
functions: {
/**
* @see The {@link https://api.slack.com/reference/connectors/github.cloud/create_issue CreateIssue} documentation.
*/
CreateIssue,
/**
* @see The {@link https://api.slack.com/reference/connectors/github.cloud/update_issue UpdateIssue} documentation.
*/
UpdateIssue,
},
} as const;

Expand Down
1 change: 1 addition & 0 deletions src/connectors/google.calendar/functions/create_event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export default DefineConnector({
description: "Calendar event link",
title: "Event link",
},
calendar_id: { type: Schema.types.string, title: "Calendar ID" },
},
required: [],
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@ Deno.test("All outputs of Slack function CreateEvent should exist", () => {
});
assertExists(step.outputs.event_id);
assertExists(step.outputs.event_link);
assertExists(step.outputs.calendar_id);
});
Loading

0 comments on commit f662e53

Please sign in to comment.