-
Notifications
You must be signed in to change notification settings - Fork 406
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
Add support for remote functions #2026
Merged
+755
−31
Merged
Changes from 1 commit
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
a050256
[WIP] Add function listener support
misscoded 188813c
[WIP] Add foundation of CLI hooks support
misscoded f31d8df
[WIP] Add support for interactivity
misscoded 3faab87
[WIP] Add attachFunctionToken opt-out option
misscoded b46f470
[WIP] Revert CLI hook support within Bolt
zimeg 1b79873
Incorporate PR comments
misscoded 630f188
Add CustomFunction test + adjust naming
misscoded caec4b1
Update error description
misscoded 247b4c7
Bump the @slack/web-api version to v6.12.0
zimeg 11a42c0
v3.17.1-customFunctionBeta.0
zimeg e933eda
chore: merge w main
zimeg 87730ef
chore: merge w main
zimeg bea900d
Fixes and polish for stable release (#2128)
misscoded b10bbb0
chore: merge main
23ef516
[Bug] Fix chained function actions (#2200)
misscoded 90ce812
Remote functions: typescript integration test with bolt-ts-starter-te…
filmaj 0110bf2
Merge branch 'main' into feat-functions
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading status checks…
Incorporate PR comments
commit 1b7987369894557e04028f5f98d1aaa974a3e3cd
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
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -427,37 +427,39 @@ export interface FileUnsharedEvent { | |||||
} | ||||||
|
||||||
export interface FunctionParams { | ||||||
misscoded marked this conversation as resolved.
Show resolved
Hide resolved
misscoded marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
type?: string, | ||||||
name?: string, | ||||||
description?: string, | ||||||
title?: string, | ||||||
is_required?: boolean, | ||||||
type?: string; | ||||||
name?: string; | ||||||
description?: string; | ||||||
title?: string; | ||||||
is_required?: boolean; | ||||||
} | ||||||
|
||||||
export interface FunctionInputValues { | ||||||
export interface FunctionInputs { | ||||||
[key: string]: unknown; | ||||||
} | ||||||
|
||||||
export type FunctionOutputValues = FunctionInputValues; | ||||||
export type FunctionOutputValues = FunctionInputs; | ||||||
|
||||||
// TODO :: Update this with new payload info | ||||||
export interface FunctionExecutedEvent { | ||||||
type: 'function_executed', | ||||||
type: 'function_executed'; | ||||||
function: { | ||||||
id: string, | ||||||
callback_id: string, | ||||||
title: string, | ||||||
description: string, | ||||||
type: string, | ||||||
input_parameters: FunctionParams[], | ||||||
output_parameters: FunctionParams[], | ||||||
app_id: string, | ||||||
date_updated: number, | ||||||
}, | ||||||
function_execution_id: string, | ||||||
inputs: FunctionInputValues, | ||||||
workflow_token: string, // xwfp-xxxxxxxxxxx | ||||||
event_ts: string, | ||||||
id: string; | ||||||
callback_id: string; | ||||||
title: string; | ||||||
description: string; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks! Also included in pre-stable-fixes branch. |
||||||
type: string; | ||||||
input_parameters: FunctionParams[]; | ||||||
output_parameters: FunctionParams[]; | ||||||
app_id: string; | ||||||
date_created: number; | ||||||
date_updated: number; | ||||||
date_deleted: number | ||||||
}; | ||||||
inputs: FunctionInputs; | ||||||
function_execution_id: string; | ||||||
workflow_execution_id: string; | ||||||
event_ts: string; | ||||||
bot_access_token: string; | ||||||
} | ||||||
|
||||||
export interface GridMigrationFinishedEvent { | ||||||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 first time to see this way to initialize a new instance. Other code in bolt-js uses clientOptions for the second argument instead. I haven't verified on my end yet but have you confirmed this code can make the same effect with
new WebClient(token, clientOptions)
?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.
I'm 99% sure I tested this when you brought it up as a concern back in January, but we will make doubly-sure before we cut the stable release.
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.
Going to take a slightly different tact here: expose the web client options as assembled in the bolt App constructor via a getter method, and simply re-use those here instead.