diff --git a/src/main/java/io/getstream/models/ActivityResponse.java b/src/main/java/io/getstream/models/ActivityResponse.java index b9e5b858..314478d5 100644 --- a/src/main/java/io/getstream/models/ActivityResponse.java +++ b/src/main/java/io/getstream/models/ActivityResponse.java @@ -140,6 +140,10 @@ public class ActivityResponse { @JsonProperty("moderation_action") private String moderationAction; + @Nullable + @JsonProperty("position") + private Integer position; + @Nullable @JsonProperty("selector_source") private String selectorSource; diff --git a/src/main/java/io/getstream/models/ActivitySelectorConfig.java b/src/main/java/io/getstream/models/ActivitySelectorConfig.java index e8b7965f..a84c8ac1 100644 --- a/src/main/java/io/getstream/models/ActivitySelectorConfig.java +++ b/src/main/java/io/getstream/models/ActivitySelectorConfig.java @@ -34,6 +34,18 @@ public class ActivitySelectorConfig { @JsonProperty("cutoff_window") private String cutoffWindow; + @Nullable + @JsonProperty("friend_type") + private String friendType; + + @Nullable + @JsonProperty("max_friends") + private Integer maxFriends; + + @Nullable + @JsonProperty("min_friends") + private Integer minFriends; + @Nullable @JsonProperty("min_popularity") private Integer minPopularity; @@ -50,6 +62,10 @@ public class ActivitySelectorConfig { @JsonProperty("viewer_location_radius_km") private Double viewerLocationRadiusKm; + @Nullable + @JsonProperty("reaction_types") + private List reactionTypes; + @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 feb6b3f8..c4e19580 100644 --- a/src/main/java/io/getstream/models/ActivitySelectorConfigResponse.java +++ b/src/main/java/io/getstream/models/ActivitySelectorConfigResponse.java @@ -35,6 +35,18 @@ public class ActivitySelectorConfigResponse { @JsonProperty("cutoff_window") private String cutoffWindow; + @Nullable + @JsonProperty("friend_type") + private String friendType; + + @Nullable + @JsonProperty("max_friends") + private Integer maxFriends; + + @Nullable + @JsonProperty("min_friends") + private Integer minFriends; + @Nullable @JsonProperty("min_popularity") private Integer minPopularity; @@ -51,6 +63,10 @@ public class ActivitySelectorConfigResponse { @JsonProperty("viewer_location_radius_km") private Double viewerLocationRadiusKm; + @Nullable + @JsonProperty("reaction_types") + private List reactionTypes; + @Nullable @JsonProperty("sort") private List sort; diff --git a/src/main/java/io/getstream/models/ActivitySelectorType.java b/src/main/java/io/getstream/models/ActivitySelectorType.java index 6babdd51..b4f292a0 100644 --- a/src/main/java/io/getstream/models/ActivitySelectorType.java +++ b/src/main/java/io/getstream/models/ActivitySelectorType.java @@ -19,6 +19,7 @@ private ActivitySelectorType() {} public static final String CURRENT_FEED = "current_feed"; public static final String FOLLOWING = "following"; public static final String FOLLOW_SUGGESTION = "follow_suggestion"; + public static final String FRIENDS_ENGAGED = "friends_engaged"; public static final String INTEREST = "interest"; public static final String POPULAR = "popular"; public static final String PROXIMITY = "proximity"; diff --git a/src/main/java/io/getstream/models/CallSettingsResponse.java b/src/main/java/io/getstream/models/CallSettingsResponse.java index 6eb31689..ffdc0691 100644 --- a/src/main/java/io/getstream/models/CallSettingsResponse.java +++ b/src/main/java/io/getstream/models/CallSettingsResponse.java @@ -13,6 +13,7 @@ package io.getstream.models; import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; import org.jetbrains.annotations.Nullable; @lombok.Data @@ -72,6 +73,10 @@ public class CallSettingsResponse { @JsonProperty("video") private VideoSettingsResponse video; + @Nullable + @JsonProperty("extra_opts") + private Map extraOpts; + @Nullable @JsonProperty("ingress") private IngressSettingsResponse ingress; diff --git a/src/main/java/io/getstream/models/ChannelTypeRuleResponse.java b/src/main/java/io/getstream/models/ChannelTypeRuleResponse.java new file mode 100644 index 00000000..9223f918 --- /dev/null +++ b/src/main/java/io/getstream/models/ChannelTypeRuleResponse.java @@ -0,0 +1,32 @@ +/* + * ======================================================================== + * 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 ChannelTypeRuleResponse { + + @JsonProperty("channel_type") + private String channelType; + + @JsonProperty("enabled_at") + private Date enabledAt; + + @JsonProperty("max_age_hours") + private Integer maxAgeHours; +} diff --git a/src/main/java/io/getstream/models/ConfigResponse.java b/src/main/java/io/getstream/models/ConfigResponse.java index ba6bb61b..51a136be 100644 --- a/src/main/java/io/getstream/models/ConfigResponse.java +++ b/src/main/java/io/getstream/models/ConfigResponse.java @@ -42,6 +42,10 @@ public class ConfigResponse { @JsonProperty("supported_video_call_harm_types") private List supportedVideoCallHarmTypes; + @Nullable + @JsonProperty("published_version") + private Integer publishedVersion; + @Nullable @JsonProperty("ai_image_label_definitions") private List aiImageLabelDefinitions; diff --git a/src/main/java/io/getstream/models/ConfigVersionResponse.java b/src/main/java/io/getstream/models/ConfigVersionResponse.java new file mode 100644 index 00000000..c26c5170 --- /dev/null +++ b/src/main/java/io/getstream/models/ConfigVersionResponse.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 ConfigVersionResponse { + + @JsonProperty("created_at") + private Date createdAt; + + @JsonProperty("created_by") + private String createdBy; + + @JsonProperty("published") + private Boolean published; + + @JsonProperty("version") + private Integer version; +} diff --git a/src/main/java/io/getstream/models/DeleteRetentionPolicyRequest.java b/src/main/java/io/getstream/models/DeleteRetentionPolicyRequest.java index 7da0e34b..b4506180 100644 --- a/src/main/java/io/getstream/models/DeleteRetentionPolicyRequest.java +++ b/src/main/java/io/getstream/models/DeleteRetentionPolicyRequest.java @@ -13,8 +13,13 @@ package io.getstream.models; import com.fasterxml.jackson.annotation.JsonProperty; +import org.jetbrains.annotations.Nullable; -/** Delete retention policy Removes a retention policy for the app. Server-side only. */ +/** + * Delete retention policy Removes a retention policy for the app. For the + * 'inactive-channels-by-type' policy, 'channel_type' selects the rule to remove. + * Server-side only. + */ @lombok.Data @lombok.Builder @lombok.NoArgsConstructor @@ -23,4 +28,8 @@ public class DeleteRetentionPolicyRequest { @JsonProperty("policy") private String policy; + + @Nullable + @JsonProperty("channel_type") + private String channelType; } diff --git a/src/main/java/io/getstream/models/ForYouConfig.java b/src/main/java/io/getstream/models/ForYouConfig.java index 54cb4807..92c4e50f 100644 --- a/src/main/java/io/getstream/models/ForYouConfig.java +++ b/src/main/java/io/getstream/models/ForYouConfig.java @@ -28,4 +28,12 @@ public class ForYouConfig { @Nullable @JsonProperty("preset") private String preset; + + @Nullable + @JsonProperty("dwell") + private ForYouDwellConfig dwell; + + @Nullable + @JsonProperty("exploration") + private ForYouExplorationConfig exploration; } diff --git a/src/main/java/io/getstream/models/ForYouDwellConfig.java b/src/main/java/io/getstream/models/ForYouDwellConfig.java new file mode 100644 index 00000000..ef10f95a --- /dev/null +++ b/src/main/java/io/getstream/models/ForYouDwellConfig.java @@ -0,0 +1,31 @@ +/* + * ======================================================================== + * 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 ForYouDwellConfig { + + @Nullable + @JsonProperty("enabled") + private Boolean enabled; + + @Nullable + @JsonProperty("threshold_ms") + private Integer thresholdMs; +} diff --git a/src/main/java/io/getstream/models/ForYouExplorationConfig.java b/src/main/java/io/getstream/models/ForYouExplorationConfig.java new file mode 100644 index 00000000..00dae682 --- /dev/null +++ b/src/main/java/io/getstream/models/ForYouExplorationConfig.java @@ -0,0 +1,31 @@ +/* + * ======================================================================== + * 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 ForYouExplorationConfig { + + @Nullable + @JsonProperty("enabled") + private Boolean enabled; + + @Nullable + @JsonProperty("slot") + private Integer slot; +} diff --git a/src/main/java/io/getstream/models/GetConfigVersionRequest.java b/src/main/java/io/getstream/models/GetConfigVersionRequest.java new file mode 100644 index 00000000..74a7f648 --- /dev/null +++ b/src/main/java/io/getstream/models/GetConfigVersionRequest.java @@ -0,0 +1,31 @@ +/* + * ======================================================================== + * 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.JsonIgnore; +import io.getstream.annotations.Query; + +/** + * Get moderation configuration version Retrieve the full moderation configuration stored in a + * specific version, whether or not it is published. + */ +@lombok.Data +@lombok.Builder +@lombok.NoArgsConstructor +@lombok.AllArgsConstructor +public class GetConfigVersionRequest { + + @Query("team") + @JsonIgnore + private String Team; +} diff --git a/src/main/java/io/getstream/models/GetConfigVersionResponse.java b/src/main/java/io/getstream/models/GetConfigVersionResponse.java new file mode 100644 index 00000000..949d4283 --- /dev/null +++ b/src/main/java/io/getstream/models/GetConfigVersionResponse.java @@ -0,0 +1,33 @@ +/* + * ======================================================================== + * 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 GetConfigVersionResponse { + + @JsonProperty("duration") + private String duration; + + @JsonProperty("version") + private ConfigVersionResponse version; + + @Nullable + @JsonProperty("config") + private ConfigResponse config; +} diff --git a/src/main/java/io/getstream/models/GetNotificationStatusRequest.java b/src/main/java/io/getstream/models/GetNotificationStatusRequest.java new file mode 100644 index 00000000..f2855fe5 --- /dev/null +++ b/src/main/java/io/getstream/models/GetNotificationStatusRequest.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.JsonIgnore; +import io.getstream.annotations.Query; + +/** + * Get notification status Returns the unread and unseen counts of a notification feed, along with + * the last seen and last read timestamps, without building a page. + */ +@lombok.Data +@lombok.Builder +@lombok.NoArgsConstructor +@lombok.AllArgsConstructor +public class GetNotificationStatusRequest { + + @Query("view") + @JsonIgnore + private String View; + + @Query("user_id") + @JsonIgnore + private String UserID; +} diff --git a/src/main/java/io/getstream/models/GetNotificationStatusResponse.java b/src/main/java/io/getstream/models/GetNotificationStatusResponse.java new file mode 100644 index 00000000..d04d1bc4 --- /dev/null +++ b/src/main/java/io/getstream/models/GetNotificationStatusResponse.java @@ -0,0 +1,41 @@ +/* + * ======================================================================== + * 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 GetNotificationStatusResponse { + + @JsonProperty("duration") + private String duration; + + @JsonProperty("unread") + private Integer unread; + + @JsonProperty("unseen") + private Integer unseen; + + @Nullable + @JsonProperty("last_read_at") + private Date lastReadAt; + + @Nullable + @JsonProperty("last_seen_at") + private Date lastSeenAt; +} diff --git a/src/main/java/io/getstream/models/GetOrCreateFeedResponse.java b/src/main/java/io/getstream/models/GetOrCreateFeedResponse.java index 12b2bf23..6a1ca017 100644 --- a/src/main/java/io/getstream/models/GetOrCreateFeedResponse.java +++ b/src/main/java/io/getstream/models/GetOrCreateFeedResponse.java @@ -57,6 +57,10 @@ public class GetOrCreateFeedResponse { @JsonProperty("prev") private String prev; + @Nullable + @JsonProperty("request_id") + private String requestID; + @Nullable @JsonProperty("degraded_selectors") private List degradedSelectors; diff --git a/src/main/java/io/getstream/models/GetRetentionPolicyRequest.java b/src/main/java/io/getstream/models/GetRetentionPolicyRequest.java index 11105b20..59f74247 100644 --- a/src/main/java/io/getstream/models/GetRetentionPolicyRequest.java +++ b/src/main/java/io/getstream/models/GetRetentionPolicyRequest.java @@ -12,7 +12,11 @@ */ package io.getstream.models; -/** Get retention policy Returns all retention policies configured for the app. Server-side only. */ +/** + * Get retention policy Returns all retention policies configured for the app. The per-channel-type + * rules of the 'inactive-channels-by-type' policy are returned in + * 'channel_type_rules' rather than in 'policies'. Server-side only. + */ @lombok.Data @lombok.Builder @lombok.NoArgsConstructor diff --git a/src/main/java/io/getstream/models/GetRetentionPolicyResponse.java b/src/main/java/io/getstream/models/GetRetentionPolicyResponse.java index 3e3710fc..0c1e4d4a 100644 --- a/src/main/java/io/getstream/models/GetRetentionPolicyResponse.java +++ b/src/main/java/io/getstream/models/GetRetentionPolicyResponse.java @@ -14,6 +14,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.List; +import org.jetbrains.annotations.Nullable; /** Basic response information */ @lombok.Data @@ -27,4 +28,8 @@ public class GetRetentionPolicyResponse { @JsonProperty("policies") private List policies; + + @Nullable + @JsonProperty("channel_type_rules") + private List channelTypeRules; } diff --git a/src/main/java/io/getstream/models/GetRetentionPolicyRunsRequest.java b/src/main/java/io/getstream/models/GetRetentionPolicyRunsRequest.java index c6a1bee9..47359695 100644 --- a/src/main/java/io/getstream/models/GetRetentionPolicyRunsRequest.java +++ b/src/main/java/io/getstream/models/GetRetentionPolicyRunsRequest.java @@ -20,7 +20,13 @@ /** * Get retention policy runs Returns filtered and sorted retention cleanup run history for the app. * Supports filter_conditions on 'policy' (possible values: 'old-messages', - * 'inactive-channels') and 'date' fields. Server-side only. + * 'inactive-channels', 'inactive-channels@type:<channel type>', + * 'inactive-channels@blanket:<channel type>') and 'date' fields. Once the app + * has a per-channel-type rule, inactive-channels runs are recorded per channel type, under + * 'inactive-channels@type:<channel type>' for a type with its own rule and + * 'inactive-channels@blanket:<channel type>' for a type covered by the app-wide rule, + * and 'policy': 'inactive-channels' no longer matches new runs; filter with + * '$in' over the pass names of your channel types. Server-side only. */ @lombok.Data @lombok.Builder diff --git a/src/main/java/io/getstream/models/ListConfigVersionsRequest.java b/src/main/java/io/getstream/models/ListConfigVersionsRequest.java new file mode 100644 index 00000000..0b48ebf3 --- /dev/null +++ b/src/main/java/io/getstream/models/ListConfigVersionsRequest.java @@ -0,0 +1,31 @@ +/* + * ======================================================================== + * 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.JsonIgnore; +import io.getstream.annotations.Query; + +/** + * List moderation configuration versions List the retained versions of a moderation configuration, + * newest first, and which one is published. + */ +@lombok.Data +@lombok.Builder +@lombok.NoArgsConstructor +@lombok.AllArgsConstructor +public class ListConfigVersionsRequest { + + @Query("team") + @JsonIgnore + private String Team; +} diff --git a/src/main/java/io/getstream/models/ListConfigVersionsResponse.java b/src/main/java/io/getstream/models/ListConfigVersionsResponse.java new file mode 100644 index 00000000..fea73a18 --- /dev/null +++ b/src/main/java/io/getstream/models/ListConfigVersionsResponse.java @@ -0,0 +1,34 @@ +/* + * ======================================================================== + * 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 ListConfigVersionsResponse { + + @JsonProperty("duration") + private String duration; + + @JsonProperty("versions") + private List versions; + + @Nullable + @JsonProperty("published_version") + private Integer publishedVersion; +} diff --git a/src/main/java/io/getstream/models/ListPolicyTestSetsRequest.java b/src/main/java/io/getstream/models/ListPolicyTestSetsRequest.java index 2c2e9db1..eefc9c32 100644 --- a/src/main/java/io/getstream/models/ListPolicyTestSetsRequest.java +++ b/src/main/java/io/getstream/models/ListPolicyTestSetsRequest.java @@ -12,8 +12,21 @@ */ package io.getstream.models; +import com.fasterxml.jackson.annotation.JsonIgnore; +import io.getstream.annotations.Query; + /** List policy test sets */ @lombok.Data @lombok.Builder @lombok.NoArgsConstructor -public class ListPolicyTestSetsRequest {} +@lombok.AllArgsConstructor +public class ListPolicyTestSetsRequest { + + @Query("limit") + @JsonIgnore + private Integer Limit; + + @Query("offset") + @JsonIgnore + private Integer Offset; +} diff --git a/src/main/java/io/getstream/models/ModerationCheckCompletedEvent.java b/src/main/java/io/getstream/models/ModerationCheckCompletedEvent.java index bb86693a..27e84f15 100644 --- a/src/main/java/io/getstream/models/ModerationCheckCompletedEvent.java +++ b/src/main/java/io/getstream/models/ModerationCheckCompletedEvent.java @@ -48,4 +48,8 @@ public class ModerationCheckCompletedEvent { @Nullable @JsonProperty("received_at") private Date receivedAt; + + @Nullable + @JsonProperty("moderation_payload") + private ModerationPayloadResponse moderationPayload; } diff --git a/src/main/java/io/getstream/models/ModerationConfig.java b/src/main/java/io/getstream/models/ModerationConfig.java index 4c17140c..3e57e6a3 100644 --- a/src/main/java/io/getstream/models/ModerationConfig.java +++ b/src/main/java/io/getstream/models/ModerationConfig.java @@ -35,6 +35,10 @@ public class ModerationConfig { @JsonProperty("key") private String key; + @Nullable + @JsonProperty("published_version") + private Integer publishedVersion; + @Nullable @JsonProperty("team") private String team; diff --git a/src/main/java/io/getstream/models/PublishConfigVersionRequest.java b/src/main/java/io/getstream/models/PublishConfigVersionRequest.java new file mode 100644 index 00000000..66e7b610 --- /dev/null +++ b/src/main/java/io/getstream/models/PublishConfigVersionRequest.java @@ -0,0 +1,39 @@ +/* + * ======================================================================== + * 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; + +/** + * Publish moderation configuration version Make a stored version the moderation configuration in + * effect. Publishing an older version reverts to it without creating a new version. + */ +@lombok.Data +@lombok.Builder +@lombok.NoArgsConstructor +@lombok.AllArgsConstructor +public class PublishConfigVersionRequest { + + @Nullable + @JsonProperty("team") + private String team; + + @Nullable + @JsonProperty("user_id") + private String userID; + + @Nullable + @JsonProperty("user") + private UserRequest user; +} diff --git a/src/main/java/io/getstream/models/PublishConfigVersionResponse.java b/src/main/java/io/getstream/models/PublishConfigVersionResponse.java new file mode 100644 index 00000000..cdc6b8e7 --- /dev/null +++ b/src/main/java/io/getstream/models/PublishConfigVersionResponse.java @@ -0,0 +1,30 @@ +/* + * ======================================================================== + * 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 PublishConfigVersionResponse { + + @JsonProperty("duration") + private String duration; + + @Nullable + @JsonProperty("config") + private ConfigResponse config; +} diff --git a/src/main/java/io/getstream/models/RetentionPolicyType.java b/src/main/java/io/getstream/models/RetentionPolicyType.java index a5bcfbe7..dd4cfc21 100644 --- a/src/main/java/io/getstream/models/RetentionPolicyType.java +++ b/src/main/java/io/getstream/models/RetentionPolicyType.java @@ -17,5 +17,6 @@ public final class RetentionPolicyType { private RetentionPolicyType() {} public static final String INACTIVE_CHANNELS = "inactive-channels"; + public static final String INACTIVE_CHANNELS_BY_TYPE = "inactive-channels-by-type"; public static final String OLD_MESSAGES = "old-messages"; } diff --git a/src/main/java/io/getstream/models/RetentionRunResponse.java b/src/main/java/io/getstream/models/RetentionRunResponse.java index 201b8d2f..dec07789 100644 --- a/src/main/java/io/getstream/models/RetentionRunResponse.java +++ b/src/main/java/io/getstream/models/RetentionRunResponse.java @@ -13,6 +13,7 @@ package io.getstream.models; import com.fasterxml.jackson.annotation.JsonProperty; +import org.jetbrains.annotations.Nullable; @lombok.Data @lombok.Builder @@ -31,4 +32,8 @@ public class RetentionRunResponse { @JsonProperty("stats") private RunStats stats; + + @Nullable + @JsonProperty("channel_type") + private String channelType; } diff --git a/src/main/java/io/getstream/models/SaveConfigVersionRequest.java b/src/main/java/io/getstream/models/SaveConfigVersionRequest.java new file mode 100644 index 00000000..3a8ac5b0 --- /dev/null +++ b/src/main/java/io/getstream/models/SaveConfigVersionRequest.java @@ -0,0 +1,121 @@ +/* + * ======================================================================== + * 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; + +/** + * Save moderation configuration version Save a moderation configuration as a new version without + * making it live. The version takes effect once it is published. + */ +@lombok.Data +@lombok.Builder +@lombok.NoArgsConstructor +@lombok.AllArgsConstructor +public class SaveConfigVersionRequest { + + @JsonProperty("base_version") + private Integer baseVersion; + + @JsonProperty("key") + private String key; + + @Nullable + @JsonProperty("async") + private Boolean async; + + @Nullable + @JsonProperty("team") + private String team; + + @Nullable + @JsonProperty("user_id") + private String userID; + + @Nullable + @JsonProperty("ai_audio_config") + private AIAudioConfigRequest aiAudioConfig; + + @Nullable + @JsonProperty("ai_image_config") + private AIImageConfig aiImageConfig; + + @Nullable + @JsonProperty("ai_text_config") + private AITextConfig aiTextConfig; + + @Nullable + @JsonProperty("ai_video_config") + private AIVideoConfigRequest aiVideoConfig; + + @Nullable + @JsonProperty("automod_platform_circumvention_config") + private AutomodPlatformCircumventionConfig automodPlatformCircumventionConfig; + + @Nullable + @JsonProperty("automod_semantic_filters_config") + private AutomodSemanticFiltersConfig automodSemanticFiltersConfig; + + @Nullable + @JsonProperty("automod_toxicity_config") + private AutomodToxicityConfig automodToxicityConfig; + + @Nullable + @JsonProperty("aws_rekognition_config") + private AIImageConfig awsRekognitionConfig; + + @Nullable + @JsonProperty("block_list_config") + private BlockListConfig blockListConfig; + + @Nullable + @JsonProperty("bodyguard_config") + private AITextConfig bodyguardConfig; + + @Nullable + @JsonProperty("engine") + private ModerationEngineConfigRequest engine; + + @Nullable + @JsonProperty("flood_config") + private FloodConfig floodConfig; + + @Nullable + @JsonProperty("google_vision_config") + private GoogleVisionConfig googleVisionConfig; + + @Nullable + @JsonProperty("intent_config") + private IntentConfigRequest intentConfig; + + @Nullable + @JsonProperty("llm_config") + private LLMConfig llmConfig; + + @Nullable + @JsonProperty("rule_builder_config") + private RuleBuilderConfig ruleBuilderConfig; + + @Nullable + @JsonProperty("user") + private UserRequest user; + + @Nullable + @JsonProperty("velocity_filter_config") + private VelocityFilterConfig velocityFilterConfig; + + @Nullable + @JsonProperty("video_call_rule_config") + private VideoCallRuleConfig videoCallRuleConfig; +} diff --git a/src/main/java/io/getstream/models/SaveConfigVersionResponse.java b/src/main/java/io/getstream/models/SaveConfigVersionResponse.java new file mode 100644 index 00000000..9e296240 --- /dev/null +++ b/src/main/java/io/getstream/models/SaveConfigVersionResponse.java @@ -0,0 +1,33 @@ +/* + * ======================================================================== + * 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 SaveConfigVersionResponse { + + @JsonProperty("duration") + private String duration; + + @JsonProperty("version") + private ConfigVersionResponse version; + + @Nullable + @JsonProperty("published_version") + private Integer publishedVersion; +} diff --git a/src/main/java/io/getstream/models/SearchAllChannelsSection.java b/src/main/java/io/getstream/models/SearchAllChannelsSection.java new file mode 100644 index 00000000..e948ab07 --- /dev/null +++ b/src/main/java/io/getstream/models/SearchAllChannelsSection.java @@ -0,0 +1,40 @@ +/* + * ======================================================================== + * 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 SearchAllChannelsSection { + + @Nullable + @JsonProperty("next") + private String next; + + @Nullable + @JsonProperty("channels") + private List channels; + + @Nullable + @JsonProperty("error") + private SearchAllSectionError error; + + @Nullable + @JsonProperty("warning") + private SearchAllWarning warning; +} diff --git a/src/main/java/io/getstream/models/SearchAllMessagesSection.java b/src/main/java/io/getstream/models/SearchAllMessagesSection.java new file mode 100644 index 00000000..b1a36bad --- /dev/null +++ b/src/main/java/io/getstream/models/SearchAllMessagesSection.java @@ -0,0 +1,44 @@ +/* + * ======================================================================== + * 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 SearchAllMessagesSection { + + @Nullable + @JsonProperty("next") + private String next; + + @Nullable + @JsonProperty("results") + private List results; + + @Nullable + @JsonProperty("error") + private SearchAllSectionError error; + + @Nullable + @JsonProperty("results_warning") + private SearchWarning resultsWarning; + + @Nullable + @JsonProperty("warning") + private SearchAllWarning warning; +} diff --git a/src/main/java/io/getstream/models/SearchAllRequest.java b/src/main/java/io/getstream/models/SearchAllRequest.java new file mode 100644 index 00000000..0a9e4a46 --- /dev/null +++ b/src/main/java/io/getstream/models/SearchAllRequest.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 java.util.List; +import java.util.Map; +import org.jetbrains.annotations.Nullable; + +/** + * Search messages, users, and channels Runs one free-text query across messages, users and channels + * and returns one envelope with a section per requested entity. The server picks the match + * operator, sort and scope for every section: messages are matched as full text in the channels the + * caller can read, users by name or username prefix, and channels by name prefix among the channels + * the caller is a member of. Each section carries its own opaque `next` cursor when more results + * exist; a section that fails is reported in its `error` field while the other sections return + * normally. + */ +@lombok.Data +@lombok.Builder +@lombok.NoArgsConstructor +@lombok.AllArgsConstructor +public class SearchAllRequest { + + @Nullable + @JsonProperty("limit") + private Integer limit; + + @Nullable + @JsonProperty("query") + private String query; + + @Nullable + @JsonProperty("entities") + private List entities; + + @Nullable + @JsonProperty("next") + private Map next; +} diff --git a/src/main/java/io/getstream/models/SearchAllResponse.java b/src/main/java/io/getstream/models/SearchAllResponse.java new file mode 100644 index 00000000..e19c52d4 --- /dev/null +++ b/src/main/java/io/getstream/models/SearchAllResponse.java @@ -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 org.jetbrains.annotations.Nullable; + +@lombok.Data +@lombok.Builder +@lombok.NoArgsConstructor +@lombok.AllArgsConstructor +public class SearchAllResponse { + + @JsonProperty("duration") + private String duration; + + @Nullable + @JsonProperty("channels") + private SearchAllChannelsSection channels; + + @Nullable + @JsonProperty("messages") + private SearchAllMessagesSection messages; + + @Nullable + @JsonProperty("users") + private SearchAllUsersSection users; +} diff --git a/src/main/java/io/getstream/models/SearchAllSectionError.java b/src/main/java/io/getstream/models/SearchAllSectionError.java new file mode 100644 index 00000000..a4d60d16 --- /dev/null +++ b/src/main/java/io/getstream/models/SearchAllSectionError.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; + +@lombok.Data +@lombok.Builder +@lombok.NoArgsConstructor +@lombok.AllArgsConstructor +public class SearchAllSectionError { + + @JsonProperty("code") + private String code; + + @JsonProperty("message") + private String message; +} diff --git a/src/main/java/io/getstream/models/SearchAllUsersSection.java b/src/main/java/io/getstream/models/SearchAllUsersSection.java new file mode 100644 index 00000000..69764a35 --- /dev/null +++ b/src/main/java/io/getstream/models/SearchAllUsersSection.java @@ -0,0 +1,40 @@ +/* + * ======================================================================== + * 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 SearchAllUsersSection { + + @Nullable + @JsonProperty("next") + private String next; + + @Nullable + @JsonProperty("users") + private List users; + + @Nullable + @JsonProperty("error") + private SearchAllSectionError error; + + @Nullable + @JsonProperty("warning") + private SearchAllWarning warning; +} diff --git a/src/main/java/io/getstream/models/SearchAllWarning.java b/src/main/java/io/getstream/models/SearchAllWarning.java new file mode 100644 index 00000000..293df498 --- /dev/null +++ b/src/main/java/io/getstream/models/SearchAllWarning.java @@ -0,0 +1,25 @@ +/* + * ======================================================================== + * 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; + +@lombok.Data +@lombok.Builder +@lombok.NoArgsConstructor +@lombok.AllArgsConstructor +public class SearchAllWarning { + + @JsonProperty("code") + private String code; +} diff --git a/src/main/java/io/getstream/models/SetRetentionPolicyRequest.java b/src/main/java/io/getstream/models/SetRetentionPolicyRequest.java index b560f606..a0b7a948 100644 --- a/src/main/java/io/getstream/models/SetRetentionPolicyRequest.java +++ b/src/main/java/io/getstream/models/SetRetentionPolicyRequest.java @@ -13,8 +13,14 @@ package io.getstream.models; import com.fasterxml.jackson.annotation.JsonProperty; +import org.jetbrains.annotations.Nullable; -/** Set retention policy Creates or updates a retention policy for the app. Server-side only. */ +/** + * Set retention policy Creates or updates a retention policy for the app. The + * 'inactive-channels-by-type' policy sets the 'max_age_hours' rule of the channel + * type given by 'channel_type', which overrides 'inactive-channels' for that type; + * its response carries the saved rule in 'channel_type_rule'. Server-side only. + */ @lombok.Data @lombok.Builder @lombok.NoArgsConstructor @@ -26,4 +32,8 @@ public class SetRetentionPolicyRequest { @JsonProperty("policy") private String policy; + + @Nullable + @JsonProperty("channel_type") + private String channelType; } diff --git a/src/main/java/io/getstream/models/SetRetentionPolicyResponse.java b/src/main/java/io/getstream/models/SetRetentionPolicyResponse.java index e44e338b..b86e6234 100644 --- a/src/main/java/io/getstream/models/SetRetentionPolicyResponse.java +++ b/src/main/java/io/getstream/models/SetRetentionPolicyResponse.java @@ -13,6 +13,7 @@ package io.getstream.models; import com.fasterxml.jackson.annotation.JsonProperty; +import org.jetbrains.annotations.Nullable; /** Basic response information */ @lombok.Data @@ -26,4 +27,8 @@ public class SetRetentionPolicyResponse { @JsonProperty("policy") private RetentionPolicy policy; + + @Nullable + @JsonProperty("channel_type_rule") + private ChannelTypeRuleResponse channelTypeRule; } diff --git a/src/main/java/io/getstream/models/TrackActivityMetricsEvent.java b/src/main/java/io/getstream/models/TrackActivityMetricsEvent.java index 2d8de174..5dd35c53 100644 --- a/src/main/java/io/getstream/models/TrackActivityMetricsEvent.java +++ b/src/main/java/io/getstream/models/TrackActivityMetricsEvent.java @@ -31,4 +31,16 @@ public class TrackActivityMetricsEvent { @Nullable @JsonProperty("delta") private Integer delta; + + @Nullable + @JsonProperty("dwell_ms") + private Integer dwellMs; + + @Nullable + @JsonProperty("position") + private Integer position; + + @Nullable + @JsonProperty("request_id") + private String requestID; } diff --git a/src/main/java/io/getstream/models/UnbanActionRequestPayload.java b/src/main/java/io/getstream/models/UnbanActionRequestPayload.java index 722dd8d8..a586953b 100644 --- a/src/main/java/io/getstream/models/UnbanActionRequestPayload.java +++ b/src/main/java/io/getstream/models/UnbanActionRequestPayload.java @@ -34,6 +34,10 @@ public class UnbanActionRequestPayload { @JsonProperty("remove_future_channels_ban") private Boolean removeFutureChannelsBan; + @Nullable + @JsonProperty("restore_shadowed_messages") + private Boolean restoreShadowedMessages; + @Nullable @JsonProperty("target_user_id") private String targetUserID; diff --git a/src/main/java/io/getstream/models/UserBannedEvent.java b/src/main/java/io/getstream/models/UserBannedEvent.java index 73a77c9c..1a646abb 100644 --- a/src/main/java/io/getstream/models/UserBannedEvent.java +++ b/src/main/java/io/getstream/models/UserBannedEvent.java @@ -39,6 +39,10 @@ public class UserBannedEvent { @JsonProperty("type") private String type; + @Nullable + @JsonProperty("ban_from_future_channels") + private Boolean banFromFutureChannels; + @Nullable @JsonProperty("channel_id") private String channelID; diff --git a/src/main/java/io/getstream/models/V2DeleteTemplateRequest.java b/src/main/java/io/getstream/models/V2DeleteTemplateRequest.java index ab0fa3f7..be80593b 100644 --- a/src/main/java/io/getstream/models/V2DeleteTemplateRequest.java +++ b/src/main/java/io/getstream/models/V2DeleteTemplateRequest.java @@ -12,8 +12,17 @@ */ package io.getstream.models; +import com.fasterxml.jackson.annotation.JsonIgnore; +import io.getstream.annotations.Query; + /** Delete a moderation template Delete a specific moderation template by its name */ @lombok.Data @lombok.Builder @lombok.NoArgsConstructor -public class V2DeleteTemplateRequest {} +@lombok.AllArgsConstructor +public class V2DeleteTemplateRequest { + + @Query("name") + @JsonIgnore + private String Name; +} diff --git a/src/main/java/io/getstream/services/Chat.java b/src/main/java/io/getstream/services/Chat.java index d9c998b3..6eb36608 100644 --- a/src/main/java/io/getstream/services/Chat.java +++ b/src/main/java/io/getstream/services/Chat.java @@ -686,6 +686,13 @@ public StreamRequest sendScheduledMessageNow(@N @NotNull public StreamRequest search() throws StreamException; + @NotNull + public StreamRequest searchAll(SearchAllRequest request) + throws StreamException; + + @NotNull + public StreamRequest searchAll() throws StreamException; + @NotNull public StreamRequest createSegment(CreateSegmentRequest request) throws StreamException; diff --git a/src/main/java/io/getstream/services/ChatImpl.java b/src/main/java/io/getstream/services/ChatImpl.java index 5ce0192b..a31755c1 100644 --- a/src/main/java/io/getstream/services/ChatImpl.java +++ b/src/main/java/io/getstream/services/ChatImpl.java @@ -1842,6 +1842,24 @@ public StreamRequest search() throws StreamException { return search(new SearchRequest()); } + @NotNull + public StreamRequest searchAll(SearchAllRequest request) + throws StreamException { + + return new StreamRequest( + client, + "POST", + "/api/v2/chat/search/all", + request, + null, + new TypeReference() {}); + } + + @NotNull + public StreamRequest searchAll() throws StreamException { + return searchAll(new SearchAllRequest()); + } + @NotNull public StreamRequest createSegment(CreateSegmentRequest request) throws StreamException { diff --git a/src/main/java/io/getstream/services/Feed.java b/src/main/java/io/getstream/services/Feed.java index 1fb918d9..31855191 100644 --- a/src/main/java/io/getstream/services/Feed.java +++ b/src/main/java/io/getstream/services/Feed.java @@ -133,6 +133,16 @@ public StreamResponse rejectFeedMemberInvite() return this.rejectFeedMemberInvite(new RejectFeedMemberInviteRequest()); } + public StreamResponse getNotificationStatus( + GetNotificationStatusRequest request) throws StreamException { + return service.getNotificationStatus(this.feedGroup, this.feedID, request).execute(); + } + + public StreamResponse getNotificationStatus() + throws StreamException { + return this.getNotificationStatus(new GetNotificationStatusRequest()); + } + public StreamResponse queryPinnedActivities( QueryPinnedActivitiesRequest request) throws StreamException { return service.queryPinnedActivities(this.feedGroup, this.feedID, request).execute(); diff --git a/src/main/java/io/getstream/services/Feeds.java b/src/main/java/io/getstream/services/Feeds.java index 6b9f2aca..4172535c 100644 --- a/src/main/java/io/getstream/services/Feeds.java +++ b/src/main/java/io/getstream/services/Feeds.java @@ -508,6 +508,15 @@ public StreamRequest rejectFeedMemberInvite( public StreamRequest rejectFeedMemberInvite( @NotNull String feedGroupID, @NotNull String feedID) throws StreamException; + @NotNull + public StreamRequest getNotificationStatus( + @NotNull String feedGroupID, @NotNull String feedID, GetNotificationStatusRequest request) + throws StreamException; + + @NotNull + public StreamRequest getNotificationStatus( + @NotNull String feedGroupID, @NotNull String feedID) throws StreamException; + @NotNull public StreamRequest queryPinnedActivities( @NotNull String feedGroupID, @NotNull String feedID, QueryPinnedActivitiesRequest request) diff --git a/src/main/java/io/getstream/services/FeedsImpl.java b/src/main/java/io/getstream/services/FeedsImpl.java index 3a96ce6b..08803d12 100644 --- a/src/main/java/io/getstream/services/FeedsImpl.java +++ b/src/main/java/io/getstream/services/FeedsImpl.java @@ -1327,6 +1327,30 @@ public StreamRequest rejectFeedMemberInvite( return rejectFeedMemberInvite(feedGroupID, feedID, new RejectFeedMemberInviteRequest()); } + @NotNull + public StreamRequest getNotificationStatus( + @NotNull String feedGroupID, @NotNull String feedID, GetNotificationStatusRequest request) + throws StreamException { + var pathParams = + Map.of( + "feed_group_id", feedGroupID, + "feed_id", feedID); + + return new StreamRequest( + client, + "GET", + "/api/v2/feeds/feed_groups/{feed_group_id}/feeds/{feed_id}/notification_status", + request, + pathParams, + new TypeReference() {}); + } + + @NotNull + public StreamRequest getNotificationStatus( + @NotNull String feedGroupID, @NotNull String feedID) throws StreamException { + return getNotificationStatus(feedGroupID, feedID, new GetNotificationStatusRequest()); + } + @NotNull public StreamRequest queryPinnedActivities( @NotNull String feedGroupID, @NotNull String feedID, QueryPinnedActivitiesRequest request) diff --git a/src/main/java/io/getstream/services/Moderation.java b/src/main/java/io/getstream/services/Moderation.java index 9183308a..c5259e68 100644 --- a/src/main/java/io/getstream/services/Moderation.java +++ b/src/main/java/io/getstream/services/Moderation.java @@ -104,6 +104,10 @@ public StreamRequest checkS3Access(CheckS3AccessRequest r public StreamRequest upsertConfig(UpsertConfigRequest request) throws StreamException; + @NotNull + public StreamRequest saveConfigVersion( + SaveConfigVersionRequest request) throws StreamException; + @NotNull public StreamRequest deleteConfig( @NotNull String key, DeleteConfigRequest request) throws StreamException; @@ -119,6 +123,32 @@ public StreamRequest getConfig(@NotNull String key, GetConfig @NotNull public StreamRequest getConfig(@NotNull String key) throws StreamException; + @NotNull + public StreamRequest listConfigVersions( + @NotNull String key, ListConfigVersionsRequest request) throws StreamException; + + @NotNull + public StreamRequest listConfigVersions(@NotNull String key) + throws StreamException; + + @NotNull + public StreamRequest getConfigVersion( + @NotNull String key, @NotNull Integer version, GetConfigVersionRequest request) + throws StreamException; + + @NotNull + public StreamRequest getConfigVersion( + @NotNull String key, @NotNull Integer version) throws StreamException; + + @NotNull + public StreamRequest publishConfigVersion( + @NotNull String key, @NotNull Integer version, PublishConfigVersionRequest request) + throws StreamException; + + @NotNull + public StreamRequest publishConfigVersion( + @NotNull String key, @NotNull Integer version) throws StreamException; + @NotNull public StreamRequest queryModerationConfigs( QueryModerationConfigsRequest request) throws StreamException; diff --git a/src/main/java/io/getstream/services/ModerationImpl.java b/src/main/java/io/getstream/services/ModerationImpl.java index 6d079692..caa9b85b 100644 --- a/src/main/java/io/getstream/services/ModerationImpl.java +++ b/src/main/java/io/getstream/services/ModerationImpl.java @@ -276,6 +276,19 @@ public StreamRequest upsertConfig(UpsertConfigRequest requ new TypeReference() {}); } + @NotNull + public StreamRequest saveConfigVersion( + SaveConfigVersionRequest request) throws StreamException { + + return new StreamRequest( + client, + "POST", + "/api/v2/moderation/config/versions", + request, + null, + new TypeReference() {}); + } + @NotNull public StreamRequest deleteConfig( @NotNull String key, DeleteConfigRequest request) throws StreamException { @@ -315,6 +328,68 @@ public StreamRequest getConfig(@NotNull String key) throws St return getConfig(key, new GetConfigRequest()); } + @NotNull + public StreamRequest listConfigVersions( + @NotNull String key, ListConfigVersionsRequest request) throws StreamException { + var pathParams = Map.of("key", key); + + return new StreamRequest( + client, + "GET", + "/api/v2/moderation/config/{key}/versions", + request, + pathParams, + new TypeReference() {}); + } + + @NotNull + public StreamRequest listConfigVersions(@NotNull String key) + throws StreamException { + return listConfigVersions(key, new ListConfigVersionsRequest()); + } + + @NotNull + public StreamRequest getConfigVersion( + @NotNull String key, @NotNull Integer version, GetConfigVersionRequest request) + throws StreamException { + var pathParams = Map.of("key", key, "version", String.valueOf(version)); + + return new StreamRequest( + client, + "GET", + "/api/v2/moderation/config/{key}/versions/{version}", + request, + pathParams, + new TypeReference() {}); + } + + @NotNull + public StreamRequest getConfigVersion( + @NotNull String key, @NotNull Integer version) throws StreamException { + return getConfigVersion(key, version, new GetConfigVersionRequest()); + } + + @NotNull + public StreamRequest publishConfigVersion( + @NotNull String key, @NotNull Integer version, PublishConfigVersionRequest request) + throws StreamException { + var pathParams = Map.of("key", key, "version", String.valueOf(version)); + + return new StreamRequest( + client, + "POST", + "/api/v2/moderation/config/{key}/versions/{version}/publish", + request, + pathParams, + new TypeReference() {}); + } + + @NotNull + public StreamRequest publishConfigVersion( + @NotNull String key, @NotNull Integer version) throws StreamException { + return publishConfigVersion(key, version, new PublishConfigVersionRequest()); + } + @NotNull public StreamRequest queryModerationConfigs( QueryModerationConfigsRequest request) throws StreamException {