Skip to content

Commit 0e2e266

Browse files
committed
feat: add webapi response changes as of 2025-11-12
1 parent 610d528 commit 0e2e266

11 files changed

Lines changed: 47 additions & 32 deletions

File tree

json-logs/samples/api/files.completeUploadExternal.json

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -50,19 +50,6 @@
5050
"latest_reply": "0000000000.000000",
5151
"source": "",
5252
"is_silent_share": false
53-
},
54-
{
55-
"reply_users": [
56-
""
57-
],
58-
"reply_users_count": 12345,
59-
"reply_count": 12345,
60-
"ts": "0000000000.000000",
61-
"channel_name": "",
62-
"team_id": "T00000000",
63-
"share_user_id": "U00000000",
64-
"source": "",
65-
"is_silent_share": false
6653
}
6754
],
6855
"C00000001": [
@@ -80,19 +67,6 @@
8067
"latest_reply": "0000000000.000000",
8168
"source": "",
8269
"is_silent_share": false
83-
},
84-
{
85-
"reply_users": [
86-
""
87-
],
88-
"reply_users_count": 12345,
89-
"reply_count": 12345,
90-
"ts": "0000000000.000000",
91-
"channel_name": "",
92-
"team_id": "T00000000",
93-
"share_user_id": "U00000000",
94-
"source": "",
95-
"is_silent_share": false
9670
}
9771
]
9872
}

json-logs/samples/api/oauth.v2.exchange.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"response_metadata": {
3838
"messages": [
3939
""
40-
]
40+
],
41+
"warnings": []
4142
}
4243
}

json-logs/samples/scim/v1/Users.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,9 @@
102102
"display": ""
103103
}
104104
]
105+
},
106+
"urn:scim:schemas:extension:slack:profile:1.0": {
107+
"startDate": ""
105108
}
106109
}
107110
],

slack-api-client/src/main/java/com/slack/api/scim/model/Schemas.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ private Schemas() {
88
public static final String SCHEMA_CORE = "urn:scim:schemas:core:1.0";
99
public static final String SCHEMA_EXTENSION_ENTERPRISE = "urn:scim:schemas:extension:enterprise:1.0";
1010
public static final String SCHEMA_EXTENSION_SLACK_GUEST = "urn:scim:schemas:extension:slack:guest:1.0";
11-
11+
public static final String SCHEMA_EXTENSION_SLACK_PROFILE = "urn:scim:schemas:extension:slack:profile:1.0";
1212
}

slack-api-client/src/main/java/com/slack/api/scim/model/User.java

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ public class User {
1515
private List<String> schemas = Arrays.asList(
1616
Schemas.SCHEMA_CORE,
1717
Schemas.SCHEMA_EXTENSION_ENTERPRISE,
18-
Schemas.SCHEMA_EXTENSION_SLACK_GUEST
18+
Schemas.SCHEMA_EXTENSION_SLACK_GUEST,
19+
Schemas.SCHEMA_EXTENSION_SLACK_PROFILE
1920
);
2021

2122
private String id;
@@ -46,6 +47,8 @@ public class User {
4647
private Extension extension;
4748
@SerializedName(Schemas.SCHEMA_EXTENSION_SLACK_GUEST)
4849
private SlackGuest slackGuest;
50+
@SerializedName(Schemas.SCHEMA_EXTENSION_SLACK_PROFILE)
51+
private SlackProfile slackProfile;
4952

5053
private List<Group> groups;
5154

@@ -182,4 +185,15 @@ public static class Channel {
182185
}
183186
}
184187

188+
@Data
189+
@Builder
190+
@NoArgsConstructor
191+
@AllArgsConstructor
192+
public static class SlackProfile {
193+
/**
194+
* Identifies date and time the user started within the organization. Used to create and display profile Celebrations.
195+
* The accepted format is ISO 8601. (e.g., "2020-10-31T23:59:59Z")
196+
*/
197+
private String startDate;
198+
}
185199
}

slack-api-client/src/test/java/test_locally/api/scim/ModelsTest.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,17 @@ public void extensions() {
2828
.type("multi")
2929
.expiration("2020-11-30T23:59:59Z")
3030
.build());
31+
user.setSlackProfile(User.SlackProfile.builder()
32+
.startDate("2020-10-31T23:59:59Z")
33+
.build());
3134

3235
assertNotNull(user);
3336
assertNotNull(user.getExtension().getDivision());
3437
assertNotNull(user.getSlackGuest().getType());
38+
assertNotNull(user.getSlackProfile().getStartDate());
3539

