-
-
Notifications
You must be signed in to change notification settings - Fork 217
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update API from slack-api-ref@bc54564 (2024-01-30)
- Loading branch information
Showing
28 changed files
with
150 additions
and
38 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# frozen_string_literal: true | ||
# This file was auto-generated by lib/tasks/web.rake | ||
|
||
module Slack | ||
module Cli | ||
class App | ||
desc 'Functions methods.' | ||
command 'functions' do |g| | ||
g.desc 'Signal that a function failed to complete' | ||
g.long_desc %( Signal that a function failed to complete ) | ||
g.command 'completeError' do |c| | ||
c.flag 'error', desc: 'A human-readable error message that contains information about why the function failed to complete.' | ||
c.flag 'function_execution_id', desc: 'Context identifier that maps to the executed function.' | ||
c.action do |_global_options, options, _args| | ||
puts JSON.dump(@client.functions_completeError(options)) | ||
end | ||
end | ||
|
||
g.desc 'Signal the successful completion of a function' | ||
g.long_desc %( Signal the successful completion of a function ) | ||
g.command 'completeSuccess' do |c| | ||
c.flag 'function_execution_id', desc: 'Context identifier that maps to the executed function.' | ||
c.flag 'outputs', desc: 'A JSON-based object that conforms to the output parameters schema for the custom function defined in the manifest.' | ||
c.action do |_global_options, options, _args| | ||
puts JSON.dump(@client.functions_completeSuccess(options)) | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end |
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
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,43 @@ | ||
# frozen_string_literal: true | ||
# This file was auto-generated by lib/tasks/web.rake | ||
|
||
module Slack | ||
module Web | ||
module Api | ||
module Endpoints | ||
module Functions | ||
# | ||
# Signal that a function failed to complete | ||
# | ||
# @option options [string] :error | ||
# A human-readable error message that contains information about why the function failed to complete. | ||
# @option options [string] :function_execution_id | ||
# Context identifier that maps to the executed function. | ||
# @see https://api.slack.com/methods/functions.completeError | ||
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/functions/functions.completeError.json | ||
def functions_completeError(options = {}) | ||
raise ArgumentError, 'Required arguments :error missing' if options[:error].nil? | ||
raise ArgumentError, 'Required arguments :function_execution_id missing' if options[:function_execution_id].nil? | ||
post('functions.completeError', options) | ||
end | ||
|
||
# | ||
# Signal the successful completion of a function | ||
# | ||
# @option options [string] :function_execution_id | ||
# Context identifier that maps to the executed function. | ||
# @option options [object] :outputs | ||
# A JSON-based object that conforms to the output parameters schema for the custom function defined in the manifest. | ||
# @see https://api.slack.com/methods/functions.completeSuccess | ||
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/functions/functions.completeSuccess.json | ||
def functions_completeSuccess(options = {}) | ||
raise ArgumentError, 'Required arguments :function_execution_id missing' if options[:function_execution_id].nil? | ||
raise ArgumentError, 'Required arguments :outputs missing' if options[:outputs].nil? | ||
options = encode_options_as_json(options, %i[outputs]) | ||
post('functions.completeSuccess', options) | ||
end | ||
end | ||
end | ||
end | ||
end | ||
end |
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
Oops, something went wrong.