Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ public static FormBody.Builder toForm(AdminAppsApproveRequest req) {
FormBody.Builder form = new FormBody.Builder();
setIfNotNull("app_id", req.getAppId(), form);
setIfNotNull("request_id", req.getRequestId(), form);
setIfNotNull("enterprise_id", req.getEnterpriseId(), form);
setIfNotNull("team_id", req.getTeamId(), form);
return form;
}
Expand All @@ -207,6 +208,7 @@ public static FormBody.Builder toForm(AdminAppsRestrictRequest req) {
FormBody.Builder form = new FormBody.Builder();
setIfNotNull("app_id", req.getAppId(), form);
setIfNotNull("request_id", req.getRequestId(), form);
setIfNotNull("enterprise_id", req.getEnterpriseId(), form);
setIfNotNull("team_id", req.getTeamId(), form);
return form;
}
Expand Down Expand Up @@ -663,6 +665,11 @@ public static FormBody.Builder toForm(AdminUsersAssignRequest req) {
FormBody.Builder form = new FormBody.Builder();
setIfNotNull("team_id", req.getTeamId(), form);
setIfNotNull("user_id", req.getUserId(), form);
if (req.getChannelIds() != null && req.getChannelIds().size() > 0) {
setIfNotNull("channel_ids", req.getChannelIds().stream().collect(joining(",")), form);
}
setIfNotNull("is_restricted", req.isRestricted(), form);
setIfNotNull("is_ultra_restricted", req.isUltraRestricted(), form);
return form;
}

