Skip to content

[CHA-1578] refactor: code generated from openapi specs#71

Open
mogita wants to merge 47 commits intomainfrom
cha-1578_openapi-refactor-codegen
Open

[CHA-1578] refactor: code generated from openapi specs#71
mogita wants to merge 47 commits intomainfrom
cha-1578_openapi-refactor-codegen

Conversation

@mogita
Copy link

@mogita mogita commented Dec 16, 2025

Submit a pull request

CLA

  • I have signed the Stream CLA (required).
  • The code changes follow best practices
  • Code changes are tested (add some information if not applicable)

Description of the pull request


Note

Medium Risk
Medium risk due to potentially breaking SDK surface changes (renamed methods and changed response types) plus broad new integration coverage and increased test parallelism/timeouts that may surface CI flakiness or rate-limit issues.

Overview
Updates generated SDK code to match latest OpenAPI specs, including a bug fix passing callType/callID to Call.GetCallParticipantSessionMetrics and several Chat API signature adjustments (e.g., ScheduleCampaign renamed to StopCampaign, and message action/commit/translate/undelete now return more specific response types).

Adds new API capabilities: Chat.QueryTeamUsageStats, a full set of user group endpoints on the root Client (List/Create/Search/Get/Update/Delete + member add/remove), and new Feeds endpoints for UpdateActivitiesPartialBatch, QueryPinnedActivities, and RestoreFeedGroup; also removes the generated Chat.ChannelBatchUpdate.

Expands coverage substantially with new Chat-focused integration tests (channels, messages, polls, reactions, users, user groups, webhooks, misc), adds an HTTP 429-retrying test client, and tweaks CI/dev workflow: pre-commit lint hook + make setup-hooks, and CI go test now runs with higher parallelism and a longer timeout.

Written by Cursor Bugbot for commit 947d49c. This will update automatically on new commits. Configure here.

Copilot AI review requested due to automatic review settings December 16, 2025 07:08
@mogita mogita requested a review from tbarbugli as a code owner December 16, 2025 07:08
@mogita mogita had a problem deploying to feeds-enabled-shard December 16, 2025 07:08 — with GitHub Actions Failure
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR represents a comprehensive refactoring of the GetStream SDK, with code regenerated from refactored OpenAPI specifications. The changes primarily focus on improving type consistency, documentation, and API design across the feeds, chat, and video domains.

Key Changes

  • Type System Refactoring: Separation of request/response types with consistent naming patterns (e.g., *Request, *Response, *Payload suffixes)
  • Model Consolidation: Removal of duplicate or deprecated types (e.g., Channel, Message, User, Poll, Ban replaced with dedicated response types)
  • API Method Updates: Renamed batch operations methods (OwnCapabilitiesBatchOwnBatch) and added new delete operations
  • Enhanced Documentation: Added comprehensive comments to events, request types, and response types

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
requests.go Renamed request types with consistent *Request and *Payload suffixes; added new fields and types for batch operations
models.go Major refactoring: removed ~30 deprecated types, added ~50 new response types, enhanced event documentation, separated feeds/chat reaction types
feeds.go Minor change with an unprofessional comment that needs removal
feeds-v3.go Renamed OwnCapabilitiesBatch to OwnBatch, added DeleteFeedsBatch, updated DeleteFeedUserData endpoint from DELETE to POST
feeds_test.go Updated tests to match renamed methods and added new test for DeleteFeedsBatch
common_test.go Removed test skip statements for upload tests
chat_test.go Removed test skip statements for upload tests
chat.go Minor documentation update (duplicate event comment)
call.go Reformatted imports to use grouped style

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mogita mogita had a problem deploying to feeds-enabled-shard December 16, 2025 07:36 — with GitHub Actions Failure
@mogita mogita had a problem deploying to feeds-enabled-shard December 16, 2025 07:44 — with GitHub Actions Failure
@mogita mogita temporarily deployed to feeds-enabled-shard December 16, 2025 08:30 — with GitHub Actions Inactive
@mogita mogita temporarily deployed to feeds-enabled-shard January 11, 2026 15:38 — with GitHub Actions Inactive
@mogita mogita temporarily deployed to feeds-enabled-shard January 12, 2026 09:46 — with GitHub Actions Inactive
@mogita mogita force-pushed the cha-1578_openapi-refactor-codegen branch from 89c3330 to 05dad50 Compare February 13, 2026 11:06
@mogita mogita had a problem deploying to feeds-enabled-shard February 13, 2026 11:06 — with GitHub Actions Failure
@mogita mogita temporarily deployed to feeds-enabled-shard February 13, 2026 11:25 — with GitHub Actions Inactive
@mogita mogita changed the title refactor: code generated from refactored openapi specs [CHA-1578] refactor: code generated from openapi specs Feb 16, 2026
@mogita mogita had a problem deploying to feeds-enabled-shard February 17, 2026 13:03 — with GitHub Actions Failure
@mogita mogita had a problem deploying to feeds-enabled-shard February 17, 2026 13:06 — with GitHub Actions Failure
@mogita mogita temporarily deployed to feeds-enabled-shard February 17, 2026 13:15 — with GitHub Actions Inactive
Daksh and others added 6 commits February 19, 2026 12:49
- GetReplies: pass empty Sort slice to avoid nil→"null" serialization
- DeleteChannelType: sleep 6s + retry 5x (matching stream-chat-go)
- QueryThreads: filter by channel_cid, fix CreatedByUserID assertion
- UpdateApp: toggle EnforceUniqueUsernames instead of WebhookUrl
- CreateGuest: handle disabled guest access with early return

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…issions, export, and more

