slack-ruby-client 2.0.0 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (105) hide show
  1. checksums.yaml +4 -4
  2. data/.github/FUNDING.yml +1 -0
  3. data/.github/workflows/integration_test.yml +19 -0
  4. data/.github/workflows/pr_lint.yml +1 -1
  5. data/.github/workflows/test.yml +1 -0
  6. data/CHANGELOG.md +9 -0
  7. data/README.md +18 -14
  8. data/SECURITY.md +9 -0
  9. data/bin/commands/admin_analytics.rb +16 -10
  10. data/bin/commands/admin_apps.rb +48 -42
  11. data/bin/commands/admin_apps_approved.rb +17 -11
  12. data/bin/commands/admin_apps_requests.rb +27 -21
  13. data/bin/commands/admin_apps_restricted.rb +17 -11
  14. data/bin/commands/admin_audit_anomaly_allow.rb +22 -16
  15. data/bin/commands/admin_auth_policy.rb +37 -31
  16. data/bin/commands/admin_barriers.rb +44 -38
  17. data/bin/commands/admin_conversations.rb +221 -165
  18. data/bin/commands/admin_conversations_ekm.rb +17 -11
  19. data/bin/commands/admin_conversations_restrictAccess.rb +35 -29
  20. data/bin/commands/admin_emoji.rb +50 -44
  21. data/bin/commands/admin_inviteRequests.rb +34 -28
  22. data/bin/commands/admin_inviteRequests_approved.rb +16 -10
  23. data/bin/commands/admin_inviteRequests_denied.rb +16 -10
  24. data/bin/commands/admin_roles.rb +46 -0
  25. data/bin/commands/admin_teams.rb +26 -20
  26. data/bin/commands/admin_teams_admins.rb +16 -10
  27. data/bin/commands/admin_teams_owners.rb +16 -10
  28. data/bin/commands/admin_teams_settings.rb +59 -53
  29. data/bin/commands/admin_usergroups.rb +45 -39
  30. data/bin/commands/admin_users.rb +91 -85
  31. data/bin/commands/admin_users_session.rb +72 -66
  32. data/bin/commands/admin_users_unsupportedVersions.rb +15 -9
  33. data/bin/commands/api.rb +14 -8
  34. data/bin/commands/apps.rb +15 -9
  35. data/bin/commands/apps_connections.rb +13 -7
  36. data/bin/commands/apps_event_authorizations.rb +16 -10
  37. data/bin/commands/apps_manifest.rb +48 -42
  38. data/bin/commands/auth.rb +21 -15
  39. data/bin/commands/auth_teams.rb +16 -10
  40. data/bin/commands/bookmarks.rb +50 -44
  41. data/bin/commands/bots.rb +15 -9
  42. data/bin/commands/calls.rb +49 -43
  43. data/bin/commands/calls_participants.rb +24 -18
  44. data/bin/commands/chat.rb +150 -144
  45. data/bin/commands/chat_scheduledMessages.rb +19 -13
  46. data/bin/commands/conversations.rb +233 -227
  47. data/bin/commands/dialog.rb +15 -9
  48. data/bin/commands/dnd.rb +46 -40
  49. data/bin/commands/emoji.rb +14 -7
  50. data/bin/commands/files.rb +110 -105
  51. data/bin/commands/files_comments.rb +15 -9
  52. data/bin/commands/files_remote.rb +73 -67
  53. data/bin/commands/functions_workflows_steps.rb +22 -0
  54. data/bin/commands/functions_workflows_steps_responses.rb +22 -0
  55. data/bin/commands/migration.rb +16 -10
  56. data/bin/commands/oauth.rb +18 -12
  57. data/bin/commands/oauth_v2.rb +28 -22
  58. data/bin/commands/openid_connect.rb +26 -20
  59. data/bin/commands/pins.rb +33 -26
  60. data/bin/commands/reactions.rb +52 -46
  61. data/bin/commands/reminders.rb +53 -47
  62. data/bin/commands/rtm.rb +15 -9
  63. data/bin/commands/search.rb +43 -37
  64. data/bin/commands/stars.rb +38 -32
  65. data/bin/commands/team.rb +47 -39
  66. data/bin/commands/team_billing.rb +13 -7
  67. data/bin/commands/team_preferences.rb +13 -7
  68. data/bin/commands/team_profile.rb +14 -8
  69. data/bin/commands/tooling_tokens.rb +14 -8
  70. data/bin/commands/usergroups.rb +64 -58
  71. data/bin/commands/usergroups_users.rb +27 -21
  72. data/bin/commands/users.rb +111 -105
  73. data/bin/commands/users_admin.rb +28 -22
  74. data/bin/commands/users_prefs.rb +13 -7
  75. data/bin/commands/users_profile.rb +26 -20
  76. data/bin/commands/views.rb +47 -41
  77. data/bin/commands/workflows.rb +36 -30
  78. data/bin/slack +48 -43
  79. data/lib/slack/version.rb +1 -1
  80. data/lib/slack/web/api/endpoints/admin_analytics.rb +1 -1
  81. data/lib/slack/web/api/endpoints/admin_apps_requests.rb +1 -1
  82. data/lib/slack/web/api/endpoints/admin_conversations.rb +78 -0
  83. data/lib/slack/web/api/endpoints/admin_roles.rb +73 -0
  84. data/lib/slack/web/api/endpoints/chat.rb +2 -2
  85. data/lib/slack/web/api/endpoints/conversations.rb +1 -1
  86. data/lib/slack/web/api/endpoints/emoji.rb +2 -0
  87. data/lib/slack/web/api/endpoints/files.rb +0 -2
  88. data/lib/slack/web/api/endpoints/functions_workflows_steps.rb +28 -0
  89. data/lib/slack/web/api/endpoints/functions_workflows_steps_responses.rb +28 -0
  90. data/lib/slack/web/api/endpoints/pins.rb +2 -0
  91. data/lib/slack/web/api/endpoints/team.rb +11 -1
  92. data/lib/slack/web/api/endpoints/usergroups.rb +1 -1
  93. data/lib/slack/web/api/endpoints/users_profile.rb +1 -1
  94. data/lib/slack/web/api/endpoints.rb +6 -0
  95. data/lib/slack/web/api/errors.rb +62 -0
  96. data/lib/slack/web/api/templates/command.erb +18 -12
  97. data/lib/tasks/web.rake +0 -6
  98. data/slack-ruby-client.gemspec +0 -1
  99. data/spec/slack/web/api/endpoints/admin_conversations_spec.rb +31 -0
  100. data/spec/slack/web/api/endpoints/admin_roles_spec.rb +30 -0
  101. data/spec/slack/web/api/endpoints/functions_workflows_steps_responses_spec.rb +13 -0
  102. data/spec/slack/web/api/endpoints/functions_workflows_steps_spec.rb +13 -0
  103. metadata +13 -19
  104. data/bin/commands.rb +0 -69
  105. data/lib/slack/web/api/templates/commands.erb +0 -6
@@ -1,37 +1,43 @@
1
1
  # frozen_string_literal: true
2
2
  # This file was auto-generated by lib/tasks/web.rake
3
3
 
4
- desc 'AdminConversationsRestrictaccess methods.'
5
- command 'admin_conversations_restrictAccess' do |g|
6
- g.desc 'Add an allowlist of IDP groups for accessing a channel'
7
- g.long_desc %( Add an allowlist of IDP groups for accessing a channel )
8
- g.command 'addGroup' do |c|
9
- c.flag 'channel_id', desc: 'The channel to link this group to.'
10
- c.flag 'group_id', desc: 'The IDP Group ID to be an allowlist for the private channel.'
11
- c.flag 'team_id', desc: 'The workspace where the channel exists. This argument is required for channels only tied to one workspace, and optional for channels that are shared across an organization.'
12
- c.action do |_global_options, options, _args|
13
- puts JSON.dump($client.admin_conversations_restrictAccess_addGroup(options))
14
- end
15
- end
4
+ module Slack
5
+ module Cli
6
+ class App
7
+ desc 'AdminConversationsRestrictaccess methods.'
8
+ command 'admin_conversations_restrictAccess' do |g|
9
+ g.desc 'Add an allowlist of IDP groups for accessing a channel'
10
+ g.long_desc %( Add an allowlist of IDP groups for accessing a channel )
11
+ g.command 'addGroup' do |c|
12
+ c.flag 'channel_id', desc: 'The channel to link this group to.'
13
+ c.flag 'group_id', desc: 'The IDP Group ID to be an allowlist for the private channel.'
14
+ c.flag 'team_id', desc: 'The workspace where the channel exists. This argument is required for channels only tied to one workspace, and optional for channels that are shared across an organization.'
15
+ c.action do |_global_options, options, _args|
16
+ puts JSON.dump(@client.admin_conversations_restrictAccess_addGroup(options))
17
+ end
18
+ end
16
19
 
17
- g.desc 'List all IDP Groups linked to a channel'
18
- g.long_desc %( List all IDP Groups linked to a channel )
19
- g.command 'listGroups' do |c|
20
- c.flag 'channel_id', desc: '.'
21
- c.flag 'team_id', desc: 'The workspace where the channel exists. This argument is required for channels only tied to one workspace, and optional for channels that are shared across an organization.'
22
- c.action do |_global_options, options, _args|
23
- puts JSON.dump($client.admin_conversations_restrictAccess_listGroups(options))
24
- end
25
- end
20
+ g.desc 'List all IDP Groups linked to a channel'
21
+ g.long_desc %( List all IDP Groups linked to a channel )
22
+ g.command 'listGroups' do |c|
23
+ c.flag 'channel_id', desc: '.'
24
+ c.flag 'team_id', desc: 'The workspace where the channel exists. This argument is required for channels only tied to one workspace, and optional for channels that are shared across an organization.'
25
+ c.action do |_global_options, options, _args|
26
+ puts JSON.dump(@client.admin_conversations_restrictAccess_listGroups(options))
27
+ end
28
+ end
26
29
 
