SCAL-325540 Expose host event payload/response contracts - #600
Open
yinstardev wants to merge 1 commit into
Open
Conversation
Contributor
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
commit: |
Typed request/response contracts existed for 9 host events in
hostEventClient/contracts.ts, but src/index.ts re-exported only
UIPassthroughEvent from that file. Since package.json "exports" limits
entry points to "." and "./react", and both typedoc configs use
entryPoints: ["src/index.ts"], those types were neither importable by
consumers nor rendered in the SDK reference.
- Export the contract types from src/index.ts and mirror them on the
React surface: UIPassthroughContractBase, UIPassthrough{Request,
Response,ArrayResponse}, HostEvent{Request,Response}, Trigger{Payload,
Response}, LiveboardTab, Applicability, ApplicabilityLevel,
FilterUpdate, LiveboardFilter, LiveboardParameter.
- Document what trigger() resolves with for the 9 mapped host events via
@returns, transcribed from the response types in contracts.ts. This
extends the @returns convention already used ~46x on EmbedEvent
members; HostEvent previously had none.
- Add all-types-export.parity.spec.ts: src/react/all-types-export.ts is
a hand-maintained duplicate export list, and the existing spec cannot
catch omissions because type-only exports are erased at runtime. The
new spec compares the two files as text. It surfaced 47 pre-existing
gaps (ContextType, CustomActionPayload, VizPoint, the Spotter view
configs, ...) which are recorded in a KNOWN_REACT_GAPS ratchet that
may only shrink, so new drift fails CI without widening this change.
Types only - no runtime or behaviour change.
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.
Typed request/response contracts existed for 9 host events in hostEventClient/contracts.ts, but src/index.ts re-exported only UIPassthroughEvent from that file. Since package.json "exports" limits entry points to "." and "./react", and both typedoc configs use entryPoints: ["src/index.ts"], those types were neither importable by consumers nor rendered in the SDK reference.
Types only - no runtime or behaviour change.