3640
String json = GsonFactory.createCamelCase(SlackConfig.DEFAULT).toJson(user);
37-
String expectedJson = "{\"schemas\":[\"urn:scim:schemas:core:1.0\",\"urn:scim:schemas:extension:enterprise:1.0\",\"urn:scim:schemas:extension:slack:guest:1.0\"],\"id\":\"W1234567890\",\"urn:scim:schemas:extension:enterprise:1.0\":{\"employeeNumber\":\"123-456\",\"organization\":\"PDE\",\"division\":\"Product\",\"department\":\"Product\"},\"urn:scim:schemas:extension:slack:guest:1.0\":{\"type\":\"multi\",\"expiration\":\"2020-11-30T23:59:59Z\"}}";
41+
String expectedJson = "{\"schemas\":[\"urn:scim:schemas:core:1.0\",\"urn:scim:schemas:extension:enterprise:1.0\",\"urn:scim:schemas:extension:slack:guest:1.0\",\"urn:scim:schemas:extension:slack:profile:1.0\"],\"id\":\"W1234567890\",\"urn:scim:schemas:extension:enterprise:1.0\":{\"employeeNumber\":\"123-456\",\"organization\":\"PDE\",\"division\":\"Product\",\"department\":\"Product\"},\"urn:scim:schemas:extension:slack:guest:1.0\":{\"type\":\"multi\",\"expiration\":\"2020-11-30T23:59:59Z\"},\"urn:scim:schemas:extension:slack:profile:1.0\":{\"startDate\":\"2020-10-31T23:59:59Z\"}}";
3842
assertEquals(expectedJson, json);
3943
}
4044
}

slack-api-client/src/test/java/test_with_remote_apis/methods/chat_Test.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
import lombok.extern.slf4j.Slf4j;
3030
import org.junit.AfterClass;
3131
import org.junit.BeforeClass;
32+
import org.junit.Ignore;
3233
import org.junit.Test;
3334

3435
import java.io.IOException;
@@ -1215,6 +1216,7 @@ public void post_messages_timepicker() throws Exception {
12151216
}
12161217

