Skip to content

Commit e6c0ee2

Browse files
committed
Complete the PR
1 parent c720ce0 commit e6c0ee2

File tree

7 files changed

+315
-91
lines changed

7 files changed

+315
-91
lines changed
Lines changed: 134 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -1,89 +1,138 @@
11
{
2-
"ok": true,
3-
"invite_requests": [
4-
{
5-
"id": "I07RERD64RE",
6-
"date_created": 1728322966,
7-
"expires_at": 1729532566,
8-
"inviting_team": {
9-
"id": "E1234",
10-
"name": "Slack DevRel",
11-
"icon": {
12-
"image_default": false,
13-
"image_34": "https://avatars.slack-edge.com/2023-11-30/6276741611460_3d1fdeba40cf1fde29c7_34.png",
14-
"image_44": "https://avatars.slack-edge.com/2023-11-30/6276741611460_3d1fdeba40cf1fde29c7_44.png",
15-
"image_68": "https://avatars.slack-edge.com/2023-11-30/6276741611460_3d1fdeba40cf1fde29c7_68.png",
16-
"image_88": "https://avatars.slack-edge.com/2023-11-30/6276741611460_3d1fdeba40cf1fde29c7_88.png",
17-
"image_102": "https://avatars.slack-edge.com/2023-11-30/6276741611460_3d1fdeba40cf1fde29c7_102.png",
18-
"image_230": "https://avatars.slack-edge.com/2023-11-30/6276741611460_3d1fdeba40cf1fde29c7_230.png",
19-
"image_132": "https://avatars.slack-edge.com/2023-11-30/6276741611460_3d1fdeba40cf1fde29c7_132.png"
20-
},
21-
"avatar_base_url": "https://ca.slack-edge.com/",
22-
"is_verified": false,
23-
"domain": "devrel-slack",
24-
"date_created": 1654616902,
25-
"requires_sponsorship": false
2+
"ok": false,
3+
"invite_requests": [
4+
{
5+
"id": "I00000000",
6+
"date_created": 12345,
7+
"expires_at": 12345,
8+
"inviting_team": {
9+
"id": "",
10+
"name": "",
11+
"icon": {
12+
"image_default": false,
13+
"image_34": "https://www.example.com/",
14+
"image_44": "https://www.example.com/",
15+
"image_68": "https://www.example.com/",
16+
"image_88": "https://www.example.com/",
17+
"image_102": "https://www.example.com/",
18+
"image_230": "https://www.example.com/",
19+
"image_132": "https://www.example.com/"
20+
},
21+
"avatar_base_url": "https://www.example.com/",
22+
"is_verified": false,
23+
"domain": "",
24+
"date_created": 12345,
25+
"requires_sponsorship": false
26+
},
27+
"inviting_user": {
28+
"id": "",
29+
"team_id": "12345",
30+
"name": "",
31+
"updated": 12345,
32+
"who_can_share_contact_card": "",
33+
"profile": {
34+
"real_name": "",
35+
"display_name": "",
36+
"real_name_normalized": "",
37+
"display_name_normalized": "",
38+
"team": "",
39+
"avatar_hash": "",
40+
"email": "",
41+
"image_24": "https://www.example.com/",
42+
"image_32": "https://www.example.com/",
43+
"image_48": "https://www.example.com/",
44+
"image_72": "https://www.example.com/",
45+
"image_192": "https://www.example.com/",
46+
"image_512": "https://www.example.com/"
47+
}
48+
},
49+
"channel": {
50+
"id": "C00000000",
51+
"is_im": false,
52+
"is_private": false,
53+
"date_created": 12345,
54+
"name": "",
55+
"connections": [
56+
{
57+
"team": {
58+
"id": "",
59+
"name": "",
60+
"icon": {
61+
"image_default": false,
62+
"image_34": "https://www.example.com/",
63+
"image_44": "https://www.example.com/",
64+
"image_68": "https://www.example.com/",
65+
"image_88": "https://www.example.com/",
66+
"image_102": "https://www.example.com/",
67+
"image_230": "https://www.example.com/",
68+
"image_132": "https://www.example.com/"
69+
},
70+
"avatar_base_url": "https://www.example.com/",
71+
"is_verified": false,
72+
"domain": "",
73+
"date_created": 12345,
74+
"requires_sponsorship": false
2675
},
27-
"inviting_user": {
28-
"id": "U1234",
29-
"team_id": "1234",
30-
"name": "fmaj_workspaceadmin",
31-
"updated": 1728322901,
32-
"who_can_share_contact_card": "EVERYONE",
33-
"profile": {
34-
"real_name": "Fil Workspace Admin",
35-
"display_name": "",
36-
"real_name_normalized": "Fil Workspace Admin",
37-
"display_name_normalized": "",
38-
"team": "E1234",
39-
"avatar_hash": "g0636cadfc7c",
40-
"email": "fmaj@slack.com",
41-
"image_24": "https://secure.gravatar.com/avatar/0636cadfc7cf4d10b62851acd5aeab8d.jpg?s=24&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0000-24.png",
42-
"image_32": "https://secure.gravatar.com/avatar/0636cadfc7cf4d10b62851acd5aeab8d.jpg?s=32&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0000-32.png",
43-
"image_48": "https://secure.gravatar.com/avatar/0636cadfc7cf4d10b62851acd5aeab8d.jpg?s=48&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0000-48.png",
44-
"image_72": "https://secure.gravatar.com/avatar/0636cadfc7cf4d10b62851acd5aeab8d.jpg?s=72&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0000-72.png",
45-
"image_192": "https://secure.gravatar.com/avatar/0636cadfc7cf4d10b62851acd5aeab8d.jpg?s=192&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0000-192.png",
46-
"image_512": "https://secure.gravatar.com/avatar/0636cadfc7cf4d10b62851acd5aeab8d.jpg?s=512&d=https%3A%2F%2Fa.slack-edge.com%2Fdf10d%2Fimg%2Favatars%2Fava_0000-512.png"
47-
}
76+
"is_private": false
77+
}
78+
],
79+
"pending_connections": [
80+
{
81+
"team": {
82+
"id": "",
83+
"name": "",
84+
"icon": {
85+
"image_default": false,
86+
"image_34": "https://www.example.com/",
87+
"image_44": "https://www.example.com/",
88+
"image_68": "https://www.example.com/",
89+
"image_88": "https://www.example.com/",
90+
"image_102": "https://www.example.com/",
91+
"image_230": "https://www.example.com/",
92+
"image_132": "https://www.example.com/"
93+
},
94+
"avatar_base_url": "https://www.example.com/",
95+
"is_verified": false,
96+
"domain": "",
97+
"date_created": 12345,
98+
"requires_sponsorship": false
4899
},
49-
"channel": {
50-
"id": "C067Z8QNG8L",
51-
"is_im": false,
52-
"is_private": false,
53-
"date_created": 1701291142,
54-
"name": "fil-create-chan-test-org-wide",
55-
"connections": [
56-
{
57-
"team": {
58-
"id": "E1234",
59-
"name": "Slack DevRel",
60-
"icon": {
61-
"image_default": false,
62-
"image_34": "https://avatars.slack-edge.com/2023-11-30/6276741611460_3d1fdeba40cf1fde29c7_34.png",
63-
"image_44": "https://avatars.slack-edge.com/2023-11-30/6276741611460_3d1fdeba40cf1fde29c7_44.png",
64-
"image_68": "https://avatars.slack-edge.com/2023-11-30/6276741611460_3d1fdeba40cf1fde29c7_68.png",
65-
"image_88": "https://avatars.slack-edge.com/2023-11-30/6276741611460_3d1fdeba40cf1fde29c7_88.png",
66-
"image_102": "https://avatars.slack-edge.com/2023-11-30/6276741611460_3d1fdeba40cf1fde29c7_102.png",
67-
"image_230": "https://avatars.slack-edge.com/2023-11-30/6276741611460_3d1fdeba40cf1fde29c7_230.png",
68-
"image_132": "https://avatars.slack-edge.com/2023-11-30/6276741611460_3d1fdeba40cf1fde29c7_132.png"
69-
},
70-
"avatar_base_url": "https://ca.slack-edge.com/",
71-
"is_verified": false,
72-
"domain": "devrel-slack",
73-
"date_created": 1654616902,
74-
"requires_sponsorship": false
75-
},
76-
"is_private": false
77-
}
78-
],
79-
"pending_connections": [],
80-
"previous_connections": []
100+
"is_private": false
101+
}
102+
],
103+
"previous_connections": [
104+
{
105+
"team": {
106+
"id": "",
107+
"name": "",
108+
"icon": {
109+
"image_default": false,
110+
"image_34": "https://www.example.com/",
111+
"image_44": "https://www.example.com/",
112+
"image_68": "https://www.example.com/",
113+
"image_88": "https://www.example.com/",
114+
"image_102": "https://www.example.com/",
115+
"image_230": "https://www.example.com/",
116+
"image_132": "https://www.example.com/"
117+
},
118+
"avatar_base_url": "https://www.example.com/",
119+
"is_verified": false,
120+
"domain": "",
121+
"date_created": 12345,
122+
"requires_sponsorship": false
81123
},
82-
"is_external_limited": false,
83-
"date_last_updated": 1728322966,
84-
"target_user": {
85-
"recipient_email": "test@email.com"
86-
}
87-
}
88-
]
89-
}
124+
"is_private": false
125+
}
126+
]
127+
},
128+
"is_external_limited": false,
129+
"date_last_updated": 12345,
130+
"target_user": {
131+
"recipient_email": ""
132+
}
133+
}
134+
],
135+
"error": "",
136+
"needed": "",
137+
"provided": ""
138+
}

slack-api-client/src/main/java/com/slack/api/methods/RequestFormBuilder.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1916,7 +1916,9 @@ public static FormBody.Builder toForm(ConversationsRequestSharedInviteListReques
19161916
setIfNotNull("include_approved", req.getIncludeApproved(), form);
19171917
setIfNotNull("include_denied", req.getIncludeDenied(), form);
19181918
setIfNotNull("include_expired", req.getIncludeExpired(), form);
1919-
setIfNotNull("invite_ids", req.getInviteIds(), form);
1919+
if (req.getInviteIds() != null) {
1920+
setIfNotNull("invite_ids", String.join(",", req.getInviteIds()), form);
1921+
}
19201922
setIfNotNull("limit", req.getLimit(), form);
19211923
setIfNotNull("user_id", req.getUserId(), form);
19221924
return form;

slack-api-client/src/main/java/com/slack/api/methods/request/conversations/request_shared_invite/ConversationsRequestSharedInviteListRequest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,17 @@ public class ConversationsRequestSharedInviteListRequest implements SlackApiRequ
2525
/**
2626
* When true approved invitation requests will be returned, otherwise they will be excluded
2727
*/
28-
private boolean includeApproved;
28+
private Boolean includeApproved;
2929

3030
/**
3131
* When true denied invitation requests will be returned, otherwise they will be excluded
3232
*/
33-
private boolean includeDenied;
33+
private Boolean includeDenied;
3434

3535
/**
3636
* When true expired invitation requests will be returned, otherwise they will be excluded
3737
*/
38-
private boolean includeExpired;
38+
private Boolean includeExpired;
3939

4040
/**
4141
* An optional list of invitation ids to look up.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
package com.slack.api.methods.response.conversations.request_shared_invite;
2+
3+
import com.slack.api.methods.SlackApiTextResponse;
4+
import com.slack.api.model.TeamIcon;
5+
import lombok.Data;
6+
7+
import java.util.List;
8+
import java.util.Map;
9+
10+
@Data
11+
public class ConversationsRequestSharedInviteListResponse implements SlackApiTextResponse {
12+
13+
private boolean ok;
14+
private String warning;
15+
private String error;
16+
private String needed;
17+
private String provided;
18+
private transient Map<String, List<String>> httpResponseHeaders;
19+
20+
private List<InviteRequest> inviteRequests;
21+
22+
@Data
23+
public static class InviteRequest {
24+
private String id;
25+
private Integer dateCreated;
26+
private Integer expiresAt;
27+
private Team invitingTeam;
28+
private User invitingUser;
29+
private Channel channel;
30+
private Boolean isExternalLimited;
31+
private Integer dateLastUpdated;
32+
private TargetUser targetUser;
33+
34+
@Data
35+
public static class Team {
36+
private String id;
37+
private String name;
38+
private TeamIcon icon;
39+
private String avatarBaseUrl;
40+
private Boolean isVerified;
41+
private String domain;
42+
private Integer dateCreated;
43+
private Boolean requiresSponsorship;
44+
}
45+
46+
@Data
47+
public static class User {
48+
private String id;
49+
private String name;
50+
private String teamId;
51+
private Integer updated;
52+
private String whoCanShareContactCard;
53+
private com.slack.api.model.User.Profile profile;
54+
}
55+
56+
@Data
57+
public static class Channel {
58+
private String id;
59+
private Boolean isIm;
60+
private Boolean isPrivate;
61+
private Integer dateCreated;
62+
private String name;
63+
private List<Connection> connections;
64+
private List<Connection> pendingConnections;
65+
private List<Connection> previousConnections;
66+
}
67+
68+
@Data
69+
public static class Connection {
70+
private Boolean isPrivate;
71+
private Team team;
72+
}
73+
74+
@Data
75+
public static class TargetUser {
76+
private String recipientEmail;
77+
}
78+
}
79+
}

0 commit comments

Comments
 (0)