slack-ruby/slack-ruby-client

View on GitHub
lib/slack/web/api/endpoints/functions_distributions_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 FunctionsDistributionsPermissions
          #
          # Grant users access to a custom slack function if its permission_type is set to named_entities
          #
          # @option options [string] :function_app_id
          #   The encoded ID of the app.
          # @option options [string] :function_callback_id
          #   The callback ID defined in the function's definition file.
          # @option options [string] :function_id
          #   The encoded ID of the function.
          # @option options [array] :user_ids
          #   List of encoded user IDs.
          # @see https://api.slack.com/methods/functions.distributions.permissions.add
          # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/functions.distributions.permissions/functions.distributions.permissions.add.json
          def functions_distributions_permissions_add(options = {})
            post('functions.distributions.permissions.add', options)
          end

          #
          # List the access type of a custom slack function and include the users with access if its permission_type is set to named_entities
          #
          # @option options [string] :function_app_id
          #   The encoded ID of the app.
          # @option options [string] :function_callback_id
          #   The callback ID defined in the function's definition file.
          # @option options [string] :function_id
          #   The encoded ID of the function.
          # @see https://api.slack.com/methods/functions.distributions.permissions.list
          # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/functions.distributions.permissions/functions.distributions.permissions.list.json
          def functions_distributions_permissions_list(options = {})
            post('functions.distributions.permissions.list', options)
          end

          #
          # Revoke user access to a custom slack function if permission_type set to named_entities
          #
          # @option options [string] :function_app_id
          #   The encoded ID of the app.
          # @option options [string] :function_callback_id
          #   The callback ID defined in the function's definition file.
          # @option options [string] :function_id
          #   The encoded ID of the function.
          # @option options [array] :user_ids
          #   List of encoded user IDs.
          # @see https://api.slack.com/methods/functions.distributions.permissions.remove
          # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/functions.distributions.permissions/functions.distributions.permissions.remove.json
          def functions_distributions_permissions_remove(options = {})
            post('functions.distributions.permissions.remove', options)
          end

          #
          # Set the access type of a custom slack function and define the users to be granted access if permission_type is set to named_entities
          #
          # @option options [enum] :permission_type
          #   The type of permission that defines how the function can be distributed.
          # @option options [string] :function_app_id
          #   The encoded ID of the app.
          # @option options [string] :function_callback_id
          #   The callback ID defined in the function's definition file.
          # @option options [string] :function_id
          #   The encoded ID of the function.
          # @option options [array] :user_ids
          #   List of encoded user IDs.
          # @see https://api.slack.com/methods/functions.distributions.permissions.set
          # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/functions.distributions.permissions/functions.distributions.permissions.set.json
          def functions_distributions_permissions_set(options = {})
            post('functions.distributions.permissions.set', options)
          end
        end
      end
    end
  end
end