Skip to content

Commit 3d6ef7c

Browse files
committed
Update API from slack-api-ref@bc545649.
1 parent d27571e commit 3d6ef7c

21 files changed

+158
-70
lines changed

bin/commands/admin_apps_activities.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@ class App
1010
g.long_desc %( Get logs for a specified team/org )
1111
g.command 'list' do |c|
1212
c.flag 'app_id', desc: 'The ID of the app to get activities from.'
13-
c.flag 'component_id', desc: "The component ID of log events to be returned. Will be 'FnXXXXXX' for functions, and 'WfXXXXXX' for worflows."
14-
c.flag 'component_type', desc: "The component type of log events to be returned. Acceptable values are ('events_api', 'workflows', 'functions', 'tables')."
13+
c.flag 'component_id', desc: 'The component ID of log events to be returned. Will be FnXXXXXX for functions, and WfXXXXXX for worflows.'
14+
c.flag 'component_type', desc: 'The component type of log events to be returned. Acceptable values are events_api, workflows, functions and tables.'
1515
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."
1616
c.flag 'limit', desc: 'The maximum number of items to return.'
1717
c.flag 'log_event_type', desc: 'The event type of log events to be returned.'
1818
c.flag 'max_date_created', desc: 'The latest timestamp of the log to retrieve (epoch microseconds).'
1919
c.flag 'min_date_created', desc: 'The earliest timestamp of the log to retrieve (epoch microseconds).'
20-
c.flag 'min_log_level', desc: "The minimum log level of the log events to be returned. Defaults to 'info'. Acceptable values (in order of relative importance from smallest to largest) are ('trace', 'debug', 'info', 'warn', 'error', 'fatal')."
20+
c.flag 'min_log_level', desc: 'The minimum log level of the log events to be returned. Defaults to info. Acceptable values (in order of relative importance from smallest to largest) are trace, debug, info, warn, error and fatal.'
2121
c.flag 'sort_direction', desc: 'The direction you want the data sorted by (always by timestamp).'
22-
c.flag 'source', desc: "The source of log events to be returned. Acceptable values are ('slack', 'developer')."
22+
c.flag 'source', desc: 'The source of log events to be returned. Acceptable values are slack and developer.'
2323
c.flag 'team_id', desc: 'The team who owns this log.'
2424
c.flag 'trace_id', desc: 'The trace ID of log events to be returned.'
2525
c.action do |_global_options, options, _args|

bin/commands/admin_apps_config.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ class App
1919
g.long_desc %( Set the app config for a connector )
2020
g.command 'set' do |c|
2121
c.flag 'app_id', desc: 'The encoded app ID to set the app config for.'
22-
c.flag 'domain_restrictions', desc: 'Domain restrictions for the app.'
23-
c.flag 'workflow_auth_strategy', desc: 'The workflow auth permission.'
22+
c.flag 'domain_restrictions', desc: 'Domain restrictions for the app. Should be an object with two properties: urls and emails. Each is an array of strings, and each sets the allowed URLs and emails for connector authorization, respectively.'
23+
c.flag 'workflow_auth_strategy', desc: 'The workflow auth permission. Can be one of builder_choice or end_user_only.'
2424
c.action do |_global_options, options, _args|
2525
puts JSON.dump(@client.admin_apps_config_set(options))
2626
end

bin/commands/admin_conversations.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ class App
176176
c.flag 'sort', desc: 'Possible values are relevant (search ranking based on what we think is closest), name (alphabetical), member_count (number of users in the channel), and created (date channel was created). You can optionally pair this with the sort_dir arg to change how it is sorted.'
177177
c.flag 'sort_dir', desc: 'Sort direction. Possible values are asc for ascending order like (1, 2, 3) or (a, b, c), and desc for descending order like (3, 2, 1) or (c, b, a).'
178178
c.flag 'team_ids', desc: 'Comma separated string of team IDs, signifying the internal workspaces to search through.'
179+
c.flag 'total_count_only', desc: 'Only return the total_count of channels. Omits channel data and allows access for admins without channel manager permissions.'
179180
c.action do |_global_options, options, _args|
180181
puts JSON.dump(@client.admin_conversations_search(options))
181182
end

bin/commands/admin_users.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ class App
4141
g.long_desc %( List users on a workspace )
4242
g.command 'list' do |c|
4343
c.flag 'cursor', desc: 'Set cursor to next_cursor returned by the previous call to list items in the next page.'
44+
c.flag 'include_deactivated_user_workspaces', desc: 'Only applies with org token and no team_id. If true, return workspaces for a user even if they may be deactivated on them. If false, return workspaces for a user only when user is active on them. Default is false.'
45+
c.flag 'is_active', desc: 'If true, only active users will be returned. If false, only deactivated users will be returned. Default is true.'
4446
c.flag 'limit', desc: 'Limit for how many users to be retrieved per page.'
4547
c.flag 'team_id', desc: 'The ID (T1234) of the workspace. The team_id is required if you use an org-level token.'
4648
c.action do |_global_options, options, _args|

