Skip to content

Commit

Permalink
Latest generated changes (#34)
Browse files Browse the repository at this point in the history
* Automated commit: Latest generated changes from schedule action

* Add deprication warning

---------

Co-authored-by: github-actions <[email protected]>
Co-authored-by: William Bergamin <[email protected]>
  • Loading branch information
3 people authored Jan 15, 2024
1 parent 556b3c2 commit 15a2b50
Show file tree
Hide file tree
Showing 18 changed files with 726 additions and 6 deletions.
14 changes: 11 additions & 3 deletions src/connectors/mod.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/** This file was autogenerated on Tue Dec 19 2023. Follow the steps in src/schema/slack/functions/README.md to rebuild **/
/** This file was autogenerated on Mon Jan 15 2024. Follow the steps in src/schema/slack/functions/README.md to rebuild **/
import Airtable from "./airtable/mod.ts";
import Asana from "./asana/mod.ts";
import AtlassianBitbucket from "./atlassian.bitbucket/mod.ts";
Expand Down Expand Up @@ -48,13 +48,15 @@ import Rootly from "./rootly/mod.ts";
import Salesforce from "./salesforce/mod.ts";
import Smartrecruiters from "./smartrecruiters/mod.ts";
import Smartsheet from "./smartsheet/mod.ts";
import Synk from "./synk/mod.ts";
import Snyk from "./snyk/mod.ts";
import Surveymonkey from "./surveymonkey/mod.ts";
import Travisci from "./travisci/mod.ts";
import Twilio from "./twilio/mod.ts";
import Typeform from "./typeform/mod.ts";
import Webex from "./webex/mod.ts";
import Workast from "./workast/mod.ts";
import Wrike from "./wrike/mod.ts";
import Zendesk from "./zendesk/mod.ts";
import Zoom from "./zoom/mod.ts";

const Connectors = {
Expand Down Expand Up @@ -107,13 +109,19 @@ const Connectors = {
Salesforce,
Smartrecruiters,
Smartsheet,
Synk,
Snyk,
/**
* @deprecated Snyk should be used in favor of Synk (Synk will be removed in next release)
*/
Synk: Snyk,
Surveymonkey,
Travisci,
Twilio,
Typeform,
Webex,
Workast,
Wrike,
Zendesk,
Zoom,
} as const;

Expand Down
6 changes: 3 additions & 3 deletions src/connectors/synk/mod.ts → src/connectors/snyk/mod.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/** This file was autogenerated. Follow the steps in src/schema/slack/functions/README.md to rebuild **/
import CreateIgnore from "./functions/create_ignore.ts";

const Synk = {
const Snyk = {
functions: {
/**
* @see The {@link https://api.slack.com/reference/connectors/synk/create_ignore CreateIgnore} documentation.
* @see The {@link https://api.slack.com/reference/connectors/snyk/create_ignore CreateIgnore} documentation.
*/
CreateIgnore,
},
} as const;

export default Synk;
export default Snyk;
49 changes: 49 additions & 0 deletions src/connectors/surveymonkey/functions/copy_survey.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: "A05U1HZ9XGF#/functions/copy_survey",
title: "Copy a survey",
input_parameters: {
properties: {
surveymonkey_access_token: {
type: Schema.slack.types.oauth2,
description: "SurveyMonkey Credential to use",
title: "SurveyMonkey Access Token",
},
survey_id: {
type: Schema.types.string,
description: "Select a survey",
title: "Existing surveys",
},
title: {
type: Schema.types.string,
description: "Enter text",
title: "Survey title",
},
},
required: ["surveymonkey_access_token", "survey_id", "title"],
},
output_parameters: {
properties: {
id: {
type: Schema.types.string,
description: "New survey ID",
title: "Survey ID",
},
title: {
type: Schema.types.string,
description: "New survey title",
title: "Survey title",
},
url: {
type: Schema.types.string,
description:
"The URL where users can edit the new survey before sending",
title: "Design survey URL",
},
},
required: ["id", "title", "url"],
},
});
49 changes: 49 additions & 0 deletions src/connectors/surveymonkey/functions/copy_survey_from_template.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: "A05U1HZ9XGF#/functions/copy_survey_from_template",
title: "Copy a survey from a template",
input_parameters: {
properties: {
surveymonkey_access_token: {
type: Schema.slack.types.oauth2,
description: "SurveyMonkey Credential to use",
title: "SurveyMonkey Access Token",
},
template_id: {
type: Schema.types.string,
description: "Select a template",
title: "Survey template",
},
title: {
type: Schema.types.string,
description: "Enter text",
title: "Survey title",
},
},
required: ["surveymonkey_access_token", "template_id", "title"],
},
output_parameters: {
properties: {
id: {
type: Schema.types.string,
description: "New survey ID",
title: "Survey ID",
},
title: {
type: Schema.types.string,
description: "New survey title",
title: "Survey title",
},
url: {
type: Schema.types.string,
description:
"The URL where users can edit the new survey before sending",
title: "Design survey URL",
},
},
required: ["id", "title", "url"],
},
});
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 { assertEquals, assertExists } from "../../../dev_deps.ts";
import { DefineWorkflow } from "../../../dev_deps.ts";
import CopySurveyFromTemplate from "./copy_survey_from_template.ts";

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

assertEquals(
actual.function_id,
"A05U1HZ9XGF#/functions/copy_survey_from_template",
);
assertEquals(actual.inputs, {
surveymonkey_access_token: "test",
template_id: "test",
title: "test",
});
});

Deno.test("All outputs of Slack function CopySurveyFromTemplate should exist", () => {
const testWorkflow = DefineWorkflow({
callback_id: "test_CopySurveyFromTemplate_slack_function",
title: "Test CopySurveyFromTemplate",
description: "This is a generated test to test CopySurveyFromTemplate",
});
const step = testWorkflow.addStep(CopySurveyFromTemplate, {
surveymonkey_access_token: "test",
template_id: "test",
title: "test",
});
assertExists(step.outputs.id);
assertExists(step.outputs.title);
assertExists(step.outputs.url);
});
41 changes: 41 additions & 0 deletions src/connectors/surveymonkey/functions/copy_survey_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 CopySurvey from "./copy_survey.ts";

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

assertEquals(actual.function_id, "A05U1HZ9XGF#/functions/copy_survey");
assertEquals(actual.inputs, {
surveymonkey_access_token: "test",
survey_id: "test",
title: "test",
});
});

Deno.test("All outputs of Slack function CopySurvey should exist", () => {
const testWorkflow = DefineWorkflow({
callback_id: "test_CopySurvey_slack_function",
title: "Test CopySurvey",
description: "This is a generated test to test CopySurvey",
});
const step = testWorkflow.addStep(CopySurvey, {
surveymonkey_access_token: "test",
survey_id: "test",
title: "test",
});
assertExists(step.outputs.id);
assertExists(step.outputs.title);
assertExists(step.outputs.url);
});
18 changes: 18 additions & 0 deletions src/connectors/surveymonkey/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 CopySurvey from "./functions/copy_survey.ts";
import CopySurveyFromTemplate from "./functions/copy_survey_from_template.ts";

const Surveymonkey = {
functions: {
/**
* @see The {@link https://api.slack.com/reference/connectors/surveymonkey/copy_survey CopySurvey} documentation.
*/
CopySurvey,
/**
* @see The {@link https://api.slack.com/reference/connectors/surveymonkey/copy_survey_from_template CopySurveyFromTemplate} documentation.
*/
CopySurveyFromTemplate,
},
} as const;

export default Surveymonkey;
46 changes: 46 additions & 0 deletions src/connectors/zendesk/functions/add_tags.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/** 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: "A0660D0LBV3#/functions/add_tags",
title: "Add tags",
description: "Add tags on a ticket without affecting existing ones",
input_parameters: {
properties: {
ticket_id: {
type: Schema.types.integer,
description: "Enter ticket ID",
title: "Ticket ID",
},
add_tags: {
type: Schema.types.array,
title: "Add tags",
items: { type: Schema.types.string },
},
zendesk_access_token: {
type: Schema.slack.types.oauth2,
description: "Zendesk credential to use",
title: "Zendesk Access Token",
},
},
required: ["ticket_id", "zendesk_access_token"],
},
output_parameters: {
properties: {
ticket_id: { type: Schema.types.integer, title: "Ticket ID" },
ticket_url: {
type: Schema.types.string,
description: "The ticket URL",
title: "Ticket URL",
},
status: { type: Schema.types.string, title: "Status" },
additional_tags: {
type: Schema.types.array,
title: "Added tags",
items: { type: Schema.types.string },
},
},
required: ["ticket_id", "ticket_url", "status", "additional_tags"],
},
});
39 changes: 39 additions & 0 deletions src/connectors/zendesk/functions/add_tags_test.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 { assertEquals, assertExists } from "../../../dev_deps.ts";
import { DefineWorkflow } from "../../../dev_deps.ts";
import AddTags from "./add_tags.ts";

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

assertEquals(actual.function_id, "A0660D0LBV3#/functions/add_tags");
assertEquals(actual.inputs, {
ticket_id: "test",
zendesk_access_token: "test",
});
});

Deno.test("All outputs of Slack function AddTags should exist", () => {
const testWorkflow = DefineWorkflow({
callback_id: "test_AddTags_slack_function",
title: "Test AddTags",
description: "This is a generated test to test AddTags",
});
const step = testWorkflow.addStep(AddTags, {
ticket_id: "test",
zendesk_access_token: "test",
});
assertExists(step.outputs.ticket_id);
assertExists(step.outputs.ticket_url);
assertExists(step.outputs.status);
assertExists(step.outputs.additional_tags);
});
Loading

0 comments on commit 15a2b50

Please sign in to comment.