Skip to content

feat: [CHA-5981] regenerate client from openapi-v240.7.1 - #124

Merged
nijeesh-stream merged 2 commits into
mainfrom
feat/cha-5981-retention-channel-type
Nov 9, 2026
Merged

nijeesh-stream merged 2 commits into
mainfrom
feat/cha-5981-retention-channel-type

Conversation

@nijeesh-stream

@nijeesh-stream nijeesh-stream commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

TLDR

Adds per-channel-type retention rules to the Java SDK. The API supports channel_type on retention policies since chat v240.5.1, but 11.1.0 was generated from openapi-v240.2.1, so Java users can't set it yet. Additive only, so this is a minor.

Ticket

CHA-5981

Solution

Regenerated with chat's generator from chat tag v240.7.1 (published as protocol openapi-v240.7.1), following generate.sh step by step, then spotlessApply.

Retention changes:

  • SetRetentionPolicyRequest and DeleteRetentionPolicyRequest gain optional channelType.
  • SetRetentionPolicyResponse gains channelTypeRule, GetRetentionPolicyResponse gains channelTypeRules, new ChannelTypeRuleResponse.
  • RetentionPolicyType.INACTIVE_CHANNELS_BY_TYPE.
  • RetentionRunResponse gains channelType.

Other spec changes since openapi-v240.2.1, also additive: searchAll, Feeds config versions (get/list/save/publishConfigVersion), getNotificationStatus, For You feed config fields, moderation event fields. ListPolicyTestSetsRequest and V2DeleteTemplateRequest were empty classes and now carry fields.

No removed classes, no changed method signatures.

client.chat().setRetentionPolicy(SetRetentionPolicyRequest.builder()
    .policy(RetentionPolicyType.INACTIVE_CHANNELS_BY_TYPE)
    .channelType("trip")
    .maxAgeHours(720)
    .build()).execute();

How to verify

  1. CI: ./gradlew spotlessCheck build. Not built locally (the toolchain needs JDK 21, not installed here); spotlessApply ran clean.
  2. Diff is generator output only: 51 files, 30 modified and 21 new.

🤖 Generated with Claude Code


Note

Low Risk
Generated-only, backward-compatible additions with no removed APIs or changed method signatures.

Overview
Regenerates the Java SDK from openapi-v240.7.1, adding API surface that was missing since the prior v240.2.1 generation. Changes are additive (new optional fields, new types, new methods); existing method signatures are unchanged.

Retention gains per-channel-type inactive channel rules: optional channel_type on set/delete requests, channel_type_rules / channel_type_rule on get/set responses, RetentionPolicyType.INACTIVE_CHANNELS_BY_TYPE, and channel_type on retention run records.

Chat adds searchAll (POST /api/v2/chat/search/all) with request/response section models for unified message/user/channel search.

Moderation adds config versioning: saveConfigVersion, listConfigVersions, getConfigVersion, and publishConfigVersion, plus published_version on config models.

Feeds adds getNotificationStatus on feed instances; feed models pick up friends_engaged selector options, For You dwell/exploration config, activity position / metrics fields, and related selector constants.

Smaller spec syncs include call extra_opts, ban/unban flags, moderation event payload fields, and query params on previously empty request DTOs (ListPolicyTestSetsRequest, V2DeleteTemplateRequest).

Reviewed by Cursor Bugbot for commit 25a4259. Bugbot is set up for automated code reviews on this repo. Configure here.

BEGIN_COMMIT_OVERRIDE
feat: add searchAll

feat: add getConfigVersion, listConfigVersions, saveConfigVersion and publishConfigVersion

feat: add getNotificationStatus

feat: add channel_type to SetRetentionPolicyRequest and DeleteRetentionPolicyRequest

feat: add channel_type_rule to SetRetentionPolicyResponse and channel_type_rules to GetRetentionPolicyResponse

feat: add channel_type to RetentionRunResponse

feat: add inactive-channels-by-type to RetentionPolicyType

feat: add limit and offset to ListPolicyTestSets

feat: add name to V2DeleteTemplate

feat: add friend_type, max_friends, min_friends and reaction_types to ActivitySelectorConfig and ActivitySelectorConfigResponse

feat: add friends_engaged to ActivitySelectorType

feat: add dwell and exploration to ForYouConfig

feat: add position to ActivityResponse

feat: add dwell_ms, position and request_id to TrackActivityMetricsEvent

feat: add request_id to GetOrCreateFeedResponse

feat: add published_version to ConfigResponse and ModerationConfig

feat: add extra_opts to CallSettingsResponse

feat: add moderation_payload to ModerationCheckCompletedEvent

feat: add restore_shadowed_messages to UnbanActionRequestPayload

feat: add ban_from_future_channels to UserBannedEvent
END_COMMIT_OVERRIDE

nijeesh-stream and others added 2 commits November 9, 2026 14:40
Adds per-channel-type retention rules: channelType on
SetRetentionPolicyRequest and DeleteRetentionPolicyRequest,
channelTypeRule / channelTypeRules on the set and get responses,
ChannelTypeRuleResponse and RetentionPolicyType.INACTIVE_CHANNELS_BY_TYPE.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
getConfigVersion and publishConfigVersion are the first endpoints with
an integer path parameter; Map.of mixed String and Integer values and
did not compile against StreamRequest's Map<String, String>.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nijeesh-stream
nijeesh-stream merged commit 2e96d7e into main Nov 9, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants