Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update API from slack-api-ref@8a22e57 #509

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
### 2.3.1 (Next)

* [#509](https://github.com/slack-ruby-client/pulls/509): 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).
* Your contribution here.

### 2.3.0 (2024/01/31)
Expand Down
2 changes: 1 addition & 1 deletion bin/commands/admin_emoji.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class App
g.desc 'Add an emoji.'
g.long_desc %( Add an emoji. )
g.command 'add' do |c|
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.'
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.'
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.'
c.action do |_global_options, options, _args|
puts JSON.dump(@client.admin_emoji_add(options))
Expand Down
8 changes: 4 additions & 4 deletions bin/commands/admin_users.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ class App
end
end

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

g.desc 'Set an existing guest, regular user, or admin user to be a workspace owner.'
g.long_desc %( Set an existing guest, regular user, or admin user to be a workspace owner. )
g.desc 'Set an existing regular user or admin to be a workspace owner.'
g.long_desc %( Set an existing regular user or admin to be a workspace owner. )
g.command 'setOwner' do |c|
c.flag 'team_id', desc: 'The ID (T1234) of the workspace.'
c.flag 'user_id', desc: 'Id of the user to promote to owner.'
Expand Down
6 changes: 4 additions & 2 deletions bin/commands/admin_workflows.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,17 @@ class App
g.long_desc %( Search workflows within the team or enterprise )
g.command 'search' do |c|
c.flag 'app_id', desc: 'The parent app ID for which to return workflows.'
c.flag 'collaborator_ids', desc: 'Only include workflows by the collaborators inputted.'
c.flag 'collaborator_ids', desc: 'Only include workflows where the provided user IDs are a manager/collaborator of that workflow.'
c.flag 'cursor', desc: 'Set cursor to next_cursor returned by the previous call to list items in the next page.'
c.flag 'is_sales_elevate', desc: 'Filter workflows by their Sales Elevate status.'
c.flag 'limit', desc: 'The number of results that will be returned by the API on each invocation.'
c.flag 'no_collaborators', desc: 'Only include workflows with no collaborators in the result; default is false.'
c.flag 'num_trigger_ids', desc: 'Number of trigger IDs to fetch for each workflow; default is 0.'
c.flag 'num_trigger_ids', desc: 'Number of trigger IDs to fetch for each workflow; default is 10.'
c.flag 'query', desc: 'A search query to filter for workflow name or description.'
c.flag 'sort', desc: 'The field used to sort the returned workflows.'
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).'
c.flag 'source', desc: 'Source of workflow creation, either from code or workflow builder.'
c.flag 'trigger_type_id', desc: 'Only include workflows with this trigger type.'
c.action do |_global_options, options, _args|
puts JSON.dump(@client.admin_workflows_search(options))
end
Expand Down
31 changes: 31 additions & 0 deletions bin/commands/admin_workflows_triggers_types_permissions.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# frozen_string_literal: true
# This file was auto-generated by lib/tasks/web.rake

module Slack
module Cli
class App
desc 'AdminWorkflowsTriggersTypesPermissions methods.'
command 'admin_workflows_triggers_types_permissions' do |g|
g.desc 'list the permissions for using each trigger type in workflow builder'
g.long_desc %( list the permissions for using each trigger type in workflow builder )
g.command 'lookup' do |c|
c.flag 'trigger_type_ids', desc: 'The trigger types IDs for which to get the permissions.'
c.action do |_global_options, options, _args|
puts JSON.dump(@client.admin_workflows_triggers_types_permissions_lookup(options))
end
end

