Skip to content

Commit

Permalink
Automated commit: Latest generated changes from schedule action (#23)
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 Sep 26, 2023
1 parent a4f433a commit 0eb687d
Show file tree
Hide file tree
Showing 33 changed files with 1,200 additions and 9 deletions.
87 changes: 87 additions & 0 deletions src/connectors/atlassian.bitbucket/functions/create_issue.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
/** 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/create_issue",
title: "Create an issue",
description: "Create 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",
},
title: {
type: Schema.types.string,
description: "Title of the issue",
title: "Title",
},
description: {
type: Schema.types.string,
description: "Description of the issue",
title: "Description",
},
kind: {
type: Schema.types.string,
description: "Issue kind",
title: "Kind",
enum: ["bug", "enhancement", "proposal", "task"],
},
priority: {
type: Schema.types.string,
description: "Priority of the issue",
title: "Priority",
enum: ["trivial", "minior", "major", "critical", "blocker"],
},
assignee_uuid: {
type: Schema.types.string,
description: "Select an option...",
title: "Assignee",
},
bitbucket_access_token: {
type: Schema.slack.types.oauth2,
title: "bitbucket access token",
},
},
required: [
"workspace",
"repo_slug",
"title",
"description",
"assignee_uuid",
"bitbucket_access_token",
],
},
output_parameters: {
properties: {
issue_id: {
type: Schema.types.string,
description: "Id of the issue",
title: "Issue ID",
},
title: {
type: Schema.types.string,
description: "Title of the issue",
title: "Title",
},
kind: {
type: Schema.types.string,
description: "Kind of the issue",
title: "Kind",
},
priority: {
type: Schema.types.string,
description: "Priority of the issue",
title: "Priority",
},
},
required: [],
},
});
51 changes: 51 additions & 0 deletions src/connectors/atlassian.bitbucket/functions/create_issue_test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
/** 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 CreateIssue from "./create_issue.ts";

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

assertEquals(actual.function_id, "A05Q8KLHEHJ#/functions/create_issue");
assertEquals(actual.inputs, {
workspace: "test",
repo_slug: "test",
title: "test",
description: "test",
assignee_uuid: "test",
bitbucket_access_token: "test",
});
});

Deno.test("All outputs of Slack function CreateIssue should exist", () => {
const testWorkflow = DefineWorkflow({
callback_id: "test_CreateIssue_slack_function",
title: "Test CreateIssue",
description: "This is a generated test to test CreateIssue",
});
const step = testWorkflow.addStep(CreateIssue, {
workspace: "test",
repo_slug: "test",
title: "test",
description: "test",
assignee_uuid: "test",
bitbucket_access_token: "test",
});
assertExists(step.outputs.issue_id);
assertExists(step.outputs.title);
assertExists(step.outputs.kind);
assertExists(step.outputs.priority);
});
66 changes: 66 additions & 0 deletions src/connectors/atlassian.bitbucket/functions/merge_pull_request.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
/** 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/merge_pull_request",
title: "Merge pull request",
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",
},
pull_request_id: {
type: Schema.types.string,
description: "Enter a pull request ID",
title: "Pull request ID",
},
message: {
type: Schema.types.string,
description: "Enter a message",
title: "Message",
},
close_source_branch: {
type: Schema.types.boolean,
description: "Enter Close Source Branch",
title: "Close Source Branch",
},
merge_strategy: {
type: Schema.types.string,
description: "Enter merge strategy",
title: "Merge strategy",
enum: ["merge_commit", "squash", "fast_forward"],
},
bitbucket_access_token: {
type: Schema.slack.types.oauth2,
title: "bitbucket access token",
},
},
required: [
"workspace",
"repo_slug",
"pull_request_id",
"bitbucket_access_token",
],
},
output_parameters: {
properties: {
response: { type: Schema.types.string, title: "Response code" },
workspace: { type: Schema.types.string, title: "Bitbucket workspace ID" },
repo_slug: { type: Schema.types.string, title: "Repository ID" },
pull_request_id: {
type: Schema.types.string,
description: "ID of the pull request to be merged",
title: "Pull request ID",
},
},
required: [],
},
});
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 MergePullRequest from "./merge_pull_request.ts";

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

assertEquals(actual.function_id, "A05Q8KLHEHJ#/functions/merge_pull_request");
assertEquals(actual.inputs, {
workspace: "test",
repo_slug: "test",
pull_request_id: "test",
bitbucket_access_token: "test",
});
});

Deno.test("All outputs of Slack function MergePullRequest should exist", () => {
const testWorkflow = DefineWorkflow({
callback_id: "test_MergePullRequest_slack_function",
title: "Test MergePullRequest",
description: "This is a generated test to test MergePullRequest",
});
const step = testWorkflow.addStep(MergePullRequest, {
workspace: "test",
repo_slug: "test",
pull_request_id: "test",
bitbucket_access_token: "test",
});
assertExists(step.outputs.response);
assertExists(step.outputs.workspace);
assertExists(step.outputs.repo_slug);
assertExists(step.outputs.pull_request_id);
});
18 changes: 18 additions & 0 deletions src/connectors/atlassian.bitbucket/mod.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/** 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";

const AtlassianBitbucket = {
functions: {
/**
* @see The {@link https://api.slack.com/reference/connectors/atlassian.bitbucket/create_issue CreateIssue} documentation.
*/
CreateIssue,
/**
* @see The {@link https://api.slack.com/reference/connectors/atlassian.bitbucket/merge_pull_request MergePullRequest} documentation.
*/
MergePullRequest,
},
} as const;

