slack-ruby-client 2.2.0 → 2.4.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 +4 -4
- data/.github/dependabot.yml +6 -0
- data/.github/workflows/integration_test.yml +1 -1
- data/.github/workflows/lint.yml +1 -1
- data/.github/workflows/pr_lint.yml +1 -1
- data/.github/workflows/test.yml +23 -13
- data/.github/workflows/update_api.yml +8 -3
- data/.gitignore +1 -0
- data/CHANGELOG.md +14 -0
- data/README.md +27 -2
- data/bin/commands/admin_apps_activities.rb +4 -4
- data/bin/commands/admin_apps_config.rb +2 -2
- data/bin/commands/admin_conversations.rb +2 -1
- data/bin/commands/admin_emoji.rb +1 -1
- data/bin/commands/admin_users.rb +6 -4
- data/bin/commands/admin_workflows.rb +4 -2
- data/bin/commands/admin_workflows_triggers_types_permissions.rb +31 -0
- data/bin/commands/apps_datastore.rb +46 -0
- data/bin/commands/canvases.rb +40 -0
- data/bin/commands/canvases_access.rb +34 -0
- data/bin/commands/canvases_sections.rb +21 -0
- data/bin/commands/chat.rb +9 -9
- data/bin/commands/conversations.rb +3 -2
- data/bin/commands/conversations_canvases.rb +21 -0
- data/bin/commands/conversations_externalInvitePermissions.rb +22 -0
- data/bin/commands/functions.rb +31 -0
- data/bin/commands/functions_distributions_permissions.rb +59 -0
- data/bin/commands/oauth.rb +2 -2
- data/bin/commands/oauth_v2.rb +2 -2
- data/bin/commands/pins.rb +0 -1
- data/bin/commands/reminders.rb +1 -1
- data/bin/commands/team.rb +2 -2
- data/bin/commands/team_externalTeams.rb +35 -0
- data/bin/commands/usergroups.rb +10 -10
- data/bin/commands/usergroups_users.rb +8 -8
- data/bin/commands/users_discoverableContacts.rb +20 -0
- data/bin/commands/workflows_triggers_permissions.rb +60 -0
- data/lib/slack/events/request.rb +4 -2
- data/lib/slack/messages/formatting.rb +13 -0
- data/lib/slack/version.rb +1 -1
- data/lib/slack/web/api/endpoints/admin_apps_activities.rb +5 -5
- data/lib/slack/web/api/endpoints/admin_apps_config.rb +3 -3
- data/lib/slack/web/api/endpoints/admin_conversations.rb +3 -1
- data/lib/slack/web/api/endpoints/admin_emoji.rb +1 -1
- data/lib/slack/web/api/endpoints/admin_functions_permissions.rb +1 -1
- data/lib/slack/web/api/endpoints/admin_users.rb +6 -2
- data/lib/slack/web/api/endpoints/admin_workflows.rb +9 -5
- data/lib/slack/web/api/endpoints/admin_workflows_triggers_types_permissions.rb +41 -0
- data/lib/slack/web/api/endpoints/apps_activities.rb +1 -1
- data/lib/slack/web/api/endpoints/apps_datastore.rb +71 -0
- data/lib/slack/web/api/endpoints/canvases.rb +52 -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 +21 -21
- data/lib/slack/web/api/endpoints/conversations.rb +4 -2
- data/lib/slack/web/api/endpoints/conversations_canvases.rb +26 -0
- data/lib/slack/web/api/endpoints/conversations_externalInvitePermissions.rb +31 -0
- data/lib/slack/web/api/endpoints/dnd.rb +1 -0
- data/lib/slack/web/api/endpoints/functions.rb +43 -0
- data/lib/slack/web/api/endpoints/functions_distributions_permissions.rb +80 -0
- data/lib/slack/web/api/endpoints/oauth.rb +2 -2
- data/lib/slack/web/api/endpoints/oauth_v2.rb +2 -2
- data/lib/slack/web/api/endpoints/openid_connect.rb +1 -1
- data/lib/slack/web/api/endpoints/pins.rb +0 -2
- data/lib/slack/web/api/endpoints/reminders.rb +1 -1
- data/lib/slack/web/api/endpoints/search.rb +3 -3
- data/lib/slack/web/api/endpoints/team.rb +3 -3
- data/lib/slack/web/api/endpoints/team_externalTeams.rb +53 -0
- data/lib/slack/web/api/endpoints/team_profile.rb +1 -1
- data/lib/slack/web/api/endpoints/usergroups.rb +5 -5
- data/lib/slack/web/api/endpoints/usergroups_users.rb +6 -6
- data/lib/slack/web/api/endpoints/users.rb +1 -1
- data/lib/slack/web/api/endpoints/users_discoverableContacts.rb +24 -0
- data/lib/slack/web/api/endpoints/workflows_triggers_permissions.rb +87 -0
- data/lib/slack/web/api/endpoints.rb +22 -0
- data/lib/slack/web/api/errors.rb +84 -4
- data/lib/slack/web/api/patches/.gitkeep +0 -0
- data/lib/slack/web/api/templates/method.erb +1 -0
- data/lib/slack/web/api/templates/method_spec.erb +2 -1
- data/spec/slack/events/request_spec.rb +11 -0
- data/spec/slack/messages/formatting_spec.rb +32 -0
- data/spec/slack/web/api/endpoints/admin_workflows_triggers_types_permissions_spec.rb +21 -0
- data/spec/slack/web/api/endpoints/apps_datastore_spec.rb +29 -0
- data/spec/slack/web/api/endpoints/canvases_access_spec.rb +21 -0
- data/spec/slack/web/api/endpoints/canvases_sections_spec.rb +16 -0
- data/spec/slack/web/api/endpoints/canvases_spec.rb +21 -0
- data/spec/slack/web/api/endpoints/chat_spec.rb +76 -4
- data/spec/slack/web/api/endpoints/conversations_canvases_spec.rb +13 -0
- data/spec/slack/web/api/endpoints/conversations_externalInvitePermissions_spec.rb +19 -0
- data/spec/slack/web/api/endpoints/custom_specs/chat_spec.rb +2 -9
- data/spec/slack/web/api/endpoints/dnd_spec.rb +5 -0
- data/spec/slack/web/api/endpoints/functions_distributions_permissions_spec.rb +10 -0
- data/spec/slack/web/api/endpoints/functions_spec.rb +28 -0
- data/spec/slack/web/api/endpoints/team_externalTeams_spec.rb +13 -0
- data/spec/slack/web/api/endpoints/users_discoverableContacts_spec.rb +13 -0
- data/spec/slack/web/api/endpoints/workflows_triggers_permissions_spec.rb +31 -0
- metadata +37 -3
- data/lib/slack/web/api/patches/chat.attachments-blocks.patch +0 -21
data/lib/slack/web/api/errors.rb
CHANGED
|
@@ -32,6 +32,7 @@ module Slack
|
|
|
32
32
|
class ApprovalNotFound < SlackError; end
|
|
33
33
|
class AsUserNotSupported < SlackError; end
|
|
34
34
|
class AtLeastOneSessionSettingRequired < SlackError; end
|
|
35
|
+
class AttachmentPayloadLimitExceeded < SlackError; end
|
|
35
36
|
class AuthMismatch < SlackError; end
|
|
36
37
|
class AuthorizationNotFound < SlackError; end
|
|
37
38
|
class AutoProvisionFailure < SlackError; end
|
|
@@ -67,6 +68,7 @@ module Slack
|
|
|
67
68
|
class CannotCompleteRecurring < SlackError; end
|
|
68
69
|
class CannotCreateChannel < SlackError; end
|
|
69
70
|
class CannotCreateDialog < SlackError; end
|
|
71
|
+
class CannotFetchVersions < SlackError; end
|
|
70
72
|
class CannotFindChannel < SlackError; end
|
|
71
73
|
class CannotFindMessage < SlackError; end
|
|
72
74
|
class CannotFindService < SlackError; end
|
|
@@ -101,11 +103,18 @@ module Slack
|
|
|
101
103
|
class CantKickSelf < SlackError; end
|
|
102
104
|
class CantLeaveGeneral < SlackError; end
|
|
103
105
|
class CantUpdateMessage < SlackError; end
|
|
106
|
+
class CanvasCreationFailed < SlackError; end
|
|
107
|
+
class CanvasDeleted < SlackError; end
|
|
108
|
+
class CanvasDeletingDisabled < SlackError; end
|
|
104
109
|
class CanvasDisabledFileTeam < SlackError; end
|
|
105
110
|
class CanvasDisabledUserTeam < SlackError; end
|
|
111
|
+
class CanvasEditingFailed < SlackError; end
|
|
106
112
|
class CanvasGloballyDisabled < SlackError; end
|
|
113
|
+
class CanvasNotFound < SlackError; end
|
|
107
114
|
class ChannelArchived < SlackError; end
|
|
108
115
|
class ChannelCannotBeUnshared < SlackError; end
|
|
116
|
+
class ChannelCanvasAlreadyExists < SlackError; end
|
|
117
|
+
class ChannelCanvasCreationFailed < SlackError; end
|
|
109
118
|
class ChannelCanvasDeleted < SlackError; end
|
|
110
119
|
class ChannelConversionInProgress < SlackError; end
|
|
111
120
|
class ChannelIsNotPrivate < SlackError; end
|
|
@@ -116,7 +125,10 @@ module Slack
|
|
|
116
125
|
class ChannelTypeNotSupported < SlackError; end
|
|
117
126
|
class ClientIdTokenMismatch < SlackError; end
|
|
118
127
|
class CodeAlreadyUsed < SlackError; end
|
|
128
|
+
class ConnectedOrgDenied < SlackError; end
|
|
129
|
+
class ConnectedTeamDenied < SlackError; end
|
|
119
130
|
class ConnectedTeamPassedInIsNotTopLevelTeam < SlackError; end
|
|
131
|
+
class ConnectedUserDenied < SlackError; end
|
|
120
132
|
class ConnectionLimitExceeded < SlackError; end
|
|
121
133
|
class ConnectionLimitExceededPending < SlackError; end
|
|
122
134
|
class CouldNotArchiveChannel < SlackError; end
|
|
@@ -174,14 +186,17 @@ module Slack
|
|
|
174
186
|
class ErrorTooBig < SlackError; end
|
|
175
187
|
class ErrorUnpublishingWorkflows < SlackError; end
|
|
176
188
|
class ExchangedTriggerId < SlackError; end
|
|
189
|
+
class ExecutionNotInRunningState < SlackError; end
|
|
177
190
|
class ExpiredTriggerId < SlackError; end
|
|
178
191
|
class ExternalChannelMigrating < SlackError; end
|
|
179
192
|
class ExternalLimitedRestriction < SlackError; end
|
|
180
193
|
class ExternalTeamNotConnectedToThisOrg < SlackError; end
|
|
194
|
+
class ExternalWorkspaceDenied < SlackError; end
|
|
181
195
|
class ExternallySharedOrDisconnectedChannel < SlackError; end
|
|
182
196
|
class FailToGetTeamsForRestrictedUser < SlackError; end
|
|
183
197
|
class FailedAddingCollaborator < SlackError; end
|
|
184
198
|
class FailedCreatingApp < SlackError; end
|
|
199
|
+
class FailedDatastoreOperation < SlackError; end
|
|
185
200
|
class FailedExport < SlackError; end
|
|
186
201
|
class FailedForSomeEntities < SlackError; end
|
|
187
202
|
class FailedForSomeUsers < SlackError; end
|
|
@@ -231,6 +246,9 @@ module Slack
|
|
|
231
246
|
class ForbiddenHandle < SlackError; end
|
|
232
247
|
class ForbiddenTeam < SlackError; end
|
|
233
248
|
class FreeTeamNotAllowed < SlackError; end
|
|
249
|
+
class FreeTeamsCannotCreateStandaloneCanvases < SlackError; end
|
|
250
|
+
class FreeTeamsCannotEditStandaloneCanvases < SlackError; end
|
|
251
|
+
class FunctionExecutionNotFound < SlackError; end
|
|
234
252
|
class FunctionNotFound < SlackError; end
|
|
235
253
|
class GroupAlreadyLinkedToChannel < SlackError; end
|
|
236
254
|
class GroupMustNotBeEmpty < SlackError; end
|
|
@@ -240,6 +258,7 @@ module Slack
|
|
|
240
258
|
class HashConflict < SlackError; end
|
|
241
259
|
class InactiveCall < SlackError; end
|
|
242
260
|
class InactiveInvite < SlackError; end
|
|
261
|
+
class IncludeDeactivatedUserWorkspacesInvalid < SlackError; end
|
|
243
262
|
class InsecureRequest < SlackError; end
|
|
244
263
|
class InternalError < SlackError; end
|
|
245
264
|
class InvalidAction < SlackError; end
|
|
@@ -295,9 +314,12 @@ module Slack
|
|
|
295
314
|
class InvalidNamePunctuation < SlackError; end
|
|
296
315
|
class InvalidNameRequired < SlackError; end
|
|
297
316
|
class InvalidNameSpecials < SlackError; end
|
|
317
|
+
class InvalidNamedEntities < SlackError; end
|
|
298
318
|
class InvalidOutputs < SlackError; end
|
|
319
|
+
class InvalidParameters < SlackError; end
|
|
299
320
|
class InvalidParentType < SlackError; end
|
|
300
321
|
class InvalidPayload < SlackError; end
|
|
322
|
+
class InvalidPermissionType < SlackError; end
|
|
301
323
|
class InvalidPermissions < SlackError; end
|
|
302
324
|
class InvalidPostType < SlackError; end
|
|
303
325
|
class InvalidPresence < SlackError; end
|
|
@@ -342,7 +364,9 @@ module Slack
|
|
|
342
364
|
class InvalidUserId < SlackError; end
|
|
343
365
|
class InvalidUsers < SlackError; end
|
|
344
366
|
class InvalidValue < SlackError; end
|
|
367
|
+
class InvalidVisibility < SlackError; end
|
|
345
368
|
class InvalidWorkflowAuthStrategy < SlackError; end
|
|
369
|
+
class InvalidWorkspaceFilter < SlackError; end
|
|
346
370
|
class InviteFromSameOrg < SlackError; end
|
|
347
371
|
class InviteLookupError < SlackError; end
|
|
348
372
|
class InviteNotFound < SlackError; end
|
|
@@ -384,11 +408,13 @@ module Slack
|
|
|
384
408
|
class MissingChannel < SlackError; end
|
|
385
409
|
class MissingDialog < SlackError; end
|
|
386
410
|
class MissingDuration < SlackError; end
|
|
411
|
+
class MissingFileData < SlackError; end
|
|
387
412
|
class MissingPostType < SlackError; end
|
|
388
413
|
class MissingProfileId < SlackError; end
|
|
389
414
|
class MissingResource < SlackError; end
|
|
390
415
|
class MissingScope < SlackError; end
|
|
391
416
|
class MissingSource < SlackError; end
|
|
417
|
+
class MissingStepIds < SlackError; end
|
|
392
418
|
class MissingSubteamName < SlackError; end
|
|
393
419
|
class MissingTargetTeam < SlackError; end
|
|
394
420
|
class MissingTeam < SlackError; end
|
|
@@ -397,6 +423,7 @@ module Slack
|
|
|
397
423
|
class MissingUnfurlId < SlackError; end
|
|
398
424
|
class MissingUnfurls < SlackError; end
|
|
399
425
|
class MissingUser < SlackError; end
|
|
426
|
+
class MsgBlocksTooLong < SlackError; end
|
|
400
427
|
class MsgTooLong < SlackError; end
|
|
401
428
|
class MustClearBothStatusTextAndStatusEmoji < SlackError; end
|
|
402
429
|
class MustProvideTeamDomain < SlackError; end
|
|
@@ -407,6 +434,7 @@ module Slack
|
|
|
407
434
|
class NameTaken < SlackError; end
|
|
408
435
|
class NameTakenInOrg < SlackError; end
|
|
409
436
|
class NameTooLong < SlackError; end
|
|
437
|
+
class NamedEntitiesCannotBeEmpty < SlackError; end
|
|
410
438
|
class NoActiveSessions < SlackError; end
|
|
411
439
|
class NoAliasSelected < SlackError; end
|
|
412
440
|
class NoBotUserForApp < SlackError; end
|
|
@@ -414,6 +442,7 @@ module Slack
|
|
|
414
442
|
class NoChannelMemberships < SlackError; end
|
|
415
443
|
class NoDomainsProvided < SlackError; end
|
|
416
444
|
class NoDualBroadcastContentUpdate < SlackError; end
|
|
445
|
+
class NoExternalInvitePermission < SlackError; end
|
|
417
446
|
class NoImageUploaded < SlackError; end
|
|
418
447
|
class NoItemSpecified < SlackError; end
|
|
419
448
|
class NoLocalUserOnTeam < SlackError; end
|
|
@@ -432,6 +461,7 @@ module Slack
|
|
|
432
461
|
class NoUsersProvided < SlackError; end
|
|
433
462
|
class NoValidChannels < SlackError; end
|
|
434
463
|
class NoValidEntities < SlackError; end
|
|
464
|
+
class NoValidNamedEntities < SlackError; end
|
|
435
465
|
class NoValidTeams < SlackError; end
|
|
436
466
|
class NoValidUsers < SlackError; end
|
|
437
467
|
class NotAdmin < SlackError; end
|
|
@@ -464,6 +494,7 @@ module Slack
|
|
|
464
494
|
class OneOrMoreInvalidChannels < SlackError; end
|
|
465
495
|
class OrgLevelEmailDisplayDisabled < SlackError; end
|
|
466
496
|
class OrgLoginRequired < SlackError; end
|
|
497
|
+
class OrgNotConnected < SlackError; end
|
|
467
498
|
class OrgNotFound < SlackError; end
|
|
468
499
|
class OrgResolutionRequired < SlackError; end
|
|
469
500
|
class OrgUserNotInTeam < SlackError; end
|
|
@@ -472,10 +503,13 @@ module Slack
|
|
|
472
503
|
class PaginationNotAvailable < SlackError; end
|
|
473
504
|
class PaidOnly < SlackError; end
|
|
474
505
|
class PaidTeamsOnly < SlackError; end
|
|
506
|
+
class ParameterValidationFailed < SlackError; end
|
|
475
507
|
class ParentBookmarkDisabled < SlackError; end
|
|
476
508
|
class ParentWithLink < SlackError; end
|
|
509
|
+
class PartialFailure < SlackError; end
|
|
477
510
|
class PartialProfileSetFailed < SlackError; end
|
|
478
511
|
class PermissionDenied < SlackError; end
|
|
512
|
+
class PermissionTypeRequired < SlackError; end
|
|
479
513
|
class PlanUpgradeRequired < SlackError; end
|
|
480
514
|
class PolicyNotFound < SlackError; end
|
|
481
515
|
class PostContentsTooLarge < SlackError; end
|
|
@@ -511,11 +545,13 @@ module Slack
|
|
|
511
545
|
class SessionInvalidationFailed < SlackError; end
|
|
512
546
|
class SessionNotFound < SlackError; end
|
|
513
547
|
class SessionResetNotAllowed < SlackError; end
|
|
548
|
+
class SharedChannelDenied < SlackError; end
|
|
514
549
|
class SlackConnectBlockedFileType < SlackError; end
|
|
515
550
|
class SlackConnectCanvasSharingBlocked < SlackError; end
|
|
516
551
|
class SlackConnectClipSharingBlocked < SlackError; end
|
|
517
552
|
class SlackConnectFileLinkSharingBlocked < SlackError; end
|
|
518
553
|
class SlackConnectFileUploadSharingBlocked < SlackError; end
|
|
554
|
+
class SlackConnectListsSharingBlocked < SlackError; end
|
|
519
555
|
class SnippetTooLarge < SlackError; end
|
|
520
556
|
class SnoozeEndFailed < SlackError; end
|
|
521
557
|
class SnoozeFailed < SlackError; end
|
|
@@ -530,6 +566,7 @@ module Slack
|
|
|
530
566
|
class TeamAddedToOrg < SlackError; end
|
|
531
567
|
class TeamIdOrOrgRequired < SlackError; end
|
|
532
568
|
class TeamIdRequiredForEnterprise < SlackError; end
|
|
569
|
+
class TeamNotConnected < SlackError; end
|
|
533
570
|
class TeamNotFound < SlackError; end
|
|
534
571
|
class TeamNotOnEnterprise < SlackError; end
|
|
535
572
|
class TeamQuotaExceeded < SlackError; end
|
|
@@ -549,8 +586,6 @@ module Slack
|
|
|
549
586
|
class TooManyAttachments < SlackError; end
|
|
550
587
|
class TooManyBookmarks < SlackError; end
|
|
551
588
|
class TooManyContactCards < SlackError; end
|
|
552
|
-
class TooManyConvosForAppOnTeam < SlackError; end
|
|
553
|
-
class TooManyConvosForTeam < SlackError; end
|
|
554
589
|
class TooManyDomainsProvided < SlackError; end
|
|
555
590
|
class TooManyEmails < SlackError; end
|
|
556
591
|
class TooManyEmoji < SlackError; end
|
|
@@ -560,6 +595,7 @@ module Slack
|
|
|
560
595
|
class TooManyIdsProvided < SlackError; end
|
|
561
596
|
class TooManyLinkedChannels < SlackError; end
|
|
562
597
|
class TooManyMembers < SlackError; end
|
|
598
|
+
class TooManyNamedEntities < SlackError; end
|
|
563
599
|
class TooManyPins < SlackError; end
|
|
564
600
|
class TooManyReactions < SlackError; end
|
|
565
601
|
class TooManyTargetTeams < SlackError; end
|
|
@@ -568,6 +604,8 @@ module Slack
|
|
|
568
604
|
class TooManyUsers < SlackError; end
|
|
569
605
|
class TriggerExchanged < SlackError; end
|
|
570
606
|
class TriggerExpired < SlackError; end
|
|
607
|
+
class TriggerNotFound < SlackError; end
|
|
608
|
+
class TriggerTypeIdNotFound < SlackError; end
|
|
571
609
|
class TwoFactorSetupRequired < SlackError; end
|
|
572
610
|
class UnableToDelete < SlackError; end
|
|
573
611
|
class UnableToFetchCustomEmojis < SlackError; end
|
|
@@ -596,6 +634,7 @@ module Slack
|
|
|
596
634
|
class UserAlreadyDeleted < SlackError; end
|
|
597
635
|
class UserAlreadyTeamMember < SlackError; end
|
|
598
636
|
class UserCannotCreateChannel < SlackError; end
|
|
637
|
+
class UserCannotManageWorkspace < SlackError; end
|
|
599
638
|
class UserDisabled < SlackError; end
|
|
600
639
|
class UserDoesNotOwnChannel < SlackError; end
|
|
601
640
|
class UserIsAlreadyDeleted < SlackError; end
|
|
@@ -617,6 +656,7 @@ module Slack
|
|
|
617
656
|
class UsersNotFound < SlackError; end
|
|
618
657
|
class ValidationErrors < SlackError; end
|
|
619
658
|
class ViewTooLarge < SlackError; end
|
|
659
|
+
class VisibilityIsNotNamedEntities < SlackError; end
|
|
620
660
|
class WorkflowsExportCsvNotEnabled < SlackError; end
|
|
621
661
|
|
|
622
662
|
ERROR_CLASSES = {
|
|
@@ -647,6 +687,7 @@ module Slack
|
|
|
647
687
|
'approval_not_found' => ApprovalNotFound,
|
|
648
688
|
'as_user_not_supported' => AsUserNotSupported,
|
|
649
689
|
'at_least_one_session_setting_required' => AtLeastOneSessionSettingRequired,
|
|
690
|
+
'attachment_payload_limit_exceeded' => AttachmentPayloadLimitExceeded,
|
|
650
691
|
'auth_mismatch' => AuthMismatch,
|
|
651
692
|
'authorization_not_found' => AuthorizationNotFound,
|
|
652
693
|
'auto_provision_failure' => AutoProvisionFailure,
|
|
@@ -682,6 +723,7 @@ module Slack
|
|
|
682
723
|
'cannot_complete_recurring' => CannotCompleteRecurring,
|
|
683
724
|
'cannot_create_channel' => CannotCreateChannel,
|
|
684
725
|
'cannot_create_dialog' => CannotCreateDialog,
|
|
726
|
+
'cannot_fetch_versions' => CannotFetchVersions,
|
|
685
727
|
'cannot_find_channel' => CannotFindChannel,
|
|
686
728
|
'cannot_find_message' => CannotFindMessage,
|
|
687
729
|
'cannot_find_service' => CannotFindService,
|
|
@@ -716,11 +758,18 @@ module Slack
|
|
|
716
758
|
'cant_kick_self' => CantKickSelf,
|
|
717
759
|
'cant_leave_general' => CantLeaveGeneral,
|
|
718
760
|
'cant_update_message' => CantUpdateMessage,
|
|
761
|
+
'canvas_creation_failed' => CanvasCreationFailed,
|
|
762
|
+
'canvas_deleted' => CanvasDeleted,
|
|
763
|
+
'canvas_deleting_disabled' => CanvasDeletingDisabled,
|
|
719
764
|
'canvas_disabled_file_team' => CanvasDisabledFileTeam,
|
|
720
765
|
'canvas_disabled_user_team' => CanvasDisabledUserTeam,
|
|
766
|
+
'canvas_editing_failed' => CanvasEditingFailed,
|
|
721
767
|
'canvas_globally_disabled' => CanvasGloballyDisabled,
|
|
768
|
+
'canvas_not_found' => CanvasNotFound,
|
|
722
769
|
'channel_archived' => ChannelArchived,
|
|
723
770
|
'channel_cannot_be_unshared' => ChannelCannotBeUnshared,
|
|
771
|
+
'channel_canvas_already_exists' => ChannelCanvasAlreadyExists,
|
|
772
|
+
'channel_canvas_creation_failed' => ChannelCanvasCreationFailed,
|
|
724
773
|
'channel_canvas_deleted' => ChannelCanvasDeleted,
|
|
725
774
|
'channel_conversion_in_progress' => ChannelConversionInProgress,
|
|
726
775
|
'channel_is_not_private' => ChannelIsNotPrivate,
|
|
@@ -731,7 +780,10 @@ module Slack
|
|
|
731
780
|
'channel_type_not_supported' => ChannelTypeNotSupported,
|
|
732
781
|
'client_id_token_mismatch' => ClientIdTokenMismatch,
|
|
733
782
|
'code_already_used' => CodeAlreadyUsed,
|
|
783
|
+
'connected_org_denied' => ConnectedOrgDenied,
|
|
784
|
+
'connected_team_denied' => ConnectedTeamDenied,
|
|
734
785
|
'connected_team_passed_in_is_not_top_level_team' => ConnectedTeamPassedInIsNotTopLevelTeam,
|
|
786
|
+
'connected_user_denied' => ConnectedUserDenied,
|
|
735
787
|
'connection_limit_exceeded' => ConnectionLimitExceeded,
|
|
736
788
|
'connection_limit_exceeded_pending' => ConnectionLimitExceededPending,
|
|
737
789
|
'could_not_archive_channel' => CouldNotArchiveChannel,
|
|
@@ -789,14 +841,17 @@ module Slack
|
|
|
789
841
|
'error_too_big' => ErrorTooBig,
|
|
790
842
|
'error_unpublishing_workflows' => ErrorUnpublishingWorkflows,
|
|
791
843
|
'exchanged_trigger_id' => ExchangedTriggerId,
|
|
844
|
+
'execution_not_in_running_state' => ExecutionNotInRunningState,
|
|
792
845
|
'expired_trigger_id' => ExpiredTriggerId,
|
|
793
846
|
'external_channel_migrating' => ExternalChannelMigrating,
|
|
794
847
|
'external_limited_restriction' => ExternalLimitedRestriction,
|
|
795
848
|
'external_team_not_connected_to_this_org' => ExternalTeamNotConnectedToThisOrg,
|
|
849
|
+
'external_workspace_denied' => ExternalWorkspaceDenied,
|
|
796
850
|
'externally_shared_or_disconnected_channel' => ExternallySharedOrDisconnectedChannel,
|
|
797
851
|
'fail_to_get_teams_for_restricted_user' => FailToGetTeamsForRestrictedUser,
|
|
798
852
|
'failed_adding_collaborator' => FailedAddingCollaborator,
|
|
799
853
|
'failed_creating_app' => FailedCreatingApp,
|
|
854
|
+
'failed_datastore_operation' => FailedDatastoreOperation,
|
|
800
855
|
'failed_export' => FailedExport,
|
|
801
856
|
'failed_for_some_entities' => FailedForSomeEntities,
|
|
802
857
|
'failed_for_some_users' => FailedForSomeUsers,
|
|
@@ -846,6 +901,9 @@ module Slack
|
|
|
846
901
|
'forbidden_handle' => ForbiddenHandle,
|
|
847
902
|
'forbidden_team' => ForbiddenTeam,
|
|
848
903
|
'free_team_not_allowed' => FreeTeamNotAllowed,
|
|
904
|
+
'free_teams_cannot_create_standalone_canvases' => FreeTeamsCannotCreateStandaloneCanvases,
|
|
905
|
+
'free_teams_cannot_edit_standalone_canvases' => FreeTeamsCannotEditStandaloneCanvases,
|
|
906
|
+
'function_execution_not_found' => FunctionExecutionNotFound,
|
|
849
907
|
'function_not_found' => FunctionNotFound,
|
|
850
908
|
'group_already_linked_to_channel' => GroupAlreadyLinkedToChannel,
|
|
851
909
|
'group_must_not_be_empty' => GroupMustNotBeEmpty,
|
|
@@ -855,6 +913,7 @@ module Slack
|
|
|
855
913
|
'hash_conflict' => HashConflict,
|
|
856
914
|
'inactive_call' => InactiveCall,
|
|
857
915
|
'inactive_invite' => InactiveInvite,
|
|
916
|
+
'include_deactivated_user_workspaces_invalid' => IncludeDeactivatedUserWorkspacesInvalid,
|
|
858
917
|
'insecure_request' => InsecureRequest,
|
|
859
918
|
'internal_error' => InternalError,
|
|
860
919
|
'invalid_action' => InvalidAction,
|
|
@@ -910,9 +969,12 @@ module Slack
|
|
|
910
969
|
'invalid_name_punctuation' => InvalidNamePunctuation,
|
|
911
970
|
'invalid_name_required' => InvalidNameRequired,
|
|
912
971
|
'invalid_name_specials' => InvalidNameSpecials,
|
|
972
|
+
'invalid_named_entities' => InvalidNamedEntities,
|
|
913
973
|
'invalid_outputs' => InvalidOutputs,
|
|
974
|
+
'invalid_parameters' => InvalidParameters,
|
|
914
975
|
'invalid_parent_type' => InvalidParentType,
|
|
915
976
|
'invalid_payload' => InvalidPayload,
|
|
977
|
+
'invalid_permission_type' => InvalidPermissionType,
|
|
916
978
|
'invalid_permissions' => InvalidPermissions,
|
|
917
979
|
'invalid_post_type' => InvalidPostType,
|
|
918
980
|
'invalid_presence' => InvalidPresence,
|
|
@@ -957,7 +1019,9 @@ module Slack
|
|
|
957
1019
|
'invalid_user_id' => InvalidUserId,
|
|
958
1020
|
'invalid_users' => InvalidUsers,
|
|
959
1021
|
'invalid_value' => InvalidValue,
|
|
1022
|
+
'invalid_visibility' => InvalidVisibility,
|
|
960
1023
|
'invalid_workflow_auth_strategy' => InvalidWorkflowAuthStrategy,
|
|
1024
|
+
'invalid_workspace_filter' => InvalidWorkspaceFilter,
|
|
961
1025
|
'invite_from_same_org' => InviteFromSameOrg,
|
|
962
1026
|
'invite_lookup_error' => InviteLookupError,
|
|
963
1027
|
'invite_not_found' => InviteNotFound,
|
|
@@ -999,11 +1063,13 @@ module Slack
|
|
|
999
1063
|
'missing_channel' => MissingChannel,
|
|
1000
1064
|
'missing_dialog' => MissingDialog,
|
|
1001
1065
|
'missing_duration' => MissingDuration,
|
|
1066
|
+
'missing_file_data' => MissingFileData,
|
|
1002
1067
|
'missing_post_type' => MissingPostType,
|
|
1003
1068
|
'missing_profile_id' => MissingProfileId,
|
|
1004
1069
|
'missing_resource' => MissingResource,
|
|
1005
1070
|
'missing_scope' => MissingScope,
|
|
1006
1071
|
'missing_source' => MissingSource,
|
|
1072
|
+
'missing_step_ids' => MissingStepIds,
|
|
1007
1073
|
'missing_subteam_name' => MissingSubteamName,
|
|
1008
1074
|
'missing_target_team' => MissingTargetTeam,
|
|
1009
1075
|
'missing_team' => MissingTeam,
|
|
@@ -1012,6 +1078,7 @@ module Slack
|
|
|
1012
1078
|
'missing_unfurl_id' => MissingUnfurlId,
|
|
1013
1079
|
'missing_unfurls' => MissingUnfurls,
|
|
1014
1080
|
'missing_user' => MissingUser,
|
|
1081
|
+
'msg_blocks_too_long' => MsgBlocksTooLong,
|
|
1015
1082
|
'msg_too_long' => MsgTooLong,
|
|
1016
1083
|
'must_clear_both_status_text_and_status_emoji' => MustClearBothStatusTextAndStatusEmoji,
|
|
1017
1084
|
'must_provide_team_domain' => MustProvideTeamDomain,
|
|
@@ -1022,6 +1089,7 @@ module Slack
|
|
|
1022
1089
|
'name_taken' => NameTaken,
|
|
1023
1090
|
'name_taken_in_org' => NameTakenInOrg,
|
|
1024
1091
|
'name_too_long' => NameTooLong,
|
|
1092
|
+
'named_entities_cannot_be_empty' => NamedEntitiesCannotBeEmpty,
|
|
1025
1093
|
'no_active_sessions' => NoActiveSessions,
|
|
1026
1094
|
'no_alias_selected' => NoAliasSelected,
|
|
1027
1095
|
'no_bot_user_for_app' => NoBotUserForApp,
|
|
@@ -1029,6 +1097,7 @@ module Slack
|
|
|
1029
1097
|
'no_channel_memberships' => NoChannelMemberships,
|
|
1030
1098
|
'no_domains_provided' => NoDomainsProvided,
|
|
1031
1099
|
'no_dual_broadcast_content_update' => NoDualBroadcastContentUpdate,
|
|
1100
|
+
'no_external_invite_permission' => NoExternalInvitePermission,
|
|
1032
1101
|
'no_image_uploaded' => NoImageUploaded,
|
|
1033
1102
|
'no_item_specified' => NoItemSpecified,
|
|
1034
1103
|
'no_local_user_on_team' => NoLocalUserOnTeam,
|
|
@@ -1047,6 +1116,7 @@ module Slack
|
|
|
1047
1116
|
'no_users_provided' => NoUsersProvided,
|
|
1048
1117
|
'no_valid_channels' => NoValidChannels,
|
|
1049
1118
|
'no_valid_entities' => NoValidEntities,
|
|
1119
|
+
'no_valid_named_entities' => NoValidNamedEntities,
|
|
1050
1120
|
'no_valid_teams' => NoValidTeams,
|
|
1051
1121
|
'no_valid_users' => NoValidUsers,
|
|
1052
1122
|
'not_admin' => NotAdmin,
|
|
@@ -1079,6 +1149,7 @@ module Slack
|
|
|
1079
1149
|
'one_or_more_invalid_channels' => OneOrMoreInvalidChannels,
|
|
1080
1150
|
'org_level_email_display_disabled' => OrgLevelEmailDisplayDisabled,
|
|
1081
1151
|
'org_login_required' => OrgLoginRequired,
|
|
1152
|
+
'org_not_connected' => OrgNotConnected,
|
|
1082
1153
|
'org_not_found' => OrgNotFound,
|
|
1083
1154
|
'org_resolution_required' => OrgResolutionRequired,
|
|
1084
1155
|
'org_user_not_in_team' => OrgUserNotInTeam,
|
|
@@ -1087,10 +1158,13 @@ module Slack
|
|
|
1087
1158
|
'pagination_not_available' => PaginationNotAvailable,
|
|
1088
1159
|
'paid_only' => PaidOnly,
|
|
1089
1160
|
'paid_teams_only' => PaidTeamsOnly,
|
|
1161
|
+
'parameter_validation_failed' => ParameterValidationFailed,
|
|
1090
1162
|
'parent_bookmark_disabled' => ParentBookmarkDisabled,
|
|
1091
1163
|
'parent_with_link' => ParentWithLink,
|
|
1164
|
+
'partial_failure' => PartialFailure,
|
|
1092
1165
|
'partial_profile_set_failed' => PartialProfileSetFailed,
|
|
1093
1166
|
'permission_denied' => PermissionDenied,
|
|
1167
|
+
'permission_type_required' => PermissionTypeRequired,
|
|
1094
1168
|
'plan_upgrade_required' => PlanUpgradeRequired,
|
|
1095
1169
|
'policy_not_found' => PolicyNotFound,
|
|
1096
1170
|
'post_contents_too_large' => PostContentsTooLarge,
|
|
@@ -1126,11 +1200,13 @@ module Slack
|
|
|
1126
1200
|
'session_invalidation_failed' => SessionInvalidationFailed,
|
|
1127
1201
|
'session_not_found' => SessionNotFound,
|
|
1128
1202
|
'session_reset_not_allowed' => SessionResetNotAllowed,
|
|
1203
|
+
'shared_channel_denied' => SharedChannelDenied,
|
|
1129
1204
|
'slack_connect_blocked_file_type' => SlackConnectBlockedFileType,
|
|
1130
1205
|
'slack_connect_canvas_sharing_blocked' => SlackConnectCanvasSharingBlocked,
|
|
1131
1206
|
'slack_connect_clip_sharing_blocked' => SlackConnectClipSharingBlocked,
|
|
1132
1207
|
'slack_connect_file_link_sharing_blocked' => SlackConnectFileLinkSharingBlocked,
|
|
1133
1208
|
'slack_connect_file_upload_sharing_blocked' => SlackConnectFileUploadSharingBlocked,
|
|
1209
|
+
'slack_connect_lists_sharing_blocked' => SlackConnectListsSharingBlocked,
|
|
1134
1210
|
'snippet_too_large' => SnippetTooLarge,
|
|
1135
1211
|
'snooze_end_failed' => SnoozeEndFailed,
|
|
1136
1212
|
'snooze_failed' => SnoozeFailed,
|
|
@@ -1145,6 +1221,7 @@ module Slack
|
|
|
1145
1221
|
'team_added_to_org' => TeamAddedToOrg,
|
|
1146
1222
|
'team_id_or_org_required' => TeamIdOrOrgRequired,
|
|
1147
1223
|
'team_id_required_for_enterprise' => TeamIdRequiredForEnterprise,
|
|
1224
|
+
'team_not_connected' => TeamNotConnected,
|
|
1148
1225
|
'team_not_found' => TeamNotFound,
|
|
1149
1226
|
'team_not_on_enterprise' => TeamNotOnEnterprise,
|
|
1150
1227
|
'team_quota_exceeded' => TeamQuotaExceeded,
|
|
@@ -1164,8 +1241,6 @@ module Slack
|
|
|
1164
1241
|
'too_many_attachments' => TooManyAttachments,
|
|
1165
1242
|
'too_many_bookmarks' => TooManyBookmarks,
|
|
1166
1243
|
'too_many_contact_cards' => TooManyContactCards,
|
|
1167
|
-
'too_many_convos_for_app_on_team' => TooManyConvosForAppOnTeam,
|
|
1168
|
-
'too_many_convos_for_team' => TooManyConvosForTeam,
|
|
1169
1244
|
'too_many_domains_provided' => TooManyDomainsProvided,
|
|
1170
1245
|
'too_many_emails' => TooManyEmails,
|
|
1171
1246
|
'too_many_emoji' => TooManyEmoji,
|
|
@@ -1175,6 +1250,7 @@ module Slack
|
|
|
1175
1250
|
'too_many_ids_provided' => TooManyIdsProvided,
|
|
1176
1251
|
'too_many_linked_channels' => TooManyLinkedChannels,
|
|
1177
1252
|
'too_many_members' => TooManyMembers,
|
|
1253
|
+
'too_many_named_entities' => TooManyNamedEntities,
|
|
1178
1254
|
'too_many_pins' => TooManyPins,
|
|
1179
1255
|
'too_many_reactions' => TooManyReactions,
|
|
1180
1256
|
'too_many_target_teams' => TooManyTargetTeams,
|
|
@@ -1183,6 +1259,8 @@ module Slack
|
|
|
1183
1259
|
'too_many_users' => TooManyUsers,
|
|
1184
1260
|
'trigger_exchanged' => TriggerExchanged,
|
|
1185
1261
|
'trigger_expired' => TriggerExpired,
|
|
1262
|
+
'trigger_not_found' => TriggerNotFound,
|
|
1263
|
+
'trigger_type_id_not_found' => TriggerTypeIdNotFound,
|
|
1186
1264
|
'two_factor_setup_required' => TwoFactorSetupRequired,
|
|
1187
1265
|
'unable_to_delete' => UnableToDelete,
|
|
1188
1266
|
'unable_to_fetch_custom_emojis' => UnableToFetchCustomEmojis,
|
|
@@ -1211,6 +1289,7 @@ module Slack
|
|
|
1211
1289
|
'user_already_deleted' => UserAlreadyDeleted,
|
|
1212
1290
|
'user_already_team_member' => UserAlreadyTeamMember,
|
|
1213
1291
|
'user_cannot_create_channel' => UserCannotCreateChannel,
|
|
1292
|
+
'user_cannot_manage_workspace' => UserCannotManageWorkspace,
|
|
1214
1293
|
'user_disabled' => UserDisabled,
|
|
1215
1294
|
'user_does_not_own_channel' => UserDoesNotOwnChannel,
|
|
1216
1295
|
'user_is_already_deleted' => UserIsAlreadyDeleted,
|
|
@@ -1232,6 +1311,7 @@ module Slack
|
|
|
1232
1311
|
'users_not_found' => UsersNotFound,
|
|
1233
1312
|
'validation_errors' => ValidationErrors,
|
|
1234
1313
|
'view_too_large' => ViewTooLarge,
|
|
1314
|
+
'visibility_is_not_named_entities' => VisibilityIsNotNamedEntities,
|
|
1235
1315
|
'workflows_export_csv_not_enabled' => WorkflowsExportCsvNotEnabled,
|
|
1236
1316
|
}.freeze
|
|
1237
1317
|
end
|
|
File without changes
|
|
@@ -38,6 +38,7 @@ module Slack
|
|
|
38
38
|
raise ArgumentError, 'Required arguments :<%= arg_name %> missing' if options[:<%= arg_name %>].nil?
|
|
39
39
|
<% end %>
|
|
40
40
|
<% data['arg_groups']&.each do |arg_group| %>
|
|
41
|
+
<% next if arg_group['args'].size <= 1 %>
|
|
41
42
|
<% arg_string = arg_group['args'].map { |arg_name| ":#{arg_name}" }.join(', ') %>
|
|
42
43
|
<% if arg_group['mutually_exclusive'] %>
|
|
43
44
|
raise ArgumentError, 'Exactly one of <%= arg_string %> is required' unless <%= arg_group['args'].map { |arg_name| "options[:#{arg_name}].nil?" }.join(' ^ ') %>
|
|
@@ -7,7 +7,7 @@ RSpec.describe Slack::Web::Api::Endpoints::<%= group.gsub(".", "_").camelize %>
|
|
|
7
7
|
let(:client) { Slack::Web::Client.new }
|
|
8
8
|
<% names.sort.each_with_index do |(name, data), index| %>
|
|
9
9
|
<% next if data['mixin'] %>
|
|
10
|
-
<% group_required_params = data['arg_groups']&.map { |grp| grp['args'].first } || [] %>
|
|
10
|
+
<% group_required_params = data['arg_groups']&.map { |grp| grp['args'].first if grp['args'].size > 1 } || [] %>
|
|
11
11
|
<% required_params = data['args'].select{ |k, v| v['required'] || group_required_params.include?(k) } %>
|
|
12
12
|
<% json_params = data['args'].map { |arg_name, arg_v| arg_name if arg_v['format'] == 'json' }.compact %>
|
|
13
13
|
<% next if (required_params.none? || custom_spec_exists) && json_params.none? && data['arg_groups'].nil? %>
|
|
@@ -23,6 +23,7 @@ RSpec.describe Slack::Web::Api::Endpoints::<%= group.gsub(".", "_").camelize %>
|
|
|
23
23
|
<% end %>
|
|
24
24
|
<% end %>
|
|
25
25
|
<% data['arg_groups']&.each do |arg_group| %>
|
|
26
|
+
<% next if arg_group['args'].size <= 1 %>
|
|
26
27
|
it 'requires one of <%= arg_group['args'].join(', ') %>' do
|
|
27
28
|
<% params_except_required = example_params.reject { |name, _| arg_group['args'].include?(name) }.map { |name, val| "#{name}: %q[#{val}]" }.join(', ') %>
|
|
28
29
|
<% error_message = arg_group['mutually_exclusive'] ? 'Exactly' : 'At least' %>
|
|
@@ -47,6 +47,17 @@ RSpec.describe Slack::Events::Request do
|
|
|
47
47
|
expect(http_request.body.read).to eq body
|
|
48
48
|
end
|
|
49
49
|
|
|
50
|
+
context 'with an already read body' do
|
|
51
|
+
before do
|
|
52
|
+
http_request.body.read
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
it 'rewinds the request body before reading it' do
|
|
56
|
+
expect(request.body).to eq body
|
|
57
|
+
expect(http_request.body.read).to eq body
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
|
|
50
61
|
context 'time' do
|
|
51
62
|
after do
|
|
52
63
|
Timecop.return
|
|
@@ -121,4 +121,36 @@ describe Slack::Messages::Formatting do
|
|
|
121
121
|
expect(formatting.url_link(text, url)).to eq "<#{url}|#{text}>"
|
|
122
122
|
end
|
|
123
123
|
end
|
|
124
|
+
|
|
125
|
+
context '#markdown' do
|
|
126
|
+
it 'formats markdown bold' do
|
|
127
|
+
expect(formatting.markdown('**Le bold**')).to eq '*Le bold*'
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
it 'formats markdown italic' do
|
|
131
|
+
expect(formatting.markdown("*L'italic*")).to eq "_L'italic_"
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
it 'formats markdown bold and italic' do
|
|
135
|
+
expect(formatting.markdown('***Le bold italic***')).to eq '*_Le bold italic_*'
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
it 'formats markdown strikethrough' do
|
|
139
|
+
expect(formatting.markdown('~~Le strikethrough~~')).to eq '~Le strikethrough~'
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
it 'formats markdown links' do
|
|
143
|
+
expect(formatting.markdown('[Le link](https://theuselessweb.site)')).to eq '<https://theuselessweb.site|Le link>'
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
it 'formats nested markdown' do
|
|
147
|
+
expect(formatting.markdown('**[Le **bold and ~~struckout with *italic*~~** link](https://theuselessweb.site)**')).to(
|
|
148
|
+
eq '*<https://theuselessweb.site|Le *bold and ~struckout with _italic_~* link>*'
|
|
149
|
+
)
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
it "doesn't format other markdown" do
|
|
153
|
+
expect(formatting.markdown('## A heading\n_Italics_\n`code`')).to eq '## A heading\n_Italics_\n`code`'
|
|
154
|
+
end
|
|
155
|
+
end
|
|
124
156
|
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# This file was auto-generated by lib/tasks/web.rake
|
|
3
|
+
|
|
4
|
+
require 'spec_helper'
|
|
5
|
+
|
|
6
|
+
RSpec.describe Slack::Web::Api::Endpoints::AdminWorkflowsTriggersTypesPermissions do
|
|
7
|
+
let(:client) { Slack::Web::Client.new }
|
|
8
|
+
context 'admin.workflows.triggers.types.permissions_lookup' do
|
|
9
|
+
it 'requires trigger_type_ids' do
|
|
10
|
+
expect { client.admin_workflows_triggers_types_permissions_lookup }.to raise_error ArgumentError, /Required arguments :trigger_type_ids missing/
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
context 'admin.workflows.triggers.types.permissions_set' do
|
|
14
|
+
it 'requires id' do
|
|
15
|
+
expect { client.admin_workflows_triggers_types_permissions_set(visibility: %q[]) }.to raise_error ArgumentError, /Required arguments :id missing/
|
|
16
|
+
end
|
|
17
|
+
it 'requires visibility' do
|
|
18
|
+
expect { client.admin_workflows_triggers_types_permissions_set(id: %q[['FTT01', 'FTT02', 'FTT03']]) }.to raise_error ArgumentError, /Required arguments :visibility missing/
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -5,6 +5,35 @@ require 'spec_helper'
|
|
|
5
5
|
|
|
6
6
|
RSpec.describe Slack::Web::Api::Endpoints::AppsDatastore do
|
|
7
7
|
let(:client) { Slack::Web::Client.new }
|
|
8
|
+
context 'apps.datastore_bulkDelete' do
|
|
9
|
+
it 'requires datastore' do
|
|
10
|
+
expect { client.apps_datastore_bulkDelete(ids: %q[["7c6dd137", "c7d6d731"]]) }.to raise_error ArgumentError, /Required arguments :datastore missing/
|
|
11
|
+
end
|
|
12
|
+
it 'requires ids' do
|
|
13
|
+
expect { client.apps_datastore_bulkDelete(datastore: %q[]) }.to raise_error ArgumentError, /Required arguments :ids missing/
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
context 'apps.datastore_bulkGet' do
|
|
17
|
+
it 'requires datastore' do
|
|
18
|
+
expect { client.apps_datastore_bulkGet(ids: %q[["7c6dd137", "c7d6d731"]]) }.to raise_error ArgumentError, /Required arguments :datastore missing/
|
|
19
|
+
end
|
|
20
|
+
it 'requires ids' do
|
|
21
|
+
expect { client.apps_datastore_bulkGet(datastore: %q[]) }.to raise_error ArgumentError, /Required arguments :ids missing/
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
context 'apps.datastore_bulkPut' do
|
|
25
|
+
it 'requires datastore' do
|
|
26
|
+
expect { client.apps_datastore_bulkPut(items: %q[[{"id": "7c6dd137", "favourite_meal": "Shawarma", "reason": "Who doesn't like Shawarma?"}]]) }.to raise_error ArgumentError, /Required arguments :datastore missing/
|
|
27
|
+
end
|
|
28
|
+
it 'requires items' do
|
|
29
|
+
expect { client.apps_datastore_bulkPut(datastore: %q[]) }.to raise_error ArgumentError, /Required arguments :items missing/
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
context 'apps.datastore_count' do
|
|
33
|
+
it 'requires datastore' do
|
|
34
|
+
expect { client.apps_datastore_count }.to raise_error ArgumentError, /Required arguments :datastore missing/
|
|
35
|
+
end
|
|
36
|
+
end
|
|
8
37
|
context 'apps.datastore_delete' do
|
|
9
38
|
it 'requires datastore' do
|
|
10
39
|
expect { client.apps_datastore_delete(id: %q[]) }.to raise_error ArgumentError, /Required arguments :datastore missing/
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# This file was auto-generated by lib/tasks/web.rake
|
|
3
|
+
|
|
4
|
+
require 'spec_helper'
|
|
5
|
+
|
|
6
|
+
RSpec.describe Slack::Web::Api::Endpoints::CanvasesAccess do
|
|
7
|
+
let(:client) { Slack::Web::Client.new }
|
|
8
|
+
context 'canvases.access_delete' do
|
|
9
|
+
it 'requires canvas_id' do
|
|
10
|
+
expect { client.canvases_access_delete }.to raise_error ArgumentError, /Required arguments :canvas_id missing/
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
context 'canvases.access_set' do
|
|
14
|
+
it 'requires access_level' do
|
|
15
|
+
expect { client.canvases_access_set(canvas_id: %q[F1234ABCD]) }.to raise_error ArgumentError, /Required arguments :access_level missing/
|
|
16
|
+
end
|
|
17
|
+
it 'requires canvas_id' do
|
|
18
|
+
expect { client.canvases_access_set(access_level: %q[]) }.to raise_error ArgumentError, /Required arguments :canvas_id missing/
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
# This file was auto-generated by lib/tasks/web.rake
|
|
3
|
+
|
|
4
|
+
require 'spec_helper'
|
|
5
|
+
|
|
6
|
+
RSpec.describe Slack::Web::Api::Endpoints::CanvasesSections do
|
|
7
|
+
let(:client) { Slack::Web::Client.new }
|
|
8
|
+
context 'canvases.sections_lookup' do
|
|
9
|
+
it 'requires canvas_id' do
|
|
10
|
+
expect { client.canvases_sections_lookup(criteria: %q[{"section_types": ["any_header"], "contains_text": "CAN Report"}]) }.to raise_error ArgumentError, /Required arguments :canvas_id missing/
|
|
11
|
+
end
|
|
12
|
+
it 'requires criteria' do
|
|
13
|
+
expect { client.canvases_sections_lookup(canvas_id: %q[F1234ABCD]) }.to raise_error ArgumentError, /Required arguments :criteria missing/
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|