g.desc 'Set the permissions for using a trigger type in workflow builder'
g.long_desc %( Set the permissions for using a trigger type in workflow builder )
g.command 'set' do |c|
c.flag 'id', desc: 'The trigger type ID for which to set the permissions.'
c.flag 'visibility', desc: 'The function visibility.'
c.flag 'user_ids', desc: 'List of user IDs to allow for named_entities visibility.'
c.action do |_global_options, options, _args|
puts JSON.dump(@client.admin_workflows_triggers_types_permissions_set(options))
end
end
end
end
end
end
46 changes: 46 additions & 0 deletions bin/commands/apps_datastore.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,52 @@ module Cli
class App
desc 'AppsDatastore methods.'
command 'apps_datastore' do |g|
g.desc 'Delete items from a datastore in bulk'
g.long_desc %( Delete items from a datastore in bulk )
g.command 'bulkDelete' do |c|
c.flag 'datastore', desc: 'name of the datastore.'
c.flag 'ids', desc: 'IDs of items to be deleted.'
c.flag 'app_id', desc: '.'
c.action do |_global_options, options, _args|
puts JSON.dump(@client.apps_datastore_bulkDelete(options))
end
end

g.desc 'Get items from a datastore in bulk'
g.long_desc %( Get items from a datastore in bulk )
g.command 'bulkGet' do |c|
c.flag 'datastore', desc: 'name of the datastore.'
c.flag 'ids', desc: "items' ids."
c.flag 'app_id', desc: '.'
c.action do |_global_options, options, _args|
puts JSON.dump(@client.apps_datastore_bulkGet(options))
end
end

g.desc 'Creates or replaces existing items in bulk'
g.long_desc %( Creates or replaces existing items in bulk )
g.command 'bulkPut' do |c|
c.flag 'datastore', desc: 'name of the datastore.'
c.flag 'items', desc: 'attribute names and values of the items; limit of 25.'
c.flag 'app_id', desc: '.'
c.action do |_global_options, options, _args|
puts JSON.dump(@client.apps_datastore_bulkPut(options))
end
end

g.desc 'Count the number of items in a datastore that match a query'
g.long_desc %( Count the number of items in a datastore that match a query )
g.command 'count' do |c|
c.flag 'datastore', desc: 'Name of the datastore.'
c.flag 'app_id', desc: 'Required if calling with user token.'
c.flag 'expression', desc: 'A query filter expression https://api.slack.com/future/datastores.'
c.flag 'expression_attributes', desc: 'A map of attributes referenced in expression.'
c.flag 'expression_values', desc: 'A map of values referenced in expression.'
c.action do |_global_options, options, _args|
puts JSON.dump(@client.apps_datastore_count(options))
end
end

g.desc 'Delete an item from a datastore'
g.long_desc %( Delete an item from a datastore )
g.command 'delete' do |c|
Expand Down
40 changes: 40 additions & 0 deletions bin/commands/canvases.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# frozen_string_literal: true
# This file was auto-generated by lib/tasks/web.rake

module Slack
module Cli
class App
desc 'Canvases methods.'
command 'canvases' do |g|
g.desc 'Create Canvas for a user.'
g.long_desc %( Create Canvas for a user. )
g.command 'create' do |c|
c.flag 'document_content', desc: 'Structure describing the type and value of the content to create.'
c.flag 'title', desc: 'Title of the newly created canvas.'
c.action do |_global_options, options, _args|
puts JSON.dump(@client.canvases_create(options))
end
end

g.desc 'Deletes a canvas.'
g.long_desc %( Deletes a canvas. )
g.command 'delete' do |c|
c.flag 'canvas_id', desc: 'Encoded ID of the canvas.'
c.action do |_global_options, options, _args|
puts JSON.dump(@client.canvases_delete(options))
end
end

g.desc 'Update an existing canvas'
g.long_desc %( Update an existing canvas )
g.command 'edit' do |c|
c.flag 'canvas_id', desc: 'Encoded ID of the canvas.'
c.flag 'changes', desc: 'List of changes to apply on the specified canvas.'
c.action do |_global_options, options, _args|
puts JSON.dump(@client.canvases_edit(options))
end
end
end
end
end
end
34 changes: 34 additions & 0 deletions bin/commands/canvases_access.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# frozen_string_literal: true
# This file was auto-generated by lib/tasks/web.rake

