Skip to content

fix(docs): correct enum member names in SDK doc examples - #615

Merged
sastaachar merged 1 commit into
mainfrom
SCAL-327608
Aug 10, 2026
Merged

fix(docs): correct enum member names in SDK doc examples#615
sastaachar merged 1 commit into
mainfrom
SCAL-327608

Conversation

@sastaachar

Copy link
Copy Markdown
Contributor

Doc comments are the source for the public API reference and are read verbatim by code-generating consumers, so an example naming a member that does not exist ships code that will not compile. ListPageColumns.Favorite was the reported case; a sweep of every EnumName.Member reference in the comments found 11 more.

  • ListPageColumns.Favorite -> Favorites
  • EmbedEvent.DrillDown -> Drilldown
  • EmbedEvent.customAction -> CustomAction
  • EmbedEvent.DownloadAsPDF -> DownloadAsPdf
  • EmbedEvent.DownloadAsCSV -> DownloadAsCsv (x3)
  • EmbedEvent.DownloadAsXLSX -> DownloadAsXlsx
  • HostEvent.ScheduleList -> SchedulesList (x2)
  • Action.Export -> ExportTML (x2)
  • InterceptedApiType.DATA -> LiveboardData
  • AuthEvent.SUCCESS -> AuthStatus.SUCCESS (wrong enum)
  • useEmbedRef example: EmbedEvent.UpdateRuntimeFilter ->
    HostEvent.UpdateRuntimeFilters (wrong enum and singular member;
    trigger() takes a HostEvent)

EmbedEvent.FatalError is left as-is: it is a documented forward reference to a planned event, and is allowlisted in the new spec.

Adds src/enum-doc-references.spec.ts, which reparses the enums and fails on any doc reference to a member that does not exist.

SCAL-327608

@sastaachar
sastaachar requested a review from a team as a code owner August 7, 2026 08:39
Doc comments are the source for the public API reference and are read
verbatim by code-generating consumers, so an example naming a member that
does not exist ships code that will not compile. ListPageColumns.Favorite
was the reported case; a sweep of every EnumName.Member reference in the
comments found 11 more.

- ListPageColumns.Favorite  -> Favorites
- EmbedEvent.DrillDown      -> Drilldown
- EmbedEvent.customAction   -> CustomAction
- EmbedEvent.DownloadAsPDF  -> DownloadAsPdf
- EmbedEvent.DownloadAsCSV  -> DownloadAsCsv (x3)
- EmbedEvent.DownloadAsXLSX -> DownloadAsXlsx
- HostEvent.ScheduleList    -> SchedulesList (x2)
- Action.Export             -> ExportTML (x2)
- InterceptedApiType.DATA   -> LiveboardData
- AuthEvent.SUCCESS         -> AuthStatus.SUCCESS (wrong enum)
- useEmbedRef example: EmbedEvent.UpdateRuntimeFilter ->
  HostEvent.UpdateRuntimeFilters (wrong enum and singular member;
  trigger() takes a HostEvent)

EmbedEvent.FatalError is left as-is: it is a documented forward reference
to a planned event.

SCAL-327608
@pkg-pr-new

pkg-pr-new Bot commented Aug 7, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@thoughtspot/visual-embed-sdk@615

commit: 5ecb238

@sandeep-kr-yadav sandeep-kr-yadav left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM

@sastaachar
sastaachar merged commit e1d45a6 into main Aug 10, 2026
10 checks passed
bahetirisabh added a commit to bahetirisabh/visual-embed-sdk that referenced this pull request Aug 10, 2026
Picks up SpotterAnalystList, SpotterDefaultAnalyst and
SpotterEmbedViewConfig.analystId.

Also picks up drift already on main whose commits did not regenerate the
docs: preRenderConfig from thoughtspot#603, and the enum-name corrections from thoughtspot#615
(EmbedEvent.customAction -> CustomAction, EmbedEvent.DrillDown -> Drilldown,
ListPageColumns.Favorite -> Favorites, AuthEvent.SUCCESS -> AuthStatus.SUCCESS,
and the removal of the non-existent HostEvent.ScheduleList examples).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.

2 participants