27
- g.desc 'Remove a linked IDP group linked from a private channel'
28
- g.long_desc %( Remove a linked IDP group linked from a private channel )
29
- g.command 'removeGroup' do |c|
30
- c.flag 'channel_id', desc: 'The channel to remove the linked group from.'
31
- c.flag 'group_id', desc: 'The IDP Group ID to remove from the private channel.'
32
- c.flag 'team_id', desc: 'The workspace where the channel exists. This argument is required for channels only tied to one workspace, and optional for channels that are shared across an organization.'
33
- c.action do |_global_options, options, _args|
34
- puts JSON.dump($client.admin_conversations_restrictAccess_removeGroup(options))
30
+ g.desc 'Remove a linked IDP group linked from a private channel'
31
+ g.long_desc %( Remove a linked IDP group linked from a private channel )
32
+ g.command 'removeGroup' do |c|
33
+ c.flag 'channel_id', desc: 'The channel to remove the linked group from.'
34
+ c.flag 'group_id', desc: 'The IDP Group ID to remove from the private channel.'
35
+ c.flag 'team_id', desc: 'The workspace where the channel exists. This argument is required for channels only tied to one workspace, and optional for channels that are shared across an organization.'
36
+ c.action do |_global_options, options, _args|
37
+ puts JSON.dump(@client.admin_conversations_restrictAccess_removeGroup(options))
38
+ end
39
+ end
40
+ end
35
41
  end
36
42
  end
37
43
  end
@@ -1,54 +1,60 @@
1
1
  # frozen_string_literal: true
2
2
  # This file was auto-generated by lib/tasks/web.rake
3
3
 
4
- desc 'AdminEmoji methods.'
5
- command 'admin_emoji' do |g|
6
- g.desc 'Add an emoji.'
7
- g.long_desc %( Add an emoji. )
8
- g.command 'add' do |c|
9
- c.flag 'name', desc: 'The name of the emoji to be added. Colons (:myemoji:) around the value are not required, although they may be included.'
10
- c.flag 'url', desc: 'The URL of a file to use as an image for the emoji. Square images under 128KB and with transparent backgrounds work best.'
11
- c.action do |_global_options, options, _args|
12
- puts JSON.dump($client.admin_emoji_add(options))
13
- end
14
- end
4
+ module Slack
5
+ module Cli
6
+ class App
7
+ desc 'AdminEmoji methods.'
8
+ command 'admin_emoji' do |g|
9
+ g.desc 'Add an emoji.'
10
+ g.long_desc %( Add an emoji. )
11
+ g.command 'add' do |c|
12
+ c.flag 'name', desc: 'The name of the emoji to be added. Colons (:myemoji:) around the value are not required, although they may be included.'
13
+ c.flag 'url', desc: 'The URL of a file to use as an image for the emoji. Square images under 128KB and with transparent backgrounds work best.'
14
+ c.action do |_global_options, options, _args|
15
+ puts JSON.dump(@client.admin_emoji_add(options))
16
+ end
17
+ end
15
18
 
16
- g.desc 'Add an emoji alias.'
17
- g.long_desc %( Add an emoji alias. )
18
- g.command 'addAlias' do |c|
19
- c.flag 'alias_for', desc: 'Name of the emoji for which the alias is being made. Any wrapping whitespace or colons will be automatically trimmed.'
20
- c.flag 'name', desc: 'The new alias for the specified emoji. Any wrapping whitespace or colons will be automatically trimmed.'
21
- c.action do |_global_options, options, _args|
22
- puts JSON.dump($client.admin_emoji_addAlias(options))
23
- end
24
- end
19
+ g.desc 'Add an emoji alias.'
20
+ g.long_desc %( Add an emoji alias. )
21
+ g.command 'addAlias' do |c|
22
+ c.flag 'alias_for', desc: 'Name of the emoji for which the alias is being made. Any wrapping whitespace or colons will be automatically trimmed.'
23
+ c.flag 'name', desc: 'The new alias for the specified emoji. Any wrapping whitespace or colons will be automatically trimmed.'
24
+ c.action do |_global_options, options, _args|
25
+ puts JSON.dump(@client.admin_emoji_addAlias(options))
26
+ end
27
+ end
25
28
 
26
- g.desc 'List emoji for an Enterprise Grid organization.'
27
- g.long_desc %( List emoji for an Enterprise Grid organization. )
28
- g.command 'list' do |c|
29
- c.flag 'cursor', desc: 'Set cursor to next_cursor returned by the previous call to list items in the next page.'
30
- c.flag 'limit', desc: 'The maximum number of items to return. Must be between 1 - 1000 both inclusive.'
31
- c.action do |_global_options, options, _args|
32
- puts JSON.dump($client.admin_emoji_list(options))
33
- end
34
- end
29
+ g.desc 'List emoji for an Enterprise Grid organization.'
30
+ g.long_desc %( List emoji for an Enterprise Grid organization. )
31
+ g.command 'list' do |c|
32
+ c.flag 'cursor', desc: 'Set cursor to next_cursor returned by the previous call to list items in the next page.'
33
+ c.flag 'limit', desc: 'The maximum number of items to return. Must be between 1 - 1000 both inclusive.'
34
+ c.action do |_global_options, options, _args|
35
+ puts JSON.dump(@client.admin_emoji_list(options))
36
+ end
37
+ end
35
38
 
