From 2e96e0263ccb766b67a8559eaefd50deecf01f8f Mon Sep 17 00:00:00 2001 From: Aditya Agarwal Date: Wed, 30 Sep 2026 13:10:14 +0200 Subject: [PATCH] feat: [FEEDS-1965] regenerate OpenAPI client Co-authored-by: Cursor --- src/main/java/io/getstream/Webhook.java | 12 ++++ .../io/getstream/models/ActivityResponse.java | 4 ++ .../models/ActivitySelectorConfig.java | 4 ++ .../ActivitySelectorConfigResponse.java | 4 ++ .../models/AsyncImportErrorEvent.java | 57 +++++++++++++++++ .../models/AsyncImportSuccessEvent.java | 54 ++++++++++++++++ .../io/getstream/models/CheckResponse.java | 16 +++++ .../io/getstream/models/ConfigResponse.java | 4 ++ .../models/FilterConfigResponse.java | 4 ++ .../getstream/models/GetActivityRequest.java | 4 ++ .../getstream/models/GetCommentsRequest.java | 4 ++ .../getstream/models/GetCommentsResponse.java | 7 ++ .../getstream/models/IntentBufferedItem.java | 35 ++++++++++ .../getstream/models/IntentConfigRequest.java | 28 ++++++++ .../models/IntentConfigResponse.java | 26 ++++++++ .../getstream/models/IntentDetectedEvent.java | 64 +++++++++++++++++++ .../getstream/models/IntentTopicRequest.java | 50 +++++++++++++++ .../getstream/models/IntentTopicResponse.java | 46 +++++++++++++ .../getstream/models/UpsertConfigRequest.java | 4 ++ src/test/java/io/getstream/WebhookTest.java | 5 +- 20 files changed, 431 insertions(+), 1 deletion(-) create mode 100644 src/main/java/io/getstream/models/AsyncImportErrorEvent.java create mode 100644 src/main/java/io/getstream/models/AsyncImportSuccessEvent.java create mode 100644 src/main/java/io/getstream/models/IntentBufferedItem.java create mode 100644 src/main/java/io/getstream/models/IntentConfigRequest.java create mode 100644 src/main/java/io/getstream/models/IntentConfigResponse.java create mode 100644 src/main/java/io/getstream/models/IntentDetectedEvent.java create mode 100644 src/main/java/io/getstream/models/IntentTopicRequest.java create mode 100644 src/main/java/io/getstream/models/IntentTopicResponse.java diff --git a/src/main/java/io/getstream/Webhook.java b/src/main/java/io/getstream/Webhook.java index 93cf2064..e364c656 100644 --- a/src/main/java/io/getstream/Webhook.java +++ b/src/main/java/io/getstream/Webhook.java @@ -28,6 +28,8 @@ import io.getstream.models.AsyncExportModerationLogsEvent; import io.getstream.models.AsyncExportReviewQueueEvent; import io.getstream.models.AsyncExportUsersEvent; +import io.getstream.models.AsyncImportErrorEvent; +import io.getstream.models.AsyncImportSuccessEvent; import io.getstream.models.BlockedUserEvent; import io.getstream.models.BookmarkAddedEvent; import io.getstream.models.BookmarkDeletedEvent; @@ -121,6 +123,7 @@ import io.getstream.models.IngressErrorEvent; import io.getstream.models.IngressStartedEvent; import io.getstream.models.IngressStoppedEvent; +import io.getstream.models.IntentDetectedEvent; import io.getstream.models.KickedUserEvent; import io.getstream.models.MaxStreakChangedEvent; import io.getstream.models.MemberAddedEvent; @@ -328,6 +331,8 @@ public static class EventType { public static final String FEEDS_NOTIFICATION_FEED_UPDATED = "feeds.notification_feed.updated"; public static final String FEEDS_STORIES_FEED_UPDATED = "feeds.stories_feed.updated"; public static final String FLAG_UPDATED = "flag.updated"; + public static final String IMPORT_ERROR = "import.error"; + public static final String IMPORT_SUCCESS = "import.success"; public static final String INGRESS_ERROR = "ingress.error"; public static final String INGRESS_STARTED = "ingress.started"; public static final String INGRESS_STOPPED = "ingress.stopped"; @@ -347,6 +352,7 @@ public static class EventType { 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_INTENT_DETECTED = "moderation.intent_detected"; public static final String MODERATION_MARK_REVIEWED = "moderation.mark_reviewed"; public static final String MODERATION_TEXT_ANALYSIS_COMPLETE = "moderation.text_analysis.complete"; @@ -714,6 +720,10 @@ private static Class getEventClass(String eventType) { return StoriesFeedUpdatedEvent.class; case "flag.updated": return FlagUpdatedEvent.class; + case "import.error": + return AsyncImportErrorEvent.class; + case "import.success": + return AsyncImportSuccessEvent.class; case "ingress.error": return IngressErrorEvent.class; case "ingress.started": @@ -750,6 +760,8 @@ private static Class getEventClass(String eventType) { return ModerationFlaggedEvent.class; case "moderation.image_analysis.complete": return ModerationImageAnalysisCompleteEvent.class; + case "moderation.intent_detected": + return IntentDetectedEvent.class; case "moderation.mark_reviewed": return ModerationMarkReviewedEvent.class; case "moderation.text_analysis.complete": diff --git a/src/main/java/io/getstream/models/ActivityResponse.java b/src/main/java/io/getstream/models/ActivityResponse.java index a58b465f..f5c2e2e9 100644 --- a/src/main/java/io/getstream/models/ActivityResponse.java +++ b/src/main/java/io/getstream/models/ActivityResponse.java @@ -148,6 +148,10 @@ public class ActivityResponse { @JsonProperty("text") private String text; + @Nullable + @JsonProperty("top_level_comment_count") + private Integer topLevelCommentCount; + @Nullable @JsonProperty("visibility_tag") private String visibilityTag; diff --git a/src/main/java/io/getstream/models/ActivitySelectorConfig.java b/src/main/java/io/getstream/models/ActivitySelectorConfig.java index c034d101..ed3288db 100644 --- a/src/main/java/io/getstream/models/ActivitySelectorConfig.java +++ b/src/main/java/io/getstream/models/ActivitySelectorConfig.java @@ -38,6 +38,10 @@ public class ActivitySelectorConfig { @JsonProperty("min_popularity") private Integer minPopularity; + @Nullable + @JsonProperty("ranking_candidate_limit") + private Integer rankingCandidateLimit; + @Nullable @JsonProperty("sort") private List sort; diff --git a/src/main/java/io/getstream/models/ActivitySelectorConfigResponse.java b/src/main/java/io/getstream/models/ActivitySelectorConfigResponse.java index 5cd2052e..1fbeb6e6 100644 --- a/src/main/java/io/getstream/models/ActivitySelectorConfigResponse.java +++ b/src/main/java/io/getstream/models/ActivitySelectorConfigResponse.java @@ -39,6 +39,10 @@ public class ActivitySelectorConfigResponse { @JsonProperty("min_popularity") private Integer minPopularity; + @Nullable + @JsonProperty("ranking_candidate_limit") + private Integer rankingCandidateLimit; + @Nullable @JsonProperty("sort") private List sort; diff --git a/src/main/java/io/getstream/models/AsyncImportErrorEvent.java b/src/main/java/io/getstream/models/AsyncImportErrorEvent.java new file mode 100644 index 00000000..9709c334 --- /dev/null +++ b/src/main/java/io/getstream/models/AsyncImportErrorEvent.java @@ -0,0 +1,57 @@ +/* + * ======================================================================== + * 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; + +@lombok.Data +@lombok.Builder +@lombok.NoArgsConstructor +@lombok.AllArgsConstructor +public class AsyncImportErrorEvent { + + @JsonProperty("created_at") + private Date createdAt; + + @JsonProperty("error") + private String error; + + @JsonProperty("finished_at") + private Date finishedAt; + + @JsonProperty("product") + private String product; + + @JsonProperty("state") + private String state; + + @JsonProperty("task_id") + private String taskID; + + @JsonProperty("custom") + private Map custom; + + @JsonProperty("type") + private String type; + + @Nullable + @JsonProperty("received_at") + private Date receivedAt; + + @Nullable + @JsonProperty("started_at") + private Date startedAt; +} diff --git a/src/main/java/io/getstream/models/AsyncImportSuccessEvent.java b/src/main/java/io/getstream/models/AsyncImportSuccessEvent.java new file mode 100644 index 00000000..6ffe8453 --- /dev/null +++ b/src/main/java/io/getstream/models/AsyncImportSuccessEvent.java @@ -0,0 +1,54 @@ +/* + * ======================================================================== + * 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; + +@lombok.Data +@lombok.Builder +@lombok.NoArgsConstructor +@lombok.AllArgsConstructor +public class AsyncImportSuccessEvent { + + @JsonProperty("created_at") + private Date createdAt; + + @JsonProperty("finished_at") + private Date finishedAt; + + @JsonProperty("product") + private String product; + + @JsonProperty("state") + private String state; + + @JsonProperty("task_id") + private String taskID; + + @JsonProperty("custom") + private Map custom; + + @JsonProperty("type") + private String type; + + @Nullable + @JsonProperty("received_at") + private Date receivedAt; + + @Nullable + @JsonProperty("started_at") + private Date startedAt; +} diff --git a/src/main/java/io/getstream/models/CheckResponse.java b/src/main/java/io/getstream/models/CheckResponse.java index b3f006d3..f9d6116b 100644 --- a/src/main/java/io/getstream/models/CheckResponse.java +++ b/src/main/java/io/getstream/models/CheckResponse.java @@ -31,6 +31,22 @@ public class CheckResponse { @JsonProperty("status") private String status; + @Nullable + @JsonProperty("intent_matched_topic") + private String intentMatchedTopic; + + @Nullable + @JsonProperty("intent_score") + private Double intentScore; + + @Nullable + @JsonProperty("intent_score_threshold") + private Double intentScoreThreshold; + + @Nullable + @JsonProperty("intent_would_fire") + private Boolean intentWouldFire; + @Nullable @JsonProperty("task_id") private String taskID; diff --git a/src/main/java/io/getstream/models/ConfigResponse.java b/src/main/java/io/getstream/models/ConfigResponse.java index 5398b3fc..075409e0 100644 --- a/src/main/java/io/getstream/models/ConfigResponse.java +++ b/src/main/java/io/getstream/models/ConfigResponse.java @@ -90,6 +90,10 @@ public class ConfigResponse { @JsonProperty("flood_config") private FloodConfig floodConfig; + @Nullable + @JsonProperty("intent_config") + private IntentConfigResponse intentConfig; + @Nullable @JsonProperty("llm_config") private LLMConfig llmConfig; diff --git a/src/main/java/io/getstream/models/FilterConfigResponse.java b/src/main/java/io/getstream/models/FilterConfigResponse.java index 630538d8..4748525c 100644 --- a/src/main/java/io/getstream/models/FilterConfigResponse.java +++ b/src/main/java/io/getstream/models/FilterConfigResponse.java @@ -30,6 +30,10 @@ public class FilterConfigResponse { @JsonProperty("ai_image_labels") private List aiImageLabels; + @Nullable + @JsonProperty("ai_image_ocr_labels") + private List aiImageOcrLabels; + @Nullable @JsonProperty("ai_text_labels") private List aiTextLabels; diff --git a/src/main/java/io/getstream/models/GetActivityRequest.java b/src/main/java/io/getstream/models/GetActivityRequest.java index 37e9f65e..e7a65757 100644 --- a/src/main/java/io/getstream/models/GetActivityRequest.java +++ b/src/main/java/io/getstream/models/GetActivityRequest.java @@ -45,4 +45,8 @@ public class GetActivityRequest { @Query("translate_text") @JsonIgnore private Boolean TranslateText; + + @Query("include_top_level_comment_count") + @JsonIgnore + private Boolean IncludeTopLevelCommentCount; } diff --git a/src/main/java/io/getstream/models/GetCommentsRequest.java b/src/main/java/io/getstream/models/GetCommentsRequest.java index d54fefd4..72b9b6dc 100644 --- a/src/main/java/io/getstream/models/GetCommentsRequest.java +++ b/src/main/java/io/getstream/models/GetCommentsRequest.java @@ -72,4 +72,8 @@ public class GetCommentsRequest { @Query("next") @JsonIgnore private String Next; + + @Query("include_top_level_comment_count") + @JsonIgnore + private Boolean IncludeTopLevelCommentCount; } diff --git a/src/main/java/io/getstream/models/GetCommentsResponse.java b/src/main/java/io/getstream/models/GetCommentsResponse.java index 95f29986..3d3e98b6 100644 --- a/src/main/java/io/getstream/models/GetCommentsResponse.java +++ b/src/main/java/io/getstream/models/GetCommentsResponse.java @@ -22,6 +22,9 @@ @lombok.AllArgsConstructor public class GetCommentsResponse { + @JsonProperty("comment_count") + private Integer commentCount; + @JsonProperty("duration") private String duration; @@ -38,4 +41,8 @@ public class GetCommentsResponse { @Nullable @JsonProperty("prev") private String prev; + + @Nullable + @JsonProperty("top_level_comment_count") + private Integer topLevelCommentCount; } diff --git a/src/main/java/io/getstream/models/IntentBufferedItem.java b/src/main/java/io/getstream/models/IntentBufferedItem.java new file mode 100644 index 00000000..f296653c --- /dev/null +++ b/src/main/java/io/getstream/models/IntentBufferedItem.java @@ -0,0 +1,35 @@ +/* + * ======================================================================== + * 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; + +@lombok.Data +@lombok.Builder +@lombok.NoArgsConstructor +@lombok.AllArgsConstructor +public class IntentBufferedItem { + + @JsonProperty("author_user_id") + private String authorUserID; + + @JsonProperty("created_at") + private Date createdAt; + + @JsonProperty("id") + private String id; + + @JsonProperty("text") + private String text; +} diff --git a/src/main/java/io/getstream/models/IntentConfigRequest.java b/src/main/java/io/getstream/models/IntentConfigRequest.java new file mode 100644 index 00000000..4c29b68b --- /dev/null +++ b/src/main/java/io/getstream/models/IntentConfigRequest.java @@ -0,0 +1,28 @@ +/* + * ======================================================================== + * 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 IntentConfigRequest { + + @Nullable + @JsonProperty("topics") + private List topics; +} diff --git a/src/main/java/io/getstream/models/IntentConfigResponse.java b/src/main/java/io/getstream/models/IntentConfigResponse.java new file mode 100644 index 00000000..3bc0e587 --- /dev/null +++ b/src/main/java/io/getstream/models/IntentConfigResponse.java @@ -0,0 +1,26 @@ +/* + * ======================================================================== + * 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; + +@lombok.Data +@lombok.Builder +@lombok.NoArgsConstructor +@lombok.AllArgsConstructor +public class IntentConfigResponse { + + @JsonProperty("topics") + private List topics; +} diff --git a/src/main/java/io/getstream/models/IntentDetectedEvent.java b/src/main/java/io/getstream/models/IntentDetectedEvent.java new file mode 100644 index 00000000..2c953bee --- /dev/null +++ b/src/main/java/io/getstream/models/IntentDetectedEvent.java @@ -0,0 +1,64 @@ +/* + * ======================================================================== + * 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.List; +import java.util.Map; +import org.jetbrains.annotations.Nullable; + +/** + * This event is sent when a buffered conversation's intent score clears the configured + * threshold + */ +@lombok.Data +@lombok.Builder +@lombok.NoArgsConstructor +@lombok.AllArgsConstructor +public class IntentDetectedEvent { + + @JsonProperty("conversation_id") + private String conversationID; + + @JsonProperty("created_at") + private Date createdAt; + + @JsonProperty("entity_id") + private String entityID; + + @JsonProperty("entity_type") + private String entityType; + + @JsonProperty("matched_topic") + private String matchedTopic; + + @JsonProperty("score") + private Double score; + + @JsonProperty("user_id") + private String userID; + + @JsonProperty("items") + private List items; + + @JsonProperty("custom") + private Map custom; + + @JsonProperty("type") + private String type; + + @Nullable + @JsonProperty("received_at") + private Date receivedAt; +} diff --git a/src/main/java/io/getstream/models/IntentTopicRequest.java b/src/main/java/io/getstream/models/IntentTopicRequest.java new file mode 100644 index 00000000..97fa66c8 --- /dev/null +++ b/src/main/java/io/getstream/models/IntentTopicRequest.java @@ -0,0 +1,50 @@ +/* + * ======================================================================== + * 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; + +@lombok.Data +@lombok.Builder +@lombok.NoArgsConstructor +@lombok.AllArgsConstructor +public class IntentTopicRequest { + + @JsonProperty("label") + private String label; + + @Nullable + @JsonProperty("analysis_cooldown_seconds") + private Integer analysisCooldownSeconds; + + @Nullable + @JsonProperty("description") + private String description; + + @Nullable + @JsonProperty("enabled") + private Boolean enabled; + + @Nullable + @JsonProperty("max_captured_items") + private Integer maxCapturedItems; + + @Nullable + @JsonProperty("refire_cooldown_seconds") + private Integer refireCooldownSeconds; + + @Nullable + @JsonProperty("score_threshold") + private Double scoreThreshold; +} diff --git a/src/main/java/io/getstream/models/IntentTopicResponse.java b/src/main/java/io/getstream/models/IntentTopicResponse.java new file mode 100644 index 00000000..0e1f130d --- /dev/null +++ b/src/main/java/io/getstream/models/IntentTopicResponse.java @@ -0,0 +1,46 @@ +/* + * ======================================================================== + * 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; + +@lombok.Data +@lombok.Builder +@lombok.NoArgsConstructor +@lombok.AllArgsConstructor +public class IntentTopicResponse { + + @JsonProperty("analysis_cooldown_seconds") + private Integer analysisCooldownSeconds; + + @JsonProperty("enabled") + private Boolean enabled; + + @JsonProperty("label") + private String label; + + @JsonProperty("max_captured_items") + private Integer maxCapturedItems; + + @JsonProperty("score_threshold") + private Double scoreThreshold; + + @Nullable + @JsonProperty("description") + private String description; + + @Nullable + @JsonProperty("refire_cooldown_seconds") + private Integer refireCooldownSeconds; +} diff --git a/src/main/java/io/getstream/models/UpsertConfigRequest.java b/src/main/java/io/getstream/models/UpsertConfigRequest.java index 327587c9..14d1ea29 100644 --- a/src/main/java/io/getstream/models/UpsertConfigRequest.java +++ b/src/main/java/io/getstream/models/UpsertConfigRequest.java @@ -89,6 +89,10 @@ public class UpsertConfigRequest { @JsonProperty("google_vision_config") private GoogleVisionConfig googleVisionConfig; + @Nullable + @JsonProperty("intent_config") + private IntentConfigRequest intentConfig; + @Nullable @JsonProperty("llm_config") private LLMConfig llmConfig; diff --git a/src/test/java/io/getstream/WebhookTest.java b/src/test/java/io/getstream/WebhookTest.java index 06564af7..3852d4a8 100644 --- a/src/test/java/io/getstream/WebhookTest.java +++ b/src/test/java/io/getstream/WebhookTest.java @@ -212,6 +212,8 @@ public void testGetEventTypeEmptyObject() { "feeds.notification_feed.updated, NotificationFeedUpdatedEvent", "feeds.stories_feed.updated, StoriesFeedUpdatedEvent", "flag.updated, FlagUpdatedEvent", + "import.error, AsyncImportErrorEvent", + "import.success, AsyncImportSuccessEvent", "ingress.error, IngressErrorEvent", "ingress.started, IngressStartedEvent", "ingress.stopped, IngressStoppedEvent", @@ -230,6 +232,7 @@ public void testGetEventTypeEmptyObject() { "moderation.custom_action, ModerationCustomActionEvent", "moderation.flagged, ModerationFlaggedEvent", "moderation.image_analysis.complete, ModerationImageAnalysisCompleteEvent", + "moderation.intent_detected, IntentDetectedEvent", "moderation.mark_reviewed, ModerationMarkReviewedEvent", "moderation.text_analysis.complete, ModerationTextAnalysisCompleteEvent", "moderation_check.completed, ModerationCheckCompletedEvent", @@ -300,7 +303,7 @@ public void testParseWebhookEventInvalidJson() { // ----------------------------------------------------------------------- // Conformance fixture suite (CHA-2961). The fixture set is generated by - // chat/'s `chat-manager openapi generate-webhook-fixtures` subcommand; + // chat/'s `build/openapi generate-webhook-fixtures` subcommand; // the SDK's generate.sh copies it into src/test/resources/fixtures/webhooks/ // at codegen time. // -----------------------------------------------------------------------