export default AtlassianBitbucket;
53 changes: 53 additions & 0 deletions src/connectors/google.mail/functions/send_email.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/** 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: "A05Q7MZ8WH1#/functions/send_email",
title: "Send an email",
input_parameters: {
properties: {
subject: {
type: Schema.types.string,
description: "Enter text",
title: "Subject",
},
email_body: {
type: Schema.slack.types.rich_text,
description: "Enter text",
title: "Email body",
},
recipients: {
type: Schema.types.array,
description: "Search all people...",
title: "Recipients",
items: { type: Schema.slack.types.user_id },
},
additional_recipients: {
type: Schema.types.array,
description: "Enter email addresses",
title: "Additional Recipients",
items: { type: Schema.types.string },
},
cc_recipients: {
type: Schema.types.array,
description: "Enter email addresses",
title: "CC Recipients",
items: { type: Schema.types.string },
},
bcc_recipients: {
type: Schema.types.array,
description: "Enter email addresses",
title: "BCC Recipients",
items: { type: Schema.types.string },
},
google_access_token: {
type: Schema.slack.types.oauth2,
description: "Google access token",
title: "Google access token",
},
},
required: ["subject", "email_body", "google_access_token"],
},
output_parameters: { properties: {}, required: [] },
});
25 changes: 25 additions & 0 deletions src/connectors/google.mail/functions/send_email_test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/** This file was autogenerated. Follow the steps in src/schema/slack/functions/README.md to rebuild **/
import { assertEquals } from "../../../dev_deps.ts";
import { DefineWorkflow } from "../../../dev_deps.ts";
import SendEmail from "./send_email.ts";

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

assertEquals(actual.function_id, "A05Q7MZ8WH1#/functions/send_email");
assertEquals(actual.inputs, {
subject: "test",
email_body: "test",
google_access_token: "test",
});
});
13 changes: 13 additions & 0 deletions src/connectors/google.mail/mod.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/** This file was autogenerated. Follow the steps in src/schema/slack/functions/README.md to rebuild **/
import SendEmail from "./functions/send_email.ts";

const GoogleMail = {
functions: {
/**
* @see The {@link https://api.slack.com/reference/connectors/google.mail/send_email SendEmail} documentation.
*/
SendEmail,
},
} as const;

export default GoogleMail;
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,7 @@ export default DefineConnector({
description: "Add a value",
title: "Cell value to find",
},
updated_values: {
type: Schema.types.object,
description: "updated_values",
title: "Updated Values",
},
updated_values: { type: Schema.types.object, title: "Updated Values" },
google_access_token: {
type: Schema.slack.types.oauth2,
description: "Which account should we use to write to the spreadsheet?",
Expand Down
Loading

0 comments on commit 0eb687d

Please sign in to comment.