-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Automated commit: Latest generated changes from schedule action (#55)
Co-authored-by: github-actions <[email protected]>
- Loading branch information
1 parent
7031f34
commit 62a98d3
Showing
9 changed files
with
98 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/** 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: "A05KUFPF86S#/functions/add_task_to_section", | ||
title: "Add task to a section", | ||
input_parameters: { | ||
properties: { | ||
asana_access_token: { | ||
type: Schema.slack.types.oauth2, | ||
description: "Asana credential to use", | ||
title: "Asana Access Token", | ||
}, | ||
workspace_gid: { type: Schema.types.string, title: "Workspace" }, | ||
project: { type: Schema.types.string, title: "Project" }, | ||
section_gid: { type: Schema.types.string, title: "Section" }, | ||
task_gid: { type: Schema.types.string, title: "Task" }, | ||
}, | ||
required: [ | ||
"asana_access_token", | ||
"workspace_gid", | ||
"project", | ||
"section_gid", | ||
"task_gid", | ||
], | ||
}, | ||
output_parameters: { | ||
properties: { | ||
response_code: { type: Schema.types.string, title: "Response code" }, | ||
}, | ||
required: ["response_code"], | ||
}, | ||
}); |
48 changes: 48 additions & 0 deletions
48
src/connectors/asana/functions/add_task_to_section_test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/** 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 AddTaskToSection from "./add_task_to_section.ts"; | ||
|
||
Deno.test("AddTaskToSection can be used as a Slack function in a workflow step", () => { | ||
const testWorkflow = DefineWorkflow({ | ||
callback_id: "test_AddTaskToSection_slack_function", | ||
title: "Test AddTaskToSection", | ||
description: "This is a generated test to test AddTaskToSection", | ||
}); | ||
testWorkflow.addStep(AddTaskToSection, { | ||
asana_access_token: "test", | ||
workspace_gid: "test", | ||
project: "test", | ||
section_gid: "test", | ||
task_gid: "test", | ||
}); | ||
const actual = testWorkflow.steps[0].export(); | ||
|
||
assertEquals( | ||
actual.function_id, | ||
"A05KUFPF86S#/functions/add_task_to_section", | ||
); | ||
assertEquals(actual.inputs, { | ||
asana_access_token: "test", | ||
workspace_gid: "test", | ||
project: "test", | ||
section_gid: "test", | ||
task_gid: "test", | ||
}); | ||
}); | ||
|
||
Deno.test("All outputs of Slack function AddTaskToSection should exist", () => { | ||
const testWorkflow = DefineWorkflow({ | ||
callback_id: "test_AddTaskToSection_slack_function", | ||
title: "Test AddTaskToSection", | ||
description: "This is a generated test to test AddTaskToSection", | ||
}); | ||
const step = testWorkflow.addStep(AddTaskToSection, { | ||
asana_access_token: "test", | ||
workspace_gid: "test", | ||
project: "test", | ||
section_gid: "test", | ||
task_gid: "test", | ||
}); | ||
assertExists(step.outputs.response_code); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters