-
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
- Loading branch information
1 parent
c0e2965
commit 63796bb
Showing
13 changed files
with
286 additions
and
6 deletions.
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
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
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,39 @@ | ||
/** 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: "A04T99UKKQE#/functions/delete_record", | ||
title: "Delete a record", | ||
description: "Delete a Salesforce record", | ||
input_parameters: { | ||
properties: { | ||
salesforce_object_name: { | ||
type: Schema.types.string, | ||
description: "Salesforce Object", | ||
title: "Salesforce object", | ||
}, | ||
record_id: { | ||
type: Schema.types.string, | ||
description: "Ex: 1000000000Abcd", | ||
title: "Record ID", | ||
}, | ||
salesforce_access_token: { | ||
type: Schema.slack.types.oauth2, | ||
title: "Salesforce Access Token", | ||
}, | ||
}, | ||
required: [ | ||
"salesforce_object_name", | ||
"record_id", | ||
"salesforce_access_token", | ||
], | ||
}, | ||
output_parameters: { | ||
properties: { | ||
code: { type: Schema.types.integer, title: "Response" }, | ||
record_id: { type: Schema.types.string, title: "Record ID" }, | ||
}, | ||
required: [], | ||
}, | ||
}); |
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,40 @@ | ||
/** 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, { | ||
salesforce_object_name: "test", | ||
record_id: "test", | ||
salesforce_access_token: "test", | ||
}); | ||
const actual = testWorkflow.steps[0].export(); | ||
|
||
assertEquals(actual.function_id, "A04T99UKKQE#/functions/delete_record"); | ||
assertEquals(actual.inputs, { | ||
salesforce_object_name: "test", | ||
record_id: "test", | ||
salesforce_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, { | ||
salesforce_object_name: "test", | ||
record_id: "test", | ||
salesforce_access_token: "test", | ||
}); | ||
assertExists(step.outputs.code); | ||
assertExists(step.outputs.record_id); | ||
}); |
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,55 @@ | ||
/** 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: "A04T99UKKQE#/functions/read_record", | ||
title: "Read a record", | ||
description: "Read a Salesforce record", | ||
input_parameters: { | ||
properties: { | ||
salesforce_object_name: { | ||
type: Schema.types.string, | ||
description: "Salesforce Object", | ||
title: "Salesforce object", | ||
}, | ||
record_id: { | ||
type: Schema.types.string, | ||
description: "Ex: 1000000000Abcd", | ||
title: "Record ID", | ||
}, | ||
salesforce_access_token: { | ||
type: Schema.slack.types.oauth2, | ||
title: "Salesforce Access Token", | ||
}, | ||
}, | ||
required: [ | ||
"salesforce_object_name", | ||
"record_id", | ||
"salesforce_access_token", | ||
], | ||
}, | ||
output_parameters: { | ||
properties: { | ||
record: { | ||
type: Schema.types.object, | ||
title: "Record", | ||
properties: { | ||
Id: { type: Schema.types.string }, | ||
Name: { type: Schema.types.string }, | ||
CreatedById: { type: Schema.types.string }, | ||
CreatedDate: { type: Schema.types.string }, | ||
Description: { type: Schema.types.string }, | ||
}, | ||
additionalProperties: true, | ||
required: ["Id"], | ||
}, | ||
salesforce_object_type: { | ||
type: Schema.types.string, | ||
title: "Salesforce Object Type", | ||
}, | ||
record_url: { type: Schema.types.string, title: "Record URL" }, | ||
}, | ||
required: [], | ||
}, | ||
}); |
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,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 ReadRecord from "./read_record.ts"; | ||
|
||
Deno.test("ReadRecord can be used as a Slack function in a workflow step", () => { | ||
const testWorkflow = DefineWorkflow({ | ||
callback_id: "test_ReadRecord_slack_function", | ||
title: "Test ReadRecord", | ||
description: "This is a generated test to test ReadRecord", | ||
}); | ||
testWorkflow.addStep(ReadRecord, { | ||
salesforce_object_name: "test", | ||
record_id: "test", | ||
salesforce_access_token: "test", | ||
}); | ||
const actual = testWorkflow.steps[0].export(); | ||
|
||
assertEquals(actual.function_id, "A04T99UKKQE#/functions/read_record"); | ||
assertEquals(actual.inputs, { | ||
salesforce_object_name: "test", | ||
record_id: "test", | ||
salesforce_access_token: "test", | ||
}); | ||
}); | ||
|
||
Deno.test("All outputs of Slack function ReadRecord should exist", () => { | ||
const testWorkflow = DefineWorkflow({ | ||
callback_id: "test_ReadRecord_slack_function", | ||
title: "Test ReadRecord", | ||
description: "This is a generated test to test ReadRecord", | ||
}); | ||
const step = testWorkflow.addStep(ReadRecord, { | ||
salesforce_object_name: "test", | ||
record_id: "test", | ||
salesforce_access_token: "test", | ||
}); | ||
assertExists(step.outputs.record); | ||
assertExists(step.outputs.salesforce_object_type); | ||
assertExists(step.outputs.record_url); | ||
}); |
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