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,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 AdminInviterequests
|
9
|
+
#
|
10
|
+
# Approve a workspace invite request.
|
11
|
+
#
|
12
|
+
# @option options [string] :invite_request_id
|
13
|
+
# ID of the request to invite.
|
14
|
+
# @option options [string] :team_id
|
15
|
+
# ID for the workspace where the invite request was made.
|
16
|
+
# @see https://api.slack.com/methods/admin.inviteRequests.approve
|
17
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.inviteRequests/admin.inviteRequests.approve.json
|
18
|
+
def admin_inviteRequests_approve(options = {})
|
19
|
+
raise ArgumentError, 'Required arguments :invite_request_id missing' if options[:invite_request_id].nil?
|
20
|
+
post('admin.inviteRequests.approve', options)
|
21
|
+
end
|
22
|
+
|
23
|
+
#
|
24
|
+
# Deny a workspace invite request.
|
25
|
+
#
|
26
|
+
# @option options [string] :invite_request_id
|
27
|
+
# ID of the request to invite.
|
28
|
+
# @option options [string] :team_id
|
29
|
+
# ID for the workspace where the invite request was made.
|
30
|
+
# @see https://api.slack.com/methods/admin.inviteRequests.deny
|
31
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.inviteRequests/admin.inviteRequests.deny.json
|
32
|
+
def admin_inviteRequests_deny(options = {})
|
33
|
+
raise ArgumentError, 'Required arguments :invite_request_id missing' if options[:invite_request_id].nil?
|
34
|
+
post('admin.inviteRequests.deny', options)
|
35
|
+
end
|
36
|
+
|
37
|
+
#
|
38
|
+
# List all pending workspace invite requests.
|
39
|
+
#
|
40
|
+
# @option options [string] :cursor
|
41
|
+
# Value of the next_cursor field sent as part of the previous API response.
|
42
|
+
# @option options [integer] :limit
|
43
|
+
# The number of results that will be returned by the API on each invocation. Must be between 1 - 1000, both inclusive.
|
44
|
+
# @option options [string] :team_id
|
45
|
+
# ID for the workspace where the invite requests were made.
|
46
|
+
# @see https://api.slack.com/methods/admin.inviteRequests.list
|
47
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.inviteRequests/admin.inviteRequests.list.json
|
48
|
+
def admin_inviteRequests_list(options = {})
|
49
|
+
if block_given?
|
50
|
+
Pagination::Cursor.new(self, :admin_inviteRequests_list, options).each do |page|
|
51
|
+
yield page
|
52
|
+
end
|
53
|
+
else
|
54
|
+
post('admin.inviteRequests.list', options)
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
@@ -0,0 +1,33 @@
|
|
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 AdminInviterequestsApproved
|
9
|
+
#
|
10
|
+
# List all approved workspace invite requests.
|
11
|
+
#
|
12
|
+
# @option options [string] :cursor
|
13
|
+
# Value of the next_cursor field sent as part of the previous API response.
|
14
|
+
# @option options [integer] :limit
|
15
|
+
# The number of results that will be returned by the API on each invocation. Must be between 1 - 1000, both inclusive.
|
16
|
+
# @option options [string] :team_id
|
17
|
+
# ID for the workspace where the invite requests were made.
|
18
|
+
# @see https://api.slack.com/methods/admin.inviteRequests.approved.list
|
19
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.inviteRequests.approved/admin.inviteRequests.approved.list.json
|
20
|
+
def admin_inviteRequests_approved_list(options = {})
|
21
|
+
if block_given?
|
22
|
+
Pagination::Cursor.new(self, :admin_inviteRequests_approved_list, options).each do |page|
|
23
|
+
yield page
|
24
|
+
end
|
25
|
+
else
|
26
|
+
post('admin.inviteRequests.approved.list', options)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,33 @@
|
|
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 AdminInviterequestsDenied
|
9
|
+
#
|
10
|
+
# List all denied workspace invite requests.
|
11
|
+
#
|
12
|
+
# @option options [string] :cursor
|
13
|
+
# Value of the next_cursor field sent as part of the previous api response.
|
14
|
+
# @option options [integer] :limit
|
15
|
+
# The number of results that will be returned by the API on each invocation. Must be between 1 - 1000 both inclusive.
|
16
|
+
# @option options [Object] :team_id
|
17
|
+
# ID for the workspace where the invite requests were made.
|
18
|
+
# @see https://api.slack.com/methods/admin.inviteRequests.denied.list
|
19
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.inviteRequests.denied/admin.inviteRequests.denied.list.json
|
20
|
+
def admin_inviteRequests_denied_list(options = {})
|
21
|
+
if block_given?
|
22
|
+
Pagination::Cursor.new(self, :admin_inviteRequests_denied_list, options).each do |page|
|
23
|
+
yield page
|
24
|
+
end
|
25
|
+
else
|
26
|
+
post('admin.inviteRequests.denied.list', options)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,73 @@
|
|
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 AdminRoles
|
9
|
+
#
|
10
|
+
# Adds members to the specified role with the specified scopes
|
11
|
+
#
|
12
|
+
# @option options [array] :entity_ids
|
13
|
+
# List of the entity IDs for which roles will be assigned. These can be Org IDs, Team IDs or Channel IDs.
|
14
|
+
# @option options [string] :role_id
|
15
|
+
# ID of the role to which users will be assigned.
|
16
|
+
# @option options [array] :user_ids
|
17
|
+
# List of IDs from the users to be added to the given role.
|
18
|
+
# @see https://api.slack.com/methods/admin.roles.addAssignments
|
19
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.roles/admin.roles.addAssignments.json
|
20
|
+
def admin_roles_addAssignments(options = {})
|
21
|
+
raise ArgumentError, 'Required arguments :entity_ids missing' if options[:entity_ids].nil?
|
22
|
+
raise ArgumentError, 'Required arguments :role_id missing' if options[:role_id].nil?
|
23
|
+
raise ArgumentError, 'Required arguments :user_ids missing' if options[:user_ids].nil?
|
24
|
+
post('admin.roles.addAssignments', options)
|
25
|
+
end
|
26
|
+
|
27
|
+
#
|
28
|
+
# Lists assignments for all roles across entities. Options to scope results by any combination of roles or entities
|
29
|
+
#
|
30
|
+
# @option options [string] :cursor
|
31
|
+
# Set cursor to next_cursor returned by the previous call to list items in the next page.
|
32
|
+
# @option options [array] :entity_ids
|
33
|
+
# The entities for which the roles apply.
|
34
|
+
# @option options [integer] :limit
|
35
|
+
# The maximum number of items to return. Must be between 1 - 200 both inclusive.
|
36
|
+
# @option options [array] :role_ids
|
37
|
+
# collection of role ids to scope results by.
|
38
|
+
# @option options [string] :sort_dir
|
39
|
+
# Sort direction. Default is descending on date_create, can be either ASC or DESC.
|
40
|
+
# @see https://api.slack.com/methods/admin.roles.listAssignments
|
41
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.roles/admin.roles.listAssignments.json
|
42
|
+
def admin_roles_listAssignments(options = {})
|
43
|
+
if block_given?
|
44
|
+
Pagination::Cursor.new(self, :admin_roles_listAssignments, options).each do |page|
|
45
|
+
yield page
|
46
|
+
end
|
47
|
+
else
|
48
|
+
post('admin.roles.listAssignments', options)
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
#
|
53
|
+
# Removes a set of users from a role for the given scopes and entities
|
54
|
+
#
|
55
|
+
# @option options [array] :entity_ids
|
56
|
+
# List of the entity IDs for which roles will be revoked. These can be Org IDs, Team IDs or Channel IDs.
|
57
|
+
# @option options [string] :role_id
|
58
|
+
# ID of the role to which users will be assigned.
|
59
|
+
# @option options [array] :user_ids
|
60
|
+
# List of IDs of the users whose roles will be revoked.
|
61
|
+
# @see https://api.slack.com/methods/admin.roles.removeAssignments
|
62
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.roles/admin.roles.removeAssignments.json
|
63
|
+
def admin_roles_removeAssignments(options = {})
|
64
|
+
raise ArgumentError, 'Required arguments :entity_ids missing' if options[:entity_ids].nil?
|
65
|
+
raise ArgumentError, 'Required arguments :role_id missing' if options[:role_id].nil?
|
66
|
+
raise ArgumentError, 'Required arguments :user_ids missing' if options[:user_ids].nil?
|
67
|
+
post('admin.roles.removeAssignments', options)
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
@@ -0,0 +1,50 @@
|
|
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 AdminTeams
|
9
|
+
#
|
10
|
+
# Create an Enterprise team.
|
11
|
+
#
|
12
|
+
# @option options [string] :team_domain
|
13
|
+
# Team domain (for example, slacksoftballteam). Domains are limited to 21 characters.
|
14
|
+
# @option options [string] :team_name
|
15
|
+
# Team name (for example, Slack Softball Team).
|
16
|
+
# @option options [string] :team_description
|
17
|
+
# Description for the team.
|
18
|
+
# @option options [string] :team_discoverability
|
19
|
+
# Who can join the team. A team's discoverability can be open, closed, invite_only, or unlisted.
|
20
|
+
# @see https://api.slack.com/methods/admin.teams.create
|
21
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.teams/admin.teams.create.json
|
22
|
+
def admin_teams_create(options = {})
|
23
|
+
raise ArgumentError, 'Required arguments :team_domain missing' if options[:team_domain].nil?
|
24
|
+
raise ArgumentError, 'Required arguments :team_name missing' if options[:team_name].nil?
|
25
|
+
post('admin.teams.create', options)
|
26
|
+
end
|
27
|
+
|
28
|
+
#
|
29
|
+
# List all teams on an Enterprise organization
|
30
|
+
#
|
31
|
+
# @option options [string] :cursor
|
32
|
+
# Set cursor to next_cursor returned by the previous call to list items in the next page.
|
33
|
+
# @option options [integer] :limit
|
34
|
+
# The maximum number of items to return. Must be a positive integer no larger than 1000.
|
35
|
+
# @see https://api.slack.com/methods/admin.teams.list
|
36
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.teams/admin.teams.list.json
|
37
|
+
def admin_teams_list(options = {})
|
38
|
+
if block_given?
|
39
|
+
Pagination::Cursor.new(self, :admin_teams_list, options).each do |page|
|
40
|
+
yield page
|
41
|
+
end
|
42
|
+
else
|
43
|
+
post('admin.teams.list', options)
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file was auto-generated by lib/tasks/web.rake
|
3
|
+
|
4
|
+
module Slack
|
5
|
+
module Web
|
6
|
+
module Api
|
7
|
+
module Endpoints
|
8
|
+
module AdminTeamsAdmins
|
9
|
+
#
|
10
|
+
# List all of the admins on a given workspace.
|
11
|
+
#
|
12
|
+
# @option options [Object] :team_id
|
13
|
+
# .
|
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.
|
18
|
+
# @see https://api.slack.com/methods/admin.teams.admins.list
|
19
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.teams.admins/admin.teams.admins.list.json
|
20
|
+
def admin_teams_admins_list(options = {})
|
21
|
+
raise ArgumentError, 'Required arguments :team_id missing' if options[:team_id].nil?
|
22
|
+
if block_given?
|
23
|
+
Pagination::Cursor.new(self, :admin_teams_admins_list, options).each do |page|
|
24
|
+
yield page
|
25
|
+
end
|
26
|
+
else
|
27
|
+
post('admin.teams.admins.list', options)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file was auto-generated by lib/tasks/web.rake
|
3
|
+
|
4
|
+
module Slack
|
5
|
+
module Web
|
6
|
+
module Api
|
7
|
+
module Endpoints
|
8
|
+
module AdminTeamsOwners
|
9
|
+
#
|
10
|
+
# List all of the owners on a given workspace.
|
11
|
+
#
|
12
|
+
# @option options [Object] :team_id
|
13
|
+
# .
|
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
|
+
# @see https://api.slack.com/methods/admin.teams.owners.list
|
19
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.teams.owners/admin.teams.owners.list.json
|
20
|
+
def admin_teams_owners_list(options = {})
|
21
|
+
raise ArgumentError, 'Required arguments :team_id missing' if options[:team_id].nil?
|
22
|
+
if block_given?
|
23
|
+
Pagination::Cursor.new(self, :admin_teams_owners_list, options).each do |page|
|
24
|
+
yield page
|
25
|
+
end
|
26
|
+
else
|
27
|
+
post('admin.teams.owners.list', options)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,99 @@
|
|
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 AdminTeamsSettings
|
9
|
+
#
|
10
|
+
# Fetch information about settings in a workspace
|
11
|
+
#
|
12
|
+
# @option options [Object] :team_id
|
13
|
+
# .
|
14
|
+
# @see https://api.slack.com/methods/admin.teams.settings.info
|
15
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.teams.settings/admin.teams.settings.info.json
|
16
|
+
def admin_teams_settings_info(options = {})
|
17
|
+
raise ArgumentError, 'Required arguments :team_id missing' if options[:team_id].nil?
|
18
|
+
post('admin.teams.settings.info', options)
|
19
|
+
end
|
20
|
+
|
21
|
+
#
|
22
|
+
# Set the default channels of a workspace.
|
23
|
+
#
|
24
|
+
# @option options [array] :channel_ids
|
25
|
+
# An array of channel IDs.
|
26
|
+
# @option options [Object] :team_id
|
27
|
+
# ID for the workspace to set the default channel for.
|
28
|
+
# @see https://api.slack.com/methods/admin.teams.settings.setDefaultChannels
|
29
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.teams.settings/admin.teams.settings.setDefaultChannels.json
|
30
|
+
def admin_teams_settings_setDefaultChannels(options = {})
|
31
|
+
raise ArgumentError, 'Required arguments :channel_ids missing' if options[:channel_ids].nil?
|
32
|
+
raise ArgumentError, 'Required arguments :team_id missing' if options[:team_id].nil?
|
33
|
+
post('admin.teams.settings.setDefaultChannels', options)
|
34
|
+
end
|
35
|
+
|
36
|
+
#
|
37
|
+
# Set the description of a given workspace.
|
38
|
+
#
|
39
|
+
# @option options [string] :description
|
40
|
+
# The new description for the workspace.
|
41
|
+
# @option options [Object] :team_id
|
42
|
+
# ID for the workspace to set the description for.
|
43
|
+
# @see https://api.slack.com/methods/admin.teams.settings.setDescription
|
44
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.teams.settings/admin.teams.settings.setDescription.json
|
45
|
+
def admin_teams_settings_setDescription(options = {})
|
46
|
+
raise ArgumentError, 'Required arguments :description missing' if options[:description].nil?
|
47
|
+
raise ArgumentError, 'Required arguments :team_id missing' if options[:team_id].nil?
|
48
|
+
post('admin.teams.settings.setDescription', options)
|
49
|
+
end
|
50
|
+
|
51
|
+
#
|
52
|
+
# An API method that allows admins to set the discoverability of a given workspace
|
53
|
+
#
|
54
|
+
# @option options [string] :discoverability
|
55
|
+
# This workspace's discovery setting. It must be set to one of open, invite_only, closed, or unlisted.
|
56
|
+
# @option options [Object] :team_id
|
57
|
+
# The ID of the workspace to set discoverability on.
|
58
|
+
# @see https://api.slack.com/methods/admin.teams.settings.setDiscoverability
|
59
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.teams.settings/admin.teams.settings.setDiscoverability.json
|
60
|
+
def admin_teams_settings_setDiscoverability(options = {})
|
61
|
+
raise ArgumentError, 'Required arguments :discoverability missing' if options[:discoverability].nil?
|
62
|
+
raise ArgumentError, 'Required arguments :team_id missing' if options[:team_id].nil?
|
63
|
+
post('admin.teams.settings.setDiscoverability', options)
|
64
|
+
end
|
65
|
+
|
66
|
+
#
|
67
|
+
# Sets the icon of a workspace.
|
68
|
+
#
|
69
|
+
# @option options [string] :image_url
|
70
|
+
# Image URL for the icon.
|
71
|
+
# @option options [Object] :team_id
|
72
|
+
# ID for the workspace to set the icon for.
|
73
|
+
# @see https://api.slack.com/methods/admin.teams.settings.setIcon
|
74
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.teams.settings/admin.teams.settings.setIcon.json
|
75
|
+
def admin_teams_settings_setIcon(options = {})
|
76
|
+
raise ArgumentError, 'Required arguments :image_url missing' if options[:image_url].nil?
|
77
|
+
raise ArgumentError, 'Required arguments :team_id missing' if options[:team_id].nil?
|
78
|
+
post('admin.teams.settings.setIcon', options)
|
79
|
+
end
|
80
|
+
|
81
|
+
#
|
82
|
+
# Set the name of a given workspace.
|
83
|
+
#
|
84
|
+
# @option options [string] :name
|
85
|
+
# The new name of the workspace.
|
86
|
+
# @option options [Object] :team_id
|
87
|
+
# ID for the workspace to set the name for.
|
88
|
+
# @see https://api.slack.com/methods/admin.teams.settings.setName
|
89
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.teams.settings/admin.teams.settings.setName.json
|
90
|
+
def admin_teams_settings_setName(options = {})
|
91
|
+
raise ArgumentError, 'Required arguments :name missing' if options[:name].nil?
|
92
|
+
raise ArgumentError, 'Required arguments :team_id missing' if options[:team_id].nil?
|
93
|
+
post('admin.teams.settings.setName', options)
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
@@ -0,0 +1,77 @@
|
|
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 AdminUsergroups
|
9
|
+
#
|
10
|
+
# Add up to one hundred default channels to an IDP group.
|
11
|
+
#
|
12
|
+
# @option options [array] :channel_ids
|
13
|
+
# Comma separated string of channel IDs.
|
14
|
+
# @option options [string] :usergroup_id
|
15
|
+
# ID of the IDP group to add default channels for.
|
16
|
+
# @option options [string] :team_id
|
17
|
+
# The workspace to add default channels in.
|
18
|
+
# @see https://api.slack.com/methods/admin.usergroups.addChannels
|
19
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.usergroups/admin.usergroups.addChannels.json
|
20
|
+
def admin_usergroups_addChannels(options = {})
|
21
|
+
raise ArgumentError, 'Required arguments :channel_ids missing' if options[:channel_ids].nil?
|
22
|
+
raise ArgumentError, 'Required arguments :usergroup_id missing' if options[:usergroup_id].nil?
|
23
|
+
post('admin.usergroups.addChannels', options)
|
24
|
+
end
|
25
|
+
|
26
|
+
#
|
27
|
+
# Associate one or more default workspaces with an organization-wide IDP group.
|
28
|
+
#
|
29
|
+
# @option options [array] :team_ids
|
30
|
+
# A comma separated list of encoded team (workspace) IDs. Each workspace MUST belong to the organization associated with the token.
|
31
|
+
# @option options [string] :usergroup_id
|
32
|
+
# An encoded usergroup (IDP Group) ID.
|
33
|
+
# @option options [boolean] :auto_provision
|
34
|
+
# When true, this method automatically creates new workspace accounts for the IDP group members.
|
35
|
+
# @see https://api.slack.com/methods/admin.usergroups.addTeams
|
36
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.usergroups/admin.usergroups.addTeams.json
|
37
|
+
def admin_usergroups_addTeams(options = {})
|
38
|
+
raise ArgumentError, 'Required arguments :team_ids missing' if options[:team_ids].nil?
|
39
|
+
raise ArgumentError, 'Required arguments :usergroup_id missing' if options[:usergroup_id].nil?
|
40
|
+
post('admin.usergroups.addTeams', options)
|
41
|
+
end
|
42
|
+
|
43
|
+
#
|
44
|
+
# List the channels linked to an org-level IDP group (user group).
|
45
|
+
#
|
46
|
+
# @option options [Object] :usergroup_id
|
47
|
+
# ID of the IDP group to list default channels for.
|
48
|
+
# @option options [boolean] :include_num_members
|
49
|
+
# Flag to include or exclude the count of members per channel.
|
50
|
+
# @option options [string] :team_id
|
51
|
+
# ID of the the workspace.
|
52
|
+
# @see https://api.slack.com/methods/admin.usergroups.listChannels
|
53
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.usergroups/admin.usergroups.listChannels.json
|
54
|
+
def admin_usergroups_listChannels(options = {})
|
55
|
+
raise ArgumentError, 'Required arguments :usergroup_id missing' if options[:usergroup_id].nil?
|
56
|
+
post('admin.usergroups.listChannels', options)
|
57
|
+
end
|
58
|
+
|
59
|
+
#
|
60
|
+
# Remove one or more default channels from an org-level IDP group (user group).
|
61
|
+
#
|
62
|
+
# @option options [array] :channel_ids
|
63
|
+
# Comma-separated string of channel IDs.
|
64
|
+
# @option options [string] :usergroup_id
|
65
|
+
# ID of the IDP Group.
|
66
|
+
# @see https://api.slack.com/methods/admin.usergroups.removeChannels
|
67
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.usergroups/admin.usergroups.removeChannels.json
|
68
|
+
def admin_usergroups_removeChannels(options = {})
|
69
|
+
raise ArgumentError, 'Required arguments :channel_ids missing' if options[:channel_ids].nil?
|
70
|
+
raise ArgumentError, 'Required arguments :usergroup_id missing' if options[:usergroup_id].nil?
|
71
|
+
post('admin.usergroups.removeChannels', options)
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
@@ -0,0 +1,167 @@
|
|
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 AdminUsers
|
9
|
+
#
|
10
|
+
# Add an Enterprise user to a workspace.
|
11
|
+
#
|
12
|
+
# @option options [Object] :team_id
|
13
|
+
# The ID (T1234) of the workspace.
|
14
|
+
# @option options [Object] :user_id
|
15
|
+
# The ID of the user to add to the workspace.
|
16
|
+
# @option options [string] :channel_ids
|
17
|
+
# Comma separated values of channel IDs to add user in the new workspace.
|
18
|
+
# @option options [boolean] :is_restricted
|
19
|
+
# True if user should be added to the workspace as a guest.
|
20
|
+
# @option options [boolean] :is_ultra_restricted
|
21
|
+
# True if user should be added to the workspace as a single-channel guest.
|
22
|
+
# @see https://api.slack.com/methods/admin.users.assign
|
23
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.users/admin.users.assign.json
|
24
|
+
def admin_users_assign(options = {})
|
25
|
+
raise ArgumentError, 'Required arguments :team_id missing' if options[:team_id].nil?
|
26
|
+
raise ArgumentError, 'Required arguments :user_id missing' if options[:user_id].nil?
|
27
|
+
post('admin.users.assign', options)
|
28
|
+
end
|
29
|
+
|
30
|
+
#
|
31
|
+
# Invite a user to a workspace.
|
32
|
+
#
|
33
|
+
# @option options [string] :channel_ids
|
34
|
+
# A comma-separated list of channel_ids for this user to join. At least one channel is required.
|
35
|
+
# @option options [string] :email
|
36
|
+
# The email address of the person to invite.
|
37
|
+
# @option options [Object] :team_id
|
38
|
+
# The ID (T1234) of the workspace.
|
39
|
+
# @option options [string] :custom_message
|
40
|
+
# An optional message to send to the user in the invite email.
|
41
|
+
# @option options [boolean] :email_password_policy_enabled
|
42
|
+
# Allow invited user to sign in via email and password. Only available for Enterprise Grid teams via admin invite.
|
43
|
+
# @option options [string] :guest_expiration_ts
|
44
|
+
# Timestamp when guest account should be disabled. Only include this timestamp if you are inviting a guest user and you want their account to expire on a certain date.
|
45
|
+
# @option options [boolean] :is_restricted
|
46
|
+
# Is this user a multi-channel guest user? (default: false).
|
47
|
+
# @option options [boolean] :is_ultra_restricted
|
48
|
+
# Is this user a single channel guest user? (default: false).
|
49
|
+
# @option options [string] :real_name
|
50
|
+
# Full name of the user.
|
51
|
+
# @option options [boolean] :resend
|
52
|
+
# Allow this invite to be resent in the future if a user has not signed up yet. Resending can only be done via the UI and has no expiration. (default: false).
|
53
|
+
# @see https://api.slack.com/methods/admin.users.invite
|
54
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.users/admin.users.invite.json
|
55
|
+
def admin_users_invite(options = {})
|
56
|
+
raise ArgumentError, 'Required arguments :channel_ids missing' if options[:channel_ids].nil?
|
57
|
+
raise ArgumentError, 'Required arguments :email missing' if options[:email].nil?
|
58
|
+
raise ArgumentError, 'Required arguments :team_id missing' if options[:team_id].nil?
|
59
|
+
post('admin.users.invite', options)
|
60
|
+
end
|
61
|
+
|
62
|
+
#
|
63
|
+
# List users on a workspace
|
64
|
+
#
|
65
|
+
# @option options [string] :cursor
|
66
|
+
# Set cursor to next_cursor returned by the previous call to list items in the next page.
|
67
|
+
# @option options [boolean] :include_deactivated_user_workspaces
|
68
|
+
# Only applies with org token and no team_id. If true, return workspaces for a user even if they may be deactivated on them. If false, return workspaces for a user only when user is active on them. Default is false.
|
69
|
+
# @option options [boolean] :is_active
|
70
|
+
# If true, only active users will be returned. If false, only deactivated users will be returned. Default is true.
|
71
|
+
# @option options [integer] :limit
|
72
|
+
# Limit for how many users to be retrieved per page.
|
73
|
+
# @option options [Object] :team_id
|
74
|
+
# The ID (T1234) of a workspace. Filters results to just the specified workspace.
|
75
|
+
# @see https://api.slack.com/methods/admin.users.list
|
76
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.users/admin.users.list.json
|
77
|
+
def admin_users_list(options = {})
|
78
|
+
if block_given?
|
79
|
+
Pagination::Cursor.new(self, :admin_users_list, options).each do |page|
|
80
|
+
yield page
|
81
|
+
end
|
82
|
+
else
|
83
|
+
post('admin.users.list', options)
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
#
|
88
|
+
# Remove a user from a workspace.
|
89
|
+
#
|
90
|
+
# @option options [Object] :team_id
|
91
|
+
# The ID (T1234) of the workspace.
|
92
|
+
# @option options [string] :user_id
|
93
|
+
# The ID of the user to remove.
|
94
|
+
# @see https://api.slack.com/methods/admin.users.remove
|
95
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.users/admin.users.remove.json
|
96
|
+
def admin_users_remove(options = {})
|
97
|
+
raise ArgumentError, 'Required arguments :team_id missing' if options[:team_id].nil?
|
98
|
+
raise ArgumentError, 'Required arguments :user_id missing' if options[:user_id].nil?
|
99
|
+
post('admin.users.remove', options)
|
100
|
+
end
|
101
|
+
|
102
|
+
#
|
103
|
+
# Set an existing regular user or owner to be a workspace admin.
|
104
|
+
#
|
105
|
+
# @option options [Object] :team_id
|
106
|
+
# The ID (T1234) of the workspace.
|
107
|
+
# @option options [string] :user_id
|
108
|
+
# The ID of the user to designate as an admin.
|
109
|
+
# @see https://api.slack.com/methods/admin.users.setAdmin
|
110
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.users/admin.users.setAdmin.json
|
111
|
+
def admin_users_setAdmin(options = {})
|
112
|
+
raise ArgumentError, 'Required arguments :team_id missing' if options[:team_id].nil?
|
113
|
+
raise ArgumentError, 'Required arguments :user_id missing' if options[:user_id].nil?
|
114
|
+
post('admin.users.setAdmin', options)
|
115
|
+
end
|
116
|
+
|
117
|
+
#
|
118
|
+
# Set an expiration for a guest user
|
119
|
+
#
|
120
|
+
# @option options [integer] :expiration_ts
|
121
|
+
# Epoch timestamp in seconds when guest account should be disabled.
|
122
|
+
# @option options [string] :user_id
|
123
|
+
# The ID of the user to set an expiration for.
|
124
|
+
# @option options [Object] :team_id
|
125
|
+
# The ID (T1234) of the workspace.
|
126
|
+
# @see https://api.slack.com/methods/admin.users.setExpiration
|
127
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.users/admin.users.setExpiration.json
|
128
|
+
def admin_users_setExpiration(options = {})
|
129
|
+
raise ArgumentError, 'Required arguments :expiration_ts missing' if options[:expiration_ts].nil?
|
130
|
+
raise ArgumentError, 'Required arguments :user_id missing' if options[:user_id].nil?
|
131
|
+
post('admin.users.setExpiration', options)
|
132
|
+
end
|
133
|
+
|
134
|
+
#
|
135
|
+
# Set an existing regular user or admin to be a workspace owner.
|
136
|
+
#
|
137
|
+
# @option options [Object] :team_id
|
138
|
+
# The ID (T1234) of the workspace.
|
139
|
+
# @option options [Object] :user_id
|
140
|
+
# Id of the user to promote to owner.
|
141
|
+
# @see https://api.slack.com/methods/admin.users.setOwner
|
142
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.users/admin.users.setOwner.json
|
143
|
+
def admin_users_setOwner(options = {})
|
144
|
+
raise ArgumentError, 'Required arguments :team_id missing' if options[:team_id].nil?
|
145
|
+
raise ArgumentError, 'Required arguments :user_id missing' if options[:user_id].nil?
|
146
|
+
post('admin.users.setOwner', options)
|
147
|
+
end
|
148
|
+
|
149
|
+
#
|
150
|
+
# Set an existing guest user, admin user, or owner to be a regular user.
|
151
|
+
#
|
152
|
+
# @option options [Object] :team_id
|
153
|
+
# The ID (T1234) of the workspace.
|
154
|
+
# @option options [string] :user_id
|
155
|
+
# The ID of the user to designate as a regular user.
|
156
|
+
# @see https://api.slack.com/methods/admin.users.setRegular
|
157
|
+
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/admin.users/admin.users.setRegular.json
|
158
|
+
def admin_users_setRegular(options = {})
|
159
|
+
raise ArgumentError, 'Required arguments :team_id missing' if options[:team_id].nil?
|
160
|
+
raise ArgumentError, 'Required arguments :user_id missing' if options[:user_id].nil?
|
161
|
+
post('admin.users.setRegular', options)
|
162
|
+
end
|
163
|
+
end
|
164
|
+
end
|
165
|
+
end
|
166
|
+
end
|
167
|
+
end
|