module Slack
module Cli
class App
desc 'CanvasesAccess methods.'
command 'canvases_access' do |g|
g.desc 'Remove access to a canvas for specified entities'
g.long_desc %( Remove access to a canvas for specified entities )
g.command 'delete' do |c|
c.flag 'canvas_id', desc: 'Encoded ID of the canvas.'
c.flag 'channel_ids', desc: 'List of channels you wish to update access for.'
c.flag 'user_ids', desc: 'List of users you wish to update access for.'
c.action do |_global_options, options, _args|
puts JSON.dump(@client.canvases_access_delete(options))
end
end

g.desc 'Sets the access level to a canvas for specified entities'
g.long_desc %( Sets the access level to a canvas for specified entities )
g.command 'set' do |c|
c.flag 'access_level', desc: 'Desired level of access (e.g. read, write).'
c.flag 'canvas_id', desc: 'Encoded ID of the canvas.'
c.flag 'channel_ids', desc: 'List of channels you wish to update access for.'
c.flag 'user_ids', desc: 'List of users you wish to update access for.'
c.action do |_global_options, options, _args|
puts JSON.dump(@client.canvases_access_set(options))
end
end
end
end
end
end
21 changes: 21 additions & 0 deletions bin/commands/canvases_sections.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# frozen_string_literal: true
# This file was auto-generated by lib/tasks/web.rake

module Slack
module Cli
class App
desc 'CanvasesSections methods.'
command 'canvases_sections' do |g|
g.desc 'Find sections matching the provided criteria'
g.long_desc %( Find sections matching the provided criteria )
g.command 'lookup' do |c|
c.flag 'canvas_id', desc: 'Encoded ID of the canvas.'
c.flag 'criteria', desc: 'Filtering criteria.'
c.action do |_global_options, options, _args|
puts JSON.dump(@client.canvases_sections_lookup(options))
end
end
end
end
end
end
2 changes: 1 addition & 1 deletion bin/commands/conversations.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class App
c.flag 'include_all_metadata', desc: 'Return all metadata associated with this message.'
c.flag 'inclusive', desc: 'Include messages with oldest or latest timestamps in results. Ignored unless either timestamp is specified.'
c.flag 'latest', desc: 'Only messages before this Unix timestamp will be included in results. Default is the current time.'
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."
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."
c.flag 'oldest', desc: 'Only messages after this Unix timestamp will be included in results.'
c.action do |_global_options, options, _args|
puts JSON.dump(@client.conversations_history(options))
Expand Down
21 changes: 21 additions & 0 deletions bin/commands/conversations_canvases.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# frozen_string_literal: true
# This file was auto-generated by lib/tasks/web.rake

module Slack
module Cli
class App
desc 'ConversationsCanvases methods.'
command 'conversations_canvases' do |g|
g.desc 'Create a Channel Canvas for a channel.'
g.long_desc %( Create a Channel Canvas for a channel. )
g.command 'create' do |c|
c.flag 'channel_id', desc: 'Channel ID of the channel we create the channel canvas for.'
c.flag 'document_content', desc: 'Structure describing the type and value of the content to create.'
c.action do |_global_options, options, _args|
puts JSON.dump(@client.conversations_canvases_create(options))
end
end
end
end
end
end
22 changes: 22 additions & 0 deletions bin/commands/conversations_externalInvitePermissions.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# frozen_string_literal: true
# This file was auto-generated by lib/tasks/web.rake

module Slack
module Cli
class App
desc 'ConversationsExternalinvitepermissions methods.'
command 'conversations_externalInvitePermissions' do |g|
g.desc 'Convert a team in a shared channel from an External Limited channel to a fully shared Slack Connect channel or vice versa.'
g.long_desc %( Convert a team in a shared channel from an External Limited channel to a fully shared Slack Connect channel or vice versa. )
g.command 'set' do |c|
c.flag 'action', desc: 'Type of action to be taken: upgrade or downgrade.'
c.flag 'channel', desc: 'The channel ID to change external invite permissions for.'
c.flag 'target_team', desc: 'The encoded team ID of the target team. Must be in the specified channel.'
c.action do |_global_options, options, _args|
puts JSON.dump(@client.conversations_externalInvitePermissions_set(options))
end
end
end
end
end
end
59 changes: 59 additions & 0 deletions bin/commands/functions_distributions_permissions.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# frozen_string_literal: true
# This file was auto-generated by lib/tasks/web.rake

