diff --git a/json-logs/samples/api/chat.postMessage.json b/json-logs/samples/api/chat.postMessage.json index 82dbc2574..61888ef08 100644 --- a/json-logs/samples/api/chat.postMessage.json +++ b/json-logs/samples/api/chat.postMessage.json @@ -8364,6 +8364,7 @@ "template_icon": "", "team_pref_version_history_enabled": false, "show_badge": false, + "favorites": [], "bot_id": "", "initial_comment": { "id": "", @@ -12854,6 +12855,13 @@ "template_icon": "", "team_pref_version_history_enabled": false, "show_badge": false, + "favorites": [ + { + "collection_id": "", + "collection_name": "", + "position": "" + } + ], "bot_id": "", "initial_comment": { "id": "", @@ -19710,6 +19718,7 @@ "template_icon": "", "team_pref_version_history_enabled": false, "show_badge": false, + "favorites": [], "bot_id": "", "initial_comment": { "id": "", diff --git a/json-logs/samples/api/chat.scheduleMessage.json b/json-logs/samples/api/chat.scheduleMessage.json index 97fb40413..cc124a174 100644 --- a/json-logs/samples/api/chat.scheduleMessage.json +++ b/json-logs/samples/api/chat.scheduleMessage.json @@ -2909,6 +2909,7 @@ "template_icon": "", "team_pref_version_history_enabled": false, "show_badge": false, + "favorites": [], "bot_id": "", "initial_comment": { "id": "", diff --git a/json-logs/samples/api/chat.update.json b/json-logs/samples/api/chat.update.json index 53248275e..93ea8c3fc 100644 --- a/json-logs/samples/api/chat.update.json +++ b/json-logs/samples/api/chat.update.json @@ -4332,6 +4332,13 @@ "template_icon": "", "team_pref_version_history_enabled": false, "show_badge": false, + "favorites": [ + { + "collection_id": "", + "collection_name": "", + "position": "" + } + ], "bot_id": "", "initial_comment": { "id": "", @@ -7191,6 +7198,7 @@ "template_icon": "", "team_pref_version_history_enabled": false, "show_badge": false, + "favorites": [], "bot_id": "", "initial_comment": { "id": "", diff --git a/json-logs/samples/api/conversations.history.json b/json-logs/samples/api/conversations.history.json index 3074a55c3..adfee79cc 100644 --- a/json-logs/samples/api/conversations.history.json +++ b/json-logs/samples/api/conversations.history.json @@ -4333,6 +4333,13 @@ "template_icon": "", "team_pref_version_history_enabled": false, "show_badge": false, + "favorites": [ + { + "collection_id": "", + "collection_name": "", + "position": "" + } + ], "bot_id": "", "initial_comment": { "id": "", @@ -7192,6 +7199,7 @@ "template_icon": "", "team_pref_version_history_enabled": false, "show_badge": false, + "favorites": [], "bot_id": "", "initial_comment": { "id": "", @@ -15859,6 +15867,7 @@ "template_icon": "", "team_pref_version_history_enabled": false, "show_badge": false, + "favorites": [], "bot_id": "", "initial_comment": { "id": "", @@ -20349,6 +20358,13 @@ "template_icon": "", "team_pref_version_history_enabled": false, "show_badge": false, + "favorites": [ + { + "collection_id": "", + "collection_name": "", + "position": "" + } + ], "bot_id": "", "initial_comment": { "id": "", diff --git a/json-logs/samples/api/conversations.open.json b/json-logs/samples/api/conversations.open.json index 08519a83c..9d26c2f4f 100644 --- a/json-logs/samples/api/conversations.open.json +++ b/json-logs/samples/api/conversations.open.json @@ -2862,6 +2862,7 @@ "template_icon": "", "team_pref_version_history_enabled": false, "show_badge": false, + "favorites": [], "bot_id": "", "initial_comment": { "id": "", diff --git a/json-logs/samples/api/conversations.replies.json b/json-logs/samples/api/conversations.replies.json index a27e61c45..ae9657b31 100644 --- a/json-logs/samples/api/conversations.replies.json +++ b/json-logs/samples/api/conversations.replies.json @@ -2885,6 +2885,7 @@ "template_icon": "", "team_pref_version_history_enabled": false, "show_badge": false, + "favorites": [], "bot_id": "", "initial_comment": { "id": "", @@ -11552,6 +11553,7 @@ "template_icon": "", "team_pref_version_history_enabled": false, "show_badge": false, + "favorites": [], "bot_id": "", "initial_comment": { "id": "", @@ -16042,6 +16044,13 @@ "template_icon": "", "team_pref_version_history_enabled": false, "show_badge": false, + "favorites": [ + { + "collection_id": "", + "collection_name": "", + "position": "" + } + ], "bot_id": "", "initial_comment": { "id": "", @@ -24312,6 +24321,13 @@ "template_icon": "", "team_pref_version_history_enabled": false, "show_badge": false, + "favorites": [ + { + "collection_id": "", + "collection_name": "", + "position": "" + } + ], "bot_id": "", "initial_comment": { "id": "", diff --git a/json-logs/samples/api/files.remote.add.json b/json-logs/samples/api/files.remote.add.json index 4f2eb990b..8318c619e 100644 --- a/json-logs/samples/api/files.remote.add.json +++ b/json-logs/samples/api/files.remote.add.json @@ -4244,6 +4244,13 @@ "template_icon": "", "team_pref_version_history_enabled": false, "show_badge": false, + "favorites": [ + { + "collection_id": "", + "collection_name": "", + "position": "" + } + ], "bot_id": "", "initial_comment": { "id": "", diff --git a/json-logs/samples/api/files.remote.info.json b/json-logs/samples/api/files.remote.info.json index 4f2eb990b..8318c619e 100644 --- a/json-logs/samples/api/files.remote.info.json +++ b/json-logs/samples/api/files.remote.info.json @@ -4244,6 +4244,13 @@ "template_icon": "", "team_pref_version_history_enabled": false, "show_badge": false, + "favorites": [ + { + "collection_id": "", + "collection_name": "", + "position": "" + } + ], "bot_id": "", "initial_comment": { "id": "", diff --git a/json-logs/samples/api/files.remote.share.json b/json-logs/samples/api/files.remote.share.json index 4f2eb990b..8318c619e 100644 --- a/json-logs/samples/api/files.remote.share.json +++ b/json-logs/samples/api/files.remote.share.json @@ -4244,6 +4244,13 @@ "template_icon": "", "team_pref_version_history_enabled": false, "show_badge": false, + "favorites": [ + { + "collection_id": "", + "collection_name": "", + "position": "" + } + ], "bot_id": "", "initial_comment": { "id": "", diff --git a/json-logs/samples/api/files.remote.update.json b/json-logs/samples/api/files.remote.update.json index 4f2eb990b..8318c619e 100644 --- a/json-logs/samples/api/files.remote.update.json +++ b/json-logs/samples/api/files.remote.update.json @@ -4244,6 +4244,13 @@ "template_icon": "", "team_pref_version_history_enabled": false, "show_badge": false, + "favorites": [ + { + "collection_id": "", + "collection_name": "", + "position": "" + } + ], "bot_id": "", "initial_comment": { "id": "", diff --git a/json-logs/samples/api/files.revokePublicURL.json b/json-logs/samples/api/files.revokePublicURL.json index 4f2eb990b..8318c619e 100644 --- a/json-logs/samples/api/files.revokePublicURL.json +++ b/json-logs/samples/api/files.revokePublicURL.json @@ -4244,6 +4244,13 @@ "template_icon": "", "team_pref_version_history_enabled": false, "show_badge": false, + "favorites": [ + { + "collection_id": "", + "collection_name": "", + "position": "" + } + ], "bot_id": "", "initial_comment": { "id": "", diff --git a/json-logs/samples/api/files.sharedPublicURL.json b/json-logs/samples/api/files.sharedPublicURL.json index 4f2eb990b..8318c619e 100644 --- a/json-logs/samples/api/files.sharedPublicURL.json +++ b/json-logs/samples/api/files.sharedPublicURL.json @@ -4244,6 +4244,13 @@ "template_icon": "", "team_pref_version_history_enabled": false, "show_badge": false, + "favorites": [ + { + "collection_id": "", + "collection_name": "", + "position": "" + } + ], "bot_id": "", "initial_comment": { "id": "", diff --git a/json-logs/samples/api/files.upload.json b/json-logs/samples/api/files.upload.json index 4f2eb990b..8318c619e 100644 --- a/json-logs/samples/api/files.upload.json +++ b/json-logs/samples/api/files.upload.json @@ -4244,6 +4244,13 @@ "template_icon": "", "team_pref_version_history_enabled": false, "show_badge": false, + "favorites": [ + { + "collection_id": "", + "collection_name": "", + "position": "" + } + ], "bot_id": "", "initial_comment": { "id": "", diff --git a/json-logs/samples/api/pins.list.json b/json-logs/samples/api/pins.list.json index 0441334dc..e0bbedb28 100644 --- a/json-logs/samples/api/pins.list.json +++ b/json-logs/samples/api/pins.list.json @@ -4249,6 +4249,13 @@ "template_icon": "", "team_pref_version_history_enabled": false, "show_badge": false, + "favorites": [ + { + "collection_id": "", + "collection_name": "", + "position": "" + } + ], "bot_id": "", "initial_comment": { "id": "", diff --git a/json-logs/samples/api/reactions.get.json b/json-logs/samples/api/reactions.get.json index 2607de5f5..79124ec35 100644 --- a/json-logs/samples/api/reactions.get.json +++ b/json-logs/samples/api/reactions.get.json @@ -2915,6 +2915,7 @@ "template_icon": "", "team_pref_version_history_enabled": false, "show_badge": false, + "favorites": [], "bot_id": "", "initial_comment": { "id": "", diff --git a/json-logs/samples/api/reactions.list.json b/json-logs/samples/api/reactions.list.json index c5deb79cb..9fb5d677f 100644 --- a/json-logs/samples/api/reactions.list.json +++ b/json-logs/samples/api/reactions.list.json @@ -4359,6 +4359,13 @@ "template_icon": "", "team_pref_version_history_enabled": false, "show_badge": false, + "favorites": [ + { + "collection_id": "", + "collection_name": "", + "position": "" + } + ], "bot_id": "", "initial_comment": { "id": "", @@ -7218,6 +7225,7 @@ "template_icon": "", "team_pref_version_history_enabled": false, "show_badge": false, + "favorites": [], "bot_id": "", "initial_comment": { "id": "", @@ -15885,6 +15893,7 @@ "template_icon": "", "team_pref_version_history_enabled": false, "show_badge": false, + "favorites": [], "bot_id": "", "initial_comment": { "id": "", @@ -20375,6 +20384,13 @@ "template_icon": "", "team_pref_version_history_enabled": false, "show_badge": false, + "favorites": [ + { + "collection_id": "", + "collection_name": "", + "position": "" + } + ], "bot_id": "", "initial_comment": { "id": "", diff --git a/json-logs/samples/api/rtm.start.json b/json-logs/samples/api/rtm.start.json index 0ee92ef8b..9b0daa9be 100644 --- a/json-logs/samples/api/rtm.start.json +++ b/json-logs/samples/api/rtm.start.json @@ -9325,6 +9325,7 @@ "template_icon": "", "team_pref_version_history_enabled": false, "show_badge": false, + "favorites": [], "bot_id": "", "initial_comment": { "id": "", @@ -13815,6 +13816,13 @@ "template_icon": "", "team_pref_version_history_enabled": false, "show_badge": false, + "favorites": [ + { + "collection_id": "", + "collection_name": "", + "position": "" + } + ], "bot_id": "", "initial_comment": { "id": "", @@ -20671,6 +20679,7 @@ "template_icon": "", "team_pref_version_history_enabled": false, "show_badge": false, + "favorites": [], "bot_id": "", "initial_comment": { "id": "", @@ -25326,6 +25335,13 @@ "template_icon": "", "team_pref_version_history_enabled": false, "show_badge": false, + "favorites": [ + { + "collection_id": "", + "collection_name": "", + "position": "" + } + ], "bot_id": "", "initial_comment": { "id": "", @@ -33795,6 +33811,7 @@ "template_icon": "", "team_pref_version_history_enabled": false, "show_badge": false, + "favorites": [], "bot_id": "", "initial_comment": { "id": "", @@ -38285,6 +38302,13 @@ "template_icon": "", "team_pref_version_history_enabled": false, "show_badge": false, + "favorites": [ + { + "collection_id": "", + "collection_name": "", + "position": "" + } + ], "bot_id": "", "initial_comment": { "id": "", @@ -45141,6 +45165,7 @@ "template_icon": "", "team_pref_version_history_enabled": false, "show_badge": false, + "favorites": [], "bot_id": "", "initial_comment": { "id": "", @@ -49796,6 +49821,13 @@ "template_icon": "", "team_pref_version_history_enabled": false, "show_badge": false, + "favorites": [ + { + "collection_id": "", + "collection_name": "", + "position": "" + } + ], "bot_id": "", "initial_comment": { "id": "", diff --git a/json-logs/samples/api/search.all.json b/json-logs/samples/api/search.all.json index 9a8cdf777..8f51ebe36 100644 --- a/json-logs/samples/api/search.all.json +++ b/json-logs/samples/api/search.all.json @@ -8313,6 +8313,7 @@ "template_icon": "", "team_pref_version_history_enabled": false, "show_badge": false, + "favorites": [], "bot_id": "", "initial_comment": { "id": "", @@ -12803,6 +12804,13 @@ "template_icon": "", "team_pref_version_history_enabled": false, "show_badge": false, + "favorites": [ + { + "collection_id": "", + "collection_name": "", + "position": "" + } + ], "bot_id": "", "initial_comment": { "id": "", @@ -19659,6 +19667,7 @@ "template_icon": "", "team_pref_version_history_enabled": false, "show_badge": false, + "favorites": [], "bot_id": "", "initial_comment": { "id": "", @@ -28335,6 +28344,7 @@ "template_icon": "", "team_pref_version_history_enabled": false, "show_badge": false, + "favorites": [], "bot_id": "", "initial_comment": { "id": "", @@ -32825,6 +32835,13 @@ "template_icon": "", "team_pref_version_history_enabled": false, "show_badge": false, + "favorites": [ + { + "collection_id": "", + "collection_name": "", + "position": "" + } + ], "bot_id": "", "initial_comment": { "id": "", @@ -39681,6 +39698,7 @@ "template_icon": "", "team_pref_version_history_enabled": false, "show_badge": false, + "favorites": [], "bot_id": "", "initial_comment": { "id": "", @@ -42925,6 +42943,7 @@ "template_icon": "", "team_pref_version_history_enabled": false, "show_badge": false, + "favorites": [], "bot_id": "", "initial_comment": { "id": "", @@ -51592,6 +51611,7 @@ "template_icon": "", "team_pref_version_history_enabled": false, "show_badge": false, + "favorites": [], "bot_id": "", "initial_comment": { "id": "", @@ -56082,6 +56102,13 @@ "template_icon": "", "team_pref_version_history_enabled": false, "show_badge": false, + "favorites": [ + { + "collection_id": "", + "collection_name": "", + "position": "" + } + ], "bot_id": "", "initial_comment": { "id": "", @@ -64352,6 +64379,13 @@ "template_icon": "", "team_pref_version_history_enabled": false, "show_badge": false, + "favorites": [ + { + "collection_id": "", + "collection_name": "", + "position": "" + } + ], "bot_id": "", "initial_comment": { "id": "", @@ -72846,6 +72880,7 @@ "template_icon": "", "team_pref_version_history_enabled": false, "show_badge": false, + "favorites": [], "bot_id": "", "initial_comment": { "id": "", @@ -77336,6 +77371,13 @@ "template_icon": "", "team_pref_version_history_enabled": false, "show_badge": false, + "favorites": [ + { + "collection_id": "", + "collection_name": "", + "position": "" + } + ], "bot_id": "", "initial_comment": { "id": "", @@ -84192,6 +84234,7 @@ "template_icon": "", "team_pref_version_history_enabled": false, "show_badge": false, + "favorites": [], "bot_id": "", "initial_comment": { "id": "", diff --git a/json-logs/samples/api/search.files.json b/json-logs/samples/api/search.files.json index 143e07657..b97e63ca6 100644 --- a/json-logs/samples/api/search.files.json +++ b/json-logs/samples/api/search.files.json @@ -8464,6 +8464,7 @@ "template_icon": "", "team_pref_version_history_enabled": false, "show_badge": false, + "favorites": [], "bot_id": "", "initial_comment": { "id": "", @@ -12954,6 +12955,13 @@ "template_icon": "", "team_pref_version_history_enabled": false, "show_badge": false, + "favorites": [ + { + "collection_id": "", + "collection_name": "", + "position": "" + } + ], "bot_id": "", "initial_comment": { "id": "", @@ -19810,6 +19818,7 @@ "template_icon": "", "team_pref_version_history_enabled": false, "show_badge": false, + "favorites": [], "bot_id": "", "initial_comment": { "id": "", diff --git a/json-logs/samples/api/search.messages.json b/json-logs/samples/api/search.messages.json index d53a8e326..8aec9ab80 100644 --- a/json-logs/samples/api/search.messages.json +++ b/json-logs/samples/api/search.messages.json @@ -8312,6 +8312,7 @@ "template_icon": "", "team_pref_version_history_enabled": false, "show_badge": false, + "favorites": [], "bot_id": "", "initial_comment": { "id": "", @@ -12802,6 +12803,13 @@ "template_icon": "", "team_pref_version_history_enabled": false, "show_badge": false, + "favorites": [ + { + "collection_id": "", + "collection_name": "", + "position": "" + } + ], "bot_id": "", "initial_comment": { "id": "", @@ -19658,6 +19666,7 @@ "template_icon": "", "team_pref_version_history_enabled": false, "show_badge": false, + "favorites": [], "bot_id": "", "initial_comment": { "id": "", @@ -28334,6 +28343,7 @@ "template_icon": "", "team_pref_version_history_enabled": false, "show_badge": false, + "favorites": [], "bot_id": "", "initial_comment": { "id": "", @@ -32824,6 +32834,13 @@ "template_icon": "", "team_pref_version_history_enabled": false, "show_badge": false, + "favorites": [ + { + "collection_id": "", + "collection_name": "", + "position": "" + } + ], "bot_id": "", "initial_comment": { "id": "", @@ -39680,6 +39697,7 @@ "template_icon": "", "team_pref_version_history_enabled": false, "show_badge": false, + "favorites": [], "bot_id": "", "initial_comment": { "id": "", @@ -42924,6 +42942,7 @@ "template_icon": "", "team_pref_version_history_enabled": false, "show_badge": false, + "favorites": [], "bot_id": "", "initial_comment": { "id": "", @@ -51591,6 +51610,7 @@ "template_icon": "", "team_pref_version_history_enabled": false, "show_badge": false, + "favorites": [], "bot_id": "", "initial_comment": { "id": "", @@ -56081,6 +56101,13 @@ "template_icon": "", "team_pref_version_history_enabled": false, "show_badge": false, + "favorites": [ + { + "collection_id": "", + "collection_name": "", + "position": "" + } + ], "bot_id": "", "initial_comment": { "id": "", @@ -64351,6 +64378,13 @@ "template_icon": "", "team_pref_version_history_enabled": false, "show_badge": false, + "favorites": [ + { + "collection_id": "", + "collection_name": "", + "position": "" + } + ], "bot_id": "", "initial_comment": { "id": "", diff --git a/json-logs/samples/api/usergroups.list.json b/json-logs/samples/api/usergroups.list.json index d949aa37e..9df3196e1 100644 --- a/json-logs/samples/api/usergroups.list.json +++ b/json-logs/samples/api/usergroups.list.json @@ -27,7 +27,8 @@ }, "channel_count": 12345, "users": [ - "" + "", + "U00000000" ], "user_count": 12345 } diff --git a/slack-api-client/src/test/java/util/sample_json_generation/SampleObjects.java b/slack-api-client/src/test/java/util/sample_json_generation/SampleObjects.java index cafcbd329..f3580cfd6 100644 --- a/slack-api-client/src/test/java/util/sample_json_generation/SampleObjects.java +++ b/slack-api-client/src/test/java/util/sample_json_generation/SampleObjects.java @@ -338,7 +338,7 @@ public static File initFileObject() { List addressList = Arrays.asList(initProperties(new File.Address())); List reactionList = Arrays.asList(initProperties(Reaction.builder().users(stringList).build())); File file = initProperties(File.builder() - .headers(initProperties(new com.slack.api.model.File.Headers())) + .headers(initProperties(new File.Headers())) .mediaProgress(initProperties(new File.MediaProgress())) .shares(shares) .channels(stringList) @@ -354,6 +354,7 @@ public static File initFileObject() { .titleBlocks(Blocks) .dmMpdmUsersWithFileAccess(Arrays.asList(File.UserWithFileAccess.builder().access("").userId("").build())) .editors(Arrays.asList("")) + .favorites(Arrays.asList(initProperties(new File.Favorite()))) .build()); initProperties(file); return file; diff --git a/slack-api-model/src/main/java/com/slack/api/model/File.java b/slack-api-model/src/main/java/com/slack/api/model/File.java index fef8e2669..595226b6d 100644 --- a/slack-api-model/src/main/java/com/slack/api/model/File.java +++ b/slack-api-model/src/main/java/com/slack/api/model/File.java @@ -344,6 +344,18 @@ public static class UserWithFileAccess { private Boolean showBadge; + @Data + @Builder + @AllArgsConstructor + @NoArgsConstructor + public static class Favorite { + private String collectionId; + private String collectionName; + private String position; + } + + private List favorites; + // --------------------------------------- // file comments // https://api.slack.com/changelog/2018-05-file-threads-soon-tread