Module: Slack::Web::Api::Endpoints::WorkflowsTriggersPermissions

Included in:
Slack::Web::Api::Endpoints
Defined in:
lib/slack/web/api/endpoints/workflows_triggers_permissions.rb

Instance Method Summary collapse

Instance Method Details

#workflows_triggers_permissions_add(options = {}) ⇒ Object

Allows users to run a trigger that has its permission type set to named_entities

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :trigger_id (string)

    Encoded ID of the trigger.

  • :channel_ids (array)

    List of encoded channel IDs.

  • :org_ids (array)

    List of encoded organization IDs.

  • :team_ids (array)

    List of encoded workspace IDs.

  • :user_ids (array)

    List of encoded user IDs.

Raises:

  • (ArgumentError)

See Also:



24
25
26
27
# File 'lib/slack/web/api/endpoints/workflows_triggers_permissions.rb', line 24

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

#workflows_triggers_permissions_list(options = {}) ⇒ Object

Returns the permission type of a trigger and if applicable, includes the entities that have been granted access

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :trigger_id (string)

    Encoded ID of the trigger.

Raises:

  • (ArgumentError)

See Also:



36
37
38
39
# File 'lib/slack/web/api/endpoints/workflows_triggers_permissions.rb', line 36

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

#workflows_triggers_permissions_remove(options = {}) ⇒ Object

Revoke an entity’s access to a trigger that has its permission type set to named_entities

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :trigger_id (string)

    Encoded ID of the trigger.

  • :channel_ids (array)

    List of encoded channel IDs.

  • :org_ids (array)

    List of encoded organization IDs.

  • :team_ids (array)

    List of encoded workspace IDs.

  • :user_ids (array)

    List of encoded user IDs.

Raises:

  • (ArgumentError)

See Also:



56
57
58
59
# File 'lib/slack/web/api/endpoints/workflows_triggers_permissions.rb', line 56

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

#workflows_triggers_permissions_set(options = {}) ⇒ Object

Set the permission type for who can run a trigger

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :permission_type (enum)

    The type of permission that defines who can run a trigger.

  • :trigger_id (string)

    Encoded ID of the trigger.

  • :channel_ids (array)

    List of encoded channel IDs.

  • :org_ids (array)

    List of encoded organization IDs.

  • :team_ids (array)

    List of encoded workspace IDs.

  • :user_ids (array)

    List of encoded user IDs.

Raises:

  • (ArgumentError)

See Also:



78
79
80
81
82
# File 'lib/slack/web/api/endpoints/workflows_triggers_permissions.rb', line 78

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