Sha256: ab89578b70aa618c948314ee5173414855d26086a7bbc0dfcada242646ca244e

Contents?: true

Size: 1.93 KB

Versions: 2

Compression:

Stored size: 1.93 KB

Contents

# frozen_string_literal: true
# This file was auto-generated by lib/tasks/web.rake

desc 'AdminUsersSession methods.'
command 'admin_users_session' do |g|
  g.desc 'Revoke a single session for a user. The user will be forced to login to Slack.'
  g.long_desc %( Revoke a single session for a user. The user will be forced to login to Slack. )
  g.command 'invalidate' do |c|
    c.flag 'session_id', desc: 'ID of the session to invalidate.'
    c.flag 'team_id', desc: 'ID of the workspace that the session belongs to.'
    c.action do |_global_options, options, _args|
      puts JSON.dump($client.admin_users_session_invalidate(options))
    end
  end

  g.desc 'List active user sessions for an organization'
  g.long_desc %( List active user sessions for an organization )
  g.command 'list' do |c|
    c.flag 'cursor', desc: 'Set cursor to next_cursor returned by the previous call to list items in the next page.'
    c.flag 'limit', desc: 'The maximum number of items to return. Must be between 1 - 1000 both inclusive.'
    c.flag 'team_id', desc: "The ID of the workspace you'd like active sessions for. If you pass a team_id, you'll need to pass a user_id as well."
    c.flag 'user_id', desc: "The ID of user you'd like active sessions for. If you pass a user_id, you'll need to pass a team_id as well."
    c.action do |_global_options, options, _args|
      puts JSON.dump($client.admin_users_session_list(options))
    end
  end

  g.desc 'Wipes all valid sessions on all devices for a given user'
  g.long_desc %( Wipes all valid sessions on all devices for a given user )
  g.command 'reset' do |c|
    c.flag 'user_id', desc: 'The ID of the user to wipe sessions for.'
    c.flag 'mobile_only', desc: 'Only expire mobile sessions (default: false).'
    c.flag 'web_only', desc: 'Only expire web sessions (default: false).'
    c.action do |_global_options, options, _args|
      puts JSON.dump($client.admin_users_session_reset(options))
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
slack-ruby-client-0.17.0 bin/commands/admin_users_session.rb
slack-ruby-client-0.16.0 bin/commands/admin_users_session.rb