slack-ruby-client 2.0.0 → 2.1.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/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
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ea3cc0e5082af70d6b464bfcdf1b3c980380b356348818d2c98b9f9b1abe9be8
|
|
4
|
+
data.tar.gz: 39e8cc3adc65e06b34fb906face6f7eab61f6f5f5d265c7a3022d8ffc656b553
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a1e9755f1a189388376479c74e616ec4dc035195f28ae861f9a8ae8bc0c3a6ea50b11dc00d814b870ea7f7ac5784cbe936a6a575ba70f5aeb86741338d83553f
|
|
7
|
+
data.tar.gz: 80255ba98558914d209543e0c7e2440cef49f8bac0873e62948f3d8d9e96e0b42b624517ead794724b913e4d5afbc6826de597084c63b8128be68f894b40a395
|
data/.github/FUNDING.yml
CHANGED
|
@@ -1,8 +1,25 @@
|
|
|
1
1
|
name: Integration Tests
|
|
2
2
|
on: push
|
|
3
3
|
jobs:
|
|
4
|
+
check-slack-api-token:
|
|
5
|
+
runs-on: ubuntu-latest
|
|
6
|
+
outputs:
|
|
7
|
+
SLACK_API_TOKEN_EXISTS: ${{ steps.check-slack-api-token.outputs.SLACK_API_TOKEN_EXISTS }}
|
|
8
|
+
steps:
|
|
9
|
+
- name: Check for SLACK_API_TOKEN availability
|
|
10
|
+
id: check-slack-api-token
|
|
11
|
+
shell: bash
|
|
12
|
+
run: |
|
|
13
|
+
if [ "${{ secrets.SLACK_API_TOKEN }}" != '' ]; then
|
|
14
|
+
echo "SLACK_API_TOKEN_EXISTS=true" >> $GITHUB_OUTPUT;
|
|
15
|
+
else
|
|
16
|
+
echo "SLACK_API_TOKEN_EXISTS=false" >> $GITHUB_OUTPUT;
|
|
17
|
+
fi
|
|
18
|
+
|
|
4
19
|
test:
|
|
5
20
|
runs-on: ubuntu-latest
|
|
21
|
+
needs: [check-slack-api-token]
|
|
22
|
+
if: needs.check-slack-api-token.outputs.SLACK_API_TOKEN_EXISTS == 'true'
|
|
6
23
|
strategy:
|
|
7
24
|
matrix:
|
|
8
25
|
entry:
|
|
@@ -21,6 +38,8 @@ jobs:
|
|
|
21
38
|
CONCURRENCY: ${{ matrix.entry.concurrency }}
|
|
22
39
|
SLACK_API_TOKEN: ${{ secrets.SLACK_API_TOKEN }}
|
|
23
40
|
RACK_ENV: test
|
|
41
|
+
SPEC: "--pattern spec/**/integration/*_spec.rb"
|
|
42
|
+
SPEC_OPTS: "--pattern spec/**/integration/*_spec.rb"
|
|
24
43
|
run: |
|
|
25
44
|
bundle install
|
|
26
45
|
bundle exec rake
|
|
@@ -17,5 +17,5 @@ jobs:
|
|
|
17
17
|
bundler-cache: true
|
|
18
18
|
- run: |
|
|
19
19
|
# Personal access token for dangerpr-bot - public, but base64 encoded to avoid tripping up GitHub
|
|
20
|
-
TOKEN=$(echo -n
|
|
20
|
+
TOKEN=$(echo -n Z2hwX0xNQ3VmanBFeTBvYkZVTWh6NVNqVFFBOEUxU25abzBqRUVuaAo= | base64 --decode)
|
|
21
21
|
DANGER_GITHUB_API_TOKEN=$TOKEN bundle exec danger --verbose
|
data/.github/workflows/test.yml
CHANGED
|
@@ -10,6 +10,7 @@ jobs:
|
|
|
10
10
|
- { ruby: "2.7", concurrency: async-websocket }
|
|
11
11
|
- { ruby: "3.0" }
|
|
12
12
|
- { ruby: "3.1" }
|
|
13
|
+
- { ruby: "3.2" }
|
|
13
14
|
- { ruby: ruby-head, ignore: true }
|
|
14
15
|
- { ruby: jruby-head, ignore: true }
|
|
15
16
|
name: test (ruby=${{ matrix.entry.ruby }}, concurrency=${{ matrix.entry.concurrency || 'none' }})
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
### 2.1.0 (2023/03/17)
|
|
2
|
+
|
|
3
|
+
* [#440](https://github.com/ruby-grape/slack-ruby-client/pull/440): Added Enterprise support [via TideLift](https://tidelift.com/subscription/request-a-demo?utm_source=rubygems-slack-ruby-client&utm_medium=referral&utm_campaign=enterprise) - [@dblock](https://github.com/dblock).
|
|
4
|
+
* [#436](https://github.com/slack-ruby/slack-ruby-client/pull/436): Removed dependency on unused websocket-driver - [@blowfishpro](https://github.com/blowfishpro).
|
|
5
|
+
* [#434](https://github.com/slack-ruby/slack-ruby-client/pull/434): Fixed incompatibility with Faraday >= 2.7.0 and GLI usage in the `slack` script - [@blowfishpro](https://github.com/blowfishpro).
|
|
6
|
+
* [#446](https://github.com/slack-ruby/slack-ruby-client/pull/446): Added support for Ruby 3.2 - [@duffn](https://github.com/duffn).
|
|
7
|
+
* [#447](https://github.com/slack-ruby/slack-ruby-client/pull/447): Added `admin_conversations_bulkArchive`, `admin_conversations_bulkDelete`, `admin_conversations_bulkMove`, `admin_conversations_convertToPublic`, `admin_conversations_lookup`, `admin_roles_addAssignments`, `admin_roles_listAssignments`, `admin_roles_removeAssignments`, `functions_workflows_steps_list`, and `functions_workflows_steps_responses_export` - [@dblock](https://github.com/dblock).
|
|
8
|
+
* [#447](https://github.com/slack-ruby/slack-ruby-client/pull/447): Added pagination to `team_accessLogs` - [@dblock](https://github.com/dblock).
|
|
9
|
+
|
|
1
10
|
### 2.0.0 (2022/10/19)
|
|
2
11
|
|
|
3
12
|
* [#416](https://github.com/slack-ruby/slack-ruby-client/pull/416): Removes default values for Faraday's SSL settings `ca_file` and `ca_path` - [@irphilli](https://github.com/irphilli).
|
data/README.md
CHANGED
|
@@ -2,7 +2,7 @@ Slack Ruby Client
|
|
|
2
2
|
=================
|
|
3
3
|
|
|
4
4
|
[](http://badge.fury.io/rb/slack-ruby-client)
|
|
5
|
-
[](https://github.com/slack-ruby/slack-ruby-client/actions/workflows/integration_test.yml)
|
|
6
6
|
[](https://github.com/slack-ruby/slack-ruby-client/actions/workflows/test.yml)
|
|
7
7
|
[](https://codeclimate.com/github/slack-ruby/slack-ruby-client)
|
|
8
8
|
|
|
@@ -18,7 +18,7 @@ A Ruby client for the Slack [Web](https://api.slack.com/web), [RealTime Messagin
|
|
|
18
18
|
- [Usage](#usage)
|
|
19
19
|
- [Create a New Bot Integration](#create-a-new-bot-integration)
|
|
20
20
|
- [OAuth Code Grant](#oauth-code-grant)
|
|
21
|
-
- [Using
|
|
21
|
+
- [Using an API Token](#using-an-api-token)
|
|
22
22
|
- [Global Settings](#global-settings)
|
|
23
23
|
- [Web Client](#web-client)
|
|
24
24
|
- [Web Client Examples](#web-client-examples)
|
|
@@ -54,10 +54,11 @@ A Ruby client for the Slack [Web](https://api.slack.com/web), [RealTime Messagin
|
|
|
54
54
|
- [Command-Line Client](#command-line-client)
|
|
55
55
|
- [Authenticate with Slack](#authenticate-with-slack)
|
|
56
56
|
- [Send a Message](#send-a-message)
|
|
57
|
-
- [Get Channel Id](#get-channel-id)
|
|
58
57
|
- [Get Channel Info](#get-channel-info-1)
|
|
59
58
|
- [List Users](#list-users)
|
|
59
|
+
- [Enterprise Support](#enterprise-support)
|
|
60
60
|
- [History](#history)
|
|
61
|
+
- [Security](#security)
|
|
61
62
|
- [Contributing](#contributing)
|
|
62
63
|
- [Copyright and License](#copyright-and-license)
|
|
63
64
|
|
|
@@ -70,7 +71,7 @@ A Ruby client for the Slack [Web](https://api.slack.com/web), [RealTime Messagin
|
|
|
70
71
|
|
|
71
72
|
## Stable Release
|
|
72
73
|
|
|
73
|
-
You're reading the documentation for the **stable** release of slack-ruby-client,
|
|
74
|
+
You're reading the documentation for the **stable** release of slack-ruby-client, v2.1.0. See [UPGRADING](UPGRADING.md) when upgrading from an older version.
|
|
74
75
|
|
|
75
76
|
## Installation
|
|
76
77
|
|
|
@@ -100,9 +101,9 @@ To integrate your bot with Slack, you must first create a new [Slack App](https:
|
|
|
100
101
|
|
|
101
102
|
Once created, go to the app's Basic Info tab and grab the Client ID and Client Secret. You'll need these in order complete an [OAuth code grant flow](https://api.slack.com/docs/oauth#flow) as described at [slack-ruby-bot-server](https://github.com/slack-ruby/slack-ruby-bot-server).
|
|
102
103
|
|
|
103
|
-
### Using
|
|
104
|
+
### Using an API Token
|
|
104
105
|
|
|
105
|
-
Although OAuth is recommended, you can
|
|
106
|
+
Although OAuth is recommended, you can also [generate an API token](https://api.slack.com/tutorials/tracks/getting-a-token) for your app and use it for some interactions.
|
|
106
107
|
|
|
107
108
|
```ruby
|
|
108
109
|
Slack.configure do |config|
|
|
@@ -602,17 +603,10 @@ $ slack chat postMessage --text="hello world" --channel="#general"
|
|
|
602
603
|
{"ok":true,"channel":"...","ts":"...","message":{"text":"hello world","username":"bot","type":"message","subtype":"bot_message","ts":"..."}}
|
|
603
604
|
```
|
|
604
605
|
|
|
605
|
-
#### Get Channel Id
|
|
606
|
-
|
|
607
|
-
```
|
|
608
|
-
$ slack channels id --channel=#general
|
|
609
|
-
{"ok":true,"channel":{"id":"C04KB5X4D"}}
|
|
610
|
-
```
|
|
611
|
-
|
|
612
606
|
#### Get Channel Info
|
|
613
607
|
|
|
614
608
|
```
|
|
615
|
-
$ slack
|
|
609
|
+
$ slack conversations info --channel=#general
|
|
616
610
|
{"ok":true,"channel":{"id":"C04KB5X4D","name":"general", ...}}
|
|
617
611
|
```
|
|
618
612
|
|
|
@@ -634,10 +628,20 @@ $ slack users list | jq '.members | map({(.id): .name})'
|
|
|
634
628
|
|
|
635
629
|
See `slack help` for a complete command-line reference.
|
|
636
630
|
|
|
631
|
+
## Enterprise Support
|
|
632
|
+
|
|
633
|
+
Available as part of the Tidelift Subscription.
|
|
634
|
+
|
|
635
|
+
The maintainers of slack-ruby-client are working with Tidelift to deliver commercial support and maintenance. Save time, reduce risk, and improve code health, while paying the maintainers of slack-ruby-client. Click [here](https://tidelift.com/subscription/request-a-demo?utm_source=rubygems-slack-ruby-client&utm_medium=referral&utm_campaign=enterprise) for more details.
|
|
636
|
+
|
|
637
637
|
## History
|
|
638
638
|
|
|
639
639
|
This gem is based on [slack-ruby-gem](https://github.com/aki017/slack-ruby-gem), but it more clearly separates the Web and RTM APIs, is more thoroughly tested and is in active development.
|
|
640
640
|
|
|
641
|
+
## Security
|
|
642
|
+
|
|
643
|
+
See [SECURITY](SECURITY.md).
|
|
644
|
+
|
|
641
645
|
## Contributing
|
|
642
646
|
|
|
643
647
|
See [CONTRIBUTING](CONTRIBUTING.md).
|
data/SECURITY.md
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Security Policy
|
|
2
|
+
|
|
3
|
+
## Supported Versions
|
|
4
|
+
|
|
5
|
+
Version 2.0 or newer is currently supported.
|
|
6
|
+
|
|
7
|
+
## Reporting a Vulnerability
|
|
8
|
+
|
|
9
|
+
Tidelift acts as the security contact for this open-source project. To make a report, please email the security team at [security@tidelift.com](mailto:security@tidelift.com). Please do not create a public GitHub issue. See [tidelift.com/security](https://tidelift.com/security) for details and more options.
|
|
@@ -1,16 +1,22 @@
|
|
|
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
|
-
|
|
4
|
+
module Slack
|
|
5
|
+
module Cli
|
|
6
|
+
class App
|
|
7
|
+
desc 'AdminAnalytics methods.'
|
|
8
|
+
command 'admin_analytics' do |g|
|
|
9
|
+
g.desc 'Retrieve analytics data for a given date, presented as a compressed JSON file'
|
|
10
|
+
g.long_desc %( Retrieve analytics data for a given date, presented as a compressed JSON file )
|
|
11
|
+
g.command 'getFile' do |c|
|
|
12
|
+
c.flag 'type', desc: 'The type of analytics to retrieve. The options are currently limited to member (for grid member analytics) and public_channel (for public channel analytics).'
|
|
13
|
+
c.flag 'date', desc: 'Date to retrieve the analytics data for, expressed as YYYY-MM-DD in UTC. Required unless metadata_only is set to true.'
|
|
14
|
+
c.flag 'metadata_only', desc: 'Retrieve metadata for the type of analytics indicated. Can be used only with type set to public_channel analytics. See detail below. Omit the date parameter when using this argument.'
|
|
15
|
+
c.action do |_global_options, options, _args|
|
|
16
|
+
puts JSON.dump(@client.admin_analytics_getFile(options))
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
14
20
|
end
|
|
15
21
|
end
|
|
16
22
|
end
|
data/bin/commands/admin_apps.rb
CHANGED
|
@@ -1,51 +1,57 @@
|
|
|
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
|
-
|
|
4
|
+
module Slack
|
|
5
|
+
module Cli
|
|
6
|
+
class App
|
|
7
|
+
desc 'AdminApps methods.'
|
|
8
|
+
command 'admin_apps' do |g|
|
|
9
|
+
g.desc 'Approve an app for installation on a workspace.'
|
|
10
|
+
g.long_desc %( Approve an app for installation on a workspace. )
|
|
11
|
+
g.command 'approve' do |c|
|
|
12
|
+
c.flag 'app_id', desc: 'The id of the app to approve.'
|
|
13
|
+
c.flag 'enterprise_id', desc: 'The ID of the enterprise to approve the app on.'
|
|
14
|
+
c.flag 'request_id', desc: 'The id of the request to approve.'
|
|
15
|
+
c.flag 'team_id', desc: 'The ID of the workspace to approve the app on.'
|
|
16
|
+
c.action do |_global_options, options, _args|
|
|
17
|
+
puts JSON.dump(@client.admin_apps_approve(options))
|
|
18
|
+
end
|
|
19
|
+
end
|
|
17
20
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
21
|
+
g.desc 'Clear an app resolution'
|
|
22
|
+
g.long_desc %( Clear an app resolution )
|
|
23
|
+
g.command 'clearResolution' do |c|
|
|
24
|
+
c.flag 'app_id', desc: 'The id of the app whose resolution you want to clear/undo.'
|
|
25
|
+
c.flag 'enterprise_id', desc: 'The enterprise to clear the app resolution from.'
|
|
26
|
+
c.flag 'team_id', desc: 'The workspace to clear the app resolution from.'
|
|
27
|
+
c.action do |_global_options, options, _args|
|
|
28
|
+
puts JSON.dump(@client.admin_apps_clearResolution(options))
|
|
29
|
+
end
|
|
30
|
+
end
|
|
28
31
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
32
|
+
g.desc 'Restrict an app for installation on a workspace.'
|
|
33
|
+
g.long_desc %( Restrict an app for installation on a workspace. )
|
|
34
|
+
g.command 'restrict' do |c|
|
|
35
|
+
c.flag 'app_id', desc: 'The id of the app to restrict.'
|
|
36
|
+
c.flag 'enterprise_id', desc: 'The ID of the enterprise to approve the app on.'
|
|
37
|
+
c.flag 'request_id', desc: 'The id of the request to restrict.'
|
|
38
|
+
c.flag 'team_id', desc: 'The ID of the workspace to approve the app on.'
|
|
39
|
+
c.action do |_global_options, options, _args|
|
|
40
|
+
puts JSON.dump(@client.admin_apps_restrict(options))
|
|
41
|
+
end
|
|
42
|
+
end
|
|
40
43
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
44
|
+
g.desc 'Uninstall an app from one or many workspaces, or an entire enterprise organization.'
|
|
45
|
+
g.long_desc %( Uninstall an app from one or many workspaces, or an entire enterprise organization. )
|
|
46
|
+
g.command 'uninstall' do |c|
|
|
47
|
+
c.flag 'app_id', desc: 'The ID of the app to uninstall.'
|
|
48
|
+
c.flag 'enterprise_id', desc: 'The enterprise to completely uninstall the application from (across all workspaces). With an org-level token, this or team_ids is required.'
|
|
49
|
+
c.flag 'team_ids', desc: 'IDs of the teams to uninstall from (max 100). With an org-level token, this or enterprise_id is required.'
|
|
50
|
+
c.action do |_global_options, options, _args|
|
|
51
|
+
puts JSON.dump(@client.admin_apps_uninstall(options))
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
49
55
|
end
|
|
50
56
|
end
|
|
51
57
|
end
|
|
@@ -1,17 +1,23 @@
|
|
|
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 'AdminAppsApproved methods.'
|
|
8
|
+
command 'admin_apps_approved' do |g|
|
|
9
|
+
g.desc 'List approved apps for an org or workspace.'
|
|
10
|
+
g.long_desc %( List approved apps for an org or workspace. )
|
|
11
|
+
g.command 'list' do |c|
|
|
12
|
+
c.flag 'cursor', desc: 'Set cursor to next_cursor returned by the previous call to list items in the next page.'
|
|
13
|
+
c.flag 'enterprise_id', desc: '.'
|
|
14
|
+
c.flag 'limit', desc: 'The maximum number of items to return. Must be between 1 - 1000 both inclusive.'
|
|
15
|
+
c.flag 'team_id', desc: '.'
|
|
16
|
+
c.action do |_global_options, options, _args|
|
|
17
|
+
puts JSON.dump(@client.admin_apps_approved_list(options))
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
15
21
|
end
|
|
16
22
|
end
|
|
17
23
|
end
|
|
@@ -1,28 +1,34 @@
|
|
|
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 'AdminAppsRequests methods.'
|
|
8
|
+
command 'admin_apps_requests' do |g|
|
|
9
|
+
g.desc 'Cancel app request for team'
|
|
10
|
+
g.long_desc %( Cancel app request for team )
|
|
11
|
+
g.command 'cancel' do |c|
|
|
12
|
+
c.flag 'request_id', desc: 'The id of the request to cancel.'
|
|
13
|
+
c.flag 'enterprise_id', desc: 'The ID of the enterprise where this request belongs.'
|
|
14
|
+
c.flag 'team_id', desc: 'The ID of the workspace where this request belongs.'
|
|
15
|
+
c.action do |_global_options, options, _args|
|
|
16
|
+
puts JSON.dump(@client.admin_apps_requests_cancel(options))
|
|
17
|
+
end
|
|
18
|
+
end
|
|
16
19
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
g.desc 'List app requests for a team/workspace.'
|
|
21
|
+
g.long_desc %( List app requests for a team/workspace. )
|
|
22
|
+
g.command 'list' do |c|
|
|
23
|
+
c.flag 'cursor', desc: 'Set cursor to next_cursor returned by the previous call to list items in the next page.'
|
|
24
|
+
c.flag 'enterprise_id', desc: '.'
|
|
25
|
+
c.flag 'limit', desc: 'The maximum number of items to return. Must be between 1 - 1000 both inclusive.'
|
|
26
|
+
c.flag 'team_id', desc: '.'
|
|
27
|
+
c.action do |_global_options, options, _args|
|
|
28
|
+
puts JSON.dump(@client.admin_apps_requests_list(options))
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
26
32
|
end
|
|
27
33
|
end
|
|
28
34
|
end
|
|
@@ -1,17 +1,23 @@
|
|
|
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 'AdminAppsRestricted methods.'
|
|
8
|
+
command 'admin_apps_restricted' do |g|
|
|
9
|
+
g.desc 'List restricted apps for an org or workspace.'
|
|
10
|
+
g.long_desc %( List restricted apps for an org or workspace. )
|
|
11
|
+
g.command 'list' do |c|
|
|
12
|
+
c.flag 'cursor', desc: 'Set cursor to next_cursor returned by the previous call to list items in the next page.'
|
|
13
|
+
c.flag 'enterprise_id', desc: '.'
|
|
14
|
+
c.flag 'limit', desc: 'The maximum number of items to return. Must be between 1 - 1000 both inclusive.'
|
|
15
|
+
c.flag 'team_id', desc: '.'
|
|
16
|
+
c.action do |_global_options, options, _args|
|
|
17
|
+
puts JSON.dump(@client.admin_apps_restricted_list(options))
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
15
21
|
end
|
|
16
22
|
end
|
|
17
23
|
end
|
|
@@ -1,23 +1,29 @@
|
|
|
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
|
-
|
|
4
|
+
module Slack
|
|
5
|
+
module Cli
|
|
6
|
+
class App
|
|
7
|
+
desc 'AdminAuditAnomalyAllow methods.'
|
|
8
|
+
command 'admin_audit_anomaly_allow' do |g|
|
|
9
|
+
g.desc 'API to allow enterprise grid admins to read the allow list of IP blocks and ASNs from the enterprise configuration.'
|
|
10
|
+
g.long_desc %( API to allow enterprise grid admins to read the allow list of IP blocks and ASNs from the enterprise configuration. )
|
|
11
|
+
g.command 'getItem' do |c|
|
|
12
|
+
c.action do |_global_options, options, _args|
|
|
13
|
+
puts JSON.dump(@client.admin_audit_anomaly_allow_getItem(options))
|
|
14
|
+
end
|
|
15
|
+
end
|
|
13
16
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
g.desc 'API to allow enterprise grid admins to write/overwrite the allow list of IP blocks and ASNs from the enterprise configuration.'
|
|
18
|
+
g.long_desc %( API to allow enterprise grid admins to write/overwrite the allow list of IP blocks and ASNs from the enterprise configuration. )
|
|
19
|
+
g.command 'updateItem' do |c|
|
|
20
|
+
c.flag 'trusted_asns', desc: 'allow list of Autonomous System Numbers (ASN) in the enterprise grid configuarion.'
|
|
21
|
+
c.flag 'trusted_cidr', desc: 'allow list of IPv4 addressses using cidr notation in the enterprise grid configuarion.'
|
|
22
|
+
c.action do |_global_options, options, _args|
|
|
23
|
+
puts JSON.dump(@client.admin_audit_anomaly_allow_updateItem(options))
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
21
27
|
end
|
|
22
28
|
end
|
|
23
29
|
end
|
|
@@ -1,39 +1,45 @@
|
|
|
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 'AdminAuthPolicy methods.'
|
|
8
|
+
command 'admin_auth_policy' do |g|
|
|
9
|
+
g.desc 'Assign entities to a particular authentication policy.'
|
|
10
|
+
g.long_desc %( Assign entities to a particular authentication policy. )
|
|
11
|
+
g.command 'assignEntities' do |c|
|
|
12
|
+
c.flag 'entity_ids', desc: 'Array of IDs to assign to the policy.'
|
|
13
|
+
c.flag 'entity_type', desc: 'The type of entity to assign to the policy. Currently, USER is supported.'
|
|
14
|
+
c.flag 'policy_name', desc: 'The name of the authentication policy to assign the entities to. Currently, email_password is the only policy that may be used with this method.'
|
|
15
|
+
c.action do |_global_options, options, _args|
|
|
16
|
+
puts JSON.dump(@client.admin_auth_policy_assignEntities(options))
|
|
17
|
+
end
|
|
18
|
+
end
|
|
16
19
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
20
|
+
g.desc 'Fetch all the entities assigned to a particular authentication policy by name.'
|
|
21
|
+
g.long_desc %( Fetch all the entities assigned to a particular authentication policy by name. )
|
|
22
|
+
g.command 'getEntities' do |c|
|
|
23
|
+
c.flag 'policy_name', desc: 'The name of the policy to fetch entities for. Currently, email_password is the only policy that may be used with this method.'
|
|
24
|
+
c.flag 'cursor', desc: 'Set cursor to next_cursor returned by the previous call to list items in the next page.'
|
|
25
|
+
c.flag 'entity_type', desc: 'The type of entity to assign to the policy. Currently, USER is supported.'
|
|
26
|
+
c.flag 'limit', desc: 'The maximum number of items to return. Must be between 1 and 1000, both inclusive.'
|
|
27
|
+
c.action do |_global_options, options, _args|
|
|
28
|
+
puts JSON.dump(@client.admin_auth_policy_getEntities(options))
|
|
29
|
+
end
|
|
30
|
+
end
|
|
28
31
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
32
|
+
g.desc 'Remove specified entities from a specified authentication policy.'
|
|
33
|
+
g.long_desc %( Remove specified entities from a specified authentication policy. )
|
|
34
|
+
g.command 'removeEntities' do |c|
|
|
35
|
+
c.flag 'entity_ids', desc: "Encoded IDs of the entities you'd like to remove from the policy."
|
|
36
|
+
c.flag 'entity_type', desc: 'The type of entity to assign to the policy. Currently, USER is supported.'
|
|
37
|
+
c.flag 'policy_name', desc: 'The name of the policy to remove entities from. Currently, email_password is the only policy that may be used with this method.'
|
|
38
|
+
c.action do |_global_options, options, _args|
|
|
39
|
+
puts JSON.dump(@client.admin_auth_policy_removeEntities(options))
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
37
43
|
end
|
|
38
44
|
end
|
|
39
45
|
end
|