36
- g.desc 'Remove an emoji across an Enterprise Grid organization'
37
- g.long_desc %( Remove an emoji across an Enterprise Grid organization )
38
- g.command 'remove' do |c|
39
- c.flag 'name', desc: 'The name of the emoji to be removed. Colons (:myemoji:) around the value are not required, although they may be included.'
40
- c.action do |_global_options, options, _args|
41
- puts JSON.dump($client.admin_emoji_remove(options))
42
- end
43
- end
39
+ g.desc 'Remove an emoji across an Enterprise Grid organization'
40
+ g.long_desc %( Remove an emoji across an Enterprise Grid organization )
41
+ g.command 'remove' do |c|
42
+ c.flag 'name', desc: 'The name of the emoji to be removed. Colons (:myemoji:) around the value are not required, although they may be included.'
43
+ c.action do |_global_options, options, _args|
44
+ puts JSON.dump(@client.admin_emoji_remove(options))
45
+ end
46
+ end
44
47
 
45
- g.desc 'Rename an emoji.'
46
- g.long_desc %( Rename an emoji. )
47
- g.command 'rename' do |c|
48
- c.flag 'name', desc: 'The name of the emoji to be renamed. Colons (:myemoji:) around the value are not required, although they may be included.'
49
- c.flag 'new_name', desc: 'The new name of the emoji.'
50
- c.action do |_global_options, options, _args|
51
- puts JSON.dump($client.admin_emoji_rename(options))
48
+ g.desc 'Rename an emoji.'
49
+ g.long_desc %( Rename an emoji. )
50
+ g.command 'rename' do |c|
51
+ c.flag 'name', desc: 'The name of the emoji to be renamed. Colons (:myemoji:) around the value are not required, although they may be included.'
52
+ c.flag 'new_name', desc: 'The new name of the emoji.'
53
+ c.action do |_global_options, options, _args|
54
+ puts JSON.dump(@client.admin_emoji_rename(options))
55
+ end
56
+ end
57
+ end
52
58
  end
53
59
  end
54
60
  end
@@ -1,36 +1,42 @@
1
1
  # frozen_string_literal: true
2
2
  # This file was auto-generated by lib/tasks/web.rake
3
3
 
4
- desc 'AdminInviterequests methods.'
5
- command 'admin_inviteRequests' do |g|
6
- g.desc 'Approve a workspace invite request.'
7
- g.long_desc %( Approve a workspace invite request. )
8
- g.command 'approve' do |c|
9
- c.flag 'invite_request_id', desc: 'ID of the request to invite.'
10
- c.flag 'team_id', desc: 'ID for the workspace where the invite request was made.'
11
- c.action do |_global_options, options, _args|
12
- puts JSON.dump($client.admin_inviteRequests_approve(options))
13
- end
14
- end
4
+ module Slack
5
+ module Cli
6
+ class App
7
+ desc 'AdminInviterequests methods.'
8
+ command 'admin_inviteRequests' do |g|
9
+ g.desc 'Approve a workspace invite request.'
10
+ g.long_desc %( Approve a workspace invite request. )
11
+ g.command 'approve' do |c|
12
+ c.flag 'invite_request_id', desc: 'ID of the request to invite.'
13
+ c.flag 'team_id', desc: 'ID for the workspace where the invite request was made.'
14
+ c.action do |_global_options, options, _args|
15
+ puts JSON.dump(@client.admin_inviteRequests_approve(options))
16
+ end
17
+ end
15
18
 
16
- g.desc 'Deny a workspace invite request.'
17
- g.long_desc %( Deny a workspace invite request. )
18
- g.command 'deny' do |c|
19
- c.flag 'invite_request_id', desc: 'ID of the request to invite.'
20
- c.flag 'team_id', desc: 'ID for the workspace where the invite request was made.'
21
- c.action do |_global_options, options, _args|
22
- puts JSON.dump($client.admin_inviteRequests_deny(options))
23
- end
24
- end
19
+ g.desc 'Deny a workspace invite request.'
20
+ g.long_desc %( Deny a workspace invite request. )
21
+ g.command 'deny' do |c|
22
+ c.flag 'invite_request_id', desc: 'ID of the request to invite.'
23
+ c.flag 'team_id', desc: 'ID for the workspace where the invite request was made.'
24
+ c.action do |_global_options, options, _args|
25
+ puts JSON.dump(@client.admin_inviteRequests_deny(options))
26
+ end
27
+ end
25
28
 
