bin/commands/workflows.rb in slack-ruby-client-2.0.0 vs bin/commands/workflows.rb in slack-ruby-client-2.1.0

- old
+ new

@@ -1,38 +1,44 @@ # frozen_string_literal: true # This file was auto-generated by lib/tasks/web.rake -desc 'Workflows methods.' -command 'workflows' do |g| - g.desc "Indicate that an app's step in a workflow completed execution." - g.long_desc %( Indicate that an app's step in a workflow completed execution. ) - g.command 'stepCompleted' do |c| - c.flag 'workflow_step_execute_id', desc: 'Context identifier that maps to the correct workflow step execution.' - c.flag 'outputs', desc: 'Key-value object of outputs from your step. Keys of this object reflect the configured key properties of your outputs array from your workflow_step object.' - c.action do |_global_options, options, _args| - puts JSON.dump($client.workflows_stepCompleted(options)) - end - end +module Slack + module Cli + class App + desc 'Workflows methods.' + command 'workflows' do |g| + g.desc "Indicate that an app's step in a workflow completed execution." + g.long_desc %( Indicate that an app's step in a workflow completed execution. ) + g.command 'stepCompleted' do |c| + c.flag 'workflow_step_execute_id', desc: 'Context identifier that maps to the correct workflow step execution.' + c.flag 'outputs', desc: 'Key-value object of outputs from your step. Keys of this object reflect the configured key properties of your outputs array from your workflow_step object.' + c.action do |_global_options, options, _args| + puts JSON.dump(@client.workflows_stepCompleted(options)) + end + end - g.desc "Indicate that an app's step in a workflow failed to execute." - g.long_desc %( Indicate that an app's step in a workflow failed to execute. ) - g.command 'stepFailed' do |c| - c.flag 'error', desc: 'A JSON-based object with a message property that should contain a human readable error message.' - c.flag 'workflow_step_execute_id', desc: 'Context identifier that maps to the correct workflow step execution.' - c.action do |_global_options, options, _args| - puts JSON.dump($client.workflows_stepFailed(options)) - end - end + g.desc "Indicate that an app's step in a workflow failed to execute." + g.long_desc %( Indicate that an app's step in a workflow failed to execute. ) + g.command 'stepFailed' do |c| + c.flag 'error', desc: 'A JSON-based object with a message property that should contain a human readable error message.' + c.flag 'workflow_step_execute_id', desc: 'Context identifier that maps to the correct workflow step execution.' + c.action do |_global_options, options, _args| + puts JSON.dump(@client.workflows_stepFailed(options)) + end + end - g.desc 'Update the configuration for a workflow step.' - g.long_desc %( Update the configuration for a workflow step. ) - g.command 'updateStep' do |c| - c.flag 'workflow_step_edit_id', desc: 'A context identifier provided with view_submission payloads used to call back to workflows.updateStep.' - c.flag 'inputs', desc: 'A JSON key-value map of inputs required from a user during configuration. This is the data your app expects to receive when the workflow step starts. Please note: the embedded variable format is set and replaced by the workflow system. You cannot create custom variables that will be replaced at runtime. Read more about variables in workflow steps here.' - c.flag 'outputs', desc: 'An JSON array of output objects used during step execution. This is the data your app agrees to provide when your workflow step was executed.' - c.flag 'step_image_url', desc: 'An optional field that can be used to override app image that is shown in the Workflow Builder.' - c.flag 'step_name', desc: 'An optional field that can be used to override the step name that is shown in the Workflow Builder.' - c.action do |_global_options, options, _args| - puts JSON.dump($client.workflows_updateStep(options)) + g.desc 'Update the configuration for a workflow step.' + g.long_desc %( Update the configuration for a workflow step. ) + g.command 'updateStep' do |c| + c.flag 'workflow_step_edit_id', desc: 'A context identifier provided with view_submission payloads used to call back to workflows.updateStep.' + c.flag 'inputs', desc: 'A JSON key-value map of inputs required from a user during configuration. This is the data your app expects to receive when the workflow step starts. Please note: the embedded variable format is set and replaced by the workflow system. You cannot create custom variables that will be replaced at runtime. Read more about variables in workflow steps here.' + c.flag 'outputs', desc: 'An JSON array of output objects used during step execution. This is the data your app agrees to provide when your workflow step was executed.' + c.flag 'step_image_url', desc: 'An optional field that can be used to override app image that is shown in the Workflow Builder.' + c.flag 'step_name', desc: 'An optional field that can be used to override the step name that is shown in the Workflow Builder.' + c.action do |_global_options, options, _args| + puts JSON.dump(@client.workflows_updateStep(options)) + end + end + end end end end