Add optional hub field to Newsroom type#404
Merged
JesseWynants merged 2 commits intomasterfrom Apr 22, 2026
Merged
Conversation
Mirrors the additive `hub` field introduced by prezly/prezly#18567, which exposes the parent HUB and active siblings (each with `cultures`) on child-newsroom API responses so themes can render cross-site language pickers. Field is marked optional so the SDK release is not gated on backend deploy order.
e1himself
approved these changes
Apr 22, 2026
…ltures - `hub` is always present on the API response (null when no parent HUB), so the field should not be optional. - HubPeer `cultures` entries include an extra `is_default: boolean` not present on the base `CultureRef`.
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.

Summary
hubfield to theNewsroomtype, mirroring the additive field introduced by prezly/prezly#18567.hub.parentandhub.siblings[](each aNewsroomRef+cultures) so theme/consumer code can render cross-site language pickers on HUB child newsrooms.Newsroom.HubPeerinterface captures the shape used for parent/siblings.Backend shape
hub: nullfor standalone newsrooms and HUB parentshub: { parent, siblings }for HUB childrenRelease coordination
Field is typed as optional (
hub?:) on purpose — this lets us merge and release the SDK independently of the backend PR's deploy order without handing consumers a type that lies about runtime shape. Once the backend is live everywhere, we can drop the?in a follow-up.Test plan
tsc --noEmitpassesnewsroom.hubon a real HUB child