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
4 changes: 2 additions & 2 deletions .spec-version
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
spec: openapi-v241.37.3
generator: chat v241.37.3
spec: openapi-v241.37.4
generator: chat v241.37.4
6 changes: 5 additions & 1 deletion src/main/java/io/getstream/models/BanRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import com.fasterxml.jackson.annotation.JsonProperty;
import org.jetbrains.annotations.Nullable;

/** Ban Ban a user from a channel or the entire app */
/** Ban Ban a user from a feed, channel or the entire app */
@lombok.Data
@lombok.Builder
@lombok.NoArgsConstructor
Expand Down Expand Up @@ -49,6 +49,10 @@ public class BanRequest {
@JsonProperty("delete_reactions")
private Boolean deleteReactions;

@Nullable
@JsonProperty("feed_fid")
private String feedFid;

@Nullable
@JsonProperty("ip_ban")
private Boolean ipBan;
Expand Down
52 changes: 52 additions & 0 deletions src/main/java/io/getstream/models/FeedBanResponse.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/*
* ========================================================================
* WARNING: GENERATED CODE -- DO NOT EDIT!
* ========================================================================
*
* This file was auto-generated by GetStream internal OpenAPI
*
* Any modifications to this file will be lost upon regeneration.
* To make changes, please modify the source templates and regenerate.
*
* ========================================================================
*/
package io.getstream.models;

import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Date;
import org.jetbrains.annotations.Nullable;

@lombok.Data
@lombok.Builder
@lombok.NoArgsConstructor
@lombok.AllArgsConstructor
public class FeedBanResponse {

@JsonProperty("created_at")
private Date createdAt;

@JsonProperty("feed_fid")
private String feedFid;

@JsonProperty("reason")
private String reason;

@JsonProperty("target_user_id")
private String targetUserID;

@Nullable
@JsonProperty("created_by_id")
private String createdByID;

@Nullable
@JsonProperty("expires")
private Date expires;

@Nullable
@JsonProperty("created_by")
private UserResponse createdBy;

@Nullable
@JsonProperty("user")
private UserResponse user;
}
1 change: 1 addition & 0 deletions src/main/java/io/getstream/models/FeedOwnCapability.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ private FeedOwnCapability() {}
public static final String ADD_ACTIVITY_REACTION = "add-activity-reaction";
public static final String ADD_COMMENT = "add-comment";
public static final String ADD_COMMENT_REACTION = "add-comment-reaction";
public static final String BAN_FEED_MEMBER = "ban-feed-member";
public static final String CREATE_FEED = "create-feed";
public static final String DELETE_ANY_ACTIVITY = "delete-any-activity";
public static final String DELETE_ANY_COMMENT = "delete-any-comment";
Expand Down
47 changes: 47 additions & 0 deletions src/main/java/io/getstream/models/QueryFeedBansRequest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/*
* ========================================================================
* WARNING: GENERATED CODE -- DO NOT EDIT!
* ========================================================================
*
* This file was auto-generated by GetStream internal OpenAPI
*
* Any modifications to this file will be lost upon regeneration.
* To make changes, please modify the source templates and regenerate.
*
* ========================================================================
*/
package io.getstream.models;

import com.fasterxml.jackson.annotation.JsonProperty;
import org.jetbrains.annotations.Nullable;

/**
* Query feed bans Query the current bans for one feed, newest first. Requires feed moderation
* permission. Active bans are returned by default.
*/
@lombok.Data
@lombok.Builder
@lombok.NoArgsConstructor
@lombok.AllArgsConstructor
public class QueryFeedBansRequest {

@Nullable
@JsonProperty("include_expired")
private Boolean includeExpired;

@Nullable
@JsonProperty("limit")
private Integer limit;

@Nullable
@JsonProperty("next")
private String next;

@Nullable
@JsonProperty("prev")
private String prev;

@Nullable
@JsonProperty("target_user_id")
private String targetUserID;
}
38 changes: 38 additions & 0 deletions src/main/java/io/getstream/models/QueryFeedBansResponse.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
* ========================================================================
* WARNING: GENERATED CODE -- DO NOT EDIT!
* ========================================================================
*
* This file was auto-generated by GetStream internal OpenAPI
*
* Any modifications to this file will be lost upon regeneration.
* To make changes, please modify the source templates and regenerate.
*
* ========================================================================
*/
package io.getstream.models;

import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
import org.jetbrains.annotations.Nullable;

@lombok.Data
@lombok.Builder
@lombok.NoArgsConstructor
@lombok.AllArgsConstructor
public class QueryFeedBansResponse {

@JsonProperty("duration")
private String duration;

@JsonProperty("bans")
private List<FeedBanResponse> bans;

@Nullable
@JsonProperty("next")
private String next;

@Nullable
@JsonProperty("prev")
private String prev;
}
6 changes: 5 additions & 1 deletion src/main/java/io/getstream/models/UnbanRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import io.getstream.annotations.Query;
import org.jetbrains.annotations.Nullable;

/** Unban Unban a user from a channel or globally. */
/** Unban Unban a user from a feed, channel or globally. */
@lombok.Data
@lombok.Builder
@lombok.NoArgsConstructor
Expand Down Expand Up @@ -59,4 +59,8 @@ public class UnbanRequest {
@Query("channel_type")
@JsonIgnore
private String ChannelType;

@Query("feed_fid")
@JsonIgnore
private String FeedFid;
}
9 changes: 9 additions & 0 deletions src/main/java/io/getstream/services/Feed.java
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,15 @@ public StreamResponse<PinActivityResponse> pinActivity(@NotNull String activityI
return this.pinActivity(activityID, new PinActivityRequest());
}

public StreamResponse<QueryFeedBansResponse> queryFeedBans(QueryFeedBansRequest request)
throws StreamException {
return service.queryFeedBans(this.feedGroup, this.feedID, request).execute();
}

public StreamResponse<QueryFeedBansResponse> queryFeedBans() throws StreamException {
return this.queryFeedBans(new QueryFeedBansRequest());
}

public StreamResponse<ChangeFeedVisibilityResponse> changeFeedVisibility(
ChangeFeedVisibilityRequest request) throws StreamException {
return service.changeFeedVisibility(this.feedGroup, this.feedID, request).execute();
Expand Down
9 changes: 9 additions & 0 deletions src/main/java/io/getstream/services/Feeds.java
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,15 @@ public StreamRequest<PinActivityResponse> pinActivity(
@NotNull String feedGroupID, @NotNull String feedID, @NotNull String activityID)
throws StreamException;

@NotNull
public StreamRequest<QueryFeedBansResponse> queryFeedBans(
@NotNull String feedGroupID, @NotNull String feedID, QueryFeedBansRequest request)
throws StreamException;

@NotNull
public StreamRequest<QueryFeedBansResponse> queryFeedBans(
@NotNull String feedGroupID, @NotNull String feedID) throws StreamException;

@NotNull
public StreamRequest<ChangeFeedVisibilityResponse> changeFeedVisibility(
@NotNull String feedGroupID, @NotNull String feedID, ChangeFeedVisibilityRequest request)
Expand Down
24 changes: 24 additions & 0 deletions src/main/java/io/getstream/services/FeedsImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -1195,6 +1195,30 @@ public StreamRequest<PinActivityResponse> pinActivity(
return pinActivity(feedGroupID, feedID, activityID, new PinActivityRequest());
}

@NotNull
public StreamRequest<QueryFeedBansResponse> queryFeedBans(
@NotNull String feedGroupID, @NotNull String feedID, QueryFeedBansRequest request)
throws StreamException {
var pathParams =
Map.of(
"feed_group_id", feedGroupID,
"feed_id", feedID);

return new StreamRequest<QueryFeedBansResponse>(
client,
"POST",
"/api/v2/feeds/feed_groups/{feed_group_id}/feeds/{feed_id}/bans/query",
request,
pathParams,
new TypeReference<QueryFeedBansResponse>() {});
}

@NotNull
public StreamRequest<QueryFeedBansResponse> queryFeedBans(
@NotNull String feedGroupID, @NotNull String feedID) throws StreamException {
return queryFeedBans(feedGroupID, feedID, new QueryFeedBansRequest());
}

@NotNull
public StreamRequest<ChangeFeedVisibilityResponse> changeFeedVisibility(
@NotNull String feedGroupID, @NotNull String feedID, ChangeFeedVisibilityRequest request)
Expand Down
Loading