bin/commands/admin_workflows.rb
# frozen_string_literal: true
# This file was auto-generated by lib/tasks/web.rake
module Slack
module Cli
class App
desc 'AdminWorkflows methods.'
command 'admin_workflows' do |g|
g.desc 'Search workflows within the team or enterprise'
g.long_desc %( Search workflows within the team or enterprise )
g.command 'search' do |c|
c.flag 'app_id', desc: 'The parent app ID for which to return workflows.'
c.flag 'collaborator_ids', desc: 'Only include workflows by the collaborators inputted.'
c.flag 'cursor', desc: 'Set cursor to next_cursor returned by the previous call to list items in the next page.'
c.flag 'limit', desc: 'The number of results that will be returned by the API on each invocation.'
c.flag 'no_collaborators', desc: 'Only include workflows with no collaborators in the result; default is false.'
c.flag 'num_trigger_ids', desc: 'Number of trigger IDs to fetch for each workflow; default is 0.'
c.flag 'query', desc: 'A search query to filter for workflow name or description.'
c.flag 'sort', desc: 'The field used to sort the returned workflows.'
c.flag 'sort_dir', desc: 'Sort direction. Possible values are asc for ascending order like (1, 2, 3) or (a, b, c), and desc for descending order like (3, 2, 1) or (c, b, a).'
c.flag 'source', desc: 'Source of workflow creation, either from code or workflow builder.'
c.action do |_global_options, options, _args|
puts JSON.dump(@client.admin_workflows_search(options))
end
end
g.desc 'Unpublish workflows within the team or enterprise'
g.long_desc %( Unpublish workflows within the team or enterprise )
g.command 'unpublish' do |c|
c.flag 'workflow_ids', desc: 'Array of workflow IDs to unpublish.'
c.action do |_global_options, options, _args|
puts JSON.dump(@client.admin_workflows_unpublish(options))
end
end
end
end
end
end