26
- g.desc 'List all pending workspace invite requests.'
27
- g.long_desc %( List all pending workspace invite requests. )
28
- g.command 'list' do |c|
29
- c.flag 'cursor', desc: 'Value of the next_cursor field sent as part of the previous API response.'
30
- c.flag 'limit', desc: 'The number of results that will be returned by the API on each invocation. Must be between 1 - 1000, both inclusive.'
31
- c.flag 'team_id', desc: 'ID for the workspace where the invite requests were made.'
32
- c.action do |_global_options, options, _args|
33
- puts JSON.dump($client.admin_inviteRequests_list(options))
29
+ g.desc 'List all pending workspace invite requests.'
30
+ g.long_desc %( List all pending workspace invite requests. )
31
+ g.command 'list' do |c|
32
+ c.flag 'cursor', desc: 'Value of the next_cursor field sent as part of the previous API response.'
33
+ c.flag 'limit', desc: 'The number of results that will be returned by the API on each invocation. Must be between 1 - 1000, both inclusive.'
34
+ c.flag 'team_id', desc: 'ID for the workspace where the invite requests were made.'
35
+ c.action do |_global_options, options, _args|
36
+ puts JSON.dump(@client.admin_inviteRequests_list(options))
37
+ end
38
+ end
39
+ end
34
40
  end
35
41
  end
36
42
  end
@@ -1,16 +1,22 @@
1
1
  # frozen_string_literal: true
2
2
  # This file was auto-generated by lib/tasks/web.rake
3
3
 
4
- desc 'AdminInviterequestsApproved methods.'
5
- command 'admin_inviteRequests_approved' do |g|
6
- g.desc 'List all approved workspace invite requests.'
7
- g.long_desc %( List all approved workspace invite requests. )
8
- g.command 'list' do |c|
9
- c.flag 'cursor', desc: 'Value of the next_cursor field sent as part of the previous API response.'
10
- c.flag 'limit', desc: 'The number of results that will be returned by the API on each invocation. Must be between 1 - 1000, both inclusive.'
11
- c.flag 'team_id', desc: 'ID for the workspace where the invite requests were made.'
12
- c.action do |_global_options, options, _args|
13
- puts JSON.dump($client.admin_inviteRequests_approved_list(options))
4
+ module Slack
5
+ module Cli
6
+ class App
7
+ desc 'AdminInviterequestsApproved methods.'
8
+ command 'admin_inviteRequests_approved' do |g|
9
+ g.desc 'List all approved workspace invite requests.'
10
+ g.long_desc %( List all approved workspace invite requests. )
11
+ g.command 'list' do |c|
12
+ c.flag 'cursor', desc: 'Value of the next_cursor field sent as part of the previous API response.'
13
+ c.flag 'limit', desc: 'The number of results that will be returned by the API on each invocation. Must be between 1 - 1000, both inclusive.'
14
+ c.flag 'team_id', desc: 'ID for the workspace where the invite requests were made.'
15
+ c.action do |_global_options, options, _args|
16
+ puts JSON.dump(@client.admin_inviteRequests_approved_list(options))
17
+ end
18
+ end
19
+ end
14
20
  end
15
21
  end
16
22
  end
@@ -1,16 +1,22 @@
1
1
  # frozen_string_literal: true
2
2
  # This file was auto-generated by lib/tasks/web.rake
3
3
 
4
- desc 'AdminInviterequestsDenied methods.'
5
- command 'admin_inviteRequests_denied' do |g|
6
- g.desc 'List all denied workspace invite requests.'
7
- g.long_desc %( List all denied workspace invite requests. )
8
- g.command 'list' do |c|
9
- c.flag 'cursor', desc: 'Value of the next_cursor field sent as part of the previous api response.'
10
- c.flag 'limit', desc: 'The number of results that will be returned by the API on each invocation. Must be between 1 - 1000 both inclusive.'
11
- c.flag 'team_id', desc: 'ID for the workspace where the invite requests were made.'
12
- c.action do |_global_options, options, _args|
13
- puts JSON.dump($client.admin_inviteRequests_denied_list(options))
4
+ module Slack
5
+ module Cli
6
+ class App
7
+ desc 'AdminInviterequestsDenied methods.'
8
+ command 'admin_inviteRequests_denied' do |g|
9
+ g.desc 'List all denied workspace invite requests.'
10
+ g.long_desc %( List all denied workspace invite requests. )
11
+ g.command 'list' do |c|
12
+ c.flag 'cursor', desc: 'Value of the next_cursor field sent as part of the previous api response.'
13
+ c.flag 'limit', desc: 'The number of results that will be returned by the API on each invocation. Must be between 1 - 1000 both inclusive.'
14
+ c.flag 'team_id', desc: 'ID for the workspace where the invite requests were made.'
15
+ c.action do |_global_options, options, _args|
16
+ puts JSON.dump(@client.admin_inviteRequests_denied_list(options))
17
+ end
18
+ end
19
+ end
14
20
  end
15
21
  end
16
22
  end
