slack-ruby-client 0.14.5 → 0.14.6
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/.rubocop.yml +1 -0
- data/CHANGELOG.md +11 -4
- data/README.md +51 -19
- data/bin/commands.rb +12 -0
- data/bin/commands/admin_apps_approved.rb +17 -0
- data/bin/commands/admin_apps_restricted.rb +17 -0
- data/bin/commands/admin_conversations.rb +17 -0
- data/bin/commands/admin_emoji.rb +54 -0
- data/bin/commands/admin_inviteRequests.rb +36 -0
- data/bin/commands/admin_inviteRequests_approved.rb +16 -0
- data/bin/commands/admin_inviteRequests_denied.rb +16 -0
- data/bin/commands/admin_teams.rb +27 -0
- data/bin/commands/admin_teams_admins.rb +16 -0
- data/bin/commands/admin_teams_owners.rb +16 -0
- data/bin/commands/admin_teams_settings.rb +64 -0
- data/bin/commands/admin_users.rb +97 -0
- data/bin/commands/chat.rb +8 -8
- data/bin/commands/conversations.rb +1 -1
- data/bin/commands/files.rb +1 -0
- data/bin/commands/files_remote.rb +1 -1
- data/bin/commands/oauth.rb +1 -1
- data/lib/slack-ruby-client.rb +1 -0
- data/lib/slack/version.rb +1 -1
- data/lib/slack/web/api/endpoints.rb +24 -0
- data/lib/slack/web/api/endpoints/admin_apps_approved.rb +35 -0
- data/lib/slack/web/api/endpoints/admin_apps_restricted.rb +35 -0
- data/lib/slack/web/api/endpoints/admin_conversations.rb +30 -0
- data/lib/slack/web/api/endpoints/admin_emoji.rb +88 -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_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_users.rb +163 -0
- data/lib/slack/web/api/endpoints/chat.rb +8 -8
- data/lib/slack/web/api/endpoints/conversations.rb +1 -1
- data/lib/slack/web/api/endpoints/files.rb +2 -0
- data/lib/slack/web/api/endpoints/files_remote.rb +1 -1
- data/lib/slack/web/api/endpoints/oauth.rb +1 -1
- data/lib/slack/web/api/errors.rb +566 -0
- data/lib/slack/web/api/errors/slack_error.rb +12 -0
- data/lib/slack/web/api/templates/errors.erb +20 -0
- data/lib/slack/web/client.rb +1 -1
- data/lib/slack/web/faraday/response/raise_error.rb +4 -1
- data/lib/tasks/real_time.rake +1 -1
- data/lib/tasks/web.rake +10 -1
- data/spec/fixtures/slack/web/views_open_error.yml +76 -0
- data/spec/slack/web/api/endpoints/admin_apps_approved_spec.rb +8 -0
- data/spec/slack/web/api/endpoints/admin_apps_restricted_spec.rb +8 -0
- data/spec/slack/web/api/endpoints/admin_conversations_spec.rb +13 -0
- data/spec/slack/web/api/endpoints/admin_emoji_spec.rb +37 -0
- data/spec/slack/web/api/endpoints/admin_inviteRequests_approved_spec.rb +8 -0
- data/spec/slack/web/api/endpoints/admin_inviteRequests_denied_spec.rb +8 -0
- data/spec/slack/web/api/endpoints/admin_inviteRequests_spec.rb +18 -0
- data/spec/slack/web/api/endpoints/admin_teams_admins_spec.rb +13 -0
- data/spec/slack/web/api/endpoints/admin_teams_owners_spec.rb +13 -0
- data/spec/slack/web/api/endpoints/admin_teams_settings_spec.rb +53 -0
- data/spec/slack/web/api/endpoints/admin_teams_spec.rb +16 -0
- data/spec/slack/web/api/endpoints/admin_users_spec.rb +75 -0
- data/spec/slack/web/api/endpoints/apps_permissions_spec.rb +2 -2
- data/spec/slack/web/api/endpoints/apps_permissions_users_spec.rb +3 -3
- data/spec/slack/web/api/endpoints/conversations_spec.rb +1 -1
- data/spec/slack/web/api/errors/slack_error_spec.rb +22 -0
- data/spec/slack/web/faraday/response/raise_error_spec.rb +26 -3
- metadata +54 -2
@@ -99,7 +99,7 @@ module Slack
|
|
99
99
|
# @option options [channel] :channel
|
100
100
|
# Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name.
|
101
101
|
# @option options [Object] :text
|
102
|
-
#
|
102
|
+
# How this field works and whether it is required depends on other fields you use in your API call. See below for more detail.
|
103
103
|
# @option options [user] :user
|
104
104
|
# id of the user who will receive the ephemeral message. The user should be in the channel specified by the channel argument.
|
105
105
|
# @option options [Object] :as_user
|
@@ -146,17 +146,17 @@ module Slack
|
|
146
146
|
# @option options [channel] :channel
|
147
147
|
# Channel, private group, or IM channel to send message to. Can be an encoded ID, or a name. See below for more details.
|
148
148
|
# @option options [Object] :text
|
149
|
-
#
|
149
|
+
# How this field works and whether it is required depends on other fields you use in your API call. See below for more detail.
|
150
150
|
# @option options [Object] :as_user
|
151
|
-
# Pass true to post the message as the authed user, instead of as a bot. Defaults to false. See authorship below.
|
151
|
+
# Pass true to post the message as the authed user, instead of as a bot. Defaults to false. See authorship below. This argument may not be used with newer bot tokens.
|
152
152
|
# @option options [Object] :attachments
|
153
153
|
# A JSON-based array of structured attachments, presented as a URL-encoded string.
|
154
154
|
# @option options [Object] :blocks
|
155
155
|
# A JSON-based array of structured blocks, presented as a URL-encoded string.
|
156
156
|
# @option options [Object] :icon_emoji
|
157
|
-
# Emoji to use as the icon for this message. Overrides icon_url. Must be used in conjunction with as_user set to false, otherwise ignored. See authorship below.
|
157
|
+
# Emoji to use as the icon for this message. Overrides icon_url. Must be used in conjunction with as_user set to false, otherwise ignored. See authorship below. This argument may not be used with newer bot tokens.
|
158
158
|
# @option options [Object] :icon_url
|
159
|
-
# URL to an image to use as the icon for this message. Must be used in conjunction with as_user set to false, otherwise ignored. See authorship below.
|
159
|
+
# URL to an image to use as the icon for this message. Must be used in conjunction with as_user set to false, otherwise ignored. See authorship below. This argument may not be used with newer bot tokens.
|
160
160
|
# @option options [Object] :link_names
|
161
161
|
# Find and link channel names and usernames.
|
162
162
|
# @option options [Object] :mrkdwn
|
@@ -201,9 +201,9 @@ module Slack
|
|
201
201
|
# @option options [Object] :post_at
|
202
202
|
# Unix EPOCH timestamp of time in future to send the message.
|
203
203
|
# @option options [Object] :text
|
204
|
-
#
|
204
|
+
# How this field works and whether it is required depends on other fields you use in your API call. See below for more detail.
|
205
205
|
# @option options [Object] :as_user
|
206
|
-
# Pass true to post the message as the authed user, instead of as a bot. Defaults to false. See
|
206
|
+
# Pass true to post the message as the authed user, instead of as a bot. Defaults to false. See chat.postMessage.
|
207
207
|
# @option options [Object] :attachments
|
208
208
|
# A JSON-based array of structured attachments, presented as a URL-encoded string.
|
209
209
|
# @option options [Object] :blocks
|
@@ -211,7 +211,7 @@ module Slack
|
|
211
211
|
# @option options [Object] :link_names
|
212
212
|
# Find and link channel names and usernames.
|
213
213
|
# @option options [Object] :parse
|
214
|
-
# Change how messages are treated. Defaults to none. See
|
214
|
+
# Change how messages are treated. Defaults to none. See chat.postMessage.
|
215
215
|
# @option options [Object] :reply_broadcast
|
216
216
|
# Used in conjunction with thread_ts and indicates whether reply should be made visible to everyone in the channel or conversation. Defaults to false.
|
217
217
|
# @option options [Object] :thread_ts
|
@@ -100,7 +100,7 @@ module Slack
|
|
100
100
|
# @option options [channel] :channel
|
101
101
|
# The ID of the public or private channel to invite user(s) to.
|
102
102
|
# @option options [Object] :users
|
103
|
-
# A comma separated list of user IDs. Up to
|
103
|
+
# A comma separated list of user IDs. Up to 1000 users may be listed.
|
104
104
|
# @see https://api.slack.com/methods/conversations.invite
|
105
105
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/conversations/conversations.invite.json
|
106
106
|
def conversations_invite(options = {})
|
@@ -62,6 +62,8 @@ module Slack
|
|
62
62
|
#
|
63
63
|
# @option options [channel] :channel
|
64
64
|
# Filter files appearing in a specific channel, indicated by its ID.
|
65
|
+
# @option options [Object] :show_files_hidden_by_limit
|
66
|
+
# Show truncated file info for files hidden due to being too old, and the team who owns the file being over the file limit.
|
65
67
|
# @option options [Object] :ts_from
|
66
68
|
# Filter files created after this timestamp (inclusive).
|
67
69
|
# @option options [Object] :ts_to
|
@@ -18,7 +18,7 @@ module Slack
|
|
18
18
|
# @option options [Object] :filetype
|
19
19
|
# type of file.
|
20
20
|
# @option options [Object] :indexable_file_contents
|
21
|
-
#
|
21
|
+
# A text file (txt, pdf, doc, etc.) containing textual search terms that are used to improve discovery of the remote file.
|
22
22
|
# @option options [Object] :preview_image
|
23
23
|
# Preview of the document via multipart/form-data.
|
24
24
|
# @see https://api.slack.com/methods/files.remote.add
|
@@ -18,7 +18,7 @@ module Slack
|
|
18
18
|
# @option options [Object] :redirect_uri
|
19
19
|
# This must match the originally submitted URI (if one was sent).
|
20
20
|
# @option options [Object] :single_channel
|
21
|
-
# Request the user to add your app only to a single channel.
|
21
|
+
# Request the user to add your app only to a single channel. Only valid with a legacy workspace app.
|
22
22
|
# @see https://api.slack.com/methods/oauth.access
|
23
23
|
# @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/oauth/oauth.access.json
|
24
24
|
def oauth_access(options = {})
|
@@ -0,0 +1,566 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
# This file was auto-generated by lib/tasks/web.rake
|
3
|
+
|
4
|
+
module Slack
|
5
|
+
module Web
|
6
|
+
module Api
|
7
|
+
module Errors
|
8
|
+
class AccountInactive < SlackError; end
|
9
|
+
class AlreadyArchived < SlackError; end
|
10
|
+
class AlreadyInChannel < SlackError; end
|
11
|
+
class AlreadyInTeam < SlackError; end
|
12
|
+
class AlreadyInTeamInvitedUser < SlackError; end
|
13
|
+
class AlreadyInvited < SlackError; end
|
14
|
+
class AlreadyPinned < SlackError; end
|
15
|
+
class AlreadyProcessed < SlackError; end
|
16
|
+
class AlreadyReacted < SlackError; end
|
17
|
+
class AlreadyStarred < SlackError; end
|
18
|
+
class AppManagementAppNotInstalledOnOrg < SlackError; end
|
19
|
+
class AppMissingActionUrl < SlackError; end
|
20
|
+
class AsUserNotSupported < SlackError; end
|
21
|
+
class BadClientSecret < SlackError; end
|
22
|
+
class BadImage < SlackError; end
|
23
|
+
class BadRedirectUri < SlackError; end
|
24
|
+
class BadTimestamp < SlackError; end
|
25
|
+
class BadTitle < SlackError; end
|
26
|
+
class BadToken < SlackError; end
|
27
|
+
class BadUrl < SlackError; end
|
28
|
+
class BotNotFound < SlackError; end
|
29
|
+
class CannotAddBot < SlackError; end
|
30
|
+
class CannotAddOthers < SlackError; end
|
31
|
+
class CannotAddOthersRecurring < SlackError; end
|
32
|
+
class CannotAddSlackbot < SlackError; end
|
33
|
+
class CannotCompleteOthers < SlackError; end
|
34
|
+
class CannotCompleteRecurring < SlackError; end
|
35
|
+
class CannotCreateDialog < SlackError; end
|
36
|
+
class CannotFindChannel < SlackError; end
|
37
|
+
class CannotFindMessage < SlackError; end
|
38
|
+
class CannotFindService < SlackError; end
|
39
|
+
class CannotModifyPrimaryOwner < SlackError; end
|
40
|
+
class CannotParse < SlackError; end
|
41
|
+
class CannotParseAttachment < SlackError; end
|
42
|
+
class CannotPrompt < SlackError; end
|
43
|
+
class CannotResetPrimaryOwner < SlackError; end
|
44
|
+
class CannotUnfurlUrl < SlackError; end
|
45
|
+
class CannotUpdateAdminUser < SlackError; end
|
46
|
+
class CantArchiveGeneral < SlackError; end
|
47
|
+
class CantDelete < SlackError; end
|
48
|
+
class CantDeleteFile < SlackError; end
|
49
|
+
class CantDeleteMessage < SlackError; end
|
50
|
+
class CantInvite < SlackError; end
|
51
|
+
class CantInviteSelf < SlackError; end
|
52
|
+
class CantKickFromGeneral < SlackError; end
|
53
|
+
class CantKickSelf < SlackError; end
|
54
|
+
class CantLeaveGeneral < SlackError; end
|
55
|
+
class CantUpdateMessage < SlackError; end
|
56
|
+
class ChannelCannotBeUnshared < SlackError; end
|
57
|
+
class ChannelNotFound < SlackError; end
|
58
|
+
class ChannelNotSharedWithTeam < SlackError; end
|
59
|
+
class ChannelTypeNotSupported < SlackError; end
|
60
|
+
class ClientIdTokenMismatch < SlackError; end
|
61
|
+
class CodeAlreadyUsed < SlackError; end
|
62
|
+
class ComplianceExportsPreventDeletion < SlackError; end
|
63
|
+
class CouldNotCreateWorkspace < SlackError; end
|
64
|
+
class DefaultOrgWideChannel < SlackError; end
|
65
|
+
class DiscoverabilitySettingInvalid < SlackError; end
|
66
|
+
class DomainTaken < SlackError; end
|
67
|
+
class DuplicateChannelNotFound < SlackError; end
|
68
|
+
class DuplicateExternalId < SlackError; end
|
69
|
+
class DuplicateMessageNotFound < SlackError; end
|
70
|
+
class EditWindowClosed < SlackError; end
|
71
|
+
class EkmAccessDenied < SlackError; end
|
72
|
+
class EmojiNotFound < SlackError; end
|
73
|
+
class EnterpriseIsRestricted < SlackError; end
|
74
|
+
class ErrorBadFormat < SlackError; end
|
75
|
+
class ErrorBadNameI18n < SlackError; end
|
76
|
+
class ErrorBadUpload < SlackError; end
|
77
|
+
class ErrorBadWide < SlackError; end
|
78
|
+
class ErrorInvalidAlias < SlackError; end
|
79
|
+
class ErrorInvalidEmojiToRename < SlackError; end
|
80
|
+
class ErrorMissingName < SlackError; end
|
81
|
+
class ErrorNameTaken < SlackError; end
|
82
|
+
class ErrorNameTakenI18n < SlackError; end
|
83
|
+
class ErrorNoImage < SlackError; end
|
84
|
+
class ErrorTooBig < SlackError; end
|
85
|
+
class ExternalChannelMigrating < SlackError; end
|
86
|
+
class FailedLookingUpUser < SlackError; end
|
87
|
+
class FailedSendingDialog < SlackError; end
|
88
|
+
class FailedToAddEmoji < SlackError; end
|
89
|
+
class FailedToAliasEmoji < SlackError; end
|
90
|
+
class FailedToFetchActiveTeam < SlackError; end
|
91
|
+
class FailedToFetchInfo < SlackError; end
|
92
|
+
class FailedToRemoveUserFromWorkspace < SlackError; end
|
93
|
+
class FailedToRenameEmoji < SlackError; end
|
94
|
+
class FailedToSendInvite < SlackError; end
|
95
|
+
class FailedToSetDefaultChannels < SlackError; end
|
96
|
+
class FailedToSetDescription < SlackError; end
|
97
|
+
class FailedToSetDiscoverability < SlackError; end
|
98
|
+
class FailedToSetIcon < SlackError; end
|
99
|
+
class FailedToSetName < SlackError; end
|
100
|
+
class FailedToSetUserToAdmin < SlackError; end
|
101
|
+
class FailedToSetUserToOwner < SlackError; end
|
102
|
+
class FailedToSetUserToRegular < SlackError; end
|
103
|
+
class FailedToValidateCaller < SlackError; end
|
104
|
+
class FailedToValidateChannels < SlackError; end
|
105
|
+
class FailedToValidateCustomMessage < SlackError; end
|
106
|
+
class FailedToValidateExpiration < SlackError; end
|
107
|
+
class FailedToValidateTeam < SlackError; end
|
108
|
+
class FailureRemovingEmoji < SlackError; end
|
109
|
+
class FatalError < SlackError; end
|
110
|
+
class FeatureNotEnabled < SlackError; end
|
111
|
+
class FetchMembersFailed < SlackError; end
|
112
|
+
class FileCommentNotFound < SlackError; end
|
113
|
+
class FileDeleted < SlackError; end
|
114
|
+
class FileNotFound < SlackError; end
|
115
|
+
class FileNotShared < SlackError; end
|
116
|
+
class FileUnderReview < SlackError; end
|
117
|
+
class GroupContainsOthers < SlackError; end
|
118
|
+
class HashConflict < SlackError; end
|
119
|
+
class InvalidAppId < SlackError; end
|
120
|
+
class InvalidArgName < SlackError; end
|
121
|
+
class InvalidArguments < SlackError; end
|
122
|
+
class InvalidAuth < SlackError; end
|
123
|
+
class InvalidChannel < SlackError; end
|
124
|
+
class InvalidChannelId < SlackError; end
|
125
|
+
class InvalidCharset < SlackError; end
|
126
|
+
class InvalidClientId < SlackError; end
|
127
|
+
class InvalidCode < SlackError; end
|
128
|
+
class InvalidCursor < SlackError; end
|
129
|
+
class InvalidEmail < SlackError; end
|
130
|
+
class InvalidExternalId < SlackError; end
|
131
|
+
class InvalidFormData < SlackError; end
|
132
|
+
class InvalidGrantType < SlackError; end
|
133
|
+
class InvalidLimit < SlackError; end
|
134
|
+
class InvalidName < SlackError; end
|
135
|
+
class InvalidNameMaxlength < SlackError; end
|
136
|
+
class InvalidNamePunctuation < SlackError; end
|
137
|
+
class InvalidNameRequired < SlackError; end
|
138
|
+
class InvalidNameSpecials < SlackError; end
|
139
|
+
class InvalidPermissions < SlackError; end
|
140
|
+
class InvalidPostType < SlackError; end
|
141
|
+
class InvalidPresence < SlackError; end
|
142
|
+
class InvalidProfile < SlackError; end
|
143
|
+
class InvalidRequest < SlackError; end
|
144
|
+
class InvalidRequestId < SlackError; end
|
145
|
+
class InvalidRoleForUser < SlackError; end
|
146
|
+
class InvalidScheduledMessageId < SlackError; end
|
147
|
+
class InvalidScope < SlackError; end
|
148
|
+
class InvalidTargetTeam < SlackError; end
|
149
|
+
class InvalidTime < SlackError; end
|
150
|
+
class InvalidTimestamp < SlackError; end
|
151
|
+
class InvalidTrigger < SlackError; end
|
152
|
+
class InvalidTsLatest < SlackError; end
|
153
|
+
class InvalidTsOldest < SlackError; end
|
154
|
+
class InvalidTypes < SlackError; end
|
155
|
+
class InvalidUrl < SlackError; end
|
156
|
+
class InvalidUser < SlackError; end
|
157
|
+
class InvalidUsers < SlackError; end
|
158
|
+
class InvitedUserNotCreated < SlackError; end
|
159
|
+
class InvitedUserNotReactivated < SlackError; end
|
160
|
+
class InviteeCantSeeChannel < SlackError; end
|
161
|
+
class IsArchived < SlackError; end
|
162
|
+
class IsBot < SlackError; end
|
163
|
+
class IsInactive < SlackError; end
|
164
|
+
class LastMember < SlackError; end
|
165
|
+
class LimitRequired < SlackError; end
|
166
|
+
class MessageNotFound < SlackError; end
|
167
|
+
class MethodNotSupportedForChannelType < SlackError; end
|
168
|
+
class MigrationInProgress < SlackError; end
|
169
|
+
class MissingChannel < SlackError; end
|
170
|
+
class MissingDialog < SlackError; end
|
171
|
+
class MissingDuration < SlackError; end
|
172
|
+
class MissingPostType < SlackError; end
|
173
|
+
class MissingScope < SlackError; end
|
174
|
+
class MissingTrigger < SlackError; end
|
175
|
+
class MissingTs < SlackError; end
|
176
|
+
class MissingUnfurls < SlackError; end
|
177
|
+
class MixedScope < SlackError; end
|
178
|
+
class MsgTooLong < SlackError; end
|
179
|
+
class MustProvideTeamDomain < SlackError; end
|
180
|
+
class MustProvideTeamName < SlackError; end
|
181
|
+
class NameTaken < SlackError; end
|
182
|
+
class NameTakenInOrg < SlackError; end
|
183
|
+
class NoAliasSelected < SlackError; end
|
184
|
+
class NoBotUserForApp < SlackError; end
|
185
|
+
class NoChannel < SlackError; end
|
186
|
+
class NoImageUploaded < SlackError; end
|
187
|
+
class NoItemSpecified < SlackError; end
|
188
|
+
class NoPermission < SlackError; end
|
189
|
+
class NoReaction < SlackError; end
|
190
|
+
class NoSuchSubteam < SlackError; end
|
191
|
+
class NoText < SlackError; end
|
192
|
+
class NoUser < SlackError; end
|
193
|
+
class NoUserProvided < SlackError; end
|
194
|
+
class NotAdmin < SlackError; end
|
195
|
+
class NotAllowed < SlackError; end
|
196
|
+
class NotAllowedTokenType < SlackError; end
|
197
|
+
class NotAnAdmin < SlackError; end
|
198
|
+
class NotAppAdmin < SlackError; end
|
199
|
+
class NotArchived < SlackError; end
|
200
|
+
class NotAuthed < SlackError; end
|
201
|
+
class NotAuthorized < SlackError; end
|
202
|
+
class NotBearerToken < SlackError; end
|
203
|
+
class NotEnabled < SlackError; end
|
204
|
+
class NotEnoughUsers < SlackError; end
|
205
|
+
class NotEnterpriseTeam < SlackError; end
|
206
|
+
class NotFound < SlackError; end
|
207
|
+
class NotInChannel < SlackError; end
|
208
|
+
class NotInDnd < SlackError; end
|
209
|
+
class NotInGroup < SlackError; end
|
210
|
+
class NotPinnable < SlackError; end
|
211
|
+
class NotPinned < SlackError; end
|
212
|
+
class NotReactable < SlackError; end
|
213
|
+
class NotStarred < SlackError; end
|
214
|
+
class OauthAuthorizationUrlMismatch < SlackError; end
|
215
|
+
class OrgLoginRequired < SlackError; end
|
216
|
+
class OverPaginationLimit < SlackError; end
|
217
|
+
class PaginationNotAvailable < SlackError; end
|
218
|
+
class PaidOnly < SlackError; end
|
219
|
+
class PermissionDenied < SlackError; end
|
220
|
+
class PlanUpgradeRequired < SlackError; end
|
221
|
+
class PostingToGeneralChannelDenied < SlackError; end
|
222
|
+
class PreviewFeatureNotAvailable < SlackError; end
|
223
|
+
class ProfileSetFailed < SlackError; end
|
224
|
+
class PublicVideoNotAllowed < SlackError; end
|
225
|
+
class PushLimitReached < SlackError; end
|
226
|
+
class RateLimited < SlackError; end
|
227
|
+
class Ratelimited < SlackError; end
|
228
|
+
class RequestAlreadyResolved < SlackError; end
|
229
|
+
class RequestIdOrAppIdIsRequired < SlackError; end
|
230
|
+
class RequestIdRequiredForCustomIntegrations < SlackError; end
|
231
|
+
class RequestTimeout < SlackError; end
|
232
|
+
class ReservedName < SlackError; end
|
233
|
+
class RestrictedAction < SlackError; end
|
234
|
+
class RestrictedActionNonThreadableChannel < SlackError; end
|
235
|
+
class RestrictedActionReadOnlyChannel < SlackError; end
|
236
|
+
class RestrictedActionThreadOnlyChannel < SlackError; end
|
237
|
+
class RtmConnectRequired < SlackError; end
|
238
|
+
class SentRecently < SlackError; end
|
239
|
+
class SnoozeEndFailed < SlackError; end
|
240
|
+
class SnoozeFailed < SlackError; end
|
241
|
+
class SnoozeNotActive < SlackError; end
|
242
|
+
class TeamAddedToOrg < SlackError; end
|
243
|
+
class TeamNotFound < SlackError; end
|
244
|
+
class ThreadNotFound < SlackError; end
|
245
|
+
class TimeInPast < SlackError; end
|
246
|
+
class TimeTooFar < SlackError; end
|
247
|
+
class TokenRevoked < SlackError; end
|
248
|
+
class TooLarge < SlackError; end
|
249
|
+
class TooLong < SlackError; end
|
250
|
+
class TooManyAttachments < SlackError; end
|
251
|
+
class TooManyConvosForAppOnTeam < SlackError; end
|
252
|
+
class TooManyConvosForTeam < SlackError; end
|
253
|
+
class TooManyEmoji < SlackError; end
|
254
|
+
class TooManyFrames < SlackError; end
|
255
|
+
class TooManyIds < SlackError; end
|
256
|
+
class TooManyIdsProvided < SlackError; end
|
257
|
+
class TooManyReactions < SlackError; end
|
258
|
+
class TooManyTargetTeams < SlackError; end
|
259
|
+
class TooManyTeamsProvided < SlackError; end
|
260
|
+
class TooManyUsers < SlackError; end
|
261
|
+
class TriggerExchanged < SlackError; end
|
262
|
+
class TriggerExpired < SlackError; end
|
263
|
+
class UnableToLeaveLastTeam < SlackError; end
|
264
|
+
class UnknownMethod < SlackError; end
|
265
|
+
class UnknownType < SlackError; end
|
266
|
+
class UnsupportedArguments < SlackError; end
|
267
|
+
class UraMaxChannels < SlackError; end
|
268
|
+
class UserAlreadyDeleted < SlackError; end
|
269
|
+
class UserAlreadyTeamMember < SlackError; end
|
270
|
+
class UserDisabled < SlackError; end
|
271
|
+
class UserDoesNotOwnChannel < SlackError; end
|
272
|
+
class UserIsAlreadyDeleted < SlackError; end
|
273
|
+
class UserIsNotAGuest < SlackError; end
|
274
|
+
class UserIsRestricted < SlackError; end
|
275
|
+
class UserIsUltraRestricted < SlackError; end
|
276
|
+
class UserNotFound < SlackError; end
|
277
|
+
class UserNotInChannel < SlackError; end
|
278
|
+
class UserNotVisible < SlackError; end
|
279
|
+
class UserSessionResetFailed < SlackError; end
|
280
|
+
class UsersListNotSupplied < SlackError; end
|
281
|
+
class UsersNotFound < SlackError; end
|
282
|
+
class ValidationErrors < SlackError; end
|
283
|
+
class ViewTooLarge < SlackError; end
|
284
|
+
|
285
|
+
ERROR_CLASSES = {
|
286
|
+
'account_inactive' => AccountInactive,
|
287
|
+
'already_archived' => AlreadyArchived,
|
288
|
+
'already_in_channel' => AlreadyInChannel,
|
289
|
+
'already_in_team' => AlreadyInTeam,
|
290
|
+
'already_in_team_invited_user' => AlreadyInTeamInvitedUser,
|
291
|
+
'already_invited' => AlreadyInvited,
|
292
|
+
'already_pinned' => AlreadyPinned,
|
293
|
+
'already_processed' => AlreadyProcessed,
|
294
|
+
'already_reacted' => AlreadyReacted,
|
295
|
+
'already_starred' => AlreadyStarred,
|
296
|
+
'app_management_app_not_installed_on_org' => AppManagementAppNotInstalledOnOrg,
|
297
|
+
'app_missing_action_url' => AppMissingActionUrl,
|
298
|
+
'as_user_not_supported' => AsUserNotSupported,
|
299
|
+
'bad_client_secret' => BadClientSecret,
|
300
|
+
'bad_image' => BadImage,
|
301
|
+
'bad_redirect_uri' => BadRedirectUri,
|
302
|
+
'bad_timestamp' => BadTimestamp,
|
303
|
+
'bad_title' => BadTitle,
|
304
|
+
'bad_token' => BadToken,
|
305
|
+
'bad_url' => BadUrl,
|
306
|
+
'bot_not_found' => BotNotFound,
|
307
|
+
'cannot_add_bot' => CannotAddBot,
|
308
|
+
'cannot_add_others' => CannotAddOthers,
|
309
|
+
'cannot_add_others_recurring' => CannotAddOthersRecurring,
|
310
|
+
'cannot_add_slackbot' => CannotAddSlackbot,
|
311
|
+
'cannot_complete_others' => CannotCompleteOthers,
|
312
|
+
'cannot_complete_recurring' => CannotCompleteRecurring,
|
313
|
+
'cannot_create_dialog' => CannotCreateDialog,
|
314
|
+
'cannot_find_channel' => CannotFindChannel,
|
315
|
+
'cannot_find_message' => CannotFindMessage,
|
316
|
+
'cannot_find_service' => CannotFindService,
|
317
|
+
'cannot_modify_primary_owner' => CannotModifyPrimaryOwner,
|
318
|
+
'cannot_parse' => CannotParse,
|
319
|
+
'cannot_parse_attachment' => CannotParseAttachment,
|
320
|
+
'cannot_prompt' => CannotPrompt,
|
321
|
+
'cannot_reset_primary_owner' => CannotResetPrimaryOwner,
|
322
|
+
'cannot_unfurl_url' => CannotUnfurlUrl,
|
323
|
+
'cannot_update_admin_user' => CannotUpdateAdminUser,
|
324
|
+
'cant_archive_general' => CantArchiveGeneral,
|
325
|
+
'cant_delete' => CantDelete,
|
326
|
+
'cant_delete_file' => CantDeleteFile,
|
327
|
+
'cant_delete_message' => CantDeleteMessage,
|
328
|
+
'cant_invite' => CantInvite,
|
329
|
+
'cant_invite_self' => CantInviteSelf,
|
330
|
+
'cant_kick_from_general' => CantKickFromGeneral,
|
331
|
+
'cant_kick_self' => CantKickSelf,
|
332
|
+
'cant_leave_general' => CantLeaveGeneral,
|
333
|
+
'cant_update_message' => CantUpdateMessage,
|
334
|
+
'channel_cannot_be_unshared' => ChannelCannotBeUnshared,
|
335
|
+
'channel_not_found' => ChannelNotFound,
|
336
|
+
'channel_not_shared_with_team' => ChannelNotSharedWithTeam,
|
337
|
+
'channel_type_not_supported' => ChannelTypeNotSupported,
|
338
|
+
'client_id_token_mismatch' => ClientIdTokenMismatch,
|
339
|
+
'code_already_used' => CodeAlreadyUsed,
|
340
|
+
'compliance_exports_prevent_deletion' => ComplianceExportsPreventDeletion,
|
341
|
+
'could_not_create_workspace' => CouldNotCreateWorkspace,
|
342
|
+
'default_org_wide_channel' => DefaultOrgWideChannel,
|
343
|
+
'discoverability_setting_invalid' => DiscoverabilitySettingInvalid,
|
344
|
+
'domain_taken' => DomainTaken,
|
345
|
+
'duplicate_channel_not_found' => DuplicateChannelNotFound,
|
346
|
+
'duplicate_external_id' => DuplicateExternalId,
|
347
|
+
'duplicate_message_not_found' => DuplicateMessageNotFound,
|
348
|
+
'edit_window_closed' => EditWindowClosed,
|
349
|
+
'ekm_access_denied' => EkmAccessDenied,
|
350
|
+
'emoji_not_found' => EmojiNotFound,
|
351
|
+
'enterprise_is_restricted' => EnterpriseIsRestricted,
|
352
|
+
'error_bad_format' => ErrorBadFormat,
|
353
|
+
'error_bad_name_i18n' => ErrorBadNameI18n,
|
354
|
+
'error_bad_upload' => ErrorBadUpload,
|
355
|
+
'error_bad_wide' => ErrorBadWide,
|
356
|
+
'error_invalid_alias' => ErrorInvalidAlias,
|
357
|
+
'error_invalid_emoji_to_rename' => ErrorInvalidEmojiToRename,
|
358
|
+
'error_missing_name' => ErrorMissingName,
|
359
|
+
'error_name_taken' => ErrorNameTaken,
|
360
|
+
'error_name_taken_i18n' => ErrorNameTakenI18n,
|
361
|
+
'error_no_image' => ErrorNoImage,
|
362
|
+
'error_too_big' => ErrorTooBig,
|
363
|
+
'external_channel_migrating' => ExternalChannelMigrating,
|
364
|
+
'failed_looking_up_user' => FailedLookingUpUser,
|
365
|
+
'failed_sending_dialog' => FailedSendingDialog,
|
366
|
+
'failed_to_add_emoji' => FailedToAddEmoji,
|
367
|
+
'failed_to_alias_emoji' => FailedToAliasEmoji,
|
368
|
+
'failed_to_fetch_active_team' => FailedToFetchActiveTeam,
|
369
|
+
'failed_to_fetch_info' => FailedToFetchInfo,
|
370
|
+
'failed_to_remove_user_from_workspace' => FailedToRemoveUserFromWorkspace,
|
371
|
+
'failed_to_rename_emoji' => FailedToRenameEmoji,
|
372
|
+
'failed_to_send_invite' => FailedToSendInvite,
|
373
|
+
'failed_to_set_default_channels' => FailedToSetDefaultChannels,
|
374
|
+
'failed_to_set_description' => FailedToSetDescription,
|
375
|
+
'failed_to_set_discoverability' => FailedToSetDiscoverability,
|
376
|
+
'failed_to_set_icon' => FailedToSetIcon,
|
377
|
+
'failed_to_set_name' => FailedToSetName,
|
378
|
+
'failed_to_set_user_to_admin' => FailedToSetUserToAdmin,
|
379
|
+
'failed_to_set_user_to_owner' => FailedToSetUserToOwner,
|
380
|
+
'failed_to_set_user_to_regular' => FailedToSetUserToRegular,
|
381
|
+
'failed_to_validate_caller' => FailedToValidateCaller,
|
382
|
+
'failed_to_validate_channels' => FailedToValidateChannels,
|
383
|
+
'failed_to_validate_custom_message' => FailedToValidateCustomMessage,
|
384
|
+
'failed_to_validate_expiration' => FailedToValidateExpiration,
|
385
|
+
'failed_to_validate_team' => FailedToValidateTeam,
|
386
|
+
'failure_removing_emoji' => FailureRemovingEmoji,
|
387
|
+
'fatal_error' => FatalError,
|
388
|
+
'feature_not_enabled' => FeatureNotEnabled,
|
389
|
+
'fetch_members_failed' => FetchMembersFailed,
|
390
|
+
'file_comment_not_found' => FileCommentNotFound,
|
391
|
+
'file_deleted' => FileDeleted,
|
392
|
+
'file_not_found' => FileNotFound,
|
393
|
+
'file_not_shared' => FileNotShared,
|
394
|
+
'file_under_review' => FileUnderReview,
|
395
|
+
'group_contains_others' => GroupContainsOthers,
|
396
|
+
'hash_conflict' => HashConflict,
|
397
|
+
'invalid_app_id' => InvalidAppId,
|
398
|
+
'invalid_arg_name' => InvalidArgName,
|
399
|
+
'invalid_arguments' => InvalidArguments,
|
400
|
+
'invalid_auth' => InvalidAuth,
|
401
|
+
'invalid_channel' => InvalidChannel,
|
402
|
+
'invalid_channel_id' => InvalidChannelId,
|
403
|
+
'invalid_charset' => InvalidCharset,
|
404
|
+
'invalid_client_id' => InvalidClientId,
|
405
|
+
'invalid_code' => InvalidCode,
|
406
|
+
'invalid_cursor' => InvalidCursor,
|
407
|
+
'invalid_email' => InvalidEmail,
|
408
|
+
'invalid_external_id' => InvalidExternalId,
|
409
|
+
'invalid_form_data' => InvalidFormData,
|
410
|
+
'invalid_grant_type' => InvalidGrantType,
|
411
|
+
'invalid_limit' => InvalidLimit,
|
412
|
+
'invalid_name' => InvalidName,
|
413
|
+
'invalid_name_maxlength' => InvalidNameMaxlength,
|
414
|
+
'invalid_name_punctuation' => InvalidNamePunctuation,
|
415
|
+
'invalid_name_required' => InvalidNameRequired,
|
416
|
+
'invalid_name_specials' => InvalidNameSpecials,
|
417
|
+
'invalid_permissions' => InvalidPermissions,
|
418
|
+
'invalid_post_type' => InvalidPostType,
|
419
|
+
'invalid_presence' => InvalidPresence,
|
420
|
+
'invalid_profile' => InvalidProfile,
|
421
|
+
'invalid_request' => InvalidRequest,
|
422
|
+
'invalid_request_id' => InvalidRequestId,
|
423
|
+
'invalid_role_for_user' => InvalidRoleForUser,
|
424
|
+
'invalid_scheduled_message_id' => InvalidScheduledMessageId,
|
425
|
+
'invalid_scope' => InvalidScope,
|
426
|
+
'invalid_target_team' => InvalidTargetTeam,
|
427
|
+
'invalid_time' => InvalidTime,
|
428
|
+
'invalid_timestamp' => InvalidTimestamp,
|
429
|
+
'invalid_trigger' => InvalidTrigger,
|
430
|
+
'invalid_ts_latest' => InvalidTsLatest,
|
431
|
+
'invalid_ts_oldest' => InvalidTsOldest,
|
432
|
+
'invalid_types' => InvalidTypes,
|
433
|
+
'invalid_url' => InvalidUrl,
|
434
|
+
'invalid_user' => InvalidUser,
|
435
|
+
'invalid_users' => InvalidUsers,
|
436
|
+
'invited_user_not_created' => InvitedUserNotCreated,
|
437
|
+
'invited_user_not_reactivated' => InvitedUserNotReactivated,
|
438
|
+
'invitee_cant_see_channel' => InviteeCantSeeChannel,
|
439
|
+
'is_archived' => IsArchived,
|
440
|
+
'is_bot' => IsBot,
|
441
|
+
'is_inactive' => IsInactive,
|
442
|
+
'last_member' => LastMember,
|
443
|
+
'limit_required' => LimitRequired,
|
444
|
+
'message_not_found' => MessageNotFound,
|
445
|
+
'method_not_supported_for_channel_type' => MethodNotSupportedForChannelType,
|
446
|
+
'migration_in_progress' => MigrationInProgress,
|
447
|
+
'missing_channel' => MissingChannel,
|
448
|
+
'missing_dialog' => MissingDialog,
|
449
|
+
'missing_duration' => MissingDuration,
|
450
|
+
'missing_post_type' => MissingPostType,
|
451
|
+
'missing_scope' => MissingScope,
|
452
|
+
'missing_trigger' => MissingTrigger,
|
453
|
+
'missing_ts' => MissingTs,
|
454
|
+
'missing_unfurls' => MissingUnfurls,
|
455
|
+
'mixed_scope' => MixedScope,
|
456
|
+
'msg_too_long' => MsgTooLong,
|
457
|
+
'must_provide_team_domain' => MustProvideTeamDomain,
|
458
|
+
'must_provide_team_name' => MustProvideTeamName,
|
459
|
+
'name_taken' => NameTaken,
|
460
|
+
'name_taken_in_org' => NameTakenInOrg,
|
461
|
+
'no_alias_selected' => NoAliasSelected,
|
462
|
+
'no_bot_user_for_app' => NoBotUserForApp,
|
463
|
+
'no_channel' => NoChannel,
|
464
|
+
'no_image_uploaded' => NoImageUploaded,
|
465
|
+
'no_item_specified' => NoItemSpecified,
|
466
|
+
'no_permission' => NoPermission,
|
467
|
+
'no_reaction' => NoReaction,
|
468
|
+
'no_such_subteam' => NoSuchSubteam,
|
469
|
+
'no_text' => NoText,
|
470
|
+
'no_user' => NoUser,
|
471
|
+
'no_user_provided' => NoUserProvided,
|
472
|
+
'not_admin' => NotAdmin,
|
473
|
+
'not_allowed' => NotAllowed,
|
474
|
+
'not_allowed_token_type' => NotAllowedTokenType,
|
475
|
+
'not_an_admin' => NotAnAdmin,
|
476
|
+
'not_app_admin' => NotAppAdmin,
|
477
|
+
'not_archived' => NotArchived,
|
478
|
+
'not_authed' => NotAuthed,
|
479
|
+
'not_authorized' => NotAuthorized,
|
480
|
+
'not_bearer_token' => NotBearerToken,
|
481
|
+
'not_enabled' => NotEnabled,
|
482
|
+
'not_enough_users' => NotEnoughUsers,
|
483
|
+
'not_enterprise_team' => NotEnterpriseTeam,
|
484
|
+
'not_found' => NotFound,
|
485
|
+
'not_in_channel' => NotInChannel,
|
486
|
+
'not_in_dnd' => NotInDnd,
|
487
|
+
'not_in_group' => NotInGroup,
|
488
|
+
'not_pinnable' => NotPinnable,
|
489
|
+
'not_pinned' => NotPinned,
|
490
|
+
'not_reactable' => NotReactable,
|
491
|
+
'not_starred' => NotStarred,
|
492
|
+
'oauth_authorization_url_mismatch' => OauthAuthorizationUrlMismatch,
|
493
|
+
'org_login_required' => OrgLoginRequired,
|
494
|
+
'over_pagination_limit' => OverPaginationLimit,
|
495
|
+
'pagination_not_available' => PaginationNotAvailable,
|
496
|
+
'paid_only' => PaidOnly,
|
497
|
+
'permission_denied' => PermissionDenied,
|
498
|
+
'plan_upgrade_required' => PlanUpgradeRequired,
|
499
|
+
'posting_to_general_channel_denied' => PostingToGeneralChannelDenied,
|
500
|
+
'preview_feature_not_available' => PreviewFeatureNotAvailable,
|
501
|
+
'profile_set_failed' => ProfileSetFailed,
|
502
|
+
'public_video_not_allowed' => PublicVideoNotAllowed,
|
503
|
+
'push_limit_reached' => PushLimitReached,
|
504
|
+
'rate_limited' => RateLimited,
|
505
|
+
'ratelimited' => Ratelimited,
|
506
|
+
'request_already_resolved' => RequestAlreadyResolved,
|
507
|
+
'request_id_or_app_id_is_required' => RequestIdOrAppIdIsRequired,
|
508
|
+
'request_id_required_for_custom_integrations' => RequestIdRequiredForCustomIntegrations,
|
509
|
+
'request_timeout' => RequestTimeout,
|
510
|
+
'reserved_name' => ReservedName,
|
511
|
+
'restricted_action' => RestrictedAction,
|
512
|
+
'restricted_action_non_threadable_channel' => RestrictedActionNonThreadableChannel,
|
513
|
+
'restricted_action_read_only_channel' => RestrictedActionReadOnlyChannel,
|
514
|
+
'restricted_action_thread_only_channel' => RestrictedActionThreadOnlyChannel,
|
515
|
+
'rtm_connect_required' => RtmConnectRequired,
|
516
|
+
'sent_recently' => SentRecently,
|
517
|
+
'snooze_end_failed' => SnoozeEndFailed,
|
518
|
+
'snooze_failed' => SnoozeFailed,
|
519
|
+
'snooze_not_active' => SnoozeNotActive,
|
520
|
+
'team_added_to_org' => TeamAddedToOrg,
|
521
|
+
'team_not_found' => TeamNotFound,
|
522
|
+
'thread_not_found' => ThreadNotFound,
|
523
|
+
'time_in_past' => TimeInPast,
|
524
|
+
'time_too_far' => TimeTooFar,
|
525
|
+
'token_revoked' => TokenRevoked,
|
526
|
+
'too_large' => TooLarge,
|
527
|
+
'too_long' => TooLong,
|
528
|
+
'too_many_attachments' => TooManyAttachments,
|
529
|
+
'too_many_convos_for_app_on_team' => TooManyConvosForAppOnTeam,
|
530
|
+
'too_many_convos_for_team' => TooManyConvosForTeam,
|
531
|
+
'too_many_emoji' => TooManyEmoji,
|
532
|
+
'too_many_frames' => TooManyFrames,
|
533
|
+
'too_many_ids' => TooManyIds,
|
534
|
+
'too_many_ids_provided' => TooManyIdsProvided,
|
535
|
+
'too_many_reactions' => TooManyReactions,
|
536
|
+
'too_many_target_teams' => TooManyTargetTeams,
|
537
|
+
'too_many_teams_provided' => TooManyTeamsProvided,
|
538
|
+
'too_many_users' => TooManyUsers,
|
539
|
+
'trigger_exchanged' => TriggerExchanged,
|
540
|
+
'trigger_expired' => TriggerExpired,
|
541
|
+
'unable_to_leave_last_team' => UnableToLeaveLastTeam,
|
542
|
+
'unknown_method' => UnknownMethod,
|
543
|
+
'unknown_type' => UnknownType,
|
544
|
+
'unsupported_arguments' => UnsupportedArguments,
|
545
|
+
'ura_max_channels' => UraMaxChannels,
|
546
|
+
'user_already_deleted' => UserAlreadyDeleted,
|
547
|
+
'user_already_team_member' => UserAlreadyTeamMember,
|
548
|
+
'user_disabled' => UserDisabled,
|
549
|
+
'user_does_not_own_channel' => UserDoesNotOwnChannel,
|
550
|
+
'user_is_already_deleted' => UserIsAlreadyDeleted,
|
551
|
+
'user_is_not_a_guest' => UserIsNotAGuest,
|
552
|
+
'user_is_restricted' => UserIsRestricted,
|
553
|
+
'user_is_ultra_restricted' => UserIsUltraRestricted,
|
554
|
+
'user_not_found' => UserNotFound,
|
555
|
+
'user_not_in_channel' => UserNotInChannel,
|
556
|
+
'user_not_visible' => UserNotVisible,
|
557
|
+
'user_session_reset_failed' => UserSessionResetFailed,
|
558
|
+
'users_list_not_supplied' => UsersListNotSupplied,
|
559
|
+
'users_not_found' => UsersNotFound,
|
560
|
+
'validation_errors' => ValidationErrors,
|
561
|
+
'view_too_large' => ViewTooLarge,
|
562
|
+
}.freeze
|
563
|
+
end
|
564
|
+
end
|
565
|
+
end
|
566
|
+
end
|