feat: add webapi response changes as of 2026-05-19 - #1592
feat: add webapi response changes as of 2026-05-19#1592slackapi[bot] wants to merge 151 commits into
Conversation
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1592 +/- ##
============================================
- Coverage 73.39% 73.33% -0.07%
+ Complexity 4532 4527 -5
============================================
Files 478 478
Lines 14312 14314 +2
Branches 1490 1491 +1
============================================
- Hits 10505 10497 -8
- Misses 2919 2925 +6
- Partials 888 892 +4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
The workspace admin token no longer has access to the target workspace (T06M2FAFCF3). Switch helper/setup calls in admin API tests to use the org admin token with explicit team_id, which is required for org-level tokens calling workspace-scoped methods. Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
This reverts commit c68228b.
This reverts commit 0dafb70.
- Add ~100 missing audit action constants (LegalHold, SlackFirstCrm, MCP, AI actions) - Fix cant_kick_self by excluding userToken's own user from kick target selection Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
…lation failure Duplicate field in WorkspaceOrOrg class prevented Lombok annotation processing, breaking all Builder class generation in slack-api-client. Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
- Add thread_ts, permissions (Object), privateChannelAccess fields - Add audit actions: slack_ai_mcp_resource_read, pref_allow_native_giphy_gif_picker - Fix dnd_Test: limit to 50 active users - Fix emoji_Test: create emoji before listing - Fix functions_Test: add teamId parameter - Fix users_Test: filter deleted users from lookupByEmail, use teamId for Grid - Update SCIM2 json-logs from test runs Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
zimeg
left a comment
There was a problem hiding this comment.
📣 Writings as this becomes more stable! Another few are planned to follow.
| private List<Permission> permissions; | ||
|
|
||
| @Data | ||
| @Builder | ||
| @NoArgsConstructor | ||
| @AllArgsConstructor | ||
| public static class Permission { | ||
| private String visibility; | ||
| private String permissionType; | ||
| private List<String> userIds; | ||
| private List<String> teamIds; | ||
| private List<String> orgIds; | ||
| } |
There was a problem hiding this comment.
📚 note: Added the "permissions" argument to admin.functions.permissions.set for testing sake.
🔗 https://docs.slack.dev/reference/methods/admin.functions.permissions.set/
| final List<String> appIds = Arrays.asList(System.getenv(Constants.SLACK_SDK_TEST_GRID_APP_IDS).split(",")); | ||
| AdminFunctionsListResponse response = methodsAsync.adminFunctionsList(r -> r | ||
| .appIds(appIds) | ||
| .teamId(gridTeamId) |
There was a problem hiding this comment.
🪬 note: A teamId is required with the orgAdminUserToken used I find.
| } | ||
| // this should be rejected | ||
| assertThat(callCount.get(), is(0)); | ||
| slack.close(); |
There was a problem hiding this comment.
👁️🗨️ note: This guards against leaking connections that caused unexpected counts following!
| ConversationsListResponse channelsList = slack.methods(teamAdminUserToken).conversationsList(r -> r | ||
| .excludeArchived(true) | ||
| .types(Arrays.asList(ConversationType.PUBLIC_CHANNEL)) | ||
| .limit(2) | ||
| ).getChannels().stream().map(c -> c.getId()).collect(Collectors.toList()); | ||
| ); | ||
| assertThat(channelsList.getError(), is(nullValue())); |
There was a problem hiding this comment.
🔬 note: Added an error check here to troubleshoot issues with the initial request which shouldn't change test behavior!
| @Test | ||
| public void emoji() throws Exception { | ||
| if (orgAdminUserToken != null) { | ||
| CompletableFuture<AdminEmojiListResponse> list = methodsAsync.adminEmojiList(r -> r.limit(100)); |
There was a problem hiding this comment.
🎯 note: For testing on sandboxes without much customization we prefer to add a new emoji first.
| public void getFile_public_channel() throws Exception { | ||
| if (orgAdminUserToken != null) { | ||
| AdminAnalyticsGetFileResponse response = methodsAsync.adminAnalyticsGetFile(r -> r | ||
| .date("2025-01-20") |
There was a problem hiding this comment.
⌛ note: Here we use a more recent date that exists on a sandbox but this might require ongoing upkeep.
| private Object permissions; | ||
| private String sharedTo; // channel_workspaces_updated | ||
| private String reason; | ||
| private Object reason; |
There was a problem hiding this comment.
reason — keep as Object. On the live audit response this field appears as both a string and an array of strings: a plain string on some entries, and an array on anomaly / session-reset entries (which this org can generate — anomaly events are org-wide). Retyping to String throws Expected a string but was BEGIN_ARRAY on any anomaly entry. Could be tightened later with a custom Gson TypeAdapter that normalizes both shapes to List<String>, but not worth it here. Note: the "reason": {} in the audit sample JSON is Quicktype output regenerated after the type became Object, so it reflects the model, not the wire — not evidence.
| private String botId; | ||
| private List<String> channels; | ||
| private List<Permission> permissions; | ||
| private Object permissions; |
There was a problem hiding this comment.
permissions — Object is defensible but not yet confirmed; the live audit JSON is the source of truth here. The orphaned Permission/Resource/Grant/WildCard classes (~L485) model a function-trigger permission-grant tree, but this was almost certainly widened to Object because some entry arrived with a shape that broke List<Permission>. Revert test: change to List<Permission> and run getLogs_all_actions — if it passes, the typed list is safe and those classes are no longer dead; if it throws (Expected BEGIN_ARRAY but was ...), Object was correct — revert and add an inline comment capturing the offending shape (the rationale the original change lacked).
| private String stepFunctionType; // "Custom", "Builtin" | ||
| private String stepFunctionAppId; // "A05QFAJ8LBA" | ||
| private String externalAuthConfiguration; | ||
| private java.util.List<Object> externalAuthConfiguration; |
There was a problem hiding this comment.
externalAuthConfiguration (List<Object>) — yellow flag; do not assume List is safe. On the live wire this field was observed as a plain string earlier this year (auto-generated from an E2E run) and later as an array, so it has been seen as BOTH. Either (1) the shape changed string→array and the string form is dead → a typed List<ExternalAuthConfiguration> (fields inputName, providerName, credentialSource) is right; or (2) it is still polymorphic → both List<...> and List<Object> throw on the string case and bare Object (or a custom adapter) is correct. getLogs_all_actions decides. Breaking-change note: the last released type is String, so this getter signature changes regardless when this lands — prefer shipping the most correct final type now rather than a second break later. No SDK consumers of the getter today.
zimeg
left a comment
There was a problem hiding this comment.
💾 Another comment on the properties being changed noted above. Will mark this LGTM but appreciate thoughts before merging!
| private List<Permission> permissions; | ||
| private Object permissions; | ||
| private String sharedTo; // channel_workspaces_updated | ||
| private String reason; |
There was a problem hiding this comment.
👁️🗨️ note: I'm somewhat confident at changing this but find it matches the response logs adjacent:
This PR updates the web API client and model based on the production E2E test results.
Category
Requirements
Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you agree to those rules.