Tests cover: bans (global + channel), user mutes (with/without timeout),
channel mutes, flagging (v2 moderation API), roles/permissions CRUD,
channel export with async task, custom events, user restore after soft
delete, member partial update, pending messages, and message history.
All assertions match stream-chat-go test patterns.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Messages need time to be indexed before they can be fetched in batch.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mogita mogita temporarily deployed to feeds-enabled-shard February 19, 2026 14:45 — with GitHub Actions Inactive
Daksh and others added 2 commits February 23, 2026 10:02
Add comprehensive integration tests matching every implementable test from
stream-chat-go, covering channels, messages, users, polls, bans, mutes,
flags, permissions, threads, event hooks, delivery receipts, reminders,
live location, shadow bans, and more. Also documents 7 codegen gaps where
APIs exist in stream-chat-go but not in the generated SDK.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…te, and permission tests

- Regenerate all SDK files from chat backend with Ignore/Beta/ClientSideOnly
  flags removed (branch feature/cha-0-remove-openapi-ignore-flags)
- New SDK methods: ChannelBatchUpdate, CreateDraft, QueryDrafts, QueryFlagReports,
  FlagReportReview, QueryTeamUsageStats, CreatePermission
- Add TestChatDraftsIntegration (5 subtests: CRUD, thread, query, pagination)
- Add TestChatChannelBatchUpdateIntegration (3 subtests: AddMembers,
  RemoveMembers, Archive) matching stream-chat-go polling/verification pattern
- Add TestChatCreatePermissionIntegration (ListAndGetPermission passing,
  CreatePermission skipped due to codegen bug with path tag)
- Fix multipart upload for UploadChannelFile/Image requests
- Fix UndeleteMessageRequest usage after struct change (UndeletedBy field)
- Update CODEGEN_GAPS.md documenting remaining codegen bugs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mogita mogita had a problem deploying to feeds-enabled-shard February 24, 2026 20:06 — with GitHub Actions Failure
@mogita mogita had a problem deploying to feeds-enabled-shard February 25, 2026 09:48 — with GitHub Actions Failure
@mogita mogita had a problem deploying to feeds-enabled-shard February 25, 2026 11:03 — with GitHub Actions Failure
@mogita mogita had a problem deploying to feeds-enabled-shard February 25, 2026 12:39 — with GitHub Actions Failure
@mogita mogita had a problem deploying to feeds-enabled-shard February 25, 2026 12:57 — with GitHub Actions Failure
@mogita mogita temporarily deployed to feeds-enabled-shard February 25, 2026 13:17 — with GitHub Actions Inactive
@mogita mogita had a problem deploying to feeds-enabled-shard February 25, 2026 14:22 — with GitHub Actions Failure
@mogita mogita had a problem deploying to feeds-enabled-shard February 25, 2026 14:30 — with GitHub Actions Failure
@mogita mogita had a problem deploying to feeds-enabled-shard February 25, 2026 14:41 — with GitHub Actions Failure
@mogita mogita had a problem deploying to feeds-enabled-shard February 25, 2026 14:54 — with GitHub Actions Failure
@mogita mogita had a problem deploying to feeds-enabled-shard February 25, 2026 16:02 — with GitHub Actions Failure
@mogita mogita temporarily deployed to feeds-enabled-shard February 25, 2026 17:00 — with GitHub Actions Inactive
@mogita mogita deployed to feeds-enabled-shard February 26, 2026 09:21 — with GitHub Actions Active
@mogita mogita had a problem deploying to feeds-enabled-shard February 26, 2026 09:39 — with GitHub Actions Failure
@mogita mogita had a problem deploying to feeds-enabled-shard February 26, 2026 10:07 — with GitHub Actions Failure
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.

3 participants