-
-
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@8a22e57 (2024-02-28)
- Loading branch information
Showing
19 changed files
with
431 additions
and
11 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
31 changes: 31 additions & 0 deletions
31
bin/commands/admin_workflows_triggers_types_permissions.rb
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 'AdminWorkflowsTriggersTypesPermissions methods.' | ||
command 'admin_workflows_triggers_types_permissions' do |g| | ||
g.desc 'list the permissions for using each trigger type in workflow builder' | ||
g.long_desc %( list the permissions for using each trigger type in workflow builder ) | ||
g.command 'lookup' do |c| | ||
c.flag 'trigger_type_ids', desc: 'The trigger types IDs for which to get the permissions.' | ||
c.action do |_global_options, options, _args| | ||
puts JSON.dump(@client.admin_workflows_triggers_types_permissions_lookup(options)) | ||
end | ||
end | ||
|
||
g.desc 'Set the permissions for using a trigger type in workflow builder' | ||
g.long_desc %( Set the permissions for using a trigger type in workflow builder ) | ||
g.command 'set' do |c| | ||
c.flag 'id', desc: 'The trigger type ID for which to set the permissions.' | ||
c.flag 'visibility', desc: 'The function visibility.' | ||
c.flag 'user_ids', desc: 'List of user IDs to allow for named_entities visibility.' | ||
c.action do |_global_options, options, _args| | ||
puts JSON.dump(@client.admin_workflows_triggers_types_permissions_set(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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# frozen_string_literal: true | ||
# This file was auto-generated by lib/tasks/web.rake | ||
|
||
module Slack | ||
module Cli | ||
class App | ||
desc 'WorkflowsTriggersPermissions methods.' | ||
command 'workflows_triggers_permissions' do |g| | ||
g.desc 'Allows users to run a trigger that has its permission type set to named_entities' | ||
g.long_desc %( Allows users to run a trigger that has its permission type set to named_entities ) | ||
g.command 'add' do |c| | ||
c.flag 'trigger_id', desc: 'Encoded ID of the trigger.' | ||
c.flag 'channel_ids', desc: 'List of encoded channel IDs.' | ||
c.flag 'org_ids', desc: 'List of encoded organization IDs.' | ||
c.flag 'team_ids', desc: 'List of encoded workspace IDs.' | ||
c.flag 'user_ids', desc: 'List of encoded user IDs.' | ||
c.action do |_global_options, options, _args| | ||
puts JSON.dump(@client.workflows_triggers_permissions_add(options)) | ||
end | ||
end | ||
|
||
g.desc 'Returns the permission type of a trigger and if applicable, includes the entities that have been granted access' | ||
g.long_desc %( Returns the permission type of a trigger and if applicable, includes the entities that have been granted access ) | ||
g.command 'list' do |c| | ||
c.flag 'trigger_id', desc: 'Encoded ID of the trigger.' | ||
c.action do |_global_options, options, _args| | ||
puts JSON.dump(@client.workflows_triggers_permissions_list(options)) | ||
end | ||
end | ||
|
||
g.desc "Revoke an entity's access to a trigger that has its permission type set to named_entities" | ||
g.long_desc %( Revoke an entity's access to a trigger that has its permission type set to named_entities ) | ||
g.command 'remove' do |c| | ||
c.flag 'trigger_id', desc: 'Encoded ID of the trigger.' | ||
c.flag 'channel_ids', desc: 'List of encoded channel IDs.' | ||
c.flag 'org_ids', desc: 'List of encoded organization IDs.' | ||
c.flag 'team_ids', desc: 'List of encoded workspace IDs.' | ||
c.flag 'user_ids', desc: 'List of encoded user IDs.' | ||
c.action do |_global_options, options, _args| | ||
puts JSON.dump(@client.workflows_triggers_permissions_remove(options)) | ||
end | ||
end | ||
|
||
g.desc 'Set the permission type for who can run a trigger' | ||
g.long_desc %( Set the permission type for who can run a trigger ) | ||
g.command 'set' do |c| | ||
c.flag 'permission_type', desc: 'The type of permission that defines who can run a trigger.' | ||
c.flag 'trigger_id', desc: 'Encoded ID of the trigger.' | ||
c.flag 'channel_ids', desc: 'List of encoded channel IDs.' | ||
c.flag 'org_ids', desc: 'List of encoded organization IDs.' | ||
c.flag 'team_ids', desc: 'List of encoded workspace IDs.' | ||
c.flag 'user_ids', desc: 'List of encoded user IDs.' | ||
c.action do |_global_options, options, _args| | ||
puts JSON.dump(@client.workflows_triggers_permissions_set(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
41 changes: 41 additions & 0 deletions
41
lib/slack/web/api/endpoints/admin_workflows_triggers_types_permissions.rb
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,41 @@ | ||
# frozen_string_literal: true | ||
# This file was auto-generated by lib/tasks/web.rake | ||
|
||
module Slack | ||
module Web | ||
module Api | ||
module Endpoints | ||
module AdminWorkflowsTriggersTypesPermissions | ||
# | ||
# list the permissions for using each trigger type in workflow builder | ||
# | ||
# @option options [array] :trigger_type_ids | ||
# The trigger types IDs for which to get the permissions. | ||
# @see https://api.slack.com/methods/admin.workflows.triggers.types.permissions.lookup | ||
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.workflows.triggers.types.permissions/admin.workflows.triggers.types.permissions.lookup.json | ||
def admin_workflows_triggers_types_permissions_lookup(options = {}) | ||
raise ArgumentError, 'Required arguments :trigger_type_ids missing' if options[:trigger_type_ids].nil? | ||
post('admin.workflows.triggers.types.permissions.lookup', options) | ||
end | ||
|
||
# | ||
# Set the permissions for using a trigger type in workflow builder | ||
# | ||
# @option options [Object] :id | ||
# The trigger type ID for which to set the permissions. | ||
# @option options [enum] :visibility | ||
# The function visibility. | ||
# @option options [array] :user_ids | ||
# List of user IDs to allow for named_entities visibility. | ||
# @see https://api.slack.com/methods/admin.workflows.triggers.types.permissions.set | ||
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.workflows.triggers.types.permissions/admin.workflows.triggers.types.permissions.set.json | ||
def admin_workflows_triggers_types_permissions_set(options = {}) | ||
raise ArgumentError, 'Required arguments :id missing' if options[:id].nil? | ||
raise ArgumentError, 'Required arguments :visibility missing' if options[:visibility].nil? | ||
post('admin.workflows.triggers.types.permissions.set', 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
Oops, something went wrong.