Skip to content

Commit dad00b0

Browse files
authored
Merge pull request #522 from slack-ruby/automated-api-update
Update API from slack-api-ref@8a22e57
2 parents 96d93dc + 1b3f4e1 commit dad00b0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+1263
-29
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* [#516](https://github.com/slack-ruby/slack-ruby-client/pull/516): Add support for Ruby 3.3 - [@olleolleolle](https://github.com/olleolleolle).
44
* [#520](https://github.com/slack-ruby/slack-ruby-client/pull/520): Add support for basic markdown formatting - [@nbgoodall](https://github.com/nbgoodall).
55
* [#523](https://github.com/slack-ruby/slack-ruby-client/pull/523): Fix coveralls handling parallel jobs - [@dblock](https://github.com/dblock).
6+
* [#522](https://github.com/slack-ruby-client/pulls/522): Update API from [slack-api-ref@8a22e57](https://github.com/slack-ruby/slack-api-ref/commit/8a22e57) - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
67
* Your contribution here.
78

89
### 2.3.0 (2024/01/31)

bin/commands/admin_emoji.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ class App
99
g.desc 'Add an emoji.'
1010
g.long_desc %( Add an emoji. )
1111
g.command 'add' do |c|
12-
c.flag 'name', desc: 'The name of the emoji to be added. Colons (:myemoji:) around the value are not required, although they may be included.'
12+
c.flag 'name', desc: 'The name of the emoji to be added (using lower-case letters only). Colons (:myemoji:) around the value are not required, although they may be included.'
1313
c.flag 'url', desc: 'The URL of a file to use as an image for the emoji. Square images under 128KB and with transparent backgrounds work best.'
1414
c.action do |_global_options, options, _args|
1515
puts JSON.dump(@client.admin_emoji_add(options))

bin/commands/admin_users.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ class App
6060
end
6161
end
6262

63-
g.desc 'Set an existing guest, regular user, or owner to be an admin user.'
64-
g.long_desc %( Set an existing guest, regular user, or owner to be an admin user. )
63+
g.desc 'Set an existing regular user or owner to be a workspace admin.'
64+
g.long_desc %( Set an existing regular user or owner to be a workspace admin. )
6565
g.command 'setAdmin' do |c|
6666
c.flag 'team_id', desc: 'The ID (T1234) of the workspace.'
6767
c.flag 'user_id', desc: 'The ID of the user to designate as an admin.'
@@ -81,8 +81,8 @@ class App
8181
end
8282
end
8383

84-
g.desc 'Set an existing guest, regular user, or admin user to be a workspace owner.'
85-
g.long_desc %( Set an existing guest, regular user, or admin user to be a workspace owner. )
84+
g.desc 'Set an existing regular user or admin to be a workspace owner.'
85+
g.long_desc %( Set an existing regular user or admin to be a workspace owner. )
8686
g.command 'setOwner' do |c|
8787
c.flag 'team_id', desc: 'The ID (T1234) of the workspace.'
8888
c.flag 'user_id', desc: 'Id of the user to promote to owner.'

bin/commands/admin_workflows.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,17 @@ class App
1010
g.long_desc %( Search workflows within the team or enterprise )
1111
g.command 'search' do |c|
1212
c.flag 'app_id', desc: 'The parent app ID for which to return workflows.'
13-
c.flag 'collaborator_ids', desc: 'Only include workflows by the collaborators inputted.'
13+
c.flag 'collaborator_ids', desc: 'Only include workflows where the provided user IDs are a manager/collaborator of that workflow.'
1414
c.flag 'cursor', desc: 'Set cursor to next_cursor returned by the previous call to list items in the next page.'
15+
c.flag 'is_sales_elevate', desc: 'Filter workflows by their Sales Elevate status.'
1516
c.flag 'limit', desc: 'The number of results that will be returned by the API on each invocation.'
1617
c.flag 'no_collaborators', desc: 'Only include workflows with no collaborators in the result; default is false.'
17-
c.flag 'num_trigger_ids', desc: 'Number of trigger IDs to fetch for each workflow; default is 0.'
18+
c.flag 'num_trigger_ids', desc: 'Number of trigger IDs to fetch for each workflow; default is 10.'
1819
c.flag 'query', desc: 'A search query to filter for workflow name or description.'
1920
c.flag 'sort', desc: 'The field used to sort the returned workflows.'
2021
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).'
2122
c.flag 'source', desc: 'Source of workflow creation, either from code or workflow builder.'
23+
c.flag 'trigger_type_id', desc: 'Only include workflows with this trigger type.'
2224
c.action do |_global_options, options, _args|
2325
puts JSON.dump(@client.admin_workflows_search(options))
2426
end
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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 'AdminWorkflowsTriggersTypesPermissions methods.'
8+
command 'admin_workflows_triggers_types_permissions' do |g|
9+
g.desc 'list the permissions for using each trigger type in workflow builder'
10+
g.long_desc %( list the permissions for using each trigger type in workflow builder )
11+
g.command 'lookup' do |c|
12+
c.flag 'trigger_type_ids', desc: 'The trigger types IDs for which to get the permissions.'
13+
c.action do |_global_options, options, _args|
14+
puts JSON.dump(@client.admin_workflows_triggers_types_permissions_lookup(options))
15+
end
16+
end
17+
18+
g.desc 'Set the permissions for using a trigger type in workflow builder'
19+
g.long_desc %( Set the permissions for using a trigger type in workflow builder )
20+
g.command 'set' do |c|
21+
c.flag 'id', desc: 'The trigger type ID for which to set the permissions.'
22+
c.flag 'visibility', desc: 'The function visibility.'
23+
c.flag 'user_ids', desc: 'List of user IDs to allow for named_entities visibility.'
24+
c.action do |_global_options, options, _args|
25+
puts JSON.dump(@client.admin_workflows_triggers_types_permissions_set(options))
26+
end
27+
end
28+
end
29+
end
30+
end
31+
end

bin/commands/apps_datastore.rb

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,52 @@ module Cli
66
class App
77
desc 'AppsDatastore methods.'
88
command 'apps_datastore' do |g|
9+
g.desc 'Delete items from a datastore in bulk'
10+
g.long_desc %( Delete items from a datastore in bulk )
11+
g.command 'bulkDelete' do |c|
12+
c.flag 'datastore', desc: 'name of the datastore.'
13+
c.flag 'ids', desc: 'IDs of items to be deleted.'
14+
c.flag 'app_id', desc: '.'
15+
c.action do |_global_options, options, _args|
16+
puts JSON.dump(@client.apps_datastore_bulkDelete(options))
17+
end
18+
end
19+
20+
g.desc 'Get items from a datastore in bulk'
21+
g.long_desc %( Get items from a datastore in bulk )
22+
g.command 'bulkGet' do |c|
23+
c.flag 'datastore', desc: 'name of the datastore.'
24+
c.flag 'ids', desc: "items' ids."
25+
c.flag 'app_id', desc: '.'
26+
c.action do |_global_options, options, _args|
27+
puts JSON.dump(@client.apps_datastore_bulkGet(options))
28+
end
29+
end
30+
31+
g.desc 'Creates or replaces existing items in bulk'
32+
g.long_desc %( Creates or replaces existing items in bulk )
33+
g.command 'bulkPut' do |c|
34+
c.flag 'datastore', desc: 'name of the datastore.'
35+
c.flag 'items', desc: 'attribute names and values of the items; limit of 25.'
36+
c.flag 'app_id', desc: '.'
37+
c.action do |_global_options, options, _args|
38+
puts JSON.dump(@client.apps_datastore_bulkPut(options))
39+
end
40+
end
41+
42+
g.desc 'Count the number of items in a datastore that match a query'
43+
g.long_desc %( Count the number of items in a datastore that match a query )
44+
g.command 'count' do |c|
45+
c.flag 'datastore', desc: 'Name of the datastore.'
46+
c.flag 'app_id', desc: 'Required if calling with user token.'
47+
c.flag 'expression', desc: 'A query filter expression https://api.slack.com/future/datastores.'
48+
c.flag 'expression_attributes', desc: 'A map of attributes referenced in expression.'
49+
c.flag 'expression_values', desc: 'A map of values referenced in expression.'
50+
c.action do |_global_options, options, _args|
51+
puts JSON.dump(@client.apps_datastore_count(options))
52+
end
53+
end
54+
955
g.desc 'Delete an item from a datastore'
1056
g.long_desc %( Delete an item from a datastore )
1157
g.command 'delete' do |c|

bin/commands/canvases.rb

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
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 'Canvases methods.'
8+
command 'canvases' do |g|
9+
g.desc 'Create Canvas for a user.'
10+
g.long_desc %( Create Canvas for a user. )
11+
g.command 'create' do |c|
12+
c.flag 'document_content', desc: 'Structure describing the type and value of the content to create.'
13+
c.flag 'title', desc: 'Title of the newly created canvas.'
14+
c.action do |_global_options, options, _args|
15+
puts JSON.dump(@client.canvases_create(options))
16+
end
17+
end
18+
19+
g.desc 'Deletes a canvas.'
20+
g.long_desc %( Deletes a canvas. )
21+
g.command 'delete' do |c|
22+
c.flag 'canvas_id', desc: 'Encoded ID of the canvas.'
23+
c.action do |_global_options, options, _args|
24+
puts JSON.dump(@client.canvases_delete(options))
25+
end
26+
end
27+
28+
g.desc 'Update an existing canvas'
29+
g.long_desc %( Update an existing canvas )
30+
g.command 'edit' do |c|
31+
c.flag 'canvas_id', desc: 'Encoded ID of the canvas.'
32+
c.flag 'changes', desc: 'List of changes to apply on the specified canvas.'
33+
c.action do |_global_options, options, _args|
34+
puts JSON.dump(@client.canvases_edit(options))
35+
end
36+
end
37+
end
38+
end
39+
end
40+
end

bin/commands/canvases_access.rb

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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 'CanvasesAccess methods.'
8+
command 'canvases_access' do |g|
9+
g.desc 'Remove access to a canvas for specified entities'
10+
g.long_desc %( Remove access to a canvas for specified entities )
11+
g.command 'delete' do |c|
12+
c.flag 'canvas_id', desc: 'Encoded ID of the canvas.'
13+
c.flag 'channel_ids', desc: 'List of channels you wish to update access for.'
14+
c.flag 'user_ids', desc: 'List of users you wish to update access for.'
15+
c.action do |_global_options, options, _args|
16+
puts JSON.dump(@client.canvases_access_delete(options))
17+
end
18+
end
19+
20+
g.desc 'Sets the access level to a canvas for specified entities'
21+
g.long_desc %( Sets the access level to a canvas for specified entities )
22+
g.command 'set' do |c|
23+
c.flag 'access_level', desc: 'Desired level of access (e.g. read, write).'
24+
c.flag 'canvas_id', desc: 'Encoded ID of the canvas.'
25+
c.flag 'channel_ids', desc: 'List of channels you wish to update access for.'
26+
c.flag 'user_ids', desc: 'List of users you wish to update access for.'
27+
c.action do |_global_options, options, _args|
28+
puts JSON.dump(@client.canvases_access_set(options))
29+
end
30+
end
31+
end
32+
end
33+
end
34+
end

bin/commands/canvases_sections.rb

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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 'CanvasesSections methods.'
8+
command 'canvases_sections' do |g|
9+
g.desc 'Find sections matching the provided criteria'
10+
g.long_desc %( Find sections matching the provided criteria )
11+
g.command 'lookup' do |c|
12+
c.flag 'canvas_id', desc: 'Encoded ID of the canvas.'
13+
c.flag 'criteria', desc: 'Filtering criteria.'
14+
c.action do |_global_options, options, _args|
15+
puts JSON.dump(@client.canvases_sections_lookup(options))
16+
end
17+
end
18+
end
19+
end
20+
end
21+
end

bin/commands/conversations.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class App
7777
c.flag 'include_all_metadata', desc: 'Return all metadata associated with this message.'
7878
c.flag 'inclusive', desc: 'Include messages with oldest or latest timestamps in results. Ignored unless either timestamp is specified.'
7979
c.flag 'latest', desc: 'Only messages before this Unix timestamp will be included in results. Default is the current time.'
80-
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."
80+
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 conversation history hasn't been reached. Maximum of 999."
8181
c.flag 'oldest', desc: 'Only messages after this Unix timestamp will be included in results.'
8282
c.action do |_global_options, options, _args|
8383
puts JSON.dump(@client.conversations_history(options))

0 commit comments

Comments
 (0)