slack-ruby-client 2.7.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 +3 -10
- data/.rubocop_todo.yml +45 -67
- data/CHANGELOG.md +7 -0
- data/Gemfile +0 -9
- data/LICENSE.md +1 -1
- data/README.md +16 -219
- 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/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/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
- metadata +12 -35
- 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/chat.rb
CHANGED
@@ -20,9 +20,9 @@ module Slack
|
|
20
20
|
g.desc 'Deletes a message.'
|
21
21
|
g.long_desc %( Deletes a message. )
|
22
22
|
g.command 'delete' do |c|
|
23
|
+
c.flag 'as_user', desc: '(Legacy) Pass true to delete the message as the authed user with chat:write:user scope. Bot users in this context are considered authed users. See legacy as_user parameter below.'
|
23
24
|
c.flag 'channel', desc: 'Channel containing the message to be deleted.'
|
24
25
|
c.flag 'ts', desc: 'Timestamp of the message to be deleted.'
|
25
|
-
c.flag 'as_user', desc: 'Pass true to delete the message as the authed user with chat:write:user scope. Bot users in this context are considered authed users. If unused or false, the message will be deleted with chat:write:bot scope.'
|
26
26
|
c.action do |_global_options, options, _args|
|
27
27
|
puts JSON.dump(@client.chat_delete(options))
|
28
28
|
end
|
@@ -31,9 +31,9 @@ module Slack
|
|
31
31
|
g.desc 'Deletes a pending scheduled message from the queue.'
|
32
32
|
g.long_desc %( Deletes a pending scheduled message from the queue. )
|
33
33
|
g.command 'deleteScheduledMessage' do |c|
|
34
|
+
c.flag 'as_user', desc: 'Pass true to delete the message as the authed user with chat:write:user scope. Bot users in this context are considered authed users. If unused or false, the message will be deleted with chat:write:bot scope.'
|
34
35
|
c.flag 'channel', desc: 'The channel the scheduled_message is posting to.'
|
35
36
|
c.flag 'scheduled_message_id', desc: 'scheduled_message_id returned from call to chat.scheduleMessage.'
|
36
|
-
c.flag 'as_user', desc: 'Pass true to delete the message as the authed user with chat:write:user scope. Bot users in this context are considered authed users. If unused or false, the message will be deleted with chat:write:bot scope.'
|
37
37
|
c.action do |_global_options, options, _args|
|
38
38
|
puts JSON.dump(@client.chat_deleteScheduledMessage(options))
|
39
39
|
end
|
@@ -62,18 +62,18 @@ module Slack
|
|
62
62
|
g.desc 'Sends an ephemeral message to a user in a channel.'
|
63
63
|
g.long_desc %( Sends an ephemeral message to a user in a channel. )
|
64
64
|
g.command 'postEphemeral' do |c|
|
65
|
-
c.flag '
|
66
|
-
c.flag 'user', desc: 'id of the user who will receive the ephemeral message. The user should be in the channel specified by the channel argument.'
|
65
|
+
c.flag 'as_user', desc: '(Legacy) Pass true to post the message as the authed user. Defaults to true if the chat:write:bot scope is not included. Otherwise, defaults to false.'
|
67
66
|
c.flag 'attachments', desc: 'A JSON-based array of structured attachments, presented as a URL-encoded string.'
|
68
67
|
c.flag 'blocks', desc: 'A JSON-based array of structured blocks, presented as a URL-encoded string.'
|
69
|
-
c.flag '
|
70
|
-
c.flag 'as_user', desc: '(Legacy) Pass true to post the message as the authed user. Defaults to true if the chat:write:bot scope is not included. Otherwise, defaults to false.'
|
68
|
+
c.flag 'channel', desc: 'Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name.'
|
71
69
|
c.flag 'icon_emoji', desc: 'Emoji to use as the icon for this message. Overrides icon_url.'
|
72
70
|
c.flag 'icon_url', desc: 'URL to an image to use as the icon for this message.'
|
73
71
|
c.flag 'link_names', desc: 'Find and link channel names and usernames.'
|
74
72
|
c.flag 'markdown_text', desc: 'Accepts message text formatted in markdown. This argument should not be used in conjunction with blocks or text. Limit this field to 12,000 characters.'
|
75
73
|
c.flag 'parse', desc: 'Change how messages are treated. Defaults to none. See below.'
|
74
|
+
c.flag 'text', desc: 'How this field works and whether it is required depends on other fields you use in your API call. See below for more detail.'
|
76
75
|
c.flag 'thread_ts', desc: "Provide another message's ts value to post this message in a thread. Avoid using a reply's ts value; use its parent's value instead. Ephemeral messages in threads are only shown if there is already an active thread."
|
76
|
+
c.flag 'user', desc: 'id of the user who will receive the ephemeral message. The user should be in the channel specified by the channel argument.'
|
77
77
|
c.flag 'username', desc: "Set your bot's user name."
|
78
78
|
c.action do |_global_options, options, _args|
|
79
79
|
puts JSON.dump(@client.chat_postEphemeral(options))
|
@@ -83,12 +83,10 @@ module Slack
|
|
83
83
|
g.desc 'Sends a message to a channel.'
|
84
84
|
g.long_desc %( Sends a message to a channel. )
|
85
85
|
g.command 'postMessage' do |c|
|
86
|
-
c.flag '
|
86
|
+
c.flag 'as_user', desc: '(Legacy) Pass true to post the message as the authed user instead of as a bot. Defaults to false. Can only be used by classic apps. See legacy as_user parameter below.'
|
87
87
|
c.flag 'attachments', desc: 'A JSON-based array of structured attachments, presented as a URL-encoded string.'
|
88
88
|
c.flag 'blocks', desc: 'A JSON-based array of structured blocks, presented as a URL-encoded string.'
|
89
|
-
c.flag '
|
90
|
-
c.flag 'agent_message_source_type', desc: 'Identify how the message was posted for agentforce BE logging.'
|
91
|
-
c.flag 'as_user', desc: '(Legacy) Pass true to post the message as the authed user instead of as a bot. Defaults to false. Can only be used by classic apps. See legacy as_user parameter below.'
|
89
|
+
c.flag 'channel', desc: 'An encoded ID or channel name that represents a channel, private group, or IM channel to send the message to. See below for more details.'
|
92
90
|
c.flag 'icon_emoji', desc: 'Emoji to use as the icon for this message. Overrides icon_url.'
|
93
91
|
c.flag 'icon_url', desc: 'URL to an image to use as the icon for this message.'
|
94
92
|
c.flag 'link_names', desc: 'Find and link user groups. No longer supports linking individual users; use syntax shown in Mentioning Users instead.'
|
@@ -97,6 +95,7 @@ module Slack
|
|
97
95
|
c.flag 'mrkdwn', desc: 'Disable Slack markup parsing by setting to false. Enabled by default.'
|
98
96
|
c.flag 'parse', desc: 'Change how messages are treated. See below.'
|
99
97
|
c.flag 'reply_broadcast', desc: 'Used in conjunction with thread_ts and indicates whether reply should be made visible to everyone in the channel or conversation. Defaults to false.'
|
98
|
+
c.flag 'text', desc: 'How this field works and whether it is required depends on other fields you use in your API call. See below for more detail.'
|
100
99
|
c.flag 'thread_ts', desc: "Provide another message's ts value to make this message a reply. Avoid using a reply's ts value; use its parent instead."
|
101
100
|
c.flag 'unfurl_links', desc: 'Pass true to enable unfurling of primarily text-based content.'
|
102
101
|
c.flag 'unfurl_media', desc: 'Pass false to disable unfurling of media content.'
|
@@ -109,20 +108,20 @@ module Slack
|
|
109
108
|
g.desc 'Schedules a message to be sent to a channel.'
|
110
109
|
g.long_desc %( Schedules a message to be sent to a channel. )
|
111
110
|
g.command 'scheduleMessage' do |c|
|
112
|
-
c.flag '
|
113
|
-
c.flag 'post_at', desc: 'Unix timestamp representing the future time the message should post to Slack.'
|
111
|
+
c.flag 'as_user', desc: 'Set to true to post the message as the authed user, instead of as a bot. Defaults to false. Cannot be used by new Slack apps. See chat.postMessage.'
|
114
112
|
c.flag 'attachments', desc: 'A JSON-based array of structured attachments, presented as a URL-encoded string.'
|
115
113
|
c.flag 'blocks', desc: 'A JSON-based array of structured blocks, presented as a URL-encoded string.'
|
116
|
-
c.flag '
|
117
|
-
c.flag 'as_user', desc: 'Set to true to post the message as the authed user, instead of as a bot. Defaults to false. Cannot be used by new Slack apps. See chat.postMessage.'
|
114
|
+
c.flag 'channel', desc: 'Channel, private group, or DM channel to send message to. Can be an encoded ID, or a name. See below for more details.'
|
118
115
|
c.flag 'link_names', desc: 'Find and link user groups. No longer supports linking individual users; use syntax shown in Mentioning Users instead.'
|
119
116
|
c.flag 'markdown_text', desc: 'Accepts message text formatted in markdown. This argument should not be used in conjunction with blocks or text. Limit this field to 12,000 characters.'
|
120
|
-
c.flag 'metadata', desc: 'JSON object with event_type and event_payload fields, presented as a URL-encoded string. Metadata you post to Slack is accessible to any app or user who is a member of that workspace.'
|
121
117
|
c.flag 'parse', desc: 'Change how messages are treated. See chat.postMessage.'
|
118
|
+
c.flag 'post_at', desc: 'Unix timestamp representing the future time the message should post to Slack.'
|
122
119
|
c.flag 'reply_broadcast', desc: 'Used in conjunction with thread_ts and indicates whether reply should be made visible to everyone in the channel or conversation. Defaults to false.'
|
120
|
+
c.flag 'text', desc: 'How this field works and whether it is required depends on other fields you use in your API call. See below for more detail.'
|
123
121
|
c.flag 'thread_ts', desc: "Provide another message's ts value to make this message a reply. Avoid using a reply's ts value; use its parent instead."
|
124
122
|
c.flag 'unfurl_links', desc: 'Pass true to enable unfurling of primarily text-based content.'
|
125
123
|
c.flag 'unfurl_media', desc: 'Pass false to disable unfurling of media content.'
|
124
|
+
c.flag 'metadata', desc: 'JSON object with event_type and event_payload fields, presented as a URL-encoded string. Metadata you post to Slack is accessible to any app or user who is a member of that workspace.'
|
126
125
|
c.action do |_global_options, options, _args|
|
127
126
|
puts JSON.dump(@client.chat_scheduleMessage(options))
|
128
127
|
end
|
@@ -134,12 +133,12 @@ module Slack
|
|
134
133
|
c.flag 'channel', desc: 'Channel ID of the message. Both channel and ts must be provided together, or unfurl_id and source must be provided together.'
|
135
134
|
c.flag 'ts', desc: 'Timestamp of the message to add unfurl behavior to.'
|
136
135
|
c.flag 'unfurls', desc: 'URL-encoded JSON map with keys set to URLs featured in the the message, pointing to their unfurl blocks or message attachments.'
|
137
|
-
c.flag 'source', desc: 'The source of the link to unfurl. The source may either be composer, when the link is inside the message composer, or conversations_history, when the link has been posted to a conversation.'
|
138
|
-
c.flag 'unfurl_id', desc: 'The ID of the link to unfurl. Both unfurl_id and source must be provided together, or channel and ts must be provided together.'
|
139
|
-
c.flag 'user_auth_blocks', desc: 'Provide a JSON based array of structured blocks presented as URL-encoded string to send as an ephemeral message to the user as invitation to authenticate further and enable full unfurling behavior.'
|
140
136
|
c.flag 'user_auth_message', desc: 'Provide a simply-formatted string to send as an ephemeral message to the user as invitation to authenticate further and enable full unfurling behavior. Provides two buttons, Not now or Never ask me again.'
|
141
137
|
c.flag 'user_auth_required', desc: 'Set to true or 1 to indicate the user must install your Slack app to trigger unfurls for this domain.'
|
142
138
|
c.flag 'user_auth_url', desc: 'Send users to this custom URL where they will complete authentication in your app to fully trigger unfurling. Value should be properly URL-encoded.'
|
139
|
+
c.flag 'user_auth_blocks', desc: 'Provide a JSON based array of structured blocks presented as URL-encoded string to send as an ephemeral message to the user as invitation to authenticate further and enable full unfurling behavior.'
|
140
|
+
c.flag 'unfurl_id', desc: 'The ID of the link to unfurl. Both unfurl_id and source must be provided together, or channel and ts must be provided together.'
|
141
|
+
c.flag 'source', desc: 'The source of the link to unfurl. The source may either be composer, when the link is inside the message composer, or conversations_history, when the link has been posted to a conversation.'
|
143
142
|
c.action do |_global_options, options, _args|
|
144
143
|
puts JSON.dump(@client.chat_unfurl(options))
|
145
144
|
end
|
@@ -148,18 +147,18 @@ module Slack
|
|
148
147
|
g.desc 'Updates a message.'
|
149
148
|
g.long_desc %( Updates a message. )
|
150
149
|
g.command 'update' do |c|
|
151
|
-
c.flag '
|
152
|
-
c.flag 'ts', desc: 'Timestamp of the message to be updated.'
|
150
|
+
c.flag 'as_user', desc: 'Pass true to update the message as the authed user. Bot users in this context are considered authed users.'
|
153
151
|
c.flag 'attachments', desc: 'A JSON-based array of structured attachments, presented as a URL-encoded string.'
|
154
152
|
c.flag 'blocks', desc: 'A JSON-based array of structured blocks, presented as a URL-encoded string.'
|
155
|
-
c.flag 'text', desc: 'How this field works and whether it is required depends on other fields you use in your API call. See below for more detail.'
|
156
|
-
c.flag 'as_user', desc: 'Pass true to update the message as the authed user. Bot users in this context are considered authed users.'
|
157
|
-
c.flag 'file_ids', desc: 'Array of new file ids that will be sent with this message.'
|
158
|
-
c.flag 'link_names', desc: 'Find and link channel names and usernames. Defaults to none. If you do not specify a value for this field, the original value set for the message will be overwritten with the default, none.'
|
159
153
|
c.flag 'markdown_text', desc: 'Accepts message text formatted in markdown. This argument should not be used in conjunction with blocks or text. Limit this field to 12,000 characters.'
|
160
154
|
c.flag 'metadata', desc: "JSON object with event_type and event_payload fields, presented as a URL-encoded string. If you don't include this field, the message's previous metadata will be retained. To remove previous metadata, include an empty object for this field. Metadata you post to Slack is accessible to any app or user who is a member of that workspace."
|
155
|
+
c.flag 'channel', desc: 'Channel containing the message to be updated. For direct messages, ensure that this value is a DM ID (starts with D) instead of a User ID (starts with either U or W).'
|
156
|
+
c.flag 'link_names', desc: 'Find and link channel names and usernames. Defaults to none. If you do not specify a value for this field, the original value set for the message will be overwritten with the default, none.'
|
161
157
|
c.flag 'parse', desc: 'Change how messages are treated. Defaults to client, unlike chat.postMessage. Accepts either none or full. If you do not specify a value for this field, the original value set for the message will be overwritten with the default, client.'
|
158
|
+
c.flag 'text', desc: 'How this field works and whether it is required depends on other fields you use in your API call. See below for more detail.'
|
159
|
+
c.flag 'ts', desc: 'Timestamp of the message to be updated.'
|
162
160
|
c.flag 'reply_broadcast', desc: 'Broadcast an existing thread reply to make it visible to everyone in the channel or conversation.'
|
161
|
+
c.flag 'file_ids', desc: 'Array of new file ids that will be sent with this message.'
|
163
162
|
c.action do |_global_options, options, _args|
|
164
163
|
puts JSON.dump(@client.chat_update(options))
|
165
164
|
end
|
@@ -10,10 +10,10 @@ module Slack
|
|
10
10
|
g.long_desc %( Accepts an invitation to a Slack Connect channel. )
|
11
11
|
g.command 'acceptSharedInvite' do |c|
|
12
12
|
c.flag 'channel_name', desc: 'Name of the channel. If the channel does not exist already in your workspace, this name is the one that the channel will take.'
|
13
|
-
c.flag '
|
13
|
+
c.flag 'is_private', desc: 'Whether the channel should be private.'
|
14
14
|
c.flag 'free_trial_accepted', desc: "Whether you'd like to use your workspace's free trial to begin using Slack Connect."
|
15
15
|
c.flag 'invite_id', desc: "ID of the invite that you'd like to accept. Must provide either invite_id or channel_id. See the shared_channel_invite_received event payload for more details on how to retrieve the ID of the invitation."
|
16
|
-
c.flag '
|
16
|
+
c.flag 'channel_id', desc: "ID of the channel that you'd like to accept. Must provide either invite_id or channel_id."
|
17
17
|
c.flag 'team_id', desc: 'The ID of the workspace to accept the channel in. If an org-level token is used to call this method, the team_id argument is required.'
|
18
18
|
c.action do |_global_options, options, _args|
|
19
19
|
puts JSON.dump(@client.conversations_acceptSharedInvite(options))
|
@@ -51,8 +51,8 @@ module Slack
|
|
51
51
|
g.desc 'Initiates a public or private channel-based conversation'
|
52
52
|
g.long_desc %( Initiates a public or private channel-based conversation )
|
53
53
|
g.command 'create' do |c|
|
54
|
-
c.flag 'name', desc: 'Name of the public or private channel to create.'
|
55
54
|
c.flag 'is_private', desc: 'Create a private channel instead of a public one.'
|
55
|
+
c.flag 'name', desc: 'Name of the public or private channel to create.'
|
56
56
|
c.flag 'team_id', desc: 'encoded team id to create the channel in, required if org token is used.'
|
57
57
|
c.action do |_global_options, options, _args|
|
58
58
|
puts JSON.dump(@client.conversations_create(options))
|
@@ -99,8 +99,8 @@ module Slack
|
|
99
99
|
g.long_desc %( Invites users to a channel. )
|
100
100
|
g.command 'invite' do |c|
|
101
101
|
c.flag 'channel', desc: 'The ID of the public or private channel to invite user(s) to.'
|
102
|
-
c.flag 'users', desc: 'A comma separated list of user IDs. Up to 1000 users may be listed.'
|
103
102
|
c.flag 'force', desc: 'When set to true and multiple user IDs are provided, continue inviting the valid ones while disregarding invalid IDs. Defaults to false.'
|
103
|
+
c.flag 'users', desc: 'A comma separated list of user IDs. Up to 100 users may be listed.'
|
104
104
|
c.action do |_global_options, options, _args|
|
105
105
|
puts JSON.dump(@client.conversations_invite(options))
|
106
106
|
end
|
@@ -111,8 +111,8 @@ module Slack
|
|
111
111
|
g.command 'inviteShared' do |c|
|
112
112
|
c.flag 'channel', desc: "ID of the channel on your team that you'd like to share."
|
113
113
|
c.flag 'emails', desc: 'Optional email to receive this invite. Either emails or user_ids must be provided. Only one email or one user ID may be invited at a time.'
|
114
|
-
c.flag 'external_limited', desc: 'Optional boolean on whether invite is to an external limited member. Defaults to true.'
|
115
114
|
c.flag 'user_ids', desc: 'Optional user_id to receive this invite. Either emails or user_ids must be provided. Only one email or one user ID may be invited at a time.'
|
115
|
+
c.flag 'external_limited', desc: 'Optional boolean on whether invite is to an external limited member. Defaults to true.'
|
116
116
|
c.action do |_global_options, options, _args|
|
117
117
|
puts JSON.dump(@client.conversations_inviteShared(options))
|
118
118
|
end
|
@@ -162,8 +162,8 @@ module Slack
|
|
162
162
|
g.desc 'Lists shared channel invites that have been generated or received but have not been approved by all parties'
|
163
163
|
g.long_desc %( Lists shared channel invites that have been generated or received but have not been approved by all parties )
|
164
164
|
g.command 'listConnectInvites' do |c|
|
165
|
-
c.flag 'cursor', desc: 'Set to next_cursor returned by previous call to list items in subsequent page.'
|
166
165
|
c.flag 'team_id', desc: 'Encoded team id for the workspace to retrieve invites for, required if org token is used.'
|
166
|
+
c.flag 'cursor', desc: 'Set to next_cursor returned by previous call to list items in subsequent page.'
|
167
167
|
c.action do |_global_options, options, _args|
|
168
168
|
puts JSON.dump(@client.conversations_listConnectInvites(options))
|
169
169
|
end
|
@@ -194,9 +194,9 @@ module Slack
|
|
194
194
|
g.long_desc %( Opens or resumes a direct message or multi-person direct message. )
|
195
195
|
g.command 'open' do |c|
|
196
196
|
c.flag 'channel', desc: "Resume a conversation by supplying an im or mpim's ID. Or provide the users field instead."
|
197
|
-
c.flag 'prevent_creation', desc: 'Do not create a direct message or multi-person direct message. This is used to see if there is an existing dm or mpdm.'
|
198
197
|
c.flag 'return_im', desc: 'Boolean, indicates you want the full IM channel definition in the response.'
|
199
198
|
c.flag 'users', desc: 'Comma separated lists of users. If only one user is included, this creates a 1:1 DM. The ordering of the users is preserved whenever a multi-person direct message is returned. Supply a channel when not supplying users.'
|
199
|
+
c.flag 'prevent_creation', desc: 'Do not create a direct message or multi-person direct message. This is used to see if there is an existing dm or mpdm.'
|
200
200
|
c.action do |_global_options, options, _args|
|
201
201
|
puts JSON.dump(@client.conversations_open(options))
|
202
202
|
end
|
@@ -216,13 +216,13 @@ module Slack
|
|
216
216
|
g.long_desc %( Retrieve a thread of messages posted to a conversation )
|
217
217
|
g.command 'replies' do |c|
|
218
218
|
c.flag 'channel', desc: 'Conversation ID to fetch thread from.'
|
219
|
-
c.flag 'ts', desc: "Unique identifier of either a thread's parent message or a message in the thread. ts must be the timestamp of an existing message with 0 or more replies. If there are no replies then just the single message referenced by ts will return - it is just an ordinary, unthreaded message."
|
220
219
|
c.flag 'cursor', desc: "Paginate through collections of data by setting the cursor parameter to a next_cursor attribute returned by a previous request's response_metadata. Default value fetches the first 'page' of the collection. See pagination for more detail."
|
221
220
|
c.flag 'include_all_metadata', desc: 'Return all metadata associated with this message.'
|
222
221
|
c.flag 'inclusive', desc: 'Include messages with oldest or latest timestamps in results. Ignored unless either timestamp is specified.'
|
223
222
|
c.flag 'latest', desc: 'Only messages before this Unix timestamp will be included in results.'
|
224
223
|
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 users list hasn't been reached."
|
225
224
|
c.flag 'oldest', desc: 'Only messages after this Unix timestamp will be included in results.'
|
225
|
+
c.flag 'ts', desc: "Unique identifier of either a thread's parent message or a message in the thread. ts must be the timestamp of an existing message with 0 or more replies. If there are no replies then just the single message referenced by ts will return - it is just an ordinary, unthreaded message."
|
226
226
|
c.action do |_global_options, options, _args|
|
227
227
|
puts JSON.dump(@client.conversations_replies(options))
|
228
228
|
end
|
@@ -9,7 +9,7 @@ module Slack
|
|
9
9
|
g.desc 'Create a channel canvas for a channel'
|
10
10
|
g.long_desc %( Create a channel canvas for a channel )
|
11
11
|
g.command 'create' do |c|
|
12
|
-
c.flag 'channel_id', desc: 'Channel ID of the channel
|
12
|
+
c.flag 'channel_id', desc: 'Channel ID of the channel the canvas will be tabbed in.'
|
13
13
|
c.flag 'document_content', desc: 'Structure describing the type and value of the content to create.'
|
14
14
|
c.flag 'title', desc: 'Title of the newly created canvas.'
|
15
15
|
c.action do |_global_options, options, _args|
|
@@ -9,9 +9,9 @@ module Slack
|
|
9
9
|
g.desc "Upgrade or downgrade Slack Connect channel permissions between 'can post only' and 'can post and invite'."
|
10
10
|
g.long_desc %( Upgrade or downgrade Slack Connect channel permissions between 'can post only' and 'can post and invite'. )
|
11
11
|
g.command 'set' do |c|
|
12
|
-
c.flag 'action', desc: 'Type of action to be taken: upgrade or downgrade.'
|
13
12
|
c.flag 'channel', desc: 'The channel ID to change external invite permissions for.'
|
14
13
|
c.flag 'target_team', desc: 'The encoded team ID of the target team. Must be in the specified channel.'
|
14
|
+
c.flag 'action', desc: 'Type of action to be taken: upgrade or downgrade.'
|
15
15
|
c.action do |_global_options, options, _args|
|
16
16
|
puts JSON.dump(@client.conversations_externalInvitePermissions_set(options))
|
17
17
|
end
|
@@ -10,8 +10,8 @@ module Slack
|
|
10
10
|
g.long_desc %( Approves a request to add an external user to a channel and sends them a Slack Connect invite )
|
11
11
|
g.command 'approve' do |c|
|
12
12
|
c.flag 'invite_id', desc: 'ID of the requested shared channel invite to approve.'
|
13
|
-
c.flag 'channel_id', desc: 'Optional channel_id to which external user will be invited to. Will override the value on the requested invite.'
|
14
13
|
c.flag 'is_external_limited', desc: 'Optional boolean on whether the invited team will have post-only permissions in the channel. Will override the value on the requested invite.'
|
14
|
+
c.flag 'channel_id', desc: 'Optional channel_id to which external user will be invited to. Will override the value on the requested invite.'
|
15
15
|
c.flag 'message', desc: 'Object describing the text to send along with the invite. If this object is specified, both text and is_override are required properties. If is_override is set to true, text will override the original invitation message. Otherwise, text will be appended to the original invitation message. The total length of the message cannot exceed 560 characters. If is_override is set to false, the length of text and the user specified message on the invite request in total must be less than 560 characters.'
|
16
16
|
c.action do |_global_options, options, _args|
|
17
17
|
puts JSON.dump(@client.conversations_requestSharedInvite_approve(options))
|
@@ -31,13 +31,13 @@ module Slack
|
|
31
31
|
g.desc 'Lists requests to add external users to channels with ability to filter.'
|
32
32
|
g.long_desc %( Lists requests to add external users to channels with ability to filter. )
|
33
33
|
g.command 'list' do |c|
|
34
|
-
c.flag '
|
34
|
+
c.flag 'user_id', desc: 'Optional filter to return invitation requests for the inviting user.'
|
35
|
+
c.flag 'include_expired', desc: 'When true expired invitation requests will be returned, otherwise they will be excluded.'
|
35
36
|
c.flag 'include_approved', desc: 'When true approved invitation requests will be returned, otherwise they will be excluded.'
|
36
37
|
c.flag 'include_denied', desc: 'When true denied invitation requests will be returned, otherwise they will be excluded.'
|
37
|
-
c.flag 'include_expired', desc: 'When true expired invitation requests will be returned, otherwise they will be excluded.'
|
38
38
|
c.flag 'invite_ids', desc: 'An optional list of invitation ids to look up.'
|
39
39
|
c.flag 'limit', desc: 'The number of items to return. Must be between 1 - 1000 (inclusive).'
|
40
|
-
c.flag '
|
40
|
+
c.flag 'cursor', desc: "Paginate through collections of data by setting the cursor parameter to a next_cursor attribute returned by a previous request's response_metadata. See pagination for more detail."
|
41
41
|
c.action do |_global_options, options, _args|
|
42
42
|
puts JSON.dump(@client.conversations_requestSharedInvite_list(options))
|
43
43
|
end
|
data/bin/commands/dnd.rb
CHANGED
@@ -25,8 +25,8 @@ module Slack
|
|
25
25
|
g.desc "Retrieves a user's current Do Not Disturb status."
|
26
26
|
g.long_desc %( Retrieves a user's current Do Not Disturb status. )
|
27
27
|
g.command 'info' do |c|
|
28
|
-
c.flag 'team_id', desc: 'Encoded team id where passed in user param belongs, required if org token is used. If no user param is passed, then a team which has access to the app should be passed.'
|
29
28
|
c.flag 'user', desc: 'User to fetch status for (defaults to current user).'
|
29
|
+
c.flag 'team_id', desc: 'Encoded team id where passed in user param belongs, required if org token is used. If no user param is passed, then a team which has access to the app should be passed.'
|
30
30
|
c.action do |_global_options, options, _args|
|
31
31
|
puts JSON.dump(@client.dnd_info(options))
|
32
32
|
end
|
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.'
|