slack-ruby-client 2.0.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/FUNDING.yml +1 -0
- data/.github/workflows/integration_test.yml +19 -0
- data/.github/workflows/pr_lint.yml +1 -1
- data/.github/workflows/test.yml +1 -0
- data/CHANGELOG.md +9 -0
- data/README.md +18 -14
- data/SECURITY.md +9 -0
- data/bin/commands/admin_analytics.rb +16 -10
- data/bin/commands/admin_apps.rb +48 -42
- data/bin/commands/admin_apps_approved.rb +17 -11
- data/bin/commands/admin_apps_requests.rb +27 -21
- data/bin/commands/admin_apps_restricted.rb +17 -11
- data/bin/commands/admin_audit_anomaly_allow.rb +22 -16
- data/bin/commands/admin_auth_policy.rb +37 -31
- data/bin/commands/admin_barriers.rb +44 -38
- data/bin/commands/admin_conversations.rb +221 -165
- data/bin/commands/admin_conversations_ekm.rb +17 -11
- data/bin/commands/admin_conversations_restrictAccess.rb +35 -29
- data/bin/commands/admin_emoji.rb +50 -44
- data/bin/commands/admin_inviteRequests.rb +34 -28
- data/bin/commands/admin_inviteRequests_approved.rb +16 -10
- data/bin/commands/admin_inviteRequests_denied.rb +16 -10
- data/bin/commands/admin_roles.rb +46 -0
- data/bin/commands/admin_teams.rb +26 -20
- data/bin/commands/admin_teams_admins.rb +16 -10
- data/bin/commands/admin_teams_owners.rb +16 -10
- data/bin/commands/admin_teams_settings.rb +59 -53
- data/bin/commands/admin_usergroups.rb +45 -39
- data/bin/commands/admin_users.rb +91 -85
- data/bin/commands/admin_users_session.rb +72 -66
- data/bin/commands/admin_users_unsupportedVersions.rb +15 -9
- data/bin/commands/api.rb +14 -8
- data/bin/commands/apps.rb +15 -9
- data/bin/commands/apps_connections.rb +13 -7
- data/bin/commands/apps_event_authorizations.rb +16 -10
- data/bin/commands/apps_manifest.rb +48 -42
- data/bin/commands/auth.rb +21 -15
- data/bin/commands/auth_teams.rb +16 -10
- data/bin/commands/bookmarks.rb +50 -44
- data/bin/commands/bots.rb +15 -9
- data/bin/commands/calls.rb +49 -43
- data/bin/commands/calls_participants.rb +24 -18
- data/bin/commands/chat.rb +150 -144
- data/bin/commands/chat_scheduledMessages.rb +19 -13
- data/bin/commands/conversations.rb +233 -227
- data/bin/commands/dialog.rb +15 -9
- data/bin/commands/dnd.rb +46 -40
- data/bin/commands/emoji.rb +14 -7
- data/bin/commands/files.rb +110 -105
- data/bin/commands/files_comments.rb +15 -9
- data/bin/commands/files_remote.rb +73 -67
- data/bin/commands/functions_workflows_steps.rb +22 -0
- data/bin/commands/functions_workflows_steps_responses.rb +22 -0
- data/bin/commands/migration.rb +16 -10
- data/bin/commands/oauth.rb +18 -12
- data/bin/commands/oauth_v2.rb +28 -22
- data/bin/commands/openid_connect.rb +26 -20
- data/bin/commands/pins.rb +33 -26
- data/bin/commands/reactions.rb +52 -46
- data/bin/commands/reminders.rb +53 -47
- data/bin/commands/rtm.rb +15 -9
- data/bin/commands/search.rb +43 -37
- data/bin/commands/stars.rb +38 -32
- data/bin/commands/team.rb +47 -39
- data/bin/commands/team_billing.rb +13 -7
- data/bin/commands/team_preferences.rb +13 -7
- data/bin/commands/team_profile.rb +14 -8
- data/bin/commands/tooling_tokens.rb +14 -8
- data/bin/commands/usergroups.rb +64 -58
- data/bin/commands/usergroups_users.rb +27 -21
- data/bin/commands/users.rb +111 -105
- data/bin/commands/users_admin.rb +28 -22
- data/bin/commands/users_prefs.rb +13 -7
- data/bin/commands/users_profile.rb +26 -20
- data/bin/commands/views.rb +47 -41
- data/bin/commands/workflows.rb +36 -30
- data/bin/slack +48 -43
- data/lib/slack/version.rb +1 -1
- data/lib/slack/web/api/endpoints/admin_analytics.rb +1 -1
- data/lib/slack/web/api/endpoints/admin_apps_requests.rb +1 -1
- data/lib/slack/web/api/endpoints/admin_conversations.rb +78 -0
- data/lib/slack/web/api/endpoints/admin_roles.rb +73 -0
- data/lib/slack/web/api/endpoints/chat.rb +2 -2
- data/lib/slack/web/api/endpoints/conversations.rb +1 -1
- data/lib/slack/web/api/endpoints/emoji.rb +2 -0
- data/lib/slack/web/api/endpoints/files.rb +0 -2
- data/lib/slack/web/api/endpoints/functions_workflows_steps.rb +28 -0
- data/lib/slack/web/api/endpoints/functions_workflows_steps_responses.rb +28 -0
- data/lib/slack/web/api/endpoints/pins.rb +2 -0
- data/lib/slack/web/api/endpoints/team.rb +11 -1
- data/lib/slack/web/api/endpoints/usergroups.rb +1 -1
- data/lib/slack/web/api/endpoints/users_profile.rb +1 -1
- data/lib/slack/web/api/endpoints.rb +6 -0
- data/lib/slack/web/api/errors.rb +62 -0
- data/lib/slack/web/api/templates/command.erb +18 -12
- data/lib/tasks/web.rake +0 -6
- data/slack-ruby-client.gemspec +0 -1
- data/spec/slack/web/api/endpoints/admin_conversations_spec.rb +31 -0
- data/spec/slack/web/api/endpoints/admin_roles_spec.rb +30 -0
- data/spec/slack/web/api/endpoints/functions_workflows_steps_responses_spec.rb +13 -0
- data/spec/slack/web/api/endpoints/functions_workflows_steps_spec.rb +13 -0
- metadata +13 -19
- data/bin/commands.rb +0 -69
- data/lib/slack/web/api/templates/commands.erb +0 -6
data/bin/commands/users.rb
CHANGED
@@ -1,122 +1,128 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
# This file was auto-generated by lib/tasks/web.rake
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
4
|
+
module Slack
|
5
|
+
module Cli
|
6
|
+
class App
|
7
|
+
desc 'Users methods.'
|
8
|
+
command 'users' do |g|
|
9
|
+
g.desc 'List conversations the calling user may access.'
|
10
|
+
g.long_desc %( List conversations the calling user may access. )
|
11
|
+
g.command 'conversations' do |c|
|
12
|
+
c.flag 'cursor', desc: "Paginate through collections of data by setting the cursor parameter to a next_cursor attribute returned by a previous request's response_metadata. Default value fetches the first 'page' of the collection. See pagination for more detail."
|
13
|
+
c.flag 'exclude_archived', desc: 'Set to true to exclude archived channels from the list.'
|
14
|
+
c.flag 'limit', desc: "The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the list hasn't been reached. Must be an integer no larger than 1000."
|
15
|
+
c.flag 'team_id', desc: 'encoded team id to list conversations in, required if org token is used.'
|
16
|
+
c.flag 'types', desc: 'Mix and match channel types by providing a comma-separated list of any combination of public_channel, private_channel, mpim, im.'
|
17
|
+
c.flag 'user', desc: "Browse conversations by a specific user ID's membership. Non-public channels are restricted to those where the calling user shares membership."
|
18
|
+
c.action do |_global_options, options, _args|
|
19
|
+
puts JSON.dump(@client.users_conversations(options))
|
20
|
+
end
|
21
|
+
end
|
19
22
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
23
|
+
g.desc 'Delete the user profile photo'
|
24
|
+
g.long_desc %( Delete the user profile photo )
|
25
|
+
g.command 'deletePhoto' do |c|
|
26
|
+
c.action do |_global_options, options, _args|
|
27
|
+
puts JSON.dump(@client.users_deletePhoto(options))
|
28
|
+
end
|
29
|
+
end
|
27
30
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
31
|
+
g.desc 'Gets user presence information.'
|
32
|
+
g.long_desc %( Gets user presence information. )
|
33
|
+
g.command 'getPresence' do |c|
|
34
|
+
c.flag 'user', desc: 'User to get presence info on. Defaults to the authed user.'
|
35
|
+
c.action do |_global_options, options, _args|
|
36
|
+
puts JSON.dump(@client.users_getPresence(options))
|
37
|
+
end
|
38
|
+
end
|
36
39
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
40
|
+
g.desc 'This method returns the ID of a team user.'
|
41
|
+
g.long_desc %( This method returns the ID of a team user. )
|
42
|
+
g.command 'id' do |c|
|
43
|
+
c.flag 'user', desc: 'User to get ID for, prefixed with @.'
|
44
|
+
c.action do |_global_options, options, _args|
|
45
|
+
puts JSON.dump(@client.users_id(options))
|
46
|
+
end
|
47
|
+
end
|
45
48
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
49
|
+
g.desc "Get a user's identity."
|
50
|
+
g.long_desc %( Get a user's identity. )
|
51
|
+
g.command 'identity' do |c|
|
52
|
+
c.action do |_global_options, options, _args|
|
53
|
+
puts JSON.dump(@client.users_identity(options))
|
54
|
+
end
|
55
|
+
end
|
53
56
|
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
57
|
+
g.desc 'Gets information about a user.'
|
58
|
+
g.long_desc %( Gets information about a user. )
|
59
|
+
g.command 'info' do |c|
|
60
|
+
c.flag 'user', desc: 'User to get info on.'
|
61
|
+
c.flag 'include_locale', desc: 'Set this to true to receive the locale for this user. Defaults to false.'
|
62
|
+
c.action do |_global_options, options, _args|
|
63
|
+
puts JSON.dump(@client.users_info(options))
|
64
|
+
end
|
65
|
+
end
|
63
66
|
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
67
|
+
g.desc 'Lists all users in a Slack team.'
|
68
|
+
g.long_desc %( Lists all users in a Slack team. )
|
69
|
+
g.command 'list' do |c|
|
70
|
+
c.flag 'cursor', desc: "Paginate through collections of data by setting the cursor parameter to a next_cursor attribute returned by a previous request's response_metadata. Default value fetches the first 'page' of the collection. See pagination for more detail."
|
71
|
+
c.flag 'include_locale', desc: 'Set this to true to receive the locale for users. Defaults to false.'
|
72
|
+
c.flag 'limit', desc: "The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't been reached. Providing no limit value will result in Slack attempting to deliver you the entire result set. If the collection is too large you may experience limit_required or HTTP 500 errors."
|
73
|
+
c.flag 'team_id', desc: 'encoded team id to list users in, required if org token is used.'
|
74
|
+
c.action do |_global_options, options, _args|
|
75
|
+
puts JSON.dump(@client.users_list(options))
|
76
|
+
end
|
77
|
+
end
|
75
78
|
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
79
|
+
g.desc 'Find a user with an email address.'
|
80
|
+
g.long_desc %( Find a user with an email address. )
|
81
|
+
g.command 'lookupByEmail' do |c|
|
82
|
+
c.flag 'email', desc: 'An email address belonging to a user in the workspace.'
|
83
|
+
c.action do |_global_options, options, _args|
|
84
|
+
puts JSON.dump(@client.users_lookupByEmail(options))
|
85
|
+
end
|
86
|
+
end
|
84
87
|
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
88
|
+
g.desc 'This method searches for users.'
|
89
|
+
g.long_desc %( This method searches for users. )
|
90
|
+
g.command 'search' do |c|
|
91
|
+
c.flag 'user', desc: 'User to search for.'
|
92
|
+
c.action do |_global_options, options, _args|
|
93
|
+
puts JSON.dump(@client.users_search(options))
|
94
|
+
end
|
95
|
+
end
|
93
96
|
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
97
|
+
g.desc 'Marked a user as active. Deprecated and non-functional.'
|
98
|
+
g.long_desc %( Marked a user as active. Deprecated and non-functional. )
|
99
|
+
g.command 'setActive' do |c|
|
100
|
+
c.action do |_global_options, options, _args|
|
101
|
+
puts JSON.dump(@client.users_setActive(options))
|
102
|
+
end
|
103
|
+
end
|
101
104
|
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
105
|
+
g.desc 'Set the user profile photo'
|
106
|
+
g.long_desc %( Set the user profile photo )
|
107
|
+
g.command 'setPhoto' do |c|
|
108
|
+
c.flag 'crop_w', desc: 'Width/height of crop box (always square).'
|
109
|
+
c.flag 'crop_x', desc: 'X coordinate of top-left corner of crop box.'
|
110
|
+
c.flag 'crop_y', desc: 'Y coordinate of top-left corner of crop box.'
|
111
|
+
c.flag 'image', desc: 'File contents via multipart/form-data.'
|
112
|
+
c.action do |_global_options, options, _args|
|
113
|
+
puts JSON.dump(@client.users_setPhoto(options))
|
114
|
+
end
|
115
|
+
end
|
113
116
|
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
117
|
+
g.desc 'Manually sets user presence.'
|
118
|
+
g.long_desc %( Manually sets user presence. )
|
119
|
+
g.command 'setPresence' do |c|
|
120
|
+
c.flag 'presence', desc: 'Either auto or away.'
|
121
|
+
c.action do |_global_options, options, _args|
|
122
|
+
puts JSON.dump(@client.users_setPresence(options))
|
123
|
+
end
|
124
|
+
end
|
125
|
+
end
|
120
126
|
end
|
121
127
|
end
|
122
128
|
end
|
data/bin/commands/users_admin.rb
CHANGED
@@ -1,29 +1,35 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
# This file was auto-generated by lib/tasks/web.rake
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
4
|
+
module Slack
|
5
|
+
module Cli
|
6
|
+
class App
|
7
|
+
desc 'UsersAdmin methods.'
|
8
|
+
command 'users_admin' do |g|
|
9
|
+
g.desc 'Send an invitation to a new user by email (undocumented)'
|
10
|
+
g.long_desc %( Send an invitation to a new user by email )
|
11
|
+
g.command 'invite' do |c|
|
12
|
+
c.flag 'email', desc: 'Email address of the new user'
|
13
|
+
c.flag 'channels', desc: 'Comma-separated list of IDs (not names!) for channels, which the new user will auto-join. Both channel IDs for public channels and group IDs for private chanels work.'
|
14
|
+
c.flag 'first_name', desc: 'Prefilled input for the "First name" field on the "new user registration" page.'
|
15
|
+
c.flag 'last_name', desc: 'Prefilled input for the "Last name" field on the "new user registration" page.'
|
16
|
+
c.flag 'resend', desc: 'Resend the invitation email if the user has already been invited and the email was sent some time ago.'
|
17
|
+
c.flag 'restricted', desc: 'Invite a guest that can use multiple channels'
|
18
|
+
c.flag 'ultra_restricted', desc: 'Invite a guest that can use one channel only'
|
19
|
+
c.action do |_global_options, options, _args|
|
20
|
+
puts JSON.dump(@client.users_admin_invite(options))
|
21
|
+
end
|
22
|
+
end
|
20
23
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
24
|
+
g.desc 'Disable a user (undocumented)'
|
25
|
+
g.long_desc %( Disable a user )
|
26
|
+
g.command 'setInactive' do |c|
|
27
|
+
c.flag 'user', desc: 'User to disable'
|
28
|
+
c.action do |_global_options, options, _args|
|
29
|
+
puts JSON.dump(@client.users_admin_setInactive(options))
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
27
33
|
end
|
28
34
|
end
|
29
35
|
end
|
data/bin/commands/users_prefs.rb
CHANGED
@@ -1,13 +1,19 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
# This file was auto-generated by lib/tasks/web.rake
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
4
|
+
module Slack
|
5
|
+
module Cli
|
6
|
+
class App
|
7
|
+
desc 'UsersPrefs methods.'
|
8
|
+
command 'users_prefs' do |g|
|
9
|
+
g.desc "Returns the user's preferences (undocumented)"
|
10
|
+
g.long_desc %( Returns the user's preferences )
|
11
|
+
g.command 'get' do |c|
|
12
|
+
c.action do |_global_options, options, _args|
|
13
|
+
puts JSON.dump(@client.users_prefs_get(options))
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
11
17
|
end
|
12
18
|
end
|
13
19
|
end
|
@@ -1,27 +1,33 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
# This file was auto-generated by lib/tasks/web.rake
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
4
|
+
module Slack
|
5
|
+
module Cli
|
6
|
+
class App
|
7
|
+
desc 'UsersProfile methods.'
|
8
|
+
command 'users_profile' do |g|
|
9
|
+
g.desc "Retrieve a user's profile information, including their custom status."
|
10
|
+
g.long_desc %( Retrieve a user's profile information, including their custom status. )
|
11
|
+
g.command 'get' do |c|
|
12
|
+
c.flag 'include_labels', desc: 'Include labels for each ID in custom profile fields. Using this parameter will heavily rate-limit your requests and is not recommended.'
|
13
|
+
c.flag 'user', desc: 'User to retrieve profile info for.'
|
14
|
+
c.action do |_global_options, options, _args|
|
15
|
+
puts JSON.dump(@client.users_profile_get(options))
|
16
|
+
end
|
17
|
+
end
|
15
18
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
19
|
+
g.desc "Set a user's profile information, including custom status."
|
20
|
+
g.long_desc %( Set a user's profile information, including custom status. )
|
21
|
+
g.command 'set' do |c|
|
22
|
+
c.flag 'name', desc: 'Name of a single key to set. Usable only if profile is not passed.'
|
23
|
+
c.flag 'profile', desc: 'Collection of key:value pairs presented as a URL-encoded JSON hash. At most 50 fields may be set. Each field name is limited to 255 characters.'
|
24
|
+
c.flag 'user', desc: 'ID of user to change. This argument may only be specified by admins on paid teams.'
|
25
|
+
c.flag 'value', desc: 'Value to set a single key to. Usable only if profile is not passed.'
|
26
|
+
c.action do |_global_options, options, _args|
|
27
|
+
puts JSON.dump(@client.users_profile_set(options))
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
25
31
|
end
|
26
32
|
end
|
27
33
|
end
|
data/bin/commands/views.rb
CHANGED
@@ -1,50 +1,56 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
# This file was auto-generated by lib/tasks/web.rake
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
4
|
+
module Slack
|
5
|
+
module Cli
|
6
|
+
class App
|
7
|
+
desc 'Views methods.'
|
8
|
+
command 'views' do |g|
|
9
|
+
g.desc 'Open a view for a user.'
|
10
|
+
g.long_desc %( Open a view for a user. )
|
11
|
+
g.command 'open' do |c|
|
12
|
+
c.flag 'view', desc: 'A view payload. This must be a JSON-encoded string.'
|
13
|
+
c.flag 'trigger_id', desc: 'Exchange a trigger to post to the user.'
|
14
|
+
c.flag 'interactivity_pointer', desc: 'Exchange an interactivity pointer to post to the user.'
|
15
|
+
c.action do |_global_options, options, _args|
|
16
|
+
puts JSON.dump(@client.views_open(options))
|
17
|
+
end
|
18
|
+
end
|
16
19
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
20
|
+
g.desc 'Publish a static view for a User.'
|
21
|
+
g.long_desc %( Publish a static view for a User. )
|
22
|
+
g.command 'publish' do |c|
|
23
|
+
c.flag 'user_id', desc: 'id of the user you want publish a view to.'
|
24
|
+
c.flag 'view', desc: 'A view payload. This must be a JSON-encoded string.'
|
25
|
+
c.flag 'hash', desc: 'A string that represents view state to protect against possible race conditions.'
|
26
|
+
c.action do |_global_options, options, _args|
|
27
|
+
puts JSON.dump(@client.views_publish(options))
|
28
|
+
end
|
29
|
+
end
|
27
30
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
31
|
+
g.desc 'Push a view onto the stack of a root view.'
|
32
|
+
g.long_desc %( Push a view onto the stack of a root view. )
|
33
|
+
g.command 'push' do |c|
|
34
|
+
c.flag 'view', desc: 'A view payload. This must be a JSON-encoded string.'
|
35
|
+
c.flag 'trigger_id', desc: 'Exchange a trigger to post to the user.'
|
36
|
+
c.flag 'interactivity_pointer', desc: 'Exchange an interactivity pointer to post to the user.'
|
37
|
+
c.action do |_global_options, options, _args|
|
38
|
+
puts JSON.dump(@client.views_push(options))
|
39
|
+
end
|
40
|
+
end
|
38
41
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
42
|
+
g.desc 'Update an existing view.'
|
43
|
+
g.long_desc %( Update an existing view. )
|
44
|
+
g.command 'update' do |c|
|
45
|
+
c.flag 'view', desc: 'A view object. This must be a JSON-encoded string.'
|
46
|
+
c.flag 'external_id', desc: 'A unique identifier of the view set by the developer. Must be unique for all views on a team. Max length of 255 characters. Either view_id or external_id is required.'
|
47
|
+
c.flag 'view_id', desc: 'A unique identifier of the view to be updated. Either view_id or external_id is required.'
|
48
|
+
c.flag 'hash', desc: 'A string that represents view state to protect against possible race conditions.'
|
49
|
+
c.action do |_global_options, options, _args|
|
50
|
+
puts JSON.dump(@client.views_update(options))
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
48
54
|
end
|
49
55
|
end
|
50
56
|
end
|
data/bin/commands/workflows.rb
CHANGED
@@ -1,38 +1,44 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
# This file was auto-generated by lib/tasks/web.rake
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
4
|
+
module Slack
|
5
|
+
module Cli
|
6
|
+
class App
|
7
|
+
desc 'Workflows methods.'
|
8
|
+
command 'workflows' do |g|
|
9
|
+
g.desc "Indicate that an app's step in a workflow completed execution."
|
10
|
+
g.long_desc %( Indicate that an app's step in a workflow completed execution. )
|
11
|
+
g.command 'stepCompleted' do |c|
|
12
|
+
c.flag 'workflow_step_execute_id', desc: 'Context identifier that maps to the correct workflow step execution.'
|
13
|
+
c.flag 'outputs', desc: 'Key-value object of outputs from your step. Keys of this object reflect the configured key properties of your outputs array from your workflow_step object.'
|
14
|
+
c.action do |_global_options, options, _args|
|
15
|
+
puts JSON.dump(@client.workflows_stepCompleted(options))
|
16
|
+
end
|
17
|
+
end
|
15
18
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
19
|
+
g.desc "Indicate that an app's step in a workflow failed to execute."
|
20
|
+
g.long_desc %( Indicate that an app's step in a workflow failed to execute. )
|
21
|
+
g.command 'stepFailed' do |c|
|
22
|
+
c.flag 'error', desc: 'A JSON-based object with a message property that should contain a human readable error message.'
|
23
|
+
c.flag 'workflow_step_execute_id', desc: 'Context identifier that maps to the correct workflow step execution.'
|
24
|
+
c.action do |_global_options, options, _args|
|
25
|
+
puts JSON.dump(@client.workflows_stepFailed(options))
|
26
|
+
end
|
27
|
+
end
|
25
28
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
29
|
+
g.desc 'Update the configuration for a workflow step.'
|
30
|
+
g.long_desc %( Update the configuration for a workflow step. )
|
31
|
+
g.command 'updateStep' do |c|
|
32
|
+
c.flag 'workflow_step_edit_id', desc: 'A context identifier provided with view_submission payloads used to call back to workflows.updateStep.'
|
33
|
+
c.flag 'inputs', desc: 'A JSON key-value map of inputs required from a user during configuration. This is the data your app expects to receive when the workflow step starts. Please note: the embedded variable format is set and replaced by the workflow system. You cannot create custom variables that will be replaced at runtime. Read more about variables in workflow steps here.'
|
34
|
+
c.flag 'outputs', desc: 'An JSON array of output objects used during step execution. This is the data your app agrees to provide when your workflow step was executed.'
|
35
|
+
c.flag 'step_image_url', desc: 'An optional field that can be used to override app image that is shown in the Workflow Builder.'
|
36
|
+
c.flag 'step_name', desc: 'An optional field that can be used to override the step name that is shown in the Workflow Builder.'
|
37
|
+
c.action do |_global_options, options, _args|
|
38
|
+
puts JSON.dump(@client.workflows_updateStep(options))
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
36
42
|
end
|
37
43
|
end
|
38
44
|
end
|