-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New team_id
type, updates to built-ins, updated builtin function generation script instructions
#327
Conversation
- updated some property titles - create-channel built in now accepts an optional team id (fixes #267) - added new Add Bookmark builtin - openform now accepts an on_submit_function_config input
…in generatio nscript readme.
…, remove deprecated deno.jsonc properties.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #327 +/- ##
==========================================
+ Coverage 98.37% 98.43% +0.05%
==========================================
Files 64 65 +1
Lines 2463 2677 +214
Branches 147 147
==========================================
+ Hits 2423 2635 +212
- Misses 40 42 +2 ☔ View full report in Codecov by Sentry. |
…ial list of pre-approved hidden params we publicize anyways to account for exposing it previously
"singleQuote": false, | ||
"useTabs": false | ||
} | ||
"include": [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Flattening out deno.jsonc
to remove deprecation warnings from deno
output
@@ -0,0 +1,50 @@ | |||
/** This file was autogenerated. Follow the steps in src/schema/slack/functions/_scripts/README.md to rebuild **/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New built-in that's been public for a little bit.
@@ -9,6 +9,11 @@ export default DefineFunction({ | |||
title: "Create a channel", | |||
input_parameters: { | |||
properties: { | |||
team_id: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the new property that fixes #267
@@ -1,17 +1,18 @@ | |||
const SlackPrimitiveTypes = { | |||
user_id: "slack#/types/user_id", | |||
blocks: "slack#/types/blocks", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just alphabetizing these
message_ts: "slack#/types/message_ts", | ||
oauth2: "slack#/types/credential/oauth2", | ||
rich_text: "slack#/types/rich_text", | ||
team_id: "slack#/types/team_id", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New type here; I am about to test this manually in an app to make sure it works.
team_id
typeteam_id
parameter to Create Channel and Create Usergroup builtins (relates to but does not resolve it [BUG] Unable to passteam_id
to built-in Slack functionSchema.slack.functions.CreateChannel
#267)functions.list
API will be in flux as it is under active development. As such, the generation instructions have changed to use a different set of APIs as a replacement. The new way is a bit more involved manual process, but it is not so bad (7 API calls using the API Tester instead of 1).is_hidden
parameter. This means we have released hidden parameters in this SDK 😬 to maintain backwards compatibility, handling of hidden parameters is now a manual process. The generation script will warn if it encounters a hidden parameter. Instructions are updated to have the maintainer carefully review the generated code with respect to hidden parameters. Existing hidden parameters will be kept, but any future hidden parameters should be removed.How To Deal With Hidden Parameters
We could instead improve the generation script to manually hard-code the list of built-in functions that have had hidden parameters previously exposed, and ignore those / proceed with generation code for them (to maintain backwards compatibility). Any other hidden parameters except the ones already exposed will be skipped for code generation. Thoughts @WilliamBergamin ?