slack-ruby-client 0.11.0 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/.coveralls.yml +2 -0
- data/.github/FUNDING.yml +2 -0
- data/.github/dependabot.yml +6 -0
- data/.github/workflows/integration_test.yml +45 -0
- data/.github/workflows/lint.yml +14 -0
- data/.github/workflows/pr_lint.yml +21 -0
- data/.github/workflows/test.yml +56 -0
- data/.github/workflows/update_api.yml +81 -0
- data/.gitignore +7 -3
- data/.rubocop.yml +40 -2
- data/.rubocop_todo.yml +209 -55
- data/.ruby-version +1 -0
- data/CHANGELOG.md +257 -30
- data/CONTRIBUTING.md +44 -29
- data/Dangerfile +2 -0
- data/Gemfile +28 -6
- data/Gemfile.danger +6 -0
- data/LICENSE.md +1 -1
- data/README.md +473 -134
- data/RELEASING.md +2 -2
- data/Rakefile +2 -1
- data/SECURITY.md +9 -0
- data/UPGRADING.md +117 -3
- data/bin/commands/admin_analytics.rb +22 -0
- data/bin/commands/admin_apps.rb +57 -0
- data/bin/commands/admin_apps_activities.rb +32 -0
- data/bin/commands/admin_apps_approved.rb +24 -0
- data/bin/commands/admin_apps_config.rb +31 -0
- data/bin/commands/admin_apps_requests.rb +35 -0
- data/bin/commands/admin_apps_restricted.rb +24 -0
- data/bin/commands/admin_audit_anomaly_allow.rb +29 -0
- data/bin/commands/admin_auth_policy.rb +45 -0
- data/bin/commands/admin_barriers.rb +53 -0
- data/bin/commands/admin_conversations.rb +260 -0
- data/bin/commands/admin_conversations_ekm.rb +23 -0
- data/bin/commands/admin_conversations_restrictAccess.rb +43 -0
- data/bin/commands/admin_emoji.rb +60 -0
- data/bin/commands/admin_functions.rb +23 -0
- data/bin/commands/admin_functions_permissions.rb +31 -0
- data/bin/commands/admin_inviteRequests.rb +42 -0
- data/bin/commands/admin_inviteRequests_approved.rb +22 -0
- data/bin/commands/admin_inviteRequests_denied.rb +22 -0
- data/bin/commands/admin_roles.rb +46 -0
- data/bin/commands/admin_teams.rb +33 -0
- data/bin/commands/admin_teams_admins.rb +22 -0
- data/bin/commands/admin_teams_owners.rb +22 -0
- data/bin/commands/admin_teams_settings.rb +70 -0
- data/bin/commands/admin_usergroups.rb +54 -0
- data/bin/commands/admin_users.rb +106 -0
- data/bin/commands/admin_users_session.rb +84 -0
- data/bin/commands/admin_users_unsupportedVersions.rb +21 -0
- data/bin/commands/admin_workflows.rb +42 -0
- data/bin/commands/admin_workflows_collaborators.rb +31 -0
- data/bin/commands/admin_workflows_permissions.rb +21 -0
- data/bin/commands/admin_workflows_triggers_types_permissions.rb +31 -0
- data/bin/commands/api.rb +15 -9
- data/bin/commands/apps.rb +21 -0
- data/bin/commands/apps_activities.rb +32 -0
- data/bin/commands/apps_auth_external.rb +32 -0
- data/bin/commands/apps_connections.rb +19 -0
- data/bin/commands/apps_datastore.rb +116 -0
- data/bin/commands/apps_event_authorizations.rb +22 -0
- data/bin/commands/apps_manifest.rb +58 -0
- data/bin/commands/assistant_search.rb +27 -0
- data/bin/commands/assistant_threads.rb +45 -0
- data/bin/commands/auth.rb +22 -15
- data/bin/commands/auth_teams.rb +22 -0
- data/bin/commands/bookmarks.rb +60 -0
- data/bin/commands/bots.rb +16 -8
- data/bin/commands/calls.rb +58 -0
- data/bin/commands/calls_participants.rb +31 -0
- data/bin/commands/canvases.rb +41 -0
- data/bin/commands/canvases_access.rb +34 -0
- data/bin/commands/canvases_sections.rb +21 -0
- data/bin/commands/chat.rb +158 -99
- data/bin/commands/chat_scheduledMessages.rb +25 -0
- data/bin/commands/conversations.rb +241 -157
- data/bin/commands/conversations_canvases.rb +22 -0
- data/bin/commands/conversations_externalInvitePermissions.rb +22 -0
- data/bin/commands/conversations_requestSharedInvite.rb +48 -0
- data/bin/commands/dialog.rb +16 -9
- data/bin/commands/dnd.rb +47 -38
- data/bin/commands/emoji.rb +15 -7
- data/bin/commands/files.rb +113 -87
- data/bin/commands/files_comments.rb +16 -30
- data/bin/commands/files_remote.rb +84 -0
- data/bin/commands/functions.rb +31 -0
- data/bin/commands/functions_distributions_permissions.rb +61 -0
- data/bin/commands/functions_workflows_steps.rb +23 -0
- data/bin/commands/functions_workflows_steps_responses.rb +23 -0
- data/bin/commands/migration.rb +17 -9
- data/bin/commands/oauth.rb +19 -24
- data/bin/commands/oauth_v2.rb +35 -0
- data/bin/commands/openid_connect.rb +33 -0
- data/bin/commands/pins.rb +33 -30
- data/bin/commands/reactions.rb +53 -45
- data/bin/commands/reminders.rb +54 -41
- data/bin/commands/rtm.rb +16 -22
- data/bin/commands/search.rb +44 -33
- data/bin/commands/stars.rb +39 -29
- data/bin/commands/team.rb +50 -34
- data/bin/commands/team_billing.rb +19 -0
- data/bin/commands/team_externalTeams.rb +35 -0
- data/bin/commands/team_preferences.rb +19 -0
- data/bin/commands/team_profile.rb +15 -8
- data/bin/commands/tooling_tokens.rb +20 -0
- data/bin/commands/usergroups.rb +69 -53
- data/bin/commands/usergroups_users.rb +30 -19
- data/bin/commands/users.rb +114 -84
- data/bin/commands/users_admin.rb +29 -22
- data/bin/commands/users_discoverableContacts.rb +20 -0
- data/bin/commands/users_prefs.rb +14 -7
- data/bin/commands/users_profile.rb +27 -20
- data/bin/commands/views.rb +56 -0
- data/bin/commands/workflows.rb +44 -0
- data/bin/commands/workflows_triggers_permissions.rb +60 -0
- data/bin/slack +50 -46
- data/examples/files_upload_v2/.env.example +1 -0
- data/examples/{hi_real_time → files_upload_v2}/Gemfile +2 -2
- data/examples/files_upload_v2/README.md +13 -0
- data/examples/files_upload_v2/files_upload_v2.rb +45 -0
- data/examples/hi_real_time_and_web/Gemfile +1 -0
- data/examples/hi_real_time_and_web/hi.rb +7 -3
- data/examples/{hi_real_time_async_eventmachine → hi_real_time_async_async}/Gemfile +2 -1
- data/examples/{hi_real_time_async_eventmachine → hi_real_time_async_async}/hi.rb +12 -7
- data/examples/hi_web/Gemfile +1 -0
- data/examples/hi_web/hi.rb +1 -0
- data/examples/new_ticket/Gemfile +1 -0
- data/examples/new_ticket/new_ticket.rb +1 -0
- data/examples/oauth_v2/.env.example +4 -0
- data/examples/oauth_v2/Gemfile +7 -0
- data/examples/oauth_v2/README.md +33 -0
- data/examples/oauth_v2/oauth_v2.rb +60 -0
- data/lib/slack/config.rb +2 -2
- data/lib/slack/events/config.rb +32 -0
- data/lib/slack/events/request.rb +76 -0
- data/lib/slack/logger.rb +6 -5
- data/lib/slack/messages/formatting.rb +66 -1
- data/lib/slack/messages/message.rb +1 -4
- data/lib/slack/real_time/api/message.rb +6 -3
- data/lib/slack/real_time/api/message_id.rb +1 -0
- data/lib/slack/real_time/api/ping.rb +5 -2
- data/lib/slack/real_time/api/templates/event_handler.erb +5 -1
- data/lib/slack/real_time/api/typing.rb +5 -2
- data/lib/slack/real_time/client.rb +117 -54
- data/lib/slack/real_time/concurrency/async.rb +142 -0
- data/lib/slack/real_time/concurrency.rb +2 -2
- data/lib/slack/real_time/config.rb +12 -13
- data/lib/slack/real_time/models/base.rb +1 -4
- data/lib/slack/real_time/models/bot.rb +1 -0
- data/lib/slack/real_time/models/channel.rb +5 -0
- data/lib/slack/real_time/models/im.rb +1 -0
- data/lib/slack/real_time/models/{group.rb → mpim.rb} +2 -1
- data/lib/slack/real_time/models/team.rb +1 -0
- data/lib/slack/real_time/models/user.rb +1 -0
- data/lib/slack/real_time/models.rb +3 -1
- data/lib/slack/real_time/socket.rb +49 -17
- data/lib/slack/real_time/stores/base.rb +28 -14
- data/lib/slack/real_time/stores/starter.rb +325 -287
- data/lib/slack/real_time/stores/store.rb +271 -186
- data/lib/slack/real_time/stores.rb +2 -7
- data/lib/slack/utils/security.rb +44 -0
- data/lib/slack/version.rb +2 -1
- data/lib/slack/web/api/endpoints/admin_analytics.rb +28 -0
- data/lib/slack/web/api/endpoints/admin_apps.rb +78 -0
- data/lib/slack/web/api/endpoints/admin_apps_activities.rb +53 -0
- data/lib/slack/web/api/endpoints/admin_apps_approved.rb +37 -0
- data/lib/slack/web/api/endpoints/admin_apps_config.rb +40 -0
- data/lib/slack/web/api/endpoints/admin_apps_requests.rb +53 -0
- data/lib/slack/web/api/endpoints/admin_apps_restricted.rb +37 -0
- data/lib/slack/web/api/endpoints/admin_audit_anomaly_allow.rb +34 -0
- data/lib/slack/web/api/endpoints/admin_auth_policy.rb +72 -0
- data/lib/slack/web/api/endpoints/admin_barriers.rb +82 -0
- data/lib/slack/web/api/endpoints/admin_conversations.rb +397 -0
- data/lib/slack/web/api/endpoints/admin_conversations_ekm.rb +35 -0
- data/lib/slack/web/api/endpoints/admin_conversations_restrictAccess.rb +61 -0
- data/lib/slack/web/api/endpoints/admin_emoji.rb +88 -0
- data/lib/slack/web/api/endpoints/admin_functions.rb +36 -0
- data/lib/slack/web/api/endpoints/admin_functions_permissions.rb +41 -0
- data/lib/slack/web/api/endpoints/admin_inviteRequests.rb +61 -0
- data/lib/slack/web/api/endpoints/admin_inviteRequests_approved.rb +33 -0
- data/lib/slack/web/api/endpoints/admin_inviteRequests_denied.rb +33 -0
- data/lib/slack/web/api/endpoints/admin_roles.rb +73 -0
- data/lib/slack/web/api/endpoints/admin_teams.rb +50 -0
- data/lib/slack/web/api/endpoints/admin_teams_admins.rb +34 -0
- data/lib/slack/web/api/endpoints/admin_teams_owners.rb +34 -0
- data/lib/slack/web/api/endpoints/admin_teams_settings.rb +99 -0
- data/lib/slack/web/api/endpoints/admin_usergroups.rb +77 -0
- data/lib/slack/web/api/endpoints/admin_users.rb +167 -0
- data/lib/slack/web/api/endpoints/admin_users_session.rb +121 -0
- data/lib/slack/web/api/endpoints/admin_users_unsupportedVersions.rb +25 -0
- data/lib/slack/web/api/endpoints/admin_workflows.rb +67 -0
- data/lib/slack/web/api/endpoints/admin_workflows_collaborators.rb +42 -0
- data/lib/slack/web/api/endpoints/admin_workflows_permissions.rb +26 -0
- data/lib/slack/web/api/endpoints/admin_workflows_triggers_types_permissions.rb +41 -0
- data/lib/slack/web/api/endpoints/api.rb +2 -3
- data/lib/slack/web/api/endpoints/apps.rb +27 -0
- data/lib/slack/web/api/endpoints/apps_activities.rb +54 -0
- data/lib/slack/web/api/endpoints/apps_auth_external.rb +41 -0
- data/lib/slack/web/api/endpoints/apps_connections.rb +21 -0
- data/lib/slack/web/api/endpoints/apps_datastore.rb +181 -0
- data/lib/slack/web/api/endpoints/apps_event_authorizations.rb +34 -0
- data/lib/slack/web/api/endpoints/apps_manifest.rb +79 -0
- data/lib/slack/web/api/endpoints/assistant_search.rb +44 -0
- data/lib/slack/web/api/endpoints/assistant_threads.rb +68 -0
- data/lib/slack/web/api/endpoints/auth.rb +2 -1
- data/lib/slack/web/api/endpoints/auth_teams.rb +33 -0
- data/lib/slack/web/api/endpoints/bookmarks.rb +90 -0
- data/lib/slack/web/api/endpoints/bots.rb +4 -1
- data/lib/slack/web/api/endpoints/calls.rb +83 -0
- data/lib/slack/web/api/endpoints/calls_participants.rb +42 -0
- data/lib/slack/web/api/endpoints/canvases.rb +54 -0
- data/lib/slack/web/api/endpoints/canvases_access.rb +47 -0
- data/lib/slack/web/api/endpoints/canvases_sections.rb +27 -0
- data/lib/slack/web/api/endpoints/chat.rb +172 -87
- data/lib/slack/web/api/endpoints/chat_scheduledMessages.rb +40 -0
- data/lib/slack/web/api/endpoints/conversations.rb +190 -64
- data/lib/slack/web/api/endpoints/conversations_canvases.rb +28 -0
- data/lib/slack/web/api/endpoints/conversations_externalInvitePermissions.rb +31 -0
- data/lib/slack/web/api/endpoints/conversations_requestSharedInvite.rb +73 -0
- data/lib/slack/web/api/endpoints/dialog.rb +6 -10
- data/lib/slack/web/api/endpoints/dnd.rb +11 -5
- data/lib/slack/web/api/endpoints/emoji.rb +3 -0
- data/lib/slack/web/api/endpoints/files.rb +85 -36
- data/lib/slack/web/api/endpoints/files_comments.rb +4 -36
- data/lib/slack/web/api/endpoints/files_remote.rb +127 -0
- data/lib/slack/web/api/endpoints/functions.rb +43 -0
- data/lib/slack/web/api/endpoints/functions_distributions_permissions.rb +84 -0
- data/lib/slack/web/api/endpoints/functions_workflows_steps.rb +30 -0
- data/lib/slack/web/api/endpoints/functions_workflows_steps_responses.rb +30 -0
- data/lib/slack/web/api/endpoints/migration.rb +6 -3
- data/lib/slack/web/api/endpoints/oauth.rb +10 -32
- data/lib/slack/web/api/endpoints/oauth_v2.rb +48 -0
- data/lib/slack/web/api/endpoints/openid_connect.rb +42 -0
- data/lib/slack/web/api/endpoints/pins.rb +11 -18
- data/lib/slack/web/api/endpoints/reactions.rb +31 -20
- data/lib/slack/web/api/endpoints/reminders.rb +25 -12
- data/lib/slack/web/api/endpoints/rtm.rb +4 -22
- data/lib/slack/web/api/endpoints/search.rb +33 -18
- data/lib/slack/web/api/endpoints/stars.rb +23 -10
- data/lib/slack/web/api/endpoints/team.rb +38 -7
- data/lib/slack/web/api/endpoints/team_billing.rb +21 -0
- data/lib/slack/web/api/endpoints/team_externalTeams.rb +53 -0
- data/lib/slack/web/api/endpoints/team_preferences.rb +21 -0
- data/lib/slack/web/api/endpoints/team_profile.rb +2 -1
- data/lib/slack/web/api/endpoints/tooling_tokens.rb +24 -0
- data/lib/slack/web/api/endpoints/usergroups.rb +44 -25
- data/lib/slack/web/api/endpoints/usergroups_users.rb +23 -14
- data/lib/slack/web/api/endpoints/users.rb +57 -18
- data/lib/slack/web/api/endpoints/users_admin.rb +5 -2
- data/lib/slack/web/api/endpoints/users_discoverableContacts.rb +24 -0
- data/lib/slack/web/api/endpoints/users_prefs.rb +2 -0
- data/lib/slack/web/api/endpoints/users_profile.rb +11 -9
- data/lib/slack/web/api/endpoints/views.rb +86 -0
- data/lib/slack/web/api/endpoints/workflows.rb +63 -0
- data/lib/slack/web/api/endpoints/workflows_triggers_permissions.rb +87 -0
- data/lib/slack/web/api/endpoints.rb +136 -12
- data/lib/slack/web/api/error.rb +1 -0
- data/lib/slack/web/api/errors/server_error.rb +37 -0
- data/lib/slack/web/api/errors/slack_error.rb +14 -1
- data/lib/slack/web/api/errors/too_many_requests_error.rb +2 -4
- data/lib/slack/web/api/errors.rb +1396 -0
- data/lib/slack/web/api/helpers/files.rb +97 -0
- data/lib/slack/web/api/helpers.rb +13 -0
- data/lib/slack/web/api/mixins/conversations.id.rb +47 -0
- data/lib/slack/web/api/mixins/ids.id.rb +4 -3
- data/lib/slack/web/api/mixins/users.id.rb +18 -4
- data/lib/slack/web/api/mixins/users.search.rb +3 -1
- data/lib/slack/web/api/mixins.rb +2 -2
- data/lib/slack/web/api/options.rb +26 -0
- data/lib/slack/web/api/patches/.gitkeep +0 -0
- data/lib/slack/web/api/templates/command.erb +19 -12
- data/lib/slack/web/api/templates/endpoints.erb +2 -2
- data/lib/slack/web/api/templates/errors.erb +20 -0
- data/lib/slack/web/api/templates/method.erb +23 -3
- data/lib/slack/web/api/templates/method_spec.erb +40 -3
- data/lib/slack/web/client.rb +4 -1
- data/lib/slack/web/config.rb +9 -2
- data/lib/slack/web/faraday/connection.rb +11 -20
- data/lib/slack/web/faraday/options.rb +24 -0
- data/lib/slack/web/faraday/request.rb +6 -1
- data/lib/slack/web/faraday/response/raise_error.rb +14 -8
- data/lib/slack/web/faraday/response/wrap_error.rb +24 -0
- data/lib/slack/web/pagination/cursor.rb +7 -7
- data/lib/slack-ruby-client.rb +18 -6
- data/lib/slack.rb +1 -0
- data/lib/slack_ruby_client.rb +1 -0
- data/lib/tasks/git.rake +1 -0
- data/lib/tasks/real_time.rake +51 -21
- data/lib/tasks/update.rake +1 -0
- data/lib/tasks/web.rake +43 -17
- data/slack-ruby-client.gemspec +10 -14
- metadata +191 -307
- data/.travis.yml +0 -30
- data/bin/commands/apps_permissions.rb +0 -22
- data/bin/commands/channels.rb +0 -175
- data/bin/commands/groups.rb +0 -172
- data/bin/commands/im.rb +0 -67
- data/bin/commands/mpim.rb +0 -63
- data/bin/commands.rb +0 -33
- data/examples/hi_real_time/hi.gif +0 -0
- data/examples/hi_real_time/hi.rb +0 -37
- data/examples/hi_real_time_async_celluloid/Gemfile +0 -6
- data/examples/hi_real_time_async_celluloid/hi.rb +0 -36
- data/examples/hi_real_time_async_eventmachine/Procfile +0 -2
- data/lib/slack/real_time/concurrency/celluloid.rb +0 -117
- data/lib/slack/real_time/concurrency/eventmachine.rb +0 -60
- data/lib/slack/web/api/endpoints/apps_permissions.rb +0 -35
- data/lib/slack/web/api/endpoints/channels.rb +0 -265
- data/lib/slack/web/api/endpoints/groups.rb +0 -255
- data/lib/slack/web/api/endpoints/im.rb +0 -113
- data/lib/slack/web/api/endpoints/mpim.rb +0 -98
- data/lib/slack/web/api/endpoints/presence.rb +0 -23
- data/lib/slack/web/api/mixins/channels.id.json +0 -20
- data/lib/slack/web/api/mixins/channels.id.rb +0 -26
- data/lib/slack/web/api/mixins/groups.id.json +0 -20
- data/lib/slack/web/api/mixins/groups.id.rb +0 -26
- data/lib/slack/web/api/patches/chat.1.text-attachments-required.patch +0 -13
- data/lib/slack/web/api/patches/chat.2.attachments-json.patch +0 -17
- data/lib/slack/web/api/patches/chat.3.update-attachments-support.patch +0 -21
- data/lib/slack/web/api/patches/chat.4.postEphemeral-attachments-support.patch +0 -17
- data/lib/slack/web/api/patches/dialog.1.open-json-support.patch +0 -17
- data/lib/slack/web/api/templates/commands.erb +0 -5
- data/screenshots/register-bot.png +0 -0
- data/spec/fixtures/slack/web/429_error.yml +0 -85
- data/spec/fixtures/slack/web/auth_test_error.yml +0 -48
- data/spec/fixtures/slack/web/auth_test_success.yml +0 -57
- data/spec/fixtures/slack/web/channels_info.yml +0 -46
- data/spec/fixtures/slack/web/groups_info.yml +0 -43
- data/spec/fixtures/slack/web/paginated_users_list.yml +0 -181
- data/spec/fixtures/slack/web/rtm_connect.yml +0 -70
- data/spec/fixtures/slack/web/rtm_start.yml +0 -104
- data/spec/fixtures/slack/web/users_info.yml +0 -130
- data/spec/fixtures/slack/web/users_list.yml +0 -72
- data/spec/integration/integration_spec.rb +0 -139
- data/spec/slack/config_spec.rb +0 -14
- data/spec/slack/messages/formatting_spec.rb +0 -43
- data/spec/slack/real_time/api/message_spec.rb +0 -15
- data/spec/slack/real_time/api/ping_spec.rb +0 -15
- data/spec/slack/real_time/api/typing_spec.rb +0 -15
- data/spec/slack/real_time/client_spec.rb +0 -425
- data/spec/slack/real_time/concurrency/celluloid_spec.rb +0 -62
- data/spec/slack/real_time/concurrency/eventmachine_spec.rb +0 -47
- data/spec/slack/real_time/concurrency/it_behaves_like_a_realtime_socket.rb +0 -19
- data/spec/slack/real_time/event_handlers/bot_spec.rb +0 -44
- data/spec/slack/real_time/event_handlers/channel_spec.rb +0 -116
- data/spec/slack/real_time/event_handlers/event_handlers_spec.rb +0 -15
- data/spec/slack/real_time/event_handlers/group_spec.rb +0 -90
- data/spec/slack/real_time/event_handlers/im_spec.rb +0 -47
- data/spec/slack/real_time/event_handlers/team_spec.rb +0 -62
- data/spec/slack/real_time/event_handlers/user_spec.rb +0 -63
- data/spec/slack/real_time/rtm_connect_spec.rb +0 -13
- data/spec/slack/real_time/rtm_start_spec.rb +0 -13
- data/spec/slack/real_time/store_spec.rb +0 -11
- data/spec/slack/slack_spec.rb +0 -58
- data/spec/slack/version_spec.rb +0 -7
- data/spec/slack/web/api/endpoints/api_spec.rb +0 -7
- data/spec/slack/web/api/endpoints/apps_permissions_spec.rb +0 -15
- data/spec/slack/web/api/endpoints/bots_spec.rb +0 -7
- data/spec/slack/web/api/endpoints/conversations_spec.rb +0 -100
- data/spec/slack/web/api/endpoints/custom_specs/auth_spec.rb +0 -25
- data/spec/slack/web/api/endpoints/custom_specs/channels_spec.rb +0 -11
- data/spec/slack/web/api/endpoints/custom_specs/chat_spec.rb +0 -105
- data/spec/slack/web/api/endpoints/custom_specs/dialog_spec.rb +0 -28
- data/spec/slack/web/api/endpoints/custom_specs/groups_spec.rb +0 -11
- data/spec/slack/web/api/endpoints/custom_specs/users_spec.rb +0 -33
- data/spec/slack/web/api/endpoints/dnd_spec.rb +0 -12
- data/spec/slack/web/api/endpoints/emoji_spec.rb +0 -7
- data/spec/slack/web/api/endpoints/files_comments_spec.rb +0 -34
- data/spec/slack/web/api/endpoints/files_spec.rb +0 -43
- data/spec/slack/web/api/endpoints/im_spec.rb +0 -38
- data/spec/slack/web/api/endpoints/migration_spec.rb +0 -12
- data/spec/slack/web/api/endpoints/mpim_spec.rb +0 -38
- data/spec/slack/web/api/endpoints/oauth_spec.rb +0 -29
- data/spec/slack/web/api/endpoints/pins_spec.rb +0 -22
- data/spec/slack/web/api/endpoints/reactions_spec.rb +0 -17
- data/spec/slack/web/api/endpoints/reminders_spec.rb +0 -30
- data/spec/slack/web/api/endpoints/rtm_spec.rb +0 -7
- data/spec/slack/web/api/endpoints/search_spec.rb +0 -22
- data/spec/slack/web/api/endpoints/stars_spec.rb +0 -7
- data/spec/slack/web/api/endpoints/team_profile_spec.rb +0 -7
- data/spec/slack/web/api/endpoints/team_spec.rb +0 -7
- data/spec/slack/web/api/endpoints/usergroups_spec.rb +0 -27
- data/spec/slack/web/api/endpoints/usergroups_users_spec.rb +0 -20
- data/spec/slack/web/api/endpoints/users_admin_spec.rb +0 -17
- data/spec/slack/web/api/endpoints/users_prefs_spec.rb +0 -7
- data/spec/slack/web/api/endpoints/users_profile_spec.rb +0 -7
- data/spec/slack/web/api/error_spec.rb +0 -14
- data/spec/slack/web/api/errors/slack_error_spec.rb +0 -14
- data/spec/slack/web/api/mixins/channels_spec.rb +0 -31
- data/spec/slack/web/api/mixins/groups_spec.rb +0 -31
- data/spec/slack/web/api/mixins/users_spec.rb +0 -39
- data/spec/slack/web/api/pagination/cursor_spec.rb +0 -70
- data/spec/slack/web/client_spec.rb +0 -174
- data/spec/spec_helper.rb +0 -14
- data/spec/support/queue_with_timeout.rb +0 -34
- data/spec/support/real_time/concurrency/mock.rb +0 -30
- data/spec/support/real_time/connected_client.rb +0 -21
- data/spec/support/real_time/event.rb +0 -11
- data/spec/support/token.rb +0 -10
- data/spec/support/vcr.rb +0 -9
- /data/examples/{hi_real_time_async_celluloid → hi_real_time_async_async}/Procfile +0 -0
@@ -0,0 +1,397 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file was auto-generated by lib/tasks/web.rake
|
3
|
+
|
4
|
+
module Slack
|
5
|
+
module Web
|
6
|
+
module Api
|
7
|
+
module Endpoints
|
8
|
+
module AdminConversations
|
9
|
+
#
|
10
|
+
# Archive a public or private channel.
|
11
|
+
#
|
12
|
+
# @option options [Object] :channel_id
|
13
|
+
# The channel to archive.
|
14
|
+
# @see https://api.slack.com/methods/admin.conversations.archive
|
15
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations/admin.conversations.archive.json
|
16
|
+
def admin_conversations_archive(options = {})
|
17
|
+
raise ArgumentError, 'Required arguments :channel_id missing' if options[:channel_id].nil?
|
18
|
+
post('admin.conversations.archive', options)
|
19
|
+
end
|
20
|
+
|
21
|
+
#
|
22
|
+
# Archive public or private channels in bulk.
|
23
|
+
#
|
24
|
+
# @option options [array] :channel_ids
|
25
|
+
# An array of channel IDs to archive. No more than 100 items are allowed.
|
26
|
+
# @see https://api.slack.com/methods/admin.conversations.bulkArchive
|
27
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations/admin.conversations.bulkArchive.json
|
28
|
+
def admin_conversations_bulkArchive(options = {})
|
29
|
+
raise ArgumentError, 'Required arguments :channel_ids missing' if options[:channel_ids].nil?
|
30
|
+
post('admin.conversations.bulkArchive', options)
|
31
|
+
end
|
32
|
+
|
33
|
+
#
|
34
|
+
# Delete public or private channels in bulk
|
35
|
+
#
|
36
|
+
# @option options [array] :channel_ids
|
37
|
+
# An array of channel IDs.
|
38
|
+
# @see https://api.slack.com/methods/admin.conversations.bulkDelete
|
39
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations/admin.conversations.bulkDelete.json
|
40
|
+
def admin_conversations_bulkDelete(options = {})
|
41
|
+
raise ArgumentError, 'Required arguments :channel_ids missing' if options[:channel_ids].nil?
|
42
|
+
post('admin.conversations.bulkDelete', options)
|
43
|
+
end
|
44
|
+
|
45
|
+
#
|
46
|
+
# Move public or private channels in bulk.
|
47
|
+
#
|
48
|
+
# @option options [array] :channel_ids
|
49
|
+
# An array of channel IDs.
|
50
|
+
# @option options [string] :target_team_id
|
51
|
+
# Target team ID.
|
52
|
+
# @see https://api.slack.com/methods/admin.conversations.bulkMove
|
53
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations/admin.conversations.bulkMove.json
|
54
|
+
def admin_conversations_bulkMove(options = {})
|
55
|
+
raise ArgumentError, 'Required arguments :channel_ids missing' if options[:channel_ids].nil?
|
56
|
+
raise ArgumentError, 'Required arguments :target_team_id missing' if options[:target_team_id].nil?
|
57
|
+
post('admin.conversations.bulkMove', options)
|
58
|
+
end
|
59
|
+
|
60
|
+
#
|
61
|
+
# Convert a public channel to a private channel.
|
62
|
+
#
|
63
|
+
# @option options [Object] :channel_id
|
64
|
+
# The channel to convert to private.
|
65
|
+
# @option options [string] :name
|
66
|
+
# Name of private channel to create. Only respected when converting an MPIM.
|
67
|
+
# @see https://api.slack.com/methods/admin.conversations.convertToPrivate
|
68
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations/admin.conversations.convertToPrivate.json
|
69
|
+
def admin_conversations_convertToPrivate(options = {})
|
70
|
+
raise ArgumentError, 'Required arguments :channel_id missing' if options[:channel_id].nil?
|
71
|
+
post('admin.conversations.convertToPrivate', options)
|
72
|
+
end
|
73
|
+
|
74
|
+
#
|
75
|
+
# Convert a private channel to a public channel.
|
76
|
+
#
|
77
|
+
# @option options [Object] :channel_id
|
78
|
+
# The channel to convert to public.
|
79
|
+
# @see https://api.slack.com/methods/admin.conversations.convertToPublic
|
80
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations/admin.conversations.convertToPublic.json
|
81
|
+
def admin_conversations_convertToPublic(options = {})
|
82
|
+
raise ArgumentError, 'Required arguments :channel_id missing' if options[:channel_id].nil?
|
83
|
+
post('admin.conversations.convertToPublic', options)
|
84
|
+
end
|
85
|
+
|
86
|
+
#
|
87
|
+
# Create a public or private channel-based conversation.
|
88
|
+
#
|
89
|
+
# @option options [boolean] :is_private
|
90
|
+
# When true, creates a private channel instead of a public channel.
|
91
|
+
# @option options [string] :name
|
92
|
+
# Name of the public or private channel to create.
|
93
|
+
# @option options [string] :description
|
94
|
+
# Description of the public or private channel to create.
|
95
|
+
# @option options [boolean] :org_wide
|
96
|
+
# When true, the channel will be available org-wide. Note: if the channel is not org_wide=true, you must specify a team_id for this channel.
|
97
|
+
# @option options [Object] :team_id
|
98
|
+
# The workspace to create the channel in. Note: this argument is required unless you set org_wide=true.
|
99
|
+
# @see https://api.slack.com/methods/admin.conversations.create
|
100
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations/admin.conversations.create.json
|
101
|
+
def admin_conversations_create(options = {})
|
102
|
+
raise ArgumentError, 'Required arguments :is_private missing' if options[:is_private].nil?
|
103
|
+
raise ArgumentError, 'Required arguments :name missing' if options[:name].nil?
|
104
|
+
post('admin.conversations.create', options)
|
105
|
+
end
|
106
|
+
|
107
|
+
#
|
108
|
+
# Create a Salesforce channel for the corresponding object provided.
|
109
|
+
#
|
110
|
+
# @option options [string] :object_id
|
111
|
+
# Object / Record ID (15 or 18 digit accepted). See here for how to look up an ID.
|
112
|
+
# @option options [string] :salesforce_org_id
|
113
|
+
# Salesforce org ID (15 or 18 digit accepted). See here for how to look up Salesforce org ID.
|
114
|
+
# @option options [boolean] :invite_object_team
|
115
|
+
# Optional flag to add all team members related to the object to the newly created Salesforce channel. When true, adds a maximum of 100 team members to the channel.
|
116
|
+
# @see https://api.slack.com/methods/admin.conversations.createForObjects
|
117
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations/admin.conversations.createForObjects.json
|
118
|
+
def admin_conversations_createForObjects(options = {})
|
119
|
+
raise ArgumentError, 'Required arguments :object_id missing' if options[:object_id].nil?
|
120
|
+
raise ArgumentError, 'Required arguments :salesforce_org_id missing' if options[:salesforce_org_id].nil?
|
121
|
+
post('admin.conversations.createForObjects', options)
|
122
|
+
end
|
123
|
+
|
124
|
+
#
|
125
|
+
# Delete a public or private channel.
|
126
|
+
#
|
127
|
+
# @option options [Object] :channel_id
|
128
|
+
# The channel to delete.
|
129
|
+
# @see https://api.slack.com/methods/admin.conversations.delete
|
130
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations/admin.conversations.delete.json
|
131
|
+
def admin_conversations_delete(options = {})
|
132
|
+
raise ArgumentError, 'Required arguments :channel_id missing' if options[:channel_id].nil?
|
133
|
+
post('admin.conversations.delete', options)
|
134
|
+
end
|
135
|
+
|
136
|
+
#
|
137
|
+
# Disconnect a connected channel from one or more workspaces.
|
138
|
+
#
|
139
|
+
# @option options [Object] :channel_id
|
140
|
+
# The channel to be disconnected from some workspaces.
|
141
|
+
# @option options [array] :leaving_team_ids
|
142
|
+
# team IDs getting removed from the channel, optional if there are only two teams in the channel.
|
143
|
+
# @see https://api.slack.com/methods/admin.conversations.disconnectShared
|
144
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations/admin.conversations.disconnectShared.json
|
145
|
+
def admin_conversations_disconnectShared(options = {})
|
146
|
+
raise ArgumentError, 'Required arguments :channel_id missing' if options[:channel_id].nil?
|
147
|
+
post('admin.conversations.disconnectShared', options)
|
148
|
+
end
|
149
|
+
|
150
|
+
#
|
151
|
+
# Get conversation preferences for a public or private channel.
|
152
|
+
#
|
153
|
+
# @option options [Object] :channel_id
|
154
|
+
# The channel to get preferences for.
|
155
|
+
# @see https://api.slack.com/methods/admin.conversations.getConversationPrefs
|
156
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations/admin.conversations.getConversationPrefs.json
|
157
|
+
def admin_conversations_getConversationPrefs(options = {})
|
158
|
+
raise ArgumentError, 'Required arguments :channel_id missing' if options[:channel_id].nil?
|
159
|
+
post('admin.conversations.getConversationPrefs', options)
|
160
|
+
end
|
161
|
+
|
162
|
+
#
|
163
|
+
# This API endpoint can be used by any admin to get a conversation's retention policy.
|
164
|
+
#
|
165
|
+
# @option options [string] :channel_id
|
166
|
+
# The conversation to get the retention policy for.
|
167
|
+
# @see https://api.slack.com/methods/admin.conversations.getCustomRetention
|
168
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations/admin.conversations.getCustomRetention.json
|
169
|
+
def admin_conversations_getCustomRetention(options = {})
|
170
|
+
raise ArgumentError, 'Required arguments :channel_id missing' if options[:channel_id].nil?
|
171
|
+
post('admin.conversations.getCustomRetention', options)
|
172
|
+
end
|
173
|
+
|
174
|
+
#
|
175
|
+
# Get all the workspaces a given public or private channel is connected to within this Enterprise org.
|
176
|
+
#
|
177
|
+
# @option options [Object] :channel_id
|
178
|
+
# The channel to determine connected workspaces within the organization for.
|
179
|
+
# @option options [string] :cursor
|
180
|
+
# Set cursor to next_cursor returned by the previous call to list items in the next page.
|
181
|
+
# @option options [integer] :limit
|
182
|
+
# The maximum number of items to return. Must be between 1 - 1000 both inclusive.
|
183
|
+
# @see https://api.slack.com/methods/admin.conversations.getTeams
|
184
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations/admin.conversations.getTeams.json
|
185
|
+
def admin_conversations_getTeams(options = {})
|
186
|
+
raise ArgumentError, 'Required arguments :channel_id missing' if options[:channel_id].nil?
|
187
|
+
if block_given?
|
188
|
+
Pagination::Cursor.new(self, :admin_conversations_getTeams, options).each do |page|
|
189
|
+
yield page
|
190
|
+
end
|
191
|
+
else
|
192
|
+
post('admin.conversations.getTeams', options)
|
193
|
+
end
|
194
|
+
end
|
195
|
+
|
196
|
+
#
|
197
|
+
# Invite a user to a public or private channel.
|
198
|
+
#
|
199
|
+
# @option options [Object] :channel_id
|
200
|
+
# The channel that the users will be invited to.
|
201
|
+
# @option options [array] :user_ids
|
202
|
+
# The users to invite.
|
203
|
+
# @see https://api.slack.com/methods/admin.conversations.invite
|
204
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations/admin.conversations.invite.json
|
205
|
+
def admin_conversations_invite(options = {})
|
206
|
+
raise ArgumentError, 'Required arguments :channel_id missing' if options[:channel_id].nil?
|
207
|
+
raise ArgumentError, 'Required arguments :user_ids missing' if options[:user_ids].nil?
|
208
|
+
post('admin.conversations.invite', options)
|
209
|
+
end
|
210
|
+
|
211
|
+
#
|
212
|
+
# Link a Salesforce record to a channel
|
213
|
+
#
|
214
|
+
# @option options [channel] :channel
|
215
|
+
# Channel ID for Slack channel that will be linked to a Salesforce record.
|
216
|
+
# @option options [string] :record_id
|
217
|
+
# Salesforce record ID (15 or 18 digit accepted). See here for how to look up record ID.
|
218
|
+
# @option options [string] :salesforce_org_id
|
219
|
+
# Salesforce org ID (15 or 18 digit accepted). See here for how to look up Salesforce org ID.
|
220
|
+
# @see https://api.slack.com/methods/admin.conversations.linkObjects
|
221
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations/admin.conversations.linkObjects.json
|
222
|
+
def admin_conversations_linkObjects(options = {})
|
223
|
+
raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
|
224
|
+
raise ArgumentError, 'Required arguments :record_id missing' if options[:record_id].nil?
|
225
|
+
raise ArgumentError, 'Required arguments :salesforce_org_id missing' if options[:salesforce_org_id].nil?
|
226
|
+
options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
|
227
|
+
post('admin.conversations.linkObjects', options)
|
228
|
+
end
|
229
|
+
|
230
|
+
#
|
231
|
+
# Returns channels on the given team using the filters.
|
232
|
+
#
|
233
|
+
# @option options [integer] :last_message_activity_before
|
234
|
+
# Filter by public channels where the most recent message was sent before last_message_activity.
|
235
|
+
# @option options [array] :team_ids
|
236
|
+
# Array of team IDs to filter by.
|
237
|
+
# @option options [string] :cursor
|
238
|
+
# Set cursor to next_cursor returned in the previous call, to fetch the next page.
|
239
|
+
# @option options [integer] :limit
|
240
|
+
# Maximum number of results.
|
241
|
+
# @option options [integer] :max_member_count
|
242
|
+
# Filter by public channels with member count equal to or less than the specified number.
|
243
|
+
# @see https://api.slack.com/methods/admin.conversations.lookup
|
244
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations/admin.conversations.lookup.json
|
245
|
+
def admin_conversations_lookup(options = {})
|
246
|
+
raise ArgumentError, 'Required arguments :last_message_activity_before missing' if options[:last_message_activity_before].nil?
|
247
|
+
raise ArgumentError, 'Required arguments :team_ids missing' if options[:team_ids].nil?
|
248
|
+
if block_given?
|
249
|
+
Pagination::Cursor.new(self, :admin_conversations_lookup, options).each do |page|
|
250
|
+
yield page
|
251
|
+
end
|
252
|
+
else
|
253
|
+
post('admin.conversations.lookup', options)
|
254
|
+
end
|
255
|
+
end
|
256
|
+
|
257
|
+
#
|
258
|
+
# This API endpoint can be used by any admin to remove a conversation's retention policy.
|
259
|
+
#
|
260
|
+
# @option options [string] :channel_id
|
261
|
+
# The conversation to set the retention policy for.
|
262
|
+
# @see https://api.slack.com/methods/admin.conversations.removeCustomRetention
|
263
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations/admin.conversations.removeCustomRetention.json
|
264
|
+
def admin_conversations_removeCustomRetention(options = {})
|
265
|
+
raise ArgumentError, 'Required arguments :channel_id missing' if options[:channel_id].nil?
|
266
|
+
post('admin.conversations.removeCustomRetention', options)
|
267
|
+
end
|
268
|
+
|
269
|
+
#
|
270
|
+
# Rename a public or private channel.
|
271
|
+
#
|
272
|
+
# @option options [Object] :channel_id
|
273
|
+
# The channel to rename.
|
274
|
+
# @option options [string] :name
|
275
|
+
# .
|
276
|
+
# @see https://api.slack.com/methods/admin.conversations.rename
|
277
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations/admin.conversations.rename.json
|
278
|
+
def admin_conversations_rename(options = {})
|
279
|
+
raise ArgumentError, 'Required arguments :channel_id missing' if options[:channel_id].nil?
|
280
|
+
raise ArgumentError, 'Required arguments :name missing' if options[:name].nil?
|
281
|
+
post('admin.conversations.rename', options)
|
282
|
+
end
|
283
|
+
|
284
|
+
#
|
285
|
+
# Search for public or private channels in an Enterprise organization.
|
286
|
+
#
|
287
|
+
# @option options [array] :connected_team_ids
|
288
|
+
# Array of encoded team IDs, signifying the external orgs to search through.
|
289
|
+
# @option options [string] :cursor
|
290
|
+
# Set cursor to next_cursor returned by the previous call to list items in the next page.
|
291
|
+
# @option options [integer] :limit
|
292
|
+
# Maximum number of items to be returned. Must be between 1 - 20 both inclusive. Default is 10.
|
293
|
+
# @option options [string] :query
|
294
|
+
# Name of the the channel to query by.
|
295
|
+
# @option options [array] :search_channel_types
|
296
|
+
# The type of channel to include or exclude in the search. For example private will search private channels, while private_exclude will exclude them. For a full list of types, check the Types section.
|
297
|
+
# @option options [string] :sort
|
298
|
+
# Possible values are relevant (search ranking based on what we think is closest), name (alphabetical), member_count (number of users in the channel), and created (date channel was created). You can optionally pair this with the sort_dir arg to change how it is sorted.
|
299
|
+
# @option options [string] :sort_dir
|
300
|
+
# 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).
|
301
|
+
# @option options [array] :team_ids
|
302
|
+
# Comma separated string of team IDs, signifying the internal workspaces to search through.
|
303
|
+
# @option options [boolean] :total_count_only
|
304
|
+
# Only return the total_count of channels. Omits channel data and allows access for admins without channel manager permissions.
|
305
|
+
# @see https://api.slack.com/methods/admin.conversations.search
|
306
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations/admin.conversations.search.json
|
307
|
+
def admin_conversations_search(options = {})
|
308
|
+
if block_given?
|
309
|
+
Pagination::Cursor.new(self, :admin_conversations_search, options).each do |page|
|
310
|
+
yield page
|
311
|
+
end
|
312
|
+
else
|
313
|
+
post('admin.conversations.search', options)
|
314
|
+
end
|
315
|
+
end
|
316
|
+
|
317
|
+
#
|
318
|
+
# Set the posting permissions for a public or private channel.
|
319
|
+
#
|
320
|
+
# @option options [string] :channel_id
|
321
|
+
# The channel to set the prefs for.
|
322
|
+
# @option options [string] :prefs
|
323
|
+
# The prefs for this channel in a stringified JSON format.
|
324
|
+
# @see https://api.slack.com/methods/admin.conversations.setConversationPrefs
|
325
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations/admin.conversations.setConversationPrefs.json
|
326
|
+
def admin_conversations_setConversationPrefs(options = {})
|
327
|
+
raise ArgumentError, 'Required arguments :channel_id missing' if options[:channel_id].nil?
|
328
|
+
raise ArgumentError, 'Required arguments :prefs missing' if options[:prefs].nil?
|
329
|
+
options = encode_options_as_json(options, %i[prefs])
|
330
|
+
post('admin.conversations.setConversationPrefs', options)
|
331
|
+
end
|
332
|
+
|
333
|
+
#
|
334
|
+
# This API endpoint can be used by any admin to set a conversation's retention policy.
|
335
|
+
#
|
336
|
+
# @option options [string] :channel_id
|
337
|
+
# The conversation to set the retention policy for.
|
338
|
+
# @option options [integer] :duration_days
|
339
|
+
# The message retention duration in days to set for this conversation.
|
340
|
+
# @see https://api.slack.com/methods/admin.conversations.setCustomRetention
|
341
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations/admin.conversations.setCustomRetention.json
|
342
|
+
def admin_conversations_setCustomRetention(options = {})
|
343
|
+
raise ArgumentError, 'Required arguments :channel_id missing' if options[:channel_id].nil?
|
344
|
+
raise ArgumentError, 'Required arguments :duration_days missing' if options[:duration_days].nil?
|
345
|
+
post('admin.conversations.setCustomRetention', options)
|
346
|
+
end
|
347
|
+
|
348
|
+
#
|
349
|
+
# Set the workspaces in an Enterprise grid org that connect to a public or private channel.
|
350
|
+
#
|
351
|
+
# @option options [string] :channel_id
|
352
|
+
# The encoded channel_id to add or remove to workspaces.
|
353
|
+
# @option options [boolean] :org_channel
|
354
|
+
# True if channel has to be converted to an org channel.
|
355
|
+
# @option options [array] :target_team_ids
|
356
|
+
# A comma-separated list of workspaces to which the channel should be shared. Not required if the channel is being shared org-wide.
|
357
|
+
# @option options [Object] :team_id
|
358
|
+
# The workspace to which the channel belongs if the channel is a local workspace channel. Omit this argument if the channel is a cross-workspace or org-wide shared channel.
|
359
|
+
# @see https://api.slack.com/methods/admin.conversations.setTeams
|
360
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations/admin.conversations.setTeams.json
|
361
|
+
def admin_conversations_setTeams(options = {})
|
362
|
+
raise ArgumentError, 'Required arguments :channel_id missing' if options[:channel_id].nil?
|
363
|
+
post('admin.conversations.setTeams', options)
|
364
|
+
end
|
365
|
+
|
366
|
+
#
|
367
|
+
# Unarchive a public or private channel.
|
368
|
+
#
|
369
|
+
# @option options [Object] :channel_id
|
370
|
+
# The channel to unarchive.
|
371
|
+
# @see https://api.slack.com/methods/admin.conversations.unarchive
|
372
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations/admin.conversations.unarchive.json
|
373
|
+
def admin_conversations_unarchive(options = {})
|
374
|
+
raise ArgumentError, 'Required arguments :channel_id missing' if options[:channel_id].nil?
|
375
|
+
post('admin.conversations.unarchive', options)
|
376
|
+
end
|
377
|
+
|
378
|
+
#
|
379
|
+
# Unlink a Salesforce record from a channel
|
380
|
+
#
|
381
|
+
# @option options [channel] :channel
|
382
|
+
# Channel ID for Slack channel that will be unlinked from the Salesforce record.
|
383
|
+
# @option options [string] :new_name
|
384
|
+
# Channel name you would like to give to the channel that is being unlinked from the Salesforce record.
|
385
|
+
# @see https://api.slack.com/methods/admin.conversations.unlinkObjects
|
386
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations/admin.conversations.unlinkObjects.json
|
387
|
+
def admin_conversations_unlinkObjects(options = {})
|
388
|
+
raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
|
389
|
+
raise ArgumentError, 'Required arguments :new_name missing' if options[:new_name].nil?
|
390
|
+
options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
|
391
|
+
post('admin.conversations.unlinkObjects', options)
|
392
|
+
end
|
393
|
+
end
|
394
|
+
end
|
395
|
+
end
|
396
|
+
end
|
397
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file was auto-generated by lib/tasks/web.rake
|
3
|
+
|
4
|
+
module Slack
|
5
|
+
module Web
|
6
|
+
module Api
|
7
|
+
module Endpoints
|
8
|
+
module AdminConversationsEkm
|
9
|
+
#
|
10
|
+
# List all disconnected channels—i.e., channels that were once connected to other workspaces and then disconnected—and the corresponding original channel IDs for key revocation with EKM.
|
11
|
+
#
|
12
|
+
# @option options [string] :channel_ids
|
13
|
+
# A comma-separated list of channels to filter to.
|
14
|
+
# @option options [string] :cursor
|
15
|
+
# Set cursor to next_cursor returned by the previous call to list items in the next page.
|
16
|
+
# @option options [integer] :limit
|
17
|
+
# The maximum number of items to return. Must be between 1 - 1000 both inclusive.
|
18
|
+
# @option options [string] :team_ids
|
19
|
+
# A comma-separated list of the workspaces to which the channels you would like returned belong.
|
20
|
+
# @see https://api.slack.com/methods/admin.conversations.ekm.listOriginalConnectedChannelInfo
|
21
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations.ekm/admin.conversations.ekm.listOriginalConnectedChannelInfo.json
|
22
|
+
def admin_conversations_ekm_listOriginalConnectedChannelInfo(options = {})
|
23
|
+
if block_given?
|
24
|
+
Pagination::Cursor.new(self, :admin_conversations_ekm_listOriginalConnectedChannelInfo, options).each do |page|
|
25
|
+
yield page
|
26
|
+
end
|
27
|
+
else
|
28
|
+
post('admin.conversations.ekm.listOriginalConnectedChannelInfo', options)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,61 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file was auto-generated by lib/tasks/web.rake
|
3
|
+
|
4
|
+
module Slack
|
5
|
+
module Web
|
6
|
+
module Api
|
7
|
+
module Endpoints
|
8
|
+
module AdminConversationsRestrictaccess
|
9
|
+
#
|
10
|
+
# Add an allowlist of IDP groups for accessing a channel
|
11
|
+
#
|
12
|
+
# @option options [Object] :channel_id
|
13
|
+
# The channel to link this group to.
|
14
|
+
# @option options [Object] :group_id
|
15
|
+
# The IDP Group ID to be an allowlist for the private channel.
|
16
|
+
# @option options [Object] :team_id
|
17
|
+
# The workspace where the channel exists. This argument is required for channels only tied to one workspace, and optional for channels that are shared across an organization.
|
18
|
+
# @see https://api.slack.com/methods/admin.conversations.restrictAccess.addGroup
|
19
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations.restrictAccess/admin.conversations.restrictAccess.addGroup.json
|
20
|
+
def admin_conversations_restrictAccess_addGroup(options = {})
|
21
|
+
raise ArgumentError, 'Required arguments :channel_id missing' if options[:channel_id].nil?
|
22
|
+
raise ArgumentError, 'Required arguments :group_id missing' if options[:group_id].nil?
|
23
|
+
post('admin.conversations.restrictAccess.addGroup', options)
|
24
|
+
end
|
25
|
+
|
26
|
+
#
|
27
|
+
# List all IDP Groups linked to a channel
|
28
|
+
#
|
29
|
+
# @option options [Object] :channel_id
|
30
|
+
# .
|
31
|
+
# @option options [Object] :team_id
|
32
|
+
# The workspace where the channel exists. This argument is required for channels only tied to one workspace, and optional for channels that are shared across an organization.
|
33
|
+
# @see https://api.slack.com/methods/admin.conversations.restrictAccess.listGroups
|
34
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations.restrictAccess/admin.conversations.restrictAccess.listGroups.json
|
35
|
+
def admin_conversations_restrictAccess_listGroups(options = {})
|
36
|
+
raise ArgumentError, 'Required arguments :channel_id missing' if options[:channel_id].nil?
|
37
|
+
post('admin.conversations.restrictAccess.listGroups', options)
|
38
|
+
end
|
39
|
+
|
40
|
+
#
|
41
|
+
# Remove a linked IDP group linked from a private channel
|
42
|
+
#
|
43
|
+
# @option options [Object] :channel_id
|
44
|
+
# The channel to remove the linked group from.
|
45
|
+
# @option options [Object] :group_id
|
46
|
+
# The IDP Group ID to remove from the private channel.
|
47
|
+
# @option options [Object] :team_id
|
48
|
+
# The workspace where the channel exists. This argument is required for channels only tied to one workspace, and optional for channels that are shared across an organization.
|
49
|
+
# @see https://api.slack.com/methods/admin.conversations.restrictAccess.removeGroup
|
50
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.conversations.restrictAccess/admin.conversations.restrictAccess.removeGroup.json
|
51
|
+
def admin_conversations_restrictAccess_removeGroup(options = {})
|
52
|
+
raise ArgumentError, 'Required arguments :channel_id missing' if options[:channel_id].nil?
|
53
|
+
raise ArgumentError, 'Required arguments :group_id missing' if options[:group_id].nil?
|
54
|
+
raise ArgumentError, 'Required arguments :team_id missing' if options[:team_id].nil?
|
55
|
+
post('admin.conversations.restrictAccess.removeGroup', options)
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
@@ -0,0 +1,88 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file was auto-generated by lib/tasks/web.rake
|
3
|
+
|
4
|
+
module Slack
|
5
|
+
module Web
|
6
|
+
module Api
|
7
|
+
module Endpoints
|
8
|
+
module AdminEmoji
|
9
|
+
#
|
10
|
+
# Add an emoji.
|
11
|
+
#
|
12
|
+
# @option options [string] :name
|
13
|
+
# 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.
|
14
|
+
# @option options [string] :url
|
15
|
+
# The URL of a file to use as an image for the emoji. Square images under 128KB and with transparent backgrounds work best.
|
16
|
+
# @see https://api.slack.com/methods/admin.emoji.add
|
17
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.emoji/admin.emoji.add.json
|
18
|
+
def admin_emoji_add(options = {})
|
19
|
+
raise ArgumentError, 'Required arguments :name missing' if options[:name].nil?
|
20
|
+
raise ArgumentError, 'Required arguments :url missing' if options[:url].nil?
|
21
|
+
post('admin.emoji.add', options)
|
22
|
+
end
|
23
|
+
|
24
|
+
#
|
25
|
+
# Add an emoji alias.
|
26
|
+
#
|
27
|
+
# @option options [string] :alias_for
|
28
|
+
# Name of the emoji for which the alias is being made. Any wrapping whitespace or colons will be automatically trimmed.
|
29
|
+
# @option options [string] :name
|
30
|
+
# The new alias for the specified emoji. Any wrapping whitespace or colons will be automatically trimmed.
|
31
|
+
# @see https://api.slack.com/methods/admin.emoji.addAlias
|
32
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.emoji/admin.emoji.addAlias.json
|
33
|
+
def admin_emoji_addAlias(options = {})
|
34
|
+
raise ArgumentError, 'Required arguments :alias_for missing' if options[:alias_for].nil?
|
35
|
+
raise ArgumentError, 'Required arguments :name missing' if options[:name].nil?
|
36
|
+
post('admin.emoji.addAlias', options)
|
37
|
+
end
|
38
|
+
|
39
|
+
#
|
40
|
+
# List emoji for an Enterprise Grid organization.
|
41
|
+
#
|
42
|
+
# @option options [string] :cursor
|
43
|
+
# Set cursor to next_cursor returned by the previous call to list items in the next page.
|
44
|
+
# @option options [integer] :limit
|
45
|
+
# The maximum number of items to return. Must be between 1 - 1000 both inclusive.
|
46
|
+
# @see https://api.slack.com/methods/admin.emoji.list
|
47
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.emoji/admin.emoji.list.json
|
48
|
+
def admin_emoji_list(options = {})
|
49
|
+
if block_given?
|
50
|
+
Pagination::Cursor.new(self, :admin_emoji_list, options).each do |page|
|
51
|
+
yield page
|
52
|
+
end
|
53
|
+
else
|
54
|
+
post('admin.emoji.list', options)
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
#
|
59
|
+
# Remove an emoji across an Enterprise Grid organization
|
60
|
+
#
|
61
|
+
# @option options [string] :name
|
62
|
+
# The name of the emoji to be removed. Colons (:myemoji:) around the value are not required, although they may be included.
|
63
|
+
# @see https://api.slack.com/methods/admin.emoji.remove
|
64
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.emoji/admin.emoji.remove.json
|
65
|
+
def admin_emoji_remove(options = {})
|
66
|
+
raise ArgumentError, 'Required arguments :name missing' if options[:name].nil?
|
67
|
+
post('admin.emoji.remove', options)
|
68
|
+
end
|
69
|
+
|
70
|
+
#
|
71
|
+
# Rename an emoji.
|
72
|
+
#
|
73
|
+
# @option options [string] :name
|
74
|
+
# The name of the emoji to be renamed. Colons (:myemoji:) around the value are not required, although they may be included.
|
75
|
+
# @option options [string] :new_name
|
76
|
+
# The new name of the emoji.
|
77
|
+
# @see https://api.slack.com/methods/admin.emoji.rename
|
78
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.emoji/admin.emoji.rename.json
|
79
|
+
def admin_emoji_rename(options = {})
|
80
|
+
raise ArgumentError, 'Required arguments :name missing' if options[:name].nil?
|
81
|
+
raise ArgumentError, 'Required arguments :new_name missing' if options[:new_name].nil?
|
82
|
+
post('admin.emoji.rename', options)
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file was auto-generated by lib/tasks/web.rake
|
3
|
+
|
4
|
+
module Slack
|
5
|
+
module Web
|
6
|
+
module Api
|
7
|
+
module Endpoints
|
8
|
+
module AdminFunctions
|
9
|
+
#
|
10
|
+
# Look up functions by a set of apps
|
11
|
+
#
|
12
|
+
# @option options [array] :app_ids
|
13
|
+
# Comma-separated array of app IDs to get functions for; max 50.
|
14
|
+
# @option options [string] :cursor
|
15
|
+
# Set cursor to next_cursor returned by the previous call to list items in the next page.
|
16
|
+
# @option options [integer] :limit
|
17
|
+
# The number of results that will be returned by the API on each invocation. Must be between 1 and 1000, both inclusive.
|
18
|
+
# @option options [Object] :team_id
|
19
|
+
# The team context to retrieve functions from.
|
20
|
+
# @see https://api.slack.com/methods/admin.functions.list
|
21
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.functions/admin.functions.list.json
|
22
|
+
def admin_functions_list(options = {})
|
23
|
+
raise ArgumentError, 'Required arguments :app_ids missing' if options[:app_ids].nil?
|
24
|
+
if block_given?
|
25
|
+
Pagination::Cursor.new(self, :admin_functions_list, options).each do |page|
|
26
|
+
yield page
|
27
|
+
end
|
28
|
+
else
|
29
|
+
post('admin.functions.list', options)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file was auto-generated by lib/tasks/web.rake
|
3
|
+
|
4
|
+
module Slack
|
5
|
+
module Web
|
6
|
+
module Api
|
7
|
+
module Endpoints
|
8
|
+
module AdminFunctionsPermissions
|
9
|
+
#
|
10
|
+
# Lookup the visibility of multiple Slack functions and include the users if it is limited to particular named entities.
|
11
|
+
#
|
12
|
+
# @option options [array] :function_ids
|
13
|
+
# An array of function IDs to get permissions for.
|
14
|
+
# @see https://api.slack.com/methods/admin.functions.permissions.lookup
|
15
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.functions.permissions/admin.functions.permissions.lookup.json
|
16
|
+
def admin_functions_permissions_lookup(options = {})
|
17
|
+
raise ArgumentError, 'Required arguments :function_ids missing' if options[:function_ids].nil?
|
18
|
+
post('admin.functions.permissions.lookup', options)
|
19
|
+
end
|
20
|
+
|
21
|
+
#
|
22
|
+
# Set the visibility of a Slack function and define the users or workspaces if it is set to named_entities
|
23
|
+
#
|
24
|
+
# @option options [string] :function_id
|
25
|
+
# The function ID to set permissions for.
|
26
|
+
# @option options [enum] :visibility
|
27
|
+
# The function visibility.
|
28
|
+
# @option options [array] :user_ids
|
29
|
+
# List of user IDs to allow for named_entities visibility.
|
30
|
+
# @see https://api.slack.com/methods/admin.functions.permissions.set
|
31
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.functions.permissions/admin.functions.permissions.set.json
|
32
|
+
def admin_functions_permissions_set(options = {})
|
33
|
+
raise ArgumentError, 'Required arguments :function_id missing' if options[:function_id].nil?
|
34
|
+
raise ArgumentError, 'Required arguments :visibility missing' if options[:visibility].nil?
|
35
|
+
post('admin.functions.permissions.set', options)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|