bin/commands/chat.rb

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,11 @@ class App
6363
g.long_desc %( Sends an ephemeral message to a user in a channel. )
6464
g.command 'postEphemeral' do |c|
6565
c.flag 'channel', desc: 'Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name.'
66-
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.'
6766
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.'
68-
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.'
6967
c.flag 'attachments', desc: 'A JSON-based array of structured attachments, presented as a URL-encoded string.'
7068
c.flag 'blocks', desc: 'A JSON-based array of structured blocks, presented as a URL-encoded string.'
69+
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.'
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.'
7171
c.flag 'icon_emoji', desc: 'Emoji to use as the icon for this message. Overrides icon_url.'
7272
c.flag 'icon_url', desc: 'URL to an image to use as the icon for this message.'
7373
c.flag 'link_names', desc: 'Find and link channel names and usernames.'
@@ -85,7 +85,7 @@ class App
8585
c.flag 'channel', desc: 'Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name. See below for more details.'
8686
c.flag 'attachments', desc: 'A JSON-based array of structured attachments, presented as a URL-encoded string.'
8787
c.flag 'blocks', desc: 'A JSON-based array of structured blocks, presented as a URL-encoded string.'
88-
c.flag 'text', desc: 'The formatted text of the message to be published. If blocks are included, this will become the fallback text used in notifications.'
88+
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.'
8989
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 Slack apps. See authorship below.'
9090
c.flag 'icon_emoji', desc: 'Emoji to use as the icon for this message. Overrides icon_url.'
9191
c.flag 'icon_url', desc: 'URL to an image to use as the icon for this message.'
@@ -94,6 +94,7 @@ class App
9494
c.flag 'mrkdwn', desc: 'Disable Slack markup parsing by setting to false. Enabled by default.'
9595
c.flag 'parse', desc: 'Change how messages are treated. See below.'
9696
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.'
97+
c.flag 'service_team_id', desc: 'For a message posted in App Home, Team ID corresponding to the selected app installation.'
9798
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."
9899
c.flag 'unfurl_links', desc: 'Pass true to enable unfurling of primarily text-based content.'
99100
c.flag 'unfurl_media', desc: 'Pass false to disable unfurling of media content.'
@@ -108,10 +109,10 @@ class App
108109
g.command 'scheduleMessage' do |c|
109110
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.'
110111
c.flag 'post_at', desc: 'Unix EPOCH timestamp of time in future to send the message.'
111-
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.'
112-
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.'
113112
c.flag 'attachments', desc: 'A JSON-based array of structured attachments, presented as a URL-encoded string.'
114113
c.flag 'blocks', desc: 'A JSON-based array of structured blocks, presented as a URL-encoded string.'
114+
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.'
115+
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.'
115116
c.flag 'link_names', desc: 'Find and link user groups. No longer supports linking individual users; use syntax shown in Mentioning Users instead.'
116117
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.'
117118
c.flag 'parse', desc: 'Change how messages are treated. See chat.postMessage.'
@@ -146,15 +147,15 @@ class App
146147
g.command 'update' do |c|
147148
c.flag 'channel', desc: 'Channel containing the message to be updated.'
148149
c.flag 'ts', desc: 'Timestamp of the message to be updated.'
150+
c.flag 'attachments', desc: 'A JSON-based array of structured attachments, presented as a URL-encoded string.'
151+
c.flag 'blocks', desc: 'A JSON-based array of structured blocks, presented as a URL-encoded string.'
152+
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.'
149153
c.flag 'as_user', desc: 'Pass true to update the message as the authed user. Bot users in this context are considered authed users.'
150-
c.flag 'attachments', desc: "A JSON-based array of structured attachments, presented as a URL-encoded string. This field is required when not presenting text. If you don't include this field, the message's previous attachments will be retained. To remove previous attachments, include an empty array for this field."
151-
c.flag 'blocks', desc: "A JSON-based array of structured blocks, presented as a URL-encoded string. If you don't include this field, the message's previous blocks will be retained. To remove previous blocks, include an empty array for this field."
152154
c.flag 'file_ids', desc: 'Array of new file ids that will be sent with this message.'
153155
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.'
154156
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."
155157
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.'
156158
c.flag 'reply_broadcast', desc: 'Broadcast an existing thread reply to make it visible to everyone in the channel or conversation.'
157-
c.flag 'text', desc: "New text for the message, using the default formatting rules. It's not required when presenting blocks or attachments."
158159
c.action do |_global_options, options, _args|
159160
puts JSON.dump(@client.chat_update(options))
160161
end

bin/commands/conversations.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ class App
150150
g.command 'list' do |c|
151151
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."
152152
c.flag 'exclude_archived', desc: 'Set to true to exclude archived channels from the list.'
153-
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. Must be an integer no larger than 1000."
153+
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. Must be an integer under 1000."
154154
c.flag 'team_id', desc: 'encoded team id to list channels in, required if token belongs to org-wide app.'
155155
c.flag 'types', desc: 'Mix and match channel types by providing a comma-separated list of any combination of public_channel, private_channel, mpim, im.'
156156
c.action do |_global_options, options, _args|

