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
13 changes: 12 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ All notable changes to this project will be documented in this file. See [standa
Pass via the new constructor: `new StreamSDKClient(apiKey, secret, options)`.
- Per-call `RequestTimeout` override on `StreamRequest`: `request.callTimeout(Duration.ofSeconds(5)).execute()`.
- INFO log on client construction lists the effective pool config. Uses `java.util.logging.Logger` (no new dependency).
- Regenerated from the latest chat OpenAPI spec. New endpoints: `Moderation.analyze`, `Moderation.bulkActionAppeals`, `Moderation.getSetupSession`, `Moderation.upsertSetupSession`; `Feeds.getOrCreateFollow`, `Feeds.getOrCreateUnfollow`, `Feeds.getUserInterests`; `Chat.createSegment`, `Chat.updateSegment`, `Chat.addSegmentTargets`; `Common.cancelImportV2Task`; `Video.reportClientCallEvent`, together with the request/response model classes backing them.
- New webhook event types `moderation.image_analysis.complete` and `moderation.text_analysis.complete`, with `ModerationImageAnalysisCompleteEvent` and `ModerationTextAnalysisCompleteEvent` model classes.

### Changed

Expand All @@ -43,7 +45,16 @@ All notable changes to this project will be documented in this file. See [standa
- The `APIError` envelope parser (formerly `StreamException.ResponseData`) gained the previously-dropped `details` and `unrecoverable` fields.
- **Default per-call `RequestTimeout` is now `30s` (was `10s`).** Aligns with CHA-2956 cross-SDK contract. The previous `10s` came from the hardcoded `timeout = 10000` ms in `StreamHTTPClient`. To keep the old ceiling, pass `new StreamClientOptions().setRequestTimeout(Duration.ofSeconds(10))`.
- Default idle-connection lifetime now `55s` (was `59s` via the `STREAM_API_CONNECTION_MAX_AGE` env var path). 55s sits 5s below the typical 60s LB idle timeout for safer eviction. `MaxConnsPerHost` default is unchanged at `5`.
- No other breaking changes. Existing `StreamSDKClient(apiKey, secret)`, `StreamSDKClient(apiKey, secret, OkHttpClient)`, and `StreamSDKClient(Properties)` constructors are preserved.
- The client constructors are unchanged. Existing `StreamSDKClient(apiKey, secret)`, `StreamSDKClient(apiKey, secret, OkHttpClient)`, and `StreamSDKClient(Properties)` are preserved.

### Breaking

These come from regenerating against the latest chat OpenAPI spec. They are source- and binary-incompatible for Java consumers (changed return types and removed/retyped getters), so this release is a major version bump.

- `Moderation.ban(...)` now returns `StreamRequest<ModerationBanResponse>` (was `StreamRequest<BanResponse>`). `BanResponse` is unchanged and still used elsewhere (e.g. `getBans()`); only the `ban()` action return type moved to the dedicated `ModerationBanResponse`.
- `Moderation.flag(...)` now returns `StreamRequest<FlagItemResponse>` (was `StreamRequest<FlagResponse>`). The moderation flag-action acknowledgement, which carries `itemID` and `duration`, moved to the new `FlagItemResponse`; `FlagResponse` now models the full flag record (`createdAt`, `updatedAt`, `targetMessage`, `targetUser`, `user`, `reason`, `details`, `custom`, and related fields). This resolves an upstream OpenAPI name collision where the acknowledgement was shadowing the rich record. The `/api/v2/moderation/flag` wire response is unchanged; call sites typed on `FlagResponse` must switch to `FlagItemResponse`.
- Removed getters: `FlagResponse.getItemID()`, `FlagResponse.getDuration()`, `FlagDetails.getExtra()`.
- Changed getter return types: `ChannelInput.getConfigOverrides()` and `ChannelDataUpdate.getConfigOverrides()` now return `ChannelConfigOverrides` (was `ChannelConfig`); `FlagDetails.getAutomod()` now returns `AutomodDetailsResponse` (was `AutomodDetails`); `ChatMessageResponse.getAttachments()` now returns `List<Attachment>` (was `List<Object>`); `ChatMessageResponse.getOwnReactions()` and `getLatestReactions()` now return `List<ChatReactionResponse>` (was `List<Object>`).

## [7.2.0](https://github.com/GetStream/stream-sdk-java/compare/7.1.0...7.2.0) (2026-04-30)

Expand Down
10 changes: 10 additions & 0 deletions src/main/java/io/getstream/Webhook.java
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,10 @@
import io.getstream.models.ModerationCheckCompletedEvent;
import io.getstream.models.ModerationCustomActionEvent;
import io.getstream.models.ModerationFlaggedEvent;
import io.getstream.models.ModerationImageAnalysisCompleteEvent;
import io.getstream.models.ModerationMarkReviewedEvent;
import io.getstream.models.ModerationRulesTriggeredEvent;
import io.getstream.models.ModerationTextAnalysisCompleteEvent;
import io.getstream.models.NotificationFeedUpdatedEvent;
import io.getstream.models.NotificationMarkUnreadEvent;
import io.getstream.models.NotificationThreadMessageNewEvent;
Expand Down Expand Up @@ -338,7 +340,11 @@ public static class EventType {
public static final String MESSAGE_UPDATED = "message.updated";
public static final String MODERATION_CUSTOM_ACTION = "moderation.custom_action";
public static final String MODERATION_FLAGGED = "moderation.flagged";
public static final String MODERATION_IMAGE_ANALYSIS_COMPLETE =
"moderation.image_analysis.complete";
public static final String MODERATION_MARK_REVIEWED = "moderation.mark_reviewed";
public static final String MODERATION_TEXT_ANALYSIS_COMPLETE =
"moderation.text_analysis.complete";
public static final String MODERATION_CHECK_COMPLETED = "moderation_check.completed";
public static final String MODERATION_RULE_TRIGGERED = "moderation_rule.triggered";
public static final String NOTIFICATION_MARK_UNREAD = "notification.mark_unread";
Expand Down Expand Up @@ -731,8 +737,12 @@ private static Class<?> getEventClass(String eventType) {
return ModerationCustomActionEvent.class;
case "moderation.flagged":
return ModerationFlaggedEvent.class;
case "moderation.image_analysis.complete":
return ModerationImageAnalysisCompleteEvent.class;
case "moderation.mark_reviewed":
return ModerationMarkReviewedEvent.class;
case "moderation.text_analysis.complete":
return ModerationTextAnalysisCompleteEvent.class;
case "moderation_check.completed":
return ModerationCheckCompletedEvent.class;
case "moderation_rule.triggered":
Expand Down
27 changes: 27 additions & 0 deletions src/main/java/io/getstream/models/AddSegmentTargetsRequest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* ========================================================================
* 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;

/** Add targets to a segment Add targets to a segment */
@lombok.Data
@lombok.Builder
@lombok.NoArgsConstructor
@lombok.AllArgsConstructor
public class AddSegmentTargetsRequest {

@JsonProperty("target_ids")
private List<String> targetIds;
}
48 changes: 48 additions & 0 deletions src/main/java/io/getstream/models/AnalyzeImageField.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/*
* ========================================================================
* 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 AnalyzeImageField {

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

@Nullable
@JsonProperty("confidence")
private Double confidence;

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

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

@Nullable
@JsonProperty("classifications")
private List<Classification> classifications;

@Nullable
@JsonProperty("ocr_classifications")
private List<Classification> ocrClassifications;
}
73 changes: 73 additions & 0 deletions src/main/java/io/getstream/models/AnalyzeRequest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
/*
* ========================================================================
* 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 java.util.Map;
import org.jetbrains.annotations.Nullable;

/**
* Analyze Moderate named text fields and raw image bytes via multipart/form-data. Returns a
* per-field lightweight verdict.
*/
@lombok.Data
@lombok.Builder
@lombok.NoArgsConstructor
@lombok.AllArgsConstructor
public class AnalyzeRequest {

@Nullable
@JsonProperty("async_response")
private Boolean asyncResponse;

@Nullable
@JsonProperty("config_key")
private String configKey;

@Nullable
@JsonProperty("content_published_at")
private Date contentPublishedAt;

@Nullable
@JsonProperty("entity_creator_id")
private String entityCreatorID;

@Nullable
@JsonProperty("entity_id")
private String entityID;

@Nullable
@JsonProperty("entity_type")
private String entityType;

@Nullable
@JsonProperty("user_id")
private String userID;

@Nullable
@JsonProperty("content_ids")
private Map<String, String> contentIds;

@Nullable
@JsonProperty("custom")
private Map<String, Object> custom;

@Nullable
@JsonProperty("texts")
private Map<String, String> texts;

@Nullable
@JsonProperty("user")
private UserRequest user;
}
38 changes: 38 additions & 0 deletions src/main/java/io/getstream/models/AnalyzeResponse.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.Map;
import org.jetbrains.annotations.Nullable;

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

@JsonProperty("duration")
private String duration;

@JsonProperty("status")
private String status;

@Nullable
@JsonProperty("images")
private Map<String, AnalyzeImageField> images;

@Nullable
@JsonProperty("texts")
private Map<String, AnalyzeTextField> texts;
}
48 changes: 48 additions & 0 deletions src/main/java/io/getstream/models/AnalyzeTextField.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/*
* ========================================================================
* 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 AnalyzeTextField {

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

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

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

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

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

@Nullable
@JsonProperty("classifications")
private List<Classification> classifications;
}
12 changes: 12 additions & 0 deletions src/main/java/io/getstream/models/AppResponseFields.java
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,18 @@ public class AppResponseFields {
@JsonProperty("push_notifications")
private PushNotificationFields pushNotifications;

@Nullable
@JsonProperty("before_message_send_hook_attempt_timeout_ms")
private Integer beforeMessageSendHookAttemptTimeoutMs;

@Nullable
@JsonProperty("before_message_send_hook_url")
private String beforeMessageSendHookUrl;

@Nullable
@JsonProperty("moderation_onboarding_complete")
private Boolean moderationOnboardingComplete;

@Nullable
@JsonProperty("moderation_s3_image_access_role_arn")
private String moderationS3ImageAccessRoleArn;
Expand All @@ -177,6 +185,10 @@ public class AppResponseFields {
@JsonProperty("revoke_tokens_issued_before")
private Date revokeTokensIssuedBefore;

@Nullable
@JsonProperty("video_primary_use_case")
private String videoPrimaryUseCase;

@Nullable
@JsonProperty("allowed_flag_reasons")
private List<String> allowedFlagReasons;
Expand Down
48 changes: 48 additions & 0 deletions src/main/java/io/getstream/models/AppealItemResponse.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,66 @@ public class AppealItemResponse {
@JsonProperty("updated_at")
private Date updatedAt;

@Nullable
@JsonProperty("ai_text_severity")
private String aiTextSeverity;

@Nullable
@JsonProperty("channel_cid")
private String channelCid;

@Nullable
@JsonProperty("config_key")
private String configKey;

@Nullable
@JsonProperty("decision_reason")
private String decisionReason;

@Nullable
@JsonProperty("recommended_action")
private String recommendedAction;

@Nullable
@JsonProperty("review_queue_item_id")
private String reviewQueueItemID;

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

@Nullable
@JsonProperty("actions")
private List<ActionLogResponse> actions;

@Nullable
@JsonProperty("attachments")
private List<String> attachments;

@Nullable
@JsonProperty("flag_labels")
private List<String> flagLabels;

@Nullable
@JsonProperty("flag_types")
private List<String> flagTypes;

@Nullable
@JsonProperty("flags")
private List<ModerationFlagResponse> flags;

@Nullable
@JsonProperty("entity_content")
private ModerationPayload entityContent;

@Nullable
@JsonProperty("moderation_action")
private ActionLogResponse moderationAction;

@Nullable
@JsonProperty("original_moderation_action")
private ActionLogResponse originalModerationAction;

@Nullable
@JsonProperty("user")
private UserResponse user;
Expand Down
Loading
Loading