12171218
// https://github.com/slackapi/java-slack-sdk/issues/647
1219+
@Ignore // "method_deprecated" 2025-11-12 https://docs.slack.dev/changelog/2025/03/17/files-upload-extension/
12181220
@Test
12191221
public void share_message_with_files_issue_647() throws Exception {
12201222
loadRandomChannelId();

slack-api-client/src/test/java/test_with_remote_apis/methods/files_Test.java

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ void loadRandomChannelId() throws IOException, SlackApiException {
6666
void loadGeneralChannelId() throws IOException, SlackApiException {
6767
if (generalChannelId == null) {
6868
ConversationsListResponse channelsListResponse =
69-
slack.methods().conversationsList(r -> r.token(botToken).excludeArchived(true).limit(100));
69+
slack.methods().conversationsList(r -> r.token(botToken).excludeArchived(true).limit(200));
7070
assertThat(channelsListResponse.getError(), is(nullValue()));
7171
for (Conversation channel : channelsListResponse.getChannels()) {
7272
if (channel.getName().equals("general")) {
@@ -136,6 +136,7 @@ public void describe_ShowFilesHiddenByLimit() throws IOException, SlackApiExcept
136136
}
137137
}
138138

139+
@Ignore // "method_deprecated" 2025-11-12 https://docs.slack.dev/changelog/2025/03/17/files-upload-extension/
139140
@Test
140141
public void createTextFileAndComments() throws IOException, SlackApiException {
141142
File file = new File("src/test/resources/sample.txt");
@@ -227,6 +228,7 @@ public void createTextFileAndComments() throws IOException, SlackApiException {
227228
}
228229
}
229230

231+
@Ignore // "method_deprecated" 2025-11-12 https://docs.slack.dev/changelog/2025/03/17/files-upload-extension/
230232
@Test
231233
public void createLongTextFile() throws IOException, SlackApiException {
232234
File file = new File("src/test/resources/sample_long.txt");
@@ -430,6 +432,7 @@ public void createLongTextFile_v2_full_args() throws Exception {
430432
}
431433
}
432434

435+
@Ignore // "method_deprecated" 2025-11-12 https://docs.slack.dev/changelog/2025/03/17/files-upload-extension/
433436
@Test
434437
public void createImageFileAndComments() throws IOException, SlackApiException {
435438
File file = new File("src/test/resources/seratch.jpg");
@@ -529,6 +532,7 @@ public void createImageFileAndComments() throws IOException, SlackApiException {
529532
}
530533
}
531534

535+
@Ignore // "method_deprecated" 2025-11-12 https://docs.slack.dev/changelog/2025/03/17/files-upload-extension/
532536
@Test
533537
public void createFileForAThread() throws IOException, SlackApiException {
534538
TestChannelGenerator channelGenerator = new TestChannelGenerator(testConfig, userToken);
@@ -629,6 +633,7 @@ public void createFileForAThread_v2() throws IOException, SlackApiException {
629633
}
630634
}
631635

636+
@Ignore // "method_deprecated" 2025-11-12 https://docs.slack.dev/changelog/2025/03/17/files-upload-extension/
632637
@Test
633638
public void issue523_text() throws IOException, SlackApiException {
634639
MethodsClient slackMethods = slack.methods(userToken);
@@ -638,6 +643,7 @@ public void issue523_text() throws IOException, SlackApiException {
638643
assertThat(response.getError(), is(nullValue()));
639644
}
640645

646+
@Ignore // "method_deprecated" 2025-11-12 https://docs.slack.dev/changelog/2025/03/17/files-upload-extension/
641647
@Test
642648
public void issue523_image() throws IOException, SlackApiException {
643649
MethodsClient slackMethods = slack.methods(userToken);
@@ -647,6 +653,7 @@ public void issue523_image() throws IOException, SlackApiException {
647653
assertThat(response.getError(), is(nullValue()));
648654
}
649655

656+
@Ignore // "method_deprecated" 2025-11-12 https://docs.slack.dev/changelog/2025/03/17/files-upload-extension/
650657
@Test
651658
public void issue523_text_no_filename() throws IOException, SlackApiException {
652659
MethodsClient slackMethods = slack.methods(userToken);
@@ -667,6 +674,7 @@ public void issue523_text_no_filename_v2() throws IOException, SlackApiException
667674
assertThat(response.getError(), is(nullValue()));
668675
}
669676

677+
@Ignore // "method_deprecated" 2025-11-12 https://docs.slack.dev/changelog/2025/03/17/files-upload-extension/
670678
@Test
671679
public void issue523_image_no_filename() throws IOException, SlackApiException {
672680
MethodsClient slackMethods = slack.methods(userToken);
@@ -677,6 +685,7 @@ public void issue523_image_no_filename() throws IOException, SlackApiException {
677685
assertThat(response.getError(), is(nullValue()));
678686
}
679687

688+
@Ignore // "method_deprecated" 2025-11-12 https://docs.slack.dev/changelog/2025/03/17/files-upload-extension/
680689
@Test
681690
public void uploadAndPostMessage() throws IOException, SlackApiException, InterruptedException {
682691
MethodsClient slackMethods = slack.methods(botToken);
@@ -763,6 +772,7 @@ public void uploadAndPostMessage() throws IOException, SlackApiException, Interr
763772
assertThat(uploadAndSharedInTwoTypesOfChannels.getFile().getShares().getPrivateChannels(), is(notNullValue()));
764773
}
765774

775+
@Ignore // "method_deprecated" 2025-11-12 https://docs.slack.dev/changelog/2025/03/17/files-upload-extension/
766776
@Test
767777
public void uploadInThreads() throws Exception {
768778
MethodsClient slackMethods = slack.methods(userToken);
@@ -851,6 +861,7 @@ public void uploadInThreads_v2() throws Exception {
851861
assertThat(replies.getMessages().get(1).getFile(), is(nullValue()));
852862
}
853863

864+
@Ignore // "method_deprecated" 2025-11-12 https://docs.slack.dev/changelog/2025/03/17/files-upload-extension/
854865
@Test
855866
public void issue824_gif_files() throws IOException, SlackApiException {
856867
loadRandomChannel();
@@ -908,6 +919,7 @@ public void issue1314_non_image_files_with_v2() throws IOException, SlackApiExce
908919
assertThat(upload2.getError(), is(nullValue()));
909920
}
910921

922+
@Ignore // "method_deprecated" 2025-11-12 https://docs.slack.dev/changelog/2025/03/17/files-upload-extension/
911923
@Test
912924
public void fileLinks() throws Exception {
913925
loadRandomChannelId();

slack-api-model/src/main/java/com/slack/api/model/File.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ public static class TranscriptionPreview {
7373
}
7474

7575
private Integer originalAttachmentCount;
76+
private Integer inlineAttachmentCount;
7677

7778
@SerializedName("is_external")
7879
private boolean external;
@@ -415,4 +416,4 @@ public static class Favorite {
415416
private List<LayoutBlock> blocks;
416417
// ---------------------------------------
417418

418-
}
419+
}

slack-api-model/src/main/java/com/slack/api/model/list/ListMetadata.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ public class ListMetadata {
2323
private boolean trial;
2424
private ListCreationSource creationSource;
2525
private List<ListColumn> schema;
26+
private List<ListColumn> subtaskSchema;
2627
private List<ListView> views;
2728
private List<String> integrations;
2829
private List<LayoutBlock> descriptionBlocks;
30+
private String defaultView;
31+
private boolean todoMode;
2932
}

0 commit comments

Comments
 (0)