From f2499ef59d29228fb97c731c43f37cc7b542066f Mon Sep 17 00:00:00 2001 From: slack-ruby-ci-bot Date: Sat, 6 Jul 2024 23:19:55 +0000 Subject: [PATCH] Update API from slack-api-ref@8a22e57 (2024-07-06) --- CHANGELOG.md | 1 + bin/commands/admin_emoji.rb | 2 +- bin/commands/admin_users.rb | 8 +- bin/commands/admin_workflows.rb | 6 +- ...in_workflows_triggers_types_permissions.rb | 31 +++++++ bin/commands/apps_datastore.rb | 46 ++++++++++ bin/commands/canvases.rb | 40 +++++++++ bin/commands/canvases_access.rb | 34 ++++++++ bin/commands/canvases_sections.rb | 21 +++++ bin/commands/conversations.rb | 2 +- bin/commands/conversations_canvases.rb | 21 +++++ ...conversations_externalInvitePermissions.rb | 22 +++++ .../functions_distributions_permissions.rb | 59 +++++++++++++ bin/commands/oauth.rb | 4 +- bin/commands/oauth_v2.rb | 4 +- bin/commands/reminders.rb | 2 +- bin/commands/team_externalTeams.rb | 35 ++++++++ bin/commands/users_discoverableContacts.rb | 20 +++++ .../workflows_triggers_permissions.rb | 60 +++++++++++++ lib/slack/web/api/endpoints.rb | 20 +++++ lib/slack/web/api/endpoints/admin_emoji.rb | 2 +- lib/slack/web/api/endpoints/admin_users.rb | 4 +- .../web/api/endpoints/admin_workflows.rb | 8 +- ...in_workflows_triggers_types_permissions.rb | 41 +++++++++ lib/slack/web/api/endpoints/apps_datastore.rb | 71 +++++++++++++++ lib/slack/web/api/endpoints/canvases.rb | 52 +++++++++++ .../web/api/endpoints/canvases_access.rb | 47 ++++++++++ .../web/api/endpoints/canvases_sections.rb | 27 ++++++ lib/slack/web/api/endpoints/conversations.rb | 2 +- .../api/endpoints/conversations_canvases.rb | 26 ++++++ ...conversations_externalInvitePermissions.rb | 31 +++++++ lib/slack/web/api/endpoints/dnd.rb | 1 + .../functions_distributions_permissions.rb | 81 +++++++++++++++++ lib/slack/web/api/endpoints/oauth.rb | 4 +- lib/slack/web/api/endpoints/oauth_v2.rb | 4 +- lib/slack/web/api/endpoints/reminders.rb | 2 +- .../web/api/endpoints/team_externalTeams.rb | 53 +++++++++++ .../endpoints/users_discoverableContacts.rb | 24 +++++ .../workflows_triggers_permissions.rb | 87 +++++++++++++++++++ lib/slack/web/api/errors.rb | 74 +++++++++++++++- lib/slack/web/api/slack-api-ref | 2 +- ...rkflows_triggers_types_permissions_spec.rb | 21 +++++ .../web/api/endpoints/apps_datastore_spec.rb | 29 +++++++ .../web/api/endpoints/canvases_access_spec.rb | 21 +++++ .../api/endpoints/canvases_sections_spec.rb | 16 ++++ spec/slack/web/api/endpoints/canvases_spec.rb | 21 +++++ .../endpoints/conversations_canvases_spec.rb | 13 +++ ...rsations_externalInvitePermissions_spec.rb | 19 ++++ spec/slack/web/api/endpoints/dnd_spec.rb | 5 ++ ...unctions_distributions_permissions_spec.rb | 19 ++++ .../api/endpoints/team_externalTeams_spec.rb | 13 +++ .../users_discoverableContacts_spec.rb | 13 +++ .../workflows_triggers_permissions_spec.rb | 31 +++++++ 53 files changed, 1273 insertions(+), 29 deletions(-) create mode 100644 bin/commands/admin_workflows_triggers_types_permissions.rb create mode 100644 bin/commands/canvases.rb create mode 100644 bin/commands/canvases_access.rb create mode 100644 bin/commands/canvases_sections.rb create mode 100644 bin/commands/conversations_canvases.rb create mode 100644 bin/commands/conversations_externalInvitePermissions.rb create mode 100644 bin/commands/functions_distributions_permissions.rb create mode 100644 bin/commands/team_externalTeams.rb create mode 100644 bin/commands/users_discoverableContacts.rb create mode 100644 bin/commands/workflows_triggers_permissions.rb create mode 100644 lib/slack/web/api/endpoints/admin_workflows_triggers_types_permissions.rb create mode 100644 lib/slack/web/api/endpoints/canvases.rb create mode 100644 lib/slack/web/api/endpoints/canvases_access.rb create mode 100644 lib/slack/web/api/endpoints/canvases_sections.rb create mode 100644 lib/slack/web/api/endpoints/conversations_canvases.rb create mode 100644 lib/slack/web/api/endpoints/conversations_externalInvitePermissions.rb create mode 100644 lib/slack/web/api/endpoints/functions_distributions_permissions.rb create mode 100644 lib/slack/web/api/endpoints/team_externalTeams.rb create mode 100644 lib/slack/web/api/endpoints/users_discoverableContacts.rb create mode 100644 lib/slack/web/api/endpoints/workflows_triggers_permissions.rb create mode 100644 spec/slack/web/api/endpoints/admin_workflows_triggers_types_permissions_spec.rb create mode 100644 spec/slack/web/api/endpoints/canvases_access_spec.rb create mode 100644 spec/slack/web/api/endpoints/canvases_sections_spec.rb create mode 100644 spec/slack/web/api/endpoints/canvases_spec.rb create mode 100644 spec/slack/web/api/endpoints/conversations_canvases_spec.rb create mode 100644 spec/slack/web/api/endpoints/conversations_externalInvitePermissions_spec.rb create mode 100644 spec/slack/web/api/endpoints/functions_distributions_permissions_spec.rb create mode 100644 spec/slack/web/api/endpoints/team_externalTeams_spec.rb create mode 100644 spec/slack/web/api/endpoints/users_discoverableContacts_spec.rb create mode 100644 spec/slack/web/api/endpoints/workflows_triggers_permissions_spec.rb diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a6b547c..e12ee1e7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ### 2.3.1 (Next) * [#516](https://github.com/slack-ruby/slack-ruby-client/pull/516): Add support for Ruby 3.3 - [@olleolleolle](https://github.com/olleolleolle). +* [#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) diff --git a/bin/commands/admin_emoji.rb b/bin/commands/admin_emoji.rb index c004a546..7bb8cbc1 100644 --- a/bin/commands/admin_emoji.rb +++ b/bin/commands/admin_emoji.rb @@ -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)) diff --git a/bin/commands/admin_users.rb b/bin/commands/admin_users.rb index 1a9fa45b..b349b767 100644 --- a/bin/commands/admin_users.rb +++ b/bin/commands/admin_users.rb @@ -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.' @@ -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.' diff --git a/bin/commands/admin_workflows.rb b/bin/commands/admin_workflows.rb index 71d5dc8e..911824f1 100644 --- a/bin/commands/admin_workflows.rb +++ b/bin/commands/admin_workflows.rb @@ -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 diff --git a/bin/commands/admin_workflows_triggers_types_permissions.rb b/bin/commands/admin_workflows_triggers_types_permissions.rb new file mode 100644 index 00000000..1fe7f0de --- /dev/null +++ b/bin/commands/admin_workflows_triggers_types_permissions.rb @@ -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 diff --git a/bin/commands/apps_datastore.rb b/bin/commands/apps_datastore.rb index fc1cfcef..fb3c2dd5 100644 --- a/bin/commands/apps_datastore.rb +++ b/bin/commands/apps_datastore.rb @@ -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| diff --git a/bin/commands/canvases.rb b/bin/commands/canvases.rb new file mode 100644 index 00000000..ba20cdc3 --- /dev/null +++ b/bin/commands/canvases.rb @@ -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 diff --git a/bin/commands/canvases_access.rb b/bin/commands/canvases_access.rb new file mode 100644 index 00000000..b3b67c75 --- /dev/null +++ b/bin/commands/canvases_access.rb @@ -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 diff --git a/bin/commands/canvases_sections.rb b/bin/commands/canvases_sections.rb new file mode 100644 index 00000000..2554ff04 --- /dev/null +++ b/bin/commands/canvases_sections.rb @@ -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 diff --git a/bin/commands/conversations.rb b/bin/commands/conversations.rb index 37c1d484..03cb3bc9 100644 --- a/bin/commands/conversations.rb +++ b/bin/commands/conversations.rb @@ -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)) diff --git a/bin/commands/conversations_canvases.rb b/bin/commands/conversations_canvases.rb new file mode 100644 index 00000000..09bf78c4 --- /dev/null +++ b/bin/commands/conversations_canvases.rb @@ -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 diff --git a/bin/commands/conversations_externalInvitePermissions.rb b/bin/commands/conversations_externalInvitePermissions.rb new file mode 100644 index 00000000..09605dba --- /dev/null +++ b/bin/commands/conversations_externalInvitePermissions.rb @@ -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 "Upgrade or downgrade Slack Connect channel permissions between 'can post only' and 'can post and invite'." + g.long_desc %( Upgrade or downgrade Slack Connect channel permissions between 'can post only' and 'can post and invite'. ) + 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 diff --git a/bin/commands/functions_distributions_permissions.rb b/bin/commands/functions_distributions_permissions.rb new file mode 100644 index 00000000..a13e1c40 --- /dev/null +++ b/bin/commands/functions_distributions_permissions.rb @@ -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 diff --git a/bin/commands/oauth.rb b/bin/commands/oauth.rb index 57eda82d..d7b79de7 100644 --- a/bin/commands/oauth.rb +++ b/bin/commands/oauth.rb @@ -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.' diff --git a/bin/commands/oauth_v2.rb b/bin/commands/oauth_v2.rb index ff9bb5c9..af40e722 100644 --- a/bin/commands/oauth_v2.rb +++ b/bin/commands/oauth_v2.rb @@ -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 'grant_type', desc: 'The grant_type param as described in the OAuth spec.' c.flag 'redirect_uri', desc: 'This must match the originally submitted URI (if one was sent).' diff --git a/bin/commands/reminders.rb b/bin/commands/reminders.rb index 9c3600da..b8faa63c 100644 --- a/bin/commands/reminders.rb +++ b/bin/commands/reminders.rb @@ -10,7 +10,7 @@ class App g.long_desc %( Creates a reminder. ) g.command 'add' do |c| c.flag 'text', desc: 'The content of the reminder.' - c.flag 'time', desc: '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").' + 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").' 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.' c.flag 'team_id', desc: 'Encoded team id, required if org token is used.' c.flag 'user', desc: 'No longer supported - reminders cannot be set for other users. Previously, was the user who would receive the reminder.' diff --git a/bin/commands/team_externalTeams.rb b/bin/commands/team_externalTeams.rb new file mode 100644 index 00000000..71b751ee --- /dev/null +++ b/bin/commands/team_externalTeams.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true +# This file was auto-generated by lib/tasks/web.rake + +module Slack + module Cli + class App + desc 'TeamExternalteams methods.' + command 'team_externalTeams' do |g| + g.desc 'Disconnect an external organization.' + g.long_desc %( Disconnect an external organization. ) + g.command 'disconnect' do |c| + c.flag 'target_team', desc: 'The encoded team ID of the target team.' + c.action do |_global_options, options, _args| + puts JSON.dump(@client.team_externalTeams_disconnect(options)) + end + end + + g.desc 'Returns a list of all the external teams connected and details about the connection.' + g.long_desc %( Returns a list of all the external teams connected and details about the connection. ) + g.command 'list' do |c| + c.flag 'connection_status_filter', desc: 'Status of the connected team.' + c.flag 'cursor', desc: 'encoded team ID to retrieve next page of connected teams, if absent will return first page.' + c.flag 'limit', desc: 'The maximum number of items to return per page.' + c.flag 'slack_connect_pref_filter', desc: 'Filters connected orgs by Slack Connect pref override(s).' + c.flag 'sort_direction', desc: 'Direction to sort in asc or desc.' + c.flag 'sort_field', desc: 'Name of the parameter that we are sorting by.' + c.flag 'workspace_filter', desc: 'Shows connected orgs which are connected on a specified encoded workspace ID.' + c.action do |_global_options, options, _args| + puts JSON.dump(@client.team_externalTeams_list(options)) + end + end + end + end + end +end diff --git a/bin/commands/users_discoverableContacts.rb b/bin/commands/users_discoverableContacts.rb new file mode 100644 index 00000000..2392a16f --- /dev/null +++ b/bin/commands/users_discoverableContacts.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true +# This file was auto-generated by lib/tasks/web.rake + +module Slack + module Cli + class App + desc 'UsersDiscoverablecontacts methods.' + command 'users_discoverableContacts' do |g| + g.desc 'Look up an email address to see if someone is discoverable on Slack' + g.long_desc %( Look up an email address to see if someone is discoverable on Slack ) + g.command 'lookup' do |c| + c.flag 'email', desc: '.' + c.action do |_global_options, options, _args| + puts JSON.dump(@client.users_discoverableContacts_lookup(options)) + end + end + end + end + end +end diff --git a/bin/commands/workflows_triggers_permissions.rb b/bin/commands/workflows_triggers_permissions.rb new file mode 100644 index 00000000..c536a908 --- /dev/null +++ b/bin/commands/workflows_triggers_permissions.rb @@ -0,0 +1,60 @@ +# frozen_string_literal: true +# This file was auto-generated by lib/tasks/web.rake + +module Slack + module Cli + class App + desc 'WorkflowsTriggersPermissions methods.' + command 'workflows_triggers_permissions' do |g| + g.desc 'Allows users to run a trigger that has its permission type set to named_entities' + g.long_desc %( Allows users to run a trigger that has its permission type set to named_entities ) + g.command 'add' do |c| + c.flag 'trigger_id', desc: 'Encoded ID of the trigger.' + c.flag 'channel_ids', desc: 'List of encoded channel IDs.' + c.flag 'org_ids', desc: 'List of encoded organization IDs.' + c.flag 'team_ids', desc: 'List of encoded workspace IDs.' + c.flag 'user_ids', desc: 'List of encoded user IDs.' + c.action do |_global_options, options, _args| + puts JSON.dump(@client.workflows_triggers_permissions_add(options)) + end + end + + g.desc 'Returns the permission type of a trigger and if applicable, includes the entities that have been granted access' + g.long_desc %( Returns the permission type of a trigger and if applicable, includes the entities that have been granted access ) + g.command 'list' do |c| + c.flag 'trigger_id', desc: 'Encoded ID of the trigger.' + c.action do |_global_options, options, _args| + puts JSON.dump(@client.workflows_triggers_permissions_list(options)) + end + end + + g.desc "Revoke an entity's access to a trigger that has its permission type set to named_entities" + g.long_desc %( Revoke an entity's access to a trigger that has its permission type set to named_entities ) + g.command 'remove' do |c| + c.flag 'trigger_id', desc: 'Encoded ID of the trigger.' + c.flag 'channel_ids', desc: 'List of encoded channel IDs.' + c.flag 'org_ids', desc: 'List of encoded organization IDs.' + c.flag 'team_ids', desc: 'List of encoded workspace IDs.' + c.flag 'user_ids', desc: 'List of encoded user IDs.' + c.action do |_global_options, options, _args| + puts JSON.dump(@client.workflows_triggers_permissions_remove(options)) + end + end + + g.desc 'Set the permission type for who can run a trigger' + g.long_desc %( Set the permission type for who can run a trigger ) + g.command 'set' do |c| + c.flag 'permission_type', desc: 'The type of permission that defines who can run a trigger.' + c.flag 'trigger_id', desc: 'Encoded ID of the trigger.' + c.flag 'channel_ids', desc: 'List of encoded channel IDs.' + c.flag 'org_ids', desc: 'List of encoded organization IDs.' + c.flag 'team_ids', desc: 'List of encoded workspace IDs.' + c.flag 'user_ids', desc: 'List of encoded user IDs.' + c.action do |_global_options, options, _args| + puts JSON.dump(@client.workflows_triggers_permissions_set(options)) + end + end + end + end + end +end diff --git a/lib/slack/web/api/endpoints.rb b/lib/slack/web/api/endpoints.rb index ca7dfc33..f0ca655b 100644 --- a/lib/slack/web/api/endpoints.rb +++ b/lib/slack/web/api/endpoints.rb @@ -32,6 +32,7 @@ require_relative 'endpoints/admin_workflows' require_relative 'endpoints/admin_workflows_collaborators' require_relative 'endpoints/admin_workflows_permissions' +require_relative 'endpoints/admin_workflows_triggers_types_permissions' require_relative 'endpoints/api' require_relative 'endpoints/apps' require_relative 'endpoints/apps_activities' @@ -46,9 +47,14 @@ require_relative 'endpoints/bots' require_relative 'endpoints/calls' require_relative 'endpoints/calls_participants' +require_relative 'endpoints/canvases' +require_relative 'endpoints/canvases_access' +require_relative 'endpoints/canvases_sections' require_relative 'endpoints/chat' require_relative 'endpoints/chat_scheduledMessages' require_relative 'endpoints/conversations' +require_relative 'endpoints/conversations_canvases' +require_relative 'endpoints/conversations_externalInvitePermissions' require_relative 'endpoints/dialog' require_relative 'endpoints/dnd' require_relative 'endpoints/emoji' @@ -56,6 +62,7 @@ require_relative 'endpoints/files_comments' require_relative 'endpoints/files_remote' require_relative 'endpoints/functions' +require_relative 'endpoints/functions_distributions_permissions' require_relative 'endpoints/functions_workflows_steps' require_relative 'endpoints/functions_workflows_steps_responses' require_relative 'endpoints/migration' @@ -70,6 +77,7 @@ require_relative 'endpoints/stars' require_relative 'endpoints/team' require_relative 'endpoints/team_billing' +require_relative 'endpoints/team_externalTeams' require_relative 'endpoints/team_preferences' require_relative 'endpoints/team_profile' require_relative 'endpoints/tooling_tokens' @@ -77,10 +85,12 @@ require_relative 'endpoints/usergroups_users' require_relative 'endpoints/users' require_relative 'endpoints/users_admin' +require_relative 'endpoints/users_discoverableContacts' require_relative 'endpoints/users_prefs' require_relative 'endpoints/users_profile' require_relative 'endpoints/views' require_relative 'endpoints/workflows' +require_relative 'endpoints/workflows_triggers_permissions' module Slack module Web @@ -120,6 +130,7 @@ module Endpoints include AdminWorkflows include AdminWorkflowsCollaborators include AdminWorkflowsPermissions + include AdminWorkflowsTriggersTypesPermissions include Api include Apps include AppsActivities @@ -134,9 +145,14 @@ module Endpoints include Bots include Calls include CallsParticipants + include Canvases + include CanvasesAccess + include CanvasesSections include Chat include ChatScheduledmessages include Conversations + include ConversationsCanvases + include ConversationsExternalinvitepermissions include Dialog include Dnd include Emoji @@ -144,6 +160,7 @@ module Endpoints include FilesComments include FilesRemote include Functions + include FunctionsDistributionsPermissions include FunctionsWorkflowsSteps include FunctionsWorkflowsStepsResponses include Migration @@ -158,6 +175,7 @@ module Endpoints include Stars include Team include TeamBilling + include TeamExternalteams include TeamPreferences include TeamProfile include ToolingTokens @@ -165,10 +183,12 @@ module Endpoints include UsergroupsUsers include Users include UsersAdmin + include UsersDiscoverablecontacts include UsersPrefs include UsersProfile include Views include Workflows + include WorkflowsTriggersPermissions end end end diff --git a/lib/slack/web/api/endpoints/admin_emoji.rb b/lib/slack/web/api/endpoints/admin_emoji.rb index 08f0eb39..3d39daf0 100644 --- a/lib/slack/web/api/endpoints/admin_emoji.rb +++ b/lib/slack/web/api/endpoints/admin_emoji.rb @@ -10,7 +10,7 @@ module AdminEmoji # Add an emoji. # # @option options [string] :name - # The name of the emoji to be added. Colons (:myemoji:) around the value are not required, although they may be included. + # 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. # @option options [string] :url # The URL of a file to use as an image for the emoji. Square images under 128KB and with transparent backgrounds work best. # @see https://api.slack.com/methods/admin.emoji.add diff --git a/lib/slack/web/api/endpoints/admin_users.rb b/lib/slack/web/api/endpoints/admin_users.rb index 00a8819f..dd9f9c31 100644 --- a/lib/slack/web/api/endpoints/admin_users.rb +++ b/lib/slack/web/api/endpoints/admin_users.rb @@ -100,7 +100,7 @@ def admin_users_remove(options = {}) end # - # Set an existing guest, regular user, or owner to be an admin user. + # Set an existing regular user or owner to be a workspace admin. # # @option options [Object] :team_id # The ID (T1234) of the workspace. @@ -132,7 +132,7 @@ def admin_users_setExpiration(options = {}) end # - # Set an existing guest, regular user, or admin user to be a workspace owner. + # Set an existing regular user or admin to be a workspace owner. # # @option options [Object] :team_id # The ID (T1234) of the workspace. diff --git a/lib/slack/web/api/endpoints/admin_workflows.rb b/lib/slack/web/api/endpoints/admin_workflows.rb index aa89dd90..7798ef82 100644 --- a/lib/slack/web/api/endpoints/admin_workflows.rb +++ b/lib/slack/web/api/endpoints/admin_workflows.rb @@ -12,15 +12,17 @@ module AdminWorkflows # @option options [Object] :app_id # The parent app ID for which to return workflows. # @option options [array] :collaborator_ids - # Only include workflows by the collaborators inputted. + # Only include workflows where the provided user IDs are a manager/collaborator of that workflow. # @option options [string] :cursor # Set cursor to next_cursor returned by the previous call to list items in the next page. + # @option options [boolean] :is_sales_elevate + # Filter workflows by their Sales Elevate status. # @option options [integer] :limit # The number of results that will be returned by the API on each invocation. # @option options [boolean] :no_collaborators # Only include workflows with no collaborators in the result; default is false. # @option options [integer] :num_trigger_ids - # Number of trigger IDs to fetch for each workflow; default is 0. + # Number of trigger IDs to fetch for each workflow; default is 10. # @option options [string] :query # A search query to filter for workflow name or description. # @option options [enum] :sort @@ -29,6 +31,8 @@ module AdminWorkflows # 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). # @option options [enum] :source # Source of workflow creation, either from code or workflow builder. + # @option options [string] :trigger_type_id + # Only include workflows with this trigger type. # @see https://api.slack.com/methods/admin.workflows.search # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.workflows/admin.workflows.search.json def admin_workflows_search(options = {}) diff --git a/lib/slack/web/api/endpoints/admin_workflows_triggers_types_permissions.rb b/lib/slack/web/api/endpoints/admin_workflows_triggers_types_permissions.rb new file mode 100644 index 00000000..e613d05b --- /dev/null +++ b/lib/slack/web/api/endpoints/admin_workflows_triggers_types_permissions.rb @@ -0,0 +1,41 @@ +# frozen_string_literal: true +# This file was auto-generated by lib/tasks/web.rake + +module Slack + module Web + module Api + module Endpoints + module AdminWorkflowsTriggersTypesPermissions + # + # list the permissions for using each trigger type in workflow builder + # + # @option options [array] :trigger_type_ids + # The trigger types IDs for which to get the permissions. + # @see https://api.slack.com/methods/admin.workflows.triggers.types.permissions.lookup + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.workflows.triggers.types.permissions/admin.workflows.triggers.types.permissions.lookup.json + def admin_workflows_triggers_types_permissions_lookup(options = {}) + raise ArgumentError, 'Required arguments :trigger_type_ids missing' if options[:trigger_type_ids].nil? + post('admin.workflows.triggers.types.permissions.lookup', options) + end + + # + # Set the permissions for using a trigger type in workflow builder + # + # @option options [Object] :id + # The trigger type ID for which to set the permissions. + # @option options [enum] :visibility + # The function visibility. + # @option options [array] :user_ids + # List of user IDs to allow for named_entities visibility. + # @see https://api.slack.com/methods/admin.workflows.triggers.types.permissions.set + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.workflows.triggers.types.permissions/admin.workflows.triggers.types.permissions.set.json + def admin_workflows_triggers_types_permissions_set(options = {}) + raise ArgumentError, 'Required arguments :id missing' if options[:id].nil? + raise ArgumentError, 'Required arguments :visibility missing' if options[:visibility].nil? + post('admin.workflows.triggers.types.permissions.set', options) + end + end + end + end + end +end diff --git a/lib/slack/web/api/endpoints/apps_datastore.rb b/lib/slack/web/api/endpoints/apps_datastore.rb index bba1df50..2b3673a7 100644 --- a/lib/slack/web/api/endpoints/apps_datastore.rb +++ b/lib/slack/web/api/endpoints/apps_datastore.rb @@ -6,6 +6,77 @@ module Web module Api module Endpoints module AppsDatastore + # + # Delete items from a datastore in bulk + # + # @option options [string] :datastore + # name of the datastore. + # @option options [array] :ids + # IDs of items to be deleted. + # @option options [Object] :app_id + # . + # @see https://api.slack.com/methods/apps.datastore.bulkDelete + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/apps.datastore/apps.datastore.bulkDelete.json + def apps_datastore_bulkDelete(options = {}) + raise ArgumentError, 'Required arguments :datastore missing' if options[:datastore].nil? + raise ArgumentError, 'Required arguments :ids missing' if options[:ids].nil? + post('apps.datastore.bulkDelete', options) + end + + # + # Get items from a datastore in bulk + # + # @option options [string] :datastore + # name of the datastore. + # @option options [array] :ids + # items' ids. + # @option options [Object] :app_id + # . + # @see https://api.slack.com/methods/apps.datastore.bulkGet + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/apps.datastore/apps.datastore.bulkGet.json + def apps_datastore_bulkGet(options = {}) + raise ArgumentError, 'Required arguments :datastore missing' if options[:datastore].nil? + raise ArgumentError, 'Required arguments :ids missing' if options[:ids].nil? + post('apps.datastore.bulkGet', options) + end + + # + # Creates or replaces existing items in bulk + # + # @option options [string] :datastore + # name of the datastore. + # @option options [array] :items + # attribute names and values of the items; limit of 25. + # @option options [Object] :app_id + # . + # @see https://api.slack.com/methods/apps.datastore.bulkPut + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/apps.datastore/apps.datastore.bulkPut.json + def apps_datastore_bulkPut(options = {}) + raise ArgumentError, 'Required arguments :datastore missing' if options[:datastore].nil? + raise ArgumentError, 'Required arguments :items missing' if options[:items].nil? + post('apps.datastore.bulkPut', options) + end + + # + # Count the number of items in a datastore that match a query + # + # @option options [string] :datastore + # Name of the datastore. + # @option options [Object] :app_id + # Required if calling with user token. + # @option options [string] :expression + # A query filter expression https://api.slack.com/future/datastores. + # @option options [object] :expression_attributes + # A map of attributes referenced in expression. + # @option options [object] :expression_values + # A map of values referenced in expression. + # @see https://api.slack.com/methods/apps.datastore.count + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/apps.datastore/apps.datastore.count.json + def apps_datastore_count(options = {}) + raise ArgumentError, 'Required arguments :datastore missing' if options[:datastore].nil? + post('apps.datastore.count', options) + end + # # Delete an item from a datastore # diff --git a/lib/slack/web/api/endpoints/canvases.rb b/lib/slack/web/api/endpoints/canvases.rb new file mode 100644 index 00000000..489f351b --- /dev/null +++ b/lib/slack/web/api/endpoints/canvases.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true +# This file was auto-generated by lib/tasks/web.rake + +module Slack + module Web + module Api + module Endpoints + module Canvases + # + # Create Canvas for a user. + # + # @option options [Object] :document_content + # Structure describing the type and value of the content to create. + # @option options [string] :title + # Title of the newly created canvas. + # @see https://api.slack.com/methods/canvases.create + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/canvases/canvases.create.json + def canvases_create(options = {}) + post('canvases.create', options) + end + + # + # Deletes a canvas. + # + # @option options [Object] :canvas_id + # Encoded ID of the canvas. + # @see https://api.slack.com/methods/canvases.delete + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/canvases/canvases.delete.json + def canvases_delete(options = {}) + raise ArgumentError, 'Required arguments :canvas_id missing' if options[:canvas_id].nil? + post('canvases.delete', options) + end + + # + # Update an existing canvas + # + # @option options [Object] :canvas_id + # Encoded ID of the canvas. + # @option options [array] :changes + # List of changes to apply on the specified canvas. + # @see https://api.slack.com/methods/canvases.edit + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/canvases/canvases.edit.json + def canvases_edit(options = {}) + raise ArgumentError, 'Required arguments :canvas_id missing' if options[:canvas_id].nil? + raise ArgumentError, 'Required arguments :changes missing' if options[:changes].nil? + post('canvases.edit', options) + end + end + end + end + end +end diff --git a/lib/slack/web/api/endpoints/canvases_access.rb b/lib/slack/web/api/endpoints/canvases_access.rb new file mode 100644 index 00000000..073820c8 --- /dev/null +++ b/lib/slack/web/api/endpoints/canvases_access.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true +# This file was auto-generated by lib/tasks/web.rake + +module Slack + module Web + module Api + module Endpoints + module CanvasesAccess + # + # Remove access to a canvas for specified entities + # + # @option options [Object] :canvas_id + # Encoded ID of the canvas. + # @option options [array] :channel_ids + # List of channels you wish to update access for. + # @option options [array] :user_ids + # List of users you wish to update access for. + # @see https://api.slack.com/methods/canvases.access.delete + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/canvases.access/canvases.access.delete.json + def canvases_access_delete(options = {}) + raise ArgumentError, 'Required arguments :canvas_id missing' if options[:canvas_id].nil? + post('canvases.access.delete', options) + end + + # + # Sets the access level to a canvas for specified entities + # + # @option options [Object] :access_level + # Desired level of access (e.g. read, write). + # @option options [Object] :canvas_id + # Encoded ID of the canvas. + # @option options [array] :channel_ids + # List of channels you wish to update access for. + # @option options [array] :user_ids + # List of users you wish to update access for. + # @see https://api.slack.com/methods/canvases.access.set + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/canvases.access/canvases.access.set.json + def canvases_access_set(options = {}) + raise ArgumentError, 'Required arguments :access_level missing' if options[:access_level].nil? + raise ArgumentError, 'Required arguments :canvas_id missing' if options[:canvas_id].nil? + post('canvases.access.set', options) + end + end + end + end + end +end diff --git a/lib/slack/web/api/endpoints/canvases_sections.rb b/lib/slack/web/api/endpoints/canvases_sections.rb new file mode 100644 index 00000000..caeeb49a --- /dev/null +++ b/lib/slack/web/api/endpoints/canvases_sections.rb @@ -0,0 +1,27 @@ +# frozen_string_literal: true +# This file was auto-generated by lib/tasks/web.rake + +module Slack + module Web + module Api + module Endpoints + module CanvasesSections + # + # Find sections matching the provided criteria + # + # @option options [Object] :canvas_id + # Encoded ID of the canvas. + # @option options [Object] :criteria + # Filtering criteria. + # @see https://api.slack.com/methods/canvases.sections.lookup + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/canvases.sections/canvases.sections.lookup.json + def canvases_sections_lookup(options = {}) + raise ArgumentError, 'Required arguments :canvas_id missing' if options[:canvas_id].nil? + raise ArgumentError, 'Required arguments :criteria missing' if options[:criteria].nil? + post('canvases.sections.lookup', options) + end + end + end + end + end +end diff --git a/lib/slack/web/api/endpoints/conversations.rb b/lib/slack/web/api/endpoints/conversations.rb index b10d5242..9dab6fe2 100644 --- a/lib/slack/web/api/endpoints/conversations.rb +++ b/lib/slack/web/api/endpoints/conversations.rb @@ -112,7 +112,7 @@ def conversations_declineSharedInvite(options = {}) # @option options [timestamp] :latest # Only messages before this Unix timestamp will be included in results. Default is the current time. # @option options [number] :limit - # 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. + # 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. # @option options [timestamp] :oldest # Only messages after this Unix timestamp will be included in results. # @see https://api.slack.com/methods/conversations.history diff --git a/lib/slack/web/api/endpoints/conversations_canvases.rb b/lib/slack/web/api/endpoints/conversations_canvases.rb new file mode 100644 index 00000000..3248bdb5 --- /dev/null +++ b/lib/slack/web/api/endpoints/conversations_canvases.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true +# This file was auto-generated by lib/tasks/web.rake + +module Slack + module Web + module Api + module Endpoints + module ConversationsCanvases + # + # Create a Channel Canvas for a channel. + # + # @option options [string] :channel_id + # Channel ID of the channel we create the channel canvas for. + # @option options [Object] :document_content + # Structure describing the type and value of the content to create. + # @see https://api.slack.com/methods/conversations.canvases.create + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/conversations.canvases/conversations.canvases.create.json + def conversations_canvases_create(options = {}) + raise ArgumentError, 'Required arguments :channel_id missing' if options[:channel_id].nil? + post('conversations.canvases.create', options) + end + end + end + end + end +end diff --git a/lib/slack/web/api/endpoints/conversations_externalInvitePermissions.rb b/lib/slack/web/api/endpoints/conversations_externalInvitePermissions.rb new file mode 100644 index 00000000..285bc8c3 --- /dev/null +++ b/lib/slack/web/api/endpoints/conversations_externalInvitePermissions.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true +# This file was auto-generated by lib/tasks/web.rake + +module Slack + module Web + module Api + module Endpoints + module ConversationsExternalinvitepermissions + # + # Upgrade or downgrade Slack Connect channel permissions between 'can post only' and 'can post and invite'. + # + # @option options [enum] :action + # Type of action to be taken: upgrade or downgrade. + # @option options [channel] :channel + # The channel ID to change external invite permissions for. + # @option options [Object] :target_team + # The encoded team ID of the target team. Must be in the specified channel. + # @see https://api.slack.com/methods/conversations.externalInvitePermissions.set + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/conversations.externalInvitePermissions/conversations.externalInvitePermissions.set.json + def conversations_externalInvitePermissions_set(options = {}) + raise ArgumentError, 'Required arguments :action missing' if options[:action].nil? + raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil? + raise ArgumentError, 'Required arguments :target_team missing' if options[:target_team].nil? + options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel] + post('conversations.externalInvitePermissions.set', options) + end + end + end + end + end +end diff --git a/lib/slack/web/api/endpoints/dnd.rb b/lib/slack/web/api/endpoints/dnd.rb index 0b1229d7..f576b2ad 100644 --- a/lib/slack/web/api/endpoints/dnd.rb +++ b/lib/slack/web/api/endpoints/dnd.rb @@ -46,6 +46,7 @@ def dnd_info(options = {}) # @see https://api.slack.com/methods/dnd.setSnooze # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/dnd/dnd.setSnooze.json def dnd_setSnooze(options = {}) + raise ArgumentError, 'Required arguments :num_minutes missing' if options[:num_minutes].nil? post('dnd.setSnooze', options) end diff --git a/lib/slack/web/api/endpoints/functions_distributions_permissions.rb b/lib/slack/web/api/endpoints/functions_distributions_permissions.rb new file mode 100644 index 00000000..a2d5722e --- /dev/null +++ b/lib/slack/web/api/endpoints/functions_distributions_permissions.rb @@ -0,0 +1,81 @@ +# frozen_string_literal: true +# This file was auto-generated by lib/tasks/web.rake + +module Slack + module Web + module Api + module Endpoints + module FunctionsDistributionsPermissions + # + # Grant users access to a custom slack function if its permission_type is set to named_entities + # + # @option options [string] :function_app_id + # The encoded ID of the app. + # @option options [string] :function_callback_id + # The callback ID defined in the function's definition file. + # @option options [string] :function_id + # The encoded ID of the function. + # @option options [array] :user_ids + # List of encoded user IDs. + # @see https://api.slack.com/methods/functions.distributions.permissions.add + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/functions.distributions.permissions/functions.distributions.permissions.add.json + def functions_distributions_permissions_add(options = {}) + post('functions.distributions.permissions.add', options) + end + + # + # List the access type of a custom slack function and include the users with access if its permission_type is set to named_entities + # + # @option options [string] :function_app_id + # The encoded ID of the app. + # @option options [string] :function_callback_id + # The callback ID defined in the function's definition file. + # @option options [string] :function_id + # The encoded ID of the function. + # @see https://api.slack.com/methods/functions.distributions.permissions.list + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/functions.distributions.permissions/functions.distributions.permissions.list.json + def functions_distributions_permissions_list(options = {}) + post('functions.distributions.permissions.list', options) + end + + # + # Revoke user access to a custom slack function if permission_type set to named_entities + # + # @option options [string] :function_app_id + # The encoded ID of the app. + # @option options [string] :function_callback_id + # The callback ID defined in the function's definition file. + # @option options [string] :function_id + # The encoded ID of the function. + # @option options [array] :user_ids + # List of encoded user IDs. + # @see https://api.slack.com/methods/functions.distributions.permissions.remove + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/functions.distributions.permissions/functions.distributions.permissions.remove.json + def functions_distributions_permissions_remove(options = {}) + post('functions.distributions.permissions.remove', options) + end + + # + # 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 + # + # @option options [enum] :permission_type + # The type of permission that defines how the function can be distributed. + # @option options [string] :function_app_id + # The encoded ID of the app. + # @option options [string] :function_callback_id + # The callback ID defined in the function's definition file. + # @option options [string] :function_id + # The encoded ID of the function. + # @option options [array] :user_ids + # List of encoded user IDs. + # @see https://api.slack.com/methods/functions.distributions.permissions.set + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/functions.distributions.permissions/functions.distributions.permissions.set.json + def functions_distributions_permissions_set(options = {}) + raise ArgumentError, 'Exactly one of :permission_type is required' unless options[:permission_type].nil? + post('functions.distributions.permissions.set', options) + end + end + end + end + end +end diff --git a/lib/slack/web/api/endpoints/oauth.rb b/lib/slack/web/api/endpoints/oauth.rb index 0106c658..cf1a8083 100644 --- a/lib/slack/web/api/endpoints/oauth.rb +++ b/lib/slack/web/api/endpoints/oauth.rb @@ -10,9 +10,9 @@ module Oauth # Exchanges a temporary OAuth verifier code for an access token. # # @option options [string] :client_id - # Issued when you created your application. + # 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. # @option options [string] :client_secret - # Issued when you created your application. + # 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. # @option options [string] :code # The code param returned via the OAuth callback. # @option options [string] :redirect_uri diff --git a/lib/slack/web/api/endpoints/oauth_v2.rb b/lib/slack/web/api/endpoints/oauth_v2.rb index d666918a..2f1f3f1e 100644 --- a/lib/slack/web/api/endpoints/oauth_v2.rb +++ b/lib/slack/web/api/endpoints/oauth_v2.rb @@ -10,9 +10,9 @@ module OauthV2 # Exchanges a temporary OAuth verifier code for an access token. # # @option options [string] :client_id - # Issued when you created your application. + # 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. # @option options [string] :client_secret - # Issued when you created your application. + # 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. # @option options [string] :code # The code param returned via the OAuth callback. # @option options [string] :grant_type diff --git a/lib/slack/web/api/endpoints/reminders.rb b/lib/slack/web/api/endpoints/reminders.rb index a24ba674..f883472d 100644 --- a/lib/slack/web/api/endpoints/reminders.rb +++ b/lib/slack/web/api/endpoints/reminders.rb @@ -12,7 +12,7 @@ module Reminders # @option options [string] :text # The content of the reminder. # @option options [string] :time - # 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"). + # 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"). # @option options [object] :recurrence # Specify the repeating behavior of a reminder. Available options: daily, weekly, monthly, or yearly. If weekly, may further specify the days of the week. # @option options [string] :team_id diff --git a/lib/slack/web/api/endpoints/team_externalTeams.rb b/lib/slack/web/api/endpoints/team_externalTeams.rb new file mode 100644 index 00000000..6ac1f091 --- /dev/null +++ b/lib/slack/web/api/endpoints/team_externalTeams.rb @@ -0,0 +1,53 @@ +# frozen_string_literal: true +# This file was auto-generated by lib/tasks/web.rake + +module Slack + module Web + module Api + module Endpoints + module TeamExternalteams + # + # Disconnect an external organization. + # + # @option options [Object] :target_team + # The encoded team ID of the target team. + # @see https://api.slack.com/methods/team.externalTeams.disconnect + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/team.externalTeams/team.externalTeams.disconnect.json + def team_externalTeams_disconnect(options = {}) + raise ArgumentError, 'Required arguments :target_team missing' if options[:target_team].nil? + post('team.externalTeams.disconnect', options) + end + + # + # Returns a list of all the external teams connected and details about the connection. + # + # @option options [enum] :connection_status_filter + # Status of the connected team. + # @option options [string] :cursor + # encoded team ID to retrieve next page of connected teams, if absent will return first page. + # @option options [integer] :limit + # The maximum number of items to return per page. + # @option options [array] :slack_connect_pref_filter + # Filters connected orgs by Slack Connect pref override(s). + # @option options [enum] :sort_direction + # Direction to sort in asc or desc. + # @option options [enum] :sort_field + # Name of the parameter that we are sorting by. + # @option options [array] :workspace_filter + # Shows connected orgs which are connected on a specified encoded workspace ID. + # @see https://api.slack.com/methods/team.externalTeams.list + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/team.externalTeams/team.externalTeams.list.json + def team_externalTeams_list(options = {}) + if block_given? + Pagination::Cursor.new(self, :team_externalTeams_list, options).each do |page| + yield page + end + else + post('team.externalTeams.list', options) + end + end + end + end + end + end +end diff --git a/lib/slack/web/api/endpoints/users_discoverableContacts.rb b/lib/slack/web/api/endpoints/users_discoverableContacts.rb new file mode 100644 index 00000000..bd4a5469 --- /dev/null +++ b/lib/slack/web/api/endpoints/users_discoverableContacts.rb @@ -0,0 +1,24 @@ +# frozen_string_literal: true +# This file was auto-generated by lib/tasks/web.rake + +module Slack + module Web + module Api + module Endpoints + module UsersDiscoverablecontacts + # + # Look up an email address to see if someone is discoverable on Slack + # + # @option options [string] :email + # . + # @see https://api.slack.com/methods/users.discoverableContacts.lookup + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/users.discoverableContacts/users.discoverableContacts.lookup.json + def users_discoverableContacts_lookup(options = {}) + raise ArgumentError, 'Required arguments :email missing' if options[:email].nil? + post('users.discoverableContacts.lookup', options) + end + end + end + end + end +end diff --git a/lib/slack/web/api/endpoints/workflows_triggers_permissions.rb b/lib/slack/web/api/endpoints/workflows_triggers_permissions.rb new file mode 100644 index 00000000..aaf8005a --- /dev/null +++ b/lib/slack/web/api/endpoints/workflows_triggers_permissions.rb @@ -0,0 +1,87 @@ +# frozen_string_literal: true +# This file was auto-generated by lib/tasks/web.rake + +module Slack + module Web + module Api + module Endpoints + module WorkflowsTriggersPermissions + # + # Allows users to run a trigger that has its permission type set to named_entities + # + # @option options [string] :trigger_id + # Encoded ID of the trigger. + # @option options [array] :channel_ids + # List of encoded channel IDs. + # @option options [array] :org_ids + # List of encoded organization IDs. + # @option options [array] :team_ids + # List of encoded workspace IDs. + # @option options [array] :user_ids + # List of encoded user IDs. + # @see https://api.slack.com/methods/workflows.triggers.permissions.add + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/workflows.triggers.permissions/workflows.triggers.permissions.add.json + def workflows_triggers_permissions_add(options = {}) + raise ArgumentError, 'Required arguments :trigger_id missing' if options[:trigger_id].nil? + post('workflows.triggers.permissions.add', options) + end + + # + # Returns the permission type of a trigger and if applicable, includes the entities that have been granted access + # + # @option options [string] :trigger_id + # Encoded ID of the trigger. + # @see https://api.slack.com/methods/workflows.triggers.permissions.list + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/workflows.triggers.permissions/workflows.triggers.permissions.list.json + def workflows_triggers_permissions_list(options = {}) + raise ArgumentError, 'Required arguments :trigger_id missing' if options[:trigger_id].nil? + post('workflows.triggers.permissions.list', options) + end + + # + # Revoke an entity's access to a trigger that has its permission type set to named_entities + # + # @option options [string] :trigger_id + # Encoded ID of the trigger. + # @option options [array] :channel_ids + # List of encoded channel IDs. + # @option options [array] :org_ids + # List of encoded organization IDs. + # @option options [array] :team_ids + # List of encoded workspace IDs. + # @option options [array] :user_ids + # List of encoded user IDs. + # @see https://api.slack.com/methods/workflows.triggers.permissions.remove + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/workflows.triggers.permissions/workflows.triggers.permissions.remove.json + def workflows_triggers_permissions_remove(options = {}) + raise ArgumentError, 'Required arguments :trigger_id missing' if options[:trigger_id].nil? + post('workflows.triggers.permissions.remove', options) + end + + # + # Set the permission type for who can run a trigger + # + # @option options [enum] :permission_type + # The type of permission that defines who can run a trigger. + # @option options [string] :trigger_id + # Encoded ID of the trigger. + # @option options [array] :channel_ids + # List of encoded channel IDs. + # @option options [array] :org_ids + # List of encoded organization IDs. + # @option options [array] :team_ids + # List of encoded workspace IDs. + # @option options [array] :user_ids + # List of encoded user IDs. + # @see https://api.slack.com/methods/workflows.triggers.permissions.set + # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/workflows.triggers.permissions/workflows.triggers.permissions.set.json + def workflows_triggers_permissions_set(options = {}) + raise ArgumentError, 'Required arguments :permission_type missing' if options[:permission_type].nil? + raise ArgumentError, 'Required arguments :trigger_id missing' if options[:trigger_id].nil? + post('workflows.triggers.permissions.set', options) + end + end + end + end + end +end diff --git a/lib/slack/web/api/errors.rb b/lib/slack/web/api/errors.rb index 24aec502..aa5325db 100644 --- a/lib/slack/web/api/errors.rb +++ b/lib/slack/web/api/errors.rb @@ -68,6 +68,7 @@ class CannotCompleteOthers < SlackError; end class CannotCompleteRecurring < SlackError; end class CannotCreateChannel < SlackError; end class CannotCreateDialog < SlackError; end + class CannotFetchVersions < SlackError; end class CannotFindChannel < SlackError; end class CannotFindMessage < SlackError; end class CannotFindService < SlackError; end @@ -102,11 +103,18 @@ class CantKickFromGeneral < SlackError; end class CantKickSelf < SlackError; end class CantLeaveGeneral < SlackError; end class CantUpdateMessage < SlackError; end + class CanvasCreationFailed < SlackError; end + class CanvasDeleted < SlackError; end + class CanvasDeletingDisabled < SlackError; end class CanvasDisabledFileTeam < SlackError; end class CanvasDisabledUserTeam < SlackError; end + class CanvasEditingFailed < SlackError; end class CanvasGloballyDisabled < SlackError; end + class CanvasNotFound < SlackError; end class ChannelArchived < SlackError; end class ChannelCannotBeUnshared < SlackError; end + class ChannelCanvasAlreadyExists < SlackError; end + class ChannelCanvasCreationFailed < SlackError; end class ChannelCanvasDeleted < SlackError; end class ChannelConversionInProgress < SlackError; end class ChannelIsNotPrivate < SlackError; end @@ -117,7 +125,10 @@ class ChannelOwnerRestriction < SlackError; end class ChannelTypeNotSupported < SlackError; end class ClientIdTokenMismatch < SlackError; end class CodeAlreadyUsed < SlackError; end + class ConnectedOrgDenied < SlackError; end + class ConnectedTeamDenied < SlackError; end class ConnectedTeamPassedInIsNotTopLevelTeam < SlackError; end + class ConnectedUserDenied < SlackError; end class ConnectionLimitExceeded < SlackError; end class ConnectionLimitExceededPending < SlackError; end class CouldNotArchiveChannel < SlackError; end @@ -180,10 +191,12 @@ class ExpiredTriggerId < SlackError; end class ExternalChannelMigrating < SlackError; end class ExternalLimitedRestriction < SlackError; end class ExternalTeamNotConnectedToThisOrg < SlackError; end + class ExternalWorkspaceDenied < SlackError; end class ExternallySharedOrDisconnectedChannel < SlackError; end class FailToGetTeamsForRestrictedUser < SlackError; end class FailedAddingCollaborator < SlackError; end class FailedCreatingApp < SlackError; end + class FailedDatastoreOperation < SlackError; end class FailedExport < SlackError; end class FailedForSomeEntities < SlackError; end class FailedForSomeUsers < SlackError; end @@ -233,6 +246,8 @@ class FileUploadsDisabled < SlackError; end class ForbiddenHandle < SlackError; end class ForbiddenTeam < SlackError; end class FreeTeamNotAllowed < SlackError; end + class FreeTeamsCannotCreateStandaloneCanvases < SlackError; end + class FreeTeamsCannotEditStandaloneCanvases < SlackError; end class FunctionExecutionNotFound < SlackError; end class FunctionNotFound < SlackError; end class GroupAlreadyLinkedToChannel < SlackError; end @@ -299,9 +314,12 @@ class InvalidNameMaxlength < SlackError; end class InvalidNamePunctuation < SlackError; end class InvalidNameRequired < SlackError; end class InvalidNameSpecials < SlackError; end + class InvalidNamedEntities < SlackError; end class InvalidOutputs < SlackError; end + class InvalidParameters < SlackError; end class InvalidParentType < SlackError; end class InvalidPayload < SlackError; end + class InvalidPermissionType < SlackError; end class InvalidPermissions < SlackError; end class InvalidPostType < SlackError; end class InvalidPresence < SlackError; end @@ -346,7 +364,9 @@ class InvalidUserCombination < SlackError; end class InvalidUserId < SlackError; end class InvalidUsers < SlackError; end class InvalidValue < SlackError; end + class InvalidVisibility < SlackError; end class InvalidWorkflowAuthStrategy < SlackError; end + class InvalidWorkspaceFilter < SlackError; end class InviteFromSameOrg < SlackError; end class InviteLookupError < SlackError; end class InviteNotFound < SlackError; end @@ -403,6 +423,7 @@ class MissingTs < SlackError; end class MissingUnfurlId < SlackError; end class MissingUnfurls < SlackError; end class MissingUser < SlackError; end + class MsgBlocksTooLong < SlackError; end class MsgTooLong < SlackError; end class MustClearBothStatusTextAndStatusEmoji < SlackError; end class MustProvideTeamDomain < SlackError; end @@ -413,6 +434,7 @@ class NameNotAllowed < SlackError; end class NameTaken < SlackError; end class NameTakenInOrg < SlackError; end class NameTooLong < SlackError; end + class NamedEntitiesCannotBeEmpty < SlackError; end class NoActiveSessions < SlackError; end class NoAliasSelected < SlackError; end class NoBotUserForApp < SlackError; end @@ -420,6 +442,7 @@ class NoChannel < SlackError; end class NoChannelMemberships < SlackError; end class NoDomainsProvided < SlackError; end class NoDualBroadcastContentUpdate < SlackError; end + class NoExternalInvitePermission < SlackError; end class NoImageUploaded < SlackError; end class NoItemSpecified < SlackError; end class NoLocalUserOnTeam < SlackError; end @@ -438,6 +461,7 @@ class NoUser < SlackError; end class NoUsersProvided < SlackError; end class NoValidChannels < SlackError; end class NoValidEntities < SlackError; end + class NoValidNamedEntities < SlackError; end class NoValidTeams < SlackError; end class NoValidUsers < SlackError; end class NotAdmin < SlackError; end @@ -470,6 +494,7 @@ class OauthAuthorizationUrlMismatch < SlackError; end class OneOrMoreInvalidChannels < SlackError; end class OrgLevelEmailDisplayDisabled < SlackError; end class OrgLoginRequired < SlackError; end + class OrgNotConnected < SlackError; end class OrgNotFound < SlackError; end class OrgResolutionRequired < SlackError; end class OrgUserNotInTeam < SlackError; end @@ -481,8 +506,10 @@ class PaidTeamsOnly < SlackError; end class ParameterValidationFailed < SlackError; end class ParentBookmarkDisabled < SlackError; end class ParentWithLink < SlackError; end + class PartialFailure < SlackError; end class PartialProfileSetFailed < SlackError; end class PermissionDenied < SlackError; end + class PermissionTypeRequired < SlackError; end class PlanUpgradeRequired < SlackError; end class PolicyNotFound < SlackError; end class PostContentsTooLarge < SlackError; end @@ -518,11 +545,13 @@ class SessionExpired < SlackError; end class SessionInvalidationFailed < SlackError; end class SessionNotFound < SlackError; end class SessionResetNotAllowed < SlackError; end + class SharedChannelDenied < SlackError; end class SlackConnectBlockedFileType < SlackError; end class SlackConnectCanvasSharingBlocked < SlackError; end class SlackConnectClipSharingBlocked < SlackError; end class SlackConnectFileLinkSharingBlocked < SlackError; end class SlackConnectFileUploadSharingBlocked < SlackError; end + class SlackConnectListsSharingBlocked < SlackError; end class SnippetTooLarge < SlackError; end class SnoozeEndFailed < SlackError; end class SnoozeFailed < SlackError; end @@ -537,6 +566,7 @@ class TeamAccessNotGranted < SlackError; end class TeamAddedToOrg < SlackError; end class TeamIdOrOrgRequired < SlackError; end class TeamIdRequiredForEnterprise < SlackError; end + class TeamNotConnected < SlackError; end class TeamNotFound < SlackError; end class TeamNotOnEnterprise < SlackError; end class TeamQuotaExceeded < SlackError; end @@ -556,8 +586,6 @@ class TooLong < SlackError; end class TooManyAttachments < SlackError; end class TooManyBookmarks < SlackError; end class TooManyContactCards < SlackError; end - class TooManyConvosForAppOnTeam < SlackError; end - class TooManyConvosForTeam < SlackError; end class TooManyDomainsProvided < SlackError; end class TooManyEmails < SlackError; end class TooManyEmoji < SlackError; end @@ -567,6 +595,7 @@ class TooManyIds < SlackError; end class TooManyIdsProvided < SlackError; end class TooManyLinkedChannels < SlackError; end class TooManyMembers < SlackError; end + class TooManyNamedEntities < SlackError; end class TooManyPins < SlackError; end class TooManyReactions < SlackError; end class TooManyTargetTeams < SlackError; end @@ -575,6 +604,8 @@ class TooManyTeamsProvided < SlackError; end class TooManyUsers < SlackError; end class TriggerExchanged < SlackError; end class TriggerExpired < SlackError; end + class TriggerNotFound < SlackError; end + class TriggerTypeIdNotFound < SlackError; end class TwoFactorSetupRequired < SlackError; end class UnableToDelete < SlackError; end class UnableToFetchCustomEmojis < SlackError; end @@ -603,6 +634,7 @@ class UrlRestrictionNotSupported < SlackError; end class UserAlreadyDeleted < SlackError; end class UserAlreadyTeamMember < SlackError; end class UserCannotCreateChannel < SlackError; end + class UserCannotManageWorkspace < SlackError; end class UserDisabled < SlackError; end class UserDoesNotOwnChannel < SlackError; end class UserIsAlreadyDeleted < SlackError; end @@ -624,6 +656,7 @@ class UsersListNotSupplied < SlackError; end class UsersNotFound < SlackError; end class ValidationErrors < SlackError; end class ViewTooLarge < SlackError; end + class VisibilityIsNotNamedEntities < SlackError; end class WorkflowsExportCsvNotEnabled < SlackError; end ERROR_CLASSES = { @@ -690,6 +723,7 @@ class WorkflowsExportCsvNotEnabled < SlackError; end 'cannot_complete_recurring' => CannotCompleteRecurring, 'cannot_create_channel' => CannotCreateChannel, 'cannot_create_dialog' => CannotCreateDialog, + 'cannot_fetch_versions' => CannotFetchVersions, 'cannot_find_channel' => CannotFindChannel, 'cannot_find_message' => CannotFindMessage, 'cannot_find_service' => CannotFindService, @@ -724,11 +758,18 @@ class WorkflowsExportCsvNotEnabled < SlackError; end 'cant_kick_self' => CantKickSelf, 'cant_leave_general' => CantLeaveGeneral, 'cant_update_message' => CantUpdateMessage, + 'canvas_creation_failed' => CanvasCreationFailed, + 'canvas_deleted' => CanvasDeleted, + 'canvas_deleting_disabled' => CanvasDeletingDisabled, 'canvas_disabled_file_team' => CanvasDisabledFileTeam, 'canvas_disabled_user_team' => CanvasDisabledUserTeam, + 'canvas_editing_failed' => CanvasEditingFailed, 'canvas_globally_disabled' => CanvasGloballyDisabled, + 'canvas_not_found' => CanvasNotFound, 'channel_archived' => ChannelArchived, 'channel_cannot_be_unshared' => ChannelCannotBeUnshared, + 'channel_canvas_already_exists' => ChannelCanvasAlreadyExists, + 'channel_canvas_creation_failed' => ChannelCanvasCreationFailed, 'channel_canvas_deleted' => ChannelCanvasDeleted, 'channel_conversion_in_progress' => ChannelConversionInProgress, 'channel_is_not_private' => ChannelIsNotPrivate, @@ -739,7 +780,10 @@ class WorkflowsExportCsvNotEnabled < SlackError; end 'channel_type_not_supported' => ChannelTypeNotSupported, 'client_id_token_mismatch' => ClientIdTokenMismatch, 'code_already_used' => CodeAlreadyUsed, + 'connected_org_denied' => ConnectedOrgDenied, + 'connected_team_denied' => ConnectedTeamDenied, 'connected_team_passed_in_is_not_top_level_team' => ConnectedTeamPassedInIsNotTopLevelTeam, + 'connected_user_denied' => ConnectedUserDenied, 'connection_limit_exceeded' => ConnectionLimitExceeded, 'connection_limit_exceeded_pending' => ConnectionLimitExceededPending, 'could_not_archive_channel' => CouldNotArchiveChannel, @@ -802,10 +846,12 @@ class WorkflowsExportCsvNotEnabled < SlackError; end 'external_channel_migrating' => ExternalChannelMigrating, 'external_limited_restriction' => ExternalLimitedRestriction, 'external_team_not_connected_to_this_org' => ExternalTeamNotConnectedToThisOrg, + 'external_workspace_denied' => ExternalWorkspaceDenied, 'externally_shared_or_disconnected_channel' => ExternallySharedOrDisconnectedChannel, 'fail_to_get_teams_for_restricted_user' => FailToGetTeamsForRestrictedUser, 'failed_adding_collaborator' => FailedAddingCollaborator, 'failed_creating_app' => FailedCreatingApp, + 'failed_datastore_operation' => FailedDatastoreOperation, 'failed_export' => FailedExport, 'failed_for_some_entities' => FailedForSomeEntities, 'failed_for_some_users' => FailedForSomeUsers, @@ -855,6 +901,8 @@ class WorkflowsExportCsvNotEnabled < SlackError; end 'forbidden_handle' => ForbiddenHandle, 'forbidden_team' => ForbiddenTeam, 'free_team_not_allowed' => FreeTeamNotAllowed, + 'free_teams_cannot_create_standalone_canvases' => FreeTeamsCannotCreateStandaloneCanvases, + 'free_teams_cannot_edit_standalone_canvases' => FreeTeamsCannotEditStandaloneCanvases, 'function_execution_not_found' => FunctionExecutionNotFound, 'function_not_found' => FunctionNotFound, 'group_already_linked_to_channel' => GroupAlreadyLinkedToChannel, @@ -921,9 +969,12 @@ class WorkflowsExportCsvNotEnabled < SlackError; end 'invalid_name_punctuation' => InvalidNamePunctuation, 'invalid_name_required' => InvalidNameRequired, 'invalid_name_specials' => InvalidNameSpecials, + 'invalid_named_entities' => InvalidNamedEntities, 'invalid_outputs' => InvalidOutputs, + 'invalid_parameters' => InvalidParameters, 'invalid_parent_type' => InvalidParentType, 'invalid_payload' => InvalidPayload, + 'invalid_permission_type' => InvalidPermissionType, 'invalid_permissions' => InvalidPermissions, 'invalid_post_type' => InvalidPostType, 'invalid_presence' => InvalidPresence, @@ -968,7 +1019,9 @@ class WorkflowsExportCsvNotEnabled < SlackError; end 'invalid_user_id' => InvalidUserId, 'invalid_users' => InvalidUsers, 'invalid_value' => InvalidValue, + 'invalid_visibility' => InvalidVisibility, 'invalid_workflow_auth_strategy' => InvalidWorkflowAuthStrategy, + 'invalid_workspace_filter' => InvalidWorkspaceFilter, 'invite_from_same_org' => InviteFromSameOrg, 'invite_lookup_error' => InviteLookupError, 'invite_not_found' => InviteNotFound, @@ -1025,6 +1078,7 @@ class WorkflowsExportCsvNotEnabled < SlackError; end 'missing_unfurl_id' => MissingUnfurlId, 'missing_unfurls' => MissingUnfurls, 'missing_user' => MissingUser, + 'msg_blocks_too_long' => MsgBlocksTooLong, 'msg_too_long' => MsgTooLong, 'must_clear_both_status_text_and_status_emoji' => MustClearBothStatusTextAndStatusEmoji, 'must_provide_team_domain' => MustProvideTeamDomain, @@ -1035,6 +1089,7 @@ class WorkflowsExportCsvNotEnabled < SlackError; end 'name_taken' => NameTaken, 'name_taken_in_org' => NameTakenInOrg, 'name_too_long' => NameTooLong, + 'named_entities_cannot_be_empty' => NamedEntitiesCannotBeEmpty, 'no_active_sessions' => NoActiveSessions, 'no_alias_selected' => NoAliasSelected, 'no_bot_user_for_app' => NoBotUserForApp, @@ -1042,6 +1097,7 @@ class WorkflowsExportCsvNotEnabled < SlackError; end 'no_channel_memberships' => NoChannelMemberships, 'no_domains_provided' => NoDomainsProvided, 'no_dual_broadcast_content_update' => NoDualBroadcastContentUpdate, + 'no_external_invite_permission' => NoExternalInvitePermission, 'no_image_uploaded' => NoImageUploaded, 'no_item_specified' => NoItemSpecified, 'no_local_user_on_team' => NoLocalUserOnTeam, @@ -1060,6 +1116,7 @@ class WorkflowsExportCsvNotEnabled < SlackError; end 'no_users_provided' => NoUsersProvided, 'no_valid_channels' => NoValidChannels, 'no_valid_entities' => NoValidEntities, + 'no_valid_named_entities' => NoValidNamedEntities, 'no_valid_teams' => NoValidTeams, 'no_valid_users' => NoValidUsers, 'not_admin' => NotAdmin, @@ -1092,6 +1149,7 @@ class WorkflowsExportCsvNotEnabled < SlackError; end 'one_or_more_invalid_channels' => OneOrMoreInvalidChannels, 'org_level_email_display_disabled' => OrgLevelEmailDisplayDisabled, 'org_login_required' => OrgLoginRequired, + 'org_not_connected' => OrgNotConnected, 'org_not_found' => OrgNotFound, 'org_resolution_required' => OrgResolutionRequired, 'org_user_not_in_team' => OrgUserNotInTeam, @@ -1103,8 +1161,10 @@ class WorkflowsExportCsvNotEnabled < SlackError; end 'parameter_validation_failed' => ParameterValidationFailed, 'parent_bookmark_disabled' => ParentBookmarkDisabled, 'parent_with_link' => ParentWithLink, + 'partial_failure' => PartialFailure, 'partial_profile_set_failed' => PartialProfileSetFailed, 'permission_denied' => PermissionDenied, + 'permission_type_required' => PermissionTypeRequired, 'plan_upgrade_required' => PlanUpgradeRequired, 'policy_not_found' => PolicyNotFound, 'post_contents_too_large' => PostContentsTooLarge, @@ -1140,11 +1200,13 @@ class WorkflowsExportCsvNotEnabled < SlackError; end 'session_invalidation_failed' => SessionInvalidationFailed, 'session_not_found' => SessionNotFound, 'session_reset_not_allowed' => SessionResetNotAllowed, + 'shared_channel_denied' => SharedChannelDenied, 'slack_connect_blocked_file_type' => SlackConnectBlockedFileType, 'slack_connect_canvas_sharing_blocked' => SlackConnectCanvasSharingBlocked, 'slack_connect_clip_sharing_blocked' => SlackConnectClipSharingBlocked, 'slack_connect_file_link_sharing_blocked' => SlackConnectFileLinkSharingBlocked, 'slack_connect_file_upload_sharing_blocked' => SlackConnectFileUploadSharingBlocked, + 'slack_connect_lists_sharing_blocked' => SlackConnectListsSharingBlocked, 'snippet_too_large' => SnippetTooLarge, 'snooze_end_failed' => SnoozeEndFailed, 'snooze_failed' => SnoozeFailed, @@ -1159,6 +1221,7 @@ class WorkflowsExportCsvNotEnabled < SlackError; end 'team_added_to_org' => TeamAddedToOrg, 'team_id_or_org_required' => TeamIdOrOrgRequired, 'team_id_required_for_enterprise' => TeamIdRequiredForEnterprise, + 'team_not_connected' => TeamNotConnected, 'team_not_found' => TeamNotFound, 'team_not_on_enterprise' => TeamNotOnEnterprise, 'team_quota_exceeded' => TeamQuotaExceeded, @@ -1178,8 +1241,6 @@ class WorkflowsExportCsvNotEnabled < SlackError; end 'too_many_attachments' => TooManyAttachments, 'too_many_bookmarks' => TooManyBookmarks, 'too_many_contact_cards' => TooManyContactCards, - 'too_many_convos_for_app_on_team' => TooManyConvosForAppOnTeam, - 'too_many_convos_for_team' => TooManyConvosForTeam, 'too_many_domains_provided' => TooManyDomainsProvided, 'too_many_emails' => TooManyEmails, 'too_many_emoji' => TooManyEmoji, @@ -1189,6 +1250,7 @@ class WorkflowsExportCsvNotEnabled < SlackError; end 'too_many_ids_provided' => TooManyIdsProvided, 'too_many_linked_channels' => TooManyLinkedChannels, 'too_many_members' => TooManyMembers, + 'too_many_named_entities' => TooManyNamedEntities, 'too_many_pins' => TooManyPins, 'too_many_reactions' => TooManyReactions, 'too_many_target_teams' => TooManyTargetTeams, @@ -1197,6 +1259,8 @@ class WorkflowsExportCsvNotEnabled < SlackError; end 'too_many_users' => TooManyUsers, 'trigger_exchanged' => TriggerExchanged, 'trigger_expired' => TriggerExpired, + 'trigger_not_found' => TriggerNotFound, + 'trigger_type_id_not_found' => TriggerTypeIdNotFound, 'two_factor_setup_required' => TwoFactorSetupRequired, 'unable_to_delete' => UnableToDelete, 'unable_to_fetch_custom_emojis' => UnableToFetchCustomEmojis, @@ -1225,6 +1289,7 @@ class WorkflowsExportCsvNotEnabled < SlackError; end 'user_already_deleted' => UserAlreadyDeleted, 'user_already_team_member' => UserAlreadyTeamMember, 'user_cannot_create_channel' => UserCannotCreateChannel, + 'user_cannot_manage_workspace' => UserCannotManageWorkspace, 'user_disabled' => UserDisabled, 'user_does_not_own_channel' => UserDoesNotOwnChannel, 'user_is_already_deleted' => UserIsAlreadyDeleted, @@ -1246,6 +1311,7 @@ class WorkflowsExportCsvNotEnabled < SlackError; end 'users_not_found' => UsersNotFound, 'validation_errors' => ValidationErrors, 'view_too_large' => ViewTooLarge, + 'visibility_is_not_named_entities' => VisibilityIsNotNamedEntities, 'workflows_export_csv_not_enabled' => WorkflowsExportCsvNotEnabled, }.freeze end diff --git a/lib/slack/web/api/slack-api-ref b/lib/slack/web/api/slack-api-ref index 8a22e575..462506c4 160000 --- a/lib/slack/web/api/slack-api-ref +++ b/lib/slack/web/api/slack-api-ref @@ -1 +1 @@ -Subproject commit 8a22e575eefeb220a5a06426ff7319e6ef46dd42 +Subproject commit 462506c45db3241aa98b0ef6a775411a962a50d1 diff --git a/spec/slack/web/api/endpoints/admin_workflows_triggers_types_permissions_spec.rb b/spec/slack/web/api/endpoints/admin_workflows_triggers_types_permissions_spec.rb new file mode 100644 index 00000000..4dd119a6 --- /dev/null +++ b/spec/slack/web/api/endpoints/admin_workflows_triggers_types_permissions_spec.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# This file was auto-generated by lib/tasks/web.rake + +require 'spec_helper' + +RSpec.describe Slack::Web::Api::Endpoints::AdminWorkflowsTriggersTypesPermissions do + let(:client) { Slack::Web::Client.new } + context 'admin.workflows.triggers.types.permissions_lookup' do + it 'requires trigger_type_ids' do + expect { client.admin_workflows_triggers_types_permissions_lookup }.to raise_error ArgumentError, /Required arguments :trigger_type_ids missing/ + end + end + context 'admin.workflows.triggers.types.permissions_set' do + it 'requires id' do + expect { client.admin_workflows_triggers_types_permissions_set(visibility: %q[]) }.to raise_error ArgumentError, /Required arguments :id missing/ + end + it 'requires visibility' do + expect { client.admin_workflows_triggers_types_permissions_set(id: %q[['FTT01', 'FTT02', 'FTT03']]) }.to raise_error ArgumentError, /Required arguments :visibility missing/ + end + end +end diff --git a/spec/slack/web/api/endpoints/apps_datastore_spec.rb b/spec/slack/web/api/endpoints/apps_datastore_spec.rb index 7cd8e66f..41ca33e4 100644 --- a/spec/slack/web/api/endpoints/apps_datastore_spec.rb +++ b/spec/slack/web/api/endpoints/apps_datastore_spec.rb @@ -5,6 +5,35 @@ RSpec.describe Slack::Web::Api::Endpoints::AppsDatastore do let(:client) { Slack::Web::Client.new } + context 'apps.datastore_bulkDelete' do + it 'requires datastore' do + expect { client.apps_datastore_bulkDelete(ids: %q[["7c6dd137", "c7d6d731"]]) }.to raise_error ArgumentError, /Required arguments :datastore missing/ + end + it 'requires ids' do + expect { client.apps_datastore_bulkDelete(datastore: %q[]) }.to raise_error ArgumentError, /Required arguments :ids missing/ + end + end + context 'apps.datastore_bulkGet' do + it 'requires datastore' do + expect { client.apps_datastore_bulkGet(ids: %q[["7c6dd137", "c7d6d731"]]) }.to raise_error ArgumentError, /Required arguments :datastore missing/ + end + it 'requires ids' do + expect { client.apps_datastore_bulkGet(datastore: %q[]) }.to raise_error ArgumentError, /Required arguments :ids missing/ + end + end + context 'apps.datastore_bulkPut' do + it 'requires datastore' do + expect { client.apps_datastore_bulkPut(items: %q[[{"id": "7c6dd137", "favourite_meal": "Shawarma", "reason": "Who doesn't like Shawarma?"}]]) }.to raise_error ArgumentError, /Required arguments :datastore missing/ + end + it 'requires items' do + expect { client.apps_datastore_bulkPut(datastore: %q[]) }.to raise_error ArgumentError, /Required arguments :items missing/ + end + end + context 'apps.datastore_count' do + it 'requires datastore' do + expect { client.apps_datastore_count }.to raise_error ArgumentError, /Required arguments :datastore missing/ + end + end context 'apps.datastore_delete' do it 'requires datastore' do expect { client.apps_datastore_delete(id: %q[]) }.to raise_error ArgumentError, /Required arguments :datastore missing/ diff --git a/spec/slack/web/api/endpoints/canvases_access_spec.rb b/spec/slack/web/api/endpoints/canvases_access_spec.rb new file mode 100644 index 00000000..4992ad0e --- /dev/null +++ b/spec/slack/web/api/endpoints/canvases_access_spec.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# This file was auto-generated by lib/tasks/web.rake + +require 'spec_helper' + +RSpec.describe Slack::Web::Api::Endpoints::CanvasesAccess do + let(:client) { Slack::Web::Client.new } + context 'canvases.access_delete' do + it 'requires canvas_id' do + expect { client.canvases_access_delete }.to raise_error ArgumentError, /Required arguments :canvas_id missing/ + end + end + context 'canvases.access_set' do + it 'requires access_level' do + expect { client.canvases_access_set(canvas_id: %q[F1234ABCD]) }.to raise_error ArgumentError, /Required arguments :access_level missing/ + end + it 'requires canvas_id' do + expect { client.canvases_access_set(access_level: %q[]) }.to raise_error ArgumentError, /Required arguments :canvas_id missing/ + end + end +end diff --git a/spec/slack/web/api/endpoints/canvases_sections_spec.rb b/spec/slack/web/api/endpoints/canvases_sections_spec.rb new file mode 100644 index 00000000..8b4ef0cb --- /dev/null +++ b/spec/slack/web/api/endpoints/canvases_sections_spec.rb @@ -0,0 +1,16 @@ +# frozen_string_literal: true +# This file was auto-generated by lib/tasks/web.rake + +require 'spec_helper' + +RSpec.describe Slack::Web::Api::Endpoints::CanvasesSections do + let(:client) { Slack::Web::Client.new } + context 'canvases.sections_lookup' do + it 'requires canvas_id' do + expect { client.canvases_sections_lookup(criteria: %q[{"section_types": ["any_header"], "contains_text": "CAN Report"}]) }.to raise_error ArgumentError, /Required arguments :canvas_id missing/ + end + it 'requires criteria' do + expect { client.canvases_sections_lookup(canvas_id: %q[F1234ABCD]) }.to raise_error ArgumentError, /Required arguments :criteria missing/ + end + end +end diff --git a/spec/slack/web/api/endpoints/canvases_spec.rb b/spec/slack/web/api/endpoints/canvases_spec.rb new file mode 100644 index 00000000..636239dd --- /dev/null +++ b/spec/slack/web/api/endpoints/canvases_spec.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true +# This file was auto-generated by lib/tasks/web.rake + +require 'spec_helper' + +RSpec.describe Slack::Web::Api::Endpoints::Canvases do + let(:client) { Slack::Web::Client.new } + context 'canvases_delete' do + it 'requires canvas_id' do + expect { client.canvases_delete }.to raise_error ArgumentError, /Required arguments :canvas_id missing/ + end + end + context 'canvases_edit' do + it 'requires canvas_id' do + expect { client.canvases_edit(changes: %q[[{"operation":"insert_before","document_content":{"type":"markdown","markdown":"Example content"},"section_id":"temp:C:AAAAAAAAAAAAAAAAAAAAAAAAAAAA"}]]) }.to raise_error ArgumentError, /Required arguments :canvas_id missing/ + end + it 'requires changes' do + expect { client.canvases_edit(canvas_id: %q[F1234ABCD]) }.to raise_error ArgumentError, /Required arguments :changes missing/ + end + end +end diff --git a/spec/slack/web/api/endpoints/conversations_canvases_spec.rb b/spec/slack/web/api/endpoints/conversations_canvases_spec.rb new file mode 100644 index 00000000..0e704997 --- /dev/null +++ b/spec/slack/web/api/endpoints/conversations_canvases_spec.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true +# This file was auto-generated by lib/tasks/web.rake + +require 'spec_helper' + +RSpec.describe Slack::Web::Api::Endpoints::ConversationsCanvases do + let(:client) { Slack::Web::Client.new } + context 'conversations.canvases_create' do + it 'requires channel_id' do + expect { client.conversations_canvases_create }.to raise_error ArgumentError, /Required arguments :channel_id missing/ + end + end +end diff --git a/spec/slack/web/api/endpoints/conversations_externalInvitePermissions_spec.rb b/spec/slack/web/api/endpoints/conversations_externalInvitePermissions_spec.rb new file mode 100644 index 00000000..70f84635 --- /dev/null +++ b/spec/slack/web/api/endpoints/conversations_externalInvitePermissions_spec.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true +# This file was auto-generated by lib/tasks/web.rake + +require 'spec_helper' + +RSpec.describe Slack::Web::Api::Endpoints::ConversationsExternalinvitepermissions do + let(:client) { Slack::Web::Client.new } + context 'conversations.externalInvitePermissions_set' do + it 'requires action' do + expect { client.conversations_externalInvitePermissions_set(channel: %q[C123456], target_team: %q[T726G27TT]) }.to raise_error ArgumentError, /Required arguments :action missing/ + end + it 'requires channel' do + expect { client.conversations_externalInvitePermissions_set(action: %q[upgrade], target_team: %q[T726G27TT]) }.to raise_error ArgumentError, /Required arguments :channel missing/ + end + it 'requires target_team' do + expect { client.conversations_externalInvitePermissions_set(action: %q[upgrade], channel: %q[C123456]) }.to raise_error ArgumentError, /Required arguments :target_team missing/ + end + end +end diff --git a/spec/slack/web/api/endpoints/dnd_spec.rb b/spec/slack/web/api/endpoints/dnd_spec.rb index 02414748..32f6efa3 100644 --- a/spec/slack/web/api/endpoints/dnd_spec.rb +++ b/spec/slack/web/api/endpoints/dnd_spec.rb @@ -5,6 +5,11 @@ RSpec.describe Slack::Web::Api::Endpoints::Dnd do let(:client) { Slack::Web::Client.new } + context 'dnd_setSnooze' do + it 'requires num_minutes' do + expect { client.dnd_setSnooze }.to raise_error ArgumentError, /Required arguments :num_minutes missing/ + end + end context 'dnd_teamInfo' do it 'requires users' do expect { client.dnd_teamInfo }.to raise_error ArgumentError, /Required arguments :users missing/ diff --git a/spec/slack/web/api/endpoints/functions_distributions_permissions_spec.rb b/spec/slack/web/api/endpoints/functions_distributions_permissions_spec.rb new file mode 100644 index 00000000..a64fb24a --- /dev/null +++ b/spec/slack/web/api/endpoints/functions_distributions_permissions_spec.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true +# This file was auto-generated by lib/tasks/web.rake + +require 'spec_helper' + +RSpec.describe Slack::Web::Api::Endpoints::FunctionsDistributionsPermissions do + let(:client) { Slack::Web::Client.new } + context 'functions.distributions.permissions_set' do + it 'requires permission_type' do + expect { client.functions_distributions_permissions_set }.to raise_error ArgumentError, /Required arguments :permission_type missing/ + end + it 'requires one of permission_type' do + expect { client.functions_distributions_permissions_set }.to raise_error ArgumentError, /Exactly one of/ + + expect(client).to receive(:post).with('functions.distributions.permissions.set', {permission_type: %q[]}) + client.functions_distributions_permissions_set(permission_type: %q[]) + end + end +end diff --git a/spec/slack/web/api/endpoints/team_externalTeams_spec.rb b/spec/slack/web/api/endpoints/team_externalTeams_spec.rb new file mode 100644 index 00000000..9337500d --- /dev/null +++ b/spec/slack/web/api/endpoints/team_externalTeams_spec.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true +# This file was auto-generated by lib/tasks/web.rake + +require 'spec_helper' + +RSpec.describe Slack::Web::Api::Endpoints::TeamExternalteams do + let(:client) { Slack::Web::Client.new } + context 'team.externalTeams_disconnect' do + it 'requires target_team' do + expect { client.team_externalTeams_disconnect }.to raise_error ArgumentError, /Required arguments :target_team missing/ + end + end +end diff --git a/spec/slack/web/api/endpoints/users_discoverableContacts_spec.rb b/spec/slack/web/api/endpoints/users_discoverableContacts_spec.rb new file mode 100644 index 00000000..28a75ebf --- /dev/null +++ b/spec/slack/web/api/endpoints/users_discoverableContacts_spec.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true +# This file was auto-generated by lib/tasks/web.rake + +require 'spec_helper' + +RSpec.describe Slack::Web::Api::Endpoints::UsersDiscoverablecontacts do + let(:client) { Slack::Web::Client.new } + context 'users.discoverableContacts_lookup' do + it 'requires email' do + expect { client.users_discoverableContacts_lookup }.to raise_error ArgumentError, /Required arguments :email missing/ + end + end +end diff --git a/spec/slack/web/api/endpoints/workflows_triggers_permissions_spec.rb b/spec/slack/web/api/endpoints/workflows_triggers_permissions_spec.rb new file mode 100644 index 00000000..9f4d36c1 --- /dev/null +++ b/spec/slack/web/api/endpoints/workflows_triggers_permissions_spec.rb @@ -0,0 +1,31 @@ +# frozen_string_literal: true +# This file was auto-generated by lib/tasks/web.rake + +require 'spec_helper' + +RSpec.describe Slack::Web::Api::Endpoints::WorkflowsTriggersPermissions do + let(:client) { Slack::Web::Client.new } + context 'workflows.triggers.permissions_add' do + it 'requires trigger_id' do + expect { client.workflows_triggers_permissions_add }.to raise_error ArgumentError, /Required arguments :trigger_id missing/ + end + end + context 'workflows.triggers.permissions_list' do + it 'requires trigger_id' do + expect { client.workflows_triggers_permissions_list }.to raise_error ArgumentError, /Required arguments :trigger_id missing/ + end + end + context 'workflows.triggers.permissions_remove' do + it 'requires trigger_id' do + expect { client.workflows_triggers_permissions_remove }.to raise_error ArgumentError, /Required arguments :trigger_id missing/ + end + end + context 'workflows.triggers.permissions_set' do + it 'requires permission_type' do + expect { client.workflows_triggers_permissions_set(trigger_id: %q[Ft0000000001]) }.to raise_error ArgumentError, /Required arguments :permission_type missing/ + end + it 'requires trigger_id' do + expect { client.workflows_triggers_permissions_set(permission_type: %q[]) }.to raise_error ArgumentError, /Required arguments :trigger_id missing/ + end + end +end