@@ -0,0 +1,46 @@
1
+ # frozen_string_literal: true
2
+ # This file was auto-generated by lib/tasks/web.rake
3
+
4
+ module Slack
5
+ module Cli
6
+ class App
7
+ desc 'AdminRoles methods.'
8
+ command 'admin_roles' do |g|
9
+ g.desc 'Adds members to the specified role with the specified scopes'
10
+ g.long_desc %( Adds members to the specified role with the specified scopes )
11
+ g.command 'addAssignments' do |c|
12
+ c.flag 'entity_ids', desc: 'List of the entity IDs for which roles will be assigned. These can be Org IDs, Team IDs or Channel IDs.'
13
+ c.flag 'role_id', desc: 'ID of the role to which users will be assigned.'
14
+ c.flag 'user_ids', desc: 'List of IDs from the users to be added to the given role.'
15
+ c.action do |_global_options, options, _args|
16
+ puts JSON.dump(@client.admin_roles_addAssignments(options))
17
+ end
18
+ end
19
+
20
+ g.desc 'Lists assignments for all roles across entities. Options to scope results by any combination of roles or entities'
21
+ g.long_desc %( Lists assignments for all roles across entities. Options to scope results by any combination of roles or entities )
22
+ g.command 'listAssignments' do |c|
23
+ c.flag 'cursor', desc: 'Set cursor to next_cursor returned by the previous call to list items in the next page.'
24
+ c.flag 'entity_ids', desc: 'The entities for which the roles apply.'
25
+ c.flag 'limit', desc: 'The maximum number of items to return. Must be between 1 - 100 both inclusive.'
26
+ c.flag 'role_ids', desc: 'collection of role ids to scope results by.'
27
+ c.flag 'sort_dir', desc: 'Sort direction. Default is descending on date_create, can be either ASC or DESC.'
28
+ c.action do |_global_options, options, _args|
29
+ puts JSON.dump(@client.admin_roles_listAssignments(options))
30
+ end
31
+ end
32
+
33
+ g.desc 'Removes a set of users from a role for the given scopes and entities'
34
+ g.long_desc %( Removes a set of users from a role for the given scopes and entities )
35
+ g.command 'removeAssignments' do |c|
36
+ c.flag 'entity_ids', desc: 'List of the entity IDs for which roles will be revoked. These can be Org IDs, Team IDs or Channel IDs.'
37
+ c.flag 'role_id', desc: 'ID of the role to which users will be assigned.'
38
+ c.flag 'user_ids', desc: 'List of IDs of the users whose roles will be revoked.'
39
+ c.action do |_global_options, options, _args|
40
+ puts JSON.dump(@client.admin_roles_removeAssignments(options))
41
+ end
42
+ end
43
+ end
44
+ end
45
+ end
46
+ end
@@ -1,27 +1,33 @@
1
1
  # frozen_string_literal: true
2
2
  # This file was auto-generated by lib/tasks/web.rake
3
3
 
4
- desc 'AdminTeams methods.'
5
- command 'admin_teams' do |g|
6
- g.desc 'Create an Enterprise team.'
7
- g.long_desc %( Create an Enterprise team. )
8
- g.command 'create' do |c|
9
- c.flag 'team_domain', desc: 'Team domain (for example, slacksoftballteam). Domains are limited to 21 characters.'
10
- c.flag 'team_name', desc: 'Team name (for example, Slack Softball Team).'
11
- c.flag 'team_description', desc: 'Description for the team.'
12
- c.flag 'team_discoverability', desc: "Who can join the team. A team's discoverability can be open, closed, invite_only, or unlisted."
13
- c.action do |_global_options, options, _args|
14
- puts JSON.dump($client.admin_teams_create(options))
15
- end
16
- end
4
+ module Slack
5
+ module Cli
6
+ class App
7
+ desc 'AdminTeams methods.'
8
+ command 'admin_teams' do |g|
9
+ g.desc 'Create an Enterprise team.'
10
+ g.long_desc %( Create an Enterprise team. )
11
+ g.command 'create' do |c|
12
+ c.flag 'team_domain', desc: 'Team domain (for example, slacksoftballteam). Domains are limited to 21 characters.'
13
+ c.flag 'team_name', desc: 'Team name (for example, Slack Softball Team).'
14
+ c.flag 'team_description', desc: 'Description for the team.'
15
+ c.flag 'team_discoverability', desc: "Who can join the team. A team's discoverability can be open, closed, invite_only, or unlisted."
16
+ c.action do |_global_options, options, _args|
17
+ puts JSON.dump(@client.admin_teams_create(options))
18
+ end
19
+ end
17
20
 
18
- g.desc 'List all teams on an Enterprise organization'
19
- g.long_desc %( List all teams on an Enterprise organization )
20
- g.command 'list' do |c|
21
- c.flag 'cursor', desc: 'Set cursor to next_cursor returned by the previous call to list items in the next page.'
22
- c.flag 'limit', desc: 'The maximum number of items to return. Must be between 1 - 100 both inclusive.'
23
- c.action do |_global_options, options, _args|
24
- puts JSON.dump($client.admin_teams_list(options))
21
+ g.desc 'List all teams on an Enterprise organization'
22
+ g.long_desc %( List all teams on an Enterprise organization )
23
+ g.command 'list' do |c|
24
+ c.flag 'cursor', desc: 'Set cursor to next_cursor returned by the previous call to list items in the next page.'
25
+ c.flag 'limit', desc: 'The maximum number of items to return. Must be between 1 - 100 both inclusive.'
26
+ c.action do |_global_options, options, _args|
27
+ puts JSON.dump(@client.admin_teams_list(options))
28
+ end
29
+ end
30
+ end
25
31
  end
