Repository navigation
feat!: [CHA-5933] add scheduled messages - #117
Open
nijeesh-stream wants to merge 1 commit into
Open
nijeesh-stream wants to merge 1 commit into
nijeesh-stream wants to merge 1 commit into
Conversation
Regenerate from chat master 39c07c8b1ce1a145a754e883721796c66467f313, add the MultipartRequest marker the generator now emits on upload requests, and cover the scheduled message endpoints with an integration test. The regen drops IntentBufferedItem and IntentDetectedEvent and the old intent fields on CheckResponse and IntentTopicRequest/Response, which are no longer in the spec. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TLDR
Adds Chat scheduled messages to the SDK.
SendMessageRequest.scheduledAtstores the message to send later; the response then carriesscheduledMessageand nothing is posted to the channel. Four newChatmethods manage pending messages:queryScheduledMessages,updateScheduledMessage,sendScheduledMessageNowanddeleteScheduledMessage. This is a regeneration from the backend spec plus one integration test. The SDK was behind chatmaster, so the regen also picks up other API changes, listed below. Some are breaking: the moderation "intent" classes and fields are removed, hencefeat!.Risk: merge this only after backend CHA-5924 is deployed. Older backends ignore
scheduled_atand send the message immediately.Ticket
Summary
Generated from protocol release
openapi-v239.72.0(chatv239.72.0). Merge after backend CHA-5924 is deployed, because older backends ignorescheduled_atand send immediately.The first version of this PR was generated from a local spec at chat master
39c07c8b. Regenerating from the release produced no file changes. In the other six SDKs the regen changed only twostatusdoc comments (GetStream/chat#18730), and the Java models don't carry field descriptions. The head commit therefore already matchesopenapi-v239.72.0.generate.shran with../chatchecked out at tagv239.72.0. Itsmake openapioutput is byte-identical to the protocol release spec. The script runsgenerate-client --language java,generate-webhook-fixtures, theCallParticipantfix and./gradlew clean spotlessApply build -x test. Locally the Gradle step needed a Java 21 toolchain passed with-Porg.gradle.java.installations.paths.This overlaps with the open regen in #116 (generated from an older chat master). Whichever merges second will rebase to a near-empty diff.
Scheduled messages (backend: GetStream/chat#18596, #18597, #18655, #18656)
SendMessageRequest.scheduledAt/SendMessageResponse.scheduledMessageChat.queryScheduledMessages(POST /api/v2/chat/scheduled_messages/query). Server-side calls needuserID.Chat.updateScheduledMessage(PATCH /api/v2/chat/scheduled_messages/{id})Chat.sendScheduledMessageNow(POST /api/v2/chat/scheduled_messages/{id}/send_now)Chat.deleteScheduledMessage(DELETE /api/v2/chat/scheduled_messages/{id})ChannelStateResponse.scheduledMessages, theScheduledMessage*models, and thescheduled_message.sent/scheduled_message.failedwebhook events inWebhookScheduled messages are off by default per app; Stream enables them. The new
ChatScheduledMessageIntegrationTestschedules a message, then queries, updates, sends now and deletes. It skips itself through JUnitAssumptionswhen the app returns error 114 (feature disabled) or the backend ignoresscheduled_at, so those 4 tests show as skipped until the test app has the feature. Locally against a chatmasterserver with the feature on, all 4 pass with none skipped.Hand-written addition required to compile
services/framework/MultipartRequest.javais an empty marker interface. Since GetStream/chat#17967 (CHA-5084), the generator addsimplements io.getstream.services.framework.MultipartRequestto the four upload request models. No SDK PR has added that interface yet, so any regen from current chat master fails to compile without it.StreamRequeststill encodes each upload type explicitly, so upload behaviour is unchanged. Moving it to a generic encoder is CHA-5084's own follow-up.Unrelated changes picked up since the last release
Breaking (removed or changed):
IntentDetectedEventandIntentBufferedItemare removed, along withWebhook.MODERATION_INTENT_DETECTED.CheckResponse:intentMatchedTopic,intentScore,intentScoreThresholdandintentWouldFireare removed.intentScores(List<IntentScoreResponse>) replaces them.IntentTopicRequest/IntentTopicResponse:analysisCooldownSeconds,enabled,maxCapturedItems,refireCooldownSecondsandscoreThresholdare removed. Intent now lives in rule-builder conditions (RuleBuilderCondition.intentRuleParams).GetFeedsRetentionPolicyResponse.policiesandSetFeedsRetentionPolicyResponse.policychange fromRetentionPolicyto the newFeedsRetentionPolicy.Additive:
queryChannelBansand theChannelBan*modelscooldownRemainingMsonAPIErrorandChannelStateResponseGroupedQueryChannelsRequest.sortand groupfilterConditionsAppResponseFields.defaultsBanRequest.banFromFutureChannels/deleteReactionsconfigKey/configTeamon the poll write requestsEventHook.gcpPubsub*andcheckGCPPubSubCallSettings*.lifecycleandClientEvent.leaveReason/leaveInitiatorqueryCallRingAttemptsand thecall.ring_settledeventcommentFeedbackand thefeeds.comment.feedbackeventskipExistingon add/upsert activitiesasync/taskIDon the batch follow/unfollow callsincludeGroupCountsonqueryFollowsrankingConfig,RankingConfig.excludeBelowanddegradedSelectorsActivitySelectorConfig.timeBudgetMshiddenon comment responses andparentIDon notification commentsfeedGroupson retention policiesllmModel/llmReasoningEffortdeletePoll*review actionsReviewQueueItemResponse.poll/countryCodeContentCountryCodeParametersandUserChannelBanCountRuleParametersexport.label_results.*eventsAIAudioConfig*.llmConfig/aiTextConfigChecklist
./gradlew build,testandspotlessCheckpass locally (JDK 21)BEGIN_COMMIT_OVERRIDE
feat!: [CHA-5933] add scheduled messages:
scheduledAtonsendMessage, andqueryScheduledMessages,updateScheduledMessage,sendScheduledMessageNow,deleteScheduledMessagefeat!: remove
IntentDetectedEvent,IntentBufferedItemand the old intent fields onCheckResponseandIntentTopicRequest/IntentTopicResponsefeat: add
queryChannelBans,checkGCPPubSub,commentFeedback,queryCallRingAttempts, call lifecycle settings and poll webhook eventsEND_COMMIT_OVERRIDE
🤖 Generated with Claude Code