Skip to content

Add Moderation API and stable response types#14

Merged
winrid merged 8 commits into
mainfrom
regen-moderation-api
Jun 19, 2026
Merged

Add Moderation API and stable response types#14
winrid merged 8 commits into
mainfrom
regen-moderation-api

Conversation

@winrid

@winrid winrid commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Moderation API

Adds a Moderation API with methods for the moderator dashboard:

  • Comments — list, count, fetch by id(s) and children, get/set comment text, logs, export, search (users / pages / sites / comments), suggestions
  • Moderation actions — remove / restore, flag / un-flag, set review / spam / approval status, adjust / cast / delete votes, reopen / close thread
  • Bans — ban from comment, undo ban, pre-ban and bulk pre-ban summaries, comment ban status, ban preferences, banned-user counts and lookup
  • Badges & trust — award / remove badge, manual badges, get / set trust factor, user internal profile

All Moderation methods accept an sso parameter for SSO-authenticated moderators.

Response types (breaking)

Each method now returns its success response type directly, with errors surfaced as a default error response, instead of the previous combined success-or-error return type. The response type names are now stable. Response shapes are unchanged.

Recommend a major version bump.

Regenerated the Java client from the updated OpenAPI spec.

- New Moderation API (ModerationApi): 43 moderator-dashboard endpoints
  covering comment moderation, bans, badges, trust factor, and search.
  All accept an sso query param.
- BREAKING: each operation now returns its success type directly; APIError
  is a default error response rather than part of a union wrapper type.
  Response shapes are unchanged.
@winrid winrid changed the title Regenerate SDK: add Moderation API + stable response types Add Moderation API and stable response types Jun 19, 2026
winrid added 7 commits June 18, 2026 22:12
build.gradle now produced correctly by the generator (Gradle 9 java{} block,
mainClass, spotless 8.4, junit-platform-launcher) instead of being patched
post-generation. update.sh downloads the generator jar and no longer seds the
generated output.
The client module's generated tests are empty stubs; add hand-written SSOTest
(token/hash generation) and SSOIntegrationTest (live create+fetch via secure SSO)
in the core module, and point CI at core. Also fix a Gradle 9 plugin-ordering
error in the hand-written core/pubsub build.gradle (java plugin applied before
its DSL is used).
@winrid
winrid merged commit 54bb578 into main Jun 19, 2026
1 check 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.

1 participant