26
32
  end
27
33
  end
@@ -1,16 +1,22 @@
1
1
  # frozen_string_literal: true
2
2
  # This file was auto-generated by lib/tasks/web.rake
3
3
 
4
- desc 'AdminTeamsAdmins methods.'
5
- command 'admin_teams_admins' do |g|
6
- g.desc 'List all of the admins on a given workspace.'
7
- g.long_desc %( List all of the admins on a given workspace. )
8
- g.command 'list' do |c|
9
- c.flag 'team_id', desc: '.'
10
- c.flag 'cursor', desc: 'Set cursor to next_cursor returned by the previous call to list items in the next page.'
11
- c.flag 'limit', desc: 'The maximum number of items to return.'
12
- c.action do |_global_options, options, _args|
13
- puts JSON.dump($client.admin_teams_admins_list(options))
4
+ module Slack
5
+ module Cli
6
+ class App
7
+ desc 'AdminTeamsAdmins methods.'
8
+ command 'admin_teams_admins' do |g|
9
+ g.desc 'List all of the admins on a given workspace.'
10
+ g.long_desc %( List all of the admins on a given workspace. )
11
+ g.command 'list' do |c|
12
+ c.flag 'team_id', desc: '.'
13
+ c.flag 'cursor', desc: 'Set cursor to next_cursor returned by the previous call to list items in the next page.'
14
+ c.flag 'limit', desc: 'The maximum number of items to return.'
15
+ c.action do |_global_options, options, _args|
16
+ puts JSON.dump(@client.admin_teams_admins_list(options))
17
+ end
18
+ end
19
+ end
14
20
  end
15
21
  end
16
22
  end
@@ -1,16 +1,22 @@
1
1
  # frozen_string_literal: true
2
2
  # This file was auto-generated by lib/tasks/web.rake
3
3
 
4
- desc 'AdminTeamsOwners methods.'
5
- command 'admin_teams_owners' do |g|
6
- g.desc 'List all of the owners on a given workspace.'
7
- g.long_desc %( List all of the owners on a given workspace. )
8
- g.command 'list' do |c|
9
- c.flag 'team_id', desc: '.'
10
- c.flag 'cursor', desc: 'Set cursor to next_cursor returned by the previous call to list items in the next page.'
11
- c.flag 'limit', desc: 'The maximum number of items to return. Must be between 1 - 1000 both inclusive.'
12
- c.action do |_global_options, options, _args|
13
- puts JSON.dump($client.admin_teams_owners_list(options))
4
+ module Slack
5
+ module Cli
6
+ class App
7
+ desc 'AdminTeamsOwners methods.'
8
+ command 'admin_teams_owners' do |g|
9
+ g.desc 'List all of the owners on a given workspace.'
10
+ g.long_desc %( List all of the owners on a given workspace. )
11
+ g.command 'list' do |c|
12
+ c.flag 'team_id', desc: '.'
13
+ c.flag 'cursor', desc: 'Set cursor to next_cursor returned by the previous call to list items in the next page.'
14
+ c.flag 'limit', desc: 'The maximum number of items to return. Must be between 1 - 1000 both inclusive.'
15
+ c.action do |_global_options, options, _args|
16
+ puts JSON.dump(@client.admin_teams_owners_list(options))
17
+ end
18
+ end
19
+ end
14
20
  end
15
21
  end
16
22
  end
@@ -1,64 +1,70 @@
1
1
  # frozen_string_literal: true
2
2
  # This file was auto-generated by lib/tasks/web.rake
3
3
 
4
- desc 'AdminTeamsSettings methods.'
5
- command 'admin_teams_settings' do |g|
6
- g.desc 'Fetch information about settings in a workspace'
7
- g.long_desc %( Fetch information about settings in a workspace )
8
- g.command 'info' do |c|
9
- c.flag 'team_id', desc: '.'
10
- c.action do |_global_options, options, _args|
11
- puts JSON.dump($client.admin_teams_settings_info(options))
12
- end
13
- end
4
+ module Slack
5
+ module Cli
6
+ class App
7
+ desc 'AdminTeamsSettings methods.'
8
+ command 'admin_teams_settings' do |g|
9
+ g.desc 'Fetch information about settings in a workspace'
10
+ g.long_desc %( Fetch information about settings in a workspace )
11
+ g.command 'info' do |c|
12
+ c.flag 'team_id', desc: '.'
13
+ c.action do |_global_options, options, _args|
14
+ puts JSON.dump(@client.admin_teams_settings_info(options))
15
+ end
16
+ end
14
17
 
