Skip to content
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

Merged
merged 14 commits into from
Jun 10, 2024

Conversation

filmaj
Copy link
Contributor

@filmaj filmaj commented Jun 6, 2024

  • Adds new Add Bookmark built-in function.
  • Adds a new team_id type
  • Adds a team_id parameter to Create Channel and Create Usergroup builtins (relates to but does not resolve it [BUG] Unable to pass team_id to built-in Slack function Schema.slack.functions.CreateChannel #267)
  • Updates to the generation script and instructions:
    • For the foreseeable future, the 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).
    • The generation script has unfortunately to this point ignored the 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 ?

Filip Maj added 6 commits June 6, 2024 13:25
- 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
@filmaj filmaj added the semver:minor requires a minor version number bump label Jun 6, 2024
@filmaj filmaj self-assigned this Jun 6, 2024
@filmaj filmaj requested a review from a team as a code owner June 6, 2024 20:37
@filmaj filmaj requested a review from WilliamBergamin June 6, 2024 20:44
…, remove deprecated deno.jsonc properties.
Copy link

codecov bot commented Jun 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.43%. Comparing base (09d8dcd) to head (dbdf44b).

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.
📢 Have feedback on the report? Share it here.

Filip Maj added 2 commits June 7, 2024 12:36
…ial list of pre-approved hidden params we publicize anyways to account for exposing it previously
"singleQuote": false,
"useTabs": false
}
"include": [
Copy link
Contributor Author

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 **/
Copy link
Contributor Author

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: {
Copy link
Contributor Author

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",
Copy link
Contributor Author

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",
Copy link
Contributor Author

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.

@filmaj filmaj merged commit e5ba46f into main Jun 10, 2024
11 checks passed
@filmaj filmaj deleted the team-id-type-and-buitin-updates branch June 10, 2024 12:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver:minor requires a minor version number bump
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants