slack-ruby-client 2.4.0 → 2.5.1
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 +4 -4
- data/.github/workflows/test.yml +1 -0
- data/.github/workflows/update_api.yml +2 -2
- data/.rubocop_todo.yml +47 -16
- data/CHANGELOG.md +30 -13
- data/CONTRIBUTING.md +7 -7
- data/Gemfile +1 -0
- data/README.md +41 -23
- data/bin/commands/admin_conversations.rb +21 -0
- data/bin/commands/admin_users_session.rb +1 -1
- data/bin/commands/admin_workflows.rb +3 -1
- data/bin/commands/admin_workflows_triggers_types_permissions.rb +4 -4
- data/bin/commands/assistant_threads.rb +45 -0
- data/bin/commands/bookmarks.rb +1 -0
- data/bin/commands/canvases.rb +4 -4
- data/bin/commands/canvases_access.rb +3 -3
- data/bin/commands/chat.rb +7 -3
- data/bin/commands/conversations.rb +5 -5
- data/bin/commands/conversations_canvases.rb +2 -2
- data/bin/commands/conversations_requestSharedInvite.rb +48 -0
- data/bin/commands/files.rb +2 -1
- data/bin/commands/usergroups.rb +5 -0
- data/bin/commands/usergroups_users.rb +2 -0
- data/examples/files_upload_v2/.env.example +1 -0
- data/examples/files_upload_v2/Gemfile +5 -0
- data/examples/files_upload_v2/README.md +13 -0
- data/examples/files_upload_v2/files_upload_v2.rb +37 -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/messages/formatting.rb +1 -1
- data/lib/slack/version.rb +1 -1
- data/lib/slack/web/api/endpoints/admin_conversations.rb +35 -0
- data/lib/slack/web/api/endpoints/admin_users_session.rb +2 -3
- data/lib/slack/web/api/endpoints/admin_workflows.rb +5 -1
- data/lib/slack/web/api/endpoints/admin_workflows_triggers_types_permissions.rb +2 -2
- data/lib/slack/web/api/endpoints/assistant_threads.rb +68 -0
- data/lib/slack/web/api/endpoints/bookmarks.rb +2 -0
- data/lib/slack/web/api/endpoints/canvases.rb +2 -2
- data/lib/slack/web/api/endpoints/canvases_access.rb +4 -4
- data/lib/slack/web/api/endpoints/chat.rb +11 -3
- data/lib/slack/web/api/endpoints/conversations.rb +4 -4
- data/lib/slack/web/api/endpoints/conversations_canvases.rb +1 -1
- data/lib/slack/web/api/endpoints/conversations_requestSharedInvite.rb +73 -0
- data/lib/slack/web/api/endpoints/files.rb +3 -1
- data/lib/slack/web/api/endpoints/usergroups.rb +10 -0
- data/lib/slack/web/api/endpoints/usergroups_users.rb +4 -0
- data/lib/slack/web/api/endpoints.rb +4 -0
- data/lib/slack/web/api/errors.rb +48 -4
- data/lib/slack/web/api/helpers/files.rb +87 -0
- data/lib/slack/web/api/helpers.rb +13 -0
- data/lib/slack/web/api/templates/method.erb +1 -1
- data/lib/slack/web/api/templates/method_spec.erb +4 -5
- data/lib/slack/web/client.rb +1 -0
- data/lib/slack/web/faraday/connection.rb +13 -26
- data/lib/slack/web/faraday/options.rb +24 -0
- data/lib/slack/web/faraday/request.rb +2 -1
- data/lib/slack-ruby-client.rb +2 -0
- data/lib/tasks/web.rake +1 -3
- data/slack-ruby-client.gemspec +2 -1
- metadata +32 -154
- data/screenshots/create-app.png +0 -0
- data/spec/fixtures/slack/web/429_error.yml +0 -81
- data/spec/fixtures/slack/web/auth_test_error.yml +0 -81
- data/spec/fixtures/slack/web/auth_test_success.yml +0 -81
- data/spec/fixtures/slack/web/conversations_info.yml +0 -167
- data/spec/fixtures/slack/web/conversations_setTopic.yml +0 -84
- data/spec/fixtures/slack/web/conversations_setTopic_one_page.yml +0 -172
- data/spec/fixtures/slack/web/conversations_setTopic_paginated.yml +0 -253
- data/spec/fixtures/slack/web/paginated_users_list.yml +0 -613
- data/spec/fixtures/slack/web/rtm_connect.yml +0 -391
- data/spec/fixtures/slack/web/users_info.yml +0 -214
- data/spec/fixtures/slack/web/users_list.yml +0 -133
- data/spec/fixtures/slack/web/views_open_error.yml +0 -83
- data/spec/integration/integration_spec.rb +0 -207
- data/spec/slack/config_spec.rb +0 -16
- data/spec/slack/events/config_spec.rb +0 -35
- data/spec/slack/events/request_spec.rb +0 -199
- data/spec/slack/messages/formatting_spec.rb +0 -156
- data/spec/slack/real_time/api/message_spec.rb +0 -20
- data/spec/slack/real_time/api/ping_spec.rb +0 -17
- data/spec/slack/real_time/api/typing_spec.rb +0 -19
- data/spec/slack/real_time/client_spec.rb +0 -601
- data/spec/slack/real_time/concurrency/clients/async_spec.rb +0 -16
- data/spec/slack/real_time/concurrency/it_behaves_like_a_realtime_socket.rb +0 -21
- data/spec/slack/real_time/concurrency/with_concurrency_spec.rb +0 -10
- data/spec/slack/real_time/concurrency/without_concurrency_spec.rb +0 -10
- data/spec/slack/real_time/event_handlers/bot_spec.rb +0 -47
- data/spec/slack/real_time/event_handlers/event_handlers_spec.rb +0 -16
- data/spec/slack/real_time/event_handlers/im_spec.rb +0 -51
- data/spec/slack/real_time/event_handlers/private_channel_spec.rb +0 -99
- data/spec/slack/real_time/event_handlers/public_channel_spec.rb +0 -123
- data/spec/slack/real_time/event_handlers/team_spec.rb +0 -63
- data/spec/slack/real_time/event_handlers/user_spec.rb +0 -65
- data/spec/slack/real_time/rtm_connect_spec.rb +0 -14
- data/spec/slack/real_time/stores/store_spec.rb +0 -50
- data/spec/slack/slack_spec.rb +0 -93
- data/spec/slack/version_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/admin_analytics_spec.rb +0 -13
- data/spec/slack/web/api/endpoints/admin_apps_activities_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/admin_apps_approved_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/admin_apps_config_spec.rb +0 -18
- data/spec/slack/web/api/endpoints/admin_apps_requests_spec.rb +0 -13
- data/spec/slack/web/api/endpoints/admin_apps_restricted_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/admin_apps_spec.rb +0 -18
- data/spec/slack/web/api/endpoints/admin_audit_anomaly_allow_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/admin_auth_policy_spec.rb +0 -35
- data/spec/slack/web/api/endpoints/admin_barriers_spec.rb +0 -38
- data/spec/slack/web/api/endpoints/admin_conversations_ekm_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/admin_conversations_restrictAccess_spec.rb +0 -32
- data/spec/slack/web/api/endpoints/admin_conversations_spec.rb +0 -133
- data/spec/slack/web/api/endpoints/admin_emoji_spec.rb +0 -37
- data/spec/slack/web/api/endpoints/admin_functions_permissions_spec.rb +0 -21
- data/spec/slack/web/api/endpoints/admin_functions_spec.rb +0 -13
- data/spec/slack/web/api/endpoints/admin_inviteRequests_approved_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/admin_inviteRequests_denied_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/admin_inviteRequests_spec.rb +0 -18
- data/spec/slack/web/api/endpoints/admin_roles_spec.rb +0 -30
- data/spec/slack/web/api/endpoints/admin_teams_admins_spec.rb +0 -13
- data/spec/slack/web/api/endpoints/admin_teams_owners_spec.rb +0 -13
- data/spec/slack/web/api/endpoints/admin_teams_settings_spec.rb +0 -53
- data/spec/slack/web/api/endpoints/admin_teams_spec.rb +0 -16
- data/spec/slack/web/api/endpoints/admin_usergroups_spec.rb +0 -37
- data/spec/slack/web/api/endpoints/admin_users_session_spec.rb +0 -41
- data/spec/slack/web/api/endpoints/admin_users_spec.rb +0 -67
- data/spec/slack/web/api/endpoints/admin_users_unsupportedVersions_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/admin_workflows_collaborators_spec.rb +0 -24
- data/spec/slack/web/api/endpoints/admin_workflows_permissions_spec.rb +0 -13
- data/spec/slack/web/api/endpoints/admin_workflows_spec.rb +0 -13
- data/spec/slack/web/api/endpoints/admin_workflows_triggers_types_permissions_spec.rb +0 -21
- data/spec/slack/web/api/endpoints/api_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/apps_activities_spec.rb +0 -13
- data/spec/slack/web/api/endpoints/apps_auth_external_spec.rb +0 -13
- data/spec/slack/web/api/endpoints/apps_connections_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/apps_datastore_spec.rb +0 -74
- data/spec/slack/web/api/endpoints/apps_event_authorizations_spec.rb +0 -13
- data/spec/slack/web/api/endpoints/apps_manifest_spec.rb +0 -44
- data/spec/slack/web/api/endpoints/apps_spec.rb +0 -16
- data/spec/slack/web/api/endpoints/auth_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/auth_teams_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/bookmarks_spec.rb +0 -40
- data/spec/slack/web/api/endpoints/bots_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/calls_participants_spec.rb +0 -24
- data/spec/slack/web/api/endpoints/calls_spec.rb +0 -31
- data/spec/slack/web/api/endpoints/canvases_access_spec.rb +0 -21
- data/spec/slack/web/api/endpoints/canvases_sections_spec.rb +0 -16
- data/spec/slack/web/api/endpoints/canvases_spec.rb +0 -21
- data/spec/slack/web/api/endpoints/chat_scheduledMessages_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/chat_spec.rb +0 -134
- data/spec/slack/web/api/endpoints/conversations_canvases_spec.rb +0 -13
- data/spec/slack/web/api/endpoints/conversations_externalInvitePermissions_spec.rb +0 -19
- data/spec/slack/web/api/endpoints/conversations_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/custom_specs/auth_spec.rb +0 -27
- data/spec/slack/web/api/endpoints/custom_specs/chat_spec.rb +0 -206
- data/spec/slack/web/api/endpoints/custom_specs/conversations_spec.rb +0 -13
- data/spec/slack/web/api/endpoints/custom_specs/dialog_spec.rb +0 -40
- data/spec/slack/web/api/endpoints/custom_specs/users_spec.rb +0 -38
- data/spec/slack/web/api/endpoints/custom_specs/views_spec.rb +0 -112
- data/spec/slack/web/api/endpoints/dialog_spec.rb +0 -14
- data/spec/slack/web/api/endpoints/dnd_spec.rb +0 -18
- data/spec/slack/web/api/endpoints/emoji_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/files_comments_spec.rb +0 -16
- data/spec/slack/web/api/endpoints/files_remote_spec.rb +0 -24
- data/spec/slack/web/api/endpoints/files_spec.rb +0 -57
- data/spec/slack/web/api/endpoints/functions_distributions_permissions_spec.rb +0 -10
- data/spec/slack/web/api/endpoints/functions_spec.rb +0 -28
- data/spec/slack/web/api/endpoints/functions_workflows_steps_responses_spec.rb +0 -13
- data/spec/slack/web/api/endpoints/functions_workflows_steps_spec.rb +0 -13
- data/spec/slack/web/api/endpoints/migration_spec.rb +0 -13
- data/spec/slack/web/api/endpoints/oauth_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/oauth_v2_spec.rb +0 -16
- data/spec/slack/web/api/endpoints/openid_connect_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/pins_spec.rb +0 -23
- data/spec/slack/web/api/endpoints/reactions_spec.rb +0 -24
- data/spec/slack/web/api/endpoints/reminders_spec.rb +0 -31
- data/spec/slack/web/api/endpoints/rtm_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/search_spec.rb +0 -23
- data/spec/slack/web/api/endpoints/stars_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/team_billing_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/team_externalTeams_spec.rb +0 -13
- data/spec/slack/web/api/endpoints/team_preferences_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/team_profile_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/team_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/tooling_tokens_spec.rb +0 -13
- data/spec/slack/web/api/endpoints/usergroups_spec.rb +0 -28
- data/spec/slack/web/api/endpoints/usergroups_users_spec.rb +0 -21
- data/spec/slack/web/api/endpoints/users_admin_spec.rb +0 -18
- data/spec/slack/web/api/endpoints/users_discoverableContacts_spec.rb +0 -13
- data/spec/slack/web/api/endpoints/users_prefs_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/users_profile_spec.rb +0 -14
- data/spec/slack/web/api/endpoints/users_spec.rb +0 -8
- data/spec/slack/web/api/endpoints/views_spec.rb +0 -65
- data/spec/slack/web/api/endpoints/workflows_spec.rb +0 -34
- data/spec/slack/web/api/endpoints/workflows_triggers_permissions_spec.rb +0 -31
- data/spec/slack/web/api/error_spec.rb +0 -14
- data/spec/slack/web/api/errors/slack_error_spec.rb +0 -33
- data/spec/slack/web/api/mixins/conversations_list_spec.rb +0 -21
- data/spec/slack/web/api/mixins/conversations_spec.rb +0 -45
- data/spec/slack/web/api/mixins/users_spec.rb +0 -52
- data/spec/slack/web/api/options_spec.rb +0 -69
- data/spec/slack/web/api/pagination/cursor_spec.rb +0 -102
- data/spec/slack/web/client_spec.rb +0 -359
- data/spec/slack/web/faraday/request_spec.rb +0 -80
- data/spec/slack/web/faraday/response/raise_error_spec.rb +0 -86
- data/spec/spec_helper.rb +0 -30
- data/spec/support/queue_with_timeout.rb +0 -35
- data/spec/support/real_time/concurrency/mock.rb +0 -31
- data/spec/support/real_time/connected_client.rb +0 -21
- data/spec/support/real_time/event.rb +0 -12
- data/spec/support/real_time/loaded_client.rb +0 -120
- data/spec/support/token.rb +0 -11
- data/spec/support/vcr.rb +0 -45
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 26da07098b43509aec00e5ce7e280ff83b055cae435c2f13b7e7528200356191
|
4
|
+
data.tar.gz: 9982a63021be02cd1caf07d6ee44d4fc5f8be64c10b6bfbadae153ed4201db59
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bf976826d6f95ed2da12a61c42fd1f18c73b8f8065dc4471723ae85c11a89b764cf0a2bd0f422c634a1206ac24e8d9c1fdb68b25a5eeb93fd0957ee1094bd470
|
7
|
+
data.tar.gz: 9ac701bc529f369b2051d70afeedcbc05305740199fd03dd572749ff28d9df8d73c7e583e26fafc7c757b74d631c4bca3d3f73970e2571dc52c7fa925d4a1a3c
|
data/.github/workflows/test.yml
CHANGED
@@ -12,6 +12,7 @@ jobs:
|
|
12
12
|
- { ruby: "3.1" }
|
13
13
|
- { ruby: "3.2" }
|
14
14
|
- { ruby: "3.3" }
|
15
|
+
- { ruby: "3.4" }
|
15
16
|
- { ruby: ruby-head, ignore: true }
|
16
17
|
- { ruby: jruby-head, ignore: true }
|
17
18
|
name: test (ruby=${{ matrix.entry.ruby }}${{ matrix.entry.concurrency && ', concurrency=' }}${{ matrix.entry.concurrency }})
|
@@ -42,7 +42,7 @@ jobs:
|
|
42
42
|
installation_id: 36985419
|
43
43
|
- name: Create pull request
|
44
44
|
id: cpr
|
45
|
-
uses: peter-evans/create-pull-request@
|
45
|
+
uses: peter-evans/create-pull-request@v7
|
46
46
|
with:
|
47
47
|
token: ${{ secrets.GITHUB_TOKEN }}
|
48
48
|
commit-message: Update API from slack-api-ref@${{ steps.api-ref.outputs.api-ref }} (${{ steps.date.outputs.date }})
|
@@ -66,7 +66,7 @@ jobs:
|
|
66
66
|
with:
|
67
67
|
include: CHANGELOG.md
|
68
68
|
find: "\\* Your contribution here."
|
69
|
-
replace: "* [#${{steps.cpr.outputs.pull-request-number}}](https://github.com/slack-ruby-client/
|
69
|
+
replace: "* [#${{steps.cpr.outputs.pull-request-number}}](https://github.com/slack-ruby/slack-ruby-client/pull/${{steps.cpr.outputs.pull-request-number}}): Update API from [slack-api-ref@${{ steps.api-ref.outputs.api-ref }}](https://github.com/slack-ruby/slack-api-ref/commit/${{ steps.api-ref.outputs.api-ref }}) - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).\n* Your contribution here."
|
70
70
|
- name: Commit and Push
|
71
71
|
if: ${{ steps.cpr.outputs.pull-request-number != '' }}
|
72
72
|
run: |
|
data/.rubocop_todo.yml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on
|
3
|
+
# on 2025-02-11 15:48:56 UTC using RuboCop version 1.26.1.
|
4
4
|
# The point is for the user to remove these configuration records
|
5
5
|
# one by one as the offenses are removed from the code base.
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
@@ -44,30 +44,42 @@ Lint/RedundantCopDisableDirective:
|
|
44
44
|
Exclude:
|
45
45
|
- 'lib/slack-ruby-client.rb'
|
46
46
|
|
47
|
-
# Offense count:
|
47
|
+
# Offense count: 13
|
48
48
|
# Configuration parameters: IgnoredMethods, CountRepeatedAttributes.
|
49
49
|
Metrics/AbcSize:
|
50
|
-
Max:
|
50
|
+
Max: 58
|
51
51
|
|
52
|
-
# Offense count:
|
52
|
+
# Offense count: 6
|
53
53
|
# Configuration parameters: IgnoredMethods.
|
54
54
|
Metrics/CyclomaticComplexity:
|
55
|
-
Max:
|
55
|
+
Max: 11
|
56
56
|
|
57
|
-
# Offense count:
|
57
|
+
# Offense count: 15
|
58
58
|
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
|
59
59
|
Metrics/MethodLength:
|
60
|
-
Max:
|
60
|
+
Max: 35
|
61
61
|
|
62
62
|
# Offense count: 1
|
63
63
|
# Configuration parameters: CountKeywordArgs, MaxOptionalParameters.
|
64
64
|
Metrics/ParameterLists:
|
65
65
|
Max: 6
|
66
66
|
|
67
|
-
# Offense count:
|
67
|
+
# Offense count: 3
|
68
68
|
# Configuration parameters: IgnoredMethods.
|
69
69
|
Metrics/PerceivedComplexity:
|
70
|
-
Max:
|
70
|
+
Max: 12
|
71
|
+
|
72
|
+
# Offense count: 1
|
73
|
+
# Configuration parameters: MinSize.
|
74
|
+
Performance/CollectionLiteralInLoop:
|
75
|
+
Exclude:
|
76
|
+
- 'spec/slack/web/api/endpoints/custom/files_spec.rb'
|
77
|
+
|
78
|
+
# Offense count: 1
|
79
|
+
# This cop supports safe auto-correction (--auto-correct).
|
80
|
+
Performance/MapCompact:
|
81
|
+
Exclude:
|
82
|
+
- 'lib/slack/web/api/helpers/files.rb'
|
71
83
|
|
72
84
|
# Offense count: 2
|
73
85
|
# This cop supports safe auto-correction (--auto-correct).
|
@@ -81,20 +93,20 @@ Performance/StringInclude:
|
|
81
93
|
Exclude:
|
82
94
|
- 'lib/tasks/web.rake'
|
83
95
|
|
84
|
-
# Offense count:
|
96
|
+
# Offense count: 9
|
85
97
|
# This cop supports safe auto-correction (--auto-correct).
|
86
98
|
RSpec/ContextMethod:
|
87
99
|
Exclude:
|
88
100
|
- 'spec/slack/messages/formatting_spec.rb'
|
89
101
|
- 'spec/slack/web/api/mixins/users_spec.rb'
|
90
102
|
|
91
|
-
# Offense count:
|
103
|
+
# Offense count: 84
|
92
104
|
# Configuration parameters: Prefixes.
|
93
105
|
# Prefixes: when, with, without
|
94
106
|
RSpec/ContextWording:
|
95
107
|
Enabled: false
|
96
108
|
|
97
|
-
# Offense count:
|
109
|
+
# Offense count: 72
|
98
110
|
# Configuration parameters: CountAsOne.
|
99
111
|
RSpec/ExampleLength:
|
100
112
|
Max: 18
|
@@ -105,13 +117,13 @@ RSpec/ExampleLength:
|
|
105
117
|
RSpec/FilePath:
|
106
118
|
Enabled: false
|
107
119
|
|
108
|
-
# Offense count:
|
120
|
+
# Offense count: 74
|
109
121
|
# Configuration parameters: .
|
110
122
|
# SupportedStyles: have_received, receive
|
111
123
|
RSpec/MessageSpies:
|
112
124
|
EnforcedStyle: receive
|
113
125
|
|
114
|
-
# Offense count:
|
126
|
+
# Offense count: 97
|
115
127
|
RSpec/MultipleExpectations:
|
116
128
|
Max: 5
|
117
129
|
|
@@ -130,11 +142,12 @@ RSpec/NamedSubject:
|
|
130
142
|
RSpec/NestedGroups:
|
131
143
|
Max: 6
|
132
144
|
|
133
|
-
# Offense count:
|
145
|
+
# Offense count: 6
|
134
146
|
RSpec/StubbedMock:
|
135
147
|
Exclude:
|
136
148
|
- 'spec/slack/real_time/client_spec.rb'
|
137
149
|
- 'spec/slack/real_time/event_handlers/event_handlers_spec.rb'
|
150
|
+
- 'spec/slack/web/api/endpoints/custom/conversations_spec.rb'
|
138
151
|
- 'spec/slack/web/api/pagination/cursor_spec.rb'
|
139
152
|
- 'spec/slack/web/client_spec.rb'
|
140
153
|
|
@@ -166,6 +179,13 @@ Rake/Desc:
|
|
166
179
|
Exclude:
|
167
180
|
- 'lib/tasks/git.rake'
|
168
181
|
|
182
|
+
# Offense count: 1
|
183
|
+
# Configuration parameters: EnforcedStyle, AllowModifiersOnSymbols.
|
184
|
+
# SupportedStyles: inline, group
|
185
|
+
Style/AccessModifierDeclarations:
|
186
|
+
Exclude:
|
187
|
+
- 'lib/slack/real_time/client.rb'
|
188
|
+
|
169
189
|
# Offense count: 4
|
170
190
|
# Configuration parameters: MaxUnannotatedPlaceholdersAllowed, IgnoredMethods.
|
171
191
|
# SupportedStyles: annotated, template, unannotated
|
@@ -181,6 +201,17 @@ Style/GlobalStdStream:
|
|
181
201
|
- 'spec/integration/integration_spec.rb'
|
182
202
|
- 'spec/slack/web/client_spec.rb'
|
183
203
|
|
204
|
+
# Offense count: 1
|
205
|
+
# This cop supports unsafe auto-correction (--auto-correct-all).
|
206
|
+
Style/MapToHash:
|
207
|
+
Exclude:
|
208
|
+
- 'spec/slack/web/api/endpoints/custom/files_spec.rb'
|
209
|
+
|
210
|
+
# Offense count: 1
|
211
|
+
Style/MultilineBlockChain:
|
212
|
+
Exclude:
|
213
|
+
- 'lib/slack/web/api/helpers/files.rb'
|
214
|
+
|
184
215
|
# Offense count: 1
|
185
216
|
# This cop supports safe auto-correction (--auto-correct).
|
186
217
|
Style/MultilineTernaryOperator:
|
@@ -190,7 +221,7 @@ Style/MultilineTernaryOperator:
|
|
190
221
|
# Offense count: 3
|
191
222
|
Style/OpenStructUse:
|
192
223
|
Exclude:
|
193
|
-
- 'spec/slack/web/api/endpoints/
|
224
|
+
- 'spec/slack/web/api/endpoints/custom/chat_spec.rb'
|
194
225
|
- 'spec/slack/web/api/pagination/cursor_spec.rb'
|
195
226
|
- 'spec/slack/web/faraday/response/raise_error_spec.rb'
|
196
227
|
|
data/CHANGELOG.md
CHANGED
@@ -1,16 +1,33 @@
|
|
1
|
+
### 2.5.1 (2025/02/11)
|
2
|
+
|
3
|
+
* [#542](https://github.com/slack-ruby/slack-ruby-client/pull/542): Add support for ruby 3.4 - [@dblock](https://github.com/dblock).
|
4
|
+
* [#544](https://github.com/slack-ruby/slack-ruby-client/pull/544): Fix: do not resolve channel name for `chat_postMessage` - [@dblock](https://github.com/dblock).
|
5
|
+
|
6
|
+
### 2.5.0 (2025/02/09)
|
7
|
+
|
8
|
+
* [#525](https://github.com/slack-ruby/slack-ruby-client/pull/525): Exclude spec files from gem package - [@amatsuda](https://github.com/amatsuda).
|
9
|
+
* [#527](https://github.com/slack-ruby/slack-ruby-client/pull/527): Explicitly require `racc` and `ostruct` - [@dblock](https://github.com/dblock).
|
10
|
+
* [#528](https://github.com/slack-ruby/slack-ruby-client/pull/528): Don't treat asterisks in list items as italic in markdown - [@rspeicher](https://github.com/rspeicher).
|
11
|
+
* [#530](https://github.com/slack-ruby/slack-ruby-client/pull/530): Specify dependency on `logger` - [@rwstauner](https://github.com/rwstauner).
|
12
|
+
* [#533](https://github.com/slack-ruby/slack-ruby-client/pull/533), [#536](https://github.com/slack-ruby/slack-ruby-client/pull/536): Added `files_upload_v2` - [@gregsaab](https://github.com/gregsaab).
|
13
|
+
* [#538](https://github.com/slack-ruby/slack-ruby-client/pull/538): Translate channel names and support an array of channels in `files_upload_v2` - [@dblock](https://github.com/dblock).
|
14
|
+
* [#540](https://github.com/slack-ruby/slack-ruby-client/pull/540): Added support for `channel` and `channel_id`, do not require channel in `files_upload_v2` - [@dblock](https://github.com/dblock).
|
15
|
+
* [#541](https://github.com/slack-ruby/slack-ruby-client/pull/541): Added samples for `oauth_v2` and `files_upload_v2` - [@dblock](https://github.com/dblock).
|
16
|
+
* [#524](https://github.com/slack-ruby/slack-ruby-client/pull/524): Update API from [slack-api-ref@3ec3c10](https://github.com/slack-ruby/slack-api-ref/commit/3ec3c10) - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
|
17
|
+
|
1
18
|
### 2.4.0 (2024/07/14)
|
2
19
|
|
3
20
|
* [#516](https://github.com/slack-ruby/slack-ruby-client/pull/516): Add support for Ruby 3.3 - [@olleolleolle](https://github.com/olleolleolle).
|
4
21
|
* [#520](https://github.com/slack-ruby/slack-ruby-client/pull/520): Add support for basic markdown formatting - [@nbgoodall](https://github.com/nbgoodall).
|
5
22
|
* [#523](https://github.com/slack-ruby/slack-ruby-client/pull/523): Fix coveralls handling parallel jobs - [@dblock](https://github.com/dblock).
|
6
|
-
* [#522](https://github.com/slack-ruby-client/
|
23
|
+
* [#522](https://github.com/slack-ruby/slack-ruby-client/pull/522): Update API from [slack-api-ref@8a22e57](https://github.com/slack-ruby/slack-api-ref/commit/8a22e57) - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
|
7
24
|
|
8
25
|
### 2.3.0 (2024/01/31)
|
9
26
|
|
10
27
|
* [#494](https://github.com/slack-ruby/slack-ruby-client/pull/494): Configure Dependabot to update GitHub Actions - [@olleolleolle](https://github.com/olleolleolle).
|
11
28
|
* [#508](https://github.com/slack-ruby/slack-ruby-client/pull/508): Fix `Slack::Events::Request#verify!` compatibility with Rack 3.x - [@dblock](https://github.com/dblock).
|
12
29
|
* [#503](https://github.com/slack-ruby/slack-ruby-client/pull/503): Update Slack API Update API from [slack-api-ref@bc545649](https://github.com/slack-ruby/slack-api-ref/commit/bc545649) - [@dblock](https://github.com/dblock).
|
13
|
-
* [#504](https://github.com/slack-ruby-client/
|
30
|
+
* [#504](https://github.com/slack-ruby/slack-ruby-client/pull/504): Update API from [slack-api-ref@bc54564](https://github.com/slack-ruby/slack-api-ref/commit/bc54564) - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
|
14
31
|
|
15
32
|
### 2.2.0 (2023/09/17)
|
16
33
|
|
@@ -19,20 +36,20 @@
|
|
19
36
|
* [#454](https://github.com/slack-ruby/slack-ruby-client/pull/454): Added `Slack::Messages::Formatting#escape` - [@marfoldi](https://github.com/marfoldi).
|
20
37
|
* [#452](https://github.com/slack-ruby/slack-ruby-client/pull/452): Automatically generate Web API multi-argument requirements from docs - [@jmanian](https://github.com/jmanian).
|
21
38
|
* [#448](https://github.com/slack-ruby/slack-ruby-client/pull/448), [#453](https://github.com/slack-ruby/slack-ruby-client/pull/453): Automatically convert more Web API arguments to JSON-encoded strings - [@jmanian](https://github.com/jmanian).
|
22
|
-
* [#465](https://github.com/slack-ruby-client/
|
23
|
-
* [#473](https://github.com/slack-ruby-client/
|
24
|
-
* [#474](https://github.com/slack-ruby-client/
|
25
|
-
* [#475](https://github.com/slack-ruby-client/
|
26
|
-
* [#476](https://github.com/slack-ruby-client/
|
27
|
-
* [#478](https://github.com/slack-ruby-client/
|
28
|
-
* [#480](https://github.com/slack-ruby-client/
|
29
|
-
* [#481](https://github.com/slack-ruby-client/
|
30
|
-
* [#488](https://github.com/slack-ruby-client/
|
39
|
+
* [#465](https://github.com/slack-ruby/slack-ruby-client/pull/465): Update API from [slack-api-ref@878be8f](https://github.com/slack-ruby/slack-api-ref/commit/878be8f) - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
|
40
|
+
* [#473](https://github.com/slack-ruby/slack-ruby-client/pull/473): Update API from [slack-api-ref@a29b520](https://github.com/slack-ruby/slack-api-ref/commit/a29b520) - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
|
41
|
+
* [#474](https://github.com/slack-ruby/slack-ruby-client/pull/474): Update API from [slack-api-ref@629967e](https://github.com/slack-ruby/slack-api-ref/commit/629967e) - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
|
42
|
+
* [#475](https://github.com/slack-ruby/slack-ruby-client/pull/475): Update API from [slack-api-ref@977dad5](https://github.com/slack-ruby/slack-api-ref/commit/977dad5) - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
|
43
|
+
* [#476](https://github.com/slack-ruby/slack-ruby-client/pull/476): Update API from [slack-api-ref@d0b2989](https://github.com/slack-ruby/slack-api-ref/commit/d0b2989) - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
|
44
|
+
* [#478](https://github.com/slack-ruby/slack-ruby-client/pull/478): Update API from [slack-api-ref@d797055](https://github.com/slack-ruby/slack-api-ref/commit/d797055) - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
|
45
|
+
* [#480](https://github.com/slack-ruby/slack-ruby-client/pull/480): Add common message formatting utilities - [@chrisbloom7](https://github.com/chrisbloom7).
|
46
|
+
* [#481](https://github.com/slack-ruby/slack-ruby-client/pull/481): Update API from [slack-api-ref@7c22d0b](https://github.com/slack-ruby/slack-api-ref/commit/7c22d0b) - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
|
47
|
+
* [#488](https://github.com/slack-ruby/slack-ruby-client/pull/488): Update API from [slack-api-ref@a45def2](https://github.com/slack-ruby/slack-api-ref/commit/a45def2) - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
|
31
48
|
* [#490](https://github.com/slack-ruby/slack-ruby-client/pull/490): Add changelog uri to gemspec - [@MatheusRich](https://github.com/MatheusRich).
|
32
49
|
* [#491](https://github.com/slack-ruby/slack-ruby-client/pull/491): Added code coverage - [@dblock](https://github.com/dblock).
|
33
50
|
* [#486](https://github.com/slack-ruby/slack-ruby-client/pull/486): Async handler support for Slack::RealTime::Config and Client - [@milestruecar](https://github.com/milestruecar).
|
34
|
-
* [#489](https://github.com/slack-ruby-client/
|
35
|
-
* [#493](https://github.com/slack-ruby-client/
|
51
|
+
* [#489](https://github.com/slack-ruby/slack-ruby-client/pull/489): Update API from [slack-api-ref@0d3f0b6](https://github.com/slack-ruby/slack-api-ref/commit/0d3f0b6) - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
|
52
|
+
* [#493](https://github.com/slack-ruby/slack-ruby-client/pull/493): Update API from [slack-api-ref@f2e768a](https://github.com/slack-ruby/slack-api-ref/commit/f2e768a) - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
|
36
53
|
|
37
54
|
### 2.1.0 (2023/03/17)
|
38
55
|
|
data/CONTRIBUTING.md
CHANGED
@@ -27,15 +27,15 @@ bundle exec rake
|
|
27
27
|
|
28
28
|
### Run Examples in Development
|
29
29
|
|
30
|
-
Sign up for Slack, create a private
|
30
|
+
Sign up for Slack, create a private Slack team for yourself, then [generate an API token](https://api.slack.com/tutorials/tracks/getting-a-token) for your app and use it for some interactions.
|
31
31
|
|
32
|
-
|
32
|
+
Try running the examples in the [examples](examples) directory.
|
33
33
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
34
|
+
```bash
|
35
|
+
cd examples/hi_web
|
36
|
+
bundle install
|
37
|
+
SLACK_API_TOKEN=... bundle exec ruby hi.rb
|
38
|
+
```
|
39
39
|
|
40
40
|
## Contribute Code
|
41
41
|
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -54,14 +54,14 @@ A Ruby client for the Slack [Web](https://api.slack.com/web), [RealTime Messagin
|
|
54
54
|
- [Verifying the Request Signature](#verifying-the-request-signature)
|
55
55
|
- [Message Handling](#message-handling)
|
56
56
|
- [Formatting Messages](#formatting-messages)
|
57
|
-
- [Date and
|
58
|
-
- [Channel ID
|
59
|
-
- [User ID
|
60
|
-
- [URL
|
61
|
-
- [Markdown
|
57
|
+
- [Date and Time Formatting](#date-and-time-formatting)
|
58
|
+
- [Channel ID Formatting](#channel-id-formatting)
|
59
|
+
- [User ID Formatting](#user-id-formatting)
|
60
|
+
- [URL Formatting](#url-formatting)
|
61
|
+
- [Markdown Formatting](#markdown-formatting)
|
62
62
|
- [Parsing Messages](#parsing-messages)
|
63
|
-
- [Unescaping
|
64
|
-
- [Escaping
|
63
|
+
- [Unescaping Message Content](#unescaping-message-content)
|
64
|
+
- [Escaping Message Content](#escaping-message-content)
|
65
65
|
- [Command-Line Client](#command-line-client)
|
66
66
|
- [Authenticate with Slack](#authenticate-with-slack)
|
67
67
|
- [Send a Message](#send-a-message)
|
@@ -75,14 +75,13 @@ A Ruby client for the Slack [Web](https://api.slack.com/web), [RealTime Messagin
|
|
75
75
|
|
76
76
|
## Useful to Me?
|
77
77
|
|
78
|
-
* This library
|
79
|
-
* To
|
80
|
-
* To
|
81
|
-
* To roll out a complete service using the Real Time Messaging API with Slack button integration to multiple teams, check out [slack-ruby-bot-server](https://github.com/slack-ruby/slack-ruby-bot-server), which is built on top of slack-ruby-bot, which uses this library.
|
78
|
+
* This library lets you send messages to Slack via the Web API, send and receive messages via the Real Time Messaging API, and facilitates integration with the Events API.
|
79
|
+
* To write a complete bot for Slack you need more than this library, and it's much easier to start with [slack-ruby-bot-server-events](https://github.com/slack-ruby/slack-ruby-bot-server-events).
|
80
|
+
* To respond to slash commands, interactive components, or events at the lowest level, implement a web application using your favorite web framework, and use this library to call the Slack Web API, and to verify that events are coming from Slack.
|
82
81
|
|
83
82
|
## Stable Release
|
84
83
|
|
85
|
-
You're reading the documentation for the **
|
84
|
+
You're reading the documentation for the **stable** release of slack-ruby-client, v2.5.1. See [UPGRADING](UPGRADING.md) when upgrading from an older version.
|
86
85
|
|
87
86
|
## Installation
|
88
87
|
|
@@ -106,11 +105,9 @@ Run `bundle install`.
|
|
106
105
|
|
107
106
|
To integrate your bot with Slack, you must first create a new [Slack App](https://api.slack.com/apps).
|
108
107
|
|
109
|
-

|
110
|
-
|
111
108
|
### OAuth Code Grant
|
112
109
|
|
113
|
-
Once created, go to the app's Basic Info tab and grab the Client ID and Client Secret.
|
110
|
+
Once created, go to the app's Basic Info tab and grab the Client ID and Client Secret. You'll need these in order complete an [OAuth Workflow](https://api.slack.com/authentication/oauth-v2). A working sample that starts a local web server and obtains a bot or a user token for your app using OAuth v2 is available in [examples/oauth_v2](examples/oauth_v2).
|
114
111
|
|
115
112
|
### Using an API Token
|
116
113
|
|
@@ -172,7 +169,28 @@ general_channel = channels.detect { |c| c.name == 'general' }
|
|
172
169
|
|
173
170
|
##### Upload a File
|
174
171
|
|
175
|
-
Upload
|
172
|
+
Upload files with [sequenced API calls](https://api.slack.com/messaging/files#uploading_files).
|
173
|
+
|
174
|
+
This library provides a helper method `files_upload_v2` that wraps the three separate API calls.
|
175
|
+
|
176
|
+
```ruby
|
177
|
+
client.files_upload_v2(
|
178
|
+
# required options
|
179
|
+
filename: 'results.pdf', # this is used for the file title, unless a :title option is provided
|
180
|
+
contents: File.read('/users/me/results.pdf'), # the string contents of the file
|
181
|
+
|
182
|
+
# optional options
|
183
|
+
channels: ['C000000', 'C000001'], # channel IDs to share the file in (:channel_id, :channel, or :channels are all supported)
|
184
|
+
initial_comment: 'Sharing the Q1 results :tada:', # the message that is included with the file share thread
|
185
|
+
snippet_type: 'text', # the type of snippet
|
186
|
+
title: 'Q1 Results', # sets the title of the file, overriding the filename
|
187
|
+
thread_ts: '1738331487.481469' # specifies a thread to add this file to
|
188
|
+
)
|
189
|
+
```
|
190
|
+
|
191
|
+
You can use a channel ID passed as `channel_id`, a single channel as `channel`, an array of channel IDs as `channels`, or a channel name or names (prefixed with `#`) in `files_upload_v2`. Lookup by name is not supported by the Slack API and this method called invokes `conversations_list` in order to locate the channel ID. This invocation can have a cost if you have many Slack channels and is only recommended when you intend to list channels anyway.
|
192
|
+
|
193
|
+
Note: This library includes a `files_upload` method that uses a deprecated endpoint `files.upload` that will [no longer be supported on 3/11/2025](https://api.slack.com/methods/files.upload#markdown).
|
176
194
|
|
177
195
|
```ruby
|
178
196
|
client.files_upload(
|
@@ -602,7 +620,7 @@ All text in Slack uses the same [system of formatting and escaping](https://api.
|
|
602
620
|
|
603
621
|
`Slack::Messages::Formatting` provides a number of methods for formatting objects that you can then embed in outgoing messages.
|
604
622
|
|
605
|
-
##### Date and
|
623
|
+
##### Date and Time Formatting
|
606
624
|
|
607
625
|
You can embed a pre-formatted date in a message as a string like any other text, but using Slack's date formatting allows you to display dates based on user preferences for dates and times, incorporating users' local time zones, and optionally using relative values like "yesterday", "today", or "tomorrow" when appropriate.
|
608
626
|
|
@@ -627,7 +645,7 @@ Slack::Messages::Formatting.date(date, text: 'party time!')
|
|
627
645
|
# => "<!date^1688150386^{date_num} {time_secs}|party time!>"
|
628
646
|
```
|
629
647
|
|
630
|
-
##### Channel ID
|
648
|
+
##### Channel ID Formatting
|
631
649
|
|
632
650
|
If you already know the channel name you can just embed it in the message as `#some-channel`, but if you only have the ID you can embed it using special syntax which Slack will display as the channel name (while respecting channel visibility).
|
633
651
|
|
@@ -637,7 +655,7 @@ Slack::Messages::Formatting.channel_link(channel_id)
|
|
637
655
|
# => "<#C0000000001>"
|
638
656
|
```
|
639
657
|
|
640
|
-
##### User ID
|
658
|
+
##### User ID Formatting
|
641
659
|
|
642
660
|
If you already know the user name you can just embed it in the message as `@some_username`, but if you only have the ID you can embed it using special syntax which Slack will display as the user name.
|
643
661
|
|
@@ -647,7 +665,7 @@ Slack::Messages::Formatting.user_link(user_id)
|
|
647
665
|
# => "<@U0000000001>"
|
648
666
|
```
|
649
667
|
|
650
|
-
##### URL
|
668
|
+
##### URL Formatting
|
651
669
|
|
652
670
|
Slack will automatically parse fully qualified URLs in messages, but you need special formatting to embed a link with different text.
|
653
671
|
|
@@ -658,7 +676,7 @@ Slack::Messages::Formatting.url_link(text, url)
|
|
658
676
|
# => "<https://media.giphy.com/media/AcfTF7tyikWyroP0x7/giphy.gif|party time>"
|
659
677
|
```
|
660
678
|
|
661
|
-
##### Markdown
|
679
|
+
##### Markdown Formatting
|
662
680
|
|
663
681
|
Slack uses a mishmash of regular markdown formatting with its own syntax. Some features like headings aren't supported and will be left as-is, but others like bold, strikethrough, and links are converted.
|
664
682
|
|
@@ -686,7 +704,7 @@ Slack::Messages::Formatting.markdown(text)
|
|
686
704
|
|
687
705
|
`Slack::Messages::Formatting` also provides ways to escape or unescape messages. This comes handy, for example, you want to treat all input to a real time bot as plain text.
|
688
706
|
|
689
|
-
##### Unescaping
|
707
|
+
##### Unescaping Message Content
|
690
708
|
|
691
709
|
```ruby
|
692
710
|
Slack::Messages::Formatting.unescape('Hello & <world>')
|
@@ -711,7 +729,7 @@ Slack::Messages::Formatting.unescape('‘hello’')
|
|
711
729
|
# => "'hello'"
|
712
730
|
```
|
713
731
|
|
714
|
-
##### Escaping
|
732
|
+
##### Escaping Message Content
|
715
733
|
|
716
734
|
```ruby
|
717
735
|
Slack::Messages::Formatting.escape('Hello & <world>')
|
@@ -133,6 +133,17 @@ module Slack
|
|
133
133
|
end
|
134
134
|
end
|
135
135
|
|
136
|
+
g.desc 'Link a Salesforce record to a channel'
|
137
|
+
g.long_desc %( Link a Salesforce record to a channel )
|
138
|
+
g.command 'linkObjects' do |c|
|
139
|
+
c.flag 'channel', desc: 'Channel ID for Slack channel that will be linked to a Salesforce record.'
|
140
|
+
c.flag 'record_id', desc: 'Salesforce record ID (15 or 18 digit accepted). See here for how to look up record ID.'
|
141
|
+
c.flag 'salesforce_org_id', desc: 'Salesforce org ID (15 or 18 digit accepted). See here for how to look up Salesforce org ID.'
|
142
|
+
c.action do |_global_options, options, _args|
|
143
|
+
puts JSON.dump(@client.admin_conversations_linkObjects(options))
|
144
|
+
end
|
145
|
+
end
|
146
|
+
|
136
147
|
g.desc 'Returns channels on the given team using the filters.'
|
137
148
|
g.long_desc %( Returns channels on the given team using the filters. )
|
138
149
|
g.command 'lookup' do |c|
|
@@ -222,6 +233,16 @@ module Slack
|
|
222
233
|
puts JSON.dump(@client.admin_conversations_unarchive(options))
|
223
234
|
end
|
224
235
|
end
|
236
|
+
|
237
|
+
g.desc 'Unlink a Salesforce record from a channel'
|
238
|
+
g.long_desc %( Unlink a Salesforce record from a channel )
|
239
|
+
g.command 'unlinkObjects' do |c|
|
240
|
+
c.flag 'channel', desc: 'Channel ID for Slack channel that will be unlinked from the Salesforce record.'
|
241
|
+
c.flag 'new_name', desc: 'Channel name you would like to give to the channel that is being unlinked from the Salesforce record.'
|
242
|
+
c.action do |_global_options, options, _args|
|
243
|
+
puts JSON.dump(@client.admin_conversations_unlinkObjects(options))
|
244
|
+
end
|
245
|
+
end
|
225
246
|
end
|
226
247
|
end
|
227
248
|
end
|
@@ -28,7 +28,7 @@ module Slack
|
|
28
28
|
g.long_desc %( Revoke a single session for a user. The user will be forced to login to Slack. )
|
29
29
|
g.command 'invalidate' do |c|
|
30
30
|
c.flag 'session_id', desc: 'ID of the session to invalidate.'
|
31
|
-
c.flag '
|
31
|
+
c.flag 'user_id', desc: 'ID of the user that the session belongs to.'
|
32
32
|
c.action do |_global_options, options, _args|
|
33
33
|
puts JSON.dump(@client.admin_users_session_invalidate(options))
|
34
34
|
end
|
@@ -10,16 +10,18 @@ module Slack
|
|
10
10
|
g.long_desc %( Search workflows within the team or enterprise )
|
11
11
|
g.command 'search' do |c|
|
12
12
|
c.flag 'app_id', desc: 'The parent app ID for which to return workflows.'
|
13
|
-
c.flag 'collaborator_ids', desc: 'Only include workflows where the provided user IDs are a manager/collaborator of that workflow.'
|
13
|
+
c.flag 'collaborator_ids', desc: 'Only include workflows where all of the provided user IDs are a manager/collaborator of that workflow.'
|
14
14
|
c.flag 'cursor', desc: 'Set cursor to next_cursor returned by the previous call to list items in the next page.'
|
15
15
|
c.flag 'is_sales_elevate', desc: 'Filter workflows by their Sales Elevate status.'
|
16
16
|
c.flag 'limit', desc: 'The number of results that will be returned by the API on each invocation.'
|
17
17
|
c.flag 'no_collaborators', desc: 'Only include workflows with no collaborators in the result; default is false.'
|
18
18
|
c.flag 'num_trigger_ids', desc: 'Number of trigger IDs to fetch for each workflow; default is 10.'
|
19
|
+
c.flag 'publish_status', desc: 'Filter workflows by their published status.'
|
19
20
|
c.flag 'query', desc: 'A search query to filter for workflow name or description.'
|
20
21
|
c.flag 'sort', desc: 'The field used to sort the returned workflows.'
|
21
22
|
c.flag 'sort_dir', desc: 'Sort direction. Possible values are asc for ascending order like (1, 2, 3) or (a, b, c), and desc for descending order like (3, 2, 1) or (c, b, a).'
|
22
23
|
c.flag 'source', desc: 'Source of workflow creation, either from code or workflow builder.'
|
24
|
+
c.flag 'step_function_ids', desc: 'Only include workflows that use all of the provided step function ids.'
|
23
25
|
c.flag 'trigger_type_id', desc: 'Only include workflows with this trigger type.'
|
24
26
|
c.action do |_global_options, options, _args|
|
25
27
|
puts JSON.dump(@client.admin_workflows_search(options))
|
@@ -6,8 +6,8 @@ module Slack
|
|
6
6
|
class App
|
7
7
|
desc 'AdminWorkflowsTriggersTypesPermissions methods.'
|
8
8
|
command 'admin_workflows_triggers_types_permissions' do |g|
|
9
|
-
g.desc 'list the permissions for using each trigger type
|
10
|
-
g.long_desc %( list the permissions for using each trigger type
|
9
|
+
g.desc 'list the permissions for using each trigger type'
|
10
|
+
g.long_desc %( list the permissions for using each trigger type )
|
11
11
|
g.command 'lookup' do |c|
|
12
12
|
c.flag 'trigger_type_ids', desc: 'The trigger types IDs for which to get the permissions.'
|
13
13
|
c.action do |_global_options, options, _args|
|
@@ -15,8 +15,8 @@ module Slack
|
|
15
15
|
end
|
16
16
|
end
|
17
17
|
|
18
|
-
g.desc 'Set the permissions for using a trigger type
|
19
|
-
g.long_desc %( Set the permissions for using a trigger type
|
18
|
+
g.desc 'Set the permissions for using a trigger type'
|
19
|
+
g.long_desc %( Set the permissions for using a trigger type )
|
20
20
|
g.command 'set' do |c|
|
21
21
|
c.flag 'id', desc: 'The trigger type ID for which to set the permissions.'
|
22
22
|
c.flag 'visibility', desc: 'The function visibility.'
|
@@ -0,0 +1,45 @@
|
|
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 'AssistantThreads methods.'
|
8
|
+
command 'assistant_threads' do |g|
|
9
|
+
g.desc 'Set the status for an AI assistant thread.'
|
10
|
+
g.long_desc %( Set the status for an AI assistant thread. )
|
11
|
+
g.command 'setStatus' do |c|
|
12
|
+
c.flag 'channel_id', desc: 'Channel ID containing the assistant thread.'
|
13
|
+
c.flag 'status', desc: "Status of the specified bot user, e.g. 'is thinking...'."
|
14
|
+
c.flag 'thread_ts', desc: 'Message timestamp of the thread of where to set the status.'
|
15
|
+
c.action do |_global_options, options, _args|
|
16
|
+
puts JSON.dump(@client.assistant_threads_setStatus(options))
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
g.desc 'Set suggested prompts for the given assistant thread'
|
21
|
+
g.long_desc %( Set suggested prompts for the given assistant thread )
|
22
|
+
g.command 'setSuggestedPrompts' do |c|
|
23
|
+
c.flag 'channel_id', desc: 'Channel ID containing the assistant thread.'
|
24
|
+
c.flag 'prompts', desc: 'Each prompt should be supplied with its title and message attribute.'
|
25
|
+
c.flag 'thread_ts', desc: 'Message timestamp of the thread to set suggested prompts for.'
|
26
|
+
c.flag 'title', desc: 'Title for the list of provided prompts. For example: Suggested Prompts, Related Questions.'
|
27
|
+
c.action do |_global_options, options, _args|
|
28
|
+
puts JSON.dump(@client.assistant_threads_setSuggestedPrompts(options))
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
g.desc 'Set the title for the given assistant thread'
|
33
|
+
g.long_desc %( Set the title for the given assistant thread )
|
34
|
+
g.command 'setTitle' do |c|
|
35
|
+
c.flag 'channel_id', desc: 'Channel ID containing the assistant thread.'
|
36
|
+
c.flag 'thread_ts', desc: 'Message timestamp of the thread to set suggested prompts for.'
|
37
|
+
c.flag 'title', desc: 'The title to use for the thread.'
|
38
|
+
c.action do |_global_options, options, _args|
|
39
|
+
puts JSON.dump(@client.assistant_threads_setTitle(options))
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
data/bin/commands/bookmarks.rb
CHANGED
@@ -12,6 +12,7 @@ module Slack
|
|
12
12
|
c.flag 'channel_id', desc: 'Channel to add bookmark in.'
|
13
13
|
c.flag 'title', desc: 'Title for the bookmark.'
|
14
14
|
c.flag 'type', desc: 'Type of the bookmark i.e link.'
|
15
|
+
c.flag 'access_level', desc: "The level that we are setting the file's permission to (read or write)."
|
15
16
|
c.flag 'emoji', desc: 'Emoji tag to apply to the link.'
|
16
17
|
c.flag 'entity_id', desc: 'ID of the entity being bookmarked. Only applies to message and file types.'
|
17
18
|
c.flag 'link', desc: 'Link to bookmark.'
|
data/bin/commands/canvases.rb
CHANGED
@@ -6,8 +6,8 @@ module Slack
|
|
6
6
|
class App
|
7
7
|
desc 'Canvases methods.'
|
8
8
|
command 'canvases' do |g|
|
9
|
-
g.desc 'Create
|
10
|
-
g.long_desc %( Create
|
9
|
+
g.desc 'Create canvas for a user'
|
10
|
+
g.long_desc %( Create canvas for a user )
|
11
11
|
g.command 'create' do |c|
|
12
12
|
c.flag 'document_content', desc: 'Structure describing the type and value of the content to create.'
|
13
13
|
c.flag 'title', desc: 'Title of the newly created canvas.'
|
@@ -16,8 +16,8 @@ module Slack
|
|
16
16
|
end
|
17
17
|
end
|
18
18
|
|
19
|
-
g.desc 'Deletes a canvas
|
20
|
-
g.long_desc %( Deletes a canvas
|
19
|
+
g.desc 'Deletes a canvas'
|
20
|
+
g.long_desc %( Deletes a canvas )
|
21
21
|
g.command 'delete' do |c|
|
22
22
|
c.flag 'canvas_id', desc: 'Encoded ID of the canvas.'
|
23
23
|
c.action do |_global_options, options, _args|
|
@@ -20,10 +20,10 @@ module Slack
|
|
20
20
|
g.desc 'Sets the access level to a canvas for specified entities'
|
21
21
|
g.long_desc %( Sets the access level to a canvas for specified entities )
|
22
22
|
g.command 'set' do |c|
|
23
|
-
c.flag 'access_level', desc: 'Desired level of access
|
23
|
+
c.flag 'access_level', desc: 'Desired level of access.'
|
24
24
|
c.flag 'canvas_id', desc: 'Encoded ID of the canvas.'
|
25
|
-
c.flag 'channel_ids', desc: 'List of channels you wish to update access for.'
|
26
|
-
c.flag 'user_ids', desc: 'List of users you wish to update access for.'
|
25
|
+
c.flag 'channel_ids', desc: 'List of channels you wish to update access for. Can only be used if user_ids is not provided.'
|
26
|
+
c.flag 'user_ids', desc: 'List of users you wish to update access for. Can only be used if channel_ids is not provided.'
|
27
27
|
c.action do |_global_options, options, _args|
|
28
28
|
puts JSON.dump(@client.canvases_access_set(options))
|
29
29
|
end
|