15
- g.desc 'Set the default channels of a workspace.'
16
- g.long_desc %( Set the default channels of a workspace. )
17
- g.command 'setDefaultChannels' do |c|
18
- c.flag 'channel_ids', desc: 'An array of channel IDs.'
19
- c.flag 'team_id', desc: 'ID for the workspace to set the default channel for.'
20
- c.action do |_global_options, options, _args|
21
- puts JSON.dump($client.admin_teams_settings_setDefaultChannels(options))
22
- end
23
- end
18
+ g.desc 'Set the default channels of a workspace.'
19
+ g.long_desc %( Set the default channels of a workspace. )
20
+ g.command 'setDefaultChannels' do |c|
21
+ c.flag 'channel_ids', desc: 'An array of channel IDs.'
22
+ c.flag 'team_id', desc: 'ID for the workspace to set the default channel for.'
23
+ c.action do |_global_options, options, _args|
24
+ puts JSON.dump(@client.admin_teams_settings_setDefaultChannels(options))
25
+ end
26
+ end
24
27
 
25
- g.desc 'Set the description of a given workspace.'
26
- g.long_desc %( Set the description of a given workspace. )
27
- g.command 'setDescription' do |c|
28
- c.flag 'description', desc: 'The new description for the workspace.'
29
- c.flag 'team_id', desc: 'ID for the workspace to set the description for.'
30
- c.action do |_global_options, options, _args|
31
- puts JSON.dump($client.admin_teams_settings_setDescription(options))
32
- end
33
- end
28
+ g.desc 'Set the description of a given workspace.'
29
+ g.long_desc %( Set the description of a given workspace. )
30
+ g.command 'setDescription' do |c|
31
+ c.flag 'description', desc: 'The new description for the workspace.'
32
+ c.flag 'team_id', desc: 'ID for the workspace to set the description for.'
33
+ c.action do |_global_options, options, _args|
34
+ puts JSON.dump(@client.admin_teams_settings_setDescription(options))
35
+ end
36
+ end
34
37
 
35
- g.desc 'An API method that allows admins to set the discoverability of a given workspace'
36
- g.long_desc %( An API method that allows admins to set the discoverability of a given workspace )
37
- g.command 'setDiscoverability' do |c|
38
- c.flag 'discoverability', desc: "This workspace's discovery setting. It must be set to one of open, invite_only, closed, or unlisted."
39
- c.flag 'team_id', desc: 'The ID of the workspace to set discoverability on.'
40
- c.action do |_global_options, options, _args|
41
- puts JSON.dump($client.admin_teams_settings_setDiscoverability(options))
42
- end
43
- end
38
+ g.desc 'An API method that allows admins to set the discoverability of a given workspace'
39
+ g.long_desc %( An API method that allows admins to set the discoverability of a given workspace )
40
+ g.command 'setDiscoverability' do |c|
41
+ c.flag 'discoverability', desc: "This workspace's discovery setting. It must be set to one of open, invite_only, closed, or unlisted."
42
+ c.flag 'team_id', desc: 'The ID of the workspace to set discoverability on.'
43
+ c.action do |_global_options, options, _args|
44
+ puts JSON.dump(@client.admin_teams_settings_setDiscoverability(options))
45
+ end
46
+ end
44
47
 
45
- g.desc 'Sets the icon of a workspace.'
46
- g.long_desc %( Sets the icon of a workspace. )
47
- g.command 'setIcon' do |c|
48
- c.flag 'image_url', desc: 'Image URL for the icon.'
49
- c.flag 'team_id', desc: 'ID for the workspace to set the icon for.'
50
- c.action do |_global_options, options, _args|
51
- puts JSON.dump($client.admin_teams_settings_setIcon(options))
52
- end
53
- end
48
+ g.desc 'Sets the icon of a workspace.'
49
+ g.long_desc %( Sets the icon of a workspace. )
50
+ g.command 'setIcon' do |c|
51
+ c.flag 'image_url', desc: 'Image URL for the icon.'
52
+ c.flag 'team_id', desc: 'ID for the workspace to set the icon for.'
53
+ c.action do |_global_options, options, _args|
54
+ puts JSON.dump(@client.admin_teams_settings_setIcon(options))
55
+ end
56
+ end
54
57
 
55
- g.desc 'Set the name of a given workspace.'
56
- g.long_desc %( Set the name of a given workspace. )
57
- g.command 'setName' do |c|
58
- c.flag 'name', desc: 'The new name of the workspace.'
59
- c.flag 'team_id', desc: 'ID for the workspace to set the name for.'
60
- c.action do |_global_options, options, _args|
61
- puts JSON.dump($client.admin_teams_settings_setName(options))
58
+ g.desc 'Set the name of a given workspace.'
59
+ g.long_desc %( Set the name of a given workspace. )
60
+ g.command 'setName' do |c|
61
+ c.flag 'name', desc: 'The new name of the workspace.'
62
+ c.flag 'team_id', desc: 'ID for the workspace to set the name for.'
63
+ c.action do |_global_options, options, _args|
64
+ puts JSON.dump(@client.admin_teams_settings_setName(options))
65
+ end
66
+ end
67
+ end
62
68
  end
63
69
  end
64
70
  end