|
| 1 | +# frozen_string_literal: true |
| 2 | +# This file was auto-generated by lib/tasks/web.rake |
| 3 | + |
| 4 | +module Slack |
| 5 | + module Cli |
| 6 | + class App |
| 7 | + desc 'AdminWorkflows methods.' |
| 8 | + command 'admin_workflows' do |g| |
| 9 | + g.desc 'Search workflows within the team or enterprise' |
| 10 | + g.long_desc %( Search workflows within the team or enterprise ) |
| 11 | + g.command 'search' do |c| |
| 12 | + c.flag 'app_id', desc: 'The parent app ID for which to return workflows.' |
| 13 | + c.flag 'collaborator_ids', desc: 'Only include workflows by the collaborators inputted.' |
| 14 | + c.flag 'cursor', desc: 'Set cursor to next_cursor returned by the previous call to list items in the next page.' |
| 15 | + c.flag 'limit', desc: 'The number of results that will be returned by the API on each invocation.' |
| 16 | + c.flag 'no_collaborators', desc: 'Only include workflows with no collaborators in the result; default is false.' |
| 17 | + c.flag 'num_trigger_ids', desc: 'Number of trigger IDs to fetch for each workflow; default is 0.' |
| 18 | + c.flag 'query', desc: 'A search query to filter for workflow name or description.' |
| 19 | + c.flag 'sort', desc: 'The field used to sort the returned workflows.' |
| 20 | + 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).' |
| 21 | + c.flag 'source', desc: 'Source of workflow creation, either from code or workflow builder.' |
| 22 | + c.action do |_global_options, options, _args| |
| 23 | + puts JSON.dump(@client.admin_workflows_search(options)) |
| 24 | + end |
| 25 | + end |
| 26 | + |
| 27 | + g.desc 'Unpublish workflows within the team or enterprise' |
| 28 | + g.long_desc %( Unpublish workflows within the team or enterprise ) |
| 29 | + g.command 'unpublish' do |c| |
| 30 | + c.flag 'workflow_ids', desc: 'Array of workflow IDs to unpublish.' |
| 31 | + c.action do |_global_options, options, _args| |
| 32 | + puts JSON.dump(@client.admin_workflows_unpublish(options)) |
| 33 | + end |
| 34 | + end |
| 35 | + end |
| 36 | + end |
| 37 | + end |
| 38 | +end |
0 commit comments