slack-ruby-client 2.6.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/test.yml +4 -10
- data/.github/workflows/update_api.yml +1 -1
- data/.rubocop_todo.yml +58 -71
- data/CHANGELOG.md +15 -0
- data/CONTRIBUTING.md +1 -1
- data/Gemfile +0 -9
- data/LICENSE.md +1 -1
- data/README.md +31 -220
- data/Rakefile +0 -1
- data/UPGRADING.md +4 -0
- data/bin/commands/admin_analytics.rb +1 -1
- data/bin/commands/admin_apps.rb +4 -4
- data/bin/commands/admin_apps_activities.rb +7 -7
- data/bin/commands/admin_apps_approved.rb +4 -4
- data/bin/commands/admin_apps_config.rb +3 -1
- data/bin/commands/admin_apps_requests.rb +5 -5
- data/bin/commands/admin_apps_restricted.rb +4 -4
- data/bin/commands/admin_audit_anomaly_allow.rb +6 -6
- data/bin/commands/admin_auth_policy.rb +5 -5
- data/bin/commands/admin_barriers.rb +3 -3
- data/bin/commands/admin_conversations.rb +15 -15
- data/bin/commands/admin_conversations_ekm.rb +2 -2
- data/bin/commands/admin_conversations_restrictAccess.rb +5 -5
- data/bin/commands/admin_emoji.rb +5 -5
- data/bin/commands/admin_functions.rb +1 -1
- data/bin/commands/admin_inviteRequests.rb +3 -3
- data/bin/commands/admin_inviteRequests_approved.rb +1 -1
- data/bin/commands/admin_inviteRequests_denied.rb +1 -1
- data/bin/commands/admin_roles.rb +3 -3
- data/bin/commands/admin_teams.rb +3 -3
- data/bin/commands/admin_teams_admins.rb +2 -2
- data/bin/commands/admin_teams_owners.rb +2 -2
- data/bin/commands/admin_teams_settings.rb +5 -5
- data/bin/commands/admin_usergroups.rb +4 -4
- data/bin/commands/admin_users.rb +12 -11
- data/bin/commands/admin_users_session.rb +6 -5
- data/bin/commands/admin_users_unsupportedVersions.rb +1 -1
- data/bin/commands/admin_workflows.rb +6 -6
- data/bin/commands/admin_workflows_collaborators.rb +2 -2
- data/bin/commands/apps_activities.rb +7 -7
- data/bin/commands/apps_auth_external.rb +1 -1
- data/bin/commands/apps_datastore.rb +12 -12
- data/bin/commands/apps_event_authorizations.rb +3 -3
- data/bin/commands/apps_manifest.rb +1 -1
- data/bin/commands/assistant_search.rb +18 -2
- data/bin/commands/assistant_threads.rb +2 -2
- data/bin/commands/auth.rb +1 -1
- data/bin/commands/auth_teams.rb +1 -1
- data/bin/commands/bookmarks.rb +6 -6
- data/bin/commands/calls.rb +5 -5
- data/bin/commands/canvases.rb +2 -2
- data/bin/commands/canvases_access.rb +1 -1
- data/bin/commands/chat.rb +23 -24
- data/bin/commands/conversations.rb +8 -8
- data/bin/commands/conversations_canvases.rb +1 -1
- data/bin/commands/conversations_externalInvitePermissions.rb +1 -1
- data/bin/commands/conversations_requestSharedInvite.rb +4 -4
- data/bin/commands/dnd.rb +1 -1
- data/bin/commands/files.rb +5 -5
- data/bin/commands/files_remote.rb +1 -1
- data/bin/commands/functions.rb +1 -1
- data/bin/commands/functions_distributions_permissions.rb +15 -15
- data/bin/commands/functions_workflows_steps.rb +2 -2
- data/bin/commands/functions_workflows_steps_responses.rb +2 -2
- data/bin/commands/migration.rb +2 -2
- data/bin/commands/oauth_v2.rb +1 -1
- data/bin/commands/openid_connect.rb +1 -1
- data/bin/commands/reactions.rb +3 -3
- data/bin/commands/reminders.rb +2 -2
- data/bin/commands/rtm.rb +15 -0
- data/bin/commands/search.rb +4 -4
- data/bin/commands/slackLists.rb +37 -0
- data/bin/commands/slackLists_access.rb +34 -0
- data/bin/commands/slackLists_download.rb +31 -0
- data/bin/commands/slackLists_items.rb +76 -0
- data/bin/commands/team.rb +1 -1
- data/bin/commands/team_externalTeams.rb +4 -4
- data/bin/commands/usergroups.rb +10 -10
- data/bin/commands/usergroups_users.rb +5 -5
- data/bin/commands/users.rb +1 -1
- data/bin/commands/users_discoverableContacts.rb +1 -1
- data/bin/commands/views.rb +4 -4
- data/bin/commands/workflows_featured.rb +50 -0
- data/bin/commands/workflows_triggers_permissions.rb +7 -7
- data/examples/files_upload_v2/files_upload_v2.rb +8 -0
- data/lib/slack/events/request.rb +1 -0
- data/lib/slack/version.rb +1 -1
- data/lib/slack/web/api/endpoints/admin_analytics.rb +2 -2
- data/lib/slack/web/api/endpoints/admin_apps.rb +8 -8
- data/lib/slack/web/api/endpoints/admin_apps_activities.rb +14 -14
- data/lib/slack/web/api/endpoints/admin_apps_approved.rb +5 -7
- data/lib/slack/web/api/endpoints/admin_apps_config.rb +6 -3
- data/lib/slack/web/api/endpoints/admin_apps_requests.rb +7 -9
- data/lib/slack/web/api/endpoints/admin_apps_restricted.rb +5 -7
- data/lib/slack/web/api/endpoints/admin_audit_anomaly_allow.rb +5 -5
- data/lib/slack/web/api/endpoints/admin_auth_policy.rb +14 -14
- data/lib/slack/web/api/endpoints/admin_barriers.rb +8 -8
- data/lib/slack/web/api/endpoints/admin_conversations.rb +27 -28
- data/lib/slack/web/api/endpoints/admin_conversations_ekm.rb +4 -4
- data/lib/slack/web/api/endpoints/admin_conversations_restrictAccess.rb +11 -12
- data/lib/slack/web/api/endpoints/admin_emoji.rb +5 -5
- data/lib/slack/web/api/endpoints/admin_functions.rb +2 -2
- data/lib/slack/web/api/endpoints/admin_inviteRequests.rb +6 -6
- data/lib/slack/web/api/endpoints/admin_inviteRequests_approved.rb +2 -2
- data/lib/slack/web/api/endpoints/admin_inviteRequests_denied.rb +2 -2
- data/lib/slack/web/api/endpoints/admin_roles.rb +8 -8
- data/lib/slack/web/api/endpoints/admin_teams.rb +3 -3
- data/lib/slack/web/api/endpoints/admin_teams_admins.rb +3 -4
- data/lib/slack/web/api/endpoints/admin_teams_owners.rb +2 -3
- data/lib/slack/web/api/endpoints/admin_teams_settings.rb +12 -13
- data/lib/slack/web/api/endpoints/admin_usergroups.rb +11 -11
- data/lib/slack/web/api/endpoints/admin_users.rb +27 -25
- data/lib/slack/web/api/endpoints/admin_users_session.rb +12 -9
- data/lib/slack/web/api/endpoints/admin_users_unsupportedVersions.rb +2 -2
- data/lib/slack/web/api/endpoints/admin_workflows.rb +12 -12
- data/lib/slack/web/api/endpoints/admin_workflows_collaborators.rb +6 -6
- data/lib/slack/web/api/endpoints/apps_activities.rb +14 -14
- data/lib/slack/web/api/endpoints/apps_auth_external.rb +2 -2
- data/lib/slack/web/api/endpoints/apps_datastore.rb +8 -15
- data/lib/slack/web/api/endpoints/apps_event_authorizations.rb +0 -3
- data/lib/slack/web/api/endpoints/apps_manifest.rb +5 -5
- data/lib/slack/web/api/endpoints/assistant_search.rb +28 -3
- data/lib/slack/web/api/endpoints/assistant_threads.rb +6 -6
- data/lib/slack/web/api/endpoints/auth.rb +1 -1
- data/lib/slack/web/api/endpoints/auth_teams.rb +2 -2
- data/lib/slack/web/api/endpoints/bookmarks.rb +14 -14
- data/lib/slack/web/api/endpoints/calls.rb +10 -10
- data/lib/slack/web/api/endpoints/canvases.rb +4 -4
- data/lib/slack/web/api/endpoints/canvases_access.rb +3 -3
- data/lib/slack/web/api/endpoints/chat.rb +53 -55
- data/lib/slack/web/api/endpoints/conversations.rb +16 -16
- data/lib/slack/web/api/endpoints/conversations_canvases.rb +1 -1
- data/lib/slack/web/api/endpoints/conversations_externalInvitePermissions.rb +3 -3
- data/lib/slack/web/api/endpoints/conversations_requestSharedInvite.rb +8 -8
- data/lib/slack/web/api/endpoints/dnd.rb +2 -2
- data/lib/slack/web/api/endpoints/files.rb +11 -11
- data/lib/slack/web/api/endpoints/files_remote.rb +2 -2
- data/lib/slack/web/api/endpoints/functions.rb +3 -3
- data/lib/slack/web/api/endpoints/functions_distributions_permissions.rb +24 -24
- data/lib/slack/web/api/endpoints/functions_workflows_steps.rb +4 -4
- data/lib/slack/web/api/endpoints/functions_workflows_steps_responses.rb +4 -4
- data/lib/slack/web/api/endpoints/migration.rb +1 -1
- data/lib/slack/web/api/endpoints/oauth_v2.rb +2 -2
- data/lib/slack/web/api/endpoints/openid_connect.rb +2 -2
- data/lib/slack/web/api/endpoints/reactions.rb +6 -6
- data/lib/slack/web/api/endpoints/reminders.rb +4 -4
- data/lib/slack/web/api/endpoints/rtm.rb +23 -0
- data/lib/slack/web/api/endpoints/search.rb +8 -8
- data/lib/slack/web/api/endpoints/slackLists.rb +52 -0
- data/lib/slack/web/api/endpoints/slackLists_access.rb +47 -0
- data/lib/slack/web/api/endpoints/slackLists_download.rb +40 -0
- data/lib/slack/web/api/endpoints/slackLists_items.rb +116 -0
- data/lib/slack/web/api/endpoints/team.rb +3 -3
- data/lib/slack/web/api/endpoints/team_externalTeams.rb +8 -8
- data/lib/slack/web/api/endpoints/usergroups.rb +18 -18
- data/lib/slack/web/api/endpoints/usergroups_users.rb +8 -8
- data/lib/slack/web/api/endpoints/users.rb +2 -2
- data/lib/slack/web/api/endpoints/users_discoverableContacts.rb +0 -1
- data/lib/slack/web/api/endpoints/views.rb +9 -9
- data/lib/slack/web/api/endpoints/workflows_featured.rb +69 -0
- data/lib/slack/web/api/endpoints/workflows_triggers_permissions.rb +15 -15
- data/lib/slack/web/api/endpoints.rb +10 -2
- data/lib/slack/web/api/errors.rb +88 -46
- data/lib/slack/web/api/helpers/files.rb +32 -22
- data/lib/slack/web/api/mixins/conversations.id.rb +14 -3
- data/lib/slack/web/api/mixins/users.id.rb +7 -3
- data/lib/slack/web/faraday/response/raise_error.rb +20 -2
- data/lib/slack-ruby-client.rb +0 -12
- data/lib/tasks/update.rake +0 -1
- data/lib/tasks/web.rake +0 -4
- data/slack-ruby-client.gemspec +1 -1
- metadata +19 -38
- data/.github/workflows/integration_test.yml +0 -45
- data/bin/commands/workflows.rb +0 -44
- data/examples/hi_real_time_and_web/Gemfile +0 -6
- data/examples/hi_real_time_and_web/hi.gif +0 -0
- data/examples/hi_real_time_and_web/hi.rb +0 -28
- data/examples/hi_real_time_async_async/Gemfile +0 -7
- data/examples/hi_real_time_async_async/Procfile +0 -2
- data/examples/hi_real_time_async_async/hi.rb +0 -41
- data/lib/slack/real_time/api/message.rb +0 -23
- data/lib/slack/real_time/api/message_id.rb +0 -15
- data/lib/slack/real_time/api/ping.rb +0 -19
- data/lib/slack/real_time/api/schema/event.json +0 -23
- data/lib/slack/real_time/api/templates/event_handler.erb +0 -8
- data/lib/slack/real_time/api/typing.rb +0 -20
- data/lib/slack/real_time/client.rb +0 -271
- data/lib/slack/real_time/concurrency/async.rb +0 -142
- data/lib/slack/real_time/concurrency.rb +0 -8
- data/lib/slack/real_time/config.rb +0 -62
- data/lib/slack/real_time/models/base.rb +0 -11
- data/lib/slack/real_time/models/bot.rb +0 -9
- data/lib/slack/real_time/models/channel.rb +0 -13
- data/lib/slack/real_time/models/im.rb +0 -9
- data/lib/slack/real_time/models/mpim.rb +0 -9
- data/lib/slack/real_time/models/team.rb +0 -9
- data/lib/slack/real_time/models/user.rb +0 -9
- data/lib/slack/real_time/models.rb +0 -9
- data/lib/slack/real_time/socket.rb +0 -118
- data/lib/slack/real_time/stores/base.rb +0 -47
- data/lib/slack/real_time/stores/starter.rb +0 -449
- data/lib/slack/real_time/stores/store.rb +0 -624
- data/lib/slack/real_time/stores.rb +0 -5
- data/lib/slack/web/api/endpoints/workflows.rb +0 -63
- data/lib/tasks/real_time.rake +0 -81
data/bin/commands/files.rb
CHANGED
@@ -10,11 +10,11 @@ module Slack
|
|
10
10
|
g.long_desc %( Finishes an upload started with files.getUploadURLExternal )
|
11
11
|
g.command 'completeUploadExternal' do |c|
|
12
12
|
c.flag 'files', desc: 'Array of file ids and their corresponding (optional) titles.'
|
13
|
-
c.flag 'blocks', desc: 'A JSON-based array of structured rich text blocks, presented as a URL-encoded string. If the initial_comment field is provided, the blocks field is ignored.'
|
14
13
|
c.flag 'channel_id', desc: 'Channel ID where the file will be shared. If not specified the file will be private.'
|
14
|
+
c.flag 'thread_ts', desc: "Provide another message's ts value to upload this file as a reply. Never use a reply's ts value; use its parent instead. Also make sure to provide only one channel when using 'thread_ts'."
|
15
15
|
c.flag 'channels', desc: 'Comma-separated string of channel IDs where the file will be shared.'
|
16
16
|
c.flag 'initial_comment', desc: 'The message text introducing the file in specified channels.'
|
17
|
-
c.flag '
|
17
|
+
c.flag 'blocks', desc: 'A JSON-based array of structured rich text blocks, presented as a URL-encoded string. If the initial_comment field is provided, the blocks field is ignored.'
|
18
18
|
c.action do |_global_options, options, _args|
|
19
19
|
puts JSON.dump(@client.files_completeUploadExternal(options))
|
20
20
|
end
|
@@ -43,10 +43,10 @@ module Slack
|
|
43
43
|
g.desc 'Gets a URL for an edge external file upload'
|
44
44
|
g.long_desc %( Gets a URL for an edge external file upload )
|
45
45
|
g.command 'getUploadURLExternal' do |c|
|
46
|
-
c.flag 'filename', desc: 'Name of the file being uploaded.'
|
47
46
|
c.flag 'length', desc: 'Size in bytes of the file being uploaded.'
|
48
|
-
c.flag '
|
47
|
+
c.flag 'filename', desc: 'Name of the file being uploaded.'
|
49
48
|
c.flag 'snippet_type', desc: 'Syntax type of the snippet being uploaded.'
|
49
|
+
c.flag 'alt_txt', desc: 'Description of image for screen-reader.'
|
50
50
|
c.action do |_global_options, options, _args|
|
51
51
|
puts JSON.dump(@client.files_getUploadURLExternal(options))
|
52
52
|
end
|
@@ -55,8 +55,8 @@ module Slack
|
|
55
55
|
g.desc 'Gets information about a file.'
|
56
56
|
g.long_desc %( Gets information about a file. )
|
57
57
|
g.command 'info' do |c|
|
58
|
-
c.flag 'file', desc: 'Specify a file by providing its ID.'
|
59
58
|
c.flag 'cursor', desc: "Parameter for pagination. File comments are paginated for a single file. Set cursor equal to the next_cursor attribute returned by the previous request's response_metadata. This parameter is optional, but pagination is mandatory: the default value simply fetches the first 'page' of the collection of comments. See pagination for more details."
|
59
|
+
c.flag 'file', desc: 'Specify a file by providing its ID.'
|
60
60
|
c.flag 'limit', desc: "The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the list hasn't been reached."
|
61
61
|
c.action do |_global_options, options, _args|
|
62
62
|
puts JSON.dump(@client.files_info(options))
|
@@ -11,10 +11,10 @@ module Slack
|
|
11
11
|
g.command 'add' do |c|
|
12
12
|
c.flag 'external_id', desc: 'Creator defined GUID for the file.'
|
13
13
|
c.flag 'external_url', desc: 'URL of the remote file.'
|
14
|
-
c.flag 'title', desc: 'Title of the file being shared.'
|
15
14
|
c.flag 'filetype', desc: 'type of file.'
|
16
15
|
c.flag 'indexable_file_contents', desc: 'A text file (txt, pdf, doc, etc.) containing textual search terms that are used to improve discovery of the remote file.'
|
17
16
|
c.flag 'preview_image', desc: 'Preview of the document via multipart/form-data.'
|
17
|
+
c.flag 'title', desc: 'Title of the file being shared.'
|
18
18
|
c.action do |_global_options, options, _args|
|
19
19
|
puts JSON.dump(@client.files_remote_add(options))
|
20
20
|
end
|
data/bin/commands/functions.rb
CHANGED
@@ -9,8 +9,8 @@ module Slack
|
|
9
9
|
g.desc 'Signal that a function failed to complete'
|
10
10
|
g.long_desc %( Signal that a function failed to complete )
|
11
11
|
g.command 'completeError' do |c|
|
12
|
-
c.flag 'error', desc: 'A human-readable error message that contains information about why the function failed to complete.'
|
13
12
|
c.flag 'function_execution_id', desc: 'Context identifier that maps to the executed function.'
|
13
|
+
c.flag 'error', desc: 'A human-readable error message that contains information about why the function failed to complete.'
|
14
14
|
c.action do |_global_options, options, _args|
|
15
15
|
puts JSON.dump(@client.functions_completeError(options))
|
16
16
|
end
|
@@ -9,21 +9,21 @@ module Slack
|
|
9
9
|
g.desc 'Grant users access to a custom slack function if its permission_type is set to named_entities'
|
10
10
|
g.long_desc %( Grant users access to a custom slack function if its permission_type is set to named_entities )
|
11
11
|
g.command 'add' do |c|
|
12
|
-
c.flag 'function_app_id', desc: 'The encoded ID of the app.'
|
13
|
-
c.flag 'function_callback_id', desc: "The callback ID defined in the function's definition file."
|
14
12
|
c.flag 'function_id', desc: 'The encoded ID of the function.'
|
13
|
+
c.flag 'function_callback_id', desc: "The callback ID defined in the function's definition file."
|
14
|
+
c.flag 'function_app_id', desc: 'The encoded ID of the app.'
|
15
15
|
c.flag 'user_ids', desc: 'List of encoded user IDs.'
|
16
16
|
c.action do |_global_options, options, _args|
|
17
17
|
puts JSON.dump(@client.functions_distributions_permissions_add(options))
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
21
|
-
g.desc 'List the access type of a custom slack function and include the users
|
22
|
-
g.long_desc %( List the access type of a custom slack function and include the users
|
21
|
+
g.desc 'List the access type of a custom slack function and include the users, team or org ids with access if its permission_type is set to named_entities'
|
22
|
+
g.long_desc %( List the access type of a custom slack function and include the users, team or org ids with access if its permission_type is set to named_entities )
|
23
23
|
g.command 'list' do |c|
|
24
|
-
c.flag 'function_app_id', desc: 'The encoded ID of the app.'
|
25
|
-
c.flag 'function_callback_id', desc: "The callback ID defined in the function's definition file."
|
26
24
|
c.flag 'function_id', desc: 'The encoded ID of the function.'
|
25
|
+
c.flag 'function_callback_id', desc: "The callback ID defined in the function's definition file."
|
26
|
+
c.flag 'function_app_id', desc: 'The encoded ID of the app.'
|
27
27
|
c.action do |_global_options, options, _args|
|
28
28
|
puts JSON.dump(@client.functions_distributions_permissions_list(options))
|
29
29
|
end
|
@@ -32,25 +32,25 @@ module Slack
|
|
32
32
|
g.desc 'Revoke user access to a custom slack function if permission_type set to named_entities'
|
33
33
|
g.long_desc %( Revoke user access to a custom slack function if permission_type set to named_entities )
|
34
34
|
g.command 'remove' do |c|
|
35
|
-
c.flag 'function_app_id', desc: 'The encoded ID of the app.'
|
36
|
-
c.flag 'function_callback_id', desc: "The callback ID defined in the function's definition file."
|
37
35
|
c.flag 'function_id', desc: 'The encoded ID of the function.'
|
36
|
+
c.flag 'function_callback_id', desc: "The callback ID defined in the function's definition file."
|
37
|
+
c.flag 'function_app_id', desc: 'The encoded ID of the app.'
|
38
38
|
c.flag 'user_ids', desc: 'List of encoded user IDs.'
|
39
39
|
c.action do |_global_options, options, _args|
|
40
40
|
puts JSON.dump(@client.functions_distributions_permissions_remove(options))
|
41
41
|
end
|
42
42
|
end
|
43
43
|
|
44
|
-
g.desc 'Set the access type of a custom slack function and define the users
|
45
|
-
g.long_desc %( Set the access type of a custom slack function and define the users
|
44
|
+
g.desc 'Set the access type of a custom slack function and define the users, team or org ids to be granted access if permission_type is set to named_entities'
|
45
|
+
g.long_desc %( Set the access type of a custom slack function and define the users, team or org ids to be granted access if permission_type is set to named_entities )
|
46
46
|
g.command 'set' do |c|
|
47
|
-
c.flag 'permission_type', desc: 'The type of permission that defines how the function can be distributed.'
|
48
|
-
c.flag 'function_app_id', desc: 'The encoded ID of the app.'
|
49
|
-
c.flag 'function_callback_id', desc: "The callback ID defined in the function's definition file."
|
50
47
|
c.flag 'function_id', desc: 'The encoded ID of the function.'
|
51
|
-
c.flag '
|
52
|
-
c.flag '
|
48
|
+
c.flag 'function_callback_id', desc: "The callback ID defined in the function's definition file."
|
49
|
+
c.flag 'function_app_id', desc: 'The encoded ID of the app.'
|
50
|
+
c.flag 'permission_type', desc: 'The type of permission that defines how the function can be distributed.'
|
53
51
|
c.flag 'user_ids', desc: 'List of encoded user IDs.'
|
52
|
+
c.flag 'team_ids', desc: 'List of team IDs to allow for named_entities permission.'
|
53
|
+
c.flag 'org_ids', desc: 'List of org IDs to allow for named_entities permission.'
|
54
54
|
c.action do |_global_options, options, _args|
|
55
55
|
puts JSON.dump(@client.functions_distributions_permissions_set(options))
|
56
56
|
end
|
@@ -9,10 +9,10 @@ module Slack
|
|
9
9
|
g.desc "List the steps of a specific function of a workflow's versions"
|
10
10
|
g.long_desc %( List the steps of a specific function of a workflow's versions )
|
11
11
|
g.command 'list' do |c|
|
12
|
-
c.flag '
|
12
|
+
c.flag 'workflow_id', desc: 'The workflow ID, starts with Wf*.'
|
13
13
|
c.flag 'workflow', desc: 'The workflow encoded ID or workflow reference.'
|
14
14
|
c.flag 'workflow_app_id', desc: 'The app tied to the workflow reference.'
|
15
|
-
c.flag '
|
15
|
+
c.flag 'function_id', desc: 'The ID of the function to query.'
|
16
16
|
c.action do |_global_options, options, _args|
|
17
17
|
puts JSON.dump(@client.functions_workflows_steps_list(options))
|
18
18
|
end
|
@@ -9,10 +9,10 @@ module Slack
|
|
9
9
|
g.desc 'Download form responses of a workflow'
|
10
10
|
g.long_desc %( Download form responses of a workflow )
|
11
11
|
g.command 'export' do |c|
|
12
|
-
c.flag '
|
12
|
+
c.flag 'workflow_id', desc: 'The workflow ID, starts with Wf*.'
|
13
13
|
c.flag 'workflow', desc: 'The workflow encoded ID or workflow reference.'
|
14
14
|
c.flag 'workflow_app_id', desc: 'The app tied to the workflow reference.'
|
15
|
-
c.flag '
|
15
|
+
c.flag 'step_id', desc: 'The ID of the OpenForm step to export.'
|
16
16
|
c.action do |_global_options, options, _args|
|
17
17
|
puts JSON.dump(@client.functions_workflows_steps_responses_export(options))
|
18
18
|
end
|
data/bin/commands/migration.rb
CHANGED
@@ -6,8 +6,8 @@ module Slack
|
|
6
6
|
class App
|
7
7
|
desc 'Migration methods.'
|
8
8
|
command 'migration' do |g|
|
9
|
-
g.desc 'For Enterprise
|
10
|
-
g.long_desc %( For Enterprise
|
9
|
+
g.desc 'For Enterprise organization workspaces, map local user IDs to global user IDs'
|
10
|
+
g.long_desc %( For Enterprise organization workspaces, map local user IDs to global user IDs )
|
11
11
|
g.command 'exchange' do |c|
|
12
12
|
c.flag 'users', desc: 'A comma-separated list of user ids, up to 400 per request.'
|
13
13
|
c.flag 'team_id', desc: 'Specify team_id starts with T in case of Org Token.'
|
data/bin/commands/oauth_v2.rb
CHANGED
@@ -12,8 +12,8 @@ module Slack
|
|
12
12
|
c.flag 'client_id', desc: 'Issued when you created your application. If possible, avoid sending client_id and client_secret as parameters in your request and instead supply the Client ID and Client Secret using the HTTP Basic authentication scheme.'
|
13
13
|
c.flag 'client_secret', desc: 'Issued when you created your application. If possible, avoid sending client_id and client_secret as parameters in your request and instead supply the Client ID and Client Secret using the HTTP Basic authentication scheme.'
|
14
14
|
c.flag 'code', desc: 'The code param returned via the OAuth callback.'
|
15
|
-
c.flag 'grant_type', desc: 'The grant_type param as described in the OAuth spec.'
|
16
15
|
c.flag 'redirect_uri', desc: 'This must match the originally submitted URI (if one was sent).'
|
16
|
+
c.flag 'grant_type', desc: 'The grant_type param as described in the OAuth spec.'
|
17
17
|
c.flag 'refresh_token', desc: 'The refresh_token param as described in the OAuth spec.'
|
18
18
|
c.action do |_global_options, options, _args|
|
19
19
|
puts JSON.dump(@client.oauth_v2_access(options))
|
@@ -12,8 +12,8 @@ module Slack
|
|
12
12
|
c.flag 'client_id', desc: 'Issued when you created your application.'
|
13
13
|
c.flag 'client_secret', desc: 'Issued when you created your application.'
|
14
14
|
c.flag 'code', desc: 'The code param returned via the OAuth callback.'
|
15
|
-
c.flag 'grant_type', desc: 'The grant_type param as described in the OAuth spec.'
|
16
15
|
c.flag 'redirect_uri', desc: 'This must match the originally submitted URI (if one was sent).'
|
16
|
+
c.flag 'grant_type', desc: 'The grant_type param as described in the OAuth spec.'
|
17
17
|
c.flag 'refresh_token', desc: 'The refresh_token param as described in the OAuth spec.'
|
18
18
|
c.action do |_global_options, options, _args|
|
19
19
|
puts JSON.dump(@client.openid_connect_token(options))
|
data/bin/commands/reactions.rb
CHANGED
@@ -33,11 +33,11 @@ module Slack
|
|
33
33
|
g.desc 'Lists reactions made by a user.'
|
34
34
|
g.long_desc %( Lists reactions made by a user. )
|
35
35
|
g.command 'list' do |c|
|
36
|
-
c.flag '
|
36
|
+
c.flag 'user', desc: 'Show reactions made by this user. Defaults to the authed user.'
|
37
37
|
c.flag 'full', desc: 'If true always return the complete reaction list.'
|
38
|
+
c.flag 'cursor', desc: "Parameter for pagination. Set cursor equal to the next_cursor attribute returned by the previous request's response_metadata. This parameter is optional, but pagination is mandatory: the default value simply fetches the first 'page' of the collection. See pagination for more details."
|
38
39
|
c.flag 'limit', desc: "The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the list hasn't been reached."
|
39
40
|
c.flag 'team_id', desc: 'encoded team id to list reactions in, required if org token is used.'
|
40
|
-
c.flag 'user', desc: 'Show reactions made by this user. Defaults to the authed user.'
|
41
41
|
c.action do |_global_options, options, _args|
|
42
42
|
puts JSON.dump(@client.reactions_list(options))
|
43
43
|
end
|
@@ -47,9 +47,9 @@ module Slack
|
|
47
47
|
g.long_desc %( Removes a reaction from an item. )
|
48
48
|
g.command 'remove' do |c|
|
49
49
|
c.flag 'name', desc: 'Reaction (emoji) name.'
|
50
|
-
c.flag 'channel', desc: 'Channel where the message to remove reaction from was posted.'
|
51
50
|
c.flag 'file', desc: 'File to remove reaction from.'
|
52
51
|
c.flag 'file_comment', desc: 'File comment to remove reaction from.'
|
52
|
+
c.flag 'channel', desc: 'Channel where the message to remove reaction from was posted.'
|
53
53
|
c.flag 'timestamp', desc: 'Timestamp of the message to remove reaction from.'
|
54
54
|
c.action do |_global_options, options, _args|
|
55
55
|
puts JSON.dump(@client.reactions_remove(options))
|
data/bin/commands/reminders.rb
CHANGED
@@ -11,9 +11,9 @@ module Slack
|
|
11
11
|
g.command 'add' do |c|
|
12
12
|
c.flag 'text', desc: 'The content of the reminder.'
|
13
13
|
c.flag 'time', desc: 'Can also take a type of integer. When this reminder should happen: the Unix timestamp (up to five years from now), the number of seconds until the reminder (if within 24 hours), or a natural language description (Ex. "in 15 minutes," or "every Thursday").'
|
14
|
-
c.flag 'recurrence', desc: 'Specify the repeating behavior of a reminder. Available options: daily, weekly, monthly, or yearly. If weekly, may further specify the days of the week.'
|
15
|
-
c.flag 'team_id', desc: 'Encoded team id, required if org token is used.'
|
16
14
|
c.flag 'user', desc: 'No longer supported - reminders cannot be set for other users. Previously, was the user who would receive the reminder.'
|
15
|
+
c.flag 'team_id', desc: 'Encoded team id, required if org token is used.'
|
16
|
+
c.flag 'recurrence', desc: 'Specify the repeating behavior of a reminder. Available options: daily, weekly, monthly, or yearly. If weekly, may further specify the days of the week.'
|
17
17
|
c.action do |_global_options, options, _args|
|
18
18
|
puts JSON.dump(@client.reminders_add(options))
|
19
19
|
end
|
data/bin/commands/rtm.rb
CHANGED
@@ -15,6 +15,21 @@ module Slack
|
|
15
15
|
puts JSON.dump(@client.rtm_connect(options))
|
16
16
|
end
|
17
17
|
end
|
18
|
+
|
19
|
+
g.desc 'Deprecated: Starts a Real Time Messaging session. Use rtm.connect instead.'
|
20
|
+
g.long_desc %( Deprecated: Starts a Real Time Messaging session. Use rtm.connect instead. )
|
21
|
+
g.command 'start' do |c|
|
22
|
+
c.flag 'simple_latest', desc: 'Return timestamp only for latest message object of each channel (improves performance).'
|
23
|
+
c.flag 'no_unreads', desc: 'Skip unread counts for each channel (improves performance).'
|
24
|
+
c.flag 'mpim_aware', desc: 'Returns MPIMs to the client in the API response.'
|
25
|
+
c.flag 'presence_sub', desc: 'Only deliver presence events when requested by subscription. See presence subscriptions.'
|
26
|
+
c.flag 'batch_presence_aware', desc: 'Batch presence deliveries via subscription. Enabling changes the shape of presence_change events. See batch presence.'
|
27
|
+
c.flag 'no_latest', desc: 'Exclude latest timestamps for channels, groups, mpims, and ims. Automatically sets no_unreads to 1.'
|
28
|
+
c.flag 'include_locale', desc: 'Set this to true to receive the locale for users and channels. Defaults to false.'
|
29
|
+
c.action do |_global_options, options, _args|
|
30
|
+
puts JSON.dump(@client.rtm_start(options))
|
31
|
+
end
|
32
|
+
end
|
18
33
|
end
|
19
34
|
end
|
20
35
|
end
|
data/bin/commands/search.rb
CHANGED
@@ -9,8 +9,8 @@ module Slack
|
|
9
9
|
g.desc 'Searches for messages and files matching a query.'
|
10
10
|
g.long_desc %( Searches for messages and files matching a query. )
|
11
11
|
g.command 'all' do |c|
|
12
|
-
c.flag 'query', desc: 'Search query. May contains booleans, etc.'
|
13
12
|
c.flag 'highlight', desc: 'Pass a value of true to enable query highlight markers (see below).'
|
13
|
+
c.flag 'query', desc: 'Search query. May contains booleans, etc.'
|
14
14
|
c.flag 'sort', desc: 'Return matches sorted by either score or timestamp.'
|
15
15
|
c.flag 'sort_dir', desc: 'Change sort direction to ascending (asc) or descending (desc).'
|
16
16
|
c.flag 'team_id', desc: 'encoded team id to search in, required if org token is used.'
|
@@ -22,8 +22,8 @@ module Slack
|
|
22
22
|
g.desc 'Searches for files matching a query.'
|
23
23
|
g.long_desc %( Searches for files matching a query. )
|
24
24
|
g.command 'files' do |c|
|
25
|
-
c.flag 'query', desc: 'Search query.'
|
26
25
|
c.flag 'highlight', desc: 'Pass a value of true to enable query highlight markers (see below).'
|
26
|
+
c.flag 'query', desc: 'Search query.'
|
27
27
|
c.flag 'sort', desc: 'Return matches sorted by either score or timestamp.'
|
28
28
|
c.flag 'sort_dir', desc: 'Change sort direction to ascending (asc) or descending (desc).'
|
29
29
|
c.flag 'team_id', desc: 'encoded team id to search in, required if org token is used.'
|
@@ -35,9 +35,9 @@ module Slack
|
|
35
35
|
g.desc 'Searches for messages matching a query.'
|
36
36
|
g.long_desc %( Searches for messages matching a query. )
|
37
37
|
g.command 'messages' do |c|
|
38
|
-
c.flag 'query', desc: 'Search query.'
|
39
|
-
c.flag 'cursor', desc: "Use this when getting results with cursormark pagination. For first call send * for subsequent calls, send the value of next_cursor returned in the previous call's results."
|
40
38
|
c.flag 'highlight', desc: 'Pass a value of true to enable query highlight markers (see below).'
|
39
|
+
c.flag 'cursor', desc: "Use this when getting results with cursormark pagination. For first call send * for subsequent calls, send the value of next_cursor returned in the previous call's results."
|
40
|
+
c.flag 'query', desc: 'Search query.'
|
41
41
|
c.flag 'sort', desc: 'Return matches sorted by either score or timestamp.'
|
42
42
|
c.flag 'sort_dir', desc: 'Change sort direction to ascending (asc) or descending (desc).'
|
43
43
|
c.flag 'team_id', desc: 'encoded team id to search in, required if org token is used.'
|
@@ -0,0 +1,37 @@
|
|
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 'SlackLists methods.'
|
8
|
+
command 'slackLists' do |g|
|
9
|
+
g.desc 'Create a List.'
|
10
|
+
g.long_desc %( Create a List. )
|
11
|
+
g.command 'create' do |c|
|
12
|
+
c.flag 'name', desc: 'Name of the List.'
|
13
|
+
c.flag 'description_blocks', desc: 'A rich text description of the List.'
|
14
|
+
c.flag 'schema', desc: 'Column definition for the List.'
|
15
|
+
c.flag 'copy_from_list_id', desc: 'ID of the List to copy.'
|
16
|
+
c.flag 'include_copied_list_records', desc: 'Boolean indicating whether to include records when a List is copied.'
|
17
|
+
c.flag 'todo_mode', desc: 'Boolean indicating whether the List should be used to track todo tasks.'
|
18
|
+
c.action do |_global_options, options, _args|
|
19
|
+
puts JSON.dump(@client.slackLists_create(options))
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
g.desc 'Update a List.'
|
24
|
+
g.long_desc %( Update a List. )
|
25
|
+
g.command 'update' do |c|
|
26
|
+
c.flag 'id', desc: 'The ID of the List to update.'
|
27
|
+
c.flag 'name', desc: 'The updated name of the List.'
|
28
|
+
c.flag 'description_blocks', desc: 'A rich text description of the List.'
|
29
|
+
c.flag 'todo_mode', desc: 'Boolean indicating whether the List should be in todo mode.'
|
30
|
+
c.action do |_global_options, options, _args|
|
31
|
+
puts JSON.dump(@client.slackLists_update(options))
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,34 @@
|
|
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 'SlackListsAccess methods.'
|
8
|
+
command 'slackLists_access' do |g|
|
9
|
+
g.desc 'Revoke access to a List for specified entities.'
|
10
|
+
g.long_desc %( Revoke access to a List for specified entities. )
|
11
|
+
g.command 'delete' do |c|
|
12
|
+
c.flag 'list_id', desc: 'Encoded ID of the List.'
|
13
|
+
c.flag 'channel_ids', desc: 'List of channels you wish to update access for. Can only be used if user_ids is not provided.'
|
14
|
+
c.flag 'user_ids', desc: 'List of users you wish to update access for. Can only be used if channel_ids is not provided.'
|
15
|
+
c.action do |_global_options, options, _args|
|
16
|
+
puts JSON.dump(@client.slackLists_access_delete(options))
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
g.desc 'Set the access level to a List for specified entities.'
|
21
|
+
g.long_desc %( Set the access level to a List for specified entities. )
|
22
|
+
g.command 'set' do |c|
|
23
|
+
c.flag 'list_id', desc: 'Encoded ID of the List.'
|
24
|
+
c.flag 'access_level', desc: 'Desired level of access.'
|
25
|
+
c.flag 'channel_ids', desc: 'List of channels you wish to update access for. Can only be used if user_ids is not provided.'
|
26
|
+
c.flag 'user_ids', desc: 'List of users you wish to update access for. Can only be used if channel_ids is not provided.'
|
27
|
+
c.action do |_global_options, options, _args|
|
28
|
+
puts JSON.dump(@client.slackLists_access_set(options))
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,31 @@
|
|
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 'SlackListsDownload methods.'
|
8
|
+
command 'slackLists_download' do |g|
|
9
|
+
g.desc 'Retrieve List download URL from an export job to download List contents.'
|
10
|
+
g.long_desc %( Retrieve List download URL from an export job to download List contents. )
|
11
|
+
g.command 'get' do |c|
|
12
|
+
c.flag 'list_id', desc: 'ID of the List to export.'
|
13
|
+
c.flag 'job_id', desc: 'The ID of the recently started job to export the List.'
|
14
|
+
c.action do |_global_options, options, _args|
|
15
|
+
puts JSON.dump(@client.slackLists_download_get(options))
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
g.desc 'Initiate a job to export List contents.'
|
20
|
+
g.long_desc %( Initiate a job to export List contents. )
|
21
|
+
g.command 'start' do |c|
|
22
|
+
c.flag 'list_id', desc: 'ID of the List to export.'
|
23
|
+
c.flag 'include_archived', desc: ''
|
24
|
+
c.action do |_global_options, options, _args|
|
25
|
+
puts JSON.dump(@client.slackLists_download_start(options))
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,76 @@
|
|
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 'SlackListsItems methods.'
|
8
|
+
command 'slackLists_items' do |g|
|
9
|
+
g.desc 'Add a new item to an existing List.'
|
10
|
+
g.long_desc %( Add a new item to an existing List. )
|
11
|
+
g.command 'create' do |c|
|
12
|
+
c.flag 'list_id', desc: 'ID of the List to add the item to.'
|
13
|
+
c.flag 'duplicated_item_id', desc: 'ID of the record to make a copy of.'
|
14
|
+
c.flag 'parent_item_id', desc: 'ID of the parent record for this subtask.'
|
15
|
+
c.flag 'initial_fields', desc: 'Initial item data.'
|
16
|
+
c.action do |_global_options, options, _args|
|
17
|
+
puts JSON.dump(@client.slackLists_items_create(options))
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
g.desc 'Deletes an item from an existing List.'
|
22
|
+
g.long_desc %( Deletes an item from an existing List. )
|
23
|
+
g.command 'delete' do |c|
|
24
|
+
c.flag 'list_id', desc: 'ID of the List containing the item.'
|
25
|
+
c.flag 'id', desc: 'ID of item to delete.'
|
26
|
+
c.action do |_global_options, options, _args|
|
27
|
+
puts JSON.dump(@client.slackLists_items_delete(options))
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
g.desc 'Deletes multiple items from an existing List.'
|
32
|
+
g.long_desc %( Deletes multiple items from an existing List. )
|
33
|
+
g.command 'deleteMultiple' do |c|
|
34
|
+
c.flag 'list_id', desc: 'ID of the List containing the items.'
|
35
|
+
c.flag 'ids', desc: 'IDs of items to delete.'
|
36
|
+
c.action do |_global_options, options, _args|
|
37
|
+
puts JSON.dump(@client.slackLists_items_deleteMultiple(options))
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
g.desc 'Get a row from a List.'
|
42
|
+
g.long_desc %( Get a row from a List. )
|
43
|
+
g.command 'info' do |c|
|
44
|
+
c.flag 'list_id', desc: 'ID of the List.'
|
45
|
+
c.flag 'id', desc: 'ID of the row to get.'
|
46
|
+
c.flag 'include_is_subscribed', desc: 'Set to true to include is_subscribed data for the returned List row.'
|
47
|
+
c.action do |_global_options, options, _args|
|
48
|
+
puts JSON.dump(@client.slackLists_items_info(options))
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
g.desc 'Get records from a List.'
|
53
|
+
g.long_desc %( Get records from a List. )
|
54
|
+
g.command 'list' do |c|
|
55
|
+
c.flag 'list_id', desc: 'ID of the List.'
|
56
|
+
c.flag 'limit', desc: 'The maximum number of records to return.'
|
57
|
+
c.flag 'cursor', desc: 'Next cursor for pagination.'
|
58
|
+
c.flag 'archived', desc: 'Boolean indicating whether archived items or normal items should be returned.'
|
59
|
+
c.action do |_global_options, options, _args|
|
60
|
+
puts JSON.dump(@client.slackLists_items_list(options))
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
g.desc 'Updates cells in a List.'
|
65
|
+
g.long_desc %( Updates cells in a List. )
|
66
|
+
g.command 'update' do |c|
|
67
|
+
c.flag 'list_id', desc: 'ID of the List to add or update cells.'
|
68
|
+
c.flag 'cells', desc: 'Cells to update.'
|
69
|
+
c.action do |_global_options, options, _args|
|
70
|
+
puts JSON.dump(@client.slackLists_items_update(options))
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
data/bin/commands/team.rb
CHANGED
@@ -23,8 +23,8 @@ module Slack
|
|
23
23
|
g.command 'billableInfo' do |c|
|
24
24
|
c.flag 'cursor', desc: 'Set cursor to next_cursor returned by previous call, to indicate from where you want to list next page of users list. Default value fetches the first page.'
|
25
25
|
c.flag 'limit', desc: 'The maximum number of items to return.'
|
26
|
-
c.flag 'team_id', desc: 'encoded team id to get the billable information from, required if org token is used.'
|
27
26
|
c.flag 'user', desc: 'A user to retrieve the billable information for. Defaults to all users.'
|
27
|
+
c.flag 'team_id', desc: 'encoded team id to get the billable information from, required if org token is used.'
|
28
28
|
c.action do |_global_options, options, _args|
|
29
29
|
puts JSON.dump(@client.team_billableInfo(options))
|
30
30
|
end
|
@@ -18,13 +18,13 @@ module Slack
|
|
18
18
|
g.desc 'Returns a list of all the external teams connected and details about the connection.'
|
19
19
|
g.long_desc %( Returns a list of all the external teams connected and details about the connection. )
|
20
20
|
g.command 'list' do |c|
|
21
|
-
c.flag 'connection_status_filter', desc: 'Status of the connected team.'
|
22
|
-
c.flag 'cursor', desc: "Paginate through collections of data by setting parameter to the team_id attribute returned by a previous request's response_metadata. If not provided, the first page of the collection is returned. See pagination for more detail."
|
23
21
|
c.flag 'limit', desc: 'The maximum number of items to return per page.'
|
24
|
-
c.flag '
|
25
|
-
c.flag 'sort_direction', desc: 'Direction to sort in asc or desc.'
|
22
|
+
c.flag 'cursor', desc: "Paginate through collections of data by setting parameter to the team_id attribute returned by a previous request's response_metadata. If not provided, the first page of the collection is returned. See pagination for more detail."
|
26
23
|
c.flag 'sort_field', desc: 'Name of the parameter that we are sorting by.'
|
24
|
+
c.flag 'sort_direction', desc: 'Direction to sort in asc or desc.'
|
25
|
+
c.flag 'slack_connect_pref_filter', desc: 'Filters connected orgs by Slack Connect pref override(s). Value can be: approved_orgs_only allow_sc_file_uploads profile_visibility away_team_sc_invite_permissions accept_sc_invites sc_mpdm_to_private require_sc_channel_for_sc_dm external_awareness_context_bar.'
|
27
26
|
c.flag 'workspace_filter', desc: 'Shows connected orgs which are connected on a specified encoded workspace ID.'
|
27
|
+
c.flag 'connection_status_filter', desc: 'Status of the connected team.'
|
28
28
|
c.action do |_global_options, options, _args|
|
29
29
|
puts JSON.dump(@client.team_externalTeams_list(options))
|
30
30
|
end
|
data/bin/commands/usergroups.rb
CHANGED
@@ -9,14 +9,14 @@ module Slack
|
|
9
9
|
g.desc 'Create a User Group.'
|
10
10
|
g.long_desc %( Create a User Group. )
|
11
11
|
g.command 'create' do |c|
|
12
|
-
c.flag 'name', desc: 'A name for the User Group. Must be unique among User Groups.'
|
13
|
-
c.flag 'additional_channels', desc: 'A comma separated string of encoded channel IDs for which the User Group can custom add usergroup members too.'
|
14
12
|
c.flag 'channels', desc: 'A comma separated string of encoded channel IDs for which the User Group uses as a default.'
|
13
|
+
c.flag 'additional_channels', desc: 'A comma separated string of encoded channel IDs for which the User Group can custom add usergroup members too.'
|
15
14
|
c.flag 'description', desc: 'A short description of the User Group.'
|
16
|
-
c.flag 'enable_section', desc: 'Configure this user group to show as a sidebar section for all group members. Note: Only relevant if group has 1 or more default channels added.'
|
17
15
|
c.flag 'handle', desc: 'A mention handle. Must be unique among channels, users and User Groups.'
|
18
16
|
c.flag 'include_count', desc: 'Include the number of users in each User Group.'
|
17
|
+
c.flag 'name', desc: 'A name for the User Group. Must be unique among User Groups.'
|
19
18
|
c.flag 'team_id', desc: 'Encoded team id where the user group has to be created, required if org token is used.'
|
19
|
+
c.flag 'enable_section', desc: 'Configure this user group to show as a sidebar section for all group members. Note: Only relevant if group has 1 or more default channels added.'
|
20
20
|
c.action do |_global_options, options, _args|
|
21
21
|
puts JSON.dump(@client.usergroups_create(options))
|
22
22
|
end
|
@@ -25,9 +25,9 @@ module Slack
|
|
25
25
|
g.desc 'Disable an existing User Group.'
|
26
26
|
g.long_desc %( Disable an existing User Group. )
|
27
27
|
g.command 'disable' do |c|
|
28
|
-
c.flag 'usergroup', desc: 'The encoded ID of the User Group to disable.'
|
29
28
|
c.flag 'include_count', desc: 'Include the number of users in the User Group.'
|
30
29
|
c.flag 'team_id', desc: 'Encoded target team id where the user group is, required if org token is used.'
|
30
|
+
c.flag 'usergroup', desc: 'The encoded ID of the User Group to disable.'
|
31
31
|
c.action do |_global_options, options, _args|
|
32
32
|
puts JSON.dump(@client.usergroups_disable(options))
|
33
33
|
end
|
@@ -36,9 +36,9 @@ module Slack
|
|
36
36
|
g.desc 'Enable a User Group.'
|
37
37
|
g.long_desc %( Enable a User Group. )
|
38
38
|
g.command 'enable' do |c|
|
39
|
-
c.flag 'usergroup', desc: 'The encoded ID of the User Group to enable.'
|
40
39
|
c.flag 'include_count', desc: 'Include the number of users in the User Group.'
|
41
40
|
c.flag 'team_id', desc: 'Encoded team id where the user group is, required if org token is used.'
|
41
|
+
c.flag 'usergroup', desc: 'The encoded ID of the User Group to enable.'
|
42
42
|
c.action do |_global_options, options, _args|
|
43
43
|
puts JSON.dump(@client.usergroups_enable(options))
|
44
44
|
end
|
@@ -48,9 +48,9 @@ module Slack
|
|
48
48
|
g.long_desc %( List all User Groups for a team. )
|
49
49
|
g.command 'list' do |c|
|
50
50
|
c.flag 'include_count', desc: 'Include the number of users in each User Group.'
|
51
|
-
c.flag 'include_disabled', desc: 'Include disabled User Groups.'
|
51
|
+
c.flag 'include_disabled', desc: 'Include results for disabled User Groups.'
|
52
52
|
c.flag 'include_users', desc: 'Include the list of users for each User Group.'
|
53
|
-
c.flag 'team_id', desc: 'encoded team
|
53
|
+
c.flag 'team_id', desc: "The user group's encoded team ID. Required if org token is used."
|
54
54
|
c.action do |_global_options, options, _args|
|
55
55
|
puts JSON.dump(@client.usergroups_list(options))
|
56
56
|
end
|
@@ -59,15 +59,15 @@ module Slack
|
|
59
59
|
g.desc 'Update an existing User Group.'
|
60
60
|
g.long_desc %( Update an existing User Group. )
|
61
61
|
g.command 'update' do |c|
|
62
|
-
c.flag 'usergroup', desc: 'The encoded ID of the User Group to update.'
|
63
|
-
c.flag 'additional_channels', desc: 'A comma separated string of encoded channel IDs for which the User Group can custom add usergroup members too.'
|
64
62
|
c.flag 'channels', desc: 'A comma separated string of encoded channel IDs for which the User Group uses as a default.'
|
63
|
+
c.flag 'additional_channels', desc: 'A comma separated string of encoded channel IDs for which the User Group can custom add usergroup members too.'
|
65
64
|
c.flag 'description', desc: 'A short description of the User Group.'
|
66
|
-
c.flag 'enable_section', desc: 'Configure this user group to show as a sidebar section for all group members. Note: Only relevant if group has 1 or more default channels added.'
|
67
65
|
c.flag 'handle', desc: 'A mention handle. Must be unique among channels, users and User Groups.'
|
68
66
|
c.flag 'include_count', desc: 'Include the number of users in the User Group.'
|
69
67
|
c.flag 'name', desc: 'A name for the User Group. Must be unique among User Groups.'
|
70
68
|
c.flag 'team_id', desc: 'encoded team id where the user group exists, required if org token is used.'
|
69
|
+
c.flag 'usergroup', desc: 'The encoded ID of the User Group to update.'
|
70
|
+
c.flag 'enable_section', desc: 'Configure this user group to show as a sidebar section for all group members. Note: Only relevant if group has 1 or more default channels added.'
|
71
71
|
c.action do |_global_options, options, _args|
|
72
72
|
puts JSON.dump(@client.usergroups_update(options))
|
73
73
|
end
|
@@ -9,9 +9,9 @@ module Slack
|
|
9
9
|
g.desc 'List all users in a User Group.'
|
10
10
|
g.long_desc %( List all users in a User Group. )
|
11
11
|
g.command 'list' do |c|
|
12
|
-
c.flag '
|
13
|
-
c.flag '
|
14
|
-
c.flag 'team_id', desc: 'encoded team
|
12
|
+
c.flag 'include_disabled', desc: 'Include results for disabled User Groups.'
|
13
|
+
c.flag 'usergroup', desc: 'The encoded ID of the User Group.'
|
14
|
+
c.flag 'team_id', desc: "The user group's encoded team ID. Required if org token is used."
|
15
15
|
c.action do |_global_options, options, _args|
|
16
16
|
puts JSON.dump(@client.usergroups_users_list(options))
|
17
17
|
end
|
@@ -20,12 +20,12 @@ module Slack
|
|
20
20
|
g.desc 'Update the list of users for a user group.'
|
21
21
|
g.long_desc %( Update the list of users for a user group. )
|
22
22
|
g.command 'update' do |c|
|
23
|
+
c.flag 'include_count', desc: 'Include the number of users in the user group.'
|
24
|
+
c.flag 'team_id', desc: 'encoded team id where the user group exists, required if org token is used.'
|
23
25
|
c.flag 'usergroup', desc: 'The encoded ID of the user group to update.'
|
24
26
|
c.flag 'users', desc: 'A comma separated string of encoded user IDs that represent the entire list of users for the user group.'
|
25
27
|
c.flag 'additional_channels', desc: 'A comma separated string of encoded channel IDs for which the User Group can custom add usergroup members too.'
|
26
|
-
c.flag 'include_count', desc: 'Include the number of users in the user group.'
|
27
28
|
c.flag 'is_shared', desc: 'Boolean to identify if the API is getting called when a shared section is getting shared.'
|
28
|
-
c.flag 'team_id', desc: 'encoded team id where the user group exists, required if org token is used.'
|
29
29
|
c.action do |_global_options, options, _args|
|
30
30
|
puts JSON.dump(@client.usergroups_users_update(options))
|
31
31
|
end
|
data/bin/commands/users.rb
CHANGED
@@ -57,8 +57,8 @@ module Slack
|
|
57
57
|
g.desc 'Gets information about a user.'
|
58
58
|
g.long_desc %( Gets information about a user. )
|
59
59
|
g.command 'info' do |c|
|
60
|
-
c.flag 'user', desc: 'User to get info on.'
|
61
60
|
c.flag 'include_locale', desc: 'Set this to true to receive the locale for this user. Defaults to false.'
|
61
|
+
c.flag 'user', desc: 'User to get info on.'
|
62
62
|
c.action do |_global_options, options, _args|
|
63
63
|
puts JSON.dump(@client.users_info(options))
|
64
64
|
end
|