slack-ruby/slack-ruby-client

View on GitHub
lib/slack/web/api/endpoints/workflows_triggers_permissions.rb

Summary

Maintainability
A
0 mins
Test Coverage
# frozen_string_literal: true
# This file was auto-generated by lib/tasks/web.rake

module Slack
  module Web
    module Api
      module Endpoints
        module WorkflowsTriggersPermissions
          #
          # Allows users to run a trigger that has its permission type set to named_entities
          #
          # @option options [string] :trigger_id
          #   Encoded ID of the trigger.
          # @option options [array] :channel_ids
          #   List of encoded channel IDs.
          # @option options [array] :org_ids
          #   List of encoded organization IDs.
          # @option options [array] :team_ids
          #   List of encoded workspace IDs.
          # @option options [array] :user_ids
          #   List of encoded user IDs.
          # @see https://api.slack.com/methods/workflows.triggers.permissions.add
          # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/workflows.triggers.permissions/workflows.triggers.permissions.add.json
          def workflows_triggers_permissions_add(options = {})
            raise ArgumentError, 'Required arguments :trigger_id missing' if options[:trigger_id].nil?
            post('workflows.triggers.permissions.add', options)
          end

          #
          # Returns the permission type of a trigger and if applicable, includes the entities that have been granted access
          #
          # @option options [string] :trigger_id
          #   Encoded ID of the trigger.
          # @see https://api.slack.com/methods/workflows.triggers.permissions.list
          # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/workflows.triggers.permissions/workflows.triggers.permissions.list.json
          def workflows_triggers_permissions_list(options = {})
            raise ArgumentError, 'Required arguments :trigger_id missing' if options[:trigger_id].nil?
            post('workflows.triggers.permissions.list', options)
          end

          #
          # Revoke an entity's access to a trigger that has its permission type set to named_entities
          #
          # @option options [string] :trigger_id
          #   Encoded ID of the trigger.
          # @option options [array] :channel_ids
          #   List of encoded channel IDs.
          # @option options [array] :org_ids
          #   List of encoded organization IDs.
          # @option options [array] :team_ids
          #   List of encoded workspace IDs.
          # @option options [array] :user_ids
          #   List of encoded user IDs.
          # @see https://api.slack.com/methods/workflows.triggers.permissions.remove
          # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/workflows.triggers.permissions/workflows.triggers.permissions.remove.json
          def workflows_triggers_permissions_remove(options = {})
            raise ArgumentError, 'Required arguments :trigger_id missing' if options[:trigger_id].nil?
            post('workflows.triggers.permissions.remove', options)
          end

          #
          # Set the permission type for who can run a trigger
          #
          # @option options [enum] :permission_type
          #   The type of permission that defines who can run a trigger.
          # @option options [string] :trigger_id
          #   Encoded ID of the trigger.
          # @option options [array] :channel_ids
          #   List of encoded channel IDs.
          # @option options [array] :org_ids
          #   List of encoded organization IDs.
          # @option options [array] :team_ids
          #   List of encoded workspace IDs.
          # @option options [array] :user_ids
          #   List of encoded user IDs.
          # @see https://api.slack.com/methods/workflows.triggers.permissions.set
          # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/workflows.triggers.permissions/workflows.triggers.permissions.set.json
          def workflows_triggers_permissions_set(options = {})
            raise ArgumentError, 'Required arguments :permission_type missing' if options[:permission_type].nil?
            raise ArgumentError, 'Required arguments :trigger_id missing' if options[:trigger_id].nil?
            post('workflows.triggers.permissions.set', options)
          end
        end
      end
    end
  end
end