bin/commands/team.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class App
4444
g.long_desc %( Gets the integration logs for the current team. )
4545
g.command 'integrationLogs' do |c|
4646
c.flag 'app_id', desc: 'Filter logs to this Slack app. Defaults to all logs.'
47-
c.flag 'change_type', desc: 'Filter logs with this change type. Defaults to all logs.'
47+
c.flag 'change_type', desc: 'Filter logs with this change type. Possible values are added, removed, enabled, disabled, and updated. Defaults to all logs.'
4848
c.flag 'service_id', desc: 'Filter logs to this service. Defaults to all logs.'
4949
c.flag 'team_id', desc: 'encoded team id to get logs from, required if org token is used.'
5050
c.flag 'user', desc: "Filter logs generated by this user's actions. Defaults to all logs."

bin/commands/usergroups.rb

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ module Cli
66
class App
77
desc 'Usergroups methods.'
88
command 'usergroups' do |g|
9-
g.desc 'Create a User Group'
10-
g.long_desc %( Create a User Group )
9+
g.desc 'Create a User Group.'
10+
g.long_desc %( Create a User Group. )
1111
g.command 'create' do |c|
1212
c.flag 'name', desc: 'A name for the User Group. Must be unique among User Groups.'
1313
c.flag 'channels', desc: 'A comma separated string of encoded channel IDs for which the User Group uses as a default.'
@@ -20,8 +20,8 @@ class App
2020
end
2121
end
2222

23-
g.desc 'Disable an existing User Group'
24-
g.long_desc %( Disable an existing User Group )
23+
g.desc 'Disable an existing User Group.'
24+
g.long_desc %( Disable an existing User Group. )
2525
g.command 'disable' do |c|
2626
c.flag 'usergroup', desc: 'The encoded ID of the User Group to disable.'
2727
c.flag 'include_count', desc: 'Include the number of users in the User Group.'
@@ -31,8 +31,8 @@ class App
3131
end
3232
end
3333

34-
g.desc 'Enable a User Group'
35-
g.long_desc %( Enable a User Group )
34+
g.desc 'Enable a User Group.'
35+
g.long_desc %( Enable a User Group. )
3636
g.command 'enable' do |c|
3737
c.flag 'usergroup', desc: 'The encoded ID of the User Group to enable.'
3838
c.flag 'include_count', desc: 'Include the number of users in the User Group.'
@@ -42,8 +42,8 @@ class App
4242
end
4343
end
4444

45-
g.desc 'List all User Groups for a team'
46-
g.long_desc %( List all User Groups for a team )
45+
g.desc 'List all User Groups for a team.'
46+
g.long_desc %( List all User Groups for a team. )
4747
g.command 'list' do |c|
4848
c.flag 'include_count', desc: 'Include the number of users in each User Group.'
4949
c.flag 'include_disabled', desc: 'Include disabled User Groups.'
@@ -54,8 +54,8 @@ class App
5454
end
5555
end
5656

57-
g.desc 'Update an existing User Group'
58-
g.long_desc %( Update an existing User Group )
57+
g.desc 'Update an existing User Group.'
58+
g.long_desc %( Update an existing User Group. )
5959
g.command 'update' do |c|
6060
c.flag 'usergroup', desc: 'The encoded ID of the User Group to update.'
6161
c.flag 'channels', desc: 'A comma separated string of encoded channel IDs for which the User Group uses as a default.'

bin/commands/usergroups_users.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@ module Cli
66
class App
77
desc 'UsergroupsUsers methods.'
88
command 'usergroups_users' do |g|
9-
g.desc 'List all users in a User Group'
10-
g.long_desc %( List all users in a User Group )
9+
g.desc 'List all users in a User Group.'
10+
g.long_desc %( List all users in a User Group. )
1111
g.command 'list' do |c|
12-
c.flag 'usergroup', desc: 'The encoded ID of the User Group to update.'
12+
c.flag 'usergroup', desc: 'The encoded ID of the User Group to list users for.'
1313
c.flag 'include_disabled', desc: 'Allow results that involve disabled User Groups.'
1414
c.flag 'team_id', desc: 'encoded team id where the user group exists, required if org token is used.'
1515
c.action do |_global_options, options, _args|
1616
puts JSON.dump(@client.usergroups_users_list(options))
1717
end
1818
end
1919

20-
g.desc 'Update the list of users for a User Group'
21-
g.long_desc %( Update the list of users for a User Group )
20+
g.desc 'Update the list of users for a User Group.'
21+
g.long_desc %( Update the list of users for a User Group. )
2222
g.command 'update' do |c|
2323
c.flag 'usergroup', desc: 'The encoded ID of the User Group to update.'
2424
c.flag 'users', desc: 'A comma separated string of encoded user IDs that represent the entire list of users for the User Group.'

0 commit comments

Comments
 (0)