Expand Down Expand Up @@ -1419,6 +1426,7 @@ public static FormBody.Builder toForm(DndEndSnoozeRequest req) {
public static FormBody.Builder toForm(DndInfoRequest req) {
FormBody.Builder form = new FormBody.Builder();
setIfNotNull("user", req.getUser(), form);
setIfNotNull("team_id", req.getTeamId(), form);
return form;
}

Expand All @@ -1433,6 +1441,7 @@ public static FormBody.Builder toForm(DndTeamInfoRequest req) {
if (req.getUsers() != null) {
setIfNotNull("users", req.getUsers().stream().collect(joining(",")), form);
}
setIfNotNull("team_id", req.getTeamId(), form);
return form;
}

Expand Down Expand Up @@ -1917,6 +1926,7 @@ public static FormBody.Builder toForm(ReactionsListRequest req) {
setIfNotNull("full", req.isFull(), form);
setIfNotNull("count", req.getCount(), form);
setIfNotNull("page", req.getPage(), form);
setIfNotNull("limit", req.getLimit(), form);
setIfNotNull("team_id", req.getTeamId(), form);
return form;
}
Expand All @@ -1936,29 +1946,34 @@ public static FormBody.Builder toForm(RemindersAddRequest req) {
setIfNotNull("text", req.getText(), form);
setIfNotNull("time", req.getTime(), form);
setIfNotNull("user", req.getUser(), form);
setIfNotNull("team_id", req.getTeamId(), form);
return form;
}

public static FormBody.Builder toForm(RemindersCompleteRequest req) {
FormBody.Builder form = new FormBody.Builder();
setIfNotNull("reminder", req.getReminder(), form);
setIfNotNull("team_id", req.getTeamId(), form);
return form;
}

public static FormBody.Builder toForm(RemindersDeleteRequest req) {
FormBody.Builder form = new FormBody.Builder();
setIfNotNull("reminder", req.getReminder(), form);
setIfNotNull("team_id", req.getTeamId(), form);
return form;
}

public static FormBody.Builder toForm(RemindersInfoRequest req) {
FormBody.Builder form = new FormBody.Builder();
setIfNotNull("reminder", req.getReminder(), form);
setIfNotNull("team_id", req.getTeamId(), form);
return form;
}

public static FormBody.Builder toForm(RemindersListRequest req) {
FormBody.Builder form = new FormBody.Builder();
setIfNotNull("team_id", req.getTeamId(), form);
return form;
}

Expand Down Expand Up @@ -1996,6 +2011,7 @@ public static FormBody.Builder toForm(SearchAllRequest req) {
public static FormBody.Builder toForm(SearchMessagesRequest req) {
FormBody.Builder form = new FormBody.Builder();
setIfNotNull("query", req.getQuery(), form);
setIfNotNull("cursor", req.getCursor(), form);
setIfNotNull("sort", req.getSort(), form);
setIfNotNull("sort_dir", req.getSortDir(), form);
setIfNotNull("highlight", req.isHighlight(), form);
Expand Down Expand Up @@ -2029,7 +2045,10 @@ public static FormBody.Builder toForm(StarsAddRequest req) {
public static FormBody.Builder toForm(StarsListRequest req) {
FormBody.Builder form = new FormBody.Builder();
setIfNotNull("count", req.getCount(), form);
setIfNotNull("cursor", req.getCursor(), form);
setIfNotNull("limit", req.getLimit(), form);
setIfNotNull("page", req.getPage(), form);
setIfNotNull("team_id", req.getTeamId(), form);
return form;
}

Expand Down Expand Up @@ -2091,20 +2110,23 @@ public static FormBody.Builder toForm(UsergroupsCreateRequest req) {
setIfNotNull("channels", req.getChannels().stream().collect(joining(",")), form);
}
setIfNotNull("include_count", req.isIncludeCount(), form);
setIfNotNull("team_id", req.getTeamId(), form);
return form;
}

public static FormBody.Builder toForm(UsergroupsDisableRequest req) {
FormBody.Builder form = new FormBody.Builder();
setIfNotNull("usergroup", req.getUsergroup(), form);
setIfNotNull("include_count", req.isIncludeCount(), form);
setIfNotNull("team_id", req.getTeamId(), form);
return form;
}

public static FormBody.Builder toForm(UsergroupsEnableRequest req) {
FormBody.Builder form = new FormBody.Builder();
setIfNotNull("usergroup", req.getUsergroup(), form);
setIfNotNull("include_count", req.isIncludeCount(), form);
setIfNotNull("team_id", req.getTeamId(), form);
return form;
}

Expand All @@ -2113,6 +2135,7 @@ public static FormBody.Builder toForm(UsergroupsListRequest req) {
setIfNotNull("include_disabled", req.isIncludeDisabled(), form);
setIfNotNull("include_count", req.isIncludeCount(), form);
setIfNotNull("include_users", req.isIncludeUsers(), form);
setIfNotNull("team_id", req.getTeamId(), form);
return form;
}

Expand All @@ -2126,13 +2149,15 @@ public static FormBody.Builder toForm(UsergroupsUpdateRequest req) {
setIfNotNull("channels", req.getChannels().stream().collect(joining(",")), form);
}
setIfNotNull("include_count", req.isIncludeCount(), form);
setIfNotNull("team_id", req.getTeamId(), form);
return form;
}

public static FormBody.Builder toForm(UsergroupsUsersListRequest req) {
FormBody.Builder form = new FormBody.Builder();
setIfNotNull("usergroup", req.getUsergroup(), form);
setIfNotNull("include_disabled", req.isIncludeDisabled(), form);
setIfNotNull("team_id", req.getTeamId(), form);
return form;
}

Expand All @@ -2143,6 +2168,7 @@ public static FormBody.Builder toForm(UsergroupsUsersUpdateRequest req) {
setIfNotNull("users", req.getUsers().stream().collect(joining(",")), form);
}
setIfNotNull("include_count", req.isIncludeCount(), form);
setIfNotNull("team_id", req.getTeamId(), form);
return form;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@ public class AdminAppsApproveRequest implements SlackApiRequest {
private String requestId;

/**
* Workspace Id
* The ID of the enterprise to approve the app on
*/
private String enterpriseId;

/**
* The ID of the workspace to approve the app on
*/
private String teamId;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@ public class AdminAppsRestrictRequest implements SlackApiRequest {
private String requestId;

/**
* Workspace Id
* The ID of the enterprise to approve the app on
*/
private String enterpriseId;

/**
* The ID of the workspace to approve the app on
*/
private String teamId;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
import lombok.Builder;
import lombok.Data;

import java.util.List;

/**
* https://api.slack.com/methods/admin.users.assign
*/
Expand All @@ -26,6 +28,11 @@ public class AdminUsersAssignRequest implements SlackApiRequest {
*/
private String userId;

/**
* Comma separated values of channel IDs to add user in the new workspace.
*/
private List<String> channelIds;

/**
* True if user should be added to the workspace as a guest.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,6 @@ public class DndInfoRequest implements SlackApiRequest {
*/
private String user;

private String teamId;

}
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,6 @@ public class DndTeamInfoRequest implements SlackApiRequest {
*/
private List<String> users;

private String teamId;

}
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@ public class PinsAddRequest implements SlackApiRequest {
/**
* File to pin.
*/
@Deprecated
private String file;

/**
* File comment to pin.
*/
@Deprecated
private String fileComment;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@ public class PinsRemoveRequest implements SlackApiRequest {
/**
* File to un-pin.
*/
@Deprecated
private String file;

/**
* File comment to un-pin.
*/
@Deprecated
private String fileComment;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@ public class ReactionsAddRequest implements SlackApiRequest {
/**
* File to add reaction to.
*/
@Deprecated
private String file;

/**
* File comment to add reaction to.
*/
@Deprecated
private String fileComment;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ public class ReactionsListRequest implements SlackApiRequest {

private Integer page;

private Integer limit;

/**
* Required for org-wide apps.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,6 @@ public class RemindersAddRequest implements SlackApiRequest {
*/
private String user;

private String teamId;

}
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,7 @@ public class RemindersCompleteRequest implements SlackApiRequest {
* The ID of the reminder to be marked as complete
*/
private String reminder;

private String teamId;

}
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,6 @@ public class RemindersDeleteRequest implements SlackApiRequest {
*/
private String reminder;

private String teamId;

}
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,6 @@ public class RemindersInfoRequest implements SlackApiRequest {
*/
private String reminder;

private String teamId;

}
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ public class RemindersListRequest implements SlackApiRequest {
*/
private String token;

private String teamId;
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ public class SearchMessagesRequest implements SlackApiRequest {
*/
private boolean highlight;

private String cursor;

private Integer count;

private Integer page;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import lombok.Builder;
import lombok.Data;

// https://api.slack.com/methods/stars.list
@Data
@Builder
public class StarsListRequest implements SlackApiRequest {
Expand All @@ -13,8 +14,33 @@ public class StarsListRequest implements SlackApiRequest {
*/
private String token;

/**
* Number of items to return per page.
*/
private Integer count;

/**
* Parameter for pagination. Set cursor equal to the next_cursor attribute returned
* by the previous request's response_metadata. This parameter is optional,
* but pagination is mandatory: the default value simply fetches
* the first "page" of the collection. See pagination for more details.
*/
private String cursor;

/**
* The maximum number of items to return.
* Fewer than the requested number of items may be returned, even if the end of the list hasn't been reached.
*/
private Integer limit;

/**
* Page number of results to return.
*/
private Integer page;

/**
* encoded team id to list stars in, required if org token is used
*/
private String teamId;

}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import java.util.List;

// https://api.slack.com/methods/usergroups.create
@Data
@Builder
public class UsergroupsCreateRequest implements SlackApiRequest {
Expand Down Expand Up @@ -40,4 +41,9 @@ public class UsergroupsCreateRequest implements SlackApiRequest {
*/
private boolean includeCount;

/**
* encoded team id where the user group exists, required if org token is used
*/
private String teamId;

}
Loading