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
data/bin/commands/dnd.rb
CHANGED
@@ -1,47 +1,56 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# This file was auto-generated by lib/tasks/web.rake
|
2
3
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
4
|
+
module Slack
|
5
|
+
module Cli
|
6
|
+
class App
|
7
|
+
desc 'Dnd methods.'
|
8
|
+
command 'dnd' do |g|
|
9
|
+
g.desc "Ends the current user's Do Not Disturb session immediately."
|
10
|
+
g.long_desc %( Ends the current user's Do Not Disturb session immediately. )
|
11
|
+
g.command 'endDnd' do |c|
|
12
|
+
c.action do |_global_options, options, _args|
|
13
|
+
puts JSON.dump(@client.dnd_endDnd(options))
|
14
|
+
end
|
15
|
+
end
|
12
16
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
17
|
+
g.desc "Ends the current user's snooze mode immediately."
|
18
|
+
g.long_desc %( Ends the current user's snooze mode immediately. )
|
19
|
+
g.command 'endSnooze' do |c|
|
20
|
+
c.action do |_global_options, options, _args|
|
21
|
+
puts JSON.dump(@client.dnd_endSnooze(options))
|
22
|
+
end
|
23
|
+
end
|
20
24
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
25
|
+
g.desc "Retrieves a user's current Do Not Disturb status."
|
26
|
+
g.long_desc %( Retrieves a user's current Do Not Disturb status. )
|
27
|
+
g.command 'info' do |c|
|
28
|
+
c.flag 'team_id', desc: 'Encoded team id where passed in user param belongs, required if org token is used. If no user param is passed, then a team which has access to the app should be passed.'
|
29
|
+
c.flag 'user', desc: 'User to fetch status for (defaults to current user).'
|
30
|
+
c.action do |_global_options, options, _args|
|
31
|
+
puts JSON.dump(@client.dnd_info(options))
|
32
|
+
end
|
33
|
+
end
|
29
34
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
35
|
+
g.desc 'Turns on Do Not Disturb mode for the current user, or changes its duration.'
|
36
|
+
g.long_desc %( Turns on Do Not Disturb mode for the current user, or changes its duration. )
|
37
|
+
g.command 'setSnooze' do |c|
|
38
|
+
c.flag 'num_minutes', desc: 'This argument is required. Number of minutes, from now, to snooze until.'
|
39
|
+
c.action do |_global_options, options, _args|
|
40
|
+
puts JSON.dump(@client.dnd_setSnooze(options))
|
41
|
+
end
|
42
|
+
end
|
38
43
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
44
|
+
g.desc 'Retrieves the Do Not Disturb status for up to 50 users on a team.'
|
45
|
+
g.long_desc %( Retrieves the Do Not Disturb status for up to 50 users on a team. )
|
46
|
+
g.command 'teamInfo' do |c|
|
47
|
+
c.flag 'users', desc: 'Comma-separated list of users to fetch Do Not Disturb status for.'
|
48
|
+
c.flag 'team_id', desc: 'Encoded team id where passed in users belong, required if org token is used.'
|
49
|
+
c.action do |_global_options, options, _args|
|
50
|
+
puts JSON.dump(@client.dnd_teamInfo(options))
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
45
54
|
end
|
46
55
|
end
|
47
56
|
end
|
data/bin/commands/emoji.rb
CHANGED
@@ -1,12 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# This file was auto-generated by lib/tasks/web.rake
|
2
3
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
4
|
+
module Slack
|
5
|
+
module Cli
|
6
|
+
class App
|
7
|
+
desc 'Emoji methods.'
|
8
|
+
command 'emoji' do |g|
|
9
|
+
g.desc 'Lists custom emoji for a team.'
|
10
|
+
g.long_desc %( Lists custom emoji for a team. )
|
11
|
+
g.command 'list' do |c|
|
12
|
+
c.flag 'include_categories', desc: 'Include a list of categories for Unicode emoji and the emoji in each category.'
|
13
|
+
c.action do |_global_options, options, _args|
|
14
|
+
puts JSON.dump(@client.emoji_list(options))
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
10
18
|
end
|
11
19
|
end
|
12
20
|
end
|
data/bin/commands/files.rb
CHANGED
@@ -1,101 +1,127 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# This file was auto-generated by lib/tasks/web.rake
|
2
3
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
4
|
+
module Slack
|
5
|
+
module Cli
|
6
|
+
class App
|
7
|
+
desc 'Files methods.'
|
8
|
+
command 'files' do |g|
|
9
|
+
g.desc 'Finishes an upload started with files.getUploadURLExternal'
|
10
|
+
g.long_desc %( Finishes an upload started with files.getUploadURLExternal )
|
11
|
+
g.command 'completeUploadExternal' do |c|
|
12
|
+
c.flag 'files', desc: 'Array of file ids and their corresponding (optional) titles.'
|
13
|
+
c.flag 'blocks', desc: 'A JSON-based array of structured rich text blocks, presented as a URL-encoded string. If the initial_comment field is provided, the blocks field is ignored.'
|
14
|
+
c.flag 'channel_id', desc: 'Channel ID where the file will be shared. If not specified the file will be private.'
|
15
|
+
c.flag 'channels', desc: 'Comma-separated string of channel IDs where the file will be shared.'
|
16
|
+
c.flag 'initial_comment', desc: 'The message text introducing the file in specified channels.'
|
17
|
+
c.flag 'thread_ts', desc: "Provide another message's ts value to upload this file as a reply. Never use a reply's ts value; use its parent instead. Also make sure to provide only one channel when using 'thread_ts'."
|
18
|
+
c.action do |_global_options, options, _args|
|
19
|
+
puts JSON.dump(@client.files_completeUploadExternal(options))
|
20
|
+
end
|
21
|
+
end
|
13
22
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
end
|
23
|
-
end
|
23
|
+
g.desc 'Deletes a file.'
|
24
|
+
g.long_desc %( Deletes a file. )
|
25
|
+
g.command 'delete' do |c|
|
26
|
+
c.flag 'file', desc: 'ID of file to delete.'
|
27
|
+
c.action do |_global_options, options, _args|
|
28
|
+
puts JSON.dump(@client.files_delete(options))
|
29
|
+
end
|
30
|
+
end
|
24
31
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
32
|
+
g.desc 'Change the properties of a file (undocumented)'
|
33
|
+
g.long_desc %( Change the properties of a file )
|
34
|
+
g.command 'edit' do |c|
|
35
|
+
c.flag 'file', desc: 'ID of the file to be edited'
|
36
|
+
c.flag 'title', desc: 'New title of the file'
|
37
|
+
c.flag 'filetype', desc: 'New filetype of the file. See https://api.slack.com/types/file#file_types for a list of all supported types.'
|
38
|
+
c.action do |_global_options, options, _args|
|
39
|
+
puts JSON.dump(@client.files_edit(options))
|
40
|
+
end
|
41
|
+
end
|
33
42
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
43
|
+
g.desc 'Gets a URL for an edge external file upload'
|
44
|
+
g.long_desc %( Gets a URL for an edge external file upload )
|
45
|
+
g.command 'getUploadURLExternal' do |c|
|
46
|
+
c.flag 'filename', desc: 'Name of the file being uploaded.'
|
47
|
+
c.flag 'length', desc: 'Size in bytes of the file being uploaded.'
|
48
|
+
c.flag 'alt_txt', desc: 'Description of image for screen-reader.'
|
49
|
+
c.flag 'snippet_type', desc: 'Syntax type of the snippet being uploaded.'
|
50
|
+
c.action do |_global_options, options, _args|
|
51
|
+
puts JSON.dump(@client.files_getUploadURLExternal(options))
|
52
|
+
end
|
53
|
+
end
|
41
54
|
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
55
|
+
g.desc 'Gets information about a file.'
|
56
|
+
g.long_desc %( Gets information about a file. )
|
57
|
+
g.command 'info' do |c|
|
58
|
+
c.flag 'file', desc: 'Specify a file by providing its ID.'
|
59
|
+
c.flag 'cursor', desc: "Parameter for pagination. File comments are paginated for a single file. Set cursor equal to the next_cursor attribute returned by the previous request's response_metadata. This parameter is optional, but pagination is mandatory: the default value simply fetches the first 'page' of the collection of comments. See pagination for more details."
|
60
|
+
c.flag 'limit', desc: "The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the list hasn't been reached."
|
61
|
+
c.action do |_global_options, options, _args|
|
62
|
+
puts JSON.dump(@client.files_info(options))
|
63
|
+
end
|
64
|
+
end
|
49
65
|
|
66
|
+
g.desc 'List for a team, in a channel, or from a user with applied filters.'
|
67
|
+
g.long_desc %( List for a team, in a channel, or from a user with applied filters. )
|
68
|
+
g.command 'list' do |c|
|
69
|
+
c.flag 'channel', desc: 'Filter files appearing in a specific channel, indicated by its ID.'
|
70
|
+
c.flag 'show_files_hidden_by_limit', desc: 'Show truncated file info for files hidden due to being too old, and the team who owns the file being over the file limit.'
|
71
|
+
c.flag 'team_id', desc: 'encoded team id to list files in, required if org token is used.'
|
72
|
+
c.flag 'ts_from', desc: 'Filter files created after this timestamp (inclusive).'
|
73
|
+
c.flag 'ts_to', desc: 'Filter files created before this timestamp (inclusive).'
|
74
|
+
c.flag 'types', desc: 'Filter files by type (see below). You can pass multiple values in the types argument, like types=spaces,snippets.The default value is all, which does not filter the list.'
|
75
|
+
c.flag 'user', desc: 'Filter files created by a single user.'
|
76
|
+
c.action do |_global_options, options, _args|
|
77
|
+
puts JSON.dump(@client.files_list(options))
|
78
|
+
end
|
79
|
+
end
|
50
80
|
|
51
|
-
|
52
|
-
.
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
81
|
+
g.desc 'Revokes public/external sharing access for a file'
|
82
|
+
g.long_desc %( Revokes public/external sharing access for a file )
|
83
|
+
g.command 'revokePublicURL' do |c|
|
84
|
+
c.flag 'file', desc: 'File to revoke.'
|
85
|
+
c.action do |_global_options, options, _args|
|
86
|
+
puts JSON.dump(@client.files_revokePublicURL(options))
|
87
|
+
end
|
88
|
+
end
|
58
89
|
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
90
|
+
g.desc 'Share an existing file in a channel (undocumented)'
|
91
|
+
g.long_desc %( Share an existing file in a channel )
|
92
|
+
g.command 'share' do |c|
|
93
|
+
c.flag 'file', desc: 'ID of the file to be shared'
|
94
|
+
c.flag 'channel', desc: 'Channel to share the file in. Works with both public (channel ID) and private channels (group ID).'
|
95
|
+
c.action do |_global_options, options, _args|
|
96
|
+
puts JSON.dump(@client.files_share(options))
|
97
|
+
end
|
98
|
+
end
|
67
99
|
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
end
|
77
|
-
|
78
|
-
g.desc 'Enables a file for public/external sharing.'
|
79
|
-
g.long_desc %( Enables a file for public/external sharing. )
|
80
|
-
g.command 'sharedPublicURL' do |c|
|
81
|
-
c.flag 'file', desc: 'File to share.'
|
82
|
-
c.action do |_global_options, options, _args|
|
83
|
-
puts JSON.dump($client.files_sharedPublicURL(options))
|
84
|
-
end
|
85
|
-
end
|
100
|
+
g.desc 'Enables a file for public/external sharing.'
|
101
|
+
g.long_desc %( Enables a file for public/external sharing. )
|
102
|
+
g.command 'sharedPublicURL' do |c|
|
103
|
+
c.flag 'file', desc: 'File to share.'
|
104
|
+
c.action do |_global_options, options, _args|
|
105
|
+
puts JSON.dump(@client.files_sharedPublicURL(options))
|
106
|
+
end
|
107
|
+
end
|
86
108
|
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
109
|
+
g.desc 'Uploads or creates a file.'
|
110
|
+
g.long_desc %( Uploads or creates a file. )
|
111
|
+
g.command 'upload' do |c|
|
112
|
+
c.flag 'channels', desc: 'Comma-separated list of channel names or IDs where the file will be shared.'
|
113
|
+
c.flag 'content', desc: 'File contents via a POST variable. If omitting this parameter, you must provide a file.'
|
114
|
+
c.flag 'file', desc: 'File contents via multipart/form-data. If omitting this parameter, you must submit content.'
|
115
|
+
c.flag 'filename', desc: 'Filename of file.'
|
116
|
+
c.flag 'filetype', desc: 'A file type identifier.'
|
117
|
+
c.flag 'initial_comment', desc: 'The message text introducing the file in specified channels.'
|
118
|
+
c.flag 'thread_ts', desc: "Provide another message's ts value to upload this file as a reply. Never use a reply's ts value; use its parent instead."
|
119
|
+
c.flag 'title', desc: 'Title of file.'
|
120
|
+
c.action do |_global_options, options, _args|
|
121
|
+
puts JSON.dump(@client.files_upload(options))
|
122
|
+
end
|
123
|
+
end
|
124
|
+
end
|
99
125
|
end
|
100
126
|
end
|
101
127
|
end
|
@@ -1,35 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
# This file was auto-generated by lib/tasks/web.rake
|
2
3
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
c.flag 'file', desc: 'File to delete a comment from.'
|
19
|
-
c.flag 'id', desc: 'The comment to delete.'
|
20
|
-
c.action do |_global_options, options, _args|
|
21
|
-
puts JSON.dump($client.files_comments_delete(options))
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
g.desc 'Edit an existing file comment.'
|
26
|
-
g.long_desc %( Edit an existing file comment. )
|
27
|
-
g.command 'edit' do |c|
|
28
|
-
c.flag 'comment', desc: 'Text of the comment to edit.'
|
29
|
-
c.flag 'file', desc: 'File containing the comment to edit.'
|
30
|
-
c.flag 'id', desc: 'The comment to edit.'
|
31
|
-
c.action do |_global_options, options, _args|
|
32
|
-
puts JSON.dump($client.files_comments_edit(options))
|
4
|
+
module Slack
|
5
|
+
module Cli
|
6
|
+
class App
|
7
|
+
desc 'FilesComments methods.'
|
8
|
+
command 'files_comments' do |g|
|
9
|
+
g.desc 'Deletes an existing comment on a file.'
|
10
|
+
g.long_desc %( Deletes an existing comment on a file. )
|
11
|
+
g.command 'delete' do |c|
|
12
|
+
c.flag 'file', desc: 'File to delete a comment from.'
|
13
|
+
c.flag 'id', desc: 'The comment to delete.'
|
14
|
+
c.action do |_global_options, options, _args|
|
15
|
+
puts JSON.dump(@client.files_comments_delete(options))
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
33
19
|
end
|
34
20
|
end
|
35
21
|
end
|
@@ -0,0 +1,84 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file was auto-generated by lib/tasks/web.rake
|
3
|
+
|
4
|
+
module Slack
|
5
|
+
module Cli
|
6
|
+
class App
|
7
|
+
desc 'FilesRemote methods.'
|
8
|
+
command 'files_remote' do |g|
|
9
|
+
g.desc 'Adds a file from a remote service'
|
10
|
+
g.long_desc %( Adds a file from a remote service )
|
11
|
+
g.command 'add' do |c|
|
12
|
+
c.flag 'external_id', desc: 'Creator defined GUID for the file.'
|
13
|
+
c.flag 'external_url', desc: 'URL of the remote file.'
|
14
|
+
c.flag 'title', desc: 'Title of the file being shared.'
|
15
|
+
c.flag 'filetype', desc: 'type of file.'
|
16
|
+
c.flag 'indexable_file_contents', desc: 'A text file (txt, pdf, doc, etc.) containing textual search terms that are used to improve discovery of the remote file.'
|
17
|
+
c.flag 'preview_image', desc: 'Preview of the document via multipart/form-data.'
|
18
|
+
c.action do |_global_options, options, _args|
|
19
|
+
puts JSON.dump(@client.files_remote_add(options))
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
g.desc 'Retrieve information about a remote file added to Slack'
|
24
|
+
g.long_desc %( Retrieve information about a remote file added to Slack )
|
25
|
+
g.command 'info' do |c|
|
26
|
+
c.flag 'external_id', desc: 'Creator defined GUID for the file.'
|
27
|
+
c.flag 'file', desc: 'Specify a file by providing its ID.'
|
28
|
+
c.action do |_global_options, options, _args|
|
29
|
+
puts JSON.dump(@client.files_remote_info(options))
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
g.desc 'Retrieve information about a remote file added to Slack'
|
34
|
+
g.long_desc %( Retrieve information about a remote file added to Slack )
|
35
|
+
g.command 'list' do |c|
|
36
|
+
c.flag 'channel', desc: 'Filter files appearing in a specific channel, indicated by its ID.'
|
37
|
+
c.flag 'cursor', desc: "Paginate through collections of data by setting the cursor parameter to a next_cursor attribute returned by a previous request's response_metadata. Default value fetches the first 'page' of the collection. See pagination for more detail."
|
38
|
+
c.flag 'limit', desc: 'The maximum number of items to return.'
|
39
|
+
c.flag 'ts_from', desc: 'Filter files created after this timestamp (inclusive).'
|
40
|
+
c.flag 'ts_to', desc: 'Filter files created before this timestamp (inclusive).'
|
41
|
+
c.action do |_global_options, options, _args|
|
42
|
+
puts JSON.dump(@client.files_remote_list(options))
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
g.desc 'Remove a remote file.'
|
47
|
+
g.long_desc %( Remove a remote file. )
|
48
|
+
g.command 'remove' do |c|
|
49
|
+
c.flag 'external_id', desc: 'Creator defined GUID for the file.'
|
50
|
+
c.flag 'file', desc: 'Specify a file by providing its ID.'
|
51
|
+
c.action do |_global_options, options, _args|
|
52
|
+
puts JSON.dump(@client.files_remote_remove(options))
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
g.desc 'Share a remote file into a channel.'
|
57
|
+
g.long_desc %( Share a remote file into a channel. )
|
58
|
+
g.command 'share' do |c|
|
59
|
+
c.flag 'channels', desc: 'Comma-separated list of channel IDs where the file will be shared.'
|
60
|
+
c.flag 'external_id', desc: 'The globally unique identifier (GUID) for the file, as set by the app registering the file with Slack. Either this field or file or both are required.'
|
61
|
+
c.flag 'file', desc: 'Specify a file registered with Slack by providing its ID. Either this field or external_id or both are required.'
|
62
|
+
c.action do |_global_options, options, _args|
|
63
|
+
puts JSON.dump(@client.files_remote_share(options))
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
g.desc 'Updates an existing remote file.'
|
68
|
+
g.long_desc %( Updates an existing remote file. )
|
69
|
+
g.command 'update' do |c|
|
70
|
+
c.flag 'external_id', desc: 'Creator defined GUID for the file.'
|
71
|
+
c.flag 'external_url', desc: 'URL of the remote file.'
|
72
|
+
c.flag 'file', desc: 'Specify a file by providing its ID.'
|
73
|
+
c.flag 'filetype', desc: 'type of file.'
|
74
|
+
c.flag 'indexable_file_contents', desc: 'File containing contents that can be used to improve searchability for the remote file.'
|
75
|
+
c.flag 'preview_image', desc: 'Preview of the document via multipart/form-data.'
|
76
|
+
c.flag 'title', desc: 'Title of the file being shared.'
|
77
|
+
c.action do |_global_options, options, _args|
|
78
|
+
puts JSON.dump(@client.files_remote_update(options))
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file was auto-generated by lib/tasks/web.rake
|
3
|
+
|
4
|
+
module Slack
|
5
|
+
module Cli
|
6
|
+
class App
|
7
|
+
desc 'Functions methods.'
|
8
|
+
command 'functions' do |g|
|
9
|
+
g.desc 'Signal that a function failed to complete'
|
10
|
+
g.long_desc %( Signal that a function failed to complete )
|
11
|
+
g.command 'completeError' do |c|
|
12
|
+
c.flag 'error', desc: 'A human-readable error message that contains information about why the function failed to complete.'
|
13
|
+
c.flag 'function_execution_id', desc: 'Context identifier that maps to the executed function.'
|
14
|
+
c.action do |_global_options, options, _args|
|
15
|
+
puts JSON.dump(@client.functions_completeError(options))
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
g.desc 'Signal the successful completion of a function'
|
20
|
+
g.long_desc %( Signal the successful completion of a function )
|
21
|
+
g.command 'completeSuccess' do |c|
|
22
|
+
c.flag 'function_execution_id', desc: 'Context identifier that maps to the executed function.'
|
23
|
+
c.flag 'outputs', desc: 'A JSON-based object that conforms to the output parameters schema for the custom function defined in the manifest.'
|
24
|
+
c.action do |_global_options, options, _args|
|
25
|
+
puts JSON.dump(@client.functions_completeSuccess(options))
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
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 Cli
|
6
|
+
class App
|
7
|
+
desc 'FunctionsDistributionsPermissions methods.'
|
8
|
+
command 'functions_distributions_permissions' do |g|
|
9
|
+
g.desc 'Grant users access to a custom slack function if its permission_type is set to named_entities'
|
10
|
+
g.long_desc %( Grant users access to a custom slack function if its permission_type is set to named_entities )
|
11
|
+
g.command 'add' do |c|
|
12
|
+
c.flag 'function_app_id', desc: 'The encoded ID of the app.'
|
13
|
+
c.flag 'function_callback_id', desc: "The callback ID defined in the function's definition file."
|
14
|
+
c.flag 'function_id', desc: 'The encoded ID of the function.'
|
15
|
+
c.flag 'user_ids', desc: 'List of encoded user IDs.'
|
16
|
+
c.action do |_global_options, options, _args|
|
17
|
+
puts JSON.dump(@client.functions_distributions_permissions_add(options))
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
g.desc 'List the access type of a custom slack function and include the users or team or org ids with access if its permission_type is set to named_entities'
|
22
|
+
g.long_desc %( List the access type of a custom slack function and include the users or team or org ids with access if its permission_type is set to named_entities )
|
23
|
+
g.command 'list' do |c|
|
24
|
+
c.flag 'function_app_id', desc: 'The encoded ID of the app.'
|
25
|
+
c.flag 'function_callback_id', desc: "The callback ID defined in the function's definition file."
|
26
|
+
c.flag 'function_id', desc: 'The encoded ID of the function.'
|
27
|
+
c.action do |_global_options, options, _args|
|
28
|
+
puts JSON.dump(@client.functions_distributions_permissions_list(options))
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
g.desc 'Revoke user access to a custom slack function if permission_type set to named_entities'
|
33
|
+
g.long_desc %( Revoke user access to a custom slack function if permission_type set to named_entities )
|
34
|
+
g.command 'remove' do |c|
|
35
|
+
c.flag 'function_app_id', desc: 'The encoded ID of the app.'
|
36
|
+
c.flag 'function_callback_id', desc: "The callback ID defined in the function's definition file."
|
37
|
+
c.flag 'function_id', desc: 'The encoded ID of the function.'
|
38
|
+
c.flag 'user_ids', desc: 'List of encoded user IDs.'
|
39
|
+
c.action do |_global_options, options, _args|
|
40
|
+
puts JSON.dump(@client.functions_distributions_permissions_remove(options))
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
g.desc 'Set the access type of a custom slack function and define the users or team or org ids to be granted access if permission_type is set to named_entities'
|
45
|
+
g.long_desc %( Set the access type of a custom slack function and define the users or team or org ids to be granted access if permission_type is set to named_entities )
|
46
|
+
g.command 'set' do |c|
|
47
|
+
c.flag 'permission_type', desc: 'The type of permission that defines how the function can be distributed.'
|
48
|
+
c.flag 'function_app_id', desc: 'The encoded ID of the app.'
|
49
|
+
c.flag 'function_callback_id', desc: "The callback ID defined in the function's definition file."
|
50
|
+
c.flag 'function_id', desc: 'The encoded ID of the function.'
|
51
|
+
c.flag 'org_ids', desc: 'List of org IDs to allow for named_entities permission.'
|
52
|
+
c.flag 'team_ids', desc: 'List of team IDs to allow for named_entities permission.'
|
53
|
+
c.flag 'user_ids', desc: 'List of encoded user IDs.'
|
54
|
+
c.action do |_global_options, options, _args|
|
55
|
+
puts JSON.dump(@client.functions_distributions_permissions_set(options))
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file was auto-generated by lib/tasks/web.rake
|
3
|
+
|
4
|
+
module Slack
|
5
|
+
module Cli
|
6
|
+
class App
|
7
|
+
desc 'FunctionsWorkflowsSteps methods.'
|
8
|
+
command 'functions_workflows_steps' do |g|
|
9
|
+
g.desc "List the steps of a specific function of a workflow's versions"
|
10
|
+
g.long_desc %( List the steps of a specific function of a workflow's versions )
|
11
|
+
g.command 'list' do |c|
|
12
|
+
c.flag 'function_id', desc: 'The ID of the function to query.'
|
13
|
+
c.flag 'workflow', desc: 'The workflow encoded ID or workflow reference.'
|
14
|
+
c.flag 'workflow_app_id', desc: 'The app tied to the workflow reference.'
|
15
|
+
c.flag 'workflow_id', desc: 'The workflow ID, starts with Wf*.'
|
16
|
+
c.action do |_global_options, options, _args|
|
17
|
+
puts JSON.dump(@client.functions_workflows_steps_list(options))
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file was auto-generated by lib/tasks/web.rake
|
3
|
+
|
4
|
+
module Slack
|
5
|
+
module Cli
|
6
|
+
class App
|
7
|
+
desc 'FunctionsWorkflowsStepsResponses methods.'
|
8
|
+
command 'functions_workflows_steps_responses' do |g|
|
9
|
+
g.desc 'Download form responses of a workflow'
|
10
|
+
g.long_desc %( Download form responses of a workflow )
|
11
|
+
g.command 'export' do |c|
|
12
|
+
c.flag 'step_id', desc: 'The ID of the OpenForm step to export.'
|
13
|
+
c.flag 'workflow', desc: 'The workflow encoded ID or workflow reference.'
|
14
|
+
c.flag 'workflow_app_id', desc: 'The app tied to the workflow reference.'
|
15
|
+
c.flag 'workflow_id', desc: 'The workflow ID, starts with Wf*.'
|
16
|
+
c.action do |_global_options, options, _args|
|
17
|
+
puts JSON.dump(@client.functions_workflows_steps_responses_export(options))
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|