Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add apps.manifest.* & tooling.tokens.rotate API support #1231

Merged
merged 1 commit into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ typescript-types/dist/

logs/
json-logs/raw*
slack-api-client/tmp/

.DS_Store

Expand Down
26 changes: 26 additions & 0 deletions json-logs/samples/api/apps.manifest.create.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"ok": false,
"error": "",
"response_metadata": {
"messages": [
""
]
},
"needed": "",
"provided": "",
"errors": [
{
"code": "",
"message": "",
"pointer": ""
}
],
"app_id": "A00000000",
"credentials": {
"client_id": "0000000000.000000",
"client_secret": "",
"verification_token": "",
"signing_secret": ""
},
"oauth_authorize_url": "https://www.example.com/"
}
6 changes: 6 additions & 0 deletions json-logs/samples/api/apps.manifest.delete.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"ok": false,
"error": "",
"needed": "",
"provided": ""
}
87 changes: 87 additions & 0 deletions json-logs/samples/api/apps.manifest.export.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
{
"ok": false,
"manifest": {
"_metadata": {
"major_version": "",
"minor_version": ""
},
"display_information": {
"name": "",
"long_description": "",
"description": "",
"background_color": ""
},
"settings": {
"description": "",
"long_description": "",
"background_color": "",
"event_subscriptions": {
"bot_events": [
""
],
"user_events": [
""
],
"request_url": ""
},
"interactivity": {
"is_enabled": false,
"request_url": "",
"message_menu_options_url": ""
},
"allowed_ip_address_ranges": [
""
],
"org_deploy_enabled": false,
"socket_mode_enabled": false,
"token_rotation_enabled": false
},
"features": {
"app_home": {
"home_tab_enabled": false,
"messages_tab_enabled": false,
"messages_tab_read_only_enabled": false
},
"bot_user": {
"display_name": "",
"always_online": false
},
"shortcuts": [
{
"type": "",
"callback_id": "",
"name": "",
"description": ""
}
],
"slash_commands": [
{
"command": "",
"description": "",
"usage_hint": "",
"url": "",
"should_escape": false
}
],
"unfurl_domains": [
""
]
},
"oauth_config": {
"scopes": {
"bot": [
""
],
"user": [
""
]
},
"redirect_urls": [
""
]
}
},
"error": "",
"needed": "",
"provided": ""
}
8 changes: 8 additions & 0 deletions json-logs/samples/api/apps.manifest.update.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"ok": false,
"app_id": "A00000000",
"permissions_updated": false,
"error": "",
"needed": "",
"provided": ""
}
18 changes: 18 additions & 0 deletions json-logs/samples/api/apps.manifest.validate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"ok": false,
"error": "",
"response_metadata": {
"messages": [
""
]
},
"needed": "",
"provided": "",
"errors": [
{
"code": "",
"message": "",
"pointer": ""
}
]
}
3 changes: 2 additions & 1 deletion json-logs/samples/api/auth.test.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@
"enterprise_id": "E00000000",
"error": "",
"needed": "",
"provided": ""
"provided": "",
"expires_in": 12345
}
17 changes: 17 additions & 0 deletions json-logs/samples/api/tooling.tokens.rotate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"ok": false,
"error": "",
"response_metadata": {
"messages": [
""
]
},
"needed": "",
"provided": "",
"token": "",
"refresh_token": "",
"team_id": "T00000000",
"user_id": "U00000000",
"iat": 12345,
"exp": 12345
}
6 changes: 6 additions & 0 deletions metadata/web-api/rate_limit_tiers.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,11 @@
"api.test": "Tier4",
"apps.connections.open": "Tier1",
"apps.event.authorizations.list": "Tier4",
"apps.manifest.create": "Tier1",
"apps.manifest.delete": "Tier1",
"apps.manifest.export": "Tier3",
"apps.manifest.update": "Tier1",
"apps.manifest.validate": "Tier3",
"apps.permissions.info": "Tier2",
"apps.permissions.request": "Tier2",
"apps.permissions.resources.list": "Tier2",
Expand Down Expand Up @@ -253,6 +258,7 @@
"team.integrationLogs": "Tier2",
"team.preferences.list": "Tier3",
"team.profile.get": "Tier3",
"tooling.tokens.rotate": "Tier1",
"usergroups.create": "Tier2",
"usergroups.disable": "Tier2",
"usergroups.enable": "Tier2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
import com.slack.api.methods.request.apps.AppsUninstallRequest;
import com.slack.api.methods.request.apps.connections.AppsConnectionsOpenRequest;
import com.slack.api.methods.request.apps.event.authorizations.AppsEventAuthorizationsListRequest;
import com.slack.api.methods.request.apps.manifest.*;
import com.slack.api.methods.request.auth.AuthRevokeRequest;
import com.slack.api.methods.request.auth.AuthTestRequest;
import com.slack.api.methods.request.auth.teams.AuthTeamsListRequest;
Expand Down Expand Up @@ -89,6 +90,7 @@
import com.slack.api.methods.request.stars.StarsRemoveRequest;
import com.slack.api.methods.request.team.*;
import com.slack.api.methods.request.team.profile.TeamProfileGetRequest;
import com.slack.api.methods.request.tooling.tokens.ToolingTokensRotateRequest;
import com.slack.api.methods.request.usergroups.*;
import com.slack.api.methods.request.usergroups.users.UsergroupsUsersListRequest;
import com.slack.api.methods.request.usergroups.users.UsergroupsUsersUpdateRequest;
Expand Down Expand Up @@ -143,6 +145,7 @@
import com.slack.api.methods.response.apps.AppsUninstallResponse;
import com.slack.api.methods.response.apps.connections.AppsConnectionsOpenResponse;
import com.slack.api.methods.response.apps.event.authorizations.AppsEventAuthorizationsListResponse;
import com.slack.api.methods.response.apps.manifest.*;
import com.slack.api.methods.response.auth.AuthRevokeResponse;
import com.slack.api.methods.response.auth.AuthTestResponse;
import com.slack.api.methods.response.auth.teams.AuthTeamsListResponse;
Expand Down Expand Up @@ -190,6 +193,7 @@
import com.slack.api.methods.response.stars.StarsRemoveResponse;
import com.slack.api.methods.response.team.*;
import com.slack.api.methods.response.team.profile.TeamProfileGetResponse;
import com.slack.api.methods.response.tooling.tokens.ToolingTokensRotateResponse;
import com.slack.api.methods.response.usergroups.*;
import com.slack.api.methods.response.usergroups.users.UsergroupsUsersListResponse;
import com.slack.api.methods.response.usergroups.users.UsergroupsUsersUpdateResponse;
Expand Down Expand Up @@ -747,6 +751,31 @@ CompletableFuture<AdminConversationsWhitelistListGroupsLinkedToChannelResponse>

CompletableFuture<AppsEventAuthorizationsListResponse> appsEventAuthorizationsList(RequestConfigurator<AppsEventAuthorizationsListRequest.AppsEventAuthorizationsListRequestBuilder> req);

// ------------------------------
// apps.manifest
// ------------------------------

CompletableFuture<AppsManifestCreateResponse> appsManifestCreate(AppsManifestCreateRequest req);

CompletableFuture<AppsManifestCreateResponse> appsManifestCreate(RequestConfigurator<AppsManifestCreateRequest.AppsManifestCreateRequestBuilder> req);


CompletableFuture<AppsManifestDeleteResponse> appsManifestDelete(AppsManifestDeleteRequest req);

CompletableFuture<AppsManifestDeleteResponse> appsManifestDelete(RequestConfigurator<AppsManifestDeleteRequest.AppsManifestDeleteRequestBuilder> req);

CompletableFuture<AppsManifestExportResponse> appsManifestExport(AppsManifestExportRequest req);

CompletableFuture<AppsManifestExportResponse> appsManifestExport(RequestConfigurator<AppsManifestExportRequest.AppsManifestExportRequestBuilder> req);

CompletableFuture<AppsManifestUpdateResponse> appsManifestUpdate(AppsManifestUpdateRequest req);

CompletableFuture<AppsManifestUpdateResponse> appsManifestUpdate(RequestConfigurator<AppsManifestUpdateRequest.AppsManifestUpdateRequestBuilder> req);

CompletableFuture<AppsManifestValidateResponse> appsManifestValidate(AppsManifestValidateRequest req);

CompletableFuture<AppsManifestValidateResponse> appsManifestValidate(RequestConfigurator<AppsManifestValidateRequest.AppsManifestValidateRequestBuilder> req);

// ------------------------------
// auth
// ------------------------------
Expand Down Expand Up @@ -1266,6 +1295,14 @@ CompletableFuture<AdminConversationsWhitelistListGroupsLinkedToChannelResponse>

CompletableFuture<TeamPreferencesListResponse> teamPreferencesList(RequestConfigurator<TeamPreferencesListRequest.TeamPreferencesListRequestBuilder> req);

// ------------------------------
// tooling.tokens
// ------------------------------

CompletableFuture<ToolingTokensRotateResponse> toolingTokensRotate(ToolingTokensRotateRequest req);

CompletableFuture<ToolingTokensRotateResponse> toolingTokensRotate(RequestConfigurator<ToolingTokensRotateRequest.ToolingTokensRotateRequestBuilder> req);

// ------------------------------
// usergroups
// ------------------------------
Expand Down
12 changes: 12 additions & 0 deletions slack-api-client/src/main/java/com/slack/api/methods/Methods.java
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,18 @@ private Methods() {

public static final String APPS_CONNECTIONS_OPEN = "apps.connections.open";

// ------------------------------
// apps.manifest
// ------------------------------

public static final String APPS_MANIFEST_CREATE = "apps.manifest.create";
public static final String APPS_MANIFEST_DELETE = "apps.manifest.delete";
public static final String APPS_MANIFEST_EXPORT = "apps.manifest.export";
public static final String APPS_MANIFEST_UPDATE = "apps.manifest.update";
public static final String APPS_MANIFEST_VALIDATE = "apps.manifest.validate";
public static final String TOOLING_TOKENS_ROTATE = "tooling.tokens.rotate";


// ------------------------------
// apps.event.authorizations
// ------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
import com.slack.api.methods.request.apps.AppsUninstallRequest;
import com.slack.api.methods.request.apps.connections.AppsConnectionsOpenRequest;
import com.slack.api.methods.request.apps.event.authorizations.AppsEventAuthorizationsListRequest;
import com.slack.api.methods.request.apps.manifest.*;
import com.slack.api.methods.request.apps.permissions.AppsPermissionsInfoRequest;
import com.slack.api.methods.request.apps.permissions.AppsPermissionsRequestRequest;
import com.slack.api.methods.request.apps.permissions.resources.AppsPermissionsResourcesListRequest;
Expand Down Expand Up @@ -102,6 +103,7 @@
import com.slack.api.methods.request.stars.StarsRemoveRequest;
import com.slack.api.methods.request.team.*;
import com.slack.api.methods.request.team.profile.TeamProfileGetRequest;
import com.slack.api.methods.request.tooling.tokens.ToolingTokensRotateRequest;
import com.slack.api.methods.request.usergroups.*;
import com.slack.api.methods.request.usergroups.users.UsergroupsUsersListRequest;
import com.slack.api.methods.request.usergroups.users.UsergroupsUsersUpdateRequest;
Expand Down Expand Up @@ -156,6 +158,7 @@
import com.slack.api.methods.response.apps.AppsUninstallResponse;
import com.slack.api.methods.response.apps.connections.AppsConnectionsOpenResponse;
import com.slack.api.methods.response.apps.event.authorizations.AppsEventAuthorizationsListResponse;
import com.slack.api.methods.response.apps.manifest.*;
import com.slack.api.methods.response.apps.permissions.AppsPermissionsInfoResponse;
import com.slack.api.methods.response.apps.permissions.AppsPermissionsRequestResponse;
import com.slack.api.methods.response.apps.permissions.resources.AppsPermissionsResourcesListResponse;
Expand Down Expand Up @@ -216,6 +219,7 @@
import com.slack.api.methods.response.stars.StarsRemoveResponse;
import com.slack.api.methods.response.team.*;
import com.slack.api.methods.response.team.profile.TeamProfileGetResponse;
import com.slack.api.methods.response.tooling.tokens.ToolingTokensRotateResponse;
import com.slack.api.methods.response.usergroups.*;
import com.slack.api.methods.response.usergroups.users.UsergroupsUsersListResponse;
import com.slack.api.methods.response.usergroups.users.UsergroupsUsersUpdateResponse;
Expand Down Expand Up @@ -836,6 +840,31 @@ AdminUsergroupsRemoveChannelsResponse adminUsergroupsRemoveChannels(

AppsEventAuthorizationsListResponse appsEventAuthorizationsList(RequestConfigurator<AppsEventAuthorizationsListRequest.AppsEventAuthorizationsListRequestBuilder> req) throws IOException, SlackApiException;

// ------------------------------
// apps.manifest
// ------------------------------

AppsManifestCreateResponse appsManifestCreate(AppsManifestCreateRequest req) throws IOException, SlackApiException;

AppsManifestCreateResponse appsManifestCreate(RequestConfigurator<AppsManifestCreateRequest.AppsManifestCreateRequestBuilder> req) throws IOException, SlackApiException;


AppsManifestDeleteResponse appsManifestDelete(AppsManifestDeleteRequest req) throws IOException, SlackApiException;

AppsManifestDeleteResponse appsManifestDelete(RequestConfigurator<AppsManifestDeleteRequest.AppsManifestDeleteRequestBuilder> req) throws IOException, SlackApiException;

AppsManifestExportResponse appsManifestExport(AppsManifestExportRequest req) throws IOException, SlackApiException;

AppsManifestExportResponse appsManifestExport(RequestConfigurator<AppsManifestExportRequest.AppsManifestExportRequestBuilder> req) throws IOException, SlackApiException;

AppsManifestUpdateResponse appsManifestUpdate(AppsManifestUpdateRequest req) throws IOException, SlackApiException;

AppsManifestUpdateResponse appsManifestUpdate(RequestConfigurator<AppsManifestUpdateRequest.AppsManifestUpdateRequestBuilder> req) throws IOException, SlackApiException;

AppsManifestValidateResponse appsManifestValidate(AppsManifestValidateRequest req) throws IOException, SlackApiException;

AppsManifestValidateResponse appsManifestValidate(RequestConfigurator<AppsManifestValidateRequest.AppsManifestValidateRequestBuilder> req) throws IOException, SlackApiException;

// ------------------------------
// apps.permissions
// ------------------------------
Expand Down Expand Up @@ -1807,6 +1836,14 @@ AdminUsergroupsRemoveChannelsResponse adminUsergroupsRemoveChannels(

TeamPreferencesListResponse teamPreferencesList(RequestConfigurator<TeamPreferencesListRequest.TeamPreferencesListRequestBuilder> req) throws IOException, SlackApiException;

// ------------------------------
// tooling.tokens
// ------------------------------

ToolingTokensRotateResponse toolingTokensRotate(ToolingTokensRotateRequest req) throws IOException, SlackApiException;

ToolingTokensRotateResponse toolingTokensRotate(RequestConfigurator<ToolingTokensRotateRequest.ToolingTokensRotateRequestBuilder> req) throws IOException, SlackApiException;

// ------------------------------
// usergroups
// ------------------------------
Expand Down
Loading