module Slack
module Cli
class App
desc 'FunctionsDistributionsPermissions methods.'
command 'functions_distributions_permissions' do |g|
g.desc 'Grant users access to a custom slack function if its permission_type is set to named_entities'
g.long_desc %( Grant users access to a custom slack function if its permission_type is set to named_entities )
g.command 'add' do |c|
c.flag 'function_app_id', desc: 'The encoded ID of the app.'
c.flag 'function_callback_id', desc: "The callback ID defined in the function's definition file."
c.flag 'function_id', desc: 'The encoded ID of the function.'
c.flag 'user_ids', desc: 'List of encoded user IDs.'
c.action do |_global_options, options, _args|
puts JSON.dump(@client.functions_distributions_permissions_add(options))
end
end

g.desc 'List the access type of a custom slack function and include the users with access if its permission_type is set to named_entities'
g.long_desc %( List the access type of a custom slack function and include the users with access if its permission_type is set to named_entities )
g.command 'list' do |c|
c.flag 'function_app_id', desc: 'The encoded ID of the app.'
c.flag 'function_callback_id', desc: "The callback ID defined in the function's definition file."
c.flag 'function_id', desc: 'The encoded ID of the function.'
c.action do |_global_options, options, _args|
puts JSON.dump(@client.functions_distributions_permissions_list(options))
end
end

g.desc 'Revoke user access to a custom slack function if permission_type set to named_entities'
g.long_desc %( Revoke user access to a custom slack function if permission_type set to named_entities )
g.command 'remove' do |c|
c.flag 'function_app_id', desc: 'The encoded ID of the app.'
c.flag 'function_callback_id', desc: "The callback ID defined in the function's definition file."
c.flag 'function_id', desc: 'The encoded ID of the function.'
c.flag 'user_ids', desc: 'List of encoded user IDs.'
c.action do |_global_options, options, _args|
puts JSON.dump(@client.functions_distributions_permissions_remove(options))
end
end

g.desc 'Set the access type of a custom slack function and define the users to be granted access if permission_type is set to named_entities'
g.long_desc %( Set the access type of a custom slack function and define the users to be granted access if permission_type is set to named_entities )
g.command 'set' do |c|
c.flag 'permission_type', desc: 'The type of permission that defines how the function can be distributed.'
c.flag 'function_app_id', desc: 'The encoded ID of the app.'
c.flag 'function_callback_id', desc: "The callback ID defined in the function's definition file."
c.flag 'function_id', desc: 'The encoded ID of the function.'
c.flag 'user_ids', desc: 'List of encoded user IDs.'
c.action do |_global_options, options, _args|
puts JSON.dump(@client.functions_distributions_permissions_set(options))
end
end
end
end
end
end
4 changes: 2 additions & 2 deletions bin/commands/oauth.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ class App
g.desc 'Exchanges a temporary OAuth verifier code for an access token.'
g.long_desc %( Exchanges a temporary OAuth verifier code for an access token. )
g.command 'access' do |c|
c.flag 'client_id', desc: 'Issued when you created your application.'
c.flag 'client_secret', desc: 'Issued when you created your application.'
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.'
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.'
c.flag 'code', desc: 'The code param returned via the OAuth callback.'
c.flag 'redirect_uri', desc: 'This must match the originally submitted URI (if one was sent).'
c.flag 'single_channel', desc: 'Request the user to add your app only to a single channel. Only valid with a legacy workspace app.'
Expand Down
Loading
Loading